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

Function runStatus

scripts/watch.js:615–641  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

613}
614
615function runStatus() {
616 const state = readState();
617
618 if (!state.lastScanCommit) {
619 console.log('[watch] No scans have been run yet.');
620 process.exit(0);
621 }
622
623 console.log('[watch] Current state:');
624 console.log(` Last scan commit: ${state.lastScanCommit.slice(0, 7)}`);
625 console.log(` Scans run: ${state.stats.scansRun || 0}`);
626 console.log(` Markers found (total): ${state.stats.markersFound || 0}`);
627 console.log(` Intake items created (total): ${state.stats.intakeItemsCreated || 0}`);
628
629 const pending = Object.values(state.pendingActions || {});
630 if (pending.length > 0) {
631 console.log(` Pending actions: ${pending.length}`);
632 for (const a of pending) {
633 const desc = a.description ? ` ${a.description}` : '';
634 console.log(` ${a.file}:${a.line} -- ${a.action}${desc}`);
635 }
636 } else {
637 console.log(' Pending actions: 0');
638 }
639
640 process.exit(0);
641}
642
643function runReset() {
644 if (!acquireLock()) {

Callers 1

mainFunction · 0.85

Calls 1

readStateFunction · 0.70

Tested by

no test coverage detected