#87 Docker Agent en sbx : programme choisi d'après agent: docker-agent ; exemples mini-me-acp et docker-agent-acp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a67301e parent: 9c7f618 modified
.memory/history.md +1 -0 | @@ -228,3 +228,4 @@ | ||
| 228 | 228 | - **2026-11-10 — #82 verified on the Mac**: Codex works with `codex-acp` alone (v3 kit puts it in the PATH; `/home/agent/.local/bin/codex-acp` was the v2 launcher). Assistant, snippet README, guides updated. Claude, Codex and Gemini in sbx all work on the Mac. |
| 229 | 229 | - **2026-11-10 — sbx program from agent:** (owner: "select the right program once the sbxenv.yaml is dropped or chosen, for codex, gemini and claude"): `withSbxProgram` in `withSandboxEnv` — agent: claude/codex/gemini sets program + arguments when the field is empty or holds a listed program; typed programs kept. Guides EN/FR step 5 updated; comments on #81/#82/#84 (Gemini verified on the Mac). New ticket #86 Mistral Vibe in sbx (no milestone). |
| 230 | 230 | - **2026-11-10 — same for mini-me** (owner: "the same for mini me"): `programOfSandbox` — agent: mini-me* (e.g. mini-me-kit) → mm --acp; a configuration file given before the sbxenv.yaml re-applies --config. mm stays outside sbxAgentOf (its config file is still asked, no note). Docs EN/FR: run-an-agent-in-a-sandbox, add-an-agent. |
| 231 | +- **2026-11-10 — snippets mini-me-acp + #87 docker-agent in sbx** (owner: "add an example in agents/snippets, then create a ticket for docker agent too and implement it"): snippet mini-me-acp (kit docker.io/k33g/mini-me-kit:0.1.1, workspace/agent.yaml from milo's). #87: `programOfSandbox` agent docker-agent|cagent → docker-agent serve acp (built-in sbx agent, no kit: the v3 kit does not load while the built-in exists); snippet docker-agent-acp (agent.yaml with anthropic/claude-sonnet-4-5, key via sbx secret). No milestone on #87. Not tried with sbx. | |
| @@ -228,3 +228,4 @@ | |||
| 228 | - **2026-11-10 — #82 verified on the Mac**: Codex works with `codex-acp` alone (v3 kit puts it in the PATH; `/home/agent/.local/bin/codex-acp` was the v2 launcher). Assistant, snippet README, guides updated. Claude, Codex and Gemini in sbx all work on the Mac. | 228 | - **2026-11-10 — #82 verified on the Mac**: Codex works with `codex-acp` alone (v3 kit puts it in the PATH; `/home/agent/.local/bin/codex-acp` was the v2 launcher). Assistant, snippet README, guides updated. Claude, Codex and Gemini in sbx all work on the Mac. |
| 229 | - **2026-11-10 — sbx program from agent:** (owner: "select the right program once the sbxenv.yaml is dropped or chosen, for codex, gemini and claude"): `withSbxProgram` in `withSandboxEnv` — agent: claude/codex/gemini sets program + arguments when the field is empty or holds a listed program; typed programs kept. Guides EN/FR step 5 updated; comments on #81/#82/#84 (Gemini verified on the Mac). New ticket #86 Mistral Vibe in sbx (no milestone). | 229 | - **2026-11-10 — sbx program from agent:** (owner: "select the right program once the sbxenv.yaml is dropped or chosen, for codex, gemini and claude"): `withSbxProgram` in `withSandboxEnv` — agent: claude/codex/gemini sets program + arguments when the field is empty or holds a listed program; typed programs kept. Guides EN/FR step 5 updated; comments on #81/#82/#84 (Gemini verified on the Mac). New ticket #86 Mistral Vibe in sbx (no milestone). |
| 230 | - **2026-11-10 — same for mini-me** (owner: "the same for mini me"): `programOfSandbox` — agent: mini-me* (e.g. mini-me-kit) → mm --acp; a configuration file given before the sbxenv.yaml re-applies --config. mm stays outside sbxAgentOf (its config file is still asked, no note). Docs EN/FR: run-an-agent-in-a-sandbox, add-an-agent. | 230 | - **2026-11-10 — same for mini-me** (owner: "the same for mini me"): `programOfSandbox` — agent: mini-me* (e.g. mini-me-kit) → mm --acp; a configuration file given before the sbxenv.yaml re-applies --config. mm stays outside sbxAgentOf (its config file is still asked, no note). Docs EN/FR: run-an-agent-in-a-sandbox, add-an-agent. |
| 231 | +- **2026-11-10 — snippets mini-me-acp + #87 docker-agent in sbx** (owner: "add an example in agents/snippets, then create a ticket for docker agent too and implement it"): snippet mini-me-acp (kit docker.io/k33g/mini-me-kit:0.1.1, workspace/agent.yaml from milo's). #87: `programOfSandbox` agent docker-agent|cagent → docker-agent serve acp (built-in sbx agent, no kit: the v3 kit does not load while the built-in exists); snippet docker-agent-acp (agent.yaml with anthropic/claude-sonnet-4-5, key via sbx secret). No milestone on #87. Not tried with sbx. | ||
added
.tickets/issues/0087-simplifier-l-ajout-d-une-sbx-avec-docker-agent.yaml +81 -0 | new file mode 100644 | ||
| @@ -0,0 +1,81 @@ | ||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | |
| 2 | +id: 87 | |
| 3 | +title: "Simplifier l'ajout d'une sbx avec Docker Agent (docker-agent)" | |
| 4 | +state: closed | |
| 5 | +author: | |
| 6 | + name: k33g | |
| 7 | + email: ph.charriere@gmail.com | |
| 8 | +createdAt: 2026-11-10T05:40:48.000Z | |
| 9 | +updatedAt: 2026-11-10T05:40:48.000Z | |
| 10 | +labels: | |
| 11 | + - kind::feature | |
| 12 | + - area::config | |
| 13 | + - citizen-ux | |
| 14 | + - real-agents | |
| 15 | +epic: Docker SBX | |
| 16 | +related: | |
| 17 | + - 81 | |
| 18 | + - 82 | |
| 19 | + - 84 | |
| 20 | +body: | | |
| 21 | + Faire pour **Docker Agent** (`docker-agent`) ce qui a été fait pour Claude (#81), Codex (#82), Gemini (#84) et mini-me : | |
| 22 | + déposer ou choisir le `sbxenv.yaml` dans l'assistant **Ajouter un agent** choisit le programme, et un exemple | |
| 23 | + prêt à l'emploi est dans `agents/snippets`. | |
| 24 | + | |
| 25 | + ## Approche | |
| 26 | + - `docker-agent` est un agent connu de sbx (`agent: docker-agent`, alias `cagent`) : la sandbox n'a besoin d'aucun kit. | |
| 27 | + Le kit v3 `docker.io/sbx/docker-agent` de sbx-kits-contrib ne se charge pas encore tant que l'agent intégré existe. | |
| 28 | + - Le programme est `docker-agent` avec `serve acp` ; comme pour mm, le fichier de l'agent (`agent.yaml`) déposé | |
| 29 | + ensuite s'ajoute aux arguments (`serve acp …/agent.yaml`). | |
| 30 | + - La clé du fournisseur du modèle reste dans sbx (`sbx secret set anthropic`…), jamais dans le YAML. | |
| 31 | + | |
| 32 | + ## Critères d'acceptation | |
| 33 | + - Le `sbxenv.yaml` d'une sandbox `docker-agent` choisit le programme et ses arguments ; un programme tapé à la main est gardé. | |
| 34 | + - Un exemple `agents/snippets/docker-agent-acp` (`sbxenv.yaml`, `workspace/agent.yaml`, README). | |
| 35 | + - Tests ; docs EN + FR. | |
| 36 | +tasks: | |
| 37 | + - id: 1 | |
| 38 | + title: "Choisir docker-agent (serve acp) d'après agent: docker-agent ou cagent" | |
| 39 | + state: closed | |
| 40 | + priority: high | |
| 41 | + author: | |
| 42 | + name: k33g | |
| 43 | + email: ph.charriere@gmail.com | |
| 44 | + createdAt: 2026-11-10T05:40:48.000Z | |
| 45 | + updatedAt: 2026-11-10T05:40:48.000Z | |
| 46 | + closedAt: 2026-11-10T05:40:48.000Z | |
| 47 | + - id: 2 | |
| 48 | + title: "Exemple agents/snippets/docker-agent-acp" | |
| 49 | + state: closed | |
| 50 | + priority: medium | |
| 51 | + author: | |
| 52 | + name: k33g | |
| 53 | + email: ph.charriere@gmail.com | |
| 54 | + createdAt: 2026-11-10T05:40:48.000Z | |
| 55 | + updatedAt: 2026-11-10T05:40:48.000Z | |
| 56 | + closedAt: 2026-11-10T05:40:48.000Z | |
| 57 | + - id: 3 | |
| 58 | + title: "Tests vitest ; docs EN + FR (lancer un agent dans une sandbox, ajouter un agent)" | |
| 59 | + state: closed | |
| 60 | + priority: medium | |
| 61 | + author: | |
| 62 | + name: k33g | |
| 63 | + email: ph.charriere@gmail.com | |
| 64 | + createdAt: 2026-11-10T05:40:48.000Z | |
| 65 | + updatedAt: 2026-11-10T05:40:48.000Z | |
| 66 | + closedAt: 2026-11-10T05:40:48.000Z | |
| 67 | +comments: | |
| 68 | + - id: 1 | |
| 69 | + author: | |
| 70 | + name: k33g | |
| 71 | + email: ph.charriere@gmail.com | |
| 72 | + createdAt: 2026-11-10T05:40:48.000Z | |
| 73 | + body: | | |
| 74 | + Fait. | |
| 75 | + - [agentform.ts](frontend/src/lib/agentform.ts) : `programOfSandbox` donne `docker-agent` + `serve acp` pour `agent: docker-agent` ou `cagent` | |
| 76 | + (et `mm` + `--acp` pour un kit mini-me) ; `withSbxProgram` remplace un programme de la liste (`docker agent` compris), garde un programme tapé. | |
| 77 | + Un fichier d'agent donné avant le `sbxenv.yaml` est repris dans les arguments. | |
| 78 | + - Exemples : [agents/snippets/docker-agent-acp](agents/snippets/docker-agent-acp/README.md) (modèle `anthropic/claude-sonnet-4-5`, clé dans sbx) | |
| 79 | + et [agents/snippets/mini-me-acp](agents/snippets/mini-me-acp/README.md). | |
| 80 | + - Docs EN + FR : « Lancer un agent dans une sandbox sbx », « Ajouter un agent ». | |
| 81 | + - Non vérifié : démarrage réel dans sbx (pas de sbx ici). | |
| new file mode 100644 | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | ||
| 2 | +id: 87 | ||
| 3 | +title: "Simplifier l'ajout d'une sbx avec Docker Agent (docker-agent)" | ||
| 4 | +state: closed | ||
| 5 | +author: | ||
| 6 | + name: k33g | ||
| 7 | + email: ph.charriere@gmail.com | ||
| 8 | +createdAt: 2026-11-10T05:40:48.000Z | ||
| 9 | +updatedAt: 2026-11-10T05:40:48.000Z | ||
| 10 | +labels: | ||
| 11 | + - kind::feature | ||
| 12 | + - area::config | ||
| 13 | + - citizen-ux | ||
| 14 | + - real-agents | ||
| 15 | +epic: Docker SBX | ||
| 16 | +related: | ||
| 17 | + - 81 | ||
| 18 | + - 82 | ||
| 19 | + - 84 | ||
| 20 | +body: | | ||
| 21 | + Faire pour **Docker Agent** (`docker-agent`) ce qui a été fait pour Claude (#81), Codex (#82), Gemini (#84) et mini-me : | ||
| 22 | + déposer ou choisir le `sbxenv.yaml` dans l'assistant **Ajouter un agent** choisit le programme, et un exemple | ||
| 23 | + prêt à l'emploi est dans `agents/snippets`. | ||
| 24 | + | ||
| 25 | + ## Approche | ||
| 26 | + - `docker-agent` est un agent connu de sbx (`agent: docker-agent`, alias `cagent`) : la sandbox n'a besoin d'aucun kit. | ||
| 27 | + Le kit v3 `docker.io/sbx/docker-agent` de sbx-kits-contrib ne se charge pas encore tant que l'agent intégré existe. | ||
| 28 | + - Le programme est `docker-agent` avec `serve acp` ; comme pour mm, le fichier de l'agent (`agent.yaml`) déposé | ||
| 29 | + ensuite s'ajoute aux arguments (`serve acp …/agent.yaml`). | ||
| 30 | + - La clé du fournisseur du modèle reste dans sbx (`sbx secret set anthropic`…), jamais dans le YAML. | ||
| 31 | + | ||
| 32 | + ## Critères d'acceptation | ||
| 33 | + - Le `sbxenv.yaml` d'une sandbox `docker-agent` choisit le programme et ses arguments ; un programme tapé à la main est gardé. | ||
| 34 | + - Un exemple `agents/snippets/docker-agent-acp` (`sbxenv.yaml`, `workspace/agent.yaml`, README). | ||
| 35 | + - Tests ; docs EN + FR. | ||
| 36 | +tasks: | ||
| 37 | + - id: 1 | ||
| 38 | + title: "Choisir docker-agent (serve acp) d'après agent: docker-agent ou cagent" | ||
| 39 | + state: closed | ||
| 40 | + priority: high | ||
| 41 | + author: | ||
| 42 | + name: k33g | ||
| 43 | + email: ph.charriere@gmail.com | ||
| 44 | + createdAt: 2026-11-10T05:40:48.000Z | ||
| 45 | + updatedAt: 2026-11-10T05:40:48.000Z | ||
| 46 | + closedAt: 2026-11-10T05:40:48.000Z | ||
| 47 | + - id: 2 | ||
| 48 | + title: "Exemple agents/snippets/docker-agent-acp" | ||
| 49 | + state: closed | ||
| 50 | + priority: medium | ||
| 51 | + author: | ||
| 52 | + name: k33g | ||
| 53 | + email: ph.charriere@gmail.com | ||
| 54 | + createdAt: 2026-11-10T05:40:48.000Z | ||
| 55 | + updatedAt: 2026-11-10T05:40:48.000Z | ||
| 56 | + closedAt: 2026-11-10T05:40:48.000Z | ||
| 57 | + - id: 3 | ||
| 58 | + title: "Tests vitest ; docs EN + FR (lancer un agent dans une sandbox, ajouter un agent)" | ||
| 59 | + state: closed | ||
| 60 | + priority: medium | ||
| 61 | + author: | ||
| 62 | + name: k33g | ||
| 63 | + email: ph.charriere@gmail.com | ||
| 64 | + createdAt: 2026-11-10T05:40:48.000Z | ||
| 65 | + updatedAt: 2026-11-10T05:40:48.000Z | ||
| 66 | + closedAt: 2026-11-10T05:40:48.000Z | ||
| 67 | +comments: | ||
| 68 | + - id: 1 | ||
| 69 | + author: | ||
| 70 | + name: k33g | ||
| 71 | + email: ph.charriere@gmail.com | ||
| 72 | + createdAt: 2026-11-10T05:40:48.000Z | ||
| 73 | + body: | | ||
| 74 | + Fait. | ||
| 75 | + - [agentform.ts](frontend/src/lib/agentform.ts) : `programOfSandbox` donne `docker-agent` + `serve acp` pour `agent: docker-agent` ou `cagent` | ||
| 76 | + (et `mm` + `--acp` pour un kit mini-me) ; `withSbxProgram` remplace un programme de la liste (`docker agent` compris), garde un programme tapé. | ||
| 77 | + Un fichier d'agent donné avant le `sbxenv.yaml` est repris dans les arguments. | ||
| 78 | + - Exemples : [agents/snippets/docker-agent-acp](agents/snippets/docker-agent-acp/README.md) (modèle `anthropic/claude-sonnet-4-5`, clé dans sbx) | ||
| 79 | + et [agents/snippets/mini-me-acp](agents/snippets/mini-me-acp/README.md). | ||
| 80 | + - Docs EN + FR : « Lancer un agent dans une sandbox sbx », « Ajouter un agent ». | ||
| 81 | + - Non vérifié : démarrage réel dans sbx (pas de sbx ici). | ||
added
agents/snippets/docker-agent-acp/README.md +24 -0 | new file mode 100644 | ||
| @@ -0,0 +1,24 @@ | ||
| 1 | +# Add a Docker Agent (docker-agent) agent in an sbx sandbox | |
| 2 | + | |
| 3 | +`docker-agent` is an agent sbx knows (`agent: docker-agent`): the sandbox needs no kit. Sidekicks starts it with `docker-agent serve acp <agent.yaml>`; the agent's file is `workspace/agent.yaml`. | |
| 4 | + | |
| 5 | +Before starting it, store the key of the model's provider in sbx, never in a file: `sbx secret set anthropic` for the model of `agent.yaml`. | |
| 6 | + | |
| 7 | +With the assistant: choose **In an sbx sandbox**, drop `sbxenv.yaml` (the program `docker-agent` is chosen from `agent: docker-agent`, with `serve acp`), then drop `workspace/agent.yaml` on the agent's configuration file area (the arguments become `serve acp …/agent.yaml`). | |
| 8 | + | |
| 9 | +```yaml | |
| 10 | + - name: docker-agent | |
| 11 | + title: Docker Agent | |
| 12 | + icon: "🐳" | |
| 13 | + command: sbx | |
| 14 | + args: [exec, -i, docker-agent-acp, docker-agent, serve, acp, /Users/me/agents/docker-agent-acp/workspace/agent.yaml] | |
| 15 | + workspace: /Users/me/agents/docker-agent-acp/workspace | |
| 16 | + runtime: | |
| 17 | + type: sbx | |
| 18 | + sandbox: docker-agent-acp | |
| 19 | + lifecycle: | |
| 20 | + folder: /Users/me/agents/docker-agent-acp | |
| 21 | + create: [sbx, env, create, --force] | |
| 22 | + stop: [sbx, stop, docker-agent-acp] | |
| 23 | + remove: [sbx, env, rm, --force] | |
| 24 | +``` | |
| new file mode 100644 | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | +# Add a Docker Agent (docker-agent) agent in an sbx sandbox | ||
| 2 | + | ||
| 3 | +`docker-agent` is an agent sbx knows (`agent: docker-agent`): the sandbox needs no kit. Sidekicks starts it with `docker-agent serve acp <agent.yaml>`; the agent's file is `workspace/agent.yaml`. | ||
| 4 | + | ||
| 5 | +Before starting it, store the key of the model's provider in sbx, never in a file: `sbx secret set anthropic` for the model of `agent.yaml`. | ||
| 6 | + | ||
| 7 | +With the assistant: choose **In an sbx sandbox**, drop `sbxenv.yaml` (the program `docker-agent` is chosen from `agent: docker-agent`, with `serve acp`), then drop `workspace/agent.yaml` on the agent's configuration file area (the arguments become `serve acp …/agent.yaml`). | ||
| 8 | + | ||
| 9 | +```yaml | ||
| 10 | + - name: docker-agent | ||
| 11 | + title: Docker Agent | ||
| 12 | + icon: "🐳" | ||
| 13 | + command: sbx | ||
| 14 | + args: [exec, -i, docker-agent-acp, docker-agent, serve, acp, /Users/me/agents/docker-agent-acp/workspace/agent.yaml] | ||
| 15 | + workspace: /Users/me/agents/docker-agent-acp/workspace | ||
| 16 | + runtime: | ||
| 17 | + type: sbx | ||
| 18 | + sandbox: docker-agent-acp | ||
| 19 | + lifecycle: | ||
| 20 | + folder: /Users/me/agents/docker-agent-acp | ||
| 21 | + create: [sbx, env, create, --force] | ||
| 22 | + stop: [sbx, stop, docker-agent-acp] | ||
| 23 | + remove: [sbx, env, rm, --force] | ||
| 24 | +``` | ||
added
agents/snippets/docker-agent-acp/sbxenv.yaml +10 -0 | new file mode 100644 | ||
| @@ -0,0 +1,10 @@ | ||
| 1 | +schemaVersion: "1" | |
| 2 | + | |
| 3 | +name: docker-agent-acp | |
| 4 | + | |
| 5 | +# docker-agent is an sbx agent of its own: no kit to add. Sidekicks chooses | |
| 6 | +# the program docker-agent (serve acp) from it. | |
| 7 | +agent: docker-agent | |
| 8 | + | |
| 9 | +# The folder Docker Agent works in, relative to this file; agent.yaml is in it. | |
| 10 | +workspace: ./workspace | |
| new file mode 100644 | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | +schemaVersion: "1" | ||
| 2 | + | ||
| 3 | +name: docker-agent-acp | ||
| 4 | + | ||
| 5 | +# docker-agent is an sbx agent of its own: no kit to add. Sidekicks chooses | ||
| 6 | +# the program docker-agent (serve acp) from it. | ||
| 7 | +agent: docker-agent | ||
| 8 | + | ||
| 9 | +# The folder Docker Agent works in, relative to this file; agent.yaml is in it. | ||
| 10 | +workspace: ./workspace | ||
added
agents/snippets/docker-agent-acp/workspace/agent.yaml +17 -0 | new file mode 100644 | ||
| @@ -0,0 +1,17 @@ | ||
| 1 | +# A Docker Agent coding agent, served over ACP by Sidekicks: | |
| 2 | +# docker-agent serve acp agent.yaml | |
| 3 | +# The model is reached through sbx: store its key with `sbx secret set anthropic` | |
| 4 | +# (or change the model, e.g. openai/gpt-5-mini with `sbx secret set openai`). | |
| 5 | +agents: | |
| 6 | + root: | |
| 7 | + model: anthropic/claude-sonnet-4-5 | |
| 8 | + description: A coding agent that reads and changes the project and runs commands. | |
| 9 | + instruction: | | |
| 10 | + You are a coding agent working in the user's project. | |
| 11 | + Read before you change: look at the files and run the commands that tell | |
| 12 | + you how the project works. Make the smallest change that does the job, | |
| 13 | + then run the tests or the build to check it. | |
| 14 | + toolsets: | |
| 15 | + - type: filesystem | |
| 16 | + - type: shell | |
| 17 | + - type: todo | |
| new file mode 100644 | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | +# A Docker Agent coding agent, served over ACP by Sidekicks: | ||
| 2 | +# docker-agent serve acp agent.yaml | ||
| 3 | +# The model is reached through sbx: store its key with `sbx secret set anthropic` | ||
| 4 | +# (or change the model, e.g. openai/gpt-5-mini with `sbx secret set openai`). | ||
| 5 | +agents: | ||
| 6 | + root: | ||
| 7 | + model: anthropic/claude-sonnet-4-5 | ||
| 8 | + description: A coding agent that reads and changes the project and runs commands. | ||
| 9 | + instruction: | | ||
| 10 | + You are a coding agent working in the user's project. | ||
| 11 | + Read before you change: look at the files and run the commands that tell | ||
| 12 | + you how the project works. Make the smallest change that does the job, | ||
| 13 | + then run the tests or the build to check it. | ||
| 14 | + toolsets: | ||
| 15 | + - type: filesystem | ||
| 16 | + - type: shell | ||
| 17 | + - type: todo | ||
added
agents/snippets/mini-me-acp/README.md +22 -0 | new file mode 100644 | ||
| @@ -0,0 +1,22 @@ | ||
| 1 | +# Add a mini-me (mm) agent in an sbx sandbox | |
| 2 | + | |
| 3 | +The sandbox is built from the `docker.io/k33g/mini-me-kit` kit (`agent: mini-me-kit`): mm runs in it, with `workspace/agent.yaml` as its configuration. mm talks to llmman on this computer (`host.docker.internal`), so no key is needed. | |
| 4 | + | |
| 5 | +With the assistant: choose **In an sbx sandbox**, drop `sbxenv.yaml` (the program `mm` is chosen from `agent: mini-me-kit`), then drop `workspace/agent.yaml` on the agent's configuration file area (the arguments become `--acp --config …/agent.yaml`). | |
| 6 | + | |
| 7 | +```yaml | |
| 8 | + - name: mini-me | |
| 9 | + title: Mini-me | |
| 10 | + icon: "🤏" | |
| 11 | + command: sbx | |
| 12 | + args: [exec, -i, mini-me-acp, mm, --acp, --config, /Users/me/agents/mini-me-acp/workspace/agent.yaml] | |
| 13 | + workspace: /Users/me/agents/mini-me-acp/workspace | |
| 14 | + runtime: | |
| 15 | + type: sbx | |
| 16 | + sandbox: mini-me-acp | |
| 17 | + lifecycle: | |
| 18 | + folder: /Users/me/agents/mini-me-acp | |
| 19 | + create: [sbx, env, create, --force] | |
| 20 | + stop: [sbx, stop, mini-me-acp] | |
| 21 | + remove: [sbx, env, rm, --force] | |
| 22 | +``` | |
| new file mode 100644 | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | +# Add a mini-me (mm) agent in an sbx sandbox | ||
| 2 | + | ||
| 3 | +The sandbox is built from the `docker.io/k33g/mini-me-kit` kit (`agent: mini-me-kit`): mm runs in it, with `workspace/agent.yaml` as its configuration. mm talks to llmman on this computer (`host.docker.internal`), so no key is needed. | ||
| 4 | + | ||
| 5 | +With the assistant: choose **In an sbx sandbox**, drop `sbxenv.yaml` (the program `mm` is chosen from `agent: mini-me-kit`), then drop `workspace/agent.yaml` on the agent's configuration file area (the arguments become `--acp --config …/agent.yaml`). | ||
| 6 | + | ||
| 7 | +```yaml | ||
| 8 | + - name: mini-me | ||
| 9 | + title: Mini-me | ||
| 10 | + icon: "🤏" | ||
| 11 | + command: sbx | ||
| 12 | + args: [exec, -i, mini-me-acp, mm, --acp, --config, /Users/me/agents/mini-me-acp/workspace/agent.yaml] | ||
| 13 | + workspace: /Users/me/agents/mini-me-acp/workspace | ||
| 14 | + runtime: | ||
| 15 | + type: sbx | ||
| 16 | + sandbox: mini-me-acp | ||
| 17 | + lifecycle: | ||
| 18 | + folder: /Users/me/agents/mini-me-acp | ||
| 19 | + create: [sbx, env, create, --force] | ||
| 20 | + stop: [sbx, stop, mini-me-acp] | ||
| 21 | + remove: [sbx, env, rm, --force] | ||
| 22 | +``` | ||
added
agents/snippets/mini-me-acp/sbxenv.yaml +12 -0 | new file mode 100644 | ||
| @@ -0,0 +1,12 @@ | ||
| 1 | +schemaVersion: "1" | |
| 2 | + | |
| 3 | +name: mini-me-acp | |
| 4 | + | |
| 5 | +# The workload kit is the base "agent": Sidekicks chooses the program mm from it. | |
| 6 | +agent: mini-me-kit | |
| 7 | + | |
| 8 | +kits: | |
| 9 | + - docker.io/k33g/mini-me-kit:0.1.1 | |
| 10 | + | |
| 11 | +# The folder mm works in, relative to this file; agent.yaml is in it. | |
| 12 | +workspace: ./workspace | |
| new file mode 100644 | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | +schemaVersion: "1" | ||
| 2 | + | ||
| 3 | +name: mini-me-acp | ||
| 4 | + | ||
| 5 | +# The workload kit is the base "agent": Sidekicks chooses the program mm from it. | ||
| 6 | +agent: mini-me-kit | ||
| 7 | + | ||
| 8 | +kits: | ||
| 9 | + - docker.io/k33g/mini-me-kit:0.1.1 | ||
| 10 | + | ||
| 11 | +# The folder mm works in, relative to this file; agent.yaml is in it. | ||
| 12 | +workspace: ./workspace | ||
added
agents/snippets/mini-me-acp/workspace/agent.yaml +93 -0 | new file mode 100644 | ||
| @@ -0,0 +1,93 @@ | ||
| 1 | +# mini-me — a coding agent: reads and changes the project, runs commands. | |
| 2 | +# | |
| 3 | +# Written by `mm init`. Every value says why it has that value; change | |
| 4 | +# them as you watch the agent work (guides/agent-settings-for-small-models.md). | |
| 5 | +# | |
| 6 | +# model family: gemma | |
| 7 | +# usage: developer | |
| 8 | +# machine: small — a laptop, models up to about 8B | |
| 9 | +# model facts: read from llmman: native window 131072 tokens; GGUF sampling temperature 1.0, top_p 0.95, top_k 64; reasoning switch enable_thinking (default off) | |
| 10 | +# | |
| 11 | +# Where the numbers come from (the tag before their comment): | |
| 12 | +# [server] read from the server — run mm init again after a change | |
| 13 | +# [guide] the settings guide's row for this machine | |
| 14 | +# [rule] a rule of thumb, not specific to this model | |
| 15 | +# | |
| 16 | +# mm -config <this file> or mm -tui <this file> | |
| 17 | + | |
| 18 | +provider: llmman | |
| 19 | +# The model. Chosen for it (family gemma): sampling (temperature, top_p, | |
| 20 | +# top_k, max_tokens) and sampling.chat_template_kwargs (enable_thinking). | |
| 21 | +# Change the model and redo them together — running mm init again is the | |
| 22 | +# quick way. | |
| 23 | +model: "hf.co/unsloth/gemma-4-E2B-it-GGUF:Q4_K_M" | |
| 24 | +# No baseUrl: llmman's defaults apply. For the record: | |
| 25 | +# baseUrl: "http://127.0.0.1:17434/v1" | |
| 26 | +# fallback: "http://host.docker.internal:17434/v1" # tried when baseUrl does not answer | |
| 27 | + | |
| 28 | +# 0 = mm asks the server for the window it serves (the model's native window | |
| 29 | +# is 131072 tokens; the server may serve less) | |
| 30 | +contextWindow: 0 | |
| 31 | +# your answer: tools run without asking | |
| 32 | +yolo: true | |
| 33 | +# usage developer | |
| 34 | +bashTool: true | |
| 35 | +editTools: true | |
| 36 | +planTool: true | |
| 37 | +askUserTool: true | |
| 38 | +# no skills: add a skills/ folder and set skillsDir to use some (see | |
| 39 | +# docs/en/how-to/add-a-skill.md) | |
| 40 | +skillsDir: no-skills | |
| 41 | +# usage developer | |
| 42 | +maxTurns: 40 | |
| 43 | +# [guide] settings guide, row "Small model (≤ 8B), short tasks" | |
| 44 | +maxOutput: 8000 | |
| 45 | +firstTokenTimeout: 3m | |
| 46 | +# [guide] aligned on bashTimeout, as the settings guide says when bash is on | |
| 47 | +# (section 3) | |
| 48 | +watchdogTimeout: 30s | |
| 49 | +# [guide] settings guide, row "Small model (≤ 8B), short tasks" | |
| 50 | +bashTimeout: 30s | |
| 51 | + | |
| 52 | +sampling: | |
| 53 | + # [server] the GGUF's own sampling, read from the server | |
| 54 | + temperature: 1.0 | |
| 55 | + top_p: 0.95 | |
| 56 | + top_k: 64 | |
| 57 | + # [rule] reasoning on: room for the thoughts plus a whole tool call | |
| 58 | + max_tokens: 16384 | |
| 59 | + # one tool call per reply: small models run a check before the change it | |
| 60 | + # checks has landed otherwise | |
| 61 | + parallel_tool_calls: false | |
| 62 | + chat_template_kwargs: | |
| 63 | + # reasoning on: code and multi-step work; the template's default is off | |
| 64 | + # (read from the chat template) | |
| 65 | + enable_thinking: true | |
| 66 | + | |
| 67 | +context: | |
| 68 | + # compress the history before the window is full (settings guide, every row) | |
| 69 | + enabled: true | |
| 70 | + # mm's default: 75 % of the window the server serves, a quarter left for the | |
| 71 | + # next question and its tool outputs | |
| 72 | + threshold: 75 | |
| 73 | + | |
| 74 | +agentsMd: | |
| 75 | + # An AGENTS.md in the project directory is added to the system prompt. | |
| 76 | + enabled: true | |
| 77 | + | |
| 78 | +acp: | |
| 79 | + name: mini-me | |
| 80 | + title: "Mini-me (developer)" | |
| 81 | + | |
| 82 | +system: | | |
| 83 | + Your name is Mini-me. You are a coding agent working in a terminal, in the user's project. | |
| 84 | + You have a bash tool, file tools (read_file, write_file, edit_file) and a | |
| 85 | + plan tool. | |
| 86 | + Read before you change: look at the files and run the commands that tell | |
| 87 | + you how the project works. Make the smallest change that does the job, | |
| 88 | + then run the tests or the build to check it. | |
| 89 | + Never state the output of a command you did not run in this answer. | |
| 90 | + When a task has several steps, make a plan and update it as you go. | |
| 91 | + | |
| 92 | +# Next: skills (docs/en/how-to/add-a-skill.md), MCP servers (docs/en/tutorials/mcp-getting-started.md), | |
| 93 | +# hooks (docs/en/how-to/guard-the-agent-with-hooks.md), sessions (docs/en/how-to/keep-sessions.md). | |
| new file mode 100644 | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | +# mini-me — a coding agent: reads and changes the project, runs commands. | ||
| 2 | +# | ||
| 3 | +# Written by `mm init`. Every value says why it has that value; change | ||
| 4 | +# them as you watch the agent work (guides/agent-settings-for-small-models.md). | ||
| 5 | +# | ||
| 6 | +# model family: gemma | ||
| 7 | +# usage: developer | ||
| 8 | +# machine: small — a laptop, models up to about 8B | ||
| 9 | +# model facts: read from llmman: native window 131072 tokens; GGUF sampling temperature 1.0, top_p 0.95, top_k 64; reasoning switch enable_thinking (default off) | ||
| 10 | +# | ||
| 11 | +# Where the numbers come from (the tag before their comment): | ||
| 12 | +# [server] read from the server — run mm init again after a change | ||
| 13 | +# [guide] the settings guide's row for this machine | ||
| 14 | +# [rule] a rule of thumb, not specific to this model | ||
| 15 | +# | ||
| 16 | +# mm -config <this file> or mm -tui <this file> | ||
| 17 | + | ||
| 18 | +provider: llmman | ||
| 19 | +# The model. Chosen for it (family gemma): sampling (temperature, top_p, | ||
| 20 | +# top_k, max_tokens) and sampling.chat_template_kwargs (enable_thinking). | ||
| 21 | +# Change the model and redo them together — running mm init again is the | ||
| 22 | +# quick way. | ||
| 23 | +model: "hf.co/unsloth/gemma-4-E2B-it-GGUF:Q4_K_M" | ||
| 24 | +# No baseUrl: llmman's defaults apply. For the record: | ||
| 25 | +# baseUrl: "http://127.0.0.1:17434/v1" | ||
| 26 | +# fallback: "http://host.docker.internal:17434/v1" # tried when baseUrl does not answer | ||
| 27 | + | ||
| 28 | +# 0 = mm asks the server for the window it serves (the model's native window | ||
| 29 | +# is 131072 tokens; the server may serve less) | ||
| 30 | +contextWindow: 0 | ||
| 31 | +# your answer: tools run without asking | ||
| 32 | +yolo: true | ||
| 33 | +# usage developer | ||
| 34 | +bashTool: true | ||
| 35 | +editTools: true | ||
| 36 | +planTool: true | ||
| 37 | +askUserTool: true | ||
| 38 | +# no skills: add a skills/ folder and set skillsDir to use some (see | ||
| 39 | +# docs/en/how-to/add-a-skill.md) | ||
| 40 | +skillsDir: no-skills | ||
| 41 | +# usage developer | ||
| 42 | +maxTurns: 40 | ||
| 43 | +# [guide] settings guide, row "Small model (≤ 8B), short tasks" | ||
| 44 | +maxOutput: 8000 | ||
| 45 | +firstTokenTimeout: 3m | ||
| 46 | +# [guide] aligned on bashTimeout, as the settings guide says when bash is on | ||
| 47 | +# (section 3) | ||
| 48 | +watchdogTimeout: 30s | ||
| 49 | +# [guide] settings guide, row "Small model (≤ 8B), short tasks" | ||
| 50 | +bashTimeout: 30s | ||
| 51 | + | ||
| 52 | +sampling: | ||
| 53 | + # [server] the GGUF's own sampling, read from the server | ||
| 54 | + temperature: 1.0 | ||
| 55 | + top_p: 0.95 | ||
| 56 | + top_k: 64 | ||
| 57 | + # [rule] reasoning on: room for the thoughts plus a whole tool call | ||
| 58 | + max_tokens: 16384 | ||
| 59 | + # one tool call per reply: small models run a check before the change it | ||
| 60 | + # checks has landed otherwise | ||
| 61 | + parallel_tool_calls: false | ||
| 62 | + chat_template_kwargs: | ||
| 63 | + # reasoning on: code and multi-step work; the template's default is off | ||
| 64 | + # (read from the chat template) | ||
| 65 | + enable_thinking: true | ||
| 66 | + | ||
| 67 | +context: | ||
| 68 | + # compress the history before the window is full (settings guide, every row) | ||
| 69 | + enabled: true | ||
| 70 | + # mm's default: 75 % of the window the server serves, a quarter left for the | ||
| 71 | + # next question and its tool outputs | ||
| 72 | + threshold: 75 | ||
| 73 | + | ||
| 74 | +agentsMd: | ||
| 75 | + # An AGENTS.md in the project directory is added to the system prompt. | ||
| 76 | + enabled: true | ||
| 77 | + | ||
| 78 | +acp: | ||
| 79 | + name: mini-me | ||
| 80 | + title: "Mini-me (developer)" | ||
| 81 | + | ||
| 82 | +system: | | ||
| 83 | + Your name is Mini-me. You are a coding agent working in a terminal, in the user's project. | ||
| 84 | + You have a bash tool, file tools (read_file, write_file, edit_file) and a | ||
| 85 | + plan tool. | ||
| 86 | + Read before you change: look at the files and run the commands that tell | ||
| 87 | + you how the project works. Make the smallest change that does the job, | ||
| 88 | + then run the tests or the build to check it. | ||
| 89 | + Never state the output of a command you did not run in this answer. | ||
| 90 | + When a task has several steps, make a plan and update it as you go. | ||
| 91 | + | ||
| 92 | +# Next: skills (docs/en/how-to/add-a-skill.md), MCP servers (docs/en/tutorials/mcp-getting-started.md), | ||
| 93 | +# hooks (docs/en/how-to/guard-the-agent-with-hooks.md), sessions (docs/en/how-to/keep-sessions.md). | ||
modified
docs/en/how-to/add-an-agent.md +1 -1 | @@ -17,7 +17,7 @@ When the agent cannot be added (a name already used, for instance), the assistan | ||
| 17 | 17 | - **On this computer, from the agent's configuration file**: choose the program, then drop the agent's YAML file on **The agent's configuration file** (or click **Choose a file…**). The agent's folder becomes the file's folder; for `mm`, `docker-agent` and `docker agent` the arguments are filled in (`--acp --config <file>`, `serve acp <file>`). For another program, type the arguments. Changing the program afterwards fills them again. Every field stays editable. The same works **in an sbx sandbox** or **in a Docker container**, as long as the file is in a folder the sandbox shares, or the container mounts, at the same path (it is read there). |
| 18 | 18 | - **On this computer**: the program runs here, in the agent's folder. If Sidekicks was opened from the Finder and does not find the program, write its full path (`which mm` in a terminal gives it). Sidekicks reads your shell's `PATH` at startup, so this is rarely needed. |
| 19 | 19 | - **In a Docker container**: give the **Container name**. The container must exist (Sidekicks starts it if it is stopped), with the agent's folder mounted at the same path, and contain the program: see [How to run an agent in a Docker container](run-an-agent-in-docker.md). Sidekicks starts the agent with `docker exec -i <container> <program> <arguments>`. To have the container recreated when it is gone, drop its `compose.yaml` on **Recreate the container when it is gone** and pick the service, or type the commands: see [Restart or recreate the container](run-an-agent-in-docker.md#restart-or-recreate-the-container). |
| 20 | -- **In an sbx sandbox**: give the **Sandbox name**. The sandbox must exist, with the agent's folder at the same path: see [How to run an agent in an sbx sandbox](run-an-agent-in-a-sandbox.md). Sidekicks starts the agent with `sbx exec -i <sandbox> <program> <arguments>`. To have the sandbox recreated when it is gone, drop its `sbxenv.yaml` on **Recreate the sandbox when it is gone**, or type the commands: see [Recreate the sandbox when it is gone](run-an-agent-in-a-sandbox.md#recreate-the-sandbox-when-it-is-gone). The file also chooses the program from its `agent:` line (`mm` for a mini-me kit, Claude, Codex or Gemini). | |
| 20 | +- **In an sbx sandbox**: give the **Sandbox name**. The sandbox must exist, with the agent's folder at the same path: see [How to run an agent in an sbx sandbox](run-an-agent-in-a-sandbox.md). Sidekicks starts the agent with `sbx exec -i <sandbox> <program> <arguments>`. To have the sandbox recreated when it is gone, drop its `sbxenv.yaml` on **Recreate the sandbox when it is gone**, or type the commands: see [Recreate the sandbox when it is gone](run-an-agent-in-a-sandbox.md#recreate-the-sandbox-when-it-is-gone). The file also chooses the program from its `agent:` line (`mm` for a mini-me kit, `docker-agent` for `agent: docker-agent`, Claude, Codex or Gemini). | |
| 21 | 21 | - **Claude in an sbx sandbox**: choose **In an sbx sandbox**, drop the sandbox's `sbxenv.yaml` (the sandbox, the folder and the commands are filled in, and the program `claude-agent-acp` is chosen from its `agent: claude`), with no arguments. It relies on the `docker.io/sbx/claude-acp` kit, provided by a third party, not by Sidekicks. See [How to add a Claude agent in an sbx sandbox](add-a-claude-agent-in-a-sandbox.md). |
| 22 | 22 | - **Codex or Gemini in an sbx sandbox**: the same, with the program `codex-acp` (kit `docker.io/sbx/codex-acp`) or `gemini` with the argument `--acp` (kit `docker.io/sbx/gemini-kit`). See [How to add a Codex agent in an sbx sandbox](add-a-codex-agent-in-a-sandbox.md) and [How to add a Gemini agent in an sbx sandbox](add-a-gemini-agent-in-a-sandbox.md). |
| 23 | 23 | - **Options the assistant does not ask for** (`env`, `afterStop`, a different `workspacePath`): add the agent with the assistant, then complete its entry in **Settings**. |
| @@ -17,7 +17,7 @@ When the agent cannot be added (a name already used, for instance), the assistan | |||
| 17 | - **On this computer, from the agent's configuration file**: choose the program, then drop the agent's YAML file on **The agent's configuration file** (or click **Choose a file…**). The agent's folder becomes the file's folder; for `mm`, `docker-agent` and `docker agent` the arguments are filled in (`--acp --config <file>`, `serve acp <file>`). For another program, type the arguments. Changing the program afterwards fills them again. Every field stays editable. The same works **in an sbx sandbox** or **in a Docker container**, as long as the file is in a folder the sandbox shares, or the container mounts, at the same path (it is read there). | 17 | - **On this computer, from the agent's configuration file**: choose the program, then drop the agent's YAML file on **The agent's configuration file** (or click **Choose a file…**). The agent's folder becomes the file's folder; for `mm`, `docker-agent` and `docker agent` the arguments are filled in (`--acp --config <file>`, `serve acp <file>`). For another program, type the arguments. Changing the program afterwards fills them again. Every field stays editable. The same works **in an sbx sandbox** or **in a Docker container**, as long as the file is in a folder the sandbox shares, or the container mounts, at the same path (it is read there). |
| 18 | - **On this computer**: the program runs here, in the agent's folder. If Sidekicks was opened from the Finder and does not find the program, write its full path (`which mm` in a terminal gives it). Sidekicks reads your shell's `PATH` at startup, so this is rarely needed. | 18 | - **On this computer**: the program runs here, in the agent's folder. If Sidekicks was opened from the Finder and does not find the program, write its full path (`which mm` in a terminal gives it). Sidekicks reads your shell's `PATH` at startup, so this is rarely needed. |
| 19 | - **In a Docker container**: give the **Container name**. The container must exist (Sidekicks starts it if it is stopped), with the agent's folder mounted at the same path, and contain the program: see [How to run an agent in a Docker container](run-an-agent-in-docker.md). Sidekicks starts the agent with `docker exec -i <container> <program> <arguments>`. To have the container recreated when it is gone, drop its `compose.yaml` on **Recreate the container when it is gone** and pick the service, or type the commands: see [Restart or recreate the container](run-an-agent-in-docker.md#restart-or-recreate-the-container). | 19 | - **In a Docker container**: give the **Container name**. The container must exist (Sidekicks starts it if it is stopped), with the agent's folder mounted at the same path, and contain the program: see [How to run an agent in a Docker container](run-an-agent-in-docker.md). Sidekicks starts the agent with `docker exec -i <container> <program> <arguments>`. To have the container recreated when it is gone, drop its `compose.yaml` on **Recreate the container when it is gone** and pick the service, or type the commands: see [Restart or recreate the container](run-an-agent-in-docker.md#restart-or-recreate-the-container). |
| 20 | -- **In an sbx sandbox**: give the **Sandbox name**. The sandbox must exist, with the agent's folder at the same path: see [How to run an agent in an sbx sandbox](run-an-agent-in-a-sandbox.md). Sidekicks starts the agent with `sbx exec -i <sandbox> <program> <arguments>`. To have the sandbox recreated when it is gone, drop its `sbxenv.yaml` on **Recreate the sandbox when it is gone**, or type the commands: see [Recreate the sandbox when it is gone](run-an-agent-in-a-sandbox.md#recreate-the-sandbox-when-it-is-gone). The file also chooses the program from its `agent:` line (`mm` for a mini-me kit, Claude, Codex or Gemini). | 20 | +- **In an sbx sandbox**: give the **Sandbox name**. The sandbox must exist, with the agent's folder at the same path: see [How to run an agent in an sbx sandbox](run-an-agent-in-a-sandbox.md). Sidekicks starts the agent with `sbx exec -i <sandbox> <program> <arguments>`. To have the sandbox recreated when it is gone, drop its `sbxenv.yaml` on **Recreate the sandbox when it is gone**, or type the commands: see [Recreate the sandbox when it is gone](run-an-agent-in-a-sandbox.md#recreate-the-sandbox-when-it-is-gone). The file also chooses the program from its `agent:` line (`mm` for a mini-me kit, `docker-agent` for `agent: docker-agent`, Claude, Codex or Gemini). |
| 21 | - **Claude in an sbx sandbox**: choose **In an sbx sandbox**, drop the sandbox's `sbxenv.yaml` (the sandbox, the folder and the commands are filled in, and the program `claude-agent-acp` is chosen from its `agent: claude`), with no arguments. It relies on the `docker.io/sbx/claude-acp` kit, provided by a third party, not by Sidekicks. See [How to add a Claude agent in an sbx sandbox](add-a-claude-agent-in-a-sandbox.md). | 21 | - **Claude in an sbx sandbox**: choose **In an sbx sandbox**, drop the sandbox's `sbxenv.yaml` (the sandbox, the folder and the commands are filled in, and the program `claude-agent-acp` is chosen from its `agent: claude`), with no arguments. It relies on the `docker.io/sbx/claude-acp` kit, provided by a third party, not by Sidekicks. See [How to add a Claude agent in an sbx sandbox](add-a-claude-agent-in-a-sandbox.md). |
| 22 | - **Codex or Gemini in an sbx sandbox**: the same, with the program `codex-acp` (kit `docker.io/sbx/codex-acp`) or `gemini` with the argument `--acp` (kit `docker.io/sbx/gemini-kit`). See [How to add a Codex agent in an sbx sandbox](add-a-codex-agent-in-a-sandbox.md) and [How to add a Gemini agent in an sbx sandbox](add-a-gemini-agent-in-a-sandbox.md). | 22 | - **Codex or Gemini in an sbx sandbox**: the same, with the program `codex-acp` (kit `docker.io/sbx/codex-acp`) or `gemini` with the argument `--acp` (kit `docker.io/sbx/gemini-kit`). See [How to add a Codex agent in an sbx sandbox](add-a-codex-agent-in-a-sandbox.md) and [How to add a Gemini agent in an sbx sandbox](add-a-gemini-agent-in-a-sandbox.md). |
| 23 | - **Options the assistant does not ask for** (`env`, `afterStop`, a different `workspacePath`): add the agent with the assistant, then complete its entry in **Settings**. | 23 | - **Options the assistant does not ask for** (`env`, `afterStop`, a different `workspacePath`): add the agent with the assistant, then complete its entry in **Settings**. |
modified
docs/en/how-to/run-an-agent-in-a-sandbox.md +1 -1 | @@ -41,7 +41,7 @@ This guide shows how to declare an agent that runs inside a Docker sandbox (`sbx | ||
| 41 | 41 | |
| 42 | 42 | When the sandbox is removed (by you, by `sbx rm`, after a reset of sbx), the agent can no longer start. Give Sidekicks the commands that manage the sandbox and it creates it again before starting the agent: |
| 43 | 43 | |
| 44 | -1. With the assistant: choose **In an sbx sandbox**, then drop the sandbox's `sbxenv.yaml` on the **Recreate the sandbox when it is gone** area (or click **Choose an sbxenv.yaml…**). The sandbox name, the folder and the `sbx env` commands are filled in; change them if needed. The program follows the file's `agent:` line: `mm` with `--acp` for a mini-me kit (`agent: mini-me-kit`; then drop the agent's configuration file to add `--config`), `claude-agent-acp`, `codex-acp` or `gemini --acp` for `claude`, `codex` or `gemini`. A program typed by hand is kept. | |
| 44 | +1. With the assistant: choose **In an sbx sandbox**, then drop the sandbox's `sbxenv.yaml` on the **Recreate the sandbox when it is gone** area (or click **Choose an sbxenv.yaml…**). The sandbox name, the folder and the `sbx env` commands are filled in; change them if needed. The program follows the file's `agent:` line: `mm` with `--acp` for a mini-me kit (`agent: mini-me-kit`; then drop the agent's configuration file to add `--config`), `docker-agent` with `serve acp` for `agent: docker-agent` (then drop its agent file too), `claude-agent-acp`, `codex-acp` or `gemini --acp` for `claude`, `codex` or `gemini`. A program typed by hand is kept. Ready-made examples: [`agents/snippets/mini-me-acp`](../../../agents/snippets/mini-me-acp/README.md) and [`agents/snippets/docker-agent-acp`](../../../agents/snippets/docker-agent-acp/README.md) (a folder each, with its `sbxenv.yaml` and the agent's file in `workspace/`). | |
| 45 | 45 | 2. Or in **Settings**, add `lifecycle` to the runtime: |
| 46 | 46 | |
| 47 | 47 | ```yaml |
| @@ -41,7 +41,7 @@ This guide shows how to declare an agent that runs inside a Docker sandbox (`sbx | |||
| 41 | 41 | ||
| 42 | When the sandbox is removed (by you, by `sbx rm`, after a reset of sbx), the agent can no longer start. Give Sidekicks the commands that manage the sandbox and it creates it again before starting the agent: | 42 | When the sandbox is removed (by you, by `sbx rm`, after a reset of sbx), the agent can no longer start. Give Sidekicks the commands that manage the sandbox and it creates it again before starting the agent: |
| 43 | 43 | ||
| 44 | -1. With the assistant: choose **In an sbx sandbox**, then drop the sandbox's `sbxenv.yaml` on the **Recreate the sandbox when it is gone** area (or click **Choose an sbxenv.yaml…**). The sandbox name, the folder and the `sbx env` commands are filled in; change them if needed. The program follows the file's `agent:` line: `mm` with `--acp` for a mini-me kit (`agent: mini-me-kit`; then drop the agent's configuration file to add `--config`), `claude-agent-acp`, `codex-acp` or `gemini --acp` for `claude`, `codex` or `gemini`. A program typed by hand is kept. | 44 | +1. With the assistant: choose **In an sbx sandbox**, then drop the sandbox's `sbxenv.yaml` on the **Recreate the sandbox when it is gone** area (or click **Choose an sbxenv.yaml…**). The sandbox name, the folder and the `sbx env` commands are filled in; change them if needed. The program follows the file's `agent:` line: `mm` with `--acp` for a mini-me kit (`agent: mini-me-kit`; then drop the agent's configuration file to add `--config`), `docker-agent` with `serve acp` for `agent: docker-agent` (then drop its agent file too), `claude-agent-acp`, `codex-acp` or `gemini --acp` for `claude`, `codex` or `gemini`. A program typed by hand is kept. Ready-made examples: [`agents/snippets/mini-me-acp`](../../../agents/snippets/mini-me-acp/README.md) and [`agents/snippets/docker-agent-acp`](../../../agents/snippets/docker-agent-acp/README.md) (a folder each, with its `sbxenv.yaml` and the agent's file in `workspace/`). |
| 45 | 2. Or in **Settings**, add `lifecycle` to the runtime: | 45 | 2. Or in **Settings**, add `lifecycle` to the runtime: |
| 46 | 46 | ||
| 47 | ```yaml | 47 | ```yaml |
modified
docs/fr/how-to/ajouter-un-agent.md +1 -1 | @@ -17,7 +17,7 @@ Quand l'agent ne peut pas être ajouté (un nom déjà pris, par exemple), l'ass | ||
| 17 | 17 | - **Sur cet ordinateur, depuis le fichier de configuration de l'agent** : choisissez le programme, puis déposez le fichier YAML de l'agent sur **Le fichier de configuration de l'agent** (ou cliquez sur **Choisir un fichier…**). Le dossier de l'agent devient celui du fichier ; pour `mm`, `docker-agent` et `docker agent`, les arguments sont remplis (`--acp --config <fichier>`, `serve acp <fichier>`). Pour un autre programme, tapez les arguments. Changer de programme ensuite les remplit de nouveau. Chaque champ reste modifiable. Cela fonctionne aussi **dans une sandbox sbx** ou **dans un conteneur Docker**, si le fichier est dans un dossier que la sandbox partage, ou que le conteneur monte, au même chemin (il y est lu). |
| 18 | 18 | - **Sur cet ordinateur** : le programme tourne ici, dans le dossier de l'agent. Si Sidekicks, ouvert depuis le Finder, ne trouve pas le programme, indiquez son chemin complet (`which mm` dans un terminal le donne). Sidekicks lit le `PATH` de votre shell au démarrage : c'est rarement nécessaire. |
| 19 | 19 | - **Dans un conteneur Docker** : indiquez le **Nom du conteneur**. Le conteneur doit exister (Sidekicks le démarre s'il est arrêté), avec le dossier de l'agent monté au même chemin, et contenir le programme : voir [Lancer un agent dans un conteneur Docker](lancer-un-agent-dans-docker.md). Sidekicks démarre l'agent avec `docker exec -i <conteneur> <programme> <arguments>`. Pour que le conteneur soit recréé quand il a disparu, déposez son `compose.yaml` sur **Recréer le conteneur s'il a disparu** et choisissez le service, ou tapez les commandes : voir [Redémarrer ou recréer le conteneur](lancer-un-agent-dans-docker.md#redémarrer-ou-recréer-le-conteneur). |
| 20 | -- **Dans une sandbox sbx** : indiquez le **Nom de la sandbox**. Elle doit exister, avec le dossier de l'agent au même chemin : voir [Lancer un agent dans une sandbox sbx](lancer-un-agent-dans-une-sandbox.md). Sidekicks démarre l'agent avec `sbx exec -i <sandbox> <programme> <arguments>`. Pour que la sandbox soit recréée quand elle a disparu, déposez son `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu**, ou tapez les commandes : voir [Recréer la sandbox quand elle a disparu](lancer-un-agent-dans-une-sandbox.md#recréer-la-sandbox-quand-elle-a-disparu). Le fichier choisit aussi le programme d'après sa ligne `agent:` (`mm` pour un kit mini-me, Claude, Codex ou Gemini). | |
| 20 | +- **Dans une sandbox sbx** : indiquez le **Nom de la sandbox**. Elle doit exister, avec le dossier de l'agent au même chemin : voir [Lancer un agent dans une sandbox sbx](lancer-un-agent-dans-une-sandbox.md). Sidekicks démarre l'agent avec `sbx exec -i <sandbox> <programme> <arguments>`. Pour que la sandbox soit recréée quand elle a disparu, déposez son `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu**, ou tapez les commandes : voir [Recréer la sandbox quand elle a disparu](lancer-un-agent-dans-une-sandbox.md#recréer-la-sandbox-quand-elle-a-disparu). Le fichier choisit aussi le programme d'après sa ligne `agent:` (`mm` pour un kit mini-me, `docker-agent` pour `agent: docker-agent`, Claude, Codex ou Gemini). | |
| 21 | 21 | - **Claude dans une sandbox sbx** : choisissez **Dans une sandbox sbx**, déposez le `sbxenv.yaml` de la sandbox (la sandbox, le dossier et les commandes sont remplis, et le programme `claude-agent-acp` est choisi d'après son `agent: claude`), sans argument. Cela repose sur le kit `docker.io/sbx/claude-acp`, fourni par un tiers et non par Sidekicks. Voir [Ajouter un agent Claude dans une sandbox sbx](ajouter-un-agent-claude-dans-une-sandbox.md). |
| 22 | 22 | - **Codex ou Gemini dans une sandbox sbx** : de même, avec le programme `codex-acp` (kit `docker.io/sbx/codex-acp`) ou `gemini` avec l'argument `--acp` (kit `docker.io/sbx/gemini-kit`). Voir [Ajouter un agent Codex dans une sandbox sbx](ajouter-un-agent-codex-dans-une-sandbox.md) et [Ajouter un agent Gemini dans une sandbox sbx](ajouter-un-agent-gemini-dans-une-sandbox.md). |
| 23 | 23 | - **Les options que l'assistant ne demande pas** (`env`, `afterStop`, un autre `workspacePath`) : ajoutez l'agent avec l'assistant, puis complétez son entrée dans **Settings**. |
| @@ -17,7 +17,7 @@ Quand l'agent ne peut pas être ajouté (un nom déjà pris, par exemple), l'ass | |||
| 17 | - **Sur cet ordinateur, depuis le fichier de configuration de l'agent** : choisissez le programme, puis déposez le fichier YAML de l'agent sur **Le fichier de configuration de l'agent** (ou cliquez sur **Choisir un fichier…**). Le dossier de l'agent devient celui du fichier ; pour `mm`, `docker-agent` et `docker agent`, les arguments sont remplis (`--acp --config <fichier>`, `serve acp <fichier>`). Pour un autre programme, tapez les arguments. Changer de programme ensuite les remplit de nouveau. Chaque champ reste modifiable. Cela fonctionne aussi **dans une sandbox sbx** ou **dans un conteneur Docker**, si le fichier est dans un dossier que la sandbox partage, ou que le conteneur monte, au même chemin (il y est lu). | 17 | - **Sur cet ordinateur, depuis le fichier de configuration de l'agent** : choisissez le programme, puis déposez le fichier YAML de l'agent sur **Le fichier de configuration de l'agent** (ou cliquez sur **Choisir un fichier…**). Le dossier de l'agent devient celui du fichier ; pour `mm`, `docker-agent` et `docker agent`, les arguments sont remplis (`--acp --config <fichier>`, `serve acp <fichier>`). Pour un autre programme, tapez les arguments. Changer de programme ensuite les remplit de nouveau. Chaque champ reste modifiable. Cela fonctionne aussi **dans une sandbox sbx** ou **dans un conteneur Docker**, si le fichier est dans un dossier que la sandbox partage, ou que le conteneur monte, au même chemin (il y est lu). |
| 18 | - **Sur cet ordinateur** : le programme tourne ici, dans le dossier de l'agent. Si Sidekicks, ouvert depuis le Finder, ne trouve pas le programme, indiquez son chemin complet (`which mm` dans un terminal le donne). Sidekicks lit le `PATH` de votre shell au démarrage : c'est rarement nécessaire. | 18 | - **Sur cet ordinateur** : le programme tourne ici, dans le dossier de l'agent. Si Sidekicks, ouvert depuis le Finder, ne trouve pas le programme, indiquez son chemin complet (`which mm` dans un terminal le donne). Sidekicks lit le `PATH` de votre shell au démarrage : c'est rarement nécessaire. |
| 19 | - **Dans un conteneur Docker** : indiquez le **Nom du conteneur**. Le conteneur doit exister (Sidekicks le démarre s'il est arrêté), avec le dossier de l'agent monté au même chemin, et contenir le programme : voir [Lancer un agent dans un conteneur Docker](lancer-un-agent-dans-docker.md). Sidekicks démarre l'agent avec `docker exec -i <conteneur> <programme> <arguments>`. Pour que le conteneur soit recréé quand il a disparu, déposez son `compose.yaml` sur **Recréer le conteneur s'il a disparu** et choisissez le service, ou tapez les commandes : voir [Redémarrer ou recréer le conteneur](lancer-un-agent-dans-docker.md#redémarrer-ou-recréer-le-conteneur). | 19 | - **Dans un conteneur Docker** : indiquez le **Nom du conteneur**. Le conteneur doit exister (Sidekicks le démarre s'il est arrêté), avec le dossier de l'agent monté au même chemin, et contenir le programme : voir [Lancer un agent dans un conteneur Docker](lancer-un-agent-dans-docker.md). Sidekicks démarre l'agent avec `docker exec -i <conteneur> <programme> <arguments>`. Pour que le conteneur soit recréé quand il a disparu, déposez son `compose.yaml` sur **Recréer le conteneur s'il a disparu** et choisissez le service, ou tapez les commandes : voir [Redémarrer ou recréer le conteneur](lancer-un-agent-dans-docker.md#redémarrer-ou-recréer-le-conteneur). |
| 20 | -- **Dans une sandbox sbx** : indiquez le **Nom de la sandbox**. Elle doit exister, avec le dossier de l'agent au même chemin : voir [Lancer un agent dans une sandbox sbx](lancer-un-agent-dans-une-sandbox.md). Sidekicks démarre l'agent avec `sbx exec -i <sandbox> <programme> <arguments>`. Pour que la sandbox soit recréée quand elle a disparu, déposez son `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu**, ou tapez les commandes : voir [Recréer la sandbox quand elle a disparu](lancer-un-agent-dans-une-sandbox.md#recréer-la-sandbox-quand-elle-a-disparu). Le fichier choisit aussi le programme d'après sa ligne `agent:` (`mm` pour un kit mini-me, Claude, Codex ou Gemini). | 20 | +- **Dans une sandbox sbx** : indiquez le **Nom de la sandbox**. Elle doit exister, avec le dossier de l'agent au même chemin : voir [Lancer un agent dans une sandbox sbx](lancer-un-agent-dans-une-sandbox.md). Sidekicks démarre l'agent avec `sbx exec -i <sandbox> <programme> <arguments>`. Pour que la sandbox soit recréée quand elle a disparu, déposez son `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu**, ou tapez les commandes : voir [Recréer la sandbox quand elle a disparu](lancer-un-agent-dans-une-sandbox.md#recréer-la-sandbox-quand-elle-a-disparu). Le fichier choisit aussi le programme d'après sa ligne `agent:` (`mm` pour un kit mini-me, `docker-agent` pour `agent: docker-agent`, Claude, Codex ou Gemini). |
| 21 | - **Claude dans une sandbox sbx** : choisissez **Dans une sandbox sbx**, déposez le `sbxenv.yaml` de la sandbox (la sandbox, le dossier et les commandes sont remplis, et le programme `claude-agent-acp` est choisi d'après son `agent: claude`), sans argument. Cela repose sur le kit `docker.io/sbx/claude-acp`, fourni par un tiers et non par Sidekicks. Voir [Ajouter un agent Claude dans une sandbox sbx](ajouter-un-agent-claude-dans-une-sandbox.md). | 21 | - **Claude dans une sandbox sbx** : choisissez **Dans une sandbox sbx**, déposez le `sbxenv.yaml` de la sandbox (la sandbox, le dossier et les commandes sont remplis, et le programme `claude-agent-acp` est choisi d'après son `agent: claude`), sans argument. Cela repose sur le kit `docker.io/sbx/claude-acp`, fourni par un tiers et non par Sidekicks. Voir [Ajouter un agent Claude dans une sandbox sbx](ajouter-un-agent-claude-dans-une-sandbox.md). |
| 22 | - **Codex ou Gemini dans une sandbox sbx** : de même, avec le programme `codex-acp` (kit `docker.io/sbx/codex-acp`) ou `gemini` avec l'argument `--acp` (kit `docker.io/sbx/gemini-kit`). Voir [Ajouter un agent Codex dans une sandbox sbx](ajouter-un-agent-codex-dans-une-sandbox.md) et [Ajouter un agent Gemini dans une sandbox sbx](ajouter-un-agent-gemini-dans-une-sandbox.md). | 22 | - **Codex ou Gemini dans une sandbox sbx** : de même, avec le programme `codex-acp` (kit `docker.io/sbx/codex-acp`) ou `gemini` avec l'argument `--acp` (kit `docker.io/sbx/gemini-kit`). Voir [Ajouter un agent Codex dans une sandbox sbx](ajouter-un-agent-codex-dans-une-sandbox.md) et [Ajouter un agent Gemini dans une sandbox sbx](ajouter-un-agent-gemini-dans-une-sandbox.md). |
| 23 | - **Les options que l'assistant ne demande pas** (`env`, `afterStop`, un autre `workspacePath`) : ajoutez l'agent avec l'assistant, puis complétez son entrée dans **Settings**. | 23 | - **Les options que l'assistant ne demande pas** (`env`, `afterStop`, un autre `workspacePath`) : ajoutez l'agent avec l'assistant, puis complétez son entrée dans **Settings**. |
modified
docs/fr/how-to/lancer-un-agent-dans-une-sandbox.md +1 -1 | @@ -41,7 +41,7 @@ Ce guide montre comment déclarer un agent qui tourne dans une sandbox Docker (` | ||
| 41 | 41 | |
| 42 | 42 | Quand la sandbox est supprimée (par vous, par `sbx rm`, après une remise à zéro de sbx), l'agent ne peut plus démarrer. Donnez à Sidekicks les commandes qui gèrent la sandbox : il la recrée avant de démarrer l'agent. |
| 43 | 43 | |
| 44 | -1. Avec l'assistant : choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` de la sandbox sur la zone **Recréer la sandbox si elle a disparu** (ou cliquez sur **Choisir un sbxenv.yaml…**). Le nom de la sandbox, le dossier et les commandes `sbx env` sont remplis ; modifiez-les au besoin. Le programme suit la ligne `agent:` du fichier : `mm` avec `--acp` pour un kit mini-me (`agent: mini-me-kit` ; déposez ensuite le fichier de configuration de l'agent pour ajouter `--config`), `claude-agent-acp`, `codex-acp` ou `gemini --acp` pour `claude`, `codex` ou `gemini`. Un programme tapé à la main est gardé. | |
| 44 | +1. Avec l'assistant : choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` de la sandbox sur la zone **Recréer la sandbox si elle a disparu** (ou cliquez sur **Choisir un sbxenv.yaml…**). Le nom de la sandbox, le dossier et les commandes `sbx env` sont remplis ; modifiez-les au besoin. Le programme suit la ligne `agent:` du fichier : `mm` avec `--acp` pour un kit mini-me (`agent: mini-me-kit` ; déposez ensuite le fichier de configuration de l'agent pour ajouter `--config`), `docker-agent` avec `serve acp` pour `agent: docker-agent` (déposez ensuite son fichier d'agent aussi), `claude-agent-acp`, `codex-acp` ou `gemini --acp` pour `claude`, `codex` ou `gemini`. Un programme tapé à la main est gardé. Exemples prêts à l'emploi : [`agents/snippets/mini-me-acp`](../../../agents/snippets/mini-me-acp/README.md) et [`agents/snippets/docker-agent-acp`](../../../agents/snippets/docker-agent-acp/README.md) (un dossier chacun, avec son `sbxenv.yaml` et le fichier de l'agent dans `workspace/`). | |
| 45 | 45 | 2. Ou dans **Settings**, ajoutez `lifecycle` au runtime : |
| 46 | 46 | |
| 47 | 47 | ```yaml |
| @@ -41,7 +41,7 @@ Ce guide montre comment déclarer un agent qui tourne dans une sandbox Docker (` | |||
| 41 | 41 | ||
| 42 | Quand la sandbox est supprimée (par vous, par `sbx rm`, après une remise à zéro de sbx), l'agent ne peut plus démarrer. Donnez à Sidekicks les commandes qui gèrent la sandbox : il la recrée avant de démarrer l'agent. | 42 | Quand la sandbox est supprimée (par vous, par `sbx rm`, après une remise à zéro de sbx), l'agent ne peut plus démarrer. Donnez à Sidekicks les commandes qui gèrent la sandbox : il la recrée avant de démarrer l'agent. |
| 43 | 43 | ||
| 44 | -1. Avec l'assistant : choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` de la sandbox sur la zone **Recréer la sandbox si elle a disparu** (ou cliquez sur **Choisir un sbxenv.yaml…**). Le nom de la sandbox, le dossier et les commandes `sbx env` sont remplis ; modifiez-les au besoin. Le programme suit la ligne `agent:` du fichier : `mm` avec `--acp` pour un kit mini-me (`agent: mini-me-kit` ; déposez ensuite le fichier de configuration de l'agent pour ajouter `--config`), `claude-agent-acp`, `codex-acp` ou `gemini --acp` pour `claude`, `codex` ou `gemini`. Un programme tapé à la main est gardé. | 44 | +1. Avec l'assistant : choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` de la sandbox sur la zone **Recréer la sandbox si elle a disparu** (ou cliquez sur **Choisir un sbxenv.yaml…**). Le nom de la sandbox, le dossier et les commandes `sbx env` sont remplis ; modifiez-les au besoin. Le programme suit la ligne `agent:` du fichier : `mm` avec `--acp` pour un kit mini-me (`agent: mini-me-kit` ; déposez ensuite le fichier de configuration de l'agent pour ajouter `--config`), `docker-agent` avec `serve acp` pour `agent: docker-agent` (déposez ensuite son fichier d'agent aussi), `claude-agent-acp`, `codex-acp` ou `gemini --acp` pour `claude`, `codex` ou `gemini`. Un programme tapé à la main est gardé. Exemples prêts à l'emploi : [`agents/snippets/mini-me-acp`](../../../agents/snippets/mini-me-acp/README.md) et [`agents/snippets/docker-agent-acp`](../../../agents/snippets/docker-agent-acp/README.md) (un dossier chacun, avec son `sbxenv.yaml` et le fichier de l'agent dans `workspace/`). |
| 45 | 2. Ou dans **Settings**, ajoutez `lifecycle` au runtime : | 45 | 2. Ou dans **Settings**, ajoutez `lifecycle` au runtime : |
| 46 | 46 | ||
| 47 | ```yaml | 47 | ```yaml |
modified
frontend/src/lib/agentform.test.ts +15 -0 | @@ -181,3 +181,18 @@ describe('mini-me in a sandbox', () => { | ||
| 181 | 181 | expect(sbxAgentOf({ ...emptyForm(), environment: 'sbx', program: 'mm' })).toBeUndefined() |
| 182 | 182 | }) |
| 183 | 183 | }) |
| 184 | + | |
| 185 | +describe('Docker Agent in a sandbox (issue #87)', () => { | |
| 186 | + it('chooses docker-agent for the sbx agent docker-agent, or cagent', () => { | |
| 187 | + expect(programOfSandbox('docker-agent')).toEqual({ program: 'docker-agent', arguments: 'serve acp' }) | |
| 188 | + expect(programOfSandbox('cagent')).toEqual({ program: 'docker-agent', arguments: 'serve acp' }) | |
| 189 | + }) | |
| 190 | + it('replaces "docker agent" of the list, and keeps docker-agent with its file', () => { | |
| 191 | + expect(withSbxProgram({ ...emptyForm(), program: 'docker agent', arguments: 'serve acp a.yaml' }, 'docker-agent')).toMatchObject({ program: 'docker-agent', arguments: 'serve acp' }) | |
| 192 | + const form = { ...emptyForm(), program: 'docker-agent', arguments: 'serve acp /a/agent.yaml' } | |
| 193 | + expect(withSbxProgram(form, 'docker-agent')).toBe(form) | |
| 194 | + }) | |
| 195 | + it('then takes its configuration file', () => { | |
| 196 | + expect(argumentsFor('docker-agent', '/a/agent.yaml')).toBe('serve acp /a/agent.yaml') | |
| 197 | + }) | |
| 198 | +}) | |
| @@ -181,3 +181,18 @@ describe('mini-me in a sandbox', () => { | |||
| 181 | expect(sbxAgentOf({ ...emptyForm(), environment: 'sbx', program: 'mm' })).toBeUndefined() | 181 | expect(sbxAgentOf({ ...emptyForm(), environment: 'sbx', program: 'mm' })).toBeUndefined() |
| 182 | }) | 182 | }) |
| 183 | }) | 183 | }) |
| 184 | + | ||
| 185 | +describe('Docker Agent in a sandbox (issue #87)', () => { | ||
| 186 | + it('chooses docker-agent for the sbx agent docker-agent, or cagent', () => { | ||
| 187 | + expect(programOfSandbox('docker-agent')).toEqual({ program: 'docker-agent', arguments: 'serve acp' }) | ||
| 188 | + expect(programOfSandbox('cagent')).toEqual({ program: 'docker-agent', arguments: 'serve acp' }) | ||
| 189 | + }) | ||
| 190 | + it('replaces "docker agent" of the list, and keeps docker-agent with its file', () => { | ||
| 191 | + expect(withSbxProgram({ ...emptyForm(), program: 'docker agent', arguments: 'serve acp a.yaml' }, 'docker-agent')).toMatchObject({ program: 'docker-agent', arguments: 'serve acp' }) | ||
| 192 | + const form = { ...emptyForm(), program: 'docker-agent', arguments: 'serve acp /a/agent.yaml' } | ||
| 193 | + expect(withSbxProgram(form, 'docker-agent')).toBe(form) | ||
| 194 | + }) | ||
| 195 | + it('then takes its configuration file', () => { | ||
| 196 | + expect(argumentsFor('docker-agent', '/a/agent.yaml')).toBe('serve acp /a/agent.yaml') | ||
| 197 | + }) | ||
| 198 | +}) | ||
modified
frontend/src/lib/agentform.ts +7 -3 | @@ -151,18 +151,22 @@ export function programsFor(environment: Environment): string[] { | ||
| 151 | 151 | |
| 152 | 152 | /** |
| 153 | 153 | * The program and arguments of the agent a sandbox file names ("agent:"): |
| 154 | - * Claude, Codex or Gemini (sbxPrograms), or mini-me (mm, from a kit such | |
| 155 | - * as docker.io/k33g/mini-me-kit, whose sbx agent is named after the kit). | |
| 156 | - * mm also needs its configuration file: dropping it adds --config. | |
| 154 | + * Claude, Codex or Gemini (sbxPrograms), mini-me (mm, from a kit such as | |
| 155 | + * docker.io/k33g/mini-me-kit, whose sbx agent is named after the kit), or | |
| 156 | + * Docker Agent (docker-agent, an sbx agent of its own, also called cagent). | |
| 157 | + * mm and docker-agent also need their configuration file: dropping it | |
| 158 | + * adds it to the arguments (argumentsFor). | |
| 157 | 159 | * |
| 158 | 160 | * @example |
| 159 | 161 | * programOfSandbox('gemini') // { program: 'gemini', arguments: '--acp' } |
| 160 | 162 | * programOfSandbox('mini-me-kit') // { program: 'mm', arguments: '--acp' } |
| 163 | + * programOfSandbox('docker-agent') // { program: 'docker-agent', arguments: 'serve acp' } | |
| 161 | 164 | */ |
| 162 | 165 | export function programOfSandbox(agent: string | undefined): { program: string; arguments: string } | undefined { |
| 163 | 166 | const known = (agent ?? '').trim() |
| 164 | 167 | if (Object.hasOwn(sbxPrograms, known)) return { program: sbxPrograms[known as SbxAgent], arguments: sbxArguments[known as SbxAgent] } |
| 165 | 168 | if (/^mini-?me\b/.test(known)) return { program: 'mm', arguments: '--acp' } |
| 169 | + if (known === 'docker-agent' || known === 'cagent') return { program: 'docker-agent', arguments: 'serve acp' } | |
| 166 | 170 | return undefined |
| 167 | 171 | } |
| 168 | 172 | |
| @@ -151,18 +151,22 @@ export function programsFor(environment: Environment): string[] { | |||
| 151 | 151 | ||
| 152 | /** | 152 | /** |
| 153 | * The program and arguments of the agent a sandbox file names ("agent:"): | 153 | * The program and arguments of the agent a sandbox file names ("agent:"): |
| 154 | - * Claude, Codex or Gemini (sbxPrograms), or mini-me (mm, from a kit such | 154 | + * Claude, Codex or Gemini (sbxPrograms), mini-me (mm, from a kit such as |
| 155 | - * as docker.io/k33g/mini-me-kit, whose sbx agent is named after the kit). | 155 | + * docker.io/k33g/mini-me-kit, whose sbx agent is named after the kit), or |
| 156 | - * mm also needs its configuration file: dropping it adds --config. | 156 | + * Docker Agent (docker-agent, an sbx agent of its own, also called cagent). |
| 157 | + * mm and docker-agent also need their configuration file: dropping it | ||
| 158 | + * adds it to the arguments (argumentsFor). | ||
| 157 | * | 159 | * |
| 158 | * @example | 160 | * @example |
| 159 | * programOfSandbox('gemini') // { program: 'gemini', arguments: '--acp' } | 161 | * programOfSandbox('gemini') // { program: 'gemini', arguments: '--acp' } |
| 160 | * programOfSandbox('mini-me-kit') // { program: 'mm', arguments: '--acp' } | 162 | * programOfSandbox('mini-me-kit') // { program: 'mm', arguments: '--acp' } |
| 163 | + * programOfSandbox('docker-agent') // { program: 'docker-agent', arguments: 'serve acp' } | ||
| 161 | */ | 164 | */ |
| 162 | export function programOfSandbox(agent: string | undefined): { program: string; arguments: string } | undefined { | 165 | export function programOfSandbox(agent: string | undefined): { program: string; arguments: string } | undefined { |
| 163 | const known = (agent ?? '').trim() | 166 | const known = (agent ?? '').trim() |
| 164 | if (Object.hasOwn(sbxPrograms, known)) return { program: sbxPrograms[known as SbxAgent], arguments: sbxArguments[known as SbxAgent] } | 167 | if (Object.hasOwn(sbxPrograms, known)) return { program: sbxPrograms[known as SbxAgent], arguments: sbxArguments[known as SbxAgent] } |
| 165 | if (/^mini-?me\b/.test(known)) return { program: 'mm', arguments: '--acp' } | 168 | if (/^mini-?me\b/.test(known)) return { program: 'mm', arguments: '--acp' } |
| 169 | + if (known === 'docker-agent' || known === 'cagent') return { program: 'docker-agent', arguments: 'serve acp' } | ||
| 166 | return undefined | 170 | return undefined |
| 167 | } | 171 | } |
| 168 | 172 | ||