@fnndsc/salsa 4.5.7 → 4.6.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/README.md +0 -2
- package/dist/compute/index.d.ts +0 -9
- package/dist/compute/index.js +0 -16
- package/dist/compute/index.js.map +1 -1
- package/dist/dag/feedData.js +166 -73
- package/dist/dag/feedData.js.map +1 -1
- package/dist/dag/feedLoad.d.ts +1 -1
- package/dist/dag/feedLoad.js +6 -4
- package/dist/dag/feedLoad.js.map +1 -1
- package/dist/dicom/pixels.js +95 -36
- package/dist/dicom/pixels.js.map +1 -1
- package/dist/dicom/series.d.ts +4 -1
- package/dist/dicom/series.js +80 -31
- package/dist/dicom/series.js.map +1 -1
- package/dist/dicom/tags.d.ts +28 -0
- package/dist/dicom/tags.js +30 -0
- package/dist/dicom/tags.js.map +1 -1
- package/dist/files/copy.d.ts +197 -0
- package/dist/files/copy.js +636 -0
- package/dist/files/copy.js.map +1 -0
- package/dist/files/copyFolder.d.ts +103 -0
- package/dist/files/copyFolder.js +199 -0
- package/dist/files/copyFolder.js.map +1 -0
- package/dist/files/create.d.ts +178 -0
- package/dist/files/create.js +444 -0
- package/dist/files/create.js.map +1 -0
- package/dist/files/download.d.ts +188 -0
- package/dist/files/download.js +541 -0
- package/dist/files/download.js.map +1 -0
- package/dist/files/index.d.ts +69 -141
- package/dist/files/index.js +184 -535
- package/dist/files/index.js.map +1 -1
- package/dist/files/listing.d.ts +132 -0
- package/dist/files/listing.js +179 -0
- package/dist/files/listing.js.map +1 -0
- package/dist/files/move.d.ts +125 -0
- package/dist/files/move.js +334 -0
- package/dist/files/move.js.map +1 -0
- package/dist/files/pathMapper.d.ts +24 -1
- package/dist/files/pathMapper.js +108 -47
- package/dist/files/pathMapper.js.map +1 -1
- package/dist/files/proof.d.ts +315 -0
- package/dist/files/proof.js +574 -0
- package/dist/files/proof.js.map +1 -0
- package/dist/files/removal.d.ts +223 -0
- package/dist/files/removal.js +318 -0
- package/dist/files/removal.js.map +1 -0
- package/dist/files/replace.d.ts +175 -0
- package/dist/files/replace.js +582 -0
- package/dist/files/replace.js.map +1 -0
- package/dist/files/upload.d.ts +205 -0
- package/dist/files/upload.js +478 -0
- package/dist/files/upload.js.map +1 -0
- package/dist/index.d.ts +14 -2
- package/dist/index.js +45 -32
- package/dist/index.js.map +1 -1
- package/dist/jobs/index.d.ts +1 -1
- package/dist/jobs/index.js +1 -2
- package/dist/jobs/index.js.map +1 -1
- package/dist/jobs/jobOps.d.ts +0 -13
- package/dist/jobs/jobOps.js +0 -37
- package/dist/jobs/jobOps.js.map +1 -1
- package/dist/pacs/anonymise.d.ts +17 -36
- package/dist/pacs/anonymise.js +29 -67
- package/dist/pacs/anonymise.js.map +1 -1
- package/dist/pipelines/index.d.ts +1 -13
- package/dist/pipelines/index.js +0 -38
- package/dist/pipelines/index.js.map +1 -1
- package/dist/pipelines/invocation.js +321 -167
- package/dist/pipelines/invocation.js.map +1 -1
- package/dist/pipelines/manifest.js.map +1 -1
- package/dist/pipelines/packages.d.ts +11 -8
- package/dist/pipelines/packages.js +253 -77
- package/dist/pipelines/packages.js.map +1 -1
- package/dist/plugins/adminToken.d.ts +67 -0
- package/dist/plugins/adminToken.js +77 -0
- package/dist/plugins/adminToken.js.map +1 -0
- package/dist/plugins/index.d.ts +0 -7
- package/dist/plugins/index.js +0 -16
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/peer_search.d.ts +0 -15
- package/dist/plugins/peer_search.js +0 -25
- package/dist/plugins/peer_search.js.map +1 -1
- package/dist/plugins/plugin_add.d.ts +14 -2
- package/dist/plugins/plugin_add.js +42 -13
- package/dist/plugins/plugin_add.js.map +1 -1
- package/dist/plugins/plugin_docker.d.ts +25 -0
- package/dist/plugins/plugin_docker.js +33 -0
- package/dist/plugins/plugin_docker.js.map +1 -1
- package/dist/plugins/plugin_register.d.ts +0 -10
- package/dist/plugins/plugin_register.js +3 -54
- package/dist/plugins/plugin_register.js.map +1 -1
- package/dist/plugins/plugin_sync.js +45 -22
- package/dist/plugins/plugin_sync.js.map +1 -1
- package/dist/plugins/plugin_validate.js +47 -13
- package/dist/plugins/plugin_validate.js.map +1 -1
- package/dist/plugins/store_import.d.ts +0 -9
- package/dist/plugins/store_import.js +3 -29
- package/dist/plugins/store_import.js.map +1 -1
- package/dist/retrieve/task.d.ts +137 -0
- package/dist/retrieve/task.js +41 -0
- package/dist/retrieve/task.js.map +1 -0
- package/dist/retrieve/watch.d.ts +2 -118
- package/dist/retrieve/watch.js +452 -321
- package/dist/retrieve/watch.js.map +1 -1
- package/dist/vfs/providers/etc.d.ts +6 -4
- package/dist/vfs/providers/etc.js +12 -4
- package/dist/vfs/providers/etc.js.map +1 -1
- package/dist/vfs/providers/native.d.ts +116 -39
- package/dist/vfs/providers/native.js +291 -347
- package/dist/vfs/providers/native.js.map +1 -1
- package/dist/vfs/providers/pacs.d.ts +29 -3
- package/dist/vfs/providers/pacs.js +303 -73
- package/dist/vfs/providers/pacs.js.map +1 -1
- package/dist/vfs/providers/pacs_content.js +22 -6
- package/dist/vfs/providers/pacs_content.js.map +1 -1
- package/dist/vfs/providers/proc/backfill.d.ts +46 -0
- package/dist/vfs/providers/proc/backfill.js +147 -0
- package/dist/vfs/providers/proc/backfill.js.map +1 -0
- package/dist/vfs/providers/proc/book.d.ts +176 -0
- package/dist/vfs/providers/proc/book.js +73 -0
- package/dist/vfs/providers/proc/book.js.map +1 -0
- package/dist/vfs/providers/proc/catchup.d.ts +69 -0
- package/dist/vfs/providers/proc/catchup.js +125 -0
- package/dist/vfs/providers/proc/catchup.js.map +1 -0
- package/dist/vfs/providers/proc/feedIndex.d.ts +146 -0
- package/dist/vfs/providers/proc/feedIndex.js +354 -0
- package/dist/vfs/providers/proc/feedIndex.js.map +1 -0
- package/dist/vfs/providers/proc/feedTopology.d.ts +85 -0
- package/dist/vfs/providers/proc/feedTopology.js +192 -0
- package/dist/vfs/providers/proc/feedTopology.js.map +1 -0
- package/dist/vfs/providers/proc/locate.d.ts +60 -0
- package/dist/vfs/providers/proc/locate.js +103 -0
- package/dist/vfs/providers/proc/locate.js.map +1 -0
- package/dist/vfs/providers/proc/path.d.ts +50 -0
- package/dist/vfs/providers/proc/path.js +106 -0
- package/dist/vfs/providers/proc/path.js.map +1 -0
- package/dist/vfs/providers/proc/roster.d.ts +95 -0
- package/dist/vfs/providers/proc/roster.js +425 -0
- package/dist/vfs/providers/proc/roster.js.map +1 -0
- package/dist/vfs/providers/proc/rows.d.ts +120 -0
- package/dist/vfs/providers/proc/rows.js +181 -0
- package/dist/vfs/providers/proc/rows.js.map +1 -0
- package/dist/vfs/providers/proc/subtree.d.ts +73 -0
- package/dist/vfs/providers/proc/subtree.js +125 -0
- package/dist/vfs/providers/proc/subtree.js.map +1 -0
- package/dist/vfs/providers/proc/sweep.d.ts +89 -0
- package/dist/vfs/providers/proc/sweep.js +297 -0
- package/dist/vfs/providers/proc/sweep.js.map +1 -0
- package/dist/vfs/providers/proc.d.ts +47 -346
- package/dist/vfs/providers/proc.js +349 -1806
- package/dist/vfs/providers/proc.js.map +1 -1
- package/dist/vfs/providers/share.js +4 -1
- package/dist/vfs/providers/share.js.map +1 -1
- package/package.json +3 -3
- package/dist/pacs/resultDecode.d.ts +0 -13
- package/dist/pacs/resultDecode.js +0 -19
- package/dist/pacs/resultDecode.js.map +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.retrieveTask_make = retrieveTask_make;
|
|
4
|
+
exports.retrieveProgress_classify = retrieveProgress_classify;
|
|
5
|
+
/**
|
|
6
|
+
* Builds a fresh retrieve task from series identity facts.
|
|
7
|
+
*
|
|
8
|
+
* @param info - Label, UIDs, PACS name, and expected file count.
|
|
9
|
+
* @returns A pending task ready for {@link retrieve_fireAndWatch}.
|
|
10
|
+
*/
|
|
11
|
+
function retrieveTask_make(info) {
|
|
12
|
+
return {
|
|
13
|
+
...info,
|
|
14
|
+
syntheticQueryId: null,
|
|
15
|
+
retrieveId: null,
|
|
16
|
+
status: 'pending',
|
|
17
|
+
actualFiles: 0,
|
|
18
|
+
lastProgressFiles: 0,
|
|
19
|
+
lastProgressTime: Date.now(),
|
|
20
|
+
firstFileTime: 0,
|
|
21
|
+
startTime: 0,
|
|
22
|
+
lonkConfirmed: false,
|
|
23
|
+
cubePathDir: null,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Classifies a task's state for progress reporting.
|
|
28
|
+
*
|
|
29
|
+
* @param task - The task to classify.
|
|
30
|
+
* @returns The progress status consumers render.
|
|
31
|
+
*/
|
|
32
|
+
function retrieveProgress_classify(task) {
|
|
33
|
+
if (task.status === 'pulled')
|
|
34
|
+
return task.lonkConfirmed ? 'done' : 'unconfirmed';
|
|
35
|
+
if (task.status === 'pending' || task.status === 'pulling')
|
|
36
|
+
return 'running';
|
|
37
|
+
if (task.status === 'unfired')
|
|
38
|
+
return 'error';
|
|
39
|
+
return task.status;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../src/retrieve/task.ts"],"names":[],"mappings":";;AAkIA,8CAoBC;AAQD,8DAKC;AAvCD;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,IAMjC;IACC,OAAO;QACL,GAAG,IAAI;QACP,gBAAgB,EAAE,IAAI;QACtB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE,CAAC;QACd,iBAAiB,EAAE,CAAC;QACpB,gBAAgB,EAAE,IAAI,CAAC,GAAG,EAAE;QAC5B,aAAa,EAAE,CAAC;QAChB,SAAS,EAAE,CAAC;QACZ,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,IAAI;KAClB,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAgB,yBAAyB,CAAC,IAAkB;IAC1D,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC;IACjF,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7E,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IAC9C,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB,CAAC"}
|
package/dist/retrieve/watch.d.ts
CHANGED
|
@@ -1,122 +1,6 @@
|
|
|
1
1
|
import { type Client } from '@fnndsc/cumin';
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* `unconfirmed` is the state of a series the client stopped watching before it
|
|
6
|
-
* could see the end. It is not a failure: the PACS keeps pushing and CUBE keeps
|
|
7
|
-
* registering after a watch ends, so the retrieve is very likely still running
|
|
8
|
-
* or already done. Reporting such a series as `error` claims knowledge the
|
|
9
|
-
* client does not have, and a caller that treats it as failure will tell an
|
|
10
|
-
* operator that nothing arrived while the files land behind them.
|
|
11
|
-
*/
|
|
12
|
-
export type RetrieveStatus = 'pending' | 'pulling' | 'pulled' | 'stalled' | 'timeout' | 'error' | 'unfired' | 'unconfirmed';
|
|
13
|
-
/** Progress classification reported to event consumers. */
|
|
14
|
-
export type RetrieveProgressStatus = 'running' | 'done' | 'unconfirmed' | 'error' | 'stalled' | 'timeout';
|
|
15
|
-
/**
|
|
16
|
-
* Why a series ended `unconfirmed`, as a fact a surface can choose its words
|
|
17
|
-
* by: the PACS sent nothing of it while it was waited on (`pacsSilent`), or
|
|
18
|
-
* the watch on CUBE's progress was lost while it was in flight
|
|
19
|
-
* (`watchLost`). The first is a series nothing is known to be coming for;
|
|
20
|
-
* the second is one whose files may still be arriving.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* const cause: RetrieveEndCause = 'pacsSilent';
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export type RetrieveEndCause = 'pacsSilent' | 'watchLost';
|
|
28
|
-
/**
|
|
29
|
-
* Runtime state for a single series being retrieved.
|
|
30
|
-
*
|
|
31
|
-
* @property label - Display label for progress and summaries.
|
|
32
|
-
* @property seriesUID - DICOM SeriesInstanceUID.
|
|
33
|
-
* @property studyUID - DICOM StudyInstanceUID.
|
|
34
|
-
* @property pacsName - PACS identifier (`pacs_name` for LONK subscriptions).
|
|
35
|
-
* @property expectedFiles - File count from the originating query decode.
|
|
36
|
-
* @property syntheticQueryId - ID of the per-series synthetic PACSQuery.
|
|
37
|
-
* @property retrieveId - ID of the PACSRetrieve created for it.
|
|
38
|
-
* @property status - Current lifecycle status.
|
|
39
|
-
* @property actualFiles - Most recent file count from LONK progress updates.
|
|
40
|
-
* @property lastProgressFiles - `actualFiles` at the last progress tick (stall detection).
|
|
41
|
-
* @property lastProgressTime - Timestamp of the last progress tick.
|
|
42
|
-
* @property firstFileTime - When this series' first file arrived; 0 while it
|
|
43
|
-
* is still waiting its turn. The long stop counts from here, so a series
|
|
44
|
-
* queued behind a dozen others is not charged for the wait.
|
|
45
|
-
* @property startTime - Timestamp when the retrieve was fired.
|
|
46
|
-
* @property lonkConfirmed - True only after an explicit LONK `done` or a storage confirmation.
|
|
47
|
-
* @property cubePathDir - CUBE folder the series landed in (resolved post-pull).
|
|
48
|
-
* @property reason - Why a series ended badly, in words a surface can show
|
|
49
|
-
* (an ERROR that cannot say why is the defect this field closes).
|
|
50
|
-
* @property endCause - Why a series ended `unconfirmed`; absent for any
|
|
51
|
-
* other end.
|
|
52
|
-
*/
|
|
53
|
-
export interface RetrieveTask {
|
|
54
|
-
label: string;
|
|
55
|
-
seriesUID: string;
|
|
56
|
-
studyUID: string;
|
|
57
|
-
pacsName: string;
|
|
58
|
-
expectedFiles: number;
|
|
59
|
-
syntheticQueryId: number | null;
|
|
60
|
-
retrieveId: number | null;
|
|
61
|
-
status: RetrieveStatus;
|
|
62
|
-
actualFiles: number;
|
|
63
|
-
lastProgressFiles: number;
|
|
64
|
-
lastProgressTime: number;
|
|
65
|
-
firstFileTime: number;
|
|
66
|
-
startTime: number;
|
|
67
|
-
lonkConfirmed: boolean;
|
|
68
|
-
cubePathDir: string | null;
|
|
69
|
-
reason?: string;
|
|
70
|
-
endCause?: RetrieveEndCause;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Consumer callbacks for engine progress.
|
|
74
|
-
*
|
|
75
|
-
* @property task - One series changed state or progressed.
|
|
76
|
-
* @property retryRound - A refire round for unconfirmed series is starting.
|
|
77
|
-
*/
|
|
78
|
-
export interface RetrieveWatchEvents {
|
|
79
|
-
task?: (task: RetrieveTask, status: RetrieveProgressStatus, phase: 'watching' | 'retrying') => void;
|
|
80
|
-
retryRound?: (attempt: number, retryMax: number, count: number) => void;
|
|
81
|
-
/**
|
|
82
|
-
* The watch socket dropped and is being reopened. Reported because a silent
|
|
83
|
-
* reconnection during a long pull looks identical to a stall.
|
|
84
|
-
*/
|
|
85
|
-
reconnect?: (attempt: number, maxAttempts: number, watching: number) => void;
|
|
86
|
-
/**
|
|
87
|
-
* The PACS has sent nothing for a while and CUBE does not have these
|
|
88
|
-
* series either: whether to keep waiting. A surface that can be asked
|
|
89
|
-
* answers it (the operator decides, never a timer). A caller with nobody
|
|
90
|
-
* to ask (a script, a line in the background) leaves this out: the watch
|
|
91
|
-
* waits its longer window and calls the silent series unconfirmed.
|
|
92
|
-
*
|
|
93
|
-
* @param waiting - The series still waiting on a first file.
|
|
94
|
-
* @param waitedS - How long the PACS has been silent, in seconds: the whole
|
|
95
|
-
* silence, however many times the answer was to keep waiting.
|
|
96
|
-
* @returns True to keep waiting another window.
|
|
97
|
-
*/
|
|
98
|
-
stillWaiting?: (waiting: RetrieveTask[], waitedS: number) => Promise<boolean>;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Builds a fresh retrieve task from series identity facts.
|
|
102
|
-
*
|
|
103
|
-
* @param info - Label, UIDs, PACS name, and expected file count.
|
|
104
|
-
* @returns A pending task ready for {@link retrieve_fireAndWatch}.
|
|
105
|
-
*/
|
|
106
|
-
export declare function retrieveTask_make(info: {
|
|
107
|
-
label: string;
|
|
108
|
-
seriesUID: string;
|
|
109
|
-
studyUID: string;
|
|
110
|
-
pacsName: string;
|
|
111
|
-
expectedFiles: number;
|
|
112
|
-
}): RetrieveTask;
|
|
113
|
-
/**
|
|
114
|
-
* Classifies a task's state for progress reporting.
|
|
115
|
-
*
|
|
116
|
-
* @param task - The task to classify.
|
|
117
|
-
* @returns The progress status consumers render.
|
|
118
|
-
*/
|
|
119
|
-
export declare function retrieveProgress_classify(task: RetrieveTask): RetrieveProgressStatus;
|
|
2
|
+
import { type RetrieveTask, type RetrieveWatchEvents } from './task.js';
|
|
3
|
+
export * from './task.js';
|
|
120
4
|
/**
|
|
121
5
|
* Marks tasks whose series are already fully registered in CUBE as pulled,
|
|
122
6
|
* so firing skips them. This is what makes a retrieve idempotent: re-running
|