Skip to content

refactor(core): replace deferred tool option with codemode#36560

Open
rekram1-node wants to merge 4 commits into
v2from
tool-codemode
Open

refactor(core): replace deferred tool option with codemode#36560
rekram1-node wants to merge 4 commits into
v2from
tool-codemode

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • Rename tool registration deferredcodemode (defaults true = enter CodeMode)
  • codemode: false keeps tools on the provider native list; built-ins opt out
  • MCP registers with codemode: Flag.CODEMODE_ENABLED
  • Update plugin types, registry materialization, docs, and tests
  • Add specs/v2/codemode.md design handoff for the stacked PR series

Part of #36196

Stack

  1. This PRdeferredcodemode
  2. Flat Effect draft + namespace / pinned fields
  3. Namespace registry
  4. Callable namespaces + structured catalog
  5. Instruction integration
  6. MCP adapter + polish

Test plan

  • bun typecheck in packages/core and packages/plugin
  • bun test test/session-runner-tool-registry.test.ts test/plugin.test.ts in packages/core
  • bun test test/tool-read.test.ts test/tool-edit.test.ts test/tool-write.test.ts test/mcp.test.ts in packages/core

Note: pre-push monorepo typecheck fails on pre-existing @opencode-ai/simulation missing @napi-rs/canvas on v2; package-level typecheck for changed packages passes.

Tools default into CodeMode; set codemode: false for native provider tools.
Built-ins opt out; MCP follows CODEMODE_ENABLED. Adds the V2 CodeMode catalog
design handoff for the stacked follow-ups.
codemode now defaults true, so native-facing promise tests must opt out.
Use options.codemode for Promise plugin tests, drop local-only design handoff
from the branch, and remove packages/codemode/codemode.md.
Resolve modify/delete conflict by keeping packages/codemode/codemode.md removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant