windows-development-sandbox 1.5.0 → 1.7.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/README.md +1 -0
- package/config.example.json +17 -1
- package/dist/cli/args.d.ts +13 -2
- package/dist/cli/args.js +95 -24
- package/dist/cli/commands/accounts.js +45 -17
- package/dist/cli/commands/context.d.ts +2 -0
- package/dist/cli/commands/context.js +9 -2
- package/dist/cli/commands/data/clean.js +32 -9
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/launch/add-root.d.ts +3 -2
- package/dist/cli/commands/launch/add-root.js +11 -10
- package/dist/cli/commands/launch/launch.js +57 -4
- package/dist/cli/commands/launch/prepare.js +3 -1
- package/dist/cli/commands/maintenance/audit.js +1 -1
- package/dist/cli/commands/maintenance/clean.d.ts +1 -1
- package/dist/cli/commands/maintenance/clean.js +17 -3
- package/dist/cli/commands/maintenance/config.d.ts +1 -1
- package/dist/cli/commands/maintenance/config.js +112 -10
- package/dist/cli/commands/maintenance/doctor.d.ts +1 -1
- package/dist/cli/commands/maintenance/doctor.js +2 -4
- package/dist/cli/commands/maintenance/migrate.d.ts +2 -1
- package/dist/cli/commands/maintenance/migrate.js +19 -4
- package/dist/cli/commands/maintenance/sync.js +2 -0
- package/dist/cli/commands/maintenance/update.d.ts +2 -0
- package/dist/cli/commands/maintenance/update.js +27 -4
- package/dist/cli/commands/projects/here.js +12 -7
- package/dist/cli/commands/projects/projects.js +26 -17
- package/dist/cli/commands/registry.js +7 -0
- package/dist/cli/commands/repair/checks/agents.d.ts +2 -0
- package/dist/cli/commands/repair/checks/agents.js +70 -0
- package/dist/cli/commands/repair/checks/common.d.ts +8 -0
- package/dist/cli/commands/repair/checks/common.js +22 -0
- package/dist/cli/commands/repair/checks/data.d.ts +2 -0
- package/dist/cli/commands/repair/checks/data.js +241 -0
- package/dist/cli/commands/repair/checks/index.d.ts +2 -0
- package/dist/cli/commands/repair/checks/index.js +20 -0
- package/dist/cli/commands/repair/checks/install.d.ts +5 -0
- package/dist/cli/commands/repair/checks/install.js +318 -0
- package/dist/cli/commands/repair/checks/machine.d.ts +2 -0
- package/dist/cli/commands/repair/checks/machine.js +232 -0
- package/dist/cli/commands/repair/checks/network.d.ts +6 -0
- package/dist/cli/commands/repair/checks/network.js +60 -0
- package/dist/cli/commands/repair/checks/pc.d.ts +4 -0
- package/dist/cli/commands/repair/checks/pc.js +55 -0
- package/dist/cli/commands/repair/checks/sandbox.d.ts +2 -0
- package/dist/cli/commands/repair/checks/sandbox.js +267 -0
- package/dist/cli/commands/repair/checks/settings.d.ts +2 -0
- package/dist/cli/commands/repair/checks/settings.js +169 -0
- package/dist/cli/commands/repair/checks/vpn.d.ts +2 -0
- package/dist/cli/commands/repair/checks/vpn.js +53 -0
- package/dist/cli/commands/repair/engine.d.ts +32 -0
- package/dist/cli/commands/repair/engine.js +127 -0
- package/dist/cli/commands/repair/env.d.ts +7 -0
- package/dist/cli/commands/repair/env.js +49 -0
- package/dist/cli/commands/repair/index.d.ts +1 -9
- package/dist/cli/commands/repair/index.js +2 -54
- package/dist/cli/commands/repair/log.d.ts +17 -0
- package/dist/cli/commands/repair/log.js +82 -0
- package/dist/cli/commands/repair/printer.d.ts +32 -0
- package/dist/cli/commands/repair/printer.js +132 -0
- package/dist/cli/commands/repair/run.d.ts +33 -0
- package/dist/cli/commands/repair/run.js +133 -0
- package/dist/cli/commands/repair/types.d.ts +97 -9
- package/dist/cli/commands/repair/types.js +11 -7
- package/dist/cli/commands/resume.js +2 -2
- package/dist/cli/commands/sessions/list.js +5 -2
- package/dist/cli/commands/sessions/status.d.ts +2 -0
- package/dist/cli/commands/sessions/status.js +27 -6
- package/dist/cli/commands/setup/index.d.ts +5 -0
- package/dist/cli/commands/setup/index.js +25 -1
- package/dist/cli/commands/storage/index.d.ts +2 -0
- package/dist/cli/commands/storage/index.js +2 -0
- package/dist/cli/commands/storage/offer.d.ts +3 -0
- package/dist/cli/commands/storage/offer.js +85 -0
- package/dist/cli/commands/storage/storage.d.ts +8 -0
- package/dist/cli/commands/storage/storage.js +171 -0
- package/dist/cli/commands/user-config.js +1 -1
- package/dist/cli/commands/vpn.d.ts +4 -0
- package/dist/cli/commands/vpn.js +75 -0
- package/dist/cli/commands/web.d.ts +4 -0
- package/dist/cli/commands/web.js +95 -0
- package/dist/cli/history.js +1 -1
- package/dist/cli/index.js +46 -3
- package/dist/cli/manifest.d.ts +303 -29
- package/dist/cli/manifest.js +173 -43
- package/dist/cli/menu/add-agent.d.ts +47 -0
- package/dist/cli/menu/add-agent.js +168 -0
- package/dist/cli/menu/apps.d.ts +31 -2
- package/dist/cli/menu/apps.js +44 -5
- package/dist/cli/menu/command-fields.d.ts +18 -0
- package/dist/cli/menu/command-fields.js +61 -0
- package/dist/cli/menu/command-form.d.ts +22 -0
- package/dist/cli/menu/command-form.js +169 -46
- package/dist/cli/menu/data-folder.d.ts +18 -0
- package/dist/cli/menu/data-folder.js +99 -0
- package/dist/cli/menu/menu.d.ts +1 -1
- package/dist/cli/menu/menu.js +11 -8
- package/dist/cli/menu/pages/accounts-page.js +55 -24
- package/dist/cli/menu/pages/agents-page.d.ts +66 -0
- package/dist/cli/menu/pages/agents-page.js +338 -0
- package/dist/cli/menu/pages/apps-page.js +1 -2
- package/dist/cli/menu/pages/list-page.d.ts +16 -3
- package/dist/cli/menu/pages/list-page.js +40 -8
- package/dist/cli/menu/pages/maintenance-page.d.ts +9 -0
- package/dist/cli/menu/pages/maintenance-page.js +161 -72
- package/dist/cli/menu/pages/sandbox-page.d.ts +3 -0
- package/dist/cli/menu/pages/sandbox-page.js +132 -43
- package/dist/cli/menu/pages/sessions-page.d.ts +4 -0
- package/dist/cli/menu/pages/sessions-page.js +41 -25
- package/dist/cli/menu/pages/settings-page.d.ts +8 -4
- package/dist/cli/menu/pages/settings-page.js +36 -13
- package/dist/cli/menu/settings/categories.d.ts +2 -0
- package/dist/cli/menu/settings/categories.js +19 -44
- package/dist/cli/menu/settings/collections/collection-editor.d.ts +7 -1
- package/dist/cli/menu/settings/collections/collection-editor.js +12 -8
- package/dist/cli/menu/settings/collections/map-editor.js +5 -1
- package/dist/cli/menu/settings/collections/object-list-editor.js +2 -2
- package/dist/cli/menu/settings/collections/object-map-editor.js +2 -2
- package/dist/cli/menu/settings/collections/string-list-editor.d.ts +11 -1
- package/dist/cli/menu/settings/collections/string-list-editor.js +23 -0
- package/dist/cli/menu/settings/index.d.ts +1 -1
- package/dist/cli/menu/settings/index.js +1 -1
- package/dist/cli/menu/settings/object-editor.d.ts +5 -1
- package/dist/cli/menu/settings/object-editor.js +15 -4
- package/dist/cli/menu/settings/path-kind.d.ts +20 -0
- package/dist/cli/menu/settings/path-kind.js +44 -0
- package/dist/cli/menu/settings/schema-node.d.ts +9 -0
- package/dist/cli/menu/settings/schema-node.js +26 -0
- package/dist/cli/menu/settings/value-editor.d.ts +5 -0
- package/dist/cli/menu/settings/value-editor.js +51 -18
- package/dist/cli/menu/several.js +7 -5
- package/dist/cli/menu/shell.d.ts +37 -10
- package/dist/cli/menu/shell.js +90 -10
- package/dist/cli/menu/vpn-login.d.ts +16 -0
- package/dist/cli/menu/vpn-login.js +66 -0
- package/dist/cli/output/print.d.ts +2 -0
- package/dist/cli/output/print.js +8 -1
- package/dist/cli/services/accounts-service.d.ts +2 -0
- package/dist/cli/services/accounts-service.js +2 -2
- package/dist/cli/services/health-service.d.ts +0 -6
- package/dist/cli/services/health-service.js +5 -42
- package/dist/cli/services/index.d.ts +3 -1
- package/dist/cli/services/index.js +3 -1
- package/dist/cli/services/migrate-service.js +1 -1
- package/dist/cli/services/update-service.d.ts +2 -0
- package/dist/cli/services/update-service.js +13 -6
- package/dist/cli/services/vpn-service.d.ts +28 -0
- package/dist/cli/services/vpn-service.js +46 -0
- package/dist/cli/services/web-service.d.ts +22 -0
- package/dist/cli/services/web-service.js +111 -0
- package/dist/cli/tui/app.d.ts +6 -3
- package/dist/cli/tui/app.js +12 -5
- package/dist/cli/tui/dialogs/path-listing.d.ts +43 -0
- package/dist/cli/tui/dialogs/path-listing.js +127 -0
- package/dist/cli/tui/dialogs/path-picker.d.ts +67 -0
- package/dist/cli/tui/dialogs/path-picker.js +423 -0
- package/dist/cli/tui/dialogs/text-screen.d.ts +6 -0
- package/dist/cli/tui/dialogs/text-screen.js +10 -3
- package/dist/cli/tui/frame.d.ts +7 -10
- package/dist/cli/tui/frame.js +19 -10
- package/dist/cli/tui/index.d.ts +4 -3
- package/dist/cli/tui/index.js +2 -1
- package/dist/cli/tui/list/list-screen.d.ts +14 -2
- package/dist/cli/tui/list/list-screen.js +68 -32
- package/dist/cli/tui/list/list-types.d.ts +8 -4
- package/dist/cli/tui/nav.d.ts +29 -0
- package/dist/cli/tui/nav.js +67 -0
- package/dist/cli/validate.d.ts +1 -1
- package/dist/cli/validate.js +3 -3
- package/dist/cli/version.d.ts +2 -0
- package/dist/cli/version.js +11 -0
- package/dist/core/config/defaults.js +5 -1
- package/dist/core/config/loader.js +12 -2
- package/dist/core/local-config/overrides.js +1 -0
- package/dist/core/prompt.d.ts +19 -0
- package/dist/core/prompt.js +43 -3
- package/dist/core/schema/common.d.ts +6 -0
- package/dist/core/schema/common.js +8 -0
- package/dist/core/schema/config.d.ts +23 -0
- package/dist/core/schema/config.js +10 -1
- package/dist/core/schema/harness.d.ts +1 -0
- package/dist/core/schema/harness.js +8 -2
- package/dist/core/schema/index.d.ts +3 -1
- package/dist/core/schema/index.js +3 -1
- package/dist/core/schema/profile.d.ts +1 -0
- package/dist/core/schema/profile.js +3 -0
- package/dist/core/schema/redact.d.ts +13 -0
- package/dist/core/schema/redact.js +75 -0
- package/dist/core/schema/sandbox.js +1 -0
- package/dist/core/schema/vpn.d.ts +17 -0
- package/dist/core/schema/vpn.js +22 -0
- package/dist/core/schema/web.d.ts +6 -0
- package/dist/core/schema/web.js +14 -0
- package/dist/core/types.d.ts +26 -0
- package/dist/guest/agents/agent-files.d.ts +49 -0
- package/dist/guest/agents/agent-files.js +63 -0
- package/dist/guest/agents/agent-installer.js +2 -9
- package/dist/guest/agents/local-state.d.ts +12 -0
- package/dist/guest/agents/local-state.js +198 -0
- package/dist/guest/agents/sbx-agent.d.ts +2 -0
- package/dist/guest/agents/sbx-agent.js +35 -0
- package/dist/guest/boot/boot.d.ts +4 -0
- package/dist/guest/boot/boot.js +50 -11
- package/dist/guest/daemon/daemon.js +4 -1
- package/dist/guest/daemon/exec.js +2 -1
- package/dist/guest/daemon/idle-shutdown.js +2 -0
- package/dist/guest/daemon/sessions.js +4 -1
- package/dist/guest/entries/agent.d.ts +1 -0
- package/dist/guest/entries/agent.js +10 -0
- package/dist/guest/entries/daemon.js +2 -0
- package/dist/guest/runtime/csc.d.ts +1 -0
- package/dist/guest/runtime/csc.js +1 -0
- package/dist/guest/runtime/secrets.d.ts +12 -0
- package/dist/guest/runtime/secrets.js +63 -0
- package/dist/guest/setup/claude-profile.d.ts +2 -1
- package/dist/guest/setup/claude-profile.js +12 -1
- package/dist/guest/setup/environment.d.ts +6 -0
- package/dist/guest/setup/environment.js +56 -6
- package/dist/guest/setup/path-plan.d.ts +32 -0
- package/dist/guest/setup/path-plan.js +67 -0
- package/dist/guest/setup/shell-path.d.ts +1 -0
- package/dist/guest/setup/shell-path.js +22 -0
- package/dist/guest/toolchains/languages/python.js +1 -1
- package/dist/guest/toolchains/runtimes.js +2 -2
- package/dist/guest/vpn/index.d.ts +1 -0
- package/dist/guest/vpn/index.js +1 -0
- package/dist/guest/vpn/openvpn.d.ts +9 -0
- package/dist/guest/vpn/openvpn.js +47 -0
- package/dist/guest/vpn/tunnel.d.ts +17 -0
- package/dist/guest/vpn/tunnel.js +78 -0
- package/dist/guest/vpn/vpn.d.ts +6 -0
- package/dist/guest/vpn/vpn.js +126 -0
- package/dist/host/channel/attach.d.ts +3 -1
- package/dist/host/channel/attach.js +1 -1
- package/dist/host/channel/channel.d.ts +7 -0
- package/dist/host/channel/channel.js +26 -2
- package/dist/host/health/acl-read.d.ts +17 -0
- package/dist/host/health/acl-read.js +45 -0
- package/dist/host/health/config-backup.d.ts +11 -0
- package/dist/host/health/config-backup.js +73 -0
- package/dist/host/health/index.d.ts +6 -0
- package/dist/host/health/index.js +7 -0
- package/dist/host/health/install-state.d.ts +33 -0
- package/dist/host/health/install-state.js +110 -0
- package/dist/host/health/path-copies.d.ts +32 -0
- package/dist/host/health/path-copies.js +82 -0
- package/dist/host/health/stale.d.ts +45 -0
- package/dist/host/health/stale.js +120 -0
- package/dist/host/health/system.d.ts +37 -0
- package/dist/host/health/system.js +87 -0
- package/dist/host/install/copies.d.ts +13 -0
- package/dist/host/install/copies.js +63 -0
- package/dist/host/install/index.d.ts +1 -0
- package/dist/host/install/index.js +1 -0
- package/dist/host/launch/generate.js +25 -1
- package/dist/host/launch/session-file.js +4 -1
- package/dist/host/launch/stage.js +1 -1
- package/dist/host/migrate/backup.js +3 -0
- package/dist/host/migrate/migrations/config-file.d.ts +2 -0
- package/dist/host/migrate/migrations/config-file.js +7 -0
- package/dist/host/migrate/migrations/follow-machine-storage.js +9 -1
- package/dist/host/migrate/migrations/pin-storage-root.d.ts +4 -0
- package/dist/host/migrate/migrations/pin-storage-root.js +46 -0
- package/dist/host/migrate/migrations/unpin-config-defaults.js +4 -1
- package/dist/host/migrate/registry.js +2 -1
- package/dist/host/profile/accounts.d.ts +25 -1
- package/dist/host/profile/accounts.js +96 -13
- package/dist/host/profile/agent-accounts.d.ts +5 -1
- package/dist/host/profile/agent-accounts.js +35 -5
- package/dist/host/profile/index.d.ts +2 -1
- package/dist/host/profile/index.js +1 -0
- package/dist/host/profile/plugin-share.d.ts +26 -0
- package/dist/host/profile/plugin-share.js +146 -0
- package/dist/host/projects/join.d.ts +7 -1
- package/dist/host/projects/join.js +21 -4
- package/dist/host/projects/registry.d.ts +16 -10
- package/dist/host/projects/registry.js +74 -6
- package/dist/host/sandbox/platform.d.ts +2 -0
- package/dist/host/sandbox/platform.js +21 -2
- package/dist/host/secrets/index.d.ts +2 -0
- package/dist/host/secrets/index.js +2 -0
- package/dist/host/secrets/launch-secrets.d.ts +17 -0
- package/dist/host/secrets/launch-secrets.js +93 -0
- package/dist/host/secrets/secret-store.d.ts +25 -0
- package/dist/host/secrets/secret-store.js +89 -0
- package/dist/host/sharing/acl.d.ts +16 -2
- package/dist/host/sharing/acl.js +35 -10
- package/dist/host/sharing/current.js +11 -2
- package/dist/host/sharing/doctor.d.ts +2 -0
- package/dist/host/sharing/doctor.js +44 -0
- package/dist/host/sharing/group-access.d.ts +6 -0
- package/dist/host/sharing/group-access.js +24 -0
- package/dist/host/sharing/index.d.ts +2 -1
- package/dist/host/sharing/index.js +2 -1
- package/dist/host/sharing/lifecycle.d.ts +8 -2
- package/dist/host/sharing/lifecycle.js +16 -7
- package/dist/host/storage/cleanup.d.ts +2 -0
- package/dist/host/storage/cleanup.js +2 -1
- package/dist/host/storage/history.d.ts +21 -0
- package/dist/host/storage/history.js +49 -0
- package/dist/host/storage/index.d.ts +4 -0
- package/dist/host/storage/index.js +4 -0
- package/dist/host/storage/move.d.ts +95 -0
- package/dist/host/storage/move.js +384 -0
- package/dist/host/storage/offer.d.ts +11 -0
- package/dist/host/storage/offer.js +36 -0
- package/dist/host/storage/root.d.ts +18 -0
- package/dist/host/storage/root.js +77 -0
- package/dist/host/tools/windows-terminal.d.ts +2 -0
- package/dist/host/tools/windows-terminal.js +23 -5
- package/dist/host/update/index.d.ts +1 -1
- package/dist/host/update/index.js +1 -1
- package/dist/host/update/notice.d.ts +2 -0
- package/dist/host/update/notice.js +13 -1
- package/dist/host/update/update-state.d.ts +6 -0
- package/dist/host/update/update-state.js +2 -0
- package/dist/host/update/updater.d.ts +19 -0
- package/dist/host/update/updater.js +88 -12
- package/dist/host/vpn/index.d.ts +4 -0
- package/dist/host/vpn/index.js +4 -0
- package/dist/host/vpn/login.d.ts +24 -0
- package/dist/host/vpn/login.js +79 -0
- package/dist/host/vpn/nordvpn.d.ts +21 -0
- package/dist/host/vpn/nordvpn.js +77 -0
- package/dist/host/vpn/prepare.d.ts +17 -0
- package/dist/host/vpn/prepare.js +77 -0
- package/dist/host/vpn/status.d.ts +12 -0
- package/dist/host/vpn/status.js +53 -0
- package/dist/host/web/auth.d.ts +38 -0
- package/dist/host/web/auth.js +96 -0
- package/dist/host/web/backend.d.ts +14 -0
- package/dist/host/web/backend.js +1 -0
- package/dist/host/web/bridge.d.ts +27 -0
- package/dist/host/web/bridge.js +144 -0
- package/dist/host/web/browser.d.ts +1 -0
- package/dist/host/web/browser.js +10 -0
- package/dist/host/web/control.d.ts +17 -0
- package/dist/host/web/control.js +67 -0
- package/dist/host/web/index.d.ts +9 -0
- package/dist/host/web/index.js +8 -0
- package/dist/host/web/runner.d.ts +14 -0
- package/dist/host/web/runner.js +45 -0
- package/dist/host/web/server.d.ts +40 -0
- package/dist/host/web/server.js +218 -0
- package/dist/host/web/state.d.ts +20 -0
- package/dist/host/web/state.js +41 -0
- package/dist/host/web/static-files.d.ts +13 -0
- package/dist/host/web/static-files.js +57 -0
- package/dist/runtime/agent.js +27614 -0
- package/dist/runtime/daemon.js +1012 -618
- package/dist/runtime/db.js +236 -106
- package/dist/runtime/main.js +1093 -250
- package/dist/runtime/netproxy.js +102 -3
- package/dist/runtime/view.js +102 -3
- package/dist/selftest/accounts.test.js +40 -0
- package/dist/selftest/agent-paths.test.d.ts +2 -0
- package/dist/selftest/agent-paths.test.js +115 -0
- package/dist/selftest/channel.test.js +5 -0
- package/dist/selftest/cli.test.js +34 -4
- package/dist/selftest/credentials.test.d.ts +2 -0
- package/dist/selftest/credentials.test.js +198 -0
- package/dist/selftest/generate.test.js +1 -1
- package/dist/selftest/health.test.d.ts +2 -0
- package/dist/selftest/health.test.js +470 -0
- package/dist/selftest/host-sim.test.js +2 -0
- package/dist/selftest/index.js +19 -0
- package/dist/selftest/layout.test.js +2 -0
- package/dist/selftest/menu-screens.d.ts +7 -0
- package/dist/selftest/menu-screens.js +65 -16
- package/dist/selftest/menu.test.js +574 -21
- package/dist/selftest/migrate.test.js +1 -1
- package/dist/selftest/personalization.test.js +3 -1
- package/dist/selftest/projects.test.js +39 -1
- package/dist/selftest/shared-use.test.js +64 -2
- package/dist/selftest/sharing.test.js +50 -1
- package/dist/selftest/storage.test.d.ts +2 -0
- package/dist/selftest/storage.test.js +363 -0
- package/dist/selftest/support/fixtures.d.ts +14 -0
- package/dist/selftest/support/releases.js +1 -1
- package/dist/selftest/toolchains.test.js +21 -0
- package/dist/selftest/update-service.test.js +87 -3
- package/dist/selftest/vpn.test.d.ts +2 -0
- package/dist/selftest/vpn.test.js +279 -0
- package/dist/selftest/web.test.d.ts +2 -0
- package/dist/selftest/web.test.js +304 -0
- package/dist/shared/apps/catalogue.js +31 -0
- package/dist/shared/channel/index.d.ts +1 -0
- package/dist/shared/channel/index.js +1 -0
- package/dist/shared/channel/run-dir.d.ts +6 -1
- package/dist/shared/channel/run-dir.js +12 -1
- package/dist/shared/channel/schema.d.ts +19 -0
- package/dist/shared/channel/schema.js +11 -0
- package/dist/shared/channel/secrets.d.ts +28 -0
- package/dist/shared/channel/secrets.js +44 -0
- package/dist/shared/vpn/download.d.ts +13 -0
- package/dist/shared/vpn/download.js +14 -0
- package/dist/shared/vpn/kill-switch.d.ts +18 -0
- package/dist/shared/vpn/kill-switch.js +81 -0
- package/dist/shared/vpn/ovpn.d.ts +23 -0
- package/dist/shared/vpn/ovpn.js +244 -0
- package/dist/shared/web/index.d.ts +1 -0
- package/dist/shared/web/index.js +1 -0
- package/dist/shared/web/protocol.d.ts +61 -0
- package/dist/shared/web/protocol.js +35 -0
- package/dist/sync/sync-cycle.js +5 -1
- package/dist/sync/sync-state.d.ts +1 -0
- package/dist/sync/sync-state.js +1 -0
- package/dist/sync/watcher.js +10 -0
- package/dist/web/index.html +13 -0
- package/dist/web/main-CXESL347.js +45 -0
- package/dist/web/main-VLR7DVQ4.css +1 -0
- package/native/csharp/FolderSecurity.cs +29 -0
- package/native/scripts/protect-data.ps1 +29 -0
- package/native/scripts/read-folder-sddl.ps1 +10 -0
- package/native/scripts/set-folder-access.ps1 +49 -7
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +22 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +530 -0
- package/node_modules/ws/lib/receiver.js +743 -0
- package/node_modules/ws/lib/sender.js +607 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +562 -0
- package/node_modules/ws/lib/websocket.js +1421 -0
- package/node_modules/ws/package.json +74 -0
- package/node_modules/ws/wrapper.mjs +21 -0
- package/package.json +15 -5
- package/sandbox/csharp/EnvBroadcast.cs +33 -0
- package/sandbox/csharp/PathSync.cs +90 -0
- package/sandbox/scripts/install-shell-path.ps1 +73 -0
- package/sandbox/scripts/set-machine-environment.ps1 +37 -4
- package/schemas/config.schema.json +79 -4
- package/schemas/sandbox-config.schema.json +14 -1
- package/dist/cli/commands/repair/checks.d.ts +0 -2
- package/dist/cli/commands/repair/checks.js +0 -246
- package/dist/cli/menu/pages/start-page.d.ts +0 -43
- package/dist/cli/menu/pages/start-page.js +0 -192
- package/dist/cli/tui/tab-bar.d.ts +0 -9
- package/dist/cli/tui/tab-bar.js +0 -33
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ws",
|
|
3
|
+
"version": "8.22.0",
|
|
4
|
+
"description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"HyBi",
|
|
7
|
+
"Push",
|
|
8
|
+
"RFC-6455",
|
|
9
|
+
"WebSocket",
|
|
10
|
+
"WebSockets",
|
|
11
|
+
"real-time"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/websockets/ws",
|
|
14
|
+
"bugs": "https://github.com/websockets/ws/issues",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/websockets/ws.git"
|
|
18
|
+
},
|
|
19
|
+
"author": "Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"main": "index.js",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"browser": "./browser.js",
|
|
25
|
+
"import": "./wrapper.mjs",
|
|
26
|
+
"require": "./index.js"
|
|
27
|
+
},
|
|
28
|
+
"./package.json": "./package.json"
|
|
29
|
+
},
|
|
30
|
+
"browser": "browser.js",
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=10.0.0"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"browser.js",
|
|
36
|
+
"index.js",
|
|
37
|
+
"lib/*.js",
|
|
38
|
+
"wrapper.mjs"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"test": "nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js",
|
|
42
|
+
"integration": "mocha --throw-deprecation test/*.integration.js",
|
|
43
|
+
"lint": "eslint . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"bufferutil": "^4.0.1",
|
|
47
|
+
"utf-8-validate": ">=5.0.2"
|
|
48
|
+
},
|
|
49
|
+
"peerDependenciesMeta": {
|
|
50
|
+
"bufferutil": {
|
|
51
|
+
"optional": true
|
|
52
|
+
},
|
|
53
|
+
"utf-8-validate": {
|
|
54
|
+
"optional": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@eslint/js": "^10.0.1",
|
|
59
|
+
"benchmark": "^2.1.4",
|
|
60
|
+
"bufferutil": "^4.0.1",
|
|
61
|
+
"eslint": "^10.0.1",
|
|
62
|
+
"eslint-config-prettier": "^10.0.1",
|
|
63
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
64
|
+
"globals": "^17.0.0",
|
|
65
|
+
"mocha": "^8.4.0",
|
|
66
|
+
"nyc": "^15.0.0",
|
|
67
|
+
"prettier": "^3.0.0",
|
|
68
|
+
"utf-8-validate": "^6.0.0"
|
|
69
|
+
},
|
|
70
|
+
"allowScripts": {
|
|
71
|
+
"bufferutil": true,
|
|
72
|
+
"utf-8-validate": true
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import createWebSocketStream from './lib/stream.js';
|
|
2
|
+
import extension from './lib/extension.js';
|
|
3
|
+
import PerMessageDeflate from './lib/permessage-deflate.js';
|
|
4
|
+
import Receiver from './lib/receiver.js';
|
|
5
|
+
import Sender from './lib/sender.js';
|
|
6
|
+
import subprotocol from './lib/subprotocol.js';
|
|
7
|
+
import WebSocket from './lib/websocket.js';
|
|
8
|
+
import WebSocketServer from './lib/websocket-server.js';
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
createWebSocketStream,
|
|
12
|
+
extension,
|
|
13
|
+
PerMessageDeflate,
|
|
14
|
+
Receiver,
|
|
15
|
+
Sender,
|
|
16
|
+
subprotocol,
|
|
17
|
+
WebSocket,
|
|
18
|
+
WebSocketServer
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default WebSocket;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "windows-development-sandbox",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "A disposable Windows Sandbox for development, with or without an AI agent (Claude Code, Codex, Gemini, opencode, ...): the folder you run it from is the workspace, toolchains and databases for your project install themselves, and nothing else on your PC is reachable.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"LICENSE"
|
|
43
43
|
],
|
|
44
44
|
"scripts": {
|
|
45
|
-
"build": "tsc -p tsconfig.json && node scripts/bundle.mjs && node scripts/schemas.mjs",
|
|
45
|
+
"build": "tsc -p tsconfig.json && node scripts/bundle.mjs && node scripts/bundle-web.mjs && node scripts/schemas.mjs",
|
|
46
46
|
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
47
47
|
"rebuild": "npm run clean && npm run build",
|
|
48
48
|
"test": "npm run build && node dist/bin/agent-sandbox.js self-test",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"install:global": "node scripts/install-global.mjs",
|
|
54
54
|
"publish:npm": "node scripts/publish-npm.mjs",
|
|
55
55
|
"doctor": "node dist/bin/agent-sandbox.js doctor",
|
|
56
|
-
"lint": "eslint src scripts",
|
|
57
|
-
"format": "prettier --write src scripts",
|
|
58
|
-
"format:check": "prettier --check src scripts"
|
|
56
|
+
"lint": "eslint src scripts web",
|
|
57
|
+
"format": "prettier --write src scripts web",
|
|
58
|
+
"format:check": "prettier --check src scripts web"
|
|
59
59
|
},
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"ignore": "^7.0.12",
|
|
80
80
|
"jsonc-parser": "^3.3.1",
|
|
81
81
|
"lodash": "^4.18.1",
|
|
82
|
+
"ws": "^8.22.0",
|
|
82
83
|
"zod": "^4.6.5"
|
|
83
84
|
},
|
|
84
85
|
"bundleDependencies": [
|
|
@@ -87,15 +88,24 @@
|
|
|
87
88
|
"ignore",
|
|
88
89
|
"jsonc-parser",
|
|
89
90
|
"lodash",
|
|
91
|
+
"ws",
|
|
90
92
|
"zod"
|
|
91
93
|
],
|
|
92
94
|
"devDependencies": {
|
|
93
95
|
"@eslint/js": "^9.39.5",
|
|
94
96
|
"@types/lodash": "^4.17.26",
|
|
95
97
|
"@types/node": "^22.0.0",
|
|
98
|
+
"@types/react": "^18.3.31",
|
|
99
|
+
"@types/react-dom": "^18.3.7",
|
|
100
|
+
"@types/ws": "^8.18.2",
|
|
101
|
+
"@xterm/addon-fit": "^0.11.0",
|
|
102
|
+
"@xterm/xterm": "^6.0.0",
|
|
103
|
+
"bootstrap": "^5.3.8",
|
|
96
104
|
"esbuild": "^0.28.2",
|
|
97
105
|
"eslint": "^9.39.5",
|
|
98
106
|
"prettier": "^3.9.10",
|
|
107
|
+
"react": "^18.3.1",
|
|
108
|
+
"react-dom": "^18.3.1",
|
|
99
109
|
"typescript": "^5.8.0",
|
|
100
110
|
"typescript-eslint": "^8.71.2"
|
|
101
111
|
},
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Tells running programs (Explorer, Windows Terminal) that the machine environment changed, so new windows and tabs
|
|
2
|
+
// read the current PATH. Loaded by scripts\set-machine-environment.ps1 (Add-Type). C# 5.
|
|
3
|
+
using System;
|
|
4
|
+
using System.ComponentModel;
|
|
5
|
+
using System.Runtime.InteropServices;
|
|
6
|
+
|
|
7
|
+
namespace AgentSandbox
|
|
8
|
+
{
|
|
9
|
+
public static class EnvBroadcast
|
|
10
|
+
{
|
|
11
|
+
private static readonly IntPtr HwndBroadcast = new IntPtr(0xffff);
|
|
12
|
+
private const uint WmSettingChange = 0x001A;
|
|
13
|
+
private const uint SmtoAbortIfHung = 0x0002;
|
|
14
|
+
private const uint TimeoutMs = 2000;
|
|
15
|
+
|
|
16
|
+
private static class NativeMethods
|
|
17
|
+
{
|
|
18
|
+
[DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
|
19
|
+
public static extern IntPtr SendMessageTimeout(IntPtr window, uint message, UIntPtr wParam, string lParam, uint flags, uint timeout, out UIntPtr result);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/// <summary>Broadcasts WM_SETTINGCHANGE "Environment". Throws on failure.</summary>
|
|
23
|
+
public static void Notify()
|
|
24
|
+
{
|
|
25
|
+
UIntPtr result;
|
|
26
|
+
IntPtr sent = NativeMethods.SendMessageTimeout(HwndBroadcast, WmSettingChange, UIntPtr.Zero, "Environment", SmtoAbortIfHung, TimeoutMs, out result);
|
|
27
|
+
if (sent == IntPtr.Zero)
|
|
28
|
+
{
|
|
29
|
+
throw new Win32Exception(Marshal.GetLastWin32Error());
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Prints the PATH a new shell should have: the machine and user PATH from the registry (variables expanded, no
|
|
2
|
+
// duplicates), then anything only this process has. Shell start-up files (PowerShell profile, cmd AutoRun, Git Bash
|
|
3
|
+
// profile.d) call it so every new shell sees tools added after its parent started. Built per boot by csc. C# 5.
|
|
4
|
+
// Usage: pathsync [--machine <path> --user <path> --process <path>] (the options replace the registry/environment
|
|
5
|
+
// values, for tests).
|
|
6
|
+
using System;
|
|
7
|
+
using System.Collections.Generic;
|
|
8
|
+
using System.IO;
|
|
9
|
+
using System.Text;
|
|
10
|
+
using Microsoft.Win32;
|
|
11
|
+
|
|
12
|
+
namespace AgentSandbox
|
|
13
|
+
{
|
|
14
|
+
public static class PathSync
|
|
15
|
+
{
|
|
16
|
+
private const string MachineKey = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
|
|
17
|
+
private const string UserKey = "Environment";
|
|
18
|
+
|
|
19
|
+
public static int Main(string[] args)
|
|
20
|
+
{
|
|
21
|
+
string machine = null;
|
|
22
|
+
string user = null;
|
|
23
|
+
string process = null;
|
|
24
|
+
for (int i = 0; i + 1 < args.Length; i += 2)
|
|
25
|
+
{
|
|
26
|
+
if (args[i] == "--machine") { machine = args[i + 1]; }
|
|
27
|
+
else if (args[i] == "--user") { user = args[i + 1]; }
|
|
28
|
+
else if (args[i] == "--process") { process = args[i + 1]; }
|
|
29
|
+
}
|
|
30
|
+
if (machine == null) { machine = ReadRegistry(Registry.LocalMachine, MachineKey); }
|
|
31
|
+
if (user == null) { user = ReadRegistry(Registry.CurrentUser, UserKey); }
|
|
32
|
+
if (process == null) { process = Environment.GetEnvironmentVariable("PATH") ?? ""; }
|
|
33
|
+
|
|
34
|
+
List<string> result = new List<string>();
|
|
35
|
+
HashSet<string> seen = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
|
36
|
+
// Entries only this process has come first: a parent put them there on purpose (a virtual environment).
|
|
37
|
+
HashSet<string> registry = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
|
38
|
+
foreach (string folder in Split(machine + ";" + user)) { registry.Add(Key(folder)); }
|
|
39
|
+
string runnerNode = RunnerNode();
|
|
40
|
+
foreach (string folder in Split(process))
|
|
41
|
+
{
|
|
42
|
+
if (registry.Contains(Key(folder)) || Key(folder) == runnerNode) { continue; }
|
|
43
|
+
Add(result, seen, folder);
|
|
44
|
+
}
|
|
45
|
+
foreach (string folder in Split(machine)) { Add(result, seen, folder); }
|
|
46
|
+
foreach (string folder in Split(user)) { Add(result, seen, folder); }
|
|
47
|
+
Console.Out.Write(string.Join(";", result.ToArray()));
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private static string ReadRegistry(RegistryKey root, string subKey)
|
|
52
|
+
{
|
|
53
|
+
using (RegistryKey key = root.OpenSubKey(subKey))
|
|
54
|
+
{
|
|
55
|
+
if (key == null) { return ""; }
|
|
56
|
+
object value = key.GetValue("Path", "", RegistryValueOptions.DoNotExpandEnvironmentNames);
|
|
57
|
+
return value == null ? "" : value.ToString();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/// <summary>The runner's own Node (AGENT_TOOLS\node) is not meant for shells: nvm's node is.</summary>
|
|
62
|
+
private static string RunnerNode()
|
|
63
|
+
{
|
|
64
|
+
string tools = Environment.GetEnvironmentVariable("AGENT_TOOLS");
|
|
65
|
+
return string.IsNullOrEmpty(tools) ? "" : Key(Path.Combine(tools, "node"));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private static IEnumerable<string> Split(string path)
|
|
69
|
+
{
|
|
70
|
+
foreach (string part in Environment.ExpandEnvironmentVariables(path).Split(';'))
|
|
71
|
+
{
|
|
72
|
+
string folder = part.Trim().Trim('"');
|
|
73
|
+
if (folder.Length > 0) { yield return folder; }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private static string Key(string folder)
|
|
78
|
+
{
|
|
79
|
+
const char Slash = (char)92;
|
|
80
|
+
string key = folder.Replace('/', Slash);
|
|
81
|
+
if (key.Length > 3) { key = key.TrimEnd(Slash); }
|
|
82
|
+
return key.ToLowerInvariant();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
private static void Add(List<string> result, HashSet<string> seen, string folder)
|
|
86
|
+
{
|
|
87
|
+
if (seen.Add(Key(folder))) { result.Add(folder); }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#Requires -Version 5.1
|
|
2
|
+
# Every new shell starts with the CURRENT machine + user PATH, whatever its parent had: tools added later in the boot
|
|
3
|
+
# (python, rust, pwsh, agents ...) reach Windows Terminal tabs, Explorer launches and every other shell this way. The
|
|
4
|
+
# start-up files call pathsync.exe (sandbox\csharp\PathSync.cs, built each boot):
|
|
5
|
+
# Windows PowerShell and PowerShell 7: the all-users profile.ps1
|
|
6
|
+
# cmd.exe: HKLM\Software\Microsoft\Command Processor AutoRun -> shell-path.cmd (does nothing for `cmd /c`)
|
|
7
|
+
# Git Bash: etc\profile.d\agent-sandbox-path.sh
|
|
8
|
+
# -Helper is pathsync.exe. -PwshDir and -GitRoot are optional. -Root writes under that folder instead of the machine
|
|
9
|
+
# (tests): no registry is touched then.
|
|
10
|
+
param(
|
|
11
|
+
[Parameter(Mandatory = $true)][string]$Helper,
|
|
12
|
+
[string]$PwshDir = '',
|
|
13
|
+
[string]$GitRoot = '',
|
|
14
|
+
[string]$Root = ''
|
|
15
|
+
)
|
|
16
|
+
$ErrorActionPreference = 'Stop'
|
|
17
|
+
|
|
18
|
+
$marker = 'agent-sandbox path sync'
|
|
19
|
+
|
|
20
|
+
function Write-Ours([string]$file, [string]$text) {
|
|
21
|
+
if (Test-Path -LiteralPath $file) {
|
|
22
|
+
if (-not (Select-String -LiteralPath $file -SimpleMatch $marker -Quiet)) { return }
|
|
23
|
+
} else {
|
|
24
|
+
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $file) | Out-Null
|
|
25
|
+
}
|
|
26
|
+
[IO.File]::WriteAllText($file, $text, (New-Object Text.UTF8Encoding($false)))
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
$profileText = "# $marker`r`n" +
|
|
30
|
+
"try { `$p = & '$Helper'; if (`$p) { `$env:Path = `$p } } catch { }`r`n"
|
|
31
|
+
|
|
32
|
+
$windowsProfileDir = if ($Root) { Join-Path $Root 'windowspowershell' } else { Join-Path $env:windir 'System32\WindowsPowerShell\v1.0' }
|
|
33
|
+
Write-Ours (Join-Path $windowsProfileDir 'profile.ps1') $profileText
|
|
34
|
+
if ($PwshDir -and (Test-Path -LiteralPath $PwshDir)) { Write-Ours (Join-Path $PwshDir 'profile.ps1') $profileText }
|
|
35
|
+
|
|
36
|
+
# cmd: interactive only. `cmd /c ...` (what programs and for /f start) has /c in its command line and leaves at once, which
|
|
37
|
+
# also stops the loop of the for /f below.
|
|
38
|
+
$cmdFile = Join-Path (Split-Path -Parent $Helper) 'shell-path.cmd'
|
|
39
|
+
$cmdText = "@echo off`r`n" +
|
|
40
|
+
"rem $marker`r`n" +
|
|
41
|
+
"setlocal enabledelayedexpansion`r`n" +
|
|
42
|
+
"set `"_L=!cmdcmdline!`"`r`n" +
|
|
43
|
+
"if not `"!_L:/c=!`"==`"!_L!`" exit /b 0`r`n" +
|
|
44
|
+
"if not `"!_L:/r=!`"==`"!_L!`" exit /b 0`r`n" +
|
|
45
|
+
"set `"_P=`"`r`n" +
|
|
46
|
+
"for /f `"delims=`" %%P in ('`"$Helper`"') do set `"_P=%%P`"`r`n" +
|
|
47
|
+
"if not defined _P exit /b 0`r`n" +
|
|
48
|
+
"endlocal & set `"PATH=%_P%`"`r`n"
|
|
49
|
+
if (-not (Test-Path -LiteralPath $cmdFile) -or (Select-String -LiteralPath $cmdFile -SimpleMatch $marker -Quiet)) {
|
|
50
|
+
[IO.File]::WriteAllText($cmdFile, $cmdText, [Text.Encoding]::ASCII)
|
|
51
|
+
}
|
|
52
|
+
if (-not $Root) {
|
|
53
|
+
$key = 'HKLM:\Software\Microsoft\Command Processor'
|
|
54
|
+
$current = (Get-ItemProperty -Path $key -Name AutoRun -ErrorAction SilentlyContinue).AutoRun
|
|
55
|
+
if (-not $current -or $current -like '*shell-path.cmd*') {
|
|
56
|
+
if (-not (Test-Path $key)) { New-Item -Path $key -Force | Out-Null }
|
|
57
|
+
Set-ItemProperty -Path $key -Name AutoRun -Value "if exist `"$cmdFile`" call `"$cmdFile`""
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if ($GitRoot -and (Test-Path -LiteralPath (Join-Path $GitRoot 'etc\profile.d'))) {
|
|
62
|
+
$posixHelper = $Helper -replace '\\', '/'
|
|
63
|
+
$shText = "# $marker`n" +
|
|
64
|
+
"_w=`"`$('$posixHelper' 2>/dev/null)`"`n" +
|
|
65
|
+
"if [ -n `"`$_w`" ]; then`n" +
|
|
66
|
+
" _n=`"`$(cygpath -u -p `"`$_w`" 2>/dev/null)`"`n" +
|
|
67
|
+
" _o=`$IFS; IFS=:`n" +
|
|
68
|
+
" for _d in `$_n; do case `":`$PATH:`" in *`":`$_d:`"*) ;; *) PATH=`"`$PATH:`$_d`" ;; esac; done`n" +
|
|
69
|
+
" IFS=`$_o; export PATH`n" +
|
|
70
|
+
"fi`n" +
|
|
71
|
+
"unset _w _n _o _d`n"
|
|
72
|
+
Write-Ours (Join-Path $GitRoot 'etc\profile.d\agent-sandbox-path.sh') $shText
|
|
73
|
+
}
|
|
@@ -2,28 +2,61 @@
|
|
|
2
2
|
# Machine-wide environment variables and PATH folders, so every new terminal tab and anything an agent starts sees the
|
|
3
3
|
# same tools (guest/setup/environment.ts). -SettingsFile is JSON written by the runtime:
|
|
4
4
|
# vars: { name: value } set machine-wide (with additive: only the ones not set yet)
|
|
5
|
-
# path: string | null replaces the machine PATH
|
|
5
|
+
# path: string | null replaces the machine PATH (already ordered and de-duplicated by the runtime)
|
|
6
6
|
# add: [folders] added to PATH when missing: in front, or (additive) at the end
|
|
7
|
+
# create: [folders] created first (folders a tool fills in later, such as pip's Scripts)
|
|
8
|
+
# The PATH is always saved without duplicates (case, trailing slash) and Explorer / Windows Terminal are told.
|
|
7
9
|
param([Parameter(Mandatory = $true)][string]$SettingsFile)
|
|
8
10
|
$ErrorActionPreference = 'Stop'
|
|
9
11
|
|
|
10
12
|
$settings = Get-Content -LiteralPath $SettingsFile -Raw -Encoding UTF8 | ConvertFrom-Json
|
|
11
13
|
$additive = [bool]$settings.additive
|
|
12
14
|
|
|
15
|
+
function Get-Key([string]$folder) {
|
|
16
|
+
$key = $folder.Trim().Trim('"')
|
|
17
|
+
if ($key.Length -gt 3) { $key = $key.TrimEnd('\', '/') }
|
|
18
|
+
return $key.ToLowerInvariant()
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function Join-Folders([string[]]$folders) {
|
|
22
|
+
$seen = @{}
|
|
23
|
+
$kept = foreach ($folder in $folders) {
|
|
24
|
+
if ([string]::IsNullOrWhiteSpace($folder)) { continue }
|
|
25
|
+
$key = Get-Key $folder
|
|
26
|
+
if ($seen.ContainsKey($key)) { continue }
|
|
27
|
+
$seen[$key] = $true
|
|
28
|
+
$folder.Trim()
|
|
29
|
+
}
|
|
30
|
+
return ($kept -join ';')
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
foreach ($folder in @($settings.create)) {
|
|
34
|
+
if ($folder) { New-Item -ItemType Directory -Force -Path $folder | Out-Null }
|
|
35
|
+
}
|
|
36
|
+
|
|
13
37
|
foreach ($variable in $settings.vars.PSObject.Properties) {
|
|
14
38
|
if ($additive -and [Environment]::GetEnvironmentVariable($variable.Name, 'Machine')) { continue }
|
|
15
39
|
[Environment]::SetEnvironmentVariable($variable.Name, [string]$variable.Value, 'Machine')
|
|
16
40
|
}
|
|
17
41
|
|
|
18
42
|
if ($null -ne $settings.path) {
|
|
19
|
-
[Environment]::SetEnvironmentVariable('Path', [string]$settings.path, 'Machine')
|
|
43
|
+
[Environment]::SetEnvironmentVariable('Path', (Join-Folders ([string]$settings.path -split ';')), 'Machine')
|
|
20
44
|
}
|
|
21
45
|
|
|
22
46
|
if ($settings.add) {
|
|
23
47
|
$current = [Environment]::GetEnvironmentVariable('Path', 'Machine') -split ';'
|
|
24
|
-
$
|
|
48
|
+
$known = @{}
|
|
49
|
+
foreach ($folder in $current) { $known[(Get-Key $folder)] = $true }
|
|
50
|
+
$missing = @($settings.add | Where-Object { -not $known.ContainsKey((Get-Key $_)) })
|
|
25
51
|
if ($missing.Count) {
|
|
26
52
|
$combined = if ($additive) { $current + $missing } else { $missing + $current }
|
|
27
|
-
[Environment]::SetEnvironmentVariable('Path', ($combined
|
|
53
|
+
[Environment]::SetEnvironmentVariable('Path', (Join-Folders $combined), 'Machine')
|
|
28
54
|
}
|
|
29
55
|
}
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
Add-Type -Path (Join-Path $PSScriptRoot '..\csharp\EnvBroadcast.cs')
|
|
59
|
+
[AgentSandbox.EnvBroadcast]::Notify()
|
|
60
|
+
} catch {
|
|
61
|
+
# Programs started later read the registry anyway; only windows that are already open miss the news.
|
|
62
|
+
}
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"root": {
|
|
228
228
|
"type": "string",
|
|
229
229
|
"minLength": 1,
|
|
230
|
-
"description": "Where everything is kept on this PC (tools, databases, logins, launches)."
|
|
230
|
+
"description": "Where everything is kept on this PC (tools, databases, logins, launches). The default is a private folder for you under %ProgramData%\\AgentSandbox\\users, which works for installs for one user and for everyone. sandbox storage move <folder> moves it."
|
|
231
231
|
},
|
|
232
232
|
"persistAgentState": {
|
|
233
233
|
"type": "boolean",
|
|
@@ -313,6 +313,45 @@
|
|
|
313
313
|
},
|
|
314
314
|
"additionalProperties": false
|
|
315
315
|
},
|
|
316
|
+
"vpn": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"properties": {
|
|
319
|
+
"enabled": {
|
|
320
|
+
"type": "boolean",
|
|
321
|
+
"description": "Send the sandbox's traffic through a VPN. Only the sandbox: your PC's own connection is untouched. Needs a saved login first (sandbox vpn login). The agent in the sandbox can read that login and can turn the tunnel off (it is the administrator there)."
|
|
322
|
+
},
|
|
323
|
+
"provider": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"enum": [
|
|
326
|
+
"nordvpn",
|
|
327
|
+
"openvpn-file"
|
|
328
|
+
],
|
|
329
|
+
"description": "nordvpn: a recommended NordVPN server is picked at every launch. openvpn-file: your own .ovpn file (configFile)."
|
|
330
|
+
},
|
|
331
|
+
"protocol": {
|
|
332
|
+
"type": "string",
|
|
333
|
+
"enum": [
|
|
334
|
+
"udp",
|
|
335
|
+
"tcp"
|
|
336
|
+
],
|
|
337
|
+
"description": "udp is faster; tcp gets through networks that block udp."
|
|
338
|
+
},
|
|
339
|
+
"country": {
|
|
340
|
+
"type": "string",
|
|
341
|
+
"pattern": "^([A-Za-z][A-Za-z .'-]{0,39})?$",
|
|
342
|
+
"description": "nordvpn: the country of the server, e.g. uk, us or Germany. Empty = the best server anywhere."
|
|
343
|
+
},
|
|
344
|
+
"configFile": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"description": "openvpn-file: the .ovpn file on this PC (its certificates inside it). Files that run programs (script-security, up, down, plugin ...) are refused. A project's file can never set this."
|
|
347
|
+
},
|
|
348
|
+
"killSwitch": {
|
|
349
|
+
"type": "boolean",
|
|
350
|
+
"description": "Block all traffic that does not go through the tunnel: when the tunnel cannot start, the sandbox stays offline instead of using your normal connection. A project can only turn this on, never off."
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"additionalProperties": false
|
|
354
|
+
},
|
|
316
355
|
"provisioning": {
|
|
317
356
|
"type": "object",
|
|
318
357
|
"properties": {
|
|
@@ -1147,6 +1186,22 @@
|
|
|
1147
1186
|
},
|
|
1148
1187
|
"additionalProperties": false
|
|
1149
1188
|
},
|
|
1189
|
+
"web": {
|
|
1190
|
+
"type": "object",
|
|
1191
|
+
"properties": {
|
|
1192
|
+
"enabled": {
|
|
1193
|
+
"type": "boolean",
|
|
1194
|
+
"description": "(Beta) Allow the web UI: your sandbox sessions in a browser on this PC. Off by default, and nothing starts it by itself yet: sandbox web start works either way and runs it until sandbox web stop (or a restart of the PC)."
|
|
1195
|
+
},
|
|
1196
|
+
"port": {
|
|
1197
|
+
"type": "integer",
|
|
1198
|
+
"minimum": 1024,
|
|
1199
|
+
"maximum": 65535,
|
|
1200
|
+
"description": "Port of the web UI on 127.0.0.1 (this PC only). Pick another when it is taken."
|
|
1201
|
+
}
|
|
1202
|
+
},
|
|
1203
|
+
"additionalProperties": false
|
|
1204
|
+
},
|
|
1150
1205
|
"agentCommands": {
|
|
1151
1206
|
"type": "object",
|
|
1152
1207
|
"properties": {
|
|
@@ -1236,6 +1291,7 @@
|
|
|
1236
1291
|
"sourcegit",
|
|
1237
1292
|
"githubdesktop",
|
|
1238
1293
|
"lazygit",
|
|
1294
|
+
"jj",
|
|
1239
1295
|
"7zip",
|
|
1240
1296
|
"winmerge",
|
|
1241
1297
|
"everything",
|
|
@@ -1288,7 +1344,9 @@
|
|
|
1288
1344
|
"ffmpeg",
|
|
1289
1345
|
"sqlite",
|
|
1290
1346
|
"shellcheck",
|
|
1291
|
-
"gitleaks"
|
|
1347
|
+
"gitleaks",
|
|
1348
|
+
"ast-grep",
|
|
1349
|
+
"rust-analyzer"
|
|
1292
1350
|
]
|
|
1293
1351
|
},
|
|
1294
1352
|
"description": "Apps from the catalogue to install in every sandbox (the Apps screen in the menu lists them by category). Each is downloaded once and kept."
|
|
@@ -1388,6 +1446,10 @@
|
|
|
1388
1446
|
"type": "boolean",
|
|
1389
1447
|
"description": "Refresh these settings from this PC on every launch."
|
|
1390
1448
|
},
|
|
1449
|
+
"sharePluginsAcrossAccounts": {
|
|
1450
|
+
"type": "boolean",
|
|
1451
|
+
"description": "When you switch Claude accounts, copy your Claude plugins (and which ones are enabled) into a data set that has none yet. Off by default: plugins are code that runs in your sessions."
|
|
1452
|
+
},
|
|
1391
1453
|
"syncHistory": {
|
|
1392
1454
|
"type": "boolean",
|
|
1393
1455
|
"description": "Bring conversation history in, and sync new history back (path-translated)."
|
|
@@ -1457,9 +1519,10 @@
|
|
|
1457
1519
|
"type": "string"
|
|
1458
1520
|
},
|
|
1459
1521
|
"additionalProperties": {
|
|
1460
|
-
"type": "string"
|
|
1522
|
+
"type": "string",
|
|
1523
|
+
"secret": true
|
|
1461
1524
|
},
|
|
1462
|
-
"description": "Environment variables for the agent."
|
|
1525
|
+
"description": "Environment variables for the agent (API keys go here). Their values are shown as *** and are handed to the sandbox in a one-shot file, never kept in the launch folder. The agent can read its own environment."
|
|
1463
1526
|
},
|
|
1464
1527
|
"home": {
|
|
1465
1528
|
"description": "Where its login lives inside the sandbox; leave out when the agent cannot be pointed at a folder (then its login is not kept between sandboxes).",
|
|
@@ -1501,6 +1564,18 @@
|
|
|
1501
1564
|
},
|
|
1502
1565
|
"additionalProperties": false
|
|
1503
1566
|
},
|
|
1567
|
+
"localState": {
|
|
1568
|
+
"description": "Environment variable -> folder below the agent's own state folder (state\\<agent>) for SQLite databases. SQLite cannot run in a mapped folder, so the agent runs from a copy on the sandbox's disk (the variable points to it) that is copied from and back to that folder.",
|
|
1569
|
+
"type": "object",
|
|
1570
|
+
"propertyNames": {
|
|
1571
|
+
"type": "string",
|
|
1572
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
1573
|
+
},
|
|
1574
|
+
"additionalProperties": {
|
|
1575
|
+
"type": "string",
|
|
1576
|
+
"pattern": "^(?!.*(^|[\\\\/])\\.\\.([\\\\/]|$))[A-Za-z0-9._ -]+([\\\\/][A-Za-z0-9._ -]+)*$"
|
|
1577
|
+
}
|
|
1578
|
+
},
|
|
1504
1579
|
"resumeArguments": {
|
|
1505
1580
|
"description": "Arguments used when the agent is restarted in place (e.g. after an account switch) so it resumes the conversation.",
|
|
1506
1581
|
"type": "array",
|
|
@@ -183,6 +183,16 @@
|
|
|
183
183
|
},
|
|
184
184
|
"additionalProperties": false
|
|
185
185
|
},
|
|
186
|
+
"vpn": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"properties": {
|
|
189
|
+
"killSwitch": {
|
|
190
|
+
"type": "boolean",
|
|
191
|
+
"description": "Block all traffic that does not go through the tunnel: when the tunnel cannot start, the sandbox stays offline instead of using your normal connection. A project can only turn this on, never off."
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"additionalProperties": false
|
|
195
|
+
},
|
|
186
196
|
"provisioning": {
|
|
187
197
|
"type": "object",
|
|
188
198
|
"properties": {
|
|
@@ -1040,6 +1050,7 @@
|
|
|
1040
1050
|
"sourcegit",
|
|
1041
1051
|
"githubdesktop",
|
|
1042
1052
|
"lazygit",
|
|
1053
|
+
"jj",
|
|
1043
1054
|
"7zip",
|
|
1044
1055
|
"winmerge",
|
|
1045
1056
|
"everything",
|
|
@@ -1092,7 +1103,9 @@
|
|
|
1092
1103
|
"ffmpeg",
|
|
1093
1104
|
"sqlite",
|
|
1094
1105
|
"shellcheck",
|
|
1095
|
-
"gitleaks"
|
|
1106
|
+
"gitleaks",
|
|
1107
|
+
"ast-grep",
|
|
1108
|
+
"rust-analyzer"
|
|
1096
1109
|
]
|
|
1097
1110
|
},
|
|
1098
1111
|
"description": "Apps from the catalogue to install in every sandbox (the Apps screen in the menu lists them by category). Each is downloaded once and kept."
|