Agent Police Department v1.0.0 MVP
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user