feat(policy): enforce truthfulness and autonomy guardrails
Add runtime truthfulness modes and autonomy-level tool gating with audit metadata for overrides/denials. Wire policy through prompt assembly, tool execution context, and daemon/gateway agent paths; update tests and planning state for Phase 3 PR #2 completion.
This commit is contained in:
@@ -44,6 +44,7 @@ describe('Tool integration (end-to-end)', () => {
|
||||
systemPrompt: 'You have tools.',
|
||||
toolRegistry: registry,
|
||||
toolExecutor: executor,
|
||||
toolPolicyContext: { autonomyLevel: 'autonomous' },
|
||||
});
|
||||
|
||||
const result = await agent.process('run echo integration_test');
|
||||
@@ -89,9 +90,10 @@ describe('Tool integration (end-to-end)', () => {
|
||||
|
||||
const agent = new NativeAgent({
|
||||
modelClient: mockClient,
|
||||
systemPrompt: 'You have file tools.',
|
||||
systemPrompt: 'You have tools.',
|
||||
toolRegistry: registry,
|
||||
toolExecutor: executor,
|
||||
toolPolicyContext: { autonomyLevel: 'autonomous' },
|
||||
});
|
||||
|
||||
try {
|
||||
@@ -141,6 +143,7 @@ describe('Tool integration (end-to-end)', () => {
|
||||
systemPrompt: 'You have tools.',
|
||||
toolRegistry: registry,
|
||||
toolExecutor: executor,
|
||||
toolPolicyContext: { autonomyLevel: 'autonomous' },
|
||||
});
|
||||
|
||||
const result = await agent.process('verify tool results');
|
||||
|
||||
Reference in New Issue
Block a user