async function main() { const [repoDir, requestJson] = process.argv.slice(2); if (!repoDir || !requestJson) { throw new Error( 'usage: bun shared/verification-request-runner.js ', ); } // Load the verifier from the EJClaw install this helper ships with; repoDir // is only the workspace being verified and need not be an EJClaw checkout. const verificationModuleUrl = new URL( '../src/verification.ts', import.meta.url, ).href; const verificationModule = await import(verificationModuleUrl); const request = JSON.parse(requestJson); const result = await verificationModule.runVerificationRequest(request, { repoDir, }); process.stdout.write( JSON.stringify({ requestId: request.requestId, ...result, }), ); } main().catch((error) => { const message = error instanceof Error ? error.stack || error.message : String(error); process.stderr.write(message); process.exit(1); });