opencode/packages/plugin-widgets
2026-11-20 23:35:54 +00:00
..
script feat(core): move widgets into the opt-in @opencode/plugin-widgets server plugin 2026-11-20 21:01:02 +00:00
src fix(core): widget templates switch on event type so key, focus and capture events don't misfire 2026-11-20 23:09:58 +00:00
test feat(core): handlers on widget nodes with prelude-assigned ids instead of update and widget.event 2026-11-20 23:35:54 +00:00
package.json feat(core): lint widget templates without running them and take client error reports 2026-11-20 22:13:10 +00:00
README.md feat(core): move widgets into the opt-in @opencode/plugin-widgets server plugin 2026-11-20 21:01:02 +00:00
tsconfig.build.json feat(core): move widgets into the opt-in @opencode/plugin-widgets server plugin 2026-11-20 21:01:02 +00:00
tsconfig.json feat(core): move widgets into the opt-in @opencode/plugin-widgets server plugin 2026-11-20 21:01:02 +00:00
tsconfig.test.json feat(core): move widgets into the opt-in @opencode/plugin-widgets server plugin 2026-11-20 21:01:02 +00:00

Widgets plugin

@opencode/plugin-widgets lets agents show interactive widgets in a session: option cards with images, forms, confirmations, charts and custom templates. Each widget is a PsychoScript program from @opencode/widget plus JSON data; clients run the program and render its view natively. The contract is specs/v2/widgets.md.

The plugin uses only the public plugin API. It owns the widget and widget_template tools, the widgets skill, template versions and widget states in plugin storage, the opencode.widget RPC (Widget.Definition in @opencode/schema/widget) with its changed event, and the delivery of answers to the model as synthetic messages. Core registers it only while the opt-in widgets flag is on.