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

Function readState

browse/src/cli.ts:109–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107
108// ─── State File ────────────────────────────────────────────────
109function readState(): ServerState | null {
110 try {
111 const data = fs.readFileSync(config.stateFile, 'utf-8');
112 return JSON.parse(data);
113 } catch {
114 return null;
115 }
116}
117
118// isProcessAlive is imported from ./error-handling
119

Callers 5

startServerFunction · 0.70
ensureServerFunction · 0.70
sendCommandFunction · 0.70
mainFunction · 0.70
teardownAndExitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected