windows-development-sandbox 1.11.7 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -6
- package/config.example.json +15 -4
- package/dist/app/features/access/access.def.d.ts +190 -0
- package/dist/app/features/access/access.def.js +273 -0
- package/dist/app/features/access/access.run.d.ts +79 -0
- package/dist/app/features/access/access.run.js +129 -0
- package/dist/app/features/access/index.d.ts +2 -0
- package/dist/app/features/access/index.js +3 -0
- package/dist/app/features/agents/agent-entry.js +5 -0
- package/dist/app/features/agents/agents.def.js +1 -0
- package/dist/app/features/apps/apps-rows.d.ts +4 -1
- package/dist/app/features/apps/apps-rows.js +7 -2
- package/dist/app/features/apps/apps.def.d.ts +19 -0
- package/dist/app/features/apps/apps.def.js +50 -12
- package/dist/app/features/apps/apps.run.d.ts +2 -0
- package/dist/app/features/apps/apps.run.js +1 -1
- package/dist/app/features/audit/audit.def.d.ts +350 -0
- package/dist/app/features/audit/audit.def.js +457 -0
- package/dist/app/features/audit/audit.run.d.ts +110 -0
- package/dist/app/features/audit/audit.run.js +133 -0
- package/dist/app/features/audit/index.d.ts +2 -0
- package/dist/app/features/audit/index.js +3 -0
- package/dist/app/features/defs.d.ts +349 -4
- package/dist/app/features/defs.js +16 -1
- package/dist/app/features/files/files.def.js +1 -0
- package/dist/app/features/health/health.def.js +1 -0
- package/dist/app/features/sandbox/sandbox.def.js +3 -0
- package/dist/app/features/sessions/sessions.def.d.ts +36 -0
- package/dist/app/features/sessions/sessions.def.js +77 -9
- package/dist/app/features/sessions/sessions.run.d.ts +25 -2
- package/dist/app/features/sessions/sessions.run.js +71 -3
- package/dist/app/features/settings/settings.def.d.ts +8 -0
- package/dist/app/features/settings/settings.def.js +17 -0
- package/dist/app/features/settings/settings.run.d.ts +3 -0
- package/dist/app/features/settings/settings.run.js +16 -2
- package/dist/app/features/web/web.def.d.ts +9 -0
- package/dist/app/features/web/web.def.js +26 -1
- package/dist/app/features/web/web.run.d.ts +3 -0
- package/dist/app/features/web/web.run.js +11 -3
- package/dist/app/kernel/access.d.ts +33 -0
- package/dist/app/kernel/access.js +44 -0
- package/dist/app/kernel/define.d.ts +26 -2
- package/dist/app/kernel/index.d.ts +1 -0
- package/dist/app/kernel/index.js +1 -0
- package/dist/app/kernel/rpc.d.ts +5 -2
- package/dist/app/registry.d.ts +4 -1
- package/dist/app/registry.js +26 -4
- package/dist/cli/args.d.ts +0 -3
- package/dist/cli/args.js +3 -4
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.js +1 -1
- package/dist/cli/commands/launch/prepare.js +1 -1
- package/dist/cli/commands/maintenance/index.d.ts +0 -1
- package/dist/cli/commands/maintenance/index.js +0 -1
- package/dist/cli/commands/registry.js +3 -2
- package/dist/cli/commands/remote.d.ts +2 -0
- package/dist/cli/commands/remote.js +49 -0
- package/dist/cli/commands/sessions/reopen.js +3 -0
- package/dist/cli/commands/web.js +66 -0
- package/dist/cli/manifest.d.ts +63 -45
- package/dist/cli/manifest.js +33 -18
- package/dist/cli/menu/io-menu.d.ts +5 -3
- package/dist/cli/menu/io-menu.js +12 -5
- package/dist/cli/menu/pages/apps-page.js +2 -15
- package/dist/cli/menu/pages/maintenance-page.d.ts +4 -0
- package/dist/cli/menu/pages/maintenance-page.js +51 -8
- package/dist/cli/menu/remote-menu.d.ts +19 -0
- package/dist/cli/menu/remote-menu.js +108 -0
- package/dist/cli/menu/views.js +4 -0
- package/dist/cli/operations/handler.js +15 -1
- package/dist/cli/services/remote-client.d.ts +16 -0
- package/dist/cli/services/remote-client.js +141 -0
- package/dist/cli/services/sessions-service.d.ts +5 -0
- package/dist/cli/services/sessions-service.js +17 -1
- package/dist/core/config/defaults.js +12 -2
- package/dist/core/local-config/file.js +16 -2
- package/dist/core/local-config/overrides.js +7 -0
- package/dist/core/run/versions.js +9 -8
- package/dist/core/schema/apps.d.ts +9 -0
- package/dist/core/schema/apps.js +9 -0
- package/dist/core/schema/config.d.ts +23 -3
- package/dist/core/schema/config.js +42 -5
- package/dist/core/schema/sandbox.d.ts +1 -0
- package/dist/core/schema/sandbox.js +11 -3
- package/dist/core/schema/web.d.ts +51 -0
- package/dist/core/schema/web.js +46 -1
- package/dist/core/util/fs.d.ts +5 -0
- package/dist/core/util/fs.js +23 -0
- package/dist/core/util/index.d.ts +1 -1
- package/dist/core/util/index.js +1 -1
- package/dist/guest/apps/app-installer.js +50 -4
- package/dist/guest/apps/index.d.ts +1 -1
- package/dist/guest/apps/index.js +1 -1
- package/dist/guest/apps/sources.js +1 -1
- package/dist/guest/audit/parse.d.ts +32 -2
- package/dist/guest/audit/parse.js +43 -5
- package/dist/guest/audit/process-audit.d.ts +3 -1
- package/dist/guest/audit/process-audit.js +9 -6
- package/dist/guest/boot/boot.js +12 -3
- package/dist/guest/boot/guide.d.ts +1 -1
- package/dist/guest/boot/guide.js +27 -3
- package/dist/guest/daemon/daemon.js +2 -0
- package/dist/guest/daemon/idle-shutdown.js +2 -1
- package/dist/guest/daemon/sessions.d.ts +23 -2
- package/dist/guest/daemon/sessions.js +151 -20
- package/dist/guest/entries/daemon.js +2 -1
- package/dist/guest/git/decision.js +7 -0
- package/dist/guest/sessions/cmdline.d.ts +14 -0
- package/dist/guest/sessions/cmdline.js +10 -0
- package/dist/guest/setup/addon-mcp.d.ts +2 -0
- package/dist/guest/setup/addon-mcp.js +49 -0
- package/dist/guest/setup/agent-addons.d.ts +9 -0
- package/dist/guest/setup/agent-addons.js +22 -0
- package/dist/guest/setup/headroom.d.ts +7 -0
- package/dist/guest/setup/headroom.js +60 -0
- package/dist/guest/setup/managed-policy.d.ts +2 -1
- package/dist/guest/setup/managed-policy.js +15 -6
- package/dist/guest/toolchains/plan.js +8 -3
- package/dist/guest/toolchains/setup.js +3 -0
- package/dist/host/audit/attribute.d.ts +46 -0
- package/dist/host/audit/attribute.js +76 -0
- package/dist/host/audit/collect.d.ts +29 -3
- package/dist/host/audit/collect.js +256 -61
- package/dist/host/audit/git-commits.d.ts +29 -0
- package/dist/host/audit/git-commits.js +157 -0
- package/dist/host/audit/index.d.ts +5 -0
- package/dist/host/audit/index.js +6 -0
- package/dist/host/audit/log.d.ts +45 -7
- package/dist/host/audit/log.js +148 -45
- package/dist/host/audit/redact.d.ts +2 -0
- package/dist/host/audit/redact.js +67 -0
- package/dist/host/channel/channel.d.ts +5 -1
- package/dist/host/channel/channel.js +12 -0
- package/dist/host/guard/agent-files.js +7 -1
- package/dist/host/guard/commands.js +13 -1
- package/dist/host/guard/git-config.js +27 -7
- package/dist/host/guard/git-dirs.js +78 -3
- package/dist/host/guard/mark-of-the-web.js +3 -1
- package/dist/host/guard/nested-repos.js +7 -2
- package/dist/host/guard/store.js +1 -0
- package/dist/host/guard/types.d.ts +2 -0
- package/dist/host/launch/mappings.js +11 -1
- package/dist/host/launch/project-scan.js +2 -21
- package/dist/host/launch/stage.js +4 -0
- package/dist/host/life/session-ledger.js +2 -1
- package/dist/host/remote/access-store.d.ts +156 -0
- package/dist/host/remote/access-store.js +308 -0
- package/dist/host/remote/cert.d.ts +20 -0
- package/dist/host/remote/cert.js +103 -0
- package/dist/host/remote/door-client.d.ts +13 -0
- package/dist/host/remote/door-client.js +54 -0
- package/dist/host/remote/firewall.d.ts +44 -0
- package/dist/host/remote/firewall.js +118 -0
- package/dist/host/remote/gate.d.ts +125 -0
- package/dist/host/remote/gate.js +391 -0
- package/dist/host/remote/index.d.ts +8 -0
- package/dist/host/remote/index.js +10 -0
- package/dist/host/remote/lan.d.ts +24 -0
- package/dist/host/remote/lan.js +88 -0
- package/dist/host/remote/tls-store.d.ts +22 -0
- package/dist/host/remote/tls-store.js +63 -0
- package/dist/host/remote/windows-helper.d.ts +67 -0
- package/dist/host/remote/windows-helper.js +129 -0
- package/dist/host/web/bridge.d.ts +5 -1
- package/dist/host/web/bridge.js +6 -2
- package/dist/host/web/browser.js +1 -1
- package/dist/host/web/control.d.ts +4 -1
- package/dist/host/web/control.js +28 -4
- package/dist/host/web/rpc.d.ts +16 -2
- package/dist/host/web/rpc.js +37 -4
- package/dist/host/web/runner.d.ts +4 -0
- package/dist/host/web/runner.js +12 -0
- package/dist/host/web/server.d.ts +18 -2
- package/dist/host/web/server.js +97 -24
- package/dist/host/web/state.d.ts +5 -0
- package/dist/host/web/state.js +8 -0
- package/dist/runtime/agent.js +184 -18
- package/dist/runtime/daemon.js +772 -338
- package/dist/runtime/db.js +184 -18
- package/dist/runtime/gitguard.js +6 -0
- package/dist/runtime/main.js +966 -553
- package/dist/runtime/netproxy.js +184 -18
- package/dist/runtime/view.js +186 -18
- package/dist/selftest/app.test.js +66 -7
- package/dist/selftest/audit.test.js +354 -47
- package/dist/selftest/channel.test.js +16 -0
- package/dist/selftest/cmdline.test.js +16 -0
- package/dist/selftest/git-access.test.js +8 -0
- package/dist/selftest/hcs.test.js +35 -0
- package/dist/selftest/hostile-input.test.js +12 -1
- package/dist/selftest/index.js +2 -0
- package/dist/selftest/live-daemon.test.js +25 -0
- package/dist/selftest/local-config.test.js +30 -0
- package/dist/selftest/menu-screens.js +1 -1
- package/dist/selftest/menu.test.js +3 -3
- package/dist/selftest/remote.test.d.ts +2 -0
- package/dist/selftest/remote.test.js +536 -0
- package/dist/selftest/repo-guard.test.js +56 -2
- package/dist/selftest/resume.test.js +2 -1
- package/dist/selftest/sharing.test.js +9 -2
- package/dist/selftest/support/engine-golden.js +9 -0
- package/dist/selftest/support/fixtures.d.ts +14 -0
- package/dist/selftest/support/web-preview.js +157 -0
- package/dist/selftest/toolchains.test.js +147 -2
- package/dist/selftest/web.test.js +2 -0
- package/dist/shared/apps/agent-addons.d.ts +64 -0
- package/dist/shared/apps/agent-addons.js +95 -0
- package/dist/shared/apps/catalogue.d.ts +33 -2
- package/dist/shared/apps/catalogue.js +102 -11
- package/dist/shared/apps/index.d.ts +3 -2
- package/dist/shared/apps/index.js +3 -2
- package/dist/shared/apps/selection.d.ts +2 -0
- package/dist/shared/apps/selection.js +7 -0
- package/dist/shared/channel/schema.d.ts +23 -0
- package/dist/shared/channel/schema.js +8 -0
- package/dist/shared/pty/protocol.d.ts +2 -0
- package/dist/shared/pty/protocol.js +2 -0
- package/dist/sync/watcher.js +9 -1
- package/dist/web/index.html +2 -2
- package/dist/web/{main-RQFN4WBY.css → main-UAQPI5XD.css} +1 -1
- package/dist/web/main-Z2WYAE2Z.js +221 -0
- package/native/csharp/HcsHost/AssemblyInfo.cs +5 -3
- package/native/csharp/HcsHost/Hcs.cs +9 -0
- package/native/csharp/HcsHost/Program.cs +26 -1
- package/native/csharp/HcsHost/Share.cs +173 -0
- package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/Program.cs +17 -1
- package/native/csharp/HostTools/WebHelper.cs +499 -0
- package/native/scripts/get-network-profile.ps1 +19 -0
- package/native/scripts/set-folder-access.ps1 +11 -0
- package/native/scripts/set-web-firewall.ps1 +103 -0
- package/package.json +1 -1
- package/sandbox/addons/ccusage/package-lock.json +111 -0
- package/sandbox/addons/ccusage/package.json +7 -0
- package/sandbox/addons/context7/package-lock.json +1313 -0
- package/sandbox/addons/context7/package.json +7 -0
- package/sandbox/addons/headroom/requirements.in +1 -0
- package/sandbox/addons/headroom/requirements.txt +2922 -0
- package/sandbox/addons/playwright-mcp/package-lock.json +56 -0
- package/sandbox/addons/playwright-mcp/package.json +7 -0
- package/sandbox/csharp/PtyHost.cs +20 -0
- package/schemas/config.schema.json +78 -4
- package/schemas/sandbox-config.schema.json +2 -20
- package/dist/cli/commands/maintenance/audit.d.ts +0 -3
- package/dist/cli/commands/maintenance/audit.js +0 -58
- package/dist/web/main-K2JMCAZI.js +0 -219
package/dist/runtime/db.js
CHANGED
|
@@ -25517,14 +25517,19 @@ var NetworkSchema = external_exports.strictObject({
|
|
|
25517
25517
|
});
|
|
25518
25518
|
var AuditSchema = external_exports.strictObject({
|
|
25519
25519
|
enabled: external_exports.boolean().describe(
|
|
25520
|
-
"Keep an audit log on this PC of what
|
|
25520
|
+
"Keep an audit log on this PC of what your agents did: programs started (with their command lines, secrets hidden), files changed in the projects, git commits, sessions, and what the repo guard caught, each linked to the agent session that did it where that can be known. The sandbox cannot change it. Read it with sandbox audit or on the Activity page."
|
|
25521
|
+
),
|
|
25522
|
+
days: external_exports.number().int().min(1).max(365).describe(
|
|
25523
|
+
"Days the audit log is kept (1 to 30; a larger number keeps 30); older days are deleted when a sandbox starts and once a day."
|
|
25521
25524
|
),
|
|
25522
|
-
days: external_exports.number().int().min(1).max(365).describe("Days the audit log is kept."),
|
|
25523
25525
|
maxMb: external_exports.number().int().min(5).max(5e3).describe("Most space the audit log may take, in MB (older days go first). Days before today are compressed."),
|
|
25524
25526
|
processes: external_exports.boolean().describe(
|
|
25525
25527
|
"Record every program started in the sandbox with its command line (Windows process auditing; repeated runs are counted, not listed)."
|
|
25526
25528
|
),
|
|
25527
|
-
files: external_exports.boolean().describe("Record the files changed in the
|
|
25529
|
+
files: external_exports.boolean().describe("Record the files changed in the projects while the sandbox runs."),
|
|
25530
|
+
commits: external_exports.boolean().describe(
|
|
25531
|
+
"Record the git commits made in the projects while the sandbox runs (read from each project's .git folder on this PC)."
|
|
25532
|
+
)
|
|
25528
25533
|
});
|
|
25529
25534
|
var WorkspaceFilterSchema = external_exports.strictObject({
|
|
25530
25535
|
enabled: external_exports.boolean().describe(
|
|
@@ -25727,7 +25732,100 @@ var ToolchainsSchema = external_exports.strictObject({
|
|
|
25727
25732
|
|
|
25728
25733
|
// src/shared/apps/catalogue.ts
|
|
25729
25734
|
var gh = (github, asset) => ({ github, asset });
|
|
25735
|
+
var RTK_VERSION = "1.0.1";
|
|
25736
|
+
var RTK_URL = "https://github.com/rtk-ai/rtk/releases/download/v" + RTK_VERSION + "/rtk-oss-x86_64-pc-windows-msvc.zip";
|
|
25737
|
+
var RTK_SHA256 = "0e53e2eca471e15fbd3636e64e6bc0b182cbc278ed0339c80450a2dd03f4cd6b";
|
|
25738
|
+
var HEADROOM_VERSION = "0.41.0";
|
|
25739
|
+
var CCUSAGE_VERSION = "20.0.36";
|
|
25740
|
+
var PLAYWRIGHT_MCP_VERSION = "0.0.83";
|
|
25741
|
+
var CONTEXT7_MCP_VERSION = "4.4.2";
|
|
25730
25742
|
var APPS = [
|
|
25743
|
+
// ---- agent add-ons
|
|
25744
|
+
{
|
|
25745
|
+
id: "rtk",
|
|
25746
|
+
name: "rtk (Rust Token Killer)",
|
|
25747
|
+
category: "agents",
|
|
25748
|
+
about: "Compacts the output of shell commands (git, tests, builds, ls ...) before the agent reads it, so it uses fewer tokens. Claude Code's Bash commands go through it on their own.",
|
|
25749
|
+
size: "6 MB",
|
|
25750
|
+
source: { url: RTK_URL, sha256: RTK_SHA256 },
|
|
25751
|
+
exe: "rtk.exe",
|
|
25752
|
+
cli: true,
|
|
25753
|
+
plugsInto: "Claude Code through a hook in the sandbox's managed settings; other agents are told to use it",
|
|
25754
|
+
userOnly: true
|
|
25755
|
+
},
|
|
25756
|
+
{
|
|
25757
|
+
id: "headroom",
|
|
25758
|
+
name: "Headroom",
|
|
25759
|
+
category: "agents",
|
|
25760
|
+
about: "Compresses what Claude Code sends to the model (tool output, logs, files) so it uses fewer tokens: a local proxy on 127.0.0.1:8787 that sits in Claude Code's API path, offline apart from forwarding to api.anthropic.com.",
|
|
25761
|
+
size: "150 MB",
|
|
25762
|
+
source: { locked: "uv", package: "headroom-ai", version: HEADROOM_VERSION },
|
|
25763
|
+
exe: "headroom.exe",
|
|
25764
|
+
service: true,
|
|
25765
|
+
plugsInto: "Claude Code: the sandbox starts the proxy and points Claude Code at it (managed settings)",
|
|
25766
|
+
userOnly: true
|
|
25767
|
+
},
|
|
25768
|
+
{
|
|
25769
|
+
id: "ccusage",
|
|
25770
|
+
name: "ccusage",
|
|
25771
|
+
category: "agents",
|
|
25772
|
+
about: "Reports the agents' token use and cost by day, month or session from their logs in the sandbox (`ccusage daily`; add --offline to skip fetching prices).",
|
|
25773
|
+
size: "5 MB",
|
|
25774
|
+
source: { locked: "npm", package: "ccusage", version: CCUSAGE_VERSION },
|
|
25775
|
+
exe: "ccusage.cmd",
|
|
25776
|
+
cli: true,
|
|
25777
|
+
plugsInto: "Reads Claude Code's session logs in the sandbox; changes nothing",
|
|
25778
|
+
userOnly: true
|
|
25779
|
+
},
|
|
25780
|
+
{
|
|
25781
|
+
id: "playwright-mcp",
|
|
25782
|
+
name: "Playwright MCP",
|
|
25783
|
+
category: "agents",
|
|
25784
|
+
about: "Lets Claude Code drive a browser (Microsoft Edge, already in the sandbox) to open pages, click, fill forms and take screenshots: the MCP server of microsoft/playwright-mcp.",
|
|
25785
|
+
size: "20 MB",
|
|
25786
|
+
source: { locked: "npm", package: "@playwright/mcp", version: PLAYWRIGHT_MCP_VERSION },
|
|
25787
|
+
exe: "playwright-mcp.cmd",
|
|
25788
|
+
service: true,
|
|
25789
|
+
mcp: { name: "sbx-playwright", script: "node_modules/@playwright/mcp/cli.js", args: ["--browser", "msedge"] },
|
|
25790
|
+
plugsInto: "Claude Code as the MCP server sbx-playwright (the sandbox's Claude settings)",
|
|
25791
|
+
userOnly: true
|
|
25792
|
+
},
|
|
25793
|
+
{
|
|
25794
|
+
id: "context7",
|
|
25795
|
+
name: "Context7 MCP",
|
|
25796
|
+
category: "agents",
|
|
25797
|
+
about: "Up-to-date documentation and code examples for libraries, looked up by Claude Code while it works (upstash/context7). The library names and questions go to Upstash's context7.com.",
|
|
25798
|
+
size: "55 MB",
|
|
25799
|
+
source: { locked: "npm", package: "@upstash/context7-mcp", version: CONTEXT7_MCP_VERSION },
|
|
25800
|
+
exe: "context7-mcp.cmd",
|
|
25801
|
+
service: true,
|
|
25802
|
+
mcp: { name: "sbx-context7", script: "node_modules/@upstash/context7-mcp/dist/index.js" },
|
|
25803
|
+
plugsInto: "Claude Code as the MCP server sbx-context7 (the sandbox's Claude settings)",
|
|
25804
|
+
userOnly: true
|
|
25805
|
+
},
|
|
25806
|
+
{
|
|
25807
|
+
id: "claude-mem",
|
|
25808
|
+
name: "claude-mem",
|
|
25809
|
+
category: "agents",
|
|
25810
|
+
about: "Persistent memory for Claude Code (a plugin you install on this PC): its database is brought into the sandbox.",
|
|
25811
|
+
size: "",
|
|
25812
|
+
source: { resolve: "setting" },
|
|
25813
|
+
exe: "",
|
|
25814
|
+
setting: "claudeProfile.syncClaudeMem",
|
|
25815
|
+
plugsInto: "Claude Code, with your Claude settings copied from this PC",
|
|
25816
|
+
userOnly: true
|
|
25817
|
+
},
|
|
25818
|
+
{
|
|
25819
|
+
id: "rea",
|
|
25820
|
+
name: "REA (Reverse Engineer Anything)",
|
|
25821
|
+
category: "agents",
|
|
25822
|
+
about: "Agent-driven reverse engineering (MCP server and CLI, by morluto). Run `rea setup` once to add it to Claude Code and Codex. Native binaries need Ghidra; needs Node 22.19+.",
|
|
25823
|
+
size: "8 MB",
|
|
25824
|
+
source: { npm: "rea-agents" },
|
|
25825
|
+
exe: "rea.cmd",
|
|
25826
|
+
cli: true,
|
|
25827
|
+
plugsInto: "Claude Code and Codex as an MCP server, after `rea setup`"
|
|
25828
|
+
},
|
|
25731
25829
|
// ---- editors
|
|
25732
25830
|
{
|
|
25733
25831
|
id: "vscode",
|
|
@@ -26189,16 +26287,6 @@ var APPS = [
|
|
|
26189
26287
|
cli: true
|
|
26190
26288
|
},
|
|
26191
26289
|
// ---- reverse engineering
|
|
26192
|
-
{
|
|
26193
|
-
id: "rea",
|
|
26194
|
-
name: "REA (Reverse Engineer Anything)",
|
|
26195
|
-
category: "reversing",
|
|
26196
|
-
about: "Agent-driven reverse engineering (MCP server and CLI, by morluto). Run `rea setup` once to add it to Claude Code and Codex. Native binaries need Ghidra; needs Node 22.19+.",
|
|
26197
|
-
size: "8 MB",
|
|
26198
|
-
source: { npm: "rea-agents" },
|
|
26199
|
-
exe: "rea.cmd",
|
|
26200
|
-
cli: true
|
|
26201
|
-
},
|
|
26202
26290
|
{
|
|
26203
26291
|
id: "ghidra",
|
|
26204
26292
|
name: "Ghidra",
|
|
@@ -26478,6 +26566,8 @@ var APPS = [
|
|
|
26478
26566
|
// src/core/schema/apps.ts
|
|
26479
26567
|
var CATALOGUE_IDS = APPS.filter((a) => !a.setting).map((a) => a.id);
|
|
26480
26568
|
var AppIdSchema = external_exports.enum(CATALOGUE_IDS);
|
|
26569
|
+
var PROJECT_IDS = APPS.filter((a) => !a.setting && !a.userOnly).map((a) => a.id);
|
|
26570
|
+
var ProjectAppIdSchema = external_exports.enum(PROJECT_IDS);
|
|
26481
26571
|
var CustomAppIdSchema = external_exports.string().regex(/^[a-z0-9][a-z0-9-]{0,40}$/, "lower-case letters, digits and - only");
|
|
26482
26572
|
var compiles = (pattern) => {
|
|
26483
26573
|
try {
|
|
@@ -26501,6 +26591,11 @@ var CustomAppSchema = external_exports.strictObject({
|
|
|
26501
26591
|
}).refine((a) => a.github && a.asset ? !a.url : Boolean(a.url) && !a.github && !a.asset, {
|
|
26502
26592
|
message: "give github + asset, or url (not both)"
|
|
26503
26593
|
});
|
|
26594
|
+
var ProjectAppsSchema = external_exports.strictObject({
|
|
26595
|
+
install: external_exports.array(ProjectAppIdSchema).describe(
|
|
26596
|
+
"Apps from the catalogue this project adds to yours (agent add-ons such as rtk, Headroom and the MCP servers are set in your own settings only)."
|
|
26597
|
+
)
|
|
26598
|
+
});
|
|
26504
26599
|
var AppsSchema = external_exports.strictObject({
|
|
26505
26600
|
install: external_exports.array(AppIdSchema).describe(
|
|
26506
26601
|
"Apps from the catalogue to install in every sandbox (the Apps screen in the menu lists them by category). Each is downloaded once and kept."
|
|
@@ -26541,12 +26636,39 @@ var ResumeSchema = external_exports.strictObject({
|
|
|
26541
26636
|
});
|
|
26542
26637
|
|
|
26543
26638
|
// src/core/schema/web.ts
|
|
26639
|
+
var REMOTE_ROLES = ["view", "control"];
|
|
26640
|
+
var WindowsUserNameSchema = external_exports.string().trim().min(1).max(120).regex(
|
|
26641
|
+
/^(?:[A-Za-z0-9][A-Za-z0-9._ -]{0,62}\\)?[^\\/"[\]:;|=,+*?<>@]{1,64}$/,
|
|
26642
|
+
"a Windows user name (name or DOMAIN\\name)"
|
|
26643
|
+
);
|
|
26644
|
+
var RemoteUserSchema = external_exports.strictObject({
|
|
26645
|
+
name: WindowsUserNameSchema.describe("The Windows user (name, or DOMAIN\\name)"),
|
|
26646
|
+
role: external_exports.enum(REMOTE_ROLES).describe("view: sees everything, terminals read-only. control: everything but remote access, logins and tokens.")
|
|
26647
|
+
});
|
|
26648
|
+
var WebLanSchema = external_exports.strictObject({
|
|
26649
|
+
enabled: external_exports.boolean().describe(
|
|
26650
|
+
"(Beta) Devices on your network (a phone): an HTTPS address on this PC for devices you pair with a one-time code (sandbox web pair). Needs a firewall rule (sandbox web lan on asks Windows once). Off: every paired device is signed out."
|
|
26651
|
+
),
|
|
26652
|
+
port: external_exports.number().int().min(1024).max(65535).describe("HTTPS port for paired devices on your network."),
|
|
26653
|
+
address: external_exports.string().trim().max(15).regex(/^$|^\d{1,3}(\.\d{1,3}){3}$/, "an IPv4 address or empty").describe("This PC's private address to listen on. Empty: the one of its network adapter (never a public one).")
|
|
26654
|
+
});
|
|
26655
|
+
var WebRemoteSchema = external_exports.strictObject({
|
|
26656
|
+
windowsSignIn: external_exports.boolean().describe(
|
|
26657
|
+
"(Beta) Other Windows users of this PC named in web.remote.users sign in to your web UI (and sandbox remote) with their own Windows account: no password, no link."
|
|
26658
|
+
),
|
|
26659
|
+
users: external_exports.array(RemoteUserSchema).max(32).describe("Who else may sign in with Windows, and their role (view or control)."),
|
|
26660
|
+
rememberDays: external_exports.number().int().min(1).max(90).describe(
|
|
26661
|
+
"How many days a paired device or a Windows sign-in stays signed in (from when it signed in, not renewed)."
|
|
26662
|
+
),
|
|
26663
|
+
lan: WebLanSchema
|
|
26664
|
+
});
|
|
26544
26665
|
var WebSchema = external_exports.strictObject({
|
|
26545
26666
|
enabled: external_exports.boolean().describe(
|
|
26546
26667
|
"(Beta) The web UI: your sandbox sessions in a browser on this PC (http://127.0.0.1:<port>, this PC only). On: every sandbox start also starts it in the background (it keeps running until sandbox web stop or a restart of the PC). Off: only sandbox web start runs it. Open it signed in with sandbox web open."
|
|
26547
26668
|
),
|
|
26548
26669
|
port: external_exports.number().int().min(1024).max(65535).describe("Port of the web UI on 127.0.0.1 (this PC only). Pick another when it is taken."),
|
|
26549
|
-
openOnLaunch: external_exports.boolean().describe("(Beta) With the web UI on: open it in your browser, already signed in, every time a sandbox starts.")
|
|
26670
|
+
openOnLaunch: external_exports.boolean().describe("(Beta) With the web UI on: open it in your browser, already signed in, every time a sandbox starts."),
|
|
26671
|
+
remote: WebRemoteSchema.describe("(Beta) Access for other Windows users of this PC and for paired devices.")
|
|
26550
26672
|
});
|
|
26551
26673
|
|
|
26552
26674
|
// src/core/schema/vpn.ts
|
|
@@ -26576,6 +26698,36 @@ var GithubSchema = external_exports.strictObject({
|
|
|
26576
26698
|
});
|
|
26577
26699
|
|
|
26578
26700
|
// src/core/schema/config.ts
|
|
26701
|
+
var RESERVED_ENV_PREFIX = /^(AGENT_|GIT_|GH_|GITHUB_|NODE_|NPM_CONFIG_(USERCONFIG|GLOBALCONFIG|PREFIX|SCRIPT_SHELL)|SSL_|CLAUDE|ANTHROPIC_|OPENAI_|CODEX_|GEMINI_|GOOGLE_|COPILOT_|AWS_|AZURE_)/i;
|
|
26702
|
+
var RESERVED_ENV_SUFFIX = /(_PROXY|_BASE_URL|_ENDPOINT|_CA_BUNDLE|_CA_CERTS)$/i;
|
|
26703
|
+
var RESERVED_ENV_NAMES = new Set(
|
|
26704
|
+
[
|
|
26705
|
+
"PATH",
|
|
26706
|
+
"PATHEXT",
|
|
26707
|
+
"BASH_ENV",
|
|
26708
|
+
"ENV",
|
|
26709
|
+
"COMSPEC",
|
|
26710
|
+
"PSMODULEPATH",
|
|
26711
|
+
"PYTHONPATH",
|
|
26712
|
+
"PYTHONSTARTUP",
|
|
26713
|
+
"PERL5OPT",
|
|
26714
|
+
"RUBYOPT",
|
|
26715
|
+
"JAVA_TOOL_OPTIONS",
|
|
26716
|
+
"LD_PRELOAD",
|
|
26717
|
+
"SYSTEMROOT",
|
|
26718
|
+
"WINDIR",
|
|
26719
|
+
"HOME",
|
|
26720
|
+
"USERPROFILE",
|
|
26721
|
+
"APPDATA",
|
|
26722
|
+
"LOCALAPPDATA",
|
|
26723
|
+
"PROGRAMDATA",
|
|
26724
|
+
"TEMP",
|
|
26725
|
+
"TMP"
|
|
26726
|
+
].map((n) => n.toUpperCase())
|
|
26727
|
+
);
|
|
26728
|
+
function reservedEnvName(name) {
|
|
26729
|
+
return RESERVED_ENV_PREFIX.test(name) || RESERVED_ENV_SUFFIX.test(name) || RESERVED_ENV_NAMES.has(name.toUpperCase());
|
|
26730
|
+
}
|
|
26579
26731
|
var ConfigSchema = external_exports.strictObject({
|
|
26580
26732
|
$schema: SchemaRefSchema.optional(),
|
|
26581
26733
|
defaultHarness: NameSchema.describe("Agent started by `sandbox launch` (sandbox claude always runs claude)."),
|
|
@@ -26642,10 +26794,14 @@ var LocalOverridesSchema = external_exports.strictObject({
|
|
|
26642
26794
|
scripts: StringsSchema.describe(
|
|
26643
26795
|
"Scripts (.ps1 / .mjs / .cmd, relative to this file) run inside the sandbox before the agent."
|
|
26644
26796
|
),
|
|
26645
|
-
// This PC's resources are yours to share: CPU
|
|
26797
|
+
// This PC's resources are yours to share: CPU, paging file (this PC's disk) and the RAM kept for this PC are not a
|
|
26798
|
+
// project's to set.
|
|
26646
26799
|
sandbox: SandboxSchema.omit({
|
|
26647
26800
|
cpuLimit: true,
|
|
26648
26801
|
pageFileMb: true,
|
|
26802
|
+
reserveHostMb: true,
|
|
26803
|
+
maxMemoryPercent: true,
|
|
26804
|
+
maxMemoryMb: true,
|
|
26649
26805
|
engine: true,
|
|
26650
26806
|
agentMemoryHeadroomMb: true,
|
|
26651
26807
|
pressureResponse: true
|
|
@@ -26659,14 +26815,17 @@ var LocalOverridesSchema = external_exports.strictObject({
|
|
|
26659
26815
|
// Every toolchain setting, each one optional (a project usually only switches languages on or pins a version).
|
|
26660
26816
|
toolchains: external_exports.strictObject({
|
|
26661
26817
|
...import_lodash.default.mapValues(import_lodash.default.omit(ToolchainsSchema.shape, "environment"), (shape) => shape.partial()),
|
|
26662
|
-
environment: ToolchainsSchema.shape.environment
|
|
26818
|
+
environment: ToolchainsSchema.shape.environment.refine(
|
|
26819
|
+
(env) => !Object.keys(env).some(reservedEnvName),
|
|
26820
|
+
"names the sandbox sets or that carry logins (AGENT_*, GIT_*, PATH, BASH_ENV, NODE_*, proxies, ANTHROPIC_*, CLAUDE_* ...) cannot be set by a project"
|
|
26821
|
+
)
|
|
26663
26822
|
}).partial(),
|
|
26664
26823
|
databases: external_exports.strictObject(import_lodash.default.mapValues(DatabasesSchema.shape, (shape) => shape.partial())).partial(),
|
|
26665
26824
|
attach: AttachSchema.partial(),
|
|
26666
26825
|
personalization: toggle("Copy your desktop look into the sandbox.").partial(),
|
|
26667
26826
|
// Catalogue apps only (a vetted list): your own programs (apps.custom) download anything, so a repo cannot add
|
|
26668
|
-
// them.
|
|
26669
|
-
apps:
|
|
26827
|
+
// them, nor agent add-ons that are yours only (rtk hooks every agent command, Headroom sits in its API path).
|
|
26828
|
+
apps: ProjectAppsSchema.partial(),
|
|
26670
26829
|
claudeProfile: ClaudeProfileSchema.pick({
|
|
26671
26830
|
enabled: true,
|
|
26672
26831
|
overwrite: true,
|
|
@@ -26729,6 +26888,7 @@ var ProjectSpecSchema = external_exports.strictObject({
|
|
|
26729
26888
|
/** Its hooks were staged in C:\AgentLaunch\projects\<name>\hooks. */
|
|
26730
26889
|
hooks: external_exports.boolean()
|
|
26731
26890
|
});
|
|
26891
|
+
var ShellChoiceSchema = external_exports.enum(["auto", "pwsh", "powershell", "cmd"]);
|
|
26732
26892
|
var GuestRequestSchema = external_exports.discriminatedUnion("kind", [
|
|
26733
26893
|
external_exports.strictObject({
|
|
26734
26894
|
kind: external_exports.literal("session"),
|
|
@@ -26738,8 +26898,12 @@ var GuestRequestSchema = external_exports.discriminatedUnion("kind", [
|
|
|
26738
26898
|
cwd: Text(),
|
|
26739
26899
|
project: ProjectSpecSchema.optional(),
|
|
26740
26900
|
harnessSpec: HarnessSchema.optional(),
|
|
26901
|
+
/** A plain shell instead of an agent (harness is then "shell" and args are ignored). */
|
|
26902
|
+
shell: ShellChoiceSchema.optional(),
|
|
26741
26903
|
createdAt: TimeSchema
|
|
26742
26904
|
}),
|
|
26905
|
+
/** End a running session (an agent or a shell) and everything it started. */
|
|
26906
|
+
external_exports.strictObject({ kind: external_exports.literal("close"), id: IdSchema, session: IdSchema, createdAt: TimeSchema }),
|
|
26743
26907
|
/** Provision a registered project without starting an agent (sandbox start / exec / db from its folder). */
|
|
26744
26908
|
external_exports.strictObject({ kind: external_exports.literal("project"), id: IdSchema, project: ProjectSpecSchema, createdAt: TimeSchema }),
|
|
26745
26909
|
external_exports.strictObject({
|
|
@@ -26805,6 +26969,8 @@ var SessionStatusSchema = external_exports.object({
|
|
|
26805
26969
|
id: IdSchema,
|
|
26806
26970
|
launchId: Text(64),
|
|
26807
26971
|
harness: Text(64),
|
|
26972
|
+
/** A plain shell (harness is then the shell: pwsh, powershell or cmd); absent: an agent. */
|
|
26973
|
+
kind: external_exports.enum(["agent", "shell"]).optional(),
|
|
26808
26974
|
cwd: Text(),
|
|
26809
26975
|
/** The project it runs in: its hub name, or the launch folder's for the first project. */
|
|
26810
26976
|
project: Text(64).optional(),
|
package/dist/runtime/gitguard.js
CHANGED
|
@@ -62,6 +62,7 @@ var LISTING = {
|
|
|
62
62
|
};
|
|
63
63
|
var WITH_VALUE = /* @__PURE__ */ new Set(["-C", "--namespace"]);
|
|
64
64
|
var FORBIDDEN_GLOBAL = /^(-c|--config-env|--exec-path|--git-dir|--work-tree|--super-prefix)(=|$)/;
|
|
65
|
+
var RUNS_OR_WRITES = /^(--open-files-in-pager|--upload-pack|--output|--ext-diff)(=|$)/;
|
|
65
66
|
function gitDecision(args, access) {
|
|
66
67
|
if (access === "full") return { allow: true };
|
|
67
68
|
if (access !== "readonly")
|
|
@@ -76,6 +77,11 @@ function gitDecision(args, access) {
|
|
|
76
77
|
i += WITH_VALUE.has(args[i]) ? 2 : 1;
|
|
77
78
|
}
|
|
78
79
|
const [command, ...rest] = args.slice(i);
|
|
80
|
+
const runsOrWrites = rest.find(
|
|
81
|
+
(a) => RUNS_OR_WRITES.test(a) || command === "ls-remote" && /^-u(.|$)/.test(a) || command === "grep" && /^-O/.test(a)
|
|
82
|
+
);
|
|
83
|
+
if (runsOrWrites)
|
|
84
|
+
return { allow: false, reason: "git " + runsOrWrites + " is not allowed: git is read-only in this sandbox." };
|
|
79
85
|
if (command === void 0 || command === "--version" || READ_ONLY.has(command) || (LISTING[command]?.(rest) ?? false))
|
|
80
86
|
return { allow: true };
|
|
81
87
|
return {
|