windows-development-sandbox 1.0.5 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +22 -6
- package/config.example.json +17 -0
- package/dist/api.js +2 -1
- package/dist/cli/args.d.ts +20 -0
- package/dist/cli/args.js +35 -3
- package/dist/cli/colors.d.ts +24 -0
- package/dist/cli/colors.js +42 -0
- package/dist/cli/commands/agent-commands.d.ts +6 -0
- package/dist/cli/commands/agent-commands.js +61 -0
- package/dist/cli/commands/context.d.ts +2 -0
- package/dist/cli/commands/context.js +3 -0
- package/dist/cli/commands/data/clean.d.ts +15 -0
- package/dist/cli/commands/data/clean.js +101 -0
- package/dist/cli/commands/data/collect.d.ts +11 -0
- package/dist/cli/commands/data/collect.js +54 -0
- package/dist/cli/commands/data/index.d.ts +4 -0
- package/dist/cli/commands/data/index.js +45 -0
- package/dist/cli/commands/data/remove.d.ts +2 -0
- package/dist/cli/commands/data/remove.js +30 -0
- package/dist/cli/commands/index.d.ts +5 -3
- package/dist/cli/commands/index.js +5 -3
- package/dist/cli/commands/launch.d.ts +26 -2
- package/dist/cli/commands/launch.js +220 -39
- package/dist/cli/commands/maintenance.js +33 -4
- package/dist/cli/commands/project.d.ts +29 -0
- package/dist/cli/commands/project.js +63 -0
- package/dist/cli/commands/projects.d.ts +14 -0
- package/dist/cli/commands/projects.js +146 -0
- package/dist/cli/commands/repair/checks.d.ts +2 -0
- package/dist/cli/commands/{repair.js → repair/checks.js} +19 -181
- package/dist/cli/commands/{repair.d.ts → repair/finders.d.ts} +0 -29
- package/dist/cli/commands/repair/finders.js +108 -0
- package/dist/cli/commands/repair/index.d.ts +12 -0
- package/dist/cli/commands/repair/index.js +61 -0
- package/dist/cli/commands/repair/types.d.ts +26 -0
- package/dist/cli/commands/repair/types.js +3 -0
- package/dist/cli/commands/restart.d.ts +6 -0
- package/dist/cli/commands/restart.js +85 -0
- package/dist/cli/commands/sessions.d.ts +2 -1
- package/dist/cli/commands/sessions.js +189 -45
- package/dist/cli/commands/setup/checks.d.ts +13 -0
- package/dist/cli/commands/setup/checks.js +71 -0
- package/dist/cli/commands/{setup.d.ts → setup/facts.d.ts} +1 -15
- package/dist/cli/commands/setup/facts.js +60 -0
- package/dist/cli/commands/setup/index.d.ts +2 -0
- package/dist/cli/commands/setup/index.js +43 -0
- package/dist/cli/commands/user-config.d.ts +8 -0
- package/dist/cli/commands/user-config.js +41 -0
- package/dist/cli/history.d.ts +11 -0
- package/dist/cli/history.js +21 -0
- package/dist/cli/index.d.ts +7 -1
- package/dist/cli/index.js +38 -13
- package/dist/cli/manifest.d.ts +8 -0
- package/dist/cli/manifest.js +35 -15
- package/dist/cli/menu-multi.d.ts +12 -0
- package/dist/cli/menu-multi.js +82 -0
- package/dist/cli/menu.d.ts +5 -13
- package/dist/cli/menu.js +149 -46
- package/dist/cli/progress.d.ts +9 -0
- package/dist/cli/progress.js +49 -0
- package/dist/cli/settings/edit.d.ts +13 -0
- package/dist/cli/settings/edit.js +19 -0
- package/dist/cli/settings/index.d.ts +8 -0
- package/dist/cli/settings/index.js +131 -0
- package/dist/cli/settings/prompts.d.ts +7 -0
- package/dist/cli/settings/prompts.js +48 -0
- package/dist/cli/settings/schema.d.ts +33 -0
- package/dist/cli/settings/schema.js +29 -0
- package/dist/cli/validate.d.ts +17 -0
- package/dist/cli/validate.js +89 -0
- package/dist/core/config.js +4 -1
- package/dist/core/disk.d.ts +16 -0
- package/dist/core/disk.js +55 -0
- package/dist/core/local-config.d.ts +8 -0
- package/dist/core/local-config.js +18 -5
- package/dist/core/project-policy.d.ts +15 -0
- package/dist/core/project-policy.js +35 -0
- package/dist/core/prompt.d.ts +4 -0
- package/dist/core/prompt.js +15 -0
- package/dist/core/safe-paths.d.ts +4 -0
- package/dist/core/safe-paths.js +37 -0
- package/dist/core/schema/common.d.ts +17 -0
- package/dist/core/schema/common.js +15 -0
- package/dist/core/schema/config.d.ts +594 -0
- package/dist/core/schema/config.js +63 -0
- package/dist/core/schema/databases.d.ts +33 -0
- package/dist/core/schema/databases.js +35 -0
- package/dist/core/schema/harness.d.ts +12 -0
- package/dist/core/schema/harness.js +17 -0
- package/dist/core/schema/json-schema.d.ts +5 -0
- package/dist/core/schema/json-schema.js +25 -0
- package/dist/core/schema/profile.d.ts +27 -0
- package/dist/core/schema/profile.js +29 -0
- package/dist/core/schema/projects.d.ts +9 -0
- package/dist/core/schema/projects.js +11 -0
- package/dist/core/schema/sandbox.d.ts +50 -0
- package/dist/core/schema/sandbox.js +36 -0
- package/dist/core/schema/toolchains.d.ts +93 -0
- package/dist/core/schema/toolchains.js +83 -0
- package/dist/core/schema.d.ts +6 -604
- package/dist/core/schema.js +8 -264
- package/dist/core/types.d.ts +29 -1
- package/dist/core/util.d.ts +7 -0
- package/dist/core/util.js +12 -3
- package/dist/core/workspace.d.ts +0 -5
- package/dist/core/workspace.js +12 -46
- package/dist/guest/boot-env.d.ts +4 -0
- package/dist/guest/boot-env.js +25 -0
- package/dist/guest/cmdline.d.ts +12 -0
- package/dist/guest/cmdline.js +23 -0
- package/dist/guest/daemon/exec.d.ts +5 -0
- package/dist/guest/daemon/exec.js +32 -0
- package/dist/guest/daemon/project.d.ts +14 -0
- package/dist/guest/daemon/project.js +132 -0
- package/dist/guest/daemon/session.d.ts +13 -0
- package/dist/guest/daemon/session.js +139 -0
- package/dist/guest/daemon/shutdown.d.ts +1 -0
- package/dist/guest/daemon/shutdown.js +21 -0
- package/dist/guest/daemon/state.d.ts +17 -0
- package/dist/guest/daemon/state.js +31 -0
- package/dist/guest/daemon.js +8 -141
- package/dist/guest/db.js +18 -3
- package/dist/guest/env.d.ts +2 -0
- package/dist/guest/env.js +4 -2
- package/dist/guest/guide.d.ts +6 -2
- package/dist/guest/guide.js +5 -4
- package/dist/guest/helpers.d.ts +3 -0
- package/dist/guest/helpers.js +26 -0
- package/dist/guest/main.js +17 -7
- package/dist/guest/ports.d.ts +6 -0
- package/dist/guest/ports.js +22 -0
- package/dist/guest/project-context.d.ts +7 -0
- package/dist/guest/project-context.js +10 -0
- package/dist/guest/project-env.d.ts +20 -0
- package/dist/guest/project-env.js +20 -0
- package/dist/guest/project-status.d.ts +5 -0
- package/dist/guest/project-status.js +17 -0
- package/dist/guest/ptyhost.d.ts +0 -18
- package/dist/guest/ptyhost.js +5 -63
- package/dist/guest/setup/agents.d.ts +5 -2
- package/dist/guest/setup/agents.js +22 -8
- package/dist/guest/setup/claude.js +11 -3
- package/dist/guest/setup/environment.d.ts +13 -3
- package/dist/guest/setup/environment.js +14 -10
- package/dist/guest/setup/hooks.d.ts +9 -1
- package/dist/guest/setup/hooks.js +28 -14
- package/dist/guest/toolchains/catalogue.d.ts +4 -0
- package/dist/guest/toolchains/catalogue.js +2 -2
- package/dist/guest/toolchains/cli.js +25 -17
- package/dist/guest/toolchains/common.d.ts +18 -1
- package/dist/guest/toolchains/common.js +34 -11
- package/dist/guest/toolchains/databases/dynamodb.d.ts +8 -0
- package/dist/guest/toolchains/databases/dynamodb.js +52 -0
- package/dist/guest/toolchains/{databases.d.ts → databases/index.d.ts} +2 -3
- package/dist/guest/toolchains/databases/index.js +62 -0
- package/dist/guest/toolchains/databases/mongodb.d.ts +3 -0
- package/dist/guest/toolchains/databases/mongodb.js +31 -0
- package/dist/guest/toolchains/databases/mysql.d.ts +3 -0
- package/dist/guest/toolchains/databases/mysql.js +38 -0
- package/dist/guest/toolchains/databases/postgres.d.ts +5 -0
- package/dist/guest/toolchains/databases/postgres.js +38 -0
- package/dist/guest/toolchains/databases/redis.d.ts +3 -0
- package/dist/guest/toolchains/databases/redis.js +16 -0
- package/dist/guest/toolchains/databases/server.d.ts +14 -0
- package/dist/guest/toolchains/databases/server.js +52 -0
- package/dist/guest/toolchains/git.js +25 -16
- package/dist/guest/toolchains/go.js +1 -1
- package/dist/guest/toolchains/index.d.ts +13 -9
- package/dist/guest/toolchains/index.js +40 -82
- package/dist/guest/toolchains/java.js +5 -5
- package/dist/guest/toolchains/leftovers.d.ts +2 -0
- package/dist/guest/toolchains/leftovers.js +26 -0
- package/dist/guest/toolchains/managers.js +12 -10
- package/dist/guest/toolchains/{binstall.js → native/binstall.js} +6 -9
- package/dist/guest/toolchains/native/cpp.d.ts +4 -0
- package/dist/guest/toolchains/native/cpp.js +38 -0
- package/dist/guest/toolchains/native/dotnet.d.ts +4 -0
- package/dist/guest/toolchains/native/dotnet.js +103 -0
- package/dist/guest/toolchains/native/mesa.d.ts +7 -0
- package/dist/guest/toolchains/native/mesa.js +46 -0
- package/dist/guest/toolchains/native/msvc/environment.d.ts +16 -0
- package/dist/guest/toolchains/native/msvc/environment.js +57 -0
- package/dist/guest/toolchains/native/msvc/index.d.ts +6 -0
- package/dist/guest/toolchains/native/msvc/index.js +48 -0
- package/dist/guest/toolchains/native/msvc/packages.d.ts +6 -0
- package/dist/guest/toolchains/native/msvc/packages.js +156 -0
- package/dist/guest/toolchains/native/msvc/tree.d.ts +15 -0
- package/dist/guest/toolchains/native/msvc/tree.js +21 -0
- package/dist/guest/toolchains/native/rust.d.ts +3 -0
- package/dist/guest/toolchains/native/rust.js +45 -0
- package/dist/guest/toolchains/node.js +26 -6
- package/dist/guest/toolchains/plan.d.ts +22 -0
- package/dist/guest/toolchains/plan.js +96 -0
- package/dist/guest/toolchains/pwsh.js +1 -1
- package/dist/guest/toolchains/python.js +17 -10
- package/dist/guest/toolchains/runtimes.d.ts +2 -0
- package/dist/guest/toolchains/runtimes.js +6 -8
- package/dist/guest/toolchains/scripting/php.d.ts +3 -0
- package/dist/guest/toolchains/scripting/php.js +71 -0
- package/dist/guest/toolchains/scripting/ruby.d.ts +3 -0
- package/dist/guest/toolchains/scripting/ruby.js +47 -0
- package/dist/guest/toolchains/scripting/vcruntime.d.ts +7 -0
- package/dist/guest/toolchains/scripting/vcruntime.js +45 -0
- package/dist/guest/view.js +21 -1
- package/dist/host/accounts.js +14 -5
- package/dist/host/agent-commands.d.ts +25 -0
- package/dist/host/agent-commands.js +145 -0
- package/dist/host/attach.d.ts +17 -0
- package/dist/host/attach.js +69 -0
- package/dist/host/channel.d.ts +23 -22
- package/dist/host/channel.js +66 -84
- package/dist/host/claude-profile.js +7 -3
- package/dist/host/cleanup.js +2 -11
- package/dist/host/database-plan.d.ts +12 -0
- package/dist/host/database-plan.js +52 -0
- package/dist/host/generate.d.ts +4 -12
- package/dist/host/generate.js +48 -135
- package/dist/host/join.d.ts +28 -0
- package/dist/host/join.js +76 -0
- package/dist/host/launch/mappings.d.ts +3 -0
- package/dist/host/launch/mappings.js +50 -0
- package/dist/host/launch/projects.d.ts +15 -0
- package/dist/host/launch/projects.js +56 -0
- package/dist/host/launch/stage.d.ts +11 -0
- package/dist/host/launch/stage.js +66 -0
- package/dist/host/launch/wsb.d.ts +10 -0
- package/dist/host/launch/wsb.js +34 -0
- package/dist/host/pc-scan.d.ts +6 -0
- package/dist/host/pc-scan.js +37 -0
- package/dist/host/platform.d.ts +2 -0
- package/dist/host/platform.js +13 -1
- package/dist/host/project-scan.d.ts +1 -17
- package/dist/host/project-scan.js +2 -86
- package/dist/host/projects.d.ts +100 -0
- package/dist/host/projects.js +147 -0
- package/dist/host/repo-guard.d.ts +15 -2
- package/dist/host/repo-guard.js +103 -12
- package/dist/host/terminal.js +3 -0
- package/dist/host/test-guard.d.ts +6 -0
- package/dist/host/test-guard.js +15 -0
- package/dist/host/window.js +7 -3
- package/dist/host/wsb.d.ts +37 -0
- package/dist/host/wsb.js +101 -0
- package/dist/runtime/daemon.js +10997 -2794
- package/dist/runtime/db.js +6428 -464
- package/dist/runtime/main.js +7359 -1135
- package/dist/runtime/view.js +5922 -47
- package/dist/selftest/accounts.test.d.ts +2 -0
- package/dist/selftest/accounts.test.js +44 -0
- package/dist/selftest/agent-commands.test.d.ts +2 -0
- package/dist/selftest/agent-commands.test.js +47 -0
- package/dist/selftest/channel.test.d.ts +2 -0
- package/dist/selftest/channel.test.js +37 -0
- package/dist/selftest/cli.test.d.ts +2 -2
- package/dist/selftest/cli.test.js +115 -27
- package/dist/selftest/cmdline.test.d.ts +2 -0
- package/dist/selftest/cmdline.test.js +45 -0
- package/dist/selftest/config.test.d.ts +2 -3
- package/dist/selftest/config.test.js +36 -72
- package/dist/selftest/data.test.d.ts +2 -2
- package/dist/selftest/data.test.js +77 -70
- package/dist/selftest/detect.test.d.ts +2 -2
- package/dist/selftest/detect.test.js +54 -38
- package/dist/selftest/fixtures.d.ts +44 -4
- package/dist/selftest/fixtures.js +40 -23
- package/dist/selftest/generate.test.d.ts +2 -0
- package/dist/selftest/generate.test.js +63 -0
- package/dist/selftest/git-access.test.d.ts +2 -0
- package/dist/selftest/git-access.test.js +26 -0
- package/dist/selftest/guest-boot.test.d.ts +2 -0
- package/dist/selftest/guest-boot.test.js +76 -0
- package/dist/selftest/harness.d.ts +44 -7
- package/dist/selftest/harness.js +62 -21
- package/dist/selftest/host-sim.test.d.ts +2 -0
- package/dist/selftest/host-sim.test.js +93 -0
- package/dist/selftest/hostile-input.test.d.ts +2 -0
- package/dist/selftest/hostile-input.test.js +54 -0
- package/dist/selftest/index.d.ts +8 -1
- package/dist/selftest/index.js +134 -35
- package/dist/selftest/links.test.d.ts +2 -0
- package/dist/selftest/links.test.js +50 -0
- package/dist/selftest/live-daemon.test.d.ts +2 -0
- package/dist/selftest/live-daemon.test.js +91 -0
- package/dist/selftest/live-git.test.d.ts +2 -0
- package/dist/selftest/live-git.test.js +60 -0
- package/dist/selftest/live-projects.test.d.ts +2 -0
- package/dist/selftest/live-projects.test.js +127 -0
- package/dist/selftest/live.d.ts +65 -0
- package/dist/selftest/live.js +109 -0
- package/dist/selftest/local-config.test.d.ts +2 -0
- package/dist/selftest/local-config.test.js +107 -0
- package/dist/selftest/mirror.test.d.ts +2 -3
- package/dist/selftest/mirror.test.js +92 -65
- package/dist/selftest/network.test.d.ts +2 -0
- package/dist/selftest/network.test.js +28 -0
- package/dist/selftest/personalization.test.d.ts +2 -0
- package/dist/selftest/personalization.test.js +53 -0
- package/dist/selftest/projects.test.d.ts +2 -0
- package/dist/selftest/projects.test.js +254 -0
- package/dist/selftest/repair.test.d.ts +2 -0
- package/dist/selftest/repair.test.js +42 -0
- package/dist/selftest/repo-guard.test.d.ts +2 -0
- package/dist/selftest/repo-guard.test.js +63 -0
- package/dist/selftest/secrets.test.d.ts +2 -0
- package/dist/selftest/secrets.test.js +71 -0
- package/dist/selftest/setup.test.d.ts +2 -2
- package/dist/selftest/setup.test.js +45 -22
- package/dist/selftest/suite.d.ts +13 -0
- package/dist/selftest/suite.js +1 -0
- package/dist/selftest/sync.test.d.ts +2 -3
- package/dist/selftest/sync.test.js +90 -78
- package/dist/selftest/test-guard.test.d.ts +2 -0
- package/dist/selftest/test-guard.test.js +49 -0
- package/dist/selftest/toolchains.test.d.ts +2 -0
- package/dist/selftest/toolchains.test.js +103 -0
- package/dist/selftest/workspace.test.d.ts +2 -0
- package/dist/selftest/workspace.test.js +53 -0
- package/dist/shared/download.d.ts +3 -1
- package/dist/shared/download.js +19 -4
- package/dist/shared/paths.d.ts +5 -0
- package/dist/shared/paths.js +6 -0
- package/dist/shared/projects.d.ts +53 -0
- package/dist/shared/projects.js +67 -0
- package/dist/shared/rundir.d.ts +10 -1
- package/dist/shared/rundir.js +12 -4
- package/dist/shared/safe-remove.js +11 -0
- package/dist/shared/schema.d.ts +443 -0
- package/dist/shared/schema.js +41 -2
- package/dist/shared/test-guard.d.ts +4 -0
- package/dist/shared/test-guard.js +37 -0
- package/dist/sync/claude-mem.js +3 -1
- package/dist/sync/history.d.ts +23 -12
- package/dist/sync/history.js +52 -20
- package/dist/sync/watcher.d.ts +8 -0
- package/dist/sync/watcher.js +23 -4
- package/package.json +6 -6
- package/sandbox/bootstrap.ps1 +258 -258
- package/sandbox/cpucap.ps1 +51 -0
- package/sandbox/logon.cmd +18 -16
- package/sandbox/openssl.cs +42 -0
- package/sandbox/ptyhost.cs +15 -4
- package/sandbox/trust.cmd +35 -35
- package/schemas/config.schema.json +100 -1
- package/schemas/sandbox-config.schema.json +17 -1
- package/dist/cli/commands/data.d.ts +0 -46
- package/dist/cli/commands/data.js +0 -249
- package/dist/cli/commands/setup.js +0 -152
- package/dist/cli/settings.d.ts +0 -11
- package/dist/cli/settings.js +0 -156
- package/dist/guest/toolchains/databases.js +0 -226
- package/dist/guest/toolchains/msvc.d.ts +0 -10
- package/dist/guest/toolchains/msvc.js +0 -216
- package/dist/guest/toolchains/native.d.ts +0 -12
- package/dist/guest/toolchains/native.js +0 -220
- package/dist/guest/toolchains/scripting.d.ts +0 -10
- package/dist/guest/toolchains/scripting.js +0 -137
- package/dist/selftest/guest.test.d.ts +0 -3
- package/dist/selftest/guest.test.js +0 -61
- package/dist/selftest/helpers.test.d.ts +0 -2
- package/dist/selftest/helpers.test.js +0 -125
- package/dist/selftest/host.test.d.ts +0 -2
- package/dist/selftest/host.test.js +0 -71
- package/dist/selftest/live.test.d.ts +0 -7
- package/dist/selftest/live.test.js +0 -127
- package/dist/selftest/security.test.d.ts +0 -3
- package/dist/selftest/security.test.js +0 -143
- /package/dist/guest/toolchains/{binstall.d.ts → native/binstall.d.ts} +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Port: z.ZodNumber;
|
|
3
|
+
export declare const dbEnabled: (name: string) => z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
4
|
+
export declare const Databases: z.ZodObject<{
|
|
5
|
+
postgres: z.ZodObject<{
|
|
6
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
7
|
+
version: z.ZodString;
|
|
8
|
+
port: z.ZodNumber;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
mysql: z.ZodObject<{
|
|
11
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
12
|
+
version: z.ZodString;
|
|
13
|
+
port: z.ZodNumber;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
mongodb: z.ZodObject<{
|
|
16
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
17
|
+
version: z.ZodString;
|
|
18
|
+
port: z.ZodNumber;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
redis: z.ZodObject<{
|
|
21
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
22
|
+
port: z.ZodNumber;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
dynamodb: z.ZodObject<{
|
|
25
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
26
|
+
port: z.ZodNumber;
|
|
27
|
+
adminPort: z.ZodNumber;
|
|
28
|
+
admin: z.ZodBoolean;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
sqlserver: z.ZodObject<{
|
|
31
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Databases that run inside the sandbox.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Enabled } from './common.js';
|
|
4
|
+
export const Port = z.number().int().min(1024).max(65535);
|
|
5
|
+
export const dbEnabled = (name) => Enabled.describe(name + ': true, false, or "auto" = only when the project needs it (found from compose files, dependencies of every language, Prisma/ORM config and connection strings).');
|
|
6
|
+
export const Databases = z.strictObject({
|
|
7
|
+
postgres: z.strictObject({
|
|
8
|
+
enabled: dbEnabled('PostgreSQL (with psql, pg_dump). User postgres, no password, localhost only'),
|
|
9
|
+
version: z.string().min(1).describe('"latest" or a major version such as "16". A compose file pinning postgres:<major> wins.'),
|
|
10
|
+
port: Port.describe('Port inside the sandbox.'),
|
|
11
|
+
}),
|
|
12
|
+
mysql: z.strictObject({
|
|
13
|
+
enabled: dbEnabled('MySQL-compatible database (MariaDB). User root, no password, localhost only'),
|
|
14
|
+
version: z.string().min(1).describe('"lts" (newest MariaDB LTS) or a MariaDB series such as "11.4".'),
|
|
15
|
+
port: Port.describe('Port inside the sandbox.'),
|
|
16
|
+
}),
|
|
17
|
+
mongodb: z.strictObject({
|
|
18
|
+
enabled: dbEnabled('MongoDB with mongosh, localhost only'),
|
|
19
|
+
version: z.string().min(1).describe('"latest" or a version prefix such as "8.0".'),
|
|
20
|
+
port: Port.describe('Port inside the sandbox.'),
|
|
21
|
+
}),
|
|
22
|
+
redis: z.strictObject({
|
|
23
|
+
enabled: dbEnabled('Redis (community Windows build), localhost only'),
|
|
24
|
+
port: Port.describe('Port inside the sandbox.'),
|
|
25
|
+
}),
|
|
26
|
+
dynamodb: z.strictObject({
|
|
27
|
+
enabled: dbEnabled('DynamoDB Local (Amazon\'s official emulator, on the Java toolchain) with dynamodb-admin, a web UI to browse and edit tables'),
|
|
28
|
+
port: Port.describe('DynamoDB endpoint port inside the sandbox (http://localhost:<port>).'),
|
|
29
|
+
adminPort: Port.describe('dynamodb-admin web UI port (open http://localhost:<adminPort> in the sandbox\'s browser).'),
|
|
30
|
+
admin: z.boolean().describe('Run dynamodb-admin next to DynamoDB Local.'),
|
|
31
|
+
}),
|
|
32
|
+
sqlserver: z.strictObject({
|
|
33
|
+
enabled: dbEnabled('SQL Server. It cannot run inside Windows Sandbox; when a project needs it you get a note to use Postgres or SQLite for local work'),
|
|
34
|
+
}),
|
|
35
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Harness: z.ZodObject<{
|
|
3
|
+
hostExecutable: z.ZodOptional<z.ZodString>;
|
|
4
|
+
hostDir: z.ZodOptional<z.ZodString>;
|
|
5
|
+
npmPackage: z.ZodOptional<z.ZodString>;
|
|
6
|
+
npmBin: z.ZodOptional<z.ZodString>;
|
|
7
|
+
uvPackage: z.ZodOptional<z.ZodString>;
|
|
8
|
+
uvBin: z.ZodOptional<z.ZodString>;
|
|
9
|
+
arguments: z.ZodArray<z.ZodString>;
|
|
10
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
11
|
+
resumeArguments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// An agent (claude, codex, ...) the sandbox can run.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Strings } from './common.js';
|
|
4
|
+
export const Harness = z.strictObject({
|
|
5
|
+
hostExecutable: z.string().optional().describe('Executable copied from this PC when installed here (e.g. claude.exe).'),
|
|
6
|
+
hostDir: z.string().optional().describe('Folder of hostExecutable on this PC, or "auto" to search PATH and ~/.local/bin.'),
|
|
7
|
+
npmPackage: z.string().optional().describe('npm package installed inside the sandbox when there is no host copy.'),
|
|
8
|
+
npmBin: z.string().optional().describe('Command the npm package provides.'),
|
|
9
|
+
uvPackage: z.string().optional().describe('Python package installed with `uv tool install` inside the sandbox (e.g. aider-chat).'),
|
|
10
|
+
uvBin: z.string().optional().describe('Command the uv package provides.'),
|
|
11
|
+
arguments: Strings.describe('Arguments always passed to the agent.'),
|
|
12
|
+
environment: z.record(z.string(), z.string()).describe('Environment variables for the agent.'),
|
|
13
|
+
resumeArguments: Strings.optional().describe('Arguments used when the agent is restarted in place (e.g. after an account switch) so it resumes the conversation.'),
|
|
14
|
+
})
|
|
15
|
+
.refine((h) => h.hostExecutable || h.npmPackage || h.uvPackage, 'needs hostExecutable, npmPackage or uvPackage')
|
|
16
|
+
.refine((h) => !h.uvPackage || h.uvBin, 'needs uvBin when uvPackage is set')
|
|
17
|
+
.refine((h) => !h.npmPackage || h.npmBin, 'needs npmBin when npmPackage is set');
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One readable line per problem: "sandbox.memoryMb: Too small: expected number to be >=2048". */
|
|
3
|
+
export declare const describeIssues: (error: z.ZodError) => string[];
|
|
4
|
+
/** JSON Schema documents for editors. The user config only lists what it changes, so nothing in it is required. */
|
|
5
|
+
export declare const jsonSchemas: () => Record<string, object>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Readable validation messages and the JSON Schema documents generated from the settings schemas.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Config, LocalOverrides } from './config.js';
|
|
4
|
+
/** One readable line per problem: "sandbox.memoryMb: Too small: expected number to be >=2048". */
|
|
5
|
+
export const describeIssues = (error) => error.issues.map((issue) => {
|
|
6
|
+
const at = issue.path.join('.');
|
|
7
|
+
if (issue.code === 'unrecognized_keys')
|
|
8
|
+
return issue.keys.map((k) => (at ? at + '.' : '') + k + ' is not allowed here').join('; ');
|
|
9
|
+
return (at || 'value') + ': ' + issue.message;
|
|
10
|
+
});
|
|
11
|
+
/** JSON Schema documents for editors. The user config only lists what it changes, so nothing in it is required. */
|
|
12
|
+
export const jsonSchemas = () => {
|
|
13
|
+
const dropRequired = (node) => {
|
|
14
|
+
if (Array.isArray(node))
|
|
15
|
+
return node.map(dropRequired);
|
|
16
|
+
if (typeof node !== 'object' || node === null)
|
|
17
|
+
return node;
|
|
18
|
+
return Object.fromEntries(Object.entries(node).filter(([k]) => k !== 'required').map(([k, v]) => [k, dropRequired(v)]));
|
|
19
|
+
};
|
|
20
|
+
const toSchema = (schema, title) => ({ title, ...z.toJSONSchema(schema, { io: 'input', unrepresentable: 'any' }) });
|
|
21
|
+
return {
|
|
22
|
+
'config.schema.json': dropRequired(toSchema(Config, 'windows-development-sandbox user config (~/.agent-sandbox/config.json)')),
|
|
23
|
+
'sandbox-config.schema.json': toSchema(LocalOverrides, 'windows-development-sandbox project config (.sandbox-config.json)'),
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Secrets: z.ZodObject<{
|
|
3
|
+
strip: z.ZodBoolean;
|
|
4
|
+
allow: z.ZodArray<z.ZodString>;
|
|
5
|
+
patterns: z.ZodArray<z.ZodString>;
|
|
6
|
+
warnFiles: z.ZodBoolean;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export declare const Attach: z.ZodObject<{
|
|
9
|
+
enabled: z.ZodBoolean;
|
|
10
|
+
reuseSession: z.ZodBoolean;
|
|
11
|
+
auto: z.ZodBoolean;
|
|
12
|
+
autoHide: z.ZodBoolean;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export declare const AgentCommands: z.ZodObject<{
|
|
15
|
+
enabled: z.ZodBoolean;
|
|
16
|
+
agents: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodArray<z.ZodString>]>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export declare const ClaudeProfile: z.ZodObject<{
|
|
19
|
+
enabled: z.ZodBoolean;
|
|
20
|
+
hostDir: z.ZodString;
|
|
21
|
+
include: z.ZodArray<z.ZodString>;
|
|
22
|
+
globalStateFile: z.ZodString;
|
|
23
|
+
copyCredentials: z.ZodBoolean;
|
|
24
|
+
overwrite: z.ZodBoolean;
|
|
25
|
+
syncHistory: z.ZodBoolean;
|
|
26
|
+
syncClaudeMem: z.ZodBoolean;
|
|
27
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// What is copied from this PC, and how the terminal attaches.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Name, Strings } from './common.js';
|
|
4
|
+
export const Secrets = z.strictObject({
|
|
5
|
+
strip: z.boolean().describe('Remove credentials from everything copied into the sandbox (your Claude settings.json "env" and credential helpers, MCP servers\' env, headers and arguments): AWS, Azure, Google Cloud, Cloudflare, hosting, CI, registries, payment, AI API keys, database URLs, anything named *_TOKEN / *_SECRET / *PASSWORD* / *_KEY or *PROD*, and values that look like keys.'),
|
|
6
|
+
allow: Strings.describe('Variable names that may go in anyway; * matches anything, e.g. ["AWS_REGION", "AWS_PROFILE", "MY_APP_*"].'),
|
|
7
|
+
patterns: Strings.describe('More variable names to treat as secrets; * matches anything, e.g. ["ACME_*", "*_INTERNAL_URL"].'),
|
|
8
|
+
warnFiles: z.boolean().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.'),
|
|
9
|
+
});
|
|
10
|
+
export const Attach = z.strictObject({
|
|
11
|
+
enabled: z.boolean().describe('Allow sandbox claude --terminal / sandbox attach from this PC.'),
|
|
12
|
+
reuseSession: z.boolean().describe('sandbox claude -t in a running sandbox reattaches to this folder\'s session when no terminal on this PC is attached to it (--new always starts another).'),
|
|
13
|
+
auto: z.boolean().describe('Starting an agent attaches this terminal automatically, as if you passed -t (only in an interactive terminal).'),
|
|
14
|
+
autoHide: z.boolean().describe('Hide the Windows Sandbox window whenever this terminal attaches; it keeps running (sandbox show brings it back).'),
|
|
15
|
+
});
|
|
16
|
+
export const AgentCommands = z.strictObject({
|
|
17
|
+
enabled: z.boolean().describe('(Beta) Typing an agent\'s own command on this PC (claude, codex, ...) starts it in a hidden sandbox for the folder you are in and attaches that terminal. Adds one folder to the start of YOUR PATH; off removes it. SANDBOX_AGENT_DIRECT=1 runs the real agent instead.'),
|
|
18
|
+
agents: z.union([z.literal('auto'), z.array(Name)]).describe('"auto" = every agent installed on this PC, or a list of agent names, e.g. ["claude", "codex"].'),
|
|
19
|
+
});
|
|
20
|
+
export const ClaudeProfile = z.strictObject({
|
|
21
|
+
enabled: z.boolean().describe('Copy selected Claude settings from this PC into the sandbox.'),
|
|
22
|
+
hostDir: z.string().describe('Your Claude folder, or "auto" (~/.claude or CLAUDE_CONFIG_DIR).'),
|
|
23
|
+
include: z.array(z.string().regex(/^[A-Za-z0-9._-]+$/)).describe('Files and folders copied from it.'),
|
|
24
|
+
globalStateFile: z.string().describe('Your .claude.json, or "auto". Empty string = do not copy.'),
|
|
25
|
+
copyCredentials: z.boolean().describe('Copy your Claude LOGIN into the sandbox. Prefer sandbox account instead.'),
|
|
26
|
+
overwrite: z.boolean().describe('Refresh these settings from this PC on every launch.'),
|
|
27
|
+
syncHistory: z.boolean().describe('Bring all conversation history in, and sync new history back (path-translated).'),
|
|
28
|
+
syncClaudeMem: z.boolean().describe('Bring claude-mem data in, and its database back when the sandbox closes.'),
|
|
29
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Projects: z.ZodObject<{
|
|
3
|
+
all: z.ZodBoolean;
|
|
4
|
+
exclude: z.ZodArray<z.ZodString>;
|
|
5
|
+
roots: z.ZodArray<z.ZodString>;
|
|
6
|
+
askToAddRoot: z.ZodBoolean;
|
|
7
|
+
declinedRoots: z.ZodArray<z.ZodString>;
|
|
8
|
+
wsbShare: z.ZodBoolean;
|
|
9
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Several projects in one running sandbox. User config only: these settings map folders of this PC into the sandbox,
|
|
2
|
+
// so a project's .sandbox-config.json can never set them (LocalOverrides has no `projects`).
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const Projects = z.strictObject({
|
|
5
|
+
all: z.boolean().describe('Map every project you have started before (and every folder in your roots) at every start, except those in exclude, so all of them open in the running sandbox without a restart. Every agent in the sandbox can then see all of them. Each one is still only set up when you first use it.'),
|
|
6
|
+
exclude: z.array(z.string().min(1)).describe('Projects left out when "all" is on (folders on this PC).'),
|
|
7
|
+
roots: z.array(z.string().min(1)).describe('Folders whose subfolders are your projects (e.g. "F:\\\\Code"), mapped read/write at every start. Any project inside one, including ones you create later, opens in the running sandbox at once, without a restart. Every agent in the sandbox can see all of them.'),
|
|
8
|
+
askToAddRoot: z.boolean().describe('When you start a project whose parent folder is not a root yet, ask once whether to add it.'),
|
|
9
|
+
declinedRoots: z.array(z.string().min(1)).describe('Parent folders you said no to (not asked again).'),
|
|
10
|
+
wsbShare: z.boolean().describe('On Windows 11 24H2+ with the Windows Sandbox command line (wsb), add other folders to the running sandbox with `wsb share` (untested). Otherwise starting a project outside every root offers a restart.'),
|
|
11
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GuestWorkspace: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"mirror">, z.ZodString]>;
|
|
3
|
+
export declare const Mapping: z.ZodObject<{
|
|
4
|
+
host: z.ZodString;
|
|
5
|
+
guest: z.ZodString;
|
|
6
|
+
readOnly: z.ZodBoolean;
|
|
7
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export declare const Sandbox: z.ZodObject<{
|
|
10
|
+
memoryMb: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodNumber]>;
|
|
11
|
+
maxMemoryMb: z.ZodNumber;
|
|
12
|
+
maxMemoryPercent: z.ZodNumber;
|
|
13
|
+
cpuLimit: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodNumber]>;
|
|
14
|
+
reserveHostMb: z.ZodNumber;
|
|
15
|
+
vGpu: z.ZodBoolean;
|
|
16
|
+
networking: z.ZodBoolean;
|
|
17
|
+
clipboard: z.ZodBoolean;
|
|
18
|
+
audioInput: z.ZodBoolean;
|
|
19
|
+
videoInput: z.ZodBoolean;
|
|
20
|
+
printerRedirection: z.ZodBoolean;
|
|
21
|
+
protectedClient: z.ZodBoolean;
|
|
22
|
+
headless: z.ZodBoolean;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
export declare const Git: z.ZodObject<{
|
|
25
|
+
enabled: z.ZodBoolean;
|
|
26
|
+
access: z.ZodEnum<{
|
|
27
|
+
readonly: "readonly";
|
|
28
|
+
full: "full";
|
|
29
|
+
none: "none";
|
|
30
|
+
}>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export declare const Provisioning: z.ZodObject<{
|
|
33
|
+
copyFromHost: z.ZodBoolean;
|
|
34
|
+
fallbackToInstall: z.ZodBoolean;
|
|
35
|
+
refresh: z.ZodBoolean;
|
|
36
|
+
git: z.ZodObject<{
|
|
37
|
+
enabled: z.ZodBoolean;
|
|
38
|
+
access: z.ZodEnum<{
|
|
39
|
+
readonly: "readonly";
|
|
40
|
+
full: "full";
|
|
41
|
+
none: "none";
|
|
42
|
+
}>;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
terminal: z.ZodObject<{
|
|
45
|
+
enabled: z.ZodBoolean;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
export declare const Downloads: z.ZodObject<{
|
|
49
|
+
requireChecksum: z.ZodBoolean;
|
|
50
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// The sandbox machine, folders mapped into it, and what is provisioned (Git, terminal).
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { GitAccess, GuestPath, toggle } from './common.js';
|
|
4
|
+
export const GuestWorkspace = z.union([z.literal('auto'), z.literal('mirror'), GuestPath]).describe('Where the workspace appears inside the sandbox. "auto" = C:\\Workspace\\<folder name>. "mirror" = the same path as on this PC, so absolute paths in configs and build caches match (another drive letter such as F: is a subst drive onto C:\\Mirror\\F); paths the sandbox reserves (C:\\Users\\..., C:\\Program Files\\...) fall back to "auto".');
|
|
5
|
+
export const Mapping = z.strictObject({
|
|
6
|
+
host: z.string().min(1).describe('Folder on this PC (relative paths are relative to the config file).'),
|
|
7
|
+
guest: GuestPath.describe('Where it appears inside the sandbox, e.g. C:\\Assets, or on another drive letter (D: to Z:) such as F:\\SteamLibrary\\steamapps\\common\\Game: mapped to C:\\Mirror\\F\\... and shown as F: (subst) at boot.'),
|
|
8
|
+
readOnly: z.boolean().describe('true = the agent can only read it.'),
|
|
9
|
+
optional: z.boolean().optional().describe('true = skip it quietly when the host folder does not exist.'),
|
|
10
|
+
});
|
|
11
|
+
export const Sandbox = z.strictObject({
|
|
12
|
+
memoryMb: z.union([z.literal('auto'), z.number().int().min(2048)]).describe('Sandbox RAM in MB (>= 2048), or "auto": free RAM minus reserveHostMb, capped at maxMemoryMb.'),
|
|
13
|
+
maxMemoryMb: z.number().int().positive().describe('Upper limit for memoryMb "auto".'),
|
|
14
|
+
maxMemoryPercent: z.number().int().min(10).max(100).describe('memoryMb "auto" never takes more than this share of this PC\'s total RAM (percent).'),
|
|
15
|
+
cpuLimit: z.union([z.literal('none'), z.number().int().min(5).max(100)]).describe('Most of this PC\'s CPU the sandbox may use, in percent (5-100), e.g. 50 keeps half free for you; "none" = no cap (Windows Sandbox would take every processor). Covers everything this tool starts in the sandbox (agents, installs, builds, its terminal).'),
|
|
16
|
+
reserveHostMb: z.number().int().nonnegative().describe('RAM always left for this PC when memoryMb is "auto".'),
|
|
17
|
+
vGpu: z.boolean().describe('Virtual GPU. Off by default: Microsoft notes it widens the sandbox attack surface.'),
|
|
18
|
+
networking: z.boolean().describe('Internet access. false is the only hard network isolation Windows Sandbox offers.'),
|
|
19
|
+
clipboard: z.boolean().describe('Shared clipboard between this PC and the sandbox.'),
|
|
20
|
+
audioInput: z.boolean().describe('Microphone access.'),
|
|
21
|
+
videoInput: z.boolean().describe('Camera access.'),
|
|
22
|
+
printerRedirection: z.boolean().describe('Printers from this PC.'),
|
|
23
|
+
protectedClient: z.boolean().describe('Run the sandbox window in Protected Client mode (recommended).'),
|
|
24
|
+
headless: z.boolean().describe('Hide the sandbox window (sbx-show brings it back). A headless sandbox shuts down when its last session ends.'),
|
|
25
|
+
});
|
|
26
|
+
export const Git = z.strictObject({ enabled: z.boolean().describe('Provide Git for Windows (and Git Bash, which Claude Code needs).'), access: GitAccess });
|
|
27
|
+
export const Provisioning = z.strictObject({
|
|
28
|
+
copyFromHost: z.boolean().describe('Copy Node, Git, nvm and the agent from this PC when they are installed here.'),
|
|
29
|
+
fallbackToInstall: z.boolean().describe('Download anything that cannot be copied from this PC.'),
|
|
30
|
+
refresh: z.boolean().describe('Re-copy / re-download everything on the next launch.'),
|
|
31
|
+
git: Git,
|
|
32
|
+
terminal: toggle('Windows Terminal as the sandbox window (downloaded once).'),
|
|
33
|
+
});
|
|
34
|
+
export const Downloads = z.strictObject({
|
|
35
|
+
requireChecksum: z.boolean().describe('Refuse any toolchain, database or tool download that has no published checksum (SHA-256/SHA-512) to verify it against. false = allow those, as before. Downloads that do have a published checksum are always verified. A project\'s .sandbox-config.json can only turn this on.'),
|
|
36
|
+
});
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Toolchains: z.ZodObject<{
|
|
3
|
+
node: z.ZodObject<{
|
|
4
|
+
version: z.ZodString;
|
|
5
|
+
extraVersions: z.ZodArray<z.ZodString>;
|
|
6
|
+
corepack: z.ZodBoolean;
|
|
7
|
+
volta: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
8
|
+
globalPackages: z.ZodArray<z.ZodString>;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
python: z.ZodObject<{
|
|
11
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
12
|
+
version: z.ZodString;
|
|
13
|
+
python2: z.ZodBoolean;
|
|
14
|
+
pyenv: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
15
|
+
tools: z.ZodArray<z.ZodString>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
rust: z.ZodObject<{
|
|
18
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
19
|
+
toolchain: z.ZodString;
|
|
20
|
+
host: z.ZodString;
|
|
21
|
+
components: z.ZodArray<z.ZodString>;
|
|
22
|
+
targets: z.ZodArray<z.ZodString>;
|
|
23
|
+
crates: z.ZodArray<z.ZodString>;
|
|
24
|
+
targetDir: z.ZodString;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
msvc: z.ZodObject<{
|
|
27
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
28
|
+
acceptLicense: z.ZodBoolean;
|
|
29
|
+
msvcVersion: z.ZodString;
|
|
30
|
+
sdkVersion: z.ZodString;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
cpp: z.ZodObject<{
|
|
33
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
34
|
+
flexBison: z.ZodBoolean;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
dotnet: z.ZodObject<{
|
|
37
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
38
|
+
channels: z.ZodArray<z.ZodString>;
|
|
39
|
+
tools: z.ZodArray<z.ZodString>;
|
|
40
|
+
workloads: z.ZodArray<z.ZodString>;
|
|
41
|
+
frameworkTargets: z.ZodArray<z.ZodString>;
|
|
42
|
+
netfx35: z.ZodBoolean;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
go: z.ZodObject<{
|
|
45
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
46
|
+
version: z.ZodString;
|
|
47
|
+
tools: z.ZodArray<z.ZodString>;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
java: z.ZodObject<{
|
|
50
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
51
|
+
version: z.ZodString;
|
|
52
|
+
maven: z.ZodBoolean;
|
|
53
|
+
gradle: z.ZodBoolean;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
ruby: z.ZodObject<{
|
|
56
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
57
|
+
version: z.ZodString;
|
|
58
|
+
gems: z.ZodArray<z.ZodString>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
php: z.ZodObject<{
|
|
61
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
62
|
+
version: z.ZodString;
|
|
63
|
+
composer: z.ZodBoolean;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
deno: z.ZodObject<{
|
|
66
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
pwsh: z.ZodObject<{
|
|
69
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
70
|
+
}, z.core.$strict>;
|
|
71
|
+
cli: z.ZodObject<{
|
|
72
|
+
gh: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
73
|
+
zstd: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
74
|
+
openssl: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
bun: z.ZodObject<{
|
|
77
|
+
enabled: z.ZodBoolean;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
uv: z.ZodObject<{
|
|
80
|
+
enabled: z.ZodBoolean;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
vcRuntime: z.ZodObject<{
|
|
83
|
+
enabled: z.ZodBoolean;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
mesa: z.ZodObject<{
|
|
86
|
+
enabled: z.ZodBoolean;
|
|
87
|
+
vulkan: z.ZodBoolean;
|
|
88
|
+
}, z.core.$strict>;
|
|
89
|
+
vscode: z.ZodObject<{
|
|
90
|
+
enabled: z.ZodBoolean;
|
|
91
|
+
}, z.core.$strict>;
|
|
92
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
93
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Languages and tools installed inside the sandbox.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { enabled, Enabled, Packages, Strings, toggle } from './common.js';
|
|
4
|
+
export const Toolchains = z.strictObject({
|
|
5
|
+
node: z.strictObject({
|
|
6
|
+
version: z.string().min(1).describe('Default Node version for nvm. "host" = the Node on this PC. A project\'s .nvmrc / .node-version wins.'),
|
|
7
|
+
extraVersions: Strings.describe('More Node versions to install (switch with nvm use). On top of the up to 3 versions copied from this PC\'s nvm, not counted towards that limit.'),
|
|
8
|
+
corepack: z.boolean().describe('pnpm and yarn through corepack (a project\'s "packageManager" in package.json picks the version).'),
|
|
9
|
+
volta: Enabled.describe('Volta: true, false, or "auto" = when the project\'s package.json has "volta" pins or this PC uses Volta. With pins, Volta\'s node/npm/yarn/pnpm come first on PATH.'),
|
|
10
|
+
globalPackages: Packages('npm packages installed globally into the default Node version', '["typescript", "npm-check-updates"]'),
|
|
11
|
+
}),
|
|
12
|
+
python: z.strictObject({
|
|
13
|
+
enabled: enabled('Python 3 (CPython with pip).', 'pyproject.toml, requirements.txt, setup.py, Pipfile or .python-version'),
|
|
14
|
+
version: z.string().min(1).describe('Python 3 version prefix, e.g. "3" or "3.12". A project\'s .python-version wins.'),
|
|
15
|
+
python2: z.boolean().describe('Also install Python 2.7 as python2 / pip2.'),
|
|
16
|
+
pyenv: Enabled.describe('pyenv-win (pyenv install / local / global): true, false, or "auto" = when this PC uses pyenv. .python-version is honoured either way, and `uv python install` always works.'),
|
|
17
|
+
tools: Packages('Python command-line tools installed with `uv tool install` (needs uv)', '["poetry", "ruff", "pre-commit"]'),
|
|
18
|
+
}),
|
|
19
|
+
rust: z.strictObject({
|
|
20
|
+
enabled: enabled('Rust via rustup (cargo, rustc).', 'Cargo.toml or rust-toolchain(.toml)'),
|
|
21
|
+
toolchain: z.string().min(1).describe('Default toolchain, e.g. "stable". rust-toolchain.toml in a project wins.'),
|
|
22
|
+
host: z.string().min(1).describe('Host triple, or "auto": x86_64-pc-windows-msvc when the MSVC toolchain is on (like most PCs), else x86_64-pc-windows-gnu (MinGW is its linker).'),
|
|
23
|
+
components: Packages('Extra rustup components', '["rust-src", "llvm-tools"]'),
|
|
24
|
+
targets: Packages('Extra rustup targets', '["wasm32-unknown-unknown"]'),
|
|
25
|
+
crates: Packages('Binaries for cargo: prebuilt via cargo-binstall when the crate publishes a Windows build, else compiled with `cargo install --locked` (slow the first time)', '["sccache", "cargo-nextest", "cargo-deny"]'),
|
|
26
|
+
targetDir: z.string().min(1).describe('"shared": cargo\'s default target\\ (shared with builds on this PC, so builds on either side invalidate the other), "separate": <workspace>\\target\\sandbox (kept, no cross-talk), "local": on the sandbox\'s own disk (fastest, lost every boot), or a guest path.'),
|
|
27
|
+
}),
|
|
28
|
+
msvc: z.strictObject({
|
|
29
|
+
enabled: enabled('MSVC (cl, link) and the Windows SDK, portable from Microsoft\'s Visual Studio manifest (~1-2 GB once), with vcvars64.bat and vswhere.', 'a .vcxproj, CMakePresets.json, a script calling vcvars/vswhere, or a Rust project when this PC builds Rust with MSVC'),
|
|
30
|
+
acceptLicense: z.boolean().describe('Required to install MSVC: you accept the Visual Studio licence terms (https://visualstudio.microsoft.com/license-terms/), which need a Visual Studio licence.'),
|
|
31
|
+
msvcVersion: z.string().min(1).describe('"latest" or an MSVC tools version prefix, e.g. "14.44".'),
|
|
32
|
+
sdkVersion: z.string().min(1).describe('"latest" or a Windows SDK build, e.g. "26100" or "10.0.22621".'),
|
|
33
|
+
}),
|
|
34
|
+
cpp: z.strictObject({
|
|
35
|
+
enabled: enabled('MinGW-w64 GCC with CMake, Ninja, premake5 and mingw32-make (also Rust\'s linker).', 'CMakeLists.txt, Makefile, meson.build, premake5.lua or Cargo.toml'),
|
|
36
|
+
flexBison: z.boolean().describe('win_flex / win_bison, the parser generators many C/C++ projects (game engines among them) need; CMake finds them.'),
|
|
37
|
+
}),
|
|
38
|
+
dotnet: z.strictObject({
|
|
39
|
+
enabled: enabled('.NET SDK (C#, F#).', 'a .sln, .slnx, .csproj, .fsproj or global.json'),
|
|
40
|
+
channels: Strings.describe('SDK channels, e.g. ["LTS", "8.0"]. A project\'s global.json is installed too.'),
|
|
41
|
+
tools: Packages('Global .NET tools (`dotnet tool install -g`)', '["dotnet-ef", "csharpier"]'),
|
|
42
|
+
workloads: Packages('SDK workloads (`dotnet workload install`)', '["aspire", "wasm-tools"]'),
|
|
43
|
+
frameworkTargets: Strings.describe('.NET Framework reference assemblies (targeting packs) from NuGet, so net4x and old-style .csproj projects build without Visual Studio, e.g. ["net48", "net472", "net462"]. The 4.8 runtime itself ships with Windows.'),
|
|
44
|
+
netfx35: z.boolean().describe('.NET Framework 3.5 runtime (a Windows feature, enabled from Windows Update on every boot; a few minutes).'),
|
|
45
|
+
}),
|
|
46
|
+
go: z.strictObject({
|
|
47
|
+
enabled: enabled('Go.', 'go.mod or go.work'),
|
|
48
|
+
version: z.string().min(1).describe('"stable" or a version prefix such as "1.23". A go.mod asking for newer fetches it itself (GOTOOLCHAIN=auto).'),
|
|
49
|
+
tools: Packages('Go tools (`go install <path>@<version>`)', '["golang.org/x/tools/gopls@latest"]'),
|
|
50
|
+
}),
|
|
51
|
+
java: z.strictObject({
|
|
52
|
+
enabled: enabled('Java: Eclipse Temurin JDK.', 'pom.xml, build.gradle(.kts), settings.gradle(.kts), mvnw, gradlew or .java-version'),
|
|
53
|
+
version: z.string().min(1).describe('"lts" (newest LTS) or a major version such as "21". A project\'s .java-version or .sdkmanrc wins.'),
|
|
54
|
+
maven: z.boolean().describe('Apache Maven (mvn). A project\'s mvnw works either way.'),
|
|
55
|
+
gradle: z.boolean().describe('Gradle (gradle). A project\'s gradlew works either way.'),
|
|
56
|
+
}),
|
|
57
|
+
ruby: z.strictObject({
|
|
58
|
+
enabled: enabled('Ruby (RubyInstaller, with gem and bundler). Gems with C extensions need MSYS2, which is not included.', 'Gemfile, a .gemspec or .ruby-version'),
|
|
59
|
+
version: z.string().min(1).describe('Version prefix, e.g. "3" or "3.3". A project\'s .ruby-version wins.'),
|
|
60
|
+
gems: Packages('Gems installed globally', '["rubocop"]'),
|
|
61
|
+
}),
|
|
62
|
+
php: z.strictObject({
|
|
63
|
+
enabled: enabled('PHP (with the Visual C++ runtime it needs, installed on every boot).', 'composer.json, artisan or .php-version'),
|
|
64
|
+
version: z.string().min(1).describe('Version prefix, e.g. "8" or "8.3". A project\'s .php-version wins.'),
|
|
65
|
+
composer: z.boolean().describe('Composer.'),
|
|
66
|
+
}),
|
|
67
|
+
deno: z.strictObject({ enabled: enabled('Deno.', 'deno.json, deno.jsonc or deno.lock') }),
|
|
68
|
+
pwsh: z.strictObject({ enabled: Enabled.describe('PowerShell 7 (pwsh), portable (~110 MB once); `powershell` stays Windows PowerShell 5.1. true, false, or "auto" = when a .ps1 at the root or one folder down has #Requires -Version 7 / -PSEdition Core or a `pwsh ...` usage line, or, in a folder that is no project yet, when this PC has PowerShell 7.') }),
|
|
69
|
+
cli: z.strictObject({
|
|
70
|
+
gh: Enabled.describe('GitHub CLI (gh). Only with provisioning.git.access "full": gh can push and merge through the GitHub API, past a read-only git. Your PC\'s gh login is never copied; `gh auth login` inside persists (GH_CONFIG_DIR). "auto" = when the project has a .github folder.'),
|
|
71
|
+
zstd: Enabled.describe('Zstandard (zstd). "auto" = off; set true to get it.'),
|
|
72
|
+
openssl: Enabled.describe('`openssl` on PATH, from the copy Git for Windows ships (its mingw64\\bin is not put on PATH, so it cannot shadow MinGW\'s gcc). "auto" = on.'),
|
|
73
|
+
}).describe('Small portable command-line tools from their GitHub releases, installed once into tools\\cli.'),
|
|
74
|
+
bun: toggle('Bun runtime (claude-mem needs it).'),
|
|
75
|
+
uv: toggle('uv, the Python package manager (claude-mem needs it).'),
|
|
76
|
+
vcRuntime: toggle('Microsoft Visual C++ runtime for tools that need it (a real installer, so it runs on every boot, ~15 s). PHP installs it regardless.'),
|
|
77
|
+
mesa: z.strictObject({
|
|
78
|
+
enabled: z.boolean().describe('Mesa 3D (llvmpipe): OpenGL 4.5 in software for games and apps when there is no GPU (sandbox.vGpu off). Copy opengl32.dll and libgallium_wgl.dll from %MESA_DIR% next to the program\'s .exe.'),
|
|
79
|
+
vulkan: z.boolean().describe('Also software Vulkan 1.4 (Mesa lavapipe) with the Khronos loader, registered for every program; for wgpu set WGPU_BACKEND=vulkan.'),
|
|
80
|
+
}),
|
|
81
|
+
vscode: toggle('Portable VS Code inside the sandbox (code on PATH, desktop shortcut); its settings and extensions persist.'),
|
|
82
|
+
environment: z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/, 'letters, digits and _ only'), z.string()).describe('Extra environment variables for the agent and every terminal, e.g. registry mirrors: {"NPM_CONFIG_REGISTRY": "https://...", "PIP_INDEX_URL": "https://..."}.'),
|
|
83
|
+
});
|