import { readFile } from 'node:fs/promises'; import { validateBundle } from './validation.mjs'; // Frozen, hand-reconciled oracle lives outside both agent surfaces. The agent's // confidence or its calculation scripts never participate in the pass predicate. const expected = JSON.parse(await readFile(new URL('./expected.json', import.meta.url), 'utf8')); let input = ''; for await (const chunk of process.stdin) { input += chunk; if (Buffer.byteLength(input) > 2_000_000) throw new Error('Verifier input limit exceeded'); } const { output } = JSON.parse(input); const { bundle: _, ...verification } = validateBundle(output, expected); process.stdout.write(JSON.stringify(verification));