bots-garden/sidekickspublic Fork
⑂ f025676
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/sidekicks.git
git clone ssh://git@rickub.com/bots-garden/sidekicks.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

Merge feature/103-copilot into main

agent committed 2026-11-15T08:56:41+01:00 Browse files
f025676 parents: 5257882 b75112e
added .memory/handoffs/2026-11-15-103-copilot.md +8 -0
new file mode 100644
@@ -0,0 +1,8 @@
1+# 2026-11-15 — #103 Copilot in the sandbox assistant
2+
3+- Branch `feature/103-copilot`, not committed (bindings staged with `git add frontend/bindings` for bindings-check).
4+- To verify on the Mac: `copilot` is in the kit image's PATH for `sbx exec -i <name> copilot --acp --stdio`; `sbx secret ls --service copilot` output format; `sbx secret set copilot` accepts the token on stdin; the kit's entrypoint `copilot --yolo` is not used by sbx exec (permissions then come through ACP).
5+- Open: readable message when the account has no Copilot subscription (real error text unknown); trademark use of the GitHub Copilot logo = owner's call (licence MIT is fine with the notice).
6+- Update (option b): token also stored as `github`; gh flow added (Use my GitHub account / Sign in to GitHub). Unverified: real `gh auth login --web` output without a TTY (it may print "Press Enter to open…" and wait — stdin is empty, so it should go on), real Copilot sandbox.
7+- UI trap for Xvfb tests: shellpath puts the login shell's PATH first, so a real /usr/bin/gh wins over fakes — run with SHELL=<script that prepends the fake bin and execs sh -c "$4">.
8+- Closed: owner tested on the Mac, merged into main.
new file mode 100644
@@ -0,0 +1,8 @@
1+# 2026-11-15 — #103 Copilot in the sandbox assistant
2+
3+- Branch `feature/103-copilot`, not committed (bindings staged with `git add frontend/bindings` for bindings-check).
4+- To verify on the Mac: `copilot` is in the kit image's PATH for `sbx exec -i <name> copilot --acp --stdio`; `sbx secret ls --service copilot` output format; `sbx secret set copilot` accepts the token on stdin; the kit's entrypoint `copilot --yolo` is not used by sbx exec (permissions then come through ACP).
5+- Open: readable message when the account has no Copilot subscription (real error text unknown); trademark use of the GitHub Copilot logo = owner's call (licence MIT is fine with the notice).
6+- Update (option b): token also stored as `github`; gh flow added (Use my GitHub account / Sign in to GitHub). Unverified: real `gh auth login --web` output without a TTY (it may print "Press Enter to open…" and wait — stdin is empty, so it should go on), real Copilot sandbox.
7+- UI trap for Xvfb tests: shellpath puts the login shell's PATH first, so a real /usr/bin/gh wins over fakes — run with SHELL=<script that prepends the fake bin and execs sh -c "$4">.
8+- Closed: owner tested on the Mac, merged into main.
modified .memory/history.md +9 -0
@@ -313,3 +313,12 @@
313313 - Milestone `v1.6.0 · Release`; #102 "Publier la version 1.6.0" (same 8 tasks as #93, + lint-headers/untracked-files criterion); #103 Copilot CLI as a 5th kind of the sandbox assistant (v1.6.0, epic Docker SBX).
314314 - Researched (web, not verified with a real sbx): `copilot --acp` (stdio default; public preview), sbx agent `copilot`, kit `docker.io/sbx/copilot-kit:latest` (shorthand needs sbx ≥ 0.43), auth = GitHub token as sbx secret service `github` (`sbx secret set github --command 'gh auth token'`); bindings domains unknown. Nothing implemented. #93 tasks 4–8 (the v1.5.0 publication) left as they were — owner handles them.
315315 - **2026-11-15 — v1.5.0 closed** (owner: "close 1.5.0"): #93 and its tasks 4–8 closed on the owner's word (tag not visible from the sandbox: remote unreachable; packages in dist/), milestone v1.5.0 closed.
316+
317+## 2026-11-15 — #103 GitHub Copilot CLI in the sandbox assistant (branch feature/103-copilot)
318+
319+- Asked: "implement 103". Kit page read: secret service is `copilot` (COPILOT_GITHUB_TOKEN, Copilot API hosts), not `github` as the ticket first said; `github` (GH_TOKEN, git/gh) deliberately not asked.
320+- Done: catalogue entry `copilot` (+ `Kind.Token`), `keyText` + `sbxCreator.token.*` texts EN/FR, `logo:copilot` (Octicons MIT notice in logos.ts), `programOfSandbox('copilot')`, tests (Go Render test: no github.com binding; vitest keyText/logos/agentform), docs EN/FR, README layout, release notes v1.6.0 first draft. Also added the licence header to `citizens/codex-acp/sbxenv.yaml` (now a plain tracked folder).
321+- Checks: lint-go 0 issues, svelte-check 0, all tests, bindings-check (bindings staged), lint-headers ok.
322+- Not verified: a real Copilot sandbox (#103 tasks 1, 3 partly — no-subscription message —, 5). Not committed.
323+- **2026-11-15 — #103 option (b)** (owner: auth as `sbx secret set github|copilot --command 'gh auth token'`, chose "b" = token to both services): `Kind.Shared`/`FromGH`, `sbxcreate.GH` (gh.go: Token, StartLogin via the generalized device-code `startLogin`; userPattern also reads "Logged in as"), `UseGitHub`, `GitHubLogin*`, `Options.GH`, `SbxLogin.svelte` `github` prop, key-step UI (use gh / sign in to GitHub / paste). Tests Go + vitest, lint, bindings staged; Xvfb run with fake sbx + gh (SHELL=fake shell so shellpath keeps the fakes first in PATH) went end to end. Docs EN/FR + release notes v1.6.0 updated (the token now also reaches GitHub).
324+- **2026-11-15 — #103 closed** (owner tested Copilot on the Mac: it works); feature/103-copilot merged into main (not pushed).
@@ -313,3 +313,12 @@
313 - Milestone `v1.6.0 · Release`; #102 "Publier la version 1.6.0" (same 8 tasks as #93, + lint-headers/untracked-files criterion); #103 Copilot CLI as a 5th kind of the sandbox assistant (v1.6.0, epic Docker SBX).313 - Milestone `v1.6.0 · Release`; #102 "Publier la version 1.6.0" (same 8 tasks as #93, + lint-headers/untracked-files criterion); #103 Copilot CLI as a 5th kind of the sandbox assistant (v1.6.0, epic Docker SBX).
314 - Researched (web, not verified with a real sbx): `copilot --acp` (stdio default; public preview), sbx agent `copilot`, kit `docker.io/sbx/copilot-kit:latest` (shorthand needs sbx ≥ 0.43), auth = GitHub token as sbx secret service `github` (`sbx secret set github --command 'gh auth token'`); bindings domains unknown. Nothing implemented. #93 tasks 4–8 (the v1.5.0 publication) left as they were — owner handles them.314 - Researched (web, not verified with a real sbx): `copilot --acp` (stdio default; public preview), sbx agent `copilot`, kit `docker.io/sbx/copilot-kit:latest` (shorthand needs sbx ≥ 0.43), auth = GitHub token as sbx secret service `github` (`sbx secret set github --command 'gh auth token'`); bindings domains unknown. Nothing implemented. #93 tasks 4–8 (the v1.5.0 publication) left as they were — owner handles them.
315 - **2026-11-15 — v1.5.0 closed** (owner: "close 1.5.0"): #93 and its tasks 4–8 closed on the owner's word (tag not visible from the sandbox: remote unreachable; packages in dist/), milestone v1.5.0 closed.315 - **2026-11-15 — v1.5.0 closed** (owner: "close 1.5.0"): #93 and its tasks 4–8 closed on the owner's word (tag not visible from the sandbox: remote unreachable; packages in dist/), milestone v1.5.0 closed.
316+
317+## 2026-11-15 — #103 GitHub Copilot CLI in the sandbox assistant (branch feature/103-copilot)
318+
319+- Asked: "implement 103". Kit page read: secret service is `copilot` (COPILOT_GITHUB_TOKEN, Copilot API hosts), not `github` as the ticket first said; `github` (GH_TOKEN, git/gh) deliberately not asked.
320+- Done: catalogue entry `copilot` (+ `Kind.Token`), `keyText` + `sbxCreator.token.*` texts EN/FR, `logo:copilot` (Octicons MIT notice in logos.ts), `programOfSandbox('copilot')`, tests (Go Render test: no github.com binding; vitest keyText/logos/agentform), docs EN/FR, README layout, release notes v1.6.0 first draft. Also added the licence header to `citizens/codex-acp/sbxenv.yaml` (now a plain tracked folder).
321+- Checks: lint-go 0 issues, svelte-check 0, all tests, bindings-check (bindings staged), lint-headers ok.
322+- Not verified: a real Copilot sandbox (#103 tasks 1, 3 partly — no-subscription message —, 5). Not committed.
323+- **2026-11-15 — #103 option (b)** (owner: auth as `sbx secret set github|copilot --command 'gh auth token'`, chose "b" = token to both services): `Kind.Shared`/`FromGH`, `sbxcreate.GH` (gh.go: Token, StartLogin via the generalized device-code `startLogin`; userPattern also reads "Logged in as"), `UseGitHub`, `GitHubLogin*`, `Options.GH`, `SbxLogin.svelte` `github` prop, key-step UI (use gh / sign in to GitHub / paste). Tests Go + vitest, lint, bindings staged; Xvfb run with fake sbx + gh (SHELL=fake shell so shellpath keeps the fakes first in PATH) went end to end. Docs EN/FR + release notes v1.6.0 updated (the token now also reaches GitHub).
324+- **2026-11-15 — #103 closed** (owner tested Copilot on the Mac: it works); feature/103-copilot merged into main (not pushed).
modified .memory/summary.md +2 -2
@@ -26,8 +26,8 @@ What exists:
2626 - Workspaces: ADR 0007 — one `Workspace` interface (local: os/fsnotify/creack pty; container: docker exec + busybox-compatible POSIX scripts; sbx: ErrNotSupported until #39); paths relative, never leaving the folder; versioned writes (content hash) + atomic rename; local delete → system trash (EXDEV → final), container delete final; only the shown workspace is watched (fsnotify / 2 s polling in containers); terminals: output events every 16 ms/32 KB UTF-8-safe, Close hangs up the whole session (`pkill -s`) and, in a container, the session inside it (pid file + /proc); `docker` looked up in PATH then Docker Desktop/Homebrew paths.
2727 - Mini-me creation assistant (#94, `CreatorService`, page `CreateMiniMeAgent.svelte`): Sidekicks is the ACP client of `mm --acp-create --project yes --output .mm/agent.yaml` (mm ≥ 1.0.9, checked with `mm --version`; an unparsable version is accepted); `.mm` layout imposed; the wizard runs in `<agentsFolder>/.sidekicks-new-agent-*`, renamed to `<agentsFolder>/<name>` at Finish (name = folder = agent name; an existing folder is never touched); container/sbx files come from `/dockerinit` / `/sbxinit` in an mm restarted in the final folder. `agentsFolder` (top-level config key) defaults to `~/Documents/Sidekicks-Agents` (#101). mm's questions stay in English (they are mm's).
2828 - Agent forms (#95): every conversation agent is started with `acp.Spec.Forms` (advertises `elicitation.form`); a form goes to the session named in `_meta["mm.elicitationScope"]`, else to the only session with a prompt in flight, and is shown as a `FormCard` under the answer (`form:requested`/`form:resolved`, `ChannelService.AnswerForm`); Stop cancels it. Fields rendered by `chat/FormFields.svelte`, shared with the creator.
29-- Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Gemini through Antigravity `agy acp` with kit `docker.io/sbx/antigravity`, Codex `codex-acp`, Vibe `vibe-acp` with kit `docker.io/sbx/vibe-kit`, service `mistral` — #86); writes `<agentsFolder>/<name>/sbxenv.yaml` (English comments) + `workspace/`; name = agent = folder = sandbox (`^[a-z][a-z0-9-]{0,31}$`); API key checked with `sbx secret ls --service`, set with `sbx secret set <service>` on stdin (never in args, files or logs). `appState.creator` is `'' | 'mini-me' | 'sbx'`.
30-- Agent icons (#100): `icon` may be `logo:<name>` (`config.LogoNames` = claude, gemini, openai, mistral; drawn by `frontend/src/lib/logos.ts` from Simple Icons, CC0 — OpenAI from 13.21.0; a Go test checks both lists; unknown name = warning, shows a letter). Start progress (#98): `agent:progress` {agent, step checking|preparing|connecting, line, since} from `agents.Manager`, card `chat/StartProgress.svelte` (no log link since 2026-11-15, owner's request; `showLog` in state.svelte.ts is now unused). Assistants' @ name follows the name shown until edited, free variant from Go's `taken` list (#99).
29+- Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Gemini through Antigravity `agy acp` with kit `docker.io/sbx/antigravity`, Codex `codex-acp`, Vibe `vibe-acp` with kit `docker.io/sbx/vibe-kit`, service `mistral` — #86; Copilot `copilot --acp --stdio` with kit `docker.io/sbx/copilot-kit`, service `copilot` = a GitHub token, `Kind.Token` switches the key step to "token" texts — #103); writes `<agentsFolder>/<name>/sbxenv.yaml` (English comments) + `workspace/`; name = agent = folder = sandbox (`^[a-z][a-z0-9-]{0,31}$`); API key checked with `sbx secret ls --service`, set with `sbx secret set <service>` on stdin (never in args, files or logs). `appState.creator` is `'' | 'mini-me' | 'sbx'`.
30+- Agent icons (#100): `icon` may be `logo:<name>` (`config.LogoNames` = claude, gemini, openai, mistral, copilot — copilot is GitHub Octicons, MIT; drawn by `frontend/src/lib/logos.ts` from Simple Icons, CC0 — OpenAI from 13.21.0; a Go test checks both lists; unknown name = warning, shows a letter). Start progress (#98): `agent:progress` {agent, step checking|preparing|connecting, line, since} from `agents.Manager`, card `chat/StartProgress.svelte` (no log link since 2026-11-15, owner's request; `showLog` in state.svelte.ts is now unused). Assistants' @ name follows the name shown until edited, free variant from Go's `taken` list (#99).
3131 - Interface language: ADR 0005 — `ui.language` defaults to `en`; every UI text is a key of `frontend/src/lib/i18n/messages.ts` (`fr` typed `Record<MessageKey,string>`, test checks keys and variables); config errors use the Go catalogue in the same language; agent titles and channel names are user data, never translated. Default config file and `examples/test-agents.yaml` are in English.
3232 - Packages and data model: ADR 0003 + Amendments 1 and 2 (main at the root, only main.go imports Wails, `internal/events` with an `Emitter` interface, LRU eviction of idle agents at the limit).
3333 - Frontend dependencies with **pnpm 12.11.2** and `frontend/pnpm-workspace.yaml` `supportedArchitectures` (darwin+linux): the repository folder is shared between the Mac and the Linux sandbox. Never use npm in `frontend/`.
@@ -26,8 +26,8 @@ What exists:
26 - Workspaces: ADR 0007 — one `Workspace` interface (local: os/fsnotify/creack pty; container: docker exec + busybox-compatible POSIX scripts; sbx: ErrNotSupported until #39); paths relative, never leaving the folder; versioned writes (content hash) + atomic rename; local delete → system trash (EXDEV → final), container delete final; only the shown workspace is watched (fsnotify / 2 s polling in containers); terminals: output events every 16 ms/32 KB UTF-8-safe, Close hangs up the whole session (`pkill -s`) and, in a container, the session inside it (pid file + /proc); `docker` looked up in PATH then Docker Desktop/Homebrew paths.26 - Workspaces: ADR 0007 — one `Workspace` interface (local: os/fsnotify/creack pty; container: docker exec + busybox-compatible POSIX scripts; sbx: ErrNotSupported until #39); paths relative, never leaving the folder; versioned writes (content hash) + atomic rename; local delete → system trash (EXDEV → final), container delete final; only the shown workspace is watched (fsnotify / 2 s polling in containers); terminals: output events every 16 ms/32 KB UTF-8-safe, Close hangs up the whole session (`pkill -s`) and, in a container, the session inside it (pid file + /proc); `docker` looked up in PATH then Docker Desktop/Homebrew paths.
27 - Mini-me creation assistant (#94, `CreatorService`, page `CreateMiniMeAgent.svelte`): Sidekicks is the ACP client of `mm --acp-create --project yes --output .mm/agent.yaml` (mm ≥ 1.0.9, checked with `mm --version`; an unparsable version is accepted); `.mm` layout imposed; the wizard runs in `<agentsFolder>/.sidekicks-new-agent-*`, renamed to `<agentsFolder>/<name>` at Finish (name = folder = agent name; an existing folder is never touched); container/sbx files come from `/dockerinit` / `/sbxinit` in an mm restarted in the final folder. `agentsFolder` (top-level config key) defaults to `~/Documents/Sidekicks-Agents` (#101). mm's questions stay in English (they are mm's).27 - Mini-me creation assistant (#94, `CreatorService`, page `CreateMiniMeAgent.svelte`): Sidekicks is the ACP client of `mm --acp-create --project yes --output .mm/agent.yaml` (mm ≥ 1.0.9, checked with `mm --version`; an unparsable version is accepted); `.mm` layout imposed; the wizard runs in `<agentsFolder>/.sidekicks-new-agent-*`, renamed to `<agentsFolder>/<name>` at Finish (name = folder = agent name; an existing folder is never touched); container/sbx files come from `/dockerinit` / `/sbxinit` in an mm restarted in the final folder. `agentsFolder` (top-level config key) defaults to `~/Documents/Sidekicks-Agents` (#101). mm's questions stay in English (they are mm's).
28 - Agent forms (#95): every conversation agent is started with `acp.Spec.Forms` (advertises `elicitation.form`); a form goes to the session named in `_meta["mm.elicitationScope"]`, else to the only session with a prompt in flight, and is shown as a `FormCard` under the answer (`form:requested`/`form:resolved`, `ChannelService.AnswerForm`); Stop cancels it. Fields rendered by `chat/FormFields.svelte`, shared with the creator.28 - Agent forms (#95): every conversation agent is started with `acp.Spec.Forms` (advertises `elicitation.form`); a form goes to the session named in `_meta["mm.elicitationScope"]`, else to the only session with a prompt in flight, and is shown as a `FormCard` under the answer (`form:requested`/`form:resolved`, `ChannelService.AnswerForm`); Stop cancels it. Fields rendered by `chat/FormFields.svelte`, shared with the creator.
29-- Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Gemini through Antigravity `agy acp` with kit `docker.io/sbx/antigravity`, Codex `codex-acp`, Vibe `vibe-acp` with kit `docker.io/sbx/vibe-kit`, service `mistral` — #86); writes `<agentsFolder>/<name>/sbxenv.yaml` (English comments) + `workspace/`; name = agent = folder = sandbox (`^[a-z][a-z0-9-]{0,31}$`); API key checked with `sbx secret ls --service`, set with `sbx secret set <service>` on stdin (never in args, files or logs). `appState.creator` is `'' | 'mini-me' | 'sbx'`.29+- Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Gemini through Antigravity `agy acp` with kit `docker.io/sbx/antigravity`, Codex `codex-acp`, Vibe `vibe-acp` with kit `docker.io/sbx/vibe-kit`, service `mistral` — #86; Copilot `copilot --acp --stdio` with kit `docker.io/sbx/copilot-kit`, service `copilot` = a GitHub token, `Kind.Token` switches the key step to "token" texts — #103); writes `<agentsFolder>/<name>/sbxenv.yaml` (English comments) + `workspace/`; name = agent = folder = sandbox (`^[a-z][a-z0-9-]{0,31}$`); API key checked with `sbx secret ls --service`, set with `sbx secret set <service>` on stdin (never in args, files or logs). `appState.creator` is `'' | 'mini-me' | 'sbx'`.
30-- Agent icons (#100): `icon` may be `logo:<name>` (`config.LogoNames` = claude, gemini, openai, mistral; drawn by `frontend/src/lib/logos.ts` from Simple Icons, CC0 — OpenAI from 13.21.0; a Go test checks both lists; unknown name = warning, shows a letter). Start progress (#98): `agent:progress` {agent, step checking|preparing|connecting, line, since} from `agents.Manager`, card `chat/StartProgress.svelte` (no log link since 2026-11-15, owner's request; `showLog` in state.svelte.ts is now unused). Assistants' @ name follows the name shown until edited, free variant from Go's `taken` list (#99).30+- Agent icons (#100): `icon` may be `logo:<name>` (`config.LogoNames` = claude, gemini, openai, mistral, copilot — copilot is GitHub Octicons, MIT; drawn by `frontend/src/lib/logos.ts` from Simple Icons, CC0 — OpenAI from 13.21.0; a Go test checks both lists; unknown name = warning, shows a letter). Start progress (#98): `agent:progress` {agent, step checking|preparing|connecting, line, since} from `agents.Manager`, card `chat/StartProgress.svelte` (no log link since 2026-11-15, owner's request; `showLog` in state.svelte.ts is now unused). Assistants' @ name follows the name shown until edited, free variant from Go's `taken` list (#99).
31 - Interface language: ADR 0005 — `ui.language` defaults to `en`; every UI text is a key of `frontend/src/lib/i18n/messages.ts` (`fr` typed `Record<MessageKey,string>`, test checks keys and variables); config errors use the Go catalogue in the same language; agent titles and channel names are user data, never translated. Default config file and `examples/test-agents.yaml` are in English.31 - Interface language: ADR 0005 — `ui.language` defaults to `en`; every UI text is a key of `frontend/src/lib/i18n/messages.ts` (`fr` typed `Record<MessageKey,string>`, test checks keys and variables); config errors use the Go catalogue in the same language; agent titles and channel names are user data, never translated. Default config file and `examples/test-agents.yaml` are in English.
32 - Packages and data model: ADR 0003 + Amendments 1 and 2 (main at the root, only main.go imports Wails, `internal/events` with an `Emitter` interface, LRU eviction of idle agents at the limit).32 - Packages and data model: ADR 0003 + Amendments 1 and 2 (main at the root, only main.go imports Wails, `internal/events` with an `Emitter` interface, LRU eviction of idle agents at the limit).
33 - Frontend dependencies with **pnpm 12.11.2** and `frontend/pnpm-workspace.yaml` `supportedArchitectures` (darwin+linux): the repository folder is shared between the Mac and the Linux sandbox. Never use npm in `frontend/`.33 - Frontend dependencies with **pnpm 12.11.2** and `frontend/pnpm-workspace.yaml` `supportedArchitectures` (darwin+linux): the repository folder is shared between the Mac and the Linux sandbox. Never use npm in `frontend/`.
modified .tickets/issues/0103-github-copilot-cli-dans-l-assistant-des-sandboxe.yaml +69 -8
@@ -1,12 +1,12 @@
11 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
22 id: 103
33 title: "GitHub Copilot CLI dans l'assistant des sandboxes"
4-state: open
4+state: closed
55 author:
66 name: k33g
77 email: ph.charriere@gmail.com
88 createdAt: 2026-11-15T07:07:06.000Z
9-updatedAt: 2026-11-15T07:07:06.000Z
9+updatedAt: 2026-11-15T07:56:35.000Z
1010 labels:
1111 - kind::feature
1212 - area::config
@@ -52,42 +52,103 @@ body: |
5252 tasks:
5353 - id: 1
5454 title: "Lire la spec du kit copilot-kit (agent, programme, service, domaines) et vérifier copilot --acp dans une sandbox"
55- state: open
55+ state: closed
5656 priority: high
5757 author:
5858 name: k33g
5959 email: ph.charriere@gmail.com
6060 createdAt: 2026-11-15T07:07:06.000Z
61+ updatedAt: 2026-11-15T07:56:35.000Z
62+ closedAt: 2026-11-15T07:56:35.000Z
6163 - id: 2
6264 title: "Entrée du catalogue sbxcreate + programOfSandbox(copilot) + logo:copilot (Go + TS)"
63- state: open
65+ state: closed
6466 priority: high
6567 author:
6668 name: k33g
6769 email: ph.charriere@gmail.com
6870 createdAt: 2026-11-15T07:07:06.000Z
71+ updatedAt: 2026-11-15T07:14:00.000Z
72+ closedAt: 2026-11-15T07:14:00.000Z
6973 - id: 3
7074 title: "Étape du token GitHub (texte, lien, sbx secret set github) et message sans abonnement Copilot"
71- state: open
75+ state: closed
7276 priority: high
7377 author:
7478 name: k33g
7579 email: ph.charriere@gmail.com
7680 createdAt: 2026-11-15T07:07:06.000Z
81+ updatedAt: 2026-11-15T07:56:35.000Z
82+ closedAt: 2026-11-15T07:56:35.000Z
7783 - id: 4
7884 title: "Tests Go + vitest, doc EN + FR, notes de release v1.6.0"
79- state: open
85+ state: closed
8086 priority: medium
8187 author:
8288 name: k33g
8389 email: ph.charriere@gmail.com
8490 createdAt: 2026-11-15T07:07:06.000Z
91+ updatedAt: 2026-11-15T07:14:00.000Z
92+ closedAt: 2026-11-15T07:14:00.000Z
8593 - id: 5
8694 title: "Tester sur le Mac avec une vraie sandbox Copilot"
87- state: open
95+ state: closed
8896 priority: high
8997 author:
9098 name: k33g
9199 email: ph.charriere@gmail.com
92100 createdAt: 2026-11-15T07:07:06.000Z
93-comments: []
101+ updatedAt: 2026-11-15T07:56:35.000Z
102+ closedAt: 2026-11-15T07:56:35.000Z
103+comments:
104+ - id: 1
105+ author:
106+ name: k33g
107+ email: ph.charriere@gmail.com
108+ createdAt: 2026-11-15T07:14:00.000Z
109+ body: |
110+ Implémenté sur `feature/103-copilot` (non vérifié avec un vrai sbx). Correction de la recherche : d'après la page du
111+ kit (hub.docker.com/r/sbx/copilot-kit), Copilot lit **`COPILOT_GITHUB_TOKEN`**, service sbx **`copilot`**, injecté
112+ pour les hôtes de l'API Copilot (`api.githubcopilot.com`, `api.individual|business|enterprise.githubcopilot.com`,
113+ `copilot.github.com`) ; le service `github` (`GH_TOKEN`, pour git et gh) n'est pas demandé — la sandbox ne peut donc
114+ rien faire d'autre sur GitHub avec le jeton.
115+
116+ - `sbxcreate.Catalogue` : `copilot`, agent `copilot`, kit `docker.io/sbx/copilot-kit:latest`, programme
117+ `copilot --acp --stdio`, service `copilot`, `Token: true` (nouveau champ `token` de `Kind`), page
118+ github.com/settings/personal-access-tokens/new ; test du `sbxenv.yaml` (pas de github.com dans les bindings).
119+ - Étape du jeton : textes `sbxCreator.token.*` (EN + FR) choisis par `keyText` (lib/creator.ts) quand `kind.token`.
120+ - `logo:copilot` : Octicon copilot-24 de GitHub via Simple Icons 16.37.0, licence **MIT** (notice dans logos.ts) —
121+ droits de marque à part, comme #100 : décision de l'owner.
122+ - `programOfSandbox('copilot')` → `copilot --acp --stdio` (« Ajouter un agent »).
123+ - Doc EN + FR (guide sandbox, SbxCreatorService, configuration, raccourcis, index, README), notes v1.6.0 (premier jet).
124+
125+ Reste : tâche 1 (vérifier dans une vraie sandbox : chemin de `copilot`, `--acp --stdio`, `sbx secret set copilot`),
126+ tâche 3 en partie (message lisible sans abonnement Copilot : texte réel de l'erreur inconnu), tâche 5 (Mac).
127+ - id: 2
128+ author:
129+ name: k33g
130+ email: ph.charriere@gmail.com
131+ createdAt: 2026-11-15T07:53:14.000Z
132+ body: |
133+ **Option (b) retenue par l'owner** : le jeton va aux deux services, `copilot` et `github` (git et gh dans la
134+ sandbox : l'agent peut travailler sur les dépôts avec le compte de l'utilisateur), comme
135+ `sbx secret set github|copilot --command 'gh auth token'`. Le commentaire 1 (« jamais pour le reste de GitHub ») ne
136+ vaut plus.
137+
138+ - `Kind.Shared` (service `github`, `api.github.com` + `github.com` dans les bindings), `Kind.FromGH` ; `Check`
139+ exige les deux secrets et dit `gh` / `ghSignedIn` ; `SetKey` enregistre les deux.
140+ - `UseGitHub(kind)` : `gh auth token` → `sbx secret set` sur stdin, jamais affiché ni journalisé.
141+ - `GitHubLogin` / `GitHubLoginStatus` / `CancelGitHubLogin` : `gh auth login --web --hostname github.com
142+ --git-protocol https`, même mécanique que `sbx login` (#97) ; `SbxLogin.svelte` prend `github`.
143+ - Écran : « Utiliser mon compte GitHub » si gh est connecté, sinon « Se connecter à GitHub » (code + page), puis le
144+ jeton est pris tout seul ; coller un jeton reste possible.
145+ - Vérifié sous Xvfb avec un faux sbx et un faux gh : code affiché, confirmation, `secret set copilot` puis
146+ `secret set github`, `sbxenv.yaml` avec les deux bindings, agent ajouté (`sbx exec -i copilot copilot --acp --stdio`).
147+ - Non vérifié : la sortie réelle de `gh auth login --web` sans terminal, et une vraie sandbox Copilot (tâches 1, 5).
148+ - id: 3
149+ author:
150+ name: k33g
151+ email: ph.charriere@gmail.com
152+ createdAt: 2026-11-15T07:56:35.000Z
153+ body: |
154+ Testé sur le Mac par l'owner : ça fonctionne. Mergé dans main. Ticket fermé.
@@ -1,12 +1,12 @@
1 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.1 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2 id: 1032 id: 103
3 title: "GitHub Copilot CLI dans l'assistant des sandboxes"3 title: "GitHub Copilot CLI dans l'assistant des sandboxes"
4-state: open4+state: closed
5 author:5 author:
6 name: k33g6 name: k33g
7 email: ph.charriere@gmail.com7 email: ph.charriere@gmail.com
8 createdAt: 2026-11-15T07:07:06.000Z8 createdAt: 2026-11-15T07:07:06.000Z
9-updatedAt: 2026-11-15T07:07:06.000Z9+updatedAt: 2026-11-15T07:56:35.000Z
10 labels:10 labels:
11 - kind::feature11 - kind::feature
12 - area::config12 - area::config
@@ -52,42 +52,103 @@ body: |
52 tasks:52 tasks:
53 - id: 153 - id: 1
54 title: "Lire la spec du kit copilot-kit (agent, programme, service, domaines) et vérifier copilot --acp dans une sandbox"54 title: "Lire la spec du kit copilot-kit (agent, programme, service, domaines) et vérifier copilot --acp dans une sandbox"
55- state: open55+ state: closed
56 priority: high56 priority: high
57 author:57 author:
58 name: k33g58 name: k33g
59 email: ph.charriere@gmail.com59 email: ph.charriere@gmail.com
60 createdAt: 2026-11-15T07:07:06.000Z60 createdAt: 2026-11-15T07:07:06.000Z
61+ updatedAt: 2026-11-15T07:56:35.000Z
62+ closedAt: 2026-11-15T07:56:35.000Z
61 - id: 263 - id: 2
62 title: "Entrée du catalogue sbxcreate + programOfSandbox(copilot) + logo:copilot (Go + TS)"64 title: "Entrée du catalogue sbxcreate + programOfSandbox(copilot) + logo:copilot (Go + TS)"
63- state: open65+ state: closed
64 priority: high66 priority: high
65 author:67 author:
66 name: k33g68 name: k33g
67 email: ph.charriere@gmail.com69 email: ph.charriere@gmail.com
68 createdAt: 2026-11-15T07:07:06.000Z70 createdAt: 2026-11-15T07:07:06.000Z
71+ updatedAt: 2026-11-15T07:14:00.000Z
72+ closedAt: 2026-11-15T07:14:00.000Z
69 - id: 373 - id: 3
70 title: "Étape du token GitHub (texte, lien, sbx secret set github) et message sans abonnement Copilot"74 title: "Étape du token GitHub (texte, lien, sbx secret set github) et message sans abonnement Copilot"
71- state: open75+ state: closed
72 priority: high76 priority: high
73 author:77 author:
74 name: k33g78 name: k33g
75 email: ph.charriere@gmail.com79 email: ph.charriere@gmail.com
76 createdAt: 2026-11-15T07:07:06.000Z80 createdAt: 2026-11-15T07:07:06.000Z
81+ updatedAt: 2026-11-15T07:56:35.000Z
82+ closedAt: 2026-11-15T07:56:35.000Z
77 - id: 483 - id: 4
78 title: "Tests Go + vitest, doc EN + FR, notes de release v1.6.0"84 title: "Tests Go + vitest, doc EN + FR, notes de release v1.6.0"
79- state: open85+ state: closed
80 priority: medium86 priority: medium
81 author:87 author:
82 name: k33g88 name: k33g
83 email: ph.charriere@gmail.com89 email: ph.charriere@gmail.com
84 createdAt: 2026-11-15T07:07:06.000Z90 createdAt: 2026-11-15T07:07:06.000Z
91+ updatedAt: 2026-11-15T07:14:00.000Z
92+ closedAt: 2026-11-15T07:14:00.000Z
85 - id: 593 - id: 5
86 title: "Tester sur le Mac avec une vraie sandbox Copilot"94 title: "Tester sur le Mac avec une vraie sandbox Copilot"
87- state: open95+ state: closed
88 priority: high96 priority: high
89 author:97 author:
90 name: k33g98 name: k33g
91 email: ph.charriere@gmail.com99 email: ph.charriere@gmail.com
92 createdAt: 2026-11-15T07:07:06.000Z100 createdAt: 2026-11-15T07:07:06.000Z
93-comments: []101+ updatedAt: 2026-11-15T07:56:35.000Z
102+ closedAt: 2026-11-15T07:56:35.000Z
103+comments:
104+ - id: 1
105+ author:
106+ name: k33g
107+ email: ph.charriere@gmail.com
108+ createdAt: 2026-11-15T07:14:00.000Z
109+ body: |
110+ Implémenté sur `feature/103-copilot` (non vérifié avec un vrai sbx). Correction de la recherche : d'après la page du
111+ kit (hub.docker.com/r/sbx/copilot-kit), Copilot lit **`COPILOT_GITHUB_TOKEN`**, service sbx **`copilot`**, injecté
112+ pour les hôtes de l'API Copilot (`api.githubcopilot.com`, `api.individual|business|enterprise.githubcopilot.com`,
113+ `copilot.github.com`) ; le service `github` (`GH_TOKEN`, pour git et gh) n'est pas demandé — la sandbox ne peut donc
114+ rien faire d'autre sur GitHub avec le jeton.
115+
116+ - `sbxcreate.Catalogue` : `copilot`, agent `copilot`, kit `docker.io/sbx/copilot-kit:latest`, programme
117+ `copilot --acp --stdio`, service `copilot`, `Token: true` (nouveau champ `token` de `Kind`), page
118+ github.com/settings/personal-access-tokens/new ; test du `sbxenv.yaml` (pas de github.com dans les bindings).
119+ - Étape du jeton : textes `sbxCreator.token.*` (EN + FR) choisis par `keyText` (lib/creator.ts) quand `kind.token`.
120+ - `logo:copilot` : Octicon copilot-24 de GitHub via Simple Icons 16.37.0, licence **MIT** (notice dans logos.ts) —
121+ droits de marque à part, comme #100 : décision de l'owner.
122+ - `programOfSandbox('copilot')` → `copilot --acp --stdio` (« Ajouter un agent »).
123+ - Doc EN + FR (guide sandbox, SbxCreatorService, configuration, raccourcis, index, README), notes v1.6.0 (premier jet).
124+
125+ Reste : tâche 1 (vérifier dans une vraie sandbox : chemin de `copilot`, `--acp --stdio`, `sbx secret set copilot`),
126+ tâche 3 en partie (message lisible sans abonnement Copilot : texte réel de l'erreur inconnu), tâche 5 (Mac).
127+ - id: 2
128+ author:
129+ name: k33g
130+ email: ph.charriere@gmail.com
131+ createdAt: 2026-11-15T07:53:14.000Z
132+ body: |
133+ **Option (b) retenue par l'owner** : le jeton va aux deux services, `copilot` et `github` (git et gh dans la
134+ sandbox : l'agent peut travailler sur les dépôts avec le compte de l'utilisateur), comme
135+ `sbx secret set github|copilot --command 'gh auth token'`. Le commentaire 1 (« jamais pour le reste de GitHub ») ne
136+ vaut plus.
137+
138+ - `Kind.Shared` (service `github`, `api.github.com` + `github.com` dans les bindings), `Kind.FromGH` ; `Check`
139+ exige les deux secrets et dit `gh` / `ghSignedIn` ; `SetKey` enregistre les deux.
140+ - `UseGitHub(kind)` : `gh auth token` → `sbx secret set` sur stdin, jamais affiché ni journalisé.
141+ - `GitHubLogin` / `GitHubLoginStatus` / `CancelGitHubLogin` : `gh auth login --web --hostname github.com
142+ --git-protocol https`, même mécanique que `sbx login` (#97) ; `SbxLogin.svelte` prend `github`.
143+ - Écran : « Utiliser mon compte GitHub » si gh est connecté, sinon « Se connecter à GitHub » (code + page), puis le
144+ jeton est pris tout seul ; coller un jeton reste possible.
145+ - Vérifié sous Xvfb avec un faux sbx et un faux gh : code affiché, confirmation, `secret set copilot` puis
146+ `secret set github`, `sbxenv.yaml` avec les deux bindings, agent ajouté (`sbx exec -i copilot copilot --acp --stdio`).
147+ - Non vérifié : la sortie réelle de `gh auth login --web` sans terminal, et une vraie sandbox Copilot (tâches 1, 5).
148+ - id: 3
149+ author:
150+ name: k33g
151+ email: ph.charriere@gmail.com
152+ createdAt: 2026-11-15T07:56:35.000Z
153+ body: |
154+ Testé sur le Mac par l'owner : ça fonctionne. Mergé dans main. Ticket fermé.
modified README.md +1 -1
@@ -51,7 +51,7 @@ Details: [How to develop the application](docs/en/how-to/develop-the-application
5151 | `internal/agents` | The agent processes: lazy start, limit, idle stop, states, logs |
5252 | `internal/acp` | ACP v1 client over stdio (wraps `coder/acp-go-sdk`), with the forms an agent sends (elicitation) |
5353 | `internal/creator` | The mini-me creation assistant: drives `mm --acp-create` and writes the agent's folder |
54-| `internal/sbxcreate` | The sandbox creation assistant: kinds of agents (Claude, Gemini, Codex, Vibe), `sbxenv.yaml`, API keys and `sbx login` |
54+| `internal/sbxcreate` | The sandbox creation assistant: kinds of agents (Claude, Gemini, Codex, Vibe, Copilot), `sbxenv.yaml`, API keys and `sbx login` |
5555 | `internal/config` | Configuration file: load, validate, locate, create, save, watch |
5656 | `internal/events` | Events sent from Go to the interface |
5757 | `internal/memory` | The memory pressure of the computer, shown in the Log panel |
@@ -51,7 +51,7 @@ Details: [How to develop the application](docs/en/how-to/develop-the-application
51 | `internal/agents` | The agent processes: lazy start, limit, idle stop, states, logs |51 | `internal/agents` | The agent processes: lazy start, limit, idle stop, states, logs |
52 | `internal/acp` | ACP v1 client over stdio (wraps `coder/acp-go-sdk`), with the forms an agent sends (elicitation) |52 | `internal/acp` | ACP v1 client over stdio (wraps `coder/acp-go-sdk`), with the forms an agent sends (elicitation) |
53 | `internal/creator` | The mini-me creation assistant: drives `mm --acp-create` and writes the agent's folder |53 | `internal/creator` | The mini-me creation assistant: drives `mm --acp-create` and writes the agent's folder |
54-| `internal/sbxcreate` | The sandbox creation assistant: kinds of agents (Claude, Gemini, Codex, Vibe), `sbxenv.yaml`, API keys and `sbx login` |54+| `internal/sbxcreate` | The sandbox creation assistant: kinds of agents (Claude, Gemini, Codex, Vibe, Copilot), `sbxenv.yaml`, API keys and `sbx login` |
55 | `internal/config` | Configuration file: load, validate, locate, create, save, watch |55 | `internal/config` | Configuration file: load, validate, locate, create, save, watch |
56 | `internal/events` | Events sent from Go to the interface |56 | `internal/events` | Events sent from Go to the interface |
57 | `internal/memory` | The memory pressure of the computer, shown in the Log panel |57 | `internal/memory` | The memory pressure of the computer, shown in the Log panel |
modified citizens/codex-acp/sbxenv.yaml +1 -0
@@ -1,3 +1,4 @@
1+# Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE
12 schemaVersion: "1"
23
34 name: codex-acp
@@ -1,3 +1,4 @@
1+# Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE
1 schemaVersion: "1"2 schemaVersion: "1"
2 3
3 name: codex-acp4 name: codex-acp
modified docs/en/README.md +1 -1
@@ -7,7 +7,7 @@ This documentation follows [Diátaxis](https://diataxis.fr): pick the section th
77 | You want to… | Section | Pages |
88 | --- | --- | --- |
99 | **learn** by doing | Tutorials | [Your first agent, without writing any configuration](tutorials/your-first-agent.md) · [A channel with two agents](tutorials/first-channel.md) · [Your first conversation with an agent](tutorials/first-conversation.md) · [Your first launch of Sidekicks](tutorials/first-launch.md) · [Your first ACP exchange with a test agent](tutorials/first-acp-exchange.md) |
10-| **do** a specific task | How-to guides | [Install Sidekicks](how-to/install-sidekicks.md) · [Create a mini-me agent](how-to/create-a-mini-me-agent.md) · [Create a Claude, Gemini, Codex or Vibe agent in a sandbox](how-to/create-an-agent-in-a-sandbox.md) · [Add an agent](how-to/add-an-agent.md) · [Work with an agent's files and terminal](how-to/work-with-an-agents-files.md) · [Run an agent in a Docker container](how-to/run-an-agent-in-docker.md) · [Run an agent in an sbx sandbox](how-to/run-an-agent-in-a-sandbox.md) · [Add a Claude agent in an sbx sandbox](how-to/add-a-claude-agent-in-a-sandbox.md) · [Add a Codex agent in an sbx sandbox](how-to/add-a-codex-agent-in-a-sandbox.md) · [Add a Gemini agent in an sbx sandbox](how-to/add-a-gemini-agent-in-a-sandbox.md) · [Join files to a message](how-to/join-files-to-a-message.md) · [Manage channels and their agents](how-to/manage-channels.md) · [Edit or switch the configuration](how-to/edit-or-switch-the-configuration.md) · [Reset Sidekicks](how-to/reset-sidekicks.md) · [Watch the memory pressure](how-to/watch-the-memory-pressure.md) · [Let an agent use Sidekicks' tools](how-to/use-sidekicks-tools-from-an-agent.md) · [Develop the application](how-to/develop-the-application.md) · [Run the tests](how-to/run-the-tests.md) · [Check a change before merging it](how-to/check-before-merging.md) · [Run a test agent](how-to/run-a-test-agent.md) · [Run the end-to-end scenarios (v0.1)](how-to/run-the-end-to-end-scenarios.md) · [Set the version](how-to/set-the-version.md) · [Publish a release](how-to/publish-a-release.md) · [Sign and notarize for macOS](how-to/sign-and-notarize-on-macos.md) · [Test issue #52 on macOS](how-to/test-issue-52-on-macos.md) · [Test issues #49 and #50 on macOS](how-to/test-issues-49-and-50-on-macos.md) · [Test issue #47 on macOS](how-to/test-issue-47-on-macos.md) · [Test milestone M4 on macOS](how-to/test-milestone-m4-on-macos.md) · [Test milestone M3 on macOS](how-to/test-milestone-m3-on-macos.md) · [Test milestone M2 on macOS](how-to/test-milestone-m2-on-macos.md) · [Test milestone M1 on macOS](how-to/test-milestone-m1-on-macos.md) · [Test milestone Initialize on macOS](how-to/test-milestone-initialize-on-macos.md) |
10+| **do** a specific task | How-to guides | [Install Sidekicks](how-to/install-sidekicks.md) · [Create a mini-me agent](how-to/create-a-mini-me-agent.md) · [Create a Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox](how-to/create-an-agent-in-a-sandbox.md) · [Add an agent](how-to/add-an-agent.md) · [Work with an agent's files and terminal](how-to/work-with-an-agents-files.md) · [Run an agent in a Docker container](how-to/run-an-agent-in-docker.md) · [Run an agent in an sbx sandbox](how-to/run-an-agent-in-a-sandbox.md) · [Add a Claude agent in an sbx sandbox](how-to/add-a-claude-agent-in-a-sandbox.md) · [Add a Codex agent in an sbx sandbox](how-to/add-a-codex-agent-in-a-sandbox.md) · [Add a Gemini agent in an sbx sandbox](how-to/add-a-gemini-agent-in-a-sandbox.md) · [Join files to a message](how-to/join-files-to-a-message.md) · [Manage channels and their agents](how-to/manage-channels.md) · [Edit or switch the configuration](how-to/edit-or-switch-the-configuration.md) · [Reset Sidekicks](how-to/reset-sidekicks.md) · [Watch the memory pressure](how-to/watch-the-memory-pressure.md) · [Let an agent use Sidekicks' tools](how-to/use-sidekicks-tools-from-an-agent.md) · [Develop the application](how-to/develop-the-application.md) · [Run the tests](how-to/run-the-tests.md) · [Check a change before merging it](how-to/check-before-merging.md) · [Run a test agent](how-to/run-a-test-agent.md) · [Run the end-to-end scenarios (v0.1)](how-to/run-the-end-to-end-scenarios.md) · [Set the version](how-to/set-the-version.md) · [Publish a release](how-to/publish-a-release.md) · [Sign and notarize for macOS](how-to/sign-and-notarize-on-macos.md) · [Test issue #52 on macOS](how-to/test-issue-52-on-macos.md) · [Test issues #49 and #50 on macOS](how-to/test-issues-49-and-50-on-macos.md) · [Test issue #47 on macOS](how-to/test-issue-47-on-macos.md) · [Test milestone M4 on macOS](how-to/test-milestone-m4-on-macos.md) · [Test milestone M3 on macOS](how-to/test-milestone-m3-on-macos.md) · [Test milestone M2 on macOS](how-to/test-milestone-m2-on-macos.md) · [Test milestone M1 on macOS](how-to/test-milestone-m1-on-macos.md) · [Test milestone Initialize on macOS](how-to/test-milestone-initialize-on-macos.md) |
1111 | **look up** an exact detail | Reference | [The configuration file](reference/configuration.md) · [Keyboard shortcuts](reference/keyboard-shortcuts.md) · [Agents, channels and events](reference/agents-and-events.md) · [Commands](reference/commands.md) · [scripts/agents.sh](reference/agents-script.md) |
1212 | **understand** why | Explanation | [Workspaces and terminals](explanation/workspaces-and-terminals.md) · [Channels and what each agent knows](explanation/channels-and-context.md) · [Permissions and trust](explanation/permissions.md) · [Why ACP](explanation/why-acp.md) · [The interface stack](explanation/ui-stack.md) · [Architecture](explanation/architecture.md) · [Memory and local models](explanation/memory-and-local-models.md) |
1313
@@ -7,7 +7,7 @@ This documentation follows [Diátaxis](https://diataxis.fr): pick the section th
7 | You want to… | Section | Pages |7 | You want to… | Section | Pages |
8 | --- | --- | --- |8 | --- | --- | --- |
9 | **learn** by doing | Tutorials | [Your first agent, without writing any configuration](tutorials/your-first-agent.md) · [A channel with two agents](tutorials/first-channel.md) · [Your first conversation with an agent](tutorials/first-conversation.md) · [Your first launch of Sidekicks](tutorials/first-launch.md) · [Your first ACP exchange with a test agent](tutorials/first-acp-exchange.md) |9 | **learn** by doing | Tutorials | [Your first agent, without writing any configuration](tutorials/your-first-agent.md) · [A channel with two agents](tutorials/first-channel.md) · [Your first conversation with an agent](tutorials/first-conversation.md) · [Your first launch of Sidekicks](tutorials/first-launch.md) · [Your first ACP exchange with a test agent](tutorials/first-acp-exchange.md) |
10-| **do** a specific task | How-to guides | [Install Sidekicks](how-to/install-sidekicks.md) · [Create a mini-me agent](how-to/create-a-mini-me-agent.md) · [Create a Claude, Gemini, Codex or Vibe agent in a sandbox](how-to/create-an-agent-in-a-sandbox.md) · [Add an agent](how-to/add-an-agent.md) · [Work with an agent's files and terminal](how-to/work-with-an-agents-files.md) · [Run an agent in a Docker container](how-to/run-an-agent-in-docker.md) · [Run an agent in an sbx sandbox](how-to/run-an-agent-in-a-sandbox.md) · [Add a Claude agent in an sbx sandbox](how-to/add-a-claude-agent-in-a-sandbox.md) · [Add a Codex agent in an sbx sandbox](how-to/add-a-codex-agent-in-a-sandbox.md) · [Add a Gemini agent in an sbx sandbox](how-to/add-a-gemini-agent-in-a-sandbox.md) · [Join files to a message](how-to/join-files-to-a-message.md) · [Manage channels and their agents](how-to/manage-channels.md) · [Edit or switch the configuration](how-to/edit-or-switch-the-configuration.md) · [Reset Sidekicks](how-to/reset-sidekicks.md) · [Watch the memory pressure](how-to/watch-the-memory-pressure.md) · [Let an agent use Sidekicks' tools](how-to/use-sidekicks-tools-from-an-agent.md) · [Develop the application](how-to/develop-the-application.md) · [Run the tests](how-to/run-the-tests.md) · [Check a change before merging it](how-to/check-before-merging.md) · [Run a test agent](how-to/run-a-test-agent.md) · [Run the end-to-end scenarios (v0.1)](how-to/run-the-end-to-end-scenarios.md) · [Set the version](how-to/set-the-version.md) · [Publish a release](how-to/publish-a-release.md) · [Sign and notarize for macOS](how-to/sign-and-notarize-on-macos.md) · [Test issue #52 on macOS](how-to/test-issue-52-on-macos.md) · [Test issues #49 and #50 on macOS](how-to/test-issues-49-and-50-on-macos.md) · [Test issue #47 on macOS](how-to/test-issue-47-on-macos.md) · [Test milestone M4 on macOS](how-to/test-milestone-m4-on-macos.md) · [Test milestone M3 on macOS](how-to/test-milestone-m3-on-macos.md) · [Test milestone M2 on macOS](how-to/test-milestone-m2-on-macos.md) · [Test milestone M1 on macOS](how-to/test-milestone-m1-on-macos.md) · [Test milestone Initialize on macOS](how-to/test-milestone-initialize-on-macos.md) |10+| **do** a specific task | How-to guides | [Install Sidekicks](how-to/install-sidekicks.md) · [Create a mini-me agent](how-to/create-a-mini-me-agent.md) · [Create a Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox](how-to/create-an-agent-in-a-sandbox.md) · [Add an agent](how-to/add-an-agent.md) · [Work with an agent's files and terminal](how-to/work-with-an-agents-files.md) · [Run an agent in a Docker container](how-to/run-an-agent-in-docker.md) · [Run an agent in an sbx sandbox](how-to/run-an-agent-in-a-sandbox.md) · [Add a Claude agent in an sbx sandbox](how-to/add-a-claude-agent-in-a-sandbox.md) · [Add a Codex agent in an sbx sandbox](how-to/add-a-codex-agent-in-a-sandbox.md) · [Add a Gemini agent in an sbx sandbox](how-to/add-a-gemini-agent-in-a-sandbox.md) · [Join files to a message](how-to/join-files-to-a-message.md) · [Manage channels and their agents](how-to/manage-channels.md) · [Edit or switch the configuration](how-to/edit-or-switch-the-configuration.md) · [Reset Sidekicks](how-to/reset-sidekicks.md) · [Watch the memory pressure](how-to/watch-the-memory-pressure.md) · [Let an agent use Sidekicks' tools](how-to/use-sidekicks-tools-from-an-agent.md) · [Develop the application](how-to/develop-the-application.md) · [Run the tests](how-to/run-the-tests.md) · [Check a change before merging it](how-to/check-before-merging.md) · [Run a test agent](how-to/run-a-test-agent.md) · [Run the end-to-end scenarios (v0.1)](how-to/run-the-end-to-end-scenarios.md) · [Set the version](how-to/set-the-version.md) · [Publish a release](how-to/publish-a-release.md) · [Sign and notarize for macOS](how-to/sign-and-notarize-on-macos.md) · [Test issue #52 on macOS](how-to/test-issue-52-on-macos.md) · [Test issues #49 and #50 on macOS](how-to/test-issues-49-and-50-on-macos.md) · [Test issue #47 on macOS](how-to/test-issue-47-on-macos.md) · [Test milestone M4 on macOS](how-to/test-milestone-m4-on-macos.md) · [Test milestone M3 on macOS](how-to/test-milestone-m3-on-macos.md) · [Test milestone M2 on macOS](how-to/test-milestone-m2-on-macos.md) · [Test milestone M1 on macOS](how-to/test-milestone-m1-on-macos.md) · [Test milestone Initialize on macOS](how-to/test-milestone-initialize-on-macos.md) |
11 | **look up** an exact detail | Reference | [The configuration file](reference/configuration.md) · [Keyboard shortcuts](reference/keyboard-shortcuts.md) · [Agents, channels and events](reference/agents-and-events.md) · [Commands](reference/commands.md) · [scripts/agents.sh](reference/agents-script.md) |11 | **look up** an exact detail | Reference | [The configuration file](reference/configuration.md) · [Keyboard shortcuts](reference/keyboard-shortcuts.md) · [Agents, channels and events](reference/agents-and-events.md) · [Commands](reference/commands.md) · [scripts/agents.sh](reference/agents-script.md) |
12 | **understand** why | Explanation | [Workspaces and terminals](explanation/workspaces-and-terminals.md) · [Channels and what each agent knows](explanation/channels-and-context.md) · [Permissions and trust](explanation/permissions.md) · [Why ACP](explanation/why-acp.md) · [The interface stack](explanation/ui-stack.md) · [Architecture](explanation/architecture.md) · [Memory and local models](explanation/memory-and-local-models.md) |12 | **understand** why | Explanation | [Workspaces and terminals](explanation/workspaces-and-terminals.md) · [Channels and what each agent knows](explanation/channels-and-context.md) · [Permissions and trust](explanation/permissions.md) · [Why ACP](explanation/why-acp.md) · [The interface stack](explanation/ui-stack.md) · [Architecture](explanation/architecture.md) · [Memory and local models](explanation/memory-and-local-models.md) |
13 13
modified docs/en/how-to/add-an-agent.md +1 -1
@@ -25,7 +25,7 @@ When the agent cannot be added (a name already used, for instance), the assistan
2525 ## See also
2626
2727 - To create a new mini-me agent by answering questions, with no file and no folder to choose: [How to create a mini-me agent](create-a-mini-me-agent.md)
28-- To create a new Claude, Gemini, Codex or Vibe agent in a sandbox the same way: [How to create a Claude, Gemini, Codex or Vibe agent in a sandbox](create-an-agent-in-a-sandbox.md)
28+- To create a new Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox the same way: [How to create a Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox](create-an-agent-in-a-sandbox.md)
2929 - What the assistant writes: [The configuration file](../reference/configuration.md)
3030 - [How to edit or switch the configuration](edit-or-switch-the-configuration.md)
3131 - [Tutorial: your first agent, without writing any configuration](../tutorials/your-first-agent.md)
@@ -25,7 +25,7 @@ When the agent cannot be added (a name already used, for instance), the assistan
25 ## See also25 ## See also
26 26
27 - To create a new mini-me agent by answering questions, with no file and no folder to choose: [How to create a mini-me agent](create-a-mini-me-agent.md)27 - To create a new mini-me agent by answering questions, with no file and no folder to choose: [How to create a mini-me agent](create-a-mini-me-agent.md)
28-- To create a new Claude, Gemini, Codex or Vibe agent in a sandbox the same way: [How to create a Claude, Gemini, Codex or Vibe agent in a sandbox](create-an-agent-in-a-sandbox.md)28+- To create a new Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox the same way: [How to create a Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox](create-an-agent-in-a-sandbox.md)
29 - What the assistant writes: [The configuration file](../reference/configuration.md)29 - What the assistant writes: [The configuration file](../reference/configuration.md)
30 - [How to edit or switch the configuration](edit-or-switch-the-configuration.md)30 - [How to edit or switch the configuration](edit-or-switch-the-configuration.md)
31 - [Tutorial: your first agent, without writing any configuration](../tutorials/your-first-agent.md)31 - [Tutorial: your first agent, without writing any configuration](../tutorials/your-first-agent.md)
modified docs/en/how-to/create-an-agent-in-a-sandbox.md +6 -5
@@ -1,12 +1,13 @@
1-# How to create a Claude, Gemini, Codex or Vibe agent in a sandbox
1+# How to create a Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox
22
3-This guide shows how to create a new Claude, Gemini, Codex or Vibe agent that runs in a Docker Sandbox, from the Sidekicks window, without writing a file or choosing a folder. It assumes [sbx](https://docs.docker.com/ai/sandboxes/) (Docker Sandboxes) is installed, and that you have an API key of the agent's company — or will get one during the steps. To add a sandbox that already exists, use [How to add an agent](add-an-agent.md) instead.
3+This guide shows how to create a new Claude, Gemini, Codex, Vibe or Copilot agent that runs in a Docker Sandbox, from the Sidekicks window, without writing a file or choosing a folder. It assumes [sbx](https://docs.docker.com/ai/sandboxes/) (Docker Sandboxes) is installed, and that you have an API key of the agent's company — or will get one during the steps (for Copilot: a GitHub account with a Copilot subscription). To add a sandbox that already exists, use [How to add an agent](add-an-agent.md) instead.
44
55 ## Steps
66
7-1. Open the assistant: **✨ Create a Claude, Gemini, Codex or Vibe agent** on the welcome screen, **✨ Create an agent in a sandbox** under the agents list, or **Create an agent in a sandbox** in the command palette (⌘K, Ctrl+K on Linux and Windows).
8-2. Choose the agent: **Claude** (Anthropic's Claude Code), **Gemini** (Google's, through Antigravity), **Codex** (OpenAI's) or **Vibe** (Mistral AI's).
7+1. Open the assistant: **✨ Create a Claude, Gemini, Codex, Vibe or Copilot agent** on the welcome screen, **✨ Create an agent in a sandbox** under the agents list, or **Create an agent in a sandbox** in the command palette (⌘K, Ctrl+K on Linux and Windows).
8+2. Choose the agent: **Claude** (Anthropic's Claude Code), **Gemini** (Google's, through Antigravity), **Codex** (OpenAI's), **Vibe** (Mistral AI's) or **Copilot** (GitHub's Copilot CLI).
99 3. If sbx does not hold its key yet, paste it in **API key** and click **Save the key**. **Get a key…** opens the page where the company gives you one. Sidekicks hands the key to sbx, which keeps it and gives it to your sandboxes for their calls to that company only; it is never written in a file. A key already saved is shown as **✓ Your … key is stored in sbx**.
10+ For **Copilot**, it is not an API key but a **GitHub token** allowed to use Copilot, and your GitHub account needs a Copilot subscription. If the GitHub CLI (`gh`) is installed, the simplest is **Use my GitHub account**: Sidekicks takes its token (`gh auth token`) without showing it. When `gh` is not signed in yet, **Sign in to GitHub** shows a code and **Open the sign-in page**: check the code on the page, confirm, and the assistant goes on by itself. Without `gh`, **Create a token on GitHub…** opens the page of a fine-grained token: give it the **Copilot Requests** permission, paste it in **GitHub token** and click **Save the token**. sbx stores it twice — `copilot`, for the sandbox's calls to Copilot, and `github`, for `git` and `gh` in the sandbox: the agent can then work on your GitHub repositories with your account.
1011 4. Give the agent its last details: **Name shown**, **Name** (what you call it with, `@claude`, and the name of its folder and of its sandbox: lowercase letters, digits and `-`, starting with a letter) and an **Emoji** (the agent's logo is chosen first). The **Name** follows the **Name shown** (`Marcel (assistant)` gives `marcel-assistant`) until you type it yourself; Sidekicks always suggests one nobody uses yet, and says so before you click when the one you typed is taken.
1112 5. Click **Add the agent**. Its conversation opens. Its sandbox is created the first time you write to it, so that first answer takes a while: the conversation shows what is happening — the step, the time elapsed, what sbx is downloading. The details are in the agent's log (**Log** panel).
1213
@@ -17,7 +18,7 @@ The agent's folder is created in the **Sidekicks-Agents** folder of your Documen
1718 - **"sbx (Docker Sandboxes) is not installed on this computer"**: install sbx, then click **Try again**.
1819 - **"sbx needs you to be signed in to Docker"**: click **Sign in to Docker**. Sidekicks shows a code: click **Open the sign-in page**, check that the page shows the same code, confirm and sign in with your Docker account (a free one is enough). The assistant goes on by itself once you are signed in. The same button appears under the error of an sbx agent that cannot start. If it does not work, type `sbx login` in a terminal once.
1920 - **"Another agent already has this name"**, **"A folder with this name already exists"** or **"A sandbox with this name already exists"**: change the **Name** and click **Add the agent** again. An existing folder or sandbox is never changed.
20-- **"No … key in sbx yet"** (after **Later**): the agent cannot answer. Run the assistant again to save the key, or type `sbx secret set anthropic` (`google` for Gemini, `openai` for Codex, `mistral` for Vibe) in a terminal.
21+- **"No … key in sbx yet"** (after **Later**): the agent cannot answer. Run the assistant again to save the key, or type `sbx secret set anthropic` (`google` for Gemini, `openai` for Codex, `mistral` for Vibe, `copilot` and `github` for Copilot — for example `sbx secret set copilot --command 'gh auth token'` then the same with `github`) in a terminal.
2122
2223 ## Variants
2324
@@ -1,12 +1,13 @@
1-# How to create a Claude, Gemini, Codex or Vibe agent in a sandbox1+# How to create a Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox
2 2
3-This guide shows how to create a new Claude, Gemini, Codex or Vibe agent that runs in a Docker Sandbox, from the Sidekicks window, without writing a file or choosing a folder. It assumes [sbx](https://docs.docker.com/ai/sandboxes/) (Docker Sandboxes) is installed, and that you have an API key of the agent's company — or will get one during the steps. To add a sandbox that already exists, use [How to add an agent](add-an-agent.md) instead.3+This guide shows how to create a new Claude, Gemini, Codex, Vibe or Copilot agent that runs in a Docker Sandbox, from the Sidekicks window, without writing a file or choosing a folder. It assumes [sbx](https://docs.docker.com/ai/sandboxes/) (Docker Sandboxes) is installed, and that you have an API key of the agent's company — or will get one during the steps (for Copilot: a GitHub account with a Copilot subscription). To add a sandbox that already exists, use [How to add an agent](add-an-agent.md) instead.
4 4
5 ## Steps5 ## Steps
6 6
7-1. Open the assistant: **✨ Create a Claude, Gemini, Codex or Vibe agent** on the welcome screen, **✨ Create an agent in a sandbox** under the agents list, or **Create an agent in a sandbox** in the command palette (⌘K, Ctrl+K on Linux and Windows).7+1. Open the assistant: **✨ Create a Claude, Gemini, Codex, Vibe or Copilot agent** on the welcome screen, **✨ Create an agent in a sandbox** under the agents list, or **Create an agent in a sandbox** in the command palette (⌘K, Ctrl+K on Linux and Windows).
8-2. Choose the agent: **Claude** (Anthropic's Claude Code), **Gemini** (Google's, through Antigravity), **Codex** (OpenAI's) or **Vibe** (Mistral AI's).8+2. Choose the agent: **Claude** (Anthropic's Claude Code), **Gemini** (Google's, through Antigravity), **Codex** (OpenAI's), **Vibe** (Mistral AI's) or **Copilot** (GitHub's Copilot CLI).
9 3. If sbx does not hold its key yet, paste it in **API key** and click **Save the key**. **Get a key…** opens the page where the company gives you one. Sidekicks hands the key to sbx, which keeps it and gives it to your sandboxes for their calls to that company only; it is never written in a file. A key already saved is shown as **✓ Your … key is stored in sbx**.9 3. If sbx does not hold its key yet, paste it in **API key** and click **Save the key**. **Get a key…** opens the page where the company gives you one. Sidekicks hands the key to sbx, which keeps it and gives it to your sandboxes for their calls to that company only; it is never written in a file. A key already saved is shown as **✓ Your … key is stored in sbx**.
10+ For **Copilot**, it is not an API key but a **GitHub token** allowed to use Copilot, and your GitHub account needs a Copilot subscription. If the GitHub CLI (`gh`) is installed, the simplest is **Use my GitHub account**: Sidekicks takes its token (`gh auth token`) without showing it. When `gh` is not signed in yet, **Sign in to GitHub** shows a code and **Open the sign-in page**: check the code on the page, confirm, and the assistant goes on by itself. Without `gh`, **Create a token on GitHub…** opens the page of a fine-grained token: give it the **Copilot Requests** permission, paste it in **GitHub token** and click **Save the token**. sbx stores it twice — `copilot`, for the sandbox's calls to Copilot, and `github`, for `git` and `gh` in the sandbox: the agent can then work on your GitHub repositories with your account.
10 4. Give the agent its last details: **Name shown**, **Name** (what you call it with, `@claude`, and the name of its folder and of its sandbox: lowercase letters, digits and `-`, starting with a letter) and an **Emoji** (the agent's logo is chosen first). The **Name** follows the **Name shown** (`Marcel (assistant)` gives `marcel-assistant`) until you type it yourself; Sidekicks always suggests one nobody uses yet, and says so before you click when the one you typed is taken.11 4. Give the agent its last details: **Name shown**, **Name** (what you call it with, `@claude`, and the name of its folder and of its sandbox: lowercase letters, digits and `-`, starting with a letter) and an **Emoji** (the agent's logo is chosen first). The **Name** follows the **Name shown** (`Marcel (assistant)` gives `marcel-assistant`) until you type it yourself; Sidekicks always suggests one nobody uses yet, and says so before you click when the one you typed is taken.
11 5. Click **Add the agent**. Its conversation opens. Its sandbox is created the first time you write to it, so that first answer takes a while: the conversation shows what is happening — the step, the time elapsed, what sbx is downloading. The details are in the agent's log (**Log** panel).12 5. Click **Add the agent**. Its conversation opens. Its sandbox is created the first time you write to it, so that first answer takes a while: the conversation shows what is happening — the step, the time elapsed, what sbx is downloading. The details are in the agent's log (**Log** panel).
12 13
@@ -17,7 +18,7 @@ The agent's folder is created in the **Sidekicks-Agents** folder of your Documen
17 - **"sbx (Docker Sandboxes) is not installed on this computer"**: install sbx, then click **Try again**.18 - **"sbx (Docker Sandboxes) is not installed on this computer"**: install sbx, then click **Try again**.
18 - **"sbx needs you to be signed in to Docker"**: click **Sign in to Docker**. Sidekicks shows a code: click **Open the sign-in page**, check that the page shows the same code, confirm and sign in with your Docker account (a free one is enough). The assistant goes on by itself once you are signed in. The same button appears under the error of an sbx agent that cannot start. If it does not work, type `sbx login` in a terminal once.19 - **"sbx needs you to be signed in to Docker"**: click **Sign in to Docker**. Sidekicks shows a code: click **Open the sign-in page**, check that the page shows the same code, confirm and sign in with your Docker account (a free one is enough). The assistant goes on by itself once you are signed in. The same button appears under the error of an sbx agent that cannot start. If it does not work, type `sbx login` in a terminal once.
19 - **"Another agent already has this name"**, **"A folder with this name already exists"** or **"A sandbox with this name already exists"**: change the **Name** and click **Add the agent** again. An existing folder or sandbox is never changed.20 - **"Another agent already has this name"**, **"A folder with this name already exists"** or **"A sandbox with this name already exists"**: change the **Name** and click **Add the agent** again. An existing folder or sandbox is never changed.
20-- **"No … key in sbx yet"** (after **Later**): the agent cannot answer. Run the assistant again to save the key, or type `sbx secret set anthropic` (`google` for Gemini, `openai` for Codex, `mistral` for Vibe) in a terminal.21+- **"No … key in sbx yet"** (after **Later**): the agent cannot answer. Run the assistant again to save the key, or type `sbx secret set anthropic` (`google` for Gemini, `openai` for Codex, `mistral` for Vibe, `copilot` and `github` for Copilot — for example `sbx secret set copilot --command 'gh auth token'` then the same with `github`) in a terminal.
21 22
22 ## Variants23 ## Variants
23 24
modified docs/en/reference/agents-and-events.md +7 -4
@@ -255,7 +255,7 @@ A `view` is `{messages[], form, written, name, title}`: mm's messages since the
255255
256256 ## `SbxCreatorService`
257257
258-The assistant that creates an agent in a Docker Sandbox (issue #96, [How to create a Claude, Gemini, Codex or Vibe agent in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)). The kinds it offers are a catalogue (`internal/sbxcreate`): one entry per kind, with what its `sbxenv.yaml` holds, how Sidekicks starts it, and its default icon: its brand's logo (issue #100).
258+The assistant that creates an agent in a Docker Sandbox (issue #96, [How to create a Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)). The kinds it offers are a catalogue (`internal/sbxcreate`): one entry per kind, with what its `sbxenv.yaml` holds, how Sidekicks starts it, and its default icon: its brand's logo (issue #100).
259259
260260 | Kind | `agent:` | Kit | Program in the sandbox | sbx secret |
261261 | --- | --- | --- | --- | --- |
@@ -263,15 +263,18 @@ The assistant that creates an agent in a Docker Sandbox (issue #96, [How to crea
263263 | `gemini` (`logo:gemini`) | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` |
264264 | `codex` (`logo:openai`) | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` |
265265 | `vibe` (`logo:mistral`) | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` |
266+| `copilot` (`logo:copilot`) | `copilot` | `docker.io/sbx/copilot-kit:latest` | `copilot --acp --stdio` | `copilot` and `github` (the same GitHub token, issue #103) |
266267
267268 | Method | Effect |
268269 | --- | --- |
269-| `Kinds()` | The catalogue, in order: `{id, title, icon, agent, kit, program, service, keyUrl}`. |
270-| `Check(kind)` | `sbx is not installed` when sbx cannot be found (`sbx` in PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Returns `{hasKey, name, agentsFolder, taken[]}` (`taken`: the names used by an agent, a folder or a sandbox, issue #99): whether `sbx secret ls --service <service>` shows a global secret, and the first free name among `<kind>`, `<kind>-2`… — free as an agent of the configuration, a folder of the agents' folder and a sandbox (`sbx ls -q`). |
271-| `SetKey(kind, key)` | `sbx secret set <service>` with the key on its standard input — never in its arguments, a file or a log; an error never repeats it. Global: every sandbox gets it. |
270+| `Kinds()` | The catalogue, in order: `{id, title, icon, agent, kit, program, service, keyUrl, token, fromGh}` (`token`: the secret is a token of the user's account, not an API key — Copilot; the assistant says "token"; `fromGh`: it can come from `gh auth token`). A kind may give its secret to more sbx services (Copilot: `github` too, with `api.github.com` and `github.com` in its `bindings`). |
271+| `Check(kind)` | `sbx is not installed` when sbx cannot be found (`sbx` in PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Returns `{hasKey, name, agentsFolder, taken[], gh, ghSignedIn}` (`hasKey`: every service of the kind holds a secret; `gh`, `ghSignedIn`: for a kind with `fromGh`, whether gh is installed and has a token) (`taken`: the names used by an agent, a folder or a sandbox, issue #99): whether `sbx secret ls --service <service>` shows a global secret, and the first free name among `<kind>`, `<kind>-2`… — free as an agent of the configuration, a folder of the agents' folder and a sandbox (`sbx ls -q`). |
272+| `SetKey(kind, key)` | `sbx secret set <service>` for each service of the kind, with the key on its standard input — never in its arguments, a file or a log; an error never repeats it. Global: every sandbox gets it. |
272273 | `Login()` | Runs `sbx login` (issue #97) — or joins the one in progress — and returns once sbx printed its device code and URL, 20 seconds at most: `{code, url, done, user, error, output[]}`. The code is the first `XXXX-XXXX`, the URL the first `https://…` naming `login`; `output` keeps every line for when sbx prints something else. Its standard input is empty: a question asked on the keyboard gets no answer. |
273274 | `LoginStatus()` | Waits, 20 seconds at most, for `sbx login` to end and returns the same state; `done` with `user` (from `Signed in as <user>.`) when signed in, else `error` (`cancelled` after `CancelLogin`). The interface calls it again until `done`. |
274275 | `CancelLogin()` | Stops `sbx login`; also done when Sidekicks quits. |
276+| `UseGitHub(kind)` | For a kind with `fromGh` (issue #103): runs `gh auth token` and stores what it prints as with `SetKey` — as `sbx secret set <service> --command 'gh auth token'` would, for each service. `gh is not signed in to GitHub` when gh has no token, `gh is not installed` without gh (`gh` in PATH, `/opt/homebrew/bin`, `/usr/local/bin`). The token is never shown, written or logged. |
277+| `GitHubLogin()`, `GitHubLoginStatus()`, `CancelGitHubLogin()` | Like `Login`, `LoginStatus` and `CancelLogin`, for `gh auth login --web --hostname github.com --git-protocol https` (issue #103): its code (`XXXX-XXXX`), its URL (`https://github.com/login/device`), then `user` from `✓ Logged in as <user>`. |
275278 | `Create({kind, name, title, icon})` | Writes `<agentsFolder>/<name>/sbxenv.yaml` (`name: <name>`, the kind's `agent:` and kit, `workspace: ./workspace`, `bindings` of its service, `pullPolicy: always`, English comments) and `workspace/`, then adds the agent: `sbx exec -i <name> <program>`, workspace `<folder>/workspace`, `runtime.lifecycle` in `<folder>` (`sbx env create --force`, `sbx stop <name>`, `sbx env rm --force`) — the sandbox is created at the first start. Returns `{problem, problems[], name, folder}`: `problem` is `invalidName` (lowercase letters, digits and `-`: no `_`, which sbx refuses), `nameTaken`, `folderExists` or `sandboxExists` when nothing was written. |
276279
277280 ## Tools offered to the agents
@@ -255,7 +255,7 @@ A `view` is `{messages[], form, written, name, title}`: mm's messages since the
255 255
256 ## `SbxCreatorService`256 ## `SbxCreatorService`
257 257
258-The assistant that creates an agent in a Docker Sandbox (issue #96, [How to create a Claude, Gemini, Codex or Vibe agent in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)). The kinds it offers are a catalogue (`internal/sbxcreate`): one entry per kind, with what its `sbxenv.yaml` holds, how Sidekicks starts it, and its default icon: its brand's logo (issue #100).258+The assistant that creates an agent in a Docker Sandbox (issue #96, [How to create a Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)). The kinds it offers are a catalogue (`internal/sbxcreate`): one entry per kind, with what its `sbxenv.yaml` holds, how Sidekicks starts it, and its default icon: its brand's logo (issue #100).
259 259
260 | Kind | `agent:` | Kit | Program in the sandbox | sbx secret |260 | Kind | `agent:` | Kit | Program in the sandbox | sbx secret |
261 | --- | --- | --- | --- | --- |261 | --- | --- | --- | --- | --- |
@@ -263,15 +263,18 @@ The assistant that creates an agent in a Docker Sandbox (issue #96, [How to crea
263 | `gemini` (`logo:gemini`) | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` |263 | `gemini` (`logo:gemini`) | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` |
264 | `codex` (`logo:openai`) | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` |264 | `codex` (`logo:openai`) | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` |
265 | `vibe` (`logo:mistral`) | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` |265 | `vibe` (`logo:mistral`) | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` |
266+| `copilot` (`logo:copilot`) | `copilot` | `docker.io/sbx/copilot-kit:latest` | `copilot --acp --stdio` | `copilot` and `github` (the same GitHub token, issue #103) |
266 267
267 | Method | Effect |268 | Method | Effect |
268 | --- | --- |269 | --- | --- |
269-| `Kinds()` | The catalogue, in order: `{id, title, icon, agent, kit, program, service, keyUrl}`. |270+| `Kinds()` | The catalogue, in order: `{id, title, icon, agent, kit, program, service, keyUrl, token, fromGh}` (`token`: the secret is a token of the user's account, not an API key — Copilot; the assistant says "token"; `fromGh`: it can come from `gh auth token`). A kind may give its secret to more sbx services (Copilot: `github` too, with `api.github.com` and `github.com` in its `bindings`). |
270-| `Check(kind)` | `sbx is not installed` when sbx cannot be found (`sbx` in PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Returns `{hasKey, name, agentsFolder, taken[]}` (`taken`: the names used by an agent, a folder or a sandbox, issue #99): whether `sbx secret ls --service <service>` shows a global secret, and the first free name among `<kind>`, `<kind>-2`… — free as an agent of the configuration, a folder of the agents' folder and a sandbox (`sbx ls -q`). |271+| `Check(kind)` | `sbx is not installed` when sbx cannot be found (`sbx` in PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Returns `{hasKey, name, agentsFolder, taken[], gh, ghSignedIn}` (`hasKey`: every service of the kind holds a secret; `gh`, `ghSignedIn`: for a kind with `fromGh`, whether gh is installed and has a token) (`taken`: the names used by an agent, a folder or a sandbox, issue #99): whether `sbx secret ls --service <service>` shows a global secret, and the first free name among `<kind>`, `<kind>-2`… — free as an agent of the configuration, a folder of the agents' folder and a sandbox (`sbx ls -q`). |
271-| `SetKey(kind, key)` | `sbx secret set <service>` with the key on its standard input — never in its arguments, a file or a log; an error never repeats it. Global: every sandbox gets it. |272+| `SetKey(kind, key)` | `sbx secret set <service>` for each service of the kind, with the key on its standard input — never in its arguments, a file or a log; an error never repeats it. Global: every sandbox gets it. |
272 | `Login()` | Runs `sbx login` (issue #97) — or joins the one in progress — and returns once sbx printed its device code and URL, 20 seconds at most: `{code, url, done, user, error, output[]}`. The code is the first `XXXX-XXXX`, the URL the first `https://…` naming `login`; `output` keeps every line for when sbx prints something else. Its standard input is empty: a question asked on the keyboard gets no answer. |273 | `Login()` | Runs `sbx login` (issue #97) — or joins the one in progress — and returns once sbx printed its device code and URL, 20 seconds at most: `{code, url, done, user, error, output[]}`. The code is the first `XXXX-XXXX`, the URL the first `https://…` naming `login`; `output` keeps every line for when sbx prints something else. Its standard input is empty: a question asked on the keyboard gets no answer. |
273 | `LoginStatus()` | Waits, 20 seconds at most, for `sbx login` to end and returns the same state; `done` with `user` (from `Signed in as <user>.`) when signed in, else `error` (`cancelled` after `CancelLogin`). The interface calls it again until `done`. |274 | `LoginStatus()` | Waits, 20 seconds at most, for `sbx login` to end and returns the same state; `done` with `user` (from `Signed in as <user>.`) when signed in, else `error` (`cancelled` after `CancelLogin`). The interface calls it again until `done`. |
274 | `CancelLogin()` | Stops `sbx login`; also done when Sidekicks quits. |275 | `CancelLogin()` | Stops `sbx login`; also done when Sidekicks quits. |
276+| `UseGitHub(kind)` | For a kind with `fromGh` (issue #103): runs `gh auth token` and stores what it prints as with `SetKey` — as `sbx secret set <service> --command 'gh auth token'` would, for each service. `gh is not signed in to GitHub` when gh has no token, `gh is not installed` without gh (`gh` in PATH, `/opt/homebrew/bin`, `/usr/local/bin`). The token is never shown, written or logged. |
277+| `GitHubLogin()`, `GitHubLoginStatus()`, `CancelGitHubLogin()` | Like `Login`, `LoginStatus` and `CancelLogin`, for `gh auth login --web --hostname github.com --git-protocol https` (issue #103): its code (`XXXX-XXXX`), its URL (`https://github.com/login/device`), then `user` from `✓ Logged in as <user>`. |
275 | `Create({kind, name, title, icon})` | Writes `<agentsFolder>/<name>/sbxenv.yaml` (`name: <name>`, the kind's `agent:` and kit, `workspace: ./workspace`, `bindings` of its service, `pullPolicy: always`, English comments) and `workspace/`, then adds the agent: `sbx exec -i <name> <program>`, workspace `<folder>/workspace`, `runtime.lifecycle` in `<folder>` (`sbx env create --force`, `sbx stop <name>`, `sbx env rm --force`) — the sandbox is created at the first start. Returns `{problem, problems[], name, folder}`: `problem` is `invalidName` (lowercase letters, digits and `-`: no `_`, which sbx refuses), `nameTaken`, `folderExists` or `sandboxExists` when nothing was written. |278 | `Create({kind, name, title, icon})` | Writes `<agentsFolder>/<name>/sbxenv.yaml` (`name: <name>`, the kind's `agent:` and kit, `workspace: ./workspace`, `bindings` of its service, `pullPolicy: always`, English comments) and `workspace/`, then adds the agent: `sbx exec -i <name> <program>`, workspace `<folder>/workspace`, `runtime.lifecycle` in `<folder>` (`sbx env create --force`, `sbx stop <name>`, `sbx env rm --force`) — the sandbox is created at the first start. Returns `{problem, problems[], name, folder}`: `problem` is `invalidName` (lowercase letters, digits and `-`: no `_`, which sbx refuses), `nameTaken`, `folderExists` or `sandboxExists` when nothing was written. |
276 279
277 ## Tools offered to the agents280 ## Tools offered to the agents
modified docs/en/reference/configuration.md +2 -2
@@ -39,7 +39,7 @@ The file is looked up in this order; the first one that applies wins:
3939 | `ui` | object | no | | Interface preferences. |
4040 | `limits` | object | no | | Resource limits. |
4141 | `agentTools` | object | no | | The tools Sidekicks offers the agents ([below](#agenttools)). |
42-| `agentsFolder` | path | no | `~/Documents/Sidekicks-Agents` | Where the assistants that create agents make one folder per agent ([mini-me](../how-to/create-a-mini-me-agent.md), [Claude, Gemini, Codex, Vibe in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)): absolute, `~/…`, or relative to this file. Created when missing. |
42+| `agentsFolder` | path | no | `~/Documents/Sidekicks-Agents` | Where the assistants that create agents make one folder per agent ([mini-me](../how-to/create-a-mini-me-agent.md), [Claude, Gemini, Codex, Vibe, Copilot in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)): absolute, `~/…`, or relative to this file. Created when missing. |
4343 | `agents` | list of agents | yes | | The agents available with `@name`. May be empty. |
4444 | `channels` | list of channels | no | `[]` | Channels created at startup when they do not exist yet. |
4545
@@ -83,7 +83,7 @@ agentTools:
8383 | --- | --- | --- | --- | --- |
8484 | `name` | identifier | yes | | Lowercase letters, digits, `-`, `_`; starts with a letter; 32 characters at most. Used as `@name` and `/name:command`. **Unique.** |
8585 | `title` | text | no | `name` | Name shown in the interface. |
86-| `icon` | text (an emoji, a letter or `logo:<name>`) | no | | Shown next to the agent. An emoji is shown as it is; `logo:claude`, `logo:gemini`, `logo:openai` or `logo:mistral` shows that brand's logo on a light disc (another name is a warning, and shows a letter); otherwise its first letter is shown in a coloured circle (the colour depends on `name`). Without `icon`, the circle holds the first letter of `title`. |
86+| `icon` | text (an emoji, a letter or `logo:<name>`) | no | | Shown next to the agent. An emoji is shown as it is; `logo:claude`, `logo:gemini`, `logo:openai`, `logo:mistral` or `logo:copilot` shows that brand's logo on a light disc (another name is a warning, and shows a letter); otherwise its first letter is shown in a coloured circle (the colour depends on `name`). Without `icon`, the circle holds the first letter of `title`. |
8787 | `description` | text | no | | One sentence shown in the `@` list. |
8888 | `command` | text | yes | | Program serving ACP on stdio. |
8989 | `args` | list of text | no | `[]` | Its arguments. |
@@ -39,7 +39,7 @@ The file is looked up in this order; the first one that applies wins:
39 | `ui` | object | no | | Interface preferences. |39 | `ui` | object | no | | Interface preferences. |
40 | `limits` | object | no | | Resource limits. |40 | `limits` | object | no | | Resource limits. |
41 | `agentTools` | object | no | | The tools Sidekicks offers the agents ([below](#agenttools)). |41 | `agentTools` | object | no | | The tools Sidekicks offers the agents ([below](#agenttools)). |
42-| `agentsFolder` | path | no | `~/Documents/Sidekicks-Agents` | Where the assistants that create agents make one folder per agent ([mini-me](../how-to/create-a-mini-me-agent.md), [Claude, Gemini, Codex, Vibe in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)): absolute, `~/…`, or relative to this file. Created when missing. |42+| `agentsFolder` | path | no | `~/Documents/Sidekicks-Agents` | Where the assistants that create agents make one folder per agent ([mini-me](../how-to/create-a-mini-me-agent.md), [Claude, Gemini, Codex, Vibe, Copilot in a sandbox](../how-to/create-an-agent-in-a-sandbox.md)): absolute, `~/…`, or relative to this file. Created when missing. |
43 | `agents` | list of agents | yes | | The agents available with `@name`. May be empty. |43 | `agents` | list of agents | yes | | The agents available with `@name`. May be empty. |
44 | `channels` | list of channels | no | `[]` | Channels created at startup when they do not exist yet. |44 | `channels` | list of channels | no | `[]` | Channels created at startup when they do not exist yet. |
45 45
@@ -83,7 +83,7 @@ agentTools:
83 | --- | --- | --- | --- | --- |83 | --- | --- | --- | --- | --- |
84 | `name` | identifier | yes | | Lowercase letters, digits, `-`, `_`; starts with a letter; 32 characters at most. Used as `@name` and `/name:command`. **Unique.** |84 | `name` | identifier | yes | | Lowercase letters, digits, `-`, `_`; starts with a letter; 32 characters at most. Used as `@name` and `/name:command`. **Unique.** |
85 | `title` | text | no | `name` | Name shown in the interface. |85 | `title` | text | no | `name` | Name shown in the interface. |
86-| `icon` | text (an emoji, a letter or `logo:<name>`) | no | | Shown next to the agent. An emoji is shown as it is; `logo:claude`, `logo:gemini`, `logo:openai` or `logo:mistral` shows that brand's logo on a light disc (another name is a warning, and shows a letter); otherwise its first letter is shown in a coloured circle (the colour depends on `name`). Without `icon`, the circle holds the first letter of `title`. |86+| `icon` | text (an emoji, a letter or `logo:<name>`) | no | | Shown next to the agent. An emoji is shown as it is; `logo:claude`, `logo:gemini`, `logo:openai`, `logo:mistral` or `logo:copilot` shows that brand's logo on a light disc (another name is a warning, and shows a letter); otherwise its first letter is shown in a coloured circle (the colour depends on `name`). Without `icon`, the circle holds the first letter of `title`. |
87 | `description` | text | no | | One sentence shown in the `@` list. |87 | `description` | text | no | | One sentence shown in the `@` list. |
88 | `command` | text | yes | | Program serving ACP on stdio. |88 | `command` | text | yes | | Program serving ACP on stdio. |
89 | `args` | list of text | no | `[]` | Its arguments. |89 | `args` | list of text | no | `[]` | Its arguments. |
modified docs/en/reference/keyboard-shortcuts.md +1 -1
@@ -25,7 +25,7 @@ On Linux and Windows, when the cursor is in an agent's terminal, the terminal ke
2525 | Enter | Runs the selection |
2626 | Escape, or a click outside | Closes the palette |
2727
28-The palette lists, in order: the channels, a conversation per agent, the files of each agent, the actions of the table above, **Create a mini-me agent**, **Create an agent in a sandbox (Claude, Gemini, Codex, Vibe)** and **Open a configuration…**.
28+The palette lists, in order: the channels, a conversation per agent, the files of each agent, the actions of the table above, **Create a mini-me agent**, **Create an agent in a sandbox (Claude, Gemini, Codex, Vibe, Copilot)** and **Open a configuration…**.
2929
3030 ## Message box
3131
@@ -25,7 +25,7 @@ On Linux and Windows, when the cursor is in an agent's terminal, the terminal ke
25 | Enter | Runs the selection |25 | Enter | Runs the selection |
26 | Escape, or a click outside | Closes the palette |26 | Escape, or a click outside | Closes the palette |
27 27
28-The palette lists, in order: the channels, a conversation per agent, the files of each agent, the actions of the table above, **Create a mini-me agent**, **Create an agent in a sandbox (Claude, Gemini, Codex, Vibe)** and **Open a configuration…**.28+The palette lists, in order: the channels, a conversation per agent, the files of each agent, the actions of the table above, **Create a mini-me agent**, **Create an agent in a sandbox (Claude, Gemini, Codex, Vibe, Copilot)** and **Open a configuration…**.
29 29
30 ## Message box30 ## Message box
31 31
modified docs/fr/README.md +1 -1
@@ -7,7 +7,7 @@ Cette documentation suit la méthode [Diátaxis](https://diataxis.fr) : choisiss
77 | Vous voulez… | Section | Pages |
88 | --- | --- | --- |
99 | **apprendre** en pratiquant | Tutoriels | [Votre premier agent, sans écrire de configuration](tutorials/premier-agent.md) · [Un channel avec deux agents](tutorials/premier-channel.md) · [Votre première conversation avec un agent](tutorials/premiere-conversation.md) · [Votre premier lancement de Sidekicks](tutorials/premier-lancement.md) · [Votre premier échange ACP avec un agent de test](tutorials/premier-echange-acp.md) |
10-| **réaliser** une tâche précise | Guides pratiques | [Installer Sidekicks](how-to/installer-sidekicks.md) · [Créer un agent mini-me](how-to/creer-un-agent-mini-me.md) · [Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox](how-to/creer-un-agent-dans-une-sandbox.md) · [Ajouter un agent](how-to/ajouter-un-agent.md) · [Travailler avec les fichiers et le terminal d'un agent](how-to/fichiers-et-terminal-d-un-agent.md) · [Lancer un agent dans un conteneur Docker](how-to/lancer-un-agent-dans-docker.md) · [Lancer un agent dans une sandbox sbx](how-to/lancer-un-agent-dans-une-sandbox.md) · [Ajouter un agent Claude dans une sandbox sbx](how-to/ajouter-un-agent-claude-dans-une-sandbox.md) · [Ajouter un agent Codex dans une sandbox sbx](how-to/ajouter-un-agent-codex-dans-une-sandbox.md) · [Ajouter un agent Gemini dans une sandbox sbx](how-to/ajouter-un-agent-gemini-dans-une-sandbox.md) · [Joindre des fichiers à un message](how-to/joindre-des-fichiers-a-un-message.md) · [Gérer les channels et leurs agents](how-to/gerer-les-channels.md) · [Modifier ou changer la configuration](how-to/modifier-ou-changer-la-configuration.md) · [Repartir de zéro](how-to/repartir-de-zero.md) · [Surveiller la pression mémoire](how-to/surveiller-la-pression-memoire.md) · [Laisser un agent utiliser les outils de Sidekicks](how-to/utiliser-les-outils-de-sidekicks-depuis-un-agent.md) · [Développer l'application](how-to/developper-l-application.md) · [Lancer les tests](how-to/lancer-les-tests.md) · [Vérifier une modification avant de la fusionner](how-to/verifier-avant-de-fusionner.md) · [Lancer un agent de test](how-to/lancer-un-agent-de-test.md) · [Dérouler les scénarios de bout en bout (v0.1)](how-to/derouler-les-scenarios-de-bout-en-bout.md) · [Définir la version](how-to/definir-la-version.md) · [Tester la CI locale (temporaire)](how-to/tester-la-ci-locale.md) · [Publier une release](how-to/publier-une-release.md) · [Signer et notariser pour macOS](how-to/signer-et-notariser-sous-macos.md) · [Tester l'issue #52 sous macOS](how-to/tester-l-issue-52-sous-macos.md) · [Tester les issues #49 et #50 sous macOS](how-to/tester-les-issues-49-et-50-sous-macos.md) · [Tester l'issue #47 sous macOS](how-to/tester-l-issue-47-sous-macos.md) · [Tester la milestone M4 sous macOS](how-to/tester-la-milestone-m4-sous-macos.md) · [Tester la milestone M3 sous macOS](how-to/tester-la-milestone-m3-sous-macos.md) · [Tester la milestone M2 sous macOS](how-to/tester-la-milestone-m2-sous-macos.md) · [Tester la milestone M1 sous macOS](how-to/tester-la-milestone-m1-sous-macos.md) · [Tester la milestone Initialize sous macOS](how-to/tester-la-milestone-initialize-sous-macos.md) |
10+| **réaliser** une tâche précise | Guides pratiques | [Installer Sidekicks](how-to/installer-sidekicks.md) · [Créer un agent mini-me](how-to/creer-un-agent-mini-me.md) · [Créer un agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox](how-to/creer-un-agent-dans-une-sandbox.md) · [Ajouter un agent](how-to/ajouter-un-agent.md) · [Travailler avec les fichiers et le terminal d'un agent](how-to/fichiers-et-terminal-d-un-agent.md) · [Lancer un agent dans un conteneur Docker](how-to/lancer-un-agent-dans-docker.md) · [Lancer un agent dans une sandbox sbx](how-to/lancer-un-agent-dans-une-sandbox.md) · [Ajouter un agent Claude dans une sandbox sbx](how-to/ajouter-un-agent-claude-dans-une-sandbox.md) · [Ajouter un agent Codex dans une sandbox sbx](how-to/ajouter-un-agent-codex-dans-une-sandbox.md) · [Ajouter un agent Gemini dans une sandbox sbx](how-to/ajouter-un-agent-gemini-dans-une-sandbox.md) · [Joindre des fichiers à un message](how-to/joindre-des-fichiers-a-un-message.md) · [Gérer les channels et leurs agents](how-to/gerer-les-channels.md) · [Modifier ou changer la configuration](how-to/modifier-ou-changer-la-configuration.md) · [Repartir de zéro](how-to/repartir-de-zero.md) · [Surveiller la pression mémoire](how-to/surveiller-la-pression-memoire.md) · [Laisser un agent utiliser les outils de Sidekicks](how-to/utiliser-les-outils-de-sidekicks-depuis-un-agent.md) · [Développer l'application](how-to/developper-l-application.md) · [Lancer les tests](how-to/lancer-les-tests.md) · [Vérifier une modification avant de la fusionner](how-to/verifier-avant-de-fusionner.md) · [Lancer un agent de test](how-to/lancer-un-agent-de-test.md) · [Dérouler les scénarios de bout en bout (v0.1)](how-to/derouler-les-scenarios-de-bout-en-bout.md) · [Définir la version](how-to/definir-la-version.md) · [Tester la CI locale (temporaire)](how-to/tester-la-ci-locale.md) · [Publier une release](how-to/publier-une-release.md) · [Signer et notariser pour macOS](how-to/signer-et-notariser-sous-macos.md) · [Tester l'issue #52 sous macOS](how-to/tester-l-issue-52-sous-macos.md) · [Tester les issues #49 et #50 sous macOS](how-to/tester-les-issues-49-et-50-sous-macos.md) · [Tester l'issue #47 sous macOS](how-to/tester-l-issue-47-sous-macos.md) · [Tester la milestone M4 sous macOS](how-to/tester-la-milestone-m4-sous-macos.md) · [Tester la milestone M3 sous macOS](how-to/tester-la-milestone-m3-sous-macos.md) · [Tester la milestone M2 sous macOS](how-to/tester-la-milestone-m2-sous-macos.md) · [Tester la milestone M1 sous macOS](how-to/tester-la-milestone-m1-sous-macos.md) · [Tester la milestone Initialize sous macOS](how-to/tester-la-milestone-initialize-sous-macos.md) |
1111 | **consulter** un détail exact | Référence | [Le fichier de configuration](reference/configuration.md) · [Raccourcis clavier](reference/raccourcis-clavier.md) · [Agents, channels et événements](reference/agents-et-evenements.md) · [Commandes](reference/commandes.md) · [scripts/agents.sh](reference/script-agents.md) |
1212 | **comprendre** le pourquoi | Explications | [Workspaces et terminaux](explanation/workspaces-et-terminaux.md) · [Les channels et ce que sait chaque agent](explanation/channels-et-contexte.md) · [Permissions et confiance](explanation/permissions-et-confiance.md) · [Pourquoi ACP](explanation/pourquoi-acp.md) · [La stack de l'interface](explanation/stack-interface.md) · [Architecture](explanation/architecture.md) · [Mémoire et modèles locaux](explanation/memoire-et-modeles-locaux.md) |
1313
@@ -7,7 +7,7 @@ Cette documentation suit la méthode [Diátaxis](https://diataxis.fr) : choisiss
7 | Vous voulez… | Section | Pages |7 | Vous voulez… | Section | Pages |
8 | --- | --- | --- |8 | --- | --- | --- |
9 | **apprendre** en pratiquant | Tutoriels | [Votre premier agent, sans écrire de configuration](tutorials/premier-agent.md) · [Un channel avec deux agents](tutorials/premier-channel.md) · [Votre première conversation avec un agent](tutorials/premiere-conversation.md) · [Votre premier lancement de Sidekicks](tutorials/premier-lancement.md) · [Votre premier échange ACP avec un agent de test](tutorials/premier-echange-acp.md) |9 | **apprendre** en pratiquant | Tutoriels | [Votre premier agent, sans écrire de configuration](tutorials/premier-agent.md) · [Un channel avec deux agents](tutorials/premier-channel.md) · [Votre première conversation avec un agent](tutorials/premiere-conversation.md) · [Votre premier lancement de Sidekicks](tutorials/premier-lancement.md) · [Votre premier échange ACP avec un agent de test](tutorials/premier-echange-acp.md) |
10-| **réaliser** une tâche précise | Guides pratiques | [Installer Sidekicks](how-to/installer-sidekicks.md) · [Créer un agent mini-me](how-to/creer-un-agent-mini-me.md) · [Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox](how-to/creer-un-agent-dans-une-sandbox.md) · [Ajouter un agent](how-to/ajouter-un-agent.md) · [Travailler avec les fichiers et le terminal d'un agent](how-to/fichiers-et-terminal-d-un-agent.md) · [Lancer un agent dans un conteneur Docker](how-to/lancer-un-agent-dans-docker.md) · [Lancer un agent dans une sandbox sbx](how-to/lancer-un-agent-dans-une-sandbox.md) · [Ajouter un agent Claude dans une sandbox sbx](how-to/ajouter-un-agent-claude-dans-une-sandbox.md) · [Ajouter un agent Codex dans une sandbox sbx](how-to/ajouter-un-agent-codex-dans-une-sandbox.md) · [Ajouter un agent Gemini dans une sandbox sbx](how-to/ajouter-un-agent-gemini-dans-une-sandbox.md) · [Joindre des fichiers à un message](how-to/joindre-des-fichiers-a-un-message.md) · [Gérer les channels et leurs agents](how-to/gerer-les-channels.md) · [Modifier ou changer la configuration](how-to/modifier-ou-changer-la-configuration.md) · [Repartir de zéro](how-to/repartir-de-zero.md) · [Surveiller la pression mémoire](how-to/surveiller-la-pression-memoire.md) · [Laisser un agent utiliser les outils de Sidekicks](how-to/utiliser-les-outils-de-sidekicks-depuis-un-agent.md) · [Développer l'application](how-to/developper-l-application.md) · [Lancer les tests](how-to/lancer-les-tests.md) · [Vérifier une modification avant de la fusionner](how-to/verifier-avant-de-fusionner.md) · [Lancer un agent de test](how-to/lancer-un-agent-de-test.md) · [Dérouler les scénarios de bout en bout (v0.1)](how-to/derouler-les-scenarios-de-bout-en-bout.md) · [Définir la version](how-to/definir-la-version.md) · [Tester la CI locale (temporaire)](how-to/tester-la-ci-locale.md) · [Publier une release](how-to/publier-une-release.md) · [Signer et notariser pour macOS](how-to/signer-et-notariser-sous-macos.md) · [Tester l'issue #52 sous macOS](how-to/tester-l-issue-52-sous-macos.md) · [Tester les issues #49 et #50 sous macOS](how-to/tester-les-issues-49-et-50-sous-macos.md) · [Tester l'issue #47 sous macOS](how-to/tester-l-issue-47-sous-macos.md) · [Tester la milestone M4 sous macOS](how-to/tester-la-milestone-m4-sous-macos.md) · [Tester la milestone M3 sous macOS](how-to/tester-la-milestone-m3-sous-macos.md) · [Tester la milestone M2 sous macOS](how-to/tester-la-milestone-m2-sous-macos.md) · [Tester la milestone M1 sous macOS](how-to/tester-la-milestone-m1-sous-macos.md) · [Tester la milestone Initialize sous macOS](how-to/tester-la-milestone-initialize-sous-macos.md) |10+| **réaliser** une tâche précise | Guides pratiques | [Installer Sidekicks](how-to/installer-sidekicks.md) · [Créer un agent mini-me](how-to/creer-un-agent-mini-me.md) · [Créer un agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox](how-to/creer-un-agent-dans-une-sandbox.md) · [Ajouter un agent](how-to/ajouter-un-agent.md) · [Travailler avec les fichiers et le terminal d'un agent](how-to/fichiers-et-terminal-d-un-agent.md) · [Lancer un agent dans un conteneur Docker](how-to/lancer-un-agent-dans-docker.md) · [Lancer un agent dans une sandbox sbx](how-to/lancer-un-agent-dans-une-sandbox.md) · [Ajouter un agent Claude dans une sandbox sbx](how-to/ajouter-un-agent-claude-dans-une-sandbox.md) · [Ajouter un agent Codex dans une sandbox sbx](how-to/ajouter-un-agent-codex-dans-une-sandbox.md) · [Ajouter un agent Gemini dans une sandbox sbx](how-to/ajouter-un-agent-gemini-dans-une-sandbox.md) · [Joindre des fichiers à un message](how-to/joindre-des-fichiers-a-un-message.md) · [Gérer les channels et leurs agents](how-to/gerer-les-channels.md) · [Modifier ou changer la configuration](how-to/modifier-ou-changer-la-configuration.md) · [Repartir de zéro](how-to/repartir-de-zero.md) · [Surveiller la pression mémoire](how-to/surveiller-la-pression-memoire.md) · [Laisser un agent utiliser les outils de Sidekicks](how-to/utiliser-les-outils-de-sidekicks-depuis-un-agent.md) · [Développer l'application](how-to/developper-l-application.md) · [Lancer les tests](how-to/lancer-les-tests.md) · [Vérifier une modification avant de la fusionner](how-to/verifier-avant-de-fusionner.md) · [Lancer un agent de test](how-to/lancer-un-agent-de-test.md) · [Dérouler les scénarios de bout en bout (v0.1)](how-to/derouler-les-scenarios-de-bout-en-bout.md) · [Définir la version](how-to/definir-la-version.md) · [Tester la CI locale (temporaire)](how-to/tester-la-ci-locale.md) · [Publier une release](how-to/publier-une-release.md) · [Signer et notariser pour macOS](how-to/signer-et-notariser-sous-macos.md) · [Tester l'issue #52 sous macOS](how-to/tester-l-issue-52-sous-macos.md) · [Tester les issues #49 et #50 sous macOS](how-to/tester-les-issues-49-et-50-sous-macos.md) · [Tester l'issue #47 sous macOS](how-to/tester-l-issue-47-sous-macos.md) · [Tester la milestone M4 sous macOS](how-to/tester-la-milestone-m4-sous-macos.md) · [Tester la milestone M3 sous macOS](how-to/tester-la-milestone-m3-sous-macos.md) · [Tester la milestone M2 sous macOS](how-to/tester-la-milestone-m2-sous-macos.md) · [Tester la milestone M1 sous macOS](how-to/tester-la-milestone-m1-sous-macos.md) · [Tester la milestone Initialize sous macOS](how-to/tester-la-milestone-initialize-sous-macos.md) |
11 | **consulter** un détail exact | Référence | [Le fichier de configuration](reference/configuration.md) · [Raccourcis clavier](reference/raccourcis-clavier.md) · [Agents, channels et événements](reference/agents-et-evenements.md) · [Commandes](reference/commandes.md) · [scripts/agents.sh](reference/script-agents.md) |11 | **consulter** un détail exact | Référence | [Le fichier de configuration](reference/configuration.md) · [Raccourcis clavier](reference/raccourcis-clavier.md) · [Agents, channels et événements](reference/agents-et-evenements.md) · [Commandes](reference/commandes.md) · [scripts/agents.sh](reference/script-agents.md) |
12 | **comprendre** le pourquoi | Explications | [Workspaces et terminaux](explanation/workspaces-et-terminaux.md) · [Les channels et ce que sait chaque agent](explanation/channels-et-contexte.md) · [Permissions et confiance](explanation/permissions-et-confiance.md) · [Pourquoi ACP](explanation/pourquoi-acp.md) · [La stack de l'interface](explanation/stack-interface.md) · [Architecture](explanation/architecture.md) · [Mémoire et modèles locaux](explanation/memoire-et-modeles-locaux.md) |12 | **comprendre** le pourquoi | Explications | [Workspaces et terminaux](explanation/workspaces-et-terminaux.md) · [Les channels et ce que sait chaque agent](explanation/channels-et-contexte.md) · [Permissions et confiance](explanation/permissions-et-confiance.md) · [Pourquoi ACP](explanation/pourquoi-acp.md) · [La stack de l'interface](explanation/stack-interface.md) · [Architecture](explanation/architecture.md) · [Mémoire et modèles locaux](explanation/memoire-et-modeles-locaux.md) |
13 13
modified docs/fr/how-to/ajouter-un-agent.md +1 -1
@@ -25,7 +25,7 @@ Quand l'agent ne peut pas être ajouté (un nom déjà pris, par exemple), l'ass
2525 ## Voir aussi
2626
2727 - Pour créer un nouvel agent mini-me en répondant à des questions, sans fichier ni dossier à choisir : [Créer un agent mini-me](creer-un-agent-mini-me.md)
28-- Pour créer de la même façon un nouvel agent Claude, Gemini, Codex ou Vibe dans une sandbox : [Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox](creer-un-agent-dans-une-sandbox.md)
28+- Pour créer de la même façon un nouvel agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox : [Créer un agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox](creer-un-agent-dans-une-sandbox.md)
2929 - Ce que l'assistant écrit : [Le fichier de configuration](../reference/configuration.md)
3030 - [Modifier ou changer la configuration](modifier-ou-changer-la-configuration.md)
3131 - [Tutoriel : votre premier agent, sans écrire de configuration](../tutorials/premier-agent.md)
@@ -25,7 +25,7 @@ Quand l'agent ne peut pas être ajouté (un nom déjà pris, par exemple), l'ass
25 ## Voir aussi25 ## Voir aussi
26 26
27 - Pour créer un nouvel agent mini-me en répondant à des questions, sans fichier ni dossier à choisir : [Créer un agent mini-me](creer-un-agent-mini-me.md)27 - Pour créer un nouvel agent mini-me en répondant à des questions, sans fichier ni dossier à choisir : [Créer un agent mini-me](creer-un-agent-mini-me.md)
28-- Pour créer de la même façon un nouvel agent Claude, Gemini, Codex ou Vibe dans une sandbox : [Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox](creer-un-agent-dans-une-sandbox.md)28+- Pour créer de la même façon un nouvel agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox : [Créer un agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox](creer-un-agent-dans-une-sandbox.md)
29 - Ce que l'assistant écrit : [Le fichier de configuration](../reference/configuration.md)29 - Ce que l'assistant écrit : [Le fichier de configuration](../reference/configuration.md)
30 - [Modifier ou changer la configuration](modifier-ou-changer-la-configuration.md)30 - [Modifier ou changer la configuration](modifier-ou-changer-la-configuration.md)
31 - [Tutoriel : votre premier agent, sans écrire de configuration](../tutorials/premier-agent.md)31 - [Tutoriel : votre premier agent, sans écrire de configuration](../tutorials/premier-agent.md)
modified docs/fr/how-to/creer-un-agent-dans-une-sandbox.md +6 -5
@@ -1,12 +1,13 @@
1-# Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox
1+# Créer un agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox
22
3-Ce guide montre comment créer un nouvel agent Claude, Gemini, Codex ou Vibe qui tourne dans une Docker Sandbox, depuis la fenêtre de Sidekicks, sans écrire de fichier ni choisir de dossier. Il suppose que [sbx](https://docs.docker.com/ai/sandboxes/) (Docker Sandboxes) est installé, et que vous avez une clé d'API de l'éditeur de l'agent — ou que vous en obtiendrez une pendant les étapes. Pour ajouter une sandbox qui existe déjà, suivez plutôt [Ajouter un agent](ajouter-un-agent.md).
3+Ce guide montre comment créer un nouvel agent Claude, Gemini, Codex, Vibe ou Copilot qui tourne dans une Docker Sandbox, depuis la fenêtre de Sidekicks, sans écrire de fichier ni choisir de dossier. Il suppose que [sbx](https://docs.docker.com/ai/sandboxes/) (Docker Sandboxes) est installé, et que vous avez une clé d'API de l'éditeur de l'agent — ou que vous en obtiendrez une pendant les étapes (pour Copilot : un compte GitHub avec un abonnement Copilot). Pour ajouter une sandbox qui existe déjà, suivez plutôt [Ajouter un agent](ajouter-un-agent.md).
44
55 ## Étapes
66
7-1. Ouvrez l'assistant : **✨ Créer un agent Claude, Gemini, Codex ou Vibe** sur l'écran d'accueil, **✨ Créer un agent dans une sandbox** sous la liste des agents, ou **Créer un agent dans une sandbox** dans la palette de commandes (⌘K, Ctrl+K sous Linux et Windows).
8-2. Choisissez l'agent : **Claude** (Claude Code, d'Anthropic), **Gemini** (de Google, via Antigravity), **Codex** (d'OpenAI) ou **Vibe** (de Mistral AI).
7+1. Ouvrez l'assistant : **✨ Créer un agent Claude, Gemini, Codex, Vibe ou Copilot** sur l'écran d'accueil, **✨ Créer un agent dans une sandbox** sous la liste des agents, ou **Créer un agent dans une sandbox** dans la palette de commandes (⌘K, Ctrl+K sous Linux et Windows).
8+2. Choisissez l'agent : **Claude** (Claude Code, d'Anthropic), **Gemini** (de Google, via Antigravity), **Codex** (d'OpenAI), **Vibe** (de Mistral AI) ou **Copilot** (Copilot CLI, de GitHub).
99 3. Si sbx n'a pas encore sa clé, collez-la dans **Clé d'API** et cliquez sur **Enregistrer la clé**. **Obtenir une clé…** ouvre la page où l'éditeur vous en donne une. Sidekicks confie la clé à sbx, qui la garde et la fournit à vos sandboxes seulement pour leurs appels à cet éditeur ; elle n'est jamais écrite dans un fichier. Une clé déjà enregistrée s'affiche **✓ Votre clé … est enregistrée dans sbx**.
10+ Pour **Copilot**, ce n'est pas une clé d'API mais un **jeton GitHub** autorisé à utiliser Copilot, et votre compte GitHub doit avoir un abonnement Copilot. Si l'outil GitHub (`gh`) est installé, le plus simple est **Utiliser mon compte GitHub** : Sidekicks prend son jeton (`gh auth token`) sans l'afficher. Quand `gh` n'est pas encore connecté, **Se connecter à GitHub** affiche un code et **Ouvrir la page de connexion** : vérifiez le code sur la page, confirmez, et l'assistant continue tout seul. Sans `gh`, **Créer un jeton sur GitHub…** ouvre la page d'un jeton « fine-grained » : donnez-lui la permission **Copilot Requests**, collez-le dans **Jeton GitHub** et cliquez sur **Enregistrer le jeton**. sbx l'enregistre deux fois — `copilot`, pour les appels de la sandbox à Copilot, et `github`, pour `git` et `gh` dans la sandbox : l'agent peut alors travailler sur vos dépôts GitHub avec votre compte.
1011 4. Donnez à l'agent ses derniers détails : **Nom affiché**, **Nom** (ce qui l'appelle, `@claude`, et le nom de son dossier et de sa sandbox : minuscules, chiffres et `-`, en commençant par une lettre) et un **Emoji** (le logo de l'agent est choisi d'abord). Le **Nom** suit le **Nom affiché** (`Marcel (assistant)` donne `marcel-assistant`) tant que vous ne le tapez pas vous-même ; Sidekicks en propose toujours un que personne n'utilise encore, et prévient avant le clic quand celui que vous avez tapé est pris.
1112 5. Cliquez sur **Ajouter l'agent**. Sa conversation s'ouvre. Sa sandbox est créée la première fois que vous lui écrivez : cette première réponse prend un moment ; la conversation montre ce qui se passe — l'étape, le temps écoulé, ce que sbx télécharge. Le détail est dans le journal de l'agent (panneau **Journal**).
1213
@@ -17,7 +18,7 @@ Le dossier de l'agent est créé dans le dossier **Sidekicks-Agents** de vos Doc
1718 - **« sbx (Docker Sandboxes) n'est pas installé sur cet ordinateur »** : installez sbx, puis cliquez sur **Réessayer**.
1819 - **« sbx a besoin que vous soyez connecté à Docker »** : cliquez sur **Se connecter à Docker**. Sidekicks affiche un code : cliquez sur **Ouvrir la page de connexion**, vérifiez que la page montre le même code, confirmez et connectez-vous avec votre compte Docker (un compte gratuit suffit). L'assistant continue tout seul une fois la connexion faite. Le même bouton apparaît sous l'erreur d'un agent sbx qui ne démarre pas. Si cela ne fonctionne pas, tapez une fois `sbx login` dans un terminal.
1920 - **« Un autre agent porte déjà ce nom »**, **« Un dossier porte déjà ce nom »** ou **« Une sandbox porte déjà ce nom »** : changez le **Nom** et cliquez de nouveau sur **Ajouter l'agent**. Un dossier ou une sandbox existants ne sont jamais modifiés.
20-- **« Pas encore de clé … dans sbx »** (après **Plus tard**) : l'agent ne peut pas répondre. Relancez l'assistant pour enregistrer la clé, ou tapez `sbx secret set anthropic` (`google` pour Gemini, `openai` pour Codex, `mistral` pour Vibe) dans un terminal.
21+- **« Pas encore de clé … dans sbx »** (après **Plus tard**) : l'agent ne peut pas répondre. Relancez l'assistant pour enregistrer la clé, ou tapez `sbx secret set anthropic` (`google` pour Gemini, `openai` pour Codex, `mistral` pour Vibe, `copilot` et `github` pour Copilot — par exemple `sbx secret set copilot --command 'gh auth token'` puis la même avec `github`) dans un terminal.
2122
2223 ## Variantes
2324
@@ -1,12 +1,13 @@
1-# Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox1+# Créer un agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox
2 2
3-Ce guide montre comment créer un nouvel agent Claude, Gemini, Codex ou Vibe qui tourne dans une Docker Sandbox, depuis la fenêtre de Sidekicks, sans écrire de fichier ni choisir de dossier. Il suppose que [sbx](https://docs.docker.com/ai/sandboxes/) (Docker Sandboxes) est installé, et que vous avez une clé d'API de l'éditeur de l'agent — ou que vous en obtiendrez une pendant les étapes. Pour ajouter une sandbox qui existe déjà, suivez plutôt [Ajouter un agent](ajouter-un-agent.md).3+Ce guide montre comment créer un nouvel agent Claude, Gemini, Codex, Vibe ou Copilot qui tourne dans une Docker Sandbox, depuis la fenêtre de Sidekicks, sans écrire de fichier ni choisir de dossier. Il suppose que [sbx](https://docs.docker.com/ai/sandboxes/) (Docker Sandboxes) est installé, et que vous avez une clé d'API de l'éditeur de l'agent — ou que vous en obtiendrez une pendant les étapes (pour Copilot : un compte GitHub avec un abonnement Copilot). Pour ajouter une sandbox qui existe déjà, suivez plutôt [Ajouter un agent](ajouter-un-agent.md).
4 4
5 ## Étapes5 ## Étapes
6 6
7-1. Ouvrez l'assistant : **✨ Créer un agent Claude, Gemini, Codex ou Vibe** sur l'écran d'accueil, **✨ Créer un agent dans une sandbox** sous la liste des agents, ou **Créer un agent dans une sandbox** dans la palette de commandes (⌘K, Ctrl+K sous Linux et Windows).7+1. Ouvrez l'assistant : **✨ Créer un agent Claude, Gemini, Codex, Vibe ou Copilot** sur l'écran d'accueil, **✨ Créer un agent dans une sandbox** sous la liste des agents, ou **Créer un agent dans une sandbox** dans la palette de commandes (⌘K, Ctrl+K sous Linux et Windows).
8-2. Choisissez l'agent : **Claude** (Claude Code, d'Anthropic), **Gemini** (de Google, via Antigravity), **Codex** (d'OpenAI) ou **Vibe** (de Mistral AI).8+2. Choisissez l'agent : **Claude** (Claude Code, d'Anthropic), **Gemini** (de Google, via Antigravity), **Codex** (d'OpenAI), **Vibe** (de Mistral AI) ou **Copilot** (Copilot CLI, de GitHub).
9 3. Si sbx n'a pas encore sa clé, collez-la dans **Clé d'API** et cliquez sur **Enregistrer la clé**. **Obtenir une clé…** ouvre la page où l'éditeur vous en donne une. Sidekicks confie la clé à sbx, qui la garde et la fournit à vos sandboxes seulement pour leurs appels à cet éditeur ; elle n'est jamais écrite dans un fichier. Une clé déjà enregistrée s'affiche **✓ Votre clé … est enregistrée dans sbx**.9 3. Si sbx n'a pas encore sa clé, collez-la dans **Clé d'API** et cliquez sur **Enregistrer la clé**. **Obtenir une clé…** ouvre la page où l'éditeur vous en donne une. Sidekicks confie la clé à sbx, qui la garde et la fournit à vos sandboxes seulement pour leurs appels à cet éditeur ; elle n'est jamais écrite dans un fichier. Une clé déjà enregistrée s'affiche **✓ Votre clé … est enregistrée dans sbx**.
10+ Pour **Copilot**, ce n'est pas une clé d'API mais un **jeton GitHub** autorisé à utiliser Copilot, et votre compte GitHub doit avoir un abonnement Copilot. Si l'outil GitHub (`gh`) est installé, le plus simple est **Utiliser mon compte GitHub** : Sidekicks prend son jeton (`gh auth token`) sans l'afficher. Quand `gh` n'est pas encore connecté, **Se connecter à GitHub** affiche un code et **Ouvrir la page de connexion** : vérifiez le code sur la page, confirmez, et l'assistant continue tout seul. Sans `gh`, **Créer un jeton sur GitHub…** ouvre la page d'un jeton « fine-grained » : donnez-lui la permission **Copilot Requests**, collez-le dans **Jeton GitHub** et cliquez sur **Enregistrer le jeton**. sbx l'enregistre deux fois — `copilot`, pour les appels de la sandbox à Copilot, et `github`, pour `git` et `gh` dans la sandbox : l'agent peut alors travailler sur vos dépôts GitHub avec votre compte.
10 4. Donnez à l'agent ses derniers détails : **Nom affiché**, **Nom** (ce qui l'appelle, `@claude`, et le nom de son dossier et de sa sandbox : minuscules, chiffres et `-`, en commençant par une lettre) et un **Emoji** (le logo de l'agent est choisi d'abord). Le **Nom** suit le **Nom affiché** (`Marcel (assistant)` donne `marcel-assistant`) tant que vous ne le tapez pas vous-même ; Sidekicks en propose toujours un que personne n'utilise encore, et prévient avant le clic quand celui que vous avez tapé est pris.11 4. Donnez à l'agent ses derniers détails : **Nom affiché**, **Nom** (ce qui l'appelle, `@claude`, et le nom de son dossier et de sa sandbox : minuscules, chiffres et `-`, en commençant par une lettre) et un **Emoji** (le logo de l'agent est choisi d'abord). Le **Nom** suit le **Nom affiché** (`Marcel (assistant)` donne `marcel-assistant`) tant que vous ne le tapez pas vous-même ; Sidekicks en propose toujours un que personne n'utilise encore, et prévient avant le clic quand celui que vous avez tapé est pris.
11 5. Cliquez sur **Ajouter l'agent**. Sa conversation s'ouvre. Sa sandbox est créée la première fois que vous lui écrivez : cette première réponse prend un moment ; la conversation montre ce qui se passe — l'étape, le temps écoulé, ce que sbx télécharge. Le détail est dans le journal de l'agent (panneau **Journal**).12 5. Cliquez sur **Ajouter l'agent**. Sa conversation s'ouvre. Sa sandbox est créée la première fois que vous lui écrivez : cette première réponse prend un moment ; la conversation montre ce qui se passe — l'étape, le temps écoulé, ce que sbx télécharge. Le détail est dans le journal de l'agent (panneau **Journal**).
12 13
@@ -17,7 +18,7 @@ Le dossier de l'agent est créé dans le dossier **Sidekicks-Agents** de vos Doc
17 - **« sbx (Docker Sandboxes) n'est pas installé sur cet ordinateur »** : installez sbx, puis cliquez sur **Réessayer**.18 - **« sbx (Docker Sandboxes) n'est pas installé sur cet ordinateur »** : installez sbx, puis cliquez sur **Réessayer**.
18 - **« sbx a besoin que vous soyez connecté à Docker »** : cliquez sur **Se connecter à Docker**. Sidekicks affiche un code : cliquez sur **Ouvrir la page de connexion**, vérifiez que la page montre le même code, confirmez et connectez-vous avec votre compte Docker (un compte gratuit suffit). L'assistant continue tout seul une fois la connexion faite. Le même bouton apparaît sous l'erreur d'un agent sbx qui ne démarre pas. Si cela ne fonctionne pas, tapez une fois `sbx login` dans un terminal.19 - **« sbx a besoin que vous soyez connecté à Docker »** : cliquez sur **Se connecter à Docker**. Sidekicks affiche un code : cliquez sur **Ouvrir la page de connexion**, vérifiez que la page montre le même code, confirmez et connectez-vous avec votre compte Docker (un compte gratuit suffit). L'assistant continue tout seul une fois la connexion faite. Le même bouton apparaît sous l'erreur d'un agent sbx qui ne démarre pas. Si cela ne fonctionne pas, tapez une fois `sbx login` dans un terminal.
19 - **« Un autre agent porte déjà ce nom »**, **« Un dossier porte déjà ce nom »** ou **« Une sandbox porte déjà ce nom »** : changez le **Nom** et cliquez de nouveau sur **Ajouter l'agent**. Un dossier ou une sandbox existants ne sont jamais modifiés.20 - **« Un autre agent porte déjà ce nom »**, **« Un dossier porte déjà ce nom »** ou **« Une sandbox porte déjà ce nom »** : changez le **Nom** et cliquez de nouveau sur **Ajouter l'agent**. Un dossier ou une sandbox existants ne sont jamais modifiés.
20-- **« Pas encore de clé … dans sbx »** (après **Plus tard**) : l'agent ne peut pas répondre. Relancez l'assistant pour enregistrer la clé, ou tapez `sbx secret set anthropic` (`google` pour Gemini, `openai` pour Codex, `mistral` pour Vibe) dans un terminal.21+- **« Pas encore de clé … dans sbx »** (après **Plus tard**) : l'agent ne peut pas répondre. Relancez l'assistant pour enregistrer la clé, ou tapez `sbx secret set anthropic` (`google` pour Gemini, `openai` pour Codex, `mistral` pour Vibe, `copilot` et `github` pour Copilot — par exemple `sbx secret set copilot --command 'gh auth token'` puis la même avec `github`) dans un terminal.
21 22
22 ## Variantes23 ## Variantes
23 24
modified docs/fr/reference/agents-et-evenements.md +7 -4
@@ -255,7 +255,7 @@ Une `view` vaut `{messages[], form, written, name, title}` : les messages de mm
255255
256256 ## `SbxCreatorService`
257257
258-L'assistant qui crée un agent dans une Docker Sandbox (issue #96, [Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)). Les types qu'il propose forment un catalogue (`internal/sbxcreate`) : une entrée par type, avec ce que contient son `sbxenv.yaml`, la façon dont Sidekicks le démarre, et son icône par défaut : le logo de sa marque (issue #100).
258+L'assistant qui crée un agent dans une Docker Sandbox (issue #96, [Créer un agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)). Les types qu'il propose forment un catalogue (`internal/sbxcreate`) : une entrée par type, avec ce que contient son `sbxenv.yaml`, la façon dont Sidekicks le démarre, et son icône par défaut : le logo de sa marque (issue #100).
259259
260260 | Type | `agent:` | Kit | Programme dans la sandbox | Secret sbx |
261261 | --- | --- | --- | --- | --- |
@@ -263,15 +263,18 @@ L'assistant qui crée un agent dans une Docker Sandbox (issue #96, [Créer un ag
263263 | `gemini` (`logo:gemini`) | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` |
264264 | `codex` (`logo:openai`) | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` |
265265 | `vibe` (`logo:mistral`) | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` |
266+| `copilot` (`logo:copilot`) | `copilot` | `docker.io/sbx/copilot-kit:latest` | `copilot --acp --stdio` | `copilot` et `github` (le même jeton GitHub, issue #103) |
266267
267268 | Méthode | Effet |
268269 | --- | --- |
269-| `Kinds()` | Le catalogue, dans l'ordre : `{id, title, icon, agent, kit, program, service, keyUrl}`. |
270-| `Check(kind)` | `sbx is not installed` quand sbx est introuvable (`sbx` dans le PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Renvoie `{hasKey, name, agentsFolder, taken[]}` (`taken` : les noms pris par un agent, un dossier ou une sandbox, issue #99) : si `sbx secret ls --service <service>` montre un secret global, et le premier nom libre parmi `<type>`, `<type>-2`… — libre comme agent de la configuration, dossier du dossier des agents et sandbox (`sbx ls -q`). |
271-| `SetKey(kind, key)` | `sbx secret set <service>` avec la clé sur son entrée standard — jamais dans ses arguments, un fichier ou un journal ; une erreur ne la répète jamais. Globale : toutes les sandboxes l'ont. |
270+| `Kinds()` | Le catalogue, dans l'ordre : `{id, title, icon, agent, kit, program, service, keyUrl, token, fromGh}` (`token` : le secret est un jeton du compte de l'utilisateur, pas une clé d'API — Copilot ; l'assistant dit « jeton » ; `fromGh` : il peut venir de `gh auth token`). Un type peut donner son secret à d'autres services sbx (Copilot : `github` aussi, avec `api.github.com` et `github.com` dans ses `bindings`). |
271+| `Check(kind)` | `sbx is not installed` quand sbx est introuvable (`sbx` dans le PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Renvoie `{hasKey, name, agentsFolder, taken[], gh, ghSignedIn}` (`taken` : les noms pris par un agent, un dossier ou une sandbox, issue #99 ; `hasKey` : chaque service du type a un secret ; `gh`, `ghSignedIn` : pour un type avec `fromGh`, si gh est installé et a un jeton) : si `sbx secret ls --service <service>` montre un secret global, et le premier nom libre parmi `<type>`, `<type>-2`… — libre comme agent de la configuration, dossier du dossier des agents et sandbox (`sbx ls -q`). |
272+| `SetKey(kind, key)` | `sbx secret set <service>`, pour chaque service du type, avec la clé sur son entrée standard — jamais dans ses arguments, un fichier ou un journal ; une erreur ne la répète jamais. Globale : toutes les sandboxes l'ont. |
272273 | `Login()` | Lance `sbx login` (issue #97) — ou rejoint celui en cours — et revient dès que sbx a affiché son code et son adresse, 20 secondes au plus : `{code, url, done, user, error, output[]}`. Le code est le premier `XXXX-XXXX`, l'adresse le premier `https://…` qui contient `login` ; `output` garde chaque ligne pour le cas où sbx affiche autre chose. Son entrée standard est vide : une question posée au clavier n'a pas de réponse. |
273274 | `LoginStatus()` | Attend, 20 secondes au plus, la fin de `sbx login` et renvoie le même état ; `done` avec `user` (tiré de `Signed in as <user>.`) une fois connecté, sinon `error` (`cancelled` après `CancelLogin`). L'interface le rappelle jusqu'à `done`. |
274275 | `CancelLogin()` | Arrête `sbx login` ; fait aussi quand Sidekicks se ferme. |
276+| `UseGitHub(kind)` | Pour un type avec `fromGh` (issue #103) : lance `gh auth token` et enregistre ce qu'il affiche comme `SetKey` — comme le ferait `sbx secret set <service> --command 'gh auth token'`, pour chaque service. `gh is not signed in to GitHub` quand gh n'a pas de jeton, `gh is not installed` sans gh (`gh` dans le PATH, `/opt/homebrew/bin`, `/usr/local/bin`). Le jeton n'est jamais affiché, écrit ni journalisé. |
277+| `GitHubLogin()`, `GitHubLoginStatus()`, `CancelGitHubLogin()` | Comme `Login`, `LoginStatus` et `CancelLogin`, pour `gh auth login --web --hostname github.com --git-protocol https` (issue #103) : son code (`XXXX-XXXX`), son URL (`https://github.com/login/device`), puis `user` d'après `✓ Logged in as <user>`. |
275278 | `Create({kind, name, title, icon})` | Écrit `<agentsFolder>/<name>/sbxenv.yaml` (`name: <name>`, l'`agent:` et le kit du type, `workspace: ./workspace`, les `bindings` de son service, `pullPolicy: always`, commentaires en anglais) et `workspace/`, puis ajoute l'agent : `sbx exec -i <name> <programme>`, dossier `<dossier>/workspace`, `runtime.lifecycle` dans `<dossier>` (`sbx env create --force`, `sbx stop <name>`, `sbx env rm --force`) — la sandbox est créée au premier démarrage. Renvoie `{problem, problems[], name, folder}` : `problem` vaut `invalidName` (minuscules, chiffres et `-` : pas de `_`, que sbx refuse), `nameTaken`, `folderExists` ou `sandboxExists` quand rien n'a été écrit. |
276279
277280 ## Outils proposés aux agents
@@ -255,7 +255,7 @@ Une `view` vaut `{messages[], form, written, name, title}` : les messages de mm
255 255
256 ## `SbxCreatorService`256 ## `SbxCreatorService`
257 257
258-L'assistant qui crée un agent dans une Docker Sandbox (issue #96, [Créer un agent Claude, Gemini, Codex ou Vibe dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)). Les types qu'il propose forment un catalogue (`internal/sbxcreate`) : une entrée par type, avec ce que contient son `sbxenv.yaml`, la façon dont Sidekicks le démarre, et son icône par défaut : le logo de sa marque (issue #100).258+L'assistant qui crée un agent dans une Docker Sandbox (issue #96, [Créer un agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)). Les types qu'il propose forment un catalogue (`internal/sbxcreate`) : une entrée par type, avec ce que contient son `sbxenv.yaml`, la façon dont Sidekicks le démarre, et son icône par défaut : le logo de sa marque (issue #100).
259 259
260 | Type | `agent:` | Kit | Programme dans la sandbox | Secret sbx |260 | Type | `agent:` | Kit | Programme dans la sandbox | Secret sbx |
261 | --- | --- | --- | --- | --- |261 | --- | --- | --- | --- | --- |
@@ -263,15 +263,18 @@ L'assistant qui crée un agent dans une Docker Sandbox (issue #96, [Créer un ag
263 | `gemini` (`logo:gemini`) | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` |263 | `gemini` (`logo:gemini`) | `antigravity` | `docker.io/sbx/antigravity:latest` | `agy acp` | `google` |
264 | `codex` (`logo:openai`) | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` |264 | `codex` (`logo:openai`) | `codex` | `docker.io/sbx/codex-acp:latest` | `codex-acp` | `openai` |
265 | `vibe` (`logo:mistral`) | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` |265 | `vibe` (`logo:mistral`) | `vibe` | `docker.io/sbx/vibe-kit:latest` | `vibe-acp` | `mistral` |
266+| `copilot` (`logo:copilot`) | `copilot` | `docker.io/sbx/copilot-kit:latest` | `copilot --acp --stdio` | `copilot` et `github` (le même jeton GitHub, issue #103) |
266 267
267 | Méthode | Effet |268 | Méthode | Effet |
268 | --- | --- |269 | --- | --- |
269-| `Kinds()` | Le catalogue, dans l'ordre : `{id, title, icon, agent, kit, program, service, keyUrl}`. |270+| `Kinds()` | Le catalogue, dans l'ordre : `{id, title, icon, agent, kit, program, service, keyUrl, token, fromGh}` (`token` : le secret est un jeton du compte de l'utilisateur, pas une clé d'API — Copilot ; l'assistant dit « jeton » ; `fromGh` : il peut venir de `gh auth token`). Un type peut donner son secret à d'autres services sbx (Copilot : `github` aussi, avec `api.github.com` et `github.com` dans ses `bindings`). |
270-| `Check(kind)` | `sbx is not installed` quand sbx est introuvable (`sbx` dans le PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Renvoie `{hasKey, name, agentsFolder, taken[]}` (`taken` : les noms pris par un agent, un dossier ou une sandbox, issue #99) : si `sbx secret ls --service <service>` montre un secret global, et le premier nom libre parmi `<type>`, `<type>-2`… — libre comme agent de la configuration, dossier du dossier des agents et sandbox (`sbx ls -q`). |271+| `Check(kind)` | `sbx is not installed` quand sbx est introuvable (`sbx` dans le PATH, `/usr/local/bin`, `/opt/homebrew/bin`). Renvoie `{hasKey, name, agentsFolder, taken[], gh, ghSignedIn}` (`taken` : les noms pris par un agent, un dossier ou une sandbox, issue #99 ; `hasKey` : chaque service du type a un secret ; `gh`, `ghSignedIn` : pour un type avec `fromGh`, si gh est installé et a un jeton) : si `sbx secret ls --service <service>` montre un secret global, et le premier nom libre parmi `<type>`, `<type>-2`… — libre comme agent de la configuration, dossier du dossier des agents et sandbox (`sbx ls -q`). |
271-| `SetKey(kind, key)` | `sbx secret set <service>` avec la clé sur son entrée standard — jamais dans ses arguments, un fichier ou un journal ; une erreur ne la répète jamais. Globale : toutes les sandboxes l'ont. |272+| `SetKey(kind, key)` | `sbx secret set <service>`, pour chaque service du type, avec la clé sur son entrée standard — jamais dans ses arguments, un fichier ou un journal ; une erreur ne la répète jamais. Globale : toutes les sandboxes l'ont. |
272 | `Login()` | Lance `sbx login` (issue #97) — ou rejoint celui en cours — et revient dès que sbx a affiché son code et son adresse, 20 secondes au plus : `{code, url, done, user, error, output[]}`. Le code est le premier `XXXX-XXXX`, l'adresse le premier `https://…` qui contient `login` ; `output` garde chaque ligne pour le cas où sbx affiche autre chose. Son entrée standard est vide : une question posée au clavier n'a pas de réponse. |273 | `Login()` | Lance `sbx login` (issue #97) — ou rejoint celui en cours — et revient dès que sbx a affiché son code et son adresse, 20 secondes au plus : `{code, url, done, user, error, output[]}`. Le code est le premier `XXXX-XXXX`, l'adresse le premier `https://…` qui contient `login` ; `output` garde chaque ligne pour le cas où sbx affiche autre chose. Son entrée standard est vide : une question posée au clavier n'a pas de réponse. |
273 | `LoginStatus()` | Attend, 20 secondes au plus, la fin de `sbx login` et renvoie le même état ; `done` avec `user` (tiré de `Signed in as <user>.`) une fois connecté, sinon `error` (`cancelled` après `CancelLogin`). L'interface le rappelle jusqu'à `done`. |274 | `LoginStatus()` | Attend, 20 secondes au plus, la fin de `sbx login` et renvoie le même état ; `done` avec `user` (tiré de `Signed in as <user>.`) une fois connecté, sinon `error` (`cancelled` après `CancelLogin`). L'interface le rappelle jusqu'à `done`. |
274 | `CancelLogin()` | Arrête `sbx login` ; fait aussi quand Sidekicks se ferme. |275 | `CancelLogin()` | Arrête `sbx login` ; fait aussi quand Sidekicks se ferme. |
276+| `UseGitHub(kind)` | Pour un type avec `fromGh` (issue #103) : lance `gh auth token` et enregistre ce qu'il affiche comme `SetKey` — comme le ferait `sbx secret set <service> --command 'gh auth token'`, pour chaque service. `gh is not signed in to GitHub` quand gh n'a pas de jeton, `gh is not installed` sans gh (`gh` dans le PATH, `/opt/homebrew/bin`, `/usr/local/bin`). Le jeton n'est jamais affiché, écrit ni journalisé. |
277+| `GitHubLogin()`, `GitHubLoginStatus()`, `CancelGitHubLogin()` | Comme `Login`, `LoginStatus` et `CancelLogin`, pour `gh auth login --web --hostname github.com --git-protocol https` (issue #103) : son code (`XXXX-XXXX`), son URL (`https://github.com/login/device`), puis `user` d'après `✓ Logged in as <user>`. |
275 | `Create({kind, name, title, icon})` | Écrit `<agentsFolder>/<name>/sbxenv.yaml` (`name: <name>`, l'`agent:` et le kit du type, `workspace: ./workspace`, les `bindings` de son service, `pullPolicy: always`, commentaires en anglais) et `workspace/`, puis ajoute l'agent : `sbx exec -i <name> <programme>`, dossier `<dossier>/workspace`, `runtime.lifecycle` dans `<dossier>` (`sbx env create --force`, `sbx stop <name>`, `sbx env rm --force`) — la sandbox est créée au premier démarrage. Renvoie `{problem, problems[], name, folder}` : `problem` vaut `invalidName` (minuscules, chiffres et `-` : pas de `_`, que sbx refuse), `nameTaken`, `folderExists` ou `sandboxExists` quand rien n'a été écrit. |278 | `Create({kind, name, title, icon})` | Écrit `<agentsFolder>/<name>/sbxenv.yaml` (`name: <name>`, l'`agent:` et le kit du type, `workspace: ./workspace`, les `bindings` de son service, `pullPolicy: always`, commentaires en anglais) et `workspace/`, puis ajoute l'agent : `sbx exec -i <name> <programme>`, dossier `<dossier>/workspace`, `runtime.lifecycle` dans `<dossier>` (`sbx env create --force`, `sbx stop <name>`, `sbx env rm --force`) — la sandbox est créée au premier démarrage. Renvoie `{problem, problems[], name, folder}` : `problem` vaut `invalidName` (minuscules, chiffres et `-` : pas de `_`, que sbx refuse), `nameTaken`, `folderExists` ou `sandboxExists` quand rien n'a été écrit. |
276 279
277 ## Outils proposés aux agents280 ## Outils proposés aux agents
modified docs/fr/reference/configuration.md +2 -2
@@ -39,7 +39,7 @@ Le fichier est cherché dans cet ordre ; la première source applicable l'emport
3939 | `ui` | objet | non | | Préférences d'interface. |
4040 | `limits` | objet | non | | Limites de ressources. |
4141 | `agentTools` | objet | non | | Les outils que Sidekicks propose aux agents ([plus bas](#agenttools)). |
42-| `agentsFolder` | chemin | non | `~/Documents/Sidekicks-Agents` | Où les assistants qui créent des agents font un dossier par agent ([mini-me](../how-to/creer-un-agent-mini-me.md), [Claude, Gemini, Codex, Vibe dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)) : absolu, `~/…`, ou relatif à ce fichier. Créé s'il manque. |
42+| `agentsFolder` | chemin | non | `~/Documents/Sidekicks-Agents` | Où les assistants qui créent des agents font un dossier par agent ([mini-me](../how-to/creer-un-agent-mini-me.md), [Claude, Gemini, Codex, Vibe, Copilot dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)) : absolu, `~/…`, ou relatif à ce fichier. Créé s'il manque. |
4343 | `agents` | liste d'agents | oui | | Les agents disponibles avec `@nom`. Peut être vide. |
4444 | `channels` | liste de channels | non | `[]` | Channels créés au démarrage s'ils n'existent pas encore. |
4545
@@ -83,7 +83,7 @@ agentTools:
8383 | --- | --- | --- | --- | --- |
8484 | `name` | identifiant | oui | | Minuscules, chiffres, `-`, `_` ; commence par une lettre ; 32 caractères au plus. Sert dans `@nom` et `/nom:commande`. **Unique.** |
8585 | `title` | texte | non | `name` | Nom affiché dans l'interface. |
86-| `icon` | texte (un emoji, une lettre ou `logo:<nom>`) | non | | Affiché à côté de l'agent. Un emoji est affiché tel quel ; `logo:claude`, `logo:gemini`, `logo:openai` ou `logo:mistral` affiche le logo de cette marque sur un disque clair (un autre nom est un avertissement, et affiche une lettre) ; sinon sa première lettre est affichée dans un rond coloré (la couleur dépend de `name`). Sans `icon`, le rond contient la première lettre de `title`. |
86+| `icon` | texte (un emoji, une lettre ou `logo:<nom>`) | non | | Affiché à côté de l'agent. Un emoji est affiché tel quel ; `logo:claude`, `logo:gemini`, `logo:openai`, `logo:mistral` ou `logo:copilot` affiche le logo de cette marque sur un disque clair (un autre nom est un avertissement, et affiche une lettre) ; sinon sa première lettre est affichée dans un rond coloré (la couleur dépend de `name`). Sans `icon`, le rond contient la première lettre de `title`. |
8787 | `description` | texte | non | | Une phrase affichée dans la liste `@`. |
8888 | `command` | texte | oui | | Programme qui sert ACP sur stdio. |
8989 | `args` | liste de textes | non | `[]` | Ses arguments. |
@@ -39,7 +39,7 @@ Le fichier est cherché dans cet ordre ; la première source applicable l'emport
39 | `ui` | objet | non | | Préférences d'interface. |39 | `ui` | objet | non | | Préférences d'interface. |
40 | `limits` | objet | non | | Limites de ressources. |40 | `limits` | objet | non | | Limites de ressources. |
41 | `agentTools` | objet | non | | Les outils que Sidekicks propose aux agents ([plus bas](#agenttools)). |41 | `agentTools` | objet | non | | Les outils que Sidekicks propose aux agents ([plus bas](#agenttools)). |
42-| `agentsFolder` | chemin | non | `~/Documents/Sidekicks-Agents` | Où les assistants qui créent des agents font un dossier par agent ([mini-me](../how-to/creer-un-agent-mini-me.md), [Claude, Gemini, Codex, Vibe dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)) : absolu, `~/…`, ou relatif à ce fichier. Créé s'il manque. |42+| `agentsFolder` | chemin | non | `~/Documents/Sidekicks-Agents` | Où les assistants qui créent des agents font un dossier par agent ([mini-me](../how-to/creer-un-agent-mini-me.md), [Claude, Gemini, Codex, Vibe, Copilot dans une sandbox](../how-to/creer-un-agent-dans-une-sandbox.md)) : absolu, `~/…`, ou relatif à ce fichier. Créé s'il manque. |
43 | `agents` | liste d'agents | oui | | Les agents disponibles avec `@nom`. Peut être vide. |43 | `agents` | liste d'agents | oui | | Les agents disponibles avec `@nom`. Peut être vide. |
44 | `channels` | liste de channels | non | `[]` | Channels créés au démarrage s'ils n'existent pas encore. |44 | `channels` | liste de channels | non | `[]` | Channels créés au démarrage s'ils n'existent pas encore. |
45 45
@@ -83,7 +83,7 @@ agentTools:
83 | --- | --- | --- | --- | --- |83 | --- | --- | --- | --- | --- |
84 | `name` | identifiant | oui | | Minuscules, chiffres, `-`, `_` ; commence par une lettre ; 32 caractères au plus. Sert dans `@nom` et `/nom:commande`. **Unique.** |84 | `name` | identifiant | oui | | Minuscules, chiffres, `-`, `_` ; commence par une lettre ; 32 caractères au plus. Sert dans `@nom` et `/nom:commande`. **Unique.** |
85 | `title` | texte | non | `name` | Nom affiché dans l'interface. |85 | `title` | texte | non | `name` | Nom affiché dans l'interface. |
86-| `icon` | texte (un emoji, une lettre ou `logo:<nom>`) | non | | Affiché à côté de l'agent. Un emoji est affiché tel quel ; `logo:claude`, `logo:gemini`, `logo:openai` ou `logo:mistral` affiche le logo de cette marque sur un disque clair (un autre nom est un avertissement, et affiche une lettre) ; sinon sa première lettre est affichée dans un rond coloré (la couleur dépend de `name`). Sans `icon`, le rond contient la première lettre de `title`. |86+| `icon` | texte (un emoji, une lettre ou `logo:<nom>`) | non | | Affiché à côté de l'agent. Un emoji est affiché tel quel ; `logo:claude`, `logo:gemini`, `logo:openai`, `logo:mistral` ou `logo:copilot` affiche le logo de cette marque sur un disque clair (un autre nom est un avertissement, et affiche une lettre) ; sinon sa première lettre est affichée dans un rond coloré (la couleur dépend de `name`). Sans `icon`, le rond contient la première lettre de `title`. |
87 | `description` | texte | non | | Une phrase affichée dans la liste `@`. |87 | `description` | texte | non | | Une phrase affichée dans la liste `@`. |
88 | `command` | texte | oui | | Programme qui sert ACP sur stdio. |88 | `command` | texte | oui | | Programme qui sert ACP sur stdio. |
89 | `args` | liste de textes | non | `[]` | Ses arguments. |89 | `args` | liste de textes | non | `[]` | Ses arguments. |
modified docs/fr/reference/raccourcis-clavier.md +1 -1
@@ -25,7 +25,7 @@ Sous Linux et Windows, quand le curseur est dans le terminal d'un agent, le term
2525 | Entrée | Lance la sélection |
2626 | Échap, ou un clic à côté | Ferme la palette |
2727
28-La palette liste, dans l'ordre : les channels, une conversation par agent, les fichiers de chaque agent, les actions du tableau ci-dessus, **Créer un agent mini-me**, **Créer un agent dans une sandbox (Claude, Gemini, Codex, Vibe)** et **Ouvrir une configuration…**.
28+La palette liste, dans l'ordre : les channels, une conversation par agent, les fichiers de chaque agent, les actions du tableau ci-dessus, **Créer un agent mini-me**, **Créer un agent dans une sandbox (Claude, Gemini, Codex, Vibe, Copilot)** et **Ouvrir une configuration…**.
2929
3030 ## Zone de message
3131
@@ -25,7 +25,7 @@ Sous Linux et Windows, quand le curseur est dans le terminal d'un agent, le term
25 | Entrée | Lance la sélection |25 | Entrée | Lance la sélection |
26 | Échap, ou un clic à côté | Ferme la palette |26 | Échap, ou un clic à côté | Ferme la palette |
27 27
28-La palette liste, dans l'ordre : les channels, une conversation par agent, les fichiers de chaque agent, les actions du tableau ci-dessus, **Créer un agent mini-me**, **Créer un agent dans une sandbox (Claude, Gemini, Codex, Vibe)** et **Ouvrir une configuration…**.28+La palette liste, dans l'ordre : les channels, une conversation par agent, les fichiers de chaque agent, les actions du tableau ci-dessus, **Créer un agent mini-me**, **Créer un agent dans une sandbox (Claude, Gemini, Codex, Vibe, Copilot)** et **Ouvrir une configuration…**.
29 29
30 ## Zone de message30 ## Zone de message
31 31
added docs/release-notes/v1.6.0.fr.md +31 -0
new file mode 100644
@@ -0,0 +1,31 @@
1+# Sidekicks 1.6.0
2+
3+[English](https://rickub.com/bots-garden/sidekicks/blob/v1.6.0/docs/release-notes/v1.6.0.md)
4+
5+Sidekicks 1.6.0 ajoute GitHub Copilot aux agents que crée l'assistant des sandboxes.
6+
7+## Nouveautés
8+
9+### Créer un agent GitHub Copilot dans une sandbox (#103)
10+
11+- **✨ Créer un agent dans une sandbox** propose maintenant **Copilot** (Copilot CLI, de GitHub) à côté de Claude, Gemini, Codex et Vibe, avec le logo de GitHub Copilot. Sidekicks écrit son dossier dans le dossier Sidekicks-Agents de vos Documents et le démarre avec `copilot --acp --stdio` dans une sandbox du `copilot-kit` de Docker.
12+- Copilot passe par votre compte GitHub : au lieu d'une clé d'API, il lui faut un **jeton GitHub** autorisé à utiliser Copilot, et un abonnement Copilot. Si l'outil GitHub (gh) est installé, **Utiliser mon compte GitHub** prend son jeton (`gh auth token`) sans l'afficher — et **Se connecter à GitHub** lance `gh auth login` pour vous quand il n'est pas encore connecté : Sidekicks affiche le code et ouvre la page où vous le confirmez. Sans gh, collez un jeton « fine-grained » avec la permission **Copilot Requests**. sbx l'enregistre pour Copilot (`copilot`) et pour `git` et `gh` dans la sandbox (`github`) : l'agent peut travailler sur vos dépôts GitHub avec votre compte. Le jeton n'est jamais écrit dans un fichier ni dans un journal.
13+- L'assistant « Ajouter un agent » reconnaît aussi une sandbox de Copilot (`agent: copilot` : `copilot --acp --stdio`).
14+
15+→ [Créer un agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox](https://rickub.com/bots-garden/sidekicks/blob/v1.6.0/docs/fr/how-to/creer-un-agent-dans-une-sandbox.md)
16+
17+## Bon à savoir pour la mise à jour
18+
19+- Glissez le nouveau **sidekicks** dans **Applications** et confirmez le remplacement ; votre configuration et votre historique sont gardés.
20+- Vos fichiers de configuration fonctionnent tels quels. L'`icon` d'un agent peut maintenant valoir aussi `logo:copilot`.
21+- Le serveur ACP de Copilot CLI est en « public preview » chez GitHub : il peut changer.
22+
23+## Fichiers
24+
25+| Fichier | Système |
26+| --- | --- |
27+| `Sidekicks-1.6.0-macos-arm64.dmg` | macOS 13 ou plus récent, Apple Silicon — signé et notarisé |
28+| `Sidekicks-1.6.0-macos-arm64.zip` | la même application, dans un `.zip` |
29+| `Sidekicks-1.6.0-windows-amd64-installer.exe`, `Sidekicks-1.6.0-windows-arm64-installer.exe` | Windows, x86-64 ou Arm — installeur (ajoute WebView2 s'il manque ; non signé : SmartScreen demande une fois) |
30+| `sidekicks_1.6.0_windows_amd64.zip`, `sidekicks_1.6.0_windows_arm64.zip` | le `sidekicks.exe` seul, là où WebView2 est déjà présent |
31+| `SHA256SUMS` | sommes de contrôle : `shasum -a 256 -c SHA256SUMS --ignore-missing` |
new file mode 100644
@@ -0,0 +1,31 @@
1+# Sidekicks 1.6.0
2+
3+[English](https://rickub.com/bots-garden/sidekicks/blob/v1.6.0/docs/release-notes/v1.6.0.md)
4+
5+Sidekicks 1.6.0 ajoute GitHub Copilot aux agents que crée l'assistant des sandboxes.
6+
7+## Nouveautés
8+
9+### Créer un agent GitHub Copilot dans une sandbox (#103)
10+
11+- **✨ Créer un agent dans une sandbox** propose maintenant **Copilot** (Copilot CLI, de GitHub) à côté de Claude, Gemini, Codex et Vibe, avec le logo de GitHub Copilot. Sidekicks écrit son dossier dans le dossier Sidekicks-Agents de vos Documents et le démarre avec `copilot --acp --stdio` dans une sandbox du `copilot-kit` de Docker.
12+- Copilot passe par votre compte GitHub : au lieu d'une clé d'API, il lui faut un **jeton GitHub** autorisé à utiliser Copilot, et un abonnement Copilot. Si l'outil GitHub (gh) est installé, **Utiliser mon compte GitHub** prend son jeton (`gh auth token`) sans l'afficher — et **Se connecter à GitHub** lance `gh auth login` pour vous quand il n'est pas encore connecté : Sidekicks affiche le code et ouvre la page où vous le confirmez. Sans gh, collez un jeton « fine-grained » avec la permission **Copilot Requests**. sbx l'enregistre pour Copilot (`copilot`) et pour `git` et `gh` dans la sandbox (`github`) : l'agent peut travailler sur vos dépôts GitHub avec votre compte. Le jeton n'est jamais écrit dans un fichier ni dans un journal.
13+- L'assistant « Ajouter un agent » reconnaît aussi une sandbox de Copilot (`agent: copilot` : `copilot --acp --stdio`).
14+
15+→ [Créer un agent Claude, Gemini, Codex, Vibe ou Copilot dans une sandbox](https://rickub.com/bots-garden/sidekicks/blob/v1.6.0/docs/fr/how-to/creer-un-agent-dans-une-sandbox.md)
16+
17+## Bon à savoir pour la mise à jour
18+
19+- Glissez le nouveau **sidekicks** dans **Applications** et confirmez le remplacement ; votre configuration et votre historique sont gardés.
20+- Vos fichiers de configuration fonctionnent tels quels. L'`icon` d'un agent peut maintenant valoir aussi `logo:copilot`.
21+- Le serveur ACP de Copilot CLI est en « public preview » chez GitHub : il peut changer.
22+
23+## Fichiers
24+
25+| Fichier | Système |
26+| --- | --- |
27+| `Sidekicks-1.6.0-macos-arm64.dmg` | macOS 13 ou plus récent, Apple Silicon — signé et notarisé |
28+| `Sidekicks-1.6.0-macos-arm64.zip` | la même application, dans un `.zip` |
29+| `Sidekicks-1.6.0-windows-amd64-installer.exe`, `Sidekicks-1.6.0-windows-arm64-installer.exe` | Windows, x86-64 ou Arm — installeur (ajoute WebView2 s'il manque ; non signé : SmartScreen demande une fois) |
30+| `sidekicks_1.6.0_windows_amd64.zip`, `sidekicks_1.6.0_windows_arm64.zip` | le `sidekicks.exe` seul, là où WebView2 est déjà présent |
31+| `SHA256SUMS` | sommes de contrôle : `shasum -a 256 -c SHA256SUMS --ignore-missing` |
added docs/release-notes/v1.6.0.md +31 -0
new file mode 100644
@@ -0,0 +1,31 @@
1+# Sidekicks 1.6.0
2+
3+[Français](https://rickub.com/bots-garden/sidekicks/blob/v1.6.0/docs/release-notes/v1.6.0.fr.md)
4+
5+Sidekicks 1.6.0 adds GitHub Copilot to the agents the sandbox assistant creates.
6+
7+## What's new
8+
9+### Create a GitHub Copilot agent in a sandbox (#103)
10+
11+- **✨ Create an agent in a sandbox** now offers **Copilot** (GitHub's Copilot CLI) next to Claude, Gemini, Codex and Vibe, with GitHub Copilot's logo. Sidekicks writes its folder in the Sidekicks-Agents folder of your Documents and starts it with `copilot --acp --stdio` in a sandbox of Docker's `copilot-kit`.
12+- Copilot uses your GitHub account: instead of an API key, it needs a **GitHub token** allowed to use Copilot, and a Copilot subscription. If the GitHub CLI is installed, **Use my GitHub account** takes its token (`gh auth token`) without showing it — and **Sign in to GitHub** runs `gh auth login` for you when it is not signed in yet: Sidekicks shows the code and opens the page where you confirm it. Without gh, paste a fine-grained token with the **Copilot Requests** permission. sbx stores it for Copilot (`copilot`) and for `git` and `gh` in the sandbox (`github`): the agent can work on your GitHub repositories with your account. The token is never written in a file nor in a log.
13+- The "Add an agent" assistant also recognises a sandbox of Copilot (`agent: copilot`: `copilot --acp --stdio`).
14+
15+→ [Create a Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox](https://rickub.com/bots-garden/sidekicks/blob/v1.6.0/docs/en/how-to/create-an-agent-in-a-sandbox.md)
16+
17+## Worth knowing when upgrading
18+
19+- Drag the new **sidekicks** into **Applications** and confirm the replacement; your configuration and your history are kept.
20+- Your configuration files keep working as they are. An agent's `icon` may now also be `logo:copilot`.
21+- Copilot CLI's ACP server is a public preview at GitHub: it may change.
22+
23+## Files
24+
25+| File | System |
26+| --- | --- |
27+| `Sidekicks-1.6.0-macos-arm64.dmg` | macOS 13 or later, Apple Silicon — signed and notarized |
28+| `Sidekicks-1.6.0-macos-arm64.zip` | the same application, in a `.zip` |
29+| `Sidekicks-1.6.0-windows-amd64-installer.exe`, `Sidekicks-1.6.0-windows-arm64-installer.exe` | Windows, x86-64 or Arm — installer (adds WebView2 when missing; not signed: SmartScreen asks once) |
30+| `sidekicks_1.6.0_windows_amd64.zip`, `sidekicks_1.6.0_windows_arm64.zip` | the bare `sidekicks.exe`, where WebView2 is already present |
31+| `SHA256SUMS` | checksums: `shasum -a 256 -c SHA256SUMS --ignore-missing` |
new file mode 100644
@@ -0,0 +1,31 @@
1+# Sidekicks 1.6.0
2+
3+[Français](https://rickub.com/bots-garden/sidekicks/blob/v1.6.0/docs/release-notes/v1.6.0.fr.md)
4+
5+Sidekicks 1.6.0 adds GitHub Copilot to the agents the sandbox assistant creates.
6+
7+## What's new
8+
9+### Create a GitHub Copilot agent in a sandbox (#103)
10+
11+- **✨ Create an agent in a sandbox** now offers **Copilot** (GitHub's Copilot CLI) next to Claude, Gemini, Codex and Vibe, with GitHub Copilot's logo. Sidekicks writes its folder in the Sidekicks-Agents folder of your Documents and starts it with `copilot --acp --stdio` in a sandbox of Docker's `copilot-kit`.
12+- Copilot uses your GitHub account: instead of an API key, it needs a **GitHub token** allowed to use Copilot, and a Copilot subscription. If the GitHub CLI is installed, **Use my GitHub account** takes its token (`gh auth token`) without showing it — and **Sign in to GitHub** runs `gh auth login` for you when it is not signed in yet: Sidekicks shows the code and opens the page where you confirm it. Without gh, paste a fine-grained token with the **Copilot Requests** permission. sbx stores it for Copilot (`copilot`) and for `git` and `gh` in the sandbox (`github`): the agent can work on your GitHub repositories with your account. The token is never written in a file nor in a log.
13+- The "Add an agent" assistant also recognises a sandbox of Copilot (`agent: copilot`: `copilot --acp --stdio`).
14+
15+→ [Create a Claude, Gemini, Codex, Vibe or Copilot agent in a sandbox](https://rickub.com/bots-garden/sidekicks/blob/v1.6.0/docs/en/how-to/create-an-agent-in-a-sandbox.md)
16+
17+## Worth knowing when upgrading
18+
19+- Drag the new **sidekicks** into **Applications** and confirm the replacement; your configuration and your history are kept.
20+- Your configuration files keep working as they are. An agent's `icon` may now also be `logo:copilot`.
21+- Copilot CLI's ACP server is a public preview at GitHub: it may change.
22+
23+## Files
24+
25+| File | System |
26+| --- | --- |
27+| `Sidekicks-1.6.0-macos-arm64.dmg` | macOS 13 or later, Apple Silicon — signed and notarized |
28+| `Sidekicks-1.6.0-macos-arm64.zip` | the same application, in a `.zip` |
29+| `Sidekicks-1.6.0-windows-amd64-installer.exe`, `Sidekicks-1.6.0-windows-arm64-installer.exe` | Windows, x86-64 or Arm — installer (adds WebView2 when missing; not signed: SmartScreen asks once) |
30+| `sidekicks_1.6.0_windows_amd64.zip`, `sidekicks_1.6.0_windows_arm64.zip` | the bare `sidekicks.exe`, where WebView2 is already present |
31+| `SHA256SUMS` | checksums: `shasum -a 256 -c SHA256SUMS --ignore-missing` |
modified frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/app/models.ts +7 -0
@@ -260,6 +260,13 @@ export interface SbxCheck {
260260 * folder or a sandbox: the interface suggests a free one (issue #99).
261261 */
262262 "taken": string[] | null;
263+
264+ /**
265+ * GH and GHSignedIn, for a kind whose token can come from gh (issue
266+ * #103): gh is installed, and signed in to GitHub.
267+ */
268+ "gh": boolean;
269+ "ghSignedIn": boolean;
263270 }
264271
265272 /**
@@ -260,6 +260,13 @@ export interface SbxCheck {
260 * folder or a sandbox: the interface suggests a free one (issue #99).260 * folder or a sandbox: the interface suggests a free one (issue #99).
261 */261 */
262 "taken": string[] | null;262 "taken": string[] | null;
263+
264+ /**
265+ * GH and GHSignedIn, for a kind whose token can come from gh (issue
266+ * #103): gh is installed, and signed in to GitHub.
267+ */
268+ "gh": boolean;
269+ "ghSignedIn": boolean;
263 }270 }
264 271
265 /**272 /**
modified frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/app/sbxcreatorservice.ts +42 -7
@@ -3,7 +3,7 @@
33
44 /**
55 * SbxCreatorService is the assistant that creates an agent in a Docker
6- * Sandbox — Claude, Gemini, Codex, Vibe… — for people who do not write files
6+ * Sandbox — Claude, Gemini, Codex, Vibe, Copilot… — for people who do not write files
77 * (issue #96): it checks sbx and the kind's API key (asking for it and
88 * storing it with sbx when missing), writes the agent's folder in the
99 * agents' folder and adds the agent to the configuration.
@@ -28,17 +28,26 @@ import * as sbxcreate$0 from "../sbxcreate/models.js";
2828 import * as $models from "./models.js";
2929
3030 /**
31- * CancelLogin stops the sign-in in progress, if any. Also done when
31+ * CancelGitHubLogin stops `gh auth login`, if it runs. Also done when
3232 * Sidekicks quits.
3333 */
34+export function CancelGitHubLogin(): $CancellablePromise<void> {
35+ return $Call.ByID(1701686700);
36+}
37+
38+/**
39+ * CancelLogin stops `sbx login`, if it runs. Also done when Sidekicks quits.
40+ */
3441 export function CancelLogin(): $CancellablePromise<void> {
3542 return $Call.ByID(1506734565);
3643 }
3744
3845 /**
3946 * Check checks that sbx is installed ("sbx is not installed" otherwise),
40- * whether the kind's key is stored, and suggests a free name: the kind's
41- * id, else id-2, id-3… — free as an agent, a folder and a sandbox.
47+ * whether the kind's key is stored (for each of its services), and suggests
48+ * a free name: the kind's id, else id-2, id-3… — free as an agent, a folder
49+ * and a sandbox. For a kind whose token can come from gh, it also says
50+ * whether gh is there and signed in.
4251 */
4352 export function Check(kindID: string): $CancellablePromise<$models.SbxCheck> {
4453 return $Call.ByID(1722205738, kindID);
@@ -54,6 +63,21 @@ export function Create(form: $models.SbxCreateForm): $CancellablePromise<$models
5463 return $Call.ByID(237897102, form);
5564 }
5665
66+/**
67+ * GitHubLogin starts `gh auth login --web` (issue #103) — or joins the one
68+ * in progress — like Login: it returns once gh printed its code and URL.
69+ */
70+export function GitHubLogin(): $CancellablePromise<sbxcreate$0.LoginState> {
71+ return $Call.ByID(2879435862);
72+}
73+
74+/**
75+ * GitHubLoginStatus waits — 20 seconds at most — for `gh auth login` to end.
76+ */
77+export function GitHubLoginStatus(): $CancellablePromise<sbxcreate$0.LoginState> {
78+ return $Call.ByID(3146208856);
79+}
80+
5781 /**
5882 * Kinds is the kinds of agents the assistant creates, in order.
5983 */
@@ -70,7 +94,7 @@ export function Login(): $CancellablePromise<sbxcreate$0.LoginState> {
7094 }
7195
7296 /**
73- * LoginStatus waits — 20 seconds at most — for the sign-in to end, and
97+ * LoginStatus waits — 20 seconds at most — for `sbx login` to end, and
7498 * returns where it is.
7599 */
76100 export function LoginStatus(): $CancellablePromise<sbxcreate$0.LoginState> {
@@ -78,9 +102,20 @@ export function LoginStatus(): $CancellablePromise<sbxcreate$0.LoginState> {
78102 }
79103
80104 /**
81- * SetKey stores the kind's key in sbx, for every sandbox. The key goes to
82- * sbx on its standard input; it is never written in a file nor in a log.
105+ * SetKey stores the kind's key in sbx, for every sandbox and each of the
106+ * kind's services. The key goes to sbx on its standard input; it is never
107+ * written in a file nor in a log.
83108 */
84109 export function SetKey(kindID: string, key: string): $CancellablePromise<void> {
85110 return $Call.ByID(2475754193, kindID, key);
86111 }
112+
113+/**
114+ * UseGitHub stores the token of the account gh is signed in with as the
115+ * kind's key (issue #103) — as `sbx secret set <service> --command 'gh auth
116+ * token'` would: "gh is not signed in to GitHub" when it has none. The token
117+ * goes from gh to sbx without being shown, written or logged.
118+ */
119+export function UseGitHub(kindID: string): $CancellablePromise<void> {
120+ return $Call.ByID(2759294282, kindID);
121+}
@@ -3,7 +3,7 @@
3 3
4 /**4 /**
5 * SbxCreatorService is the assistant that creates an agent in a Docker5 * SbxCreatorService is the assistant that creates an agent in a Docker
6- * Sandbox — Claude, Gemini, Codex, Vibe… — for people who do not write files6+ * Sandbox — Claude, Gemini, Codex, Vibe, Copilot… — for people who do not write files
7 * (issue #96): it checks sbx and the kind's API key (asking for it and7 * (issue #96): it checks sbx and the kind's API key (asking for it and
8 * storing it with sbx when missing), writes the agent's folder in the8 * storing it with sbx when missing), writes the agent's folder in the
9 * agents' folder and adds the agent to the configuration.9 * agents' folder and adds the agent to the configuration.
@@ -28,17 +28,26 @@ import * as sbxcreate$0 from "../sbxcreate/models.js";
28 import * as $models from "./models.js";28 import * as $models from "./models.js";
29 29
30 /**30 /**
31- * CancelLogin stops the sign-in in progress, if any. Also done when31+ * CancelGitHubLogin stops `gh auth login`, if it runs. Also done when
32 * Sidekicks quits.32 * Sidekicks quits.
33 */33 */
34+export function CancelGitHubLogin(): $CancellablePromise<void> {
35+ return $Call.ByID(1701686700);
36+}
37+
38+/**
39+ * CancelLogin stops `sbx login`, if it runs. Also done when Sidekicks quits.
40+ */
34 export function CancelLogin(): $CancellablePromise<void> {41 export function CancelLogin(): $CancellablePromise<void> {
35 return $Call.ByID(1506734565);42 return $Call.ByID(1506734565);
36 }43 }
37 44
38 /**45 /**
39 * Check checks that sbx is installed ("sbx is not installed" otherwise),46 * Check checks that sbx is installed ("sbx is not installed" otherwise),
40- * whether the kind's key is stored, and suggests a free name: the kind's47+ * whether the kind's key is stored (for each of its services), and suggests
41- * id, else id-2, id-3… — free as an agent, a folder and a sandbox.48+ * a free name: the kind's id, else id-2, id-3… — free as an agent, a folder
49+ * and a sandbox. For a kind whose token can come from gh, it also says
50+ * whether gh is there and signed in.
42 */51 */
43 export function Check(kindID: string): $CancellablePromise<$models.SbxCheck> {52 export function Check(kindID: string): $CancellablePromise<$models.SbxCheck> {
44 return $Call.ByID(1722205738, kindID);53 return $Call.ByID(1722205738, kindID);
@@ -54,6 +63,21 @@ export function Create(form: $models.SbxCreateForm): $CancellablePromise<$models
54 return $Call.ByID(237897102, form);63 return $Call.ByID(237897102, form);
55 }64 }
56 65
66+/**
67+ * GitHubLogin starts `gh auth login --web` (issue #103) — or joins the one
68+ * in progress — like Login: it returns once gh printed its code and URL.
69+ */
70+export function GitHubLogin(): $CancellablePromise<sbxcreate$0.LoginState> {
71+ return $Call.ByID(2879435862);
72+}
73+
74+/**
75+ * GitHubLoginStatus waits — 20 seconds at most — for `gh auth login` to end.
76+ */
77+export function GitHubLoginStatus(): $CancellablePromise<sbxcreate$0.LoginState> {
78+ return $Call.ByID(3146208856);
79+}
80+
57 /**81 /**
58 * Kinds is the kinds of agents the assistant creates, in order.82 * Kinds is the kinds of agents the assistant creates, in order.
59 */83 */
@@ -70,7 +94,7 @@ export function Login(): $CancellablePromise<sbxcreate$0.LoginState> {
70 }94 }
71 95
72 /**96 /**
73- * LoginStatus waits — 20 seconds at most — for the sign-in to end, and97+ * LoginStatus waits — 20 seconds at most — for `sbx login` to end, and
74 * returns where it is.98 * returns where it is.
75 */99 */
76 export function LoginStatus(): $CancellablePromise<sbxcreate$0.LoginState> {100 export function LoginStatus(): $CancellablePromise<sbxcreate$0.LoginState> {
@@ -78,9 +102,20 @@ export function LoginStatus(): $CancellablePromise<sbxcreate$0.LoginState> {
78 }102 }
79 103
80 /**104 /**
81- * SetKey stores the kind's key in sbx, for every sandbox. The key goes to105+ * SetKey stores the kind's key in sbx, for every sandbox and each of the
82- * sbx on its standard input; it is never written in a file nor in a log.106+ * kind's services. The key goes to sbx on its standard input; it is never
107+ * written in a file nor in a log.
83 */108 */
84 export function SetKey(kindID: string, key: string): $CancellablePromise<void> {109 export function SetKey(kindID: string, key: string): $CancellablePromise<void> {
85 return $Call.ByID(2475754193, kindID, key);110 return $Call.ByID(2475754193, kindID, key);
86 }111 }
112+
113+/**
114+ * UseGitHub stores the token of the account gh is signed in with as the
115+ * kind's key (issue #103) — as `sbx secret set <service> --command 'gh auth
116+ * token'` would: "gh is not signed in to GitHub" when it has none. The token
117+ * goes from gh to sbx without being shown, written or logged.
118+ */
119+export function UseGitHub(kindID: string): $CancellablePromise<void> {
120+ return $Call.ByID(2759294282, kindID);
121+}
modified frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/sbxcreate/models.ts +12 -0
@@ -36,6 +36,18 @@ export interface Kind {
3636 * KeyURL is where the user gets a key.
3737 */
3838 "keyUrl": string;
39+
40+ /**
41+ * Token is true when the secret is a token of the user's account rather
42+ * than an API key (GitHub Copilot): the assistant says so.
43+ */
44+ "token": boolean;
45+
46+ /**
47+ * FromGH is true when the token can come from the GitHub CLI
48+ * (`gh auth token`, issue #103): the assistant offers it.
49+ */
50+ "fromGh": boolean;
3951 }
4052
4153 /**
@@ -36,6 +36,18 @@ export interface Kind {
36 * KeyURL is where the user gets a key.36 * KeyURL is where the user gets a key.
37 */37 */
38 "keyUrl": string;38 "keyUrl": string;
39+
40+ /**
41+ * Token is true when the secret is a token of the user's account rather
42+ * than an API key (GitHub Copilot): the assistant says so.
43+ */
44+ "token": boolean;
45+
46+ /**
47+ * FromGH is true when the token can come from the GitHub CLI
48+ * (`gh auth token`, issue #103): the assistant offers it.
49+ */
50+ "fromGh": boolean;
39 }51 }
40 52
41 /**53 /**
modified frontend/src/lib/agent/CreateSbxAgent.svelte +39 -8
@@ -11,11 +11,12 @@
1111 import { SbxCreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
1212 import type { Kind } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/sbxcreate'
1313 import { agentAdded, appState } from '../state.svelte'
14- import { agentFolder, freeName, iconChoices, problemKey, sbxMissing, sbxNameFromTitle, validSbxName } from '../creator'
14+ import { agentFolder, freeName, iconChoices, keyText, problemKey, sbxMissing, sbxNameFromTitle, validSbxName } from '../creator'
1515 import AgentAvatar from './AgentAvatar.svelte'
1616 import { logoOf } from '../logos'
1717 import ErrorText from '../chat/ErrorText.svelte'
1818 import Spinner from '../chat/Spinner.svelte'
19+ import SbxLogin from '../chat/SbxLogin.svelte'
1920
2021 type Step = 'kind' | 'checking' | 'failed' | 'key' | 'details'
2122
@@ -25,6 +26,8 @@
2526 let failure = $state('')
2627 let agentsFolder = $state('')
2728 let hasKey = $state(false)
29+ let gh = $state(false)
30+ let ghSignedIn = $state(false)
2831 let key = $state('')
2932 let keyError = $state('')
3033 let busy = $state(false)
@@ -59,6 +62,8 @@
5962 try {
6063 const result = await SbxCreatorService.Check(kind.id)
6164 hasKey = result.hasKey
65+ gh = result.gh
66+ ghSignedIn = result.ghSignedIn
6267 agentsFolder = result.agentsFolder
6368 taken = result.taken ?? []
6469 name = name || result.name
@@ -85,6 +90,21 @@
8590 }
8691 }
8792
93+ // useGitHub stores gh's token as the kind's key (Copilot, issue #103).
94+ async function useGitHub() {
95+ if (!kind) return
96+ busy = true
97+ keyError = ''
98+ try {
99+ await SbxCreatorService.UseGitHub(kind.id)
100+ await check()
101+ } catch (caught) {
102+ keyError = caught instanceof Error ? caught.message : String(caught)
103+ } finally {
104+ busy = false
105+ }
106+ }
107+
88108 async function create(event: SubmitEvent) {
89109 event.preventDefault()
90110 if (!kind) return
@@ -155,11 +175,21 @@
155175 </div>
156176 {:else if step === 'key' && kind}
157177 <form class="panel" onsubmit={saveKey}>
158- <h2><AgentAvatar icon={kind.icon} title={kind.title} name={kind.id} size={20} /> {t('sbxCreator.key.title', { title: kind.title })}</h2>
159- <p>{t('sbxCreator.key.explain', { title: kind.title, service: kind.service })}</p>
160- <button type="button" class="link" onclick={() => kind && Browser.OpenURL(kind.keyUrl)}>{t('sbxCreator.key.get')}</button>
178+ <h2><AgentAvatar icon={kind.icon} title={kind.title} name={kind.id} size={20} /> {t(keyText('title', kind.token), { title: kind.title })}</h2>
179+ <p>{t(keyText('explain', kind.token), { title: kind.title, service: kind.service })}</p>
180+ {#if kind.fromGh && gh}
181+ {#if ghSignedIn}
182+ <p><button type="button" class="primary" onclick={useGitHub} disabled={busy}>{t('sbxCreator.token.useGh')}</button></p>
183+ <p class="hint">{t('sbxCreator.token.ghHint')}</p>
184+ {:else}
185+ <p>{t('sbxCreator.token.ghSignIn')}</p>
186+ <SbxLogin github onDone={useGitHub} />
187+ {/if}
188+ <p class="hint">{t('sbxCreator.token.orPaste')}</p>
189+ {/if}
190+ <button type="button" class="link" onclick={() => kind && Browser.OpenURL(kind.keyUrl)}>{t(keyText('get', kind.token))}</button>
161191 <label>
162- {t('sbxCreator.key.label')}
192+ {t(keyText('label', kind.token))}
163193 <!-- svelte-ignore a11y_autofocus -->
164194 <input type="password" bind:value={key} autocomplete="off" spellcheck="false" autocapitalize="off" autofocus disabled={busy} />
165195 </label>
@@ -168,15 +198,15 @@
168198 <button type="button" onclick={another} disabled={busy}>{t('sbxCreator.otherKind')}</button>
169199 <span class="grow"></span>
170200 <button type="button" onclick={() => (step = 'details')} disabled={busy}>{t('sbxCreator.key.later')}</button>
171- <button type="submit" class="primary" disabled={busy || !key.trim()}>{#if busy}<Spinner /> {t('sbxCreator.key.saving')}{:else}{t('sbxCreator.key.save')}{/if}</button>
201+ <button type="submit" class="primary" disabled={busy || !key.trim()}>{#if busy}<Spinner /> {t('sbxCreator.key.saving')}{:else}{t(keyText('save', kind.token))}{/if}</button>
172202 </div>
173203 </form>
174204 {:else if step === 'details' && kind}
175205 <form class="questions" onsubmit={create} novalidate>
176206 {#if hasKey}
177- <p class="ok">{t('sbxCreator.key.stored', { title: kind.title })} <button type="button" class="link" onclick={() => (step = 'key')}>{t('sbxCreator.key.replace')}</button></p>
207+ <p class="ok">{t(keyText('stored', kind.token), { title: kind.title })} <button type="button" class="link" onclick={() => (step = 'key')}>{t(keyText('replace', kind.token))}</button></p>
178208 {:else}
179- <p class="warning" role="alert">{t('sbxCreator.key.missing', { title: kind.title, service: kind.service })}</p>
209+ <p class="warning" role="alert">{t(keyText('missing', kind.token), { title: kind.title, service: kind.service })}</p>
180210 {/if}
181211 <fieldset disabled={busy}>
182212 <div class="row">
@@ -251,6 +281,7 @@
251281 .grow { flex: 1; min-width: 0; }
252282 .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
253283 .link { border: none; background: none; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; align-self: flex-start; }
284+ .hint { color: var(--muted); font-size: 12px; }
254285 .ok { margin: 0; color: var(--ok, var(--text)); }
255286 .warning { margin: 0; border: 1px solid var(--warn); border-radius: var(--radius); color: var(--warn); padding: 8px 12px; font-size: 13px; }
256287 .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; }
@@ -11,11 +11,12 @@
11 import { SbxCreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'11 import { SbxCreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
12 import type { Kind } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/sbxcreate'12 import type { Kind } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/sbxcreate'
13 import { agentAdded, appState } from '../state.svelte'13 import { agentAdded, appState } from '../state.svelte'
14- import { agentFolder, freeName, iconChoices, problemKey, sbxMissing, sbxNameFromTitle, validSbxName } from '../creator'14+ import { agentFolder, freeName, iconChoices, keyText, problemKey, sbxMissing, sbxNameFromTitle, validSbxName } from '../creator'
15 import AgentAvatar from './AgentAvatar.svelte'15 import AgentAvatar from './AgentAvatar.svelte'
16 import { logoOf } from '../logos'16 import { logoOf } from '../logos'
17 import ErrorText from '../chat/ErrorText.svelte'17 import ErrorText from '../chat/ErrorText.svelte'
18 import Spinner from '../chat/Spinner.svelte'18 import Spinner from '../chat/Spinner.svelte'
19+ import SbxLogin from '../chat/SbxLogin.svelte'
19 20
20 type Step = 'kind' | 'checking' | 'failed' | 'key' | 'details'21 type Step = 'kind' | 'checking' | 'failed' | 'key' | 'details'
21 22
@@ -25,6 +26,8 @@
25 let failure = $state('')26 let failure = $state('')
26 let agentsFolder = $state('')27 let agentsFolder = $state('')
27 let hasKey = $state(false)28 let hasKey = $state(false)
29+ let gh = $state(false)
30+ let ghSignedIn = $state(false)
28 let key = $state('')31 let key = $state('')
29 let keyError = $state('')32 let keyError = $state('')
30 let busy = $state(false)33 let busy = $state(false)
@@ -59,6 +62,8 @@
59 try {62 try {
60 const result = await SbxCreatorService.Check(kind.id)63 const result = await SbxCreatorService.Check(kind.id)
61 hasKey = result.hasKey64 hasKey = result.hasKey
65+ gh = result.gh
66+ ghSignedIn = result.ghSignedIn
62 agentsFolder = result.agentsFolder67 agentsFolder = result.agentsFolder
63 taken = result.taken ?? []68 taken = result.taken ?? []
64 name = name || result.name69 name = name || result.name
@@ -85,6 +90,21 @@
85 }90 }
86 }91 }
87 92
93+ // useGitHub stores gh's token as the kind's key (Copilot, issue #103).
94+ async function useGitHub() {
95+ if (!kind) return
96+ busy = true
97+ keyError = ''
98+ try {
99+ await SbxCreatorService.UseGitHub(kind.id)
100+ await check()
101+ } catch (caught) {
102+ keyError = caught instanceof Error ? caught.message : String(caught)
103+ } finally {
104+ busy = false
105+ }
106+ }
107+
88 async function create(event: SubmitEvent) {108 async function create(event: SubmitEvent) {
89 event.preventDefault()109 event.preventDefault()
90 if (!kind) return110 if (!kind) return
@@ -155,11 +175,21 @@
155 </div>175 </div>
156 {:else if step === 'key' && kind}176 {:else if step === 'key' && kind}
157 <form class="panel" onsubmit={saveKey}>177 <form class="panel" onsubmit={saveKey}>
158- <h2><AgentAvatar icon={kind.icon} title={kind.title} name={kind.id} size={20} /> {t('sbxCreator.key.title', { title: kind.title })}</h2>178+ <h2><AgentAvatar icon={kind.icon} title={kind.title} name={kind.id} size={20} /> {t(keyText('title', kind.token), { title: kind.title })}</h2>
159- <p>{t('sbxCreator.key.explain', { title: kind.title, service: kind.service })}</p>179+ <p>{t(keyText('explain', kind.token), { title: kind.title, service: kind.service })}</p>
160- <button type="button" class="link" onclick={() => kind && Browser.OpenURL(kind.keyUrl)}>{t('sbxCreator.key.get')}</button>180+ {#if kind.fromGh && gh}
181+ {#if ghSignedIn}
182+ <p><button type="button" class="primary" onclick={useGitHub} disabled={busy}>{t('sbxCreator.token.useGh')}</button></p>
183+ <p class="hint">{t('sbxCreator.token.ghHint')}</p>
184+ {:else}
185+ <p>{t('sbxCreator.token.ghSignIn')}</p>
186+ <SbxLogin github onDone={useGitHub} />
187+ {/if}
188+ <p class="hint">{t('sbxCreator.token.orPaste')}</p>
189+ {/if}
190+ <button type="button" class="link" onclick={() => kind && Browser.OpenURL(kind.keyUrl)}>{t(keyText('get', kind.token))}</button>
161 <label>191 <label>
162- {t('sbxCreator.key.label')}192+ {t(keyText('label', kind.token))}
163 <!-- svelte-ignore a11y_autofocus -->193 <!-- svelte-ignore a11y_autofocus -->
164 <input type="password" bind:value={key} autocomplete="off" spellcheck="false" autocapitalize="off" autofocus disabled={busy} />194 <input type="password" bind:value={key} autocomplete="off" spellcheck="false" autocapitalize="off" autofocus disabled={busy} />
165 </label>195 </label>
@@ -168,15 +198,15 @@
168 <button type="button" onclick={another} disabled={busy}>{t('sbxCreator.otherKind')}</button>198 <button type="button" onclick={another} disabled={busy}>{t('sbxCreator.otherKind')}</button>
169 <span class="grow"></span>199 <span class="grow"></span>
170 <button type="button" onclick={() => (step = 'details')} disabled={busy}>{t('sbxCreator.key.later')}</button>200 <button type="button" onclick={() => (step = 'details')} disabled={busy}>{t('sbxCreator.key.later')}</button>
171- <button type="submit" class="primary" disabled={busy || !key.trim()}>{#if busy}<Spinner /> {t('sbxCreator.key.saving')}{:else}{t('sbxCreator.key.save')}{/if}</button>201+ <button type="submit" class="primary" disabled={busy || !key.trim()}>{#if busy}<Spinner /> {t('sbxCreator.key.saving')}{:else}{t(keyText('save', kind.token))}{/if}</button>
172 </div>202 </div>
173 </form>203 </form>
174 {:else if step === 'details' && kind}204 {:else if step === 'details' && kind}
175 <form class="questions" onsubmit={create} novalidate>205 <form class="questions" onsubmit={create} novalidate>
176 {#if hasKey}206 {#if hasKey}
177- <p class="ok">{t('sbxCreator.key.stored', { title: kind.title })} <button type="button" class="link" onclick={() => (step = 'key')}>{t('sbxCreator.key.replace')}</button></p>207+ <p class="ok">{t(keyText('stored', kind.token), { title: kind.title })} <button type="button" class="link" onclick={() => (step = 'key')}>{t(keyText('replace', kind.token))}</button></p>
178 {:else}208 {:else}
179- <p class="warning" role="alert">{t('sbxCreator.key.missing', { title: kind.title, service: kind.service })}</p>209+ <p class="warning" role="alert">{t(keyText('missing', kind.token), { title: kind.title, service: kind.service })}</p>
180 {/if}210 {/if}
181 <fieldset disabled={busy}>211 <fieldset disabled={busy}>
182 <div class="row">212 <div class="row">
@@ -251,6 +281,7 @@
251 .grow { flex: 1; min-width: 0; }281 .grow { flex: 1; min-width: 0; }
252 .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }282 .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
253 .link { border: none; background: none; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; align-self: flex-start; }283 .link { border: none; background: none; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; align-self: flex-start; }
284+ .hint { color: var(--muted); font-size: 12px; }
254 .ok { margin: 0; color: var(--ok, var(--text)); }285 .ok { margin: 0; color: var(--ok, var(--text)); }
255 .warning { margin: 0; border: 1px solid var(--warn); border-radius: var(--radius); color: var(--warn); padding: 8px 12px; font-size: 13px; }286 .warning { margin: 0; border: 1px solid var(--warn); border-radius: var(--radius); color: var(--warn); padding: 8px 12px; font-size: 13px; }
256 .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; }287 .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; }
modified frontend/src/lib/agentform.test.ts +7 -0
@@ -196,6 +196,13 @@ describe('Mistral Vibe in a sandbox (issue #86)', () => {
196196 })
197197 })
198198
199+describe('GitHub Copilot CLI in a sandbox (issue #103)', () => {
200+ it('chooses copilot --acp --stdio for the sbx agent copilot', () => {
201+ expect(programOfSandbox('copilot')).toEqual({ program: 'copilot', arguments: '--acp --stdio' })
202+ expect(withSbxProgram(emptyForm(), 'copilot')).toMatchObject({ program: 'copilot', arguments: '--acp --stdio' })
203+ })
204+})
205+
199206 describe('Docker Agent in a sandbox (issue #87)', () => {
200207 it('chooses docker-agent for the sbx agent docker-agent, or cagent', () => {
201208 expect(programOfSandbox('docker-agent')).toEqual({ program: 'docker-agent', arguments: 'serve acp' })
@@ -196,6 +196,13 @@ describe('Mistral Vibe in a sandbox (issue #86)', () => {
196 })196 })
197 })197 })
198 198
199+describe('GitHub Copilot CLI in a sandbox (issue #103)', () => {
200+ it('chooses copilot --acp --stdio for the sbx agent copilot', () => {
201+ expect(programOfSandbox('copilot')).toEqual({ program: 'copilot', arguments: '--acp --stdio' })
202+ expect(withSbxProgram(emptyForm(), 'copilot')).toMatchObject({ program: 'copilot', arguments: '--acp --stdio' })
203+ })
204+})
205+
199 describe('Docker Agent in a sandbox (issue #87)', () => {206 describe('Docker Agent in a sandbox (issue #87)', () => {
200 it('chooses docker-agent for the sbx agent docker-agent, or cagent', () => {207 it('chooses docker-agent for the sbx agent docker-agent, or cagent', () => {
201 expect(programOfSandbox('docker-agent')).toEqual({ program: 'docker-agent', arguments: 'serve acp' })208 expect(programOfSandbox('docker-agent')).toEqual({ program: 'docker-agent', arguments: 'serve acp' })
modified frontend/src/lib/agentform.ts +6 -3
@@ -160,8 +160,9 @@ export function programsFor(environment: Environment): string[] {
160160 * Claude, Codex or Gemini (sbxPrograms), mini-me (mm, from a kit such as
161161 * docker.io/k33g/mini-me-kit, whose sbx agent is named after the kit), or
162162 * Docker Agent (docker-agent, an sbx agent of its own, also called cagent),
163- * Google Antigravity (agy acp, the kit that replaces Gemini's, issue #96), or
164- * Mistral Vibe (vibe-acp, issue #86).
163+ * Google Antigravity (agy acp, the kit that replaces Gemini's, issue #96),
164+ * Mistral Vibe (vibe-acp, issue #86), or GitHub Copilot CLI (copilot --acp
165+ * --stdio, issue #103).
165166 * mm and docker-agent also need their configuration file: dropping it
166167 * adds it to the arguments (argumentsFor).
167168 *
@@ -171,6 +172,7 @@ export function programsFor(environment: Environment): string[] {
171172 * programOfSandbox('docker-agent') // { program: 'docker-agent', arguments: 'serve acp' }
172173 * programOfSandbox('antigravity') // { program: 'agy', arguments: 'acp' }
173174 * programOfSandbox('vibe') // { program: 'vibe-acp', arguments: '' }
175+ * programOfSandbox('copilot') // { program: 'copilot', arguments: '--acp --stdio' }
174176 */
175177 export function programOfSandbox(agent: string | undefined): { program: string; arguments: string } | undefined {
176178 const known = (agent ?? '').trim()
@@ -179,6 +181,7 @@ export function programOfSandbox(agent: string | undefined): { program: string;
179181 if (known === 'docker-agent' || known === 'cagent') return { program: 'docker-agent', arguments: 'serve acp' }
180182 if (known === 'antigravity') return { program: 'agy', arguments: 'acp' }
181183 if (known === 'vibe') return { program: 'vibe-acp', arguments: '' }
184+ if (known === 'copilot') return { program: 'copilot', arguments: '--acp --stdio' }
182185 return undefined
183186 }
184187
@@ -197,7 +200,7 @@ export function withSbxProgram(form: AgentFormValues, agent: string | undefined)
197200 if (!wanted) return form
198201 const program = form.program.trim()
199202 if (program === wanted.program) return form
200- const offered = [...knownPrograms, ...Object.values(sbxPrograms), legacyCodexProgram, 'agy', 'vibe-acp'] as string[]
203+ const offered = [...knownPrograms, ...Object.values(sbxPrograms), legacyCodexProgram, 'agy', 'vibe-acp', 'copilot'] as string[]
201204 if (program && !offered.includes(program)) return form
202205 return { ...form, program: wanted.program, arguments: wanted.arguments }
203206 }
@@ -160,8 +160,9 @@ export function programsFor(environment: Environment): string[] {
160 * Claude, Codex or Gemini (sbxPrograms), mini-me (mm, from a kit such as160 * Claude, Codex or Gemini (sbxPrograms), mini-me (mm, from a kit such as
161 * docker.io/k33g/mini-me-kit, whose sbx agent is named after the kit), or161 * docker.io/k33g/mini-me-kit, whose sbx agent is named after the kit), or
162 * Docker Agent (docker-agent, an sbx agent of its own, also called cagent),162 * Docker Agent (docker-agent, an sbx agent of its own, also called cagent),
163- * Google Antigravity (agy acp, the kit that replaces Gemini's, issue #96), or163+ * Google Antigravity (agy acp, the kit that replaces Gemini's, issue #96),
164- * Mistral Vibe (vibe-acp, issue #86).164+ * Mistral Vibe (vibe-acp, issue #86), or GitHub Copilot CLI (copilot --acp
165+ * --stdio, issue #103).
165 * mm and docker-agent also need their configuration file: dropping it166 * mm and docker-agent also need their configuration file: dropping it
166 * adds it to the arguments (argumentsFor).167 * adds it to the arguments (argumentsFor).
167 *168 *
@@ -171,6 +172,7 @@ export function programsFor(environment: Environment): string[] {
171 * programOfSandbox('docker-agent') // { program: 'docker-agent', arguments: 'serve acp' }172 * programOfSandbox('docker-agent') // { program: 'docker-agent', arguments: 'serve acp' }
172 * programOfSandbox('antigravity') // { program: 'agy', arguments: 'acp' }173 * programOfSandbox('antigravity') // { program: 'agy', arguments: 'acp' }
173 * programOfSandbox('vibe') // { program: 'vibe-acp', arguments: '' }174 * programOfSandbox('vibe') // { program: 'vibe-acp', arguments: '' }
175+ * programOfSandbox('copilot') // { program: 'copilot', arguments: '--acp --stdio' }
174 */176 */
175 export function programOfSandbox(agent: string | undefined): { program: string; arguments: string } | undefined {177 export function programOfSandbox(agent: string | undefined): { program: string; arguments: string } | undefined {
176 const known = (agent ?? '').trim()178 const known = (agent ?? '').trim()
@@ -179,6 +181,7 @@ export function programOfSandbox(agent: string | undefined): { program: string;
179 if (known === 'docker-agent' || known === 'cagent') return { program: 'docker-agent', arguments: 'serve acp' }181 if (known === 'docker-agent' || known === 'cagent') return { program: 'docker-agent', arguments: 'serve acp' }
180 if (known === 'antigravity') return { program: 'agy', arguments: 'acp' }182 if (known === 'antigravity') return { program: 'agy', arguments: 'acp' }
181 if (known === 'vibe') return { program: 'vibe-acp', arguments: '' }183 if (known === 'vibe') return { program: 'vibe-acp', arguments: '' }
184+ if (known === 'copilot') return { program: 'copilot', arguments: '--acp --stdio' }
182 return undefined185 return undefined
183 }186 }
184 187
@@ -197,7 +200,7 @@ export function withSbxProgram(form: AgentFormValues, agent: string | undefined)
197 if (!wanted) return form200 if (!wanted) return form
198 const program = form.program.trim()201 const program = form.program.trim()
199 if (program === wanted.program) return form202 if (program === wanted.program) return form
200- const offered = [...knownPrograms, ...Object.values(sbxPrograms), legacyCodexProgram, 'agy', 'vibe-acp'] as string[]203+ const offered = [...knownPrograms, ...Object.values(sbxPrograms), legacyCodexProgram, 'agy', 'vibe-acp', 'copilot'] as string[]
201 if (program && !offered.includes(program)) return form204 if (program && !offered.includes(program)) return form
202 return { ...form, program: wanted.program, arguments: wanted.arguments }205 return { ...form, program: wanted.program, arguments: wanted.arguments }
203 }206 }
modified frontend/src/lib/avatar.test.ts +2 -1
@@ -10,7 +10,8 @@ describe('logos (issue #100)', () => {
1010 const avatar = avatarOf('logo:claude', 'Claude', 'claude')
1111 expect('logo' in avatar && avatar.logo.title).toBe('Claude')
1212 expect(logoOf(' logo:mistral ')?.title).toBe('Mistral AI')
13- expect(Object.keys(logos).sort()).toEqual(['claude', 'gemini', 'mistral', 'openai'])
13+ expect(logoOf('logo:copilot')?.title).toBe('GitHub Copilot')
14+ expect(Object.keys(logos).sort()).toEqual(['claude', 'copilot', 'gemini', 'mistral', 'openai'])
1415 })
1516 it('shows a letter for an unknown logo, and no text icon', () => {
1617 expect(avatarOf('logo:nope', 'Codex', 'codex')).toMatchObject({ letter: 'C' })
@@ -10,7 +10,8 @@ describe('logos (issue #100)', () => {
10 const avatar = avatarOf('logo:claude', 'Claude', 'claude')10 const avatar = avatarOf('logo:claude', 'Claude', 'claude')
11 expect('logo' in avatar && avatar.logo.title).toBe('Claude')11 expect('logo' in avatar && avatar.logo.title).toBe('Claude')
12 expect(logoOf(' logo:mistral ')?.title).toBe('Mistral AI')12 expect(logoOf(' logo:mistral ')?.title).toBe('Mistral AI')
13- expect(Object.keys(logos).sort()).toEqual(['claude', 'gemini', 'mistral', 'openai'])13+ expect(logoOf('logo:copilot')?.title).toBe('GitHub Copilot')
14+ expect(Object.keys(logos).sort()).toEqual(['claude', 'copilot', 'gemini', 'mistral', 'openai'])
14 })15 })
15 it('shows a letter for an unknown logo, and no text icon', () => {16 it('shows a letter for an unknown logo, and no text icon', () => {
16 expect(avatarOf('logo:nope', 'Codex', 'codex')).toMatchObject({ letter: 'C' })17 expect(avatarOf('logo:nope', 'Codex', 'codex')).toMatchObject({ letter: 'C' })
modified frontend/src/lib/chat/SbxLogin.svelte +17 -9
@@ -5,14 +5,22 @@
55 // (SbxCreatorService.Login), shows the code and a button that opens the
66 // page where the user confirms it, then waits (LoginStatus, called again
77 // until sbx says who signed in). Shown under the error by ErrorText.
8+ // With github, the same for `gh auth login --web` (GitHubLogin, issue
9+ // #103): the sandbox assistant takes gh's token for Copilot afterwards.
810 import { onDestroy } from 'svelte'
911 import { Browser } from '@wailsio/runtime'
10- import { t } from '../i18n/index.svelte'
12+ import { t, type MessageKey } from '../i18n/index.svelte'
1113 import { SbxCreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
1214 import type { LoginState } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/sbxcreate'
1315 import Spinner from './Spinner.svelte'
1416
15- let { onDone }: { onDone?: () => void } = $props()
17+ let { onDone, github = false }: { onDone?: () => void; github?: boolean } = $props()
18+
19+ // The service's calls, and the texts that name Docker or GitHub.
20+ const begin = () => (github ? SbxCreatorService.GitHubLogin() : SbxCreatorService.Login())
21+ const status = () => (github ? SbxCreatorService.GitHubLoginStatus() : SbxCreatorService.LoginStatus())
22+ const stop = () => (github ? SbxCreatorService.CancelGitHubLogin() : SbxCreatorService.CancelLogin())
23+ const prefix = $derived(github ? 'ghLogin' : 'sbxLogin')
1624
1725 type Step = 'idle' | 'starting' | 'waiting' | 'signed' | 'failed'
1826 let step = $state<Step>('idle')
@@ -24,10 +32,10 @@
2432 step = 'starting'
2533 failure = ''
2634 try {
27- login = await SbxCreatorService.Login()
35+ login = await begin()
2836 step = 'waiting'
2937 // Ask again until sbx ends: each call waits up to 20 seconds.
30- while (active && login && !login.done) login = await SbxCreatorService.LoginStatus()
38+ while (active && login && !login.done) login = await status()
3139 if (!active || !login) return
3240 if (login.user) {
3341 step = 'signed'
@@ -43,19 +51,19 @@
4351 }
4452
4553 function cancel() {
46- void SbxCreatorService.CancelLogin()
54+ void stop()
4755 step = 'idle'
4856 }
4957
5058 onDestroy(() => {
5159 active = false
52- if (step === 'starting' || step === 'waiting') void SbxCreatorService.CancelLogin()
60+ if (step === 'starting' || step === 'waiting') void stop()
5361 })
5462 </script>
5563
5664 <div class="sbx-login">
5765 {#if step === 'idle'}
58- <button type="button" class="primary" onclick={start}>{t('sbxLogin.start')}</button>
66+ <button type="button" class="primary" onclick={start}>{t(`${prefix}.start` as MessageKey)}</button>
5967 {:else if step === 'starting'}
6068 <p role="status"><Spinner /> {t('sbxLogin.starting')}</p>
6169 {:else if step === 'waiting' && login}
@@ -71,9 +79,9 @@
7179 <p role="status"><Spinner /> {t('sbxLogin.waiting')}</p>
7280 <button type="button" onclick={cancel}>{t('creator.cancel')}</button>
7381 {:else if step === 'signed' && login}
74- <p class="ok" role="status">{t('sbxLogin.signed', { user: login.user })}</p>
82+ <p class="ok" role="status">{t(`${prefix}.signed` as MessageKey, { user: login.user })}</p>
7583 {:else if step === 'failed'}
76- <p class="failed" role="alert">{failure === 'cancelled' ? t('sbxLogin.cancelled') : t('sbxLogin.failed')}</p>
84+ <p class="failed" role="alert">{failure === 'cancelled' ? t('sbxLogin.cancelled') : t(`${prefix}.failed` as MessageKey)}</p>
7785 {#if login && (login.output ?? []).length > 0}
7886 <details><summary>{t('error.details')}</summary><pre>{(login.output ?? []).join('\n')}</pre></details>
7987 {:else if failure && failure !== 'cancelled'}
@@ -5,14 +5,22 @@
5 // (SbxCreatorService.Login), shows the code and a button that opens the5 // (SbxCreatorService.Login), shows the code and a button that opens the
6 // page where the user confirms it, then waits (LoginStatus, called again6 // page where the user confirms it, then waits (LoginStatus, called again
7 // until sbx says who signed in). Shown under the error by ErrorText.7 // until sbx says who signed in). Shown under the error by ErrorText.
8+ // With github, the same for `gh auth login --web` (GitHubLogin, issue
9+ // #103): the sandbox assistant takes gh's token for Copilot afterwards.
8 import { onDestroy } from 'svelte'10 import { onDestroy } from 'svelte'
9 import { Browser } from '@wailsio/runtime'11 import { Browser } from '@wailsio/runtime'
10- import { t } from '../i18n/index.svelte'12+ import { t, type MessageKey } from '../i18n/index.svelte'
11 import { SbxCreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'13 import { SbxCreatorService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
12 import type { LoginState } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/sbxcreate'14 import type { LoginState } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/sbxcreate'
13 import Spinner from './Spinner.svelte'15 import Spinner from './Spinner.svelte'
14 16
15- let { onDone }: { onDone?: () => void } = $props()17+ let { onDone, github = false }: { onDone?: () => void; github?: boolean } = $props()
18+
19+ // The service's calls, and the texts that name Docker or GitHub.
20+ const begin = () => (github ? SbxCreatorService.GitHubLogin() : SbxCreatorService.Login())
21+ const status = () => (github ? SbxCreatorService.GitHubLoginStatus() : SbxCreatorService.LoginStatus())
22+ const stop = () => (github ? SbxCreatorService.CancelGitHubLogin() : SbxCreatorService.CancelLogin())
23+ const prefix = $derived(github ? 'ghLogin' : 'sbxLogin')
16 24
17 type Step = 'idle' | 'starting' | 'waiting' | 'signed' | 'failed'25 type Step = 'idle' | 'starting' | 'waiting' | 'signed' | 'failed'
18 let step = $state<Step>('idle')26 let step = $state<Step>('idle')
@@ -24,10 +32,10 @@
24 step = 'starting'32 step = 'starting'
25 failure = ''33 failure = ''
26 try {34 try {
27- login = await SbxCreatorService.Login()35+ login = await begin()
28 step = 'waiting'36 step = 'waiting'
29 // Ask again until sbx ends: each call waits up to 20 seconds.37 // Ask again until sbx ends: each call waits up to 20 seconds.
30- while (active && login && !login.done) login = await SbxCreatorService.LoginStatus()38+ while (active && login && !login.done) login = await status()
31 if (!active || !login) return39 if (!active || !login) return
32 if (login.user) {40 if (login.user) {
33 step = 'signed'41 step = 'signed'
@@ -43,19 +51,19 @@
43 }51 }
44 52
45 function cancel() {53 function cancel() {
46- void SbxCreatorService.CancelLogin()54+ void stop()
47 step = 'idle'55 step = 'idle'
48 }56 }
49 57
50 onDestroy(() => {58 onDestroy(() => {
51 active = false59 active = false
52- if (step === 'starting' || step === 'waiting') void SbxCreatorService.CancelLogin()60+ if (step === 'starting' || step === 'waiting') void stop()
53 })61 })
54 </script>62 </script>
55 63
56 <div class="sbx-login">64 <div class="sbx-login">
57 {#if step === 'idle'}65 {#if step === 'idle'}
58- <button type="button" class="primary" onclick={start}>{t('sbxLogin.start')}</button>66+ <button type="button" class="primary" onclick={start}>{t(`${prefix}.start` as MessageKey)}</button>
59 {:else if step === 'starting'}67 {:else if step === 'starting'}
60 <p role="status"><Spinner /> {t('sbxLogin.starting')}</p>68 <p role="status"><Spinner /> {t('sbxLogin.starting')}</p>
61 {:else if step === 'waiting' && login}69 {:else if step === 'waiting' && login}
@@ -71,9 +79,9 @@
71 <p role="status"><Spinner /> {t('sbxLogin.waiting')}</p>79 <p role="status"><Spinner /> {t('sbxLogin.waiting')}</p>
72 <button type="button" onclick={cancel}>{t('creator.cancel')}</button>80 <button type="button" onclick={cancel}>{t('creator.cancel')}</button>
73 {:else if step === 'signed' && login}81 {:else if step === 'signed' && login}
74- <p class="ok" role="status">{t('sbxLogin.signed', { user: login.user })}</p>82+ <p class="ok" role="status">{t(`${prefix}.signed` as MessageKey, { user: login.user })}</p>
75 {:else if step === 'failed'}83 {:else if step === 'failed'}
76- <p class="failed" role="alert">{failure === 'cancelled' ? t('sbxLogin.cancelled') : t('sbxLogin.failed')}</p>84+ <p class="failed" role="alert">{failure === 'cancelled' ? t('sbxLogin.cancelled') : t(`${prefix}.failed` as MessageKey)}</p>
77 {#if login && (login.output ?? []).length > 0}85 {#if login && (login.output ?? []).length > 0}
78 <details><summary>{t('error.details')}</summary><pre>{(login.output ?? []).join('\n')}</pre></details>86 <details><summary>{t('error.details')}</summary><pre>{(login.output ?? []).join('\n')}</pre></details>
79 {:else if failure && failure !== 'cancelled'}87 {:else if failure && failure !== 'cancelled'}
modified frontend/src/lib/creator.test.ts +17 -1
@@ -1,7 +1,8 @@
11 // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE
22
33 import { describe, expect, it } from 'vitest'
4-import { agentFolder, contentOf, freeName, sbxMissing, sbxNameFromTitle, validSbxName, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Field, type Form } from './creator'
4+import { en, fr } from './i18n/messages'
5+import { agentFolder, contentOf, freeName, keyText, sbxMissing, sbxNameFromTitle, validSbxName, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Field, type Form } from './creator'
56
67 function field(name: string, type: string, extra: Partial<Field> = {}): Field {
78 return { name, title: name, description: '', type, options: null, default: null, required: true, ...extra }
@@ -123,3 +124,18 @@ describe('problems', () => {
123124 expect(startProblem('connection refused')).toBeNull()
124125 })
125126 })
127+
128+describe('keyText (issue #103)', () => {
129+ it('says token for a kind whose secret is a token, key otherwise', () => {
130+ expect(keyText('label', false)).toBe('sbxCreator.key.label')
131+ expect(keyText('explain', true)).toBe('sbxCreator.token.explain')
132+ })
133+ it('names messages that exist in both catalogues', () => {
134+ for (const text of ['title', 'explain', 'get', 'label', 'save', 'stored', 'missing', 'replace'] as const) {
135+ for (const token of [false, true]) {
136+ expect(en).toHaveProperty(keyText(text, token))
137+ expect(fr).toHaveProperty(keyText(text, token))
138+ }
139+ }
140+ })
141+})
@@ -1,7 +1,8 @@
1 // Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE1 // 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 { agentFolder, contentOf, freeName, sbxMissing, sbxNameFromTitle, validSbxName, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Field, type Form } from './creator'4+import { en, fr } from './i18n/messages'
5+import { agentFolder, contentOf, freeName, keyText, sbxMissing, sbxNameFromTitle, validSbxName, initialValues, missingFields, noModelServer, problemKey, splitMessages, startProblem, validName, type Field, type Form } from './creator'
5 6
6 function field(name: string, type: string, extra: Partial<Field> = {}): Field {7 function field(name: string, type: string, extra: Partial<Field> = {}): Field {
7 return { name, title: name, description: '', type, options: null, default: null, required: true, ...extra }8 return { name, title: name, description: '', type, options: null, default: null, required: true, ...extra }
@@ -123,3 +124,18 @@ describe('problems', () => {
123 expect(startProblem('connection refused')).toBeNull()124 expect(startProblem('connection refused')).toBeNull()
124 })125 })
125 })126 })
127+
128+describe('keyText (issue #103)', () => {
129+ it('says token for a kind whose secret is a token, key otherwise', () => {
130+ expect(keyText('label', false)).toBe('sbxCreator.key.label')
131+ expect(keyText('explain', true)).toBe('sbxCreator.token.explain')
132+ })
133+ it('names messages that exist in both catalogues', () => {
134+ for (const text of ['title', 'explain', 'get', 'label', 'save', 'stored', 'missing', 'replace'] as const) {
135+ for (const token of [false, true]) {
136+ expect(en).toHaveProperty(keyText(text, token))
137+ expect(fr).toHaveProperty(keyText(text, token))
138+ }
139+ }
140+ })
141+})
modified frontend/src/lib/creator.ts +15 -0
@@ -201,3 +201,18 @@ export function startProblem(raw: string): { key: MessageKey; found: string } |
201201 if (old) return { key: 'creator.mmTooOld', found: old[1] }
202202 return null
203203 }
204+
205+/** The texts of the sandbox assistant's key step (issue #96). */
206+export type KeyText = 'title' | 'explain' | 'get' | 'label' | 'save' | 'stored' | 'missing' | 'replace'
207+
208+/**
209+ * The message of a text of the key step: a kind whose secret is a token of
210+ * the user's account (GitHub Copilot, issue #103) does not say "API key".
211+ *
212+ * @example
213+ * keyText('label', false) // 'sbxCreator.key.label'
214+ * keyText('label', true) // 'sbxCreator.token.label'
215+ */
216+export function keyText(text: KeyText, token: boolean): MessageKey {
217+ return `sbxCreator.${token ? 'token' : 'key'}.${text}` as MessageKey
218+}
@@ -201,3 +201,18 @@ export function startProblem(raw: string): { key: MessageKey; found: string } |
201 if (old) return { key: 'creator.mmTooOld', found: old[1] }201 if (old) return { key: 'creator.mmTooOld', found: old[1] }
202 return null202 return null
203 }203 }
204+
205+/** The texts of the sandbox assistant's key step (issue #96). */
206+export type KeyText = 'title' | 'explain' | 'get' | 'label' | 'save' | 'stored' | 'missing' | 'replace'
207+
208+/**
209+ * The message of a text of the key step: a kind whose secret is a token of
210+ * the user's account (GitHub Copilot, issue #103) does not say "API key".
211+ *
212+ * @example
213+ * keyText('label', false) // 'sbxCreator.key.label'
214+ * keyText('label', true) // 'sbxCreator.token.label'
215+ */
216+export function keyText(text: KeyText, token: boolean): MessageKey {
217+ return `sbxCreator.${token ? 'token' : 'key'}.${text}` as MessageKey
218+}
modified frontend/src/lib/errors.test.ts +1 -0
@@ -21,6 +21,7 @@ describe('explain', () => {
2121 it('recognises sbx before sbx login (issue #97)', () => {
2222 expect(explain('sbx ls: exit status 1: error: not signed in to Docker try: sbx login or: sbx daemon restart')?.key).toBe('error.sbxNotSignedIn')
2323 expect(explain('You are not authenticated to Docker. Starting the sign-in flow...')?.key).toBe('error.sbxNotSignedIn')
24+ expect(explain('gh is not signed in to GitHub')?.key).toBe('error.ghNotSignedIn')
2425 })
2526
2627 it('recognises the limit of running agents', () => {
@@ -21,6 +21,7 @@ describe('explain', () => {
21 it('recognises sbx before sbx login (issue #97)', () => {21 it('recognises sbx before sbx login (issue #97)', () => {
22 expect(explain('sbx ls: exit status 1: error: not signed in to Docker try: sbx login or: sbx daemon restart')?.key).toBe('error.sbxNotSignedIn')22 expect(explain('sbx ls: exit status 1: error: not signed in to Docker try: sbx login or: sbx daemon restart')?.key).toBe('error.sbxNotSignedIn')
23 expect(explain('You are not authenticated to Docker. Starting the sign-in flow...')?.key).toBe('error.sbxNotSignedIn')23 expect(explain('You are not authenticated to Docker. Starting the sign-in flow...')?.key).toBe('error.sbxNotSignedIn')
24+ expect(explain('gh is not signed in to GitHub')?.key).toBe('error.ghNotSignedIn')
24 })25 })
25 26
26 it('recognises the limit of running agents', () => {27 it('recognises the limit of running agents', () => {
modified frontend/src/lib/errors.ts +2 -0
@@ -23,6 +23,8 @@ interface Rule {
2323 const rules: Rule[] = [
2424 // sbx before `sbx login` (issue #97): ErrorText offers to sign in.
2525 { pattern: /not signed in to Docker|not authenticated to Docker/i, key: 'error.sbxNotSignedIn' },
26+ // gh without a token (issue #103).
27+ { pattern: /gh is not signed in to GitHub/, key: 'error.ghNotSignedIn' },
2628 { pattern: /Cannot connect to the Docker daemon|docker daemon is not running|error during connect/i, key: 'error.dockerNotRunning' },
2729 { pattern: /No such container:\s*(\S+)/i, key: 'error.containerMissing', groups: ['box'] },
2830 // docker-agent serve acp without its agent file (cobra's message).
@@ -23,6 +23,8 @@ interface Rule {
23 const rules: Rule[] = [23 const rules: Rule[] = [
24 // sbx before `sbx login` (issue #97): ErrorText offers to sign in.24 // sbx before `sbx login` (issue #97): ErrorText offers to sign in.
25 { pattern: /not signed in to Docker|not authenticated to Docker/i, key: 'error.sbxNotSignedIn' },25 { pattern: /not signed in to Docker|not authenticated to Docker/i, key: 'error.sbxNotSignedIn' },
26+ // gh without a token (issue #103).
27+ { pattern: /gh is not signed in to GitHub/, key: 'error.ghNotSignedIn' },
26 { pattern: /Cannot connect to the Docker daemon|docker daemon is not running|error during connect/i, key: 'error.dockerNotRunning' },28 { pattern: /Cannot connect to the Docker daemon|docker daemon is not running|error during connect/i, key: 'error.dockerNotRunning' },
27 { pattern: /No such container:\s*(\S+)/i, key: 'error.containerMissing', groups: ['box'] },29 { pattern: /No such container:\s*(\S+)/i, key: 'error.containerMissing', groups: ['box'] },
28 // docker-agent serve acp without its agent file (cobra's message).30 // docker-agent serve acp without its agent file (cobra's message).
modified frontend/src/lib/i18n/messages.ts +38 -4
@@ -178,6 +178,10 @@ export const en = {
178178 'sbxLogin.signed': '✓ Signed in to Docker as {user}.',
179179 'sbxLogin.failed': 'The sign-in did not succeed. Try again, or type sbx login in a terminal.',
180180 'sbxLogin.cancelled': 'Sign-in cancelled.',
181+ 'ghLogin.start': 'Sign in to GitHub',
182+ 'ghLogin.signed': '✓ Signed in to GitHub as {user}.',
183+ 'ghLogin.failed': 'The sign-in did not succeed. Try again, or type gh auth login in a terminal.',
184+ 'error.ghNotSignedIn': 'The GitHub CLI (gh) is not signed in to GitHub: sign in with it first.',
181185 'error.programNotFound': 'The program "{program}" cannot be found. Install it, or give its full path in the agent\'s settings (for example /opt/homebrew/bin/{program}).',
182186 'error.programNotExecutable': '"{program}" cannot be run: it is not executable. In a terminal: chmod +x {program}',
183187 'error.dockerNotRunning': 'Docker is not running. Start Docker Desktop (or the Docker service), then try again.',
@@ -345,8 +349,8 @@ export const en = {
345349 'agents.add': '+ Add an agent',
346350 'agents.create': '✨ Create a mini-me agent',
347351 'agents.createSbx': '✨ Create an agent in a sandbox',
348- 'welcome.createSbxFirst': '✨ Create a Claude, Gemini, Codex or Vibe agent',
349- 'action.createSbxAgent': 'Create an agent in a sandbox (Claude, Gemini, Codex, Vibe)',
352+ 'welcome.createSbxFirst': '✨ Create a Claude, Gemini, Codex, Vibe or Copilot agent',
353+ 'action.createSbxAgent': 'Create an agent in a sandbox (Claude, Gemini, Codex, Vibe, Copilot)',
350354 'creator.problem.sandboxExists': 'A sandbox with this name already exists: choose another name.',
351355 'creator.problem.taken': 'This name is already used (by an agent, a folder or a sandbox): try {suggestion}.',
352356 'creator.agentTitle': 'Name shown',
@@ -357,6 +361,7 @@ export const en = {
357361 'sbxCreator.kind.gemini': 'Google Gemini, through Antigravity',
358362 'sbxCreator.kind.codex': "OpenAI's Codex",
359363 'sbxCreator.kind.vibe': "Mistral AI's Vibe",
364+ 'sbxCreator.kind.copilot': "GitHub's Copilot CLI",
360365 'sbxCreator.checking': 'Checking sbx and your key…',
361366 'sbxCreator.sbxMissing': 'sbx (Docker Sandboxes) is not installed on this computer. Install it, then try again.',
362367 'sbxCreator.otherKind': '← Another agent',
@@ -370,6 +375,18 @@ export const en = {
370375 'sbxCreator.key.stored': '✓ Your {title} key is stored in sbx.',
371376 'sbxCreator.key.missing': 'No {title} key in sbx yet: the agent will not be able to answer until you save one (run this assistant again, or sbx secret set {service}).',
372377 'sbxCreator.key.replace': 'Replace the key',
378+ 'sbxCreator.token.title': 'Your {title} token',
379+ 'sbxCreator.token.explain': '{title} uses your GitHub account: it needs a GitHub token allowed to use Copilot, and a Copilot subscription. Sidekicks gives it to sbx, which stores it ({service} and github) and gives it to your sandboxes for their calls to Copilot, and to git and gh on GitHub: the agent can then work on your repositories with your account. It is never written in a file.',
380+ 'sbxCreator.token.useGh': 'Use my GitHub account',
381+ 'sbxCreator.token.ghHint': 'Sidekicks takes the token of the GitHub CLI (gh auth token), without showing it.',
382+ 'sbxCreator.token.ghSignIn': 'The GitHub CLI (gh) is installed but not signed in: sign in once, Sidekicks then takes its token.',
383+ 'sbxCreator.token.orPaste': 'Or paste a token (a fine-grained token with the "Copilot Requests" permission):',
384+ 'sbxCreator.token.get': 'Create a token on GitHub…',
385+ 'sbxCreator.token.label': 'GitHub token',
386+ 'sbxCreator.token.save': 'Save the token',
387+ 'sbxCreator.token.stored': '✓ Your {title} token is stored in sbx.',
388+ 'sbxCreator.token.missing': 'No {title} token in sbx yet: the agent will not be able to answer until you save one (run this assistant again, or sbx secret set {service}).',
389+ 'sbxCreator.token.replace': 'Replace the token',
373390 'sbxCreator.name': 'Name',
374391 'sbxCreator.nameHint': 'Used to call it with @{name}, and as the name of its folder and its sandbox: {folder}',
375392 'sbxCreator.agentTitle': 'Name shown',
@@ -668,6 +685,10 @@ export const fr: Record<MessageKey, string> = {
668685 'sbxLogin.signed': '✓ Connecté à Docker en tant que {user}.',
669686 'sbxLogin.failed': "La connexion n'a pas abouti. Réessayez, ou tapez sbx login dans un terminal.",
670687 'sbxLogin.cancelled': 'Connexion annulée.',
688+ 'ghLogin.start': 'Se connecter à GitHub',
689+ 'ghLogin.signed': '✓ Connecté à GitHub en tant que {user}.',
690+ 'ghLogin.failed': "La connexion n'a pas abouti. Réessayez, ou tapez gh auth login dans un terminal.",
691+ 'error.ghNotSignedIn': "L'outil GitHub (gh) n'est pas connecté à GitHub : connectez-le d'abord.",
671692 'error.programNotFound': "Le programme « {program} » est introuvable. Installez-le, ou indiquez son chemin complet dans les réglages de l'agent (par exemple /opt/homebrew/bin/{program}).",
672693 'error.programNotExecutable': "« {program} » ne peut pas être lancé : il n'est pas exécutable. Dans un terminal : chmod +x {program}",
673694 'error.dockerNotRunning': "Docker n'est pas démarré. Lancez Docker Desktop (ou le service Docker), puis réessayez.",
@@ -833,8 +854,8 @@ export const fr: Record<MessageKey, string> = {
833854 'agents.add': '+ Ajouter un agent',
834855 'agents.create': '✨ Créer un agent mini-me',
835856 'agents.createSbx': '✨ Créer un agent dans une sandbox',
836- 'welcome.createSbxFirst': '✨ Créer un agent Claude, Gemini, Codex ou Vibe',
837- 'action.createSbxAgent': 'Créer un agent dans une sandbox (Claude, Gemini, Codex, Vibe)',
857+ 'welcome.createSbxFirst': '✨ Créer un agent Claude, Gemini, Codex, Vibe ou Copilot',
858+ 'action.createSbxAgent': 'Créer un agent dans une sandbox (Claude, Gemini, Codex, Vibe, Copilot)',
838859 'creator.problem.sandboxExists': 'Une sandbox porte déjà ce nom : choisissez un autre nom.',
839860 'creator.problem.taken': 'Ce nom est déjà utilisé (par un agent, un dossier ou une sandbox) : essayez {suggestion}.',
840861 'creator.agentTitle': 'Nom affiché',
@@ -845,6 +866,7 @@ export const fr: Record<MessageKey, string> = {
845866 'sbxCreator.kind.gemini': 'Gemini de Google, via Antigravity',
846867 'sbxCreator.kind.codex': "Codex, d'OpenAI",
847868 'sbxCreator.kind.vibe': 'Vibe, de Mistral AI',
869+ 'sbxCreator.kind.copilot': 'Copilot CLI, de GitHub',
848870 'sbxCreator.checking': 'Vérification de sbx et de votre clé…',
849871 'sbxCreator.sbxMissing': "sbx (Docker Sandboxes) n'est pas installé sur cet ordinateur. Installez-le, puis réessayez.",
850872 'sbxCreator.otherKind': '← Un autre agent',
@@ -858,6 +880,18 @@ export const fr: Record<MessageKey, string> = {
858880 'sbxCreator.key.stored': '✓ Votre clé {title} est enregistrée dans sbx.',
859881 'sbxCreator.key.missing': "Pas encore de clé {title} dans sbx : l'agent ne pourra pas répondre tant que vous n'en aurez pas enregistré une (relancez cet assistant, ou sbx secret set {service}).",
860882 'sbxCreator.key.replace': 'Remplacer la clé',
883+ 'sbxCreator.token.title': 'Votre jeton {title}',
884+ 'sbxCreator.token.explain': "{title} passe par votre compte GitHub : il lui faut un jeton GitHub autorisé à utiliser Copilot, et un abonnement Copilot. Sidekicks le donne à sbx, qui le garde ({service} et github) et le fournit à vos sandboxes pour leurs appels à Copilot, et à git et gh sur GitHub : l'agent peut alors travailler sur vos dépôts avec votre compte. Il n'est jamais écrit dans un fichier.",
885+ 'sbxCreator.token.useGh': 'Utiliser mon compte GitHub',
886+ 'sbxCreator.token.ghHint': "Sidekicks prend le jeton de l'outil GitHub (gh auth token), sans l'afficher.",
887+ 'sbxCreator.token.ghSignIn': "L'outil GitHub (gh) est installé mais pas connecté : connectez-vous une fois, Sidekicks prend ensuite son jeton.",
888+ 'sbxCreator.token.orPaste': 'Ou collez un jeton (un jeton « fine-grained » avec la permission « Copilot Requests ») :',
889+ 'sbxCreator.token.get': 'Créer un jeton sur GitHub…',
890+ 'sbxCreator.token.label': 'Jeton GitHub',
891+ 'sbxCreator.token.save': 'Enregistrer le jeton',
892+ 'sbxCreator.token.stored': '✓ Votre jeton {title} est enregistré dans sbx.',
893+ 'sbxCreator.token.missing': "Pas encore de jeton {title} dans sbx : l'agent ne pourra pas répondre tant que vous n'en aurez pas enregistré un (relancez cet assistant, ou sbx secret set {service}).",
894+ 'sbxCreator.token.replace': 'Remplacer le jeton',
861895 'sbxCreator.name': 'Nom',
862896 'sbxCreator.nameHint': "Pour l'appeler avec @{name}, et comme nom de son dossier et de sa sandbox : {folder}",
863897 'sbxCreator.agentTitle': 'Nom affiché',
@@ -178,6 +178,10 @@ export const en = {
178 'sbxLogin.signed': '✓ Signed in to Docker as {user}.',178 'sbxLogin.signed': '✓ Signed in to Docker as {user}.',
179 'sbxLogin.failed': 'The sign-in did not succeed. Try again, or type sbx login in a terminal.',179 'sbxLogin.failed': 'The sign-in did not succeed. Try again, or type sbx login in a terminal.',
180 'sbxLogin.cancelled': 'Sign-in cancelled.',180 'sbxLogin.cancelled': 'Sign-in cancelled.',
181+ 'ghLogin.start': 'Sign in to GitHub',
182+ 'ghLogin.signed': '✓ Signed in to GitHub as {user}.',
183+ 'ghLogin.failed': 'The sign-in did not succeed. Try again, or type gh auth login in a terminal.',
184+ 'error.ghNotSignedIn': 'The GitHub CLI (gh) is not signed in to GitHub: sign in with it first.',
181 'error.programNotFound': 'The program "{program}" cannot be found. Install it, or give its full path in the agent\'s settings (for example /opt/homebrew/bin/{program}).',185 'error.programNotFound': 'The program "{program}" cannot be found. Install it, or give its full path in the agent\'s settings (for example /opt/homebrew/bin/{program}).',
182 'error.programNotExecutable': '"{program}" cannot be run: it is not executable. In a terminal: chmod +x {program}',186 'error.programNotExecutable': '"{program}" cannot be run: it is not executable. In a terminal: chmod +x {program}',
183 'error.dockerNotRunning': 'Docker is not running. Start Docker Desktop (or the Docker service), then try again.',187 'error.dockerNotRunning': 'Docker is not running. Start Docker Desktop (or the Docker service), then try again.',
@@ -345,8 +349,8 @@ export const en = {
345 'agents.add': '+ Add an agent',349 'agents.add': '+ Add an agent',
346 'agents.create': '✨ Create a mini-me agent',350 'agents.create': '✨ Create a mini-me agent',
347 'agents.createSbx': '✨ Create an agent in a sandbox',351 'agents.createSbx': '✨ Create an agent in a sandbox',
348- 'welcome.createSbxFirst': '✨ Create a Claude, Gemini, Codex or Vibe agent',352+ 'welcome.createSbxFirst': '✨ Create a Claude, Gemini, Codex, Vibe or Copilot agent',
349- 'action.createSbxAgent': 'Create an agent in a sandbox (Claude, Gemini, Codex, Vibe)',353+ 'action.createSbxAgent': 'Create an agent in a sandbox (Claude, Gemini, Codex, Vibe, Copilot)',
350 'creator.problem.sandboxExists': 'A sandbox with this name already exists: choose another name.',354 'creator.problem.sandboxExists': 'A sandbox with this name already exists: choose another name.',
351 'creator.problem.taken': 'This name is already used (by an agent, a folder or a sandbox): try {suggestion}.',355 'creator.problem.taken': 'This name is already used (by an agent, a folder or a sandbox): try {suggestion}.',
352 'creator.agentTitle': 'Name shown',356 'creator.agentTitle': 'Name shown',
@@ -357,6 +361,7 @@ export const en = {
357 'sbxCreator.kind.gemini': 'Google Gemini, through Antigravity',361 'sbxCreator.kind.gemini': 'Google Gemini, through Antigravity',
358 'sbxCreator.kind.codex': "OpenAI's Codex",362 'sbxCreator.kind.codex': "OpenAI's Codex",
359 'sbxCreator.kind.vibe': "Mistral AI's Vibe",363 'sbxCreator.kind.vibe': "Mistral AI's Vibe",
364+ 'sbxCreator.kind.copilot': "GitHub's Copilot CLI",
360 'sbxCreator.checking': 'Checking sbx and your key…',365 'sbxCreator.checking': 'Checking sbx and your key…',
361 'sbxCreator.sbxMissing': 'sbx (Docker Sandboxes) is not installed on this computer. Install it, then try again.',366 'sbxCreator.sbxMissing': 'sbx (Docker Sandboxes) is not installed on this computer. Install it, then try again.',
362 'sbxCreator.otherKind': '← Another agent',367 'sbxCreator.otherKind': '← Another agent',
@@ -370,6 +375,18 @@ export const en = {
370 'sbxCreator.key.stored': '✓ Your {title} key is stored in sbx.',375 'sbxCreator.key.stored': '✓ Your {title} key is stored in sbx.',
371 'sbxCreator.key.missing': 'No {title} key in sbx yet: the agent will not be able to answer until you save one (run this assistant again, or sbx secret set {service}).',376 'sbxCreator.key.missing': 'No {title} key in sbx yet: the agent will not be able to answer until you save one (run this assistant again, or sbx secret set {service}).',
372 'sbxCreator.key.replace': 'Replace the key',377 'sbxCreator.key.replace': 'Replace the key',
378+ 'sbxCreator.token.title': 'Your {title} token',
379+ 'sbxCreator.token.explain': '{title} uses your GitHub account: it needs a GitHub token allowed to use Copilot, and a Copilot subscription. Sidekicks gives it to sbx, which stores it ({service} and github) and gives it to your sandboxes for their calls to Copilot, and to git and gh on GitHub: the agent can then work on your repositories with your account. It is never written in a file.',
380+ 'sbxCreator.token.useGh': 'Use my GitHub account',
381+ 'sbxCreator.token.ghHint': 'Sidekicks takes the token of the GitHub CLI (gh auth token), without showing it.',
382+ 'sbxCreator.token.ghSignIn': 'The GitHub CLI (gh) is installed but not signed in: sign in once, Sidekicks then takes its token.',
383+ 'sbxCreator.token.orPaste': 'Or paste a token (a fine-grained token with the "Copilot Requests" permission):',
384+ 'sbxCreator.token.get': 'Create a token on GitHub…',
385+ 'sbxCreator.token.label': 'GitHub token',
386+ 'sbxCreator.token.save': 'Save the token',
387+ 'sbxCreator.token.stored': '✓ Your {title} token is stored in sbx.',
388+ 'sbxCreator.token.missing': 'No {title} token in sbx yet: the agent will not be able to answer until you save one (run this assistant again, or sbx secret set {service}).',
389+ 'sbxCreator.token.replace': 'Replace the token',
373 'sbxCreator.name': 'Name',390 'sbxCreator.name': 'Name',
374 'sbxCreator.nameHint': 'Used to call it with @{name}, and as the name of its folder and its sandbox: {folder}',391 'sbxCreator.nameHint': 'Used to call it with @{name}, and as the name of its folder and its sandbox: {folder}',
375 'sbxCreator.agentTitle': 'Name shown',392 'sbxCreator.agentTitle': 'Name shown',
@@ -668,6 +685,10 @@ export const fr: Record<MessageKey, string> = {
668 'sbxLogin.signed': '✓ Connecté à Docker en tant que {user}.',685 'sbxLogin.signed': '✓ Connecté à Docker en tant que {user}.',
669 'sbxLogin.failed': "La connexion n'a pas abouti. Réessayez, ou tapez sbx login dans un terminal.",686 'sbxLogin.failed': "La connexion n'a pas abouti. Réessayez, ou tapez sbx login dans un terminal.",
670 'sbxLogin.cancelled': 'Connexion annulée.',687 'sbxLogin.cancelled': 'Connexion annulée.',
688+ 'ghLogin.start': 'Se connecter à GitHub',
689+ 'ghLogin.signed': '✓ Connecté à GitHub en tant que {user}.',
690+ 'ghLogin.failed': "La connexion n'a pas abouti. Réessayez, ou tapez gh auth login dans un terminal.",
691+ 'error.ghNotSignedIn': "L'outil GitHub (gh) n'est pas connecté à GitHub : connectez-le d'abord.",
671 'error.programNotFound': "Le programme « {program} » est introuvable. Installez-le, ou indiquez son chemin complet dans les réglages de l'agent (par exemple /opt/homebrew/bin/{program}).",692 'error.programNotFound': "Le programme « {program} » est introuvable. Installez-le, ou indiquez son chemin complet dans les réglages de l'agent (par exemple /opt/homebrew/bin/{program}).",
672 'error.programNotExecutable': "« {program} » ne peut pas être lancé : il n'est pas exécutable. Dans un terminal : chmod +x {program}",693 'error.programNotExecutable': "« {program} » ne peut pas être lancé : il n'est pas exécutable. Dans un terminal : chmod +x {program}",
673 'error.dockerNotRunning': "Docker n'est pas démarré. Lancez Docker Desktop (ou le service Docker), puis réessayez.",694 'error.dockerNotRunning': "Docker n'est pas démarré. Lancez Docker Desktop (ou le service Docker), puis réessayez.",
@@ -833,8 +854,8 @@ export const fr: Record<MessageKey, string> = {
833 'agents.add': '+ Ajouter un agent',854 'agents.add': '+ Ajouter un agent',
834 'agents.create': '✨ Créer un agent mini-me',855 'agents.create': '✨ Créer un agent mini-me',
835 'agents.createSbx': '✨ Créer un agent dans une sandbox',856 'agents.createSbx': '✨ Créer un agent dans une sandbox',
836- 'welcome.createSbxFirst': '✨ Créer un agent Claude, Gemini, Codex ou Vibe',857+ 'welcome.createSbxFirst': '✨ Créer un agent Claude, Gemini, Codex, Vibe ou Copilot',
837- 'action.createSbxAgent': 'Créer un agent dans une sandbox (Claude, Gemini, Codex, Vibe)',858+ 'action.createSbxAgent': 'Créer un agent dans une sandbox (Claude, Gemini, Codex, Vibe, Copilot)',
838 'creator.problem.sandboxExists': 'Une sandbox porte déjà ce nom : choisissez un autre nom.',859 'creator.problem.sandboxExists': 'Une sandbox porte déjà ce nom : choisissez un autre nom.',
839 'creator.problem.taken': 'Ce nom est déjà utilisé (par un agent, un dossier ou une sandbox) : essayez {suggestion}.',860 'creator.problem.taken': 'Ce nom est déjà utilisé (par un agent, un dossier ou une sandbox) : essayez {suggestion}.',
840 'creator.agentTitle': 'Nom affiché',861 'creator.agentTitle': 'Nom affiché',
@@ -845,6 +866,7 @@ export const fr: Record<MessageKey, string> = {
845 'sbxCreator.kind.gemini': 'Gemini de Google, via Antigravity',866 'sbxCreator.kind.gemini': 'Gemini de Google, via Antigravity',
846 'sbxCreator.kind.codex': "Codex, d'OpenAI",867 'sbxCreator.kind.codex': "Codex, d'OpenAI",
847 'sbxCreator.kind.vibe': 'Vibe, de Mistral AI',868 'sbxCreator.kind.vibe': 'Vibe, de Mistral AI',
869+ 'sbxCreator.kind.copilot': 'Copilot CLI, de GitHub',
848 'sbxCreator.checking': 'Vérification de sbx et de votre clé…',870 'sbxCreator.checking': 'Vérification de sbx et de votre clé…',
849 'sbxCreator.sbxMissing': "sbx (Docker Sandboxes) n'est pas installé sur cet ordinateur. Installez-le, puis réessayez.",871 'sbxCreator.sbxMissing': "sbx (Docker Sandboxes) n'est pas installé sur cet ordinateur. Installez-le, puis réessayez.",
850 'sbxCreator.otherKind': '← Un autre agent',872 'sbxCreator.otherKind': '← Un autre agent',
@@ -858,6 +880,18 @@ export const fr: Record<MessageKey, string> = {
858 'sbxCreator.key.stored': '✓ Votre clé {title} est enregistrée dans sbx.',880 'sbxCreator.key.stored': '✓ Votre clé {title} est enregistrée dans sbx.',
859 'sbxCreator.key.missing': "Pas encore de clé {title} dans sbx : l'agent ne pourra pas répondre tant que vous n'en aurez pas enregistré une (relancez cet assistant, ou sbx secret set {service}).",881 'sbxCreator.key.missing': "Pas encore de clé {title} dans sbx : l'agent ne pourra pas répondre tant que vous n'en aurez pas enregistré une (relancez cet assistant, ou sbx secret set {service}).",
860 'sbxCreator.key.replace': 'Remplacer la clé',882 'sbxCreator.key.replace': 'Remplacer la clé',
883+ 'sbxCreator.token.title': 'Votre jeton {title}',
884+ 'sbxCreator.token.explain': "{title} passe par votre compte GitHub : il lui faut un jeton GitHub autorisé à utiliser Copilot, et un abonnement Copilot. Sidekicks le donne à sbx, qui le garde ({service} et github) et le fournit à vos sandboxes pour leurs appels à Copilot, et à git et gh sur GitHub : l'agent peut alors travailler sur vos dépôts avec votre compte. Il n'est jamais écrit dans un fichier.",
885+ 'sbxCreator.token.useGh': 'Utiliser mon compte GitHub',
886+ 'sbxCreator.token.ghHint': "Sidekicks prend le jeton de l'outil GitHub (gh auth token), sans l'afficher.",
887+ 'sbxCreator.token.ghSignIn': "L'outil GitHub (gh) est installé mais pas connecté : connectez-vous une fois, Sidekicks prend ensuite son jeton.",
888+ 'sbxCreator.token.orPaste': 'Ou collez un jeton (un jeton « fine-grained » avec la permission « Copilot Requests ») :',
889+ 'sbxCreator.token.get': 'Créer un jeton sur GitHub…',
890+ 'sbxCreator.token.label': 'Jeton GitHub',
891+ 'sbxCreator.token.save': 'Enregistrer le jeton',
892+ 'sbxCreator.token.stored': '✓ Votre jeton {title} est enregistré dans sbx.',
893+ 'sbxCreator.token.missing': "Pas encore de jeton {title} dans sbx : l'agent ne pourra pas répondre tant que vous n'en aurez pas enregistré un (relancez cet assistant, ou sbx secret set {service}).",
894+ 'sbxCreator.token.replace': 'Remplacer le jeton',
861 'sbxCreator.name': 'Nom',895 'sbxCreator.name': 'Nom',
862 'sbxCreator.nameHint': "Pour l'appeler avec @{name}, et comme nom de son dossier et de sa sandbox : {folder}",896 'sbxCreator.nameHint': "Pour l'appeler avec @{name}, et comme nom de son dossier et de sa sandbox : {folder}",
863 'sbxCreator.agentTitle': 'Nom affiché',897 'sbxCreator.agentTitle': 'Nom affiché',
modified frontend/src/lib/logos.ts +12 -0
@@ -13,6 +13,12 @@
1313 // OpenAI (for Codex) was removed from Simple Icons after 13.21.0: its
1414 // drawing comes from that version, in black as on openai.com/brand, whose
1515 // guidelines ask that it be used unchanged; the owner chose to ship it.
16+// GitHub Copilot (issue #103) is Simple Icons' copy of GitHub's Primer
17+// Octicon copilot-24, under the MIT licence: Copyright (c) 2026 GitHub Inc.,
18+// permission granted to use, copy and distribute it provided this notice is
19+// kept (https://github.com/primer/octicons/blob/main/LICENSE). GitHub and
20+// GitHub Copilot are trademarks of GitHub, Inc., shown only to name the
21+// product.
1622
1723 export interface Logo {
1824 title: string
@@ -49,6 +55,12 @@ export const logos: Record<string, Logo> = {
4955 source: 'https://chat.mistral.ai (Simple Icons, CC0-1.0)',
5056 path: 'M17.143 3.429v3.428h-3.429v3.429h-3.428V6.857H6.857V3.43H3.43v13.714H0v3.428h10.286v-3.428H6.857v-3.429h3.429v3.429h3.429v-3.429h3.428v3.429h-3.428v3.428H24v-3.428h-3.43V3.429z',
5157 },
58+ copilot: {
59+ title: 'GitHub Copilot',
60+ color: '#000000',
61+ source: 'https://primer.style/foundations/icons/copilot-24 (Simple Icons 16.37.0, MIT)',
62+ path: 'M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z',
63+ },
5264 }
5365
5466 /** The prefix of an icon that is a logo. */
@@ -13,6 +13,12 @@
13 // OpenAI (for Codex) was removed from Simple Icons after 13.21.0: its13 // OpenAI (for Codex) was removed from Simple Icons after 13.21.0: its
14 // drawing comes from that version, in black as on openai.com/brand, whose14 // drawing comes from that version, in black as on openai.com/brand, whose
15 // guidelines ask that it be used unchanged; the owner chose to ship it.15 // guidelines ask that it be used unchanged; the owner chose to ship it.
16+// GitHub Copilot (issue #103) is Simple Icons' copy of GitHub's Primer
17+// Octicon copilot-24, under the MIT licence: Copyright (c) 2026 GitHub Inc.,
18+// permission granted to use, copy and distribute it provided this notice is
19+// kept (https://github.com/primer/octicons/blob/main/LICENSE). GitHub and
20+// GitHub Copilot are trademarks of GitHub, Inc., shown only to name the
21+// product.
16 22
17 export interface Logo {23 export interface Logo {
18 title: string24 title: string
@@ -49,6 +55,12 @@ export const logos: Record<string, Logo> = {
49 source: 'https://chat.mistral.ai (Simple Icons, CC0-1.0)',55 source: 'https://chat.mistral.ai (Simple Icons, CC0-1.0)',
50 path: 'M17.143 3.429v3.428h-3.429v3.429h-3.428V6.857H6.857V3.43H3.43v13.714H0v3.428h10.286v-3.428H6.857v-3.429h3.429v3.429h3.429v-3.429h3.428v3.429h-3.428v3.428H24v-3.428h-3.43V3.429z',56 path: 'M17.143 3.429v3.428h-3.429v3.429h-3.428V6.857H6.857V3.43H3.43v13.714H0v3.428h10.286v-3.428H6.857v-3.429h3.429v3.429h3.429v-3.429h3.428v3.429h-3.428v3.428H24v-3.428h-3.43V3.429z',
51 },57 },
58+ copilot: {
59+ title: 'GitHub Copilot',
60+ color: '#000000',
61+ source: 'https://primer.style/foundations/icons/copilot-24 (Simple Icons 16.37.0, MIT)',
62+ path: 'M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z',
63+ },
52 }64 }
53 65
54 /** The prefix of an icon that is a logo. */66 /** The prefix of an icon that is a logo. */
modified internal/app/app.go +6 -0
@@ -55,6 +55,9 @@ type Options struct {
5555 // Sbx is the sbx command used to list, create, stop and remove the
5656 // agents' sandboxes; "" looks it up. Tests pass a fake.
5757 Sbx string
58+ // GH is the GitHub CLI (gh) the sandbox assistant takes a token from
59+ // (issue #103); "" looks it up. Tests pass a fake.
60+ GH string
5861 // Version is Sidekicks' version (info.version of build/config.yml), told
5962 // to the agents; "" for a development build.
6063 Version string
@@ -93,6 +96,8 @@ type Core struct {
9396 creator *creation
9497 // signIn is the `sbx login` in progress (issue #97).
9598 signIn signIn
99+ // ghSignIn is the `gh auth login` in progress (issue #103).
100+ ghSignIn signIn
96101 }
97102
98103 // New loads the configuration at location — creating the default file first
@@ -297,6 +302,7 @@ func (c *Core) Open(ctx context.Context, path string) error {
297302 func (c *Core) Shutdown(ctx context.Context) {
298303 (&CreatorService{Core: c}).Cancel()
299304 (&SbxCreatorService{Core: c}).CancelLogin()
305+ (&SbxCreatorService{Core: c}).CancelGitHubLogin()
300306 c.closeChannels()
301307 c.stopWorkspaces()
302308 c.manager.StopAll(ctx)
@@ -55,6 +55,9 @@ type Options struct {
55 // Sbx is the sbx command used to list, create, stop and remove the55 // Sbx is the sbx command used to list, create, stop and remove the
56 // agents' sandboxes; "" looks it up. Tests pass a fake.56 // agents' sandboxes; "" looks it up. Tests pass a fake.
57 Sbx string57 Sbx string
58+ // GH is the GitHub CLI (gh) the sandbox assistant takes a token from
59+ // (issue #103); "" looks it up. Tests pass a fake.
60+ GH string
58 // Version is Sidekicks' version (info.version of build/config.yml), told61 // Version is Sidekicks' version (info.version of build/config.yml), told
59 // to the agents; "" for a development build.62 // to the agents; "" for a development build.
60 Version string63 Version string
@@ -93,6 +96,8 @@ type Core struct {
93 creator *creation96 creator *creation
94 // signIn is the `sbx login` in progress (issue #97).97 // signIn is the `sbx login` in progress (issue #97).
95 signIn signIn98 signIn signIn
99+ // ghSignIn is the `gh auth login` in progress (issue #103).
100+ ghSignIn signIn
96 }101 }
97 102
98 // New loads the configuration at location — creating the default file first103 // New loads the configuration at location — creating the default file first
@@ -297,6 +302,7 @@ func (c *Core) Open(ctx context.Context, path string) error {
297 func (c *Core) Shutdown(ctx context.Context) {302 func (c *Core) Shutdown(ctx context.Context) {
298 (&CreatorService{Core: c}).Cancel()303 (&CreatorService{Core: c}).Cancel()
299 (&SbxCreatorService{Core: c}).CancelLogin()304 (&SbxCreatorService{Core: c}).CancelLogin()
305+ (&SbxCreatorService{Core: c}).CancelGitHubLogin()
300 c.closeChannels()306 c.closeChannels()
301 c.stopWorkspaces()307 c.stopWorkspaces()
302 c.manager.StopAll(ctx)308 c.manager.StopAll(ctx)
modified internal/app/sbxcreator.go +96 -22
@@ -18,7 +18,7 @@ import (
1818 )
1919
2020 // SbxCreatorService is the assistant that creates an agent in a Docker
21-// Sandbox — Claude, Gemini, Codex, Vibe… — for people who do not write files
21+// Sandbox — Claude, Gemini, Codex, Vibe, Copilot… — for people who do not write files
2222 // (issue #96): it checks sbx and the kind's API key (asking for it and
2323 // storing it with sbx when missing), writes the agent's folder in the
2424 // agents' folder and adds the agent to the configuration.
@@ -44,6 +44,10 @@ type SbxCheck struct {
4444 // Taken is the names already used, by an agent, a folder of the agents'
4545 // folder or a sandbox: the interface suggests a free one (issue #99).
4646 Taken []string `json:"taken"`
47+ // GH and GHSignedIn, for a kind whose token can come from gh (issue
48+ // #103): gh is installed, and signed in to GitHub.
49+ GH bool `json:"gh"`
50+ GHSignedIn bool `json:"ghSignedIn"`
4751 }
4852
4953 // SbxCreateForm is the agent to create: its kind, its name (its folder's and
@@ -62,6 +66,13 @@ func (c *Core) sbx() sbxcreate.Sbx {
6266 return sbxcreate.Sbx{Command: workspace.SbxTool()}
6367 }
6468
69+func (c *Core) gh() sbxcreate.GH {
70+ if c.options.GH != "" {
71+ return sbxcreate.GH{Command: c.options.GH}
72+ }
73+ return sbxcreate.GH{Command: workspace.FindTool("gh", "/opt/homebrew/bin/gh", "/usr/local/bin/gh")}
74+}
75+
6576 // Kinds is the kinds of agents the assistant creates, in order.
6677 func (s *SbxCreatorService) Kinds() []sbxcreate.Kind {
6778 return slices.Clone(sbxcreate.Catalogue)
@@ -76,8 +87,10 @@ func kindOf(id string) (sbxcreate.Kind, error) {
7687 }
7788
7889 // Check checks that sbx is installed ("sbx is not installed" otherwise),
79-// whether the kind's key is stored, and suggests a free name: the kind's
80-// id, else id-2, id-3… — free as an agent, a folder and a sandbox.
90+// whether the kind's key is stored (for each of its services), and suggests
91+// a free name: the kind's id, else id-2, id-3… — free as an agent, a folder
92+// and a sandbox. For a kind whose token can come from gh, it also says
93+// whether gh is there and signed in.
8194 func (s *SbxCreatorService) Check(ctx context.Context, kindID string) (SbxCheck, error) {
8295 kind, err := kindOf(kindID)
8396 if err != nil {
@@ -87,9 +100,13 @@ func (s *SbxCreatorService) Check(ctx context.Context, kindID string) (SbxCheck,
87100 if err := sbx.Available(); err != nil {
88101 return SbxCheck{}, err
89102 }
90- hasKey, err := sbx.HasSecret(ctx, kind.Service, "")
91- if err != nil {
92- return SbxCheck{}, err
103+ hasKey := true
104+ for _, service := range kind.Services() {
105+ stored, err := sbx.HasSecret(ctx, service, "")
106+ if err != nil {
107+ return SbxCheck{}, err
108+ }
109+ hasKey = hasKey && stored
93110 }
94111 sandboxes, err := sbx.Sandboxes(ctx)
95112 if err != nil {
@@ -97,6 +114,11 @@ func (s *SbxCreatorService) Check(ctx context.Context, kindID string) (SbxCheck,
97114 }
98115 folder := s.Core.agentsFolder()
99116 check := SbxCheck{HasKey: hasKey, AgentsFolder: folder, Taken: s.Core.takenNames(folder, sandboxes)}
117+ if kind.FromGH {
118+ gh := s.Core.gh()
119+ check.GH = gh.Available() == nil
120+ check.GHSignedIn = check.GH && gh.SignedIn(ctx)
121+ }
100122 for index := 1; index < 100; index++ {
101123 name := kind.ID
102124 if index > 1 {
@@ -110,14 +132,40 @@ func (s *SbxCreatorService) Check(ctx context.Context, kindID string) (SbxCheck,
110132 return check, nil
111133 }
112134
113-// SetKey stores the kind's key in sbx, for every sandbox. The key goes to
114-// sbx on its standard input; it is never written in a file nor in a log.
135+// SetKey stores the kind's key in sbx, for every sandbox and each of the
136+// kind's services. The key goes to sbx on its standard input; it is never
137+// written in a file nor in a log.
115138 func (s *SbxCreatorService) SetKey(ctx context.Context, kindID, key string) error {
116139 kind, err := kindOf(kindID)
117140 if err != nil {
118141 return err
119142 }
120- return s.Core.sbx().SetSecret(ctx, kind.Service, key)
143+ sbx := s.Core.sbx()
144+ for _, service := range kind.Services() {
145+ if err := sbx.SetSecret(ctx, service, key); err != nil {
146+ return err
147+ }
148+ }
149+ return nil
150+}
151+
152+// UseGitHub stores the token of the account gh is signed in with as the
153+// kind's key (issue #103) — as `sbx secret set <service> --command 'gh auth
154+// token'` would: "gh is not signed in to GitHub" when it has none. The token
155+// goes from gh to sbx without being shown, written or logged.
156+func (s *SbxCreatorService) UseGitHub(ctx context.Context, kindID string) error {
157+ kind, err := kindOf(kindID)
158+ if err != nil {
159+ return err
160+ }
161+ if !kind.FromGH {
162+ return fmt.Errorf("the key of %s does not come from GitHub", kind.Title)
163+ }
164+ token, err := s.Core.gh().Token(ctx)
165+ if err != nil {
166+ return err
167+ }
168+ return s.SetKey(ctx, kindID, token)
121169 }
122170
123171 // problem is why name cannot be used, or "".
@@ -191,14 +239,13 @@ type signIn struct {
191239 // LoginStatus again while the user has not confirmed.
192240 const loginWait = 20 * time.Second
193241
194-// Login starts `sbx login` — or joins the one in progress — and returns once
195-// sbx printed the code and the URL the user confirms in a browser (or ended).
196-func (s *SbxCreatorService) Login(ctx context.Context) (sbxcreate.LoginState, error) {
197- in := &s.Core.signIn
242+// start starts a sign-in — or joins the one in progress — and returns once
243+// it printed the code and the URL the user confirms in a browser (or ended).
244+func (in *signIn) start(ctx context.Context, begin func() (*sbxcreate.Login, error)) (sbxcreate.LoginState, error) {
198245 in.mu.Lock()
199246 login := in.login
200247 if login == nil || login.State().Done {
201- started, err := s.Core.sbx().StartLogin()
248+ started, err := begin()
202249 if err != nil {
203250 in.mu.Unlock()
204251 return sbxcreate.LoginState{}, err
@@ -213,10 +260,9 @@ func (s *SbxCreatorService) Login(ctx context.Context) (sbxcreate.LoginState, er
213260 }), nil
214261 }
215262
216-// LoginStatus waits — 20 seconds at most — for the sign-in to end, and
217-// returns where it is.
218-func (s *SbxCreatorService) LoginStatus(ctx context.Context) (sbxcreate.LoginState, error) {
219- in := &s.Core.signIn
263+// status waits — 20 seconds at most — for the sign-in to end, and returns
264+// where it is.
265+func (in *signIn) status(ctx context.Context) (sbxcreate.LoginState, error) {
220266 in.mu.Lock()
221267 login := in.login
222268 in.mu.Unlock()
@@ -228,13 +274,41 @@ func (s *SbxCreatorService) LoginStatus(ctx context.Context) (sbxcreate.LoginSta
228274 return login.Wait(ctx, func(state sbxcreate.LoginState) bool { return state.Done }), nil
229275 }
230276
231-// CancelLogin stops the sign-in in progress, if any. Also done when
232-// Sidekicks quits.
233-func (s *SbxCreatorService) CancelLogin() {
234- in := &s.Core.signIn
277+// cancel stops the sign-in in progress, if any.
278+func (in *signIn) cancel() {
235279 in.mu.Lock()
236280 defer in.mu.Unlock()
237281 if in.login != nil {
238282 in.login.Cancel()
239283 }
240284 }
285+
286+// Login starts `sbx login` — or joins the one in progress — and returns once
287+// sbx printed the code and the URL the user confirms in a browser (or ended).
288+func (s *SbxCreatorService) Login(ctx context.Context) (sbxcreate.LoginState, error) {
289+ return s.Core.signIn.start(ctx, s.Core.sbx().StartLogin)
290+}
291+
292+// LoginStatus waits — 20 seconds at most — for `sbx login` to end, and
293+// returns where it is.
294+func (s *SbxCreatorService) LoginStatus(ctx context.Context) (sbxcreate.LoginState, error) {
295+ return s.Core.signIn.status(ctx)
296+}
297+
298+// CancelLogin stops `sbx login`, if it runs. Also done when Sidekicks quits.
299+func (s *SbxCreatorService) CancelLogin() { s.Core.signIn.cancel() }
300+
301+// GitHubLogin starts `gh auth login --web` (issue #103) — or joins the one
302+// in progress — like Login: it returns once gh printed its code and URL.
303+func (s *SbxCreatorService) GitHubLogin(ctx context.Context) (sbxcreate.LoginState, error) {
304+ return s.Core.ghSignIn.start(ctx, s.Core.gh().StartLogin)
305+}
306+
307+// GitHubLoginStatus waits — 20 seconds at most — for `gh auth login` to end.
308+func (s *SbxCreatorService) GitHubLoginStatus(ctx context.Context) (sbxcreate.LoginState, error) {
309+ return s.Core.ghSignIn.status(ctx)
310+}
311+
312+// CancelGitHubLogin stops `gh auth login`, if it runs. Also done when
313+// Sidekicks quits.
314+func (s *SbxCreatorService) CancelGitHubLogin() { s.Core.ghSignIn.cancel() }
@@ -18,7 +18,7 @@ import (
18 )18 )
19 19
20 // SbxCreatorService is the assistant that creates an agent in a Docker20 // SbxCreatorService is the assistant that creates an agent in a Docker
21-// Sandbox — Claude, Gemini, Codex, Vibe… — for people who do not write files21+// Sandbox — Claude, Gemini, Codex, Vibe, Copilot… — for people who do not write files
22 // (issue #96): it checks sbx and the kind's API key (asking for it and22 // (issue #96): it checks sbx and the kind's API key (asking for it and
23 // storing it with sbx when missing), writes the agent's folder in the23 // storing it with sbx when missing), writes the agent's folder in the
24 // agents' folder and adds the agent to the configuration.24 // agents' folder and adds the agent to the configuration.
@@ -44,6 +44,10 @@ type SbxCheck struct {
44 // Taken is the names already used, by an agent, a folder of the agents'44 // Taken is the names already used, by an agent, a folder of the agents'
45 // folder or a sandbox: the interface suggests a free one (issue #99).45 // folder or a sandbox: the interface suggests a free one (issue #99).
46 Taken []string `json:"taken"`46 Taken []string `json:"taken"`
47+ // GH and GHSignedIn, for a kind whose token can come from gh (issue
48+ // #103): gh is installed, and signed in to GitHub.
49+ GH bool `json:"gh"`
50+ GHSignedIn bool `json:"ghSignedIn"`
47 }51 }
48 52
49 // SbxCreateForm is the agent to create: its kind, its name (its folder's and53 // SbxCreateForm is the agent to create: its kind, its name (its folder's and
@@ -62,6 +66,13 @@ func (c *Core) sbx() sbxcreate.Sbx {
62 return sbxcreate.Sbx{Command: workspace.SbxTool()}66 return sbxcreate.Sbx{Command: workspace.SbxTool()}
63 }67 }
64 68
69+func (c *Core) gh() sbxcreate.GH {
70+ if c.options.GH != "" {
71+ return sbxcreate.GH{Command: c.options.GH}
72+ }
73+ return sbxcreate.GH{Command: workspace.FindTool("gh", "/opt/homebrew/bin/gh", "/usr/local/bin/gh")}
74+}
75+
65 // Kinds is the kinds of agents the assistant creates, in order.76 // Kinds is the kinds of agents the assistant creates, in order.
66 func (s *SbxCreatorService) Kinds() []sbxcreate.Kind {77 func (s *SbxCreatorService) Kinds() []sbxcreate.Kind {
67 return slices.Clone(sbxcreate.Catalogue)78 return slices.Clone(sbxcreate.Catalogue)
@@ -76,8 +87,10 @@ func kindOf(id string) (sbxcreate.Kind, error) {
76 }87 }
77 88
78 // Check checks that sbx is installed ("sbx is not installed" otherwise),89 // Check checks that sbx is installed ("sbx is not installed" otherwise),
79-// whether the kind's key is stored, and suggests a free name: the kind's90+// whether the kind's key is stored (for each of its services), and suggests
80-// id, else id-2, id-3… — free as an agent, a folder and a sandbox.91+// a free name: the kind's id, else id-2, id-3… — free as an agent, a folder
92+// and a sandbox. For a kind whose token can come from gh, it also says
93+// whether gh is there and signed in.
81 func (s *SbxCreatorService) Check(ctx context.Context, kindID string) (SbxCheck, error) {94 func (s *SbxCreatorService) Check(ctx context.Context, kindID string) (SbxCheck, error) {
82 kind, err := kindOf(kindID)95 kind, err := kindOf(kindID)
83 if err != nil {96 if err != nil {
@@ -87,9 +100,13 @@ func (s *SbxCreatorService) Check(ctx context.Context, kindID string) (SbxCheck,
87 if err := sbx.Available(); err != nil {100 if err := sbx.Available(); err != nil {
88 return SbxCheck{}, err101 return SbxCheck{}, err
89 }102 }
90- hasKey, err := sbx.HasSecret(ctx, kind.Service, "")103+ hasKey := true
91- if err != nil {104+ for _, service := range kind.Services() {
92- return SbxCheck{}, err105+ stored, err := sbx.HasSecret(ctx, service, "")
106+ if err != nil {
107+ return SbxCheck{}, err
108+ }
109+ hasKey = hasKey && stored
93 }110 }
94 sandboxes, err := sbx.Sandboxes(ctx)111 sandboxes, err := sbx.Sandboxes(ctx)
95 if err != nil {112 if err != nil {
@@ -97,6 +114,11 @@ func (s *SbxCreatorService) Check(ctx context.Context, kindID string) (SbxCheck,
97 }114 }
98 folder := s.Core.agentsFolder()115 folder := s.Core.agentsFolder()
99 check := SbxCheck{HasKey: hasKey, AgentsFolder: folder, Taken: s.Core.takenNames(folder, sandboxes)}116 check := SbxCheck{HasKey: hasKey, AgentsFolder: folder, Taken: s.Core.takenNames(folder, sandboxes)}
117+ if kind.FromGH {
118+ gh := s.Core.gh()
119+ check.GH = gh.Available() == nil
120+ check.GHSignedIn = check.GH && gh.SignedIn(ctx)
121+ }
100 for index := 1; index < 100; index++ {122 for index := 1; index < 100; index++ {
101 name := kind.ID123 name := kind.ID
102 if index > 1 {124 if index > 1 {
@@ -110,14 +132,40 @@ func (s *SbxCreatorService) Check(ctx context.Context, kindID string) (SbxCheck,
110 return check, nil132 return check, nil
111 }133 }
112 134
113-// SetKey stores the kind's key in sbx, for every sandbox. The key goes to135+// SetKey stores the kind's key in sbx, for every sandbox and each of the
114-// sbx on its standard input; it is never written in a file nor in a log.136+// kind's services. The key goes to sbx on its standard input; it is never
137+// written in a file nor in a log.
115 func (s *SbxCreatorService) SetKey(ctx context.Context, kindID, key string) error {138 func (s *SbxCreatorService) SetKey(ctx context.Context, kindID, key string) error {
116 kind, err := kindOf(kindID)139 kind, err := kindOf(kindID)
117 if err != nil {140 if err != nil {
118 return err141 return err
119 }142 }
120- return s.Core.sbx().SetSecret(ctx, kind.Service, key)143+ sbx := s.Core.sbx()
144+ for _, service := range kind.Services() {
145+ if err := sbx.SetSecret(ctx, service, key); err != nil {
146+ return err
147+ }
148+ }
149+ return nil
150+}
151+
152+// UseGitHub stores the token of the account gh is signed in with as the
153+// kind's key (issue #103) — as `sbx secret set <service> --command 'gh auth
154+// token'` would: "gh is not signed in to GitHub" when it has none. The token
155+// goes from gh to sbx without being shown, written or logged.
156+func (s *SbxCreatorService) UseGitHub(ctx context.Context, kindID string) error {
157+ kind, err := kindOf(kindID)
158+ if err != nil {
159+ return err
160+ }
161+ if !kind.FromGH {
162+ return fmt.Errorf("the key of %s does not come from GitHub", kind.Title)
163+ }
164+ token, err := s.Core.gh().Token(ctx)
165+ if err != nil {
166+ return err
167+ }
168+ return s.SetKey(ctx, kindID, token)
121 }169 }
122 170
123 // problem is why name cannot be used, or "".171 // problem is why name cannot be used, or "".
@@ -191,14 +239,13 @@ type signIn struct {
191 // LoginStatus again while the user has not confirmed.239 // LoginStatus again while the user has not confirmed.
192 const loginWait = 20 * time.Second240 const loginWait = 20 * time.Second
193 241
194-// Login starts `sbx login` — or joins the one in progress — and returns once242+// start starts a sign-in — or joins the one in progress — and returns once
195-// sbx printed the code and the URL the user confirms in a browser (or ended).243+// it printed the code and the URL the user confirms in a browser (or ended).
196-func (s *SbxCreatorService) Login(ctx context.Context) (sbxcreate.LoginState, error) {244+func (in *signIn) start(ctx context.Context, begin func() (*sbxcreate.Login, error)) (sbxcreate.LoginState, error) {
197- in := &s.Core.signIn
198 in.mu.Lock()245 in.mu.Lock()
199 login := in.login246 login := in.login
200 if login == nil || login.State().Done {247 if login == nil || login.State().Done {
201- started, err := s.Core.sbx().StartLogin()248+ started, err := begin()
202 if err != nil {249 if err != nil {
203 in.mu.Unlock()250 in.mu.Unlock()
204 return sbxcreate.LoginState{}, err251 return sbxcreate.LoginState{}, err
@@ -213,10 +260,9 @@ func (s *SbxCreatorService) Login(ctx context.Context) (sbxcreate.LoginState, er
213 }), nil260 }), nil
214 }261 }
215 262
216-// LoginStatus waits — 20 seconds at most — for the sign-in to end, and263+// status waits — 20 seconds at most — for the sign-in to end, and returns
217-// returns where it is.264+// where it is.
218-func (s *SbxCreatorService) LoginStatus(ctx context.Context) (sbxcreate.LoginState, error) {265+func (in *signIn) status(ctx context.Context) (sbxcreate.LoginState, error) {
219- in := &s.Core.signIn
220 in.mu.Lock()266 in.mu.Lock()
221 login := in.login267 login := in.login
222 in.mu.Unlock()268 in.mu.Unlock()
@@ -228,13 +274,41 @@ func (s *SbxCreatorService) LoginStatus(ctx context.Context) (sbxcreate.LoginSta
228 return login.Wait(ctx, func(state sbxcreate.LoginState) bool { return state.Done }), nil274 return login.Wait(ctx, func(state sbxcreate.LoginState) bool { return state.Done }), nil
229 }275 }
230 276
231-// CancelLogin stops the sign-in in progress, if any. Also done when277+// cancel stops the sign-in in progress, if any.
232-// Sidekicks quits.278+func (in *signIn) cancel() {
233-func (s *SbxCreatorService) CancelLogin() {
234- in := &s.Core.signIn
235 in.mu.Lock()279 in.mu.Lock()
236 defer in.mu.Unlock()280 defer in.mu.Unlock()
237 if in.login != nil {281 if in.login != nil {
238 in.login.Cancel()282 in.login.Cancel()
239 }283 }
240 }284 }
285+
286+// Login starts `sbx login` — or joins the one in progress — and returns once
287+// sbx printed the code and the URL the user confirms in a browser (or ended).
288+func (s *SbxCreatorService) Login(ctx context.Context) (sbxcreate.LoginState, error) {
289+ return s.Core.signIn.start(ctx, s.Core.sbx().StartLogin)
290+}
291+
292+// LoginStatus waits — 20 seconds at most — for `sbx login` to end, and
293+// returns where it is.
294+func (s *SbxCreatorService) LoginStatus(ctx context.Context) (sbxcreate.LoginState, error) {
295+ return s.Core.signIn.status(ctx)
296+}
297+
298+// CancelLogin stops `sbx login`, if it runs. Also done when Sidekicks quits.
299+func (s *SbxCreatorService) CancelLogin() { s.Core.signIn.cancel() }
300+
301+// GitHubLogin starts `gh auth login --web` (issue #103) — or joins the one
302+// in progress — like Login: it returns once gh printed its code and URL.
303+func (s *SbxCreatorService) GitHubLogin(ctx context.Context) (sbxcreate.LoginState, error) {
304+ return s.Core.ghSignIn.start(ctx, s.Core.gh().StartLogin)
305+}
306+
307+// GitHubLoginStatus waits — 20 seconds at most — for `gh auth login` to end.
308+func (s *SbxCreatorService) GitHubLoginStatus(ctx context.Context) (sbxcreate.LoginState, error) {
309+ return s.Core.ghSignIn.status(ctx)
310+}
311+
312+// CancelGitHubLogin stops `gh auth login`, if it runs. Also done when
313+// Sidekicks quits.
314+func (s *SbxCreatorService) CancelGitHubLogin() { s.Core.ghSignIn.cancel() }
modified internal/app/sbxcreator_test.go +83 -1
@@ -46,7 +46,7 @@ func sbxFixture(t *testing.T, sandboxes string) (*app.SbxCreatorService, string,
4646 folder := filepath.Join(dir, "Documents")
4747 path := filepath.Join(dir, "config.yaml")
4848 write(t, path, "version: 1\nagentsFolder: "+folder+"\nagents:\n - name: claude\n command: sh\n")
49- core := app.New(config.Location{Path: path, Source: config.SourceFlag}, app.Options{Starter: starter, Sbx: filepath.Join(bin, "sbx")})
49+ core := app.New(config.Location{Path: path, Source: config.SourceFlag}, app.Options{Starter: starter, Sbx: filepath.Join(bin, "sbx"), GH: filepath.Join(bin, "gh")})
5050 t.Cleanup(func() { core.Shutdown(context.Background()) })
5151 return &app.SbxCreatorService{Core: core}, path, folder, bin
5252 }
@@ -173,3 +173,85 @@ func TestLoginRunsSbxLoginAndReportsWhoSignedIn(t *testing.T) {
173173 t.Fatalf("status: %+v %v", done, err)
174174 }
175175 }
176+
177+// ghScript is a gh stand-in: "auth token" prints the file token when it
178+// exists (signed in), else fails as gh does; "auth login" goes through the
179+// device-code flow and signs in.
180+const ghScript = `#!/bin/sh
181+here=$(dirname "$0")
182+case "$1 $2" in
183+ "auth token") [ -f "$here/token" ] || { echo "no oauth token found for github.com" >&2; exit 1; }; cat "$here/token" ;;
184+ "auth login") echo "! First copy your one-time code: 3A4B-C5D6"; echo "Open this URL to continue in your web browser: https://github.com/login/device"; sleep 0.2; printf 'gho_fromlogin' > "$here/token"; echo "✓ Logged in as octocat" ;;
185+ *) exit 1 ;;
186+esac
187+`
188+
189+func withGH(t *testing.T, bin string) {
190+ t.Helper()
191+ write(t, filepath.Join(bin, "gh"), ghScript)
192+ if err := os.Chmod(filepath.Join(bin, "gh"), 0o755); err != nil {
193+ t.Fatal(err)
194+ }
195+}
196+
197+// Issue #103: Copilot's token goes to both of its services, copilot and
198+// github, and is stored only once both are.
199+func TestCopilotNeedsItsTokenForCopilotAndGitHub(t *testing.T) {
200+ service, _, _, bin := sbxFixture(t, "")
201+ write(t, filepath.Join(bin, "secrets"), "(global) copilot gho_****\n")
202+ if check, _ := service.Check(context.Background(), "copilot"); check.HasKey || check.GH {
203+ t.Fatalf("github is missing, and there is no gh: %+v", check)
204+ }
205+ if err := service.SetKey(context.Background(), "copilot", "ghp_secret"); err != nil {
206+ t.Fatal(err)
207+ }
208+ calls, _ := os.ReadFile(filepath.Join(bin, "calls"))
209+ if !strings.Contains(string(calls), "secret set copilot") || !strings.Contains(string(calls), "secret set github") || strings.Contains(string(calls), "ghp_") {
210+ t.Fatalf("calls %q", calls)
211+ }
212+ if check, _ := service.Check(context.Background(), "copilot"); !check.HasKey {
213+ t.Fatal("both services hold the token now")
214+ }
215+}
216+
217+func TestUseGitHubTakesGhsTokenWithoutShowingIt(t *testing.T) {
218+ service, _, _, bin := sbxFixture(t, "")
219+ withGH(t, bin)
220+ if check, _ := service.Check(context.Background(), "copilot"); !check.GH || check.GHSignedIn {
221+ t.Fatalf("gh is there, signed out: %+v", check)
222+ }
223+ if err := service.UseGitHub(context.Background(), "copilot"); !errors.Is(err, sbxcreate.ErrGHSignedOut) {
224+ t.Fatalf("signed out: %v", err)
225+ }
226+ write(t, filepath.Join(bin, "token"), "gho_token\n")
227+ if check, _ := service.Check(context.Background(), "copilot"); !check.GHSignedIn {
228+ t.Fatalf("signed in: %+v", check)
229+ }
230+ if err := service.UseGitHub(context.Background(), "copilot"); err != nil {
231+ t.Fatal(err)
232+ }
233+ key, _ := os.ReadFile(filepath.Join(bin, "key"))
234+ calls, _ := os.ReadFile(filepath.Join(bin, "calls"))
235+ if string(key) != "gho_token" || strings.Contains(string(calls), "gho_") || !strings.Contains(string(calls), "secret set github") {
236+ t.Fatalf("key %q, calls %q", key, calls)
237+ }
238+ if err := service.UseGitHub(context.Background(), "claude"); err == nil {
239+ t.Fatal("Claude's key does not come from GitHub")
240+ }
241+}
242+
243+func TestGitHubLoginShowsGhsCodeThenWhoSignedIn(t *testing.T) {
244+ service, _, _, bin := sbxFixture(t, "")
245+ withGH(t, bin)
246+ started, err := service.GitHubLogin(context.Background())
247+ if err != nil || started.Code != "3A4B-C5D6" || started.URL != "https://github.com/login/device" {
248+ t.Fatalf("login: %+v %v", started, err)
249+ }
250+ done, err := service.GitHubLoginStatus(context.Background())
251+ if err != nil || !done.Done || done.User != "octocat" || done.Error != "" {
252+ t.Fatalf("status: %+v %v", done, err)
253+ }
254+ if err := service.UseGitHub(context.Background(), "copilot"); err != nil {
255+ t.Fatalf("signed in now: %v", err)
256+ }
257+}
@@ -46,7 +46,7 @@ func sbxFixture(t *testing.T, sandboxes string) (*app.SbxCreatorService, string,
46 folder := filepath.Join(dir, "Documents")46 folder := filepath.Join(dir, "Documents")
47 path := filepath.Join(dir, "config.yaml")47 path := filepath.Join(dir, "config.yaml")
48 write(t, path, "version: 1\nagentsFolder: "+folder+"\nagents:\n - name: claude\n command: sh\n")48 write(t, path, "version: 1\nagentsFolder: "+folder+"\nagents:\n - name: claude\n command: sh\n")
49- core := app.New(config.Location{Path: path, Source: config.SourceFlag}, app.Options{Starter: starter, Sbx: filepath.Join(bin, "sbx")})49+ core := app.New(config.Location{Path: path, Source: config.SourceFlag}, app.Options{Starter: starter, Sbx: filepath.Join(bin, "sbx"), GH: filepath.Join(bin, "gh")})
50 t.Cleanup(func() { core.Shutdown(context.Background()) })50 t.Cleanup(func() { core.Shutdown(context.Background()) })
51 return &app.SbxCreatorService{Core: core}, path, folder, bin51 return &app.SbxCreatorService{Core: core}, path, folder, bin
52 }52 }
@@ -173,3 +173,85 @@ func TestLoginRunsSbxLoginAndReportsWhoSignedIn(t *testing.T) {
173 t.Fatalf("status: %+v %v", done, err)173 t.Fatalf("status: %+v %v", done, err)
174 }174 }
175 }175 }
176+
177+// ghScript is a gh stand-in: "auth token" prints the file token when it
178+// exists (signed in), else fails as gh does; "auth login" goes through the
179+// device-code flow and signs in.
180+const ghScript = `#!/bin/sh
181+here=$(dirname "$0")
182+case "$1 $2" in
183+ "auth token") [ -f "$here/token" ] || { echo "no oauth token found for github.com" >&2; exit 1; }; cat "$here/token" ;;
184+ "auth login") echo "! First copy your one-time code: 3A4B-C5D6"; echo "Open this URL to continue in your web browser: https://github.com/login/device"; sleep 0.2; printf 'gho_fromlogin' > "$here/token"; echo "✓ Logged in as octocat" ;;
185+ *) exit 1 ;;
186+esac
187+`
188+
189+func withGH(t *testing.T, bin string) {
190+ t.Helper()
191+ write(t, filepath.Join(bin, "gh"), ghScript)
192+ if err := os.Chmod(filepath.Join(bin, "gh"), 0o755); err != nil {
193+ t.Fatal(err)
194+ }
195+}
196+
197+// Issue #103: Copilot's token goes to both of its services, copilot and
198+// github, and is stored only once both are.
199+func TestCopilotNeedsItsTokenForCopilotAndGitHub(t *testing.T) {
200+ service, _, _, bin := sbxFixture(t, "")
201+ write(t, filepath.Join(bin, "secrets"), "(global) copilot gho_****\n")
202+ if check, _ := service.Check(context.Background(), "copilot"); check.HasKey || check.GH {
203+ t.Fatalf("github is missing, and there is no gh: %+v", check)
204+ }
205+ if err := service.SetKey(context.Background(), "copilot", "ghp_secret"); err != nil {
206+ t.Fatal(err)
207+ }
208+ calls, _ := os.ReadFile(filepath.Join(bin, "calls"))
209+ if !strings.Contains(string(calls), "secret set copilot") || !strings.Contains(string(calls), "secret set github") || strings.Contains(string(calls), "ghp_") {
210+ t.Fatalf("calls %q", calls)
211+ }
212+ if check, _ := service.Check(context.Background(), "copilot"); !check.HasKey {
213+ t.Fatal("both services hold the token now")
214+ }
215+}
216+
217+func TestUseGitHubTakesGhsTokenWithoutShowingIt(t *testing.T) {
218+ service, _, _, bin := sbxFixture(t, "")
219+ withGH(t, bin)
220+ if check, _ := service.Check(context.Background(), "copilot"); !check.GH || check.GHSignedIn {
221+ t.Fatalf("gh is there, signed out: %+v", check)
222+ }
223+ if err := service.UseGitHub(context.Background(), "copilot"); !errors.Is(err, sbxcreate.ErrGHSignedOut) {
224+ t.Fatalf("signed out: %v", err)
225+ }
226+ write(t, filepath.Join(bin, "token"), "gho_token\n")
227+ if check, _ := service.Check(context.Background(), "copilot"); !check.GHSignedIn {
228+ t.Fatalf("signed in: %+v", check)
229+ }
230+ if err := service.UseGitHub(context.Background(), "copilot"); err != nil {
231+ t.Fatal(err)
232+ }
233+ key, _ := os.ReadFile(filepath.Join(bin, "key"))
234+ calls, _ := os.ReadFile(filepath.Join(bin, "calls"))
235+ if string(key) != "gho_token" || strings.Contains(string(calls), "gho_") || !strings.Contains(string(calls), "secret set github") {
236+ t.Fatalf("key %q, calls %q", key, calls)
237+ }
238+ if err := service.UseGitHub(context.Background(), "claude"); err == nil {
239+ t.Fatal("Claude's key does not come from GitHub")
240+ }
241+}
242+
243+func TestGitHubLoginShowsGhsCodeThenWhoSignedIn(t *testing.T) {
244+ service, _, _, bin := sbxFixture(t, "")
245+ withGH(t, bin)
246+ started, err := service.GitHubLogin(context.Background())
247+ if err != nil || started.Code != "3A4B-C5D6" || started.URL != "https://github.com/login/device" {
248+ t.Fatalf("login: %+v %v", started, err)
249+ }
250+ done, err := service.GitHubLoginStatus(context.Background())
251+ if err != nil || !done.Done || done.User != "octocat" || done.Error != "" {
252+ t.Fatalf("status: %+v %v", done, err)
253+ }
254+ if err := service.UseGitHub(context.Background(), "copilot"); err != nil {
255+ t.Fatalf("signed in now: %v", err)
256+ }
257+}
modified internal/config/config.go +1 -1
@@ -85,7 +85,7 @@ const LogoPrefix = "logo:"
8585
8686 // LogoNames are the logos Sidekicks ships, the names icon: "logo:<name>"
8787 // accepts; frontend/src/lib/logos.ts draws them (a test checks both lists).
88-var LogoNames = []string{"claude", "gemini", "openai", "mistral"}
88+var LogoNames = []string{"claude", "gemini", "openai", "mistral", "copilot"}
8989
9090 // AgentToolNames are the tools Sidekicks can offer the agents, the names
9191 // agentTools.offer accepts (issues #90 and #91).
@@ -85,7 +85,7 @@ const LogoPrefix = "logo:"
85 85
86 // LogoNames are the logos Sidekicks ships, the names icon: "logo:<name>"86 // LogoNames are the logos Sidekicks ships, the names icon: "logo:<name>"
87 // accepts; frontend/src/lib/logos.ts draws them (a test checks both lists).87 // accepts; frontend/src/lib/logos.ts draws them (a test checks both lists).
88-var LogoNames = []string{"claude", "gemini", "openai", "mistral"}88+var LogoNames = []string{"claude", "gemini", "openai", "mistral", "copilot"}
89 89
90 // AgentToolNames are the tools Sidekicks can offer the agents, the names90 // AgentToolNames are the tools Sidekicks can offer the agents, the names
91 // agentTools.offer accepts (issues #90 and #91).91 // agentTools.offer accepts (issues #90 and #91).
added internal/sbxcreate/gh.go +86 -0
new file mode 100644
@@ -0,0 +1,86 @@
1+// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE
2+
3+package sbxcreate
4+
5+import (
6+ "bytes"
7+ "context"
8+ "errors"
9+ "os/exec"
10+ "strings"
11+ "time"
12+)
13+
14+// The GitHub CLI (issue #103): a GitHub Copilot agent needs a GitHub token,
15+// and someone who uses gh already has one — `gh auth token` prints it. When
16+// gh is not signed in yet, `gh auth login --web` is a device-code flow like
17+// `sbx login`: Sidekicks shows its code and URL (Login).
18+
19+var (
20+ // ErrGHMissing is returned when gh is not installed.
21+ ErrGHMissing = errors.New("gh is not installed")
22+ // ErrGHSignedOut is returned when gh has no token: nobody signed in.
23+ ErrGHSignedOut = errors.New("gh is not signed in to GitHub")
24+)
25+
26+// GH runs the gh commands the assistant needs.
27+type GH struct {
28+ // Command is gh's program.
29+ Command string
30+}
31+
32+func (g GH) program() (string, error) {
33+ path, err := exec.LookPath(g.Command)
34+ if err != nil {
35+ return "", ErrGHMissing
36+ }
37+ return path, nil
38+}
39+
40+// Available reports ErrGHMissing when gh cannot be found.
41+func (g GH) Available() error {
42+ _, err := g.program()
43+ return err
44+}
45+
46+// Token is the token of the account gh is signed in with (`gh auth token`),
47+// or ErrGHSignedOut. The token is never logged, and an error never repeats
48+// what gh printed on its standard output.
49+func (g GH) Token(ctx context.Context) (string, error) {
50+ program, err := g.program()
51+ if err != nil {
52+ return "", err
53+ }
54+ ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
55+ defer cancel()
56+ command := exec.CommandContext(ctx, program, "auth", "token", "--hostname", "github.com")
57+ var out, errOut bytes.Buffer
58+ command.Stdout, command.Stderr = &out, &errOut
59+ if err := command.Run(); err != nil {
60+ if ctx.Err() != nil {
61+ return "", ctx.Err()
62+ }
63+ return "", ErrGHSignedOut
64+ }
65+ token := strings.TrimSpace(out.String())
66+ if token == "" {
67+ return "", ErrGHSignedOut
68+ }
69+ return token, nil
70+}
71+
72+// SignedIn reports whether gh has a token.
73+func (g GH) SignedIn(ctx context.Context) bool {
74+ _, err := g.Token(ctx)
75+ return err == nil
76+}
77+
78+// StartLogin runs `gh auth login --web` for github.com, with git over HTTPS
79+// so that it asks nothing more: its code and URL are read like sbx login's.
80+func (g GH) StartLogin() (*Login, error) {
81+ program, err := g.program()
82+ if err != nil {
83+ return nil, err
84+ }
85+ return startLogin(program, []string{"auth", "login", "--web", "--hostname", "github.com", "--git-protocol", "https"}, "gh auth login ended without signing in")
86+}
new file mode 100644
@@ -0,0 +1,86 @@
1+// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE
2+
3+package sbxcreate
4+
5+import (
6+ "bytes"
7+ "context"
8+ "errors"
9+ "os/exec"
10+ "strings"
11+ "time"
12+)
13+
14+// The GitHub CLI (issue #103): a GitHub Copilot agent needs a GitHub token,
15+// and someone who uses gh already has one — `gh auth token` prints it. When
16+// gh is not signed in yet, `gh auth login --web` is a device-code flow like
17+// `sbx login`: Sidekicks shows its code and URL (Login).
18+
19+var (
20+ // ErrGHMissing is returned when gh is not installed.
21+ ErrGHMissing = errors.New("gh is not installed")
22+ // ErrGHSignedOut is returned when gh has no token: nobody signed in.
23+ ErrGHSignedOut = errors.New("gh is not signed in to GitHub")
24+)
25+
26+// GH runs the gh commands the assistant needs.
27+type GH struct {
28+ // Command is gh's program.
29+ Command string
30+}
31+
32+func (g GH) program() (string, error) {
33+ path, err := exec.LookPath(g.Command)
34+ if err != nil {
35+ return "", ErrGHMissing
36+ }
37+ return path, nil
38+}
39+
40+// Available reports ErrGHMissing when gh cannot be found.
41+func (g GH) Available() error {
42+ _, err := g.program()
43+ return err
44+}
45+
46+// Token is the token of the account gh is signed in with (`gh auth token`),
47+// or ErrGHSignedOut. The token is never logged, and an error never repeats
48+// what gh printed on its standard output.
49+func (g GH) Token(ctx context.Context) (string, error) {
50+ program, err := g.program()
51+ if err != nil {
52+ return "", err
53+ }
54+ ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
55+ defer cancel()
56+ command := exec.CommandContext(ctx, program, "auth", "token", "--hostname", "github.com")
57+ var out, errOut bytes.Buffer
58+ command.Stdout, command.Stderr = &out, &errOut
59+ if err := command.Run(); err != nil {
60+ if ctx.Err() != nil {
61+ return "", ctx.Err()
62+ }
63+ return "", ErrGHSignedOut
64+ }
65+ token := strings.TrimSpace(out.String())
66+ if token == "" {
67+ return "", ErrGHSignedOut
68+ }
69+ return token, nil
70+}
71+
72+// SignedIn reports whether gh has a token.
73+func (g GH) SignedIn(ctx context.Context) bool {
74+ _, err := g.Token(ctx)
75+ return err == nil
76+}
77+
78+// StartLogin runs `gh auth login --web` for github.com, with git over HTTPS
79+// so that it asks nothing more: its code and URL are read like sbx login's.
80+func (g GH) StartLogin() (*Login, error) {
81+ program, err := g.program()
82+ if err != nil {
83+ return nil, err
84+ }
85+ return startLogin(program, []string{"auth", "login", "--web", "--hostname", "github.com", "--git-protocol", "https"}, "gh auth login ended without signing in")
86+}
modified internal/sbxcreate/login.go +14 -4
@@ -42,12 +42,15 @@ type LoginState struct {
4242 var (
4343 codePattern = regexp.MustCompile(`\b([A-Z0-9]{4}-[A-Z0-9]{4})\b`)
4444 urlPattern = regexp.MustCompile(`https://\S+`)
45- userPattern = regexp.MustCompile(`(?i)signed in as (\S+?)\.?\s*$`)
45+ // "Signed in as k33g." (sbx), "✓ Logged in as k33g" (gh).
46+ userPattern = regexp.MustCompile(`(?i)(?:signed|logged) in as (\S+?)\.?\s*$`)
4647 )
4748
4849 // Login is a `sbx login` in progress.
4950 type Login struct {
5051 cancel context.CancelFunc
52+ // failure is the error when the command ended without signing in.
53+ failure string
5154
5255 mu sync.Mutex
5356 state LoginState
@@ -61,12 +64,18 @@ func (s Sbx) StartLogin() (*Login, error) {
6164 if err != nil {
6265 return nil, err
6366 }
67+ return startLogin(program, []string{"login"}, "sbx login ended without signing in")
68+}
69+
70+// startLogin runs a device-code sign-in (sbx login, gh auth login --web)
71+// and reads its lines.
72+func startLogin(program string, args []string, failure string) (*Login, error) {
6473 ctx, cancel := context.WithCancel(context.Background())
65- command := exec.CommandContext(ctx, program, "login")
74+ command := exec.CommandContext(ctx, program, args...)
6675 command.Stdin = strings.NewReader("")
6776 reader, writer := io.Pipe()
6877 command.Stdout, command.Stderr = writer, writer
69- l := &Login{cancel: cancel, changed: make(chan struct{}), state: LoginState{Output: []string{}}}
78+ l := &Login{cancel: cancel, failure: failure, changed: make(chan struct{}), state: LoginState{Output: []string{}}}
7079 if err := command.Start(); err != nil {
7180 cancel()
7281 return nil, err
@@ -106,6 +115,7 @@ func (l *Login) line(text string) {
106115 l.update(func(state *LoginState) {
107116 state.Output = append(state.Output, text)
108117 if url := urlPattern.FindString(text); url != "" && state.URL == "" && strings.Contains(url, "login") {
118+ // gh: "Open this URL to continue in your web browser: https://github.com/login/device".
109119 state.URL = strings.TrimRight(url, ".,;)")
110120 if code := codePattern.FindStringSubmatch(url); code != nil && state.Code == "" {
111121 state.Code = code[1]
@@ -132,7 +142,7 @@ func (l *Login) finish(err error, cancelled bool) {
132142 case err != nil:
133143 state.Error = err.Error()
134144 default:
135- state.Error = "sbx login ended without signing in"
145+ state.Error = l.failure
136146 }
137147 })
138148 }
@@ -42,12 +42,15 @@ type LoginState struct {
42 var (42 var (
43 codePattern = regexp.MustCompile(`\b([A-Z0-9]{4}-[A-Z0-9]{4})\b`)43 codePattern = regexp.MustCompile(`\b([A-Z0-9]{4}-[A-Z0-9]{4})\b`)
44 urlPattern = regexp.MustCompile(`https://\S+`)44 urlPattern = regexp.MustCompile(`https://\S+`)
45- userPattern = regexp.MustCompile(`(?i)signed in as (\S+?)\.?\s*$`)45+ // "Signed in as k33g." (sbx), "✓ Logged in as k33g" (gh).
46+ userPattern = regexp.MustCompile(`(?i)(?:signed|logged) in as (\S+?)\.?\s*$`)
46 )47 )
47 48
48 // Login is a `sbx login` in progress.49 // Login is a `sbx login` in progress.
49 type Login struct {50 type Login struct {
50 cancel context.CancelFunc51 cancel context.CancelFunc
52+ // failure is the error when the command ended without signing in.
53+ failure string
51 54
52 mu sync.Mutex55 mu sync.Mutex
53 state LoginState56 state LoginState
@@ -61,12 +64,18 @@ func (s Sbx) StartLogin() (*Login, error) {
61 if err != nil {64 if err != nil {
62 return nil, err65 return nil, err
63 }66 }
67+ return startLogin(program, []string{"login"}, "sbx login ended without signing in")
68+}
69+
70+// startLogin runs a device-code sign-in (sbx login, gh auth login --web)
71+// and reads its lines.
72+func startLogin(program string, args []string, failure string) (*Login, error) {
64 ctx, cancel := context.WithCancel(context.Background())73 ctx, cancel := context.WithCancel(context.Background())
65- command := exec.CommandContext(ctx, program, "login")74+ command := exec.CommandContext(ctx, program, args...)
66 command.Stdin = strings.NewReader("")75 command.Stdin = strings.NewReader("")
67 reader, writer := io.Pipe()76 reader, writer := io.Pipe()
68 command.Stdout, command.Stderr = writer, writer77 command.Stdout, command.Stderr = writer, writer
69- l := &Login{cancel: cancel, changed: make(chan struct{}), state: LoginState{Output: []string{}}}78+ l := &Login{cancel: cancel, failure: failure, changed: make(chan struct{}), state: LoginState{Output: []string{}}}
70 if err := command.Start(); err != nil {79 if err := command.Start(); err != nil {
71 cancel()80 cancel()
72 return nil, err81 return nil, err
@@ -106,6 +115,7 @@ func (l *Login) line(text string) {
106 l.update(func(state *LoginState) {115 l.update(func(state *LoginState) {
107 state.Output = append(state.Output, text)116 state.Output = append(state.Output, text)
108 if url := urlPattern.FindString(text); url != "" && state.URL == "" && strings.Contains(url, "login") {117 if url := urlPattern.FindString(text); url != "" && state.URL == "" && strings.Contains(url, "login") {
118+ // gh: "Open this URL to continue in your web browser: https://github.com/login/device".
109 state.URL = strings.TrimRight(url, ".,;)")119 state.URL = strings.TrimRight(url, ".,;)")
110 if code := codePattern.FindStringSubmatch(url); code != nil && state.Code == "" {120 if code := codePattern.FindStringSubmatch(url); code != nil && state.Code == "" {
111 state.Code = code[1]121 state.Code = code[1]
@@ -132,7 +142,7 @@ func (l *Login) finish(err error, cancelled bool) {
132 case err != nil:142 case err != nil:
133 state.Error = err.Error()143 state.Error = err.Error()
134 default:144 default:
135- state.Error = "sbx login ended without signing in"145+ state.Error = l.failure
136 }146 }
137 })147 })
138 }148 }
modified internal/sbxcreate/login_test.go +39 -0
@@ -4,6 +4,7 @@ package sbxcreate_test
44
55 import (
66 "context"
7+ "errors"
78 "os"
89 "path/filepath"
910 "strings"
@@ -105,3 +106,41 @@ func TestNotSignedIn(t *testing.T) {
105106 }
106107 }
107108 }
109+
110+// ghLoginScript is `gh auth login --web` in short (issue #103).
111+const ghLoginScript = `#!/bin/sh
112+[ "$1 $2 $3" = "auth login --web" ] || exit 1
113+echo "! First copy your one-time code: 1A2B-3C4D"
114+echo "Open this URL to continue in your web browser: https://github.com/login/device"
115+sleep 0.2
116+echo "✓ Authentication complete."
117+echo "✓ Logged in as octocat"
118+`
119+
120+func TestGHLoginReadsGhsCodeAndUser(t *testing.T) {
121+ dir := t.TempDir()
122+ if err := os.WriteFile(filepath.Join(dir, "gh"), []byte(ghLoginScript), 0o755); err != nil {
123+ t.Fatal(err)
124+ }
125+ login, err := sbxcreate.GH{Command: filepath.Join(dir, "gh")}.StartLogin()
126+ if err != nil {
127+ t.Fatal(err)
128+ }
129+ state := waitLogin(t, login, func(s sbxcreate.LoginState) bool { return s.Done })
130+ if state.Code != "1A2B-3C4D" || state.URL != "https://github.com/login/device" || state.User != "octocat" || state.Error != "" {
131+ t.Fatalf("%+v", state)
132+ }
133+}
134+
135+func TestWithoutGHTheAssistantSaysSo(t *testing.T) {
136+ gh := sbxcreate.GH{Command: filepath.Join(t.TempDir(), "no-gh")}
137+ if err := gh.Available(); !errors.Is(err, sbxcreate.ErrGHMissing) {
138+ t.Fatalf("Available: %v", err)
139+ }
140+ if _, err := gh.Token(context.Background()); !errors.Is(err, sbxcreate.ErrGHMissing) {
141+ t.Fatalf("Token: %v", err)
142+ }
143+ if _, err := gh.StartLogin(); !errors.Is(err, sbxcreate.ErrGHMissing) {
144+ t.Fatalf("StartLogin: %v", err)
145+ }
146+}
@@ -4,6 +4,7 @@ package sbxcreate_test
4 4
5 import (5 import (
6 "context"6 "context"
7+ "errors"
7 "os"8 "os"
8 "path/filepath"9 "path/filepath"
9 "strings"10 "strings"
@@ -105,3 +106,41 @@ func TestNotSignedIn(t *testing.T) {
105 }106 }
106 }107 }
107 }108 }
109+
110+// ghLoginScript is `gh auth login --web` in short (issue #103).
111+const ghLoginScript = `#!/bin/sh
112+[ "$1 $2 $3" = "auth login --web" ] || exit 1
113+echo "! First copy your one-time code: 1A2B-3C4D"
114+echo "Open this URL to continue in your web browser: https://github.com/login/device"
115+sleep 0.2
116+echo "✓ Authentication complete."
117+echo "✓ Logged in as octocat"
118+`
119+
120+func TestGHLoginReadsGhsCodeAndUser(t *testing.T) {
121+ dir := t.TempDir()
122+ if err := os.WriteFile(filepath.Join(dir, "gh"), []byte(ghLoginScript), 0o755); err != nil {
123+ t.Fatal(err)
124+ }
125+ login, err := sbxcreate.GH{Command: filepath.Join(dir, "gh")}.StartLogin()
126+ if err != nil {
127+ t.Fatal(err)
128+ }
129+ state := waitLogin(t, login, func(s sbxcreate.LoginState) bool { return s.Done })
130+ if state.Code != "1A2B-3C4D" || state.URL != "https://github.com/login/device" || state.User != "octocat" || state.Error != "" {
131+ t.Fatalf("%+v", state)
132+ }
133+}
134+
135+func TestWithoutGHTheAssistantSaysSo(t *testing.T) {
136+ gh := sbxcreate.GH{Command: filepath.Join(t.TempDir(), "no-gh")}
137+ if err := gh.Available(); !errors.Is(err, sbxcreate.ErrGHMissing) {
138+ t.Fatalf("Available: %v", err)
139+ }
140+ if _, err := gh.Token(context.Background()); !errors.Is(err, sbxcreate.ErrGHMissing) {
141+ t.Fatalf("Token: %v", err)
142+ }
143+ if _, err := gh.StartLogin(); !errors.Is(err, sbxcreate.ErrGHMissing) {
144+ t.Fatalf("StartLogin: %v", err)
145+ }
146+}
modified internal/sbxcreate/sbxcreate.go +59 -10
@@ -3,7 +3,7 @@
33 // Package sbxcreate creates an agent that runs in a Docker Sandbox (sbx)
44 // without a file to write (issue #96): a folder named after the agent, its
55 // sbxenv.yaml and its workspace/ folder, for one of the kinds of Catalogue
6-// (Claude, Gemini, Codex, Vibe…). It also talks to sbx for what the assistant
6+// (Claude, Gemini, Codex, Vibe, Copilot…). It also talks to sbx for what the assistant
77 // needs: the sandboxes that exist, and the API key of a kind, checked and
88 // stored with `sbx secret` without ever being written or logged.
99 //
@@ -48,8 +48,32 @@ type Kind struct {
4848 // Service is the sbx secret service of its key (sbx secret set <service>).
4949 Service string `json:"service"`
5050 // KeyURL is where the user gets a key.
51- KeyURL string `json:"keyUrl"`
51+ KeyURL string `json:"keyUrl"`
52+ // Token is true when the secret is a token of the user's account rather
53+ // than an API key (GitHub Copilot): the assistant says so.
54+ Token bool `json:"token"`
55+ // FromGH is true when the token can come from the GitHub CLI
56+ // (`gh auth token`, issue #103): the assistant offers it.
57+ FromGH bool `json:"fromGh"`
5258 Bindings Binding `json:"-"`
59+ // Shared is the other sbx services that get the same secret, each with
60+ // its domains (Copilot's token also goes to github, for git and gh).
61+ Shared []Shared `json:"-"`
62+}
63+
64+// Shared is one more sbx service that gets a kind's secret.
65+type Shared struct {
66+ Service string
67+ Bindings Binding
68+}
69+
70+// Services is the sbx services of kind's secret: its own, then Shared.
71+func (k Kind) Services() []string {
72+ services := []string{k.Service}
73+ for _, shared := range k.Shared {
74+ services = append(services, shared.Service)
75+ }
76+ return services
5377 }
5478
5579 // Catalogue is the kinds the assistant offers, in this order. A new kind is
@@ -86,6 +110,22 @@ var Catalogue = []Kind{
86110 Service: "mistral", KeyURL: "https://console.mistral.ai/api-keys",
87111 Bindings: Binding{APIKey: []string{"api.mistral.ai"}},
88112 },
113+ {
114+ // GitHub Copilot CLI (issue #103): `copilot --acp --stdio` serves ACP
115+ // (public preview at GitHub). The kit's secret service copilot is a
116+ // GitHub token allowed to use Copilot (COPILOT_GITHUB_TOKEN), injected
117+ // for the Copilot API hosts; the same token goes to the service github
118+ // (GH_TOKEN: git and gh in the sandbox, the owner's choice). It can
119+ // come from `gh auth token`.
120+ ID: "copilot", Title: "Copilot", Icon: "logo:copilot",
121+ Agent: "copilot", Kit: "docker.io/sbx/copilot-kit:latest", Program: "copilot --acp --stdio",
122+ Service: "copilot", KeyURL: "https://github.com/settings/personal-access-tokens/new", Token: true, FromGH: true,
123+ Bindings: Binding{APIKey: []string{
124+ "api.githubcopilot.com", "api.individual.githubcopilot.com", "api.business.githubcopilot.com",
125+ "api.enterprise.githubcopilot.com", "copilot.github.com",
126+ }},
127+ Shared: []Shared{{Service: "github", Bindings: Binding{APIKey: []string{"api.github.com", "github.com"}}}},
128+ },
89129 }
90130
91131 // Lookup is the kind called id; ok is false when there is none.
@@ -165,23 +205,32 @@ func Render(kind Kind, name string) string {
165205 b.WriteString("# The agent's working folder, relative to this file.\n")
166206 b.WriteString("workspace: ./workspace\n\n")
167207 fmt.Fprintf(&b, "kits:\n - %s\n\n", kind.Kit)
168- fmt.Fprintf(&b, "# Where sbx injects the key stored with `sbx secret set %s`: these domains only.\n", kind.Service)
169- fmt.Fprintf(&b, "bindings:\n %s:\n", kind.Service)
208+ b.WriteString("# Where sbx injects the key stored with `sbx secret set <service>`: these domains only.\n")
209+ b.WriteString("bindings:\n")
210+ writeBinding(&b, kind.Service, kind.Bindings)
211+ for _, shared := range kind.Shared {
212+ writeBinding(&b, shared.Service, shared.Bindings)
213+ }
214+ b.WriteString("\n# Pull the kit at each creation: \"latest\" moves.\n")
215+ b.WriteString("sandboxOptions:\n pullPolicy: always\n")
216+ return b.String()
217+}
218+
219+// writeBinding writes the domains of service under bindings:.
220+func writeBinding(b *strings.Builder, service string, binding Binding) {
221+ fmt.Fprintf(b, " %s:\n", service)
170222 for _, auth := range []struct {
171223 name string
172224 domains []string
173- }{{"apiKey", kind.Bindings.APIKey}, {"oauth", kind.Bindings.OAuth}} {
225+ }{{"apiKey", binding.APIKey}, {"oauth", binding.OAuth}} {
174226 if len(auth.domains) == 0 {
175227 continue
176228 }
177- fmt.Fprintf(&b, " %s:\n domains:\n", auth.name)
229+ fmt.Fprintf(b, " %s:\n domains:\n", auth.name)
178230 for _, domain := range auth.domains {
179- fmt.Fprintf(&b, " - %s\n", domain)
231+ fmt.Fprintf(b, " - %s\n", domain)
180232 }
181233 }
182- b.WriteString("\n# Pull the kit at each creation: \"latest\" moves.\n")
183- b.WriteString("sandboxOptions:\n pullPolicy: always\n")
184- return b.String()
185234 }
186235
187236 // Sbx runs the sbx commands the assistant needs.
@@ -3,7 +3,7 @@
3 // Package sbxcreate creates an agent that runs in a Docker Sandbox (sbx)3 // Package sbxcreate creates an agent that runs in a Docker Sandbox (sbx)
4 // without a file to write (issue #96): a folder named after the agent, its4 // without a file to write (issue #96): a folder named after the agent, its
5 // sbxenv.yaml and its workspace/ folder, for one of the kinds of Catalogue5 // sbxenv.yaml and its workspace/ folder, for one of the kinds of Catalogue
6-// (Claude, Gemini, Codex, Vibe…). It also talks to sbx for what the assistant6+// (Claude, Gemini, Codex, Vibe, Copilot…). It also talks to sbx for what the assistant
7 // needs: the sandboxes that exist, and the API key of a kind, checked and7 // needs: the sandboxes that exist, and the API key of a kind, checked and
8 // stored with `sbx secret` without ever being written or logged.8 // stored with `sbx secret` without ever being written or logged.
9 //9 //
@@ -48,8 +48,32 @@ type Kind struct {
48 // Service is the sbx secret service of its key (sbx secret set <service>).48 // Service is the sbx secret service of its key (sbx secret set <service>).
49 Service string `json:"service"`49 Service string `json:"service"`
50 // KeyURL is where the user gets a key.50 // KeyURL is where the user gets a key.
51- KeyURL string `json:"keyUrl"`51+ KeyURL string `json:"keyUrl"`
52+ // Token is true when the secret is a token of the user's account rather
53+ // than an API key (GitHub Copilot): the assistant says so.
54+ Token bool `json:"token"`
55+ // FromGH is true when the token can come from the GitHub CLI
56+ // (`gh auth token`, issue #103): the assistant offers it.
57+ FromGH bool `json:"fromGh"`
52 Bindings Binding `json:"-"`58 Bindings Binding `json:"-"`
59+ // Shared is the other sbx services that get the same secret, each with
60+ // its domains (Copilot's token also goes to github, for git and gh).
61+ Shared []Shared `json:"-"`
62+}
63+
64+// Shared is one more sbx service that gets a kind's secret.
65+type Shared struct {
66+ Service string
67+ Bindings Binding
68+}
69+
70+// Services is the sbx services of kind's secret: its own, then Shared.
71+func (k Kind) Services() []string {
72+ services := []string{k.Service}
73+ for _, shared := range k.Shared {
74+ services = append(services, shared.Service)
75+ }
76+ return services
53 }77 }
54 78
55 // Catalogue is the kinds the assistant offers, in this order. A new kind is79 // Catalogue is the kinds the assistant offers, in this order. A new kind is
@@ -86,6 +110,22 @@ var Catalogue = []Kind{
86 Service: "mistral", KeyURL: "https://console.mistral.ai/api-keys",110 Service: "mistral", KeyURL: "https://console.mistral.ai/api-keys",
87 Bindings: Binding{APIKey: []string{"api.mistral.ai"}},111 Bindings: Binding{APIKey: []string{"api.mistral.ai"}},
88 },112 },
113+ {
114+ // GitHub Copilot CLI (issue #103): `copilot --acp --stdio` serves ACP
115+ // (public preview at GitHub). The kit's secret service copilot is a
116+ // GitHub token allowed to use Copilot (COPILOT_GITHUB_TOKEN), injected
117+ // for the Copilot API hosts; the same token goes to the service github
118+ // (GH_TOKEN: git and gh in the sandbox, the owner's choice). It can
119+ // come from `gh auth token`.
120+ ID: "copilot", Title: "Copilot", Icon: "logo:copilot",
121+ Agent: "copilot", Kit: "docker.io/sbx/copilot-kit:latest", Program: "copilot --acp --stdio",
122+ Service: "copilot", KeyURL: "https://github.com/settings/personal-access-tokens/new", Token: true, FromGH: true,
123+ Bindings: Binding{APIKey: []string{
124+ "api.githubcopilot.com", "api.individual.githubcopilot.com", "api.business.githubcopilot.com",
125+ "api.enterprise.githubcopilot.com", "copilot.github.com",
126+ }},
127+ Shared: []Shared{{Service: "github", Bindings: Binding{APIKey: []string{"api.github.com", "github.com"}}}},
128+ },
89 }129 }
90 130
91 // Lookup is the kind called id; ok is false when there is none.131 // Lookup is the kind called id; ok is false when there is none.
@@ -165,23 +205,32 @@ func Render(kind Kind, name string) string {
165 b.WriteString("# The agent's working folder, relative to this file.\n")205 b.WriteString("# The agent's working folder, relative to this file.\n")
166 b.WriteString("workspace: ./workspace\n\n")206 b.WriteString("workspace: ./workspace\n\n")
167 fmt.Fprintf(&b, "kits:\n - %s\n\n", kind.Kit)207 fmt.Fprintf(&b, "kits:\n - %s\n\n", kind.Kit)
168- fmt.Fprintf(&b, "# Where sbx injects the key stored with `sbx secret set %s`: these domains only.\n", kind.Service)208+ b.WriteString("# Where sbx injects the key stored with `sbx secret set <service>`: these domains only.\n")
169- fmt.Fprintf(&b, "bindings:\n %s:\n", kind.Service)209+ b.WriteString("bindings:\n")
210+ writeBinding(&b, kind.Service, kind.Bindings)
211+ for _, shared := range kind.Shared {
212+ writeBinding(&b, shared.Service, shared.Bindings)
213+ }
214+ b.WriteString("\n# Pull the kit at each creation: \"latest\" moves.\n")
215+ b.WriteString("sandboxOptions:\n pullPolicy: always\n")
216+ return b.String()
217+}
218+
219+// writeBinding writes the domains of service under bindings:.
220+func writeBinding(b *strings.Builder, service string, binding Binding) {
221+ fmt.Fprintf(b, " %s:\n", service)
170 for _, auth := range []struct {222 for _, auth := range []struct {
171 name string223 name string
172 domains []string224 domains []string
173- }{{"apiKey", kind.Bindings.APIKey}, {"oauth", kind.Bindings.OAuth}} {225+ }{{"apiKey", binding.APIKey}, {"oauth", binding.OAuth}} {
174 if len(auth.domains) == 0 {226 if len(auth.domains) == 0 {
175 continue227 continue
176 }228 }
177- fmt.Fprintf(&b, " %s:\n domains:\n", auth.name)229+ fmt.Fprintf(b, " %s:\n domains:\n", auth.name)
178 for _, domain := range auth.domains {230 for _, domain := range auth.domains {
179- fmt.Fprintf(&b, " - %s\n", domain)231+ fmt.Fprintf(b, " - %s\n", domain)
180 }232 }
181 }233 }
182- b.WriteString("\n# Pull the kit at each creation: \"latest\" moves.\n")
183- b.WriteString("sandboxOptions:\n pullPolicy: always\n")
184- return b.String()
185 }234 }
186 235
187 // Sbx runs the sbx commands the assistant needs.236 // Sbx runs the sbx commands the assistant needs.
modified internal/sbxcreate/sbxcreate_test.go +27 -2
@@ -42,7 +42,7 @@ func fakeSbx(t *testing.T) (sbxcreate.Sbx, string) {
4242 return sbxcreate.Sbx{Command: filepath.Join(dir, "sbx")}, dir
4343 }
4444
45-func TestTheCatalogueOffersClaudeGeminiCodexAndVibe(t *testing.T) {
45+func TestTheCatalogueOffersClaudeGeminiCodexVibeAndCopilot(t *testing.T) {
4646 var ids []string
4747 for _, kind := range sbxcreate.Catalogue {
4848 ids = append(ids, kind.ID)
@@ -50,7 +50,7 @@ func TestTheCatalogueOffersClaudeGeminiCodexAndVibe(t *testing.T) {
5050 t.Errorf("incomplete kind: %+v", kind)
5151 }
5252 }
53- if !slices.Equal(ids, []string{"claude", "gemini", "codex", "vibe"}) {
53+ if !slices.Equal(ids, []string{"claude", "gemini", "codex", "vibe", "copilot"}) {
5454 t.Fatalf("kinds: %v", ids)
5555 }
5656 }
@@ -62,6 +62,9 @@ func TestGeminiGoesThroughAntigravityAndVibeThroughVibeACP(t *testing.T) {
6262 if vibe, _ := sbxcreate.Lookup("vibe"); vibe.Agent != "vibe" || vibe.Program != "vibe-acp" || vibe.Service != "mistral" {
6363 t.Fatalf("Vibe: %+v", vibe)
6464 }
65+ if copilot, _ := sbxcreate.Lookup("copilot"); copilot.Agent != "copilot" || copilot.Program != "copilot --acp --stdio" || copilot.Service != "copilot" || !copilot.Token {
66+ t.Fatalf("Copilot: %+v", copilot)
67+ }
6568 if _, ok := sbxcreate.Lookup("nope"); ok {
6669 t.Fatal("an unknown kind")
6770 }
@@ -183,3 +186,25 @@ func TestSandboxesAndAMissingSbx(t *testing.T) {
183186 t.Fatalf("HasSecret: %v", err)
184187 }
185188 }
189+
190+// Copilot's token is injected for the Copilot API hosts (service copilot)
191+// and for GitHub, for git and gh (service github) (issue #103).
192+func TestTheCopilotTokenGoesToCopilotAndGitHub(t *testing.T) {
193+ copilot, _ := sbxcreate.Lookup("copilot")
194+ if !slices.Equal(copilot.Services(), []string{"copilot", "github"}) {
195+ t.Fatalf("services: %v", copilot.Services())
196+ }
197+ file := sbxcreate.Render(copilot, "pilot")
198+ for _, want := range []string{
199+ "agent: copilot\n", " - docker.io/sbx/copilot-kit:latest\n",
200+ " copilot:\n apiKey:\n domains:\n - api.githubcopilot.com\n",
201+ " github:\n apiKey:\n domains:\n - api.github.com\n - github.com\n",
202+ } {
203+ if !strings.Contains(file, want) {
204+ t.Errorf("missing %q in:\n%s", want, file)
205+ }
206+ }
207+ if claude, _ := sbxcreate.Lookup("claude"); !slices.Equal(claude.Services(), []string{"anthropic"}) {
208+ t.Fatalf("one service for the others: %v", claude.Services())
209+ }
210+}
@@ -42,7 +42,7 @@ func fakeSbx(t *testing.T) (sbxcreate.Sbx, string) {
42 return sbxcreate.Sbx{Command: filepath.Join(dir, "sbx")}, dir42 return sbxcreate.Sbx{Command: filepath.Join(dir, "sbx")}, dir
43 }43 }
44 44
45-func TestTheCatalogueOffersClaudeGeminiCodexAndVibe(t *testing.T) {45+func TestTheCatalogueOffersClaudeGeminiCodexVibeAndCopilot(t *testing.T) {
46 var ids []string46 var ids []string
47 for _, kind := range sbxcreate.Catalogue {47 for _, kind := range sbxcreate.Catalogue {
48 ids = append(ids, kind.ID)48 ids = append(ids, kind.ID)
@@ -50,7 +50,7 @@ func TestTheCatalogueOffersClaudeGeminiCodexAndVibe(t *testing.T) {
50 t.Errorf("incomplete kind: %+v", kind)50 t.Errorf("incomplete kind: %+v", kind)
51 }51 }
52 }52 }
53- if !slices.Equal(ids, []string{"claude", "gemini", "codex", "vibe"}) {53+ if !slices.Equal(ids, []string{"claude", "gemini", "codex", "vibe", "copilot"}) {
54 t.Fatalf("kinds: %v", ids)54 t.Fatalf("kinds: %v", ids)
55 }55 }
56 }56 }
@@ -62,6 +62,9 @@ func TestGeminiGoesThroughAntigravityAndVibeThroughVibeACP(t *testing.T) {
62 if vibe, _ := sbxcreate.Lookup("vibe"); vibe.Agent != "vibe" || vibe.Program != "vibe-acp" || vibe.Service != "mistral" {62 if vibe, _ := sbxcreate.Lookup("vibe"); vibe.Agent != "vibe" || vibe.Program != "vibe-acp" || vibe.Service != "mistral" {
63 t.Fatalf("Vibe: %+v", vibe)63 t.Fatalf("Vibe: %+v", vibe)
64 }64 }
65+ if copilot, _ := sbxcreate.Lookup("copilot"); copilot.Agent != "copilot" || copilot.Program != "copilot --acp --stdio" || copilot.Service != "copilot" || !copilot.Token {
66+ t.Fatalf("Copilot: %+v", copilot)
67+ }
65 if _, ok := sbxcreate.Lookup("nope"); ok {68 if _, ok := sbxcreate.Lookup("nope"); ok {
66 t.Fatal("an unknown kind")69 t.Fatal("an unknown kind")
67 }70 }
@@ -183,3 +186,25 @@ func TestSandboxesAndAMissingSbx(t *testing.T) {
183 t.Fatalf("HasSecret: %v", err)186 t.Fatalf("HasSecret: %v", err)
184 }187 }
185 }188 }
189+
190+// Copilot's token is injected for the Copilot API hosts (service copilot)
191+// and for GitHub, for git and gh (service github) (issue #103).
192+func TestTheCopilotTokenGoesToCopilotAndGitHub(t *testing.T) {
193+ copilot, _ := sbxcreate.Lookup("copilot")
194+ if !slices.Equal(copilot.Services(), []string{"copilot", "github"}) {
195+ t.Fatalf("services: %v", copilot.Services())
196+ }
197+ file := sbxcreate.Render(copilot, "pilot")
198+ for _, want := range []string{
199+ "agent: copilot\n", " - docker.io/sbx/copilot-kit:latest\n",
200+ " copilot:\n apiKey:\n domains:\n - api.githubcopilot.com\n",
201+ " github:\n apiKey:\n domains:\n - api.github.com\n - github.com\n",
202+ } {
203+ if !strings.Contains(file, want) {
204+ t.Errorf("missing %q in:\n%s", want, file)
205+ }
206+ }
207+ if claude, _ := sbxcreate.Lookup("claude"); !slices.Equal(claude.Services(), []string{"anthropic"}) {
208+ t.Fatalf("one service for the others: %v", claude.Services())
209+ }
210+}
modified schema/config.schema.json +1 -1
@@ -148,7 +148,7 @@
148148 "minLength": 1
149149 },
150150 "icon": {
151- "description": "An emoji, a letter shown in a coloured circle, or a logo Sidekicks ships (logo:claude, logo:gemini, logo:openai, logo:mistral), next to the agent. Defaults to the first letter of the title in a circle.",
151+ "description": "An emoji, a letter shown in a coloured circle, or a logo Sidekicks ships (logo:claude, logo:gemini, logo:openai, logo:mistral, logo:copilot), next to the agent. Defaults to the first letter of the title in a circle.",
152152 "type": "string",
153153 "maxLength": 16
154154 },
@@ -148,7 +148,7 @@
148 "minLength": 1148 "minLength": 1
149 },149 },
150 "icon": {150 "icon": {
151- "description": "An emoji, a letter shown in a coloured circle, or a logo Sidekicks ships (logo:claude, logo:gemini, logo:openai, logo:mistral), next to the agent. Defaults to the first letter of the title in a circle.",151+ "description": "An emoji, a letter shown in a coloured circle, or a logo Sidekicks ships (logo:claude, logo:gemini, logo:openai, logo:mistral, logo:copilot), next to the agent. Defaults to the first letter of the title in a circle.",
152 "type": "string",152 "type": "string",
153 "maxLength": 16153 "maxLength": 16
154 },154 },