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

Function writeDaemonState

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

Source from the content-addressed store, hash-verified

27 * Write daemon state to disk. Called by the supervisor on startup.
28 */
29export function writeDaemonState(
30 state: DaemonStateData,
31 name = 'remote-control',
32): void {
33 const filePath = getDaemonStateFilePath(name)
34 mkdirSync(dirname(filePath), { recursive: true })
35 writeFileSync(filePath, JSON.stringify(state, null, 2), 'utf-8')
36}
37
38/**
39 * Read daemon state from disk. Returns null if no state file exists.

Callers 2

runSupervisorFunction · 0.85
state.test.tsFile · 0.85

Calls 2

mkdirSyncFunction · 0.90
getDaemonStateFilePathFunction · 0.85

Tested by

no test coverage detected