windows-development-sandbox 0.0.0-stage → 1.1.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/.sandbox-config.example.json +14 -0
- package/LICENSE +21 -0
- package/README.md +94 -2
- package/config.example.json +349 -0
- package/dist/api.d.ts +31 -0
- package/dist/api.js +31 -0
- package/dist/bin/agent-sandbox.d.ts +2 -0
- package/dist/bin/agent-sandbox.js +3 -0
- package/dist/bin/claude-host.d.ts +2 -0
- package/dist/bin/claude-host.js +5 -0
- package/dist/bin/claude-sbx.d.ts +2 -0
- package/dist/bin/claude-sbx.js +3 -0
- package/dist/bin/codex-sbx.d.ts +2 -0
- package/dist/bin/codex-sbx.js +3 -0
- package/dist/bin/gemini-sbx.d.ts +2 -0
- package/dist/bin/gemini-sbx.js +3 -0
- package/dist/bin/sandbox.d.ts +2 -0
- package/dist/bin/sandbox.js +4 -0
- package/dist/bin/sbx-hide.d.ts +2 -0
- package/dist/bin/sbx-hide.js +3 -0
- package/dist/bin/sbx-show.d.ts +2 -0
- package/dist/bin/sbx-show.js +3 -0
- package/dist/cli/args.d.ts +52 -0
- package/dist/cli/args.js +143 -0
- package/dist/cli/colors.d.ts +24 -0
- package/dist/cli/colors.js +42 -0
- package/dist/cli/commands/accounts.d.ts +2 -0
- package/dist/cli/commands/accounts.js +52 -0
- 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 +23 -0
- package/dist/cli/commands/context.js +57 -0
- package/dist/cli/commands/data/clean.d.ts +15 -0
- package/dist/cli/commands/data/clean.js +101 -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 +10 -0
- package/dist/cli/commands/index.js +10 -0
- package/dist/cli/commands/launch.d.ts +29 -0
- package/dist/cli/commands/launch.js +333 -0
- package/dist/cli/commands/maintenance.d.ts +8 -0
- package/dist/cli/commands/maintenance.js +154 -0
- 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/checks.js +170 -0
- package/dist/cli/commands/repair/finders.d.ts +30 -0
- 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 +12 -0
- package/dist/cli/commands/sessions.js +257 -0
- package/dist/cli/commands/setup/checks.d.ts +13 -0
- package/dist/cli/commands/setup/checks.js +71 -0
- package/dist/cli/commands/setup/facts.d.ts +31 -0
- 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 +20 -0
- package/dist/cli/index.js +121 -0
- package/dist/cli/manifest.d.ts +103 -0
- package/dist/cli/manifest.js +107 -0
- package/dist/cli/menu-multi.d.ts +12 -0
- package/dist/cli/menu-multi.js +82 -0
- package/dist/cli/menu.d.ts +14 -0
- package/dist/cli/menu.js +290 -0
- package/dist/cli/progress.d.ts +9 -0
- package/dist/cli/progress.js +49 -0
- package/dist/cli/settings/edit.d.ts +13 -0
- package/dist/cli/settings/edit.js +19 -0
- package/dist/cli/settings/index.d.ts +8 -0
- package/dist/cli/settings/index.js +131 -0
- package/dist/cli/settings/prompts.d.ts +7 -0
- package/dist/cli/settings/prompts.js +48 -0
- package/dist/cli/settings/schema.d.ts +33 -0
- package/dist/cli/settings/schema.js +29 -0
- package/dist/cli/validate.d.ts +17 -0
- package/dist/cli/validate.js +89 -0
- package/dist/core/config.d.ts +17 -0
- package/dist/core/config.js +106 -0
- package/dist/core/detect-databases.d.ts +15 -0
- package/dist/core/detect-databases.js +147 -0
- package/dist/core/detect-pwsh.d.ts +18 -0
- package/dist/core/detect-pwsh.js +111 -0
- package/dist/core/detect-toolchains.d.ts +30 -0
- package/dist/core/detect-toolchains.js +58 -0
- package/dist/core/disk.d.ts +16 -0
- package/dist/core/disk.js +55 -0
- package/dist/core/local-config.d.ts +20 -0
- package/dist/core/local-config.js +77 -0
- 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/common.d.ts +17 -0
- package/dist/core/schema/common.js +15 -0
- package/dist/core/schema/config.d.ts +594 -0
- package/dist/core/schema/config.js +63 -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 +27 -0
- package/dist/core/schema/profile.js +29 -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 +50 -0
- package/dist/core/schema/sandbox.js +36 -0
- package/dist/core/schema/toolchains.d.ts +93 -0
- package/dist/core/schema/toolchains.js +83 -0
- package/dist/core/schema.d.ts +6 -0
- package/dist/core/schema.js +8 -0
- package/dist/core/types.d.ts +190 -0
- package/dist/core/types.js +1 -0
- package/dist/core/util.d.ts +60 -0
- package/dist/core/util.js +154 -0
- package/dist/core/workspace.d.ts +18 -0
- package/dist/core/workspace.js +128 -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/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.d.ts +1 -0
- package/dist/guest/daemon.js +53 -0
- package/dist/guest/db.d.ts +1 -0
- package/dist/guest/db.js +75 -0
- package/dist/guest/env.d.ts +51 -0
- package/dist/guest/env.js +101 -0
- package/dist/guest/gitguard.d.ts +7 -0
- package/dist/guest/gitguard.js +60 -0
- package/dist/guest/gitrules.d.ts +2 -0
- package/dist/guest/gitrules.js +11 -0
- package/dist/guest/guide.d.ts +16 -0
- package/dist/guest/guide.js +69 -0
- package/dist/guest/helpers.d.ts +3 -0
- package/dist/guest/helpers.js +26 -0
- package/dist/guest/main.d.ts +1 -0
- package/dist/guest/main.js +130 -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 +22 -0
- package/dist/guest/ptyhost.js +36 -0
- package/dist/guest/setup/agents.d.ts +11 -0
- package/dist/guest/setup/agents.js +87 -0
- package/dist/guest/setup/claude.d.ts +21 -0
- package/dist/guest/setup/claude.js +146 -0
- package/dist/guest/setup/environment.d.ts +16 -0
- package/dist/guest/setup/environment.js +69 -0
- package/dist/guest/setup/hooks.d.ts +9 -0
- package/dist/guest/setup/hooks.js +50 -0
- package/dist/guest/setup/network.d.ts +10 -0
- package/dist/guest/setup/network.js +99 -0
- package/dist/guest/setup/policy.d.ts +3 -0
- package/dist/guest/setup/policy.js +18 -0
- package/dist/guest/setup/user.d.ts +7 -0
- package/dist/guest/setup/user.js +47 -0
- package/dist/guest/toolchains/catalogue.d.ts +55 -0
- package/dist/guest/toolchains/catalogue.js +31 -0
- package/dist/guest/toolchains/cli.d.ts +10 -0
- package/dist/guest/toolchains/cli.js +72 -0
- package/dist/guest/toolchains/common.d.ts +54 -0
- package/dist/guest/toolchains/common.js +147 -0
- package/dist/guest/toolchains/databases/dynamodb.d.ts +8 -0
- package/dist/guest/toolchains/databases/dynamodb.js +52 -0
- package/dist/guest/toolchains/databases/index.d.ts +6 -0
- 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.d.ts +3 -0
- package/dist/guest/toolchains/git.js +121 -0
- package/dist/guest/toolchains/go.d.ts +3 -0
- package/dist/guest/toolchains/go.js +33 -0
- package/dist/guest/toolchains/index.d.ts +17 -0
- package/dist/guest/toolchains/index.js +80 -0
- package/dist/guest/toolchains/java.d.ts +8 -0
- package/dist/guest/toolchains/java.js +96 -0
- package/dist/guest/toolchains/leftovers.d.ts +2 -0
- package/dist/guest/toolchains/leftovers.js +26 -0
- package/dist/guest/toolchains/managers.d.ts +16 -0
- package/dist/guest/toolchains/managers.js +84 -0
- package/dist/guest/toolchains/native/binstall.d.ts +7 -0
- package/dist/guest/toolchains/native/binstall.js +52 -0
- 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 +46 -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.d.ts +3 -0
- package/dist/guest/toolchains/node.js +152 -0
- package/dist/guest/toolchains/plan.d.ts +22 -0
- package/dist/guest/toolchains/plan.js +96 -0
- package/dist/guest/toolchains/pwsh.d.ts +4 -0
- package/dist/guest/toolchains/pwsh.js +14 -0
- package/dist/guest/toolchains/python.d.ts +3 -0
- package/dist/guest/toolchains/python.js +54 -0
- package/dist/guest/toolchains/runtimes.d.ts +19 -0
- package/dist/guest/toolchains/runtimes.js +38 -0
- 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/versions.d.ts +47 -0
- package/dist/guest/toolchains/versions.js +77 -0
- package/dist/guest/toolchains/vscode.d.ts +2 -0
- package/dist/guest/toolchains/vscode.js +53 -0
- package/dist/guest/view.d.ts +1 -0
- package/dist/guest/view.js +42 -0
- package/dist/host/accounts.d.ts +32 -0
- package/dist/host/accounts.js +128 -0
- 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 +69 -0
- package/dist/host/channel.d.ts +38 -0
- package/dist/host/channel.js +162 -0
- package/dist/host/claude-profile.d.ts +15 -0
- package/dist/host/claude-profile.js +107 -0
- package/dist/host/cleanup.d.ts +23 -0
- package/dist/host/cleanup.js +57 -0
- package/dist/host/database-plan.d.ts +12 -0
- package/dist/host/database-plan.js +52 -0
- package/dist/host/generate.d.ts +7 -0
- package/dist/host/generate.js +98 -0
- 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 +50 -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/pc-scan.d.ts +6 -0
- package/dist/host/pc-scan.js +37 -0
- package/dist/host/personalize.d.ts +10 -0
- package/dist/host/personalize.js +97 -0
- package/dist/host/platform.d.ts +19 -0
- package/dist/host/platform.js +126 -0
- package/dist/host/project-scan.d.ts +7 -0
- package/dist/host/project-scan.js +89 -0
- package/dist/host/projects.d.ts +100 -0
- package/dist/host/projects.js +147 -0
- package/dist/host/repo-guard.d.ts +36 -0
- package/dist/host/repo-guard.js +219 -0
- package/dist/host/secrets.d.ts +14 -0
- package/dist/host/secrets.js +133 -0
- package/dist/host/terminal.d.ts +32 -0
- package/dist/host/terminal.js +130 -0
- package/dist/host/test-guard.d.ts +6 -0
- package/dist/host/test-guard.js +15 -0
- package/dist/host/window.d.ts +4 -0
- package/dist/host/window.js +72 -0
- package/dist/host/wsb.d.ts +37 -0
- package/dist/host/wsb.js +101 -0
- package/dist/runtime/daemon.js +28494 -0
- package/dist/runtime/db.js +26387 -0
- package/dist/runtime/gitguard.js +84 -0
- package/dist/runtime/main.js +28622 -0
- package/dist/runtime/view.js +25841 -0
- 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/channel.test.d.ts +2 -0
- package/dist/selftest/channel.test.js +37 -0
- package/dist/selftest/cli.test.d.ts +2 -0
- package/dist/selftest/cli.test.js +118 -0
- 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 -0
- package/dist/selftest/config.test.js +38 -0
- package/dist/selftest/data.test.d.ts +2 -0
- package/dist/selftest/data.test.js +80 -0
- package/dist/selftest/detect.test.d.ts +2 -0
- package/dist/selftest/detect.test.js +58 -0
- package/dist/selftest/fixtures.d.ts +272 -0
- package/dist/selftest/fixtures.js +80 -0
- package/dist/selftest/generate.test.d.ts +2 -0
- package/dist/selftest/generate.test.js +63 -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 +51 -0
- package/dist/selftest/harness.js +77 -0
- 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 -0
- package/dist/selftest/index.js +155 -0
- 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-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 +107 -0
- package/dist/selftest/mirror.test.d.ts +2 -0
- package/dist/selftest/mirror.test.js +101 -0
- package/dist/selftest/network.test.d.ts +2 -0
- package/dist/selftest/network.test.js +28 -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 +63 -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 -0
- package/dist/selftest/setup.test.js +46 -0
- package/dist/selftest/suite.d.ts +13 -0
- package/dist/selftest/suite.js +1 -0
- package/dist/selftest/sync.test.d.ts +2 -0
- package/dist/selftest/sync.test.js +94 -0
- 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 +103 -0
- package/dist/selftest/workspace.test.d.ts +2 -0
- package/dist/selftest/workspace.test.js +53 -0
- package/dist/shared/download.d.ts +60 -0
- package/dist/shared/download.js +215 -0
- package/dist/shared/guest-paths.d.ts +30 -0
- package/dist/shared/guest-paths.js +61 -0
- package/dist/shared/netrules.d.ts +18 -0
- package/dist/shared/netrules.js +98 -0
- package/dist/shared/paths.d.ts +14 -0
- package/dist/shared/paths.js +28 -0
- package/dist/shared/projects.d.ts +53 -0
- package/dist/shared/projects.js +67 -0
- package/dist/shared/pty-client.d.ts +86 -0
- package/dist/shared/pty-client.js +227 -0
- package/dist/shared/rundir.d.ts +39 -0
- package/dist/shared/rundir.js +94 -0
- package/dist/shared/safe-remove.d.ts +10 -0
- package/dist/shared/safe-remove.js +66 -0
- package/dist/shared/schema.d.ts +527 -0
- package/dist/shared/schema.js +90 -0
- package/dist/shared/system.d.ts +15 -0
- package/dist/shared/system.js +19 -0
- package/dist/shared/test-guard.d.ts +4 -0
- package/dist/shared/test-guard.js +37 -0
- package/dist/sync/claude-mem.d.ts +8 -0
- package/dist/sync/claude-mem.js +79 -0
- package/dist/sync/history.d.ts +41 -0
- package/dist/sync/history.js +161 -0
- package/dist/sync/watcher.d.ts +21 -0
- package/dist/sync/watcher.js +135 -0
- package/hooks/post-agent/README.txt +1 -0
- package/hooks/pre-provision/README.txt +1 -0
- package/package.json +91 -4
- package/sandbox/bootstrap.ps1 +258 -0
- package/sandbox/cpucap.ps1 +51 -0
- package/sandbox/gitshim.cs +35 -0
- package/sandbox/logon.cmd +18 -0
- package/sandbox/openssl.cs +42 -0
- package/sandbox/ptyhost.cs +614 -0
- package/sandbox/trust.cmd +35 -0
- package/sandbox/vswhere.cs +83 -0
- package/schemas/config.schema.json +1161 -0
- package/schemas/sandbox-config.schema.json +968 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"harness": "claude",
|
|
3
|
+
"sandbox": { "memoryMb": "auto", "headless": false },
|
|
4
|
+
"provisioning": { "git": { "access": "readonly" } },
|
|
5
|
+
"toolchains": {
|
|
6
|
+
"node": { "version": "20", "extraVersions": ["18"] },
|
|
7
|
+
"python": { "version": "3.12" },
|
|
8
|
+
"rust": { "enabled": false }
|
|
9
|
+
},
|
|
10
|
+
"mappings": [
|
|
11
|
+
{ "host": "D:\\Assets\\textures", "guest": "C:\\Assets", "readOnly": true, "optional": true }
|
|
12
|
+
],
|
|
13
|
+
"scripts": []
|
|
14
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Josh DiDuca
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,95 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Windows Development Sandbox
|
|
4
|
+
|
|
5
|
+
**A throwaway Windows machine for every project, with or without an AI agent.**
|
|
6
|
+
|
|
7
|
+
[](https://github.com/JoshDiDuca/windows-development-sandbox/releases/latest)
|
|
8
|
+
[](https://github.com/JoshDiDuca/windows-development-sandbox/actions/workflows/ci.yml)
|
|
9
|
+

|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
Run it in a project folder and you get a clean [Windows Sandbox](https://learn.microsoft.com/windows/security/application-security/application-isolation/windows-sandbox/windows-sandbox-overview)
|
|
15
|
+
where that folder is the workspace, the tools and databases the project needs install themselves, and nothing else
|
|
16
|
+
on your PC is reachable. Close it and it's gone. Your project, tools, databases and logins are kept for next time.
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
irm https://github.com/JoshDiDuca/windows-development-sandbox/releases/latest/download/install.ps1 | iex
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
It checks your PC, offers to turn on Windows Sandbox, and installs everything. It uses your Node.js 20+ if you have it,
|
|
25
|
+
otherwise a private copy just for this tool. Nothing is installed system-wide.
|
|
26
|
+
Needs Windows 10/11 **Pro, Enterprise or Education**. Already have Node.js 20+? `npm install -g windows-development-sandbox`
|
|
27
|
+
works too. [Other ways to install](docs/install.md)
|
|
28
|
+
|
|
29
|
+
## Use
|
|
30
|
+
|
|
31
|
+
```powershell
|
|
32
|
+
cd C:\code\my-app
|
|
33
|
+
|
|
34
|
+
sandbox # menu: start an agent, a plain sandbox, diagnostics, cleanup ...
|
|
35
|
+
sandbox claude # Claude Code in a sandbox for this folder (or: claude-sandbox)
|
|
36
|
+
sandbox claude -t # ... in this terminal (Ctrl+] detaches, the session keeps running)
|
|
37
|
+
sandbox start # just the sandbox, no agent
|
|
38
|
+
sandbox opencode # any supported agent by name
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The first start downloads what the project needs (a few minutes, once). After that, starts take seconds.
|
|
42
|
+
|
|
43
|
+
> `claude-sbx`, `codex-sbx`, `gemini-sbx` and `agent-sandbox` are the old command names. They still work for now; use
|
|
44
|
+
> `sandbox <agent>` / `claude-sandbox` and `sandbox` instead.
|
|
45
|
+
|
|
46
|
+
## What you get
|
|
47
|
+
|
|
48
|
+
| | |
|
|
49
|
+
|---|---|
|
|
50
|
+
| **Safe by default** | The agent sees only your project folder. Credentials are stripped before anything is copied in, your LAN is blocked, and nothing the sandbox writes can run on your PC. |
|
|
51
|
+
| **Languages** | Node, Python, Rust, C/C++ (GCC or MSVC), .NET (incl. .NET Framework targeting), Go, Java, Ruby, PHP, Deno, Bun, PowerShell 7, with pnpm, yarn, Volta, uv, pyenv, Maven, Gradle, Composer, gh ... |
|
|
52
|
+
| **Databases** | PostgreSQL, MySQL, MongoDB, Redis and DynamoDB Local with a web UI, started when the project uses them, or any time with `--database` / `sandbox db` |
|
|
53
|
+
| **Agents** | Claude Code, Codex, Gemini, opencode, Qwen, Crush, Copilot, Kilo, Amp, Cline, Continue, Kimi, Aider, DeepSeek agents |
|
|
54
|
+
| **Smart** | Detects what the project needs from its files, respects version files, installs in parallel and reuses everything |
|
|
55
|
+
| **Several projects** | `sandbox claude` from another project joins the running sandbox: its own folder, tools, versions, databases and environment, set up on demand. Start several agents at once (`--session claude@A --session codex@B`, or the menu) and attach to any of them from any terminal |
|
|
56
|
+
| **Agent commands** (Beta) | `sandbox agent-commands on`: typing `claude`, `codex` ... in any folder starts it in a hidden sandbox and attaches your terminal |
|
|
57
|
+
| **Feels like home** | Your desktop look, Claude settings, MCP servers and conversation history come along; history syncs back |
|
|
58
|
+
|
|
59
|
+
## Commands
|
|
60
|
+
|
|
61
|
+
| Command | |
|
|
62
|
+
|---|---|
|
|
63
|
+
| `sandbox` | the interactive menu: repeat your last command, start agents, every option, and all settings |
|
|
64
|
+
| `sandbox <agent>`, `claude-sandbox` | start an agent; `-t` for this terminal, `--headless` for no window |
|
|
65
|
+
| `sandbox start` | the sandbox without an agent |
|
|
66
|
+
| `sandbox attach` / `sessions` / `status` | work with a running sandbox (this folder's project first) |
|
|
67
|
+
| `sandbox projects` | the projects a sandbox can open without a restart: roots, `all`, exclude |
|
|
68
|
+
| `sandbox db [start\|stop <name>]` | list, start or stop databases (`sbx-db` inside) |
|
|
69
|
+
| `sandbox exec -- <cmd>` | run a command inside |
|
|
70
|
+
| `sandbox agent-commands on\|off` | (Beta) make the agents installed on this PC start in a sandbox |
|
|
71
|
+
| `sandbox --version` | the installed version |
|
|
72
|
+
| `sandbox stop` / `hide` / `show` | shut down, hide or show the window |
|
|
73
|
+
| `sandbox data` / `data clean` | what's stored and how big, and freeing space |
|
|
74
|
+
| `sandbox setup` / `doctor` / `repair` | check this PC, see what will be installed, fix common problems |
|
|
75
|
+
|
|
76
|
+
All commands and options: [docs/commands.md](docs/commands.md)
|
|
77
|
+
|
|
78
|
+
## Known gaps
|
|
79
|
+
|
|
80
|
+
Adding a folder to a RUNNING sandbox needs Windows 11 24H2+ with the updated Windows Sandbox (`wsb share`, untested).
|
|
81
|
+
On older Windows: folders inside a mapped project root (`sandbox projects roots add <folder>`) open instantly;
|
|
82
|
+
anything else offers a restart (your files, tools, databases and logins are kept; the sessions can be reopened).
|
|
83
|
+
|
|
84
|
+
To get `wsb`: Settings > Windows Update, turn on "Get the latest updates as soon as they're available" (or use the
|
|
85
|
+
Windows 11 Installation Assistant), then update Windows Sandbox from the Microsoft Store. Check with `wsb --version`.
|
|
86
|
+
|
|
87
|
+
## Documentation
|
|
88
|
+
|
|
89
|
+
- [Install](docs/install.md): requirements, other ways to install, upgrading
|
|
90
|
+
- [Commands](docs/commands.md): every command and option, the menu, sessions and attaching
|
|
91
|
+
- [Tools and databases](docs/toolchains.md): languages, package managers, databases, agents, what is tested
|
|
92
|
+
- [Configuration](docs/configuration.md): settings, project files, paths, accounts, hooks
|
|
93
|
+
- [Security](docs/security.md): how your PC is protected, secrets, git access
|
|
94
|
+
- [Troubleshooting](docs/troubleshooting.md): common problems and fixes
|
|
95
|
+
- [Development](docs/development.md): building, testing, releasing (code layout in [CLAUDE.md](CLAUDE.md))
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./schemas/config.schema.json",
|
|
3
|
+
"defaultHarness": "claude",
|
|
4
|
+
"guestWorkspace": "auto",
|
|
5
|
+
"readOnly": false,
|
|
6
|
+
"mappings": [],
|
|
7
|
+
"sandbox": {
|
|
8
|
+
"memoryMb": "auto",
|
|
9
|
+
"maxMemoryMb": 32768,
|
|
10
|
+
"maxMemoryPercent": 80,
|
|
11
|
+
"cpuLimit": 80,
|
|
12
|
+
"reserveHostMb": 8192,
|
|
13
|
+
"vGpu": false,
|
|
14
|
+
"networking": true,
|
|
15
|
+
"clipboard": true,
|
|
16
|
+
"audioInput": false,
|
|
17
|
+
"videoInput": false,
|
|
18
|
+
"printerRedirection": false,
|
|
19
|
+
"protectedClient": true,
|
|
20
|
+
"headless": false
|
|
21
|
+
},
|
|
22
|
+
"storage": {
|
|
23
|
+
"root": "%LOCALAPPDATA%\\AgentSandbox",
|
|
24
|
+
"persistAgentState": true,
|
|
25
|
+
"dataName": "default"
|
|
26
|
+
},
|
|
27
|
+
"network": {
|
|
28
|
+
"blockPrivateRanges": true
|
|
29
|
+
},
|
|
30
|
+
"provisioning": {
|
|
31
|
+
"copyFromHost": true,
|
|
32
|
+
"fallbackToInstall": true,
|
|
33
|
+
"refresh": false,
|
|
34
|
+
"git": {
|
|
35
|
+
"enabled": true,
|
|
36
|
+
"access": "full"
|
|
37
|
+
},
|
|
38
|
+
"terminal": {
|
|
39
|
+
"enabled": true
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"downloads": {
|
|
43
|
+
"requireChecksum": false
|
|
44
|
+
},
|
|
45
|
+
"toolchains": {
|
|
46
|
+
"node": {
|
|
47
|
+
"version": "host",
|
|
48
|
+
"extraVersions": [],
|
|
49
|
+
"corepack": true,
|
|
50
|
+
"volta": "auto",
|
|
51
|
+
"globalPackages": []
|
|
52
|
+
},
|
|
53
|
+
"python": {
|
|
54
|
+
"enabled": "auto",
|
|
55
|
+
"version": "3",
|
|
56
|
+
"python2": true,
|
|
57
|
+
"pyenv": "auto",
|
|
58
|
+
"tools": []
|
|
59
|
+
},
|
|
60
|
+
"rust": {
|
|
61
|
+
"enabled": "auto",
|
|
62
|
+
"toolchain": "stable",
|
|
63
|
+
"host": "auto",
|
|
64
|
+
"components": [],
|
|
65
|
+
"targets": [],
|
|
66
|
+
"crates": [],
|
|
67
|
+
"targetDir": "separate"
|
|
68
|
+
},
|
|
69
|
+
"msvc": {
|
|
70
|
+
"enabled": "auto",
|
|
71
|
+
"acceptLicense": false,
|
|
72
|
+
"msvcVersion": "latest",
|
|
73
|
+
"sdkVersion": "latest"
|
|
74
|
+
},
|
|
75
|
+
"cpp": {
|
|
76
|
+
"enabled": "auto",
|
|
77
|
+
"flexBison": true
|
|
78
|
+
},
|
|
79
|
+
"dotnet": {
|
|
80
|
+
"enabled": "auto",
|
|
81
|
+
"channels": [
|
|
82
|
+
"LTS"
|
|
83
|
+
],
|
|
84
|
+
"tools": [],
|
|
85
|
+
"workloads": [],
|
|
86
|
+
"frameworkTargets": [
|
|
87
|
+
"net48",
|
|
88
|
+
"net472"
|
|
89
|
+
],
|
|
90
|
+
"netfx35": false
|
|
91
|
+
},
|
|
92
|
+
"go": {
|
|
93
|
+
"enabled": "auto",
|
|
94
|
+
"version": "stable",
|
|
95
|
+
"tools": []
|
|
96
|
+
},
|
|
97
|
+
"java": {
|
|
98
|
+
"enabled": "auto",
|
|
99
|
+
"version": "lts",
|
|
100
|
+
"maven": true,
|
|
101
|
+
"gradle": true
|
|
102
|
+
},
|
|
103
|
+
"ruby": {
|
|
104
|
+
"enabled": "auto",
|
|
105
|
+
"version": "3",
|
|
106
|
+
"gems": []
|
|
107
|
+
},
|
|
108
|
+
"php": {
|
|
109
|
+
"enabled": "auto",
|
|
110
|
+
"version": "8",
|
|
111
|
+
"composer": true
|
|
112
|
+
},
|
|
113
|
+
"deno": {
|
|
114
|
+
"enabled": "auto"
|
|
115
|
+
},
|
|
116
|
+
"pwsh": {
|
|
117
|
+
"enabled": "auto"
|
|
118
|
+
},
|
|
119
|
+
"cli": {
|
|
120
|
+
"gh": "auto",
|
|
121
|
+
"zstd": false,
|
|
122
|
+
"openssl": "auto"
|
|
123
|
+
},
|
|
124
|
+
"bun": {
|
|
125
|
+
"enabled": true
|
|
126
|
+
},
|
|
127
|
+
"uv": {
|
|
128
|
+
"enabled": true
|
|
129
|
+
},
|
|
130
|
+
"vcRuntime": {
|
|
131
|
+
"enabled": false
|
|
132
|
+
},
|
|
133
|
+
"mesa": {
|
|
134
|
+
"enabled": false,
|
|
135
|
+
"vulkan": false
|
|
136
|
+
},
|
|
137
|
+
"vscode": {
|
|
138
|
+
"enabled": true
|
|
139
|
+
},
|
|
140
|
+
"environment": {}
|
|
141
|
+
},
|
|
142
|
+
"databases": {
|
|
143
|
+
"postgres": {
|
|
144
|
+
"enabled": "auto",
|
|
145
|
+
"version": "latest",
|
|
146
|
+
"port": 5432
|
|
147
|
+
},
|
|
148
|
+
"mysql": {
|
|
149
|
+
"enabled": "auto",
|
|
150
|
+
"version": "lts",
|
|
151
|
+
"port": 3306
|
|
152
|
+
},
|
|
153
|
+
"mongodb": {
|
|
154
|
+
"enabled": "auto",
|
|
155
|
+
"version": "latest",
|
|
156
|
+
"port": 27017
|
|
157
|
+
},
|
|
158
|
+
"redis": {
|
|
159
|
+
"enabled": "auto",
|
|
160
|
+
"port": 6379
|
|
161
|
+
},
|
|
162
|
+
"dynamodb": {
|
|
163
|
+
"enabled": "auto",
|
|
164
|
+
"port": 8000,
|
|
165
|
+
"adminPort": 8001,
|
|
166
|
+
"admin": true
|
|
167
|
+
},
|
|
168
|
+
"sqlserver": {
|
|
169
|
+
"enabled": "auto"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"attach": {
|
|
173
|
+
"enabled": true,
|
|
174
|
+
"reuseSession": true,
|
|
175
|
+
"auto": false,
|
|
176
|
+
"autoHide": false
|
|
177
|
+
},
|
|
178
|
+
"agentCommands": {
|
|
179
|
+
"enabled": false,
|
|
180
|
+
"agents": "auto"
|
|
181
|
+
},
|
|
182
|
+
"secrets": {
|
|
183
|
+
"strip": true,
|
|
184
|
+
"allow": [],
|
|
185
|
+
"patterns": [],
|
|
186
|
+
"warnFiles": true
|
|
187
|
+
},
|
|
188
|
+
"personalization": {
|
|
189
|
+
"enabled": true
|
|
190
|
+
},
|
|
191
|
+
"claudeProfile": {
|
|
192
|
+
"enabled": true,
|
|
193
|
+
"hostDir": "auto",
|
|
194
|
+
"include": [
|
|
195
|
+
"settings.json",
|
|
196
|
+
"CLAUDE.md",
|
|
197
|
+
"commands",
|
|
198
|
+
"agents",
|
|
199
|
+
"skills",
|
|
200
|
+
"plugins"
|
|
201
|
+
],
|
|
202
|
+
"globalStateFile": "auto",
|
|
203
|
+
"copyCredentials": false,
|
|
204
|
+
"overwrite": true,
|
|
205
|
+
"syncHistory": true,
|
|
206
|
+
"syncClaudeMem": true
|
|
207
|
+
},
|
|
208
|
+
"harnesses": {
|
|
209
|
+
"claude": {
|
|
210
|
+
"hostExecutable": "claude.exe",
|
|
211
|
+
"hostDir": "auto",
|
|
212
|
+
"npmPackage": "@anthropic-ai/claude-code@latest",
|
|
213
|
+
"npmBin": "claude",
|
|
214
|
+
"arguments": [],
|
|
215
|
+
"environment": {
|
|
216
|
+
"DISABLE_AUTOUPDATER": "1"
|
|
217
|
+
},
|
|
218
|
+
"resumeArguments": [
|
|
219
|
+
"--continue"
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
"codex": {
|
|
223
|
+
"npmPackage": "@openai/codex@latest",
|
|
224
|
+
"npmBin": "codex",
|
|
225
|
+
"arguments": [],
|
|
226
|
+
"environment": {},
|
|
227
|
+
"resumeArguments": [
|
|
228
|
+
"resume",
|
|
229
|
+
"--last"
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
"gemini": {
|
|
233
|
+
"npmPackage": "@google/gemini-cli@latest",
|
|
234
|
+
"npmBin": "gemini",
|
|
235
|
+
"arguments": [],
|
|
236
|
+
"environment": {},
|
|
237
|
+
"resumeArguments": [
|
|
238
|
+
"--resume"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"opencode": {
|
|
242
|
+
"npmPackage": "opencode-ai@latest",
|
|
243
|
+
"npmBin": "opencode",
|
|
244
|
+
"arguments": [],
|
|
245
|
+
"environment": {},
|
|
246
|
+
"resumeArguments": [
|
|
247
|
+
"--continue"
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
"qwen": {
|
|
251
|
+
"npmPackage": "@qwen-code/qwen-code@latest",
|
|
252
|
+
"npmBin": "qwen",
|
|
253
|
+
"arguments": [],
|
|
254
|
+
"environment": {},
|
|
255
|
+
"resumeArguments": [
|
|
256
|
+
"--continue"
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"crush": {
|
|
260
|
+
"npmPackage": "@charmland/crush@latest",
|
|
261
|
+
"npmBin": "crush",
|
|
262
|
+
"arguments": [],
|
|
263
|
+
"environment": {},
|
|
264
|
+
"resumeArguments": [
|
|
265
|
+
"--continue"
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
"copilot": {
|
|
269
|
+
"npmPackage": "@github/copilot@latest",
|
|
270
|
+
"npmBin": "copilot",
|
|
271
|
+
"arguments": [],
|
|
272
|
+
"environment": {},
|
|
273
|
+
"resumeArguments": [
|
|
274
|
+
"--continue"
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
"kilo": {
|
|
278
|
+
"npmPackage": "@kilocode/cli@latest",
|
|
279
|
+
"npmBin": "kilo",
|
|
280
|
+
"arguments": [],
|
|
281
|
+
"environment": {},
|
|
282
|
+
"resumeArguments": [
|
|
283
|
+
"--continue"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"amp": {
|
|
287
|
+
"npmPackage": "@ampcode/cli@latest",
|
|
288
|
+
"npmBin": "amp",
|
|
289
|
+
"arguments": [],
|
|
290
|
+
"environment": {}
|
|
291
|
+
},
|
|
292
|
+
"cline": {
|
|
293
|
+
"npmPackage": "cline@latest",
|
|
294
|
+
"npmBin": "cline",
|
|
295
|
+
"arguments": [],
|
|
296
|
+
"environment": {}
|
|
297
|
+
},
|
|
298
|
+
"continue": {
|
|
299
|
+
"npmPackage": "@continuedev/cli@latest",
|
|
300
|
+
"npmBin": "cn",
|
|
301
|
+
"arguments": [],
|
|
302
|
+
"environment": {},
|
|
303
|
+
"resumeArguments": [
|
|
304
|
+
"--resume"
|
|
305
|
+
]
|
|
306
|
+
},
|
|
307
|
+
"kimi": {
|
|
308
|
+
"npmPackage": "@moonshot-ai/kimi-code@latest",
|
|
309
|
+
"npmBin": "kimi",
|
|
310
|
+
"arguments": [],
|
|
311
|
+
"environment": {},
|
|
312
|
+
"resumeArguments": [
|
|
313
|
+
"-c"
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
"reasonix": {
|
|
317
|
+
"npmPackage": "reasonix@latest",
|
|
318
|
+
"npmBin": "reasonix",
|
|
319
|
+
"arguments": [],
|
|
320
|
+
"environment": {}
|
|
321
|
+
},
|
|
322
|
+
"deepseek": {
|
|
323
|
+
"npmPackage": "codewhale@latest",
|
|
324
|
+
"npmBin": "codewhale",
|
|
325
|
+
"arguments": [],
|
|
326
|
+
"environment": {}
|
|
327
|
+
},
|
|
328
|
+
"aider": {
|
|
329
|
+
"uvPackage": "aider-chat",
|
|
330
|
+
"uvBin": "aider",
|
|
331
|
+
"arguments": [],
|
|
332
|
+
"environment": {},
|
|
333
|
+
"resumeArguments": [
|
|
334
|
+
"--restore-chat-history"
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"hooks": {
|
|
339
|
+
"failFast": false
|
|
340
|
+
},
|
|
341
|
+
"projects": {
|
|
342
|
+
"all": false,
|
|
343
|
+
"exclude": [],
|
|
344
|
+
"roots": [],
|
|
345
|
+
"askToAddRoot": true,
|
|
346
|
+
"declinedRoots": [],
|
|
347
|
+
"wsbShare": true
|
|
348
|
+
}
|
|
349
|
+
}
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { GuestResponse, SandboxStatus, SessionStatus } from './core/types.js';
|
|
2
|
+
export interface SandboxClient {
|
|
3
|
+
/** True while a Windows Sandbox is running. */
|
|
4
|
+
isRunning(): boolean;
|
|
5
|
+
/** Boot status written by the sandbox (null if it never started). */
|
|
6
|
+
status(): SandboxStatus | null;
|
|
7
|
+
/** Waits until provisioning is finished. */
|
|
8
|
+
ready(): Promise<SandboxStatus>;
|
|
9
|
+
sessions(): SessionStatus[];
|
|
10
|
+
/** Runs a command inside the sandbox; `cwd` is a guest path inside the workspace (default: the workspace). */
|
|
11
|
+
exec(command: string[], options?: {
|
|
12
|
+
cwd?: string;
|
|
13
|
+
timeoutSeconds?: number;
|
|
14
|
+
}): Promise<GuestResponse>;
|
|
15
|
+
/** Starts another agent session (its own terminal tab in the sandbox) and resolves once it is running. */
|
|
16
|
+
startSession(options?: {
|
|
17
|
+
harness?: string;
|
|
18
|
+
args?: string[];
|
|
19
|
+
cwd?: string;
|
|
20
|
+
}): Promise<SessionStatus>;
|
|
21
|
+
/** Restarts running sessions in place (they resume their conversation). */
|
|
22
|
+
restart(harness?: string): Promise<GuestResponse>;
|
|
23
|
+
ping(): Promise<GuestResponse>;
|
|
24
|
+
/** Bridges the current terminal to a session (interactive programs only). */
|
|
25
|
+
attach(sessionId?: string): Promise<number>;
|
|
26
|
+
}
|
|
27
|
+
export declare const sandbox: (options?: {
|
|
28
|
+
config?: string;
|
|
29
|
+
}) => SandboxClient;
|
|
30
|
+
export type { GuestResponse, SandboxStatus, SessionStatus } from './core/types.js';
|
|
31
|
+
export { main } from './cli/index.js';
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Programmatic API: `import { sandbox } from 'windows-development-sandbox'`. Same safety model as the CLI: the host only sends the
|
|
2
|
+
// request kinds the guest daemon accepts, and everything coming back is validated data.
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { attachTerminal } from './host/attach.js';
|
|
5
|
+
import { execInSandbox, pickSession, pingSandbox, requestSession, restartSessions, waitForReady, waitForSession } from './host/channel.js';
|
|
6
|
+
import { loadConfig } from './core/config.js';
|
|
7
|
+
import { listSessions, readSandboxStatus } from './shared/rundir.js';
|
|
8
|
+
import { isSandboxRunning } from './host/platform.js';
|
|
9
|
+
import { expandPath, fail } from './core/util.js';
|
|
10
|
+
export const sandbox = (options = {}) => {
|
|
11
|
+
const loaded = loadConfig(options.config);
|
|
12
|
+
const dataPath = path.join(expandPath(loaded.config.storage.root, loaded.base), 'data', loaded.config.storage.dataName);
|
|
13
|
+
const alive = isSandboxRunning;
|
|
14
|
+
// async: no sandbox is a rejected promise like every other failure, not a synchronous throw.
|
|
15
|
+
const ready = async () => (alive() ? waitForReady(dataPath, null, alive) : fail('No Windows Sandbox is running.', 'Start one first, e.g. sandbox claude --headless.'));
|
|
16
|
+
return {
|
|
17
|
+
isRunning: alive,
|
|
18
|
+
status: () => readSandboxStatus(dataPath),
|
|
19
|
+
ready,
|
|
20
|
+
sessions: () => listSessions(dataPath),
|
|
21
|
+
exec: async (command, o = {}) => execInSandbox(dataPath, command, o.cwd ?? (await ready()).guestWorkspace, o.timeoutSeconds ?? 600, alive),
|
|
22
|
+
startSession: async (o = {}) => {
|
|
23
|
+
const status = await ready();
|
|
24
|
+
return waitForSession(dataPath, requestSession(dataPath, o.harness ?? loaded.config.defaultHarness, o.args ?? [], o.cwd ?? status.guestWorkspace), alive);
|
|
25
|
+
},
|
|
26
|
+
restart: async (harness) => { await ready(); return restartSessions(dataPath, harness ?? null, alive); },
|
|
27
|
+
ping: async () => { await ready(); return pingSandbox(dataPath, alive); },
|
|
28
|
+
attach: async (sessionId) => { await ready(); return attachTerminal(pickSession(dataPath, sessionId)); },
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export { main } from './cli/index.js';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
export interface CliOptions {
|
|
3
|
+
command: string;
|
|
4
|
+
positionals: string[];
|
|
5
|
+
passthrough: string[];
|
|
6
|
+
config?: string;
|
|
7
|
+
workspace?: string;
|
|
8
|
+
harness?: string;
|
|
9
|
+
account?: string;
|
|
10
|
+
node?: string;
|
|
11
|
+
python?: string;
|
|
12
|
+
scripts: string[];
|
|
13
|
+
databases: string[];
|
|
14
|
+
headless?: boolean;
|
|
15
|
+
terminal: boolean;
|
|
16
|
+
newSession: boolean;
|
|
17
|
+
noAgent: boolean;
|
|
18
|
+
trustConfig: boolean;
|
|
19
|
+
noLocalConfig: boolean;
|
|
20
|
+
personal: boolean;
|
|
21
|
+
fromHost: boolean;
|
|
22
|
+
noRestart: boolean;
|
|
23
|
+
follow: boolean;
|
|
24
|
+
json: boolean;
|
|
25
|
+
yes: boolean;
|
|
26
|
+
timeout: number;
|
|
27
|
+
days: number;
|
|
28
|
+
/** restart: every session, not only this folder's project's. */
|
|
29
|
+
all: boolean;
|
|
30
|
+
/** launch --session <agent>@<folder> (repeatable): several sessions at once, folders made absolute. */
|
|
31
|
+
sessions: SessionWant[];
|
|
32
|
+
}
|
|
33
|
+
/** One session to start: an agent in a folder, with arguments of its own (after the ones given after --). */
|
|
34
|
+
export interface SessionWant {
|
|
35
|
+
harness: string;
|
|
36
|
+
folder: string;
|
|
37
|
+
args?: string[];
|
|
38
|
+
}
|
|
39
|
+
/** Splits a command line like a shell: "quoted words" and 'quoted words' stay together. */
|
|
40
|
+
export declare const splitArgs: (text: string) => string[];
|
|
41
|
+
/**
|
|
42
|
+
* `<agent>@<folder>` (the folder may contain '@': only the first one splits), `<agent>` alone = the current folder,
|
|
43
|
+
* and `|<arguments>` for that session's agent only ('|' cannot be in a Windows path). Folders become absolute against
|
|
44
|
+
* `cwd`. Pure; validate.ts checks that the agent and folder exist.
|
|
45
|
+
*/
|
|
46
|
+
export declare const parseSessionWant: (input: string, cwd?: string) => SessionWant;
|
|
47
|
+
/** This package's version (this file is dist/cli/args.js, two folders below package.json). */
|
|
48
|
+
export declare const packageVersion: () => string;
|
|
49
|
+
/** Every command, its options and help text, from manifest.ts. Actions only record what was parsed. */
|
|
50
|
+
export declare const buildProgram: (record: (name: string, cmd: Command) => void) => Command;
|
|
51
|
+
/** Parses argv into the command name and options. Throws commander errors for unknown commands/options. */
|
|
52
|
+
export declare const parseCli: (argv: string[], wrapper?: boolean) => CliOptions;
|