@sunerpy/kiro-provider 0.5.1 → 0.7.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.
- package/README.md +50 -31
- package/dist/cli.js +163 -253
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
separate canonical completion/event IR before protocol-specific encoding.
|
|
42
42
|
- Encrypted reasoning replay for complete native Kiro envelopes: opaque `kr1_...` tokens, AES-256-GCM storage, tenant/model/account/conversation/output binding, TTL/LRU cleanup, and account-locked replay.
|
|
43
43
|
- Multi-account rotation with automatic token refresh and failover. Exhausted accounts are hard-excluded from model attempts, then automatically rejoin only after a bounded, deduplicated Kiro usage probe confirms a new quota window. A provider-owned maintenance loop also refreshes near-expiry tokens and stale usage while the service is idle.
|
|
44
|
-
- `kiro-provider login` and `accounts import` write directly to the provider-owned local authentication store. `auth_source: "opencode-shared"`
|
|
44
|
+
- `kiro-provider login` and `accounts import` write directly to the provider-owned local authentication store. The former `auth_source: "opencode-shared"` compatibility mode was removed in 0.7.0; a configuration that still selects it fails at startup with migration instructions (import once, then use `local`).
|
|
45
45
|
- A single global `proxy_url` that, when set, routes all upstream egress (model requests, token refresh, quota probes, device-code login) through one HTTP(S) proxy.
|
|
46
46
|
- Ships as a self-contained compiled binary via `bun build --compile` — no runtime install required on the target machine.
|
|
47
47
|
|
|
@@ -86,21 +86,11 @@ Key boundaries:
|
|
|
86
86
|
- stateful Responses fields and native Web Search remain unsupported, and the
|
|
87
87
|
provider never fabricates search/citation events.
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
JavaScript SDK 7.5.0 completed two standard Responses turns and OpenCode
|
|
95
|
-
1.18.18 completed a real bash/write/read tool loop. No live shared database or
|
|
96
|
-
cross-process lock was used. OpenCode still requires explicit
|
|
97
|
-
`legacy-user-prefix` because it sends developer instructions that Kiro cannot
|
|
98
|
-
project losslessly. The known RC.3 protocol blockers are unchanged: Codex is
|
|
99
|
-
blocked before Kiro by `reasoning.summary`, Claude Code 2.1.209 by
|
|
100
|
-
`context_management`, and OpenCode Chat by the client's nonstandard
|
|
101
|
-
`messages.0.cache_control`. Zuno was intentionally not changed or rerun.
|
|
102
|
-
These are RC findings; stable v0.5.0 remains gated rather than silently
|
|
103
|
-
discarding unsupported fields.
|
|
89
|
+
The current state of the verified subset, the compiled-binary acceptance runs
|
|
90
|
+
behind each release, and the 2026-09-02 full code review with its remediation
|
|
91
|
+
plan are recorded in [`docs/audits/`](docs/audits/README.md). Stable releases
|
|
92
|
+
stay gated on those records rather than on silently discarding unsupported
|
|
93
|
+
fields.
|
|
104
94
|
|
|
105
95
|
For the complete capability matrix, error codes, reasoning replay contract,
|
|
106
96
|
and v0.4 migration steps, see
|
|
@@ -141,7 +131,15 @@ Windows (PowerShell):
|
|
|
141
131
|
irm https://raw.githubusercontent.com/sunerpy/kiro-provider/main/scripts/install.ps1 | iex
|
|
142
132
|
```
|
|
143
133
|
|
|
144
|
-
Both scripts
|
|
134
|
+
Both scripts download the platform asset together with the release's `SHA256SUMS`, verify the checksum, and abort on a mismatch before installing to `~/.local/bin` (override with `KIRO_PROVIDER_INSTALL_DIR`). By default they follow `releases/latest`; for reproducible or service installs, pin a release with `KIRO_PROVIDER_VERSION` (recommended):
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
curl -fsSL https://raw.githubusercontent.com/sunerpy/kiro-provider/main/scripts/install.sh | KIRO_PROVIDER_VERSION=0.5.1 sh
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
```powershell
|
|
141
|
+
$env:KIRO_PROVIDER_VERSION = "0.5.1"; irm https://raw.githubusercontent.com/sunerpy/kiro-provider/main/scripts/install.ps1 | iex
|
|
142
|
+
```
|
|
145
143
|
|
|
146
144
|
### 3. From source (developers)
|
|
147
145
|
|
|
@@ -166,15 +164,30 @@ In the rest of this README, `./dist/kiro-provider` refers to any of the above; s
|
|
|
166
164
|
|
|
167
165
|
## Quickstart
|
|
168
166
|
|
|
169
|
-
1. **Create a config with your own API key.**
|
|
167
|
+
1. **Create a config with your own API key.** Only `api_keys` is required;
|
|
168
|
+
every other field has a production default (`auth_source: "local"`,
|
|
169
|
+
`host: "127.0.0.1"`, `port: 8787`).
|
|
170
170
|
|
|
171
171
|
```bash
|
|
172
172
|
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/kiro-provider"
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
cat > "${XDG_CONFIG_HOME:-$HOME/.config}/kiro-provider/config.json" <<'EOF'
|
|
174
|
+
{
|
|
175
|
+
"api_keys": ["sk-your-private-key"]
|
|
176
|
+
}
|
|
177
|
+
EOF
|
|
178
|
+
chmod 600 "${XDG_CONFIG_HOME:-$HOME/.config}/kiro-provider/config.json"
|
|
175
179
|
```
|
|
176
180
|
|
|
177
|
-
|
|
181
|
+
Replace `sk-your-private-key` with a private, random value (for example
|
|
182
|
+
`openssl rand -hex 24`). The fully annotated
|
|
183
|
+
[`config.example.json`](config.example.json) in the repository and
|
|
184
|
+
[`docs/CONFIGURATION.md`](docs/CONFIGURATION.md) describe every field.
|
|
185
|
+
|
|
186
|
+
**Windows locations.** On Windows the default config path is
|
|
187
|
+
`%APPDATA%\kiro-provider\config.json`, and `accounts.db`, the instance
|
|
188
|
+
lock, and the reasoning keyring live in that same directory (POSIX uses
|
|
189
|
+
`~/.config/kiro-provider` for all of them). Pass `--config <path>` to use a
|
|
190
|
+
different file.
|
|
178
191
|
|
|
179
192
|
2. **Populate the provider-owned authentication store.** If you previously
|
|
180
193
|
authenticated through OpenCode plus `opencode-kiro-auth`, import that
|
|
@@ -276,7 +289,8 @@ defaults:
|
|
|
276
289
|
|
|
277
290
|
- binary: `~/.local/bin/kiro-provider` on Linux,
|
|
278
291
|
`%USERPROFILE%\.local\bin\kiro-provider.exe` on Windows;
|
|
279
|
-
- config: `~/.config/kiro-provider/config.json
|
|
292
|
+
- config: `~/.config/kiro-provider/config.json` on Linux,
|
|
293
|
+
`%APPDATA%\kiro-provider\config.json` on Windows;
|
|
280
294
|
- service/task name: `kiro-provider`.
|
|
281
295
|
|
|
282
296
|
Run the one-time import and the service as the **same OS user** so the service
|
|
@@ -324,8 +338,7 @@ systemctl --user enable --now kiro-provider.service
|
|
|
324
338
|
|
|
325
339
|
If the binary or config is elsewhere, replace `ExecStart` with those absolute
|
|
326
340
|
paths. For a custom `XDG_CONFIG_HOME`, also add an explicit
|
|
327
|
-
`Environment=XDG_CONFIG_HOME=/absolute/path` line
|
|
328
|
-
`opencode_auth_db_path`.
|
|
341
|
+
`Environment=XDG_CONFIG_HOME=/absolute/path` line.
|
|
329
342
|
|
|
330
343
|
Operate and inspect the service:
|
|
331
344
|
|
|
@@ -362,8 +375,8 @@ stdout/stderr are retained under `%LOCALAPPDATA%\kiro-provider`:
|
|
|
362
375
|
|
|
363
376
|
```powershell
|
|
364
377
|
$Binary = Join-Path $HOME ".local\bin\kiro-provider.exe"
|
|
365
|
-
$Config = Join-Path $
|
|
366
|
-
$ServiceDir = Join-Path $
|
|
378
|
+
$Config = Join-Path $env:APPDATA "kiro-provider\config.json"
|
|
379
|
+
$ServiceDir = Join-Path $env:APPDATA "kiro-provider"
|
|
367
380
|
$LogDir = Join-Path $env:LOCALAPPDATA "kiro-provider"
|
|
368
381
|
$Launcher = Join-Path $ServiceDir "service.ps1"
|
|
369
382
|
|
|
@@ -378,7 +391,7 @@ New-Item -ItemType Directory -Force -Path $ServiceDir, $LogDir | Out-Null
|
|
|
378
391
|
@'
|
|
379
392
|
$ErrorActionPreference = "Stop"
|
|
380
393
|
$Binary = Join-Path $HOME ".local\bin\kiro-provider.exe"
|
|
381
|
-
$Config = Join-Path $
|
|
394
|
+
$Config = Join-Path $env:APPDATA "kiro-provider\config.json"
|
|
382
395
|
$LogDir = Join-Path $env:LOCALAPPDATA "kiro-provider"
|
|
383
396
|
$Log = Join-Path $LogDir "service.log"
|
|
384
397
|
$PreviousLog = Join-Path $LogDir "service.previous.log"
|
|
@@ -437,7 +450,7 @@ To remove the task and launcher:
|
|
|
437
450
|
```powershell
|
|
438
451
|
Stop-ScheduledTask -TaskName "kiro-provider" -ErrorAction SilentlyContinue
|
|
439
452
|
Unregister-ScheduledTask -TaskName "kiro-provider" -Confirm:$false
|
|
440
|
-
Remove-Item "$
|
|
453
|
+
Remove-Item "$env:APPDATA\kiro-provider\service.ps1"
|
|
441
454
|
```
|
|
442
455
|
|
|
443
456
|
This task intentionally runs only in the current user's interactive session,
|
|
@@ -481,7 +494,7 @@ with the stable base URL and gateway API key.
|
|
|
481
494
|
|
|
482
495
|
## Configuration
|
|
483
496
|
|
|
484
|
-
Config is loaded from `~/.config/kiro-provider/config.json` (or `$XDG_CONFIG_HOME/kiro-provider/config.json`), overridable by `KIRO_PROVIDER_*` environment variables and, for `serve`, by CLI flags. Precedence is **CLI flag > environment variable > config file > schema default**.
|
|
497
|
+
Config is loaded from `~/.config/kiro-provider/config.json` (or `$XDG_CONFIG_HOME/kiro-provider/config.json`; on Windows `%APPDATA%\kiro-provider\config.json`, with the legacy `~/.config` location still read as a fallback), overridable by `KIRO_PROVIDER_*` environment variables and, for `serve`, by CLI flags. Unknown keys in the file are rejected with a suggestion, numeric fields are range-checked, and an empty environment variable counts as unset. Precedence is **CLI flag > environment variable > config file > schema default**.
|
|
485
498
|
|
|
486
499
|
| Field | Default | Env var |
|
|
487
500
|
| --- | --- | --- |
|
|
@@ -492,7 +505,7 @@ Config is loaded from `~/.config/kiro-provider/config.json` (or `$XDG_CONFIG_HOM
|
|
|
492
505
|
| `protocol_projection_mode` | `safe` | `KIRO_PROVIDER_PROTOCOL_PROJECTION_MODE` |
|
|
493
506
|
| `session_affinity_mode` | `explicit-only` | `KIRO_PROVIDER_SESSION_AFFINITY_MODE` |
|
|
494
507
|
| `auth_source` | `local` | `KIRO_PROVIDER_AUTH_SOURCE` |
|
|
495
|
-
| `opencode_auth_db_path` | `null` (
|
|
508
|
+
| `opencode_auth_db_path` | `null` (deprecated since 0.7.0, ignored) | `KIRO_PROVIDER_OPENCODE_AUTH_DB_PATH` |
|
|
496
509
|
| `proxy_url` | `null` | `KIRO_PROVIDER_PROXY_URL` |
|
|
497
510
|
| `default_region` | `us-east-1` | `KIRO_PROVIDER_DEFAULT_REGION` |
|
|
498
511
|
| `sdk_http_keep_alive` | `false` | `KIRO_PROVIDER_SDK_HTTP_KEEP_ALIVE` |
|
|
@@ -580,7 +593,7 @@ resend the complete input.
|
|
|
580
593
|
- `kiro-provider accounts list [--details | --json]` — show aligned account health/usage; details and JSON include the stable account ID but never credentials.
|
|
581
594
|
- `kiro-provider accounts refresh (--all | <id|email>) [--config <path>] [--json]` — bypass the usage cache, refresh authoritative Kiro usage, and renew an access token only when needed or rejected upstream.
|
|
582
595
|
- `kiro-provider accounts relogin <id|email> [--config <path>] [--start-url <url>] [--region <region>]` — re-authenticate a selected account after Kiro identity verification while preserving its internal ID and session-affinity references.
|
|
583
|
-
- `kiro-provider accounts import [--from <path>] [--
|
|
596
|
+
- `kiro-provider accounts import [--from <path>] [--force]` — copy authenticated OpenCode Kiro accounts once into the provider-owned local store; rows whose local copy is newer are skipped unless `--force` is given; no live database link remains.
|
|
584
597
|
- `kiro-provider accounts remove <id|email> [--yes]` — remove one account and its affinity/lineage/reasoning state; interactive confirmation is required unless `--yes` is supplied.
|
|
585
598
|
|
|
586
599
|
Contract: human-readable status lines go to stdout, errors to stderr, non-zero exit on failure. `GET /v1/models`, `GET /health`, and authenticated `GET /ready` return structured JSON.
|
|
@@ -733,6 +746,12 @@ bun run build:binary
|
|
|
733
746
|
bash scripts/security-check.sh # security regression suite (Linux, needs openssl/curl/ss)
|
|
734
747
|
```
|
|
735
748
|
|
|
749
|
+
`make ci` runs typecheck, lint, shell-script syntax checks, and the test suite.
|
|
750
|
+
`make fmt-check` (and `make fmt`) additionally require the `oxfmt` formatter
|
|
751
|
+
for YAML/JSON/Markdown; install the version CI uses with
|
|
752
|
+
`bun install --global oxfmt@0.59.0`. `bun run scripts/smoke.ts --help` describes
|
|
753
|
+
the live end-to-end checks against a running gateway.
|
|
754
|
+
|
|
736
755
|
## License
|
|
737
756
|
|
|
738
757
|
[MIT](LICENSE)
|