windows-development-sandbox 1.11.7 → 1.13.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 +13 -6
- package/config.example.json +15 -4
- package/dist/app/features/access/access.def.d.ts +190 -0
- package/dist/app/features/access/access.def.js +273 -0
- package/dist/app/features/access/access.run.d.ts +79 -0
- package/dist/app/features/access/access.run.js +129 -0
- package/dist/app/features/access/index.d.ts +2 -0
- package/dist/app/features/access/index.js +3 -0
- package/dist/app/features/agents/agent-entry.js +5 -0
- package/dist/app/features/agents/agents.def.js +1 -0
- package/dist/app/features/apps/apps-rows.d.ts +4 -1
- package/dist/app/features/apps/apps-rows.js +7 -2
- package/dist/app/features/apps/apps.def.d.ts +19 -0
- package/dist/app/features/apps/apps.def.js +50 -12
- package/dist/app/features/apps/apps.run.d.ts +2 -0
- package/dist/app/features/apps/apps.run.js +1 -1
- package/dist/app/features/audit/audit.def.d.ts +350 -0
- package/dist/app/features/audit/audit.def.js +457 -0
- package/dist/app/features/audit/audit.run.d.ts +110 -0
- package/dist/app/features/audit/audit.run.js +133 -0
- package/dist/app/features/audit/index.d.ts +2 -0
- package/dist/app/features/audit/index.js +3 -0
- package/dist/app/features/defs.d.ts +349 -4
- package/dist/app/features/defs.js +16 -1
- package/dist/app/features/files/files.def.js +1 -0
- package/dist/app/features/health/health.def.js +1 -0
- package/dist/app/features/sandbox/sandbox.def.js +3 -0
- package/dist/app/features/sessions/sessions.def.d.ts +36 -0
- package/dist/app/features/sessions/sessions.def.js +77 -9
- package/dist/app/features/sessions/sessions.run.d.ts +25 -2
- package/dist/app/features/sessions/sessions.run.js +71 -3
- package/dist/app/features/settings/settings.def.d.ts +8 -0
- package/dist/app/features/settings/settings.def.js +17 -0
- package/dist/app/features/settings/settings.run.d.ts +3 -0
- package/dist/app/features/settings/settings.run.js +16 -2
- package/dist/app/features/web/web.def.d.ts +9 -0
- package/dist/app/features/web/web.def.js +26 -1
- package/dist/app/features/web/web.run.d.ts +3 -0
- package/dist/app/features/web/web.run.js +11 -3
- package/dist/app/kernel/access.d.ts +33 -0
- package/dist/app/kernel/access.js +44 -0
- package/dist/app/kernel/define.d.ts +26 -2
- package/dist/app/kernel/index.d.ts +1 -0
- package/dist/app/kernel/index.js +1 -0
- package/dist/app/kernel/rpc.d.ts +5 -2
- package/dist/app/registry.d.ts +4 -1
- package/dist/app/registry.js +26 -4
- package/dist/cli/args.d.ts +0 -3
- package/dist/cli/args.js +3 -4
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.js +1 -1
- package/dist/cli/commands/launch/prepare.js +1 -1
- package/dist/cli/commands/maintenance/index.d.ts +0 -1
- package/dist/cli/commands/maintenance/index.js +0 -1
- package/dist/cli/commands/registry.js +3 -2
- package/dist/cli/commands/remote.d.ts +2 -0
- package/dist/cli/commands/remote.js +49 -0
- package/dist/cli/commands/sessions/reopen.js +3 -0
- package/dist/cli/commands/web.js +66 -0
- package/dist/cli/manifest.d.ts +63 -45
- package/dist/cli/manifest.js +33 -18
- package/dist/cli/menu/io-menu.d.ts +5 -3
- package/dist/cli/menu/io-menu.js +12 -5
- package/dist/cli/menu/pages/apps-page.js +2 -15
- package/dist/cli/menu/pages/maintenance-page.d.ts +4 -0
- package/dist/cli/menu/pages/maintenance-page.js +51 -8
- package/dist/cli/menu/remote-menu.d.ts +19 -0
- package/dist/cli/menu/remote-menu.js +108 -0
- package/dist/cli/menu/views.js +4 -0
- package/dist/cli/operations/handler.js +15 -1
- package/dist/cli/services/remote-client.d.ts +16 -0
- package/dist/cli/services/remote-client.js +141 -0
- package/dist/cli/services/sessions-service.d.ts +5 -0
- package/dist/cli/services/sessions-service.js +17 -1
- package/dist/core/config/defaults.js +12 -2
- package/dist/core/local-config/file.js +16 -2
- package/dist/core/local-config/overrides.js +7 -0
- package/dist/core/run/versions.js +9 -8
- package/dist/core/schema/apps.d.ts +9 -0
- package/dist/core/schema/apps.js +9 -0
- package/dist/core/schema/config.d.ts +23 -3
- package/dist/core/schema/config.js +42 -5
- package/dist/core/schema/sandbox.d.ts +1 -0
- package/dist/core/schema/sandbox.js +11 -3
- package/dist/core/schema/web.d.ts +51 -0
- package/dist/core/schema/web.js +46 -1
- package/dist/core/util/fs.d.ts +5 -0
- package/dist/core/util/fs.js +23 -0
- package/dist/core/util/index.d.ts +1 -1
- package/dist/core/util/index.js +1 -1
- package/dist/guest/apps/app-installer.js +50 -4
- package/dist/guest/apps/index.d.ts +1 -1
- package/dist/guest/apps/index.js +1 -1
- package/dist/guest/apps/sources.js +1 -1
- package/dist/guest/audit/parse.d.ts +32 -2
- package/dist/guest/audit/parse.js +43 -5
- package/dist/guest/audit/process-audit.d.ts +3 -1
- package/dist/guest/audit/process-audit.js +9 -6
- package/dist/guest/boot/boot.js +12 -3
- package/dist/guest/boot/guide.d.ts +1 -1
- package/dist/guest/boot/guide.js +27 -3
- package/dist/guest/daemon/daemon.js +2 -0
- package/dist/guest/daemon/idle-shutdown.js +2 -1
- package/dist/guest/daemon/sessions.d.ts +23 -2
- package/dist/guest/daemon/sessions.js +151 -20
- package/dist/guest/entries/daemon.js +2 -1
- package/dist/guest/git/decision.js +7 -0
- package/dist/guest/sessions/cmdline.d.ts +14 -0
- package/dist/guest/sessions/cmdline.js +10 -0
- package/dist/guest/setup/addon-mcp.d.ts +2 -0
- package/dist/guest/setup/addon-mcp.js +49 -0
- package/dist/guest/setup/agent-addons.d.ts +9 -0
- package/dist/guest/setup/agent-addons.js +22 -0
- package/dist/guest/setup/headroom.d.ts +7 -0
- package/dist/guest/setup/headroom.js +60 -0
- package/dist/guest/setup/managed-policy.d.ts +2 -1
- package/dist/guest/setup/managed-policy.js +15 -6
- package/dist/guest/toolchains/plan.js +8 -3
- package/dist/guest/toolchains/setup.js +3 -0
- package/dist/host/audit/attribute.d.ts +46 -0
- package/dist/host/audit/attribute.js +76 -0
- package/dist/host/audit/collect.d.ts +29 -3
- package/dist/host/audit/collect.js +256 -61
- package/dist/host/audit/git-commits.d.ts +29 -0
- package/dist/host/audit/git-commits.js +157 -0
- package/dist/host/audit/index.d.ts +5 -0
- package/dist/host/audit/index.js +6 -0
- package/dist/host/audit/log.d.ts +45 -7
- package/dist/host/audit/log.js +148 -45
- package/dist/host/audit/redact.d.ts +2 -0
- package/dist/host/audit/redact.js +67 -0
- package/dist/host/channel/channel.d.ts +5 -1
- package/dist/host/channel/channel.js +12 -0
- package/dist/host/guard/agent-files.js +7 -1
- package/dist/host/guard/commands.js +13 -1
- package/dist/host/guard/git-config.js +27 -7
- package/dist/host/guard/git-dirs.js +78 -3
- package/dist/host/guard/mark-of-the-web.js +3 -1
- package/dist/host/guard/nested-repos.js +7 -2
- package/dist/host/guard/store.js +1 -0
- package/dist/host/guard/types.d.ts +2 -0
- package/dist/host/launch/mappings.js +11 -1
- package/dist/host/launch/project-scan.js +2 -21
- package/dist/host/launch/stage.js +4 -0
- package/dist/host/life/session-ledger.js +2 -1
- package/dist/host/remote/access-store.d.ts +156 -0
- package/dist/host/remote/access-store.js +308 -0
- package/dist/host/remote/cert.d.ts +20 -0
- package/dist/host/remote/cert.js +103 -0
- package/dist/host/remote/door-client.d.ts +13 -0
- package/dist/host/remote/door-client.js +54 -0
- package/dist/host/remote/firewall.d.ts +44 -0
- package/dist/host/remote/firewall.js +118 -0
- package/dist/host/remote/gate.d.ts +125 -0
- package/dist/host/remote/gate.js +391 -0
- package/dist/host/remote/index.d.ts +8 -0
- package/dist/host/remote/index.js +10 -0
- package/dist/host/remote/lan.d.ts +24 -0
- package/dist/host/remote/lan.js +88 -0
- package/dist/host/remote/tls-store.d.ts +22 -0
- package/dist/host/remote/tls-store.js +63 -0
- package/dist/host/remote/windows-helper.d.ts +67 -0
- package/dist/host/remote/windows-helper.js +129 -0
- package/dist/host/web/bridge.d.ts +5 -1
- package/dist/host/web/bridge.js +6 -2
- package/dist/host/web/browser.js +1 -1
- package/dist/host/web/control.d.ts +4 -1
- package/dist/host/web/control.js +28 -4
- package/dist/host/web/rpc.d.ts +16 -2
- package/dist/host/web/rpc.js +37 -4
- package/dist/host/web/runner.d.ts +4 -0
- package/dist/host/web/runner.js +12 -0
- package/dist/host/web/server.d.ts +18 -2
- package/dist/host/web/server.js +97 -24
- package/dist/host/web/state.d.ts +5 -0
- package/dist/host/web/state.js +8 -0
- package/dist/runtime/agent.js +184 -18
- package/dist/runtime/daemon.js +772 -338
- package/dist/runtime/db.js +184 -18
- package/dist/runtime/gitguard.js +6 -0
- package/dist/runtime/main.js +966 -553
- package/dist/runtime/netproxy.js +184 -18
- package/dist/runtime/view.js +186 -18
- package/dist/selftest/app.test.js +66 -7
- package/dist/selftest/audit.test.js +354 -47
- package/dist/selftest/channel.test.js +16 -0
- package/dist/selftest/cmdline.test.js +16 -0
- package/dist/selftest/git-access.test.js +8 -0
- package/dist/selftest/hcs.test.js +35 -0
- package/dist/selftest/hostile-input.test.js +12 -1
- package/dist/selftest/index.js +2 -0
- package/dist/selftest/live-daemon.test.js +25 -0
- package/dist/selftest/local-config.test.js +30 -0
- package/dist/selftest/menu-screens.js +1 -1
- package/dist/selftest/menu.test.js +3 -3
- package/dist/selftest/remote.test.d.ts +2 -0
- package/dist/selftest/remote.test.js +536 -0
- package/dist/selftest/repo-guard.test.js +56 -2
- package/dist/selftest/resume.test.js +2 -1
- package/dist/selftest/sharing.test.js +9 -2
- package/dist/selftest/support/engine-golden.js +9 -0
- package/dist/selftest/support/fixtures.d.ts +14 -0
- package/dist/selftest/support/web-preview.js +157 -0
- package/dist/selftest/toolchains.test.js +147 -2
- package/dist/selftest/web.test.js +2 -0
- package/dist/shared/apps/agent-addons.d.ts +64 -0
- package/dist/shared/apps/agent-addons.js +95 -0
- package/dist/shared/apps/catalogue.d.ts +33 -2
- package/dist/shared/apps/catalogue.js +102 -11
- package/dist/shared/apps/index.d.ts +3 -2
- package/dist/shared/apps/index.js +3 -2
- package/dist/shared/apps/selection.d.ts +2 -0
- package/dist/shared/apps/selection.js +7 -0
- package/dist/shared/channel/schema.d.ts +23 -0
- package/dist/shared/channel/schema.js +8 -0
- package/dist/shared/pty/protocol.d.ts +2 -0
- package/dist/shared/pty/protocol.js +2 -0
- package/dist/sync/watcher.js +9 -1
- package/dist/web/index.html +2 -2
- package/dist/web/{main-RQFN4WBY.css → main-UAQPI5XD.css} +1 -1
- package/dist/web/main-Z2WYAE2Z.js +221 -0
- package/native/csharp/HcsHost/AssemblyInfo.cs +5 -3
- package/native/csharp/HcsHost/Hcs.cs +9 -0
- package/native/csharp/HcsHost/Program.cs +26 -1
- package/native/csharp/HcsHost/Share.cs +173 -0
- package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/Program.cs +17 -1
- package/native/csharp/HostTools/WebHelper.cs +499 -0
- package/native/scripts/get-network-profile.ps1 +19 -0
- package/native/scripts/set-folder-access.ps1 +11 -0
- package/native/scripts/set-web-firewall.ps1 +103 -0
- package/package.json +1 -1
- package/sandbox/addons/ccusage/package-lock.json +111 -0
- package/sandbox/addons/ccusage/package.json +7 -0
- package/sandbox/addons/context7/package-lock.json +1313 -0
- package/sandbox/addons/context7/package.json +7 -0
- package/sandbox/addons/headroom/requirements.in +1 -0
- package/sandbox/addons/headroom/requirements.txt +2922 -0
- package/sandbox/addons/playwright-mcp/package-lock.json +56 -0
- package/sandbox/addons/playwright-mcp/package.json +7 -0
- package/sandbox/csharp/PtyHost.cs +20 -0
- package/schemas/config.schema.json +78 -4
- package/schemas/sandbox-config.schema.json +2 -20
- package/dist/cli/commands/maintenance/audit.d.ts +0 -3
- package/dist/cli/commands/maintenance/audit.js +0 -58
- package/dist/web/main-K2JMCAZI.js +0 -219
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sandbox-addon-playwright-mcp",
|
|
3
|
+
"lockfileVersion": 3,
|
|
4
|
+
"requires": true,
|
|
5
|
+
"packages": {
|
|
6
|
+
"": {
|
|
7
|
+
"name": "sandbox-addon-playwright-mcp",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@playwright/mcp": "0.0.83"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"node_modules/@playwright/mcp": {
|
|
13
|
+
"version": "0.0.83",
|
|
14
|
+
"resolved": "https://registry.npmjs.org/@playwright/mcp/-/mcp-0.0.83.tgz",
|
|
15
|
+
"integrity": "sha512-oNcl+Ae2/IAjhfPeP46BfIkSakfmprY+aOtkv5MjrQ4lPav4/yNtPhL0iq8SlIM90oApWgBDUxaNKvktazUKOg==",
|
|
16
|
+
"license": "Apache-2.0",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"playwright": "1.64.0-alpha-1790635538000",
|
|
19
|
+
"playwright-core": "1.64.0-alpha-1790635538000"
|
|
20
|
+
},
|
|
21
|
+
"bin": {
|
|
22
|
+
"playwright-mcp": "cli.js"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=18"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"node_modules/playwright": {
|
|
29
|
+
"version": "1.64.0-alpha-1790635538000",
|
|
30
|
+
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.64.0-alpha-1790635538000.tgz",
|
|
31
|
+
"integrity": "sha512-/5XDUMxpOd/9AojJtWDFIRV3EJZNQ0AwvK69wgt3CPzy8wTgiBG9pX45VfxtqtvIRGwfWzMhrvawNKreG69Snw==",
|
|
32
|
+
"license": "Apache-2.0",
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"playwright-core": "1.64.0-alpha-1790635538000"
|
|
35
|
+
},
|
|
36
|
+
"bin": {
|
|
37
|
+
"playwright": "cli.js"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=20"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"node_modules/playwright-core": {
|
|
44
|
+
"version": "1.64.0-alpha-1790635538000",
|
|
45
|
+
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.64.0-alpha-1790635538000.tgz",
|
|
46
|
+
"integrity": "sha512-pNwaXirhXMRLaRQs4NQ18EpTdtDoFwyPH9FOaaDC7YXG4hpwE2xmwCic/1srbuExVQC7zT9LJSJpDBAru+Vo9A==",
|
|
47
|
+
"license": "Apache-2.0",
|
|
48
|
+
"bin": {
|
|
49
|
+
"playwright-core": "cli.js"
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=20"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
// 3 RESIZE [cols:2][rows:2]
|
|
12
12
|
// 4 RESTART restart the program with <restartCommandLine> (e.g. after switching accounts)
|
|
13
13
|
// 5 PING "still here": viewers send it every few seconds, so a closed terminal stops counting
|
|
14
|
+
// 6 CLOSE end the program (and everything it started) and with it the session
|
|
14
15
|
// host -> client 16 OUTPUT VT output
|
|
15
16
|
// 17 EXIT [exitCode:4]
|
|
16
17
|
// 18 ERROR utf8 message
|
|
@@ -65,6 +66,7 @@ sealed class SessionHost
|
|
|
65
66
|
private readonly string restartCommand;
|
|
66
67
|
private string command;
|
|
67
68
|
private volatile bool restartRequested;
|
|
69
|
+
private volatile bool closeRequested;
|
|
68
70
|
|
|
69
71
|
public SessionHost(ClientHub hub, Log log, string command, string restartCommand)
|
|
70
72
|
{
|
|
@@ -99,11 +101,24 @@ sealed class SessionHost
|
|
|
99
101
|
|
|
100
102
|
public void Restart()
|
|
101
103
|
{
|
|
104
|
+
if (closeRequested)
|
|
105
|
+
{
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
102
108
|
restartRequested = true;
|
|
103
109
|
hub.ResetReplay();
|
|
104
110
|
hub.Notify(Frame.Restarting);
|
|
105
111
|
hub.KillProgram();
|
|
106
112
|
}
|
|
113
|
+
|
|
114
|
+
/// <summary>Ends the program for good (CLOSE): the session exits the way it does when the program exits.</summary>
|
|
115
|
+
public void Close()
|
|
116
|
+
{
|
|
117
|
+
closeRequested = true;
|
|
118
|
+
restartRequested = false;
|
|
119
|
+
log.Write("closing the session on request");
|
|
120
|
+
hub.KillProgram();
|
|
121
|
+
}
|
|
107
122
|
}
|
|
108
123
|
|
|
109
124
|
/// <summary>Accepts TCP clients and turns their frames into actions.</summary>
|
|
@@ -201,6 +216,10 @@ sealed class Listener
|
|
|
201
216
|
{
|
|
202
217
|
host.Restart();
|
|
203
218
|
}
|
|
219
|
+
else if (type == Frame.Close)
|
|
220
|
+
{
|
|
221
|
+
host.Close();
|
|
222
|
+
}
|
|
204
223
|
}
|
|
205
224
|
}
|
|
206
225
|
catch (IOException)
|
|
@@ -1251,6 +1270,7 @@ static class Frame
|
|
|
1251
1270
|
public const byte Resize = 3;
|
|
1252
1271
|
public const byte Restart = 4;
|
|
1253
1272
|
public const byte Ping = 5;
|
|
1273
|
+
public const byte Close = 6;
|
|
1254
1274
|
public const byte Output = 16;
|
|
1255
1275
|
public const byte Exit = 17;
|
|
1256
1276
|
public const byte Error = 18;
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
"properties": {
|
|
64
64
|
"enabled": {
|
|
65
65
|
"type": "boolean",
|
|
66
|
-
"description": "Keep an audit log on this PC of what
|
|
66
|
+
"description": "Keep an audit log on this PC of what your agents did: programs started (with their command lines, secrets hidden), files changed in the projects, git commits, sessions, and what the repo guard caught, each linked to the agent session that did it where that can be known. The sandbox cannot change it. Read it with sandbox audit or on the Activity page."
|
|
67
67
|
},
|
|
68
68
|
"days": {
|
|
69
69
|
"type": "integer",
|
|
70
70
|
"minimum": 1,
|
|
71
71
|
"maximum": 365,
|
|
72
|
-
"description": "Days the audit log is kept."
|
|
72
|
+
"description": "Days the audit log is kept (1 to 30; a larger number keeps 30); older days are deleted when a sandbox starts and once a day."
|
|
73
73
|
},
|
|
74
74
|
"maxMb": {
|
|
75
75
|
"type": "integer",
|
|
@@ -83,7 +83,11 @@
|
|
|
83
83
|
},
|
|
84
84
|
"files": {
|
|
85
85
|
"type": "boolean",
|
|
86
|
-
"description": "Record the files changed in the
|
|
86
|
+
"description": "Record the files changed in the projects while the sandbox runs."
|
|
87
|
+
},
|
|
88
|
+
"commits": {
|
|
89
|
+
"type": "boolean",
|
|
90
|
+
"description": "Record the git commits made in the projects while the sandbox runs (read from each project's .git folder on this PC)."
|
|
87
91
|
}
|
|
88
92
|
},
|
|
89
93
|
"additionalProperties": false
|
|
@@ -1261,6 +1265,71 @@
|
|
|
1261
1265
|
"openOnLaunch": {
|
|
1262
1266
|
"type": "boolean",
|
|
1263
1267
|
"description": "(Beta) With the web UI on: open it in your browser, already signed in, every time a sandbox starts."
|
|
1268
|
+
},
|
|
1269
|
+
"remote": {
|
|
1270
|
+
"type": "object",
|
|
1271
|
+
"properties": {
|
|
1272
|
+
"windowsSignIn": {
|
|
1273
|
+
"type": "boolean",
|
|
1274
|
+
"description": "(Beta) Other Windows users of this PC named in web.remote.users sign in to your web UI (and sandbox remote) with their own Windows account: no password, no link."
|
|
1275
|
+
},
|
|
1276
|
+
"users": {
|
|
1277
|
+
"maxItems": 32,
|
|
1278
|
+
"type": "array",
|
|
1279
|
+
"items": {
|
|
1280
|
+
"type": "object",
|
|
1281
|
+
"properties": {
|
|
1282
|
+
"name": {
|
|
1283
|
+
"type": "string",
|
|
1284
|
+
"minLength": 1,
|
|
1285
|
+
"maxLength": 120,
|
|
1286
|
+
"pattern": "^(?:[A-Za-z0-9][A-Za-z0-9._ -]{0,62}\\\\)?[^\\\\/\"[\\]:;|=,+*?<>@]{1,64}$",
|
|
1287
|
+
"description": "The Windows user (name, or DOMAIN\\name)"
|
|
1288
|
+
},
|
|
1289
|
+
"role": {
|
|
1290
|
+
"type": "string",
|
|
1291
|
+
"enum": [
|
|
1292
|
+
"view",
|
|
1293
|
+
"control"
|
|
1294
|
+
],
|
|
1295
|
+
"description": "view: sees everything, terminals read-only. control: everything but remote access, logins and tokens."
|
|
1296
|
+
}
|
|
1297
|
+
},
|
|
1298
|
+
"additionalProperties": false
|
|
1299
|
+
},
|
|
1300
|
+
"description": "Who else may sign in with Windows, and their role (view or control)."
|
|
1301
|
+
},
|
|
1302
|
+
"rememberDays": {
|
|
1303
|
+
"type": "integer",
|
|
1304
|
+
"minimum": 1,
|
|
1305
|
+
"maximum": 90,
|
|
1306
|
+
"description": "How many days a paired device or a Windows sign-in stays signed in (from when it signed in, not renewed)."
|
|
1307
|
+
},
|
|
1308
|
+
"lan": {
|
|
1309
|
+
"type": "object",
|
|
1310
|
+
"properties": {
|
|
1311
|
+
"enabled": {
|
|
1312
|
+
"type": "boolean",
|
|
1313
|
+
"description": "(Beta) Devices on your network (a phone): an HTTPS address on this PC for devices you pair with a one-time code (sandbox web pair). Needs a firewall rule (sandbox web lan on asks Windows once). Off: every paired device is signed out."
|
|
1314
|
+
},
|
|
1315
|
+
"port": {
|
|
1316
|
+
"type": "integer",
|
|
1317
|
+
"minimum": 1024,
|
|
1318
|
+
"maximum": 65535,
|
|
1319
|
+
"description": "HTTPS port for paired devices on your network."
|
|
1320
|
+
},
|
|
1321
|
+
"address": {
|
|
1322
|
+
"type": "string",
|
|
1323
|
+
"maxLength": 15,
|
|
1324
|
+
"pattern": "^$|^\\d{1,3}(\\.\\d{1,3}){3}$",
|
|
1325
|
+
"description": "This PC's private address to listen on. Empty: the one of its network adapter (never a public one)."
|
|
1326
|
+
}
|
|
1327
|
+
},
|
|
1328
|
+
"additionalProperties": false
|
|
1329
|
+
}
|
|
1330
|
+
},
|
|
1331
|
+
"additionalProperties": false,
|
|
1332
|
+
"description": "(Beta) Access for other Windows users of this PC and for paired devices."
|
|
1264
1333
|
}
|
|
1265
1334
|
},
|
|
1266
1335
|
"additionalProperties": false
|
|
@@ -1337,6 +1406,12 @@
|
|
|
1337
1406
|
"items": {
|
|
1338
1407
|
"type": "string",
|
|
1339
1408
|
"enum": [
|
|
1409
|
+
"rtk",
|
|
1410
|
+
"headroom",
|
|
1411
|
+
"ccusage",
|
|
1412
|
+
"playwright-mcp",
|
|
1413
|
+
"context7",
|
|
1414
|
+
"rea",
|
|
1340
1415
|
"notepadpp",
|
|
1341
1416
|
"sublime",
|
|
1342
1417
|
"neovim",
|
|
@@ -1381,7 +1456,6 @@
|
|
|
1381
1456
|
"xh",
|
|
1382
1457
|
"grpcurl",
|
|
1383
1458
|
"k6",
|
|
1384
|
-
"rea",
|
|
1385
1459
|
"ghidra",
|
|
1386
1460
|
"x64dbg",
|
|
1387
1461
|
"ilspy",
|
|
@@ -107,24 +107,6 @@
|
|
|
107
107
|
],
|
|
108
108
|
"description": "Sandbox RAM in MB (>= 2048), or \"auto\": free RAM minus reserveHostMb, capped at maxMemoryMb. Never more than this PC can keep in RAM for it (its RAM minus the larger of reserveHostMb and 25 %, 2 GB more with vGPU): a bigger value is lowered."
|
|
109
109
|
},
|
|
110
|
-
"maxMemoryMb": {
|
|
111
|
-
"type": "integer",
|
|
112
|
-
"exclusiveMinimum": 0,
|
|
113
|
-
"maximum": 9007199254740991,
|
|
114
|
-
"description": "Upper limit for memoryMb \"auto\"."
|
|
115
|
-
},
|
|
116
|
-
"maxMemoryPercent": {
|
|
117
|
-
"type": "integer",
|
|
118
|
-
"minimum": 10,
|
|
119
|
-
"maximum": 100,
|
|
120
|
-
"description": "memoryMb \"auto\" never takes more than this share of this PC's total RAM (percent)."
|
|
121
|
-
},
|
|
122
|
-
"reserveHostMb": {
|
|
123
|
-
"type": "integer",
|
|
124
|
-
"minimum": 0,
|
|
125
|
-
"maximum": 9007199254740991,
|
|
126
|
-
"description": "Memory always left for this PC when memoryMb is \"auto\": the sandbox gets at most (free RAM, and RAM plus paging file still unused) minus this."
|
|
127
|
-
},
|
|
128
110
|
"vGpu": {
|
|
129
111
|
"type": "boolean",
|
|
130
112
|
"description": "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)."
|
|
@@ -1037,6 +1019,7 @@
|
|
|
1037
1019
|
"items": {
|
|
1038
1020
|
"type": "string",
|
|
1039
1021
|
"enum": [
|
|
1022
|
+
"rea",
|
|
1040
1023
|
"notepadpp",
|
|
1041
1024
|
"sublime",
|
|
1042
1025
|
"neovim",
|
|
@@ -1081,7 +1064,6 @@
|
|
|
1081
1064
|
"xh",
|
|
1082
1065
|
"grpcurl",
|
|
1083
1066
|
"k6",
|
|
1084
|
-
"rea",
|
|
1085
1067
|
"ghidra",
|
|
1086
1068
|
"x64dbg",
|
|
1087
1069
|
"ilspy",
|
|
@@ -1112,7 +1094,7 @@
|
|
|
1112
1094
|
"rust-analyzer"
|
|
1113
1095
|
]
|
|
1114
1096
|
},
|
|
1115
|
-
"description": "Apps from the catalogue
|
|
1097
|
+
"description": "Apps from the catalogue this project adds to yours (agent add-ons such as rtk, Headroom and the MCP servers are set in your own settings only)."
|
|
1116
1098
|
}
|
|
1117
1099
|
},
|
|
1118
1100
|
"additionalProperties": false
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { fail, plainText } from '../../../core/util/index.js';
|
|
3
|
-
import { humanBytes } from '../../../core/disk.js';
|
|
4
|
-
import { AuditLog } from '../../../host/audit/log.js';
|
|
5
|
-
import { printJson, c } from '../../output/index.js';
|
|
6
|
-
const KINDS = ['proc', 'file', 'session', 'guard', 'note'];
|
|
7
|
-
const KIND_LABEL = {
|
|
8
|
-
proc: 'program',
|
|
9
|
-
file: 'file',
|
|
10
|
-
session: 'session',
|
|
11
|
-
guard: 'GUARD',
|
|
12
|
-
note: 'note',
|
|
13
|
-
};
|
|
14
|
-
/** `sandbox audit`: the audit log of the last days (audit.enabled), newest last. */
|
|
15
|
-
export async function audit(ctx) {
|
|
16
|
-
const settings = ctx.loaded.config.audit;
|
|
17
|
-
const kind = ctx.options.kind;
|
|
18
|
-
if (kind && !KINDS.includes(kind))
|
|
19
|
-
fail('Unknown kind "' + kind + '".', 'Use one of: ' + KINDS.join(', '));
|
|
20
|
-
const log = new AuditLog(AuditLog.dirFor(ctx.storageRoot, ctx.dataPath), settings);
|
|
21
|
-
const events = log.read({
|
|
22
|
-
days: ctx.options.days,
|
|
23
|
-
kinds: kind ? [kind] : undefined,
|
|
24
|
-
grep: ctx.options.grep,
|
|
25
|
-
});
|
|
26
|
-
if (printJson(ctx, events))
|
|
27
|
-
return 0;
|
|
28
|
-
if (!events.length) {
|
|
29
|
-
console.log(settings.enabled
|
|
30
|
-
? 'Nothing in the audit log for the last ' + ctx.options.days + ' day(s).'
|
|
31
|
-
: 'The audit log is off. Turn it on in the menu (Settings > Security & privacy > Audit log) or with: sandbox config set audit.enabled true');
|
|
32
|
-
return 0;
|
|
33
|
-
}
|
|
34
|
-
for (const e of events) {
|
|
35
|
-
// What the sandbox reported is text from the sandbox: no control codes reach your terminal.
|
|
36
|
-
const [p, cmd, parent, dir, act] = [e.p, e.c, e.pp, e.w, e.a].map((v) => plainText(v ?? ''));
|
|
37
|
-
const what = e.k === 'proc'
|
|
38
|
-
? (cmd || p) + (parent ? c.dim(' <- ' + path.win32.basename(parent)) : '')
|
|
39
|
-
: e.k === 'file'
|
|
40
|
-
? act + ' ' + p + c.dim(' in ' + dir)
|
|
41
|
-
: e.k === 'session'
|
|
42
|
-
? act + ' ' + p + c.dim(' ' + dir + ' ' + cmd)
|
|
43
|
-
: p;
|
|
44
|
-
console.log(c.dim(new Date(e.t).toLocaleString()) +
|
|
45
|
-
' ' +
|
|
46
|
-
(e.k === 'guard' ? c.yellow(KIND_LABEL[e.k].padEnd(8)) : KIND_LABEL[e.k].padEnd(8)) +
|
|
47
|
-
what +
|
|
48
|
-
(e.n && e.n > 1 ? c.dim(' x' + e.n) : ''));
|
|
49
|
-
}
|
|
50
|
-
console.log(c.dim('\n' +
|
|
51
|
-
events.length +
|
|
52
|
-
' event(s); the log takes ' +
|
|
53
|
-
humanBytes(log.bytes()) +
|
|
54
|
-
' (' +
|
|
55
|
-
AuditLog.dirFor(ctx.storageRoot, ctx.dataPath) +
|
|
56
|
-
').'));
|
|
57
|
-
return 0;
|
|
58
|
-
}
|