opencode/packages/plugin-widgets
OpenCode Agent 71e0cf4133 build(core): widget packages take psychoscript from git, pinned to a commit
@opencode/widget and @opencode/plugin-widgets depend on github:anomalyco/psychoscript#fdea142 on
its rust branch (its prepare script builds dist on install; psychoscript is a trusted dependency so
Bun runs it). codemode stays on npm 0.2.1.
2026-11-22 03:31:28 +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 feat(core): a stack node layers its children, for HUDs over a canvas 2026-11-21 23:54:01 +00:00
test feat(core): one canvas node draws with 2D commands or a WGSL shader; remove the shader node 2026-11-21 23:54:01 +00:00
package.json build(core): widget packages take psychoscript from git, pinned to a commit 2026-11-22 03:31:28 +00:00
README.md refactor(core): call the widget concept a widget template everywhere 2026-11-21 21:10:16 +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 widget 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, widget 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.