@fnndsc/menu 0.3.1 → 0.5.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/messages.js CHANGED
@@ -328,17 +328,75 @@ export const errorMessageSchema = z.object({
328
328
  id: z.string().optional(),
329
329
  reason: z.string(),
330
330
  });
331
+ /**
332
+ * What a question is asking FOR.
333
+ *
334
+ * A surface chooses its instrument from this rather than by reading the
335
+ * wording: a location wants a browser to walk, a secret wants a masked
336
+ * field, a yes/no wants two capsules. Open-world, degrading to `text` —
337
+ * every surface can answer text, so a kind from a newer daemon leaves the
338
+ * question answerable rather than refused.
339
+ */
340
+ export const PROMPT_KINDS = ['text', 'secret', 'confirm', 'path'];
341
+ export const promptKindSchema = z.enum(PROMPT_KINDS).catch('text');
342
+ /**
343
+ * What a location ask needs beyond its wording.
344
+ *
345
+ * @property anchor - Where browsing starts. A fact the kernel knows (the
346
+ * session's own cwd), never a directory invented for the occasion.
347
+ * @property wantsDirectory - True when a directory is the answer; false
348
+ * when a file is, in which case `suggest` names it.
349
+ * @property suggest - A basename to offer, so committing on a directory
350
+ * composes a complete path and renaming is one gesture rather than
351
+ * typing the whole thing.
352
+ */
353
+ export const promptPathSchema = z.object({
354
+ anchor: z.string().optional(),
355
+ wantsDirectory: z.boolean(),
356
+ suggest: z.string().optional(),
357
+ });
331
358
  /**
332
359
  * A prompt request the daemon raises during a command: the surface that
333
360
  * submitted the command must answer it (with `promptAnswer`) before the
334
361
  * command can proceed. `hidden` requests no-echo entry (password).
362
+ *
363
+ * `wants`, `path` and `commit` are optional so a daemon or a surface that
364
+ * predates typed asks still parses this message and still answers it —
365
+ * such a daemon could only ever have meant `text`, or `secret` when it set
366
+ * `hidden`.
335
367
  */
336
368
  export const promptMessageSchema = z.object({
337
369
  type: z.literal('prompt'),
338
370
  promptId: z.string(),
339
371
  message: z.string(),
340
372
  hidden: z.boolean(),
373
+ /** What kind of value answers this. Absent means text, or secret when hidden. */
374
+ wants: promptKindSchema.optional(),
375
+ /** Present when `wants` is `path`: where to start, and what to compose. */
376
+ path: promptPathSchema.optional(),
377
+ /**
378
+ * The word the committing control should read — `EXPORT HERE`, `UPLOAD
379
+ * HERE`. A control reads as what it will do next; a prompt that supplies
380
+ * none leaves the surface to say `USE THIS`.
381
+ */
382
+ commit: z.string().optional(),
341
383
  });
384
+ /**
385
+ * The kind a prompt is asking for, derived once for every surface.
386
+ *
387
+ * `hidden` predates `wants` and remains the older wire's only way to say
388
+ * "secret", so the two are reconciled here rather than in each surface —
389
+ * two readings of one message is how a terminal and a browser end up
390
+ * masking different things.
391
+ *
392
+ * @param prompt - The prompt as it arrived.
393
+ * @returns The kind of value that answers it.
394
+ */
395
+ export function promptKind_of(prompt) {
396
+ if (prompt.wants !== undefined)
397
+ return prompt.wants;
398
+ return prompt.hidden === true ? 'secret' : 'text';
399
+ }
342
400
  /**
343
401
  * The engine-known facts a prompt reflects, independent of any theme.
344
402
  *
@@ -365,8 +423,16 @@ export const promptContextSchema = z.object({
365
423
  id: z.number(),
366
424
  loaded: z.number(),
367
425
  total: z.number(),
426
+ failed: z.string().optional(),
368
427
  }).optional(),
428
+ feeds: z.array(z.object({
429
+ id: z.number(),
430
+ loaded: z.number(),
431
+ total: z.number(),
432
+ failed: z.string().optional(),
433
+ })).optional(),
369
434
  arrived: z.array(z.number()).optional(),
435
+ roster: z.enum(['delta', 'full']).optional(),
370
436
  }).optional(),
371
437
  procIndex: z.object({
372
438
  jobs: z.number(),
@@ -1 +1 @@
1
- {"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,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acs.d.ts CHANGED
@@ -23,16 +23,16 @@ export declare const pacsSeriesSchema: z.ZodObject<{
23
23
  /** How many files CUBE holds, when known. */
24
24
  pulledFiles: z.ZodOptional<z.ZodNumber>;
25
25
  }, "strip", z.ZodTypeAny, {
26
- seriesUID: string;
27
26
  description: string;
27
+ seriesUID: string;
28
28
  modality: string;
29
29
  vfsPath?: string | undefined;
30
30
  fileCount?: number | undefined;
31
31
  pulled?: boolean | undefined;
32
32
  pulledFiles?: number | undefined;
33
33
  }, {
34
- seriesUID: string;
35
34
  description: string;
35
+ seriesUID: string;
36
36
  modality: string;
37
37
  vfsPath?: string | undefined;
38
38
  fileCount?: number | undefined;
@@ -42,6 +42,14 @@ export declare const pacsSeriesSchema: z.ZodObject<{
42
42
  /** One found study and its series. */
43
43
  export declare const pacsStudySchema: z.ZodObject<{
44
44
  studyUID: z.ZodOptional<z.ZodString>;
45
+ /**
46
+ * The PACS that answered for this study, as its canonical identifier.
47
+ *
48
+ * Present when the answer could have come from more than one server —
49
+ * which is when it matters, because two servers may hold the same study
50
+ * and a row that cannot say which one it came from cannot be acted on.
51
+ */
52
+ server: z.ZodOptional<z.ZodString>;
45
53
  /** The study's VFS path under the query — a study-level pull's argument. */
46
54
  vfsPath: z.ZodOptional<z.ZodString>;
47
55
  description: z.ZodString;
@@ -62,16 +70,16 @@ export declare const pacsStudySchema: z.ZodObject<{
62
70
  /** How many files CUBE holds, when known. */
63
71
  pulledFiles: z.ZodOptional<z.ZodNumber>;
64
72
  }, "strip", z.ZodTypeAny, {
65
- seriesUID: string;
66
73
  description: string;
74
+ seriesUID: string;
67
75
  modality: string;
68
76
  vfsPath?: string | undefined;
69
77
  fileCount?: number | undefined;
70
78
  pulled?: boolean | undefined;
71
79
  pulledFiles?: number | undefined;
72
80
  }, {
73
- seriesUID: string;
74
81
  description: string;
82
+ seriesUID: string;
75
83
  modality: string;
76
84
  vfsPath?: string | undefined;
77
85
  fileCount?: number | undefined;
@@ -81,8 +89,8 @@ export declare const pacsStudySchema: z.ZodObject<{
81
89
  }, "strip", z.ZodTypeAny, {
82
90
  date: string;
83
91
  series: {
84
- seriesUID: string;
85
92
  description: string;
93
+ seriesUID: string;
86
94
  modality: string;
87
95
  vfsPath?: string | undefined;
88
96
  fileCount?: number | undefined;
@@ -96,11 +104,12 @@ export declare const pacsStudySchema: z.ZodObject<{
96
104
  accession: string;
97
105
  vfsPath?: string | undefined;
98
106
  studyUID?: string | undefined;
107
+ server?: string | undefined;
99
108
  }, {
100
109
  date: string;
101
110
  series: {
102
- seriesUID: string;
103
111
  description: string;
112
+ seriesUID: string;
104
113
  modality: string;
105
114
  vfsPath?: string | undefined;
106
115
  fileCount?: number | undefined;
@@ -114,6 +123,142 @@ export declare const pacsStudySchema: z.ZodObject<{
114
123
  accession: string;
115
124
  vfsPath?: string | undefined;
116
125
  studyUID?: string | undefined;
126
+ server?: string | undefined;
127
+ }>;
128
+ /**
129
+ * Where an answer came from: the PACS just now, or a query already stored.
130
+ *
131
+ * CUBE keeps every query it has run, so a question asked before can be
132
+ * answered without troubling the PACS. Which of the two happened is a fact
133
+ * about the answer, and it belongs on the model rather than in each
134
+ * surface's rendering: chell says it in a sentence, argus in a pill, and
135
+ * anything later in whatever voice it has — but all of them from one
136
+ * timestamp, said once by the kernel that knows it.
137
+ */
138
+ export declare const pacsProvenanceSchema: z.ZodObject<{
139
+ /** True when this answer came from a stored query rather than the PACS. */
140
+ replayed: z.ZodBoolean;
141
+ /**
142
+ * When the PACS actually answered, as an ISO timestamp.
143
+ *
144
+ * The age is stated and never acted on. A query naming an accession is a
145
+ * fact about a study that exists; one naming an MRN can gain a match
146
+ * tomorrow. No heuristic separates those reliably, so the surface says
147
+ * how old an answer is and leaves the judgement with the operator.
148
+ */
149
+ answeredAt: z.ZodString;
150
+ }, "strip", z.ZodTypeAny, {
151
+ replayed: boolean;
152
+ answeredAt: string;
153
+ }, {
154
+ replayed: boolean;
155
+ answeredAt: string;
156
+ }>;
157
+ /**
158
+ * What became of one patient in a query.
159
+ *
160
+ * Three states, not two. A query that could not be asked is not a query
161
+ * that found nothing: rendering a timeout as `0` is exactly the confident
162
+ * stale answer the replay work exists to refuse. The MRNs that come back
163
+ * are by definition the ones WITH imaging, which makes the answer an
164
+ * operator usually wants — the ones without — the invisible half unless
165
+ * absence is a state the model can say.
166
+ */
167
+ export declare const PACS_PATIENT_STATUSES: readonly ["found", "none", "unasked"];
168
+ /**
169
+ * Open-world, degrading to `unasked`.
170
+ *
171
+ * A status this contract does not know is one this surface cannot claim an
172
+ * answer for, and `unasked` is the only degrade that never reads as a
173
+ * confident zero.
174
+ */
175
+ export declare const pacsPatientStatusSchema: z.ZodCatch<z.ZodEnum<["found", "none", "unasked"]>>;
176
+ /**
177
+ * One patient the query asked about — found, empty-handed, or unreachable.
178
+ *
179
+ * The studies themselves stay where they are, on the model, each carrying
180
+ * its own `patientId`. This level is not a container for them; it is the
181
+ * record of what was ASKED, which is why it exists at all: a miss owns no
182
+ * study, so a level derived from the studies could never mention it.
183
+ */
184
+ export declare const pacsPatientSchema: z.ZodObject<{
185
+ /** The identifier as the operator asked it, never normalized. */
186
+ patientId: z.ZodString;
187
+ /**
188
+ * The PACS this row asked. One patient asked of two servers is two rows,
189
+ * because the answers are two facts and one of them may be a miss.
190
+ */
191
+ server: z.ZodOptional<z.ZodString>;
192
+ /** The name the PACS answered with, when it answered at all. */
193
+ patientName: z.ZodOptional<z.ZodString>;
194
+ status: z.ZodCatch<z.ZodEnum<["found", "none", "unasked"]>>;
195
+ /** How many studies this patient owns in the answer; 0 for a miss. */
196
+ studyCount: z.ZodNumber;
197
+ /** How many series across those studies; 0 for a miss. */
198
+ seriesCount: z.ZodNumber;
199
+ /**
200
+ * The CUBE query that answered for this patient. A cohort is N queries,
201
+ * so the id belongs per row rather than on the model.
202
+ */
203
+ queryId: z.ZodOptional<z.ZodNumber>;
204
+ /**
205
+ * Where this row's answer came from. A fan-out replays some rows and
206
+ * troubles the PACS for others, so provenance is per patient as well as
207
+ * per answer.
208
+ */
209
+ provenance: z.ZodOptional<z.ZodObject<{
210
+ /** True when this answer came from a stored query rather than the PACS. */
211
+ replayed: z.ZodBoolean;
212
+ /**
213
+ * When the PACS actually answered, as an ISO timestamp.
214
+ *
215
+ * The age is stated and never acted on. A query naming an accession is a
216
+ * fact about a study that exists; one naming an MRN can gain a match
217
+ * tomorrow. No heuristic separates those reliably, so the surface says
218
+ * how old an answer is and leaves the judgement with the operator.
219
+ */
220
+ answeredAt: z.ZodString;
221
+ }, "strip", z.ZodTypeAny, {
222
+ replayed: boolean;
223
+ answeredAt: string;
224
+ }, {
225
+ replayed: boolean;
226
+ answeredAt: string;
227
+ }>>;
228
+ /**
229
+ * Why a patient went unasked, when something said why.
230
+ *
231
+ * Carried so a surface can name the failure rather than showing an
232
+ * unexplained dash; never set for `found` or `none`, where there is
233
+ * nothing to explain.
234
+ */
235
+ error: z.ZodOptional<z.ZodString>;
236
+ }, "strip", z.ZodTypeAny, {
237
+ status: "found" | "none" | "unasked";
238
+ patientId: string;
239
+ studyCount: number;
240
+ seriesCount: number;
241
+ error?: string | undefined;
242
+ server?: string | undefined;
243
+ patientName?: string | undefined;
244
+ queryId?: number | undefined;
245
+ provenance?: {
246
+ replayed: boolean;
247
+ answeredAt: string;
248
+ } | undefined;
249
+ }, {
250
+ patientId: string;
251
+ studyCount: number;
252
+ seriesCount: number;
253
+ status?: unknown;
254
+ error?: string | undefined;
255
+ server?: string | undefined;
256
+ patientName?: string | undefined;
257
+ queryId?: number | undefined;
258
+ provenance?: {
259
+ replayed: boolean;
260
+ answeredAt: string;
261
+ } | undefined;
117
262
  }>;
118
263
  /**
119
264
  * The `pacs.query` model: one query's decoded result. `vfsPath` is where the
@@ -127,6 +272,14 @@ export declare const pacsQueryModelSchema: z.ZodObject<{
127
272
  expression: z.ZodString;
128
273
  studies: z.ZodArray<z.ZodObject<{
129
274
  studyUID: z.ZodOptional<z.ZodString>;
275
+ /**
276
+ * The PACS that answered for this study, as its canonical identifier.
277
+ *
278
+ * Present when the answer could have come from more than one server —
279
+ * which is when it matters, because two servers may hold the same study
280
+ * and a row that cannot say which one it came from cannot be acted on.
281
+ */
282
+ server: z.ZodOptional<z.ZodString>;
130
283
  /** The study's VFS path under the query — a study-level pull's argument. */
131
284
  vfsPath: z.ZodOptional<z.ZodString>;
132
285
  description: z.ZodString;
@@ -147,16 +300,16 @@ export declare const pacsQueryModelSchema: z.ZodObject<{
147
300
  /** How many files CUBE holds, when known. */
148
301
  pulledFiles: z.ZodOptional<z.ZodNumber>;
149
302
  }, "strip", z.ZodTypeAny, {
150
- seriesUID: string;
151
303
  description: string;
304
+ seriesUID: string;
152
305
  modality: string;
153
306
  vfsPath?: string | undefined;
154
307
  fileCount?: number | undefined;
155
308
  pulled?: boolean | undefined;
156
309
  pulledFiles?: number | undefined;
157
310
  }, {
158
- seriesUID: string;
159
311
  description: string;
312
+ seriesUID: string;
160
313
  modality: string;
161
314
  vfsPath?: string | undefined;
162
315
  fileCount?: number | undefined;
@@ -166,8 +319,8 @@ export declare const pacsQueryModelSchema: z.ZodObject<{
166
319
  }, "strip", z.ZodTypeAny, {
167
320
  date: string;
168
321
  series: {
169
- seriesUID: string;
170
322
  description: string;
323
+ seriesUID: string;
171
324
  modality: string;
172
325
  vfsPath?: string | undefined;
173
326
  fileCount?: number | undefined;
@@ -181,11 +334,12 @@ export declare const pacsQueryModelSchema: z.ZodObject<{
181
334
  accession: string;
182
335
  vfsPath?: string | undefined;
183
336
  studyUID?: string | undefined;
337
+ server?: string | undefined;
184
338
  }, {
185
339
  date: string;
186
340
  series: {
187
- seriesUID: string;
188
341
  description: string;
342
+ seriesUID: string;
189
343
  modality: string;
190
344
  vfsPath?: string | undefined;
191
345
  fileCount?: number | undefined;
@@ -199,7 +353,118 @@ export declare const pacsQueryModelSchema: z.ZodObject<{
199
353
  accession: string;
200
354
  vfsPath?: string | undefined;
201
355
  studyUID?: string | undefined;
356
+ server?: string | undefined;
202
357
  }>, "many">;
358
+ /**
359
+ * Optional so an envelope from a daemon that predates replay still
360
+ * parses: a surface reads its absence as "freshly queried, age unknown",
361
+ * which is what such a daemon could only ever have meant.
362
+ */
363
+ provenance: z.ZodOptional<z.ZodObject<{
364
+ /** True when this answer came from a stored query rather than the PACS. */
365
+ replayed: z.ZodBoolean;
366
+ /**
367
+ * When the PACS actually answered, as an ISO timestamp.
368
+ *
369
+ * The age is stated and never acted on. A query naming an accession is a
370
+ * fact about a study that exists; one naming an MRN can gain a match
371
+ * tomorrow. No heuristic separates those reliably, so the surface says
372
+ * how old an answer is and leaves the judgement with the operator.
373
+ */
374
+ answeredAt: z.ZodString;
375
+ }, "strip", z.ZodTypeAny, {
376
+ replayed: boolean;
377
+ answeredAt: string;
378
+ }, {
379
+ replayed: boolean;
380
+ answeredAt: string;
381
+ }>>;
382
+ /**
383
+ * Every patient the query asked about, hits and misses alike.
384
+ *
385
+ * Optional, like `provenance`: an envelope from a daemon that predates
386
+ * the fan-out still parses, and a surface reads its absence as the
387
+ * single-question case it could only have been.
388
+ */
389
+ patients: z.ZodOptional<z.ZodArray<z.ZodObject<{
390
+ /** The identifier as the operator asked it, never normalized. */
391
+ patientId: z.ZodString;
392
+ /**
393
+ * The PACS this row asked. One patient asked of two servers is two rows,
394
+ * because the answers are two facts and one of them may be a miss.
395
+ */
396
+ server: z.ZodOptional<z.ZodString>;
397
+ /** The name the PACS answered with, when it answered at all. */
398
+ patientName: z.ZodOptional<z.ZodString>;
399
+ status: z.ZodCatch<z.ZodEnum<["found", "none", "unasked"]>>;
400
+ /** How many studies this patient owns in the answer; 0 for a miss. */
401
+ studyCount: z.ZodNumber;
402
+ /** How many series across those studies; 0 for a miss. */
403
+ seriesCount: z.ZodNumber;
404
+ /**
405
+ * The CUBE query that answered for this patient. A cohort is N queries,
406
+ * so the id belongs per row rather than on the model.
407
+ */
408
+ queryId: z.ZodOptional<z.ZodNumber>;
409
+ /**
410
+ * Where this row's answer came from. A fan-out replays some rows and
411
+ * troubles the PACS for others, so provenance is per patient as well as
412
+ * per answer.
413
+ */
414
+ provenance: z.ZodOptional<z.ZodObject<{
415
+ /** True when this answer came from a stored query rather than the PACS. */
416
+ replayed: z.ZodBoolean;
417
+ /**
418
+ * When the PACS actually answered, as an ISO timestamp.
419
+ *
420
+ * The age is stated and never acted on. A query naming an accession is a
421
+ * fact about a study that exists; one naming an MRN can gain a match
422
+ * tomorrow. No heuristic separates those reliably, so the surface says
423
+ * how old an answer is and leaves the judgement with the operator.
424
+ */
425
+ answeredAt: z.ZodString;
426
+ }, "strip", z.ZodTypeAny, {
427
+ replayed: boolean;
428
+ answeredAt: string;
429
+ }, {
430
+ replayed: boolean;
431
+ answeredAt: string;
432
+ }>>;
433
+ /**
434
+ * Why a patient went unasked, when something said why.
435
+ *
436
+ * Carried so a surface can name the failure rather than showing an
437
+ * unexplained dash; never set for `found` or `none`, where there is
438
+ * nothing to explain.
439
+ */
440
+ error: z.ZodOptional<z.ZodString>;
441
+ }, "strip", z.ZodTypeAny, {
442
+ status: "found" | "none" | "unasked";
443
+ patientId: string;
444
+ studyCount: number;
445
+ seriesCount: number;
446
+ error?: string | undefined;
447
+ server?: string | undefined;
448
+ patientName?: string | undefined;
449
+ queryId?: number | undefined;
450
+ provenance?: {
451
+ replayed: boolean;
452
+ answeredAt: string;
453
+ } | undefined;
454
+ }, {
455
+ patientId: string;
456
+ studyCount: number;
457
+ seriesCount: number;
458
+ status?: unknown;
459
+ error?: string | undefined;
460
+ server?: string | undefined;
461
+ patientName?: string | undefined;
462
+ queryId?: number | undefined;
463
+ provenance?: {
464
+ replayed: boolean;
465
+ answeredAt: string;
466
+ } | undefined;
467
+ }>, "many">>;
203
468
  }, "strip", z.ZodTypeAny, {
204
469
  vfsPath: string;
205
470
  queryId: number;
@@ -208,8 +473,8 @@ export declare const pacsQueryModelSchema: z.ZodObject<{
208
473
  studies: {
209
474
  date: string;
210
475
  series: {
211
- seriesUID: string;
212
476
  description: string;
477
+ seriesUID: string;
213
478
  modality: string;
214
479
  vfsPath?: string | undefined;
215
480
  fileCount?: number | undefined;
@@ -223,7 +488,26 @@ export declare const pacsQueryModelSchema: z.ZodObject<{
223
488
  accession: string;
224
489
  vfsPath?: string | undefined;
225
490
  studyUID?: string | undefined;
491
+ server?: string | undefined;
226
492
  }[];
493
+ provenance?: {
494
+ replayed: boolean;
495
+ answeredAt: string;
496
+ } | undefined;
497
+ patients?: {
498
+ status: "found" | "none" | "unasked";
499
+ patientId: string;
500
+ studyCount: number;
501
+ seriesCount: number;
502
+ error?: string | undefined;
503
+ server?: string | undefined;
504
+ patientName?: string | undefined;
505
+ queryId?: number | undefined;
506
+ provenance?: {
507
+ replayed: boolean;
508
+ answeredAt: string;
509
+ } | undefined;
510
+ }[] | undefined;
227
511
  }, {
228
512
  vfsPath: string;
229
513
  queryId: number;
@@ -232,8 +516,8 @@ export declare const pacsQueryModelSchema: z.ZodObject<{
232
516
  studies: {
233
517
  date: string;
234
518
  series: {
235
- seriesUID: string;
236
519
  description: string;
520
+ seriesUID: string;
237
521
  modality: string;
238
522
  vfsPath?: string | undefined;
239
523
  fileCount?: number | undefined;
@@ -247,10 +531,95 @@ export declare const pacsQueryModelSchema: z.ZodObject<{
247
531
  accession: string;
248
532
  vfsPath?: string | undefined;
249
533
  studyUID?: string | undefined;
534
+ server?: string | undefined;
250
535
  }[];
536
+ provenance?: {
537
+ replayed: boolean;
538
+ answeredAt: string;
539
+ } | undefined;
540
+ patients?: {
541
+ patientId: string;
542
+ studyCount: number;
543
+ seriesCount: number;
544
+ status?: unknown;
545
+ error?: string | undefined;
546
+ server?: string | undefined;
547
+ patientName?: string | undefined;
548
+ queryId?: number | undefined;
549
+ provenance?: {
550
+ replayed: boolean;
551
+ answeredAt: string;
552
+ } | undefined;
553
+ }[] | undefined;
251
554
  }>;
555
+ export type PacsProvenance = z.infer<typeof pacsProvenanceSchema>;
556
+ export type PacsPatientStatus = z.infer<typeof pacsPatientStatusSchema>;
557
+ export type PacsPatient = z.infer<typeof pacsPatientSchema>;
252
558
  export type PacsSeries = z.infer<typeof pacsSeriesSchema>;
253
559
  export type PacsStudy = z.infer<typeof pacsStudySchema>;
254
560
  export type PacsQueryModel = z.infer<typeof pacsQueryModelSchema>;
561
+ /**
562
+ * One registered PACS server, as a surface needs it.
563
+ *
564
+ * The identifier is what CUBE files a query under and what `--pacsserver`
565
+ * names, so it is the value a control lowers to; the numeric id is what
566
+ * `pacs connect` has always accepted and is kept for that. Liveness is NOT
567
+ * carried: CUBE registers servers, it does not test them, and a field that
568
+ * looked like health would be a claim nobody checked.
569
+ */
570
+ export declare const pacsServerSchema: z.ZodObject<{
571
+ id: z.ZodNumber;
572
+ identifier: z.ZodString;
573
+ /** True for the server this session is currently connected to. */
574
+ active: z.ZodBoolean;
575
+ }, "strip", z.ZodTypeAny, {
576
+ id: number;
577
+ identifier: string;
578
+ active: boolean;
579
+ }, {
580
+ id: number;
581
+ identifier: string;
582
+ active: boolean;
583
+ }>;
584
+ /**
585
+ * The `pacs.servers` model: every PACS registered on this CUBE.
586
+ *
587
+ * A surface offering a choice of servers has to know what there is to
588
+ * choose from, and asking CUBE directly would reach around the session
589
+ * that owns the connection. `pacs list` already asks; it now says so in
590
+ * data as well as in text.
591
+ */
592
+ export declare const pacsServersModelSchema: z.ZodObject<{
593
+ servers: z.ZodArray<z.ZodObject<{
594
+ id: z.ZodNumber;
595
+ identifier: z.ZodString;
596
+ /** True for the server this session is currently connected to. */
597
+ active: z.ZodBoolean;
598
+ }, "strip", z.ZodTypeAny, {
599
+ id: number;
600
+ identifier: string;
601
+ active: boolean;
602
+ }, {
603
+ id: number;
604
+ identifier: string;
605
+ active: boolean;
606
+ }>, "many">;
607
+ }, "strip", z.ZodTypeAny, {
608
+ servers: {
609
+ id: number;
610
+ identifier: string;
611
+ active: boolean;
612
+ }[];
613
+ }, {
614
+ servers: {
615
+ id: number;
616
+ identifier: string;
617
+ active: boolean;
618
+ }[];
619
+ }>;
620
+ export type PacsServer = z.infer<typeof pacsServerSchema>;
621
+ export type PacsServersModel = z.infer<typeof pacsServersModelSchema>;
622
+ /** The servers model's envelope kind. */
623
+ export declare const PACS_SERVERS_MODEL_KIND: "pacs.servers";
255
624
  /** The model's envelope kind. */
256
625
  export declare const PACS_QUERY_MODEL_KIND: "pacs.query";