Commit 1012bdb
feat(kiro): add Kiro ACP provider with agent picker,
Adds Kiro as a first-class ACP provider layered on top of upstream's shared ACP
infrastructure (PR pingdotgg#1355). Kiro is an Amazon CLI (`kiro-cli acp`) speaking the
Agent Communication Protocol over stdio; authentication is OIDC via
`kiro-cli login` (out-of-band).
Highlights:
- Full ACP lifecycle: initialize → session/new → session/prompt/cancel, with
streaming `session/update` notifications and `{stopReason: "end_turn"}` turn
end via RPC response.
- Agent discovery via `kiro-cli agent list`, cached at `~/.t3/caches/kiro.json`
and surfaced through `ModelCapabilities.agentOptions`. Agents are a spawn-time
CLI flag (`--agent <name>`) so `sendTurn` respawns the child process when the
selected agent changes mid-session.
- `/agent` slash command opens the TraitsPicker, mirroring `/model`. Gated on
whether the current model exposes `agentOptions`.
- TraitsPicker now closes on agent selection (`closeOnClick` MenuRadioItem).
- `normalizeProviderModelOptionsWithCapabilities` gains a `case "kiro"` —
previously the kiro dispatch path dropped `{ agent }` silently because the
switch fell through to `undefined`, so the server never received the agent
selection even though the composer store held it.
- `_kiro.dev/commands/available` notifications runtime-patch slash commands;
`_kiro.dev/metadata` surfaces context window usage.
- Built-in Kiro models include Opus 4.7 (aliased as `opus`), Sonnet 4.6, Haiku
4.5, Deepseek 3.2.
Hidden traps documented in PATCH.md:
- Three hardcoded ProviderKind arrays in `composerDraftStore.ts` all need
`"kiro"` or model selection silently reverts to previous provider.
- `normalizeProviderModelOptionsWithCapabilities` switch needs an explicit
`case "kiro"` or agent selection never reaches the server.
- ACP `authMethodId` is made optional: Kiro returns empty `authMethods` and per
spec the client must skip `authenticate`.
- `_kiro.dev/*` ext requests the adapter doesn't handle must return JSON-RPC
error `-32601` (not empty-object success).
- `mcpServers: []` is required in `session/new`; omission exits kiro-cli
silently.
Test coverage:
- `KiroAdapter.integration.test.ts` — 8 tests covering start/stop/listSessions,
streaming, runtime events, agent flag propagation, respawn on agent change.
- `KiroAdapter.parsing.test.ts` — ACP message parsing.
- `packages/shared/src/model.test.ts` — 4 new tests for `normalizeKiro*` and
provider-switch wiring.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>/agent command, and Opus 4.71 parent f6978db commit 1012bdb
37 files changed
Lines changed: 2898 additions & 61 deletions
File tree
- apps
- server
- scripts
- src
- git/Services
- provider
- Layers
- Services
- acp
- web/src
- components
- chat
- settings
- docs
- packages
- contracts/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments