windows-development-sandbox 1.28.0 → 1.29.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 (92) hide show
  1. package/README.md +5 -4
  2. package/dist/app/features/sandbox/sandbox.run.js +1 -1
  3. package/dist/bin/{chunk-UZ5S3EMB.js → chunk-O4EL32TM.js} +1 -1
  4. package/dist/bin/{chunk-CB44HTTN.js → chunk-QYRRWGFY.js} +1442 -1280
  5. package/dist/bin/sandbox.js +10772 -3
  6. package/dist/cli/commands/launch/launch.js +1 -1
  7. package/dist/cli/commands/launch/running.js +2 -2
  8. package/dist/cli/index.js +1 -1
  9. package/dist/cli/menu/pages/agents-page.js +1 -1
  10. package/dist/cli/services/sandbox-service.js +1 -1
  11. package/dist/core/schema/sandbox.js +1 -1
  12. package/dist/guest/apps/app-installer.js +1 -1
  13. package/dist/guest/apps/store-check.d.ts +2 -0
  14. package/dist/guest/apps/store-check.js +3 -1
  15. package/dist/guest/boot/guide-lines.d.ts +2 -0
  16. package/dist/guest/boot/guide-lines.js +7 -0
  17. package/dist/guest/boot/guide.js +2 -1
  18. package/dist/guest/toolchains/native/unreal.js +3 -22
  19. package/dist/host/accounts/deliver.js +16 -2
  20. package/dist/host/apps/store-package.d.ts +2 -0
  21. package/dist/host/apps/store-package.js +16 -15
  22. package/dist/host/channel/attach.js +1 -1
  23. package/dist/host/channel/channel.js +3 -3
  24. package/dist/host/guard/commands.js +1 -0
  25. package/dist/host/health/path-copies.d.ts +1 -1
  26. package/dist/host/health/path-copies.js +2 -2
  27. package/dist/host/install/index.d.ts +1 -1
  28. package/dist/host/install/index.js +1 -1
  29. package/dist/host/install/shims.d.ts +8 -1
  30. package/dist/host/install/shims.js +39 -1
  31. package/dist/host/launch/generate.js +4 -0
  32. package/dist/host/launch/index.d.ts +1 -0
  33. package/dist/host/launch/index.js +1 -0
  34. package/dist/host/launch/pc-logs.d.ts +6 -0
  35. package/dist/host/launch/pc-logs.js +129 -0
  36. package/dist/host/sandbox/platform.js +1 -1
  37. package/dist/host/sandbox/window.js +1 -1
  38. package/dist/runtime/agent.js +1 -1
  39. package/dist/runtime/daemon.js +72 -90
  40. package/dist/runtime/db.js +1 -1
  41. package/dist/runtime/main.js +35 -57
  42. package/dist/runtime/netproxy.js +1 -1
  43. package/dist/runtime/tool.js +1 -1
  44. package/dist/runtime/view.js +1 -1
  45. package/dist/selftest/cli.test.js +5 -5
  46. package/dist/selftest/config.test.js +1 -1
  47. package/dist/selftest/credentials.test.js +1 -1
  48. package/dist/selftest/engine.test.js +1 -1
  49. package/dist/selftest/generate.test.js +66 -1
  50. package/dist/selftest/hcs.test.js +1 -1
  51. package/dist/selftest/health.test.js +21 -10
  52. package/dist/selftest/heavy-load.test.js +1 -5
  53. package/dist/selftest/host-sim.test.js +13 -14
  54. package/dist/selftest/install.test.js +6 -2
  55. package/dist/selftest/store-app.test.js +62 -4
  56. package/dist/selftest/support/web-preview.js +2 -2
  57. package/dist/shared/accounts/kinds.d.ts +5 -0
  58. package/dist/shared/accounts/kinds.js +8 -0
  59. package/dist/shared/apps/index.d.ts +1 -1
  60. package/dist/shared/apps/index.js +1 -1
  61. package/dist/shared/apps/selection.d.ts +1 -0
  62. package/dist/shared/apps/selection.js +4 -3
  63. package/dist/shared/apps/store-package.d.ts +13 -0
  64. package/dist/shared/apps/store-package.js +24 -0
  65. package/dist/shared/memory/index.d.ts +0 -1
  66. package/dist/shared/memory/index.js +0 -1
  67. package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
  68. package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
  69. package/native/csharp/HostTools/Window.cs +1 -1
  70. package/native/csharp/StorageHelper/AssemblyInfo.cs +3 -3
  71. package/native/scripts/get-store-package.ps1 +24 -13
  72. package/package.json +4 -14
  73. package/sandbox/scripts/install-store-package.ps1 +11 -4
  74. package/schemas/config.schema.json +1 -1
  75. package/schemas/sandbox-config.schema.json +1 -1
  76. package/dist/bin/agent-sandbox.d.ts +0 -2
  77. package/dist/bin/agent-sandbox.js +0 -9
  78. package/dist/bin/chunk-ZMZI3625.js +0 -10778
  79. package/dist/bin/claude-host.d.ts +0 -2
  80. package/dist/bin/claude-host.js +0 -11
  81. package/dist/bin/claude-sbx.d.ts +0 -2
  82. package/dist/bin/claude-sbx.js +0 -9
  83. package/dist/bin/codex-sbx.d.ts +0 -2
  84. package/dist/bin/codex-sbx.js +0 -9
  85. package/dist/bin/gemini-sbx.d.ts +0 -2
  86. package/dist/bin/gemini-sbx.js +0 -9
  87. package/dist/bin/sbx-hide.d.ts +0 -2
  88. package/dist/bin/sbx-hide.js +0 -9
  89. package/dist/bin/sbx-show.d.ts +0 -2
  90. package/dist/bin/sbx-show.js +0 -9
  91. package/dist/shared/memory/unreal-build.d.ts +0 -2
  92. package/dist/shared/memory/unreal-build.js +0 -21
@@ -1,7 +1,8 @@
1
1
  #Requires -Version 5.1
2
2
  # Fetches a Microsoft Store app's package files (the .msix and the frameworks it needs) into -OutDir with this PC's own
3
3
  # Store tooling: winget download --source msstore, which uses your own Windows / Microsoft Store access (the script
4
- # never holds or asks for an account token). Prints one line of JSON: { ok, message, files: [file names in OutDir] }.
4
+ # never holds or asks for an account token). Prints one line of JSON: { ok, message, files: [file names in OutDir],
5
+ # dependencies: [the names among them that are frameworks] }.
5
6
  # host/apps/store-package.ts hashes and checks the files; the sandbox installs them with Add-AppxPackage.
6
7
  param(
7
8
  [Parameter(Mandatory = $true)][string]$ProductId,
@@ -10,13 +11,13 @@ param(
10
11
  )
11
12
  $ErrorActionPreference = 'Stop'
12
13
 
13
- function Finish([bool]$ok, [string]$message, $files) {
14
- @{ ok = $ok; message = $message; files = @($files) } | ConvertTo-Json -Compress
14
+ function Finish([bool]$ok, [string]$message, $files, $dependencies) {
15
+ @{ ok = $ok; message = $message; files = @($files); dependencies = @($dependencies) } | ConvertTo-Json -Compress
15
16
  exit 0
16
17
  }
17
18
 
18
- if ($ProductId -notmatch '^[A-Z0-9]{12}$') { Finish $false 'That is not a Microsoft Store product id.' @() }
19
- if ($PackageName -notmatch '^[A-Za-z0-9.]{1,100}$') { Finish $false 'That is not a package name.' @() }
19
+ if ($ProductId -notmatch '^[A-Z0-9]{12}$') { Finish $false 'That is not a Microsoft Store product id.' @() @() }
20
+ if ($PackageName -notmatch '^[A-Za-z0-9.]{1,100}$') { Finish $false 'That is not a package name.' @() @() }
20
21
 
21
22
  $winget = $null
22
23
  $command = Get-Command -Name winget.exe -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
@@ -26,11 +27,13 @@ if (-not $winget) {
26
27
  if (Test-Path -LiteralPath $alias) { $winget = $alias }
27
28
  }
28
29
  if (-not $winget) {
29
- Finish $false 'winget is not on this PC. Install "App Installer" from the Microsoft Store, then launch again.' @()
30
+ Finish $false 'winget is not on this PC. Install "App Installer" from the Microsoft Store, then launch again.' @() @()
30
31
  }
31
32
 
32
33
  New-Item -ItemType Directory -Force -Path $OutDir | Out-Null
33
- $output = & $winget download --id $ProductId --source msstore --download-directory $OutDir `
34
+ # x64 only: the sandbox is 64-bit Windows. winget puts the app in -OutDir and its frameworks (VCLibs, WindowsAppRuntime,
35
+ # .NET runtime ...) in -OutDir\Dependencies; they are all needed, and installed first by the sandbox.
36
+ $output = & $winget download --id $ProductId --source msstore --architecture x64 --download-directory $OutDir `
34
37
  --accept-package-agreements --accept-source-agreements --disable-interactivity 2>&1 | Out-String
35
38
  $code = $LASTEXITCODE
36
39
 
@@ -44,15 +47,23 @@ if ($code -ne 0 -or $found.Count -eq 0) {
44
47
  if ($installed) {
45
48
  $extra = ' The app is installed on this PC (' + $installed.Version + '), but Windows does not let its signed package be exported from there.'
46
49
  }
47
- Finish $false ('winget could not download the package (exit ' + $code + ').' + $extra + ' ' + $tail) @()
50
+ Finish $false ('winget could not download the package (exit ' + $code + ').' + $extra + ' ' + $tail) @() @()
48
51
  }
49
52
 
50
- # Frameworks may come in a sub-folder: bring every package file up to -OutDir (host code reads them by name).
53
+ # Everything goes up to -OutDir (host code reads the files by name). A name with characters the sandbox's file check
54
+ # refuses (spaces, brackets) is changed to plain ones; the file itself is not touched.
55
+ $root = (Resolve-Path -LiteralPath $OutDir).Path
51
56
  $names = @()
57
+ $dependencies = @()
52
58
  foreach ($file in $found) {
53
- if ((Split-Path -Parent $file.FullName) -ne (Resolve-Path -LiteralPath $OutDir).Path) {
54
- Move-Item -LiteralPath $file.FullName -Destination (Join-Path $OutDir $file.Name) -Force
59
+ $isDependency = (Split-Path -Parent $file.FullName) -ne $root
60
+ $name = $file.Name -replace '[^A-Za-z0-9._~+-]', '_'
61
+ $target = Join-Path $root $name
62
+ if ($file.FullName -ne $target) {
63
+ if ($names -contains $name) { $name = ([guid]::NewGuid().ToString('N').Substring(0, 6)) + '_' + $name; $target = Join-Path $root $name }
64
+ Move-Item -LiteralPath $file.FullName -Destination $target -Force
55
65
  }
56
- $names += $file.Name
66
+ $names += $name
67
+ if ($isDependency) { $dependencies += $name }
57
68
  }
58
- Finish $true 'ok' $names
69
+ Finish $true 'ok' $names $dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windows-development-sandbox",
3
- "version": "1.28.0",
3
+ "version": "1.29.0",
4
4
  "description": "A disposable Windows Sandbox for development, with or without an AI agent (Claude Code, Codex, Gemini, opencode, ...): the folder you run it from is the workspace, toolchains and databases for your project install themselves, and nothing else on your PC is reachable.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -12,17 +12,7 @@
12
12
  },
13
13
  "bin": {
14
14
  "sandbox": "dist/bin/sandbox.js",
15
- "windows-development-sandbox": "dist/bin/sandbox.js",
16
- "agent-sandbox": "dist/bin/agent-sandbox.js",
17
- "claude-sbx": "dist/bin/claude-sbx.js",
18
- "claude-sandbox": "dist/bin/claude-sbx.js",
19
- "codex-sbx": "dist/bin/codex-sbx.js",
20
- "codex-sandbox": "dist/bin/codex-sbx.js",
21
- "gemini-sbx": "dist/bin/gemini-sbx.js",
22
- "gemini-sandbox": "dist/bin/gemini-sbx.js",
23
- "claude-host": "dist/bin/claude-host.js",
24
- "sbx-show": "dist/bin/sbx-show.js",
25
- "sbx-hide": "dist/bin/sbx-hide.js"
15
+ "windows-development-sandbox": "dist/bin/sandbox.js"
26
16
  },
27
17
  "exports": {
28
18
  ".": {
@@ -45,14 +35,14 @@
45
35
  "build": "tsc -p tsconfig.json && tsc -p web/tsconfig.json --noEmit && node scripts/bundle.mjs && node scripts/bundle-web.mjs && node scripts/schemas.mjs",
46
36
  "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
47
37
  "rebuild": "npm run clean && npm run build",
48
- "test": "npm run build && node dist/bin/agent-sandbox.js self-test",
38
+ "test": "npm run build && node dist/bin/sandbox.js self-test",
49
39
  "prepack": "npm run rebuild",
50
40
  "release:patch": "npm version patch && git push --follow-tags",
51
41
  "release:minor": "npm version minor && git push --follow-tags",
52
42
  "release:major": "npm version major && git push --follow-tags",
53
43
  "install:global": "node scripts/install-global.mjs",
54
44
  "publish:npm": "node scripts/publish-npm.mjs",
55
- "doctor": "node dist/bin/agent-sandbox.js doctor",
45
+ "doctor": "node dist/bin/sandbox.js doctor",
56
46
  "lint": "eslint src scripts web",
57
47
  "format": "prettier --write src scripts web",
58
48
  "format:check": "prettier --check src scripts web",
@@ -16,11 +16,18 @@ if ($list.dependencies) { $dependencies = @($list.dependencies | ForEach-Object
16
16
 
17
17
  $existing = Get-AppxPackage -Name $PackageName -ErrorAction SilentlyContinue | Select-Object -First 1
18
18
  if (-not $existing) {
19
- if ($dependencies.Count -gt 0) {
20
- Add-AppxPackage -Path $list.main -DependencyPath $dependencies
19
+ # The frameworks (VCLibs, WindowsAppRuntime ...) are handed over with the app: Windows installs the ones it lacks first.
20
+ try {
21
+ if ($dependencies.Count -gt 0) {
22
+ Add-AppxPackage -Path $list.main -DependencyPath $dependencies
23
+ }
24
+ else {
25
+ Add-AppxPackage -Path $list.main
26
+ }
21
27
  }
22
- else {
23
- Add-AppxPackage -Path $list.main
28
+ catch {
29
+ $names = ($dependencies | ForEach-Object { Split-Path -Leaf $_ }) -join ', '
30
+ throw ('Add-AppxPackage refused ' + (Split-Path -Leaf $list.main) + ' (with ' + $dependencies.Count + ' frameworks: ' + $names + '): ' + $_.Exception.Message)
24
31
  }
25
32
  $existing = Get-AppxPackage -Name $PackageName -ErrorAction Stop | Select-Object -First 1
26
33
  }
@@ -236,7 +236,7 @@
236
236
  },
237
237
  "headless": {
238
238
  "type": "boolean",
239
- "description": "Hide the sandbox window (sbx-show brings it back). A headless sandbox shuts down when its last session ends."
239
+ "description": "Hide the sandbox window (\"Show the window\" brings it back). A headless sandbox shuts down when its last session ends."
240
240
  },
241
241
  "keepAwake": {
242
242
  "type": "boolean",
@@ -137,7 +137,7 @@
137
137
  },
138
138
  "headless": {
139
139
  "type": "boolean",
140
- "description": "Hide the sandbox window (sbx-show brings it back). A headless sandbox shuts down when its last session ends."
140
+ "description": "Hide the sandbox window (\"Show the window\" brings it back). A headless sandbox shuts down when its last session ends."
141
141
  },
142
142
  "keepAwake": {
143
143
  "type": "boolean",
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
3
- import {
4
- run
5
- } from "./chunk-ZMZI3625.js";
6
- import "./chunk-CB44HTTN.js";
7
-
8
- // src/bin/agent-sandbox.ts
9
- run(process.argv.slice(2));