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
|
@@ -6,6 +6,7 @@ import { NEVER_LOOSER } from '../../../core/local-config/index.js';
|
|
|
6
6
|
import { redactSecrets } from '../../../core/schema/index.js';
|
|
7
7
|
import { fail } from '../../../core/util/index.js';
|
|
8
8
|
import { closest } from '../../../cli/validate.js';
|
|
9
|
+
import { isToolchainReady } from '../../../shared/readiness.js';
|
|
9
10
|
import { fieldOf } from '../../kernel/index.js';
|
|
10
11
|
import { categoryOf, labelOf, nameOf } from './categories.def.js';
|
|
11
12
|
/** Every editable setting of a file, each in its category (settings covered by another section are left out). */
|
|
@@ -24,7 +25,10 @@ export function settingsOf(file) {
|
|
|
24
25
|
section: several && category.id !== 'general' ? nameOf(top) : undefined,
|
|
25
26
|
},
|
|
26
27
|
];
|
|
27
|
-
return node
|
|
28
|
+
return node
|
|
29
|
+
.leaves([top])
|
|
30
|
+
.filter(({ key }) => top !== 'toolchains' || isToolchainReady(key[1]))
|
|
31
|
+
.map(({ key, node: leaf }) => {
|
|
28
32
|
const heading = [
|
|
29
33
|
several ? nameOf(top) : undefined,
|
|
30
34
|
key.length > 2 ? key.slice(1, -1).map(nameOf).join(' › ') : undefined,
|
|
@@ -98,5 +102,5 @@ export function findSetting(file, key) {
|
|
|
98
102
|
'"' +
|
|
99
103
|
(file.isProject ? ' a project can set' : '') +
|
|
100
104
|
'.' +
|
|
101
|
-
(hint ? ' Did you mean ' + hint + '?' : ''), 'Settings are named like sandbox.memoryMb.
|
|
105
|
+
(hint ? ' Did you mean ' + hint + '?' : ''), 'Settings are named like sandbox.memoryMb. Search the Settings page by name to find one.');
|
|
102
106
|
}
|
|
@@ -203,7 +203,7 @@ function dataFolderItem(folder) {
|
|
|
203
203
|
label: 'Data folder',
|
|
204
204
|
hint: folder,
|
|
205
205
|
cells: { setting: 'storage.root', value: folder },
|
|
206
|
-
description: 'Where your tools, logins, history and logs are kept between sandboxes.
|
|
206
|
+
description: 'Where your tools, logins, history and logs are kept between sandboxes. Maintenance > Storage moves it.',
|
|
207
207
|
primary: action(changeDataFolder, {}, { label: 'Data folder', verb: 'change' }),
|
|
208
208
|
};
|
|
209
209
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { Config } from '../../../core/types.js';
|
|
1
2
|
import { type AppContext } from '../../context.js';
|
|
2
3
|
import { type SettingsFiles } from './settings-rows.js';
|
|
4
|
+
import { type Scope } from './settings.def.js';
|
|
3
5
|
/** The file `sandbox config export` writes when none is named. */
|
|
4
6
|
export declare const DEFAULT_EXPORT = "sandbox-settings.json";
|
|
5
7
|
/** Your own settings file (the one --config names) and the project file of the current folder. */
|
|
@@ -48,6 +50,12 @@ export declare const getSettingRun: import("../../kernel/define.js").Implementat
|
|
|
48
50
|
/** The file of a scope, and the setting a key names in it. */
|
|
49
51
|
/** incoming with every *** that stands where saved has a text replaced by that saved text. Pure. */
|
|
50
52
|
export declare function keepShownSecrets(saved: unknown, incoming: unknown): unknown;
|
|
53
|
+
/** What brings this PC in line with a changed agentCommands setting (the real service, or a fake in a test). */
|
|
54
|
+
export interface AgentCommandsReconciler {
|
|
55
|
+
reconcile(config: Config): unknown;
|
|
56
|
+
}
|
|
57
|
+
/** After your own settings change: a key under agentCommands also changes this PC (files, PATH), on every surface. */
|
|
58
|
+
export declare function applyAgentCommandsChange(ctx: AppContext, scope: Scope, key: string, service?: AgentCommandsReconciler): void;
|
|
51
59
|
export declare const setSettingRun: import("../../kernel/define.js").Implementation<import("../../kernel/define.js").OperationDef<import("zod").ZodObject<{
|
|
52
60
|
scope: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
53
61
|
project: "project";
|
|
@@ -7,6 +7,7 @@ import { loadConfig } from '../../../core/config/index.js';
|
|
|
7
7
|
import { REDACTED, redactSecrets } from '../../../core/schema/index.js';
|
|
8
8
|
import { fail, safeText, writeJson } from '../../../core/util/index.js';
|
|
9
9
|
import { hereDir } from '../../../cli/commands/projects/here.js';
|
|
10
|
+
import { AgentCommandsService } from '../../../cli/services/agent-commands-service.js';
|
|
10
11
|
import { implement } from '../../context.js';
|
|
11
12
|
import { allowedText, cancelled, valueFromText } from '../../kernel/index.js';
|
|
12
13
|
import { CATEGORIES } from './categories.def.js';
|
|
@@ -66,6 +67,12 @@ function target(ctx, scope, name) {
|
|
|
66
67
|
const file = settingsFiles(ctx)[scope];
|
|
67
68
|
return { ...findSetting(file, name), file };
|
|
68
69
|
}
|
|
70
|
+
/** After your own settings change: a key under agentCommands also changes this PC (files, PATH), on every surface. */
|
|
71
|
+
export function applyAgentCommandsChange(ctx, scope, key, service = new AgentCommandsService(ctx)) {
|
|
72
|
+
if (scope !== 'user' || !/^agentCommands(\.|$)/.test(key))
|
|
73
|
+
return;
|
|
74
|
+
service.reconcile(freshConfig(ctx));
|
|
75
|
+
}
|
|
69
76
|
export const setSettingRun = implement(setSetting, (ctx, input) => {
|
|
70
77
|
const { key, node, file } = target(ctx, input.scope, input.key);
|
|
71
78
|
if (node.isSection)
|
|
@@ -81,6 +88,7 @@ export const setSettingRun = implement(setSetting, (ctx, input) => {
|
|
|
81
88
|
const outcome = file.set(key, value);
|
|
82
89
|
if (typeof outcome === 'object')
|
|
83
90
|
fail('Could not change ' + input.key + ': ' + outcome.problems.join('; '), 'Nothing was written.');
|
|
91
|
+
applyAgentCommandsChange(ctx, input.scope, input.key);
|
|
84
92
|
return {
|
|
85
93
|
key: input.key,
|
|
86
94
|
changed: outcome === 'saved',
|
|
@@ -96,6 +104,7 @@ export const resetSettingRun = implement(resetSetting, (ctx, input) => {
|
|
|
96
104
|
const outcome = file.set(key, undefined);
|
|
97
105
|
if (typeof outcome === 'object')
|
|
98
106
|
fail('Could not reset ' + input.key + ': ' + outcome.problems.join('; '), 'Nothing was written.');
|
|
107
|
+
applyAgentCommandsChange(ctx, input.scope, input.key);
|
|
99
108
|
return {
|
|
100
109
|
key: input.key,
|
|
101
110
|
changed: outcome === 'saved',
|
|
@@ -112,12 +121,12 @@ function freshConfig(ctx) {
|
|
|
112
121
|
function readImport(config, file) {
|
|
113
122
|
const source = path.resolve(file);
|
|
114
123
|
if (!fs.existsSync(source))
|
|
115
|
-
fail('There is no file ' + source + '.', 'Give the path of a file made by
|
|
124
|
+
fail('There is no file ' + source + '.', 'Give the path of a file made by Export settings.');
|
|
116
125
|
if (fs.statSync(source).size > MAX_BYTES)
|
|
117
126
|
fail(source + ' is too big to be a settings file.');
|
|
118
127
|
const plan = planImport(fs.readFileSync(source, 'utf8'), config);
|
|
119
128
|
if (plan.problems.length)
|
|
120
|
-
fail(source + ' is not valid settings:\n ' + plan.problems.map(safeText).join('\n '), 'Nothing was changed. Fix the file, or export a new one with
|
|
129
|
+
fail(source + ' is not valid settings:\n ' + plan.problems.map(safeText).join('\n '), 'Nothing was changed. Fix the file, or export a new one with Export settings.');
|
|
121
130
|
return plan;
|
|
122
131
|
}
|
|
123
132
|
/** Writes the planned changes to your settings file (comments stay); returns how many settings changed. */
|
|
@@ -151,7 +160,7 @@ export const importConfigRun = implement(importConfig, async (ctx, input, io) =>
|
|
|
151
160
|
const file = input.settingsFile ??
|
|
152
161
|
(await io.path({
|
|
153
162
|
title: 'Which settings file',
|
|
154
|
-
lines: ['A file made by Export settings (or
|
|
163
|
+
lines: ['A file made by Export settings (or one exported on the command line).'],
|
|
155
164
|
pathKind: 'file',
|
|
156
165
|
}));
|
|
157
166
|
if (file === undefined)
|
|
@@ -7,7 +7,7 @@ import fs from 'node:fs';
|
|
|
7
7
|
import path from 'node:path';
|
|
8
8
|
import { userConfigPath, userDir } from '../../../core/config/index.js';
|
|
9
9
|
import { humanBytes } from '../../../core/disk.js';
|
|
10
|
-
import { expandPath, fail } from '../../../core/util/index.js';
|
|
10
|
+
import { expandPath, fail, failWith } from '../../../core/util/index.js';
|
|
11
11
|
import { requireOnPc } from '../../../cli/commands/context.js';
|
|
12
12
|
import { StorageService } from '../../../cli/services/index.js';
|
|
13
13
|
import { isSandboxRunning, realContainedDeps } from '../../../host/sandbox/index.js';
|
|
@@ -26,7 +26,11 @@ function requireAvailable() {
|
|
|
26
26
|
}
|
|
27
27
|
function requireNoSandbox() {
|
|
28
28
|
if (isSandboxRunning())
|
|
29
|
-
|
|
29
|
+
failWith('A sandbox is running.', 'Stop it first: the folders in the image are in use.', {
|
|
30
|
+
op: 'sandbox.stop',
|
|
31
|
+
label: 'Stop the sandbox',
|
|
32
|
+
cli: 'sandbox stop',
|
|
33
|
+
});
|
|
30
34
|
}
|
|
31
35
|
function storageFor(ctx) {
|
|
32
36
|
const { config } = ctx.loaded;
|
|
@@ -122,7 +126,7 @@ async function useData(io, service, from, to, ask) {
|
|
|
122
126
|
cancelled('Nothing was changed.');
|
|
123
127
|
}
|
|
124
128
|
service.use(to);
|
|
125
|
-
return 'Your data is now looked for in ' + to + '. Move it later
|
|
129
|
+
return 'Your data is now looked for in ' + to + '. Move it later from Maintenance > Storage.';
|
|
126
130
|
}
|
|
127
131
|
export const showStorageRun = implement(showStorage, async (ctx, input, io) => {
|
|
128
132
|
requireOnPc('storage');
|
|
@@ -153,7 +157,12 @@ export const moveStorageRun = implement(moveStorage, async (ctx, input, io) => {
|
|
|
153
157
|
? expandPath(input.folder, process.cwd())
|
|
154
158
|
: await chooseFolder(io, service, 'move', 'Nothing was moved.');
|
|
155
159
|
if (!fs.existsSync(from))
|
|
156
|
-
|
|
160
|
+
failWith('There is nothing to move: ' + from + ' does not exist.', 'Switch to ' + to + ' without moving instead.', {
|
|
161
|
+
op: 'storage.use',
|
|
162
|
+
input: { folder: to },
|
|
163
|
+
label: 'Use ' + to,
|
|
164
|
+
cli: 'sandbox storage use ' + to,
|
|
165
|
+
});
|
|
157
166
|
return moveData(io, service, from, to, input.keepOld, true);
|
|
158
167
|
});
|
|
159
168
|
export const useStorageRun = implement(useStorage, async (ctx, input, io) => {
|
|
@@ -271,7 +280,7 @@ export const containedOnRun = implement(containedOn, async (ctx, _input, io) =>
|
|
|
271
280
|
noTerminal: { message: NO_TERMINAL, fix: 'Add --yes to turn it on without asking.' },
|
|
272
281
|
});
|
|
273
282
|
if (!turnOn)
|
|
274
|
-
fail('Nothing was changed.', '
|
|
283
|
+
fail('Nothing was changed.', 'Turn contained storage on when you want it.');
|
|
275
284
|
io.progress('Making and mounting the image (Windows asks for permission)');
|
|
276
285
|
const mount = await storage.acquire({ id: 'cli', pid: process.pid }, { create: true });
|
|
277
286
|
try {
|
|
@@ -293,7 +302,7 @@ export const containedOnRun = implement(containedOn, async (ctx, _input, io) =>
|
|
|
293
302
|
io.log(note, 'warn');
|
|
294
303
|
}
|
|
295
304
|
else
|
|
296
|
-
io.log('They stay where they are and are not used: tools are downloaded again into the image. Delete them later
|
|
305
|
+
io.log('They stay where they are and are not used: tools are downloaded again into the image. Delete them later in Maintenance > Data.');
|
|
297
306
|
}
|
|
298
307
|
writeContainedSetting(configFile, 'vhdx');
|
|
299
308
|
}
|
|
@@ -301,9 +310,9 @@ export const containedOnRun = implement(containedOn, async (ctx, _input, io) =>
|
|
|
301
310
|
io.progress('Dismounting the image (Windows asks for permission)');
|
|
302
311
|
const done = await storage.release('cli');
|
|
303
312
|
if (!done.dismounted)
|
|
304
|
-
io.log('The image stays mounted (' + (done.note ?? '') + ').
|
|
313
|
+
io.log('The image stays mounted (' + (done.note ?? '') + '). Repairing from Health dismounts it.', 'warn');
|
|
305
314
|
}
|
|
306
|
-
return { message: 'Contained storage is on. sandbox
|
|
315
|
+
return { message: 'Contained storage is on. The next sandbox mounts the image first.' };
|
|
307
316
|
});
|
|
308
317
|
export const containedOffRun = implement(containedOff, async (ctx, _input, io) => {
|
|
309
318
|
requireOnPc('storage');
|
|
@@ -345,7 +354,7 @@ export const containedOffRun = implement(containedOff, async (ctx, _input, io) =
|
|
|
345
354
|
io.progress('Dismounting the image (Windows asks for permission)');
|
|
346
355
|
const done = await storage.release('cli');
|
|
347
356
|
if (!done.dismounted)
|
|
348
|
-
io.log('The image stays mounted (' + (done.note ?? '') + ').
|
|
357
|
+
io.log('The image stays mounted (' + (done.note ?? '') + '). Repairing from Health dismounts it.', 'warn');
|
|
349
358
|
else if (!moved)
|
|
350
359
|
io.log('The image was dismounted; contained storage is still on.');
|
|
351
360
|
}
|
|
@@ -24,9 +24,9 @@ export function describeResult(result, _unattended) {
|
|
|
24
24
|
result.reason.replace(/\.?\s*$/, '.') +
|
|
25
25
|
(result.rolledBack
|
|
26
26
|
? ' The change was undone: you are on the version you had.'
|
|
27
|
-
: ' Going back to your previous version did not fully work:
|
|
27
|
+
: ' Going back to your previous version did not fully work: use Go back to the previous version, or run the installer.') +
|
|
28
28
|
(result.autoUpdateOff
|
|
29
|
-
? ' Automatic updates are off; turn them back on in Maintenance > Updates
|
|
29
|
+
? ' Automatic updates are off; turn them back on in Maintenance > Updates.'
|
|
30
30
|
: result.blocked
|
|
31
31
|
? ' It is not tried again; the next release is.'
|
|
32
32
|
: ' It is tried again later.'),
|
|
@@ -100,7 +100,7 @@ export function updatesPage(s, latest) {
|
|
|
100
100
|
title: 'This program',
|
|
101
101
|
notes: [
|
|
102
102
|
{
|
|
103
|
-
text: 'After an update this page still runs the version it started with
|
|
103
|
+
text: 'After an update this page still runs the version it started with. Stop and start the web UI (Maintenance > Web UI) to use the new one.',
|
|
104
104
|
tone: 'muted',
|
|
105
105
|
only: 'web',
|
|
106
106
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// runs, rollback on failure) stays in host/update.
|
|
4
4
|
import { userDir } from '../../../core/config/index.js';
|
|
5
5
|
import { errMsg, fail } from '../../../core/util/index.js';
|
|
6
|
-
import { MigrateService, NPM_UPDATE_COMMAND, UpdateService } from '../../../cli/services/index.js';
|
|
6
|
+
import { AgentCommandsService, MigrateService, NPM_UPDATE_COMMAND, UpdateService, } from '../../../cli/services/index.js';
|
|
7
7
|
import { implement } from '../../context.js';
|
|
8
8
|
import { cancelled } from '../../kernel/index.js';
|
|
9
9
|
import { describeResult, whereOf } from './update-lines.js';
|
|
@@ -39,7 +39,7 @@ export async function updateWith(service, input, io) {
|
|
|
39
39
|
const found = await service.check();
|
|
40
40
|
if (found.available && found.latest)
|
|
41
41
|
return {
|
|
42
|
-
line: 'Version ' + found.latest.version + ' is available (you have ' + found.current + ').
|
|
42
|
+
line: 'Version ' + found.latest.version + ' is available (you have ' + found.current + ').',
|
|
43
43
|
latest: found.latest.version,
|
|
44
44
|
};
|
|
45
45
|
if (found.blocked)
|
|
@@ -73,7 +73,17 @@ export const runUpdateRun = implement(runUpdate, async (ctx, input, io) => {
|
|
|
73
73
|
// A folder of the user's choosing is installed from only on the command line (the web and the menu send no feed).
|
|
74
74
|
if (input.feed !== undefined && input.feed !== ctx.options.feed)
|
|
75
75
|
fail('--feed works only on the command line.');
|
|
76
|
-
|
|
76
|
+
const result = await updateWith(UpdateService.forPackage(ctx.packageRoot, input.feed, { userDir: userDir() }), input, io);
|
|
77
|
+
// The agent commands (claude, codex ...) point at the program: bring them in line with what is installed now.
|
|
78
|
+
if (ctx.loaded.config.agentCommands.enabled && !input.check && !input.rollback && !input.auto) {
|
|
79
|
+
try {
|
|
80
|
+
new AgentCommandsService(ctx).reconcile(ctx.loaded.config);
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
// The update itself worked; the agent commands are put right at the next launch.
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
77
87
|
});
|
|
78
88
|
/** sandbox migrate's work, given the service (tests pass their own). */
|
|
79
89
|
export async function migrateWith(service, input, io) {
|
|
@@ -31,6 +31,17 @@ export declare const VpnStatusSchema: z.ZodObject<{
|
|
|
31
31
|
}>;
|
|
32
32
|
text: z.ZodString;
|
|
33
33
|
}, z.core.$strip>>;
|
|
34
|
+
lastFailure: z.ZodNullable<z.ZodObject<{
|
|
35
|
+
code: z.ZodEnum<{
|
|
36
|
+
auth: "auth";
|
|
37
|
+
unreachable: "unreachable";
|
|
38
|
+
driver: "driver";
|
|
39
|
+
timeout: "timeout";
|
|
40
|
+
other: "other";
|
|
41
|
+
}>;
|
|
42
|
+
text: z.ZodString;
|
|
43
|
+
at: z.ZodString;
|
|
44
|
+
}, z.core.$strip>>;
|
|
34
45
|
}, z.core.$strip>;
|
|
35
46
|
export type VpnStatus = z.output<typeof VpnStatusSchema>;
|
|
36
47
|
export declare const vpnStatus: import("../../kernel/define.js").QueryDef<z.ZodObject<{
|
|
@@ -62,6 +73,17 @@ export declare const vpnStatus: import("../../kernel/define.js").QueryDef<z.ZodO
|
|
|
62
73
|
}>;
|
|
63
74
|
text: z.ZodString;
|
|
64
75
|
}, z.core.$strip>>;
|
|
76
|
+
lastFailure: z.ZodNullable<z.ZodObject<{
|
|
77
|
+
code: z.ZodEnum<{
|
|
78
|
+
auth: "auth";
|
|
79
|
+
unreachable: "unreachable";
|
|
80
|
+
driver: "driver";
|
|
81
|
+
timeout: "timeout";
|
|
82
|
+
other: "other";
|
|
83
|
+
}>;
|
|
84
|
+
text: z.ZodString;
|
|
85
|
+
at: z.ZodString;
|
|
86
|
+
}, z.core.$strip>>;
|
|
65
87
|
}, z.core.$strip>, "vpn.status">;
|
|
66
88
|
export declare const vpnLogin: import("../../kernel/define.js").OperationDef<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
67
89
|
message: z.ZodString;
|
|
@@ -108,5 +130,16 @@ export declare const vpnView: import("../../kernel/define.js").ViewDef<{
|
|
|
108
130
|
}>;
|
|
109
131
|
text: z.ZodString;
|
|
110
132
|
}, z.core.$strip>>;
|
|
133
|
+
lastFailure: z.ZodNullable<z.ZodObject<{
|
|
134
|
+
code: z.ZodEnum<{
|
|
135
|
+
auth: "auth";
|
|
136
|
+
unreachable: "unreachable";
|
|
137
|
+
driver: "driver";
|
|
138
|
+
timeout: "timeout";
|
|
139
|
+
other: "other";
|
|
140
|
+
}>;
|
|
141
|
+
text: z.ZodString;
|
|
142
|
+
at: z.ZodString;
|
|
143
|
+
}, z.core.$strip>>;
|
|
111
144
|
}, z.core.$strip>, "vpn.status">;
|
|
112
145
|
}, Record<string, never>, "vpn">;
|
|
@@ -37,6 +37,14 @@ export const VpnStatusSchema = z.object({
|
|
|
37
37
|
})
|
|
38
38
|
.nullable()
|
|
39
39
|
.describe("The running sandbox's tunnel, when one runs with the VPN on"),
|
|
40
|
+
lastFailure: z
|
|
41
|
+
.object({
|
|
42
|
+
code: z.enum(['auth', 'unreachable', 'driver', 'timeout', 'other']).describe('Why the last attempt failed'),
|
|
43
|
+
text: z.string().describe('The reason in plain words'),
|
|
44
|
+
at: z.string().describe('When (ISO date and time)'),
|
|
45
|
+
})
|
|
46
|
+
.nullable()
|
|
47
|
+
.describe("The last sandbox's VPN attempt, when it failed (kept after the sandbox closed)"),
|
|
40
48
|
});
|
|
41
49
|
export const vpnStatus = defineQuery({
|
|
42
50
|
id: 'vpn.status',
|
|
@@ -125,6 +133,16 @@ export function vpnPage(s) {
|
|
|
125
133
|
wireguard
|
|
126
134
|
? { id: 'login', label: 'Login', value: 'not needed (the keys are in your config)', tone: 'muted' }
|
|
127
135
|
: { id: 'login', label: 'Login', value: LOGIN_TEXT[s.login] + savedDate, tone: LOGIN_TONE[s.login] },
|
|
136
|
+
...(s.lastFailure
|
|
137
|
+
? [
|
|
138
|
+
{
|
|
139
|
+
id: 'lastAttempt',
|
|
140
|
+
label: 'Last attempt',
|
|
141
|
+
value: s.lastFailure.text + ' (' + s.lastFailure.at.slice(0, 16).replace('T', ' ') + ')',
|
|
142
|
+
tone: 'danger',
|
|
143
|
+
},
|
|
144
|
+
]
|
|
145
|
+
: []),
|
|
128
146
|
...(s.running
|
|
129
147
|
? [
|
|
130
148
|
{
|
|
@@ -137,14 +155,14 @@ export function vpnPage(s) {
|
|
|
137
155
|
: []),
|
|
138
156
|
];
|
|
139
157
|
const notes = [
|
|
140
|
-
...(!wireguard && s.login === 'none'
|
|
141
|
-
? [{ text: 'Next: sandbox vpn login', tone: 'muted', only: 'cli' }]
|
|
142
|
-
: []),
|
|
143
158
|
...(s.login === 'unreadable'
|
|
159
|
+
? [{ text: 'Only the Windows user that saved it can read it. Save it again.', tone: 'muted' }]
|
|
160
|
+
: []),
|
|
161
|
+
...(s.lastFailure?.code === 'auth' && s.provider === 'nordvpn'
|
|
144
162
|
? [
|
|
145
163
|
{
|
|
146
|
-
text: '
|
|
147
|
-
tone: '
|
|
164
|
+
text: 'NordVPN refused the login. It needs the service credentials (Nord Account > NordVPN > Manual setup), not your e-mail and password.',
|
|
165
|
+
tone: 'warn',
|
|
148
166
|
},
|
|
149
167
|
]
|
|
150
168
|
: []),
|
|
@@ -152,12 +170,18 @@ export function vpnPage(s) {
|
|
|
152
170
|
];
|
|
153
171
|
// Turning it on or off is the vpn.enabled setting (it applies from the next start).
|
|
154
172
|
const toggle = action(setSetting, { scope: 'user', key: 'vpn.enabled', value: !s.enabled }, { label: s.enabled ? 'Turn the VPN off' : 'Turn the VPN on', verb: s.enabled ? 'turn off' : 'turn on', key: 'o' });
|
|
173
|
+
const refused = s.lastFailure?.code === 'auth';
|
|
155
174
|
const actions = [
|
|
156
175
|
toggle,
|
|
176
|
+
...(s.lastFailure?.code === 'unreachable' && s.protocol === 'udp'
|
|
177
|
+
? [
|
|
178
|
+
action(setSetting, { scope: 'user', key: 'vpn.protocol', value: 'tcp' }, { label: 'Try TCP instead of UDP', verb: 'use tcp', key: 't' }),
|
|
179
|
+
]
|
|
180
|
+
: []),
|
|
157
181
|
...(wireguard
|
|
158
182
|
? []
|
|
159
183
|
: [
|
|
160
|
-
action(vpnLogin, {}, { key: 'v', verb: 'save login' }),
|
|
184
|
+
action(vpnLogin, {}, { key: 'v', verb: 'save login', ...(refused ? { label: 'Save the login again…' } : {}) }),
|
|
161
185
|
...(s.login !== 'none' ? [action(vpnLogout, {}, { key: 'x', verb: 'delete login' })] : []),
|
|
162
186
|
]),
|
|
163
187
|
];
|
|
@@ -27,6 +27,17 @@ export declare const vpnStatusRun: import("../../kernel/define.js").Implementati
|
|
|
27
27
|
}>;
|
|
28
28
|
text: import("zod").ZodString;
|
|
29
29
|
}, import("zod/v4/core").$strip>>;
|
|
30
|
+
lastFailure: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
31
|
+
code: import("zod").ZodEnum<{
|
|
32
|
+
auth: "auth";
|
|
33
|
+
unreachable: "unreachable";
|
|
34
|
+
driver: "driver";
|
|
35
|
+
timeout: "timeout";
|
|
36
|
+
other: "other";
|
|
37
|
+
}>;
|
|
38
|
+
text: import("zod").ZodString;
|
|
39
|
+
at: import("zod").ZodString;
|
|
40
|
+
}, import("zod/v4/core").$strip>>;
|
|
30
41
|
}, import("zod/v4/core").$strip>, "vpn.status">, import("../../../cli/commands/context.js").Context>;
|
|
31
42
|
export declare const vpnLoginRun: import("../../kernel/define.js").Implementation<import("../../kernel/define.js").OperationDef<import("zod").ZodObject<{}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
32
43
|
message: import("zod").ZodString;
|
|
@@ -32,8 +32,11 @@ export const vpnLoginRun = implement(vpnLogin, async (ctx, _input, io) => {
|
|
|
32
32
|
if (password === undefined)
|
|
33
33
|
cancelled();
|
|
34
34
|
service.save({ username, password });
|
|
35
|
+
const warning = service.warning({ username, password });
|
|
36
|
+
if (warning)
|
|
37
|
+
io.log(warning, 'warn');
|
|
35
38
|
VPN_WARNINGS.forEach((w) => io.log(w, 'muted'));
|
|
36
|
-
return { message: 'Saved. Turn the VPN on
|
|
39
|
+
return { message: 'Saved. Use "Turn the VPN on" on the VPN page to use it from the next start.' };
|
|
37
40
|
});
|
|
38
41
|
export const vpnLogoutRun = implement(vpnLogout, async (ctx, _input, io) => {
|
|
39
42
|
requireOnPc('vpn logout');
|
|
@@ -27,10 +27,10 @@ export const webStatus = defineQuery({
|
|
|
27
27
|
text: (o) => o.running && o.port
|
|
28
28
|
? 'The web UI is running at http://127.0.0.1:' +
|
|
29
29
|
o.port +
|
|
30
|
-
'/ (
|
|
30
|
+
'/ (the Open action signs you in).' +
|
|
31
31
|
(o.lanAddress ? '\nOn your network: ' + o.lanAddress + ' (certificate ' + o.lanFingerprint + ')' : '') +
|
|
32
32
|
(o.lanProblem ? '\nLAN mode is on but not listening: ' + o.lanProblem : '')
|
|
33
|
-
: 'The web UI is not running
|
|
33
|
+
: 'The web UI is not running.',
|
|
34
34
|
cli: { name: 'web', action: 'status', json: true },
|
|
35
35
|
});
|
|
36
36
|
export const startWeb = defineOperation({
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// it. The server itself (`sandbox _web`) stays in cli/commands/web.ts.
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { packageVersion } from '../../../core/package-info.js';
|
|
6
|
-
import { fail, sleep } from '../../../core/util/index.js';
|
|
6
|
+
import { fail, failWith, sleep } from '../../../core/util/index.js';
|
|
7
7
|
import { requireOnPc } from '../../../cli/commands/context.js';
|
|
8
8
|
import { spawnDetached } from '../../../host/sandbox/index.js';
|
|
9
9
|
import { openBrowser, WebControl, WebStore } from '../../../host/web/index.js';
|
|
@@ -50,10 +50,14 @@ async function startServer(ctx, io, control) {
|
|
|
50
50
|
const now = await control.status();
|
|
51
51
|
if (now.running && now.state) {
|
|
52
52
|
io.log('The web UI is running at http://127.0.0.1:' + now.state.port + '/ (this PC only).');
|
|
53
|
-
return {
|
|
53
|
+
return {
|
|
54
|
+
port: now.state.port,
|
|
55
|
+
message: 'Open it already signed in from Maintenance > Web UI.',
|
|
56
|
+
wasRunning: false,
|
|
57
|
+
};
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
|
-
return fail('The web UI did not start.', '
|
|
60
|
+
return fail('The web UI did not start.', 'The port ' + config.web.port + ' may be taken: change web.port in Settings. The Logs page may say more.');
|
|
57
61
|
}
|
|
58
62
|
/** Whether the web UI runs, and its address without the token. Never returns the state (it holds the token). */
|
|
59
63
|
export const webStatusRun = implement(webStatus, async (ctx) => {
|
|
@@ -83,7 +87,11 @@ export const openWebRun = implement(openWeb, async (ctx, _input, io) => {
|
|
|
83
87
|
io.log(started.message);
|
|
84
88
|
const { running, state } = await control.status();
|
|
85
89
|
if (!running || !state)
|
|
86
|
-
return
|
|
90
|
+
return failWith('The web UI stopped right away.', 'Start it again.', {
|
|
91
|
+
op: 'web.start',
|
|
92
|
+
label: 'Start the web UI',
|
|
93
|
+
cli: 'sandbox web start',
|
|
94
|
+
});
|
|
87
95
|
openBrowser(control.url(state));
|
|
88
96
|
return { message: 'Opened in your browser.' };
|
|
89
97
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { type ErrorAction } from '../../core/util/errors.js';
|
|
3
|
+
export type { ErrorAction };
|
|
2
4
|
export declare const ErrorKindSchema: z.ZodEnum<{
|
|
3
5
|
user: "user";
|
|
4
6
|
cancelled: "cancelled";
|
|
@@ -16,6 +18,11 @@ export declare const WireErrorSchema: z.ZodObject<{
|
|
|
16
18
|
}>;
|
|
17
19
|
message: z.ZodString;
|
|
18
20
|
fix: z.ZodOptional<z.ZodString>;
|
|
21
|
+
action: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
op: z.ZodString;
|
|
23
|
+
input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
24
|
+
label: z.ZodString;
|
|
25
|
+
}, z.core.$strict>>;
|
|
19
26
|
}, z.core.$strict>;
|
|
20
27
|
export type WireError = z.output<typeof WireErrorSchema>;
|
|
21
28
|
/** The user said no to a question the operation needed: nothing changed. */
|
|
@@ -9,6 +9,14 @@ export const WireErrorSchema = z.strictObject({
|
|
|
9
9
|
kind: ErrorKindSchema,
|
|
10
10
|
message: z.string().max(2000),
|
|
11
11
|
fix: z.string().max(2000).optional(),
|
|
12
|
+
/** A button that fixes it (the command line is not sent: only the CLI prints it). */
|
|
13
|
+
action: z
|
|
14
|
+
.strictObject({
|
|
15
|
+
op: z.string().max(100),
|
|
16
|
+
input: z.record(z.string(), z.unknown()).optional(),
|
|
17
|
+
label: z.string().max(200),
|
|
18
|
+
})
|
|
19
|
+
.optional(),
|
|
12
20
|
});
|
|
13
21
|
/** The user said no to a question the operation needed: nothing changed. */
|
|
14
22
|
export class Cancelled extends Error {
|
|
@@ -27,8 +35,15 @@ export const BUG_MESSAGE = 'Something went wrong.';
|
|
|
27
35
|
export function toWireError(e) {
|
|
28
36
|
if (e instanceof Cancelled)
|
|
29
37
|
return { kind: 'cancelled', message: e.message };
|
|
30
|
-
if (e instanceof UserError)
|
|
31
|
-
|
|
38
|
+
if (e instanceof UserError) {
|
|
39
|
+
const a = e.action;
|
|
40
|
+
return {
|
|
41
|
+
kind: 'user',
|
|
42
|
+
message: e.message,
|
|
43
|
+
...(e.fix ? { fix: e.fix } : {}),
|
|
44
|
+
...(a ? { action: { op: a.op, ...(a.input ? { input: { ...a.input } } : {}), label: a.label } } : {}),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
32
47
|
if (e instanceof z.ZodError)
|
|
33
48
|
return { kind: 'invalid', message: issuesText(e) };
|
|
34
49
|
return { kind: 'bug', message: BUG_MESSAGE };
|
|
@@ -37,7 +52,7 @@ export function toWireError(e) {
|
|
|
37
52
|
export function fromWireError(w) {
|
|
38
53
|
if (w.kind === 'cancelled')
|
|
39
54
|
return new Cancelled(w.message);
|
|
40
|
-
return new UserError(w.message, w.fix);
|
|
55
|
+
return new UserError(w.message, w.fix, w.action ? { op: w.action.op, input: w.action.input, label: w.action.label, cli: '' } : undefined);
|
|
41
56
|
}
|
|
42
57
|
/** "key: problem; other: problem" for a value that did not fit its schema. */
|
|
43
58
|
export function issuesText(e) {
|
package/dist/app/kernel/rpc.d.ts
CHANGED
|
@@ -57,8 +57,8 @@ export declare const ServerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
57
57
|
text: z.ZodString;
|
|
58
58
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
59
59
|
ok: "ok";
|
|
60
|
-
muted: "muted";
|
|
61
60
|
warn: "warn";
|
|
61
|
+
muted: "muted";
|
|
62
62
|
danger: "danger";
|
|
63
63
|
accent: "accent";
|
|
64
64
|
}>>;
|
|
@@ -154,6 +154,11 @@ export declare const ServerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
154
154
|
}>;
|
|
155
155
|
message: z.ZodString;
|
|
156
156
|
fix: z.ZodOptional<z.ZodString>;
|
|
157
|
+
action: z.ZodOptional<z.ZodObject<{
|
|
158
|
+
op: z.ZodString;
|
|
159
|
+
input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
160
|
+
label: z.ZodString;
|
|
161
|
+
}, z.core.$strict>>;
|
|
157
162
|
}, z.core.$strict>;
|
|
158
163
|
}, z.core.$strict>, z.ZodObject<{
|
|
159
164
|
t: z.ZodLiteral<"data">;
|
|
@@ -20,11 +20,21 @@ export type Target =
|
|
|
20
20
|
readonly kind: 'start-agent';
|
|
21
21
|
readonly agent: string;
|
|
22
22
|
}
|
|
23
|
-
/** A command line of an area that is not a feature yet: the menu runs it
|
|
23
|
+
/** A command line of an area that is not a feature yet: the menu runs it. No Page uses it. */
|
|
24
24
|
| {
|
|
25
25
|
readonly kind: 'command';
|
|
26
26
|
readonly argv: readonly string[];
|
|
27
27
|
}
|
|
28
|
+
/** One setting: Settings opens at its row (the web: /v/settings?focus=<key>; the menu: Settings, searched for it). */
|
|
29
|
+
| {
|
|
30
|
+
readonly kind: 'setting';
|
|
31
|
+
readonly key: string;
|
|
32
|
+
}
|
|
33
|
+
/** A page on the internet (only https://github.com/ so far): the menu opens it in the browser, the web in a tab. */
|
|
34
|
+
| {
|
|
35
|
+
readonly kind: 'url';
|
|
36
|
+
readonly href: string;
|
|
37
|
+
}
|
|
28
38
|
/** Another view. */
|
|
29
39
|
| {
|
|
30
40
|
readonly kind: 'view';
|
package/dist/app/registry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fail } from '../core/util/errors.js';
|
|
2
2
|
import { accessNeeded, allows, invoke, OWNER, refusalText, NO_QUESTIONS, onSurface, } from './kernel/index.js';
|
|
3
|
-
import { addAgentRun, listAgentsRun, makeDefaultAgentRun, removeAgentRun, startAgentRun, } from './features/agents/index.js';
|
|
3
|
+
import { addAgentRun, agentEnvRun, agentsEnvSetRun, listAgentsRun, makeDefaultAgentRun, removeAgentRun, startAgentRun, } from './features/agents/index.js';
|
|
4
4
|
import { defaultAccountRun, listAccountsRun, removeAccountRun, renameAccountRun, saveAccountRun, useAccountRun, listServicesRun, serviceImportRun, serviceLoginRun, serviceLogoutRun, } from './features/accounts/index.js';
|
|
5
5
|
import { listAppsRun, requestAppRun, setCustomAppsRun, toggleAppRun } from './features/apps/index.js';
|
|
6
6
|
import { browseFolderRun } from './features/files/index.js';
|
|
@@ -16,6 +16,7 @@ import { exportConfigRun, getSettingRun, importConfigRun, listSettingsRun, reset
|
|
|
16
16
|
import { migrateSettingsRun, runUpdateRun, updatesStatusRun } from './features/updates/index.js';
|
|
17
17
|
import { checkEngineRun, cleanEngineRun, engineLeftoversRun, engineStatusRun } from './features/engine/index.js';
|
|
18
18
|
import { openWebRun, startWebRun, stopWebRun, webStatusRun } from './features/web/index.js';
|
|
19
|
+
import { agentCommandsOffRun, agentCommandsOnRun, agentCommandsStatusRun } from './features/agent-commands/index.js';
|
|
19
20
|
import { vpnLoginRun, vpnLogoutRun, vpnStatusRun } from './features/vpn/index.js';
|
|
20
21
|
import { githubLoginRun, githubLogoutRun, githubStatusRun } from './features/github/index.js';
|
|
21
22
|
import { accessStatusRun, allowDeviceRun, lanOffRun, lanOnRun, revokeAccessRun, revokeAllAccessRun, } from './features/access/index.js';
|
|
@@ -34,6 +35,8 @@ export const IMPLEMENTATIONS = [
|
|
|
34
35
|
makeDefaultAgentRun,
|
|
35
36
|
removeAgentRun,
|
|
36
37
|
listAgentsRun,
|
|
38
|
+
agentEnvRun,
|
|
39
|
+
agentsEnvSetRun,
|
|
37
40
|
listSettingsRun,
|
|
38
41
|
getSettingRun,
|
|
39
42
|
setSettingRun,
|
|
@@ -89,6 +92,9 @@ export const IMPLEMENTATIONS = [
|
|
|
89
92
|
vpnStatusRun,
|
|
90
93
|
vpnLoginRun,
|
|
91
94
|
vpnLogoutRun,
|
|
95
|
+
agentCommandsStatusRun,
|
|
96
|
+
agentCommandsOnRun,
|
|
97
|
+
agentCommandsOffRun,
|
|
92
98
|
githubStatusRun,
|
|
93
99
|
githubLoginRun,
|
|
94
100
|
githubLogoutRun,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
run
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-JETGP2C3.js";
|
|
6
|
+
import "./chunk-ZTTOF5V3.js";
|
|
7
7
|
|
|
8
8
|
// src/bin/agent-sandbox.ts
|
|
9
9
|
run(process.argv.slice(2));
|