windows-development-sandbox 1.18.4 → 1.23.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 -1
- package/config.example.json +17 -1
- package/dist/app/features/access/access.def.js +5 -2
- package/dist/app/features/access/access.run.js +7 -3
- package/dist/app/features/accounts/accounts.def.d.ts +33 -1
- package/dist/app/features/accounts/accounts.def.js +10 -4
- package/dist/app/features/accounts/accounts.run.d.ts +2 -0
- package/dist/app/features/accounts/accounts.run.js +7 -2
- package/dist/app/features/accounts/services.def.d.ts +7 -1
- package/dist/app/features/accounts/services.def.js +19 -16
- package/dist/app/features/accounts/services.run.d.ts +2 -0
- package/dist/app/features/accounts/services.run.js +44 -16
- package/dist/app/features/agent-commands/agent-commands.def.d.ts +37 -0
- package/dist/app/features/agent-commands/agent-commands.def.js +91 -0
- package/dist/app/features/agent-commands/agent-commands.run.d.ts +28 -0
- package/dist/app/features/agent-commands/agent-commands.run.js +35 -0
- package/dist/app/features/agent-commands/index.d.ts +2 -0
- package/dist/app/features/agent-commands/index.js +3 -0
- package/dist/app/features/agents/agents.def.d.ts +14 -1
- package/dist/app/features/agents/agents.def.js +61 -6
- package/dist/app/features/agents/agents.run.d.ts +1 -0
- package/dist/app/features/agents/agents.run.js +8 -1
- package/dist/app/features/agents/claude-env.def.d.ts +36 -0
- package/dist/app/features/agents/claude-env.def.js +305 -0
- package/dist/app/features/agents/env.def.d.ts +163 -0
- package/dist/app/features/agents/env.def.js +184 -0
- package/dist/app/features/agents/env.run.d.ts +43 -0
- package/dist/app/features/agents/env.run.js +86 -0
- package/dist/app/features/agents/index.d.ts +2 -0
- package/dist/app/features/agents/index.js +2 -0
- package/dist/app/features/defs.d.ts +171 -3
- package/dist/app/features/defs.js +9 -0
- package/dist/app/features/engine/engine.run.js +1 -1
- package/dist/app/features/github/github.def.d.ts +44 -3
- package/dist/app/features/github/github.def.js +145 -63
- package/dist/app/features/github/github.run.d.ts +9 -2
- package/dist/app/features/github/github.run.js +43 -5
- package/dist/app/features/health/health.def.js +8 -2
- package/dist/app/features/logs/logs.def.js +0 -8
- package/dist/app/features/projects/projects.def.js +2 -2
- package/dist/app/features/projects/projects.run.js +5 -5
- package/dist/app/features/sandbox/sandbox.def.js +7 -3
- package/dist/app/features/sessions/sessions.def.d.ts +4 -4
- package/dist/app/features/sessions/sessions.def.js +0 -5
- package/dist/app/features/sessions/sessions.run.d.ts +1 -1
- package/dist/app/features/sessions/sessions.run.js +2 -2
- package/dist/app/features/settings/categories.def.js +7 -2
- package/dist/app/features/settings/settings-rows.js +6 -2
- package/dist/app/features/settings/settings.def.js +1 -1
- package/dist/app/features/settings/settings.run.d.ts +8 -0
- package/dist/app/features/settings/settings.run.js +12 -3
- package/dist/app/features/storage/storage.run.js +18 -9
- package/dist/app/features/updates/update-lines.js +2 -2
- package/dist/app/features/updates/updates.def.js +1 -1
- package/dist/app/features/updates/updates.run.js +13 -3
- package/dist/app/features/vpn/vpn.def.d.ts +33 -0
- package/dist/app/features/vpn/vpn.def.js +30 -6
- package/dist/app/features/vpn/vpn.run.d.ts +11 -0
- package/dist/app/features/vpn/vpn.run.js +4 -1
- package/dist/app/features/web/web.def.js +2 -2
- package/dist/app/features/web/web.run.js +12 -4
- package/dist/app/kernel/errors.d.ts +7 -0
- package/dist/app/kernel/errors.js +18 -3
- package/dist/app/kernel/rpc.d.ts +6 -1
- package/dist/app/kernel/view.d.ts +11 -1
- package/dist/app/registry.js +7 -1
- package/dist/bin/agent-sandbox.js +2 -2
- package/dist/bin/{chunk-N4GXYTLV.js → chunk-JETGP2C3.js} +239 -72
- package/dist/bin/{chunk-MY7NLQQY.js → chunk-XZKOPGNH.js} +1 -1
- package/dist/bin/{chunk-FRPLQLSY.js → chunk-ZTTOF5V3.js} +6566 -4964
- package/dist/bin/claude-host.js +2 -2
- package/dist/bin/claude-sbx.js +2 -2
- package/dist/bin/codex-sbx.js +2 -2
- package/dist/bin/gemini-sbx.js +2 -2
- package/dist/bin/sandbox.js +2 -2
- package/dist/bin/sbx-hide.js +2 -2
- package/dist/bin/sbx-show.js +2 -2
- package/dist/cli/commands/agent-commands.d.ts +0 -1
- package/dist/cli/commands/agent-commands.js +2 -32
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.js +1 -1
- package/dist/cli/commands/launch/launch.js +2 -2
- package/dist/cli/commands/registry.js +3 -2
- package/dist/cli/manifest.d.ts +3 -3
- package/dist/cli/manifest.js +3 -2
- package/dist/cli/menu/coverage-exempt.d.ts +17 -0
- package/dist/cli/menu/coverage-exempt.js +61 -0
- package/dist/cli/menu/io-menu.d.ts +2 -0
- package/dist/cli/menu/io-menu.js +50 -5
- package/dist/cli/menu/menu.d.ts +1 -1
- package/dist/cli/menu/menu.js +3 -3
- package/dist/cli/menu/pages/accounts-page.js +1 -1
- package/dist/cli/menu/pages/agents-page.d.ts +7 -2
- package/dist/cli/menu/pages/agents-page.js +75 -13
- package/dist/cli/menu/pages/maintenance-page.d.ts +6 -0
- package/dist/cli/menu/pages/maintenance-page.js +10 -4
- package/dist/cli/menu/pages/sessions-page.d.ts +2 -0
- package/dist/cli/menu/pages/sessions-page.js +12 -4
- package/dist/cli/menu/pages/settings-page.js +13 -1
- package/dist/cli/menu/remote-menu.js +1 -1
- package/dist/cli/menu/shell.d.ts +5 -0
- package/dist/cli/menu/shell.js +13 -0
- package/dist/cli/menu/views.js +2 -1
- package/dist/cli/report.js +2 -0
- package/dist/cli/services/agent-commands-service.d.ts +2 -0
- package/dist/cli/services/agent-commands-service.js +13 -7
- package/dist/cli/services/vpn-service.d.ts +5 -1
- package/dist/cli/services/vpn-service.js +6 -1
- package/dist/cli/tui/app.d.ts +5 -0
- package/dist/cli/tui/app.js +2 -0
- package/dist/cli/tui/dialogs/text-screen.js +2 -1
- package/dist/cli/tui/terminal.js +3 -1
- package/dist/core/config/defaults.js +12 -1
- package/dist/core/detect/toolchains.js +9 -0
- package/dist/core/disk.d.ts +1 -5
- package/dist/core/disk.js +1 -16
- package/dist/core/schema/accounts.d.ts +6 -0
- package/dist/core/schema/accounts.js +13 -11
- package/dist/core/schema/codex.d.ts +29 -0
- package/dist/core/schema/codex.js +24 -0
- package/dist/core/schema/config.d.ts +58 -14
- package/dist/core/schema/config.js +6 -4
- package/dist/core/schema/github.js +1 -1
- package/dist/core/schema/index.d.ts +1 -0
- package/dist/core/schema/index.js +1 -0
- package/dist/core/schema/profile.js +8 -4
- package/dist/core/schema/resume.js +1 -1
- package/dist/core/schema/sandbox.js +3 -3
- package/dist/core/schema/toolchains.d.ts +4 -0
- package/dist/core/schema/toolchains.js +3 -0
- package/dist/core/schema/vpn.js +1 -1
- package/dist/core/schema/web.js +3 -3
- package/dist/core/types.d.ts +8 -0
- package/dist/core/util/errors.d.ts +11 -1
- package/dist/core/util/errors.js +7 -1
- package/dist/core/util/index.d.ts +1 -1
- package/dist/core/util/index.js +1 -1
- package/dist/guest/accounts/adapter.d.ts +2 -0
- package/dist/guest/accounts/adapters.js +4 -0
- package/dist/guest/accounts/apply.d.ts +10 -6
- package/dist/guest/accounts/kinds/cfx.d.ts +7 -0
- package/dist/guest/accounts/kinds/cfx.js +33 -3
- package/dist/guest/accounts/kinds/comet.d.ts +7 -0
- package/dist/guest/accounts/kinds/comet.js +50 -0
- package/dist/guest/accounts/kinds/perplexity.d.ts +2 -0
- package/dist/guest/accounts/kinds/perplexity.js +12 -0
- package/dist/guest/accounts/watch.d.ts +2 -0
- package/dist/guest/accounts/watch.js +12 -2
- package/dist/guest/agents/agent-files.d.ts +26 -6
- package/dist/guest/agents/agent-files.js +84 -14
- package/dist/guest/agents/agent-installer.js +1 -1
- package/dist/guest/agents/local-state.d.ts +5 -2
- package/dist/guest/agents/local-state.js +24 -10
- package/dist/guest/agents/profile-links.d.ts +2 -0
- package/dist/guest/agents/profile-links.js +18 -4
- package/dist/guest/apps/after-install.js +19 -0
- package/dist/guest/apps/app-installer.d.ts +11 -0
- package/dist/guest/apps/app-installer.js +69 -6
- package/dist/guest/apps/comet-unpack.d.ts +20 -0
- package/dist/guest/apps/comet-unpack.js +127 -0
- package/dist/guest/apps/index.d.ts +1 -1
- package/dist/guest/apps/index.js +1 -1
- package/dist/guest/apps/resolvers-agents-web.d.ts +2 -0
- package/dist/guest/apps/resolvers-agents-web.js +7 -0
- package/dist/guest/apps/resolvers.js +2 -0
- package/dist/guest/apps/shortcuts.d.ts +2 -0
- package/dist/guest/apps/shortcuts.js +1 -0
- package/dist/guest/apps/unpack.js +14 -4
- package/dist/guest/boot/boot.d.ts +45 -16
- package/dist/guest/boot/boot.js +325 -149
- package/dist/guest/boot/graph.d.ts +252 -0
- package/dist/guest/boot/graph.js +257 -0
- package/dist/guest/boot/guide-lines.d.ts +25 -0
- package/dist/guest/boot/guide-lines.js +41 -0
- package/dist/guest/boot/guide.d.ts +1 -4
- package/dist/guest/boot/guide.js +6 -8
- package/dist/guest/boot/runner.d.ts +77 -0
- package/dist/guest/boot/runner.js +215 -0
- package/dist/guest/browser/cdp.d.ts +71 -0
- package/dist/guest/browser/cdp.js +306 -0
- package/dist/guest/browser/comet.d.ts +28 -0
- package/dist/guest/browser/comet.js +155 -0
- package/dist/guest/daemon/project-provisioner.js +6 -1
- package/dist/guest/daemon/sessions.js +2 -1
- package/dist/guest/devtools/fivem.d.ts +1 -1
- package/dist/guest/devtools/fivem.js +243 -3
- package/dist/guest/entries/daemon.js +2 -0
- package/dist/guest/runtime/log.d.ts +12 -0
- package/dist/guest/runtime/log.js +29 -5
- package/dist/guest/runtime/pools.d.ts +24 -0
- package/dist/guest/runtime/pools.js +60 -0
- package/dist/guest/runtime/process.d.ts +4 -0
- package/dist/guest/runtime/process.js +38 -1
- package/dist/guest/runtime/status.d.ts +5 -1
- package/dist/guest/runtime/status.js +19 -0
- package/dist/guest/setup/addon-mcp.d.ts +1 -1
- package/dist/guest/setup/addon-mcp.js +52 -12
- package/dist/guest/setup/agent-addons.d.ts +3 -2
- package/dist/guest/setup/agent-addons.js +12 -3
- package/dist/guest/setup/environment.d.ts +1 -1
- package/dist/guest/setup/environment.js +25 -12
- package/dist/guest/setup/headroom.d.ts +8 -3
- package/dist/guest/setup/headroom.js +44 -15
- package/dist/guest/setup/path-plan.d.ts +28 -0
- package/dist/guest/setup/path-plan.js +69 -2
- package/dist/guest/setup/shell-path.d.ts +1 -1
- package/dist/guest/setup/shell-path.js +3 -3
- package/dist/guest/toolchains/fivem/artifacts.d.ts +48 -1
- package/dist/guest/toolchains/fivem/artifacts.js +97 -4
- package/dist/guest/toolchains/fivem/fivem.d.ts +32 -1
- package/dist/guest/toolchains/fivem/fivem.js +168 -3
- package/dist/guest/toolchains/fivem/scaffold.d.ts +35 -0
- package/dist/guest/toolchains/fivem/scaffold.js +105 -0
- package/dist/guest/toolchains/fivem/serve-plan.d.ts +34 -0
- package/dist/guest/toolchains/fivem/serve-plan.js +61 -0
- package/dist/guest/toolchains/installers.d.ts +6 -10
- package/dist/guest/toolchains/installers.js +4 -12
- package/dist/guest/toolchains/languages/go.js +1 -1
- package/dist/guest/toolchains/languages/node.js +2 -1
- package/dist/guest/toolchains/languages/php.d.ts +2 -0
- package/dist/guest/toolchains/languages/php.js +13 -1
- package/dist/guest/toolchains/languages/python-tools.js +1 -1
- package/dist/guest/toolchains/languages/ruby.js +1 -1
- package/dist/guest/toolchains/native/autosdk.d.ts +3 -0
- package/dist/guest/toolchains/native/autosdk.js +50 -0
- package/dist/guest/toolchains/native/binstall.js +1 -1
- package/dist/guest/toolchains/native/msvc/packages.js +10 -4
- package/dist/guest/toolchains/native/rust.d.ts +2 -0
- package/dist/guest/toolchains/native/rust.js +11 -4
- package/dist/guest/toolchains/native/unreal.d.ts +2 -0
- package/dist/guest/toolchains/native/unreal.js +19 -6
- package/dist/guest/toolchains/native/vcruntime.d.ts +2 -3
- package/dist/guest/toolchains/native/vcruntime.js +12 -7
- package/dist/guest/toolchains/native/visual-studio.d.ts +5 -2
- package/dist/guest/toolchains/native/visual-studio.js +127 -25
- package/dist/guest/toolchains/native/vs-request.d.ts +23 -0
- package/dist/guest/toolchains/native/vs-request.js +62 -1
- package/dist/guest/toolchains/not-yet.d.ts +1 -1
- package/dist/guest/toolchains/not-yet.js +3 -3
- package/dist/guest/toolchains/persisted.js +2 -7
- package/dist/guest/toolchains/plan.js +27 -11
- package/dist/guest/toolchains/scheduler.d.ts +2 -21
- package/dist/guest/toolchains/scheduler.js +7 -121
- package/dist/guest/toolchains/setup.d.ts +15 -2
- package/dist/guest/toolchains/setup.js +39 -20
- package/dist/guest/toolchains/signature.d.ts +5 -0
- package/dist/guest/toolchains/signature.js +22 -0
- package/dist/guest/toolchains/split.d.ts +28 -0
- package/dist/guest/toolchains/split.js +60 -0
- package/dist/guest/toolchains/steam/client.js +2 -1
- package/dist/guest/toolchains/step-scheduler.d.ts +51 -0
- package/dist/guest/toolchains/step-scheduler.js +147 -0
- package/dist/guest/toolchains/step.d.ts +13 -0
- package/dist/guest/toolchains/tools/git.js +18 -0
- package/dist/guest/vpn/openvpn.js +3 -4
- package/dist/guest/vpn/tunnel.d.ts +3 -0
- package/dist/guest/vpn/tunnel.js +10 -12
- package/dist/guest/vpn/vpn.js +6 -1
- package/dist/guest/vpn/wireguard.js +11 -4
- package/dist/host/accounts/deliver.js +7 -0
- package/dist/host/accounts/handoff.js +2 -6
- package/dist/host/accounts/index.d.ts +1 -1
- package/dist/host/accounts/index.js +1 -1
- package/dist/host/accounts/kinds/cfx.d.ts +1 -1
- package/dist/host/accounts/kinds/cfx.js +47 -4
- package/dist/host/accounts/kinds/comet.d.ts +2 -0
- package/dist/host/accounts/kinds/comet.js +6 -0
- package/dist/host/accounts/kinds/perplexity.d.ts +2 -0
- package/dist/host/accounts/kinds/perplexity.js +30 -0
- package/dist/host/accounts/leases.d.ts +9 -3
- package/dist/host/accounts/leases.js +13 -2
- package/dist/host/accounts/source.d.ts +7 -1
- package/dist/host/accounts/source.js +28 -1
- package/dist/host/accounts/sources.js +4 -0
- package/dist/host/agent-commands/commands.js +1 -1
- package/dist/host/agent-commands/forwarders.d.ts +14 -2
- package/dist/host/agent-commands/forwarders.js +31 -13
- package/dist/host/agent-commands/reconcile.d.ts +2 -1
- package/dist/host/agent-commands/reconcile.js +7 -8
- package/dist/host/agent-commands/user-path.d.ts +5 -0
- package/dist/host/agent-commands/user-path.js +13 -0
- package/dist/host/github/deliver.d.ts +1 -1
- package/dist/host/github/deliver.js +20 -1
- package/dist/host/github/index.d.ts +2 -1
- package/dist/host/github/index.js +1 -0
- package/dist/host/github/token.d.ts +13 -1
- package/dist/host/github/token.js +19 -2
- package/dist/host/github/verify.d.ts +27 -0
- package/dist/host/github/verify.js +61 -0
- package/dist/host/launch/hints/fivem.d.ts +3 -1
- package/dist/host/launch/hints/fivem.js +68 -2
- package/dist/host/launch/session-file.js +5 -0
- package/dist/host/launch/toolchains.d.ts +2 -1
- package/dist/host/launch/toolchains.js +5 -3
- package/dist/host/profile/accounts.js +2 -4
- package/dist/host/profile/claude-login.d.ts +3 -2
- package/dist/host/profile/claude-login.js +3 -13
- package/dist/host/vpn/index.d.ts +2 -1
- package/dist/host/vpn/index.js +2 -1
- package/dist/host/vpn/last.d.ts +28 -0
- package/dist/host/vpn/last.js +43 -0
- package/dist/host/vpn/login.d.ts +3 -1
- package/dist/host/vpn/login.js +17 -3
- package/dist/host/vpn/nordvpn.d.ts +2 -4
- package/dist/host/vpn/nordvpn.js +2 -24
- package/dist/runtime/agent.js +433 -90
- package/dist/runtime/daemon.js +3378 -1546
- package/dist/runtime/db.js +363 -90
- package/dist/runtime/main.js +5134 -2096
- package/dist/runtime/netproxy.js +308 -69
- package/dist/runtime/tool.js +2867 -1765
- package/dist/runtime/view.js +308 -69
- package/dist/selftest/agent-commands.test.js +45 -7
- package/dist/selftest/agent-paths.test.js +40 -13
- package/dist/selftest/agent-settings.test.d.ts +2 -0
- package/dist/selftest/agent-settings.test.js +94 -0
- package/dist/selftest/agents-web.test.d.ts +2 -0
- package/dist/selftest/agents-web.test.js +647 -0
- package/dist/selftest/app.test.js +7 -3
- package/dist/selftest/boot-runner.test.d.ts +2 -0
- package/dist/selftest/boot-runner.test.js +456 -0
- package/dist/selftest/channel.test.js +15 -0
- package/dist/selftest/cli.test.js +4 -0
- package/dist/selftest/fivem.test.js +249 -3
- package/dist/selftest/github.test.js +94 -9
- package/dist/selftest/guest-boot.test.js +3 -0
- package/dist/selftest/health.test.js +1 -1
- package/dist/selftest/index.js +10 -0
- package/dist/selftest/layout.test.js +5 -0
- package/dist/selftest/menu-coverage.test.d.ts +2 -0
- package/dist/selftest/menu-coverage.test.js +46 -0
- package/dist/selftest/menu-screens.js +37 -1
- package/dist/selftest/menu.test.js +5 -3
- package/dist/selftest/pc-installs.test.js +5 -0
- package/dist/selftest/persisted-installs.test.js +72 -0
- package/dist/selftest/service-accounts.test.js +3 -2
- package/dist/selftest/support/engine-golden.js +28 -1
- package/dist/selftest/support/fixtures.d.ts +15 -0
- package/dist/selftest/support/web-preview.d.ts +34 -1
- package/dist/selftest/support/web-preview.js +21 -18
- package/dist/selftest/toolchains.test.js +23 -1
- package/dist/selftest/ui-text.test.d.ts +7 -0
- package/dist/selftest/ui-text.test.js +300 -0
- package/dist/selftest/vpn.test.js +51 -3
- package/dist/shared/accounts/anthropic.d.ts +5 -0
- package/dist/shared/accounts/anthropic.js +15 -0
- package/dist/shared/accounts/index.d.ts +3 -0
- package/dist/shared/accounts/index.js +3 -0
- package/dist/shared/accounts/kinds/comet.d.ts +12 -0
- package/dist/shared/accounts/kinds/comet.js +64 -0
- package/dist/shared/accounts/kinds/perplexity.d.ts +8 -0
- package/dist/shared/accounts/kinds/perplexity.js +37 -0
- package/dist/shared/accounts/kinds.d.ts +24 -5
- package/dist/shared/accounts/kinds.js +86 -4
- package/dist/shared/accounts/payloads.d.ts +81 -0
- package/dist/shared/accounts/payloads.js +39 -1
- package/dist/shared/apps/agent-addons.d.ts +33 -5
- package/dist/shared/apps/agent-addons.js +95 -3
- package/dist/shared/apps/catalogue-agents-web.d.ts +14 -0
- package/dist/shared/apps/catalogue-agents-web.js +112 -0
- package/dist/shared/apps/catalogue-modding.js +32 -1
- package/dist/shared/apps/catalogue.d.ts +27 -3
- package/dist/shared/apps/catalogue.js +2 -1
- package/dist/shared/apps/index.d.ts +3 -1
- package/dist/shared/apps/index.js +3 -1
- package/dist/shared/channel/schema.d.ts +40 -3
- package/dist/shared/channel/schema.js +9 -0
- package/dist/shared/channel/secrets.d.ts +19 -0
- package/dist/shared/concurrency/index.d.ts +3 -0
- package/dist/shared/concurrency/index.js +3 -0
- package/dist/shared/concurrency/installer-retry.d.ts +6 -0
- package/dist/shared/concurrency/installer-retry.js +10 -0
- package/dist/shared/concurrency/limiter.d.ts +19 -0
- package/dist/shared/concurrency/limiter.js +67 -0
- package/dist/shared/concurrency/pools.d.ts +7 -0
- package/dist/shared/concurrency/pools.js +9 -0
- package/dist/shared/download/archive.d.ts +2 -0
- package/dist/shared/download/archive.js +11 -1
- package/dist/shared/download/bounded-fetch.d.ts +13 -0
- package/dist/shared/download/bounded-fetch.js +40 -0
- package/dist/shared/download/downloader.d.ts +5 -0
- package/dist/shared/download/downloader.js +50 -38
- package/dist/shared/download/index.d.ts +2 -1
- package/dist/shared/download/index.js +2 -1
- package/dist/shared/io/disk.d.ts +9 -0
- package/dist/shared/io/disk.js +19 -0
- package/dist/shared/io/index.d.ts +1 -0
- package/dist/shared/io/index.js +1 -0
- package/dist/shared/readiness.d.ts +9 -0
- package/dist/shared/readiness.js +11 -0
- package/dist/shared/signer.d.ts +24 -0
- package/dist/shared/signer.js +15 -0
- package/dist/shared/vpn/failure.d.ts +10 -0
- package/dist/shared/vpn/failure.js +28 -0
- package/dist/sync/watcher.js +2 -0
- package/dist/web/index.html +1 -1
- package/dist/web/{main-GVZWWP4I.js → main-CCILLX2M.js} +75 -74
- package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/Program.cs +14 -1
- package/native/csharp/HostTools/UserPath.cs +17 -0
- package/native/csharp/StorageHelper/AssemblyInfo.cs +3 -3
- package/native/scripts/edit-user-path.ps1 +6 -2
- package/package.json +1 -1
- package/sandbox/addons/browser-use-mcp/requirements.in +1 -0
- package/sandbox/addons/browser-use-mcp/requirements.txt +2350 -0
- package/sandbox/addons/chrome-devtools-mcp/package-lock.json +38 -0
- package/sandbox/addons/chrome-devtools-mcp/package.json +7 -0
- package/sandbox/addons/comet-mcp/package-lock.json +1277 -0
- package/sandbox/addons/comet-mcp/package.json +7 -0
- package/sandbox/addons/perplexity-mcp/package-lock.json +1655 -0
- package/sandbox/addons/perplexity-mcp/package.json +7 -0
- package/sandbox/scripts/add-firewall-port.ps1 +18 -4
- package/sandbox/scripts/get-signature.ps1 +13 -0
- package/sandbox/scripts/set-machine-environment.ps1 +30 -15
- package/sandbox/templates/fivem/README.txt +6 -2
- package/sandbox/templates/fivem/cs/Client/Client.csproj +15 -0
- package/sandbox/templates/fivem/cs/Client/ClientMain.cs +20 -0
- package/sandbox/templates/fivem/cs/Server/Server.csproj +14 -0
- package/sandbox/templates/fivem/cs/Server/ServerMain.cs +20 -0
- package/sandbox/templates/fivem/cs/fxmanifest.lua +11 -0
- package/sandbox/templates/fivem/js/client.js +12 -0
- package/sandbox/templates/fivem/js/fxmanifest.lua +9 -0
- package/sandbox/templates/fivem/js/server.js +6 -0
- package/sandbox/templates/fivem/lua/client.lua +8 -0
- package/sandbox/templates/fivem/lua/fxmanifest.lua +10 -0
- package/sandbox/templates/fivem/lua/server.lua +6 -0
- package/sandbox/templates/fivem/server.cfg +37 -0
- package/sandbox/templates/fivem/ts/build.js +17 -0
- package/sandbox/templates/fivem/ts/fxmanifest.lua +9 -0
- package/sandbox/templates/fivem/ts/package.json +16 -0
- package/sandbox/templates/fivem/ts/src/client/client.ts +12 -0
- package/sandbox/templates/fivem/ts/src/client/tsconfig.json +13 -0
- package/sandbox/templates/fivem/ts/src/server/server.ts +6 -0
- package/sandbox/templates/fivem/ts/src/server/tsconfig.json +13 -0
- package/schemas/config.schema.json +120 -27
- package/schemas/sandbox-config.schema.json +45 -14
- package/sandbox/scripts/get-signer.ps1 +0 -8
package/dist/core/disk.js
CHANGED
|
@@ -59,22 +59,7 @@ export function sizeWithin(p, ms) {
|
|
|
59
59
|
throw e;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
* Free bytes on the drive that holds `dir` (which may not exist yet: the nearest existing parent is asked); null if
|
|
64
|
-
* unknown.
|
|
65
|
-
*/
|
|
66
|
-
export function freeBytesAt(dir) {
|
|
67
|
-
let at = path.resolve(dir);
|
|
68
|
-
while (!fs.existsSync(at) && path.dirname(at) !== at)
|
|
69
|
-
at = path.dirname(at);
|
|
70
|
-
try {
|
|
71
|
-
const s = fs.statfsSync(at);
|
|
72
|
-
return s.bavail * s.bsize;
|
|
73
|
-
}
|
|
74
|
-
catch {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
62
|
+
export { freeBytesAt } from '../shared/io/disk.js';
|
|
78
63
|
/** Every local drive's size and free space, and which one holds the sandbox storage. */
|
|
79
64
|
export function diskUsage(storageRoot) {
|
|
80
65
|
const storageDrive = path.parse(path.resolve(storageRoot)).root.toUpperCase();
|
|
@@ -24,4 +24,10 @@ export declare const AccountsSchema: z.ZodObject<{
|
|
|
24
24
|
appstore: z.ZodObject<{
|
|
25
25
|
share: z.ZodBoolean;
|
|
26
26
|
}, z.core.$strict>;
|
|
27
|
+
perplexity: z.ZodObject<{
|
|
28
|
+
share: z.ZodBoolean;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
comet: z.ZodObject<{
|
|
31
|
+
share: z.ZodBoolean;
|
|
32
|
+
}, z.core.$strict>;
|
|
27
33
|
}, z.core.$strict>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// accounts: which saved service sign-ins sandboxes get (the sign-ins themselves are not settings: they are kept
|
|
2
2
|
// encrypted by `sandbox account import|login`, or come back from a sandbox you signed in in).
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { SERVICE_SPECS } from '../../shared/accounts/kinds.js';
|
|
4
|
+
import { SERVICE_SPECS, usedByText } from '../../shared/accounts/kinds.js';
|
|
5
5
|
function share(kind, how) {
|
|
6
6
|
const spec = SERVICE_SPECS[kind];
|
|
7
7
|
return z.strictObject({
|
|
@@ -10,7 +10,7 @@ function share(kind, how) {
|
|
|
10
10
|
.describe('Hand your saved ' +
|
|
11
11
|
spec.label +
|
|
12
12
|
' sign-in to sandboxes that use ' +
|
|
13
|
-
spec.usedBy
|
|
13
|
+
usedByText(spec.usedBy) +
|
|
14
14
|
' (' +
|
|
15
15
|
how +
|
|
16
16
|
'). Kept encrypted on this PC; ' +
|
|
@@ -20,13 +20,15 @@ function share(kind, how) {
|
|
|
20
20
|
}
|
|
21
21
|
export const AccountsSchema = z
|
|
22
22
|
.strictObject({
|
|
23
|
-
epic: share('epic', "sign in to the launcher once in a sandbox, or take this PC's
|
|
24
|
-
steam: share('steam', 'sign in once with sbx-steam login, or
|
|
25
|
-
unity: share('unity', "sign in once in a sandbox, or take this PC's licence
|
|
26
|
-
cfx: share('cfx', '
|
|
27
|
-
keystore: share('keystore', '
|
|
28
|
-
play: share('play', '
|
|
29
|
-
expo: share('expo', '
|
|
30
|
-
appstore: share('appstore', '
|
|
23
|
+
epic: share('epic', "sign in to the launcher once in a sandbox, or take this PC's from Accounts"),
|
|
24
|
+
steam: share('steam', 'sign in once with sbx-steam login, or take it from a SteamCMD folder in Accounts'),
|
|
25
|
+
unity: share('unity', "sign in once in a sandbox, or take this PC's licence from Accounts"),
|
|
26
|
+
cfx: share('cfx', 'type the key in Accounts'),
|
|
27
|
+
keystore: share('keystore', 'import the upload.jks file in Accounts'),
|
|
28
|
+
play: share('play', 'import the service-account.json file in Accounts'),
|
|
29
|
+
expo: share('expo', 'type the token in Accounts'),
|
|
30
|
+
appstore: share('appstore', 'import the AuthKey.p8 file in Accounts'),
|
|
31
|
+
perplexity: share('perplexity', 'type the API key in Accounts, or import it from a .env file'),
|
|
32
|
+
comet: share('comet', 'sign in to Comet once in a sandbox: it cannot be taken from this PC'),
|
|
31
33
|
})
|
|
32
|
-
.describe('Service sign-ins for sandboxes (game stores, engines, app signing). Manage them in Accounts
|
|
34
|
+
.describe('Service sign-ins for sandboxes (game stores, engines, app signing, Perplexity). Manage them in Accounts.');
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CodexSchema: z.ZodObject<{
|
|
3
|
+
sandboxMode: z.ZodEnum<{
|
|
4
|
+
"danger-full-access": "danger-full-access";
|
|
5
|
+
"workspace-write": "workspace-write";
|
|
6
|
+
"read-only": "read-only";
|
|
7
|
+
}>;
|
|
8
|
+
approvalPolicy: z.ZodEnum<{
|
|
9
|
+
never: "never";
|
|
10
|
+
"on-request": "on-request";
|
|
11
|
+
"on-failure": "on-failure";
|
|
12
|
+
untrusted: "untrusted";
|
|
13
|
+
}>;
|
|
14
|
+
model: z.ZodString;
|
|
15
|
+
reasoningEffort: z.ZodEnum<{
|
|
16
|
+
default: "default";
|
|
17
|
+
minimal: "minimal";
|
|
18
|
+
low: "low";
|
|
19
|
+
medium: "medium";
|
|
20
|
+
high: "high";
|
|
21
|
+
xhigh: "xhigh";
|
|
22
|
+
}>;
|
|
23
|
+
windowsSandbox: z.ZodEnum<{
|
|
24
|
+
off: "off";
|
|
25
|
+
unelevated: "unelevated";
|
|
26
|
+
elevated: "elevated";
|
|
27
|
+
}>;
|
|
28
|
+
mcpLoginsInFile: z.ZodBoolean;
|
|
29
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// How Codex runs inside the sandbox. Yours only: a project file (.sandbox-config.json) cannot change it.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const CodexSchema = z.strictObject({
|
|
4
|
+
sandboxMode: z
|
|
5
|
+
.enum(['danger-full-access', 'workspace-write', 'read-only'])
|
|
6
|
+
.describe("Codex's own sandbox. Inside Windows Sandbox Codex's own sandbox only slows it down (it re-grants file permissions over your profile at every boot), so the default is danger-full-access: Windows Sandbox is the sandbox."),
|
|
7
|
+
approvalPolicy: z
|
|
8
|
+
.enum(['never', 'on-request', 'on-failure', 'untrusted'])
|
|
9
|
+
.describe('When Codex asks before it runs a command. "never" with danger-full-access starts it with no questions.'),
|
|
10
|
+
model: z
|
|
11
|
+
.string()
|
|
12
|
+
.max(100)
|
|
13
|
+
.regex(/^[A-Za-z0-9._:/-]*$/, 'letters, digits and . _ : / - only')
|
|
14
|
+
.describe("The model Codex uses. Empty = Codex's own default."),
|
|
15
|
+
reasoningEffort: z
|
|
16
|
+
.enum(['default', 'minimal', 'low', 'medium', 'high', 'xhigh'])
|
|
17
|
+
.describe('How hard Codex thinks. "default" = Codex\'s own default.'),
|
|
18
|
+
windowsSandbox: z
|
|
19
|
+
.enum(['off', 'unelevated', 'elevated'])
|
|
20
|
+
.describe('Codex\'s Windows sandbox mode in its config.toml. "off" removes the setting so Codex does not set up its sandbox users and firewall rules at every boot.'),
|
|
21
|
+
mcpLoginsInFile: z
|
|
22
|
+
.boolean()
|
|
23
|
+
.describe('Keep the sign-ins of Codex\'s MCP servers in a file in the saved Codex folder (mcp_oauth_credentials_store = "file"), so they survive between sandboxes. A value you set in config.toml is kept.'),
|
|
24
|
+
});
|
|
@@ -121,6 +121,12 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
121
121
|
appstore: z.ZodObject<{
|
|
122
122
|
share: z.ZodBoolean;
|
|
123
123
|
}, z.core.$strict>;
|
|
124
|
+
perplexity: z.ZodObject<{
|
|
125
|
+
share: z.ZodBoolean;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
comet: z.ZodObject<{
|
|
128
|
+
share: z.ZodBoolean;
|
|
129
|
+
}, z.core.$strict>;
|
|
124
130
|
}, z.core.$strict>;
|
|
125
131
|
pcInstalls: z.ZodObject<{
|
|
126
132
|
steamGames: z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodNumber>]>;
|
|
@@ -190,6 +196,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
190
196
|
acceptLicense: z.ZodBoolean;
|
|
191
197
|
components: z.ZodArray<z.ZodString>;
|
|
192
198
|
keepInstallFiles: z.ZodBoolean;
|
|
199
|
+
visualStudio: z.ZodEnum<{
|
|
200
|
+
full: "full";
|
|
201
|
+
autosdk: "autosdk";
|
|
202
|
+
}>;
|
|
193
203
|
persistEngines: z.ZodBoolean;
|
|
194
204
|
derivedDataCache: z.ZodEnum<{
|
|
195
205
|
persisted: "persisted";
|
|
@@ -444,6 +454,34 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
444
454
|
resumeArguments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
445
455
|
resumeOneArguments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
446
456
|
}, z.core.$strict>>;
|
|
457
|
+
codex: z.ZodObject<{
|
|
458
|
+
sandboxMode: z.ZodEnum<{
|
|
459
|
+
"danger-full-access": "danger-full-access";
|
|
460
|
+
"workspace-write": "workspace-write";
|
|
461
|
+
"read-only": "read-only";
|
|
462
|
+
}>;
|
|
463
|
+
approvalPolicy: z.ZodEnum<{
|
|
464
|
+
never: "never";
|
|
465
|
+
"on-request": "on-request";
|
|
466
|
+
"on-failure": "on-failure";
|
|
467
|
+
untrusted: "untrusted";
|
|
468
|
+
}>;
|
|
469
|
+
model: z.ZodString;
|
|
470
|
+
reasoningEffort: z.ZodEnum<{
|
|
471
|
+
default: "default";
|
|
472
|
+
minimal: "minimal";
|
|
473
|
+
low: "low";
|
|
474
|
+
medium: "medium";
|
|
475
|
+
high: "high";
|
|
476
|
+
xhigh: "xhigh";
|
|
477
|
+
}>;
|
|
478
|
+
windowsSandbox: z.ZodEnum<{
|
|
479
|
+
off: "off";
|
|
480
|
+
unelevated: "unelevated";
|
|
481
|
+
elevated: "elevated";
|
|
482
|
+
}>;
|
|
483
|
+
mcpLoginsInFile: z.ZodBoolean;
|
|
484
|
+
}, z.core.$strict>;
|
|
447
485
|
hooks: z.ZodObject<{
|
|
448
486
|
failFast: z.ZodBoolean;
|
|
449
487
|
}, z.core.$strict>;
|
|
@@ -534,6 +572,12 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
534
572
|
appstore: z.ZodOptional<z.ZodObject<{
|
|
535
573
|
share: z.ZodOptional<z.ZodBoolean>;
|
|
536
574
|
}, z.core.$strict>>;
|
|
575
|
+
perplexity: z.ZodOptional<z.ZodObject<{
|
|
576
|
+
share: z.ZodOptional<z.ZodBoolean>;
|
|
577
|
+
}, z.core.$strict>>;
|
|
578
|
+
comet: z.ZodOptional<z.ZodObject<{
|
|
579
|
+
share: z.ZodOptional<z.ZodBoolean>;
|
|
580
|
+
}, z.core.$strict>>;
|
|
537
581
|
}, z.core.$strict>>;
|
|
538
582
|
provisioning: z.ZodOptional<z.ZodObject<{
|
|
539
583
|
copyFromHost: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -556,7 +600,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
556
600
|
}, z.core.$strict>>;
|
|
557
601
|
toolchains: z.ZodOptional<z.ZodObject<{
|
|
558
602
|
environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
559
|
-
|
|
603
|
+
unity: z.ZodOptional<z.ZodObject<{
|
|
560
604
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
561
605
|
}, z.core.$strict> | z.ZodObject<{
|
|
562
606
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -571,7 +615,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
571
615
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
572
616
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
573
617
|
}, z.core.$strict>>;
|
|
574
|
-
|
|
618
|
+
godot: z.ZodOptional<z.ZodObject<{
|
|
575
619
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
576
620
|
}, z.core.$strict> | z.ZodObject<{
|
|
577
621
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -586,7 +630,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
586
630
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
587
631
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
588
632
|
}, z.core.$strict>>;
|
|
589
|
-
|
|
633
|
+
android: z.ZodOptional<z.ZodObject<{
|
|
590
634
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
591
635
|
}, z.core.$strict> | z.ZodObject<{
|
|
592
636
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -601,7 +645,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
601
645
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
602
646
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
603
647
|
}, z.core.$strict>>;
|
|
604
|
-
|
|
648
|
+
flutter: z.ZodOptional<z.ZodObject<{
|
|
605
649
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
606
650
|
}, z.core.$strict> | z.ZodObject<{
|
|
607
651
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -616,7 +660,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
616
660
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
617
661
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
618
662
|
}, z.core.$strict>>;
|
|
619
|
-
|
|
663
|
+
dart: z.ZodOptional<z.ZodObject<{
|
|
620
664
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
621
665
|
}, z.core.$strict> | z.ZodObject<{
|
|
622
666
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -631,7 +675,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
631
675
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
632
676
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
633
677
|
}, z.core.$strict>>;
|
|
634
|
-
|
|
678
|
+
reactNative: z.ZodOptional<z.ZodObject<{
|
|
635
679
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
636
680
|
}, z.core.$strict> | z.ZodObject<{
|
|
637
681
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -646,7 +690,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
646
690
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
647
691
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
648
692
|
}, z.core.$strict>>;
|
|
649
|
-
|
|
693
|
+
unreal: z.ZodOptional<z.ZodObject<{
|
|
650
694
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
651
695
|
}, z.core.$strict> | z.ZodObject<{
|
|
652
696
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -661,7 +705,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
661
705
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
662
706
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
663
707
|
}, z.core.$strict>>;
|
|
664
|
-
|
|
708
|
+
node: z.ZodOptional<z.ZodObject<{
|
|
665
709
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
666
710
|
}, z.core.$strict> | z.ZodObject<{
|
|
667
711
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -676,7 +720,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
676
720
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
677
721
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
678
722
|
}, z.core.$strict>>;
|
|
679
|
-
|
|
723
|
+
go: z.ZodOptional<z.ZodObject<{
|
|
680
724
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
681
725
|
}, z.core.$strict> | z.ZodObject<{
|
|
682
726
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -691,7 +735,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
691
735
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
692
736
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
693
737
|
}, z.core.$strict>>;
|
|
694
|
-
|
|
738
|
+
python: z.ZodOptional<z.ZodObject<{
|
|
695
739
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
696
740
|
}, z.core.$strict> | z.ZodObject<{
|
|
697
741
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -706,7 +750,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
706
750
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
707
751
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
708
752
|
}, z.core.$strict>>;
|
|
709
|
-
|
|
753
|
+
rust: z.ZodOptional<z.ZodObject<{
|
|
710
754
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
711
755
|
}, z.core.$strict> | z.ZodObject<{
|
|
712
756
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -721,7 +765,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
721
765
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
722
766
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
723
767
|
}, z.core.$strict>>;
|
|
724
|
-
|
|
768
|
+
msvc: z.ZodOptional<z.ZodObject<{
|
|
725
769
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
726
770
|
}, z.core.$strict> | z.ZodObject<{
|
|
727
771
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -736,7 +780,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
736
780
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
737
781
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
738
782
|
}, z.core.$strict>>;
|
|
739
|
-
|
|
783
|
+
steam: z.ZodOptional<z.ZodObject<{
|
|
740
784
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
741
785
|
}, z.core.$strict> | z.ZodObject<{
|
|
742
786
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -751,7 +795,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
751
795
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
752
796
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
753
797
|
}, z.core.$strict>>;
|
|
754
|
-
|
|
798
|
+
fivem: z.ZodOptional<z.ZodObject<{
|
|
755
799
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
756
800
|
}, z.core.$strict> | z.ZodObject<{
|
|
757
801
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -4,6 +4,7 @@ import _ from 'lodash';
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { NameSchema, SchemaRefSchema, StringsSchema, toggle } from './common.js';
|
|
6
6
|
import { DatabasesSchema } from './databases.js';
|
|
7
|
+
import { CodexSchema } from './codex.js';
|
|
7
8
|
import { HarnessSchema } from './harness.js';
|
|
8
9
|
import { AgentCommandsSchema, AttachSchema, ClaudeProfileSchema, SecretsSchema } from './profile.js';
|
|
9
10
|
import { AuditSchema, DownloadsSchema, SharingSchema, GitSchema, GuestWorkspaceSchema, MappingSchema, NetworkSchema, ProvisioningSchema, SandboxSchema, WorkspaceFilterSchema, } from './sandbox.js';
|
|
@@ -52,7 +53,7 @@ export function reservedEnvName(name) {
|
|
|
52
53
|
export const ConfigSchema = z
|
|
53
54
|
.strictObject({
|
|
54
55
|
$schema: SchemaRefSchema.optional(),
|
|
55
|
-
defaultHarness: NameSchema.describe('
|
|
56
|
+
defaultHarness: NameSchema.describe('The agent that starts when you do not name one (starting claude by name always runs claude).'),
|
|
56
57
|
guestWorkspace: GuestWorkspaceSchema,
|
|
57
58
|
readOnly: z.boolean().describe('Map the workspace read-only.'),
|
|
58
59
|
workspaceFilter: WorkspaceFilterSchema,
|
|
@@ -64,7 +65,7 @@ export const ConfigSchema = z
|
|
|
64
65
|
root: z
|
|
65
66
|
.string()
|
|
66
67
|
.min(1)
|
|
67
|
-
.describe('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.
|
|
68
|
+
.describe('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. Maintenance > Storage moves it.'),
|
|
68
69
|
persistAgentState: z.boolean().describe('Keep agent logins and history between sandboxes.'),
|
|
69
70
|
dataName: NameSchema.describe('Name of the persistent data set (C:\\AgentData) shared by all workspaces.'),
|
|
70
71
|
markSandboxFiles: z
|
|
@@ -72,7 +73,7 @@ export const ConfigSchema = z
|
|
|
72
73
|
.describe('Programs and scripts (.exe, .ps1, .bat, .cmd, .msi, .lnk ...) that appear or change in your project while a sandbox runs get Windows\' "downloaded from the internet" mark, so SmartScreen and PowerShell ask before they run on this PC.'),
|
|
73
74
|
contained: z
|
|
74
75
|
.enum(['off', 'vhdx'])
|
|
75
|
-
.describe('(beta) Keep the sandbox tools, state and logs inside one disk image file (vhdx) instead of loose folders, so scanning programs on this PC see one file. Not yet tried on a real PC. Turn it on
|
|
76
|
+
.describe('(beta) Keep the sandbox tools, state and logs inside one disk image file (vhdx) instead of loose folders, so scanning programs on this PC see one file. Not yet tried on a real PC. Turn it on in Maintenance > Storage (it moves your files and asks first); Windows asks for permission to mount the image when a sandbox starts. "off" = loose folders, as always. Yours only: a project file (.sandbox-config.json) cannot set it.'),
|
|
76
77
|
containedMaxGb: z
|
|
77
78
|
.number()
|
|
78
79
|
.int()
|
|
@@ -82,7 +83,7 @@ export const ConfigSchema = z
|
|
|
82
83
|
warnDataGb: z
|
|
83
84
|
.number()
|
|
84
85
|
.min(0)
|
|
85
|
-
.describe('Say at launch when the persisted data (tools, databases, logins) is bigger than this many GB; 0 = never.
|
|
86
|
+
.describe('Say at launch when the persisted data (tools, databases, logins) is bigger than this many GB; 0 = never. Maintenance > Data shows what takes the space.'),
|
|
86
87
|
}),
|
|
87
88
|
network: NetworkSchema,
|
|
88
89
|
vpn: VpnSchema,
|
|
@@ -101,6 +102,7 @@ export const ConfigSchema = z
|
|
|
101
102
|
apps: AppsSchema,
|
|
102
103
|
claudeProfile: ClaudeProfileSchema,
|
|
103
104
|
harnesses: z.record(NameSchema, HarnessSchema).describe('Agents that can run in the sandbox.'),
|
|
105
|
+
codex: CodexSchema,
|
|
104
106
|
hooks: z.strictObject({ failFast: z.boolean().describe('Stop when a hook script fails.') }),
|
|
105
107
|
projects: ProjectsSchema.describe('Several projects in one sandbox: folders of projects mapped at every start, and adding folders while it runs.'),
|
|
106
108
|
resume: ResumeSchema.describe('Reopening the sessions of the last sandbox when a new one starts.'),
|
|
@@ -3,5 +3,5 @@ import { z } from 'zod';
|
|
|
3
3
|
export const GithubSchema = z.strictObject({
|
|
4
4
|
shareToken: z
|
|
5
5
|
.boolean()
|
|
6
|
-
.describe('Give each sandbox the GitHub token you saved
|
|
6
|
+
.describe('Give each sandbox the GitHub token you saved in Accounts (best a fine-grained token limited to some repositories and permissions), so gh and https git work there without logging in. Only with provisioning.git.access "full". The agent in the sandbox can read the token and use it for whatever it allows. A project file (.sandbox-config.json) cannot turn this on.'),
|
|
7
7
|
});
|
|
@@ -2,6 +2,7 @@ export { GitAccessSchema, NameSchema, secret } from './common.js';
|
|
|
2
2
|
export { REDACTED, redactSecrets, scrubSecrets, secretPaths, secretValues } from './redact.js';
|
|
3
3
|
export { ConfigSchema, LocalOverridesSchema } from './config.js';
|
|
4
4
|
export { HarnessSchema } from './harness.js';
|
|
5
|
+
export { CodexSchema } from './codex.js';
|
|
5
6
|
export { describeIssues, jsonSchemas } from './json-schema.js';
|
|
6
7
|
export { MappingSchema } from './sandbox.js';
|
|
7
8
|
export { ToolchainsSchema } from './toolchains.js';
|
|
@@ -4,6 +4,7 @@ export { GitAccessSchema, NameSchema, secret } from './common.js';
|
|
|
4
4
|
export { REDACTED, redactSecrets, scrubSecrets, secretPaths, secretValues } from './redact.js';
|
|
5
5
|
export { ConfigSchema, LocalOverridesSchema } from './config.js';
|
|
6
6
|
export { HarnessSchema } from './harness.js';
|
|
7
|
+
export { CodexSchema } from './codex.js';
|
|
7
8
|
export { describeIssues, jsonSchemas } from './json-schema.js';
|
|
8
9
|
export { MappingSchema } from './sandbox.js';
|
|
9
10
|
export { ToolchainsSchema } from './toolchains.js';
|
|
@@ -12,16 +12,18 @@ export const SecretsSchema = z.strictObject({
|
|
|
12
12
|
.describe('Warn at launch about files in the workspace that usually hold secrets (.env, *.pem, credentials.json, ...). The agent CAN read them: Windows Sandbox maps the whole folder.'),
|
|
13
13
|
});
|
|
14
14
|
export const AttachSchema = z.strictObject({
|
|
15
|
-
enabled: z
|
|
15
|
+
enabled: z
|
|
16
|
+
.boolean()
|
|
17
|
+
.describe("Allow attaching this PC's terminal to a session (the terminal option when starting an agent, and attach)."),
|
|
16
18
|
reuseSession: z
|
|
17
19
|
.boolean()
|
|
18
|
-
.describe("
|
|
20
|
+
.describe("Starting an agent with a terminal in a running sandbox reattaches to this folder's session when no terminal on this PC is attached to it (starting a new session on purpose always starts another)."),
|
|
19
21
|
auto: z
|
|
20
22
|
.boolean()
|
|
21
23
|
.describe('Starting an agent attaches this terminal automatically, as if you passed -t (only in an interactive terminal).'),
|
|
22
24
|
autoHide: z
|
|
23
25
|
.boolean()
|
|
24
|
-
.describe('Hide the Windows Sandbox window whenever this terminal attaches; it keeps running (
|
|
26
|
+
.describe('Hide the Windows Sandbox window whenever this terminal attaches; it keeps running (Sandbox > Status shows it again).'),
|
|
25
27
|
confirmCtrlC: z
|
|
26
28
|
.boolean()
|
|
27
29
|
.describe('In an attached terminal and the sandbox window, a single Ctrl+C is held back (the title says so) and only a second one within 1.5 seconds reaches the agent: a Ctrl+C meant as "copy" no longer stops it. Esc still stops an agent.'),
|
|
@@ -39,7 +41,9 @@ export const ClaudeProfileSchema = z.strictObject({
|
|
|
39
41
|
hostDir: z.string().describe('Your Claude folder, or "auto" (~/.claude or CLAUDE_CONFIG_DIR).'),
|
|
40
42
|
include: z.array(z.string().regex(/^[A-Za-z0-9._-]+$/)).describe('Files and folders copied from it.'),
|
|
41
43
|
globalStateFile: z.string().describe('Your .claude.json, or "auto". Empty string = do not copy.'),
|
|
42
|
-
copyCredentials: z
|
|
44
|
+
copyCredentials: z
|
|
45
|
+
.boolean()
|
|
46
|
+
.describe('Copy your Claude LOGIN into the sandbox. Prefer saving the login in Accounts instead.'),
|
|
43
47
|
overwrite: z.boolean().describe('Refresh these settings from this PC on every launch.'),
|
|
44
48
|
sharePluginsAcrossAccounts: z
|
|
45
49
|
.boolean()
|
|
@@ -5,7 +5,7 @@ export const RESUME_SESSIONS = ['ask', 'always', 'afterCrash', 'never'];
|
|
|
5
5
|
export const ResumeSchema = z.strictObject({
|
|
6
6
|
sessions: z
|
|
7
7
|
.enum(RESUME_SESSIONS)
|
|
8
|
-
.describe('When a sandbox starts after one that had agent sessions: "ask" lists them and asks whether to reopen them (without a terminal it
|
|
8
|
+
.describe('When a sandbox starts after one that had agent sessions: "ask" lists them and asks whether to reopen them (without a terminal it only says they can be reopened), "always" reopens them, "afterCrash" reopens them only when the last sandbox ended unexpectedly, "never" leaves it to you (Sessions reopens them). Terminal tabs you opened yourself in the sandbox are never reopened.'),
|
|
9
9
|
restartAfterCrash: z
|
|
10
10
|
.boolean()
|
|
11
11
|
.describe('When the sandbox ends because Windows Sandbox crashed or ran out of memory, start it again by itself and reopen its sessions (at most 3 times in 6 hours).'),
|
|
@@ -18,7 +18,7 @@ export const MappingSchema = z.strictObject({
|
|
|
18
18
|
export const SandboxSchema = z.strictObject({
|
|
19
19
|
engine: z
|
|
20
20
|
.enum(['windows-sandbox', 'hcs'])
|
|
21
|
-
.describe('(alpha) What runs the sandbox. "windows-sandbox" = Windows Sandbox (the default: desktop, Windows Terminal, GPU, clipboard, audio, printers). "hcs" = a headless Hyper-V isolated Server Core container for agents (no desktop, GPU or clipboard); it needs Windows features and an image on this PC (
|
|
21
|
+
.describe('(alpha) What runs the sandbox. "windows-sandbox" = Windows Sandbox (the default: desktop, Windows Terminal, GPU, clipboard, audio, printers). "hcs" = a headless Hyper-V isolated Server Core container for agents (no desktop, GPU or clipboard); it needs Windows features and an image on this PC (Maintenance > Engine lists what is missing), and starting it is not enabled yet in this alpha. Maintenance > Engine shows what each engine can do. Yours only: a project file (.sandbox-config.json) cannot set it.'),
|
|
22
22
|
memoryMb: z
|
|
23
23
|
.union([z.literal('auto'), z.number().int().min(2048)])
|
|
24
24
|
.describe('Sandbox RAM in MB (>= 2048), or "auto": free RAM minus reserveHostMb, capped at maxMemoryMb. Never more than this PC can keep in RAM for it (its RAM minus the larger of reserveHostMb and 25 %, 4 GB more with vGPU): a bigger value is lowered.'),
|
|
@@ -55,7 +55,7 @@ export const SandboxSchema = z.strictObject({
|
|
|
55
55
|
networking: z.boolean().describe('Internet access. false is the only hard network isolation Windows Sandbox offers.'),
|
|
56
56
|
clipboard: z
|
|
57
57
|
.boolean()
|
|
58
|
-
.describe("Shared clipboard between this PC and the sandbox. Also lets an agent's copy (in
|
|
58
|
+
.describe("Shared clipboard between this PC and the sandbox. Also lets an agent's copy (in an attached terminal) reach this PC's clipboard."),
|
|
59
59
|
audioInput: z.boolean().describe('Microphone access.'),
|
|
60
60
|
videoInput: z.boolean().describe('Camera access.'),
|
|
61
61
|
printerRedirection: z.boolean().describe('Printers from this PC.'),
|
|
@@ -108,7 +108,7 @@ export const NetworkSchema = z.strictObject({
|
|
|
108
108
|
export const AuditSchema = z.strictObject({
|
|
109
109
|
enabled: z
|
|
110
110
|
.boolean()
|
|
111
|
-
.describe('Keep an audit log on this PC of what your agents did: programs started (with their command lines, secrets hidden), files changed in the projects, git commits, sessions, and what the repo guard caught, each linked to the agent session that did it where that can be known. The sandbox cannot change it. Read it
|
|
111
|
+
.describe('Keep an audit log on this PC of what your agents did: programs started (with their command lines, secrets hidden), files changed in the projects, git commits, sessions, and what the repo guard caught, each linked to the agent session that did it where that can be known. The sandbox cannot change it. Read it on the Activity page.'),
|
|
112
112
|
days: z
|
|
113
113
|
.number()
|
|
114
114
|
.int()
|
|
@@ -39,6 +39,10 @@ export declare const ToolchainsSchema: z.ZodObject<{
|
|
|
39
39
|
acceptLicense: z.ZodBoolean;
|
|
40
40
|
components: z.ZodArray<z.ZodString>;
|
|
41
41
|
keepInstallFiles: z.ZodBoolean;
|
|
42
|
+
visualStudio: z.ZodEnum<{
|
|
43
|
+
full: "full";
|
|
44
|
+
autosdk: "autosdk";
|
|
45
|
+
}>;
|
|
42
46
|
persistEngines: z.ZodBoolean;
|
|
43
47
|
derivedDataCache: z.ZodEnum<{
|
|
44
48
|
persisted: "persisted";
|
|
@@ -62,6 +62,9 @@ export const ToolchainsSchema = z.strictObject({
|
|
|
62
62
|
keepInstallFiles: z
|
|
63
63
|
.boolean()
|
|
64
64
|
.describe('Keep an offline copy of the Visual Studio install files in tools\\visualstudio (~10 GB, made once), so later boots install without downloading them again. Skipped while that disk has too little room.'),
|
|
65
|
+
visualStudio: z
|
|
66
|
+
.enum(['full', 'autosdk'])
|
|
67
|
+
.describe('"full": install Visual Studio Community (the engine finds it through the Setup API; ~10 GB, redone every boot). "autosdk" (experimental): skip Visual Studio and build an Unreal AutoSDK tree from the portable MSVC in tools\\unreal\\autosdk (kept between sandboxes); UnrealBuildTool finds MSVC through AutoSDK, but the editor\'s Visual Studio integration is not available. Needs toolchains.msvc (turned on for you).'),
|
|
65
68
|
persistEngines: z
|
|
66
69
|
.boolean()
|
|
67
70
|
.describe('Engines the Epic Games Launcher installs go to tools\\unreal\\engines (kept between sandboxes, 40-60 GB each) and are registered with the launcher again every boot. Off: they go on the sandbox disk and are lost when it closes. Engines installed on this PC can be mapped instead (pcInstalls.unrealEngines).'),
|
package/dist/core/schema/vpn.js
CHANGED
|
@@ -4,7 +4,7 @@ export const VPN_PROVIDERS = ['nordvpn', 'openvpn-file', 'wireguard-file'];
|
|
|
4
4
|
export const VpnSchema = z.strictObject({
|
|
5
5
|
enabled: z
|
|
6
6
|
.boolean()
|
|
7
|
-
.describe("(Alpha: not yet tried on a real PC) Send the sandbox's traffic through a VPN. Only the sandbox: your PC's own connection is untouched. Needs a saved login first (
|
|
7
|
+
.describe("(Alpha: not yet tried on a real PC) Send the sandbox's traffic through a VPN. Only the sandbox: your PC's own connection is untouched. Needs a saved login first (Settings > Network > VPN). The agent in the sandbox can read that login and can turn the tunnel off (it is the administrator there)."),
|
|
8
8
|
provider: z
|
|
9
9
|
.enum(VPN_PROVIDERS)
|
|
10
10
|
.describe('nordvpn: a recommended NordVPN server is picked at every launch. openvpn-file: your own .ovpn file (configFile). wireguard-file: your own WireGuard .conf (configFile), e.g. from your company.'),
|
package/dist/core/schema/web.js
CHANGED
|
@@ -20,7 +20,7 @@ export const RemoteUserSchema = z.strictObject({
|
|
|
20
20
|
export const WebLanSchema = z.strictObject({
|
|
21
21
|
enabled: z
|
|
22
22
|
.boolean()
|
|
23
|
-
.describe('(Beta) Devices on your network (a phone): an HTTPS address on this PC for devices you pair with a one-time code (
|
|
23
|
+
.describe('(Beta) Devices on your network (a phone): an HTTPS address on this PC for devices you pair with a one-time code (Remote access). Needs a firewall rule (turning it on asks Windows once). Off: every paired device is signed out.'),
|
|
24
24
|
port: z.number().int().min(1024).max(65535).describe('HTTPS port for paired devices on your network.'),
|
|
25
25
|
address: z
|
|
26
26
|
.string()
|
|
@@ -32,7 +32,7 @@ export const WebLanSchema = z.strictObject({
|
|
|
32
32
|
export const WebRemoteSchema = z.strictObject({
|
|
33
33
|
windowsSignIn: z
|
|
34
34
|
.boolean()
|
|
35
|
-
.describe('(Beta) Other Windows users of this PC named in web.remote.users sign in to your web UI (and
|
|
35
|
+
.describe('(Beta) Other Windows users of this PC named in web.remote.users sign in to your web UI (and the remote menu) with their own Windows account: no password, no link.'),
|
|
36
36
|
users: z
|
|
37
37
|
.array(RemoteUserSchema)
|
|
38
38
|
.max(32)
|
|
@@ -48,7 +48,7 @@ export const WebRemoteSchema = z.strictObject({
|
|
|
48
48
|
export const WebSchema = z.strictObject({
|
|
49
49
|
enabled: z
|
|
50
50
|
.boolean()
|
|
51
|
-
.describe('(Beta) The web UI: your
|
|
51
|
+
.describe('(Beta) The web UI: your sessions in a browser on this PC (http://127.0.0.1:<port>, this PC only). On: every start of a sandbox also starts it in the background (it keeps running until you stop it in Maintenance > Web UI or restart the PC). Off: it runs only when you start it there. Open it signed in from the same page.'),
|
|
52
52
|
port: z
|
|
53
53
|
.number()
|
|
54
54
|
.int()
|
package/dist/core/types.d.ts
CHANGED
|
@@ -225,6 +225,12 @@ export interface GuestSession {
|
|
|
225
225
|
*/
|
|
226
226
|
projectsDir?: string;
|
|
227
227
|
roots?: string[];
|
|
228
|
+
/** The same folders with the PC folder each shows (roots first), for the sandbox guide. */
|
|
229
|
+
mappedProjects?: {
|
|
230
|
+
host: string;
|
|
231
|
+
guest: string;
|
|
232
|
+
root?: boolean;
|
|
233
|
+
}[];
|
|
228
234
|
/** false: start no agent session at boot (a restart that adds a project opens its sessions itself). */
|
|
229
235
|
autoSession?: boolean;
|
|
230
236
|
harnessName: string;
|
|
@@ -284,6 +290,8 @@ export interface GuestSession {
|
|
|
284
290
|
* creates.
|
|
285
291
|
*/
|
|
286
292
|
agentBackstop?: 'auto' | 'none' | number;
|
|
293
|
+
/** The codex settings: the flags every Codex start gets and what boot writes to its config.toml. */
|
|
294
|
+
codex?: Config['codex'];
|
|
287
295
|
/** "gentle" when vGPU is on: the governor and the watchdog act earlier, compilers run below normal. */
|
|
288
296
|
loadProfile?: 'normal' | 'gentle';
|
|
289
297
|
/** sandbox.pressureResponse: the daemon slows builds down when memory runs low. */
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
/** A step that fixes a problem: the menu and the web offer `op` as a button, the command line prints `cli`. */
|
|
2
|
+
export interface ErrorAction {
|
|
3
|
+
readonly op: string;
|
|
4
|
+
readonly input?: Readonly<Record<string, unknown>>;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly cli: string;
|
|
7
|
+
}
|
|
1
8
|
/** An expected problem the user can act on: what went wrong, and (optionally) how to fix it. */
|
|
2
9
|
export declare class UserError extends Error {
|
|
3
10
|
readonly fix?: string | undefined;
|
|
4
|
-
|
|
11
|
+
readonly action?: ErrorAction | undefined;
|
|
12
|
+
constructor(message: string, fix?: string | undefined, action?: ErrorAction | undefined);
|
|
5
13
|
}
|
|
6
14
|
/** Throws a UserError. Typed explicitly so TypeScript narrows after calls (arrow functions need it to act as never). */
|
|
7
15
|
export declare const fail: (message: string, fix?: string) => never;
|
|
16
|
+
/** Throws a UserError whose fix is also a button (menu, web) and a command line (CLI). */
|
|
17
|
+
export declare const failWith: (message: string, fix: string, action: ErrorAction) => never;
|
|
8
18
|
export declare function errMsg(e: unknown): string;
|
package/dist/core/util/errors.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/** An expected problem the user can act on: what went wrong, and (optionally) how to fix it. */
|
|
2
2
|
export class UserError extends Error {
|
|
3
3
|
fix;
|
|
4
|
-
|
|
4
|
+
action;
|
|
5
|
+
constructor(message, fix, action) {
|
|
5
6
|
super(message);
|
|
6
7
|
this.fix = fix;
|
|
8
|
+
this.action = action;
|
|
7
9
|
this.name = 'UserError';
|
|
8
10
|
}
|
|
9
11
|
}
|
|
@@ -11,6 +13,10 @@ export class UserError extends Error {
|
|
|
11
13
|
export const fail = (message, fix) => {
|
|
12
14
|
throw new UserError(message, fix);
|
|
13
15
|
};
|
|
16
|
+
/** Throws a UserError whose fix is also a button (menu, web) and a command line (CLI). */
|
|
17
|
+
export const failWith = (message, fix, action) => {
|
|
18
|
+
throw new UserError(message, fix, action);
|
|
19
|
+
};
|
|
14
20
|
export function errMsg(e) {
|
|
15
21
|
return e instanceof Error ? e.message : String(e);
|
|
16
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { isWin, sleep, captureOutput } from './process.js';
|
|
2
|
-
export { UserError, fail, errMsg } from './errors.js';
|
|
2
|
+
export { UserError, fail, failWith, errMsg, type ErrorAction } from './errors.js';
|
|
3
3
|
export { parseJsonc, readJsonc } from './jsonc.js';
|
|
4
4
|
export { ensureDir, dirExists, fileExists, fileExistsAsync, readJson, readSmallFile, tryReadJson, writeJson, realPath, } from './fs.js';
|
|
5
5
|
export { xmlEscape, safeText, plainText } from './text.js';
|