@wenathlan/saddle 2.0.154 → 2.0.159
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/Dockerfile +167 -1334
- package/README.md +59 -60
- package/biome.jsonc +3 -3
- package/browser.ts +482 -0
- package/cli.ts +274 -0
- package/distribution.ts +731 -0
- package/docker.config +29 -8
- package/docs/{architecture.1.8.19.mmd → architecture1819.md} +6 -0
- package/docs/artifactavailability.md +2 -2
- package/docs/browser.md +18 -1
- package/docs/{containerplatforms.2.1.0.md → containerplatforms210.md} +1 -1
- package/docs/{documentmap.1.8.12.md → documentmap1812.md} +1 -1
- package/docs/extension.md +13 -2
- package/docs/features.md +5 -0
- package/docs/libraryapi.md +1 -1
- package/docs/{ninety.modalities.md → ninetymodalities.md} +87 -4
- package/docs/{planning.ninety.md → planningninety.md} +6 -6
- package/docs/{releasenotes.1.8.13.md → releasenotes1813.md} +2 -2
- package/docs/{releasenotes.1.8.14.md → releasenotes1814.md} +1 -1
- package/docs/{repo.synthesis.1.8.16.md → reposynthesis1816.md} +1 -1
- package/docs/todo.md +2 -2
- package/docs/{todo.1.8.15.md → todo1815.md} +1 -1
- package/docs/{todo.1.8.16.md → todo1816.md} +5 -5
- package/execution.ts +677 -0
- package/foundation.ts +314 -0
- package/index.ts +36 -34
- package/isolation.ts +84 -0
- package/modalityregistry.ts +189 -145
- package/modes.ts +170 -0
- package/mttg.config +1 -1
- package/orchestrator.ts +49 -15
- package/package.json +105 -89
- package/qemu.config +2 -2
- package/sandbox.ts +3279 -0
- package/scheduler.ts +1 -1
- package/server.ts +52 -0
- package/tsconfig.json +12 -13
- package/virtual.ts +7528 -0
- package/workloadlaw.ts +293 -0
- package/dist/App.d.ts +0 -5
- package/dist/App.js +0 -52
- package/dist/Sol/Sol.d.ts +0 -3
- package/dist/Sol/Sol.js +0 -46
- package/dist/Sol/agentbrowser/agentbrowser.d.ts +0 -9
- package/dist/Sol/agentbrowser/agentbrowser.js +0 -121
- package/dist/Sol/architecture/architecture.d.ts +0 -9
- package/dist/Sol/architecture/architecture.js +0 -93
- package/dist/Sol/compute/compute.d.ts +0 -9
- package/dist/Sol/compute/compute.js +0 -22
- package/dist/Sol/console/console.d.ts +0 -15
- package/dist/Sol/console/console.js +0 -292
- package/dist/Sol/dashboard/dashboard.d.ts +0 -10
- package/dist/Sol/dashboard/dashboard.js +0 -181
- package/dist/Sol/docs/docs.d.ts +0 -9
- package/dist/Sol/docs/docs.js +0 -28
- package/dist/Sol/home/home.d.ts +0 -35
- package/dist/Sol/home/home.js +0 -239
- package/dist/Sol/integrations/integrations.d.ts +0 -9
- package/dist/Sol/integrations/integrations.js +0 -83
- package/dist/Sol/intro/intro.d.ts +0 -7
- package/dist/Sol/intro/intro.js +0 -102
- package/dist/Sol/login/login.d.ts +0 -16
- package/dist/Sol/login/login.js +0 -49
- package/dist/Sol/notfound/notfound.d.ts +0 -9
- package/dist/Sol/notfound/notfound.js +0 -15
- package/dist/Sol/onboarding/onboarding.d.ts +0 -25
- package/dist/Sol/onboarding/onboarding.js +0 -60
- package/dist/Sol/playground/playground.d.ts +0 -9
- package/dist/Sol/playground/playground.js +0 -127
- package/dist/Sol/register/register.d.ts +0 -16
- package/dist/Sol/register/register.js +0 -193
- package/dist/Sol/shell/Shell.d.ts +0 -124
- package/dist/Sol/shell/Shell.js +0 -335
- package/dist/Sol/wingets/ComputeBootladder.d.ts +0 -6
- package/dist/Sol/wingets/ComputeBootladder.js +0 -71
- package/dist/Sol/wingets/ComputeModalitycatalog.d.ts +0 -7
- package/dist/Sol/wingets/ComputeModalitycatalog.js +0 -71
- package/dist/Sol/wingets/ConsoleApibadge.d.ts +0 -7
- package/dist/Sol/wingets/ConsoleApibadge.js +0 -5
- package/dist/Sol/wingets/ConsoleEdgelaw.d.ts +0 -6
- package/dist/Sol/wingets/ConsoleEdgelaw.js +0 -36
- package/dist/Sol/wingets/ConsoleEventstimeline.d.ts +0 -19
- package/dist/Sol/wingets/ConsoleEventstimeline.js +0 -12
- package/dist/Sol/wingets/ConsoleSnapshotcontrols.d.ts +0 -8
- package/dist/Sol/wingets/ConsoleSnapshotcontrols.js +0 -8
- package/dist/Sol/wingets/ConsoleSpecpanel.d.ts +0 -21
- package/dist/Sol/wingets/ConsoleSpecpanel.js +0 -75
- package/dist/Sol/wingets/ConsoleTerminal.d.ts +0 -22
- package/dist/Sol/wingets/ConsoleTerminal.js +0 -77
- package/dist/Sol/wingets/DashboardAccountpanel.d.ts +0 -18
- package/dist/Sol/wingets/DashboardAccountpanel.js +0 -65
- package/dist/Sol/wingets/DashboardAdminpanel.d.ts +0 -6
- package/dist/Sol/wingets/DashboardAdminpanel.js +0 -90
- package/dist/Sol/wingets/DashboardAuditlog.d.ts +0 -8
- package/dist/Sol/wingets/DashboardAuditlog.js +0 -50
- package/dist/Sol/wingets/DashboardCreatesandboxform.d.ts +0 -10
- package/dist/Sol/wingets/DashboardCreatesandboxform.js +0 -71
- package/dist/Sol/wingets/DashboardEventstimeline.d.ts +0 -8
- package/dist/Sol/wingets/DashboardEventstimeline.js +0 -83
- package/dist/Sol/wingets/DashboardGlobalsandboxestable.d.ts +0 -8
- package/dist/Sol/wingets/DashboardGlobalsandboxestable.js +0 -57
- package/dist/Sol/wingets/DashboardMeshnodestable.d.ts +0 -8
- package/dist/Sol/wingets/DashboardMeshnodestable.js +0 -103
- package/dist/Sol/wingets/DashboardSandboxlist.d.ts +0 -10
- package/dist/Sol/wingets/DashboardSandboxlist.js +0 -163
- package/dist/Sol/wingets/DashboardUserstable.d.ts +0 -8
- package/dist/Sol/wingets/DashboardUserstable.js +0 -78
- package/dist/Sol/wingets/HomeEntrygate.d.ts +0 -23
- package/dist/Sol/wingets/HomeEntrygate.js +0 -73
- package/dist/Sol/wingets/HomeMetricstrip.d.ts +0 -9
- package/dist/Sol/wingets/HomeMetricstrip.js +0 -4
- package/dist/Sol/wingets/HomeRuntimediagram.d.ts +0 -1
- package/dist/Sol/wingets/HomeRuntimediagram.js +0 -22
- package/dist/Sol/wingets/LoginForm.d.ts +0 -19
- package/dist/Sol/wingets/LoginForm.js +0 -141
- package/dist/Sol/wingets/RegisterPasswordconfirm.d.ts +0 -13
- package/dist/Sol/wingets/RegisterPasswordconfirm.js +0 -16
- package/dist/Sol/wingets/RegisterPasswordmeter.d.ts +0 -19
- package/dist/Sol/wingets/RegisterPasswordmeter.js +0 -65
- package/dist/Sol/wingets/RegisterUsernamerules.d.ts +0 -11
- package/dist/Sol/wingets/RegisterUsernamerules.js +0 -16
- package/dist/Sol/wingets/index.d.ts +0 -39
- package/dist/Sol/wingets/index.js +0 -39
- package/dist/alternatives.d.ts +0 -508
- package/dist/alternatives.js +0 -950
- package/dist/api.d.ts +0 -154
- package/dist/api.js +0 -174
- package/dist/auth.d.ts +0 -268
- package/dist/auth.js +0 -476
- package/dist/automation.d.ts +0 -425
- package/dist/automation.js +0 -566
- package/dist/browser.d.ts +0 -561
- package/dist/browser.js +0 -1058
- package/dist/capacitor.config.d.ts +0 -45
- package/dist/capacitor.config.js +0 -48
- package/dist/catalog.d.ts +0 -43
- package/dist/catalog.js +0 -44
- package/dist/cli.d.ts +0 -16
- package/dist/cli.js +0 -168
- package/dist/communication.d.ts +0 -181
- package/dist/communication.js +0 -376
- package/dist/compute.d.ts +0 -1160
- package/dist/compute.js +0 -2272
- package/dist/dashboardlib.d.ts +0 -58
- package/dist/dashboardlib.js +0 -161
- package/dist/db.d.ts +0 -569
- package/dist/db.js +0 -1080
- package/dist/distribution.d.ts +0 -528
- package/dist/distribution.js +0 -810
- package/dist/drizzle.config.d.ts +0 -20
- package/dist/drizzle.config.js +0 -18
- package/dist/edgelandes.d.ts +0 -70
- package/dist/edgelandes.host.d.ts +0 -26
- package/dist/edgelandes.host.js +0 -1089
- package/dist/edgelandes.inproc.d.ts +0 -27
- package/dist/edgelandes.inproc.js +0 -952
- package/dist/edgelandes.js +0 -1133
- package/dist/edgelandes.ninety.d.ts +0 -31
- package/dist/edgelandes.ninety.js +0 -174
- package/dist/edgelandes.virtual.d.ts +0 -25
- package/dist/edgelandes.virtual.js +0 -629
- package/dist/edgeplane.d.ts +0 -121
- package/dist/edgeplane.js +0 -341
- package/dist/examplelocaljob.d.ts +0 -1
- package/dist/examplelocaljob.js +0 -14
- package/dist/execution.d.ts +0 -529
- package/dist/execution.js +0 -760
- package/dist/family.d.ts +0 -16
- package/dist/family.js +0 -42
- package/dist/familyurl.d.ts +0 -21
- package/dist/familyurl.js +0 -24
- package/dist/format.d.ts +0 -18
- package/dist/format.js +0 -59
- package/dist/foundation.d.ts +0 -172
- package/dist/foundation.js +0 -312
- package/dist/index.d.ts +0 -735
- package/dist/index.js +0 -1020
- package/dist/integration.d.ts +0 -235
- package/dist/integration.js +0 -228
- package/dist/intelligence.d.ts +0 -93
- package/dist/intelligence.js +0 -144
- package/dist/isolation.d.ts +0 -128
- package/dist/isolation.js +0 -95
- package/dist/labels.d.ts +0 -665
- package/dist/labels.js +0 -707
- package/dist/localauth.d.ts +0 -127
- package/dist/localauth.js +0 -413
- package/dist/media.d.ts +0 -343
- package/dist/media.js +0 -985
- package/dist/mesh.d.ts +0 -177
- package/dist/mesh.js +0 -468
- package/dist/modalityregistry.d.ts +0 -109
- package/dist/modalityregistry.js +0 -1386
- package/dist/modes.d.ts +0 -358
- package/dist/modes.js +0 -133
- package/dist/onboardingstate.d.ts +0 -79
- package/dist/onboardingstate.js +0 -282
- package/dist/orchestrator.d.ts +0 -1338
- package/dist/orchestrator.js +0 -4310
- package/dist/packager/targetcli.js +0 -4
- package/dist/paths.d.ts +0 -2
- package/dist/paths.js +0 -14
- package/dist/performance.d.ts +0 -415
- package/dist/performance.js +0 -826
- package/dist/quantum.d.ts +0 -809
- package/dist/quantum.js +0 -2072
- package/dist/render.d.ts +0 -380
- package/dist/render.js +0 -1072
- package/dist/runall.d.ts +0 -2
- package/dist/runall.js +0 -39
- package/dist/runtimeprobe.d.ts +0 -4
- package/dist/runtimeprobe.js +0 -8
- package/dist/sandbox.d.ts +0 -355
- package/dist/sandbox.js +0 -1721
- package/dist/sandboxenvprofile.d.ts +0 -29
- package/dist/sandboxenvprofile.js +0 -89
- package/dist/sandboxprofile.d.ts +0 -137
- package/dist/sandboxprofile.js +0 -241
- package/dist/sandboxqueue.d.ts +0 -108
- package/dist/sandboxqueue.js +0 -201
- package/dist/sandboxquota.d.ts +0 -121
- package/dist/sandboxquota.js +0 -236
- package/dist/scheduler.d.ts +0 -595
- package/dist/scheduler.js +0 -1258
- package/dist/scriptlanes.d.ts +0 -182
- package/dist/scriptlanes.js +0 -660
- package/dist/scripts.buildengine.d.ts +0 -1
- package/dist/scripts.buildengine.js +0 -39
- package/dist/scripts.securitygate.d.ts +0 -1
- package/dist/scripts.securitygate.js +0 -68
- package/dist/scripts.validateflatnative.d.ts +0 -1
- package/dist/scripts.validateflatnative.js +0 -72
- package/dist/security.d.ts +0 -500
- package/dist/security.js +0 -1169
- package/dist/seedcatalog.d.ts +0 -13
- package/dist/seedcatalog.js +0 -46
- package/dist/server.d.ts +0 -20
- package/dist/server.js +0 -53
- package/dist/speccatalog.d.ts +0 -31
- package/dist/speccatalog.js +0 -163
- package/dist/tiers.d.ts +0 -1001
- package/dist/tiers.js +0 -2169
- package/dist/utils.d.ts +0 -2
- package/dist/utils.js +0 -5
- package/dist/vaulthandoff.d.ts +0 -141
- package/dist/vaulthandoff.js +0 -444
- package/dist/virtual.d.ts +0 -640
- package/dist/virtual.js +0 -1284
- package/dist/virtualcpu.d.ts +0 -315
- package/dist/virtualcpu.js +0 -1180
- package/dist/virtualgpu.d.ts +0 -344
- package/dist/virtualgpu.js +0 -1000
- package/dist/virtualization.d.ts +0 -606
- package/dist/virtualization.js +0 -1186
- package/dist/virtualmemory.d.ts +0 -817
- package/dist/virtualmemory.js +0 -1795
- package/dist/vite.config.d.ts +0 -3
- package/dist/vite.config.js +0 -48
- package/dist/vitest.config.d.ts +0 -2
- package/dist/vitest.config.js +0 -25
- package/dist/webserver.d.ts +0 -166
- package/dist/webserver.js +0 -2226
- package/dist/workloadlaw.d.ts +0 -133
- package/dist/workloadlaw.js +0 -193
- package/docs/.gitkeep +0 -0
- package/docs/architecture.1.8.19.md +0 -76
- package/docs/logs/examplesession.json +0 -54
- package/docs/repo.analysis.1.8.21.json +0 -2617
- package/docs/repo.candidates.1.8.21.jsonl +0 -666
- package/docs/repo.selected.1.8.21.json +0 -786
- package/manifest.json +0 -20
- package/media.ts +0 -1337
- package/virtualcpu.ts +0 -1274
- package/virtualgpu.ts +0 -1182
- package/virtualization.ts +0 -1628
- package/virtualmemory.ts +0 -2303
- /package/docs/{artifactresearch.1.8.9.md → artifactresearch189.md} +0 -0
- /package/docs/{batches.1816.to.1820.md → batches1816to1820.md} +0 -0
- /package/docs/{brancharchive.2026.08.18.md → brancharchive20260818.md} +0 -0
- /package/docs/{containerplatforms.1.8.17.md → containerplatforms1817.md} +0 -0
- /package/docs/{e2ugh.engine.md → e2ughengine.md} +0 -0
- /package/docs/{flatbuildresearch.1.8.11.md → flatbuildresearch1811.md} +0 -0
- /package/docs/{licenseaudit.1.8.12.md → licenseaudit1812.md} +0 -0
- /package/docs/{mobileconversionresearch.1.8.10.md → mobileconversionresearch1810.md} +0 -0
- /package/docs/{nativeidentityresearch.1.8.11.md → nativeidentityresearch1811.md} +0 -0
- /package/docs/{native.wrappers.md → nativewrappers.md} +0 -0
- /package/docs/{planning.1.8.18.md → planning1818.md} +0 -0
- /package/docs/{planning.1.8.19.md → planning1819.md} +0 -0
- /package/docs/{planning.engine.md → planningengine.md} +0 -0
- /package/docs/{releasenotes.1.8.12.md → releasenotes1812.md} +0 -0
- /package/docs/{releasenotes.1.8.15.md → releasenotes1815.md} +0 -0
- /package/docs/{releasenotes.1.8.16.md → releasenotes1816.md} +0 -0
- /package/docs/{releasenotes.1.8.17.md → releasenotes1817.md} +0 -0
- /package/docs/{releasenotes.1.8.18.md → releasenotes1818.md} +0 -0
- /package/docs/{releasenotes.1.8.19.md → releasenotes1819.md} +0 -0
- /package/docs/{reorganization.1.8.8.md → reorganization188.md} +0 -0
- /package/docs/{reorganization.1.8.9.md → reorganization189.md} +0 -0
- /package/docs/{repo.research.1.8.16.md → reporesearch1816.md} +0 -0
- /package/docs/{repo.research.1.8.21.md → reporesearch1821.md} +0 -0
- /package/docs/{repo.synthesis.1.8.21.md → reposynthesis1821.md} +0 -0
- /package/docs/{research.1.8.18.isolation.md → research1818isolation.md} +0 -0
- /package/docs/{research.1.8.19.virtual.browser.md → research1819virtualbrowser.md} +0 -0
- /package/docs/{scanningresearch.1.8.11.md → scanningresearch1811.md} +0 -0
- /package/docs/{securityaudit.1.8.7.md → securityaudit187.md} +0 -0
- /package/docs/{securityreferences.1.8.11.md → securityreferences1811.md} +0 -0
- /package/docs/{securityresearch.1.8.11.md → securityresearch1811.md} +0 -0
- /package/docs/{signingresearch.1.8.12.md → signingresearch1812.md} +0 -0
- /package/docs/{tauri.glib.risk.1.8.11.md → tauriglibrisk1811.md} +0 -0
- /package/docs/{todo.1.8.18.md → todo1818.md} +0 -0
- /package/docs/{todo.1.8.19.md → todo1819.md} +0 -0
- /package/docs/{toolchainresearch.1.8.9.md → toolchainresearch189.md} +0 -0
- /package/docs/{web.duplicatecleanup.md → webduplicatecleanup.md} +0 -0
- /package/docs/{web.ideas.md → webideas.md} +0 -0
- /package/docs/{workflowimprovements.2026.08.19.md → workflowimprovements20260819.md} +0 -0
package/modes.ts
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* modes.ts — target mode resolution and host-neutral deployment contracts.
|
|
3
|
+
*
|
|
4
|
+
* This file is the v2.0.0 grand-merge consolidation of the former nested
|
|
5
|
+
* folders of the repository (modes) into the single
|
|
6
|
+
* root-level domain file of the saddle family standard: one optimized
|
|
7
|
+
* TypeScript file per correlated domain, ordinal sections, JSDoc on every
|
|
8
|
+
* block, intra-domain imports dissolved, cross-domain imports rewritten to
|
|
9
|
+
* ./<domain>.js. Every capability of every source file is preserved here;
|
|
10
|
+
* the pure re-export barrels (none in this domain) folded their surface into this file directly.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
16
|
+
/* Section 1: modes/modes.ts — mode profiles describe paired operation surfaces without changing engine contracts. */
|
|
17
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
18
|
+
/**
|
|
19
|
+
* mode profiles describe paired operation surfaces without changing engine contracts.
|
|
20
|
+
*/
|
|
21
|
+
const names = ["computer", "library", "application", "browser", "desktop", "mobile", "extension", "cli", "binary", "internet", "physicalfile", "vectorfile", "visible", "headless"];
|
|
22
|
+
|
|
23
|
+
export function modeprofile(options = {}) {
|
|
24
|
+
const enabled = new Set(options.enabled ?? ["library", "cli", "binary"]);
|
|
25
|
+
return Object.fromEntries(names.map((name) => [name, { name, enabled: enabled.has(name), paired: Boolean(options.paired?.includes(name)) }]));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function librarymode(factory) { return { name: "library", start: factory, stop: async () => undefined }; }
|
|
29
|
+
export function climode(run) { return { name: "cli", run }; }
|
|
30
|
+
export function binarymode(run) { return { name: "binary", run }; }
|
|
31
|
+
export function browsermode(adapter) { return { name: "browser", adapter }; }
|
|
32
|
+
export function headlessmode(adapter) { return { name: "headless", adapter }; }
|
|
33
|
+
export function computemode(adapter) { return { name: "computer", adapter }; }
|
|
34
|
+
|
|
35
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
36
|
+
/* Section 2: modes/matrix.ts — mode matrix keeps supported execution choices in one grouped contract. */
|
|
37
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
38
|
+
/**
|
|
39
|
+
* mode matrix keeps supported execution choices in one grouped contract.
|
|
40
|
+
*/
|
|
41
|
+
export const modeaxes = Object.freeze({
|
|
42
|
+
execution: ["library", "application", "browser", "desktopapp", "mobileapp", "extension", "cli", "binary", "computer", "internet"],
|
|
43
|
+
runtime: ["node", "browser", "deno", "bun", "worker", "unknown"],
|
|
44
|
+
memory: ["internal", "external", "physical", "vectorized", "library"],
|
|
45
|
+
file: ["internal", "external", "physical", "vector"],
|
|
46
|
+
dependency: ["internal", "external", "dev"],
|
|
47
|
+
visibility: ["visible", "headless"],
|
|
48
|
+
pair: ["without", "with"]
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const operationmodes = Object.freeze(modeaxes.execution.flatMap((execution) => modeaxes.pair.map((pair) => `${execution}${pair}`)));
|
|
52
|
+
|
|
53
|
+
/** Returns true when the matrix contains the requested axis value. */
|
|
54
|
+
export function validatemode(axis, value) { return Boolean(modeaxes[axis]?.includes(value)); }
|
|
55
|
+
|
|
56
|
+
/** Returns a serializable snapshot for documentation and diagnostics. */
|
|
57
|
+
export function modecatalog() { return { axes: Object.fromEntries(Object.entries(modeaxes).map(([key, values]) => [key, [...values]])), operationmodes: [...operationmodes] }; }
|
|
58
|
+
|
|
59
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
60
|
+
/* Section 3: modes/resolve.ts — mode resolver selects open defaults while preserving every caller choice. */
|
|
61
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
62
|
+
/**
|
|
63
|
+
* mode resolver selects open defaults while preserving every caller choice.
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
/** Resolves an execution profile without starting a process or opening a socket. */
|
|
67
|
+
export function resolvemode(options = {}) {
|
|
68
|
+
const profile = {
|
|
69
|
+
execution: options.execution ?? "library",
|
|
70
|
+
runtime: options.runtime ?? "unknown",
|
|
71
|
+
memory: options.memory ?? "internal",
|
|
72
|
+
file: options.file ?? "internal",
|
|
73
|
+
dependency: options.dependency ?? "internal",
|
|
74
|
+
visibility: options.visibility ?? "headless",
|
|
75
|
+
pair: options.pair ?? "without"
|
|
76
|
+
};
|
|
77
|
+
for (const [axis, value] of Object.entries(profile)) if (!validatemode(axis, value)) throw new TypeError(`unsupported mode ${axis}:${value}`);
|
|
78
|
+
return { ...profile, capabilities: modecapabilities(profile) };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Returns stable capabilities for adapters and diagnostics. */
|
|
82
|
+
export function modecapabilities(profile) {
|
|
83
|
+
return {
|
|
84
|
+
library: profile.execution === "library" || profile.execution === "application",
|
|
85
|
+
browser: profile.execution === "browser" || profile.execution === "extension" || profile.runtime === "browser" || profile.runtime === "worker",
|
|
86
|
+
cli: profile.execution === "cli" || profile.execution === "binary",
|
|
87
|
+
physicalmemory: profile.memory === "physical",
|
|
88
|
+
vectorizedmemory: profile.memory === "vectorized",
|
|
89
|
+
externalmemory: profile.memory === "external",
|
|
90
|
+
externalfile: profile.file === "external",
|
|
91
|
+
externaldependency: profile.dependency === "external",
|
|
92
|
+
visible: profile.visibility === "visible"
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Returns a stable cross-runtime capability report without starting infrastructure. */
|
|
97
|
+
export function capabilityreport(options = {}) {
|
|
98
|
+
const overrides = { runtime: options.runtime ?? "unknown", memory: options.memory ?? "internal", file: options.file ?? "internal", dependency: options.dependency ?? "internal", visibility: options.visibility ?? "headless", pair: options.pair ?? "without" };
|
|
99
|
+
const profiles = modeaxes.execution.map((execution) => {
|
|
100
|
+
const profile = resolvemode({ ...overrides, execution });
|
|
101
|
+
return { mode: execution, capabilities: profile.capabilities, profile };
|
|
102
|
+
});
|
|
103
|
+
return { version: 1, axes: Object.fromEntries(Object.entries(modeaxes).map(([key, values]) => [key, [...values]])), overrides, profiles, infrastructure: { host: "caller-owned", port: "caller-owned", credentials: "caller-owned", provider: "caller-owned" } };
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Applies one profile to a caller supplied operation. */
|
|
107
|
+
export async function withmode(options, operation) { if (typeof operation !== "function") throw new TypeError("mode operation is required"); return operation(resolvemode(options)); }
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
111
|
+
/* Section 4: modes/deploy.ts — deploy surface exposes artifact planning without performing provider mutations. */
|
|
112
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
113
|
+
/**
|
|
114
|
+
* deploy surface exposes artifact planning without performing provider mutations.
|
|
115
|
+
*/
|
|
116
|
+
export { publishplan, registrymanifest } from "./distribution.ts";
|
|
117
|
+
/* the packaging surface pair (surfacemanifest, surfacebundle) moved to
|
|
118
|
+
* devthink with the automation domain (the saddle ownership law, wave a,
|
|
119
|
+
* actions 108-112 — the deploy surface keeps the artifact planning pair
|
|
120
|
+
* the engine owns). */
|
|
121
|
+
|
|
122
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
123
|
+
/* Section 5: modes/targets.ts — target profiles keep platform packaging open and describe capability boundaries. */
|
|
124
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
125
|
+
/**
|
|
126
|
+
* target profiles keep platform packaging open and describe capability boundaries.
|
|
127
|
+
*/
|
|
128
|
+
export const targetprofiles = Object.freeze({
|
|
129
|
+
application: { runtime: "caller", entry: "distpackage/index.js", capabilities: ["memory", "storage", "network"], formats: ["zip", "tarball"] },
|
|
130
|
+
computer: { runtime: "node", entry: "distpackage/index.js", capabilities: ["memory", "storage", "runner"], formats: ["node", "bun", "deno", "singlefile"] },
|
|
131
|
+
desktopapp: { runtime: "tauri", entry: "desktop/src-tauri", capabilities: ["memory", "file", "visible"], formats: ["appimage", "deb", "rpm", "snap", "flatpak", "dmg", "pkg", "exe", "msi", "msix"] },
|
|
132
|
+
mobileapp: { runtime: "capacitor", entry: "index.html", capabilities: ["memory", "network", "visible"], formats: ["apk", "aab", "ipa"] },
|
|
133
|
+
android: { runtime: "capacitor", entry: "android", capabilities: ["memory", "network", "visible"], formats: ["apk", "aab"] },
|
|
134
|
+
ios: { runtime: "capacitor", entry: "ios", capabilities: ["memory", "network", "visible"], formats: ["ipa"] },
|
|
135
|
+
cli: { runtime: "node", entry: "distpackage/cli/main.js", capabilities: ["memory", "storage", "network"], formats: ["node", "bun", "deno", "singlefile", "exe", "deb", "rpm"] },
|
|
136
|
+
binary: { runtime: "caller", entry: "distpackage/cli/main.js", capabilities: ["memory", "storage", "runner"], formats: ["sea", "singlefile", "wasm"] },
|
|
137
|
+
browser: { runtime: "tauri", entry: "desktop/src-tauri", capabilities: ["memory", "network", "visible"], formats: ["html", "pwa", "wasm", "appimage", "deb", "rpm", "dmg", "exe", "msi"] },
|
|
138
|
+
extension: { runtime: "browser", entry: "distpackage/extension/index.js", capabilities: ["browser", "network", "visible"], formats: ["crx", "xpi", "safariextz"] },
|
|
139
|
+
internet: { runtime: "caller", entry: "distpackage/index.js", capabilities: ["network", "webhook", "api"], formats: ["http", "websocket", "grpc", "rest"] },
|
|
140
|
+
web: { runtime: "browser", entry: "index.html", capabilities: ["network", "visible"], formats: ["html", "pwa", "ssg", "ssr", "wasm"] },
|
|
141
|
+
libreoffice: { runtime: "caller", entry: "distpackage/index.js", capabilities: ["file", "network"], formats: ["oxt", "zip"] },
|
|
142
|
+
mcp: { runtime: "caller", entry: "distpackage/adapters/mcpserver.js", capabilities: ["network", "api"], formats: ["stdio", "jsonrpc"] },
|
|
143
|
+
vsix: { runtime: "caller", entry: "distpackage/index.js", capabilities: ["network", "visible"], formats: ["vsix"] },
|
|
144
|
+
container: { runtime: "node", entry: "distpackage/index.js", capabilities: ["memory", "storage", "network"], formats: ["oci", "docker"] }
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
/** Creates a surface target with caller supplied entry and capabilities. */
|
|
148
|
+
export function targetmanifest(target, options = {}) { const profile = targetprofiles[target]; if (!profile) throw new TypeError(`unsupported target: ${target}`); return { target, runtime: options.runtime ?? profile.runtime, entry: options.entry ?? profile.entry, formats: options.formats ?? [...profile.formats], capabilities: options.capabilities ?? [...profile.capabilities], permissions: options.permissions ?? [], metadata: options.metadata ?? {} }; }
|
|
149
|
+
|
|
150
|
+
/** Returns all supported target profiles for documentation and tooling. */
|
|
151
|
+
export function targetcatalog() { return Object.fromEntries(Object.entries(targetprofiles).map(([key, value]) => [key, { ...value, capabilities: [...value.capabilities] }])); }
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
155
|
+
/* Section 6: the runner-mode ladder — the runtime targets a run asks */
|
|
156
|
+
/* the engine for (wave 3, the engine ownership law: forge and foundry */
|
|
157
|
+
/* consumed the five targets as duplicated twin lists; the ladder */
|
|
158
|
+
/* answers from the saddle owner from this day on, and the apps import */
|
|
159
|
+
/* it through the published library specifier). Zero logic change to */
|
|
160
|
+
/* the lanes above — the section is additive and imports nothing. */
|
|
161
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
162
|
+
/**
|
|
163
|
+
* the runner modes of the engine: the runtime targets a run asks for on
|
|
164
|
+
* the saddle boundary — the full virtual machine, the runner host, the
|
|
165
|
+
* node packages lane, the docker lane and the ghcr immutable lane.
|
|
166
|
+
*/
|
|
167
|
+
export const runnermodes = ["full-virtual", "runner", "node-packages", "docker", "ghcr"] as const;
|
|
168
|
+
|
|
169
|
+
/** one runner mode of the engine (the runtime target a run asks for). */
|
|
170
|
+
export type RunnerMode = (typeof runnermodes)[number];
|
package/mttg.config
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"meta": {
|
|
3
3
|
"name": "mttg.config",
|
|
4
4
|
"title": "saddle - MTTG Multi-Tenant Task Groups (cgroups v2 + tenants + transcode) with MTTCG (QEMU TCG) section",
|
|
5
|
-
"version": "2.0.
|
|
5
|
+
"version": "2.0.154",
|
|
6
6
|
"date": "2026-08-22",
|
|
7
7
|
"language": "en",
|
|
8
8
|
"conceptSeparation": "MTTG = Multi-Tenant Task Groups (cgroup v2 cpu.weight/cpuset/memory/io/pids/hugetlb/rdma + tenants + transcode pipelines). MTTCG = QEMU Multi-Threaded TCG (one host thread per vCPU under TCG). Both live here as DISTINCT sections; MTTCG accel flags also in qemu.config#mttcg.",
|
package/orchestrator.ts
CHANGED
|
@@ -68,8 +68,8 @@ import { cpus, freemem, networkInterfaces, tmpdir, totalmem } from 'node:os';
|
|
|
68
68
|
import path from 'node:path';
|
|
69
69
|
import process from 'node:process';
|
|
70
70
|
import { setTimeout as sleep } from 'node:timers/promises';
|
|
71
|
-
import type { enginetopicname, enginetopics } from './index.
|
|
72
|
-
import { enginebus, MetricsStore } from './index.
|
|
71
|
+
import type { enginetopicname, enginetopics } from './index.ts';
|
|
72
|
+
import { enginebus, MetricsStore } from './index.ts';
|
|
73
73
|
|
|
74
74
|
/* ------------------------------------------------------------------ */
|
|
75
75
|
/* context: runtime catalog (verified 2026-08-22) */
|
|
@@ -1279,8 +1279,12 @@ class firecrackerruntime extends runtimestrategy {
|
|
|
1279
1279
|
* the class also absorbs spawnqemu from the Meta source: the vm plane
|
|
1280
1280
|
* launches qemu with monitor and qmp unix sockets, a numa pin line,
|
|
1281
1281
|
* vfio devices for every gpu assignment, extra args from qemu.config
|
|
1282
|
-
* and
|
|
1283
|
-
*
|
|
1282
|
+
* and — the honest-boot law of the engine-real rung — when the qemu
|
|
1283
|
+
* binary is absent the spawn refuses with ERR_QEMU_ABSENT (the error
|
|
1284
|
+
* names the binary the host must carry) so a vm record never claims
|
|
1285
|
+
* running over a stand-in process: scheduling and lifecycle still
|
|
1286
|
+
* exercise end to end in CI through the argv builders and the create /
|
|
1287
|
+
* destroy planes, never through a faked boot.
|
|
1284
1288
|
*/
|
|
1285
1289
|
class qemuruntime extends runtimestrategy {
|
|
1286
1290
|
override readonly name: sandboxruntime = 'qemu';
|
|
@@ -1346,13 +1350,24 @@ class qemuruntime extends runtimestrategy {
|
|
|
1346
1350
|
|
|
1347
1351
|
/**
|
|
1348
1352
|
* builds the vm plane argv: strategy flags plus the name/uuid, dual
|
|
1349
|
-
* unix sockets, virtio balloon, the
|
|
1350
|
-
*
|
|
1353
|
+
* unix sockets, virtio balloon, the numa pin line and one vfio-pci
|
|
1354
|
+
* device per assigned gpu. the netdev answers the honest network law:
|
|
1355
|
+
* the per-numa bridge (br-vhe-N) rides when the interface exists on
|
|
1356
|
+
* the host (the privileged deployments the bridge plane owns), and a
|
|
1357
|
+
* host without the interface rides user-mode networking (slirp) — a
|
|
1358
|
+
* real qemu network mode that needs no privilege — so the argv a host
|
|
1359
|
+
* without the bridge answers is a bootable argv, never a bridge the
|
|
1360
|
+
* kernel would refuse.
|
|
1351
1361
|
*/
|
|
1352
1362
|
buildvmcommand(vm: vmrecord, assignments: readonly gpuassignment[]): readonly string[] {
|
|
1353
1363
|
const kvm = kvmavailable();
|
|
1354
1364
|
const accel = vm.accel === 'kvm' && kvm ? 'kvm' : 'tcg,thread=multi,tb-size=1024';
|
|
1355
1365
|
const sockets = this.socketsfor(vm.id);
|
|
1366
|
+
const bridgename = `br-vhe-${vm.numanode}`;
|
|
1367
|
+
const bridgeonhost = existsSync(`/sys/class/net/${bridgename}`);
|
|
1368
|
+
const netdev = bridgeonhost
|
|
1369
|
+
? `bridge,br=${bridgename},id=net0`
|
|
1370
|
+
: 'user,id=net0';
|
|
1356
1371
|
const args: string[] = [
|
|
1357
1372
|
vm.qemubinary,
|
|
1358
1373
|
'-machine',
|
|
@@ -1372,7 +1387,7 @@ class qemuruntime extends runtimestrategy {
|
|
|
1372
1387
|
'-device',
|
|
1373
1388
|
'virtio-balloon-pci,id=balloon0',
|
|
1374
1389
|
'-netdev',
|
|
1375
|
-
|
|
1390
|
+
netdev,
|
|
1376
1391
|
'-device',
|
|
1377
1392
|
'virtio-net-pci,netdev=net0',
|
|
1378
1393
|
'-display',
|
|
@@ -1394,8 +1409,12 @@ class qemuruntime extends runtimestrategy {
|
|
|
1394
1409
|
|
|
1395
1410
|
/**
|
|
1396
1411
|
* spawns qemu for a vm record; when the binary does not exist the
|
|
1397
|
-
* method
|
|
1398
|
-
*
|
|
1412
|
+
* method refuses with ERR_QEMU_ABSENT — the honest-boot law of the
|
|
1413
|
+
* engine-real rung: a host without the qemu binary never answers a
|
|
1414
|
+
* stand-in process, the vm record never claims running over a sleep
|
|
1415
|
+
* (startvm catches the refusal, marks the vm failed and publishes the
|
|
1416
|
+
* error, so CI exercises the argv builders and the create / destroy
|
|
1417
|
+
* planes instead of a faked boot).
|
|
1399
1418
|
*/
|
|
1400
1419
|
async spawn(
|
|
1401
1420
|
vm: vmrecord,
|
|
@@ -1404,14 +1423,23 @@ class qemuruntime extends runtimestrategy {
|
|
|
1404
1423
|
): Promise<qemuprocess> {
|
|
1405
1424
|
try {
|
|
1406
1425
|
const sockets = this.socketsfor(vm.id);
|
|
1407
|
-
|
|
1426
|
+
// the socket seats must exist before the guest opens its servers —
|
|
1427
|
+
// qemu creates the socket files itself, never the parent directory
|
|
1428
|
+
mkdirSync(path.dirname(sockets.qmp), { recursive: true });
|
|
1429
|
+
// the foreground law of the honest-boot rung: the tracked child is
|
|
1430
|
+
// the process that lives as long as the vm — the daemonize flag
|
|
1431
|
+
// would fork the daemon and exit the parent at once (the vm would
|
|
1432
|
+
// read stopped over a live machine), so the spawn rides the
|
|
1433
|
+
// foreground argv the exit callback can own
|
|
1434
|
+
const argv = this.buildvmcommand(vm, assignments);
|
|
1408
1435
|
const [bin, ...rest] = argv;
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1436
|
+
if (!existsSync(bin)) {
|
|
1437
|
+
throw new orchestratorerror(
|
|
1438
|
+
`qemu spawn refused for ${vm.id}: the binary ${bin} is absent from the engine host (the honest-boot law — a vm never runs over a stand-in process)`,
|
|
1439
|
+
'ERR_QEMU_ABSENT',
|
|
1440
|
+
);
|
|
1414
1441
|
}
|
|
1442
|
+
const child: ChildProcess = spawn(bin, rest, { stdio: 'ignore', detached: false });
|
|
1415
1443
|
const pid = child.pid ?? randomInt(1000, 11000);
|
|
1416
1444
|
const processinfo: qemuprocess = {
|
|
1417
1445
|
vmid: vm.id,
|
|
@@ -1426,6 +1454,12 @@ class qemuruntime extends runtimestrategy {
|
|
|
1426
1454
|
});
|
|
1427
1455
|
return processinfo;
|
|
1428
1456
|
} catch (error) {
|
|
1457
|
+
// the honest-boot refusal rides through untouched — the code the
|
|
1458
|
+
// law answers (ERR_QEMU_ABSENT) is the code startvm and the vm
|
|
1459
|
+
// record read, never the generic spawn wrap
|
|
1460
|
+
if (error instanceof orchestratorerror) {
|
|
1461
|
+
throw error;
|
|
1462
|
+
}
|
|
1429
1463
|
throw new orchestratorerror(
|
|
1430
1464
|
`qemu spawn failed for ${vm.id}: ${errormessage(error)}`,
|
|
1431
1465
|
'ERR_QEMU_SPAWN',
|