feat: add dynamic autonomous DAVE presence

This commit is contained in:
2026-07-05 22:47:08 +02:00
parent 35e4f901f7
commit 08b6016dfb
10 changed files with 429 additions and 4 deletions

View File

@@ -130,3 +130,23 @@ test('repeated tool calls during finalization fail closed without leaking protoc
assert.doesNotMatch(result.answer, /tool_call|get_evidence|rationale/i);
assert.equal(result.notify, false);
});
test('scheduled presence cannot create pending mutating actions', async () => {
let executions = 0;
const agent = new TerminalAgent({
provider: providerWith([
{ type: 'tool_call', tool: 'trigger_sweep', arguments: {}, rationale: 'Refresh data' },
{ type: 'final', answer: 'No autonomous action was taken.', confidence: 'high', evidence: [], notify: false, priority: 'routine' },
]),
registry: new TerminalToolRegistry([{
name: 'trigger_sweep',
mutating: true,
handler: async () => { executions++; },
}]),
});
const result = await agent.run('Evaluate presence', { mode: 'presence' });
assert.equal(result.pendingAction, undefined);
assert.equal(result.trace[0].status, 'rejected');
assert.equal(executions, 0);
});