windows-development-sandbox 1.18.4 → 1.23.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 (438) hide show
  1. package/README.md +1 -1
  2. package/config.example.json +17 -1
  3. package/dist/app/features/access/access.def.js +5 -2
  4. package/dist/app/features/access/access.run.js +7 -3
  5. package/dist/app/features/accounts/accounts.def.d.ts +33 -1
  6. package/dist/app/features/accounts/accounts.def.js +10 -4
  7. package/dist/app/features/accounts/accounts.run.d.ts +2 -0
  8. package/dist/app/features/accounts/accounts.run.js +7 -2
  9. package/dist/app/features/accounts/services.def.d.ts +7 -1
  10. package/dist/app/features/accounts/services.def.js +19 -16
  11. package/dist/app/features/accounts/services.run.d.ts +2 -0
  12. package/dist/app/features/accounts/services.run.js +44 -16
  13. package/dist/app/features/agent-commands/agent-commands.def.d.ts +37 -0
  14. package/dist/app/features/agent-commands/agent-commands.def.js +91 -0
  15. package/dist/app/features/agent-commands/agent-commands.run.d.ts +28 -0
  16. package/dist/app/features/agent-commands/agent-commands.run.js +35 -0
  17. package/dist/app/features/agent-commands/index.d.ts +2 -0
  18. package/dist/app/features/agent-commands/index.js +3 -0
  19. package/dist/app/features/agents/agents.def.d.ts +14 -1
  20. package/dist/app/features/agents/agents.def.js +61 -6
  21. package/dist/app/features/agents/agents.run.d.ts +1 -0
  22. package/dist/app/features/agents/agents.run.js +8 -1
  23. package/dist/app/features/agents/claude-env.def.d.ts +36 -0
  24. package/dist/app/features/agents/claude-env.def.js +305 -0
  25. package/dist/app/features/agents/env.def.d.ts +163 -0
  26. package/dist/app/features/agents/env.def.js +184 -0
  27. package/dist/app/features/agents/env.run.d.ts +43 -0
  28. package/dist/app/features/agents/env.run.js +86 -0
  29. package/dist/app/features/agents/index.d.ts +2 -0
  30. package/dist/app/features/agents/index.js +2 -0
  31. package/dist/app/features/defs.d.ts +171 -3
  32. package/dist/app/features/defs.js +9 -0
  33. package/dist/app/features/engine/engine.run.js +1 -1
  34. package/dist/app/features/github/github.def.d.ts +44 -3
  35. package/dist/app/features/github/github.def.js +145 -63
  36. package/dist/app/features/github/github.run.d.ts +9 -2
  37. package/dist/app/features/github/github.run.js +43 -5
  38. package/dist/app/features/health/health.def.js +8 -2
  39. package/dist/app/features/logs/logs.def.js +0 -8
  40. package/dist/app/features/projects/projects.def.js +2 -2
  41. package/dist/app/features/projects/projects.run.js +5 -5
  42. package/dist/app/features/sandbox/sandbox.def.js +7 -3
  43. package/dist/app/features/sessions/sessions.def.d.ts +4 -4
  44. package/dist/app/features/sessions/sessions.def.js +0 -5
  45. package/dist/app/features/sessions/sessions.run.d.ts +1 -1
  46. package/dist/app/features/sessions/sessions.run.js +2 -2
  47. package/dist/app/features/settings/categories.def.js +7 -2
  48. package/dist/app/features/settings/settings-rows.js +6 -2
  49. package/dist/app/features/settings/settings.def.js +1 -1
  50. package/dist/app/features/settings/settings.run.d.ts +8 -0
  51. package/dist/app/features/settings/settings.run.js +12 -3
  52. package/dist/app/features/storage/storage.run.js +18 -9
  53. package/dist/app/features/updates/update-lines.js +2 -2
  54. package/dist/app/features/updates/updates.def.js +1 -1
  55. package/dist/app/features/updates/updates.run.js +13 -3
  56. package/dist/app/features/vpn/vpn.def.d.ts +33 -0
  57. package/dist/app/features/vpn/vpn.def.js +30 -6
  58. package/dist/app/features/vpn/vpn.run.d.ts +11 -0
  59. package/dist/app/features/vpn/vpn.run.js +4 -1
  60. package/dist/app/features/web/web.def.js +2 -2
  61. package/dist/app/features/web/web.run.js +12 -4
  62. package/dist/app/kernel/errors.d.ts +7 -0
  63. package/dist/app/kernel/errors.js +18 -3
  64. package/dist/app/kernel/rpc.d.ts +6 -1
  65. package/dist/app/kernel/view.d.ts +11 -1
  66. package/dist/app/registry.js +7 -1
  67. package/dist/bin/agent-sandbox.js +2 -2
  68. package/dist/bin/{chunk-N4GXYTLV.js → chunk-JETGP2C3.js} +239 -72
  69. package/dist/bin/{chunk-MY7NLQQY.js → chunk-XZKOPGNH.js} +1 -1
  70. package/dist/bin/{chunk-FRPLQLSY.js → chunk-ZTTOF5V3.js} +6566 -4964
  71. package/dist/bin/claude-host.js +2 -2
  72. package/dist/bin/claude-sbx.js +2 -2
  73. package/dist/bin/codex-sbx.js +2 -2
  74. package/dist/bin/gemini-sbx.js +2 -2
  75. package/dist/bin/sandbox.js +2 -2
  76. package/dist/bin/sbx-hide.js +2 -2
  77. package/dist/bin/sbx-show.js +2 -2
  78. package/dist/cli/commands/agent-commands.d.ts +0 -1
  79. package/dist/cli/commands/agent-commands.js +2 -32
  80. package/dist/cli/commands/index.d.ts +1 -1
  81. package/dist/cli/commands/index.js +1 -1
  82. package/dist/cli/commands/launch/launch.js +2 -2
  83. package/dist/cli/commands/registry.js +3 -2
  84. package/dist/cli/manifest.d.ts +3 -3
  85. package/dist/cli/manifest.js +3 -2
  86. package/dist/cli/menu/coverage-exempt.d.ts +17 -0
  87. package/dist/cli/menu/coverage-exempt.js +61 -0
  88. package/dist/cli/menu/io-menu.d.ts +2 -0
  89. package/dist/cli/menu/io-menu.js +50 -5
  90. package/dist/cli/menu/menu.d.ts +1 -1
  91. package/dist/cli/menu/menu.js +3 -3
  92. package/dist/cli/menu/pages/accounts-page.js +1 -1
  93. package/dist/cli/menu/pages/agents-page.d.ts +7 -2
  94. package/dist/cli/menu/pages/agents-page.js +75 -13
  95. package/dist/cli/menu/pages/maintenance-page.d.ts +6 -0
  96. package/dist/cli/menu/pages/maintenance-page.js +10 -4
  97. package/dist/cli/menu/pages/sessions-page.d.ts +2 -0
  98. package/dist/cli/menu/pages/sessions-page.js +12 -4
  99. package/dist/cli/menu/pages/settings-page.js +13 -1
  100. package/dist/cli/menu/remote-menu.js +1 -1
  101. package/dist/cli/menu/shell.d.ts +5 -0
  102. package/dist/cli/menu/shell.js +13 -0
  103. package/dist/cli/menu/views.js +2 -1
  104. package/dist/cli/report.js +2 -0
  105. package/dist/cli/services/agent-commands-service.d.ts +2 -0
  106. package/dist/cli/services/agent-commands-service.js +13 -7
  107. package/dist/cli/services/vpn-service.d.ts +5 -1
  108. package/dist/cli/services/vpn-service.js +6 -1
  109. package/dist/cli/tui/app.d.ts +5 -0
  110. package/dist/cli/tui/app.js +2 -0
  111. package/dist/cli/tui/dialogs/text-screen.js +2 -1
  112. package/dist/cli/tui/terminal.js +3 -1
  113. package/dist/core/config/defaults.js +12 -1
  114. package/dist/core/detect/toolchains.js +9 -0
  115. package/dist/core/disk.d.ts +1 -5
  116. package/dist/core/disk.js +1 -16
  117. package/dist/core/schema/accounts.d.ts +6 -0
  118. package/dist/core/schema/accounts.js +13 -11
  119. package/dist/core/schema/codex.d.ts +29 -0
  120. package/dist/core/schema/codex.js +24 -0
  121. package/dist/core/schema/config.d.ts +58 -14
  122. package/dist/core/schema/config.js +6 -4
  123. package/dist/core/schema/github.js +1 -1
  124. package/dist/core/schema/index.d.ts +1 -0
  125. package/dist/core/schema/index.js +1 -0
  126. package/dist/core/schema/profile.js +8 -4
  127. package/dist/core/schema/resume.js +1 -1
  128. package/dist/core/schema/sandbox.js +3 -3
  129. package/dist/core/schema/toolchains.d.ts +4 -0
  130. package/dist/core/schema/toolchains.js +3 -0
  131. package/dist/core/schema/vpn.js +1 -1
  132. package/dist/core/schema/web.js +3 -3
  133. package/dist/core/types.d.ts +8 -0
  134. package/dist/core/util/errors.d.ts +11 -1
  135. package/dist/core/util/errors.js +7 -1
  136. package/dist/core/util/index.d.ts +1 -1
  137. package/dist/core/util/index.js +1 -1
  138. package/dist/guest/accounts/adapter.d.ts +2 -0
  139. package/dist/guest/accounts/adapters.js +4 -0
  140. package/dist/guest/accounts/apply.d.ts +10 -6
  141. package/dist/guest/accounts/kinds/cfx.d.ts +7 -0
  142. package/dist/guest/accounts/kinds/cfx.js +33 -3
  143. package/dist/guest/accounts/kinds/comet.d.ts +7 -0
  144. package/dist/guest/accounts/kinds/comet.js +50 -0
  145. package/dist/guest/accounts/kinds/perplexity.d.ts +2 -0
  146. package/dist/guest/accounts/kinds/perplexity.js +12 -0
  147. package/dist/guest/accounts/watch.d.ts +2 -0
  148. package/dist/guest/accounts/watch.js +12 -2
  149. package/dist/guest/agents/agent-files.d.ts +26 -6
  150. package/dist/guest/agents/agent-files.js +84 -14
  151. package/dist/guest/agents/agent-installer.js +1 -1
  152. package/dist/guest/agents/local-state.d.ts +5 -2
  153. package/dist/guest/agents/local-state.js +24 -10
  154. package/dist/guest/agents/profile-links.d.ts +2 -0
  155. package/dist/guest/agents/profile-links.js +18 -4
  156. package/dist/guest/apps/after-install.js +19 -0
  157. package/dist/guest/apps/app-installer.d.ts +11 -0
  158. package/dist/guest/apps/app-installer.js +69 -6
  159. package/dist/guest/apps/comet-unpack.d.ts +20 -0
  160. package/dist/guest/apps/comet-unpack.js +127 -0
  161. package/dist/guest/apps/index.d.ts +1 -1
  162. package/dist/guest/apps/index.js +1 -1
  163. package/dist/guest/apps/resolvers-agents-web.d.ts +2 -0
  164. package/dist/guest/apps/resolvers-agents-web.js +7 -0
  165. package/dist/guest/apps/resolvers.js +2 -0
  166. package/dist/guest/apps/shortcuts.d.ts +2 -0
  167. package/dist/guest/apps/shortcuts.js +1 -0
  168. package/dist/guest/apps/unpack.js +14 -4
  169. package/dist/guest/boot/boot.d.ts +45 -16
  170. package/dist/guest/boot/boot.js +325 -149
  171. package/dist/guest/boot/graph.d.ts +252 -0
  172. package/dist/guest/boot/graph.js +257 -0
  173. package/dist/guest/boot/guide-lines.d.ts +25 -0
  174. package/dist/guest/boot/guide-lines.js +41 -0
  175. package/dist/guest/boot/guide.d.ts +1 -4
  176. package/dist/guest/boot/guide.js +6 -8
  177. package/dist/guest/boot/runner.d.ts +77 -0
  178. package/dist/guest/boot/runner.js +215 -0
  179. package/dist/guest/browser/cdp.d.ts +71 -0
  180. package/dist/guest/browser/cdp.js +306 -0
  181. package/dist/guest/browser/comet.d.ts +28 -0
  182. package/dist/guest/browser/comet.js +155 -0
  183. package/dist/guest/daemon/project-provisioner.js +6 -1
  184. package/dist/guest/daemon/sessions.js +2 -1
  185. package/dist/guest/devtools/fivem.d.ts +1 -1
  186. package/dist/guest/devtools/fivem.js +243 -3
  187. package/dist/guest/entries/daemon.js +2 -0
  188. package/dist/guest/runtime/log.d.ts +12 -0
  189. package/dist/guest/runtime/log.js +29 -5
  190. package/dist/guest/runtime/pools.d.ts +24 -0
  191. package/dist/guest/runtime/pools.js +60 -0
  192. package/dist/guest/runtime/process.d.ts +4 -0
  193. package/dist/guest/runtime/process.js +38 -1
  194. package/dist/guest/runtime/status.d.ts +5 -1
  195. package/dist/guest/runtime/status.js +19 -0
  196. package/dist/guest/setup/addon-mcp.d.ts +1 -1
  197. package/dist/guest/setup/addon-mcp.js +52 -12
  198. package/dist/guest/setup/agent-addons.d.ts +3 -2
  199. package/dist/guest/setup/agent-addons.js +12 -3
  200. package/dist/guest/setup/environment.d.ts +1 -1
  201. package/dist/guest/setup/environment.js +25 -12
  202. package/dist/guest/setup/headroom.d.ts +8 -3
  203. package/dist/guest/setup/headroom.js +44 -15
  204. package/dist/guest/setup/path-plan.d.ts +28 -0
  205. package/dist/guest/setup/path-plan.js +69 -2
  206. package/dist/guest/setup/shell-path.d.ts +1 -1
  207. package/dist/guest/setup/shell-path.js +3 -3
  208. package/dist/guest/toolchains/fivem/artifacts.d.ts +48 -1
  209. package/dist/guest/toolchains/fivem/artifacts.js +97 -4
  210. package/dist/guest/toolchains/fivem/fivem.d.ts +32 -1
  211. package/dist/guest/toolchains/fivem/fivem.js +168 -3
  212. package/dist/guest/toolchains/fivem/scaffold.d.ts +35 -0
  213. package/dist/guest/toolchains/fivem/scaffold.js +105 -0
  214. package/dist/guest/toolchains/fivem/serve-plan.d.ts +34 -0
  215. package/dist/guest/toolchains/fivem/serve-plan.js +61 -0
  216. package/dist/guest/toolchains/installers.d.ts +6 -10
  217. package/dist/guest/toolchains/installers.js +4 -12
  218. package/dist/guest/toolchains/languages/go.js +1 -1
  219. package/dist/guest/toolchains/languages/node.js +2 -1
  220. package/dist/guest/toolchains/languages/php.d.ts +2 -0
  221. package/dist/guest/toolchains/languages/php.js +13 -1
  222. package/dist/guest/toolchains/languages/python-tools.js +1 -1
  223. package/dist/guest/toolchains/languages/ruby.js +1 -1
  224. package/dist/guest/toolchains/native/autosdk.d.ts +3 -0
  225. package/dist/guest/toolchains/native/autosdk.js +50 -0
  226. package/dist/guest/toolchains/native/binstall.js +1 -1
  227. package/dist/guest/toolchains/native/msvc/packages.js +10 -4
  228. package/dist/guest/toolchains/native/rust.d.ts +2 -0
  229. package/dist/guest/toolchains/native/rust.js +11 -4
  230. package/dist/guest/toolchains/native/unreal.d.ts +2 -0
  231. package/dist/guest/toolchains/native/unreal.js +19 -6
  232. package/dist/guest/toolchains/native/vcruntime.d.ts +2 -3
  233. package/dist/guest/toolchains/native/vcruntime.js +12 -7
  234. package/dist/guest/toolchains/native/visual-studio.d.ts +5 -2
  235. package/dist/guest/toolchains/native/visual-studio.js +127 -25
  236. package/dist/guest/toolchains/native/vs-request.d.ts +23 -0
  237. package/dist/guest/toolchains/native/vs-request.js +62 -1
  238. package/dist/guest/toolchains/not-yet.d.ts +1 -1
  239. package/dist/guest/toolchains/not-yet.js +3 -3
  240. package/dist/guest/toolchains/persisted.js +2 -7
  241. package/dist/guest/toolchains/plan.js +27 -11
  242. package/dist/guest/toolchains/scheduler.d.ts +2 -21
  243. package/dist/guest/toolchains/scheduler.js +7 -121
  244. package/dist/guest/toolchains/setup.d.ts +15 -2
  245. package/dist/guest/toolchains/setup.js +39 -20
  246. package/dist/guest/toolchains/signature.d.ts +5 -0
  247. package/dist/guest/toolchains/signature.js +22 -0
  248. package/dist/guest/toolchains/split.d.ts +28 -0
  249. package/dist/guest/toolchains/split.js +60 -0
  250. package/dist/guest/toolchains/steam/client.js +2 -1
  251. package/dist/guest/toolchains/step-scheduler.d.ts +51 -0
  252. package/dist/guest/toolchains/step-scheduler.js +147 -0
  253. package/dist/guest/toolchains/step.d.ts +13 -0
  254. package/dist/guest/toolchains/tools/git.js +18 -0
  255. package/dist/guest/vpn/openvpn.js +3 -4
  256. package/dist/guest/vpn/tunnel.d.ts +3 -0
  257. package/dist/guest/vpn/tunnel.js +10 -12
  258. package/dist/guest/vpn/vpn.js +6 -1
  259. package/dist/guest/vpn/wireguard.js +11 -4
  260. package/dist/host/accounts/deliver.js +7 -0
  261. package/dist/host/accounts/handoff.js +2 -6
  262. package/dist/host/accounts/index.d.ts +1 -1
  263. package/dist/host/accounts/index.js +1 -1
  264. package/dist/host/accounts/kinds/cfx.d.ts +1 -1
  265. package/dist/host/accounts/kinds/cfx.js +47 -4
  266. package/dist/host/accounts/kinds/comet.d.ts +2 -0
  267. package/dist/host/accounts/kinds/comet.js +6 -0
  268. package/dist/host/accounts/kinds/perplexity.d.ts +2 -0
  269. package/dist/host/accounts/kinds/perplexity.js +30 -0
  270. package/dist/host/accounts/leases.d.ts +9 -3
  271. package/dist/host/accounts/leases.js +13 -2
  272. package/dist/host/accounts/source.d.ts +7 -1
  273. package/dist/host/accounts/source.js +28 -1
  274. package/dist/host/accounts/sources.js +4 -0
  275. package/dist/host/agent-commands/commands.js +1 -1
  276. package/dist/host/agent-commands/forwarders.d.ts +14 -2
  277. package/dist/host/agent-commands/forwarders.js +31 -13
  278. package/dist/host/agent-commands/reconcile.d.ts +2 -1
  279. package/dist/host/agent-commands/reconcile.js +7 -8
  280. package/dist/host/agent-commands/user-path.d.ts +5 -0
  281. package/dist/host/agent-commands/user-path.js +13 -0
  282. package/dist/host/github/deliver.d.ts +1 -1
  283. package/dist/host/github/deliver.js +20 -1
  284. package/dist/host/github/index.d.ts +2 -1
  285. package/dist/host/github/index.js +1 -0
  286. package/dist/host/github/token.d.ts +13 -1
  287. package/dist/host/github/token.js +19 -2
  288. package/dist/host/github/verify.d.ts +27 -0
  289. package/dist/host/github/verify.js +61 -0
  290. package/dist/host/launch/hints/fivem.d.ts +3 -1
  291. package/dist/host/launch/hints/fivem.js +68 -2
  292. package/dist/host/launch/session-file.js +5 -0
  293. package/dist/host/launch/toolchains.d.ts +2 -1
  294. package/dist/host/launch/toolchains.js +5 -3
  295. package/dist/host/profile/accounts.js +2 -4
  296. package/dist/host/profile/claude-login.d.ts +3 -2
  297. package/dist/host/profile/claude-login.js +3 -13
  298. package/dist/host/vpn/index.d.ts +2 -1
  299. package/dist/host/vpn/index.js +2 -1
  300. package/dist/host/vpn/last.d.ts +28 -0
  301. package/dist/host/vpn/last.js +43 -0
  302. package/dist/host/vpn/login.d.ts +3 -1
  303. package/dist/host/vpn/login.js +17 -3
  304. package/dist/host/vpn/nordvpn.d.ts +2 -4
  305. package/dist/host/vpn/nordvpn.js +2 -24
  306. package/dist/runtime/agent.js +433 -90
  307. package/dist/runtime/daemon.js +3378 -1546
  308. package/dist/runtime/db.js +363 -90
  309. package/dist/runtime/main.js +5134 -2096
  310. package/dist/runtime/netproxy.js +308 -69
  311. package/dist/runtime/tool.js +2867 -1765
  312. package/dist/runtime/view.js +308 -69
  313. package/dist/selftest/agent-commands.test.js +45 -7
  314. package/dist/selftest/agent-paths.test.js +40 -13
  315. package/dist/selftest/agent-settings.test.d.ts +2 -0
  316. package/dist/selftest/agent-settings.test.js +94 -0
  317. package/dist/selftest/agents-web.test.d.ts +2 -0
  318. package/dist/selftest/agents-web.test.js +647 -0
  319. package/dist/selftest/app.test.js +7 -3
  320. package/dist/selftest/boot-runner.test.d.ts +2 -0
  321. package/dist/selftest/boot-runner.test.js +456 -0
  322. package/dist/selftest/channel.test.js +15 -0
  323. package/dist/selftest/cli.test.js +4 -0
  324. package/dist/selftest/fivem.test.js +249 -3
  325. package/dist/selftest/github.test.js +94 -9
  326. package/dist/selftest/guest-boot.test.js +3 -0
  327. package/dist/selftest/health.test.js +1 -1
  328. package/dist/selftest/index.js +10 -0
  329. package/dist/selftest/layout.test.js +5 -0
  330. package/dist/selftest/menu-coverage.test.d.ts +2 -0
  331. package/dist/selftest/menu-coverage.test.js +46 -0
  332. package/dist/selftest/menu-screens.js +37 -1
  333. package/dist/selftest/menu.test.js +5 -3
  334. package/dist/selftest/pc-installs.test.js +5 -0
  335. package/dist/selftest/persisted-installs.test.js +72 -0
  336. package/dist/selftest/service-accounts.test.js +3 -2
  337. package/dist/selftest/support/engine-golden.js +28 -1
  338. package/dist/selftest/support/fixtures.d.ts +15 -0
  339. package/dist/selftest/support/web-preview.d.ts +34 -1
  340. package/dist/selftest/support/web-preview.js +21 -18
  341. package/dist/selftest/toolchains.test.js +23 -1
  342. package/dist/selftest/ui-text.test.d.ts +7 -0
  343. package/dist/selftest/ui-text.test.js +300 -0
  344. package/dist/selftest/vpn.test.js +51 -3
  345. package/dist/shared/accounts/anthropic.d.ts +5 -0
  346. package/dist/shared/accounts/anthropic.js +15 -0
  347. package/dist/shared/accounts/index.d.ts +3 -0
  348. package/dist/shared/accounts/index.js +3 -0
  349. package/dist/shared/accounts/kinds/comet.d.ts +12 -0
  350. package/dist/shared/accounts/kinds/comet.js +64 -0
  351. package/dist/shared/accounts/kinds/perplexity.d.ts +8 -0
  352. package/dist/shared/accounts/kinds/perplexity.js +37 -0
  353. package/dist/shared/accounts/kinds.d.ts +24 -5
  354. package/dist/shared/accounts/kinds.js +86 -4
  355. package/dist/shared/accounts/payloads.d.ts +81 -0
  356. package/dist/shared/accounts/payloads.js +39 -1
  357. package/dist/shared/apps/agent-addons.d.ts +33 -5
  358. package/dist/shared/apps/agent-addons.js +95 -3
  359. package/dist/shared/apps/catalogue-agents-web.d.ts +14 -0
  360. package/dist/shared/apps/catalogue-agents-web.js +112 -0
  361. package/dist/shared/apps/catalogue-modding.js +32 -1
  362. package/dist/shared/apps/catalogue.d.ts +27 -3
  363. package/dist/shared/apps/catalogue.js +2 -1
  364. package/dist/shared/apps/index.d.ts +3 -1
  365. package/dist/shared/apps/index.js +3 -1
  366. package/dist/shared/channel/schema.d.ts +40 -3
  367. package/dist/shared/channel/schema.js +9 -0
  368. package/dist/shared/channel/secrets.d.ts +19 -0
  369. package/dist/shared/concurrency/index.d.ts +3 -0
  370. package/dist/shared/concurrency/index.js +3 -0
  371. package/dist/shared/concurrency/installer-retry.d.ts +6 -0
  372. package/dist/shared/concurrency/installer-retry.js +10 -0
  373. package/dist/shared/concurrency/limiter.d.ts +19 -0
  374. package/dist/shared/concurrency/limiter.js +67 -0
  375. package/dist/shared/concurrency/pools.d.ts +7 -0
  376. package/dist/shared/concurrency/pools.js +9 -0
  377. package/dist/shared/download/archive.d.ts +2 -0
  378. package/dist/shared/download/archive.js +11 -1
  379. package/dist/shared/download/bounded-fetch.d.ts +13 -0
  380. package/dist/shared/download/bounded-fetch.js +40 -0
  381. package/dist/shared/download/downloader.d.ts +5 -0
  382. package/dist/shared/download/downloader.js +50 -38
  383. package/dist/shared/download/index.d.ts +2 -1
  384. package/dist/shared/download/index.js +2 -1
  385. package/dist/shared/io/disk.d.ts +9 -0
  386. package/dist/shared/io/disk.js +19 -0
  387. package/dist/shared/io/index.d.ts +1 -0
  388. package/dist/shared/io/index.js +1 -0
  389. package/dist/shared/readiness.d.ts +9 -0
  390. package/dist/shared/readiness.js +11 -0
  391. package/dist/shared/signer.d.ts +24 -0
  392. package/dist/shared/signer.js +15 -0
  393. package/dist/shared/vpn/failure.d.ts +10 -0
  394. package/dist/shared/vpn/failure.js +28 -0
  395. package/dist/sync/watcher.js +2 -0
  396. package/dist/web/index.html +1 -1
  397. package/dist/web/{main-GVZWWP4I.js → main-CCILLX2M.js} +75 -74
  398. package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
  399. package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
  400. package/native/csharp/HostTools/Program.cs +14 -1
  401. package/native/csharp/HostTools/UserPath.cs +17 -0
  402. package/native/csharp/StorageHelper/AssemblyInfo.cs +3 -3
  403. package/native/scripts/edit-user-path.ps1 +6 -2
  404. package/package.json +1 -1
  405. package/sandbox/addons/browser-use-mcp/requirements.in +1 -0
  406. package/sandbox/addons/browser-use-mcp/requirements.txt +2350 -0
  407. package/sandbox/addons/chrome-devtools-mcp/package-lock.json +38 -0
  408. package/sandbox/addons/chrome-devtools-mcp/package.json +7 -0
  409. package/sandbox/addons/comet-mcp/package-lock.json +1277 -0
  410. package/sandbox/addons/comet-mcp/package.json +7 -0
  411. package/sandbox/addons/perplexity-mcp/package-lock.json +1655 -0
  412. package/sandbox/addons/perplexity-mcp/package.json +7 -0
  413. package/sandbox/scripts/add-firewall-port.ps1 +18 -4
  414. package/sandbox/scripts/get-signature.ps1 +13 -0
  415. package/sandbox/scripts/set-machine-environment.ps1 +30 -15
  416. package/sandbox/templates/fivem/README.txt +6 -2
  417. package/sandbox/templates/fivem/cs/Client/Client.csproj +15 -0
  418. package/sandbox/templates/fivem/cs/Client/ClientMain.cs +20 -0
  419. package/sandbox/templates/fivem/cs/Server/Server.csproj +14 -0
  420. package/sandbox/templates/fivem/cs/Server/ServerMain.cs +20 -0
  421. package/sandbox/templates/fivem/cs/fxmanifest.lua +11 -0
  422. package/sandbox/templates/fivem/js/client.js +12 -0
  423. package/sandbox/templates/fivem/js/fxmanifest.lua +9 -0
  424. package/sandbox/templates/fivem/js/server.js +6 -0
  425. package/sandbox/templates/fivem/lua/client.lua +8 -0
  426. package/sandbox/templates/fivem/lua/fxmanifest.lua +10 -0
  427. package/sandbox/templates/fivem/lua/server.lua +6 -0
  428. package/sandbox/templates/fivem/server.cfg +37 -0
  429. package/sandbox/templates/fivem/ts/build.js +17 -0
  430. package/sandbox/templates/fivem/ts/fxmanifest.lua +9 -0
  431. package/sandbox/templates/fivem/ts/package.json +16 -0
  432. package/sandbox/templates/fivem/ts/src/client/client.ts +12 -0
  433. package/sandbox/templates/fivem/ts/src/client/tsconfig.json +13 -0
  434. package/sandbox/templates/fivem/ts/src/server/server.ts +6 -0
  435. package/sandbox/templates/fivem/ts/src/server/tsconfig.json +13 -0
  436. package/schemas/config.schema.json +120 -27
  437. package/schemas/sandbox-config.schema.json +45 -14
  438. package/sandbox/scripts/get-signer.ps1 +0 -8
@@ -6,6 +6,7 @@ import { NEVER_LOOSER } from '../../../core/local-config/index.js';
6
6
  import { redactSecrets } from '../../../core/schema/index.js';
7
7
  import { fail } from '../../../core/util/index.js';
8
8
  import { closest } from '../../../cli/validate.js';
9
+ import { isToolchainReady } from '../../../shared/readiness.js';
9
10
  import { fieldOf } from '../../kernel/index.js';
10
11
  import { categoryOf, labelOf, nameOf } from './categories.def.js';
11
12
  /** Every editable setting of a file, each in its category (settings covered by another section are left out). */
@@ -24,7 +25,10 @@ export function settingsOf(file) {
24
25
  section: several && category.id !== 'general' ? nameOf(top) : undefined,
25
26
  },
26
27
  ];
27
- return node.leaves([top]).map(({ key, node: leaf }) => {
28
+ return node
29
+ .leaves([top])
30
+ .filter(({ key }) => top !== 'toolchains' || isToolchainReady(key[1]))
31
+ .map(({ key, node: leaf }) => {
28
32
  const heading = [
29
33
  several ? nameOf(top) : undefined,
30
34
  key.length > 2 ? key.slice(1, -1).map(nameOf).join(' › ') : undefined,
@@ -98,5 +102,5 @@ export function findSetting(file, key) {
98
102
  '"' +
99
103
  (file.isProject ? ' a project can set' : '') +
100
104
  '.' +
101
- (hint ? ' Did you mean ' + hint + '?' : ''), 'Settings are named like sandbox.memoryMb. See them all with: sandbox config show');
105
+ (hint ? ' Did you mean ' + hint + '?' : ''), 'Settings are named like sandbox.memoryMb. Search the Settings page by name to find one.');
102
106
  }
@@ -203,7 +203,7 @@ function dataFolderItem(folder) {
203
203
  label: 'Data folder',
204
204
  hint: folder,
205
205
  cells: { setting: 'storage.root', value: folder },
206
- description: 'Where your tools, logins, history and logs are kept between sandboxes. Move it with sandbox storage move <folder>.',
206
+ description: 'Where your tools, logins, history and logs are kept between sandboxes. Maintenance > Storage moves it.',
207
207
  primary: action(changeDataFolder, {}, { label: 'Data folder', verb: 'change' }),
208
208
  };
209
209
  }
@@ -1,5 +1,7 @@
1
+ import type { Config } from '../../../core/types.js';
1
2
  import { type AppContext } from '../../context.js';
2
3
  import { type SettingsFiles } from './settings-rows.js';
4
+ import { type Scope } from './settings.def.js';
3
5
  /** The file `sandbox config export` writes when none is named. */
4
6
  export declare const DEFAULT_EXPORT = "sandbox-settings.json";
5
7
  /** Your own settings file (the one --config names) and the project file of the current folder. */
@@ -48,6 +50,12 @@ export declare const getSettingRun: import("../../kernel/define.js").Implementat
48
50
  /** The file of a scope, and the setting a key names in it. */
49
51
  /** incoming with every *** that stands where saved has a text replaced by that saved text. Pure. */
50
52
  export declare function keepShownSecrets(saved: unknown, incoming: unknown): unknown;
53
+ /** What brings this PC in line with a changed agentCommands setting (the real service, or a fake in a test). */
54
+ export interface AgentCommandsReconciler {
55
+ reconcile(config: Config): unknown;
56
+ }
57
+ /** After your own settings change: a key under agentCommands also changes this PC (files, PATH), on every surface. */
58
+ export declare function applyAgentCommandsChange(ctx: AppContext, scope: Scope, key: string, service?: AgentCommandsReconciler): void;
51
59
  export declare const setSettingRun: import("../../kernel/define.js").Implementation<import("../../kernel/define.js").OperationDef<import("zod").ZodObject<{
52
60
  scope: import("zod").ZodDefault<import("zod").ZodEnum<{
53
61
  project: "project";
@@ -7,6 +7,7 @@ import { loadConfig } from '../../../core/config/index.js';
7
7
  import { REDACTED, redactSecrets } from '../../../core/schema/index.js';
8
8
  import { fail, safeText, writeJson } from '../../../core/util/index.js';
9
9
  import { hereDir } from '../../../cli/commands/projects/here.js';
10
+ import { AgentCommandsService } from '../../../cli/services/agent-commands-service.js';
10
11
  import { implement } from '../../context.js';
11
12
  import { allowedText, cancelled, valueFromText } from '../../kernel/index.js';
12
13
  import { CATEGORIES } from './categories.def.js';
@@ -66,6 +67,12 @@ function target(ctx, scope, name) {
66
67
  const file = settingsFiles(ctx)[scope];
67
68
  return { ...findSetting(file, name), file };
68
69
  }
70
+ /** After your own settings change: a key under agentCommands also changes this PC (files, PATH), on every surface. */
71
+ export function applyAgentCommandsChange(ctx, scope, key, service = new AgentCommandsService(ctx)) {
72
+ if (scope !== 'user' || !/^agentCommands(\.|$)/.test(key))
73
+ return;
74
+ service.reconcile(freshConfig(ctx));
75
+ }
69
76
  export const setSettingRun = implement(setSetting, (ctx, input) => {
70
77
  const { key, node, file } = target(ctx, input.scope, input.key);
71
78
  if (node.isSection)
@@ -81,6 +88,7 @@ export const setSettingRun = implement(setSetting, (ctx, input) => {
81
88
  const outcome = file.set(key, value);
82
89
  if (typeof outcome === 'object')
83
90
  fail('Could not change ' + input.key + ': ' + outcome.problems.join('; '), 'Nothing was written.');
91
+ applyAgentCommandsChange(ctx, input.scope, input.key);
84
92
  return {
85
93
  key: input.key,
86
94
  changed: outcome === 'saved',
@@ -96,6 +104,7 @@ export const resetSettingRun = implement(resetSetting, (ctx, input) => {
96
104
  const outcome = file.set(key, undefined);
97
105
  if (typeof outcome === 'object')
98
106
  fail('Could not reset ' + input.key + ': ' + outcome.problems.join('; '), 'Nothing was written.');
107
+ applyAgentCommandsChange(ctx, input.scope, input.key);
99
108
  return {
100
109
  key: input.key,
101
110
  changed: outcome === 'saved',
@@ -112,12 +121,12 @@ function freshConfig(ctx) {
112
121
  function readImport(config, file) {
113
122
  const source = path.resolve(file);
114
123
  if (!fs.existsSync(source))
115
- fail('There is no file ' + source + '.', 'Give the path of a file made by sandbox config export.');
124
+ fail('There is no file ' + source + '.', 'Give the path of a file made by Export settings.');
116
125
  if (fs.statSync(source).size > MAX_BYTES)
117
126
  fail(source + ' is too big to be a settings file.');
118
127
  const plan = planImport(fs.readFileSync(source, 'utf8'), config);
119
128
  if (plan.problems.length)
120
- fail(source + ' is not valid settings:\n ' + plan.problems.map(safeText).join('\n '), 'Nothing was changed. Fix the file, or export a new one with: sandbox config export');
129
+ fail(source + ' is not valid settings:\n ' + plan.problems.map(safeText).join('\n '), 'Nothing was changed. Fix the file, or export a new one with Export settings.');
121
130
  return plan;
122
131
  }
123
132
  /** Writes the planned changes to your settings file (comments stay); returns how many settings changed. */
@@ -151,7 +160,7 @@ export const importConfigRun = implement(importConfig, async (ctx, input, io) =>
151
160
  const file = input.settingsFile ??
152
161
  (await io.path({
153
162
  title: 'Which settings file',
154
- lines: ['A file made by Export settings (or sandbox config export).'],
163
+ lines: ['A file made by Export settings (or one exported on the command line).'],
155
164
  pathKind: 'file',
156
165
  }));
157
166
  if (file === undefined)
@@ -7,7 +7,7 @@ import fs from 'node:fs';
7
7
  import path from 'node:path';
8
8
  import { userConfigPath, userDir } from '../../../core/config/index.js';
9
9
  import { humanBytes } from '../../../core/disk.js';
10
- import { expandPath, fail } from '../../../core/util/index.js';
10
+ import { expandPath, fail, failWith } from '../../../core/util/index.js';
11
11
  import { requireOnPc } from '../../../cli/commands/context.js';
12
12
  import { StorageService } from '../../../cli/services/index.js';
13
13
  import { isSandboxRunning, realContainedDeps } from '../../../host/sandbox/index.js';
@@ -26,7 +26,11 @@ function requireAvailable() {
26
26
  }
27
27
  function requireNoSandbox() {
28
28
  if (isSandboxRunning())
29
- fail('A sandbox is running.', 'Close it (sandbox stop) first: the folders in the image are in use.');
29
+ failWith('A sandbox is running.', 'Stop it first: the folders in the image are in use.', {
30
+ op: 'sandbox.stop',
31
+ label: 'Stop the sandbox',
32
+ cli: 'sandbox stop',
33
+ });
30
34
  }
31
35
  function storageFor(ctx) {
32
36
  const { config } = ctx.loaded;
@@ -122,7 +126,7 @@ async function useData(io, service, from, to, ask) {
122
126
  cancelled('Nothing was changed.');
123
127
  }
124
128
  service.use(to);
125
- return 'Your data is now looked for in ' + to + '. Move it later with: sandbox storage move <folder>';
129
+ return 'Your data is now looked for in ' + to + '. Move it later from Maintenance > Storage.';
126
130
  }
127
131
  export const showStorageRun = implement(showStorage, async (ctx, input, io) => {
128
132
  requireOnPc('storage');
@@ -153,7 +157,12 @@ export const moveStorageRun = implement(moveStorage, async (ctx, input, io) => {
153
157
  ? expandPath(input.folder, process.cwd())
154
158
  : await chooseFolder(io, service, 'move', 'Nothing was moved.');
155
159
  if (!fs.existsSync(from))
156
- fail('There is nothing to move: ' + from + ' does not exist.', 'Use sandbox storage use ' + to + ' to switch.');
160
+ failWith('There is nothing to move: ' + from + ' does not exist.', 'Switch to ' + to + ' without moving instead.', {
161
+ op: 'storage.use',
162
+ input: { folder: to },
163
+ label: 'Use ' + to,
164
+ cli: 'sandbox storage use ' + to,
165
+ });
157
166
  return moveData(io, service, from, to, input.keepOld, true);
158
167
  });
159
168
  export const useStorageRun = implement(useStorage, async (ctx, input, io) => {
@@ -271,7 +280,7 @@ export const containedOnRun = implement(containedOn, async (ctx, _input, io) =>
271
280
  noTerminal: { message: NO_TERMINAL, fix: 'Add --yes to turn it on without asking.' },
272
281
  });
273
282
  if (!turnOn)
274
- fail('Nothing was changed.', 'Run sandbox storage contained on when you want it.');
283
+ fail('Nothing was changed.', 'Turn contained storage on when you want it.');
275
284
  io.progress('Making and mounting the image (Windows asks for permission)');
276
285
  const mount = await storage.acquire({ id: 'cli', pid: process.pid }, { create: true });
277
286
  try {
@@ -293,7 +302,7 @@ export const containedOnRun = implement(containedOn, async (ctx, _input, io) =>
293
302
  io.log(note, 'warn');
294
303
  }
295
304
  else
296
- io.log('They stay where they are and are not used: tools are downloaded again into the image. Delete them later with sandbox data clean.');
305
+ io.log('They stay where they are and are not used: tools are downloaded again into the image. Delete them later in Maintenance > Data.');
297
306
  }
298
307
  writeContainedSetting(configFile, 'vhdx');
299
308
  }
@@ -301,9 +310,9 @@ export const containedOnRun = implement(containedOn, async (ctx, _input, io) =>
301
310
  io.progress('Dismounting the image (Windows asks for permission)');
302
311
  const done = await storage.release('cli');
303
312
  if (!done.dismounted)
304
- io.log('The image stays mounted (' + (done.note ?? '') + '). sandbox repair dismounts it.', 'warn');
313
+ io.log('The image stays mounted (' + (done.note ?? '') + '). Repairing from Health dismounts it.', 'warn');
305
314
  }
306
- return { message: 'Contained storage is on. sandbox launch mounts the image first.' };
315
+ return { message: 'Contained storage is on. The next sandbox mounts the image first.' };
307
316
  });
308
317
  export const containedOffRun = implement(containedOff, async (ctx, _input, io) => {
309
318
  requireOnPc('storage');
@@ -345,7 +354,7 @@ export const containedOffRun = implement(containedOff, async (ctx, _input, io) =
345
354
  io.progress('Dismounting the image (Windows asks for permission)');
346
355
  const done = await storage.release('cli');
347
356
  if (!done.dismounted)
348
- io.log('The image stays mounted (' + (done.note ?? '') + '). sandbox repair dismounts it.', 'warn');
357
+ io.log('The image stays mounted (' + (done.note ?? '') + '). Repairing from Health dismounts it.', 'warn');
349
358
  else if (!moved)
350
359
  io.log('The image was dismounted; contained storage is still on.');
351
360
  }
@@ -24,9 +24,9 @@ export function describeResult(result, _unattended) {
24
24
  result.reason.replace(/\.?\s*$/, '.') +
25
25
  (result.rolledBack
26
26
  ? ' The change was undone: you are on the version you had.'
27
- : ' Going back to your previous version did not fully work: run sandbox update --rollback or the installer.') +
27
+ : ' Going back to your previous version did not fully work: use Go back to the previous version, or run the installer.') +
28
28
  (result.autoUpdateOff
29
- ? ' Automatic updates are off; turn them back on in Maintenance > Updates or with sandbox update --auto on.'
29
+ ? ' Automatic updates are off; turn them back on in Maintenance > Updates.'
30
30
  : result.blocked
31
31
  ? ' It is not tried again; the next release is.'
32
32
  : ' It is tried again later.'),
@@ -100,7 +100,7 @@ export function updatesPage(s, latest) {
100
100
  title: 'This program',
101
101
  notes: [
102
102
  {
103
- text: 'After an update this page still runs the version it started with; sandbox web open (or the next sandbox start) starts the new one.',
103
+ text: 'After an update this page still runs the version it started with. Stop and start the web UI (Maintenance > Web UI) to use the new one.',
104
104
  tone: 'muted',
105
105
  only: 'web',
106
106
  },
@@ -3,7 +3,7 @@
3
3
  // runs, rollback on failure) stays in host/update.
4
4
  import { userDir } from '../../../core/config/index.js';
5
5
  import { errMsg, fail } from '../../../core/util/index.js';
6
- import { MigrateService, NPM_UPDATE_COMMAND, UpdateService } from '../../../cli/services/index.js';
6
+ import { AgentCommandsService, MigrateService, NPM_UPDATE_COMMAND, UpdateService, } from '../../../cli/services/index.js';
7
7
  import { implement } from '../../context.js';
8
8
  import { cancelled } from '../../kernel/index.js';
9
9
  import { describeResult, whereOf } from './update-lines.js';
@@ -39,7 +39,7 @@ export async function updateWith(service, input, io) {
39
39
  const found = await service.check();
40
40
  if (found.available && found.latest)
41
41
  return {
42
- line: 'Version ' + found.latest.version + ' is available (you have ' + found.current + '). Run: sandbox update',
42
+ line: 'Version ' + found.latest.version + ' is available (you have ' + found.current + ').',
43
43
  latest: found.latest.version,
44
44
  };
45
45
  if (found.blocked)
@@ -73,7 +73,17 @@ export const runUpdateRun = implement(runUpdate, async (ctx, input, io) => {
73
73
  // A folder of the user's choosing is installed from only on the command line (the web and the menu send no feed).
74
74
  if (input.feed !== undefined && input.feed !== ctx.options.feed)
75
75
  fail('--feed works only on the command line.');
76
- return updateWith(UpdateService.forPackage(ctx.packageRoot, input.feed, { userDir: userDir() }), input, io);
76
+ const result = await updateWith(UpdateService.forPackage(ctx.packageRoot, input.feed, { userDir: userDir() }), input, io);
77
+ // The agent commands (claude, codex ...) point at the program: bring them in line with what is installed now.
78
+ if (ctx.loaded.config.agentCommands.enabled && !input.check && !input.rollback && !input.auto) {
79
+ try {
80
+ new AgentCommandsService(ctx).reconcile(ctx.loaded.config);
81
+ }
82
+ catch {
83
+ // The update itself worked; the agent commands are put right at the next launch.
84
+ }
85
+ }
86
+ return result;
77
87
  });
78
88
  /** sandbox migrate's work, given the service (tests pass their own). */
79
89
  export async function migrateWith(service, input, io) {
@@ -31,6 +31,17 @@ export declare const VpnStatusSchema: z.ZodObject<{
31
31
  }>;
32
32
  text: z.ZodString;
33
33
  }, z.core.$strip>>;
34
+ lastFailure: z.ZodNullable<z.ZodObject<{
35
+ code: z.ZodEnum<{
36
+ auth: "auth";
37
+ unreachable: "unreachable";
38
+ driver: "driver";
39
+ timeout: "timeout";
40
+ other: "other";
41
+ }>;
42
+ text: z.ZodString;
43
+ at: z.ZodString;
44
+ }, z.core.$strip>>;
34
45
  }, z.core.$strip>;
35
46
  export type VpnStatus = z.output<typeof VpnStatusSchema>;
36
47
  export declare const vpnStatus: import("../../kernel/define.js").QueryDef<z.ZodObject<{
@@ -62,6 +73,17 @@ export declare const vpnStatus: import("../../kernel/define.js").QueryDef<z.ZodO
62
73
  }>;
63
74
  text: z.ZodString;
64
75
  }, z.core.$strip>>;
76
+ lastFailure: z.ZodNullable<z.ZodObject<{
77
+ code: z.ZodEnum<{
78
+ auth: "auth";
79
+ unreachable: "unreachable";
80
+ driver: "driver";
81
+ timeout: "timeout";
82
+ other: "other";
83
+ }>;
84
+ text: z.ZodString;
85
+ at: z.ZodString;
86
+ }, z.core.$strip>>;
65
87
  }, z.core.$strip>, "vpn.status">;
66
88
  export declare const vpnLogin: import("../../kernel/define.js").OperationDef<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
67
89
  message: z.ZodString;
@@ -108,5 +130,16 @@ export declare const vpnView: import("../../kernel/define.js").ViewDef<{
108
130
  }>;
109
131
  text: z.ZodString;
110
132
  }, z.core.$strip>>;
133
+ lastFailure: z.ZodNullable<z.ZodObject<{
134
+ code: z.ZodEnum<{
135
+ auth: "auth";
136
+ unreachable: "unreachable";
137
+ driver: "driver";
138
+ timeout: "timeout";
139
+ other: "other";
140
+ }>;
141
+ text: z.ZodString;
142
+ at: z.ZodString;
143
+ }, z.core.$strip>>;
111
144
  }, z.core.$strip>, "vpn.status">;
112
145
  }, Record<string, never>, "vpn">;
@@ -37,6 +37,14 @@ export const VpnStatusSchema = z.object({
37
37
  })
38
38
  .nullable()
39
39
  .describe("The running sandbox's tunnel, when one runs with the VPN on"),
40
+ lastFailure: z
41
+ .object({
42
+ code: z.enum(['auth', 'unreachable', 'driver', 'timeout', 'other']).describe('Why the last attempt failed'),
43
+ text: z.string().describe('The reason in plain words'),
44
+ at: z.string().describe('When (ISO date and time)'),
45
+ })
46
+ .nullable()
47
+ .describe("The last sandbox's VPN attempt, when it failed (kept after the sandbox closed)"),
40
48
  });
41
49
  export const vpnStatus = defineQuery({
42
50
  id: 'vpn.status',
@@ -125,6 +133,16 @@ export function vpnPage(s) {
125
133
  wireguard
126
134
  ? { id: 'login', label: 'Login', value: 'not needed (the keys are in your config)', tone: 'muted' }
127
135
  : { id: 'login', label: 'Login', value: LOGIN_TEXT[s.login] + savedDate, tone: LOGIN_TONE[s.login] },
136
+ ...(s.lastFailure
137
+ ? [
138
+ {
139
+ id: 'lastAttempt',
140
+ label: 'Last attempt',
141
+ value: s.lastFailure.text + ' (' + s.lastFailure.at.slice(0, 16).replace('T', ' ') + ')',
142
+ tone: 'danger',
143
+ },
144
+ ]
145
+ : []),
128
146
  ...(s.running
129
147
  ? [
130
148
  {
@@ -137,14 +155,14 @@ export function vpnPage(s) {
137
155
  : []),
138
156
  ];
139
157
  const notes = [
140
- ...(!wireguard && s.login === 'none'
141
- ? [{ text: 'Next: sandbox vpn login', tone: 'muted', only: 'cli' }]
142
- : []),
143
158
  ...(s.login === 'unreadable'
159
+ ? [{ text: 'Only the Windows user that saved it can read it. Save it again.', tone: 'muted' }]
160
+ : []),
161
+ ...(s.lastFailure?.code === 'auth' && s.provider === 'nordvpn'
144
162
  ? [
145
163
  {
146
- text: 'Only the Windows user that saved it can read it. Save it again: sandbox vpn login',
147
- tone: 'muted',
164
+ text: 'NordVPN refused the login. It needs the service credentials (Nord Account > NordVPN > Manual setup), not your e-mail and password.',
165
+ tone: 'warn',
148
166
  },
149
167
  ]
150
168
  : []),
@@ -152,12 +170,18 @@ export function vpnPage(s) {
152
170
  ];
153
171
  // Turning it on or off is the vpn.enabled setting (it applies from the next start).
154
172
  const toggle = action(setSetting, { scope: 'user', key: 'vpn.enabled', value: !s.enabled }, { label: s.enabled ? 'Turn the VPN off' : 'Turn the VPN on', verb: s.enabled ? 'turn off' : 'turn on', key: 'o' });
173
+ const refused = s.lastFailure?.code === 'auth';
155
174
  const actions = [
156
175
  toggle,
176
+ ...(s.lastFailure?.code === 'unreachable' && s.protocol === 'udp'
177
+ ? [
178
+ action(setSetting, { scope: 'user', key: 'vpn.protocol', value: 'tcp' }, { label: 'Try TCP instead of UDP', verb: 'use tcp', key: 't' }),
179
+ ]
180
+ : []),
157
181
  ...(wireguard
158
182
  ? []
159
183
  : [
160
- action(vpnLogin, {}, { key: 'v', verb: 'save login' }),
184
+ action(vpnLogin, {}, { key: 'v', verb: 'save login', ...(refused ? { label: 'Save the login again…' } : {}) }),
161
185
  ...(s.login !== 'none' ? [action(vpnLogout, {}, { key: 'x', verb: 'delete login' })] : []),
162
186
  ]),
163
187
  ];
@@ -27,6 +27,17 @@ export declare const vpnStatusRun: import("../../kernel/define.js").Implementati
27
27
  }>;
28
28
  text: import("zod").ZodString;
29
29
  }, import("zod/v4/core").$strip>>;
30
+ lastFailure: import("zod").ZodNullable<import("zod").ZodObject<{
31
+ code: import("zod").ZodEnum<{
32
+ auth: "auth";
33
+ unreachable: "unreachable";
34
+ driver: "driver";
35
+ timeout: "timeout";
36
+ other: "other";
37
+ }>;
38
+ text: import("zod").ZodString;
39
+ at: import("zod").ZodString;
40
+ }, import("zod/v4/core").$strip>>;
30
41
  }, import("zod/v4/core").$strip>, "vpn.status">, import("../../../cli/commands/context.js").Context>;
31
42
  export declare const vpnLoginRun: import("../../kernel/define.js").Implementation<import("../../kernel/define.js").OperationDef<import("zod").ZodObject<{}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
32
43
  message: import("zod").ZodString;
@@ -32,8 +32,11 @@ export const vpnLoginRun = implement(vpnLogin, async (ctx, _input, io) => {
32
32
  if (password === undefined)
33
33
  cancelled();
34
34
  service.save({ username, password });
35
+ const warning = service.warning({ username, password });
36
+ if (warning)
37
+ io.log(warning, 'warn');
35
38
  VPN_WARNINGS.forEach((w) => io.log(w, 'muted'));
36
- return { message: 'Saved. Turn the VPN on with: sandbox config set vpn.enabled true' };
39
+ return { message: 'Saved. Use "Turn the VPN on" on the VPN page to use it from the next start.' };
37
40
  });
38
41
  export const vpnLogoutRun = implement(vpnLogout, async (ctx, _input, io) => {
39
42
  requireOnPc('vpn logout');
@@ -27,10 +27,10 @@ export const webStatus = defineQuery({
27
27
  text: (o) => o.running && o.port
28
28
  ? 'The web UI is running at http://127.0.0.1:' +
29
29
  o.port +
30
- '/ (sandbox web open signs you in).' +
30
+ '/ (the Open action signs you in).' +
31
31
  (o.lanAddress ? '\nOn your network: ' + o.lanAddress + ' (certificate ' + o.lanFingerprint + ')' : '') +
32
32
  (o.lanProblem ? '\nLAN mode is on but not listening: ' + o.lanProblem : '')
33
- : 'The web UI is not running (sandbox web start).',
33
+ : 'The web UI is not running.',
34
34
  cli: { name: 'web', action: 'status', json: true },
35
35
  });
36
36
  export const startWeb = defineOperation({
@@ -3,7 +3,7 @@
3
3
  // it. The server itself (`sandbox _web`) stays in cli/commands/web.ts.
4
4
  import path from 'node:path';
5
5
  import { packageVersion } from '../../../core/package-info.js';
6
- import { fail, sleep } from '../../../core/util/index.js';
6
+ import { fail, failWith, sleep } from '../../../core/util/index.js';
7
7
  import { requireOnPc } from '../../../cli/commands/context.js';
8
8
  import { spawnDetached } from '../../../host/sandbox/index.js';
9
9
  import { openBrowser, WebControl, WebStore } from '../../../host/web/index.js';
@@ -50,10 +50,14 @@ async function startServer(ctx, io, control) {
50
50
  const now = await control.status();
51
51
  if (now.running && now.state) {
52
52
  io.log('The web UI is running at http://127.0.0.1:' + now.state.port + '/ (this PC only).');
53
- return { port: now.state.port, message: 'Open it already signed in with: sandbox web open', wasRunning: false };
53
+ return {
54
+ port: now.state.port,
55
+ message: 'Open it already signed in from Maintenance > Web UI.',
56
+ wasRunning: false,
57
+ };
54
58
  }
55
59
  }
56
- return fail('The web UI did not start.', 'Run sandbox _web to see why (the port ' + config.web.port + ' may be taken: change web.port).');
60
+ return fail('The web UI did not start.', 'The port ' + config.web.port + ' may be taken: change web.port in Settings. The Logs page may say more.');
57
61
  }
58
62
  /** Whether the web UI runs, and its address without the token. Never returns the state (it holds the token). */
59
63
  export const webStatusRun = implement(webStatus, async (ctx) => {
@@ -83,7 +87,11 @@ export const openWebRun = implement(openWeb, async (ctx, _input, io) => {
83
87
  io.log(started.message);
84
88
  const { running, state } = await control.status();
85
89
  if (!running || !state)
86
- return fail('The web UI stopped right away.', 'Run sandbox web start again.');
90
+ return failWith('The web UI stopped right away.', 'Start it again.', {
91
+ op: 'web.start',
92
+ label: 'Start the web UI',
93
+ cli: 'sandbox web start',
94
+ });
87
95
  openBrowser(control.url(state));
88
96
  return { message: 'Opened in your browser.' };
89
97
  });
@@ -1,4 +1,6 @@
1
1
  import { z } from 'zod';
2
+ import { type ErrorAction } from '../../core/util/errors.js';
3
+ export type { ErrorAction };
2
4
  export declare const ErrorKindSchema: z.ZodEnum<{
3
5
  user: "user";
4
6
  cancelled: "cancelled";
@@ -16,6 +18,11 @@ export declare const WireErrorSchema: z.ZodObject<{
16
18
  }>;
17
19
  message: z.ZodString;
18
20
  fix: z.ZodOptional<z.ZodString>;
21
+ action: z.ZodOptional<z.ZodObject<{
22
+ op: z.ZodString;
23
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
24
+ label: z.ZodString;
25
+ }, z.core.$strict>>;
19
26
  }, z.core.$strict>;
20
27
  export type WireError = z.output<typeof WireErrorSchema>;
21
28
  /** The user said no to a question the operation needed: nothing changed. */
@@ -9,6 +9,14 @@ export const WireErrorSchema = z.strictObject({
9
9
  kind: ErrorKindSchema,
10
10
  message: z.string().max(2000),
11
11
  fix: z.string().max(2000).optional(),
12
+ /** A button that fixes it (the command line is not sent: only the CLI prints it). */
13
+ action: z
14
+ .strictObject({
15
+ op: z.string().max(100),
16
+ input: z.record(z.string(), z.unknown()).optional(),
17
+ label: z.string().max(200),
18
+ })
19
+ .optional(),
12
20
  });
13
21
  /** The user said no to a question the operation needed: nothing changed. */
14
22
  export class Cancelled extends Error {
@@ -27,8 +35,15 @@ export const BUG_MESSAGE = 'Something went wrong.';
27
35
  export function toWireError(e) {
28
36
  if (e instanceof Cancelled)
29
37
  return { kind: 'cancelled', message: e.message };
30
- if (e instanceof UserError)
31
- return { kind: 'user', message: e.message, ...(e.fix ? { fix: e.fix } : {}) };
38
+ if (e instanceof UserError) {
39
+ const a = e.action;
40
+ return {
41
+ kind: 'user',
42
+ message: e.message,
43
+ ...(e.fix ? { fix: e.fix } : {}),
44
+ ...(a ? { action: { op: a.op, ...(a.input ? { input: { ...a.input } } : {}), label: a.label } } : {}),
45
+ };
46
+ }
32
47
  if (e instanceof z.ZodError)
33
48
  return { kind: 'invalid', message: issuesText(e) };
34
49
  return { kind: 'bug', message: BUG_MESSAGE };
@@ -37,7 +52,7 @@ export function toWireError(e) {
37
52
  export function fromWireError(w) {
38
53
  if (w.kind === 'cancelled')
39
54
  return new Cancelled(w.message);
40
- return new UserError(w.message, w.fix);
55
+ return new UserError(w.message, w.fix, w.action ? { op: w.action.op, input: w.action.input, label: w.action.label, cli: '' } : undefined);
41
56
  }
42
57
  /** "key: problem; other: problem" for a value that did not fit its schema. */
43
58
  export function issuesText(e) {
@@ -57,8 +57,8 @@ export declare const ServerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
57
57
  text: z.ZodString;
58
58
  tone: z.ZodOptional<z.ZodEnum<{
59
59
  ok: "ok";
60
- muted: "muted";
61
60
  warn: "warn";
61
+ muted: "muted";
62
62
  danger: "danger";
63
63
  accent: "accent";
64
64
  }>>;
@@ -154,6 +154,11 @@ export declare const ServerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
154
154
  }>;
155
155
  message: z.ZodString;
156
156
  fix: z.ZodOptional<z.ZodString>;
157
+ action: z.ZodOptional<z.ZodObject<{
158
+ op: z.ZodString;
159
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
160
+ label: z.ZodString;
161
+ }, z.core.$strict>>;
157
162
  }, z.core.$strict>;
158
163
  }, z.core.$strict>, z.ZodObject<{
159
164
  t: z.ZodLiteral<"data">;
@@ -20,11 +20,21 @@ export type Target =
20
20
  readonly kind: 'start-agent';
21
21
  readonly agent: string;
22
22
  }
23
- /** A command line of an area that is not a feature yet: the menu runs it, the web does not offer it. */
23
+ /** A command line of an area that is not a feature yet: the menu runs it. No Page uses it. */
24
24
  | {
25
25
  readonly kind: 'command';
26
26
  readonly argv: readonly string[];
27
27
  }
28
+ /** One setting: Settings opens at its row (the web: /v/settings?focus=<key>; the menu: Settings, searched for it). */
29
+ | {
30
+ readonly kind: 'setting';
31
+ readonly key: string;
32
+ }
33
+ /** A page on the internet (only https://github.com/ so far): the menu opens it in the browser, the web in a tab. */
34
+ | {
35
+ readonly kind: 'url';
36
+ readonly href: string;
37
+ }
28
38
  /** Another view. */
29
39
  | {
30
40
  readonly kind: 'view';
@@ -1,6 +1,6 @@
1
1
  import { fail } from '../core/util/errors.js';
2
2
  import { accessNeeded, allows, invoke, OWNER, refusalText, NO_QUESTIONS, onSurface, } from './kernel/index.js';
3
- import { addAgentRun, listAgentsRun, makeDefaultAgentRun, removeAgentRun, startAgentRun, } from './features/agents/index.js';
3
+ import { addAgentRun, agentEnvRun, agentsEnvSetRun, listAgentsRun, makeDefaultAgentRun, removeAgentRun, startAgentRun, } from './features/agents/index.js';
4
4
  import { defaultAccountRun, listAccountsRun, removeAccountRun, renameAccountRun, saveAccountRun, useAccountRun, listServicesRun, serviceImportRun, serviceLoginRun, serviceLogoutRun, } from './features/accounts/index.js';
5
5
  import { listAppsRun, requestAppRun, setCustomAppsRun, toggleAppRun } from './features/apps/index.js';
6
6
  import { browseFolderRun } from './features/files/index.js';
@@ -16,6 +16,7 @@ import { exportConfigRun, getSettingRun, importConfigRun, listSettingsRun, reset
16
16
  import { migrateSettingsRun, runUpdateRun, updatesStatusRun } from './features/updates/index.js';
17
17
  import { checkEngineRun, cleanEngineRun, engineLeftoversRun, engineStatusRun } from './features/engine/index.js';
18
18
  import { openWebRun, startWebRun, stopWebRun, webStatusRun } from './features/web/index.js';
19
+ import { agentCommandsOffRun, agentCommandsOnRun, agentCommandsStatusRun } from './features/agent-commands/index.js';
19
20
  import { vpnLoginRun, vpnLogoutRun, vpnStatusRun } from './features/vpn/index.js';
20
21
  import { githubLoginRun, githubLogoutRun, githubStatusRun } from './features/github/index.js';
21
22
  import { accessStatusRun, allowDeviceRun, lanOffRun, lanOnRun, revokeAccessRun, revokeAllAccessRun, } from './features/access/index.js';
@@ -34,6 +35,8 @@ export const IMPLEMENTATIONS = [
34
35
  makeDefaultAgentRun,
35
36
  removeAgentRun,
36
37
  listAgentsRun,
38
+ agentEnvRun,
39
+ agentsEnvSetRun,
37
40
  listSettingsRun,
38
41
  getSettingRun,
39
42
  setSettingRun,
@@ -89,6 +92,9 @@ export const IMPLEMENTATIONS = [
89
92
  vpnStatusRun,
90
93
  vpnLoginRun,
91
94
  vpnLogoutRun,
95
+ agentCommandsStatusRun,
96
+ agentCommandsOnRun,
97
+ agentCommandsOffRun,
92
98
  githubStatusRun,
93
99
  githubLoginRun,
94
100
  githubLogoutRun,
@@ -2,8 +2,8 @@
2
2
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
3
3
  import {
4
4
  run
5
- } from "./chunk-N4GXYTLV.js";
6
- import "./chunk-FRPLQLSY.js";
5
+ } from "./chunk-JETGP2C3.js";
6
+ import "./chunk-ZTTOF5V3.js";
7
7
 
8
8
  // src/bin/agent-sandbox.ts
9
9
  run(process.argv.slice(2));