Files
agent-police-department-cla…/debug2.js
T
2026-06-14 13:18:56 +00:00

25 lines
902 B
JavaScript

const { loadModule } = require('./test-runner.js');
async function test() {
const buildDir = '/home/node/.openclaw/workspace/agents/bunbun/builds/agent-police-department-claude-code-agent-governan';
const hashMod = await loadModule(path.join(buildDir, 'lib/hash.js'));
console.log('hashMod:', Object.keys(hashMod));
console.log('hashChain type:', typeof hashMod.hashChain);
const auditMod = await loadModule(path.join(buildDir, 'lib/audit.js'));
console.log('auditMod:', Object.keys(auditMod));
// Try to call exportAuditLog
const { addEvent, exportAuditLog } = auditMod;
await addEvent({ id: 'e1', type: 'tool_use', timestamp: new Date().toISOString() });
try {
const result = await exportAuditLog();
console.log('exportAuditLog OK:', result.integrity);
} catch (err) {
console.log('exportAuditLog error:', err.message);
}
}
test().catch(console.error);