opencode-cmd-provider 0.1.3 → 1.0.0

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 (3) hide show
  1. package/CHANGELOG.md +14 -5
  2. package/README.md +15 -11
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0 - 2026-08-16
4
+
5
+ First stable release: API and behavior locked in, shipping now runs through a tag-driven pipeline.
6
+
7
+ - Tag-driven release pipeline: pushing `vX.Y.Z` asserts the tag matches `package.json`, refreshes the bundled model-catalog snapshot (committing it and re-triggering itself if stale), builds, runs the full test suite, publishes to npm via OIDC trusted publishing with provenance, and creates the GitHub Release from the CHANGELOG section (ADR 0002).
8
+ - Added the `release` skill documenting the pre-tag ritual and post-push verification; removed the run-map skill and the wayfinder-loop script.
9
+ - Docs: spell the product name as OpenCode everywhere, list Command Code plans, credit pi-commandcode-provider, and note provenance requires a public repository.
10
+ - The e2e test now uses the inherited PATH instead of a hardcoded home directory.
11
+
3
12
  ## 0.1.3 - 2026-08-16
4
13
 
5
14
  Feature: zero-config install via auto-registration from a bundled model snapshot.
@@ -12,11 +21,11 @@ Feature: zero-config install via auto-registration from a bundled model snapshot
12
21
 
13
22
  ## 0.1.2 - 2026-08-15
14
23
 
15
- Fix: tool-call history round-trip and reasoning effort. Live probes against the Command Code API with opencode confirmed the AI SDK v3 shapes differ from what the converters expected:
24
+ Fix: tool-call history round-trip and reasoning effort. Live probes against the Command Code API with OpenCode confirmed the AI SDK v3 shapes differ from what the converters expected:
16
25
 
17
26
  - Assistant tool-call parts carry arguments under `input`, not `args`/`arguments` — the converter read the legacy fields, so every prior tool call was re-sent with empty `{}` arguments, corrupting multi-turn context.
18
27
  - Tool-result outputs use the v3 `{ type: "text" | "error-text" | "json" | "content", ... }` shapes — `resultText` stringified the wrapper, double-encoding results in history. Replaced with `unwrapToolResult`.
19
- - `reasoning_effort` was silently dropped: opencode passes `providerOptions` namespaced per provider (`{ commandcode: { reasoningEffort } }`), but the model read the top-level keys. Added `resolveProviderReasoning` (namespaced + top-level fallback) so the configured thinking level actually reaches the API.
28
+ - `reasoning_effort` was silently dropped: OpenCode passes `providerOptions` namespaced per provider (`{ commandcode: { reasoningEffort } }`), but the model read the top-level keys. Added `resolveProviderReasoning` (namespaced + top-level fallback) so the configured thinking level actually reaches the API.
20
29
 
21
30
  Also: remove duplicated README disclaimer; bump `@ai-sdk/provider` to 4.x and `@types/node` to 26.x.
22
31
 
@@ -26,9 +35,9 @@ Fix: emit `text-start`/`text-end` and `reasoning-start`/`reasoning-end` stream p
26
35
 
27
36
  ## 0.1.0 - 2026-08-15
28
37
 
29
- Initial release: Command Code provider + plugin for opencode. Published to npm as `opencode-cmd-provider@0.1.0` (`latest`), tagged `v0.1.0`.
38
+ Initial release: Command Code provider + plugin for OpenCode. Published to npm as `opencode-cmd-provider@0.1.0` (`latest`), tagged `v0.1.0`.
30
39
 
31
- - `createCommandCode(options)` AI SDK provider (LanguageModelV3) + `default` V1 opencode plugin module in one package.
40
+ - `createCommandCode(options)` AI SDK provider (LanguageModelV3) + `default` V1 OpenCode plugin module in one package.
32
41
  - `/connect` browser auth flow, `COMMANDCODE_API_KEY` env var, and legacy auth file support (`~/.commandcode/auth.json`, `~/.omp/agent/auth.json`, `~/.pi/agent/auth.json`).
33
42
  - Model catalog fetch, parse, and cache with offline fallback; pricing/cost display; image input; reasoning effort.
34
- - Config-declared `models` map required under `provider.commandcode` until `commandcode` lands in opencode's models.dev catalog.
43
+ - Config-declared `models` map required under `provider.commandcode` until `commandcode` lands in OpenCode's models.dev catalog.
package/README.md CHANGED
@@ -3,13 +3,13 @@
3
3
  [![CI](https://github.com/rashidrazak/opencode-cmd-provider/actions/workflows/ci.yml/badge.svg)](https://github.com/rashidrazak/opencode-cmd-provider/actions/workflows/ci.yml)
4
4
  [![npm](https://img.shields.io/npm/v/opencode-cmd-provider)](https://www.npmjs.com/package/opencode-cmd-provider)
5
5
 
6
- A provider and plugin for [opencode](https://opencode.ai) that connects to the [Command Code](https://commandcode.ai) Provider API.
6
+ A provider and plugin for [OpenCode](https://opencode.ai) that connects to the [Command Code](https://commandcode.ai) Provider API. This enables you to use ALL Command Code plans — Go, GOAT, Pro, Max 10×, Max 20×, Provider, Team, and Enterprise — with OpenCode.
7
7
 
8
8
  > **Disclaimer:** This is an unofficial, community-maintained integration. It is not affiliated with, endorsed by, or supported by Command Code. You need your own Command Code account and API key or subscription. Command Code's terms, availability, and pricing apply.
9
9
 
10
10
  ## Install
11
11
 
12
- Add the package to your opencode configuration:
12
+ Add the package to your OpenCode configuration:
13
13
 
14
14
  ```jsonc
15
15
  // opencode.json
@@ -21,7 +21,7 @@ Add the package to your opencode configuration:
21
21
 
22
22
  That's it. The plugin bundles a snapshot of the Command Code model catalog and
23
23
  auto-registers the `commandcode` provider — npm package, name, API key env var,
24
- and every model — when opencode loads. No `provider.commandcode` block, no
24
+ and every model — when OpenCode loads. No `provider.commandcode` block, no
25
25
  `models` map, no network access needed. All Command Code models appear in
26
26
  `/models` with the `[CMD]` display-name prefix (e.g. `[CMD] Claude Sonnet 5`) so
27
27
  they aren't confused with same-named models from other providers.
@@ -40,7 +40,7 @@ missing:
40
40
  The catalog snapshot is refreshed at every release; newly published Command
41
41
  Code models appear after a plugin update.
42
42
 
43
- Start or reload opencode, then authenticate:
43
+ Start or reload OpenCode, then authenticate:
44
44
 
45
45
  ```txt
46
46
  /connect
@@ -52,7 +52,7 @@ Select **Command Code**, complete the browser flow, and pick a model with `/mode
52
52
 
53
53
  ### Browser login
54
54
 
55
- Run `/connect` in opencode and select **Command Code**. The browser flow stores the returned credential in opencode's auth store.
55
+ Run `/connect` in OpenCode and select **Command Code**. The browser flow stores the returned credential in OpenCode's auth store.
56
56
 
57
57
  If automatic transfer from the browser fails, copy the API key shown by Command Code and export it as `COMMANDCODE_API_KEY` (see below).
58
58
 
@@ -104,11 +104,11 @@ opencode run --model commandcode/claude-sonnet-5 "hello"
104
104
  ## Model discovery and offline behavior
105
105
 
106
106
  The plugin ships a snapshot of the Command Code model catalog (`src/catalog/snapshot.ts`)
107
- and auto-registers every model into opencode's config at startup. Model
107
+ and auto-registers every model into OpenCode's config at startup. Model
108
108
  availability changes when the package is updated: the snapshot is regenerated
109
109
  from the live catalog at every release via `npm run refresh:snapshot`.
110
110
 
111
- Auto-registration adds no network latency to opencode startup — the snapshot is
111
+ Auto-registration adds no network latency to OpenCode startup — the snapshot is
112
112
  bundled, and the plugin never contacts the Command Code API to list models. The
113
113
  plugin works fully offline; model availability never depends on the catalog
114
114
  endpoint being reachable.
@@ -134,13 +134,13 @@ For vision-capable models, image blocks from user messages and tool results are
134
134
 
135
135
  ## Pricing display
136
136
 
137
- The Command Code Provider API does not currently include prices in its model catalog. This provider keeps a static table for models with known prices so opencode can display estimated request costs.
137
+ The Command Code Provider API does not currently include prices in its model catalog. This provider keeps a static table for models with known prices so OpenCode can display estimated request costs.
138
138
 
139
- Models missing from that table display zero cost in opencode. This does **not** mean Command Code will bill the request at zero. Check the current [Command Code pricing](https://commandcode.ai/docs/resources/pricing-limits) before relying on the displayed value.
139
+ Models missing from that table display zero cost in OpenCode. This does **not** mean Command Code will bill the request at zero. Check the current [Command Code pricing](https://commandcode.ai/docs/resources/pricing-limits) before relying on the displayed value.
140
140
 
141
141
  ## Update and remove
142
142
 
143
- Update the installed package, or remove it from the `plugin` array in your `opencode.json` (the auto-registered `provider.commandcode` entry is injected by the plugin, so there is no config block to remove). The npm package is cached under opencode's plugin cache (`~/.cache/opencode/packages/`); remove the cached directory to fully uninstall.
143
+ Update the installed package, or remove it from the `plugin` array in your `opencode.json` (the auto-registered `provider.commandcode` entry is injected by the plugin, so there is no config block to remove). The npm package is cached under OpenCode's plugin cache (`~/.cache/opencode/packages/`); remove the cached directory to fully uninstall.
144
144
 
145
145
  ## Development
146
146
 
@@ -153,7 +153,7 @@ npm test
153
153
  npm run format:check
154
154
  ```
155
155
 
156
- The headless end-to-end test runs the real opencode CLI against a mock Command Code server through the built package:
156
+ The headless end-to-end test runs the real OpenCode CLI against a mock Command Code server through the built package:
157
157
 
158
158
  ```sh
159
159
  npm run build && npm run test:e2e
@@ -163,6 +163,10 @@ npm run build && npm run test:e2e
163
163
 
164
164
  See [CONTRIBUTING.md](CONTRIBUTING.md) for local setup and tests. See [RELEASE.md](RELEASE.md) for the release process.
165
165
 
166
+ ## Credits
167
+
168
+ Inspired by [pi-commandcode-provider](https://github.com/patlux/pi-commandcode-provider).
169
+
166
170
  ## License
167
171
 
168
172
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-cmd-provider",
3
- "version": "0.1.3",
3
+ "version": "1.0.0",
4
4
  "description": "Command Code provider + plugin for opencode",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",