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
package/dist/shared/schema.d.ts
CHANGED
|
@@ -20,6 +20,145 @@ export declare const SandboxStatus: z.ZodObject<{
|
|
|
20
20
|
guestWorkspace: z.ZodString;
|
|
21
21
|
headless: z.ZodBoolean;
|
|
22
22
|
}, z.core.$strip>;
|
|
23
|
+
/**
|
|
24
|
+
* A project the host registered after boot (sandbox claude from another folder): everything the guest needs to
|
|
25
|
+
* provision it and run its sessions with its own environment, resolved on the host exactly like a fresh launch (its
|
|
26
|
+
* approved .sandbox-config.json, version files, toolchain detection, database plan). Host -> guest only.
|
|
27
|
+
*/
|
|
28
|
+
export declare const ProjectSpec: z.ZodObject<{
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
workspace: z.ZodString;
|
|
31
|
+
workspaceHost: z.ZodString;
|
|
32
|
+
toolchains: z.ZodObject<{
|
|
33
|
+
node: z.ZodObject<{
|
|
34
|
+
version: z.ZodString;
|
|
35
|
+
extraVersions: z.ZodArray<z.ZodString>;
|
|
36
|
+
corepack: z.ZodBoolean;
|
|
37
|
+
volta: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
38
|
+
globalPackages: z.ZodArray<z.ZodString>;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
python: z.ZodObject<{
|
|
41
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
42
|
+
version: z.ZodString;
|
|
43
|
+
python2: z.ZodBoolean;
|
|
44
|
+
pyenv: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
45
|
+
tools: z.ZodArray<z.ZodString>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
rust: z.ZodObject<{
|
|
48
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
49
|
+
toolchain: z.ZodString;
|
|
50
|
+
host: z.ZodString;
|
|
51
|
+
components: z.ZodArray<z.ZodString>;
|
|
52
|
+
targets: z.ZodArray<z.ZodString>;
|
|
53
|
+
crates: z.ZodArray<z.ZodString>;
|
|
54
|
+
targetDir: z.ZodString;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
msvc: z.ZodObject<{
|
|
57
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
58
|
+
acceptLicense: z.ZodBoolean;
|
|
59
|
+
msvcVersion: z.ZodString;
|
|
60
|
+
sdkVersion: z.ZodString;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
cpp: z.ZodObject<{
|
|
63
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
64
|
+
flexBison: z.ZodBoolean;
|
|
65
|
+
}, z.core.$strict>;
|
|
66
|
+
dotnet: z.ZodObject<{
|
|
67
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
68
|
+
channels: z.ZodArray<z.ZodString>;
|
|
69
|
+
tools: z.ZodArray<z.ZodString>;
|
|
70
|
+
workloads: z.ZodArray<z.ZodString>;
|
|
71
|
+
frameworkTargets: z.ZodArray<z.ZodString>;
|
|
72
|
+
netfx35: z.ZodBoolean;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
go: z.ZodObject<{
|
|
75
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
76
|
+
version: z.ZodString;
|
|
77
|
+
tools: z.ZodArray<z.ZodString>;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
java: z.ZodObject<{
|
|
80
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
81
|
+
version: z.ZodString;
|
|
82
|
+
maven: z.ZodBoolean;
|
|
83
|
+
gradle: z.ZodBoolean;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
ruby: z.ZodObject<{
|
|
86
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
87
|
+
version: z.ZodString;
|
|
88
|
+
gems: z.ZodArray<z.ZodString>;
|
|
89
|
+
}, z.core.$strict>;
|
|
90
|
+
php: z.ZodObject<{
|
|
91
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
92
|
+
version: z.ZodString;
|
|
93
|
+
composer: z.ZodBoolean;
|
|
94
|
+
}, z.core.$strict>;
|
|
95
|
+
deno: z.ZodObject<{
|
|
96
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
97
|
+
}, z.core.$strict>;
|
|
98
|
+
pwsh: z.ZodObject<{
|
|
99
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
cli: z.ZodObject<{
|
|
102
|
+
gh: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
103
|
+
zstd: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
104
|
+
openssl: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
105
|
+
}, z.core.$strict>;
|
|
106
|
+
bun: z.ZodObject<{
|
|
107
|
+
enabled: z.ZodBoolean;
|
|
108
|
+
}, z.core.$strict>;
|
|
109
|
+
uv: z.ZodObject<{
|
|
110
|
+
enabled: z.ZodBoolean;
|
|
111
|
+
}, z.core.$strict>;
|
|
112
|
+
vcRuntime: z.ZodObject<{
|
|
113
|
+
enabled: z.ZodBoolean;
|
|
114
|
+
}, z.core.$strict>;
|
|
115
|
+
mesa: z.ZodObject<{
|
|
116
|
+
enabled: z.ZodBoolean;
|
|
117
|
+
vulkan: z.ZodBoolean;
|
|
118
|
+
}, z.core.$strict>;
|
|
119
|
+
vscode: z.ZodObject<{
|
|
120
|
+
enabled: z.ZodBoolean;
|
|
121
|
+
}, z.core.$strict>;
|
|
122
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
123
|
+
}, z.core.$strict>;
|
|
124
|
+
versions: z.ZodObject<{
|
|
125
|
+
node: z.ZodObject<{
|
|
126
|
+
spec: z.ZodString;
|
|
127
|
+
source: z.ZodString;
|
|
128
|
+
}, z.core.$strict>;
|
|
129
|
+
nodeExtra: z.ZodArray<z.ZodString>;
|
|
130
|
+
python: z.ZodObject<{
|
|
131
|
+
spec: z.ZodString;
|
|
132
|
+
source: z.ZodString;
|
|
133
|
+
}, z.core.$strict>;
|
|
134
|
+
}, z.core.$strict>;
|
|
135
|
+
databases: z.ZodArray<z.ZodObject<{
|
|
136
|
+
database: z.ZodEnum<{
|
|
137
|
+
postgres: "postgres";
|
|
138
|
+
mysql: "mysql";
|
|
139
|
+
mongodb: "mongodb";
|
|
140
|
+
redis: "redis";
|
|
141
|
+
dynamodb: "dynamodb";
|
|
142
|
+
sqlserver: "sqlserver";
|
|
143
|
+
}>;
|
|
144
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
145
|
+
version: z.ZodString;
|
|
146
|
+
port: z.ZodNumber;
|
|
147
|
+
adminPort: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
}, z.core.$strict>>;
|
|
149
|
+
harnesses: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
150
|
+
hostExecutable: z.ZodOptional<z.ZodString>;
|
|
151
|
+
hostDir: z.ZodOptional<z.ZodString>;
|
|
152
|
+
npmPackage: z.ZodOptional<z.ZodString>;
|
|
153
|
+
npmBin: z.ZodOptional<z.ZodString>;
|
|
154
|
+
uvPackage: z.ZodOptional<z.ZodString>;
|
|
155
|
+
uvBin: z.ZodOptional<z.ZodString>;
|
|
156
|
+
arguments: z.ZodArray<z.ZodString>;
|
|
157
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
158
|
+
resumeArguments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
159
|
+
}, z.core.$strict>>;
|
|
160
|
+
hooks: z.ZodBoolean;
|
|
161
|
+
}, z.core.$strict>;
|
|
23
162
|
/** C:\AgentData\run\requests\<id>.json: the ONLY things the host can ask the sandbox to do. */
|
|
24
163
|
export declare const GuestRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
25
164
|
kind: z.ZodLiteral<"session">;
|
|
@@ -27,6 +166,289 @@ export declare const GuestRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
27
166
|
harness: z.ZodString;
|
|
28
167
|
args: z.ZodArray<z.ZodString>;
|
|
29
168
|
cwd: z.ZodString;
|
|
169
|
+
project: z.ZodOptional<z.ZodObject<{
|
|
170
|
+
name: z.ZodString;
|
|
171
|
+
workspace: z.ZodString;
|
|
172
|
+
workspaceHost: z.ZodString;
|
|
173
|
+
toolchains: z.ZodObject<{
|
|
174
|
+
node: z.ZodObject<{
|
|
175
|
+
version: z.ZodString;
|
|
176
|
+
extraVersions: z.ZodArray<z.ZodString>;
|
|
177
|
+
corepack: z.ZodBoolean;
|
|
178
|
+
volta: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
179
|
+
globalPackages: z.ZodArray<z.ZodString>;
|
|
180
|
+
}, z.core.$strict>;
|
|
181
|
+
python: z.ZodObject<{
|
|
182
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
183
|
+
version: z.ZodString;
|
|
184
|
+
python2: z.ZodBoolean;
|
|
185
|
+
pyenv: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
186
|
+
tools: z.ZodArray<z.ZodString>;
|
|
187
|
+
}, z.core.$strict>;
|
|
188
|
+
rust: z.ZodObject<{
|
|
189
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
190
|
+
toolchain: z.ZodString;
|
|
191
|
+
host: z.ZodString;
|
|
192
|
+
components: z.ZodArray<z.ZodString>;
|
|
193
|
+
targets: z.ZodArray<z.ZodString>;
|
|
194
|
+
crates: z.ZodArray<z.ZodString>;
|
|
195
|
+
targetDir: z.ZodString;
|
|
196
|
+
}, z.core.$strict>;
|
|
197
|
+
msvc: z.ZodObject<{
|
|
198
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
199
|
+
acceptLicense: z.ZodBoolean;
|
|
200
|
+
msvcVersion: z.ZodString;
|
|
201
|
+
sdkVersion: z.ZodString;
|
|
202
|
+
}, z.core.$strict>;
|
|
203
|
+
cpp: z.ZodObject<{
|
|
204
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
205
|
+
flexBison: z.ZodBoolean;
|
|
206
|
+
}, z.core.$strict>;
|
|
207
|
+
dotnet: z.ZodObject<{
|
|
208
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
209
|
+
channels: z.ZodArray<z.ZodString>;
|
|
210
|
+
tools: z.ZodArray<z.ZodString>;
|
|
211
|
+
workloads: z.ZodArray<z.ZodString>;
|
|
212
|
+
frameworkTargets: z.ZodArray<z.ZodString>;
|
|
213
|
+
netfx35: z.ZodBoolean;
|
|
214
|
+
}, z.core.$strict>;
|
|
215
|
+
go: z.ZodObject<{
|
|
216
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
217
|
+
version: z.ZodString;
|
|
218
|
+
tools: z.ZodArray<z.ZodString>;
|
|
219
|
+
}, z.core.$strict>;
|
|
220
|
+
java: z.ZodObject<{
|
|
221
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
222
|
+
version: z.ZodString;
|
|
223
|
+
maven: z.ZodBoolean;
|
|
224
|
+
gradle: z.ZodBoolean;
|
|
225
|
+
}, z.core.$strict>;
|
|
226
|
+
ruby: z.ZodObject<{
|
|
227
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
228
|
+
version: z.ZodString;
|
|
229
|
+
gems: z.ZodArray<z.ZodString>;
|
|
230
|
+
}, z.core.$strict>;
|
|
231
|
+
php: z.ZodObject<{
|
|
232
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
233
|
+
version: z.ZodString;
|
|
234
|
+
composer: z.ZodBoolean;
|
|
235
|
+
}, z.core.$strict>;
|
|
236
|
+
deno: z.ZodObject<{
|
|
237
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
238
|
+
}, z.core.$strict>;
|
|
239
|
+
pwsh: z.ZodObject<{
|
|
240
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
241
|
+
}, z.core.$strict>;
|
|
242
|
+
cli: z.ZodObject<{
|
|
243
|
+
gh: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
244
|
+
zstd: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
245
|
+
openssl: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
246
|
+
}, z.core.$strict>;
|
|
247
|
+
bun: z.ZodObject<{
|
|
248
|
+
enabled: z.ZodBoolean;
|
|
249
|
+
}, z.core.$strict>;
|
|
250
|
+
uv: z.ZodObject<{
|
|
251
|
+
enabled: z.ZodBoolean;
|
|
252
|
+
}, z.core.$strict>;
|
|
253
|
+
vcRuntime: z.ZodObject<{
|
|
254
|
+
enabled: z.ZodBoolean;
|
|
255
|
+
}, z.core.$strict>;
|
|
256
|
+
mesa: z.ZodObject<{
|
|
257
|
+
enabled: z.ZodBoolean;
|
|
258
|
+
vulkan: z.ZodBoolean;
|
|
259
|
+
}, z.core.$strict>;
|
|
260
|
+
vscode: z.ZodObject<{
|
|
261
|
+
enabled: z.ZodBoolean;
|
|
262
|
+
}, z.core.$strict>;
|
|
263
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
264
|
+
}, z.core.$strict>;
|
|
265
|
+
versions: z.ZodObject<{
|
|
266
|
+
node: z.ZodObject<{
|
|
267
|
+
spec: z.ZodString;
|
|
268
|
+
source: z.ZodString;
|
|
269
|
+
}, z.core.$strict>;
|
|
270
|
+
nodeExtra: z.ZodArray<z.ZodString>;
|
|
271
|
+
python: z.ZodObject<{
|
|
272
|
+
spec: z.ZodString;
|
|
273
|
+
source: z.ZodString;
|
|
274
|
+
}, z.core.$strict>;
|
|
275
|
+
}, z.core.$strict>;
|
|
276
|
+
databases: z.ZodArray<z.ZodObject<{
|
|
277
|
+
database: z.ZodEnum<{
|
|
278
|
+
postgres: "postgres";
|
|
279
|
+
mysql: "mysql";
|
|
280
|
+
mongodb: "mongodb";
|
|
281
|
+
redis: "redis";
|
|
282
|
+
dynamodb: "dynamodb";
|
|
283
|
+
sqlserver: "sqlserver";
|
|
284
|
+
}>;
|
|
285
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
286
|
+
version: z.ZodString;
|
|
287
|
+
port: z.ZodNumber;
|
|
288
|
+
adminPort: z.ZodOptional<z.ZodNumber>;
|
|
289
|
+
}, z.core.$strict>>;
|
|
290
|
+
harnesses: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
291
|
+
hostExecutable: z.ZodOptional<z.ZodString>;
|
|
292
|
+
hostDir: z.ZodOptional<z.ZodString>;
|
|
293
|
+
npmPackage: z.ZodOptional<z.ZodString>;
|
|
294
|
+
npmBin: z.ZodOptional<z.ZodString>;
|
|
295
|
+
uvPackage: z.ZodOptional<z.ZodString>;
|
|
296
|
+
uvBin: z.ZodOptional<z.ZodString>;
|
|
297
|
+
arguments: z.ZodArray<z.ZodString>;
|
|
298
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
299
|
+
resumeArguments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
300
|
+
}, z.core.$strict>>;
|
|
301
|
+
hooks: z.ZodBoolean;
|
|
302
|
+
}, z.core.$strict>>;
|
|
303
|
+
harnessSpec: z.ZodOptional<z.ZodObject<{
|
|
304
|
+
hostExecutable: z.ZodOptional<z.ZodString>;
|
|
305
|
+
hostDir: z.ZodOptional<z.ZodString>;
|
|
306
|
+
npmPackage: z.ZodOptional<z.ZodString>;
|
|
307
|
+
npmBin: z.ZodOptional<z.ZodString>;
|
|
308
|
+
uvPackage: z.ZodOptional<z.ZodString>;
|
|
309
|
+
uvBin: z.ZodOptional<z.ZodString>;
|
|
310
|
+
arguments: z.ZodArray<z.ZodString>;
|
|
311
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
312
|
+
resumeArguments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
313
|
+
}, z.core.$strict>>;
|
|
314
|
+
createdAt: z.ZodString;
|
|
315
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
316
|
+
kind: z.ZodLiteral<"project">;
|
|
317
|
+
id: z.ZodString;
|
|
318
|
+
project: z.ZodObject<{
|
|
319
|
+
name: z.ZodString;
|
|
320
|
+
workspace: z.ZodString;
|
|
321
|
+
workspaceHost: z.ZodString;
|
|
322
|
+
toolchains: z.ZodObject<{
|
|
323
|
+
node: z.ZodObject<{
|
|
324
|
+
version: z.ZodString;
|
|
325
|
+
extraVersions: z.ZodArray<z.ZodString>;
|
|
326
|
+
corepack: z.ZodBoolean;
|
|
327
|
+
volta: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
328
|
+
globalPackages: z.ZodArray<z.ZodString>;
|
|
329
|
+
}, z.core.$strict>;
|
|
330
|
+
python: z.ZodObject<{
|
|
331
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
332
|
+
version: z.ZodString;
|
|
333
|
+
python2: z.ZodBoolean;
|
|
334
|
+
pyenv: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
335
|
+
tools: z.ZodArray<z.ZodString>;
|
|
336
|
+
}, z.core.$strict>;
|
|
337
|
+
rust: z.ZodObject<{
|
|
338
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
339
|
+
toolchain: z.ZodString;
|
|
340
|
+
host: z.ZodString;
|
|
341
|
+
components: z.ZodArray<z.ZodString>;
|
|
342
|
+
targets: z.ZodArray<z.ZodString>;
|
|
343
|
+
crates: z.ZodArray<z.ZodString>;
|
|
344
|
+
targetDir: z.ZodString;
|
|
345
|
+
}, z.core.$strict>;
|
|
346
|
+
msvc: z.ZodObject<{
|
|
347
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
348
|
+
acceptLicense: z.ZodBoolean;
|
|
349
|
+
msvcVersion: z.ZodString;
|
|
350
|
+
sdkVersion: z.ZodString;
|
|
351
|
+
}, z.core.$strict>;
|
|
352
|
+
cpp: z.ZodObject<{
|
|
353
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
354
|
+
flexBison: z.ZodBoolean;
|
|
355
|
+
}, z.core.$strict>;
|
|
356
|
+
dotnet: z.ZodObject<{
|
|
357
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
358
|
+
channels: z.ZodArray<z.ZodString>;
|
|
359
|
+
tools: z.ZodArray<z.ZodString>;
|
|
360
|
+
workloads: z.ZodArray<z.ZodString>;
|
|
361
|
+
frameworkTargets: z.ZodArray<z.ZodString>;
|
|
362
|
+
netfx35: z.ZodBoolean;
|
|
363
|
+
}, z.core.$strict>;
|
|
364
|
+
go: z.ZodObject<{
|
|
365
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
366
|
+
version: z.ZodString;
|
|
367
|
+
tools: z.ZodArray<z.ZodString>;
|
|
368
|
+
}, z.core.$strict>;
|
|
369
|
+
java: z.ZodObject<{
|
|
370
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
371
|
+
version: z.ZodString;
|
|
372
|
+
maven: z.ZodBoolean;
|
|
373
|
+
gradle: z.ZodBoolean;
|
|
374
|
+
}, z.core.$strict>;
|
|
375
|
+
ruby: z.ZodObject<{
|
|
376
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
377
|
+
version: z.ZodString;
|
|
378
|
+
gems: z.ZodArray<z.ZodString>;
|
|
379
|
+
}, z.core.$strict>;
|
|
380
|
+
php: z.ZodObject<{
|
|
381
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
382
|
+
version: z.ZodString;
|
|
383
|
+
composer: z.ZodBoolean;
|
|
384
|
+
}, z.core.$strict>;
|
|
385
|
+
deno: z.ZodObject<{
|
|
386
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
387
|
+
}, z.core.$strict>;
|
|
388
|
+
pwsh: z.ZodObject<{
|
|
389
|
+
enabled: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
390
|
+
}, z.core.$strict>;
|
|
391
|
+
cli: z.ZodObject<{
|
|
392
|
+
gh: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
393
|
+
zstd: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
394
|
+
openssl: z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>;
|
|
395
|
+
}, z.core.$strict>;
|
|
396
|
+
bun: z.ZodObject<{
|
|
397
|
+
enabled: z.ZodBoolean;
|
|
398
|
+
}, z.core.$strict>;
|
|
399
|
+
uv: z.ZodObject<{
|
|
400
|
+
enabled: z.ZodBoolean;
|
|
401
|
+
}, z.core.$strict>;
|
|
402
|
+
vcRuntime: z.ZodObject<{
|
|
403
|
+
enabled: z.ZodBoolean;
|
|
404
|
+
}, z.core.$strict>;
|
|
405
|
+
mesa: z.ZodObject<{
|
|
406
|
+
enabled: z.ZodBoolean;
|
|
407
|
+
vulkan: z.ZodBoolean;
|
|
408
|
+
}, z.core.$strict>;
|
|
409
|
+
vscode: z.ZodObject<{
|
|
410
|
+
enabled: z.ZodBoolean;
|
|
411
|
+
}, z.core.$strict>;
|
|
412
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
413
|
+
}, z.core.$strict>;
|
|
414
|
+
versions: z.ZodObject<{
|
|
415
|
+
node: z.ZodObject<{
|
|
416
|
+
spec: z.ZodString;
|
|
417
|
+
source: z.ZodString;
|
|
418
|
+
}, z.core.$strict>;
|
|
419
|
+
nodeExtra: z.ZodArray<z.ZodString>;
|
|
420
|
+
python: z.ZodObject<{
|
|
421
|
+
spec: z.ZodString;
|
|
422
|
+
source: z.ZodString;
|
|
423
|
+
}, z.core.$strict>;
|
|
424
|
+
}, z.core.$strict>;
|
|
425
|
+
databases: z.ZodArray<z.ZodObject<{
|
|
426
|
+
database: z.ZodEnum<{
|
|
427
|
+
postgres: "postgres";
|
|
428
|
+
mysql: "mysql";
|
|
429
|
+
mongodb: "mongodb";
|
|
430
|
+
redis: "redis";
|
|
431
|
+
dynamodb: "dynamodb";
|
|
432
|
+
sqlserver: "sqlserver";
|
|
433
|
+
}>;
|
|
434
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
435
|
+
version: z.ZodString;
|
|
436
|
+
port: z.ZodNumber;
|
|
437
|
+
adminPort: z.ZodOptional<z.ZodNumber>;
|
|
438
|
+
}, z.core.$strict>>;
|
|
439
|
+
harnesses: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
440
|
+
hostExecutable: z.ZodOptional<z.ZodString>;
|
|
441
|
+
hostDir: z.ZodOptional<z.ZodString>;
|
|
442
|
+
npmPackage: z.ZodOptional<z.ZodString>;
|
|
443
|
+
npmBin: z.ZodOptional<z.ZodString>;
|
|
444
|
+
uvPackage: z.ZodOptional<z.ZodString>;
|
|
445
|
+
uvBin: z.ZodOptional<z.ZodString>;
|
|
446
|
+
arguments: z.ZodArray<z.ZodString>;
|
|
447
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
448
|
+
resumeArguments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
449
|
+
}, z.core.$strict>>;
|
|
450
|
+
hooks: z.ZodBoolean;
|
|
451
|
+
}, z.core.$strict>;
|
|
30
452
|
createdAt: z.ZodString;
|
|
31
453
|
}, z.core.$strict>, z.ZodObject<{
|
|
32
454
|
kind: z.ZodLiteral<"exec">;
|
|
@@ -39,6 +461,7 @@ export declare const GuestRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
39
461
|
kind: z.ZodLiteral<"restart">;
|
|
40
462
|
id: z.ZodString;
|
|
41
463
|
harness: z.ZodNullable<z.ZodString>;
|
|
464
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
42
465
|
createdAt: z.ZodString;
|
|
43
466
|
}, z.core.$strict>, z.ZodObject<{
|
|
44
467
|
kind: z.ZodLiteral<"ping">;
|
|
@@ -61,6 +484,7 @@ export declare const SessionStatus: z.ZodObject<{
|
|
|
61
484
|
launchId: z.ZodString;
|
|
62
485
|
harness: z.ZodString;
|
|
63
486
|
cwd: z.ZodString;
|
|
487
|
+
project: z.ZodOptional<z.ZodString>;
|
|
64
488
|
phase: z.ZodEnum<{
|
|
65
489
|
failed: "failed";
|
|
66
490
|
starting: "starting";
|
|
@@ -77,6 +501,25 @@ export declare const SessionStatus: z.ZodObject<{
|
|
|
77
501
|
token: z.ZodString;
|
|
78
502
|
}, z.core.$strict>>;
|
|
79
503
|
}, z.core.$strip>;
|
|
504
|
+
/** C:\AgentData\run\projects\<name>.json: how far a project's provisioning is (guest-written, so validated and capped). */
|
|
505
|
+
export declare const ProjectStatus: z.ZodObject<{
|
|
506
|
+
name: z.ZodString;
|
|
507
|
+
workspace: z.ZodString;
|
|
508
|
+
phase: z.ZodEnum<{
|
|
509
|
+
provisioning: "provisioning";
|
|
510
|
+
ready: "ready";
|
|
511
|
+
failed: "failed";
|
|
512
|
+
}>;
|
|
513
|
+
message: z.ZodString;
|
|
514
|
+
updatedAt: z.ZodString;
|
|
515
|
+
databases: z.ZodArray<z.ZodObject<{
|
|
516
|
+
database: z.ZodString;
|
|
517
|
+
port: z.ZodNumber;
|
|
518
|
+
}, z.core.$strip>>;
|
|
519
|
+
summary: z.ZodArray<z.ZodString>;
|
|
520
|
+
}, z.core.$strip>;
|
|
521
|
+
export type ProjectSpecT = z.output<typeof ProjectSpec>;
|
|
522
|
+
export type ProjectStatusT = z.output<typeof ProjectStatus>;
|
|
80
523
|
export type AttachEndpointT = z.output<typeof AttachEndpoint>;
|
|
81
524
|
export type SandboxStatusT = z.output<typeof SandboxStatus>;
|
|
82
525
|
export type GuestRequestT = z.output<typeof GuestRequest>;
|
package/dist/shared/schema.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// The host <-> sandbox channel messages, defined once with zod. Both sides parse what they read: the guest only acts on
|
|
2
2
|
// these request kinds, and the host treats everything the guest writes as untrusted (shapes checked, sizes capped).
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import { Harness, Toolchains } from '../core/schema.js';
|
|
4
5
|
export const Id = z.string().regex(/^[A-Za-z0-9_-]{1,64}$/, 'invalid id');
|
|
5
6
|
const Text = (max = 4096) => z.string().max(max);
|
|
6
7
|
const Time = Text(64);
|
|
@@ -19,11 +20,37 @@ export const SandboxStatus = z.object({
|
|
|
19
20
|
guestWorkspace: Text(),
|
|
20
21
|
headless: z.boolean(),
|
|
21
22
|
});
|
|
23
|
+
const Version = z.strictObject({ spec: Text(128), source: Text(256) });
|
|
24
|
+
const DatabasePlan = z.strictObject({
|
|
25
|
+
database: z.enum(['postgres', 'mysql', 'sqlserver', 'mongodb', 'redis', 'dynamodb']),
|
|
26
|
+
reasons: z.array(Text(1024)).max(32), version: Text(64), port: z.number().int().min(1024).max(65535), adminPort: z.number().int().min(1024).max(65535).optional(),
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* A project the host registered after boot (sandbox claude from another folder): everything the guest needs to
|
|
30
|
+
* provision it and run its sessions with its own environment, resolved on the host exactly like a fresh launch (its
|
|
31
|
+
* approved .sandbox-config.json, version files, toolchain detection, database plan). Host -> guest only.
|
|
32
|
+
*/
|
|
33
|
+
export const ProjectSpec = z.strictObject({
|
|
34
|
+
name: Id,
|
|
35
|
+
/** Inside the sandbox: C:\Projects\<name>. */
|
|
36
|
+
workspace: Text(1024),
|
|
37
|
+
workspaceHost: Text(1024),
|
|
38
|
+
toolchains: Toolchains,
|
|
39
|
+
versions: z.strictObject({ node: Version, nodeExtra: z.array(Text(128)).max(16), python: Version }),
|
|
40
|
+
databases: z.array(DatabasePlan).max(8),
|
|
41
|
+
/** Agents this project may start that the sandbox did not boot with (its .sandbox-config.json "harness"). */
|
|
42
|
+
harnesses: z.record(Text(64), Harness).refine((h) => Object.keys(h).length <= 8, 'at most 8 agents'),
|
|
43
|
+
/** Its hooks were staged in C:\AgentLaunch\projects\<name>\hooks. */
|
|
44
|
+
hooks: z.boolean(),
|
|
45
|
+
});
|
|
22
46
|
/** C:\AgentData\run\requests\<id>.json: the ONLY things the host can ask the sandbox to do. */
|
|
23
47
|
export const GuestRequest = z.discriminatedUnion('kind', [
|
|
24
|
-
z.strictObject({ kind: z.literal('session'), id: Id, harness: Text(64), args: z.array(Text()).max(256), cwd: Text(), createdAt: Time }),
|
|
48
|
+
z.strictObject({ kind: z.literal('session'), id: Id, harness: Text(64), args: z.array(Text()).max(256), cwd: Text(), project: ProjectSpec.optional(), harnessSpec: Harness.optional(), createdAt: Time }),
|
|
49
|
+
/** Provision a registered project without starting an agent (sandbox start / exec / db from its folder). */
|
|
50
|
+
z.strictObject({ kind: z.literal('project'), id: Id, project: ProjectSpec, createdAt: Time }),
|
|
25
51
|
z.strictObject({ kind: z.literal('exec'), id: Id, command: z.array(Text()).min(1).max(256), cwd: Text(), timeoutSeconds: z.number().positive().max(86400), createdAt: Time }),
|
|
26
|
-
|
|
52
|
+
/** cwd: only the sessions in this folder or below (one project's); omitted = every session. */
|
|
53
|
+
z.strictObject({ kind: z.literal('restart'), id: Id, harness: Text(64).nullable(), cwd: Text().optional(), createdAt: Time }),
|
|
27
54
|
z.strictObject({ kind: z.literal('ping'), id: Id, createdAt: Time }),
|
|
28
55
|
]);
|
|
29
56
|
/** C:\AgentData\run\responses\<id>.json: the guest's reply. */
|
|
@@ -42,6 +69,8 @@ export const SessionStatus = z.object({
|
|
|
42
69
|
launchId: Text(64),
|
|
43
70
|
harness: Text(64),
|
|
44
71
|
cwd: Text(),
|
|
72
|
+
/** The project it runs in: its hub name, or the launch folder's for the first project. */
|
|
73
|
+
project: Text(64).optional(),
|
|
45
74
|
phase: z.enum(['starting', 'running', 'exited', 'failed']),
|
|
46
75
|
message: Text(),
|
|
47
76
|
updatedAt: Time,
|
|
@@ -49,3 +78,13 @@ export const SessionStatus = z.object({
|
|
|
49
78
|
exitCode: z.number().int().optional(),
|
|
50
79
|
attach: AttachEndpoint.optional(),
|
|
51
80
|
});
|
|
81
|
+
/** C:\AgentData\run\projects\<name>.json: how far a project's provisioning is (guest-written, so validated and capped). */
|
|
82
|
+
export const ProjectStatus = z.object({
|
|
83
|
+
name: Id,
|
|
84
|
+
workspace: Text(1024),
|
|
85
|
+
phase: z.enum(['provisioning', 'ready', 'failed']),
|
|
86
|
+
message: Text(),
|
|
87
|
+
updatedAt: Time,
|
|
88
|
+
databases: z.array(z.object({ database: Text(32), port: z.number().int() })).max(16),
|
|
89
|
+
summary: z.array(Text(512)).max(64),
|
|
90
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const selfTestRunning: () => boolean;
|
|
2
|
+
/** Why the self-test may not write, copy or delete at `target` (anywhere but the temp folder), or null. */
|
|
3
|
+
export declare const testWriteRefusal: (target: string) => string | null;
|
|
4
|
+
export declare const assertTestWritable: (target: string) => void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Defence in depth for the self-test: while AGENT_SANDBOX_SELFTEST=1 is set, nothing may act on the real PC. Every write or
|
|
2
|
+
// delete on the host is limited to the temp folder the tests use (outward actions refuse in host/test-guard.ts). The
|
|
3
|
+
// self-test sets the variable for itself and its child processes. No imports from core/: the sandbox bundles this file too.
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import os from 'node:os';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
export const selfTestRunning = () => process.env.AGENT_SANDBOX_SELFTEST === '1';
|
|
8
|
+
/** Resolves links in the part of the path that exists, so C:\Users\WDAGUT~1 and C:\Users\WDAGUtilityAccount compare equal. */
|
|
9
|
+
const canonical = (p) => {
|
|
10
|
+
let rest = '';
|
|
11
|
+
let current = path.resolve(p);
|
|
12
|
+
for (;;) {
|
|
13
|
+
try {
|
|
14
|
+
return path.join(fs.realpathSync.native(current), rest).toLowerCase();
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
const parent = path.dirname(current);
|
|
18
|
+
if (parent === current)
|
|
19
|
+
return path.resolve(p).toLowerCase();
|
|
20
|
+
rest = path.join(path.basename(current), rest);
|
|
21
|
+
current = parent;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
/** Why the self-test may not write, copy or delete at `target` (anywhere but the temp folder), or null. */
|
|
26
|
+
export const testWriteRefusal = (target) => {
|
|
27
|
+
if (!selfTestRunning())
|
|
28
|
+
return null;
|
|
29
|
+
const temp = canonical(os.tmpdir());
|
|
30
|
+
const t = canonical(target);
|
|
31
|
+
return t === temp || t.startsWith(temp + path.sep) ? null : 'The self-test refused to change ' + target + ': it only works in temp folders, so it can never change this PC.';
|
|
32
|
+
};
|
|
33
|
+
export const assertTestWritable = (target) => {
|
|
34
|
+
const refusal = testWriteRefusal(target);
|
|
35
|
+
if (refusal)
|
|
36
|
+
throw new Error(refusal);
|
|
37
|
+
};
|
package/dist/sync/claude-mem.js
CHANGED
|
@@ -9,6 +9,7 @@ import path from 'node:path';
|
|
|
9
9
|
import _ from 'lodash';
|
|
10
10
|
import { dirExists, homeDir, isLink } from '../core/util.js';
|
|
11
11
|
import { safeRemove } from '../shared/safe-remove.js';
|
|
12
|
+
import { assertTestWritable } from '../host/test-guard.js';
|
|
12
13
|
const SKIP_IN = /(^logs$|\.pid$|\.port$|\.lock$|^worker.*\.json$|\.incoming$|\.conflict-\d+$)/i;
|
|
13
14
|
/** The only files that may come back from the sandbox. */
|
|
14
15
|
const DATABASE = /^claude-mem\.db(-wal|-shm)?$/i;
|
|
@@ -22,7 +23,7 @@ const stampOf = (dir) => _.max(databaseFiles(dir).map((f) => fs.statSync(path.jo
|
|
|
22
23
|
const mirrorIn = (hostDir, store) => {
|
|
23
24
|
const incoming = store + '.incoming';
|
|
24
25
|
safeRemove(incoming, path.dirname(store));
|
|
25
|
-
fs.cpSync(hostDir, incoming, { recursive: true, filter: (src) => src === hostDir || !SKIP_IN.test(path.basename(src)) });
|
|
26
|
+
fs.cpSync(hostDir, incoming, { recursive: true, filter: (src) => src === hostDir || (!SKIP_IN.test(path.basename(src)) && !isLink(src)) });
|
|
26
27
|
safeRemove(store, path.dirname(store));
|
|
27
28
|
fs.renameSync(incoming, store);
|
|
28
29
|
};
|
|
@@ -50,6 +51,7 @@ const parkHostDatabases = (hostDir) => {
|
|
|
50
51
|
* overwritten is kept as `<dir>.conflict-<time>` first, so nothing is ever lost.
|
|
51
52
|
*/
|
|
52
53
|
export const syncClaudeMem = (hostDir, store, state, direction) => {
|
|
54
|
+
assertTestWritable(direction === 'in' ? store : hostDir);
|
|
53
55
|
if (isLink(store))
|
|
54
56
|
throw new Error('Refusing to sync claude-mem: ' + store + ' is a link.');
|
|
55
57
|
const hostStamp = stampOf(hostDir);
|
package/dist/sync/history.d.ts
CHANGED
|
@@ -1,24 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { projectFolderName, translatePaths } from '../shared/paths.js';
|
|
2
3
|
export { projectFolderName, translatePaths };
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
declare const SyncStateSchema: z.ZodObject<{
|
|
5
|
+
hostClaudeDir: z.ZodString;
|
|
6
|
+
hostWorkspace: z.ZodString;
|
|
7
|
+
guestWorkspace: z.ZodString;
|
|
8
|
+
syncHistory: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
syncClaudeMem: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
memHostStamp: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
memGuestStamp: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
projects: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13
|
+
hostWorkspace: z.ZodString;
|
|
14
|
+
guestWorkspace: z.ZodString;
|
|
15
|
+
}, z.core.$strip>>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type SyncState = z.output<typeof SyncStateSchema>;
|
|
18
|
+
export interface WorkspacePair {
|
|
6
19
|
hostWorkspace: string;
|
|
7
20
|
guestWorkspace: string;
|
|
8
|
-
syncHistory?: boolean;
|
|
9
|
-
syncClaudeMem?: boolean;
|
|
10
|
-
/** Newest claude-mem database time on each side right after the last sync (detects edits on both sides). */
|
|
11
|
-
memHostStamp?: number;
|
|
12
|
-
memGuestStamp?: number;
|
|
13
21
|
}
|
|
14
|
-
|
|
22
|
+
/** extra: projects registered after boot (C:\Projects\<name> -> their real folder on this PC). */
|
|
23
|
+
export interface SyncPaths extends WorkspacePair {
|
|
15
24
|
hostClaudeDir: string;
|
|
16
25
|
guestClaudeDir: string;
|
|
17
|
-
|
|
18
|
-
guestWorkspace: string;
|
|
26
|
+
extra?: WorkspacePair[];
|
|
19
27
|
}
|
|
20
28
|
/** Brings this PC's history into the sandbox state (run before the sandbox starts). Returns files copied. */
|
|
21
|
-
export declare const syncHistoryIn: (p: SyncPaths
|
|
29
|
+
export declare const syncHistoryIn: (p: SyncPaths, options?: {
|
|
30
|
+
promptHistory?: boolean;
|
|
31
|
+
}) => number;
|
|
22
32
|
/** Copies new sandbox history back to this PC (safe while the sandbox runs: transcripts are append-only). */
|
|
23
33
|
export declare const syncHistoryOut: (p: SyncPaths) => number;
|
|
24
34
|
/**
|
|
@@ -26,5 +36,6 @@ export declare const syncHistoryOut: (p: SyncPaths) => number;
|
|
|
26
36
|
* never live in the data folder the sandbox can write (a forged copy could redirect writes anywhere on this PC).
|
|
27
37
|
*/
|
|
28
38
|
export declare const syncStatePath: (dataPath: string) => string;
|
|
39
|
+
/** A state file that is missing, oversized or not in this shape counts as no state (nothing syncs back until the next launch). */
|
|
29
40
|
export declare const readSyncState: (dataPath: string) => SyncState | null;
|
|
30
41
|
export declare const writeSyncState: (dataPath: string, state: SyncState) => void;
|