feat: wire context engine tools, session lifecycle, and tool dispatch

- Inject engine tool schemas into agent tool surface after compressor init
- Call on_session_start() with session_id, hermes_home, platform, model
- Dispatch engine tool calls (lcm_grep, etc.) before regular tool handler
- 55/55 tests pass
This commit is contained in:
Stephen Schoettler
2026-04-06 19:53:17 -07:00
committed by Teknium
parent 271d2ad374
commit 28eeea73ec
2 changed files with 52 additions and 1 deletions
+4 -1
View File
@@ -118,11 +118,14 @@ class ContextEngine(ABC):
"""
return []
def handle_tool_call(self, name: str, args: Dict[str, Any]) -> str:
def handle_tool_call(self, name: str, args: Dict[str, Any], **kwargs) -> str:
"""Handle a tool call from the agent.
Only called for tool names returned by get_tool_schemas().
Must return a JSON string.
kwargs may include:
messages: the current in-memory message list (for live ingestion)
"""
import json
return json.dumps({"error": f"Unknown context engine tool: {name}"})