@openmixer/plugin-qualify 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +203 -2
  3. package/bin/plugin-qualify.mjs +77 -0
  4. package/dist/clap-loader.d.ts +147 -0
  5. package/dist/clap-loader.js +252 -0
  6. package/dist/clap-loader.js.map +1 -0
  7. package/dist/clap-qualify.d.ts +126 -0
  8. package/dist/clap-qualify.js +272 -0
  9. package/dist/clap-qualify.js.map +1 -0
  10. package/dist/host-profiles.d.ts +42 -0
  11. package/dist/host-profiles.js +106 -0
  12. package/dist/host-profiles.js.map +1 -0
  13. package/dist/hosting-codes.d.ts +62 -0
  14. package/dist/hosting-codes.js +72 -0
  15. package/dist/hosting-codes.js.map +1 -0
  16. package/dist/hosting-suitability.d.ts +354 -0
  17. package/dist/hosting-suitability.js +654 -0
  18. package/dist/hosting-suitability.js.map +1 -0
  19. package/dist/index.d.ts +17 -0
  20. package/dist/index.js +20 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/loader.d.ts +26 -0
  23. package/dist/loader.js +9 -0
  24. package/dist/loader.js.map +1 -0
  25. package/dist/lv2-loader.d.ts +7 -0
  26. package/dist/lv2-loader.js +50 -0
  27. package/dist/lv2-loader.js.map +1 -0
  28. package/dist/measurement/cli.d.ts +168 -0
  29. package/dist/measurement/cli.js +353 -0
  30. package/dist/measurement/cli.js.map +1 -0
  31. package/dist/measurement/fixtures.d.ts +23 -0
  32. package/dist/measurement/fixtures.js +129 -0
  33. package/dist/measurement/fixtures.js.map +1 -0
  34. package/dist/measurement/format.d.ts +483 -0
  35. package/dist/measurement/format.js +627 -0
  36. package/dist/measurement/format.js.map +1 -0
  37. package/dist/measurement/guards.d.ts +33 -0
  38. package/dist/measurement/guards.js +61 -0
  39. package/dist/measurement/guards.js.map +1 -0
  40. package/dist/measurement/index.d.ts +36 -0
  41. package/dist/measurement/index.js +39 -0
  42. package/dist/measurement/index.js.map +1 -0
  43. package/dist/measurement/merge.d.ts +143 -0
  44. package/dist/measurement/merge.js +315 -0
  45. package/dist/measurement/merge.js.map +1 -0
  46. package/dist/measurement/plan.d.ts +127 -0
  47. package/dist/measurement/plan.js +141 -0
  48. package/dist/measurement/plan.js.map +1 -0
  49. package/dist/measurement/probe-json.d.ts +61 -0
  50. package/dist/measurement/probe-json.js +253 -0
  51. package/dist/measurement/probe-json.js.map +1 -0
  52. package/dist/measurement/provenance.d.ts +91 -0
  53. package/dist/measurement/provenance.js +173 -0
  54. package/dist/measurement/provenance.js.map +1 -0
  55. package/dist/measurement/sweep-jsonl.d.ts +40 -0
  56. package/dist/measurement/sweep-jsonl.js +154 -0
  57. package/dist/measurement/sweep-jsonl.js.map +1 -0
  58. package/dist/measurement/vocabulary.d.ts +125 -0
  59. package/dist/measurement/vocabulary.js +217 -0
  60. package/dist/measurement/vocabulary.js.map +1 -0
  61. package/dist/qualify-cli.d.ts +83 -0
  62. package/dist/qualify-cli.js +224 -0
  63. package/dist/qualify-cli.js.map +1 -0
  64. package/dist/qualify-declarations.d.ts +98 -0
  65. package/dist/qualify-declarations.js +76 -0
  66. package/dist/qualify-declarations.js.map +1 -0
  67. package/dist/qualify-options.d.ts +22 -0
  68. package/dist/qualify-options.js +36 -0
  69. package/dist/qualify-options.js.map +1 -0
  70. package/dist/rating.d.ts +32 -0
  71. package/dist/rating.js +30 -0
  72. package/dist/rating.js.map +1 -0
  73. package/dist/tool-paths.d.ts +12 -0
  74. package/dist/tool-paths.js +29 -0
  75. package/dist/tool-paths.js.map +1 -0
  76. package/fixtures/clap-scan/controls.json +8 -0
  77. package/fixtures/clap-scan/fake.json +16 -0
  78. package/fixtures/clap-scan/mixed.json +18 -0
  79. package/fixtures/zero-path.lv2/manifest.ttl +3 -0
  80. package/fixtures/zero-path.lv2/zero-path.c +85 -0
  81. package/fixtures/zero-path.lv2/zero-path.ttl +21 -0
  82. package/package.json +91 -3
  83. package/src/clap-loader.ts +393 -0
  84. package/src/clap-qualify.ts +387 -0
  85. package/src/host-profiles.ts +122 -0
  86. package/src/hosting-codes.ts +71 -0
  87. package/src/hosting-suitability.ts +982 -0
  88. package/src/index.ts +19 -0
  89. package/src/loader.ts +30 -0
  90. package/src/lv2-loader.ts +50 -0
  91. package/src/measurement/cli.ts +458 -0
  92. package/src/measurement/fixtures.ts +141 -0
  93. package/src/measurement/format.ts +1064 -0
  94. package/src/measurement/guards.ts +64 -0
  95. package/src/measurement/index.ts +39 -0
  96. package/src/measurement/merge.ts +434 -0
  97. package/src/measurement/plan.ts +219 -0
  98. package/src/measurement/probe-json.ts +271 -0
  99. package/src/measurement/provenance.ts +220 -0
  100. package/src/measurement/sweep-jsonl.ts +173 -0
  101. package/src/measurement/vocabulary.ts +298 -0
  102. package/src/qualify-cli.ts +277 -0
  103. package/src/qualify-declarations.ts +117 -0
  104. package/src/qualify-options.ts +49 -0
  105. package/src/rating.ts +53 -0
  106. package/src/tool-paths.ts +32 -0
  107. package/tools/_declarations.py +21 -0
  108. package/tools/benchmark.py +2462 -0
  109. package/tools/gen-python-declarations.d.mts +4 -0
  110. package/tools/gen-python-declarations.mjs +92 -0
  111. package/tools/hosting-sweep.mjs +51 -0
  112. package/tools/lv2-measure.mjs +204 -0
  113. package/tools/lv2_presets.py +132 -0
  114. package/tools/scan.py +432 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clap-loader.js","sourceRoot":"","sources":["../src/clap-loader.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD;;;;;;;;;;GAUG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAG7D,OAAO,EAAE,mBAAmB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AQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;gBAAE,OAAO,SAAS,CAAC;YAC5G,OAAO,mBAAmB,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;gBAC9D,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,GAAG,CAAC,GAAG;gBACZ,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;gBAC/B,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC;gBAChC,UAAU,EAAE,GAAG,CAAC,UAAU;aAC3B,CAAC,CAAC,CAAC;QACN,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,126 @@
1
+ import { type HostingReason, type PluginClapMeasurement, type PluginRtSafetyMeasurement } from "./hosting-suitability.js";
2
+ import { type HostProfile } from "./host-profiles.js";
3
+ import type { PluginTarget } from "./loader.js";
4
+ import type { QualifyVerdict } from "./qualify-cli.js";
5
+ import { type SuitabilityRating } from "./rating.js";
6
+ export declare class ClapQualifyError extends Error {
7
+ constructor(message: string);
8
+ }
9
+ /** What the interposer counted; `interposer: false` is a run without it, which counts nothing. */
10
+ export interface ClapRtSafetyReading extends PluginRtSafetyMeasurement {
11
+ /** The first events the interposer recorded inside `process()`, by libc call (`malloc`, `pthread_mutex_lock`, ...). */
12
+ readonly events?: readonly string[];
13
+ }
14
+ /** The CLAP facts as the prober printed them: the measurement, and whether any output was not finite. */
15
+ export interface ClapProbedFacts extends PluginClapMeasurement {
16
+ readonly nonFinite: boolean;
17
+ }
18
+ /** One plugin's line from `clap-qualify`. */
19
+ export interface ClapQualifyLine {
20
+ readonly uri: string;
21
+ readonly id: string;
22
+ readonly binary: {
23
+ readonly path: string;
24
+ readonly sha256: string;
25
+ };
26
+ /** The host extensions the prober offered; the verdict's headless pass holds only for these. */
27
+ readonly hostExtensions: readonly string[];
28
+ readonly clap: ClapProbedFacts;
29
+ readonly rtSafety: ClapRtSafetyReading;
30
+ }
31
+ /** One line of the prober's stdout, or a {@link ClapQualifyError} saying how it differs. */
32
+ export declare function parseClapQualifyLine(text: string): ClapQualifyLine;
33
+ /** Every non-empty line of the prober's stdout. */
34
+ export declare function parseClapQualifyOutput(stdout: string): ClapQualifyLine[];
35
+ /** The document's schema name; a reader refuses any other. */
36
+ export declare const RT_SAFETY_DOCUMENT_SCHEMA = "plugin-qualify.rt-safety/1";
37
+ /**
38
+ * The RT-safety verdict of one plugin binary for one console: keyed by the binary's SHA-256 and
39
+ * the host profile id, so a verdict never outlives the bytes it was measured on. `measured` is what
40
+ * the prober printed, raw; `verdict` is the `rtSafety` dimension's worst-wins fold of it.
41
+ */
42
+ export interface RtSafetyDocument {
43
+ readonly schema: typeof RT_SAFETY_DOCUMENT_SCHEMA;
44
+ readonly plugin: {
45
+ readonly uri: string;
46
+ readonly format: "clap";
47
+ readonly binary: {
48
+ readonly path: string;
49
+ readonly sha256: string;
50
+ };
51
+ };
52
+ /** The host profile the verdict is for. */
53
+ readonly console: string;
54
+ readonly verdict: {
55
+ readonly rating: SuitabilityRating;
56
+ /** `rating === "suitable"` — in-process only with it. */
57
+ readonly rtSafe: boolean;
58
+ /** The ONE reason that decided it; absent when suitable. */
59
+ readonly deciding?: HostingReason;
60
+ readonly reasons: readonly HostingReason[];
61
+ };
62
+ readonly measured: {
63
+ readonly hostExtensions: readonly string[];
64
+ readonly clap: ClapProbedFacts;
65
+ readonly rtSafety: ClapRtSafetyReading;
66
+ };
67
+ }
68
+ /**
69
+ * The verdict document for one prober line under one host profile. The interposer's counts and the
70
+ * two violations only a CLAP commits decide it. The line is judged against the profile's own CLAP
71
+ * host extensions: a line from a prober that offered others is not that host's measurement, and a
72
+ * host with no CLAP path has none; both read `unknown`.
73
+ */
74
+ export declare function rtSafetyDocument(line: ClapQualifyLine, profile?: HostProfile): RtSafetyDocument;
75
+ /** The document as the CLI's verdict row. */
76
+ export declare function rtSafetyVerdict(doc: RtSafetyDocument): QualifyVerdict;
77
+ /** Where a document is written in `--out`: one file per binary and console. */
78
+ export declare function rtSafetyDocumentName(doc: RtSafetyDocument): string;
79
+ /** What a run of the prober gave back; `error` is a spawn failure, `signal` a death. */
80
+ export interface ClapQualifyRunResult {
81
+ readonly status: number | null;
82
+ readonly signal?: string | null;
83
+ readonly stdout: string;
84
+ readonly stderr?: string;
85
+ readonly error?: Error;
86
+ }
87
+ export type ClapQualifyRun = (tool: string, args: readonly string[], env: Readonly<Record<string, string | undefined>>, timeoutMs: number) => ClapQualifyRunResult;
88
+ export interface ClapQualifyOptions {
89
+ /** The rates the plugin is activated and swept at. */
90
+ readonly rates: readonly number[];
91
+ /** Runs the prober; the default spawns it. */
92
+ readonly run?: ClapQualifyRun;
93
+ /** Where the two settings are read from; the default is `process.env`. */
94
+ readonly env?: Readonly<Record<string, string | undefined>>;
95
+ /** Whether a file exists; the default asks the filesystem. */
96
+ readonly exists?: (path: string) => boolean;
97
+ }
98
+ /** The prober and the interposer this run uses: each its setting, else the package's own build. */
99
+ export declare function clapQualifyTools(env: Readonly<Record<string, string | undefined>>): {
100
+ tool: string;
101
+ interposer: string;
102
+ };
103
+ /**
104
+ * Qualify the plugins of one `.clap` (all of them, or the one `id` names) under the interposer.
105
+ * Absent tools, a crash, a timeout, a load failure or an unreadable line throw: none of them is a
106
+ * measurement.
107
+ */
108
+ export declare function qualifyClap(binaryPath: string, id: string | undefined, options: ClapQualifyOptions): ClapQualifyLine[];
109
+ /** What the CLAP pass of one run produced: a document per plugin and console, and a row per verdict. */
110
+ export interface ClapQualifyPass {
111
+ readonly documents: readonly RtSafetyDocument[];
112
+ readonly verdicts: readonly QualifyVerdict[];
113
+ /** Each target that could not be measured, with why; its verdict rows read `unknown`, unmeasured. */
114
+ readonly failures: readonly {
115
+ readonly uri: string;
116
+ readonly problem: string;
117
+ }[];
118
+ }
119
+ /**
120
+ * Qualify every CLAP target, one prober run per target (a crash takes only that plugin), and judge
121
+ * each line under every host profile. A target without a binary path (a bare `urn:clap:` id) has
122
+ * nothing to load and is a failure, never a pass.
123
+ */
124
+ export declare function qualifyClapTargets(targets: readonly PluginTarget[], options: ClapQualifyOptions & {
125
+ readonly profiles?: readonly HostProfile[];
126
+ }): ClapQualifyPass;
@@ -0,0 +1,272 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ // Copyright (C) 2026 Pau Aliagas <linuxnow@gmail.com>
3
+ /**
4
+ * The CLAP arm of the one qualifier. `native/clap-qualify` loads a `.clap` under the interposer
5
+ * (`native/rt_interpose.so`), sweeps each plugin at every rate and prints what it MEASURED, one
6
+ * JSON line per plugin; this module runs it, reads those lines strictly, and turns each into the
7
+ * RT-safety verdict document: the binary's SHA-256, the console it was judged for, and the verdict
8
+ * of the `rtSafety` dimension from the same rules `classifyPluginHosting` folds
9
+ * ({@link rtSafetyReasons}, {@link clapRtReasons}) — never a second judge. A line that cannot be
10
+ * read, a prober that is absent, crashed or timed out, is a {@link ClapQualifyError}: nothing was
11
+ * measured, and nothing is rated.
12
+ */
13
+ import { spawnSync } from "node:child_process";
14
+ import { existsSync } from "node:fs";
15
+ import { CLAP_QUALIFY_TIMEOUT_S, CLAP_QUALIFY_TOOL_ENV, CLAP_SWEEP_BLOCKS, CLAP_SWEEP_FRAMES, RT_INTERPOSE_ENV, } from "./qualify-declarations.js";
16
+ import { HOSTING_CODE, clapRtReasons, contributedHostingRating, rtSafetyReasons, } from "./hosting-suitability.js";
17
+ import { OPENMIXER_CONSOLE_PROFILE } from "./host-profiles.js";
18
+ import { RATING_SEVERITY, worstRating } from "./rating.js";
19
+ import { clapQualifyToolPath, rtInterposePath } from "./tool-paths.js";
20
+ export class ClapQualifyError extends Error {
21
+ constructor(message) {
22
+ super(message);
23
+ this.name = "ClapQualifyError";
24
+ }
25
+ }
26
+ const SHA256 = /^[0-9a-f]{64}$/;
27
+ function isRecord(v) {
28
+ return Object.prototype.toString.call(v) === "[object Object]";
29
+ }
30
+ function bad(what) {
31
+ throw new ClapQualifyError(`clap-qualify printed a line that is not its document: ${what}`);
32
+ }
33
+ function str(o, key, where) {
34
+ const v = o[key];
35
+ return typeof v === "string" ? v : bad(`${where} has no string ${key}`);
36
+ }
37
+ function count(o, key, where) {
38
+ const v = o[key];
39
+ return typeof v === "number" && Number.isSafeInteger(v) && v >= 0 ? v : bad(`${where} has no count ${key}`);
40
+ }
41
+ function bool(o, key, where) {
42
+ const v = o[key];
43
+ return typeof v === "boolean" ? v : bad(`${where} has no boolean ${key}`);
44
+ }
45
+ function strings(o, key, where) {
46
+ const v = o[key];
47
+ if (!Array.isArray(v))
48
+ return bad(`${where} has no list ${key}`);
49
+ return v.map((s) => (typeof s === "string" ? s : bad(`${where} ${key} holds something that is not a string`)));
50
+ }
51
+ function readClap(v) {
52
+ if (!isRecord(v))
53
+ return bad("no clap facts");
54
+ const latencyIn = v["latency"];
55
+ if (!isRecord(latencyIn))
56
+ return bad("clap has no latency map");
57
+ const latency = {};
58
+ for (const [rate, at] of Object.entries(latencyIn)) {
59
+ if (!/^[1-9]\d*$/.test(rate) || !isRecord(at))
60
+ return bad(`clap latency at ${rate}`);
61
+ latency[rate] = { declaredFrames: count(at, "declaredFrames", `latency ${rate}`), measuredFrames: count(at, "measuredFrames", `latency ${rate}`) };
62
+ }
63
+ return {
64
+ mainInputChannels: count(v, "mainInputChannels", "clap"),
65
+ mainOutputChannels: count(v, "mainOutputChannels", "clap"),
66
+ sidechainInputs: count(v, "sidechainInputs", "clap"),
67
+ features: strings(v, "features", "clap"),
68
+ headlessOk: bool(v, "headlessOk", "clap"),
69
+ noteInputs: count(v, "noteInputs", "clap"),
70
+ latency,
71
+ threadViolations: count(v, "threadViolations", "clap"),
72
+ processErrors: count(v, "processErrors", "clap"),
73
+ processCalls: count(v, "processCalls", "clap"),
74
+ nonFinite: bool(v, "nonFinite", "clap"),
75
+ };
76
+ }
77
+ function readRtSafety(v) {
78
+ if (!isRecord(v))
79
+ return bad("no rtSafety");
80
+ if (!bool(v, "interposer", "rtSafety"))
81
+ return { interposer: false };
82
+ return {
83
+ interposer: true,
84
+ swept: bool(v, "swept", "rtSafety"),
85
+ sweepApplicable: bool(v, "sweepApplicable", "rtSafety"),
86
+ blocks: count(v, "blocks", "rtSafety"),
87
+ blockFrames: count(v, "blockFrames", "rtSafety"),
88
+ allocationsInRun: count(v, "allocationsInRun", "rtSafety"),
89
+ locksInRun: count(v, "locksInRun", "rtSafety"),
90
+ syscallsInRun: count(v, "syscallsInRun", "rtSafety"),
91
+ events: strings(v, "events", "rtSafety"),
92
+ };
93
+ }
94
+ /** One line of the prober's stdout, or a {@link ClapQualifyError} saying how it differs. */
95
+ export function parseClapQualifyLine(text) {
96
+ let v;
97
+ try {
98
+ v = JSON.parse(text);
99
+ }
100
+ catch {
101
+ return bad("not JSON");
102
+ }
103
+ if (!isRecord(v))
104
+ return bad("not an object");
105
+ if (v["format"] !== "clap")
106
+ return bad(`format is ${JSON.stringify(v["format"])}`);
107
+ const id = str(v, "id", "the line");
108
+ const uri = str(v, "uri", "the line");
109
+ if (uri !== `urn:clap:${id}`)
110
+ return bad(`uri ${uri} is not urn:clap:${id}`);
111
+ const binary = v["binary"];
112
+ if (!isRecord(binary))
113
+ return bad("no binary");
114
+ const sha256 = str(binary, "sha256", "binary");
115
+ if (!SHA256.test(sha256))
116
+ return bad(`binary sha256 ${sha256} is not 64 lowercase hex digits`);
117
+ return {
118
+ uri,
119
+ id,
120
+ binary: { path: str(binary, "path", "binary"), sha256 },
121
+ hostExtensions: strings(v, "hostExtensions", "the line"),
122
+ clap: readClap(v["clap"]),
123
+ rtSafety: readRtSafety(v["rtSafety"]),
124
+ };
125
+ }
126
+ /** Every non-empty line of the prober's stdout. */
127
+ export function parseClapQualifyOutput(stdout) {
128
+ return stdout.split("\n").filter((l) => l.trim() !== "").map(parseClapQualifyLine);
129
+ }
130
+ // --- the verdict document ------------------------------------------------------------------------
131
+ /** The document's schema name; a reader refuses any other. */
132
+ export const RT_SAFETY_DOCUMENT_SCHEMA = "plugin-qualify.rt-safety/1";
133
+ /**
134
+ * The verdict document for one prober line under one host profile. The interposer's counts and the
135
+ * two violations only a CLAP commits decide it. The line is judged against the profile's own CLAP
136
+ * host extensions: a line from a prober that offered others is not that host's measurement, and a
137
+ * host with no CLAP path has none; both read `unknown`.
138
+ */
139
+ export function rtSafetyDocument(line, profile = OPENMIXER_CONSOLE_PROFILE) {
140
+ const offered = profile.clapExtensions;
141
+ const offeredAsProfile = offered !== null && line.hostExtensions.length === offered.length && offered.every((e) => line.hostExtensions.includes(e));
142
+ const reasons = offered === null
143
+ ? [{ dimension: "rtSafety", kind: "objective", rating: "unknown", code: HOSTING_CODE.clapFormatNotHosted, params: {} }]
144
+ : offeredAsProfile
145
+ ? [...rtSafetyReasons(line.rtSafety), ...clapRtReasons(line.clap)]
146
+ : [
147
+ {
148
+ dimension: "rtSafety",
149
+ kind: "objective",
150
+ rating: "unknown",
151
+ code: HOSTING_CODE.clapExtensionsNotCovered,
152
+ params: { extensions: line.hostExtensions.join(" ") },
153
+ },
154
+ ];
155
+ const rating = worstRating(reasons.map(contributedHostingRating));
156
+ const deciding = [...reasons]
157
+ .sort((a, b) => RATING_SEVERITY[contributedHostingRating(b)] - RATING_SEVERITY[contributedHostingRating(a)])
158
+ .find((r) => contributedHostingRating(r) === rating);
159
+ return {
160
+ schema: RT_SAFETY_DOCUMENT_SCHEMA,
161
+ plugin: { uri: line.uri, format: "clap", binary: line.binary },
162
+ console: profile.id,
163
+ verdict: { rating, rtSafe: rating === "suitable", ...(rating === "suitable" || deciding === undefined ? {} : { deciding }), reasons },
164
+ measured: { hostExtensions: line.hostExtensions, clap: line.clap, rtSafety: line.rtSafety },
165
+ };
166
+ }
167
+ /** The document as the CLI's verdict row. */
168
+ export function rtSafetyVerdict(doc) {
169
+ return {
170
+ uri: doc.plugin.uri,
171
+ host: doc.console,
172
+ measured: true,
173
+ rating: doc.verdict.rating,
174
+ qualified: doc.verdict.rtSafe,
175
+ ...(doc.verdict.deciding === undefined ? {} : { deciding: doc.verdict.deciding.code }),
176
+ };
177
+ }
178
+ /** Where a document is written in `--out`: one file per binary and console. */
179
+ export function rtSafetyDocumentName(doc) {
180
+ return `${doc.plugin.binary.sha256}.${doc.console}.rt-safety.json`;
181
+ }
182
+ const spawnQualify = (tool, args, env, timeoutMs) => {
183
+ const r = spawnSync(tool, [...args], { encoding: "utf8", env: { ...env }, timeout: timeoutMs, maxBuffer: 64 << 20 });
184
+ return {
185
+ status: r.status,
186
+ signal: r.signal,
187
+ stdout: r.stdout ?? "",
188
+ stderr: r.stderr ?? "",
189
+ ...(r.error === undefined ? {} : { error: r.error }),
190
+ };
191
+ };
192
+ function setting(env, name, fallback) {
193
+ const v = env[name];
194
+ return v === undefined || v === "" ? fallback : v;
195
+ }
196
+ /** The prober and the interposer this run uses: each its setting, else the package's own build. */
197
+ export function clapQualifyTools(env) {
198
+ return { tool: setting(env, CLAP_QUALIFY_TOOL_ENV, clapQualifyToolPath()), interposer: setting(env, RT_INTERPOSE_ENV, rtInterposePath()) };
199
+ }
200
+ /**
201
+ * Qualify the plugins of one `.clap` (all of them, or the one `id` names) under the interposer.
202
+ * Absent tools, a crash, a timeout, a load failure or an unreadable line throw: none of them is a
203
+ * measurement.
204
+ */
205
+ export function qualifyClap(binaryPath, id, options) {
206
+ const env = options.env ?? process.env;
207
+ const exists = options.exists ?? existsSync;
208
+ const { tool, interposer } = clapQualifyTools(env);
209
+ for (const [what, path, name] of [["prober", tool, CLAP_QUALIFY_TOOL_ENV], ["interposer", interposer, RT_INTERPOSE_ENV]]) {
210
+ if (!exists(path))
211
+ throw new ClapQualifyError(`no CLAP ${what} at ${path}: build it with make -C native, or set ${name}`);
212
+ }
213
+ const args = [
214
+ "--rates",
215
+ options.rates.join(","),
216
+ "--block",
217
+ String(CLAP_SWEEP_FRAMES),
218
+ "--blocks",
219
+ String(CLAP_SWEEP_BLOCKS),
220
+ binaryPath,
221
+ ...(id === undefined ? [] : [id]),
222
+ ];
223
+ const r = (options.run ?? spawnQualify)(tool, args, { ...env, LD_PRELOAD: interposer }, CLAP_QUALIFY_TIMEOUT_S * 1000);
224
+ if (r.error !== undefined)
225
+ throw new ClapQualifyError(`cannot run ${tool}: ${r.error.message}`);
226
+ if (r.signal)
227
+ throw new ClapQualifyError(`${binaryPath} killed the prober (${r.signal})`);
228
+ if (r.status !== 0)
229
+ throw new ClapQualifyError(`${tool} exited ${String(r.status)} on ${binaryPath}: ${(r.stderr ?? "").trim()}`);
230
+ const lines = parseClapQualifyOutput(r.stdout);
231
+ if (lines.length === 0)
232
+ throw new ClapQualifyError(`${tool} printed nothing for ${binaryPath}`);
233
+ return lines;
234
+ }
235
+ /**
236
+ * Qualify every CLAP target, one prober run per target (a crash takes only that plugin), and judge
237
+ * each line under every host profile. A target without a binary path (a bare `urn:clap:` id) has
238
+ * nothing to load and is a failure, never a pass.
239
+ */
240
+ export function qualifyClapTargets(targets, options) {
241
+ const profiles = options.profiles ?? [OPENMIXER_CONSOLE_PROFILE];
242
+ const documents = [];
243
+ const verdicts = [];
244
+ const failures = [];
245
+ for (const target of targets) {
246
+ const id = target.uri.startsWith("urn:clap:") ? target.uri.slice("urn:clap:".length) : undefined;
247
+ let lines;
248
+ try {
249
+ if (target.binaryPath === undefined)
250
+ throw new ClapQualifyError(`${target.uri}: no .clap to load; name the file or a directory holding it`);
251
+ lines = qualifyClap(target.binaryPath, id, options);
252
+ }
253
+ catch (e) {
254
+ if (!(e instanceof ClapQualifyError))
255
+ throw e;
256
+ failures.push({ uri: target.uri, problem: e.message });
257
+ for (const profile of profiles) {
258
+ verdicts.push({ uri: target.uri, host: profile.id, measured: false, rating: "unknown", qualified: false, deciding: "not-measured" });
259
+ }
260
+ continue;
261
+ }
262
+ for (const line of lines) {
263
+ for (const profile of profiles) {
264
+ const doc = rtSafetyDocument(line, profile);
265
+ documents.push(doc);
266
+ verdicts.push(rtSafetyVerdict(doc));
267
+ }
268
+ }
269
+ }
270
+ return { documents, verdicts, failures };
271
+ }
272
+ //# sourceMappingURL=clap-qualify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clap-qualify.js","sourceRoot":"","sources":["../src/clap-qualify.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD;;;;;;;;;GASG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,wBAAwB,EACxB,eAAe,GAIhB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAoB,MAAM,oBAAoB,CAAC;AAGjF,OAAO,EAAE,eAAe,EAAE,WAAW,EAA0B,MAAM,aAAa,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvE,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AA0BD,MAAM,MAAM,GAAG,gBAAgB,CAAC;AAEhC,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,iBAAiB,CAAC;AACjE,CAAC;AAED,SAAS,GAAG,CAAC,IAAY;IACvB,MAAM,IAAI,gBAAgB,CAAC,yDAAyD,IAAI,EAAE,CAAC,CAAC;AAC9F,CAAC;AAED,SAAS,GAAG,CAAC,CAA0B,EAAE,GAAW,EAAE,KAAa;IACjE,MAAM,CAA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ACpB,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;YACtC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,42 @@
1
+ export { HOST_ISOLATIONS, HOST_LATENCY_HANDLING, type HostIsolation, type HostLatencyHandling, } from "./measurement/vocabulary.js";
2
+ export { readHostProfile, type HostProfile, type HostProfileRead } from "./measurement/format.js";
3
+ import type { HostProfile } from "./measurement/format.js";
4
+ /**
5
+ * The LV2 features the in-process stage provides — the ONE list (the console's host-backend contract).
6
+ * The verdict judges `required ⊆ provided` against it (as the `openmixer-console` profile), and
7
+ * the console hands the same array to the in-process LV2 table at `omx_host_backend_configure`,
8
+ * which builds one provider per URI and refuses a URI it cannot provide; there is no C copy (the
9
+ * console's native test reads this export).
10
+ */
11
+ export declare const OMX_INPROCESS_FEATURES: readonly string[];
12
+ /**
13
+ * The CLAP host object's extensions — what the console's control-thread host provides to every
14
+ * instance it hosts (CLAP hosting spec §5), and ALL the qualifier offers, so a plugin that needs
15
+ * more fails `init` headless in qualification and reads `hosting.clap.headless-failed` rather
16
+ * than on the desk. The list's home is the CLAP library — libomx-clap-core's own
17
+ * `clap_host_extensions.h`, what its host object offers — and this is its mirror, held equal to the
18
+ * header at the pinned omx-clap-host (by the console's conformance test), so the verdict never
19
+ * promises more or less than the host provides. Nothing else: no `gui`, no `timer-support`, no
20
+ * `posix-fd-support`, no `thread-pool`.
21
+ */
22
+ export declare const OMX_CLAP_HOST_EXTENSIONS: readonly string[];
23
+ /**
24
+ * jalv 1.6.8 `src/jalv.c` 123–127 + 1316–1325: the list passed to `lilv_plugin_instantiate`
25
+ * (the zynthian fork, 1.6.9, `src/jalv.c` 1371–1380, passes the identical list).
26
+ */
27
+ export declare const JALV_LV2_FEATURES: readonly string[];
28
+ /**
29
+ * mod-host f14a230 `src/effects.c` 254–275 + 2980–2995, without the `__MOD_DEVICES__`-only HMI
30
+ * feature: every feature `effects_add` hands a plugin, in its enum order.
31
+ */
32
+ export declare const MOD_HOST_LV2_FEATURES: readonly string[];
33
+ /** The console's RT thread — exactly the verdict before profiles existed, and the default. */
34
+ export declare const OPENMIXER_CONSOLE_PROFILE: HostProfile;
35
+ /** zynthian's host: one jalv process per plugin, instruments fed, latency published to JACK. */
36
+ export declare const JALV_PROFILE: HostProfile;
37
+ /** MOD's host: every plugin of a pedalboard in one shared mod-host process. */
38
+ export declare const MOD_HOST_PROFILE: HostProfile;
39
+ /** Every profile the tool ships, by id. */
40
+ export declare const HOST_PROFILES: readonly HostProfile[];
41
+ /** A shipped profile by id, or `undefined`. */
42
+ export declare function shippedHostProfile(id: string): HostProfile | undefined;
@@ -0,0 +1,106 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ // Copyright (C) 2026 Pau Aliagas <linuxnow@gmail.com>
3
+ /**
4
+ * HOST PROFILES — the host a verdict is judged against, declared. The measurements are profile-free; `classifyPluginHosting` reads one of these to say
5
+ * whether THAT host can run the plugin. A profile names only what differs between hosts; every
6
+ * other rule is the one classifier's.
7
+ */
8
+ import { HOST_BUDGETS } from "./qualify-declarations.js";
9
+ // The profile's shape and its reader belong to the interchange (a document carries its
10
+ // profiles, §3b), whose directory imports nothing from outside itself; they are re-exported here.
11
+ export { HOST_ISOLATIONS, HOST_LATENCY_HANDLING, } from "./measurement/vocabulary.js";
12
+ export { readHostProfile } from "./measurement/format.js";
13
+ /**
14
+ * The LV2 features the in-process stage provides — the ONE list (the console's host-backend contract).
15
+ * The verdict judges `required ⊆ provided` against it (as the `openmixer-console` profile), and
16
+ * the console hands the same array to the in-process LV2 table at `omx_host_backend_configure`,
17
+ * which builds one provider per URI and refuses a URI it cannot provide; there is no C copy (the
18
+ * console's native test reads this export).
19
+ */
20
+ export const OMX_INPROCESS_FEATURES = [
21
+ "http://lv2plug.in/ns/ext/urid#map",
22
+ "http://lv2plug.in/ns/ext/urid#unmap",
23
+ "http://lv2plug.in/ns/ext/options#options",
24
+ "http://lv2plug.in/ns/ext/buf-size#boundedBlockLength",
25
+ "http://lv2plug.in/ns/ext/worker#schedule",
26
+ "http://lv2plug.in/ns/ext/state#loadDefaultState",
27
+ "http://lv2plug.in/ns/ext/log#log",
28
+ ];
29
+ /**
30
+ * The CLAP host object's extensions — what the console's control-thread host provides to every
31
+ * instance it hosts (CLAP hosting spec §5), and ALL the qualifier offers, so a plugin that needs
32
+ * more fails `init` headless in qualification and reads `hosting.clap.headless-failed` rather
33
+ * than on the desk. The list's home is the CLAP library — libomx-clap-core's own
34
+ * `clap_host_extensions.h`, what its host object offers — and this is its mirror, held equal to the
35
+ * header at the pinned omx-clap-host (by the console's conformance test), so the verdict never
36
+ * promises more or less than the host provides. Nothing else: no `gui`, no `timer-support`, no
37
+ * `posix-fd-support`, no `thread-pool`.
38
+ */
39
+ export const OMX_CLAP_HOST_EXTENSIONS = [
40
+ "clap.log",
41
+ "clap.thread-check",
42
+ "clap.latency",
43
+ "clap.params",
44
+ "clap.audio-ports",
45
+ "clap.state",
46
+ ];
47
+ /** The LV2 extension namespace the jalv and mod-host lists are spelled in. */
48
+ const LV2_EXT = "http://lv2plug.in/ns/ext/";
49
+ const BUF_SIZE_ALL = ["powerOf2BlockLength", "fixedBlockLength", "boundedBlockLength"].map((f) => `${LV2_EXT}buf-size#${f}`);
50
+ /**
51
+ * jalv 1.6.8 `src/jalv.c` 123–127 + 1316–1325: the list passed to `lilv_plugin_instantiate`
52
+ * (the zynthian fork, 1.6.9, `src/jalv.c` 1371–1380, passes the identical list).
53
+ */
54
+ export const JALV_LV2_FEATURES = [
55
+ ...["urid#map", "urid#unmap", "worker#schedule", "log#log", "options#options", "state#loadDefaultState"].map((f) => LV2_EXT + f),
56
+ ...BUF_SIZE_ALL,
57
+ ];
58
+ /**
59
+ * mod-host f14a230 `src/effects.c` 254–275 + 2980–2995, without the `__MOD_DEVICES__`-only HMI
60
+ * feature: every feature `effects_add` hands a plugin, in its enum order.
61
+ */
62
+ export const MOD_HOST_LV2_FEATURES = [
63
+ ...["uri-map", "urid#map", "urid#unmap", "options#options"].map((f) => LV2_EXT + f),
64
+ "http://moddevices.com/ns/ext/license#feature",
65
+ ...BUF_SIZE_ALL,
66
+ ...["log#log", "state#freePath", "state#makePath"].map((f) => LV2_EXT + f),
67
+ "http://kx.studio/ns/lv2ext/control-input-port-change-request",
68
+ `${LV2_EXT}worker#schedule`,
69
+ ];
70
+ /** The console's RT thread — exactly the verdict before profiles existed, and the default. */
71
+ export const OPENMIXER_CONSOLE_PROFILE = {
72
+ id: "openmixer-console",
73
+ lv2Features: OMX_INPROCESS_FEATURES,
74
+ clapExtensions: OMX_CLAP_HOST_EXTENSIONS,
75
+ instruments: false,
76
+ cost: HOST_BUDGETS["openmixer-console"],
77
+ latency: "compensated",
78
+ isolation: "in-process",
79
+ };
80
+ /** zynthian's host: one jalv process per plugin, instruments fed, latency published to JACK. */
81
+ export const JALV_PROFILE = {
82
+ id: "jalv",
83
+ lv2Features: JALV_LV2_FEATURES,
84
+ clapExtensions: null,
85
+ instruments: true,
86
+ cost: HOST_BUDGETS.jalv,
87
+ latency: "uncompensated",
88
+ isolation: "per-process",
89
+ };
90
+ /** MOD's host: every plugin of a pedalboard in one shared mod-host process. */
91
+ export const MOD_HOST_PROFILE = {
92
+ id: "mod-host",
93
+ lv2Features: MOD_HOST_LV2_FEATURES,
94
+ clapExtensions: null,
95
+ instruments: true,
96
+ cost: HOST_BUDGETS["mod-host"],
97
+ latency: "uncompensated",
98
+ isolation: "shared-process",
99
+ };
100
+ /** Every profile the tool ships, by id. */
101
+ export const HOST_PROFILES = [OPENMIXER_CONSOLE_PROFILE, JALV_PROFILE, MOD_HOST_PROFILE];
102
+ /** A shipped profile by id, or `undefined`. */
103
+ export function shippedHostProfile(id) {
104
+ return HOST_PROFILES.find((p) => p.id === id);
105
+ }
106
+ //# sourceMappingURL=host-profiles.js.map
@@ -0,0 +1 @@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