Commit Graph

3 Commits

Author SHA1 Message Date
yoniebans
db4d50b9e7 refactor(agent): the agent stores and repairs conversations through the persistence interface
The agent, run_agent.py and their helpers take a persistence handle instead of SessionDB. The store-side transcript repair moves beside the legacy store until the store is removed; agent/transcript_repair.py keeps the marker logic.

session_rules.turns is the one home of the message rules the agent shares with storage: the 56 agent functions whose bodies equal a session_rules.turns function are deleted, the agent and every other caller import them from session_rules.turns, and agent/message_content.py and agent/context_compressor_retry.py, left empty, go.
2026-11-17 17:51:20 +01:00
Kevin Rajan
9f13bc8512 fix(redact): scrub deferred notices at model-egress delivery
Queued plugin/LSP notices are appended after make_tool_result_message
redacts tool output, or injected into the following user turn. Apply the
active profile's source-value mask when dequeuing to cover both paths
without touching already-cached messages.

Add one parametrized regression for the tool-result and user-turn delivery
paths, against the exact head of c2h5oh's #155274.

Refs NousResearch/hermes-agent#77165

(cherry picked from commit 3e4d5cac8678cc52ad8931e0f54e7b4ebd9a226f)
2026-11-15 01:38:42 +01:00
alt-glitch
57fa33675f fix(agent): a plugin that goes live mid-turn is told in the next tool result, once
An install while a chat runs (the onboarding plugins card, Settings, a terminal
install through the serve backend) made the plugin's MCP tools callable at once,
but its notice waited on the one-shot turn-note channel for the next USER
message. Onboarding is one long turn, so in a live run the notice arrived six
minutes late, after the model had already failed to use the plugin.

Notices are now queued per plugin key (agent/plugin_live_notes.py; a reinstall
or update replaces the plugin's older notice) and popped onto the next tool
result before it is appended and flushed: a new row, so no cached byte moves.
The notice goes after the content, outside the untrusted-data wrapper web, MCP
and browser results get. A turn-budget spill of that result keeps the notice on
the inline row. When no tool runs again this turn, the next user message still
carries it, and a delivered notice is never sent twice.

(cherry picked from commit 41cbb879a98a5bbcf57018a5c03d6207b57b819c)
2026-10-14 00:06:58 +05:30