windows-development-sandbox 1.20.0 → 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/config.example.json +8 -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 +29 -1
- package/dist/app/features/accounts/accounts.def.js +10 -4
- package/dist/app/features/accounts/accounts.run.d.ts +1 -0
- package/dist/app/features/accounts/accounts.run.js +7 -2
- package/dist/app/features/accounts/services.def.d.ts +4 -1
- package/dist/app/features/accounts/services.def.js +15 -14
- package/dist/app/features/accounts/services.run.d.ts +1 -0
- package/dist/app/features/accounts/services.run.js +41 -15
- package/dist/app/features/defs.d.ts +39 -2
- 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 +2 -0
- package/dist/app/features/settings/settings-rows.js +1 -1
- package/dist/app/features/settings/settings.def.js +1 -1
- package/dist/app/features/settings/settings.run.js +3 -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 +1 -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 +5 -0
- package/dist/app/kernel/view.d.ts +11 -1
- package/dist/bin/agent-sandbox.js +2 -2
- package/dist/bin/{chunk-DK4NTBUF.js → chunk-JETGP2C3.js} +172 -48
- package/dist/bin/{chunk-2IMT7ZCT.js → chunk-XZKOPGNH.js} +1 -1
- package/dist/bin/{chunk-Z2P5OGKL.js → chunk-ZTTOF5V3.js} +2430 -1688
- 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/manifest.d.ts +2 -2
- package/dist/cli/manifest.js +2 -1
- 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/pages/accounts-page.js +1 -1
- package/dist/cli/menu/pages/agents-page.js +8 -2
- package/dist/cli/menu/pages/maintenance-page.d.ts +6 -0
- package/dist/cli/menu/pages/maintenance-page.js +9 -2
- 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 +12 -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/report.js +2 -0
- package/dist/cli/tui/app.d.ts +5 -0
- package/dist/cli/tui/app.js +2 -0
- package/dist/core/config/defaults.js +3 -1
- package/dist/core/schema/accounts.d.ts +6 -0
- package/dist/core/schema/accounts.js +13 -11
- package/dist/core/schema/config.d.ts +20 -8
- package/dist/core/schema/config.js +4 -4
- package/dist/core/schema/github.js +1 -1
- 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/vpn.js +1 -1
- package/dist/core/schema/web.js +3 -3
- package/dist/core/types.d.ts +6 -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 +6 -2
- 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-installer.js +1 -1
- 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 +316 -145
- 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/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/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/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 +16 -6
- package/dist/guest/toolchains/native/vcruntime.d.ts +2 -0
- package/dist/guest/toolchains/native/vcruntime.js +10 -2
- package/dist/guest/toolchains/native/visual-studio.d.ts +3 -0
- package/dist/guest/toolchains/native/visual-studio.js +44 -26
- package/dist/guest/toolchains/native/vs-request.d.ts +2 -0
- package/dist/guest/toolchains/native/vs-request.js +2 -0
- package/dist/guest/toolchains/plan.js +19 -8
- 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/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/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 +7 -1
- package/dist/host/accounts/leases.js +13 -2
- package/dist/host/accounts/source.d.ts +7 -1
- package/dist/host/accounts/source.js +27 -0
- package/dist/host/accounts/sources.js +4 -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 +4 -0
- package/dist/host/launch/toolchains.d.ts +2 -1
- package/dist/host/launch/toolchains.js +5 -3
- package/dist/host/vpn/nordvpn.d.ts +2 -4
- package/dist/host/vpn/nordvpn.js +2 -24
- package/dist/runtime/agent.js +405 -90
- package/dist/runtime/daemon.js +3010 -1383
- package/dist/runtime/db.js +333 -90
- package/dist/runtime/main.js +4720 -1954
- package/dist/runtime/netproxy.js +286 -69
- package/dist/runtime/tool.js +2852 -1780
- package/dist/runtime/view.js +286 -69
- package/dist/selftest/agent-paths.test.js +39 -1
- 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 +5 -2
- 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/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 +8 -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/persisted-installs.test.js +6 -3
- package/dist/selftest/service-accounts.test.js +3 -2
- package/dist/selftest/support/engine-golden.js +27 -0
- package/dist/selftest/support/fixtures.d.ts +6 -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/shared/accounts/index.d.ts +2 -0
- package/dist/shared/accounts/index.js +2 -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 +21 -3
- package/dist/shared/channel/schema.js +7 -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/readiness.d.ts +2 -2
- package/dist/shared/readiness.js +2 -2
- package/dist/web/index.html +1 -1
- package/dist/web/{main-OUUQYNK4.js → main-CCILLX2M.js} +67 -67
- package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
- package/native/csharp/StorageHelper/AssemblyInfo.cs +3 -3
- 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/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 +56 -27
- package/schemas/sandbox-config.schema.json +37 -14
|
@@ -66,7 +66,7 @@ async function shellPlace(ctx, project, io) {
|
|
|
66
66
|
if (project !== undefined) {
|
|
67
67
|
const named = projects.find((p) => p.name.toLowerCase() === project.toLowerCase());
|
|
68
68
|
if (!named)
|
|
69
|
-
fail('The running sandbox has no project "' + project + '".', '
|
|
69
|
+
fail('The running sandbox has no project "' + project + '".', 'Check the project names on the Sandbox page.');
|
|
70
70
|
return { name: named.name, guest: named.guest };
|
|
71
71
|
}
|
|
72
72
|
const here = locateHere(ctx, new RunDir(ctx.dataPath).readSandboxStatus());
|
|
@@ -107,7 +107,7 @@ export const closeSessionRun = implement(closeSession, async (asked, input, io)
|
|
|
107
107
|
const ctx = await useSharedSandbox(asked, (shared) => find(shared)?.kind === 'shell' ? { kind: 'use' } : { kind: 'owner-only', what: 'close an agent session' }, typedConfirm(io));
|
|
108
108
|
const session = find(ctx);
|
|
109
109
|
if (!session)
|
|
110
|
-
fail('No running session ' + input.session + '.', '
|
|
110
|
+
fail('No running session ' + input.session + '.', 'Check the list of running sessions.');
|
|
111
111
|
const what = safeText(session.harness) + (session.kind === 'shell' ? ' (shell)' : '');
|
|
112
112
|
const yes = await io.confirm({
|
|
113
113
|
title: 'Close ' + what + ' session ' + input.session + '?',
|
|
@@ -102,5 +102,5 @@ export function findSetting(file, key) {
|
|
|
102
102
|
'"' +
|
|
103
103
|
(file.isProject ? ' a project can set' : '') +
|
|
104
104
|
'.' +
|
|
105
|
-
(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.');
|
|
106
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
|
}
|
|
@@ -121,12 +121,12 @@ function freshConfig(ctx) {
|
|
|
121
121
|
function readImport(config, file) {
|
|
122
122
|
const source = path.resolve(file);
|
|
123
123
|
if (!fs.existsSync(source))
|
|
124
|
-
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.');
|
|
125
125
|
if (fs.statSync(source).size > MAX_BYTES)
|
|
126
126
|
fail(source + ' is too big to be a settings file.');
|
|
127
127
|
const plan = planImport(fs.readFileSync(source, 'utf8'), config);
|
|
128
128
|
if (plan.problems.length)
|
|
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
|
|
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.');
|
|
130
130
|
return plan;
|
|
131
131
|
}
|
|
132
132
|
/** Writes the planned changes to your settings file (comments stay); returns how many settings changed. */
|
|
@@ -160,7 +160,7 @@ export const importConfigRun = implement(importConfig, async (ctx, input, io) =>
|
|
|
160
160
|
const file = input.settingsFile ??
|
|
161
161
|
(await io.path({
|
|
162
162
|
title: 'Which settings file',
|
|
163
|
-
lines: ['A file made by Export settings (or
|
|
163
|
+
lines: ['A file made by Export settings (or one exported on the command line).'],
|
|
164
164
|
pathKind: 'file',
|
|
165
165
|
}));
|
|
166
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
|
},
|
|
@@ -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)
|
|
@@ -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
|
@@ -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';
|
|
@@ -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));
|