@xtruder/opencode-claude-max-plugin 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -7,11 +7,11 @@ An [OpenCode](https://opencode.ai/) plugin that enables Claude Pro/Max subscript
7
7
  ## Why?
8
8
 
9
9
  - **Use your Claude subscription** — Automatically reads OAuth credentials from Claude Code, no separate API key needed
10
- - **Matches Claude Code exactly** — Same headers, billing, tool names, and request format as Claude Code CLI
11
- - **Prompt caching** — 98% of input tokens served from cache (system prompt + tools cached globally)
12
- - **All Claude models** — Opus 4.6, Sonnet 4.6, Haiku 4.5
13
- - **Extended thinking** — Full reasoning support with thinking variants (high/max)
14
- - **Usage tracking** — Sidebar widget with live progress bars + `/usage` command with full details
10
+ - **Matches Claude Code 2.1.154** — Same request format and behavior as the official CLI
11
+ - **Prompt caching** — Multi-turn conversations cache properly, keeping costs and latency low
12
+ - **All Claude models** — Opus 4.8, Opus 4.7, Opus 4.6, Sonnet 4.6, Haiku 4.5
13
+ - **Extended / adaptive thinking** — Full reasoning support across models, including Opus 4.7+'s adaptive thinking
14
+ - **Usage tracking** — Sidebar widget with live progress bars + `/usage` command
15
15
  - **Self-registering** — Models are registered automatically, no manual provider config needed
16
16
 
17
17
  ## Installation
@@ -25,9 +25,7 @@ Add the plugin to your `opencode.json` (project-level or `~/.config/opencode/ope
25
25
  }
26
26
  ```
27
27
 
28
- That's it. The plugin self-registers the `anthropic-sdk` provider and its models (Haiku 4.5, Sonnet 4.6, Opus 4.6) at startup via the OpenCode config hook. No separate `provider` block is needed.
29
-
30
- In OpenCode, the plugin also replaces the default base system prompt with a Claude-compatible one via `experimental.chat.system.transform`. This is required for Claude Code OAuth requests to be treated as Claude-native rather than third-party app requests.
28
+ That's it. The plugin self-registers the `anthropic-sdk` provider and its models (Haiku 4.5, Sonnet 4.6, Opus 4.6, Opus 4.7, Opus 4.8) at startup via the OpenCode config hook. No separate `provider` block is needed.
31
29
 
32
30
  Then open OpenCode and run `/connect` → Other → `anthropic-sdk`. If Claude Code is installed and you're logged in, credentials are read automatically from `~/.claude/.credentials.json` — no API key needed.
33
31
 
@@ -122,14 +120,13 @@ For Claude Code credentials, log in via `claude` CLI first (`claude auth login`)
122
120
  ## Features
123
121
 
124
122
  - Streaming and non-streaming completions
125
- - Tool/function calling with Claude Code tool name mapping (`task` → `Agent`, etc.)
123
+ - Tool/function calling with Claude Code tool name mapping (`task` → `Agent`, `webfetch` → `WebFetch`, etc.)
126
124
  - MCP tool name remapping (`server_tool` → `mcp__server__tool`)
127
- - Extended thinking with signature passthrough for multi-turn conversations
128
- - Prompt caching (98% cache hit rate with full OpenCode tool set)
129
- - CCH request signing — computes xxHash64 body integrity hash to unlock features like fast mode
130
- - Subscription rate limit detection — fails fast with clear message instead of hanging
131
- - Long context auto-detection — adds `context-1m` beta header when request body is large
132
- - TUI sidebar with live usage bars + `/usage` slash command with full subscription details
125
+ - Extended thinking (Sonnet/Opus 4.6) and adaptive thinking (Opus 4.7+) with effort levels and multi-turn signature passthrough
126
+ - Prompt caching that holds across long, tool-heavy conversations
127
+ - Subscription rate limit detection — fails fast with a clear message instead of hanging
128
+ - Long-context auto-detection for large prompts
129
+ - TUI sidebar with live usage bars + `/usage` slash command
133
130
 
134
131
  ## With Vercel AI SDK
135
132
 
@@ -160,7 +157,7 @@ When using Claude Code OAuth credentials outside OpenCode, you must pass a Claud
160
157
  ```bash
161
158
  bun install
162
159
  bun run build
163
- bun run test # integration tests (requires ANTHROPIC_API_KEY or Claude Code credentials)
160
+ bun test src/*.test.ts # unit + integration tests (model tests require ANTHROPIC_API_KEY or Claude Code credentials)
164
161
  ```
165
162
 
166
163
  See [RESEARCH.md](RESEARCH.md) for detailed reverse-engineering findings on how we matched Claude Code's request format.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtruder/opencode-claude-max-plugin",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "OpenCode plugin for Claude Max/Pro subscription via @anthropic-ai/sdk - uses Claude Code OAuth credentials",
5
5
  "keywords": [
6
6
  "ai-sdk",