@sunerpy/kiro-provider 0.5.1 → 0.6.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/README.md +47 -27
  2. package/dist/cli.js +173 -175
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -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
- Current compiled-binary RC.4 acceptance on 2026-08-29 retains the RC.3
90
- protocol matrix and adds provider-owned authentication lifecycle validation.
91
- Starting from a one-time import, an isolated local store deliberately used an
92
- expired access token, stale usage, and a nonexistent OpenCode database path.
93
- The compiled service independently refreshed the token and usage, then OpenAI
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 pull the matching asset from `releases/latest/download/` and install it to `~/.local/bin` (override with `KIRO_PROVIDER_INSTALL_DIR`).
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
- cp config.example.json "${XDG_CONFIG_HOME:-$HOME/.config}/kiro-provider/config.json"
174
- # edit config.json and replace "sk-REPLACE-ME" with a private, random key
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
- The example already uses the production default, `"auth_source": "local"`.
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
@@ -362,8 +376,8 @@ stdout/stderr are retained under `%LOCALAPPDATA%\kiro-provider`:
362
376
 
363
377
  ```powershell
364
378
  $Binary = Join-Path $HOME ".local\bin\kiro-provider.exe"
365
- $Config = Join-Path $HOME ".config\kiro-provider\config.json"
366
- $ServiceDir = Join-Path $HOME ".config\kiro-provider"
379
+ $Config = Join-Path $env:APPDATA "kiro-provider\config.json"
380
+ $ServiceDir = Join-Path $env:APPDATA "kiro-provider"
367
381
  $LogDir = Join-Path $env:LOCALAPPDATA "kiro-provider"
368
382
  $Launcher = Join-Path $ServiceDir "service.ps1"
369
383
 
@@ -378,7 +392,7 @@ New-Item -ItemType Directory -Force -Path $ServiceDir, $LogDir | Out-Null
378
392
  @'
379
393
  $ErrorActionPreference = "Stop"
380
394
  $Binary = Join-Path $HOME ".local\bin\kiro-provider.exe"
381
- $Config = Join-Path $HOME ".config\kiro-provider\config.json"
395
+ $Config = Join-Path $env:APPDATA "kiro-provider\config.json"
382
396
  $LogDir = Join-Path $env:LOCALAPPDATA "kiro-provider"
383
397
  $Log = Join-Path $LogDir "service.log"
384
398
  $PreviousLog = Join-Path $LogDir "service.previous.log"
@@ -437,7 +451,7 @@ To remove the task and launcher:
437
451
  ```powershell
438
452
  Stop-ScheduledTask -TaskName "kiro-provider" -ErrorAction SilentlyContinue
439
453
  Unregister-ScheduledTask -TaskName "kiro-provider" -Confirm:$false
440
- Remove-Item "$HOME\.config\kiro-provider\service.ps1"
454
+ Remove-Item "$env:APPDATA\kiro-provider\service.ps1"
441
455
  ```
442
456
 
443
457
  This task intentionally runs only in the current user's interactive session,
@@ -481,7 +495,7 @@ with the stable base URL and gateway API key.
481
495
 
482
496
  ## Configuration
483
497
 
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**.
498
+ 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
499
 
486
500
  | Field | Default | Env var |
487
501
  | --- | --- | --- |
@@ -580,7 +594,7 @@ resend the complete input.
580
594
  - `kiro-provider accounts list [--details | --json]` — show aligned account health/usage; details and JSON include the stable account ID but never credentials.
581
595
  - `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
596
  - `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>] [--config <path>]` — copy authenticated OpenCode Kiro accounts once into the provider-owned local store; no live database link remains.
597
+ - `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
598
  - `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
599
 
586
600
  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 +747,12 @@ bun run build:binary
733
747
  bash scripts/security-check.sh # security regression suite (Linux, needs openssl/curl/ss)
734
748
  ```
735
749
 
750
+ `make ci` runs typecheck, lint, shell-script syntax checks, and the test suite.
751
+ `make fmt-check` (and `make fmt`) additionally require the `oxfmt` formatter
752
+ for YAML/JSON/Markdown; install the version CI uses with
753
+ `bun install --global oxfmt@0.59.0`. `bun run scripts/smoke.ts --help` describes
754
+ the live end-to-end checks against a running gateway.
755
+
736
756
  ## License
737
757
 
738
758
  [MIT](LICENSE)