MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / registerDaemon

Function registerDaemon

src/mcp/daemon-registry.ts:66–73  ·  view source on GitHub ↗
(rec: DaemonRecord)

Source from the content-addressed store, hash-verified

64
65/** Best-effort: record this daemon so `list`/`stop --all` can find it. */
66export function registerDaemon(rec: DaemonRecord): void {
67 try {
68 fs.mkdirSync(getRegistryDir(), { recursive: true });
69 fs.writeFileSync(recordPath(rec.root), JSON.stringify(rec, null, 2) + '\n', { mode: 0o600 });
70 } catch {
71 /* best-effort — list's liveness prune tolerates a missing record */
72 }
73}
74
75/** Best-effort: drop this daemon's record on graceful shutdown. */
76export function deregisterDaemon(root: string): void {

Callers 2

startMethod · 0.90

Calls 2

getRegistryDirFunction · 0.85
recordPathFunction · 0.85

Tested by

no test coverage detected