opencode-cmd-provider 0.1.3 → 1.0.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.
- package/CHANGELOG.md +22 -5
- package/README.md +15 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.1 - 2026-08-16
|
|
4
|
+
|
|
5
|
+
Chore: harden the release flow so a tag push can no longer publish from an unmerged tree or rewrite tags.
|
|
6
|
+
|
|
7
|
+
- The release pipeline now refuses to run unless the tag's commit is an ancestor of `origin/main` — a tag pushed before the version bump lands on main fails with an explicit error instead of publishing (ADR 0003).
|
|
8
|
+
- A stale catalog snapshot now fails the run with remediation instructions instead of committing on the tag's tree, force-pushing main, and re-pointing the tag.
|
|
9
|
+
- The release skill ritual was updated: the bump and CHANGELOG entry land on main via PR before tagging; the tag push is all that triggers the pipeline.
|
|
10
|
+
|
|
11
|
+
## 1.0.0 - 2026-08-16
|
|
12
|
+
|
|
13
|
+
First stable release: API and behavior locked in, shipping now runs through a tag-driven pipeline.
|
|
14
|
+
|
|
15
|
+
- 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).
|
|
16
|
+
- Added the `release` skill documenting the pre-tag ritual and post-push verification; removed the run-map skill and the wayfinder-loop script.
|
|
17
|
+
- Docs: spell the product name as OpenCode everywhere, list Command Code plans, credit pi-commandcode-provider, and note provenance requires a public repository.
|
|
18
|
+
- The e2e test now uses the inherited PATH instead of a hardcoded home directory.
|
|
19
|
+
|
|
3
20
|
## 0.1.3 - 2026-08-16
|
|
4
21
|
|
|
5
22
|
Feature: zero-config install via auto-registration from a bundled model snapshot.
|
|
@@ -12,11 +29,11 @@ Feature: zero-config install via auto-registration from a bundled model snapshot
|
|
|
12
29
|
|
|
13
30
|
## 0.1.2 - 2026-08-15
|
|
14
31
|
|
|
15
|
-
Fix: tool-call history round-trip and reasoning effort. Live probes against the Command Code API with
|
|
32
|
+
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
33
|
|
|
17
34
|
- 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
35
|
- 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:
|
|
36
|
+
- `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
37
|
|
|
21
38
|
Also: remove duplicated README disclaimer; bump `@ai-sdk/provider` to 4.x and `@types/node` to 26.x.
|
|
22
39
|
|
|
@@ -26,9 +43,9 @@ Fix: emit `text-start`/`text-end` and `reasoning-start`/`reasoning-end` stream p
|
|
|
26
43
|
|
|
27
44
|
## 0.1.0 - 2026-08-15
|
|
28
45
|
|
|
29
|
-
Initial release: Command Code provider + plugin for
|
|
46
|
+
Initial release: Command Code provider + plugin for OpenCode. Published to npm as `opencode-cmd-provider@0.1.0` (`latest`), tagged `v0.1.0`.
|
|
30
47
|
|
|
31
|
-
- `createCommandCode(options)` AI SDK provider (LanguageModelV3) + `default` V1
|
|
48
|
+
- `createCommandCode(options)` AI SDK provider (LanguageModelV3) + `default` V1 OpenCode plugin module in one package.
|
|
32
49
|
- `/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
50
|
- 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
|
|
51
|
+
- 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
|
[](https://github.com/rashidrazak/opencode-cmd-provider/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/opencode-cmd-provider)
|
|
5
5
|
|
|
6
|
-
A provider and plugin for [
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|