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.
Files changed (246) hide show
  1. package/README.md +13 -6
  2. package/config.example.json +15 -4
  3. package/dist/app/features/access/access.def.d.ts +190 -0
  4. package/dist/app/features/access/access.def.js +273 -0
  5. package/dist/app/features/access/access.run.d.ts +79 -0
  6. package/dist/app/features/access/access.run.js +129 -0
  7. package/dist/app/features/access/index.d.ts +2 -0
  8. package/dist/app/features/access/index.js +3 -0
  9. package/dist/app/features/agents/agent-entry.js +5 -0
  10. package/dist/app/features/agents/agents.def.js +1 -0
  11. package/dist/app/features/apps/apps-rows.d.ts +4 -1
  12. package/dist/app/features/apps/apps-rows.js +7 -2
  13. package/dist/app/features/apps/apps.def.d.ts +19 -0
  14. package/dist/app/features/apps/apps.def.js +50 -12
  15. package/dist/app/features/apps/apps.run.d.ts +2 -0
  16. package/dist/app/features/apps/apps.run.js +1 -1
  17. package/dist/app/features/audit/audit.def.d.ts +350 -0
  18. package/dist/app/features/audit/audit.def.js +457 -0
  19. package/dist/app/features/audit/audit.run.d.ts +110 -0
  20. package/dist/app/features/audit/audit.run.js +133 -0
  21. package/dist/app/features/audit/index.d.ts +2 -0
  22. package/dist/app/features/audit/index.js +3 -0
  23. package/dist/app/features/defs.d.ts +349 -4
  24. package/dist/app/features/defs.js +16 -1
  25. package/dist/app/features/files/files.def.js +1 -0
  26. package/dist/app/features/health/health.def.js +1 -0
  27. package/dist/app/features/sandbox/sandbox.def.js +3 -0
  28. package/dist/app/features/sessions/sessions.def.d.ts +36 -0
  29. package/dist/app/features/sessions/sessions.def.js +77 -9
  30. package/dist/app/features/sessions/sessions.run.d.ts +25 -2
  31. package/dist/app/features/sessions/sessions.run.js +71 -3
  32. package/dist/app/features/settings/settings.def.d.ts +8 -0
  33. package/dist/app/features/settings/settings.def.js +17 -0
  34. package/dist/app/features/settings/settings.run.d.ts +3 -0
  35. package/dist/app/features/settings/settings.run.js +16 -2
  36. package/dist/app/features/web/web.def.d.ts +9 -0
  37. package/dist/app/features/web/web.def.js +26 -1
  38. package/dist/app/features/web/web.run.d.ts +3 -0
  39. package/dist/app/features/web/web.run.js +11 -3
  40. package/dist/app/kernel/access.d.ts +33 -0
  41. package/dist/app/kernel/access.js +44 -0
  42. package/dist/app/kernel/define.d.ts +26 -2
  43. package/dist/app/kernel/index.d.ts +1 -0
  44. package/dist/app/kernel/index.js +1 -0
  45. package/dist/app/kernel/rpc.d.ts +5 -2
  46. package/dist/app/registry.d.ts +4 -1
  47. package/dist/app/registry.js +26 -4
  48. package/dist/cli/args.d.ts +0 -3
  49. package/dist/cli/args.js +3 -4
  50. package/dist/cli/commands/index.d.ts +1 -1
  51. package/dist/cli/commands/index.js +1 -1
  52. package/dist/cli/commands/launch/prepare.js +1 -1
  53. package/dist/cli/commands/maintenance/index.d.ts +0 -1
  54. package/dist/cli/commands/maintenance/index.js +0 -1
  55. package/dist/cli/commands/registry.js +3 -2
  56. package/dist/cli/commands/remote.d.ts +2 -0
  57. package/dist/cli/commands/remote.js +49 -0
  58. package/dist/cli/commands/sessions/reopen.js +3 -0
  59. package/dist/cli/commands/web.js +66 -0
  60. package/dist/cli/manifest.d.ts +63 -45
  61. package/dist/cli/manifest.js +33 -18
  62. package/dist/cli/menu/io-menu.d.ts +5 -3
  63. package/dist/cli/menu/io-menu.js +12 -5
  64. package/dist/cli/menu/pages/apps-page.js +2 -15
  65. package/dist/cli/menu/pages/maintenance-page.d.ts +4 -0
  66. package/dist/cli/menu/pages/maintenance-page.js +51 -8
  67. package/dist/cli/menu/remote-menu.d.ts +19 -0
  68. package/dist/cli/menu/remote-menu.js +108 -0
  69. package/dist/cli/menu/views.js +4 -0
  70. package/dist/cli/operations/handler.js +15 -1
  71. package/dist/cli/services/remote-client.d.ts +16 -0
  72. package/dist/cli/services/remote-client.js +141 -0
  73. package/dist/cli/services/sessions-service.d.ts +5 -0
  74. package/dist/cli/services/sessions-service.js +17 -1
  75. package/dist/core/config/defaults.js +12 -2
  76. package/dist/core/local-config/file.js +16 -2
  77. package/dist/core/local-config/overrides.js +7 -0
  78. package/dist/core/run/versions.js +9 -8
  79. package/dist/core/schema/apps.d.ts +9 -0
  80. package/dist/core/schema/apps.js +9 -0
  81. package/dist/core/schema/config.d.ts +23 -3
  82. package/dist/core/schema/config.js +42 -5
  83. package/dist/core/schema/sandbox.d.ts +1 -0
  84. package/dist/core/schema/sandbox.js +11 -3
  85. package/dist/core/schema/web.d.ts +51 -0
  86. package/dist/core/schema/web.js +46 -1
  87. package/dist/core/util/fs.d.ts +5 -0
  88. package/dist/core/util/fs.js +23 -0
  89. package/dist/core/util/index.d.ts +1 -1
  90. package/dist/core/util/index.js +1 -1
  91. package/dist/guest/apps/app-installer.js +50 -4
  92. package/dist/guest/apps/index.d.ts +1 -1
  93. package/dist/guest/apps/index.js +1 -1
  94. package/dist/guest/apps/sources.js +1 -1
  95. package/dist/guest/audit/parse.d.ts +32 -2
  96. package/dist/guest/audit/parse.js +43 -5
  97. package/dist/guest/audit/process-audit.d.ts +3 -1
  98. package/dist/guest/audit/process-audit.js +9 -6
  99. package/dist/guest/boot/boot.js +12 -3
  100. package/dist/guest/boot/guide.d.ts +1 -1
  101. package/dist/guest/boot/guide.js +27 -3
  102. package/dist/guest/daemon/daemon.js +2 -0
  103. package/dist/guest/daemon/idle-shutdown.js +2 -1
  104. package/dist/guest/daemon/sessions.d.ts +23 -2
  105. package/dist/guest/daemon/sessions.js +151 -20
  106. package/dist/guest/entries/daemon.js +2 -1
  107. package/dist/guest/git/decision.js +7 -0
  108. package/dist/guest/sessions/cmdline.d.ts +14 -0
  109. package/dist/guest/sessions/cmdline.js +10 -0
  110. package/dist/guest/setup/addon-mcp.d.ts +2 -0
  111. package/dist/guest/setup/addon-mcp.js +49 -0
  112. package/dist/guest/setup/agent-addons.d.ts +9 -0
  113. package/dist/guest/setup/agent-addons.js +22 -0
  114. package/dist/guest/setup/headroom.d.ts +7 -0
  115. package/dist/guest/setup/headroom.js +60 -0
  116. package/dist/guest/setup/managed-policy.d.ts +2 -1
  117. package/dist/guest/setup/managed-policy.js +15 -6
  118. package/dist/guest/toolchains/plan.js +8 -3
  119. package/dist/guest/toolchains/setup.js +3 -0
  120. package/dist/host/audit/attribute.d.ts +46 -0
  121. package/dist/host/audit/attribute.js +76 -0
  122. package/dist/host/audit/collect.d.ts +29 -3
  123. package/dist/host/audit/collect.js +256 -61
  124. package/dist/host/audit/git-commits.d.ts +29 -0
  125. package/dist/host/audit/git-commits.js +157 -0
  126. package/dist/host/audit/index.d.ts +5 -0
  127. package/dist/host/audit/index.js +6 -0
  128. package/dist/host/audit/log.d.ts +45 -7
  129. package/dist/host/audit/log.js +148 -45
  130. package/dist/host/audit/redact.d.ts +2 -0
  131. package/dist/host/audit/redact.js +67 -0
  132. package/dist/host/channel/channel.d.ts +5 -1
  133. package/dist/host/channel/channel.js +12 -0
  134. package/dist/host/guard/agent-files.js +7 -1
  135. package/dist/host/guard/commands.js +13 -1
  136. package/dist/host/guard/git-config.js +27 -7
  137. package/dist/host/guard/git-dirs.js +78 -3
  138. package/dist/host/guard/mark-of-the-web.js +3 -1
  139. package/dist/host/guard/nested-repos.js +7 -2
  140. package/dist/host/guard/store.js +1 -0
  141. package/dist/host/guard/types.d.ts +2 -0
  142. package/dist/host/launch/mappings.js +11 -1
  143. package/dist/host/launch/project-scan.js +2 -21
  144. package/dist/host/launch/stage.js +4 -0
  145. package/dist/host/life/session-ledger.js +2 -1
  146. package/dist/host/remote/access-store.d.ts +156 -0
  147. package/dist/host/remote/access-store.js +308 -0
  148. package/dist/host/remote/cert.d.ts +20 -0
  149. package/dist/host/remote/cert.js +103 -0
  150. package/dist/host/remote/door-client.d.ts +13 -0
  151. package/dist/host/remote/door-client.js +54 -0
  152. package/dist/host/remote/firewall.d.ts +44 -0
  153. package/dist/host/remote/firewall.js +118 -0
  154. package/dist/host/remote/gate.d.ts +125 -0
  155. package/dist/host/remote/gate.js +391 -0
  156. package/dist/host/remote/index.d.ts +8 -0
  157. package/dist/host/remote/index.js +10 -0
  158. package/dist/host/remote/lan.d.ts +24 -0
  159. package/dist/host/remote/lan.js +88 -0
  160. package/dist/host/remote/tls-store.d.ts +22 -0
  161. package/dist/host/remote/tls-store.js +63 -0
  162. package/dist/host/remote/windows-helper.d.ts +67 -0
  163. package/dist/host/remote/windows-helper.js +129 -0
  164. package/dist/host/web/bridge.d.ts +5 -1
  165. package/dist/host/web/bridge.js +6 -2
  166. package/dist/host/web/browser.js +1 -1
  167. package/dist/host/web/control.d.ts +4 -1
  168. package/dist/host/web/control.js +28 -4
  169. package/dist/host/web/rpc.d.ts +16 -2
  170. package/dist/host/web/rpc.js +37 -4
  171. package/dist/host/web/runner.d.ts +4 -0
  172. package/dist/host/web/runner.js +12 -0
  173. package/dist/host/web/server.d.ts +18 -2
  174. package/dist/host/web/server.js +97 -24
  175. package/dist/host/web/state.d.ts +5 -0
  176. package/dist/host/web/state.js +8 -0
  177. package/dist/runtime/agent.js +184 -18
  178. package/dist/runtime/daemon.js +772 -338
  179. package/dist/runtime/db.js +184 -18
  180. package/dist/runtime/gitguard.js +6 -0
  181. package/dist/runtime/main.js +966 -553
  182. package/dist/runtime/netproxy.js +184 -18
  183. package/dist/runtime/view.js +186 -18
  184. package/dist/selftest/app.test.js +66 -7
  185. package/dist/selftest/audit.test.js +354 -47
  186. package/dist/selftest/channel.test.js +16 -0
  187. package/dist/selftest/cmdline.test.js +16 -0
  188. package/dist/selftest/git-access.test.js +8 -0
  189. package/dist/selftest/hcs.test.js +35 -0
  190. package/dist/selftest/hostile-input.test.js +12 -1
  191. package/dist/selftest/index.js +2 -0
  192. package/dist/selftest/live-daemon.test.js +25 -0
  193. package/dist/selftest/local-config.test.js +30 -0
  194. package/dist/selftest/menu-screens.js +1 -1
  195. package/dist/selftest/menu.test.js +3 -3
  196. package/dist/selftest/remote.test.d.ts +2 -0
  197. package/dist/selftest/remote.test.js +536 -0
  198. package/dist/selftest/repo-guard.test.js +56 -2
  199. package/dist/selftest/resume.test.js +2 -1
  200. package/dist/selftest/sharing.test.js +9 -2
  201. package/dist/selftest/support/engine-golden.js +9 -0
  202. package/dist/selftest/support/fixtures.d.ts +14 -0
  203. package/dist/selftest/support/web-preview.js +157 -0
  204. package/dist/selftest/toolchains.test.js +147 -2
  205. package/dist/selftest/web.test.js +2 -0
  206. package/dist/shared/apps/agent-addons.d.ts +64 -0
  207. package/dist/shared/apps/agent-addons.js +95 -0
  208. package/dist/shared/apps/catalogue.d.ts +33 -2
  209. package/dist/shared/apps/catalogue.js +102 -11
  210. package/dist/shared/apps/index.d.ts +3 -2
  211. package/dist/shared/apps/index.js +3 -2
  212. package/dist/shared/apps/selection.d.ts +2 -0
  213. package/dist/shared/apps/selection.js +7 -0
  214. package/dist/shared/channel/schema.d.ts +23 -0
  215. package/dist/shared/channel/schema.js +8 -0
  216. package/dist/shared/pty/protocol.d.ts +2 -0
  217. package/dist/shared/pty/protocol.js +2 -0
  218. package/dist/sync/watcher.js +9 -1
  219. package/dist/web/index.html +2 -2
  220. package/dist/web/{main-RQFN4WBY.css → main-UAQPI5XD.css} +1 -1
  221. package/dist/web/main-Z2WYAE2Z.js +221 -0
  222. package/native/csharp/HcsHost/AssemblyInfo.cs +5 -3
  223. package/native/csharp/HcsHost/Hcs.cs +9 -0
  224. package/native/csharp/HcsHost/Program.cs +26 -1
  225. package/native/csharp/HcsHost/Share.cs +173 -0
  226. package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
  227. package/native/csharp/HostTools/Program.cs +17 -1
  228. package/native/csharp/HostTools/WebHelper.cs +499 -0
  229. package/native/scripts/get-network-profile.ps1 +19 -0
  230. package/native/scripts/set-folder-access.ps1 +11 -0
  231. package/native/scripts/set-web-firewall.ps1 +103 -0
  232. package/package.json +1 -1
  233. package/sandbox/addons/ccusage/package-lock.json +111 -0
  234. package/sandbox/addons/ccusage/package.json +7 -0
  235. package/sandbox/addons/context7/package-lock.json +1313 -0
  236. package/sandbox/addons/context7/package.json +7 -0
  237. package/sandbox/addons/headroom/requirements.in +1 -0
  238. package/sandbox/addons/headroom/requirements.txt +2922 -0
  239. package/sandbox/addons/playwright-mcp/package-lock.json +56 -0
  240. package/sandbox/addons/playwright-mcp/package.json +7 -0
  241. package/sandbox/csharp/PtyHost.cs +20 -0
  242. package/schemas/config.schema.json +78 -4
  243. package/schemas/sandbox-config.schema.json +2 -20
  244. package/dist/cli/commands/maintenance/audit.d.ts +0 -3
  245. package/dist/cli/commands/maintenance/audit.js +0 -58
  246. package/dist/web/main-K2JMCAZI.js +0 -219
@@ -25570,14 +25570,19 @@ var NetworkSchema = external_exports.strictObject({
25570
25570
  });
25571
25571
  var AuditSchema = external_exports.strictObject({
25572
25572
  enabled: external_exports.boolean().describe(
25573
- "Keep an audit log on this PC of what happened in your sandboxes: programs started (with their command lines), files changed in the project, sessions, and what the repo guard caught. The sandbox cannot change it. Read it with sandbox audit."
25573
+ "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."
25574
+ ),
25575
+ days: external_exports.number().int().min(1).max(365).describe(
25576
+ "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."
25574
25577
  ),
25575
- days: external_exports.number().int().min(1).max(365).describe("Days the audit log is kept."),
25576
25578
  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."),
25577
25579
  processes: external_exports.boolean().describe(
25578
25580
  "Record every program started in the sandbox with its command line (Windows process auditing; repeated runs are counted, not listed)."
25579
25581
  ),
25580
- files: external_exports.boolean().describe("Record the files changed in the project while the sandbox runs.")
25582
+ files: external_exports.boolean().describe("Record the files changed in the projects while the sandbox runs."),
25583
+ commits: external_exports.boolean().describe(
25584
+ "Record the git commits made in the projects while the sandbox runs (read from each project's .git folder on this PC)."
25585
+ )
25581
25586
  });
25582
25587
  var WorkspaceFilterSchema = external_exports.strictObject({
25583
25588
  enabled: external_exports.boolean().describe(
@@ -25780,7 +25785,100 @@ var ToolchainsSchema = external_exports.strictObject({
25780
25785
 
25781
25786
  // src/shared/apps/catalogue.ts
25782
25787
  var gh = (github, asset) => ({ github, asset });
25788
+ var RTK_VERSION = "1.0.1";
25789
+ var RTK_URL = "https://github.com/rtk-ai/rtk/releases/download/v" + RTK_VERSION + "/rtk-oss-x86_64-pc-windows-msvc.zip";
25790
+ var RTK_SHA256 = "0e53e2eca471e15fbd3636e64e6bc0b182cbc278ed0339c80450a2dd03f4cd6b";
25791
+ var HEADROOM_VERSION = "0.41.0";
25792
+ var CCUSAGE_VERSION = "20.0.36";
25793
+ var PLAYWRIGHT_MCP_VERSION = "0.0.83";
25794
+ var CONTEXT7_MCP_VERSION = "4.4.2";
25783
25795
  var APPS = [
25796
+ // ---- agent add-ons
25797
+ {
25798
+ id: "rtk",
25799
+ name: "rtk (Rust Token Killer)",
25800
+ category: "agents",
25801
+ 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.",
25802
+ size: "6 MB",
25803
+ source: { url: RTK_URL, sha256: RTK_SHA256 },
25804
+ exe: "rtk.exe",
25805
+ cli: true,
25806
+ plugsInto: "Claude Code through a hook in the sandbox's managed settings; other agents are told to use it",
25807
+ userOnly: true
25808
+ },
25809
+ {
25810
+ id: "headroom",
25811
+ name: "Headroom",
25812
+ category: "agents",
25813
+ 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.",
25814
+ size: "150 MB",
25815
+ source: { locked: "uv", package: "headroom-ai", version: HEADROOM_VERSION },
25816
+ exe: "headroom.exe",
25817
+ service: true,
25818
+ plugsInto: "Claude Code: the sandbox starts the proxy and points Claude Code at it (managed settings)",
25819
+ userOnly: true
25820
+ },
25821
+ {
25822
+ id: "ccusage",
25823
+ name: "ccusage",
25824
+ category: "agents",
25825
+ 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).",
25826
+ size: "5 MB",
25827
+ source: { locked: "npm", package: "ccusage", version: CCUSAGE_VERSION },
25828
+ exe: "ccusage.cmd",
25829
+ cli: true,
25830
+ plugsInto: "Reads Claude Code's session logs in the sandbox; changes nothing",
25831
+ userOnly: true
25832
+ },
25833
+ {
25834
+ id: "playwright-mcp",
25835
+ name: "Playwright MCP",
25836
+ category: "agents",
25837
+ 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.",
25838
+ size: "20 MB",
25839
+ source: { locked: "npm", package: "@playwright/mcp", version: PLAYWRIGHT_MCP_VERSION },
25840
+ exe: "playwright-mcp.cmd",
25841
+ service: true,
25842
+ mcp: { name: "sbx-playwright", script: "node_modules/@playwright/mcp/cli.js", args: ["--browser", "msedge"] },
25843
+ plugsInto: "Claude Code as the MCP server sbx-playwright (the sandbox's Claude settings)",
25844
+ userOnly: true
25845
+ },
25846
+ {
25847
+ id: "context7",
25848
+ name: "Context7 MCP",
25849
+ category: "agents",
25850
+ 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.",
25851
+ size: "55 MB",
25852
+ source: { locked: "npm", package: "@upstash/context7-mcp", version: CONTEXT7_MCP_VERSION },
25853
+ exe: "context7-mcp.cmd",
25854
+ service: true,
25855
+ mcp: { name: "sbx-context7", script: "node_modules/@upstash/context7-mcp/dist/index.js" },
25856
+ plugsInto: "Claude Code as the MCP server sbx-context7 (the sandbox's Claude settings)",
25857
+ userOnly: true
25858
+ },
25859
+ {
25860
+ id: "claude-mem",
25861
+ name: "claude-mem",
25862
+ category: "agents",
25863
+ about: "Persistent memory for Claude Code (a plugin you install on this PC): its database is brought into the sandbox.",
25864
+ size: "",
25865
+ source: { resolve: "setting" },
25866
+ exe: "",
25867
+ setting: "claudeProfile.syncClaudeMem",
25868
+ plugsInto: "Claude Code, with your Claude settings copied from this PC",
25869
+ userOnly: true
25870
+ },
25871
+ {
25872
+ id: "rea",
25873
+ name: "REA (Reverse Engineer Anything)",
25874
+ category: "agents",
25875
+ 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+.",
25876
+ size: "8 MB",
25877
+ source: { npm: "rea-agents" },
25878
+ exe: "rea.cmd",
25879
+ cli: true,
25880
+ plugsInto: "Claude Code and Codex as an MCP server, after `rea setup`"
25881
+ },
25784
25882
  // ---- editors
25785
25883
  {
25786
25884
  id: "vscode",
@@ -26242,16 +26340,6 @@ var APPS = [
26242
26340
  cli: true
26243
26341
  },
26244
26342
  // ---- reverse engineering
26245
- {
26246
- id: "rea",
26247
- name: "REA (Reverse Engineer Anything)",
26248
- category: "reversing",
26249
- 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+.",
26250
- size: "8 MB",
26251
- source: { npm: "rea-agents" },
26252
- exe: "rea.cmd",
26253
- cli: true
26254
- },
26255
26343
  {
26256
26344
  id: "ghidra",
26257
26345
  name: "Ghidra",
@@ -26531,6 +26619,8 @@ var APPS = [
26531
26619
  // src/core/schema/apps.ts
26532
26620
  var CATALOGUE_IDS = APPS.filter((a) => !a.setting).map((a) => a.id);
26533
26621
  var AppIdSchema = external_exports.enum(CATALOGUE_IDS);
26622
+ var PROJECT_IDS = APPS.filter((a) => !a.setting && !a.userOnly).map((a) => a.id);
26623
+ var ProjectAppIdSchema = external_exports.enum(PROJECT_IDS);
26534
26624
  var CustomAppIdSchema = external_exports.string().regex(/^[a-z0-9][a-z0-9-]{0,40}$/, "lower-case letters, digits and - only");
26535
26625
  var compiles = (pattern) => {
26536
26626
  try {
@@ -26554,6 +26644,11 @@ var CustomAppSchema = external_exports.strictObject({
26554
26644
  }).refine((a) => a.github && a.asset ? !a.url : Boolean(a.url) && !a.github && !a.asset, {
26555
26645
  message: "give github + asset, or url (not both)"
26556
26646
  });
26647
+ var ProjectAppsSchema = external_exports.strictObject({
26648
+ install: external_exports.array(ProjectAppIdSchema).describe(
26649
+ "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)."
26650
+ )
26651
+ });
26557
26652
  var AppsSchema = external_exports.strictObject({
26558
26653
  install: external_exports.array(AppIdSchema).describe(
26559
26654
  "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."
@@ -26594,12 +26689,39 @@ var ResumeSchema = external_exports.strictObject({
26594
26689
  });
26595
26690
 
26596
26691
  // src/core/schema/web.ts
26692
+ var REMOTE_ROLES = ["view", "control"];
26693
+ var WindowsUserNameSchema = external_exports.string().trim().min(1).max(120).regex(
26694
+ /^(?:[A-Za-z0-9][A-Za-z0-9._ -]{0,62}\\)?[^\\/"[\]:;|=,+*?<>@]{1,64}$/,
26695
+ "a Windows user name (name or DOMAIN\\name)"
26696
+ );
26697
+ var RemoteUserSchema = external_exports.strictObject({
26698
+ name: WindowsUserNameSchema.describe("The Windows user (name, or DOMAIN\\name)"),
26699
+ role: external_exports.enum(REMOTE_ROLES).describe("view: sees everything, terminals read-only. control: everything but remote access, logins and tokens.")
26700
+ });
26701
+ var WebLanSchema = external_exports.strictObject({
26702
+ enabled: external_exports.boolean().describe(
26703
+ "(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."
26704
+ ),
26705
+ port: external_exports.number().int().min(1024).max(65535).describe("HTTPS port for paired devices on your network."),
26706
+ 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).")
26707
+ });
26708
+ var WebRemoteSchema = external_exports.strictObject({
26709
+ windowsSignIn: external_exports.boolean().describe(
26710
+ "(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."
26711
+ ),
26712
+ users: external_exports.array(RemoteUserSchema).max(32).describe("Who else may sign in with Windows, and their role (view or control)."),
26713
+ rememberDays: external_exports.number().int().min(1).max(90).describe(
26714
+ "How many days a paired device or a Windows sign-in stays signed in (from when it signed in, not renewed)."
26715
+ ),
26716
+ lan: WebLanSchema
26717
+ });
26597
26718
  var WebSchema = external_exports.strictObject({
26598
26719
  enabled: external_exports.boolean().describe(
26599
26720
  "(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."
26600
26721
  ),
26601
26722
  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."),
26602
- openOnLaunch: external_exports.boolean().describe("(Beta) With the web UI on: open it in your browser, already signed in, every time a sandbox starts.")
26723
+ openOnLaunch: external_exports.boolean().describe("(Beta) With the web UI on: open it in your browser, already signed in, every time a sandbox starts."),
26724
+ remote: WebRemoteSchema.describe("(Beta) Access for other Windows users of this PC and for paired devices.")
26603
26725
  });
26604
26726
 
26605
26727
  // src/core/schema/vpn.ts
@@ -26629,6 +26751,36 @@ var GithubSchema = external_exports.strictObject({
26629
26751
  });
26630
26752
 
26631
26753
  // src/core/schema/config.ts
26754
+ 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;
26755
+ var RESERVED_ENV_SUFFIX = /(_PROXY|_BASE_URL|_ENDPOINT|_CA_BUNDLE|_CA_CERTS)$/i;
26756
+ var RESERVED_ENV_NAMES = new Set(
26757
+ [
26758
+ "PATH",
26759
+ "PATHEXT",
26760
+ "BASH_ENV",
26761
+ "ENV",
26762
+ "COMSPEC",
26763
+ "PSMODULEPATH",
26764
+ "PYTHONPATH",
26765
+ "PYTHONSTARTUP",
26766
+ "PERL5OPT",
26767
+ "RUBYOPT",
26768
+ "JAVA_TOOL_OPTIONS",
26769
+ "LD_PRELOAD",
26770
+ "SYSTEMROOT",
26771
+ "WINDIR",
26772
+ "HOME",
26773
+ "USERPROFILE",
26774
+ "APPDATA",
26775
+ "LOCALAPPDATA",
26776
+ "PROGRAMDATA",
26777
+ "TEMP",
26778
+ "TMP"
26779
+ ].map((n) => n.toUpperCase())
26780
+ );
26781
+ function reservedEnvName(name) {
26782
+ return RESERVED_ENV_PREFIX.test(name) || RESERVED_ENV_SUFFIX.test(name) || RESERVED_ENV_NAMES.has(name.toUpperCase());
26783
+ }
26632
26784
  var ConfigSchema = external_exports.strictObject({
26633
26785
  $schema: SchemaRefSchema.optional(),
26634
26786
  defaultHarness: NameSchema.describe("Agent started by `sandbox launch` (sandbox claude always runs claude)."),
@@ -26695,10 +26847,14 @@ var LocalOverridesSchema = external_exports.strictObject({
26695
26847
  scripts: StringsSchema.describe(
26696
26848
  "Scripts (.ps1 / .mjs / .cmd, relative to this file) run inside the sandbox before the agent."
26697
26849
  ),
26698
- // This PC's resources are yours to share: CPU and paging file (this PC's disk) are not a project's to set.
26850
+ // 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
26851
+ // project's to set.
26699
26852
  sandbox: SandboxSchema.omit({
26700
26853
  cpuLimit: true,
26701
26854
  pageFileMb: true,
26855
+ reserveHostMb: true,
26856
+ maxMemoryPercent: true,
26857
+ maxMemoryMb: true,
26702
26858
  engine: true,
26703
26859
  agentMemoryHeadroomMb: true,
26704
26860
  pressureResponse: true
@@ -26712,14 +26868,17 @@ var LocalOverridesSchema = external_exports.strictObject({
26712
26868
  // Every toolchain setting, each one optional (a project usually only switches languages on or pins a version).
26713
26869
  toolchains: external_exports.strictObject({
26714
26870
  ...import_lodash.default.mapValues(import_lodash.default.omit(ToolchainsSchema.shape, "environment"), (shape) => shape.partial()),
26715
- environment: ToolchainsSchema.shape.environment
26871
+ environment: ToolchainsSchema.shape.environment.refine(
26872
+ (env) => !Object.keys(env).some(reservedEnvName),
26873
+ "names the sandbox sets or that carry logins (AGENT_*, GIT_*, PATH, BASH_ENV, NODE_*, proxies, ANTHROPIC_*, CLAUDE_* ...) cannot be set by a project"
26874
+ )
26716
26875
  }).partial(),
26717
26876
  databases: external_exports.strictObject(import_lodash.default.mapValues(DatabasesSchema.shape, (shape) => shape.partial())).partial(),
26718
26877
  attach: AttachSchema.partial(),
26719
26878
  personalization: toggle("Copy your desktop look into the sandbox.").partial(),
26720
26879
  // Catalogue apps only (a vetted list): your own programs (apps.custom) download anything, so a repo cannot add
26721
- // them.
26722
- apps: AppsSchema.pick({ install: true }).partial(),
26880
+ // them, nor agent add-ons that are yours only (rtk hooks every agent command, Headroom sits in its API path).
26881
+ apps: ProjectAppsSchema.partial(),
26723
26882
  claudeProfile: ClaudeProfileSchema.pick({
26724
26883
  enabled: true,
26725
26884
  overwrite: true,
@@ -26782,6 +26941,7 @@ var ProjectSpecSchema = external_exports.strictObject({
26782
26941
  /** Its hooks were staged in C:\AgentLaunch\projects\<name>\hooks. */
26783
26942
  hooks: external_exports.boolean()
26784
26943
  });
26944
+ var ShellChoiceSchema = external_exports.enum(["auto", "pwsh", "powershell", "cmd"]);
26785
26945
  var GuestRequestSchema = external_exports.discriminatedUnion("kind", [
26786
26946
  external_exports.strictObject({
26787
26947
  kind: external_exports.literal("session"),
@@ -26791,8 +26951,12 @@ var GuestRequestSchema = external_exports.discriminatedUnion("kind", [
26791
26951
  cwd: Text(),
26792
26952
  project: ProjectSpecSchema.optional(),
26793
26953
  harnessSpec: HarnessSchema.optional(),
26954
+ /** A plain shell instead of an agent (harness is then "shell" and args are ignored). */
26955
+ shell: ShellChoiceSchema.optional(),
26794
26956
  createdAt: TimeSchema
26795
26957
  }),
26958
+ /** End a running session (an agent or a shell) and everything it started. */
26959
+ external_exports.strictObject({ kind: external_exports.literal("close"), id: IdSchema, session: IdSchema, createdAt: TimeSchema }),
26796
26960
  /** Provision a registered project without starting an agent (sandbox start / exec / db from its folder). */
26797
26961
  external_exports.strictObject({ kind: external_exports.literal("project"), id: IdSchema, project: ProjectSpecSchema, createdAt: TimeSchema }),
26798
26962
  external_exports.strictObject({
@@ -26858,6 +27022,8 @@ var SessionStatusSchema = external_exports.object({
26858
27022
  id: IdSchema,
26859
27023
  launchId: Text(64),
26860
27024
  harness: Text(64),
27025
+ /** A plain shell (harness is then the shell: pwsh, powershell or cmd); absent: an agent. */
27026
+ kind: external_exports.enum(["agent", "shell"]).optional(),
26861
27027
  cwd: Text(),
26862
27028
  /** The project it runs in: its hub name, or the launch folder's for the first project. */
26863
27029
  project: Text(64).optional(),
@@ -5538,6 +5538,8 @@ var FrameType = {
5538
5538
  Resize: 3,
5539
5539
  Restart: 4,
5540
5540
  Ping: 5,
5541
+ /** Ends the program and everything it started, and with it the session. */
5542
+ Close: 6,
5541
5543
  Output: 16,
5542
5544
  Exit: 17,
5543
5545
  Error: 18,
@@ -25969,14 +25971,19 @@ var NetworkSchema = external_exports.strictObject({
25969
25971
  });
25970
25972
  var AuditSchema = external_exports.strictObject({
25971
25973
  enabled: external_exports.boolean().describe(
25972
- "Keep an audit log on this PC of what happened in your sandboxes: programs started (with their command lines), files changed in the project, sessions, and what the repo guard caught. The sandbox cannot change it. Read it with sandbox audit."
25974
+ "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."
25975
+ ),
25976
+ days: external_exports.number().int().min(1).max(365).describe(
25977
+ "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."
25973
25978
  ),
25974
- days: external_exports.number().int().min(1).max(365).describe("Days the audit log is kept."),
25975
25979
  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."),
25976
25980
  processes: external_exports.boolean().describe(
25977
25981
  "Record every program started in the sandbox with its command line (Windows process auditing; repeated runs are counted, not listed)."
25978
25982
  ),
25979
- files: external_exports.boolean().describe("Record the files changed in the project while the sandbox runs.")
25983
+ files: external_exports.boolean().describe("Record the files changed in the projects while the sandbox runs."),
25984
+ commits: external_exports.boolean().describe(
25985
+ "Record the git commits made in the projects while the sandbox runs (read from each project's .git folder on this PC)."
25986
+ )
25980
25987
  });
25981
25988
  var WorkspaceFilterSchema = external_exports.strictObject({
25982
25989
  enabled: external_exports.boolean().describe(
@@ -26179,7 +26186,100 @@ var ToolchainsSchema = external_exports.strictObject({
26179
26186
 
26180
26187
  // src/shared/apps/catalogue.ts
26181
26188
  var gh = (github, asset) => ({ github, asset });
26189
+ var RTK_VERSION = "1.0.1";
26190
+ var RTK_URL = "https://github.com/rtk-ai/rtk/releases/download/v" + RTK_VERSION + "/rtk-oss-x86_64-pc-windows-msvc.zip";
26191
+ var RTK_SHA256 = "0e53e2eca471e15fbd3636e64e6bc0b182cbc278ed0339c80450a2dd03f4cd6b";
26192
+ var HEADROOM_VERSION = "0.41.0";
26193
+ var CCUSAGE_VERSION = "20.0.36";
26194
+ var PLAYWRIGHT_MCP_VERSION = "0.0.83";
26195
+ var CONTEXT7_MCP_VERSION = "4.4.2";
26182
26196
  var APPS = [
26197
+ // ---- agent add-ons
26198
+ {
26199
+ id: "rtk",
26200
+ name: "rtk (Rust Token Killer)",
26201
+ category: "agents",
26202
+ 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.",
26203
+ size: "6 MB",
26204
+ source: { url: RTK_URL, sha256: RTK_SHA256 },
26205
+ exe: "rtk.exe",
26206
+ cli: true,
26207
+ plugsInto: "Claude Code through a hook in the sandbox's managed settings; other agents are told to use it",
26208
+ userOnly: true
26209
+ },
26210
+ {
26211
+ id: "headroom",
26212
+ name: "Headroom",
26213
+ category: "agents",
26214
+ 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.",
26215
+ size: "150 MB",
26216
+ source: { locked: "uv", package: "headroom-ai", version: HEADROOM_VERSION },
26217
+ exe: "headroom.exe",
26218
+ service: true,
26219
+ plugsInto: "Claude Code: the sandbox starts the proxy and points Claude Code at it (managed settings)",
26220
+ userOnly: true
26221
+ },
26222
+ {
26223
+ id: "ccusage",
26224
+ name: "ccusage",
26225
+ category: "agents",
26226
+ 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).",
26227
+ size: "5 MB",
26228
+ source: { locked: "npm", package: "ccusage", version: CCUSAGE_VERSION },
26229
+ exe: "ccusage.cmd",
26230
+ cli: true,
26231
+ plugsInto: "Reads Claude Code's session logs in the sandbox; changes nothing",
26232
+ userOnly: true
26233
+ },
26234
+ {
26235
+ id: "playwright-mcp",
26236
+ name: "Playwright MCP",
26237
+ category: "agents",
26238
+ 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.",
26239
+ size: "20 MB",
26240
+ source: { locked: "npm", package: "@playwright/mcp", version: PLAYWRIGHT_MCP_VERSION },
26241
+ exe: "playwright-mcp.cmd",
26242
+ service: true,
26243
+ mcp: { name: "sbx-playwright", script: "node_modules/@playwright/mcp/cli.js", args: ["--browser", "msedge"] },
26244
+ plugsInto: "Claude Code as the MCP server sbx-playwright (the sandbox's Claude settings)",
26245
+ userOnly: true
26246
+ },
26247
+ {
26248
+ id: "context7",
26249
+ name: "Context7 MCP",
26250
+ category: "agents",
26251
+ 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.",
26252
+ size: "55 MB",
26253
+ source: { locked: "npm", package: "@upstash/context7-mcp", version: CONTEXT7_MCP_VERSION },
26254
+ exe: "context7-mcp.cmd",
26255
+ service: true,
26256
+ mcp: { name: "sbx-context7", script: "node_modules/@upstash/context7-mcp/dist/index.js" },
26257
+ plugsInto: "Claude Code as the MCP server sbx-context7 (the sandbox's Claude settings)",
26258
+ userOnly: true
26259
+ },
26260
+ {
26261
+ id: "claude-mem",
26262
+ name: "claude-mem",
26263
+ category: "agents",
26264
+ about: "Persistent memory for Claude Code (a plugin you install on this PC): its database is brought into the sandbox.",
26265
+ size: "",
26266
+ source: { resolve: "setting" },
26267
+ exe: "",
26268
+ setting: "claudeProfile.syncClaudeMem",
26269
+ plugsInto: "Claude Code, with your Claude settings copied from this PC",
26270
+ userOnly: true
26271
+ },
26272
+ {
26273
+ id: "rea",
26274
+ name: "REA (Reverse Engineer Anything)",
26275
+ category: "agents",
26276
+ 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+.",
26277
+ size: "8 MB",
26278
+ source: { npm: "rea-agents" },
26279
+ exe: "rea.cmd",
26280
+ cli: true,
26281
+ plugsInto: "Claude Code and Codex as an MCP server, after `rea setup`"
26282
+ },
26183
26283
  // ---- editors
26184
26284
  {
26185
26285
  id: "vscode",
@@ -26641,16 +26741,6 @@ var APPS = [
26641
26741
  cli: true
26642
26742
  },
26643
26743
  // ---- reverse engineering
26644
- {
26645
- id: "rea",
26646
- name: "REA (Reverse Engineer Anything)",
26647
- category: "reversing",
26648
- 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+.",
26649
- size: "8 MB",
26650
- source: { npm: "rea-agents" },
26651
- exe: "rea.cmd",
26652
- cli: true
26653
- },
26654
26744
  {
26655
26745
  id: "ghidra",
26656
26746
  name: "Ghidra",
@@ -26930,6 +27020,8 @@ var APPS = [
26930
27020
  // src/core/schema/apps.ts
26931
27021
  var CATALOGUE_IDS = APPS.filter((a) => !a.setting).map((a) => a.id);
26932
27022
  var AppIdSchema = external_exports.enum(CATALOGUE_IDS);
27023
+ var PROJECT_IDS = APPS.filter((a) => !a.setting && !a.userOnly).map((a) => a.id);
27024
+ var ProjectAppIdSchema = external_exports.enum(PROJECT_IDS);
26933
27025
  var CustomAppIdSchema = external_exports.string().regex(/^[a-z0-9][a-z0-9-]{0,40}$/, "lower-case letters, digits and - only");
26934
27026
  var compiles = (pattern) => {
26935
27027
  try {
@@ -26953,6 +27045,11 @@ var CustomAppSchema = external_exports.strictObject({
26953
27045
  }).refine((a) => a.github && a.asset ? !a.url : Boolean(a.url) && !a.github && !a.asset, {
26954
27046
  message: "give github + asset, or url (not both)"
26955
27047
  });
27048
+ var ProjectAppsSchema = external_exports.strictObject({
27049
+ install: external_exports.array(ProjectAppIdSchema).describe(
27050
+ "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)."
27051
+ )
27052
+ });
26956
27053
  var AppsSchema = external_exports.strictObject({
26957
27054
  install: external_exports.array(AppIdSchema).describe(
26958
27055
  "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."
@@ -26993,12 +27090,39 @@ var ResumeSchema = external_exports.strictObject({
26993
27090
  });
26994
27091
 
26995
27092
  // src/core/schema/web.ts
27093
+ var REMOTE_ROLES = ["view", "control"];
27094
+ var WindowsUserNameSchema = external_exports.string().trim().min(1).max(120).regex(
27095
+ /^(?:[A-Za-z0-9][A-Za-z0-9._ -]{0,62}\\)?[^\\/"[\]:;|=,+*?<>@]{1,64}$/,
27096
+ "a Windows user name (name or DOMAIN\\name)"
27097
+ );
27098
+ var RemoteUserSchema = external_exports.strictObject({
27099
+ name: WindowsUserNameSchema.describe("The Windows user (name, or DOMAIN\\name)"),
27100
+ role: external_exports.enum(REMOTE_ROLES).describe("view: sees everything, terminals read-only. control: everything but remote access, logins and tokens.")
27101
+ });
27102
+ var WebLanSchema = external_exports.strictObject({
27103
+ enabled: external_exports.boolean().describe(
27104
+ "(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."
27105
+ ),
27106
+ port: external_exports.number().int().min(1024).max(65535).describe("HTTPS port for paired devices on your network."),
27107
+ 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).")
27108
+ });
27109
+ var WebRemoteSchema = external_exports.strictObject({
27110
+ windowsSignIn: external_exports.boolean().describe(
27111
+ "(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."
27112
+ ),
27113
+ users: external_exports.array(RemoteUserSchema).max(32).describe("Who else may sign in with Windows, and their role (view or control)."),
27114
+ rememberDays: external_exports.number().int().min(1).max(90).describe(
27115
+ "How many days a paired device or a Windows sign-in stays signed in (from when it signed in, not renewed)."
27116
+ ),
27117
+ lan: WebLanSchema
27118
+ });
26996
27119
  var WebSchema = external_exports.strictObject({
26997
27120
  enabled: external_exports.boolean().describe(
26998
27121
  "(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."
26999
27122
  ),
27000
27123
  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."),
27001
- openOnLaunch: external_exports.boolean().describe("(Beta) With the web UI on: open it in your browser, already signed in, every time a sandbox starts.")
27124
+ openOnLaunch: external_exports.boolean().describe("(Beta) With the web UI on: open it in your browser, already signed in, every time a sandbox starts."),
27125
+ remote: WebRemoteSchema.describe("(Beta) Access for other Windows users of this PC and for paired devices.")
27002
27126
  });
27003
27127
 
27004
27128
  // src/core/schema/vpn.ts
@@ -27028,6 +27152,36 @@ var GithubSchema = external_exports.strictObject({
27028
27152
  });
27029
27153
 
27030
27154
  // src/core/schema/config.ts
27155
+ 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;
27156
+ var RESERVED_ENV_SUFFIX = /(_PROXY|_BASE_URL|_ENDPOINT|_CA_BUNDLE|_CA_CERTS)$/i;
27157
+ var RESERVED_ENV_NAMES = new Set(
27158
+ [
27159
+ "PATH",
27160
+ "PATHEXT",
27161
+ "BASH_ENV",
27162
+ "ENV",
27163
+ "COMSPEC",
27164
+ "PSMODULEPATH",
27165
+ "PYTHONPATH",
27166
+ "PYTHONSTARTUP",
27167
+ "PERL5OPT",
27168
+ "RUBYOPT",
27169
+ "JAVA_TOOL_OPTIONS",
27170
+ "LD_PRELOAD",
27171
+ "SYSTEMROOT",
27172
+ "WINDIR",
27173
+ "HOME",
27174
+ "USERPROFILE",
27175
+ "APPDATA",
27176
+ "LOCALAPPDATA",
27177
+ "PROGRAMDATA",
27178
+ "TEMP",
27179
+ "TMP"
27180
+ ].map((n) => n.toUpperCase())
27181
+ );
27182
+ function reservedEnvName(name) {
27183
+ return RESERVED_ENV_PREFIX.test(name) || RESERVED_ENV_SUFFIX.test(name) || RESERVED_ENV_NAMES.has(name.toUpperCase());
27184
+ }
27031
27185
  var ConfigSchema = external_exports.strictObject({
27032
27186
  $schema: SchemaRefSchema.optional(),
27033
27187
  defaultHarness: NameSchema.describe("Agent started by `sandbox launch` (sandbox claude always runs claude)."),
@@ -27094,10 +27248,14 @@ var LocalOverridesSchema = external_exports.strictObject({
27094
27248
  scripts: StringsSchema.describe(
27095
27249
  "Scripts (.ps1 / .mjs / .cmd, relative to this file) run inside the sandbox before the agent."
27096
27250
  ),
27097
- // This PC's resources are yours to share: CPU and paging file (this PC's disk) are not a project's to set.
27251
+ // 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
27252
+ // project's to set.
27098
27253
  sandbox: SandboxSchema.omit({
27099
27254
  cpuLimit: true,
27100
27255
  pageFileMb: true,
27256
+ reserveHostMb: true,
27257
+ maxMemoryPercent: true,
27258
+ maxMemoryMb: true,
27101
27259
  engine: true,
27102
27260
  agentMemoryHeadroomMb: true,
27103
27261
  pressureResponse: true
@@ -27111,14 +27269,17 @@ var LocalOverridesSchema = external_exports.strictObject({
27111
27269
  // Every toolchain setting, each one optional (a project usually only switches languages on or pins a version).
27112
27270
  toolchains: external_exports.strictObject({
27113
27271
  ...import_lodash.default.mapValues(import_lodash.default.omit(ToolchainsSchema.shape, "environment"), (shape) => shape.partial()),
27114
- environment: ToolchainsSchema.shape.environment
27272
+ environment: ToolchainsSchema.shape.environment.refine(
27273
+ (env) => !Object.keys(env).some(reservedEnvName),
27274
+ "names the sandbox sets or that carry logins (AGENT_*, GIT_*, PATH, BASH_ENV, NODE_*, proxies, ANTHROPIC_*, CLAUDE_* ...) cannot be set by a project"
27275
+ )
27115
27276
  }).partial(),
27116
27277
  databases: external_exports.strictObject(import_lodash.default.mapValues(DatabasesSchema.shape, (shape) => shape.partial())).partial(),
27117
27278
  attach: AttachSchema.partial(),
27118
27279
  personalization: toggle("Copy your desktop look into the sandbox.").partial(),
27119
27280
  // Catalogue apps only (a vetted list): your own programs (apps.custom) download anything, so a repo cannot add
27120
- // them.
27121
- apps: AppsSchema.pick({ install: true }).partial(),
27281
+ // them, nor agent add-ons that are yours only (rtk hooks every agent command, Headroom sits in its API path).
27282
+ apps: ProjectAppsSchema.partial(),
27122
27283
  claudeProfile: ClaudeProfileSchema.pick({
27123
27284
  enabled: true,
27124
27285
  overwrite: true,
@@ -27181,6 +27342,7 @@ var ProjectSpecSchema = external_exports.strictObject({
27181
27342
  /** Its hooks were staged in C:\AgentLaunch\projects\<name>\hooks. */
27182
27343
  hooks: external_exports.boolean()
27183
27344
  });
27345
+ var ShellChoiceSchema = external_exports.enum(["auto", "pwsh", "powershell", "cmd"]);
27184
27346
  var GuestRequestSchema = external_exports.discriminatedUnion("kind", [
27185
27347
  external_exports.strictObject({
27186
27348
  kind: external_exports.literal("session"),
@@ -27190,8 +27352,12 @@ var GuestRequestSchema = external_exports.discriminatedUnion("kind", [
27190
27352
  cwd: Text(),
27191
27353
  project: ProjectSpecSchema.optional(),
27192
27354
  harnessSpec: HarnessSchema.optional(),
27355
+ /** A plain shell instead of an agent (harness is then "shell" and args are ignored). */
27356
+ shell: ShellChoiceSchema.optional(),
27193
27357
  createdAt: TimeSchema
27194
27358
  }),
27359
+ /** End a running session (an agent or a shell) and everything it started. */
27360
+ external_exports.strictObject({ kind: external_exports.literal("close"), id: IdSchema, session: IdSchema, createdAt: TimeSchema }),
27195
27361
  /** Provision a registered project without starting an agent (sandbox start / exec / db from its folder). */
27196
27362
  external_exports.strictObject({ kind: external_exports.literal("project"), id: IdSchema, project: ProjectSpecSchema, createdAt: TimeSchema }),
27197
27363
  external_exports.strictObject({
@@ -27257,6 +27423,8 @@ var SessionStatusSchema = external_exports.object({
27257
27423
  id: IdSchema,
27258
27424
  launchId: Text(64),
27259
27425
  harness: Text(64),
27426
+ /** A plain shell (harness is then the shell: pwsh, powershell or cmd); absent: an agent. */
27427
+ kind: external_exports.enum(["agent", "shell"]).optional(),
27260
27428
  cwd: Text(),
27261
27429
  /** The project it runs in: its hub name, or the launch folder's for the first project. */
27262
27430
  project: Text(64).optional(),