@fnndsc/brasa 0.9.2 → 0.10.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 (153) hide show
  1. package/dist/buildinfo.json +1 -0
  2. package/dist/builtins/argumentTokens.d.ts +18 -0
  3. package/dist/builtins/argumentTokens.js +58 -0
  4. package/dist/builtins/argumentTokens.js.map +1 -0
  5. package/dist/builtins/executable.d.ts +3 -7
  6. package/dist/builtins/executable.js +32 -29
  7. package/dist/builtins/executable.js.map +1 -1
  8. package/dist/builtins/feedCreation.d.ts +23 -0
  9. package/dist/builtins/feedCreation.js +45 -0
  10. package/dist/builtins/feedCreation.js.map +1 -0
  11. package/dist/builtins/fs/cat.args.d.ts +36 -0
  12. package/dist/builtins/fs/cat.args.js +63 -0
  13. package/dist/builtins/fs/cat.args.js.map +1 -0
  14. package/dist/builtins/fs/cat.d.ts +2 -2
  15. package/dist/builtins/fs/cat.js +222 -101
  16. package/dist/builtins/fs/cat.js.map +1 -1
  17. package/dist/builtins/fs/cd.js +41 -5
  18. package/dist/builtins/fs/cd.js.map +1 -1
  19. package/dist/builtins/fs/cp.js +3 -2
  20. package/dist/builtins/fs/cp.js.map +1 -1
  21. package/dist/builtins/fs/download.d.ts +1 -1
  22. package/dist/builtins/fs/download.js +52 -13
  23. package/dist/builtins/fs/download.js.map +1 -1
  24. package/dist/builtins/fs/du.js +15 -1
  25. package/dist/builtins/fs/du.js.map +1 -1
  26. package/dist/builtins/fs/ls.js +10 -1
  27. package/dist/builtins/fs/ls.js.map +1 -1
  28. package/dist/builtins/fs/mv.js +7 -3
  29. package/dist/builtins/fs/mv.js.map +1 -1
  30. package/dist/builtins/fs/pull.args.d.ts +14 -1
  31. package/dist/builtins/fs/pull.args.js +72 -9
  32. package/dist/builtins/fs/pull.args.js.map +1 -1
  33. package/dist/builtins/fs/pull.d.ts +1 -0
  34. package/dist/builtins/fs/pull.js +191 -259
  35. package/dist/builtins/fs/pull.js.map +1 -1
  36. package/dist/builtins/fs/rm.js +4 -0
  37. package/dist/builtins/fs/rm.js.map +1 -1
  38. package/dist/builtins/fs/tree.js +7 -3
  39. package/dist/builtins/fs/tree.js.map +1 -1
  40. package/dist/builtins/fs/upload.js +29 -2
  41. package/dist/builtins/fs/upload.js.map +1 -1
  42. package/dist/builtins/help.d.ts +7 -0
  43. package/dist/builtins/help.js +144 -36
  44. package/dist/builtins/help.js.map +1 -1
  45. package/dist/builtins/index.d.ts +1 -0
  46. package/dist/builtins/index.js +1 -0
  47. package/dist/builtins/index.js.map +1 -1
  48. package/dist/builtins/net/pacs.d.ts +1 -0
  49. package/dist/builtins/net/pacs.js +5 -1
  50. package/dist/builtins/net/pacs.js.map +1 -1
  51. package/dist/builtins/net/pacsUtils.d.ts +5 -4
  52. package/dist/builtins/net/pacsUtils.js +12 -32
  53. package/dist/builtins/net/pacsUtils.js.map +1 -1
  54. package/dist/builtins/net/query.js +4 -1
  55. package/dist/builtins/net/query.js.map +1 -1
  56. package/dist/builtins/net/status.d.ts +14 -0
  57. package/dist/builtins/net/status.js +210 -0
  58. package/dist/builtins/net/status.js.map +1 -0
  59. package/dist/builtins/pluginExecute.d.ts +3 -2
  60. package/dist/builtins/pluginExecute.js +41 -70
  61. package/dist/builtins/pluginExecute.js.map +1 -1
  62. package/dist/builtins/pluginSelector.d.ts +15 -0
  63. package/dist/builtins/pluginSelector.js +21 -0
  64. package/dist/builtins/pluginSelector.js.map +1 -0
  65. package/dist/builtins/proc.js +106 -4
  66. package/dist/builtins/proc.js.map +1 -1
  67. package/dist/builtins/res/compute.js +8 -3
  68. package/dist/builtins/res/compute.js.map +1 -1
  69. package/dist/builtins/res/group.d.ts +1 -1
  70. package/dist/builtins/res/group.js +122 -5
  71. package/dist/builtins/res/group.js.map +1 -1
  72. package/dist/builtins/res/pipeline.args.d.ts +4 -0
  73. package/dist/builtins/res/pipeline.args.js +63 -12
  74. package/dist/builtins/res/pipeline.args.js.map +1 -1
  75. package/dist/builtins/res/pipeline.d.ts +3 -1
  76. package/dist/builtins/res/pipeline.js +155 -60
  77. package/dist/builtins/res/pipeline.js.map +1 -1
  78. package/dist/builtins/res/pipeline.manifest.d.ts +15 -0
  79. package/dist/builtins/res/pipeline.manifest.js +93 -0
  80. package/dist/builtins/res/pipeline.manifest.js.map +1 -0
  81. package/dist/builtins/res/plugin.js +14 -7
  82. package/dist/builtins/res/plugin.js.map +1 -1
  83. package/dist/builtins/res/user.d.ts +8 -0
  84. package/dist/builtins/res/user.js +87 -0
  85. package/dist/builtins/res/user.js.map +1 -0
  86. package/dist/builtins/store.js +24 -3
  87. package/dist/builtins/store.js.map +1 -1
  88. package/dist/builtins/sys/fortune.d.ts +9 -0
  89. package/dist/builtins/sys/fortune.js +16 -1
  90. package/dist/builtins/sys/fortune.js.map +1 -1
  91. package/dist/builtins/sys/whoami.d.ts +13 -1
  92. package/dist/builtins/sys/whoami.js +47 -2
  93. package/dist/builtins/sys/whoami.js.map +1 -1
  94. package/dist/builtins/utils.d.ts +14 -1
  95. package/dist/builtins/utils.js +13 -3
  96. package/dist/builtins/utils.js.map +1 -1
  97. package/dist/builtins/wildcard.d.ts +31 -0
  98. package/dist/builtins/wildcard.js +112 -50
  99. package/dist/builtins/wildcard.js.map +1 -1
  100. package/dist/command-keys.js +2 -1
  101. package/dist/command-keys.js.map +1 -1
  102. package/dist/core/cancellation.d.ts +28 -0
  103. package/dist/core/cancellation.js +70 -0
  104. package/dist/core/cancellation.js.map +1 -0
  105. package/dist/core/dispatch.d.ts +1 -8
  106. package/dist/core/dispatch.js +82 -82
  107. package/dist/core/dispatch.js.map +1 -1
  108. package/dist/core/elevation.d.ts +35 -0
  109. package/dist/core/elevation.js +77 -0
  110. package/dist/core/elevation.js.map +1 -0
  111. package/dist/core/engine.d.ts +12 -0
  112. package/dist/core/engine.js +35 -8
  113. package/dist/core/engine.js.map +1 -1
  114. package/dist/core/preprocess.d.ts +11 -4
  115. package/dist/core/preprocess.js +43 -10
  116. package/dist/core/preprocess.js.map +1 -1
  117. package/dist/core/progress.d.ts +15 -5
  118. package/dist/core/progress.js +14 -0
  119. package/dist/core/progress.js.map +1 -1
  120. package/dist/core/promptContext.d.ts +3 -5
  121. package/dist/core/promptContext.js +9 -2
  122. package/dist/core/promptContext.js.map +1 -1
  123. package/dist/core/sink.d.ts +9 -0
  124. package/dist/core/sink.js +23 -3
  125. package/dist/core/sink.js.map +1 -1
  126. package/dist/core/surface.d.ts +14 -0
  127. package/dist/core/surface.js +5 -0
  128. package/dist/core/surface.js.map +1 -1
  129. package/dist/core/version.d.ts +34 -0
  130. package/dist/core/version.js +51 -0
  131. package/dist/core/version.js.map +1 -1
  132. package/dist/index.d.ts +1 -0
  133. package/dist/index.js +1 -0
  134. package/dist/index.js.map +1 -1
  135. package/dist/lib/completer/index.js +39 -1
  136. package/dist/lib/completer/index.js.map +1 -1
  137. package/dist/lib/parser.d.ts +75 -2
  138. package/dist/lib/parser.js +158 -15
  139. package/dist/lib/parser.js.map +1 -1
  140. package/dist/lib/vfs/providers/binEntry.d.ts +20 -0
  141. package/dist/lib/vfs/providers/binEntry.js +47 -0
  142. package/dist/lib/vfs/providers/binEntry.js.map +1 -0
  143. package/dist/lib/vfs/providers/static.js +1 -0
  144. package/dist/lib/vfs/providers/static.js.map +1 -1
  145. package/dist/lib/vfs/providers/static_content.js +5 -36
  146. package/dist/lib/vfs/providers/static_content.js.map +1 -1
  147. package/dist/lib/vfs/vfs.d.ts +7 -0
  148. package/dist/lib/vfs/vfs.js +25 -0
  149. package/dist/lib/vfs/vfs.js.map +1 -1
  150. package/dist/session/index.d.ts +18 -0
  151. package/dist/session/index.js +29 -1
  152. package/dist/session/index.js.map +1 -1
  153. package/package.json +10 -5
@@ -1 +1 @@
1
- {"version":3,"file":"rm.js","sourceRoot":"","sources":["../../../src/builtins/fs/rm.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,C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,WAAW,IAAI,SAAS,CAAC,CAAC;QAChG,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;QACvB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,QAAQ,GAAoB,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC/D,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -24,9 +24,13 @@ import { bytes_format } from '@fnndsc/chili/commands/fs/upload.js';
24
24
  * ```
25
25
  */
26
26
  export async function builtin_tree(args) {
27
- const parsed = commandArgs_process(args);
27
+ const parsed = commandArgs_process(args, {
28
+ booleanLongOptions: ['follow', 'path', 'dirs', 'dirpath'],
29
+ });
28
30
  const pathArgs = parsed._;
29
- const pathMode = !!parsed['path'];
31
+ const dirpathMode = !!parsed['dirpath'];
32
+ const pathMode = !!parsed['path'] || dirpathMode;
33
+ const dirsOnly = !!parsed['dirs'] || dirpathMode;
30
34
  // Determine target path
31
35
  let targetPath;
32
36
  if (pathArgs.length > 0) {
@@ -37,7 +41,7 @@ export async function builtin_tree(args) {
37
41
  silent: true,
38
42
  tree: false, // We'll format it ourselves
39
43
  follow: !!parsed['follow'],
40
- dirsOnly: false,
44
+ dirsOnly,
41
45
  };
42
46
  // If path specified, temporarily set context
43
47
  const originalFolder = await session.getCWD();
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../src/builtins/fs/tree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAc,mBAAmB,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAmB,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,gBAAgB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C,MAAM,QAAQ,CAAC,IAAI,CAAC;QACrE,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE/B,CAAC;YAAS,CAAC;QACT,wBAAwB;QACxB,IAAI,UAAU,EAAE,CAAC;YACf,MAAM,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -7,6 +7,21 @@ import { path_resolve } from '../utils.js';
7
7
  import { files_uploadWithProgress as chefs_upload_cmd, bytes_format } from '@fnndsc/chili/commands/fs/upload.js';
8
8
  import { listCache_get, envelope_ok, envelope_error } from '@fnndsc/cumin';
9
9
  import { sink_get } from '../../core/sink.js';
10
+ import { shellArguments_pathnameExpansion } from '../../lib/parser.js';
11
+ import { surface_get } from '../../core/surface.js';
12
+ /**
13
+ * Asks the issuing surface to confirm replacement of an existing CFS target.
14
+ *
15
+ * @param message - Confirmation question prepared by the transfer command.
16
+ * @returns Nothing when the surface accepts the operation.
17
+ * @throws {Error} When the surface declines the operation.
18
+ */
19
+ async function uploadConfirmation_request(message) {
20
+ const answer = await surface_get().prompt({ message });
21
+ if (answer.trim().toLowerCase() !== 'y' && answer.trim().toLowerCase() !== 'yes') {
22
+ throw new Error('Operation cancelled by user.');
23
+ }
24
+ }
10
25
  /**
11
26
  * Uploads a local file or directory to ChRIS.
12
27
  *
@@ -19,9 +34,19 @@ export async function builtin_upload(args) {
19
34
  }
20
35
  const localPath = args[0];
21
36
  const remotePath = args[1];
37
+ const localGlob = shellArguments_pathnameExpansion(args, 0);
22
38
  const targetRemote = await path_resolve(remotePath);
23
39
  try {
24
40
  const summary = await chefs_upload_cmd(localPath, targetRemote, {
41
+ expandLocalGlob: localGlob,
42
+ confirm: uploadConfirmation_request,
43
+ onNotice: (message, channel) => {
44
+ const sink = sink_get();
45
+ if (channel === 'status')
46
+ sink.status_write(`${message}\n`);
47
+ else
48
+ sink.err_write(`${message}\n`);
49
+ },
25
50
  onProgress: event => sink_get().progress_write(event),
26
51
  });
27
52
  let rendered = '\n';
@@ -32,10 +57,12 @@ export async function builtin_upload(args) {
32
57
  rendered += `${chalk.yellow(`⚠ Uploaded ${summary.transferredCount} file(s), ${summary.failedCount} failed`)}\n`;
33
58
  }
34
59
  rendered += `${chalk.gray(` Total: ${bytes_format(summary.transferSize)} in ${summary.duration.toFixed(1)}s (${bytes_format(summary.speed)}/s)`)}\n`;
35
- // Invalidate cache for actual target directory where files were uploaded
60
+ // Invalidate cache for actual target directory where files were uploaded,
61
+ // including nested listings: a directory re-upload replaces a whole tree,
62
+ // and still-fresh entries below the target would serve the old contents.
36
63
  if (summary.transferredCount > 0) {
37
64
  const listCache = listCache_get();
38
- listCache.cache_invalidate(summary.actualTargetPath);
65
+ listCache.cache_invalidateTree(summary.actualTargetPath);
39
66
  // Also invalidate parent to refresh its listing
40
67
  listCache.cache_invalidate(targetRemote);
41
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../src/builtins/fs/upload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,wBAAwB,IAAI,gBAAgB,EAAiB,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAChI,OAAO,EAAE,aAAa,EAAwB,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEjG,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAc;IACjD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,OAAO,WAAW,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,0CAA0C,CAAC,IAAI,CAAC,CAAC;IACnF,CAAC;IACD,MAAM,SAAS,GAAW,IAAI,CAAC,CAAC,CAAC,CAAC;IAClC,MAAM,UAAU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Q,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;QAEtJ,0EAA0E;QAC1E,0EAA0E;QAC1E,yEAAyE;QACzE,IAAI,OAAO,CAAC,gBAAgB,GAAG,CAAC,EAAE,CAAC;YACjC,MAAM,SAAS,GAAG,aAAa,EAAE,CAAC;YAClC,SAAS,CAAC,oBAAoB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;YACzD,gDAAgD;YAChD,SAAS,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QACpB,MAAM,GAAG,GAAW,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC/D,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACjF,CAAC;AACH,CAAC"}
@@ -48,6 +48,13 @@ export declare function commandHelp_get(command: string): string | undefined;
48
48
  * @returns Pipeline-specific help text, terminated with a newline.
49
49
  */
50
50
  export declare function pipelineExecutableHelp_render(name: string): string;
51
+ /**
52
+ * Renders contextual help for one versioned plugin executable.
53
+ *
54
+ * @param name - Plugin executable name as exposed in `/bin`.
55
+ * @returns Plugin-specific help text, terminated with a newline.
56
+ */
57
+ export declare function pluginExecutableHelp_render(name: string): string;
51
58
  /**
52
59
  * Renders a command's help text as a string.
53
60
  *
@@ -6,6 +6,7 @@
6
6
  * @module
7
7
  */
8
8
  import chalk from 'chalk';
9
+ import { CAT_USAGE } from './fs/cat.args.js';
9
10
  /**
10
11
  * Standard subcommands and options injected into every resource help entry.
11
12
  * Captures the Resource Contract documented in CONTEXT.md.
@@ -30,6 +31,24 @@ export const RESOURCE_LIST_OPTIONS = [
30
31
  * Help-text registry keyed by builtin command name.
31
32
  */
32
33
  export const helpText = {
34
+ user: {
35
+ usage: 'user <add|inspect|disable|enable|remove> <username>',
36
+ description: 'Manage CUBE-local accounts; federated identities remain externally managed',
37
+ options: ['Use `sudo user …` for lifecycle operations.', 'add prompts for email and a hidden password confirmation.'],
38
+ examples: ['sudo user add jack.bivowac', 'sudo user disable jack.bivowac', 'sudo user remove jack.bivowac'],
39
+ },
40
+ sudo: {
41
+ usage: 'sudo <command> [arguments...]',
42
+ description: 'Run one ChRIS command with a temporary administrator identity',
43
+ options: [
44
+ 'Prompts for an administrator username and hidden password on the active surface.',
45
+ 'The elevated CUBE token is used only for the nested command; it is not saved or made the session identity.',
46
+ ],
47
+ examples: [
48
+ 'sudo group adduser pacs_users peter.hong',
49
+ 'sudo plugin add pl-dircopy',
50
+ ],
51
+ },
33
52
  ls: {
34
53
  usage: 'ls [options] [path]',
35
54
  description: 'List directory contents',
@@ -86,12 +105,20 @@ export const helpText = {
86
105
  ],
87
106
  },
88
107
  cat: {
89
- usage: 'cat <file> [file...]',
90
- description: 'Display file contents',
108
+ usage: CAT_USAGE,
109
+ description: 'Display file contents, with terminal syntax highlighting for recognized text formats',
110
+ options: [
111
+ '--binary Force byte-for-byte binary output',
112
+ '--highlight Force highlighting; infer the language from the filename or content',
113
+ '--highlight=LANGUAGE Force a cli-highlight language such as python, typescript, or sql',
114
+ '--no-highlight Disable automatic syntax highlighting',
115
+ ],
91
116
  examples: [
92
- 'cat file.txt # Display single file',
93
- 'cat file1 file2 # Display multiple files',
94
- 'cat *.log # Display all .log files (wildcard)',
117
+ 'cat file.txt # Display single file',
118
+ 'cat analysis.py # Auto-highlight Python in a terminal',
119
+ 'cat source --highlight=python # Force Python highlighting without filename inference',
120
+ 'cat config.json --no-highlight # Display raw text',
121
+ 'cat file1 file2 # Display multiple files',
95
122
  ],
96
123
  },
97
124
  edit: {
@@ -136,6 +163,12 @@ export const helpText = {
136
163
  description: 'Copy files or directories (supports wildcards and multiple sources)',
137
164
  options: [
138
165
  '-r, --recursive Recursive copy (for directories)',
166
+ '',
167
+ 'PACS SOURCES: a /net/pacs/queries/... source names query results, not',
168
+ 'stored files. cp MATERIALIZES the series: if its DICOMs are not yet in',
169
+ 'CUBE it fires a PACS retrieve and waits for them to land (the same',
170
+ 'engine as pull), then copies the landed files to the destination.',
171
+ 'A series already fully in CUBE is copied without a retrieve.',
139
172
  ],
140
173
  examples: [
141
174
  'cp file.txt copy.txt # Copy single file',
@@ -143,6 +176,8 @@ export const helpText = {
143
176
  'cp file1 file2 file3 dest/ # Copy multiple files',
144
177
  'cp uploads/*.txt backup/ # Copy with wildcard',
145
178
  'cp "file with spaces.txt" dest/ # Use quotes for spaces',
179
+ 'cp -r /net/pacs/queries/AccessionNumber:123_qid:7/Study_1.2.3_Head/Series_1.2.3.4_AX_T2 results/',
180
+ ' # Retrieve-if-needed, then copy the series',
146
181
  ],
147
182
  },
148
183
  mv: {
@@ -180,8 +215,8 @@ export const helpText = {
180
215
  ],
181
216
  },
182
217
  upload: {
183
- usage: 'upload <local_path> <chris_path>',
184
- description: 'Upload files from local filesystem to ChRIS with progress tracking',
218
+ usage: 'upload <local_path_or_glob> <chris_path>',
219
+ description: 'Upload local files, directories, or glob matches to ChRIS with progress tracking',
185
220
  options: [
186
221
  'Displays progress bar showing:',
187
222
  ' - File count and percentage complete',
@@ -191,19 +226,21 @@ export const helpText = {
191
226
  ],
192
227
  examples: [
193
228
  'upload ~/data/file.csv /home/user/uploads/',
229
+ 'upload ~/Pictures/earthandmoon* .',
194
230
  'upload ./results/ ~/data/',
195
231
  'upload ~/experiment/data /home/user/projects/',
196
232
  ],
197
233
  },
198
234
  download: {
199
- usage: 'download <chris_path> <local_path> [-f|--force]',
200
- description: 'Download a ChRIS file or directory to the local filesystem with progress tracking',
235
+ usage: 'download <chris_path_or_glob> <local_path> [-f|--force]',
236
+ description: 'Download a ChRIS file, directory, or CFS glob to the local filesystem with progress tracking',
201
237
  options: [
202
238
  '-f, --force Overwrite existing local paths',
203
239
  'Progress bar shows files, ETA, bytes transferred',
204
240
  ],
205
241
  examples: [
206
242
  'download /home/user/data ./data',
243
+ 'download /home/user/results/*.nii ./results/',
207
244
  'download /feeds/feed_123 ./downloads -f',
208
245
  ],
209
246
  },
@@ -292,8 +329,8 @@ export const helpText = {
292
329
  'PLUGINS ADD OPTIONS:',
293
330
  ' --compute <resources> Comma-separated compute resources (default: host)',
294
331
  ' --store <url> Peer store URL (default: cube.chrisproject.org)',
295
- ' --adminUser <username> Admin username (to skip interactive prompt)',
296
- ' --adminPassword <password> Admin password (to skip interactive prompt)',
332
+ ' --adminUser <username> Administrator username (non-interactive compatibility)',
333
+ ' --adminPassword <password> Administrator password (non-interactive compatibility)',
297
334
  ' --publicRepo <url> Public repository URL for the plugin',
298
335
  '',
299
336
  'PLUGIN INPUT FORMATS:',
@@ -322,8 +359,8 @@ export const helpText = {
322
359
  'plugins add pl-dircopy',
323
360
  'plugins add pl-dircopy --compute host,gpu',
324
361
  '',
325
- '# Add plugin with admin credentials (skip prompt)',
326
- 'plugins add pl-dircopy --adminUser chris --adminPassword chris1234',
362
+ '# Add a plugin with a temporary administrator identity',
363
+ 'sudo plugins add pl-dircopy',
327
364
  '',
328
365
  '# Add plugin from Docker image',
329
366
  'plugins add fnndsc/pl-dircopy:2.1.1',
@@ -432,6 +469,7 @@ export const helpText = {
432
469
  '',
433
470
  'RESOURCE-SPECIFIC SUBCOMMANDS:',
434
471
  ' info <name|id> Show pipeline nodes, plugins, and topology',
472
+ ' manifest <name|id|slug> Emit complete registered invocation YAML',
435
473
  ' run <name|id> Execute pipeline on current context node',
436
474
  ' source <name|id> Display the pipeline YAML source file',
437
475
  ' diagram <name|id> Draw the pipeline as a shallow tree',
@@ -442,23 +480,31 @@ export const helpText = {
442
480
  'RUN OPTIONS:',
443
481
  ' --compute <resource> Override compute resource for all nodes',
444
482
  ' --previous <inst_id> Explicit previous instance ID (default: context node)',
483
+ ' --paramFile <cfs-file> Apply one sparse YAML invocation overlay',
484
+ ' --<node>.<parameter> <value> Override one hosted plugin parameter',
485
+ ' --<node>.<control> <value> Override one node execution control',
486
+ ' Use --@<piping-id>.<field> when a node title is ambiguous or shell-unsafe',
445
487
  '',
446
488
  'PIPELINE EXECUTABLES:',
447
489
  ' Pipelines also appear in /bin (colored magenta) and can be invoked directly.',
448
490
  ' <PipelineName> Run pipeline on context node',
449
491
  ' <PipelineName> --nodes Show DAG structure (alias: --parameters)',
450
492
  ' <PipelineName> --source Show YAML source (alias: --readme)',
493
+ ' <PipelineName> --manifest Emit complete registered invocation YAML',
451
494
  ' <PipelineName> --diagram Draw the shallow pipeline topology',
452
495
  ' <PipelineName> --signalflow Emit SignalFlow YAML directly',
453
496
  ' --withargs Include arguments with --diagram',
454
- ' cat /bin/<PipelineName> Same as pipeline source',
497
+ ' cat /bin/<PipelineName> Show a fast cached executable summary',
455
498
  ],
456
499
  examples: [
457
500
  'pipeline list # List all pipelines',
458
501
  'pipeline list PHI # Filter by name',
459
502
  'pipeline info PHI_detection # Show nodes and topology',
503
+ 'pipeline manifest PHI_detection # Registered invocation YAML',
460
504
  'pipeline run PHI_detection # Run on current context node',
461
505
  'pipeline run PHI_detection --compute gpu',
506
+ 'pipeline run PHI_detection --segmentation.threshold 0.5',
507
+ 'pipeline run PHI_detection --paramFile ~/params/run.yaml',
462
508
  'pipeline source PHI_detection # Show YAML source',
463
509
  'pipeline diagram PHI_detection # Draw the authored DAG',
464
510
  'pipeline diagram --withargs PHI_detection',
@@ -468,9 +514,10 @@ export const helpText = {
468
514
  'PHI_detection # Run with defaults',
469
515
  'PHI_detection --nodes # Show node structure',
470
516
  'PHI_detection --source # Show YAML source',
517
+ 'PHI_detection --manifest # Registered invocation YAML',
471
518
  'PHI_detection --diagram # Draw the authored DAG',
472
519
  'PHI_detection --signalflow # Emit SignalFlow YAML',
473
- 'cat /bin/PHI_detection # Same as --source',
520
+ 'cat /bin/PHI_detection # Cached executable summary',
474
521
  ],
475
522
  },
476
523
  pacs: {
@@ -484,6 +531,8 @@ export const helpText = {
484
531
  ' list List registered PACS servers (alias: pacs connect)',
485
532
  ' query <Key:Value...> Create PACS query and wait for results',
486
533
  ' pull <vfs-path...> Pull DICOM series into ChRIS storage',
534
+ ' status <target> Per-series pulled/pending report with in-CUBE paths;',
535
+ ' target is an expression, VFS path, or query id',
487
536
  ],
488
537
  examples: [
489
538
  'pacs # Show active server',
@@ -494,6 +543,7 @@ export const helpText = {
494
543
  'pacs list # List all servers',
495
544
  'pacs query PatientID:1234 # Query PACS',
496
545
  'pacs pull /net/pacs/queries/42_AccessionNumber:12345678',
546
+ 'pacs status AccessionNumber:22119730 # What has landed in CUBE, what is missing',
497
547
  ],
498
548
  },
499
549
  'pacs query': {
@@ -515,17 +565,23 @@ export const helpText = {
515
565
  ],
516
566
  },
517
567
  'pacs pull': {
518
- usage: 'pacs pull [--nowait] [--retry N] <vfs-path|query-expr> [...]',
568
+ usage: 'pacs pull [--nowait] [--retry N] [--new-feed <title> [--plugin <selector>|--pipeline <selector>] [-- <args...>]] <vfs-path|query-expr> [...]',
519
569
  description: 'Pull PACS series into ChRIS storage (blocking, with LONK progress)',
520
570
  options: [
521
571
  '--nowait Fire retrieves and exit immediately; prints <seriesUID> <retrieveId> per line',
522
572
  '--retry N Re-fire retrieves for [NO LONK] series up to N additional times',
573
+ '--new-feed <title> Create one named feed from the complete retrieved selection',
574
+ '--plugin <selector> Attach one plugin to the new Feed root',
575
+ '--pipeline <selector> Attach one pipeline to the new Feed root',
576
+ '-- <args...> Forward remaining tokens to the selected analysis',
577
+ ' (cannot be combined with --nowait)',
523
578
  '--help Show this help',
524
579
  ],
525
580
  examples: [
526
581
  'pacs pull /net/pacs/queries/42_AccessionNumber:12345678',
527
582
  'pacs pull /net/pacs/queries/42_.../Study_1.2.3_US-Hips_DDH',
528
583
  'pacs pull AccessionNumber:12345678 # query-then-pull shorthand',
584
+ 'pacs pull AccessionNumber:12345678 --new-feed "Brain MRI"',
529
585
  '',
530
586
  '# Standalone alias (identical behaviour)',
531
587
  'pull /net/pacs/queries/42_AccessionNumber:12345678',
@@ -602,6 +658,11 @@ export const helpText = {
602
658
  description: 'Print the currently authenticated ChRIS username',
603
659
  examples: ['whoami'],
604
660
  },
661
+ id: {
662
+ usage: 'id',
663
+ description: 'Print the current CUBE user as a Unix-style UID, projected primary GID, and complete list of CUBE group memberships.',
664
+ examples: ['id'],
665
+ },
605
666
  fortune: {
606
667
  usage: 'fortune',
607
668
  summary: 'Print a random fortune cookie',
@@ -630,9 +691,9 @@ export const helpText = {
630
691
  examples: ['whereami'],
631
692
  },
632
693
  proc: {
633
- usage: 'proc <jobs|stat|feeds|refresh|find> [args]',
694
+ usage: 'proc <jobs|stat|feeds|refresh|retry|find|here> [args]',
634
695
  summary: 'Job history inspector — navigate, query and monitor ChRIS pipeline execution via /proc/jobs',
635
- description: '/proc/jobs is a job history inspector for every computation visible to the current ChRIS identity. Each plugin instance is a discrete job with a parent, zero or more children, a status, parameters, and a log. Jobs are grouped into feeds (pipeline runs), and the parent-child relationships form a DAG: the execution tree of a full computation. /proc/jobs exposes this as a navigable filesystem. cd into a feed to see what ran. ls -l shows job status at a glance. tree shows the full execution DAG. cat status, cat log, cat params give you CUBE data as plain text — no API queries to write, no UI to open. The in-memory cache is built at login and warmed across all visible plugin instances. Global queries refuse incomplete results during warm-up; add --force to wait for the existing sweep. Targeted numeric lookups and proc stat remain available immediately.',
696
+ description: '/proc/jobs is a job history inspector for every computation visible to the current ChRIS identity. Each plugin instance is a discrete job with a parent, zero or more children, a status, parameters, and a log. Jobs are grouped into feeds (pipeline runs), and the parent-child relationships form a DAG: the execution tree of a full computation. /proc/jobs exposes this as a navigable filesystem. The daemon restores an identity-scoped local topology checkpoint, validates feed visibility with CUBE, and reconciles all plugin instances in the background. Restored queries remain usable while syncing; a cold cache still guards global queries until complete. CUBE remains authoritative.',
636
697
  subcommands: [
637
698
  'jobs list List all feeds with full counter fields (default 20)',
638
699
  'jobs list --fields id,title,erroredJobs Select columns',
@@ -648,8 +709,10 @@ export const helpText = {
648
709
  'feeds <title> [--force] Search feed titles; --force waits for warm-up',
649
710
  'refresh Rebuild entire proc cache',
650
711
  'refresh <feed_id> Rebuild cache for one feed only',
712
+ 'retry Resume a failed topology sweep at its failed page',
651
713
  'find <id> Targeted instance lookup; available during warm-up',
652
714
  'find <name> [--force] Name search; --force waits for warm-up',
715
+ 'here Navigate from a CFS feed/output path to its matching job',
653
716
  ],
654
717
  examples: [
655
718
  'proc jobs list',
@@ -661,8 +724,10 @@ export const helpText = {
661
724
  'proc stat 899',
662
725
  'proc feeds failed',
663
726
  'proc refresh',
727
+ 'proc retry',
664
728
  'proc find 64306',
665
729
  'proc find pl-fshack',
730
+ 'proc here',
666
731
  ],
667
732
  },
668
733
  prompt: {
@@ -732,12 +797,16 @@ export const helpText = {
732
797
  options: [
733
798
  '--follow Follow symbolic links when traversing',
734
799
  '--path Emit one full path per entry (grep-friendly, no tree art)',
800
+ '--dirs Show directories only',
801
+ '--dirpath Emit one full directory path per line',
735
802
  ],
736
803
  examples: [
737
804
  'tree # Tree of current directory',
738
805
  'tree /home/user/data # Tree of specific path',
739
806
  'tree --follow # Follow symbolic links',
740
807
  'tree --path # One path per line, no decoration',
808
+ 'tree --dirs # Directory hierarchy only',
809
+ 'tree --dirpath # One directory path per line',
741
810
  ],
742
811
  },
743
812
  du: {
@@ -779,8 +848,7 @@ export const helpText = {
779
848
  '',
780
849
  'INSTALL OPTIONS:',
781
850
  ' --compute <names> Compute resources (comma-separated)',
782
- ' --adminUser <user> Admin username for install',
783
- ' --adminPassword <pw> Admin password for install',
851
+ ' Use `sudo store install …` for an administrator installation.',
784
852
  '-l Long listing format',
785
853
  ],
786
854
  examples: [
@@ -841,13 +909,14 @@ export const helpText = {
841
909
  ...RESOURCE_LIST_OPTIONS,
842
910
  '',
843
911
  'RESOURCE-SPECIFIC SUBCOMMANDS:',
844
- ' members <id> List users in a group',
845
- ' create <name> [admin] Create a new group',
846
- ' delete <id> [admin] Remove a group',
847
- ' adduser <id> <user> [admin] Add user to group',
848
- ' removeuser <id> <user> [admin] Remove user from group',
849
- ],
850
- examples: ['groups list', 'groups search all_users', 'groups inspect', 'group members 3'],
912
+ ' inspect [<group>] Show group identity, or fields when omitted',
913
+ ' members <group> List users in a group',
914
+ ' create <name> [admin] Create a new group',
915
+ ' delete <id> [admin] Remove a group',
916
+ ' adduser <group> <user...> [admin] Add one or more users',
917
+ ' removeuser <group> <user...> [admin] Remove one or more users',
918
+ ],
919
+ examples: ['groups list', 'group members pacs_users', 'group adduser pacs_users peter.hong joe.schmo', 'group removeuser pacs_users joe.schmo'],
851
920
  },
852
921
  groups: {
853
922
  usage: 'groups <subcommand> [options]',
@@ -856,13 +925,14 @@ export const helpText = {
856
925
  ...RESOURCE_LIST_OPTIONS,
857
926
  '',
858
927
  'RESOURCE-SPECIFIC SUBCOMMANDS:',
859
- ' members <id> List users in a group',
860
- ' create <name> [admin] Create a new group',
861
- ' delete <id> [admin] Remove a group',
862
- ' adduser <id> <user> [admin] Add user to group',
863
- ' removeuser <id> <user> [admin] Remove user from group',
864
- ],
865
- examples: ['groups list', 'groups search all_users', 'groups inspect', 'group members 3'],
928
+ ' inspect [<group>] Show group identity, or fields when omitted',
929
+ ' members <group> List users in a group',
930
+ ' create <name> [admin] Create a new group',
931
+ ' delete <id> [admin] Remove a group',
932
+ ' adduser <group> <user...> [admin] Add one or more users',
933
+ ' removeuser <group> <user...> [admin] Remove one or more users',
934
+ ],
935
+ examples: ['groups list', 'group members pacs_users', 'group adduser pacs_users peter.hong joe.schmo', 'group removeuser pacs_users joe.schmo'],
866
936
  },
867
937
  pluginmeta: {
868
938
  usage: 'pluginmetas <subcommand> [options]',
@@ -1005,11 +1075,16 @@ export const helpText = {
1005
1075
  ],
1006
1076
  },
1007
1077
  pull: {
1008
- usage: 'pull [--nowait] <vfs-path|query-expr> [...]',
1078
+ usage: 'pull [--nowait] [--retry N] [--new-feed <title> [--plugin <selector>|--pipeline <selector>] [-- <args...>]] <vfs-path|query-expr> [...]',
1009
1079
  description: 'Pull PACS series into ChRIS storage; accepts VFS paths or query expressions (blocking)',
1010
1080
  options: [
1011
1081
  '--nowait Fire retrieves and exit immediately; prints <seriesUID> <retrieveId> per line',
1012
1082
  '--retry N Re-fire retrieves for [NO LONK] series up to N additional times',
1083
+ '--new-feed <title> Create one named feed from the complete retrieved selection',
1084
+ '--plugin <selector> Attach one plugin to the new Feed root',
1085
+ '--pipeline <selector> Attach one pipeline to the new Feed root',
1086
+ '-- <args...> Forward remaining tokens to the selected analysis',
1087
+ ' (cannot be combined with --nowait)',
1013
1088
  '--help Show this help',
1014
1089
  ],
1015
1090
  examples: [
@@ -1028,6 +1103,7 @@ export const helpText = {
1028
1103
  '# Pull directly from a query expression (creates query, waits, then pulls)',
1029
1104
  'pull PatientID:1234',
1030
1105
  'pull AccessionNumber:12345678',
1106
+ 'pull AccessionNumber:12345678 --new-feed "Brain MRI"',
1031
1107
  '',
1032
1108
  '# Fire-and-forget (scripted)',
1033
1109
  'pull --nowait /net/pacs/queries/42_AccessionNumber:12345678',
@@ -1180,21 +1256,49 @@ export function pipelineExecutableHelp_render(name) {
1180
1256
  'INSPECTION:',
1181
1257
  ' --nodes, --parameters Show pipeline nodes and parameters',
1182
1258
  ' --source, --readme Show the pipeline YAML source',
1259
+ ' --manifest Emit complete registered invocation YAML',
1183
1260
  '',
1184
1261
  'EXECUTION:',
1185
1262
  ' --compute <resource> Override the compute resource',
1186
1263
  ' --previous <inst_id> Attach to an explicit plugin instance',
1264
+ ' --paramFile <cfs-file> Apply one sparse YAML invocation overlay',
1265
+ ' --<node>.<parameter> <value> Override a hosted parameter',
1266
+ ' --<node>.<control> <value> Override a node execution control',
1187
1267
  ],
1188
1268
  examples: [
1189
1269
  `${name} --diagram`,
1190
1270
  `${name} --diagram --withargs`,
1191
1271
  `${name} --signalflow | signalflow -`,
1192
1272
  `${name} --source`,
1273
+ `${name} --manifest`,
1193
1274
  `${name} --previous 123`,
1194
1275
  ],
1195
1276
  };
1196
1277
  return `${commandHelp_render(name, help)}\n`;
1197
1278
  }
1279
+ /**
1280
+ * Renders contextual help for one versioned plugin executable.
1281
+ *
1282
+ * @param name - Plugin executable name as exposed in `/bin`.
1283
+ * @returns Plugin-specific help text, terminated with a newline.
1284
+ */
1285
+ export function pluginExecutableHelp_render(name) {
1286
+ const help = {
1287
+ usage: `${name} <operation>`,
1288
+ description: 'Inspect this registered CUBE plugin version.',
1289
+ options: [
1290
+ ' --parameters Show parameter definitions for this plugin version',
1291
+ ' --readme Show the rendered plugin README',
1292
+ ' --readme --raw Output raw README markdown for piping',
1293
+ ],
1294
+ examples: [
1295
+ `${name} --parameters`,
1296
+ `${name} --readme`,
1297
+ `${name} --readme --raw | glow -`,
1298
+ ],
1299
+ };
1300
+ return `${commandHelp_render(name, help)}\n`;
1301
+ }
1198
1302
  /**
1199
1303
  * Renders a command's help text as a string.
1200
1304
  *
@@ -1243,6 +1347,9 @@ export async function builtin_help(args) {
1243
1347
  const commandName = args.length > 0 ? args.join(' ') : undefined;
1244
1348
  // If a specific command is requested, return its help
1245
1349
  if (commandName) {
1350
+ if (/-v[^/]+$/.test(commandName)) {
1351
+ return { status: 'ok', rendered: pluginExecutableHelp_render(commandName) };
1352
+ }
1246
1353
  return { status: 'ok', rendered: help_render(commandName) };
1247
1354
  }
1248
1355
  // Otherwise, list all available commands
@@ -1255,11 +1362,12 @@ export async function builtin_help(args) {
1255
1362
  const categories = {
1256
1363
  Navigation: ['cd', 'pwd', 'ls', 'tree', 'du'],
1257
1364
  'File Operations': ['cat', 'edit', 'cp', 'mv', 'rm', 'touch', 'mkdir', 'upload', 'download'],
1258
- Connection: ['connect', 'logout', 'context', 'whoami', 'whereami'],
1365
+ Connection: ['connect', 'logout', 'context', 'id', 'whoami', 'whereami'],
1259
1366
  Monitoring: ['proc'],
1260
1367
  'Single Resource': ['plugin', 'pipeline', 'feed', 'tag', 'group', 'pluginmeta', 'plugininstance', 'workflow'],
1261
1368
  'Resource Collections': ['plugins', 'feeds', 'files', 'links', 'dirs', 'store', 'compute', 'tags', 'groups', 'pluginmetas', 'plugininstances', 'workflows', 'parametersofplugin'],
1262
1369
  PACS: ['pacs', 'pacsservers', 'pacsqueries', 'pacsretrieve'],
1370
+ Administration: ['sudo', 'user'],
1263
1371
  'Shell Settings': ['physicalmode', 'prompt', 'timing', 'debug'],
1264
1372
  General: ['help', 'date', 'cal', 'fortune', 'exit', '!'],
1265
1373
  };