[PR #2670] Plugin tool updates #10399

Closed
opened 2026-02-16 18:15:02 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/2670

State: closed
Merged: Yes


Summary

  • Refactored plugin tool system to support custom tools via .opencode/tool/ directories
  • Added new tool() helper function for creating custom tools with Zod validation
  • Removed HTTP tool registration API in favor of direct plugin tool definitions
  • Updated tool registry to scan for custom tools in config directories
  • Added comprehensive documentation for custom tools
  • Simplified plugin interface by removing Tool and z parameters

Changes

  • BREAKING: Removed HTTP tool registration endpoints and tool.register hook
  • NEW: Added support for custom tools via .opencode/tool/*.ts files
  • NEW: Added tool() helper function in @opencode-ai/plugin/tool
  • IMPROVED: Tool registry now automatically discovers custom tools
  • IMPROVED: Better type safety for plugin tools
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/2670 **State:** closed **Merged:** Yes --- ## Summary - Refactored plugin tool system to support custom tools via `.opencode/tool/` directories - Added new `tool()` helper function for creating custom tools with Zod validation - Removed HTTP tool registration API in favor of direct plugin tool definitions - Updated tool registry to scan for custom tools in config directories - Added comprehensive documentation for custom tools - Simplified plugin interface by removing Tool and z parameters ## Changes - **BREAKING**: Removed HTTP tool registration endpoints and `tool.register` hook - **NEW**: Added support for custom tools via `.opencode/tool/*.ts` files - **NEW**: Added `tool()` helper function in `@opencode-ai/plugin/tool` - **IMPROVED**: Tool registry now automatically discovers custom tools - **IMPROVED**: Better type safety for plugin tools
yindo added the pull-request label 2026-02-16 18:15:02 -05:00
yindo closed this issue 2026-02-16 18:15:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10399