windows-development-sandbox 1.20.0 → 1.23.1

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 (337) hide show
  1. package/config.example.json +8 -1
  2. package/dist/app/features/access/access.def.js +5 -2
  3. package/dist/app/features/access/access.run.js +7 -3
  4. package/dist/app/features/accounts/accounts.def.d.ts +29 -1
  5. package/dist/app/features/accounts/accounts.def.js +10 -4
  6. package/dist/app/features/accounts/accounts.run.d.ts +1 -0
  7. package/dist/app/features/accounts/accounts.run.js +7 -2
  8. package/dist/app/features/accounts/services.def.d.ts +4 -1
  9. package/dist/app/features/accounts/services.def.js +15 -14
  10. package/dist/app/features/accounts/services.run.d.ts +1 -0
  11. package/dist/app/features/accounts/services.run.js +41 -15
  12. package/dist/app/features/defs.d.ts +39 -2
  13. package/dist/app/features/engine/engine.run.js +1 -1
  14. package/dist/app/features/github/github.def.d.ts +44 -3
  15. package/dist/app/features/github/github.def.js +145 -63
  16. package/dist/app/features/github/github.run.d.ts +9 -2
  17. package/dist/app/features/github/github.run.js +43 -5
  18. package/dist/app/features/health/health.def.js +8 -2
  19. package/dist/app/features/logs/logs.def.js +0 -8
  20. package/dist/app/features/projects/projects.def.js +2 -2
  21. package/dist/app/features/projects/projects.run.js +5 -5
  22. package/dist/app/features/sandbox/sandbox.def.js +7 -3
  23. package/dist/app/features/sessions/sessions.def.d.ts +4 -4
  24. package/dist/app/features/sessions/sessions.def.js +0 -5
  25. package/dist/app/features/sessions/sessions.run.d.ts +1 -1
  26. package/dist/app/features/sessions/sessions.run.js +2 -2
  27. package/dist/app/features/settings/categories.def.js +2 -0
  28. package/dist/app/features/settings/settings-rows.js +1 -1
  29. package/dist/app/features/settings/settings.def.js +1 -1
  30. package/dist/app/features/settings/settings.run.js +3 -3
  31. package/dist/app/features/storage/storage.run.js +18 -9
  32. package/dist/app/features/updates/update-lines.js +2 -2
  33. package/dist/app/features/updates/updates.def.js +1 -1
  34. package/dist/app/features/updates/updates.run.js +1 -1
  35. package/dist/app/features/web/web.def.js +2 -2
  36. package/dist/app/features/web/web.run.js +12 -4
  37. package/dist/app/kernel/errors.d.ts +7 -0
  38. package/dist/app/kernel/errors.js +18 -3
  39. package/dist/app/kernel/rpc.d.ts +5 -0
  40. package/dist/app/kernel/view.d.ts +11 -1
  41. package/dist/bin/agent-sandbox.js +2 -2
  42. package/dist/bin/{chunk-DK4NTBUF.js → chunk-7YPEDAJD.js} +172 -48
  43. package/dist/bin/{chunk-2IMT7ZCT.js → chunk-QFSJX2KW.js} +1 -1
  44. package/dist/bin/{chunk-Z2P5OGKL.js → chunk-USTRSHIE.js} +2436 -1693
  45. package/dist/bin/claude-host.js +2 -2
  46. package/dist/bin/claude-sbx.js +2 -2
  47. package/dist/bin/codex-sbx.js +2 -2
  48. package/dist/bin/gemini-sbx.js +2 -2
  49. package/dist/bin/sandbox.js +2 -2
  50. package/dist/bin/sbx-hide.js +2 -2
  51. package/dist/bin/sbx-show.js +2 -2
  52. package/dist/cli/manifest.d.ts +2 -2
  53. package/dist/cli/manifest.js +2 -1
  54. package/dist/cli/menu/coverage-exempt.d.ts +17 -0
  55. package/dist/cli/menu/coverage-exempt.js +61 -0
  56. package/dist/cli/menu/io-menu.d.ts +2 -0
  57. package/dist/cli/menu/io-menu.js +50 -5
  58. package/dist/cli/menu/pages/accounts-page.js +1 -1
  59. package/dist/cli/menu/pages/agents-page.js +8 -2
  60. package/dist/cli/menu/pages/maintenance-page.d.ts +6 -0
  61. package/dist/cli/menu/pages/maintenance-page.js +9 -2
  62. package/dist/cli/menu/pages/sessions-page.d.ts +2 -0
  63. package/dist/cli/menu/pages/sessions-page.js +12 -4
  64. package/dist/cli/menu/pages/settings-page.js +12 -1
  65. package/dist/cli/menu/remote-menu.js +1 -1
  66. package/dist/cli/menu/shell.d.ts +5 -0
  67. package/dist/cli/menu/shell.js +13 -0
  68. package/dist/cli/report.js +2 -0
  69. package/dist/cli/tui/app.d.ts +5 -0
  70. package/dist/cli/tui/app.js +2 -0
  71. package/dist/core/config/defaults.js +3 -1
  72. package/dist/core/schema/accounts.d.ts +6 -0
  73. package/dist/core/schema/accounts.js +13 -11
  74. package/dist/core/schema/config.d.ts +20 -8
  75. package/dist/core/schema/config.js +4 -4
  76. package/dist/core/schema/github.js +1 -1
  77. package/dist/core/schema/profile.js +8 -4
  78. package/dist/core/schema/resume.js +1 -1
  79. package/dist/core/schema/sandbox.js +3 -3
  80. package/dist/core/schema/vpn.js +1 -1
  81. package/dist/core/schema/web.js +3 -3
  82. package/dist/core/types.d.ts +6 -0
  83. package/dist/core/util/errors.d.ts +11 -1
  84. package/dist/core/util/errors.js +7 -1
  85. package/dist/core/util/index.d.ts +1 -1
  86. package/dist/core/util/index.js +1 -1
  87. package/dist/guest/accounts/adapter.d.ts +2 -0
  88. package/dist/guest/accounts/adapters.js +4 -0
  89. package/dist/guest/accounts/apply.d.ts +6 -2
  90. package/dist/guest/accounts/kinds/cfx.d.ts +7 -0
  91. package/dist/guest/accounts/kinds/cfx.js +33 -3
  92. package/dist/guest/accounts/kinds/comet.d.ts +7 -0
  93. package/dist/guest/accounts/kinds/comet.js +50 -0
  94. package/dist/guest/accounts/kinds/perplexity.d.ts +2 -0
  95. package/dist/guest/accounts/kinds/perplexity.js +12 -0
  96. package/dist/guest/accounts/watch.d.ts +2 -0
  97. package/dist/guest/accounts/watch.js +12 -2
  98. package/dist/guest/agents/agent-installer.js +1 -1
  99. package/dist/guest/agents/profile-links.d.ts +2 -0
  100. package/dist/guest/agents/profile-links.js +18 -4
  101. package/dist/guest/apps/after-install.js +19 -0
  102. package/dist/guest/apps/app-installer.d.ts +11 -0
  103. package/dist/guest/apps/app-installer.js +69 -6
  104. package/dist/guest/apps/comet-unpack.d.ts +20 -0
  105. package/dist/guest/apps/comet-unpack.js +127 -0
  106. package/dist/guest/apps/index.d.ts +1 -1
  107. package/dist/guest/apps/index.js +1 -1
  108. package/dist/guest/apps/resolvers-agents-web.d.ts +2 -0
  109. package/dist/guest/apps/resolvers-agents-web.js +7 -0
  110. package/dist/guest/apps/resolvers.js +2 -0
  111. package/dist/guest/apps/shortcuts.d.ts +2 -0
  112. package/dist/guest/apps/shortcuts.js +1 -0
  113. package/dist/guest/apps/unpack.js +14 -4
  114. package/dist/guest/boot/boot.d.ts +45 -16
  115. package/dist/guest/boot/boot.js +316 -145
  116. package/dist/guest/boot/graph.d.ts +252 -0
  117. package/dist/guest/boot/graph.js +257 -0
  118. package/dist/guest/boot/guide-lines.d.ts +25 -0
  119. package/dist/guest/boot/guide-lines.js +41 -0
  120. package/dist/guest/boot/guide.d.ts +1 -4
  121. package/dist/guest/boot/guide.js +6 -8
  122. package/dist/guest/boot/runner.d.ts +77 -0
  123. package/dist/guest/boot/runner.js +215 -0
  124. package/dist/guest/browser/cdp.d.ts +71 -0
  125. package/dist/guest/browser/cdp.js +306 -0
  126. package/dist/guest/browser/comet.d.ts +28 -0
  127. package/dist/guest/browser/comet.js +155 -0
  128. package/dist/guest/daemon/project-provisioner.js +6 -1
  129. package/dist/guest/devtools/fivem.d.ts +1 -1
  130. package/dist/guest/devtools/fivem.js +243 -3
  131. package/dist/guest/entries/daemon.js +2 -0
  132. package/dist/guest/runtime/log.d.ts +12 -0
  133. package/dist/guest/runtime/log.js +29 -5
  134. package/dist/guest/runtime/pools.d.ts +24 -0
  135. package/dist/guest/runtime/pools.js +60 -0
  136. package/dist/guest/runtime/process.d.ts +4 -0
  137. package/dist/guest/runtime/process.js +38 -1
  138. package/dist/guest/runtime/status.d.ts +5 -1
  139. package/dist/guest/runtime/status.js +19 -0
  140. package/dist/guest/setup/addon-mcp.d.ts +1 -1
  141. package/dist/guest/setup/addon-mcp.js +52 -12
  142. package/dist/guest/setup/agent-addons.d.ts +3 -2
  143. package/dist/guest/setup/agent-addons.js +12 -3
  144. package/dist/guest/setup/environment.d.ts +1 -1
  145. package/dist/guest/setup/environment.js +25 -12
  146. package/dist/guest/setup/headroom.d.ts +8 -3
  147. package/dist/guest/setup/headroom.js +44 -15
  148. package/dist/guest/setup/path-plan.d.ts +28 -0
  149. package/dist/guest/setup/path-plan.js +69 -2
  150. package/dist/guest/setup/shell-path.d.ts +1 -1
  151. package/dist/guest/setup/shell-path.js +3 -3
  152. package/dist/guest/toolchains/fivem/artifacts.d.ts +48 -1
  153. package/dist/guest/toolchains/fivem/artifacts.js +97 -4
  154. package/dist/guest/toolchains/fivem/fivem.d.ts +32 -1
  155. package/dist/guest/toolchains/fivem/fivem.js +168 -3
  156. package/dist/guest/toolchains/fivem/scaffold.d.ts +35 -0
  157. package/dist/guest/toolchains/fivem/scaffold.js +105 -0
  158. package/dist/guest/toolchains/fivem/serve-plan.d.ts +34 -0
  159. package/dist/guest/toolchains/fivem/serve-plan.js +61 -0
  160. package/dist/guest/toolchains/languages/go.js +1 -1
  161. package/dist/guest/toolchains/languages/node.js +2 -1
  162. package/dist/guest/toolchains/languages/php.d.ts +2 -0
  163. package/dist/guest/toolchains/languages/php.js +13 -1
  164. package/dist/guest/toolchains/languages/python-tools.js +1 -1
  165. package/dist/guest/toolchains/languages/ruby.js +1 -1
  166. package/dist/guest/toolchains/native/binstall.js +1 -1
  167. package/dist/guest/toolchains/native/msvc/packages.js +10 -4
  168. package/dist/guest/toolchains/native/rust.d.ts +2 -0
  169. package/dist/guest/toolchains/native/rust.js +11 -4
  170. package/dist/guest/toolchains/native/unreal.d.ts +2 -0
  171. package/dist/guest/toolchains/native/unreal.js +16 -6
  172. package/dist/guest/toolchains/native/vcruntime.d.ts +2 -0
  173. package/dist/guest/toolchains/native/vcruntime.js +10 -2
  174. package/dist/guest/toolchains/native/visual-studio.d.ts +3 -0
  175. package/dist/guest/toolchains/native/visual-studio.js +44 -26
  176. package/dist/guest/toolchains/native/vs-request.d.ts +2 -0
  177. package/dist/guest/toolchains/native/vs-request.js +2 -0
  178. package/dist/guest/toolchains/plan.js +19 -8
  179. package/dist/guest/toolchains/scheduler.d.ts +2 -21
  180. package/dist/guest/toolchains/scheduler.js +7 -121
  181. package/dist/guest/toolchains/setup.d.ts +15 -2
  182. package/dist/guest/toolchains/setup.js +39 -20
  183. package/dist/guest/toolchains/split.d.ts +28 -0
  184. package/dist/guest/toolchains/split.js +60 -0
  185. package/dist/guest/toolchains/steam/client.js +2 -1
  186. package/dist/guest/toolchains/step-scheduler.d.ts +51 -0
  187. package/dist/guest/toolchains/step-scheduler.js +147 -0
  188. package/dist/guest/toolchains/step.d.ts +13 -0
  189. package/dist/guest/toolchains/tools/git.js +18 -0
  190. package/dist/guest/vpn/openvpn.js +3 -4
  191. package/dist/guest/vpn/wireguard.js +11 -4
  192. package/dist/host/accounts/deliver.js +7 -0
  193. package/dist/host/accounts/handoff.js +2 -6
  194. package/dist/host/accounts/index.d.ts +1 -1
  195. package/dist/host/accounts/index.js +1 -1
  196. package/dist/host/accounts/kinds/cfx.d.ts +1 -1
  197. package/dist/host/accounts/kinds/cfx.js +47 -4
  198. package/dist/host/accounts/kinds/comet.d.ts +2 -0
  199. package/dist/host/accounts/kinds/comet.js +6 -0
  200. package/dist/host/accounts/kinds/perplexity.d.ts +2 -0
  201. package/dist/host/accounts/kinds/perplexity.js +30 -0
  202. package/dist/host/accounts/leases.d.ts +7 -1
  203. package/dist/host/accounts/leases.js +13 -2
  204. package/dist/host/accounts/source.d.ts +7 -1
  205. package/dist/host/accounts/source.js +27 -0
  206. package/dist/host/accounts/sources.js +4 -0
  207. package/dist/host/github/deliver.d.ts +1 -1
  208. package/dist/host/github/deliver.js +20 -1
  209. package/dist/host/github/index.d.ts +2 -1
  210. package/dist/host/github/index.js +1 -0
  211. package/dist/host/github/token.d.ts +13 -1
  212. package/dist/host/github/token.js +19 -2
  213. package/dist/host/github/verify.d.ts +27 -0
  214. package/dist/host/github/verify.js +61 -0
  215. package/dist/host/launch/hints/fivem.d.ts +3 -1
  216. package/dist/host/launch/hints/fivem.js +68 -2
  217. package/dist/host/launch/session-file.js +4 -0
  218. package/dist/host/launch/toolchains.d.ts +2 -1
  219. package/dist/host/launch/toolchains.js +5 -3
  220. package/dist/host/profile/claude-login.d.ts +2 -2
  221. package/dist/host/profile/claude-login.js +4 -3
  222. package/dist/host/vpn/nordvpn.d.ts +2 -4
  223. package/dist/host/vpn/nordvpn.js +2 -24
  224. package/dist/runtime/agent.js +405 -90
  225. package/dist/runtime/daemon.js +3010 -1383
  226. package/dist/runtime/db.js +333 -90
  227. package/dist/runtime/main.js +4720 -1954
  228. package/dist/runtime/netproxy.js +286 -69
  229. package/dist/runtime/tool.js +2852 -1780
  230. package/dist/runtime/view.js +286 -69
  231. package/dist/selftest/accounts.test.js +1 -1
  232. package/dist/selftest/agent-paths.test.js +39 -1
  233. package/dist/selftest/agent-settings.test.js +6 -0
  234. package/dist/selftest/agents-web.test.d.ts +2 -0
  235. package/dist/selftest/agents-web.test.js +647 -0
  236. package/dist/selftest/app.test.js +5 -2
  237. package/dist/selftest/boot-runner.test.d.ts +2 -0
  238. package/dist/selftest/boot-runner.test.js +456 -0
  239. package/dist/selftest/channel.test.js +15 -0
  240. package/dist/selftest/fivem.test.js +249 -3
  241. package/dist/selftest/github.test.js +94 -9
  242. package/dist/selftest/guest-boot.test.js +3 -0
  243. package/dist/selftest/health.test.js +1 -1
  244. package/dist/selftest/index.js +8 -0
  245. package/dist/selftest/layout.test.js +5 -0
  246. package/dist/selftest/menu-coverage.test.d.ts +2 -0
  247. package/dist/selftest/menu-coverage.test.js +46 -0
  248. package/dist/selftest/menu-screens.js +37 -1
  249. package/dist/selftest/persisted-installs.test.js +6 -3
  250. package/dist/selftest/service-accounts.test.js +3 -2
  251. package/dist/selftest/support/engine-golden.js +27 -0
  252. package/dist/selftest/support/fixtures.d.ts +6 -0
  253. package/dist/selftest/support/web-preview.d.ts +34 -1
  254. package/dist/selftest/support/web-preview.js +21 -18
  255. package/dist/selftest/toolchains.test.js +23 -1
  256. package/dist/selftest/ui-text.test.d.ts +7 -0
  257. package/dist/selftest/ui-text.test.js +300 -0
  258. package/dist/shared/accounts/anthropic.d.ts +1 -1
  259. package/dist/shared/accounts/anthropic.js +9 -8
  260. package/dist/shared/accounts/index.d.ts +2 -0
  261. package/dist/shared/accounts/index.js +2 -0
  262. package/dist/shared/accounts/kinds/comet.d.ts +12 -0
  263. package/dist/shared/accounts/kinds/comet.js +64 -0
  264. package/dist/shared/accounts/kinds/perplexity.d.ts +8 -0
  265. package/dist/shared/accounts/kinds/perplexity.js +37 -0
  266. package/dist/shared/accounts/kinds.d.ts +24 -5
  267. package/dist/shared/accounts/kinds.js +86 -4
  268. package/dist/shared/accounts/payloads.d.ts +81 -0
  269. package/dist/shared/accounts/payloads.js +39 -1
  270. package/dist/shared/apps/agent-addons.d.ts +33 -5
  271. package/dist/shared/apps/agent-addons.js +95 -3
  272. package/dist/shared/apps/catalogue-agents-web.d.ts +14 -0
  273. package/dist/shared/apps/catalogue-agents-web.js +112 -0
  274. package/dist/shared/apps/catalogue-modding.js +32 -1
  275. package/dist/shared/apps/catalogue.d.ts +27 -3
  276. package/dist/shared/apps/catalogue.js +2 -1
  277. package/dist/shared/apps/index.d.ts +3 -1
  278. package/dist/shared/apps/index.js +3 -1
  279. package/dist/shared/channel/schema.d.ts +21 -3
  280. package/dist/shared/channel/schema.js +7 -0
  281. package/dist/shared/channel/secrets.d.ts +19 -0
  282. package/dist/shared/concurrency/index.d.ts +3 -0
  283. package/dist/shared/concurrency/index.js +3 -0
  284. package/dist/shared/concurrency/installer-retry.d.ts +6 -0
  285. package/dist/shared/concurrency/installer-retry.js +10 -0
  286. package/dist/shared/concurrency/limiter.d.ts +19 -0
  287. package/dist/shared/concurrency/limiter.js +67 -0
  288. package/dist/shared/concurrency/pools.d.ts +7 -0
  289. package/dist/shared/concurrency/pools.js +9 -0
  290. package/dist/shared/download/archive.d.ts +2 -0
  291. package/dist/shared/download/archive.js +11 -1
  292. package/dist/shared/download/bounded-fetch.d.ts +13 -0
  293. package/dist/shared/download/bounded-fetch.js +40 -0
  294. package/dist/shared/download/downloader.d.ts +5 -0
  295. package/dist/shared/download/downloader.js +50 -38
  296. package/dist/shared/download/index.d.ts +2 -1
  297. package/dist/shared/download/index.js +2 -1
  298. package/dist/shared/readiness.d.ts +2 -2
  299. package/dist/shared/readiness.js +2 -2
  300. package/dist/web/index.html +1 -1
  301. package/dist/web/{main-OUUQYNK4.js → main-CCILLX2M.js} +67 -67
  302. package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
  303. package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
  304. package/native/csharp/StorageHelper/AssemblyInfo.cs +3 -3
  305. package/package.json +1 -1
  306. package/sandbox/addons/browser-use-mcp/requirements.in +1 -0
  307. package/sandbox/addons/browser-use-mcp/requirements.txt +2350 -0
  308. package/sandbox/addons/chrome-devtools-mcp/package-lock.json +38 -0
  309. package/sandbox/addons/chrome-devtools-mcp/package.json +7 -0
  310. package/sandbox/addons/comet-mcp/package-lock.json +1277 -0
  311. package/sandbox/addons/comet-mcp/package.json +7 -0
  312. package/sandbox/addons/perplexity-mcp/package-lock.json +1655 -0
  313. package/sandbox/addons/perplexity-mcp/package.json +7 -0
  314. package/sandbox/scripts/add-firewall-port.ps1 +18 -4
  315. package/sandbox/scripts/set-machine-environment.ps1 +30 -15
  316. package/sandbox/templates/fivem/README.txt +6 -2
  317. package/sandbox/templates/fivem/cs/Client/Client.csproj +15 -0
  318. package/sandbox/templates/fivem/cs/Client/ClientMain.cs +20 -0
  319. package/sandbox/templates/fivem/cs/Server/Server.csproj +14 -0
  320. package/sandbox/templates/fivem/cs/Server/ServerMain.cs +20 -0
  321. package/sandbox/templates/fivem/cs/fxmanifest.lua +11 -0
  322. package/sandbox/templates/fivem/js/client.js +12 -0
  323. package/sandbox/templates/fivem/js/fxmanifest.lua +9 -0
  324. package/sandbox/templates/fivem/js/server.js +6 -0
  325. package/sandbox/templates/fivem/lua/client.lua +8 -0
  326. package/sandbox/templates/fivem/lua/fxmanifest.lua +10 -0
  327. package/sandbox/templates/fivem/lua/server.lua +6 -0
  328. package/sandbox/templates/fivem/server.cfg +37 -0
  329. package/sandbox/templates/fivem/ts/build.js +17 -0
  330. package/sandbox/templates/fivem/ts/fxmanifest.lua +9 -0
  331. package/sandbox/templates/fivem/ts/package.json +16 -0
  332. package/sandbox/templates/fivem/ts/src/client/client.ts +12 -0
  333. package/sandbox/templates/fivem/ts/src/client/tsconfig.json +13 -0
  334. package/sandbox/templates/fivem/ts/src/server/server.ts +6 -0
  335. package/sandbox/templates/fivem/ts/src/server/tsconfig.json +13 -0
  336. package/schemas/config.schema.json +56 -27
  337. package/schemas/sandbox-config.schema.json +37 -14
@@ -121,6 +121,12 @@ export declare const ConfigSchema: z.ZodObject<{
121
121
  appstore: z.ZodObject<{
122
122
  share: z.ZodBoolean;
123
123
  }, z.core.$strict>;
124
+ perplexity: z.ZodObject<{
125
+ share: z.ZodBoolean;
126
+ }, z.core.$strict>;
127
+ comet: z.ZodObject<{
128
+ share: z.ZodBoolean;
129
+ }, z.core.$strict>;
124
130
  }, z.core.$strict>;
125
131
  pcInstalls: z.ZodObject<{
126
132
  steamGames: z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodNumber>]>;
@@ -566,6 +572,12 @@ export declare const LocalOverridesSchema: z.ZodObject<{
566
572
  appstore: z.ZodOptional<z.ZodObject<{
567
573
  share: z.ZodOptional<z.ZodBoolean>;
568
574
  }, z.core.$strict>>;
575
+ perplexity: z.ZodOptional<z.ZodObject<{
576
+ share: z.ZodOptional<z.ZodBoolean>;
577
+ }, z.core.$strict>>;
578
+ comet: z.ZodOptional<z.ZodObject<{
579
+ share: z.ZodOptional<z.ZodBoolean>;
580
+ }, z.core.$strict>>;
569
581
  }, z.core.$strict>>;
570
582
  provisioning: z.ZodOptional<z.ZodObject<{
571
583
  copyFromHost: z.ZodOptional<z.ZodBoolean>;
@@ -678,7 +690,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
678
690
  zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
679
691
  openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
680
692
  }, z.core.$strict>>;
681
- fivem: z.ZodOptional<z.ZodObject<{
693
+ unreal: z.ZodOptional<z.ZodObject<{
682
694
  enabled: z.ZodOptional<z.ZodBoolean>;
683
695
  }, z.core.$strict> | z.ZodObject<{
684
696
  version: z.ZodOptional<z.ZodString>;
@@ -693,7 +705,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
693
705
  zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
694
706
  openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
695
707
  }, z.core.$strict>>;
696
- unreal: z.ZodOptional<z.ZodObject<{
708
+ node: z.ZodOptional<z.ZodObject<{
697
709
  enabled: z.ZodOptional<z.ZodBoolean>;
698
710
  }, z.core.$strict> | z.ZodObject<{
699
711
  version: z.ZodOptional<z.ZodString>;
@@ -708,7 +720,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
708
720
  zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
709
721
  openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
710
722
  }, z.core.$strict>>;
711
- node: z.ZodOptional<z.ZodObject<{
723
+ go: z.ZodOptional<z.ZodObject<{
712
724
  enabled: z.ZodOptional<z.ZodBoolean>;
713
725
  }, z.core.$strict> | z.ZodObject<{
714
726
  version: z.ZodOptional<z.ZodString>;
@@ -723,7 +735,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
723
735
  zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
724
736
  openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
725
737
  }, z.core.$strict>>;
726
- go: z.ZodOptional<z.ZodObject<{
738
+ python: z.ZodOptional<z.ZodObject<{
727
739
  enabled: z.ZodOptional<z.ZodBoolean>;
728
740
  }, z.core.$strict> | z.ZodObject<{
729
741
  version: z.ZodOptional<z.ZodString>;
@@ -738,7 +750,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
738
750
  zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
739
751
  openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
740
752
  }, z.core.$strict>>;
741
- python: z.ZodOptional<z.ZodObject<{
753
+ rust: z.ZodOptional<z.ZodObject<{
742
754
  enabled: z.ZodOptional<z.ZodBoolean>;
743
755
  }, z.core.$strict> | z.ZodObject<{
744
756
  version: z.ZodOptional<z.ZodString>;
@@ -753,7 +765,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
753
765
  zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
754
766
  openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
755
767
  }, z.core.$strict>>;
756
- rust: z.ZodOptional<z.ZodObject<{
768
+ msvc: z.ZodOptional<z.ZodObject<{
757
769
  enabled: z.ZodOptional<z.ZodBoolean>;
758
770
  }, z.core.$strict> | z.ZodObject<{
759
771
  version: z.ZodOptional<z.ZodString>;
@@ -768,7 +780,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
768
780
  zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
769
781
  openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
770
782
  }, z.core.$strict>>;
771
- msvc: z.ZodOptional<z.ZodObject<{
783
+ steam: z.ZodOptional<z.ZodObject<{
772
784
  enabled: z.ZodOptional<z.ZodBoolean>;
773
785
  }, z.core.$strict> | z.ZodObject<{
774
786
  version: z.ZodOptional<z.ZodString>;
@@ -783,7 +795,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
783
795
  zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
784
796
  openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
785
797
  }, z.core.$strict>>;
786
- steam: z.ZodOptional<z.ZodObject<{
798
+ fivem: z.ZodOptional<z.ZodObject<{
787
799
  enabled: z.ZodOptional<z.ZodBoolean>;
788
800
  }, z.core.$strict> | z.ZodObject<{
789
801
  version: z.ZodOptional<z.ZodString>;
@@ -53,7 +53,7 @@ export function reservedEnvName(name) {
53
53
  export const ConfigSchema = z
54
54
  .strictObject({
55
55
  $schema: SchemaRefSchema.optional(),
56
- defaultHarness: NameSchema.describe('Agent started by `sandbox launch` (sandbox claude always runs claude).'),
56
+ defaultHarness: NameSchema.describe('The agent that starts when you do not name one (starting claude by name always runs claude).'),
57
57
  guestWorkspace: GuestWorkspaceSchema,
58
58
  readOnly: z.boolean().describe('Map the workspace read-only.'),
59
59
  workspaceFilter: WorkspaceFilterSchema,
@@ -65,7 +65,7 @@ export const ConfigSchema = z
65
65
  root: z
66
66
  .string()
67
67
  .min(1)
68
- .describe('Where everything is kept on this PC (tools, databases, logins, launches). The default is a private folder for you under %ProgramData%\\AgentSandbox\\users, which works for installs for one user and for everyone. sandbox storage move <folder> moves it.'),
68
+ .describe('Where everything is kept on this PC (tools, databases, logins, launches). The default is a private folder for you under %ProgramData%\\AgentSandbox\\users, which works for installs for one user and for everyone. Maintenance > Storage moves it.'),
69
69
  persistAgentState: z.boolean().describe('Keep agent logins and history between sandboxes.'),
70
70
  dataName: NameSchema.describe('Name of the persistent data set (C:\\AgentData) shared by all workspaces.'),
71
71
  markSandboxFiles: z
@@ -73,7 +73,7 @@ export const ConfigSchema = z
73
73
  .describe('Programs and scripts (.exe, .ps1, .bat, .cmd, .msi, .lnk ...) that appear or change in your project while a sandbox runs get Windows\' "downloaded from the internet" mark, so SmartScreen and PowerShell ask before they run on this PC.'),
74
74
  contained: z
75
75
  .enum(['off', 'vhdx'])
76
- .describe('(beta) Keep the sandbox tools, state and logs inside one disk image file (vhdx) instead of loose folders, so scanning programs on this PC see one file. Not yet tried on a real PC. Turn it on with sandbox storage contained on (it moves your files and asks first); Windows asks for permission to mount the image when a sandbox starts. "off" = loose folders, as always. Yours only: a project file (.sandbox-config.json) cannot set it.'),
76
+ .describe('(beta) Keep the sandbox tools, state and logs inside one disk image file (vhdx) instead of loose folders, so scanning programs on this PC see one file. Not yet tried on a real PC. Turn it on in Maintenance > Storage (it moves your files and asks first); Windows asks for permission to mount the image when a sandbox starts. "off" = loose folders, as always. Yours only: a project file (.sandbox-config.json) cannot set it.'),
77
77
  containedMaxGb: z
78
78
  .number()
79
79
  .int()
@@ -83,7 +83,7 @@ export const ConfigSchema = z
83
83
  warnDataGb: z
84
84
  .number()
85
85
  .min(0)
86
- .describe('Say at launch when the persisted data (tools, databases, logins) is bigger than this many GB; 0 = never. sandbox data shows what takes the space.'),
86
+ .describe('Say at launch when the persisted data (tools, databases, logins) is bigger than this many GB; 0 = never. Maintenance > Data shows what takes the space.'),
87
87
  }),
88
88
  network: NetworkSchema,
89
89
  vpn: VpnSchema,
@@ -3,5 +3,5 @@ import { z } from 'zod';
3
3
  export const GithubSchema = z.strictObject({
4
4
  shareToken: z
5
5
  .boolean()
6
- .describe('Give each sandbox the GitHub token you saved with `sandbox github login` (best a fine-grained token limited to some repositories and permissions), so gh and https git work there without logging in. Only with provisioning.git.access "full". The agent in the sandbox can read the token and use it for whatever it allows. A project file (.sandbox-config.json) cannot turn this on.'),
6
+ .describe('Give each sandbox the GitHub token you saved in Accounts (best a fine-grained token limited to some repositories and permissions), so gh and https git work there without logging in. Only with provisioning.git.access "full". The agent in the sandbox can read the token and use it for whatever it allows. A project file (.sandbox-config.json) cannot turn this on.'),
7
7
  });
@@ -12,16 +12,18 @@ export const SecretsSchema = z.strictObject({
12
12
  .describe('Warn at launch about files in the workspace that usually hold secrets (.env, *.pem, credentials.json, ...). The agent CAN read them: Windows Sandbox maps the whole folder.'),
13
13
  });
14
14
  export const AttachSchema = z.strictObject({
15
- enabled: z.boolean().describe('Allow sandbox claude --terminal / sandbox attach from this PC.'),
15
+ enabled: z
16
+ .boolean()
17
+ .describe("Allow attaching this PC's terminal to a session (the terminal option when starting an agent, and attach)."),
16
18
  reuseSession: z
17
19
  .boolean()
18
- .describe("sandbox claude -t in a running sandbox reattaches to this folder's session when no terminal on this PC is attached to it (--new always starts another)."),
20
+ .describe("Starting an agent with a terminal in a running sandbox reattaches to this folder's session when no terminal on this PC is attached to it (starting a new session on purpose always starts another)."),
19
21
  auto: z
20
22
  .boolean()
21
23
  .describe('Starting an agent attaches this terminal automatically, as if you passed -t (only in an interactive terminal).'),
22
24
  autoHide: z
23
25
  .boolean()
24
- .describe('Hide the Windows Sandbox window whenever this terminal attaches; it keeps running (sandbox show brings it back).'),
26
+ .describe('Hide the Windows Sandbox window whenever this terminal attaches; it keeps running (Sandbox > Status shows it again).'),
25
27
  confirmCtrlC: z
26
28
  .boolean()
27
29
  .describe('In an attached terminal and the sandbox window, a single Ctrl+C is held back (the title says so) and only a second one within 1.5 seconds reaches the agent: a Ctrl+C meant as "copy" no longer stops it. Esc still stops an agent.'),
@@ -39,7 +41,9 @@ export const ClaudeProfileSchema = z.strictObject({
39
41
  hostDir: z.string().describe('Your Claude folder, or "auto" (~/.claude or CLAUDE_CONFIG_DIR).'),
40
42
  include: z.array(z.string().regex(/^[A-Za-z0-9._-]+$/)).describe('Files and folders copied from it.'),
41
43
  globalStateFile: z.string().describe('Your .claude.json, or "auto". Empty string = do not copy.'),
42
- copyCredentials: z.boolean().describe('Copy your Claude LOGIN into the sandbox. Prefer sandbox account instead.'),
44
+ copyCredentials: z
45
+ .boolean()
46
+ .describe('Copy your Claude LOGIN into the sandbox. Prefer saving the login in Accounts instead.'),
43
47
  overwrite: z.boolean().describe('Refresh these settings from this PC on every launch.'),
44
48
  sharePluginsAcrossAccounts: z
45
49
  .boolean()
@@ -5,7 +5,7 @@ export const RESUME_SESSIONS = ['ask', 'always', 'afterCrash', 'never'];
5
5
  export const ResumeSchema = z.strictObject({
6
6
  sessions: z
7
7
  .enum(RESUME_SESSIONS)
8
- .describe('When a sandbox starts after one that had agent sessions: "ask" lists them and asks whether to reopen them (without a terminal it prints the command sandbox resume), "always" reopens them, "afterCrash" reopens them only when the last sandbox ended unexpectedly, "never" leaves it to sandbox resume. Terminal tabs you opened yourself in the sandbox are never reopened.'),
8
+ .describe('When a sandbox starts after one that had agent sessions: "ask" lists them and asks whether to reopen them (without a terminal it only says they can be reopened), "always" reopens them, "afterCrash" reopens them only when the last sandbox ended unexpectedly, "never" leaves it to you (Sessions reopens them). Terminal tabs you opened yourself in the sandbox are never reopened.'),
9
9
  restartAfterCrash: z
10
10
  .boolean()
11
11
  .describe('When the sandbox ends because Windows Sandbox crashed or ran out of memory, start it again by itself and reopen its sessions (at most 3 times in 6 hours).'),
@@ -18,7 +18,7 @@ export const MappingSchema = z.strictObject({
18
18
  export const SandboxSchema = z.strictObject({
19
19
  engine: z
20
20
  .enum(['windows-sandbox', 'hcs'])
21
- .describe('(alpha) What runs the sandbox. "windows-sandbox" = Windows Sandbox (the default: desktop, Windows Terminal, GPU, clipboard, audio, printers). "hcs" = a headless Hyper-V isolated Server Core container for agents (no desktop, GPU or clipboard); it needs Windows features and an image on this PC (sandbox engine check hcs lists what is missing), and starting it is not enabled yet in this alpha. sandbox engine shows what each engine can do. Yours only: a project file (.sandbox-config.json) cannot set it.'),
21
+ .describe('(alpha) What runs the sandbox. "windows-sandbox" = Windows Sandbox (the default: desktop, Windows Terminal, GPU, clipboard, audio, printers). "hcs" = a headless Hyper-V isolated Server Core container for agents (no desktop, GPU or clipboard); it needs Windows features and an image on this PC (Maintenance > Engine lists what is missing), and starting it is not enabled yet in this alpha. Maintenance > Engine shows what each engine can do. Yours only: a project file (.sandbox-config.json) cannot set it.'),
22
22
  memoryMb: z
23
23
  .union([z.literal('auto'), z.number().int().min(2048)])
24
24
  .describe('Sandbox RAM in MB (>= 2048), or "auto": free RAM minus reserveHostMb, capped at maxMemoryMb. Never more than this PC can keep in RAM for it (its RAM minus the larger of reserveHostMb and 25 %, 4 GB more with vGPU): a bigger value is lowered.'),
@@ -55,7 +55,7 @@ export const SandboxSchema = z.strictObject({
55
55
  networking: z.boolean().describe('Internet access. false is the only hard network isolation Windows Sandbox offers.'),
56
56
  clipboard: z
57
57
  .boolean()
58
- .describe("Shared clipboard between this PC and the sandbox. Also lets an agent's copy (in sandbox attach) reach this PC's clipboard."),
58
+ .describe("Shared clipboard between this PC and the sandbox. Also lets an agent's copy (in an attached terminal) reach this PC's clipboard."),
59
59
  audioInput: z.boolean().describe('Microphone access.'),
60
60
  videoInput: z.boolean().describe('Camera access.'),
61
61
  printerRedirection: z.boolean().describe('Printers from this PC.'),
@@ -108,7 +108,7 @@ export const NetworkSchema = z.strictObject({
108
108
  export const AuditSchema = z.strictObject({
109
109
  enabled: z
110
110
  .boolean()
111
- .describe('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.'),
111
+ .describe('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 on the Activity page.'),
112
112
  days: z
113
113
  .number()
114
114
  .int()
@@ -4,7 +4,7 @@ export const VPN_PROVIDERS = ['nordvpn', 'openvpn-file', 'wireguard-file'];
4
4
  export const VpnSchema = z.strictObject({
5
5
  enabled: z
6
6
  .boolean()
7
- .describe("(Alpha: not yet tried on a real PC) Send the sandbox's traffic through a VPN. Only the sandbox: your PC's own connection is untouched. Needs a saved login first (sandbox vpn login). The agent in the sandbox can read that login and can turn the tunnel off (it is the administrator there)."),
7
+ .describe("(Alpha: not yet tried on a real PC) Send the sandbox's traffic through a VPN. Only the sandbox: your PC's own connection is untouched. Needs a saved login first (Settings > Network > VPN). The agent in the sandbox can read that login and can turn the tunnel off (it is the administrator there)."),
8
8
  provider: z
9
9
  .enum(VPN_PROVIDERS)
10
10
  .describe('nordvpn: a recommended NordVPN server is picked at every launch. openvpn-file: your own .ovpn file (configFile). wireguard-file: your own WireGuard .conf (configFile), e.g. from your company.'),
@@ -20,7 +20,7 @@ export const RemoteUserSchema = z.strictObject({
20
20
  export const WebLanSchema = z.strictObject({
21
21
  enabled: z
22
22
  .boolean()
23
- .describe('(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.'),
23
+ .describe('(Beta) Devices on your network (a phone): an HTTPS address on this PC for devices you pair with a one-time code (Remote access). Needs a firewall rule (turning it on asks Windows once). Off: every paired device is signed out.'),
24
24
  port: z.number().int().min(1024).max(65535).describe('HTTPS port for paired devices on your network.'),
25
25
  address: z
26
26
  .string()
@@ -32,7 +32,7 @@ export const WebLanSchema = z.strictObject({
32
32
  export const WebRemoteSchema = z.strictObject({
33
33
  windowsSignIn: z
34
34
  .boolean()
35
- .describe('(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.'),
35
+ .describe('(Beta) Other Windows users of this PC named in web.remote.users sign in to your web UI (and the remote menu) with their own Windows account: no password, no link.'),
36
36
  users: z
37
37
  .array(RemoteUserSchema)
38
38
  .max(32)
@@ -48,7 +48,7 @@ export const WebRemoteSchema = z.strictObject({
48
48
  export const WebSchema = z.strictObject({
49
49
  enabled: z
50
50
  .boolean()
51
- .describe('(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.'),
51
+ .describe('(Beta) The web UI: your sessions in a browser on this PC (http://127.0.0.1:<port>, this PC only). On: every start of a sandbox also starts it in the background (it keeps running until you stop it in Maintenance > Web UI or restart the PC). Off: it runs only when you start it there. Open it signed in from the same page.'),
52
52
  port: z
53
53
  .number()
54
54
  .int()
@@ -225,6 +225,12 @@ export interface GuestSession {
225
225
  */
226
226
  projectsDir?: string;
227
227
  roots?: string[];
228
+ /** The same folders with the PC folder each shows (roots first), for the sandbox guide. */
229
+ mappedProjects?: {
230
+ host: string;
231
+ guest: string;
232
+ root?: boolean;
233
+ }[];
228
234
  /** false: start no agent session at boot (a restart that adds a project opens its sessions itself). */
229
235
  autoSession?: boolean;
230
236
  harnessName: string;
@@ -1,8 +1,18 @@
1
+ /** A step that fixes a problem: the menu and the web offer `op` as a button, the command line prints `cli`. */
2
+ export interface ErrorAction {
3
+ readonly op: string;
4
+ readonly input?: Readonly<Record<string, unknown>>;
5
+ readonly label: string;
6
+ readonly cli: string;
7
+ }
1
8
  /** An expected problem the user can act on: what went wrong, and (optionally) how to fix it. */
2
9
  export declare class UserError extends Error {
3
10
  readonly fix?: string | undefined;
4
- constructor(message: string, fix?: string | undefined);
11
+ readonly action?: ErrorAction | undefined;
12
+ constructor(message: string, fix?: string | undefined, action?: ErrorAction | undefined);
5
13
  }
6
14
  /** Throws a UserError. Typed explicitly so TypeScript narrows after calls (arrow functions need it to act as never). */
7
15
  export declare const fail: (message: string, fix?: string) => never;
16
+ /** Throws a UserError whose fix is also a button (menu, web) and a command line (CLI). */
17
+ export declare const failWith: (message: string, fix: string, action: ErrorAction) => never;
8
18
  export declare function errMsg(e: unknown): string;
@@ -1,9 +1,11 @@
1
1
  /** An expected problem the user can act on: what went wrong, and (optionally) how to fix it. */
2
2
  export class UserError extends Error {
3
3
  fix;
4
- constructor(message, fix) {
4
+ action;
5
+ constructor(message, fix, action) {
5
6
  super(message);
6
7
  this.fix = fix;
8
+ this.action = action;
7
9
  this.name = 'UserError';
8
10
  }
9
11
  }
@@ -11,6 +13,10 @@ export class UserError extends Error {
11
13
  export const fail = (message, fix) => {
12
14
  throw new UserError(message, fix);
13
15
  };
16
+ /** Throws a UserError whose fix is also a button (menu, web) and a command line (CLI). */
17
+ export const failWith = (message, fix, action) => {
18
+ throw new UserError(message, fix, action);
19
+ };
14
20
  export function errMsg(e) {
15
21
  return e instanceof Error ? e.message : String(e);
16
22
  }
@@ -1,5 +1,5 @@
1
1
  export { isWin, sleep, captureOutput } from './process.js';
2
- export { UserError, fail, errMsg } from './errors.js';
2
+ export { UserError, fail, failWith, errMsg, type ErrorAction } from './errors.js';
3
3
  export { parseJsonc, readJsonc } from './jsonc.js';
4
4
  export { ensureDir, dirExists, fileExists, fileExistsAsync, readJson, readSmallFile, tryReadJson, writeJson, realPath, } from './fs.js';
5
5
  export { xmlEscape, safeText, plainText } from './text.js';
@@ -1,5 +1,5 @@
1
1
  export { isWin, sleep, captureOutput } from './process.js';
2
- export { UserError, fail, errMsg } from './errors.js';
2
+ export { UserError, fail, failWith, errMsg } from './errors.js';
3
3
  export { parseJsonc, readJsonc } from './jsonc.js';
4
4
  export { ensureDir, dirExists, fileExists, fileExistsAsync, readJson, readSmallFile, tryReadJson, writeJson, realPath, } from './fs.js';
5
5
  export { xmlEscape, safeText, plainText } from './text.js';
@@ -10,6 +10,8 @@ export interface GuestAdapter<K extends ServiceKind> {
10
10
  apply(p: Payload<K>): Promise<Applied> | Applied;
11
11
  /** Bounded, BOM-aware read of what the tool holds now; null when it holds none. */
12
12
  current?(): Payload<K> | null;
13
+ /** Asks the tool before each look, for tools that only answer asynchronously (Comet over its DevTools port). */
14
+ refresh?(): Promise<void>;
13
15
  /** How often current() is asked (default 60000 ms). */
14
16
  readonly checkMs?: number;
15
17
  /** When the sandbox stops: let go of what must not stay taken (a Unity seat). */
@@ -1,8 +1,10 @@
1
1
  import { appstoreAdapter } from './kinds/appstore.js';
2
2
  import { cfxAdapter } from './kinds/cfx.js';
3
+ import { cometAdapter } from './kinds/comet.js';
3
4
  import { epicAdapter } from './kinds/epic.js';
4
5
  import { expoAdapter } from './kinds/expo.js';
5
6
  import { keystoreAdapter } from './kinds/keystore.js';
7
+ import { perplexityAdapter } from './kinds/perplexity.js';
6
8
  import { playAdapter } from './kinds/play.js';
7
9
  import { steamAdapter } from './kinds/steam.js';
8
10
  import { unityAdapter } from './kinds/unity.js';
@@ -15,4 +17,6 @@ export const ADAPTERS = {
15
17
  play: playAdapter,
16
18
  expo: expoAdapter,
17
19
  appstore: appstoreAdapter,
20
+ perplexity: perplexityAdapter,
21
+ comet: cometAdapter,
18
22
  };
@@ -9,9 +9,11 @@ export declare const DeliveredSchema: z.ZodObject<{
9
9
  play: "play";
10
10
  expo: "expo";
11
11
  appstore: "appstore";
12
- cfx: "cfx";
13
12
  steam: "steam";
14
13
  epic: "epic";
14
+ cfx: "cfx";
15
+ perplexity: "perplexity";
16
+ comet: "comet";
15
17
  }> & z.core.$partial, z.ZodString>;
16
18
  leased: z.ZodArray<z.ZodEnum<{
17
19
  unity: "unity";
@@ -19,9 +21,11 @@ export declare const DeliveredSchema: z.ZodObject<{
19
21
  play: "play";
20
22
  expo: "expo";
21
23
  appstore: "appstore";
22
- cfx: "cfx";
23
24
  steam: "steam";
24
25
  epic: "epic";
26
+ cfx: "cfx";
27
+ perplexity: "perplexity";
28
+ comet: "comet";
25
29
  }>>;
26
30
  }, z.core.$strip>;
27
31
  export type Delivered = z.output<typeof DeliveredSchema>;
@@ -1,2 +1,9 @@
1
+ import type { Payload } from '../../../shared/accounts/index.js';
1
2
  import { type GuestAdapter } from '../adapter.js';
3
+ /** The cfg FXServer reads with +exec (forward slashes: FXServer's exec takes them). */
4
+ export declare function cfxSecretsFile(dir?: string): string;
5
+ /** The cfg's text. The payload's patterns allow no quotes or line breaks, so the values cannot escape their line. */
6
+ export declare function cfxSecretsText(p: Payload<'cfx'>): string;
7
+ /** Writes the cfg into `dir` (only there); returns its path. */
8
+ export declare function writeCfxSecrets(p: Payload<'cfx'>, dir?: string): string;
2
9
  export declare const cfxAdapter: GuestAdapter<'cfx'>;
@@ -1,7 +1,37 @@
1
- import { notAvailableYet } from '../adapter.js';
1
+ // Cfx.re: the server licence key (and the optional Steam Web API key) go into one cfg on the sandbox's own disk
2
+ // (secretDir: %LOCALAPPDATA%\AgentSandbox\accounts\cfx, wiped with the sandbox) that `sbx-fivem serve` hands FXServer
3
+ // with +exec before the project's server.cfg. Never into the project, the data disk or the tools folder; not in the
4
+ // agent's environment either. It never comes back (the key does not change in the sandbox).
5
+ import fs from 'node:fs';
6
+ import path from 'node:path';
7
+ import { secretDir } from '../adapter.js';
8
+ /** The cfg FXServer reads with +exec (forward slashes: FXServer's exec takes them). */
9
+ export function cfxSecretsFile(dir = secretDir('cfx')) {
10
+ return path.join(dir, 'server-secrets.cfg');
11
+ }
12
+ /** The cfg's text. The payload's patterns allow no quotes or line breaks, so the values cannot escape their line. */
13
+ export function cfxSecretsText(p) {
14
+ return [
15
+ '# Written by the sandbox at boot from your saved Cfx.re key (sandbox account login cfx). It lives on the',
16
+ "# sandbox's own disk and goes when it closes: never copy these lines into a project or a server.cfg.",
17
+ 'sv_licenseKey "' + p.licenseKey + '"',
18
+ ...(p.steamWebApiKey ? ['set steam_webApiKey "' + p.steamWebApiKey + '"'] : []),
19
+ '',
20
+ ].join('\r\n');
21
+ }
22
+ /** Writes the cfg into `dir` (only there); returns its path. */
23
+ export function writeCfxSecrets(p, dir = secretDir('cfx')) {
24
+ const file = cfxSecretsFile(dir);
25
+ fs.mkdirSync(dir, { recursive: true });
26
+ fs.writeFileSync(file, cfxSecretsText(p), { encoding: 'utf8', mode: 0o600 });
27
+ return file;
28
+ }
2
29
  export const cfxAdapter = {
3
30
  kind: 'cfx',
4
- apply(_p) {
5
- return notAvailableYet('cfx');
31
+ apply(p) {
32
+ writeCfxSecrets(p);
33
+ return {
34
+ summary: 'Cfx.re: the server key is ready for sbx-fivem serve' + (p.steamWebApiKey ? ' (with a Steam Web API key)' : ''),
35
+ };
6
36
  },
7
37
  };
@@ -0,0 +1,7 @@
1
+ import { type CometPayload } from '../../../shared/accounts/index.js';
2
+ import { type GuestAdapter } from '../adapter.js';
3
+ /** Where the sign-in waits for Comet. */
4
+ export declare function cometPendingFile(root?: string): string;
5
+ /** The sign-in waiting for Comet, or null (none, or not the expected shape). */
6
+ export declare function takePendingComet(root?: string): CometPayload | null;
7
+ export declare const cometAdapter: GuestAdapter<'comet'>;
@@ -0,0 +1,50 @@
1
+ // Comet: the saved perplexity.ai sign-in cookies wait in secretDir('comet') (the sandbox's own disk) until the apps
2
+ // step has Comet ready, which writes them into its profile over DevTools and deletes the file. While the sandbox runs,
3
+ // the watch asks the running Comet for its perplexity.ai cookies, so a sign-in made here (or renewed) is kept for the
4
+ // next sandbox. When Comet is not running, the last sign-in seen stands.
5
+ import fs from 'node:fs';
6
+ import path from 'node:path';
7
+ import { cometSummary, PAYLOADS } from '../../../shared/accounts/index.js';
8
+ import { readBoundedFile } from '../../../shared/io/bounded.js';
9
+ import { readCometSignIn } from '../../browser/comet.js';
10
+ import { secretDir } from '../adapter.js';
11
+ /** Where the sign-in waits for Comet. */
12
+ export function cometPendingFile(root = secretDir('comet')) {
13
+ return path.join(root, 'restore.json');
14
+ }
15
+ /** The sign-in waiting for Comet, or null (none, or not the expected shape). */
16
+ export function takePendingComet(root) {
17
+ const file = cometPendingFile(root);
18
+ const bytes = readBoundedFile(file, 512 * 1024);
19
+ fs.rmSync(file, { force: true });
20
+ if (!bytes)
21
+ return null;
22
+ try {
23
+ const parsed = PAYLOADS.comet.safeParse(JSON.parse(bytes.toString('utf8')));
24
+ return parsed.success ? parsed.data : null;
25
+ }
26
+ catch {
27
+ return null; // Not JSON: nothing to restore.
28
+ }
29
+ }
30
+ /** The last sign-in seen in this process (the daemon's watch). */
31
+ let held = null;
32
+ export const cometAdapter = {
33
+ kind: 'comet',
34
+ apply(p) {
35
+ const file = cometPendingFile();
36
+ fs.mkdirSync(path.dirname(file), { recursive: true });
37
+ fs.writeFileSync(file, JSON.stringify(p), { encoding: 'utf8', mode: 0o600 });
38
+ held = p;
39
+ return { summary: 'Comet: your saved sign-in (' + cometSummary(p) + ') goes into its profile once it is ready' };
40
+ },
41
+ async refresh() {
42
+ const now = await readCometSignIn();
43
+ if (now)
44
+ held = now;
45
+ },
46
+ current() {
47
+ return held;
48
+ },
49
+ checkMs: 120_000,
50
+ };
@@ -0,0 +1,2 @@
1
+ import type { GuestAdapter } from '../adapter.js';
2
+ export declare const perplexityAdapter: GuestAdapter<'perplexity'>;
@@ -0,0 +1,12 @@
1
+ // Perplexity: the API key becomes PERPLEXITY_API_KEY in the agent's environment, in memory only. Nothing is written
2
+ // to a file: the MCP servers read the variable (Claude Code passes its environment on; Codex is told its name).
3
+ import { PERPLEXITY_ENV, perplexitySummary } from '../../../shared/accounts/index.js';
4
+ export const perplexityAdapter = {
5
+ kind: 'perplexity',
6
+ apply(p) {
7
+ return {
8
+ env: { [PERPLEXITY_ENV]: p.apiKey },
9
+ summary: 'Perplexity API key (' + perplexitySummary(p) + ') in ' + PERPLEXITY_ENV + ' for the agent',
10
+ };
11
+ },
12
+ };
@@ -21,6 +21,8 @@ export declare class AccountWatch {
21
21
  /** The kinds being watched. */
22
22
  watched(): readonly ServiceKind[];
23
23
  start(): void;
24
+ /** Lets an adapter that answers asynchronously ask its tool first, then looks; never throws. */
25
+ private look;
24
26
  /** One look at one kind; true when a handoff was written. */
25
27
  check(kind: ServiceKind): boolean;
26
28
  /** Looks at every kind now; with `final` (the sandbox stops) each adapter also lets go of what it holds. */
@@ -33,11 +33,21 @@ export class AccountWatch {
33
33
  }
34
34
  start() {
35
35
  for (const kind of this.kinds) {
36
- const timer = setInterval(() => this.check(kind), this.adapter(kind).checkMs ?? DEFAULT_CHECK_MS);
36
+ const timer = setInterval(() => void this.look(kind), this.adapter(kind).checkMs ?? DEFAULT_CHECK_MS);
37
37
  timer.unref();
38
38
  this.timers.push(timer);
39
39
  }
40
40
  }
41
+ /** Lets an adapter that answers asynchronously ask its tool first, then looks; never throws. */
42
+ async look(kind) {
43
+ try {
44
+ await this.adapter(kind).refresh?.();
45
+ }
46
+ catch (e) {
47
+ this.o.warn?.(SERVICE_SPECS[kind].label + ' sign-in: could not read it: ' + errMsg(e));
48
+ }
49
+ return this.check(kind);
50
+ }
41
51
  /** One look at one kind; true when a handoff was written. */
42
52
  check(kind) {
43
53
  try {
@@ -61,7 +71,7 @@ export class AccountWatch {
61
71
  /** Looks at every kind now; with `final` (the sandbox stops) each adapter also lets go of what it holds. */
62
72
  async flush(final = false) {
63
73
  for (const kind of this.kinds)
64
- this.check(kind);
74
+ await this.look(kind);
65
75
  if (!final)
66
76
  return;
67
77
  for (const timer of this.timers)
@@ -6,7 +6,7 @@ import { SYSTEM } from '../../shared/system.js';
6
6
  import { setupUv, uvVars } from '../toolchains/runtimes.js';
7
7
  import { emptyEnv } from '../toolchains/tool-env.js';
8
8
  import { dryRun, hostToolsDir, isWin, toolsDir } from '../runtime/paths.js';
9
- import { execAsync } from '../runtime/process.js';
9
+ import { execHeavy as execAsync } from '../runtime/pools.js';
10
10
  import { exists, mkdirp } from '../runtime/fs.js';
11
11
  import { log, warn } from '../runtime/log.js';
12
12
  import { session } from '../runtime/session.js';
@@ -1,4 +1,6 @@
1
1
  import type { Harness } from '../../core/types.js';
2
+ /** The boot's linkProfileDirs without blocking the event loop. */
3
+ export declare function linkProfileDirsAsync(agents: Readonly<Record<string, readonly string[] | undefined>>): Promise<void>;
2
4
  /** Makes the profile folders of these agents junctions into state\<agent>\profile; one failure never stops the boot. */
3
5
  export declare function linkProfileDirs(agents: Readonly<Record<string, readonly string[] | undefined>>): void;
4
6
  /** The same for one agent, when it is installed (the daemon starts agents the boot did not know). */
@@ -1,16 +1,30 @@
1
1
  import { profileLinkPairs } from '../../shared/paths/index.js';
2
2
  import { dryRun, isWin, testMode } from '../runtime/paths.js';
3
- import { runScriptWithJson } from '../runtime/process.js';
3
+ import { runScriptWithJson, runScriptWithJsonAsync } from '../runtime/process.js';
4
4
  import { stateDir } from '../runtime/session.js';
5
5
  import { log, warn } from '../runtime/log.js';
6
6
  import { errMsg } from '../../core/util/errors.js';
7
7
  /** The sandbox's own user profile folder (not a setting: the guest's account). */
8
8
  const profileRoot = () => process.env.USERPROFILE ?? '';
9
+ const linkPairs = (agents) => !isWin || dryRun || testMode || !profileRoot()
10
+ ? []
11
+ : Object.entries(agents).flatMap(([agent, dirs]) => dirs?.length ? profileLinkPairs(agent, dirs, profileRoot(), stateDir) : []);
12
+ /** The boot's linkProfileDirs without blocking the event loop. */
13
+ export async function linkProfileDirsAsync(agents) {
14
+ const pairs = linkPairs(agents);
15
+ if (!pairs.length)
16
+ return;
17
+ try {
18
+ await runScriptWithJsonAsync('link-profile-dirs.ps1', 'PairsFile', pairs);
19
+ log('Agent logins kept: ' + pairs.length + ' profile folder(s) linked into persistent storage.');
20
+ }
21
+ catch (e) {
22
+ warn('Could not link the agent profile folders (their logins will not be kept): ' + errMsg(e));
23
+ }
24
+ }
9
25
  /** Makes the profile folders of these agents junctions into state\<agent>\profile; one failure never stops the boot. */
10
26
  export function linkProfileDirs(agents) {
11
- if (!isWin || dryRun || testMode || !profileRoot())
12
- return;
13
- const pairs = Object.entries(agents).flatMap(([agent, dirs]) => dirs?.length ? profileLinkPairs(agent, dirs, profileRoot(), stateDir) : []);
27
+ const pairs = linkPairs(agents);
14
28
  if (!pairs.length)
15
29
  return;
16
30
  try {