ns-kiro-core 0.2.1 → 0.2.2

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 (2) hide show
  1. package/README.md +18 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -12,6 +12,11 @@ adapters below — not meant to be installed on its own.
12
12
  - **Endpoints** — SSO region to management/runtime host resolution.
13
13
  - **Model catalog** — the bootstrap list, the authenticated regional catalog,
14
14
  and a validated on-disk cache at `~/.ns-kiro-provider-models-cache.json`.
15
+ Per-model billing weights (`rateMultiplier`) come from kiro-cli, the only
16
+ source that publishes them.
17
+ - **Usage** — Kiro reports no token counts, only a billed amount, surfaced as
18
+ `usage.credits`. `usage.input` is derived from the context-usage frame and
19
+ `usage.output` from a tiktoken estimate.
15
20
  - **Credentials** — reads the kiro-cli SQLite store and the Kiro IDE token file,
16
21
  refreshes IDC / desktop / external-IdP / API-key sessions, and writes
17
22
  refreshes back so kiro-cli stays on the same token.
@@ -47,6 +52,19 @@ including across an internal retry, so a host that cannot un-deliver a block
47
52
  still receives a coherent sequence; `canDiscardEmittedBlocks` tells the core
48
53
  which kind of host it is talking to.
49
54
 
55
+ ## The stages underneath
56
+
57
+ `streamKiro` is orchestration over four pieces, each exported for use on its
58
+ own — building a request without sending it, or assembling blocks from events
59
+ sourced elsewhere:
60
+
61
+ | Export | Does |
62
+ | --- | --- |
63
+ | `buildKiroRequest` | Neutral messages to a wire request: history shaping, tool specs, pre-send repair. Pure, no I/O |
64
+ | `readKiroEventStream` | AWS event-stream framing and the stall timeouts; yields parsed wire events |
65
+ | `KiroResponseAssembler` | Content blocks, thinking, tool calls, text-dialect recovery, usage, stop reason |
66
+ | `abortableDelay`, `createResponseHeaderDeadline`, `logCapacityEvent` | Transport timing |
67
+
50
68
  ## Credit
51
69
 
52
70
  Ported from [pi-provider-kiro](https://github.com/mikeyobrien/pi-provider-kiro)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ns-kiro-core",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Shared Kiro (AWS CodeWhisperer/Q) protocol core — credentials, model catalog, streaming; a dependency, not for direct install",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",