How to test issue #47 on macOS (recreating an sbx sandbox)
This guide checks on a Mac what issue #47 brings: Sidekicks recreates an agent's sbx sandbox when it no longer exists, stops or removes it from the Agents panel, and the "Add an agent" assistant fills itself in when an sbxenv.yaml is dropped on it. It assumes the Mac is set up for milestone M4, sbx is installed and Milo's kit is reachable (agents/milo/sbxenv.yaml). Allow 30 minutes, plus the time to create a sandbox (pulling the kits). The labels quoted are those of the interface in English, its default language.
Keep a macOS Terminal window open at the root of the repository.
0. Prepare
make check # expected: 0 issues, Tests 89 passed, 15 passed, licence headers ok
sbx ls # sbx answers; milo-sbx may exist or not
make dev
-
make checkpasses andsbx lsanswers.
1. Declare the commands in Settings
-
In Settings, declare Milo with its
lifecycle(replace themiloentry if there is one), then save:- name: milo title: Milo (sbx) icon: "🦊" command: sbx args: [exec, -i, milo-sbx, mm, -acp] workspace: /Users/k33g/kDrive/Rickub/bots-garden/sidekicks/agents/milo/workspace runtime: type: sbx sandbox: milo-sbx lifecycle: folder: /Users/k33g/kDrive/Rickub/bots-garden/sidekicks/agents/milo create: [sbx, env, create, --force] stop: [sbx, stop, milo-sbx] remove: [sbx, env, rm, --force] -
Typing under
lifecycle:, completion offersfolder,create,stop,remove. -
Replace
createwithcrate: the editor reports an unknown key on its line and suggestscreate. Putcreateback and save. -
Give a local agent
runtime: {type: local, lifecycle: {create: [sbx, env, create]}}: saving is refused, with a problem onlifecycle. Remove it.
- Steps 1 to 4 behave as described.
2. A missing sandbox is recreated
-
In the macOS Terminal, remove the sandbox if it exists, then check:
sbx rm milo-sbx --force; sbx ls -qmilo-sbxis no longer listed. -
In Agents, click 📂 next to Milo, open the Log tab, then ▶ Start.
-
The state stays on starting during the creation. The log shows, in order:
sandbox: sandbox milo-sbx not found: creating itsandbox: $ sbx env create --force- the output of
sbx env create, line by line, prefixed withsandbox:
-
The agent becomes ready.
sbx ls -qlistsmilo-sbxagain. -
💬 Conversation: write to Milo, it answers from the sandbox.
- Steps 1 to 5 behave as described.
3. A stopped sandbox is not recreated
- ■ Stop on Milo, then in the macOS Terminal:
sbx stop milo-sbx. - ▶ Start: the agent starts, and the log holds no new
not found: creating itline (sbx execstarts a stopped sandbox by itself).
- Steps 1 and 2 behave as described.
4. Stop and remove from the Agents panel
- Milo's header shows ■ Stop the sandbox and 🗑 Remove the sandbox. The other (local) agents do not.
- With the agent started, click ■ Stop the sandbox: the agent becomes stopped, the log shows
sandbox: $ sbx stop milo-sbxand sbx's output.sbx lsshowsmilo-sbxstopped. - Click 🗑 Remove the sandbox: a box asks "Remove the sandbox of Milo (sbx)? …". Click Cancel: nothing happens and
sbx ls -qstill listsmilo-sbx. - Again, and click Remove: the log shows
sandbox: $ sbx env rm --force.sbx ls -qno longer listsmilo-sbx. - ▶ Start: the sandbox is recreated as in section 2.
- In Settings, remove
stop:and save: only 🗑 Remove the sandbox is left. Putstop:back.
- Steps 1 to 6 behave as described.
5. Errors are readable
- ■ Stop on Milo. In Settings, replace
sandbox: milo-sbxwithsandbox: milo-typo(keepargsas it is) and save. - ▶ Start:
milo-typodoes not exist, the create command runs, then the agent goes to error. Depending on sbx's state, the reason is either the failure ofsbx env create(themilo-sbxsandbox already exists) orthe create command ended but there is no sandbox milo-typo: …. The log shows sbx's output. - Put
sandbox: milo-sbxback. Replacefolder:with a folder that does not exist, save, remove the sandbox (sbx rm milo-sbx --force), then ▶ Start: the agent goes to error, with a reason that names thecreatecommand. Put the rightfolder:back.
- Steps 1 to 3 behave as described.
6. The assistant and dropping an sbxenv.yaml
- Open the assistant (⇧⌘N). With On this computer or In a Docker container, no "Recreate the sandbox…" area shows. Choose In an sbx sandbox: the area shows, with a dashed border.
- From the Finder, drag
agents/milo/sbxenv.yamlover the area: its border takes the accent colour. Drop it:- Sandbox name:
milo-sbx; - Agent's folder:
…/agents/milo/workspace(if it was empty); - Folder the commands run in:
…/agents/milo; - the commands
sbx env create --force,sbx stop milo-sbx,sbx env rm --force; - the message "Filled from …/sbxenv.yaml. You can still change every field."
- Sandbox name:
- Change a command by hand: the field stays editable.
- Drop the same file elsewhere in the window (outside the area): nothing changes, and the window does not navigate to the file.
- Drop
agents/milo/workspace/agent.yamlon the area: "This file cannot be used: not an sbx environment file (sbxenv.yaml)", and the fields do not change. - In the macOS Terminal:
cp agents/milo/sbxenv.yaml "/tmp/dev env.yaml". Click Choose an sbxenv.yaml… and pick/tmp/dev env.yaml: the commands becomesbx env create "dev env.yaml" --forceandsbx env rm "dev env.yaml" --force, and the folder/tmp. - Drop
agents/milo/sbxenv.yamlagain, then fill in Name shownMilo 2, Programmm, Arguments-acp. Click Add the agent. - In Settings, the
milo-2entry holdsruntime.lifecyclewithfolder, and the three commands written on one line each (create: [sbx, env, create, --force]). Removemilo-2and save.
- Steps 1 to 8 behave as described.
7. In French
- In Settings, set
ui.language: frand save. - The assistant shows "Recréer la sandbox si elle a disparu (facultatif)" and "Choisir un sbxenv.yaml…". Milo's header shows ■ Arrêter la sandbox and 🗑 Supprimer la sandbox, and the confirmation is in French.
- Set
ui.language: enback if you wish.
- Steps 1 to 3 behave as described.
If something differs
| Symptom | Likely cause | What to do |
|---|---|---|
the sandboxes cannot be listed (sbx ls): … |
sbx not found, or its daemon does not answer | which sbx, then sbx ls in the Terminal |
| Creation fails with a question from sbx in the log | the command waits for an answer: it gets no input | add --force to the command |
| Nothing happens when the file is dropped | it was dropped outside the dashed area, or the environment is not In an sbx sandbox | drop it on the area; note the macOS version in the issue |
| Starting stays on starting for long | sbx env create is pulling the kits |
follow the Log tab |
Close the issue
If everything behaves as described, close issue #47 (or ask the assistant to). Otherwise, comment on it with what differs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|