windows-development-sandbox 1.14.0 → 1.15.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 (90) hide show
  1. package/config.example.json +2 -1
  2. package/dist/app/features/defs.d.ts +1 -1
  3. package/dist/app/features/projects/projects.def.d.ts +1 -1
  4. package/dist/app/features/projects/projects.run.d.ts +1 -1
  5. package/dist/app/features/projects/projects.run.js +10 -2
  6. package/dist/app/features/sandbox/sandbox.def.js +3 -1
  7. package/dist/app/features/settings/categories.def.js +1 -0
  8. package/dist/bin/agent-sandbox.js +2 -2
  9. package/dist/bin/{chunk-BQ23GBLC.js → chunk-D7CM63BS.js} +1893 -1405
  10. package/dist/bin/{chunk-F7IMME5G.js → chunk-HTQT5SBY.js} +1 -1
  11. package/dist/bin/{chunk-LQHEUN2A.js → chunk-RQ4BWBYX.js} +1 -1
  12. package/dist/bin/claude-host.js +2 -2
  13. package/dist/bin/claude-sbx.js +2 -2
  14. package/dist/bin/codex-sbx.js +2 -2
  15. package/dist/bin/gemini-sbx.js +2 -2
  16. package/dist/bin/sandbox.js +2 -2
  17. package/dist/bin/sbx-hide.js +2 -2
  18. package/dist/bin/sbx-show.js +2 -2
  19. package/dist/cli/commands/projects/here.js +2 -0
  20. package/dist/cli/services/health-service.js +15 -3
  21. package/dist/cli/services/projects-service.d.ts +8 -3
  22. package/dist/cli/services/projects-service.js +21 -4
  23. package/dist/core/config/defaults.js +1 -0
  24. package/dist/core/schema/config.d.ts +4 -0
  25. package/dist/core/schema/projects.d.ts +4 -0
  26. package/dist/core/schema/projects.js +3 -0
  27. package/dist/guest/boot/boot.js +8 -2
  28. package/dist/guest/daemon/daemon.js +3 -0
  29. package/dist/guest/daemon/live-folders.d.ts +48 -0
  30. package/dist/guest/daemon/live-folders.js +245 -0
  31. package/dist/guest/daemon/live.d.ts +4 -0
  32. package/dist/guest/daemon/live.js +57 -0
  33. package/dist/guest/entries/daemon.js +4 -2
  34. package/dist/guest/runtime/csc.d.ts +1 -0
  35. package/dist/guest/runtime/csc.js +1 -0
  36. package/dist/guest/runtime/secrets.d.ts +5 -2
  37. package/dist/guest/runtime/secrets.js +12 -5
  38. package/dist/host/engines/hcs/live-folders.d.ts +117 -0
  39. package/dist/host/engines/hcs/live-folders.js +347 -0
  40. package/dist/host/engines/index.d.ts +1 -0
  41. package/dist/host/engines/index.js +1 -0
  42. package/dist/host/launch/generate.js +8 -1
  43. package/dist/host/projects/join.d.ts +4 -0
  44. package/dist/host/projects/join.js +11 -3
  45. package/dist/host/projects/mapper.d.ts +34 -5
  46. package/dist/host/projects/mapper.js +88 -20
  47. package/dist/host/projects/registry.d.ts +2 -0
  48. package/dist/host/projects/registry.js +1 -1
  49. package/dist/host/secrets/launch-secrets.js +2 -1
  50. package/dist/runtime/agent.js +14 -0
  51. package/dist/runtime/daemon.js +466 -132
  52. package/dist/runtime/db.js +14 -0
  53. package/dist/runtime/main.js +26 -3
  54. package/dist/runtime/netproxy.js +14 -0
  55. package/dist/runtime/view.js +14 -0
  56. package/dist/selftest/index.js +2 -0
  57. package/dist/selftest/layout.test.js +1 -0
  58. package/dist/selftest/live-folders.test.d.ts +2 -0
  59. package/dist/selftest/live-folders.test.js +588 -0
  60. package/dist/selftest/projects.test.js +7 -7
  61. package/dist/selftest/support/engine-golden.js +1 -0
  62. package/dist/selftest/support/fixtures.d.ts +1 -0
  63. package/dist/selftest/support/live.js +2 -0
  64. package/dist/shared/channel/index.d.ts +1 -0
  65. package/dist/shared/channel/index.js +1 -0
  66. package/dist/shared/channel/live.d.ts +53 -0
  67. package/dist/shared/channel/live.js +92 -0
  68. package/dist/shared/channel/run-dir.d.ts +5 -0
  69. package/dist/shared/channel/run-dir.js +11 -0
  70. package/dist/shared/channel/secrets.d.ts +1 -0
  71. package/dist/shared/channel/secrets.js +5 -0
  72. package/dist/shared/paths/projects.d.ts +6 -1
  73. package/dist/shared/paths/projects.js +21 -1
  74. package/dist/sync/watcher.js +9 -0
  75. package/dist/web/index.html +1 -1
  76. package/dist/web/{main-6XNBTJLT.js → main-7DJZ2M27.js} +1 -1
  77. package/native/csharp/HcsHost/AssemblyInfo.cs +4 -4
  78. package/native/csharp/HcsHost/FolderAccess.cs +361 -0
  79. package/native/csharp/HcsHost/Hcs.cs +31 -3
  80. package/native/csharp/HcsHost/Program.cs +54 -6
  81. package/native/csharp/HcsHost/Share.cs +64 -11
  82. package/native/csharp/HcsHost/WsbGuard.cs +130 -0
  83. package/native/csharp/HcsHost/WsbShare.cs +295 -0
  84. package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
  85. package/native/csharp/StorageHelper/AssemblyInfo.cs +3 -3
  86. package/native/scripts/contained-common.ps1 +4 -0
  87. package/native/scripts/hcs-live-share.ps1 +191 -0
  88. package/package.json +1 -1
  89. package/sandbox/csharp/BindMount.cs +120 -0
  90. package/schemas/config.schema.json +8 -0
@@ -26621,6 +26621,9 @@ var ProjectsSchema = external_exports.strictObject({
26621
26621
  ),
26622
26622
  wsbShare: external_exports.boolean().describe(
26623
26623
  "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."
26624
+ ),
26625
+ liveFolders: external_exports.enum(["off", "hcs"]).describe(
26626
+ 'ALPHA, UNTESTED ON A REAL PC: "hcs" adds a project folder to the running sandbox through the Host Compute Service where `wsb share` is missing (one administrator prompt per add or remove; always read-only in this alpha). If it fails, the sandbox may close: save your work first. Turn it on before the sandbox starts. "off" (default) offers a restart instead. The real-PC tests still to pass are in docs/design/hcs-live-folders.md ("Test plan").'
26624
26627
  )
26625
26628
  });
26626
26629
 
@@ -27218,6 +27221,9 @@ var RunDir = class {
27218
27221
  treesDir;
27219
27222
  /** One-shot secrets the host hands over (see secrets.ts). Next to run, not in it: shared-use users can change run. */
27220
27223
  secretsDir;
27224
+ /** Live folders (live.ts): signed host requests, and the daemon's replies. */
27225
+ liveDir;
27226
+ liveRepliesDir;
27221
27227
  constructor(dataDir2) {
27222
27228
  this.root = path5.join(dataDir2, "run");
27223
27229
  this.sandboxFile = path5.join(this.root, "sandbox.json");
@@ -27231,6 +27237,14 @@ var RunDir = class {
27231
27237
  this.auditDir = path5.join(this.root, "audit");
27232
27238
  this.treesDir = path5.join(this.root, "trees");
27233
27239
  this.secretsDir = path5.join(dataDir2, "secrets");
27240
+ this.liveDir = path5.join(this.root, "live");
27241
+ this.liveRepliesDir = path5.join(this.root, "live-replies");
27242
+ }
27243
+ liveFile(id) {
27244
+ return path5.join(this.liveDir, safeId(id) + ".json");
27245
+ }
27246
+ liveReplyFile(id) {
27247
+ return path5.join(this.liveRepliesDir, safeId(id) + ".json");
27234
27248
  }
27235
27249
  requestFile(id) {
27236
27250
  return path5.join(this.requestsDir, safeId(id) + ".json");
@@ -26750,6 +26750,9 @@ var ProjectsSchema = external_exports.strictObject({
26750
26750
  ),
26751
26751
  wsbShare: external_exports.boolean().describe(
26752
26752
  "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."
26753
+ ),
26754
+ liveFolders: external_exports.enum(["off", "hcs"]).describe(
26755
+ 'ALPHA, UNTESTED ON A REAL PC: "hcs" adds a project folder to the running sandbox through the Host Compute Service where `wsb share` is missing (one administrator prompt per add or remove; always read-only in this alpha). If it fails, the sandbox may close: save your work first. Turn it on before the sandbox starts. "off" (default) offers a restart instead. The real-PC tests still to pass are in docs/design/hcs-live-folders.md ("Test plan").'
26753
26756
  )
26754
26757
  });
26755
26758
 
@@ -27329,6 +27332,9 @@ var RunDir = class {
27329
27332
  treesDir;
27330
27333
  /** One-shot secrets the host hands over (see secrets.ts). Next to run, not in it: shared-use users can change run. */
27331
27334
  secretsDir;
27335
+ /** Live folders (live.ts): signed host requests, and the daemon's replies. */
27336
+ liveDir;
27337
+ liveRepliesDir;
27332
27338
  constructor(dataDir2) {
27333
27339
  this.root = path6.join(dataDir2, "run");
27334
27340
  this.sandboxFile = path6.join(this.root, "sandbox.json");
@@ -27342,6 +27348,14 @@ var RunDir = class {
27342
27348
  this.auditDir = path6.join(this.root, "audit");
27343
27349
  this.treesDir = path6.join(this.root, "trees");
27344
27350
  this.secretsDir = path6.join(dataDir2, "secrets");
27351
+ this.liveDir = path6.join(this.root, "live");
27352
+ this.liveRepliesDir = path6.join(this.root, "live-replies");
27353
+ }
27354
+ liveFile(id) {
27355
+ return path6.join(this.liveDir, safeId(id) + ".json");
27356
+ }
27357
+ liveReplyFile(id) {
27358
+ return path6.join(this.liveRepliesDir, safeId(id) + ".json");
27345
27359
  }
27346
27360
  requestFile(id) {
27347
27361
  return path6.join(this.requestsDir, safeId(id) + ".json");
@@ -29299,7 +29313,8 @@ var SOURCES = {
29299
29313
  cargoshim: "CargoShim.cs",
29300
29314
  linkgate: "LinkGate.cs",
29301
29315
  pathsync: "PathSync.cs",
29302
- memgov: "MemGov.cs"
29316
+ memgov: "MemGov.cs",
29317
+ bindmount: "BindMount.cs"
29303
29318
  };
29304
29319
  function sourceOf(name) {
29305
29320
  return path31.join(launchDir, "sandbox", "csharp", SOURCES[name]);
@@ -35748,7 +35763,9 @@ var SecretsFileSchema = external_exports.strictObject({
35748
35763
  /** The checked WireGuard config of vpn.provider wireguard-file (holds the private key). */
35749
35764
  wireguardConfig: external_exports.string().min(1).max(32 * 1024).optional(),
35750
35765
  /** The GitHub token you saved for sandboxes (github.shareToken), only with git access "full". */
35751
- githubToken: GithubTokenSchema.optional()
35766
+ githubToken: GithubTokenSchema.optional(),
35767
+ /** projects.liveFolders "hcs": this launch's key for signed live-folder requests (live.ts). */
35768
+ liveFoldersKey: external_exports.string().regex(/^[0-9a-f]{64}$/).optional()
35752
35769
  });
35753
35770
 
35754
35771
  // src/guest/runtime/secrets.ts
@@ -35809,7 +35826,13 @@ function startDaemon(env, secrets) {
35809
35826
  ...env,
35810
35827
  AGENT_LOG_PREFIX: "daemon",
35811
35828
  // The agent's environment (it may hold API keys): the daemon moves it into memory and removes this at once.
35812
- ...secrets.harnessEnvironment ? { [BOOT_SECRETS_VARIABLE]: JSON.stringify({ harnessEnvironment: secrets.harnessEnvironment }) } : {}
35829
+ // The live-folder key (projects.liveFolders "hcs") goes the same way into the daemon's own state.
35830
+ ...secrets.harnessEnvironment || secrets.liveFoldersKey ? {
35831
+ [BOOT_SECRETS_VARIABLE]: JSON.stringify({
35832
+ ...secrets.harnessEnvironment ? { harnessEnvironment: secrets.harnessEnvironment } : {},
35833
+ ...secrets.liveFoldersKey ? { liveFoldersKey: secrets.liveFoldersKey } : {}
35834
+ })
35835
+ } : {}
35813
35836
  }
35814
35837
  }).unref();
35815
35838
  }
@@ -26674,6 +26674,9 @@ var ProjectsSchema = external_exports.strictObject({
26674
26674
  ),
26675
26675
  wsbShare: external_exports.boolean().describe(
26676
26676
  "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."
26677
+ ),
26678
+ liveFolders: external_exports.enum(["off", "hcs"]).describe(
26679
+ 'ALPHA, UNTESTED ON A REAL PC: "hcs" adds a project folder to the running sandbox through the Host Compute Service where `wsb share` is missing (one administrator prompt per add or remove; always read-only in this alpha). If it fails, the sandbox may close: save your work first. Turn it on before the sandbox starts. "off" (default) offers a restart instead. The real-PC tests still to pass are in docs/design/hcs-live-folders.md ("Test plan").'
26677
26680
  )
26678
26681
  });
26679
26682
 
@@ -27209,6 +27212,9 @@ var RunDir = class {
27209
27212
  treesDir;
27210
27213
  /** One-shot secrets the host hands over (see secrets.ts). Next to run, not in it: shared-use users can change run. */
27211
27214
  secretsDir;
27215
+ /** Live folders (live.ts): signed host requests, and the daemon's replies. */
27216
+ liveDir;
27217
+ liveRepliesDir;
27212
27218
  constructor(dataDir2) {
27213
27219
  this.root = path3.join(dataDir2, "run");
27214
27220
  this.sandboxFile = path3.join(this.root, "sandbox.json");
@@ -27222,6 +27228,14 @@ var RunDir = class {
27222
27228
  this.auditDir = path3.join(this.root, "audit");
27223
27229
  this.treesDir = path3.join(this.root, "trees");
27224
27230
  this.secretsDir = path3.join(dataDir2, "secrets");
27231
+ this.liveDir = path3.join(this.root, "live");
27232
+ this.liveRepliesDir = path3.join(this.root, "live-replies");
27233
+ }
27234
+ liveFile(id) {
27235
+ return path3.join(this.liveDir, safeId(id) + ".json");
27236
+ }
27237
+ liveReplyFile(id) {
27238
+ return path3.join(this.liveRepliesDir, safeId(id) + ".json");
27225
27239
  }
27226
27240
  requestFile(id) {
27227
27241
  return path3.join(this.requestsDir, safeId(id) + ".json");
@@ -27249,6 +27249,9 @@ var ProjectsSchema = external_exports.strictObject({
27249
27249
  ),
27250
27250
  wsbShare: external_exports.boolean().describe(
27251
27251
  "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."
27252
+ ),
27253
+ liveFolders: external_exports.enum(["off", "hcs"]).describe(
27254
+ 'ALPHA, UNTESTED ON A REAL PC: "hcs" adds a project folder to the running sandbox through the Host Compute Service where `wsb share` is missing (one administrator prompt per add or remove; always read-only in this alpha). If it fails, the sandbox may close: save your work first. Turn it on before the sandbox starts. "off" (default) offers a restart instead. The real-PC tests still to pass are in docs/design/hcs-live-folders.md ("Test plan").'
27252
27255
  )
27253
27256
  });
27254
27257
 
@@ -27784,6 +27787,9 @@ var RunDir = class {
27784
27787
  treesDir;
27785
27788
  /** One-shot secrets the host hands over (see secrets.ts). Next to run, not in it: shared-use users can change run. */
27786
27789
  secretsDir;
27790
+ /** Live folders (live.ts): signed host requests, and the daemon's replies. */
27791
+ liveDir;
27792
+ liveRepliesDir;
27787
27793
  constructor(dataDir2) {
27788
27794
  this.root = path5.join(dataDir2, "run");
27789
27795
  this.sandboxFile = path5.join(this.root, "sandbox.json");
@@ -27797,6 +27803,14 @@ var RunDir = class {
27797
27803
  this.auditDir = path5.join(this.root, "audit");
27798
27804
  this.treesDir = path5.join(this.root, "trees");
27799
27805
  this.secretsDir = path5.join(dataDir2, "secrets");
27806
+ this.liveDir = path5.join(this.root, "live");
27807
+ this.liveRepliesDir = path5.join(this.root, "live-replies");
27808
+ }
27809
+ liveFile(id) {
27810
+ return path5.join(this.liveDir, safeId(id) + ".json");
27811
+ }
27812
+ liveReplyFile(id) {
27813
+ return path5.join(this.liveRepliesDir, safeId(id) + ".json");
27800
27814
  }
27801
27815
  requestFile(id) {
27802
27816
  return path5.join(this.requestsDir, safeId(id) + ".json");
@@ -36,6 +36,7 @@ import { engineSuite } from './engine.test.js';
36
36
  import { containedSuite } from './contained.test.js';
37
37
  import { storageHelperSuite } from './storage-helper.test.js';
38
38
  import { hcsSuite } from './hcs.test.js';
39
+ import { liveFoldersSuite } from './live-folders.test.js';
39
40
  import { gitAccessSuite } from './git-access.test.js';
40
41
  import { guestBootSuite } from './guest-boot.test.js';
41
42
  import { hostileInputSuite } from './hostile-input.test.js';
@@ -89,6 +90,7 @@ export const SUITES = [
89
90
  containedSuite,
90
91
  storageHelperSuite,
91
92
  hcsSuite,
93
+ liveFoldersSuite,
92
94
  guestBootSuite,
93
95
  mirrorSuite,
94
96
  projectsSuite,
@@ -24,6 +24,7 @@ const PURE_GUEST = [
24
24
  'guest/toolchains/tools/vscode-profile.js',
25
25
  'guest/governor/decide.js',
26
26
  'guest/governor/core.js',
27
+ 'guest/daemon/live-folders.js',
27
28
  ];
28
29
  const SIDE_EFFECTS = ['guest/runtime/session.js', 'guest/runtime/log.js'];
29
30
  const readModules = (dist) => {
@@ -0,0 +1,2 @@
1
+ import type { Suite } from './support/suite.js';
2
+ export declare const liveFoldersSuite: Suite;