|
Step 4: Extract SubAgentRunner from run_ephemeral()
- Create navi/core/subagent_runner.py with full sub-agent loop logic - Move _iter_stream_guarded to navi/core/stream_guard.py - Move _check_context_size to ContextCompressor.check_context_size() - Extract build_tool_list() and load_user_enabled_tools() to tool_utils.py - Agent.run_ephemeral() becomes a thin wrapper delegating to SubAgentRunner - Remove ~310 lines from agent.py - All existing run_ephemeral tests pass unchanged Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
|---|
|
|
| navi/core/agent.py |
|---|
| navi/core/compressor.py |
|---|
| navi/core/stream_guard.py 0 → 100644 |
|---|
| navi/core/subagent_runner.py 0 → 100644 |
|---|
| navi/core/tool_utils.py 0 → 100644 |
|---|
| tests/unit/core/test_agent_context_size.py |
|---|