mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-20 15:33:54 +00:00
build_tool_start renders every ACP (Zed) tool call — on the live tool-progress callback (acp_adapter/events.py) and during session history replay (acp_adapter/server.py). It called build_tool_title and extract_locations directly, so a model that emits a malformed argument crashed the render: - terminal `command` as null/number -> TypeError (len() in build_tool_title) - delegate_task `goal` as a number -> TypeError (len()) - read_file `path` as a non-string -> pydantic ValidationError building a ToolCallLocation A live crash breaks the tool-call event; a persisted one breaks history replay on every resume of that session. The sibling CLI label builder get_cute_tool_message was already wrapped for exactly this reason (agent/display.py: "display must never abort a turn"). Wrap build_tool_start the same way: on any builder failure, fall back to a minimal, valid start event (tool name as title, resolved kind). The happy path is unchanged. Adds tests for the non-string command, path, and goal cases. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| auth.py | ||
| edit_approval.py | ||
| entry.py | ||
| events.py | ||
| permissions.py | ||
| provenance.py | ||
| server.py | ||
| session.py | ||
| tools.py | ||