windows-development-sandbox 1.18.3 → 1.20.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 (216) hide show
  1. package/README.md +1 -1
  2. package/config.example.json +9 -0
  3. package/dist/app/features/accounts/accounts.def.d.ts +4 -0
  4. package/dist/app/features/accounts/accounts.run.d.ts +1 -0
  5. package/dist/app/features/accounts/services.def.d.ts +3 -0
  6. package/dist/app/features/accounts/services.def.js +4 -2
  7. package/dist/app/features/accounts/services.run.d.ts +1 -0
  8. package/dist/app/features/accounts/services.run.js +3 -1
  9. package/dist/app/features/agent-commands/agent-commands.def.d.ts +37 -0
  10. package/dist/app/features/agent-commands/agent-commands.def.js +91 -0
  11. package/dist/app/features/agent-commands/agent-commands.run.d.ts +28 -0
  12. package/dist/app/features/agent-commands/agent-commands.run.js +35 -0
  13. package/dist/app/features/agent-commands/index.d.ts +2 -0
  14. package/dist/app/features/agent-commands/index.js +3 -0
  15. package/dist/app/features/agents/agents.def.d.ts +14 -1
  16. package/dist/app/features/agents/agents.def.js +61 -6
  17. package/dist/app/features/agents/agents.run.d.ts +1 -0
  18. package/dist/app/features/agents/agents.run.js +8 -1
  19. package/dist/app/features/agents/claude-env.def.d.ts +36 -0
  20. package/dist/app/features/agents/claude-env.def.js +305 -0
  21. package/dist/app/features/agents/env.def.d.ts +163 -0
  22. package/dist/app/features/agents/env.def.js +184 -0
  23. package/dist/app/features/agents/env.run.d.ts +43 -0
  24. package/dist/app/features/agents/env.run.js +86 -0
  25. package/dist/app/features/agents/index.d.ts +2 -0
  26. package/dist/app/features/agents/index.js +2 -0
  27. package/dist/app/features/defs.d.ts +150 -1
  28. package/dist/app/features/defs.js +11 -1
  29. package/dist/app/features/sandbox/sandbox.def.d.ts +22 -0
  30. package/dist/app/features/sandbox/sandbox.def.js +41 -14
  31. package/dist/app/features/sandbox/sandbox.run.d.ts +20 -0
  32. package/dist/app/features/sandbox/sandbox.run.js +41 -1
  33. package/dist/app/features/settings/categories.def.js +5 -2
  34. package/dist/app/features/settings/settings-rows.js +5 -1
  35. package/dist/app/features/settings/settings.run.d.ts +8 -0
  36. package/dist/app/features/settings/settings.run.js +9 -0
  37. package/dist/app/features/updates/updates.run.js +12 -2
  38. package/dist/app/features/vpn/vpn.def.d.ts +33 -0
  39. package/dist/app/features/vpn/vpn.def.js +30 -6
  40. package/dist/app/features/vpn/vpn.run.d.ts +11 -0
  41. package/dist/app/features/vpn/vpn.run.js +4 -1
  42. package/dist/app/kernel/rpc.d.ts +1 -1
  43. package/dist/app/registry.js +9 -2
  44. package/dist/bin/agent-sandbox.js +2 -2
  45. package/dist/bin/{chunk-M6XUQK53.js → chunk-2IMT7ZCT.js} +1 -1
  46. package/dist/bin/{chunk-3G53NNZP.js → chunk-DK4NTBUF.js} +69 -26
  47. package/dist/bin/{chunk-FQWYCF6L.js → chunk-Z2P5OGKL.js} +6427 -5259
  48. package/dist/bin/claude-host.js +2 -2
  49. package/dist/bin/claude-sbx.js +2 -2
  50. package/dist/bin/codex-sbx.js +2 -2
  51. package/dist/bin/gemini-sbx.js +2 -2
  52. package/dist/bin/sandbox.js +2 -2
  53. package/dist/bin/sbx-hide.js +2 -2
  54. package/dist/bin/sbx-show.js +2 -2
  55. package/dist/cli/commands/agent-commands.d.ts +0 -1
  56. package/dist/cli/commands/agent-commands.js +2 -32
  57. package/dist/cli/commands/index.d.ts +1 -1
  58. package/dist/cli/commands/index.js +1 -1
  59. package/dist/cli/commands/launch/launch.js +6 -3
  60. package/dist/cli/commands/launch/leftover-offer.d.ts +3 -0
  61. package/dist/cli/commands/launch/leftover-offer.js +26 -0
  62. package/dist/cli/commands/registry.js +3 -2
  63. package/dist/cli/commands/repair/checks/sandbox.js +29 -2
  64. package/dist/cli/manifest.d.ts +1 -1
  65. package/dist/cli/manifest.js +1 -1
  66. package/dist/cli/menu/menu.d.ts +1 -1
  67. package/dist/cli/menu/menu.js +3 -3
  68. package/dist/cli/menu/pages/agents-page.d.ts +7 -2
  69. package/dist/cli/menu/pages/agents-page.js +67 -11
  70. package/dist/cli/menu/pages/maintenance-page.js +1 -2
  71. package/dist/cli/menu/pages/settings-page.js +1 -0
  72. package/dist/cli/menu/views.js +2 -1
  73. package/dist/cli/services/agent-commands-service.d.ts +2 -0
  74. package/dist/cli/services/agent-commands-service.js +13 -7
  75. package/dist/cli/services/vpn-service.d.ts +5 -1
  76. package/dist/cli/services/vpn-service.js +6 -1
  77. package/dist/cli/tui/dialogs/text-screen.js +2 -1
  78. package/dist/cli/tui/terminal.js +3 -1
  79. package/dist/core/config/defaults.js +9 -0
  80. package/dist/core/detect/toolchains.js +9 -0
  81. package/dist/core/disk.d.ts +1 -5
  82. package/dist/core/disk.js +1 -16
  83. package/dist/core/schema/codex.d.ts +29 -0
  84. package/dist/core/schema/codex.js +24 -0
  85. package/dist/core/schema/config.d.ts +46 -14
  86. package/dist/core/schema/config.js +2 -0
  87. package/dist/core/schema/index.d.ts +1 -0
  88. package/dist/core/schema/index.js +1 -0
  89. package/dist/core/schema/toolchains.d.ts +4 -0
  90. package/dist/core/schema/toolchains.js +3 -0
  91. package/dist/core/types.d.ts +2 -0
  92. package/dist/guest/accounts/apply.d.ts +6 -6
  93. package/dist/guest/agents/agent-files.d.ts +26 -6
  94. package/dist/guest/agents/agent-files.js +84 -14
  95. package/dist/guest/agents/local-state.d.ts +5 -2
  96. package/dist/guest/agents/local-state.js +24 -10
  97. package/dist/guest/boot/boot.js +10 -5
  98. package/dist/guest/daemon/heartbeat.d.ts +7 -2
  99. package/dist/guest/daemon/heartbeat.js +34 -15
  100. package/dist/guest/daemon/idle-shutdown.js +2 -0
  101. package/dist/guest/daemon/sessions.js +2 -1
  102. package/dist/guest/entries/daemon.js +1 -1
  103. package/dist/guest/toolchains/installers.d.ts +6 -10
  104. package/dist/guest/toolchains/installers.js +4 -12
  105. package/dist/guest/toolchains/native/autosdk.d.ts +3 -0
  106. package/dist/guest/toolchains/native/autosdk.js +50 -0
  107. package/dist/guest/toolchains/native/unreal.js +3 -0
  108. package/dist/guest/toolchains/native/vcruntime.d.ts +0 -3
  109. package/dist/guest/toolchains/native/vcruntime.js +2 -5
  110. package/dist/guest/toolchains/native/visual-studio.d.ts +2 -2
  111. package/dist/guest/toolchains/native/visual-studio.js +100 -16
  112. package/dist/guest/toolchains/native/vs-request.d.ts +21 -0
  113. package/dist/guest/toolchains/native/vs-request.js +60 -1
  114. package/dist/guest/toolchains/not-yet.d.ts +1 -1
  115. package/dist/guest/toolchains/not-yet.js +3 -3
  116. package/dist/guest/toolchains/persisted.js +2 -7
  117. package/dist/guest/toolchains/plan.js +9 -4
  118. package/dist/guest/toolchains/signature.d.ts +5 -0
  119. package/dist/guest/toolchains/signature.js +22 -0
  120. package/dist/guest/vpn/tunnel.d.ts +3 -0
  121. package/dist/guest/vpn/tunnel.js +10 -12
  122. package/dist/guest/vpn/vpn.js +6 -1
  123. package/dist/host/accounts/leases.d.ts +3 -3
  124. package/dist/host/accounts/source.js +1 -1
  125. package/dist/host/agent-commands/commands.js +1 -1
  126. package/dist/host/agent-commands/forwarders.d.ts +14 -2
  127. package/dist/host/agent-commands/forwarders.js +31 -13
  128. package/dist/host/agent-commands/reconcile.d.ts +2 -1
  129. package/dist/host/agent-commands/reconcile.js +7 -8
  130. package/dist/host/agent-commands/user-path.d.ts +5 -0
  131. package/dist/host/agent-commands/user-path.js +13 -0
  132. package/dist/host/health/index.d.ts +1 -0
  133. package/dist/host/health/index.js +1 -0
  134. package/dist/host/health/leftovers.d.ts +3 -0
  135. package/dist/host/health/leftovers.js +40 -0
  136. package/dist/host/health/stale.d.ts +48 -0
  137. package/dist/host/health/stale.js +40 -0
  138. package/dist/host/launch/session-file.js +1 -0
  139. package/dist/host/life/crash-report.d.ts +1 -1
  140. package/dist/host/life/crash-report.js +5 -3
  141. package/dist/host/life/last-end.d.ts +7 -0
  142. package/dist/host/life/last-end.js +21 -0
  143. package/dist/host/life/life-record.d.ts +3 -0
  144. package/dist/host/life/life-record.js +2 -2
  145. package/dist/host/life/stop-events.d.ts +3 -1
  146. package/dist/host/life/stop-events.js +59 -0
  147. package/dist/host/life/stop-warning.js +3 -0
  148. package/dist/host/profile/accounts.js +2 -4
  149. package/dist/host/profile/claude-login.d.ts +3 -2
  150. package/dist/host/profile/claude-login.js +3 -13
  151. package/dist/host/sandbox/cleanup.d.ts +37 -0
  152. package/dist/host/sandbox/cleanup.js +82 -0
  153. package/dist/host/sandbox/index.d.ts +1 -0
  154. package/dist/host/sandbox/index.js +1 -0
  155. package/dist/host/sandbox/platform.js +1 -1
  156. package/dist/host/vpn/index.d.ts +2 -1
  157. package/dist/host/vpn/index.js +2 -1
  158. package/dist/host/vpn/last.d.ts +28 -0
  159. package/dist/host/vpn/last.js +43 -0
  160. package/dist/host/vpn/login.d.ts +3 -1
  161. package/dist/host/vpn/login.js +17 -3
  162. package/dist/runtime/agent.js +31 -1
  163. package/dist/runtime/daemon.js +1419 -1197
  164. package/dist/runtime/db.js +33 -1
  165. package/dist/runtime/main.js +1311 -1037
  166. package/dist/runtime/netproxy.js +25 -1
  167. package/dist/runtime/tool.js +241 -209
  168. package/dist/runtime/view.js +25 -1
  169. package/dist/selftest/agent-commands.test.js +45 -7
  170. package/dist/selftest/agent-paths.test.js +1 -12
  171. package/dist/selftest/agent-settings.test.d.ts +2 -0
  172. package/dist/selftest/agent-settings.test.js +94 -0
  173. package/dist/selftest/app.test.js +2 -1
  174. package/dist/selftest/cli.test.js +4 -0
  175. package/dist/selftest/heavy-load.test.js +119 -2
  176. package/dist/selftest/index.js +2 -0
  177. package/dist/selftest/menu.test.js +5 -3
  178. package/dist/selftest/pc-installs.test.js +5 -0
  179. package/dist/selftest/persisted-installs.test.js +69 -0
  180. package/dist/selftest/service-accounts.test.js +1 -1
  181. package/dist/selftest/support/engine-golden.js +1 -1
  182. package/dist/selftest/support/fixtures.d.ts +9 -0
  183. package/dist/selftest/vpn.test.js +51 -3
  184. package/dist/shared/accounts/anthropic.d.ts +5 -0
  185. package/dist/shared/accounts/anthropic.js +15 -0
  186. package/dist/shared/accounts/index.d.ts +1 -0
  187. package/dist/shared/accounts/index.js +1 -0
  188. package/dist/shared/channel/schema.d.ts +20 -0
  189. package/dist/shared/channel/schema.js +4 -1
  190. package/dist/shared/io/disk.d.ts +9 -0
  191. package/dist/shared/io/disk.js +19 -0
  192. package/dist/shared/io/index.d.ts +1 -0
  193. package/dist/shared/io/index.js +1 -0
  194. package/dist/shared/readiness.d.ts +9 -0
  195. package/dist/shared/readiness.js +11 -0
  196. package/dist/shared/signer.d.ts +24 -0
  197. package/dist/shared/signer.js +15 -0
  198. package/dist/shared/system.d.ts +1 -0
  199. package/dist/shared/system.js +1 -0
  200. package/dist/shared/vpn/failure.d.ts +10 -0
  201. package/dist/shared/vpn/failure.js +28 -0
  202. package/dist/sync/watcher.js +11 -4
  203. package/dist/web/index.html +1 -1
  204. package/dist/web/{main-6XYO5FZC.js → main-OUUQYNK4.js} +75 -74
  205. package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
  206. package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
  207. package/native/csharp/HostTools/Program.cs +19 -2
  208. package/native/csharp/HostTools/UserPath.cs +17 -0
  209. package/native/csharp/StorageHelper/AssemblyInfo.cs +3 -3
  210. package/native/scripts/edit-user-path.ps1 +6 -2
  211. package/native/scripts/stop-events.ps1 +7 -3
  212. package/package.json +1 -1
  213. package/sandbox/scripts/get-signature.ps1 +13 -0
  214. package/schemas/config.schema.json +64 -0
  215. package/schemas/sandbox-config.schema.json +8 -0
  216. package/sandbox/scripts/get-signer.ps1 +0 -8
@@ -1363,11 +1363,11 @@ var require_lodash = __commonJS({
1363
1363
  return isFunction(object2[key]);
1364
1364
  });
1365
1365
  }
1366
- function baseGet(object2, path16) {
1367
- path16 = castPath(path16, object2);
1368
- var index = 0, length = path16.length;
1366
+ function baseGet(object2, path17) {
1367
+ path17 = castPath(path17, object2);
1368
+ var index = 0, length = path17.length;
1369
1369
  while (object2 != null && index < length) {
1370
- object2 = object2[toKey(path16[index++])];
1370
+ object2 = object2[toKey(path17[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, path16, args2) {
1435
- path16 = castPath(path16, object2);
1436
- object2 = parent(object2, path16);
1437
- var func = object2 == null ? object2 : object2[toKey(last(path16))];
1434
+ function baseInvoke(object2, path17, args2) {
1435
+ path17 = castPath(path17, object2);
1436
+ object2 = parent(object2, path17);
1437
+ var func = object2 == null ? object2 : object2[toKey(last(path17))];
1438
1438
  return func == null ? undefined2 : apply(func, object2, args2);
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(path16, srcValue) {
1594
- if (isKey(path16) && isStrictComparable(srcValue)) {
1595
- return matchesStrictComparable(toKey(path16), srcValue);
1593
+ function baseMatchesProperty(path17, srcValue) {
1594
+ if (isKey(path17) && isStrictComparable(srcValue)) {
1595
+ return matchesStrictComparable(toKey(path17), srcValue);
1596
1596
  }
1597
1597
  return function(object2) {
1598
- var objValue = get(object2, path16);
1599
- return objValue === undefined2 && objValue === srcValue ? hasIn(object2, path16) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
1598
+ var objValue = get(object2, path17);
1599
+ return objValue === undefined2 && objValue === srcValue ? hasIn(object2, path17) : 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, path16) {
1697
- return hasIn(object2, path16);
1696
+ return basePickBy(object2, paths, function(value, path17) {
1697
+ return hasIn(object2, path17);
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 path16 = paths[index], value = baseGet(object2, path16);
1704
- if (predicate(value, path16)) {
1705
- baseSet(result2, castPath(path16, object2), value);
1703
+ var path17 = paths[index], value = baseGet(object2, path17);
1704
+ if (predicate(value, path17)) {
1705
+ baseSet(result2, castPath(path17, object2), value);
1706
1706
  }
1707
1707
  }
1708
1708
  return result2;
1709
1709
  }
1710
- function basePropertyDeep(path16) {
1710
+ function basePropertyDeep(path17) {
1711
1711
  return function(object2) {
1712
- return baseGet(object2, path16);
1712
+ return baseGet(object2, path17);
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, path16, value, customizer) {
1786
+ function baseSet(object2, path17, value, customizer) {
1787
1787
  if (!isObject2(object2)) {
1788
1788
  return object2;
1789
1789
  }
1790
- path16 = castPath(path16, object2);
1791
- var index = -1, length = path16.length, lastIndex = length - 1, nested = object2;
1790
+ path17 = castPath(path17, object2);
1791
+ var index = -1, length = path17.length, lastIndex = length - 1, nested = object2;
1792
1792
  while (nested != null && ++index < length) {
1793
- var key = toKey(path16[index]), newValue = value;
1793
+ var key = toKey(path17[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(path16[index + 1]) ? [] : {};
1801
+ newValue = isObject2(objValue) ? objValue : isIndex(path17[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, path16) {
1968
- path16 = castPath(path16, object2);
1969
- var index = -1, length = path16.length;
1967
+ function baseUnset(object2, path17) {
1968
+ path17 = castPath(path17, object2);
1969
+ var index = -1, length = path17.length;
1970
1970
  if (!length) {
1971
1971
  return true;
1972
1972
  }
1973
1973
  while (++index < length) {
1974
- var key = toKey(path16[index]);
1974
+ var key = toKey(path17[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, path16);
1983
- return obj == null || delete obj[toKey(last(path16))];
1982
+ var obj = parent(object2, path17);
1983
+ return obj == null || delete obj[toKey(last(path17))];
1984
1984
  }
1985
- function baseUpdate(object2, path16, updater, customizer) {
1986
- return baseSet(object2, path16, updater(baseGet(object2, path16)), customizer);
1985
+ function baseUpdate(object2, path17, updater, customizer) {
1986
+ return baseSet(object2, path17, updater(baseGet(object2, path17)), 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, path16, hasFunc) {
2870
- path16 = castPath(path16, object2);
2871
- var index = -1, length = path16.length, result2 = false;
2869
+ function hasPath(object2, path17, hasFunc) {
2870
+ path17 = castPath(path17, object2);
2871
+ var index = -1, length = path17.length, result2 = false;
2872
2872
  while (++index < length) {
2873
- var key = toKey(path16[index]);
2873
+ var key = toKey(path17[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, path16) {
3076
- return path16.length < 2 ? object2 : baseGet(object2, baseSlice(path16, 0, -1));
3075
+ function parent(object2, path17) {
3076
+ return path17.length < 2 ? object2 : baseGet(object2, baseSlice(path17, 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, path16, args2) {
3712
- var index = -1, isFunc = typeof path16 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
3711
+ var invokeMap = baseRest(function(collection, path17, args2) {
3712
+ var index = -1, isFunc = typeof path17 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
3713
3713
  baseEach(collection, function(value) {
3714
- result2[++index] = isFunc ? apply(path16, value, args2) : baseInvoke(value, path16, args2);
3714
+ result2[++index] = isFunc ? apply(path17, value, args2) : baseInvoke(value, path17, args2);
3715
3715
  });
3716
3716
  return result2;
3717
3717
  });
@@ -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, path16, defaultValue) {
4367
- var result2 = object2 == null ? undefined2 : baseGet(object2, path16);
4366
+ function get(object2, path17, defaultValue) {
4367
+ var result2 = object2 == null ? undefined2 : baseGet(object2, path17);
4368
4368
  return result2 === undefined2 ? defaultValue : result2;
4369
4369
  }
4370
- function has(object2, path16) {
4371
- return object2 != null && hasPath(object2, path16, baseHas);
4370
+ function has(object2, path17) {
4371
+ return object2 != null && hasPath(object2, path17, baseHas);
4372
4372
  }
4373
- function hasIn(object2, path16) {
4374
- return object2 != null && hasPath(object2, path16, baseHasIn);
4373
+ function hasIn(object2, path17) {
4374
+ return object2 != null && hasPath(object2, path17, 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(path16) {
4428
- path16 = castPath(path16, object2);
4429
- isDeep || (isDeep = path16.length > 1);
4430
- return path16;
4427
+ paths = arrayMap(paths, function(path17) {
4428
+ path17 = castPath(path17, object2);
4429
+ isDeep || (isDeep = path17.length > 1);
4430
+ return path17;
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, path16) {
4457
- return predicate(value, path16[0]);
4456
+ return basePickBy(object2, props, function(value, path17) {
4457
+ return predicate(value, path17[0]);
4458
4458
  });
4459
4459
  }
4460
- function result(object2, path16, defaultValue) {
4461
- path16 = castPath(path16, object2);
4462
- var index = -1, length = path16.length;
4460
+ function result(object2, path17, defaultValue) {
4461
+ path17 = castPath(path17, object2);
4462
+ var index = -1, length = path17.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(path16[index])];
4468
+ var value = object2 == null ? undefined2 : object2[toKey(path17[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, path16, value) {
4478
- return object2 == null ? object2 : baseSet(object2, path16, value);
4477
+ function set2(object2, path17, value) {
4478
+ return object2 == null ? object2 : baseSet(object2, path17, value);
4479
4479
  }
4480
- function setWith(object2, path16, value, customizer) {
4480
+ function setWith(object2, path17, value, customizer) {
4481
4481
  customizer = typeof customizer == "function" ? customizer : undefined2;
4482
- return object2 == null ? object2 : baseSet(object2, path16, value, customizer);
4482
+ return object2 == null ? object2 : baseSet(object2, path17, 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, path16) {
4505
- return object2 == null ? true : baseUnset(object2, path16);
4504
+ function unset(object2, path17) {
4505
+ return object2 == null ? true : baseUnset(object2, path17);
4506
4506
  }
4507
- function update(object2, path16, updater) {
4508
- return object2 == null ? object2 : baseUpdate(object2, path16, castFunction(updater));
4507
+ function update(object2, path17, updater) {
4508
+ return object2 == null ? object2 : baseUpdate(object2, path17, castFunction(updater));
4509
4509
  }
4510
- function updateWith(object2, path16, updater, customizer) {
4510
+ function updateWith(object2, path17, updater, customizer) {
4511
4511
  customizer = typeof customizer == "function" ? customizer : undefined2;
4512
- return object2 == null ? object2 : baseUpdate(object2, path16, castFunction(updater), customizer);
4512
+ return object2 == null ? object2 : baseUpdate(object2, path17, 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(path16, srcValue) {
4899
- return baseMatchesProperty(path16, baseClone(srcValue, CLONE_DEEP_FLAG));
4898
+ function matchesProperty(path17, srcValue) {
4899
+ return baseMatchesProperty(path17, baseClone(srcValue, CLONE_DEEP_FLAG));
4900
4900
  }
4901
- var method = baseRest(function(path16, args2) {
4901
+ var method = baseRest(function(path17, args2) {
4902
4902
  return function(object2) {
4903
- return baseInvoke(object2, path16, args2);
4903
+ return baseInvoke(object2, path17, args2);
4904
4904
  };
4905
4905
  });
4906
4906
  var methodOf = baseRest(function(object2, args2) {
4907
- return function(path16) {
4908
- return baseInvoke(object2, path16, args2);
4907
+ return function(path17) {
4908
+ return baseInvoke(object2, path17, args2);
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(path16) {
4956
- return isKey(path16) ? baseProperty(toKey(path16)) : basePropertyDeep(path16);
4955
+ function property(path17) {
4956
+ return isKey(path17) ? baseProperty(toKey(path17)) : basePropertyDeep(path17);
4957
4957
  }
4958
4958
  function propertyOf(object2) {
4959
- return function(path16) {
4960
- return object2 == null ? undefined2 : baseGet(object2, path16);
4959
+ return function(path17) {
4960
+ return object2 == null ? undefined2 : baseGet(object2, path17);
4961
4961
  };
4962
4962
  }
4963
4963
  var range = createRange();
@@ -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(path16, args2) {
5414
- if (typeof path16 == "function") {
5413
+ LazyWrapper.prototype.invokeMap = baseRest(function(path17, args2) {
5414
+ if (typeof path17 == "function") {
5415
5415
  return new LazyWrapper(this);
5416
5416
  }
5417
5417
  return this.map(function(value) {
5418
- return baseInvoke(value, path16, args2);
5418
+ return baseInvoke(value, path17, args2);
5419
5419
  });
5420
5420
  });
5421
5421
  LazyWrapper.prototype.reject = function(predicate) {
@@ -5558,7 +5558,7 @@ var fivemTool = {
5558
5558
 
5559
5559
  // src/guest/devtools/steam.ts
5560
5560
  import fs13 from "node:fs";
5561
- import path15 from "node:path";
5561
+ import path16 from "node:path";
5562
5562
  import { spawn as spawn2 } from "node:child_process";
5563
5563
 
5564
5564
  // src/shared/accounts/kinds/steam.ts
@@ -6539,10 +6539,10 @@ function mergeDefs(...defs) {
6539
6539
  function cloneDef(schema) {
6540
6540
  return mergeDefs(schema._zod.def);
6541
6541
  }
6542
- function getElementAtPath(obj, path16) {
6543
- if (!path16)
6542
+ function getElementAtPath(obj, path17) {
6543
+ if (!path17)
6544
6544
  return obj;
6545
- return path16.reduce((acc, key) => acc?.[key], obj);
6545
+ return path17.reduce((acc, key) => acc?.[key], obj);
6546
6546
  }
6547
6547
  function promiseAllObject(promisesObj) {
6548
6548
  const keys = Object.keys(promisesObj);
@@ -6882,11 +6882,11 @@ function explicitlyAborted(x, startIndex = 0) {
6882
6882
  }
6883
6883
  return false;
6884
6884
  }
6885
- function prefixIssues(path16, issues) {
6885
+ function prefixIssues(path17, issues) {
6886
6886
  return issues.map((iss) => {
6887
6887
  var _a3;
6888
6888
  (_a3 = iss).path ?? (_a3.path = []);
6889
- iss.path.unshift(path16);
6889
+ iss.path.unshift(path17);
6890
6890
  return iss;
6891
6891
  });
6892
6892
  }
@@ -7336,16 +7336,16 @@ function flattenError(error62, mapper = (issue2) => issue2.message) {
7336
7336
  }
7337
7337
  function formatError(error62, mapper = (issue2) => issue2.message) {
7338
7338
  const fieldErrors = { _errors: [] };
7339
- const processError = (error63, path16 = []) => {
7339
+ const processError = (error63, path17 = []) => {
7340
7340
  for (const issue2 of error63.issues) {
7341
7341
  if (issue2.code === "invalid_union" && issue2.errors.length) {
7342
- issue2.errors.map((issues) => processError({ issues }, [...path16, ...issue2.path]));
7342
+ issue2.errors.map((issues) => processError({ issues }, [...path17, ...issue2.path]));
7343
7343
  } else if (issue2.code === "invalid_key") {
7344
- processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
7344
+ processError({ issues: issue2.issues }, [...path17, ...issue2.path]);
7345
7345
  } else if (issue2.code === "invalid_element") {
7346
- processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
7346
+ processError({ issues: issue2.issues }, [...path17, ...issue2.path]);
7347
7347
  } else {
7348
- const fullpath = [...path16, ...issue2.path];
7348
+ const fullpath = [...path17, ...issue2.path];
7349
7349
  if (fullpath.length === 0) {
7350
7350
  fieldErrors._errors.push(mapper(issue2));
7351
7351
  } else {
@@ -7384,17 +7384,17 @@ function formatError(error62, mapper = (issue2) => issue2.message) {
7384
7384
  }
7385
7385
  function treeifyError(error62, mapper = (issue2) => issue2.message) {
7386
7386
  const result = { errors: [] };
7387
- const processError = (error63, path16 = []) => {
7387
+ const processError = (error63, path17 = []) => {
7388
7388
  var _a3;
7389
7389
  for (const issue2 of error63.issues) {
7390
7390
  if (issue2.code === "invalid_union" && issue2.errors.length) {
7391
- issue2.errors.map((issues) => processError({ issues }, [...path16, ...issue2.path]));
7391
+ issue2.errors.map((issues) => processError({ issues }, [...path17, ...issue2.path]));
7392
7392
  } else if (issue2.code === "invalid_key") {
7393
- processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
7393
+ processError({ issues: issue2.issues }, [...path17, ...issue2.path]);
7394
7394
  } else if (issue2.code === "invalid_element") {
7395
- processError({ issues: issue2.issues }, [...path16, ...issue2.path]);
7395
+ processError({ issues: issue2.issues }, [...path17, ...issue2.path]);
7396
7396
  } else {
7397
- const fullpath = [...path16, ...issue2.path];
7397
+ const fullpath = [...path17, ...issue2.path];
7398
7398
  if (fullpath.length === 0) {
7399
7399
  result.errors.push(mapper(issue2));
7400
7400
  continue;
@@ -7433,8 +7433,8 @@ function treeifyError(error62, mapper = (issue2) => issue2.message) {
7433
7433
  }
7434
7434
  function toDotPath(_path) {
7435
7435
  const segs = [];
7436
- const path16 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
7437
- for (const seg of path16) {
7436
+ const path17 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
7437
+ for (const seg of path17) {
7438
7438
  if (typeof seg === "number")
7439
7439
  segs.push(`[${seg}]`);
7440
7440
  else if (typeof seg === "symbol")
@@ -24536,13 +24536,13 @@ function resolveRef(ref, ctx) {
24536
24536
  if (!ref.startsWith("#")) {
24537
24537
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
24538
24538
  }
24539
- const path16 = ref.slice(1).split("/").filter(Boolean);
24540
- if (path16.length === 0) {
24539
+ const path17 = ref.slice(1).split("/").filter(Boolean);
24540
+ if (path17.length === 0) {
24541
24541
  return ctx.rootSchema;
24542
24542
  }
24543
24543
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
24544
- if (path16[0] === defsKey) {
24545
- const key = path16[1] === void 0 ? void 0 : decodeJSONPointerSegment(path16[1]);
24544
+ if (path17[0] === defsKey) {
24545
+ const key = path17[1] === void 0 ? void 0 : decodeJSONPointerSegment(path17[1]);
24546
24546
  if (!key || !ctx.defs[key]) {
24547
24547
  throw new Error(`Reference not found: ${ref}`);
24548
24548
  }
@@ -25621,8 +25621,8 @@ async function fetchRetry(url2, init = {}, attempts = 5, timeoutMs = 6e4) {
25621
25621
  }
25622
25622
 
25623
25623
  // src/shared/download/archive.ts
25624
- import fs6 from "node:fs";
25625
- import path7 from "node:path";
25624
+ import fs7 from "node:fs";
25625
+ import path8 from "node:path";
25626
25626
  import crypto from "node:crypto";
25627
25627
 
25628
25628
  // src/shared/io/json.ts
@@ -25765,16 +25765,31 @@ function safeRemove(target, root) {
25765
25765
  fs4.rmSync(target, { recursive: true, force: true, maxRetries: 2 });
25766
25766
  }
25767
25767
 
25768
- // src/shared/system.ts
25768
+ // src/shared/io/disk.ts
25769
+ import fs5 from "node:fs";
25769
25770
  import path5 from "node:path";
25771
+ function freeBytesAt(dir, statfs = fs5.statfsSync) {
25772
+ let at = path5.resolve(dir);
25773
+ while (!fs5.existsSync(at) && path5.dirname(at) !== at) at = path5.dirname(at);
25774
+ try {
25775
+ const s = statfs(at);
25776
+ return s.bavail * s.bsize;
25777
+ } catch {
25778
+ return null;
25779
+ }
25780
+ }
25781
+
25782
+ // src/shared/system.ts
25783
+ import path6 from "node:path";
25770
25784
  var systemRoot = () => process.env.SystemRoot ?? process.env.WINDIR ?? "C:\\Windows";
25771
25785
  function system32(exe) {
25772
- return path5.join(systemRoot(), "System32", exe);
25786
+ return path6.join(systemRoot(), "System32", exe);
25773
25787
  }
25774
25788
  var SYSTEM = {
25775
25789
  cmd: () => system32("cmd.exe"),
25776
25790
  powershell: () => system32("WindowsPowerShell\\v1.0\\powershell.exe"),
25777
25791
  tasklist: () => system32("tasklist.exe"),
25792
+ taskkill: () => system32("taskkill.exe"),
25778
25793
  whoami: () => system32("whoami.exe"),
25779
25794
  icacls: () => system32("icacls.exe"),
25780
25795
  tar: () => system32("tar.exe"),
@@ -25789,17 +25804,17 @@ var SYSTEM = {
25789
25804
  msiexec: () => system32("msiexec.exe"),
25790
25805
  sc: () => system32("sc.exe"),
25791
25806
  /** The .NET Framework C# compiler that ships with Windows (C# 5). */
25792
- csc: () => path5.join(systemRoot(), "Microsoft.NET", "Framework64", "v4.0.30319", "csc.exe")
25807
+ csc: () => path6.join(systemRoot(), "Microsoft.NET", "Framework64", "v4.0.30319", "csc.exe")
25793
25808
  };
25794
25809
 
25795
25810
  // src/shared/scripts.ts
25796
- import fs5 from "node:fs";
25797
- import path6 from "node:path";
25811
+ import fs6 from "node:fs";
25812
+ import path7 from "node:path";
25798
25813
  import { fileURLToPath } from "node:url";
25799
- var HERE = path6.dirname(fileURLToPath(import.meta.url));
25814
+ var HERE = path7.dirname(fileURLToPath(import.meta.url));
25800
25815
  function sandboxScriptsDir() {
25801
- const candidates = [path6.resolve(HERE, "..", "sandbox"), path6.resolve(HERE, "..", "..", "sandbox")];
25802
- return candidates.find((dir) => fs5.existsSync(path6.join(dir, "boot", "bootstrap.ps1"))) ?? candidates[candidates.length - 1];
25816
+ const candidates = [path7.resolve(HERE, "..", "sandbox"), path7.resolve(HERE, "..", "..", "sandbox")];
25817
+ return candidates.find((dir) => fs6.existsSync(path7.join(dir, "boot", "bootstrap.ps1"))) ?? candidates[candidates.length - 1];
25803
25818
  }
25804
25819
  function scriptArgs(name2, args2 = []) {
25805
25820
  return [
@@ -25809,7 +25824,7 @@ function scriptArgs(name2, args2 = []) {
25809
25824
  "-ExecutionPolicy",
25810
25825
  "Bypass",
25811
25826
  "-File",
25812
- path6.join(sandboxScriptsDir(), "scripts", name2),
25827
+ path7.join(sandboxScriptsDir(), "scripts", name2),
25813
25828
  ...args2
25814
25829
  ];
25815
25830
  }
@@ -25829,16 +25844,16 @@ function stagingFolder(destination) {
25829
25844
  return destination + ".staging-" + crypto.randomBytes(3).toString("hex");
25830
25845
  }
25831
25846
  function moveIntoPlace(work, destination) {
25832
- safeRemove(destination, path7.dirname(destination));
25833
- fs6.mkdirSync(path7.dirname(destination), { recursive: true });
25834
- fs6.renameSync(work, destination);
25847
+ safeRemove(destination, path8.dirname(destination));
25848
+ fs7.mkdirSync(path8.dirname(destination), { recursive: true });
25849
+ fs7.renameSync(work, destination);
25835
25850
  }
25836
25851
  async function extractArchive(archive, destination, members2 = []) {
25837
- fs6.mkdirSync(destination, { recursive: true });
25852
+ fs7.mkdirSync(destination, { recursive: true });
25838
25853
  let status = await spawnAsync(SYSTEM.tar(), ["-xf", archive, "-C", destination, ...members2]);
25839
25854
  if (status !== 0 && /\.(zip|nupkg)$/i.test(archive)) {
25840
25855
  const zip = archive.endsWith(".zip") ? archive : archive + ".zip";
25841
- if (zip !== archive) fs6.copyFileSync(archive, zip);
25856
+ if (zip !== archive) fs7.copyFileSync(archive, zip);
25842
25857
  status = await spawnAsync(
25843
25858
  SYSTEM.powershell(),
25844
25859
  scriptArgs("expand-archive.ps1", ["-Archive", zip, "-Destination", destination])
@@ -25847,21 +25862,21 @@ async function extractArchive(archive, destination, members2 = []) {
25847
25862
  if (status !== 0) throw new Error("Could not extract " + archive);
25848
25863
  }
25849
25864
  function findFile(root, name2, maxDepth = 4) {
25850
- if (maxDepth < 0 || !fs6.existsSync(root)) return null;
25851
- const entries = fs6.readdirSync(root, { withFileTypes: true });
25865
+ if (maxDepth < 0 || !fs7.existsSync(root)) return null;
25866
+ const entries = fs7.readdirSync(root, { withFileTypes: true });
25852
25867
  for (const entry of entries)
25853
- if (entry.isFile() && entry.name.toLowerCase() === name2.toLowerCase()) return path7.join(root, entry.name);
25868
+ if (entry.isFile() && entry.name.toLowerCase() === name2.toLowerCase()) return path8.join(root, entry.name);
25854
25869
  for (const entry of entries)
25855
25870
  if (entry.isDirectory()) {
25856
- const found = findFile(path7.join(root, entry.name), name2, maxDepth - 1);
25871
+ const found = findFile(path8.join(root, entry.name), name2, maxDepth - 1);
25857
25872
  if (found) return found;
25858
25873
  }
25859
25874
  return null;
25860
25875
  }
25861
25876
 
25862
25877
  // src/shared/download/downloader.ts
25863
- import fs7 from "node:fs";
25864
- import path8 from "node:path";
25878
+ import fs8 from "node:fs";
25879
+ import path9 from "node:path";
25865
25880
  import crypto2 from "node:crypto";
25866
25881
  import { Readable, Transform } from "node:stream";
25867
25882
  import { pipeline } from "node:stream/promises";
@@ -25882,12 +25897,12 @@ var Downloader = class {
25882
25897
  const sums = typeof expected === "string" || expected === null ? { sha256: expected } : expected;
25883
25898
  if (this.requireChecksum && !sums.sha256?.trim() && !sums.sha512?.trim() && !sums.sha1?.trim() && !sums.verify) {
25884
25899
  throw new Error(
25885
- "Refusing to download " + path8.basename(destination) + " (" + url2 + "): no checksum is published for it, and downloads.requireChecksum is on. Turn that setting off to allow downloads that cannot be verified."
25900
+ "Refusing to download " + path9.basename(destination) + " (" + url2 + "): no checksum is published for it, and downloads.requireChecksum is on. Turn that setting off to allow downloads that cannot be verified."
25886
25901
  );
25887
25902
  }
25888
25903
  const response = await fetchRetry(url2, {}, 3, 20 * 60 * 1e3);
25889
25904
  if (!response.body) throw new Error("Empty response for " + url2);
25890
- fs7.mkdirSync(path8.dirname(destination), { recursive: true });
25905
+ fs8.mkdirSync(path9.dirname(destination), { recursive: true });
25891
25906
  const checks = ["sha256", "sha512", "sha1"].flatMap((kind) => {
25892
25907
  const want = sums[kind]?.trim().toLowerCase();
25893
25908
  return want ? [{ want, hash: crypto2.createHash(kind) }] : [];
@@ -25917,13 +25932,13 @@ var Downloader = class {
25917
25932
  });
25918
25933
  const partial2 = destination + ".part";
25919
25934
  try {
25920
- await pipeline(Readable.fromWeb(response.body), tap, fs7.createWriteStream(partial2));
25935
+ await pipeline(Readable.fromWeb(response.body), tap, fs8.createWriteStream(partial2));
25921
25936
  if (checks.some((c) => c.hash.digest("hex") !== c.want)) throw new Error("Checksum mismatch for " + url2);
25922
25937
  if (sums.verify) await sums.verify(partial2);
25923
- fs7.rmSync(destination, { force: true });
25924
- fs7.renameSync(partial2, destination);
25938
+ fs8.rmSync(destination, { force: true });
25939
+ fs8.renameSync(partial2, destination);
25925
25940
  } finally {
25926
- fs7.rmSync(partial2, { force: true });
25941
+ fs8.rmSync(partial2, { force: true });
25927
25942
  }
25928
25943
  }
25929
25944
  /**
@@ -25933,41 +25948,41 @@ var Downloader = class {
25933
25948
  async archive(url2, destination, options = {}) {
25934
25949
  const work = stagingFolder(destination);
25935
25950
  try {
25936
- const archive = path8.join(work, options.fileName ?? path8.basename(new URL(url2).pathname));
25951
+ const archive = path9.join(work, options.fileName ?? path9.basename(new URL(url2).pathname));
25937
25952
  await this.file(url2, archive, {
25938
25953
  sha256: options.sha256,
25939
25954
  sha512: options.sha512,
25940
25955
  sha1: options.sha1,
25941
25956
  ...options.verify ? { verify: options.verify } : {}
25942
25957
  });
25943
- const extracted = path8.join(work, "x");
25958
+ const extracted = path9.join(work, "x");
25944
25959
  await extractArchive(archive, extracted, options.members);
25945
25960
  let root = extracted;
25946
25961
  if (options.locate) {
25947
25962
  const found = findFile(extracted, options.locate);
25948
25963
  if (!found) throw new Error(options.locate + " not found in " + url2);
25949
- root = path8.dirname(found);
25950
- for (let i = 0; i < (options.up ?? 0) && path8.dirname(root).startsWith(extracted); i++)
25951
- root = path8.dirname(root);
25964
+ root = path9.dirname(found);
25965
+ for (let i = 0; i < (options.up ?? 0) && path9.dirname(root).startsWith(extracted); i++)
25966
+ root = path9.dirname(root);
25952
25967
  }
25953
25968
  moveIntoPlace(root, destination);
25954
25969
  } finally {
25955
- safeRemove(work, path8.dirname(work));
25970
+ safeRemove(work, path9.dirname(work));
25956
25971
  }
25957
25972
  }
25958
25973
  };
25959
25974
  var downloader = new Downloader();
25960
25975
 
25961
25976
  // src/guest/runtime/session.ts
25962
- import fs9 from "node:fs";
25963
- import path11 from "node:path";
25977
+ import fs10 from "node:fs";
25978
+ import path12 from "node:path";
25964
25979
 
25965
25980
  // src/guest/runtime/paths.ts
25966
- import path10 from "node:path";
25981
+ import path11 from "node:path";
25967
25982
 
25968
25983
  // src/shared/channel/run-dir.ts
25969
- import fs8 from "node:fs";
25970
- import path9 from "node:path";
25984
+ import fs9 from "node:fs";
25985
+ import path10 from "node:path";
25971
25986
 
25972
25987
  // src/shared/paths/guest-paths.ts
25973
25988
  var RESERVED_GUEST = /^C:\\(?:Windows|Program Files|Program Files \(x86\)|ProgramData|Users|AgentLaunch|AgentData|HostTools|nvm|Mirror|PcInstalls)(?:\\|$)/i;
@@ -26058,6 +26073,22 @@ var DatabasesSchema = external_exports.strictObject({
26058
26073
  })
26059
26074
  });
26060
26075
 
26076
+ // src/core/schema/codex.ts
26077
+ var CodexSchema = external_exports.strictObject({
26078
+ sandboxMode: external_exports.enum(["danger-full-access", "workspace-write", "read-only"]).describe(
26079
+ "Codex's own sandbox. Inside Windows Sandbox Codex's own sandbox only slows it down (it re-grants file permissions over your profile at every boot), so the default is danger-full-access: Windows Sandbox is the sandbox."
26080
+ ),
26081
+ approvalPolicy: external_exports.enum(["never", "on-request", "on-failure", "untrusted"]).describe('When Codex asks before it runs a command. "never" with danger-full-access starts it with no questions.'),
26082
+ model: external_exports.string().max(100).regex(/^[A-Za-z0-9._:/-]*$/, "letters, digits and . _ : / - only").describe("The model Codex uses. Empty = Codex's own default."),
26083
+ reasoningEffort: external_exports.enum(["default", "minimal", "low", "medium", "high", "xhigh"]).describe(`How hard Codex thinks. "default" = Codex's own default.`),
26084
+ windowsSandbox: external_exports.enum(["off", "unelevated", "elevated"]).describe(
26085
+ `Codex's Windows sandbox mode in its config.toml. "off" removes the setting so Codex does not set up its sandbox users and firewall rules at every boot.`
26086
+ ),
26087
+ mcpLoginsInFile: external_exports.boolean().describe(
26088
+ `Keep the sign-ins of Codex's MCP servers in a file in the saved Codex folder (mcp_oauth_credentials_store = "file"), so they survive between sandboxes. A value you set in config.toml is kept.`
26089
+ )
26090
+ });
26091
+
26061
26092
  // src/core/schema/harness.ts
26062
26093
  var SubfolderSchema = external_exports.string().regex(/^(?!.*(^|[\\/])\.\.([\\/]|$))[A-Za-z0-9._ -]+([\\/][A-Za-z0-9._ -]+)*$/, "a plain relative folder");
26063
26094
  var HarnessHomeSchema = external_exports.strictObject({
@@ -26370,6 +26401,9 @@ var ToolchainsSchema = external_exports.strictObject({
26370
26401
  keepInstallFiles: external_exports.boolean().describe(
26371
26402
  "Keep an offline copy of the Visual Studio install files in tools\\visualstudio (~10 GB, made once), so later boots install without downloading them again. Skipped while that disk has too little room."
26372
26403
  ),
26404
+ visualStudio: external_exports.enum(["full", "autosdk"]).describe(
26405
+ `"full": install Visual Studio Community (the engine finds it through the Setup API; ~10 GB, redone every boot). "autosdk" (experimental): skip Visual Studio and build an Unreal AutoSDK tree from the portable MSVC in tools\\unreal\\autosdk (kept between sandboxes); UnrealBuildTool finds MSVC through AutoSDK, but the editor's Visual Studio integration is not available. Needs toolchains.msvc (turned on for you).`
26406
+ ),
26373
26407
  persistEngines: external_exports.boolean().describe(
26374
26408
  "Engines the Epic Games Launcher installs go to tools\\unreal\\engines (kept between sandboxes, 40-60 GB each) and are registered with the launcher again every boot. Off: they go on the sandbox disk and are lost when it closes. Engines installed on this PC can be mapped instead (pcInstalls.unrealEngines)."
26375
26409
  ),
@@ -27701,6 +27735,7 @@ var ConfigSchema = external_exports.strictObject({
27701
27735
  apps: AppsSchema,
27702
27736
  claudeProfile: ClaudeProfileSchema,
27703
27737
  harnesses: external_exports.record(NameSchema, HarnessSchema).describe("Agents that can run in the sandbox."),
27738
+ codex: CodexSchema,
27704
27739
  hooks: external_exports.strictObject({ failFast: external_exports.boolean().describe("Stop when a hook script fails.") }),
27705
27740
  projects: ProjectsSchema.describe(
27706
27741
  "Several projects in one sandbox: folders of projects mapped at every start, and adding folders while it runs."
@@ -27902,7 +27937,8 @@ var HeartbeatSchema = external_exports.object({
27902
27937
  topProcesses: external_exports.array(external_exports.object({ name: Text(64), privateMb: external_exports.number().int().min(0).max(1e7) })).max(5),
27903
27938
  /** The disk queue this PC last reported while asking the sandbox to slow down. */
27904
27939
  diskQueueReported: external_exports.number().min(0).max(1e5).optional(),
27905
- phase: external_exports.enum(["ready", "working"])
27940
+ /** "ending": the sandbox is shutting down in order (idle shutdown, sandbox stop, Windows shutting down). */
27941
+ phase: external_exports.enum(["ready", "working", "ending"])
27906
27942
  });
27907
27943
  var GuestResponseSchema = external_exports.object({
27908
27944
  id: IdSchema,
@@ -27943,6 +27979,8 @@ var ProjectStatusSchema = external_exports.object({
27943
27979
  var VpnStatusSchema = external_exports.object({
27944
27980
  state: external_exports.enum(["off", "starting", "up", "failed"]),
27945
27981
  message: Text(2e3),
27982
+ /** Why it failed, when it did: `auth` (login refused), `unreachable`, `driver`, `timeout` or `other`. */
27983
+ code: external_exports.enum(["auth", "unreachable", "driver", "timeout", "other"]).optional(),
27946
27984
  killSwitch: external_exports.boolean(),
27947
27985
  /** A direct connection was tried after the kill switch was applied: false = it still got out. */
27948
27986
  killSwitchHeld: external_exports.boolean().optional(),
@@ -27958,14 +27996,14 @@ function safeId(id) {
27958
27996
  return IdSchema.parse(id);
27959
27997
  }
27960
27998
  var scan = (schema, dir) => {
27961
- if (!fs8.existsSync(dir)) return { valid: [], invalid: [] };
27999
+ if (!fs9.existsSync(dir)) return { valid: [], invalid: [] };
27962
28000
  const valid = [];
27963
28001
  const invalid = [];
27964
- for (const name2 of fs8.readdirSync(dir)) {
28002
+ for (const name2 of fs9.readdirSync(dir)) {
27965
28003
  if (name2.endsWith(".tmp")) continue;
27966
- const message = /^[A-Za-z0-9_-]{1,64}\.json$/.test(name2) ? readValid(schema, path9.join(dir, name2)) : null;
28004
+ const message = /^[A-Za-z0-9_-]{1,64}\.json$/.test(name2) ? readValid(schema, path10.join(dir, name2)) : null;
27967
28005
  if (message) valid.push(message);
27968
- else invalid.push(path9.join(dir, name2));
28006
+ else invalid.push(path10.join(dir, name2));
27969
28007
  }
27970
28008
  return { valid, invalid };
27971
28009
  };
@@ -27996,45 +28034,45 @@ var RunDir = class {
27996
28034
  liveDir;
27997
28035
  liveRepliesDir;
27998
28036
  constructor(dataDir2) {
27999
- this.root = path9.join(dataDir2, "run");
28000
- this.sandboxFile = path9.join(this.root, "sandbox.json");
28001
- this.vpnFile = path9.join(this.root, "vpn.json");
28002
- this.pressureFile = path9.join(this.root, "pressure.json");
28003
- this.heartbeatFile = path9.join(this.root, "heartbeat.json");
28004
- this.budgetFile = path9.join(this.root, "budget.json");
28005
- this.requestsDir = path9.join(this.root, "requests");
28006
- this.responsesDir = path9.join(this.root, "responses");
28007
- this.sessionsDir = path9.join(this.root, "sessions");
28008
- this.projectsDir = path9.join(this.root, "projects");
28009
- this.auditDir = path9.join(this.root, "audit");
28010
- this.treesDir = path9.join(this.root, "trees");
28011
- this.secretsDir = path9.join(dataDir2, "secrets");
28012
- this.liveDir = path9.join(this.root, "live");
28013
- this.liveRepliesDir = path9.join(this.root, "live-replies");
28037
+ this.root = path10.join(dataDir2, "run");
28038
+ this.sandboxFile = path10.join(this.root, "sandbox.json");
28039
+ this.vpnFile = path10.join(this.root, "vpn.json");
28040
+ this.pressureFile = path10.join(this.root, "pressure.json");
28041
+ this.heartbeatFile = path10.join(this.root, "heartbeat.json");
28042
+ this.budgetFile = path10.join(this.root, "budget.json");
28043
+ this.requestsDir = path10.join(this.root, "requests");
28044
+ this.responsesDir = path10.join(this.root, "responses");
28045
+ this.sessionsDir = path10.join(this.root, "sessions");
28046
+ this.projectsDir = path10.join(this.root, "projects");
28047
+ this.auditDir = path10.join(this.root, "audit");
28048
+ this.treesDir = path10.join(this.root, "trees");
28049
+ this.secretsDir = path10.join(dataDir2, "secrets");
28050
+ this.liveDir = path10.join(this.root, "live");
28051
+ this.liveRepliesDir = path10.join(this.root, "live-replies");
28014
28052
  }
28015
28053
  liveFile(id) {
28016
- return path9.join(this.liveDir, safeId(id) + ".json");
28054
+ return path10.join(this.liveDir, safeId(id) + ".json");
28017
28055
  }
28018
28056
  liveReplyFile(id) {
28019
- return path9.join(this.liveRepliesDir, safeId(id) + ".json");
28057
+ return path10.join(this.liveRepliesDir, safeId(id) + ".json");
28020
28058
  }
28021
28059
  requestFile(id) {
28022
- return path9.join(this.requestsDir, safeId(id) + ".json");
28060
+ return path10.join(this.requestsDir, safeId(id) + ".json");
28023
28061
  }
28024
28062
  responseFile(id) {
28025
- return path9.join(this.responsesDir, safeId(id) + ".json");
28063
+ return path10.join(this.responsesDir, safeId(id) + ".json");
28026
28064
  }
28027
28065
  sessionFile(id) {
28028
- return path9.join(this.sessionsDir, safeId(id) + ".json");
28066
+ return path10.join(this.sessionsDir, safeId(id) + ".json");
28029
28067
  }
28030
28068
  treeFile(id) {
28031
- return path9.join(this.treesDir, safeId(id) + ".json");
28069
+ return path10.join(this.treesDir, safeId(id) + ".json");
28032
28070
  }
28033
28071
  projectFile(name2) {
28034
- return path9.join(this.projectsDir, safeId(name2) + ".json");
28072
+ return path10.join(this.projectsDir, safeId(name2) + ".json");
28035
28073
  }
28036
28074
  secretFile(id) {
28037
- return path9.join(this.secretsDir, safeId(id) + ".json");
28075
+ return path10.join(this.secretsDir, safeId(id) + ".json");
28038
28076
  }
28039
28077
  readSandboxStatus() {
28040
28078
  return readValid(SandboxStatusSchema, this.sandboxFile);
@@ -28076,37 +28114,37 @@ var launchDir = process.env.AGENT_LAUNCH_DIR ?? "C:\\AgentLaunch";
28076
28114
  var dataDir = process.env.AGENT_DATA_DIR ?? "C:\\AgentData";
28077
28115
  var hostToolsDir = process.env.AGENT_HOST_TOOLS_DIR ?? "C:\\HostTools";
28078
28116
  var localDir = process.env.AGENT_LOCAL_DIR ?? "C:\\nvm";
28079
- var toolsDir = path10.join(dataDir, "tools");
28080
- var logsDir = path10.join(dataDir, "logs");
28117
+ var toolsDir = path11.join(dataDir, "tools");
28118
+ var logsDir = path11.join(dataDir, "logs");
28081
28119
  var run = new RunDir(dataDir);
28082
28120
 
28083
28121
  // src/guest/runtime/session.ts
28084
28122
  var session = JSON.parse(
28085
- fs9.readFileSync(path11.join(launchDir, "session.json"), "utf8").replace(/^\uFEFF/, "")
28123
+ fs10.readFileSync(path12.join(launchDir, "session.json"), "utf8").replace(/^\uFEFF/, "")
28086
28124
  );
28087
28125
  downloader.requireChecksum = session.downloads?.requireChecksum === true;
28088
28126
  var workspace = process.env.AGENT_WORKSPACE ?? session.workspace;
28089
- var stateDir = path11.join(dataDir, session.persistAgentState ? "state" : "state-session");
28090
- var claudeDir = path11.join(stateDir, "claude");
28127
+ var stateDir = path12.join(dataDir, session.persistAgentState ? "state" : "state-session");
28128
+ var claudeDir = path12.join(stateDir, "claude");
28091
28129
 
28092
28130
  // src/guest/toolchains/steam/commands.ts
28093
- import fs10 from "node:fs";
28094
- import path12 from "node:path";
28131
+ import fs11 from "node:fs";
28132
+ import path13 from "node:path";
28095
28133
  var STEAMCMD_DIR = "C:\\SteamCMD";
28096
28134
  function steamAppsRoot(tools = toolsDir) {
28097
- return path12.join(tools, "steam-apps");
28135
+ return path13.join(tools, "steam-apps");
28098
28136
  }
28099
28137
  function steamAppDir(appId, tools = toolsDir) {
28100
- return path12.join(steamAppsRoot(tools), checkAppId(appId));
28138
+ return path13.join(steamAppsRoot(tools), checkAppId(appId));
28101
28139
  }
28102
28140
  function workshopCache(data = dataDir) {
28103
- return path12.join(data, "cache", "steam-workshop");
28141
+ return path13.join(data, "cache", "steam-workshop");
28104
28142
  }
28105
28143
  function workshopItemDir(cache, appId, item) {
28106
- return path12.join(cache, "steamapps", "workshop", "content", checkAppId(appId), checkItemId(item));
28144
+ return path13.join(cache, "steamapps", "workshop", "content", checkAppId(appId), checkItemId(item));
28107
28145
  }
28108
28146
  function steamClientDir(tools = toolsDir) {
28109
- return path12.join(tools, "steam");
28147
+ return path13.join(tools, "steam");
28110
28148
  }
28111
28149
  function checked(value, pattern, what) {
28112
28150
  if (!pattern.test(value)) throw new Error("not a " + what + ": " + JSON.stringify(value.slice(0, 80)));
@@ -28117,7 +28155,7 @@ var checkItemId = (v) => checked(v, /^[1-9]\d{0,19}$/, "workshop item ID");
28117
28155
  var checkBranch = (v) => checked(v, /^[A-Za-z0-9._-]{1,64}$/, "branch name");
28118
28156
  var checkLogin = (v) => checked(v, STEAM_ACCOUNT, "Steam account name");
28119
28157
  function checkPathValue(p, what) {
28120
- if (!path12.isAbsolute(p) || /["\r\n\0]/.test(p) || /(^|[\\/ ])\+/.test(p))
28158
+ if (!path13.isAbsolute(p) || /["\r\n\0]/.test(p) || /(^|[\\/ ])\+/.test(p))
28121
28159
  throw new Error(what + " cannot be given to SteamCMD: " + JSON.stringify(p.slice(0, 200)));
28122
28160
  return p;
28123
28161
  }
@@ -28193,19 +28231,19 @@ function withBuildSettings(text, o) {
28193
28231
  function readScript(file2) {
28194
28232
  let size;
28195
28233
  try {
28196
- const stat = fs10.lstatSync(file2);
28234
+ const stat = fs11.lstatSync(file2);
28197
28235
  if (!stat.isFile()) throw new Error("not a file");
28198
28236
  size = stat.size;
28199
28237
  } catch {
28200
28238
  throw new Error("cannot read " + file2 + " (missing, a link, or not a file)");
28201
28239
  }
28202
28240
  if (size > MAX_SCRIPT_BYTES) throw new Error(file2 + " is bigger than " + MAX_SCRIPT_BYTES / 1024 + " KB");
28203
- return fs10.readFileSync(file2, "utf8");
28241
+ return fs11.readFileSync(file2, "utf8");
28204
28242
  }
28205
28243
 
28206
28244
  // src/guest/toolchains/steam/apps.ts
28207
28245
  import fs12 from "node:fs";
28208
- import path14 from "node:path";
28246
+ import path15 from "node:path";
28209
28247
 
28210
28248
  // src/shared/installs.ts
28211
28249
  var INSTALL_RECORDS_FILE = "installs.json";
@@ -28219,19 +28257,13 @@ var InstallRecordSchema = external_exports.object({
28219
28257
  var InstallRecordsSchema = external_exports.object({ installs: external_exports.array(InstallRecordSchema).max(1e3) });
28220
28258
 
28221
28259
  // src/guest/toolchains/persisted.ts
28222
- import fs11 from "node:fs";
28223
- import path13 from "node:path";
28260
+ import path14 from "node:path";
28224
28261
  var GB = 1024 ** 3;
28225
28262
  var LOCAL_RESERVE_BYTES = 13 * GB;
28226
- var toolsOf = (deps) => deps.toolsDir ?? path13.join(dataDir, "tools");
28227
- var recordsFile = (deps) => path13.join(toolsOf(deps), INSTALL_RECORDS_FILE);
28263
+ var toolsOf = (deps) => deps.toolsDir ?? path14.join(dataDir, "tools");
28264
+ var recordsFile = (deps) => path14.join(toolsOf(deps), INSTALL_RECORDS_FILE);
28228
28265
  function freeBytes(dir, deps = {}) {
28229
- try {
28230
- const s = (deps.statfs ?? fs11.statfsSync)(dir);
28231
- return s.bavail * s.bsize;
28232
- } catch {
28233
- return 0;
28234
- }
28266
+ return freeBytesAt(dir, deps.statfs) ?? 0;
28235
28267
  }
28236
28268
  var gb = (bytes) => (bytes / GB).toFixed(1) + " GB";
28237
28269
  function assertRoom(dir, needBytes, what, fix, deps = {}) {
@@ -28254,7 +28286,7 @@ var MAX_MANIFEST_BYTES = 256 * 1024;
28254
28286
  var toolsOf2 = (deps) => deps.toolsDir ?? toolsDir;
28255
28287
  function assertAppRoom(dir, needBytes, what, deps = {}) {
28256
28288
  let probe = dir;
28257
- while (!fs12.existsSync(probe) && path14.dirname(probe) !== probe) probe = path14.dirname(probe);
28289
+ while (!fs12.existsSync(probe) && path15.dirname(probe) !== probe) probe = path15.dirname(probe);
28258
28290
  assertRoom(
28259
28291
  probe,
28260
28292
  needBytes,
@@ -28277,7 +28309,7 @@ function folderSize(dir) {
28277
28309
  }
28278
28310
  for (const e of entries) {
28279
28311
  if (++seen > MAX_WALK) return null;
28280
- const full = path14.join(current, e.name);
28312
+ const full = path15.join(current, e.name);
28281
28313
  if (e.isDirectory()) stack.push(full);
28282
28314
  else if (e.isFile())
28283
28315
  try {
@@ -28302,7 +28334,7 @@ function recordApp(appId, sizeBytes, deps = {}) {
28302
28334
  };
28303
28335
  const installs = [...all.filter((r) => r !== known), record2];
28304
28336
  fs12.mkdirSync(toolsOf2(deps), { recursive: true });
28305
- writeJsonAtomic(path14.join(toolsOf2(deps), INSTALL_RECORDS_FILE), { installs });
28337
+ writeJsonAtomic(path15.join(toolsOf2(deps), INSTALL_RECORDS_FILE), { installs });
28306
28338
  }
28307
28339
  function readAppManifest(file2) {
28308
28340
  const bytes = readBoundedFile(file2, MAX_MANIFEST_BYTES);
@@ -28328,8 +28360,8 @@ function installedApps(deps = {}) {
28328
28360
  }
28329
28361
  const records = installRecords(deps);
28330
28362
  return ids.map((appId) => {
28331
- const dir = path14.join(root, appId);
28332
- const manifest = readAppManifest(path14.join(dir, "steamapps", "appmanifest_" + appId + ".acf"));
28363
+ const dir = path15.join(root, appId);
28364
+ const manifest = readAppManifest(path15.join(dir, "steamapps", "appmanifest_" + appId + ".acf"));
28333
28365
  const record2 = records.find((r) => r.name === STEAM_APPS_RECORD && r.version === appId);
28334
28366
  return { appId, name: manifest?.name ?? "(not downloaded yet)", dir, sizeBytes: record2?.sizeBytes ?? null };
28335
28367
  });
@@ -28369,7 +28401,7 @@ function parse3(args2) {
28369
28401
  }
28370
28402
  return { words, values, flags };
28371
28403
  }
28372
- var steamcmd = () => path15.join(STEAMCMD_DIR, "steamcmd.exe");
28404
+ var steamcmd = () => path16.join(STEAMCMD_DIR, "steamcmd.exe");
28373
28405
  function requireSteamCmd() {
28374
28406
  if (!fs13.existsSync(steamcmd()))
28375
28407
  throw new Error("SteamCMD is not set up in this sandbox (toolchains.steam: see the boot log for why)");
@@ -28400,8 +28432,8 @@ async function login(p) {
28400
28432
  if (!name2) throw new Error("Usage: sbx-steam login <account name>");
28401
28433
  const code = await steamCmd(loginArgs(name2));
28402
28434
  if (code !== 0) return code;
28403
- fs13.mkdirSync(path15.join(STEAMCMD_DIR, "config"), { recursive: true });
28404
- fs13.writeFileSync(path15.join(STEAMCMD_DIR, "config", STEAM_ACCOUNT_FILE), name2, "utf8");
28435
+ fs13.mkdirSync(path16.join(STEAMCMD_DIR, "config"), { recursive: true });
28436
+ fs13.writeFileSync(path16.join(STEAMCMD_DIR, "config", STEAM_ACCOUNT_FILE), name2, "utf8");
28405
28437
  console.log(
28406
28438
  "Signed in as " + name2 + ". SteamCMD keeps the login in C:\\SteamCMD\\config (this sandbox only). With accounts.steam.share on, the PC keeps it, encrypted, for the next sandboxes; no password is kept."
28407
28439
  );
@@ -28410,7 +28442,7 @@ async function login(p) {
28410
28442
  async function app(p) {
28411
28443
  const appId = checkAppId(p.words[1] ?? "");
28412
28444
  const given = p.values.get("--dir");
28413
- const dir = given ? path15.resolve(given) : steamAppDir(appId);
28445
+ const dir = given ? path16.resolve(given) : steamAppDir(appId);
28414
28446
  const needGb = Number(p.values.get("--need-gb") ?? DEFAULT_APP_NEED_BYTES / GB3);
28415
28447
  if (!Number.isFinite(needGb) || needGb < 0 || needGb > 1e4) throw new Error("--need-gb takes a number of GB");
28416
28448
  assertAppRoom(dir, needGb * GB3, "app " + appId);
@@ -28448,7 +28480,7 @@ async function workshop(p) {
28448
28480
  return code;
28449
28481
  }
28450
28482
  if (verb === "push") {
28451
- const script = path15.resolve(p.words[2] ?? "");
28483
+ const script = path16.resolve(p.words[2] ?? "");
28452
28484
  if (scriptKind(readScript(script)) !== "workshopitem")
28453
28485
  throw new Error(script + ' is not a workshop_item script (its first block is not "workshopitem")');
28454
28486
  return steamCmd(workshopPushArgs(account(p, false), script));
@@ -28456,7 +28488,7 @@ async function workshop(p) {
28456
28488
  throw new Error("Usage: sbx-steam workshop get <appid> <item>... | workshop push <workshop_item.vdf>");
28457
28489
  }
28458
28490
  async function build(p) {
28459
- const script = path15.resolve(p.words[1] ?? "");
28491
+ const script = path16.resolve(p.words[1] ?? "");
28460
28492
  const text = readScript(script);
28461
28493
  if (scriptKind(text) !== "appbuild")
28462
28494
  throw new Error(script + ' is not an app_build script (its first block is not "AppBuild")');
@@ -28467,7 +28499,7 @@ async function build(p) {
28467
28499
  preview: p.flags.has("--preview"),
28468
28500
  ...desc !== void 0 ? { desc } : {}
28469
28501
  });
28470
- const copy = path15.join(path15.dirname(script), path15.basename(script, ".vdf") + ".sbx-" + process.pid + ".vdf");
28502
+ const copy = path16.join(path16.dirname(script), path16.basename(script, ".vdf") + ".sbx-" + process.pid + ".vdf");
28471
28503
  fs13.writeFileSync(copy, changed ?? text, "utf8");
28472
28504
  try {
28473
28505
  return await steamCmd(appBuildArgs(login2, copy));
@@ -28494,7 +28526,7 @@ function client() {
28494
28526
  console.error("The Steam client is off: set toolchains.steam.client to true and restart the sandbox.");
28495
28527
  return 1;
28496
28528
  }
28497
- const exe = path15.join(steamClientDir(), "steam.exe");
28529
+ const exe = path16.join(steamClientDir(), "steam.exe");
28498
28530
  if (!fs13.existsSync(exe)) {
28499
28531
  console.error("The Steam client is not set up (see the boot log).");
28500
28532
  return 1;