Skip to content
This repository was archived by the owner on Sep 30, 2026. It is now read-only.

Releases

v4.0.1

Choose a tag to compare

@github-actions github-actions released this 23 Sep 09:21
c530c24

Patch Changes

  • 89bf7c3 Thanks @shljsl75891! - Bump reported Claude Code version to 2.1.280. Opus 5.5 requests failed with claude_code_version_too_old because the reported version (2.1.258) was too old.

v3.0.8

Choose a tag to compare

@github-actions github-actions released this 23 Sep 09:21
1d846d9

Patch Changes

  • 4948dc6 Thanks @shljsl75891! - Bump reported Claude Code version to 2.1.280. Opus 5.5 requests failed with claude_code_version_too_old because the reported version (2.1.258) was too old.

v4.0.0

Choose a tag to compare

@github-actions github-actions released this 16 Sep 14:39
d60cd0f

Major Changes

  • Port the plugin to the OpenCode v2 plugin API. OpenCode v2 removed the v1 auth hook and provider fetch override this plugin relied on, so this is a breaking change — this release requires OpenCode v2 and is no longer loadable by OpenCode v1 (pin to a 3.x release if you're still on OpenCode v1).

    • The package now exports a v2 Plugin.define({ id, setup }) default export instead of the v1 named AnthropicAuthPlugin function.
    • Claude Pro/Max OAuth is now registered through ctx.integration.transform, with token refresh wired into OpenCode v2's integration refresh lifecycle (still with a plugin-level single-flight guard against concurrent refreshes racing a rotating refresh token).
    • Anthropic request/response rewriting (OAuth headers, beta flags, body/tool-name transforms, hybrid prompt caching, server-side fallback, ANTHROPIC_BASE_URL) now runs through ctx.session.hook('http.request' | 'http.response', ...), gated to native Anthropic requests using this plugin's OAuth connection.
    • The "Create an API Key" console OAuth method (which minted and stored an Anthropic API key) is dropped — OpenCode v2's plugin API doesn't support an OAuth flow that ends in a stored API key. Manual API key entry and ANTHROPIC_API_KEY continue to work via OpenCode's built-in Anthropic integration.
    • Anthropic models billed through this plugin's OAuth connection go back to showing no API price, restored via ctx.model.transform (OpenCode v2's registrations are disposable, unlike the v2 prerelease API this was previously blocked on).
    • ANTHROPIC_INSECURE is not supported under OpenCode v2: request hooks can rewrite a Request but can't disable TLS verification for it. The plugin now logs a warning instead of silently leaving it unapplied.
    • The quota sidebar (./tui export) is rewritten against OpenCode v2's TUI plugin API (ui.slot, data.on, the restructured theme.text.* tokens).

Patch Changes

  • 035c555 Thanks @shljsl75891! - Tighten prompt-cache prefix stability in two places.

    Parallel tool calls no longer shrink the cache bridge. Anthropic's
    20-block cache lookback counts a run of consecutive tool_use blocks —
    or of consecutive tool_result blocks — as a single position. The bridge
    anchor's distance math was counting every block, so a turn with many
    parallel tool calls overflowed the window early and placed the bridge
    nearer than necessary, leaving older cached prefix unreachable. Runs now
    count as one position, matching the documented behaviour.

    Fixing that also surfaced an existing off-by-one in the same distance
    math: the walk started one message before the latest anchor, so neither
    the latest anchor's own blocks nor the candidate bridge's own anchor block
    counted toward the 20-position limit. That let the bridge land outside
    Anthropic's actual reachable window. Both anchors' own positions are now
    included, matching Anthropic's documented rule that the lookback counts
    the breakpoint itself as the first position.

    Tool definitions are sorted by name. A change anywhere in tools[]
    invalidates the entire cached prefix. MCP servers that attach after the
    first turn could reorder the array between requests; sorting makes the
    order deterministic regardless of attach timing.

v3.0.7

Choose a tag to compare

@github-actions github-actions released this 05 Sep 05:18
e608914

Patch Changes

  • 035c555 Thanks @shljsl75891! - Tighten prompt-cache prefix stability in two places.

    Parallel tool calls no longer shrink the cache bridge. Anthropic's
    20-block cache lookback counts a run of consecutive tool_use blocks —
    or of consecutive tool_result blocks — as a single position. The bridge
    anchor's distance math was counting every block, so a turn with many
    parallel tool calls overflowed the window early and placed the bridge
    nearer than necessary, leaving older cached prefix unreachable. Runs now
    count as one position, matching the documented behaviour.

    Fixing that also surfaced an existing off-by-one in the same distance
    math: the walk started one message before the latest anchor, so neither
    the latest anchor's own blocks nor the candidate bridge's own anchor block
    counted toward the 20-position limit. That let the bridge land outside
    Anthropic's actual reachable window. Both anchors' own positions are now
    included, matching Anthropic's documented rule that the lookback counts
    the breakpoint itself as the first position.

    Tool definitions are sorted by name. A change anywhere in tools[]
    invalidates the entire cached prefix. MCP servers that attach after the
    first turn could reorder the array between requests; sorting makes the
    order deterministic regardless of attach timing.

v3.0.6

Choose a tag to compare

@github-actions github-actions released this 04 Sep 18:29
411b527

Patch Changes

  • 7e3d236 Thanks @shljsl75891! - Fix the quota sidebar freezing at its first-render values and never updating.

    OpenCode's Solid JSX transform skips files under node_modules, which is
    where npm-installed plugins load from (see
    opencode#33884).
    Without that transform, JSX props are evaluated once instead of compiled
    into reactive getters, so the sidebar's createSignal/createEffect/Show
    usage rendered correctly on first paint and then never changed again.

    tui.tsx now renders a fixed tree once and drives all updates — quota
    percentages, bars, and the "resets in ..." countdown — from a plain
    setInterval writing directly to the rendered nodes, plus the existing
    message.updated/session.updated event refresh. This has no dependency
    on Solid's reactive transform, so it works the same whether the plugin
    loads from node_modules or a local path.

    Also switched usedPercent back to Math.round from Math.ceil (0.081
    utilization now shows 8%, not 9%).

v3.0.5

Choose a tag to compare

@github-actions github-actions released this 04 Sep 17:45

Patch Changes

  • Never fail a request over quota harvesting: a reset header that is finite but outside the range Date can represent (e.g. 1e308) made toISOString() throw from outside the best-effort try, surfacing as a failed API call. Reject unrepresentable dates and harvest entirely inside the guard.
  • Fail retryably instead of leaking a fallback block: when an SSE event exceeded the 1 MiB buffer with no delimiter, the server-side-fallback rewriter forwarded the partial buffer as if it were a whole event, so a half-parsed fallback block passed through unrewritten. Raise the existing retryable stream error instead.
  • Keep the sidebar's "resets in ..." countdown ticking between requests, rather than freezing until new quota data arrives.

v3.0.4

Choose a tag to compare

@shljsl75891 shljsl75891 released this 04 Sep 17:36

Patch Changes

  • Actually fix the TUI sidebar failing to load from npm: 3.0.3's tsconfig.json-at-package-root fix didn't work either — Bun resolves jsxImportSource for a tsconfig.json relative to process.cwd() at import time, not relative to the imported file's directory, so it's never consulted once the host process's cwd is the user's project directory instead of the plugin's own package dir. Replace the tsconfig.json approach with a per-file /** @jsxImportSource @opentui/solid */ pragma comment in tui.tsx, which Bun honors regardless of cwd. Verified end-to-end against a real npm pack tarball imported from an unrelated working directory.

v3.0.3

Choose a tag to compare

@shljsl75891 shljsl75891 released this 04 Sep 17:36

Patch Changes

  • Fix the TUI sidebar still silently failing to load from npm even after 3.0.1's files fix: tui.tsx needs jsxImportSource: "@opentui/solid" to transpile, which Bun reads from a tsconfig.json at the installed package's root (the directory containing package.json) — a tsconfig.json nested under src/ is not picked up once node_modules/package.json establish that root. Without it, Bun defaults to the React JSX runtime and fails resolving react/jsx-dev-runtime, silently, with no log output. Ship the existing root tsconfig.json in the published package and added packaging-test coverage asserting it's present.

v3.0.2

Choose a tag to compare

@shljsl75891 shljsl75891 released this 04 Sep 17:36

Patch Changes

  • Fix npm-installed plugin loading by exporting the OpenCode package-plugin module shape ({ id, server }). The previous named-only export worked as a legacy file-drop plugin but was ignored for package installs, causing OpenCode to fall back to native Anthropic API-key auth.

v3.0.1

Choose a tag to compare

@shljsl75891 shljsl75891 released this 04 Sep 17:36

Patch Changes

  • Fix the TUI sidebar silently failing to load when installed from npm: the published files list included src/tui.tsx but not the sibling modules it imports at runtime (src/quota-format.ts, src/quota-headers.ts, src/quota-state.ts), so the import resolved nothing outside a local checkout. Added a packaging test that walks the relative-import graph from src/tui.tsx and asserts every reachable file is included in npm pack's file list.