Release

OpenCode v2.2.0: Desktop plugins, session instruction entries, and three breaking changes

OpenCode v2.2.0 ships experimental Desktop plugins, keyed session instruction entries for plugins, configurable prompt cache TTLs, and three breaking changes.

OpenCode v2.2.0 shipped on October 27. Its headline additions are experimental Desktop plugins, keyed session instruction entries that plugins can attach without busting the prompt cache, experimental image and decision generation APIs, and configurable prompt cache TTLs per provider/model. It also carries three breaking changes — for @opencode/ai consumers, users of the OpenCode GitHub Action, and TUI plugin authors — so read those before upgrading.

Desktop plugins (experimental)

You can now create, install and share Desktop plugins. The feature is experimental. In the desktop app, plugins are managed from Settings › Extensions › Plugins, and the SDK adds GUI plugin APIs for toasts, dialogs, notifications, tabs, composer controls, and custom UI.

Session instruction entries for plugins

Plugins can now attach and update keyed session instructions with ctx.session.instructions.entry.put/list/remove. Instead of editing the system prompt and busting the prompt cache, each change is added as a small update at the next step. The entries also survive compaction and reverts, and they don’t start an extra model turn.

Image and decision generation APIs (experimental)

v2.2.0 adds experimental image and decision generation APIs to plugins and the SDK, allowing image generation or decision model (think typesafe, clef, etc) workflows. On the Core side, this lands as experimental image and decision generation API endpoints, image and decision entrypoints for catalog providers, and Decision APIs in the AI package — including OpenAI Decisions, System One, and Cloudflare Run models — which replace the experimental evaluations. Custom model configuration can set a model type, and model-list API requests can filter by type.

Configurable prompt cache TTLs

Prompt cache TTLs are now configurable per provider/model.

The Todo tool is back in desktop

The Todo tool is restored in desktop via opt-in, and todowrite tasks are shown above the composer.

Three breaking changes

@opencode/ai root is now the Promise API

@opencode/ai now works like @opencode/sdk and @opencode/client: the package root exports the Promise API, and the Effect API moved to @opencode/ai/effect. @opencode/ai/promise is removed, and the wildcard subpath export is replaced with an explicit list of provider and protocol entry points.

-import { AI } from "@opencode/ai/promise"
-import { LLM } from "@opencode/ai"
+import { AI } from "@opencode/ai"
+import { LLM } from "@opencode/ai/effect"

The OpenCode GitHub Action is removed

The OpenCode GitHub Action is no longer published. Remove it from your workflows.

TUI plugins require OpenTUI 0.7

@opencode/plugin now requires @opentui/core and @opentui/solid 0.7.0, up from 0.6.8 or later. Plugins that depend on OpenTUI 0.6 fail to install until they upgrade. In OpenTUI 0.7, custom renderables read their hooks from their class at construction: assign renderBefore, renderAfter, and onLifecyclePass in the constructor instead of as class fields, call refreshHooks() after adding a hook by reflection, and replace defineNativeIntegration() with a static nativeIntegration declaration. See the OpenTUI 0.7.0 release notes.

A refreshed desktop app

The desktop app experience is refreshed in this release. Among the changes:

How to use

Also worth knowing

For the full list of changes, see the v2.2.0 release notes, and follow the release feed for the next tag.

출처: https://github.com/anomalyco/opencode/releases/tag/v2.2.0

이어서 탐색