opencode-kiro 0.1.6 → 0.1.7
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/README.md +17 -35
- package/dist/server.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The ACP-compliant [Kiro](https://kiro.dev) auth plugin for [opencode](https://opencode.ai).
|
|
4
4
|
|
|
5
|
-
opencode learns the `kiro` provider and its
|
|
6
|
-
[models.dev](https://models.dev) catalog
|
|
7
|
-
GitLab integrations. This plugin supplies the piece the catalog can't: the **auth**.
|
|
5
|
+
opencode learns the `kiro` provider and its available models (US region) from the
|
|
6
|
+
[models.dev](https://models.dev) catalog. This plugin supplies the following pieces:
|
|
8
7
|
|
|
9
8
|
- **Auth** via the official `kiro-cli` login flow (`opencode auth login`, then "Kiro CLI Login")
|
|
10
9
|
- **Provider options loader**: the `cwd`, `agent`, `trustAllTools`, `mcpTimeout` values
|
|
@@ -19,13 +18,12 @@ the catalog's `npm` field. This is the supported integration path: requests go t
|
|
|
19
18
|
kiro-cli exactly like Kiro's own IDE clients, with no credential scraping and no reuse of
|
|
20
19
|
Kiro credentials against other providers.
|
|
21
20
|
|
|
22
|
-
Not affiliated with any other kiro-named npm packages.
|
|
23
|
-
|
|
24
21
|
## Prerequisites
|
|
25
22
|
|
|
26
23
|
| Requirement | Notes |
|
|
27
24
|
|---|---|
|
|
28
25
|
| [kiro-cli](https://kiro.dev/docs/cli/) | Must be installed and on `PATH`; a Kiro subscription / AWS Builder ID account |
|
|
26
|
+
| [Node.js](https://nodejs.org) `>= 20` | Enforced via `engines.node`. |
|
|
29
27
|
| opencode `>= 1.16.0` | Enforced via `engines.opencode` on released builds. The shipped catalog must include the `kiro` provider (see [Troubleshooting](#troubleshooting)). |
|
|
30
28
|
|
|
31
29
|
## Install
|
|
@@ -127,27 +125,10 @@ If the flow times out, authenticate directly with kiro-cli (`kiro-cli login`) an
|
|
|
127
125
|
|
|
128
126
|
## Models
|
|
129
127
|
|
|
130
|
-
|
|
131
|
-
loads them from there
|
|
132
|
-
truth. All models support tool calling and have a 64K-token output limit.
|
|
133
|
-
|
|
134
|
-
| Model | ID | Context window | Image input |
|
|
135
|
-
|---|---|---|---|
|
|
136
|
-
| Auto | `auto` | 1,000,000 | yes |
|
|
137
|
-
| Claude Haiku 4.5 | `claude-haiku-4.5` | 200,000 | yes |
|
|
138
|
-
| Claude Opus 4.5 | `claude-opus-4.5` | 200,000 | yes |
|
|
139
|
-
| Claude Opus 4.6 | `claude-opus-4.6` | 1,000,000 | yes |
|
|
140
|
-
| Claude Opus 4.7 | `claude-opus-4.7` | 1,000,000 | yes |
|
|
141
|
-
| Claude Sonnet 4 | `claude-sonnet-4` | 200,000 | yes |
|
|
142
|
-
| Claude Sonnet 4.5 | `claude-sonnet-4.5` | 200,000 | yes |
|
|
143
|
-
| Claude Sonnet 4.6 | `claude-sonnet-4.6` | 1,000,000 | yes |
|
|
144
|
-
| Deepseek v3.2 | `deepseek-3.2` | 164,000 | yes |
|
|
145
|
-
| MiniMax M2.1 | `minimax-m2.1` | 196,000 | yes |
|
|
146
|
-
| MiniMax M2.5 | `minimax-m2.5` | 196,000 | no |
|
|
147
|
-
| Qwen3 Coder Next | `qwen3-coder-next` | 256,000 | yes |
|
|
148
|
-
|
|
128
|
+
This plugin supports all models in the US region, defined in the [models.dev](https://models.dev) `kiro`
|
|
129
|
+
catalog entry. opencode loads them from there. List them with:
|
|
149
130
|
```bash
|
|
150
|
-
opencode models # lists kiro/auto, kiro/claude-
|
|
131
|
+
opencode models # lists kiro/auto, kiro/claude-opus-4.8, ...
|
|
151
132
|
opencode run -m kiro/auto "hello"
|
|
152
133
|
```
|
|
153
134
|
|
|
@@ -178,8 +159,8 @@ Disable the builtin box in `tui.json` so only the replacement renders:
|
|
|
178
159
|
```
|
|
179
160
|
|
|
180
161
|
Without this you will see **two** context boxes (cosmetic duplication: the builtin
|
|
181
|
-
one plus the plugin's). The credits value and its unit come from
|
|
182
|
-
|
|
162
|
+
one plus the plugin's). The credits value and its unit come from the metadata the SDK
|
|
163
|
+
attaches to each message part (kiro-cli reports the unit); nothing is hardcoded client-side.
|
|
183
164
|
|
|
184
165
|
Trade-off: the replacement box applies to **every** session and disabling the builtin
|
|
185
166
|
is global. The replacement reproduces the builtin `$X.XX spent` line for non-Kiro
|
|
@@ -187,11 +168,11 @@ sessions (and stacks it above credits when a session used both), so mixed-provid
|
|
|
187
168
|
users keep dollar cost in the sidebar; if you prefer the original built-in box, leave
|
|
188
169
|
it enabled at the cost of the duplicate box.
|
|
189
170
|
|
|
190
|
-
## Known limitation
|
|
171
|
+
## Known limitation
|
|
191
172
|
|
|
192
173
|
**Credits render in the TUI only.** Two TUI surfaces show them: the sidebar context
|
|
193
174
|
box (above) and the input/prompt meta row chip (`session_prompt_right`), which sits
|
|
194
|
-
|
|
175
|
+
above the host's `$` cost chip. Every other cost surface (ACP clients, the web app,
|
|
195
176
|
desktop, web share pages, and CLI cost output) shows $0.00 for Kiro sessions. The
|
|
196
177
|
models.dev catalog declares Kiro's per-token `cost` as 0 (it is a subscription-metered
|
|
197
178
|
provider with no per-token pricing), so opencode core computes $0.00 everywhere it
|
|
@@ -216,11 +197,11 @@ would require opencode core changes and is intentionally out of scope for this p
|
|
|
216
197
|
`kiro-acp-ai-provider` to check kiro-cli installation/login state.
|
|
217
198
|
- **Session affinity & reset (in-SDK)**: the SDK keys kiro-cli sessions off opencode's
|
|
218
199
|
`x-session-affinity` header, isolates tool-less utility calls (title generation) on
|
|
219
|
-
an ephemeral session, detects prompt-history divergence (fork
|
|
200
|
+
an ephemeral session, detects prompt-history divergence (`fork/undo`), and starts a
|
|
220
201
|
fresh kiro session when needed. No host-side session plumbing.
|
|
221
|
-
- **Credits metadata**: the SDK attaches `{ kiro: { credits, creditsUnit } }`
|
|
222
|
-
metadata
|
|
223
|
-
sums it per assistant message (deduped across text/reasoning parts) for the sidebar.
|
|
202
|
+
- **Credits metadata**: the SDK attaches `{ kiro: { credits, creditsUnit } }` to the
|
|
203
|
+
`metadata` of the final message part of each turn; opencode persists it, and the TUI
|
|
204
|
+
plugin sums it per assistant message (deduped across text/reasoning parts) for the sidebar.
|
|
224
205
|
|
|
225
206
|
## Troubleshooting
|
|
226
207
|
|
|
@@ -230,8 +211,9 @@ would require opencode core changes and is intentionally out of scope for this p
|
|
|
230
211
|
| Auth times out after ~120s | Complete the browser login faster, or run `kiro-cli login` yourself, then re-run `opencode auth login` (fast path). |
|
|
231
212
|
| Two "Context" boxes in the sidebar | Add `"plugin_enabled": { "internal:sidebar-context": false }` to `tui.json` (see [Credits in the sidebar](#credits-in-the-sidebar)). |
|
|
232
213
|
| No credits line / credits stay 0 | Credits appear after the first **completed** kiro turn; cancelled turns and turns without usage metadata contribute nothing. Check the TUI plugin is `active` in the Plugins dialog (and listed in `tui.json`). |
|
|
214
|
+
| Credits sidebar box never appears (even with `tui.json` configured correctly) | The TUI credits box renders only when `opencode-kiro` is resolvable in opencode's package cache. If the package is missing from the cache the box silently does not appear. Fix: ensure `opencode-kiro` is installed so it resolves in the cache. Do **not** manually clear the package cache: clearing can trigger a flaky on-demand refetch that fails with an "unknown git error". |
|
|
233
215
|
| `kiro` provider not showing in `opencode models` | The provider comes from the models.dev catalog, not this plugin. Ensure your opencode version ships a catalog that includes `kiro` (run `opencode models --refresh` to update the cache). For local development, point opencode at a kiro-inclusive catalog via `OPENCODE_MODELS_PATH=/path/to/api.json` (see [Local development](#local-development-path-source)). |
|
|
234
|
-
| `sdk.languageModel is not a function` | A stale `kiro-acp-ai-provider`
|
|
216
|
+
| `sdk.languageModel is not a function` | A stale `kiro-acp-ai-provider` from before the 2.0.x line resolved from opencode's package cache. Remove the cached copy (`$XDG_CACHE_HOME/opencode/packages/kiro-acp-ai-provider`, default `~/.cache/opencode/packages/...`) and retry; the factory auto-discovery clash was fixed in the 2.0.x line, and this plugin currently pins 2.0.2. |
|
|
235
217
|
| Path install rejected (`must export id`) | Run `npm run build` in your checkout first and reference the repo root (both entry modules export ids). |
|
|
236
218
|
| Provider visible but runs fail | The provider is selectable (from the catalog) before any credential exists. Run `opencode auth login` first. |
|
|
237
219
|
|
|
@@ -246,4 +228,4 @@ npm test # vitest
|
|
|
246
228
|
|
|
247
229
|
## License
|
|
248
230
|
|
|
249
|
-
[MIT](./LICENSE)
|
|
231
|
+
[MIT](./LICENSE) © Nacho F. Lizaur
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-kiro",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "The ACP-compliant Kiro plugin for opencode: auth via the official kiro-cli login,
|
|
3
|
+
"version": "0.1.7",
|
|
4
|
+
"description": "The ACP-compliant Kiro plugin for opencode: auth via the official kiro-cli login, the live Kiro model lineup through the Agent Client Protocol, and TUI credits display",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nacho F. Lizaur (https://github.com/NachoFLizaur)",
|
|
7
7
|
"repository": {
|