Skip to content

Releases

v1.0.0-alpha.8

v1.0.0-alpha.8 Pre-release
Pre-release

Choose a tag to compare

@ranjithrajv ranjithrajv released this 19 Oct 12:27

Added

  • Behaviour-level coverage for the polling fetcher refresh-after-stop and post-error inFlight() reset semantics.
  • theme.ts — toneColor() maps semantic tones (base, muted, error, warning, success, info) onto host theme tokens, replacing per-plugin colour branches.
  • util.ts — safe() wraps throw-prone host reads.
  • tokens.ts — tokenBreakdown(), messageCost() and estimateTokens() normalize v1/v2 token and cost shapes.
  • slot.ts — claimSlot() claims a UI slot and always returns a callable cleanup.
  • panel.ts — createPanel() owns session.panel claim, name filtering, host open/close/fullscreen actions and active-state checks.
  • persistedState.ts — createPersistedState() provides a reactive persisted object across the memory, store and signal backends.
  • layout.ts — budgetFor(), compactFor() and columnFor() centralize sidebar width/row-budget math.
  • format.ts gains compactNumber(), formatCost(), formatDuration(), formatClock(), formatDelta(), formatPercent(), shortPath() and truncate().
  • commands.ts gains registerKeymapLayer() for layers registered from a rendered component.
  • KitSlotOptions gains before/replace anchors, KitUI gains an optional panel, KitStorage gains an optional memory, and KitKeymap.layer accepts an optional layer-level enabled.
  • jsonc.ts — cleanJsonc(), tolerantParse(), addPluginSpec(), addPluginsKey(), removePluginSpec() and editPluginsText() read JSONC and edit a config's plugins array textually, preserving comments.
  • hostEvents.ts — createHostEvents() subscribes to host data events and keeps a heartbeat with a polling fallback.
  • catalog.ts — listSkillCatalog(), syncSkillCatalog(), readSkillCatalog() and findAgentsMd() centralize the location/sync/list dance and AGENTS.md discovery.
  • messageIndex.ts — createMessageIndex() builds an incremental, fingerprint-guarded, windowed index of session messages, keyed per context.
  • statusbar.ts — createStatusbar() claims a footer/status slot (home.footer, home.footer.status, prompt.footer, prompt.footer.status, prompt.footer.file) and degrades to a no-op on hosts without it.
  • composer.ts — createComposer() claims session.composer.top and exposes the last render input.
  • palette.ts — paletteCommand(), registerPaletteCommand(), registerPaletteGroup() and dynamicPaletteCommand() register command-palette entries through a rendered app-slot keymap layer.
  • router.ts — createPage(), navigateTo() and currentRoute() register and drive plugin pages on hosts that expose ui.router.
  • attention.ts — requestAttention(), notifyTaskComplete() and notifyError() request a notification/sound and fall back to a toast.
  • tabs.ts — createTabs() reads and controls session tabs (open/focus/move/close/active), no-op on hosts without tab support.
  • KitRouter, KitTabs and KitAttention host-contract types; KitUI gains optional router and tabs.
  • QUICKSTART.md and examples/hello-plugin/ — a from-scratch guide and a minimal working plugin.
  • docs/SURFACES.md — maps every plugin surface (sidebar, footer/status, composer, panel, pages, palette, tabs, attention) to the module that owns it.
  • docs/COMPATIBILITY.md — the published host compatibility matrix.
  • tests/runtime-smoke.test.ts (npm run test:smoke) — imports the real @opencode/plugin runtime and executes every kit factory against a host-shaped context, catching import-time and runtime breakage the type-tripwire cannot see.
  • scripts/check-host-compat.mjs (npm run check:host-compat) now runs both the type tripwire and the runtime smoke against each pinned @opencode/plugin version, reports per-check results, and can refresh the matrix with --write-matrix.
  • .github/workflows/host-compat.yml — a version matrix that runs the compatibility checks on every push and PR.

Changed

  • tabs.ts — active() and isOpen() drop redundant try/catch around the internal list(), which already swallows host errors.
  • publish.yml gains a host-compatibility gate before npm publish, so a release that breaks a supported host cannot be published.
  • package.json#files again includes dist/ — the built ./collapsible entry (dist/collapsible.js) is the non-development export, so dropping it from the tarball would have broken the published subpath.

v1.0.0-alpha.7

v1.0.0-alpha.7 Pre-release
Pre-release

Choose a tag to compare

@ranjithrajv ranjithrajv released this 27 Sep 18:58

Changed

  • Widened the @opencode/plugin peer range from ^2.0.15 to ^2.0.3, matching what the kit actually supports. Verified by typecheck and the type-tripwire against 2.0.3, 2.0.10 and 2.0.18. 2.0.3 is the floor: earlier 2.x releases ship no ./tui subpath export, so nothing importing @opencode/plugin/tui can resolve it.
  • Documented the 2.0.3 floor in the Compatibility section.
  • CollapsibleSection and CollapsibleGroup take an optional theme prop, so a consumer can hand down the host's own usePlugin().theme instead of the kit reaching for the plugin context itself.

Fixed

  • CollapsibleSection / CollapsibleGroup no longer throw PluginContextProvider is missing when the kit is installed from node_modules. Both called usePlugin() unconditionally, but a registry install resolves a different copy of @opencode/plugin and solid-js than the one the host renders with, so the host's plugin context was never visible. Callers that already hold the context pass theme down; the usePlugin() fallback still resolves for deduped module graphs (tests, monorepos) and degrades to unthemed text rather than throwing.

Install

npm install opencode-plugin-kit

latest now points at this release, so a plain install gets the v2 kit. The
publish workflow tags each prerelease under its own identifier and leaves
latest alone, so later alphas will not move it automatically — install
opencode-plugin-kit@alpha to track the newest build.

Consumer action required

If you render a collapsible sidebar section, pass the host theme:

const { theme } = usePlugin()
<CollapsibleSection title="..." count={n} theme={theme}>...</CollapsibleSection>

v1.0.0-alpha.6

v1.0.0-alpha.6 Pre-release
Pre-release

Choose a tag to compare

@ranjithrajv ranjithrajv released this 27 Sep 13:34

Changed

  • Migrated the host contract from the legacy V1 plugin beta to the OpenCode v2 packages @opencode/plugin / @opencode/sdk / @opencode/theme (2.0.15, types-only optional peer): import paths, ResolvedTheme text tokens (text.base / text.muted), and dialog.select placeholder.
  • palette / slash.arguments are literal types matching the v2 KeymapCommand.
  • Added KitModelShape so the model accessors accept both messages (numeric cost) and model-list entries / ModelInfo (array cost).
  • readAuth() now reads OpenCode 2's SQLite credential store, falling back to the legacy auth.json.

Fixed

  • tsconfig.json no longer excludes tests/**/*.test-d.ts. The exclude was inherited by Vitest's typechecker, so host.test-d.ts — the host-contract tripwire — was silently never typechecked.
  • Corrected host.test-d.ts (missing KitStorage import, a non-existent expectTypeOf(...).get(), and the command subset omitting required run).

Added

  • Tests covering the OpenCode 2 SQLite credential store (restores the 100% coverage gate).

v1.0.0-alpha.1

v1.0.0-alpha.1 Pre-release
Pre-release

Choose a tag to compare

@ranjithrajv ranjithrajv released this 08 Sep 13:03

First published release of opencode-plugin-kit.

Added

  • Shared provider vocabulary (providers.ts) — Zen/Go provider ids, labels, discovery
  • Row formatting (rows.ts), number/date formatting (format.ts)
  • Persisted view/filter picker (viewPicker.ts) — registry, slash command, dialog, toast
  • Storage-backed cache (cache.ts / cachedResource.ts), polling fetcher, schemas, toast, toggle commands, collapsible sections
  • Full vitest suite with 100% coverage gate (pre-commit enforced)

Changed

  • License changed from AGPL-3.0 to MIT