Skip to content

Add kiro-acp-bridge (ACP adapter adding config options to Kiro CLI) - #575

Open
AbduRahmanS wants to merge 6 commits into
agentclientprotocol:mainfrom
AbduRahmanS:add-kiro-acp-bridge
Open

Add kiro-acp-bridge (ACP adapter adding config options to Kiro CLI)#575
AbduRahmanS wants to merge 6 commits into
agentclientprotocol:mainfrom
AbduRahmanS:add-kiro-acp-bridge

Conversation

@AbduRahmanS

@AbduRahmanS AbduRahmanS commented Sep 5, 2026

Copy link
Copy Markdown

Adds an ACP adapter that fronts Kiro CLI and exposes its model, reasoning-effort and agent selection as session config options.

Relationship to the other Kiro PRs

I found five open Kiro-related PRs while preparing this, so to be explicit about scope:

PR What it adds Distribution
#33, #209, #561 Kiro CLI itself (id kiro) Kiro binaries — blocked on macOS/Windows archives
#482 Kiro Gateway — OpenAI/Anthropic-compatible gateway npx
#575 (this) Adapter adding config options on top of Kiro CLI npx

This does not compete with #33 / #209 / #561 — it complements them. Those distribute Kiro; this makes Kiro's model, effort and agent selection reachable by clients that use session config options. I'd be glad to see one of them merge and would happily reference it.

Display name is deliberately "Kiro Bridge", not "Kiro", so it cannot be mistaken for a first-party entry.

Why it exists

Kiro CLI speaks ACP natively, but an older dialect: model selection goes through session/set_model plus a models block on session/new, and session/set_config_option returns -32601. Clients that have moved to session config options therefore show no model, effort or agent selector when talking to it directly. This adapter translates:

Surface Mapping
Models configOptions, category: "model"
Agents (Plan, Guide, user-defined) configOptions, category: "mode"
Reasoning effort configOptions, category: "thought_level"
Kiro slash commands + user skills available_commands_update
Context usage usage_update from measured token counts
Saved sessions session/list

Notes for reviewers

Platform coverage. npx distribution sidesteps the .dmg/.msi problem that has held up the binary-based Kiro entries — this works on macOS, Linux and Windows. The trade is that it requires kiro-cli already installed, whereas #561 downloads it. Different tradeoff, not a better one.

Effort is per-model and re-queried on every model change. Kiro's GPT models expose an extra none level, Claude models do not, and auto has no effort axis at all — in that case the option is withdrawn rather than shown empty.

Authentication. Kiro's auth surface is state-dependent: with a signed-in CLI initialize returns authMethods: [], and it advertises kiro-login when authentication is required (as #561 notes). This adapter always advertises an ACP Terminal Auth method backed by kiro-cli login, because a client must decide what to render from one response without knowing the auth state — and because kiro-cli may be absent entirely, which is this CI's condition since the package ships via npx and does not bundle Kiro. initialize completes in that case rather than failing, so the handshake still offers a way forward.

Credits. Kiro bills in abstract credits, deliberately not written to usage_update.cost since ACP's Cost requires an ISO 4217 currency. Only genuine overage charges populate it.

Requirements

Node >= 22 and an installed, authenticated Kiro CLI. Two pinned runtime dependencies: @agentclientprotocol/sdk@1.4.0 and zod@3.25.76.

Verification

  • 199 unit tests against fixtures captured from real Kiro traffic
  • six end-to-end suites driving the built adapter through a simulated client against a live kiro-cli
  • CI on Linux and macOS across Node 22 and 24, including a job asserting initialize advertises an auth method with no kiro-cli present
  • the published npm artifact installed into a clean directory and driven through a full handshake

build_registry.py accepts the entry locally (Added agent: kiro-acp-bridge v0.1.0). I could not complete verify_agents.py --auth-check on my machine — npm exec stalls on its confirmation prompt without a TTY — but the invariant it checks is covered by the CI job above.

Repository: https://github.com/AbduRahmanS/kiro-acp-bridge
npm: https://www.npmjs.com/package/kiro-acp-bridge

Kiro CLI speaks ACP natively, but an older dialect: it exposes model selection
via session/set_model and a `models` block on session/new, and answers
session/set_config_option with -32601. Clients that have moved to session config
options therefore show no model, effort or agent selector when talking to it
directly.

This adapter sits in front of `kiro-cli acp` and presents stable ACP v1: models,
agents and reasoning effort as session config options (categories model, mode and
thought_level), Kiro's slash commands as availableCommands, and measured context
usage as usage_update.

Notes for reviewers:

- Effort options are per-model and re-queried on every model change. Kiro's GPT
  models expose an extra `none` level, Claude models do not, and `auto` has no
  effort axis at all -- in that case the option is withdrawn rather than shown
  empty.

- Kiro returns `authMethods: []`, so the adapter supplies ACP Terminal Auth that
  runs `kiro-cli login`. This is an accurate description of how Kiro
  authentication works rather than a shim for this registry's requirement, and it
  makes signing in reachable from an editor for the first time. initialize also
  completes when kiro-cli is absent, so the handshake still advertises an auth
  method on a machine without Kiro installed.

- Requires Node >= 22 and an installed Kiro CLI. Two runtime dependencies:
  @agentclientprotocol/sdk and zod, both pinned.

Verified: 199 unit tests, six end-to-end suites against a live kiro-cli, CI on
Linux and macOS across Node 22 and 24, and the published npm artifact installed
into a clean directory and driven through a full handshake.
AbduRahmanS added a commit to AbduRahmanS/kiro-acp-bridge that referenced this pull request Sep 5, 2026
0.1.0 is live on npm and the ACP Registry PR is open
(agentclientprotocol/registry#575).

Documents how publishing actually worked, because the route was not obvious and
will be needed again if trusted publishing is ever unavailable. npm requires 2FA
to publish; enabling it is a dead end for the CLI because npm has disabled new
TOTP enrolments, leaving passkey-only 2FA that `npm publish` cannot satisfy --
its 2FA path is `--otp=` and there is no code to supply. Upgrading npm 10 to 12
changed nothing; the limit is in the flow, not the version.

The working route is a granular token with bypass 2FA, with two constraints worth
recording: it must be scoped to All packages, since a not-yet-existing package
cannot be selected and a narrow token returns E404 rather than a permission error;
and the token should be verified with `npm whoami --userconfig` first, because a
truncated paste produces the same E404 and is otherwise indistinguishable.

Also records that the published artifact was verified by installing from the
registry into a clean directory and completing a handshake against a live
kiro-cli, which exercises what users receive rather than the dev tree.
Three open PRs (agentclientprotocol#33, agentclientprotocol#209, agentclientprotocol#561) submit Kiro CLI itself under id 'kiro'. Taking the
bare name 'Kiro' for a third-party wrapper would sit confusingly beside those and
would imply an endorsement that does not exist. agentclientprotocol#482 sets the precedent with 'Kiro
Gateway'.

The description now leads with what this adds rather than restating what Kiro is,
since the entry only makes sense in relation to Kiro CLI.
@AbduRahmanS AbduRahmanS changed the title Add kiro-acp-bridge Add kiro-acp-bridge (ACP adapter adding config options to Kiro CLI) Sep 5, 2026
0.1.0 was published with a granular token and has no attestation. 0.1.1 was
published through a configured npm trusted publisher from GitHub Actions, so it
carries SLSA provenance and can be verified as built from this repository.
0.1.1 reported its own version as 0.1.0 (a hardcoded constant that drifted).
Fixed and re-released; the reported version is now derived from package.json and
guarded by a test and a release check. 0.1.2 also carries SLSA provenance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant