@fnndsc/brasa 0.56.4 → 0.57.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.
- package/dist/buildinfo.json +1 -1
- package/dist/builtins/argumentTokens.d.ts +13 -0
- package/dist/builtins/argumentTokens.js +15 -3
- package/dist/builtins/argumentTokens.js.map +1 -1
- package/dist/builtins/fs/url.d.ts +27 -2
- package/dist/builtins/fs/url.js +60 -10
- package/dist/builtins/fs/url.js.map +1 -1
- package/dist/builtins/help.d.ts +6 -10
- package/dist/builtins/help.js +34 -87
- package/dist/builtins/help.js.map +1 -1
- package/dist/builtins/pluginExecute.d.ts +21 -3
- package/dist/builtins/pluginExecute.js +69 -33
- package/dist/builtins/pluginExecute.js.map +1 -1
- package/dist/builtins/res/pipeline.d.ts +231 -2
- package/dist/builtins/res/pipeline.js +225 -107
- package/dist/builtins/res/pipeline.js.map +1 -1
- package/dist/builtins/res/plugin.d.ts +343 -3
- package/dist/builtins/res/plugin.js +221 -67
- package/dist/builtins/res/plugin.js.map +1 -1
- package/dist/builtins/res/plugin.sync.js +5 -3
- package/dist/builtins/res/plugin.sync.js.map +1 -1
- package/dist/chris/binDeclarations.d.ts +312 -0
- package/dist/chris/binDeclarations.js +572 -0
- package/dist/chris/binDeclarations.js.map +1 -0
- package/dist/chris/chrisCommands.d.ts +1 -0
- package/dist/chris/chrisCommands.js +5 -30
- package/dist/chris/chrisCommands.js.map +1 -1
- package/dist/chris/commandFallback.d.ts +30 -3
- package/dist/chris/commandFallback.js +163 -94
- package/dist/chris/commandFallback.js.map +1 -1
- package/dist/chris/completion.d.ts +37 -0
- package/dist/chris/completion.js +41 -121
- package/dist/chris/completion.js.map +1 -1
- package/dist/chris/kinds.d.ts +11 -0
- package/dist/chris/kinds.js +32 -1
- package/dist/chris/kinds.js.map +1 -1
- package/dist/core/argumentKinds.d.ts +18 -0
- package/dist/core/argumentKinds.js +33 -0
- package/dist/core/argumentKinds.js.map +1 -1
- package/dist/core/backend.d.ts +12 -5
- package/dist/core/backend.js.map +1 -1
- package/dist/core/commandDeclaration.d.ts +40 -0
- package/dist/core/commandDeclaration.js.map +1 -1
- package/dist/core/commandOrder.js +3 -3
- package/dist/core/commandOrder.js.map +1 -1
- package/dist/core/commandParse.d.ts +14 -0
- package/dist/core/commandParse.js +39 -5
- package/dist/core/commandParse.js.map +1 -1
- package/dist/core/commandRegistry.d.ts +22 -36
- package/dist/core/commandRegistry.js +19 -10
- package/dist/core/commandRegistry.js.map +1 -1
- package/dist/core/commandSchema.js +4 -0
- package/dist/core/commandSchema.js.map +1 -1
- package/dist/core/coreCommands.d.ts +1 -0
- package/dist/core/coreCommands.js +6 -19
- package/dist/core/coreCommands.js.map +1 -1
- package/dist/core/dispatch.js +12 -41
- package/dist/core/dispatch.js.map +1 -1
- package/dist/core/preprocess.d.ts +0 -15
- package/dist/core/preprocess.js +0 -17
- package/dist/core/preprocess.js.map +1 -1
- package/dist/core/shellWords.d.ts +34 -0
- package/dist/core/shellWords.js +60 -0
- package/dist/core/shellWords.js.map +1 -0
- package/dist/core.d.ts +5 -0
- package/dist/core.js +4 -0
- package/dist/core.js.map +1 -1
- package/dist/lib/completer/declared.js +22 -6
- package/dist/lib/completer/declared.js.map +1 -1
- package/dist/lib/completer/index.js +15 -53
- package/dist/lib/completer/index.js.map +1 -1
- package/dist/notes.json +1 -1
- package/package.json +1 -1
- package/dist/builtins/res/pipeline.args.d.ts +0 -35
- package/dist/builtins/res/pipeline.args.js +0 -94
- package/dist/builtins/res/pipeline.args.js.map +0 -1
- package/dist/chris/help.d.ts +0 -18
- package/dist/chris/help.js +0 -229
- package/dist/chris/help.js.map +0 -1
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
import { commandLine_parse, lineWords_read } from '../core/commandParse.js';
|
|
2
|
+
/** The operand every `/bin` line takes: its input. */
|
|
3
|
+
const INPUT_OPERAND = {
|
|
4
|
+
name: 'input',
|
|
5
|
+
kind: 'cfsPath',
|
|
6
|
+
optional: true,
|
|
7
|
+
repeat: true,
|
|
8
|
+
glob: true,
|
|
9
|
+
summary: 'The input: a directory (several: one run each), or files, `as <subject>` naming the files before it; none, where you stand',
|
|
10
|
+
};
|
|
11
|
+
/** The session's own options of a plugin line: they win a name a parameter also claims. */
|
|
12
|
+
const PLUGIN_SESSION_OPTIONS = {
|
|
13
|
+
detach: { long: 'detach', summary: 'Return the run at once, without waiting for it to settle' },
|
|
14
|
+
parameters: { long: 'parameters', summary: 'Show the parameters this version declares, and run nothing' },
|
|
15
|
+
readme: { long: 'readme', summary: "Show the plugin's README, and run nothing" },
|
|
16
|
+
raw: { long: 'raw', summary: 'With --readme, the README as markdown, for a pipe' },
|
|
17
|
+
help: { short: 'h', long: 'help', summary: 'Show this page' },
|
|
18
|
+
};
|
|
19
|
+
/** The session's own options of a pipeline line. */
|
|
20
|
+
const PIPELINE_SESSION_OPTIONS = {
|
|
21
|
+
diagram: { long: 'diagram', summary: "Draw the pipeline's shallow topology, and run nothing" },
|
|
22
|
+
withargs: { long: 'withargs', summary: "With --diagram, each node's stored arguments inline" },
|
|
23
|
+
signalflow: { long: 'signalflow', summary: 'Emit SignalFlow YAML, and run nothing' },
|
|
24
|
+
manifest: { long: 'manifest', summary: 'Emit the complete registered invocation YAML, and run nothing' },
|
|
25
|
+
nodes: { long: 'nodes', summary: 'Show the nodes and their parameters, and run nothing' },
|
|
26
|
+
parameters: { long: 'parameters', summary: 'As --nodes' },
|
|
27
|
+
source: { long: 'source', summary: 'Show the pipeline YAML source, and run nothing' },
|
|
28
|
+
readme: { long: 'readme', summary: 'As --source' },
|
|
29
|
+
compute: { long: 'compute', summary: 'Run every node on this compute resource', value: { name: 'resource', kind: 'compute' } },
|
|
30
|
+
previous: { long: 'previous', summary: 'Attach to this plugin instance instead of the operand or where you stand', value: { name: 'instance', kind: 'int', min: 1 } },
|
|
31
|
+
paramFile: { long: 'paramFile', summary: 'Apply one sparse YAML invocation overlay, a CFS file', value: { name: 'file', kind: 'cfsPath' } },
|
|
32
|
+
detach: { long: 'detach', summary: 'Return the run at once, without waiting for it to settle' },
|
|
33
|
+
verbose: { long: 'verbose', summary: 'Echo every parameter of every piping before the run' },
|
|
34
|
+
help: { short: 'h', long: 'help', summary: 'Show this page' },
|
|
35
|
+
};
|
|
36
|
+
/** The execution controls every pipeline node takes, and the kind of each. */
|
|
37
|
+
const EXECUTION_FIELDS = [
|
|
38
|
+
['compute_resource_name', 'compute'], ['cpu_limit', 'word'], ['memory_limit', 'word'], ['gpu_limit', 'int'], ['number_of_workers', 'int'],
|
|
39
|
+
];
|
|
40
|
+
/** A node title usable as a selector: one shell word, no dot. */
|
|
41
|
+
const SELECTOR_WORD = /^[A-Za-z0-9_-]+$/;
|
|
42
|
+
/**
|
|
43
|
+
* The value a CUBE parameter type takes, or none for a switch.
|
|
44
|
+
*
|
|
45
|
+
* @param type - The type as CUBE serves it.
|
|
46
|
+
* @param name - The word usage shows for the value.
|
|
47
|
+
* @returns The value's grammar, or undefined for `bool`.
|
|
48
|
+
*/
|
|
49
|
+
function parameterValue_make(type, name) {
|
|
50
|
+
switch (type) {
|
|
51
|
+
case 'bool':
|
|
52
|
+
case 'boolean': return undefined;
|
|
53
|
+
case 'int':
|
|
54
|
+
case 'integer': return { name, kind: 'int' };
|
|
55
|
+
case 'float':
|
|
56
|
+
case 'number': return { name, kind: 'number' };
|
|
57
|
+
case 'path':
|
|
58
|
+
case 'unextpath': return { name, kind: 'cfsPath' };
|
|
59
|
+
default: return { name, kind: 'word' };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A parameter's summary: its help, its default, and whether it is required.
|
|
64
|
+
*
|
|
65
|
+
* @param parameter - The parameter.
|
|
66
|
+
* @returns The line.
|
|
67
|
+
*/
|
|
68
|
+
function parameterSummary_make(parameter) {
|
|
69
|
+
const shown = parameter.default === undefined || parameter.default === null || parameter.default === '' ? '' : ` (default ${String(parameter.default)})`;
|
|
70
|
+
return `${parameter.help ?? parameter.name}${shown}${parameter.optional ? '' : ' (required)'}`;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The long name a parameter's flag gives, without the dashes: `--dir` is
|
|
74
|
+
* `dir`; a flag of one dash and one letter has none.
|
|
75
|
+
*
|
|
76
|
+
* @param parameter - The parameter.
|
|
77
|
+
* @returns The long name, or undefined.
|
|
78
|
+
*/
|
|
79
|
+
function parameterLong_read(parameter) {
|
|
80
|
+
if (parameter.flag.startsWith('--') && parameter.flag.length > 2)
|
|
81
|
+
return parameter.flag.slice(2);
|
|
82
|
+
if (/^-[A-Za-z0-9]$/.test(parameter.flag))
|
|
83
|
+
return undefined;
|
|
84
|
+
return parameter.flag === '' ? parameter.name : parameter.flag.replace(/^-+/, '');
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The one-letter name a parameter answers to, without the dash.
|
|
88
|
+
*
|
|
89
|
+
* @param parameter - The parameter.
|
|
90
|
+
* @returns The letter, or undefined.
|
|
91
|
+
*/
|
|
92
|
+
function parameterShort_read(parameter) {
|
|
93
|
+
for (const flag of [parameter.shortFlag, parameter.flag]) {
|
|
94
|
+
if (flag !== undefined && /^-[A-Za-z0-9]$/.test(flag))
|
|
95
|
+
return flag.slice(1);
|
|
96
|
+
}
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The options of a plugin's line: the session's, then one per parameter
|
|
101
|
+
* whose names the session's options leave free, by its flag's long name.
|
|
102
|
+
*
|
|
103
|
+
* @param parameters - The plugin's parameters.
|
|
104
|
+
* @returns The options, by property.
|
|
105
|
+
*/
|
|
106
|
+
function pluginOptions_make(parameters) {
|
|
107
|
+
const options = { ...PLUGIN_SESSION_OPTIONS };
|
|
108
|
+
const longs = new Set(Object.values(options).flatMap((option) => (option.long === undefined ? [] : [option.long])));
|
|
109
|
+
const shorts = new Set(Object.values(options).flatMap((option) => (option.short === undefined ? [] : [option.short])));
|
|
110
|
+
for (const parameter of parameters) {
|
|
111
|
+
const long = parameterLong_read(parameter);
|
|
112
|
+
const short = parameterShort_read(parameter);
|
|
113
|
+
const key = long ?? parameter.name;
|
|
114
|
+
if ((long !== undefined && longs.has(long)) || Object.hasOwn(options, key))
|
|
115
|
+
continue;
|
|
116
|
+
const usableShort = short !== undefined && !shorts.has(short) ? short : undefined;
|
|
117
|
+
if (long === undefined && usableShort === undefined)
|
|
118
|
+
continue;
|
|
119
|
+
const value = parameterValue_make(parameter.type, parameter.name);
|
|
120
|
+
options[key] = {
|
|
121
|
+
...(usableShort !== undefined ? { short: usableShort } : {}),
|
|
122
|
+
...(long !== undefined ? { long } : {}),
|
|
123
|
+
summary: parameterSummary_make(parameter),
|
|
124
|
+
...(value !== undefined ? { value } : {}),
|
|
125
|
+
};
|
|
126
|
+
if (long !== undefined)
|
|
127
|
+
longs.add(long);
|
|
128
|
+
if (usableShort !== undefined)
|
|
129
|
+
shorts.add(usableShort);
|
|
130
|
+
}
|
|
131
|
+
return options;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* A plugin version's declaration, made from what CUBE declares of it: its
|
|
135
|
+
* `/bin` entry's name, its input operand, the session's options and one per
|
|
136
|
+
* parameter, and help from its title and description.
|
|
137
|
+
*
|
|
138
|
+
* @param spec - The plugin version.
|
|
139
|
+
* @param handler - What runs a parsed line (the run, or a test's stand-in).
|
|
140
|
+
* @returns The declaration.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```ts
|
|
144
|
+
* const declaration = pluginDeclaration_make({ name: 'pl-dircopy', version: '2.1.1', kind: 'fs', parameters: [{ name: 'dir', type: 'path', optional: false, flag: '--dir' }] }, run);
|
|
145
|
+
* declaration.grammar.options?.['dir']?.value?.kind; // 'cfsPath'
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
export function pluginDeclaration_make(spec, handler) {
|
|
149
|
+
const name = `${spec.name}-v${spec.version}`;
|
|
150
|
+
const fs = spec.kind === 'fs' ? ' To an fs plugin every operand is its dir, untranslated.' : '';
|
|
151
|
+
return {
|
|
152
|
+
name,
|
|
153
|
+
grammar: { operands: [INPUT_OPERAND], options: pluginOptions_make(spec.parameters) },
|
|
154
|
+
help: {
|
|
155
|
+
summary: spec.title ?? `The CUBE plugin ${spec.name}, version ${spec.version}`,
|
|
156
|
+
description: `${spec.description ?? `Run ${spec.name} ${spec.version}, a CUBE ${spec.kind} plugin.`} A run stands where you are, or on its operands, first on the line: a directory is the input (in a feed, that node; outside one, pl-dircopy roots a new feed of it), several directories are one run each, and files are shaped into subjects, each file its own named by its stem or the files before \`as <name>\` one.${fs} After a lone --, key=value words set the run's context (feed_title). help operands gives the full rules; whatif <line> prints a run and starts nothing.`,
|
|
157
|
+
category: 'Resources',
|
|
158
|
+
examples: [`${name} ~/uploads/subjects`, `${name} ~/uploads/t1.nii as sub-01`, `${name} --parameters`, `${name} --readme --raw | glow -`, `${name} -- feed_title="Brain MRI"`],
|
|
159
|
+
},
|
|
160
|
+
holds: [],
|
|
161
|
+
handler,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* The node selectors of a pipeline: each node's title when that is unique
|
|
166
|
+
* and one shell word, and always `@<piping id>`.
|
|
167
|
+
*
|
|
168
|
+
* @param manifest - The pipeline's manifest.
|
|
169
|
+
* @param node - One node.
|
|
170
|
+
* @returns Its selectors.
|
|
171
|
+
*/
|
|
172
|
+
function nodeSelectors_list(manifest, node) {
|
|
173
|
+
const unique = SELECTOR_WORD.test(node.title) && manifest.nodes.filter((other) => other.title === node.title).length === 1;
|
|
174
|
+
return unique ? [node.title, `@${node.pipingID}`] : [`@${node.pipingID}`];
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The fields a pipeline node takes: its execution controls, then its
|
|
178
|
+
* plugin's parameters (but `plugininstances`, the edges CUBE draws itself).
|
|
179
|
+
*
|
|
180
|
+
* @param node - The node.
|
|
181
|
+
* @returns Each field's name, kind and summary.
|
|
182
|
+
*/
|
|
183
|
+
function nodeFields_list(node) {
|
|
184
|
+
const controls = EXECUTION_FIELDS.map(([field, kind]) => ({
|
|
185
|
+
name: field,
|
|
186
|
+
value: { name: field, kind },
|
|
187
|
+
summary: `${node.title} (${node.pluginName}): its ${field.replaceAll('_', ' ')}`,
|
|
188
|
+
}));
|
|
189
|
+
const parameters = (node.parameterDefinitions ?? [])
|
|
190
|
+
.filter((parameter) => parameter.name !== 'plugininstances')
|
|
191
|
+
.map((parameter) => ({
|
|
192
|
+
name: parameter.name,
|
|
193
|
+
value: parameterValue_make(parameter.type, parameter.name),
|
|
194
|
+
summary: `${node.title} (${node.pluginName}): ${parameter.help ?? parameter.name}`,
|
|
195
|
+
}));
|
|
196
|
+
return [...controls, ...parameters];
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* A pipeline's declaration, made from its manifest: its `/bin` entry's
|
|
200
|
+
* name, its input operand, the session's options and one `--<node>.<field>`
|
|
201
|
+
* option for every field of every node.
|
|
202
|
+
*
|
|
203
|
+
* @param binName - The pipeline's `/bin` name (`PHI_detection_id12`).
|
|
204
|
+
* @param manifest - Its manifest, with the nodes' parameter definitions.
|
|
205
|
+
* @param handler - What runs a parsed line.
|
|
206
|
+
* @returns The declaration.
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* ```ts
|
|
210
|
+
* const declaration = pipelineDeclaration_make('PHI_id3', manifest, run);
|
|
211
|
+
* Object.keys(declaration.grammar.options ?? {}); // ['diagram', …, 'segment.threshold', '@41.threshold', …]
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
export function pipelineDeclaration_make(binName, manifest, handler) {
|
|
215
|
+
const options = { ...PIPELINE_SESSION_OPTIONS };
|
|
216
|
+
for (const node of manifest.nodes) {
|
|
217
|
+
for (const field of nodeFields_list(node)) {
|
|
218
|
+
for (const selector of nodeSelectors_list(manifest, node)) {
|
|
219
|
+
const key = `${selector}.${field.name}`;
|
|
220
|
+
if (Object.hasOwn(options, key))
|
|
221
|
+
continue;
|
|
222
|
+
options[key] = { long: key, summary: field.summary, ...(field.value !== undefined ? { value: field.value } : {}) };
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return {
|
|
227
|
+
name: binName,
|
|
228
|
+
grammar: { operands: [INPUT_OPERAND], options },
|
|
229
|
+
help: {
|
|
230
|
+
summary: `The CUBE pipeline ${manifest.name}`,
|
|
231
|
+
description: `Run the pipeline ${manifest.name} (${manifest.nodes.length} node${manifest.nodes.length === 1 ? '' : 's'}) from the feed node you are in, or on its operands (a directory in a feed is that node; outside one, pl-dircopy roots a new feed of it; several directories are one run each), or look at it. --<node>.<field> overrides one field of one node, the node named by its title or @<piping id>. help operands gives the full rules; whatif <line> prints a run and starts nothing.`,
|
|
232
|
+
category: 'Resources',
|
|
233
|
+
examples: [`${binName} --diagram`, `${binName} --diagram --withargs`, `${binName} --signalflow | signalflow -`, `${binName} --manifest`, `${binName} --previous 123`, `${binName} ~/uploads/subjects`],
|
|
234
|
+
},
|
|
235
|
+
holds: [],
|
|
236
|
+
handler,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Splits a plugin line at its first lone `--`: the plugin's words before,
|
|
241
|
+
* the run's context after.
|
|
242
|
+
*
|
|
243
|
+
* @param words - The line's words.
|
|
244
|
+
* @returns The two parts.
|
|
245
|
+
*/
|
|
246
|
+
function contextWords_split(words) {
|
|
247
|
+
const at = words.findIndex((word) => word.value === '--');
|
|
248
|
+
if (at === -1)
|
|
249
|
+
return { line: [...words], context: [] };
|
|
250
|
+
return { line: words.slice(0, at), context: words.slice(at + 1).map((word) => word.value) };
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* A parsed line's operands and options, as records by name.
|
|
254
|
+
*
|
|
255
|
+
* @param args - The parsed line.
|
|
256
|
+
* @returns Its operands and options.
|
|
257
|
+
*/
|
|
258
|
+
function lineRecords_read(args) {
|
|
259
|
+
return { operands: { ...args.operands }, options: { ...args.options } };
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* The plugin's parameters a parsed line gave: every option but the
|
|
263
|
+
* session's, by its property, a switch only when set.
|
|
264
|
+
*
|
|
265
|
+
* @param options - The parsed options.
|
|
266
|
+
* @returns The parameters.
|
|
267
|
+
*/
|
|
268
|
+
function pluginParameters_read(options) {
|
|
269
|
+
const parameters = {};
|
|
270
|
+
for (const [key, value] of Object.entries(options)) {
|
|
271
|
+
if (Object.hasOwn(PLUGIN_SESSION_OPTIONS, key))
|
|
272
|
+
continue;
|
|
273
|
+
if (value === false || value === undefined)
|
|
274
|
+
continue;
|
|
275
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean')
|
|
276
|
+
parameters[key] = value;
|
|
277
|
+
}
|
|
278
|
+
return parameters;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* A plugin line, parsed: the typed reading of the line a declaration parsed.
|
|
282
|
+
*
|
|
283
|
+
* @param args - The parsed line.
|
|
284
|
+
* @param context - The run's context words.
|
|
285
|
+
* @returns The plugin line.
|
|
286
|
+
*
|
|
287
|
+
* @example
|
|
288
|
+
* ```ts
|
|
289
|
+
* pluginLine_read(parsed.args, ['feed_title=T']).parameters; // { dir: '/home/a/uploads' }
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
export function pluginLine_read(args, context = []) {
|
|
293
|
+
const { operands, options } = lineRecords_read(args);
|
|
294
|
+
const inspect = options['readme'] === true ? (options['raw'] === true ? 'readmeRaw' : 'readme') : options['parameters'] === true ? 'parameters' : null;
|
|
295
|
+
return {
|
|
296
|
+
operands: operands['input'] ?? [],
|
|
297
|
+
parameters: pluginParameters_read(options),
|
|
298
|
+
context: [...context],
|
|
299
|
+
detach: options['detach'] === true,
|
|
300
|
+
inspect,
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Parses a plugin's line against a declaration: the context split off at
|
|
305
|
+
* the first lone `--`, the rest parsed as a builtin's line is.
|
|
306
|
+
*
|
|
307
|
+
* @param declaration - The plugin's declaration.
|
|
308
|
+
* @param args - The words after the `/bin` name, carrying their shell words when a line gave them.
|
|
309
|
+
* @returns The plugin line, or the refusal (`pl-dircopy-v2.1.1: unrecognized option '--x'; usage: …`).
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* ```ts
|
|
313
|
+
* const parsed: PluginLineParse = await pluginWords_parse(declaration, ['~/uploads', '--', 'feed_title=T']);
|
|
314
|
+
* ```
|
|
315
|
+
*/
|
|
316
|
+
export async function pluginWords_parse(declaration, args) {
|
|
317
|
+
const { line, context } = contextWords_split(lineWords_read(args));
|
|
318
|
+
const parsed = await commandLine_parse(declaration, line);
|
|
319
|
+
if (!parsed.ok)
|
|
320
|
+
return parsed;
|
|
321
|
+
return { ok: true, line: pluginLine_read(parsed.args, context) };
|
|
322
|
+
}
|
|
323
|
+
/** The look a pipeline line asks for, by its options, in the order they win. */
|
|
324
|
+
const PIPELINE_LOOKS = [
|
|
325
|
+
['help', 'help'], ['diagram', 'diagram'], ['signalflow', 'signalflow'], ['manifest', 'manifest'],
|
|
326
|
+
['nodes', 'nodes'], ['parameters', 'nodes'], ['source', 'source'], ['readme', 'source'],
|
|
327
|
+
];
|
|
328
|
+
/**
|
|
329
|
+
* A pipeline line, parsed: the look it asks for or the run's options and
|
|
330
|
+
* node overrides.
|
|
331
|
+
*
|
|
332
|
+
* @param args - The parsed line.
|
|
333
|
+
* @returns The pipeline line.
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```ts
|
|
337
|
+
* pipelineLine_read(parsed.args).bindings; // [{ node: 'segment', field: 'threshold', value: 0.5 }]
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
export function pipelineLine_read(args) {
|
|
341
|
+
const { operands, options } = lineRecords_read(args);
|
|
342
|
+
const look = PIPELINE_LOOKS.find(([key]) => options[key] === true)?.[1] ?? null;
|
|
343
|
+
const bindings = [];
|
|
344
|
+
for (const [key, value] of Object.entries(options)) {
|
|
345
|
+
if (Object.hasOwn(PIPELINE_SESSION_OPTIONS, key) || value === false || value === undefined)
|
|
346
|
+
continue;
|
|
347
|
+
const dot = key.lastIndexOf('.');
|
|
348
|
+
if (dot <= 0)
|
|
349
|
+
continue;
|
|
350
|
+
bindings.push({ node: key.slice(0, dot), field: key.slice(dot + 1), value });
|
|
351
|
+
}
|
|
352
|
+
return {
|
|
353
|
+
operands: operands['input'] ?? [],
|
|
354
|
+
look,
|
|
355
|
+
withArguments: options['withargs'] === true,
|
|
356
|
+
signalflow: options['signalflow'] === true,
|
|
357
|
+
...(typeof options['compute'] === 'string' ? { compute: options['compute'] } : {}),
|
|
358
|
+
...(typeof options['previous'] === 'number' ? { previous: options['previous'] } : {}),
|
|
359
|
+
...(typeof options['paramFile'] === 'string' ? { paramFile: options['paramFile'] } : {}),
|
|
360
|
+
bindings,
|
|
361
|
+
detach: options['detach'] === true,
|
|
362
|
+
verbose: options['verbose'] === true,
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Parses a pipeline's line against a declaration.
|
|
367
|
+
*
|
|
368
|
+
* @param declaration - The pipeline's declaration.
|
|
369
|
+
* @param args - The words after the `/bin` name.
|
|
370
|
+
* @returns The pipeline line, or the refusal.
|
|
371
|
+
*
|
|
372
|
+
* @example
|
|
373
|
+
* ```ts
|
|
374
|
+
* const parsed: PipelineLineParse = await pipelineWords_parse(declaration, ['--segment.threshold', '0.5']);
|
|
375
|
+
* ```
|
|
376
|
+
*/
|
|
377
|
+
export async function pipelineWords_parse(declaration, args) {
|
|
378
|
+
const parsed = await commandLine_parse(declaration, lineWords_read(args));
|
|
379
|
+
if (!parsed.ok)
|
|
380
|
+
return parsed;
|
|
381
|
+
return { ok: true, line: pipelineLine_read(parsed.args) };
|
|
382
|
+
}
|
|
383
|
+
/** The declarations made, by the `/bin` entry each is for (`plugin:pl-dircopy-v2.1.1`, `pipeline:PHI_id12`). */
|
|
384
|
+
const declarations = new Map();
|
|
385
|
+
/**
|
|
386
|
+
* Forgets every declaration made, so the next is read from CUBE again.
|
|
387
|
+
*
|
|
388
|
+
* @example
|
|
389
|
+
* ```ts
|
|
390
|
+
* binDeclarations_forget();
|
|
391
|
+
* ```
|
|
392
|
+
*/
|
|
393
|
+
export function binDeclarations_forget() {
|
|
394
|
+
declarations.clear();
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* The `/bin` entry a word names: a plugin by its full `/bin` name, a
|
|
398
|
+
* pipeline by its `/bin` name or its own, or a bare plugin name's highest
|
|
399
|
+
* version.
|
|
400
|
+
*
|
|
401
|
+
* @param command - The word.
|
|
402
|
+
* @returns The entry, or null when `/bin` names none.
|
|
403
|
+
*
|
|
404
|
+
* @example
|
|
405
|
+
* ```ts
|
|
406
|
+
* await binEntry_resolve('pl-dircopy'); // { kind: 'plugin', executable: 'pl-dircopy-v2.1.1' }
|
|
407
|
+
* ```
|
|
408
|
+
*/
|
|
409
|
+
export async function binEntry_resolve(command) {
|
|
410
|
+
const { binExecutableMatches_get, binPluginHighest_find } = await import('./binExecutables.js');
|
|
411
|
+
const matches = await binExecutableMatches_get(command);
|
|
412
|
+
if (matches.plugin !== undefined)
|
|
413
|
+
return { kind: 'plugin', executable: matches.plugin.name };
|
|
414
|
+
if (matches.pipeline !== undefined)
|
|
415
|
+
return { kind: 'pipeline', name: matches.pipeline.name };
|
|
416
|
+
const highest = await binPluginHighest_find(command);
|
|
417
|
+
return highest === null ? null : { kind: 'plugin', executable: highest.executable };
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Reads one plugin version from CUBE: its kind, title and every parameter.
|
|
421
|
+
*
|
|
422
|
+
* @param executable - Its `/bin` name, `<name>-v<version>`.
|
|
423
|
+
* @returns The plugin, or null when CUBE cannot say.
|
|
424
|
+
*/
|
|
425
|
+
async function pluginSpec_read(executable) {
|
|
426
|
+
const { pluginSpecifier_parse } = await import('../builtins/res/plugin.info.js');
|
|
427
|
+
const specifier = pluginSpecifier_parse(executable);
|
|
428
|
+
if (specifier === null)
|
|
429
|
+
return null;
|
|
430
|
+
const { session } = await import('../session/index.js');
|
|
431
|
+
const { plugin_find, pluginParameters_drain } = await import('@fnndsc/cumin');
|
|
432
|
+
const client = await session.connection.client_get();
|
|
433
|
+
if (client === null)
|
|
434
|
+
return null;
|
|
435
|
+
const found = await plugin_find(client, specifier.name, specifier.version);
|
|
436
|
+
if (found === null)
|
|
437
|
+
return null;
|
|
438
|
+
const rows = await pluginParameters_drain(found.handle);
|
|
439
|
+
const text = (value) => (typeof value === 'string' && value !== '' ? value : undefined);
|
|
440
|
+
const title = text(found.data.title);
|
|
441
|
+
const description = text(found.data.description);
|
|
442
|
+
return {
|
|
443
|
+
name: found.data.name ?? specifier.name,
|
|
444
|
+
version: found.data.version ?? specifier.version,
|
|
445
|
+
kind: found.data.type ?? 'ds',
|
|
446
|
+
...(title !== undefined ? { title } : {}),
|
|
447
|
+
...(description !== undefined ? { description } : {}),
|
|
448
|
+
parameters: rows.map((row) => {
|
|
449
|
+
const help = text(row.help);
|
|
450
|
+
const shortFlag = text(row['short_flag']);
|
|
451
|
+
return {
|
|
452
|
+
name: row.name,
|
|
453
|
+
type: row.type ?? 'str',
|
|
454
|
+
optional: row.optional ?? false,
|
|
455
|
+
...(row.default === undefined ? {} : { default: row.default }),
|
|
456
|
+
...(help !== undefined ? { help } : {}),
|
|
457
|
+
flag: text(row['flag']) ?? `--${row.name}`,
|
|
458
|
+
...(shortFlag !== undefined ? { shortFlag } : {}),
|
|
459
|
+
};
|
|
460
|
+
}),
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Makes (or finds kept) the declaration of one `/bin` entry.
|
|
465
|
+
*
|
|
466
|
+
* @param entry - The entry.
|
|
467
|
+
* @returns The declaration, or null when CUBE cannot say what the entry takes.
|
|
468
|
+
*/
|
|
469
|
+
async function entryDeclaration_get(entry) {
|
|
470
|
+
const key = entry.kind === 'plugin' ? `plugin:${entry.executable}` : `pipeline:${entry.name}`;
|
|
471
|
+
const kept = declarations.get(key);
|
|
472
|
+
if (kept !== undefined)
|
|
473
|
+
return kept;
|
|
474
|
+
const { errorStack } = await import('@fnndsc/fond');
|
|
475
|
+
// A declaration that cannot be read says nothing here: the line that needs it says why.
|
|
476
|
+
const checkpoint = errorStack.checkpoint_mark();
|
|
477
|
+
let made = null;
|
|
478
|
+
try {
|
|
479
|
+
// The run is loaded when a line runs, never when a declaration is made for completion or help.
|
|
480
|
+
if (entry.kind === 'plugin') {
|
|
481
|
+
const spec = await pluginSpec_read(entry.executable);
|
|
482
|
+
if (spec !== null) {
|
|
483
|
+
made = pluginDeclaration_make(spec, async (args) => {
|
|
484
|
+
const { pluginParsed_run } = await import('../builtins/pluginExecute.js');
|
|
485
|
+
return pluginParsed_run(entry.executable, pluginLine_read(args));
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
const { pipelineManifest_get } = await import('@fnndsc/salsa');
|
|
491
|
+
const manifest = await pipelineManifest_get(entry.name);
|
|
492
|
+
if (manifest.ok) {
|
|
493
|
+
made = pipelineDeclaration_make(entry.name, manifest.value, async (args) => {
|
|
494
|
+
const { pipelineParsed_run } = await import('./commandFallback.js');
|
|
495
|
+
return pipelineParsed_run(entry.name, pipelineLine_read(args));
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
catch {
|
|
501
|
+
made = null;
|
|
502
|
+
}
|
|
503
|
+
errorStack.checkpoint_drain(checkpoint);
|
|
504
|
+
if (made !== null)
|
|
505
|
+
declarations.set(key, made);
|
|
506
|
+
return made;
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* The declaration of a word `/bin` answers, made from CUBE the first time
|
|
510
|
+
* and kept by its entry: what completion, help and the schema read of a
|
|
511
|
+
* plugin or a pipeline, and what its line is parsed against.
|
|
512
|
+
*
|
|
513
|
+
* @param command - The word: a plugin's `/bin` name or bare name, or a pipeline's.
|
|
514
|
+
* @returns The declaration, or null when the word names nothing in `/bin` or CUBE cannot say.
|
|
515
|
+
*
|
|
516
|
+
* @example
|
|
517
|
+
* ```ts
|
|
518
|
+
* (await binDeclaration_get('pl-dircopy'))?.name; // 'pl-dircopy-v2.1.1'
|
|
519
|
+
* ```
|
|
520
|
+
*/
|
|
521
|
+
export async function binDeclaration_get(command) {
|
|
522
|
+
const entry = await binEntry_resolve(command);
|
|
523
|
+
return entry === null ? null : entryDeclaration_get(entry);
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* The declaration of one plugin version, by its full `/bin` name.
|
|
527
|
+
*
|
|
528
|
+
* @param executable - `<name>-v<version>`.
|
|
529
|
+
* @returns The declaration, or null when CUBE cannot say.
|
|
530
|
+
*
|
|
531
|
+
* @example
|
|
532
|
+
* ```ts
|
|
533
|
+
* await pluginDeclaration_get('pl-dircopy-v2.1.1');
|
|
534
|
+
* ```
|
|
535
|
+
*/
|
|
536
|
+
export async function pluginDeclaration_get(executable) {
|
|
537
|
+
return entryDeclaration_get({ kind: 'plugin', executable });
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* The declaration of one pipeline, by its `/bin` name.
|
|
541
|
+
*
|
|
542
|
+
* @param name - The pipeline's `/bin` name.
|
|
543
|
+
* @returns The declaration, or null when CUBE cannot say.
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* ```ts
|
|
547
|
+
* await pipelineDeclaration_get('PHI_detection_id12');
|
|
548
|
+
* ```
|
|
549
|
+
*/
|
|
550
|
+
export async function pipelineDeclaration_get(name) {
|
|
551
|
+
return entryDeclaration_get({ kind: 'pipeline', name });
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* The fields `--<node>.<field>` names for a pipeline, for `pipeline run`'s
|
|
555
|
+
* completion: every option of its declaration that overrides a node.
|
|
556
|
+
*
|
|
557
|
+
* @param pipeline - The pipeline as the line names it.
|
|
558
|
+
* @returns The names, without the dashes; none when the pipeline cannot be read.
|
|
559
|
+
*
|
|
560
|
+
* @example
|
|
561
|
+
* ```ts
|
|
562
|
+
* await pipelineNodeOptions_list('PHI_detection'); // ['segment.threshold', '@41.threshold', …]
|
|
563
|
+
* ```
|
|
564
|
+
*/
|
|
565
|
+
export async function pipelineNodeOptions_list(pipeline) {
|
|
566
|
+
const entry = await binEntry_resolve(pipeline);
|
|
567
|
+
if (entry === null || entry.kind !== 'pipeline')
|
|
568
|
+
return [];
|
|
569
|
+
const declaration = await entryDeclaration_get(entry);
|
|
570
|
+
return Object.keys(declaration?.grammar.options ?? {}).filter((key) => !Object.hasOwn(PIPELINE_SESSION_OPTIONS, key));
|
|
571
|
+
}
|
|
572
|
+
//# sourceMappingURL=binDeclarations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binDeclarations.js","sourceRoot":"","sources":["../../src/chris/binDeclarations.ts"],"names":[],"mappings":"AAgDA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAwC,MAAM,yBAAyB,CAAC;AAuGlH,sDAAsD;AACtD,MAAM,aAAa,GAAmB;IACpC,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,4HAA4H;CACtI,CAAC;AAEF,2FAA2F;AAC3F,MAAM,sBAAsB,GAA4C;IACtE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,0DAA0D,EAAE;IAC/F,UAAU,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,4DAA4D,EAAE;IACzG,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,2CAA2C,EAAE;IAChF,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,mDAAm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