MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / readDaemonState

Function readDaemonState

src/daemon/state.ts:41–51  ·  view source on GitHub ↗
(
  name = 'remote-control',
)

Source from the content-addressed store, hash-verified

39 * Read daemon state from disk. Returns null if no state file exists.
40 */
41export function readDaemonState(
42 name = 'remote-control',
43): DaemonStateData | null {
44 const filePath = getDaemonStateFilePath(name)
45 try {
46 const raw = readFileSync(filePath, 'utf-8')
47 return JSON.parse(raw) as DaemonStateData
48 } catch {
49 return null
50 }
51}
52
53/**
54 * Remove the daemon state file.

Callers 3

queryDaemonStatusFunction · 0.85
stopDaemonByPidFunction · 0.85
state.test.tsFile · 0.85

Calls 2

readFileSyncFunction · 0.90
getDaemonStateFilePathFunction · 0.85

Tested by

no test coverage detected