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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user