@openmixer/plugin-qualify 0.8.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -4
- package/bin/plugin-qualify.mjs +60 -25
- package/dist/clap-loader.d.ts +25 -1
- package/dist/clap-loader.js +88 -7
- package/dist/clap-loader.js.map +1 -1
- package/dist/clap-qualify.d.ts +29 -6
- package/dist/clap-qualify.js +77 -13
- package/dist/clap-qualify.js.map +1 -1
- package/dist/host-profiles.d.ts +14 -0
- package/dist/host-profiles.js +27 -1
- package/dist/host-profiles.js.map +1 -1
- package/dist/hosting-codes.d.ts +5 -2
- package/dist/hosting-codes.js +8 -4
- package/dist/hosting-codes.js.map +1 -1
- package/dist/hosting-suitability.d.ts +32 -3
- package/dist/hosting-suitability.js +35 -6
- package/dist/hosting-suitability.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lv2-loader.d.ts +5 -0
- package/dist/lv2-loader.js +30 -2
- package/dist/lv2-loader.js.map +1 -1
- package/dist/measure-host.js +2 -2
- package/dist/measurement/cli.d.ts +13 -0
- package/dist/measurement/cli.js +68 -2
- package/dist/measurement/cli.js.map +1 -1
- package/dist/measurement/format.d.ts +1 -1
- package/dist/measurement/vocabulary.d.ts +1 -1
- package/dist/measurement/vocabulary.js +1 -1
- package/dist/measurement/vocabulary.js.map +1 -1
- package/dist/pins-file.d.ts +76 -0
- package/dist/pins-file.js +165 -0
- package/dist/pins-file.js.map +1 -0
- package/dist/qualify-cli.d.ts +2 -0
- package/dist/qualify-cli.js +7 -1
- package/dist/qualify-cli.js.map +1 -1
- package/dist/qualify-declarations.d.ts +23 -4
- package/dist/qualify-declarations.js +19 -3
- package/dist/qualify-declarations.js.map +1 -1
- package/dist/qualify-options.js +6 -1
- package/dist/qualify-options.js.map +1 -1
- package/package.json +3 -2
- package/src/clap-loader.ts +99 -7
- package/src/clap-qualify.ts +89 -12
- package/src/host-profiles.ts +29 -1
- package/src/hosting-codes.ts +8 -4
- package/src/hosting-suitability.ts +61 -8
- package/src/index.ts +1 -0
- package/src/lv2-loader.ts +28 -2
- package/src/measure-host.ts +2 -2
- package/src/measurement/cli.ts +77 -2
- package/src/measurement/format.ts +1 -1
- package/src/measurement/vocabulary.ts +1 -1
- package/src/pins-file.ts +200 -0
- package/src/qualify-cli.ts +8 -1
- package/src/qualify-declarations.ts +21 -4
- package/src/qualify-options.ts +7 -1
- package/tools/ai-trace-commit-check.sh +114 -0
- package/tools/ai-trace-patterns.json +33 -0
- package/tools/benchmark.py +1 -1
- package/tools/lv2-measure.mjs +16 -0
- package/tools/private-refs-check.sh +90 -0
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ them. The commands below are written as `plugin-qualify`; from a checkout run th
|
|
|
59
59
|
```
|
|
60
60
|
plugin-qualify urn:example:my-plugin # one plugin, by URI
|
|
61
61
|
plugin-qualify ./my-plugin.lv2 # every plugin in a bundle
|
|
62
|
-
plugin-qualify --all #
|
|
62
|
+
plugin-qualify --all # every CLAP on the search path; refuses if LV2 bundles are on LV2_PATH
|
|
63
63
|
plugin-qualify --help # every option and its default
|
|
64
64
|
```
|
|
65
65
|
|
|
@@ -79,15 +79,32 @@ CLAP prober the package installs (from a checkout, the one built from `native/`,
|
|
|
79
79
|
```
|
|
80
80
|
plugin-qualify ./my-fx.clap # every plugin in the file
|
|
81
81
|
plugin-qualify --out ./out ./my-fx.clap # and its RT-safety documents
|
|
82
|
+
CLAP_PATH=~/my-clap plugin-qualify --all # every CLAP on the search path
|
|
82
83
|
```
|
|
83
84
|
|
|
85
|
+
`--all` walks the standard CLAP search path through the same scanner: each directory `CLAP_PATH`
|
|
86
|
+
names (colon-separated), then `~/.clap`, then `/usr/lib/clap`, which is the system directory on every
|
|
87
|
+
distribution and architecture. A plugin id found twice keeps its first place on that path. LV2 plugins
|
|
88
|
+
are measured by `tools/lv2-measure.mjs` (below); this entry point does not drive that pass yet, so
|
|
89
|
+
`--all` refuses with exit 2 when any `.lv2` bundle is on the LV2 path (`LV2_PATH`, else `~/.lv2` and the
|
|
90
|
+
system lv2 directories) rather than qualify only the CLAP side. A directory on the CLAP path that cannot
|
|
91
|
+
be read (permissions, a symlink loop) also refuses with exit 2, naming it.
|
|
92
|
+
|
|
84
93
|
The prober runs each plugin headless at every `--rates` rate, under an interposer that counts the
|
|
85
94
|
allocations, locks and syscalls its `process()` makes while every parameter is swept, and prints
|
|
86
95
|
the file's SHA-256 beside what it measured. The verdict is the real-time-safety one: **suitable**
|
|
87
96
|
only on a clean count, **unsuitable** on any allocation, lock, syscall, main-thread host call from
|
|
88
|
-
`process()` or `CLAP_PROCESS_ERROR`, **unknown** when it could not be counted.
|
|
97
|
+
`process()` or `CLAP_PROCESS_ERROR`, **unknown** when it could not be counted. An instrument is
|
|
98
|
+
quiet until it is played, so a plugin with a note input is also played, at every rate and under a
|
|
99
|
+
count of its own: a chord, the pitch bent and a controller moved, pressure, the chord let go, a
|
|
100
|
+
burst of 32 note ons in one block and their offs, all notes off, in the dialect its note input
|
|
101
|
+
reads (CLAP's, else MIDI's). An allocation, lock or syscall while it plays is **unsuitable**
|
|
102
|
+
(`hosting.rt-safety.violations-under-notes`); an instrument that could not be played under the
|
|
103
|
+
interposer is **unknown** (`hosting.rt-safety.notes-unmeasured`). `--out` writes one
|
|
89
104
|
document per plugin binary and host profile, named `<sha256>.<profile>.rt-safety.json`, so a
|
|
90
|
-
verdict never outlives the bytes it was measured on.
|
|
105
|
+
verdict never outlives the bytes it was measured on. Its schema is `plugin-qualify.rt-safety/2`: `/1` with
|
|
106
|
+
`measured.noteSweep` added and the note sweep's reasons in `verdict`; a plugin with no note input
|
|
107
|
+
reads the same verdict under both. Each line also carries the plugin's pin, an
|
|
91
108
|
`integrity` block: the `.clap`'s SHA-256 by its file name and the parameter-layout fingerprint
|
|
92
109
|
`omx-layout/1:<sha256>`, both computed through plugin-hostd's `pin.h`, which is what a console
|
|
93
110
|
hands plugin-hostd as `pin_set` before it adds the plugin. `OMX_CLAP_QUALIFY` and `OMX_RT_INTERPOSE`
|
|
@@ -115,6 +132,25 @@ Without `--plugins` it measures every plugin the scan finds. Each plugin's entry
|
|
|
115
132
|
through plugin-hostd's `pin.h`, as for CLAP. `OMX_LV2_MEASURE` and `OMX_RT_INTERPOSE` name the
|
|
116
133
|
measurer and the interposer when they are not the installed ones or the checkout's own build.
|
|
117
134
|
|
|
135
|
+
The features the measurer offers a plugin are the console's own: omx-clap-core's LV2 feature
|
|
136
|
+
provider, the code its LV2 host builds every instance's features with. Each of the provider's
|
|
137
|
+
options is a flag of `tools/lv2-measure.mjs` and of `lv2_measure` itself, and each plugin's record
|
|
138
|
+
names the options it ran under, `featureOptions`:
|
|
139
|
+
|
|
140
|
+
| flag | what it sets | default |
|
|
141
|
+
| --- | --- | --- |
|
|
142
|
+
| `--features LIST` | the kinds offered: `map`, `unmap`, `options`, `bounded`, `worker`, `default-state`, `log` (empty: none) | all but `default-state` |
|
|
143
|
+
| `--strict` / `--no-strict` | refuse a plugin requiring a feature not offered (the record's `refusedFeature` names it), or hand it to its own instantiate without it | `--no-strict` |
|
|
144
|
+
| `--block-declares LIST` | the buf-size declarations made when `bounded` is offered: `bounded`, `fixed`, `pow2` (empty: none) | `bounded` |
|
|
145
|
+
| `--block-min N` | `bufsz:minBlockLength`; 0 is the run's block | 1 |
|
|
146
|
+
| `--block-max N` | `bufsz:maxBlockLength`; 0 is the run's block | 0 |
|
|
147
|
+
| `--block-nominal N` | `bufsz:nominalBlockLength`; 0 is the maximum | 0 |
|
|
148
|
+
| `--log MODE` | `log:log` lines: `silent`, `route` (to stderr) or `capture` (into the record's `featureOptions.log.lines`) | `silent` |
|
|
149
|
+
| `--log-capture-bytes N` | the capture buffer, its NUL included | 4096 |
|
|
150
|
+
|
|
151
|
+
The defaults are the measurement as it has always been, so a verdict reached under them does not
|
|
152
|
+
move. `lv2_measure --help` lists the same flags.
|
|
153
|
+
|
|
118
154
|
## What the verdicts mean
|
|
119
155
|
|
|
120
156
|
- **suitable**: every dimension was measured and passed. Safe to run inside the engine's own
|
|
@@ -153,6 +189,7 @@ hosts. Two projects share the measurements and differ only in the profile they c
|
|
|
153
189
|
```
|
|
154
190
|
plugin-qualify --host-profile jalv ./my-synth.lv2 # zynthian: one jalv process per plugin
|
|
155
191
|
plugin-qualify --host-profile mod-host ./my-fx.lv2 # MOD: one shared mod-host process
|
|
192
|
+
plugin-qualify --host-profile omx-clap-host ./my-synth.clap # omx-clap-host, alone or under plugin-hostd
|
|
156
193
|
plugin-qualify --host-profile jalv,mod-host,openmixer-console <uri> # one verdict per profile
|
|
157
194
|
plugin-qualify --host-profile ./my-host.json <uri> # your own host
|
|
158
195
|
```
|
|
@@ -162,8 +199,13 @@ plugin-qualify --host-profile ./my-host.json <uri> # your own ho
|
|
|
162
199
|
| `openmixer-console` (default) | in-process (the console's RT thread) | no | the console's in-process table | 0.05 at 96000 / 1024 |
|
|
163
200
|
| `jalv` | per-process | yes | jalv 1.6.8 `src/jalv.c` (zynthian's fork passes the same list) | 0.25 at 48000 / 256 |
|
|
164
201
|
| `mod-host` | shared-process | yes | mod-host f14a230 `src/effects.c` | 0.05 at 48000 / 128 |
|
|
202
|
+
| `omx-clap-host` | shared-process | yes | the console's in-process table (the same LV2 feature provider) | 0.05 at 48000 / 128 |
|
|
165
203
|
|
|
166
|
-
|
|
204
|
+
`omx-clap-host` offers a CLAP plugin the console's six host extensions and three more,
|
|
205
|
+
`clap.preset-load/2`, `clap.track-info/1` and `clap.remote-controls/2`. A CLAP plugin judged
|
|
206
|
+
under it is probed again with those three offered, so its verdict holds for the host it runs in.
|
|
207
|
+
|
|
208
|
+
The `jalv`, `mod-host` and `omx-clap-host` budgets are defaults, not a measurement of your board. State your own
|
|
167
209
|
by writing a profile file. Every field is required; a missing or mistyped field is refused and
|
|
168
210
|
never filled in with a default:
|
|
169
211
|
|
|
@@ -220,6 +262,18 @@ validates a profile file, and `judgedDocument(run, plugins, profiles, verdicts)`
|
|
|
220
262
|
document. All of them are exported from the package root. The package depends on no other
|
|
221
263
|
OpenMixer package.
|
|
222
264
|
|
|
265
|
+
### Pinning what was qualified
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
plugin-qualify --pins pins.txt ./my-synth.clap # a pin and a verdict per plugin, in a file plugin-hostd loads
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
`--pins <file>` writes one line per qualified plugin, the same line as plugin-hostd's `pin_set` verb with the verdict as
|
|
272
|
+
a last word: the SHA-256 of every file the host loads, the parameter-layout fingerprint, and `verdict=in-process`
|
|
273
|
+
(suitable), `isolated` (conditional) or `refused` (unsuitable). A plugin with no verdict is pinned without one. Put the
|
|
274
|
+
file in plugin-hostd's settings as `pin_file` and an `add` of that plugin needs no `pin_set`; a changed file is refused
|
|
275
|
+
with -509. The verdict is the first `--host-profile`'s. A run that took no pin leaves an existing file alone.
|
|
276
|
+
|
|
223
277
|
### The container image
|
|
224
278
|
|
|
225
279
|
```
|
package/bin/plugin-qualify.mjs
CHANGED
|
@@ -2,27 +2,31 @@
|
|
|
2
2
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
3
3
|
// Copyright (C) 2026 Pau Aliagas <linuxnow@gmail.com>
|
|
4
4
|
/**
|
|
5
|
-
* `plugin-qualify` — the entry point
|
|
5
|
+
* `plugin-qualify` — the entry point. Every decision is a
|
|
6
6
|
* pure function in `src/qualify-cli.ts`; this file only reads argv, prints and exits.
|
|
7
7
|
*
|
|
8
8
|
* CLAP targets are qualified here: the prober (`native/clap-qualify`) runs each under the interposer
|
|
9
|
-
* and every plugin gets its RT-safety verdict document, per binary hash and console.
|
|
9
|
+
* and every plugin gets its RT-safety verdict document, per binary hash and console. `--all` finds
|
|
10
|
+
* them on the standard CLAP search path (`CLAP_PATH`, then `~/.clap`, then `/usr/lib/clap`).
|
|
10
11
|
*
|
|
11
12
|
* NOT YET WIRED for LV2 (refused with exit 2, never a silent partial run): driving the offline pass
|
|
12
13
|
* (`tools/lv2-measure.mjs`) for a named subset and the mod-host hosting sweep from this entry
|
|
13
14
|
* point. Until then a run that would measure an LV2 refuses and says which step is missing.
|
|
14
15
|
*/
|
|
15
|
-
import { mkdirSync, writeFileSync } from "node:fs";
|
|
16
|
-
import { join } from "node:path";
|
|
16
|
+
import { closeSync, fsyncSync, mkdirSync, openSync, renameSync, writeFileSync, writeSync } from "node:fs";
|
|
17
|
+
import { dirname, join } from "node:path";
|
|
17
18
|
|
|
18
19
|
import {
|
|
19
20
|
ClapScanError,
|
|
20
21
|
EXIT_CODE,
|
|
21
22
|
clapLoader,
|
|
23
|
+
clapPinEntries,
|
|
24
|
+
discoverAllTargets,
|
|
22
25
|
exitCodeFor,
|
|
23
26
|
helpText,
|
|
24
27
|
lv2Loader,
|
|
25
28
|
parseQualifyArgs,
|
|
29
|
+
pinsFile,
|
|
26
30
|
qualifyClapTargets,
|
|
27
31
|
resolveHostProfiles,
|
|
28
32
|
resolveTargets,
|
|
@@ -30,6 +34,30 @@ import {
|
|
|
30
34
|
textTable,
|
|
31
35
|
} from "../dist/index.js";
|
|
32
36
|
|
|
37
|
+
/**
|
|
38
|
+
* The pins file, whole or not at all: written beside the target and renamed over it, and left alone when the run took no
|
|
39
|
+
* pin, so a run that measured nothing never empties the file a host is reading.
|
|
40
|
+
*/
|
|
41
|
+
function writePins(path, file) {
|
|
42
|
+
for (const uri of file.skipped) process.stderr.write(`plugin-qualify: ${uri}: no whole pin was taken, so it has no line in ${path}\n`);
|
|
43
|
+
for (const r of file.refused) process.stderr.write(`plugin-qualify: ${r.problem}; it has no line in ${path}\n`);
|
|
44
|
+
if (file.written.length === 0) {
|
|
45
|
+
process.stderr.write(`plugin-qualify: no pin was taken, ${path} is left as it was\n`);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
49
|
+
// the bytes on disk before the name moves, so a crash leaves the old file or the whole new one
|
|
50
|
+
const fd = openSync(`${path}.new`, "w");
|
|
51
|
+
try {
|
|
52
|
+
writeSync(fd, file.text);
|
|
53
|
+
fsyncSync(fd);
|
|
54
|
+
} finally {
|
|
55
|
+
closeSync(fd);
|
|
56
|
+
}
|
|
57
|
+
renameSync(`${path}.new`, path);
|
|
58
|
+
process.stderr.write(`plugin-qualify: ${file.written.length} pin${file.written.length === 1 ? "" : "s"} written to ${path}\n`);
|
|
59
|
+
}
|
|
60
|
+
|
|
33
61
|
const parsed = parseQualifyArgs(process.argv.slice(2));
|
|
34
62
|
if (!parsed.ok) {
|
|
35
63
|
process.stderr.write(`plugin-qualify: ${parsed.error}\n\n${helpText()}`);
|
|
@@ -45,31 +73,38 @@ if (!profiles.ok) {
|
|
|
45
73
|
process.exit(EXIT_CODE.couldNotMeasure);
|
|
46
74
|
}
|
|
47
75
|
for (const p of profiles.profiles) process.stderr.write(`plugin-qualify: host profile ${p.id} (${p.isolation})\n`);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (!
|
|
54
|
-
|
|
55
|
-
|
|
76
|
+
let plugins;
|
|
77
|
+
try {
|
|
78
|
+
if (parsed.args.all) plugins = discoverAllTargets();
|
|
79
|
+
else {
|
|
80
|
+
const r = resolveTargets(parsed.args.targets, [clapLoader(), lv2Loader]);
|
|
81
|
+
if (!r.ok) {
|
|
82
|
+
process.stderr.write(`plugin-qualify: no plugin found for: ${r.refused.join(", ")}\n`);
|
|
83
|
+
process.exit(EXIT_CODE.couldNotMeasure);
|
|
84
|
+
}
|
|
85
|
+
plugins = r.plugins;
|
|
56
86
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
87
|
+
} catch (e) {
|
|
88
|
+
if (!(e instanceof ClapScanError)) throw e;
|
|
89
|
+
process.stderr.write(`plugin-qualify: ${e.message}\n`);
|
|
90
|
+
process.exit(EXIT_CODE.couldNotMeasure);
|
|
91
|
+
}
|
|
92
|
+
for (const p of plugins) process.stderr.write(`plugin-qualify: target ${p.uri}${p.bundle ? ` (${p.bundle})` : ""}\n`);
|
|
93
|
+
if (plugins.length > 0 && plugins.every((p) => p.format === "clap")) {
|
|
94
|
+
if (parsed.args.all) {
|
|
95
|
+
process.stderr.write("plugin-qualify: --all qualified the CLAP plugins on the search path (no LV2 bundle is on the LV2 path)\n");
|
|
60
96
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
mkdirSync(parsed.args.out, { recursive: true });
|
|
67
|
-
for (const doc of pass.documents) writeFileSync(join(parsed.args.out, rtSafetyDocumentName(doc)), `${JSON.stringify(doc, null, 2)}\n`);
|
|
68
|
-
}
|
|
69
|
-
process.stdout.write(parsed.args.format === "json" ? `${JSON.stringify(pass.documents, null, 2)}\n` : textTable(pass.verdicts));
|
|
70
|
-
process.exit(exitCodeFor(pass.verdicts));
|
|
97
|
+
const pass = qualifyClapTargets(plugins, { rates: parsed.args.rates, profiles: profiles.profiles });
|
|
98
|
+
for (const f of pass.failures) process.stderr.write(`plugin-qualify: ${f.uri}: ${f.problem}\n`);
|
|
99
|
+
if (parsed.args.out !== undefined) {
|
|
100
|
+
mkdirSync(parsed.args.out, { recursive: true });
|
|
101
|
+
for (const doc of pass.documents) writeFileSync(join(parsed.args.out, rtSafetyDocumentName(doc)), `${JSON.stringify(doc, null, 2)}\n`);
|
|
71
102
|
}
|
|
103
|
+
if (parsed.args.pins !== undefined) writePins(parsed.args.pins, pinsFile(clapPinEntries(pass.documents, profiles.profiles[0].id)));
|
|
104
|
+
process.stdout.write(parsed.args.format === "json" ? `${JSON.stringify(pass.documents, null, 2)}\n` : textTable(pass.verdicts));
|
|
105
|
+
process.exit(exitCodeFor(pass.verdicts));
|
|
72
106
|
}
|
|
107
|
+
if (parsed.args.pins !== undefined) process.stderr.write(`plugin-qualify: --pins ${parsed.args.pins}: nothing to pin, this run measures no plugin yet\n`);
|
|
73
108
|
process.stderr.write(
|
|
74
109
|
"plugin-qualify: measuring from this entry point is not wired yet " +
|
|
75
110
|
"(offline pass: tools/lv2-measure.mjs; hosting sweep: mod-host) — refusing rather than rating on less\n",
|
package/dist/clap-loader.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PluginLoader } from "./loader.js";
|
|
1
|
+
import type { PluginLoader, PluginTarget } from "./loader.js";
|
|
2
2
|
export declare class ClapScanError extends Error {
|
|
3
3
|
constructor(message: string);
|
|
4
4
|
}
|
|
@@ -144,4 +144,28 @@ export interface ClapLoaderOptions {
|
|
|
144
144
|
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
145
145
|
}
|
|
146
146
|
export declare function clapLoader(options?: ClapLoaderOptions): PluginLoader;
|
|
147
|
+
/**
|
|
148
|
+
* The directories `--all` walks, in order and once each: every non-empty entry of `CLAP_PATH`, then
|
|
149
|
+
* `~/.clap`, then `/usr/lib/clap`.
|
|
150
|
+
*/
|
|
151
|
+
export declare function clapSearchPath(env: Readonly<Record<string, string | undefined>>, home: string): string[];
|
|
152
|
+
export interface ClapDiscoverOptions extends ClapLoaderOptions {
|
|
153
|
+
/** The home directory `~/.clap` is read under; the default is the user's. */
|
|
154
|
+
readonly home?: string;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Every CLAP plugin on the standard search path, each directory resolved through {@link clapLoader}
|
|
158
|
+
* exactly as a named directory is. A directory that is absent or holds no `.clap` is skipped; a
|
|
159
|
+
* plugin id found twice keeps its first place on the path. A directory that cannot be read (a
|
|
160
|
+
* permission error, a symlink loop) is a {@link ClapScanError} naming it, never a partial list.
|
|
161
|
+
*/
|
|
162
|
+
export declare function discoverClapTargets(options?: ClapDiscoverOptions): PluginTarget[];
|
|
163
|
+
export interface DiscoverAllOptions extends ClapDiscoverOptions {
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* The targets of `--all`. The LV2 plugins lilv finds cannot be measured from this entry point, so
|
|
167
|
+
* when the LV2 search path holds any bundle the run refuses (exit 2) and names how many, rather
|
|
168
|
+
* than qualifying only the CLAP side and reporting everything qualified.
|
|
169
|
+
*/
|
|
170
|
+
export declare function discoverAllTargets(options?: DiscoverAllOptions): PluginTarget[];
|
|
147
171
|
export {};
|
package/dist/clap-loader.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* The CLAP implementation of the one discovery seam (`loader.ts`). A target that is a `.clap` file, or a
|
|
5
5
|
* directory holding one, is scanned by `omx-clap-scan --json` (the scanner of omx-clap-host),
|
|
6
|
-
* located by the ONE declared setting; `urn:clap:<id>` is one plugin without a scan.
|
|
6
|
+
* located by the ONE declared setting; `urn:clap:<id>` is one plugin without a scan. `--all` walks
|
|
7
|
+
* the standard CLAP search path ({@link clapSearchPath}) through the same loader. The
|
|
7
8
|
* scanner's JSON is the input: {@link clapScanDescriptors} normalises it into the interchange
|
|
8
9
|
* rows. A scan that cannot be read is a {@link ClapScanError}, never an empty result.
|
|
9
10
|
*
|
|
@@ -13,8 +14,10 @@
|
|
|
13
14
|
*/
|
|
14
15
|
import { spawnSync } from "node:child_process";
|
|
15
16
|
import { existsSync, readdirSync, statSync } from "node:fs";
|
|
17
|
+
import { homedir } from "node:os";
|
|
16
18
|
import { basename, dirname, join, resolve } from "node:path";
|
|
17
|
-
import {
|
|
19
|
+
import { lv2BundlesOnPath } from "./lv2-loader.js";
|
|
20
|
+
import { CLAP_PATH_ENV, CLAP_SCAN_TIMEOUT_S, CLAP_SCAN_TOOL_DEFAULT, CLAP_SCAN_TOOL_ENV, CLAP_SYSTEM_DIR, CLAP_USER_DIR, } from "./qualify-declarations.js";
|
|
18
21
|
/** The scanner's own name in its document — anything else is not its output. */
|
|
19
22
|
const SCANNER_NAME = "omx-clap-scan";
|
|
20
23
|
/** The same document from plugin-qualify's own prober (`native/clap-qualify --json`). */
|
|
@@ -208,12 +211,38 @@ export function clapScanTool(env) {
|
|
|
208
211
|
const named = env[CLAP_SCAN_TOOL_ENV];
|
|
209
212
|
return named === undefined || named === "" ? CLAP_SCAN_TOOL_DEFAULT : named;
|
|
210
213
|
}
|
|
214
|
+
/** An fs error met while walking a search directory, as the scan refusal that names the path. */
|
|
215
|
+
function unreadable(path, e) {
|
|
216
|
+
if (e instanceof ClapScanError)
|
|
217
|
+
return e;
|
|
218
|
+
const code = e.code;
|
|
219
|
+
return new ClapScanError(`cannot read ${path}: ${typeof code === "string" ? code : String(e)}`);
|
|
220
|
+
}
|
|
221
|
+
/** A directory entry that is a directory, or a symlink to one; a dangling link is not, any other fs error (a loop) is thrown. */
|
|
222
|
+
function isDirectory(e, p) {
|
|
223
|
+
if (e.isDirectory())
|
|
224
|
+
return true;
|
|
225
|
+
if (!e.isSymbolicLink())
|
|
226
|
+
return false;
|
|
227
|
+
try {
|
|
228
|
+
return statSync(p).isDirectory();
|
|
229
|
+
}
|
|
230
|
+
catch (err) {
|
|
231
|
+
if (err.code === "ENOENT")
|
|
232
|
+
return false;
|
|
233
|
+
throw err;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
211
236
|
function holdsClap(dir) {
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
237
|
+
try {
|
|
238
|
+
for (const e of readdirSync(dir, { withFileTypes: true })) {
|
|
239
|
+
const p = join(dir, e.name);
|
|
240
|
+
if (isDirectory(e, p) ? holdsClap(p) : e.name.endsWith(CLAP_SUFFIX))
|
|
241
|
+
return true;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
catch (e) {
|
|
245
|
+
throw unreadable(dir, e);
|
|
217
246
|
}
|
|
218
247
|
return false;
|
|
219
248
|
}
|
|
@@ -249,4 +278,56 @@ export function clapLoader(options = {}) {
|
|
|
249
278
|
},
|
|
250
279
|
};
|
|
251
280
|
}
|
|
281
|
+
// --- the standard search path (`--all`) ----------------------------------------------------------
|
|
282
|
+
/**
|
|
283
|
+
* The directories `--all` walks, in order and once each: every non-empty entry of `CLAP_PATH`, then
|
|
284
|
+
* `~/.clap`, then `/usr/lib/clap`.
|
|
285
|
+
*/
|
|
286
|
+
export function clapSearchPath(env, home) {
|
|
287
|
+
const named = (env[CLAP_PATH_ENV] ?? "").split(":").filter((d) => d !== "");
|
|
288
|
+
return [...new Set([...named, join(home, CLAP_USER_DIR), CLAP_SYSTEM_DIR].map((d) => resolve(d)))];
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Every CLAP plugin on the standard search path, each directory resolved through {@link clapLoader}
|
|
292
|
+
* exactly as a named directory is. A directory that is absent or holds no `.clap` is skipped; a
|
|
293
|
+
* plugin id found twice keeps its first place on the path. A directory that cannot be read (a
|
|
294
|
+
* permission error, a symlink loop) is a {@link ClapScanError} naming it, never a partial list.
|
|
295
|
+
*/
|
|
296
|
+
export function discoverClapTargets(options = {}) {
|
|
297
|
+
const loader = clapLoader(options);
|
|
298
|
+
const found = new Map();
|
|
299
|
+
for (const dir of clapSearchPath(options.env ?? process.env, options.home ?? homedir())) {
|
|
300
|
+
try {
|
|
301
|
+
if (!existsSync(dir) || !statSync(dir).isDirectory())
|
|
302
|
+
continue;
|
|
303
|
+
for (const t of loader.resolve(dir) ?? [])
|
|
304
|
+
if (!found.has(t.uri))
|
|
305
|
+
found.set(t.uri, t);
|
|
306
|
+
}
|
|
307
|
+
catch (e) {
|
|
308
|
+
throw unreadable(dir, e);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return [...found.values()];
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* The targets of `--all`. The LV2 plugins lilv finds cannot be measured from this entry point, so
|
|
315
|
+
* when the LV2 search path holds any bundle the run refuses (exit 2) and names how many, rather
|
|
316
|
+
* than qualifying only the CLAP side and reporting everything qualified.
|
|
317
|
+
*/
|
|
318
|
+
export function discoverAllTargets(options = {}) {
|
|
319
|
+
const env = options.env ?? process.env;
|
|
320
|
+
let bundles;
|
|
321
|
+
try {
|
|
322
|
+
bundles = lv2BundlesOnPath(env, options.home ?? homedir());
|
|
323
|
+
}
|
|
324
|
+
catch (e) {
|
|
325
|
+
throw unreadable("the LV2 search path", e);
|
|
326
|
+
}
|
|
327
|
+
if (bundles.length > 0) {
|
|
328
|
+
throw new ClapScanError(`--all cannot measure LV2 from this entry point and ${String(bundles.length)} LV2 bundle(s) are on the LV2 path ` +
|
|
329
|
+
`(first: ${bundles[0]}); name the plugins or bundles to qualify instead, or unset LV2_PATH to an empty directory`);
|
|
330
|
+
}
|
|
331
|
+
return discoverClapTargets(options);
|
|
332
|
+
}
|
|
252
333
|
//# sourceMappingURL=clap-loader.js.map
|
package/dist/clap-loader.js.map
CHANGED
|
@@ -1 +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,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE5G,gFAAgF;AAChF,MAAM,YAAY,GAAG,eAAe,CAAC;AACrC,yFAAyF;AACzF,MAAM,aAAa,GAAsB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AACxE,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AACpC,MAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,oEAAoE;AACpE,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,CAAC;AAE/B,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAA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OAAO,CAAC,CAAC,CAAC,4FAA4F,CACpH,CAAC;IACJ,CAAC;IACD,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC"}
|
package/dist/clap-qualify.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HostingReason, type PluginClapMeasurement, type PluginRtSafetyMeasurement } from "./hosting-suitability.js";
|
|
1
|
+
import { type HostingReason, type PluginClapMeasurement, type PluginNoteSweepMeasurement, type PluginRtSafetyMeasurement } from "./hosting-suitability.js";
|
|
2
2
|
import { type HostProfile } from "./host-profiles.js";
|
|
3
3
|
import type { PluginTarget } from "./loader.js";
|
|
4
4
|
import type { QualifyVerdict } from "./qualify-cli.js";
|
|
@@ -12,6 +12,11 @@ export interface ClapRtSafetyReading extends PluginRtSafetyMeasurement {
|
|
|
12
12
|
/** The first events the interposer recorded inside `process()`, by libc call (`malloc`, `pthread_mutex_lock`, ...). */
|
|
13
13
|
readonly events?: readonly string[];
|
|
14
14
|
}
|
|
15
|
+
/** What the note sweep counted; `applicable: false` is a plugin the prober did not play. */
|
|
16
|
+
export interface ClapNoteSweepReading extends PluginNoteSweepMeasurement {
|
|
17
|
+
/** The first events the interposer recorded inside `process()` while the plugin was played. */
|
|
18
|
+
readonly events?: readonly string[];
|
|
19
|
+
}
|
|
15
20
|
/** The CLAP facts as the prober printed them: the measurement, and whether any output was not finite. */
|
|
16
21
|
export interface ClapProbedFacts extends PluginClapMeasurement {
|
|
17
22
|
readonly nonFinite: boolean;
|
|
@@ -28,6 +33,8 @@ export interface ClapQualifyLine {
|
|
|
28
33
|
readonly hostExtensions: readonly string[];
|
|
29
34
|
readonly clap: ClapProbedFacts;
|
|
30
35
|
readonly rtSafety: ClapRtSafetyReading;
|
|
36
|
+
/** The note sweep: the plugin played through its note input, counted apart. */
|
|
37
|
+
readonly noteSweep: ClapNoteSweepReading;
|
|
31
38
|
/**
|
|
32
39
|
* The pin (spec §11): the `.clap`'s digest by its name in its directory and the layout fingerprint
|
|
33
40
|
* the prober computed through plugin-hostd's `pin.h`, or the reason it took none.
|
|
@@ -38,8 +45,13 @@ export interface ClapQualifyLine {
|
|
|
38
45
|
export declare function parseClapQualifyLine(text: string): ClapQualifyLine;
|
|
39
46
|
/** Every non-empty line of the prober's stdout. */
|
|
40
47
|
export declare function parseClapQualifyOutput(stdout: string): ClapQualifyLine[];
|
|
41
|
-
/**
|
|
42
|
-
|
|
48
|
+
/**
|
|
49
|
+
* The document's schema name; a reader refuses any other it does not know. `/2` is `/1` with
|
|
50
|
+
* `measured.noteSweep` added and the note sweep's reasons folded into `verdict` (a plugin with no
|
|
51
|
+
* note input gets none, so its `/2` verdict is its `/1` verdict); every `/1` field is unchanged, so
|
|
52
|
+
* a `/1` reader of `verdict.rating` and `verdict.rtSafe` reads a `/2` document right.
|
|
53
|
+
*/
|
|
54
|
+
export declare const RT_SAFETY_DOCUMENT_SCHEMA = "plugin-qualify.rt-safety/2";
|
|
43
55
|
/**
|
|
44
56
|
* The RT-safety verdict of one plugin binary for one console: keyed by the binary's SHA-256 and
|
|
45
57
|
* the host profile id, so a verdict never outlives the bytes it was measured on. `measured` is what
|
|
@@ -69,6 +81,7 @@ export interface RtSafetyDocument {
|
|
|
69
81
|
readonly hostExtensions: readonly string[];
|
|
70
82
|
readonly clap: ClapProbedFacts;
|
|
71
83
|
readonly rtSafety: ClapRtSafetyReading;
|
|
84
|
+
readonly noteSweep: ClapNoteSweepReading;
|
|
72
85
|
readonly integrity: IntegrityMeasurement;
|
|
73
86
|
};
|
|
74
87
|
}
|
|
@@ -101,6 +114,8 @@ export interface ClapQualifyOptions {
|
|
|
101
114
|
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
102
115
|
/** Whether a file exists; the default asks the filesystem. */
|
|
103
116
|
readonly exists?: (path: string) => boolean;
|
|
117
|
+
/** The host extensions the prober offers beyond the console's, each one of {@link OMX_CLAP_HOST_CONFIGURED_EXTENSIONS}. */
|
|
118
|
+
readonly offer?: readonly string[];
|
|
104
119
|
}
|
|
105
120
|
/**
|
|
106
121
|
* The prober and the interposer this run uses: each its setting, else both from one place, the
|
|
@@ -128,9 +143,17 @@ export interface ClapQualifyPass {
|
|
|
128
143
|
}[];
|
|
129
144
|
}
|
|
130
145
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
146
|
+
* What the prober must offer beyond the console's extensions to measure for `profile`: the extra
|
|
147
|
+
* extensions of its list, when the prober can offer each and the list holds the console's; `undefined`
|
|
148
|
+
* for a profile the prober cannot stand in for (no CLAP path, or an extension it cannot offer), which
|
|
149
|
+
* is judged from the console's run and reads `unknown` there.
|
|
150
|
+
*/
|
|
151
|
+
export declare function proberOffer(profile: HostProfile): readonly string[] | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Qualify every CLAP target, one prober run per target and set of offered extensions (a crash takes
|
|
154
|
+
* only that plugin), and judge each line under every host profile, from the run that offered that
|
|
155
|
+
* profile's extensions. A target without a binary path (a bare `urn:clap:` id) has nothing to load
|
|
156
|
+
* and is a failure, never a pass.
|
|
134
157
|
*/
|
|
135
158
|
export declare function qualifyClapTargets(targets: readonly PluginTarget[], options: ClapQualifyOptions & {
|
|
136
159
|
readonly profiles?: readonly HostProfile[];
|