@wenathlan/saddle 2.1.6 → 2.1.8
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 +170 -66
- package/LICENSE +0 -0
- package/README.md +73 -58
- package/alternatives.ts +0 -0
- package/biome.jsonc +134 -0
- package/boards.json +2 -2
- package/browser.ts +482 -0
- package/cli.ts +274 -0
- package/compute.ts +4 -4
- package/cores.json +2 -2
- package/distribution.ts +731 -0
- package/docker.config +37 -9
- package/docs/.gitkeep +0 -0
- package/docs/actionrecorder.md +0 -0
- package/docs/actionsincident.md +0 -0
- package/docs/alternatives.md +0 -0
- package/docs/architecture.md +0 -0
- package/docs/{architecture-1.8.19.md → architecture1819.md} +0 -0
- package/docs/{architecture-1.8.19.mmd → architecture1819.mmd} +0 -0
- package/docs/artifactavailability.md +2 -2
- package/docs/{artifactresearch-1.8.9.md → artifactresearch189.md} +0 -0
- package/docs/{batches-1816-1820.md → batches1816to1820.md} +0 -0
- package/docs/{brancharchive-2026-08-18.md → brancharchive20260818.md} +0 -0
- package/docs/branchaudit.md +0 -0
- package/docs/browser.md +18 -1
- package/docs/capabilityreport.md +0 -0
- package/docs/comparativeaudit.md +0 -0
- package/docs/consolidation.md +0 -0
- package/docs/{containerplatforms-1.8.17.md → containerplatforms1817.md} +0 -0
- package/docs/{containerplatforms-2.1.0.md → containerplatforms210.md} +1 -1
- package/docs/{documentmap-1.8.12.md → documentmap1812.md} +1 -1
- package/docs/{e2ugh-engine.md → e2ughengine.md} +0 -0
- package/docs/ecosystemplan.md +0 -0
- package/docs/enginearchitecture.md +0 -0
- package/docs/extension.md +13 -2
- package/docs/featureaudit.md +0 -0
- package/docs/{flatbuildresearch-1.8.11.md → flatbuildresearch1811.md} +0 -0
- package/docs/gapmatrix.md +0 -0
- package/docs/hardware.md +0 -0
- package/docs/libraryapi.md +1 -1
- package/docs/{licenseaudit-1.8.12.md → licenseaudit1812.md} +0 -0
- package/docs/logs/examplesession.json +54 -0
- package/docs/memoryengine.md +0 -0
- package/docs/{mobileconversionresearch-1.8.10.md → mobileconversionresearch1810.md} +0 -0
- package/docs/modes.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/ninetymodalities.md +191 -0
- package/docs/optimization.md +0 -0
- package/docs/packageaudit185.md +0 -0
- package/docs/performance.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/planningengine.md +186 -0
- package/docs/planningninety.md +391 -0
- package/docs/platformpipelineaudit.md +0 -0
- package/docs/platformpipelines.md +0 -0
- package/docs/productindex.md +0 -0
- package/docs/registryresearch.md +0 -0
- package/docs/release.md +0 -0
- package/docs/release17notes.md +0 -0
- package/docs/release181notes.md +0 -0
- package/docs/release182notes.md +0 -0
- package/docs/release184notes.md +0 -0
- package/docs/release185notes.md +0 -0
- package/docs/release18notes.md +0 -0
- package/docs/releaseassets.md +0 -0
- package/docs/{releasenotes-1.8.12.md → releasenotes1812.md} +0 -0
- package/docs/{releasenotes-1.8.13.md → releasenotes1813.md} +2 -2
- package/docs/{releasenotes-1.8.14.md → releasenotes1814.md} +1 -1
- 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-analysis-1.8.21.json → repoanalysis1821.json} +0 -0
- package/docs/{repo-candidates-1.8.21.jsonl → repocandidates1821.jsonl} +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-selected-1.8.21.json → reposelected1821.json} +0 -0
- package/docs/{repo-synthesis-1.8.16.md → reposynthesis1816.md} +1 -1
- 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/roadmapp2p3.md +0 -0
- package/docs/s3compatible.md +0 -0
- package/docs/{scanningresearch-1.8.11.md → scanningresearch1811.md} +0 -0
- package/docs/security.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/signingwithoutcertificates.md +0 -0
- package/docs/signpathapplication.md +0 -0
- package/docs/sitemap.md +0 -0
- package/docs/{tauri-glib-risk-1.8.11.md → tauriglibrisk1811.md} +0 -0
- 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/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/toolchains.md +0 -0
- package/docs/usage.md +0 -0
- package/docs/viability.md +0 -0
- package/docs/virtualization.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/docs/workflowinputs.md +0 -0
- package/docs/workflowoperations.md +0 -0
- package/docs/workloadlaw.md +104 -0
- package/execution.ts +677 -0
- package/foundation.ts +314 -0
- package/gpumonitor.cpp +0 -0
- package/gpus.json +1 -1
- package/index.ts +38 -29
- package/isolation.ts +84 -0
- package/modalityregistry.ts +1493 -0
- package/{dist/modes.js → modes.ts} +79 -62
- package/mttg.config +1 -1
- package/orchestrator.ts +54 -17
- package/package.json +245 -146
- package/passage.config +0 -0
- package/performance.ts +0 -0
- package/processors.json +1 -1
- package/qemu.config +2 -2
- package/qemubridge.py +0 -0
- package/quantum.ts +0 -0
- package/render.ts +0 -0
- package/sandbox.ts +2035 -0
- package/scheduler.ts +1 -1
- package/security.ts +0 -0
- package/server.ts +52 -0
- package/tiers.ts +9 -3
- package/tsconfig.json +22 -13
- package/virtual.ts +1105 -0
- package/virtualcpu.ts +1 -0
- package/virtualgpu.ts +2 -1
- package/virtualhardware.c +0 -0
- package/virtualhardware.json +2 -2
- package/virtualization.ts +1 -1
- package/virtualizationcore.cpp +0 -0
- package/virtualmemory.ts +0 -0
- package/vm.config.json +2 -2
- package/workloadlaw.ts +293 -0
- package/biome.json +0 -151
- package/dist/acquisition.d.ts +0 -359
- package/dist/acquisition.d.ts.map +0 -1
- package/dist/acquisition.js +0 -629
- package/dist/acquisition.js.map +0 -1
- package/dist/alternatives.d.ts +0 -509
- package/dist/alternatives.d.ts.map +0 -1
- package/dist/alternatives.js +0 -951
- package/dist/alternatives.js.map +0 -1
- package/dist/automation.d.ts +0 -426
- package/dist/automation.d.ts.map +0 -1
- package/dist/automation.js +0 -561
- package/dist/automation.js.map +0 -1
- package/dist/browser.d.ts +0 -562
- package/dist/browser.d.ts.map +0 -1
- package/dist/browser.js +0 -1057
- package/dist/browser.js.map +0 -1
- package/dist/cli.d.ts +0 -17
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -169
- package/dist/cli.js.map +0 -1
- package/dist/communication.d.ts +0 -192
- package/dist/communication.d.ts.map +0 -1
- package/dist/communication.js +0 -418
- package/dist/communication.js.map +0 -1
- package/dist/compute.d.ts +0 -1161
- package/dist/compute.d.ts.map +0 -1
- package/dist/compute.js +0 -2273
- package/dist/compute.js.map +0 -1
- package/dist/distribution.d.ts +0 -529
- package/dist/distribution.d.ts.map +0 -1
- package/dist/distribution.js +0 -811
- package/dist/distribution.js.map +0 -1
- package/dist/docs/example-localjob.d.ts +0 -2
- package/dist/docs/example-localjob.d.ts.map +0 -1
- package/dist/docs/example-localjob.js +0 -15
- package/dist/docs/example-localjob.js.map +0 -1
- package/dist/docs/example-publicapi.d.ts +0 -2
- package/dist/docs/example-publicapi.d.ts.map +0 -1
- package/dist/docs/example-publicapi.js +0 -7
- package/dist/docs/example-publicapi.js.map +0 -1
- package/dist/execution.d.ts +0 -530
- package/dist/execution.d.ts.map +0 -1
- package/dist/execution.js +0 -761
- package/dist/execution.js.map +0 -1
- package/dist/format.d.ts +0 -19
- package/dist/format.d.ts.map +0 -1
- package/dist/format.js +0 -60
- package/dist/format.js.map +0 -1
- package/dist/foundation.d.ts +0 -176
- package/dist/foundation.d.ts.map +0 -1
- package/dist/foundation.js +0 -309
- package/dist/foundation.js.map +0 -1
- package/dist/index.d.ts +0 -735
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -1020
- package/dist/index.js.map +0 -1
- package/dist/integration.d.ts +0 -236
- package/dist/integration.d.ts.map +0 -1
- package/dist/integration.js +0 -236
- package/dist/integration.js.map +0 -1
- package/dist/intelligence.d.ts +0 -94
- package/dist/intelligence.d.ts.map +0 -1
- package/dist/intelligence.js +0 -145
- package/dist/intelligence.js.map +0 -1
- package/dist/isolation.d.ts +0 -129
- package/dist/isolation.d.ts.map +0 -1
- package/dist/isolation.js +0 -96
- package/dist/isolation.js.map +0 -1
- package/dist/media.d.ts +0 -344
- package/dist/media.d.ts.map +0 -1
- package/dist/media.js +0 -986
- package/dist/media.js.map +0 -1
- package/dist/modes.d.ts +0 -359
- package/dist/modes.d.ts.map +0 -1
- package/dist/modes.js.map +0 -1
- package/dist/operations.d.ts +0 -67
- package/dist/operations.d.ts.map +0 -1
- package/dist/operations.js +0 -94
- package/dist/operations.js.map +0 -1
- package/dist/orchestrator.d.ts +0 -1339
- package/dist/orchestrator.d.ts.map +0 -1
- package/dist/orchestrator.js +0 -4308
- package/dist/orchestrator.js.map +0 -1
- package/dist/packager/targetcli.js +0 -4
- package/dist/performance.d.ts +0 -416
- package/dist/performance.d.ts.map +0 -1
- package/dist/performance.js +0 -827
- package/dist/performance.js.map +0 -1
- package/dist/quantum.d.ts +0 -810
- package/dist/quantum.d.ts.map +0 -1
- package/dist/quantum.js +0 -2073
- package/dist/quantum.js.map +0 -1
- package/dist/render.d.ts +0 -381
- package/dist/render.d.ts.map +0 -1
- package/dist/render.js +0 -1073
- package/dist/render.js.map +0 -1
- package/dist/scheduler.d.ts +0 -596
- package/dist/scheduler.d.ts.map +0 -1
- package/dist/scheduler.js +0 -1259
- package/dist/scheduler.js.map +0 -1
- package/dist/security.d.ts +0 -501
- package/dist/security.d.ts.map +0 -1
- package/dist/security.js +0 -1170
- package/dist/security.js.map +0 -1
- package/dist/server.d.ts +0 -21
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -52
- package/dist/server.js.map +0 -1
- package/dist/tiers.d.ts +0 -1002
- package/dist/tiers.d.ts.map +0 -1
- package/dist/tiers.js +0 -2165
- package/dist/tiers.js.map +0 -1
- package/dist/virtual.d.ts +0 -641
- package/dist/virtual.d.ts.map +0 -1
- package/dist/virtual.js +0 -1285
- package/dist/virtual.js.map +0 -1
- package/dist/virtualcpu.d.ts +0 -316
- package/dist/virtualcpu.d.ts.map +0 -1
- package/dist/virtualcpu.js +0 -1180
- package/dist/virtualcpu.js.map +0 -1
- package/dist/virtualgpu.d.ts +0 -345
- package/dist/virtualgpu.d.ts.map +0 -1
- package/dist/virtualgpu.js +0 -1000
- package/dist/virtualgpu.js.map +0 -1
- package/dist/virtualization.d.ts +0 -607
- package/dist/virtualization.d.ts.map +0 -1
- package/dist/virtualization.js +0 -1187
- package/dist/virtualization.js.map +0 -1
- package/dist/virtualmemory.d.ts +0 -818
- package/dist/virtualmemory.d.ts.map +0 -1
- package/dist/virtualmemory.js +0 -1796
- package/dist/virtualmemory.js.map +0 -1
- package/dist/vitest.config.d.ts +0 -3
- package/dist/vitest.config.d.ts.map +0 -1
- package/dist/vitest.config.js +0 -26
- package/dist/vitest.config.js.map +0 -1
- package/dist/webscrape.d.ts +0 -720
- package/dist/webscrape.d.ts.map +0 -1
- package/dist/webscrape.js +0 -2697
- package/dist/webscrape.js.map +0 -1
- package/docs/CONVERSA.txt +0 -1523
- package/docs/architecture-1.8.19.png +0 -0
- package/docs/assets/architecture.svg +0 -45
- package/docs/assets/saddlemark.svg +0 -13
- package/docs/example-localjob.ts +0 -15
- package/docs/example-publicapi.ts +0 -7
- package/docs/saddle.archive.1.8.17.tar.gz.gpg +0 -0
- package/media.ts +0 -1337
- package/web/manifest.json +0 -30
- package/web/readme.md +0 -383
- package/web/tsconfig.json +0 -25
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
* ./<domain>.js. Every capability of every source file is preserved here;
|
|
10
10
|
* the pure re-export barrels (none in this domain) folded their surface into this file directly.
|
|
11
11
|
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
12
15
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
13
16
|
/* Section 1: modes/modes.ts — mode profiles describe paired operation surfaces without changing engine contracts. */
|
|
14
17
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
@@ -16,16 +19,19 @@
|
|
|
16
19
|
* mode profiles describe paired operation surfaces without changing engine contracts.
|
|
17
20
|
*/
|
|
18
21
|
const names = ["computer", "library", "application", "browser", "desktop", "mobile", "extension", "cli", "binary", "internet", "physicalfile", "vectorfile", "visible", "headless"];
|
|
22
|
+
|
|
19
23
|
export function modeprofile(options = {}) {
|
|
20
|
-
|
|
21
|
-
|
|
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)) }]));
|
|
22
26
|
}
|
|
27
|
+
|
|
23
28
|
export function librarymode(factory) { return { name: "library", start: factory, stop: async () => undefined }; }
|
|
24
29
|
export function climode(run) { return { name: "cli", run }; }
|
|
25
30
|
export function binarymode(run) { return { name: "binary", run }; }
|
|
26
31
|
export function browsermode(adapter) { return { name: "browser", adapter }; }
|
|
27
32
|
export function headlessmode(adapter) { return { name: "headless", adapter }; }
|
|
28
33
|
export function computemode(adapter) { return { name: "computer", adapter }; }
|
|
34
|
+
|
|
29
35
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
30
36
|
/* Section 2: modes/matrix.ts — mode matrix keeps supported execution choices in one grouped contract. */
|
|
31
37
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
@@ -33,75 +39,86 @@ export function computemode(adapter) { return { name: "computer", adapter }; }
|
|
|
33
39
|
* mode matrix keeps supported execution choices in one grouped contract.
|
|
34
40
|
*/
|
|
35
41
|
export const modeaxes = Object.freeze({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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"]
|
|
43
49
|
});
|
|
50
|
+
|
|
44
51
|
export const operationmodes = Object.freeze(modeaxes.execution.flatMap((execution) => modeaxes.pair.map((pair) => `${execution}${pair}`)));
|
|
52
|
+
|
|
45
53
|
/** Returns true when the matrix contains the requested axis value. */
|
|
46
54
|
export function validatemode(axis, value) { return Boolean(modeaxes[axis]?.includes(value)); }
|
|
55
|
+
|
|
47
56
|
/** Returns a serializable snapshot for documentation and diagnostics. */
|
|
48
57
|
export function modecatalog() { return { axes: Object.fromEntries(Object.entries(modeaxes).map(([key, values]) => [key, [...values]])), operationmodes: [...operationmodes] }; }
|
|
58
|
+
|
|
49
59
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
50
60
|
/* Section 3: modes/resolve.ts — mode resolver selects open defaults while preserving every caller choice. */
|
|
51
61
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
52
62
|
/**
|
|
53
63
|
* mode resolver selects open defaults while preserving every caller choice.
|
|
54
64
|
*/
|
|
65
|
+
|
|
55
66
|
/** Resolves an execution profile without starting a process or opening a socket. */
|
|
56
67
|
export function resolvemode(options = {}) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
throw new TypeError(`unsupported mode ${axis}:${value}`);
|
|
69
|
-
return { ...profile, capabilities: modecapabilities(profile) };
|
|
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) };
|
|
70
79
|
}
|
|
80
|
+
|
|
71
81
|
/** Returns stable capabilities for adapters and diagnostics. */
|
|
72
82
|
export function modecapabilities(profile) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
+
};
|
|
84
94
|
}
|
|
95
|
+
|
|
85
96
|
/** Returns a stable cross-runtime capability report without starting infrastructure. */
|
|
86
97
|
export function capabilityreport(options = {}) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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" } };
|
|
93
104
|
}
|
|
105
|
+
|
|
94
106
|
/** Applies one profile to a caller supplied operation. */
|
|
95
|
-
export async function withmode(options, operation) { if (typeof operation !== "function")
|
|
96
|
-
|
|
107
|
+
export async function withmode(options, operation) { if (typeof operation !== "function") throw new TypeError("mode operation is required"); return operation(resolvemode(options)); }
|
|
108
|
+
|
|
109
|
+
|
|
97
110
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
98
111
|
/* Section 4: modes/deploy.ts — deploy surface exposes artifact planning without performing provider mutations. */
|
|
99
112
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
100
113
|
/**
|
|
101
114
|
* deploy surface exposes artifact planning without performing provider mutations.
|
|
102
115
|
*/
|
|
103
|
-
export { publishplan, registrymanifest } from "./distribution.
|
|
104
|
-
|
|
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
|
+
|
|
105
122
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
106
123
|
/* Section 5: modes/targets.ts — target profiles keep platform packaging open and describe capability boundaries. */
|
|
107
124
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
@@ -109,26 +126,26 @@ export { surfacemanifest, surfacebundle } from "./automation.js";
|
|
|
109
126
|
* target profiles keep platform packaging open and describe capability boundaries.
|
|
110
127
|
*/
|
|
111
128
|
export const targetprofiles = Object.freeze({
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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"] }
|
|
128
145
|
});
|
|
146
|
+
|
|
129
147
|
/** Creates a surface target with caller supplied entry and capabilities. */
|
|
130
|
-
export function targetmanifest(target, options = {}) { const profile = targetprofiles[target]; if (!profile)
|
|
131
|
-
|
|
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
|
+
|
|
132
150
|
/** Returns all supported target profiles for documentation and tooling. */
|
|
133
151
|
export function targetcatalog() { return Object.fromEntries(Object.entries(targetprofiles).map(([key, value]) => [key, { ...value, capabilities: [...value.capabilities] }])); }
|
|
134
|
-
//# sourceMappingURL=modes.js.map
|
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.
|
|
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) */
|
|
@@ -91,7 +91,10 @@ const runtimecatalog = {
|
|
|
91
91
|
|
|
92
92
|
/** toolchain stack reported by dumpstate and the version probe. */
|
|
93
93
|
const stackcatalog = {
|
|
94
|
-
|
|
94
|
+
/* walks with the .nvmrc pin the maintenance rung stamps — the 2.0.133
|
|
95
|
+
publish regression answered the engine advertising a node the repository
|
|
96
|
+
retired, so the anchor rides the pin lane now (never ahead of it) */
|
|
97
|
+
nodecurrent: '26.13.0',
|
|
95
98
|
nodelts: '24.19.0',
|
|
96
99
|
typescript: '7.0.2',
|
|
97
100
|
qemu: runtimecatalog.qemu,
|
|
@@ -1276,8 +1279,12 @@ class firecrackerruntime extends runtimestrategy {
|
|
|
1276
1279
|
* the class also absorbs spawnqemu from the Meta source: the vm plane
|
|
1277
1280
|
* launches qemu with monitor and qmp unix sockets, a numa pin line,
|
|
1278
1281
|
* vfio devices for every gpu assignment, extra args from qemu.config
|
|
1279
|
-
* and
|
|
1280
|
-
*
|
|
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.
|
|
1281
1288
|
*/
|
|
1282
1289
|
class qemuruntime extends runtimestrategy {
|
|
1283
1290
|
override readonly name: sandboxruntime = 'qemu';
|
|
@@ -1343,13 +1350,24 @@ class qemuruntime extends runtimestrategy {
|
|
|
1343
1350
|
|
|
1344
1351
|
/**
|
|
1345
1352
|
* builds the vm plane argv: strategy flags plus the name/uuid, dual
|
|
1346
|
-
* unix sockets, virtio balloon, the
|
|
1347
|
-
*
|
|
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.
|
|
1348
1361
|
*/
|
|
1349
1362
|
buildvmcommand(vm: vmrecord, assignments: readonly gpuassignment[]): readonly string[] {
|
|
1350
1363
|
const kvm = kvmavailable();
|
|
1351
1364
|
const accel = vm.accel === 'kvm' && kvm ? 'kvm' : 'tcg,thread=multi,tb-size=1024';
|
|
1352
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';
|
|
1353
1371
|
const args: string[] = [
|
|
1354
1372
|
vm.qemubinary,
|
|
1355
1373
|
'-machine',
|
|
@@ -1369,7 +1387,7 @@ class qemuruntime extends runtimestrategy {
|
|
|
1369
1387
|
'-device',
|
|
1370
1388
|
'virtio-balloon-pci,id=balloon0',
|
|
1371
1389
|
'-netdev',
|
|
1372
|
-
|
|
1390
|
+
netdev,
|
|
1373
1391
|
'-device',
|
|
1374
1392
|
'virtio-net-pci,netdev=net0',
|
|
1375
1393
|
'-display',
|
|
@@ -1391,8 +1409,12 @@ class qemuruntime extends runtimestrategy {
|
|
|
1391
1409
|
|
|
1392
1410
|
/**
|
|
1393
1411
|
* spawns qemu for a vm record; when the binary does not exist the
|
|
1394
|
-
* method
|
|
1395
|
-
*
|
|
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).
|
|
1396
1418
|
*/
|
|
1397
1419
|
async spawn(
|
|
1398
1420
|
vm: vmrecord,
|
|
@@ -1401,14 +1423,23 @@ class qemuruntime extends runtimestrategy {
|
|
|
1401
1423
|
): Promise<qemuprocess> {
|
|
1402
1424
|
try {
|
|
1403
1425
|
const sockets = this.socketsfor(vm.id);
|
|
1404
|
-
|
|
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);
|
|
1405
1435
|
const [bin, ...rest] = argv;
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
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
|
+
);
|
|
1411
1441
|
}
|
|
1442
|
+
const child: ChildProcess = spawn(bin, rest, { stdio: 'ignore', detached: false });
|
|
1412
1443
|
const pid = child.pid ?? randomInt(1000, 11000);
|
|
1413
1444
|
const processinfo: qemuprocess = {
|
|
1414
1445
|
vmid: vm.id,
|
|
@@ -1423,6 +1454,12 @@ class qemuruntime extends runtimestrategy {
|
|
|
1423
1454
|
});
|
|
1424
1455
|
return processinfo;
|
|
1425
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
|
+
}
|
|
1426
1463
|
throw new orchestratorerror(
|
|
1427
1464
|
`qemu spawn failed for ${vm.id}: ${errormessage(error)}`,
|
|
1428
1465
|
'ERR_QEMU_SPAWN',
|
|
@@ -4389,7 +4426,7 @@ class orchestrator {
|
|
|
4389
4426
|
/**
|
|
4390
4427
|
* default contents of the flat config files written by start(); the
|
|
4391
4428
|
* version strings carry the v2 anchors (qemu 11.1.0, docker 29.7.2,
|
|
4392
|
-
* node 26.
|
|
4429
|
+
* node 26.12.0), replacing the stale Meta banners.
|
|
4393
4430
|
*/
|
|
4394
4431
|
#defaultconfigcontents(): Record<configfilename, string> {
|
|
4395
4432
|
return {
|