Repository navigation
v0.1.2
Fixed
-
Annotate tool results when Hypa rewrites a bash command.
tool.execute.beforemutatesoutput.args.commandsilently, so OpenCode would hand the LLM a tool result whose title shows the rewritten command (hypa git log …) with no marker that a plugin changed it. The LLM then rationalized the prefix as its own typo — e.g. apologizing for an "accidentally prefixed" command that was actually injected by Hypa.This release registers a
tool.execute.afterhook that stashes rewrites keyed bycallIDand annotates the tool result with a one-line note:[hypa Rewritten] git log --oneline -10 => hypa git log --oneline -10The note is prepended to both
output.titleandoutput.output, and the full record is written tooutput.metadata.hypaRewrite. Non-rewritten outcomes (passthrough / skipped / error) leave the tool result untouched.Workaround for anomalyco/opencode#37963 (
tool.execute.beforearg mutation is invisible to the LLM).