mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-19 22:41:45 +02:00
17 lines
536 B
JavaScript
17 lines
536 B
JavaScript
#!/usr/bin/env node
|
|
const { readStdin, hookEnabled } = require('./adapter');
|
|
readStdin().then(raw => {
|
|
if (!hookEnabled('subagent:stop:audit', ['standard', 'strict'])) {
|
|
process.stdout.write(raw);
|
|
return;
|
|
}
|
|
try {
|
|
const input = JSON.parse(raw);
|
|
const agent = input.agent_name || input.agent || 'unknown';
|
|
console.error(`[ECC] Agent completed: ${agent}`);
|
|
} catch {
|
|
// Audit-only hook: malformed payloads must not interrupt the agent loop.
|
|
}
|
|
process.stdout.write(raw);
|
|
}).catch(() => process.exit(0));
|