windows-development-sandbox 1.0.5 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +25 -8
- package/config.example.json +55 -5
- package/dist/api.js +2 -1
- package/dist/cli/args.d.ts +23 -0
- package/dist/cli/args.js +38 -4
- package/dist/cli/colors.d.ts +24 -0
- package/dist/cli/colors.js +42 -0
- package/dist/cli/commands/accounts.js +2 -2
- package/dist/cli/commands/agent-commands.d.ts +6 -0
- package/dist/cli/commands/agent-commands.js +61 -0
- package/dist/cli/commands/context.d.ts +2 -0
- package/dist/cli/commands/context.js +5 -1
- package/dist/cli/commands/data/clean.d.ts +15 -0
- package/dist/cli/commands/data/clean.js +106 -0
- package/dist/cli/commands/data/collect.d.ts +11 -0
- package/dist/cli/commands/data/collect.js +54 -0
- package/dist/cli/commands/data/index.d.ts +4 -0
- package/dist/cli/commands/data/index.js +45 -0
- package/dist/cli/commands/data/remove.d.ts +2 -0
- package/dist/cli/commands/data/remove.js +30 -0
- package/dist/cli/commands/index.d.ts +6 -4
- package/dist/cli/commands/index.js +6 -4
- package/dist/cli/commands/launch.d.ts +26 -2
- package/dist/cli/commands/launch.js +256 -42
- package/dist/cli/commands/maintenance.d.ts +2 -0
- package/dist/cli/commands/maintenance.js +67 -5
- package/dist/cli/commands/project.d.ts +29 -0
- package/dist/cli/commands/project.js +63 -0
- package/dist/cli/commands/projects.d.ts +14 -0
- package/dist/cli/commands/projects.js +146 -0
- package/dist/cli/commands/repair/checks.d.ts +2 -0
- package/dist/cli/commands/{repair.js → repair/checks.js} +19 -181
- package/dist/cli/commands/{repair.d.ts → repair/finders.d.ts} +0 -29
- package/dist/cli/commands/repair/finders.js +108 -0
- package/dist/cli/commands/repair/index.d.ts +12 -0
- package/dist/cli/commands/repair/index.js +61 -0
- package/dist/cli/commands/repair/types.d.ts +26 -0
- package/dist/cli/commands/repair/types.js +3 -0
- package/dist/cli/commands/restart.d.ts +6 -0
- package/dist/cli/commands/restart.js +85 -0
- package/dist/cli/commands/sessions.d.ts +2 -1
- package/dist/cli/commands/sessions.js +189 -45
- package/dist/cli/commands/setup/checks.d.ts +13 -0
- package/dist/cli/commands/setup/checks.js +71 -0
- package/dist/cli/commands/{setup.d.ts → setup/facts.d.ts} +1 -15
- package/dist/cli/commands/setup/facts.js +60 -0
- package/dist/cli/commands/setup/index.d.ts +2 -0
- package/dist/cli/commands/setup/index.js +43 -0
- package/dist/cli/commands/user-config.d.ts +8 -0
- package/dist/cli/commands/user-config.js +41 -0
- package/dist/cli/history.d.ts +11 -0
- package/dist/cli/history.js +21 -0
- package/dist/cli/index.d.ts +7 -1
- package/dist/cli/index.js +42 -15
- package/dist/cli/manifest.d.ts +8 -0
- package/dist/cli/manifest.js +40 -15
- package/dist/cli/menu/apps.d.ts +21 -0
- package/dist/cli/menu/apps.js +122 -0
- package/dist/cli/menu/command-form.d.ts +28 -0
- package/dist/cli/menu/command-form.js +219 -0
- package/dist/cli/menu/index.d.ts +26 -0
- package/dist/cli/menu/index.js +180 -0
- package/dist/cli/menu/settings/categories.d.ts +9 -0
- package/dist/cli/menu/settings/categories.js +28 -0
- package/dist/cli/menu/settings/config-file.d.ts +40 -0
- package/dist/cli/menu/settings/config-file.js +71 -0
- package/dist/cli/menu/settings/editors.d.ts +30 -0
- package/dist/cli/menu/settings/editors.js +305 -0
- package/dist/cli/menu/settings/index.d.ts +32 -0
- package/dist/cli/menu/settings/index.js +136 -0
- package/dist/cli/menu/settings/schema-node.d.ts +62 -0
- package/dist/cli/menu/settings/schema-node.js +104 -0
- package/dist/cli/menu/several.d.ts +20 -0
- package/dist/cli/menu/several.js +102 -0
- package/dist/cli/progress.d.ts +9 -0
- package/dist/cli/progress.js +49 -0
- package/dist/cli/tui/app.d.ts +39 -0
- package/dist/cli/tui/app.js +52 -0
- package/dist/cli/tui/dialogs.d.ts +57 -0
- package/dist/cli/tui/dialogs.js +162 -0
- package/dist/cli/tui/frame.d.ts +18 -0
- package/dist/cli/tui/frame.js +27 -0
- package/dist/cli/tui/index.d.ts +7 -0
- package/dist/cli/tui/index.js +8 -0
- package/dist/cli/tui/list-screen.d.ts +101 -0
- package/dist/cli/tui/list-screen.js +299 -0
- package/dist/cli/tui/terminal.d.ts +37 -0
- package/dist/cli/tui/terminal.js +89 -0
- package/dist/cli/tui/text.d.ts +20 -0
- package/dist/cli/tui/text.js +105 -0
- package/dist/cli/tui/theme.d.ts +45 -0
- package/dist/cli/tui/theme.js +30 -0
- package/dist/cli/validate.d.ts +17 -0
- package/dist/cli/validate.js +89 -0
- package/dist/core/config.js +12 -6
- package/dist/core/disk.d.ts +16 -0
- package/dist/core/disk.js +55 -0
- package/dist/core/local-config.d.ts +23 -0
- package/dist/core/local-config.js +79 -7
- package/dist/core/project-policy.d.ts +15 -0
- package/dist/core/project-policy.js +35 -0
- package/dist/core/prompt.d.ts +4 -0
- package/dist/core/prompt.js +15 -0
- package/dist/core/safe-paths.d.ts +4 -0
- package/dist/core/safe-paths.js +37 -0
- package/dist/core/schema/apps.d.ts +40 -0
- package/dist/core/schema/apps.js +27 -0
- package/dist/core/schema/common.d.ts +17 -0
- package/dist/core/schema/common.js +15 -0
- package/dist/core/schema/config.d.ts +659 -0
- package/dist/core/schema/config.js +75 -0
- package/dist/core/schema/databases.d.ts +33 -0
- package/dist/core/schema/databases.js +35 -0
- package/dist/core/schema/harness.d.ts +12 -0
- package/dist/core/schema/harness.js +17 -0
- package/dist/core/schema/json-schema.d.ts +5 -0
- package/dist/core/schema/json-schema.js +25 -0
- package/dist/core/schema/profile.d.ts +32 -0
- package/dist/core/schema/profile.js +31 -0
- package/dist/core/schema/projects.d.ts +9 -0
- package/dist/core/schema/projects.js +11 -0
- package/dist/core/schema/sandbox.d.ts +78 -0
- package/dist/core/schema/sandbox.js +64 -0
- package/dist/core/schema/toolchains.d.ts +96 -0
- package/dist/core/schema/toolchains.js +88 -0
- package/dist/core/schema.d.ts +6 -604
- package/dist/core/schema.js +8 -264
- package/dist/core/types.d.ts +35 -1
- package/dist/core/util.d.ts +9 -0
- package/dist/core/util.js +14 -3
- package/dist/core/workspace.d.ts +0 -5
- package/dist/core/workspace.js +33 -50
- package/dist/guest/apps/index.d.ts +10 -0
- package/dist/guest/apps/index.js +206 -0
- package/dist/guest/apps/resolvers.d.ts +8 -0
- package/dist/guest/apps/resolvers.js +90 -0
- package/dist/guest/audit-parse.d.ts +7 -0
- package/dist/guest/audit-parse.js +24 -0
- package/dist/guest/audit.d.ts +4 -0
- package/dist/guest/audit.js +47 -0
- package/dist/guest/boot-env.d.ts +4 -0
- package/dist/guest/boot-env.js +25 -0
- package/dist/guest/cmdline.d.ts +12 -0
- package/dist/guest/cmdline.js +23 -0
- package/dist/guest/daemon/exec.d.ts +5 -0
- package/dist/guest/daemon/exec.js +32 -0
- package/dist/guest/daemon/project.d.ts +14 -0
- package/dist/guest/daemon/project.js +132 -0
- package/dist/guest/daemon/relays.d.ts +1 -0
- package/dist/guest/daemon/relays.js +18 -0
- package/dist/guest/daemon/session.d.ts +13 -0
- package/dist/guest/daemon/session.js +139 -0
- package/dist/guest/daemon/shutdown.d.ts +1 -0
- package/dist/guest/daemon/shutdown.js +21 -0
- package/dist/guest/daemon/state.d.ts +17 -0
- package/dist/guest/daemon/state.js +31 -0
- package/dist/guest/daemon.js +12 -141
- package/dist/guest/db.js +18 -3
- package/dist/guest/env.d.ts +3 -0
- package/dist/guest/env.js +7 -3
- package/dist/guest/guide.d.ts +6 -2
- package/dist/guest/guide.js +5 -4
- package/dist/guest/helpers.d.ts +3 -0
- package/dist/guest/helpers.js +26 -0
- package/dist/guest/main.js +31 -8
- package/dist/guest/netproxy.d.ts +1 -0
- package/dist/guest/netproxy.js +100 -0
- package/dist/guest/ports.d.ts +6 -0
- package/dist/guest/ports.js +22 -0
- package/dist/guest/project-context.d.ts +7 -0
- package/dist/guest/project-context.js +10 -0
- package/dist/guest/project-env.d.ts +20 -0
- package/dist/guest/project-env.js +20 -0
- package/dist/guest/project-status.d.ts +5 -0
- package/dist/guest/project-status.js +17 -0
- package/dist/guest/ptyhost.d.ts +0 -18
- package/dist/guest/ptyhost.js +17 -65
- package/dist/guest/setup/agents.d.ts +5 -2
- package/dist/guest/setup/agents.js +22 -8
- package/dist/guest/setup/claude.d.ts +0 -4
- package/dist/guest/setup/claude.js +59 -5
- package/dist/guest/setup/environment.d.ts +13 -3
- package/dist/guest/setup/environment.js +14 -10
- package/dist/guest/setup/hooks.d.ts +9 -1
- package/dist/guest/setup/hooks.js +28 -14
- package/dist/guest/setup/network.d.ts +9 -0
- package/dist/guest/setup/network.js +97 -4
- package/dist/guest/setup/user.js +4 -0
- package/dist/guest/toolchains/catalogue.d.ts +4 -0
- package/dist/guest/toolchains/catalogue.js +2 -2
- package/dist/guest/toolchains/cli.js +25 -17
- package/dist/guest/toolchains/common.d.ts +18 -1
- package/dist/guest/toolchains/common.js +34 -11
- package/dist/guest/toolchains/databases/dynamodb.d.ts +8 -0
- package/dist/guest/toolchains/databases/dynamodb.js +52 -0
- package/dist/guest/toolchains/{databases.d.ts → databases/index.d.ts} +2 -3
- package/dist/guest/toolchains/databases/index.js +62 -0
- package/dist/guest/toolchains/databases/mongodb.d.ts +3 -0
- package/dist/guest/toolchains/databases/mongodb.js +31 -0
- package/dist/guest/toolchains/databases/mysql.d.ts +3 -0
- package/dist/guest/toolchains/databases/mysql.js +38 -0
- package/dist/guest/toolchains/databases/postgres.d.ts +5 -0
- package/dist/guest/toolchains/databases/postgres.js +38 -0
- package/dist/guest/toolchains/databases/redis.d.ts +3 -0
- package/dist/guest/toolchains/databases/redis.js +16 -0
- package/dist/guest/toolchains/databases/server.d.ts +14 -0
- package/dist/guest/toolchains/databases/server.js +52 -0
- package/dist/guest/toolchains/git.js +25 -16
- package/dist/guest/toolchains/go.js +1 -1
- package/dist/guest/toolchains/index.d.ts +13 -9
- package/dist/guest/toolchains/index.js +40 -82
- package/dist/guest/toolchains/java.js +5 -5
- package/dist/guest/toolchains/leftovers.d.ts +2 -0
- package/dist/guest/toolchains/leftovers.js +26 -0
- package/dist/guest/toolchains/managers.js +12 -10
- package/dist/guest/toolchains/{binstall.js → native/binstall.js} +6 -9
- package/dist/guest/toolchains/native/cpp.d.ts +4 -0
- package/dist/guest/toolchains/native/cpp.js +38 -0
- package/dist/guest/toolchains/native/dotnet.d.ts +4 -0
- package/dist/guest/toolchains/native/dotnet.js +103 -0
- package/dist/guest/toolchains/native/mesa.d.ts +7 -0
- package/dist/guest/toolchains/native/mesa.js +56 -0
- package/dist/guest/toolchains/native/msvc/environment.d.ts +16 -0
- package/dist/guest/toolchains/native/msvc/environment.js +57 -0
- package/dist/guest/toolchains/native/msvc/index.d.ts +6 -0
- package/dist/guest/toolchains/native/msvc/index.js +48 -0
- package/dist/guest/toolchains/native/msvc/packages.d.ts +6 -0
- package/dist/guest/toolchains/native/msvc/packages.js +156 -0
- package/dist/guest/toolchains/native/msvc/tree.d.ts +15 -0
- package/dist/guest/toolchains/native/msvc/tree.js +21 -0
- package/dist/guest/toolchains/native/rust.d.ts +3 -0
- package/dist/guest/toolchains/native/rust.js +45 -0
- package/dist/guest/toolchains/node.js +26 -6
- package/dist/guest/toolchains/plan.d.ts +24 -0
- package/dist/guest/toolchains/plan.js +140 -0
- package/dist/guest/toolchains/pwsh.js +1 -1
- package/dist/guest/toolchains/python.js +43 -12
- package/dist/guest/toolchains/runtimes.d.ts +2 -0
- package/dist/guest/toolchains/runtimes.js +6 -8
- package/dist/guest/toolchains/scripting/php.d.ts +3 -0
- package/dist/guest/toolchains/scripting/php.js +71 -0
- package/dist/guest/toolchains/scripting/ruby.d.ts +3 -0
- package/dist/guest/toolchains/scripting/ruby.js +47 -0
- package/dist/guest/toolchains/scripting/vcruntime.d.ts +7 -0
- package/dist/guest/toolchains/scripting/vcruntime.js +45 -0
- package/dist/guest/toolchains/vscode-profile.d.ts +30 -0
- package/dist/guest/toolchains/vscode-profile.js +69 -0
- package/dist/guest/toolchains/vscode.d.ts +17 -0
- package/dist/guest/toolchains/vscode.js +87 -1
- package/dist/guest/view.js +21 -1
- package/dist/host/accounts.js +14 -5
- package/dist/host/agent-commands.d.ts +25 -0
- package/dist/host/agent-commands.js +145 -0
- package/dist/host/attach.d.ts +17 -0
- package/dist/host/attach.js +70 -0
- package/dist/host/audit/collect.d.ts +34 -0
- package/dist/host/audit/collect.js +126 -0
- package/dist/host/audit/log.d.ts +46 -0
- package/dist/host/audit/log.js +143 -0
- package/dist/host/channel.d.ts +23 -22
- package/dist/host/channel.js +66 -84
- package/dist/host/claude-profile.js +7 -3
- package/dist/host/cleanup.js +2 -11
- package/dist/host/database-plan.d.ts +12 -0
- package/dist/host/database-plan.js +52 -0
- package/dist/host/generate.d.ts +10 -12
- package/dist/host/generate.js +58 -135
- package/dist/host/join.d.ts +28 -0
- package/dist/host/join.js +76 -0
- package/dist/host/launch/mappings.d.ts +3 -0
- package/dist/host/launch/mappings.js +54 -0
- package/dist/host/launch/projects.d.ts +15 -0
- package/dist/host/launch/projects.js +56 -0
- package/dist/host/launch/stage.d.ts +11 -0
- package/dist/host/launch/stage.js +66 -0
- package/dist/host/launch/wsb.d.ts +10 -0
- package/dist/host/launch/wsb.js +34 -0
- package/dist/host/motw.d.ts +17 -0
- package/dist/host/motw.js +74 -0
- package/dist/host/pc-scan.d.ts +6 -0
- package/dist/host/pc-scan.js +37 -0
- package/dist/host/platform.d.ts +2 -0
- package/dist/host/platform.js +16 -1
- package/dist/host/port-forward.d.ts +8 -0
- package/dist/host/port-forward.js +37 -0
- package/dist/host/project-scan.d.ts +1 -17
- package/dist/host/project-scan.js +2 -86
- package/dist/host/projects.d.ts +100 -0
- package/dist/host/projects.js +147 -0
- package/dist/host/repo-guard.d.ts +25 -5
- package/dist/host/repo-guard.js +242 -23
- package/dist/host/stops.d.ts +67 -0
- package/dist/host/stops.js +126 -0
- package/dist/host/terminal.d.ts +8 -0
- package/dist/host/terminal.js +48 -1
- package/dist/host/test-guard.d.ts +6 -0
- package/dist/host/test-guard.js +15 -0
- package/dist/host/window.js +7 -3
- package/dist/host/workspace-view/index.d.ts +20 -0
- package/dist/host/workspace-view/index.js +53 -0
- package/dist/host/workspace-view/rules.d.ts +26 -0
- package/dist/host/workspace-view/rules.js +93 -0
- package/dist/host/workspace-view/view.d.ts +50 -0
- package/dist/host/workspace-view/view.js +281 -0
- package/dist/host/wsb.d.ts +37 -0
- package/dist/host/wsb.js +101 -0
- package/dist/runtime/daemon.js +11791 -2821
- package/dist/runtime/db.js +6585 -466
- package/dist/runtime/main.js +10238 -1724
- package/dist/runtime/netproxy.js +25936 -0
- package/dist/runtime/view.js +6183 -59
- package/dist/selftest/accounts.test.d.ts +2 -0
- package/dist/selftest/accounts.test.js +44 -0
- package/dist/selftest/agent-commands.test.d.ts +2 -0
- package/dist/selftest/agent-commands.test.js +47 -0
- package/dist/selftest/audit.test.d.ts +2 -0
- package/dist/selftest/audit.test.js +57 -0
- package/dist/selftest/channel.test.d.ts +2 -0
- package/dist/selftest/channel.test.js +44 -0
- package/dist/selftest/cli.test.d.ts +2 -2
- package/dist/selftest/cli.test.js +145 -27
- package/dist/selftest/cmdline.test.d.ts +2 -0
- package/dist/selftest/cmdline.test.js +45 -0
- package/dist/selftest/config.test.d.ts +2 -3
- package/dist/selftest/config.test.js +36 -72
- package/dist/selftest/data.test.d.ts +2 -2
- package/dist/selftest/data.test.js +77 -70
- package/dist/selftest/detect.test.d.ts +2 -2
- package/dist/selftest/detect.test.js +54 -38
- package/dist/selftest/fixtures.d.ts +89 -4
- package/dist/selftest/fixtures.js +43 -24
- package/dist/selftest/generate.test.d.ts +2 -0
- package/dist/selftest/generate.test.js +68 -0
- package/dist/selftest/git-access.test.d.ts +2 -0
- package/dist/selftest/git-access.test.js +26 -0
- package/dist/selftest/guest-boot.test.d.ts +2 -0
- package/dist/selftest/guest-boot.test.js +76 -0
- package/dist/selftest/harness.d.ts +44 -7
- package/dist/selftest/harness.js +62 -21
- package/dist/selftest/host-sim.test.d.ts +2 -0
- package/dist/selftest/host-sim.test.js +93 -0
- package/dist/selftest/hostile-input.test.d.ts +2 -0
- package/dist/selftest/hostile-input.test.js +54 -0
- package/dist/selftest/index.d.ts +8 -1
- package/dist/selftest/index.js +137 -35
- package/dist/selftest/links.test.d.ts +2 -0
- package/dist/selftest/links.test.js +50 -0
- package/dist/selftest/live-daemon.test.d.ts +2 -0
- package/dist/selftest/live-daemon.test.js +91 -0
- package/dist/selftest/live-git.test.d.ts +2 -0
- package/dist/selftest/live-git.test.js +60 -0
- package/dist/selftest/live-network.test.d.ts +2 -0
- package/dist/selftest/live-network.test.js +63 -0
- package/dist/selftest/live-projects.test.d.ts +2 -0
- package/dist/selftest/live-projects.test.js +127 -0
- package/dist/selftest/live.d.ts +65 -0
- package/dist/selftest/live.js +109 -0
- package/dist/selftest/local-config.test.d.ts +2 -0
- package/dist/selftest/local-config.test.js +120 -0
- package/dist/selftest/mirror.test.d.ts +2 -3
- package/dist/selftest/mirror.test.js +92 -65
- package/dist/selftest/network.test.d.ts +2 -0
- package/dist/selftest/network.test.js +40 -0
- package/dist/selftest/personalization.test.d.ts +2 -0
- package/dist/selftest/personalization.test.js +53 -0
- package/dist/selftest/projects.test.d.ts +2 -0
- package/dist/selftest/projects.test.js +254 -0
- package/dist/selftest/repair.test.d.ts +2 -0
- package/dist/selftest/repair.test.js +42 -0
- package/dist/selftest/repo-guard.test.d.ts +2 -0
- package/dist/selftest/repo-guard.test.js +121 -0
- package/dist/selftest/secrets.test.d.ts +2 -0
- package/dist/selftest/secrets.test.js +71 -0
- package/dist/selftest/setup.test.d.ts +2 -2
- package/dist/selftest/setup.test.js +45 -22
- package/dist/selftest/suite.d.ts +13 -0
- package/dist/selftest/suite.js +1 -0
- package/dist/selftest/sync.test.d.ts +2 -3
- package/dist/selftest/sync.test.js +130 -78
- package/dist/selftest/test-guard.test.d.ts +2 -0
- package/dist/selftest/test-guard.test.js +49 -0
- package/dist/selftest/toolchains.test.d.ts +2 -0
- package/dist/selftest/toolchains.test.js +133 -0
- package/dist/selftest/workspace-view.test.d.ts +2 -0
- package/dist/selftest/workspace-view.test.js +89 -0
- package/dist/selftest/workspace.test.d.ts +2 -0
- package/dist/selftest/workspace.test.js +53 -0
- package/dist/shared/apps.d.ts +49 -0
- package/dist/shared/apps.js +114 -0
- package/dist/shared/download.d.ts +3 -1
- package/dist/shared/download.js +19 -4
- package/dist/shared/netpolicy.d.ts +27 -0
- package/dist/shared/netpolicy.js +51 -0
- package/dist/shared/paths.d.ts +5 -0
- package/dist/shared/paths.js +6 -0
- package/dist/shared/projects.d.ts +53 -0
- package/dist/shared/projects.js +67 -0
- package/dist/shared/pty-client.d.ts +9 -4
- package/dist/shared/pty-client.js +139 -17
- package/dist/shared/rundir.d.ts +12 -1
- package/dist/shared/rundir.js +14 -4
- package/dist/shared/safe-remove.js +11 -0
- package/dist/shared/schema.d.ts +453 -0
- package/dist/shared/schema.js +43 -2
- package/dist/shared/system.d.ts +1 -0
- package/dist/shared/system.js +1 -0
- package/dist/shared/test-guard.d.ts +4 -0
- package/dist/shared/test-guard.js +37 -0
- package/dist/sync/claude-mem.js +6 -3
- package/dist/sync/history.d.ts +29 -12
- package/dist/sync/history.js +72 -25
- package/dist/sync/watcher.d.ts +8 -0
- package/dist/sync/watcher.js +99 -8
- package/package.json +7 -6
- package/sandbox/bootstrap.ps1 +258 -258
- package/sandbox/cargoshim.cs +56 -0
- package/sandbox/cpucap.cs +33 -0
- package/sandbox/cpucap.ps1 +20 -0
- package/sandbox/logon.cmd +24 -16
- package/sandbox/memlog.ps1 +34 -0
- package/sandbox/openssl.cs +42 -0
- package/sandbox/pagefile.cs +31 -0
- package/sandbox/pagefile.ps1 +21 -0
- package/sandbox/ptyhost.cs +120 -11
- package/sandbox/trust.cmd +35 -35
- package/schemas/config.schema.json +403 -3
- package/schemas/sandbox-config.schema.json +143 -13
- package/dist/cli/commands/data.d.ts +0 -46
- package/dist/cli/commands/data.js +0 -249
- package/dist/cli/commands/setup.js +0 -152
- package/dist/cli/menu.d.ts +0 -22
- package/dist/cli/menu.js +0 -187
- package/dist/cli/settings.d.ts +0 -11
- package/dist/cli/settings.js +0 -156
- package/dist/guest/toolchains/databases.js +0 -226
- package/dist/guest/toolchains/msvc.d.ts +0 -10
- package/dist/guest/toolchains/msvc.js +0 -216
- package/dist/guest/toolchains/native.d.ts +0 -12
- package/dist/guest/toolchains/native.js +0 -220
- package/dist/guest/toolchains/scripting.d.ts +0 -10
- package/dist/guest/toolchains/scripting.js +0 -137
- package/dist/selftest/guest.test.d.ts +0 -3
- package/dist/selftest/guest.test.js +0 -61
- package/dist/selftest/helpers.test.d.ts +0 -2
- package/dist/selftest/helpers.test.js +0 -125
- package/dist/selftest/host.test.d.ts +0 -2
- package/dist/selftest/host.test.js +0 -71
- package/dist/selftest/live.test.d.ts +0 -7
- package/dist/selftest/live.test.js +0 -127
- package/dist/selftest/security.test.d.ts +0 -3
- package/dist/selftest/security.test.js +0 -143
- /package/dist/guest/toolchains/{binstall.d.ts → native/binstall.d.ts} +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// The user config and the smaller subset a project's .sandbox-config.json may change. Types are inferred from these
|
|
2
|
+
// schemas, and the JSON Schema files in schemas/ are generated from them at build time.
|
|
3
|
+
import _ from 'lodash';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { Name, SchemaRef, Strings, toggle } from './common.js';
|
|
6
|
+
import { Databases } from './databases.js';
|
|
7
|
+
import { Harness } from './harness.js';
|
|
8
|
+
import { AgentCommands, Attach, ClaudeProfile, Secrets } from './profile.js';
|
|
9
|
+
import { Audit, Downloads, Git, GuestWorkspace, Mapping, Network, Provisioning, Sandbox, WorkspaceFilter } from './sandbox.js';
|
|
10
|
+
import { Toolchains } from './toolchains.js';
|
|
11
|
+
import { Apps } from './apps.js';
|
|
12
|
+
import { Projects } from './projects.js';
|
|
13
|
+
export const Config = z.strictObject({
|
|
14
|
+
$schema: SchemaRef.optional(),
|
|
15
|
+
defaultHarness: Name.describe('Agent started by `sandbox launch` (sandbox claude always runs claude).'),
|
|
16
|
+
guestWorkspace: GuestWorkspace,
|
|
17
|
+
readOnly: z.boolean().describe('Map the workspace read-only.'),
|
|
18
|
+
workspaceFilter: WorkspaceFilter,
|
|
19
|
+
audit: Audit,
|
|
20
|
+
mappings: z.array(Mapping).describe('Extra folders from this PC.'),
|
|
21
|
+
sandbox: Sandbox,
|
|
22
|
+
storage: z.strictObject({
|
|
23
|
+
root: z.string().min(1).describe('Where everything is kept on this PC (tools, databases, logins, launches).'),
|
|
24
|
+
persistAgentState: z.boolean().describe('Keep agent logins and history between sandboxes.'),
|
|
25
|
+
dataName: Name.describe('Name of the persistent data set (C:\\AgentData) shared by all workspaces.'),
|
|
26
|
+
markSandboxFiles: z.boolean().describe('Programs and scripts (.exe, .ps1, .bat, .cmd, .msi, .lnk ...) that appear or change in your project while a sandbox runs get Windows\' "downloaded from the internet" mark, so SmartScreen and PowerShell ask before they run on this PC.'),
|
|
27
|
+
warnDataGb: z.number().min(0).describe('Say at launch when the persisted data (tools, databases, logins) is bigger than this many GB; 0 = never. sandbox data shows what takes the space.'),
|
|
28
|
+
}),
|
|
29
|
+
network: Network,
|
|
30
|
+
provisioning: Provisioning,
|
|
31
|
+
downloads: Downloads,
|
|
32
|
+
toolchains: Toolchains,
|
|
33
|
+
databases: Databases.describe('Databases running inside the sandbox. Data persists in C:\\AgentData\\databases; each one starts at boot.'),
|
|
34
|
+
attach: Attach,
|
|
35
|
+
agentCommands: AgentCommands,
|
|
36
|
+
secrets: Secrets,
|
|
37
|
+
personalization: toggle('Copy your desktop look (theme, accent, taskbar, wallpaper, ...) into the sandbox.'),
|
|
38
|
+
apps: Apps,
|
|
39
|
+
claudeProfile: ClaudeProfile,
|
|
40
|
+
harnesses: z.record(Name, Harness).describe('Agents that can run in the sandbox.'),
|
|
41
|
+
hooks: z.strictObject({ failFast: z.boolean().describe('Stop when a hook script fails.') }),
|
|
42
|
+
projects: Projects.describe('Several projects in one sandbox: folders of projects mapped at every start, and adding folders while it runs.'),
|
|
43
|
+
}).refine((c) => c.harnesses[c.defaultHarness] !== undefined, { message: 'defaultHarness must be one of the configured harnesses', path: ['defaultHarness'] });
|
|
44
|
+
/**
|
|
45
|
+
* What a project's .sandbox-config.json may change. A repo can ship this file, so it can NOT touch storage, agent
|
|
46
|
+
* executables, host folders for tools or Claude settings, or anything else outside this list.
|
|
47
|
+
*/
|
|
48
|
+
export const LocalOverrides = z.strictObject({
|
|
49
|
+
$schema: SchemaRef,
|
|
50
|
+
harness: Name.describe('Agent for this project.'),
|
|
51
|
+
guestWorkspace: GuestWorkspace,
|
|
52
|
+
readOnly: z.boolean().describe('Map this project read-only.'),
|
|
53
|
+
// A project may turn the filter on and keep more out, never let ignored files in.
|
|
54
|
+
workspaceFilter: WorkspaceFilter.pick({ enabled: true, exclude: true }).partial(),
|
|
55
|
+
mappings: z.array(Mapping).describe('Extra folders inside this project (relative to this file), e.g. a read-only data folder at another place in the sandbox.'),
|
|
56
|
+
scripts: Strings.describe('Scripts (.ps1 / .mjs / .cmd, relative to this file) run inside the sandbox before the agent.'),
|
|
57
|
+
// This PC's resources are yours to share: CPU and paging file (this PC's disk) are not a project's to set.
|
|
58
|
+
sandbox: Sandbox.omit({ cpuLimit: true, pageFileMb: true }).partial(),
|
|
59
|
+
// A project may block more (the LAN, hosts); it never opens hosts, ports, DNS or a proxy.
|
|
60
|
+
network: Network.pick({ blockPrivateRanges: true, blockHosts: true }).partial(),
|
|
61
|
+
provisioning: Provisioning.pick({ copyFromHost: true, fallbackToInstall: true, refresh: true }).extend({ git: Git.partial(), terminal: toggle('Windows Terminal as the sandbox window.').partial() }).partial(),
|
|
62
|
+
downloads: Downloads.partial(),
|
|
63
|
+
// Every toolchain setting, each one optional (a project usually only switches languages on or pins a version).
|
|
64
|
+
toolchains: z.strictObject({
|
|
65
|
+
..._.mapValues(_.omit(Toolchains.shape, 'environment'), (shape) => shape.partial()),
|
|
66
|
+
environment: Toolchains.shape.environment,
|
|
67
|
+
}).partial(),
|
|
68
|
+
databases: z.strictObject(_.mapValues(Databases.shape, (shape) => shape.partial())).partial(),
|
|
69
|
+
attach: Attach.partial(),
|
|
70
|
+
personalization: toggle('Copy your desktop look into the sandbox.').partial(),
|
|
71
|
+
// Catalogue apps only (a vetted list): your own programs (apps.custom) download anything, so a repo cannot add them.
|
|
72
|
+
apps: Apps.pick({ install: true }).partial(),
|
|
73
|
+
claudeProfile: ClaudeProfile.pick({ enabled: true, overwrite: true, copyCredentials: true, syncHistory: true, syncClaudeMem: true }).partial(),
|
|
74
|
+
hooks: z.strictObject({ failFast: z.boolean() }).partial(),
|
|
75
|
+
}).partial();
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Port: z.ZodNumber;
|
|
3
|
+
export declare const dbEnabled: (name: string) => z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
4
|
+
export declare const Databases: z.ZodObject<{
|
|
5
|
+
postgres: z.ZodObject<{
|
|
6
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
7
|
+
version: z.ZodString;
|
|
8
|
+
port: z.ZodNumber;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
mysql: z.ZodObject<{
|
|
11
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
12
|
+
version: z.ZodString;
|
|
13
|
+
port: z.ZodNumber;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
mongodb: z.ZodObject<{
|
|
16
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
17
|
+
version: z.ZodString;
|
|
18
|
+
port: z.ZodNumber;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
redis: z.ZodObject<{
|
|
21
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
22
|
+
port: z.ZodNumber;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
dynamodb: z.ZodObject<{
|
|
25
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
26
|
+
port: z.ZodNumber;
|
|
27
|
+
adminPort: z.ZodNumber;
|
|
28
|
+
admin: z.ZodBoolean;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
sqlserver: z.ZodObject<{
|
|
31
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Databases that run inside the sandbox.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Enabled } from './common.js';
|
|
4
|
+
export const Port = z.number().int().min(1024).max(65535);
|
|
5
|
+
export const dbEnabled = (name) => Enabled.describe(name + ': true, false, or "auto" = only when the project needs it (found from compose files, dependencies of every language, Prisma/ORM config and connection strings).');
|
|
6
|
+
export const Databases = z.strictObject({
|
|
7
|
+
postgres: z.strictObject({
|
|
8
|
+
enabled: dbEnabled('PostgreSQL (with psql, pg_dump). User postgres, no password, localhost only'),
|
|
9
|
+
version: z.string().min(1).describe('"latest" or a major version such as "16". A compose file pinning postgres:<major> wins.'),
|
|
10
|
+
port: Port.describe('Port inside the sandbox.'),
|
|
11
|
+
}),
|
|
12
|
+
mysql: z.strictObject({
|
|
13
|
+
enabled: dbEnabled('MySQL-compatible database (MariaDB). User root, no password, localhost only'),
|
|
14
|
+
version: z.string().min(1).describe('"lts" (newest MariaDB LTS) or a MariaDB series such as "11.4".'),
|
|
15
|
+
port: Port.describe('Port inside the sandbox.'),
|
|
16
|
+
}),
|
|
17
|
+
mongodb: z.strictObject({
|
|
18
|
+
enabled: dbEnabled('MongoDB with mongosh, localhost only'),
|
|
19
|
+
version: z.string().min(1).describe('"latest" or a version prefix such as "8.0".'),
|
|
20
|
+
port: Port.describe('Port inside the sandbox.'),
|
|
21
|
+
}),
|
|
22
|
+
redis: z.strictObject({
|
|
23
|
+
enabled: dbEnabled('Redis (community Windows build), localhost only'),
|
|
24
|
+
port: Port.describe('Port inside the sandbox.'),
|
|
25
|
+
}),
|
|
26
|
+
dynamodb: z.strictObject({
|
|
27
|
+
enabled: dbEnabled('DynamoDB Local (Amazon\'s official emulator, on the Java toolchain) with dynamodb-admin, a web UI to browse and edit tables'),
|
|
28
|
+
port: Port.describe('DynamoDB endpoint port inside the sandbox (http://localhost:<port>).'),
|
|
29
|
+
adminPort: Port.describe('dynamodb-admin web UI port (open http://localhost:<adminPort> in the sandbox\'s browser).'),
|
|
30
|
+
admin: z.boolean().describe('Run dynamodb-admin next to DynamoDB Local.'),
|
|
31
|
+
}),
|
|
32
|
+
sqlserver: z.strictObject({
|
|
33
|
+
enabled: dbEnabled('SQL Server. It cannot run inside Windows Sandbox; when a project needs it you get a note to use Postgres or SQLite for local work'),
|
|
34
|
+
}),
|
|
35
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Harness: z.ZodObject<{
|
|
3
|
+
hostExecutable: z.ZodOptional<z.ZodString>;
|
|
4
|
+
hostDir: z.ZodOptional<z.ZodString>;
|
|
5
|
+
npmPackage: z.ZodOptional<z.ZodString>;
|
|
6
|
+
npmBin: z.ZodOptional<z.ZodString>;
|
|
7
|
+
uvPackage: z.ZodOptional<z.ZodString>;
|
|
8
|
+
uvBin: z.ZodOptional<z.ZodString>;
|
|
9
|
+
arguments: z.ZodArray<z.ZodString>;
|
|
10
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
11
|
+
resumeArguments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// An agent (claude, codex, ...) the sandbox can run.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Strings } from './common.js';
|
|
4
|
+
export const Harness = z.strictObject({
|
|
5
|
+
hostExecutable: z.string().optional().describe('Executable copied from this PC when installed here (e.g. claude.exe).'),
|
|
6
|
+
hostDir: z.string().optional().describe('Folder of hostExecutable on this PC, or "auto" to search PATH and ~/.local/bin.'),
|
|
7
|
+
npmPackage: z.string().optional().describe('npm package installed inside the sandbox when there is no host copy.'),
|
|
8
|
+
npmBin: z.string().optional().describe('Command the npm package provides.'),
|
|
9
|
+
uvPackage: z.string().optional().describe('Python package installed with `uv tool install` inside the sandbox (e.g. aider-chat).'),
|
|
10
|
+
uvBin: z.string().optional().describe('Command the uv package provides.'),
|
|
11
|
+
arguments: Strings.describe('Arguments always passed to the agent.'),
|
|
12
|
+
environment: z.record(z.string(), z.string()).describe('Environment variables for the agent.'),
|
|
13
|
+
resumeArguments: Strings.optional().describe('Arguments used when the agent is restarted in place (e.g. after an account switch) so it resumes the conversation.'),
|
|
14
|
+
})
|
|
15
|
+
.refine((h) => h.hostExecutable || h.npmPackage || h.uvPackage, 'needs hostExecutable, npmPackage or uvPackage')
|
|
16
|
+
.refine((h) => !h.uvPackage || h.uvBin, 'needs uvBin when uvPackage is set')
|
|
17
|
+
.refine((h) => !h.npmPackage || h.npmBin, 'needs npmBin when npmPackage is set');
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One readable line per problem: "sandbox.memoryMb: Too small: expected number to be >=2048". */
|
|
3
|
+
export declare const describeIssues: (error: z.ZodError) => string[];
|
|
4
|
+
/** JSON Schema documents for editors. The user config only lists what it changes, so nothing in it is required. */
|
|
5
|
+
export declare const jsonSchemas: () => Record<string, object>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Readable validation messages and the JSON Schema documents generated from the settings schemas.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Config, LocalOverrides } from './config.js';
|
|
4
|
+
/** One readable line per problem: "sandbox.memoryMb: Too small: expected number to be >=2048". */
|
|
5
|
+
export const describeIssues = (error) => error.issues.map((issue) => {
|
|
6
|
+
const at = issue.path.join('.');
|
|
7
|
+
if (issue.code === 'unrecognized_keys')
|
|
8
|
+
return issue.keys.map((k) => (at ? at + '.' : '') + k + ' is not allowed here').join('; ');
|
|
9
|
+
return (at || 'value') + ': ' + issue.message;
|
|
10
|
+
});
|
|
11
|
+
/** JSON Schema documents for editors. The user config only lists what it changes, so nothing in it is required. */
|
|
12
|
+
export const jsonSchemas = () => {
|
|
13
|
+
const dropRequired = (node) => {
|
|
14
|
+
if (Array.isArray(node))
|
|
15
|
+
return node.map(dropRequired);
|
|
16
|
+
if (typeof node !== 'object' || node === null)
|
|
17
|
+
return node;
|
|
18
|
+
return Object.fromEntries(Object.entries(node).filter(([k]) => k !== 'required').map(([k, v]) => [k, dropRequired(v)]));
|
|
19
|
+
};
|
|
20
|
+
const toSchema = (schema, title) => ({ title, ...z.toJSONSchema(schema, { io: 'input', unrepresentable: 'any' }) });
|
|
21
|
+
return {
|
|
22
|
+
'config.schema.json': dropRequired(toSchema(Config, 'windows-development-sandbox user config (~/.agent-sandbox/config.json)')),
|
|
23
|
+
'sandbox-config.schema.json': toSchema(LocalOverrides, 'windows-development-sandbox project config (.sandbox-config.json)'),
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Secrets: z.ZodObject<{
|
|
3
|
+
strip: z.ZodBoolean;
|
|
4
|
+
allow: z.ZodArray<z.ZodString>;
|
|
5
|
+
patterns: z.ZodArray<z.ZodString>;
|
|
6
|
+
warnFiles: z.ZodBoolean;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export declare const Attach: z.ZodObject<{
|
|
9
|
+
enabled: z.ZodBoolean;
|
|
10
|
+
reuseSession: z.ZodBoolean;
|
|
11
|
+
auto: z.ZodBoolean;
|
|
12
|
+
autoHide: z.ZodBoolean;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export declare const AgentCommands: z.ZodObject<{
|
|
15
|
+
enabled: z.ZodBoolean;
|
|
16
|
+
agents: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodArray<z.ZodString>]>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export declare const ClaudeProfile: z.ZodObject<{
|
|
19
|
+
enabled: z.ZodBoolean;
|
|
20
|
+
hostDir: z.ZodString;
|
|
21
|
+
include: z.ZodArray<z.ZodString>;
|
|
22
|
+
globalStateFile: z.ZodString;
|
|
23
|
+
copyCredentials: z.ZodBoolean;
|
|
24
|
+
overwrite: z.ZodBoolean;
|
|
25
|
+
syncHistory: z.ZodBoolean;
|
|
26
|
+
historyScope: z.ZodEnum<{
|
|
27
|
+
project: "project";
|
|
28
|
+
all: "all";
|
|
29
|
+
}>;
|
|
30
|
+
syncClaudeMem: z.ZodBoolean;
|
|
31
|
+
syncClaudeMemBack: z.ZodBoolean;
|
|
32
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// What is copied from this PC, and how the terminal attaches.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Name, Strings } from './common.js';
|
|
4
|
+
export const Secrets = z.strictObject({
|
|
5
|
+
strip: z.boolean().describe('Remove credentials from everything copied into the sandbox (your Claude settings.json "env" and credential helpers, MCP servers\' env, headers and arguments): AWS, Azure, Google Cloud, Cloudflare, hosting, CI, registries, payment, AI API keys, database URLs, anything named *_TOKEN / *_SECRET / *PASSWORD* / *_KEY or *PROD*, and values that look like keys.'),
|
|
6
|
+
allow: Strings.describe('Variable names that may go in anyway; * matches anything, e.g. ["AWS_REGION", "AWS_PROFILE", "MY_APP_*"].'),
|
|
7
|
+
patterns: Strings.describe('More variable names to treat as secrets; * matches anything, e.g. ["ACME_*", "*_INTERNAL_URL"].'),
|
|
8
|
+
warnFiles: z.boolean().describe('Warn at launch about files in the workspace that usually hold secrets (.env, *.pem, credentials.json, ...). The agent CAN read them: Windows Sandbox maps the whole folder.'),
|
|
9
|
+
});
|
|
10
|
+
export const Attach = z.strictObject({
|
|
11
|
+
enabled: z.boolean().describe('Allow sandbox claude --terminal / sandbox attach from this PC.'),
|
|
12
|
+
reuseSession: z.boolean().describe('sandbox claude -t in a running sandbox reattaches to this folder\'s session when no terminal on this PC is attached to it (--new always starts another).'),
|
|
13
|
+
auto: z.boolean().describe('Starting an agent attaches this terminal automatically, as if you passed -t (only in an interactive terminal).'),
|
|
14
|
+
autoHide: z.boolean().describe('Hide the Windows Sandbox window whenever this terminal attaches; it keeps running (sandbox show brings it back).'),
|
|
15
|
+
});
|
|
16
|
+
export const AgentCommands = z.strictObject({
|
|
17
|
+
enabled: z.boolean().describe('(Beta) Typing an agent\'s own command on this PC (claude, codex, ...) starts it in a hidden sandbox for the folder you are in and attaches that terminal. Adds one folder to the start of YOUR PATH; off removes it. SANDBOX_AGENT_DIRECT=1 runs the real agent instead.'),
|
|
18
|
+
agents: z.union([z.literal('auto'), z.array(Name)]).describe('"auto" = every agent installed on this PC, or a list of agent names, e.g. ["claude", "codex"].'),
|
|
19
|
+
});
|
|
20
|
+
export const ClaudeProfile = z.strictObject({
|
|
21
|
+
enabled: z.boolean().describe('Copy selected Claude settings from this PC into the sandbox.'),
|
|
22
|
+
hostDir: z.string().describe('Your Claude folder, or "auto" (~/.claude or CLAUDE_CONFIG_DIR).'),
|
|
23
|
+
include: z.array(z.string().regex(/^[A-Za-z0-9._-]+$/)).describe('Files and folders copied from it.'),
|
|
24
|
+
globalStateFile: z.string().describe('Your .claude.json, or "auto". Empty string = do not copy.'),
|
|
25
|
+
copyCredentials: z.boolean().describe('Copy your Claude LOGIN into the sandbox. Prefer sandbox account instead.'),
|
|
26
|
+
overwrite: z.boolean().describe('Refresh these settings from this PC on every launch.'),
|
|
27
|
+
syncHistory: z.boolean().describe('Bring conversation history in, and sync new history back (path-translated).'),
|
|
28
|
+
historyScope: z.enum(['project', 'all']).describe('Which history comes in: "project" = only the projects in this sandbox (other projects\' conversations, file backups and prompts stay on this PC), "all" = everything. Only this sandbox\'s projects ever sync back.'),
|
|
29
|
+
syncClaudeMem: z.boolean().describe('Bring claude-mem data into the sandbox (its settings and backups stay on this PC).'),
|
|
30
|
+
syncClaudeMemBack: z.boolean().describe('Also copy claude-mem\'s database back to this PC when the sandbox closes. Off by default: what is in it is loaded into every Claude session on this PC, so a compromised agent could plant instructions there.'),
|
|
31
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Projects: z.ZodObject<{
|
|
3
|
+
all: z.ZodBoolean;
|
|
4
|
+
exclude: z.ZodArray<z.ZodString>;
|
|
5
|
+
roots: z.ZodArray<z.ZodString>;
|
|
6
|
+
askToAddRoot: z.ZodBoolean;
|
|
7
|
+
declinedRoots: z.ZodArray<z.ZodString>;
|
|
8
|
+
wsbShare: z.ZodBoolean;
|
|
9
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Several projects in one running sandbox. User config only: these settings map folders of this PC into the sandbox,
|
|
2
|
+
// so a project's .sandbox-config.json can never set them (LocalOverrides has no `projects`).
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const Projects = z.strictObject({
|
|
5
|
+
all: z.boolean().describe('Map every project you have started before (and every folder in your roots) at every start, except those in exclude, so all of them open in the running sandbox without a restart. Every agent in the sandbox can then see all of them. Each one is still only set up when you first use it.'),
|
|
6
|
+
exclude: z.array(z.string().min(1)).describe('Projects left out when "all" is on (folders on this PC).'),
|
|
7
|
+
roots: z.array(z.string().min(1)).describe('Folders whose subfolders are your projects (e.g. "F:\\\\Code"), mapped read/write at every start. Any project inside one, including ones you create later, opens in the running sandbox at once, without a restart. Every agent in the sandbox can see all of them.'),
|
|
8
|
+
askToAddRoot: z.boolean().describe('When you start a project whose parent folder is not a root yet, ask once whether to add it.'),
|
|
9
|
+
declinedRoots: z.array(z.string().min(1)).describe('Parent folders you said no to (not asked again).'),
|
|
10
|
+
wsbShare: z.boolean().describe('On Windows 11 24H2+ with the Windows Sandbox command line (wsb), add other folders to the running sandbox with `wsb share` (untested). Otherwise starting a project outside every root offers a restart.'),
|
|
11
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GuestWorkspace: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"mirror">, z.ZodString]>;
|
|
3
|
+
export declare const Mapping: z.ZodObject<{
|
|
4
|
+
host: z.ZodString;
|
|
5
|
+
guest: z.ZodString;
|
|
6
|
+
readOnly: z.ZodBoolean;
|
|
7
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export declare const Sandbox: z.ZodObject<{
|
|
10
|
+
memoryMb: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodNumber]>;
|
|
11
|
+
maxMemoryMb: z.ZodNumber;
|
|
12
|
+
maxMemoryPercent: z.ZodNumber;
|
|
13
|
+
cpuLimit: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodNumber]>;
|
|
14
|
+
pageFileMb: z.ZodNumber;
|
|
15
|
+
reserveHostMb: z.ZodNumber;
|
|
16
|
+
vGpu: z.ZodBoolean;
|
|
17
|
+
networking: z.ZodBoolean;
|
|
18
|
+
clipboard: z.ZodBoolean;
|
|
19
|
+
audioInput: z.ZodBoolean;
|
|
20
|
+
videoInput: z.ZodBoolean;
|
|
21
|
+
printerRedirection: z.ZodBoolean;
|
|
22
|
+
protectedClient: z.ZodBoolean;
|
|
23
|
+
headless: z.ZodBoolean;
|
|
24
|
+
keepAwake: z.ZodBoolean;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
export declare const Network: z.ZodObject<{
|
|
27
|
+
blockPrivateRanges: z.ZodBoolean;
|
|
28
|
+
allowOnly: z.ZodArray<z.ZodString>;
|
|
29
|
+
blockHosts: z.ZodArray<z.ZodString>;
|
|
30
|
+
forwardPorts: z.ZodArray<z.ZodObject<{
|
|
31
|
+
pc: z.ZodNumber;
|
|
32
|
+
sandbox: z.ZodNumber;
|
|
33
|
+
}, z.core.$strict>>;
|
|
34
|
+
dns: z.ZodArray<z.ZodString>;
|
|
35
|
+
proxy: z.ZodString;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
export declare const Audit: z.ZodObject<{
|
|
38
|
+
enabled: z.ZodBoolean;
|
|
39
|
+
days: z.ZodNumber;
|
|
40
|
+
maxMb: z.ZodNumber;
|
|
41
|
+
processes: z.ZodBoolean;
|
|
42
|
+
files: z.ZodBoolean;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
export declare const WorkspaceFilter: z.ZodObject<{
|
|
45
|
+
enabled: z.ZodBoolean;
|
|
46
|
+
exclude: z.ZodArray<z.ZodString>;
|
|
47
|
+
include: z.ZodArray<z.ZodString>;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
export declare const Git: z.ZodObject<{
|
|
50
|
+
enabled: z.ZodBoolean;
|
|
51
|
+
access: z.ZodEnum<{
|
|
52
|
+
readonly: "readonly";
|
|
53
|
+
full: "full";
|
|
54
|
+
none: "none";
|
|
55
|
+
}>;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
export declare const Provisioning: z.ZodObject<{
|
|
58
|
+
copyFromHost: z.ZodBoolean;
|
|
59
|
+
fallbackToInstall: z.ZodBoolean;
|
|
60
|
+
refresh: z.ZodBoolean;
|
|
61
|
+
git: z.ZodObject<{
|
|
62
|
+
enabled: z.ZodBoolean;
|
|
63
|
+
access: z.ZodEnum<{
|
|
64
|
+
readonly: "readonly";
|
|
65
|
+
full: "full";
|
|
66
|
+
none: "none";
|
|
67
|
+
}>;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
terminal: z.ZodObject<{
|
|
70
|
+
enabled: z.ZodBoolean;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
conpty: z.ZodObject<{
|
|
73
|
+
enabled: z.ZodBoolean;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
export declare const Downloads: z.ZodObject<{
|
|
77
|
+
requireChecksum: z.ZodBoolean;
|
|
78
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// The sandbox machine, folders mapped into it, and what is provisioned (Git, terminal).
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { GitAccess, GuestPath, toggle } from './common.js';
|
|
4
|
+
export const GuestWorkspace = z.union([z.literal('auto'), z.literal('mirror'), GuestPath]).describe('Where the workspace appears inside the sandbox. "auto" = C:\\Workspace\\<folder name>. "mirror" = the same path as on this PC, so absolute paths in configs and build caches match (another drive letter such as F: is a subst drive onto C:\\Mirror\\F); paths the sandbox reserves (C:\\Users\\..., C:\\Program Files\\...) fall back to "auto".');
|
|
5
|
+
export const Mapping = z.strictObject({
|
|
6
|
+
host: z.string().min(1).describe('Folder on this PC (relative paths are relative to the config file).'),
|
|
7
|
+
guest: GuestPath.describe('Where it appears inside the sandbox, e.g. C:\\Assets, or on another drive letter (D: to Z:) such as F:\\SteamLibrary\\steamapps\\common\\Game: mapped to C:\\Mirror\\F\\... and shown as F: (subst) at boot.'),
|
|
8
|
+
readOnly: z.boolean().describe('true = the agent can only read it.'),
|
|
9
|
+
optional: z.boolean().optional().describe('true = skip it quietly when the host folder does not exist.'),
|
|
10
|
+
});
|
|
11
|
+
export const Sandbox = z.strictObject({
|
|
12
|
+
memoryMb: z.union([z.literal('auto'), z.number().int().min(2048)]).describe('Sandbox RAM in MB (>= 2048), or "auto": free RAM minus reserveHostMb, capped at maxMemoryMb.'),
|
|
13
|
+
maxMemoryMb: z.number().int().positive().describe('Upper limit for memoryMb "auto".'),
|
|
14
|
+
maxMemoryPercent: z.number().int().min(10).max(100).describe('memoryMb "auto" never takes more than this share of this PC\'s total RAM (percent).'),
|
|
15
|
+
cpuLimit: z.union([z.literal('none'), z.number().int().min(5).max(100)]).describe('Most of this PC\'s CPU the sandbox may use, in percent (5-100), e.g. 50 keeps half free for you; "none" = no cap (Windows Sandbox would take every processor). Covers everything this tool starts in the sandbox (agents, installs, builds, its terminal).'),
|
|
16
|
+
pageFileMb: z.number().int().min(0).max(262144).describe('Size of the sandbox\'s paging file in MB, created at full size when it starts so it never grows while builds run (8 GB of its disk always stays free). Windows Sandbox starts with about 1 GB: parallel builds then fail with "The paging file is too small", and Windows grows the file under load. 0 = leave Windows\' own.'),
|
|
17
|
+
reserveHostMb: z.number().int().nonnegative().describe('RAM always left for this PC when memoryMb is "auto".'),
|
|
18
|
+
vGpu: z.boolean().describe('Virtual GPU. Off by default: Microsoft notes it widens the sandbox attack surface.'),
|
|
19
|
+
networking: z.boolean().describe('Internet access. false is the only hard network isolation Windows Sandbox offers.'),
|
|
20
|
+
clipboard: z.boolean().describe('Shared clipboard between this PC and the sandbox.'),
|
|
21
|
+
audioInput: z.boolean().describe('Microphone access.'),
|
|
22
|
+
videoInput: z.boolean().describe('Camera access.'),
|
|
23
|
+
printerRedirection: z.boolean().describe('Printers from this PC.'),
|
|
24
|
+
protectedClient: z.boolean().describe('Run the sandbox window in Protected Client mode (recommended).'),
|
|
25
|
+
headless: z.boolean().describe('Hide the sandbox window (sbx-show brings it back). A headless sandbox shuts down when its last session ends.'),
|
|
26
|
+
keepAwake: z.boolean().describe('Keep this PC from sleeping while a sandbox runs, so agents left working overnight keep going (the screen may still turn off; closing a laptop lid still sleeps it).'),
|
|
27
|
+
});
|
|
28
|
+
const Port = z.number().int().min(1).max(65535);
|
|
29
|
+
const HostEntry = z.string().max(253).regex(/^(@developer|(\*\.)?([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+)$/, 'a host name like example.com, *.example.com, or @developer');
|
|
30
|
+
export const Network = z.strictObject({
|
|
31
|
+
blockPrivateRanges: z.boolean().describe('Block your LAN (10/8, 172.16/12, 192.168/16, SMB) from inside the sandbox.'),
|
|
32
|
+
allowOnly: z.array(HostEntry).describe('Only these hosts can be reached once the sandbox is set up (tools still download first). *.example.com covers its subdomains; @developer adds package registries, GitHub, toolchain downloads and the AI providers. Programs go through a proxy in the sandbox (HTTP_PROXY); anything else is blocked by its firewall. Empty = no limit.'),
|
|
33
|
+
blockHosts: z.array(z.string().max(253).regex(/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, 'a host name like telemetry.example.com')).describe('Never reachable from the sandbox, e.g. production servers or telemetry (each exact name; the sandbox\'s hosts file sends them nowhere).'),
|
|
34
|
+
forwardPorts: z.array(z.strictObject({
|
|
35
|
+
pc: Port.describe('The port on this PC (localhost only).'),
|
|
36
|
+
sandbox: Port.describe('The port inside the sandbox (a server there may listen on localhost only).'),
|
|
37
|
+
})).describe('Reach servers in the sandbox from this PC: http://localhost:<pc> here goes to <sandbox> inside, while it runs. Nothing else on your network can use them.'),
|
|
38
|
+
dns: z.array(z.string().regex(/^\d{1,3}(\.\d{1,3}){3}$/, 'an IPv4 address like 1.1.1.1')).describe('DNS servers for the sandbox instead of your network\'s, e.g. 1.1.1.1 and 9.9.9.9.'),
|
|
39
|
+
proxy: z.string().regex(/^(https?:\/\/[^\s]+)?$/, 'http://host:port').describe('An HTTP proxy the sandbox uses to reach the internet (HTTP_PROXY / HTTPS_PROXY for everything in it), e.g. http://proxy.corp:8080. Empty = none.'),
|
|
40
|
+
});
|
|
41
|
+
export const Audit = z.strictObject({
|
|
42
|
+
enabled: z.boolean().describe('Keep an audit log on this PC of what happened in your sandboxes: programs started (with their command lines), files changed in the project, sessions, and what the repo guard caught. The sandbox cannot change it. Read it with sandbox audit.'),
|
|
43
|
+
days: z.number().int().min(1).max(365).describe('Days the audit log is kept.'),
|
|
44
|
+
maxMb: z.number().int().min(5).max(5000).describe('Most space the audit log may take, in MB (older days go first). Days before today are compressed.'),
|
|
45
|
+
processes: z.boolean().describe('Record every program started in the sandbox with its command line (Windows process auditing; repeated runs are counted, not listed).'),
|
|
46
|
+
files: z.boolean().describe('Record the files changed in the project while the sandbox runs.'),
|
|
47
|
+
});
|
|
48
|
+
export const WorkspaceFilter = z.strictObject({
|
|
49
|
+
enabled: z.boolean().describe('Keep what your .gitignore lists (.env files, node_modules, build output ...) out of the sandbox. The sandbox works on a copy of the project without those files, kept in step with it both ways within about a second; what it creates that is ignored (its own node_modules, builds) stays in the sandbox. Git works as usual. Off = the project folder itself is mapped.'),
|
|
50
|
+
exclude: z.array(z.string().max(500)).describe('Also keep these out, as .gitignore patterns, e.g. secrets/, *.pem, data/private/.'),
|
|
51
|
+
include: z.array(z.string().max(500)).describe('Let these in although .gitignore lists them, e.g. .env.example, data/fixtures/.'),
|
|
52
|
+
});
|
|
53
|
+
export const Git = z.strictObject({ enabled: z.boolean().describe('Provide Git for Windows (and Git Bash, which Claude Code needs).'), access: GitAccess });
|
|
54
|
+
export const Provisioning = z.strictObject({
|
|
55
|
+
copyFromHost: z.boolean().describe('Copy Node, Git, nvm and the agent from this PC when they are installed here.'),
|
|
56
|
+
fallbackToInstall: z.boolean().describe('Download anything that cannot be copied from this PC.'),
|
|
57
|
+
refresh: z.boolean().describe('Re-copy / re-download everything on the next launch.'),
|
|
58
|
+
git: Git,
|
|
59
|
+
terminal: toggle('Windows Terminal as the sandbox window (downloaded once).'),
|
|
60
|
+
conpty: toggle('Agent sessions use Microsoft\'s newer pseudo console (conpty.dll, downloaded once) instead of the one built into Windows: no garbled screen after resizing, real scrollback for the mouse wheel. Off = the one built into Windows.'),
|
|
61
|
+
});
|
|
62
|
+
export const Downloads = z.strictObject({
|
|
63
|
+
requireChecksum: z.boolean().describe('Refuse any toolchain, database or tool download that has no published checksum (SHA-256/SHA-512) to verify it against. false = allow those, as before. Downloads that do have a published checksum are always verified. A project\'s .sandbox-config.json can only turn this on.'),
|
|
64
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Toolchains: z.ZodObject<{
|
|
3
|
+
node: z.ZodObject<{
|
|
4
|
+
version: z.ZodString;
|
|
5
|
+
extraVersions: z.ZodArray<z.ZodString>;
|
|
6
|
+
corepack: z.ZodBoolean;
|
|
7
|
+
volta: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
8
|
+
globalPackages: z.ZodArray<z.ZodString>;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
python: z.ZodObject<{
|
|
11
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
12
|
+
version: z.ZodString;
|
|
13
|
+
python2: z.ZodBoolean;
|
|
14
|
+
pyenv: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
15
|
+
tools: z.ZodArray<z.ZodString>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
rust: z.ZodObject<{
|
|
18
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
19
|
+
toolchain: z.ZodString;
|
|
20
|
+
host: z.ZodString;
|
|
21
|
+
components: z.ZodArray<z.ZodString>;
|
|
22
|
+
targets: z.ZodArray<z.ZodString>;
|
|
23
|
+
crates: z.ZodArray<z.ZodString>;
|
|
24
|
+
targetDir: z.ZodString;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
msvc: z.ZodObject<{
|
|
27
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
28
|
+
acceptLicense: z.ZodBoolean;
|
|
29
|
+
msvcVersion: z.ZodString;
|
|
30
|
+
sdkVersion: z.ZodString;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
cpp: z.ZodObject<{
|
|
33
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
34
|
+
flexBison: z.ZodBoolean;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
dotnet: z.ZodObject<{
|
|
37
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
38
|
+
channels: z.ZodArray<z.ZodString>;
|
|
39
|
+
tools: z.ZodArray<z.ZodString>;
|
|
40
|
+
workloads: z.ZodArray<z.ZodString>;
|
|
41
|
+
frameworkTargets: z.ZodArray<z.ZodString>;
|
|
42
|
+
netfx35: z.ZodBoolean;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
go: z.ZodObject<{
|
|
45
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
46
|
+
version: z.ZodString;
|
|
47
|
+
tools: z.ZodArray<z.ZodString>;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
java: z.ZodObject<{
|
|
50
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
51
|
+
version: z.ZodString;
|
|
52
|
+
maven: z.ZodBoolean;
|
|
53
|
+
gradle: z.ZodBoolean;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
ruby: z.ZodObject<{
|
|
56
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
57
|
+
version: z.ZodString;
|
|
58
|
+
gems: z.ZodArray<z.ZodString>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
php: z.ZodObject<{
|
|
61
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
62
|
+
version: z.ZodString;
|
|
63
|
+
composer: z.ZodBoolean;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
deno: z.ZodObject<{
|
|
66
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
pwsh: z.ZodObject<{
|
|
69
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
70
|
+
}, z.core.$strict>;
|
|
71
|
+
cli: z.ZodObject<{
|
|
72
|
+
gh: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
73
|
+
zstd: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
74
|
+
openssl: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
bun: z.ZodObject<{
|
|
77
|
+
enabled: z.ZodBoolean;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
uv: z.ZodObject<{
|
|
80
|
+
enabled: z.ZodBoolean;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
vcRuntime: z.ZodObject<{
|
|
83
|
+
enabled: z.ZodBoolean;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
mesa: z.ZodObject<{
|
|
86
|
+
enabled: z.ZodBoolean;
|
|
87
|
+
vulkan: z.ZodBoolean;
|
|
88
|
+
}, z.core.$strict>;
|
|
89
|
+
vscode: z.ZodObject<{
|
|
90
|
+
enabled: z.ZodBoolean;
|
|
91
|
+
setup: z.ZodBoolean;
|
|
92
|
+
recommended: z.ZodBoolean;
|
|
93
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
94
|
+
}, z.core.$strict>;
|
|
95
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
96
|
+
}, z.core.$strict>;
|