feat(shared): add replaceToolArgs helper for safe tool-args mutation

opencode >=1.14 freezes output.args via Immer before plugin hooks run.
Direct property assignment or Object.assign on a frozen object throws
TypeError. This helper replaces output.args with a shallow clone
containing the patch, avoiding mutation of the frozen original.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-18 12:32:10 +09:00
parent 34e6af1ae6
commit 6bffb2c40f
2 changed files with 17 additions and 0 deletions
+1
View File
@@ -84,3 +84,4 @@ export * from "./task-system-enabled"
export * from "./parse-tools-config"
export { parseModelString } from "./model-string-parser"
export { EXCLUDED_DIRS } from "./excluded-dirs"
export * from "./replace-tool-args"