MCPcopy Create free account
hub / github.com/SethGammon/Citadel / writeState

Function writeState

hooks_src/cost-tracker.js:59–66  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

57}
58
59function writeState(state) {
60 try {
61 if (!fs.existsSync(TELEMETRY_DIR)) {
62 fs.mkdirSync(TELEMETRY_DIR, { recursive: true });
63 }
64 fs.writeFileSync(STATE_FILE, JSON.stringify(state, null, 2));
65 } catch { /* non-critical */ }
66}
67
68// ── Policy ───────────────────────────────────────────────────────────────────
69

Callers 1

runFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected