Skip to content

Commit 1f8825b

Browse files
authored
feat(acp): add support for gemini (#107)
## What - adds support for gemini - exclude qwen, gemini & future acp agents from the agent-on-blueprint approach since the pattern is well established and we don't get anything out of repeatedly building blueprints for this test case ## Why <!-- Motivation and context --> ## PR title format <!-- PR titles must follow Conventional Commits: <type>(<scope>): <description> Types: feat | fix | docs | style | refactor | perf | test | build | ci | chore | revert Scopes: sdk | acp | claude | examples | deps | project Examples: feat(sdk): add reconnect support fix(acp): handle timeout on long-running tasks docs(claude): update connection examples deps(sdk): bump @runloop/api-client to 1.5.0 ci(project): add PR title validation workflow --> ## Checklist - [ ] PR title follows `<type>(<scope>): <description>` format (see above) - [ ] `bun run check` passes (lint + format) - [ ] `bun run build` passes - [ ] `bun run test` passes - [ ] SDK documentation updated (if applicable)
1 parent 435235f commit 1f8825b

4 files changed

Lines changed: 76 additions & 45 deletions

File tree

examples/feature-examples/compatibility.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,30 @@ SDK Version: 0.4.2
1313

1414
## ACP Agent × Feature
1515

16-
| Use Case | opencode | codex-acp | qwen |
17-
|----------|------------|------------|------------|
18-
| agent-via-blueprint | pass | pass | pass |
19-
| elicitation-acp | xfail | xfail | xfail |
20-
| single-prompt | pass | pass | pass |
16+
| Use Case | opencode | codex-acp | qwen | gemini-cli |
17+
|----------|------------|------------|------------|------------|
18+
| agent-via-blueprint | pass | pass | skip | skip |
19+
| elicitation-acp | xfail | xfail | xfail | xfail |
20+
| single-prompt | pass | pass | pass | pass |
2121

2222
---
2323

2424
## Run Details
2525

2626
| Agent | Use Case | Status | Duration | Notes |
2727
|-------|----------|--------|----------|-------|
28-
| opencode | agent-via-blueprint | pass | 2.3s | |
29-
| opencode | elicitation-acp | xfail | 13.8s | [xfail: ACP protocol has not added full elicitation support yet] Agent did not trigger session_elicitation |
30-
| opencode | single-prompt | pass | 1.8s | |
31-
| codex-acp | agent-via-blueprint | pass | 2.3s | |
32-
| codex-acp | elicitation-acp | xfail | 10.5s | [xfail: codex-acp does not advertise or send session/elicitation (uses permission requests instead)] Agent did not trigger session_elicitation |
33-
| codex-acp | single-prompt | pass | 3.4s | |
34-
| qwen | agent-via-blueprint | pass | 3.2s | |
28+
| opencode | agent-via-blueprint | pass | 1.8s | |
29+
| opencode | elicitation-acp | xfail | 9.9s | [xfail: ACP protocol has not added full elicitation support yet] Agent did not trigger session_elicitation |
30+
| opencode | single-prompt | pass | 2.1s | |
31+
| codex-acp | agent-via-blueprint | pass | 2.4s | |
32+
| codex-acp | elicitation-acp | xfail | 10.0s | [xfail: codex-acp does not advertise or send session/elicitation (uses permission requests instead)] Agent did not trigger session_elicitation |
33+
| codex-acp | single-prompt | pass | 1.3s | |
34+
| qwen | agent-via-blueprint | skip | 0.0s | No blueprint override defined for qwen — add an entry to BLUEPRINT_OVERRIDES to test this agent via blueprint |
3535
| qwen | elicitation-acp | xfail | 11.7s | [xfail: qwen does not advertise or send session/elicitation] Agent did not trigger session_elicitation |
36-
| qwen | single-prompt | pass | 2.9s | |
37-
| claude-code | agent-via-blueprint | pass | 1.8s | |
38-
| claude-code | elicitation-claude | pass | 12.8s | |
39-
| claude-code | single-prompt | pass | 2.0s | |
36+
| qwen | single-prompt | pass | 2.2s | |
37+
| gemini-cli | agent-via-blueprint | skip | 0.0s | No blueprint override defined for gemini-cli — add an entry to BLUEPRINT_OVERRIDES to test this agent via blueprint |
38+
| gemini-cli | elicitation-acp | xfail | 12.9s | [xfail: gemini-cli does not advertise or send session/elicitation] Agent did not trigger session_elicitation |
39+
| gemini-cli | single-prompt | pass | 4.0s | |
40+
| claude-code | agent-via-blueprint | pass | 3.8s | |
41+
| claude-code | elicitation-claude | pass | 16.0s | |
42+
| claude-code | single-prompt | pass | 1.6s | |

examples/feature-examples/src/agents.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,21 @@ export const AGENTS: AgentConfig[] = [
5656
OPENAI_BASE_URL: "DASHSCOPE_BASE_URL",
5757
},
5858
},
59+
{
60+
name: "gemini-cli",
61+
protocol: "acp",
62+
install: {
63+
kind: "agent-mount",
64+
agentName: "gemini-cli",
65+
blueprint: "runloop/starter-x86_64",
66+
},
67+
brokerMount: {
68+
protocol: "acp",
69+
agentBinary: "gemini",
70+
launchArgs: ["--experimental-acp", "--yolo"],
71+
},
72+
secrets: { GEMINI_API_KEY: "GEMINI_API_KEY" },
73+
},
5974
{
6075
name: "claude-code",
6176
protocol: "claude",
Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,60 @@
1-
import type { UseCase } from "../types.js";
1+
import type { AgentConfigOverride, UseCase } from "../types.js";
22
import singlePrompt from "./single-prompt.js";
33

44
/**
5-
* Demonstrates using a pre-built blueprint with agents baked in.
5+
* Demonstrates using a pre-built blueprint (`axon-agents`) with agents baked in.
66
*
7-
* This use case shows the `provisionOverridesByAgent` pattern for switching
8-
* from catalog install to blueprint install. The `axon-agents` blueprint has
9-
* agents pre-installed, giving the fastest cold-start and reproducible environment.
7+
* This use case demonstrates how to use `provisionOverridesByAgent` to switch
8+
* from the default install using agent_mounts to a blueprint install for specific agents.
9+
* It is not an exhaustive example: the same general approach should work for all agents. To
10+
* change the agents being tested, modify BLUEPRINT_OVERRIDES
1011
*
1112
* The test body is identical to single-prompt — the interesting part is the
1213
* provisioning configuration, not the prompt logic.
1314
*
1415
* Prerequisites: The `axon-agents` blueprint must exist on your Runloop account.
1516
* Run `bun run build-blueprint` from the repo root to create it.
1617
*/
18+
19+
const BLUEPRINT_OVERRIDES: Record<string, AgentConfigOverride> = {
20+
opencode: {
21+
install: { kind: "blueprint", blueprint: "axon-agents" },
22+
brokerMount: {
23+
agentBinary: "/home/user/.opencode/bin/opencode",
24+
launchArgs: ["acp"],
25+
},
26+
},
27+
"codex-acp": {
28+
install: { kind: "blueprint", blueprint: "axon-agents" },
29+
brokerMount: {
30+
agentBinary: "/usr/local/bin/codex-acp",
31+
workingDirectory: "/home/user",
32+
},
33+
},
34+
"claude-code": {
35+
install: { kind: "blueprint", blueprint: "axon-agents" },
36+
brokerMount: {
37+
agentBinary: "/home/user/.local/bin/claude",
38+
launchArgs: ["--dangerously-skip-permissions"],
39+
},
40+
},
41+
};
42+
1743
export default {
1844
name: "agent-via-blueprint",
1945
description: "Use pre-built blueprint with agents baked in",
2046
protocols: ["acp", "claude"],
2147
timeoutMs: 30_000,
2248

23-
provisionOverridesByAgent: {
24-
opencode: {
25-
install: { kind: "blueprint", blueprint: "axon-agents" },
26-
brokerMount: {
27-
agentBinary: "/home/user/.opencode/bin/opencode",
28-
launchArgs: ["acp"],
29-
},
30-
},
31-
"codex-acp": {
32-
install: { kind: "blueprint", blueprint: "axon-agents" },
33-
brokerMount: {
34-
agentBinary: "/usr/local/bin/codex-acp",
35-
workingDirectory: "/home/user",
36-
},
37-
},
38-
"claude-code": {
39-
install: { kind: "blueprint", blueprint: "axon-agents" },
40-
brokerMount: {
41-
agentBinary: "/home/user/.local/bin/claude",
42-
launchArgs: ["--dangerously-skip-permissions"],
43-
},
44-
},
45-
},
49+
provisionOverridesByAgent: BLUEPRINT_OVERRIDES,
4650

47-
run: singlePrompt.run,
51+
run(ctx) {
52+
if (!(ctx.agent.name in BLUEPRINT_OVERRIDES)) {
53+
ctx.skip(
54+
`No blueprint override defined for ${ctx.agent.name} — ` +
55+
`add an entry to BLUEPRINT_OVERRIDES to test this agent via blueprint`,
56+
);
57+
}
58+
return singlePrompt.run(ctx);
59+
},
4860
} satisfies UseCase;

examples/feature-examples/src/use-cases/elicitation-acp.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export default {
2222
"codex-acp":
2323
"codex-acp does not advertise or send session/elicitation (uses permission requests instead)",
2424
qwen: "qwen does not advertise or send session/elicitation",
25+
"gemini-cli": "gemini-cli does not advertise or send session/elicitation",
2526
},
2627

2728
clientCapabilities: { elicitation: { form: {} } },

0 commit comments

Comments
 (0)