feat: add permission modes and CLI orchestration layer
Permission Modes: - Add default/plan/auto_accept modes controlling tool access - Plan mode restricts Task agent to read-only tools only - Auto-accept mode bypasses approval prompts (with confirmation) Approval Scaffolding: - Add ApprovalRule/ApprovalRuleSet for granular tool control - Pattern-based matching on tool name and arguments - Default rules for common safe/dangerous patterns - Prep for future bidirectional approval flow CLI Refactor: - Default to Task agent (main orchestrator) - Add --mode flag and runtime mode switching - Integrate prompt_toolkit for better UX: - Persistent command history (~/.webber_history) - Tab completion for commands and file paths - Auto-suggest from history - Deprecate standalone 'explore' command Other: - Split CHANGELOG.md into per-package files - Update AGENTS.md release procedure for both packages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -206,14 +206,14 @@ class TestTaskAgentProperties:
|
||||
# Create a fresh instance
|
||||
fresh_agent = TaskAgentImpl()
|
||||
|
||||
# _agent should be None before first access
|
||||
assert fresh_agent._agent is None
|
||||
# _agents dict should be empty before first access
|
||||
assert len(fresh_agent._agents) == 0
|
||||
|
||||
# Access the agent property
|
||||
# Access the agent property (creates default mode agent)
|
||||
_ = fresh_agent.agent
|
||||
|
||||
# Now _agent should be set
|
||||
assert fresh_agent._agent is not None
|
||||
# Now _agents should have one entry
|
||||
assert len(fresh_agent._agents) == 1
|
||||
|
||||
|
||||
class TestAllAgentsRegistered:
|
||||
|
||||
Reference in New Issue
Block a user