Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(kiro): let a Kiro bot take a pasted image as a file it opens

AdityaUmalea0fd1af60788
diff --git a/server/drivers/acp/kiro.test.ts b/server/drivers/acp/kiro.test.ts
index 8a4ab76dd5..2cfc19cd21 100644
--- a/server/drivers/acp/kiro.test.ts
+++ b/server/drivers/acp/kiro.test.ts
@@ -167,6 +167,21 @@ describe("Kiro ACP driver", () => {
expect(prompts().at(-1)).toMatchObject({ model: "claude-sonnet-5-5" });
});
+ it("takes an attached image as its file path for Kiro's own read tool, not as an ACP image block", async () => {
+ const { instance, recorder } = await create({ FAKE_ACP_DUMP_PROMPT: "1" });
+ expect(instance.adapter.capabilities.images).toBe(true);
+ expect(instance.adapter.capabilities.nativeImageInput).toBe(false);
+ const text = '<attached-image path="/private/image.png" name="image.png" />';
+ const { turnId } = await instance.adapter.sendTurn({
+ threadId: "kiro-image", text, images: [{ path: join(scratch, "missing.png"), mime: "image/png", bytes: 12 }],
+ });
+ const done = await recorder.until((event) => event.type === "turn.completed" && event.turnId === turnId);
+ expect(done).toMatchObject({ ok: true });
+ const prompt = JSON.parse(readFileSync(join(scratch, "launch.json.prompt.json"), "utf8")) as Array<{ type: string; text?: string }>;
+ expect(prompt.map((block) => block.type)).toEqual(["text"]);
+ expect(prompt[0]?.text).toContain(text);
+ });
+
it("leaves Kiro on its own default model, and turns Autopilot on only under Full access", async () => {
const { instance, recorder } = await create();
const { turnId } = await instance.adapter.sendTurn({ threadId: "kiro-full", text: "hello", model: "agent-default", approvalMode: "full" });
diff --git a/server/drivers/acp/kiro.ts b/server/drivers/acp/kiro.ts
index 6456272919..dd2f83b594 100644
--- a/server/drivers/acp/kiro.ts
+++ b/server/drivers/acp/kiro.ts
@@ -1,7 +1,8 @@
// Kiro CLI over ACP (`kiro-cli acp --agent-engine=v3 --auth-method=cli`), billed to the Kiro account `kiro-cli login`
// signed in, or to a Kiro Pro key in KIRO_API_KEY. Checked against kiro-cli 3.1.0:
// - initialize offers authMethods [aws-builder-id, aws-iam-identity-center] ([kiro-login] in older bundles) and no
-// image input; `--auth-method=cli` keeps the access tokens inside Kiro;
+// ACP image input, so an attached image reaches Kiro as its file path, which Kiro's own read tool opens;
+// `--auth-method=cli` keeps the access tokens inside Kiro;
// - session/new advertises the account's models as the `model` config option, each model's effort as `effortLevel`,
// Kiro's agents as `mode`, and `autopilot` (on/off), which sessions start "on";
// - session/set_config_option sets each of them and answers with the full configOptions;
@@ -92,7 +93,6 @@ const SUPPORT: AcpSupport = {
models: MODELS,
defaultCli: "kiro-cli",
nativeSource: "kiro.acp",
- images: false,
loginNote: LOGIN_NOTE,
install: {
command: { darwin: "curl -fsSL https://cli.kiro.dev/install | bash", linux: "curl -fsSL https://cli.kiro.dev/install | bash", win32: "irm 'https://cli.kiro.dev/install.ps1' | iex" },