MCPcopy Create free account
hub / github.com/EvoMap/evolver / _readLedger

Function _readLedger

src/atp/atpTaskPickup.js:50–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48}
49
50function _readLedger() {
51 try {
52 const p = _ledgerPath();
53 if (!fs.existsSync(p)) return _emptyLedger();
54 const raw = fs.readFileSync(p, 'utf8');
55 const parsed = JSON.parse(raw);
56 if (!parsed || typeof parsed !== 'object' || !parsed.spawned) return _emptyLedger();
57 return parsed;
58 } catch (_) {
59 return _emptyLedger();
60 }
61}
62
63function _writeLedger(ledger) {
64 try {

Callers 2

pickOneFunction · 0.70
forgetFunction · 0.70

Calls 3

parseMethod · 0.80
_ledgerPathFunction · 0.70
_emptyLedgerFunction · 0.70

Tested by

no test coverage detected