TL;DR
Add three new server API endpoints: /tool (inject external tool results), /status (report status/progress), and /exec (execute tools by name). These enable plugins to interact with sessions programmatically.
More detail
- POST /session/:id/tool — Injects an external tool call + result into a session. Uses the
external flag on ToolPart to mark results as externally produced. Depends on the external flag PR.
- POST /session/:id/status — Appends a status/progress message to a session. Useful for plugins to report progress of long-running operations.
- POST /session/:id/exec — Executes a registered tool by name with given arguments, returning the result. Enables plugins to invoke opencode's built-in tools programmatically.
Part of the plugin primitives work tracked in #20018 (split from #21687).
TL;DR
Add three new server API endpoints:
/tool(inject external tool results),/status(report status/progress), and/exec(execute tools by name). These enable plugins to interact with sessions programmatically.More detail
externalflag onToolPartto mark results as externally produced. Depends on theexternalflag PR.Part of the plugin primitives work tracked in #20018 (split from #21687).