#81 #82 #84 Assistant : le programme suit l'agent du sbxenv.yaml (claude, codex, gemini) ; ticket #86 (Mistral Vibe en sbx)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5259800 parent: fe37b10 modified
.memory/history.md +1 -0 | @@ -226,3 +226,4 @@ | ||
| 226 | 226 | - **2026-11-10 — #82 fix**: Claude and Gemini work on the Mac; Codex failed (`cannot mix v3 kits with v1/v2 kits`: sbx's `codex` agent is now the v3 kit docker.io/sbx/codex). Kit changed to the v3 `docker.io/sbx/codex-acp:latest` everywhere (snippet, note, guides); the error is documented in the Codex guide. |
| 227 | 227 | - **2026-11-10 — #82 wrong sandbox**: the Codex entry made by the assistant pointed at claude-acp (Claude's sbxenv.yaml was read; no code path keeps old values, the form restarts empty each time — cause on the Mac not established: dropped/chosen file?). Guard: `SbxEnv.Agent`/`SandboxEnv.agent`, `sandboxMismatch` blocks adding Claude/Codex/Gemini with another agent's sbxenv.yaml. |
| 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 | +- **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). | |
| @@ -226,3 +226,4 @@ | |||
| 226 | - **2026-11-10 — #82 fix**: Claude and Gemini work on the Mac; Codex failed (`cannot mix v3 kits with v1/v2 kits`: sbx's `codex` agent is now the v3 kit docker.io/sbx/codex). Kit changed to the v3 `docker.io/sbx/codex-acp:latest` everywhere (snippet, note, guides); the error is documented in the Codex guide. | 226 | - **2026-11-10 — #82 fix**: Claude and Gemini work on the Mac; Codex failed (`cannot mix v3 kits with v1/v2 kits`: sbx's `codex` agent is now the v3 kit docker.io/sbx/codex). Kit changed to the v3 `docker.io/sbx/codex-acp:latest` everywhere (snippet, note, guides); the error is documented in the Codex guide. |
| 227 | - **2026-11-10 — #82 wrong sandbox**: the Codex entry made by the assistant pointed at claude-acp (Claude's sbxenv.yaml was read; no code path keeps old values, the form restarts empty each time — cause on the Mac not established: dropped/chosen file?). Guard: `SbxEnv.Agent`/`SandboxEnv.agent`, `sandboxMismatch` blocks adding Claude/Codex/Gemini with another agent's sbxenv.yaml. | 227 | - **2026-11-10 — #82 wrong sandbox**: the Codex entry made by the assistant pointed at claude-acp (Claude's sbxenv.yaml was read; no code path keeps old values, the form restarts empty each time — cause on the Mac not established: dropped/chosen file?). Guard: `SbxEnv.Agent`/`SandboxEnv.agent`, `sandboxMismatch` blocks adding Claude/Codex/Gemini with another agent's sbxenv.yaml. |
| 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). | ||
modified
.tickets/issues/0081-simplifier-l-ajout-d-une-sbx-avec-claude-acp.yaml +11 -1 | @@ -6,7 +6,7 @@ author: | ||
| 6 | 6 | name: k33g |
| 7 | 7 | email: ph.charriere@gmail.com |
| 8 | 8 | createdAt: 2026-11-09T06:11:54.000Z |
| 9 | -updatedAt: 2026-11-10T04:26:00.000Z | |
| 9 | +updatedAt: 2026-11-10T05:31:48.000Z | |
| 10 | 10 | labels: |
| 11 | 11 | - kind::feature |
| 12 | 12 | - area::config |
| @@ -132,3 +132,13 @@ comments: | ||
| 132 | 132 | - Guide #83 (EN + FR) : la voie « assistant » part d'une copie de [agents/snippets/claude-acp](agents/snippets/claude-acp/README.md) ; |
| 133 | 133 | « Ajouter un agent » et la référence mis à jour. |
| 134 | 134 | - Vérifié dans l'application : `sbxenv.yaml` de l'exemple choisi + `claude-agent-acp` → l'entrée du README de l'exemple. |
| 135 | + - id: 3 | |
| 136 | + author: | |
| 137 | + name: k33g | |
| 138 | + email: ph.charriere@gmail.com | |
| 139 | + createdAt: 2026-11-10T05:31:48.000Z | |
| 140 | + body: | | |
| 141 | + Le programme suit maintenant le `sbxenv.yaml` : déposé ou choisi dans l'assistant, son `agent:` (`claude`, `codex` ou `gemini`) | |
| 142 | + choisit le programme (`claude-agent-acp`, `codex-acp`, `gemini` + `--acp`) quand le champ est vide ou contient un programme de la liste ; | |
| 143 | + un programme tapé à la main est gardé (`withSbxProgram` dans [agentform.ts](frontend/src/lib/agentform.ts)). Et l'assistant refuse un `sbxenv.yaml` | |
| 144 | + dont l'`agent:` n'est pas celui du programme (`sandboxMismatch`). Guides EN + FR mis à jour. | |
| @@ -6,7 +6,7 @@ author: | |||
| 6 | name: k33g | 6 | name: k33g |
| 7 | email: ph.charriere@gmail.com | 7 | email: ph.charriere@gmail.com |
| 8 | createdAt: 2026-11-09T06:11:54.000Z | 8 | createdAt: 2026-11-09T06:11:54.000Z |
| 9 | -updatedAt: 2026-11-10T04:26:00.000Z | 9 | +updatedAt: 2026-11-10T05:31:48.000Z |
| 10 | labels: | 10 | labels: |
| 11 | - kind::feature | 11 | - kind::feature |
| 12 | - area::config | 12 | - area::config |
| @@ -132,3 +132,13 @@ comments: | |||
| 132 | - Guide #83 (EN + FR) : la voie « assistant » part d'une copie de [agents/snippets/claude-acp](agents/snippets/claude-acp/README.md) ; | 132 | - Guide #83 (EN + FR) : la voie « assistant » part d'une copie de [agents/snippets/claude-acp](agents/snippets/claude-acp/README.md) ; |
| 133 | « Ajouter un agent » et la référence mis à jour. | 133 | « Ajouter un agent » et la référence mis à jour. |
| 134 | - Vérifié dans l'application : `sbxenv.yaml` de l'exemple choisi + `claude-agent-acp` → l'entrée du README de l'exemple. | 134 | - Vérifié dans l'application : `sbxenv.yaml` de l'exemple choisi + `claude-agent-acp` → l'entrée du README de l'exemple. |
| 135 | + - id: 3 | ||
| 136 | + author: | ||
| 137 | + name: k33g | ||
| 138 | + email: ph.charriere@gmail.com | ||
| 139 | + createdAt: 2026-11-10T05:31:48.000Z | ||
| 140 | + body: | | ||
| 141 | + Le programme suit maintenant le `sbxenv.yaml` : déposé ou choisi dans l'assistant, son `agent:` (`claude`, `codex` ou `gemini`) | ||
| 142 | + choisit le programme (`claude-agent-acp`, `codex-acp`, `gemini` + `--acp`) quand le champ est vide ou contient un programme de la liste ; | ||
| 143 | + un programme tapé à la main est gardé (`withSbxProgram` dans [agentform.ts](frontend/src/lib/agentform.ts)). Et l'assistant refuse un `sbxenv.yaml` | ||
| 144 | + dont l'`agent:` n'est pas celui du programme (`sandboxMismatch`). Guides EN + FR mis à jour. | ||
modified
.tickets/issues/0082-simplifier-l-ajout-d-une-sbx-avec-codex-acp.yaml +11 -1 | @@ -6,7 +6,7 @@ author: | ||
| 6 | 6 | name: k33g |
| 7 | 7 | email: ph.charriere@gmail.com |
| 8 | 8 | createdAt: 2026-11-09T06:11:54.000Z |
| 9 | -updatedAt: 2026-11-10T05:27:33.000Z | |
| 9 | +updatedAt: 2026-11-10T05:31:48.000Z | |
| 10 | 10 | labels: |
| 11 | 11 | - kind::feature |
| 12 | 12 | - area::config |
| @@ -123,3 +123,13 @@ comments: | ||
| 123 | 123 | Vérifié sur le Mac : Codex démarre et répond avec `codex-acp` seul. Le kit v3 `docker.io/sbx/codex-acp` (image Docker Hardened Images) |
| 124 | 124 | met l'adaptateur dans le `PATH` ; `/home/agent/.local/bin/codex-acp` était le script de l'ancien kit v2. |
| 125 | 125 | L'assistant propose `codex-acp` (l'ancien chemin reste reconnu) ; exemple, guides EN + FR et « Ajouter un agent » mis à jour. |
| 126 | + - id: 5 | |
| 127 | + author: | |
| 128 | + name: k33g | |
| 129 | + email: ph.charriere@gmail.com | |
| 130 | + createdAt: 2026-11-10T05:31:48.000Z | |
| 131 | + body: | | |
| 132 | + Le programme suit maintenant le `sbxenv.yaml` : déposé ou choisi dans l'assistant, son `agent:` (`claude`, `codex` ou `gemini`) | |
| 133 | + choisit le programme (`claude-agent-acp`, `codex-acp`, `gemini` + `--acp`) quand le champ est vide ou contient un programme de la liste ; | |
| 134 | + un programme tapé à la main est gardé (`withSbxProgram` dans [agentform.ts](frontend/src/lib/agentform.ts)). Et l'assistant refuse un `sbxenv.yaml` | |
| 135 | + dont l'`agent:` n'est pas celui du programme (`sandboxMismatch`). Guides EN + FR mis à jour. | |
| @@ -6,7 +6,7 @@ author: | |||
| 6 | name: k33g | 6 | name: k33g |
| 7 | email: ph.charriere@gmail.com | 7 | email: ph.charriere@gmail.com |
| 8 | createdAt: 2026-11-09T06:11:54.000Z | 8 | createdAt: 2026-11-09T06:11:54.000Z |
| 9 | -updatedAt: 2026-11-10T05:27:33.000Z | 9 | +updatedAt: 2026-11-10T05:31:48.000Z |
| 10 | labels: | 10 | labels: |
| 11 | - kind::feature | 11 | - kind::feature |
| 12 | - area::config | 12 | - area::config |
| @@ -123,3 +123,13 @@ comments: | |||
| 123 | Vérifié sur le Mac : Codex démarre et répond avec `codex-acp` seul. Le kit v3 `docker.io/sbx/codex-acp` (image Docker Hardened Images) | 123 | Vérifié sur le Mac : Codex démarre et répond avec `codex-acp` seul. Le kit v3 `docker.io/sbx/codex-acp` (image Docker Hardened Images) |
| 124 | met l'adaptateur dans le `PATH` ; `/home/agent/.local/bin/codex-acp` était le script de l'ancien kit v2. | 124 | met l'adaptateur dans le `PATH` ; `/home/agent/.local/bin/codex-acp` était le script de l'ancien kit v2. |
| 125 | L'assistant propose `codex-acp` (l'ancien chemin reste reconnu) ; exemple, guides EN + FR et « Ajouter un agent » mis à jour. | 125 | L'assistant propose `codex-acp` (l'ancien chemin reste reconnu) ; exemple, guides EN + FR et « Ajouter un agent » mis à jour. |
| 126 | + - id: 5 | ||
| 127 | + author: | ||
| 128 | + name: k33g | ||
| 129 | + email: ph.charriere@gmail.com | ||
| 130 | + createdAt: 2026-11-10T05:31:48.000Z | ||
| 131 | + body: | | ||
| 132 | + Le programme suit maintenant le `sbxenv.yaml` : déposé ou choisi dans l'assistant, son `agent:` (`claude`, `codex` ou `gemini`) | ||
| 133 | + choisit le programme (`claude-agent-acp`, `codex-acp`, `gemini` + `--acp`) quand le champ est vide ou contient un programme de la liste ; | ||
| 134 | + un programme tapé à la main est gardé (`withSbxProgram` dans [agentform.ts](frontend/src/lib/agentform.ts)). Et l'assistant refuse un `sbxenv.yaml` | ||
| 135 | + dont l'`agent:` n'est pas celui du programme (`sandboxMismatch`). Guides EN + FR mis à jour. | ||
modified
.tickets/issues/0084-simplifier-l-ajout-d-une-sbx-avec-gemini-acp.yaml +12 -1 | @@ -6,7 +6,7 @@ author: | ||
| 6 | 6 | name: k33g |
| 7 | 7 | email: ph.charriere@gmail.com |
| 8 | 8 | createdAt: 2026-11-10T04:26:00.000Z |
| 9 | -updatedAt: 2026-11-10T04:51:02.000Z | |
| 9 | +updatedAt: 2026-11-10T05:31:48.000Z | |
| 10 | 10 | labels: |
| 11 | 11 | - kind::feature |
| 12 | 12 | - area::config |
| @@ -105,3 +105,14 @@ comments: | ||
| 105 | 105 | body: | |
| 106 | 106 | Corrigé à la demande : la liste **Programme** propose `gemini` seul ; le choisir remplit **Arguments** avec `--acp` |
| 107 | 107 | (sauf si d'autres arguments ont été tapés). `sbxArguments` dans [agentform.ts](frontend/src/lib/agentform.ts) ; guides EN + FR et README de l'exemple mis à jour. |
| 108 | + - id: 3 | |
| 109 | + author: | |
| 110 | + name: k33g | |
| 111 | + email: ph.charriere@gmail.com | |
| 112 | + createdAt: 2026-11-10T05:31:48.000Z | |
| 113 | + body: | | |
| 114 | + Le programme suit maintenant le `sbxenv.yaml` : déposé ou choisi dans l'assistant, son `agent:` (`claude`, `codex` ou `gemini`) | |
| 115 | + choisit le programme (`claude-agent-acp`, `codex-acp`, `gemini` + `--acp`) quand le champ est vide ou contient un programme de la liste ; | |
| 116 | + un programme tapé à la main est gardé (`withSbxProgram` dans [agentform.ts](frontend/src/lib/agentform.ts)). Et l'assistant refuse un `sbxenv.yaml` | |
| 117 | + dont l'`agent:` n'est pas celui du programme (`sandboxMismatch`). Guides EN + FR mis à jour. | |
| 118 | + Vérifié sur le Mac : Gemini fonctionne (`gemini` + `--acp`, kit `docker.io/sbx/gemini-kit`). | |
| @@ -6,7 +6,7 @@ author: | |||
| 6 | name: k33g | 6 | name: k33g |
| 7 | email: ph.charriere@gmail.com | 7 | email: ph.charriere@gmail.com |
| 8 | createdAt: 2026-11-10T04:26:00.000Z | 8 | createdAt: 2026-11-10T04:26:00.000Z |
| 9 | -updatedAt: 2026-11-10T04:51:02.000Z | 9 | +updatedAt: 2026-11-10T05:31:48.000Z |
| 10 | labels: | 10 | labels: |
| 11 | - kind::feature | 11 | - kind::feature |
| 12 | - area::config | 12 | - area::config |
| @@ -105,3 +105,14 @@ comments: | |||
| 105 | body: | | 105 | body: | |
| 106 | Corrigé à la demande : la liste **Programme** propose `gemini` seul ; le choisir remplit **Arguments** avec `--acp` | 106 | Corrigé à la demande : la liste **Programme** propose `gemini` seul ; le choisir remplit **Arguments** avec `--acp` |
| 107 | (sauf si d'autres arguments ont été tapés). `sbxArguments` dans [agentform.ts](frontend/src/lib/agentform.ts) ; guides EN + FR et README de l'exemple mis à jour. | 107 | (sauf si d'autres arguments ont été tapés). `sbxArguments` dans [agentform.ts](frontend/src/lib/agentform.ts) ; guides EN + FR et README de l'exemple mis à jour. |
| 108 | + - id: 3 | ||
| 109 | + author: | ||
| 110 | + name: k33g | ||
| 111 | + email: ph.charriere@gmail.com | ||
| 112 | + createdAt: 2026-11-10T05:31:48.000Z | ||
| 113 | + body: | | ||
| 114 | + Le programme suit maintenant le `sbxenv.yaml` : déposé ou choisi dans l'assistant, son `agent:` (`claude`, `codex` ou `gemini`) | ||
| 115 | + choisit le programme (`claude-agent-acp`, `codex-acp`, `gemini` + `--acp`) quand le champ est vide ou contient un programme de la liste ; | ||
| 116 | + un programme tapé à la main est gardé (`withSbxProgram` dans [agentform.ts](frontend/src/lib/agentform.ts)). Et l'assistant refuse un `sbxenv.yaml` | ||
| 117 | + dont l'`agent:` n'est pas celui du programme (`sandboxMismatch`). Guides EN + FR mis à jour. | ||
| 118 | + Vérifié sur le Mac : Gemini fonctionne (`gemini` + `--acp`, kit `docker.io/sbx/gemini-kit`). | ||
added
.tickets/issues/0086-simplifier-l-ajout-d-une-sbx-avec-mistral-vibe-acp.yaml +45 -0 | new file mode 100644 | ||
| @@ -0,0 +1,45 @@ | ||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | |
| 2 | +id: 86 | |
| 3 | +title: "Simplifier l'ajout d'une sbx avec Mistral Vibe ACP" | |
| 4 | +state: open | |
| 5 | +author: | |
| 6 | + name: k33g | |
| 7 | + email: ph.charriere@gmail.com | |
| 8 | +createdAt: 2026-11-10T05:33:49.000Z | |
| 9 | +updatedAt: 2026-11-10T05:33:49.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 **Mistral Vibe** ce qui a été fait pour Claude (#81), Codex (#82) et Gemini (#84) : ajouter en quelques clics | |
| 22 | + un agent Vibe qui tourne dans une sandbox **sbx**, depuis l'assistant **Ajouter un agent** | |
| 23 | + ([AddAgentForm.svelte](frontend/src/lib/agent/AddAgentForm.svelte), [agentform.ts](frontend/src/lib/agentform.ts)). | |
| 24 | + | |
| 25 | + ## Idée | |
| 26 | + - Un exemple `agents/snippets/vibe-acp` (`sbxenv.yaml`, README avec l'entrée de l'agent, `workspace/`). | |
| 27 | + - Ajouter Vibe à `sbxPrograms` / `sbxArguments` : le programme proposé en mode sbx, choisi automatiquement d'après | |
| 28 | + l'`agent:` du `sbxenv.yaml` déposé, une note sous le programme (kit tiers, clé, guide), le bloc « fichier de configuration » caché. | |
| 29 | + - Un guide « Ajouter un agent Vibe dans une sandbox sbx » EN + FR, sur le modèle des guides Claude, Codex et Gemini. | |
| 30 | + | |
| 31 | + ## À vérifier | |
| 32 | + - Le kit : `docker.io/sbx/vibe` (kit v3 de [sbx-kits-contrib](https://github.com/docker/sbx-kits-contrib), branche `v3`, dossier `vibe`), | |
| 33 | + et le nom de l'agent sbx à mettre dans `agent:`. | |
| 34 | + - Le programme ACP : `vibe-acp` (installé avec le paquet `mistral-vibe`), ou `vibe` avec une option ; présent dans le `PATH` de la sandbox ? | |
| 35 | + - L'authentification : clé Mistral enregistrée dans sbx (`sbx secret set mistral`, injectée pour `api.mistral.ai`), | |
| 36 | + jamais écrite dans le YAML de Sidekicks ; les `bindings` à mettre dans le `sbxenv.yaml`. | |
| 37 | + - Le kit pré-accorde l'approbation des outils : lien avec #85 (mode yolo et ACP). | |
| 38 | + - Les commandes et capacités annoncées par Vibe (slash commands, `session/load`, permissions). | |
| 39 | + | |
| 40 | + ## Critères d'acceptation | |
| 41 | + - Depuis une installation neuve, un agent Vibe en sbx est ajouté en quelques clics, démarre et répond. | |
| 42 | + - Un message clair si sbx, le kit ou la clé manque, avec quoi faire. | |
| 43 | + - Tests (formulaire, programme choisi d'après le `sbxenv.yaml`) ; textes EN + FR ; guides EN + FR. | |
| 44 | +tasks: [] | |
| 45 | +comments: [] | |
| new file mode 100644 | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | ||
| 2 | +id: 86 | ||
| 3 | +title: "Simplifier l'ajout d'une sbx avec Mistral Vibe ACP" | ||
| 4 | +state: open | ||
| 5 | +author: | ||
| 6 | + name: k33g | ||
| 7 | + email: ph.charriere@gmail.com | ||
| 8 | +createdAt: 2026-11-10T05:33:49.000Z | ||
| 9 | +updatedAt: 2026-11-10T05:33:49.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 **Mistral Vibe** ce qui a été fait pour Claude (#81), Codex (#82) et Gemini (#84) : ajouter en quelques clics | ||
| 22 | + un agent Vibe qui tourne dans une sandbox **sbx**, depuis l'assistant **Ajouter un agent** | ||
| 23 | + ([AddAgentForm.svelte](frontend/src/lib/agent/AddAgentForm.svelte), [agentform.ts](frontend/src/lib/agentform.ts)). | ||
| 24 | + | ||
| 25 | + ## Idée | ||
| 26 | + - Un exemple `agents/snippets/vibe-acp` (`sbxenv.yaml`, README avec l'entrée de l'agent, `workspace/`). | ||
| 27 | + - Ajouter Vibe à `sbxPrograms` / `sbxArguments` : le programme proposé en mode sbx, choisi automatiquement d'après | ||
| 28 | + l'`agent:` du `sbxenv.yaml` déposé, une note sous le programme (kit tiers, clé, guide), le bloc « fichier de configuration » caché. | ||
| 29 | + - Un guide « Ajouter un agent Vibe dans une sandbox sbx » EN + FR, sur le modèle des guides Claude, Codex et Gemini. | ||
| 30 | + | ||
| 31 | + ## À vérifier | ||
| 32 | + - Le kit : `docker.io/sbx/vibe` (kit v3 de [sbx-kits-contrib](https://github.com/docker/sbx-kits-contrib), branche `v3`, dossier `vibe`), | ||
| 33 | + et le nom de l'agent sbx à mettre dans `agent:`. | ||
| 34 | + - Le programme ACP : `vibe-acp` (installé avec le paquet `mistral-vibe`), ou `vibe` avec une option ; présent dans le `PATH` de la sandbox ? | ||
| 35 | + - L'authentification : clé Mistral enregistrée dans sbx (`sbx secret set mistral`, injectée pour `api.mistral.ai`), | ||
| 36 | + jamais écrite dans le YAML de Sidekicks ; les `bindings` à mettre dans le `sbxenv.yaml`. | ||
| 37 | + - Le kit pré-accorde l'approbation des outils : lien avec #85 (mode yolo et ACP). | ||
| 38 | + - Les commandes et capacités annoncées par Vibe (slash commands, `session/load`, permissions). | ||
| 39 | + | ||
| 40 | + ## Critères d'acceptation | ||
| 41 | + - Depuis une installation neuve, un agent Vibe en sbx est ajouté en quelques clics, démarre et répond. | ||
| 42 | + - Un message clair si sbx, le kit ou la clé manque, avec quoi faire. | ||
| 43 | + - Tests (formulaire, programme choisi d'après le `sbxenv.yaml`) ; textes EN + FR ; guides EN + FR. | ||
| 44 | +tasks: [] | ||
| 45 | +comments: [] | ||
modified
docs/en/how-to/add-a-claude-agent-in-a-sandbox.md +1 -1 | @@ -22,7 +22,7 @@ The sandbox is built from the `docker.io/sbx/claude-acp` kit. This kit is provid | ||
| 22 | 22 | 2. **Give your Anthropic API key to sbx** (step 3 below). |
| 23 | 23 | 3. In the **Agents** panel, click **+ Add an agent**. Fill in **Name shown** (`Claude`) and, if you like, an icon (📙). |
| 24 | 24 | 4. **Where does it run?** Choose **In an sbx sandbox**, then drop the `sbxenv.yaml` on **Recreate the sandbox when it is gone (optional)** (or click **Choose an sbxenv.yaml…**). The sandbox, the agent's folder (`…/workspace`) and the `sbx env` commands are filled in from it. |
| 25 | -5. **Program**: choose `claude-agent-acp` in the list (it is offered in an sbx sandbox only). Leave **Arguments** empty. | |
| 25 | +5. **Program**: `claude-agent-acp` is chosen for you, from `agent: claude` in the `sbxenv.yaml` (otherwise choose it in the list; it is offered in an sbx sandbox only). Leave **Arguments** empty. | |
| 26 | 26 | 6. Click **Add the agent**, then start Claude (step 5 below). |
| 27 | 27 | |
| 28 | 28 | ## By hand |
| @@ -22,7 +22,7 @@ The sandbox is built from the `docker.io/sbx/claude-acp` kit. This kit is provid | |||
| 22 | 2. **Give your Anthropic API key to sbx** (step 3 below). | 22 | 2. **Give your Anthropic API key to sbx** (step 3 below). |
| 23 | 3. In the **Agents** panel, click **+ Add an agent**. Fill in **Name shown** (`Claude`) and, if you like, an icon (📙). | 23 | 3. In the **Agents** panel, click **+ Add an agent**. Fill in **Name shown** (`Claude`) and, if you like, an icon (📙). |
| 24 | 4. **Where does it run?** Choose **In an sbx sandbox**, then drop the `sbxenv.yaml` on **Recreate the sandbox when it is gone (optional)** (or click **Choose an sbxenv.yaml…**). The sandbox, the agent's folder (`…/workspace`) and the `sbx env` commands are filled in from it. | 24 | 4. **Where does it run?** Choose **In an sbx sandbox**, then drop the `sbxenv.yaml` on **Recreate the sandbox when it is gone (optional)** (or click **Choose an sbxenv.yaml…**). The sandbox, the agent's folder (`…/workspace`) and the `sbx env` commands are filled in from it. |
| 25 | -5. **Program**: choose `claude-agent-acp` in the list (it is offered in an sbx sandbox only). Leave **Arguments** empty. | 25 | +5. **Program**: `claude-agent-acp` is chosen for you, from `agent: claude` in the `sbxenv.yaml` (otherwise choose it in the list; it is offered in an sbx sandbox only). Leave **Arguments** empty. |
| 26 | 6. Click **Add the agent**, then start Claude (step 5 below). | 26 | 6. Click **Add the agent**, then start Claude (step 5 below). |
| 27 | 27 | ||
| 28 | ## By hand | 28 | ## By hand |
modified
docs/en/how-to/add-a-codex-agent-in-a-sandbox.md +1 -1 | @@ -29,7 +29,7 @@ The sandbox is built from the `docker.io/sbx/codex-acp` kit. This kit is provide | ||
| 29 | 29 | If you store them after the sandbox exists, **🗑 Remove the sandbox** in the agent's header, then start the agent again. |
| 30 | 30 | 3. In the **Agents** panel, click **+ Add an agent**. Fill in **Name shown** (`Codex`) and, if you like, an icon (📗). |
| 31 | 31 | 4. **Where does it run?** Choose **In an sbx sandbox**, then drop the `sbxenv.yaml` on **Recreate the sandbox when it is gone (optional)** (or click **Choose an sbxenv.yaml…**). The sandbox, the agent's folder (`…/workspace`) and the `sbx env` commands are filled in from it. |
| 32 | -5. **Program**: choose `codex-acp` in the list (it is offered in an sbx sandbox only). Leave **Arguments** empty. | |
| 32 | +5. **Program**: `codex-acp` is chosen for you, from `agent: codex` in the `sbxenv.yaml` (otherwise choose it in the list; it is offered in an sbx sandbox only). Leave **Arguments** empty. | |
| 33 | 33 | 6. Click **Add the agent**, then start Codex from the **Agents** panel (▶), or write to it. The first time, the **Log** tab shows `sandbox codex-acp not found: creating it`, then the kit being pulled — this can take a minute or two. |
| 34 | 34 | |
| 35 | 35 | ## By hand |
| @@ -29,7 +29,7 @@ The sandbox is built from the `docker.io/sbx/codex-acp` kit. This kit is provide | |||
| 29 | If you store them after the sandbox exists, **🗑 Remove the sandbox** in the agent's header, then start the agent again. | 29 | If you store them after the sandbox exists, **🗑 Remove the sandbox** in the agent's header, then start the agent again. |
| 30 | 3. In the **Agents** panel, click **+ Add an agent**. Fill in **Name shown** (`Codex`) and, if you like, an icon (📗). | 30 | 3. In the **Agents** panel, click **+ Add an agent**. Fill in **Name shown** (`Codex`) and, if you like, an icon (📗). |
| 31 | 4. **Where does it run?** Choose **In an sbx sandbox**, then drop the `sbxenv.yaml` on **Recreate the sandbox when it is gone (optional)** (or click **Choose an sbxenv.yaml…**). The sandbox, the agent's folder (`…/workspace`) and the `sbx env` commands are filled in from it. | 31 | 4. **Where does it run?** Choose **In an sbx sandbox**, then drop the `sbxenv.yaml` on **Recreate the sandbox when it is gone (optional)** (or click **Choose an sbxenv.yaml…**). The sandbox, the agent's folder (`…/workspace`) and the `sbx env` commands are filled in from it. |
| 32 | -5. **Program**: choose `codex-acp` in the list (it is offered in an sbx sandbox only). Leave **Arguments** empty. | 32 | +5. **Program**: `codex-acp` is chosen for you, from `agent: codex` in the `sbxenv.yaml` (otherwise choose it in the list; it is offered in an sbx sandbox only). Leave **Arguments** empty. |
| 33 | 6. Click **Add the agent**, then start Codex from the **Agents** panel (▶), or write to it. The first time, the **Log** tab shows `sandbox codex-acp not found: creating it`, then the kit being pulled — this can take a minute or two. | 33 | 6. Click **Add the agent**, then start Codex from the **Agents** panel (▶), or write to it. The first time, the **Log** tab shows `sandbox codex-acp not found: creating it`, then the kit being pulled — this can take a minute or two. |
| 34 | 34 | ||
| 35 | ## By hand | 35 | ## By hand |
modified
docs/en/how-to/add-a-gemini-agent-in-a-sandbox.md +1 -1 | @@ -28,7 +28,7 @@ The sandbox is built from the `docker.io/sbx/gemini-kit` kit. This kit is provid | ||
| 28 | 28 | The key is kept by sbx, on this computer, never in a file of the folder. |
| 29 | 29 | 3. In the **Agents** panel, click **+ Add an agent**. Fill in **Name shown** (`Gemini`) and, if you like, an icon (📘). |
| 30 | 30 | 4. **Where does it run?** Choose **In an sbx sandbox**, then drop the `sbxenv.yaml` on **Recreate the sandbox when it is gone (optional)** (or click **Choose an sbxenv.yaml…**). The sandbox, the agent's folder (`…/workspace`) and the `sbx env` commands are filled in from it. |
| 31 | -5. **Program**: choose `gemini` in the list (it is offered in an sbx sandbox only). **Arguments** is filled with `--acp`; with an older Gemini CLI, write `--experimental-acp` instead. | |
| 31 | +5. **Program**: `gemini` is chosen for you, from `agent: gemini` in the `sbxenv.yaml` (otherwise choose it in the list; it is offered in an sbx sandbox only). **Arguments** is filled with `--acp`; with an older Gemini CLI, write `--experimental-acp` instead. | |
| 32 | 32 | 6. Click **Add the agent**, then start Gemini from the **Agents** panel (▶), or write to it. The first time, the **Log** tab shows `sandbox gemini-acp not found: creating it`, then the kit being pulled — this can take a minute or two. |
| 33 | 33 | |
| 34 | 34 | ## By hand |
| @@ -28,7 +28,7 @@ The sandbox is built from the `docker.io/sbx/gemini-kit` kit. This kit is provid | |||
| 28 | The key is kept by sbx, on this computer, never in a file of the folder. | 28 | The key is kept by sbx, on this computer, never in a file of the folder. |
| 29 | 3. In the **Agents** panel, click **+ Add an agent**. Fill in **Name shown** (`Gemini`) and, if you like, an icon (📘). | 29 | 3. In the **Agents** panel, click **+ Add an agent**. Fill in **Name shown** (`Gemini`) and, if you like, an icon (📘). |
| 30 | 4. **Where does it run?** Choose **In an sbx sandbox**, then drop the `sbxenv.yaml` on **Recreate the sandbox when it is gone (optional)** (or click **Choose an sbxenv.yaml…**). The sandbox, the agent's folder (`…/workspace`) and the `sbx env` commands are filled in from it. | 30 | 4. **Where does it run?** Choose **In an sbx sandbox**, then drop the `sbxenv.yaml` on **Recreate the sandbox when it is gone (optional)** (or click **Choose an sbxenv.yaml…**). The sandbox, the agent's folder (`…/workspace`) and the `sbx env` commands are filled in from it. |
| 31 | -5. **Program**: choose `gemini` in the list (it is offered in an sbx sandbox only). **Arguments** is filled with `--acp`; with an older Gemini CLI, write `--experimental-acp` instead. | 31 | +5. **Program**: `gemini` is chosen for you, from `agent: gemini` in the `sbxenv.yaml` (otherwise choose it in the list; it is offered in an sbx sandbox only). **Arguments** is filled with `--acp`; with an older Gemini CLI, write `--experimental-acp` instead. |
| 32 | 6. Click **Add the agent**, then start Gemini from the **Agents** panel (▶), or write to it. The first time, the **Log** tab shows `sandbox gemini-acp not found: creating it`, then the kit being pulled — this can take a minute or two. | 32 | 6. Click **Add the agent**, then start Gemini from the **Agents** panel (▶), or write to it. The first time, the **Log** tab shows `sandbox gemini-acp not found: creating it`, then the kit being pulled — this can take a minute or two. |
| 33 | 33 | ||
| 34 | ## By hand | 34 | ## By hand |
modified
docs/en/how-to/add-an-agent.md +1 -1 | @@ -18,7 +18,7 @@ When the agent cannot be added (a name already used, for instance), the assistan | ||
| 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 | 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). |
| 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), then choose the program `claude-agent-acp`, 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 | 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**. |
| 24 | 24 | |
| @@ -18,7 +18,7 @@ When the agent cannot be added (a name already used, for instance), the assistan | |||
| 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). | 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). |
| 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), then choose the program `claude-agent-acp`, 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**. |
| 24 | 24 | ||
modified
docs/fr/how-to/ajouter-un-agent-claude-dans-une-sandbox.md +1 -1 | @@ -22,7 +22,7 @@ La sandbox est construite à partir du kit `docker.io/sbx/claude-acp`. Ce kit es | ||
| 22 | 22 | 2. **Donnez votre clé d'API Anthropic à sbx** (étape 3 ci-dessous). |
| 23 | 23 | 3. Dans le panneau **Agents**, cliquez sur **+ Ajouter un agent**. Remplissez **Nom affiché** (`Claude`) et, si vous voulez, une icône (📙). |
| 24 | 24 | 4. **Où tourne-t-il ?** Choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu (facultatif)** (ou cliquez sur **Choisir un sbxenv.yaml…**). La sandbox, le dossier de l'agent (`…/workspace`) et les commandes `sbx env` sont remplis à partir de lui. |
| 25 | -5. **Programme** : choisissez `claude-agent-acp` dans la liste (il n'est proposé que dans une sandbox sbx). Laissez **Arguments** vide. | |
| 25 | +5. **Programme** : `claude-agent-acp` est choisi pour vous, d'après `agent: claude` dans le `sbxenv.yaml` (sinon choisissez-le dans la liste ; il n'est proposé que dans une sandbox sbx). Laissez **Arguments** vide. | |
| 26 | 26 | 6. Cliquez sur **Ajouter l'agent**, puis démarrez Claude (étape 5 ci-dessous). |
| 27 | 27 | |
| 28 | 28 | ## À la main |
| @@ -22,7 +22,7 @@ La sandbox est construite à partir du kit `docker.io/sbx/claude-acp`. Ce kit es | |||
| 22 | 2. **Donnez votre clé d'API Anthropic à sbx** (étape 3 ci-dessous). | 22 | 2. **Donnez votre clé d'API Anthropic à sbx** (étape 3 ci-dessous). |
| 23 | 3. Dans le panneau **Agents**, cliquez sur **+ Ajouter un agent**. Remplissez **Nom affiché** (`Claude`) et, si vous voulez, une icône (📙). | 23 | 3. Dans le panneau **Agents**, cliquez sur **+ Ajouter un agent**. Remplissez **Nom affiché** (`Claude`) et, si vous voulez, une icône (📙). |
| 24 | 4. **Où tourne-t-il ?** Choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu (facultatif)** (ou cliquez sur **Choisir un sbxenv.yaml…**). La sandbox, le dossier de l'agent (`…/workspace`) et les commandes `sbx env` sont remplis à partir de lui. | 24 | 4. **Où tourne-t-il ?** Choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu (facultatif)** (ou cliquez sur **Choisir un sbxenv.yaml…**). La sandbox, le dossier de l'agent (`…/workspace`) et les commandes `sbx env` sont remplis à partir de lui. |
| 25 | -5. **Programme** : choisissez `claude-agent-acp` dans la liste (il n'est proposé que dans une sandbox sbx). Laissez **Arguments** vide. | 25 | +5. **Programme** : `claude-agent-acp` est choisi pour vous, d'après `agent: claude` dans le `sbxenv.yaml` (sinon choisissez-le dans la liste ; il n'est proposé que dans une sandbox sbx). Laissez **Arguments** vide. |
| 26 | 6. Cliquez sur **Ajouter l'agent**, puis démarrez Claude (étape 5 ci-dessous). | 26 | 6. Cliquez sur **Ajouter l'agent**, puis démarrez Claude (étape 5 ci-dessous). |
| 27 | 27 | ||
| 28 | ## À la main | 28 | ## À la main |
modified
docs/fr/how-to/ajouter-un-agent-codex-dans-une-sandbox.md +1 -1 | @@ -29,7 +29,7 @@ La sandbox est construite à partir du kit `docker.io/sbx/codex-acp`. Ce kit est | ||
| 29 | 29 | Si vous les enregistrez alors que la sandbox existe déjà, cliquez sur **🗑 Supprimer la sandbox** dans l'en-tête de l'agent, puis redémarrez l'agent. |
| 30 | 30 | 3. Dans le panneau **Agents**, cliquez sur **+ Ajouter un agent**. Remplissez **Nom affiché** (`Codex`) et, si vous voulez, une icône (📗). |
| 31 | 31 | 4. **Où tourne-t-il ?** Choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu (facultatif)** (ou cliquez sur **Choisir un sbxenv.yaml…**). La sandbox, le dossier de l'agent (`…/workspace`) et les commandes `sbx env` sont remplis à partir de lui. |
| 32 | -5. **Programme** : choisissez `codex-acp` dans la liste (il n'est proposé que dans une sandbox sbx). Laissez **Arguments** vide. | |
| 32 | +5. **Programme** : `codex-acp` est choisi pour vous, d'après `agent: codex` dans le `sbxenv.yaml` (sinon choisissez-le dans la liste ; il n'est proposé que dans une sandbox sbx). Laissez **Arguments** vide. | |
| 33 | 33 | 6. Cliquez sur **Ajouter l'agent**, puis démarrez Codex depuis le panneau **Agents** (▶), ou écrivez-lui. La première fois, l'onglet **Log** montre `sandbox codex-acp not found: creating it`, puis le téléchargement du kit — cela peut prendre une minute ou deux. |
| 34 | 34 | |
| 35 | 35 | ## À la main |
| @@ -29,7 +29,7 @@ La sandbox est construite à partir du kit `docker.io/sbx/codex-acp`. Ce kit est | |||
| 29 | Si vous les enregistrez alors que la sandbox existe déjà, cliquez sur **🗑 Supprimer la sandbox** dans l'en-tête de l'agent, puis redémarrez l'agent. | 29 | Si vous les enregistrez alors que la sandbox existe déjà, cliquez sur **🗑 Supprimer la sandbox** dans l'en-tête de l'agent, puis redémarrez l'agent. |
| 30 | 3. Dans le panneau **Agents**, cliquez sur **+ Ajouter un agent**. Remplissez **Nom affiché** (`Codex`) et, si vous voulez, une icône (📗). | 30 | 3. Dans le panneau **Agents**, cliquez sur **+ Ajouter un agent**. Remplissez **Nom affiché** (`Codex`) et, si vous voulez, une icône (📗). |
| 31 | 4. **Où tourne-t-il ?** Choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu (facultatif)** (ou cliquez sur **Choisir un sbxenv.yaml…**). La sandbox, le dossier de l'agent (`…/workspace`) et les commandes `sbx env` sont remplis à partir de lui. | 31 | 4. **Où tourne-t-il ?** Choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu (facultatif)** (ou cliquez sur **Choisir un sbxenv.yaml…**). La sandbox, le dossier de l'agent (`…/workspace`) et les commandes `sbx env` sont remplis à partir de lui. |
| 32 | -5. **Programme** : choisissez `codex-acp` dans la liste (il n'est proposé que dans une sandbox sbx). Laissez **Arguments** vide. | 32 | +5. **Programme** : `codex-acp` est choisi pour vous, d'après `agent: codex` dans le `sbxenv.yaml` (sinon choisissez-le dans la liste ; il n'est proposé que dans une sandbox sbx). Laissez **Arguments** vide. |
| 33 | 6. Cliquez sur **Ajouter l'agent**, puis démarrez Codex depuis le panneau **Agents** (▶), ou écrivez-lui. La première fois, l'onglet **Log** montre `sandbox codex-acp not found: creating it`, puis le téléchargement du kit — cela peut prendre une minute ou deux. | 33 | 6. Cliquez sur **Ajouter l'agent**, puis démarrez Codex depuis le panneau **Agents** (▶), ou écrivez-lui. La première fois, l'onglet **Log** montre `sandbox codex-acp not found: creating it`, puis le téléchargement du kit — cela peut prendre une minute ou deux. |
| 34 | 34 | ||
| 35 | ## À la main | 35 | ## À la main |
modified
docs/fr/how-to/ajouter-un-agent-gemini-dans-une-sandbox.md +1 -1 | @@ -28,7 +28,7 @@ La sandbox est construite à partir du kit `docker.io/sbx/gemini-kit`. Ce kit es | ||
| 28 | 28 | La clé est gardée par sbx, sur cet ordinateur, jamais dans un fichier du dossier. |
| 29 | 29 | 3. Dans le panneau **Agents**, cliquez sur **+ Ajouter un agent**. Remplissez **Nom affiché** (`Gemini`) et, si vous voulez, une icône (📘). |
| 30 | 30 | 4. **Où tourne-t-il ?** Choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu (facultatif)** (ou cliquez sur **Choisir un sbxenv.yaml…**). La sandbox, le dossier de l'agent (`…/workspace`) et les commandes `sbx env` sont remplis à partir de lui. |
| 31 | -5. **Programme** : choisissez `gemini` dans la liste (il n'est proposé que dans une sandbox sbx). **Arguments** est rempli avec `--acp` ; avec une ancienne version de Gemini CLI, écrivez plutôt `--experimental-acp`. | |
| 31 | +5. **Programme** : `gemini` est choisi pour vous, d'après `agent: gemini` dans le `sbxenv.yaml` (sinon choisissez-le dans la liste ; il n'est proposé que dans une sandbox sbx). **Arguments** est rempli avec `--acp` ; avec une ancienne version de Gemini CLI, écrivez plutôt `--experimental-acp`. | |
| 32 | 32 | 6. Cliquez sur **Ajouter l'agent**, puis démarrez Gemini depuis le panneau **Agents** (▶), ou écrivez-lui. La première fois, l'onglet **Log** montre `sandbox gemini-acp not found: creating it`, puis le téléchargement du kit — cela peut prendre une minute ou deux. |
| 33 | 33 | |
| 34 | 34 | ## À la main |
| @@ -28,7 +28,7 @@ La sandbox est construite à partir du kit `docker.io/sbx/gemini-kit`. Ce kit es | |||
| 28 | La clé est gardée par sbx, sur cet ordinateur, jamais dans un fichier du dossier. | 28 | La clé est gardée par sbx, sur cet ordinateur, jamais dans un fichier du dossier. |
| 29 | 3. Dans le panneau **Agents**, cliquez sur **+ Ajouter un agent**. Remplissez **Nom affiché** (`Gemini`) et, si vous voulez, une icône (📘). | 29 | 3. Dans le panneau **Agents**, cliquez sur **+ Ajouter un agent**. Remplissez **Nom affiché** (`Gemini`) et, si vous voulez, une icône (📘). |
| 30 | 4. **Où tourne-t-il ?** Choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu (facultatif)** (ou cliquez sur **Choisir un sbxenv.yaml…**). La sandbox, le dossier de l'agent (`…/workspace`) et les commandes `sbx env` sont remplis à partir de lui. | 30 | 4. **Où tourne-t-il ?** Choisissez **Dans une sandbox sbx**, puis déposez le `sbxenv.yaml` sur **Recréer la sandbox si elle a disparu (facultatif)** (ou cliquez sur **Choisir un sbxenv.yaml…**). La sandbox, le dossier de l'agent (`…/workspace`) et les commandes `sbx env` sont remplis à partir de lui. |
| 31 | -5. **Programme** : choisissez `gemini` dans la liste (il n'est proposé que dans une sandbox sbx). **Arguments** est rempli avec `--acp` ; avec une ancienne version de Gemini CLI, écrivez plutôt `--experimental-acp`. | 31 | +5. **Programme** : `gemini` est choisi pour vous, d'après `agent: gemini` dans le `sbxenv.yaml` (sinon choisissez-le dans la liste ; il n'est proposé que dans une sandbox sbx). **Arguments** est rempli avec `--acp` ; avec une ancienne version de Gemini CLI, écrivez plutôt `--experimental-acp`. |
| 32 | 6. Cliquez sur **Ajouter l'agent**, puis démarrez Gemini depuis le panneau **Agents** (▶), ou écrivez-lui. La première fois, l'onglet **Log** montre `sandbox gemini-acp not found: creating it`, puis le téléchargement du kit — cela peut prendre une minute ou deux. | 32 | 6. Cliquez sur **Ajouter l'agent**, puis démarrez Gemini depuis le panneau **Agents** (▶), ou écrivez-lui. La première fois, l'onglet **Log** montre `sandbox gemini-acp not found: creating it`, puis le téléchargement du kit — cela peut prendre une minute ou deux. |
| 33 | 33 | ||
| 34 | ## À la main | 34 | ## À la main |
modified
docs/fr/how-to/ajouter-un-agent.md +1 -1 | @@ -18,7 +18,7 @@ Quand l'agent ne peut pas être ajouté (un nom déjà pris, par exemple), l'ass | ||
| 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 | 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). |
| 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), puis choisissez le programme `claude-agent-acp`, 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 | 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**. |
| 24 | 24 | |
| @@ -18,7 +18,7 @@ Quand l'agent ne peut pas être ajouté (un nom déjà pris, par exemple), l'ass | |||
| 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). | 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). |
| 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), puis choisissez le programme `claude-agent-acp`, 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**. |
| 24 | 24 | ||
modified
frontend/src/lib/agentform.test.ts +23 -1 | @@ -1,7 +1,7 @@ | ||
| 1 | 1 | // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE |
| 2 | 2 | |
| 3 | 3 | import { describe, expect, it } from 'vitest' |
| 4 | -import { argumentsFor, emptyForm, folderOf, isClaudeSandbox, sandboxMismatch, sbxAgentOf, sbxArguments, nameFromTitle, problemsOf, programsFor, quoteArgument, withAgentConfig, withComposeService, withSandboxEnv } from './agentform' | |
| 4 | +import { argumentsFor, emptyForm, folderOf, isClaudeSandbox, sandboxMismatch, sbxAgentOf, sbxArguments, withSbxProgram, nameFromTitle, problemsOf, programsFor, quoteArgument, withAgentConfig, withComposeService, withSandboxEnv } from './agentform' | |
| 5 | 5 | |
| 6 | 6 | describe('nameFromTitle', () => { |
| 7 | 7 | it('folds accents, lowercases and joins words', () => { |
| @@ -143,3 +143,25 @@ describe('sandboxMismatch', () => { | ||
| 143 | 143 | expect(sandboxMismatch({ ...codex, program: 'mm' }, 'claude')).toBe('') |
| 144 | 144 | }) |
| 145 | 145 | }) |
| 146 | + | |
| 147 | +describe('the program follows the sandbox file (agent:)', () => { | |
| 148 | + const env = { name: 'gemini-acp', agent: 'gemini', workspace: '', sandboxFolder: '/a', createCommand: 'c', stopCommand: 's', removeCommand: 'r' } | |
| 149 | + it('chooses Claude, Codex or Gemini with their arguments', () => { | |
| 150 | + expect(withSandboxEnv(emptyForm(), env)).toMatchObject({ program: 'gemini', arguments: '--acp' }) | |
| 151 | + expect(withSandboxEnv(emptyForm(), { ...env, agent: 'codex' })).toMatchObject({ program: 'codex-acp', arguments: '' }) | |
| 152 | + expect(withSandboxEnv(emptyForm(), { ...env, agent: 'claude' })).toMatchObject({ program: 'claude-agent-acp', arguments: '' }) | |
| 153 | + }) | |
| 154 | + it('replaces a program of the list, with its arguments', () => { | |
| 155 | + const form = { ...emptyForm(), program: 'mm', arguments: '--acp --config a.yaml' } | |
| 156 | + expect(withSbxProgram(form, 'claude')).toMatchObject({ program: 'claude-agent-acp', arguments: '' }) | |
| 157 | + expect(withSbxProgram({ ...form, program: 'gemini', arguments: '--acp' }, 'codex')).toMatchObject({ program: 'codex-acp', arguments: '' }) | |
| 158 | + }) | |
| 159 | + it('keeps a program typed by hand, the same program with its arguments, and unknown agents', () => { | |
| 160 | + const typed = { ...emptyForm(), program: 'my-wrapper', arguments: '-v' } | |
| 161 | + expect(withSbxProgram(typed, 'codex')).toBe(typed) | |
| 162 | + const old = { ...emptyForm(), program: 'gemini', arguments: '--experimental-acp' } | |
| 163 | + expect(withSbxProgram(old, 'gemini')).toBe(old) | |
| 164 | + expect(withSbxProgram(emptyForm(), 'mini-me-kit')).toEqual(emptyForm()) | |
| 165 | + expect(withSbxProgram(emptyForm(), undefined)).toEqual(emptyForm()) | |
| 166 | + }) | |
| 167 | +}) | |
| @@ -1,7 +1,7 @@ | |||
| 1 | // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | 1 | // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE |
| 2 | 2 | ||
| 3 | import { describe, expect, it } from 'vitest' | 3 | import { describe, expect, it } from 'vitest' |
| 4 | -import { argumentsFor, emptyForm, folderOf, isClaudeSandbox, sandboxMismatch, sbxAgentOf, sbxArguments, nameFromTitle, problemsOf, programsFor, quoteArgument, withAgentConfig, withComposeService, withSandboxEnv } from './agentform' | 4 | +import { argumentsFor, emptyForm, folderOf, isClaudeSandbox, sandboxMismatch, sbxAgentOf, sbxArguments, withSbxProgram, nameFromTitle, problemsOf, programsFor, quoteArgument, withAgentConfig, withComposeService, withSandboxEnv } from './agentform' |
| 5 | 5 | ||
| 6 | describe('nameFromTitle', () => { | 6 | describe('nameFromTitle', () => { |
| 7 | it('folds accents, lowercases and joins words', () => { | 7 | it('folds accents, lowercases and joins words', () => { |
| @@ -143,3 +143,25 @@ describe('sandboxMismatch', () => { | |||
| 143 | expect(sandboxMismatch({ ...codex, program: 'mm' }, 'claude')).toBe('') | 143 | expect(sandboxMismatch({ ...codex, program: 'mm' }, 'claude')).toBe('') |
| 144 | }) | 144 | }) |
| 145 | }) | 145 | }) |
| 146 | + | ||
| 147 | +describe('the program follows the sandbox file (agent:)', () => { | ||
| 148 | + const env = { name: 'gemini-acp', agent: 'gemini', workspace: '', sandboxFolder: '/a', createCommand: 'c', stopCommand: 's', removeCommand: 'r' } | ||
| 149 | + it('chooses Claude, Codex or Gemini with their arguments', () => { | ||
| 150 | + expect(withSandboxEnv(emptyForm(), env)).toMatchObject({ program: 'gemini', arguments: '--acp' }) | ||
| 151 | + expect(withSandboxEnv(emptyForm(), { ...env, agent: 'codex' })).toMatchObject({ program: 'codex-acp', arguments: '' }) | ||
| 152 | + expect(withSandboxEnv(emptyForm(), { ...env, agent: 'claude' })).toMatchObject({ program: 'claude-agent-acp', arguments: '' }) | ||
| 153 | + }) | ||
| 154 | + it('replaces a program of the list, with its arguments', () => { | ||
| 155 | + const form = { ...emptyForm(), program: 'mm', arguments: '--acp --config a.yaml' } | ||
| 156 | + expect(withSbxProgram(form, 'claude')).toMatchObject({ program: 'claude-agent-acp', arguments: '' }) | ||
| 157 | + expect(withSbxProgram({ ...form, program: 'gemini', arguments: '--acp' }, 'codex')).toMatchObject({ program: 'codex-acp', arguments: '' }) | ||
| 158 | + }) | ||
| 159 | + it('keeps a program typed by hand, the same program with its arguments, and unknown agents', () => { | ||
| 160 | + const typed = { ...emptyForm(), program: 'my-wrapper', arguments: '-v' } | ||
| 161 | + expect(withSbxProgram(typed, 'codex')).toBe(typed) | ||
| 162 | + const old = { ...emptyForm(), program: 'gemini', arguments: '--experimental-acp' } | ||
| 163 | + expect(withSbxProgram(old, 'gemini')).toBe(old) | ||
| 164 | + expect(withSbxProgram(emptyForm(), 'mini-me-kit')).toEqual(emptyForm()) | ||
| 165 | + expect(withSbxProgram(emptyForm(), undefined)).toEqual(emptyForm()) | ||
| 166 | + }) | ||
| 167 | +}) | ||
modified
frontend/src/lib/agentform.ts +30 -4 | @@ -46,8 +46,9 @@ export interface SandboxEnvValues { | ||
| 46 | 46 | /** |
| 47 | 47 | * Fills the form from an sbx environment file dropped on the assistant: the |
| 48 | 48 | * sandbox's name and its commands replace what was typed (the user dropped |
| 49 | - * the file for that), the agent's folder only when it is still empty. Every | |
| 50 | - * field stays editable. | |
| 49 | + * the file for that), the agent's folder only when it is still empty. A | |
| 50 | + * sandbox for Claude, Codex or Gemini ("agent:") also chooses their program | |
| 51 | + * (withSbxProgram). Every field stays editable. | |
| 51 | 52 | * |
| 52 | 53 | * @example |
| 53 | 54 | * withSandboxEnv(emptyForm(), { name: 'milo-sbx', createCommand: 'sbx env create --force', … }) |
| @@ -55,7 +56,7 @@ export interface SandboxEnvValues { | ||
| 55 | 56 | */ |
| 56 | 57 | export function withSandboxEnv(form: AgentFormValues, env: SandboxEnvValues): AgentFormValues { |
| 57 | 58 | return { |
| 58 | - ...form, | |
| 59 | + ...withSbxProgram(form, env.agent), | |
| 59 | 60 | environment: 'sbx', |
| 60 | 61 | box: env.name || form.box, |
| 61 | 62 | workspace: form.workspace.trim() ? form.workspace : env.workspace, |
| @@ -128,6 +129,9 @@ export const sbxPrograms: Record<SbxAgent, string> = { | ||
| 128 | 129 | gemini: 'gemini', |
| 129 | 130 | } |
| 130 | 131 | |
| 132 | +/** Where the older docker.io/sbx/codex-acp-kit (v2) installed codex-acp. */ | |
| 133 | +const legacyCodexProgram = '/home/agent/.local/bin/codex-acp' | |
| 134 | + | |
| 131 | 135 | /** The arguments each of them starts with: only Gemini CLI takes one, --acp. */ |
| 132 | 136 | export const sbxArguments: Record<SbxAgent, string> = { claude: '', codex: '', gemini: '--acp' } |
| 133 | 137 | |
| @@ -145,6 +149,28 @@ export function programsFor(environment: Environment): string[] { | ||
| 145 | 149 | return environment === 'sbx' ? [...knownPrograms, ...Object.values(sbxPrograms)] : [...knownPrograms] |
| 146 | 150 | } |
| 147 | 151 | |
| 152 | +/** | |
| 153 | + * Chooses the program of the sbx agent a sandbox file names (agent: claude, | |
| 154 | + * codex or gemini), with its arguments, when the field is empty or holds one | |
| 155 | + * of the programs the list offers: a program typed by hand is kept. The | |
| 156 | + * arguments typed for the same program are kept too (gemini | |
| 157 | + * --experimental-acp). | |
| 158 | + * | |
| 159 | + * @example | |
| 160 | + * withSbxProgram(emptyForm(), 'gemini') // { …, program: 'gemini', arguments: '--acp' } | |
| 161 | + * withSbxProgram({ ...form, program: 'my-wrapper' }, 'codex') // unchanged | |
| 162 | + */ | |
| 163 | +export function withSbxProgram(form: AgentFormValues, agent: string | undefined): AgentFormValues { | |
| 164 | + const known = (agent ?? '').trim() | |
| 165 | + if (!Object.hasOwn(sbxPrograms, known)) return form | |
| 166 | + const wanted = sbxPrograms[known as SbxAgent] | |
| 167 | + const program = form.program.trim() | |
| 168 | + if (program === wanted) return form | |
| 169 | + const offered = [...knownPrograms, ...Object.values(sbxPrograms), legacyCodexProgram] as string[] | |
| 170 | + if (program && !offered.includes(program)) return form | |
| 171 | + return { ...form, program: wanted, arguments: sbxArguments[known as SbxAgent] } | |
| 172 | +} | |
| 173 | + | |
| 148 | 174 | /** |
| 149 | 175 | * Which coding agent of sbxPrograms the form describes, in an sbx sandbox: |
| 150 | 176 | * its sbxenv.yaml gives the rest, it takes no configuration file. Codex is |
| @@ -158,7 +184,7 @@ export function sbxAgentOf(form: AgentFormValues): SbxAgent | undefined { | ||
| 158 | 184 | if (form.environment !== 'sbx') return undefined |
| 159 | 185 | const program = form.program.trim() |
| 160 | 186 | if (program === sbxPrograms.claude) return 'claude' |
| 161 | - if (program === sbxPrograms.codex || program === '/home/agent/.local/bin/codex-acp') return 'codex' | |
| 187 | + if (program === sbxPrograms.codex || program === legacyCodexProgram) return 'codex' | |
| 162 | 188 | if (program === sbxPrograms.gemini) return 'gemini' |
| 163 | 189 | return undefined |
| 164 | 190 | } |
| @@ -46,8 +46,9 @@ export interface SandboxEnvValues { | |||
| 46 | /** | 46 | /** |
| 47 | * Fills the form from an sbx environment file dropped on the assistant: the | 47 | * Fills the form from an sbx environment file dropped on the assistant: the |
| 48 | * sandbox's name and its commands replace what was typed (the user dropped | 48 | * sandbox's name and its commands replace what was typed (the user dropped |
| 49 | - * the file for that), the agent's folder only when it is still empty. Every | 49 | + * the file for that), the agent's folder only when it is still empty. A |
| 50 | - * field stays editable. | 50 | + * sandbox for Claude, Codex or Gemini ("agent:") also chooses their program |
| 51 | + * (withSbxProgram). Every field stays editable. | ||
| 51 | * | 52 | * |
| 52 | * @example | 53 | * @example |
| 53 | * withSandboxEnv(emptyForm(), { name: 'milo-sbx', createCommand: 'sbx env create --force', … }) | 54 | * withSandboxEnv(emptyForm(), { name: 'milo-sbx', createCommand: 'sbx env create --force', … }) |
| @@ -55,7 +56,7 @@ export interface SandboxEnvValues { | |||
| 55 | */ | 56 | */ |
| 56 | export function withSandboxEnv(form: AgentFormValues, env: SandboxEnvValues): AgentFormValues { | 57 | export function withSandboxEnv(form: AgentFormValues, env: SandboxEnvValues): AgentFormValues { |
| 57 | return { | 58 | return { |
| 58 | - ...form, | 59 | + ...withSbxProgram(form, env.agent), |
| 59 | environment: 'sbx', | 60 | environment: 'sbx', |
| 60 | box: env.name || form.box, | 61 | box: env.name || form.box, |
| 61 | workspace: form.workspace.trim() ? form.workspace : env.workspace, | 62 | workspace: form.workspace.trim() ? form.workspace : env.workspace, |
| @@ -128,6 +129,9 @@ export const sbxPrograms: Record<SbxAgent, string> = { | |||
| 128 | gemini: 'gemini', | 129 | gemini: 'gemini', |
| 129 | } | 130 | } |
| 130 | 131 | ||
| 132 | +/** Where the older docker.io/sbx/codex-acp-kit (v2) installed codex-acp. */ | ||
| 133 | +const legacyCodexProgram = '/home/agent/.local/bin/codex-acp' | ||
| 134 | + | ||
| 131 | /** The arguments each of them starts with: only Gemini CLI takes one, --acp. */ | 135 | /** The arguments each of them starts with: only Gemini CLI takes one, --acp. */ |
| 132 | export const sbxArguments: Record<SbxAgent, string> = { claude: '', codex: '', gemini: '--acp' } | 136 | export const sbxArguments: Record<SbxAgent, string> = { claude: '', codex: '', gemini: '--acp' } |
| 133 | 137 | ||
| @@ -145,6 +149,28 @@ export function programsFor(environment: Environment): string[] { | |||
| 145 | return environment === 'sbx' ? [...knownPrograms, ...Object.values(sbxPrograms)] : [...knownPrograms] | 149 | return environment === 'sbx' ? [...knownPrograms, ...Object.values(sbxPrograms)] : [...knownPrograms] |
| 146 | } | 150 | } |
| 147 | 151 | ||
| 152 | +/** | ||
| 153 | + * Chooses the program of the sbx agent a sandbox file names (agent: claude, | ||
| 154 | + * codex or gemini), with its arguments, when the field is empty or holds one | ||
| 155 | + * of the programs the list offers: a program typed by hand is kept. The | ||
| 156 | + * arguments typed for the same program are kept too (gemini | ||
| 157 | + * --experimental-acp). | ||
| 158 | + * | ||
| 159 | + * @example | ||
| 160 | + * withSbxProgram(emptyForm(), 'gemini') // { …, program: 'gemini', arguments: '--acp' } | ||
| 161 | + * withSbxProgram({ ...form, program: 'my-wrapper' }, 'codex') // unchanged | ||
| 162 | + */ | ||
| 163 | +export function withSbxProgram(form: AgentFormValues, agent: string | undefined): AgentFormValues { | ||
| 164 | + const known = (agent ?? '').trim() | ||
| 165 | + if (!Object.hasOwn(sbxPrograms, known)) return form | ||
| 166 | + const wanted = sbxPrograms[known as SbxAgent] | ||
| 167 | + const program = form.program.trim() | ||
| 168 | + if (program === wanted) return form | ||
| 169 | + const offered = [...knownPrograms, ...Object.values(sbxPrograms), legacyCodexProgram] as string[] | ||
| 170 | + if (program && !offered.includes(program)) return form | ||
| 171 | + return { ...form, program: wanted, arguments: sbxArguments[known as SbxAgent] } | ||
| 172 | +} | ||
| 173 | + | ||
| 148 | /** | 174 | /** |
| 149 | * Which coding agent of sbxPrograms the form describes, in an sbx sandbox: | 175 | * Which coding agent of sbxPrograms the form describes, in an sbx sandbox: |
| 150 | * its sbxenv.yaml gives the rest, it takes no configuration file. Codex is | 176 | * its sbxenv.yaml gives the rest, it takes no configuration file. Codex is |
| @@ -158,7 +184,7 @@ export function sbxAgentOf(form: AgentFormValues): SbxAgent | undefined { | |||
| 158 | if (form.environment !== 'sbx') return undefined | 184 | if (form.environment !== 'sbx') return undefined |
| 159 | const program = form.program.trim() | 185 | const program = form.program.trim() |
| 160 | if (program === sbxPrograms.claude) return 'claude' | 186 | if (program === sbxPrograms.claude) return 'claude' |
| 161 | - if (program === sbxPrograms.codex || program === '/home/agent/.local/bin/codex-acp') return 'codex' | 187 | + if (program === sbxPrograms.codex || program === legacyCodexProgram) return 'codex' |
| 162 | if (program === sbxPrograms.gemini) return 'gemini' | 188 | if (program === sbxPrograms.gemini) return 'gemini' |
| 163 | return undefined | 189 | return undefined |
| 164 | } | 190 | } |