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:
@@ -1,6 +1,5 @@
|
||||
import { randomUUID } from 'crypto';
|
||||
import type { SessionManager } from '../session/manager.js';
|
||||
import type { Session } from '../session/manager.js';
|
||||
import type { ModelClient } from '../models/types.js';
|
||||
import type { ModelRouter, ModelTier } from '../models/router.js';
|
||||
import type { ToolRegistry } from '../tools/registry.js';
|
||||
@@ -198,10 +197,18 @@ export class SessionBridge {
|
||||
thresholdPct: config.compaction.threshold_pct,
|
||||
keepTurns: config.compaction.keep_turns,
|
||||
summaryMaxTokens: config.compaction.summary_max_tokens,
|
||||
importanceThreshold: config.compaction.importance_threshold,
|
||||
} : undefined,
|
||||
modelName: config?.models.default.model,
|
||||
contextWindow: config?.models.default.context_window,
|
||||
memoryStore: this.config.memoryStore,
|
||||
memoryInjectionStrategy: config?.memory?.injection_strategy,
|
||||
memoryMaxInjectionTokens: config?.memory?.max_injection_tokens,
|
||||
toolPolicyContext: {
|
||||
agent: primaryTier,
|
||||
provider: config?.models.default.provider,
|
||||
autonomyLevel: config?.agents.autonomy_level ?? 'standard',
|
||||
},
|
||||
});
|
||||
|
||||
this.agents.set(sessionId, agent);
|
||||
|
||||
Reference in New Issue
Block a user