mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-05-17 03:56:45 +00:00
- Add CodeBurnRefreshAgent target: native fire-and-exit binary posting com.codeburn.refresh notification - Rewrite installLaunchAgentIfNeeded(): plist ProgramArguments points to native binary, not osascript/JXA - Rewrite registerLoginItemIfNeeded(): uses SMAppService API instead of osascript/System Events - Add startSocketListener(): Unix domain socket for CLI-triggered menubar refresh - Add src/menubar-socket.ts: CLI-side notifyMenubar() helper wired into status --format menubar-json - Update Package.swift with new product/target, package-app.sh copies agent into bundle Resources - Add tests: plist content verification, login item guard, agent smoke test
12 lines
324 B
TypeScript
12 lines
324 B
TypeScript
import { connect } from 'node:net'
|
|
import { homedir } from 'node:os'
|
|
import { join } from 'node:path'
|
|
|
|
const SOCKET_PATH = join(homedir(), '.cache', 'codeburn', 'menubar.sock')
|
|
|
|
export function notifyMenubar(): void {
|
|
const sock = connect(SOCKET_PATH)
|
|
sock.on('error', () => {})
|
|
sock.write('refresh\n')
|
|
sock.end()
|
|
}
|