windows-development-sandbox 1.4.1 → 1.4.3

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 (872) hide show
  1. package/config.example.json +3 -1
  2. package/dist/api.js +27 -16
  3. package/dist/cli/args.d.ts +4 -6
  4. package/dist/cli/args.js +67 -34
  5. package/dist/cli/argv.d.ts +9 -0
  6. package/dist/cli/argv.js +22 -0
  7. package/dist/cli/commands/accounts.d.ts +1 -1
  8. package/dist/cli/commands/accounts.js +42 -27
  9. package/dist/cli/commands/agent-commands.d.ts +3 -3
  10. package/dist/cli/commands/agent-commands.js +27 -18
  11. package/dist/cli/commands/context.d.ts +9 -11
  12. package/dist/cli/commands/context.js +35 -32
  13. package/dist/cli/commands/data/clean.d.ts +2 -2
  14. package/dist/cli/commands/data/clean.js +27 -11
  15. package/dist/cli/commands/data/collect.d.ts +6 -3
  16. package/dist/cli/commands/data/collect.js +46 -15
  17. package/dist/cli/commands/data/index.d.ts +2 -2
  18. package/dist/cli/commands/data/index.js +30 -12
  19. package/dist/cli/commands/data/remove.d.ts +1 -1
  20. package/dist/cli/commands/data/remove.js +4 -4
  21. package/dist/cli/commands/index.d.ts +5 -4
  22. package/dist/cli/commands/index.js +5 -4
  23. package/dist/cli/commands/launch/add-root.d.ts +7 -0
  24. package/dist/cli/commands/launch/add-root.js +64 -0
  25. package/dist/cli/commands/launch/boot-progress.d.ts +7 -0
  26. package/dist/cli/commands/launch/boot-progress.js +48 -0
  27. package/dist/cli/commands/launch/boot-wants.d.ts +11 -0
  28. package/dist/cli/commands/launch/boot-wants.js +48 -0
  29. package/dist/cli/commands/launch/first-start.d.ts +10 -0
  30. package/dist/cli/commands/launch/first-start.js +53 -0
  31. package/dist/cli/commands/launch/index.d.ts +6 -0
  32. package/dist/cli/commands/launch/index.js +6 -0
  33. package/dist/cli/commands/launch/launch.d.ts +8 -0
  34. package/dist/cli/commands/launch/launch.js +211 -0
  35. package/dist/cli/commands/launch/prepare.d.ts +23 -0
  36. package/dist/cli/commands/launch/prepare.js +109 -0
  37. package/dist/cli/commands/launch/running.d.ts +45 -0
  38. package/dist/cli/commands/launch/running.js +218 -0
  39. package/dist/cli/commands/launch/summary.d.ts +8 -0
  40. package/dist/cli/commands/launch/summary.js +98 -0
  41. package/dist/cli/commands/maintenance/audit.d.ts +3 -0
  42. package/dist/cli/commands/maintenance/audit.js +58 -0
  43. package/dist/cli/commands/maintenance/clean.d.ts +2 -0
  44. package/dist/cli/commands/maintenance/clean.js +10 -0
  45. package/dist/cli/commands/maintenance/config.d.ts +2 -0
  46. package/dist/cli/commands/maintenance/config.js +145 -0
  47. package/dist/cli/commands/maintenance/doctor.d.ts +2 -0
  48. package/dist/cli/commands/maintenance/doctor.js +52 -0
  49. package/dist/cli/commands/maintenance/host-claude.d.ts +2 -0
  50. package/dist/cli/commands/maintenance/host-claude.js +4 -0
  51. package/dist/cli/commands/maintenance/index.d.ts +8 -0
  52. package/dist/cli/commands/maintenance/index.js +9 -0
  53. package/dist/cli/commands/maintenance/logs.d.ts +2 -0
  54. package/dist/cli/commands/maintenance/logs.js +44 -0
  55. package/dist/cli/commands/maintenance/sync.d.ts +2 -0
  56. package/dist/cli/commands/maintenance/sync.js +12 -0
  57. package/dist/cli/commands/maintenance/watch.d.ts +3 -0
  58. package/dist/cli/commands/maintenance/watch.js +6 -0
  59. package/dist/cli/commands/projects/describe-sessions.d.ts +3 -0
  60. package/dist/cli/commands/projects/describe-sessions.js +15 -0
  61. package/dist/cli/commands/projects/here.d.ts +38 -0
  62. package/dist/cli/commands/projects/here.js +145 -0
  63. package/dist/cli/commands/projects/index.d.ts +4 -0
  64. package/dist/cli/commands/projects/index.js +4 -0
  65. package/dist/cli/commands/projects/projects.d.ts +14 -0
  66. package/dist/cli/commands/projects/projects.js +213 -0
  67. package/dist/cli/commands/projects/restart.d.ts +15 -0
  68. package/dist/cli/commands/projects/restart.js +149 -0
  69. package/dist/cli/commands/registry.d.ts +3 -0
  70. package/dist/cli/commands/registry.js +34 -0
  71. package/dist/cli/commands/repair/checks.js +105 -29
  72. package/dist/cli/commands/repair/finders.d.ts +13 -10
  73. package/dist/cli/commands/repair/finders.js +63 -43
  74. package/dist/cli/commands/repair/index.d.ts +4 -4
  75. package/dist/cli/commands/repair/index.js +47 -21
  76. package/dist/cli/commands/repair/types.d.ts +2 -2
  77. package/dist/cli/commands/repair/types.js +7 -2
  78. package/dist/cli/commands/sessions/attach.d.ts +2 -0
  79. package/dist/cli/commands/sessions/attach.js +45 -0
  80. package/dist/cli/commands/sessions/control.d.ts +4 -0
  81. package/dist/cli/commands/sessions/control.js +62 -0
  82. package/dist/cli/commands/sessions/exec.d.ts +6 -0
  83. package/dist/cli/commands/sessions/exec.js +72 -0
  84. package/dist/cli/commands/sessions/index.d.ts +6 -0
  85. package/dist/cli/commands/sessions/index.js +9 -0
  86. package/dist/cli/commands/sessions/list.d.ts +15 -0
  87. package/dist/cli/commands/sessions/list.js +65 -0
  88. package/dist/cli/commands/sessions/status.d.ts +2 -0
  89. package/dist/cli/commands/sessions/status.js +153 -0
  90. package/dist/cli/commands/sessions/window.d.ts +3 -0
  91. package/dist/cli/commands/sessions/window.js +18 -0
  92. package/dist/cli/commands/setup/checks.d.ts +4 -4
  93. package/dist/cli/commands/setup/checks.js +36 -19
  94. package/dist/cli/commands/setup/facts.d.ts +6 -6
  95. package/dist/cli/commands/setup/facts.js +23 -11
  96. package/dist/cli/commands/setup/index.d.ts +1 -1
  97. package/dist/cli/commands/setup/index.js +25 -12
  98. package/dist/cli/commands/user-config.d.ts +5 -5
  99. package/dist/cli/commands/user-config.js +14 -12
  100. package/dist/cli/history.d.ts +5 -4
  101. package/dist/cli/history.js +23 -11
  102. package/dist/cli/index.d.ts +4 -14
  103. package/dist/cli/index.js +27 -77
  104. package/dist/cli/manifest.d.ts +464 -10
  105. package/dist/cli/manifest.js +327 -53
  106. package/dist/cli/menu/apps.d.ts +7 -5
  107. package/dist/cli/menu/apps.js +64 -16
  108. package/dist/cli/menu/command-fields.d.ts +15 -0
  109. package/dist/cli/menu/command-fields.js +23 -0
  110. package/dist/cli/menu/command-form.d.ts +3 -5
  111. package/dist/cli/menu/command-form.js +116 -48
  112. package/dist/cli/menu/home.d.ts +22 -0
  113. package/dist/cli/menu/home.js +72 -0
  114. package/dist/cli/menu/index.d.ts +2 -24
  115. package/dist/cli/menu/index.js +4 -178
  116. package/dist/cli/menu/menu.d.ts +23 -0
  117. package/dist/cli/menu/menu.js +185 -0
  118. package/dist/cli/menu/settings/categories.d.ts +2 -2
  119. package/dist/cli/menu/settings/categories.js +123 -20
  120. package/dist/cli/menu/settings/collections/collection-editor.d.ts +23 -0
  121. package/dist/cli/menu/settings/collections/collection-editor.js +89 -0
  122. package/dist/cli/menu/settings/collections/map-editor.d.ts +10 -0
  123. package/dist/cli/menu/settings/collections/map-editor.js +34 -0
  124. package/dist/cli/menu/settings/collections/object-list-editor.d.ts +10 -0
  125. package/dist/cli/menu/settings/collections/object-list-editor.js +23 -0
  126. package/dist/cli/menu/settings/collections/object-map-editor.d.ts +10 -0
  127. package/dist/cli/menu/settings/collections/object-map-editor.js +35 -0
  128. package/dist/cli/menu/settings/collections/string-list-editor.d.ts +12 -0
  129. package/dist/cli/menu/settings/collections/string-list-editor.js +39 -0
  130. package/dist/cli/menu/settings/config-file.d.ts +2 -2
  131. package/dist/cli/menu/settings/config-file.js +42 -19
  132. package/dist/cli/menu/settings/editor-actions.d.ts +2 -0
  133. package/dist/cli/menu/settings/editor-actions.js +2 -0
  134. package/dist/cli/menu/settings/format.d.ts +5 -0
  135. package/dist/cli/menu/settings/format.js +39 -0
  136. package/dist/cli/menu/settings/index.d.ts +1 -29
  137. package/dist/cli/menu/settings/index.js +1 -133
  138. package/dist/cli/menu/settings/object-editor.d.ts +12 -0
  139. package/dist/cli/menu/settings/object-editor.js +86 -0
  140. package/dist/cli/menu/settings/schema-node.d.ts +3 -1
  141. package/dist/cli/menu/settings/schema-node.js +71 -24
  142. package/dist/cli/menu/settings/settings-editor.d.ts +30 -0
  143. package/dist/cli/menu/settings/settings-editor.js +176 -0
  144. package/dist/cli/menu/settings/{editors.d.ts → value-editor.d.ts} +2 -13
  145. package/dist/cli/menu/settings/value-editor.js +137 -0
  146. package/dist/cli/menu/several.d.ts +4 -4
  147. package/dist/cli/menu/several.js +61 -20
  148. package/dist/cli/{colors.d.ts → output/colors.d.ts} +8 -8
  149. package/dist/cli/{colors.js → output/colors.js} +32 -14
  150. package/dist/cli/output/index.d.ts +3 -0
  151. package/dist/cli/output/index.js +3 -0
  152. package/dist/cli/output/print.d.ts +5 -0
  153. package/dist/cli/output/print.js +14 -0
  154. package/dist/cli/{progress.d.ts → output/progress.d.ts} +5 -5
  155. package/dist/cli/{progress.js → output/progress.js} +42 -19
  156. package/dist/cli/report.d.ts +2 -0
  157. package/dist/cli/report.js +20 -0
  158. package/dist/cli/tui/app.d.ts +6 -16
  159. package/dist/cli/tui/app.js +28 -8
  160. package/dist/cli/tui/dialogs/confirm-screen.d.ts +20 -0
  161. package/dist/cli/tui/dialogs/confirm-screen.js +50 -0
  162. package/dist/cli/tui/dialogs/message-screen.d.ts +17 -0
  163. package/dist/cli/tui/dialogs/message-screen.js +55 -0
  164. package/dist/cli/tui/dialogs/paragraphs.d.ts +2 -0
  165. package/dist/cli/tui/dialogs/paragraphs.js +5 -0
  166. package/dist/cli/tui/dialogs/text-screen.d.ts +26 -0
  167. package/dist/cli/tui/dialogs/text-screen.js +107 -0
  168. package/dist/cli/tui/frame.js +3 -1
  169. package/dist/cli/tui/index.d.ts +7 -3
  170. package/dist/cli/tui/index.js +4 -2
  171. package/dist/cli/tui/list/list-screen.d.ts +29 -0
  172. package/dist/cli/tui/{list-screen.js → list/list-screen.js} +86 -23
  173. package/dist/cli/tui/{list-screen.d.ts → list/list-types.d.ts} +0 -28
  174. package/dist/cli/tui/screen.d.ts +14 -0
  175. package/dist/cli/tui/terminal.js +34 -10
  176. package/dist/cli/tui/text.d.ts +2 -1
  177. package/dist/cli/tui/text.js +37 -7
  178. package/dist/cli/tui/theme.js +27 -9
  179. package/dist/cli/validate.d.ts +8 -8
  180. package/dist/cli/validate.js +32 -21
  181. package/dist/core/config/defaults.d.ts +2 -0
  182. package/dist/core/config/defaults.js +203 -0
  183. package/dist/core/config/index.d.ts +2 -0
  184. package/dist/core/config/index.js +3 -0
  185. package/dist/core/{config.d.ts → config/loader.d.ts} +1 -2
  186. package/dist/core/config/loader.js +47 -0
  187. package/dist/core/{detect-databases.js → detect/databases.js} +111 -23
  188. package/dist/core/detect/index.d.ts +4 -0
  189. package/dist/core/detect/index.js +4 -0
  190. package/dist/core/{detect-pwsh.d.ts → detect/pwsh.d.ts} +1 -1
  191. package/dist/core/{detect-pwsh.js → detect/pwsh.js} +25 -11
  192. package/dist/core/{detect-toolchains.d.ts → detect/toolchains.d.ts} +1 -1
  193. package/dist/core/{detect-toolchains.js → detect/toolchains.js} +42 -5
  194. package/dist/{guest/toolchains → core/detect}/versions.js +28 -12
  195. package/dist/core/disk.d.ts +2 -0
  196. package/dist/core/disk.js +46 -3
  197. package/dist/core/local-config/boot-wants.d.ts +45 -0
  198. package/dist/core/local-config/boot-wants.js +120 -0
  199. package/dist/core/local-config/file.d.ts +3 -0
  200. package/dist/core/local-config/file.js +16 -0
  201. package/dist/core/local-config/index.d.ts +5 -0
  202. package/dist/core/local-config/index.js +7 -0
  203. package/dist/core/{local-config.d.ts → local-config/overrides.d.ts} +3 -18
  204. package/dist/core/{local-config.js → local-config/overrides.js} +45 -52
  205. package/dist/core/local-config/policy.d.ts +19 -0
  206. package/dist/core/local-config/policy.js +45 -0
  207. package/dist/core/local-config/trust.d.ts +13 -0
  208. package/dist/core/local-config/trust.js +43 -0
  209. package/dist/core/package-info.d.ts +4 -0
  210. package/dist/core/package-info.js +13 -0
  211. package/dist/core/run/guest-workspace.d.ts +23 -0
  212. package/dist/core/run/guest-workspace.js +47 -0
  213. package/dist/core/run/index.d.ts +3 -0
  214. package/dist/core/run/index.js +3 -0
  215. package/dist/core/run/resolve-run.d.ts +3 -0
  216. package/dist/core/run/resolve-run.js +202 -0
  217. package/dist/core/run/versions.d.ts +13 -0
  218. package/dist/core/run/versions.js +65 -0
  219. package/dist/core/safe-paths.js +17 -5
  220. package/dist/core/schema/apps.d.ts +4 -4
  221. package/dist/core/schema/apps.js +55 -21
  222. package/dist/core/schema/common.d.ts +13 -10
  223. package/dist/core/schema/common.js +16 -10
  224. package/dist/core/schema/config.d.ts +15 -10
  225. package/dist/core/schema/config.js +78 -53
  226. package/dist/core/schema/databases.d.ts +4 -3
  227. package/dist/core/schema/databases.js +16 -12
  228. package/dist/core/schema/harness.d.ts +1 -1
  229. package/dist/core/schema/harness.js +17 -7
  230. package/dist/core/schema/index.d.ts +6 -0
  231. package/dist/core/schema/index.js +8 -0
  232. package/dist/core/schema/json-schema.js +10 -5
  233. package/dist/core/schema/profile.d.ts +4 -4
  234. package/dist/core/schema/profile.js +37 -17
  235. package/dist/core/schema/projects.d.ts +1 -1
  236. package/dist/core/schema/projects.js +16 -6
  237. package/dist/core/schema/sandbox.d.ts +11 -11
  238. package/dist/core/schema/sandbox.js +101 -37
  239. package/dist/core/schema/toolchains.d.ts +6 -1
  240. package/dist/core/schema/toolchains.js +84 -34
  241. package/dist/core/types.d.ts +19 -9
  242. package/dist/core/util/errors.d.ts +8 -0
  243. package/dist/core/util/errors.js +14 -0
  244. package/dist/core/util/fs.d.ts +8 -0
  245. package/dist/core/util/fs.js +40 -0
  246. package/dist/core/util/index.d.ts +7 -0
  247. package/dist/core/util/index.js +7 -0
  248. package/dist/core/util/jsonc.d.ts +6 -0
  249. package/dist/core/util/jsonc.js +25 -0
  250. package/dist/core/util/links.d.ts +10 -0
  251. package/dist/core/util/links.js +39 -0
  252. package/dist/core/util/paths.d.ts +7 -0
  253. package/dist/core/util/paths.js +33 -0
  254. package/dist/core/util/process.d.ts +15 -0
  255. package/dist/core/util/process.js +54 -0
  256. package/dist/core/util/text.d.ts +8 -0
  257. package/dist/core/util/text.js +8 -0
  258. package/dist/guest/{setup/agents.js → agents/agent-installer.js} +24 -4
  259. package/dist/guest/apps/after-install.d.ts +3 -0
  260. package/dist/guest/apps/after-install.js +47 -0
  261. package/dist/guest/apps/app-installer.d.ts +22 -0
  262. package/dist/guest/apps/app-installer.js +116 -0
  263. package/dist/guest/apps/find-exe.d.ts +5 -0
  264. package/dist/guest/apps/find-exe.js +41 -0
  265. package/dist/guest/apps/index.d.ts +3 -10
  266. package/dist/guest/apps/index.js +6 -206
  267. package/dist/guest/apps/resolvers.js +37 -9
  268. package/dist/guest/apps/shortcuts.d.ts +6 -0
  269. package/dist/guest/apps/shortcuts.js +28 -0
  270. package/dist/guest/apps/sources.d.ts +4 -0
  271. package/dist/guest/apps/sources.js +17 -0
  272. package/dist/guest/apps/unpack.d.ts +3 -0
  273. package/dist/guest/apps/unpack.js +47 -0
  274. package/dist/guest/{audit-parse.js → audit/parse.js} +39 -3
  275. package/dist/guest/{audit.d.ts → audit/process-audit.d.ts} +3 -1
  276. package/dist/guest/{audit.js → audit/process-audit.js} +33 -8
  277. package/dist/guest/boot/boot-env.d.ts +4 -0
  278. package/dist/guest/{boot-env.js → boot/boot-env.js} +7 -5
  279. package/dist/guest/boot/boot.d.ts +1 -0
  280. package/dist/guest/{main.js → boot/boot.js} +96 -50
  281. package/dist/guest/{guide.js → boot/guide.js} +32 -7
  282. package/dist/guest/{project-env.d.ts → boot/project-env.d.ts} +3 -3
  283. package/dist/guest/{project-env.js → boot/project-env.js} +12 -4
  284. package/dist/guest/boot/project-status.d.ts +5 -0
  285. package/dist/guest/boot/project-status.js +28 -0
  286. package/dist/guest/daemon/daemon.d.ts +1 -0
  287. package/dist/guest/daemon/daemon.js +51 -0
  288. package/dist/guest/daemon/exec.js +18 -6
  289. package/dist/guest/daemon/{shutdown.js → idle-shutdown.js} +5 -4
  290. package/dist/guest/daemon/{project.d.ts → project-provisioner.d.ts} +3 -3
  291. package/dist/guest/daemon/{project.js → project-provisioner.js} +60 -22
  292. package/dist/guest/daemon/relays.js +5 -3
  293. package/dist/guest/daemon/{session.js → sessions.js} +84 -24
  294. package/dist/guest/daemon/state.d.ts +4 -1
  295. package/dist/guest/daemon/state.js +34 -20
  296. package/dist/guest/databases/database-server.d.ts +13 -0
  297. package/dist/guest/databases/database-server.js +35 -0
  298. package/dist/guest/databases/dynamodb.d.ts +12 -0
  299. package/dist/guest/databases/dynamodb.js +81 -0
  300. package/dist/guest/databases/index.d.ts +2 -0
  301. package/dist/guest/databases/index.js +2 -0
  302. package/dist/guest/databases/mongodb.d.ts +7 -0
  303. package/dist/guest/databases/mongodb.js +46 -0
  304. package/dist/guest/databases/mysql.d.ts +7 -0
  305. package/dist/guest/databases/mysql.js +59 -0
  306. package/dist/guest/databases/names.d.ts +5 -0
  307. package/dist/guest/databases/names.js +8 -0
  308. package/dist/guest/databases/postgres.d.ts +9 -0
  309. package/dist/guest/databases/postgres.js +85 -0
  310. package/dist/guest/databases/redis.d.ts +7 -0
  311. package/dist/guest/databases/redis.js +25 -0
  312. package/dist/guest/databases/registry.d.ts +5 -0
  313. package/dist/guest/databases/registry.js +51 -0
  314. package/dist/guest/databases/sbx-db.d.ts +1 -0
  315. package/dist/guest/{db.js → databases/sbx-db.js} +13 -13
  316. package/dist/guest/{toolchains/databases → databases}/server.d.ts +5 -5
  317. package/dist/guest/{toolchains/databases → databases}/server.js +18 -13
  318. package/dist/guest/entries/daemon.js +16 -0
  319. package/dist/guest/entries/db.js +10 -0
  320. package/dist/guest/entries/gitguard.js +20 -0
  321. package/dist/guest/entries/main.d.ts +1 -0
  322. package/dist/guest/entries/main.js +24 -0
  323. package/dist/guest/entries/netproxy.d.ts +1 -0
  324. package/dist/guest/entries/netproxy.js +7 -0
  325. package/dist/guest/entries/view.d.ts +1 -0
  326. package/dist/guest/entries/view.js +11 -0
  327. package/dist/guest/{gitguard.js → git/decision.js} +49 -26
  328. package/dist/guest/network/addresses.d.ts +2 -0
  329. package/dist/guest/network/addresses.js +6 -0
  330. package/dist/guest/{setup/network.d.ts → network/allow-only.d.ts} +0 -10
  331. package/dist/guest/network/allow-only.js +84 -0
  332. package/dist/guest/network/firewall.d.ts +9 -0
  333. package/dist/guest/{setup/network.js → network/firewall.js} +58 -63
  334. package/dist/guest/network/proxy-server.d.ts +2 -0
  335. package/dist/guest/{netproxy.js → network/proxy-server.js} +37 -18
  336. package/dist/guest/{helpers.d.ts → runtime/csc.d.ts} +1 -1
  337. package/dist/guest/{helpers.js → runtime/csc.js} +7 -2
  338. package/dist/guest/runtime/fs.d.ts +2 -0
  339. package/dist/guest/runtime/fs.js +6 -0
  340. package/dist/guest/runtime/log.d.ts +3 -0
  341. package/dist/guest/runtime/log.js +22 -0
  342. package/dist/guest/runtime/paths.d.ts +13 -0
  343. package/dist/guest/runtime/paths.js +14 -0
  344. package/dist/guest/{ports.js → runtime/ports.js} +8 -2
  345. package/dist/guest/runtime/process.d.ts +15 -0
  346. package/dist/guest/runtime/process.js +59 -0
  347. package/dist/guest/{project-context.js → runtime/project-context.js} +1 -1
  348. package/dist/guest/runtime/session.d.ts +5 -0
  349. package/dist/guest/runtime/session.js +10 -0
  350. package/dist/guest/runtime/status.d.ts +7 -0
  351. package/dist/guest/runtime/status.js +57 -0
  352. package/dist/guest/{cmdline.js → sessions/cmdline.js} +10 -4
  353. package/dist/guest/{ptyhost.js → sessions/pty-host.js} +12 -5
  354. package/dist/guest/{view.js → sessions/viewer.js} +8 -11
  355. package/dist/guest/setup/claude-mem.d.ts +10 -0
  356. package/dist/guest/setup/{claude.js → claude-mem.js} +18 -78
  357. package/dist/guest/setup/{claude.d.ts → claude-profile.d.ts} +0 -10
  358. package/dist/guest/setup/claude-profile.js +89 -0
  359. package/dist/guest/setup/desktop.d.ts +2 -0
  360. package/dist/guest/setup/desktop.js +32 -0
  361. package/dist/guest/setup/environment.js +28 -5
  362. package/dist/guest/setup/{user.d.ts → git-identity.d.ts} +0 -2
  363. package/dist/guest/setup/git-identity.js +34 -0
  364. package/dist/guest/{gitrules.d.ts → setup/git-rules.d.ts} +1 -1
  365. package/dist/guest/setup/git-rules.js +50 -0
  366. package/dist/guest/setup/hooks.js +22 -5
  367. package/dist/guest/setup/{policy.js → managed-policy.js} +2 -2
  368. package/dist/guest/toolchains/catalogue.d.ts +4 -4
  369. package/dist/guest/toolchains/catalogue.js +30 -7
  370. package/dist/guest/toolchains/detect.d.ts +12 -0
  371. package/dist/guest/toolchains/detect.js +54 -0
  372. package/dist/guest/toolchains/index.d.ts +3 -17
  373. package/dist/guest/toolchains/index.js +1 -106
  374. package/dist/guest/toolchains/install.d.ts +20 -0
  375. package/dist/guest/toolchains/install.js +29 -0
  376. package/dist/guest/toolchains/languages/go.d.ts +3 -0
  377. package/dist/guest/toolchains/{go.js → languages/go.js} +27 -9
  378. package/dist/guest/toolchains/languages/java.d.ts +8 -0
  379. package/dist/guest/toolchains/{java.js → languages/java.js} +57 -18
  380. package/dist/guest/toolchains/languages/node.d.ts +3 -0
  381. package/dist/guest/toolchains/{node.js → languages/node.js} +51 -18
  382. package/dist/guest/toolchains/languages/php.d.ts +3 -0
  383. package/dist/guest/toolchains/{scripting → languages}/php.js +36 -11
  384. package/dist/guest/toolchains/languages/python-tools.d.ts +3 -0
  385. package/dist/guest/toolchains/languages/python-tools.js +12 -0
  386. package/dist/guest/toolchains/languages/python.d.ts +3 -0
  387. package/dist/guest/toolchains/{python.js → languages/python.js} +29 -16
  388. package/dist/guest/toolchains/languages/ruby.d.ts +3 -0
  389. package/dist/guest/toolchains/{scripting → languages}/ruby.js +28 -10
  390. package/dist/guest/toolchains/leftovers.d.ts +1 -1
  391. package/dist/guest/toolchains/leftovers.js +13 -11
  392. package/dist/guest/toolchains/managers.d.ts +6 -6
  393. package/dist/guest/toolchains/managers.js +38 -17
  394. package/dist/guest/toolchains/native/binstall.d.ts +3 -2
  395. package/dist/guest/toolchains/native/binstall.js +20 -8
  396. package/dist/guest/toolchains/native/cpp.d.ts +2 -2
  397. package/dist/guest/toolchains/native/cpp.js +23 -8
  398. package/dist/guest/toolchains/native/dotnet.d.ts +5 -3
  399. package/dist/guest/toolchains/native/dotnet.js +72 -24
  400. package/dist/guest/toolchains/native/mesa.d.ts +2 -2
  401. package/dist/guest/toolchains/native/mesa.js +27 -10
  402. package/dist/guest/toolchains/native/msvc/environment.d.ts +4 -4
  403. package/dist/guest/toolchains/native/msvc/environment.js +30 -16
  404. package/dist/guest/toolchains/native/msvc/index.d.ts +3 -3
  405. package/dist/guest/toolchains/native/msvc/index.js +10 -8
  406. package/dist/guest/toolchains/native/msvc/packages.d.ts +1 -1
  407. package/dist/guest/toolchains/native/msvc/packages.js +69 -23
  408. package/dist/guest/toolchains/native/msvc/tree.d.ts +6 -6
  409. package/dist/guest/toolchains/native/msvc/tree.js +15 -9
  410. package/dist/guest/toolchains/native/rust-extras.d.ts +23 -0
  411. package/dist/guest/toolchains/native/rust-extras.js +100 -0
  412. package/dist/guest/toolchains/native/rust.d.ts +2 -2
  413. package/dist/guest/toolchains/native/rust.js +41 -10
  414. package/dist/guest/toolchains/{scripting → native}/vcruntime.d.ts +2 -2
  415. package/dist/guest/toolchains/{scripting → native}/vcruntime.js +17 -7
  416. package/dist/guest/toolchains/package-ledger.d.ts +17 -0
  417. package/dist/guest/toolchains/package-ledger.js +54 -0
  418. package/dist/guest/toolchains/plan.d.ts +3 -24
  419. package/dist/guest/toolchains/plan.js +99 -111
  420. package/dist/guest/toolchains/runtimes.d.ts +6 -6
  421. package/dist/guest/toolchains/runtimes.js +31 -13
  422. package/dist/guest/toolchains/scheduler.d.ts +22 -0
  423. package/dist/guest/toolchains/scheduler.js +123 -0
  424. package/dist/guest/toolchains/setup.d.ts +10 -0
  425. package/dist/guest/toolchains/setup.js +22 -0
  426. package/dist/guest/toolchains/state-file.d.ts +3 -0
  427. package/dist/guest/toolchains/state-file.js +10 -0
  428. package/dist/guest/toolchains/step.d.ts +24 -0
  429. package/dist/guest/toolchains/step.js +1 -0
  430. package/dist/guest/toolchains/tool-env.d.ts +12 -0
  431. package/dist/guest/toolchains/tool-env.js +16 -0
  432. package/dist/guest/toolchains/tools/cli.d.ts +10 -0
  433. package/dist/guest/toolchains/{cli.js → tools/cli.js} +35 -15
  434. package/dist/guest/toolchains/tools/git.d.ts +3 -0
  435. package/dist/guest/toolchains/{git.js → tools/git.js} +38 -15
  436. package/dist/guest/toolchains/tools/pwsh.d.ts +4 -0
  437. package/dist/guest/toolchains/{pwsh.js → tools/pwsh.js} +14 -7
  438. package/dist/guest/toolchains/{vscode-profile.d.ts → tools/vscode-profile.d.ts} +6 -6
  439. package/dist/guest/toolchains/{vscode-profile.js → tools/vscode-profile.js} +28 -12
  440. package/dist/guest/toolchains/{vscode.d.ts → tools/vscode.d.ts} +6 -6
  441. package/dist/guest/toolchains/{vscode.js → tools/vscode.js} +67 -21
  442. package/dist/guest/toolchains/version-cache.d.ts +16 -0
  443. package/dist/guest/toolchains/version-cache.js +67 -0
  444. package/dist/host/agent-commands/commands.d.ts +13 -0
  445. package/dist/host/agent-commands/commands.js +33 -0
  446. package/dist/host/agent-commands/forwarders.d.ts +7 -0
  447. package/dist/host/agent-commands/forwarders.js +31 -0
  448. package/dist/host/agent-commands/index.d.ts +4 -0
  449. package/dist/host/agent-commands/index.js +4 -0
  450. package/dist/host/agent-commands/reconcile.d.ts +12 -0
  451. package/dist/host/agent-commands/reconcile.js +69 -0
  452. package/dist/host/agent-commands/user-path.d.ts +2 -0
  453. package/dist/host/agent-commands/user-path.js +33 -0
  454. package/dist/host/audit/collect.d.ts +2 -2
  455. package/dist/host/audit/collect.js +59 -22
  456. package/dist/host/audit/log.d.ts +2 -2
  457. package/dist/host/audit/log.js +24 -8
  458. package/dist/host/{attach.d.ts → channel/attach.d.ts} +2 -2
  459. package/dist/host/{attach.js → channel/attach.js} +33 -15
  460. package/dist/host/channel/channel.d.ts +51 -0
  461. package/dist/host/channel/channel.js +196 -0
  462. package/dist/host/channel/index.d.ts +2 -0
  463. package/dist/host/channel/index.js +2 -0
  464. package/dist/host/guard/agent-files.d.ts +7 -0
  465. package/dist/host/guard/agent-files.js +103 -0
  466. package/dist/host/guard/commands.d.ts +10 -0
  467. package/dist/host/guard/commands.js +123 -0
  468. package/dist/host/guard/file-hash.d.ts +4 -0
  469. package/dist/host/guard/file-hash.js +37 -0
  470. package/dist/host/guard/git-config.d.ts +5 -0
  471. package/dist/host/guard/git-config.js +62 -0
  472. package/dist/host/guard/git-dirs.d.ts +12 -0
  473. package/dist/host/guard/git-dirs.js +53 -0
  474. package/dist/host/guard/index.d.ts +5 -0
  475. package/dist/host/guard/index.js +4 -0
  476. package/dist/host/guard/mark-of-the-web.d.ts +8 -0
  477. package/dist/host/guard/mark-of-the-web.js +74 -0
  478. package/dist/host/guard/nested-repos.d.ts +14 -0
  479. package/dist/host/guard/nested-repos.js +88 -0
  480. package/dist/host/guard/quarantine.d.ts +3 -0
  481. package/dist/host/guard/quarantine.js +24 -0
  482. package/dist/host/guard/repo-guard.d.ts +10 -0
  483. package/dist/host/guard/repo-guard.js +36 -0
  484. package/dist/host/guard/store.d.ts +40 -0
  485. package/dist/host/guard/store.js +145 -0
  486. package/dist/host/guard/types.d.ts +27 -0
  487. package/dist/host/guard/types.js +3 -0
  488. package/dist/host/guard/watch-state.d.ts +9 -0
  489. package/dist/host/guard/watch-state.js +26 -0
  490. package/dist/host/launch/boot-projects.d.ts +17 -0
  491. package/dist/host/launch/{projects.js → boot-projects.js} +22 -13
  492. package/dist/host/{database-plan.d.ts → launch/database-plan.d.ts} +5 -5
  493. package/dist/host/{database-plan.js → launch/database-plan.js} +24 -13
  494. package/dist/host/launch/generate.d.ts +4 -0
  495. package/dist/host/launch/generate.js +77 -0
  496. package/dist/host/launch/index.d.ts +10 -0
  497. package/dist/host/launch/index.js +10 -0
  498. package/dist/host/launch/mappings.d.ts +5 -5
  499. package/dist/host/launch/mappings.js +37 -24
  500. package/dist/host/launch/pc-scan.d.ts +5 -0
  501. package/dist/host/{pc-scan.js → launch/pc-scan.js} +20 -13
  502. package/dist/host/launch/project-scan.d.ts +7 -0
  503. package/dist/host/{project-scan.js → launch/project-scan.js} +29 -21
  504. package/dist/host/launch/session-file.d.ts +23 -0
  505. package/dist/host/launch/session-file.js +73 -0
  506. package/dist/host/launch/stage.d.ts +5 -5
  507. package/dist/host/launch/stage.js +14 -13
  508. package/dist/host/launch/toolchains.d.ts +4 -0
  509. package/dist/host/launch/toolchains.js +11 -0
  510. package/dist/host/launch/{wsb.d.ts → wsb-file.d.ts} +4 -2
  511. package/dist/host/launch/wsb-file.js +56 -0
  512. package/dist/host/life/crash-report.d.ts +8 -0
  513. package/dist/host/life/crash-report.js +87 -0
  514. package/dist/host/life/index.d.ts +6 -0
  515. package/dist/host/life/index.js +6 -0
  516. package/dist/host/life/keep-awake.d.ts +10 -0
  517. package/dist/host/life/keep-awake.js +29 -0
  518. package/dist/host/life/life-record.d.ts +48 -0
  519. package/dist/host/life/life-record.js +76 -0
  520. package/dist/host/life/stop-events.d.ts +27 -0
  521. package/dist/host/life/stop-events.js +96 -0
  522. package/dist/host/life/stop-warning.d.ts +4 -0
  523. package/dist/host/life/stop-warning.js +25 -0
  524. package/dist/host/life/windows-update.d.ts +3 -0
  525. package/dist/host/life/windows-update.js +11 -0
  526. package/dist/host/native.d.ts +4 -0
  527. package/dist/host/native.js +11 -0
  528. package/dist/host/network/index.d.ts +1 -0
  529. package/dist/host/network/index.js +1 -0
  530. package/dist/host/{port-forward.d.ts → network/port-forward.d.ts} +1 -1
  531. package/dist/host/{port-forward.js → network/port-forward.js} +16 -10
  532. package/dist/host/profile/accounts.d.ts +37 -0
  533. package/dist/host/profile/accounts.js +146 -0
  534. package/dist/host/profile/claude-login.d.ts +22 -0
  535. package/dist/host/profile/claude-login.js +57 -0
  536. package/dist/host/{claude-profile.d.ts → profile/claude-profile.d.ts} +9 -9
  537. package/dist/host/{claude-profile.js → profile/claude-profile.js} +32 -22
  538. package/dist/host/profile/index.d.ts +7 -0
  539. package/dist/host/profile/index.js +7 -0
  540. package/dist/host/profile/personalize.d.ts +2 -0
  541. package/dist/host/profile/personalize.js +127 -0
  542. package/dist/host/profile/reg-file.d.ts +8 -0
  543. package/dist/host/profile/reg-file.js +45 -0
  544. package/dist/host/profile/secret-files.d.ts +2 -0
  545. package/dist/host/profile/secret-files.js +25 -0
  546. package/dist/host/profile/secret-patterns.d.ts +6 -0
  547. package/dist/host/profile/secret-patterns.js +128 -0
  548. package/dist/host/profile/secrets.d.ts +12 -0
  549. package/dist/host/profile/secrets.js +100 -0
  550. package/dist/host/projects/index.d.ts +4 -0
  551. package/dist/host/projects/index.js +4 -0
  552. package/dist/host/{join.d.ts → projects/join.d.ts} +12 -9
  553. package/dist/host/{join.js → projects/join.js} +62 -33
  554. package/dist/host/projects/known.d.ts +28 -0
  555. package/dist/host/projects/known.js +55 -0
  556. package/dist/host/projects/mapper.d.ts +29 -0
  557. package/dist/host/projects/mapper.js +88 -0
  558. package/dist/host/projects/registry.d.ts +83 -0
  559. package/dist/host/projects/registry.js +136 -0
  560. package/dist/host/sandbox/doctor.d.ts +2 -0
  561. package/dist/host/sandbox/doctor.js +42 -0
  562. package/dist/host/sandbox/host-claude.d.ts +1 -0
  563. package/dist/host/sandbox/host-claude.js +26 -0
  564. package/dist/host/sandbox/index.d.ts +6 -0
  565. package/dist/host/sandbox/index.js +6 -0
  566. package/dist/host/{platform.d.ts → sandbox/platform.d.ts} +0 -5
  567. package/dist/host/sandbox/platform.js +60 -0
  568. package/dist/host/sandbox/probe.d.ts +3 -0
  569. package/dist/host/sandbox/probe.js +47 -0
  570. package/dist/host/{window.js → sandbox/window.js} +7 -5
  571. package/dist/host/{wsb.js → sandbox/wsb-cli.js} +31 -8
  572. package/dist/host/{cleanup.js → storage/cleanup.js} +27 -12
  573. package/dist/host/storage/index.d.ts +2 -0
  574. package/dist/host/storage/index.js +2 -0
  575. package/dist/host/storage/state-files.d.ts +4 -0
  576. package/dist/host/storage/state-files.js +10 -0
  577. package/dist/host/test-guard.js +1 -1
  578. package/dist/host/tools/conpty.d.ts +8 -0
  579. package/dist/host/tools/conpty.js +58 -0
  580. package/dist/host/tools/index.d.ts +2 -0
  581. package/dist/host/tools/index.js +2 -0
  582. package/dist/host/{terminal.d.ts → tools/windows-terminal.d.ts} +2 -10
  583. package/dist/host/{terminal.js → tools/windows-terminal.js} +33 -57
  584. package/dist/host/workspace-view/active-views.d.ts +3 -0
  585. package/dist/host/workspace-view/active-views.js +22 -0
  586. package/dist/host/workspace-view/index.d.ts +2 -18
  587. package/dist/host/workspace-view/index.js +2 -49
  588. package/dist/host/workspace-view/plan.d.ts +16 -0
  589. package/dist/host/workspace-view/plan.js +50 -0
  590. package/dist/host/workspace-view/rules.js +10 -3
  591. package/dist/host/workspace-view/view-state.d.ts +10 -0
  592. package/dist/host/workspace-view/view-state.js +31 -0
  593. package/dist/host/workspace-view/view.d.ts +1 -0
  594. package/dist/host/workspace-view/view.js +51 -55
  595. package/dist/runtime/daemon.js +4220 -1968
  596. package/dist/runtime/db.js +2134 -849
  597. package/dist/runtime/gitguard.js +29 -11
  598. package/dist/runtime/main.js +4687 -2243
  599. package/dist/runtime/netproxy.js +1644 -420
  600. package/dist/runtime/view.js +1356 -428
  601. package/dist/selftest/accounts.test.d.ts +1 -1
  602. package/dist/selftest/accounts.test.js +20 -17
  603. package/dist/selftest/agent-commands.test.d.ts +1 -1
  604. package/dist/selftest/agent-commands.test.js +9 -5
  605. package/dist/selftest/audit.test.d.ts +1 -1
  606. package/dist/selftest/audit.test.js +46 -13
  607. package/dist/selftest/channel.test.d.ts +1 -1
  608. package/dist/selftest/channel.test.js +63 -16
  609. package/dist/selftest/cli.test.d.ts +1 -1
  610. package/dist/selftest/cli.test.js +68 -16
  611. package/dist/selftest/cmdline.test.d.ts +1 -1
  612. package/dist/selftest/cmdline.test.js +36 -7
  613. package/dist/selftest/config.test.d.ts +1 -1
  614. package/dist/selftest/config.test.js +12 -5
  615. package/dist/selftest/data.test.d.ts +1 -1
  616. package/dist/selftest/data.test.js +35 -6
  617. package/dist/selftest/detect.test.d.ts +1 -1
  618. package/dist/selftest/detect.test.js +22 -9
  619. package/dist/selftest/generate.test.d.ts +1 -1
  620. package/dist/selftest/generate.test.js +33 -9
  621. package/dist/selftest/git-access.test.d.ts +1 -1
  622. package/dist/selftest/git-access.test.js +42 -4
  623. package/dist/selftest/guest-boot.test.d.ts +1 -1
  624. package/dist/selftest/guest-boot.test.js +25 -7
  625. package/dist/selftest/host-sim.test.d.ts +1 -1
  626. package/dist/selftest/host-sim.test.js +27 -3
  627. package/dist/selftest/hostile-input.test.d.ts +1 -1
  628. package/dist/selftest/hostile-input.test.js +5 -5
  629. package/dist/selftest/index.d.ts +1 -1
  630. package/dist/selftest/index.js +72 -16
  631. package/dist/selftest/layout.test.d.ts +2 -0
  632. package/dist/selftest/layout.test.js +131 -0
  633. package/dist/selftest/links.test.d.ts +1 -1
  634. package/dist/selftest/links.test.js +16 -11
  635. package/dist/selftest/live-daemon.test.d.ts +1 -1
  636. package/dist/selftest/live-daemon.test.js +20 -8
  637. package/dist/selftest/live-git.test.d.ts +1 -1
  638. package/dist/selftest/live-git.test.js +13 -4
  639. package/dist/selftest/live-network.test.d.ts +1 -1
  640. package/dist/selftest/live-network.test.js +24 -9
  641. package/dist/selftest/live-projects.test.d.ts +1 -1
  642. package/dist/selftest/live-projects.test.js +47 -20
  643. package/dist/selftest/live-terminal.test.d.ts +1 -1
  644. package/dist/selftest/live-terminal.test.js +41 -15
  645. package/dist/selftest/local-config.test.d.ts +1 -1
  646. package/dist/selftest/local-config.test.js +64 -16
  647. package/dist/selftest/mirror.test.d.ts +1 -1
  648. package/dist/selftest/mirror.test.js +102 -32
  649. package/dist/selftest/network.test.d.ts +1 -1
  650. package/dist/selftest/network.test.js +17 -8
  651. package/dist/selftest/personalization.test.d.ts +1 -1
  652. package/dist/selftest/personalization.test.js +12 -5
  653. package/dist/selftest/projects.test.d.ts +1 -1
  654. package/dist/selftest/projects.test.js +280 -85
  655. package/dist/selftest/repair.test.d.ts +1 -1
  656. package/dist/selftest/repair.test.js +17 -5
  657. package/dist/selftest/repo-guard.test.d.ts +1 -1
  658. package/dist/selftest/repo-guard.test.js +21 -20
  659. package/dist/selftest/secrets.test.d.ts +1 -1
  660. package/dist/selftest/secrets.test.js +57 -13
  661. package/dist/selftest/setup.test.d.ts +1 -1
  662. package/dist/selftest/setup.test.js +25 -5
  663. package/dist/selftest/{fixtures.d.ts → support/fixtures.d.ts} +5 -3
  664. package/dist/selftest/{fixtures.js → support/fixtures.js} +95 -17
  665. package/dist/selftest/{harness.js → support/harness.js} +24 -7
  666. package/dist/selftest/{live.d.ts → support/live.d.ts} +2 -2
  667. package/dist/selftest/{live.js → support/live.js} +34 -10
  668. package/dist/selftest/support/suite.js +1 -0
  669. package/dist/selftest/sync.test.d.ts +1 -1
  670. package/dist/selftest/sync.test.js +64 -26
  671. package/dist/selftest/test-guard.test.d.ts +1 -1
  672. package/dist/selftest/test-guard.test.js +43 -15
  673. package/dist/selftest/toolchains.test.d.ts +1 -1
  674. package/dist/selftest/toolchains.test.js +135 -36
  675. package/dist/selftest/workspace-view.test.d.ts +1 -1
  676. package/dist/selftest/workspace-view.test.js +48 -11
  677. package/dist/selftest/workspace.test.d.ts +1 -1
  678. package/dist/selftest/workspace.test.js +13 -4
  679. package/dist/shared/{apps.d.ts → apps/catalogue.d.ts} +1 -11
  680. package/dist/shared/apps/catalogue.js +768 -0
  681. package/dist/shared/apps/index.d.ts +2 -0
  682. package/dist/shared/apps/index.js +2 -0
  683. package/dist/shared/apps/selection.d.ts +11 -0
  684. package/dist/shared/apps/selection.js +40 -0
  685. package/dist/shared/channel/index.d.ts +2 -0
  686. package/dist/shared/channel/index.js +2 -0
  687. package/dist/shared/channel/run-dir.d.ts +30 -0
  688. package/dist/shared/channel/run-dir.js +84 -0
  689. package/dist/shared/{schema.d.ts → channel/schema.d.ts} +38 -21
  690. package/dist/shared/{schema.js → channel/schema.js} +62 -35
  691. package/dist/shared/download/archive.d.ts +13 -0
  692. package/dist/shared/download/archive.js +57 -0
  693. package/dist/shared/download/downloader.d.ts +35 -0
  694. package/dist/shared/download/downloader.js +110 -0
  695. package/dist/shared/download/github.d.ts +16 -0
  696. package/dist/shared/download/github.js +74 -0
  697. package/dist/shared/download/http.d.ts +5 -0
  698. package/dist/shared/download/http.js +30 -0
  699. package/dist/shared/download/index.d.ts +5 -0
  700. package/dist/shared/download/index.js +5 -0
  701. package/dist/shared/download/spawn.d.ts +2 -0
  702. package/dist/shared/download/spawn.js +7 -0
  703. package/dist/shared/io/index.d.ts +3 -0
  704. package/dist/shared/io/index.js +3 -0
  705. package/dist/shared/io/json-file.d.ts +10 -0
  706. package/dist/shared/io/json-file.js +21 -0
  707. package/dist/shared/io/json.d.ts +13 -0
  708. package/dist/shared/io/json.js +49 -0
  709. package/dist/shared/{safe-remove.js → io/safe-remove.js} +32 -7
  710. package/dist/shared/{netrules.js → network/firewall-rules.js} +36 -5
  711. package/dist/shared/network/index.d.ts +2 -0
  712. package/dist/shared/network/index.js +2 -0
  713. package/dist/shared/{netpolicy.js → network/policy.js} +66 -11
  714. package/dist/shared/{paths.js → paths/claude-paths.js} +12 -2
  715. package/dist/shared/{guest-paths.d.ts → paths/guest-paths.d.ts} +6 -12
  716. package/dist/shared/{guest-paths.js → paths/guest-paths.js} +53 -36
  717. package/dist/shared/paths/index.d.ts +3 -0
  718. package/dist/shared/paths/index.js +3 -0
  719. package/dist/shared/{projects.js → paths/projects.js} +13 -3
  720. package/dist/shared/pty/client.d.ts +21 -0
  721. package/dist/shared/pty/client.js +79 -0
  722. package/dist/shared/{console-input.js → pty/console-input.js} +26 -6
  723. package/dist/shared/pty/index.d.ts +6 -0
  724. package/dist/shared/pty/index.js +6 -0
  725. package/dist/shared/pty/input-joiner.d.ts +15 -0
  726. package/dist/shared/pty/input-joiner.js +44 -0
  727. package/dist/shared/pty/output-filter.d.ts +13 -0
  728. package/dist/shared/pty/output-filter.js +140 -0
  729. package/dist/shared/pty/protocol.d.ts +36 -0
  730. package/dist/shared/pty/protocol.js +60 -0
  731. package/dist/shared/pty/terminal.d.ts +24 -0
  732. package/dist/shared/pty/terminal.js +147 -0
  733. package/dist/shared/test-guard.js +3 -1
  734. package/dist/sync/claude-mem.d.ts +1 -1
  735. package/dist/sync/claude-mem.js +9 -4
  736. package/dist/sync/history.d.ts +1 -29
  737. package/dist/sync/history.js +57 -45
  738. package/dist/sync/index.d.ts +5 -0
  739. package/dist/sync/index.js +5 -0
  740. package/dist/sync/sync-cycle.d.ts +18 -0
  741. package/dist/sync/sync-cycle.js +85 -0
  742. package/dist/sync/sync-state.d.ts +32 -0
  743. package/dist/sync/sync-state.js +37 -0
  744. package/dist/sync/watcher.d.ts +0 -18
  745. package/dist/sync/watcher.js +66 -100
  746. package/native/keep-awake.ps1 +8 -0
  747. package/native/power.cs +23 -0
  748. package/native/stop-events.ps1 +38 -0
  749. package/package.json +11 -3
  750. package/sandbox/linkgate.cs +98 -0
  751. package/sandbox/memlog.ps1 +15 -6
  752. package/schemas/config.schema.json +34 -1
  753. package/schemas/sandbox-config.schema.json +34 -1
  754. package/dist/cli/boot-progress.d.ts +0 -22
  755. package/dist/cli/boot-progress.js +0 -59
  756. package/dist/cli/commands/launch.d.ts +0 -32
  757. package/dist/cli/commands/launch.js +0 -421
  758. package/dist/cli/commands/maintenance.d.ts +0 -10
  759. package/dist/cli/commands/maintenance.js +0 -220
  760. package/dist/cli/commands/project.d.ts +0 -33
  761. package/dist/cli/commands/project.js +0 -102
  762. package/dist/cli/commands/projects.d.ts +0 -14
  763. package/dist/cli/commands/projects.js +0 -146
  764. package/dist/cli/commands/restart.d.ts +0 -6
  765. package/dist/cli/commands/restart.js +0 -95
  766. package/dist/cli/commands/sessions.d.ts +0 -12
  767. package/dist/cli/commands/sessions.js +0 -258
  768. package/dist/cli/menu/settings/editors.js +0 -305
  769. package/dist/cli/tui/dialogs.d.ts +0 -57
  770. package/dist/cli/tui/dialogs.js +0 -162
  771. package/dist/core/config.js +0 -109
  772. package/dist/core/project-policy.d.ts +0 -62
  773. package/dist/core/project-policy.js +0 -121
  774. package/dist/core/schema.d.ts +0 -6
  775. package/dist/core/schema.js +0 -8
  776. package/dist/core/util.d.ts +0 -62
  777. package/dist/core/util.js +0 -156
  778. package/dist/core/workspace.d.ts +0 -35
  779. package/dist/core/workspace.js +0 -206
  780. package/dist/guest/boot-env.d.ts +0 -4
  781. package/dist/guest/daemon.js +0 -57
  782. package/dist/guest/env.d.ts +0 -56
  783. package/dist/guest/env.js +0 -115
  784. package/dist/guest/gitrules.js +0 -11
  785. package/dist/guest/project-status.d.ts +0 -5
  786. package/dist/guest/project-status.js +0 -17
  787. package/dist/guest/setup/user.js +0 -51
  788. package/dist/guest/toolchains/cli.d.ts +0 -10
  789. package/dist/guest/toolchains/common.d.ts +0 -54
  790. package/dist/guest/toolchains/common.js +0 -147
  791. package/dist/guest/toolchains/databases/dynamodb.d.ts +0 -8
  792. package/dist/guest/toolchains/databases/dynamodb.js +0 -52
  793. package/dist/guest/toolchains/databases/index.d.ts +0 -6
  794. package/dist/guest/toolchains/databases/index.js +0 -62
  795. package/dist/guest/toolchains/databases/mongodb.d.ts +0 -3
  796. package/dist/guest/toolchains/databases/mongodb.js +0 -31
  797. package/dist/guest/toolchains/databases/mysql.d.ts +0 -3
  798. package/dist/guest/toolchains/databases/mysql.js +0 -38
  799. package/dist/guest/toolchains/databases/postgres.d.ts +0 -5
  800. package/dist/guest/toolchains/databases/postgres.js +0 -38
  801. package/dist/guest/toolchains/databases/redis.d.ts +0 -3
  802. package/dist/guest/toolchains/databases/redis.js +0 -16
  803. package/dist/guest/toolchains/git.d.ts +0 -3
  804. package/dist/guest/toolchains/go.d.ts +0 -3
  805. package/dist/guest/toolchains/java.d.ts +0 -8
  806. package/dist/guest/toolchains/node.d.ts +0 -3
  807. package/dist/guest/toolchains/pwsh.d.ts +0 -4
  808. package/dist/guest/toolchains/python.d.ts +0 -3
  809. package/dist/guest/toolchains/scripting/php.d.ts +0 -3
  810. package/dist/guest/toolchains/scripting/ruby.d.ts +0 -3
  811. package/dist/host/accounts.d.ts +0 -32
  812. package/dist/host/accounts.js +0 -128
  813. package/dist/host/agent-commands.d.ts +0 -25
  814. package/dist/host/agent-commands.js +0 -145
  815. package/dist/host/channel.d.ts +0 -38
  816. package/dist/host/channel.js +0 -163
  817. package/dist/host/generate.d.ts +0 -13
  818. package/dist/host/generate.js +0 -115
  819. package/dist/host/launch/projects.d.ts +0 -17
  820. package/dist/host/launch/wsb.js +0 -34
  821. package/dist/host/motw.d.ts +0 -17
  822. package/dist/host/motw.js +0 -74
  823. package/dist/host/pc-scan.d.ts +0 -6
  824. package/dist/host/personalize.d.ts +0 -10
  825. package/dist/host/personalize.js +0 -97
  826. package/dist/host/platform.js +0 -129
  827. package/dist/host/project-scan.d.ts +0 -7
  828. package/dist/host/projects.d.ts +0 -123
  829. package/dist/host/projects.js +0 -196
  830. package/dist/host/repo-guard.d.ts +0 -43
  831. package/dist/host/repo-guard.js +0 -347
  832. package/dist/host/secrets.d.ts +0 -14
  833. package/dist/host/secrets.js +0 -133
  834. package/dist/host/stops.d.ts +0 -67
  835. package/dist/host/stops.js +0 -126
  836. package/dist/shared/apps.js +0 -114
  837. package/dist/shared/download.d.ts +0 -63
  838. package/dist/shared/download.js +0 -238
  839. package/dist/shared/pty-client.d.ts +0 -108
  840. package/dist/shared/pty-client.js +0 -406
  841. package/dist/shared/rundir.d.ts +0 -41
  842. package/dist/shared/rundir.js +0 -96
  843. /package/dist/{guest/daemon.d.ts → cli/tui/list/list-types.js} +0 -0
  844. /package/dist/{guest/db.d.ts → cli/tui/screen.js} +0 -0
  845. /package/dist/core/{detect-databases.d.ts → detect/databases.d.ts} +0 -0
  846. /package/dist/{guest/toolchains → core/detect}/versions.d.ts +0 -0
  847. /package/dist/guest/{setup/agents.d.ts → agents/agent-installer.d.ts} +0 -0
  848. /package/dist/guest/{audit-parse.d.ts → audit/parse.d.ts} +0 -0
  849. /package/dist/guest/{guide.d.ts → boot/guide.d.ts} +0 -0
  850. /package/dist/guest/daemon/{shutdown.d.ts → idle-shutdown.d.ts} +0 -0
  851. /package/dist/guest/daemon/{session.d.ts → sessions.d.ts} +0 -0
  852. /package/dist/guest/{main.d.ts → entries/daemon.d.ts} +0 -0
  853. /package/dist/guest/{netproxy.d.ts → entries/db.d.ts} +0 -0
  854. /package/dist/{selftest/suite.js → guest/entries/gitguard.d.ts} +0 -0
  855. /package/dist/guest/{gitguard.d.ts → git/decision.d.ts} +0 -0
  856. /package/dist/guest/{ports.d.ts → runtime/ports.d.ts} +0 -0
  857. /package/dist/guest/{project-context.d.ts → runtime/project-context.d.ts} +0 -0
  858. /package/dist/guest/{cmdline.d.ts → sessions/cmdline.d.ts} +0 -0
  859. /package/dist/guest/{ptyhost.d.ts → sessions/pty-host.d.ts} +0 -0
  860. /package/dist/guest/{view.d.ts → sessions/viewer.d.ts} +0 -0
  861. /package/dist/guest/setup/{policy.d.ts → managed-policy.d.ts} +0 -0
  862. /package/dist/host/{window.d.ts → sandbox/window.d.ts} +0 -0
  863. /package/dist/host/{wsb.d.ts → sandbox/wsb-cli.d.ts} +0 -0
  864. /package/dist/host/{cleanup.d.ts → storage/cleanup.d.ts} +0 -0
  865. /package/dist/selftest/{harness.d.ts → support/harness.d.ts} +0 -0
  866. /package/dist/selftest/{suite.d.ts → support/suite.d.ts} +0 -0
  867. /package/dist/shared/{safe-remove.d.ts → io/safe-remove.d.ts} +0 -0
  868. /package/dist/shared/{netrules.d.ts → network/firewall-rules.d.ts} +0 -0
  869. /package/dist/shared/{netpolicy.d.ts → network/policy.d.ts} +0 -0
  870. /package/dist/shared/{paths.d.ts → paths/claude-paths.d.ts} +0 -0
  871. /package/dist/shared/{projects.d.ts → paths/projects.d.ts} +0 -0
  872. /package/dist/shared/{console-input.d.ts → pty/console-input.d.ts} +0 -0
@@ -3801,7 +3801,7 @@ var require_lodash = __commonJS({
3801
3801
  }
3802
3802
  return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
3803
3803
  });
3804
- var now2 = ctxNow || function() {
3804
+ var now = ctxNow || function() {
3805
3805
  return root.Date.now();
3806
3806
  };
3807
3807
  function after(n, func) {
@@ -3897,7 +3897,7 @@ var require_lodash = __commonJS({
3897
3897
  return lastCallTime === undefined2 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
3898
3898
  }
3899
3899
  function timerExpired() {
3900
- var time3 = now2();
3900
+ var time3 = now();
3901
3901
  if (shouldInvoke(time3)) {
3902
3902
  return trailingEdge(time3);
3903
3903
  }
@@ -3919,10 +3919,10 @@ var require_lodash = __commonJS({
3919
3919
  lastArgs = lastCallTime = lastThis = timerId = undefined2;
3920
3920
  }
3921
3921
  function flush() {
3922
- return timerId === undefined2 ? result2 : trailingEdge(now2());
3922
+ return timerId === undefined2 ? result2 : trailingEdge(now());
3923
3923
  }
3924
3924
  function debounced() {
3925
- var time3 = now2(), isInvoking = shouldInvoke(time3);
3925
+ var time3 = now(), isInvoking = shouldInvoke(time3);
3926
3926
  lastArgs = arguments;
3927
3927
  lastThis = this;
3928
3928
  lastCallTime = time3;
@@ -5297,7 +5297,7 @@ var require_lodash = __commonJS({
5297
5297
  lodash.nth = nth;
5298
5298
  lodash.noConflict = noConflict;
5299
5299
  lodash.noop = noop;
5300
- lodash.now = now2;
5300
+ lodash.now = now;
5301
5301
  lodash.pad = pad;
5302
5302
  lodash.padEnd = padEnd;
5303
5303
  lodash.padStart = padStart;
@@ -5531,89 +5531,21 @@ var require_lodash = __commonJS({
5531
5531
  }
5532
5532
  });
5533
5533
 
5534
- // src/shared/pty-client.ts
5535
- import net from "node:net";
5536
-
5537
- // src/shared/console-input.ts
5538
- import { spawn } from "node:child_process";
5539
-
5540
- // src/shared/system.ts
5541
- import path from "node:path";
5542
- var systemRoot = () => process.env.SystemRoot ?? process.env.WINDIR ?? "C:\\Windows";
5543
- var system32 = (exe) => path.join(systemRoot(), "System32", exe);
5544
- var SYSTEM = {
5545
- cmd: () => system32("cmd.exe"),
5546
- powershell: () => system32("WindowsPowerShell\\v1.0\\powershell.exe"),
5547
- tasklist: () => system32("tasklist.exe"),
5548
- tar: () => system32("tar.exe"),
5549
- reg: () => system32("reg.exe"),
5550
- netsh: () => system32("netsh.exe"),
5551
- netstat: () => system32("NETSTAT.EXE"),
5552
- route: () => system32("ROUTE.EXE"),
5553
- ipconfig: () => system32("ipconfig.exe"),
5554
- robocopy: () => system32("Robocopy.exe"),
5555
- shutdown: () => system32("shutdown.exe"),
5556
- dism: () => system32("Dism.exe"),
5557
- msiexec: () => system32("msiexec.exe")
5534
+ // src/shared/pty/protocol.ts
5535
+ var FrameType = {
5536
+ Hello: 1,
5537
+ Input: 2,
5538
+ Resize: 3,
5539
+ Restart: 4,
5540
+ Ping: 5,
5541
+ Output: 16,
5542
+ Exit: 17,
5543
+ Error: 18,
5544
+ Restarting: 19,
5545
+ Status: 20,
5546
+ Console: 21
5558
5547
  };
5559
-
5560
- // src/shared/console-input.ts
5561
- var script = (pid) => [
5562
- 'Add-Type -TypeDefinition @"',
5563
- "using System; using System.Runtime.InteropServices;",
5564
- "public static class SbxVtInput {",
5565
- ' [DllImport("kernel32.dll")] static extern bool FreeConsole();',
5566
- ' [DllImport("kernel32.dll")] static extern bool AttachConsole(uint pid);',
5567
- ' [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] static extern IntPtr CreateFileW(string name, uint access, uint share, IntPtr security, uint creation, uint flags, IntPtr template);',
5568
- ' [DllImport("kernel32.dll")] static extern bool GetConsoleMode(IntPtr handle, out uint mode);',
5569
- ' [DllImport("kernel32.dll")] static extern bool SetConsoleMode(IntPtr handle, uint mode);',
5570
- ' [DllImport("kernel32.dll")] static extern bool CloseHandle(IntPtr handle);',
5571
- " public static int On(uint pid) {",
5572
- " FreeConsole();",
5573
- " if (!AttachConsole(pid)) return 2;",
5574
- ' IntPtr input = CreateFileW("CONIN$", 0xC0000000, 3, IntPtr.Zero, 3, 0, IntPtr.Zero);',
5575
- " if (input == new IntPtr(-1)) return 3;",
5576
- " uint mode; bool ok = GetConsoleMode(input, out mode) && SetConsoleMode(input, mode | 0x200);",
5577
- " CloseHandle(input);",
5578
- " FreeConsole();",
5579
- " return ok ? 0 : 4;",
5580
- " }",
5581
- "}",
5582
- '"@',
5583
- "exit [SbxVtInput]::On(" + pid + ")"
5584
- ].join("\n");
5585
- var enableVtInput = () => {
5586
- if (process.platform !== "win32" || !process.stdin.isTTY) return { ready: Promise.resolve(false), stop: () => Promise.resolve() };
5587
- let child = null;
5588
- let exited = Promise.resolve();
5589
- const ready = new Promise((resolve) => {
5590
- try {
5591
- child = spawn(SYSTEM.powershell(), ["-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-EncodedCommand", Buffer.from(script(process.pid), "utf16le").toString("base64")], { stdio: "ignore", windowsHide: true });
5592
- } catch {
5593
- resolve(false);
5594
- return;
5595
- }
5596
- exited = new Promise((done) => {
5597
- child?.on("exit", (code) => {
5598
- resolve(code === 0);
5599
- done();
5600
- });
5601
- child?.on("error", () => {
5602
- resolve(false);
5603
- done();
5604
- });
5605
- });
5606
- });
5607
- return { ready, stop: () => {
5608
- if (child && child.exitCode === null && child.signalCode === null) child.kill();
5609
- return exited;
5610
- } };
5611
- };
5612
-
5613
- // src/shared/pty-client.ts
5614
- var FrameType = { Hello: 1, Input: 2, Resize: 3, Restart: 4, Ping: 5, Output: 16, Exit: 17, Error: 18, Restarting: 19, Status: 20, Console: 21 };
5615
5548
  var PING_INTERVAL_MS = 5e3;
5616
- var MOUSE_OFF = "\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1005l\x1B[?1006l\x1B[?1015l";
5617
5549
  var encodeFrame = (type, payload = Buffer.alloc(0)) => {
5618
5550
  const header = Buffer.alloc(5);
5619
5551
  header.writeUInt8(type, 0);
@@ -5649,6 +5581,40 @@ var FrameReader = class {
5649
5581
  return frames;
5650
5582
  }
5651
5583
  };
5584
+
5585
+ // src/shared/pty/client.ts
5586
+ import net from "node:net";
5587
+ var connectOnce = (host, port, timeoutMs) => {
5588
+ return new Promise((resolve, reject) => {
5589
+ const socket = net.connect({ host, port });
5590
+ const timer = setTimeout(() => {
5591
+ socket.destroy();
5592
+ reject(new Error("timed out connecting to " + host + ":" + port));
5593
+ }, timeoutMs);
5594
+ socket.once("connect", () => {
5595
+ clearTimeout(timer);
5596
+ socket.setNoDelay(true);
5597
+ resolve(socket);
5598
+ });
5599
+ socket.once("error", (e) => {
5600
+ clearTimeout(timer);
5601
+ reject(e);
5602
+ });
5603
+ });
5604
+ };
5605
+ var connect = async (endpoint, timeoutMs = 3e3) => {
5606
+ const errors = [];
5607
+ for (const address of endpoint.addresses) {
5608
+ try {
5609
+ return await connectOnce(address, endpoint.port, timeoutMs);
5610
+ } catch (e) {
5611
+ errors.push(address + ": " + (e instanceof Error ? e.message : String(e)));
5612
+ }
5613
+ }
5614
+ throw new Error("Could not reach the sandbox session (" + errors.join("; ") + ")");
5615
+ };
5616
+
5617
+ // src/shared/pty/output-filter.ts
5652
5618
  var KEPT_OSC = (body) => {
5653
5619
  const number4 = /^(\d{1,4})(;|$)/.exec(body);
5654
5620
  if (!number4) return false;
@@ -5756,39 +5722,100 @@ var OutputFilter = class {
5756
5722
  return out.subarray(0, n);
5757
5723
  }
5758
5724
  };
5759
- var connectOnce = (host, port, timeoutMs) => {
5760
- return new Promise((resolve, reject) => {
5761
- const socket = net.connect({ host, port });
5762
- const timer = setTimeout(() => {
5763
- socket.destroy();
5764
- reject(new Error("timed out connecting to " + host + ":" + port));
5765
- }, timeoutMs);
5766
- socket.once("connect", () => {
5767
- clearTimeout(timer);
5768
- socket.setNoDelay(true);
5769
- resolve(socket);
5770
- });
5771
- socket.once("error", (e) => {
5772
- clearTimeout(timer);
5773
- reject(e);
5774
- });
5775
- });
5725
+
5726
+ // src/shared/pty/console-input.ts
5727
+ import { spawn } from "node:child_process";
5728
+
5729
+ // src/shared/system.ts
5730
+ import path from "node:path";
5731
+ var systemRoot = () => process.env.SystemRoot ?? process.env.WINDIR ?? "C:\\Windows";
5732
+ var system32 = (exe) => path.join(systemRoot(), "System32", exe);
5733
+ var SYSTEM = {
5734
+ cmd: () => system32("cmd.exe"),
5735
+ powershell: () => system32("WindowsPowerShell\\v1.0\\powershell.exe"),
5736
+ tasklist: () => system32("tasklist.exe"),
5737
+ tar: () => system32("tar.exe"),
5738
+ reg: () => system32("reg.exe"),
5739
+ netsh: () => system32("netsh.exe"),
5740
+ netstat: () => system32("NETSTAT.EXE"),
5741
+ route: () => system32("ROUTE.EXE"),
5742
+ ipconfig: () => system32("ipconfig.exe"),
5743
+ robocopy: () => system32("Robocopy.exe"),
5744
+ shutdown: () => system32("shutdown.exe"),
5745
+ dism: () => system32("Dism.exe"),
5746
+ msiexec: () => system32("msiexec.exe")
5776
5747
  };
5777
- var connect = async (endpoint, timeoutMs = 3e3) => {
5778
- const errors = [];
5779
- for (const address of endpoint.addresses) {
5748
+
5749
+ // src/shared/pty/console-input.ts
5750
+ var script = (pid) => [
5751
+ 'Add-Type -TypeDefinition @"',
5752
+ "using System; using System.Runtime.InteropServices;",
5753
+ "public static class SbxVtInput {",
5754
+ ' [DllImport("kernel32.dll")] static extern bool FreeConsole();',
5755
+ ' [DllImport("kernel32.dll")] static extern bool AttachConsole(uint pid);',
5756
+ ' [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] static extern IntPtr CreateFileW(string name, uint access, uint share, IntPtr security, uint creation, uint flags, IntPtr template);',
5757
+ ' [DllImport("kernel32.dll")] static extern bool GetConsoleMode(IntPtr handle, out uint mode);',
5758
+ ' [DllImport("kernel32.dll")] static extern bool SetConsoleMode(IntPtr handle, uint mode);',
5759
+ ' [DllImport("kernel32.dll")] static extern bool CloseHandle(IntPtr handle);',
5760
+ " public static int On(uint pid) {",
5761
+ " FreeConsole();",
5762
+ " if (!AttachConsole(pid)) return 2;",
5763
+ ' IntPtr input = CreateFileW("CONIN$", 0xC0000000, 3, IntPtr.Zero, 3, 0, IntPtr.Zero);',
5764
+ " if (input == new IntPtr(-1)) return 3;",
5765
+ " uint mode; bool ok = GetConsoleMode(input, out mode) && SetConsoleMode(input, mode | 0x200);",
5766
+ " CloseHandle(input);",
5767
+ " FreeConsole();",
5768
+ " return ok ? 0 : 4;",
5769
+ " }",
5770
+ "}",
5771
+ '"@',
5772
+ "exit [SbxVtInput]::On(" + pid + ")"
5773
+ ].join("\n");
5774
+ var enableVtInput = () => {
5775
+ if (process.platform !== "win32" || !process.stdin.isTTY)
5776
+ return { ready: Promise.resolve(false), stop: () => Promise.resolve() };
5777
+ let child = null;
5778
+ let exited = Promise.resolve();
5779
+ const ready = new Promise((resolve) => {
5780
5780
  try {
5781
- return await connectOnce(address, endpoint.port, timeoutMs);
5782
- } catch (e) {
5783
- errors.push(address + ": " + (e instanceof Error ? e.message : String(e)));
5781
+ child = spawn(
5782
+ SYSTEM.powershell(),
5783
+ [
5784
+ "-NoLogo",
5785
+ "-NoProfile",
5786
+ "-NonInteractive",
5787
+ "-ExecutionPolicy",
5788
+ "Bypass",
5789
+ "-EncodedCommand",
5790
+ Buffer.from(script(process.pid), "utf16le").toString("base64")
5791
+ ],
5792
+ { stdio: "ignore", windowsHide: true }
5793
+ );
5794
+ } catch {
5795
+ resolve(false);
5796
+ return;
5784
5797
  }
5785
- }
5786
- throw new Error("Could not reach the sandbox session (" + errors.join("; ") + ")");
5787
- };
5788
- var fixWindowsKeys = (chunk) => {
5789
- if (!chunk.includes(8) && !chunk.includes(127)) return chunk;
5790
- return Buffer.from(chunk.map((b) => b === 8 ? 127 : b === 127 ? 8 : b));
5798
+ exited = new Promise((done) => {
5799
+ child?.on("exit", (code) => {
5800
+ resolve(code === 0);
5801
+ done();
5802
+ });
5803
+ child?.on("error", () => {
5804
+ resolve(false);
5805
+ done();
5806
+ });
5807
+ });
5808
+ });
5809
+ return {
5810
+ ready,
5811
+ stop: () => {
5812
+ if (child && child.exitCode === null && child.signalCode === null) child.kill();
5813
+ return exited;
5814
+ }
5815
+ };
5791
5816
  };
5817
+
5818
+ // src/shared/pty/input-joiner.ts
5792
5819
  var JOIN_MS = 30;
5793
5820
  var MAX_HELD = 64;
5794
5821
  var InputJoiner = class {
@@ -5809,13 +5836,21 @@ var InputJoiner = class {
5809
5836
  return out;
5810
5837
  }
5811
5838
  };
5812
- var unfinishedSequence = (data) => {
5839
+ function unfinishedSequence(data) {
5813
5840
  const start = data.lastIndexOf(27, -1);
5814
5841
  if (start === -1 || data.length - start > MAX_HELD) return data.length;
5815
5842
  const rest = data.subarray(start + 1);
5816
5843
  if (rest.length === 0) return start;
5817
- if (rest[0] === 91 || rest[0] === 79) return rest.subarray(1).every((b) => b >= 32 && b <= 63) && (rest[0] === 91 || rest.length === 1) ? start : data.length;
5844
+ if (rest[0] === 91 || rest[0] === 79)
5845
+ return rest.subarray(1).every((b) => b >= 32 && b <= 63) && (rest[0] === 91 || rest.length === 1) ? start : data.length;
5818
5846
  return data.length;
5847
+ }
5848
+
5849
+ // src/shared/pty/terminal.ts
5850
+ var MOUSE_OFF = "\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1005l\x1B[?1006l\x1B[?1015l";
5851
+ var fixWindowsKeys = (chunk) => {
5852
+ if (!chunk.includes(8) && !chunk.includes(127)) return chunk;
5853
+ return Buffer.from(chunk.map((b) => b === 8 ? 127 : b === 127 ? 8 : b));
5819
5854
  };
5820
5855
  var runTerminalClient = (socket, token, options = {}) => {
5821
5856
  const stdin = process.stdin;
@@ -5894,8 +5929,13 @@ var runTerminalClient = (socket, token, options = {}) => {
5894
5929
  if (frame.type === FrameType.Output) stdout.write(filter.push(frame.payload));
5895
5930
  else if (frame.type === FrameType.Console) passthrough = frame.payload.toString("latin1") === "conpty.dll";
5896
5931
  else if (frame.type === FrameType.Restarting) stdout.write(MOUSE_OFF + "\x1B[2J\x1B[3J\x1B[H");
5897
- else if (frame.type === FrameType.Exit) finish({ reason: "exit", exitCode: frame.payload.length >= 4 ? frame.payload.readInt32LE(0) : 1 });
5898
- else if (frame.type === FrameType.Error) finish({ reason: "error", message: frame.payload.toString("utf8").slice(0, 500).replace(/[\x00-\x1f\x7f]/g, " ") });
5932
+ else if (frame.type === FrameType.Exit)
5933
+ finish({ reason: "exit", exitCode: frame.payload.length >= 4 ? frame.payload.readInt32LE(0) : 1 });
5934
+ else if (frame.type === FrameType.Error)
5935
+ finish({
5936
+ reason: "error",
5937
+ message: frame.payload.toString("utf8").slice(0, 500).replace(/[\x00-\x1f\x7f]/g, " ")
5938
+ });
5899
5939
  }
5900
5940
  });
5901
5941
  socket.on("close", () => finish({ reason: "closed" }));
@@ -5914,8 +5954,11 @@ var runTerminalClient = (socket, token, options = {}) => {
5914
5954
  });
5915
5955
  };
5916
5956
 
5917
- // src/shared/rundir.ts
5918
- import fs from "node:fs";
5957
+ // src/guest/runtime/paths.ts
5958
+ import path3 from "node:path";
5959
+
5960
+ // src/shared/channel/run-dir.ts
5961
+ import fs2 from "node:fs";
5919
5962
  import path2 from "node:path";
5920
5963
 
5921
5964
  // node_modules/zod/v4/classic/external.js
@@ -25586,7 +25629,7 @@ function date4(params) {
25586
25629
  return _coercedDate(ZodDate, params);
25587
25630
  }
25588
25631
 
25589
- // src/shared/guest-paths.ts
25632
+ // src/shared/paths/guest-paths.ts
25590
25633
  var RESERVED_GUEST = /^C:\\(?:Windows|Program Files|Program Files \(x86\)|ProgramData|Users|AgentLaunch|AgentData|HostTools|nvm|Mirror)(?:\\|$)/i;
25591
25634
  var MIRROR_LETTER = /^[D-Z]$/;
25592
25635
  var DRIVE_PATH = /^([A-Za-z]):\\(.*)$/;
@@ -25597,93 +25640,122 @@ var isValidGuestPath = (guest) => {
25597
25640
  const letter = m[1].toUpperCase();
25598
25641
  const rest = m[2].replace(/\\+$/, "");
25599
25642
  if (rest === "" || BAD_CHARS.test(rest)) return false;
25600
- if (rest.split("\\").some((segment) => segment === "" || segment === "." || segment === ".." || /[. ]$/.test(segment))) return false;
25643
+ if (rest.split("\\").some((segment) => segment === "" || segment === "." || segment === ".." || /[. ]$/.test(segment)))
25644
+ return false;
25601
25645
  if (letter === "C") return !RESERVED_GUEST.test("C:\\" + rest);
25602
25646
  return MIRROR_LETTER.test(letter);
25603
25647
  };
25604
25648
 
25605
25649
  // src/core/schema/common.ts
25606
- var GuestPath = external_exports.string().refine(
25650
+ var GuestPathSchema = external_exports.string().refine(
25607
25651
  isValidGuestPath,
25608
25652
  "reserved or invalid guest path (a folder under C:\\ other than Windows, Program Files, Users, AgentData, Mirror, ..., or on drive D: to Z:)"
25609
25653
  );
25610
- var Name = external_exports.string().regex(/^[A-Za-z0-9_-]+$/, "letters, numbers, - and _ only");
25611
- var Strings = external_exports.array(external_exports.string());
25654
+ var NameSchema = external_exports.string().regex(/^[A-Za-z0-9_-]+$/, "letters, numbers, - and _ only");
25655
+ var StringsSchema = external_exports.array(external_exports.string());
25612
25656
  var toggle = (description) => external_exports.strictObject({ enabled: external_exports.boolean().describe(description) });
25613
- var SchemaRef = external_exports.string().describe("Path or URL of the JSON Schema for editor autocomplete and docs.");
25614
- var GitAccess = external_exports.enum(["full", "readonly", "none"]).describe("full: normal git. readonly: status/log/diff/show/blame only (no commit, push, checkout, ...). none: no git at all; .git is hidden from the agent.");
25615
- var Enabled = external_exports.union([external_exports.boolean(), external_exports.literal("auto")]);
25616
- var enabled = (what, markers) => Enabled.describe(what + ' true, false, or "auto" = only when the project has ' + markers + ".");
25617
- var Packages = (what, example) => Strings.describe(what + ", installed once and kept (e.g. " + example + ").");
25657
+ var SchemaRefSchema = external_exports.string().describe("Path or URL of the JSON Schema for editor autocomplete and docs.");
25658
+ var GitAccessSchema = external_exports.enum(["full", "readonly", "none"]).describe(
25659
+ "full: normal git. readonly: status/log/diff/show/blame only (no commit, push, checkout, ...). none: no git at all; .git is hidden from the agent."
25660
+ );
25661
+ var EnabledSchema = external_exports.union([external_exports.boolean(), external_exports.literal("auto")]);
25662
+ var enabled = (what, markers) => EnabledSchema.describe(what + ' true, false, or "auto" = only when the project has ' + markers + ".");
25663
+ var Packages = (what, example) => StringsSchema.describe(what + ", installed once and kept (e.g. " + example + ").");
25618
25664
 
25619
25665
  // src/core/schema/config.ts
25620
25666
  var import_lodash = __toESM(require_lodash(), 1);
25621
25667
 
25622
25668
  // src/core/schema/databases.ts
25623
- var Port = external_exports.number().int().min(1024).max(65535);
25624
- var dbEnabled = (name) => Enabled.describe(name + ': true, false, or "auto" = only when the project needs it (found from compose files, dependencies of every language, Prisma/ORM config and connection strings).');
25625
- var Databases = external_exports.strictObject({
25669
+ var PortSchema = external_exports.number().int().min(1024).max(65535);
25670
+ var dbEnabled = (name) => EnabledSchema.describe(
25671
+ name + ': true, false, or "auto" = only when the project needs it (found from compose files, dependencies of every language, Prisma/ORM config and connection strings).'
25672
+ );
25673
+ var DatabasesSchema = external_exports.strictObject({
25626
25674
  postgres: external_exports.strictObject({
25627
25675
  enabled: dbEnabled("PostgreSQL (with psql, pg_dump). User postgres, no password, localhost only"),
25628
25676
  version: external_exports.string().min(1).describe('"latest" or a major version such as "16". A compose file pinning postgres:<major> wins.'),
25629
- port: Port.describe("Port inside the sandbox.")
25677
+ port: PortSchema.describe("Port inside the sandbox.")
25630
25678
  }),
25631
25679
  mysql: external_exports.strictObject({
25632
25680
  enabled: dbEnabled("MySQL-compatible database (MariaDB). User root, no password, localhost only"),
25633
25681
  version: external_exports.string().min(1).describe('"lts" (newest MariaDB LTS) or a MariaDB series such as "11.4".'),
25634
- port: Port.describe("Port inside the sandbox.")
25682
+ port: PortSchema.describe("Port inside the sandbox.")
25635
25683
  }),
25636
25684
  mongodb: external_exports.strictObject({
25637
25685
  enabled: dbEnabled("MongoDB with mongosh, localhost only"),
25638
25686
  version: external_exports.string().min(1).describe('"latest" or a version prefix such as "8.0".'),
25639
- port: Port.describe("Port inside the sandbox.")
25687
+ port: PortSchema.describe("Port inside the sandbox.")
25640
25688
  }),
25641
25689
  redis: external_exports.strictObject({
25642
25690
  enabled: dbEnabled("Redis (community Windows build), localhost only"),
25643
- port: Port.describe("Port inside the sandbox.")
25691
+ port: PortSchema.describe("Port inside the sandbox.")
25644
25692
  }),
25645
25693
  dynamodb: external_exports.strictObject({
25646
- enabled: dbEnabled("DynamoDB Local (Amazon's official emulator, on the Java toolchain) with dynamodb-admin, a web UI to browse and edit tables"),
25647
- port: Port.describe("DynamoDB endpoint port inside the sandbox (http://localhost:<port>)."),
25648
- adminPort: Port.describe("dynamodb-admin web UI port (open http://localhost:<adminPort> in the sandbox's browser)."),
25694
+ enabled: dbEnabled(
25695
+ "DynamoDB Local (Amazon's official emulator, on the Java toolchain) with dynamodb-admin, a web UI to browse and edit tables"
25696
+ ),
25697
+ port: PortSchema.describe("DynamoDB endpoint port inside the sandbox (http://localhost:<port>)."),
25698
+ adminPort: PortSchema.describe(
25699
+ "dynamodb-admin web UI port (open http://localhost:<adminPort> in the sandbox's browser)."
25700
+ ),
25649
25701
  admin: external_exports.boolean().describe("Run dynamodb-admin next to DynamoDB Local.")
25650
25702
  }),
25651
25703
  sqlserver: external_exports.strictObject({
25652
- enabled: dbEnabled("SQL Server. It cannot run inside Windows Sandbox; when a project needs it you get a note to use Postgres or SQLite for local work")
25704
+ enabled: dbEnabled(
25705
+ "SQL Server. It cannot run inside Windows Sandbox; when a project needs it you get a note to use Postgres or SQLite for local work"
25706
+ )
25653
25707
  })
25654
25708
  });
25655
25709
 
25656
25710
  // src/core/schema/harness.ts
25657
- var Harness = external_exports.strictObject({
25711
+ var HarnessSchema = external_exports.strictObject({
25658
25712
  hostExecutable: external_exports.string().optional().describe("Executable copied from this PC when installed here (e.g. claude.exe)."),
25659
25713
  hostDir: external_exports.string().optional().describe('Folder of hostExecutable on this PC, or "auto" to search PATH and ~/.local/bin.'),
25660
25714
  npmPackage: external_exports.string().optional().describe("npm package installed inside the sandbox when there is no host copy."),
25661
25715
  npmBin: external_exports.string().optional().describe("Command the npm package provides."),
25662
25716
  uvPackage: external_exports.string().optional().describe("Python package installed with `uv tool install` inside the sandbox (e.g. aider-chat)."),
25663
25717
  uvBin: external_exports.string().optional().describe("Command the uv package provides."),
25664
- arguments: Strings.describe("Arguments always passed to the agent."),
25718
+ arguments: StringsSchema.describe("Arguments always passed to the agent."),
25665
25719
  environment: external_exports.record(external_exports.string(), external_exports.string()).describe("Environment variables for the agent."),
25666
- resumeArguments: Strings.optional().describe("Arguments used when the agent is restarted in place (e.g. after an account switch) so it resumes the conversation.")
25720
+ resumeArguments: StringsSchema.optional().describe(
25721
+ "Arguments used when the agent is restarted in place (e.g. after an account switch) so it resumes the conversation."
25722
+ )
25667
25723
  }).refine((h) => h.hostExecutable || h.npmPackage || h.uvPackage, "needs hostExecutable, npmPackage or uvPackage").refine((h) => !h.uvPackage || h.uvBin, "needs uvBin when uvPackage is set").refine((h) => !h.npmPackage || h.npmBin, "needs npmBin when npmPackage is set");
25668
25724
 
25669
25725
  // src/core/schema/profile.ts
25670
- var Secrets = external_exports.strictObject({
25671
- strip: external_exports.boolean().describe(`Remove credentials from everything copied into the sandbox (your Claude settings.json "env" and credential helpers, MCP servers' env, headers and arguments): AWS, Azure, Google Cloud, Cloudflare, hosting, CI, registries, payment, AI API keys, database URLs, anything named *_TOKEN / *_SECRET / *PASSWORD* / *_KEY or *PROD*, and values that look like keys.`),
25672
- allow: Strings.describe('Variable names that may go in anyway; * matches anything, e.g. ["AWS_REGION", "AWS_PROFILE", "MY_APP_*"].'),
25673
- patterns: Strings.describe('More variable names to treat as secrets; * matches anything, e.g. ["ACME_*", "*_INTERNAL_URL"].'),
25674
- warnFiles: external_exports.boolean().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.")
25726
+ var SecretsSchema = external_exports.strictObject({
25727
+ strip: external_exports.boolean().describe(
25728
+ `Remove credentials from everything copied into the sandbox (your Claude settings.json "env" and credential helpers, MCP servers' env, headers and arguments): AWS, Azure, Google Cloud, Cloudflare, hosting, CI, registries, payment, AI API keys, database URLs, anything named *_TOKEN / *_SECRET / *PASSWORD* / *_KEY or *PROD*, and values that look like keys.`
25729
+ ),
25730
+ allow: StringsSchema.describe(
25731
+ 'Variable names that may go in anyway; * matches anything, e.g. ["AWS_REGION", "AWS_PROFILE", "MY_APP_*"].'
25732
+ ),
25733
+ patterns: StringsSchema.describe(
25734
+ 'More variable names to treat as secrets; * matches anything, e.g. ["ACME_*", "*_INTERNAL_URL"].'
25735
+ ),
25736
+ warnFiles: external_exports.boolean().describe(
25737
+ "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."
25738
+ )
25675
25739
  });
25676
- var Attach = external_exports.strictObject({
25740
+ var AttachSchema = external_exports.strictObject({
25677
25741
  enabled: external_exports.boolean().describe("Allow sandbox claude --terminal / sandbox attach from this PC."),
25678
- reuseSession: external_exports.boolean().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)."),
25679
- auto: external_exports.boolean().describe("Starting an agent attaches this terminal automatically, as if you passed -t (only in an interactive terminal)."),
25680
- autoHide: external_exports.boolean().describe("Hide the Windows Sandbox window whenever this terminal attaches; it keeps running (sandbox show brings it back).")
25742
+ reuseSession: external_exports.boolean().describe(
25743
+ "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)."
25744
+ ),
25745
+ auto: external_exports.boolean().describe(
25746
+ "Starting an agent attaches this terminal automatically, as if you passed -t (only in an interactive terminal)."
25747
+ ),
25748
+ autoHide: external_exports.boolean().describe(
25749
+ "Hide the Windows Sandbox window whenever this terminal attaches; it keeps running (sandbox show brings it back)."
25750
+ )
25681
25751
  });
25682
- var AgentCommands = external_exports.strictObject({
25683
- enabled: external_exports.boolean().describe("(Beta) Typing an agent's own command on this PC (claude, codex, ...) starts it in a hidden sandbox for the folder you are in and attaches that terminal. Adds one folder to the start of YOUR PATH; off removes it. SANDBOX_AGENT_DIRECT=1 runs the real agent instead."),
25684
- agents: external_exports.union([external_exports.literal("auto"), external_exports.array(Name)]).describe('"auto" = every agent installed on this PC, or a list of agent names, e.g. ["claude", "codex"].')
25752
+ var AgentCommandsSchema = external_exports.strictObject({
25753
+ enabled: external_exports.boolean().describe(
25754
+ "(Beta) Typing an agent's own command on this PC (claude, codex, ...) starts it in a hidden sandbox for the folder you are in and attaches that terminal. Adds one folder to the start of YOUR PATH; off removes it. SANDBOX_AGENT_DIRECT=1 runs the real agent instead."
25755
+ ),
25756
+ agents: external_exports.union([external_exports.literal("auto"), external_exports.array(NameSchema)]).describe('"auto" = every agent installed on this PC, or a list of agent names, e.g. ["claude", "codex"].')
25685
25757
  });
25686
- var ClaudeProfile = external_exports.strictObject({
25758
+ var ClaudeProfileSchema = external_exports.strictObject({
25687
25759
  enabled: external_exports.boolean().describe("Copy selected Claude settings from this PC into the sandbox."),
25688
25760
  hostDir: external_exports.string().describe('Your Claude folder, or "auto" (~/.claude or CLAUDE_CONFIG_DIR).'),
25689
25761
  include: external_exports.array(external_exports.string().regex(/^[A-Za-z0-9._-]+$/)).describe("Files and folders copied from it."),
@@ -25691,25 +25763,37 @@ var ClaudeProfile = external_exports.strictObject({
25691
25763
  copyCredentials: external_exports.boolean().describe("Copy your Claude LOGIN into the sandbox. Prefer sandbox account instead."),
25692
25764
  overwrite: external_exports.boolean().describe("Refresh these settings from this PC on every launch."),
25693
25765
  syncHistory: external_exports.boolean().describe("Bring conversation history in, and sync new history back (path-translated)."),
25694
- historyScope: external_exports.enum(["project", "all"]).describe(`Which history comes in: "project" = only the projects in this sandbox (other projects' conversations, file backups and prompts stay on this PC), "all" = everything. Only this sandbox's projects ever sync back.`),
25766
+ historyScope: external_exports.enum(["project", "all"]).describe(
25767
+ `Which history comes in: "project" = only the projects in this sandbox (other projects' conversations, file backups and prompts stay on this PC), "all" = everything. Only this sandbox's projects ever sync back.`
25768
+ ),
25695
25769
  syncClaudeMem: external_exports.boolean().describe("Bring claude-mem data into the sandbox (its settings and backups stay on this PC)."),
25696
- syncClaudeMemBack: external_exports.boolean().describe("Also copy claude-mem's database back to this PC when the sandbox closes. Off by default: what is in it is loaded into every Claude session on this PC, so a compromised agent could plant instructions there.")
25770
+ syncClaudeMemBack: external_exports.boolean().describe(
25771
+ "Also copy claude-mem's database back to this PC when the sandbox closes. Off by default: what is in it is loaded into every Claude session on this PC, so a compromised agent could plant instructions there."
25772
+ )
25697
25773
  });
25698
25774
 
25699
25775
  // src/core/schema/sandbox.ts
25700
- var GuestWorkspace = external_exports.union([external_exports.literal("auto"), external_exports.literal("mirror"), GuestPath]).describe('Where the workspace appears inside the sandbox. "auto" = C:\\Workspace\\<folder name>. "mirror" = the same path as on this PC, so absolute paths in configs and build caches match (another drive letter such as F: is a subst drive onto C:\\Mirror\\F); paths the sandbox reserves (C:\\Users\\..., C:\\Program Files\\...) fall back to "auto".');
25701
- var Mapping = external_exports.strictObject({
25776
+ var GuestWorkspaceSchema = external_exports.union([external_exports.literal("auto"), external_exports.literal("mirror"), GuestPathSchema]).describe(
25777
+ 'Where the workspace appears inside the sandbox. "auto" = C:\\Workspace\\<folder name>. "mirror" = the same path as on this PC, so absolute paths in configs and build caches match (another drive letter such as F: is a subst drive onto C:\\Mirror\\F); paths the sandbox reserves (C:\\Users\\..., C:\\Program Files\\...) fall back to "auto".'
25778
+ );
25779
+ var MappingSchema = external_exports.strictObject({
25702
25780
  host: external_exports.string().min(1).describe("Folder on this PC (relative paths are relative to the config file)."),
25703
- guest: external_exports.string().min(1).max(1024).optional().describe("Where it appears inside the sandbox, e.g. C:\\Assets, or on another drive letter (D: to Z:) such as F:\\SteamLibrary\\steamapps\\common\\Game (shown as F: at boot). Leave it out to use the same path as on this PC (a folder inside the project stays where it is in the project). A path the sandbox cannot use (C:\\Windows\\..., C:\\Users\\..., one already in use) goes to C:\\Mapped\\<drive>\\<path> instead, and the launch says so."),
25781
+ guest: external_exports.string().min(1).max(1024).optional().describe(
25782
+ "Where it appears inside the sandbox, e.g. C:\\Assets, or on another drive letter (D: to Z:) such as F:\\SteamLibrary\\steamapps\\common\\Game (shown as F: at boot). Leave it out to use the same path as on this PC (a folder inside the project stays where it is in the project). A full path only; one the sandbox cannot use (C:\\Windows\\..., C:\\Users\\..., one already in use) stops the launch with the fix."
25783
+ ),
25704
25784
  readOnly: external_exports.boolean().describe("true = the agent can only read it."),
25705
25785
  optional: external_exports.boolean().optional().describe("true = skip it quietly when the host folder does not exist.")
25706
25786
  });
25707
- var Sandbox = external_exports.strictObject({
25787
+ var SandboxSchema = external_exports.strictObject({
25708
25788
  memoryMb: external_exports.union([external_exports.literal("auto"), external_exports.number().int().min(2048)]).describe('Sandbox RAM in MB (>= 2048), or "auto": free RAM minus reserveHostMb, capped at maxMemoryMb.'),
25709
25789
  maxMemoryMb: external_exports.number().int().positive().describe('Upper limit for memoryMb "auto".'),
25710
25790
  maxMemoryPercent: external_exports.number().int().min(10).max(100).describe(`memoryMb "auto" never takes more than this share of this PC's total RAM (percent).`),
25711
- cpuLimit: external_exports.union([external_exports.literal("none"), external_exports.number().int().min(5).max(100)]).describe(`Most of this PC's CPU the sandbox may use, in percent (5-100), e.g. 50 keeps half free for you; "none" = no cap (Windows Sandbox would take every processor). Covers everything this tool starts in the sandbox (agents, installs, builds, its terminal).`),
25712
- pageFileMb: external_exports.number().int().min(0).max(262144).describe(`Size of the sandbox's paging file in MB, created at full size when it starts so it never grows while builds run (8 GB of its disk always stays free). Windows Sandbox starts with about 1 GB: parallel builds then fail with "The paging file is too small", and Windows grows the file under load. 0 = leave Windows' own.`),
25791
+ cpuLimit: external_exports.union([external_exports.literal("none"), external_exports.number().int().min(5).max(100)]).describe(
25792
+ `Most of this PC's CPU the sandbox may use, in percent (5-100), e.g. 50 keeps half free for you; "none" = no cap (Windows Sandbox would take every processor). Covers everything this tool starts in the sandbox (agents, installs, builds, its terminal).`
25793
+ ),
25794
+ pageFileMb: external_exports.number().int().min(0).max(262144).describe(
25795
+ `Size of the sandbox's paging file in MB, created at full size when it starts so it never grows while builds run (8 GB of its disk always stays free). Windows Sandbox starts with about 1 GB: parallel builds then fail with "The paging file is too small", and Windows grows the file under load. 0 = leave Windows' own.`
25796
+ ),
25713
25797
  reserveHostMb: external_exports.number().int().nonnegative().describe('RAM always left for this PC when memoryMb is "auto".'),
25714
25798
  vGpu: external_exports.boolean().describe("Virtual GPU. Off by default: Microsoft notes it widens the sandbox attack surface."),
25715
25799
  networking: external_exports.boolean().describe("Internet access. false is the only hard network isolation Windows Sandbox offers."),
@@ -25718,215 +25802,964 @@ var Sandbox = external_exports.strictObject({
25718
25802
  videoInput: external_exports.boolean().describe("Camera access."),
25719
25803
  printerRedirection: external_exports.boolean().describe("Printers from this PC."),
25720
25804
  protectedClient: external_exports.boolean().describe("Run the sandbox window in Protected Client mode (recommended)."),
25721
- headless: external_exports.boolean().describe("Hide the sandbox window (sbx-show brings it back). A headless sandbox shuts down when its last session ends."),
25722
- keepAwake: external_exports.boolean().describe("Keep this PC from sleeping while a sandbox runs, so agents left working overnight keep going (the screen may still turn off; closing a laptop lid still sleeps it).")
25805
+ headless: external_exports.boolean().describe(
25806
+ "Hide the sandbox window (sbx-show brings it back). A headless sandbox shuts down when its last session ends."
25807
+ ),
25808
+ keepAwake: external_exports.boolean().describe(
25809
+ "Keep this PC from sleeping while a sandbox runs, so agents left working overnight keep going (the screen may still turn off; closing a laptop lid still sleeps it)."
25810
+ )
25723
25811
  });
25724
- var Port2 = external_exports.number().int().min(1).max(65535);
25725
- var HostEntry = external_exports.string().max(253).regex(/^(@developer|(\*\.)?([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+)$/, "a host name like example.com, *.example.com, or @developer");
25726
- var Network = external_exports.strictObject({
25812
+ var PortSchema2 = external_exports.number().int().min(1).max(65535);
25813
+ var HostEntrySchema = external_exports.string().max(253).regex(
25814
+ /^(@developer|(\*\.)?([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+)$/,
25815
+ "a host name like example.com, *.example.com, or @developer"
25816
+ );
25817
+ var NetworkSchema = external_exports.strictObject({
25727
25818
  blockPrivateRanges: external_exports.boolean().describe("Block your LAN (10/8, 172.16/12, 192.168/16, SMB) from inside the sandbox."),
25728
- allowOnly: external_exports.array(HostEntry).describe("Only these hosts can be reached once the sandbox is set up (tools still download first). *.example.com covers its subdomains; @developer adds package registries, GitHub, toolchain downloads and the AI providers. Programs go through a proxy in the sandbox (HTTP_PROXY); anything else is blocked by its firewall. Empty = no limit."),
25729
- blockHosts: external_exports.array(external_exports.string().max(253).regex(/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, "a host name like telemetry.example.com")).describe("Never reachable from the sandbox, e.g. production servers or telemetry (each exact name; the sandbox's hosts file sends them nowhere)."),
25730
- forwardPorts: external_exports.array(external_exports.strictObject({
25731
- pc: Port2.describe("The port on this PC (localhost only)."),
25732
- sandbox: Port2.describe("The port inside the sandbox (a server there may listen on localhost only).")
25733
- })).describe("Reach servers in the sandbox from this PC: http://localhost:<pc> here goes to <sandbox> inside, while it runs. Nothing else on your network can use them."),
25819
+ allowOnly: external_exports.array(HostEntrySchema).describe(
25820
+ "Only these hosts can be reached once the sandbox is set up (tools still download first). *.example.com covers its subdomains; @developer adds package registries, GitHub, toolchain downloads and the AI providers. Programs go through a proxy in the sandbox (HTTP_PROXY); anything else is blocked by its firewall. Empty = no limit."
25821
+ ),
25822
+ blockHosts: external_exports.array(
25823
+ external_exports.string().max(253).regex(/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, "a host name like telemetry.example.com")
25824
+ ).describe(
25825
+ "Never reachable from the sandbox, e.g. production servers or telemetry (each exact name; the sandbox's hosts file sends them nowhere)."
25826
+ ),
25827
+ forwardPorts: external_exports.array(
25828
+ external_exports.strictObject({
25829
+ pc: PortSchema2.describe("The port on this PC (localhost only)."),
25830
+ sandbox: PortSchema2.describe("The port inside the sandbox (a server there may listen on localhost only).")
25831
+ })
25832
+ ).describe(
25833
+ "Reach servers in the sandbox from this PC: http://localhost:<pc> here goes to <sandbox> inside, while it runs. Nothing else on your network can use them."
25834
+ ),
25734
25835
  dns: external_exports.array(external_exports.string().regex(/^\d{1,3}(\.\d{1,3}){3}$/, "an IPv4 address like 1.1.1.1")).describe("DNS servers for the sandbox instead of your network's, e.g. 1.1.1.1 and 9.9.9.9."),
25735
- proxy: external_exports.string().regex(/^(https?:\/\/[^\s]+)?$/, "http://host:port").describe("An HTTP proxy the sandbox uses to reach the internet (HTTP_PROXY / HTTPS_PROXY for everything in it), e.g. http://proxy.corp:8080. Empty = none.")
25836
+ proxy: external_exports.string().regex(/^(https?:\/\/[^\s]+)?$/, "http://host:port").describe(
25837
+ "An HTTP proxy the sandbox uses to reach the internet (HTTP_PROXY / HTTPS_PROXY for everything in it), e.g. http://proxy.corp:8080. Empty = none."
25838
+ )
25736
25839
  });
25737
- var Audit = external_exports.strictObject({
25738
- enabled: external_exports.boolean().describe("Keep an audit log on this PC of what happened in your sandboxes: programs started (with their command lines), files changed in the project, sessions, and what the repo guard caught. The sandbox cannot change it. Read it with sandbox audit."),
25840
+ var AuditSchema = external_exports.strictObject({
25841
+ enabled: external_exports.boolean().describe(
25842
+ "Keep an audit log on this PC of what happened in your sandboxes: programs started (with their command lines), files changed in the project, sessions, and what the repo guard caught. The sandbox cannot change it. Read it with sandbox audit."
25843
+ ),
25739
25844
  days: external_exports.number().int().min(1).max(365).describe("Days the audit log is kept."),
25740
25845
  maxMb: external_exports.number().int().min(5).max(5e3).describe("Most space the audit log may take, in MB (older days go first). Days before today are compressed."),
25741
- processes: external_exports.boolean().describe("Record every program started in the sandbox with its command line (Windows process auditing; repeated runs are counted, not listed)."),
25846
+ processes: external_exports.boolean().describe(
25847
+ "Record every program started in the sandbox with its command line (Windows process auditing; repeated runs are counted, not listed)."
25848
+ ),
25742
25849
  files: external_exports.boolean().describe("Record the files changed in the project while the sandbox runs.")
25743
25850
  });
25744
- var WorkspaceFilter = external_exports.strictObject({
25745
- enabled: external_exports.boolean().describe("Keep what your .gitignore lists (.env files, node_modules, build output ...) out of the sandbox. The sandbox works on a copy of the project without those files, kept in step with it both ways within about a second; what it creates that is ignored (its own node_modules, builds) stays in the sandbox. Git works as usual. Off = the project folder itself is mapped."),
25851
+ var WorkspaceFilterSchema = external_exports.strictObject({
25852
+ enabled: external_exports.boolean().describe(
25853
+ "Keep what your .gitignore lists (.env files, node_modules, build output ...) out of the sandbox. The sandbox works on a copy of the project without those files, kept in step with it both ways within about a second; what it creates that is ignored (its own node_modules, builds) stays in the sandbox. Git works as usual. Off = the project folder itself is mapped."
25854
+ ),
25746
25855
  exclude: external_exports.array(external_exports.string().max(500)).describe("Also keep these out, as .gitignore patterns, e.g. secrets/, *.pem, data/private/."),
25747
25856
  include: external_exports.array(external_exports.string().max(500)).describe("Let these in although .gitignore lists them, e.g. .env.example, data/fixtures/.")
25748
25857
  });
25749
- var Git = external_exports.strictObject({ enabled: external_exports.boolean().describe("Provide Git for Windows (and Git Bash, which Claude Code needs)."), access: GitAccess });
25750
- var Provisioning = external_exports.strictObject({
25858
+ var GitSchema = external_exports.strictObject({
25859
+ enabled: external_exports.boolean().describe("Provide Git for Windows (and Git Bash, which Claude Code needs)."),
25860
+ access: GitAccessSchema
25861
+ });
25862
+ var ProvisioningSchema = external_exports.strictObject({
25751
25863
  copyFromHost: external_exports.boolean().describe("Copy Node, Git, nvm and the agent from this PC when they are installed here."),
25752
25864
  fallbackToInstall: external_exports.boolean().describe("Download anything that cannot be copied from this PC."),
25753
25865
  refresh: external_exports.boolean().describe("Re-copy / re-download everything on the next launch."),
25754
- git: Git,
25866
+ git: GitSchema,
25755
25867
  terminal: toggle("Windows Terminal as the sandbox window (downloaded once)."),
25756
- conpty: toggle("Agent sessions use Microsoft's newer pseudo console (conpty.dll, downloaded once) instead of the one built into Windows: no garbled screen after resizing, real scrollback for the mouse wheel. Off = the one built into Windows.")
25868
+ conpty: toggle(
25869
+ "Agent sessions use Microsoft's newer pseudo console (conpty.dll, downloaded once) instead of the one built into Windows: no garbled screen after resizing, real scrollback for the mouse wheel. Off = the one built into Windows."
25870
+ )
25757
25871
  });
25758
- var Downloads = external_exports.strictObject({
25759
- requireChecksum: external_exports.boolean().describe("Refuse any toolchain, database or tool download that has no published checksum (SHA-256/SHA-512) to verify it against. false = allow those, as before. Downloads that do have a published checksum are always verified. A project's .sandbox-config.json can only turn this on.")
25872
+ var DownloadsSchema = external_exports.strictObject({
25873
+ requireChecksum: external_exports.boolean().describe(
25874
+ "Refuse any toolchain, database or tool download that has no published checksum (SHA-256/SHA-512) to verify it against. false = allow those, as before. Downloads that do have a published checksum are always verified. A project's .sandbox-config.json can only turn this on."
25875
+ )
25760
25876
  });
25761
25877
 
25762
25878
  // src/core/schema/toolchains.ts
25763
- var Toolchains = external_exports.strictObject({
25879
+ var ToolchainsSchema = external_exports.strictObject({
25764
25880
  node: external_exports.strictObject({
25765
- version: external_exports.string().min(1).describe(`Default Node version for nvm. "host" = the Node on this PC. A project's .nvmrc / .node-version wins.`),
25766
- extraVersions: Strings.describe("More Node versions to install (switch with nvm use). On top of the up to 3 versions copied from this PC's nvm, not counted towards that limit."),
25881
+ version: external_exports.string().min(1).describe(
25882
+ `Default Node version for nvm. "host" = the Node on this PC. A project's .nvmrc / .node-version wins.`
25883
+ ),
25884
+ extraVersions: StringsSchema.describe(
25885
+ "More Node versions to install (switch with nvm use). On top of the up to 3 versions copied from this PC's nvm, not counted towards that limit."
25886
+ ),
25767
25887
  corepack: external_exports.boolean().describe(`pnpm and yarn through corepack (a project's "packageManager" in package.json picks the version).`),
25768
- volta: Enabled.describe(`Volta: true, false, or "auto" = when the project's package.json has "volta" pins or this PC uses Volta. With pins, Volta's node/npm/yarn/pnpm come first on PATH.`),
25769
- globalPackages: Packages("npm packages installed globally into the default Node version", '["typescript", "npm-check-updates"]')
25888
+ volta: EnabledSchema.describe(
25889
+ `Volta: true, false, or "auto" = when the project's package.json has "volta" pins or this PC uses Volta. With pins, Volta's node/npm/yarn/pnpm come first on PATH.`
25890
+ ),
25891
+ globalPackages: Packages(
25892
+ "npm packages installed globally into the default Node version",
25893
+ '["typescript", "npm-check-updates"]'
25894
+ )
25770
25895
  }),
25771
25896
  python: external_exports.strictObject({
25772
- enabled: enabled("Python 3 (CPython with pip).", "pyproject.toml, requirements.txt, setup.py, Pipfile or .python-version"),
25897
+ enabled: enabled(
25898
+ "Python 3 (CPython with pip).",
25899
+ "pyproject.toml, requirements.txt, setup.py, Pipfile or .python-version"
25900
+ ),
25773
25901
  version: external_exports.string().min(1).describe(`Python 3 version prefix, e.g. "3" or "3.12". A project's .python-version wins.`),
25774
25902
  python2: external_exports.boolean().describe("Also install Python 2.7 as python2 / pip2."),
25775
- pyenv: Enabled.describe('pyenv-win (pyenv install / local / global): true, false, or "auto" = when this PC uses pyenv. .python-version is honoured either way, and `uv python install` always works.'),
25776
- tools: Packages("Python command-line tools installed with `uv tool install` (needs uv)", '["poetry", "ruff", "pre-commit"]')
25903
+ pyenv: EnabledSchema.describe(
25904
+ 'pyenv-win (pyenv install / local / global): true, false, or "auto" = when this PC uses pyenv. .python-version is honoured either way, and `uv python install` always works.'
25905
+ ),
25906
+ tools: Packages(
25907
+ "Python command-line tools installed with `uv tool install` (needs uv)",
25908
+ '["poetry", "ruff", "pre-commit"]'
25909
+ )
25777
25910
  }),
25778
25911
  rust: external_exports.strictObject({
25779
25912
  enabled: enabled("Rust via rustup (cargo, rustc).", "Cargo.toml or rust-toolchain(.toml)"),
25780
25913
  toolchain: external_exports.string().min(1).describe('Default toolchain, e.g. "stable". rust-toolchain.toml in a project wins.'),
25781
- host: external_exports.string().min(1).describe('Host triple, or "auto": x86_64-pc-windows-msvc when the MSVC toolchain is on (like most PCs), else x86_64-pc-windows-gnu (MinGW is its linker).'),
25914
+ host: external_exports.string().min(1).describe(
25915
+ 'Host triple, or "auto": x86_64-pc-windows-msvc when the MSVC toolchain is on (like most PCs), else x86_64-pc-windows-gnu (MinGW is its linker).'
25916
+ ),
25782
25917
  components: Packages("Extra rustup components", '["rust-src", "llvm-tools"]'),
25783
25918
  targets: Packages("Extra rustup targets", '["wasm32-unknown-unknown"]'),
25784
- crates: Packages("Binaries for cargo: prebuilt via cargo-binstall when the crate publishes a Windows build, else compiled with `cargo install --locked` (slow the first time)", '["sccache", "cargo-nextest", "cargo-deny"]'),
25785
- targetDir: external_exports.string().min(1).describe(`"shared": cargo's default target\\ (shared with builds on this PC, so builds on either side invalidate the other), "separate": <workspace>\\target\\sandbox (kept, no cross-talk), "local": on the sandbox's own disk (fastest, lost every boot), or a guest path.`)
25919
+ crates: Packages(
25920
+ "Binaries for cargo: prebuilt via cargo-binstall when the crate publishes a Windows build, else compiled with `cargo install --locked` (slow the first time)",
25921
+ '["sccache", "cargo-nextest", "cargo-deny"]'
25922
+ ),
25923
+ targetDir: external_exports.string().min(1).describe(
25924
+ `"shared": cargo's default target\\ (shared with builds on this PC, so builds on either side invalidate the other), "separate": <workspace>\\target\\sandbox (kept, no cross-talk), "local": on the sandbox's own disk (fastest, lost every boot), or a guest path.`
25925
+ ),
25926
+ linker: external_exports.enum(["lld", "gnu"]).describe(
25927
+ `GNU host: "lld" links with Rust's own lld through MinGW's gcc (much less memory than GNU ld), "gnu" with GNU ld.`
25928
+ ),
25929
+ linkSlots: external_exports.union([external_exports.literal("auto"), external_exports.number().int().min(1).max(32)]).describe(
25930
+ 'GNU host: how many programs may link at the same time in the whole sandbox (other links wait). "auto" = one per 8 GB of sandbox memory, 2 to 4. Several agents linking big programs at once can take Windows down.'
25931
+ )
25786
25932
  }),
25787
25933
  msvc: external_exports.strictObject({
25788
- enabled: enabled("MSVC (cl, link) and the Windows SDK, portable from Microsoft's Visual Studio manifest (~1-2 GB once), with vcvars64.bat and vswhere.", "a .vcxproj, CMakePresets.json, a script calling vcvars/vswhere, or a Rust project when this PC builds Rust with MSVC"),
25789
- acceptLicense: external_exports.boolean().describe("Required to install MSVC: you accept the Visual Studio licence terms (https://visualstudio.microsoft.com/license-terms/), which need a Visual Studio licence."),
25934
+ enabled: enabled(
25935
+ "MSVC (cl, link) and the Windows SDK, portable from Microsoft's Visual Studio manifest (~1-2 GB once), with vcvars64.bat and vswhere.",
25936
+ "a .vcxproj, CMakePresets.json, a script calling vcvars/vswhere, or a Rust project when this PC builds Rust with MSVC"
25937
+ ),
25938
+ acceptLicense: external_exports.boolean().describe(
25939
+ "Required to install MSVC: you accept the Visual Studio licence terms (https://visualstudio.microsoft.com/license-terms/), which need a Visual Studio licence."
25940
+ ),
25790
25941
  msvcVersion: external_exports.string().min(1).describe('"latest" or an MSVC tools version prefix, e.g. "14.44".'),
25791
25942
  sdkVersion: external_exports.string().min(1).describe('"latest" or a Windows SDK build, e.g. "26100" or "10.0.22621".')
25792
25943
  }),
25793
25944
  cpp: external_exports.strictObject({
25794
- enabled: enabled("MinGW-w64 GCC with CMake, Ninja, premake5 and mingw32-make (also Rust's linker).", "CMakeLists.txt, Makefile, meson.build, premake5.lua or Cargo.toml"),
25795
- flexBison: external_exports.boolean().describe("win_flex / win_bison, the parser generators many C/C++ projects (game engines among them) need; CMake finds them.")
25945
+ enabled: enabled(
25946
+ "MinGW-w64 GCC with CMake, Ninja, premake5 and mingw32-make (also Rust's linker).",
25947
+ "CMakeLists.txt, Makefile, meson.build, premake5.lua or Cargo.toml"
25948
+ ),
25949
+ flexBison: external_exports.boolean().describe(
25950
+ "win_flex / win_bison, the parser generators many C/C++ projects (game engines among them) need; CMake finds them."
25951
+ )
25796
25952
  }),
25797
25953
  dotnet: external_exports.strictObject({
25798
25954
  enabled: enabled(".NET SDK (C#, F#).", "a .sln, .slnx, .csproj, .fsproj or global.json"),
25799
- channels: Strings.describe(`SDK channels, e.g. ["LTS", "8.0"]. A project's global.json is installed too.`),
25955
+ channels: StringsSchema.describe(`SDK channels, e.g. ["LTS", "8.0"]. A project's global.json is installed too.`),
25800
25956
  tools: Packages("Global .NET tools (`dotnet tool install -g`)", '["dotnet-ef", "csharpier"]'),
25801
25957
  workloads: Packages("SDK workloads (`dotnet workload install`)", '["aspire", "wasm-tools"]'),
25802
- frameworkTargets: Strings.describe('.NET Framework reference assemblies (targeting packs) from NuGet, so net4x and old-style .csproj projects build without Visual Studio, e.g. ["net48", "net472", "net462"]. The 4.8 runtime itself ships with Windows.'),
25803
- netfx35: external_exports.boolean().describe(".NET Framework 3.5 runtime (a Windows feature, enabled from Windows Update on every boot; a few minutes).")
25958
+ frameworkTargets: StringsSchema.describe(
25959
+ '.NET Framework reference assemblies (targeting packs) from NuGet, so net4x and old-style .csproj projects build without Visual Studio, e.g. ["net48", "net472", "net462"]. The 4.8 runtime itself ships with Windows.'
25960
+ ),
25961
+ netfx35: external_exports.boolean().describe(
25962
+ ".NET Framework 3.5 runtime (a Windows feature, enabled from Windows Update on every boot; a few minutes)."
25963
+ )
25804
25964
  }),
25805
25965
  go: external_exports.strictObject({
25806
25966
  enabled: enabled("Go.", "go.mod or go.work"),
25807
- version: external_exports.string().min(1).describe('"stable" or a version prefix such as "1.23". A go.mod asking for newer fetches it itself (GOTOOLCHAIN=auto).'),
25967
+ version: external_exports.string().min(1).describe(
25968
+ '"stable" or a version prefix such as "1.23". A go.mod asking for newer fetches it itself (GOTOOLCHAIN=auto).'
25969
+ ),
25808
25970
  tools: Packages("Go tools (`go install <path>@<version>`)", '["golang.org/x/tools/gopls@latest"]')
25809
25971
  }),
25810
25972
  java: external_exports.strictObject({
25811
- enabled: enabled("Java: Eclipse Temurin JDK.", "pom.xml, build.gradle(.kts), settings.gradle(.kts), mvnw, gradlew or .java-version"),
25973
+ enabled: enabled(
25974
+ "Java: Eclipse Temurin JDK.",
25975
+ "pom.xml, build.gradle(.kts), settings.gradle(.kts), mvnw, gradlew or .java-version"
25976
+ ),
25812
25977
  version: external_exports.string().min(1).describe(`"lts" (newest LTS) or a major version such as "21". A project's .java-version or .sdkmanrc wins.`),
25813
25978
  maven: external_exports.boolean().describe("Apache Maven (mvn). A project's mvnw works either way."),
25814
25979
  gradle: external_exports.boolean().describe("Gradle (gradle). A project's gradlew works either way.")
25815
25980
  }),
25816
25981
  ruby: external_exports.strictObject({
25817
- enabled: enabled("Ruby (RubyInstaller, with gem and bundler). Gems with C extensions need MSYS2, which is not included.", "Gemfile, a .gemspec or .ruby-version"),
25982
+ enabled: enabled(
25983
+ "Ruby (RubyInstaller, with gem and bundler). Gems with C extensions need MSYS2, which is not included.",
25984
+ "Gemfile, a .gemspec or .ruby-version"
25985
+ ),
25818
25986
  version: external_exports.string().min(1).describe(`Version prefix, e.g. "3" or "3.3". A project's .ruby-version wins.`),
25819
25987
  gems: Packages("Gems installed globally", '["rubocop"]')
25820
25988
  }),
25821
25989
  php: external_exports.strictObject({
25822
- enabled: enabled("PHP (with the Visual C++ runtime it needs, installed on every boot).", "composer.json, artisan or .php-version"),
25990
+ enabled: enabled(
25991
+ "PHP (with the Visual C++ runtime it needs, installed on every boot).",
25992
+ "composer.json, artisan or .php-version"
25993
+ ),
25823
25994
  version: external_exports.string().min(1).describe(`Version prefix, e.g. "8" or "8.3". A project's .php-version wins.`),
25824
25995
  composer: external_exports.boolean().describe("Composer.")
25825
25996
  }),
25826
25997
  deno: external_exports.strictObject({ enabled: enabled("Deno.", "deno.json, deno.jsonc or deno.lock") }),
25827
- pwsh: external_exports.strictObject({ enabled: Enabled.describe('PowerShell 7 (pwsh), portable (~110 MB once); `powershell` stays Windows PowerShell 5.1. true, false, or "auto" = when a .ps1 at the root or one folder down has #Requires -Version 7 / -PSEdition Core or a `pwsh ...` usage line, or, in a folder that is no project yet, when this PC has PowerShell 7.') }),
25998
+ pwsh: external_exports.strictObject({
25999
+ enabled: EnabledSchema.describe(
26000
+ 'PowerShell 7 (pwsh), portable (~110 MB once); `powershell` stays Windows PowerShell 5.1. true, false, or "auto" = when a .ps1 at the root or one folder down has #Requires -Version 7 / -PSEdition Core or a `pwsh ...` usage line, or, in a folder that is no project yet, when this PC has PowerShell 7.'
26001
+ )
26002
+ }),
25828
26003
  cli: external_exports.strictObject({
25829
- gh: Enabled.describe('GitHub CLI (gh). Only with provisioning.git.access "full": gh can push and merge through the GitHub API, past a read-only git. Your PC\'s gh login is never copied; `gh auth login` inside persists (GH_CONFIG_DIR). "auto" = when the project has a .github folder.'),
25830
- zstd: Enabled.describe('Zstandard (zstd). "auto" = off; set true to get it.'),
25831
- openssl: Enabled.describe('`openssl` on PATH, from the copy Git for Windows ships (its mingw64\\bin is not put on PATH, so it cannot shadow MinGW\'s gcc). "auto" = on.')
26004
+ gh: EnabledSchema.describe(
26005
+ 'GitHub CLI (gh). Only with provisioning.git.access "full": gh can push and merge through the GitHub API, past a read-only git. Your PC\'s gh login is never copied; `gh auth login` inside persists (GH_CONFIG_DIR). "auto" = when the project has a .github folder.'
26006
+ ),
26007
+ zstd: EnabledSchema.describe('Zstandard (zstd). "auto" = off; set true to get it.'),
26008
+ openssl: EnabledSchema.describe(
26009
+ '`openssl` on PATH, from the copy Git for Windows ships (its mingw64\\bin is not put on PATH, so it cannot shadow MinGW\'s gcc). "auto" = on.'
26010
+ )
25832
26011
  }).describe("Small portable command-line tools from their GitHub releases, installed once into tools\\cli."),
25833
26012
  bun: toggle("Bun runtime (claude-mem needs it)."),
25834
26013
  uv: toggle("uv, the Python package manager (claude-mem needs it)."),
25835
- vcRuntime: toggle("Microsoft Visual C++ runtime for tools that need it (a real installer, so it runs on every boot, ~15 s). PHP installs it regardless."),
26014
+ vcRuntime: toggle(
26015
+ "Microsoft Visual C++ runtime for tools that need it (a real installer, so it runs on every boot, ~15 s). PHP installs it regardless."
26016
+ ),
25836
26017
  mesa: external_exports.strictObject({
25837
- enabled: external_exports.boolean().describe("Mesa 3D (llvmpipe): OpenGL 4.5 in software for games and apps when there is no GPU (sandbox.vGpu off). Copy opengl32.dll and libgallium_wgl.dll from %MESA_DIR% next to the program's .exe."),
25838
- vulkan: external_exports.boolean().describe("Also software Vulkan 1.4 (Mesa lavapipe) with the Khronos loader, registered for every program; for wgpu set WGPU_BACKEND=vulkan.")
26018
+ enabled: external_exports.boolean().describe(
26019
+ "Mesa 3D (llvmpipe): OpenGL 4.5 in software for games and apps when there is no GPU (sandbox.vGpu off). Copy opengl32.dll and libgallium_wgl.dll from %MESA_DIR% next to the program's .exe."
26020
+ ),
26021
+ vulkan: external_exports.boolean().describe(
26022
+ "Also software Vulkan 1.4 (Mesa lavapipe) with the Khronos loader, registered for every program; for wgpu set WGPU_BACKEND=vulkan."
26023
+ )
25839
26024
  }),
25840
26025
  vscode: external_exports.strictObject({
25841
- enabled: external_exports.boolean().describe("Portable VS Code inside the sandbox (code on PATH, desktop shortcut); its settings and extensions persist."),
25842
- setup: external_exports.boolean().describe("Point VS Code at the sandbox's own tools (JDK, Python, Go, compilers, .NET, Git, PowerShell 7 and Git Bash terminals) and install the language extensions for the toolchains in use."),
26026
+ enabled: external_exports.boolean().describe(
26027
+ "Portable VS Code inside the sandbox (code on PATH, desktop shortcut); its settings and extensions persist."
26028
+ ),
26029
+ setup: external_exports.boolean().describe(
26030
+ "Point VS Code at the sandbox's own tools (JDK, Python, Go, compilers, .NET, Git, PowerShell 7 and Git Bash terminals) and install the language extensions for the toolchains in use."
26031
+ ),
25843
26032
  recommended: external_exports.boolean().describe("Also install the extensions a project recommends in its .vscode/extensions.json."),
25844
26033
  extensions: external_exports.array(external_exports.string().regex(/^[\w-]+\.[\w-]+$/, "publisher.name, e.g. eamodio.gitlens")).describe("More extensions to install in every sandbox, e.g. eamodio.gitlens, ms-azuretools.vscode-docker.")
25845
26034
  }),
25846
- environment: external_exports.record(external_exports.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/, "letters, digits and _ only"), external_exports.string()).describe('Extra environment variables for the agent and every terminal, e.g. registry mirrors: {"NPM_CONFIG_REGISTRY": "https://...", "PIP_INDEX_URL": "https://..."}.')
26035
+ environment: external_exports.record(external_exports.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/, "letters, digits and _ only"), external_exports.string()).describe(
26036
+ 'Extra environment variables for the agent and every terminal, e.g. registry mirrors: {"NPM_CONFIG_REGISTRY": "https://...", "PIP_INDEX_URL": "https://..."}.'
26037
+ )
25847
26038
  });
25848
26039
 
25849
- // src/shared/apps.ts
26040
+ // src/shared/apps/catalogue.ts
25850
26041
  var gh = (github, asset) => ({ github, asset });
25851
26042
  var APPS = [
25852
26043
  // ---- editors
25853
- { id: "vscode", name: "Visual Studio Code", category: "editors", about: "Code editor with debugging, set up for the sandbox's languages.", size: "150 MB", source: { resolve: "setting" }, exe: "Code.exe", setting: "toolchains.vscode.enabled" },
25854
- { id: "windows-terminal", name: "Windows Terminal", category: "utilities", about: "The sandbox window: tabs, panes, PowerShell 7 profile.", size: "40 MB", source: { resolve: "setting" }, exe: "WindowsTerminal.exe", setting: "provisioning.terminal.enabled" },
25855
- { id: "notepadpp", name: "Notepad++", category: "editors", about: "Fast text and code editor.", size: "8 MB", source: gh("notepad-plus-plus/notepad-plus-plus", "^npp\\.[\\d.]+\\.portable\\.x64\\.zip$"), exe: "notepad++.exe" },
25856
- { id: "sublime", name: "Sublime Text", category: "editors", about: "Fast code editor (paid licence, free to evaluate).", size: "28 MB", source: { resolve: "sublime" }, exe: "sublime_text.exe" },
25857
- { id: "neovim", name: "Neovim", category: "editors", about: "Terminal text editor (nvim).", size: "12 MB", source: gh("neovim/neovim", "^nvim-win64\\.zip$"), exe: "nvim.exe", cli: true },
26044
+ {
26045
+ id: "vscode",
26046
+ name: "Visual Studio Code",
26047
+ category: "editors",
26048
+ about: "Code editor with debugging, set up for the sandbox's languages.",
26049
+ size: "150 MB",
26050
+ source: { resolve: "setting" },
26051
+ exe: "Code.exe",
26052
+ setting: "toolchains.vscode.enabled"
26053
+ },
26054
+ {
26055
+ id: "windows-terminal",
26056
+ name: "Windows Terminal",
26057
+ category: "utilities",
26058
+ about: "The sandbox window: tabs, panes, PowerShell 7 profile.",
26059
+ size: "40 MB",
26060
+ source: { resolve: "setting" },
26061
+ exe: "WindowsTerminal.exe",
26062
+ setting: "provisioning.terminal.enabled"
26063
+ },
26064
+ {
26065
+ id: "notepadpp",
26066
+ name: "Notepad++",
26067
+ category: "editors",
26068
+ about: "Fast text and code editor.",
26069
+ size: "8 MB",
26070
+ source: gh("notepad-plus-plus/notepad-plus-plus", "^npp\\.[\\d.]+\\.portable\\.x64\\.zip$"),
26071
+ exe: "notepad++.exe"
26072
+ },
26073
+ {
26074
+ id: "sublime",
26075
+ name: "Sublime Text",
26076
+ category: "editors",
26077
+ about: "Fast code editor (paid licence, free to evaluate).",
26078
+ size: "28 MB",
26079
+ source: { resolve: "sublime" },
26080
+ exe: "sublime_text.exe"
26081
+ },
26082
+ {
26083
+ id: "neovim",
26084
+ name: "Neovim",
26085
+ category: "editors",
26086
+ about: "Terminal text editor (nvim).",
26087
+ size: "12 MB",
26088
+ source: gh("neovim/neovim", "^nvim-win64\\.zip$"),
26089
+ exe: "nvim.exe",
26090
+ cli: true
26091
+ },
25858
26092
  // ---- database clients
25859
- { id: "dbeaver", name: "DBeaver Community", category: "databases", about: "Universal database client: PostgreSQL, MySQL, SQLite, SQL Server and more.", size: "120 MB", source: gh("dbeaver/dbeaver", "^dbeaver-ce-[\\d.]+-windows-x86_64\\.zip$"), exe: "dbeaver.exe" },
25860
- { id: "pgadmin", name: "pgAdmin 4", category: "databases", about: "The PostgreSQL admin GUI (from the PostgreSQL binaries zip).", size: "330 MB", source: { resolve: "pgadmin" }, exe: "pgAdmin4.exe" },
25861
- { id: "heidisql", name: "HeidiSQL", category: "databases", about: "Light client for MySQL, MariaDB, PostgreSQL and SQL Server.", size: "28 MB", source: gh("HeidiSQL/HeidiSQL", "^HeidiSQL_[\\d.]+_64_Portable\\.zip$"), exe: "heidisql.exe" },
25862
- { id: "sqlitebrowser", name: "DB Browser for SQLite", category: "databases", about: "Open, browse and edit SQLite files.", size: "21 MB", source: gh("sqlitebrowser/sqlitebrowser", "^DB\\.Browser\\.for\\.SQLite-v?[\\d.]+-win64\\.zip$"), exe: "DB Browser for SQLite.exe" },
25863
- { id: "compass", name: "MongoDB Compass", category: "databases", about: "The MongoDB GUI.", size: "220 MB", source: gh("mongodb-js/compass", "^mongodb-compass-[\\d.]+-win32-x64\\.zip$"), exe: "MongoDBCompass.exe" },
25864
- { id: "redisinsight", name: "Redis Insight", category: "databases", about: "The Redis GUI.", size: "110 MB", source: gh("redis/RedisInsight", "^Redis-Insight-win-installer\\.exe$"), unpack: "nsis", exe: "Redis Insight.exe", needs: ["7zip"] },
25865
- { id: "dbgate", name: "DbGate", category: "databases", about: "Database manager for SQL and NoSQL databases.", size: "180 MB", source: gh("dbgate/dbgate", "^dbgate-[\\d.]+-win_x64\\.zip$"), exe: "DbGate.exe" },
25866
- { id: "beekeeper", name: "Beekeeper Studio", category: "databases", about: "SQL editor and database manager.", size: "245 MB", source: gh("beekeeper-studio/beekeeper-studio", "^Beekeeper-Studio-[\\d.]+-portable\\.exe$"), unpack: "nsis", exe: "Beekeeper Studio.exe", needs: ["7zip"] },
25867
- { id: "dynamodb-admin", name: "dynamodb-admin", category: "databases", about: "Web GUI for DynamoDB Local: run dynamodb-admin, then open http://localhost:8001.", size: "5 MB", source: { npm: "dynamodb-admin" }, exe: "dynamodb-admin.cmd", cli: true },
26093
+ {
26094
+ id: "dbeaver",
26095
+ name: "DBeaver Community",
26096
+ category: "databases",
26097
+ about: "Universal database client: PostgreSQL, MySQL, SQLite, SQL Server and more.",
26098
+ size: "120 MB",
26099
+ source: gh("dbeaver/dbeaver", "^dbeaver-ce-[\\d.]+-windows-x86_64\\.zip$"),
26100
+ exe: "dbeaver.exe"
26101
+ },
26102
+ {
26103
+ id: "pgadmin",
26104
+ name: "pgAdmin 4",
26105
+ category: "databases",
26106
+ about: "The PostgreSQL admin GUI (from the PostgreSQL binaries zip).",
26107
+ size: "330 MB",
26108
+ source: { resolve: "pgadmin" },
26109
+ exe: "pgAdmin4.exe"
26110
+ },
26111
+ {
26112
+ id: "heidisql",
26113
+ name: "HeidiSQL",
26114
+ category: "databases",
26115
+ about: "Light client for MySQL, MariaDB, PostgreSQL and SQL Server.",
26116
+ size: "28 MB",
26117
+ source: gh("HeidiSQL/HeidiSQL", "^HeidiSQL_[\\d.]+_64_Portable\\.zip$"),
26118
+ exe: "heidisql.exe"
26119
+ },
26120
+ {
26121
+ id: "sqlitebrowser",
26122
+ name: "DB Browser for SQLite",
26123
+ category: "databases",
26124
+ about: "Open, browse and edit SQLite files.",
26125
+ size: "21 MB",
26126
+ source: gh("sqlitebrowser/sqlitebrowser", "^DB\\.Browser\\.for\\.SQLite-v?[\\d.]+-win64\\.zip$"),
26127
+ exe: "DB Browser for SQLite.exe"
26128
+ },
26129
+ {
26130
+ id: "compass",
26131
+ name: "MongoDB Compass",
26132
+ category: "databases",
26133
+ about: "The MongoDB GUI.",
26134
+ size: "220 MB",
26135
+ source: gh("mongodb-js/compass", "^mongodb-compass-[\\d.]+-win32-x64\\.zip$"),
26136
+ exe: "MongoDBCompass.exe"
26137
+ },
26138
+ {
26139
+ id: "redisinsight",
26140
+ name: "Redis Insight",
26141
+ category: "databases",
26142
+ about: "The Redis GUI.",
26143
+ size: "110 MB",
26144
+ source: gh("redis/RedisInsight", "^Redis-Insight-win-installer\\.exe$"),
26145
+ unpack: "nsis",
26146
+ exe: "Redis Insight.exe",
26147
+ needs: ["7zip"]
26148
+ },
26149
+ {
26150
+ id: "dbgate",
26151
+ name: "DbGate",
26152
+ category: "databases",
26153
+ about: "Database manager for SQL and NoSQL databases.",
26154
+ size: "180 MB",
26155
+ source: gh("dbgate/dbgate", "^dbgate-[\\d.]+-win_x64\\.zip$"),
26156
+ exe: "DbGate.exe"
26157
+ },
26158
+ {
26159
+ id: "beekeeper",
26160
+ name: "Beekeeper Studio",
26161
+ category: "databases",
26162
+ about: "SQL editor and database manager.",
26163
+ size: "245 MB",
26164
+ source: gh("beekeeper-studio/beekeeper-studio", "^Beekeeper-Studio-[\\d.]+-portable\\.exe$"),
26165
+ unpack: "nsis",
26166
+ exe: "Beekeeper Studio.exe",
26167
+ needs: ["7zip"]
26168
+ },
26169
+ {
26170
+ id: "dynamodb-admin",
26171
+ name: "dynamodb-admin",
26172
+ category: "databases",
26173
+ about: "Web GUI for DynamoDB Local: run dynamodb-admin, then open http://localhost:8001.",
26174
+ size: "5 MB",
26175
+ source: { npm: "dynamodb-admin" },
26176
+ exe: "dynamodb-admin.cmd",
26177
+ cli: true
26178
+ },
25868
26179
  // ---- API clients
25869
- { id: "bruno", name: "Bruno", category: "api", about: "Offline, git-friendly API client (collections are files in your repo).", size: "175 MB", source: gh("usebruno/bruno", "^bruno_[\\d.]+_x64_win\\.zip$"), exe: "Bruno.exe" },
25870
- { id: "insomnia", name: "Insomnia", category: "api", about: "REST, GraphQL and gRPC client.", size: "590 MB", source: gh("Kong/insomnia", "^insomnia-[\\d.]+-full\\.nupkg$"), exe: "Insomnia.exe" },
26180
+ {
26181
+ id: "bruno",
26182
+ name: "Bruno",
26183
+ category: "api",
26184
+ about: "Offline, git-friendly API client (collections are files in your repo).",
26185
+ size: "175 MB",
26186
+ source: gh("usebruno/bruno", "^bruno_[\\d.]+_x64_win\\.zip$"),
26187
+ exe: "Bruno.exe"
26188
+ },
26189
+ {
26190
+ id: "insomnia",
26191
+ name: "Insomnia",
26192
+ category: "api",
26193
+ about: "REST, GraphQL and gRPC client.",
26194
+ size: "590 MB",
26195
+ source: gh("Kong/insomnia", "^insomnia-[\\d.]+-full\\.nupkg$"),
26196
+ exe: "Insomnia.exe"
26197
+ },
25871
26198
  // ---- git
25872
- { id: "sourcegit", name: "SourceGit", category: "git", about: "Fast open-source Git GUI.", size: "26 MB", source: gh("sourcegit-scm/sourcegit", "^sourcegit_[\\d.]+\\.win-x64\\.zip$"), exe: "SourceGit.exe" },
25873
- { id: "githubdesktop", name: "GitHub Desktop", category: "git", about: 'Simple Git GUI from GitHub. It has its own git, so it needs provisioning.git.access "full".', size: "300 MB", source: gh("desktop/desktop", "^GitHubDesktop-[\\d.]+-x64-full\\.nupkg$"), exe: "GitHubDesktop.exe", fullGitOnly: true },
25874
- { id: "lazygit", name: "lazygit", category: "git", about: "Git in the terminal.", size: "7 MB", source: gh("jesseduffield/lazygit", "^lazygit_[\\d.]+_windows_x86_64\\.zip$"), exe: "lazygit.exe", cli: true },
26199
+ {
26200
+ id: "sourcegit",
26201
+ name: "SourceGit",
26202
+ category: "git",
26203
+ about: "Fast open-source Git GUI.",
26204
+ size: "26 MB",
26205
+ source: gh("sourcegit-scm/sourcegit", "^sourcegit_[\\d.]+\\.win-x64\\.zip$"),
26206
+ exe: "SourceGit.exe"
26207
+ },
26208
+ {
26209
+ id: "githubdesktop",
26210
+ name: "GitHub Desktop",
26211
+ category: "git",
26212
+ about: 'Simple Git GUI from GitHub. It has its own git, so it needs provisioning.git.access "full".',
26213
+ size: "300 MB",
26214
+ source: gh("desktop/desktop", "^GitHubDesktop-[\\d.]+-x64-full\\.nupkg$"),
26215
+ exe: "GitHubDesktop.exe",
26216
+ fullGitOnly: true
26217
+ },
26218
+ {
26219
+ id: "lazygit",
26220
+ name: "lazygit",
26221
+ category: "git",
26222
+ about: "Git in the terminal.",
26223
+ size: "7 MB",
26224
+ source: gh("jesseduffield/lazygit", "^lazygit_[\\d.]+_windows_x86_64\\.zip$"),
26225
+ exe: "lazygit.exe",
26226
+ cli: true
26227
+ },
25875
26228
  // ---- utilities
25876
- { id: "7zip", name: "7-Zip", category: "utilities", about: "Archive manager (7z, zip, rar, tar ...). Also unpacks installers for other apps.", size: "2 MB", source: { resolve: "7zip" }, exe: "7zFM.exe" },
25877
- { id: "winmerge", name: "WinMerge", category: "utilities", about: "Compare and merge files and folders.", size: "23 MB", source: gh("WinMerge/winmerge", "^winmerge-[\\d.]+-x64-exe\\.zip$"), exe: "WinMergeU.exe" },
25878
- { id: "everything", name: "Everything", category: "utilities", about: "Finds files by name instantly.", size: "2 MB", source: { resolve: "everything" }, exe: "Everything.exe" },
25879
- { id: "sysinternals", name: "Sysinternals Suite", category: "utilities", about: "Process Explorer, Process Monitor, Autoruns, TCPView and more (on PATH).", size: "200 MB", source: { url: "https://download.sysinternals.com/files/SysinternalsSuite.zip" }, exe: "procexp64.exe" },
25880
- { id: "imhex", name: "ImHex", category: "utilities", about: "Hex editor for reverse engineering and binary formats.", size: "80 MB", source: gh("WerWolv/ImHex", "^imhex-[\\d.]+-Windows-Portable-NoGPU-x86_64\\.zip$"), exe: "imhex-gui.exe" },
26229
+ {
26230
+ id: "7zip",
26231
+ name: "7-Zip",
26232
+ category: "utilities",
26233
+ about: "Archive manager (7z, zip, rar, tar ...). Also unpacks installers for other apps.",
26234
+ size: "2 MB",
26235
+ source: { resolve: "7zip" },
26236
+ exe: "7zFM.exe"
26237
+ },
26238
+ {
26239
+ id: "winmerge",
26240
+ name: "WinMerge",
26241
+ category: "utilities",
26242
+ about: "Compare and merge files and folders.",
26243
+ size: "23 MB",
26244
+ source: gh("WinMerge/winmerge", "^winmerge-[\\d.]+-x64-exe\\.zip$"),
26245
+ exe: "WinMergeU.exe"
26246
+ },
26247
+ {
26248
+ id: "everything",
26249
+ name: "Everything",
26250
+ category: "utilities",
26251
+ about: "Finds files by name instantly.",
26252
+ size: "2 MB",
26253
+ source: { resolve: "everything" },
26254
+ exe: "Everything.exe"
26255
+ },
26256
+ {
26257
+ id: "sysinternals",
26258
+ name: "Sysinternals Suite",
26259
+ category: "utilities",
26260
+ about: "Process Explorer, Process Monitor, Autoruns, TCPView and more (on PATH).",
26261
+ size: "200 MB",
26262
+ source: { url: "https://download.sysinternals.com/files/SysinternalsSuite.zip" },
26263
+ exe: "procexp64.exe"
26264
+ },
26265
+ {
26266
+ id: "imhex",
26267
+ name: "ImHex",
26268
+ category: "utilities",
26269
+ about: "Hex editor for reverse engineering and binary formats.",
26270
+ size: "80 MB",
26271
+ source: gh("WerWolv/ImHex", "^imhex-[\\d.]+-Windows-Portable-NoGPU-x86_64\\.zip$"),
26272
+ exe: "imhex-gui.exe"
26273
+ },
25881
26274
  // ---- browsers
25882
- { id: "chrome", name: "Chrome for Testing", category: "browsers", about: "Chrome build made for automated tests (with chromedriver on PATH).", size: "170 MB", source: { resolve: "chrome" }, exe: "chrome.exe" },
25883
- { id: "firefox", name: "Firefox", category: "browsers", about: "Firefox for testing.", size: "75 MB", source: { resolve: "firefox" }, unpack: "nsis", exe: "firefox.exe", needs: ["7zip"] },
26275
+ {
26276
+ id: "chrome",
26277
+ name: "Chrome for Testing",
26278
+ category: "browsers",
26279
+ about: "Chrome build made for automated tests (with chromedriver on PATH).",
26280
+ size: "170 MB",
26281
+ source: { resolve: "chrome" },
26282
+ exe: "chrome.exe"
26283
+ },
26284
+ {
26285
+ id: "firefox",
26286
+ name: "Firefox",
26287
+ category: "browsers",
26288
+ about: "Firefox for testing.",
26289
+ size: "75 MB",
26290
+ source: { resolve: "firefox" },
26291
+ unpack: "nsis",
26292
+ exe: "firefox.exe",
26293
+ needs: ["7zip"]
26294
+ },
25884
26295
  // ---- game development
25885
- { id: "godot", name: "Godot", category: "gamedev", about: "Open-source 2D and 3D game engine.", size: "80 MB", source: gh("godotengine/godot", "^Godot_v[\\d.]+-stable_win64\\.exe\\.zip$"), exe: "/^Godot_v[\\d.]+-stable_win64\\.exe$/", needs: ["mesa"] },
25886
- { id: "blender", name: "Blender", category: "gamedev", about: "3D modelling, animation and rendering.", size: "400 MB", source: { resolve: "blender" }, exe: "blender.exe", needs: ["mesa"] },
25887
- { id: "love", name: "L\xD6VE", category: "gamedev", about: "Lua framework for 2D games.", size: "4 MB", source: gh("love2d/love", "^love-[\\d.]+-win64\\.zip$"), exe: "love.exe", needs: ["mesa"] },
25888
- { id: "defold", name: "Defold", category: "gamedev", about: "Free 2D/3D game engine and editor.", size: "330 MB", source: gh("defold/defold", "^Defold-x86_64-win32\\.zip$"), exe: "Defold.exe", needs: ["mesa"] },
25889
- { id: "pixelorama", name: "Pixelorama", category: "gamedev", about: "Pixel-art and sprite editor.", size: "40 MB", source: gh("Orama-Interactive/Pixelorama", "^Pixelorama-Windows-64bit\\.zip$"), exe: "Pixelorama.exe", needs: ["mesa"] },
25890
- { id: "tiled", name: "Tiled", category: "gamedev", about: "Tile map editor.", size: "22 MB", source: gh("mapeditor/tiled", "^Tiled-[\\d.]+_Windows-10\\+_x86_64\\.msi$"), unpack: "msi", exe: "tiled.exe" },
26296
+ {
26297
+ id: "godot",
26298
+ name: "Godot",
26299
+ category: "gamedev",
26300
+ about: "Open-source 2D and 3D game engine.",
26301
+ size: "80 MB",
26302
+ source: gh("godotengine/godot", "^Godot_v[\\d.]+-stable_win64\\.exe\\.zip$"),
26303
+ exe: "/^Godot_v[\\d.]+-stable_win64\\.exe$/",
26304
+ needs: ["mesa"]
26305
+ },
26306
+ {
26307
+ id: "blender",
26308
+ name: "Blender",
26309
+ category: "gamedev",
26310
+ about: "3D modelling, animation and rendering.",
26311
+ size: "400 MB",
26312
+ source: { resolve: "blender" },
26313
+ exe: "blender.exe",
26314
+ needs: ["mesa"]
26315
+ },
26316
+ {
26317
+ id: "love",
26318
+ name: "L\xD6VE",
26319
+ category: "gamedev",
26320
+ about: "Lua framework for 2D games.",
26321
+ size: "4 MB",
26322
+ source: gh("love2d/love", "^love-[\\d.]+-win64\\.zip$"),
26323
+ exe: "love.exe",
26324
+ needs: ["mesa"]
26325
+ },
26326
+ {
26327
+ id: "defold",
26328
+ name: "Defold",
26329
+ category: "gamedev",
26330
+ about: "Free 2D/3D game engine and editor.",
26331
+ size: "330 MB",
26332
+ source: gh("defold/defold", "^Defold-x86_64-win32\\.zip$"),
26333
+ exe: "Defold.exe",
26334
+ needs: ["mesa"]
26335
+ },
26336
+ {
26337
+ id: "pixelorama",
26338
+ name: "Pixelorama",
26339
+ category: "gamedev",
26340
+ about: "Pixel-art and sprite editor.",
26341
+ size: "40 MB",
26342
+ source: gh("Orama-Interactive/Pixelorama", "^Pixelorama-Windows-64bit\\.zip$"),
26343
+ exe: "Pixelorama.exe",
26344
+ needs: ["mesa"]
26345
+ },
26346
+ {
26347
+ id: "tiled",
26348
+ name: "Tiled",
26349
+ category: "gamedev",
26350
+ about: "Tile map editor.",
26351
+ size: "22 MB",
26352
+ source: gh("mapeditor/tiled", "^Tiled-[\\d.]+_Windows-10\\+_x86_64\\.msi$"),
26353
+ unpack: "msi",
26354
+ exe: "tiled.exe"
26355
+ },
25891
26356
  // ---- cloud
25892
- { id: "kubectl", name: "kubectl", category: "cloud", about: "Kubernetes command line.", size: "60 MB", source: { resolve: "kubectl" }, unpack: "file", exe: "kubectl.exe", cli: true },
25893
- { id: "helm", name: "Helm", category: "cloud", about: "Kubernetes package manager.", size: "20 MB", source: { resolve: "helm" }, exe: "helm.exe", cli: true },
25894
- { id: "k9s", name: "k9s", category: "cloud", about: "Kubernetes cluster UI in the terminal.", size: "40 MB", source: gh("derailed/k9s", "^k9s_Windows_amd64\\.zip$"), exe: "k9s.exe", cli: true },
25895
- { id: "terraform", name: "Terraform", category: "cloud", about: "Infrastructure as code.", size: "30 MB", source: { resolve: "terraform" }, exe: "terraform.exe", cli: true },
25896
- { id: "azure-cli", name: "Azure CLI", category: "cloud", about: "Manage Azure (az).", size: "90 MB", source: { url: "https://aka.ms/installazurecliwindowszipx64" }, exe: "az.cmd", cli: true },
25897
- { id: "gcloud", name: "Google Cloud CLI", category: "cloud", about: "Manage Google Cloud (gcloud, gsutil, bq).", size: "120 MB", source: { url: "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-windows-x86_64-bundled-python.zip" }, exe: "gcloud.cmd", cli: true },
25898
- { id: "aws-cli", name: "AWS CLI", category: "cloud", about: "Manage AWS (aws).", size: "50 MB", source: { url: "https://awscli.amazonaws.com/AWSCLIV2.msi" }, unpack: "msi", exe: "aws.exe", cli: true },
26357
+ {
26358
+ id: "kubectl",
26359
+ name: "kubectl",
26360
+ category: "cloud",
26361
+ about: "Kubernetes command line.",
26362
+ size: "60 MB",
26363
+ source: { resolve: "kubectl" },
26364
+ unpack: "file",
26365
+ exe: "kubectl.exe",
26366
+ cli: true
26367
+ },
26368
+ {
26369
+ id: "helm",
26370
+ name: "Helm",
26371
+ category: "cloud",
26372
+ about: "Kubernetes package manager.",
26373
+ size: "20 MB",
26374
+ source: { resolve: "helm" },
26375
+ exe: "helm.exe",
26376
+ cli: true
26377
+ },
26378
+ {
26379
+ id: "k9s",
26380
+ name: "k9s",
26381
+ category: "cloud",
26382
+ about: "Kubernetes cluster UI in the terminal.",
26383
+ size: "40 MB",
26384
+ source: gh("derailed/k9s", "^k9s_Windows_amd64\\.zip$"),
26385
+ exe: "k9s.exe",
26386
+ cli: true
26387
+ },
26388
+ {
26389
+ id: "terraform",
26390
+ name: "Terraform",
26391
+ category: "cloud",
26392
+ about: "Infrastructure as code.",
26393
+ size: "30 MB",
26394
+ source: { resolve: "terraform" },
26395
+ exe: "terraform.exe",
26396
+ cli: true
26397
+ },
26398
+ {
26399
+ id: "azure-cli",
26400
+ name: "Azure CLI",
26401
+ category: "cloud",
26402
+ about: "Manage Azure (az).",
26403
+ size: "90 MB",
26404
+ source: { url: "https://aka.ms/installazurecliwindowszipx64" },
26405
+ exe: "az.cmd",
26406
+ cli: true
26407
+ },
26408
+ {
26409
+ id: "gcloud",
26410
+ name: "Google Cloud CLI",
26411
+ category: "cloud",
26412
+ about: "Manage Google Cloud (gcloud, gsutil, bq).",
26413
+ size: "120 MB",
26414
+ source: {
26415
+ url: "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-windows-x86_64-bundled-python.zip"
26416
+ },
26417
+ exe: "gcloud.cmd",
26418
+ cli: true
26419
+ },
26420
+ {
26421
+ id: "aws-cli",
26422
+ name: "AWS CLI",
26423
+ category: "cloud",
26424
+ about: "Manage AWS (aws).",
26425
+ size: "50 MB",
26426
+ source: { url: "https://awscli.amazonaws.com/AWSCLIV2.msi" },
26427
+ unpack: "msi",
26428
+ exe: "aws.exe",
26429
+ cli: true
26430
+ },
25899
26431
  // ---- diagrams and docs
25900
- { id: "drawio", name: "draw.io", category: "diagrams", about: "Diagram editor (flowcharts, architecture, UML).", size: "170 MB", source: gh("jgraph/drawio-desktop", "^draw\\.io-[\\d.]+-windows\\.zip$"), exe: "draw.io.exe" },
25901
- { id: "pandoc", name: "Pandoc", category: "diagrams", about: "Convert documents between Markdown, HTML, Word, PDF ...", size: "35 MB", source: gh("jgm/pandoc", "^pandoc-[\\d.]+-windows-x86_64\\.zip$"), exe: "pandoc.exe", cli: true },
26432
+ {
26433
+ id: "drawio",
26434
+ name: "draw.io",
26435
+ category: "diagrams",
26436
+ about: "Diagram editor (flowcharts, architecture, UML).",
26437
+ size: "170 MB",
26438
+ source: gh("jgraph/drawio-desktop", "^draw\\.io-[\\d.]+-windows\\.zip$"),
26439
+ exe: "draw.io.exe"
26440
+ },
26441
+ {
26442
+ id: "pandoc",
26443
+ name: "Pandoc",
26444
+ category: "diagrams",
26445
+ about: "Convert documents between Markdown, HTML, Word, PDF ...",
26446
+ size: "35 MB",
26447
+ source: gh("jgm/pandoc", "^pandoc-[\\d.]+-windows-x86_64\\.zip$"),
26448
+ exe: "pandoc.exe",
26449
+ cli: true
26450
+ },
25902
26451
  // ---- network
25903
- { id: "mitmproxy", name: "mitmproxy", category: "network", about: "Intercepting HTTPS proxy (mitmweb opens a web UI).", size: "90 MB", source: { resolve: "mitmproxy" }, exe: "mitmweb.exe", cli: true },
25904
- { id: "xh", name: "xh", category: "network", about: "Friendly HTTP requests from the terminal (like HTTPie).", size: "5 MB", source: gh("ducaale/xh", "^xh-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "xh.exe", cli: true },
25905
- { id: "grpcurl", name: "grpcurl", category: "network", about: "curl for gRPC servers.", size: "10 MB", source: gh("fullstorydev/grpcurl", "^grpcurl_[\\d.]+_windows_x86_64\\.zip$"), exe: "grpcurl.exe", cli: true },
25906
- { id: "k6", name: "k6", category: "network", about: "Load testing with JavaScript scripts.", size: "30 MB", source: gh("grafana/k6", "^k6-v[\\d.]+-windows-amd64\\.zip$"), exe: "k6.exe", cli: true },
26452
+ {
26453
+ id: "mitmproxy",
26454
+ name: "mitmproxy",
26455
+ category: "network",
26456
+ about: "Intercepting HTTPS proxy (mitmweb opens a web UI).",
26457
+ size: "90 MB",
26458
+ source: { resolve: "mitmproxy" },
26459
+ exe: "mitmweb.exe",
26460
+ cli: true
26461
+ },
26462
+ {
26463
+ id: "xh",
26464
+ name: "xh",
26465
+ category: "network",
26466
+ about: "Friendly HTTP requests from the terminal (like HTTPie).",
26467
+ size: "5 MB",
26468
+ source: gh("ducaale/xh", "^xh-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"),
26469
+ exe: "xh.exe",
26470
+ cli: true
26471
+ },
26472
+ {
26473
+ id: "grpcurl",
26474
+ name: "grpcurl",
26475
+ category: "network",
26476
+ about: "curl for gRPC servers.",
26477
+ size: "10 MB",
26478
+ source: gh("fullstorydev/grpcurl", "^grpcurl_[\\d.]+_windows_x86_64\\.zip$"),
26479
+ exe: "grpcurl.exe",
26480
+ cli: true
26481
+ },
26482
+ {
26483
+ id: "k6",
26484
+ name: "k6",
26485
+ category: "network",
26486
+ about: "Load testing with JavaScript scripts.",
26487
+ size: "30 MB",
26488
+ source: gh("grafana/k6", "^k6-v[\\d.]+-windows-amd64\\.zip$"),
26489
+ exe: "k6.exe",
26490
+ cli: true
26491
+ },
26492
+ // ---- reverse engineering
26493
+ {
26494
+ id: "rea",
26495
+ name: "REA (Reverse Engineer Anything)",
26496
+ category: "reversing",
26497
+ about: "Agent-driven reverse engineering (MCP server and CLI, by morluto). Run `rea setup` once to add it to Claude Code and Codex. Native binaries need Ghidra; needs Node 22.19+.",
26498
+ size: "8 MB",
26499
+ source: { npm: "rea-agents" },
26500
+ exe: "rea.cmd",
26501
+ cli: true
26502
+ },
26503
+ {
26504
+ id: "ghidra",
26505
+ name: "Ghidra",
26506
+ category: "reversing",
26507
+ about: "NSA's reverse-engineering suite: disassembler and decompiler. Needs Java 21 (toolchains.java).",
26508
+ size: "570 MB",
26509
+ source: gh("NationalSecurityAgency/ghidra", "^ghidra_[\\d.]+_PUBLIC_[\\d]+\\.zip$"),
26510
+ exe: "ghidraRun.bat"
26511
+ },
26512
+ {
26513
+ id: "x64dbg",
26514
+ name: "x64dbg",
26515
+ category: "reversing",
26516
+ about: "Debugger for 64- and 32-bit Windows programs.",
26517
+ size: "32 MB",
26518
+ source: gh("x64dbg/x64dbg", "^snapshot_[\\d_-]+\\.zip$"),
26519
+ exe: "/^x64dbg\\.exe$/"
26520
+ },
26521
+ {
26522
+ id: "ilspy",
26523
+ name: "ILSpy",
26524
+ category: "reversing",
26525
+ about: ".NET decompiler.",
26526
+ size: "55 MB",
26527
+ source: gh("icsharpcode/ILSpy", "^ILSpy_windows_selfcontained_[\\d.]+-x64\\.zip$"),
26528
+ exe: "ILSpy.exe"
26529
+ },
26530
+ {
26531
+ id: "dnspy",
26532
+ name: "dnSpyEx",
26533
+ category: "reversing",
26534
+ about: ".NET debugger and assembly editor.",
26535
+ size: "100 MB",
26536
+ source: gh("dnSpyEx/dnSpy", "^dnSpy-net-win64\\.zip$"),
26537
+ exe: "dnSpy.exe"
26538
+ },
26539
+ {
26540
+ id: "die",
26541
+ name: "Detect It Easy",
26542
+ category: "reversing",
26543
+ about: "Identifies file types, compilers and packers.",
26544
+ size: "25 MB",
26545
+ source: gh("horsicq/DIE-engine", "^die_win64_portable_[\\d.]+_x64\\.zip$"),
26546
+ exe: "die.exe"
26547
+ },
26548
+ {
26549
+ id: "pe-bear",
26550
+ name: "PE-bear",
26551
+ category: "reversing",
26552
+ about: "Views and edits Windows executables (PE files).",
26553
+ size: "12 MB",
26554
+ source: gh("hasherezade/pe-bear", "^PE-bear_[\\d.]+_qt6_x64_win_vs22\\.zip$"),
26555
+ exe: "PE-bear.exe"
26556
+ },
26557
+ {
26558
+ id: "cutter",
26559
+ name: "Cutter",
26560
+ category: "reversing",
26561
+ about: "Reverse-engineering GUI built on rizin.",
26562
+ size: "141 MB",
26563
+ source: gh("rizinorg/cutter", "^Cutter-v[\\d.]+-Windows-x86_64\\.zip$"),
26564
+ exe: "cutter.exe"
26565
+ },
26566
+ {
26567
+ id: "radare2",
26568
+ name: "radare2",
26569
+ category: "reversing",
26570
+ about: "Command-line reverse-engineering framework (r2).",
26571
+ size: "14 MB",
26572
+ source: gh("radareorg/radare2", "^radare2-[\\d.]+-w64\\.zip$"),
26573
+ exe: "radare2.exe",
26574
+ cli: true
26575
+ },
26576
+ {
26577
+ id: "jadx",
26578
+ name: "JADX",
26579
+ category: "reversing",
26580
+ about: "Android APK and DEX decompiler.",
26581
+ size: "99 MB",
26582
+ source: gh("skylot/jadx", "^jadx-gui-[\\d.]+-with-jre-win\\.zip$"),
26583
+ exe: "jadx-gui.exe"
26584
+ },
26585
+ {
26586
+ id: "system-informer",
26587
+ name: "System Informer",
26588
+ category: "reversing",
26589
+ about: "Process, service and network monitor (Process Hacker's successor).",
26590
+ size: "22 MB",
26591
+ source: gh("winsiderss/systeminformer", "^systeminformer-[\\d.]+-bin\\.zip$"),
26592
+ exe: "SystemInformer.exe"
26593
+ },
25907
26594
  // ---- command-line tools
25908
- { id: "jq", name: "jq", category: "cli", about: "Query and reshape JSON.", size: "1 MB", source: gh("jqlang/jq", "^jq-windows-amd64\\.exe$"), unpack: "file", exe: "jq.exe", cli: true },
25909
- { id: "yq", name: "yq", category: "cli", about: "Query and edit YAML, JSON, XML and TOML.", size: "10 MB", source: gh("mikefarah/yq", "^yq_windows_amd64\\.exe$"), unpack: "file", exe: "yq.exe", cli: true },
25910
- { id: "ripgrep", name: "ripgrep", category: "cli", about: "Very fast recursive search (rg).", size: "2 MB", source: gh("BurntSushi/ripgrep", "^ripgrep-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "rg.exe", cli: true },
25911
- { id: "fd", name: "fd", category: "cli", about: "Fast, friendly alternative to find.", size: "2 MB", source: gh("sharkdp/fd", "^fd-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "fd.exe", cli: true },
25912
- { id: "bat", name: "bat", category: "cli", about: "cat with syntax highlighting and git changes.", size: "3 MB", source: gh("sharkdp/bat", "^bat-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "bat.exe", cli: true },
25913
- { id: "fzf", name: "fzf", category: "cli", about: "Fuzzy finder for the terminal.", size: "2 MB", source: gh("junegunn/fzf", "^fzf-[\\d.]+-windows_amd64\\.zip$"), exe: "fzf.exe", cli: true },
25914
- { id: "delta", name: "delta", category: "cli", about: "Readable git diffs with syntax highlighting.", size: "3 MB", source: gh("dandavison/delta", "^delta-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "delta.exe", cli: true },
25915
- { id: "just", name: "just", category: "cli", about: "Command runner (a simpler make for project tasks).", size: "2 MB", source: gh("casey/just", "^just-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "just.exe", cli: true },
25916
- { id: "hyperfine", name: "hyperfine", category: "cli", about: "Benchmark commands.", size: "1 MB", source: gh("sharkdp/hyperfine", "^hyperfine-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "hyperfine.exe", cli: true },
25917
- { id: "watchexec", name: "watchexec", category: "cli", about: "Run a command when files change.", size: "5 MB", source: gh("watchexec/watchexec", "^watchexec-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"), exe: "watchexec.exe", cli: true },
25918
- { id: "protoc", name: "protoc", category: "cli", about: "Protocol Buffers compiler.", size: "3 MB", source: gh("protocolbuffers/protobuf", "^protoc-[\\d.]+-win64\\.zip$"), exe: "protoc.exe", cli: true },
25919
- { id: "ninja", name: "Ninja", category: "cli", about: "Small, fast build system (CMake's favourite generator).", size: "1 MB", source: gh("ninja-build/ninja", "^ninja-win\\.zip$"), exe: "ninja.exe", cli: true },
25920
- { id: "ffmpeg", name: "FFmpeg", category: "cli", about: "Convert and process audio and video.", size: "200 MB", source: gh("BtbN/FFmpeg-Builds", "^ffmpeg-master-latest-win64-gpl\\.zip$"), exe: "ffmpeg.exe", cli: true },
25921
- { id: "sqlite", name: "SQLite tools", category: "cli", about: "sqlite3 command-line shell.", size: "5 MB", source: { resolve: "sqlite" }, exe: "sqlite3.exe", cli: true },
25922
- { id: "shellcheck", name: "ShellCheck", category: "cli", about: "Finds bugs in shell scripts.", size: "10 MB", source: gh("koalaman/shellcheck", "^shellcheck-v[\\d.]+\\.zip$"), exe: "shellcheck.exe", cli: true },
25923
- { id: "gitleaks", name: "Gitleaks", category: "cli", about: "Finds secrets committed to git.", size: "8 MB", source: gh("gitleaks/gitleaks", "^gitleaks_[\\d.]+_windows_x64\\.zip$"), exe: "gitleaks.exe", cli: true }
26595
+ {
26596
+ id: "jq",
26597
+ name: "jq",
26598
+ category: "cli",
26599
+ about: "Query and reshape JSON.",
26600
+ size: "1 MB",
26601
+ source: gh("jqlang/jq", "^jq-windows-amd64\\.exe$"),
26602
+ unpack: "file",
26603
+ exe: "jq.exe",
26604
+ cli: true
26605
+ },
26606
+ {
26607
+ id: "yq",
26608
+ name: "yq",
26609
+ category: "cli",
26610
+ about: "Query and edit YAML, JSON, XML and TOML.",
26611
+ size: "10 MB",
26612
+ source: gh("mikefarah/yq", "^yq_windows_amd64\\.exe$"),
26613
+ unpack: "file",
26614
+ exe: "yq.exe",
26615
+ cli: true
26616
+ },
26617
+ {
26618
+ id: "ripgrep",
26619
+ name: "ripgrep",
26620
+ category: "cli",
26621
+ about: "Very fast recursive search (rg).",
26622
+ size: "2 MB",
26623
+ source: gh("BurntSushi/ripgrep", "^ripgrep-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"),
26624
+ exe: "rg.exe",
26625
+ cli: true
26626
+ },
26627
+ {
26628
+ id: "fd",
26629
+ name: "fd",
26630
+ category: "cli",
26631
+ about: "Fast, friendly alternative to find.",
26632
+ size: "2 MB",
26633
+ source: gh("sharkdp/fd", "^fd-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"),
26634
+ exe: "fd.exe",
26635
+ cli: true
26636
+ },
26637
+ {
26638
+ id: "bat",
26639
+ name: "bat",
26640
+ category: "cli",
26641
+ about: "cat with syntax highlighting and git changes.",
26642
+ size: "3 MB",
26643
+ source: gh("sharkdp/bat", "^bat-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"),
26644
+ exe: "bat.exe",
26645
+ cli: true
26646
+ },
26647
+ {
26648
+ id: "fzf",
26649
+ name: "fzf",
26650
+ category: "cli",
26651
+ about: "Fuzzy finder for the terminal.",
26652
+ size: "2 MB",
26653
+ source: gh("junegunn/fzf", "^fzf-[\\d.]+-windows_amd64\\.zip$"),
26654
+ exe: "fzf.exe",
26655
+ cli: true
26656
+ },
26657
+ {
26658
+ id: "delta",
26659
+ name: "delta",
26660
+ category: "cli",
26661
+ about: "Readable git diffs with syntax highlighting.",
26662
+ size: "3 MB",
26663
+ source: gh("dandavison/delta", "^delta-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"),
26664
+ exe: "delta.exe",
26665
+ cli: true
26666
+ },
26667
+ {
26668
+ id: "just",
26669
+ name: "just",
26670
+ category: "cli",
26671
+ about: "Command runner (a simpler make for project tasks).",
26672
+ size: "2 MB",
26673
+ source: gh("casey/just", "^just-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"),
26674
+ exe: "just.exe",
26675
+ cli: true
26676
+ },
26677
+ {
26678
+ id: "hyperfine",
26679
+ name: "hyperfine",
26680
+ category: "cli",
26681
+ about: "Benchmark commands.",
26682
+ size: "1 MB",
26683
+ source: gh("sharkdp/hyperfine", "^hyperfine-v[\\d.]+-x86_64-pc-windows-msvc\\.zip$"),
26684
+ exe: "hyperfine.exe",
26685
+ cli: true
26686
+ },
26687
+ {
26688
+ id: "watchexec",
26689
+ name: "watchexec",
26690
+ category: "cli",
26691
+ about: "Run a command when files change.",
26692
+ size: "5 MB",
26693
+ source: gh("watchexec/watchexec", "^watchexec-[\\d.]+-x86_64-pc-windows-msvc\\.zip$"),
26694
+ exe: "watchexec.exe",
26695
+ cli: true
26696
+ },
26697
+ {
26698
+ id: "protoc",
26699
+ name: "protoc",
26700
+ category: "cli",
26701
+ about: "Protocol Buffers compiler.",
26702
+ size: "3 MB",
26703
+ source: gh("protocolbuffers/protobuf", "^protoc-[\\d.]+-win64\\.zip$"),
26704
+ exe: "protoc.exe",
26705
+ cli: true
26706
+ },
26707
+ {
26708
+ id: "ninja",
26709
+ name: "Ninja",
26710
+ category: "cli",
26711
+ about: "Small, fast build system (CMake's favourite generator).",
26712
+ size: "1 MB",
26713
+ source: gh("ninja-build/ninja", "^ninja-win\\.zip$"),
26714
+ exe: "ninja.exe",
26715
+ cli: true
26716
+ },
26717
+ {
26718
+ id: "ffmpeg",
26719
+ name: "FFmpeg",
26720
+ category: "cli",
26721
+ about: "Convert and process audio and video.",
26722
+ size: "200 MB",
26723
+ source: gh("BtbN/FFmpeg-Builds", "^ffmpeg-master-latest-win64-gpl\\.zip$"),
26724
+ exe: "ffmpeg.exe",
26725
+ cli: true
26726
+ },
26727
+ {
26728
+ id: "sqlite",
26729
+ name: "SQLite tools",
26730
+ category: "cli",
26731
+ about: "sqlite3 command-line shell.",
26732
+ size: "5 MB",
26733
+ source: { resolve: "sqlite" },
26734
+ exe: "sqlite3.exe",
26735
+ cli: true
26736
+ },
26737
+ {
26738
+ id: "shellcheck",
26739
+ name: "ShellCheck",
26740
+ category: "cli",
26741
+ about: "Finds bugs in shell scripts.",
26742
+ size: "10 MB",
26743
+ source: gh("koalaman/shellcheck", "^shellcheck-v[\\d.]+\\.zip$"),
26744
+ exe: "shellcheck.exe",
26745
+ cli: true
26746
+ },
26747
+ {
26748
+ id: "gitleaks",
26749
+ name: "Gitleaks",
26750
+ category: "cli",
26751
+ about: "Finds secrets committed to git.",
26752
+ size: "8 MB",
26753
+ source: gh("gitleaks/gitleaks", "^gitleaks_[\\d.]+_windows_x64\\.zip$"),
26754
+ exe: "gitleaks.exe",
26755
+ cli: true
26756
+ }
25924
26757
  ];
25925
26758
 
25926
26759
  // src/core/schema/apps.ts
25927
26760
  var CATALOGUE_IDS = APPS.filter((a) => !a.setting).map((a) => a.id);
25928
- var AppId = external_exports.enum(CATALOGUE_IDS);
25929
- var CustomAppId = external_exports.string().regex(/^[a-z0-9][a-z0-9-]{0,40}$/, "lower-case letters, digits and - only");
26761
+ var AppIdSchema = external_exports.enum(CATALOGUE_IDS);
26762
+ var CustomAppIdSchema = external_exports.string().regex(/^[a-z0-9][a-z0-9-]{0,40}$/, "lower-case letters, digits and - only");
25930
26763
  var compiles = (pattern) => {
25931
26764
  try {
25932
26765
  new RegExp(pattern);
@@ -25935,103 +26768,141 @@ var compiles = (pattern) => {
25935
26768
  return false;
25936
26769
  }
25937
26770
  };
25938
- var CustomApp = external_exports.strictObject({
26771
+ var CustomAppSchema = external_exports.strictObject({
25939
26772
  name: external_exports.string().min(1).max(80).describe('The name on the desktop shortcut, e.g. "My Tool".'),
25940
26773
  github: external_exports.string().regex(/^[\w.-]+\/[\w.-]+$/, "owner/repo, e.g. sharkdp/bat").optional().describe("GitHub repository (owner/repo): the file comes from its latest release."),
25941
26774
  asset: external_exports.string().max(200).refine(compiles, "not a valid pattern").optional().describe("With github: a pattern (regular expression) matching the release file, e.g. windows.*x64\\.zip$"),
25942
26775
  url: external_exports.string().url().startsWith("https://", "https:// only").optional().describe("Or a direct https:// download link (zip, 7z, exe or msi)."),
25943
26776
  sha256: external_exports.string().regex(/^[0-9a-fA-F]{64}$/, "64 hex characters").optional().describe("SHA-256 of the download (GitHub releases usually publish one; then this is not needed)."),
25944
- unpack: external_exports.enum(["archive", "file", "nsis", "msi"]).optional().describe("archive (zip, 7z, tar: the default), file (a single .exe), nsis (an installer 7-Zip can open) or msi."),
26777
+ unpack: external_exports.enum(["archive", "file", "nsis", "msi"]).optional().describe(
26778
+ "archive (zip, 7z, tar: the default), file (a single .exe), nsis (an installer 7-Zip can open) or msi."
26779
+ ),
25945
26780
  exe: external_exports.string().min(1).max(200).describe("The program to start (found anywhere in the download), e.g. mytool.exe."),
25946
26781
  cli: external_exports.boolean().optional().describe("A command-line tool: its folder goes on PATH instead of getting a desktop shortcut.")
25947
- }).refine((a) => a.github && a.asset ? !a.url : Boolean(a.url) && !a.github && !a.asset, { message: "give github + asset, or url (not both)" });
25948
- var Apps = external_exports.strictObject({
25949
- install: external_exports.array(AppId).describe("Apps from the catalogue to install in every sandbox (the Apps screen in the menu lists them by category). Each is downloaded once and kept."),
25950
- custom: external_exports.record(CustomAppId, CustomApp).describe("Programs of your own: a GitHub release or a download link, and the program to start. Installed like the catalogue apps.")
26782
+ }).refine((a) => a.github && a.asset ? !a.url : Boolean(a.url) && !a.github && !a.asset, {
26783
+ message: "give github + asset, or url (not both)"
26784
+ });
26785
+ var AppsSchema = external_exports.strictObject({
26786
+ install: external_exports.array(AppIdSchema).describe(
26787
+ "Apps from the catalogue to install in every sandbox (the Apps screen in the menu lists them by category). Each is downloaded once and kept."
26788
+ ),
26789
+ custom: external_exports.record(CustomAppIdSchema, CustomAppSchema).describe(
26790
+ "Programs of your own: a GitHub release or a download link, and the program to start. Installed like the catalogue apps."
26791
+ )
25951
26792
  });
25952
26793
 
25953
26794
  // src/core/schema/projects.ts
25954
- var Projects = external_exports.strictObject({
25955
- all: external_exports.boolean().describe("Map every project you have started before (and every folder in your roots) at every start, except those in exclude, so all of them open in the running sandbox without a restart. Every agent in the sandbox can then see all of them. Each one is still only set up when you first use it."),
26795
+ var ProjectsSchema = external_exports.strictObject({
26796
+ all: external_exports.boolean().describe(
26797
+ "Map every project you have started before (and every folder in your roots) at every start, except those in exclude, so all of them open in the running sandbox without a restart. Every agent in the sandbox can then see all of them. Each one is still only set up when you first use it."
26798
+ ),
25956
26799
  exclude: external_exports.array(external_exports.string().min(1)).describe('Projects left out when "all" is on (folders on this PC).'),
25957
- roots: external_exports.array(external_exports.string().min(1)).describe('Folders whose subfolders are your projects (e.g. "F:\\\\Code"), mapped read/write at every start. Any project inside one, including ones you create later, opens in the running sandbox at once, without a restart. Every agent in the sandbox can see all of them.'),
26800
+ roots: external_exports.array(external_exports.string().min(1)).describe(
26801
+ 'Folders whose subfolders are your projects (e.g. "F:\\\\Code"), mapped read/write at every start. Any project inside one, including ones you create later, opens in the running sandbox at once, without a restart. Every agent in the sandbox can see all of them.'
26802
+ ),
25958
26803
  askToAddRoot: external_exports.boolean().describe("When you start a project whose parent folder is not a root yet, ask once whether to add it."),
25959
26804
  declinedRoots: external_exports.array(external_exports.string().min(1)).describe("Parent folders you said no to (not asked again)."),
25960
- allowOutsideMappings: external_exports.union([external_exports.literal("ask"), external_exports.boolean()]).describe(`A project's .sandbox-config.json may map folders from outside the project (e.g. a game folder on another drive). "ask" = an interactive launch asks once per project and set of folders, and remembers your answer; true = always allowed (still listed when you approve the file); false = never (the launch stops and says which folders). Only your own settings decide this, never a project file.`),
25961
- wsbShare: external_exports.boolean().describe("On Windows 11 24H2+ with the Windows Sandbox command line (wsb), add other folders to the running sandbox with `wsb share` (untested). Otherwise starting a project outside every root offers a restart.")
26805
+ allowOutsideMappings: external_exports.union([external_exports.literal("ask"), external_exports.boolean()]).describe(
26806
+ `A project's .sandbox-config.json may map folders from outside the project (e.g. a game folder on another drive). "ask" = an interactive launch asks once per project and set of folders, and remembers your answer; true = always allowed (still listed when you approve the file); false = never (the launch stops and says which folders). Only your own settings decide this, never a project file.`
26807
+ ),
26808
+ wsbShare: external_exports.boolean().describe(
26809
+ "On Windows 11 24H2+ with the Windows Sandbox command line (wsb), add other folders to the running sandbox with `wsb share` (untested). Otherwise starting a project outside every root offers a restart."
26810
+ )
25962
26811
  });
25963
26812
 
25964
26813
  // src/core/schema/config.ts
25965
- var Config = external_exports.strictObject({
25966
- $schema: SchemaRef.optional(),
25967
- defaultHarness: Name.describe("Agent started by `sandbox launch` (sandbox claude always runs claude)."),
25968
- guestWorkspace: GuestWorkspace,
26814
+ var ConfigSchema = external_exports.strictObject({
26815
+ $schema: SchemaRefSchema.optional(),
26816
+ defaultHarness: NameSchema.describe("Agent started by `sandbox launch` (sandbox claude always runs claude)."),
26817
+ guestWorkspace: GuestWorkspaceSchema,
25969
26818
  readOnly: external_exports.boolean().describe("Map the workspace read-only."),
25970
- workspaceFilter: WorkspaceFilter,
25971
- audit: Audit,
25972
- mappings: external_exports.array(Mapping).describe("Extra folders from this PC."),
25973
- sandbox: Sandbox,
26819
+ workspaceFilter: WorkspaceFilterSchema,
26820
+ audit: AuditSchema,
26821
+ mappings: external_exports.array(MappingSchema).describe("Extra folders from this PC."),
26822
+ sandbox: SandboxSchema,
25974
26823
  storage: external_exports.strictObject({
25975
26824
  root: external_exports.string().min(1).describe("Where everything is kept on this PC (tools, databases, logins, launches)."),
25976
26825
  persistAgentState: external_exports.boolean().describe("Keep agent logins and history between sandboxes."),
25977
- dataName: Name.describe("Name of the persistent data set (C:\\AgentData) shared by all workspaces."),
25978
- markSandboxFiles: external_exports.boolean().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.`),
25979
- warnDataGb: external_exports.number().min(0).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.")
26826
+ dataName: NameSchema.describe("Name of the persistent data set (C:\\AgentData) shared by all workspaces."),
26827
+ markSandboxFiles: external_exports.boolean().describe(
26828
+ `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.`
26829
+ ),
26830
+ warnDataGb: external_exports.number().min(0).describe(
26831
+ "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."
26832
+ )
25980
26833
  }),
25981
- network: Network,
25982
- provisioning: Provisioning,
25983
- downloads: Downloads,
25984
- toolchains: Toolchains,
25985
- databases: Databases.describe("Databases running inside the sandbox. Data persists in C:\\AgentData\\databases; each one starts at boot."),
25986
- attach: Attach,
25987
- agentCommands: AgentCommands,
25988
- secrets: Secrets,
26834
+ network: NetworkSchema,
26835
+ provisioning: ProvisioningSchema,
26836
+ downloads: DownloadsSchema,
26837
+ toolchains: ToolchainsSchema,
26838
+ databases: DatabasesSchema.describe(
26839
+ "Databases running inside the sandbox. Data persists in C:\\AgentData\\databases; each one starts at boot."
26840
+ ),
26841
+ attach: AttachSchema,
26842
+ agentCommands: AgentCommandsSchema,
26843
+ secrets: SecretsSchema,
25989
26844
  personalization: toggle("Copy your desktop look (theme, accent, taskbar, wallpaper, ...) into the sandbox."),
25990
- apps: Apps,
25991
- claudeProfile: ClaudeProfile,
25992
- harnesses: external_exports.record(Name, Harness).describe("Agents that can run in the sandbox."),
26845
+ apps: AppsSchema,
26846
+ claudeProfile: ClaudeProfileSchema,
26847
+ harnesses: external_exports.record(NameSchema, HarnessSchema).describe("Agents that can run in the sandbox."),
25993
26848
  hooks: external_exports.strictObject({ failFast: external_exports.boolean().describe("Stop when a hook script fails.") }),
25994
- projects: Projects.describe("Several projects in one sandbox: folders of projects mapped at every start, and adding folders while it runs.")
25995
- }).refine((c) => c.harnesses[c.defaultHarness] !== void 0, { message: "defaultHarness must be one of the configured harnesses", path: ["defaultHarness"] });
25996
- var LocalOverrides = external_exports.strictObject({
25997
- $schema: SchemaRef,
25998
- harness: Name.describe("Agent for this project."),
25999
- guestWorkspace: GuestWorkspace,
26849
+ projects: ProjectsSchema.describe(
26850
+ "Several projects in one sandbox: folders of projects mapped at every start, and adding folders while it runs."
26851
+ )
26852
+ }).refine((c) => c.harnesses[c.defaultHarness] !== void 0, {
26853
+ message: "defaultHarness must be one of the configured harnesses",
26854
+ path: ["defaultHarness"]
26855
+ });
26856
+ var LocalOverridesSchema = external_exports.strictObject({
26857
+ $schema: SchemaRefSchema,
26858
+ harness: NameSchema.describe("Agent for this project."),
26859
+ guestWorkspace: GuestWorkspaceSchema,
26000
26860
  readOnly: external_exports.boolean().describe("Map this project read-only."),
26001
26861
  // A project may turn the filter on and keep more out, never let ignored files in.
26002
- workspaceFilter: WorkspaceFilter.pick({ enabled: true, exclude: true }).partial(),
26003
- mappings: external_exports.array(Mapping).describe("Extra folders (relative paths are relative to this file), e.g. a read-only data folder at another place in the sandbox. Folders outside the project are used only as your projects.allowOutsideMappings setting allows (by default you are asked once)."),
26004
- scripts: Strings.describe("Scripts (.ps1 / .mjs / .cmd, relative to this file) run inside the sandbox before the agent."),
26862
+ workspaceFilter: WorkspaceFilterSchema.pick({ enabled: true, exclude: true }).partial(),
26863
+ mappings: external_exports.array(MappingSchema).describe(
26864
+ "Extra folders (relative paths are relative to this file), e.g. a read-only data folder at another place in the sandbox. Folders outside the project are used only as your projects.allowOutsideMappings setting allows (by default you are asked once)."
26865
+ ),
26866
+ scripts: StringsSchema.describe(
26867
+ "Scripts (.ps1 / .mjs / .cmd, relative to this file) run inside the sandbox before the agent."
26868
+ ),
26005
26869
  // This PC's resources are yours to share: CPU and paging file (this PC's disk) are not a project's to set.
26006
- sandbox: Sandbox.omit({ cpuLimit: true, pageFileMb: true }).partial(),
26870
+ sandbox: SandboxSchema.omit({ cpuLimit: true, pageFileMb: true }).partial(),
26007
26871
  // A project may block more (the LAN, hosts); it never opens hosts, ports, DNS or a proxy.
26008
- network: Network.pick({ blockPrivateRanges: true, blockHosts: true }).partial(),
26009
- provisioning: Provisioning.pick({ copyFromHost: true, fallbackToInstall: true, refresh: true }).extend({ git: Git.partial(), terminal: toggle("Windows Terminal as the sandbox window.").partial() }).partial(),
26010
- downloads: Downloads.partial(),
26872
+ network: NetworkSchema.pick({ blockPrivateRanges: true, blockHosts: true }).partial(),
26873
+ provisioning: ProvisioningSchema.pick({ copyFromHost: true, fallbackToInstall: true, refresh: true }).extend({ git: GitSchema.partial(), terminal: toggle("Windows Terminal as the sandbox window.").partial() }).partial(),
26874
+ downloads: DownloadsSchema.partial(),
26011
26875
  // Every toolchain setting, each one optional (a project usually only switches languages on or pins a version).
26012
26876
  toolchains: external_exports.strictObject({
26013
- ...import_lodash.default.mapValues(import_lodash.default.omit(Toolchains.shape, "environment"), (shape) => shape.partial()),
26014
- environment: Toolchains.shape.environment
26877
+ ...import_lodash.default.mapValues(import_lodash.default.omit(ToolchainsSchema.shape, "environment"), (shape) => shape.partial()),
26878
+ environment: ToolchainsSchema.shape.environment
26015
26879
  }).partial(),
26016
- databases: external_exports.strictObject(import_lodash.default.mapValues(Databases.shape, (shape) => shape.partial())).partial(),
26017
- attach: Attach.partial(),
26880
+ databases: external_exports.strictObject(import_lodash.default.mapValues(DatabasesSchema.shape, (shape) => shape.partial())).partial(),
26881
+ attach: AttachSchema.partial(),
26018
26882
  personalization: toggle("Copy your desktop look into the sandbox.").partial(),
26019
- // Catalogue apps only (a vetted list): your own programs (apps.custom) download anything, so a repo cannot add them.
26020
- apps: Apps.pick({ install: true }).partial(),
26021
- claudeProfile: ClaudeProfile.pick({ enabled: true, overwrite: true, copyCredentials: true, syncHistory: true, syncClaudeMem: true }).partial(),
26883
+ // Catalogue apps only (a vetted list): your own programs (apps.custom) download anything, so a repo cannot add
26884
+ // them.
26885
+ apps: AppsSchema.pick({ install: true }).partial(),
26886
+ claudeProfile: ClaudeProfileSchema.pick({
26887
+ enabled: true,
26888
+ overwrite: true,
26889
+ copyCredentials: true,
26890
+ syncHistory: true,
26891
+ syncClaudeMem: true
26892
+ }).partial(),
26022
26893
  hooks: external_exports.strictObject({ failFast: external_exports.boolean() }).partial()
26023
26894
  }).partial();
26024
26895
 
26025
- // src/shared/schema.ts
26026
- var Id = external_exports.string().regex(/^[A-Za-z0-9_-]{1,64}$/, "invalid id");
26896
+ // src/shared/channel/schema.ts
26897
+ var IdSchema = external_exports.string().regex(/^[A-Za-z0-9_-]{1,64}$/, "invalid id");
26027
26898
  var Text = (max = 4096) => external_exports.string().max(max);
26028
- var Time = Text(64);
26029
- var AttachEndpoint = external_exports.strictObject({
26899
+ var TimeSchema = Text(64);
26900
+ var AttachEndpointSchema = external_exports.strictObject({
26030
26901
  addresses: external_exports.array(Text(64)).max(16),
26031
26902
  port: external_exports.number().int().min(1024).max(65535),
26032
26903
  token: Text(256)
26033
26904
  });
26034
- var BootProgress = external_exports.strictObject({
26905
+ var BootProgressSchema = external_exports.strictObject({
26035
26906
  step: external_exports.number().int().min(1).max(32),
26036
26907
  steps: external_exports.number().int().min(1).max(32),
26037
26908
  title: Text(120),
@@ -26040,60 +26911,82 @@ var BootProgress = external_exports.strictObject({
26040
26911
  done: external_exports.number().int().min(0).max(1e3),
26041
26912
  total: external_exports.number().int().min(0).max(1e3)
26042
26913
  });
26043
- var SandboxStatus = external_exports.object({
26914
+ var SandboxStatusSchema = external_exports.object({
26044
26915
  launchId: Text(64),
26045
26916
  phase: external_exports.enum(["booting", "provisioning", "ready", "failed"]),
26046
26917
  message: Text(),
26047
- updatedAt: Time,
26918
+ updatedAt: TimeSchema,
26048
26919
  workspaceHost: Text(),
26049
26920
  guestWorkspace: Text(),
26050
26921
  headless: external_exports.boolean(),
26051
26922
  /** The sandbox's IPv4 addresses (for network.forwardPorts; the host only uses ones on its Hyper-V network). */
26052
26923
  addresses: external_exports.array(external_exports.string().max(45)).max(8).optional(),
26053
26924
  /** A malformed progress is dropped, never the status (the phase still counts). */
26054
- progress: BootProgress.optional().catch(void 0)
26925
+ progress: BootProgressSchema.optional().catch(void 0)
26055
26926
  });
26056
- var Version = external_exports.strictObject({ spec: Text(128), source: Text(256) });
26057
- var DatabasePlan = external_exports.strictObject({
26927
+ var VersionSchema = external_exports.strictObject({ spec: Text(128), source: Text(256) });
26928
+ var DatabasePlanSchema = external_exports.strictObject({
26058
26929
  database: external_exports.enum(["postgres", "mysql", "sqlserver", "mongodb", "redis", "dynamodb"]),
26059
26930
  reasons: external_exports.array(Text(1024)).max(32),
26060
26931
  version: Text(64),
26061
26932
  port: external_exports.number().int().min(1024).max(65535),
26062
26933
  adminPort: external_exports.number().int().min(1024).max(65535).optional()
26063
26934
  });
26064
- var ProjectSpec = external_exports.strictObject({
26065
- name: Id,
26935
+ var ProjectSpecSchema = external_exports.strictObject({
26936
+ name: IdSchema,
26066
26937
  /** Inside the sandbox: C:\Projects\<name>. */
26067
26938
  workspace: Text(1024),
26068
26939
  workspaceHost: Text(1024),
26069
- toolchains: Toolchains,
26070
- versions: external_exports.strictObject({ node: Version, nodeExtra: external_exports.array(Text(128)).max(16), python: Version }),
26071
- databases: external_exports.array(DatabasePlan).max(8),
26940
+ toolchains: ToolchainsSchema,
26941
+ versions: external_exports.strictObject({ node: VersionSchema, nodeExtra: external_exports.array(Text(128)).max(16), python: VersionSchema }),
26942
+ databases: external_exports.array(DatabasePlanSchema).max(8),
26072
26943
  /** Agents this project may start that the sandbox did not boot with (its .sandbox-config.json "harness"). */
26073
- harnesses: external_exports.record(Text(64), Harness).refine((h) => Object.keys(h).length <= 8, "at most 8 agents"),
26944
+ harnesses: external_exports.record(Text(64), HarnessSchema).refine((h) => Object.keys(h).length <= 8, "at most 8 agents"),
26074
26945
  /** Its hooks were staged in C:\AgentLaunch\projects\<name>\hooks. */
26075
26946
  hooks: external_exports.boolean()
26076
26947
  });
26077
- var GuestRequest = external_exports.discriminatedUnion("kind", [
26078
- external_exports.strictObject({ kind: external_exports.literal("session"), id: Id, harness: Text(64), args: external_exports.array(Text()).max(256), cwd: Text(), project: ProjectSpec.optional(), harnessSpec: Harness.optional(), createdAt: Time }),
26948
+ var GuestRequestSchema = external_exports.discriminatedUnion("kind", [
26949
+ external_exports.strictObject({
26950
+ kind: external_exports.literal("session"),
26951
+ id: IdSchema,
26952
+ harness: Text(64),
26953
+ args: external_exports.array(Text()).max(256),
26954
+ cwd: Text(),
26955
+ project: ProjectSpecSchema.optional(),
26956
+ harnessSpec: HarnessSchema.optional(),
26957
+ createdAt: TimeSchema
26958
+ }),
26079
26959
  /** Provision a registered project without starting an agent (sandbox start / exec / db from its folder). */
26080
- external_exports.strictObject({ kind: external_exports.literal("project"), id: Id, project: ProjectSpec, createdAt: Time }),
26081
- external_exports.strictObject({ kind: external_exports.literal("exec"), id: Id, command: external_exports.array(Text()).min(1).max(256), cwd: Text(), timeoutSeconds: external_exports.number().positive().max(86400), createdAt: Time }),
26960
+ external_exports.strictObject({ kind: external_exports.literal("project"), id: IdSchema, project: ProjectSpecSchema, createdAt: TimeSchema }),
26961
+ external_exports.strictObject({
26962
+ kind: external_exports.literal("exec"),
26963
+ id: IdSchema,
26964
+ command: external_exports.array(Text()).min(1).max(256),
26965
+ cwd: Text(),
26966
+ timeoutSeconds: external_exports.number().positive().max(86400),
26967
+ createdAt: TimeSchema
26968
+ }),
26082
26969
  /** cwd: only the sessions in this folder or below (one project's); omitted = every session. */
26083
- external_exports.strictObject({ kind: external_exports.literal("restart"), id: Id, harness: Text(64).nullable(), cwd: Text().optional(), createdAt: Time }),
26084
- external_exports.strictObject({ kind: external_exports.literal("ping"), id: Id, createdAt: Time })
26970
+ external_exports.strictObject({
26971
+ kind: external_exports.literal("restart"),
26972
+ id: IdSchema,
26973
+ harness: Text(64).nullable(),
26974
+ cwd: Text().optional(),
26975
+ createdAt: TimeSchema
26976
+ }),
26977
+ external_exports.strictObject({ kind: external_exports.literal("ping"), id: IdSchema, createdAt: TimeSchema })
26085
26978
  ]);
26086
- var GuestResponse = external_exports.object({
26087
- id: Id,
26979
+ var GuestResponseSchema = external_exports.object({
26980
+ id: IdSchema,
26088
26981
  ok: external_exports.boolean(),
26089
26982
  message: Text(65536),
26090
26983
  exitCode: external_exports.number().int().optional(),
26091
26984
  stdout: Text(4 * 1024 * 1024).optional(),
26092
26985
  stderr: Text(4 * 1024 * 1024).optional(),
26093
- finishedAt: Time
26986
+ finishedAt: TimeSchema
26094
26987
  });
26095
- var SessionStatus = external_exports.object({
26096
- id: Id,
26988
+ var SessionStatusSchema = external_exports.object({
26989
+ id: IdSchema,
26097
26990
  launchId: Text(64),
26098
26991
  harness: Text(64),
26099
26992
  cwd: Text(),
@@ -26101,42 +26994,24 @@ var SessionStatus = external_exports.object({
26101
26994
  project: Text(64).optional(),
26102
26995
  phase: external_exports.enum(["starting", "running", "exited", "failed"]),
26103
26996
  message: Text(),
26104
- updatedAt: Time,
26105
- startedAt: Time,
26997
+ updatedAt: TimeSchema,
26998
+ startedAt: TimeSchema,
26106
26999
  exitCode: external_exports.number().int().optional(),
26107
- attach: AttachEndpoint.optional()
27000
+ attach: AttachEndpointSchema.optional()
26108
27001
  });
26109
- var ProjectStatus = external_exports.object({
26110
- name: Id,
27002
+ var ProjectStatusSchema = external_exports.object({
27003
+ name: IdSchema,
26111
27004
  workspace: Text(1024),
26112
27005
  phase: external_exports.enum(["provisioning", "ready", "failed"]),
26113
27006
  message: Text(),
26114
- updatedAt: Time,
27007
+ updatedAt: TimeSchema,
26115
27008
  databases: external_exports.array(external_exports.object({ database: Text(32), port: external_exports.number().int() })).max(16),
26116
27009
  summary: external_exports.array(Text(512)).max(64)
26117
27010
  });
26118
27011
 
26119
- // src/shared/rundir.ts
27012
+ // src/shared/io/json.ts
27013
+ import fs from "node:fs";
26120
27014
  var MAX_MESSAGE_BYTES = 8 * 1024 * 1024;
26121
- var safeId = (id) => Id.parse(id);
26122
- var runPaths = (dataDir2) => {
26123
- const run2 = path2.join(dataDir2, "run");
26124
- const file2 = (dir) => (id) => path2.join(run2, dir, safeId(id) + ".json");
26125
- return {
26126
- run: run2,
26127
- sandbox: path2.join(run2, "sandbox.json"),
26128
- requests: path2.join(run2, "requests"),
26129
- responses: path2.join(run2, "responses"),
26130
- sessions: path2.join(run2, "sessions"),
26131
- projects: path2.join(run2, "projects"),
26132
- /** audit.processes: programs the sandbox started, in small .jsonl files the host takes in and deletes. */
26133
- audit: path2.join(run2, "audit"),
26134
- request: file2("requests"),
26135
- response: file2("responses"),
26136
- session: file2("sessions"),
26137
- project: file2("projects")
26138
- };
26139
- };
26140
27015
  var readJsonFile = (file2) => {
26141
27016
  try {
26142
27017
  if (fs.statSync(file2).size > MAX_MESSAGE_BYTES) return null;
@@ -26149,19 +27024,77 @@ var readValid = (schema, file2) => {
26149
27024
  const parsed = schema.safeParse(readJsonFile(file2));
26150
27025
  return parsed.success ? parsed.data : null;
26151
27026
  };
26152
- var readSession = (dataDir2, id) => readValid(SessionStatus, runPaths(dataDir2).session(id));
26153
-
26154
- // src/guest/env.ts
26155
- import fs2 from "node:fs";
26156
- import path3 from "node:path";
26157
27027
 
26158
- // src/shared/download.ts
26159
- var checksumRequired = false;
26160
- var setChecksumRequired = (on) => {
26161
- checksumRequired = on;
27028
+ // src/shared/channel/run-dir.ts
27029
+ function safeId(id) {
27030
+ return IdSchema.parse(id);
27031
+ }
27032
+ var scan = (schema, dir) => {
27033
+ if (!fs2.existsSync(dir)) return { valid: [], invalid: [] };
27034
+ const valid = [];
27035
+ const invalid = [];
27036
+ for (const name of fs2.readdirSync(dir)) {
27037
+ if (name.endsWith(".tmp")) continue;
27038
+ const message = /^[A-Za-z0-9_-]{1,64}\.json$/.test(name) ? readValid(schema, path2.join(dir, name)) : null;
27039
+ if (message) valid.push(message);
27040
+ else invalid.push(path2.join(dir, name));
27041
+ }
27042
+ return { valid, invalid };
27043
+ };
27044
+ var RunDir = class {
27045
+ root;
27046
+ sandboxFile;
27047
+ requestsDir;
27048
+ responsesDir;
27049
+ sessionsDir;
27050
+ projectsDir;
27051
+ /** audit.processes: programs the sandbox started, in small .jsonl files the host takes in and deletes. */
27052
+ auditDir;
27053
+ constructor(dataDir2) {
27054
+ this.root = path2.join(dataDir2, "run");
27055
+ this.sandboxFile = path2.join(this.root, "sandbox.json");
27056
+ this.requestsDir = path2.join(this.root, "requests");
27057
+ this.responsesDir = path2.join(this.root, "responses");
27058
+ this.sessionsDir = path2.join(this.root, "sessions");
27059
+ this.projectsDir = path2.join(this.root, "projects");
27060
+ this.auditDir = path2.join(this.root, "audit");
27061
+ }
27062
+ requestFile(id) {
27063
+ return path2.join(this.requestsDir, safeId(id) + ".json");
27064
+ }
27065
+ responseFile(id) {
27066
+ return path2.join(this.responsesDir, safeId(id) + ".json");
27067
+ }
27068
+ sessionFile(id) {
27069
+ return path2.join(this.sessionsDir, safeId(id) + ".json");
27070
+ }
27071
+ projectFile(name) {
27072
+ return path2.join(this.projectsDir, safeId(name) + ".json");
27073
+ }
27074
+ readSandboxStatus() {
27075
+ return readValid(SandboxStatusSchema, this.sandboxFile);
27076
+ }
27077
+ readSession(id) {
27078
+ return readValid(SessionStatusSchema, this.sessionFile(id));
27079
+ }
27080
+ readResponse(id) {
27081
+ return readValid(GuestResponseSchema, this.responseFile(id));
27082
+ }
27083
+ listSessions() {
27084
+ return scan(SessionStatusSchema, this.sessionsDir).valid.sort((a, b) => a.startedAt.localeCompare(b.startedAt));
27085
+ }
27086
+ readProjectStatus(name) {
27087
+ return readValid(ProjectStatusSchema, this.projectFile(name));
27088
+ }
27089
+ listProjectStatus() {
27090
+ return scan(ProjectStatusSchema, this.projectsDir).valid.slice(0, 64);
27091
+ }
27092
+ scanRequests() {
27093
+ return scan(GuestRequestSchema, this.requestsDir);
27094
+ }
26162
27095
  };
26163
27096
 
26164
- // src/guest/env.ts
27097
+ // src/guest/runtime/paths.ts
26165
27098
  var isWin = process.platform === "win32";
26166
27099
  var dryRun = process.env.AGENT_DRY_RUN === "1";
26167
27100
  var testMode = process.env.AGENT_SANDBOX_TEST === "1";
@@ -26171,20 +27104,13 @@ var hostToolsDir = process.env.AGENT_HOST_TOOLS_DIR ?? "C:\\HostTools";
26171
27104
  var localDir = process.env.AGENT_LOCAL_DIR ?? "C:\\nvm";
26172
27105
  var toolsDir = path3.join(dataDir, "tools");
26173
27106
  var logsDir = path3.join(dataDir, "logs");
26174
- var run = runPaths(dataDir);
26175
- var session = JSON.parse(fs2.readFileSync(path3.join(launchDir, "session.json"), "utf8").replace(/^\uFEFF/, ""));
26176
- setChecksumRequired(session.downloads?.requireChecksum === true);
26177
- var workspace = process.env.AGENT_WORKSPACE ?? session.workspace;
26178
- var stateDir = path3.join(dataDir, session.persistAgentState ? "state" : "state-session");
26179
- var claudeDir = path3.join(stateDir, "claude");
26180
- fs2.mkdirSync(logsDir, { recursive: true });
26181
- var logFile = path3.join(logsDir, (process.env.AGENT_LOG_PREFIX ?? "guest") + "-" + (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-") + ".log");
27107
+ var run = new RunDir(dataDir);
26182
27108
 
26183
- // src/guest/view.ts
27109
+ // src/guest/sessions/viewer.ts
26184
27110
  var waitUntilStarted = async (id) => {
26185
27111
  let last = "";
26186
27112
  for (let i = 0; i < 3600; i++) {
26187
- const s = readSession(dataDir, id);
27113
+ const s = run.readSession(id);
26188
27114
  if (s && s.phase !== "starting") return s;
26189
27115
  if (s && s.message !== last) {
26190
27116
  console.log(" " + s.message);
@@ -26192,33 +27118,35 @@ var waitUntilStarted = async (id) => {
26192
27118
  }
26193
27119
  await new Promise((r) => setTimeout(r, 500));
26194
27120
  }
26195
- return readSession(dataDir, id);
27121
+ return run.readSession(id);
26196
27122
  };
26197
27123
  var viewSession = async (id) => {
26198
- const session2 = await waitUntilStarted(id);
26199
- if (session2?.phase === "failed") {
26200
- console.error("Session " + id + " could not start: " + session2.message);
27124
+ const session = await waitUntilStarted(id);
27125
+ if (session?.phase === "failed") {
27126
+ console.error("Session " + id + " could not start: " + session.message);
26201
27127
  await new Promise((r) => setTimeout(r, 3e4));
26202
27128
  return 1;
26203
27129
  }
26204
- if (!session2?.attach) {
27130
+ if (!session?.attach) {
26205
27131
  console.error("Session " + id + " is not running.");
26206
27132
  return 1;
26207
27133
  }
26208
- const socket = await connect({ ...session2.attach, addresses: ["127.0.0.1"] });
26209
- const result = await runTerminalClient(socket, session2.attach.token);
26210
- if (result.reason === "exit") console.log(session2.harness + " exited with code " + result.exitCode + ".");
27134
+ const socket = await connect({ ...session.attach, addresses: ["127.0.0.1"] });
27135
+ const result = await runTerminalClient(socket, session.attach.token);
27136
+ if (result.reason === "exit") console.log(session.harness + " exited with code " + result.exitCode + ".");
26211
27137
  else if (result.reason === "error") console.log("Session error: " + result.message);
26212
27138
  return result.reason === "exit" ? result.exitCode : 1;
26213
27139
  };
27140
+
27141
+ // src/guest/entries/view.ts
26214
27142
  if (process.argv[1]?.endsWith("view.js") && process.argv[2]) {
26215
- viewSession(process.argv[2]).then((code) => {
26216
- process.exitCode = code;
26217
- }, (e) => {
26218
- console.error(e instanceof Error ? e.message : String(e));
26219
- process.exitCode = 1;
26220
- });
27143
+ viewSession(process.argv[2]).then(
27144
+ (code) => {
27145
+ process.exitCode = code;
27146
+ },
27147
+ (e) => {
27148
+ console.error(e instanceof Error ? e.message : String(e));
27149
+ process.exitCode = 1;
27150
+ }
27151
+ );
26221
27152
  }
26222
- export {
26223
- viewSession
26224
- };