feat: add dynamic autonomous DAVE presence
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user