feat(yoke): add Kiro CLI as an agent runtime via ACP#385
Open
hmkim wants to merge 2 commits into
Open
Conversation
added 2 commits
July 21, 2026 04:44
Integrate AWS Kiro CLI as a first-class agent runtime alongside Claude
Code and Codex, driven through `kiro-cli acp` (Agent Client Protocol,
JSON-RPC 2.0 over stdio) — mirroring the codex app-server transport.
New:
- lib/yoke/kiro-acp-server.js: child-process JSON-RPC transport
- lib/yoke/adapters/kiro.js: YOKE adapter (dynamic model catalog,
session lifecycle, session/update event flattening, permission
routing, resume, abort)
- lib/kiro-defaults.js: single source of truth for Kiro defaults
- lib/public/kiro-avatar.svg: branded avatar
- docs/guides/KIRO-INTEGRATION*.md: protocol reference + EN/KO summaries
Wiring (mirrors every codex touch-point):
- yoke/index.js: factory switch, auth (kiro-cli whoami), install
detection, createAdapters
- sdk-bridge.js: detectInstalledVendors, login command, KIRO
adapterOptions, neutral interrupt message
- sdk-message-processor.js, project-notifications.js: auth titles
- project-sessions.js: GUI-only session mode for kiro
- client UI: vendor toggle, new-session buttons (install-gated),
effort levels, avatar/name maps
Permission requests carry only { toolCallId, title }, so the adapter
caches kind/rawInput from the preceding tool_call notification to pass a
canonical tool name to canUseTool, keeping the permission whitelist
functional.
Kiro splits tool output across two tool_call_update events: an interim one carrying `content` (no status) and a later `status: "completed"` one whose `content` is empty (the output lives in `rawOutput`). The adapter only read the completed event's content, so tool_result bubbles were empty. Accumulate content chunks per toolCallId across events and fall back to the structured `rawOutput` (stdout/stderr) at completion, so tool_result is never empty. Verified against kiro-cli 2.7.0: `echo hello-kiro-42` now yields the real command output instead of a blank result.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #382 (opened first per CONTRIBUTING.md; you gave the go-ahead there).
Summary
Adds AWS Kiro CLI as a third agent runtime alongside Claude Code and Codex, through the existing YOKE adapter layer. Kiro exposes the Agent Client Protocol (ACP) via
kiro-cli acp— standard JSON-RPC 2.0 over stdio, the same transport shape as thecodex app-serverintegration.Rebased on latest
main(b04450d, 2.47.0-beta.1).Follows the constraints from #382
yoke/index.js), install/auth detection (sdk-bridge.jsdetectInstalledVendors,yoke/index.jscheckAuth/checkInstalled), client vendor toggle (app-panels.js,index.html, sidebar new-session buttons).kiro-clibinary lookup +whoami); nothing is added topackage.jsondependencies. Same posture as Codex.What's included
New
lib/yoke/kiro-acp-server.js— child-process JSON-RPC transportlib/yoke/adapters/kiro.js— YOKE adapter (dynamic model catalog, session lifecycle,session/updateevent flattening, permission routing, resume, abort)lib/kiro-defaults.js— single source of truth for Kiro defaultslib/public/kiro-avatar.svgdocs/guides/KIRO-INTEGRATION.md(+ EN/KO summaries)Wiring —
yoke/index.js,sdk-bridge.js,sdk-message-processor.js,project-notifications.js,project-sessions.js(GUI-only, like Codex), and client vendor UI.Design notes
init()runskiro-cli chat --list-models --format jsonand filters out[Internal]/[Deprecated]; default is theautorouter.session/request_permissioncarries only{ toolCallId, title }, so the adapter cacheskind+rawInputfrom the precedingtool_callnotification to pass a canonical tool name (Bash,Edit, ...) tocanUseTool. Without this the permission whitelist matching breaks.tool_call_updateevents (interimcontent, thenstatus: completedwith output inrawOutput). The adapter accumulates content pertoolCallIdand falls back torawOutputsotool_resultis never empty.Testing
Verified end-to-end against
kiro-cli2.7.0, and on a real device (iPhone PWA over Tailscale):autoresultemitted with usagesession/set_model; confirmed opus-4.8 / haiku-4.5 on device)canUseToolwith canonicalBash+{command}tool_resultshows real command outputTotally fine for you to reshape parts to fit Clay's conventions — treating this as a starting point as you said.