MCPcopy Index your code
hub / github.com/garrytan/gstack / daemonStatus

Function daemonStatus

design/src/daemon-client.ts:402–419  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

400
401/** $D daemon status — for the CLI sub-command. */
402export async function daemonStatus(): Promise<
403 | { running: false }
404 | { running: true; port: number; pid: number; version: string; boards: number; activeBoards: number; uptime: number }
405> {
406 const existing = readStateFile();
407 if (!existing) return { running: false };
408 const h = await healthCheck(existing.port);
409 if (!h) return { running: false };
410 return {
411 running: true,
412 port: existing.port,
413 pid: existing.pid,
414 version: h.version,
415 boards: h.boards,
416 activeBoards: h.activeBoards,
417 uptime: h.uptime,
418 };
419}

Callers 1

Calls 2

readStateFileFunction · 0.90
healthCheckFunction · 0.90

Tested by

no test coverage detected