windows-development-sandbox 1.7.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (432) hide show
  1. package/config.example.json +12 -1
  2. package/dist/app/context.d.ts +8 -0
  3. package/dist/app/context.js +12 -0
  4. package/dist/app/features/defs.d.ts +322 -0
  5. package/dist/app/features/defs.js +28 -0
  6. package/dist/app/features/sandbox/index.d.ts +2 -0
  7. package/dist/app/features/sandbox/index.js +3 -0
  8. package/dist/app/features/sandbox/sandbox.def.d.ts +193 -0
  9. package/dist/app/features/sandbox/sandbox.def.js +245 -0
  10. package/dist/app/features/sandbox/sandbox.run.d.ts +72 -0
  11. package/dist/app/features/sandbox/sandbox.run.js +98 -0
  12. package/dist/app/features/sessions/index.d.ts +2 -0
  13. package/dist/app/features/sessions/index.js +3 -0
  14. package/dist/app/features/sessions/sessions.def.d.ts +141 -0
  15. package/dist/app/features/sessions/sessions.def.js +176 -0
  16. package/dist/app/features/sessions/sessions.run.d.ts +39 -0
  17. package/dist/app/features/sessions/sessions.run.js +58 -0
  18. package/dist/{cli/menu/settings/categories.d.ts → app/features/settings/categories.def.d.ts} +2 -0
  19. package/dist/{cli/menu/settings/categories.js → app/features/settings/categories.def.js} +24 -5
  20. package/dist/app/features/settings/index.d.ts +5 -0
  21. package/dist/app/features/settings/index.js +6 -0
  22. package/dist/{cli/menu/settings/config-file.d.ts → app/features/settings/settings-file.d.ts} +1 -1
  23. package/dist/{cli/menu/settings/config-file.js → app/features/settings/settings-file.js} +1 -1
  24. package/dist/app/features/settings/settings-rows.d.ts +35 -0
  25. package/dist/app/features/settings/settings-rows.js +94 -0
  26. package/dist/app/features/settings/settings.def.d.ts +157 -0
  27. package/dist/app/features/settings/settings.def.js +179 -0
  28. package/dist/app/features/settings/settings.run.d.ts +67 -0
  29. package/dist/app/features/settings/settings.run.js +84 -0
  30. package/dist/app/kernel/define.d.ts +143 -0
  31. package/dist/app/kernel/define.js +42 -0
  32. package/dist/app/kernel/errors.d.ts +34 -0
  33. package/dist/app/kernel/errors.js +45 -0
  34. package/dist/app/kernel/fields.d.ts +70 -0
  35. package/dist/app/kernel/fields.js +243 -0
  36. package/dist/app/kernel/index.d.ts +8 -0
  37. package/dist/app/kernel/index.js +10 -0
  38. package/dist/app/kernel/io.d.ts +193 -0
  39. package/dist/app/kernel/io.js +126 -0
  40. package/dist/app/kernel/rpc.d.ts +156 -0
  41. package/dist/app/kernel/rpc.js +47 -0
  42. package/dist/app/kernel/text.d.ts +6 -0
  43. package/dist/app/kernel/text.js +57 -0
  44. package/dist/app/kernel/view.d.ts +146 -0
  45. package/dist/app/kernel/view.js +28 -0
  46. package/dist/app/registry.d.ts +10 -0
  47. package/dist/app/registry.js +50 -0
  48. package/dist/cli/args.d.ts +5 -0
  49. package/dist/cli/args.js +6 -0
  50. package/dist/cli/commands/engine.d.ts +2 -0
  51. package/dist/cli/commands/engine.js +60 -0
  52. package/dist/cli/commands/index.d.ts +1 -1
  53. package/dist/cli/commands/index.js +1 -1
  54. package/dist/cli/commands/launch/launch.js +49 -7
  55. package/dist/cli/commands/launch/prepare.js +3 -3
  56. package/dist/cli/commands/launch/running.js +2 -1
  57. package/dist/cli/commands/launch/summary.d.ts +2 -0
  58. package/dist/cli/commands/maintenance/config-share.d.ts +12 -0
  59. package/dist/cli/commands/maintenance/config-share.js +80 -0
  60. package/dist/cli/commands/maintenance/config.js +8 -82
  61. package/dist/cli/commands/maintenance/logs.js +14 -0
  62. package/dist/cli/commands/registry.js +3 -7
  63. package/dist/cli/commands/repair/checks/contained.d.ts +2 -0
  64. package/dist/cli/commands/repair/checks/contained.js +139 -0
  65. package/dist/cli/commands/repair/checks/hcs.d.ts +7 -0
  66. package/dist/cli/commands/repair/checks/hcs.js +28 -0
  67. package/dist/cli/commands/repair/checks/index.js +4 -0
  68. package/dist/cli/commands/repair/checks/pc.js +32 -1
  69. package/dist/cli/commands/repair/checks/sandbox.js +16 -1
  70. package/dist/cli/commands/repair/checks/vpn.js +34 -9
  71. package/dist/cli/commands/repair/env.js +2 -1
  72. package/dist/cli/commands/sessions/index.d.ts +0 -4
  73. package/dist/cli/commands/sessions/index.js +3 -7
  74. package/dist/cli/commands/shared-use.d.ts +5 -2
  75. package/dist/cli/commands/shared-use.js +11 -8
  76. package/dist/cli/commands/storage/contained.d.ts +3 -0
  77. package/dist/cli/commands/storage/contained.js +179 -0
  78. package/dist/cli/commands/storage/offer.js +7 -1
  79. package/dist/cli/commands/storage/storage.js +10 -2
  80. package/dist/cli/commands/user-config.js +1 -1
  81. package/dist/cli/commands/vpn.js +20 -3
  82. package/dist/cli/commands/web.d.ts +5 -0
  83. package/dist/cli/commands/web.js +40 -0
  84. package/dist/cli/index.js +2 -1
  85. package/dist/cli/manifest.d.ts +72 -104
  86. package/dist/cli/manifest.js +64 -39
  87. package/dist/cli/menu/add-agent.d.ts +1 -1
  88. package/dist/cli/menu/add-agent.js +1 -1
  89. package/dist/cli/menu/apps.d.ts +7 -1
  90. package/dist/cli/menu/apps.js +36 -0
  91. package/dist/cli/menu/command-fields.d.ts +1 -1
  92. package/dist/cli/menu/command-form.js +2 -2
  93. package/dist/cli/menu/io-menu.d.ts +29 -0
  94. package/dist/cli/menu/io-menu.js +126 -0
  95. package/dist/cli/menu/live.d.ts +27 -0
  96. package/dist/cli/menu/live.js +69 -0
  97. package/dist/cli/menu/memory.d.ts +19 -0
  98. package/dist/cli/menu/memory.js +53 -0
  99. package/dist/cli/menu/menu.d.ts +10 -1
  100. package/dist/cli/menu/menu.js +27 -9
  101. package/dist/cli/menu/pages/agents-page.d.ts +3 -1
  102. package/dist/cli/menu/pages/agents-page.js +12 -5
  103. package/dist/cli/menu/pages/apps-page.d.ts +3 -1
  104. package/dist/cli/menu/pages/apps-page.js +19 -2
  105. package/dist/cli/menu/pages/list-page.d.ts +27 -0
  106. package/dist/cli/menu/pages/list-page.js +109 -7
  107. package/dist/cli/menu/pages/maintenance-page.d.ts +0 -5
  108. package/dist/cli/menu/pages/maintenance-page.js +17 -19
  109. package/dist/cli/menu/pages/sandbox-page.d.ts +4 -6
  110. package/dist/cli/menu/pages/sandbox-page.js +26 -118
  111. package/dist/cli/menu/pages/scopes.d.ts +1 -1
  112. package/dist/cli/menu/pages/sessions-page.d.ts +5 -11
  113. package/dist/cli/menu/pages/sessions-page.js +19 -88
  114. package/dist/cli/menu/pages/settings-page.d.ts +2 -10
  115. package/dist/cli/menu/pages/settings-page.js +64 -94
  116. package/dist/cli/menu/render-view.d.ts +28 -0
  117. package/dist/cli/menu/render-view.js +112 -0
  118. package/dist/cli/menu/settings/{path-kind.d.ts → ask-path.d.ts} +1 -7
  119. package/dist/cli/menu/settings/ask-path.js +14 -0
  120. package/dist/cli/menu/settings/collections/collection-editor.d.ts +1 -1
  121. package/dist/cli/menu/settings/collections/string-list-editor.d.ts +1 -2
  122. package/dist/cli/menu/settings/collections/string-list-editor.js +1 -1
  123. package/dist/cli/menu/settings/draft.d.ts +1 -1
  124. package/dist/cli/menu/settings/format.d.ts +1 -3
  125. package/dist/cli/menu/settings/format.js +6 -36
  126. package/dist/cli/menu/settings/index.d.ts +1 -3
  127. package/dist/cli/menu/settings/index.js +3 -3
  128. package/dist/cli/menu/settings/object-editor.d.ts +1 -1
  129. package/dist/cli/menu/settings/share.d.ts +36 -0
  130. package/dist/cli/menu/settings/share.js +131 -0
  131. package/dist/cli/menu/settings/value-editor.d.ts +5 -1
  132. package/dist/cli/menu/settings/value-editor.js +57 -54
  133. package/dist/cli/menu/several.js +1 -1
  134. package/dist/cli/menu/share-settings.d.ts +21 -0
  135. package/dist/cli/menu/share-settings.js +112 -0
  136. package/dist/cli/menu/shell.d.ts +21 -5
  137. package/dist/cli/menu/shell.js +31 -6
  138. package/dist/cli/menu/views.d.ts +7 -0
  139. package/dist/cli/menu/views.js +11 -0
  140. package/dist/cli/menu/vpn-login.js +8 -0
  141. package/dist/cli/operations/handler.d.ts +6 -0
  142. package/dist/cli/operations/handler.js +61 -0
  143. package/dist/cli/operations/index.d.ts +4 -0
  144. package/dist/cli/operations/index.js +5 -0
  145. package/dist/cli/operations/input.d.ts +6 -0
  146. package/dist/cli/operations/input.js +37 -0
  147. package/dist/cli/operations/io-cli.d.ts +7 -0
  148. package/dist/cli/operations/io-cli.js +62 -0
  149. package/dist/cli/operations/spec.d.ts +18 -0
  150. package/dist/cli/operations/spec.js +108 -0
  151. package/dist/cli/output/colors.d.ts +2 -2
  152. package/dist/cli/output/colors.js +2 -11
  153. package/dist/cli/output/index.d.ts +1 -0
  154. package/dist/cli/output/index.js +1 -0
  155. package/dist/cli/output/print.d.ts +3 -1
  156. package/dist/cli/output/print.js +7 -3
  157. package/dist/cli/output/progress.d.ts +15 -0
  158. package/dist/cli/output/progress.js +44 -0
  159. package/dist/cli/output/render-view.d.ts +4 -0
  160. package/dist/cli/output/render-view.js +63 -0
  161. package/dist/cli/services/agent-commands-service.d.ts +2 -0
  162. package/dist/cli/services/agent-commands-service.js +11 -2
  163. package/dist/cli/services/logs-service.js +4 -3
  164. package/dist/cli/tui/app.d.ts +6 -1
  165. package/dist/cli/tui/app.js +26 -4
  166. package/dist/cli/tui/list/list-screen.d.ts +14 -0
  167. package/dist/cli/tui/list/list-screen.js +64 -36
  168. package/dist/cli/tui/list/list-types.d.ts +2 -0
  169. package/dist/cli/tui/terminal.d.ts +7 -0
  170. package/dist/cli/tui/terminal.js +30 -10
  171. package/dist/core/config/defaults.js +9 -1
  172. package/dist/core/schema/config.d.ts +14 -0
  173. package/dist/core/schema/config.js +16 -1
  174. package/dist/core/schema/harness.d.ts +1 -0
  175. package/dist/core/schema/harness.js +5 -0
  176. package/dist/core/schema/sandbox.d.ts +6 -0
  177. package/dist/core/schema/sandbox.js +20 -3
  178. package/dist/core/schema/vpn.d.ts +2 -1
  179. package/dist/core/schema/vpn.js +4 -4
  180. package/dist/core/schema/web.d.ts +1 -0
  181. package/dist/core/schema/web.js +4 -1
  182. package/dist/core/types.d.ts +23 -5
  183. package/dist/core/util/fs.d.ts +2 -0
  184. package/dist/core/util/fs.js +9 -0
  185. package/dist/core/util/index.d.ts +1 -1
  186. package/dist/core/util/index.js +1 -1
  187. package/dist/guest/agents/agent-files.d.ts +5 -0
  188. package/dist/guest/agents/agent-files.js +4 -0
  189. package/dist/guest/agents/local-state.d.ts +2 -0
  190. package/dist/guest/agents/local-state.js +21 -1
  191. package/dist/guest/boot/boot.js +5 -2
  192. package/dist/guest/daemon/daemon.js +4 -0
  193. package/dist/guest/daemon/sessions.d.ts +5 -0
  194. package/dist/guest/daemon/sessions.js +17 -3
  195. package/dist/guest/entries/daemon.js +3 -0
  196. package/dist/guest/governor/decide.d.ts +71 -0
  197. package/dist/guest/governor/decide.js +211 -0
  198. package/dist/guest/governor/governor.d.ts +45 -0
  199. package/dist/guest/governor/governor.js +230 -0
  200. package/dist/guest/governor/index.d.ts +2 -0
  201. package/dist/guest/governor/index.js +2 -0
  202. package/dist/guest/network/firewall.d.ts +1 -0
  203. package/dist/guest/network/firewall.js +65 -23
  204. package/dist/guest/runtime/csc.d.ts +1 -0
  205. package/dist/guest/runtime/csc.js +1 -0
  206. package/dist/guest/runtime/process.js +53 -5
  207. package/dist/guest/sessions/viewer.js +3 -1
  208. package/dist/guest/setup/claude-mem.js +12 -4
  209. package/dist/guest/toolchains/languages/node.js +29 -3
  210. package/dist/guest/toolchains/native/rust-extras.js +4 -2
  211. package/dist/guest/vpn/vpn.js +69 -21
  212. package/dist/guest/vpn/wireguard.d.ts +32 -0
  213. package/dist/guest/vpn/wireguard.js +132 -0
  214. package/dist/host/agent-commands/commands.d.ts +4 -0
  215. package/dist/host/agent-commands/commands.js +31 -7
  216. package/dist/host/audit/log.d.ts +1 -1
  217. package/dist/host/channel/attach.d.ts +3 -1
  218. package/dist/host/channel/attach.js +5 -2
  219. package/dist/host/channel/channel.d.ts +2 -0
  220. package/dist/host/channel/channel.js +4 -0
  221. package/dist/host/engines/engine.d.ts +12 -0
  222. package/dist/host/engines/engine.js +1 -0
  223. package/dist/host/engines/hcs/check.d.ts +25 -0
  224. package/dist/host/engines/hcs/check.js +95 -0
  225. package/dist/host/engines/hcs/documents.d.ts +44 -0
  226. package/dist/host/engines/hcs/documents.js +155 -0
  227. package/dist/host/engines/hcs/engine.d.ts +39 -0
  228. package/dist/host/engines/hcs/engine.js +171 -0
  229. package/dist/host/engines/hcs/helper.d.ts +43 -0
  230. package/dist/host/engines/hcs/helper.js +173 -0
  231. package/dist/host/engines/hcs/images.d.ts +37 -0
  232. package/dist/host/engines/hcs/images.js +152 -0
  233. package/dist/host/engines/index.d.ts +7 -0
  234. package/dist/host/engines/index.js +5 -0
  235. package/dist/host/engines/registry.d.ts +16 -0
  236. package/dist/host/engines/registry.js +30 -0
  237. package/dist/host/engines/types.d.ts +58 -0
  238. package/dist/host/engines/types.js +1 -0
  239. package/dist/host/engines/windows-sandbox/engine.d.ts +16 -0
  240. package/dist/host/engines/windows-sandbox/engine.js +63 -0
  241. package/dist/host/engines/windows-sandbox/wsb-text.d.ts +2 -0
  242. package/dist/host/engines/windows-sandbox/wsb-text.js +29 -0
  243. package/dist/host/launch/generate.d.ts +5 -1
  244. package/dist/host/launch/generate.js +50 -8
  245. package/dist/host/launch/index.d.ts +3 -1
  246. package/dist/host/launch/index.js +3 -1
  247. package/dist/host/launch/launch-plan.d.ts +13 -0
  248. package/dist/host/launch/launch-plan.js +26 -0
  249. package/dist/host/launch/mappings.js +2 -1
  250. package/dist/host/launch/risk-notes.d.ts +10 -0
  251. package/dist/host/launch/risk-notes.js +18 -0
  252. package/dist/host/launch/session-file.d.ts +2 -0
  253. package/dist/host/launch/session-file.js +7 -1
  254. package/dist/host/launch/wsb-file.d.ts +28 -4
  255. package/dist/host/launch/wsb-file.js +61 -42
  256. package/dist/host/life/crash-report.d.ts +27 -1
  257. package/dist/host/life/crash-report.js +173 -7
  258. package/dist/host/life/host-memory.d.ts +41 -0
  259. package/dist/host/life/host-memory.js +140 -0
  260. package/dist/host/life/index.d.ts +2 -0
  261. package/dist/host/life/index.js +2 -0
  262. package/dist/host/life/stop-events.d.ts +2 -0
  263. package/dist/host/life/stop-events.js +20 -3
  264. package/dist/host/life/stop-warning.js +1 -1
  265. package/dist/host/life/watchdog.d.ts +56 -0
  266. package/dist/host/life/watchdog.js +124 -0
  267. package/dist/host/native.d.ts +3 -2
  268. package/dist/host/native.js +22 -3
  269. package/dist/host/profile/claude-login.js +3 -2
  270. package/dist/host/sandbox/contained-deps.d.ts +2 -0
  271. package/dist/host/sandbox/contained-deps.js +17 -0
  272. package/dist/host/sandbox/index.d.ts +2 -0
  273. package/dist/host/sandbox/index.js +2 -0
  274. package/dist/host/sandbox/platform.d.ts +2 -0
  275. package/dist/host/sandbox/platform.js +7 -7
  276. package/dist/host/sandbox/tasklist.d.ts +13 -0
  277. package/dist/host/sandbox/tasklist.js +47 -0
  278. package/dist/host/secrets/launch-secrets.js +2 -1
  279. package/dist/host/sharing/current.js +2 -6
  280. package/dist/host/storage/contained/check.d.ts +9 -0
  281. package/dist/host/storage/contained/check.js +37 -0
  282. package/dist/host/storage/contained/contained-storage.d.ts +66 -0
  283. package/dist/host/storage/contained/contained-storage.js +168 -0
  284. package/dist/host/storage/contained/disk-port.d.ts +43 -0
  285. package/dist/host/storage/contained/disk-port.js +122 -0
  286. package/dist/host/storage/contained/index.d.ts +9 -0
  287. package/dist/host/storage/contained/index.js +8 -0
  288. package/dist/host/storage/contained/layout.d.ts +28 -0
  289. package/dist/host/storage/contained/layout.js +45 -0
  290. package/dist/host/storage/contained/resolve.d.ts +4 -0
  291. package/dist/host/storage/contained/resolve.js +30 -0
  292. package/dist/host/storage/contained/setting.d.ts +1 -0
  293. package/dist/host/storage/contained/setting.js +5 -0
  294. package/dist/host/storage/contained/state.d.ts +89 -0
  295. package/dist/host/storage/contained/state.js +166 -0
  296. package/dist/host/storage/contained/transfer.d.ts +24 -0
  297. package/dist/host/storage/contained/transfer.js +121 -0
  298. package/dist/host/storage/index.d.ts +2 -0
  299. package/dist/host/storage/index.js +2 -0
  300. package/dist/host/storage/providers/contained.d.ts +15 -0
  301. package/dist/host/storage/providers/contained.js +39 -0
  302. package/dist/host/storage/providers/folder.d.ts +12 -0
  303. package/dist/host/storage/providers/folder.js +20 -0
  304. package/dist/host/storage/providers/index.d.ts +4 -0
  305. package/dist/host/storage/providers/index.js +3 -0
  306. package/dist/host/storage/providers/registry.d.ts +9 -0
  307. package/dist/host/storage/providers/registry.js +14 -0
  308. package/dist/host/storage/providers/types.d.ts +33 -0
  309. package/dist/host/storage/providers/types.js +1 -0
  310. package/dist/host/tools/conpty.js +3 -2
  311. package/dist/host/tools/windows-terminal.js +8 -7
  312. package/dist/host/vpn/index.d.ts +1 -1
  313. package/dist/host/vpn/index.js +1 -1
  314. package/dist/host/vpn/prepare.d.ts +2 -0
  315. package/dist/host/vpn/prepare.js +63 -2
  316. package/dist/host/web/browser.d.ts +2 -0
  317. package/dist/host/web/browser.js +14 -1
  318. package/dist/host/web/index.d.ts +3 -2
  319. package/dist/host/web/index.js +3 -2
  320. package/dist/host/web/rpc.d.ts +24 -0
  321. package/dist/host/web/rpc.js +149 -0
  322. package/dist/host/web/runner.d.ts +2 -0
  323. package/dist/host/web/runner.js +1 -2
  324. package/dist/host/web/server.d.ts +7 -0
  325. package/dist/host/web/server.js +23 -3
  326. package/dist/runtime/agent.js +83 -18
  327. package/dist/runtime/daemon.js +1805 -1221
  328. package/dist/runtime/db.js +83 -18
  329. package/dist/runtime/main.js +779 -219
  330. package/dist/runtime/netproxy.js +73 -11
  331. package/dist/runtime/view.js +91 -16
  332. package/dist/selftest/agent-paths.test.js +11 -1
  333. package/dist/selftest/app.test.d.ts +2 -0
  334. package/dist/selftest/app.test.js +324 -0
  335. package/dist/selftest/channel.test.js +13 -0
  336. package/dist/selftest/cli.test.js +2 -1
  337. package/dist/selftest/config.test.js +59 -0
  338. package/dist/selftest/contained.test.d.ts +2 -0
  339. package/dist/selftest/contained.test.js +544 -0
  340. package/dist/selftest/credentials.test.js +1 -1
  341. package/dist/selftest/engine.test.d.ts +2 -0
  342. package/dist/selftest/engine.test.js +127 -0
  343. package/dist/selftest/guest-boot.test.js +47 -1
  344. package/dist/selftest/hcs.test.d.ts +2 -0
  345. package/dist/selftest/hcs.test.js +482 -0
  346. package/dist/selftest/heavy-load.test.d.ts +2 -0
  347. package/dist/selftest/heavy-load.test.js +355 -0
  348. package/dist/selftest/index.js +12 -0
  349. package/dist/selftest/layout.test.js +12 -0
  350. package/dist/selftest/menu-perf.test.d.ts +2 -0
  351. package/dist/selftest/menu-perf.test.js +248 -0
  352. package/dist/selftest/menu-screens.js +4 -2
  353. package/dist/selftest/menu.test.js +36 -8
  354. package/dist/selftest/network.test.js +20 -1
  355. package/dist/selftest/support/engine-cases.d.ts +8 -0
  356. package/dist/selftest/support/engine-cases.js +65 -0
  357. package/dist/selftest/support/engine-golden.d.ts +3 -0
  358. package/dist/selftest/support/engine-golden.js +66 -0
  359. package/dist/selftest/support/fixtures.d.ts +8 -1
  360. package/dist/selftest/support/hcs-probes.d.ts +17 -0
  361. package/dist/selftest/support/hcs-probes.js +41 -0
  362. package/dist/selftest/vpn.test.js +136 -3
  363. package/dist/selftest/web.test.js +101 -3
  364. package/dist/shared/channel/run-dir.d.ts +4 -1
  365. package/dist/shared/channel/run-dir.js +7 -1
  366. package/dist/shared/channel/schema.d.ts +35 -1
  367. package/dist/shared/channel/schema.js +27 -0
  368. package/dist/shared/channel/secrets.d.ts +1 -0
  369. package/dist/shared/channel/secrets.js +6 -0
  370. package/dist/shared/io/copy-tree.d.ts +7 -0
  371. package/dist/shared/io/copy-tree.js +45 -0
  372. package/dist/shared/io/index.d.ts +2 -0
  373. package/dist/shared/io/index.js +2 -0
  374. package/dist/shared/io/robocopy-result.d.ts +6 -0
  375. package/dist/shared/io/robocopy-result.js +23 -0
  376. package/dist/shared/memory/index.d.ts +1 -0
  377. package/dist/shared/memory/index.js +1 -0
  378. package/dist/shared/memory/policy.d.ts +38 -0
  379. package/dist/shared/memory/policy.js +63 -0
  380. package/dist/shared/network/firewall-rules.d.ts +8 -0
  381. package/dist/shared/network/firewall-rules.js +28 -0
  382. package/dist/shared/pty/output-filter.d.ts +14 -1
  383. package/dist/shared/pty/output-filter.js +22 -4
  384. package/dist/shared/pty/terminal.d.ts +4 -1
  385. package/dist/shared/pty/terminal.js +4 -2
  386. package/dist/shared/system.d.ts +1 -0
  387. package/dist/shared/system.js +1 -0
  388. package/dist/shared/vpn/download.d.ts +16 -0
  389. package/dist/shared/vpn/download.js +16 -0
  390. package/dist/shared/vpn/wireguard.d.ts +51 -0
  391. package/dist/shared/vpn/wireguard.js +227 -0
  392. package/dist/sync/sync-cycle.js +5 -5
  393. package/dist/sync/watcher.d.ts +13 -0
  394. package/dist/sync/watcher.js +92 -3
  395. package/dist/web/index.html +4 -3
  396. package/dist/web/main-NRRS5O6Z.js +157 -0
  397. package/dist/web/main-T5DMCHYV.css +1 -0
  398. package/native/csharp/HcsHost/AssemblyInfo.cs +14 -0
  399. package/native/csharp/HcsHost/Guard.cs +100 -0
  400. package/native/csharp/HcsHost/Hcs.cs +256 -0
  401. package/native/csharp/HcsHost/Json.cs +78 -0
  402. package/native/csharp/HcsHost/Program.cs +185 -0
  403. package/native/csharp/HcsHost/VirtualDisk.cs +95 -0
  404. package/native/csharp/HostTools/AssemblyInfo.cs +14 -0
  405. package/native/csharp/HostTools/MemoryStatus.cs +128 -0
  406. package/native/csharp/HostTools/Program.cs +58 -17
  407. package/native/scripts/check-contained.ps1 +28 -0
  408. package/native/scripts/contained-common.ps1 +241 -0
  409. package/native/scripts/dismount-contained.ps1 +66 -0
  410. package/native/scripts/memory-status.ps1 +42 -0
  411. package/native/scripts/mount-contained.ps1 +139 -0
  412. package/native/scripts/run-elevated.ps1 +17 -4
  413. package/native/scripts/stop-events.ps1 +23 -8
  414. package/package.json +9 -2
  415. package/sandbox/csharp/MemGov.cs +466 -0
  416. package/sandbox/csharp/PtyHost.cs +111 -5
  417. package/sandbox/scripts/new-shortcuts.ps1 +3 -1
  418. package/schemas/config.schema.json +66 -8
  419. package/schemas/sandbox-config.schema.json +3 -3
  420. package/dist/cli/commands/sessions/control.d.ts +0 -4
  421. package/dist/cli/commands/sessions/control.js +0 -66
  422. package/dist/cli/commands/sessions/list.d.ts +0 -2
  423. package/dist/cli/commands/sessions/list.js +0 -48
  424. package/dist/cli/commands/sessions/status.d.ts +0 -4
  425. package/dist/cli/commands/sessions/status.js +0 -114
  426. package/dist/cli/commands/sessions/window.d.ts +0 -3
  427. package/dist/cli/commands/sessions/window.js +0 -18
  428. package/dist/cli/menu/settings/path-kind.js +0 -44
  429. package/dist/web/main-CXESL347.js +0 -45
  430. package/dist/web/main-VLR7DVQ4.css +0 -1
  431. /package/dist/{cli/menu/settings → app/kernel}/schema-node.d.ts +0 -0
  432. /package/dist/{cli/menu/settings → app/kernel}/schema-node.js +0 -0
@@ -120,6 +120,14 @@
120
120
  "sandbox": {
121
121
  "type": "object",
122
122
  "properties": {
123
+ "engine": {
124
+ "type": "string",
125
+ "enum": [
126
+ "windows-sandbox",
127
+ "hcs"
128
+ ],
129
+ "description": "(alpha) What runs the sandbox. \"windows-sandbox\" = Windows Sandbox (the default: desktop, Windows Terminal, GPU, clipboard, audio, printers). \"hcs\" = a headless Hyper-V isolated Server Core container for agents (no desktop, GPU or clipboard); it needs Windows features and an image on this PC (sandbox engine check hcs lists what is missing), and starting it is not enabled yet in this alpha. sandbox engine shows what each engine can do. Yours only: a project file (.sandbox-config.json) cannot set it."
130
+ },
123
131
  "memoryMb": {
124
132
  "anyOf": [
125
133
  {
@@ -170,11 +178,33 @@
170
178
  "type": "integer",
171
179
  "minimum": 0,
172
180
  "maximum": 9007199254740991,
173
- "description": "RAM always left for this PC when memoryMb is \"auto\"."
181
+ "description": "Memory always left for this PC when memoryMb is \"auto\": the sandbox gets at most (free RAM, and RAM plus paging file still unused) minus this."
182
+ },
183
+ "agentMemoryHeadroomMb": {
184
+ "anyOf": [
185
+ {
186
+ "type": "string",
187
+ "const": "auto"
188
+ },
189
+ {
190
+ "type": "string",
191
+ "const": "none"
192
+ },
193
+ {
194
+ "type": "integer",
195
+ "minimum": 0,
196
+ "maximum": 9007199254740991
197
+ }
198
+ ],
199
+ "description": "Memory kept out of the agents reach inside the sandbox, in MB: everything the agents start (their builds, tests, tools) together may use at most the sandbox memory minus this; a runaway parallel build then gets out-of-memory errors in its own session instead of freezing or crashing the whole sandbox. \"auto\" = the larger of 2048 MB and 10 % of the sandbox memory; \"none\" = no limit. Yours only: a project file cannot change it."
200
+ },
201
+ "pressureResponse": {
202
+ "type": "boolean",
203
+ "description": "When the sandbox (or this PC) runs low on memory, slow the heaviest build programs down (lower priority) and, if that is not enough, pause the biggest compiler for a few seconds at a time, so heavy parallel builds slow down instead of closing the sandbox. Never touches the agents themselves. Yours only: a project file cannot change it."
174
204
  },
175
205
  "vGpu": {
176
206
  "type": "boolean",
177
- "description": "Virtual GPU. Off by default: Microsoft notes it widens the sandbox attack surface."
207
+ "description": "Virtual GPU. Off by default: Microsoft notes it widens the sandbox attack surface. The sandbox then uses this PC's graphics card, and with some graphics drivers heavy use can freeze the whole PC: turn it on only when a program in the sandbox needs the GPU (the mesa toolchain gives software OpenGL without it)."
178
208
  },
179
209
  "networking": {
180
210
  "type": "boolean",
@@ -182,7 +212,7 @@
182
212
  },
183
213
  "clipboard": {
184
214
  "type": "boolean",
185
- "description": "Shared clipboard between this PC and the sandbox."
215
+ "description": "Shared clipboard between this PC and the sandbox. Also lets an agent's copy (in sandbox attach) reach this PC's clipboard."
186
216
  },
187
217
  "audioInput": {
188
218
  "type": "boolean",
@@ -242,6 +272,20 @@
242
272
  "type": "boolean",
243
273
  "description": "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."
244
274
  },
275
+ "contained": {
276
+ "type": "string",
277
+ "enum": [
278
+ "off",
279
+ "vhdx"
280
+ ],
281
+ "description": "(beta) Keep the sandbox tools, state and logs inside one disk image file (vhdx) instead of loose folders, so scanning programs on this PC see one file. Not yet tried on a real PC. Turn it on with sandbox storage contained on (it moves your files and asks first); Windows asks for permission to mount the image when a sandbox starts. \"off\" = loose folders, as always. Yours only: a project file (.sandbox-config.json) cannot set it."
282
+ },
283
+ "containedMaxGb": {
284
+ "type": "integer",
285
+ "minimum": 8,
286
+ "maximum": 4096,
287
+ "description": "(beta) Largest size, in GB, the disk image of storage.contained may grow to."
288
+ },
245
289
  "warnDataGb": {
246
290
  "type": "number",
247
291
  "minimum": 0,
@@ -318,15 +362,16 @@
318
362
  "properties": {
319
363
  "enabled": {
320
364
  "type": "boolean",
321
- "description": "Send the sandbox's traffic through a VPN. Only the sandbox: your PC's own connection is untouched. Needs a saved login first (sandbox vpn login). The agent in the sandbox can read that login and can turn the tunnel off (it is the administrator there)."
365
+ "description": "(Alpha: not yet tried on a real PC) Send the sandbox's traffic through a VPN. Only the sandbox: your PC's own connection is untouched. Needs a saved login first (sandbox vpn login). The agent in the sandbox can read that login and can turn the tunnel off (it is the administrator there)."
322
366
  },
323
367
  "provider": {
324
368
  "type": "string",
325
369
  "enum": [
326
370
  "nordvpn",
327
- "openvpn-file"
371
+ "openvpn-file",
372
+ "wireguard-file"
328
373
  ],
329
- "description": "nordvpn: a recommended NordVPN server is picked at every launch. openvpn-file: your own .ovpn file (configFile)."
374
+ "description": "nordvpn: a recommended NordVPN server is picked at every launch. openvpn-file: your own .ovpn file (configFile). wireguard-file: your own WireGuard .conf (configFile), e.g. from your company."
330
375
  },
331
376
  "protocol": {
332
377
  "type": "string",
@@ -343,7 +388,7 @@
343
388
  },
344
389
  "configFile": {
345
390
  "type": "string",
346
- "description": "openvpn-file: the .ovpn file on this PC (its certificates inside it). Files that run programs (script-security, up, down, plugin ...) are refused. A project's file can never set this."
391
+ "description": "openvpn-file / wireguard-file: the .ovpn or .conf file on this PC (an .ovpn has its certificates inside it). Files that run programs (script-security, up, down, plugin, PostUp ...) are refused. A WireGuard file holds your private key: it is read when a sandbox starts and handed over in a one-shot file. A project's file can never set this."
347
392
  },
348
393
  "killSwitch": {
349
394
  "type": "boolean",
@@ -1191,13 +1236,17 @@
1191
1236
  "properties": {
1192
1237
  "enabled": {
1193
1238
  "type": "boolean",
1194
- "description": "(Beta) Allow the web UI: your sandbox sessions in a browser on this PC. Off by default, and nothing starts it by itself yet: sandbox web start works either way and runs it until sandbox web stop (or a restart of the PC)."
1239
+ "description": "(Beta) The web UI: your sandbox sessions in a browser on this PC (http://127.0.0.1:<port>, this PC only). On: every sandbox start also starts it in the background (it keeps running until sandbox web stop or a restart of the PC). Off: only sandbox web start runs it. Open it signed in with sandbox web open."
1195
1240
  },
1196
1241
  "port": {
1197
1242
  "type": "integer",
1198
1243
  "minimum": 1024,
1199
1244
  "maximum": 65535,
1200
1245
  "description": "Port of the web UI on 127.0.0.1 (this PC only). Pick another when it is taken."
1246
+ },
1247
+ "openOnLaunch": {
1248
+ "type": "boolean",
1249
+ "description": "(Beta) With the web UI on: open it in your browser, already signed in, every time a sandbox starts."
1201
1250
  }
1202
1251
  },
1203
1252
  "additionalProperties": false
@@ -1576,6 +1625,15 @@
1576
1625
  "pattern": "^(?!.*(^|[\\\\/])\\.\\.([\\\\/]|$))[A-Za-z0-9._ -]+([\\\\/][A-Za-z0-9._ -]+)*$"
1577
1626
  }
1578
1627
  },
1628
+ "bootReset": {
1629
+ "description": "Files and folders below the agent's own state folder (state\\<agent>) that only work on the machine that wrote them (keys sealed with Windows DPAPI, local accounts it created). Every sandbox is a new machine, so they are deleted at each boot and the agent sets them up again.",
1630
+ "maxItems": 32,
1631
+ "type": "array",
1632
+ "items": {
1633
+ "type": "string",
1634
+ "pattern": "^(?!.*(^|[\\\\/])\\.\\.([\\\\/]|$))[A-Za-z0-9._ -]+([\\\\/][A-Za-z0-9._ -]+)*$"
1635
+ }
1636
+ },
1579
1637
  "resumeArguments": {
1580
1638
  "description": "Arguments used when the agent is restarted in place (e.g. after an account switch) so it resumes the conversation.",
1581
1639
  "type": "array",
@@ -123,11 +123,11 @@
123
123
  "type": "integer",
124
124
  "minimum": 0,
125
125
  "maximum": 9007199254740991,
126
- "description": "RAM always left for this PC when memoryMb is \"auto\"."
126
+ "description": "Memory always left for this PC when memoryMb is \"auto\": the sandbox gets at most (free RAM, and RAM plus paging file still unused) minus this."
127
127
  },
128
128
  "vGpu": {
129
129
  "type": "boolean",
130
- "description": "Virtual GPU. Off by default: Microsoft notes it widens the sandbox attack surface."
130
+ "description": "Virtual GPU. Off by default: Microsoft notes it widens the sandbox attack surface. The sandbox then uses this PC's graphics card, and with some graphics drivers heavy use can freeze the whole PC: turn it on only when a program in the sandbox needs the GPU (the mesa toolchain gives software OpenGL without it)."
131
131
  },
132
132
  "networking": {
133
133
  "type": "boolean",
@@ -135,7 +135,7 @@
135
135
  },
136
136
  "clipboard": {
137
137
  "type": "boolean",
138
- "description": "Shared clipboard between this PC and the sandbox."
138
+ "description": "Shared clipboard between this PC and the sandbox. Also lets an agent's copy (in sandbox attach) reach this PC's clipboard."
139
139
  },
140
140
  "audioInput": {
141
141
  "type": "boolean",
@@ -1,4 +0,0 @@
1
- import { type Context } from '../context.js';
2
- /** Restarts this folder's project's sessions (--all: every session). */
3
- export declare function restart(ctx: Context): Promise<number>;
4
- export declare function stop(asked: Context): Promise<number>;
@@ -1,66 +0,0 @@
1
- import path from 'node:path';
2
- import { askYesNo } from '../../../core/prompt.js';
3
- import { fail, safeText } from '../../../core/util/index.js';
4
- import { SandboxChannel } from '../../../host/channel/index.js';
5
- import { runningOwner } from '../../../host/sharing/index.js';
6
- import { useSharedSandbox } from '../shared-use.js';
7
- import { requireOnPc, requireRunning } from '../context.js';
8
- import { working, c } from '../../output/index.js';
9
- import { SandboxService, SessionsService } from '../../services/index.js';
10
- /** Restarts this folder's project's sessions (--all: every session). */
11
- export async function restart(ctx) {
12
- requireOnPc('restart');
13
- requireRunning();
14
- await useSharedSandbox(ctx, { kind: 'owner-only', what: 'restart the agents' });
15
- const service = new SessionsService(ctx);
16
- const scope = service.restartScope(Boolean(ctx.options.all));
17
- if (scope.notAProject)
18
- console.log(c.dim(scope.folder + ' is not a project of the running sandbox: restarting every session.'));
19
- console.log(safeText(await working('Restarting the agents' + (scope.guest ? ' of ' + scope.projectName : ''), () => service.restart(ctx.options.harness ?? null, scope.guest))));
20
- return 0;
21
- }
22
- /**
23
- * Stopping ends every project's sessions: other projects' sessions need a yes (or --yes). A script must never end them
24
- * by accident, so without a terminal to ask in it fails.
25
- */
26
- async function othersMayEnd(ctx, others) {
27
- if (!others.length || ctx.options.yes)
28
- return true;
29
- const interactive = process.stdin.isTTY && process.stdout.isTTY;
30
- if (!interactive)
31
- fail(others.length + ' of these sessions belong to other projects, so the sandbox was not stopped.', 'Stop it anyway with: sandbox stop --yes');
32
- return askYesNo(others.length + ' of them belong to other projects. Stop the whole sandbox?');
33
- }
34
- export async function stop(asked) {
35
- requireOnPc('stop');
36
- if (!new SandboxService(asked).isRunning()) {
37
- console.log('No Windows Sandbox is running.');
38
- return 0;
39
- }
40
- // Another user's sandbox: only when shared, and only after typing their name (--yes in scripts).
41
- let ctx = asked;
42
- if (runningOwner().kind !== 'mine') {
43
- ctx = await useSharedSandbox(asked, (shared) => ({
44
- kind: 'stop',
45
- sessions: new SandboxChannel(shared.dataPath).currentSessions().length,
46
- }));
47
- }
48
- const service = new SandboxService(ctx);
49
- // Stopping ends every project's sessions, not just this folder's: say which, and ask when others would end too.
50
- const { sandbox, running, others } = service.stopPlan();
51
- if (running.length)
52
- console.log('Stopping ends ' +
53
- running.length +
54
- ' session(s): ' +
55
- running
56
- .map((s) => safeText(s.harness) + ' in ' + safeText(s.project ?? path.win32.basename(s.cwd)))
57
- .join(', ') +
58
- '.');
59
- if (!(await othersMayEnd(ctx, others))) {
60
- console.log('Nothing changed.');
61
- return 1;
62
- }
63
- await working('Asking the sandbox to shut down', () => service.shutdown(sandbox));
64
- console.log('Sandbox is shutting down; history and claude-mem sync back when it closes.');
65
- return 0;
66
- }
@@ -1,2 +0,0 @@
1
- import { type Context } from '../context.js';
2
- export declare function sessions(asked: Context): Promise<number>;
@@ -1,48 +0,0 @@
1
- import _ from 'lodash';
2
- import { safeText } from '../../../core/util/index.js';
3
- import { printJson, table, ago, c, shortenMiddle, termWidth } from '../../output/index.js';
4
- import { SessionsService, viewerText } from '../../services/index.js';
5
- import { lookAtSandbox } from '../shared-use.js';
6
- export async function sessions(asked) {
7
- // Another user's sandbox: shared, its sessions are listed from their folders; not shared, only whose it is.
8
- const view = lookAtSandbox(asked);
9
- const ctx = view.ctx;
10
- if (view.limited) {
11
- if (!printJson(ctx, []))
12
- console.log(view.line);
13
- return 0;
14
- }
15
- if (view.line && !ctx.options.json)
16
- console.log(c.bold(view.line));
17
- const service = new SessionsService(ctx);
18
- const list = await service.list();
19
- if (printJson(ctx, list.map((s) => _.omit(s, 'attach'))))
20
- return 0;
21
- if (list.length === 0) {
22
- console.log('No sessions. Start one with: sandbox claude');
23
- return 0;
24
- }
25
- // Harness, cwd and times are written by the sandbox.
26
- const wide = ctx.options.wide;
27
- const folderWidth = Math.max(16, termWidth() - 80);
28
- table([
29
- ['', 'ID', 'AGENT', 'PROJECT', 'STATE', 'ATTACHED', ...(wide ? ['FOLDER'] : []), 'STARTED'],
30
- ...service
31
- .ordered(list)
32
- .map((s) => [
33
- s.here ? '*' : '',
34
- s.id,
35
- safeText(s.harness),
36
- safeText(s.projectName ?? '-'),
37
- s.phase + (s.exitCode !== undefined ? ' (' + s.exitCode + ')' : ''),
38
- viewerText(s.viewers),
39
- ...(wide ? [shortenMiddle(safeText(s.cwd), folderWidth)] : []),
40
- ago(s.startedAt),
41
- ]),
42
- ]);
43
- if (list.some((s) => s.here))
44
- console.log(c.dim('* = the project of this folder'));
45
- if (!wide)
46
- console.log(c.dim('Folders: sandbox sessions --wide'));
47
- return 0;
48
- }
@@ -1,4 +0,0 @@
1
- import type { Context } from '../context.js';
2
- /** "pong (2 session(s) running)" from the helper in the sandbox, in plain words. */
3
- export declare function helperText(answer: string): string;
4
- export declare function status(asked: Context): Promise<number>;
@@ -1,114 +0,0 @@
1
- import { safeText } from '../../../core/util/index.js';
2
- import { printJson, table, ago, c, shortenMiddle, termWidth } from '../../output/index.js';
3
- import { SandboxService } from '../../services/index.js';
4
- import { lookAtSandbox } from '../shared-use.js';
5
- const MECHANISM_TEXT = {
6
- launch: 'started from here',
7
- root: 'in a project root',
8
- boot: 'mapped at start',
9
- };
10
- function mechanismText(mechanism) {
11
- return mechanism in MECHANISM_TEXT ? MECHANISM_TEXT[mechanism] : 'wsb share';
12
- }
13
- function printProject(p) {
14
- console.log((p.here ? '* ' : ' ') +
15
- c.bold(p.name) +
16
- ' ' +
17
- p.host +
18
- ' -> ' +
19
- p.guest +
20
- c.dim(' (' + mechanismText(p.mechanism) + ')'));
21
- console.log(' setup: ' +
22
- p.setup.phase +
23
- (p.setup.phase === 'ready' ? '' : ' - ' + shortenMiddle(p.setup.message, termWidth() - 20)));
24
- if (p.databases.length)
25
- console.log(' databases: ' + p.databases.map((d) => d.database + ' :' + d.port + ' ' + d.state).join(', '));
26
- for (const s of p.sessions)
27
- console.log(' session ' + s.id + ' ' + s.harness + ' ' + s.viewers + ' ' + ago(s.started));
28
- for (const f of p.repoGuard)
29
- console.log(' ' + c.yellow('guard: ' + f));
30
- }
31
- /** "pong (2 session(s) running)" from the helper in the sandbox, in plain words. */
32
- export function helperText(answer) {
33
- const sessions = /^pong \((\d+) session/.exec(answer);
34
- if (!sessions)
35
- return answer === '-' ? '-' : safeText(answer);
36
- return 'responding, ' + sessions[1] + (sessions[1] === '1' ? ' session' : ' sessions') + ' running';
37
- }
38
- export async function status(asked) {
39
- // Another user's sandbox: shared, it is shown from their folders; not shared, only whose it is.
40
- const view = lookAtSandbox(asked);
41
- const ctx = view.ctx;
42
- if (view.limited) {
43
- const owner = view.owner;
44
- const user = owner?.kind === 'other' ? owner.user : null;
45
- if (!printJson(ctx, { sandbox: { running: true, shared: false, startedBy: user } }))
46
- console.log(view.line);
47
- return 0;
48
- }
49
- const report = await new SandboxService(ctx).status();
50
- const { startedAt, ...state } = report.sandbox;
51
- const info = {
52
- // Same keys and order as the service's state, with the start time shown as an uptime.
53
- sandbox: {
54
- ...(ctx.borrowed ? { startedBy: ctx.borrowed.user, shared: true } : {}),
55
- running: state.running,
56
- phase: state.phase,
57
- message: state.message,
58
- headless: state.headless,
59
- uptime: state.running && startedAt ? ago(startedAt).replace(' ago', '') : null,
60
- daemon: state.daemon,
61
- account: state.account,
62
- syncWatcher: state.syncWatcher,
63
- },
64
- here: report.here,
65
- roots: report.roots,
66
- projects: report.projects,
67
- otherSessions: report.otherSessions,
68
- repoGuard: report.repoGuard,
69
- };
70
- if (printJson(ctx, info))
71
- return 0;
72
- const sb = info.sandbox;
73
- if (view.line)
74
- console.log(c.bold(view.line) + c.dim('. Its window is on their desktop; use its agents here.'));
75
- table([
76
- ...(ctx.borrowed ? [['Started by', safeText(ctx.borrowed.user)]] : []),
77
- ['Running', sb.running ? 'yes' : 'no'],
78
- ...(sb.running
79
- ? [
80
- ['Phase', safeText(sb.phase ?? '-')],
81
- ['Message', safeText(sb.message ?? '-')],
82
- ['Window', sb.headless ? 'hidden (sandbox show opens it)' : 'shown'],
83
- ['Uptime', sb.uptime ?? '-'],
84
- ['Helper', helperText(sb.daemon)],
85
- ]
86
- : []),
87
- ['Account', sb.account ? safeText(sb.account) : 'none selected (sandbox account use)'],
88
- ['Background sync', sb.syncWatcher ? 'on' : 'off'],
89
- ]);
90
- if (!state.running)
91
- return 0;
92
- console.log('\n' + c.bold('Projects'));
93
- for (const p of info.projects)
94
- printProject(p);
95
- for (const r of info.roots)
96
- console.log(' root ' + r.host + ' -> ' + r.guest + c.dim(' (every project in it opens without a restart)'));
97
- console.log(c.dim(info.projects.some((p) => p.here)
98
- ? '* = the project of this folder'
99
- : info.here.folder + ' is not in this sandbox (start it here: sandbox claude)'));
100
- for (const s of info.otherSessions)
101
- console.log(' session ' + s.id + ' ' + s.harness + ' ' + s.cwd);
102
- const findings = info.repoGuard.findings;
103
- console.log('\n' +
104
- c.bold('Repo guard') +
105
- ' ' +
106
- info.repoGuard.guarded +
107
- ' folder(s) guarded; ' +
108
- (findings.length
109
- ? c.yellow(findings.length + ' change(s) neutralised:')
110
- : 'nothing from the sandbox needed neutralising'));
111
- for (const f of findings.slice(-10))
112
- console.log(' ' + c.yellow(safeText(f)));
113
- return 0;
114
- }
@@ -1,3 +0,0 @@
1
- import { type Context } from '../context.js';
2
- export declare function show(ctx: Context): Promise<number>;
3
- export declare function hide(ctx: Context): Promise<number>;
@@ -1,18 +0,0 @@
1
- import { requireOnPc, requireRunning } from '../context.js';
2
- import { SandboxService } from '../../services/index.js';
3
- import { useSharedSandbox } from '../shared-use.js';
4
- export async function show(ctx) {
5
- requireOnPc('show');
6
- requireRunning();
7
- await useSharedSandbox(ctx, { kind: 'owner-only', what: 'show the window', window: true });
8
- new SandboxService(ctx).showWindow();
9
- return 0;
10
- }
11
- export async function hide(ctx) {
12
- requireOnPc('hide');
13
- requireRunning();
14
- await useSharedSandbox(ctx, { kind: 'owner-only', what: 'hide the window', window: true });
15
- await new SandboxService(ctx).hideWindow();
16
- console.log('Sandbox window hidden. Bring it back with: sbx-show');
17
- return 0;
18
- }
@@ -1,44 +0,0 @@
1
- /** Top-level settings whose list entries are folders or files, and the single settings that are one. */
2
- const KINDS = {
3
- 'storage.root': 'dir',
4
- 'projects.roots': 'dir',
5
- 'projects.exclude': 'dir',
6
- 'projects.declinedRoots': 'dir',
7
- 'claudeProfile.hostDir': 'dir',
8
- 'claudeProfile.globalStateFile': 'file',
9
- scripts: 'file',
10
- };
11
- /** The kind of path a setting holds (its key without list positions), or undefined when it is not a path. */
12
- export function pathKindOf(key) {
13
- const id = key.join('.');
14
- const last = key[key.length - 1] ?? '';
15
- if (KINDS[id])
16
- return KINDS[id];
17
- if (key[0] === 'mappings' && last === 'host')
18
- return 'dir';
19
- if (last === 'hostDir')
20
- return 'dir';
21
- if (/(Dir|Folder)$/.test(last))
22
- return 'dir';
23
- if (/File$/.test(last))
24
- return 'file';
25
- return undefined;
26
- }
27
- /** Words that are fine instead of a path ("auto"), read from the setting's description. */
28
- export function pathLiterals(node) {
29
- return /"auto"/.test(node.description ?? '') ? ['auto'] : [];
30
- }
31
- /** Picks a folder or file in the path picker; typing a path (or an allowed word) still works. */
32
- export function askPath(app, o) {
33
- return app.pickPath({
34
- path: o.path,
35
- title: o.title,
36
- about: o.about,
37
- initial: o.initial,
38
- files: o.kind === 'file',
39
- use: o.kind === 'file' ? 'use this file' : 'use this folder',
40
- literals: o.literals,
41
- relative: true,
42
- validate: o.validate,
43
- });
44
- }