@wenathlan/saddle 2.0.154 → 2.0.155

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.
Files changed (307) hide show
  1. package/Dockerfile +112 -41
  2. package/README.md +58 -59
  3. package/browser.ts +482 -0
  4. package/cli.ts +274 -0
  5. package/distribution.ts +731 -0
  6. package/docker.config +29 -8
  7. package/docs/artifactavailability.md +2 -2
  8. package/docs/browser.md +18 -1
  9. package/docs/{containerplatforms.2.1.0.md → containerplatforms210.md} +1 -1
  10. package/docs/{documentmap.1.8.12.md → documentmap1812.md} +1 -1
  11. package/docs/extension.md +13 -2
  12. package/docs/libraryapi.md +1 -1
  13. package/docs/{ninety.modalities.md → ninetymodalities.md} +87 -4
  14. package/docs/{planning.ninety.md → planningninety.md} +6 -6
  15. package/docs/{releasenotes.1.8.13.md → releasenotes1813.md} +2 -2
  16. package/docs/{releasenotes.1.8.14.md → releasenotes1814.md} +1 -1
  17. package/docs/{repo.synthesis.1.8.16.md → reposynthesis1816.md} +1 -1
  18. package/docs/todo.md +2 -2
  19. package/docs/{todo.1.8.15.md → todo1815.md} +1 -1
  20. package/docs/{todo.1.8.16.md → todo1816.md} +5 -5
  21. package/execution.ts +677 -0
  22. package/foundation.ts +314 -0
  23. package/index.ts +35 -27
  24. package/isolation.ts +84 -0
  25. package/modes.ts +170 -0
  26. package/mttg.config +1 -1
  27. package/orchestrator.ts +49 -15
  28. package/package.json +90 -75
  29. package/qemu.config +2 -2
  30. package/sandbox.ts +2094 -0
  31. package/scheduler.ts +1 -1
  32. package/server.ts +52 -0
  33. package/tsconfig.json +11 -12
  34. package/virtual.ts +1105 -0
  35. package/virtualgpu.ts +1 -1
  36. package/virtualization.ts +1 -1
  37. package/workloadlaw.ts +293 -0
  38. package/dist/App.d.ts +0 -5
  39. package/dist/App.js +0 -52
  40. package/dist/Sol/Sol.d.ts +0 -3
  41. package/dist/Sol/Sol.js +0 -46
  42. package/dist/Sol/agentbrowser/agentbrowser.d.ts +0 -9
  43. package/dist/Sol/agentbrowser/agentbrowser.js +0 -121
  44. package/dist/Sol/architecture/architecture.d.ts +0 -9
  45. package/dist/Sol/architecture/architecture.js +0 -93
  46. package/dist/Sol/compute/compute.d.ts +0 -9
  47. package/dist/Sol/compute/compute.js +0 -22
  48. package/dist/Sol/console/console.d.ts +0 -15
  49. package/dist/Sol/console/console.js +0 -292
  50. package/dist/Sol/dashboard/dashboard.d.ts +0 -10
  51. package/dist/Sol/dashboard/dashboard.js +0 -181
  52. package/dist/Sol/docs/docs.d.ts +0 -9
  53. package/dist/Sol/docs/docs.js +0 -28
  54. package/dist/Sol/home/home.d.ts +0 -35
  55. package/dist/Sol/home/home.js +0 -239
  56. package/dist/Sol/integrations/integrations.d.ts +0 -9
  57. package/dist/Sol/integrations/integrations.js +0 -83
  58. package/dist/Sol/intro/intro.d.ts +0 -7
  59. package/dist/Sol/intro/intro.js +0 -102
  60. package/dist/Sol/login/login.d.ts +0 -16
  61. package/dist/Sol/login/login.js +0 -49
  62. package/dist/Sol/notfound/notfound.d.ts +0 -9
  63. package/dist/Sol/notfound/notfound.js +0 -15
  64. package/dist/Sol/onboarding/onboarding.d.ts +0 -25
  65. package/dist/Sol/onboarding/onboarding.js +0 -60
  66. package/dist/Sol/playground/playground.d.ts +0 -9
  67. package/dist/Sol/playground/playground.js +0 -127
  68. package/dist/Sol/register/register.d.ts +0 -16
  69. package/dist/Sol/register/register.js +0 -193
  70. package/dist/Sol/shell/Shell.d.ts +0 -124
  71. package/dist/Sol/shell/Shell.js +0 -335
  72. package/dist/Sol/wingets/ComputeBootladder.d.ts +0 -6
  73. package/dist/Sol/wingets/ComputeBootladder.js +0 -71
  74. package/dist/Sol/wingets/ComputeModalitycatalog.d.ts +0 -7
  75. package/dist/Sol/wingets/ComputeModalitycatalog.js +0 -71
  76. package/dist/Sol/wingets/ConsoleApibadge.d.ts +0 -7
  77. package/dist/Sol/wingets/ConsoleApibadge.js +0 -5
  78. package/dist/Sol/wingets/ConsoleEdgelaw.d.ts +0 -6
  79. package/dist/Sol/wingets/ConsoleEdgelaw.js +0 -36
  80. package/dist/Sol/wingets/ConsoleEventstimeline.d.ts +0 -19
  81. package/dist/Sol/wingets/ConsoleEventstimeline.js +0 -12
  82. package/dist/Sol/wingets/ConsoleSnapshotcontrols.d.ts +0 -8
  83. package/dist/Sol/wingets/ConsoleSnapshotcontrols.js +0 -8
  84. package/dist/Sol/wingets/ConsoleSpecpanel.d.ts +0 -21
  85. package/dist/Sol/wingets/ConsoleSpecpanel.js +0 -75
  86. package/dist/Sol/wingets/ConsoleTerminal.d.ts +0 -22
  87. package/dist/Sol/wingets/ConsoleTerminal.js +0 -77
  88. package/dist/Sol/wingets/DashboardAccountpanel.d.ts +0 -18
  89. package/dist/Sol/wingets/DashboardAccountpanel.js +0 -65
  90. package/dist/Sol/wingets/DashboardAdminpanel.d.ts +0 -6
  91. package/dist/Sol/wingets/DashboardAdminpanel.js +0 -90
  92. package/dist/Sol/wingets/DashboardAuditlog.d.ts +0 -8
  93. package/dist/Sol/wingets/DashboardAuditlog.js +0 -50
  94. package/dist/Sol/wingets/DashboardCreatesandboxform.d.ts +0 -10
  95. package/dist/Sol/wingets/DashboardCreatesandboxform.js +0 -71
  96. package/dist/Sol/wingets/DashboardEventstimeline.d.ts +0 -8
  97. package/dist/Sol/wingets/DashboardEventstimeline.js +0 -83
  98. package/dist/Sol/wingets/DashboardGlobalsandboxestable.d.ts +0 -8
  99. package/dist/Sol/wingets/DashboardGlobalsandboxestable.js +0 -57
  100. package/dist/Sol/wingets/DashboardMeshnodestable.d.ts +0 -8
  101. package/dist/Sol/wingets/DashboardMeshnodestable.js +0 -103
  102. package/dist/Sol/wingets/DashboardSandboxlist.d.ts +0 -10
  103. package/dist/Sol/wingets/DashboardSandboxlist.js +0 -163
  104. package/dist/Sol/wingets/DashboardUserstable.d.ts +0 -8
  105. package/dist/Sol/wingets/DashboardUserstable.js +0 -78
  106. package/dist/Sol/wingets/HomeEntrygate.d.ts +0 -23
  107. package/dist/Sol/wingets/HomeEntrygate.js +0 -73
  108. package/dist/Sol/wingets/HomeMetricstrip.d.ts +0 -9
  109. package/dist/Sol/wingets/HomeMetricstrip.js +0 -4
  110. package/dist/Sol/wingets/HomeRuntimediagram.d.ts +0 -1
  111. package/dist/Sol/wingets/HomeRuntimediagram.js +0 -22
  112. package/dist/Sol/wingets/LoginForm.d.ts +0 -19
  113. package/dist/Sol/wingets/LoginForm.js +0 -141
  114. package/dist/Sol/wingets/RegisterPasswordconfirm.d.ts +0 -13
  115. package/dist/Sol/wingets/RegisterPasswordconfirm.js +0 -16
  116. package/dist/Sol/wingets/RegisterPasswordmeter.d.ts +0 -19
  117. package/dist/Sol/wingets/RegisterPasswordmeter.js +0 -65
  118. package/dist/Sol/wingets/RegisterUsernamerules.d.ts +0 -11
  119. package/dist/Sol/wingets/RegisterUsernamerules.js +0 -16
  120. package/dist/Sol/wingets/index.d.ts +0 -39
  121. package/dist/Sol/wingets/index.js +0 -39
  122. package/dist/alternatives.d.ts +0 -508
  123. package/dist/alternatives.js +0 -950
  124. package/dist/api.d.ts +0 -154
  125. package/dist/api.js +0 -174
  126. package/dist/auth.d.ts +0 -268
  127. package/dist/auth.js +0 -476
  128. package/dist/automation.d.ts +0 -425
  129. package/dist/automation.js +0 -566
  130. package/dist/browser.d.ts +0 -561
  131. package/dist/browser.js +0 -1058
  132. package/dist/capacitor.config.d.ts +0 -45
  133. package/dist/capacitor.config.js +0 -48
  134. package/dist/catalog.d.ts +0 -43
  135. package/dist/catalog.js +0 -44
  136. package/dist/cli.d.ts +0 -16
  137. package/dist/cli.js +0 -168
  138. package/dist/communication.d.ts +0 -181
  139. package/dist/communication.js +0 -376
  140. package/dist/compute.d.ts +0 -1160
  141. package/dist/compute.js +0 -2272
  142. package/dist/dashboardlib.d.ts +0 -58
  143. package/dist/dashboardlib.js +0 -161
  144. package/dist/db.d.ts +0 -569
  145. package/dist/db.js +0 -1080
  146. package/dist/distribution.d.ts +0 -528
  147. package/dist/distribution.js +0 -810
  148. package/dist/drizzle.config.d.ts +0 -20
  149. package/dist/drizzle.config.js +0 -18
  150. package/dist/edgelandes.d.ts +0 -70
  151. package/dist/edgelandes.host.d.ts +0 -26
  152. package/dist/edgelandes.host.js +0 -1089
  153. package/dist/edgelandes.inproc.d.ts +0 -27
  154. package/dist/edgelandes.inproc.js +0 -952
  155. package/dist/edgelandes.js +0 -1133
  156. package/dist/edgelandes.ninety.d.ts +0 -31
  157. package/dist/edgelandes.ninety.js +0 -174
  158. package/dist/edgelandes.virtual.d.ts +0 -25
  159. package/dist/edgelandes.virtual.js +0 -629
  160. package/dist/edgeplane.d.ts +0 -121
  161. package/dist/edgeplane.js +0 -341
  162. package/dist/examplelocaljob.d.ts +0 -1
  163. package/dist/examplelocaljob.js +0 -14
  164. package/dist/execution.d.ts +0 -529
  165. package/dist/execution.js +0 -760
  166. package/dist/family.d.ts +0 -16
  167. package/dist/family.js +0 -42
  168. package/dist/familyurl.d.ts +0 -21
  169. package/dist/familyurl.js +0 -24
  170. package/dist/format.d.ts +0 -18
  171. package/dist/format.js +0 -59
  172. package/dist/foundation.d.ts +0 -172
  173. package/dist/foundation.js +0 -312
  174. package/dist/index.d.ts +0 -735
  175. package/dist/index.js +0 -1020
  176. package/dist/integration.d.ts +0 -235
  177. package/dist/integration.js +0 -228
  178. package/dist/intelligence.d.ts +0 -93
  179. package/dist/intelligence.js +0 -144
  180. package/dist/isolation.d.ts +0 -128
  181. package/dist/isolation.js +0 -95
  182. package/dist/labels.d.ts +0 -665
  183. package/dist/labels.js +0 -707
  184. package/dist/localauth.d.ts +0 -127
  185. package/dist/localauth.js +0 -413
  186. package/dist/media.d.ts +0 -343
  187. package/dist/media.js +0 -985
  188. package/dist/mesh.d.ts +0 -177
  189. package/dist/mesh.js +0 -468
  190. package/dist/modalityregistry.d.ts +0 -109
  191. package/dist/modalityregistry.js +0 -1386
  192. package/dist/modes.d.ts +0 -358
  193. package/dist/modes.js +0 -133
  194. package/dist/onboardingstate.d.ts +0 -79
  195. package/dist/onboardingstate.js +0 -282
  196. package/dist/orchestrator.d.ts +0 -1338
  197. package/dist/orchestrator.js +0 -4310
  198. package/dist/packager/targetcli.js +0 -4
  199. package/dist/paths.d.ts +0 -2
  200. package/dist/paths.js +0 -14
  201. package/dist/performance.d.ts +0 -415
  202. package/dist/performance.js +0 -826
  203. package/dist/quantum.d.ts +0 -809
  204. package/dist/quantum.js +0 -2072
  205. package/dist/render.d.ts +0 -380
  206. package/dist/render.js +0 -1072
  207. package/dist/runall.d.ts +0 -2
  208. package/dist/runall.js +0 -39
  209. package/dist/runtimeprobe.d.ts +0 -4
  210. package/dist/runtimeprobe.js +0 -8
  211. package/dist/sandbox.d.ts +0 -355
  212. package/dist/sandbox.js +0 -1721
  213. package/dist/sandboxenvprofile.d.ts +0 -29
  214. package/dist/sandboxenvprofile.js +0 -89
  215. package/dist/sandboxprofile.d.ts +0 -137
  216. package/dist/sandboxprofile.js +0 -241
  217. package/dist/sandboxqueue.d.ts +0 -108
  218. package/dist/sandboxqueue.js +0 -201
  219. package/dist/sandboxquota.d.ts +0 -121
  220. package/dist/sandboxquota.js +0 -236
  221. package/dist/scheduler.d.ts +0 -595
  222. package/dist/scheduler.js +0 -1258
  223. package/dist/scriptlanes.d.ts +0 -182
  224. package/dist/scriptlanes.js +0 -660
  225. package/dist/scripts.buildengine.d.ts +0 -1
  226. package/dist/scripts.buildengine.js +0 -39
  227. package/dist/scripts.securitygate.d.ts +0 -1
  228. package/dist/scripts.securitygate.js +0 -68
  229. package/dist/scripts.validateflatnative.d.ts +0 -1
  230. package/dist/scripts.validateflatnative.js +0 -72
  231. package/dist/security.d.ts +0 -500
  232. package/dist/security.js +0 -1169
  233. package/dist/seedcatalog.d.ts +0 -13
  234. package/dist/seedcatalog.js +0 -46
  235. package/dist/server.d.ts +0 -20
  236. package/dist/server.js +0 -53
  237. package/dist/speccatalog.d.ts +0 -31
  238. package/dist/speccatalog.js +0 -163
  239. package/dist/tiers.d.ts +0 -1001
  240. package/dist/tiers.js +0 -2169
  241. package/dist/utils.d.ts +0 -2
  242. package/dist/utils.js +0 -5
  243. package/dist/vaulthandoff.d.ts +0 -141
  244. package/dist/vaulthandoff.js +0 -444
  245. package/dist/virtual.d.ts +0 -640
  246. package/dist/virtual.js +0 -1284
  247. package/dist/virtualcpu.d.ts +0 -315
  248. package/dist/virtualcpu.js +0 -1180
  249. package/dist/virtualgpu.d.ts +0 -344
  250. package/dist/virtualgpu.js +0 -1000
  251. package/dist/virtualization.d.ts +0 -606
  252. package/dist/virtualization.js +0 -1186
  253. package/dist/virtualmemory.d.ts +0 -817
  254. package/dist/virtualmemory.js +0 -1795
  255. package/dist/vite.config.d.ts +0 -3
  256. package/dist/vite.config.js +0 -48
  257. package/dist/vitest.config.d.ts +0 -2
  258. package/dist/vitest.config.js +0 -25
  259. package/dist/webserver.d.ts +0 -166
  260. package/dist/webserver.js +0 -2226
  261. package/dist/workloadlaw.d.ts +0 -133
  262. package/dist/workloadlaw.js +0 -193
  263. package/manifest.json +0 -20
  264. package/media.ts +0 -1337
  265. /package/docs/{architecture.1.8.19.md → architecture1819.md} +0 -0
  266. /package/docs/{architecture.1.8.19.mmd → architecture1819.mmd} +0 -0
  267. /package/docs/{artifactresearch.1.8.9.md → artifactresearch189.md} +0 -0
  268. /package/docs/{batches.1816.to.1820.md → batches1816to1820.md} +0 -0
  269. /package/docs/{brancharchive.2026.08.18.md → brancharchive20260818.md} +0 -0
  270. /package/docs/{containerplatforms.1.8.17.md → containerplatforms1817.md} +0 -0
  271. /package/docs/{e2ugh.engine.md → e2ughengine.md} +0 -0
  272. /package/docs/{flatbuildresearch.1.8.11.md → flatbuildresearch1811.md} +0 -0
  273. /package/docs/{licenseaudit.1.8.12.md → licenseaudit1812.md} +0 -0
  274. /package/docs/{mobileconversionresearch.1.8.10.md → mobileconversionresearch1810.md} +0 -0
  275. /package/docs/{nativeidentityresearch.1.8.11.md → nativeidentityresearch1811.md} +0 -0
  276. /package/docs/{native.wrappers.md → nativewrappers.md} +0 -0
  277. /package/docs/{planning.1.8.18.md → planning1818.md} +0 -0
  278. /package/docs/{planning.1.8.19.md → planning1819.md} +0 -0
  279. /package/docs/{planning.engine.md → planningengine.md} +0 -0
  280. /package/docs/{releasenotes.1.8.12.md → releasenotes1812.md} +0 -0
  281. /package/docs/{releasenotes.1.8.15.md → releasenotes1815.md} +0 -0
  282. /package/docs/{releasenotes.1.8.16.md → releasenotes1816.md} +0 -0
  283. /package/docs/{releasenotes.1.8.17.md → releasenotes1817.md} +0 -0
  284. /package/docs/{releasenotes.1.8.18.md → releasenotes1818.md} +0 -0
  285. /package/docs/{releasenotes.1.8.19.md → releasenotes1819.md} +0 -0
  286. /package/docs/{reorganization.1.8.8.md → reorganization188.md} +0 -0
  287. /package/docs/{reorganization.1.8.9.md → reorganization189.md} +0 -0
  288. /package/docs/{repo.analysis.1.8.21.json → repoanalysis1821.json} +0 -0
  289. /package/docs/{repo.candidates.1.8.21.jsonl → repocandidates1821.jsonl} +0 -0
  290. /package/docs/{repo.research.1.8.16.md → reporesearch1816.md} +0 -0
  291. /package/docs/{repo.research.1.8.21.md → reporesearch1821.md} +0 -0
  292. /package/docs/{repo.selected.1.8.21.json → reposelected1821.json} +0 -0
  293. /package/docs/{repo.synthesis.1.8.21.md → reposynthesis1821.md} +0 -0
  294. /package/docs/{research.1.8.18.isolation.md → research1818isolation.md} +0 -0
  295. /package/docs/{research.1.8.19.virtual.browser.md → research1819virtualbrowser.md} +0 -0
  296. /package/docs/{scanningresearch.1.8.11.md → scanningresearch1811.md} +0 -0
  297. /package/docs/{securityaudit.1.8.7.md → securityaudit187.md} +0 -0
  298. /package/docs/{securityreferences.1.8.11.md → securityreferences1811.md} +0 -0
  299. /package/docs/{securityresearch.1.8.11.md → securityresearch1811.md} +0 -0
  300. /package/docs/{signingresearch.1.8.12.md → signingresearch1812.md} +0 -0
  301. /package/docs/{tauri.glib.risk.1.8.11.md → tauriglibrisk1811.md} +0 -0
  302. /package/docs/{todo.1.8.18.md → todo1818.md} +0 -0
  303. /package/docs/{todo.1.8.19.md → todo1819.md} +0 -0
  304. /package/docs/{toolchainresearch.1.8.9.md → toolchainresearch189.md} +0 -0
  305. /package/docs/{web.duplicatecleanup.md → webduplicatecleanup.md} +0 -0
  306. /package/docs/{web.ideas.md → webideas.md} +0 -0
  307. /package/docs/{workflowimprovements.2026.08.19.md → workflowimprovements20260819.md} +0 -0
@@ -1,39 +0,0 @@
1
- /**
2
- * Cleans and builds the root TypeScript engine into ignored dist output.
3
- */
4
- import { rm, mkdir, writeFile } from "node:fs/promises";
5
- import { execFileSync } from "node:child_process";
6
- import { existsSync } from "node:fs";
7
- import { createRequire } from "node:module";
8
- await rm("dist", { recursive: true, force: true });
9
- /* the compiler rides node directly: windows refuses spawning a bare
10
- * tsc.cmd shell (spawnSync EINVAL on the .cmd shim) and the house law keeps
11
- * the toolchain in the global node modules, so the tsc entry is resolved
12
- * through require paths instead of a shell command */
13
- function compilerentry() {
14
- const require = createRequire(import.meta.url);
15
- for (const base of ["typescript/bin/tsc", "../typescript/bin/tsc", "../../../typescript/bin/tsc"]) {
16
- try {
17
- const entry = require.resolve(base);
18
- if (existsSync(entry))
19
- return entry;
20
- }
21
- catch {
22
- /* not here: walk the next candidate */
23
- }
24
- }
25
- return "tsc";
26
- }
27
- const entry = compilerentry();
28
- const args = entry.endsWith(".js") ? [entry, "--project", "tsconfig.json"] : ["--project", "tsconfig.json"];
29
- execFileSync(entry.endsWith(".js") ? process.execPath : entry, args, {
30
- stdio: "inherit",
31
- env: { ...process.env, NODE_PATH: [process.env.NODE_PATH, "C:/Users/nathalan/node_modules"].filter(Boolean).join(";") },
32
- });
33
- // the target manifest CLI: the grand merge folded packager/targetcli.ts
34
- // into distribution.ts (Section 7) whose CLI main only activates when
35
- // argv[1] ends with targetcli.js - the historical entry point that the
36
- // targets workflow invokes. The build regenerates the thin wrapper so
37
- // the contract dist/packager/targetcli.js keeps working (nothing lost).
38
- await mkdir("dist/packager", { recursive: true });
39
- await writeFile("dist/packager/targetcli.js", '// generated by scripts.buildengine.ts - the thin CLI wrapper that\n// activates the target manifest CLI absorbed into distribution.ts\n// (Section 7); its CLI main runs when argv[1] ends with targetcli.js.\nimport "../distribution.js";\n');
@@ -1 +0,0 @@
1
- export {};
@@ -1,68 +0,0 @@
1
- import { mkdir, readFile, writeFile } from "node:fs/promises";
2
- const reportPath = process.argv[2];
3
- const summaryPath = process.env.SECURITY_SUMMARY_PATH ?? "build/security/cargo-audit-summary.md";
4
- const acceptedAdvisory = "RUSTSEC-2024-0429";
5
- if (!reportPath) {
6
- throw new TypeError("cargo audit report path is required");
7
- }
8
- /** Returns the advisory identifiers attached to one cargo audit finding. */
9
- function advisoryids(finding) {
10
- const advisory = finding?.advisory ?? {};
11
- return [advisory.id, finding?.id, ...(advisory.aliases ?? [])]
12
- .filter(Boolean)
13
- .map(String);
14
- }
15
- /** Returns a stable package label for a cargo audit finding. */
16
- function packagelabel(finding) {
17
- const packageinfo = finding?.package ?? {};
18
- return `${packageinfo.name ?? "unknown"}@${packageinfo.version ?? "unknown"}`;
19
- }
20
- const raw = await readFile(reportPath, "utf8");
21
- let report;
22
- try {
23
- report = JSON.parse(raw);
24
- }
25
- catch (error) {
26
- throw new Error(`cargo audit produced invalid JSON: ${error.message}`);
27
- }
28
- const findings = Array.isArray(report?.vulnerabilities?.list)
29
- ? report.vulnerabilities.list
30
- : [];
31
- const accepted = findings.filter((finding) => advisoryids(finding).includes(acceptedAdvisory) &&
32
- packagelabel(finding).startsWith("glib@"));
33
- const unexpected = findings.filter((finding) => !accepted.includes(finding));
34
- const warnings = Object.values(report?.warnings ?? {}).flatMap((value) => Array.isArray(value) ? value : []);
35
- const status = unexpected.length > 0
36
- ? "fail"
37
- : accepted.length > 0
38
- ? "accepted-risk"
39
- : "pass";
40
- const lines = [
41
- "# Cargo audit security gate",
42
- "",
43
- `Status: **${status}**`,
44
- `Findings: ${findings.length}`,
45
- `Accepted transitive glib findings: ${accepted.length}`,
46
- `Unexpected findings: ${unexpected.length}`,
47
- `Warnings: ${warnings.length}`,
48
- "",
49
- "## Findings",
50
- "",
51
- ];
52
- if (findings.length === 0)
53
- lines.push("No RustSec vulnerability findings were returned.", "");
54
- for (const finding of findings) {
55
- const ids = advisoryids(finding).join(", ") || "unknown-advisory";
56
- const classification = accepted.includes(finding)
57
- ? "accepted transitive glib risk"
58
- : "release blocking";
59
- lines.push(`- ${classification}: ${ids} (${packagelabel(finding)})`);
60
- }
61
- lines.push("", "The accepted glib entry is limited to the Tauri GTK3 transitive dependency documented in `docs/tauri-glib-risk-1.8.11.md`; any other advisory fails this gate.", "");
62
- await mkdir(new URL(".", `file://${process.cwd()}/${summaryPath}`).pathname, {
63
- recursive: true,
64
- }).catch(() => { });
65
- await writeFile(summaryPath, `${lines.join("\n")}\n`);
66
- console.log(lines.join("\n"));
67
- if (unexpected.length > 0)
68
- process.exitCode = 1;
@@ -1 +0,0 @@
1
- export {};
@@ -1,72 +0,0 @@
1
- import { access } from "node:fs/promises";
2
- import { fileURLToPath } from "node:url";
3
- import { join } from "node:path";
4
- /** Returns whether a path exists without turning a missing generated path into a failure. */
5
- async function exists(path) {
6
- try {
7
- await access(path);
8
- return true;
9
- }
10
- catch {
11
- return false;
12
- }
13
- }
14
- /**
15
- * Verifies the 2.1.0 tree contract: the native wrappers (android, ios,
16
- * desktop, extension) are generated on the runners into build/native/*
17
- * and never tracked, the interface is one flat tsx tree (page folders +
18
- * loose modules, no nested support folders, no legacy window-global
19
- * localauth.ts), and the static e2ugh console pages stay absorbed in the
20
- * tsx pages. the tree never goes back to tracked wrappers.
21
- */
22
- async function validateFlatNative() {
23
- const repositoryRoot = fileURLToPath(new URL(".", import.meta.url));
24
- const webRoot = join(repositoryRoot, "web");
25
- const forbiddenDirectories = [
26
- "android",
27
- "ios",
28
- "desktop",
29
- "extension",
30
- "pages",
31
- "components",
32
- "hooks",
33
- "lib",
34
- "contexts",
35
- ];
36
- const forbiddenFiles = [
37
- "const.ts",
38
- "localauth.js",
39
- "login.html",
40
- "register.html",
41
- "console.html",
42
- "dashboard.html",
43
- "login.js",
44
- "register.js",
45
- "console.js",
46
- "dashboard.js",
47
- ];
48
- for (const directory of forbiddenDirectories) {
49
- const path = join(webRoot, directory);
50
- if (await exists(path)) {
51
- throw new Error(`Forbidden native wrapper directory exists: ${path}`);
52
- }
53
- }
54
- for (const file of forbiddenFiles) {
55
- const path = join(webRoot, file);
56
- if (await exists(path)) {
57
- throw new Error(`Forbidden flat-interface file exists: ${path}`);
58
- }
59
- }
60
- const canonicalTodo = join(repositoryRoot, "docs", "todo.md");
61
- if (!(await exists(canonicalTodo))) {
62
- throw new Error(`Canonical operational checklist is missing: ${canonicalTodo}`);
63
- }
64
- }
65
- try {
66
- await validateFlatNative();
67
- console.log("Flat native surface validation passed.");
68
- }
69
- catch (error) {
70
- console.error("Flat native surface validation failed.", error);
71
- process.exitCode = 1;
72
- }
@@ -1,500 +0,0 @@
1
- /**
2
- * security.ts — layered sandbox security for the virtual hardware engine.
3
- *
4
- * the module models the 2026 defense stack verified on 2026-08-22:
5
- * - landlock abi v10 on the kernel mainline (docs.kernel.org): v1 5.13
6
- * filesystem rights, v2 5.19 refer, v3 6.2 truncate, v4 6.7 tcp
7
- * bind/connect, v5 6.10 ioctl_dev, v6 6.12 scopes (abstract unix
8
- * socket + signal), v7 6.15 audit, v8 restrict_self tsync, v9
9
- * resolve_unix, v10 udp bind/connect + send (merged around 6.20/6.21);
10
- * unprivileged, no root needed, layers on top of seccomp
11
- * - seccomp: deny-by-default bpf filters; SECCOMP_RET_TRAP (SIGSYS) is
12
- * the base of the gvisor systrap platform; io_uring stays blocked in
13
- * every sandbox profile (docker default profile blocks it since
14
- * moby#47532 and gvisor disables it; CVE-2026-46315 disclosed an
15
- * information leak through io_uring in june 2026)
16
- * - ebpf lsm: hooks since kernel 5.7 execute at the kernel decision
17
- * point, which grants toctou immunity compared with tracepoints and
18
- * syscall tracing; hornet lsm v6 (april 2026) verifies eBPF program
19
- * signatures in-kernel
20
- * - cgroups v2: unified hierarchy on every modern distro; cpu, memory,
21
- * io and pids controllers; subtree delegation enables rootless
22
- * operation (podman, docker rootless) and sustains the orchestrator
23
- * memory/shm limits
24
- * - post-quantum: ML-KEM (FIPS 203) and ML-DSA (FIPS 204) native in
25
- * OpenSSL 3.5; X25519MLKEM768 hybrid is the default TLS 1.3 group and
26
- * node 24+ bundles OpenSSL 3.5.5, so the engine inherits PQ/TLS
27
- * without extra code; RFC 10024 (2026-08-10) standardizes the PQ/T
28
- * hybrid mechanisms; ChaCha20-Poly1305 (RFC 8439) remains the AEAD
29
- * fallback for hosts without AES-NI
30
- * - criu v4.2.1: checkpoint/restore with selinux relabel support so
31
- * restored processes keep their labels
32
- *
33
- * contexts (23): landlockabitable, landlockaccess, landlockscopes,
34
- * landlockrulebuilder, landlockapplier, hostprobe, seccompactions,
35
- * syscallnumbers, defaultallowed, seccompbuilder, defaultseccomp,
36
- * ebpflsmfacts, ebpfattachplan, cgroupv2layout, cgroupbuilder, pqstack
37
- * (pqcatalog, pqkeyfactory, pqsecurecontext, rfc10024, pqcaudit — the
38
- * v3-B1 append), chachapoly, sandboxprofile, profilebuilder,
39
- * policyregistry, policyevents, policyproxy, criurelabel
40
- *
41
- * patterns: builder (landlockrulebuilder, seccompbuilder, cgroupbuilder,
42
- * profilebuilder), registry (policyregistry), proxy (policyproxy),
43
- * observer (policyevents). rules: lowercase identifiers, english jsdoc,
44
- * third person, no emoji, try/catch catcher on every fallible path,
45
- * node:* built-ins only, no hardcoded localhost address anywhere.
46
- */
47
- import type { KeyObject } from 'node:crypto';
48
- import type { SecureContext } from 'node:tls';
49
- /** one landlock abi release. */
50
- interface landlockabientry {
51
- readonly abi: number;
52
- readonly kernel: string;
53
- readonly feature: string;
54
- }
55
- /** landlock abi timeline; v8-v10 landed across 6.16-6.21 per the
56
- * landlock.io timeline (v10 patches v3 in december 2025). */
57
- declare const landlockabitable: readonly [{
58
- readonly abi: 1;
59
- readonly kernel: '5.13';
60
- readonly feature: 'filesystem access rights';
61
- }, {
62
- readonly abi: 2;
63
- readonly kernel: '5.19';
64
- readonly feature: 'path refer and directory changes';
65
- }, {
66
- readonly abi: 3;
67
- readonly kernel: '6.2';
68
- readonly feature: 'file truncate';
69
- }, {
70
- readonly abi: 4;
71
- readonly kernel: '6.7';
72
- readonly feature: 'network tcp bind/connect';
73
- }, {
74
- readonly abi: 5;
75
- readonly kernel: '6.10';
76
- readonly feature: 'fs ioctl_dev access right';
77
- }, {
78
- readonly abi: 6;
79
- readonly kernel: '6.12';
80
- readonly feature: 'scopes: abstract unix socket + signal';
81
- }, {
82
- readonly abi: 7;
83
- readonly kernel: '6.15';
84
- readonly feature: 'audit logging';
85
- }, {
86
- readonly abi: 8;
87
- readonly kernel: '6.16';
88
- readonly feature: 'restrict_self tsync for multi-threaded processes';
89
- }, {
90
- readonly abi: 9;
91
- readonly kernel: '6.17';
92
- readonly feature: 'resolve_unix scope';
93
- }, {
94
- readonly abi: 10;
95
- readonly kernel: '6.20';
96
- readonly feature: 'network udp bind/connect + send';
97
- }];
98
- /** filesystem access rights across the abi levels. */
99
- declare const landlockfsaccess: readonly ['execute', 'write_file', 'read_file', 'read_dir', 'remove_dir', 'remove_file', 'make_char', 'make_dir', 'make_reg', 'make_sock', 'make_fifo', 'make_block', 'make_sym', 'refer', 'truncate', 'ioctl_dev'];
100
- /** network access rights (tcp since abi v4, udp since abi v10). */
101
- declare const landlocknetaccess: readonly ['bind_tcp', 'connect_tcp', 'bind_udp', 'connect_udp'];
102
- /** landlock scopes introduced with abi v6 (kernel 6.12). */
103
- declare const landlockscopes: readonly ['abstract_unix_socket', 'signal'];
104
- type landlockscope = (typeof landlockscopes)[number];
105
- /** one path rule with the rights granted on it. */
106
- interface landlockrule {
107
- readonly path: string;
108
- readonly rights: readonly string[];
109
- }
110
- /** assembled ruleset consumed by the native restrict helper. */
111
- interface landlockruleset {
112
- readonly handledfs: readonly string[];
113
- readonly handlednet: readonly string[];
114
- readonly scopes: readonly landlockscope[];
115
- readonly rules: readonly landlockrule[];
116
- }
117
- /** fluent builder for a landlock ruleset; the default grants read and
118
- * execute on the whole filesystem tree and nothing else (deny by
119
- * default at the handled-rights level). */
120
- declare class landlockrulebuilder {
121
- #private;
122
- /** grants read + execute on a tree (system roots, runtimes). */
123
- readonlytree(target: string): this;
124
- /** grants full filesystem access on a tree (workspace roots). */
125
- writetree(target: string): this;
126
- /** grants ioctls on device nodes (abi v5, kernel 6.10+). */
127
- devioctl(target: string): this;
128
- /** adds one explicit rule. */
129
- rule(target: string, rights: readonly string[]): this;
130
- /** widens the handled fs rights set. */
131
- handle(right: string): this;
132
- /** allows tcp networking (abi v4+): bind, connect or both. */
133
- nettcp(bind: boolean, connect: boolean): this;
134
- /** allows udp networking (abi v10, kernel ~6.20). */
135
- netudp(bind: boolean, connect: boolean): this;
136
- /** restricts abstract unix sockets or signals (abi v6, kernel 6.12). */
137
- scope(name: landlockscope): this;
138
- /** freezes the ruleset. */
139
- build(): landlockruleset;
140
- }
141
- /** parses a kernel release such as "6.12.0-arch1-1". */
142
- declare function kernelversion(kernel?: string): {
143
- readonly major: number;
144
- readonly minor: number;
145
- };
146
- /** derives the expected landlock abi from the running kernel release;
147
- * the native helper confirms it at runtime through
148
- * landlock_create_ruleset(NULL, 0, LANDLOCK_CREATE_RULESET_VERSION). */
149
- declare function detectlandlockabi(kernel?: string): number;
150
- /** reads the lsm list from sysfs; empty when unavailable. */
151
- declare function lsmlist(): readonly string[];
152
- /** renders the restriction plan handed to the native helper binary
153
- * (the c preload library performs the actual syscalls; node has no
154
- * direct syscall binding). */
155
- declare function landlockplan(ruleset: landlockruleset): {
156
- readonly env: Record<string, string>;
157
- readonly argv: readonly string[];
158
- };
159
- /** seccomp filter actions; RET_TRAP (SIGSYS) is the gvisor systrap base
160
- * and ERRNO is the deny action used by the engine profiles. */
161
- declare const seccompactions: {
162
- killprocess: string;
163
- killthread: string;
164
- trap: string;
165
- errno: string;
166
- trace: string;
167
- log: string;
168
- notify: string;
169
- };
170
- /** x86_64 syscall numbers of the deny list; io_uring is blocked in
171
- * every sandbox (docker default profile moby#47532, gvisor default,
172
- * CVE-2026-46315 information disclosure, june 2026). the host side of
173
- * the same story is liburing 2.8 (pool viabilityreport context 09):
174
- * SQPOLL plus the IORING_SETUP_COOP_TASKRUN and
175
- * IORING_SETUP_SINGLE_ISSUER setup flags — cooperative task running
176
- * without IPI storms and a single-issuer fast path; those flags are
177
- * host-only optimizations and NEVER relax the guest deny list: the
178
- * three io_uring syscalls stay blocked inside sandboxes. */
179
- declare const syscallnumbers: {
180
- io_uring_setup: number;
181
- io_uring_enter: number;
182
- io_uring_register: number;
183
- bpf: number;
184
- perf_event_open: number;
185
- kexec_load: number;
186
- kexec_file_load: number;
187
- userfaultfd: number;
188
- ptrace: number;
189
- open_by_handle_at: number;
190
- mount: number;
191
- umount2: number;
192
- pivot_root: number;
193
- init_module: number;
194
- finit_module: number;
195
- delete_module: number;
196
- acct: number;
197
- swapon: number;
198
- swapoff: number;
199
- reboot: number;
200
- setns: number;
201
- unshare: number;
202
- clone3: number;
203
- };
204
- /** one syscall group entry of a docker seccomp profile. */
205
- interface seccompgroup {
206
- readonly names: readonly string[];
207
- readonly action: string;
208
- readonly errnoRet?: number;
209
- }
210
- /** docker-compatible seccomp profile (deny by default). */
211
- interface seccompprofile {
212
- readonly defaultAction: string;
213
- readonly defaultErrnoRet: number;
214
- readonly architectures: readonly string[];
215
- readonly syscalls: readonly seccompgroup[];
216
- }
217
- /** builder for a deny-by-default seccomp profile; the blocked entries
218
- * return ENOSYS (38) so denied syscalls look absent, matching the docker
219
- * default profile semantics. */
220
- declare class seccompbuilder {
221
- #private;
222
- constructor();
223
- /** allows additional syscalls. */
224
- allow(...names: readonly string[]): this;
225
- /** blocks a syscall with an errno (38 = ENOSYS, 1 = EPERM). */
226
- deny(name: string, errno?: number): this;
227
- /** true when a syscall is currently denied. */
228
- denied(name: string): boolean;
229
- /** freezes the profile; denied syscalls are grouped per errno. */
230
- build(): seccompprofile;
231
- }
232
- /** the engine default profile: allow the plain workload surface and
233
- * deny the privileged set including the io_uring family. */
234
- declare function defaultseccompprofile(): seccompprofile;
235
- /** verified ebpf lsm facts (kernel docs, cloudflare and lwn sources). */
236
- declare const ebpflsmfacts: {
237
- sincemajor: string;
238
- toctou: string;
239
- tracepoints: string;
240
- verification: string;
241
- hornet: string;
242
- };
243
- /** one ebpf lsm attach point planned for the engine. */
244
- interface ebpfattach {
245
- readonly hook: string;
246
- readonly program: string;
247
- readonly purpose: string;
248
- }
249
- /** attach plan: lsm hooks for enforcement, one tracepoint for counters. */
250
- declare const ebpfattachplan: readonly [{
251
- readonly hook: 'lsm/file_open';
252
- readonly program: 'vhe_file_open';
253
- readonly purpose: 'audit opens outside the sandbox roots';
254
- }, {
255
- readonly hook: 'lsm/bprm_check_security';
256
- readonly program: 'vhe_bprm';
257
- readonly purpose: 'deny undeclared binaries at exec';
258
- }, {
259
- readonly hook: 'lsm/socket_connect';
260
- readonly program: 'vhe_socket_connect';
261
- readonly purpose: 'pin egress to the engine proxy';
262
- }, {
263
- readonly hook: 'tracepoint/syscalls/sys_enter_io_uring_setup';
264
- readonly program: 'vhe_io_uring_counter';
265
- readonly purpose: 'count denied async io attempts';
266
- }];
267
- /** cgroups v2 facts: unified hierarchy everywhere, delegation for
268
- * rootless operation (podman, docker rootless, systemd Delegate=yes). */
269
- declare const cgroupv2layout: {
270
- mountpoint: string;
271
- hierarchy: string;
272
- controllers: string[];
273
- delegation: string;
274
- note: string;
275
- };
276
- /** a cgroup plan: directory plus the files to write into it. */
277
- interface cgroupplan {
278
- readonly name: string;
279
- readonly files: Record<string, string>;
280
- }
281
- /** builder for one sandbox cgroup; values are written verbatim into the
282
- * unified hierarchy files. */
283
- declare class cgroupbuilder {
284
- #private;
285
- constructor(name?: string);
286
- /** cpu.max as "quota period" (100000 100000 = 1 cpu). */
287
- cpu(quota?: number, period?: number): this;
288
- /** cpu.weight (1-10000, default 100). */
289
- cpuweight(weight: number): this;
290
- /** memory.max hard limit in bytes. */
291
- memorymax(bytes: number): this;
292
- /** memory.high throttle point in bytes. */
293
- memoryhigh(bytes: number): this;
294
- /** memory.swap.max; "max" means unlimited, mirrors MemorySwap -1. */
295
- memoryswapmax(limit: number | 'max'): this;
296
- /** pids.max process ceiling. */
297
- pidsmax(count: number): this;
298
- /** io.max line for one device ("8:0" style major:minor). */
299
- iomax(device: string, rbps?: string, wbps?: string, riops?: string, wiops?: string): this;
300
- /** freezes the plan. */
301
- build(): cgroupplan;
302
- }
303
- /** verified post-quantum facts (openssl.org, ietf, node release notes). */
304
- declare const pqcatalog: {
305
- mlkem: string;
306
- mldsa: string;
307
- slhdsa: string;
308
- tlsdefault: string;
309
- openssl: string;
310
- rfc: string;
311
- chacha: string;
312
- aesnote: string;
313
- };
314
- /** keypair holder. */
315
- interface keypair {
316
- readonly publickey: KeyObject;
317
- readonly privatekey: KeyObject;
318
- }
319
- /** post-quantum key generation through node:crypto; every algorithm
320
- * falls back to a clear error when the runtime predates OpenSSL 3.5. */
321
- declare class pqkeyfactory {
322
- /** ML-KEM-768 (FIPS 203) encapsulation keypair. */
323
- static mlkem768(): keypair;
324
- /** ML-DSA-65 (FIPS 204) signing keypair. */
325
- static mldsa65(): keypair;
326
- /** classic X25519 keypair for the hybrid group. */
327
- static x25519(): keypair;
328
- }
329
- /** builds a TLS 1.3 secure context with the PQ hybrid group first;
330
- * node maps ecdhCurve to the OpenSSL groups list, so
331
- * "X25519MLKEM768:X25519" negotiates the RFC 10024 hybrid before the
332
- * classic group; ChaCha20-Poly1305 stays in the cipher list for hosts
333
- * without AES-NI. */
334
- declare function pqsecurecontext(): SecureContext;
335
- /** seals plaintext with ChaCha20-Poly1305; the 16-byte tag is appended. */
336
- declare function chachaseal(key: Buffer, nonce: Buffer, plaintext: Buffer, aad?: Buffer | null): Buffer;
337
- /** opens a ChaCha20-Poly1305 sealed buffer (tag appended). */
338
- declare function chachaopen(key: Buffer, nonce: Buffer, sealed: Buffer, aad?: Buffer | null): Buffer;
339
- /** composite sandbox profile: landlock + seccomp + cgroups + tls + criu
340
- * relabel; every layer is deny-by-default. */
341
- interface sandboxprofile {
342
- readonly name: string;
343
- readonly landlock: landlockruleset | null;
344
- readonly seccomp: seccompprofile;
345
- readonly cgroup: cgroupplan | null;
346
- readonly tls: {
347
- readonly groups: string;
348
- readonly minversion: string;
349
- };
350
- readonly criu: {
351
- readonly relabel: boolean;
352
- readonly label: string;
353
- };
354
- }
355
- /** builder that composes the four layers into one profile. */
356
- declare class profilebuilder {
357
- #private;
358
- named(name: string): this;
359
- withlandlock(ruleset: landlockruleset): this;
360
- withseccomp(profile: seccompprofile): this;
361
- withcgroup(plan: cgroupplan): this;
362
- /** disables selinux relabel on criu restore. */
363
- withoutrelabel(): this;
364
- withlabel(label: string): this;
365
- /** freezes the composite profile. */
366
- build(): sandboxprofile;
367
- }
368
- /** registry of named sandbox profiles. */
369
- declare class policyregistry {
370
- #private;
371
- register(profile: sandboxprofile): this;
372
- get(name: string): sandboxprofile;
373
- names(): readonly string[];
374
- }
375
- /** default registry: minimal (workstation-like), compute (gpu workload,
376
- * no network) and network (egress through the engine proxy). */
377
- declare const defaultpolicies: policyregistry;
378
- /** policy event names. */
379
- type policyeventname = 'applied' | 'released' | 'audit' | 'violation' | 'relabel';
380
- /** observer bus for policy activity; listener failures never propagate. */
381
- declare class policyevents {
382
- #private;
383
- constructor();
384
- on(name: policyeventname, listener: (payload: unknown) => void): this;
385
- emit(name: policyeventname, payload: unknown): void;
386
- }
387
- /** proxy that audits every profile access and reports violations when a
388
- * profile layer is weaker than the engine baseline. */
389
- declare class policyproxy {
390
- #private;
391
- constructor(inner: sandboxprofile, events: policyevents);
392
- get name(): string;
393
- /** audit trail entries. */
394
- get audit(): readonly string[];
395
- /** seccomp layer with an audit record. */
396
- get seccomp(): seccompprofile;
397
- /** landlock layer with an audit record. */
398
- get landlock(): landlockruleset | null;
399
- /** cgroup layer with an audit record. */
400
- get cgroup(): cgroupplan | null;
401
- /** true when the io_uring family stays denied; a violation event is
402
- * emitted and recorded otherwise. */
403
- iouringblocked(): boolean;
404
- /** writes the seccomp profile json next to a sandbox runtime dir so
405
- * the orchestrator can pass --security-opt seccomp=<path>. */
406
- persistseccomp(dir: string): Promise<string>;
407
- }
408
- /** criu v4.2.1 selinux relabel support: restored images keep their
409
- * labels through "criu restore --lsm-profile selinux:<label>" and the
410
- * chcon fallback relabels the image tree before restore. */
411
- declare class criurelabel {
412
- #private;
413
- constructor(label?: string);
414
- /** the --lsm-profile flag value for criu restore. */
415
- lsmflag(): string;
416
- /** relabels a checkpoint image tree with chcon. */
417
- relabel(imagesdir: string): Promise<void>;
418
- }
419
- /** one outcome of the host self check. */
420
- interface securitycheck {
421
- readonly name: string;
422
- readonly ok: boolean;
423
- readonly detail: string;
424
- }
425
- /** random url-safe token for sandbox authentication. */
426
- declare function randomtoken(bytes?: number): string;
427
- /** constant-time comparison of two tokens. */
428
- declare function tokenequals(a: string, b: string): boolean;
429
- /** verifies the host security surface under a profile scope: landlock
430
- * abi versus kernel release, lsm list, cgroup v2 mount, io_uring denial,
431
- * post-quantum keygen and the chacha roundtrip; the `using` guard
432
- * emits the applied/released events around the whole run. */
433
- declare function securityselfcheck(profile?: sandboxprofile): Promise<readonly securitycheck[]>;
434
- export type { cgroupplan, ebpfattach, keypair, landlockabientry, landlockrule, landlockruleset, landlockscope, policyeventname, sandboxprofile, seccompgroup, seccompprofile, securitycheck, };
435
- export { cgroupbuilder, cgroupv2layout, chachaopen, chachaseal, criurelabel, defaultpolicies, defaultseccompprofile, detectlandlockabi, ebpfattachplan, ebpflsmfacts, kernelversion, landlockabitable, landlockfsaccess, landlocknetaccess, landlockplan, landlockrulebuilder, landlockscopes, lsmlist, policyevents, policyproxy, policyregistry, pqcatalog, pqkeyfactory, pqsecurecontext, profilebuilder, randomtoken, seccompactions, seccompbuilder, securityselfcheck, syscallnumbers, tokenequals, };
436
- /** one PQ/T hybrid mechanism standardized by RFC 10024 (2026-08-10). */
437
- export interface pqtmechanism {
438
- readonly name: string;
439
- readonly classical: string;
440
- readonly pq: string;
441
- readonly securityBits: number;
442
- }
443
- /** the three hybrid mechanisms the RFC registers for TLS 1.3. */
444
- export declare const rfc10024mechanisms: readonly pqtmechanism[];
445
- /**
446
- * negotiates the strongest mutually supported PQ/T hybrid mechanism:
447
- * server preference order wins, mirroring how OpenSSL 3.5 orders the
448
- * groups list behind pqsecurecontext above.
449
- */
450
- export declare class rfc10024negotiator {
451
- #private;
452
- setpreference(names: readonly string[]): void;
453
- negotiate(clientOffered: readonly string[]): pqtmechanism | null;
454
- }
455
- /** one entry of the tamper-evident PQ audit chain. */
456
- export interface pqcauditentry {
457
- readonly ts: string;
458
- readonly event: string;
459
- readonly algorithm: string;
460
- readonly hybrid: boolean;
461
- readonly prevHash: string;
462
- readonly hash: string;
463
- }
464
- /**
465
- * hash-chained, tamper-evident log recording which sessions negotiated
466
- * post-quantum protection — the core evidence against
467
- * harvest-now-decrypt-later attacks. verify() replays the chain and
468
- * coverage() reports the PQ share of all recorded sessions.
469
- */
470
- export declare class pqcaudittrail {
471
- #private;
472
- record(event: string, algorithm: string, hybrid: boolean): pqcauditentry;
473
- verify(): boolean;
474
- /** share of sessions protected by a PQ or PQ/T hybrid mechanism. */
475
- coverage(): {
476
- total: number;
477
- pqShare: number;
478
- };
479
- }
480
- /**
481
- * blocks inference spill in factory defaults: when a parameter type
482
- * is constrained by another parameter's type, wrapping it in noinfer
483
- * stops the checker from inferring the constraint source itself.
484
- * typescript ships this natively as NoInfer<T> since 5.4 (the pool
485
- * viabilityreport cites it through the 5.6.3 isolatedDeclarations
486
- * sheet); the local spelling keeps the pattern working under the
487
- * engine's erasable-syntax profile and documents the provenance.
488
- */
489
- export type noinfer<t> = [t][t extends t ? 0 : never];
490
- /** a policy factory default that must not widen to the constraint. */
491
- export interface policydefault<t extends string> {
492
- readonly kind: 'policy-default';
493
- readonly value: t;
494
- }
495
- /**
496
- * builds one policy default entry whose value never leaks inference
497
- * back into the caller's generic — the exact factory leak the pool
498
- * NoInfer demo (FactoryOptionsNoInfer) documented.
499
- */
500
- export declare function policypreset<t extends string>(value: noinfer<t>): policydefault<t>;