windows-development-sandbox 1.27.1 → 1.28.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.
- package/dist/app/context.d.ts +5 -0
- package/dist/app/context.js +13 -0
- package/dist/app/features/accounts/accounts.def.d.ts +16 -0
- package/dist/app/features/accounts/accounts.run.d.ts +4 -0
- package/dist/app/features/accounts/services.def.d.ts +15 -1
- package/dist/app/features/accounts/services.def.js +67 -31
- package/dist/app/features/accounts/services.run.d.ts +7 -2
- package/dist/app/features/accounts/services.run.js +25 -6
- package/dist/app/features/defs.d.ts +17 -0
- package/dist/app/registry.d.ts +1 -1
- package/dist/app/registry.js +15 -2
- package/dist/bin/agent-sandbox.js +2 -2
- package/dist/bin/{chunk-RSIX7C6D.js → chunk-CB44HTTN.js} +444 -175
- package/dist/bin/{chunk-4TLSWPG7.js → chunk-UZ5S3EMB.js} +1 -1
- package/dist/bin/{chunk-QUHNXHVG.js → chunk-ZMZI3625.js} +46 -41
- package/dist/bin/claude-host.js +2 -2
- package/dist/bin/claude-sbx.js +2 -2
- package/dist/bin/codex-sbx.js +2 -2
- package/dist/bin/gemini-sbx.js +2 -2
- package/dist/bin/sandbox.js +2 -2
- package/dist/bin/sbx-hide.js +2 -2
- package/dist/bin/sbx-show.js +2 -2
- package/dist/cli/menu/menu.js +6 -1
- package/dist/cli/menu/pages/accounts-page.js +9 -5
- package/dist/core/schema/sandbox.js +1 -1
- package/dist/guest/apps/app-installer.js +7 -5
- package/dist/guest/apps/comet-unpack.js +2 -2
- package/dist/guest/daemon/heartbeat.js +1 -0
- package/dist/guest/governor/core.d.ts +53 -1
- package/dist/guest/governor/core.js +95 -1
- package/dist/guest/governor/decide.d.ts +4 -0
- package/dist/guest/governor/decide.js +2 -0
- package/dist/guest/governor/governor.js +23 -9
- package/dist/guest/runtime/pools.d.ts +4 -4
- package/dist/guest/runtime/pools.js +4 -15
- package/dist/guest/runtime/process.d.ts +5 -2
- package/dist/guest/runtime/process.js +23 -3
- package/dist/guest/toolchains/engines/epic-launcher.d.ts +6 -0
- package/dist/guest/toolchains/engines/epic-launcher.js +19 -1
- package/dist/guest/toolchains/engines/unreal-engines.js +2 -1
- package/dist/guest/toolchains/installers.d.ts +3 -3
- package/dist/guest/toolchains/installers.js +5 -5
- package/dist/guest/toolchains/native/unreal.js +22 -3
- package/dist/guest/toolchains/native/vcruntime.js +2 -2
- package/dist/guest/toolchains/native/vs-persist.d.ts +2 -2
- package/dist/guest/toolchains/runtimes.js +7 -6
- package/dist/guest/toolchains/signature.d.ts +2 -0
- package/dist/guest/toolchains/signature.js +9 -2
- package/dist/guest/toolchains/step-scheduler.js +1 -1
- package/dist/host/accounts/deliver.js +15 -7
- package/dist/host/life/crash-report.d.ts +4 -0
- package/dist/host/life/crash-report.js +30 -1
- package/dist/host/life/last-end.js +1 -0
- package/dist/host/pc-installs/discover.js +5 -2
- package/dist/host/pc-installs/unreal.d.ts +3 -1
- package/dist/host/pc-installs/unreal.js +27 -1
- package/dist/host/tools/windows-terminal.d.ts +4 -1
- package/dist/host/tools/windows-terminal.js +25 -9
- package/dist/runtime/agent.js +39 -23
- package/dist/runtime/daemon.js +279 -121
- package/dist/runtime/db.js +37 -17
- package/dist/runtime/main.js +340 -109
- package/dist/runtime/netproxy.js +31 -13
- package/dist/runtime/tool.js +37 -16
- package/dist/runtime/view.js +150 -38
- package/dist/selftest/agent-paths.test.js +3 -1
- package/dist/selftest/app.test.js +20 -2
- package/dist/selftest/boot-runner.test.js +15 -1
- package/dist/selftest/channel.test.js +33 -0
- package/dist/selftest/engines.test.js +22 -1
- package/dist/selftest/heavy-load.test.js +116 -4
- package/dist/selftest/live-terminal.test.js +103 -0
- package/dist/selftest/menu-screens.js +52 -1
- package/dist/selftest/menu.test.js +29 -3
- package/dist/selftest/personalization.test.js +2 -1
- package/dist/selftest/service-accounts.test.js +77 -2
- package/dist/selftest/support/engine-golden.js +2 -0
- package/dist/selftest/ui-text.test.js +4 -0
- package/dist/shared/accounts/kinds.js +9 -9
- package/dist/shared/apps/catalogue-gamedev.js +1 -0
- package/dist/shared/apps/catalogue.d.ts +2 -0
- package/dist/shared/channel/schema.d.ts +2 -0
- package/dist/shared/channel/schema.js +4 -0
- package/dist/shared/concurrency/pools.js +1 -1
- package/dist/shared/download/archive.js +4 -2
- package/dist/shared/download/index.d.ts +1 -1
- package/dist/shared/download/index.js +1 -1
- package/dist/shared/download/spawn.d.ts +7 -1
- package/dist/shared/download/spawn.js +16 -1
- package/dist/shared/memory/index.d.ts +1 -0
- package/dist/shared/memory/index.js +1 -0
- package/dist/shared/memory/policy.d.ts +12 -0
- package/dist/shared/memory/policy.js +4 -0
- package/dist/shared/memory/unreal-build.d.ts +2 -0
- package/dist/shared/memory/unreal-build.js +21 -0
- package/dist/shared/paths/pc-installs.d.ts +8 -0
- package/dist/shared/pty/clipboard-watch.d.ts +4 -0
- package/dist/shared/pty/clipboard-watch.js +40 -0
- package/dist/shared/pty/ctrl-c.d.ts +13 -7
- package/dist/shared/pty/ctrl-c.js +35 -19
- package/dist/shared/pty/index.d.ts +1 -0
- package/dist/shared/pty/index.js +1 -0
- package/dist/shared/pty/terminal.d.ts +1 -1
- package/dist/shared/pty/terminal.js +16 -13
- package/dist/shared/unreal/launcher-files.d.ts +7 -0
- package/dist/shared/unreal/launcher-files.js +32 -1
- package/dist/shared/web/ctrl-c.d.ts +26 -0
- package/dist/shared/web/ctrl-c.js +64 -0
- package/dist/shared/web/index.d.ts +1 -0
- package/dist/shared/web/index.js +1 -0
- package/dist/web/index.html +1 -1
- package/dist/web/{main-VPMYTSUL.js → main-7NY4X6YU.js} +67 -67
- package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
- package/native/csharp/StorageHelper/AssemblyInfo.cs +3 -3
- package/package.json +1 -1
- package/sandbox/csharp/ClipboardWatch.cs +59 -0
- package/sandbox/csharp/MemGov.cs +752 -7
- package/sandbox/scripts/watch-clipboard.ps1 +8 -0
- package/schemas/config.schema.json +10 -10
- package/schemas/sandbox-config.schema.json +9 -9
package/dist/runtime/db.js
CHANGED
|
@@ -25478,7 +25478,7 @@ var SandboxSchema = external_exports.strictObject({
|
|
|
25478
25478
|
'The last resort that keeps the sandbox up, in MB below its commit limit (RAM plus paging file): builds are slowed down long before (sandbox.pressureResponse); only if everything the agents start together would take the sandbox to the very edge of its memory, where Windows inside it would start failing, is a build refused memory instead of Windows. "auto" = the larger of 1536 MB and 3 % of the commit limit; "none" = no backstop. Yours only: a project file cannot change it.'
|
|
25479
25479
|
),
|
|
25480
25480
|
pressureResponse: external_exports.boolean().describe(
|
|
25481
|
-
"When the sandbox (or this PC) runs low on memory, slow builds down in steps, like a PC that gets slower instead of failing: build programs get lower CPU and memory priority, then less CPU, then compilers take turns (the waiting ones briefly suspended and trimmed to the paging file). Nothing is stopped or killed, and the agents themselves are never touched. Yours only: a project file cannot change it."
|
|
25481
|
+
"When the sandbox (or this PC) runs low on memory, slow builds down in steps, like a PC that gets slower instead of failing: build programs get lower CPU and memory priority, then less CPU, then compilers take turns (the waiting ones briefly suspended and trimmed to the paging file). Nothing is stopped or killed, and the agents themselves are never touched. A memory gate also holds new compilers and linkers for a moment when the memory of the build programs grows faster than 4 GB in 3 seconds (3 GB with vGPU), and lets them go one at a time. Yours only: a project file cannot change it."
|
|
25482
25482
|
),
|
|
25483
25483
|
vGpu: external_exports.boolean().describe(
|
|
25484
25484
|
"Virtual GPU. Off by default: Microsoft notes it widens the sandbox attack surface. The sandbox then uses this PC's graphics card, and with some graphics drivers heavy use can freeze the whole PC: turn it on only when a program in the sandbox needs the GPU (the mesa toolchain gives software OpenGL without it). Browsers in the sandbox never use it (they draw in software)."
|
|
@@ -26069,6 +26069,7 @@ var GAMEDEV_APPS = [
|
|
|
26069
26069
|
size: "100 MB",
|
|
26070
26070
|
source: { github: "f3d-app/f3d", asset: "^F3D-[\\d.]+-Windows-x86_64\\.zip$" },
|
|
26071
26071
|
exe: "f3d.exe",
|
|
26072
|
+
onPath: true,
|
|
26072
26073
|
needs: ["mesa"]
|
|
26073
26074
|
},
|
|
26074
26075
|
{
|
|
@@ -27168,7 +27169,7 @@ var SERVICE_SPECS = {
|
|
|
27168
27169
|
},
|
|
27169
27170
|
steam: {
|
|
27170
27171
|
kind: "steam",
|
|
27171
|
-
label: "Steam
|
|
27172
|
+
label: "Steam",
|
|
27172
27173
|
usedBy: ["steam"],
|
|
27173
27174
|
sources: ["file", "sandbox"],
|
|
27174
27175
|
singleHolder: true,
|
|
@@ -27204,7 +27205,7 @@ var SERVICE_SPECS = {
|
|
|
27204
27205
|
},
|
|
27205
27206
|
cfx: {
|
|
27206
27207
|
kind: "cfx",
|
|
27207
|
-
label: "
|
|
27208
|
+
label: "FiveM key",
|
|
27208
27209
|
usedBy: ["fivem"],
|
|
27209
27210
|
sources: ["typed", "file"],
|
|
27210
27211
|
singleHolder: false,
|
|
@@ -27233,7 +27234,7 @@ var SERVICE_SPECS = {
|
|
|
27233
27234
|
},
|
|
27234
27235
|
keystore: {
|
|
27235
27236
|
kind: "keystore",
|
|
27236
|
-
label: "Android
|
|
27237
|
+
label: "Android keystore",
|
|
27237
27238
|
usedBy: ["android"],
|
|
27238
27239
|
sources: ["file"],
|
|
27239
27240
|
singleHolder: false,
|
|
@@ -27248,7 +27249,7 @@ var SERVICE_SPECS = {
|
|
|
27248
27249
|
},
|
|
27249
27250
|
play: {
|
|
27250
27251
|
kind: "play",
|
|
27251
|
-
label: "Google Play
|
|
27252
|
+
label: "Google Play",
|
|
27252
27253
|
usedBy: ["android"],
|
|
27253
27254
|
sources: ["file"],
|
|
27254
27255
|
singleHolder: false,
|
|
@@ -27259,7 +27260,7 @@ var SERVICE_SPECS = {
|
|
|
27259
27260
|
},
|
|
27260
27261
|
expo: {
|
|
27261
27262
|
kind: "expo",
|
|
27262
|
-
label: "Expo
|
|
27263
|
+
label: "Expo",
|
|
27263
27264
|
usedBy: ["reactNative"],
|
|
27264
27265
|
sources: ["typed"],
|
|
27265
27266
|
singleHolder: false,
|
|
@@ -27270,7 +27271,7 @@ var SERVICE_SPECS = {
|
|
|
27270
27271
|
},
|
|
27271
27272
|
appstore: {
|
|
27272
27273
|
kind: "appstore",
|
|
27273
|
-
label: "App Store Connect
|
|
27274
|
+
label: "App Store Connect",
|
|
27274
27275
|
usedBy: ["reactNative", "flutter"],
|
|
27275
27276
|
sources: ["file", "typed"],
|
|
27276
27277
|
singleHolder: false,
|
|
@@ -27284,7 +27285,7 @@ var SERVICE_SPECS = {
|
|
|
27284
27285
|
},
|
|
27285
27286
|
perplexity: {
|
|
27286
27287
|
kind: "perplexity",
|
|
27287
|
-
label: "Perplexity API
|
|
27288
|
+
label: "Perplexity API",
|
|
27288
27289
|
usedBy: ["perplexity"],
|
|
27289
27290
|
sources: ["pc", "file", "typed"],
|
|
27290
27291
|
singleHolder: false,
|
|
@@ -27308,7 +27309,7 @@ var SERVICE_SPECS = {
|
|
|
27308
27309
|
},
|
|
27309
27310
|
comet: {
|
|
27310
27311
|
kind: "comet",
|
|
27311
|
-
label: "Comet
|
|
27312
|
+
label: "Comet",
|
|
27312
27313
|
usedBy: ["comet"],
|
|
27313
27314
|
sources: ["sandbox"],
|
|
27314
27315
|
singleHolder: false,
|
|
@@ -27324,7 +27325,7 @@ var SERVICE_SPECS = {
|
|
|
27324
27325
|
},
|
|
27325
27326
|
perplexityapp: {
|
|
27326
27327
|
kind: "perplexityapp",
|
|
27327
|
-
label: "Perplexity
|
|
27328
|
+
label: "Perplexity app",
|
|
27328
27329
|
usedBy: ["perplexityapp"],
|
|
27329
27330
|
sources: ["sandbox"],
|
|
27330
27331
|
singleHolder: false,
|
|
@@ -27675,6 +27676,8 @@ var PressureStatusSchema = external_exports.object({
|
|
|
27675
27676
|
lowered: external_exports.number().int().min(0).max(1024),
|
|
27676
27677
|
/** Compilers waiting their turn right now (name, process id, seconds until they may go on). */
|
|
27677
27678
|
paused: external_exports.array(external_exports.object({ name: Text(64), pid: external_exports.number().int(), seconds: external_exports.number().int().min(0).max(60) })).max(8),
|
|
27679
|
+
/** Build programs the memory gate holds right now (let go one at a time). */
|
|
27680
|
+
held: external_exports.number().int().min(0).max(1024).optional(),
|
|
27678
27681
|
/** The CPU share the compilers get together (percent; 100 = no cap). */
|
|
27679
27682
|
cpuPercent: external_exports.number().int().min(0).max(100).optional(),
|
|
27680
27683
|
/** The PC itself asked for slowing down (its memory or CPU is low). */
|
|
@@ -27695,6 +27698,8 @@ var HeartbeatSchema = external_exports.object({
|
|
|
27695
27698
|
topProcesses: external_exports.array(external_exports.object({ name: Text(64), privateMb: external_exports.number().int().min(0).max(1e7) })).max(5),
|
|
27696
27699
|
/** The disk queue this PC last reported while asking the sandbox to slow down. */
|
|
27697
27700
|
diskQueueReported: external_exports.number().min(0).max(1e5).optional(),
|
|
27701
|
+
/** Build programs the memory gate holds right now (let go one at a time). */
|
|
27702
|
+
held: external_exports.number().int().min(0).max(1024).optional(),
|
|
27698
27703
|
/** "ending": the sandbox is shutting down in order (idle shutdown, sandbox stop, Windows shutting down). */
|
|
27699
27704
|
phase: external_exports.enum(["ready", "working", "ending"])
|
|
27700
27705
|
});
|
|
@@ -28160,10 +28165,20 @@ function scriptArgs(name, args = []) {
|
|
|
28160
28165
|
}
|
|
28161
28166
|
|
|
28162
28167
|
// src/shared/download/spawn.ts
|
|
28168
|
+
import os3 from "node:os";
|
|
28163
28169
|
import { spawn } from "node:child_process";
|
|
28170
|
+
function lowerPriority(pid) {
|
|
28171
|
+
if (pid === void 0) return;
|
|
28172
|
+
try {
|
|
28173
|
+
os3.setPriority(pid, os3.constants.priority.PRIORITY_BELOW_NORMAL);
|
|
28174
|
+
} catch {
|
|
28175
|
+
}
|
|
28176
|
+
}
|
|
28164
28177
|
function spawnAsync(file2, args, options = {}) {
|
|
28178
|
+
const { lowPriority, ...spawnOptions } = options;
|
|
28165
28179
|
return new Promise((resolve, reject) => {
|
|
28166
|
-
const child = spawn(file2, args, { stdio: "ignore", windowsHide: true, ...
|
|
28180
|
+
const child = spawn(file2, args, { stdio: "ignore", windowsHide: true, ...spawnOptions });
|
|
28181
|
+
if (lowPriority) lowerPriority(child.pid);
|
|
28167
28182
|
child.once("error", reject);
|
|
28168
28183
|
child.once("close", (code) => resolve(code ?? -1));
|
|
28169
28184
|
});
|
|
@@ -28184,13 +28199,16 @@ function extractArchive(archive, destination, members2 = []) {
|
|
|
28184
28199
|
}
|
|
28185
28200
|
async function extract(archive, destination, members2) {
|
|
28186
28201
|
fs7.mkdirSync(destination, { recursive: true });
|
|
28187
|
-
let status = await spawnAsync(SYSTEM.tar(), ["-xf", archive, "-C", destination, ...members2]
|
|
28202
|
+
let status = await spawnAsync(SYSTEM.tar(), ["-xf", archive, "-C", destination, ...members2], {
|
|
28203
|
+
lowPriority: true
|
|
28204
|
+
});
|
|
28188
28205
|
if (status !== 0 && /\.(zip|nupkg)$/i.test(archive)) {
|
|
28189
28206
|
const zip = archive.endsWith(".zip") ? archive : archive + ".zip";
|
|
28190
28207
|
if (zip !== archive) fs7.copyFileSync(archive, zip);
|
|
28191
28208
|
status = await spawnAsync(
|
|
28192
28209
|
SYSTEM.powershell(),
|
|
28193
|
-
scriptArgs("expand-archive.ps1", ["-Archive", zip, "-Destination", destination])
|
|
28210
|
+
scriptArgs("expand-archive.ps1", ["-Archive", zip, "-Destination", destination]),
|
|
28211
|
+
{ lowPriority: true }
|
|
28194
28212
|
);
|
|
28195
28213
|
}
|
|
28196
28214
|
if (status !== 0) throw new Error("Could not extract " + archive);
|
|
@@ -28439,7 +28457,7 @@ import { spawn as spawn4 } from "node:child_process";
|
|
|
28439
28457
|
|
|
28440
28458
|
// src/guest/runtime/process.ts
|
|
28441
28459
|
import fs10 from "node:fs";
|
|
28442
|
-
import
|
|
28460
|
+
import os4 from "node:os";
|
|
28443
28461
|
import path12 from "node:path";
|
|
28444
28462
|
import { spawn as spawn2, spawnSync as spawnSync2 } from "node:child_process";
|
|
28445
28463
|
var outputSink = null;
|
|
@@ -28461,13 +28479,15 @@ function logLines(stream) {
|
|
|
28461
28479
|
stream.on("end", () => logOutput(partial2));
|
|
28462
28480
|
}
|
|
28463
28481
|
async function execAsync(file2, args, options = {}) {
|
|
28482
|
+
const { lowPriority, ...spawnOptions } = options;
|
|
28464
28483
|
const code = captureOutput() ? await new Promise((resolve, reject) => {
|
|
28465
|
-
const child = spawn2(file2, args, { stdio: ["inherit", "pipe", "pipe"], windowsHide: true, ...
|
|
28484
|
+
const child = spawn2(file2, args, { stdio: ["inherit", "pipe", "pipe"], windowsHide: true, ...spawnOptions });
|
|
28485
|
+
if (lowPriority) lowerPriority(child.pid);
|
|
28466
28486
|
logLines(child.stdout);
|
|
28467
28487
|
logLines(child.stderr);
|
|
28468
28488
|
child.once("error", reject);
|
|
28469
28489
|
child.once("close", (c) => resolve(c ?? -1));
|
|
28470
|
-
}) : await spawnAsync(file2, args, { stdio: "inherit", ...
|
|
28490
|
+
}) : await spawnAsync(file2, args, { stdio: "inherit", ...spawnOptions, ...lowPriority ? { lowPriority } : {} });
|
|
28471
28491
|
if (code !== 0)
|
|
28472
28492
|
throw new Error(path12.basename(file2) + " " + args.slice(0, 3).join(" ") + " failed with exit code " + code);
|
|
28473
28493
|
}
|
|
@@ -28492,7 +28512,7 @@ function runScript(name, args = []) {
|
|
|
28492
28512
|
throw new Error(name + " failed with exit code " + result.status + (errors ? ": " + errors.slice(0, 400) : ""));
|
|
28493
28513
|
}
|
|
28494
28514
|
function runScriptWithJson(name, param, data, args = []) {
|
|
28495
|
-
const dir = fs10.mkdtempSync(path12.join(
|
|
28515
|
+
const dir = fs10.mkdtempSync(path12.join(os4.tmpdir(), "sbx-"));
|
|
28496
28516
|
const file2 = path12.join(dir, "input.json");
|
|
28497
28517
|
try {
|
|
28498
28518
|
fs10.writeFileSync(file2, JSON.stringify(data), "utf8");
|