|
core: split the agent and context builder into packages
Agent becomes one class assembled from mixins: runtime (turn lifecycle), streaming (the turn loop), tools (tool execution), compression (context gates) and context (tool lists, backend lookup, window). The module-level helpers and sentinels move to helpers.py. ContextBuilder splits into helpers (pure truncation/freshness/prompt blocks) and builder (the class). Both old modules become packages with the same import surface, so navi.core.agent.Agent and navi.core.context_builder.ContextBuilder keep working. Method bodies are unchanged; tests now patch settings/log/should_compress on the mixin that actually reads them. |
|---|
|
|
| navi/core/agent.py 100644 → 0 |
|---|
|
Too large (Show diff)
|
| navi/core/agent/__init__.py 0 → 100644 |
|---|
| navi/core/agent/compression.py 0 → 100644 |
|---|
| navi/core/agent/context.py 0 → 100644 |
|---|
| navi/core/agent/core.py 0 → 100644 |
|---|
| navi/core/agent/helpers.py 0 → 100644 |
|---|
| navi/core/agent/runtime.py 0 → 100644 |
|---|
| navi/core/agent/streaming.py 0 → 100644 |
|---|
| navi/core/agent/tools.py 0 → 100644 |
|---|
| navi/core/context_builder.py 100644 → 0 |
|---|
| navi/core/context_builder/__init__.py 0 → 100644 |
|---|
| navi/core/context_builder/builder.py 0 → 100644 |
|---|
| navi/core/context_builder/helpers.py 0 → 100644 |
|---|
| tests/unit/core/test_agent.py |
|---|
| tests/unit/core/test_memory_recall.py |
|---|