@opencode/codemode 0.0.0-dev-19659 → 0.0.0-dev-19661

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -256,7 +256,13 @@ export const make = (prepared, maxToolCalls, hooks) => {
256
256
  calls,
257
257
  keys: (path) => namespaceKeys(root, path),
258
258
  search: (args) => Effect.suspend(() => executeTool("search", searchTool, args)),
259
- execute: (path, args) => Effect.suspend(() => executeTool(canonicalSegments(path).join("."), resolve(root, path), args)),
259
+ execute: (path, args) => Effect.suspend(() => {
260
+ const segments = canonicalSegments(path);
261
+ // Models often write `tools.search(...)` for the bare `search(...)`; honor it unless a tool owns that path.
262
+ if (segments.length === 1 && segments[0] === "search" && lookup(root, segments) === undefined)
263
+ return executeTool("search", searchTool, args);
264
+ return executeTool(segments.join("."), resolve(root, path), args);
265
+ }),
260
266
  };
261
267
  };
262
268
  export * as ToolRuntime from "./tool-runtime.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/codemode",
4
- "version": "0.0.0-dev-19659",
4
+ "version": "0.0.0-dev-19661",
5
5
  "description": "Effect-native confined code execution over schema-described tools",
6
6
  "type": "module",
7
7
  "license": "MIT",