v1.7.0 : #120 #121 glisser-déposer, #125 confiance Vibe, #126 agents mini-me visibles, #128 supprimer un agent ; tickets #123 #124 #127
- #120 : déposer des .md ou des dossiers de skills sur la liste des skills. - #121 : déposer un fichier texte sur l'onglet Instructions. - #125 : Vibe ignore les instructions et les skills d'un dossier non fiable ; la conversation le dit et propose « Faire confiance à son dossier » (_trust/decision ACP), puis une nouvelle session. - #126 : le dossier d'un agent mini-me n'est plus caché dans le Finder (drapeau UF_HIDDEN retiré sur macOS). - #128 : « Supprimer l'agent » : configuration, historique, commandes, sandbox ou conteneur, dossier à la corbeille. - Études v1.8.0 : #123 ACP et MCP, #124 MCP Gateway sbx, #127 modèles sbxenv. Tous testés sur le Mac par l'owner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3f9adb1 parent: 3449f3f added
.memory/handoffs/2026-11-16-v1.7.0-features.md +6 -0 | new file mode 100644 | ||
| @@ -0,0 +1,6 @@ | ||
| 1 | +# 2026-11-16 — v1.7.0 features done | |
| 2 | + | |
| 3 | +- All v1.7.0 tickets closed and merged into main (not pushed): #111–#113, #116–#122, #125, #126, #128 (see history). | |
| 4 | +- Next: publish 1.7.0 — no "Publier la version 1.7.0" ticket yet (create it like #102): version, README + doc index intros, release notes check (docs/release-notes/v1.7.0*.md, written along the way), make verify, local CI on the Mac. | |
| 5 | +- v1.8.0 holds the spikes #114, #115, #123, #124, #127. | |
| 6 | +- Open question from the Vibe "/" list: Vibe uses its skills but Sidekicks' "/" popup did not list them; the stale-commands fix (#128 ForgetAgent) may have been the cause — owner said OK; recheck if it comes back. | |
| new file mode 100644 | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | +# 2026-11-16 — v1.7.0 features done | ||
| 2 | + | ||
| 3 | +- All v1.7.0 tickets closed and merged into main (not pushed): #111–#113, #116–#122, #125, #126, #128 (see history). | ||
| 4 | +- Next: publish 1.7.0 — no "Publier la version 1.7.0" ticket yet (create it like #102): version, README + doc index intros, release notes check (docs/release-notes/v1.7.0*.md, written along the way), make verify, local CI on the Mac. | ||
| 5 | +- v1.8.0 holds the spikes #114, #115, #123, #124, #127. | ||
| 6 | +- Open question from the Vibe "/" list: Vibe uses its skills but Sidekicks' "/" popup did not list them; the stale-commands fix (#128 ForgetAgent) may have been the cause — owner said OK; recheck if it comes back. | ||
modified
.memory/history.md +24 -0 | @@ -404,3 +404,27 @@ | ||
| 404 | 404 | - #119: DeleteSkill (folder or <name>.md, to the trash locally, nothing else), Delete button + confirmation in SkillsTab. Amends the "never removes" rule (summary updated). Tests Go; Xvfb. make verify green. Not committed; #119 open for the owner's test. |
| 405 | 405 | - **2026-11-16 — #122** (owner: ticket + implement deleting the instructions file): DeleteInstructions (existing file only, trash locally), Delete button + confirmation in InstructionsTab; same branch feature/119-delete-skill. Tests Go; Xvfb. make verify green. Summary decision amended. Not committed; #119 and #122 open for the owner's test. |
| 406 | 406 | - **2026-11-16 — #119 and #122 closed** (owner); feature/119-delete-skill merged into main with tickets #120, #121 (not pushed). |
| 407 | + | |
| 408 | +## 2026-11-16 — #120 and #121 drag & drop (branch feature/120-121-drag-and-drop) | |
| 409 | + | |
| 410 | +- Asked: "implement 120 and 121". Reused files:dropped + data-file-drop-target (Wails adds file-drop-target-active on hover). | |
| 411 | +- #120: Skills list drop target, each dropped item → ImportSkill, refusals listed (name + plain-words error); Go: a single-file skill must be .md/.markdown (ErrNotMarkdown). #121: Instructions tab drop target, one file only, confirmation when instructions exist. errors.ts rules notMarkdown/notASkill/skillExists/notText (+tests). make verify green. | |
| 412 | +- Not verified: the drop itself (no Finder under Xvfb); hints shown. Not committed; #120/#121 open for the owner's test. | |
| 413 | +- **2026-11-16 — tickets #123** (spike: how ACP and MCP work together — mcpServers at session/new, mcpCapabilities, mm ignores them, stdio servers run inside the sandbox) **and #124** (spike: sbx MCP Gateway — MCP_GATEWAY_URL / MCP_SENTINEL_TOKEN_NAME injected by sandboxd, Copilot kit hook writes mcp-config) — both v1.8.0. Not started. | |
| 414 | + | |
| 415 | +## 2026-11-16 — #125 Vibe workspace trust (branch feature/125-vibe-trust, on top of the uncommitted feature/120-121-drag-and-drop work) | |
| 416 | + | |
| 417 | +- Owner: skills work for Claude, Antigravity, Codex, not Vibe. Cause (Vibe docs + source): project config (AGENTS.md, skills) loads only in trusted folders; vibe-acp has no --trust and never prompts, but reports workspace_trust in session/new _meta and accepts `_trust/decision`. Owner approved the proposal (notice + "Trust its folder" button, then a new session). | |
| 418 | +- Done: acp trust.go (+ internal test), channels noticeTrust/TrustFolder (+ trust_test.go, fakeConn fields), ChannelService.TrustFolder, MessageView notice + button, i18n EN/FR, docs EN/FR, release notes v1.7.0, ticket #125 (created with tasks 1–3 done). Xvfb with a Python fake vibe-acp: `_trust/decision {"decision":"trust_cwd","sessionId":"s1"}` received, new session, skills read. make verify green. | |
| 419 | +- Not verified: a real vibe-acp in a sandbox (#125 task 4). Not committed; #120, #121, #123, #124, #125 all uncommitted on this branch. | |
| 420 | +- **2026-11-16 — #126** (owner: mini-me agents invisible in the Finder; ls -lO shows 'hidden' on mini-coder and mini-me-2 only): the assistant's .sidekicks-new-agent-* dot folder carries UF_HIDDEN on macOS and the rename keeps it; creator.unhide (darwin: clear UF_HIDDEN only; no-op elsewhere) after the rename. darwin test compiles, runs only on the Mac. Workaround chflags nohidden. Uncommitted, same working branch. | |
| 421 | +- **2026-11-16 — ticket #127** (v1.8.0, spike): templates for the sandbox assistant's sbxenv.yaml (embedded go:embed + text/template vs user-editable templates / new kinds without recompiling vs keeping Render). Not started. | |
| 422 | +- **2026-11-16 — ticket #128** (v1.7.0): delete an agent cleanly (config, DB direct/history/memberships, lifecycle remove, folder to trash). Owner hit 'This name is already used… try ratatouille-2'; takenNames = config agents + agentsFolder entries + sbx ls (not the DB). Manual fix explained. Not started. | |
| 423 | + | |
| 424 | +## 2026-11-16 — #128 delete an agent cleanly (branch feature/128-delete-agent, on top of the uncommitted working branch) | |
| 425 | + | |
| 426 | +- Owner: the "already used… ratatouille-2" came from a sandbox left behind; "implement the ticket". | |
| 427 | +- Done: config.RemoveAgent (+ leaveChannels: a YAML channel naming a missing agent is an error), channels.ForgetAgent, ConfigService.Removal/DeleteAgent (removeagent.go: stop, lifecycle remove, ForgetAgent, config, folder to trash only when directly in agentsFolder), AgentView "Delete the agent" + confirmation with checkboxes, i18n EN/FR. Tests Go; Xvfb with a fake sbx. make verify green. Docs EN/FR (add-an-agent "Delete an agent", reference), release notes v1.7.0. | |
| 428 | +- Not committed: this working tree now holds #120, #121, #123–#128. #128 open for the owner's test. | |
| 429 | +- **#128 follow-up / Vibe '/' without skills** (owner: Vibe uses its skills when asked — trust OK, files OK, vibe CLI lists them — but Sidekicks' '/' popup does not). vibe-acp does announce skills in available_commands_update (0.1 s after session creation; Sidekicks keeps early updates). Found and fixed: ForgetAgent now clears the agent's cached commands (a re-created agent inherited the old list). Root cause of the missing skills in '/' still unconfirmed — waiting for what '/' shows and whether '/reload' refreshes it. | |
| 430 | +- **2026-11-16 — v1.7.0 tickets closed** (owner: all OK): #120, #121, #125, #126, #128; everything committed and merged into main (not pushed). Milestone v1.7.0 left open (release to publish). | |
| @@ -404,3 +404,27 @@ | |||
| 404 | - #119: DeleteSkill (folder or <name>.md, to the trash locally, nothing else), Delete button + confirmation in SkillsTab. Amends the "never removes" rule (summary updated). Tests Go; Xvfb. make verify green. Not committed; #119 open for the owner's test. | 404 | - #119: DeleteSkill (folder or <name>.md, to the trash locally, nothing else), Delete button + confirmation in SkillsTab. Amends the "never removes" rule (summary updated). Tests Go; Xvfb. make verify green. Not committed; #119 open for the owner's test. |
| 405 | - **2026-11-16 — #122** (owner: ticket + implement deleting the instructions file): DeleteInstructions (existing file only, trash locally), Delete button + confirmation in InstructionsTab; same branch feature/119-delete-skill. Tests Go; Xvfb. make verify green. Summary decision amended. Not committed; #119 and #122 open for the owner's test. | 405 | - **2026-11-16 — #122** (owner: ticket + implement deleting the instructions file): DeleteInstructions (existing file only, trash locally), Delete button + confirmation in InstructionsTab; same branch feature/119-delete-skill. Tests Go; Xvfb. make verify green. Summary decision amended. Not committed; #119 and #122 open for the owner's test. |
| 406 | - **2026-11-16 — #119 and #122 closed** (owner); feature/119-delete-skill merged into main with tickets #120, #121 (not pushed). | 406 | - **2026-11-16 — #119 and #122 closed** (owner); feature/119-delete-skill merged into main with tickets #120, #121 (not pushed). |
| 407 | + | ||
| 408 | +## 2026-11-16 — #120 and #121 drag & drop (branch feature/120-121-drag-and-drop) | ||
| 409 | + | ||
| 410 | +- Asked: "implement 120 and 121". Reused files:dropped + data-file-drop-target (Wails adds file-drop-target-active on hover). | ||
| 411 | +- #120: Skills list drop target, each dropped item → ImportSkill, refusals listed (name + plain-words error); Go: a single-file skill must be .md/.markdown (ErrNotMarkdown). #121: Instructions tab drop target, one file only, confirmation when instructions exist. errors.ts rules notMarkdown/notASkill/skillExists/notText (+tests). make verify green. | ||
| 412 | +- Not verified: the drop itself (no Finder under Xvfb); hints shown. Not committed; #120/#121 open for the owner's test. | ||
| 413 | +- **2026-11-16 — tickets #123** (spike: how ACP and MCP work together — mcpServers at session/new, mcpCapabilities, mm ignores them, stdio servers run inside the sandbox) **and #124** (spike: sbx MCP Gateway — MCP_GATEWAY_URL / MCP_SENTINEL_TOKEN_NAME injected by sandboxd, Copilot kit hook writes mcp-config) — both v1.8.0. Not started. | ||
| 414 | + | ||
| 415 | +## 2026-11-16 — #125 Vibe workspace trust (branch feature/125-vibe-trust, on top of the uncommitted feature/120-121-drag-and-drop work) | ||
| 416 | + | ||
| 417 | +- Owner: skills work for Claude, Antigravity, Codex, not Vibe. Cause (Vibe docs + source): project config (AGENTS.md, skills) loads only in trusted folders; vibe-acp has no --trust and never prompts, but reports workspace_trust in session/new _meta and accepts `_trust/decision`. Owner approved the proposal (notice + "Trust its folder" button, then a new session). | ||
| 418 | +- Done: acp trust.go (+ internal test), channels noticeTrust/TrustFolder (+ trust_test.go, fakeConn fields), ChannelService.TrustFolder, MessageView notice + button, i18n EN/FR, docs EN/FR, release notes v1.7.0, ticket #125 (created with tasks 1–3 done). Xvfb with a Python fake vibe-acp: `_trust/decision {"decision":"trust_cwd","sessionId":"s1"}` received, new session, skills read. make verify green. | ||
| 419 | +- Not verified: a real vibe-acp in a sandbox (#125 task 4). Not committed; #120, #121, #123, #124, #125 all uncommitted on this branch. | ||
| 420 | +- **2026-11-16 — #126** (owner: mini-me agents invisible in the Finder; ls -lO shows 'hidden' on mini-coder and mini-me-2 only): the assistant's .sidekicks-new-agent-* dot folder carries UF_HIDDEN on macOS and the rename keeps it; creator.unhide (darwin: clear UF_HIDDEN only; no-op elsewhere) after the rename. darwin test compiles, runs only on the Mac. Workaround chflags nohidden. Uncommitted, same working branch. | ||
| 421 | +- **2026-11-16 — ticket #127** (v1.8.0, spike): templates for the sandbox assistant's sbxenv.yaml (embedded go:embed + text/template vs user-editable templates / new kinds without recompiling vs keeping Render). Not started. | ||
| 422 | +- **2026-11-16 — ticket #128** (v1.7.0): delete an agent cleanly (config, DB direct/history/memberships, lifecycle remove, folder to trash). Owner hit 'This name is already used… try ratatouille-2'; takenNames = config agents + agentsFolder entries + sbx ls (not the DB). Manual fix explained. Not started. | ||
| 423 | + | ||
| 424 | +## 2026-11-16 — #128 delete an agent cleanly (branch feature/128-delete-agent, on top of the uncommitted working branch) | ||
| 425 | + | ||
| 426 | +- Owner: the "already used… ratatouille-2" came from a sandbox left behind; "implement the ticket". | ||
| 427 | +- Done: config.RemoveAgent (+ leaveChannels: a YAML channel naming a missing agent is an error), channels.ForgetAgent, ConfigService.Removal/DeleteAgent (removeagent.go: stop, lifecycle remove, ForgetAgent, config, folder to trash only when directly in agentsFolder), AgentView "Delete the agent" + confirmation with checkboxes, i18n EN/FR. Tests Go; Xvfb with a fake sbx. make verify green. Docs EN/FR (add-an-agent "Delete an agent", reference), release notes v1.7.0. | ||
| 428 | +- Not committed: this working tree now holds #120, #121, #123–#128. #128 open for the owner's test. | ||
| 429 | +- **#128 follow-up / Vibe '/' without skills** (owner: Vibe uses its skills when asked — trust OK, files OK, vibe CLI lists them — but Sidekicks' '/' popup does not). vibe-acp does announce skills in available_commands_update (0.1 s after session creation; Sidekicks keeps early updates). Found and fixed: ForgetAgent now clears the agent's cached commands (a re-created agent inherited the old list). Root cause of the missing skills in '/' still unconfirmed — waiting for what '/' shows and whether '/reload' refreshes it. | ||
| 430 | +- **2026-11-16 — v1.7.0 tickets closed** (owner: all OK): #120, #121, #125, #126, #128; everything committed and merged into main (not pushed). Milestone v1.7.0 left open (release to publish). | ||
modified
.memory/summary.md +1 -0 | @@ -29,6 +29,7 @@ What exists: | ||
| 29 | 29 | - Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Antigravity (kind id `antigravity` since #108, was `gemini`) `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 | 30 | - Agent icons (#100): `icon` may be `logo:<name>` (`config.LogoNames` = claude, gemini, antigravity, openai, mistral, copilot — copilot is GitHub Octicons, MIT, antigravity LobeHub Icons, 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 | 31 | - Agent instructions (#113): an agent's instruction file is chosen from its program (`agents.InstructionsFiles`: Claude → `CLAUDE.md` then `AGENTS.md`; Antigravity → `AGENTS.md` then `GEMINI.md`; else `AGENTS.md`). `config.AlwaysProtected` = `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `skills/**`: the Files tab may neither change nor delete them; **only the agent's Instructions tab writes an instruction file** (create from template / save with version / import) and, since #122, deletes it after a confirmation (to the trash on this computer) — owner's decision amending #54. Same rule for skills (#112): `agents.SkillsDir` (mm `skills` or its agent.yaml `skillsDir`, Claude `.claude/skills`, Vibe `.vibe/skills`, else `.agents/skills`); `.claude/skills/**`, `.agents/skills/**`, `.vibe/skills/**` are in AlwaysProtected too; only the Skills tab writes there, and since #119 it can delete a skill (its folder or mini-me `<name>.md`, to the trash on this computer) after a confirmation — nothing else is ever removed. Instructions and skills of a container/sbx agent are read/written in its host folder when it exists (`Core.settingsWorkspaceOf`). |
| 32 | +- Vibe workspace trust (#125): vibe-acp ignores a folder's AGENTS.md / skills / .vibe until trusted; it reports `_meta.workspace_trust` {status, details.detected_files, available_decisions} on session/new and session/load and accepts the ACP extension `_trust/decision` {sessionId, decision}. `acp.Conn.WorkspaceTrust/TrustWorkspace` (internal/acp/trust.go); channels test them by type assertion (other agents: no notice); system messages `workspace-untrusted` (button "Trust its folder" → ChannelService.TrustFolder, then a new session) and `workspace-trusted`. Trust is the user's decision, never automatic. | |
| 32 | 33 | - 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. |
| 33 | 34 | - 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). |
| 34 | 35 | - 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/`. |
| @@ -29,6 +29,7 @@ What exists: | |||
| 29 | - Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Antigravity (kind id `antigravity` since #108, was `gemini`) `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'`. | 29 | - Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Antigravity (kind id `antigravity` since #108, was `gemini`) `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, antigravity, openai, mistral, copilot — copilot is GitHub Octicons, MIT, antigravity LobeHub Icons, 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). | 30 | - Agent icons (#100): `icon` may be `logo:<name>` (`config.LogoNames` = claude, gemini, antigravity, openai, mistral, copilot — copilot is GitHub Octicons, MIT, antigravity LobeHub Icons, 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 | - Agent instructions (#113): an agent's instruction file is chosen from its program (`agents.InstructionsFiles`: Claude → `CLAUDE.md` then `AGENTS.md`; Antigravity → `AGENTS.md` then `GEMINI.md`; else `AGENTS.md`). `config.AlwaysProtected` = `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `skills/**`: the Files tab may neither change nor delete them; **only the agent's Instructions tab writes an instruction file** (create from template / save with version / import) and, since #122, deletes it after a confirmation (to the trash on this computer) — owner's decision amending #54. Same rule for skills (#112): `agents.SkillsDir` (mm `skills` or its agent.yaml `skillsDir`, Claude `.claude/skills`, Vibe `.vibe/skills`, else `.agents/skills`); `.claude/skills/**`, `.agents/skills/**`, `.vibe/skills/**` are in AlwaysProtected too; only the Skills tab writes there, and since #119 it can delete a skill (its folder or mini-me `<name>.md`, to the trash on this computer) after a confirmation — nothing else is ever removed. Instructions and skills of a container/sbx agent are read/written in its host folder when it exists (`Core.settingsWorkspaceOf`). | 31 | - Agent instructions (#113): an agent's instruction file is chosen from its program (`agents.InstructionsFiles`: Claude → `CLAUDE.md` then `AGENTS.md`; Antigravity → `AGENTS.md` then `GEMINI.md`; else `AGENTS.md`). `config.AlwaysProtected` = `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `skills/**`: the Files tab may neither change nor delete them; **only the agent's Instructions tab writes an instruction file** (create from template / save with version / import) and, since #122, deletes it after a confirmation (to the trash on this computer) — owner's decision amending #54. Same rule for skills (#112): `agents.SkillsDir` (mm `skills` or its agent.yaml `skillsDir`, Claude `.claude/skills`, Vibe `.vibe/skills`, else `.agents/skills`); `.claude/skills/**`, `.agents/skills/**`, `.vibe/skills/**` are in AlwaysProtected too; only the Skills tab writes there, and since #119 it can delete a skill (its folder or mini-me `<name>.md`, to the trash on this computer) after a confirmation — nothing else is ever removed. Instructions and skills of a container/sbx agent are read/written in its host folder when it exists (`Core.settingsWorkspaceOf`). |
| 32 | +- Vibe workspace trust (#125): vibe-acp ignores a folder's AGENTS.md / skills / .vibe until trusted; it reports `_meta.workspace_trust` {status, details.detected_files, available_decisions} on session/new and session/load and accepts the ACP extension `_trust/decision` {sessionId, decision}. `acp.Conn.WorkspaceTrust/TrustWorkspace` (internal/acp/trust.go); channels test them by type assertion (other agents: no notice); system messages `workspace-untrusted` (button "Trust its folder" → ChannelService.TrustFolder, then a new session) and `workspace-trusted`. Trust is the user's decision, never automatic. | ||
| 32 | - 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. | 33 | - 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. |
| 33 | - 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). | 34 | - 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). |
| 34 | - 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/`. | 35 | - 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/0120-onglet-skills-ajouter-une-skill-par-glisser-depo.yaml +23 -5 | @@ -6,7 +6,7 @@ author: | ||
| 6 | 6 | name: k33g |
| 7 | 7 | email: ph.charriere@gmail.com |
| 8 | 8 | createdAt: 2026-11-16T05:34:18.000Z |
| 9 | -updatedAt: 2026-11-16T05:34:18.000Z | |
| 9 | +updatedAt: 2026-11-16T05:49:03.000Z | |
| 10 | 10 | labels: |
| 11 | 11 | - kind::feature |
| 12 | 12 | - area::workspace |
| @@ -33,26 +33,44 @@ body: | | ||
| 33 | 33 | tasks: |
| 34 | 34 | - id: 1 |
| 35 | 35 | title: "Liste des skills comme cible de dépôt (data-file-drop-target, files:dropped) et retour visuel" |
| 36 | - state: open | |
| 36 | + state: closed | |
| 37 | 37 | priority: high |
| 38 | 38 | author: |
| 39 | 39 | name: k33g |
| 40 | 40 | email: ph.charriere@gmail.com |
| 41 | 41 | createdAt: 2026-11-16T05:34:18.000Z |
| 42 | + updatedAt: 2026-11-16T05:49:03.000Z | |
| 43 | + closedAt: 2026-11-16T05:49:03.000Z | |
| 42 | 44 | - id: 2 |
| 43 | 45 | title: "Importer chaque élément déposé avec ImportSkill ; erreurs lisibles" |
| 44 | - state: open | |
| 46 | + state: closed | |
| 45 | 47 | priority: high |
| 46 | 48 | author: |
| 47 | 49 | name: k33g |
| 48 | 50 | email: ph.charriere@gmail.com |
| 49 | 51 | createdAt: 2026-11-16T05:34:18.000Z |
| 52 | + updatedAt: 2026-11-16T05:49:03.000Z | |
| 53 | + closedAt: 2026-11-16T05:49:03.000Z | |
| 50 | 54 | - id: 3 |
| 51 | 55 | title: "Tests, doc EN + FR, notes de release" |
| 52 | - state: open | |
| 56 | + state: closed | |
| 53 | 57 | priority: medium |
| 54 | 58 | author: |
| 55 | 59 | name: k33g |
| 56 | 60 | email: ph.charriere@gmail.com |
| 57 | 61 | createdAt: 2026-11-16T05:34:18.000Z |
| 58 | -comments: [] | |
| 62 | + updatedAt: 2026-11-16T05:49:03.000Z | |
| 63 | + closedAt: 2026-11-16T05:49:03.000Z | |
| 64 | +comments: | |
| 65 | + - id: 1 | |
| 66 | + author: | |
| 67 | + name: k33g | |
| 68 | + email: ph.charriere@gmail.com | |
| 69 | + createdAt: 2026-11-16T05:49:03.000Z | |
| 70 | + body: | | |
| 71 | + Fait sur `feature/120-121-drag-and-drop`. La liste des skills est une cible `data-file-drop-target` | |
| 72 | + (`skills-drop-<agent>`, contour en pointillés pendant le survol) ; chaque élément déposé passe par `ImportSkill` ; | |
| 73 | + les refus sont listés avec leur nom et la raison en mots simples (`error.notMarkdown`, `error.notASkill`, | |
| 74 | + `error.skillExists`). Go : un fichier importé comme skill doit être un `.md` / `.markdown` (`ErrNotMarkdown`) — | |
| 75 | + vaut aussi pour « Importer un fichier Markdown… ». Tests Go + vitest (errors.ts) ; `make verify` vert. | |
| 76 | + **Non vérifié** : le dépôt lui-même (pas de Finder sous Xvfb) — l'indication s'affiche ; à tester sur le Mac. | |
| @@ -6,7 +6,7 @@ author: | |||
| 6 | name: k33g | 6 | name: k33g |
| 7 | email: ph.charriere@gmail.com | 7 | email: ph.charriere@gmail.com |
| 8 | createdAt: 2026-11-16T05:34:18.000Z | 8 | createdAt: 2026-11-16T05:34:18.000Z |
| 9 | -updatedAt: 2026-11-16T05:34:18.000Z | 9 | +updatedAt: 2026-11-16T05:49:03.000Z |
| 10 | labels: | 10 | labels: |
| 11 | - kind::feature | 11 | - kind::feature |
| 12 | - area::workspace | 12 | - area::workspace |
| @@ -33,26 +33,44 @@ body: | | |||
| 33 | tasks: | 33 | tasks: |
| 34 | - id: 1 | 34 | - id: 1 |
| 35 | title: "Liste des skills comme cible de dépôt (data-file-drop-target, files:dropped) et retour visuel" | 35 | title: "Liste des skills comme cible de dépôt (data-file-drop-target, files:dropped) et retour visuel" |
| 36 | - state: open | 36 | + state: closed |
| 37 | priority: high | 37 | priority: high |
| 38 | author: | 38 | author: |
| 39 | name: k33g | 39 | name: k33g |
| 40 | email: ph.charriere@gmail.com | 40 | email: ph.charriere@gmail.com |
| 41 | createdAt: 2026-11-16T05:34:18.000Z | 41 | createdAt: 2026-11-16T05:34:18.000Z |
| 42 | + updatedAt: 2026-11-16T05:49:03.000Z | ||
| 43 | + closedAt: 2026-11-16T05:49:03.000Z | ||
| 42 | - id: 2 | 44 | - id: 2 |
| 43 | title: "Importer chaque élément déposé avec ImportSkill ; erreurs lisibles" | 45 | title: "Importer chaque élément déposé avec ImportSkill ; erreurs lisibles" |
| 44 | - state: open | 46 | + state: closed |
| 45 | priority: high | 47 | priority: high |
| 46 | author: | 48 | author: |
| 47 | name: k33g | 49 | name: k33g |
| 48 | email: ph.charriere@gmail.com | 50 | email: ph.charriere@gmail.com |
| 49 | createdAt: 2026-11-16T05:34:18.000Z | 51 | createdAt: 2026-11-16T05:34:18.000Z |
| 52 | + updatedAt: 2026-11-16T05:49:03.000Z | ||
| 53 | + closedAt: 2026-11-16T05:49:03.000Z | ||
| 50 | - id: 3 | 54 | - id: 3 |
| 51 | title: "Tests, doc EN + FR, notes de release" | 55 | title: "Tests, doc EN + FR, notes de release" |
| 52 | - state: open | 56 | + state: closed |
| 53 | priority: medium | 57 | priority: medium |
| 54 | author: | 58 | author: |
| 55 | name: k33g | 59 | name: k33g |
| 56 | email: ph.charriere@gmail.com | 60 | email: ph.charriere@gmail.com |
| 57 | createdAt: 2026-11-16T05:34:18.000Z | 61 | createdAt: 2026-11-16T05:34:18.000Z |
| 58 | -comments: [] | 62 | + updatedAt: 2026-11-16T05:49:03.000Z |
| 63 | + closedAt: 2026-11-16T05:49:03.000Z | ||
| 64 | +comments: | ||
| 65 | + - id: 1 | ||
| 66 | + author: | ||
| 67 | + name: k33g | ||
| 68 | + email: ph.charriere@gmail.com | ||
| 69 | + createdAt: 2026-11-16T05:49:03.000Z | ||
| 70 | + body: | | ||
| 71 | + Fait sur `feature/120-121-drag-and-drop`. La liste des skills est une cible `data-file-drop-target` | ||
| 72 | + (`skills-drop-<agent>`, contour en pointillés pendant le survol) ; chaque élément déposé passe par `ImportSkill` ; | ||
| 73 | + les refus sont listés avec leur nom et la raison en mots simples (`error.notMarkdown`, `error.notASkill`, | ||
| 74 | + `error.skillExists`). Go : un fichier importé comme skill doit être un `.md` / `.markdown` (`ErrNotMarkdown`) — | ||
| 75 | + vaut aussi pour « Importer un fichier Markdown… ». Tests Go + vitest (errors.ts) ; `make verify` vert. | ||
| 76 | + **Non vérifié** : le dépôt lui-même (pas de Finder sous Xvfb) — l'indication s'affiche ; à tester sur le Mac. | ||
modified
.tickets/issues/0121-onglet-instructions-ajouter-agents-md-par-glisse.yaml +22 -5 | @@ -6,7 +6,7 @@ author: | ||
| 6 | 6 | name: k33g |
| 7 | 7 | email: ph.charriere@gmail.com |
| 8 | 8 | createdAt: 2026-11-16T05:34:18.000Z |
| 9 | -updatedAt: 2026-11-16T05:34:18.000Z | |
| 9 | +updatedAt: 2026-11-16T05:49:03.000Z | |
| 10 | 10 | labels: |
| 11 | 11 | - kind::feature |
| 12 | 12 | - area::workspace |
| @@ -33,26 +33,43 @@ body: | | ||
| 33 | 33 | tasks: |
| 34 | 34 | - id: 1 |
| 35 | 35 | title: "Onglet Instructions comme cible de dépôt, retour visuel, confirmation si des instructions existent" |
| 36 | - state: open | |
| 36 | + state: closed | |
| 37 | 37 | priority: high |
| 38 | 38 | author: |
| 39 | 39 | name: k33g |
| 40 | 40 | email: ph.charriere@gmail.com |
| 41 | 41 | createdAt: 2026-11-16T05:34:18.000Z |
| 42 | + updatedAt: 2026-11-16T05:49:03.000Z | |
| 43 | + closedAt: 2026-11-16T05:49:03.000Z | |
| 42 | 44 | - id: 2 |
| 43 | 45 | title: "Importer le fichier déposé avec ImportInstructions ; refus lisibles (dossier, binaire, plusieurs fichiers)" |
| 44 | - state: open | |
| 46 | + state: closed | |
| 45 | 47 | priority: high |
| 46 | 48 | author: |
| 47 | 49 | name: k33g |
| 48 | 50 | email: ph.charriere@gmail.com |
| 49 | 51 | createdAt: 2026-11-16T05:34:18.000Z |
| 52 | + updatedAt: 2026-11-16T05:49:03.000Z | |
| 53 | + closedAt: 2026-11-16T05:49:03.000Z | |
| 50 | 54 | - id: 3 |
| 51 | 55 | title: "Tests, doc EN + FR, notes de release" |
| 52 | - state: open | |
| 56 | + state: closed | |
| 53 | 57 | priority: medium |
| 54 | 58 | author: |
| 55 | 59 | name: k33g |
| 56 | 60 | email: ph.charriere@gmail.com |
| 57 | 61 | createdAt: 2026-11-16T05:34:18.000Z |
| 58 | -comments: [] | |
| 62 | + updatedAt: 2026-11-16T05:49:03.000Z | |
| 63 | + closedAt: 2026-11-16T05:49:03.000Z | |
| 64 | +comments: | |
| 65 | + - id: 1 | |
| 66 | + author: | |
| 67 | + name: k33g | |
| 68 | + email: ph.charriere@gmail.com | |
| 69 | + createdAt: 2026-11-16T05:49:03.000Z | |
| 70 | + body: | | |
| 71 | + Fait sur `feature/120-121-drag-and-drop`. Tout l'onglet Instructions est une cible (`instructions-drop-<agent>`) ; | |
| 72 | + un seul fichier accepté (sinon « Déposez un seul fichier ») ; s'il y a déjà des instructions, une confirmation | |
| 73 | + « <fichier> remplace AGENTS.md » avant `ImportInstructions` ; un dossier ou un binaire est refusé en mots simples | |
| 74 | + (`error.notText`). Indication « Vous pouvez aussi déposer un fichier texte ». `make verify` vert. | |
| 75 | + **Non vérifié** : le dépôt lui-même (pas de Finder sous Xvfb) ; à tester sur le Mac. | |
| @@ -6,7 +6,7 @@ author: | |||
| 6 | name: k33g | 6 | name: k33g |
| 7 | email: ph.charriere@gmail.com | 7 | email: ph.charriere@gmail.com |
| 8 | createdAt: 2026-11-16T05:34:18.000Z | 8 | createdAt: 2026-11-16T05:34:18.000Z |
| 9 | -updatedAt: 2026-11-16T05:34:18.000Z | 9 | +updatedAt: 2026-11-16T05:49:03.000Z |
| 10 | labels: | 10 | labels: |
| 11 | - kind::feature | 11 | - kind::feature |
| 12 | - area::workspace | 12 | - area::workspace |
| @@ -33,26 +33,43 @@ body: | | |||
| 33 | tasks: | 33 | tasks: |
| 34 | - id: 1 | 34 | - id: 1 |
| 35 | title: "Onglet Instructions comme cible de dépôt, retour visuel, confirmation si des instructions existent" | 35 | title: "Onglet Instructions comme cible de dépôt, retour visuel, confirmation si des instructions existent" |
| 36 | - state: open | 36 | + state: closed |
| 37 | priority: high | 37 | priority: high |
| 38 | author: | 38 | author: |
| 39 | name: k33g | 39 | name: k33g |
| 40 | email: ph.charriere@gmail.com | 40 | email: ph.charriere@gmail.com |
| 41 | createdAt: 2026-11-16T05:34:18.000Z | 41 | createdAt: 2026-11-16T05:34:18.000Z |
| 42 | + updatedAt: 2026-11-16T05:49:03.000Z | ||
| 43 | + closedAt: 2026-11-16T05:49:03.000Z | ||
| 42 | - id: 2 | 44 | - id: 2 |
| 43 | title: "Importer le fichier déposé avec ImportInstructions ; refus lisibles (dossier, binaire, plusieurs fichiers)" | 45 | title: "Importer le fichier déposé avec ImportInstructions ; refus lisibles (dossier, binaire, plusieurs fichiers)" |
| 44 | - state: open | 46 | + state: closed |
| 45 | priority: high | 47 | priority: high |
| 46 | author: | 48 | author: |
| 47 | name: k33g | 49 | name: k33g |
| 48 | email: ph.charriere@gmail.com | 50 | email: ph.charriere@gmail.com |
| 49 | createdAt: 2026-11-16T05:34:18.000Z | 51 | createdAt: 2026-11-16T05:34:18.000Z |
| 52 | + updatedAt: 2026-11-16T05:49:03.000Z | ||
| 53 | + closedAt: 2026-11-16T05:49:03.000Z | ||
| 50 | - id: 3 | 54 | - id: 3 |
| 51 | title: "Tests, doc EN + FR, notes de release" | 55 | title: "Tests, doc EN + FR, notes de release" |
| 52 | - state: open | 56 | + state: closed |
| 53 | priority: medium | 57 | priority: medium |
| 54 | author: | 58 | author: |
| 55 | name: k33g | 59 | name: k33g |
| 56 | email: ph.charriere@gmail.com | 60 | email: ph.charriere@gmail.com |
| 57 | createdAt: 2026-11-16T05:34:18.000Z | 61 | createdAt: 2026-11-16T05:34:18.000Z |
| 58 | -comments: [] | 62 | + updatedAt: 2026-11-16T05:49:03.000Z |
| 63 | + closedAt: 2026-11-16T05:49:03.000Z | ||
| 64 | +comments: | ||
| 65 | + - id: 1 | ||
| 66 | + author: | ||
| 67 | + name: k33g | ||
| 68 | + email: ph.charriere@gmail.com | ||
| 69 | + createdAt: 2026-11-16T05:49:03.000Z | ||
| 70 | + body: | | ||
| 71 | + Fait sur `feature/120-121-drag-and-drop`. Tout l'onglet Instructions est une cible (`instructions-drop-<agent>`) ; | ||
| 72 | + un seul fichier accepté (sinon « Déposez un seul fichier ») ; s'il y a déjà des instructions, une confirmation | ||
| 73 | + « <fichier> remplace AGENTS.md » avant `ImportInstructions` ; un dossier ou un binaire est refusé en mots simples | ||
| 74 | + (`error.notText`). Indication « Vous pouvez aussi déposer un fichier texte ». `make verify` vert. | ||
| 75 | + **Non vérifié** : le dépôt lui-même (pas de Finder sous Xvfb) ; à tester sur le Mac. | ||
added
.tickets/issues/0123-etude-comment-acp-et-mcp-fonctionnent-ensemble.yaml +81 -0 | new file mode 100644 | ||
| @@ -0,0 +1,81 @@ | ||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | |
| 2 | +id: 123 | |
| 3 | +title: "Étude : comment ACP et MCP fonctionnent ensemble" | |
| 4 | +state: open | |
| 5 | +author: | |
| 6 | + name: k33g | |
| 7 | + email: ph.charriere@gmail.com | |
| 8 | +createdAt: 2026-11-16T05:50:08.000Z | |
| 9 | +updatedAt: 2026-11-16T05:50:08.000Z | |
| 10 | +labels: | |
| 11 | + - kind::spike | |
| 12 | + - area::acp | |
| 13 | + - real-agents | |
| 14 | +milestone: "v1.8.0 · Release" | |
| 15 | +epic: Client ACP | |
| 16 | +related: | |
| 17 | + - 90 | |
| 18 | + - 114 | |
| 19 | + - 115 | |
| 20 | + - 124 | |
| 21 | +body: | | |
| 22 | + Comprendre comment **ACP** (le protocole entre Sidekicks et les agents) et **MCP** (le protocole entre un agent et des | |
| 23 | + serveurs d'outils) s'articulent, pour savoir ce que Sidekicks peut offrir aux agents par MCP — base des études | |
| 24 | + [#114](.tickets/issues/0114-reflexion-permettre-aux-agents-de-travailler-sur.yaml) (documents communs) et | |
| 25 | + [#115](.tickets/issues/0115-reflexion-permettre-aux-agents-d-interagir-avec.yaml) (applications et services). | |
| 26 | + | |
| 27 | + ## Ce que l'on sait déjà (à vérifier dans la spec ACP v1 et le SDK `coder/acp-go-sdk` v0.13.5) | |
| 28 | + - À `session/new` (et `session/load`), le client passe une liste `mcpServers` : les serveurs MCP que l'agent | |
| 29 | + doit joindre pour cette session (stdio : commande + arguments + env ; HTTP / SSE : URL + en-têtes). | |
| 30 | + - À `initialize`, l'agent annonce ses `mcpCapabilities` (`http`, `sse`) : stdio seul sinon. | |
| 31 | + - Sidekicks passe aujourd'hui `mcpServers` vide ; mini-me l'ignore (relevé dans `.memory/summary.md`) ; les outils | |
| 32 | + de Sidekicks passent par les méthodes d'extension `org.mini-me/tools` ([#90](.tickets/issues/0090-proposer-des-outils-aux-agents-en-tant-que-clien.yaml)). | |
| 33 | + - Un serveur MCP stdio est **lancé par l'agent**, donc dans son conteneur ou sa sandbox : un serveur qui doit agir | |
| 34 | + sur le Mac doit être joint en HTTP, ou passer par Sidekicks. | |
| 35 | + | |
| 36 | + ## Questions | |
| 37 | + - Que fait chaque agent de `mcpServers` (mini-me, Claude via `claude-agent-acp`, Codex, Antigravity, Vibe, | |
| 38 | + Copilot) : stdio, HTTP, SSE ? les outils apparaissent-ils comme tool calls ACP (permissions, cartes) ? | |
| 39 | + - Depuis une sandbox ou un conteneur, comment joindre un serveur MCP HTTP du Mac (réseau, `host.docker.internal`, | |
| 40 | + règles sbx) ? | |
| 41 | + - Sidekicks comme **serveur MCP** (HTTP local) qui expose ses outils (pression mémoire, channels, historique, | |
| 42 | + documents communs…) à tous les agents, à la place ou en plus de `org.mini-me/tools` ? | |
| 43 | + - Où l'utilisateur déclare ses serveurs MCP (configuration par agent, par channel, globale) ? | |
| 44 | + | |
| 45 | + ## Livrable | |
| 46 | + Une note (ADR) : ce que dit la spec, ce que fait chaque agent (essais réels, traces comme `docs/spikes/acp`), | |
| 47 | + les options pour Sidekicks, une recommandation et les tickets d'implémentation. | |
| 48 | +tasks: | |
| 49 | + - id: 1 | |
| 50 | + title: "Relire la spec ACP v1 (mcpServers, mcpCapabilities) et le SDK acp-go-sdk" | |
| 51 | + state: open | |
| 52 | + priority: high | |
| 53 | + author: | |
| 54 | + name: k33g | |
| 55 | + email: ph.charriere@gmail.com | |
| 56 | + createdAt: 2026-11-16T05:50:08.000Z | |
| 57 | + - id: 2 | |
| 58 | + title: "Essayer mcpServers avec chaque agent (stdio, HTTP), en local et en sandbox ; tracer" | |
| 59 | + state: open | |
| 60 | + priority: high | |
| 61 | + author: | |
| 62 | + name: k33g | |
| 63 | + email: ph.charriere@gmail.com | |
| 64 | + createdAt: 2026-11-16T05:50:08.000Z | |
| 65 | + - id: 3 | |
| 66 | + title: "Évaluer Sidekicks comme serveur MCP HTTP pour ses outils ; joignable depuis conteneur et sandbox" | |
| 67 | + state: open | |
| 68 | + priority: high | |
| 69 | + author: | |
| 70 | + name: k33g | |
| 71 | + email: ph.charriere@gmail.com | |
| 72 | + createdAt: 2026-11-16T05:50:08.000Z | |
| 73 | + - id: 4 | |
| 74 | + title: "ADR + recommandation + tickets d'implémentation" | |
| 75 | + state: open | |
| 76 | + priority: medium | |
| 77 | + author: | |
| 78 | + name: k33g | |
| 79 | + email: ph.charriere@gmail.com | |
| 80 | + createdAt: 2026-11-16T05:50:08.000Z | |
| 81 | +comments: [] | |
| new file mode 100644 | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | ||
| 2 | +id: 123 | ||
| 3 | +title: "Étude : comment ACP et MCP fonctionnent ensemble" | ||
| 4 | +state: open | ||
| 5 | +author: | ||
| 6 | + name: k33g | ||
| 7 | + email: ph.charriere@gmail.com | ||
| 8 | +createdAt: 2026-11-16T05:50:08.000Z | ||
| 9 | +updatedAt: 2026-11-16T05:50:08.000Z | ||
| 10 | +labels: | ||
| 11 | + - kind::spike | ||
| 12 | + - area::acp | ||
| 13 | + - real-agents | ||
| 14 | +milestone: "v1.8.0 · Release" | ||
| 15 | +epic: Client ACP | ||
| 16 | +related: | ||
| 17 | + - 90 | ||
| 18 | + - 114 | ||
| 19 | + - 115 | ||
| 20 | + - 124 | ||
| 21 | +body: | | ||
| 22 | + Comprendre comment **ACP** (le protocole entre Sidekicks et les agents) et **MCP** (le protocole entre un agent et des | ||
| 23 | + serveurs d'outils) s'articulent, pour savoir ce que Sidekicks peut offrir aux agents par MCP — base des études | ||
| 24 | + [#114](.tickets/issues/0114-reflexion-permettre-aux-agents-de-travailler-sur.yaml) (documents communs) et | ||
| 25 | + [#115](.tickets/issues/0115-reflexion-permettre-aux-agents-d-interagir-avec.yaml) (applications et services). | ||
| 26 | + | ||
| 27 | + ## Ce que l'on sait déjà (à vérifier dans la spec ACP v1 et le SDK `coder/acp-go-sdk` v0.13.5) | ||
| 28 | + - À `session/new` (et `session/load`), le client passe une liste `mcpServers` : les serveurs MCP que l'agent | ||
| 29 | + doit joindre pour cette session (stdio : commande + arguments + env ; HTTP / SSE : URL + en-têtes). | ||
| 30 | + - À `initialize`, l'agent annonce ses `mcpCapabilities` (`http`, `sse`) : stdio seul sinon. | ||
| 31 | + - Sidekicks passe aujourd'hui `mcpServers` vide ; mini-me l'ignore (relevé dans `.memory/summary.md`) ; les outils | ||
| 32 | + de Sidekicks passent par les méthodes d'extension `org.mini-me/tools` ([#90](.tickets/issues/0090-proposer-des-outils-aux-agents-en-tant-que-clien.yaml)). | ||
| 33 | + - Un serveur MCP stdio est **lancé par l'agent**, donc dans son conteneur ou sa sandbox : un serveur qui doit agir | ||
| 34 | + sur le Mac doit être joint en HTTP, ou passer par Sidekicks. | ||
| 35 | + | ||
| 36 | + ## Questions | ||
| 37 | + - Que fait chaque agent de `mcpServers` (mini-me, Claude via `claude-agent-acp`, Codex, Antigravity, Vibe, | ||
| 38 | + Copilot) : stdio, HTTP, SSE ? les outils apparaissent-ils comme tool calls ACP (permissions, cartes) ? | ||
| 39 | + - Depuis une sandbox ou un conteneur, comment joindre un serveur MCP HTTP du Mac (réseau, `host.docker.internal`, | ||
| 40 | + règles sbx) ? | ||
| 41 | + - Sidekicks comme **serveur MCP** (HTTP local) qui expose ses outils (pression mémoire, channels, historique, | ||
| 42 | + documents communs…) à tous les agents, à la place ou en plus de `org.mini-me/tools` ? | ||
| 43 | + - Où l'utilisateur déclare ses serveurs MCP (configuration par agent, par channel, globale) ? | ||
| 44 | + | ||
| 45 | + ## Livrable | ||
| 46 | + Une note (ADR) : ce que dit la spec, ce que fait chaque agent (essais réels, traces comme `docs/spikes/acp`), | ||
| 47 | + les options pour Sidekicks, une recommandation et les tickets d'implémentation. | ||
| 48 | +tasks: | ||
| 49 | + - id: 1 | ||
| 50 | + title: "Relire la spec ACP v1 (mcpServers, mcpCapabilities) et le SDK acp-go-sdk" | ||
| 51 | + state: open | ||
| 52 | + priority: high | ||
| 53 | + author: | ||
| 54 | + name: k33g | ||
| 55 | + email: ph.charriere@gmail.com | ||
| 56 | + createdAt: 2026-11-16T05:50:08.000Z | ||
| 57 | + - id: 2 | ||
| 58 | + title: "Essayer mcpServers avec chaque agent (stdio, HTTP), en local et en sandbox ; tracer" | ||
| 59 | + state: open | ||
| 60 | + priority: high | ||
| 61 | + author: | ||
| 62 | + name: k33g | ||
| 63 | + email: ph.charriere@gmail.com | ||
| 64 | + createdAt: 2026-11-16T05:50:08.000Z | ||
| 65 | + - id: 3 | ||
| 66 | + title: "Évaluer Sidekicks comme serveur MCP HTTP pour ses outils ; joignable depuis conteneur et sandbox" | ||
| 67 | + state: open | ||
| 68 | + priority: high | ||
| 69 | + author: | ||
| 70 | + name: k33g | ||
| 71 | + email: ph.charriere@gmail.com | ||
| 72 | + createdAt: 2026-11-16T05:50:08.000Z | ||
| 73 | + - id: 4 | ||
| 74 | + title: "ADR + recommandation + tickets d'implémentation" | ||
| 75 | + state: open | ||
| 76 | + priority: medium | ||
| 77 | + author: | ||
| 78 | + name: k33g | ||
| 79 | + email: ph.charriere@gmail.com | ||
| 80 | + createdAt: 2026-11-16T05:50:08.000Z | ||
| 81 | +comments: [] | ||
added
.tickets/issues/0124-etude-utiliser-la-mcp-gateway-de-sbx.yaml +77 -0 | new file mode 100644 | ||
| @@ -0,0 +1,77 @@ | ||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | |
| 2 | +id: 124 | |
| 3 | +title: "Étude : utiliser la MCP Gateway de sbx" | |
| 4 | +state: open | |
| 5 | +author: | |
| 6 | + name: k33g | |
| 7 | + email: ph.charriere@gmail.com | |
| 8 | +createdAt: 2026-11-16T05:50:08.000Z | |
| 9 | +updatedAt: 2026-11-16T05:50:08.000Z | |
| 10 | +labels: | |
| 11 | + - kind::spike | |
| 12 | + - area::acp | |
| 13 | + - real-agents | |
| 14 | +milestone: "v1.8.0 · Release" | |
| 15 | +epic: Docker SBX | |
| 16 | +related: | |
| 17 | + - 115 | |
| 18 | + - 123 | |
| 19 | +body: | | |
| 20 | + Voir comment les agents de Sidekicks qui tournent dans une **Docker Sandbox** peuvent utiliser la **MCP Gateway** | |
| 21 | + de sbx : des serveurs MCP choisis par l'utilisateur, lancés et gardés hors de la sandbox, avec leurs secrets gardés | |
| 22 | + par sbx — sans les installer dans chaque sandbox. | |
| 23 | + | |
| 24 | + ## Ce que l'on sait déjà (page du kit `sbx/copilot-kit`, relevée pour #103 ; à vérifier dans la doc sbx) | |
| 25 | + - Quand une MCP Gateway est réservée pour une sandbox, `sandboxd` injecte `MCP_GATEWAY_URL` et | |
| 26 | + `MCP_SENTINEL_TOKEN_NAME` dans la sandbox ; le hook de démarrage du kit Copilot écrit | |
| 27 | + `~/.copilot/mcp-config.json` pour pointer l'agent vers la gateway (entrée `mcp-gateway`), à chaque démarrage. | |
| 28 | + - L'agent joint donc la gateway en HTTP depuis la sandbox ; les secrets restent côté sbx (comme les clés d'API). | |
| 29 | + | |
| 30 | + ## Questions | |
| 31 | + - Comment on réserve une gateway et on y ajoute des serveurs (commandes `sbx`, `sbxenv.yaml`, catalogue MCP de | |
| 32 | + Docker) ? Quels serveurs sont disponibles ? | |
| 33 | + - Quels kits la branchent tout seuls (Copilot ; Claude, Codex, Antigravity, Vibe, mini-me ?) ; sinon, Sidekicks peut-il | |
| 34 | + la passer à l'agent par ACP (`mcpServers` HTTP à `session/new`, voir | |
| 35 | + [#123](.tickets/issues/0123-etude-comment-acp-et-mcp-fonctionnent-ensemble.yaml)) ? | |
| 36 | + - Ce que l'utilisateur voit dans Sidekicks : choisir des serveurs MCP pour un agent dans l'assistant des sandboxes ou | |
| 37 | + sa vue, les secrets demandés comme les clés d'API, les appels d'outils et leurs permissions. | |
| 38 | + - Lien avec [#115](.tickets/issues/0115-reflexion-permettre-aux-agents-d-interagir-avec.yaml) : la gateway comme moyen | |
| 39 | + d'atteindre des applications et des services sans ouvrir la sandbox. | |
| 40 | + | |
| 41 | + ## Livrable | |
| 42 | + Une note (ADR) : comment marche la gateway, ce que chaque kit en fait, un essai réel avec un serveur (sur le Mac), | |
| 43 | + une proposition d'interface et les tickets d'implémentation. | |
| 44 | +tasks: | |
| 45 | + - id: 1 | |
| 46 | + title: "Lire la doc sbx de la MCP Gateway (réservation, serveurs, secrets, réseau)" | |
| 47 | + state: open | |
| 48 | + priority: high | |
| 49 | + author: | |
| 50 | + name: k33g | |
| 51 | + email: ph.charriere@gmail.com | |
| 52 | + createdAt: 2026-11-16T05:50:08.000Z | |
| 53 | + - id: 2 | |
| 54 | + title: "Essayer sur le Mac : une sandbox Copilot avec un serveur MCP par la gateway ; relever ce que voit l'agent" | |
| 55 | + state: open | |
| 56 | + priority: high | |
| 57 | + author: | |
| 58 | + name: k33g | |
| 59 | + email: ph.charriere@gmail.com | |
| 60 | + createdAt: 2026-11-16T05:50:08.000Z | |
| 61 | + - id: 3 | |
| 62 | + title: "Voir quels kits la branchent, et la passer par mcpServers (ACP) sinon" | |
| 63 | + state: open | |
| 64 | + priority: high | |
| 65 | + author: | |
| 66 | + name: k33g | |
| 67 | + email: ph.charriere@gmail.com | |
| 68 | + createdAt: 2026-11-16T05:50:08.000Z | |
| 69 | + - id: 4 | |
| 70 | + title: "ADR + proposition d'interface + tickets d'implémentation" | |
| 71 | + state: open | |
| 72 | + priority: medium | |
| 73 | + author: | |
| 74 | + name: k33g | |
| 75 | + email: ph.charriere@gmail.com | |
| 76 | + createdAt: 2026-11-16T05:50:08.000Z | |
| 77 | +comments: [] | |
| new file mode 100644 | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | ||
| 2 | +id: 124 | ||
| 3 | +title: "Étude : utiliser la MCP Gateway de sbx" | ||
| 4 | +state: open | ||
| 5 | +author: | ||
| 6 | + name: k33g | ||
| 7 | + email: ph.charriere@gmail.com | ||
| 8 | +createdAt: 2026-11-16T05:50:08.000Z | ||
| 9 | +updatedAt: 2026-11-16T05:50:08.000Z | ||
| 10 | +labels: | ||
| 11 | + - kind::spike | ||
| 12 | + - area::acp | ||
| 13 | + - real-agents | ||
| 14 | +milestone: "v1.8.0 · Release" | ||
| 15 | +epic: Docker SBX | ||
| 16 | +related: | ||
| 17 | + - 115 | ||
| 18 | + - 123 | ||
| 19 | +body: | | ||
| 20 | + Voir comment les agents de Sidekicks qui tournent dans une **Docker Sandbox** peuvent utiliser la **MCP Gateway** | ||
| 21 | + de sbx : des serveurs MCP choisis par l'utilisateur, lancés et gardés hors de la sandbox, avec leurs secrets gardés | ||
| 22 | + par sbx — sans les installer dans chaque sandbox. | ||
| 23 | + | ||
| 24 | + ## Ce que l'on sait déjà (page du kit `sbx/copilot-kit`, relevée pour #103 ; à vérifier dans la doc sbx) | ||
| 25 | + - Quand une MCP Gateway est réservée pour une sandbox, `sandboxd` injecte `MCP_GATEWAY_URL` et | ||
| 26 | + `MCP_SENTINEL_TOKEN_NAME` dans la sandbox ; le hook de démarrage du kit Copilot écrit | ||
| 27 | + `~/.copilot/mcp-config.json` pour pointer l'agent vers la gateway (entrée `mcp-gateway`), à chaque démarrage. | ||
| 28 | + - L'agent joint donc la gateway en HTTP depuis la sandbox ; les secrets restent côté sbx (comme les clés d'API). | ||
| 29 | + | ||
| 30 | + ## Questions | ||
| 31 | + - Comment on réserve une gateway et on y ajoute des serveurs (commandes `sbx`, `sbxenv.yaml`, catalogue MCP de | ||
| 32 | + Docker) ? Quels serveurs sont disponibles ? | ||
| 33 | + - Quels kits la branchent tout seuls (Copilot ; Claude, Codex, Antigravity, Vibe, mini-me ?) ; sinon, Sidekicks peut-il | ||
| 34 | + la passer à l'agent par ACP (`mcpServers` HTTP à `session/new`, voir | ||
| 35 | + [#123](.tickets/issues/0123-etude-comment-acp-et-mcp-fonctionnent-ensemble.yaml)) ? | ||
| 36 | + - Ce que l'utilisateur voit dans Sidekicks : choisir des serveurs MCP pour un agent dans l'assistant des sandboxes ou | ||
| 37 | + sa vue, les secrets demandés comme les clés d'API, les appels d'outils et leurs permissions. | ||
| 38 | + - Lien avec [#115](.tickets/issues/0115-reflexion-permettre-aux-agents-d-interagir-avec.yaml) : la gateway comme moyen | ||
| 39 | + d'atteindre des applications et des services sans ouvrir la sandbox. | ||
| 40 | + | ||
| 41 | + ## Livrable | ||
| 42 | + Une note (ADR) : comment marche la gateway, ce que chaque kit en fait, un essai réel avec un serveur (sur le Mac), | ||
| 43 | + une proposition d'interface et les tickets d'implémentation. | ||
| 44 | +tasks: | ||
| 45 | + - id: 1 | ||
| 46 | + title: "Lire la doc sbx de la MCP Gateway (réservation, serveurs, secrets, réseau)" | ||
| 47 | + state: open | ||
| 48 | + priority: high | ||
| 49 | + author: | ||
| 50 | + name: k33g | ||
| 51 | + email: ph.charriere@gmail.com | ||
| 52 | + createdAt: 2026-11-16T05:50:08.000Z | ||
| 53 | + - id: 2 | ||
| 54 | + title: "Essayer sur le Mac : une sandbox Copilot avec un serveur MCP par la gateway ; relever ce que voit l'agent" | ||
| 55 | + state: open | ||
| 56 | + priority: high | ||
| 57 | + author: | ||
| 58 | + name: k33g | ||
| 59 | + email: ph.charriere@gmail.com | ||
| 60 | + createdAt: 2026-11-16T05:50:08.000Z | ||
| 61 | + - id: 3 | ||
| 62 | + title: "Voir quels kits la branchent, et la passer par mcpServers (ACP) sinon" | ||
| 63 | + state: open | ||
| 64 | + priority: high | ||
| 65 | + author: | ||
| 66 | + name: k33g | ||
| 67 | + email: ph.charriere@gmail.com | ||
| 68 | + createdAt: 2026-11-16T05:50:08.000Z | ||
| 69 | + - id: 4 | ||
| 70 | + title: "ADR + proposition d'interface + tickets d'implémentation" | ||
| 71 | + state: open | ||
| 72 | + priority: medium | ||
| 73 | + author: | ||
| 74 | + name: k33g | ||
| 75 | + email: ph.charriere@gmail.com | ||
| 76 | + createdAt: 2026-11-16T05:50:08.000Z | ||
| 77 | +comments: [] | ||
added
.tickets/issues/0125-vibe-faire-confiance-au-dossier-de-l-agent-pour.yaml +91 -0 | new file mode 100644 | ||
| @@ -0,0 +1,91 @@ | ||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | |
| 2 | +id: 125 | |
| 3 | +title: "Vibe : faire confiance au dossier de l'agent pour qu'il lise ses instructions et ses skills" | |
| 4 | +state: open | |
| 5 | +author: | |
| 6 | + name: k33g | |
| 7 | + email: ph.charriere@gmail.com | |
| 8 | +createdAt: 2026-11-16T06:41:57.000Z | |
| 9 | +updatedAt: 2026-11-16T06:41:57.000Z | |
| 10 | +labels: | |
| 11 | + - kind::bug | |
| 12 | + - area::acp | |
| 13 | + - citizen-ux | |
| 14 | + - real-agents | |
| 15 | +milestone: "v1.7.0 · Release" | |
| 16 | +epic: Agents | |
| 17 | +related: | |
| 18 | + - 86 | |
| 19 | + - 112 | |
| 20 | + - 113 | |
| 21 | +body: | | |
| 22 | + Relevé par l'owner : les skills marchent pour Claude, Antigravity et Codex, mais **Vibe ne les reconnaît pas**. | |
| 23 | + | |
| 24 | + ## Cause (doc et code source de Mistral Vibe) | |
| 25 | + - Vibe ne charge la configuration d'un projet — `AGENTS.md`, `.vibe/skills`, `.agents/skills`, `.vibe/` — que | |
| 26 | + dans un **dossier de confiance** ; sinon il l'ignore. La confiance est gardée dans `~/.vibe/trusted_folders.toml` | |
| 27 | + (dans la sandbox) ; `vibe --trust` (utilisé par le kit) ne vaut que pour une exécution ; `vibe-acp` n'a pas | |
| 28 | + d'option `--trust` et ne demande rien. | |
| 29 | + - `vibe-acp` dit l'état du dossier dans le `_meta` de la réponse à `session/new` / `session/load` : | |
| 30 | + `workspace_trust: {status: trusted|session|untrusted, details: {detected_files, available_decisions…}}` (les | |
| 31 | + détails seulement quand le dossier contient ces fichiers), et accepte la méthode d'extension ACP | |
| 32 | + **`_trust/decision`** `{sessionId, decision: trust_cwd|trust_repo|decline}` — décision persistante, liée au | |
| 33 | + dossier de la session. | |
| 34 | + | |
| 35 | + ## Solution | |
| 36 | + Quand une session s'ouvre sur un dossier non fiable qui contient ces fichiers, un message dans la conversation le | |
| 37 | + dit (avec la liste) et propose **Faire confiance à son dossier** ; Sidekicks envoie `_trust/decision` | |
| 38 | + (`trust_cwd`, sinon `trust_repo`) et ouvre une nouvelle session à la réponse suivante, que Vibe lit avec ses | |
| 39 | + instructions et ses skills. La décision reste à l'utilisateur (les réglages `.vibe/` du dossier s'appliquent aussi). | |
| 40 | +tasks: | |
| 41 | + - id: 1 | |
| 42 | + title: "acp : lire workspace_trust dans le _meta de session/new et session/load ; TrustWorkspace (_trust/decision)" | |
| 43 | + state: closed | |
| 44 | + priority: high | |
| 45 | + author: | |
| 46 | + name: k33g | |
| 47 | + email: ph.charriere@gmail.com | |
| 48 | + createdAt: 2026-11-16T06:41:57.000Z | |
| 49 | + updatedAt: 2026-11-16T06:41:57.000Z | |
| 50 | + closedAt: 2026-11-16T06:41:57.000Z | |
| 51 | + - id: 2 | |
| 52 | + title: "channels : avis workspace-untrusted, TrustFolder (décision puis nouvelle session), message workspace-trusted" | |
| 53 | + state: closed | |
| 54 | + priority: high | |
| 55 | + author: | |
| 56 | + name: k33g | |
| 57 | + email: ph.charriere@gmail.com | |
| 58 | + createdAt: 2026-11-16T06:41:57.000Z | |
| 59 | + updatedAt: 2026-11-16T06:41:57.000Z | |
| 60 | + closedAt: 2026-11-16T06:41:57.000Z | |
| 61 | + - id: 3 | |
| 62 | + title: "Conversation : message et bouton « Faire confiance à son dossier » (EN + FR) ; tests ; doc ; notes v1.7.0" | |
| 63 | + state: closed | |
| 64 | + priority: high | |
| 65 | + author: | |
| 66 | + name: k33g | |
| 67 | + email: ph.charriere@gmail.com | |
| 68 | + createdAt: 2026-11-16T06:41:57.000Z | |
| 69 | + updatedAt: 2026-11-16T06:41:57.000Z | |
| 70 | + closedAt: 2026-11-16T06:41:57.000Z | |
| 71 | + - id: 4 | |
| 72 | + title: "Tester sur le Mac avec un vrai agent Vibe en sandbox (skills et AGENTS.md lus après la confiance)" | |
| 73 | + state: open | |
| 74 | + priority: high | |
| 75 | + author: | |
| 76 | + name: k33g | |
| 77 | + email: ph.charriere@gmail.com | |
| 78 | + createdAt: 2026-11-16T06:41:57.000Z | |
| 79 | +comments: | |
| 80 | + - id: 1 | |
| 81 | + author: | |
| 82 | + name: k33g | |
| 83 | + email: ph.charriere@gmail.com | |
| 84 | + createdAt: 2026-11-16T06:41:57.000Z | |
| 85 | + body: | | |
| 86 | + Fait sur `feature/125-vibe-trust` (branche partie de `feature/120-121-drag-and-drop`, non commitée : elle porte | |
| 87 | + aussi #120, #121, #123, #124). `acp.WorkspaceTrust` / `Conn.TrustWorkspace` (`internal/acp/trust.go`), les | |
| 88 | + channels testent ces méthodes par assertion (les autres agents ne disent rien : pas d'avis). Tests Go (décodage | |
| 89 | + snake_case et camelCase, avis une fois, décision, nouvelle session). Xvfb avec un faux vibe-acp en Python : avis, | |
| 90 | + clic, `_trust/decision {"decision": "trust_cwd", "sessionId": "s1"}` reçu, nouvelle session, skills lues. | |
| 91 | + Non vérifié : un vrai vibe-acp (la façon dont son SDK Python reçoit le `_` de la méthode est déduite de son code). | |
| new file mode 100644 | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | ||
| 2 | +id: 125 | ||
| 3 | +title: "Vibe : faire confiance au dossier de l'agent pour qu'il lise ses instructions et ses skills" | ||
| 4 | +state: open | ||
| 5 | +author: | ||
| 6 | + name: k33g | ||
| 7 | + email: ph.charriere@gmail.com | ||
| 8 | +createdAt: 2026-11-16T06:41:57.000Z | ||
| 9 | +updatedAt: 2026-11-16T06:41:57.000Z | ||
| 10 | +labels: | ||
| 11 | + - kind::bug | ||
| 12 | + - area::acp | ||
| 13 | + - citizen-ux | ||
| 14 | + - real-agents | ||
| 15 | +milestone: "v1.7.0 · Release" | ||
| 16 | +epic: Agents | ||
| 17 | +related: | ||
| 18 | + - 86 | ||
| 19 | + - 112 | ||
| 20 | + - 113 | ||
| 21 | +body: | | ||
| 22 | + Relevé par l'owner : les skills marchent pour Claude, Antigravity et Codex, mais **Vibe ne les reconnaît pas**. | ||
| 23 | + | ||
| 24 | + ## Cause (doc et code source de Mistral Vibe) | ||
| 25 | + - Vibe ne charge la configuration d'un projet — `AGENTS.md`, `.vibe/skills`, `.agents/skills`, `.vibe/` — que | ||
| 26 | + dans un **dossier de confiance** ; sinon il l'ignore. La confiance est gardée dans `~/.vibe/trusted_folders.toml` | ||
| 27 | + (dans la sandbox) ; `vibe --trust` (utilisé par le kit) ne vaut que pour une exécution ; `vibe-acp` n'a pas | ||
| 28 | + d'option `--trust` et ne demande rien. | ||
| 29 | + - `vibe-acp` dit l'état du dossier dans le `_meta` de la réponse à `session/new` / `session/load` : | ||
| 30 | + `workspace_trust: {status: trusted|session|untrusted, details: {detected_files, available_decisions…}}` (les | ||
| 31 | + détails seulement quand le dossier contient ces fichiers), et accepte la méthode d'extension ACP | ||
| 32 | + **`_trust/decision`** `{sessionId, decision: trust_cwd|trust_repo|decline}` — décision persistante, liée au | ||
| 33 | + dossier de la session. | ||
| 34 | + | ||
| 35 | + ## Solution | ||
| 36 | + Quand une session s'ouvre sur un dossier non fiable qui contient ces fichiers, un message dans la conversation le | ||
| 37 | + dit (avec la liste) et propose **Faire confiance à son dossier** ; Sidekicks envoie `_trust/decision` | ||
| 38 | + (`trust_cwd`, sinon `trust_repo`) et ouvre une nouvelle session à la réponse suivante, que Vibe lit avec ses | ||
| 39 | + instructions et ses skills. La décision reste à l'utilisateur (les réglages `.vibe/` du dossier s'appliquent aussi). | ||
| 40 | +tasks: | ||
| 41 | + - id: 1 | ||
| 42 | + title: "acp : lire workspace_trust dans le _meta de session/new et session/load ; TrustWorkspace (_trust/decision)" | ||
| 43 | + state: closed | ||
| 44 | + priority: high | ||
| 45 | + author: | ||
| 46 | + name: k33g | ||
| 47 | + email: ph.charriere@gmail.com | ||
| 48 | + createdAt: 2026-11-16T06:41:57.000Z | ||
| 49 | + updatedAt: 2026-11-16T06:41:57.000Z | ||
| 50 | + closedAt: 2026-11-16T06:41:57.000Z | ||
| 51 | + - id: 2 | ||
| 52 | + title: "channels : avis workspace-untrusted, TrustFolder (décision puis nouvelle session), message workspace-trusted" | ||
| 53 | + state: closed | ||
| 54 | + priority: high | ||
| 55 | + author: | ||
| 56 | + name: k33g | ||
| 57 | + email: ph.charriere@gmail.com | ||
| 58 | + createdAt: 2026-11-16T06:41:57.000Z | ||
| 59 | + updatedAt: 2026-11-16T06:41:57.000Z | ||
| 60 | + closedAt: 2026-11-16T06:41:57.000Z | ||
| 61 | + - id: 3 | ||
| 62 | + title: "Conversation : message et bouton « Faire confiance à son dossier » (EN + FR) ; tests ; doc ; notes v1.7.0" | ||
| 63 | + state: closed | ||
| 64 | + priority: high | ||
| 65 | + author: | ||
| 66 | + name: k33g | ||
| 67 | + email: ph.charriere@gmail.com | ||
| 68 | + createdAt: 2026-11-16T06:41:57.000Z | ||
| 69 | + updatedAt: 2026-11-16T06:41:57.000Z | ||
| 70 | + closedAt: 2026-11-16T06:41:57.000Z | ||
| 71 | + - id: 4 | ||
| 72 | + title: "Tester sur le Mac avec un vrai agent Vibe en sandbox (skills et AGENTS.md lus après la confiance)" | ||
| 73 | + state: open | ||
| 74 | + priority: high | ||
| 75 | + author: | ||
| 76 | + name: k33g | ||
| 77 | + email: ph.charriere@gmail.com | ||
| 78 | + createdAt: 2026-11-16T06:41:57.000Z | ||
| 79 | +comments: | ||
| 80 | + - id: 1 | ||
| 81 | + author: | ||
| 82 | + name: k33g | ||
| 83 | + email: ph.charriere@gmail.com | ||
| 84 | + createdAt: 2026-11-16T06:41:57.000Z | ||
| 85 | + body: | | ||
| 86 | + Fait sur `feature/125-vibe-trust` (branche partie de `feature/120-121-drag-and-drop`, non commitée : elle porte | ||
| 87 | + aussi #120, #121, #123, #124). `acp.WorkspaceTrust` / `Conn.TrustWorkspace` (`internal/acp/trust.go`), les | ||
| 88 | + channels testent ces méthodes par assertion (les autres agents ne disent rien : pas d'avis). Tests Go (décodage | ||
| 89 | + snake_case et camelCase, avis une fois, décision, nouvelle session). Xvfb avec un faux vibe-acp en Python : avis, | ||
| 90 | + clic, `_trust/decision {"decision": "trust_cwd", "sessionId": "s1"}` reçu, nouvelle session, skills lues. | ||
| 91 | + Non vérifié : un vrai vibe-acp (la façon dont son SDK Python reçoit le `_` de la méthode est déduite de son code). | ||
added
.tickets/issues/0126-agents-mini-me-invisibles-dans-le-finder-drapeau.yaml +68 -0 | new file mode 100644 | ||
| @@ -0,0 +1,68 @@ | ||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | |
| 2 | +id: 126 | |
| 3 | +title: "Agents mini-me invisibles dans le Finder (drapeau hidden de macOS)" | |
| 4 | +state: open | |
| 5 | +author: | |
| 6 | + name: k33g | |
| 7 | + email: ph.charriere@gmail.com | |
| 8 | +createdAt: 2026-11-16T06:51:57.000Z | |
| 9 | +updatedAt: 2026-11-16T06:51:57.000Z | |
| 10 | +labels: | |
| 11 | + - kind::bug | |
| 12 | + - area::workspace | |
| 13 | + - citizen-ux | |
| 14 | +milestone: "v1.7.0 · Release" | |
| 15 | +epic: Agents | |
| 16 | +related: | |
| 17 | + - 94 | |
| 18 | + - 101 | |
| 19 | +body: | | |
| 20 | + Relevé par l'owner : les agents créés avec l'assistant mini-me apparaissent dans Sidekicks mais sont **invisibles | |
| 21 | + dans le Finder** (`~/Documents/Sidekicks-Agents`), bien que présents. `ls -lO` : | |
| 22 | + | |
| 23 | + ``` | |
| 24 | + drwxr-xr-x@ 5 k33g staff - 160 Nov 16 06:53 codex | |
| 25 | + drwxr-xr-x@ 5 k33g staff hidden 160 Nov 16 06:40 mini-coder | |
| 26 | + drwxr-xr-x@ 3 k33g staff hidden 96 Nov 15 05:02 mini-me-2 | |
| 27 | + ``` | |
| 28 | + | |
| 29 | + **Cause** : l'assistant mini-me ([#94](.tickets/issues/0094-assistant-de-creation-d-agents-mini-me-pour-les.yaml)) | |
| 30 | + crée le dossier sous `.sidekicks-new-agent-…` (nom à point), puis le renomme au nom de l'agent. Sur macOS, le | |
| 31 | + dossier porte le drapeau `hidden` (UF_HIDDEN) de son nom à point, et le renommage ne le retire pas. Les agents des | |
| 32 | + sandboxes (#96), créés directement à leur nom, ne sont pas touchés. | |
| 33 | + | |
| 34 | + **Contournement** : `chflags nohidden ~/Documents/Sidekicks-Agents/*`. | |
| 35 | + | |
| 36 | + ## Critères d'acceptation | |
| 37 | + - Après « Terminer », le dossier de l'agent n'a plus le drapeau `hidden` (seul ce drapeau est retiré). | |
| 38 | + - Test sur macOS ; notes de release v1.7.0. | |
| 39 | +tasks: | |
| 40 | + - id: 1 | |
| 41 | + title: "Retirer UF_HIDDEN du dossier de l'agent après le renommage (macOS) ; test darwin" | |
| 42 | + state: closed | |
| 43 | + priority: high | |
| 44 | + author: | |
| 45 | + name: k33g | |
| 46 | + email: ph.charriere@gmail.com | |
| 47 | + createdAt: 2026-11-16T06:51:57.000Z | |
| 48 | + updatedAt: 2026-11-16T06:51:57.000Z | |
| 49 | + closedAt: 2026-11-16T06:51:57.000Z | |
| 50 | + - id: 2 | |
| 51 | + title: "Tester sur le Mac : créer un agent mini-me, le voir dans le Finder ; make test (test darwin)" | |
| 52 | + state: open | |
| 53 | + priority: high | |
| 54 | + author: | |
| 55 | + name: k33g | |
| 56 | + email: ph.charriere@gmail.com | |
| 57 | + createdAt: 2026-11-16T06:51:57.000Z | |
| 58 | +comments: | |
| 59 | + - id: 1 | |
| 60 | + author: | |
| 61 | + name: k33g | |
| 62 | + email: ph.charriere@gmail.com | |
| 63 | + createdAt: 2026-11-16T06:51:57.000Z | |
| 64 | + body: | | |
| 65 | + Fait (même branche de travail non commitée que #120/#121/#125) : `internal/creator/visible_darwin.go` | |
| 66 | + (`unhide` : Lstat, puis Chflags sans UF_HIDDEN = 0x8000, les autres drapeaux gardés), `visible_other.go` (rien | |
| 67 | + ailleurs), appelé après le renommage dans `Finish`. Test darwin (`visible_darwin_test.go`) : compile pour | |
| 68 | + darwin/arm64, ne s'exécute que sur le Mac. Les dossiers déjà créés : `chflags nohidden`. | |
| new file mode 100644 | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | ||
| 2 | +id: 126 | ||
| 3 | +title: "Agents mini-me invisibles dans le Finder (drapeau hidden de macOS)" | ||
| 4 | +state: open | ||
| 5 | +author: | ||
| 6 | + name: k33g | ||
| 7 | + email: ph.charriere@gmail.com | ||
| 8 | +createdAt: 2026-11-16T06:51:57.000Z | ||
| 9 | +updatedAt: 2026-11-16T06:51:57.000Z | ||
| 10 | +labels: | ||
| 11 | + - kind::bug | ||
| 12 | + - area::workspace | ||
| 13 | + - citizen-ux | ||
| 14 | +milestone: "v1.7.0 · Release" | ||
| 15 | +epic: Agents | ||
| 16 | +related: | ||
| 17 | + - 94 | ||
| 18 | + - 101 | ||
| 19 | +body: | | ||
| 20 | + Relevé par l'owner : les agents créés avec l'assistant mini-me apparaissent dans Sidekicks mais sont **invisibles | ||
| 21 | + dans le Finder** (`~/Documents/Sidekicks-Agents`), bien que présents. `ls -lO` : | ||
| 22 | + | ||
| 23 | + ``` | ||
| 24 | + drwxr-xr-x@ 5 k33g staff - 160 Nov 16 06:53 codex | ||
| 25 | + drwxr-xr-x@ 5 k33g staff hidden 160 Nov 16 06:40 mini-coder | ||
| 26 | + drwxr-xr-x@ 3 k33g staff hidden 96 Nov 15 05:02 mini-me-2 | ||
| 27 | + ``` | ||
| 28 | + | ||
| 29 | + **Cause** : l'assistant mini-me ([#94](.tickets/issues/0094-assistant-de-creation-d-agents-mini-me-pour-les.yaml)) | ||
| 30 | + crée le dossier sous `.sidekicks-new-agent-…` (nom à point), puis le renomme au nom de l'agent. Sur macOS, le | ||
| 31 | + dossier porte le drapeau `hidden` (UF_HIDDEN) de son nom à point, et le renommage ne le retire pas. Les agents des | ||
| 32 | + sandboxes (#96), créés directement à leur nom, ne sont pas touchés. | ||
| 33 | + | ||
| 34 | + **Contournement** : `chflags nohidden ~/Documents/Sidekicks-Agents/*`. | ||
| 35 | + | ||
| 36 | + ## Critères d'acceptation | ||
| 37 | + - Après « Terminer », le dossier de l'agent n'a plus le drapeau `hidden` (seul ce drapeau est retiré). | ||
| 38 | + - Test sur macOS ; notes de release v1.7.0. | ||
| 39 | +tasks: | ||
| 40 | + - id: 1 | ||
| 41 | + title: "Retirer UF_HIDDEN du dossier de l'agent après le renommage (macOS) ; test darwin" | ||
| 42 | + state: closed | ||
| 43 | + priority: high | ||
| 44 | + author: | ||
| 45 | + name: k33g | ||
| 46 | + email: ph.charriere@gmail.com | ||
| 47 | + createdAt: 2026-11-16T06:51:57.000Z | ||
| 48 | + updatedAt: 2026-11-16T06:51:57.000Z | ||
| 49 | + closedAt: 2026-11-16T06:51:57.000Z | ||
| 50 | + - id: 2 | ||
| 51 | + title: "Tester sur le Mac : créer un agent mini-me, le voir dans le Finder ; make test (test darwin)" | ||
| 52 | + state: open | ||
| 53 | + priority: high | ||
| 54 | + author: | ||
| 55 | + name: k33g | ||
| 56 | + email: ph.charriere@gmail.com | ||
| 57 | + createdAt: 2026-11-16T06:51:57.000Z | ||
| 58 | +comments: | ||
| 59 | + - id: 1 | ||
| 60 | + author: | ||
| 61 | + name: k33g | ||
| 62 | + email: ph.charriere@gmail.com | ||
| 63 | + createdAt: 2026-11-16T06:51:57.000Z | ||
| 64 | + body: | | ||
| 65 | + Fait (même branche de travail non commitée que #120/#121/#125) : `internal/creator/visible_darwin.go` | ||
| 66 | + (`unhide` : Lstat, puis Chflags sans UF_HIDDEN = 0x8000, les autres drapeaux gardés), `visible_other.go` (rien | ||
| 67 | + ailleurs), appelé après le renommage dans `Finish`. Test darwin (`visible_darwin_test.go`) : compile pour | ||
| 68 | + darwin/arm64, ne s'exécute que sur le Mac. Les dossiers déjà créés : `chflags nohidden`. | ||
added
.tickets/issues/0127-etude-des-modeles-templates-pour-les-sbxenv-yaml.yaml +81 -0 | new file mode 100644 | ||
| @@ -0,0 +1,81 @@ | ||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | |
| 2 | +id: 127 | |
| 3 | +title: "Étude : des modèles (templates) pour les sbxenv.yaml des agents de l'assistant des sandboxes" | |
| 4 | +state: open | |
| 5 | +author: | |
| 6 | + name: k33g | |
| 7 | + email: ph.charriere@gmail.com | |
| 8 | +createdAt: 2026-11-16T06:54:17.000Z | |
| 9 | +updatedAt: 2026-11-16T06:54:17.000Z | |
| 10 | +labels: | |
| 11 | + - kind::spike | |
| 12 | + - area::config | |
| 13 | +milestone: "v1.8.0 · Release" | |
| 14 | +epic: Docker SBX | |
| 15 | +related: | |
| 16 | + - 96 | |
| 17 | + - 103 | |
| 18 | + - 108 | |
| 19 | +body: | | |
| 20 | + Aujourd'hui, il n'y a **pas de fichier modèle** : l'assistant « Créer un agent dans une sandbox » | |
| 21 | + ([#96](.tickets/issues/0096-assistant-create-a-sbx-agent-claude-gemini-codex.yaml)) écrit le `sbxenv.yaml` de | |
| 22 | + Claude, Antigravity, Codex, Vibe et Copilot depuis le Go : le `Catalogue` (une entrée par type : agent sbx, kit, | |
| 23 | + programme, service, `Bindings`, `Shared`…) et `Render` dans `internal/sbxcreate/sbxcreate.go` (documenté dans | |
| 24 | + « Ajouter un type d'agent à l'assistant des sandboxes », [#108](.tickets/issues/0108-assistant-des-sandboxes-gemini-devient-antigravit.yaml)). | |
| 25 | + Étudier la possibilité d'utiliser de **vrais modèles** (templates). | |
| 26 | + | |
| 27 | + ## Pistes à comparer | |
| 28 | + - **Modèles embarqués** : `internal/sbxcreate/templates/<type>.sbxenv.yaml.tmpl` (`text/template`), embarqués avec | |
| 29 | + `go:embed` ; le catalogue garde ce que l'interface affiche (titre, logo, service, page de la clé, options de | |
| 30 | + l'étape de la clé), le modèle garde le fichier. Un modèle par type, ou un modèle commun + des blocs par type. | |
| 31 | + - **Modèles modifiables par l'utilisateur** : un dossier (ex. `~/Library/Application Support/sidekicks/templates/` | |
| 32 | + ou à côté de la configuration) qui remplace le modèle embarqué d'un type, voire **ajoute un type** (un agent sbx | |
| 33 | + que Sidekicks ne connaît pas) sans recompiler — avec sa description (titre, logo, programme ACP, service). | |
| 34 | + - **Garder le Go** : ce qui varie est peu de chose ; un modèle déplace la logique (bindings, `Shared`) dans un | |
| 35 | + langage de modèle moins testé. | |
| 36 | + | |
| 37 | + ## Questions | |
| 38 | + - Quelles variables : nom de la sandbox, agent, kit, workspace, services et domaines, options (`pullPolicy`, | |
| 39 | + `additionalWorkspaces`, montages en lecture seule comme le `.mm` de mini-me) ? | |
| 40 | + - Vérifier un modèle : rendu puis lecture par `lifecycle.ReadSbxEnv` / validation du schéma sbx, tests de rendu | |
| 41 | + pour chaque type (comme aujourd'hui). | |
| 42 | + - Rester aligné sur les kits Docker qui changent (`docker.io/sbx/*`) : qui met les modèles à jour, et comment. | |
| 43 | + - Commentaires du fichier (anglais aujourd'hui) ; compatibilité avec les agents déjà créés. | |
| 44 | + | |
| 45 | + ## Livrable | |
| 46 | + Une note (ADR) : options comparées, recommandation, et si oui, les tickets d'implémentation (modèles embarqués, | |
| 47 | + puis éventuellement modifiables / nouveaux types), avec la mise à jour du guide développeur. | |
| 48 | +tasks: | |
| 49 | + - id: 1 | |
| 50 | + title: "Inventaire de ce que Render écrit pour chaque type (variables, blocs propres à Copilot, Codex OAuth…)" | |
| 51 | + state: open | |
| 52 | + priority: high | |
| 53 | + author: | |
| 54 | + name: k33g | |
| 55 | + email: ph.charriere@gmail.com | |
| 56 | + createdAt: 2026-11-16T06:54:17.000Z | |
| 57 | + - id: 2 | |
| 58 | + title: "Prototype : un type en modèle embarqué (go:embed + text/template), rendu identique à Render, tests" | |
| 59 | + state: open | |
| 60 | + priority: high | |
| 61 | + author: | |
| 62 | + name: k33g | |
| 63 | + email: ph.charriere@gmail.com | |
| 64 | + createdAt: 2026-11-16T06:54:17.000Z | |
| 65 | + - id: 3 | |
| 66 | + title: "Étudier les modèles modifiables par l'utilisateur et l'ajout d'un type sans recompiler" | |
| 67 | + state: open | |
| 68 | + priority: medium | |
| 69 | + author: | |
| 70 | + name: k33g | |
| 71 | + email: ph.charriere@gmail.com | |
| 72 | + createdAt: 2026-11-16T06:54:17.000Z | |
| 73 | + - id: 4 | |
| 74 | + title: "ADR + recommandation + tickets d'implémentation" | |
| 75 | + state: open | |
| 76 | + priority: medium | |
| 77 | + author: | |
| 78 | + name: k33g | |
| 79 | + email: ph.charriere@gmail.com | |
| 80 | + createdAt: 2026-11-16T06:54:17.000Z | |
| 81 | +comments: [] | |
| new file mode 100644 | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | ||
| 2 | +id: 127 | ||
| 3 | +title: "Étude : des modèles (templates) pour les sbxenv.yaml des agents de l'assistant des sandboxes" | ||
| 4 | +state: open | ||
| 5 | +author: | ||
| 6 | + name: k33g | ||
| 7 | + email: ph.charriere@gmail.com | ||
| 8 | +createdAt: 2026-11-16T06:54:17.000Z | ||
| 9 | +updatedAt: 2026-11-16T06:54:17.000Z | ||
| 10 | +labels: | ||
| 11 | + - kind::spike | ||
| 12 | + - area::config | ||
| 13 | +milestone: "v1.8.0 · Release" | ||
| 14 | +epic: Docker SBX | ||
| 15 | +related: | ||
| 16 | + - 96 | ||
| 17 | + - 103 | ||
| 18 | + - 108 | ||
| 19 | +body: | | ||
| 20 | + Aujourd'hui, il n'y a **pas de fichier modèle** : l'assistant « Créer un agent dans une sandbox » | ||
| 21 | + ([#96](.tickets/issues/0096-assistant-create-a-sbx-agent-claude-gemini-codex.yaml)) écrit le `sbxenv.yaml` de | ||
| 22 | + Claude, Antigravity, Codex, Vibe et Copilot depuis le Go : le `Catalogue` (une entrée par type : agent sbx, kit, | ||
| 23 | + programme, service, `Bindings`, `Shared`…) et `Render` dans `internal/sbxcreate/sbxcreate.go` (documenté dans | ||
| 24 | + « Ajouter un type d'agent à l'assistant des sandboxes », [#108](.tickets/issues/0108-assistant-des-sandboxes-gemini-devient-antigravit.yaml)). | ||
| 25 | + Étudier la possibilité d'utiliser de **vrais modèles** (templates). | ||
| 26 | + | ||
| 27 | + ## Pistes à comparer | ||
| 28 | + - **Modèles embarqués** : `internal/sbxcreate/templates/<type>.sbxenv.yaml.tmpl` (`text/template`), embarqués avec | ||
| 29 | + `go:embed` ; le catalogue garde ce que l'interface affiche (titre, logo, service, page de la clé, options de | ||
| 30 | + l'étape de la clé), le modèle garde le fichier. Un modèle par type, ou un modèle commun + des blocs par type. | ||
| 31 | + - **Modèles modifiables par l'utilisateur** : un dossier (ex. `~/Library/Application Support/sidekicks/templates/` | ||
| 32 | + ou à côté de la configuration) qui remplace le modèle embarqué d'un type, voire **ajoute un type** (un agent sbx | ||
| 33 | + que Sidekicks ne connaît pas) sans recompiler — avec sa description (titre, logo, programme ACP, service). | ||
| 34 | + - **Garder le Go** : ce qui varie est peu de chose ; un modèle déplace la logique (bindings, `Shared`) dans un | ||
| 35 | + langage de modèle moins testé. | ||
| 36 | + | ||
| 37 | + ## Questions | ||
| 38 | + - Quelles variables : nom de la sandbox, agent, kit, workspace, services et domaines, options (`pullPolicy`, | ||
| 39 | + `additionalWorkspaces`, montages en lecture seule comme le `.mm` de mini-me) ? | ||
| 40 | + - Vérifier un modèle : rendu puis lecture par `lifecycle.ReadSbxEnv` / validation du schéma sbx, tests de rendu | ||
| 41 | + pour chaque type (comme aujourd'hui). | ||
| 42 | + - Rester aligné sur les kits Docker qui changent (`docker.io/sbx/*`) : qui met les modèles à jour, et comment. | ||
| 43 | + - Commentaires du fichier (anglais aujourd'hui) ; compatibilité avec les agents déjà créés. | ||
| 44 | + | ||
| 45 | + ## Livrable | ||
| 46 | + Une note (ADR) : options comparées, recommandation, et si oui, les tickets d'implémentation (modèles embarqués, | ||
| 47 | + puis éventuellement modifiables / nouveaux types), avec la mise à jour du guide développeur. | ||
| 48 | +tasks: | ||
| 49 | + - id: 1 | ||
| 50 | + title: "Inventaire de ce que Render écrit pour chaque type (variables, blocs propres à Copilot, Codex OAuth…)" | ||
| 51 | + state: open | ||
| 52 | + priority: high | ||
| 53 | + author: | ||
| 54 | + name: k33g | ||
| 55 | + email: ph.charriere@gmail.com | ||
| 56 | + createdAt: 2026-11-16T06:54:17.000Z | ||
| 57 | + - id: 2 | ||
| 58 | + title: "Prototype : un type en modèle embarqué (go:embed + text/template), rendu identique à Render, tests" | ||
| 59 | + state: open | ||
| 60 | + priority: high | ||
| 61 | + author: | ||
| 62 | + name: k33g | ||
| 63 | + email: ph.charriere@gmail.com | ||
| 64 | + createdAt: 2026-11-16T06:54:17.000Z | ||
| 65 | + - id: 3 | ||
| 66 | + title: "Étudier les modèles modifiables par l'utilisateur et l'ajout d'un type sans recompiler" | ||
| 67 | + state: open | ||
| 68 | + priority: medium | ||
| 69 | + author: | ||
| 70 | + name: k33g | ||
| 71 | + email: ph.charriere@gmail.com | ||
| 72 | + createdAt: 2026-11-16T06:54:17.000Z | ||
| 73 | + - id: 4 | ||
| 74 | + title: "ADR + recommandation + tickets d'implémentation" | ||
| 75 | + state: open | ||
| 76 | + priority: medium | ||
| 77 | + author: | ||
| 78 | + name: k33g | ||
| 79 | + email: ph.charriere@gmail.com | ||
| 80 | + createdAt: 2026-11-16T06:54:17.000Z | ||
| 81 | +comments: [] | ||
added
.tickets/issues/0128-supprimer-un-agent-proprement-configuration-hist.yaml +115 -0 | new file mode 100644 | ||
| @@ -0,0 +1,115 @@ | ||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | |
| 2 | +id: 128 | |
| 3 | +title: "Supprimer un agent proprement : configuration, historique, sandbox ou conteneur, dossier" | |
| 4 | +state: open | |
| 5 | +author: | |
| 6 | + name: k33g | |
| 7 | + email: ph.charriere@gmail.com | |
| 8 | +createdAt: 2026-11-16T06:58:24.000Z | |
| 9 | +updatedAt: 2026-11-16T07:22:19.000Z | |
| 10 | +labels: | |
| 11 | + - kind::feature | |
| 12 | + - area::config | |
| 13 | + - citizen-ux | |
| 14 | +milestone: "v1.7.0 · Release" | |
| 15 | +epic: Agents | |
| 16 | +related: | |
| 17 | + - 94 | |
| 18 | + - 96 | |
| 19 | + - 126 | |
| 20 | +body: | | |
| 21 | + Pouvoir **supprimer un agent proprement** depuis Sidekicks. Aujourd'hui il faut le retirer de la configuration, puis | |
| 22 | + penser à son dossier, à sa sandbox ou son conteneur, et l'historique reste en base. Relevé par l'owner, en recréant | |
| 23 | + un agent du même nom : « This name is already used (by an agent, a folder or a sandbox): try ratatouille-2. » | |
| 24 | + | |
| 25 | + ## Ce qui bloque un nom (`Core.takenNames`, `internal/app/creator.go`) | |
| 26 | + Un agent de la configuration, un **dossier** du dossier des agents (`~/Documents/Sidekicks-Agents`) ou une | |
| 27 | + **sandbox** sbx (`sbx ls`). La base (Pebble) n'entre pas dans ce contrôle, mais elle garde la conversation directe | |
| 28 | + de l'agent (`direct/<agent>`), son historique et ses places dans les channels : un agent recréé sous le même nom | |
| 29 | + retrouverait l'ancienne conversation. Le dossier d'un agent mini-me pouvait aussi être **caché** dans le Finder | |
| 30 | + ([#126](.tickets/issues/0126-agents-mini-me-invisibles-dans-le-finder-drapeau.yaml)) : on croyait l'avoir supprimé. | |
| 31 | + | |
| 32 | + ## Proposition | |
| 33 | + Un bouton **Supprimer l'agent** dans sa vue (et dans la palette), avec une confirmation qui dit ce qui part : | |
| 34 | + 1. l'agent est arrêté, ses terminaux fermés ; | |
| 35 | + 2. son entrée est retirée de la configuration (en gardant les commentaires du fichier) ; | |
| 36 | + 3. sa conversation directe et son historique sont supprimés de la base ; il est retiré des channels dont il est membre | |
| 37 | + (leurs messages restent) ; | |
| 38 | + 4. sa sandbox ou son conteneur est supprimé (`runtime.lifecycle.remove` : `sbx env rm --force`, | |
| 39 | + `docker compose down`…) — case cochée par défaut ; | |
| 40 | + 5. son dossier part à la corbeille — case à cocher, cochée seulement pour un dossier créé par un assistant (dans le | |
| 41 | + dossier des agents) ; jamais un dossier hors de ce dossier sans le demander. | |
| 42 | + | |
| 43 | + ## Critères d'acceptation | |
| 44 | + - Après suppression, le nom est libre : l'assistant le propose de nouveau, sans « -2 ». | |
| 45 | + - Rien ne reste de l'agent dans Sidekicks (liste, channels, palette, historique) ; ce qui n'a pas pu être supprimé | |
| 46 | + (sandbox injoignable…) est dit, avec quoi faire. | |
| 47 | + - Tests Go ; doc EN + FR ; notes de release v1.7.0. | |
| 48 | +tasks: | |
| 49 | + - id: 1 | |
| 50 | + title: "Go : RemoveAgent — arrêt, configuration (commentaires gardés), base (direct, historique, membres), lifecycle remove, dossier à la corbeille" | |
| 51 | + state: closed | |
| 52 | + priority: high | |
| 53 | + author: | |
| 54 | + name: k33g | |
| 55 | + email: ph.charriere@gmail.com | |
| 56 | + createdAt: 2026-11-16T06:58:24.000Z | |
| 57 | + updatedAt: 2026-11-16T07:07:13.000Z | |
| 58 | + closedAt: 2026-11-16T07:07:13.000Z | |
| 59 | + - id: 2 | |
| 60 | + title: "Vue de l'agent : bouton Supprimer l'agent, confirmation avec ce qui part et les deux cases (sandbox/conteneur, dossier)" | |
| 61 | + state: closed | |
| 62 | + priority: high | |
| 63 | + author: | |
| 64 | + name: k33g | |
| 65 | + email: ph.charriere@gmail.com | |
| 66 | + createdAt: 2026-11-16T06:58:24.000Z | |
| 67 | + updatedAt: 2026-11-16T07:07:13.000Z | |
| 68 | + closedAt: 2026-11-16T07:07:13.000Z | |
| 69 | + - id: 3 | |
| 70 | + title: "Tests Go ; doc EN + FR ; notes de release v1.7.0" | |
| 71 | + state: closed | |
| 72 | + priority: medium | |
| 73 | + author: | |
| 74 | + name: k33g | |
| 75 | + email: ph.charriere@gmail.com | |
| 76 | + createdAt: 2026-11-16T06:58:24.000Z | |
| 77 | + updatedAt: 2026-11-16T07:07:13.000Z | |
| 78 | + closedAt: 2026-11-16T07:07:13.000Z | |
| 79 | + - id: 4 | |
| 80 | + title: "Tester sur le Mac : supprimer un agent mini-me et un agent sbx, puis recréer le même nom" | |
| 81 | + state: open | |
| 82 | + priority: high | |
| 83 | + author: | |
| 84 | + name: k33g | |
| 85 | + email: ph.charriere@gmail.com | |
| 86 | + createdAt: 2026-11-16T06:58:24.000Z | |
| 87 | +comments: | |
| 88 | + - id: 1 | |
| 89 | + author: | |
| 90 | + name: k33g | |
| 91 | + email: ph.charriere@gmail.com | |
| 92 | + createdAt: 2026-11-16T07:07:13.000Z | |
| 93 | + body: | | |
| 94 | + L'owner : « c'était parce que la sandbox existait encore ». Fait sur `feature/128-delete-agent` (partie de la | |
| 95 | + branche de travail non commitée : #120, #121, #123–#127 y sont aussi). | |
| 96 | + | |
| 97 | + - Go : `config.RemoveAgent` (entrée retirée, et des `agents` des channels déclarés — sinon `unknownMember` ; | |
| 98 | + commentaires gardés ; `agents: []` quand il n'en reste plus), `channels.Manager.ForgetAgent` (conversation | |
| 99 | + directe supprimée avec ses messages, retrait des channels), `ConfigService.Removal` / `DeleteAgent` (arrêt, | |
| 100 | + lifecycle remove si demandé, historique, configuration, dossier à la corbeille si demandé et seulement s'il est | |
| 101 | + directement dans `agentsFolder`) ; les échecs autres que la configuration sont rendus dans `problems`. | |
| 102 | + - Vue de l'agent : « Supprimer l'agent », confirmation avec les deux cases (sandbox / conteneur, dossier) ; ses | |
| 103 | + terminaux sont fermés ; retour à l'accueil. | |
| 104 | + - Tests Go (config, channels, service) ; Xvfb avec un faux sbx : agent, sandbox, dossier (corbeille), entrée et | |
| 105 | + place dans #kitchen supprimés, Alice gardée. `make verify` vert. Doc EN + FR (guide « Ajouter un agent », | |
| 106 | + référence), notes v1.7.0. Reste la tâche 4 (Mac). | |
| 107 | + - id: 2 | |
| 108 | + author: | |
| 109 | + name: k33g | |
| 110 | + email: ph.charriere@gmail.com | |
| 111 | + createdAt: 2026-11-16T07:22:19.000Z | |
| 112 | + body: | | |
| 113 | + Ajout : `ForgetAgent` oublie aussi les commandes `/` que l'agent avait annoncées (cache et `commands/<agent>` en | |
| 114 | + base, `commands:changed` vide) — sinon un agent recréé sous le même nom (« ratatouille » : Vibe après un autre) | |
| 115 | + montrait la liste de l'ancien. Test ajouté. | |
| new file mode 100644 | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | +# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. | ||
| 2 | +id: 128 | ||
| 3 | +title: "Supprimer un agent proprement : configuration, historique, sandbox ou conteneur, dossier" | ||
| 4 | +state: open | ||
| 5 | +author: | ||
| 6 | + name: k33g | ||
| 7 | + email: ph.charriere@gmail.com | ||
| 8 | +createdAt: 2026-11-16T06:58:24.000Z | ||
| 9 | +updatedAt: 2026-11-16T07:22:19.000Z | ||
| 10 | +labels: | ||
| 11 | + - kind::feature | ||
| 12 | + - area::config | ||
| 13 | + - citizen-ux | ||
| 14 | +milestone: "v1.7.0 · Release" | ||
| 15 | +epic: Agents | ||
| 16 | +related: | ||
| 17 | + - 94 | ||
| 18 | + - 96 | ||
| 19 | + - 126 | ||
| 20 | +body: | | ||
| 21 | + Pouvoir **supprimer un agent proprement** depuis Sidekicks. Aujourd'hui il faut le retirer de la configuration, puis | ||
| 22 | + penser à son dossier, à sa sandbox ou son conteneur, et l'historique reste en base. Relevé par l'owner, en recréant | ||
| 23 | + un agent du même nom : « This name is already used (by an agent, a folder or a sandbox): try ratatouille-2. » | ||
| 24 | + | ||
| 25 | + ## Ce qui bloque un nom (`Core.takenNames`, `internal/app/creator.go`) | ||
| 26 | + Un agent de la configuration, un **dossier** du dossier des agents (`~/Documents/Sidekicks-Agents`) ou une | ||
| 27 | + **sandbox** sbx (`sbx ls`). La base (Pebble) n'entre pas dans ce contrôle, mais elle garde la conversation directe | ||
| 28 | + de l'agent (`direct/<agent>`), son historique et ses places dans les channels : un agent recréé sous le même nom | ||
| 29 | + retrouverait l'ancienne conversation. Le dossier d'un agent mini-me pouvait aussi être **caché** dans le Finder | ||
| 30 | + ([#126](.tickets/issues/0126-agents-mini-me-invisibles-dans-le-finder-drapeau.yaml)) : on croyait l'avoir supprimé. | ||
| 31 | + | ||
| 32 | + ## Proposition | ||
| 33 | + Un bouton **Supprimer l'agent** dans sa vue (et dans la palette), avec une confirmation qui dit ce qui part : | ||
| 34 | + 1. l'agent est arrêté, ses terminaux fermés ; | ||
| 35 | + 2. son entrée est retirée de la configuration (en gardant les commentaires du fichier) ; | ||
| 36 | + 3. sa conversation directe et son historique sont supprimés de la base ; il est retiré des channels dont il est membre | ||
| 37 | + (leurs messages restent) ; | ||
| 38 | + 4. sa sandbox ou son conteneur est supprimé (`runtime.lifecycle.remove` : `sbx env rm --force`, | ||
| 39 | + `docker compose down`…) — case cochée par défaut ; | ||
| 40 | + 5. son dossier part à la corbeille — case à cocher, cochée seulement pour un dossier créé par un assistant (dans le | ||
| 41 | + dossier des agents) ; jamais un dossier hors de ce dossier sans le demander. | ||
| 42 | + | ||
| 43 | + ## Critères d'acceptation | ||
| 44 | + - Après suppression, le nom est libre : l'assistant le propose de nouveau, sans « -2 ». | ||
| 45 | + - Rien ne reste de l'agent dans Sidekicks (liste, channels, palette, historique) ; ce qui n'a pas pu être supprimé | ||
| 46 | + (sandbox injoignable…) est dit, avec quoi faire. | ||
| 47 | + - Tests Go ; doc EN + FR ; notes de release v1.7.0. | ||
| 48 | +tasks: | ||
| 49 | + - id: 1 | ||
| 50 | + title: "Go : RemoveAgent — arrêt, configuration (commentaires gardés), base (direct, historique, membres), lifecycle remove, dossier à la corbeille" | ||
| 51 | + state: closed | ||
| 52 | + priority: high | ||
| 53 | + author: | ||
| 54 | + name: k33g | ||
| 55 | + email: ph.charriere@gmail.com | ||
| 56 | + createdAt: 2026-11-16T06:58:24.000Z | ||
| 57 | + updatedAt: 2026-11-16T07:07:13.000Z | ||
| 58 | + closedAt: 2026-11-16T07:07:13.000Z | ||
| 59 | + - id: 2 | ||
| 60 | + title: "Vue de l'agent : bouton Supprimer l'agent, confirmation avec ce qui part et les deux cases (sandbox/conteneur, dossier)" | ||
| 61 | + state: closed | ||
| 62 | + priority: high | ||
| 63 | + author: | ||
| 64 | + name: k33g | ||
| 65 | + email: ph.charriere@gmail.com | ||
| 66 | + createdAt: 2026-11-16T06:58:24.000Z | ||
| 67 | + updatedAt: 2026-11-16T07:07:13.000Z | ||
| 68 | + closedAt: 2026-11-16T07:07:13.000Z | ||
| 69 | + - id: 3 | ||
| 70 | + title: "Tests Go ; doc EN + FR ; notes de release v1.7.0" | ||
| 71 | + state: closed | ||
| 72 | + priority: medium | ||
| 73 | + author: | ||
| 74 | + name: k33g | ||
| 75 | + email: ph.charriere@gmail.com | ||
| 76 | + createdAt: 2026-11-16T06:58:24.000Z | ||
| 77 | + updatedAt: 2026-11-16T07:07:13.000Z | ||
| 78 | + closedAt: 2026-11-16T07:07:13.000Z | ||
| 79 | + - id: 4 | ||
| 80 | + title: "Tester sur le Mac : supprimer un agent mini-me et un agent sbx, puis recréer le même nom" | ||
| 81 | + state: open | ||
| 82 | + priority: high | ||
| 83 | + author: | ||
| 84 | + name: k33g | ||
| 85 | + email: ph.charriere@gmail.com | ||
| 86 | + createdAt: 2026-11-16T06:58:24.000Z | ||
| 87 | +comments: | ||
| 88 | + - id: 1 | ||
| 89 | + author: | ||
| 90 | + name: k33g | ||
| 91 | + email: ph.charriere@gmail.com | ||
| 92 | + createdAt: 2026-11-16T07:07:13.000Z | ||
| 93 | + body: | | ||
| 94 | + L'owner : « c'était parce que la sandbox existait encore ». Fait sur `feature/128-delete-agent` (partie de la | ||
| 95 | + branche de travail non commitée : #120, #121, #123–#127 y sont aussi). | ||
| 96 | + | ||
| 97 | + - Go : `config.RemoveAgent` (entrée retirée, et des `agents` des channels déclarés — sinon `unknownMember` ; | ||
| 98 | + commentaires gardés ; `agents: []` quand il n'en reste plus), `channels.Manager.ForgetAgent` (conversation | ||
| 99 | + directe supprimée avec ses messages, retrait des channels), `ConfigService.Removal` / `DeleteAgent` (arrêt, | ||
| 100 | + lifecycle remove si demandé, historique, configuration, dossier à la corbeille si demandé et seulement s'il est | ||
| 101 | + directement dans `agentsFolder`) ; les échecs autres que la configuration sont rendus dans `problems`. | ||
| 102 | + - Vue de l'agent : « Supprimer l'agent », confirmation avec les deux cases (sandbox / conteneur, dossier) ; ses | ||
| 103 | + terminaux sont fermés ; retour à l'accueil. | ||
| 104 | + - Tests Go (config, channels, service) ; Xvfb avec un faux sbx : agent, sandbox, dossier (corbeille), entrée et | ||
| 105 | + place dans #kitchen supprimés, Alice gardée. `make verify` vert. Doc EN + FR (guide « Ajouter un agent », | ||
| 106 | + référence), notes v1.7.0. Reste la tâche 4 (Mac). | ||
| 107 | + - id: 2 | ||
| 108 | + author: | ||
| 109 | + name: k33g | ||
| 110 | + email: ph.charriere@gmail.com | ||
| 111 | + createdAt: 2026-11-16T07:22:19.000Z | ||
| 112 | + body: | | ||
| 113 | + Ajout : `ForgetAgent` oublie aussi les commandes `/` que l'agent avait annoncées (cache et `commands/<agent>` en | ||
| 114 | + base, `commands:changed` vide) — sinon un agent recréé sous le même nom (« ratatouille » : Vibe après un autre) | ||
| 115 | + montrait la liste de l'ancien. Test ajouté. | ||
modified
docs/en/how-to/add-an-agent.md +9 -0 | @@ -22,6 +22,15 @@ When the agent cannot be added (a name already used, for instance), the assistan | ||
| 22 | 22 | - **Codex or Gemini in an sbx sandbox**: the same, with the program `codex-acp` (kit `docker.io/sbx/codex-acp`) or `gemini` with the argument `--acp` (kit `docker.io/sbx/gemini-kit`). See [How to add a Codex agent in an sbx sandbox](add-a-codex-agent-in-a-sandbox.md) and [How to add a Gemini agent in an sbx sandbox](add-a-gemini-agent-in-a-sandbox.md). |
| 23 | 23 | - **Options the assistant does not ask for** (`env`, `afterStop`, a different `workspacePath`): add the agent with the assistant, then complete its entry in **Settings**. |
| 24 | 24 | |
| 25 | +## Delete an agent | |
| 26 | + | |
| 27 | +Open the agent's workspace (📂 on its row) and click **Delete the agent** (issue #128). The confirmation says what goes: the agent leaves the configuration and the channels, and its conversation and its history are deleted. Tick what else goes with it: | |
| 28 | + | |
| 29 | +- **remove its sandbox** (or its container), when its configuration has a remove command; | |
| 30 | +- **put its folder in the trash**, when an assistant made it in the agents' folder — a folder of your own is never offered. | |
| 31 | + | |
| 32 | +The agent is stopped and its terminals close. Its name is then free again: an assistant offers it without `-2`. What could not be removed (a sandbox sbx could not reach…) is said, with the agent deleted anyway. | |
| 33 | + | |
| 25 | 34 | ## See also |
| 26 | 35 | |
| 27 | 36 | - 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) |
| @@ -22,6 +22,15 @@ When the agent cannot be added (a name already used, for instance), the assistan | |||
| 22 | - **Codex or Gemini in an sbx sandbox**: the same, with the program `codex-acp` (kit `docker.io/sbx/codex-acp`) or `gemini` with the argument `--acp` (kit `docker.io/sbx/gemini-kit`). See [How to add a Codex agent in an sbx sandbox](add-a-codex-agent-in-a-sandbox.md) and [How to add a Gemini agent in an sbx sandbox](add-a-gemini-agent-in-a-sandbox.md). | 22 | - **Codex or Gemini in an sbx sandbox**: the same, with the program `codex-acp` (kit `docker.io/sbx/codex-acp`) or `gemini` with the argument `--acp` (kit `docker.io/sbx/gemini-kit`). See [How to add a Codex agent in an sbx sandbox](add-a-codex-agent-in-a-sandbox.md) and [How to add a Gemini agent in an sbx sandbox](add-a-gemini-agent-in-a-sandbox.md). |
| 23 | - **Options the assistant does not ask for** (`env`, `afterStop`, a different `workspacePath`): add the agent with the assistant, then complete its entry in **Settings**. | 23 | - **Options the assistant does not ask for** (`env`, `afterStop`, a different `workspacePath`): add the agent with the assistant, then complete its entry in **Settings**. |
| 24 | 24 | ||
| 25 | +## Delete an agent | ||
| 26 | + | ||
| 27 | +Open the agent's workspace (📂 on its row) and click **Delete the agent** (issue #128). The confirmation says what goes: the agent leaves the configuration and the channels, and its conversation and its history are deleted. Tick what else goes with it: | ||
| 28 | + | ||
| 29 | +- **remove its sandbox** (or its container), when its configuration has a remove command; | ||
| 30 | +- **put its folder in the trash**, when an assistant made it in the agents' folder — a folder of your own is never offered. | ||
| 31 | + | ||
| 32 | +The agent is stopped and its terminals close. Its name is then free again: an assistant offers it without `-2`. What could not be removed (a sandbox sbx could not reach…) is said, with the agent deleted anyway. | ||
| 33 | + | ||
| 25 | ## See also | 34 | ## See also |
| 26 | 35 | ||
| 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) | 36 | - 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) |
modified
docs/en/how-to/work-with-an-agents-files.md +6 -2 | @@ -56,7 +56,7 @@ An agent reads its **instructions** when its session starts: its role, its tone, | ||
| 56 | 56 | |
| 57 | 57 | - **Create from a template**: when the agent has none yet, Sidekicks writes a short template named after the agent (its role, how it answers, its rules). Fill it in with plain words. |
| 58 | 58 | - Change the text in the editor of the tab, then **Save** (⌘S, Ctrl+S on Linux and Windows); **Revert** drops your changes. If the file changed meanwhile — the agent may write it too — Sidekicks says so and writes nothing: **Reload**, then make your changes again. |
| 59 | -- **Import a file…** copies a text file of this computer as the agent's instructions (it replaces them, after you confirm). | |
| 59 | +- **Import a file…** copies a text file of this computer as the agent's instructions (it replaces them, after you confirm). You can also **drop** one text file from the Finder on the tab (issue #121): the same import, with the same confirmation. | |
| 60 | 60 | - **Delete the instructions** removes the instruction file, after you confirm (issue #122): it goes to the trash of this computer, and the tab offers the template and the import again. |
| 61 | 61 | - The agent reads its instructions when its session starts: when it is running, **Restart the agent** so that it uses the new ones. |
| 62 | 62 | |
| @@ -68,12 +68,16 @@ A **skill** teaches the agent how to do one kind of task: a folder holding a `SK | ||
| 68 | 68 | |
| 69 | 69 | - **New skill**: say what it does (its folder's name follows, in lowercase letters, digits and `-`) and when to use it, then **Create the skill**. Sidekicks writes a `SKILL.md` to fill in: when to use it, how to do it, an example. |
| 70 | 70 | - Pick a skill to read or change its `SKILL.md`, then **Save** (⌘S); a change made meanwhile is reported, as for the instructions. |
| 71 | -- **Import a skill folder…** copies a folder holding a `SKILL.md`, with its other files (scripts, examples) and without hidden ones; **Import a Markdown file…** turns one file into the `SKILL.md` of a new skill, named after the name of its front matter, else after the file. A skill that has the same name is never replaced. | |
| 71 | +- **Import a skill folder…** copies a folder holding a `SKILL.md`, with its other files (scripts, examples) and without hidden ones; **Import a Markdown file…** turns one file into the `SKILL.md` of a new skill, named after the name of its front matter, else after the file. A skill that has the same name is never replaced. You can also **drop** `.md` files and skill folders from the Finder on the list of skills (issue #120): each becomes a skill, and the ones refused are listed with why. | |
| 72 | 72 | - **Delete the skill** removes the skill you picked, after you confirm (issue #119): its whole folder — or its single file for a mini-me `<name>.md` — goes to the trash of this computer. |
| 73 | 73 | - The agent finds its skills when its session starts: when it is running, **Restart the agent**. |
| 74 | 74 | |
| 75 | 75 | The skills folders stay protected in the **Files** tab: only the **Skills** tab writes there, and deletes a skill. For an agent in a container or a sandbox, Sidekicks writes its instructions and its skills in its folder on this computer: it works even when the agent sees that folder read-only (mini-me's `.mm`), and without the sandbox running. mini-me's one-file skills (`<name>.md`) are listed too. |
| 76 | 76 | |
| 77 | +### Vibe: trust its folder | |
| 78 | + | |
| 79 | +Mistral Vibe reads the instructions and the skills of its folder only once the folder is **trusted** (issue #125). When a Vibe agent starts a session in a folder it does not trust yet and that holds instructions or skills, the conversation says so, with the files it ignores, and offers **Trust its folder**: Vibe then remembers the decision, and reads them from its next answer. Trusting the folder also lets its own Vibe settings (`.vibe/`) apply: trust only a folder you know. | |
| 80 | + | |
| 77 | 81 | ## Protect files |
| 78 | 82 | |
| 79 | 83 | Some files must not be changed or deleted by mistake. Without writing anything, the agent's instructions (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — written only from the **Instructions** tab), its skills (`skills/` and all it holds), its configuration file (after `--config` or `serve acp` in its `args`) and, for an agent in a container or a sandbox, the files it is built from (`compose.yaml`, `Dockerfile`, `sbxenv.yaml` named by its `runtime.lifecycle`) are protected. To protect others, list them under the agent in **Settings**: |
| @@ -56,7 +56,7 @@ An agent reads its **instructions** when its session starts: its role, its tone, | |||
| 56 | 56 | ||
| 57 | - **Create from a template**: when the agent has none yet, Sidekicks writes a short template named after the agent (its role, how it answers, its rules). Fill it in with plain words. | 57 | - **Create from a template**: when the agent has none yet, Sidekicks writes a short template named after the agent (its role, how it answers, its rules). Fill it in with plain words. |
| 58 | - Change the text in the editor of the tab, then **Save** (⌘S, Ctrl+S on Linux and Windows); **Revert** drops your changes. If the file changed meanwhile — the agent may write it too — Sidekicks says so and writes nothing: **Reload**, then make your changes again. | 58 | - Change the text in the editor of the tab, then **Save** (⌘S, Ctrl+S on Linux and Windows); **Revert** drops your changes. If the file changed meanwhile — the agent may write it too — Sidekicks says so and writes nothing: **Reload**, then make your changes again. |
| 59 | -- **Import a file…** copies a text file of this computer as the agent's instructions (it replaces them, after you confirm). | 59 | +- **Import a file…** copies a text file of this computer as the agent's instructions (it replaces them, after you confirm). You can also **drop** one text file from the Finder on the tab (issue #121): the same import, with the same confirmation. |
| 60 | - **Delete the instructions** removes the instruction file, after you confirm (issue #122): it goes to the trash of this computer, and the tab offers the template and the import again. | 60 | - **Delete the instructions** removes the instruction file, after you confirm (issue #122): it goes to the trash of this computer, and the tab offers the template and the import again. |
| 61 | - The agent reads its instructions when its session starts: when it is running, **Restart the agent** so that it uses the new ones. | 61 | - The agent reads its instructions when its session starts: when it is running, **Restart the agent** so that it uses the new ones. |
| 62 | 62 | ||
| @@ -68,12 +68,16 @@ A **skill** teaches the agent how to do one kind of task: a folder holding a `SK | |||
| 68 | 68 | ||
| 69 | - **New skill**: say what it does (its folder's name follows, in lowercase letters, digits and `-`) and when to use it, then **Create the skill**. Sidekicks writes a `SKILL.md` to fill in: when to use it, how to do it, an example. | 69 | - **New skill**: say what it does (its folder's name follows, in lowercase letters, digits and `-`) and when to use it, then **Create the skill**. Sidekicks writes a `SKILL.md` to fill in: when to use it, how to do it, an example. |
| 70 | - Pick a skill to read or change its `SKILL.md`, then **Save** (⌘S); a change made meanwhile is reported, as for the instructions. | 70 | - Pick a skill to read or change its `SKILL.md`, then **Save** (⌘S); a change made meanwhile is reported, as for the instructions. |
| 71 | -- **Import a skill folder…** copies a folder holding a `SKILL.md`, with its other files (scripts, examples) and without hidden ones; **Import a Markdown file…** turns one file into the `SKILL.md` of a new skill, named after the name of its front matter, else after the file. A skill that has the same name is never replaced. | 71 | +- **Import a skill folder…** copies a folder holding a `SKILL.md`, with its other files (scripts, examples) and without hidden ones; **Import a Markdown file…** turns one file into the `SKILL.md` of a new skill, named after the name of its front matter, else after the file. A skill that has the same name is never replaced. You can also **drop** `.md` files and skill folders from the Finder on the list of skills (issue #120): each becomes a skill, and the ones refused are listed with why. |
| 72 | - **Delete the skill** removes the skill you picked, after you confirm (issue #119): its whole folder — or its single file for a mini-me `<name>.md` — goes to the trash of this computer. | 72 | - **Delete the skill** removes the skill you picked, after you confirm (issue #119): its whole folder — or its single file for a mini-me `<name>.md` — goes to the trash of this computer. |
| 73 | - The agent finds its skills when its session starts: when it is running, **Restart the agent**. | 73 | - The agent finds its skills when its session starts: when it is running, **Restart the agent**. |
| 74 | 74 | ||
| 75 | The skills folders stay protected in the **Files** tab: only the **Skills** tab writes there, and deletes a skill. For an agent in a container or a sandbox, Sidekicks writes its instructions and its skills in its folder on this computer: it works even when the agent sees that folder read-only (mini-me's `.mm`), and without the sandbox running. mini-me's one-file skills (`<name>.md`) are listed too. | 75 | The skills folders stay protected in the **Files** tab: only the **Skills** tab writes there, and deletes a skill. For an agent in a container or a sandbox, Sidekicks writes its instructions and its skills in its folder on this computer: it works even when the agent sees that folder read-only (mini-me's `.mm`), and without the sandbox running. mini-me's one-file skills (`<name>.md`) are listed too. |
| 76 | 76 | ||
| 77 | +### Vibe: trust its folder | ||
| 78 | + | ||
| 79 | +Mistral Vibe reads the instructions and the skills of its folder only once the folder is **trusted** (issue #125). When a Vibe agent starts a session in a folder it does not trust yet and that holds instructions or skills, the conversation says so, with the files it ignores, and offers **Trust its folder**: Vibe then remembers the decision, and reads them from its next answer. Trusting the folder also lets its own Vibe settings (`.vibe/`) apply: trust only a folder you know. | ||
| 80 | + | ||
| 77 | ## Protect files | 81 | ## Protect files |
| 78 | 82 | ||
| 79 | Some files must not be changed or deleted by mistake. Without writing anything, the agent's instructions (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — written only from the **Instructions** tab), its skills (`skills/` and all it holds), its configuration file (after `--config` or `serve acp` in its `args`) and, for an agent in a container or a sandbox, the files it is built from (`compose.yaml`, `Dockerfile`, `sbxenv.yaml` named by its `runtime.lifecycle`) are protected. To protect others, list them under the agent in **Settings**: | 83 | Some files must not be changed or deleted by mistake. Without writing anything, the agent's instructions (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — written only from the **Instructions** tab), its skills (`skills/` and all it holds), its configuration file (after `--config` or `serve acp` in its `args`) and, for an agent in a container or a sandbox, the files it is built from (`compose.yaml`, `Dockerfile`, `sbxenv.yaml` named by its `runtime.lifecycle`) are protected. To protect others, list them under the agent in **Settings**: |
modified
docs/en/reference/agents-and-events.md +3 -1 | @@ -147,6 +147,7 @@ A tool call has `id, title, kind` (`read, edit, delete, move, search, execute, t | ||
| 147 | 147 | | `AnswerForm(id, answer)` | Answers a pending form: `{action: "accept", content: {name: value…}}`, `decline` or `cancel`. An unknown form or action is an error. | |
| 148 | 148 | | `Conversation(id)` | `channel, messages` (the last 100), `more, busy, queued, answering, answerers, usage{agent: …}, permissions, forms`. | |
| 149 | 149 | | `Older(id, beforeId)` | `{messages, more}`: the 100 messages before `beforeId`. | |
| 150 | +| `TrustFolder(id, agent)` | Tells the agent to trust its folder for good, from its session in channel `id` (issue #125): Mistral Vibe ignores a folder's `AGENTS.md`, skills and `.vibe/` until it is trusted. Sends the ACP extension `_trust/decision` (`trust_cwd`, else `trust_repo`, from the decisions the agent offered in the `_meta.workspace_trust` of its `session/new` answer), then opens a new session at the agent's next turn. A session that opens on an untrusted folder holding such files adds a `workspace-untrusted` system message (`error`: the files); trusting it, `workspace-trusted`. | | |
| 150 | 151 | | `Prompts(id)` | The last 100 messages the user wrote in the channel (or direct conversation) `id`, oldest first, without consecutive repeats, read from the history: what ↑ brings back in its message box (issue #118). | |
| 151 | 152 | | `Commands(agent)` | The commands the agent announced last, kept from one run to the next; empty if it never announced any. | |
| 152 | 153 | | `Prepare(id)` | Starts the members of the channel that never announced their commands and opens their session for it (no model is loaded); returns once the sessions are open, the commands arrive as `commands:changed`. A member answering elsewhere is skipped. The session serves the member's first answer, which is still told the channel's past. | |
| @@ -192,7 +193,7 @@ A file opened for editing has `path, content, version`; `version` identifies the | ||
| 192 | 193 | | `Read(agent, path)` | A text file of at most 1 MB; a binary or larger file is an error. | |
| 193 | 194 | | `Instructions(agent)` | The agent's instructions (issue #113): `{file, exists, content, version, files}` — the first of `files` (from its program: `CLAUDE.md` then `AGENTS.md` for Claude, `AGENTS.md` then `GEMINI.md` for Antigravity, else `AGENTS.md`) that exists at the root of its folder, else the first one, to create. | |
| 194 | 195 | | `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `DeleteInstructions(agent)`, `ChooseInstructions()` | Write the instruction file — the only way to, as it is protected (`protect`): from a template (refused when it exists), edited over `version` (`{instructions, conflict}`; `conflict` and nothing written when it changed), or copied from a UTF-8 text file of this computer (1 MiB at most; replaces it). `DeleteInstructions` removes that file only, to the trash on this computer (issue #122). For an agent in a container or a sandbox, its folder on this computer is used when it exists. | |
| 195 | -| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | The agent's skills (issue #112): `{dir, skills: [{folder, name, description, path}]}` — the folders of its skills folder (from its program: `.claude/skills` for Claude, `.vibe/skills` for Vibe, `skills` or the `skillsDir` of its `agent.yaml` for mini-me, else `.agents/skills`) that hold a `SKILL.md`, with the `name` and `description` of its front matter. Create (`name`: lowercase letters, digits and `-`; refused when taken), save a `SKILL.md` over `version` (`{file, conflict}`), import a folder holding a `SKILL.md` (its files, hidden ones aside; 200 files and 20 MiB at most) or one Markdown file (becomes `<name>/SKILL.md`); mini-me's `<name>.md` skills are listed too. `DeleteSkill` removes a skill's folder (or its `<name>.md`), to the trash on this computer, nothing else (issue #119). For an agent in a container or a sandbox, its folder on this computer is read and written when it exists. | | |
| 196 | +| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | The agent's skills (issue #112): `{dir, skills: [{folder, name, description, path}]}` — the folders of its skills folder (from its program: `.claude/skills` for Claude, `.vibe/skills` for Vibe, `skills` or the `skillsDir` of its `agent.yaml` for mini-me, else `.agents/skills`) that hold a `SKILL.md`, with the `name` and `description` of its front matter. Create (`name`: lowercase letters, digits and `-`; refused when taken), save a `SKILL.md` over `version` (`{file, conflict}`), import a folder holding a `SKILL.md` (its files, hidden ones aside; 200 files and 20 MiB at most) or one Markdown file (`.md`, becomes `<name>/SKILL.md`; another file is refused); mini-me's `<name>.md` skills are listed too. `DeleteSkill` removes a skill's folder (or its `<name>.md`), to the trash on this computer, nothing else (issue #119). For an agent in a container or a sandbox, its folder on this computer is read and written when it exists. | | |
| 196 | 197 | | `Save(agent, path, content, version)` | Writes the file if it still has `version`; otherwise `{conflict: true}` and nothing is written. An empty `version` overwrites. The file is written next to its place and moved over it. | |
| 197 | 198 | | `Create(agent, dir, name)` | Creates an empty file; refused if the name exists or contains `/`. | |
| 198 | 199 | | `Remove(agent, path)` | Deletes a file or a folder with its content (see the table above). | |
| @@ -242,6 +243,7 @@ A file opened for editing has `path, content, version`; `version` identifies the | ||
| 242 | 243 | | `ReadCompose(path)` | Reads a Docker Compose file for the assistant: `folder`, and each service's `name, container, createCommand, stopCommand, removeCommand`. A file without services is an error. | |
| 243 | 244 | | `ChooseCompose()` | The native file dialog, for a Compose file. | |
| 244 | 245 | | `Reset(choice)` | The Danger zone: `settings` (default configuration, preferences forgotten), `history` (this configuration's), `allHistory` (every configuration's) or `everything`. Each thing reset is first kept as a dated copy; returns `{copies[]}`. The history is reopened empty and the declared channels created again; then `config:changed` is sent. | |
| 246 | +| `Removal(agent)`, `DeleteAgent(agent, {sandbox, folder})` | Deleting an agent (issue #128). `Removal` says what may go with it: `sandbox` (its `runtime.lifecycle` has a remove command) and `folder` (its folder when it is directly in `agentsFolder` — the lifecycle folder, else the workspace — i.e. made by an assistant; otherwise `""`). `DeleteAgent` stops it, runs the remove command when `sandbox`, deletes its direct conversation and takes it out of the channels in the history, removes its entry from the configuration and from the `agents` of the channels the file declares (comments kept), and puts its folder in the trash when `folder`. Returns `{problems[]}`: what could not be done; only the configuration failing is an error. Its name is then free again. | | |
| 245 | 247 | |
| 246 | 248 | ## `CreatorService` |
| 247 | 249 | |
| @@ -147,6 +147,7 @@ A tool call has `id, title, kind` (`read, edit, delete, move, search, execute, t | |||
| 147 | | `AnswerForm(id, answer)` | Answers a pending form: `{action: "accept", content: {name: value…}}`, `decline` or `cancel`. An unknown form or action is an error. | | 147 | | `AnswerForm(id, answer)` | Answers a pending form: `{action: "accept", content: {name: value…}}`, `decline` or `cancel`. An unknown form or action is an error. | |
| 148 | | `Conversation(id)` | `channel, messages` (the last 100), `more, busy, queued, answering, answerers, usage{agent: …}, permissions, forms`. | | 148 | | `Conversation(id)` | `channel, messages` (the last 100), `more, busy, queued, answering, answerers, usage{agent: …}, permissions, forms`. | |
| 149 | | `Older(id, beforeId)` | `{messages, more}`: the 100 messages before `beforeId`. | | 149 | | `Older(id, beforeId)` | `{messages, more}`: the 100 messages before `beforeId`. | |
| 150 | +| `TrustFolder(id, agent)` | Tells the agent to trust its folder for good, from its session in channel `id` (issue #125): Mistral Vibe ignores a folder's `AGENTS.md`, skills and `.vibe/` until it is trusted. Sends the ACP extension `_trust/decision` (`trust_cwd`, else `trust_repo`, from the decisions the agent offered in the `_meta.workspace_trust` of its `session/new` answer), then opens a new session at the agent's next turn. A session that opens on an untrusted folder holding such files adds a `workspace-untrusted` system message (`error`: the files); trusting it, `workspace-trusted`. | | ||
| 150 | | `Prompts(id)` | The last 100 messages the user wrote in the channel (or direct conversation) `id`, oldest first, without consecutive repeats, read from the history: what ↑ brings back in its message box (issue #118). | | 151 | | `Prompts(id)` | The last 100 messages the user wrote in the channel (or direct conversation) `id`, oldest first, without consecutive repeats, read from the history: what ↑ brings back in its message box (issue #118). | |
| 151 | | `Commands(agent)` | The commands the agent announced last, kept from one run to the next; empty if it never announced any. | | 152 | | `Commands(agent)` | The commands the agent announced last, kept from one run to the next; empty if it never announced any. | |
| 152 | | `Prepare(id)` | Starts the members of the channel that never announced their commands and opens their session for it (no model is loaded); returns once the sessions are open, the commands arrive as `commands:changed`. A member answering elsewhere is skipped. The session serves the member's first answer, which is still told the channel's past. | | 153 | | `Prepare(id)` | Starts the members of the channel that never announced their commands and opens their session for it (no model is loaded); returns once the sessions are open, the commands arrive as `commands:changed`. A member answering elsewhere is skipped. The session serves the member's first answer, which is still told the channel's past. | |
| @@ -192,7 +193,7 @@ A file opened for editing has `path, content, version`; `version` identifies the | |||
| 192 | | `Read(agent, path)` | A text file of at most 1 MB; a binary or larger file is an error. | | 193 | | `Read(agent, path)` | A text file of at most 1 MB; a binary or larger file is an error. | |
| 193 | | `Instructions(agent)` | The agent's instructions (issue #113): `{file, exists, content, version, files}` — the first of `files` (from its program: `CLAUDE.md` then `AGENTS.md` for Claude, `AGENTS.md` then `GEMINI.md` for Antigravity, else `AGENTS.md`) that exists at the root of its folder, else the first one, to create. | | 194 | | `Instructions(agent)` | The agent's instructions (issue #113): `{file, exists, content, version, files}` — the first of `files` (from its program: `CLAUDE.md` then `AGENTS.md` for Claude, `AGENTS.md` then `GEMINI.md` for Antigravity, else `AGENTS.md`) that exists at the root of its folder, else the first one, to create. | |
| 194 | | `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `DeleteInstructions(agent)`, `ChooseInstructions()` | Write the instruction file — the only way to, as it is protected (`protect`): from a template (refused when it exists), edited over `version` (`{instructions, conflict}`; `conflict` and nothing written when it changed), or copied from a UTF-8 text file of this computer (1 MiB at most; replaces it). `DeleteInstructions` removes that file only, to the trash on this computer (issue #122). For an agent in a container or a sandbox, its folder on this computer is used when it exists. | | 195 | | `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `DeleteInstructions(agent)`, `ChooseInstructions()` | Write the instruction file — the only way to, as it is protected (`protect`): from a template (refused when it exists), edited over `version` (`{instructions, conflict}`; `conflict` and nothing written when it changed), or copied from a UTF-8 text file of this computer (1 MiB at most; replaces it). `DeleteInstructions` removes that file only, to the trash on this computer (issue #122). For an agent in a container or a sandbox, its folder on this computer is used when it exists. | |
| 195 | -| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | The agent's skills (issue #112): `{dir, skills: [{folder, name, description, path}]}` — the folders of its skills folder (from its program: `.claude/skills` for Claude, `.vibe/skills` for Vibe, `skills` or the `skillsDir` of its `agent.yaml` for mini-me, else `.agents/skills`) that hold a `SKILL.md`, with the `name` and `description` of its front matter. Create (`name`: lowercase letters, digits and `-`; refused when taken), save a `SKILL.md` over `version` (`{file, conflict}`), import a folder holding a `SKILL.md` (its files, hidden ones aside; 200 files and 20 MiB at most) or one Markdown file (becomes `<name>/SKILL.md`); mini-me's `<name>.md` skills are listed too. `DeleteSkill` removes a skill's folder (or its `<name>.md`), to the trash on this computer, nothing else (issue #119). For an agent in a container or a sandbox, its folder on this computer is read and written when it exists. | | 196 | +| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | The agent's skills (issue #112): `{dir, skills: [{folder, name, description, path}]}` — the folders of its skills folder (from its program: `.claude/skills` for Claude, `.vibe/skills` for Vibe, `skills` or the `skillsDir` of its `agent.yaml` for mini-me, else `.agents/skills`) that hold a `SKILL.md`, with the `name` and `description` of its front matter. Create (`name`: lowercase letters, digits and `-`; refused when taken), save a `SKILL.md` over `version` (`{file, conflict}`), import a folder holding a `SKILL.md` (its files, hidden ones aside; 200 files and 20 MiB at most) or one Markdown file (`.md`, becomes `<name>/SKILL.md`; another file is refused); mini-me's `<name>.md` skills are listed too. `DeleteSkill` removes a skill's folder (or its `<name>.md`), to the trash on this computer, nothing else (issue #119). For an agent in a container or a sandbox, its folder on this computer is read and written when it exists. | |
| 196 | | `Save(agent, path, content, version)` | Writes the file if it still has `version`; otherwise `{conflict: true}` and nothing is written. An empty `version` overwrites. The file is written next to its place and moved over it. | | 197 | | `Save(agent, path, content, version)` | Writes the file if it still has `version`; otherwise `{conflict: true}` and nothing is written. An empty `version` overwrites. The file is written next to its place and moved over it. | |
| 197 | | `Create(agent, dir, name)` | Creates an empty file; refused if the name exists or contains `/`. | | 198 | | `Create(agent, dir, name)` | Creates an empty file; refused if the name exists or contains `/`. | |
| 198 | | `Remove(agent, path)` | Deletes a file or a folder with its content (see the table above). | | 199 | | `Remove(agent, path)` | Deletes a file or a folder with its content (see the table above). | |
| @@ -242,6 +243,7 @@ A file opened for editing has `path, content, version`; `version` identifies the | |||
| 242 | | `ReadCompose(path)` | Reads a Docker Compose file for the assistant: `folder`, and each service's `name, container, createCommand, stopCommand, removeCommand`. A file without services is an error. | | 243 | | `ReadCompose(path)` | Reads a Docker Compose file for the assistant: `folder`, and each service's `name, container, createCommand, stopCommand, removeCommand`. A file without services is an error. | |
| 243 | | `ChooseCompose()` | The native file dialog, for a Compose file. | | 244 | | `ChooseCompose()` | The native file dialog, for a Compose file. | |
| 244 | | `Reset(choice)` | The Danger zone: `settings` (default configuration, preferences forgotten), `history` (this configuration's), `allHistory` (every configuration's) or `everything`. Each thing reset is first kept as a dated copy; returns `{copies[]}`. The history is reopened empty and the declared channels created again; then `config:changed` is sent. | | 245 | | `Reset(choice)` | The Danger zone: `settings` (default configuration, preferences forgotten), `history` (this configuration's), `allHistory` (every configuration's) or `everything`. Each thing reset is first kept as a dated copy; returns `{copies[]}`. The history is reopened empty and the declared channels created again; then `config:changed` is sent. | |
| 246 | +| `Removal(agent)`, `DeleteAgent(agent, {sandbox, folder})` | Deleting an agent (issue #128). `Removal` says what may go with it: `sandbox` (its `runtime.lifecycle` has a remove command) and `folder` (its folder when it is directly in `agentsFolder` — the lifecycle folder, else the workspace — i.e. made by an assistant; otherwise `""`). `DeleteAgent` stops it, runs the remove command when `sandbox`, deletes its direct conversation and takes it out of the channels in the history, removes its entry from the configuration and from the `agents` of the channels the file declares (comments kept), and puts its folder in the trash when `folder`. Returns `{problems[]}`: what could not be done; only the configuration failing is an error. Its name is then free again. | | ||
| 245 | 247 | ||
| 246 | ## `CreatorService` | 248 | ## `CreatorService` |
| 247 | 249 | ||
modified
docs/fr/how-to/ajouter-un-agent.md +9 -0 | @@ -22,6 +22,15 @@ Quand l'agent ne peut pas être ajouté (un nom déjà pris, par exemple), l'ass | ||
| 22 | 22 | - **Codex ou Gemini dans une sandbox sbx** : de même, avec le programme `codex-acp` (kit `docker.io/sbx/codex-acp`) ou `gemini` avec l'argument `--acp` (kit `docker.io/sbx/gemini-kit`). Voir [Ajouter un agent Codex dans une sandbox sbx](ajouter-un-agent-codex-dans-une-sandbox.md) et [Ajouter un agent Gemini dans une sandbox sbx](ajouter-un-agent-gemini-dans-une-sandbox.md). |
| 23 | 23 | - **Les options que l'assistant ne demande pas** (`env`, `afterStop`, un autre `workspacePath`) : ajoutez l'agent avec l'assistant, puis complétez son entrée dans **Settings**. |
| 24 | 24 | |
| 25 | +## Supprimer un agent | |
| 26 | + | |
| 27 | +Ouvrez le workspace de l'agent (📂 sur sa ligne) et cliquez sur **Supprimer l'agent** (issue #128). La confirmation dit ce qui part : l'agent quitte la configuration et les channels, et sa conversation et son historique sont supprimés. Cochez ce qui part avec lui : | |
| 28 | + | |
| 29 | +- **supprimer sa sandbox** (ou son conteneur), quand sa configuration a une commande de suppression ; | |
| 30 | +- **mettre son dossier à la corbeille**, quand un assistant l'a créé dans le dossier des agents — un dossier à vous n'est jamais proposé. | |
| 31 | + | |
| 32 | +L'agent est arrêté et ses terminaux se ferment. Son nom est ensuite de nouveau libre : un assistant le propose sans `-2`. Ce qui n'a pas pu être supprimé (une sandbox que sbx n'a pas pu joindre…) est dit, l'agent étant supprimé quand même. | |
| 33 | + | |
| 25 | 34 | ## Voir aussi |
| 26 | 35 | |
| 27 | 36 | - 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) |
| @@ -22,6 +22,15 @@ Quand l'agent ne peut pas être ajouté (un nom déjà pris, par exemple), l'ass | |||
| 22 | - **Codex ou Gemini dans une sandbox sbx** : de même, avec le programme `codex-acp` (kit `docker.io/sbx/codex-acp`) ou `gemini` avec l'argument `--acp` (kit `docker.io/sbx/gemini-kit`). Voir [Ajouter un agent Codex dans une sandbox sbx](ajouter-un-agent-codex-dans-une-sandbox.md) et [Ajouter un agent Gemini dans une sandbox sbx](ajouter-un-agent-gemini-dans-une-sandbox.md). | 22 | - **Codex ou Gemini dans une sandbox sbx** : de même, avec le programme `codex-acp` (kit `docker.io/sbx/codex-acp`) ou `gemini` avec l'argument `--acp` (kit `docker.io/sbx/gemini-kit`). Voir [Ajouter un agent Codex dans une sandbox sbx](ajouter-un-agent-codex-dans-une-sandbox.md) et [Ajouter un agent Gemini dans une sandbox sbx](ajouter-un-agent-gemini-dans-une-sandbox.md). |
| 23 | - **Les options que l'assistant ne demande pas** (`env`, `afterStop`, un autre `workspacePath`) : ajoutez l'agent avec l'assistant, puis complétez son entrée dans **Settings**. | 23 | - **Les options que l'assistant ne demande pas** (`env`, `afterStop`, un autre `workspacePath`) : ajoutez l'agent avec l'assistant, puis complétez son entrée dans **Settings**. |
| 24 | 24 | ||
| 25 | +## Supprimer un agent | ||
| 26 | + | ||
| 27 | +Ouvrez le workspace de l'agent (📂 sur sa ligne) et cliquez sur **Supprimer l'agent** (issue #128). La confirmation dit ce qui part : l'agent quitte la configuration et les channels, et sa conversation et son historique sont supprimés. Cochez ce qui part avec lui : | ||
| 28 | + | ||
| 29 | +- **supprimer sa sandbox** (ou son conteneur), quand sa configuration a une commande de suppression ; | ||
| 30 | +- **mettre son dossier à la corbeille**, quand un assistant l'a créé dans le dossier des agents — un dossier à vous n'est jamais proposé. | ||
| 31 | + | ||
| 32 | +L'agent est arrêté et ses terminaux se ferment. Son nom est ensuite de nouveau libre : un assistant le propose sans `-2`. Ce qui n'a pas pu être supprimé (une sandbox que sbx n'a pas pu joindre…) est dit, l'agent étant supprimé quand même. | ||
| 33 | + | ||
| 25 | ## Voir aussi | 34 | ## Voir aussi |
| 26 | 35 | ||
| 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) | 36 | - 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) |
modified
docs/fr/how-to/fichiers-et-terminal-d-un-agent.md +6 -2 | @@ -56,7 +56,7 @@ Un agent lit ses **instructions** au début de sa session : son rôle, son ton, | ||
| 56 | 56 | |
| 57 | 57 | - **Créer depuis un modèle** : quand l'agent n'en a pas encore, Sidekicks écrit un court modèle à son nom (son rôle, comment il répond, ses règles). Complétez-le avec des mots simples. |
| 58 | 58 | - Modifiez le texte dans l'éditeur de l'onglet, puis **Enregistrer** (⌘S, Ctrl+S sous Linux et Windows) ; **Annuler les changements** abandonne vos modifications. Si le fichier a changé entre-temps — l'agent peut l'écrire aussi —, Sidekicks le dit et n'écrit rien : **Recharger**, puis refaites vos changements. |
| 59 | -- **Importer un fichier…** copie un fichier texte de cet ordinateur comme instructions de l'agent (il les remplace, après confirmation). | |
| 59 | +- **Importer un fichier…** copie un fichier texte de cet ordinateur comme instructions de l'agent (il les remplace, après confirmation). Vous pouvez aussi **déposer** un fichier texte depuis le Finder sur l'onglet (issue #121) : le même import, avec la même confirmation. | |
| 60 | 60 | - **Supprimer les instructions** retire le fichier d'instructions, après confirmation (issue #122) : il part à la corbeille de cet ordinateur, et l'onglet propose de nouveau le modèle et l'import. |
| 61 | 61 | - L'agent lit ses instructions au début de sa session : s'il tourne, **Redémarrer l'agent** pour qu'il utilise les nouvelles. |
| 62 | 62 | |
| @@ -68,12 +68,16 @@ Une **skill** apprend à l'agent à faire un type de tâche : un dossier qui con | ||
| 68 | 68 | |
| 69 | 69 | - **Nouvelle skill** : dites ce qu'elle fait (le nom de son dossier suit, en minuscules, chiffres et `-`) et quand l'utiliser, puis **Créer la skill**. Sidekicks écrit un `SKILL.md` à compléter : quand l'utiliser, comment faire, un exemple. |
| 70 | 70 | - Choisissez une skill pour lire ou modifier son `SKILL.md`, puis **Enregistrer** (⌘S) ; un changement fait entre-temps est signalé, comme pour les instructions. |
| 71 | -- **Importer le dossier d'une skill…** copie un dossier qui contient un `SKILL.md`, avec ses autres fichiers (scripts, exemples) et sans les fichiers cachés ; **Importer un fichier Markdown…** fait d'un fichier le `SKILL.md` d'une nouvelle skill, nommée d'après le nom de son en-tête, sinon d'après le fichier. Une skill qui porte déjà ce nom n'est jamais remplacée. | |
| 71 | +- **Importer le dossier d'une skill…** copie un dossier qui contient un `SKILL.md`, avec ses autres fichiers (scripts, exemples) et sans les fichiers cachés ; **Importer un fichier Markdown…** fait d'un fichier le `SKILL.md` d'une nouvelle skill, nommée d'après le nom de son en-tête, sinon d'après le fichier. Une skill qui porte déjà ce nom n'est jamais remplacée. Vous pouvez aussi **déposer** des fichiers `.md` et des dossiers de skills depuis le Finder sur la liste des skills (issue #120) : chacun devient une skill, et ceux qui sont refusés sont listés avec la raison. | |
| 72 | 72 | - **Supprimer la skill** retire la skill choisie, après confirmation (issue #119) : tout son dossier — ou son seul fichier pour un `<nom>.md` de mini-me — part à la corbeille de cet ordinateur. |
| 73 | 73 | - L'agent découvre ses skills au début de sa session : s'il tourne, **Redémarrer l'agent**. |
| 74 | 74 | |
| 75 | 75 | Les dossiers de skills restent protégés dans l'onglet **Fichiers** : seul l'onglet **Skills** y écrit, et supprime une skill. Pour un agent dans un conteneur ou une sandbox, Sidekicks écrit ses instructions et ses skills dans son dossier sur cet ordinateur : ça marche même quand l'agent voit ce dossier en lecture seule (le `.mm` de mini-me), et sans que la sandbox tourne. Les skills d'un seul fichier de mini-me (`<nom>.md`) sont listées aussi. |
| 76 | 76 | |
| 77 | +### Vibe : faire confiance à son dossier | |
| 78 | + | |
| 79 | +Mistral Vibe ne lit les instructions et les skills de son dossier qu'une fois le dossier **de confiance** (issue #125). Quand un agent Vibe ouvre une session dans un dossier auquel il ne fait pas encore confiance et qui contient des instructions ou des skills, la conversation le dit, avec les fichiers ignorés, et propose **Faire confiance à son dossier** : Vibe retient la décision, et les lit dès sa prochaine réponse. Faire confiance au dossier laisse aussi s'appliquer ses propres réglages Vibe (`.vibe/`) : ne faites confiance qu'à un dossier que vous connaissez. | |
| 80 | + | |
| 77 | 81 | ## Protéger des fichiers |
| 78 | 82 | |
| 79 | 83 | Certains fichiers ne doivent pas être modifiés ou supprimés par erreur. Sans rien écrire, les instructions de l'agent (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — écrites seulement depuis l'onglet **Instructions**), ses skills (`skills/` et tout ce qu'il contient), son fichier de configuration (après `--config` ou `serve acp` dans ses `args`) et, pour un agent en conteneur ou en sandbox, les fichiers à partir desquels il est construit (`compose.yaml`, `Dockerfile`, `sbxenv.yaml` cités par son `runtime.lifecycle`) sont protégés. Pour en protéger d'autres, listez-les sous l'agent dans **Settings** : |
| @@ -56,7 +56,7 @@ Un agent lit ses **instructions** au début de sa session : son rôle, son ton, | |||
| 56 | 56 | ||
| 57 | - **Créer depuis un modèle** : quand l'agent n'en a pas encore, Sidekicks écrit un court modèle à son nom (son rôle, comment il répond, ses règles). Complétez-le avec des mots simples. | 57 | - **Créer depuis un modèle** : quand l'agent n'en a pas encore, Sidekicks écrit un court modèle à son nom (son rôle, comment il répond, ses règles). Complétez-le avec des mots simples. |
| 58 | - Modifiez le texte dans l'éditeur de l'onglet, puis **Enregistrer** (⌘S, Ctrl+S sous Linux et Windows) ; **Annuler les changements** abandonne vos modifications. Si le fichier a changé entre-temps — l'agent peut l'écrire aussi —, Sidekicks le dit et n'écrit rien : **Recharger**, puis refaites vos changements. | 58 | - Modifiez le texte dans l'éditeur de l'onglet, puis **Enregistrer** (⌘S, Ctrl+S sous Linux et Windows) ; **Annuler les changements** abandonne vos modifications. Si le fichier a changé entre-temps — l'agent peut l'écrire aussi —, Sidekicks le dit et n'écrit rien : **Recharger**, puis refaites vos changements. |
| 59 | -- **Importer un fichier…** copie un fichier texte de cet ordinateur comme instructions de l'agent (il les remplace, après confirmation). | 59 | +- **Importer un fichier…** copie un fichier texte de cet ordinateur comme instructions de l'agent (il les remplace, après confirmation). Vous pouvez aussi **déposer** un fichier texte depuis le Finder sur l'onglet (issue #121) : le même import, avec la même confirmation. |
| 60 | - **Supprimer les instructions** retire le fichier d'instructions, après confirmation (issue #122) : il part à la corbeille de cet ordinateur, et l'onglet propose de nouveau le modèle et l'import. | 60 | - **Supprimer les instructions** retire le fichier d'instructions, après confirmation (issue #122) : il part à la corbeille de cet ordinateur, et l'onglet propose de nouveau le modèle et l'import. |
| 61 | - L'agent lit ses instructions au début de sa session : s'il tourne, **Redémarrer l'agent** pour qu'il utilise les nouvelles. | 61 | - L'agent lit ses instructions au début de sa session : s'il tourne, **Redémarrer l'agent** pour qu'il utilise les nouvelles. |
| 62 | 62 | ||
| @@ -68,12 +68,16 @@ Une **skill** apprend à l'agent à faire un type de tâche : un dossier qui con | |||
| 68 | 68 | ||
| 69 | - **Nouvelle skill** : dites ce qu'elle fait (le nom de son dossier suit, en minuscules, chiffres et `-`) et quand l'utiliser, puis **Créer la skill**. Sidekicks écrit un `SKILL.md` à compléter : quand l'utiliser, comment faire, un exemple. | 69 | - **Nouvelle skill** : dites ce qu'elle fait (le nom de son dossier suit, en minuscules, chiffres et `-`) et quand l'utiliser, puis **Créer la skill**. Sidekicks écrit un `SKILL.md` à compléter : quand l'utiliser, comment faire, un exemple. |
| 70 | - Choisissez une skill pour lire ou modifier son `SKILL.md`, puis **Enregistrer** (⌘S) ; un changement fait entre-temps est signalé, comme pour les instructions. | 70 | - Choisissez une skill pour lire ou modifier son `SKILL.md`, puis **Enregistrer** (⌘S) ; un changement fait entre-temps est signalé, comme pour les instructions. |
| 71 | -- **Importer le dossier d'une skill…** copie un dossier qui contient un `SKILL.md`, avec ses autres fichiers (scripts, exemples) et sans les fichiers cachés ; **Importer un fichier Markdown…** fait d'un fichier le `SKILL.md` d'une nouvelle skill, nommée d'après le nom de son en-tête, sinon d'après le fichier. Une skill qui porte déjà ce nom n'est jamais remplacée. | 71 | +- **Importer le dossier d'une skill…** copie un dossier qui contient un `SKILL.md`, avec ses autres fichiers (scripts, exemples) et sans les fichiers cachés ; **Importer un fichier Markdown…** fait d'un fichier le `SKILL.md` d'une nouvelle skill, nommée d'après le nom de son en-tête, sinon d'après le fichier. Une skill qui porte déjà ce nom n'est jamais remplacée. Vous pouvez aussi **déposer** des fichiers `.md` et des dossiers de skills depuis le Finder sur la liste des skills (issue #120) : chacun devient une skill, et ceux qui sont refusés sont listés avec la raison. |
| 72 | - **Supprimer la skill** retire la skill choisie, après confirmation (issue #119) : tout son dossier — ou son seul fichier pour un `<nom>.md` de mini-me — part à la corbeille de cet ordinateur. | 72 | - **Supprimer la skill** retire la skill choisie, après confirmation (issue #119) : tout son dossier — ou son seul fichier pour un `<nom>.md` de mini-me — part à la corbeille de cet ordinateur. |
| 73 | - L'agent découvre ses skills au début de sa session : s'il tourne, **Redémarrer l'agent**. | 73 | - L'agent découvre ses skills au début de sa session : s'il tourne, **Redémarrer l'agent**. |
| 74 | 74 | ||
| 75 | Les dossiers de skills restent protégés dans l'onglet **Fichiers** : seul l'onglet **Skills** y écrit, et supprime une skill. Pour un agent dans un conteneur ou une sandbox, Sidekicks écrit ses instructions et ses skills dans son dossier sur cet ordinateur : ça marche même quand l'agent voit ce dossier en lecture seule (le `.mm` de mini-me), et sans que la sandbox tourne. Les skills d'un seul fichier de mini-me (`<nom>.md`) sont listées aussi. | 75 | Les dossiers de skills restent protégés dans l'onglet **Fichiers** : seul l'onglet **Skills** y écrit, et supprime une skill. Pour un agent dans un conteneur ou une sandbox, Sidekicks écrit ses instructions et ses skills dans son dossier sur cet ordinateur : ça marche même quand l'agent voit ce dossier en lecture seule (le `.mm` de mini-me), et sans que la sandbox tourne. Les skills d'un seul fichier de mini-me (`<nom>.md`) sont listées aussi. |
| 76 | 76 | ||
| 77 | +### Vibe : faire confiance à son dossier | ||
| 78 | + | ||
| 79 | +Mistral Vibe ne lit les instructions et les skills de son dossier qu'une fois le dossier **de confiance** (issue #125). Quand un agent Vibe ouvre une session dans un dossier auquel il ne fait pas encore confiance et qui contient des instructions ou des skills, la conversation le dit, avec les fichiers ignorés, et propose **Faire confiance à son dossier** : Vibe retient la décision, et les lit dès sa prochaine réponse. Faire confiance au dossier laisse aussi s'appliquer ses propres réglages Vibe (`.vibe/`) : ne faites confiance qu'à un dossier que vous connaissez. | ||
| 80 | + | ||
| 77 | ## Protéger des fichiers | 81 | ## Protéger des fichiers |
| 78 | 82 | ||
| 79 | Certains fichiers ne doivent pas être modifiés ou supprimés par erreur. Sans rien écrire, les instructions de l'agent (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — écrites seulement depuis l'onglet **Instructions**), ses skills (`skills/` et tout ce qu'il contient), son fichier de configuration (après `--config` ou `serve acp` dans ses `args`) et, pour un agent en conteneur ou en sandbox, les fichiers à partir desquels il est construit (`compose.yaml`, `Dockerfile`, `sbxenv.yaml` cités par son `runtime.lifecycle`) sont protégés. Pour en protéger d'autres, listez-les sous l'agent dans **Settings** : | 83 | Certains fichiers ne doivent pas être modifiés ou supprimés par erreur. Sans rien écrire, les instructions de l'agent (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — écrites seulement depuis l'onglet **Instructions**), ses skills (`skills/` et tout ce qu'il contient), son fichier de configuration (après `--config` ou `serve acp` dans ses `args`) et, pour un agent en conteneur ou en sandbox, les fichiers à partir desquels il est construit (`compose.yaml`, `Dockerfile`, `sbxenv.yaml` cités par son `runtime.lifecycle`) sont protégés. Pour en protéger d'autres, listez-les sous l'agent dans **Settings** : |
modified
docs/fr/reference/agents-et-evenements.md +3 -1 | @@ -147,6 +147,7 @@ Un appel d'outil a `id, title, kind` (`read, edit, delete, move, search, execute | ||
| 147 | 147 | | `AnswerForm(id, answer)` | Répond à un formulaire en attente : `{action: "accept", content: {nom: valeur…}}`, `decline` ou `cancel`. Un formulaire ou une action inconnus sont une erreur. | |
| 148 | 148 | | `Conversation(id)` | `channel, messages` (les 100 derniers), `more, busy, queued, answering, answerers, usage{agent: …}, permissions, forms`. | |
| 149 | 149 | | `Older(id, beforeId)` | `{messages, more}` : les 100 messages précédant `beforeId`. | |
| 150 | +| `TrustFolder(id, agent)` | Demande à l'agent de faire confiance pour de bon à son dossier, depuis sa session dans le channel `id` (issue #125) : Mistral Vibe ignore le `AGENTS.md`, les skills et le `.vibe/` d'un dossier tant qu'il n'est pas de confiance. Envoie l'extension ACP `_trust/decision` (`trust_cwd`, sinon `trust_repo`, d'après les décisions que l'agent a proposées dans le `_meta.workspace_trust` de sa réponse à `session/new`), puis ouvre une nouvelle session au tour suivant de l'agent. Une session qui s'ouvre sur un dossier non fiable contenant ces fichiers ajoute un message système `workspace-untrusted` (`error` : les fichiers) ; la confiance accordée, `workspace-trusted`. | | |
| 150 | 151 | | `Prompts(id)` | Les 100 derniers messages que l'utilisateur a écrits dans le channel (ou la conversation directe) `id`, du plus ancien au plus récent, sans répétition consécutive, lus dans l'historique : ce que ↑ rappelle dans sa zone de saisie (issue #118). | |
| 151 | 152 | | `Commands(agent)` | Les dernières commandes annoncées par l'agent, gardées d'un lancement à l'autre ; vide s'il n'en a jamais annoncé. | |
| 152 | 153 | | `Prepare(id)` | Démarre les membres du channel qui n'ont jamais annoncé leurs commandes et ouvre leur session pour ce channel (aucun modèle n'est chargé) ; rend la main une fois les sessions ouvertes, les commandes arrivent par `commands:changed`. Un membre qui répond ailleurs est ignoré. La session sert la première réponse du membre, à qui l'on donne quand même le passé du channel. | |
| @@ -192,7 +193,7 @@ Un fichier ouvert pour modification a `path, content, version` ; `version` ident | ||
| 192 | 193 | | `Read(agent, path)` | Un fichier texte de 1 Mo au plus ; un fichier binaire ou plus gros est une erreur. | |
| 193 | 194 | | `Instructions(agent)` | Les instructions de l'agent (issue #113) : `{file, exists, content, version, files}` — le premier de `files` (d'après son programme : `CLAUDE.md` puis `AGENTS.md` pour Claude, `AGENTS.md` puis `GEMINI.md` pour Antigravity, sinon `AGENTS.md`) qui existe à la racine de son dossier, sinon le premier, à créer. | |
| 194 | 195 | | `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `DeleteInstructions(agent)`, `ChooseInstructions()` | Écrivent le fichier d'instructions — seul moyen de le faire, puisqu'il est protégé (`protect`) : depuis un modèle (refusé s'il existe), modifié par-dessus `version` (`{instructions, conflict}` ; `conflict` et rien d'écrit s'il a changé), ou copié depuis un fichier texte UTF-8 de cet ordinateur (1 Mio au plus ; il le remplace). `DeleteInstructions` retire ce fichier seulement, à la corbeille sur cet ordinateur (issue #122). Pour un agent dans un conteneur ou une sandbox, son dossier sur cet ordinateur est utilisé s'il existe. | |
| 195 | -| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | Les skills de l'agent (issue #112) : `{dir, skills: [{folder, name, description, path}]}` — les dossiers de son dossier de skills (d'après son programme : `.claude/skills` pour Claude, `.vibe/skills` pour Vibe, `skills` ou le `skillsDir` de son `agent.yaml` pour mini-me, sinon `.agents/skills`) qui contiennent un `SKILL.md`, avec le `name` et la `description` de son en-tête. Créer (`name` : minuscules, chiffres et `-` ; refusé s'il est pris), enregistrer un `SKILL.md` par-dessus `version` (`{file, conflict}`), importer un dossier qui contient un `SKILL.md` (ses fichiers, sauf les cachés ; 200 fichiers et 20 Mio au plus) ou un fichier Markdown (devient `<nom>/SKILL.md`) ; les skills `<nom>.md` de mini-me sont listées aussi. `DeleteSkill` retire le dossier d'une skill (ou son `<nom>.md`), à la corbeille sur cet ordinateur, rien d'autre (issue #119). Pour un agent dans un conteneur ou une sandbox, son dossier sur cet ordinateur est lu et écrit s'il existe. | | |
| 196 | +| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | Les skills de l'agent (issue #112) : `{dir, skills: [{folder, name, description, path}]}` — les dossiers de son dossier de skills (d'après son programme : `.claude/skills` pour Claude, `.vibe/skills` pour Vibe, `skills` ou le `skillsDir` de son `agent.yaml` pour mini-me, sinon `.agents/skills`) qui contiennent un `SKILL.md`, avec le `name` et la `description` de son en-tête. Créer (`name` : minuscules, chiffres et `-` ; refusé s'il est pris), enregistrer un `SKILL.md` par-dessus `version` (`{file, conflict}`), importer un dossier qui contient un `SKILL.md` (ses fichiers, sauf les cachés ; 200 fichiers et 20 Mio au plus) ou un fichier Markdown (`.md`, devient `<nom>/SKILL.md` ; un autre fichier est refusé) ; les skills `<nom>.md` de mini-me sont listées aussi. `DeleteSkill` retire le dossier d'une skill (ou son `<nom>.md`), à la corbeille sur cet ordinateur, rien d'autre (issue #119). Pour un agent dans un conteneur ou une sandbox, son dossier sur cet ordinateur est lu et écrit s'il existe. | | |
| 196 | 197 | | `Save(agent, path, content, version)` | Écrit le fichier s'il a toujours `version` ; sinon `{conflict: true}` et rien n'est écrit. Une `version` vide écrase. Le fichier est écrit à côté puis déplacé à sa place. | |
| 197 | 198 | | `Create(agent, dir, name)` | Crée un fichier vide ; refusé si le nom existe ou contient `/`. | |
| 198 | 199 | | `Remove(agent, path)` | Supprime un fichier ou un dossier avec son contenu (voir le tableau ci-dessus). | |
| @@ -242,6 +243,7 @@ Un fichier ouvert pour modification a `path, content, version` ; `version` ident | ||
| 242 | 243 | | `ReadCompose(path)` | Lit un fichier Docker Compose pour l'assistant : `folder`, et pour chaque service `name, container, createCommand, stopCommand, removeCommand`. Un fichier sans services est une erreur. | |
| 243 | 244 | | `ChooseCompose()` | Le sélecteur de fichier natif, pour un fichier Compose. | |
| 244 | 245 | | `Reset(choice)` | La Danger zone : `settings` (configuration par défaut, préférences oubliées), `history` (celui de cette configuration), `allHistory` (celui de toutes les configurations) ou `everything`. Chaque élément réinitialisé est d'abord gardé en copie datée ; renvoie `{copies[]}`. L'historique est rouvert vide et les channels déclarés sont recréés ; puis `config:changed` est envoyé. | |
| 246 | +| `Removal(agent)`, `DeleteAgent(agent, {sandbox, folder})` | Supprimer un agent (issue #128). `Removal` dit ce qui peut partir avec lui : `sandbox` (son `runtime.lifecycle` a une commande remove) et `folder` (son dossier quand il est directement dans `agentsFolder` — le dossier du cycle de vie, sinon le workspace —, donc créé par un assistant ; sinon `""`). `DeleteAgent` l'arrête, lance la commande remove si `sandbox`, supprime sa conversation directe et le retire des channels dans l'historique, retire son entrée de la configuration et des `agents` des channels que le fichier déclare (commentaires gardés), et met son dossier à la corbeille si `folder`. Renvoie `{problems[]}` : ce qui n'a pas pu être fait ; seul l'échec de la configuration est une erreur. Son nom est ensuite de nouveau libre. | | |
| 245 | 247 | |
| 246 | 248 | ## `CreatorService` |
| 247 | 249 | |
| @@ -147,6 +147,7 @@ Un appel d'outil a `id, title, kind` (`read, edit, delete, move, search, execute | |||
| 147 | | `AnswerForm(id, answer)` | Répond à un formulaire en attente : `{action: "accept", content: {nom: valeur…}}`, `decline` ou `cancel`. Un formulaire ou une action inconnus sont une erreur. | | 147 | | `AnswerForm(id, answer)` | Répond à un formulaire en attente : `{action: "accept", content: {nom: valeur…}}`, `decline` ou `cancel`. Un formulaire ou une action inconnus sont une erreur. | |
| 148 | | `Conversation(id)` | `channel, messages` (les 100 derniers), `more, busy, queued, answering, answerers, usage{agent: …}, permissions, forms`. | | 148 | | `Conversation(id)` | `channel, messages` (les 100 derniers), `more, busy, queued, answering, answerers, usage{agent: …}, permissions, forms`. | |
| 149 | | `Older(id, beforeId)` | `{messages, more}` : les 100 messages précédant `beforeId`. | | 149 | | `Older(id, beforeId)` | `{messages, more}` : les 100 messages précédant `beforeId`. | |
| 150 | +| `TrustFolder(id, agent)` | Demande à l'agent de faire confiance pour de bon à son dossier, depuis sa session dans le channel `id` (issue #125) : Mistral Vibe ignore le `AGENTS.md`, les skills et le `.vibe/` d'un dossier tant qu'il n'est pas de confiance. Envoie l'extension ACP `_trust/decision` (`trust_cwd`, sinon `trust_repo`, d'après les décisions que l'agent a proposées dans le `_meta.workspace_trust` de sa réponse à `session/new`), puis ouvre une nouvelle session au tour suivant de l'agent. Une session qui s'ouvre sur un dossier non fiable contenant ces fichiers ajoute un message système `workspace-untrusted` (`error` : les fichiers) ; la confiance accordée, `workspace-trusted`. | | ||
| 150 | | `Prompts(id)` | Les 100 derniers messages que l'utilisateur a écrits dans le channel (ou la conversation directe) `id`, du plus ancien au plus récent, sans répétition consécutive, lus dans l'historique : ce que ↑ rappelle dans sa zone de saisie (issue #118). | | 151 | | `Prompts(id)` | Les 100 derniers messages que l'utilisateur a écrits dans le channel (ou la conversation directe) `id`, du plus ancien au plus récent, sans répétition consécutive, lus dans l'historique : ce que ↑ rappelle dans sa zone de saisie (issue #118). | |
| 151 | | `Commands(agent)` | Les dernières commandes annoncées par l'agent, gardées d'un lancement à l'autre ; vide s'il n'en a jamais annoncé. | | 152 | | `Commands(agent)` | Les dernières commandes annoncées par l'agent, gardées d'un lancement à l'autre ; vide s'il n'en a jamais annoncé. | |
| 152 | | `Prepare(id)` | Démarre les membres du channel qui n'ont jamais annoncé leurs commandes et ouvre leur session pour ce channel (aucun modèle n'est chargé) ; rend la main une fois les sessions ouvertes, les commandes arrivent par `commands:changed`. Un membre qui répond ailleurs est ignoré. La session sert la première réponse du membre, à qui l'on donne quand même le passé du channel. | | 153 | | `Prepare(id)` | Démarre les membres du channel qui n'ont jamais annoncé leurs commandes et ouvre leur session pour ce channel (aucun modèle n'est chargé) ; rend la main une fois les sessions ouvertes, les commandes arrivent par `commands:changed`. Un membre qui répond ailleurs est ignoré. La session sert la première réponse du membre, à qui l'on donne quand même le passé du channel. | |
| @@ -192,7 +193,7 @@ Un fichier ouvert pour modification a `path, content, version` ; `version` ident | |||
| 192 | | `Read(agent, path)` | Un fichier texte de 1 Mo au plus ; un fichier binaire ou plus gros est une erreur. | | 193 | | `Read(agent, path)` | Un fichier texte de 1 Mo au plus ; un fichier binaire ou plus gros est une erreur. | |
| 193 | | `Instructions(agent)` | Les instructions de l'agent (issue #113) : `{file, exists, content, version, files}` — le premier de `files` (d'après son programme : `CLAUDE.md` puis `AGENTS.md` pour Claude, `AGENTS.md` puis `GEMINI.md` pour Antigravity, sinon `AGENTS.md`) qui existe à la racine de son dossier, sinon le premier, à créer. | | 194 | | `Instructions(agent)` | Les instructions de l'agent (issue #113) : `{file, exists, content, version, files}` — le premier de `files` (d'après son programme : `CLAUDE.md` puis `AGENTS.md` pour Claude, `AGENTS.md` puis `GEMINI.md` pour Antigravity, sinon `AGENTS.md`) qui existe à la racine de son dossier, sinon le premier, à créer. | |
| 194 | | `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `DeleteInstructions(agent)`, `ChooseInstructions()` | Écrivent le fichier d'instructions — seul moyen de le faire, puisqu'il est protégé (`protect`) : depuis un modèle (refusé s'il existe), modifié par-dessus `version` (`{instructions, conflict}` ; `conflict` et rien d'écrit s'il a changé), ou copié depuis un fichier texte UTF-8 de cet ordinateur (1 Mio au plus ; il le remplace). `DeleteInstructions` retire ce fichier seulement, à la corbeille sur cet ordinateur (issue #122). Pour un agent dans un conteneur ou une sandbox, son dossier sur cet ordinateur est utilisé s'il existe. | | 195 | | `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `DeleteInstructions(agent)`, `ChooseInstructions()` | Écrivent le fichier d'instructions — seul moyen de le faire, puisqu'il est protégé (`protect`) : depuis un modèle (refusé s'il existe), modifié par-dessus `version` (`{instructions, conflict}` ; `conflict` et rien d'écrit s'il a changé), ou copié depuis un fichier texte UTF-8 de cet ordinateur (1 Mio au plus ; il le remplace). `DeleteInstructions` retire ce fichier seulement, à la corbeille sur cet ordinateur (issue #122). Pour un agent dans un conteneur ou une sandbox, son dossier sur cet ordinateur est utilisé s'il existe. | |
| 195 | -| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | Les skills de l'agent (issue #112) : `{dir, skills: [{folder, name, description, path}]}` — les dossiers de son dossier de skills (d'après son programme : `.claude/skills` pour Claude, `.vibe/skills` pour Vibe, `skills` ou le `skillsDir` de son `agent.yaml` pour mini-me, sinon `.agents/skills`) qui contiennent un `SKILL.md`, avec le `name` et la `description` de son en-tête. Créer (`name` : minuscules, chiffres et `-` ; refusé s'il est pris), enregistrer un `SKILL.md` par-dessus `version` (`{file, conflict}`), importer un dossier qui contient un `SKILL.md` (ses fichiers, sauf les cachés ; 200 fichiers et 20 Mio au plus) ou un fichier Markdown (devient `<nom>/SKILL.md`) ; les skills `<nom>.md` de mini-me sont listées aussi. `DeleteSkill` retire le dossier d'une skill (ou son `<nom>.md`), à la corbeille sur cet ordinateur, rien d'autre (issue #119). Pour un agent dans un conteneur ou une sandbox, son dossier sur cet ordinateur est lu et écrit s'il existe. | | 196 | +| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | Les skills de l'agent (issue #112) : `{dir, skills: [{folder, name, description, path}]}` — les dossiers de son dossier de skills (d'après son programme : `.claude/skills` pour Claude, `.vibe/skills` pour Vibe, `skills` ou le `skillsDir` de son `agent.yaml` pour mini-me, sinon `.agents/skills`) qui contiennent un `SKILL.md`, avec le `name` et la `description` de son en-tête. Créer (`name` : minuscules, chiffres et `-` ; refusé s'il est pris), enregistrer un `SKILL.md` par-dessus `version` (`{file, conflict}`), importer un dossier qui contient un `SKILL.md` (ses fichiers, sauf les cachés ; 200 fichiers et 20 Mio au plus) ou un fichier Markdown (`.md`, devient `<nom>/SKILL.md` ; un autre fichier est refusé) ; les skills `<nom>.md` de mini-me sont listées aussi. `DeleteSkill` retire le dossier d'une skill (ou son `<nom>.md`), à la corbeille sur cet ordinateur, rien d'autre (issue #119). Pour un agent dans un conteneur ou une sandbox, son dossier sur cet ordinateur est lu et écrit s'il existe. | |
| 196 | | `Save(agent, path, content, version)` | Écrit le fichier s'il a toujours `version` ; sinon `{conflict: true}` et rien n'est écrit. Une `version` vide écrase. Le fichier est écrit à côté puis déplacé à sa place. | | 197 | | `Save(agent, path, content, version)` | Écrit le fichier s'il a toujours `version` ; sinon `{conflict: true}` et rien n'est écrit. Une `version` vide écrase. Le fichier est écrit à côté puis déplacé à sa place. | |
| 197 | | `Create(agent, dir, name)` | Crée un fichier vide ; refusé si le nom existe ou contient `/`. | | 198 | | `Create(agent, dir, name)` | Crée un fichier vide ; refusé si le nom existe ou contient `/`. | |
| 198 | | `Remove(agent, path)` | Supprime un fichier ou un dossier avec son contenu (voir le tableau ci-dessus). | | 199 | | `Remove(agent, path)` | Supprime un fichier ou un dossier avec son contenu (voir le tableau ci-dessus). | |
| @@ -242,6 +243,7 @@ Un fichier ouvert pour modification a `path, content, version` ; `version` ident | |||
| 242 | | `ReadCompose(path)` | Lit un fichier Docker Compose pour l'assistant : `folder`, et pour chaque service `name, container, createCommand, stopCommand, removeCommand`. Un fichier sans services est une erreur. | | 243 | | `ReadCompose(path)` | Lit un fichier Docker Compose pour l'assistant : `folder`, et pour chaque service `name, container, createCommand, stopCommand, removeCommand`. Un fichier sans services est une erreur. | |
| 243 | | `ChooseCompose()` | Le sélecteur de fichier natif, pour un fichier Compose. | | 244 | | `ChooseCompose()` | Le sélecteur de fichier natif, pour un fichier Compose. | |
| 244 | | `Reset(choice)` | La Danger zone : `settings` (configuration par défaut, préférences oubliées), `history` (celui de cette configuration), `allHistory` (celui de toutes les configurations) ou `everything`. Chaque élément réinitialisé est d'abord gardé en copie datée ; renvoie `{copies[]}`. L'historique est rouvert vide et les channels déclarés sont recréés ; puis `config:changed` est envoyé. | | 245 | | `Reset(choice)` | La Danger zone : `settings` (configuration par défaut, préférences oubliées), `history` (celui de cette configuration), `allHistory` (celui de toutes les configurations) ou `everything`. Chaque élément réinitialisé est d'abord gardé en copie datée ; renvoie `{copies[]}`. L'historique est rouvert vide et les channels déclarés sont recréés ; puis `config:changed` est envoyé. | |
| 246 | +| `Removal(agent)`, `DeleteAgent(agent, {sandbox, folder})` | Supprimer un agent (issue #128). `Removal` dit ce qui peut partir avec lui : `sandbox` (son `runtime.lifecycle` a une commande remove) et `folder` (son dossier quand il est directement dans `agentsFolder` — le dossier du cycle de vie, sinon le workspace —, donc créé par un assistant ; sinon `""`). `DeleteAgent` l'arrête, lance la commande remove si `sandbox`, supprime sa conversation directe et le retire des channels dans l'historique, retire son entrée de la configuration et des `agents` des channels que le fichier déclare (commentaires gardés), et met son dossier à la corbeille si `folder`. Renvoie `{problems[]}` : ce qui n'a pas pu être fait ; seul l'échec de la configuration est une erreur. Son nom est ensuite de nouveau libre. | | ||
| 245 | 247 | ||
| 246 | ## `CreatorService` | 248 | ## `CreatorService` |
| 247 | 249 | ||
modified
docs/release-notes/v1.7.0.fr.md +13 -0 | @@ -16,6 +16,7 @@ Brouillon — complété au fil des tickets de la 1.7.0. | ||
| 16 | 16 | ### Donner ses instructions à un agent (#113) |
| 17 | 17 | |
| 18 | 18 | - Un nouvel onglet **Instructions** dans le workspace d'un agent montre le fichier où il lit ses instructions — `AGENTS.md`, ou `CLAUDE.md` pour Claude : créez-le depuis un modèle, modifiez-le et enregistrez-le, ou importez un fichier de cet ordinateur. Quand l'agent tourne, **Redémarrer l'agent** lui fait lire les nouvelles instructions. |
| 19 | +- Déposez un fichier texte depuis le Finder sur l'onglet Instructions pour en faire les instructions de l'agent (#121). | |
| 19 | 20 | - **Supprimer les instructions** retire le fichier, après confirmation : à la corbeille de cet ordinateur (#122). |
| 20 | 21 | - Les fichiers d'instructions — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — restent protégés dans l'onglet Fichiers : seul l'onglet Instructions les écrit ou les supprime. |
| 21 | 22 | |
| @@ -24,13 +25,25 @@ Brouillon — complété au fil des tickets de la 1.7.0. | ||
| 24 | 25 | ### Donner des skills à un agent (#112) |
| 25 | 26 | |
| 26 | 27 | - Un nouvel onglet **Skills** dans le workspace d'un agent liste ses skills — le format Agent Skills que lisent tous les agents, dans le dossier de son type (`.claude/skills`, `.agents/skills`, `.vibe/skills`, `skills` de mini-me) : créez-en une depuis un modèle, modifiez son `SKILL.md`, ou importez le dossier d'une skill ou un fichier Markdown de cet ordinateur. **Redémarrer l'agent** lui fait découvrir les nouvelles. |
| 28 | +- Déposez des fichiers `.md` ou des dossiers de skills depuis le Finder sur la liste des skills pour les ajouter (#120). | |
| 27 | 29 | - **Supprimer la skill** retire une skill, après confirmation : à la corbeille de cet ordinateur (#119). |
| 28 | 30 | - Les dossiers de skills restent protégés dans l'onglet Fichiers : seul l'onglet Skills y écrit. |
| 29 | 31 | |
| 30 | 32 | → [Les fichiers et le terminal d'un agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/fr/how-to/fichiers-et-terminal-d-un-agent.md) |
| 31 | 33 | |
| 34 | +### Vibe lit ses instructions et ses skills (#125) | |
| 35 | + | |
| 36 | +- Mistral Vibe ignore les instructions et les skills d'un dossier auquel il ne fait pas confiance. Quand un agent Vibe démarre dans un tel dossier, la conversation le dit maintenant et propose **Faire confiance à son dossier** : Vibe le retient, et les lit dès sa prochaine réponse. | |
| 37 | + | |
| 38 | +### Supprimer un agent proprement (#128) | |
| 39 | + | |
| 40 | +- **Supprimer l'agent**, dans la vue d'un agent, le retire de la configuration et des channels, supprime sa conversation et son historique, et — à votre choix — supprime sa sandbox ou son conteneur et met son dossier à la corbeille. Son nom est de nouveau libre : fini le « This name is already used… try ratatouille-2 » à cause d'une sandbox restée en place. | |
| 41 | + | |
| 42 | +→ [Ajouter un agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/fr/how-to/ajouter-un-agent.md) | |
| 43 | + | |
| 32 | 44 | ### Petits changements |
| 33 | 45 | |
| 46 | +- Le dossier d'un agent mini-me, créé par l'assistant, n'est plus caché dans le Finder (#126). Pour les agents créés avant : `chflags nohidden ~/Documents/Sidekicks-Agents/*`. | |
| 34 | 47 | - Le code d'un fichier dont un agent donne le lien dans sa réponse est maintenant coloré dans le panneau à côté de la conversation, comme dans l'onglet Fichiers, en lecture seule (#117). |
| 35 | 48 | - ↑ dans la zone de saisie rappelle les messages que vous avez écrits dans ce channel ou cette conversation, quel que soit l'agent, même après un changement de channel ou un redémarrage de Sidekicks — jamais ceux d'un autre channel (#118). |
| 36 | 49 | - La ligne sous le nom d'un agent, dans sa vue, est de nouveau courte : son état, où il tourne et ses premiers channels ; le chemin complet de son dossier et tous ses channels sont dans l'infobulle de la ligne. |
| @@ -16,6 +16,7 @@ Brouillon — complété au fil des tickets de la 1.7.0. | |||
| 16 | ### Donner ses instructions à un agent (#113) | 16 | ### Donner ses instructions à un agent (#113) |
| 17 | 17 | ||
| 18 | - Un nouvel onglet **Instructions** dans le workspace d'un agent montre le fichier où il lit ses instructions — `AGENTS.md`, ou `CLAUDE.md` pour Claude : créez-le depuis un modèle, modifiez-le et enregistrez-le, ou importez un fichier de cet ordinateur. Quand l'agent tourne, **Redémarrer l'agent** lui fait lire les nouvelles instructions. | 18 | - Un nouvel onglet **Instructions** dans le workspace d'un agent montre le fichier où il lit ses instructions — `AGENTS.md`, ou `CLAUDE.md` pour Claude : créez-le depuis un modèle, modifiez-le et enregistrez-le, ou importez un fichier de cet ordinateur. Quand l'agent tourne, **Redémarrer l'agent** lui fait lire les nouvelles instructions. |
| 19 | +- Déposez un fichier texte depuis le Finder sur l'onglet Instructions pour en faire les instructions de l'agent (#121). | ||
| 19 | - **Supprimer les instructions** retire le fichier, après confirmation : à la corbeille de cet ordinateur (#122). | 20 | - **Supprimer les instructions** retire le fichier, après confirmation : à la corbeille de cet ordinateur (#122). |
| 20 | - Les fichiers d'instructions — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — restent protégés dans l'onglet Fichiers : seul l'onglet Instructions les écrit ou les supprime. | 21 | - Les fichiers d'instructions — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — restent protégés dans l'onglet Fichiers : seul l'onglet Instructions les écrit ou les supprime. |
| 21 | 22 | ||
| @@ -24,13 +25,25 @@ Brouillon — complété au fil des tickets de la 1.7.0. | |||
| 24 | ### Donner des skills à un agent (#112) | 25 | ### Donner des skills à un agent (#112) |
| 25 | 26 | ||
| 26 | - Un nouvel onglet **Skills** dans le workspace d'un agent liste ses skills — le format Agent Skills que lisent tous les agents, dans le dossier de son type (`.claude/skills`, `.agents/skills`, `.vibe/skills`, `skills` de mini-me) : créez-en une depuis un modèle, modifiez son `SKILL.md`, ou importez le dossier d'une skill ou un fichier Markdown de cet ordinateur. **Redémarrer l'agent** lui fait découvrir les nouvelles. | 27 | - Un nouvel onglet **Skills** dans le workspace d'un agent liste ses skills — le format Agent Skills que lisent tous les agents, dans le dossier de son type (`.claude/skills`, `.agents/skills`, `.vibe/skills`, `skills` de mini-me) : créez-en une depuis un modèle, modifiez son `SKILL.md`, ou importez le dossier d'une skill ou un fichier Markdown de cet ordinateur. **Redémarrer l'agent** lui fait découvrir les nouvelles. |
| 28 | +- Déposez des fichiers `.md` ou des dossiers de skills depuis le Finder sur la liste des skills pour les ajouter (#120). | ||
| 27 | - **Supprimer la skill** retire une skill, après confirmation : à la corbeille de cet ordinateur (#119). | 29 | - **Supprimer la skill** retire une skill, après confirmation : à la corbeille de cet ordinateur (#119). |
| 28 | - Les dossiers de skills restent protégés dans l'onglet Fichiers : seul l'onglet Skills y écrit. | 30 | - Les dossiers de skills restent protégés dans l'onglet Fichiers : seul l'onglet Skills y écrit. |
| 29 | 31 | ||
| 30 | → [Les fichiers et le terminal d'un agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/fr/how-to/fichiers-et-terminal-d-un-agent.md) | 32 | → [Les fichiers et le terminal d'un agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/fr/how-to/fichiers-et-terminal-d-un-agent.md) |
| 31 | 33 | ||
| 34 | +### Vibe lit ses instructions et ses skills (#125) | ||
| 35 | + | ||
| 36 | +- Mistral Vibe ignore les instructions et les skills d'un dossier auquel il ne fait pas confiance. Quand un agent Vibe démarre dans un tel dossier, la conversation le dit maintenant et propose **Faire confiance à son dossier** : Vibe le retient, et les lit dès sa prochaine réponse. | ||
| 37 | + | ||
| 38 | +### Supprimer un agent proprement (#128) | ||
| 39 | + | ||
| 40 | +- **Supprimer l'agent**, dans la vue d'un agent, le retire de la configuration et des channels, supprime sa conversation et son historique, et — à votre choix — supprime sa sandbox ou son conteneur et met son dossier à la corbeille. Son nom est de nouveau libre : fini le « This name is already used… try ratatouille-2 » à cause d'une sandbox restée en place. | ||
| 41 | + | ||
| 42 | +→ [Ajouter un agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/fr/how-to/ajouter-un-agent.md) | ||
| 43 | + | ||
| 32 | ### Petits changements | 44 | ### Petits changements |
| 33 | 45 | ||
| 46 | +- Le dossier d'un agent mini-me, créé par l'assistant, n'est plus caché dans le Finder (#126). Pour les agents créés avant : `chflags nohidden ~/Documents/Sidekicks-Agents/*`. | ||
| 34 | - Le code d'un fichier dont un agent donne le lien dans sa réponse est maintenant coloré dans le panneau à côté de la conversation, comme dans l'onglet Fichiers, en lecture seule (#117). | 47 | - Le code d'un fichier dont un agent donne le lien dans sa réponse est maintenant coloré dans le panneau à côté de la conversation, comme dans l'onglet Fichiers, en lecture seule (#117). |
| 35 | - ↑ dans la zone de saisie rappelle les messages que vous avez écrits dans ce channel ou cette conversation, quel que soit l'agent, même après un changement de channel ou un redémarrage de Sidekicks — jamais ceux d'un autre channel (#118). | 48 | - ↑ dans la zone de saisie rappelle les messages que vous avez écrits dans ce channel ou cette conversation, quel que soit l'agent, même après un changement de channel ou un redémarrage de Sidekicks — jamais ceux d'un autre channel (#118). |
| 36 | - La ligne sous le nom d'un agent, dans sa vue, est de nouveau courte : son état, où il tourne et ses premiers channels ; le chemin complet de son dossier et tous ses channels sont dans l'infobulle de la ligne. | 49 | - La ligne sous le nom d'un agent, dans sa vue, est de nouveau courte : son état, où il tourne et ses premiers channels ; le chemin complet de son dossier et tous ses channels sont dans l'infobulle de la ligne. |
modified
docs/release-notes/v1.7.0.md +13 -0 | @@ -16,6 +16,7 @@ Draft — completed as the 1.7.0 tickets are done. | ||
| 16 | 16 | ### Give an agent its instructions (#113) |
| 17 | 17 | |
| 18 | 18 | - A new **Instructions** tab in an agent's workspace shows the file it reads its instructions in — `AGENTS.md`, or `CLAUDE.md` for Claude: create it from a template, edit and save it, or import a file of this computer. When the agent is running, **Restart the agent** makes it read the new instructions. |
| 19 | +- Drop a text file from the Finder on the Instructions tab to make it the agent's instructions (#121). | |
| 19 | 20 | - **Delete the instructions** removes the file, after you confirm: to the trash of this computer (#122). |
| 20 | 21 | - The instruction files — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — stay protected in the Files tab: only the Instructions tab writes or deletes them. |
| 21 | 22 | |
| @@ -24,13 +25,25 @@ Draft — completed as the 1.7.0 tickets are done. | ||
| 24 | 25 | ### Give an agent skills (#112) |
| 25 | 26 | |
| 26 | 27 | - A new **Skills** tab in an agent's workspace lists its skills — the Agent Skills format every agent reads, in the folder its kind uses (`.claude/skills`, `.agents/skills`, `.vibe/skills`, mini-me's `skills`): create one from a template, edit its `SKILL.md`, or import a skill folder or a Markdown file of this computer. **Restart the agent** makes it find the new ones. |
| 28 | +- Drop `.md` files or skill folders from the Finder on the list of skills to add them (#120). | |
| 27 | 29 | - **Delete the skill** removes a skill, after you confirm: to the trash of this computer (#119). |
| 28 | 30 | - The skills folders stay protected in the Files tab: only the Skills tab writes there. |
| 29 | 31 | |
| 30 | 32 | → [Work with an agent's files and terminal](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/en/how-to/work-with-an-agents-files.md#give-the-agent-skills) |
| 31 | 33 | |
| 34 | +### Vibe reads its instructions and its skills (#125) | |
| 35 | + | |
| 36 | +- Mistral Vibe ignores the instructions and the skills of a folder it does not trust. When a Vibe agent starts in such a folder, the conversation now says so and offers **Trust its folder**: Vibe remembers it, and reads them from its next answer. | |
| 37 | + | |
| 38 | +### Delete an agent cleanly (#128) | |
| 39 | + | |
| 40 | +- **Delete the agent**, in an agent's view, removes it from the configuration and the channels, deletes its conversation and its history, and — as you choose — removes its sandbox or its container and puts its folder in the trash. Its name is free again: no more "This name is already used… try ratatouille-2" because of a sandbox left behind. | |
| 41 | + | |
| 42 | +→ [Add an agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/en/how-to/add-an-agent.md#delete-an-agent) | |
| 43 | + | |
| 32 | 44 | ### Smaller changes |
| 33 | 45 | |
| 46 | +- A mini-me agent's folder, made by the assistant, is no longer hidden in the Finder (#126). For agents created before: `chflags nohidden ~/Documents/Sidekicks-Agents/*`. | |
| 34 | 47 | - The code of a file an agent links to in its answer is now coloured in the panel beside the conversation, like in the Files tab, read-only (#117). |
| 35 | 48 | - ↑ in the message box brings back the messages you wrote in this channel or this conversation, whatever the agent, even after switching channels or restarting Sidekicks — never another channel's (#118). |
| 36 | 49 | - The line under an agent's name, in its view, is short again: its state, where it runs and its first channels; its folder's full path and every channel are in the line's tooltip. |
| @@ -16,6 +16,7 @@ Draft — completed as the 1.7.0 tickets are done. | |||
| 16 | ### Give an agent its instructions (#113) | 16 | ### Give an agent its instructions (#113) |
| 17 | 17 | ||
| 18 | - A new **Instructions** tab in an agent's workspace shows the file it reads its instructions in — `AGENTS.md`, or `CLAUDE.md` for Claude: create it from a template, edit and save it, or import a file of this computer. When the agent is running, **Restart the agent** makes it read the new instructions. | 18 | - A new **Instructions** tab in an agent's workspace shows the file it reads its instructions in — `AGENTS.md`, or `CLAUDE.md` for Claude: create it from a template, edit and save it, or import a file of this computer. When the agent is running, **Restart the agent** makes it read the new instructions. |
| 19 | +- Drop a text file from the Finder on the Instructions tab to make it the agent's instructions (#121). | ||
| 19 | - **Delete the instructions** removes the file, after you confirm: to the trash of this computer (#122). | 20 | - **Delete the instructions** removes the file, after you confirm: to the trash of this computer (#122). |
| 20 | - The instruction files — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — stay protected in the Files tab: only the Instructions tab writes or deletes them. | 21 | - The instruction files — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — stay protected in the Files tab: only the Instructions tab writes or deletes them. |
| 21 | 22 | ||
| @@ -24,13 +25,25 @@ Draft — completed as the 1.7.0 tickets are done. | |||
| 24 | ### Give an agent skills (#112) | 25 | ### Give an agent skills (#112) |
| 25 | 26 | ||
| 26 | - A new **Skills** tab in an agent's workspace lists its skills — the Agent Skills format every agent reads, in the folder its kind uses (`.claude/skills`, `.agents/skills`, `.vibe/skills`, mini-me's `skills`): create one from a template, edit its `SKILL.md`, or import a skill folder or a Markdown file of this computer. **Restart the agent** makes it find the new ones. | 27 | - A new **Skills** tab in an agent's workspace lists its skills — the Agent Skills format every agent reads, in the folder its kind uses (`.claude/skills`, `.agents/skills`, `.vibe/skills`, mini-me's `skills`): create one from a template, edit its `SKILL.md`, or import a skill folder or a Markdown file of this computer. **Restart the agent** makes it find the new ones. |
| 28 | +- Drop `.md` files or skill folders from the Finder on the list of skills to add them (#120). | ||
| 27 | - **Delete the skill** removes a skill, after you confirm: to the trash of this computer (#119). | 29 | - **Delete the skill** removes a skill, after you confirm: to the trash of this computer (#119). |
| 28 | - The skills folders stay protected in the Files tab: only the Skills tab writes there. | 30 | - The skills folders stay protected in the Files tab: only the Skills tab writes there. |
| 29 | 31 | ||
| 30 | → [Work with an agent's files and terminal](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/en/how-to/work-with-an-agents-files.md#give-the-agent-skills) | 32 | → [Work with an agent's files and terminal](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/en/how-to/work-with-an-agents-files.md#give-the-agent-skills) |
| 31 | 33 | ||
| 34 | +### Vibe reads its instructions and its skills (#125) | ||
| 35 | + | ||
| 36 | +- Mistral Vibe ignores the instructions and the skills of a folder it does not trust. When a Vibe agent starts in such a folder, the conversation now says so and offers **Trust its folder**: Vibe remembers it, and reads them from its next answer. | ||
| 37 | + | ||
| 38 | +### Delete an agent cleanly (#128) | ||
| 39 | + | ||
| 40 | +- **Delete the agent**, in an agent's view, removes it from the configuration and the channels, deletes its conversation and its history, and — as you choose — removes its sandbox or its container and puts its folder in the trash. Its name is free again: no more "This name is already used… try ratatouille-2" because of a sandbox left behind. | ||
| 41 | + | ||
| 42 | +→ [Add an agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/en/how-to/add-an-agent.md#delete-an-agent) | ||
| 43 | + | ||
| 32 | ### Smaller changes | 44 | ### Smaller changes |
| 33 | 45 | ||
| 46 | +- A mini-me agent's folder, made by the assistant, is no longer hidden in the Finder (#126). For agents created before: `chflags nohidden ~/Documents/Sidekicks-Agents/*`. | ||
| 34 | - The code of a file an agent links to in its answer is now coloured in the panel beside the conversation, like in the Files tab, read-only (#117). | 47 | - The code of a file an agent links to in its answer is now coloured in the panel beside the conversation, like in the Files tab, read-only (#117). |
| 35 | - ↑ in the message box brings back the messages you wrote in this channel or this conversation, whatever the agent, even after switching channels or restarting Sidekicks — never another channel's (#118). | 48 | - ↑ in the message box brings back the messages you wrote in this channel or this conversation, whatever the agent, even after switching channels or restarting Sidekicks — never another channel's (#118). |
| 36 | - The line under an agent's name, in its view, is short again: its state, where it runs and its first channels; its folder's full path and every channel are in the line's tooltip. | 49 | - The line under an agent's name, in its view, is short again: its state, where it runs and its first channels; its folder's full path and every channel are in the line's tooltip. |
modified
frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/app/channelservice.ts +9 -0 | @@ -150,3 +150,12 @@ export function Rename(id: string, name: string, description: string): $Cancella | ||
| 150 | 150 | export function Send(id: string, text: string): $CancellablePromise<string> { |
| 151 | 151 | return $Call.ByID(4255482702, id, text); |
| 152 | 152 | } |
| 153 | + | |
| 154 | +/** | |
| 155 | + * TrustFolder tells agent to trust its folder for good, from its session in | |
| 156 | + * channel id: Vibe then reads the folder's instructions and skills (issue | |
| 157 | + * #125). | |
| 158 | + */ | |
| 159 | +export function TrustFolder(id: string, agent: string): $CancellablePromise<void> { | |
| 160 | + return $Call.ByID(3586766290, id, agent); | |
| 161 | +} | |
| @@ -150,3 +150,12 @@ export function Rename(id: string, name: string, description: string): $Cancella | |||
| 150 | export function Send(id: string, text: string): $CancellablePromise<string> { | 150 | export function Send(id: string, text: string): $CancellablePromise<string> { |
| 151 | return $Call.ByID(4255482702, id, text); | 151 | return $Call.ByID(4255482702, id, text); |
| 152 | } | 152 | } |
| 153 | + | ||
| 154 | +/** | ||
| 155 | + * TrustFolder tells agent to trust its folder for good, from its session in | ||
| 156 | + * channel id: Vibe then reads the folder's instructions and skills (issue | ||
| 157 | + * #125). | ||
| 158 | + */ | ||
| 159 | +export function TrustFolder(id: string, agent: string): $CancellablePromise<void> { | ||
| 160 | + return $Call.ByID(3586766290, id, agent); | ||
| 161 | +} | ||
modified
frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/app/configservice.ts +19 -0 | @@ -87,6 +87,18 @@ export function Current(): $CancellablePromise<$models.ConfigView> { | ||
| 87 | 87 | return $Call.ByID(253092526); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | +/** | |
| 91 | + * DeleteAgent deletes agent (issue #128): it is stopped; its sandbox or | |
| 92 | + * its container is removed when asked; it is forgotten by the history (its | |
| 93 | + * direct conversation, its places in channels); its entry leaves the | |
| 94 | + * configuration (and the channels the file declares); its folder goes to | |
| 95 | + * the trash when asked and an assistant made it. What could not be done is | |
| 96 | + * in Problems; only the configuration failing is an error. | |
| 97 | + */ | |
| 98 | +export function DeleteAgent(agent: string, options: $models.RemovalOptions): $CancellablePromise<$models.RemovalResult> { | |
| 99 | + return $Call.ByID(389586995, agent, options); | |
| 100 | +} | |
| 101 | + | |
| 90 | 102 | /** |
| 91 | 103 | * Open switches to the configuration file at path. |
| 92 | 104 | */ |
| @@ -123,6 +135,13 @@ export function Recent(): $CancellablePromise<string[] | null> { | ||
| 123 | 135 | return $Call.ByID(2191655178); |
| 124 | 136 | } |
| 125 | 137 | |
| 138 | +/** | |
| 139 | + * Removal says what deleting agent can also remove. | |
| 140 | + */ | |
| 141 | +export function Removal(agent: string): $CancellablePromise<$models.AgentRemoval> { | |
| 142 | + return $Call.ByID(482499411, agent); | |
| 143 | +} | |
| 144 | + | |
| 126 | 145 | /** |
| 127 | 146 | * Reset resets what choice names (ResetSettings, ResetHistory, |
| 128 | 147 | * ResetAllHistory or ResetEverything). Nothing is deleted: each file or |
| @@ -87,6 +87,18 @@ export function Current(): $CancellablePromise<$models.ConfigView> { | |||
| 87 | return $Call.ByID(253092526); | 87 | return $Call.ByID(253092526); |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | +/** | ||
| 91 | + * DeleteAgent deletes agent (issue #128): it is stopped; its sandbox or | ||
| 92 | + * its container is removed when asked; it is forgotten by the history (its | ||
| 93 | + * direct conversation, its places in channels); its entry leaves the | ||
| 94 | + * configuration (and the channels the file declares); its folder goes to | ||
| 95 | + * the trash when asked and an assistant made it. What could not be done is | ||
| 96 | + * in Problems; only the configuration failing is an error. | ||
| 97 | + */ | ||
| 98 | +export function DeleteAgent(agent: string, options: $models.RemovalOptions): $CancellablePromise<$models.RemovalResult> { | ||
| 99 | + return $Call.ByID(389586995, agent, options); | ||
| 100 | +} | ||
| 101 | + | ||
| 90 | /** | 102 | /** |
| 91 | * Open switches to the configuration file at path. | 103 | * Open switches to the configuration file at path. |
| 92 | */ | 104 | */ |
| @@ -123,6 +135,13 @@ export function Recent(): $CancellablePromise<string[] | null> { | |||
| 123 | return $Call.ByID(2191655178); | 135 | return $Call.ByID(2191655178); |
| 124 | } | 136 | } |
| 125 | 137 | ||
| 138 | +/** | ||
| 139 | + * Removal says what deleting agent can also remove. | ||
| 140 | + */ | ||
| 141 | +export function Removal(agent: string): $CancellablePromise<$models.AgentRemoval> { | ||
| 142 | + return $Call.ByID(482499411, agent); | ||
| 143 | +} | ||
| 144 | + | ||
| 126 | /** | 145 | /** |
| 127 | * Reset resets what choice names (ResetSettings, ResetHistory, | 146 | * Reset resets what choice names (ResetSettings, ResetHistory, |
| 128 | * ResetAllHistory or ResetEverything). Nothing is deleted: each file or | 147 | * ResetAllHistory or ResetEverything). Nothing is deleted: each file or |
modified
frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/app/index.ts +3 -0 | @@ -22,6 +22,7 @@ export { | ||
| 22 | 22 | |
| 23 | 23 | export type { |
| 24 | 24 | AgentForm, |
| 25 | + AgentRemoval, | |
| 25 | 26 | ComposeServiceView, |
| 26 | 27 | ComposeView, |
| 27 | 28 | ConfigView, |
| @@ -33,6 +34,8 @@ export type { | ||
| 33 | 34 | LinkedFile, |
| 34 | 35 | OlderView, |
| 35 | 36 | ProblemView, |
| 37 | + RemovalOptions, | |
| 38 | + RemovalResult, | |
| 36 | 39 | ResetResult, |
| 37 | 40 | SandboxEnv, |
| 38 | 41 | SaveResult, |
| @@ -22,6 +22,7 @@ export { | |||
| 22 | 22 | ||
| 23 | export type { | 23 | export type { |
| 24 | AgentForm, | 24 | AgentForm, |
| 25 | + AgentRemoval, | ||
| 25 | ComposeServiceView, | 26 | ComposeServiceView, |
| 26 | ComposeView, | 27 | ComposeView, |
| 27 | ConfigView, | 28 | ConfigView, |
| @@ -33,6 +34,8 @@ export type { | |||
| 33 | LinkedFile, | 34 | LinkedFile, |
| 34 | OlderView, | 35 | OlderView, |
| 35 | ProblemView, | 36 | ProblemView, |
| 37 | + RemovalOptions, | ||
| 38 | + RemovalResult, | ||
| 36 | ResetResult, | 39 | ResetResult, |
| 37 | SandboxEnv, | 40 | SandboxEnv, |
| 38 | SaveResult, | 41 | SaveResult, |
modified
frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/app/models.ts +34 -0 | @@ -59,6 +59,23 @@ export interface AgentForm { | ||
| 59 | 59 | "removeCommand": string; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | +/** | |
| 63 | + * AgentRemoval is what deleting an agent can also remove, for the | |
| 64 | + * interface to ask: its sandbox or its container (a remove command), and | |
| 65 | + * its folder when an assistant made it (directly in the agents' folder). | |
| 66 | + */ | |
| 67 | +export interface AgentRemoval { | |
| 68 | + /** | |
| 69 | + * Sandbox: runtime.lifecycle has a remove command. | |
| 70 | + */ | |
| 71 | + "sandbox": boolean; | |
| 72 | + | |
| 73 | + /** | |
| 74 | + * Folder is the agent's folder that may go to the trash, or "". | |
| 75 | + */ | |
| 76 | + "folder": string; | |
| 77 | +} | |
| 78 | + | |
| 62 | 79 | /** |
| 63 | 80 | * ComposeServiceView is a service of a ComposeView. |
| 64 | 81 | */ |
| @@ -235,6 +252,23 @@ export interface ProblemView { | ||
| 235 | 252 | "warning": boolean; |
| 236 | 253 | } |
| 237 | 254 | |
| 255 | +/** | |
| 256 | + * RemovalOptions are the user's choices: remove the sandbox or the | |
| 257 | + * container, put the folder in the trash. | |
| 258 | + */ | |
| 259 | +export interface RemovalOptions { | |
| 260 | + "sandbox": boolean; | |
| 261 | + "folder": boolean; | |
| 262 | +} | |
| 263 | + | |
| 264 | +/** | |
| 265 | + * RemovalResult tells what could not be removed — the agent itself is gone | |
| 266 | + * from the configuration and the history. | |
| 267 | + */ | |
| 268 | +export interface RemovalResult { | |
| 269 | + "problems": string[] | null; | |
| 270 | +} | |
| 271 | + | |
| 238 | 272 | /** |
| 239 | 273 | * ResetResult lists the copies kept by a reset, for the interface to show. |
| 240 | 274 | */ |
| @@ -59,6 +59,23 @@ export interface AgentForm { | |||
| 59 | "removeCommand": string; | 59 | "removeCommand": string; |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | +/** | ||
| 63 | + * AgentRemoval is what deleting an agent can also remove, for the | ||
| 64 | + * interface to ask: its sandbox or its container (a remove command), and | ||
| 65 | + * its folder when an assistant made it (directly in the agents' folder). | ||
| 66 | + */ | ||
| 67 | +export interface AgentRemoval { | ||
| 68 | + /** | ||
| 69 | + * Sandbox: runtime.lifecycle has a remove command. | ||
| 70 | + */ | ||
| 71 | + "sandbox": boolean; | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * Folder is the agent's folder that may go to the trash, or "". | ||
| 75 | + */ | ||
| 76 | + "folder": string; | ||
| 77 | +} | ||
| 78 | + | ||
| 62 | /** | 79 | /** |
| 63 | * ComposeServiceView is a service of a ComposeView. | 80 | * ComposeServiceView is a service of a ComposeView. |
| 64 | */ | 81 | */ |
| @@ -235,6 +252,23 @@ export interface ProblemView { | |||
| 235 | "warning": boolean; | 252 | "warning": boolean; |
| 236 | } | 253 | } |
| 237 | 254 | ||
| 255 | +/** | ||
| 256 | + * RemovalOptions are the user's choices: remove the sandbox or the | ||
| 257 | + * container, put the folder in the trash. | ||
| 258 | + */ | ||
| 259 | +export interface RemovalOptions { | ||
| 260 | + "sandbox": boolean; | ||
| 261 | + "folder": boolean; | ||
| 262 | +} | ||
| 263 | + | ||
| 264 | +/** | ||
| 265 | + * RemovalResult tells what could not be removed — the agent itself is gone | ||
| 266 | + * from the configuration and the history. | ||
| 267 | + */ | ||
| 268 | +export interface RemovalResult { | ||
| 269 | + "problems": string[] | null; | ||
| 270 | +} | ||
| 271 | + | ||
| 238 | /** | 272 | /** |
| 239 | * ResetResult lists the copies kept by a reset, for the interface to show. | 273 | * ResetResult lists the copies kept by a reset, for the interface to show. |
| 240 | */ | 274 | */ |
modified
frontend/src/lib/agent/AgentView.svelte +48 -1 | @@ -9,7 +9,8 @@ | ||
| 9 | 9 | // An agent's workspace in the centre (wireframe 5, issue #27): its state |
| 10 | 10 | // and where it runs, then its files, a terminal and its log. |
| 11 | 11 | import { onMount } from 'svelte' |
| 12 | - import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | |
| 12 | + import { AgentService, ConfigService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | |
| 13 | + import type { AgentRemoval } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | |
| 13 | 14 | import { hasMessage, t, type MessageKey } from '../i18n/index.svelte' |
| 14 | 15 | import { act, appState, loadCommands, openDirect, signedIn } from '../state.svelte' |
| 15 | 16 | import ActionError from '../chat/ActionError.svelte' |
| @@ -49,6 +50,36 @@ | ||
| 49 | 50 | let problem = $state('') |
| 50 | 51 | // The sandbox commands of runtime.lifecycle (issue #47); removing asks first. |
| 51 | 52 | let confirmingRemove = $state(false) |
| 53 | + // Deleting the agent (issue #128): what else goes, as the user chooses. | |
| 54 | + let removal = $state<AgentRemoval | null>(null) | |
| 55 | + let removeSandbox = $state(true) | |
| 56 | + let removeFolder = $state(true) | |
| 57 | + let deleting = $state(false) | |
| 58 | + | |
| 59 | + async function askDelete() { | |
| 60 | + confirmingRemove = false | |
| 61 | + await act(async () => { | |
| 62 | + removal = await ConfigService.Removal(name) | |
| 63 | + removeSandbox = removal?.sandbox ?? false | |
| 64 | + removeFolder = Boolean(removal?.folder) | |
| 65 | + }) | |
| 66 | + } | |
| 67 | + | |
| 68 | + async function deleteAgent() { | |
| 69 | + deleting = true | |
| 70 | + try { | |
| 71 | + // Its terminals end with it. | |
| 72 | + for (const session of [...terminalsOf(name)]) closeTerminal(session.key) | |
| 73 | + await act(async () => { | |
| 74 | + const result = await ConfigService.DeleteAgent(name, { sandbox: removeSandbox, folder: removeFolder }) | |
| 75 | + removal = null | |
| 76 | + if (appState.workspaceAgent === name) appState.workspaceAgent = '' | |
| 77 | + if (result?.problems?.length) appState.actionError = t('agentDelete.partly', { agent: agent?.title ?? name, problems: result.problems.join(' · ') }) | |
| 78 | + }) | |
| 79 | + } finally { | |
| 80 | + deleting = false | |
| 81 | + } | |
| 82 | + } | |
| 52 | 83 | // The buttons name what the agent runs in: a container (issue #48) or a sandbox. |
| 53 | 84 | const inContainer = $derived(agent?.runtime === 'container') |
| 54 | 85 | let sandboxBusy = $state(false) |
| @@ -112,8 +143,23 @@ | ||
| 112 | 143 | {#if agent.canRemoveSandbox} |
| 113 | 144 | <button class="stop" disabled={sandboxBusy} onclick={() => (confirmingRemove = true)}>{inContainer ? t('workspace.removeContainer') : t('workspace.removeSandbox')}</button> |
| 114 | 145 | {/if} |
| 146 | + <button class="stop" disabled={deleting} onclick={askDelete}>{t('agentDelete.button')}</button> | |
| 115 | 147 | </header> |
| 116 | 148 | |
| 149 | + {#if removal} | |
| 150 | + <div class="confirm" role="alertdialog" aria-label={t('agentDelete.button')}> | |
| 151 | + <p>{t('agentDelete.confirm', { agent: agent.title })}</p> | |
| 152 | + {#if removal.sandbox} | |
| 153 | + <label class="option"><input type="checkbox" bind:checked={removeSandbox} /> {inContainer ? t('agentDelete.container') : t('agentDelete.sandbox')}</label> | |
| 154 | + {/if} | |
| 155 | + {#if removal.folder} | |
| 156 | + <label class="option"><input type="checkbox" bind:checked={removeFolder} /> {t('agentDelete.folder', { folder: removal.folder })}</label> | |
| 157 | + {/if} | |
| 158 | + <button class="stop" disabled={deleting} onclick={deleteAgent}>{t('agentDelete.yes')}</button> | |
| 159 | + <button onclick={() => (removal = null)}>{t('workspace.removeSandboxCancel')}</button> | |
| 160 | + </div> | |
| 161 | + {/if} | |
| 162 | + | |
| 117 | 163 | {#if confirmingRemove} |
| 118 | 164 | <div class="confirm" role="alertdialog" aria-label={inContainer ? t('workspace.removeContainer') : t('workspace.removeSandbox')}> |
| 119 | 165 | <p>{inContainer ? t('workspace.removeContainerConfirm', { agent: agent.title }) : t('workspace.removeSandboxConfirm', { agent: agent.title })}</p> |
| @@ -197,6 +243,7 @@ | ||
| 197 | 243 | .confirm { margin: 8px 18px 0; padding: 8px 10px; border: 1px solid var(--danger); border-radius: 6px; font-size: 13px; } |
| 198 | 244 | .confirm p { margin: 0 0 6px; } |
| 199 | 245 | .confirm button { margin-right: 4px; } |
| 246 | + .confirm .option { display: block; margin: 0 0 6px; } | |
| 200 | 247 | .tabs { display: flex; gap: 4px; padding: 6px 18px 0; border-bottom: 1px solid var(--border); } |
| 201 | 248 | .tabs button { border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 6px 10px; color: var(--muted); } |
| 202 | 249 | .tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; } |
| @@ -9,7 +9,8 @@ | |||
| 9 | // An agent's workspace in the centre (wireframe 5, issue #27): its state | 9 | // An agent's workspace in the centre (wireframe 5, issue #27): its state |
| 10 | // and where it runs, then its files, a terminal and its log. | 10 | // and where it runs, then its files, a terminal and its log. |
| 11 | import { onMount } from 'svelte' | 11 | import { onMount } from 'svelte' |
| 12 | - import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | 12 | + import { AgentService, ConfigService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 13 | + import type { AgentRemoval } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | ||
| 13 | import { hasMessage, t, type MessageKey } from '../i18n/index.svelte' | 14 | import { hasMessage, t, type MessageKey } from '../i18n/index.svelte' |
| 14 | import { act, appState, loadCommands, openDirect, signedIn } from '../state.svelte' | 15 | import { act, appState, loadCommands, openDirect, signedIn } from '../state.svelte' |
| 15 | import ActionError from '../chat/ActionError.svelte' | 16 | import ActionError from '../chat/ActionError.svelte' |
| @@ -49,6 +50,36 @@ | |||
| 49 | let problem = $state('') | 50 | let problem = $state('') |
| 50 | // The sandbox commands of runtime.lifecycle (issue #47); removing asks first. | 51 | // The sandbox commands of runtime.lifecycle (issue #47); removing asks first. |
| 51 | let confirmingRemove = $state(false) | 52 | let confirmingRemove = $state(false) |
| 53 | + // Deleting the agent (issue #128): what else goes, as the user chooses. | ||
| 54 | + let removal = $state<AgentRemoval | null>(null) | ||
| 55 | + let removeSandbox = $state(true) | ||
| 56 | + let removeFolder = $state(true) | ||
| 57 | + let deleting = $state(false) | ||
| 58 | + | ||
| 59 | + async function askDelete() { | ||
| 60 | + confirmingRemove = false | ||
| 61 | + await act(async () => { | ||
| 62 | + removal = await ConfigService.Removal(name) | ||
| 63 | + removeSandbox = removal?.sandbox ?? false | ||
| 64 | + removeFolder = Boolean(removal?.folder) | ||
| 65 | + }) | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + async function deleteAgent() { | ||
| 69 | + deleting = true | ||
| 70 | + try { | ||
| 71 | + // Its terminals end with it. | ||
| 72 | + for (const session of [...terminalsOf(name)]) closeTerminal(session.key) | ||
| 73 | + await act(async () => { | ||
| 74 | + const result = await ConfigService.DeleteAgent(name, { sandbox: removeSandbox, folder: removeFolder }) | ||
| 75 | + removal = null | ||
| 76 | + if (appState.workspaceAgent === name) appState.workspaceAgent = '' | ||
| 77 | + if (result?.problems?.length) appState.actionError = t('agentDelete.partly', { agent: agent?.title ?? name, problems: result.problems.join(' · ') }) | ||
| 78 | + }) | ||
| 79 | + } finally { | ||
| 80 | + deleting = false | ||
| 81 | + } | ||
| 82 | + } | ||
| 52 | // The buttons name what the agent runs in: a container (issue #48) or a sandbox. | 83 | // The buttons name what the agent runs in: a container (issue #48) or a sandbox. |
| 53 | const inContainer = $derived(agent?.runtime === 'container') | 84 | const inContainer = $derived(agent?.runtime === 'container') |
| 54 | let sandboxBusy = $state(false) | 85 | let sandboxBusy = $state(false) |
| @@ -112,8 +143,23 @@ | |||
| 112 | {#if agent.canRemoveSandbox} | 143 | {#if agent.canRemoveSandbox} |
| 113 | <button class="stop" disabled={sandboxBusy} onclick={() => (confirmingRemove = true)}>{inContainer ? t('workspace.removeContainer') : t('workspace.removeSandbox')}</button> | 144 | <button class="stop" disabled={sandboxBusy} onclick={() => (confirmingRemove = true)}>{inContainer ? t('workspace.removeContainer') : t('workspace.removeSandbox')}</button> |
| 114 | {/if} | 145 | {/if} |
| 146 | + <button class="stop" disabled={deleting} onclick={askDelete}>{t('agentDelete.button')}</button> | ||
| 115 | </header> | 147 | </header> |
| 116 | 148 | ||
| 149 | + {#if removal} | ||
| 150 | + <div class="confirm" role="alertdialog" aria-label={t('agentDelete.button')}> | ||
| 151 | + <p>{t('agentDelete.confirm', { agent: agent.title })}</p> | ||
| 152 | + {#if removal.sandbox} | ||
| 153 | + <label class="option"><input type="checkbox" bind:checked={removeSandbox} /> {inContainer ? t('agentDelete.container') : t('agentDelete.sandbox')}</label> | ||
| 154 | + {/if} | ||
| 155 | + {#if removal.folder} | ||
| 156 | + <label class="option"><input type="checkbox" bind:checked={removeFolder} /> {t('agentDelete.folder', { folder: removal.folder })}</label> | ||
| 157 | + {/if} | ||
| 158 | + <button class="stop" disabled={deleting} onclick={deleteAgent}>{t('agentDelete.yes')}</button> | ||
| 159 | + <button onclick={() => (removal = null)}>{t('workspace.removeSandboxCancel')}</button> | ||
| 160 | + </div> | ||
| 161 | + {/if} | ||
| 162 | + | ||
| 117 | {#if confirmingRemove} | 163 | {#if confirmingRemove} |
| 118 | <div class="confirm" role="alertdialog" aria-label={inContainer ? t('workspace.removeContainer') : t('workspace.removeSandbox')}> | 164 | <div class="confirm" role="alertdialog" aria-label={inContainer ? t('workspace.removeContainer') : t('workspace.removeSandbox')}> |
| 119 | <p>{inContainer ? t('workspace.removeContainerConfirm', { agent: agent.title }) : t('workspace.removeSandboxConfirm', { agent: agent.title })}</p> | 165 | <p>{inContainer ? t('workspace.removeContainerConfirm', { agent: agent.title }) : t('workspace.removeSandboxConfirm', { agent: agent.title })}</p> |
| @@ -197,6 +243,7 @@ | |||
| 197 | .confirm { margin: 8px 18px 0; padding: 8px 10px; border: 1px solid var(--danger); border-radius: 6px; font-size: 13px; } | 243 | .confirm { margin: 8px 18px 0; padding: 8px 10px; border: 1px solid var(--danger); border-radius: 6px; font-size: 13px; } |
| 198 | .confirm p { margin: 0 0 6px; } | 244 | .confirm p { margin: 0 0 6px; } |
| 199 | .confirm button { margin-right: 4px; } | 245 | .confirm button { margin-right: 4px; } |
| 246 | + .confirm .option { display: block; margin: 0 0 6px; } | ||
| 200 | .tabs { display: flex; gap: 4px; padding: 6px 18px 0; border-bottom: 1px solid var(--border); } | 247 | .tabs { display: flex; gap: 4px; padding: 6px 18px 0; border-bottom: 1px solid var(--border); } |
| 201 | .tabs button { border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 6px 10px; color: var(--muted); } | 248 | .tabs button { border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 6px 10px; color: var(--muted); } |
| 202 | .tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; } | 249 | .tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; } |
modified
frontend/src/lib/agent/InstructionsTab.svelte +39 -2 | @@ -6,6 +6,9 @@ | ||
| 6 | 6 | // The file is protected in the Files tab; this tab is the one place that |
| 7 | 7 | // writes it (the owner's choice), and removes it after asking (issue #122). |
| 8 | 8 | import { onMount } from 'svelte' |
| 9 | + import type { FilesDroppedPayload } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/events' | |
| 10 | + import { FilesDropped } from '../../../bindings/events' | |
| 11 | + import { subscribe } from '../events' | |
| 9 | 12 | import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 10 | 13 | import type { Instructions } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 11 | 14 | import { t } from '../i18n/index.svelte' |
| @@ -27,6 +30,33 @@ | ||
| 27 | 30 | let written = $state(false) |
| 28 | 31 | let confirmingImport = $state(false) |
| 29 | 32 | let confirmingDelete = $state(false) |
| 33 | + // A file dropped from the Finder on the tab (issue #121): imported, after | |
| 34 | + // asking when the agent has instructions already. | |
| 35 | + const dropId = $derived(`instructions-drop-${agent}`) | |
| 36 | + let dropped = $state('') | |
| 37 | + | |
| 38 | + $effect(() => | |
| 39 | + subscribe<FilesDroppedPayload>(FilesDropped, (payload) => { | |
| 40 | + if (payload.target !== dropId) return | |
| 41 | + const files = payload.files ?? [] | |
| 42 | + problem = '' | |
| 43 | + if (files.length !== 1) { | |
| 44 | + problem = t('instructions.dropOne') | |
| 45 | + return | |
| 46 | + } | |
| 47 | + if (info?.exists) { | |
| 48 | + confirmingDelete = false | |
| 49 | + confirmingImport = false | |
| 50 | + dropped = files[0] | |
| 51 | + } else void run(() => WorkspaceService.ImportInstructions(agent, files[0])) | |
| 52 | + }), | |
| 53 | + ) | |
| 54 | + | |
| 55 | + function importDropped() { | |
| 56 | + const path = dropped | |
| 57 | + dropped = '' | |
| 58 | + void run(() => WorkspaceService.ImportInstructions(agent, path)) | |
| 59 | + } | |
| 30 | 60 | const dirty = $derived(info !== null && info.exists && text !== info.content) |
| 31 | 61 | |
| 32 | 62 | function errorOf(error: unknown): string { |
| @@ -110,7 +140,7 @@ | ||
| 110 | 140 | } |
| 111 | 141 | </script> |
| 112 | 142 | |
| 113 | -<div class="instructions"> | |
| 143 | +<div class="instructions dropzone" id={dropId} data-file-drop-target> | |
| 114 | 144 | {#if info} |
| 115 | 145 | <p class="intro">{t('instructions.intro', { agent: status?.title || agent, file: info.file })}</p> |
| 116 | 146 | {#if problem}<div class="problem" role="alert"><ErrorText raw={problem} /></div>{/if} |
| @@ -133,7 +163,11 @@ | ||
| 133 | 163 | {/key} |
| 134 | 164 | </div> |
| 135 | 165 | <div class="actions"> |
| 136 | - {#if confirmingImport} | |
| 166 | + {#if dropped} | |
| 167 | + <span class="warning">{t('instructions.dropReplaces', { name: dropped.split(/[\\/]/).pop() ?? dropped, file: info.file })}</span> | |
| 168 | + <button type="button" class="primary" onclick={importDropped} disabled={busy}>{t('instructions.dropYes')}</button> | |
| 169 | + <button type="button" onclick={() => (dropped = '')}>{t('creator.cancel')}</button> | |
| 170 | + {:else if confirmingImport} | |
| 137 | 171 | <span class="warning">{t('instructions.importReplaces', { file: info.file })}</span> |
| 138 | 172 | <button type="button" class="primary" onclick={importFile}>{t('instructions.importYes')}</button> |
| 139 | 173 | <button type="button" onclick={() => (confirmingImport = false)}>{t('creator.cancel')}</button> |
| @@ -155,6 +189,7 @@ | ||
| 155 | 189 | <button type="button" class="primary" onclick={create} disabled={busy}>{t('instructions.create')}</button> |
| 156 | 190 | <button type="button" onclick={importFile} disabled={busy}>{t('instructions.import')}</button> |
| 157 | 191 | </div> |
| 192 | + <p class="drop-hint">{t('instructions.dropHint')}</p> | |
| 158 | 193 | {/if} |
| 159 | 194 | {:else if problem} |
| 160 | 195 | <div class="problem" role="alert"><ErrorText raw={problem} /></div> |
| @@ -174,6 +209,8 @@ | ||
| 174 | 209 | .note span { flex: 1; min-width: 200px; } |
| 175 | 210 | .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } |
| 176 | 211 | .warning { color: var(--warn); font-size: 13px; } |
| 212 | + .drop-hint { color: var(--muted); font-size: 12px; } | |
| 213 | + :global(.instructions.dropzone.file-drop-target-active) { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 6px; } | |
| 177 | 214 | .delete { color: var(--danger); border-color: var(--danger); } |
| 178 | 215 | .danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; } |
| 179 | 216 | .primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; } |
| @@ -6,6 +6,9 @@ | |||
| 6 | // The file is protected in the Files tab; this tab is the one place that | 6 | // The file is protected in the Files tab; this tab is the one place that |
| 7 | // writes it (the owner's choice), and removes it after asking (issue #122). | 7 | // writes it (the owner's choice), and removes it after asking (issue #122). |
| 8 | import { onMount } from 'svelte' | 8 | import { onMount } from 'svelte' |
| 9 | + import type { FilesDroppedPayload } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/events' | ||
| 10 | + import { FilesDropped } from '../../../bindings/events' | ||
| 11 | + import { subscribe } from '../events' | ||
| 9 | import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | 12 | import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 10 | import type { Instructions } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | 13 | import type { Instructions } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 11 | import { t } from '../i18n/index.svelte' | 14 | import { t } from '../i18n/index.svelte' |
| @@ -27,6 +30,33 @@ | |||
| 27 | let written = $state(false) | 30 | let written = $state(false) |
| 28 | let confirmingImport = $state(false) | 31 | let confirmingImport = $state(false) |
| 29 | let confirmingDelete = $state(false) | 32 | let confirmingDelete = $state(false) |
| 33 | + // A file dropped from the Finder on the tab (issue #121): imported, after | ||
| 34 | + // asking when the agent has instructions already. | ||
| 35 | + const dropId = $derived(`instructions-drop-${agent}`) | ||
| 36 | + let dropped = $state('') | ||
| 37 | + | ||
| 38 | + $effect(() => | ||
| 39 | + subscribe<FilesDroppedPayload>(FilesDropped, (payload) => { | ||
| 40 | + if (payload.target !== dropId) return | ||
| 41 | + const files = payload.files ?? [] | ||
| 42 | + problem = '' | ||
| 43 | + if (files.length !== 1) { | ||
| 44 | + problem = t('instructions.dropOne') | ||
| 45 | + return | ||
| 46 | + } | ||
| 47 | + if (info?.exists) { | ||
| 48 | + confirmingDelete = false | ||
| 49 | + confirmingImport = false | ||
| 50 | + dropped = files[0] | ||
| 51 | + } else void run(() => WorkspaceService.ImportInstructions(agent, files[0])) | ||
| 52 | + }), | ||
| 53 | + ) | ||
| 54 | + | ||
| 55 | + function importDropped() { | ||
| 56 | + const path = dropped | ||
| 57 | + dropped = '' | ||
| 58 | + void run(() => WorkspaceService.ImportInstructions(agent, path)) | ||
| 59 | + } | ||
| 30 | const dirty = $derived(info !== null && info.exists && text !== info.content) | 60 | const dirty = $derived(info !== null && info.exists && text !== info.content) |
| 31 | 61 | ||
| 32 | function errorOf(error: unknown): string { | 62 | function errorOf(error: unknown): string { |
| @@ -110,7 +140,7 @@ | |||
| 110 | } | 140 | } |
| 111 | </script> | 141 | </script> |
| 112 | 142 | ||
| 113 | -<div class="instructions"> | 143 | +<div class="instructions dropzone" id={dropId} data-file-drop-target> |
| 114 | {#if info} | 144 | {#if info} |
| 115 | <p class="intro">{t('instructions.intro', { agent: status?.title || agent, file: info.file })}</p> | 145 | <p class="intro">{t('instructions.intro', { agent: status?.title || agent, file: info.file })}</p> |
| 116 | {#if problem}<div class="problem" role="alert"><ErrorText raw={problem} /></div>{/if} | 146 | {#if problem}<div class="problem" role="alert"><ErrorText raw={problem} /></div>{/if} |
| @@ -133,7 +163,11 @@ | |||
| 133 | {/key} | 163 | {/key} |
| 134 | </div> | 164 | </div> |
| 135 | <div class="actions"> | 165 | <div class="actions"> |
| 136 | - {#if confirmingImport} | 166 | + {#if dropped} |
| 167 | + <span class="warning">{t('instructions.dropReplaces', { name: dropped.split(/[\\/]/).pop() ?? dropped, file: info.file })}</span> | ||
| 168 | + <button type="button" class="primary" onclick={importDropped} disabled={busy}>{t('instructions.dropYes')}</button> | ||
| 169 | + <button type="button" onclick={() => (dropped = '')}>{t('creator.cancel')}</button> | ||
| 170 | + {:else if confirmingImport} | ||
| 137 | <span class="warning">{t('instructions.importReplaces', { file: info.file })}</span> | 171 | <span class="warning">{t('instructions.importReplaces', { file: info.file })}</span> |
| 138 | <button type="button" class="primary" onclick={importFile}>{t('instructions.importYes')}</button> | 172 | <button type="button" class="primary" onclick={importFile}>{t('instructions.importYes')}</button> |
| 139 | <button type="button" onclick={() => (confirmingImport = false)}>{t('creator.cancel')}</button> | 173 | <button type="button" onclick={() => (confirmingImport = false)}>{t('creator.cancel')}</button> |
| @@ -155,6 +189,7 @@ | |||
| 155 | <button type="button" class="primary" onclick={create} disabled={busy}>{t('instructions.create')}</button> | 189 | <button type="button" class="primary" onclick={create} disabled={busy}>{t('instructions.create')}</button> |
| 156 | <button type="button" onclick={importFile} disabled={busy}>{t('instructions.import')}</button> | 190 | <button type="button" onclick={importFile} disabled={busy}>{t('instructions.import')}</button> |
| 157 | </div> | 191 | </div> |
| 192 | + <p class="drop-hint">{t('instructions.dropHint')}</p> | ||
| 158 | {/if} | 193 | {/if} |
| 159 | {:else if problem} | 194 | {:else if problem} |
| 160 | <div class="problem" role="alert"><ErrorText raw={problem} /></div> | 195 | <div class="problem" role="alert"><ErrorText raw={problem} /></div> |
| @@ -174,6 +209,8 @@ | |||
| 174 | .note span { flex: 1; min-width: 200px; } | 209 | .note span { flex: 1; min-width: 200px; } |
| 175 | .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } | 210 | .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } |
| 176 | .warning { color: var(--warn); font-size: 13px; } | 211 | .warning { color: var(--warn); font-size: 13px; } |
| 212 | + .drop-hint { color: var(--muted); font-size: 12px; } | ||
| 213 | + :global(.instructions.dropzone.file-drop-target-active) { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 6px; } | ||
| 177 | .delete { color: var(--danger); border-color: var(--danger); } | 214 | .delete { color: var(--danger); border-color: var(--danger); } |
| 178 | .danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; } | 215 | .danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; } |
| 179 | .primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; } | 216 | .primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; } |
modified
frontend/src/lib/agent/SkillsTab.svelte +42 -2 | @@ -9,6 +9,9 @@ | ||
| 9 | 9 | // instructions, the folder is protected in the Files tab: only this tab |
| 10 | 10 | // writes there. |
| 11 | 11 | import { onMount } from 'svelte' |
| 12 | + import type { FilesDroppedPayload } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/events' | |
| 13 | + import { FilesDropped } from '../../../bindings/events' | |
| 14 | + import { subscribe } from '../events' | |
| 12 | 15 | import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 13 | 16 | import type { Skill, Skills } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 14 | 17 | import type { File } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/workspace' |
| @@ -39,6 +42,33 @@ | ||
| 39 | 42 | let confirmingDelete = $state(false) |
| 40 | 43 | let newDescription = $state('') |
| 41 | 44 | const dirty = $derived(file !== null && text !== file.content) |
| 45 | + // Skills dropped from the Finder on the list (issue #120): one per file | |
| 46 | + // or folder, the refused ones listed with why. | |
| 47 | + const dropId = $derived(`skills-drop-${agent}`) | |
| 48 | + let refusedDrops = $state<{ name: string; error: string }[]>([]) | |
| 49 | + | |
| 50 | + $effect(() => | |
| 51 | + subscribe<FilesDroppedPayload>(FilesDropped, (payload) => { | |
| 52 | + if (payload.target === dropId && (payload.files ?? []).length > 0) void importDropped(payload.files ?? []) | |
| 53 | + }), | |
| 54 | + ) | |
| 55 | + | |
| 56 | + async function importDropped(paths: string[]) { | |
| 57 | + busy = true | |
| 58 | + problem = '' | |
| 59 | + refusedDrops = [] | |
| 60 | + let last = '' | |
| 61 | + for (const dropped of paths) { | |
| 62 | + try { | |
| 63 | + last = (await WorkspaceService.ImportSkill(agent, dropped))?.folder ?? last | |
| 64 | + written = true | |
| 65 | + } catch (error) { | |
| 66 | + refusedDrops = [...refusedDrops, { name: dropped.split(/[\\/]/).pop() ?? dropped, error: errorOf(error) }] | |
| 67 | + } | |
| 68 | + } | |
| 69 | + busy = false | |
| 70 | + await load(last || selected?.folder) | |
| 71 | + } | |
| 42 | 72 | |
| 43 | 73 | function errorOf(error: unknown): string { |
| 44 | 74 | return error instanceof Error ? error.message : String(error) |
| @@ -158,6 +188,12 @@ | ||
| 158 | 188 | {#if skills} |
| 159 | 189 | <p class="intro">{t('skills.intro', { agent: status?.title || agent, dir: skills.dir })}</p> |
| 160 | 190 | {#if problem}<div class="problem" role="alert"><ErrorText raw={problem} /></div>{/if} |
| 191 | + {#if refusedDrops.length > 0} | |
| 192 | + <div class="problem" role="alert"> | |
| 193 | + <span>{t('skills.dropRefused')}</span> | |
| 194 | + <ul>{#each refusedDrops as refused, index (index)}<li><strong>{refused.name}</strong> — <ErrorText raw={refused.error} /></li>{/each}</ul> | |
| 195 | + </div> | |
| 196 | + {/if} | |
| 161 | 197 | {#if written && running} |
| 162 | 198 | <div class="note" role="status"> |
| 163 | 199 | <span>{t('skills.restart', { agent: status?.title || agent })}</span> |
| @@ -165,7 +201,7 @@ | ||
| 165 | 201 | </div> |
| 166 | 202 | {/if} |
| 167 | 203 | <div class="columns"> |
| 168 | - <aside class="list"> | |
| 204 | + <aside class="list dropzone" id={dropId} data-file-drop-target> | |
| 169 | 205 | {#each skills.skills ?? [] as skill (skill.folder)} |
| 170 | 206 | <button type="button" class="skill" class:active={selected?.folder === skill.folder} onclick={() => select(skill)} title={skill.description}> |
| 171 | 207 | <strong>{skill.name}</strong> |
| @@ -174,6 +210,7 @@ | ||
| 174 | 210 | {:else} |
| 175 | 211 | <p class="muted">{t('skills.none')}</p> |
| 176 | 212 | {/each} |
| 213 | + <p class="drop-hint">{t('skills.dropHint')}</p> | |
| 177 | 214 | <div class="list-actions"> |
| 178 | 215 | <button type="button" class="primary" onclick={startCreating} disabled={busy}>{t('skills.new')}</button> |
| 179 | 216 | <button type="button" onclick={() => importFrom(WorkspaceService.ChooseSkillFolder)} disabled={busy}>{t('skills.importFolder')}</button> |
| @@ -251,7 +288,10 @@ | ||
| 251 | 288 | .skill { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 6px 8px; border: 1px solid transparent; border-radius: 6px; background: none; } |
| 252 | 289 | .skill small { color: var(--muted); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } |
| 253 | 290 | .skill.active { border-color: var(--accent); background: var(--panel); } |
| 254 | - .list-actions { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); } | |
| 291 | + .drop-hint { color: var(--muted); font-size: 12px; text-align: center; margin-top: auto; } | |
| 292 | + :global(.list.dropzone.file-drop-target-active) { border-color: var(--accent); border-style: dashed; background: var(--panel-2); } | |
| 293 | + .problem ul { margin: 0; padding-left: 18px; width: 100%; } | |
| 294 | + .list-actions { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); } | |
| 255 | 295 | .detail { display: flex; flex-direction: column; gap: 8px; min-height: 0; } |
| 256 | 296 | .editor { flex: 1; min-height: 160px; } |
| 257 | 297 | .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; } |
| @@ -9,6 +9,9 @@ | |||
| 9 | // instructions, the folder is protected in the Files tab: only this tab | 9 | // instructions, the folder is protected in the Files tab: only this tab |
| 10 | // writes there. | 10 | // writes there. |
| 11 | import { onMount } from 'svelte' | 11 | import { onMount } from 'svelte' |
| 12 | + import type { FilesDroppedPayload } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/events' | ||
| 13 | + import { FilesDropped } from '../../../bindings/events' | ||
| 14 | + import { subscribe } from '../events' | ||
| 12 | import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | 15 | import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 13 | import type { Skill, Skills } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | 16 | import type { Skill, Skills } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' |
| 14 | import type { File } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/workspace' | 17 | import type { File } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/workspace' |
| @@ -39,6 +42,33 @@ | |||
| 39 | let confirmingDelete = $state(false) | 42 | let confirmingDelete = $state(false) |
| 40 | let newDescription = $state('') | 43 | let newDescription = $state('') |
| 41 | const dirty = $derived(file !== null && text !== file.content) | 44 | const dirty = $derived(file !== null && text !== file.content) |
| 45 | + // Skills dropped from the Finder on the list (issue #120): one per file | ||
| 46 | + // or folder, the refused ones listed with why. | ||
| 47 | + const dropId = $derived(`skills-drop-${agent}`) | ||
| 48 | + let refusedDrops = $state<{ name: string; error: string }[]>([]) | ||
| 49 | + | ||
| 50 | + $effect(() => | ||
| 51 | + subscribe<FilesDroppedPayload>(FilesDropped, (payload) => { | ||
| 52 | + if (payload.target === dropId && (payload.files ?? []).length > 0) void importDropped(payload.files ?? []) | ||
| 53 | + }), | ||
| 54 | + ) | ||
| 55 | + | ||
| 56 | + async function importDropped(paths: string[]) { | ||
| 57 | + busy = true | ||
| 58 | + problem = '' | ||
| 59 | + refusedDrops = [] | ||
| 60 | + let last = '' | ||
| 61 | + for (const dropped of paths) { | ||
| 62 | + try { | ||
| 63 | + last = (await WorkspaceService.ImportSkill(agent, dropped))?.folder ?? last | ||
| 64 | + written = true | ||
| 65 | + } catch (error) { | ||
| 66 | + refusedDrops = [...refusedDrops, { name: dropped.split(/[\\/]/).pop() ?? dropped, error: errorOf(error) }] | ||
| 67 | + } | ||
| 68 | + } | ||
| 69 | + busy = false | ||
| 70 | + await load(last || selected?.folder) | ||
| 71 | + } | ||
| 42 | 72 | ||
| 43 | function errorOf(error: unknown): string { | 73 | function errorOf(error: unknown): string { |
| 44 | return error instanceof Error ? error.message : String(error) | 74 | return error instanceof Error ? error.message : String(error) |
| @@ -158,6 +188,12 @@ | |||
| 158 | {#if skills} | 188 | {#if skills} |
| 159 | <p class="intro">{t('skills.intro', { agent: status?.title || agent, dir: skills.dir })}</p> | 189 | <p class="intro">{t('skills.intro', { agent: status?.title || agent, dir: skills.dir })}</p> |
| 160 | {#if problem}<div class="problem" role="alert"><ErrorText raw={problem} /></div>{/if} | 190 | {#if problem}<div class="problem" role="alert"><ErrorText raw={problem} /></div>{/if} |
| 191 | + {#if refusedDrops.length > 0} | ||
| 192 | + <div class="problem" role="alert"> | ||
| 193 | + <span>{t('skills.dropRefused')}</span> | ||
| 194 | + <ul>{#each refusedDrops as refused, index (index)}<li><strong>{refused.name}</strong> — <ErrorText raw={refused.error} /></li>{/each}</ul> | ||
| 195 | + </div> | ||
| 196 | + {/if} | ||
| 161 | {#if written && running} | 197 | {#if written && running} |
| 162 | <div class="note" role="status"> | 198 | <div class="note" role="status"> |
| 163 | <span>{t('skills.restart', { agent: status?.title || agent })}</span> | 199 | <span>{t('skills.restart', { agent: status?.title || agent })}</span> |
| @@ -165,7 +201,7 @@ | |||
| 165 | </div> | 201 | </div> |
| 166 | {/if} | 202 | {/if} |
| 167 | <div class="columns"> | 203 | <div class="columns"> |
| 168 | - <aside class="list"> | 204 | + <aside class="list dropzone" id={dropId} data-file-drop-target> |
| 169 | {#each skills.skills ?? [] as skill (skill.folder)} | 205 | {#each skills.skills ?? [] as skill (skill.folder)} |
| 170 | <button type="button" class="skill" class:active={selected?.folder === skill.folder} onclick={() => select(skill)} title={skill.description}> | 206 | <button type="button" class="skill" class:active={selected?.folder === skill.folder} onclick={() => select(skill)} title={skill.description}> |
| 171 | <strong>{skill.name}</strong> | 207 | <strong>{skill.name}</strong> |
| @@ -174,6 +210,7 @@ | |||
| 174 | {:else} | 210 | {:else} |
| 175 | <p class="muted">{t('skills.none')}</p> | 211 | <p class="muted">{t('skills.none')}</p> |
| 176 | {/each} | 212 | {/each} |
| 213 | + <p class="drop-hint">{t('skills.dropHint')}</p> | ||
| 177 | <div class="list-actions"> | 214 | <div class="list-actions"> |
| 178 | <button type="button" class="primary" onclick={startCreating} disabled={busy}>{t('skills.new')}</button> | 215 | <button type="button" class="primary" onclick={startCreating} disabled={busy}>{t('skills.new')}</button> |
| 179 | <button type="button" onclick={() => importFrom(WorkspaceService.ChooseSkillFolder)} disabled={busy}>{t('skills.importFolder')}</button> | 216 | <button type="button" onclick={() => importFrom(WorkspaceService.ChooseSkillFolder)} disabled={busy}>{t('skills.importFolder')}</button> |
| @@ -251,7 +288,10 @@ | |||
| 251 | .skill { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 6px 8px; border: 1px solid transparent; border-radius: 6px; background: none; } | 288 | .skill { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 6px 8px; border: 1px solid transparent; border-radius: 6px; background: none; } |
| 252 | .skill small { color: var(--muted); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } | 289 | .skill small { color: var(--muted); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } |
| 253 | .skill.active { border-color: var(--accent); background: var(--panel); } | 290 | .skill.active { border-color: var(--accent); background: var(--panel); } |
| 254 | - .list-actions { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); } | 291 | + .drop-hint { color: var(--muted); font-size: 12px; text-align: center; margin-top: auto; } |
| 292 | + :global(.list.dropzone.file-drop-target-active) { border-color: var(--accent); border-style: dashed; background: var(--panel-2); } | ||
| 293 | + .problem ul { margin: 0; padding-left: 18px; width: 100%; } | ||
| 294 | + .list-actions { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); } | ||
| 255 | .detail { display: flex; flex-direction: column; gap: 8px; min-height: 0; } | 295 | .detail { display: flex; flex-direction: column; gap: 8px; min-height: 0; } |
| 256 | .editor { flex: 1; min-height: 160px; } | 296 | .editor { flex: 1; min-height: 160px; } |
| 257 | .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; } | 297 | .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; } |
modified
frontend/src/lib/chat/MessageView.svelte +30 -1 | @@ -3,6 +3,7 @@ | ||
| 3 | 3 | import { hasMessage, t } from '../i18n/index.svelte' |
| 4 | 4 | import type { Message } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/channels' |
| 5 | 5 | import { Browser } from '@wailsio/runtime' |
| 6 | + import { ChannelService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | |
| 6 | 7 | import { agentTitle, appState, openLinkedFile, openWorkspace, signInInTerminal } from '../state.svelte' |
| 7 | 8 | import { needsSignIn } from '../signin' |
| 8 | 9 | import { answerLink } from '../preview' |
| @@ -16,6 +17,24 @@ | ||
| 16 | 17 | |
| 17 | 18 | let { message }: { message: Message } = $props() |
| 18 | 19 | |
| 20 | + // Trusting the agent's folder (issue #125), from the notice. | |
| 21 | + let trusting = $state(false) | |
| 22 | + let trustProblem = $state('') | |
| 23 | + let trusted = $state(false) | |
| 24 | + async function trustFolder() { | |
| 25 | + if (!message.agent) return | |
| 26 | + trusting = true | |
| 27 | + trustProblem = '' | |
| 28 | + try { | |
| 29 | + await ChannelService.TrustFolder(message.channel, message.agent) | |
| 30 | + trusted = true | |
| 31 | + } catch (error) { | |
| 32 | + trustProblem = error instanceof Error ? error.message : String(error) | |
| 33 | + } finally { | |
| 34 | + trusting = false | |
| 35 | + } | |
| 36 | + } | |
| 37 | + | |
| 19 | 38 | const author = $derived(agentTitle(message.agent ?? '')) |
| 20 | 39 | const authorIcon = $derived(appState.agents.find((agent) => agent.name === message.agent)?.icon) |
| 21 | 40 | // Shown with a spinner while the answer streams. |
| @@ -47,7 +66,14 @@ | ||
| 47 | 66 | const planIcons: Record<string, string> = { completed: '✓', in_progress: '⏵', pending: '○' } |
| 48 | 67 | </script> |
| 49 | 68 | |
| 50 | -{#if message.role === 'system'} | |
| 69 | +{#if message.role === 'system' && message.code === 'workspace-untrusted'} | |
| 70 | + <!-- Vibe ignores its folder's instructions and skills until it is trusted (issue #125). --> | |
| 71 | + <div class="system trust"> | |
| 72 | + <p>{t('system.workspace-untrusted', { agent: author, files: message.error ?? '' })}</p> | |
| 73 | + {#if trustProblem}<p class="detail"><ErrorText raw={trustProblem} /></p>{/if} | |
| 74 | + {#if !trusted}<button type="button" onclick={trustFolder} disabled={trusting}>{t('trust.folder')}</button>{/if} | |
| 75 | + </div> | |
| 76 | +{:else if message.role === 'system'} | |
| 51 | 77 | <p class="system">{hasMessage(systemKey) ? t(systemKey, { agent: author, example }) : author}{#if message.error}<br /><span class="detail"><ErrorText raw={message.error} agent={message.agent} /></span>{#if needsSignIn(message.error, appState.agents.find((candidate) => candidate.name === message.agent)?.signIn)}<br /><button type="button" class="sign-in" onclick={() => message.agent && signInInTerminal(message.agent)}>{t('signIn.open')}</button>{/if}{/if}</p> |
| 52 | 78 | {:else} |
| 53 | 79 | <article class="message {message.role}"> |
| @@ -115,4 +141,7 @@ | ||
| 115 | 141 | .message:hover .copy, .copy:focus-visible { opacity: 1; } |
| 116 | 142 | .sign-in { display: block; margin-top: 6px; } |
| 117 | 143 | .system .sign-in { display: inline-block; font-style: normal; } |
| 144 | + .system.trust { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; } | |
| 145 | + .system.trust p { margin: 0; } | |
| 146 | + .system.trust button { font-style: normal; } | |
| 118 | 147 | </style> |
| @@ -3,6 +3,7 @@ | |||
| 3 | import { hasMessage, t } from '../i18n/index.svelte' | 3 | import { hasMessage, t } from '../i18n/index.svelte' |
| 4 | import type { Message } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/channels' | 4 | import type { Message } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/channels' |
| 5 | import { Browser } from '@wailsio/runtime' | 5 | import { Browser } from '@wailsio/runtime' |
| 6 | + import { ChannelService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app' | ||
| 6 | import { agentTitle, appState, openLinkedFile, openWorkspace, signInInTerminal } from '../state.svelte' | 7 | import { agentTitle, appState, openLinkedFile, openWorkspace, signInInTerminal } from '../state.svelte' |
| 7 | import { needsSignIn } from '../signin' | 8 | import { needsSignIn } from '../signin' |
| 8 | import { answerLink } from '../preview' | 9 | import { answerLink } from '../preview' |
| @@ -16,6 +17,24 @@ | |||
| 16 | 17 | ||
| 17 | let { message }: { message: Message } = $props() | 18 | let { message }: { message: Message } = $props() |
| 18 | 19 | ||
| 20 | + // Trusting the agent's folder (issue #125), from the notice. | ||
| 21 | + let trusting = $state(false) | ||
| 22 | + let trustProblem = $state('') | ||
| 23 | + let trusted = $state(false) | ||
| 24 | + async function trustFolder() { | ||
| 25 | + if (!message.agent) return | ||
| 26 | + trusting = true | ||
| 27 | + trustProblem = '' | ||
| 28 | + try { | ||
| 29 | + await ChannelService.TrustFolder(message.channel, message.agent) | ||
| 30 | + trusted = true | ||
| 31 | + } catch (error) { | ||
| 32 | + trustProblem = error instanceof Error ? error.message : String(error) | ||
| 33 | + } finally { | ||
| 34 | + trusting = false | ||
| 35 | + } | ||
| 36 | + } | ||
| 37 | + | ||
| 19 | const author = $derived(agentTitle(message.agent ?? '')) | 38 | const author = $derived(agentTitle(message.agent ?? '')) |
| 20 | const authorIcon = $derived(appState.agents.find((agent) => agent.name === message.agent)?.icon) | 39 | const authorIcon = $derived(appState.agents.find((agent) => agent.name === message.agent)?.icon) |
| 21 | // Shown with a spinner while the answer streams. | 40 | // Shown with a spinner while the answer streams. |
| @@ -47,7 +66,14 @@ | |||
| 47 | const planIcons: Record<string, string> = { completed: '✓', in_progress: '⏵', pending: '○' } | 66 | const planIcons: Record<string, string> = { completed: '✓', in_progress: '⏵', pending: '○' } |
| 48 | </script> | 67 | </script> |
| 49 | 68 | ||
| 50 | -{#if message.role === 'system'} | 69 | +{#if message.role === 'system' && message.code === 'workspace-untrusted'} |
| 70 | + <!-- Vibe ignores its folder's instructions and skills until it is trusted (issue #125). --> | ||
| 71 | + <div class="system trust"> | ||
| 72 | + <p>{t('system.workspace-untrusted', { agent: author, files: message.error ?? '' })}</p> | ||
| 73 | + {#if trustProblem}<p class="detail"><ErrorText raw={trustProblem} /></p>{/if} | ||
| 74 | + {#if !trusted}<button type="button" onclick={trustFolder} disabled={trusting}>{t('trust.folder')}</button>{/if} | ||
| 75 | + </div> | ||
| 76 | +{:else if message.role === 'system'} | ||
| 51 | <p class="system">{hasMessage(systemKey) ? t(systemKey, { agent: author, example }) : author}{#if message.error}<br /><span class="detail"><ErrorText raw={message.error} agent={message.agent} /></span>{#if needsSignIn(message.error, appState.agents.find((candidate) => candidate.name === message.agent)?.signIn)}<br /><button type="button" class="sign-in" onclick={() => message.agent && signInInTerminal(message.agent)}>{t('signIn.open')}</button>{/if}{/if}</p> | 77 | <p class="system">{hasMessage(systemKey) ? t(systemKey, { agent: author, example }) : author}{#if message.error}<br /><span class="detail"><ErrorText raw={message.error} agent={message.agent} /></span>{#if needsSignIn(message.error, appState.agents.find((candidate) => candidate.name === message.agent)?.signIn)}<br /><button type="button" class="sign-in" onclick={() => message.agent && signInInTerminal(message.agent)}>{t('signIn.open')}</button>{/if}{/if}</p> |
| 52 | {:else} | 78 | {:else} |
| 53 | <article class="message {message.role}"> | 79 | <article class="message {message.role}"> |
| @@ -115,4 +141,7 @@ | |||
| 115 | .message:hover .copy, .copy:focus-visible { opacity: 1; } | 141 | .message:hover .copy, .copy:focus-visible { opacity: 1; } |
| 116 | .sign-in { display: block; margin-top: 6px; } | 142 | .sign-in { display: block; margin-top: 6px; } |
| 117 | .system .sign-in { display: inline-block; font-style: normal; } | 143 | .system .sign-in { display: inline-block; font-style: normal; } |
| 144 | + .system.trust { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; } | ||
| 145 | + .system.trust p { margin: 0; } | ||
| 146 | + .system.trust button { font-style: normal; } | ||
| 118 | </style> | 147 | </style> |
modified
frontend/src/lib/errors.test.ts +5 -0 | @@ -22,6 +22,11 @@ describe('explain', () => { | ||
| 22 | 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 | 23 | expect(explain('You are not authenticated to Docker. Starting the sign-in flow...')?.key).toBe('error.sbxNotSignedIn') |
| 24 | 24 | expect(explain('gh is not signed in to GitHub')?.key).toBe('error.ghNotSignedIn') |
| 25 | + expect(explain('photo.png: a skill is a folder holding a SKILL.md, or a Markdown file (.md)')?.key).toBe('error.notMarkdown') | |
| 26 | + expect(explain('this folder is not a skill: it has no SKILL.md')?.key).toBe('error.notASkill') | |
| 27 | + expect(explain('the agent already has a skill with this name')?.key).toBe('error.skillExists') | |
| 28 | + expect(explain('photo.png is not a text file')?.key).toBe('error.notText') | |
| 29 | + expect(explain('a folder cannot be imported as instructions, only a text file')?.key).toBe('error.notText') | |
| 25 | 30 | expect(explain('Do you want to authenticate on the web? [y/N]')?.key).toBe('error.openaiSignIn') |
| 26 | 31 | expect(explain('sbx env create: exit status 1: no OpenAI credential stored: run sbx secret set openai --oauth')?.key).toBe('error.openaiSignIn') |
| 27 | 32 | }) |
| @@ -22,6 +22,11 @@ describe('explain', () => { | |||
| 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 | expect(explain('gh is not signed in to GitHub')?.key).toBe('error.ghNotSignedIn') |
| 25 | + expect(explain('photo.png: a skill is a folder holding a SKILL.md, or a Markdown file (.md)')?.key).toBe('error.notMarkdown') | ||
| 26 | + expect(explain('this folder is not a skill: it has no SKILL.md')?.key).toBe('error.notASkill') | ||
| 27 | + expect(explain('the agent already has a skill with this name')?.key).toBe('error.skillExists') | ||
| 28 | + expect(explain('photo.png is not a text file')?.key).toBe('error.notText') | ||
| 29 | + expect(explain('a folder cannot be imported as instructions, only a text file')?.key).toBe('error.notText') | ||
| 25 | expect(explain('Do you want to authenticate on the web? [y/N]')?.key).toBe('error.openaiSignIn') | 30 | expect(explain('Do you want to authenticate on the web? [y/N]')?.key).toBe('error.openaiSignIn') |
| 26 | expect(explain('sbx env create: exit status 1: no OpenAI credential stored: run sbx secret set openai --oauth')?.key).toBe('error.openaiSignIn') | 31 | expect(explain('sbx env create: exit status 1: no OpenAI credential stored: run sbx secret set openai --oauth')?.key).toBe('error.openaiSignIn') |
| 27 | }) | 32 | }) |
modified
frontend/src/lib/errors.ts +5 -0 | @@ -29,6 +29,11 @@ const rules: Rule[] = [ | ||
| 29 | 29 | // Claude Code whose sign-in could not be verified (issue #110): before the |
| 30 | 30 | // generic rule below, which would not match it anyway. |
| 31 | 31 | { pattern: /couldn't verify your sign-in|org_config_required_unavailable/i, key: 'error.signInNotVerified' }, |
| 32 | + // Skills and instructions dropped or imported (issues #120, #121). | |
| 33 | + { pattern: /a skill is a folder holding a SKILL\.md, or a Markdown file/i, key: 'error.notMarkdown' }, | |
| 34 | + { pattern: /this folder is not a skill: it has no SKILL\.md/i, key: 'error.notASkill' }, | |
| 35 | + { pattern: /the agent already has a skill with this name/i, key: 'error.skillExists' }, | |
| 36 | + { pattern: /cannot be imported as instructions, only a text file|is not a text file$/i, key: 'error.notText' }, | |
| 32 | 37 | // An agent without a key nor a signed-in account (issues #105, #106). |
| 33 | 38 | { pattern: /Authentication required/i, key: 'error.authRequired' }, |
| 34 | 39 | // gh without a token (issue #103). |
| @@ -29,6 +29,11 @@ const rules: Rule[] = [ | |||
| 29 | // Claude Code whose sign-in could not be verified (issue #110): before the | 29 | // Claude Code whose sign-in could not be verified (issue #110): before the |
| 30 | // generic rule below, which would not match it anyway. | 30 | // generic rule below, which would not match it anyway. |
| 31 | { pattern: /couldn't verify your sign-in|org_config_required_unavailable/i, key: 'error.signInNotVerified' }, | 31 | { pattern: /couldn't verify your sign-in|org_config_required_unavailable/i, key: 'error.signInNotVerified' }, |
| 32 | + // Skills and instructions dropped or imported (issues #120, #121). | ||
| 33 | + { pattern: /a skill is a folder holding a SKILL\.md, or a Markdown file/i, key: 'error.notMarkdown' }, | ||
| 34 | + { pattern: /this folder is not a skill: it has no SKILL\.md/i, key: 'error.notASkill' }, | ||
| 35 | + { pattern: /the agent already has a skill with this name/i, key: 'error.skillExists' }, | ||
| 36 | + { pattern: /cannot be imported as instructions, only a text file|is not a text file$/i, key: 'error.notText' }, | ||
| 32 | // An agent without a key nor a signed-in account (issues #105, #106). | 37 | // An agent without a key nor a signed-in account (issues #105, #106). |
| 33 | { pattern: /Authentication required/i, key: 'error.authRequired' }, | 38 | { pattern: /Authentication required/i, key: 'error.authRequired' }, |
| 34 | // gh without a token (issue #103). | 39 | // gh without a token (issue #103). |
modified
frontend/src/lib/i18n/messages.ts +40 -0 | @@ -133,6 +133,9 @@ export const en = { | ||
| 133 | 133 | 'system.agent-left': '{agent} left the channel.', |
| 134 | 134 | 'system.no-recipient': 'Nobody was addressed: mention an agent with @ (for example @{example}).', |
| 135 | 135 | 'system.agent-unavailable': '{agent} could not answer.', |
| 136 | + 'system.workspace-untrusted': '{agent} does not trust its folder yet: it ignores its instructions and its skills ({files}). Trust it so that it reads them — the folder\'s own settings then apply too.', | |
| 137 | + 'system.workspace-trusted': '{agent} now trusts its folder: it reads its instructions and its skills from its next answer.', | |
| 138 | + 'trust.folder': 'Trust its folder', | |
| 136 | 139 | 'system.attachment-unavailable': 'A file was not sent to {agent}.', |
| 137 | 140 | 'system.handoff-limit': '{agent} mentioned another agent, but this message was already handed from agent to agent as often as allowed (limits.maxAgentHandoffs): the chain stops here. Mention the agent yourself to go on.', |
| 138 | 141 | |
| @@ -272,6 +275,13 @@ export const en = { | ||
| 272 | 275 | 'workspace.tab.terminal': 'Terminal', |
| 273 | 276 | 'workspace.tab.log': 'Log', |
| 274 | 277 | 'workspace.tab.instructions': 'Instructions', |
| 278 | + 'agentDelete.button': 'Delete the agent', | |
| 279 | + 'agentDelete.confirm': 'Delete {agent}? It leaves the configuration and the channels, and its conversation and its history are deleted. Also:', | |
| 280 | + 'agentDelete.sandbox': 'remove its sandbox', | |
| 281 | + 'agentDelete.container': 'remove its container', | |
| 282 | + 'agentDelete.folder': 'put its folder in the trash ({folder})', | |
| 283 | + 'agentDelete.yes': 'Delete', | |
| 284 | + 'agentDelete.partly': '{agent} is deleted, but not everything could be removed: {problems}', | |
| 275 | 285 | 'workspace.tab.skills': 'Skills', |
| 276 | 286 | 'skills.intro': '{agent} reads its skills in {dir}: one folder per skill, with a SKILL.md that says what the skill is for and how to do it. The agent uses a skill when its description fits what you ask, or when you call it with /.', |
| 277 | 287 | 'skills.none': 'No skill yet.', |
| @@ -286,6 +296,11 @@ export const en = { | ||
| 286 | 296 | 'skills.descriptionHint': 'One or two sentences: the agent reads them to choose the skill.', |
| 287 | 297 | 'skills.create': 'Create the skill', |
| 288 | 298 | 'skills.delete': 'Delete the skill', |
| 299 | + 'skills.dropHint': 'Or drop a .md file or a skill folder here.', | |
| 300 | + 'skills.dropRefused': 'Not imported:', | |
| 301 | + 'error.notMarkdown': 'A skill is a folder holding a SKILL.md, or a Markdown file (.md).', | |
| 302 | + 'error.notASkill': 'This folder is not a skill: it has no SKILL.md.', | |
| 303 | + 'error.skillExists': 'The agent already has a skill with this name: it is not replaced.', | |
| 289 | 304 | 'skills.deleteConfirm': 'Delete the skill {name}? Its folder goes to the trash of this computer (or is gone for good in a container or a sandbox without a folder here).', |
| 290 | 305 | 'skills.deleteYes': 'Delete', |
| 291 | 306 | 'skills.restart': '{agent} finds its skills when its session starts: restart it so that it sees the new ones.', |
| @@ -303,6 +318,11 @@ export const en = { | ||
| 303 | 318 | 'instructions.restart': '{agent} reads its instructions when its session starts: restart it so that it uses the new ones.', |
| 304 | 319 | 'instructions.restartButton': 'Restart the agent', |
| 305 | 320 | 'instructions.delete': 'Delete the instructions', |
| 321 | + 'instructions.dropHint': 'You can also drop a text file on this tab.', | |
| 322 | + 'instructions.dropOne': 'Drop one file only: it becomes the agent\'s instructions.', | |
| 323 | + 'instructions.dropReplaces': '{name} replaces {file}.', | |
| 324 | + 'instructions.dropYes': 'Replace', | |
| 325 | + 'error.notText': 'Only a text file can become instructions (not a folder, an image or a document).', | |
| 306 | 326 | 'instructions.deleteConfirm': 'Delete {file}? It goes to the trash of this computer (or is gone for good in a container or a sandbox without a folder here).', |
| 307 | 327 | 'instructions.template': '# {agent}\n\n## Your role\n\nYou help me with … (say what the agent is for).\n\n## How you answer\n\n- In English, clearly and briefly.\n- Ask a question when something is not clear.\n\n## Rules\n\n- Ask before deleting or replacing a file.\n- Say when you are not sure.\n', |
| 308 | 328 | 'workspace.conversation': '💬 Conversation', |
| @@ -700,6 +720,9 @@ export const fr: Record<MessageKey, string> = { | ||
| 700 | 720 | 'system.agent-left': '{agent} a quitté le channel.', |
| 701 | 721 | 'system.no-recipient': "Personne n'est désigné : mentionnez un agent avec @ (par exemple @{example}).", |
| 702 | 722 | 'system.agent-unavailable': "{agent} n'a pas pu répondre.", |
| 723 | + 'system.workspace-untrusted': "{agent} ne fait pas encore confiance à son dossier : il ignore ses instructions et ses skills ({files}). Faites-lui confiance pour qu'il les lise — les réglages propres au dossier s'appliquent alors aussi.", | |
| 724 | + 'system.workspace-trusted': "{agent} fait maintenant confiance à son dossier : il lit ses instructions et ses skills dès sa prochaine réponse.", | |
| 725 | + 'trust.folder': 'Faire confiance à son dossier', | |
| 703 | 726 | 'system.attachment-unavailable': "Un fichier n'a pas été envoyé à {agent}.", |
| 704 | 727 | 'system.handoff-limit': "{agent} a mentionné un autre agent, mais ce message est déjà passé d'agent en agent autant de fois que permis (limits.maxAgentHandoffs) : la chaîne s'arrête ici. Mentionnez vous-même l'agent pour continuer.", |
| 705 | 728 | |
| @@ -835,6 +858,13 @@ export const fr: Record<MessageKey, string> = { | ||
| 835 | 858 | 'workspace.tab.terminal': 'Terminal', |
| 836 | 859 | 'workspace.tab.log': 'Journal', |
| 837 | 860 | 'workspace.tab.instructions': 'Instructions', |
| 861 | + 'agentDelete.button': "Supprimer l'agent", | |
| 862 | + 'agentDelete.confirm': "Supprimer {agent} ? Il quitte la configuration et les channels, et sa conversation et son historique sont supprimés. Et aussi :", | |
| 863 | + 'agentDelete.sandbox': 'supprimer sa sandbox', | |
| 864 | + 'agentDelete.container': 'supprimer son conteneur', | |
| 865 | + 'agentDelete.folder': 'mettre son dossier à la corbeille ({folder})', | |
| 866 | + 'agentDelete.yes': 'Supprimer', | |
| 867 | + 'agentDelete.partly': "{agent} est supprimé, mais tout n'a pas pu être retiré : {problems}", | |
| 838 | 868 | 'workspace.tab.skills': 'Skills', |
| 839 | 869 | 'skills.intro': "{agent} lit ses skills dans {dir} : un dossier par skill, avec un SKILL.md qui dit à quoi sert la skill et comment faire. L'agent utilise une skill quand sa description correspond à votre demande, ou quand vous l'appelez avec /.", |
| 840 | 870 | 'skills.none': 'Pas encore de skill.', |
| @@ -849,6 +879,11 @@ export const fr: Record<MessageKey, string> = { | ||
| 849 | 879 | 'skills.descriptionHint': "Une ou deux phrases : l'agent les lit pour choisir la skill.", |
| 850 | 880 | 'skills.create': 'Créer la skill', |
| 851 | 881 | 'skills.delete': 'Supprimer la skill', |
| 882 | + 'skills.dropHint': "Ou déposez ici un fichier .md ou le dossier d'une skill.", | |
| 883 | + 'skills.dropRefused': 'Non importé :', | |
| 884 | + 'error.notMarkdown': "Une skill est un dossier qui contient un SKILL.md, ou un fichier Markdown (.md).", | |
| 885 | + 'error.notASkill': "Ce dossier n'est pas une skill : il n'a pas de SKILL.md.", | |
| 886 | + 'error.skillExists': "L'agent a déjà une skill de ce nom : elle n'est pas remplacée.", | |
| 852 | 887 | 'skills.deleteConfirm': "Supprimer la skill {name} ? Son dossier part à la corbeille de cet ordinateur (ou disparaît pour de bon dans un conteneur ou une sandbox sans dossier ici).", |
| 853 | 888 | 'skills.deleteYes': 'Supprimer', |
| 854 | 889 | 'skills.restart': "{agent} découvre ses skills au début de sa session : redémarrez-le pour qu'il voie les nouvelles.", |
| @@ -866,6 +901,11 @@ export const fr: Record<MessageKey, string> = { | ||
| 866 | 901 | 'instructions.restart': "{agent} lit ses instructions au début de sa session : redémarrez-le pour qu'il utilise les nouvelles.", |
| 867 | 902 | 'instructions.restartButton': "Redémarrer l'agent", |
| 868 | 903 | 'instructions.delete': 'Supprimer les instructions', |
| 904 | + 'instructions.dropHint': 'Vous pouvez aussi déposer un fichier texte sur cet onglet.', | |
| 905 | + 'instructions.dropOne': "Déposez un seul fichier : il devient les instructions de l'agent.", | |
| 906 | + 'instructions.dropReplaces': '{name} remplace {file}.', | |
| 907 | + 'instructions.dropYes': 'Remplacer', | |
| 908 | + 'error.notText': "Seul un fichier texte peut devenir des instructions (pas un dossier, une image ni un document).", | |
| 869 | 909 | 'instructions.deleteConfirm': "Supprimer {file} ? Il part à la corbeille de cet ordinateur (ou disparaît pour de bon dans un conteneur ou une sandbox sans dossier ici).", |
| 870 | 910 | 'instructions.template': "# {agent}\n\n## Ton rôle\n\nTu m'aides à … (dites à quoi sert l'agent).\n\n## Comment tu réponds\n\n- En français, clairement et brièvement.\n- Pose une question quand quelque chose n'est pas clair.\n\n## Règles\n\n- Demande avant de supprimer ou de remplacer un fichier.\n- Dis-le quand tu n'es pas sûr.\n", |
| 871 | 911 | 'workspace.conversation': '💬 Conversation', |
| @@ -133,6 +133,9 @@ export const en = { | |||
| 133 | 'system.agent-left': '{agent} left the channel.', | 133 | 'system.agent-left': '{agent} left the channel.', |
| 134 | 'system.no-recipient': 'Nobody was addressed: mention an agent with @ (for example @{example}).', | 134 | 'system.no-recipient': 'Nobody was addressed: mention an agent with @ (for example @{example}).', |
| 135 | 'system.agent-unavailable': '{agent} could not answer.', | 135 | 'system.agent-unavailable': '{agent} could not answer.', |
| 136 | + 'system.workspace-untrusted': '{agent} does not trust its folder yet: it ignores its instructions and its skills ({files}). Trust it so that it reads them — the folder\'s own settings then apply too.', | ||
| 137 | + 'system.workspace-trusted': '{agent} now trusts its folder: it reads its instructions and its skills from its next answer.', | ||
| 138 | + 'trust.folder': 'Trust its folder', | ||
| 136 | 'system.attachment-unavailable': 'A file was not sent to {agent}.', | 139 | 'system.attachment-unavailable': 'A file was not sent to {agent}.', |
| 137 | 'system.handoff-limit': '{agent} mentioned another agent, but this message was already handed from agent to agent as often as allowed (limits.maxAgentHandoffs): the chain stops here. Mention the agent yourself to go on.', | 140 | 'system.handoff-limit': '{agent} mentioned another agent, but this message was already handed from agent to agent as often as allowed (limits.maxAgentHandoffs): the chain stops here. Mention the agent yourself to go on.', |
| 138 | 141 | ||
| @@ -272,6 +275,13 @@ export const en = { | |||
| 272 | 'workspace.tab.terminal': 'Terminal', | 275 | 'workspace.tab.terminal': 'Terminal', |
| 273 | 'workspace.tab.log': 'Log', | 276 | 'workspace.tab.log': 'Log', |
| 274 | 'workspace.tab.instructions': 'Instructions', | 277 | 'workspace.tab.instructions': 'Instructions', |
| 278 | + 'agentDelete.button': 'Delete the agent', | ||
| 279 | + 'agentDelete.confirm': 'Delete {agent}? It leaves the configuration and the channels, and its conversation and its history are deleted. Also:', | ||
| 280 | + 'agentDelete.sandbox': 'remove its sandbox', | ||
| 281 | + 'agentDelete.container': 'remove its container', | ||
| 282 | + 'agentDelete.folder': 'put its folder in the trash ({folder})', | ||
| 283 | + 'agentDelete.yes': 'Delete', | ||
| 284 | + 'agentDelete.partly': '{agent} is deleted, but not everything could be removed: {problems}', | ||
| 275 | 'workspace.tab.skills': 'Skills', | 285 | 'workspace.tab.skills': 'Skills', |
| 276 | 'skills.intro': '{agent} reads its skills in {dir}: one folder per skill, with a SKILL.md that says what the skill is for and how to do it. The agent uses a skill when its description fits what you ask, or when you call it with /.', | 286 | 'skills.intro': '{agent} reads its skills in {dir}: one folder per skill, with a SKILL.md that says what the skill is for and how to do it. The agent uses a skill when its description fits what you ask, or when you call it with /.', |
| 277 | 'skills.none': 'No skill yet.', | 287 | 'skills.none': 'No skill yet.', |
| @@ -286,6 +296,11 @@ export const en = { | |||
| 286 | 'skills.descriptionHint': 'One or two sentences: the agent reads them to choose the skill.', | 296 | 'skills.descriptionHint': 'One or two sentences: the agent reads them to choose the skill.', |
| 287 | 'skills.create': 'Create the skill', | 297 | 'skills.create': 'Create the skill', |
| 288 | 'skills.delete': 'Delete the skill', | 298 | 'skills.delete': 'Delete the skill', |
| 299 | + 'skills.dropHint': 'Or drop a .md file or a skill folder here.', | ||
| 300 | + 'skills.dropRefused': 'Not imported:', | ||
| 301 | + 'error.notMarkdown': 'A skill is a folder holding a SKILL.md, or a Markdown file (.md).', | ||
| 302 | + 'error.notASkill': 'This folder is not a skill: it has no SKILL.md.', | ||
| 303 | + 'error.skillExists': 'The agent already has a skill with this name: it is not replaced.', | ||
| 289 | 'skills.deleteConfirm': 'Delete the skill {name}? Its folder goes to the trash of this computer (or is gone for good in a container or a sandbox without a folder here).', | 304 | 'skills.deleteConfirm': 'Delete the skill {name}? Its folder goes to the trash of this computer (or is gone for good in a container or a sandbox without a folder here).', |
| 290 | 'skills.deleteYes': 'Delete', | 305 | 'skills.deleteYes': 'Delete', |
| 291 | 'skills.restart': '{agent} finds its skills when its session starts: restart it so that it sees the new ones.', | 306 | 'skills.restart': '{agent} finds its skills when its session starts: restart it so that it sees the new ones.', |
| @@ -303,6 +318,11 @@ export const en = { | |||
| 303 | 'instructions.restart': '{agent} reads its instructions when its session starts: restart it so that it uses the new ones.', | 318 | 'instructions.restart': '{agent} reads its instructions when its session starts: restart it so that it uses the new ones.', |
| 304 | 'instructions.restartButton': 'Restart the agent', | 319 | 'instructions.restartButton': 'Restart the agent', |
| 305 | 'instructions.delete': 'Delete the instructions', | 320 | 'instructions.delete': 'Delete the instructions', |
| 321 | + 'instructions.dropHint': 'You can also drop a text file on this tab.', | ||
| 322 | + 'instructions.dropOne': 'Drop one file only: it becomes the agent\'s instructions.', | ||
| 323 | + 'instructions.dropReplaces': '{name} replaces {file}.', | ||
| 324 | + 'instructions.dropYes': 'Replace', | ||
| 325 | + 'error.notText': 'Only a text file can become instructions (not a folder, an image or a document).', | ||
| 306 | 'instructions.deleteConfirm': 'Delete {file}? It goes to the trash of this computer (or is gone for good in a container or a sandbox without a folder here).', | 326 | 'instructions.deleteConfirm': 'Delete {file}? It goes to the trash of this computer (or is gone for good in a container or a sandbox without a folder here).', |
| 307 | 'instructions.template': '# {agent}\n\n## Your role\n\nYou help me with … (say what the agent is for).\n\n## How you answer\n\n- In English, clearly and briefly.\n- Ask a question when something is not clear.\n\n## Rules\n\n- Ask before deleting or replacing a file.\n- Say when you are not sure.\n', | 327 | 'instructions.template': '# {agent}\n\n## Your role\n\nYou help me with … (say what the agent is for).\n\n## How you answer\n\n- In English, clearly and briefly.\n- Ask a question when something is not clear.\n\n## Rules\n\n- Ask before deleting or replacing a file.\n- Say when you are not sure.\n', |
| 308 | 'workspace.conversation': '💬 Conversation', | 328 | 'workspace.conversation': '💬 Conversation', |
| @@ -700,6 +720,9 @@ export const fr: Record<MessageKey, string> = { | |||
| 700 | 'system.agent-left': '{agent} a quitté le channel.', | 720 | 'system.agent-left': '{agent} a quitté le channel.', |
| 701 | 'system.no-recipient': "Personne n'est désigné : mentionnez un agent avec @ (par exemple @{example}).", | 721 | 'system.no-recipient': "Personne n'est désigné : mentionnez un agent avec @ (par exemple @{example}).", |
| 702 | 'system.agent-unavailable': "{agent} n'a pas pu répondre.", | 722 | 'system.agent-unavailable': "{agent} n'a pas pu répondre.", |
| 723 | + 'system.workspace-untrusted': "{agent} ne fait pas encore confiance à son dossier : il ignore ses instructions et ses skills ({files}). Faites-lui confiance pour qu'il les lise — les réglages propres au dossier s'appliquent alors aussi.", | ||
| 724 | + 'system.workspace-trusted': "{agent} fait maintenant confiance à son dossier : il lit ses instructions et ses skills dès sa prochaine réponse.", | ||
| 725 | + 'trust.folder': 'Faire confiance à son dossier', | ||
| 703 | 'system.attachment-unavailable': "Un fichier n'a pas été envoyé à {agent}.", | 726 | 'system.attachment-unavailable': "Un fichier n'a pas été envoyé à {agent}.", |
| 704 | 'system.handoff-limit': "{agent} a mentionné un autre agent, mais ce message est déjà passé d'agent en agent autant de fois que permis (limits.maxAgentHandoffs) : la chaîne s'arrête ici. Mentionnez vous-même l'agent pour continuer.", | 727 | 'system.handoff-limit': "{agent} a mentionné un autre agent, mais ce message est déjà passé d'agent en agent autant de fois que permis (limits.maxAgentHandoffs) : la chaîne s'arrête ici. Mentionnez vous-même l'agent pour continuer.", |
| 705 | 728 | ||
| @@ -835,6 +858,13 @@ export const fr: Record<MessageKey, string> = { | |||
| 835 | 'workspace.tab.terminal': 'Terminal', | 858 | 'workspace.tab.terminal': 'Terminal', |
| 836 | 'workspace.tab.log': 'Journal', | 859 | 'workspace.tab.log': 'Journal', |
| 837 | 'workspace.tab.instructions': 'Instructions', | 860 | 'workspace.tab.instructions': 'Instructions', |
| 861 | + 'agentDelete.button': "Supprimer l'agent", | ||
| 862 | + 'agentDelete.confirm': "Supprimer {agent} ? Il quitte la configuration et les channels, et sa conversation et son historique sont supprimés. Et aussi :", | ||
| 863 | + 'agentDelete.sandbox': 'supprimer sa sandbox', | ||
| 864 | + 'agentDelete.container': 'supprimer son conteneur', | ||
| 865 | + 'agentDelete.folder': 'mettre son dossier à la corbeille ({folder})', | ||
| 866 | + 'agentDelete.yes': 'Supprimer', | ||
| 867 | + 'agentDelete.partly': "{agent} est supprimé, mais tout n'a pas pu être retiré : {problems}", | ||
| 838 | 'workspace.tab.skills': 'Skills', | 868 | 'workspace.tab.skills': 'Skills', |
| 839 | 'skills.intro': "{agent} lit ses skills dans {dir} : un dossier par skill, avec un SKILL.md qui dit à quoi sert la skill et comment faire. L'agent utilise une skill quand sa description correspond à votre demande, ou quand vous l'appelez avec /.", | 869 | 'skills.intro': "{agent} lit ses skills dans {dir} : un dossier par skill, avec un SKILL.md qui dit à quoi sert la skill et comment faire. L'agent utilise une skill quand sa description correspond à votre demande, ou quand vous l'appelez avec /.", |
| 840 | 'skills.none': 'Pas encore de skill.', | 870 | 'skills.none': 'Pas encore de skill.', |
| @@ -849,6 +879,11 @@ export const fr: Record<MessageKey, string> = { | |||
| 849 | 'skills.descriptionHint': "Une ou deux phrases : l'agent les lit pour choisir la skill.", | 879 | 'skills.descriptionHint': "Une ou deux phrases : l'agent les lit pour choisir la skill.", |
| 850 | 'skills.create': 'Créer la skill', | 880 | 'skills.create': 'Créer la skill', |
| 851 | 'skills.delete': 'Supprimer la skill', | 881 | 'skills.delete': 'Supprimer la skill', |
| 882 | + 'skills.dropHint': "Ou déposez ici un fichier .md ou le dossier d'une skill.", | ||
| 883 | + 'skills.dropRefused': 'Non importé :', | ||
| 884 | + 'error.notMarkdown': "Une skill est un dossier qui contient un SKILL.md, ou un fichier Markdown (.md).", | ||
| 885 | + 'error.notASkill': "Ce dossier n'est pas une skill : il n'a pas de SKILL.md.", | ||
| 886 | + 'error.skillExists': "L'agent a déjà une skill de ce nom : elle n'est pas remplacée.", | ||
| 852 | 'skills.deleteConfirm': "Supprimer la skill {name} ? Son dossier part à la corbeille de cet ordinateur (ou disparaît pour de bon dans un conteneur ou une sandbox sans dossier ici).", | 887 | 'skills.deleteConfirm': "Supprimer la skill {name} ? Son dossier part à la corbeille de cet ordinateur (ou disparaît pour de bon dans un conteneur ou une sandbox sans dossier ici).", |
| 853 | 'skills.deleteYes': 'Supprimer', | 888 | 'skills.deleteYes': 'Supprimer', |
| 854 | 'skills.restart': "{agent} découvre ses skills au début de sa session : redémarrez-le pour qu'il voie les nouvelles.", | 889 | 'skills.restart': "{agent} découvre ses skills au début de sa session : redémarrez-le pour qu'il voie les nouvelles.", |
| @@ -866,6 +901,11 @@ export const fr: Record<MessageKey, string> = { | |||
| 866 | 'instructions.restart': "{agent} lit ses instructions au début de sa session : redémarrez-le pour qu'il utilise les nouvelles.", | 901 | 'instructions.restart': "{agent} lit ses instructions au début de sa session : redémarrez-le pour qu'il utilise les nouvelles.", |
| 867 | 'instructions.restartButton': "Redémarrer l'agent", | 902 | 'instructions.restartButton': "Redémarrer l'agent", |
| 868 | 'instructions.delete': 'Supprimer les instructions', | 903 | 'instructions.delete': 'Supprimer les instructions', |
| 904 | + 'instructions.dropHint': 'Vous pouvez aussi déposer un fichier texte sur cet onglet.', | ||
| 905 | + 'instructions.dropOne': "Déposez un seul fichier : il devient les instructions de l'agent.", | ||
| 906 | + 'instructions.dropReplaces': '{name} remplace {file}.', | ||
| 907 | + 'instructions.dropYes': 'Remplacer', | ||
| 908 | + 'error.notText': "Seul un fichier texte peut devenir des instructions (pas un dossier, une image ni un document).", | ||
| 869 | 'instructions.deleteConfirm': "Supprimer {file} ? Il part à la corbeille de cet ordinateur (ou disparaît pour de bon dans un conteneur ou une sandbox sans dossier ici).", | 909 | 'instructions.deleteConfirm': "Supprimer {file} ? Il part à la corbeille de cet ordinateur (ou disparaît pour de bon dans un conteneur ou une sandbox sans dossier ici).", |
| 870 | 'instructions.template': "# {agent}\n\n## Ton rôle\n\nTu m'aides à … (dites à quoi sert l'agent).\n\n## Comment tu réponds\n\n- En français, clairement et brièvement.\n- Pose une question quand quelque chose n'est pas clair.\n\n## Règles\n\n- Demande avant de supprimer ou de remplacer un fichier.\n- Dis-le quand tu n'es pas sûr.\n", | 910 | 'instructions.template': "# {agent}\n\n## Ton rôle\n\nTu m'aides à … (dites à quoi sert l'agent).\n\n## Comment tu réponds\n\n- En français, clairement et brièvement.\n- Pose une question quand quelque chose n'est pas clair.\n\n## Règles\n\n- Demande avant de supprimer ou de remplacer un fichier.\n- Dis-le quand tu n'es pas sûr.\n", |
| 871 | 'workspace.conversation': '💬 Conversation', | 911 | 'workspace.conversation': '💬 Conversation', |
modified
internal/acp/conn.go +3 -0 | @@ -109,6 +109,8 @@ type Conn struct { | ||
| 109 | 109 | mu sync.Mutex |
| 110 | 110 | closing bool |
| 111 | 111 | exitErr error |
| 112 | + // trust is how each session's folder stood when it opened (issue #125). | |
| 113 | + trust map[string]WorkspaceTrust | |
| 112 | 114 | } |
| 113 | 115 | |
| 114 | 116 | // Start launches the agent and performs the ACP handshake (initialize). It |
| @@ -116,6 +118,7 @@ type Conn struct { | ||
| 116 | 118 | // the agent wrote on stderr, which usually say why it failed. |
| 117 | 119 | func Start(ctx context.Context, spec Spec, options Options) (*Conn, error) { |
| 118 | 120 | conn := &Conn{ |
| 121 | + trust: map[string]WorkspaceTrust{}, | |
| 119 | 122 | spec: spec, |
| 120 | 123 | done: make(chan struct{}), |
| 121 | 124 | closeGrace: orDuration(options.CloseGrace, DefaultCloseGrace), |
| @@ -109,6 +109,8 @@ type Conn struct { | |||
| 109 | mu sync.Mutex | 109 | mu sync.Mutex |
| 110 | closing bool | 110 | closing bool |
| 111 | exitErr error | 111 | exitErr error |
| 112 | + // trust is how each session's folder stood when it opened (issue #125). | ||
| 113 | + trust map[string]WorkspaceTrust | ||
| 112 | } | 114 | } |
| 113 | 115 | ||
| 114 | // Start launches the agent and performs the ACP handshake (initialize). It | 116 | // Start launches the agent and performs the ACP handshake (initialize). It |
| @@ -116,6 +118,7 @@ type Conn struct { | |||
| 116 | // the agent wrote on stderr, which usually say why it failed. | 118 | // the agent wrote on stderr, which usually say why it failed. |
| 117 | func Start(ctx context.Context, spec Spec, options Options) (*Conn, error) { | 119 | func Start(ctx context.Context, spec Spec, options Options) (*Conn, error) { |
| 118 | conn := &Conn{ | 120 | conn := &Conn{ |
| 121 | + trust: map[string]WorkspaceTrust{}, | ||
| 119 | spec: spec, | 122 | spec: spec, |
| 120 | done: make(chan struct{}), | 123 | done: make(chan struct{}), |
| 121 | closeGrace: orDuration(options.CloseGrace, DefaultCloseGrace), | 124 | closeGrace: orDuration(options.CloseGrace, DefaultCloseGrace), |
modified
internal/acp/session.go +9 -1 | @@ -129,7 +129,12 @@ type TurnResult struct { | ||
| 129 | 129 | // } |
| 130 | 130 | func (c *Conn) LoadSession(ctx context.Context, id, cwd string, handler SessionHandler) error { |
| 131 | 131 | c.sessions.register(id, handler) |
| 132 | - _, err := c.connection.LoadSession(ctx, sdk.LoadSessionRequest{SessionId: sdk.SessionId(id), Cwd: cwd, McpServers: []sdk.McpServer{}}) | |
| 132 | + response, err := c.connection.LoadSession(ctx, sdk.LoadSessionRequest{SessionId: sdk.SessionId(id), Cwd: cwd, McpServers: []sdk.McpServer{}}) | |
| 133 | + if err == nil { | |
| 134 | + c.mu.Lock() | |
| 135 | + c.trust[id] = trustOf(response.Meta) | |
| 136 | + c.mu.Unlock() | |
| 137 | + } | |
| 133 | 138 | return readable(err) |
| 134 | 139 | } |
| 135 | 140 | |
| @@ -145,6 +150,9 @@ func (c *Conn) NewSession(ctx context.Context, cwd string, handler SessionHandle | ||
| 145 | 150 | } |
| 146 | 151 | id := string(response.SessionId) |
| 147 | 152 | c.sessions.register(id, handler) |
| 153 | + c.mu.Lock() | |
| 154 | + c.trust[id] = trustOf(response.Meta) | |
| 155 | + c.mu.Unlock() | |
| 148 | 156 | return id, nil |
| 149 | 157 | } |
| 150 | 158 | |
| @@ -129,7 +129,12 @@ type TurnResult struct { | |||
| 129 | // } | 129 | // } |
| 130 | func (c *Conn) LoadSession(ctx context.Context, id, cwd string, handler SessionHandler) error { | 130 | func (c *Conn) LoadSession(ctx context.Context, id, cwd string, handler SessionHandler) error { |
| 131 | c.sessions.register(id, handler) | 131 | c.sessions.register(id, handler) |
| 132 | - _, err := c.connection.LoadSession(ctx, sdk.LoadSessionRequest{SessionId: sdk.SessionId(id), Cwd: cwd, McpServers: []sdk.McpServer{}}) | 132 | + response, err := c.connection.LoadSession(ctx, sdk.LoadSessionRequest{SessionId: sdk.SessionId(id), Cwd: cwd, McpServers: []sdk.McpServer{}}) |
| 133 | + if err == nil { | ||
| 134 | + c.mu.Lock() | ||
| 135 | + c.trust[id] = trustOf(response.Meta) | ||
| 136 | + c.mu.Unlock() | ||
| 137 | + } | ||
| 133 | return readable(err) | 138 | return readable(err) |
| 134 | } | 139 | } |
| 135 | 140 | ||
| @@ -145,6 +150,9 @@ func (c *Conn) NewSession(ctx context.Context, cwd string, handler SessionHandle | |||
| 145 | } | 150 | } |
| 146 | id := string(response.SessionId) | 151 | id := string(response.SessionId) |
| 147 | c.sessions.register(id, handler) | 152 | c.sessions.register(id, handler) |
| 153 | + c.mu.Lock() | ||
| 154 | + c.trust[id] = trustOf(response.Meta) | ||
| 155 | + c.mu.Unlock() | ||
| 148 | return id, nil | 156 | return id, nil |
| 149 | } | 157 | } |
| 150 | 158 | ||
added
internal/acp/trust.go +98 -0 | new file mode 100644 | ||
| @@ -0,0 +1,98 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +package acp | |
| 4 | + | |
| 5 | +import ( | |
| 6 | + "context" | |
| 7 | + "encoding/json" | |
| 8 | + "errors" | |
| 9 | +) | |
| 10 | + | |
| 11 | +// Workspace trust (issue #125). Mistral Vibe loads a folder's own settings — | |
| 12 | +// its AGENTS.md, its skills (.vibe/skills, .agents/skills), its .vibe/ — only | |
| 13 | +// when the folder is trusted. vibe-acp asks nothing on the keyboard: it says | |
| 14 | +// how the folder stands in the _meta of its session/new answer | |
| 15 | +// ("workspace_trust": {status, details}), and takes a decision through the | |
| 16 | +// ACP extension method _trust/decision. Other agents send nothing: their | |
| 17 | +// sessions have no WorkspaceTrust. | |
| 18 | + | |
| 19 | +// WorkspaceTrust is how a session's folder stands with its agent. | |
| 20 | +type WorkspaceTrust struct { | |
| 21 | + // Status: trusted, session or untrusted ("" when the agent said nothing). | |
| 22 | + Status string | |
| 23 | + // Files are what the agent would read once the folder is trusted | |
| 24 | + // (AGENTS.md, .vibe/skills…): without them, there is nothing to trust. | |
| 25 | + Files []string | |
| 26 | + // Decisions are the ones the agent accepts (trust_cwd, trust_repo…). | |
| 27 | + Decisions []string | |
| 28 | +} | |
| 29 | + | |
| 30 | +// Untrusted reports whether the agent ignores files of its folder until the | |
| 31 | +// folder is trusted. | |
| 32 | +func (t WorkspaceTrust) Untrusted() bool { return t.Status == "untrusted" && len(t.Files) > 0 } | |
| 33 | + | |
| 34 | +// trustOf reads the workspace_trust of a session/new (or session/load) _meta. | |
| 35 | +func trustOf(meta map[string]any) WorkspaceTrust { | |
| 36 | + raw, ok := meta["workspace_trust"] | |
| 37 | + if !ok { | |
| 38 | + raw = meta["workspaceTrust"] | |
| 39 | + } | |
| 40 | + data, err := json.Marshal(raw) | |
| 41 | + if err != nil || raw == nil { | |
| 42 | + return WorkspaceTrust{} | |
| 43 | + } | |
| 44 | + var trust struct { | |
| 45 | + Status string `json:"status"` | |
| 46 | + Details *struct { | |
| 47 | + Files []string `json:"detected_files"` | |
| 48 | + FilesCamel []string `json:"detectedFiles"` | |
| 49 | + Decisions []string `json:"available_decisions"` | |
| 50 | + DecCamel []string `json:"availableDecisions"` | |
| 51 | + } `json:"details"` | |
| 52 | + } | |
| 53 | + if json.Unmarshal(data, &trust) != nil { | |
| 54 | + return WorkspaceTrust{} | |
| 55 | + } | |
| 56 | + result := WorkspaceTrust{Status: trust.Status} | |
| 57 | + if trust.Details != nil { | |
| 58 | + result.Files = append(trust.Details.Files, trust.Details.FilesCamel...) | |
| 59 | + result.Decisions = append(trust.Details.Decisions, trust.Details.DecCamel...) | |
| 60 | + } | |
| 61 | + return result | |
| 62 | +} | |
| 63 | + | |
| 64 | +// WorkspaceTrust is how the folder of session id stood when it opened. | |
| 65 | +func (c *Conn) WorkspaceTrust(id string) WorkspaceTrust { | |
| 66 | + c.mu.Lock() | |
| 67 | + defer c.mu.Unlock() | |
| 68 | + return c.trust[id] | |
| 69 | +} | |
| 70 | + | |
| 71 | +// ErrNoTrustDecision is returned when the agent offers no way to trust its | |
| 72 | +// folder for good. | |
| 73 | +var ErrNoTrustDecision = errors.New("the agent offers no way to trust its folder") | |
| 74 | + | |
| 75 | +// TrustWorkspace tells the agent to trust the folder of session id for good | |
| 76 | +// (the folder itself, else its repository): _trust/decision. The agent | |
| 77 | +// reads the folder's settings in its next session. | |
| 78 | +func (c *Conn) TrustWorkspace(ctx context.Context, id string) error { | |
| 79 | + decision := "" | |
| 80 | + for _, wanted := range []string{"trust_cwd", "trust_repo"} { | |
| 81 | + for _, offered := range c.WorkspaceTrust(id).Decisions { | |
| 82 | + if offered == wanted && decision == "" { | |
| 83 | + decision = wanted | |
| 84 | + } | |
| 85 | + } | |
| 86 | + } | |
| 87 | + if decision == "" { | |
| 88 | + return ErrNoTrustDecision | |
| 89 | + } | |
| 90 | + _, err := c.connection.CallExtension(ctx, "_trust/decision", map[string]string{"sessionId": id, "decision": decision}) | |
| 91 | + if err != nil { | |
| 92 | + return readable(err) | |
| 93 | + } | |
| 94 | + c.mu.Lock() | |
| 95 | + c.trust[id] = WorkspaceTrust{Status: "trusted"} | |
| 96 | + c.mu.Unlock() | |
| 97 | + return nil | |
| 98 | +} | |
| new file mode 100644 | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +package acp | ||
| 4 | + | ||
| 5 | +import ( | ||
| 6 | + "context" | ||
| 7 | + "encoding/json" | ||
| 8 | + "errors" | ||
| 9 | +) | ||
| 10 | + | ||
| 11 | +// Workspace trust (issue #125). Mistral Vibe loads a folder's own settings — | ||
| 12 | +// its AGENTS.md, its skills (.vibe/skills, .agents/skills), its .vibe/ — only | ||
| 13 | +// when the folder is trusted. vibe-acp asks nothing on the keyboard: it says | ||
| 14 | +// how the folder stands in the _meta of its session/new answer | ||
| 15 | +// ("workspace_trust": {status, details}), and takes a decision through the | ||
| 16 | +// ACP extension method _trust/decision. Other agents send nothing: their | ||
| 17 | +// sessions have no WorkspaceTrust. | ||
| 18 | + | ||
| 19 | +// WorkspaceTrust is how a session's folder stands with its agent. | ||
| 20 | +type WorkspaceTrust struct { | ||
| 21 | + // Status: trusted, session or untrusted ("" when the agent said nothing). | ||
| 22 | + Status string | ||
| 23 | + // Files are what the agent would read once the folder is trusted | ||
| 24 | + // (AGENTS.md, .vibe/skills…): without them, there is nothing to trust. | ||
| 25 | + Files []string | ||
| 26 | + // Decisions are the ones the agent accepts (trust_cwd, trust_repo…). | ||
| 27 | + Decisions []string | ||
| 28 | +} | ||
| 29 | + | ||
| 30 | +// Untrusted reports whether the agent ignores files of its folder until the | ||
| 31 | +// folder is trusted. | ||
| 32 | +func (t WorkspaceTrust) Untrusted() bool { return t.Status == "untrusted" && len(t.Files) > 0 } | ||
| 33 | + | ||
| 34 | +// trustOf reads the workspace_trust of a session/new (or session/load) _meta. | ||
| 35 | +func trustOf(meta map[string]any) WorkspaceTrust { | ||
| 36 | + raw, ok := meta["workspace_trust"] | ||
| 37 | + if !ok { | ||
| 38 | + raw = meta["workspaceTrust"] | ||
| 39 | + } | ||
| 40 | + data, err := json.Marshal(raw) | ||
| 41 | + if err != nil || raw == nil { | ||
| 42 | + return WorkspaceTrust{} | ||
| 43 | + } | ||
| 44 | + var trust struct { | ||
| 45 | + Status string `json:"status"` | ||
| 46 | + Details *struct { | ||
| 47 | + Files []string `json:"detected_files"` | ||
| 48 | + FilesCamel []string `json:"detectedFiles"` | ||
| 49 | + Decisions []string `json:"available_decisions"` | ||
| 50 | + DecCamel []string `json:"availableDecisions"` | ||
| 51 | + } `json:"details"` | ||
| 52 | + } | ||
| 53 | + if json.Unmarshal(data, &trust) != nil { | ||
| 54 | + return WorkspaceTrust{} | ||
| 55 | + } | ||
| 56 | + result := WorkspaceTrust{Status: trust.Status} | ||
| 57 | + if trust.Details != nil { | ||
| 58 | + result.Files = append(trust.Details.Files, trust.Details.FilesCamel...) | ||
| 59 | + result.Decisions = append(trust.Details.Decisions, trust.Details.DecCamel...) | ||
| 60 | + } | ||
| 61 | + return result | ||
| 62 | +} | ||
| 63 | + | ||
| 64 | +// WorkspaceTrust is how the folder of session id stood when it opened. | ||
| 65 | +func (c *Conn) WorkspaceTrust(id string) WorkspaceTrust { | ||
| 66 | + c.mu.Lock() | ||
| 67 | + defer c.mu.Unlock() | ||
| 68 | + return c.trust[id] | ||
| 69 | +} | ||
| 70 | + | ||
| 71 | +// ErrNoTrustDecision is returned when the agent offers no way to trust its | ||
| 72 | +// folder for good. | ||
| 73 | +var ErrNoTrustDecision = errors.New("the agent offers no way to trust its folder") | ||
| 74 | + | ||
| 75 | +// TrustWorkspace tells the agent to trust the folder of session id for good | ||
| 76 | +// (the folder itself, else its repository): _trust/decision. The agent | ||
| 77 | +// reads the folder's settings in its next session. | ||
| 78 | +func (c *Conn) TrustWorkspace(ctx context.Context, id string) error { | ||
| 79 | + decision := "" | ||
| 80 | + for _, wanted := range []string{"trust_cwd", "trust_repo"} { | ||
| 81 | + for _, offered := range c.WorkspaceTrust(id).Decisions { | ||
| 82 | + if offered == wanted && decision == "" { | ||
| 83 | + decision = wanted | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + } | ||
| 87 | + if decision == "" { | ||
| 88 | + return ErrNoTrustDecision | ||
| 89 | + } | ||
| 90 | + _, err := c.connection.CallExtension(ctx, "_trust/decision", map[string]string{"sessionId": id, "decision": decision}) | ||
| 91 | + if err != nil { | ||
| 92 | + return readable(err) | ||
| 93 | + } | ||
| 94 | + c.mu.Lock() | ||
| 95 | + c.trust[id] = WorkspaceTrust{Status: "trusted"} | ||
| 96 | + c.mu.Unlock() | ||
| 97 | + return nil | ||
| 98 | +} | ||
added
internal/acp/trust_internal_test.go +35 -0 | new file mode 100644 | ||
| @@ -0,0 +1,35 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +package acp | |
| 4 | + | |
| 5 | +import ( | |
| 6 | + "slices" | |
| 7 | + "testing" | |
| 8 | +) | |
| 9 | + | |
| 10 | +// Issue #125: the workspace_trust of vibe-acp's session/new _meta, as its | |
| 11 | +// protocol models write it (snake_case or camelCase aliases). | |
| 12 | +func TestTrustOfReadsVibesWorkspaceTrust(t *testing.T) { | |
| 13 | + trust := trustOf(map[string]any{"workspace_trust": map[string]any{ | |
| 14 | + "status": "untrusted", | |
| 15 | + "details": map[string]any{ | |
| 16 | + "cwd": "/w", "detected_files": []any{"AGENTS.md", ".vibe/skills"}, "available_decisions": []any{"trust_cwd", "decline"}, | |
| 17 | + }, | |
| 18 | + }}) | |
| 19 | + if !trust.Untrusted() || !slices.Equal(trust.Files, []string{"AGENTS.md", ".vibe/skills"}) || !slices.Equal(trust.Decisions, []string{"trust_cwd", "decline"}) { | |
| 20 | + t.Fatalf("snake_case: %+v", trust) | |
| 21 | + } | |
| 22 | + camel := trustOf(map[string]any{"workspace_trust": map[string]any{ | |
| 23 | + "status": "untrusted", "details": map[string]any{"detectedFiles": []any{"AGENTS.md"}, "availableDecisions": []any{"trust_repo"}}, | |
| 24 | + }}) | |
| 25 | + if !camel.Untrusted() || camel.Decisions[0] != "trust_repo" { | |
| 26 | + t.Fatalf("camelCase: %+v", camel) | |
| 27 | + } | |
| 28 | + // Untrusted with nothing to read: no notice. | |
| 29 | + if trustOf(map[string]any{"workspace_trust": map[string]any{"status": "untrusted"}}).Untrusted() { | |
| 30 | + t.Fatal("nothing to trust") | |
| 31 | + } | |
| 32 | + if trustOf(map[string]any{"workspace_trust": map[string]any{"status": "trusted"}}).Untrusted() || trustOf(nil).Status != "" { | |
| 33 | + t.Fatal("trusted, or an agent that says nothing") | |
| 34 | + } | |
| 35 | +} | |
| new file mode 100644 | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +package acp | ||
| 4 | + | ||
| 5 | +import ( | ||
| 6 | + "slices" | ||
| 7 | + "testing" | ||
| 8 | +) | ||
| 9 | + | ||
| 10 | +// Issue #125: the workspace_trust of vibe-acp's session/new _meta, as its | ||
| 11 | +// protocol models write it (snake_case or camelCase aliases). | ||
| 12 | +func TestTrustOfReadsVibesWorkspaceTrust(t *testing.T) { | ||
| 13 | + trust := trustOf(map[string]any{"workspace_trust": map[string]any{ | ||
| 14 | + "status": "untrusted", | ||
| 15 | + "details": map[string]any{ | ||
| 16 | + "cwd": "/w", "detected_files": []any{"AGENTS.md", ".vibe/skills"}, "available_decisions": []any{"trust_cwd", "decline"}, | ||
| 17 | + }, | ||
| 18 | + }}) | ||
| 19 | + if !trust.Untrusted() || !slices.Equal(trust.Files, []string{"AGENTS.md", ".vibe/skills"}) || !slices.Equal(trust.Decisions, []string{"trust_cwd", "decline"}) { | ||
| 20 | + t.Fatalf("snake_case: %+v", trust) | ||
| 21 | + } | ||
| 22 | + camel := trustOf(map[string]any{"workspace_trust": map[string]any{ | ||
| 23 | + "status": "untrusted", "details": map[string]any{"detectedFiles": []any{"AGENTS.md"}, "availableDecisions": []any{"trust_repo"}}, | ||
| 24 | + }}) | ||
| 25 | + if !camel.Untrusted() || camel.Decisions[0] != "trust_repo" { | ||
| 26 | + t.Fatalf("camelCase: %+v", camel) | ||
| 27 | + } | ||
| 28 | + // Untrusted with nothing to read: no notice. | ||
| 29 | + if trustOf(map[string]any{"workspace_trust": map[string]any{"status": "untrusted"}}).Untrusted() { | ||
| 30 | + t.Fatal("nothing to trust") | ||
| 31 | + } | ||
| 32 | + if trustOf(map[string]any{"workspace_trust": map[string]any{"status": "trusted"}}).Untrusted() || trustOf(nil).Status != "" { | ||
| 33 | + t.Fatal("trusted, or an agent that says nothing") | ||
| 34 | + } | ||
| 35 | +} | ||
added
internal/app/removeagent.go +128 -0 | new file mode 100644 | ||
| @@ -0,0 +1,128 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +package app | |
| 4 | + | |
| 5 | +import ( | |
| 6 | + "context" | |
| 7 | + "fmt" | |
| 8 | + "os" | |
| 9 | + "path/filepath" | |
| 10 | + | |
| 11 | + "git.rickub.com/bots-garden/sidekicks/internal/agents" | |
| 12 | + "git.rickub.com/bots-garden/sidekicks/internal/config" | |
| 13 | + "git.rickub.com/bots-garden/sidekicks/internal/lifecycle" | |
| 14 | + "git.rickub.com/bots-garden/sidekicks/internal/workspace" | |
| 15 | +) | |
| 16 | + | |
| 17 | +// Deleting an agent cleanly (issue #128): it was enough to take its entry | |
| 18 | +// out of the configuration, but its sandbox or its container, its folder | |
| 19 | +// and its history stayed — and its name with them ("This name is already | |
| 20 | +// used… try ratatouille-2"). | |
| 21 | + | |
| 22 | +// AgentRemoval is what deleting an agent can also remove, for the | |
| 23 | +// interface to ask: its sandbox or its container (a remove command), and | |
| 24 | +// its folder when an assistant made it (directly in the agents' folder). | |
| 25 | +type AgentRemoval struct { | |
| 26 | + // Sandbox: runtime.lifecycle has a remove command. | |
| 27 | + Sandbox bool `json:"sandbox"` | |
| 28 | + // Folder is the agent's folder that may go to the trash, or "". | |
| 29 | + Folder string `json:"folder"` | |
| 30 | +} | |
| 31 | + | |
| 32 | +// RemovalOptions are the user's choices: remove the sandbox or the | |
| 33 | +// container, put the folder in the trash. | |
| 34 | +type RemovalOptions struct { | |
| 35 | + Sandbox bool `json:"sandbox"` | |
| 36 | + Folder bool `json:"folder"` | |
| 37 | +} | |
| 38 | + | |
| 39 | +// RemovalResult tells what could not be removed — the agent itself is gone | |
| 40 | +// from the configuration and the history. | |
| 41 | +type RemovalResult struct { | |
| 42 | + Problems []string `json:"problems"` | |
| 43 | +} | |
| 44 | + | |
| 45 | +// Removal says what deleting agent can also remove. | |
| 46 | +func (s *ConfigService) Removal(agent string) (AgentRemoval, error) { | |
| 47 | + definition, ok := s.Core.manager.Definition(agent) | |
| 48 | + if !ok { | |
| 49 | + return AgentRemoval{}, fmt.Errorf("%w: %s", agents.ErrUnknownAgent, agent) | |
| 50 | + } | |
| 51 | + return AgentRemoval{ | |
| 52 | + Sandbox: len(definition.Runtime.Lifecycle.Remove) > 0, | |
| 53 | + Folder: agentFolderIn(definition, s.Core.agentsFolder()), | |
| 54 | + }, nil | |
| 55 | +} | |
| 56 | + | |
| 57 | +// agentFolderIn is the folder of definition's agent when it is directly in | |
| 58 | +// the agents' folder — the one an assistant made: its lifecycle folder (an | |
| 59 | +// sbx or a container agent, whose workspace is inside), else its workspace. | |
| 60 | +// Anything else is the user's own folder, never put in the trash. | |
| 61 | +func agentFolderIn(definition config.Agent, agentsFolder string) string { | |
| 62 | + if agentsFolder == "" { | |
| 63 | + return "" | |
| 64 | + } | |
| 65 | + root, err := filepath.Abs(agentsFolder) | |
| 66 | + if err != nil { | |
| 67 | + return "" | |
| 68 | + } | |
| 69 | + for _, candidate := range []string{definition.Runtime.Lifecycle.Folder, definition.Workspace, filepath.Dir(definition.Workspace)} { | |
| 70 | + if candidate == "" || !filepath.IsAbs(candidate) { | |
| 71 | + continue | |
| 72 | + } | |
| 73 | + clean := filepath.Clean(candidate) | |
| 74 | + if filepath.Dir(clean) != root || clean == root { | |
| 75 | + continue | |
| 76 | + } | |
| 77 | + if info, err := os.Stat(clean); err == nil && info.IsDir() { | |
| 78 | + return clean | |
| 79 | + } | |
| 80 | + } | |
| 81 | + return "" | |
| 82 | +} | |
| 83 | + | |
| 84 | +// DeleteAgent deletes agent (issue #128): it is stopped; its sandbox or | |
| 85 | +// its container is removed when asked; it is forgotten by the history (its | |
| 86 | +// direct conversation, its places in channels); its entry leaves the | |
| 87 | +// configuration (and the channels the file declares); its folder goes to | |
| 88 | +// the trash when asked and an assistant made it. What could not be done is | |
| 89 | +// in Problems; only the configuration failing is an error. | |
| 90 | +func (s *ConfigService) DeleteAgent(ctx context.Context, agent string, options RemovalOptions) (RemovalResult, error) { | |
| 91 | + removal, err := s.Removal(agent) | |
| 92 | + if err != nil { | |
| 93 | + return RemovalResult{}, err | |
| 94 | + } | |
| 95 | + definition, _ := s.Core.manager.Definition(agent) | |
| 96 | + result := RemovalResult{Problems: []string{}} | |
| 97 | + problem := func(what string, err error) { | |
| 98 | + if err != nil { | |
| 99 | + result.Problems = append(result.Problems, what+": "+err.Error()) | |
| 100 | + } | |
| 101 | + } | |
| 102 | + problem("stop", s.Core.manager.Stop(ctx, agent)) | |
| 103 | + if options.Sandbox && removal.Sandbox { | |
| 104 | + log := func(line string) { _ = s.Core.manager.Log(agent, "sandbox: "+line) } | |
| 105 | + problem("sandbox", s.Core.sandboxes.Run(ctx, definition, lifecycle.Remove, log)) | |
| 106 | + } | |
| 107 | + problem("history", s.Core.Channels().ForgetAgent(agent)) | |
| 108 | + | |
| 109 | + path := s.Core.path() | |
| 110 | + content, err := os.ReadFile(path) | |
| 111 | + if err != nil { | |
| 112 | + return result, err | |
| 113 | + } | |
| 114 | + updated, err := config.RemoveAgent(content, agent) | |
| 115 | + if err != nil { | |
| 116 | + return result, err | |
| 117 | + } | |
| 118 | + if err := config.Save(path, updated); err != nil { | |
| 119 | + return result, err | |
| 120 | + } | |
| 121 | + | |
| 122 | + if options.Folder && removal.Folder != "" { | |
| 123 | + // To the trash: what an agent wrote in its folder can be brought back. | |
| 124 | + parent := workspace.NewLocal(filepath.Dir(removal.Folder)) | |
| 125 | + problem("folder", parent.Remove(ctx, filepath.Base(removal.Folder))) | |
| 126 | + } | |
| 127 | + return result, nil | |
| 128 | +} | |
| new file mode 100644 | |||
| @@ -0,0 +1,128 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +package app | ||
| 4 | + | ||
| 5 | +import ( | ||
| 6 | + "context" | ||
| 7 | + "fmt" | ||
| 8 | + "os" | ||
| 9 | + "path/filepath" | ||
| 10 | + | ||
| 11 | + "git.rickub.com/bots-garden/sidekicks/internal/agents" | ||
| 12 | + "git.rickub.com/bots-garden/sidekicks/internal/config" | ||
| 13 | + "git.rickub.com/bots-garden/sidekicks/internal/lifecycle" | ||
| 14 | + "git.rickub.com/bots-garden/sidekicks/internal/workspace" | ||
| 15 | +) | ||
| 16 | + | ||
| 17 | +// Deleting an agent cleanly (issue #128): it was enough to take its entry | ||
| 18 | +// out of the configuration, but its sandbox or its container, its folder | ||
| 19 | +// and its history stayed — and its name with them ("This name is already | ||
| 20 | +// used… try ratatouille-2"). | ||
| 21 | + | ||
| 22 | +// AgentRemoval is what deleting an agent can also remove, for the | ||
| 23 | +// interface to ask: its sandbox or its container (a remove command), and | ||
| 24 | +// its folder when an assistant made it (directly in the agents' folder). | ||
| 25 | +type AgentRemoval struct { | ||
| 26 | + // Sandbox: runtime.lifecycle has a remove command. | ||
| 27 | + Sandbox bool `json:"sandbox"` | ||
| 28 | + // Folder is the agent's folder that may go to the trash, or "". | ||
| 29 | + Folder string `json:"folder"` | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +// RemovalOptions are the user's choices: remove the sandbox or the | ||
| 33 | +// container, put the folder in the trash. | ||
| 34 | +type RemovalOptions struct { | ||
| 35 | + Sandbox bool `json:"sandbox"` | ||
| 36 | + Folder bool `json:"folder"` | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | +// RemovalResult tells what could not be removed — the agent itself is gone | ||
| 40 | +// from the configuration and the history. | ||
| 41 | +type RemovalResult struct { | ||
| 42 | + Problems []string `json:"problems"` | ||
| 43 | +} | ||
| 44 | + | ||
| 45 | +// Removal says what deleting agent can also remove. | ||
| 46 | +func (s *ConfigService) Removal(agent string) (AgentRemoval, error) { | ||
| 47 | + definition, ok := s.Core.manager.Definition(agent) | ||
| 48 | + if !ok { | ||
| 49 | + return AgentRemoval{}, fmt.Errorf("%w: %s", agents.ErrUnknownAgent, agent) | ||
| 50 | + } | ||
| 51 | + return AgentRemoval{ | ||
| 52 | + Sandbox: len(definition.Runtime.Lifecycle.Remove) > 0, | ||
| 53 | + Folder: agentFolderIn(definition, s.Core.agentsFolder()), | ||
| 54 | + }, nil | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | +// agentFolderIn is the folder of definition's agent when it is directly in | ||
| 58 | +// the agents' folder — the one an assistant made: its lifecycle folder (an | ||
| 59 | +// sbx or a container agent, whose workspace is inside), else its workspace. | ||
| 60 | +// Anything else is the user's own folder, never put in the trash. | ||
| 61 | +func agentFolderIn(definition config.Agent, agentsFolder string) string { | ||
| 62 | + if agentsFolder == "" { | ||
| 63 | + return "" | ||
| 64 | + } | ||
| 65 | + root, err := filepath.Abs(agentsFolder) | ||
| 66 | + if err != nil { | ||
| 67 | + return "" | ||
| 68 | + } | ||
| 69 | + for _, candidate := range []string{definition.Runtime.Lifecycle.Folder, definition.Workspace, filepath.Dir(definition.Workspace)} { | ||
| 70 | + if candidate == "" || !filepath.IsAbs(candidate) { | ||
| 71 | + continue | ||
| 72 | + } | ||
| 73 | + clean := filepath.Clean(candidate) | ||
| 74 | + if filepath.Dir(clean) != root || clean == root { | ||
| 75 | + continue | ||
| 76 | + } | ||
| 77 | + if info, err := os.Stat(clean); err == nil && info.IsDir() { | ||
| 78 | + return clean | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | + return "" | ||
| 82 | +} | ||
| 83 | + | ||
| 84 | +// DeleteAgent deletes agent (issue #128): it is stopped; its sandbox or | ||
| 85 | +// its container is removed when asked; it is forgotten by the history (its | ||
| 86 | +// direct conversation, its places in channels); its entry leaves the | ||
| 87 | +// configuration (and the channels the file declares); its folder goes to | ||
| 88 | +// the trash when asked and an assistant made it. What could not be done is | ||
| 89 | +// in Problems; only the configuration failing is an error. | ||
| 90 | +func (s *ConfigService) DeleteAgent(ctx context.Context, agent string, options RemovalOptions) (RemovalResult, error) { | ||
| 91 | + removal, err := s.Removal(agent) | ||
| 92 | + if err != nil { | ||
| 93 | + return RemovalResult{}, err | ||
| 94 | + } | ||
| 95 | + definition, _ := s.Core.manager.Definition(agent) | ||
| 96 | + result := RemovalResult{Problems: []string{}} | ||
| 97 | + problem := func(what string, err error) { | ||
| 98 | + if err != nil { | ||
| 99 | + result.Problems = append(result.Problems, what+": "+err.Error()) | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | + problem("stop", s.Core.manager.Stop(ctx, agent)) | ||
| 103 | + if options.Sandbox && removal.Sandbox { | ||
| 104 | + log := func(line string) { _ = s.Core.manager.Log(agent, "sandbox: "+line) } | ||
| 105 | + problem("sandbox", s.Core.sandboxes.Run(ctx, definition, lifecycle.Remove, log)) | ||
| 106 | + } | ||
| 107 | + problem("history", s.Core.Channels().ForgetAgent(agent)) | ||
| 108 | + | ||
| 109 | + path := s.Core.path() | ||
| 110 | + content, err := os.ReadFile(path) | ||
| 111 | + if err != nil { | ||
| 112 | + return result, err | ||
| 113 | + } | ||
| 114 | + updated, err := config.RemoveAgent(content, agent) | ||
| 115 | + if err != nil { | ||
| 116 | + return result, err | ||
| 117 | + } | ||
| 118 | + if err := config.Save(path, updated); err != nil { | ||
| 119 | + return result, err | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + if options.Folder && removal.Folder != "" { | ||
| 123 | + // To the trash: what an agent wrote in its folder can be brought back. | ||
| 124 | + parent := workspace.NewLocal(filepath.Dir(removal.Folder)) | ||
| 125 | + problem("folder", parent.Remove(ctx, filepath.Base(removal.Folder))) | ||
| 126 | + } | ||
| 127 | + return result, nil | ||
| 128 | +} | ||
added
internal/app/removeagent_test.go +98 -0 | new file mode 100644 | ||
| @@ -0,0 +1,98 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +package app_test | |
| 4 | + | |
| 5 | +import ( | |
| 6 | + "context" | |
| 7 | + "os" | |
| 8 | + "path/filepath" | |
| 9 | + "strings" | |
| 10 | + "testing" | |
| 11 | + | |
| 12 | + "git.rickub.com/bots-garden/sidekicks/internal/app" | |
| 13 | + "git.rickub.com/bots-garden/sidekicks/internal/config" | |
| 14 | +) | |
| 15 | + | |
| 16 | +// removalSetup: ratatouille, made by the sandbox assistant in the agents' | |
| 17 | +// folder (its sandbox exists), and alice, whose folder is the user's own. | |
| 18 | +func removalSetup(t *testing.T) (*app.ConfigService, string, string) { | |
| 19 | + t.Helper() | |
| 20 | + t.Setenv("HOME", t.TempDir()) // the folder goes to a test trash | |
| 21 | + t.Setenv("XDG_DATA_HOME", t.TempDir()) | |
| 22 | + directory := t.TempDir() | |
| 23 | + agentsFolder := filepath.Join(directory, "Sidekicks-Agents") | |
| 24 | + folder := filepath.Join(agentsFolder, "ratatouille") | |
| 25 | + for _, dir := range []string{filepath.Join(folder, "workspace"), filepath.Join(directory, "mine")} { | |
| 26 | + if err := os.MkdirAll(dir, 0o755); err != nil { | |
| 27 | + t.Fatal(err) | |
| 28 | + } | |
| 29 | + } | |
| 30 | + write(t, filepath.Join(directory, "sbx"), fakeSbx) | |
| 31 | + if err := os.Chmod(filepath.Join(directory, "sbx"), 0o755); err != nil { | |
| 32 | + t.Fatal(err) | |
| 33 | + } | |
| 34 | + write(t, filepath.Join(directory, "sandboxes"), "ratatouille\n") | |
| 35 | + path := filepath.Join(directory, "config.yaml") | |
| 36 | + write(t, path, "version: 1\nagentsFolder: "+agentsFolder+"\nagents:\n"+ | |
| 37 | + " - name: alice\n command: sh\n workspace: mine\n"+ | |
| 38 | + " - name: ratatouille\n command: sbx\n args: [exec, -i, ratatouille, claude-agent-acp]\n workspace: "+filepath.Join(folder, "workspace")+"\n"+ | |
| 39 | + " runtime:\n type: sbx\n sandbox: ratatouille\n lifecycle:\n folder: "+folder+"\n"+ | |
| 40 | + " create: [sbx, env, create, --force]\n remove: [sbx, env, rm, --force]\n") | |
| 41 | + core := app.New(config.Location{Path: path, Source: config.SourceFlag}, app.Options{Starter: starter, Sbx: filepath.Join(directory, "sbx")}) | |
| 42 | + t.Cleanup(func() { core.Shutdown(context.Background()) }) | |
| 43 | + return &app.ConfigService{Core: core}, directory, folder | |
| 44 | +} | |
| 45 | + | |
| 46 | +// Issue #128: deleting an agent removes its sandbox, its entry, its history | |
| 47 | +// and — when asked — its folder: its name is free again. | |
| 48 | +func TestDeletingAnAgentFreesItsName(t *testing.T) { | |
| 49 | + service, directory, folder := removalSetup(t) | |
| 50 | + ctx := context.Background() | |
| 51 | + removal, err := service.Removal("ratatouille") | |
| 52 | + if err != nil || !removal.Sandbox || removal.Folder != folder { | |
| 53 | + t.Fatalf("removal: %+v %v", removal, err) | |
| 54 | + } | |
| 55 | + if mine, _ := service.Removal("alice"); mine.Folder != "" || mine.Sandbox { | |
| 56 | + t.Fatalf("the user's own folder never goes: %+v", mine) | |
| 57 | + } | |
| 58 | + channels := &app.ChannelService{Core: service.Core} | |
| 59 | + if _, err := channels.Direct("ratatouille"); err != nil { | |
| 60 | + t.Fatal(err) | |
| 61 | + } | |
| 62 | + result, err := service.DeleteAgent(ctx, "ratatouille", app.RemovalOptions{Sandbox: true, Folder: true}) | |
| 63 | + if err != nil || len(result.Problems) != 0 { | |
| 64 | + t.Fatalf("deleted: %+v %v", result, err) | |
| 65 | + } | |
| 66 | + if sandboxes, _ := os.ReadFile(filepath.Join(directory, "sandboxes")); strings.TrimSpace(string(sandboxes)) != "" { | |
| 67 | + t.Fatalf("the sandbox is removed: %q", sandboxes) | |
| 68 | + } | |
| 69 | + if _, err := os.Stat(folder); !os.IsNotExist(err) { | |
| 70 | + t.Fatalf("the folder is in the trash: %v", err) | |
| 71 | + } | |
| 72 | + content, _ := os.ReadFile(filepath.Join(directory, "config.yaml")) | |
| 73 | + if strings.Contains(string(content), "ratatouille") || !strings.Contains(string(content), "name: alice") { | |
| 74 | + t.Fatalf("the entry is gone, alice stays:\n%s", content) | |
| 75 | + } | |
| 76 | + for _, list := range channels.List() { | |
| 77 | + if list.Direct == "ratatouille" { | |
| 78 | + t.Fatal("its direct conversation is gone") | |
| 79 | + } | |
| 80 | + } | |
| 81 | +} | |
| 82 | + | |
| 83 | +// Without the options, the sandbox and the folder stay. | |
| 84 | +func TestDeletingAnAgentKeepsWhatIsNotAsked(t *testing.T) { | |
| 85 | + service, directory, folder := removalSetup(t) | |
| 86 | + if _, err := service.DeleteAgent(context.Background(), "ratatouille", app.RemovalOptions{}); err != nil { | |
| 87 | + t.Fatal(err) | |
| 88 | + } | |
| 89 | + if sandboxes, _ := os.ReadFile(filepath.Join(directory, "sandboxes")); !strings.Contains(string(sandboxes), "ratatouille") { | |
| 90 | + t.Fatal("the sandbox stays") | |
| 91 | + } | |
| 92 | + if _, err := os.Stat(folder); err != nil { | |
| 93 | + t.Fatal("the folder stays") | |
| 94 | + } | |
| 95 | + if _, err := service.DeleteAgent(context.Background(), "nobody", app.RemovalOptions{}); err == nil { | |
| 96 | + t.Fatal("an unknown agent") | |
| 97 | + } | |
| 98 | +} | |
| new file mode 100644 | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +package app_test | ||
| 4 | + | ||
| 5 | +import ( | ||
| 6 | + "context" | ||
| 7 | + "os" | ||
| 8 | + "path/filepath" | ||
| 9 | + "strings" | ||
| 10 | + "testing" | ||
| 11 | + | ||
| 12 | + "git.rickub.com/bots-garden/sidekicks/internal/app" | ||
| 13 | + "git.rickub.com/bots-garden/sidekicks/internal/config" | ||
| 14 | +) | ||
| 15 | + | ||
| 16 | +// removalSetup: ratatouille, made by the sandbox assistant in the agents' | ||
| 17 | +// folder (its sandbox exists), and alice, whose folder is the user's own. | ||
| 18 | +func removalSetup(t *testing.T) (*app.ConfigService, string, string) { | ||
| 19 | + t.Helper() | ||
| 20 | + t.Setenv("HOME", t.TempDir()) // the folder goes to a test trash | ||
| 21 | + t.Setenv("XDG_DATA_HOME", t.TempDir()) | ||
| 22 | + directory := t.TempDir() | ||
| 23 | + agentsFolder := filepath.Join(directory, "Sidekicks-Agents") | ||
| 24 | + folder := filepath.Join(agentsFolder, "ratatouille") | ||
| 25 | + for _, dir := range []string{filepath.Join(folder, "workspace"), filepath.Join(directory, "mine")} { | ||
| 26 | + if err := os.MkdirAll(dir, 0o755); err != nil { | ||
| 27 | + t.Fatal(err) | ||
| 28 | + } | ||
| 29 | + } | ||
| 30 | + write(t, filepath.Join(directory, "sbx"), fakeSbx) | ||
| 31 | + if err := os.Chmod(filepath.Join(directory, "sbx"), 0o755); err != nil { | ||
| 32 | + t.Fatal(err) | ||
| 33 | + } | ||
| 34 | + write(t, filepath.Join(directory, "sandboxes"), "ratatouille\n") | ||
| 35 | + path := filepath.Join(directory, "config.yaml") | ||
| 36 | + write(t, path, "version: 1\nagentsFolder: "+agentsFolder+"\nagents:\n"+ | ||
| 37 | + " - name: alice\n command: sh\n workspace: mine\n"+ | ||
| 38 | + " - name: ratatouille\n command: sbx\n args: [exec, -i, ratatouille, claude-agent-acp]\n workspace: "+filepath.Join(folder, "workspace")+"\n"+ | ||
| 39 | + " runtime:\n type: sbx\n sandbox: ratatouille\n lifecycle:\n folder: "+folder+"\n"+ | ||
| 40 | + " create: [sbx, env, create, --force]\n remove: [sbx, env, rm, --force]\n") | ||
| 41 | + core := app.New(config.Location{Path: path, Source: config.SourceFlag}, app.Options{Starter: starter, Sbx: filepath.Join(directory, "sbx")}) | ||
| 42 | + t.Cleanup(func() { core.Shutdown(context.Background()) }) | ||
| 43 | + return &app.ConfigService{Core: core}, directory, folder | ||
| 44 | +} | ||
| 45 | + | ||
| 46 | +// Issue #128: deleting an agent removes its sandbox, its entry, its history | ||
| 47 | +// and — when asked — its folder: its name is free again. | ||
| 48 | +func TestDeletingAnAgentFreesItsName(t *testing.T) { | ||
| 49 | + service, directory, folder := removalSetup(t) | ||
| 50 | + ctx := context.Background() | ||
| 51 | + removal, err := service.Removal("ratatouille") | ||
| 52 | + if err != nil || !removal.Sandbox || removal.Folder != folder { | ||
| 53 | + t.Fatalf("removal: %+v %v", removal, err) | ||
| 54 | + } | ||
| 55 | + if mine, _ := service.Removal("alice"); mine.Folder != "" || mine.Sandbox { | ||
| 56 | + t.Fatalf("the user's own folder never goes: %+v", mine) | ||
| 57 | + } | ||
| 58 | + channels := &app.ChannelService{Core: service.Core} | ||
| 59 | + if _, err := channels.Direct("ratatouille"); err != nil { | ||
| 60 | + t.Fatal(err) | ||
| 61 | + } | ||
| 62 | + result, err := service.DeleteAgent(ctx, "ratatouille", app.RemovalOptions{Sandbox: true, Folder: true}) | ||
| 63 | + if err != nil || len(result.Problems) != 0 { | ||
| 64 | + t.Fatalf("deleted: %+v %v", result, err) | ||
| 65 | + } | ||
| 66 | + if sandboxes, _ := os.ReadFile(filepath.Join(directory, "sandboxes")); strings.TrimSpace(string(sandboxes)) != "" { | ||
| 67 | + t.Fatalf("the sandbox is removed: %q", sandboxes) | ||
| 68 | + } | ||
| 69 | + if _, err := os.Stat(folder); !os.IsNotExist(err) { | ||
| 70 | + t.Fatalf("the folder is in the trash: %v", err) | ||
| 71 | + } | ||
| 72 | + content, _ := os.ReadFile(filepath.Join(directory, "config.yaml")) | ||
| 73 | + if strings.Contains(string(content), "ratatouille") || !strings.Contains(string(content), "name: alice") { | ||
| 74 | + t.Fatalf("the entry is gone, alice stays:\n%s", content) | ||
| 75 | + } | ||
| 76 | + for _, list := range channels.List() { | ||
| 77 | + if list.Direct == "ratatouille" { | ||
| 78 | + t.Fatal("its direct conversation is gone") | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | +} | ||
| 82 | + | ||
| 83 | +// Without the options, the sandbox and the folder stay. | ||
| 84 | +func TestDeletingAnAgentKeepsWhatIsNotAsked(t *testing.T) { | ||
| 85 | + service, directory, folder := removalSetup(t) | ||
| 86 | + if _, err := service.DeleteAgent(context.Background(), "ratatouille", app.RemovalOptions{}); err != nil { | ||
| 87 | + t.Fatal(err) | ||
| 88 | + } | ||
| 89 | + if sandboxes, _ := os.ReadFile(filepath.Join(directory, "sandboxes")); !strings.Contains(string(sandboxes), "ratatouille") { | ||
| 90 | + t.Fatal("the sandbox stays") | ||
| 91 | + } | ||
| 92 | + if _, err := os.Stat(folder); err != nil { | ||
| 93 | + t.Fatal("the folder stays") | ||
| 94 | + } | ||
| 95 | + if _, err := service.DeleteAgent(context.Background(), "nobody", app.RemovalOptions{}); err == nil { | ||
| 96 | + t.Fatal("an unknown agent") | ||
| 97 | + } | ||
| 98 | +} | ||
modified
internal/app/services.go +7 -0 | @@ -129,6 +129,13 @@ func (s *ChannelService) Older(id, beforeID string) (OlderView, error) { | ||
| 129 | 129 | return OlderView{Messages: messages, More: more}, err |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | +// TrustFolder tells agent to trust its folder for good, from its session in | |
| 133 | +// channel id: Vibe then reads the folder's instructions and skills (issue | |
| 134 | +// #125). | |
| 135 | +func (s *ChannelService) TrustFolder(ctx context.Context, id, agent string) error { | |
| 136 | + return s.Core.Channels().TrustFolder(ctx, id, agent) | |
| 137 | +} | |
| 138 | + | |
| 132 | 139 | // promptsKept is how many of the user's last messages ↑ can bring back. |
| 133 | 140 | const promptsKept = 100 |
| 134 | 141 | |
| @@ -129,6 +129,13 @@ func (s *ChannelService) Older(id, beforeID string) (OlderView, error) { | |||
| 129 | return OlderView{Messages: messages, More: more}, err | 129 | return OlderView{Messages: messages, More: more}, err |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | +// TrustFolder tells agent to trust its folder for good, from its session in | ||
| 133 | +// channel id: Vibe then reads the folder's instructions and skills (issue | ||
| 134 | +// #125). | ||
| 135 | +func (s *ChannelService) TrustFolder(ctx context.Context, id, agent string) error { | ||
| 136 | + return s.Core.Channels().TrustFolder(ctx, id, agent) | ||
| 137 | +} | ||
| 138 | + | ||
| 132 | // promptsKept is how many of the user's last messages ↑ can bring back. | 139 | // promptsKept is how many of the user's last messages ↑ can bring back. |
| 133 | const promptsKept = 100 | 140 | const promptsKept = 100 |
| 134 | 141 | ||
modified
internal/app/skills.go +6 -0 | @@ -60,6 +60,9 @@ var ( | ||
| 60 | 60 | ErrSkillName = errors.New("a skill name is made of lowercase letters, digits and -") |
| 61 | 61 | // ErrNotASkill is returned when an imported folder has no SKILL.md. |
| 62 | 62 | ErrNotASkill = errors.New("this folder is not a skill: it has no SKILL.md") |
| 63 | + // ErrNotMarkdown is returned when a file imported as a skill is not a | |
| 64 | + // Markdown file (.md): a skill is a folder, or one Markdown file. | |
| 65 | + ErrNotMarkdown = errors.New("a skill is a folder holding a SKILL.md, or a Markdown file (.md)") | |
| 63 | 66 | ) |
| 64 | 67 | |
| 65 | 68 | // skillName: the folder of a skill, as the Agent Skills standard names them. |
| @@ -288,6 +291,9 @@ func (s *WorkspaceService) ImportSkill(ctx context.Context, agent, hostPath stri | ||
| 288 | 291 | if info.IsDir() { |
| 289 | 292 | return importSkillFolder(ctx, ws, dir, hostPath) |
| 290 | 293 | } |
| 294 | + if ext := strings.ToLower(filepath.Ext(hostPath)); ext != ".md" && ext != ".markdown" { | |
| 295 | + return Skill{}, fmt.Errorf("%s: %w", filepath.Base(hostPath), ErrNotMarkdown) | |
| 296 | + } | |
| 291 | 297 | data, err := os.ReadFile(hostPath) |
| 292 | 298 | if err != nil { |
| 293 | 299 | return Skill{}, err |
| @@ -60,6 +60,9 @@ var ( | |||
| 60 | ErrSkillName = errors.New("a skill name is made of lowercase letters, digits and -") | 60 | ErrSkillName = errors.New("a skill name is made of lowercase letters, digits and -") |
| 61 | // ErrNotASkill is returned when an imported folder has no SKILL.md. | 61 | // ErrNotASkill is returned when an imported folder has no SKILL.md. |
| 62 | ErrNotASkill = errors.New("this folder is not a skill: it has no SKILL.md") | 62 | ErrNotASkill = errors.New("this folder is not a skill: it has no SKILL.md") |
| 63 | + // ErrNotMarkdown is returned when a file imported as a skill is not a | ||
| 64 | + // Markdown file (.md): a skill is a folder, or one Markdown file. | ||
| 65 | + ErrNotMarkdown = errors.New("a skill is a folder holding a SKILL.md, or a Markdown file (.md)") | ||
| 63 | ) | 66 | ) |
| 64 | 67 | ||
| 65 | // skillName: the folder of a skill, as the Agent Skills standard names them. | 68 | // skillName: the folder of a skill, as the Agent Skills standard names them. |
| @@ -288,6 +291,9 @@ func (s *WorkspaceService) ImportSkill(ctx context.Context, agent, hostPath stri | |||
| 288 | if info.IsDir() { | 291 | if info.IsDir() { |
| 289 | return importSkillFolder(ctx, ws, dir, hostPath) | 292 | return importSkillFolder(ctx, ws, dir, hostPath) |
| 290 | } | 293 | } |
| 294 | + if ext := strings.ToLower(filepath.Ext(hostPath)); ext != ".md" && ext != ".markdown" { | ||
| 295 | + return Skill{}, fmt.Errorf("%s: %w", filepath.Base(hostPath), ErrNotMarkdown) | ||
| 296 | + } | ||
| 291 | data, err := os.ReadFile(hostPath) | 297 | data, err := os.ReadFile(hostPath) |
| 292 | if err != nil { | 298 | if err != nil { |
| 293 | return Skill{}, err | 299 | return Skill{}, err |
modified
internal/app/skills_test.go +5 -0 | @@ -113,6 +113,11 @@ func TestASkillIsImportedFromAFolderOrAMarkdownFile(t *testing.T) { | ||
| 113 | 113 | if one, err := service.ImportSkill(ctx, "claude", single); err != nil || one.Folder != "meeting-notes" { |
| 114 | 114 | t.Fatalf("a file: %+v %v", one, err) |
| 115 | 115 | } |
| 116 | + picture := filepath.Join(directory, "photo.png") | |
| 117 | + write(t, picture, "not a skill") | |
| 118 | + if _, err := service.ImportSkill(ctx, "claude", picture); !errors.Is(err, app.ErrNotMarkdown) { | |
| 119 | + t.Fatalf("only Markdown: %v", err) | |
| 120 | + } | |
| 116 | 121 | if _, err := service.ImportSkill(ctx, "claude", filepath.Join(directory, "Downloads")); !errors.Is(err, app.ErrNotASkill) { |
| 117 | 122 | t.Fatalf("not a skill: %v", err) |
| 118 | 123 | } |
| @@ -113,6 +113,11 @@ func TestASkillIsImportedFromAFolderOrAMarkdownFile(t *testing.T) { | |||
| 113 | if one, err := service.ImportSkill(ctx, "claude", single); err != nil || one.Folder != "meeting-notes" { | 113 | if one, err := service.ImportSkill(ctx, "claude", single); err != nil || one.Folder != "meeting-notes" { |
| 114 | t.Fatalf("a file: %+v %v", one, err) | 114 | t.Fatalf("a file: %+v %v", one, err) |
| 115 | } | 115 | } |
| 116 | + picture := filepath.Join(directory, "photo.png") | ||
| 117 | + write(t, picture, "not a skill") | ||
| 118 | + if _, err := service.ImportSkill(ctx, "claude", picture); !errors.Is(err, app.ErrNotMarkdown) { | ||
| 119 | + t.Fatalf("only Markdown: %v", err) | ||
| 120 | + } | ||
| 116 | if _, err := service.ImportSkill(ctx, "claude", filepath.Join(directory, "Downloads")); !errors.Is(err, app.ErrNotASkill) { | 121 | if _, err := service.ImportSkill(ctx, "claude", filepath.Join(directory, "Downloads")); !errors.Is(err, app.ErrNotASkill) { |
| 117 | t.Fatalf("not a skill: %v", err) | 122 | t.Fatalf("not a skill: %v", err) |
| 118 | } | 123 | } |
modified
internal/channels/channels.go +50 -0 | @@ -70,6 +70,12 @@ const ( | ||
| 70 | 70 | // message was already handed from agent to agent as many times as |
| 71 | 71 | // allowed (Options.Handoffs); the chain stops there. |
| 72 | 72 | CodeHandoffLimit = "handoff-limit" |
| 73 | + // CodeWorkspaceUntrusted: the agent ignores the instructions and the | |
| 74 | + // skills of its folder until the folder is trusted (Vibe, issue #125); | |
| 75 | + // Error lists those files. | |
| 76 | + CodeWorkspaceUntrusted = "workspace-untrusted" | |
| 77 | + // CodeWorkspaceTrusted: the user trusted the agent's folder. | |
| 78 | + CodeWorkspaceTrusted = "workspace-trusted" | |
| 73 | 79 | ) |
| 74 | 80 | |
| 75 | 81 | // DefaultHandoffs is how many times the agents may hand one message on to |
| @@ -529,6 +535,50 @@ func (m *Manager) Delete(id string) error { | ||
| 529 | 535 | return nil |
| 530 | 536 | } |
| 531 | 537 | |
| 538 | +// ForgetAgent removes agent from the history (issue #128): its direct | |
| 539 | +// conversation, with its messages, is deleted, and it leaves the channels it | |
| 540 | +// is a member of (their messages stay, with an "agent left" line). The | |
| 541 | +// answers in progress in those channels are stopped first. The slash | |
| 542 | +// commands it announced are forgotten too: an agent made later under the | |
| 543 | +// same name must not show the old one's. | |
| 544 | +func (m *Manager) ForgetAgent(agent string) error { | |
| 545 | + m.mu.Lock() | |
| 546 | + m.commands[agent] = []acp.Command{} | |
| 547 | + _ = m.db.SetValue("commands/"+agent, []byte("[]")) | |
| 548 | + m.emitter.Emit(events.CommandsChanged, CommandsPayload{Agent: agent, Commands: []acp.Command{}}) | |
| 549 | + var direct string | |
| 550 | + var member []string | |
| 551 | + for _, id := range m.order { | |
| 552 | + ch := m.channels[id] | |
| 553 | + if ch.info.Direct == agent { | |
| 554 | + direct = id | |
| 555 | + continue | |
| 556 | + } | |
| 557 | + if ch.member(agent) != nil { | |
| 558 | + member = append(member, id) | |
| 559 | + } | |
| 560 | + } | |
| 561 | + m.mu.Unlock() | |
| 562 | + var errs []error | |
| 563 | + for _, id := range member { | |
| 564 | + m.Cancel(id) | |
| 565 | + if err := m.RemoveMember(id, agent); err != nil { | |
| 566 | + errs = append(errs, err) | |
| 567 | + } | |
| 568 | + } | |
| 569 | + if direct != "" { | |
| 570 | + if err := m.Delete(direct); err != nil { | |
| 571 | + errs = append(errs, err) | |
| 572 | + } | |
| 573 | + } else if stored, err := m.db.DirectChannel(agent); err == nil && stored.ID != "" { | |
| 574 | + // Not loaded in this run: still in the database. | |
| 575 | + if err := m.db.DeleteChannel(stored.ID); err != nil { | |
| 576 | + errs = append(errs, err) | |
| 577 | + } | |
| 578 | + } | |
| 579 | + return errors.Join(errs...) | |
| 580 | +} | |
| 581 | + | |
| 532 | 582 | // Clear deletes every message of a channel or direct conversation and keeps |
| 533 | 583 | // its name, description and members (issue #62). The members start over |
| 534 | 584 | // too: their sessions are forgotten, so that their next turn opens a new |
| @@ -70,6 +70,12 @@ const ( | |||
| 70 | // message was already handed from agent to agent as many times as | 70 | // message was already handed from agent to agent as many times as |
| 71 | // allowed (Options.Handoffs); the chain stops there. | 71 | // allowed (Options.Handoffs); the chain stops there. |
| 72 | CodeHandoffLimit = "handoff-limit" | 72 | CodeHandoffLimit = "handoff-limit" |
| 73 | + // CodeWorkspaceUntrusted: the agent ignores the instructions and the | ||
| 74 | + // skills of its folder until the folder is trusted (Vibe, issue #125); | ||
| 75 | + // Error lists those files. | ||
| 76 | + CodeWorkspaceUntrusted = "workspace-untrusted" | ||
| 77 | + // CodeWorkspaceTrusted: the user trusted the agent's folder. | ||
| 78 | + CodeWorkspaceTrusted = "workspace-trusted" | ||
| 73 | ) | 79 | ) |
| 74 | 80 | ||
| 75 | // DefaultHandoffs is how many times the agents may hand one message on to | 81 | // DefaultHandoffs is how many times the agents may hand one message on to |
| @@ -529,6 +535,50 @@ func (m *Manager) Delete(id string) error { | |||
| 529 | return nil | 535 | return nil |
| 530 | } | 536 | } |
| 531 | 537 | ||
| 538 | +// ForgetAgent removes agent from the history (issue #128): its direct | ||
| 539 | +// conversation, with its messages, is deleted, and it leaves the channels it | ||
| 540 | +// is a member of (their messages stay, with an "agent left" line). The | ||
| 541 | +// answers in progress in those channels are stopped first. The slash | ||
| 542 | +// commands it announced are forgotten too: an agent made later under the | ||
| 543 | +// same name must not show the old one's. | ||
| 544 | +func (m *Manager) ForgetAgent(agent string) error { | ||
| 545 | + m.mu.Lock() | ||
| 546 | + m.commands[agent] = []acp.Command{} | ||
| 547 | + _ = m.db.SetValue("commands/"+agent, []byte("[]")) | ||
| 548 | + m.emitter.Emit(events.CommandsChanged, CommandsPayload{Agent: agent, Commands: []acp.Command{}}) | ||
| 549 | + var direct string | ||
| 550 | + var member []string | ||
| 551 | + for _, id := range m.order { | ||
| 552 | + ch := m.channels[id] | ||
| 553 | + if ch.info.Direct == agent { | ||
| 554 | + direct = id | ||
| 555 | + continue | ||
| 556 | + } | ||
| 557 | + if ch.member(agent) != nil { | ||
| 558 | + member = append(member, id) | ||
| 559 | + } | ||
| 560 | + } | ||
| 561 | + m.mu.Unlock() | ||
| 562 | + var errs []error | ||
| 563 | + for _, id := range member { | ||
| 564 | + m.Cancel(id) | ||
| 565 | + if err := m.RemoveMember(id, agent); err != nil { | ||
| 566 | + errs = append(errs, err) | ||
| 567 | + } | ||
| 568 | + } | ||
| 569 | + if direct != "" { | ||
| 570 | + if err := m.Delete(direct); err != nil { | ||
| 571 | + errs = append(errs, err) | ||
| 572 | + } | ||
| 573 | + } else if stored, err := m.db.DirectChannel(agent); err == nil && stored.ID != "" { | ||
| 574 | + // Not loaded in this run: still in the database. | ||
| 575 | + if err := m.db.DeleteChannel(stored.ID); err != nil { | ||
| 576 | + errs = append(errs, err) | ||
| 577 | + } | ||
| 578 | + } | ||
| 579 | + return errors.Join(errs...) | ||
| 580 | +} | ||
| 581 | + | ||
| 532 | // Clear deletes every message of a channel or direct conversation and keeps | 582 | // Clear deletes every message of a channel or direct conversation and keeps |
| 533 | // its name, description and members (issue #62). The members start over | 583 | // its name, description and members (issue #62). The members start over |
| 534 | // too: their sessions are forgotten, so that their next turn opens a new | 584 | // too: their sessions are forgotten, so that their next turn opens a new |
modified
internal/channels/fakes_test.go +4 -0 | @@ -39,6 +39,10 @@ type fakeConn struct { | ||
| 39 | 39 | scripts map[string]script |
| 40 | 40 | // reply, when set, gives the answer to a prompt that has no script. |
| 41 | 41 | reply func(prompt string) string |
| 42 | + // untrustedFiles: the folder is untrusted and holds them (issue #125); | |
| 43 | + // trustDecisions counts TrustWorkspace. | |
| 44 | + untrustedFiles []string | |
| 45 | + trustDecisions int | |
| 42 | 46 | } |
| 43 | 47 | |
| 44 | 48 | func newFakeConn(agent string, scripts map[string]script) *fakeConn { |
| @@ -39,6 +39,10 @@ type fakeConn struct { | |||
| 39 | scripts map[string]script | 39 | scripts map[string]script |
| 40 | // reply, when set, gives the answer to a prompt that has no script. | 40 | // reply, when set, gives the answer to a prompt that has no script. |
| 41 | reply func(prompt string) string | 41 | reply func(prompt string) string |
| 42 | + // untrustedFiles: the folder is untrusted and holds them (issue #125); | ||
| 43 | + // trustDecisions counts TrustWorkspace. | ||
| 44 | + untrustedFiles []string | ||
| 45 | + trustDecisions int | ||
| 42 | } | 46 | } |
| 43 | 47 | ||
| 44 | func newFakeConn(agent string, scripts map[string]script) *fakeConn { | 48 | func newFakeConn(agent string, scripts map[string]script) *fakeConn { |
added
internal/channels/trust_test.go +114 -0 | new file mode 100644 | ||
| @@ -0,0 +1,114 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +package channels_test | |
| 4 | + | |
| 5 | +import ( | |
| 6 | + "context" | |
| 7 | + "testing" | |
| 8 | + | |
| 9 | + "git.rickub.com/bots-garden/sidekicks/internal/acp" | |
| 10 | + "git.rickub.com/bots-garden/sidekicks/internal/channels" | |
| 11 | +) | |
| 12 | + | |
| 13 | +// The fake agents say how their folder stands like Vibe (issue #125): an | |
| 14 | +// agent whose untrustedFiles is set ignores them until TrustWorkspace. | |
| 15 | +func (c *fakeConn) WorkspaceTrust(string) acp.WorkspaceTrust { | |
| 16 | + c.mu.Lock() | |
| 17 | + defer c.mu.Unlock() | |
| 18 | + if c.untrustedFiles == nil || c.trustDecisions > 0 { | |
| 19 | + return acp.WorkspaceTrust{} | |
| 20 | + } | |
| 21 | + return acp.WorkspaceTrust{Status: "untrusted", Files: c.untrustedFiles, Decisions: []string{"trust_cwd"}} | |
| 22 | +} | |
| 23 | + | |
| 24 | +func (c *fakeConn) TrustWorkspace(context.Context, string) error { | |
| 25 | + c.mu.Lock() | |
| 26 | + defer c.mu.Unlock() | |
| 27 | + c.trustDecisions++ | |
| 28 | + return nil | |
| 29 | +} | |
| 30 | + | |
| 31 | +func codesOf(view channels.Conversation) []string { | |
| 32 | + var codes []string | |
| 33 | + for _, message := range view.Messages { | |
| 34 | + if message.Code != "" { | |
| 35 | + codes = append(codes, message.Code+":"+message.Agent+":"+message.Error) | |
| 36 | + } | |
| 37 | + } | |
| 38 | + return codes | |
| 39 | +} | |
| 40 | + | |
| 41 | +// Issue #125: a new session on an untrusted folder that holds instructions | |
| 42 | +// or skills says so; trusting it opens a new session, which the agent reads | |
| 43 | +// the folder's files in. | |
| 44 | +func TestAnUntrustedFolderIsSaidAndTrusted(t *testing.T) { | |
| 45 | + f := setup(t, nil) | |
| 46 | + alice := f.source.conn("alice") | |
| 47 | + alice.untrustedFiles = []string{"AGENTS.md", ".vibe/skills"} | |
| 48 | + direct, _ := f.manager.Direct("alice") | |
| 49 | + if err := f.manager.TrustFolder(context.Background(), direct.ID, "alice"); err == nil { | |
| 50 | + t.Fatal("no session yet") | |
| 51 | + } | |
| 52 | + f.send(t, direct.ID, "hello") | |
| 53 | + f.idle(t, direct.ID, 3) | |
| 54 | + view, _ := f.manager.Conversation(direct.ID) | |
| 55 | + if codes := codesOf(view); len(codes) != 1 || codes[0] != channels.CodeWorkspaceUntrusted+":alice:AGENTS.md, .vibe/skills" { | |
| 56 | + t.Fatalf("said once: %v", codes) | |
| 57 | + } | |
| 58 | + if err := f.manager.TrustFolder(context.Background(), direct.ID, "alice"); err != nil { | |
| 59 | + t.Fatal(err) | |
| 60 | + } | |
| 61 | + if alice.trustDecisions != 1 { | |
| 62 | + t.Fatalf("decided: %d", alice.trustDecisions) | |
| 63 | + } | |
| 64 | + f.send(t, direct.ID, "again") | |
| 65 | + f.idle(t, direct.ID, 6) | |
| 66 | + if alice.sessionCount() != 2 { | |
| 67 | + t.Fatalf("a new session reads the folder: %d", alice.sessionCount()) | |
| 68 | + } | |
| 69 | + view, _ = f.manager.Conversation(direct.ID) | |
| 70 | + if codes := codesOf(view); len(codes) != 2 || codes[1] != channels.CodeWorkspaceTrusted+":alice:" { | |
| 71 | + t.Fatalf("trusted, and not said again: %v", codes) | |
| 72 | + } | |
| 73 | +} | |
| 74 | + | |
| 75 | +// An agent that says nothing about trust (mm, Claude…) gets no notice. | |
| 76 | +func TestATrustedOrSilentAgentGetsNoNotice(t *testing.T) { | |
| 77 | + f := setup(t, nil) | |
| 78 | + direct, _ := f.manager.Direct("bob") | |
| 79 | + f.send(t, direct.ID, "hello") | |
| 80 | + f.idle(t, direct.ID, 2) | |
| 81 | + view, _ := f.manager.Conversation(direct.ID) | |
| 82 | + if codes := codesOf(view); len(codes) != 0 { | |
| 83 | + t.Fatalf("no notice: %v", codes) | |
| 84 | + } | |
| 85 | +} | |
| 86 | + | |
| 87 | +// Issue #128: a deleted agent's direct conversation goes with its messages, | |
| 88 | +// and it leaves the channels it was in (their messages stay). | |
| 89 | +func TestForgetAgentDeletesItsDirectAndItsPlaces(t *testing.T) { | |
| 90 | + f := setup(t, nil) | |
| 91 | + f.source.conn("alice").commands = []acp.Command{{Name: "compact", Description: "Old agent's"}} | |
| 92 | + direct, _ := f.manager.Direct("alice") | |
| 93 | + f.send(t, direct.ID, "hello") | |
| 94 | + f.idle(t, direct.ID, 2) | |
| 95 | + general := f.channel(t, "general", "alice", "bob") | |
| 96 | + if err := f.manager.ForgetAgent("alice"); err != nil { | |
| 97 | + t.Fatal(err) | |
| 98 | + } | |
| 99 | + if _, err := f.manager.Conversation(direct.ID); err == nil { | |
| 100 | + t.Fatal("the direct conversation is gone") | |
| 101 | + } | |
| 102 | + view, _ := f.manager.Conversation(general.ID) | |
| 103 | + for _, member := range view.Channel.Members { | |
| 104 | + if member == "alice" { | |
| 105 | + t.Fatalf("still a member: %v", view.Channel.Members) | |
| 106 | + } | |
| 107 | + } | |
| 108 | + if commands := f.manager.Commands("alice"); len(commands) != 0 { | |
| 109 | + t.Fatalf("its commands are forgotten: %v", commands) | |
| 110 | + } | |
| 111 | + if again, _ := f.manager.Direct("alice"); again.ID == direct.ID { | |
| 112 | + t.Fatal("a new agent of the same name starts a new conversation") | |
| 113 | + } | |
| 114 | +} | |
| new file mode 100644 | |||
| @@ -0,0 +1,114 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +package channels_test | ||
| 4 | + | ||
| 5 | +import ( | ||
| 6 | + "context" | ||
| 7 | + "testing" | ||
| 8 | + | ||
| 9 | + "git.rickub.com/bots-garden/sidekicks/internal/acp" | ||
| 10 | + "git.rickub.com/bots-garden/sidekicks/internal/channels" | ||
| 11 | +) | ||
| 12 | + | ||
| 13 | +// The fake agents say how their folder stands like Vibe (issue #125): an | ||
| 14 | +// agent whose untrustedFiles is set ignores them until TrustWorkspace. | ||
| 15 | +func (c *fakeConn) WorkspaceTrust(string) acp.WorkspaceTrust { | ||
| 16 | + c.mu.Lock() | ||
| 17 | + defer c.mu.Unlock() | ||
| 18 | + if c.untrustedFiles == nil || c.trustDecisions > 0 { | ||
| 19 | + return acp.WorkspaceTrust{} | ||
| 20 | + } | ||
| 21 | + return acp.WorkspaceTrust{Status: "untrusted", Files: c.untrustedFiles, Decisions: []string{"trust_cwd"}} | ||
| 22 | +} | ||
| 23 | + | ||
| 24 | +func (c *fakeConn) TrustWorkspace(context.Context, string) error { | ||
| 25 | + c.mu.Lock() | ||
| 26 | + defer c.mu.Unlock() | ||
| 27 | + c.trustDecisions++ | ||
| 28 | + return nil | ||
| 29 | +} | ||
| 30 | + | ||
| 31 | +func codesOf(view channels.Conversation) []string { | ||
| 32 | + var codes []string | ||
| 33 | + for _, message := range view.Messages { | ||
| 34 | + if message.Code != "" { | ||
| 35 | + codes = append(codes, message.Code+":"+message.Agent+":"+message.Error) | ||
| 36 | + } | ||
| 37 | + } | ||
| 38 | + return codes | ||
| 39 | +} | ||
| 40 | + | ||
| 41 | +// Issue #125: a new session on an untrusted folder that holds instructions | ||
| 42 | +// or skills says so; trusting it opens a new session, which the agent reads | ||
| 43 | +// the folder's files in. | ||
| 44 | +func TestAnUntrustedFolderIsSaidAndTrusted(t *testing.T) { | ||
| 45 | + f := setup(t, nil) | ||
| 46 | + alice := f.source.conn("alice") | ||
| 47 | + alice.untrustedFiles = []string{"AGENTS.md", ".vibe/skills"} | ||
| 48 | + direct, _ := f.manager.Direct("alice") | ||
| 49 | + if err := f.manager.TrustFolder(context.Background(), direct.ID, "alice"); err == nil { | ||
| 50 | + t.Fatal("no session yet") | ||
| 51 | + } | ||
| 52 | + f.send(t, direct.ID, "hello") | ||
| 53 | + f.idle(t, direct.ID, 3) | ||
| 54 | + view, _ := f.manager.Conversation(direct.ID) | ||
| 55 | + if codes := codesOf(view); len(codes) != 1 || codes[0] != channels.CodeWorkspaceUntrusted+":alice:AGENTS.md, .vibe/skills" { | ||
| 56 | + t.Fatalf("said once: %v", codes) | ||
| 57 | + } | ||
| 58 | + if err := f.manager.TrustFolder(context.Background(), direct.ID, "alice"); err != nil { | ||
| 59 | + t.Fatal(err) | ||
| 60 | + } | ||
| 61 | + if alice.trustDecisions != 1 { | ||
| 62 | + t.Fatalf("decided: %d", alice.trustDecisions) | ||
| 63 | + } | ||
| 64 | + f.send(t, direct.ID, "again") | ||
| 65 | + f.idle(t, direct.ID, 6) | ||
| 66 | + if alice.sessionCount() != 2 { | ||
| 67 | + t.Fatalf("a new session reads the folder: %d", alice.sessionCount()) | ||
| 68 | + } | ||
| 69 | + view, _ = f.manager.Conversation(direct.ID) | ||
| 70 | + if codes := codesOf(view); len(codes) != 2 || codes[1] != channels.CodeWorkspaceTrusted+":alice:" { | ||
| 71 | + t.Fatalf("trusted, and not said again: %v", codes) | ||
| 72 | + } | ||
| 73 | +} | ||
| 74 | + | ||
| 75 | +// An agent that says nothing about trust (mm, Claude…) gets no notice. | ||
| 76 | +func TestATrustedOrSilentAgentGetsNoNotice(t *testing.T) { | ||
| 77 | + f := setup(t, nil) | ||
| 78 | + direct, _ := f.manager.Direct("bob") | ||
| 79 | + f.send(t, direct.ID, "hello") | ||
| 80 | + f.idle(t, direct.ID, 2) | ||
| 81 | + view, _ := f.manager.Conversation(direct.ID) | ||
| 82 | + if codes := codesOf(view); len(codes) != 0 { | ||
| 83 | + t.Fatalf("no notice: %v", codes) | ||
| 84 | + } | ||
| 85 | +} | ||
| 86 | + | ||
| 87 | +// Issue #128: a deleted agent's direct conversation goes with its messages, | ||
| 88 | +// and it leaves the channels it was in (their messages stay). | ||
| 89 | +func TestForgetAgentDeletesItsDirectAndItsPlaces(t *testing.T) { | ||
| 90 | + f := setup(t, nil) | ||
| 91 | + f.source.conn("alice").commands = []acp.Command{{Name: "compact", Description: "Old agent's"}} | ||
| 92 | + direct, _ := f.manager.Direct("alice") | ||
| 93 | + f.send(t, direct.ID, "hello") | ||
| 94 | + f.idle(t, direct.ID, 2) | ||
| 95 | + general := f.channel(t, "general", "alice", "bob") | ||
| 96 | + if err := f.manager.ForgetAgent("alice"); err != nil { | ||
| 97 | + t.Fatal(err) | ||
| 98 | + } | ||
| 99 | + if _, err := f.manager.Conversation(direct.ID); err == nil { | ||
| 100 | + t.Fatal("the direct conversation is gone") | ||
| 101 | + } | ||
| 102 | + view, _ := f.manager.Conversation(general.ID) | ||
| 103 | + for _, member := range view.Channel.Members { | ||
| 104 | + if member == "alice" { | ||
| 105 | + t.Fatalf("still a member: %v", view.Channel.Members) | ||
| 106 | + } | ||
| 107 | + } | ||
| 108 | + if commands := f.manager.Commands("alice"); len(commands) != 0 { | ||
| 109 | + t.Fatalf("its commands are forgotten: %v", commands) | ||
| 110 | + } | ||
| 111 | + if again, _ := f.manager.Direct("alice"); again.ID == direct.ID { | ||
| 112 | + t.Fatal("a new agent of the same name starts a new conversation") | ||
| 113 | + } | ||
| 114 | +} | ||
modified
internal/channels/turns.go +55 -0 | @@ -429,6 +429,7 @@ func (m *Manager) session(ctx context.Context, ch *channel, agent string, conn a | ||
| 429 | 429 | if err := conn.LoadSession(ctx, stored, definition.Workspace, handler); err == nil { |
| 430 | 430 | m.mu.Lock() |
| 431 | 431 | member.conn = conn |
| 432 | + m.noticeTrust(ch, agent, conn, stored) | |
| 432 | 433 | m.mu.Unlock() |
| 433 | 434 | return stored, false, nil |
| 434 | 435 | } |
| @@ -441,9 +442,63 @@ func (m *Manager) session(ctx context.Context, ch *channel, agent string, conn a | ||
| 441 | 442 | defer m.mu.Unlock() |
| 442 | 443 | member.conn, member.SessionID, member.fresh = conn, id, false |
| 443 | 444 | _ = m.db.PutMember(member.Membership) |
| 445 | + m.noticeTrust(ch, agent, conn, id) | |
| 444 | 446 | return id, true, nil |
| 445 | 447 | } |
| 446 | 448 | |
| 449 | +// trustConn is a connection whose agent may ignore its folder's files until | |
| 450 | +// the folder is trusted (acp.Conn; Vibe says so, issue #125). | |
| 451 | +type trustConn interface { | |
| 452 | + WorkspaceTrust(id string) acp.WorkspaceTrust | |
| 453 | + TrustWorkspace(ctx context.Context, id string) error | |
| 454 | +} | |
| 455 | + | |
| 456 | +// noticeTrust tells the user, in ch, when agent's new session ignores the | |
| 457 | +// instructions and the skills of its folder; m.mu is held. | |
| 458 | +func (m *Manager) noticeTrust(ch *channel, agent string, conn agents.Conn, id string) { | |
| 459 | + if trusting, ok := conn.(trustConn); ok { | |
| 460 | + if trust := trusting.WorkspaceTrust(id); trust.Untrusted() { | |
| 461 | + m.systemMessage(ch, CodeWorkspaceUntrusted, agent, strings.Join(trust.Files, ", ")) | |
| 462 | + } | |
| 463 | + } | |
| 464 | +} | |
| 465 | + | |
| 466 | +// TrustFolder tells agent to trust its folder for good, from its session in | |
| 467 | +// channel id (issue #125): it then reads the folder's instructions and | |
| 468 | +// skills. The session is opened again at the agent's next turn, so that the | |
| 469 | +// agent loads them. | |
| 470 | +func (m *Manager) TrustFolder(ctx context.Context, id, agent string) error { | |
| 471 | + m.mu.Lock() | |
| 472 | + ch, err := m.channel(id) | |
| 473 | + if err != nil { | |
| 474 | + m.mu.Unlock() | |
| 475 | + return err | |
| 476 | + } | |
| 477 | + member := ch.member(agent) | |
| 478 | + if member == nil || member.conn == nil { | |
| 479 | + m.mu.Unlock() | |
| 480 | + return fmt.Errorf("%s has no session in this channel: send it a message first", agent) | |
| 481 | + } | |
| 482 | + conn, session := member.conn, member.SessionID | |
| 483 | + m.mu.Unlock() | |
| 484 | + trusting, ok := conn.(trustConn) | |
| 485 | + if !ok { | |
| 486 | + return acp.ErrNoTrustDecision | |
| 487 | + } | |
| 488 | + if err := trusting.TrustWorkspace(ctx, session); err != nil { | |
| 489 | + return err | |
| 490 | + } | |
| 491 | + m.mu.Lock() | |
| 492 | + defer m.mu.Unlock() | |
| 493 | + if member := ch.member(agent); member != nil && member.conn == conn { | |
| 494 | + // A new session — the stored one dropped too —, told the channel's past. | |
| 495 | + member.conn, member.SessionID = nil, "" | |
| 496 | + _ = m.db.PutMember(member.Membership) | |
| 497 | + } | |
| 498 | + m.systemMessage(ch, CodeWorkspaceTrusted, agent, "") | |
| 499 | + return nil | |
| 500 | +} | |
| 501 | + | |
| 447 | 502 | // Prepare starts the members of a channel whose slash commands are not |
| 448 | 503 | // known yet and opens their session for it: an agent announces its commands |
| 449 | 504 | // right after session/new, and mm does so without loading its model |
| @@ -429,6 +429,7 @@ func (m *Manager) session(ctx context.Context, ch *channel, agent string, conn a | |||
| 429 | if err := conn.LoadSession(ctx, stored, definition.Workspace, handler); err == nil { | 429 | if err := conn.LoadSession(ctx, stored, definition.Workspace, handler); err == nil { |
| 430 | m.mu.Lock() | 430 | m.mu.Lock() |
| 431 | member.conn = conn | 431 | member.conn = conn |
| 432 | + m.noticeTrust(ch, agent, conn, stored) | ||
| 432 | m.mu.Unlock() | 433 | m.mu.Unlock() |
| 433 | return stored, false, nil | 434 | return stored, false, nil |
| 434 | } | 435 | } |
| @@ -441,9 +442,63 @@ func (m *Manager) session(ctx context.Context, ch *channel, agent string, conn a | |||
| 441 | defer m.mu.Unlock() | 442 | defer m.mu.Unlock() |
| 442 | member.conn, member.SessionID, member.fresh = conn, id, false | 443 | member.conn, member.SessionID, member.fresh = conn, id, false |
| 443 | _ = m.db.PutMember(member.Membership) | 444 | _ = m.db.PutMember(member.Membership) |
| 445 | + m.noticeTrust(ch, agent, conn, id) | ||
| 444 | return id, true, nil | 446 | return id, true, nil |
| 445 | } | 447 | } |
| 446 | 448 | ||
| 449 | +// trustConn is a connection whose agent may ignore its folder's files until | ||
| 450 | +// the folder is trusted (acp.Conn; Vibe says so, issue #125). | ||
| 451 | +type trustConn interface { | ||
| 452 | + WorkspaceTrust(id string) acp.WorkspaceTrust | ||
| 453 | + TrustWorkspace(ctx context.Context, id string) error | ||
| 454 | +} | ||
| 455 | + | ||
| 456 | +// noticeTrust tells the user, in ch, when agent's new session ignores the | ||
| 457 | +// instructions and the skills of its folder; m.mu is held. | ||
| 458 | +func (m *Manager) noticeTrust(ch *channel, agent string, conn agents.Conn, id string) { | ||
| 459 | + if trusting, ok := conn.(trustConn); ok { | ||
| 460 | + if trust := trusting.WorkspaceTrust(id); trust.Untrusted() { | ||
| 461 | + m.systemMessage(ch, CodeWorkspaceUntrusted, agent, strings.Join(trust.Files, ", ")) | ||
| 462 | + } | ||
| 463 | + } | ||
| 464 | +} | ||
| 465 | + | ||
| 466 | +// TrustFolder tells agent to trust its folder for good, from its session in | ||
| 467 | +// channel id (issue #125): it then reads the folder's instructions and | ||
| 468 | +// skills. The session is opened again at the agent's next turn, so that the | ||
| 469 | +// agent loads them. | ||
| 470 | +func (m *Manager) TrustFolder(ctx context.Context, id, agent string) error { | ||
| 471 | + m.mu.Lock() | ||
| 472 | + ch, err := m.channel(id) | ||
| 473 | + if err != nil { | ||
| 474 | + m.mu.Unlock() | ||
| 475 | + return err | ||
| 476 | + } | ||
| 477 | + member := ch.member(agent) | ||
| 478 | + if member == nil || member.conn == nil { | ||
| 479 | + m.mu.Unlock() | ||
| 480 | + return fmt.Errorf("%s has no session in this channel: send it a message first", agent) | ||
| 481 | + } | ||
| 482 | + conn, session := member.conn, member.SessionID | ||
| 483 | + m.mu.Unlock() | ||
| 484 | + trusting, ok := conn.(trustConn) | ||
| 485 | + if !ok { | ||
| 486 | + return acp.ErrNoTrustDecision | ||
| 487 | + } | ||
| 488 | + if err := trusting.TrustWorkspace(ctx, session); err != nil { | ||
| 489 | + return err | ||
| 490 | + } | ||
| 491 | + m.mu.Lock() | ||
| 492 | + defer m.mu.Unlock() | ||
| 493 | + if member := ch.member(agent); member != nil && member.conn == conn { | ||
| 494 | + // A new session — the stored one dropped too —, told the channel's past. | ||
| 495 | + member.conn, member.SessionID = nil, "" | ||
| 496 | + _ = m.db.PutMember(member.Membership) | ||
| 497 | + } | ||
| 498 | + m.systemMessage(ch, CodeWorkspaceTrusted, agent, "") | ||
| 499 | + return nil | ||
| 500 | +} | ||
| 501 | + | ||
| 447 | // Prepare starts the members of a channel whose slash commands are not | 502 | // Prepare starts the members of a channel whose slash commands are not |
| 448 | // known yet and opens their session for it: an agent announces its commands | 503 | // known yet and opens their session for it: an agent announces its commands |
| 449 | // right after session/new, and mm does so without loading its model | 504 | // right after session/new, and mm does so without loading its model |
added
internal/config/remove_test.go +55 -0 | new file mode 100644 | ||
| @@ -0,0 +1,55 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +package config_test | |
| 4 | + | |
| 5 | +import ( | |
| 6 | + "strings" | |
| 7 | + "testing" | |
| 8 | + | |
| 9 | + "git.rickub.com/bots-garden/sidekicks/internal/config" | |
| 10 | +) | |
| 11 | + | |
| 12 | +const twoAgents = `version: 1 | |
| 13 | +# My agents. | |
| 14 | +agents: | |
| 15 | + - name: alice # the first one | |
| 16 | + command: mm | |
| 17 | + - name: ratatouille | |
| 18 | + command: mm | |
| 19 | +channels: | |
| 20 | + - name: kitchen | |
| 21 | + agents: [alice, ratatouille] | |
| 22 | +` | |
| 23 | + | |
| 24 | +// Issue #128: the agent leaves the agents and the channels the file | |
| 25 | +// declares; the comments and the rest stay. | |
| 26 | +func TestRemoveAgentTakesItsEntryAndItsChannelPlaces(t *testing.T) { | |
| 27 | + updated, err := config.RemoveAgent([]byte(twoAgents), "ratatouille") | |
| 28 | + if err != nil { | |
| 29 | + t.Fatal(err) | |
| 30 | + } | |
| 31 | + text := string(updated) | |
| 32 | + if strings.Contains(text, "ratatouille") { | |
| 33 | + t.Fatalf("still there:\n%s", text) | |
| 34 | + } | |
| 35 | + for _, kept := range []string{"# My agents.", "name: alice # the first one", "name: kitchen", "alice"} { | |
| 36 | + if !strings.Contains(text, kept) { | |
| 37 | + t.Errorf("lost %q:\n%s", kept, text) | |
| 38 | + } | |
| 39 | + } | |
| 40 | + cfg, err := config.Parse(updated, "/") | |
| 41 | + if err != nil || len(cfg.Agents) != 1 { | |
| 42 | + t.Fatalf("valid, with alice only: %v", err) | |
| 43 | + } | |
| 44 | + if _, err := config.RemoveAgent([]byte(twoAgents), "nobody"); err == nil { | |
| 45 | + t.Fatal("an agent the file does not have") | |
| 46 | + } | |
| 47 | +} | |
| 48 | + | |
| 49 | +func TestRemovingTheLastAgentLeavesAnEmptyList(t *testing.T) { | |
| 50 | + once, _ := config.RemoveAgent([]byte(twoAgents), "ratatouille") | |
| 51 | + empty, err := config.RemoveAgent(once, "alice") | |
| 52 | + if err != nil || !strings.Contains(string(empty), "agents: []") { | |
| 53 | + t.Fatalf("agents: []:\n%s %v", empty, err) | |
| 54 | + } | |
| 55 | +} | |
| new file mode 100644 | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +package config_test | ||
| 4 | + | ||
| 5 | +import ( | ||
| 6 | + "strings" | ||
| 7 | + "testing" | ||
| 8 | + | ||
| 9 | + "git.rickub.com/bots-garden/sidekicks/internal/config" | ||
| 10 | +) | ||
| 11 | + | ||
| 12 | +const twoAgents = `version: 1 | ||
| 13 | +# My agents. | ||
| 14 | +agents: | ||
| 15 | + - name: alice # the first one | ||
| 16 | + command: mm | ||
| 17 | + - name: ratatouille | ||
| 18 | + command: mm | ||
| 19 | +channels: | ||
| 20 | + - name: kitchen | ||
| 21 | + agents: [alice, ratatouille] | ||
| 22 | +` | ||
| 23 | + | ||
| 24 | +// Issue #128: the agent leaves the agents and the channels the file | ||
| 25 | +// declares; the comments and the rest stay. | ||
| 26 | +func TestRemoveAgentTakesItsEntryAndItsChannelPlaces(t *testing.T) { | ||
| 27 | + updated, err := config.RemoveAgent([]byte(twoAgents), "ratatouille") | ||
| 28 | + if err != nil { | ||
| 29 | + t.Fatal(err) | ||
| 30 | + } | ||
| 31 | + text := string(updated) | ||
| 32 | + if strings.Contains(text, "ratatouille") { | ||
| 33 | + t.Fatalf("still there:\n%s", text) | ||
| 34 | + } | ||
| 35 | + for _, kept := range []string{"# My agents.", "name: alice # the first one", "name: kitchen", "alice"} { | ||
| 36 | + if !strings.Contains(text, kept) { | ||
| 37 | + t.Errorf("lost %q:\n%s", kept, text) | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + cfg, err := config.Parse(updated, "/") | ||
| 41 | + if err != nil || len(cfg.Agents) != 1 { | ||
| 42 | + t.Fatalf("valid, with alice only: %v", err) | ||
| 43 | + } | ||
| 44 | + if _, err := config.RemoveAgent([]byte(twoAgents), "nobody"); err == nil { | ||
| 45 | + t.Fatal("an agent the file does not have") | ||
| 46 | + } | ||
| 47 | +} | ||
| 48 | + | ||
| 49 | +func TestRemovingTheLastAgentLeavesAnEmptyList(t *testing.T) { | ||
| 50 | + once, _ := config.RemoveAgent([]byte(twoAgents), "ratatouille") | ||
| 51 | + empty, err := config.RemoveAgent(once, "alice") | ||
| 52 | + if err != nil || !strings.Contains(string(empty), "agents: []") { | ||
| 53 | + t.Fatalf("agents: []:\n%s %v", empty, err) | ||
| 54 | + } | ||
| 55 | +} | ||
modified
internal/config/save.go +89 -0 | @@ -137,3 +137,92 @@ func unescapeLongCharacters(content []byte) []byte { | ||
| 137 | 137 | } |
| 138 | 138 | return result.Bytes() |
| 139 | 139 | } |
| 140 | + | |
| 141 | +// RemoveAgent returns content without the agent called name (issue #128): | |
| 142 | +// its entry in agents, and its name in the agents of the channels the file | |
| 143 | +// declares — a channel may not name an agent that does not exist. Comments | |
| 144 | +// and the order of everything else are kept; the result is validated. An | |
| 145 | +// agent the file does not have is an error. | |
| 146 | +// | |
| 147 | +// updated, err := config.RemoveAgent(content, "ratatouille") | |
| 148 | +func RemoveAgent(content []byte, name string) ([]byte, error) { | |
| 149 | + var document yaml.Node | |
| 150 | + if err := yaml.Unmarshal(content, &document); err != nil { | |
| 151 | + return nil, err | |
| 152 | + } | |
| 153 | + agents := lookup(&document, []string{"agents"}) | |
| 154 | + if agents == nil || agents.Kind != yaml.SequenceNode { | |
| 155 | + return nil, fmt.Errorf("no agent is called %q in the configuration", name) | |
| 156 | + } | |
| 157 | + kept, found := agents.Content[:0:0], false | |
| 158 | + for _, entry := range agents.Content { | |
| 159 | + if field(entry, "name") == name { | |
| 160 | + found = true | |
| 161 | + continue | |
| 162 | + } | |
| 163 | + kept = append(kept, entry) | |
| 164 | + } | |
| 165 | + if !found { | |
| 166 | + return nil, fmt.Errorf("no agent is called %q in the configuration", name) | |
| 167 | + } | |
| 168 | + agents.Content = kept | |
| 169 | + if len(kept) == 0 { | |
| 170 | + agents.Style = yaml.FlowStyle // agents: [] | |
| 171 | + } | |
| 172 | + leaveChannels(lookup(&document, []string{"channels"}), name) | |
| 173 | + var buffer bytes.Buffer | |
| 174 | + encoder := yaml.NewEncoder(&buffer) | |
| 175 | + encoder.SetIndent(2) | |
| 176 | + if err := encoder.Encode(&document); err != nil { | |
| 177 | + return nil, err | |
| 178 | + } | |
| 179 | + if err := encoder.Close(); err != nil { | |
| 180 | + return nil, err | |
| 181 | + } | |
| 182 | + updated := unescapeLongCharacters(buffer.Bytes()) | |
| 183 | + if _, err := Parse(updated, "/"); err != nil { | |
| 184 | + return nil, fmt.Errorf("the agent cannot be removed: %w", err) | |
| 185 | + } | |
| 186 | + return updated, nil | |
| 187 | +} | |
| 188 | + | |
| 189 | +// leaveChannels takes name out of the agents of each channel of channels. | |
| 190 | +func leaveChannels(channels *yaml.Node, name string) { | |
| 191 | + if channels == nil || channels.Kind != yaml.SequenceNode { | |
| 192 | + return | |
| 193 | + } | |
| 194 | + for _, channel := range channels.Content { | |
| 195 | + members := valueOf(channel, "agents") | |
| 196 | + if members == nil || members.Kind != yaml.SequenceNode { | |
| 197 | + continue | |
| 198 | + } | |
| 199 | + left := members.Content[:0:0] | |
| 200 | + for _, member := range members.Content { | |
| 201 | + if member.Value != name { | |
| 202 | + left = append(left, member) | |
| 203 | + } | |
| 204 | + } | |
| 205 | + members.Content = left | |
| 206 | + } | |
| 207 | +} | |
| 208 | + | |
| 209 | +// valueOf is the value of key in mapping, or nil. | |
| 210 | +func valueOf(mapping *yaml.Node, key string) *yaml.Node { | |
| 211 | + if mapping == nil || mapping.Kind != yaml.MappingNode { | |
| 212 | + return nil | |
| 213 | + } | |
| 214 | + for i := 0; i+1 < len(mapping.Content); i += 2 { | |
| 215 | + if mapping.Content[i].Value == key { | |
| 216 | + return mapping.Content[i+1] | |
| 217 | + } | |
| 218 | + } | |
| 219 | + return nil | |
| 220 | +} | |
| 221 | + | |
| 222 | +// field is the scalar value of key in mapping, or "". | |
| 223 | +func field(mapping *yaml.Node, key string) string { | |
| 224 | + if value := valueOf(mapping, key); value != nil && value.Kind == yaml.ScalarNode { | |
| 225 | + return value.Value | |
| 226 | + } | |
| 227 | + return "" | |
| 228 | +} | |
| @@ -137,3 +137,92 @@ func unescapeLongCharacters(content []byte) []byte { | |||
| 137 | } | 137 | } |
| 138 | return result.Bytes() | 138 | return result.Bytes() |
| 139 | } | 139 | } |
| 140 | + | ||
| 141 | +// RemoveAgent returns content without the agent called name (issue #128): | ||
| 142 | +// its entry in agents, and its name in the agents of the channels the file | ||
| 143 | +// declares — a channel may not name an agent that does not exist. Comments | ||
| 144 | +// and the order of everything else are kept; the result is validated. An | ||
| 145 | +// agent the file does not have is an error. | ||
| 146 | +// | ||
| 147 | +// updated, err := config.RemoveAgent(content, "ratatouille") | ||
| 148 | +func RemoveAgent(content []byte, name string) ([]byte, error) { | ||
| 149 | + var document yaml.Node | ||
| 150 | + if err := yaml.Unmarshal(content, &document); err != nil { | ||
| 151 | + return nil, err | ||
| 152 | + } | ||
| 153 | + agents := lookup(&document, []string{"agents"}) | ||
| 154 | + if agents == nil || agents.Kind != yaml.SequenceNode { | ||
| 155 | + return nil, fmt.Errorf("no agent is called %q in the configuration", name) | ||
| 156 | + } | ||
| 157 | + kept, found := agents.Content[:0:0], false | ||
| 158 | + for _, entry := range agents.Content { | ||
| 159 | + if field(entry, "name") == name { | ||
| 160 | + found = true | ||
| 161 | + continue | ||
| 162 | + } | ||
| 163 | + kept = append(kept, entry) | ||
| 164 | + } | ||
| 165 | + if !found { | ||
| 166 | + return nil, fmt.Errorf("no agent is called %q in the configuration", name) | ||
| 167 | + } | ||
| 168 | + agents.Content = kept | ||
| 169 | + if len(kept) == 0 { | ||
| 170 | + agents.Style = yaml.FlowStyle // agents: [] | ||
| 171 | + } | ||
| 172 | + leaveChannels(lookup(&document, []string{"channels"}), name) | ||
| 173 | + var buffer bytes.Buffer | ||
| 174 | + encoder := yaml.NewEncoder(&buffer) | ||
| 175 | + encoder.SetIndent(2) | ||
| 176 | + if err := encoder.Encode(&document); err != nil { | ||
| 177 | + return nil, err | ||
| 178 | + } | ||
| 179 | + if err := encoder.Close(); err != nil { | ||
| 180 | + return nil, err | ||
| 181 | + } | ||
| 182 | + updated := unescapeLongCharacters(buffer.Bytes()) | ||
| 183 | + if _, err := Parse(updated, "/"); err != nil { | ||
| 184 | + return nil, fmt.Errorf("the agent cannot be removed: %w", err) | ||
| 185 | + } | ||
| 186 | + return updated, nil | ||
| 187 | +} | ||
| 188 | + | ||
| 189 | +// leaveChannels takes name out of the agents of each channel of channels. | ||
| 190 | +func leaveChannels(channels *yaml.Node, name string) { | ||
| 191 | + if channels == nil || channels.Kind != yaml.SequenceNode { | ||
| 192 | + return | ||
| 193 | + } | ||
| 194 | + for _, channel := range channels.Content { | ||
| 195 | + members := valueOf(channel, "agents") | ||
| 196 | + if members == nil || members.Kind != yaml.SequenceNode { | ||
| 197 | + continue | ||
| 198 | + } | ||
| 199 | + left := members.Content[:0:0] | ||
| 200 | + for _, member := range members.Content { | ||
| 201 | + if member.Value != name { | ||
| 202 | + left = append(left, member) | ||
| 203 | + } | ||
| 204 | + } | ||
| 205 | + members.Content = left | ||
| 206 | + } | ||
| 207 | +} | ||
| 208 | + | ||
| 209 | +// valueOf is the value of key in mapping, or nil. | ||
| 210 | +func valueOf(mapping *yaml.Node, key string) *yaml.Node { | ||
| 211 | + if mapping == nil || mapping.Kind != yaml.MappingNode { | ||
| 212 | + return nil | ||
| 213 | + } | ||
| 214 | + for i := 0; i+1 < len(mapping.Content); i += 2 { | ||
| 215 | + if mapping.Content[i].Value == key { | ||
| 216 | + return mapping.Content[i+1] | ||
| 217 | + } | ||
| 218 | + } | ||
| 219 | + return nil | ||
| 220 | +} | ||
| 221 | + | ||
| 222 | +// field is the scalar value of key in mapping, or "". | ||
| 223 | +func field(mapping *yaml.Node, key string) string { | ||
| 224 | + if value := valueOf(mapping, key); value != nil && value.Kind == yaml.ScalarNode { | ||
| 225 | + return value.Value | ||
| 226 | + } | ||
| 227 | + return "" | ||
| 228 | +} | ||
modified
internal/creator/creator.go +2 -0 | @@ -487,6 +487,8 @@ func (s *Session) Finish(ctx context.Context, name, environment string) (Result, | ||
| 487 | 487 | } |
| 488 | 488 | // MkdirTemp made it private (0700): an agent's folder is an ordinary one. |
| 489 | 489 | _ = os.Chmod(target, 0o755) |
| 490 | + // Its dot name made it hidden on macOS; its own name does not undo that. | |
| 491 | + _ = unhide(target) | |
| 490 | 492 | s.mu.Lock() |
| 491 | 493 | s.dir = target |
| 492 | 494 | s.mu.Unlock() |
| @@ -487,6 +487,8 @@ func (s *Session) Finish(ctx context.Context, name, environment string) (Result, | |||
| 487 | } | 487 | } |
| 488 | // MkdirTemp made it private (0700): an agent's folder is an ordinary one. | 488 | // MkdirTemp made it private (0700): an agent's folder is an ordinary one. |
| 489 | _ = os.Chmod(target, 0o755) | 489 | _ = os.Chmod(target, 0o755) |
| 490 | + // Its dot name made it hidden on macOS; its own name does not undo that. | ||
| 491 | + _ = unhide(target) | ||
| 490 | s.mu.Lock() | 492 | s.mu.Lock() |
| 491 | s.dir = target | 493 | s.dir = target |
| 492 | s.mu.Unlock() | 494 | s.mu.Unlock() |
added
internal/creator/visible_darwin.go +24 -0 | new file mode 100644 | ||
| @@ -0,0 +1,24 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +package creator | |
| 4 | + | |
| 5 | +import "syscall" | |
| 6 | + | |
| 7 | +// ufHidden is UF_HIDDEN of <sys/stat.h>: the Finder hides a file or folder | |
| 8 | +// that carries it, whatever its name. | |
| 9 | +const ufHidden = 0x00008000 | |
| 10 | + | |
| 11 | +// unhide clears the hidden flag of path (issue #126). The assistant makes | |
| 12 | +// the agent's folder as ".sidekicks-new-agent-…": on macOS the folder gets | |
| 13 | +// the hidden flag of a dot name, and renaming it to the agent's name does | |
| 14 | +// not clear it — the Finder then hid every mini-me agent's folder. | |
| 15 | +func unhide(path string) error { | |
| 16 | + var stat syscall.Stat_t | |
| 17 | + if err := syscall.Lstat(path, &stat); err != nil { | |
| 18 | + return err | |
| 19 | + } | |
| 20 | + if stat.Flags&ufHidden == 0 { | |
| 21 | + return nil | |
| 22 | + } | |
| 23 | + return syscall.Chflags(path, int(stat.Flags&^ufHidden)) | |
| 24 | +} | |
| new file mode 100644 | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +package creator | ||
| 4 | + | ||
| 5 | +import "syscall" | ||
| 6 | + | ||
| 7 | +// ufHidden is UF_HIDDEN of <sys/stat.h>: the Finder hides a file or folder | ||
| 8 | +// that carries it, whatever its name. | ||
| 9 | +const ufHidden = 0x00008000 | ||
| 10 | + | ||
| 11 | +// unhide clears the hidden flag of path (issue #126). The assistant makes | ||
| 12 | +// the agent's folder as ".sidekicks-new-agent-…": on macOS the folder gets | ||
| 13 | +// the hidden flag of a dot name, and renaming it to the agent's name does | ||
| 14 | +// not clear it — the Finder then hid every mini-me agent's folder. | ||
| 15 | +func unhide(path string) error { | ||
| 16 | + var stat syscall.Stat_t | ||
| 17 | + if err := syscall.Lstat(path, &stat); err != nil { | ||
| 18 | + return err | ||
| 19 | + } | ||
| 20 | + if stat.Flags&ufHidden == 0 { | ||
| 21 | + return nil | ||
| 22 | + } | ||
| 23 | + return syscall.Chflags(path, int(stat.Flags&^ufHidden)) | ||
| 24 | +} | ||
added
internal/creator/visible_darwin_test.go +36 -0 | new file mode 100644 | ||
| @@ -0,0 +1,36 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +package creator | |
| 4 | + | |
| 5 | +import ( | |
| 6 | + "os" | |
| 7 | + "path/filepath" | |
| 8 | + "syscall" | |
| 9 | + "testing" | |
| 10 | +) | |
| 11 | + | |
| 12 | +// Issue #126: a folder made hidden, as a dot name made it, is visible again | |
| 13 | +// once named after its agent; another flag stays. | |
| 14 | +func TestUnhideClearsTheHiddenFlagOnly(t *testing.T) { | |
| 15 | + dir := filepath.Join(t.TempDir(), "mini-coder") | |
| 16 | + if err := os.Mkdir(dir, 0o755); err != nil { | |
| 17 | + t.Fatal(err) | |
| 18 | + } | |
| 19 | + const ufNodump = 0x00000001 | |
| 20 | + if err := syscall.Chflags(dir, ufHidden|ufNodump); err != nil { | |
| 21 | + t.Skipf("chflags is not allowed here: %v", err) | |
| 22 | + } | |
| 23 | + if err := unhide(dir); err != nil { | |
| 24 | + t.Fatal(err) | |
| 25 | + } | |
| 26 | + var stat syscall.Stat_t | |
| 27 | + if err := syscall.Lstat(dir, &stat); err != nil { | |
| 28 | + t.Fatal(err) | |
| 29 | + } | |
| 30 | + if stat.Flags&ufHidden != 0 || stat.Flags&ufNodump == 0 { | |
| 31 | + t.Fatalf("flags %#x: hidden cleared, nodump kept", stat.Flags) | |
| 32 | + } | |
| 33 | + if err := unhide(dir); err != nil { | |
| 34 | + t.Fatal("a visible folder stays as it is") | |
| 35 | + } | |
| 36 | +} | |
| new file mode 100644 | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +package creator | ||
| 4 | + | ||
| 5 | +import ( | ||
| 6 | + "os" | ||
| 7 | + "path/filepath" | ||
| 8 | + "syscall" | ||
| 9 | + "testing" | ||
| 10 | +) | ||
| 11 | + | ||
| 12 | +// Issue #126: a folder made hidden, as a dot name made it, is visible again | ||
| 13 | +// once named after its agent; another flag stays. | ||
| 14 | +func TestUnhideClearsTheHiddenFlagOnly(t *testing.T) { | ||
| 15 | + dir := filepath.Join(t.TempDir(), "mini-coder") | ||
| 16 | + if err := os.Mkdir(dir, 0o755); err != nil { | ||
| 17 | + t.Fatal(err) | ||
| 18 | + } | ||
| 19 | + const ufNodump = 0x00000001 | ||
| 20 | + if err := syscall.Chflags(dir, ufHidden|ufNodump); err != nil { | ||
| 21 | + t.Skipf("chflags is not allowed here: %v", err) | ||
| 22 | + } | ||
| 23 | + if err := unhide(dir); err != nil { | ||
| 24 | + t.Fatal(err) | ||
| 25 | + } | ||
| 26 | + var stat syscall.Stat_t | ||
| 27 | + if err := syscall.Lstat(dir, &stat); err != nil { | ||
| 28 | + t.Fatal(err) | ||
| 29 | + } | ||
| 30 | + if stat.Flags&ufHidden != 0 || stat.Flags&ufNodump == 0 { | ||
| 31 | + t.Fatalf("flags %#x: hidden cleared, nodump kept", stat.Flags) | ||
| 32 | + } | ||
| 33 | + if err := unhide(dir); err != nil { | ||
| 34 | + t.Fatal("a visible folder stays as it is") | ||
| 35 | + } | ||
| 36 | +} | ||
added
internal/creator/visible_other.go +9 -0 | new file mode 100644 | ||
| @@ -0,0 +1,9 @@ | ||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | |
| 2 | + | |
| 3 | +//go:build !darwin | |
| 4 | + | |
| 5 | +package creator | |
| 6 | + | |
| 7 | +// unhide does nothing where a file has no hidden flag: a dot name is all | |
| 8 | +// that hides it, and the agent's folder has its own name (issue #126). | |
| 9 | +func unhide(string) error { return nil } | |
| new file mode 100644 | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | +// Copyright (c) 2026 Philippe Charrière — Sidekicks Source-Available License 1.0, see LICENSE | ||
| 2 | + | ||
| 3 | +//go:build !darwin | ||
| 4 | + | ||
| 5 | +package creator | ||
| 6 | + | ||
| 7 | +// unhide does nothing where a file has no hidden flag: a dot name is all | ||
| 8 | +// that hides it, and the agent's folder has its own name (issue #126). | ||
| 9 | +func unhide(string) error { return nil } | ||
modified
sbxenv.yaml +2 -0 | @@ -10,6 +10,8 @@ workspace: . | ||
| 10 | 10 | |
| 11 | 11 | additionalWorkspaces: |
| 12 | 12 | - path: /Users/k33g/Documents |
| 13 | + #/Users/k33g/Documents/Sidekicks-Agents | |
| 14 | + - path: /Users/k33g/Library/Application Support/sidekicks/config.yaml | |
| 13 | 15 | - path: /Users/k33g/kDrive/Rickub/bots-garden/mini-me |
| 14 | 16 | readOnly: true |
| 15 | 17 | - path: /Users/k33g/kDrive/Rickub/bots-garden/mini-me-kit |
| @@ -10,6 +10,8 @@ workspace: . | |||
| 10 | 10 | ||
| 11 | additionalWorkspaces: | 11 | additionalWorkspaces: |
| 12 | - path: /Users/k33g/Documents | 12 | - path: /Users/k33g/Documents |
| 13 | + #/Users/k33g/Documents/Sidekicks-Agents | ||
| 14 | + - path: /Users/k33g/Library/Application Support/sidekicks/config.yaml | ||
| 13 | - path: /Users/k33g/kDrive/Rickub/bots-garden/mini-me | 15 | - path: /Users/k33g/kDrive/Rickub/bots-garden/mini-me |
| 14 | readOnly: true | 16 | readOnly: true |
| 15 | - path: /Users/k33g/kDrive/Rickub/bots-garden/mini-me-kit | 17 | - path: /Users/k33g/kDrive/Rickub/bots-garden/mini-me-kit |