Skip to content

Bots: one Sandbox setting with Blocked, Public web or Direct network, in About and New bot - #2513

Merged
TheAnimatrix merged 6 commits into
masterfrom
bot-sandbox-modal
Dec 1, 2026
Merged

TheAnimatrix merged 6 commits into
masterfrom
bot-sandbox-modal

Conversation

@TheAnimatrix

@TheAnimatrix TheAnimatrix commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A bot's sandbox showed as two switches in About, the network was only on or off (and "on" meant the public web on Claude Code but this computer's whole network on Codex and background commands), and none of it could be set when making a bot.

Change

  • One Sandbox row. About → Can use shows one Sandbox row with its state ("Off", "On · Public web", "On · Can't start"). It opens a dialog on the shared modal surface that names the bot's computer and holds every setting: the switch, Files, Network, Local servers, the bot's secrets with each one's rule, Approvals (Auto, or Full commands, moved here from the permission list) and a summary of what commands reach, read from the resolver (the same result launches and cards use).
  • Network: Blocked, Public web, Direct. Each launcher says which networks it can give. Claude Code gives Blocked and Public web (Mousse's public-only proxy). Codex and Mousse's runner give Blocked and Direct. Any other choice shows as unavailable with its reason; no launcher ever gets a wider or narrower network than chosen. A choice saved as "network on" before this keeps exactly its old meaning per launcher, and the dialog shows no option picked for it. A subagent on Direct is never treated as within work held to the public web.
  • New bot. A Sandbox step after Runs on, off by default, with the same controls. The setting is written with the bot, before its first turn. It is sent only to a computer that says it takes it, so an older computer is never sent an unknown key.
  • Blocked card. Repair (install what's missing, or start the sandbox again) and Turn off this limit, only where they can act. Allow once and Keep allowing are a typed hook for the command-runner stage and never show before.
  • Files is its own component (BotSandboxFiles, given the bot's id in the dialog), so owner-granted folders can fill it in a later PR. Local servers shows what holds now; opening one to the browser comes later.

How to review

  1. src/shared/bots/personal/sandbox.ts: network kinds, the reach summary, card actions.
  2. src/mms/bots/sandbox/BotSandboxResolver.ts (networks, givenNetwork) and each launcher's declaration; the runner's own launch opens this computer's network only for Direct.
  3. BotEngine.setSandbox's tighter rule (botSandboxNetworkWidens) and createBot's initial setting.
  4. src/renderer/components/bots/BotSandboxSettings.tsx and the New bot step.

Verification

  • node scripts/verify.mjs on 56 named test files (1609 tests) and both typechecks: pass, with one known failure on master too (piBotGate bash test fails on Windows: Git Bash prints the files folder as /tmp/... #2405, Git Bash path in piBotGate). The New bot step, the dialog, the reach summary, the card's buttons and every launcher's network are covered by named tests.

  • Not tested automatically: how the row, dialog, step and card look. Before/after captures below are the real components with the app's CSS and stores, rendered offscreen in Electron in Mousse Dark, with sample data.

  • Not checked on a real Linux or macOS sandbox start: the launchers' starts are unchanged except which network each is handed.

Notes

Builds on #2507. No schema change: the next schema version stays free for the file-access work. No issue.

Screens

Before After
Settings row Before After
Sandbox dialog (none) After
New bot step Before After
Blocked card Before After

…is Blocked, Public web or Direct; New bot sets it too

About shows one Sandbox row with its state. Its dialog, on the modal surface, names the bot's computer and holds the switch, Files, Network, Local servers, the bot's secrets and their rules, Approvals (Auto or Full commands) and a summary of what commands reach, read from the resolver. The network choice is split into Blocked, Public web and Direct; each launcher says which it can give, and any other choice is unavailable. A saved network-on choice keeps its meaning. New bot has a Sandbox step, off by default, written with the bot before its first turn. The blocked card offers Repair and Turn off this limit.
… the old one; Repair re-probes each card's launcher; a late read never undoes a change; Full commands keeps Remove; secrets given with Use saved are listed
…ttings' secret list names the threads that may use each
@TheAnimatrix
TheAnimatrix merged commit 38d17c4 into master Dec 1, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant