@fnndsc/brasa 0.56.3 → 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.
Files changed (96) hide show
  1. package/dist/buildinfo.json +1 -1
  2. package/dist/builtins/argumentTokens.d.ts +13 -0
  3. package/dist/builtins/argumentTokens.js +15 -3
  4. package/dist/builtins/argumentTokens.js.map +1 -1
  5. package/dist/builtins/berth/berth.d.ts +11 -0
  6. package/dist/builtins/berth/berth.js +53 -22
  7. package/dist/builtins/berth/berth.js.map +1 -1
  8. package/dist/builtins/berth/berthCube.d.ts +14 -0
  9. package/dist/builtins/berth/berthCube.js +17 -0
  10. package/dist/builtins/berth/berthCube.js.map +1 -1
  11. package/dist/builtins/fs/download.d.ts +12 -1
  12. package/dist/builtins/fs/download.js +24 -4
  13. package/dist/builtins/fs/download.js.map +1 -1
  14. package/dist/builtins/fs/transferJobs.d.ts +64 -0
  15. package/dist/builtins/fs/transferJobs.js +98 -0
  16. package/dist/builtins/fs/transferJobs.js.map +1 -0
  17. package/dist/builtins/fs/upload.d.ts +14 -1
  18. package/dist/builtins/fs/upload.js +22 -5
  19. package/dist/builtins/fs/upload.js.map +1 -1
  20. package/dist/builtins/fs/url.d.ts +27 -2
  21. package/dist/builtins/fs/url.js +60 -10
  22. package/dist/builtins/fs/url.js.map +1 -1
  23. package/dist/builtins/help.d.ts +6 -10
  24. package/dist/builtins/help.js +34 -87
  25. package/dist/builtins/help.js.map +1 -1
  26. package/dist/builtins/helpSections.js +4 -1
  27. package/dist/builtins/helpSections.js.map +1 -1
  28. package/dist/builtins/pluginExecute.d.ts +21 -3
  29. package/dist/builtins/pluginExecute.js +69 -33
  30. package/dist/builtins/pluginExecute.js.map +1 -1
  31. package/dist/builtins/res/pipeline.d.ts +231 -2
  32. package/dist/builtins/res/pipeline.js +225 -107
  33. package/dist/builtins/res/pipeline.js.map +1 -1
  34. package/dist/builtins/res/plugin.d.ts +343 -3
  35. package/dist/builtins/res/plugin.js +221 -67
  36. package/dist/builtins/res/plugin.js.map +1 -1
  37. package/dist/builtins/res/plugin.sync.js +5 -3
  38. package/dist/builtins/res/plugin.sync.js.map +1 -1
  39. package/dist/chris/binDeclarations.d.ts +312 -0
  40. package/dist/chris/binDeclarations.js +572 -0
  41. package/dist/chris/binDeclarations.js.map +1 -0
  42. package/dist/chris/chrisCommands.d.ts +1 -0
  43. package/dist/chris/chrisCommands.js +5 -30
  44. package/dist/chris/chrisCommands.js.map +1 -1
  45. package/dist/chris/commandFallback.d.ts +30 -3
  46. package/dist/chris/commandFallback.js +163 -94
  47. package/dist/chris/commandFallback.js.map +1 -1
  48. package/dist/chris/completion.d.ts +37 -0
  49. package/dist/chris/completion.js +41 -121
  50. package/dist/chris/completion.js.map +1 -1
  51. package/dist/chris/kinds.d.ts +11 -0
  52. package/dist/chris/kinds.js +32 -1
  53. package/dist/chris/kinds.js.map +1 -1
  54. package/dist/core/argumentKinds.d.ts +18 -0
  55. package/dist/core/argumentKinds.js +33 -0
  56. package/dist/core/argumentKinds.js.map +1 -1
  57. package/dist/core/backend.d.ts +12 -5
  58. package/dist/core/backend.js.map +1 -1
  59. package/dist/core/commandDeclaration.d.ts +40 -0
  60. package/dist/core/commandDeclaration.js.map +1 -1
  61. package/dist/core/commandOrder.js +3 -3
  62. package/dist/core/commandOrder.js.map +1 -1
  63. package/dist/core/commandParse.d.ts +14 -0
  64. package/dist/core/commandParse.js +39 -5
  65. package/dist/core/commandParse.js.map +1 -1
  66. package/dist/core/commandRegistry.d.ts +22 -36
  67. package/dist/core/commandRegistry.js +19 -10
  68. package/dist/core/commandRegistry.js.map +1 -1
  69. package/dist/core/commandSchema.js +4 -0
  70. package/dist/core/commandSchema.js.map +1 -1
  71. package/dist/core/coreCommands.d.ts +1 -0
  72. package/dist/core/coreCommands.js +6 -19
  73. package/dist/core/coreCommands.js.map +1 -1
  74. package/dist/core/dispatch.js +12 -41
  75. package/dist/core/dispatch.js.map +1 -1
  76. package/dist/core/preprocess.d.ts +0 -15
  77. package/dist/core/preprocess.js +0 -17
  78. package/dist/core/preprocess.js.map +1 -1
  79. package/dist/core/shellWords.d.ts +34 -0
  80. package/dist/core/shellWords.js +60 -0
  81. package/dist/core/shellWords.js.map +1 -0
  82. package/dist/core.d.ts +5 -0
  83. package/dist/core.js +4 -0
  84. package/dist/core.js.map +1 -1
  85. package/dist/lib/completer/declared.js +22 -6
  86. package/dist/lib/completer/declared.js.map +1 -1
  87. package/dist/lib/completer/index.js +15 -53
  88. package/dist/lib/completer/index.js.map +1 -1
  89. package/dist/notes.json +1 -1
  90. package/package.json +5 -5
  91. package/dist/builtins/res/pipeline.args.d.ts +0 -35
  92. package/dist/builtins/res/pipeline.args.js +0 -94
  93. package/dist/builtins/res/pipeline.args.js.map +0 -1
  94. package/dist/chris/help.d.ts +0 -18
  95. package/dist/chris/help.js +0 -229
  96. package/dist/chris/help.js.map +0 -1
@@ -15,9 +15,57 @@
15
15
  *
16
16
  * @module
17
17
  */
18
+ import type { PipelineInvocationBinding } from '@fnndsc/salsa';
18
19
  import { type RunSettlement } from './runWait.js';
19
20
  import type { PipelineScheduled } from '../../api/models.js';
20
21
  import { type CommandEnvelope } from '@fnndsc/menu';
22
+ /**
23
+ * Handles `pipeline info <name|id>`.
24
+ *
25
+ * @param nameOrId - The pipeline.
26
+ * @returns Command envelope whose status matches resolution and manifest fetching.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * await pipelineInfo_handle('PHI_detection');
31
+ * ```
32
+ */
33
+ export declare function pipelineInfo_handle(nameOrId: string): Promise<CommandEnvelope>;
34
+ /** One pipeline run, as a line asks for it: the pipeline, where it attaches, its overlays, and how the line holds it. */
35
+ export interface PipelineRunRequest {
36
+ /** The pipeline: its name, id or `/bin` name. */
37
+ readonly pipeline: string;
38
+ /** The compute resource every node runs on, when given. */
39
+ readonly compute?: string;
40
+ /** The instance the run attaches to; absent, the feed node the session stands in. */
41
+ readonly previous?: number;
42
+ /** A CFS file of sparse YAML overrides, when given. */
43
+ readonly paramFile?: string;
44
+ /** The node overrides, `--<node>.<field> <value>`. */
45
+ readonly bindings: readonly PipelineInvocationBinding[];
46
+ /** Return the handles at once rather than wait for the run. */
47
+ readonly detach: boolean;
48
+ /** Echo every parameter of every piping. */
49
+ readonly verbose: boolean;
50
+ /** Resolve the run and print it, creating nothing (`whatif`). */
51
+ readonly dry: boolean;
52
+ /** A dry run on a feed that would be rooted first, so no node exists to attach to. */
53
+ readonly dryNewFeed: boolean;
54
+ }
55
+ /**
56
+ * Runs one pipeline: from the instance the request names or the feed node
57
+ * the session stands in, with the overlays it gives; the resolved call is
58
+ * echoed first, and a dry run stops there.
59
+ *
60
+ * @param request - The run.
61
+ * @returns Command envelope whose status matches Workflow creation.
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * await pipelineRun_execute({ pipeline: 'PHI_detection', bindings: [], detach: false, verbose: false, dry: true, dryNewFeed: false });
66
+ * ```
67
+ */
68
+ export declare function pipelineRun_execute(request: PipelineRunRequest): Promise<CommandEnvelope>;
21
69
  /** The model kind a scheduled pipeline travels under. */
22
70
  export declare const PIPELINE_SCHEDULED_KIND: string;
23
71
  /**
@@ -34,8 +82,189 @@ export declare const PIPELINE_SCHEDULED_KIND: string;
34
82
  */
35
83
  export declare function pipelineScheduled_make(pipelineName: string, workflowId: number, feedId: number, instanceIds: ReadonlyArray<number>, settlement: RunSettlement | null, newFeed?: boolean): PipelineScheduled;
36
84
  /**
37
- * Manages ChRIS pipeline registration, inspection, and execution.
85
+ * Handles `pipeline source <name|id>`.
86
+ *
87
+ * @param nameOrId - The pipeline.
88
+ * @returns Command envelope whose status matches source retrieval.
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * await pipelineSource_handle('PHI_detection');
93
+ * ```
94
+ */
95
+ export declare function pipelineSource_handle(nameOrId: string): Promise<CommandEnvelope>;
96
+ /**
97
+ * Handles `pipeline manifest <name|id|slug>`.
98
+ *
99
+ * @param specifier - The pipeline, its words joined.
100
+ * @returns Complete registered invocation manifest as serializable YAML.
101
+ *
102
+ * @example
103
+ * ```ts
104
+ * await pipelineManifestCommand_handle('PHI_detection');
105
+ * ```
106
+ */
107
+ export declare function pipelineManifestCommand_handle(specifier: string): Promise<CommandEnvelope>;
108
+ /**
109
+ * Handles shallow and SignalFlow pipeline diagram output.
110
+ *
111
+ * @param specifier - The pipeline, its words joined.
112
+ * @param withArguments - Each node's stored arguments inline.
113
+ * @param signalflow - SignalFlow YAML instead of the tree.
114
+ * @returns The diagram, or the refusal.
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * await pipelineDiagramCommand_handle('PHI_detection', false, true);
119
+ * ```
120
+ */
121
+ export declare function pipelineDiagramCommand_handle(specifier: string, withArguments: boolean, signalflow: boolean): Promise<CommandEnvelope>;
122
+ /**
123
+ * `pipeline <list|search|inspect|info|manifest|run|source|diagram> …`: the
124
+ * declaration. `pipelines` is the same command, and a read.
125
+ *
126
+ * @example
127
+ * ```ts
128
+ * commands_register({ declarations: [pipelineCommand] }, 'backend');
129
+ * ```
130
+ */
131
+ export declare const pipelineCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
132
+ readonly bare: {
133
+ readonly summary: "Name the subcommands, and the feed node a run here starts from";
134
+ };
135
+ readonly subcommands: {
136
+ readonly list: {
137
+ readonly summary: "List the registered pipelines";
138
+ readonly operands: readonly [{
139
+ readonly name: "search";
140
+ readonly kind: "word";
141
+ readonly optional: true;
142
+ readonly summary: "Only those whose name holds this";
143
+ }];
144
+ };
145
+ readonly search: {
146
+ readonly summary: "List the pipelines whose name holds a word (list <word>)";
147
+ readonly operands: readonly [{
148
+ readonly name: "term";
149
+ readonly kind: "word";
150
+ readonly optional: true;
151
+ readonly summary: "The word";
152
+ }];
153
+ };
154
+ readonly inspect: {
155
+ readonly summary: "Name the fields a pipeline has";
156
+ };
157
+ readonly info: {
158
+ readonly summary: "Show a pipeline's nodes, plugins and topology";
159
+ readonly operands: readonly [{
160
+ readonly name: "pipeline";
161
+ readonly kind: "pipeline";
162
+ readonly summary: "The pipeline: its name, its id, or its /bin name";
163
+ }];
164
+ };
165
+ readonly manifest: {
166
+ readonly summary: "Emit the complete registered invocation YAML";
167
+ readonly operands: readonly [{
168
+ readonly name: "pipeline";
169
+ readonly kind: "pipeline";
170
+ readonly repeat: true;
171
+ readonly summary: "The pipeline: its name (in several words, joined), its id, or its /bin name";
172
+ }];
173
+ };
174
+ readonly run: {
175
+ readonly summary: "Run a pipeline from the feed node you are in, and wait for it";
176
+ readonly operands: readonly [{
177
+ readonly name: "pipeline";
178
+ readonly kind: "pipeline";
179
+ readonly summary: "The pipeline: its name, its id, or its /bin name";
180
+ }];
181
+ readonly options: {
182
+ readonly compute: {
183
+ readonly long: "compute";
184
+ readonly summary: "Run every node on this compute resource";
185
+ readonly value: {
186
+ readonly name: "resource";
187
+ readonly kind: "compute";
188
+ };
189
+ };
190
+ readonly previous: {
191
+ readonly long: "previous";
192
+ readonly summary: "Start from this instance (default: the feed node you are in)";
193
+ readonly value: {
194
+ readonly name: "instance";
195
+ readonly kind: "int";
196
+ readonly min: 1;
197
+ };
198
+ };
199
+ readonly paramFile: {
200
+ readonly long: "paramFile";
201
+ readonly summary: "Apply one sparse YAML invocation overlay, a CFS file";
202
+ readonly value: {
203
+ readonly name: "file";
204
+ readonly kind: "cfsPath";
205
+ };
206
+ };
207
+ readonly detach: {
208
+ readonly long: "detach";
209
+ readonly summary: "Return the instance ids at once, without waiting";
210
+ };
211
+ readonly verbose: {
212
+ readonly long: "verbose";
213
+ readonly summary: "Echo every parameter of every piping before the run";
214
+ };
215
+ readonly bindings: {
216
+ readonly long: "<node>.<field>";
217
+ readonly summary: "Override one parameter or execution control of one node (@<piping id> names a node whose title is ambiguous)";
218
+ readonly value: {
219
+ readonly name: "value";
220
+ readonly kind: "word";
221
+ };
222
+ readonly family: {
223
+ readonly pattern: RegExp;
224
+ readonly names_list: (operands: readonly string[]) => Promise<string[]>;
225
+ };
226
+ };
227
+ };
228
+ };
229
+ readonly source: {
230
+ readonly summary: "Show the pipeline YAML source";
231
+ readonly operands: readonly [{
232
+ readonly name: "pipeline";
233
+ readonly kind: "pipeline";
234
+ readonly summary: "The pipeline: its name, its id, or its /bin name";
235
+ }];
236
+ };
237
+ readonly diagram: {
238
+ readonly summary: "Draw the pipeline as a shallow tree";
239
+ readonly operands: readonly [{
240
+ readonly name: "pipeline";
241
+ readonly kind: "pipeline";
242
+ readonly repeat: true;
243
+ readonly summary: "The pipeline: its name (in several words, joined), its id, or its /bin name";
244
+ }];
245
+ readonly options: {
246
+ readonly withargs: {
247
+ readonly long: "withargs";
248
+ readonly summary: "Each node's stored non-null arguments inline";
249
+ };
250
+ readonly signalflow: {
251
+ readonly long: "signalflow";
252
+ readonly summary: "Emit SignalFlow YAML instead of the tree";
253
+ };
254
+ };
255
+ };
256
+ };
257
+ }>;
258
+ /**
259
+ * Manages ChRIS pipeline registration, inspection, and execution: a
260
+ * `pipeline` line over words already split, through the declaration.
261
+ *
262
+ * @param args - The words after `pipeline`.
263
+ * @returns The answer, or the refusal of a bad line.
38
264
  *
39
- * @param args - Command arguments.
265
+ * @example
266
+ * ```ts
267
+ * await builtin_pipeline(['run', 'PHI_detection', '--previous', '42']);
268
+ * ```
40
269
  */
41
270
  export declare function builtin_pipeline(args: string[]): Promise<CommandEnvelope>;