feat(approval): interactive approval workflow for supervised mode (#215)
- Add auto_approve / always_ask fields to AutonomyConfig - New src/approval/ module: ApprovalManager with session-scoped allowlist, ApprovalRequest/Response types, audit logging, CLI interactive prompt - Insert approval hook in agent_turn before tool execution - Non-CLI channels auto-approve; CLI shows Y/N/A prompt - Skip approval for read-only tools (file_read, memory_recall) by default - 15 unit tests covering all approval logic
This commit is contained in:
parent
f489971889
commit
ab561baa97
7 changed files with 502 additions and 0 deletions
|
|
@ -849,6 +849,7 @@ mod tests {
|
|||
max_cost_per_day_cents: 1000,
|
||||
require_approval_for_medium_risk: false,
|
||||
block_high_risk_commands: false,
|
||||
..crate::config::AutonomyConfig::default()
|
||||
};
|
||||
let workspace = PathBuf::from("/tmp/test-workspace");
|
||||
let policy = SecurityPolicy::from_config(&autonomy_config, &workspace);
|
||||
|
|
@ -1201,6 +1202,7 @@ mod tests {
|
|||
max_cost_per_day_cents: 100,
|
||||
require_approval_for_medium_risk: true,
|
||||
block_high_risk_commands: true,
|
||||
..crate::config::AutonomyConfig::default()
|
||||
};
|
||||
let workspace = PathBuf::from("/tmp/test");
|
||||
let policy = SecurityPolicy::from_config(&autonomy_config, &workspace);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue