Skip to content

[fork CI] feat(kiro): add Kiro CLI as a built-in agent - #1

Closed
keh4l wants to merge 4 commits into
mainfrom
feat/kiro-builtin-agent
Closed

keh4l wants to merge 4 commits into
mainfrom
feat/kiro-builtin-agent

Conversation

@keh4l

@keh4l keh4l commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Fork-internal PR to run the Test workflow (Linux / macOS / Windows × desktop / server, plus frontend) before opening the upstream PR against xintaofei/codeg. Not meant to be merged.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@keh4l keh4l closed this Sep 27, 2026
@keh4l keh4l reopened this Sep 27, 2026
Kiro CLI (`kiro-cli acp`) becomes the sixteenth built-in, under wire name
`kiro` and registry id `kiro-cli`.

Install: Kiro is distributed only through its own installer and keeps
itself current, so codeg launches the user's installed `kiro-cli` rather
than downloading a copy. That is a new `AgentDistribution::System { cmd,
args, env, install_url, update_args }`: preflight resolves the command on
PATH and, when it is missing, fails with the vendor's install page as its
one fix; download, prepare and uninstall refuse it as user-managed. The
settings page labels it "official installer" and offers Upgrade, which runs
`kiro-cli update --non-interactive` (`acp_update_system_agent`, Tauri and
web) with its output streamed to the install log and a 15-minute timeout,
then reports the version before and after.

Session config: Kiro sends no `configOptions`. The model selector is
built from the `models` block of `session/new` / `session/load` — the load
is sent untyped for Kiro so that field survives — and switched with
`session/set_model`. Modes come from the ACP modes and follow
`_kiro.dev/agent/switched`. Reasoning effort and the thinking switch come
from `_kiro.dev/metadata.reasoning` and are set through
`_kiro.dev/commands/execute` (`effort`, `reasoning`); the effort list is
shown whenever Kiro lists levels, because GPT models report `support:
unavailable` yet accept them, and the thinking switch only where Kiro
calls it toggleable. The order is mode, model, thinking, effort. Slash
commands come from `_kiro.dev/commands/available`, minus the TUI-only ones.

Permissions: the settings panel offers ask (default) or trust all, stored
as KIRO_TRUST_ALL_TOOLS and passed as `--trust-all-tools`, the same way
Cursor's CURSOR_FORCE works, plus an optional KIRO_API_KEY.

Tool calls: Kiro's tools take arguments no card reads. `write` is one
tool whose `command` (create / strReplace / insert) picks the operation,
which the input-shape classifier read as a shell command; `read` takes a
list of `operations` with no top-level path; results arrive as
`{"items":[{"Text"|"Json": …}]}`. `parsers::kiro::canonical_tool` maps the
built-in tools onto the arguments the cards take, for the history parser
and the live stream alike, and records the canonical name in
`_meta.kiro.canonicalToolName` so the frontend can tell glob from grep and
a directory listing from a file read. Results are flattened the same way
on both paths: a shell result becomes stdout/stderr plus a non-zero exit
status, an MCP result its text, and a read past line 1 is numbered from its
offset. A permission request carries no `_meta`, so its tool is told from
its arguments.

Transcripts: `<KIRO_HOME>/sessions/cli/<id>.jsonl` holds the log and
`<id>.json` the metadata, rewritten every turn; only prompts carry a
timestamp, so turn ends come from the metadata, and the summary cache keys
on the log with the metadata as a companion. Registered for import and
backup, with insta snapshots.

MCP and skills: codeg manages `<KIRO_HOME>/settings/mcp.json`, which Kiro
loads itself, so Kiro is on the ACP forward-skip list. SSE servers are left
out (Kiro takes stdio and HTTP only), and Kiro-only fields in an entry are
kept across rewrites. Skills live in `~/.kiro/skills` and `.kiro/skills`.

Migration: before this, the only way to run Kiro was as a custom agent
with the registry id `kiro-cli` — the id the built-in now claims, so those
conversations would turn into an unregistered `custom:kiro-cli`.
`m20260927_000001_kiro_builtin_agent` re-types every place an agent type is
stored (conversations, tabs, folder defaults, automations, work-task
configs, agent settings with their launch env); both point at the same
session on disk, so the parser reads their history. Collisions resolve
toward the built-in without losing anything (a duplicate conversation
hands its tabs over and is soft-deleted). The custom definition is removed;
`down` is a no-op.

README (10 languages) lists sixteen agents.
@keh4l
keh4l force-pushed the feat/kiro-builtin-agent branch from d593606 to fb64319 Compare September 27, 2026 19:22
Clippy 1.98 (CI's stable) flags the hand-counted insert loop as
explicit_counter_loop; 1.93 did not.
@keh4l

keh4l commented Sep 27, 2026

Copy link
Copy Markdown
Owner Author

CI verified; upstream PR: spacering-net#851

@keh4l keh4l closed this Sep 27, 2026
keh4l added 2 commits October 1, 2026 17:58
…gent

# Conflicts:
#	src-tauri/src/acp/connection.rs
#	src-tauri/src/db/migration/mod.rs
#	src/components/settings/acp-agent-settings.tsx
Upstream added m20260929_000001_canvas_board and
m20260930_000001_agent_setting_drop_adapter_channel, and released
builds have already applied them. A migration dated before them would
run out of order on those databases, so it moves to m20261001.
@keh4l keh4l reopened this Oct 1, 2026
@keh4l

keh4l commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

CI green on d4654f7 (merged with upstream main): https://github.com/keh4l/codeg/actions/runs/36850495610

@keh4l keh4l closed this Oct 1, 2026
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