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

Function readState

scripts/watch.js:154–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152}
153
154function readState() {
155 if (!fs.existsSync(STATE_PATH)) {
156 return defaultState();
157 }
158 try {
159 return normalizeState(JSON.parse(fs.readFileSync(STATE_PATH, 'utf8')));
160 } catch {
161 return defaultState();
162 }
163}
164
165function writeState(state) {
166 if (!fs.existsSync(PLANNING_DIR)) {

Callers 2

runScanFunction · 0.70
runStatusFunction · 0.70

Calls 2

defaultStateFunction · 0.85
normalizeStateFunction · 0.85

Tested by

no test coverage detected