windows-development-sandbox 1.4.0 → 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 (877) hide show
  1. package/.sandbox-config.example.json +2 -1
  2. package/config.example.json +4 -1
  3. package/dist/api.js +27 -16
  4. package/dist/cli/args.d.ts +4 -6
  5. package/dist/cli/args.js +67 -34
  6. package/dist/cli/argv.d.ts +9 -0
  7. package/dist/cli/argv.js +22 -0
  8. package/dist/cli/commands/accounts.d.ts +1 -1
  9. package/dist/cli/commands/accounts.js +42 -27
  10. package/dist/cli/commands/agent-commands.d.ts +3 -3
  11. package/dist/cli/commands/agent-commands.js +27 -18
  12. package/dist/cli/commands/context.d.ts +9 -11
  13. package/dist/cli/commands/context.js +35 -32
  14. package/dist/cli/commands/data/clean.d.ts +2 -2
  15. package/dist/cli/commands/data/clean.js +27 -11
  16. package/dist/cli/commands/data/collect.d.ts +6 -3
  17. package/dist/cli/commands/data/collect.js +46 -15
  18. package/dist/cli/commands/data/index.d.ts +2 -2
  19. package/dist/cli/commands/data/index.js +30 -12
  20. package/dist/cli/commands/data/remove.d.ts +1 -1
  21. package/dist/cli/commands/data/remove.js +4 -4
  22. package/dist/cli/commands/index.d.ts +5 -4
  23. package/dist/cli/commands/index.js +5 -4
  24. package/dist/cli/commands/launch/add-root.d.ts +7 -0
  25. package/dist/cli/commands/launch/add-root.js +64 -0
  26. package/dist/cli/commands/launch/boot-progress.d.ts +7 -0
  27. package/dist/cli/commands/launch/boot-progress.js +48 -0
  28. package/dist/cli/commands/launch/boot-wants.d.ts +11 -0
  29. package/dist/cli/commands/launch/boot-wants.js +48 -0
  30. package/dist/cli/commands/launch/first-start.d.ts +10 -0
  31. package/dist/cli/commands/launch/first-start.js +53 -0
  32. package/dist/cli/commands/launch/index.d.ts +6 -0
  33. package/dist/cli/commands/launch/index.js +6 -0
  34. package/dist/cli/commands/launch/launch.d.ts +8 -0
  35. package/dist/cli/commands/launch/launch.js +211 -0
  36. package/dist/cli/commands/launch/prepare.d.ts +23 -0
  37. package/dist/cli/commands/launch/prepare.js +109 -0
  38. package/dist/cli/commands/launch/running.d.ts +45 -0
  39. package/dist/cli/commands/launch/running.js +218 -0
  40. package/dist/cli/commands/launch/summary.d.ts +8 -0
  41. package/dist/cli/commands/launch/summary.js +98 -0
  42. package/dist/cli/commands/maintenance/audit.d.ts +3 -0
  43. package/dist/cli/commands/maintenance/audit.js +58 -0
  44. package/dist/cli/commands/maintenance/clean.d.ts +2 -0
  45. package/dist/cli/commands/maintenance/clean.js +10 -0
  46. package/dist/cli/commands/maintenance/config.d.ts +2 -0
  47. package/dist/cli/commands/maintenance/config.js +145 -0
  48. package/dist/cli/commands/maintenance/doctor.d.ts +2 -0
  49. package/dist/cli/commands/maintenance/doctor.js +52 -0
  50. package/dist/cli/commands/maintenance/host-claude.d.ts +2 -0
  51. package/dist/cli/commands/maintenance/host-claude.js +4 -0
  52. package/dist/cli/commands/maintenance/index.d.ts +8 -0
  53. package/dist/cli/commands/maintenance/index.js +9 -0
  54. package/dist/cli/commands/maintenance/logs.d.ts +2 -0
  55. package/dist/cli/commands/maintenance/logs.js +44 -0
  56. package/dist/cli/commands/maintenance/sync.d.ts +2 -0
  57. package/dist/cli/commands/maintenance/sync.js +12 -0
  58. package/dist/cli/commands/maintenance/watch.d.ts +3 -0
  59. package/dist/cli/commands/maintenance/watch.js +6 -0
  60. package/dist/cli/commands/projects/describe-sessions.d.ts +3 -0
  61. package/dist/cli/commands/projects/describe-sessions.js +15 -0
  62. package/dist/cli/commands/projects/here.d.ts +38 -0
  63. package/dist/cli/commands/projects/here.js +145 -0
  64. package/dist/cli/commands/projects/index.d.ts +4 -0
  65. package/dist/cli/commands/projects/index.js +4 -0
  66. package/dist/cli/commands/projects/projects.d.ts +14 -0
  67. package/dist/cli/commands/projects/projects.js +213 -0
  68. package/dist/cli/commands/projects/restart.d.ts +15 -0
  69. package/dist/cli/commands/projects/restart.js +149 -0
  70. package/dist/cli/commands/registry.d.ts +3 -0
  71. package/dist/cli/commands/registry.js +34 -0
  72. package/dist/cli/commands/repair/checks.js +105 -29
  73. package/dist/cli/commands/repair/finders.d.ts +13 -10
  74. package/dist/cli/commands/repair/finders.js +63 -43
  75. package/dist/cli/commands/repair/index.d.ts +4 -4
  76. package/dist/cli/commands/repair/index.js +47 -21
  77. package/dist/cli/commands/repair/types.d.ts +2 -2
  78. package/dist/cli/commands/repair/types.js +7 -2
  79. package/dist/cli/commands/sessions/attach.d.ts +2 -0
  80. package/dist/cli/commands/sessions/attach.js +45 -0
  81. package/dist/cli/commands/sessions/control.d.ts +4 -0
  82. package/dist/cli/commands/sessions/control.js +62 -0
  83. package/dist/cli/commands/sessions/exec.d.ts +6 -0
  84. package/dist/cli/commands/sessions/exec.js +72 -0
  85. package/dist/cli/commands/sessions/index.d.ts +6 -0
  86. package/dist/cli/commands/sessions/index.js +9 -0
  87. package/dist/cli/commands/sessions/list.d.ts +15 -0
  88. package/dist/cli/commands/sessions/list.js +65 -0
  89. package/dist/cli/commands/sessions/status.d.ts +2 -0
  90. package/dist/cli/commands/sessions/status.js +153 -0
  91. package/dist/cli/commands/sessions/window.d.ts +3 -0
  92. package/dist/cli/commands/sessions/window.js +18 -0
  93. package/dist/cli/commands/setup/checks.d.ts +4 -4
  94. package/dist/cli/commands/setup/checks.js +36 -19
  95. package/dist/cli/commands/setup/facts.d.ts +6 -6
  96. package/dist/cli/commands/setup/facts.js +23 -11
  97. package/dist/cli/commands/setup/index.d.ts +1 -1
  98. package/dist/cli/commands/setup/index.js +25 -12
  99. package/dist/cli/commands/user-config.d.ts +5 -5
  100. package/dist/cli/commands/user-config.js +14 -12
  101. package/dist/cli/history.d.ts +5 -4
  102. package/dist/cli/history.js +23 -11
  103. package/dist/cli/index.d.ts +4 -14
  104. package/dist/cli/index.js +27 -77
  105. package/dist/cli/manifest.d.ts +464 -10
  106. package/dist/cli/manifest.js +328 -54
  107. package/dist/cli/menu/apps.d.ts +7 -5
  108. package/dist/cli/menu/apps.js +64 -16
  109. package/dist/cli/menu/command-fields.d.ts +15 -0
  110. package/dist/cli/menu/command-fields.js +23 -0
  111. package/dist/cli/menu/command-form.d.ts +3 -5
  112. package/dist/cli/menu/command-form.js +116 -48
  113. package/dist/cli/menu/home.d.ts +22 -0
  114. package/dist/cli/menu/home.js +72 -0
  115. package/dist/cli/menu/index.d.ts +2 -24
  116. package/dist/cli/menu/index.js +4 -178
  117. package/dist/cli/menu/menu.d.ts +23 -0
  118. package/dist/cli/menu/menu.js +185 -0
  119. package/dist/cli/menu/settings/categories.d.ts +2 -2
  120. package/dist/cli/menu/settings/categories.js +123 -20
  121. package/dist/cli/menu/settings/collections/collection-editor.d.ts +23 -0
  122. package/dist/cli/menu/settings/collections/collection-editor.js +89 -0
  123. package/dist/cli/menu/settings/collections/map-editor.d.ts +10 -0
  124. package/dist/cli/menu/settings/collections/map-editor.js +34 -0
  125. package/dist/cli/menu/settings/collections/object-list-editor.d.ts +10 -0
  126. package/dist/cli/menu/settings/collections/object-list-editor.js +23 -0
  127. package/dist/cli/menu/settings/collections/object-map-editor.d.ts +10 -0
  128. package/dist/cli/menu/settings/collections/object-map-editor.js +35 -0
  129. package/dist/cli/menu/settings/collections/string-list-editor.d.ts +12 -0
  130. package/dist/cli/menu/settings/collections/string-list-editor.js +39 -0
  131. package/dist/cli/menu/settings/config-file.d.ts +2 -2
  132. package/dist/cli/menu/settings/config-file.js +42 -19
  133. package/dist/cli/menu/settings/editor-actions.d.ts +2 -0
  134. package/dist/cli/menu/settings/editor-actions.js +2 -0
  135. package/dist/cli/menu/settings/format.d.ts +5 -0
  136. package/dist/cli/menu/settings/format.js +39 -0
  137. package/dist/cli/menu/settings/index.d.ts +1 -29
  138. package/dist/cli/menu/settings/index.js +1 -133
  139. package/dist/cli/menu/settings/object-editor.d.ts +12 -0
  140. package/dist/cli/menu/settings/object-editor.js +86 -0
  141. package/dist/cli/menu/settings/schema-node.d.ts +3 -1
  142. package/dist/cli/menu/settings/schema-node.js +71 -24
  143. package/dist/cli/menu/settings/settings-editor.d.ts +30 -0
  144. package/dist/cli/menu/settings/settings-editor.js +176 -0
  145. package/dist/cli/menu/settings/{editors.d.ts → value-editor.d.ts} +2 -13
  146. package/dist/cli/menu/settings/value-editor.js +137 -0
  147. package/dist/cli/menu/several.d.ts +4 -4
  148. package/dist/cli/menu/several.js +61 -20
  149. package/dist/cli/{colors.d.ts → output/colors.d.ts} +8 -8
  150. package/dist/cli/{colors.js → output/colors.js} +32 -14
  151. package/dist/cli/output/index.d.ts +3 -0
  152. package/dist/cli/output/index.js +3 -0
  153. package/dist/cli/output/print.d.ts +5 -0
  154. package/dist/cli/output/print.js +14 -0
  155. package/dist/cli/output/progress.d.ts +24 -0
  156. package/dist/cli/output/progress.js +124 -0
  157. package/dist/cli/report.d.ts +2 -0
  158. package/dist/cli/report.js +20 -0
  159. package/dist/cli/tui/app.d.ts +6 -16
  160. package/dist/cli/tui/app.js +28 -8
  161. package/dist/cli/tui/dialogs/confirm-screen.d.ts +20 -0
  162. package/dist/cli/tui/dialogs/confirm-screen.js +50 -0
  163. package/dist/cli/tui/dialogs/message-screen.d.ts +17 -0
  164. package/dist/cli/tui/dialogs/message-screen.js +55 -0
  165. package/dist/cli/tui/dialogs/paragraphs.d.ts +2 -0
  166. package/dist/cli/tui/dialogs/paragraphs.js +5 -0
  167. package/dist/cli/tui/dialogs/text-screen.d.ts +26 -0
  168. package/dist/cli/tui/dialogs/text-screen.js +107 -0
  169. package/dist/cli/tui/frame.js +3 -1
  170. package/dist/cli/tui/index.d.ts +7 -3
  171. package/dist/cli/tui/index.js +4 -2
  172. package/dist/cli/tui/list/list-screen.d.ts +29 -0
  173. package/dist/cli/tui/{list-screen.js → list/list-screen.js} +86 -23
  174. package/dist/cli/tui/{list-screen.d.ts → list/list-types.d.ts} +0 -28
  175. package/dist/cli/tui/screen.d.ts +14 -0
  176. package/dist/cli/tui/terminal.js +34 -10
  177. package/dist/cli/tui/text.d.ts +2 -1
  178. package/dist/cli/tui/text.js +37 -7
  179. package/dist/cli/tui/theme.js +27 -9
  180. package/dist/cli/validate.d.ts +8 -8
  181. package/dist/cli/validate.js +32 -21
  182. package/dist/core/config/defaults.d.ts +2 -0
  183. package/dist/core/config/defaults.js +203 -0
  184. package/dist/core/config/index.d.ts +2 -0
  185. package/dist/core/config/index.js +3 -0
  186. package/dist/core/{config.d.ts → config/loader.d.ts} +1 -2
  187. package/dist/core/config/loader.js +47 -0
  188. package/dist/core/{detect-databases.js → detect/databases.js} +111 -23
  189. package/dist/core/detect/index.d.ts +4 -0
  190. package/dist/core/detect/index.js +4 -0
  191. package/dist/core/{detect-pwsh.d.ts → detect/pwsh.d.ts} +1 -1
  192. package/dist/core/{detect-pwsh.js → detect/pwsh.js} +25 -11
  193. package/dist/core/{detect-toolchains.d.ts → detect/toolchains.d.ts} +1 -1
  194. package/dist/core/{detect-toolchains.js → detect/toolchains.js} +42 -5
  195. package/dist/{guest/toolchains → core/detect}/versions.js +28 -12
  196. package/dist/core/disk.d.ts +2 -0
  197. package/dist/core/disk.js +46 -3
  198. package/dist/core/local-config/boot-wants.d.ts +45 -0
  199. package/dist/core/local-config/boot-wants.js +120 -0
  200. package/dist/core/local-config/file.d.ts +3 -0
  201. package/dist/core/local-config/file.js +16 -0
  202. package/dist/core/local-config/index.d.ts +5 -0
  203. package/dist/core/local-config/index.js +7 -0
  204. package/dist/core/{local-config.d.ts → local-config/overrides.d.ts} +11 -11
  205. package/dist/core/{local-config.js → local-config/overrides.js} +53 -54
  206. package/dist/core/{project-policy.d.ts → local-config/policy.d.ts} +7 -3
  207. package/dist/core/{project-policy.js → local-config/policy.js} +16 -6
  208. package/dist/core/local-config/trust.d.ts +13 -0
  209. package/dist/core/local-config/trust.js +43 -0
  210. package/dist/core/package-info.d.ts +4 -0
  211. package/dist/core/package-info.js +13 -0
  212. package/dist/core/run/guest-workspace.d.ts +23 -0
  213. package/dist/core/run/guest-workspace.js +47 -0
  214. package/dist/core/run/index.d.ts +3 -0
  215. package/dist/core/run/index.js +3 -0
  216. package/dist/core/run/resolve-run.d.ts +3 -0
  217. package/dist/core/run/resolve-run.js +202 -0
  218. package/dist/core/run/versions.d.ts +13 -0
  219. package/dist/core/run/versions.js +65 -0
  220. package/dist/core/safe-paths.js +17 -5
  221. package/dist/core/schema/apps.d.ts +4 -4
  222. package/dist/core/schema/apps.js +55 -21
  223. package/dist/core/schema/common.d.ts +13 -10
  224. package/dist/core/schema/common.js +16 -10
  225. package/dist/core/schema/config.d.ts +18 -12
  226. package/dist/core/schema/config.js +78 -53
  227. package/dist/core/schema/databases.d.ts +4 -3
  228. package/dist/core/schema/databases.js +16 -12
  229. package/dist/core/schema/harness.d.ts +1 -1
  230. package/dist/core/schema/harness.js +17 -7
  231. package/dist/core/schema/index.d.ts +6 -0
  232. package/dist/core/schema/index.js +8 -0
  233. package/dist/core/schema/json-schema.js +10 -5
  234. package/dist/core/schema/profile.d.ts +4 -4
  235. package/dist/core/schema/profile.js +37 -17
  236. package/dist/core/schema/projects.d.ts +2 -1
  237. package/dist/core/schema/projects.js +16 -5
  238. package/dist/core/schema/sandbox.d.ts +12 -12
  239. package/dist/core/schema/sandbox.js +101 -37
  240. package/dist/core/schema/toolchains.d.ts +6 -1
  241. package/dist/core/schema/toolchains.js +84 -34
  242. package/dist/core/types.d.ts +36 -9
  243. package/dist/core/util/errors.d.ts +8 -0
  244. package/dist/core/util/errors.js +14 -0
  245. package/dist/core/util/fs.d.ts +8 -0
  246. package/dist/core/util/fs.js +40 -0
  247. package/dist/core/util/index.d.ts +7 -0
  248. package/dist/core/util/index.js +7 -0
  249. package/dist/core/util/jsonc.d.ts +6 -0
  250. package/dist/core/util/jsonc.js +25 -0
  251. package/dist/core/util/links.d.ts +10 -0
  252. package/dist/core/util/links.js +39 -0
  253. package/dist/core/util/paths.d.ts +7 -0
  254. package/dist/core/util/paths.js +33 -0
  255. package/dist/core/util/process.d.ts +15 -0
  256. package/dist/core/util/process.js +54 -0
  257. package/dist/core/util/text.d.ts +8 -0
  258. package/dist/core/util/text.js +8 -0
  259. package/dist/guest/{setup/agents.js → agents/agent-installer.js} +24 -4
  260. package/dist/guest/apps/after-install.d.ts +3 -0
  261. package/dist/guest/apps/after-install.js +47 -0
  262. package/dist/guest/apps/app-installer.d.ts +22 -0
  263. package/dist/guest/apps/app-installer.js +116 -0
  264. package/dist/guest/apps/find-exe.d.ts +5 -0
  265. package/dist/guest/apps/find-exe.js +41 -0
  266. package/dist/guest/apps/index.d.ts +3 -10
  267. package/dist/guest/apps/index.js +6 -206
  268. package/dist/guest/apps/resolvers.js +37 -9
  269. package/dist/guest/apps/shortcuts.d.ts +6 -0
  270. package/dist/guest/apps/shortcuts.js +28 -0
  271. package/dist/guest/apps/sources.d.ts +4 -0
  272. package/dist/guest/apps/sources.js +17 -0
  273. package/dist/guest/apps/unpack.d.ts +3 -0
  274. package/dist/guest/apps/unpack.js +47 -0
  275. package/dist/guest/{audit-parse.js → audit/parse.js} +39 -3
  276. package/dist/guest/{audit.d.ts → audit/process-audit.d.ts} +3 -1
  277. package/dist/guest/{audit.js → audit/process-audit.js} +33 -8
  278. package/dist/guest/boot/boot-env.d.ts +4 -0
  279. package/dist/guest/{boot-env.js → boot/boot-env.js} +7 -5
  280. package/dist/guest/boot/boot.d.ts +1 -0
  281. package/dist/guest/{main.js → boot/boot.js} +100 -50
  282. package/dist/guest/{guide.js → boot/guide.js} +32 -7
  283. package/dist/guest/{project-env.d.ts → boot/project-env.d.ts} +3 -3
  284. package/dist/guest/{project-env.js → boot/project-env.js} +12 -4
  285. package/dist/guest/boot/project-status.d.ts +5 -0
  286. package/dist/guest/boot/project-status.js +28 -0
  287. package/dist/guest/daemon/daemon.d.ts +1 -0
  288. package/dist/guest/daemon/daemon.js +51 -0
  289. package/dist/guest/daemon/exec.js +18 -6
  290. package/dist/guest/daemon/{shutdown.js → idle-shutdown.js} +5 -4
  291. package/dist/guest/daemon/{project.d.ts → project-provisioner.d.ts} +3 -3
  292. package/dist/guest/daemon/{project.js → project-provisioner.js} +60 -22
  293. package/dist/guest/daemon/relays.js +5 -3
  294. package/dist/guest/daemon/{session.js → sessions.js} +84 -24
  295. package/dist/guest/daemon/state.d.ts +4 -1
  296. package/dist/guest/daemon/state.js +34 -20
  297. package/dist/guest/databases/database-server.d.ts +13 -0
  298. package/dist/guest/databases/database-server.js +35 -0
  299. package/dist/guest/databases/dynamodb.d.ts +12 -0
  300. package/dist/guest/databases/dynamodb.js +81 -0
  301. package/dist/guest/databases/index.d.ts +2 -0
  302. package/dist/guest/databases/index.js +2 -0
  303. package/dist/guest/databases/mongodb.d.ts +7 -0
  304. package/dist/guest/databases/mongodb.js +46 -0
  305. package/dist/guest/databases/mysql.d.ts +7 -0
  306. package/dist/guest/databases/mysql.js +59 -0
  307. package/dist/guest/databases/names.d.ts +5 -0
  308. package/dist/guest/databases/names.js +8 -0
  309. package/dist/guest/databases/postgres.d.ts +9 -0
  310. package/dist/guest/databases/postgres.js +85 -0
  311. package/dist/guest/databases/redis.d.ts +7 -0
  312. package/dist/guest/databases/redis.js +25 -0
  313. package/dist/guest/databases/registry.d.ts +5 -0
  314. package/dist/guest/databases/registry.js +51 -0
  315. package/dist/guest/databases/sbx-db.d.ts +1 -0
  316. package/dist/guest/{db.js → databases/sbx-db.js} +13 -13
  317. package/dist/guest/{toolchains/databases → databases}/server.d.ts +5 -5
  318. package/dist/guest/{toolchains/databases → databases}/server.js +18 -13
  319. package/dist/guest/entries/daemon.js +16 -0
  320. package/dist/guest/entries/db.js +10 -0
  321. package/dist/guest/entries/gitguard.js +20 -0
  322. package/dist/guest/entries/main.d.ts +1 -0
  323. package/dist/guest/entries/main.js +24 -0
  324. package/dist/guest/entries/netproxy.d.ts +1 -0
  325. package/dist/guest/entries/netproxy.js +7 -0
  326. package/dist/guest/entries/view.d.ts +1 -0
  327. package/dist/guest/entries/view.js +11 -0
  328. package/dist/guest/{gitguard.js → git/decision.js} +49 -26
  329. package/dist/guest/network/addresses.d.ts +2 -0
  330. package/dist/guest/network/addresses.js +6 -0
  331. package/dist/guest/{setup/network.d.ts → network/allow-only.d.ts} +0 -10
  332. package/dist/guest/network/allow-only.js +84 -0
  333. package/dist/guest/network/firewall.d.ts +9 -0
  334. package/dist/guest/{setup/network.js → network/firewall.js} +58 -63
  335. package/dist/guest/network/proxy-server.d.ts +2 -0
  336. package/dist/guest/{netproxy.js → network/proxy-server.js} +37 -18
  337. package/dist/guest/{helpers.d.ts → runtime/csc.d.ts} +1 -1
  338. package/dist/guest/{helpers.js → runtime/csc.js} +7 -2
  339. package/dist/guest/runtime/fs.d.ts +2 -0
  340. package/dist/guest/runtime/fs.js +6 -0
  341. package/dist/guest/runtime/log.d.ts +3 -0
  342. package/dist/guest/runtime/log.js +22 -0
  343. package/dist/guest/runtime/paths.d.ts +13 -0
  344. package/dist/guest/runtime/paths.js +14 -0
  345. package/dist/guest/{ports.js → runtime/ports.js} +8 -2
  346. package/dist/guest/runtime/process.d.ts +15 -0
  347. package/dist/guest/runtime/process.js +59 -0
  348. package/dist/guest/{project-context.js → runtime/project-context.js} +1 -1
  349. package/dist/guest/runtime/session.d.ts +5 -0
  350. package/dist/guest/runtime/session.js +10 -0
  351. package/dist/guest/runtime/status.d.ts +7 -0
  352. package/dist/guest/runtime/status.js +57 -0
  353. package/dist/guest/{cmdline.js → sessions/cmdline.js} +10 -4
  354. package/dist/guest/{ptyhost.js → sessions/pty-host.js} +12 -5
  355. package/dist/guest/{view.js → sessions/viewer.js} +8 -11
  356. package/dist/guest/setup/claude-mem.d.ts +10 -0
  357. package/dist/guest/setup/{claude.js → claude-mem.js} +18 -78
  358. package/dist/guest/setup/{claude.d.ts → claude-profile.d.ts} +0 -10
  359. package/dist/guest/setup/claude-profile.js +89 -0
  360. package/dist/guest/setup/desktop.d.ts +2 -0
  361. package/dist/guest/setup/desktop.js +32 -0
  362. package/dist/guest/setup/environment.js +28 -5
  363. package/dist/guest/setup/{user.d.ts → git-identity.d.ts} +0 -2
  364. package/dist/guest/setup/git-identity.js +34 -0
  365. package/dist/guest/{gitrules.d.ts → setup/git-rules.d.ts} +1 -1
  366. package/dist/guest/setup/git-rules.js +50 -0
  367. package/dist/guest/setup/hooks.js +22 -5
  368. package/dist/guest/setup/{policy.js → managed-policy.js} +2 -2
  369. package/dist/guest/toolchains/catalogue.d.ts +4 -4
  370. package/dist/guest/toolchains/catalogue.js +30 -7
  371. package/dist/guest/toolchains/detect.d.ts +12 -0
  372. package/dist/guest/toolchains/detect.js +54 -0
  373. package/dist/guest/toolchains/index.d.ts +3 -17
  374. package/dist/guest/toolchains/index.js +1 -80
  375. package/dist/guest/toolchains/install.d.ts +20 -0
  376. package/dist/guest/toolchains/install.js +29 -0
  377. package/dist/guest/toolchains/languages/go.d.ts +3 -0
  378. package/dist/guest/toolchains/{go.js → languages/go.js} +27 -9
  379. package/dist/guest/toolchains/languages/java.d.ts +8 -0
  380. package/dist/guest/toolchains/{java.js → languages/java.js} +57 -18
  381. package/dist/guest/toolchains/languages/node.d.ts +3 -0
  382. package/dist/guest/toolchains/{node.js → languages/node.js} +51 -18
  383. package/dist/guest/toolchains/languages/php.d.ts +3 -0
  384. package/dist/guest/toolchains/{scripting → languages}/php.js +36 -11
  385. package/dist/guest/toolchains/languages/python-tools.d.ts +3 -0
  386. package/dist/guest/toolchains/languages/python-tools.js +12 -0
  387. package/dist/guest/toolchains/languages/python.d.ts +3 -0
  388. package/dist/guest/toolchains/{python.js → languages/python.js} +29 -16
  389. package/dist/guest/toolchains/languages/ruby.d.ts +3 -0
  390. package/dist/guest/toolchains/{scripting → languages}/ruby.js +28 -10
  391. package/dist/guest/toolchains/leftovers.d.ts +1 -1
  392. package/dist/guest/toolchains/leftovers.js +13 -11
  393. package/dist/guest/toolchains/managers.d.ts +6 -6
  394. package/dist/guest/toolchains/managers.js +38 -17
  395. package/dist/guest/toolchains/native/binstall.d.ts +3 -2
  396. package/dist/guest/toolchains/native/binstall.js +20 -8
  397. package/dist/guest/toolchains/native/cpp.d.ts +2 -2
  398. package/dist/guest/toolchains/native/cpp.js +23 -8
  399. package/dist/guest/toolchains/native/dotnet.d.ts +5 -3
  400. package/dist/guest/toolchains/native/dotnet.js +72 -24
  401. package/dist/guest/toolchains/native/mesa.d.ts +2 -2
  402. package/dist/guest/toolchains/native/mesa.js +27 -10
  403. package/dist/guest/toolchains/native/msvc/environment.d.ts +4 -4
  404. package/dist/guest/toolchains/native/msvc/environment.js +30 -16
  405. package/dist/guest/toolchains/native/msvc/index.d.ts +3 -3
  406. package/dist/guest/toolchains/native/msvc/index.js +10 -8
  407. package/dist/guest/toolchains/native/msvc/packages.d.ts +1 -1
  408. package/dist/guest/toolchains/native/msvc/packages.js +69 -23
  409. package/dist/guest/toolchains/native/msvc/tree.d.ts +6 -6
  410. package/dist/guest/toolchains/native/msvc/tree.js +15 -9
  411. package/dist/guest/toolchains/native/rust-extras.d.ts +23 -0
  412. package/dist/guest/toolchains/native/rust-extras.js +100 -0
  413. package/dist/guest/toolchains/native/rust.d.ts +2 -2
  414. package/dist/guest/toolchains/native/rust.js +41 -10
  415. package/dist/guest/toolchains/{scripting → native}/vcruntime.d.ts +2 -2
  416. package/dist/guest/toolchains/{scripting → native}/vcruntime.js +17 -7
  417. package/dist/guest/toolchains/package-ledger.d.ts +17 -0
  418. package/dist/guest/toolchains/package-ledger.js +54 -0
  419. package/dist/guest/toolchains/plan.d.ts +3 -24
  420. package/dist/guest/toolchains/plan.js +99 -111
  421. package/dist/guest/toolchains/runtimes.d.ts +6 -6
  422. package/dist/guest/toolchains/runtimes.js +31 -13
  423. package/dist/guest/toolchains/scheduler.d.ts +22 -0
  424. package/dist/guest/toolchains/scheduler.js +123 -0
  425. package/dist/guest/toolchains/setup.d.ts +10 -0
  426. package/dist/guest/toolchains/setup.js +22 -0
  427. package/dist/guest/toolchains/state-file.d.ts +3 -0
  428. package/dist/guest/toolchains/state-file.js +10 -0
  429. package/dist/guest/toolchains/step.d.ts +24 -0
  430. package/dist/guest/toolchains/step.js +1 -0
  431. package/dist/guest/toolchains/tool-env.d.ts +12 -0
  432. package/dist/guest/toolchains/tool-env.js +16 -0
  433. package/dist/guest/toolchains/tools/cli.d.ts +10 -0
  434. package/dist/guest/toolchains/{cli.js → tools/cli.js} +35 -15
  435. package/dist/guest/toolchains/tools/git.d.ts +3 -0
  436. package/dist/guest/toolchains/{git.js → tools/git.js} +38 -15
  437. package/dist/guest/toolchains/tools/pwsh.d.ts +4 -0
  438. package/dist/guest/toolchains/{pwsh.js → tools/pwsh.js} +14 -7
  439. package/dist/guest/toolchains/{vscode-profile.d.ts → tools/vscode-profile.d.ts} +6 -6
  440. package/dist/guest/toolchains/{vscode-profile.js → tools/vscode-profile.js} +28 -12
  441. package/dist/guest/toolchains/{vscode.d.ts → tools/vscode.d.ts} +6 -6
  442. package/dist/guest/toolchains/{vscode.js → tools/vscode.js} +67 -21
  443. package/dist/guest/toolchains/version-cache.d.ts +16 -0
  444. package/dist/guest/toolchains/version-cache.js +67 -0
  445. package/dist/host/agent-commands/commands.d.ts +13 -0
  446. package/dist/host/agent-commands/commands.js +33 -0
  447. package/dist/host/agent-commands/forwarders.d.ts +7 -0
  448. package/dist/host/agent-commands/forwarders.js +31 -0
  449. package/dist/host/agent-commands/index.d.ts +4 -0
  450. package/dist/host/agent-commands/index.js +4 -0
  451. package/dist/host/agent-commands/reconcile.d.ts +12 -0
  452. package/dist/host/agent-commands/reconcile.js +69 -0
  453. package/dist/host/agent-commands/user-path.d.ts +2 -0
  454. package/dist/host/agent-commands/user-path.js +33 -0
  455. package/dist/host/audit/collect.d.ts +2 -2
  456. package/dist/host/audit/collect.js +59 -22
  457. package/dist/host/audit/log.d.ts +2 -2
  458. package/dist/host/audit/log.js +24 -8
  459. package/dist/host/{attach.d.ts → channel/attach.d.ts} +2 -2
  460. package/dist/host/{attach.js → channel/attach.js} +33 -15
  461. package/dist/host/channel/channel.d.ts +51 -0
  462. package/dist/host/channel/channel.js +196 -0
  463. package/dist/host/channel/index.d.ts +2 -0
  464. package/dist/host/channel/index.js +2 -0
  465. package/dist/host/guard/agent-files.d.ts +7 -0
  466. package/dist/host/guard/agent-files.js +103 -0
  467. package/dist/host/guard/commands.d.ts +10 -0
  468. package/dist/host/guard/commands.js +123 -0
  469. package/dist/host/guard/file-hash.d.ts +4 -0
  470. package/dist/host/guard/file-hash.js +37 -0
  471. package/dist/host/guard/git-config.d.ts +5 -0
  472. package/dist/host/guard/git-config.js +62 -0
  473. package/dist/host/guard/git-dirs.d.ts +12 -0
  474. package/dist/host/guard/git-dirs.js +53 -0
  475. package/dist/host/guard/index.d.ts +5 -0
  476. package/dist/host/guard/index.js +4 -0
  477. package/dist/host/guard/mark-of-the-web.d.ts +8 -0
  478. package/dist/host/guard/mark-of-the-web.js +74 -0
  479. package/dist/host/guard/nested-repos.d.ts +14 -0
  480. package/dist/host/guard/nested-repos.js +88 -0
  481. package/dist/host/guard/quarantine.d.ts +3 -0
  482. package/dist/host/guard/quarantine.js +24 -0
  483. package/dist/host/guard/repo-guard.d.ts +10 -0
  484. package/dist/host/guard/repo-guard.js +36 -0
  485. package/dist/host/guard/store.d.ts +40 -0
  486. package/dist/host/guard/store.js +145 -0
  487. package/dist/host/guard/types.d.ts +27 -0
  488. package/dist/host/guard/types.js +3 -0
  489. package/dist/host/guard/watch-state.d.ts +9 -0
  490. package/dist/host/guard/watch-state.js +26 -0
  491. package/dist/host/launch/boot-projects.d.ts +17 -0
  492. package/dist/host/launch/{projects.js → boot-projects.js} +27 -12
  493. package/dist/host/{database-plan.d.ts → launch/database-plan.d.ts} +5 -5
  494. package/dist/host/{database-plan.js → launch/database-plan.js} +24 -13
  495. package/dist/host/launch/generate.d.ts +4 -0
  496. package/dist/host/launch/generate.js +77 -0
  497. package/dist/host/launch/index.d.ts +10 -0
  498. package/dist/host/launch/index.js +10 -0
  499. package/dist/host/launch/mappings.d.ts +7 -2
  500. package/dist/host/launch/mappings.js +83 -24
  501. package/dist/host/launch/pc-scan.d.ts +5 -0
  502. package/dist/host/{pc-scan.js → launch/pc-scan.js} +20 -13
  503. package/dist/host/launch/project-scan.d.ts +7 -0
  504. package/dist/host/{project-scan.js → launch/project-scan.js} +29 -21
  505. package/dist/host/launch/session-file.d.ts +23 -0
  506. package/dist/host/launch/session-file.js +73 -0
  507. package/dist/host/launch/stage.d.ts +5 -5
  508. package/dist/host/launch/stage.js +14 -13
  509. package/dist/host/launch/toolchains.d.ts +4 -0
  510. package/dist/host/launch/toolchains.js +11 -0
  511. package/dist/host/launch/{wsb.d.ts → wsb-file.d.ts} +4 -2
  512. package/dist/host/launch/wsb-file.js +56 -0
  513. package/dist/host/life/crash-report.d.ts +8 -0
  514. package/dist/host/life/crash-report.js +87 -0
  515. package/dist/host/life/index.d.ts +6 -0
  516. package/dist/host/life/index.js +6 -0
  517. package/dist/host/life/keep-awake.d.ts +10 -0
  518. package/dist/host/life/keep-awake.js +29 -0
  519. package/dist/host/life/life-record.d.ts +48 -0
  520. package/dist/host/life/life-record.js +76 -0
  521. package/dist/host/life/stop-events.d.ts +27 -0
  522. package/dist/host/life/stop-events.js +96 -0
  523. package/dist/host/life/stop-warning.d.ts +4 -0
  524. package/dist/host/life/stop-warning.js +25 -0
  525. package/dist/host/life/windows-update.d.ts +3 -0
  526. package/dist/host/life/windows-update.js +11 -0
  527. package/dist/host/native.d.ts +4 -0
  528. package/dist/host/native.js +11 -0
  529. package/dist/host/network/index.d.ts +1 -0
  530. package/dist/host/network/index.js +1 -0
  531. package/dist/host/{port-forward.d.ts → network/port-forward.d.ts} +1 -1
  532. package/dist/host/{port-forward.js → network/port-forward.js} +16 -10
  533. package/dist/host/profile/accounts.d.ts +37 -0
  534. package/dist/host/profile/accounts.js +146 -0
  535. package/dist/host/profile/claude-login.d.ts +22 -0
  536. package/dist/host/profile/claude-login.js +57 -0
  537. package/dist/host/{claude-profile.d.ts → profile/claude-profile.d.ts} +9 -9
  538. package/dist/host/{claude-profile.js → profile/claude-profile.js} +32 -22
  539. package/dist/host/profile/index.d.ts +7 -0
  540. package/dist/host/profile/index.js +7 -0
  541. package/dist/host/profile/personalize.d.ts +2 -0
  542. package/dist/host/profile/personalize.js +127 -0
  543. package/dist/host/profile/reg-file.d.ts +8 -0
  544. package/dist/host/profile/reg-file.js +45 -0
  545. package/dist/host/profile/secret-files.d.ts +2 -0
  546. package/dist/host/profile/secret-files.js +25 -0
  547. package/dist/host/profile/secret-patterns.d.ts +6 -0
  548. package/dist/host/profile/secret-patterns.js +128 -0
  549. package/dist/host/profile/secrets.d.ts +12 -0
  550. package/dist/host/profile/secrets.js +100 -0
  551. package/dist/host/projects/index.d.ts +4 -0
  552. package/dist/host/projects/index.js +4 -0
  553. package/dist/host/projects/join.d.ts +38 -0
  554. package/dist/host/projects/join.js +119 -0
  555. package/dist/host/projects/known.d.ts +28 -0
  556. package/dist/host/projects/known.js +55 -0
  557. package/dist/host/projects/mapper.d.ts +29 -0
  558. package/dist/host/projects/mapper.js +88 -0
  559. package/dist/host/projects/registry.d.ts +83 -0
  560. package/dist/host/projects/registry.js +136 -0
  561. package/dist/host/sandbox/doctor.d.ts +2 -0
  562. package/dist/host/sandbox/doctor.js +42 -0
  563. package/dist/host/sandbox/host-claude.d.ts +1 -0
  564. package/dist/host/sandbox/host-claude.js +26 -0
  565. package/dist/host/sandbox/index.d.ts +6 -0
  566. package/dist/host/sandbox/index.js +6 -0
  567. package/dist/host/{platform.d.ts → sandbox/platform.d.ts} +0 -5
  568. package/dist/host/sandbox/platform.js +60 -0
  569. package/dist/host/sandbox/probe.d.ts +3 -0
  570. package/dist/host/sandbox/probe.js +47 -0
  571. package/dist/host/{window.js → sandbox/window.js} +7 -5
  572. package/dist/host/{wsb.js → sandbox/wsb-cli.js} +31 -8
  573. package/dist/host/{cleanup.js → storage/cleanup.js} +27 -12
  574. package/dist/host/storage/index.d.ts +2 -0
  575. package/dist/host/storage/index.js +2 -0
  576. package/dist/host/storage/state-files.d.ts +4 -0
  577. package/dist/host/storage/state-files.js +10 -0
  578. package/dist/host/test-guard.js +1 -1
  579. package/dist/host/tools/conpty.d.ts +8 -0
  580. package/dist/host/tools/conpty.js +58 -0
  581. package/dist/host/tools/index.d.ts +2 -0
  582. package/dist/host/tools/index.js +2 -0
  583. package/dist/host/{terminal.d.ts → tools/windows-terminal.d.ts} +2 -10
  584. package/dist/host/{terminal.js → tools/windows-terminal.js} +33 -57
  585. package/dist/host/workspace-view/active-views.d.ts +3 -0
  586. package/dist/host/workspace-view/active-views.js +22 -0
  587. package/dist/host/workspace-view/index.d.ts +2 -18
  588. package/dist/host/workspace-view/index.js +2 -49
  589. package/dist/host/workspace-view/plan.d.ts +16 -0
  590. package/dist/host/workspace-view/plan.js +50 -0
  591. package/dist/host/workspace-view/rules.js +10 -3
  592. package/dist/host/workspace-view/view-state.d.ts +10 -0
  593. package/dist/host/workspace-view/view-state.js +31 -0
  594. package/dist/host/workspace-view/view.d.ts +1 -0
  595. package/dist/host/workspace-view/view.js +51 -55
  596. package/dist/runtime/daemon.js +4232 -1918
  597. package/dist/runtime/db.js +2145 -830
  598. package/dist/runtime/gitguard.js +29 -11
  599. package/dist/runtime/main.js +4760 -2155
  600. package/dist/runtime/netproxy.js +1654 -418
  601. package/dist/runtime/view.js +1515 -453
  602. package/dist/selftest/accounts.test.d.ts +1 -1
  603. package/dist/selftest/accounts.test.js +20 -17
  604. package/dist/selftest/agent-commands.test.d.ts +1 -1
  605. package/dist/selftest/agent-commands.test.js +9 -5
  606. package/dist/selftest/audit.test.d.ts +1 -1
  607. package/dist/selftest/audit.test.js +46 -13
  608. package/dist/selftest/channel.test.d.ts +1 -1
  609. package/dist/selftest/channel.test.js +91 -8
  610. package/dist/selftest/cli.test.d.ts +1 -1
  611. package/dist/selftest/cli.test.js +68 -16
  612. package/dist/selftest/cmdline.test.d.ts +1 -1
  613. package/dist/selftest/cmdline.test.js +36 -7
  614. package/dist/selftest/config.test.d.ts +1 -1
  615. package/dist/selftest/config.test.js +12 -5
  616. package/dist/selftest/data.test.d.ts +1 -1
  617. package/dist/selftest/data.test.js +35 -6
  618. package/dist/selftest/detect.test.d.ts +1 -1
  619. package/dist/selftest/detect.test.js +22 -9
  620. package/dist/selftest/generate.test.d.ts +1 -1
  621. package/dist/selftest/generate.test.js +33 -9
  622. package/dist/selftest/git-access.test.d.ts +1 -1
  623. package/dist/selftest/git-access.test.js +42 -4
  624. package/dist/selftest/guest-boot.test.d.ts +1 -1
  625. package/dist/selftest/guest-boot.test.js +25 -7
  626. package/dist/selftest/host-sim.test.d.ts +1 -1
  627. package/dist/selftest/host-sim.test.js +27 -3
  628. package/dist/selftest/hostile-input.test.d.ts +1 -1
  629. package/dist/selftest/hostile-input.test.js +5 -5
  630. package/dist/selftest/index.d.ts +1 -1
  631. package/dist/selftest/index.js +73 -16
  632. package/dist/selftest/layout.test.d.ts +2 -0
  633. package/dist/selftest/layout.test.js +131 -0
  634. package/dist/selftest/links.test.d.ts +1 -1
  635. package/dist/selftest/links.test.js +16 -11
  636. package/dist/selftest/live-daemon.test.d.ts +1 -1
  637. package/dist/selftest/live-daemon.test.js +20 -8
  638. package/dist/selftest/live-git.test.d.ts +1 -1
  639. package/dist/selftest/live-git.test.js +13 -4
  640. package/dist/selftest/live-network.test.d.ts +1 -1
  641. package/dist/selftest/live-network.test.js +24 -9
  642. package/dist/selftest/live-projects.test.d.ts +1 -1
  643. package/dist/selftest/live-projects.test.js +47 -20
  644. package/dist/selftest/live-terminal.test.d.ts +2 -0
  645. package/dist/selftest/live-terminal.test.js +195 -0
  646. package/dist/selftest/local-config.test.d.ts +1 -1
  647. package/dist/selftest/local-config.test.js +88 -15
  648. package/dist/selftest/mirror.test.d.ts +1 -1
  649. package/dist/selftest/mirror.test.js +118 -19
  650. package/dist/selftest/network.test.d.ts +1 -1
  651. package/dist/selftest/network.test.js +17 -8
  652. package/dist/selftest/personalization.test.d.ts +1 -1
  653. package/dist/selftest/personalization.test.js +12 -5
  654. package/dist/selftest/projects.test.d.ts +1 -1
  655. package/dist/selftest/projects.test.js +336 -72
  656. package/dist/selftest/repair.test.d.ts +1 -1
  657. package/dist/selftest/repair.test.js +17 -5
  658. package/dist/selftest/repo-guard.test.d.ts +1 -1
  659. package/dist/selftest/repo-guard.test.js +21 -20
  660. package/dist/selftest/secrets.test.d.ts +1 -1
  661. package/dist/selftest/secrets.test.js +57 -13
  662. package/dist/selftest/setup.test.d.ts +1 -1
  663. package/dist/selftest/setup.test.js +25 -5
  664. package/dist/selftest/{fixtures.d.ts → support/fixtures.d.ts} +7 -4
  665. package/dist/selftest/{fixtures.js → support/fixtures.js} +95 -17
  666. package/dist/selftest/{harness.js → support/harness.js} +24 -7
  667. package/dist/selftest/{live.d.ts → support/live.d.ts} +2 -2
  668. package/dist/selftest/{live.js → support/live.js} +34 -10
  669. package/dist/selftest/support/suite.js +1 -0
  670. package/dist/selftest/sync.test.d.ts +1 -1
  671. package/dist/selftest/sync.test.js +64 -26
  672. package/dist/selftest/test-guard.test.d.ts +1 -1
  673. package/dist/selftest/test-guard.test.js +43 -15
  674. package/dist/selftest/toolchains.test.d.ts +1 -1
  675. package/dist/selftest/toolchains.test.js +135 -36
  676. package/dist/selftest/workspace-view.test.d.ts +1 -1
  677. package/dist/selftest/workspace-view.test.js +48 -11
  678. package/dist/selftest/workspace.test.d.ts +1 -1
  679. package/dist/selftest/workspace.test.js +13 -4
  680. package/dist/shared/{apps.d.ts → apps/catalogue.d.ts} +1 -11
  681. package/dist/shared/apps/catalogue.js +768 -0
  682. package/dist/shared/apps/index.d.ts +2 -0
  683. package/dist/shared/apps/index.js +2 -0
  684. package/dist/shared/apps/selection.d.ts +11 -0
  685. package/dist/shared/apps/selection.js +40 -0
  686. package/dist/shared/channel/index.d.ts +2 -0
  687. package/dist/shared/channel/index.js +2 -0
  688. package/dist/shared/channel/run-dir.d.ts +30 -0
  689. package/dist/shared/channel/run-dir.js +84 -0
  690. package/dist/shared/{schema.d.ts → channel/schema.d.ts} +60 -19
  691. package/dist/shared/channel/schema.js +131 -0
  692. package/dist/shared/download/archive.d.ts +13 -0
  693. package/dist/shared/download/archive.js +57 -0
  694. package/dist/shared/download/downloader.d.ts +35 -0
  695. package/dist/shared/download/downloader.js +110 -0
  696. package/dist/shared/download/github.d.ts +16 -0
  697. package/dist/shared/download/github.js +74 -0
  698. package/dist/shared/download/http.d.ts +5 -0
  699. package/dist/shared/download/http.js +30 -0
  700. package/dist/shared/download/index.d.ts +5 -0
  701. package/dist/shared/download/index.js +5 -0
  702. package/dist/shared/download/spawn.d.ts +2 -0
  703. package/dist/shared/download/spawn.js +7 -0
  704. package/dist/shared/io/index.d.ts +3 -0
  705. package/dist/shared/io/index.js +3 -0
  706. package/dist/shared/io/json-file.d.ts +10 -0
  707. package/dist/shared/io/json-file.js +21 -0
  708. package/dist/shared/io/json.d.ts +13 -0
  709. package/dist/shared/io/json.js +49 -0
  710. package/dist/shared/{safe-remove.js → io/safe-remove.js} +32 -7
  711. package/dist/shared/{netrules.js → network/firewall-rules.js} +36 -5
  712. package/dist/shared/network/index.d.ts +2 -0
  713. package/dist/shared/network/index.js +2 -0
  714. package/dist/shared/{netpolicy.js → network/policy.js} +66 -11
  715. package/dist/shared/{paths.js → paths/claude-paths.js} +12 -2
  716. package/dist/shared/{guest-paths.d.ts → paths/guest-paths.d.ts} +21 -0
  717. package/dist/shared/paths/guest-paths.js +146 -0
  718. package/dist/shared/paths/index.d.ts +3 -0
  719. package/dist/shared/paths/index.js +3 -0
  720. package/dist/shared/{projects.d.ts → paths/projects.d.ts} +27 -4
  721. package/dist/shared/paths/projects.js +136 -0
  722. package/dist/shared/pty/client.d.ts +21 -0
  723. package/dist/shared/pty/client.js +79 -0
  724. package/dist/shared/pty/console-input.d.ts +11 -0
  725. package/dist/shared/pty/console-input.js +81 -0
  726. package/dist/shared/pty/index.d.ts +6 -0
  727. package/dist/shared/pty/index.js +6 -0
  728. package/dist/shared/pty/input-joiner.d.ts +15 -0
  729. package/dist/shared/pty/input-joiner.js +44 -0
  730. package/dist/shared/pty/output-filter.d.ts +13 -0
  731. package/dist/shared/pty/output-filter.js +140 -0
  732. package/dist/shared/pty/protocol.d.ts +36 -0
  733. package/dist/shared/pty/protocol.js +60 -0
  734. package/dist/shared/pty/terminal.d.ts +24 -0
  735. package/dist/shared/pty/terminal.js +147 -0
  736. package/dist/shared/test-guard.js +3 -1
  737. package/dist/sync/claude-mem.d.ts +1 -1
  738. package/dist/sync/claude-mem.js +9 -4
  739. package/dist/sync/history.d.ts +1 -29
  740. package/dist/sync/history.js +57 -45
  741. package/dist/sync/index.d.ts +5 -0
  742. package/dist/sync/index.js +5 -0
  743. package/dist/sync/sync-cycle.d.ts +18 -0
  744. package/dist/sync/sync-cycle.js +85 -0
  745. package/dist/sync/sync-state.d.ts +32 -0
  746. package/dist/sync/sync-state.js +37 -0
  747. package/dist/sync/watcher.d.ts +0 -18
  748. package/dist/sync/watcher.js +66 -100
  749. package/native/keep-awake.ps1 +8 -0
  750. package/native/power.cs +23 -0
  751. package/native/stop-events.ps1 +38 -0
  752. package/package.json +11 -3
  753. package/sandbox/linkgate.cs +98 -0
  754. package/sandbox/memlog.ps1 +15 -6
  755. package/sandbox/ptyhost.cs +60 -3
  756. package/schemas/config.schema.json +48 -1
  757. package/schemas/sandbox-config.schema.json +37 -3
  758. package/dist/cli/commands/launch.d.ts +0 -29
  759. package/dist/cli/commands/launch.js +0 -366
  760. package/dist/cli/commands/maintenance.d.ts +0 -10
  761. package/dist/cli/commands/maintenance.js +0 -187
  762. package/dist/cli/commands/project.d.ts +0 -29
  763. package/dist/cli/commands/project.js +0 -63
  764. package/dist/cli/commands/projects.d.ts +0 -14
  765. package/dist/cli/commands/projects.js +0 -146
  766. package/dist/cli/commands/restart.d.ts +0 -6
  767. package/dist/cli/commands/restart.js +0 -85
  768. package/dist/cli/commands/sessions.d.ts +0 -12
  769. package/dist/cli/commands/sessions.js +0 -257
  770. package/dist/cli/menu/settings/editors.js +0 -305
  771. package/dist/cli/progress.d.ts +0 -9
  772. package/dist/cli/progress.js +0 -49
  773. package/dist/cli/tui/dialogs.d.ts +0 -57
  774. package/dist/cli/tui/dialogs.js +0 -162
  775. package/dist/core/config.js +0 -109
  776. package/dist/core/schema.d.ts +0 -6
  777. package/dist/core/schema.js +0 -8
  778. package/dist/core/util.d.ts +0 -62
  779. package/dist/core/util.js +0 -156
  780. package/dist/core/workspace.d.ts +0 -18
  781. package/dist/core/workspace.js +0 -145
  782. package/dist/guest/boot-env.d.ts +0 -4
  783. package/dist/guest/daemon.js +0 -57
  784. package/dist/guest/env.d.ts +0 -52
  785. package/dist/guest/env.js +0 -103
  786. package/dist/guest/gitrules.js +0 -11
  787. package/dist/guest/project-status.d.ts +0 -5
  788. package/dist/guest/project-status.js +0 -17
  789. package/dist/guest/setup/user.js +0 -51
  790. package/dist/guest/toolchains/cli.d.ts +0 -10
  791. package/dist/guest/toolchains/common.d.ts +0 -54
  792. package/dist/guest/toolchains/common.js +0 -147
  793. package/dist/guest/toolchains/databases/dynamodb.d.ts +0 -8
  794. package/dist/guest/toolchains/databases/dynamodb.js +0 -52
  795. package/dist/guest/toolchains/databases/index.d.ts +0 -6
  796. package/dist/guest/toolchains/databases/index.js +0 -62
  797. package/dist/guest/toolchains/databases/mongodb.d.ts +0 -3
  798. package/dist/guest/toolchains/databases/mongodb.js +0 -31
  799. package/dist/guest/toolchains/databases/mysql.d.ts +0 -3
  800. package/dist/guest/toolchains/databases/mysql.js +0 -38
  801. package/dist/guest/toolchains/databases/postgres.d.ts +0 -5
  802. package/dist/guest/toolchains/databases/postgres.js +0 -38
  803. package/dist/guest/toolchains/databases/redis.d.ts +0 -3
  804. package/dist/guest/toolchains/databases/redis.js +0 -16
  805. package/dist/guest/toolchains/git.d.ts +0 -3
  806. package/dist/guest/toolchains/go.d.ts +0 -3
  807. package/dist/guest/toolchains/java.d.ts +0 -8
  808. package/dist/guest/toolchains/node.d.ts +0 -3
  809. package/dist/guest/toolchains/pwsh.d.ts +0 -4
  810. package/dist/guest/toolchains/python.d.ts +0 -3
  811. package/dist/guest/toolchains/scripting/php.d.ts +0 -3
  812. package/dist/guest/toolchains/scripting/ruby.d.ts +0 -3
  813. package/dist/host/accounts.d.ts +0 -32
  814. package/dist/host/accounts.js +0 -128
  815. package/dist/host/agent-commands.d.ts +0 -25
  816. package/dist/host/agent-commands.js +0 -145
  817. package/dist/host/channel.d.ts +0 -38
  818. package/dist/host/channel.js +0 -162
  819. package/dist/host/generate.d.ts +0 -13
  820. package/dist/host/generate.js +0 -108
  821. package/dist/host/join.d.ts +0 -28
  822. package/dist/host/join.js +0 -76
  823. package/dist/host/launch/projects.d.ts +0 -15
  824. package/dist/host/launch/wsb.js +0 -34
  825. package/dist/host/motw.d.ts +0 -17
  826. package/dist/host/motw.js +0 -74
  827. package/dist/host/pc-scan.d.ts +0 -6
  828. package/dist/host/personalize.d.ts +0 -10
  829. package/dist/host/personalize.js +0 -97
  830. package/dist/host/platform.js +0 -129
  831. package/dist/host/project-scan.d.ts +0 -7
  832. package/dist/host/projects.d.ts +0 -100
  833. package/dist/host/projects.js +0 -147
  834. package/dist/host/repo-guard.d.ts +0 -43
  835. package/dist/host/repo-guard.js +0 -347
  836. package/dist/host/secrets.d.ts +0 -14
  837. package/dist/host/secrets.js +0 -133
  838. package/dist/host/stops.d.ts +0 -67
  839. package/dist/host/stops.js +0 -126
  840. package/dist/shared/apps.js +0 -114
  841. package/dist/shared/download.d.ts +0 -60
  842. package/dist/shared/download.js +0 -215
  843. package/dist/shared/guest-paths.js +0 -61
  844. package/dist/shared/projects.js +0 -67
  845. package/dist/shared/pty-client.d.ts +0 -91
  846. package/dist/shared/pty-client.js +0 -349
  847. package/dist/shared/rundir.d.ts +0 -41
  848. package/dist/shared/rundir.js +0 -96
  849. package/dist/shared/schema.js +0 -92
  850. /package/dist/{guest/daemon.d.ts → cli/tui/list/list-types.js} +0 -0
  851. /package/dist/{guest/db.d.ts → cli/tui/screen.js} +0 -0
  852. /package/dist/core/{detect-databases.d.ts → detect/databases.d.ts} +0 -0
  853. /package/dist/{guest/toolchains → core/detect}/versions.d.ts +0 -0
  854. /package/dist/guest/{setup/agents.d.ts → agents/agent-installer.d.ts} +0 -0
  855. /package/dist/guest/{audit-parse.d.ts → audit/parse.d.ts} +0 -0
  856. /package/dist/guest/{guide.d.ts → boot/guide.d.ts} +0 -0
  857. /package/dist/guest/daemon/{shutdown.d.ts → idle-shutdown.d.ts} +0 -0
  858. /package/dist/guest/daemon/{session.d.ts → sessions.d.ts} +0 -0
  859. /package/dist/guest/{main.d.ts → entries/daemon.d.ts} +0 -0
  860. /package/dist/guest/{netproxy.d.ts → entries/db.d.ts} +0 -0
  861. /package/dist/{selftest/suite.js → guest/entries/gitguard.d.ts} +0 -0
  862. /package/dist/guest/{gitguard.d.ts → git/decision.d.ts} +0 -0
  863. /package/dist/guest/{ports.d.ts → runtime/ports.d.ts} +0 -0
  864. /package/dist/guest/{project-context.d.ts → runtime/project-context.d.ts} +0 -0
  865. /package/dist/guest/{cmdline.d.ts → sessions/cmdline.d.ts} +0 -0
  866. /package/dist/guest/{ptyhost.d.ts → sessions/pty-host.d.ts} +0 -0
  867. /package/dist/guest/{view.d.ts → sessions/viewer.d.ts} +0 -0
  868. /package/dist/guest/setup/{policy.d.ts → managed-policy.d.ts} +0 -0
  869. /package/dist/host/{window.d.ts → sandbox/window.d.ts} +0 -0
  870. /package/dist/host/{wsb.d.ts → sandbox/wsb-cli.d.ts} +0 -0
  871. /package/dist/host/{cleanup.d.ts → storage/cleanup.d.ts} +0 -0
  872. /package/dist/selftest/{harness.d.ts → support/harness.d.ts} +0 -0
  873. /package/dist/selftest/{suite.d.ts → support/suite.d.ts} +0 -0
  874. /package/dist/shared/{safe-remove.d.ts → io/safe-remove.d.ts} +0 -0
  875. /package/dist/shared/{netrules.d.ts → network/firewall-rules.d.ts} +0 -0
  876. /package/dist/shared/{netpolicy.d.ts → network/policy.d.ts} +0 -0
  877. /package/dist/shared/{paths.d.ts → paths/claude-paths.d.ts} +0 -0
@@ -1363,11 +1363,11 @@ var require_lodash = __commonJS({
1363
1363
  return isFunction(object2[key]);
1364
1364
  });
1365
1365
  }
1366
- function baseGet(object2, path3) {
1367
- path3 = castPath(path3, object2);
1368
- var index = 0, length = path3.length;
1366
+ function baseGet(object2, path4) {
1367
+ path4 = castPath(path4, object2);
1368
+ var index = 0, length = path4.length;
1369
1369
  while (object2 != null && index < length) {
1370
- object2 = object2[toKey(path3[index++])];
1370
+ object2 = object2[toKey(path4[index++])];
1371
1371
  }
1372
1372
  return index && index == length ? object2 : undefined2;
1373
1373
  }
@@ -1431,10 +1431,10 @@ var require_lodash = __commonJS({
1431
1431
  });
1432
1432
  return accumulator;
1433
1433
  }
1434
- function baseInvoke(object2, path3, args) {
1435
- path3 = castPath(path3, object2);
1436
- object2 = parent(object2, path3);
1437
- var func = object2 == null ? object2 : object2[toKey(last(path3))];
1434
+ function baseInvoke(object2, path4, args) {
1435
+ path4 = castPath(path4, object2);
1436
+ object2 = parent(object2, path4);
1437
+ var func = object2 == null ? object2 : object2[toKey(last(path4))];
1438
1438
  return func == null ? undefined2 : apply(func, object2, args);
1439
1439
  }
1440
1440
  function baseIsArguments(value) {
@@ -1590,13 +1590,13 @@ var require_lodash = __commonJS({
1590
1590
  return object2 === source || baseIsMatch(object2, source, matchData);
1591
1591
  };
1592
1592
  }
1593
- function baseMatchesProperty(path3, srcValue) {
1594
- if (isKey(path3) && isStrictComparable(srcValue)) {
1595
- return matchesStrictComparable(toKey(path3), srcValue);
1593
+ function baseMatchesProperty(path4, srcValue) {
1594
+ if (isKey(path4) && isStrictComparable(srcValue)) {
1595
+ return matchesStrictComparable(toKey(path4), srcValue);
1596
1596
  }
1597
1597
  return function(object2) {
1598
- var objValue = get(object2, path3);
1599
- return objValue === undefined2 && objValue === srcValue ? hasIn(object2, path3) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
1598
+ var objValue = get(object2, path4);
1599
+ return objValue === undefined2 && objValue === srcValue ? hasIn(object2, path4) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
1600
1600
  };
1601
1601
  }
1602
1602
  function baseMerge(object2, source, srcIndex, customizer, stack) {
@@ -1693,23 +1693,23 @@ var require_lodash = __commonJS({
1693
1693
  });
1694
1694
  }
1695
1695
  function basePick(object2, paths) {
1696
- return basePickBy(object2, paths, function(value, path3) {
1697
- return hasIn(object2, path3);
1696
+ return basePickBy(object2, paths, function(value, path4) {
1697
+ return hasIn(object2, path4);
1698
1698
  });
1699
1699
  }
1700
1700
  function basePickBy(object2, paths, predicate) {
1701
1701
  var index = -1, length = paths.length, result2 = {};
1702
1702
  while (++index < length) {
1703
- var path3 = paths[index], value = baseGet(object2, path3);
1704
- if (predicate(value, path3)) {
1705
- baseSet(result2, castPath(path3, object2), value);
1703
+ var path4 = paths[index], value = baseGet(object2, path4);
1704
+ if (predicate(value, path4)) {
1705
+ baseSet(result2, castPath(path4, object2), value);
1706
1706
  }
1707
1707
  }
1708
1708
  return result2;
1709
1709
  }
1710
- function basePropertyDeep(path3) {
1710
+ function basePropertyDeep(path4) {
1711
1711
  return function(object2) {
1712
- return baseGet(object2, path3);
1712
+ return baseGet(object2, path4);
1713
1713
  };
1714
1714
  }
1715
1715
  function basePullAll(array2, values2, iteratee2, comparator) {
@@ -1783,14 +1783,14 @@ var require_lodash = __commonJS({
1783
1783
  var array2 = values(collection);
1784
1784
  return shuffleSelf(array2, baseClamp(n, 0, array2.length));
1785
1785
  }
1786
- function baseSet(object2, path3, value, customizer) {
1786
+ function baseSet(object2, path4, value, customizer) {
1787
1787
  if (!isObject2(object2)) {
1788
1788
  return object2;
1789
1789
  }
1790
- path3 = castPath(path3, object2);
1791
- var index = -1, length = path3.length, lastIndex = length - 1, nested = object2;
1790
+ path4 = castPath(path4, object2);
1791
+ var index = -1, length = path4.length, lastIndex = length - 1, nested = object2;
1792
1792
  while (nested != null && ++index < length) {
1793
- var key = toKey(path3[index]), newValue = value;
1793
+ var key = toKey(path4[index]), newValue = value;
1794
1794
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
1795
1795
  return object2;
1796
1796
  }
@@ -1798,7 +1798,7 @@ var require_lodash = __commonJS({
1798
1798
  var objValue = nested[key];
1799
1799
  newValue = customizer ? customizer(objValue, key, nested) : undefined2;
1800
1800
  if (newValue === undefined2) {
1801
- newValue = isObject2(objValue) ? objValue : isIndex(path3[index + 1]) ? [] : {};
1801
+ newValue = isObject2(objValue) ? objValue : isIndex(path4[index + 1]) ? [] : {};
1802
1802
  }
1803
1803
  }
1804
1804
  assignValue(nested, key, newValue);
@@ -1964,14 +1964,14 @@ var require_lodash = __commonJS({
1964
1964
  }
1965
1965
  return result2;
1966
1966
  }
1967
- function baseUnset(object2, path3) {
1968
- path3 = castPath(path3, object2);
1969
- var index = -1, length = path3.length;
1967
+ function baseUnset(object2, path4) {
1968
+ path4 = castPath(path4, object2);
1969
+ var index = -1, length = path4.length;
1970
1970
  if (!length) {
1971
1971
  return true;
1972
1972
  }
1973
1973
  while (++index < length) {
1974
- var key = toKey(path3[index]);
1974
+ var key = toKey(path4[index]);
1975
1975
  if (key === "__proto__" && !hasOwnProperty.call(object2, "__proto__")) {
1976
1976
  return false;
1977
1977
  }
@@ -1979,11 +1979,11 @@ var require_lodash = __commonJS({
1979
1979
  return false;
1980
1980
  }
1981
1981
  }
1982
- var obj = parent(object2, path3);
1983
- return obj == null || delete obj[toKey(last(path3))];
1982
+ var obj = parent(object2, path4);
1983
+ return obj == null || delete obj[toKey(last(path4))];
1984
1984
  }
1985
- function baseUpdate(object2, path3, updater, customizer) {
1986
- return baseSet(object2, path3, updater(baseGet(object2, path3)), customizer);
1985
+ function baseUpdate(object2, path4, updater, customizer) {
1986
+ return baseSet(object2, path4, updater(baseGet(object2, path4)), customizer);
1987
1987
  }
1988
1988
  function baseWhile(array2, predicate, isDrop, fromRight) {
1989
1989
  var length = array2.length, index = fromRight ? length : -1;
@@ -2866,11 +2866,11 @@ var require_lodash = __commonJS({
2866
2866
  var match = source.match(reWrapDetails);
2867
2867
  return match ? match[1].split(reSplitDetails) : [];
2868
2868
  }
2869
- function hasPath(object2, path3, hasFunc) {
2870
- path3 = castPath(path3, object2);
2871
- var index = -1, length = path3.length, result2 = false;
2869
+ function hasPath(object2, path4, hasFunc) {
2870
+ path4 = castPath(path4, object2);
2871
+ var index = -1, length = path4.length, result2 = false;
2872
2872
  while (++index < length) {
2873
- var key = toKey(path3[index]);
2873
+ var key = toKey(path4[index]);
2874
2874
  if (!(result2 = object2 != null && hasFunc(object2, key))) {
2875
2875
  break;
2876
2876
  }
@@ -3072,8 +3072,8 @@ var require_lodash = __commonJS({
3072
3072
  return apply(func, this, otherArgs);
3073
3073
  };
3074
3074
  }
3075
- function parent(object2, path3) {
3076
- return path3.length < 2 ? object2 : baseGet(object2, baseSlice(path3, 0, -1));
3075
+ function parent(object2, path4) {
3076
+ return path4.length < 2 ? object2 : baseGet(object2, baseSlice(path4, 0, -1));
3077
3077
  }
3078
3078
  function reorder(array2, indexes) {
3079
3079
  var arrLength = array2.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array2);
@@ -3708,10 +3708,10 @@ var require_lodash = __commonJS({
3708
3708
  }
3709
3709
  return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
3710
3710
  }
3711
- var invokeMap = baseRest(function(collection, path3, args) {
3712
- var index = -1, isFunc = typeof path3 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
3711
+ var invokeMap = baseRest(function(collection, path4, args) {
3712
+ var index = -1, isFunc = typeof path4 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
3713
3713
  baseEach(collection, function(value) {
3714
- result2[++index] = isFunc ? apply(path3, value, args) : baseInvoke(value, path3, args);
3714
+ result2[++index] = isFunc ? apply(path4, value, args) : baseInvoke(value, path4, args);
3715
3715
  });
3716
3716
  return result2;
3717
3717
  });
@@ -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;
@@ -4363,15 +4363,15 @@ var require_lodash = __commonJS({
4363
4363
  function functionsIn(object2) {
4364
4364
  return object2 == null ? [] : baseFunctions(object2, keysIn(object2));
4365
4365
  }
4366
- function get(object2, path3, defaultValue) {
4367
- var result2 = object2 == null ? undefined2 : baseGet(object2, path3);
4366
+ function get(object2, path4, defaultValue) {
4367
+ var result2 = object2 == null ? undefined2 : baseGet(object2, path4);
4368
4368
  return result2 === undefined2 ? defaultValue : result2;
4369
4369
  }
4370
- function has(object2, path3) {
4371
- return object2 != null && hasPath(object2, path3, baseHas);
4370
+ function has(object2, path4) {
4371
+ return object2 != null && hasPath(object2, path4, baseHas);
4372
4372
  }
4373
- function hasIn(object2, path3) {
4374
- return object2 != null && hasPath(object2, path3, baseHasIn);
4373
+ function hasIn(object2, path4) {
4374
+ return object2 != null && hasPath(object2, path4, baseHasIn);
4375
4375
  }
4376
4376
  var invert = createInverter(function(result2, value, key) {
4377
4377
  if (value != null && typeof value.toString != "function") {
@@ -4424,10 +4424,10 @@ var require_lodash = __commonJS({
4424
4424
  return result2;
4425
4425
  }
4426
4426
  var isDeep = false;
4427
- paths = arrayMap(paths, function(path3) {
4428
- path3 = castPath(path3, object2);
4429
- isDeep || (isDeep = path3.length > 1);
4430
- return path3;
4427
+ paths = arrayMap(paths, function(path4) {
4428
+ path4 = castPath(path4, object2);
4429
+ isDeep || (isDeep = path4.length > 1);
4430
+ return path4;
4431
4431
  });
4432
4432
  copyObject(object2, getAllKeysIn(object2), result2);
4433
4433
  if (isDeep) {
@@ -4453,19 +4453,19 @@ var require_lodash = __commonJS({
4453
4453
  return [prop];
4454
4454
  });
4455
4455
  predicate = getIteratee(predicate);
4456
- return basePickBy(object2, props, function(value, path3) {
4457
- return predicate(value, path3[0]);
4456
+ return basePickBy(object2, props, function(value, path4) {
4457
+ return predicate(value, path4[0]);
4458
4458
  });
4459
4459
  }
4460
- function result(object2, path3, defaultValue) {
4461
- path3 = castPath(path3, object2);
4462
- var index = -1, length = path3.length;
4460
+ function result(object2, path4, defaultValue) {
4461
+ path4 = castPath(path4, object2);
4462
+ var index = -1, length = path4.length;
4463
4463
  if (!length) {
4464
4464
  length = 1;
4465
4465
  object2 = undefined2;
4466
4466
  }
4467
4467
  while (++index < length) {
4468
- var value = object2 == null ? undefined2 : object2[toKey(path3[index])];
4468
+ var value = object2 == null ? undefined2 : object2[toKey(path4[index])];
4469
4469
  if (value === undefined2) {
4470
4470
  index = length;
4471
4471
  value = defaultValue;
@@ -4474,12 +4474,12 @@ var require_lodash = __commonJS({
4474
4474
  }
4475
4475
  return object2;
4476
4476
  }
4477
- function set2(object2, path3, value) {
4478
- return object2 == null ? object2 : baseSet(object2, path3, value);
4477
+ function set2(object2, path4, value) {
4478
+ return object2 == null ? object2 : baseSet(object2, path4, value);
4479
4479
  }
4480
- function setWith(object2, path3, value, customizer) {
4480
+ function setWith(object2, path4, value, customizer) {
4481
4481
  customizer = typeof customizer == "function" ? customizer : undefined2;
4482
- return object2 == null ? object2 : baseSet(object2, path3, value, customizer);
4482
+ return object2 == null ? object2 : baseSet(object2, path4, value, customizer);
4483
4483
  }
4484
4484
  var toPairs = createToPairs(keys);
4485
4485
  var toPairsIn = createToPairs(keysIn);
@@ -4501,15 +4501,15 @@ var require_lodash = __commonJS({
4501
4501
  });
4502
4502
  return accumulator;
4503
4503
  }
4504
- function unset(object2, path3) {
4505
- return object2 == null ? true : baseUnset(object2, path3);
4504
+ function unset(object2, path4) {
4505
+ return object2 == null ? true : baseUnset(object2, path4);
4506
4506
  }
4507
- function update(object2, path3, updater) {
4508
- return object2 == null ? object2 : baseUpdate(object2, path3, castFunction(updater));
4507
+ function update(object2, path4, updater) {
4508
+ return object2 == null ? object2 : baseUpdate(object2, path4, castFunction(updater));
4509
4509
  }
4510
- function updateWith(object2, path3, updater, customizer) {
4510
+ function updateWith(object2, path4, updater, customizer) {
4511
4511
  customizer = typeof customizer == "function" ? customizer : undefined2;
4512
- return object2 == null ? object2 : baseUpdate(object2, path3, castFunction(updater), customizer);
4512
+ return object2 == null ? object2 : baseUpdate(object2, path4, castFunction(updater), customizer);
4513
4513
  }
4514
4514
  function values(object2) {
4515
4515
  return object2 == null ? [] : baseValues(object2, keys(object2));
@@ -4895,17 +4895,17 @@ var require_lodash = __commonJS({
4895
4895
  function matches(source) {
4896
4896
  return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
4897
4897
  }
4898
- function matchesProperty(path3, srcValue) {
4899
- return baseMatchesProperty(path3, baseClone(srcValue, CLONE_DEEP_FLAG));
4898
+ function matchesProperty(path4, srcValue) {
4899
+ return baseMatchesProperty(path4, baseClone(srcValue, CLONE_DEEP_FLAG));
4900
4900
  }
4901
- var method = baseRest(function(path3, args) {
4901
+ var method = baseRest(function(path4, args) {
4902
4902
  return function(object2) {
4903
- return baseInvoke(object2, path3, args);
4903
+ return baseInvoke(object2, path4, args);
4904
4904
  };
4905
4905
  });
4906
4906
  var methodOf = baseRest(function(object2, args) {
4907
- return function(path3) {
4908
- return baseInvoke(object2, path3, args);
4907
+ return function(path4) {
4908
+ return baseInvoke(object2, path4, args);
4909
4909
  };
4910
4910
  });
4911
4911
  function mixin(object2, source, options) {
@@ -4952,12 +4952,12 @@ var require_lodash = __commonJS({
4952
4952
  var over = createOver(arrayMap);
4953
4953
  var overEvery = createOver(arrayEvery);
4954
4954
  var overSome = createOver(arraySome);
4955
- function property(path3) {
4956
- return isKey(path3) ? baseProperty(toKey(path3)) : basePropertyDeep(path3);
4955
+ function property(path4) {
4956
+ return isKey(path4) ? baseProperty(toKey(path4)) : basePropertyDeep(path4);
4957
4957
  }
4958
4958
  function propertyOf(object2) {
4959
- return function(path3) {
4960
- return object2 == null ? undefined2 : baseGet(object2, path3);
4959
+ return function(path4) {
4960
+ return object2 == null ? undefined2 : baseGet(object2, path4);
4961
4961
  };
4962
4962
  }
4963
4963
  var range = createRange();
@@ -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;
@@ -5410,12 +5410,12 @@ var require_lodash = __commonJS({
5410
5410
  LazyWrapper.prototype.findLast = function(predicate) {
5411
5411
  return this.reverse().find(predicate);
5412
5412
  };
5413
- LazyWrapper.prototype.invokeMap = baseRest(function(path3, args) {
5414
- if (typeof path3 == "function") {
5413
+ LazyWrapper.prototype.invokeMap = baseRest(function(path4, args) {
5414
+ if (typeof path4 == "function") {
5415
5415
  return new LazyWrapper(this);
5416
5416
  }
5417
5417
  return this.map(function(value) {
5418
- return baseInvoke(value, path3, args);
5418
+ return baseInvoke(value, path4, args);
5419
5419
  });
5420
5420
  });
5421
5421
  LazyWrapper.prototype.reject = function(predicate) {
@@ -5531,9 +5531,20 @@ var require_lodash = __commonJS({
5531
5531
  }
5532
5532
  });
5533
5533
 
5534
- // src/shared/pty-client.ts
5535
- import net from "node:net";
5536
- var FrameType = { Hello: 1, Input: 2, Resize: 3, Restart: 4, Ping: 5, Output: 16, Exit: 17, Error: 18, Restarting: 19, Status: 20, Console: 21 };
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
5547
+ };
5537
5548
  var PING_INTERVAL_MS = 5e3;
5538
5549
  var encodeFrame = (type, payload = Buffer.alloc(0)) => {
5539
5550
  const header = Buffer.alloc(5);
@@ -5570,6 +5581,40 @@ var FrameReader = class {
5570
5581
  return frames;
5571
5582
  }
5572
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
5573
5618
  var KEPT_OSC = (body) => {
5574
5619
  const number4 = /^(\d{1,4})(;|$)/.exec(body);
5575
5620
  if (!number4) return false;
@@ -5677,35 +5722,132 @@ var OutputFilter = class {
5677
5722
  return out.subarray(0, n);
5678
5723
  }
5679
5724
  };
5680
- var connectOnce = (host, port, timeoutMs) => {
5681
- return new Promise((resolve, reject) => {
5682
- const socket = net.connect({ host, port });
5683
- const timer = setTimeout(() => {
5684
- socket.destroy();
5685
- reject(new Error("timed out connecting to " + host + ":" + port));
5686
- }, timeoutMs);
5687
- socket.once("connect", () => {
5688
- clearTimeout(timer);
5689
- socket.setNoDelay(true);
5690
- resolve(socket);
5691
- });
5692
- socket.once("error", (e) => {
5693
- clearTimeout(timer);
5694
- reject(e);
5695
- });
5696
- });
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")
5697
5747
  };
5698
- var connect = async (endpoint, timeoutMs = 3e3) => {
5699
- const errors = [];
5700
- 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) => {
5701
5780
  try {
5702
- return await connectOnce(address, endpoint.port, timeoutMs);
5703
- } catch (e) {
5704
- 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;
5705
5797
  }
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
+ };
5816
+ };
5817
+
5818
+ // src/shared/pty/input-joiner.ts
5819
+ var JOIN_MS = 30;
5820
+ var MAX_HELD = 64;
5821
+ var InputJoiner = class {
5822
+ held = Buffer.alloc(0);
5823
+ /** The bytes to send now; an unfinished sequence at the end is kept for the next chunk. */
5824
+ push(chunk) {
5825
+ const data = this.held.length ? Buffer.concat([this.held, chunk]) : chunk;
5826
+ const cut = unfinishedSequence(data);
5827
+ this.held = Buffer.from(data.subarray(cut));
5828
+ return data.subarray(0, cut);
5829
+ }
5830
+ holding() {
5831
+ return this.held.length > 0;
5832
+ }
5833
+ flush() {
5834
+ const out = this.held;
5835
+ this.held = Buffer.alloc(0);
5836
+ return out;
5706
5837
  }
5707
- throw new Error("Could not reach the sandbox session (" + errors.join("; ") + ")");
5708
5838
  };
5839
+ function unfinishedSequence(data) {
5840
+ const start = data.lastIndexOf(27, -1);
5841
+ if (start === -1 || data.length - start > MAX_HELD) return data.length;
5842
+ const rest = data.subarray(start + 1);
5843
+ if (rest.length === 0) return start;
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;
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";
5709
5851
  var fixWindowsKeys = (chunk) => {
5710
5852
  if (!chunk.includes(8) && !chunk.includes(127)) return chunk;
5711
5853
  return Buffer.from(chunk.map((b) => b === 8 ? 127 : b === 127 ? 8 : b));
@@ -5717,13 +5859,14 @@ var runTerminalClient = (socket, token, options = {}) => {
5717
5859
  const [c, r] = stdout.isTTY ? stdout.getWindowSize() : [0, 0];
5718
5860
  return [c || 120, r || 30];
5719
5861
  };
5720
- const swapKeys = process.platform === "win32" && stdin.isTTY;
5862
+ let swapKeys = process.platform === "win32" && stdin.isTTY;
5721
5863
  return new Promise((resolve) => {
5722
5864
  let done = false;
5723
5865
  const reader = new FrameReader();
5724
5866
  const filter = new OutputFilter();
5725
5867
  let sent = size();
5726
5868
  let resizeTimer;
5869
+ let vtInput;
5727
5870
  const finish = (result) => {
5728
5871
  if (done) return;
5729
5872
  done = true;
@@ -5732,18 +5875,28 @@ var runTerminalClient = (socket, token, options = {}) => {
5732
5875
  clearTimeout(resizeTimer);
5733
5876
  clearInterval(heartbeat);
5734
5877
  clearInterval(sizeWatch);
5735
- if (stdin.isTTY) stdin.setRawMode(false);
5736
- stdin.pause();
5878
+ clearTimeout(joinTimer);
5737
5879
  socket.destroy();
5738
- stdout.write("\x1B[0m\x1B[?25h\r\n");
5739
- resolve(result);
5880
+ stdout.write("\x1B[0m\x1B[?25h" + MOUSE_OFF + "\r\n");
5881
+ void (vtInput?.stop() ?? Promise.resolve()).then(() => {
5882
+ if (stdin.isTTY) stdin.setRawMode(false);
5883
+ stdin.pause();
5884
+ resolve(result);
5885
+ });
5886
+ };
5887
+ const joiner = new InputJoiner();
5888
+ let joinTimer;
5889
+ const sendInput = (data) => {
5890
+ if (data.length && !done) socket.write(encodeFrame(FrameType.Input, swapKeys ? fixWindowsKeys(data) : data));
5740
5891
  };
5741
5892
  const onInput = (chunk) => {
5742
5893
  if (options.detachKey !== void 0 && chunk.includes(options.detachKey)) {
5743
5894
  finish({ reason: "detach" });
5744
5895
  return;
5745
5896
  }
5746
- socket.write(encodeFrame(FrameType.Input, swapKeys ? fixWindowsKeys(chunk) : chunk));
5897
+ clearTimeout(joinTimer);
5898
+ sendInput(joiner.push(chunk));
5899
+ if (joiner.holding()) joinTimer = setTimeout(() => sendInput(joiner.flush()), JOIN_MS);
5747
5900
  };
5748
5901
  let passthrough = false;
5749
5902
  const sendSize = () => {
@@ -5775,9 +5928,14 @@ var runTerminalClient = (socket, token, options = {}) => {
5775
5928
  for (const frame of frames) {
5776
5929
  if (frame.type === FrameType.Output) stdout.write(filter.push(frame.payload));
5777
5930
  else if (frame.type === FrameType.Console) passthrough = frame.payload.toString("latin1") === "conpty.dll";
5778
- else if (frame.type === FrameType.Restarting) stdout.write("\x1B[2J\x1B[3J\x1B[H");
5779
- else if (frame.type === FrameType.Exit) finish({ reason: "exit", exitCode: frame.payload.length >= 4 ? frame.payload.readInt32LE(0) : 1 });
5780
- else if (frame.type === FrameType.Error) finish({ reason: "error", message: frame.payload.toString("utf8").slice(0, 500).replace(/[\x00-\x1f\x7f]/g, " ") });
5931
+ else if (frame.type === FrameType.Restarting) stdout.write(MOUSE_OFF + "\x1B[2J\x1B[3J\x1B[H");
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
+ });
5781
5939
  }
5782
5940
  });
5783
5941
  socket.on("close", () => finish({ reason: "closed" }));
@@ -5786,15 +5944,22 @@ var runTerminalClient = (socket, token, options = {}) => {
5786
5944
  stdout.write("\x1B[2J\x1B[3J\x1B[H");
5787
5945
  socket.write(helloFrame(token, c, r));
5788
5946
  if (stdin.isTTY) stdin.setRawMode(true);
5947
+ vtInput = enableVtInput();
5948
+ void vtInput.ready.then((on) => {
5949
+ if (on) swapKeys = false;
5950
+ });
5789
5951
  stdin.on("data", onInput);
5790
5952
  stdin.resume();
5791
5953
  stdout.on("resize", onResize);
5792
5954
  });
5793
5955
  };
5794
5956
 
5795
- // src/shared/rundir.ts
5796
- import fs from "node:fs";
5797
- import path from "node:path";
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";
5962
+ import path2 from "node:path";
5798
5963
 
5799
5964
  // node_modules/zod/v4/classic/external.js
5800
5965
  var external_exports = {};
@@ -6612,10 +6777,10 @@ function mergeDefs(...defs) {
6612
6777
  function cloneDef(schema) {
6613
6778
  return mergeDefs(schema._zod.def);
6614
6779
  }
6615
- function getElementAtPath(obj, path3) {
6616
- if (!path3)
6780
+ function getElementAtPath(obj, path4) {
6781
+ if (!path4)
6617
6782
  return obj;
6618
- return path3.reduce((acc, key) => acc?.[key], obj);
6783
+ return path4.reduce((acc, key) => acc?.[key], obj);
6619
6784
  }
6620
6785
  function promiseAllObject(promisesObj) {
6621
6786
  const keys = Object.keys(promisesObj);
@@ -6955,11 +7120,11 @@ function explicitlyAborted(x, startIndex = 0) {
6955
7120
  }
6956
7121
  return false;
6957
7122
  }
6958
- function prefixIssues(path3, issues) {
7123
+ function prefixIssues(path4, issues) {
6959
7124
  return issues.map((iss) => {
6960
7125
  var _a3;
6961
7126
  (_a3 = iss).path ?? (_a3.path = []);
6962
- iss.path.unshift(path3);
7127
+ iss.path.unshift(path4);
6963
7128
  return iss;
6964
7129
  });
6965
7130
  }
@@ -7409,16 +7574,16 @@ function flattenError(error62, mapper = (issue2) => issue2.message) {
7409
7574
  }
7410
7575
  function formatError(error62, mapper = (issue2) => issue2.message) {
7411
7576
  const fieldErrors = { _errors: [] };
7412
- const processError = (error63, path3 = []) => {
7577
+ const processError = (error63, path4 = []) => {
7413
7578
  for (const issue2 of error63.issues) {
7414
7579
  if (issue2.code === "invalid_union" && issue2.errors.length) {
7415
- issue2.errors.map((issues) => processError({ issues }, [...path3, ...issue2.path]));
7580
+ issue2.errors.map((issues) => processError({ issues }, [...path4, ...issue2.path]));
7416
7581
  } else if (issue2.code === "invalid_key") {
7417
- processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
7582
+ processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
7418
7583
  } else if (issue2.code === "invalid_element") {
7419
- processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
7584
+ processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
7420
7585
  } else {
7421
- const fullpath = [...path3, ...issue2.path];
7586
+ const fullpath = [...path4, ...issue2.path];
7422
7587
  if (fullpath.length === 0) {
7423
7588
  fieldErrors._errors.push(mapper(issue2));
7424
7589
  } else {
@@ -7457,17 +7622,17 @@ function formatError(error62, mapper = (issue2) => issue2.message) {
7457
7622
  }
7458
7623
  function treeifyError(error62, mapper = (issue2) => issue2.message) {
7459
7624
  const result = { errors: [] };
7460
- const processError = (error63, path3 = []) => {
7625
+ const processError = (error63, path4 = []) => {
7461
7626
  var _a3;
7462
7627
  for (const issue2 of error63.issues) {
7463
7628
  if (issue2.code === "invalid_union" && issue2.errors.length) {
7464
- issue2.errors.map((issues) => processError({ issues }, [...path3, ...issue2.path]));
7629
+ issue2.errors.map((issues) => processError({ issues }, [...path4, ...issue2.path]));
7465
7630
  } else if (issue2.code === "invalid_key") {
7466
- processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
7631
+ processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
7467
7632
  } else if (issue2.code === "invalid_element") {
7468
- processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
7633
+ processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
7469
7634
  } else {
7470
- const fullpath = [...path3, ...issue2.path];
7635
+ const fullpath = [...path4, ...issue2.path];
7471
7636
  if (fullpath.length === 0) {
7472
7637
  result.errors.push(mapper(issue2));
7473
7638
  continue;
@@ -7506,8 +7671,8 @@ function treeifyError(error62, mapper = (issue2) => issue2.message) {
7506
7671
  }
7507
7672
  function toDotPath(_path) {
7508
7673
  const segs = [];
7509
- const path3 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
7510
- for (const seg of path3) {
7674
+ const path4 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
7675
+ for (const seg of path4) {
7511
7676
  if (typeof seg === "number")
7512
7677
  segs.push(`[${seg}]`);
7513
7678
  else if (typeof seg === "symbol")
@@ -24609,13 +24774,13 @@ function resolveRef(ref, ctx) {
24609
24774
  if (!ref.startsWith("#")) {
24610
24775
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
24611
24776
  }
24612
- const path3 = ref.slice(1).split("/").filter(Boolean);
24613
- if (path3.length === 0) {
24777
+ const path4 = ref.slice(1).split("/").filter(Boolean);
24778
+ if (path4.length === 0) {
24614
24779
  return ctx.rootSchema;
24615
24780
  }
24616
24781
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
24617
- if (path3[0] === defsKey) {
24618
- const key = path3[1] === void 0 ? void 0 : decodeJSONPointerSegment(path3[1]);
24782
+ if (path4[0] === defsKey) {
24783
+ const key = path4[1] === void 0 ? void 0 : decodeJSONPointerSegment(path4[1]);
24619
24784
  if (!key || !ctx.defs[key]) {
24620
24785
  throw new Error(`Reference not found: ${ref}`);
24621
24786
  }
@@ -25464,7 +25629,7 @@ function date4(params) {
25464
25629
  return _coercedDate(ZodDate, params);
25465
25630
  }
25466
25631
 
25467
- // src/shared/guest-paths.ts
25632
+ // src/shared/paths/guest-paths.ts
25468
25633
  var RESERVED_GUEST = /^C:\\(?:Windows|Program Files|Program Files \(x86\)|ProgramData|Users|AgentLaunch|AgentData|HostTools|nvm|Mirror)(?:\\|$)/i;
25469
25634
  var MIRROR_LETTER = /^[D-Z]$/;
25470
25635
  var DRIVE_PATH = /^([A-Za-z]):\\(.*)$/;
@@ -25475,93 +25640,122 @@ var isValidGuestPath = (guest) => {
25475
25640
  const letter = m[1].toUpperCase();
25476
25641
  const rest = m[2].replace(/\\+$/, "");
25477
25642
  if (rest === "" || BAD_CHARS.test(rest)) return false;
25478
- 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;
25479
25645
  if (letter === "C") return !RESERVED_GUEST.test("C:\\" + rest);
25480
25646
  return MIRROR_LETTER.test(letter);
25481
25647
  };
25482
25648
 
25483
25649
  // src/core/schema/common.ts
25484
- var GuestPath = external_exports.string().refine(
25650
+ var GuestPathSchema = external_exports.string().refine(
25485
25651
  isValidGuestPath,
25486
25652
  "reserved or invalid guest path (a folder under C:\\ other than Windows, Program Files, Users, AgentData, Mirror, ..., or on drive D: to Z:)"
25487
25653
  );
25488
- var Name = external_exports.string().regex(/^[A-Za-z0-9_-]+$/, "letters, numbers, - and _ only");
25489
- 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());
25490
25656
  var toggle = (description) => external_exports.strictObject({ enabled: external_exports.boolean().describe(description) });
25491
- var SchemaRef = external_exports.string().describe("Path or URL of the JSON Schema for editor autocomplete and docs.");
25492
- 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.");
25493
- var Enabled = external_exports.union([external_exports.boolean(), external_exports.literal("auto")]);
25494
- var enabled = (what, markers) => Enabled.describe(what + ' true, false, or "auto" = only when the project has ' + markers + ".");
25495
- 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 + ").");
25496
25664
 
25497
25665
  // src/core/schema/config.ts
25498
25666
  var import_lodash = __toESM(require_lodash(), 1);
25499
25667
 
25500
25668
  // src/core/schema/databases.ts
25501
- var Port = external_exports.number().int().min(1024).max(65535);
25502
- 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).');
25503
- 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({
25504
25674
  postgres: external_exports.strictObject({
25505
25675
  enabled: dbEnabled("PostgreSQL (with psql, pg_dump). User postgres, no password, localhost only"),
25506
25676
  version: external_exports.string().min(1).describe('"latest" or a major version such as "16". A compose file pinning postgres:<major> wins.'),
25507
- port: Port.describe("Port inside the sandbox.")
25677
+ port: PortSchema.describe("Port inside the sandbox.")
25508
25678
  }),
25509
25679
  mysql: external_exports.strictObject({
25510
25680
  enabled: dbEnabled("MySQL-compatible database (MariaDB). User root, no password, localhost only"),
25511
25681
  version: external_exports.string().min(1).describe('"lts" (newest MariaDB LTS) or a MariaDB series such as "11.4".'),
25512
- port: Port.describe("Port inside the sandbox.")
25682
+ port: PortSchema.describe("Port inside the sandbox.")
25513
25683
  }),
25514
25684
  mongodb: external_exports.strictObject({
25515
25685
  enabled: dbEnabled("MongoDB with mongosh, localhost only"),
25516
25686
  version: external_exports.string().min(1).describe('"latest" or a version prefix such as "8.0".'),
25517
- port: Port.describe("Port inside the sandbox.")
25687
+ port: PortSchema.describe("Port inside the sandbox.")
25518
25688
  }),
25519
25689
  redis: external_exports.strictObject({
25520
25690
  enabled: dbEnabled("Redis (community Windows build), localhost only"),
25521
- port: Port.describe("Port inside the sandbox.")
25691
+ port: PortSchema.describe("Port inside the sandbox.")
25522
25692
  }),
25523
25693
  dynamodb: external_exports.strictObject({
25524
- enabled: dbEnabled("DynamoDB Local (Amazon's official emulator, on the Java toolchain) with dynamodb-admin, a web UI to browse and edit tables"),
25525
- port: Port.describe("DynamoDB endpoint port inside the sandbox (http://localhost:<port>)."),
25526
- 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
+ ),
25527
25701
  admin: external_exports.boolean().describe("Run dynamodb-admin next to DynamoDB Local.")
25528
25702
  }),
25529
25703
  sqlserver: external_exports.strictObject({
25530
- 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
+ )
25531
25707
  })
25532
25708
  });
25533
25709
 
25534
25710
  // src/core/schema/harness.ts
25535
- var Harness = external_exports.strictObject({
25711
+ var HarnessSchema = external_exports.strictObject({
25536
25712
  hostExecutable: external_exports.string().optional().describe("Executable copied from this PC when installed here (e.g. claude.exe)."),
25537
25713
  hostDir: external_exports.string().optional().describe('Folder of hostExecutable on this PC, or "auto" to search PATH and ~/.local/bin.'),
25538
25714
  npmPackage: external_exports.string().optional().describe("npm package installed inside the sandbox when there is no host copy."),
25539
25715
  npmBin: external_exports.string().optional().describe("Command the npm package provides."),
25540
25716
  uvPackage: external_exports.string().optional().describe("Python package installed with `uv tool install` inside the sandbox (e.g. aider-chat)."),
25541
25717
  uvBin: external_exports.string().optional().describe("Command the uv package provides."),
25542
- arguments: Strings.describe("Arguments always passed to the agent."),
25718
+ arguments: StringsSchema.describe("Arguments always passed to the agent."),
25543
25719
  environment: external_exports.record(external_exports.string(), external_exports.string()).describe("Environment variables for the agent."),
25544
- 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
+ )
25545
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");
25546
25724
 
25547
25725
  // src/core/schema/profile.ts
25548
- var Secrets = external_exports.strictObject({
25549
- 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.`),
25550
- allow: Strings.describe('Variable names that may go in anyway; * matches anything, e.g. ["AWS_REGION", "AWS_PROFILE", "MY_APP_*"].'),
25551
- patterns: Strings.describe('More variable names to treat as secrets; * matches anything, e.g. ["ACME_*", "*_INTERNAL_URL"].'),
25552
- 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
+ )
25553
25739
  });
25554
- var Attach = external_exports.strictObject({
25740
+ var AttachSchema = external_exports.strictObject({
25555
25741
  enabled: external_exports.boolean().describe("Allow sandbox claude --terminal / sandbox attach from this PC."),
25556
- 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)."),
25557
- auto: external_exports.boolean().describe("Starting an agent attaches this terminal automatically, as if you passed -t (only in an interactive terminal)."),
25558
- 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
+ )
25559
25751
  });
25560
- var AgentCommands = external_exports.strictObject({
25561
- 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."),
25562
- 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"].')
25563
25757
  });
25564
- var ClaudeProfile = external_exports.strictObject({
25758
+ var ClaudeProfileSchema = external_exports.strictObject({
25565
25759
  enabled: external_exports.boolean().describe("Copy selected Claude settings from this PC into the sandbox."),
25566
25760
  hostDir: external_exports.string().describe('Your Claude folder, or "auto" (~/.claude or CLAUDE_CONFIG_DIR).'),
25567
25761
  include: external_exports.array(external_exports.string().regex(/^[A-Za-z0-9._-]+$/)).describe("Files and folders copied from it."),
@@ -25569,25 +25763,37 @@ var ClaudeProfile = external_exports.strictObject({
25569
25763
  copyCredentials: external_exports.boolean().describe("Copy your Claude LOGIN into the sandbox. Prefer sandbox account instead."),
25570
25764
  overwrite: external_exports.boolean().describe("Refresh these settings from this PC on every launch."),
25571
25765
  syncHistory: external_exports.boolean().describe("Bring conversation history in, and sync new history back (path-translated)."),
25572
- 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
+ ),
25573
25769
  syncClaudeMem: external_exports.boolean().describe("Bring claude-mem data into the sandbox (its settings and backups stay on this PC)."),
25574
- 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
+ )
25575
25773
  });
25576
25774
 
25577
25775
  // src/core/schema/sandbox.ts
25578
- 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".');
25579
- 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({
25580
25780
  host: external_exports.string().min(1).describe("Folder on this PC (relative paths are relative to the config file)."),
25581
- guest: GuestPath.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: mapped to C:\\Mirror\\F\\... and shown as F: (subst) at boot."),
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
+ ),
25582
25784
  readOnly: external_exports.boolean().describe("true = the agent can only read it."),
25583
25785
  optional: external_exports.boolean().optional().describe("true = skip it quietly when the host folder does not exist.")
25584
25786
  });
25585
- var Sandbox = external_exports.strictObject({
25787
+ var SandboxSchema = external_exports.strictObject({
25586
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.'),
25587
25789
  maxMemoryMb: external_exports.number().int().positive().describe('Upper limit for memoryMb "auto".'),
25588
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).`),
25589
- 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).`),
25590
- 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
+ ),
25591
25797
  reserveHostMb: external_exports.number().int().nonnegative().describe('RAM always left for this PC when memoryMb is "auto".'),
25592
25798
  vGpu: external_exports.boolean().describe("Virtual GPU. Off by default: Microsoft notes it widens the sandbox attack surface."),
25593
25799
  networking: external_exports.boolean().describe("Internet access. false is the only hard network isolation Windows Sandbox offers."),
@@ -25596,215 +25802,964 @@ var Sandbox = external_exports.strictObject({
25596
25802
  videoInput: external_exports.boolean().describe("Camera access."),
25597
25803
  printerRedirection: external_exports.boolean().describe("Printers from this PC."),
25598
25804
  protectedClient: external_exports.boolean().describe("Run the sandbox window in Protected Client mode (recommended)."),
25599
- headless: external_exports.boolean().describe("Hide the sandbox window (sbx-show brings it back). A headless sandbox shuts down when its last session ends."),
25600
- 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
+ )
25601
25811
  });
25602
- var Port2 = external_exports.number().int().min(1).max(65535);
25603
- 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");
25604
- 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({
25605
25818
  blockPrivateRanges: external_exports.boolean().describe("Block your LAN (10/8, 172.16/12, 192.168/16, SMB) from inside the sandbox."),
25606
- 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."),
25607
- 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)."),
25608
- forwardPorts: external_exports.array(external_exports.strictObject({
25609
- pc: Port2.describe("The port on this PC (localhost only)."),
25610
- sandbox: Port2.describe("The port inside the sandbox (a server there may listen on localhost only).")
25611
- })).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
+ ),
25612
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."),
25613
- 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
+ )
25614
25839
  });
25615
- var Audit = external_exports.strictObject({
25616
- 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
+ ),
25617
25844
  days: external_exports.number().int().min(1).max(365).describe("Days the audit log is kept."),
25618
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."),
25619
- 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
+ ),
25620
25849
  files: external_exports.boolean().describe("Record the files changed in the project while the sandbox runs.")
25621
25850
  });
25622
- var WorkspaceFilter = external_exports.strictObject({
25623
- 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
+ ),
25624
25855
  exclude: external_exports.array(external_exports.string().max(500)).describe("Also keep these out, as .gitignore patterns, e.g. secrets/, *.pem, data/private/."),
25625
25856
  include: external_exports.array(external_exports.string().max(500)).describe("Let these in although .gitignore lists them, e.g. .env.example, data/fixtures/.")
25626
25857
  });
25627
- var Git = external_exports.strictObject({ enabled: external_exports.boolean().describe("Provide Git for Windows (and Git Bash, which Claude Code needs)."), access: GitAccess });
25628
- 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({
25629
25863
  copyFromHost: external_exports.boolean().describe("Copy Node, Git, nvm and the agent from this PC when they are installed here."),
25630
25864
  fallbackToInstall: external_exports.boolean().describe("Download anything that cannot be copied from this PC."),
25631
25865
  refresh: external_exports.boolean().describe("Re-copy / re-download everything on the next launch."),
25632
- git: Git,
25866
+ git: GitSchema,
25633
25867
  terminal: toggle("Windows Terminal as the sandbox window (downloaded once)."),
25634
- 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
+ )
25635
25871
  });
25636
- var Downloads = external_exports.strictObject({
25637
- 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
+ )
25638
25876
  });
25639
25877
 
25640
25878
  // src/core/schema/toolchains.ts
25641
- var Toolchains = external_exports.strictObject({
25879
+ var ToolchainsSchema = external_exports.strictObject({
25642
25880
  node: external_exports.strictObject({
25643
- 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.`),
25644
- 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
+ ),
25645
25887
  corepack: external_exports.boolean().describe(`pnpm and yarn through corepack (a project's "packageManager" in package.json picks the version).`),
25646
- 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.`),
25647
- 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
+ )
25648
25895
  }),
25649
25896
  python: external_exports.strictObject({
25650
- 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
+ ),
25651
25901
  version: external_exports.string().min(1).describe(`Python 3 version prefix, e.g. "3" or "3.12". A project's .python-version wins.`),
25652
25902
  python2: external_exports.boolean().describe("Also install Python 2.7 as python2 / pip2."),
25653
- 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.'),
25654
- 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
+ )
25655
25910
  }),
25656
25911
  rust: external_exports.strictObject({
25657
25912
  enabled: enabled("Rust via rustup (cargo, rustc).", "Cargo.toml or rust-toolchain(.toml)"),
25658
25913
  toolchain: external_exports.string().min(1).describe('Default toolchain, e.g. "stable". rust-toolchain.toml in a project wins.'),
25659
- 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
+ ),
25660
25917
  components: Packages("Extra rustup components", '["rust-src", "llvm-tools"]'),
25661
25918
  targets: Packages("Extra rustup targets", '["wasm32-unknown-unknown"]'),
25662
- 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"]'),
25663
- 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
+ )
25664
25932
  }),
25665
25933
  msvc: external_exports.strictObject({
25666
- 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"),
25667
- 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
+ ),
25668
25941
  msvcVersion: external_exports.string().min(1).describe('"latest" or an MSVC tools version prefix, e.g. "14.44".'),
25669
25942
  sdkVersion: external_exports.string().min(1).describe('"latest" or a Windows SDK build, e.g. "26100" or "10.0.22621".')
25670
25943
  }),
25671
25944
  cpp: external_exports.strictObject({
25672
- 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"),
25673
- 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
+ )
25674
25952
  }),
25675
25953
  dotnet: external_exports.strictObject({
25676
25954
  enabled: enabled(".NET SDK (C#, F#).", "a .sln, .slnx, .csproj, .fsproj or global.json"),
25677
- 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.`),
25678
25956
  tools: Packages("Global .NET tools (`dotnet tool install -g`)", '["dotnet-ef", "csharpier"]'),
25679
25957
  workloads: Packages("SDK workloads (`dotnet workload install`)", '["aspire", "wasm-tools"]'),
25680
- 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.'),
25681
- 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
+ )
25682
25964
  }),
25683
25965
  go: external_exports.strictObject({
25684
25966
  enabled: enabled("Go.", "go.mod or go.work"),
25685
- 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
+ ),
25686
25970
  tools: Packages("Go tools (`go install <path>@<version>`)", '["golang.org/x/tools/gopls@latest"]')
25687
25971
  }),
25688
25972
  java: external_exports.strictObject({
25689
- 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
+ ),
25690
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.`),
25691
25978
  maven: external_exports.boolean().describe("Apache Maven (mvn). A project's mvnw works either way."),
25692
25979
  gradle: external_exports.boolean().describe("Gradle (gradle). A project's gradlew works either way.")
25693
25980
  }),
25694
25981
  ruby: external_exports.strictObject({
25695
- 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
+ ),
25696
25986
  version: external_exports.string().min(1).describe(`Version prefix, e.g. "3" or "3.3". A project's .ruby-version wins.`),
25697
25987
  gems: Packages("Gems installed globally", '["rubocop"]')
25698
25988
  }),
25699
25989
  php: external_exports.strictObject({
25700
- 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
+ ),
25701
25994
  version: external_exports.string().min(1).describe(`Version prefix, e.g. "8" or "8.3". A project's .php-version wins.`),
25702
25995
  composer: external_exports.boolean().describe("Composer.")
25703
25996
  }),
25704
25997
  deno: external_exports.strictObject({ enabled: enabled("Deno.", "deno.json, deno.jsonc or deno.lock") }),
25705
- 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
+ }),
25706
26003
  cli: external_exports.strictObject({
25707
- 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.'),
25708
- zstd: Enabled.describe('Zstandard (zstd). "auto" = off; set true to get it.'),
25709
- 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
+ )
25710
26011
  }).describe("Small portable command-line tools from their GitHub releases, installed once into tools\\cli."),
25711
26012
  bun: toggle("Bun runtime (claude-mem needs it)."),
25712
26013
  uv: toggle("uv, the Python package manager (claude-mem needs it)."),
25713
- 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
+ ),
25714
26017
  mesa: external_exports.strictObject({
25715
- 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."),
25716
- 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
+ )
25717
26024
  }),
25718
26025
  vscode: external_exports.strictObject({
25719
- enabled: external_exports.boolean().describe("Portable VS Code inside the sandbox (code on PATH, desktop shortcut); its settings and extensions persist."),
25720
- 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
+ ),
25721
26032
  recommended: external_exports.boolean().describe("Also install the extensions a project recommends in its .vscode/extensions.json."),
25722
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.")
25723
26034
  }),
25724
- 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
+ )
25725
26038
  });
25726
26039
 
25727
- // src/shared/apps.ts
26040
+ // src/shared/apps/catalogue.ts
25728
26041
  var gh = (github, asset) => ({ github, asset });
25729
26042
  var APPS = [
25730
26043
  // ---- editors
25731
- { 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" },
25732
- { 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" },
25733
- { 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" },
25734
- { 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" },
25735
- { 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
+ },
25736
26092
  // ---- database clients
25737
- { 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" },
25738
- { 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" },
25739
- { 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" },
25740
- { 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" },
25741
- { 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" },
25742
- { 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"] },
25743
- { 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" },
25744
- { 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"] },
25745
- { 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
+ },
25746
26179
  // ---- API clients
25747
- { 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" },
25748
- { 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
+ },
25749
26198
  // ---- git
25750
- { 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" },
25751
- { 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 },
25752
- { 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
+ },
25753
26228
  // ---- utilities
25754
- { 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" },
25755
- { 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" },
25756
- { id: "everything", name: "Everything", category: "utilities", about: "Finds files by name instantly.", size: "2 MB", source: { resolve: "everything" }, exe: "Everything.exe" },
25757
- { 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" },
25758
- { 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
+ },
25759
26274
  // ---- browsers
25760
- { 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" },
25761
- { 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
+ },
25762
26295
  // ---- game development
25763
- { 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"] },
25764
- { id: "blender", name: "Blender", category: "gamedev", about: "3D modelling, animation and rendering.", size: "400 MB", source: { resolve: "blender" }, exe: "blender.exe", needs: ["mesa"] },
25765
- { 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"] },
25766
- { 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"] },
25767
- { 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"] },
25768
- { 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
+ },
25769
26356
  // ---- cloud
25770
- { id: "kubectl", name: "kubectl", category: "cloud", about: "Kubernetes command line.", size: "60 MB", source: { resolve: "kubectl" }, unpack: "file", exe: "kubectl.exe", cli: true },
25771
- { id: "helm", name: "Helm", category: "cloud", about: "Kubernetes package manager.", size: "20 MB", source: { resolve: "helm" }, exe: "helm.exe", cli: true },
25772
- { 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 },
25773
- { id: "terraform", name: "Terraform", category: "cloud", about: "Infrastructure as code.", size: "30 MB", source: { resolve: "terraform" }, exe: "terraform.exe", cli: true },
25774
- { 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 },
25775
- { 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 },
25776
- { 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
+ },
25777
26431
  // ---- diagrams and docs
25778
- { 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" },
25779
- { 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
+ },
25780
26451
  // ---- network
25781
- { 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 },
25782
- { 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 },
25783
- { 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 },
25784
- { 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
+ },
25785
26594
  // ---- command-line tools
25786
- { 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 },
25787
- { 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 },
25788
- { 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 },
25789
- { 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 },
25790
- { 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 },
25791
- { 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 },
25792
- { 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 },
25793
- { 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 },
25794
- { 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 },
25795
- { 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 },
25796
- { 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 },
25797
- { 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 },
25798
- { 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 },
25799
- { id: "sqlite", name: "SQLite tools", category: "cli", about: "sqlite3 command-line shell.", size: "5 MB", source: { resolve: "sqlite" }, exe: "sqlite3.exe", cli: true },
25800
- { 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 },
25801
- { 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
+ }
25802
26757
  ];
25803
26758
 
25804
26759
  // src/core/schema/apps.ts
25805
26760
  var CATALOGUE_IDS = APPS.filter((a) => !a.setting).map((a) => a.id);
25806
- var AppId = external_exports.enum(CATALOGUE_IDS);
25807
- 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");
25808
26763
  var compiles = (pattern) => {
25809
26764
  try {
25810
26765
  new RegExp(pattern);
@@ -25813,153 +26768,225 @@ var compiles = (pattern) => {
25813
26768
  return false;
25814
26769
  }
25815
26770
  };
25816
- var CustomApp = external_exports.strictObject({
26771
+ var CustomAppSchema = external_exports.strictObject({
25817
26772
  name: external_exports.string().min(1).max(80).describe('The name on the desktop shortcut, e.g. "My Tool".'),
25818
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."),
25819
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$"),
25820
26775
  url: external_exports.string().url().startsWith("https://", "https:// only").optional().describe("Or a direct https:// download link (zip, 7z, exe or msi)."),
25821
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)."),
25822
- 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
+ ),
25823
26780
  exe: external_exports.string().min(1).max(200).describe("The program to start (found anywhere in the download), e.g. mytool.exe."),
25824
26781
  cli: external_exports.boolean().optional().describe("A command-line tool: its folder goes on PATH instead of getting a desktop shortcut.")
25825
- }).refine((a) => a.github && a.asset ? !a.url : Boolean(a.url) && !a.github && !a.asset, { message: "give github + asset, or url (not both)" });
25826
- var Apps = external_exports.strictObject({
25827
- 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."),
25828
- 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
+ )
25829
26792
  });
25830
26793
 
25831
26794
  // src/core/schema/projects.ts
25832
- var Projects = external_exports.strictObject({
25833
- 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
+ ),
25834
26799
  exclude: external_exports.array(external_exports.string().min(1)).describe('Projects left out when "all" is on (folders on this PC).'),
25835
- 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
+ ),
25836
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."),
25837
26804
  declinedRoots: external_exports.array(external_exports.string().min(1)).describe("Parent folders you said no to (not asked again)."),
25838
- 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
+ )
25839
26811
  });
25840
26812
 
25841
26813
  // src/core/schema/config.ts
25842
- var Config = external_exports.strictObject({
25843
- $schema: SchemaRef.optional(),
25844
- defaultHarness: Name.describe("Agent started by `sandbox launch` (sandbox claude always runs claude)."),
25845
- 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,
25846
26818
  readOnly: external_exports.boolean().describe("Map the workspace read-only."),
25847
- workspaceFilter: WorkspaceFilter,
25848
- audit: Audit,
25849
- mappings: external_exports.array(Mapping).describe("Extra folders from this PC."),
25850
- sandbox: Sandbox,
26819
+ workspaceFilter: WorkspaceFilterSchema,
26820
+ audit: AuditSchema,
26821
+ mappings: external_exports.array(MappingSchema).describe("Extra folders from this PC."),
26822
+ sandbox: SandboxSchema,
25851
26823
  storage: external_exports.strictObject({
25852
26824
  root: external_exports.string().min(1).describe("Where everything is kept on this PC (tools, databases, logins, launches)."),
25853
26825
  persistAgentState: external_exports.boolean().describe("Keep agent logins and history between sandboxes."),
25854
- dataName: Name.describe("Name of the persistent data set (C:\\AgentData) shared by all workspaces."),
25855
- 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.`),
25856
- 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
+ )
25857
26833
  }),
25858
- network: Network,
25859
- provisioning: Provisioning,
25860
- downloads: Downloads,
25861
- toolchains: Toolchains,
25862
- databases: Databases.describe("Databases running inside the sandbox. Data persists in C:\\AgentData\\databases; each one starts at boot."),
25863
- attach: Attach,
25864
- agentCommands: AgentCommands,
25865
- 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,
25866
26844
  personalization: toggle("Copy your desktop look (theme, accent, taskbar, wallpaper, ...) into the sandbox."),
25867
- apps: Apps,
25868
- claudeProfile: ClaudeProfile,
25869
- 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."),
25870
26848
  hooks: external_exports.strictObject({ failFast: external_exports.boolean().describe("Stop when a hook script fails.") }),
25871
- projects: Projects.describe("Several projects in one sandbox: folders of projects mapped at every start, and adding folders while it runs.")
25872
- }).refine((c) => c.harnesses[c.defaultHarness] !== void 0, { message: "defaultHarness must be one of the configured harnesses", path: ["defaultHarness"] });
25873
- var LocalOverrides = external_exports.strictObject({
25874
- $schema: SchemaRef,
25875
- harness: Name.describe("Agent for this project."),
25876
- 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,
25877
26860
  readOnly: external_exports.boolean().describe("Map this project read-only."),
25878
26861
  // A project may turn the filter on and keep more out, never let ignored files in.
25879
- workspaceFilter: WorkspaceFilter.pick({ enabled: true, exclude: true }).partial(),
25880
- mappings: external_exports.array(Mapping).describe("Extra folders inside this project (relative to this file), e.g. a read-only data folder at another place in the sandbox."),
25881
- 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
+ ),
25882
26869
  // This PC's resources are yours to share: CPU and paging file (this PC's disk) are not a project's to set.
25883
- sandbox: Sandbox.omit({ cpuLimit: true, pageFileMb: true }).partial(),
26870
+ sandbox: SandboxSchema.omit({ cpuLimit: true, pageFileMb: true }).partial(),
25884
26871
  // A project may block more (the LAN, hosts); it never opens hosts, ports, DNS or a proxy.
25885
- network: Network.pick({ blockPrivateRanges: true, blockHosts: true }).partial(),
25886
- provisioning: Provisioning.pick({ copyFromHost: true, fallbackToInstall: true, refresh: true }).extend({ git: Git.partial(), terminal: toggle("Windows Terminal as the sandbox window.").partial() }).partial(),
25887
- 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(),
25888
26875
  // Every toolchain setting, each one optional (a project usually only switches languages on or pins a version).
25889
26876
  toolchains: external_exports.strictObject({
25890
- ...import_lodash.default.mapValues(import_lodash.default.omit(Toolchains.shape, "environment"), (shape) => shape.partial()),
25891
- environment: Toolchains.shape.environment
26877
+ ...import_lodash.default.mapValues(import_lodash.default.omit(ToolchainsSchema.shape, "environment"), (shape) => shape.partial()),
26878
+ environment: ToolchainsSchema.shape.environment
25892
26879
  }).partial(),
25893
- databases: external_exports.strictObject(import_lodash.default.mapValues(Databases.shape, (shape) => shape.partial())).partial(),
25894
- attach: Attach.partial(),
26880
+ databases: external_exports.strictObject(import_lodash.default.mapValues(DatabasesSchema.shape, (shape) => shape.partial())).partial(),
26881
+ attach: AttachSchema.partial(),
25895
26882
  personalization: toggle("Copy your desktop look into the sandbox.").partial(),
25896
- // Catalogue apps only (a vetted list): your own programs (apps.custom) download anything, so a repo cannot add them.
25897
- apps: Apps.pick({ install: true }).partial(),
25898
- 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(),
25899
26893
  hooks: external_exports.strictObject({ failFast: external_exports.boolean() }).partial()
25900
26894
  }).partial();
25901
26895
 
25902
- // src/shared/schema.ts
25903
- 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");
25904
26898
  var Text = (max = 4096) => external_exports.string().max(max);
25905
- var Time = Text(64);
25906
- var AttachEndpoint = external_exports.strictObject({
26899
+ var TimeSchema = Text(64);
26900
+ var AttachEndpointSchema = external_exports.strictObject({
25907
26901
  addresses: external_exports.array(Text(64)).max(16),
25908
26902
  port: external_exports.number().int().min(1024).max(65535),
25909
26903
  token: Text(256)
25910
26904
  });
25911
- var SandboxStatus = external_exports.object({
26905
+ var BootProgressSchema = external_exports.strictObject({
26906
+ step: external_exports.number().int().min(1).max(32),
26907
+ steps: external_exports.number().int().min(1).max(32),
26908
+ title: Text(120),
26909
+ /** Being set up now; percent while it downloads (when the size is known). */
26910
+ active: external_exports.array(external_exports.strictObject({ name: Text(64), percent: external_exports.number().int().min(0).max(100).optional() })).max(8),
26911
+ done: external_exports.number().int().min(0).max(1e3),
26912
+ total: external_exports.number().int().min(0).max(1e3)
26913
+ });
26914
+ var SandboxStatusSchema = external_exports.object({
25912
26915
  launchId: Text(64),
25913
26916
  phase: external_exports.enum(["booting", "provisioning", "ready", "failed"]),
25914
26917
  message: Text(),
25915
- updatedAt: Time,
26918
+ updatedAt: TimeSchema,
25916
26919
  workspaceHost: Text(),
25917
26920
  guestWorkspace: Text(),
25918
26921
  headless: external_exports.boolean(),
25919
26922
  /** The sandbox's IPv4 addresses (for network.forwardPorts; the host only uses ones on its Hyper-V network). */
25920
- addresses: external_exports.array(external_exports.string().max(45)).max(8).optional()
26923
+ addresses: external_exports.array(external_exports.string().max(45)).max(8).optional(),
26924
+ /** A malformed progress is dropped, never the status (the phase still counts). */
26925
+ progress: BootProgressSchema.optional().catch(void 0)
25921
26926
  });
25922
- var Version = external_exports.strictObject({ spec: Text(128), source: Text(256) });
25923
- var DatabasePlan = external_exports.strictObject({
26927
+ var VersionSchema = external_exports.strictObject({ spec: Text(128), source: Text(256) });
26928
+ var DatabasePlanSchema = external_exports.strictObject({
25924
26929
  database: external_exports.enum(["postgres", "mysql", "sqlserver", "mongodb", "redis", "dynamodb"]),
25925
26930
  reasons: external_exports.array(Text(1024)).max(32),
25926
26931
  version: Text(64),
25927
26932
  port: external_exports.number().int().min(1024).max(65535),
25928
26933
  adminPort: external_exports.number().int().min(1024).max(65535).optional()
25929
26934
  });
25930
- var ProjectSpec = external_exports.strictObject({
25931
- name: Id,
26935
+ var ProjectSpecSchema = external_exports.strictObject({
26936
+ name: IdSchema,
25932
26937
  /** Inside the sandbox: C:\Projects\<name>. */
25933
26938
  workspace: Text(1024),
25934
26939
  workspaceHost: Text(1024),
25935
- toolchains: Toolchains,
25936
- versions: external_exports.strictObject({ node: Version, nodeExtra: external_exports.array(Text(128)).max(16), python: Version }),
25937
- 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),
25938
26943
  /** Agents this project may start that the sandbox did not boot with (its .sandbox-config.json "harness"). */
25939
- 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"),
25940
26945
  /** Its hooks were staged in C:\AgentLaunch\projects\<name>\hooks. */
25941
26946
  hooks: external_exports.boolean()
25942
26947
  });
25943
- var GuestRequest = external_exports.discriminatedUnion("kind", [
25944
- 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
+ }),
25945
26959
  /** Provision a registered project without starting an agent (sandbox start / exec / db from its folder). */
25946
- external_exports.strictObject({ kind: external_exports.literal("project"), id: Id, project: ProjectSpec, createdAt: Time }),
25947
- 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
+ }),
25948
26969
  /** cwd: only the sessions in this folder or below (one project's); omitted = every session. */
25949
- external_exports.strictObject({ kind: external_exports.literal("restart"), id: Id, harness: Text(64).nullable(), cwd: Text().optional(), createdAt: Time }),
25950
- 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 })
25951
26978
  ]);
25952
- var GuestResponse = external_exports.object({
25953
- id: Id,
26979
+ var GuestResponseSchema = external_exports.object({
26980
+ id: IdSchema,
25954
26981
  ok: external_exports.boolean(),
25955
26982
  message: Text(65536),
25956
26983
  exitCode: external_exports.number().int().optional(),
25957
26984
  stdout: Text(4 * 1024 * 1024).optional(),
25958
26985
  stderr: Text(4 * 1024 * 1024).optional(),
25959
- finishedAt: Time
26986
+ finishedAt: TimeSchema
25960
26987
  });
25961
- var SessionStatus = external_exports.object({
25962
- id: Id,
26988
+ var SessionStatusSchema = external_exports.object({
26989
+ id: IdSchema,
25963
26990
  launchId: Text(64),
25964
26991
  harness: Text(64),
25965
26992
  cwd: Text(),
@@ -25967,42 +26994,24 @@ var SessionStatus = external_exports.object({
25967
26994
  project: Text(64).optional(),
25968
26995
  phase: external_exports.enum(["starting", "running", "exited", "failed"]),
25969
26996
  message: Text(),
25970
- updatedAt: Time,
25971
- startedAt: Time,
26997
+ updatedAt: TimeSchema,
26998
+ startedAt: TimeSchema,
25972
26999
  exitCode: external_exports.number().int().optional(),
25973
- attach: AttachEndpoint.optional()
27000
+ attach: AttachEndpointSchema.optional()
25974
27001
  });
25975
- var ProjectStatus = external_exports.object({
25976
- name: Id,
27002
+ var ProjectStatusSchema = external_exports.object({
27003
+ name: IdSchema,
25977
27004
  workspace: Text(1024),
25978
27005
  phase: external_exports.enum(["provisioning", "ready", "failed"]),
25979
27006
  message: Text(),
25980
- updatedAt: Time,
27007
+ updatedAt: TimeSchema,
25981
27008
  databases: external_exports.array(external_exports.object({ database: Text(32), port: external_exports.number().int() })).max(16),
25982
27009
  summary: external_exports.array(Text(512)).max(64)
25983
27010
  });
25984
27011
 
25985
- // src/shared/rundir.ts
27012
+ // src/shared/io/json.ts
27013
+ import fs from "node:fs";
25986
27014
  var MAX_MESSAGE_BYTES = 8 * 1024 * 1024;
25987
- var safeId = (id) => Id.parse(id);
25988
- var runPaths = (dataDir2) => {
25989
- const run2 = path.join(dataDir2, "run");
25990
- const file2 = (dir) => (id) => path.join(run2, dir, safeId(id) + ".json");
25991
- return {
25992
- run: run2,
25993
- sandbox: path.join(run2, "sandbox.json"),
25994
- requests: path.join(run2, "requests"),
25995
- responses: path.join(run2, "responses"),
25996
- sessions: path.join(run2, "sessions"),
25997
- projects: path.join(run2, "projects"),
25998
- /** audit.processes: programs the sandbox started, in small .jsonl files the host takes in and deletes. */
25999
- audit: path.join(run2, "audit"),
26000
- request: file2("requests"),
26001
- response: file2("responses"),
26002
- session: file2("sessions"),
26003
- project: file2("projects")
26004
- };
26005
- };
26006
27015
  var readJsonFile = (file2) => {
26007
27016
  try {
26008
27017
  if (fs.statSync(file2).size > MAX_MESSAGE_BYTES) return null;
@@ -26015,19 +27024,77 @@ var readValid = (schema, file2) => {
26015
27024
  const parsed = schema.safeParse(readJsonFile(file2));
26016
27025
  return parsed.success ? parsed.data : null;
26017
27026
  };
26018
- var readSession = (dataDir2, id) => readValid(SessionStatus, runPaths(dataDir2).session(id));
26019
-
26020
- // src/guest/env.ts
26021
- import fs2 from "node:fs";
26022
- import path2 from "node:path";
26023
27027
 
26024
- // src/shared/download.ts
26025
- var checksumRequired = false;
26026
- var setChecksumRequired = (on) => {
26027
- 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
+ }
26028
27095
  };
26029
27096
 
26030
- // src/guest/env.ts
27097
+ // src/guest/runtime/paths.ts
26031
27098
  var isWin = process.platform === "win32";
26032
27099
  var dryRun = process.env.AGENT_DRY_RUN === "1";
26033
27100
  var testMode = process.env.AGENT_SANDBOX_TEST === "1";
@@ -26035,22 +27102,15 @@ var launchDir = process.env.AGENT_LAUNCH_DIR ?? "C:\\AgentLaunch";
26035
27102
  var dataDir = process.env.AGENT_DATA_DIR ?? "C:\\AgentData";
26036
27103
  var hostToolsDir = process.env.AGENT_HOST_TOOLS_DIR ?? "C:\\HostTools";
26037
27104
  var localDir = process.env.AGENT_LOCAL_DIR ?? "C:\\nvm";
26038
- var toolsDir = path2.join(dataDir, "tools");
26039
- var logsDir = path2.join(dataDir, "logs");
26040
- var run = runPaths(dataDir);
26041
- var session = JSON.parse(fs2.readFileSync(path2.join(launchDir, "session.json"), "utf8").replace(/^\uFEFF/, ""));
26042
- setChecksumRequired(session.downloads?.requireChecksum === true);
26043
- var workspace = process.env.AGENT_WORKSPACE ?? session.workspace;
26044
- var stateDir = path2.join(dataDir, session.persistAgentState ? "state" : "state-session");
26045
- var claudeDir = path2.join(stateDir, "claude");
26046
- fs2.mkdirSync(logsDir, { recursive: true });
26047
- var logFile = path2.join(logsDir, (process.env.AGENT_LOG_PREFIX ?? "guest") + "-" + (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-") + ".log");
27105
+ var toolsDir = path3.join(dataDir, "tools");
27106
+ var logsDir = path3.join(dataDir, "logs");
27107
+ var run = new RunDir(dataDir);
26048
27108
 
26049
- // src/guest/view.ts
27109
+ // src/guest/sessions/viewer.ts
26050
27110
  var waitUntilStarted = async (id) => {
26051
27111
  let last = "";
26052
27112
  for (let i = 0; i < 3600; i++) {
26053
- const s = readSession(dataDir, id);
27113
+ const s = run.readSession(id);
26054
27114
  if (s && s.phase !== "starting") return s;
26055
27115
  if (s && s.message !== last) {
26056
27116
  console.log(" " + s.message);
@@ -26058,33 +27118,35 @@ var waitUntilStarted = async (id) => {
26058
27118
  }
26059
27119
  await new Promise((r) => setTimeout(r, 500));
26060
27120
  }
26061
- return readSession(dataDir, id);
27121
+ return run.readSession(id);
26062
27122
  };
26063
27123
  var viewSession = async (id) => {
26064
- const session2 = await waitUntilStarted(id);
26065
- if (session2?.phase === "failed") {
26066
- 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);
26067
27127
  await new Promise((r) => setTimeout(r, 3e4));
26068
27128
  return 1;
26069
27129
  }
26070
- if (!session2?.attach) {
27130
+ if (!session?.attach) {
26071
27131
  console.error("Session " + id + " is not running.");
26072
27132
  return 1;
26073
27133
  }
26074
- const socket = await connect({ ...session2.attach, addresses: ["127.0.0.1"] });
26075
- const result = await runTerminalClient(socket, session2.attach.token);
26076
- 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 + ".");
26077
27137
  else if (result.reason === "error") console.log("Session error: " + result.message);
26078
27138
  return result.reason === "exit" ? result.exitCode : 1;
26079
27139
  };
27140
+
27141
+ // src/guest/entries/view.ts
26080
27142
  if (process.argv[1]?.endsWith("view.js") && process.argv[2]) {
26081
- viewSession(process.argv[2]).then((code) => {
26082
- process.exitCode = code;
26083
- }, (e) => {
26084
- console.error(e instanceof Error ? e.message : String(e));
26085
- process.exitCode = 1;
26086
- });
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
+ );
26087
27152
  }
26088
- export {
26089
- viewSession
26090
- };