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.
- package/README.md +1 -1
- package/config.example.json +9 -0
- package/dist/app/features/accounts/accounts.def.d.ts +4 -0
- package/dist/app/features/accounts/accounts.run.d.ts +1 -0
- package/dist/app/features/accounts/services.def.d.ts +3 -0
- package/dist/app/features/accounts/services.def.js +4 -2
- package/dist/app/features/accounts/services.run.d.ts +1 -0
- package/dist/app/features/accounts/services.run.js +3 -1
- package/dist/app/features/agent-commands/agent-commands.def.d.ts +37 -0
- package/dist/app/features/agent-commands/agent-commands.def.js +91 -0
- package/dist/app/features/agent-commands/agent-commands.run.d.ts +28 -0
- package/dist/app/features/agent-commands/agent-commands.run.js +35 -0
- package/dist/app/features/agent-commands/index.d.ts +2 -0
- package/dist/app/features/agent-commands/index.js +3 -0
- package/dist/app/features/agents/agents.def.d.ts +14 -1
- package/dist/app/features/agents/agents.def.js +61 -6
- package/dist/app/features/agents/agents.run.d.ts +1 -0
- package/dist/app/features/agents/agents.run.js +8 -1
- package/dist/app/features/agents/claude-env.def.d.ts +36 -0
- package/dist/app/features/agents/claude-env.def.js +305 -0
- package/dist/app/features/agents/env.def.d.ts +163 -0
- package/dist/app/features/agents/env.def.js +184 -0
- package/dist/app/features/agents/env.run.d.ts +43 -0
- package/dist/app/features/agents/env.run.js +86 -0
- package/dist/app/features/agents/index.d.ts +2 -0
- package/dist/app/features/agents/index.js +2 -0
- package/dist/app/features/defs.d.ts +150 -1
- package/dist/app/features/defs.js +11 -1
- package/dist/app/features/sandbox/sandbox.def.d.ts +22 -0
- package/dist/app/features/sandbox/sandbox.def.js +41 -14
- package/dist/app/features/sandbox/sandbox.run.d.ts +20 -0
- package/dist/app/features/sandbox/sandbox.run.js +41 -1
- package/dist/app/features/settings/categories.def.js +5 -2
- package/dist/app/features/settings/settings-rows.js +5 -1
- package/dist/app/features/settings/settings.run.d.ts +8 -0
- package/dist/app/features/settings/settings.run.js +9 -0
- package/dist/app/features/updates/updates.run.js +12 -2
- package/dist/app/features/vpn/vpn.def.d.ts +33 -0
- package/dist/app/features/vpn/vpn.def.js +30 -6
- package/dist/app/features/vpn/vpn.run.d.ts +11 -0
- package/dist/app/features/vpn/vpn.run.js +4 -1
- package/dist/app/kernel/rpc.d.ts +1 -1
- package/dist/app/registry.js +9 -2
- package/dist/bin/agent-sandbox.js +2 -2
- package/dist/bin/{chunk-M6XUQK53.js → chunk-2IMT7ZCT.js} +1 -1
- package/dist/bin/{chunk-3G53NNZP.js → chunk-DK4NTBUF.js} +69 -26
- package/dist/bin/{chunk-FQWYCF6L.js → chunk-Z2P5OGKL.js} +6427 -5259
- 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/commands/agent-commands.d.ts +0 -1
- package/dist/cli/commands/agent-commands.js +2 -32
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.js +1 -1
- package/dist/cli/commands/launch/launch.js +6 -3
- package/dist/cli/commands/launch/leftover-offer.d.ts +3 -0
- package/dist/cli/commands/launch/leftover-offer.js +26 -0
- package/dist/cli/commands/registry.js +3 -2
- package/dist/cli/commands/repair/checks/sandbox.js +29 -2
- package/dist/cli/manifest.d.ts +1 -1
- package/dist/cli/manifest.js +1 -1
- package/dist/cli/menu/menu.d.ts +1 -1
- package/dist/cli/menu/menu.js +3 -3
- package/dist/cli/menu/pages/agents-page.d.ts +7 -2
- package/dist/cli/menu/pages/agents-page.js +67 -11
- package/dist/cli/menu/pages/maintenance-page.js +1 -2
- package/dist/cli/menu/pages/settings-page.js +1 -0
- package/dist/cli/menu/views.js +2 -1
- package/dist/cli/services/agent-commands-service.d.ts +2 -0
- package/dist/cli/services/agent-commands-service.js +13 -7
- package/dist/cli/services/vpn-service.d.ts +5 -1
- package/dist/cli/services/vpn-service.js +6 -1
- package/dist/cli/tui/dialogs/text-screen.js +2 -1
- package/dist/cli/tui/terminal.js +3 -1
- package/dist/core/config/defaults.js +9 -0
- package/dist/core/detect/toolchains.js +9 -0
- package/dist/core/disk.d.ts +1 -5
- package/dist/core/disk.js +1 -16
- package/dist/core/schema/codex.d.ts +29 -0
- package/dist/core/schema/codex.js +24 -0
- package/dist/core/schema/config.d.ts +46 -14
- package/dist/core/schema/config.js +2 -0
- package/dist/core/schema/index.d.ts +1 -0
- package/dist/core/schema/index.js +1 -0
- package/dist/core/schema/toolchains.d.ts +4 -0
- package/dist/core/schema/toolchains.js +3 -0
- package/dist/core/types.d.ts +2 -0
- package/dist/guest/accounts/apply.d.ts +6 -6
- package/dist/guest/agents/agent-files.d.ts +26 -6
- package/dist/guest/agents/agent-files.js +84 -14
- package/dist/guest/agents/local-state.d.ts +5 -2
- package/dist/guest/agents/local-state.js +24 -10
- package/dist/guest/boot/boot.js +10 -5
- package/dist/guest/daemon/heartbeat.d.ts +7 -2
- package/dist/guest/daemon/heartbeat.js +34 -15
- package/dist/guest/daemon/idle-shutdown.js +2 -0
- package/dist/guest/daemon/sessions.js +2 -1
- package/dist/guest/entries/daemon.js +1 -1
- package/dist/guest/toolchains/installers.d.ts +6 -10
- package/dist/guest/toolchains/installers.js +4 -12
- package/dist/guest/toolchains/native/autosdk.d.ts +3 -0
- package/dist/guest/toolchains/native/autosdk.js +50 -0
- package/dist/guest/toolchains/native/unreal.js +3 -0
- package/dist/guest/toolchains/native/vcruntime.d.ts +0 -3
- package/dist/guest/toolchains/native/vcruntime.js +2 -5
- package/dist/guest/toolchains/native/visual-studio.d.ts +2 -2
- package/dist/guest/toolchains/native/visual-studio.js +100 -16
- package/dist/guest/toolchains/native/vs-request.d.ts +21 -0
- package/dist/guest/toolchains/native/vs-request.js +60 -1
- package/dist/guest/toolchains/not-yet.d.ts +1 -1
- package/dist/guest/toolchains/not-yet.js +3 -3
- package/dist/guest/toolchains/persisted.js +2 -7
- package/dist/guest/toolchains/plan.js +9 -4
- package/dist/guest/toolchains/signature.d.ts +5 -0
- package/dist/guest/toolchains/signature.js +22 -0
- package/dist/guest/vpn/tunnel.d.ts +3 -0
- package/dist/guest/vpn/tunnel.js +10 -12
- package/dist/guest/vpn/vpn.js +6 -1
- package/dist/host/accounts/leases.d.ts +3 -3
- package/dist/host/accounts/source.js +1 -1
- package/dist/host/agent-commands/commands.js +1 -1
- package/dist/host/agent-commands/forwarders.d.ts +14 -2
- package/dist/host/agent-commands/forwarders.js +31 -13
- package/dist/host/agent-commands/reconcile.d.ts +2 -1
- package/dist/host/agent-commands/reconcile.js +7 -8
- package/dist/host/agent-commands/user-path.d.ts +5 -0
- package/dist/host/agent-commands/user-path.js +13 -0
- package/dist/host/health/index.d.ts +1 -0
- package/dist/host/health/index.js +1 -0
- package/dist/host/health/leftovers.d.ts +3 -0
- package/dist/host/health/leftovers.js +40 -0
- package/dist/host/health/stale.d.ts +48 -0
- package/dist/host/health/stale.js +40 -0
- package/dist/host/launch/session-file.js +1 -0
- package/dist/host/life/crash-report.d.ts +1 -1
- package/dist/host/life/crash-report.js +5 -3
- package/dist/host/life/last-end.d.ts +7 -0
- package/dist/host/life/last-end.js +21 -0
- package/dist/host/life/life-record.d.ts +3 -0
- package/dist/host/life/life-record.js +2 -2
- package/dist/host/life/stop-events.d.ts +3 -1
- package/dist/host/life/stop-events.js +59 -0
- package/dist/host/life/stop-warning.js +3 -0
- package/dist/host/profile/accounts.js +2 -4
- package/dist/host/profile/claude-login.d.ts +3 -2
- package/dist/host/profile/claude-login.js +3 -13
- package/dist/host/sandbox/cleanup.d.ts +37 -0
- package/dist/host/sandbox/cleanup.js +82 -0
- package/dist/host/sandbox/index.d.ts +1 -0
- package/dist/host/sandbox/index.js +1 -0
- package/dist/host/sandbox/platform.js +1 -1
- package/dist/host/vpn/index.d.ts +2 -1
- package/dist/host/vpn/index.js +2 -1
- package/dist/host/vpn/last.d.ts +28 -0
- package/dist/host/vpn/last.js +43 -0
- package/dist/host/vpn/login.d.ts +3 -1
- package/dist/host/vpn/login.js +17 -3
- package/dist/runtime/agent.js +31 -1
- package/dist/runtime/daemon.js +1419 -1197
- package/dist/runtime/db.js +33 -1
- package/dist/runtime/main.js +1311 -1037
- package/dist/runtime/netproxy.js +25 -1
- package/dist/runtime/tool.js +241 -209
- package/dist/runtime/view.js +25 -1
- package/dist/selftest/agent-commands.test.js +45 -7
- package/dist/selftest/agent-paths.test.js +1 -12
- package/dist/selftest/agent-settings.test.d.ts +2 -0
- package/dist/selftest/agent-settings.test.js +94 -0
- package/dist/selftest/app.test.js +2 -1
- package/dist/selftest/cli.test.js +4 -0
- package/dist/selftest/heavy-load.test.js +119 -2
- package/dist/selftest/index.js +2 -0
- package/dist/selftest/menu.test.js +5 -3
- package/dist/selftest/pc-installs.test.js +5 -0
- package/dist/selftest/persisted-installs.test.js +69 -0
- package/dist/selftest/service-accounts.test.js +1 -1
- package/dist/selftest/support/engine-golden.js +1 -1
- package/dist/selftest/support/fixtures.d.ts +9 -0
- package/dist/selftest/vpn.test.js +51 -3
- package/dist/shared/accounts/anthropic.d.ts +5 -0
- package/dist/shared/accounts/anthropic.js +15 -0
- package/dist/shared/accounts/index.d.ts +1 -0
- package/dist/shared/accounts/index.js +1 -0
- package/dist/shared/channel/schema.d.ts +20 -0
- package/dist/shared/channel/schema.js +4 -1
- package/dist/shared/io/disk.d.ts +9 -0
- package/dist/shared/io/disk.js +19 -0
- package/dist/shared/io/index.d.ts +1 -0
- package/dist/shared/io/index.js +1 -0
- package/dist/shared/readiness.d.ts +9 -0
- package/dist/shared/readiness.js +11 -0
- package/dist/shared/signer.d.ts +24 -0
- package/dist/shared/signer.js +15 -0
- package/dist/shared/system.d.ts +1 -0
- package/dist/shared/system.js +1 -0
- package/dist/shared/vpn/failure.d.ts +10 -0
- package/dist/shared/vpn/failure.js +28 -0
- package/dist/sync/watcher.js +11 -4
- package/dist/web/index.html +1 -1
- package/dist/web/{main-6XYO5FZC.js → main-OUUQYNK4.js} +75 -74
- package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/Program.cs +19 -2
- package/native/csharp/HostTools/UserPath.cs +17 -0
- package/native/csharp/StorageHelper/AssemblyInfo.cs +3 -3
- package/native/scripts/edit-user-path.ps1 +6 -2
- package/native/scripts/stop-events.ps1 +7 -3
- package/package.json +1 -1
- package/sandbox/scripts/get-signature.ps1 +13 -0
- package/schemas/config.schema.json +64 -0
- package/schemas/sandbox-config.schema.json +8 -0
- package/sandbox/scripts/get-signer.ps1 +0 -8
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// "Agent commands"
|
|
1
|
+
// "Agent commands": typing claude, codex ... on this PC starts them in a hidden sandbox. Never prints.
|
|
2
2
|
import fs from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
3
|
import { loadConfig, userConfigPath } from '../../core/config/index.js';
|
|
5
4
|
import { fail } from '../../core/util/index.js';
|
|
6
|
-
import { agentCommands, agentCommandsAsync, commandsDir, reconcileAgentCommands, } from '../../host/agent-commands/index.js';
|
|
5
|
+
import { agentCommands, agentCommandsAsync, commandsDir, forwardTarget, reconcileAgentCommands, } from '../../host/agent-commands/index.js';
|
|
6
|
+
import { InstallLayout } from '../../host/install/layout.js';
|
|
7
7
|
import { insideSandbox } from '../../host/sandbox/index.js';
|
|
8
8
|
import { writeFileAtomic } from '../../shared/io/index.js';
|
|
9
|
-
import { editConfigText } from '../../app/features/settings/
|
|
9
|
+
import { editConfigText } from '../../app/features/settings/settings-file.js';
|
|
10
10
|
export class AgentCommandsService {
|
|
11
11
|
ctx;
|
|
12
12
|
constructor(ctx) {
|
|
@@ -17,8 +17,12 @@ export class AgentCommandsService {
|
|
|
17
17
|
if (insideSandbox())
|
|
18
18
|
fail("Agent commands change your PC's PATH, so they are set up from your PC, not inside the sandbox.", 'Run sandbox agent-commands on in a terminal on your PC.');
|
|
19
19
|
}
|
|
20
|
+
/** Your settings as they are on disk now (a switch made a moment ago, here or in Settings, counts). */
|
|
21
|
+
config() {
|
|
22
|
+
return loadConfig(this.ctx.loaded.configPath ?? undefined).config;
|
|
23
|
+
}
|
|
20
24
|
status() {
|
|
21
|
-
const
|
|
25
|
+
const config = this.config();
|
|
22
26
|
return {
|
|
23
27
|
enabled: config.agentCommands.enabled,
|
|
24
28
|
dir: commandsDir(this.ctx.storageRoot),
|
|
@@ -27,7 +31,7 @@ export class AgentCommandsService {
|
|
|
27
31
|
}
|
|
28
32
|
/** status() that does not block the program (the menu asks while it stays responsive). */
|
|
29
33
|
async statusAsync() {
|
|
30
|
-
const
|
|
34
|
+
const config = this.config();
|
|
31
35
|
return {
|
|
32
36
|
enabled: config.agentCommands.enabled,
|
|
33
37
|
dir: commandsDir(this.ctx.storageRoot),
|
|
@@ -48,6 +52,8 @@ export class AgentCommandsService {
|
|
|
48
52
|
reconcile(config) {
|
|
49
53
|
if (insideSandbox())
|
|
50
54
|
return null;
|
|
51
|
-
|
|
55
|
+
// Under a managed install the forwarding files call its launcher, which keeps working after an update.
|
|
56
|
+
const installRoot = InstallLayout.detect(this.ctx.packageRoot)?.root ?? null;
|
|
57
|
+
return reconcileAgentCommands(config, this.ctx.storageRoot, forwardTarget(this.ctx.packageRoot, installRoot, process.execPath));
|
|
52
58
|
}
|
|
53
59
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Config } from '../../core/types.js';
|
|
2
2
|
import type { VpnProvider } from '../../core/schema/index.js';
|
|
3
3
|
import type { SecretStore } from '../../host/secrets/index.js';
|
|
4
|
-
import { type LoginState, type VpnCredentials, type VpnLine } from '../../host/vpn/index.js';
|
|
4
|
+
import { type VpnFailureInfo, type LoginState, type VpnCredentials, type VpnLine } from '../../host/vpn/index.js';
|
|
5
5
|
import type { Context } from '../commands/context.js';
|
|
6
6
|
export interface VpnReport {
|
|
7
7
|
readonly enabled: boolean;
|
|
@@ -13,6 +13,8 @@ export interface VpnReport {
|
|
|
13
13
|
readonly loginSavedAt: string | null;
|
|
14
14
|
/** The running sandbox's tunnel, when one runs with the VPN on. */
|
|
15
15
|
readonly running: VpnLine | null;
|
|
16
|
+
/** The last sandbox's VPN attempt, when it failed (kept after it closed). */
|
|
17
|
+
readonly lastFailure: VpnFailureInfo | null;
|
|
16
18
|
}
|
|
17
19
|
export declare class VpnService {
|
|
18
20
|
private readonly ctx;
|
|
@@ -26,5 +28,7 @@ export declare class VpnService {
|
|
|
26
28
|
}): Promise<VpnReport>;
|
|
27
29
|
loginState(): LoginState;
|
|
28
30
|
save(credentials: VpnCredentials): void;
|
|
31
|
+
/** A hint when the login does not look like it belongs to the provider (null when it looks right). */
|
|
32
|
+
warning(credentials: VpnCredentials): string | null;
|
|
29
33
|
remove(): boolean;
|
|
30
34
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isSandboxRunning } from '../../host/sandbox/index.js';
|
|
2
|
-
import { hostPublicIp, readVpnLine, VpnLogin, } from '../../host/vpn/index.js';
|
|
2
|
+
import { hostPublicIp, loginWarning, readLastFailure, readVpnLine, VpnLogin, } from '../../host/vpn/index.js';
|
|
3
3
|
export class VpnService {
|
|
4
4
|
ctx;
|
|
5
5
|
login;
|
|
@@ -25,6 +25,7 @@ export class VpnService {
|
|
|
25
25
|
killSwitch: c.killSwitch,
|
|
26
26
|
login: this.login.state(c.provider),
|
|
27
27
|
loginSavedAt: this.login.savedAt(c.provider),
|
|
28
|
+
lastFailure: readLastFailure(this.ctx.storageRoot),
|
|
28
29
|
running: running ? readVpnLine(this.ctx.dataPath, await hostPublicIp()) : null,
|
|
29
30
|
};
|
|
30
31
|
}
|
|
@@ -34,6 +35,10 @@ export class VpnService {
|
|
|
34
35
|
save(credentials) {
|
|
35
36
|
this.login.save(this.provider, credentials);
|
|
36
37
|
}
|
|
38
|
+
/** A hint when the login does not look like it belongs to the provider (null when it looks right). */
|
|
39
|
+
warning(credentials) {
|
|
40
|
+
return loginWarning(credentials, this.provider);
|
|
41
|
+
}
|
|
37
42
|
remove() {
|
|
38
43
|
return this.login.remove(this.provider);
|
|
39
44
|
}
|
|
@@ -100,7 +100,8 @@ export class TextScreen {
|
|
|
100
100
|
}
|
|
101
101
|
if (key.text) {
|
|
102
102
|
const accept = this.o.accept;
|
|
103
|
-
|
|
103
|
+
// Line breaks and the bracketed-paste markers a terminal wraps around pasted text are not part of the text.
|
|
104
|
+
const add = [...key.text.replace(/\x1b?\[20[01]~/g, '').replace(/[\r\n]/g, '')].filter((c) => !accept || accept.test(c));
|
|
104
105
|
if (!add.length)
|
|
105
106
|
return;
|
|
106
107
|
set([...chars.slice(0, this.cursor), ...add, ...chars.slice(this.cursor)], this.cursor + add.length);
|
package/dist/cli/tui/terminal.js
CHANGED
|
@@ -119,9 +119,11 @@ export class Terminal {
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
push(str, key) {
|
|
122
|
+
// The markers around a paste (readline names them paste-start / paste-end) carry no text.
|
|
123
|
+
const marker = key?.name === 'paste-start' || key?.name === 'paste-end';
|
|
122
124
|
const event = {
|
|
123
125
|
name: key?.name ?? '',
|
|
124
|
-
text: str && !key?.ctrl && !key?.meta && str.length >= 1 && str >= ' ' && str !== '\x7f' ? str : '',
|
|
126
|
+
text: str && !marker && !key?.ctrl && !key?.meta && str.length >= 1 && str >= ' ' && str !== '\x7f' ? str : '',
|
|
125
127
|
ctrl: Boolean(key?.ctrl),
|
|
126
128
|
meta: Boolean(key?.meta),
|
|
127
129
|
shift: Boolean(key?.shift),
|
|
@@ -38,6 +38,14 @@ export const DEFAULTS = {
|
|
|
38
38
|
network: { blockPrivateRanges: true, allowOnly: [], blockHosts: [], forwardPorts: [], dns: [], proxy: '' },
|
|
39
39
|
vpn: { enabled: false, provider: 'nordvpn', protocol: 'udp', country: '', configFile: '', killSwitch: true },
|
|
40
40
|
github: { shareToken: false },
|
|
41
|
+
codex: {
|
|
42
|
+
sandboxMode: 'danger-full-access',
|
|
43
|
+
approvalPolicy: 'never',
|
|
44
|
+
model: '',
|
|
45
|
+
reasoningEffort: 'default',
|
|
46
|
+
windowsSandbox: 'off',
|
|
47
|
+
mcpLoginsInFile: true,
|
|
48
|
+
},
|
|
41
49
|
accounts: {
|
|
42
50
|
epic: { share: false },
|
|
43
51
|
steam: { share: false },
|
|
@@ -78,6 +86,7 @@ export const DEFAULTS = {
|
|
|
78
86
|
acceptLicense: false,
|
|
79
87
|
components: [],
|
|
80
88
|
keepInstallFiles: true,
|
|
89
|
+
visualStudio: 'full',
|
|
81
90
|
persistEngines: true,
|
|
82
91
|
derivedDataCache: 'persisted',
|
|
83
92
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isToolchainReady } from '../../shared/readiness.js';
|
|
1
2
|
import { projectUses } from './versions.js';
|
|
2
3
|
/** Files that show a project uses a language (looked for in the workspace and one folder down). */
|
|
3
4
|
export const MARKERS = {
|
|
@@ -84,6 +85,8 @@ export function decideToolchains(settings, entries, pcHas, hints = {}) {
|
|
|
84
85
|
const setting = settings[name].enabled;
|
|
85
86
|
if (setting !== 'auto')
|
|
86
87
|
return { on: setting, reason: setting ? 'enabled in config' : 'disabled in config' };
|
|
88
|
+
if (!isToolchainReady(name))
|
|
89
|
+
return { on: false, reason: 'coming in a later version' };
|
|
87
90
|
const marker = MARKERS[name].map((m) => entries.find((e) => projectUses([e], [m]))).find(Boolean);
|
|
88
91
|
if (marker)
|
|
89
92
|
return { on: true, reason: marker };
|
|
@@ -124,9 +127,15 @@ function applyImplications(settings, result) {
|
|
|
124
127
|
imply(settings, result, 'android', 'React Native builds for Android');
|
|
125
128
|
if (result.godot.on && settings.godot.dotnet === true)
|
|
126
129
|
imply(settings, result, 'dotnet', "Godot's .NET build");
|
|
130
|
+
if (result.unreal.on && settings.unreal.visualStudio === 'autosdk')
|
|
131
|
+
imply(settings, result, 'msvc', 'Unreal builds from the portable MSVC (AutoSDK)');
|
|
132
|
+
// Unreal's licence acceptance covers the MSVC it builds from (the same Visual Studio terms).
|
|
133
|
+
const autosdkLicence = settings.unreal.visualStudio === 'autosdk' && settings.unreal.acceptLicense;
|
|
127
134
|
for (const name of LICENSED_TOOLCHAINS) {
|
|
128
135
|
if (settings[name].enabled !== 'auto' || !result[name].on || settings[name].acceptLicense)
|
|
129
136
|
continue;
|
|
137
|
+
if (name === 'msvc' && autosdkLicence)
|
|
138
|
+
continue;
|
|
130
139
|
result[name] = {
|
|
131
140
|
on: false,
|
|
132
141
|
reason: 'would be used (' + result[name].reason + '); set toolchains.' + name + '.acceptLicense to install it',
|
package/dist/core/disk.d.ts
CHANGED
|
@@ -8,11 +8,7 @@ export declare function humanBytes(bytes: number): string;
|
|
|
8
8
|
export declare function sizeOf(p: string): number;
|
|
9
9
|
/** sizeOf with a time budget: null when measuring would take longer than `ms` (a big data folder can take minutes). */
|
|
10
10
|
export declare function sizeWithin(p: string, ms: number): number | null;
|
|
11
|
-
|
|
12
|
-
* Free bytes on the drive that holds `dir` (which may not exist yet: the nearest existing parent is asked); null if
|
|
13
|
-
* unknown.
|
|
14
|
-
*/
|
|
15
|
-
export declare function freeBytesAt(dir: string): number | null;
|
|
11
|
+
export { freeBytesAt } from '../shared/io/disk.js';
|
|
16
12
|
export interface DiskUsage {
|
|
17
13
|
drive: string;
|
|
18
14
|
totalBytes: number;
|
package/dist/core/disk.js
CHANGED
|
@@ -59,22 +59,7 @@ export function sizeWithin(p, ms) {
|
|
|
59
59
|
throw e;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
* Free bytes on the drive that holds `dir` (which may not exist yet: the nearest existing parent is asked); null if
|
|
64
|
-
* unknown.
|
|
65
|
-
*/
|
|
66
|
-
export function freeBytesAt(dir) {
|
|
67
|
-
let at = path.resolve(dir);
|
|
68
|
-
while (!fs.existsSync(at) && path.dirname(at) !== at)
|
|
69
|
-
at = path.dirname(at);
|
|
70
|
-
try {
|
|
71
|
-
const s = fs.statfsSync(at);
|
|
72
|
-
return s.bavail * s.bsize;
|
|
73
|
-
}
|
|
74
|
-
catch {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
62
|
+
export { freeBytesAt } from '../shared/io/disk.js';
|
|
78
63
|
/** Every local drive's size and free space, and which one holds the sandbox storage. */
|
|
79
64
|
export function diskUsage(storageRoot) {
|
|
80
65
|
const storageDrive = path.parse(path.resolve(storageRoot)).root.toUpperCase();
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CodexSchema: z.ZodObject<{
|
|
3
|
+
sandboxMode: z.ZodEnum<{
|
|
4
|
+
"danger-full-access": "danger-full-access";
|
|
5
|
+
"workspace-write": "workspace-write";
|
|
6
|
+
"read-only": "read-only";
|
|
7
|
+
}>;
|
|
8
|
+
approvalPolicy: z.ZodEnum<{
|
|
9
|
+
never: "never";
|
|
10
|
+
"on-request": "on-request";
|
|
11
|
+
"on-failure": "on-failure";
|
|
12
|
+
untrusted: "untrusted";
|
|
13
|
+
}>;
|
|
14
|
+
model: z.ZodString;
|
|
15
|
+
reasoningEffort: z.ZodEnum<{
|
|
16
|
+
default: "default";
|
|
17
|
+
minimal: "minimal";
|
|
18
|
+
low: "low";
|
|
19
|
+
medium: "medium";
|
|
20
|
+
high: "high";
|
|
21
|
+
xhigh: "xhigh";
|
|
22
|
+
}>;
|
|
23
|
+
windowsSandbox: z.ZodEnum<{
|
|
24
|
+
off: "off";
|
|
25
|
+
unelevated: "unelevated";
|
|
26
|
+
elevated: "elevated";
|
|
27
|
+
}>;
|
|
28
|
+
mcpLoginsInFile: z.ZodBoolean;
|
|
29
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// How Codex runs inside the sandbox. Yours only: a project file (.sandbox-config.json) cannot change it.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const CodexSchema = z.strictObject({
|
|
4
|
+
sandboxMode: z
|
|
5
|
+
.enum(['danger-full-access', 'workspace-write', 'read-only'])
|
|
6
|
+
.describe("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."),
|
|
7
|
+
approvalPolicy: z
|
|
8
|
+
.enum(['never', 'on-request', 'on-failure', 'untrusted'])
|
|
9
|
+
.describe('When Codex asks before it runs a command. "never" with danger-full-access starts it with no questions.'),
|
|
10
|
+
model: z
|
|
11
|
+
.string()
|
|
12
|
+
.max(100)
|
|
13
|
+
.regex(/^[A-Za-z0-9._:/-]*$/, 'letters, digits and . _ : / - only')
|
|
14
|
+
.describe("The model Codex uses. Empty = Codex's own default."),
|
|
15
|
+
reasoningEffort: z
|
|
16
|
+
.enum(['default', 'minimal', 'low', 'medium', 'high', 'xhigh'])
|
|
17
|
+
.describe('How hard Codex thinks. "default" = Codex\'s own default.'),
|
|
18
|
+
windowsSandbox: z
|
|
19
|
+
.enum(['off', 'unelevated', 'elevated'])
|
|
20
|
+
.describe('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.'),
|
|
21
|
+
mcpLoginsInFile: z
|
|
22
|
+
.boolean()
|
|
23
|
+
.describe('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.'),
|
|
24
|
+
});
|
|
@@ -190,6 +190,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
190
190
|
acceptLicense: z.ZodBoolean;
|
|
191
191
|
components: z.ZodArray<z.ZodString>;
|
|
192
192
|
keepInstallFiles: z.ZodBoolean;
|
|
193
|
+
visualStudio: z.ZodEnum<{
|
|
194
|
+
full: "full";
|
|
195
|
+
autosdk: "autosdk";
|
|
196
|
+
}>;
|
|
193
197
|
persistEngines: z.ZodBoolean;
|
|
194
198
|
derivedDataCache: z.ZodEnum<{
|
|
195
199
|
persisted: "persisted";
|
|
@@ -444,6 +448,34 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
444
448
|
resumeArguments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
445
449
|
resumeOneArguments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
446
450
|
}, z.core.$strict>>;
|
|
451
|
+
codex: z.ZodObject<{
|
|
452
|
+
sandboxMode: z.ZodEnum<{
|
|
453
|
+
"danger-full-access": "danger-full-access";
|
|
454
|
+
"workspace-write": "workspace-write";
|
|
455
|
+
"read-only": "read-only";
|
|
456
|
+
}>;
|
|
457
|
+
approvalPolicy: z.ZodEnum<{
|
|
458
|
+
never: "never";
|
|
459
|
+
"on-request": "on-request";
|
|
460
|
+
"on-failure": "on-failure";
|
|
461
|
+
untrusted: "untrusted";
|
|
462
|
+
}>;
|
|
463
|
+
model: z.ZodString;
|
|
464
|
+
reasoningEffort: z.ZodEnum<{
|
|
465
|
+
default: "default";
|
|
466
|
+
minimal: "minimal";
|
|
467
|
+
low: "low";
|
|
468
|
+
medium: "medium";
|
|
469
|
+
high: "high";
|
|
470
|
+
xhigh: "xhigh";
|
|
471
|
+
}>;
|
|
472
|
+
windowsSandbox: z.ZodEnum<{
|
|
473
|
+
off: "off";
|
|
474
|
+
unelevated: "unelevated";
|
|
475
|
+
elevated: "elevated";
|
|
476
|
+
}>;
|
|
477
|
+
mcpLoginsInFile: z.ZodBoolean;
|
|
478
|
+
}, z.core.$strict>;
|
|
447
479
|
hooks: z.ZodObject<{
|
|
448
480
|
failFast: z.ZodBoolean;
|
|
449
481
|
}, z.core.$strict>;
|
|
@@ -556,7 +588,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
556
588
|
}, z.core.$strict>>;
|
|
557
589
|
toolchains: z.ZodOptional<z.ZodObject<{
|
|
558
590
|
environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
559
|
-
|
|
591
|
+
unity: z.ZodOptional<z.ZodObject<{
|
|
560
592
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
561
593
|
}, z.core.$strict> | z.ZodObject<{
|
|
562
594
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -571,7 +603,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
571
603
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
572
604
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
573
605
|
}, z.core.$strict>>;
|
|
574
|
-
|
|
606
|
+
godot: z.ZodOptional<z.ZodObject<{
|
|
575
607
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
576
608
|
}, z.core.$strict> | z.ZodObject<{
|
|
577
609
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -586,7 +618,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
586
618
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
587
619
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
588
620
|
}, z.core.$strict>>;
|
|
589
|
-
|
|
621
|
+
android: z.ZodOptional<z.ZodObject<{
|
|
590
622
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
591
623
|
}, z.core.$strict> | z.ZodObject<{
|
|
592
624
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -601,7 +633,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
601
633
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
602
634
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
603
635
|
}, z.core.$strict>>;
|
|
604
|
-
|
|
636
|
+
flutter: z.ZodOptional<z.ZodObject<{
|
|
605
637
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
606
638
|
}, z.core.$strict> | z.ZodObject<{
|
|
607
639
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -616,7 +648,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
616
648
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
617
649
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
618
650
|
}, z.core.$strict>>;
|
|
619
|
-
|
|
651
|
+
dart: z.ZodOptional<z.ZodObject<{
|
|
620
652
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
621
653
|
}, z.core.$strict> | z.ZodObject<{
|
|
622
654
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -631,7 +663,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
631
663
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
632
664
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
633
665
|
}, z.core.$strict>>;
|
|
634
|
-
|
|
666
|
+
reactNative: z.ZodOptional<z.ZodObject<{
|
|
635
667
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
636
668
|
}, z.core.$strict> | z.ZodObject<{
|
|
637
669
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -646,7 +678,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
646
678
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
647
679
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
648
680
|
}, z.core.$strict>>;
|
|
649
|
-
|
|
681
|
+
fivem: z.ZodOptional<z.ZodObject<{
|
|
650
682
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
651
683
|
}, z.core.$strict> | z.ZodObject<{
|
|
652
684
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -661,7 +693,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
661
693
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
662
694
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
663
695
|
}, z.core.$strict>>;
|
|
664
|
-
|
|
696
|
+
unreal: z.ZodOptional<z.ZodObject<{
|
|
665
697
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
666
698
|
}, z.core.$strict> | z.ZodObject<{
|
|
667
699
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -676,7 +708,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
676
708
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
677
709
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
678
710
|
}, z.core.$strict>>;
|
|
679
|
-
|
|
711
|
+
node: z.ZodOptional<z.ZodObject<{
|
|
680
712
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
681
713
|
}, z.core.$strict> | z.ZodObject<{
|
|
682
714
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -691,7 +723,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
691
723
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
692
724
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
693
725
|
}, z.core.$strict>>;
|
|
694
|
-
|
|
726
|
+
go: z.ZodOptional<z.ZodObject<{
|
|
695
727
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
696
728
|
}, z.core.$strict> | z.ZodObject<{
|
|
697
729
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -706,7 +738,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
706
738
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
707
739
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
708
740
|
}, z.core.$strict>>;
|
|
709
|
-
|
|
741
|
+
python: z.ZodOptional<z.ZodObject<{
|
|
710
742
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
711
743
|
}, z.core.$strict> | z.ZodObject<{
|
|
712
744
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -721,7 +753,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
721
753
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
722
754
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
723
755
|
}, z.core.$strict>>;
|
|
724
|
-
|
|
756
|
+
rust: z.ZodOptional<z.ZodObject<{
|
|
725
757
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
726
758
|
}, z.core.$strict> | z.ZodObject<{
|
|
727
759
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -736,7 +768,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
736
768
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
737
769
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
738
770
|
}, z.core.$strict>>;
|
|
739
|
-
|
|
771
|
+
msvc: z.ZodOptional<z.ZodObject<{
|
|
740
772
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
741
773
|
}, z.core.$strict> | z.ZodObject<{
|
|
742
774
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -751,7 +783,7 @@ export declare const LocalOverridesSchema: z.ZodObject<{
|
|
|
751
783
|
zstd: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
752
784
|
openssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
|
|
753
785
|
}, z.core.$strict>>;
|
|
754
|
-
|
|
786
|
+
steam: z.ZodOptional<z.ZodObject<{
|
|
755
787
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
756
788
|
}, z.core.$strict> | z.ZodObject<{
|
|
757
789
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -4,6 +4,7 @@ import _ from 'lodash';
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { NameSchema, SchemaRefSchema, StringsSchema, toggle } from './common.js';
|
|
6
6
|
import { DatabasesSchema } from './databases.js';
|
|
7
|
+
import { CodexSchema } from './codex.js';
|
|
7
8
|
import { HarnessSchema } from './harness.js';
|
|
8
9
|
import { AgentCommandsSchema, AttachSchema, ClaudeProfileSchema, SecretsSchema } from './profile.js';
|
|
9
10
|
import { AuditSchema, DownloadsSchema, SharingSchema, GitSchema, GuestWorkspaceSchema, MappingSchema, NetworkSchema, ProvisioningSchema, SandboxSchema, WorkspaceFilterSchema, } from './sandbox.js';
|
|
@@ -101,6 +102,7 @@ export const ConfigSchema = z
|
|
|
101
102
|
apps: AppsSchema,
|
|
102
103
|
claudeProfile: ClaudeProfileSchema,
|
|
103
104
|
harnesses: z.record(NameSchema, HarnessSchema).describe('Agents that can run in the sandbox.'),
|
|
105
|
+
codex: CodexSchema,
|
|
104
106
|
hooks: z.strictObject({ failFast: z.boolean().describe('Stop when a hook script fails.') }),
|
|
105
107
|
projects: ProjectsSchema.describe('Several projects in one sandbox: folders of projects mapped at every start, and adding folders while it runs.'),
|
|
106
108
|
resume: ResumeSchema.describe('Reopening the sessions of the last sandbox when a new one starts.'),
|
|
@@ -2,6 +2,7 @@ export { GitAccessSchema, NameSchema, secret } from './common.js';
|
|
|
2
2
|
export { REDACTED, redactSecrets, scrubSecrets, secretPaths, secretValues } from './redact.js';
|
|
3
3
|
export { ConfigSchema, LocalOverridesSchema } from './config.js';
|
|
4
4
|
export { HarnessSchema } from './harness.js';
|
|
5
|
+
export { CodexSchema } from './codex.js';
|
|
5
6
|
export { describeIssues, jsonSchemas } from './json-schema.js';
|
|
6
7
|
export { MappingSchema } from './sandbox.js';
|
|
7
8
|
export { ToolchainsSchema } from './toolchains.js';
|
|
@@ -4,6 +4,7 @@ export { GitAccessSchema, NameSchema, secret } from './common.js';
|
|
|
4
4
|
export { REDACTED, redactSecrets, scrubSecrets, secretPaths, secretValues } from './redact.js';
|
|
5
5
|
export { ConfigSchema, LocalOverridesSchema } from './config.js';
|
|
6
6
|
export { HarnessSchema } from './harness.js';
|
|
7
|
+
export { CodexSchema } from './codex.js';
|
|
7
8
|
export { describeIssues, jsonSchemas } from './json-schema.js';
|
|
8
9
|
export { MappingSchema } from './sandbox.js';
|
|
9
10
|
export { ToolchainsSchema } from './toolchains.js';
|
|
@@ -39,6 +39,10 @@ export declare const ToolchainsSchema: z.ZodObject<{
|
|
|
39
39
|
acceptLicense: z.ZodBoolean;
|
|
40
40
|
components: z.ZodArray<z.ZodString>;
|
|
41
41
|
keepInstallFiles: z.ZodBoolean;
|
|
42
|
+
visualStudio: z.ZodEnum<{
|
|
43
|
+
full: "full";
|
|
44
|
+
autosdk: "autosdk";
|
|
45
|
+
}>;
|
|
42
46
|
persistEngines: z.ZodBoolean;
|
|
43
47
|
derivedDataCache: z.ZodEnum<{
|
|
44
48
|
persisted: "persisted";
|
|
@@ -62,6 +62,9 @@ export const ToolchainsSchema = z.strictObject({
|
|
|
62
62
|
keepInstallFiles: z
|
|
63
63
|
.boolean()
|
|
64
64
|
.describe('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.'),
|
|
65
|
+
visualStudio: z
|
|
66
|
+
.enum(['full', 'autosdk'])
|
|
67
|
+
.describe('"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).'),
|
|
65
68
|
persistEngines: z
|
|
66
69
|
.boolean()
|
|
67
70
|
.describe('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).'),
|
package/dist/core/types.d.ts
CHANGED
|
@@ -284,6 +284,8 @@ export interface GuestSession {
|
|
|
284
284
|
* creates.
|
|
285
285
|
*/
|
|
286
286
|
agentBackstop?: 'auto' | 'none' | number;
|
|
287
|
+
/** The codex settings: the flags every Codex start gets and what boot writes to its config.toml. */
|
|
288
|
+
codex?: Config['codex'];
|
|
287
289
|
/** "gentle" when vGPU is on: the governor and the watchdog act earlier, compilers run below normal. */
|
|
288
290
|
loadProfile?: 'normal' | 'gentle';
|
|
289
291
|
/** sandbox.pressureResponse: the daemon slows builds down when memory runs low. */
|
|
@@ -5,23 +5,23 @@ import { type GuestAdapter } from './adapter.js';
|
|
|
5
5
|
export declare const DeliveredSchema: z.ZodObject<{
|
|
6
6
|
fingerprints: z.ZodRecord<z.ZodEnum<{
|
|
7
7
|
unity: "unity";
|
|
8
|
-
steam: "steam";
|
|
9
|
-
epic: "epic";
|
|
10
|
-
cfx: "cfx";
|
|
11
8
|
keystore: "keystore";
|
|
12
9
|
play: "play";
|
|
13
10
|
expo: "expo";
|
|
14
11
|
appstore: "appstore";
|
|
12
|
+
cfx: "cfx";
|
|
13
|
+
steam: "steam";
|
|
14
|
+
epic: "epic";
|
|
15
15
|
}> & z.core.$partial, z.ZodString>;
|
|
16
16
|
leased: z.ZodArray<z.ZodEnum<{
|
|
17
17
|
unity: "unity";
|
|
18
|
-
steam: "steam";
|
|
19
|
-
epic: "epic";
|
|
20
|
-
cfx: "cfx";
|
|
21
18
|
keystore: "keystore";
|
|
22
19
|
play: "play";
|
|
23
20
|
expo: "expo";
|
|
24
21
|
appstore: "appstore";
|
|
22
|
+
cfx: "cfx";
|
|
23
|
+
steam: "steam";
|
|
24
|
+
epic: "epic";
|
|
25
25
|
}>>;
|
|
26
26
|
}, z.core.$strip>;
|
|
27
27
|
export type Delivered = z.output<typeof DeliveredSchema>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Harness } from '../../core/types.js';
|
|
1
|
+
import type { Config, Harness } from '../../core/types.js';
|
|
2
2
|
/** Where an agent lives in persistent storage: its folder, and the program (an .exe, or an npm .cmd) in it. */
|
|
3
3
|
export interface AgentPaths {
|
|
4
4
|
readonly dir: string;
|
|
@@ -13,12 +13,14 @@ export interface AgentShim {
|
|
|
13
13
|
readonly name: string;
|
|
14
14
|
readonly command: string;
|
|
15
15
|
readonly target: string;
|
|
16
|
+
/** Flags the shim puts before the arguments of the caller (codex: the sandbox's own settings). */
|
|
17
|
+
readonly arguments?: readonly string[];
|
|
16
18
|
}
|
|
17
19
|
/** One shim per configured agent that can be installed here (a name that is not a plain command word is skipped). */
|
|
18
|
-
export declare function agentShims(toolsDir: string, agents: Readonly<Record<string, Harness>>): AgentShim[];
|
|
20
|
+
export declare function agentShims(toolsDir: string, agents: Readonly<Record<string, Harness>>, flags?: Readonly<Record<string, readonly string[]>>): AgentShim[];
|
|
19
21
|
/**
|
|
20
22
|
* The text of `<command>.cmd`: runs the installed agent, or installs it first (`install` = node + installer script).
|
|
21
|
-
* The agent's own arguments pass through %* untouched.
|
|
23
|
+
* The agent's own arguments pass through %* untouched, after the shim's flags if it has any.
|
|
22
24
|
*/
|
|
23
25
|
export declare function shimText(shim: AgentShim, install: {
|
|
24
26
|
node: string;
|
|
@@ -48,13 +50,31 @@ export declare function bootResetPaths(agents: Readonly<Record<string, Harness>>
|
|
|
48
50
|
agent: string;
|
|
49
51
|
path: string;
|
|
50
52
|
}[];
|
|
53
|
+
type CodexSettings = Config['codex'];
|
|
51
54
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
+
* The flags every Codex start gets. Flags beat config.toml and a resumed thread's saved permissions, which is why the
|
|
56
|
+
* sandbox does not rely on the file. Full access with no questions is the one flag that skips Codex's Windows sandbox
|
|
57
|
+
* setup for certain. Pure.
|
|
58
|
+
*/
|
|
59
|
+
export declare function codexArguments(c: CodexSettings): string[];
|
|
60
|
+
/** The arguments an agent always starts with: its own, and for codex the sandbox's settings. */
|
|
61
|
+
export declare function agentArguments(name: string, harness: Harness, codex: CodexSettings | undefined): string[];
|
|
62
|
+
/** The largest config.toml the sandbox edits. */
|
|
63
|
+
export declare const MAX_CODEX_CONFIG_BYTES: number;
|
|
64
|
+
/**
|
|
65
|
+
* Codex's config.toml as the sandbox wants it, every other line byte for byte: the lines an older version wrote above
|
|
66
|
+
* the first table (sandbox_mode, approval_policy, under the marker comment) are gone, `[windows] sandbox` follows
|
|
67
|
+
* windowsSandbox ("off" removes the line, so Codex does not set up its own sandbox users), and
|
|
68
|
+
* mcp_oauth_credentials_store = "file" is added when it is not set. Running it again changes nothing. Pure.
|
|
69
|
+
*/
|
|
70
|
+
export declare function codexConfigOwned(toml: string, c: CodexSettings): string;
|
|
71
|
+
/**
|
|
72
|
+
* Codex's config.toml with its own command sandbox off, or null when that changes nothing. Kept for callers that
|
|
73
|
+
* predate the codex settings; use codexConfigOwned.
|
|
55
74
|
*/
|
|
56
75
|
export declare function codexConfigWithoutSandbox(toml: string): string | null;
|
|
57
76
|
/** A SQLite database file or one of its -wal / -shm siblings. */
|
|
58
77
|
export declare const isDatabaseFile: (name: string) => boolean;
|
|
59
78
|
/** Files that make a consistent copy: the databases and their -wal (the -shm is rebuilt by SQLite). */
|
|
60
79
|
export declare const isCopyableDatabaseFile: (name: string) => boolean;
|
|
80
|
+
export {};
|