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

Function main

scripts/recall-verify-report.js:192–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190}
191
192function main() {
193 const args = parseArgs(process.argv);
194 if (args.help) {
195 console.log('Usage: node scripts/recall-verify-report.js [--since <Nh|Nm|Nd|ISO>] [--json]');
196 process.exit(0);
197 }
198
199 let sinceMs = null;
200 if (args.since) {
201 const parsed = parseSince(args.since);
202 if (parsed === undefined) {
203 console.error('Error: --since must be ISO-8601 or a duration like 1h / 30m / 2d (got: ' + args.since + ')');
204 process.exit(1);
205 }
206 sinceMs = parsed;
207 }
208
209 const allEvents = tryReadMemoryGraphEvents(20000);
210 const filtered = allEvents.filter(function (ev) {
211 if (!ev || ev.kind !== 'recall_verify') return false;
212 if (sinceMs != null && Number.isFinite(ev.ts) && ev.ts < sinceMs) return false;
213 return true;
214 });
215
216 const result = aggregate(filtered);
217
218 if (args.json) {
219 console.log(JSON.stringify({
220 since: sinceMs ? new Date(sinceMs).toISOString() : null,
221 ...result,
222 }, null, 2));
223 } else {
224 printMarkdown(result, sinceMs);
225 }
226
227 process.exit(result.gate === 'GREEN' ? 0 : 2);
228}
229
230if (require.main === module) {
231 main();

Callers 1

Calls 4

parseSinceFunction · 0.85
aggregateFunction · 0.85
printMarkdownFunction · 0.85
parseArgsFunction · 0.70

Tested by

no test coverage detected