@fnndsc/menu 0.3.1
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 +59 -0
- package/dist/dag.d.ts +629 -0
- package/dist/dag.js +137 -0
- package/dist/dag.js.map +1 -0
- package/dist/envelope.d.ts +153 -0
- package/dist/envelope.js +44 -0
- package/dist/envelope.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/messages.d.ts +2402 -0
- package/dist/messages.js +477 -0
- package/dist/messages.js.map +1 -0
- package/dist/pacs.d.ts +256 -0
- package/dist/pacs.js +53 -0
- package/dist/pacs.js.map +1 -0
- package/dist/proc.d.ts +63 -0
- package/dist/proc.js +22 -0
- package/dist/proc.js.map +1 -0
- package/dist/progress.d.ts +38 -0
- package/dist/progress.js +43 -0
- package/dist/progress.js.map +1 -0
- package/dist/validate.d.ts +57 -0
- package/dist/validate.js +93 -0
- package/dist/validate.js.map +1 -0
- package/dist/version.d.ts +25 -0
- package/dist/version.js +28 -0
- package/dist/version.js.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,2402 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The wire-contract message schemas.
|
|
3
|
+
*
|
|
4
|
+
* Two discriminated unions, one per direction, keyed on a `type` tag:
|
|
5
|
+
* {@link clientMessageSchema} (surface → daemon) and
|
|
6
|
+
* {@link serverMessageSchema} (daemon → surface). Every request carries a
|
|
7
|
+
* correlation `id` so its reply and any streamed output can be matched to
|
|
8
|
+
* it, and output events carry the sink channel they belong to. These schemas
|
|
9
|
+
* are the single source of truth for the protocol; the human-readable
|
|
10
|
+
* description in `docs/calypso.adoc` is checked against them.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
import { z } from 'zod';
|
|
15
|
+
import { commandEnvelopeSchema } from './envelope.js';
|
|
16
|
+
/** The sink channel an output event belongs to. */
|
|
17
|
+
export declare const channelSchema: z.ZodEnum<["data", "err", "status"]>;
|
|
18
|
+
/**
|
|
19
|
+
* Capabilities an attaching surface can safely execute on its own machine.
|
|
20
|
+
*
|
|
21
|
+
* Optional throughout, and absent means false: a surface built against an older
|
|
22
|
+
* contract simply declares less, and the daemon refuses what it did not claim
|
|
23
|
+
* rather than assuming.
|
|
24
|
+
*/
|
|
25
|
+
export declare const surfaceCapabilitiesMessageSchema: z.ZodObject<{
|
|
26
|
+
shellCommands: z.ZodBoolean;
|
|
27
|
+
hiddenInput: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
/** Can put a file where its operator can reach it. */
|
|
29
|
+
fileDelivery: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Has a filesystem of its own, so it can receive many files as a directory
|
|
32
|
+
* structure. A browser cannot, and needs a directory archived into one file
|
|
33
|
+
* before it can be handed over.
|
|
34
|
+
*/
|
|
35
|
+
localFilesystem: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
shellCommands: boolean;
|
|
38
|
+
hiddenInput?: boolean | undefined;
|
|
39
|
+
fileDelivery?: boolean | undefined;
|
|
40
|
+
localFilesystem?: boolean | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
shellCommands: boolean;
|
|
43
|
+
hiddenInput?: boolean | undefined;
|
|
44
|
+
fileDelivery?: boolean | undefined;
|
|
45
|
+
localFilesystem?: boolean | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
/** Attach to a session: declares the contract version, token, and surface capabilities. */
|
|
48
|
+
export declare const attachMessageSchema: z.ZodObject<{
|
|
49
|
+
type: z.ZodLiteral<"attach">;
|
|
50
|
+
protocolVersion: z.ZodNumber;
|
|
51
|
+
token: z.ZodString;
|
|
52
|
+
session: z.ZodOptional<z.ZodString>;
|
|
53
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
shellCommands: z.ZodBoolean;
|
|
55
|
+
hiddenInput: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
/** Can put a file where its operator can reach it. */
|
|
57
|
+
fileDelivery: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
/**
|
|
59
|
+
* Has a filesystem of its own, so it can receive many files as a directory
|
|
60
|
+
* structure. A browser cannot, and needs a directory archived into one file
|
|
61
|
+
* before it can be handed over.
|
|
62
|
+
*/
|
|
63
|
+
localFilesystem: z.ZodOptional<z.ZodBoolean>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
shellCommands: boolean;
|
|
66
|
+
hiddenInput?: boolean | undefined;
|
|
67
|
+
fileDelivery?: boolean | undefined;
|
|
68
|
+
localFilesystem?: boolean | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
shellCommands: boolean;
|
|
71
|
+
hiddenInput?: boolean | undefined;
|
|
72
|
+
fileDelivery?: boolean | undefined;
|
|
73
|
+
localFilesystem?: boolean | undefined;
|
|
74
|
+
}>>;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
type: "attach";
|
|
77
|
+
protocolVersion: number;
|
|
78
|
+
token: string;
|
|
79
|
+
session?: string | undefined;
|
|
80
|
+
capabilities?: {
|
|
81
|
+
shellCommands: boolean;
|
|
82
|
+
hiddenInput?: boolean | undefined;
|
|
83
|
+
fileDelivery?: boolean | undefined;
|
|
84
|
+
localFilesystem?: boolean | undefined;
|
|
85
|
+
} | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
type: "attach";
|
|
88
|
+
protocolVersion: number;
|
|
89
|
+
token: string;
|
|
90
|
+
session?: string | undefined;
|
|
91
|
+
capabilities?: {
|
|
92
|
+
shellCommands: boolean;
|
|
93
|
+
hiddenInput?: boolean | undefined;
|
|
94
|
+
fileDelivery?: boolean | undefined;
|
|
95
|
+
localFilesystem?: boolean | undefined;
|
|
96
|
+
} | undefined;
|
|
97
|
+
}>;
|
|
98
|
+
/**
|
|
99
|
+
* Execute one input line, correlated by `id`.
|
|
100
|
+
*
|
|
101
|
+
* `instrument` marks surface-internal traffic (a panel's silent refresh, an
|
|
102
|
+
* ambient cycler) rather than something the operator said: the daemon runs
|
|
103
|
+
* it normally but keeps it off the session bus and out of scrollback, so
|
|
104
|
+
* sibling surfaces and reattach replays carry only operator activity.
|
|
105
|
+
*/
|
|
106
|
+
export declare const executeMessageSchema: z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"execute">;
|
|
108
|
+
id: z.ZodString;
|
|
109
|
+
line: z.ZodString;
|
|
110
|
+
instrument: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
id: string;
|
|
113
|
+
type: "execute";
|
|
114
|
+
line: string;
|
|
115
|
+
instrument?: boolean | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
id: string;
|
|
118
|
+
type: "execute";
|
|
119
|
+
line: string;
|
|
120
|
+
instrument?: boolean | undefined;
|
|
121
|
+
}>;
|
|
122
|
+
/** Requests cancellation of the caller's currently executing command. */
|
|
123
|
+
export declare const cancelMessageSchema: z.ZodObject<{
|
|
124
|
+
type: z.ZodLiteral<"cancel">;
|
|
125
|
+
id: z.ZodString;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
id: string;
|
|
128
|
+
type: "cancel";
|
|
129
|
+
}, {
|
|
130
|
+
id: string;
|
|
131
|
+
type: "cancel";
|
|
132
|
+
}>;
|
|
133
|
+
/** Request completion candidates for a partial line, correlated by `id`. */
|
|
134
|
+
export declare const completeRequestSchema: z.ZodObject<{
|
|
135
|
+
type: z.ZodLiteral<"complete">;
|
|
136
|
+
id: z.ZodString;
|
|
137
|
+
prefix: z.ZodString;
|
|
138
|
+
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
id: string;
|
|
140
|
+
type: "complete";
|
|
141
|
+
prefix: string;
|
|
142
|
+
}, {
|
|
143
|
+
id: string;
|
|
144
|
+
type: "complete";
|
|
145
|
+
prefix: string;
|
|
146
|
+
}>;
|
|
147
|
+
/** Answers a prompt the daemon requested during a command, correlated by `promptId`. */
|
|
148
|
+
export declare const promptAnswerMessageSchema: z.ZodObject<{
|
|
149
|
+
type: z.ZodLiteral<"promptAnswer">;
|
|
150
|
+
promptId: z.ZodString;
|
|
151
|
+
answer: z.ZodString;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
type: "promptAnswer";
|
|
154
|
+
promptId: string;
|
|
155
|
+
answer: string;
|
|
156
|
+
}, {
|
|
157
|
+
type: "promptAnswer";
|
|
158
|
+
promptId: string;
|
|
159
|
+
answer: string;
|
|
160
|
+
}>;
|
|
161
|
+
/** Reports a prompt failure to the daemon (surface cannot or did not answer), correlated by `promptId`. */
|
|
162
|
+
export declare const promptErrorMessageSchema: z.ZodObject<{
|
|
163
|
+
type: z.ZodLiteral<"promptError">;
|
|
164
|
+
promptId: z.ZodString;
|
|
165
|
+
reason: z.ZodString;
|
|
166
|
+
}, "strip", z.ZodTypeAny, {
|
|
167
|
+
type: "promptError";
|
|
168
|
+
promptId: string;
|
|
169
|
+
reason: string;
|
|
170
|
+
}, {
|
|
171
|
+
type: "promptError";
|
|
172
|
+
promptId: string;
|
|
173
|
+
reason: string;
|
|
174
|
+
}>;
|
|
175
|
+
/** Returns the output of a pipeline segment the daemon asked the surface to run, correlated by `pipeId`. */
|
|
176
|
+
export declare const pipeResultMessageSchema: z.ZodObject<{
|
|
177
|
+
type: z.ZodLiteral<"pipeResult">;
|
|
178
|
+
pipeId: z.ZodString;
|
|
179
|
+
output: z.ZodString;
|
|
180
|
+
}, "strip", z.ZodTypeAny, {
|
|
181
|
+
type: "pipeResult";
|
|
182
|
+
pipeId: string;
|
|
183
|
+
output: string;
|
|
184
|
+
}, {
|
|
185
|
+
type: "pipeResult";
|
|
186
|
+
pipeId: string;
|
|
187
|
+
output: string;
|
|
188
|
+
}>;
|
|
189
|
+
/** Returns a pipeline-segment failure to the daemon, correlated by `pipeId`. */
|
|
190
|
+
export declare const pipeErrorMessageSchema: z.ZodObject<{
|
|
191
|
+
type: z.ZodLiteral<"pipeError">;
|
|
192
|
+
pipeId: z.ZodString;
|
|
193
|
+
reason: z.ZodString;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
type: "pipeError";
|
|
196
|
+
reason: string;
|
|
197
|
+
pipeId: string;
|
|
198
|
+
}, {
|
|
199
|
+
type: "pipeError";
|
|
200
|
+
reason: string;
|
|
201
|
+
pipeId: string;
|
|
202
|
+
}>;
|
|
203
|
+
/** Returns the exit code of a shell command the daemon asked the surface to run. */
|
|
204
|
+
export declare const shellResultMessageSchema: z.ZodObject<{
|
|
205
|
+
type: z.ZodLiteral<"shellResult">;
|
|
206
|
+
shellId: z.ZodString;
|
|
207
|
+
exitCode: z.ZodNumber;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
type: "shellResult";
|
|
210
|
+
shellId: string;
|
|
211
|
+
exitCode: number;
|
|
212
|
+
}, {
|
|
213
|
+
type: "shellResult";
|
|
214
|
+
shellId: string;
|
|
215
|
+
exitCode: number;
|
|
216
|
+
}>;
|
|
217
|
+
/** Returns a surface shell-launch failure to the daemon, correlated by `shellId`. */
|
|
218
|
+
export declare const shellErrorMessageSchema: z.ZodObject<{
|
|
219
|
+
type: z.ZodLiteral<"shellError">;
|
|
220
|
+
shellId: z.ZodString;
|
|
221
|
+
reason: z.ZodString;
|
|
222
|
+
}, "strip", z.ZodTypeAny, {
|
|
223
|
+
type: "shellError";
|
|
224
|
+
reason: string;
|
|
225
|
+
shellId: string;
|
|
226
|
+
}, {
|
|
227
|
+
type: "shellError";
|
|
228
|
+
reason: string;
|
|
229
|
+
shellId: string;
|
|
230
|
+
}>;
|
|
231
|
+
/** Returns the edited content from a local-edit the daemon requested, correlated by `editId`. */
|
|
232
|
+
export declare const editResultMessageSchema: z.ZodObject<{
|
|
233
|
+
type: z.ZodLiteral<"editResult">;
|
|
234
|
+
editId: z.ZodString;
|
|
235
|
+
content: z.ZodString;
|
|
236
|
+
changed: z.ZodBoolean;
|
|
237
|
+
}, "strip", z.ZodTypeAny, {
|
|
238
|
+
type: "editResult";
|
|
239
|
+
editId: string;
|
|
240
|
+
content: string;
|
|
241
|
+
changed: boolean;
|
|
242
|
+
}, {
|
|
243
|
+
type: "editResult";
|
|
244
|
+
editId: string;
|
|
245
|
+
content: string;
|
|
246
|
+
changed: boolean;
|
|
247
|
+
}>;
|
|
248
|
+
/** Reports a local-edit failure to the daemon, correlated by `editId`. */
|
|
249
|
+
export declare const editErrorMessageSchema: z.ZodObject<{
|
|
250
|
+
type: z.ZodLiteral<"editError">;
|
|
251
|
+
editId: z.ZodString;
|
|
252
|
+
reason: z.ZodString;
|
|
253
|
+
}, "strip", z.ZodTypeAny, {
|
|
254
|
+
type: "editError";
|
|
255
|
+
reason: string;
|
|
256
|
+
editId: string;
|
|
257
|
+
}, {
|
|
258
|
+
type: "editError";
|
|
259
|
+
reason: string;
|
|
260
|
+
editId: string;
|
|
261
|
+
}>;
|
|
262
|
+
/**
|
|
263
|
+
* Reports a completed file delivery, correlated by `deliverId`.
|
|
264
|
+
*
|
|
265
|
+
* `location` is wherever the surface can honestly say the file went — an
|
|
266
|
+
* absolute path for a filesystem, a bare filename for a browser that handed it
|
|
267
|
+
* to the download manager.
|
|
268
|
+
*/
|
|
269
|
+
export declare const deliverResultMessageSchema: z.ZodObject<{
|
|
270
|
+
type: z.ZodLiteral<"deliverResult">;
|
|
271
|
+
deliverId: z.ZodString;
|
|
272
|
+
location: z.ZodString;
|
|
273
|
+
bytes: z.ZodNumber;
|
|
274
|
+
}, "strip", z.ZodTypeAny, {
|
|
275
|
+
type: "deliverResult";
|
|
276
|
+
bytes: number;
|
|
277
|
+
deliverId: string;
|
|
278
|
+
location: string;
|
|
279
|
+
}, {
|
|
280
|
+
type: "deliverResult";
|
|
281
|
+
bytes: number;
|
|
282
|
+
deliverId: string;
|
|
283
|
+
location: string;
|
|
284
|
+
}>;
|
|
285
|
+
/** Reports a failed file delivery to the daemon, correlated by `deliverId`. */
|
|
286
|
+
export declare const deliverErrorMessageSchema: z.ZodObject<{
|
|
287
|
+
type: z.ZodLiteral<"deliverError">;
|
|
288
|
+
deliverId: z.ZodString;
|
|
289
|
+
reason: z.ZodString;
|
|
290
|
+
}, "strip", z.ZodTypeAny, {
|
|
291
|
+
type: "deliverError";
|
|
292
|
+
reason: string;
|
|
293
|
+
deliverId: string;
|
|
294
|
+
}, {
|
|
295
|
+
type: "deliverError";
|
|
296
|
+
reason: string;
|
|
297
|
+
deliverId: string;
|
|
298
|
+
}>;
|
|
299
|
+
/**
|
|
300
|
+
* The operator's regard: the addressable thing most recently indicated on a
|
|
301
|
+
* surface — a file clicked in a browser, a DAG node selected.
|
|
302
|
+
*
|
|
303
|
+
* The value is an address in the namespace (plus the model kind it was
|
|
304
|
+
* indicated through), never view-space coordinates: what has no address is
|
|
305
|
+
* view state and stays surface-side. `groupId` and `paneId` are provenance —
|
|
306
|
+
* which link group and pane the indication happened in — so session-level
|
|
307
|
+
* consumers know where regard came from without the surface's geometry ever
|
|
308
|
+
* crossing the wire.
|
|
309
|
+
*/
|
|
310
|
+
export declare const regardSchema: z.ZodObject<{
|
|
311
|
+
address: z.ZodString;
|
|
312
|
+
modelKind: z.ZodOptional<z.ZodString>;
|
|
313
|
+
groupId: z.ZodString;
|
|
314
|
+
paneId: z.ZodString;
|
|
315
|
+
}, "strip", z.ZodTypeAny, {
|
|
316
|
+
address: string;
|
|
317
|
+
groupId: string;
|
|
318
|
+
paneId: string;
|
|
319
|
+
modelKind?: string | undefined;
|
|
320
|
+
}, {
|
|
321
|
+
address: string;
|
|
322
|
+
groupId: string;
|
|
323
|
+
paneId: string;
|
|
324
|
+
modelKind?: string | undefined;
|
|
325
|
+
}>;
|
|
326
|
+
/** The session's retained regard value. */
|
|
327
|
+
export type Regard = z.infer<typeof regardSchema>;
|
|
328
|
+
/**
|
|
329
|
+
* A regard write, travelling both directions under one shape: a surface
|
|
330
|
+
* reports an indication to the daemon, and the daemon pushes the retained
|
|
331
|
+
* session regard to every surface (last write wins; a late attacher receives
|
|
332
|
+
* the retained value on attach).
|
|
333
|
+
*/
|
|
334
|
+
export declare const regardMessageSchema: z.ZodObject<{
|
|
335
|
+
type: z.ZodLiteral<"regard">;
|
|
336
|
+
regard: z.ZodObject<{
|
|
337
|
+
address: z.ZodString;
|
|
338
|
+
modelKind: z.ZodOptional<z.ZodString>;
|
|
339
|
+
groupId: z.ZodString;
|
|
340
|
+
paneId: z.ZodString;
|
|
341
|
+
}, "strip", z.ZodTypeAny, {
|
|
342
|
+
address: string;
|
|
343
|
+
groupId: string;
|
|
344
|
+
paneId: string;
|
|
345
|
+
modelKind?: string | undefined;
|
|
346
|
+
}, {
|
|
347
|
+
address: string;
|
|
348
|
+
groupId: string;
|
|
349
|
+
paneId: string;
|
|
350
|
+
modelKind?: string | undefined;
|
|
351
|
+
}>;
|
|
352
|
+
}, "strip", z.ZodTypeAny, {
|
|
353
|
+
type: "regard";
|
|
354
|
+
regard: {
|
|
355
|
+
address: string;
|
|
356
|
+
groupId: string;
|
|
357
|
+
paneId: string;
|
|
358
|
+
modelKind?: string | undefined;
|
|
359
|
+
};
|
|
360
|
+
}, {
|
|
361
|
+
type: "regard";
|
|
362
|
+
regard: {
|
|
363
|
+
address: string;
|
|
364
|
+
groupId: string;
|
|
365
|
+
paneId: string;
|
|
366
|
+
modelKind?: string | undefined;
|
|
367
|
+
};
|
|
368
|
+
}>;
|
|
369
|
+
/**
|
|
370
|
+
* A liveness subscription: the surface asks the session to keep one subject
|
|
371
|
+
* fresh while the surface is looking at it. The subject is an address in
|
|
372
|
+
* the namespace (`/proc/jobs/feed_N`), never a view. Regard is what the
|
|
373
|
+
* operator indicates; a watch is what a surface keeps open — a different
|
|
374
|
+
* noun, so it has its own message. Watches are owned per surface and
|
|
375
|
+
* released when the surface detaches.
|
|
376
|
+
*/
|
|
377
|
+
export declare const watchMessageSchema: z.ZodObject<{
|
|
378
|
+
type: z.ZodLiteral<"watch">;
|
|
379
|
+
subject: z.ZodString;
|
|
380
|
+
}, "strip", z.ZodTypeAny, {
|
|
381
|
+
type: "watch";
|
|
382
|
+
subject: string;
|
|
383
|
+
}, {
|
|
384
|
+
type: "watch";
|
|
385
|
+
subject: string;
|
|
386
|
+
}>;
|
|
387
|
+
/** Ends a surface's liveness subscription for one subject. */
|
|
388
|
+
export declare const unwatchMessageSchema: z.ZodObject<{
|
|
389
|
+
type: z.ZodLiteral<"unwatch">;
|
|
390
|
+
subject: z.ZodString;
|
|
391
|
+
}, "strip", z.ZodTypeAny, {
|
|
392
|
+
type: "unwatch";
|
|
393
|
+
subject: string;
|
|
394
|
+
}, {
|
|
395
|
+
type: "unwatch";
|
|
396
|
+
subject: string;
|
|
397
|
+
}>;
|
|
398
|
+
/** What a watched subject is doing: sampled live, settled for good, or last sample failed. */
|
|
399
|
+
export declare const WATCH_STATES: readonly ["live", "settled", "stale"];
|
|
400
|
+
export declare const watchStateSchema: z.ZodEnum<["live", "settled", "stale"]>;
|
|
401
|
+
export type WatchState = z.infer<typeof watchStateSchema>;
|
|
402
|
+
/**
|
|
403
|
+
* The daemon's report on a watched subject's liveness, pushed to every
|
|
404
|
+
* surface whenever it changes (a subject settling is news to all of them).
|
|
405
|
+
*/
|
|
406
|
+
export declare const watchedMessageSchema: z.ZodObject<{
|
|
407
|
+
type: z.ZodLiteral<"watched">;
|
|
408
|
+
subject: z.ZodString;
|
|
409
|
+
state: z.ZodEnum<["live", "settled", "stale"]>;
|
|
410
|
+
}, "strip", z.ZodTypeAny, {
|
|
411
|
+
type: "watched";
|
|
412
|
+
subject: string;
|
|
413
|
+
state: "live" | "settled" | "stale";
|
|
414
|
+
}, {
|
|
415
|
+
type: "watched";
|
|
416
|
+
subject: string;
|
|
417
|
+
state: "live" | "settled" | "stale";
|
|
418
|
+
}>;
|
|
419
|
+
export type WatchedMessage = z.infer<typeof watchedMessageSchema>;
|
|
420
|
+
/**
|
|
421
|
+
* An event the engine originates on its own — a sampler's refreshed model,
|
|
422
|
+
* a watch changing state — rather than in answer to a command. The daemon
|
|
423
|
+
* relays it to every surface; it never enters scrollback.
|
|
424
|
+
*/
|
|
425
|
+
export type AmbientEvent = {
|
|
426
|
+
kind: 'envelope';
|
|
427
|
+
envelope: z.infer<typeof commandEnvelopeSchema>;
|
|
428
|
+
} | {
|
|
429
|
+
kind: 'watched';
|
|
430
|
+
subject: string;
|
|
431
|
+
state: WatchState;
|
|
432
|
+
};
|
|
433
|
+
/** Any message a surface may send to the daemon. */
|
|
434
|
+
export declare const clientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
435
|
+
type: z.ZodLiteral<"attach">;
|
|
436
|
+
protocolVersion: z.ZodNumber;
|
|
437
|
+
token: z.ZodString;
|
|
438
|
+
session: z.ZodOptional<z.ZodString>;
|
|
439
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
440
|
+
shellCommands: z.ZodBoolean;
|
|
441
|
+
hiddenInput: z.ZodOptional<z.ZodBoolean>;
|
|
442
|
+
/** Can put a file where its operator can reach it. */
|
|
443
|
+
fileDelivery: z.ZodOptional<z.ZodBoolean>;
|
|
444
|
+
/**
|
|
445
|
+
* Has a filesystem of its own, so it can receive many files as a directory
|
|
446
|
+
* structure. A browser cannot, and needs a directory archived into one file
|
|
447
|
+
* before it can be handed over.
|
|
448
|
+
*/
|
|
449
|
+
localFilesystem: z.ZodOptional<z.ZodBoolean>;
|
|
450
|
+
}, "strip", z.ZodTypeAny, {
|
|
451
|
+
shellCommands: boolean;
|
|
452
|
+
hiddenInput?: boolean | undefined;
|
|
453
|
+
fileDelivery?: boolean | undefined;
|
|
454
|
+
localFilesystem?: boolean | undefined;
|
|
455
|
+
}, {
|
|
456
|
+
shellCommands: boolean;
|
|
457
|
+
hiddenInput?: boolean | undefined;
|
|
458
|
+
fileDelivery?: boolean | undefined;
|
|
459
|
+
localFilesystem?: boolean | undefined;
|
|
460
|
+
}>>;
|
|
461
|
+
}, "strip", z.ZodTypeAny, {
|
|
462
|
+
type: "attach";
|
|
463
|
+
protocolVersion: number;
|
|
464
|
+
token: string;
|
|
465
|
+
session?: string | undefined;
|
|
466
|
+
capabilities?: {
|
|
467
|
+
shellCommands: boolean;
|
|
468
|
+
hiddenInput?: boolean | undefined;
|
|
469
|
+
fileDelivery?: boolean | undefined;
|
|
470
|
+
localFilesystem?: boolean | undefined;
|
|
471
|
+
} | undefined;
|
|
472
|
+
}, {
|
|
473
|
+
type: "attach";
|
|
474
|
+
protocolVersion: number;
|
|
475
|
+
token: string;
|
|
476
|
+
session?: string | undefined;
|
|
477
|
+
capabilities?: {
|
|
478
|
+
shellCommands: boolean;
|
|
479
|
+
hiddenInput?: boolean | undefined;
|
|
480
|
+
fileDelivery?: boolean | undefined;
|
|
481
|
+
localFilesystem?: boolean | undefined;
|
|
482
|
+
} | undefined;
|
|
483
|
+
}>, z.ZodObject<{
|
|
484
|
+
type: z.ZodLiteral<"execute">;
|
|
485
|
+
id: z.ZodString;
|
|
486
|
+
line: z.ZodString;
|
|
487
|
+
instrument: z.ZodOptional<z.ZodBoolean>;
|
|
488
|
+
}, "strip", z.ZodTypeAny, {
|
|
489
|
+
id: string;
|
|
490
|
+
type: "execute";
|
|
491
|
+
line: string;
|
|
492
|
+
instrument?: boolean | undefined;
|
|
493
|
+
}, {
|
|
494
|
+
id: string;
|
|
495
|
+
type: "execute";
|
|
496
|
+
line: string;
|
|
497
|
+
instrument?: boolean | undefined;
|
|
498
|
+
}>, z.ZodObject<{
|
|
499
|
+
type: z.ZodLiteral<"cancel">;
|
|
500
|
+
id: z.ZodString;
|
|
501
|
+
}, "strip", z.ZodTypeAny, {
|
|
502
|
+
id: string;
|
|
503
|
+
type: "cancel";
|
|
504
|
+
}, {
|
|
505
|
+
id: string;
|
|
506
|
+
type: "cancel";
|
|
507
|
+
}>, z.ZodObject<{
|
|
508
|
+
type: z.ZodLiteral<"complete">;
|
|
509
|
+
id: z.ZodString;
|
|
510
|
+
prefix: z.ZodString;
|
|
511
|
+
}, "strip", z.ZodTypeAny, {
|
|
512
|
+
id: string;
|
|
513
|
+
type: "complete";
|
|
514
|
+
prefix: string;
|
|
515
|
+
}, {
|
|
516
|
+
id: string;
|
|
517
|
+
type: "complete";
|
|
518
|
+
prefix: string;
|
|
519
|
+
}>, z.ZodObject<{
|
|
520
|
+
type: z.ZodLiteral<"promptAnswer">;
|
|
521
|
+
promptId: z.ZodString;
|
|
522
|
+
answer: z.ZodString;
|
|
523
|
+
}, "strip", z.ZodTypeAny, {
|
|
524
|
+
type: "promptAnswer";
|
|
525
|
+
promptId: string;
|
|
526
|
+
answer: string;
|
|
527
|
+
}, {
|
|
528
|
+
type: "promptAnswer";
|
|
529
|
+
promptId: string;
|
|
530
|
+
answer: string;
|
|
531
|
+
}>, z.ZodObject<{
|
|
532
|
+
type: z.ZodLiteral<"promptError">;
|
|
533
|
+
promptId: z.ZodString;
|
|
534
|
+
reason: z.ZodString;
|
|
535
|
+
}, "strip", z.ZodTypeAny, {
|
|
536
|
+
type: "promptError";
|
|
537
|
+
promptId: string;
|
|
538
|
+
reason: string;
|
|
539
|
+
}, {
|
|
540
|
+
type: "promptError";
|
|
541
|
+
promptId: string;
|
|
542
|
+
reason: string;
|
|
543
|
+
}>, z.ZodObject<{
|
|
544
|
+
type: z.ZodLiteral<"pipeResult">;
|
|
545
|
+
pipeId: z.ZodString;
|
|
546
|
+
output: z.ZodString;
|
|
547
|
+
}, "strip", z.ZodTypeAny, {
|
|
548
|
+
type: "pipeResult";
|
|
549
|
+
pipeId: string;
|
|
550
|
+
output: string;
|
|
551
|
+
}, {
|
|
552
|
+
type: "pipeResult";
|
|
553
|
+
pipeId: string;
|
|
554
|
+
output: string;
|
|
555
|
+
}>, z.ZodObject<{
|
|
556
|
+
type: z.ZodLiteral<"pipeError">;
|
|
557
|
+
pipeId: z.ZodString;
|
|
558
|
+
reason: z.ZodString;
|
|
559
|
+
}, "strip", z.ZodTypeAny, {
|
|
560
|
+
type: "pipeError";
|
|
561
|
+
reason: string;
|
|
562
|
+
pipeId: string;
|
|
563
|
+
}, {
|
|
564
|
+
type: "pipeError";
|
|
565
|
+
reason: string;
|
|
566
|
+
pipeId: string;
|
|
567
|
+
}>, z.ZodObject<{
|
|
568
|
+
type: z.ZodLiteral<"shellResult">;
|
|
569
|
+
shellId: z.ZodString;
|
|
570
|
+
exitCode: z.ZodNumber;
|
|
571
|
+
}, "strip", z.ZodTypeAny, {
|
|
572
|
+
type: "shellResult";
|
|
573
|
+
shellId: string;
|
|
574
|
+
exitCode: number;
|
|
575
|
+
}, {
|
|
576
|
+
type: "shellResult";
|
|
577
|
+
shellId: string;
|
|
578
|
+
exitCode: number;
|
|
579
|
+
}>, z.ZodObject<{
|
|
580
|
+
type: z.ZodLiteral<"shellError">;
|
|
581
|
+
shellId: z.ZodString;
|
|
582
|
+
reason: z.ZodString;
|
|
583
|
+
}, "strip", z.ZodTypeAny, {
|
|
584
|
+
type: "shellError";
|
|
585
|
+
reason: string;
|
|
586
|
+
shellId: string;
|
|
587
|
+
}, {
|
|
588
|
+
type: "shellError";
|
|
589
|
+
reason: string;
|
|
590
|
+
shellId: string;
|
|
591
|
+
}>, z.ZodObject<{
|
|
592
|
+
type: z.ZodLiteral<"editResult">;
|
|
593
|
+
editId: z.ZodString;
|
|
594
|
+
content: z.ZodString;
|
|
595
|
+
changed: z.ZodBoolean;
|
|
596
|
+
}, "strip", z.ZodTypeAny, {
|
|
597
|
+
type: "editResult";
|
|
598
|
+
editId: string;
|
|
599
|
+
content: string;
|
|
600
|
+
changed: boolean;
|
|
601
|
+
}, {
|
|
602
|
+
type: "editResult";
|
|
603
|
+
editId: string;
|
|
604
|
+
content: string;
|
|
605
|
+
changed: boolean;
|
|
606
|
+
}>, z.ZodObject<{
|
|
607
|
+
type: z.ZodLiteral<"editError">;
|
|
608
|
+
editId: z.ZodString;
|
|
609
|
+
reason: z.ZodString;
|
|
610
|
+
}, "strip", z.ZodTypeAny, {
|
|
611
|
+
type: "editError";
|
|
612
|
+
reason: string;
|
|
613
|
+
editId: string;
|
|
614
|
+
}, {
|
|
615
|
+
type: "editError";
|
|
616
|
+
reason: string;
|
|
617
|
+
editId: string;
|
|
618
|
+
}>, z.ZodObject<{
|
|
619
|
+
type: z.ZodLiteral<"deliverResult">;
|
|
620
|
+
deliverId: z.ZodString;
|
|
621
|
+
location: z.ZodString;
|
|
622
|
+
bytes: z.ZodNumber;
|
|
623
|
+
}, "strip", z.ZodTypeAny, {
|
|
624
|
+
type: "deliverResult";
|
|
625
|
+
bytes: number;
|
|
626
|
+
deliverId: string;
|
|
627
|
+
location: string;
|
|
628
|
+
}, {
|
|
629
|
+
type: "deliverResult";
|
|
630
|
+
bytes: number;
|
|
631
|
+
deliverId: string;
|
|
632
|
+
location: string;
|
|
633
|
+
}>, z.ZodObject<{
|
|
634
|
+
type: z.ZodLiteral<"deliverError">;
|
|
635
|
+
deliverId: z.ZodString;
|
|
636
|
+
reason: z.ZodString;
|
|
637
|
+
}, "strip", z.ZodTypeAny, {
|
|
638
|
+
type: "deliverError";
|
|
639
|
+
reason: string;
|
|
640
|
+
deliverId: string;
|
|
641
|
+
}, {
|
|
642
|
+
type: "deliverError";
|
|
643
|
+
reason: string;
|
|
644
|
+
deliverId: string;
|
|
645
|
+
}>, z.ZodObject<{
|
|
646
|
+
type: z.ZodLiteral<"regard">;
|
|
647
|
+
regard: z.ZodObject<{
|
|
648
|
+
address: z.ZodString;
|
|
649
|
+
modelKind: z.ZodOptional<z.ZodString>;
|
|
650
|
+
groupId: z.ZodString;
|
|
651
|
+
paneId: z.ZodString;
|
|
652
|
+
}, "strip", z.ZodTypeAny, {
|
|
653
|
+
address: string;
|
|
654
|
+
groupId: string;
|
|
655
|
+
paneId: string;
|
|
656
|
+
modelKind?: string | undefined;
|
|
657
|
+
}, {
|
|
658
|
+
address: string;
|
|
659
|
+
groupId: string;
|
|
660
|
+
paneId: string;
|
|
661
|
+
modelKind?: string | undefined;
|
|
662
|
+
}>;
|
|
663
|
+
}, "strip", z.ZodTypeAny, {
|
|
664
|
+
type: "regard";
|
|
665
|
+
regard: {
|
|
666
|
+
address: string;
|
|
667
|
+
groupId: string;
|
|
668
|
+
paneId: string;
|
|
669
|
+
modelKind?: string | undefined;
|
|
670
|
+
};
|
|
671
|
+
}, {
|
|
672
|
+
type: "regard";
|
|
673
|
+
regard: {
|
|
674
|
+
address: string;
|
|
675
|
+
groupId: string;
|
|
676
|
+
paneId: string;
|
|
677
|
+
modelKind?: string | undefined;
|
|
678
|
+
};
|
|
679
|
+
}>, z.ZodObject<{
|
|
680
|
+
type: z.ZodLiteral<"watch">;
|
|
681
|
+
subject: z.ZodString;
|
|
682
|
+
}, "strip", z.ZodTypeAny, {
|
|
683
|
+
type: "watch";
|
|
684
|
+
subject: string;
|
|
685
|
+
}, {
|
|
686
|
+
type: "watch";
|
|
687
|
+
subject: string;
|
|
688
|
+
}>, z.ZodObject<{
|
|
689
|
+
type: z.ZodLiteral<"unwatch">;
|
|
690
|
+
subject: z.ZodString;
|
|
691
|
+
}, "strip", z.ZodTypeAny, {
|
|
692
|
+
type: "unwatch";
|
|
693
|
+
subject: string;
|
|
694
|
+
}, {
|
|
695
|
+
type: "unwatch";
|
|
696
|
+
subject: string;
|
|
697
|
+
}>]>;
|
|
698
|
+
/** A message a surface sends to the daemon. */
|
|
699
|
+
export type ClientMessage = z.infer<typeof clientMessageSchema>;
|
|
700
|
+
/**
|
|
701
|
+
* Acknowledges a successful attach. The optional `stack` block reports the
|
|
702
|
+
* daemon's own installed versions and build hash, so a remote surface can
|
|
703
|
+
* greet with the truth of the process it attached to rather than whatever is
|
|
704
|
+
* installed client-side; older daemons simply omit it.
|
|
705
|
+
*/
|
|
706
|
+
export declare const attachedMessageSchema: z.ZodObject<{
|
|
707
|
+
type: z.ZodLiteral<"attached">;
|
|
708
|
+
session: z.ZodString;
|
|
709
|
+
protocolVersion: z.ZodNumber;
|
|
710
|
+
stack: z.ZodOptional<z.ZodObject<{
|
|
711
|
+
chell: z.ZodString;
|
|
712
|
+
calypso: z.ZodString;
|
|
713
|
+
build: z.ZodString;
|
|
714
|
+
brasa: z.ZodOptional<z.ZodString>;
|
|
715
|
+
chili: z.ZodOptional<z.ZodString>;
|
|
716
|
+
salsa: z.ZodOptional<z.ZodString>;
|
|
717
|
+
cumin: z.ZodOptional<z.ZodString>;
|
|
718
|
+
}, "strip", z.ZodTypeAny, {
|
|
719
|
+
chell: string;
|
|
720
|
+
calypso: string;
|
|
721
|
+
build: string;
|
|
722
|
+
brasa?: string | undefined;
|
|
723
|
+
chili?: string | undefined;
|
|
724
|
+
salsa?: string | undefined;
|
|
725
|
+
cumin?: string | undefined;
|
|
726
|
+
}, {
|
|
727
|
+
chell: string;
|
|
728
|
+
calypso: string;
|
|
729
|
+
build: string;
|
|
730
|
+
brasa?: string | undefined;
|
|
731
|
+
chili?: string | undefined;
|
|
732
|
+
salsa?: string | undefined;
|
|
733
|
+
cumin?: string | undefined;
|
|
734
|
+
}>>;
|
|
735
|
+
/** The host-control tiers the daemon declared (`shell`, `files`, `pipes`); empty or absent when off. */
|
|
736
|
+
hostControl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
737
|
+
}, "strip", z.ZodTypeAny, {
|
|
738
|
+
type: "attached";
|
|
739
|
+
protocolVersion: number;
|
|
740
|
+
session: string;
|
|
741
|
+
stack?: {
|
|
742
|
+
chell: string;
|
|
743
|
+
calypso: string;
|
|
744
|
+
build: string;
|
|
745
|
+
brasa?: string | undefined;
|
|
746
|
+
chili?: string | undefined;
|
|
747
|
+
salsa?: string | undefined;
|
|
748
|
+
cumin?: string | undefined;
|
|
749
|
+
} | undefined;
|
|
750
|
+
hostControl?: string[] | undefined;
|
|
751
|
+
}, {
|
|
752
|
+
type: "attached";
|
|
753
|
+
protocolVersion: number;
|
|
754
|
+
session: string;
|
|
755
|
+
stack?: {
|
|
756
|
+
chell: string;
|
|
757
|
+
calypso: string;
|
|
758
|
+
build: string;
|
|
759
|
+
brasa?: string | undefined;
|
|
760
|
+
chili?: string | undefined;
|
|
761
|
+
salsa?: string | undefined;
|
|
762
|
+
cumin?: string | undefined;
|
|
763
|
+
} | undefined;
|
|
764
|
+
hostControl?: string[] | undefined;
|
|
765
|
+
}>;
|
|
766
|
+
/** The final result of one executed line: one envelope per command. */
|
|
767
|
+
export declare const resultMessageSchema: z.ZodObject<{
|
|
768
|
+
type: z.ZodLiteral<"result">;
|
|
769
|
+
id: z.ZodString;
|
|
770
|
+
envelopes: z.ZodArray<z.ZodObject<{
|
|
771
|
+
status: z.ZodEnum<["ok", "error"]>;
|
|
772
|
+
rendered: z.ZodString;
|
|
773
|
+
renderedErr: z.ZodOptional<z.ZodString>;
|
|
774
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
775
|
+
kind: z.ZodString;
|
|
776
|
+
data: z.ZodUnknown;
|
|
777
|
+
}, "strip", z.ZodTypeAny, {
|
|
778
|
+
kind: string;
|
|
779
|
+
data?: unknown;
|
|
780
|
+
}, {
|
|
781
|
+
kind: string;
|
|
782
|
+
data?: unknown;
|
|
783
|
+
}>>;
|
|
784
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
785
|
+
type: z.ZodEnum<["error", "warning"]>;
|
|
786
|
+
message: z.ZodString;
|
|
787
|
+
}, "strip", z.ZodTypeAny, {
|
|
788
|
+
message: string;
|
|
789
|
+
type: "error" | "warning";
|
|
790
|
+
}, {
|
|
791
|
+
message: string;
|
|
792
|
+
type: "error" | "warning";
|
|
793
|
+
}>, "many">>;
|
|
794
|
+
trace: z.ZodOptional<z.ZodObject<{
|
|
795
|
+
input: z.ZodString;
|
|
796
|
+
proposed: z.ZodString;
|
|
797
|
+
validated: z.ZodBoolean;
|
|
798
|
+
executed: z.ZodOptional<z.ZodString>;
|
|
799
|
+
}, "strip", z.ZodTypeAny, {
|
|
800
|
+
input: string;
|
|
801
|
+
proposed: string;
|
|
802
|
+
validated: boolean;
|
|
803
|
+
executed?: string | undefined;
|
|
804
|
+
}, {
|
|
805
|
+
input: string;
|
|
806
|
+
proposed: string;
|
|
807
|
+
validated: boolean;
|
|
808
|
+
executed?: string | undefined;
|
|
809
|
+
}>>;
|
|
810
|
+
}, "strip", z.ZodTypeAny, {
|
|
811
|
+
status: "error" | "ok";
|
|
812
|
+
rendered: string;
|
|
813
|
+
renderedErr?: string | undefined;
|
|
814
|
+
model?: {
|
|
815
|
+
kind: string;
|
|
816
|
+
data?: unknown;
|
|
817
|
+
} | undefined;
|
|
818
|
+
errors?: {
|
|
819
|
+
message: string;
|
|
820
|
+
type: "error" | "warning";
|
|
821
|
+
}[] | undefined;
|
|
822
|
+
trace?: {
|
|
823
|
+
input: string;
|
|
824
|
+
proposed: string;
|
|
825
|
+
validated: boolean;
|
|
826
|
+
executed?: string | undefined;
|
|
827
|
+
} | undefined;
|
|
828
|
+
}, {
|
|
829
|
+
status: "error" | "ok";
|
|
830
|
+
rendered: string;
|
|
831
|
+
renderedErr?: string | undefined;
|
|
832
|
+
model?: {
|
|
833
|
+
kind: string;
|
|
834
|
+
data?: unknown;
|
|
835
|
+
} | undefined;
|
|
836
|
+
errors?: {
|
|
837
|
+
message: string;
|
|
838
|
+
type: "error" | "warning";
|
|
839
|
+
}[] | undefined;
|
|
840
|
+
trace?: {
|
|
841
|
+
input: string;
|
|
842
|
+
proposed: string;
|
|
843
|
+
validated: boolean;
|
|
844
|
+
executed?: string | undefined;
|
|
845
|
+
} | undefined;
|
|
846
|
+
}>, "many">;
|
|
847
|
+
}, "strip", z.ZodTypeAny, {
|
|
848
|
+
id: string;
|
|
849
|
+
type: "result";
|
|
850
|
+
envelopes: {
|
|
851
|
+
status: "error" | "ok";
|
|
852
|
+
rendered: string;
|
|
853
|
+
renderedErr?: string | undefined;
|
|
854
|
+
model?: {
|
|
855
|
+
kind: string;
|
|
856
|
+
data?: unknown;
|
|
857
|
+
} | undefined;
|
|
858
|
+
errors?: {
|
|
859
|
+
message: string;
|
|
860
|
+
type: "error" | "warning";
|
|
861
|
+
}[] | undefined;
|
|
862
|
+
trace?: {
|
|
863
|
+
input: string;
|
|
864
|
+
proposed: string;
|
|
865
|
+
validated: boolean;
|
|
866
|
+
executed?: string | undefined;
|
|
867
|
+
} | undefined;
|
|
868
|
+
}[];
|
|
869
|
+
}, {
|
|
870
|
+
id: string;
|
|
871
|
+
type: "result";
|
|
872
|
+
envelopes: {
|
|
873
|
+
status: "error" | "ok";
|
|
874
|
+
rendered: string;
|
|
875
|
+
renderedErr?: string | undefined;
|
|
876
|
+
model?: {
|
|
877
|
+
kind: string;
|
|
878
|
+
data?: unknown;
|
|
879
|
+
} | undefined;
|
|
880
|
+
errors?: {
|
|
881
|
+
message: string;
|
|
882
|
+
type: "error" | "warning";
|
|
883
|
+
}[] | undefined;
|
|
884
|
+
trace?: {
|
|
885
|
+
input: string;
|
|
886
|
+
proposed: string;
|
|
887
|
+
validated: boolean;
|
|
888
|
+
executed?: string | undefined;
|
|
889
|
+
} | undefined;
|
|
890
|
+
}[];
|
|
891
|
+
}>;
|
|
892
|
+
/** The reply to a completion request. */
|
|
893
|
+
export declare const completeReplySchema: z.ZodObject<{
|
|
894
|
+
type: z.ZodLiteral<"complete">;
|
|
895
|
+
id: z.ZodString;
|
|
896
|
+
prefix: z.ZodString;
|
|
897
|
+
candidates: z.ZodArray<z.ZodString, "many">;
|
|
898
|
+
}, "strip", z.ZodTypeAny, {
|
|
899
|
+
id: string;
|
|
900
|
+
type: "complete";
|
|
901
|
+
prefix: string;
|
|
902
|
+
candidates: string[];
|
|
903
|
+
}, {
|
|
904
|
+
id: string;
|
|
905
|
+
type: "complete";
|
|
906
|
+
prefix: string;
|
|
907
|
+
candidates: string[];
|
|
908
|
+
}>;
|
|
909
|
+
/** A streamed output event on one channel, correlated to its command. */
|
|
910
|
+
export declare const outputMessageSchema: z.ZodObject<{
|
|
911
|
+
type: z.ZodLiteral<"output">;
|
|
912
|
+
id: z.ZodString;
|
|
913
|
+
channel: z.ZodEnum<["data", "err", "status"]>;
|
|
914
|
+
chunk: z.ZodString;
|
|
915
|
+
}, "strip", z.ZodTypeAny, {
|
|
916
|
+
id: string;
|
|
917
|
+
type: "output";
|
|
918
|
+
channel: "status" | "data" | "err";
|
|
919
|
+
chunk: string;
|
|
920
|
+
}, {
|
|
921
|
+
id: string;
|
|
922
|
+
type: "output";
|
|
923
|
+
channel: "status" | "data" | "err";
|
|
924
|
+
chunk: string;
|
|
925
|
+
}>;
|
|
926
|
+
/**
|
|
927
|
+
* The operation producing structured progress.
|
|
928
|
+
*
|
|
929
|
+
* Within a major, the contract promises additive change only, which is a
|
|
930
|
+
* promise a bare enum cannot keep: an unknown value fails the whole message,
|
|
931
|
+
* and a failed parse drops it. An operation a peer names but this build does
|
|
932
|
+
* not know is therefore read as `task` — none of the above — so the work still
|
|
933
|
+
* shows, generically, instead of vanishing.
|
|
934
|
+
*/
|
|
935
|
+
export declare const progressOperationSchema: z.ZodCatch<z.ZodEnum<["upload", "download", "pull", "workflow", "pipeline", "group", "task"]>>;
|
|
936
|
+
/**
|
|
937
|
+
* Broad class of progress producer.
|
|
938
|
+
*
|
|
939
|
+
* Optional, so an unknown class degrades to absent: the event still renders
|
|
940
|
+
* from its operation and phase, one axis poorer.
|
|
941
|
+
*/
|
|
942
|
+
export declare const progressKindSchema: z.ZodCatch<z.ZodEnum<["transfer", "retrieve", "workflow", "inspection"]>>;
|
|
943
|
+
/**
|
|
944
|
+
* Lifecycle phase of a progress operation.
|
|
945
|
+
*
|
|
946
|
+
* An unknown phase degrades to `working` for the reason given on
|
|
947
|
+
* {@link progressOperationSchema}: an unrecognised phase still means work is
|
|
948
|
+
* under way, and that much is worth showing. `complete` and `failed` are
|
|
949
|
+
* terminal and will not be inferred, so a surface that cannot read a newer
|
|
950
|
+
* peer's terminal phase leaves the announcement open rather than closing it
|
|
951
|
+
* wrongly.
|
|
952
|
+
*/
|
|
953
|
+
export declare const progressPhaseSchema: z.ZodCatch<z.ZodEnum<["scanning", "transferring", "watching", "retrying", "reading", "working", "complete", "failed"]>>;
|
|
954
|
+
/**
|
|
955
|
+
* Unit used by the primary progress counter.
|
|
956
|
+
*
|
|
957
|
+
* Optional, so an unknown unit degrades to absent and the counter renders
|
|
958
|
+
* unqualified — 3/10 rather than nothing at all.
|
|
959
|
+
*/
|
|
960
|
+
export declare const progressUnitSchema: z.ZodCatch<z.ZodEnum<["files", "bytes", "series", "jobs", "nodes"]>>;
|
|
961
|
+
/**
|
|
962
|
+
* State of the operation or item being reported.
|
|
963
|
+
*
|
|
964
|
+
* An unknown state degrades to `unknown`, which the vocabulary already carries
|
|
965
|
+
* for precisely this: a state that cannot be named is still a state.
|
|
966
|
+
*/
|
|
967
|
+
export declare const progressStatusSchema: z.ZodCatch<z.ZodEnum<["running", "done", "unconfirmed", "stalled", "timeout", "error", "unknown"]>>;
|
|
968
|
+
/** A structured progress event correlated to a command. */
|
|
969
|
+
export declare const progressMessageSchema: z.ZodObject<{
|
|
970
|
+
type: z.ZodLiteral<"progress">;
|
|
971
|
+
id: z.ZodString;
|
|
972
|
+
operation: z.ZodCatch<z.ZodEnum<["upload", "download", "pull", "workflow", "pipeline", "group", "task"]>>;
|
|
973
|
+
kind: z.ZodOptional<z.ZodCatch<z.ZodEnum<["transfer", "retrieve", "workflow", "inspection"]>>>;
|
|
974
|
+
phase: z.ZodCatch<z.ZodEnum<["scanning", "transferring", "watching", "retrying", "reading", "working", "complete", "failed"]>>;
|
|
975
|
+
label: z.ZodOptional<z.ZodString>;
|
|
976
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
977
|
+
current: z.ZodOptional<z.ZodNumber>;
|
|
978
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
979
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
980
|
+
unit: z.ZodOptional<z.ZodCatch<z.ZodEnum<["files", "bytes", "series", "jobs", "nodes"]>>>;
|
|
981
|
+
status: z.ZodOptional<z.ZodCatch<z.ZodEnum<["running", "done", "unconfirmed", "stalled", "timeout", "error", "unknown"]>>>;
|
|
982
|
+
}, "strip", z.ZodTypeAny, {
|
|
983
|
+
id: string;
|
|
984
|
+
type: "progress";
|
|
985
|
+
operation: "upload" | "download" | "pull" | "workflow" | "pipeline" | "group" | "task";
|
|
986
|
+
phase: "failed" | "scanning" | "transferring" | "watching" | "retrying" | "reading" | "working" | "complete";
|
|
987
|
+
label?: string | undefined;
|
|
988
|
+
status?: "unknown" | "done" | "error" | "running" | "unconfirmed" | "stalled" | "timeout" | undefined;
|
|
989
|
+
kind?: "workflow" | "transfer" | "retrieve" | "inspection" | undefined;
|
|
990
|
+
itemId?: string | undefined;
|
|
991
|
+
current?: number | undefined;
|
|
992
|
+
total?: number | undefined;
|
|
993
|
+
percent?: number | undefined;
|
|
994
|
+
unit?: "nodes" | "files" | "bytes" | "series" | "jobs" | undefined;
|
|
995
|
+
}, {
|
|
996
|
+
id: string;
|
|
997
|
+
type: "progress";
|
|
998
|
+
label?: string | undefined;
|
|
999
|
+
status?: unknown;
|
|
1000
|
+
kind?: unknown;
|
|
1001
|
+
operation?: unknown;
|
|
1002
|
+
phase?: unknown;
|
|
1003
|
+
itemId?: string | undefined;
|
|
1004
|
+
current?: number | undefined;
|
|
1005
|
+
total?: number | undefined;
|
|
1006
|
+
percent?: number | undefined;
|
|
1007
|
+
unit?: unknown;
|
|
1008
|
+
}>;
|
|
1009
|
+
/** A progress event as it appears on the wire, correlated to its command. */
|
|
1010
|
+
export type ProgressMessage = z.infer<typeof progressMessageSchema>;
|
|
1011
|
+
/** The progress payload before command correlation is added by the daemon. */
|
|
1012
|
+
export type ProgressEvent = Omit<ProgressMessage, 'type' | 'id'>;
|
|
1013
|
+
/** A session-bus broadcast: an envelope tagged with its originating surface. */
|
|
1014
|
+
export declare const sessionMessageSchema: z.ZodObject<{
|
|
1015
|
+
type: z.ZodLiteral<"session">;
|
|
1016
|
+
surface: z.ZodString;
|
|
1017
|
+
envelope: z.ZodObject<{
|
|
1018
|
+
status: z.ZodEnum<["ok", "error"]>;
|
|
1019
|
+
rendered: z.ZodString;
|
|
1020
|
+
renderedErr: z.ZodOptional<z.ZodString>;
|
|
1021
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
1022
|
+
kind: z.ZodString;
|
|
1023
|
+
data: z.ZodUnknown;
|
|
1024
|
+
}, "strip", z.ZodTypeAny, {
|
|
1025
|
+
kind: string;
|
|
1026
|
+
data?: unknown;
|
|
1027
|
+
}, {
|
|
1028
|
+
kind: string;
|
|
1029
|
+
data?: unknown;
|
|
1030
|
+
}>>;
|
|
1031
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1032
|
+
type: z.ZodEnum<["error", "warning"]>;
|
|
1033
|
+
message: z.ZodString;
|
|
1034
|
+
}, "strip", z.ZodTypeAny, {
|
|
1035
|
+
message: string;
|
|
1036
|
+
type: "error" | "warning";
|
|
1037
|
+
}, {
|
|
1038
|
+
message: string;
|
|
1039
|
+
type: "error" | "warning";
|
|
1040
|
+
}>, "many">>;
|
|
1041
|
+
trace: z.ZodOptional<z.ZodObject<{
|
|
1042
|
+
input: z.ZodString;
|
|
1043
|
+
proposed: z.ZodString;
|
|
1044
|
+
validated: z.ZodBoolean;
|
|
1045
|
+
executed: z.ZodOptional<z.ZodString>;
|
|
1046
|
+
}, "strip", z.ZodTypeAny, {
|
|
1047
|
+
input: string;
|
|
1048
|
+
proposed: string;
|
|
1049
|
+
validated: boolean;
|
|
1050
|
+
executed?: string | undefined;
|
|
1051
|
+
}, {
|
|
1052
|
+
input: string;
|
|
1053
|
+
proposed: string;
|
|
1054
|
+
validated: boolean;
|
|
1055
|
+
executed?: string | undefined;
|
|
1056
|
+
}>>;
|
|
1057
|
+
}, "strip", z.ZodTypeAny, {
|
|
1058
|
+
status: "error" | "ok";
|
|
1059
|
+
rendered: string;
|
|
1060
|
+
renderedErr?: string | undefined;
|
|
1061
|
+
model?: {
|
|
1062
|
+
kind: string;
|
|
1063
|
+
data?: unknown;
|
|
1064
|
+
} | undefined;
|
|
1065
|
+
errors?: {
|
|
1066
|
+
message: string;
|
|
1067
|
+
type: "error" | "warning";
|
|
1068
|
+
}[] | undefined;
|
|
1069
|
+
trace?: {
|
|
1070
|
+
input: string;
|
|
1071
|
+
proposed: string;
|
|
1072
|
+
validated: boolean;
|
|
1073
|
+
executed?: string | undefined;
|
|
1074
|
+
} | undefined;
|
|
1075
|
+
}, {
|
|
1076
|
+
status: "error" | "ok";
|
|
1077
|
+
rendered: string;
|
|
1078
|
+
renderedErr?: string | undefined;
|
|
1079
|
+
model?: {
|
|
1080
|
+
kind: string;
|
|
1081
|
+
data?: unknown;
|
|
1082
|
+
} | undefined;
|
|
1083
|
+
errors?: {
|
|
1084
|
+
message: string;
|
|
1085
|
+
type: "error" | "warning";
|
|
1086
|
+
}[] | undefined;
|
|
1087
|
+
trace?: {
|
|
1088
|
+
input: string;
|
|
1089
|
+
proposed: string;
|
|
1090
|
+
validated: boolean;
|
|
1091
|
+
executed?: string | undefined;
|
|
1092
|
+
} | undefined;
|
|
1093
|
+
}>;
|
|
1094
|
+
}, "strip", z.ZodTypeAny, {
|
|
1095
|
+
type: "session";
|
|
1096
|
+
envelope: {
|
|
1097
|
+
status: "error" | "ok";
|
|
1098
|
+
rendered: string;
|
|
1099
|
+
renderedErr?: string | undefined;
|
|
1100
|
+
model?: {
|
|
1101
|
+
kind: string;
|
|
1102
|
+
data?: unknown;
|
|
1103
|
+
} | undefined;
|
|
1104
|
+
errors?: {
|
|
1105
|
+
message: string;
|
|
1106
|
+
type: "error" | "warning";
|
|
1107
|
+
}[] | undefined;
|
|
1108
|
+
trace?: {
|
|
1109
|
+
input: string;
|
|
1110
|
+
proposed: string;
|
|
1111
|
+
validated: boolean;
|
|
1112
|
+
executed?: string | undefined;
|
|
1113
|
+
} | undefined;
|
|
1114
|
+
};
|
|
1115
|
+
surface: string;
|
|
1116
|
+
}, {
|
|
1117
|
+
type: "session";
|
|
1118
|
+
envelope: {
|
|
1119
|
+
status: "error" | "ok";
|
|
1120
|
+
rendered: string;
|
|
1121
|
+
renderedErr?: string | undefined;
|
|
1122
|
+
model?: {
|
|
1123
|
+
kind: string;
|
|
1124
|
+
data?: unknown;
|
|
1125
|
+
} | undefined;
|
|
1126
|
+
errors?: {
|
|
1127
|
+
message: string;
|
|
1128
|
+
type: "error" | "warning";
|
|
1129
|
+
}[] | undefined;
|
|
1130
|
+
trace?: {
|
|
1131
|
+
input: string;
|
|
1132
|
+
proposed: string;
|
|
1133
|
+
validated: boolean;
|
|
1134
|
+
executed?: string | undefined;
|
|
1135
|
+
} | undefined;
|
|
1136
|
+
};
|
|
1137
|
+
surface: string;
|
|
1138
|
+
}>;
|
|
1139
|
+
/** A boundary error: a refused attach, a malformed message, correlated when possible. */
|
|
1140
|
+
export declare const errorMessageSchema: z.ZodObject<{
|
|
1141
|
+
type: z.ZodLiteral<"error">;
|
|
1142
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1143
|
+
reason: z.ZodString;
|
|
1144
|
+
}, "strip", z.ZodTypeAny, {
|
|
1145
|
+
type: "error";
|
|
1146
|
+
reason: string;
|
|
1147
|
+
id?: string | undefined;
|
|
1148
|
+
}, {
|
|
1149
|
+
type: "error";
|
|
1150
|
+
reason: string;
|
|
1151
|
+
id?: string | undefined;
|
|
1152
|
+
}>;
|
|
1153
|
+
/**
|
|
1154
|
+
* A prompt request the daemon raises during a command: the surface that
|
|
1155
|
+
* submitted the command must answer it (with `promptAnswer`) before the
|
|
1156
|
+
* command can proceed. `hidden` requests no-echo entry (password).
|
|
1157
|
+
*/
|
|
1158
|
+
export declare const promptMessageSchema: z.ZodObject<{
|
|
1159
|
+
type: z.ZodLiteral<"prompt">;
|
|
1160
|
+
promptId: z.ZodString;
|
|
1161
|
+
message: z.ZodString;
|
|
1162
|
+
hidden: z.ZodBoolean;
|
|
1163
|
+
}, "strip", z.ZodTypeAny, {
|
|
1164
|
+
message: string;
|
|
1165
|
+
type: "prompt";
|
|
1166
|
+
promptId: string;
|
|
1167
|
+
hidden: boolean;
|
|
1168
|
+
}, {
|
|
1169
|
+
message: string;
|
|
1170
|
+
type: "prompt";
|
|
1171
|
+
promptId: string;
|
|
1172
|
+
hidden: boolean;
|
|
1173
|
+
}>;
|
|
1174
|
+
/**
|
|
1175
|
+
* The engine-known facts a prompt reflects, independent of any theme.
|
|
1176
|
+
*
|
|
1177
|
+
* The daemon knows the session context but not how a given surface renders it,
|
|
1178
|
+
* so it ships these facts and each surface themes them with its own settings.
|
|
1179
|
+
* Rendering inputs a surface owns (theme, segments, terminal width) are not
|
|
1180
|
+
* carried here.
|
|
1181
|
+
*/
|
|
1182
|
+
export declare const promptContextSchema: z.ZodObject<{
|
|
1183
|
+
user: z.ZodString;
|
|
1184
|
+
uri: z.ZodString;
|
|
1185
|
+
cwd: z.ZodString;
|
|
1186
|
+
pacsserver: z.ZodNullable<z.ZodString>;
|
|
1187
|
+
physicalMode: z.ZodBoolean;
|
|
1188
|
+
lastExitCode: z.ZodNumber;
|
|
1189
|
+
lastCommandDurationMs: z.ZodNumber;
|
|
1190
|
+
procWarmup: z.ZodOptional<z.ZodObject<{
|
|
1191
|
+
loaded: z.ZodNumber;
|
|
1192
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
1193
|
+
restored: z.ZodOptional<z.ZodBoolean>;
|
|
1194
|
+
state: z.ZodOptional<z.ZodEnum<["cold", "cached", "failed"]>>;
|
|
1195
|
+
sweeping: z.ZodOptional<z.ZodBoolean>;
|
|
1196
|
+
feed: z.ZodOptional<z.ZodObject<{
|
|
1197
|
+
id: z.ZodNumber;
|
|
1198
|
+
loaded: z.ZodNumber;
|
|
1199
|
+
total: z.ZodNumber;
|
|
1200
|
+
}, "strip", z.ZodTypeAny, {
|
|
1201
|
+
id: number;
|
|
1202
|
+
total: number;
|
|
1203
|
+
loaded: number;
|
|
1204
|
+
}, {
|
|
1205
|
+
id: number;
|
|
1206
|
+
total: number;
|
|
1207
|
+
loaded: number;
|
|
1208
|
+
}>>;
|
|
1209
|
+
arrived: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
1210
|
+
}, "strip", z.ZodTypeAny, {
|
|
1211
|
+
loaded: number;
|
|
1212
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
1213
|
+
total?: number | undefined;
|
|
1214
|
+
restored?: boolean | undefined;
|
|
1215
|
+
sweeping?: boolean | undefined;
|
|
1216
|
+
feed?: {
|
|
1217
|
+
id: number;
|
|
1218
|
+
total: number;
|
|
1219
|
+
loaded: number;
|
|
1220
|
+
} | undefined;
|
|
1221
|
+
arrived?: number[] | undefined;
|
|
1222
|
+
}, {
|
|
1223
|
+
loaded: number;
|
|
1224
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
1225
|
+
total?: number | undefined;
|
|
1226
|
+
restored?: boolean | undefined;
|
|
1227
|
+
sweeping?: boolean | undefined;
|
|
1228
|
+
feed?: {
|
|
1229
|
+
id: number;
|
|
1230
|
+
total: number;
|
|
1231
|
+
loaded: number;
|
|
1232
|
+
} | undefined;
|
|
1233
|
+
arrived?: number[] | undefined;
|
|
1234
|
+
}>>;
|
|
1235
|
+
procIndex: z.ZodOptional<z.ZodObject<{
|
|
1236
|
+
jobs: z.ZodNumber;
|
|
1237
|
+
feeds: z.ZodNumber;
|
|
1238
|
+
}, "strip", z.ZodTypeAny, {
|
|
1239
|
+
feeds: number;
|
|
1240
|
+
jobs: number;
|
|
1241
|
+
}, {
|
|
1242
|
+
feeds: number;
|
|
1243
|
+
jobs: number;
|
|
1244
|
+
}>>;
|
|
1245
|
+
/**
|
|
1246
|
+
* Warm-up steps that failed behind the prompt and have not since
|
|
1247
|
+
* succeeded. Optional, so an older daemon still parses here.
|
|
1248
|
+
*/
|
|
1249
|
+
warmupFailures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1250
|
+
label: z.ZodString;
|
|
1251
|
+
message: z.ZodString;
|
|
1252
|
+
}, "strip", z.ZodTypeAny, {
|
|
1253
|
+
label: string;
|
|
1254
|
+
message: string;
|
|
1255
|
+
}, {
|
|
1256
|
+
label: string;
|
|
1257
|
+
message: string;
|
|
1258
|
+
}>, "many">>;
|
|
1259
|
+
}, "strip", z.ZodTypeAny, {
|
|
1260
|
+
user: string;
|
|
1261
|
+
uri: string;
|
|
1262
|
+
cwd: string;
|
|
1263
|
+
pacsserver: string | null;
|
|
1264
|
+
physicalMode: boolean;
|
|
1265
|
+
lastExitCode: number;
|
|
1266
|
+
lastCommandDurationMs: number;
|
|
1267
|
+
procWarmup?: {
|
|
1268
|
+
loaded: number;
|
|
1269
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
1270
|
+
total?: number | undefined;
|
|
1271
|
+
restored?: boolean | undefined;
|
|
1272
|
+
sweeping?: boolean | undefined;
|
|
1273
|
+
feed?: {
|
|
1274
|
+
id: number;
|
|
1275
|
+
total: number;
|
|
1276
|
+
loaded: number;
|
|
1277
|
+
} | undefined;
|
|
1278
|
+
arrived?: number[] | undefined;
|
|
1279
|
+
} | undefined;
|
|
1280
|
+
procIndex?: {
|
|
1281
|
+
feeds: number;
|
|
1282
|
+
jobs: number;
|
|
1283
|
+
} | undefined;
|
|
1284
|
+
warmupFailures?: {
|
|
1285
|
+
label: string;
|
|
1286
|
+
message: string;
|
|
1287
|
+
}[] | undefined;
|
|
1288
|
+
}, {
|
|
1289
|
+
user: string;
|
|
1290
|
+
uri: string;
|
|
1291
|
+
cwd: string;
|
|
1292
|
+
pacsserver: string | null;
|
|
1293
|
+
physicalMode: boolean;
|
|
1294
|
+
lastExitCode: number;
|
|
1295
|
+
lastCommandDurationMs: number;
|
|
1296
|
+
procWarmup?: {
|
|
1297
|
+
loaded: number;
|
|
1298
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
1299
|
+
total?: number | undefined;
|
|
1300
|
+
restored?: boolean | undefined;
|
|
1301
|
+
sweeping?: boolean | undefined;
|
|
1302
|
+
feed?: {
|
|
1303
|
+
id: number;
|
|
1304
|
+
total: number;
|
|
1305
|
+
loaded: number;
|
|
1306
|
+
} | undefined;
|
|
1307
|
+
arrived?: number[] | undefined;
|
|
1308
|
+
} | undefined;
|
|
1309
|
+
procIndex?: {
|
|
1310
|
+
feeds: number;
|
|
1311
|
+
jobs: number;
|
|
1312
|
+
} | undefined;
|
|
1313
|
+
warmupFailures?: {
|
|
1314
|
+
label: string;
|
|
1315
|
+
message: string;
|
|
1316
|
+
}[] | undefined;
|
|
1317
|
+
}>;
|
|
1318
|
+
export type PromptContext = z.infer<typeof promptContextSchema>;
|
|
1319
|
+
/**
|
|
1320
|
+
* The prompt context, pushed by the daemon with each result and on any context
|
|
1321
|
+
* change. The daemon knows the session context; each surface renders it with
|
|
1322
|
+
* its own theme, so prompt themes are a per-surface choice rather than the
|
|
1323
|
+
* daemon's.
|
|
1324
|
+
*/
|
|
1325
|
+
export declare const promptLineMessageSchema: z.ZodObject<{
|
|
1326
|
+
type: z.ZodLiteral<"promptline">;
|
|
1327
|
+
context: z.ZodObject<{
|
|
1328
|
+
user: z.ZodString;
|
|
1329
|
+
uri: z.ZodString;
|
|
1330
|
+
cwd: z.ZodString;
|
|
1331
|
+
pacsserver: z.ZodNullable<z.ZodString>;
|
|
1332
|
+
physicalMode: z.ZodBoolean;
|
|
1333
|
+
lastExitCode: z.ZodNumber;
|
|
1334
|
+
lastCommandDurationMs: z.ZodNumber;
|
|
1335
|
+
procWarmup: z.ZodOptional<z.ZodObject<{
|
|
1336
|
+
loaded: z.ZodNumber;
|
|
1337
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
1338
|
+
restored: z.ZodOptional<z.ZodBoolean>;
|
|
1339
|
+
state: z.ZodOptional<z.ZodEnum<["cold", "cached", "failed"]>>;
|
|
1340
|
+
sweeping: z.ZodOptional<z.ZodBoolean>;
|
|
1341
|
+
feed: z.ZodOptional<z.ZodObject<{
|
|
1342
|
+
id: z.ZodNumber;
|
|
1343
|
+
loaded: z.ZodNumber;
|
|
1344
|
+
total: z.ZodNumber;
|
|
1345
|
+
}, "strip", z.ZodTypeAny, {
|
|
1346
|
+
id: number;
|
|
1347
|
+
total: number;
|
|
1348
|
+
loaded: number;
|
|
1349
|
+
}, {
|
|
1350
|
+
id: number;
|
|
1351
|
+
total: number;
|
|
1352
|
+
loaded: number;
|
|
1353
|
+
}>>;
|
|
1354
|
+
arrived: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
1355
|
+
}, "strip", z.ZodTypeAny, {
|
|
1356
|
+
loaded: number;
|
|
1357
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
1358
|
+
total?: number | undefined;
|
|
1359
|
+
restored?: boolean | undefined;
|
|
1360
|
+
sweeping?: boolean | undefined;
|
|
1361
|
+
feed?: {
|
|
1362
|
+
id: number;
|
|
1363
|
+
total: number;
|
|
1364
|
+
loaded: number;
|
|
1365
|
+
} | undefined;
|
|
1366
|
+
arrived?: number[] | undefined;
|
|
1367
|
+
}, {
|
|
1368
|
+
loaded: number;
|
|
1369
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
1370
|
+
total?: number | undefined;
|
|
1371
|
+
restored?: boolean | undefined;
|
|
1372
|
+
sweeping?: boolean | undefined;
|
|
1373
|
+
feed?: {
|
|
1374
|
+
id: number;
|
|
1375
|
+
total: number;
|
|
1376
|
+
loaded: number;
|
|
1377
|
+
} | undefined;
|
|
1378
|
+
arrived?: number[] | undefined;
|
|
1379
|
+
}>>;
|
|
1380
|
+
procIndex: z.ZodOptional<z.ZodObject<{
|
|
1381
|
+
jobs: z.ZodNumber;
|
|
1382
|
+
feeds: z.ZodNumber;
|
|
1383
|
+
}, "strip", z.ZodTypeAny, {
|
|
1384
|
+
feeds: number;
|
|
1385
|
+
jobs: number;
|
|
1386
|
+
}, {
|
|
1387
|
+
feeds: number;
|
|
1388
|
+
jobs: number;
|
|
1389
|
+
}>>;
|
|
1390
|
+
/**
|
|
1391
|
+
* Warm-up steps that failed behind the prompt and have not since
|
|
1392
|
+
* succeeded. Optional, so an older daemon still parses here.
|
|
1393
|
+
*/
|
|
1394
|
+
warmupFailures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1395
|
+
label: z.ZodString;
|
|
1396
|
+
message: z.ZodString;
|
|
1397
|
+
}, "strip", z.ZodTypeAny, {
|
|
1398
|
+
label: string;
|
|
1399
|
+
message: string;
|
|
1400
|
+
}, {
|
|
1401
|
+
label: string;
|
|
1402
|
+
message: string;
|
|
1403
|
+
}>, "many">>;
|
|
1404
|
+
}, "strip", z.ZodTypeAny, {
|
|
1405
|
+
user: string;
|
|
1406
|
+
uri: string;
|
|
1407
|
+
cwd: string;
|
|
1408
|
+
pacsserver: string | null;
|
|
1409
|
+
physicalMode: boolean;
|
|
1410
|
+
lastExitCode: number;
|
|
1411
|
+
lastCommandDurationMs: number;
|
|
1412
|
+
procWarmup?: {
|
|
1413
|
+
loaded: number;
|
|
1414
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
1415
|
+
total?: number | undefined;
|
|
1416
|
+
restored?: boolean | undefined;
|
|
1417
|
+
sweeping?: boolean | undefined;
|
|
1418
|
+
feed?: {
|
|
1419
|
+
id: number;
|
|
1420
|
+
total: number;
|
|
1421
|
+
loaded: number;
|
|
1422
|
+
} | undefined;
|
|
1423
|
+
arrived?: number[] | undefined;
|
|
1424
|
+
} | undefined;
|
|
1425
|
+
procIndex?: {
|
|
1426
|
+
feeds: number;
|
|
1427
|
+
jobs: number;
|
|
1428
|
+
} | undefined;
|
|
1429
|
+
warmupFailures?: {
|
|
1430
|
+
label: string;
|
|
1431
|
+
message: string;
|
|
1432
|
+
}[] | undefined;
|
|
1433
|
+
}, {
|
|
1434
|
+
user: string;
|
|
1435
|
+
uri: string;
|
|
1436
|
+
cwd: string;
|
|
1437
|
+
pacsserver: string | null;
|
|
1438
|
+
physicalMode: boolean;
|
|
1439
|
+
lastExitCode: number;
|
|
1440
|
+
lastCommandDurationMs: number;
|
|
1441
|
+
procWarmup?: {
|
|
1442
|
+
loaded: number;
|
|
1443
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
1444
|
+
total?: number | undefined;
|
|
1445
|
+
restored?: boolean | undefined;
|
|
1446
|
+
sweeping?: boolean | undefined;
|
|
1447
|
+
feed?: {
|
|
1448
|
+
id: number;
|
|
1449
|
+
total: number;
|
|
1450
|
+
loaded: number;
|
|
1451
|
+
} | undefined;
|
|
1452
|
+
arrived?: number[] | undefined;
|
|
1453
|
+
} | undefined;
|
|
1454
|
+
procIndex?: {
|
|
1455
|
+
feeds: number;
|
|
1456
|
+
jobs: number;
|
|
1457
|
+
} | undefined;
|
|
1458
|
+
warmupFailures?: {
|
|
1459
|
+
label: string;
|
|
1460
|
+
message: string;
|
|
1461
|
+
}[] | undefined;
|
|
1462
|
+
}>;
|
|
1463
|
+
}, "strip", z.ZodTypeAny, {
|
|
1464
|
+
type: "promptline";
|
|
1465
|
+
context: {
|
|
1466
|
+
user: string;
|
|
1467
|
+
uri: string;
|
|
1468
|
+
cwd: string;
|
|
1469
|
+
pacsserver: string | null;
|
|
1470
|
+
physicalMode: boolean;
|
|
1471
|
+
lastExitCode: number;
|
|
1472
|
+
lastCommandDurationMs: number;
|
|
1473
|
+
procWarmup?: {
|
|
1474
|
+
loaded: number;
|
|
1475
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
1476
|
+
total?: number | undefined;
|
|
1477
|
+
restored?: boolean | undefined;
|
|
1478
|
+
sweeping?: boolean | undefined;
|
|
1479
|
+
feed?: {
|
|
1480
|
+
id: number;
|
|
1481
|
+
total: number;
|
|
1482
|
+
loaded: number;
|
|
1483
|
+
} | undefined;
|
|
1484
|
+
arrived?: number[] | undefined;
|
|
1485
|
+
} | undefined;
|
|
1486
|
+
procIndex?: {
|
|
1487
|
+
feeds: number;
|
|
1488
|
+
jobs: number;
|
|
1489
|
+
} | undefined;
|
|
1490
|
+
warmupFailures?: {
|
|
1491
|
+
label: string;
|
|
1492
|
+
message: string;
|
|
1493
|
+
}[] | undefined;
|
|
1494
|
+
};
|
|
1495
|
+
}, {
|
|
1496
|
+
type: "promptline";
|
|
1497
|
+
context: {
|
|
1498
|
+
user: string;
|
|
1499
|
+
uri: string;
|
|
1500
|
+
cwd: string;
|
|
1501
|
+
pacsserver: string | null;
|
|
1502
|
+
physicalMode: boolean;
|
|
1503
|
+
lastExitCode: number;
|
|
1504
|
+
lastCommandDurationMs: number;
|
|
1505
|
+
procWarmup?: {
|
|
1506
|
+
loaded: number;
|
|
1507
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
1508
|
+
total?: number | undefined;
|
|
1509
|
+
restored?: boolean | undefined;
|
|
1510
|
+
sweeping?: boolean | undefined;
|
|
1511
|
+
feed?: {
|
|
1512
|
+
id: number;
|
|
1513
|
+
total: number;
|
|
1514
|
+
loaded: number;
|
|
1515
|
+
} | undefined;
|
|
1516
|
+
arrived?: number[] | undefined;
|
|
1517
|
+
} | undefined;
|
|
1518
|
+
procIndex?: {
|
|
1519
|
+
feeds: number;
|
|
1520
|
+
jobs: number;
|
|
1521
|
+
} | undefined;
|
|
1522
|
+
warmupFailures?: {
|
|
1523
|
+
label: string;
|
|
1524
|
+
message: string;
|
|
1525
|
+
}[] | undefined;
|
|
1526
|
+
};
|
|
1527
|
+
}>;
|
|
1528
|
+
/**
|
|
1529
|
+
* Asks the surface to run a pipeline segment on its own machine (never on the
|
|
1530
|
+
* daemon host) and return the output. `input` and the reply's `output` are
|
|
1531
|
+
* base64, since segment data is arbitrary bytes.
|
|
1532
|
+
*/
|
|
1533
|
+
export declare const pipeMessageSchema: z.ZodObject<{
|
|
1534
|
+
type: z.ZodLiteral<"pipe">;
|
|
1535
|
+
pipeId: z.ZodString;
|
|
1536
|
+
command: z.ZodString;
|
|
1537
|
+
input: z.ZodString;
|
|
1538
|
+
}, "strip", z.ZodTypeAny, {
|
|
1539
|
+
type: "pipe";
|
|
1540
|
+
input: string;
|
|
1541
|
+
pipeId: string;
|
|
1542
|
+
command: string;
|
|
1543
|
+
}, {
|
|
1544
|
+
type: "pipe";
|
|
1545
|
+
input: string;
|
|
1546
|
+
pipeId: string;
|
|
1547
|
+
command: string;
|
|
1548
|
+
}>;
|
|
1549
|
+
/** Asks the surface to run a shell command on its own machine, never on the daemon host. */
|
|
1550
|
+
export declare const shellMessageSchema: z.ZodObject<{
|
|
1551
|
+
type: z.ZodLiteral<"shell">;
|
|
1552
|
+
shellId: z.ZodString;
|
|
1553
|
+
command: z.ZodString;
|
|
1554
|
+
}, "strip", z.ZodTypeAny, {
|
|
1555
|
+
type: "shell";
|
|
1556
|
+
shellId: string;
|
|
1557
|
+
command: string;
|
|
1558
|
+
}, {
|
|
1559
|
+
type: "shell";
|
|
1560
|
+
shellId: string;
|
|
1561
|
+
command: string;
|
|
1562
|
+
}>;
|
|
1563
|
+
/**
|
|
1564
|
+
* Asks the surface to open content in its local editor (never on the daemon
|
|
1565
|
+
* host) and return the edited result.
|
|
1566
|
+
*/
|
|
1567
|
+
export declare const editMessageSchema: z.ZodObject<{
|
|
1568
|
+
type: z.ZodLiteral<"edit">;
|
|
1569
|
+
editId: z.ZodString;
|
|
1570
|
+
content: z.ZodString;
|
|
1571
|
+
extension: z.ZodOptional<z.ZodString>;
|
|
1572
|
+
}, "strip", z.ZodTypeAny, {
|
|
1573
|
+
type: "edit";
|
|
1574
|
+
editId: string;
|
|
1575
|
+
content: string;
|
|
1576
|
+
extension?: string | undefined;
|
|
1577
|
+
}, {
|
|
1578
|
+
type: "edit";
|
|
1579
|
+
editId: string;
|
|
1580
|
+
content: string;
|
|
1581
|
+
extension?: string | undefined;
|
|
1582
|
+
}>;
|
|
1583
|
+
/**
|
|
1584
|
+
* Asks the surface running the current command to place a file where its
|
|
1585
|
+
* operator can reach it.
|
|
1586
|
+
*
|
|
1587
|
+
* The message names what to deliver, never the bytes. A surface fetches those
|
|
1588
|
+
* itself from the daemon's token-gated byte route, so a large file does not
|
|
1589
|
+
* cross the session bus base64-encoded — the intent travels through the
|
|
1590
|
+
* vocabulary and the bytes travel through the byte route.
|
|
1591
|
+
*/
|
|
1592
|
+
export declare const deliverMessageSchema: z.ZodObject<{
|
|
1593
|
+
type: z.ZodLiteral<"deliver">;
|
|
1594
|
+
deliverId: z.ZodString;
|
|
1595
|
+
path: z.ZodString;
|
|
1596
|
+
filename: z.ZodString;
|
|
1597
|
+
destination: z.ZodOptional<z.ZodString>;
|
|
1598
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
1599
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
1600
|
+
}, "strip", z.ZodTypeAny, {
|
|
1601
|
+
path: string;
|
|
1602
|
+
type: "deliver";
|
|
1603
|
+
deliverId: string;
|
|
1604
|
+
filename: string;
|
|
1605
|
+
destination?: string | undefined;
|
|
1606
|
+
size?: number | undefined;
|
|
1607
|
+
contentType?: string | undefined;
|
|
1608
|
+
}, {
|
|
1609
|
+
path: string;
|
|
1610
|
+
type: "deliver";
|
|
1611
|
+
deliverId: string;
|
|
1612
|
+
filename: string;
|
|
1613
|
+
destination?: string | undefined;
|
|
1614
|
+
size?: number | undefined;
|
|
1615
|
+
contentType?: string | undefined;
|
|
1616
|
+
}>;
|
|
1617
|
+
/** What to deliver, before the daemon adds the correlation id. */
|
|
1618
|
+
export type FileDeliverRequest = Omit<z.infer<typeof deliverMessageSchema>, 'type' | 'deliverId'>;
|
|
1619
|
+
/** Where a delivered file landed, as the surface reports it. */
|
|
1620
|
+
export type FileDeliverResult = Omit<z.infer<typeof deliverResultMessageSchema>, 'type' | 'deliverId'>;
|
|
1621
|
+
/**
|
|
1622
|
+
* The daemon's heartbeat, pushed roughly once a second while any surface is
|
|
1623
|
+
* attached: the live process-index counts. Event-driven facts (progress,
|
|
1624
|
+
* command latency) travel on their own messages; this carries only what
|
|
1625
|
+
* changes without a command.
|
|
1626
|
+
*/
|
|
1627
|
+
export declare const telemetryMessageSchema: z.ZodObject<{
|
|
1628
|
+
type: z.ZodLiteral<"telemetry">;
|
|
1629
|
+
index: z.ZodObject<{
|
|
1630
|
+
jobs: z.ZodNumber;
|
|
1631
|
+
feeds: z.ZodNumber;
|
|
1632
|
+
}, "strip", z.ZodTypeAny, {
|
|
1633
|
+
feeds: number;
|
|
1634
|
+
jobs: number;
|
|
1635
|
+
}, {
|
|
1636
|
+
feeds: number;
|
|
1637
|
+
jobs: number;
|
|
1638
|
+
}>;
|
|
1639
|
+
}, "strip", z.ZodTypeAny, {
|
|
1640
|
+
type: "telemetry";
|
|
1641
|
+
index: {
|
|
1642
|
+
feeds: number;
|
|
1643
|
+
jobs: number;
|
|
1644
|
+
};
|
|
1645
|
+
}, {
|
|
1646
|
+
type: "telemetry";
|
|
1647
|
+
index: {
|
|
1648
|
+
feeds: number;
|
|
1649
|
+
jobs: number;
|
|
1650
|
+
};
|
|
1651
|
+
}>;
|
|
1652
|
+
/** Any message the daemon may send to a surface. */
|
|
1653
|
+
export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1654
|
+
type: z.ZodLiteral<"attached">;
|
|
1655
|
+
session: z.ZodString;
|
|
1656
|
+
protocolVersion: z.ZodNumber;
|
|
1657
|
+
stack: z.ZodOptional<z.ZodObject<{
|
|
1658
|
+
chell: z.ZodString;
|
|
1659
|
+
calypso: z.ZodString;
|
|
1660
|
+
build: z.ZodString;
|
|
1661
|
+
brasa: z.ZodOptional<z.ZodString>;
|
|
1662
|
+
chili: z.ZodOptional<z.ZodString>;
|
|
1663
|
+
salsa: z.ZodOptional<z.ZodString>;
|
|
1664
|
+
cumin: z.ZodOptional<z.ZodString>;
|
|
1665
|
+
}, "strip", z.ZodTypeAny, {
|
|
1666
|
+
chell: string;
|
|
1667
|
+
calypso: string;
|
|
1668
|
+
build: string;
|
|
1669
|
+
brasa?: string | undefined;
|
|
1670
|
+
chili?: string | undefined;
|
|
1671
|
+
salsa?: string | undefined;
|
|
1672
|
+
cumin?: string | undefined;
|
|
1673
|
+
}, {
|
|
1674
|
+
chell: string;
|
|
1675
|
+
calypso: string;
|
|
1676
|
+
build: string;
|
|
1677
|
+
brasa?: string | undefined;
|
|
1678
|
+
chili?: string | undefined;
|
|
1679
|
+
salsa?: string | undefined;
|
|
1680
|
+
cumin?: string | undefined;
|
|
1681
|
+
}>>;
|
|
1682
|
+
/** The host-control tiers the daemon declared (`shell`, `files`, `pipes`); empty or absent when off. */
|
|
1683
|
+
hostControl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1684
|
+
}, "strip", z.ZodTypeAny, {
|
|
1685
|
+
type: "attached";
|
|
1686
|
+
protocolVersion: number;
|
|
1687
|
+
session: string;
|
|
1688
|
+
stack?: {
|
|
1689
|
+
chell: string;
|
|
1690
|
+
calypso: string;
|
|
1691
|
+
build: string;
|
|
1692
|
+
brasa?: string | undefined;
|
|
1693
|
+
chili?: string | undefined;
|
|
1694
|
+
salsa?: string | undefined;
|
|
1695
|
+
cumin?: string | undefined;
|
|
1696
|
+
} | undefined;
|
|
1697
|
+
hostControl?: string[] | undefined;
|
|
1698
|
+
}, {
|
|
1699
|
+
type: "attached";
|
|
1700
|
+
protocolVersion: number;
|
|
1701
|
+
session: string;
|
|
1702
|
+
stack?: {
|
|
1703
|
+
chell: string;
|
|
1704
|
+
calypso: string;
|
|
1705
|
+
build: string;
|
|
1706
|
+
brasa?: string | undefined;
|
|
1707
|
+
chili?: string | undefined;
|
|
1708
|
+
salsa?: string | undefined;
|
|
1709
|
+
cumin?: string | undefined;
|
|
1710
|
+
} | undefined;
|
|
1711
|
+
hostControl?: string[] | undefined;
|
|
1712
|
+
}>, z.ZodObject<{
|
|
1713
|
+
type: z.ZodLiteral<"result">;
|
|
1714
|
+
id: z.ZodString;
|
|
1715
|
+
envelopes: z.ZodArray<z.ZodObject<{
|
|
1716
|
+
status: z.ZodEnum<["ok", "error"]>;
|
|
1717
|
+
rendered: z.ZodString;
|
|
1718
|
+
renderedErr: z.ZodOptional<z.ZodString>;
|
|
1719
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
1720
|
+
kind: z.ZodString;
|
|
1721
|
+
data: z.ZodUnknown;
|
|
1722
|
+
}, "strip", z.ZodTypeAny, {
|
|
1723
|
+
kind: string;
|
|
1724
|
+
data?: unknown;
|
|
1725
|
+
}, {
|
|
1726
|
+
kind: string;
|
|
1727
|
+
data?: unknown;
|
|
1728
|
+
}>>;
|
|
1729
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1730
|
+
type: z.ZodEnum<["error", "warning"]>;
|
|
1731
|
+
message: z.ZodString;
|
|
1732
|
+
}, "strip", z.ZodTypeAny, {
|
|
1733
|
+
message: string;
|
|
1734
|
+
type: "error" | "warning";
|
|
1735
|
+
}, {
|
|
1736
|
+
message: string;
|
|
1737
|
+
type: "error" | "warning";
|
|
1738
|
+
}>, "many">>;
|
|
1739
|
+
trace: z.ZodOptional<z.ZodObject<{
|
|
1740
|
+
input: z.ZodString;
|
|
1741
|
+
proposed: z.ZodString;
|
|
1742
|
+
validated: z.ZodBoolean;
|
|
1743
|
+
executed: z.ZodOptional<z.ZodString>;
|
|
1744
|
+
}, "strip", z.ZodTypeAny, {
|
|
1745
|
+
input: string;
|
|
1746
|
+
proposed: string;
|
|
1747
|
+
validated: boolean;
|
|
1748
|
+
executed?: string | undefined;
|
|
1749
|
+
}, {
|
|
1750
|
+
input: string;
|
|
1751
|
+
proposed: string;
|
|
1752
|
+
validated: boolean;
|
|
1753
|
+
executed?: string | undefined;
|
|
1754
|
+
}>>;
|
|
1755
|
+
}, "strip", z.ZodTypeAny, {
|
|
1756
|
+
status: "error" | "ok";
|
|
1757
|
+
rendered: string;
|
|
1758
|
+
renderedErr?: string | undefined;
|
|
1759
|
+
model?: {
|
|
1760
|
+
kind: string;
|
|
1761
|
+
data?: unknown;
|
|
1762
|
+
} | undefined;
|
|
1763
|
+
errors?: {
|
|
1764
|
+
message: string;
|
|
1765
|
+
type: "error" | "warning";
|
|
1766
|
+
}[] | undefined;
|
|
1767
|
+
trace?: {
|
|
1768
|
+
input: string;
|
|
1769
|
+
proposed: string;
|
|
1770
|
+
validated: boolean;
|
|
1771
|
+
executed?: string | undefined;
|
|
1772
|
+
} | undefined;
|
|
1773
|
+
}, {
|
|
1774
|
+
status: "error" | "ok";
|
|
1775
|
+
rendered: string;
|
|
1776
|
+
renderedErr?: string | undefined;
|
|
1777
|
+
model?: {
|
|
1778
|
+
kind: string;
|
|
1779
|
+
data?: unknown;
|
|
1780
|
+
} | undefined;
|
|
1781
|
+
errors?: {
|
|
1782
|
+
message: string;
|
|
1783
|
+
type: "error" | "warning";
|
|
1784
|
+
}[] | undefined;
|
|
1785
|
+
trace?: {
|
|
1786
|
+
input: string;
|
|
1787
|
+
proposed: string;
|
|
1788
|
+
validated: boolean;
|
|
1789
|
+
executed?: string | undefined;
|
|
1790
|
+
} | undefined;
|
|
1791
|
+
}>, "many">;
|
|
1792
|
+
}, "strip", z.ZodTypeAny, {
|
|
1793
|
+
id: string;
|
|
1794
|
+
type: "result";
|
|
1795
|
+
envelopes: {
|
|
1796
|
+
status: "error" | "ok";
|
|
1797
|
+
rendered: string;
|
|
1798
|
+
renderedErr?: string | undefined;
|
|
1799
|
+
model?: {
|
|
1800
|
+
kind: string;
|
|
1801
|
+
data?: unknown;
|
|
1802
|
+
} | undefined;
|
|
1803
|
+
errors?: {
|
|
1804
|
+
message: string;
|
|
1805
|
+
type: "error" | "warning";
|
|
1806
|
+
}[] | undefined;
|
|
1807
|
+
trace?: {
|
|
1808
|
+
input: string;
|
|
1809
|
+
proposed: string;
|
|
1810
|
+
validated: boolean;
|
|
1811
|
+
executed?: string | undefined;
|
|
1812
|
+
} | undefined;
|
|
1813
|
+
}[];
|
|
1814
|
+
}, {
|
|
1815
|
+
id: string;
|
|
1816
|
+
type: "result";
|
|
1817
|
+
envelopes: {
|
|
1818
|
+
status: "error" | "ok";
|
|
1819
|
+
rendered: string;
|
|
1820
|
+
renderedErr?: string | undefined;
|
|
1821
|
+
model?: {
|
|
1822
|
+
kind: string;
|
|
1823
|
+
data?: unknown;
|
|
1824
|
+
} | undefined;
|
|
1825
|
+
errors?: {
|
|
1826
|
+
message: string;
|
|
1827
|
+
type: "error" | "warning";
|
|
1828
|
+
}[] | undefined;
|
|
1829
|
+
trace?: {
|
|
1830
|
+
input: string;
|
|
1831
|
+
proposed: string;
|
|
1832
|
+
validated: boolean;
|
|
1833
|
+
executed?: string | undefined;
|
|
1834
|
+
} | undefined;
|
|
1835
|
+
}[];
|
|
1836
|
+
}>, z.ZodObject<{
|
|
1837
|
+
type: z.ZodLiteral<"complete">;
|
|
1838
|
+
id: z.ZodString;
|
|
1839
|
+
prefix: z.ZodString;
|
|
1840
|
+
candidates: z.ZodArray<z.ZodString, "many">;
|
|
1841
|
+
}, "strip", z.ZodTypeAny, {
|
|
1842
|
+
id: string;
|
|
1843
|
+
type: "complete";
|
|
1844
|
+
prefix: string;
|
|
1845
|
+
candidates: string[];
|
|
1846
|
+
}, {
|
|
1847
|
+
id: string;
|
|
1848
|
+
type: "complete";
|
|
1849
|
+
prefix: string;
|
|
1850
|
+
candidates: string[];
|
|
1851
|
+
}>, z.ZodObject<{
|
|
1852
|
+
type: z.ZodLiteral<"output">;
|
|
1853
|
+
id: z.ZodString;
|
|
1854
|
+
channel: z.ZodEnum<["data", "err", "status"]>;
|
|
1855
|
+
chunk: z.ZodString;
|
|
1856
|
+
}, "strip", z.ZodTypeAny, {
|
|
1857
|
+
id: string;
|
|
1858
|
+
type: "output";
|
|
1859
|
+
channel: "status" | "data" | "err";
|
|
1860
|
+
chunk: string;
|
|
1861
|
+
}, {
|
|
1862
|
+
id: string;
|
|
1863
|
+
type: "output";
|
|
1864
|
+
channel: "status" | "data" | "err";
|
|
1865
|
+
chunk: string;
|
|
1866
|
+
}>, z.ZodObject<{
|
|
1867
|
+
type: z.ZodLiteral<"progress">;
|
|
1868
|
+
id: z.ZodString;
|
|
1869
|
+
operation: z.ZodCatch<z.ZodEnum<["upload", "download", "pull", "workflow", "pipeline", "group", "task"]>>;
|
|
1870
|
+
kind: z.ZodOptional<z.ZodCatch<z.ZodEnum<["transfer", "retrieve", "workflow", "inspection"]>>>;
|
|
1871
|
+
phase: z.ZodCatch<z.ZodEnum<["scanning", "transferring", "watching", "retrying", "reading", "working", "complete", "failed"]>>;
|
|
1872
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1873
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
1874
|
+
current: z.ZodOptional<z.ZodNumber>;
|
|
1875
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
1876
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
1877
|
+
unit: z.ZodOptional<z.ZodCatch<z.ZodEnum<["files", "bytes", "series", "jobs", "nodes"]>>>;
|
|
1878
|
+
status: z.ZodOptional<z.ZodCatch<z.ZodEnum<["running", "done", "unconfirmed", "stalled", "timeout", "error", "unknown"]>>>;
|
|
1879
|
+
}, "strip", z.ZodTypeAny, {
|
|
1880
|
+
id: string;
|
|
1881
|
+
type: "progress";
|
|
1882
|
+
operation: "upload" | "download" | "pull" | "workflow" | "pipeline" | "group" | "task";
|
|
1883
|
+
phase: "failed" | "scanning" | "transferring" | "watching" | "retrying" | "reading" | "working" | "complete";
|
|
1884
|
+
label?: string | undefined;
|
|
1885
|
+
status?: "unknown" | "done" | "error" | "running" | "unconfirmed" | "stalled" | "timeout" | undefined;
|
|
1886
|
+
kind?: "workflow" | "transfer" | "retrieve" | "inspection" | undefined;
|
|
1887
|
+
itemId?: string | undefined;
|
|
1888
|
+
current?: number | undefined;
|
|
1889
|
+
total?: number | undefined;
|
|
1890
|
+
percent?: number | undefined;
|
|
1891
|
+
unit?: "nodes" | "files" | "bytes" | "series" | "jobs" | undefined;
|
|
1892
|
+
}, {
|
|
1893
|
+
id: string;
|
|
1894
|
+
type: "progress";
|
|
1895
|
+
label?: string | undefined;
|
|
1896
|
+
status?: unknown;
|
|
1897
|
+
kind?: unknown;
|
|
1898
|
+
operation?: unknown;
|
|
1899
|
+
phase?: unknown;
|
|
1900
|
+
itemId?: string | undefined;
|
|
1901
|
+
current?: number | undefined;
|
|
1902
|
+
total?: number | undefined;
|
|
1903
|
+
percent?: number | undefined;
|
|
1904
|
+
unit?: unknown;
|
|
1905
|
+
}>, z.ZodObject<{
|
|
1906
|
+
type: z.ZodLiteral<"session">;
|
|
1907
|
+
surface: z.ZodString;
|
|
1908
|
+
envelope: z.ZodObject<{
|
|
1909
|
+
status: z.ZodEnum<["ok", "error"]>;
|
|
1910
|
+
rendered: z.ZodString;
|
|
1911
|
+
renderedErr: z.ZodOptional<z.ZodString>;
|
|
1912
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
1913
|
+
kind: z.ZodString;
|
|
1914
|
+
data: z.ZodUnknown;
|
|
1915
|
+
}, "strip", z.ZodTypeAny, {
|
|
1916
|
+
kind: string;
|
|
1917
|
+
data?: unknown;
|
|
1918
|
+
}, {
|
|
1919
|
+
kind: string;
|
|
1920
|
+
data?: unknown;
|
|
1921
|
+
}>>;
|
|
1922
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1923
|
+
type: z.ZodEnum<["error", "warning"]>;
|
|
1924
|
+
message: z.ZodString;
|
|
1925
|
+
}, "strip", z.ZodTypeAny, {
|
|
1926
|
+
message: string;
|
|
1927
|
+
type: "error" | "warning";
|
|
1928
|
+
}, {
|
|
1929
|
+
message: string;
|
|
1930
|
+
type: "error" | "warning";
|
|
1931
|
+
}>, "many">>;
|
|
1932
|
+
trace: z.ZodOptional<z.ZodObject<{
|
|
1933
|
+
input: z.ZodString;
|
|
1934
|
+
proposed: z.ZodString;
|
|
1935
|
+
validated: z.ZodBoolean;
|
|
1936
|
+
executed: z.ZodOptional<z.ZodString>;
|
|
1937
|
+
}, "strip", z.ZodTypeAny, {
|
|
1938
|
+
input: string;
|
|
1939
|
+
proposed: string;
|
|
1940
|
+
validated: boolean;
|
|
1941
|
+
executed?: string | undefined;
|
|
1942
|
+
}, {
|
|
1943
|
+
input: string;
|
|
1944
|
+
proposed: string;
|
|
1945
|
+
validated: boolean;
|
|
1946
|
+
executed?: string | undefined;
|
|
1947
|
+
}>>;
|
|
1948
|
+
}, "strip", z.ZodTypeAny, {
|
|
1949
|
+
status: "error" | "ok";
|
|
1950
|
+
rendered: string;
|
|
1951
|
+
renderedErr?: string | undefined;
|
|
1952
|
+
model?: {
|
|
1953
|
+
kind: string;
|
|
1954
|
+
data?: unknown;
|
|
1955
|
+
} | undefined;
|
|
1956
|
+
errors?: {
|
|
1957
|
+
message: string;
|
|
1958
|
+
type: "error" | "warning";
|
|
1959
|
+
}[] | undefined;
|
|
1960
|
+
trace?: {
|
|
1961
|
+
input: string;
|
|
1962
|
+
proposed: string;
|
|
1963
|
+
validated: boolean;
|
|
1964
|
+
executed?: string | undefined;
|
|
1965
|
+
} | undefined;
|
|
1966
|
+
}, {
|
|
1967
|
+
status: "error" | "ok";
|
|
1968
|
+
rendered: string;
|
|
1969
|
+
renderedErr?: string | undefined;
|
|
1970
|
+
model?: {
|
|
1971
|
+
kind: string;
|
|
1972
|
+
data?: unknown;
|
|
1973
|
+
} | undefined;
|
|
1974
|
+
errors?: {
|
|
1975
|
+
message: string;
|
|
1976
|
+
type: "error" | "warning";
|
|
1977
|
+
}[] | undefined;
|
|
1978
|
+
trace?: {
|
|
1979
|
+
input: string;
|
|
1980
|
+
proposed: string;
|
|
1981
|
+
validated: boolean;
|
|
1982
|
+
executed?: string | undefined;
|
|
1983
|
+
} | undefined;
|
|
1984
|
+
}>;
|
|
1985
|
+
}, "strip", z.ZodTypeAny, {
|
|
1986
|
+
type: "session";
|
|
1987
|
+
envelope: {
|
|
1988
|
+
status: "error" | "ok";
|
|
1989
|
+
rendered: string;
|
|
1990
|
+
renderedErr?: string | undefined;
|
|
1991
|
+
model?: {
|
|
1992
|
+
kind: string;
|
|
1993
|
+
data?: unknown;
|
|
1994
|
+
} | undefined;
|
|
1995
|
+
errors?: {
|
|
1996
|
+
message: string;
|
|
1997
|
+
type: "error" | "warning";
|
|
1998
|
+
}[] | undefined;
|
|
1999
|
+
trace?: {
|
|
2000
|
+
input: string;
|
|
2001
|
+
proposed: string;
|
|
2002
|
+
validated: boolean;
|
|
2003
|
+
executed?: string | undefined;
|
|
2004
|
+
} | undefined;
|
|
2005
|
+
};
|
|
2006
|
+
surface: string;
|
|
2007
|
+
}, {
|
|
2008
|
+
type: "session";
|
|
2009
|
+
envelope: {
|
|
2010
|
+
status: "error" | "ok";
|
|
2011
|
+
rendered: string;
|
|
2012
|
+
renderedErr?: string | undefined;
|
|
2013
|
+
model?: {
|
|
2014
|
+
kind: string;
|
|
2015
|
+
data?: unknown;
|
|
2016
|
+
} | undefined;
|
|
2017
|
+
errors?: {
|
|
2018
|
+
message: string;
|
|
2019
|
+
type: "error" | "warning";
|
|
2020
|
+
}[] | undefined;
|
|
2021
|
+
trace?: {
|
|
2022
|
+
input: string;
|
|
2023
|
+
proposed: string;
|
|
2024
|
+
validated: boolean;
|
|
2025
|
+
executed?: string | undefined;
|
|
2026
|
+
} | undefined;
|
|
2027
|
+
};
|
|
2028
|
+
surface: string;
|
|
2029
|
+
}>, z.ZodObject<{
|
|
2030
|
+
type: z.ZodLiteral<"error">;
|
|
2031
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2032
|
+
reason: z.ZodString;
|
|
2033
|
+
}, "strip", z.ZodTypeAny, {
|
|
2034
|
+
type: "error";
|
|
2035
|
+
reason: string;
|
|
2036
|
+
id?: string | undefined;
|
|
2037
|
+
}, {
|
|
2038
|
+
type: "error";
|
|
2039
|
+
reason: string;
|
|
2040
|
+
id?: string | undefined;
|
|
2041
|
+
}>, z.ZodObject<{
|
|
2042
|
+
type: z.ZodLiteral<"prompt">;
|
|
2043
|
+
promptId: z.ZodString;
|
|
2044
|
+
message: z.ZodString;
|
|
2045
|
+
hidden: z.ZodBoolean;
|
|
2046
|
+
}, "strip", z.ZodTypeAny, {
|
|
2047
|
+
message: string;
|
|
2048
|
+
type: "prompt";
|
|
2049
|
+
promptId: string;
|
|
2050
|
+
hidden: boolean;
|
|
2051
|
+
}, {
|
|
2052
|
+
message: string;
|
|
2053
|
+
type: "prompt";
|
|
2054
|
+
promptId: string;
|
|
2055
|
+
hidden: boolean;
|
|
2056
|
+
}>, z.ZodObject<{
|
|
2057
|
+
type: z.ZodLiteral<"promptline">;
|
|
2058
|
+
context: z.ZodObject<{
|
|
2059
|
+
user: z.ZodString;
|
|
2060
|
+
uri: z.ZodString;
|
|
2061
|
+
cwd: z.ZodString;
|
|
2062
|
+
pacsserver: z.ZodNullable<z.ZodString>;
|
|
2063
|
+
physicalMode: z.ZodBoolean;
|
|
2064
|
+
lastExitCode: z.ZodNumber;
|
|
2065
|
+
lastCommandDurationMs: z.ZodNumber;
|
|
2066
|
+
procWarmup: z.ZodOptional<z.ZodObject<{
|
|
2067
|
+
loaded: z.ZodNumber;
|
|
2068
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
2069
|
+
restored: z.ZodOptional<z.ZodBoolean>;
|
|
2070
|
+
state: z.ZodOptional<z.ZodEnum<["cold", "cached", "failed"]>>;
|
|
2071
|
+
sweeping: z.ZodOptional<z.ZodBoolean>;
|
|
2072
|
+
feed: z.ZodOptional<z.ZodObject<{
|
|
2073
|
+
id: z.ZodNumber;
|
|
2074
|
+
loaded: z.ZodNumber;
|
|
2075
|
+
total: z.ZodNumber;
|
|
2076
|
+
}, "strip", z.ZodTypeAny, {
|
|
2077
|
+
id: number;
|
|
2078
|
+
total: number;
|
|
2079
|
+
loaded: number;
|
|
2080
|
+
}, {
|
|
2081
|
+
id: number;
|
|
2082
|
+
total: number;
|
|
2083
|
+
loaded: number;
|
|
2084
|
+
}>>;
|
|
2085
|
+
arrived: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
2086
|
+
}, "strip", z.ZodTypeAny, {
|
|
2087
|
+
loaded: number;
|
|
2088
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
2089
|
+
total?: number | undefined;
|
|
2090
|
+
restored?: boolean | undefined;
|
|
2091
|
+
sweeping?: boolean | undefined;
|
|
2092
|
+
feed?: {
|
|
2093
|
+
id: number;
|
|
2094
|
+
total: number;
|
|
2095
|
+
loaded: number;
|
|
2096
|
+
} | undefined;
|
|
2097
|
+
arrived?: number[] | undefined;
|
|
2098
|
+
}, {
|
|
2099
|
+
loaded: number;
|
|
2100
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
2101
|
+
total?: number | undefined;
|
|
2102
|
+
restored?: boolean | undefined;
|
|
2103
|
+
sweeping?: boolean | undefined;
|
|
2104
|
+
feed?: {
|
|
2105
|
+
id: number;
|
|
2106
|
+
total: number;
|
|
2107
|
+
loaded: number;
|
|
2108
|
+
} | undefined;
|
|
2109
|
+
arrived?: number[] | undefined;
|
|
2110
|
+
}>>;
|
|
2111
|
+
procIndex: z.ZodOptional<z.ZodObject<{
|
|
2112
|
+
jobs: z.ZodNumber;
|
|
2113
|
+
feeds: z.ZodNumber;
|
|
2114
|
+
}, "strip", z.ZodTypeAny, {
|
|
2115
|
+
feeds: number;
|
|
2116
|
+
jobs: number;
|
|
2117
|
+
}, {
|
|
2118
|
+
feeds: number;
|
|
2119
|
+
jobs: number;
|
|
2120
|
+
}>>;
|
|
2121
|
+
/**
|
|
2122
|
+
* Warm-up steps that failed behind the prompt and have not since
|
|
2123
|
+
* succeeded. Optional, so an older daemon still parses here.
|
|
2124
|
+
*/
|
|
2125
|
+
warmupFailures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2126
|
+
label: z.ZodString;
|
|
2127
|
+
message: z.ZodString;
|
|
2128
|
+
}, "strip", z.ZodTypeAny, {
|
|
2129
|
+
label: string;
|
|
2130
|
+
message: string;
|
|
2131
|
+
}, {
|
|
2132
|
+
label: string;
|
|
2133
|
+
message: string;
|
|
2134
|
+
}>, "many">>;
|
|
2135
|
+
}, "strip", z.ZodTypeAny, {
|
|
2136
|
+
user: string;
|
|
2137
|
+
uri: string;
|
|
2138
|
+
cwd: string;
|
|
2139
|
+
pacsserver: string | null;
|
|
2140
|
+
physicalMode: boolean;
|
|
2141
|
+
lastExitCode: number;
|
|
2142
|
+
lastCommandDurationMs: number;
|
|
2143
|
+
procWarmup?: {
|
|
2144
|
+
loaded: number;
|
|
2145
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
2146
|
+
total?: number | undefined;
|
|
2147
|
+
restored?: boolean | undefined;
|
|
2148
|
+
sweeping?: boolean | undefined;
|
|
2149
|
+
feed?: {
|
|
2150
|
+
id: number;
|
|
2151
|
+
total: number;
|
|
2152
|
+
loaded: number;
|
|
2153
|
+
} | undefined;
|
|
2154
|
+
arrived?: number[] | undefined;
|
|
2155
|
+
} | undefined;
|
|
2156
|
+
procIndex?: {
|
|
2157
|
+
feeds: number;
|
|
2158
|
+
jobs: number;
|
|
2159
|
+
} | undefined;
|
|
2160
|
+
warmupFailures?: {
|
|
2161
|
+
label: string;
|
|
2162
|
+
message: string;
|
|
2163
|
+
}[] | undefined;
|
|
2164
|
+
}, {
|
|
2165
|
+
user: string;
|
|
2166
|
+
uri: string;
|
|
2167
|
+
cwd: string;
|
|
2168
|
+
pacsserver: string | null;
|
|
2169
|
+
physicalMode: boolean;
|
|
2170
|
+
lastExitCode: number;
|
|
2171
|
+
lastCommandDurationMs: number;
|
|
2172
|
+
procWarmup?: {
|
|
2173
|
+
loaded: number;
|
|
2174
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
2175
|
+
total?: number | undefined;
|
|
2176
|
+
restored?: boolean | undefined;
|
|
2177
|
+
sweeping?: boolean | undefined;
|
|
2178
|
+
feed?: {
|
|
2179
|
+
id: number;
|
|
2180
|
+
total: number;
|
|
2181
|
+
loaded: number;
|
|
2182
|
+
} | undefined;
|
|
2183
|
+
arrived?: number[] | undefined;
|
|
2184
|
+
} | undefined;
|
|
2185
|
+
procIndex?: {
|
|
2186
|
+
feeds: number;
|
|
2187
|
+
jobs: number;
|
|
2188
|
+
} | undefined;
|
|
2189
|
+
warmupFailures?: {
|
|
2190
|
+
label: string;
|
|
2191
|
+
message: string;
|
|
2192
|
+
}[] | undefined;
|
|
2193
|
+
}>;
|
|
2194
|
+
}, "strip", z.ZodTypeAny, {
|
|
2195
|
+
type: "promptline";
|
|
2196
|
+
context: {
|
|
2197
|
+
user: string;
|
|
2198
|
+
uri: string;
|
|
2199
|
+
cwd: string;
|
|
2200
|
+
pacsserver: string | null;
|
|
2201
|
+
physicalMode: boolean;
|
|
2202
|
+
lastExitCode: number;
|
|
2203
|
+
lastCommandDurationMs: number;
|
|
2204
|
+
procWarmup?: {
|
|
2205
|
+
loaded: number;
|
|
2206
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
2207
|
+
total?: number | undefined;
|
|
2208
|
+
restored?: boolean | undefined;
|
|
2209
|
+
sweeping?: boolean | undefined;
|
|
2210
|
+
feed?: {
|
|
2211
|
+
id: number;
|
|
2212
|
+
total: number;
|
|
2213
|
+
loaded: number;
|
|
2214
|
+
} | undefined;
|
|
2215
|
+
arrived?: number[] | undefined;
|
|
2216
|
+
} | undefined;
|
|
2217
|
+
procIndex?: {
|
|
2218
|
+
feeds: number;
|
|
2219
|
+
jobs: number;
|
|
2220
|
+
} | undefined;
|
|
2221
|
+
warmupFailures?: {
|
|
2222
|
+
label: string;
|
|
2223
|
+
message: string;
|
|
2224
|
+
}[] | undefined;
|
|
2225
|
+
};
|
|
2226
|
+
}, {
|
|
2227
|
+
type: "promptline";
|
|
2228
|
+
context: {
|
|
2229
|
+
user: string;
|
|
2230
|
+
uri: string;
|
|
2231
|
+
cwd: string;
|
|
2232
|
+
pacsserver: string | null;
|
|
2233
|
+
physicalMode: boolean;
|
|
2234
|
+
lastExitCode: number;
|
|
2235
|
+
lastCommandDurationMs: number;
|
|
2236
|
+
procWarmup?: {
|
|
2237
|
+
loaded: number;
|
|
2238
|
+
state?: "cold" | "cached" | "failed" | undefined;
|
|
2239
|
+
total?: number | undefined;
|
|
2240
|
+
restored?: boolean | undefined;
|
|
2241
|
+
sweeping?: boolean | undefined;
|
|
2242
|
+
feed?: {
|
|
2243
|
+
id: number;
|
|
2244
|
+
total: number;
|
|
2245
|
+
loaded: number;
|
|
2246
|
+
} | undefined;
|
|
2247
|
+
arrived?: number[] | undefined;
|
|
2248
|
+
} | undefined;
|
|
2249
|
+
procIndex?: {
|
|
2250
|
+
feeds: number;
|
|
2251
|
+
jobs: number;
|
|
2252
|
+
} | undefined;
|
|
2253
|
+
warmupFailures?: {
|
|
2254
|
+
label: string;
|
|
2255
|
+
message: string;
|
|
2256
|
+
}[] | undefined;
|
|
2257
|
+
};
|
|
2258
|
+
}>, z.ZodObject<{
|
|
2259
|
+
type: z.ZodLiteral<"telemetry">;
|
|
2260
|
+
index: z.ZodObject<{
|
|
2261
|
+
jobs: z.ZodNumber;
|
|
2262
|
+
feeds: z.ZodNumber;
|
|
2263
|
+
}, "strip", z.ZodTypeAny, {
|
|
2264
|
+
feeds: number;
|
|
2265
|
+
jobs: number;
|
|
2266
|
+
}, {
|
|
2267
|
+
feeds: number;
|
|
2268
|
+
jobs: number;
|
|
2269
|
+
}>;
|
|
2270
|
+
}, "strip", z.ZodTypeAny, {
|
|
2271
|
+
type: "telemetry";
|
|
2272
|
+
index: {
|
|
2273
|
+
feeds: number;
|
|
2274
|
+
jobs: number;
|
|
2275
|
+
};
|
|
2276
|
+
}, {
|
|
2277
|
+
type: "telemetry";
|
|
2278
|
+
index: {
|
|
2279
|
+
feeds: number;
|
|
2280
|
+
jobs: number;
|
|
2281
|
+
};
|
|
2282
|
+
}>, z.ZodObject<{
|
|
2283
|
+
type: z.ZodLiteral<"pipe">;
|
|
2284
|
+
pipeId: z.ZodString;
|
|
2285
|
+
command: z.ZodString;
|
|
2286
|
+
input: z.ZodString;
|
|
2287
|
+
}, "strip", z.ZodTypeAny, {
|
|
2288
|
+
type: "pipe";
|
|
2289
|
+
input: string;
|
|
2290
|
+
pipeId: string;
|
|
2291
|
+
command: string;
|
|
2292
|
+
}, {
|
|
2293
|
+
type: "pipe";
|
|
2294
|
+
input: string;
|
|
2295
|
+
pipeId: string;
|
|
2296
|
+
command: string;
|
|
2297
|
+
}>, z.ZodObject<{
|
|
2298
|
+
type: z.ZodLiteral<"shell">;
|
|
2299
|
+
shellId: z.ZodString;
|
|
2300
|
+
command: z.ZodString;
|
|
2301
|
+
}, "strip", z.ZodTypeAny, {
|
|
2302
|
+
type: "shell";
|
|
2303
|
+
shellId: string;
|
|
2304
|
+
command: string;
|
|
2305
|
+
}, {
|
|
2306
|
+
type: "shell";
|
|
2307
|
+
shellId: string;
|
|
2308
|
+
command: string;
|
|
2309
|
+
}>, z.ZodObject<{
|
|
2310
|
+
type: z.ZodLiteral<"edit">;
|
|
2311
|
+
editId: z.ZodString;
|
|
2312
|
+
content: z.ZodString;
|
|
2313
|
+
extension: z.ZodOptional<z.ZodString>;
|
|
2314
|
+
}, "strip", z.ZodTypeAny, {
|
|
2315
|
+
type: "edit";
|
|
2316
|
+
editId: string;
|
|
2317
|
+
content: string;
|
|
2318
|
+
extension?: string | undefined;
|
|
2319
|
+
}, {
|
|
2320
|
+
type: "edit";
|
|
2321
|
+
editId: string;
|
|
2322
|
+
content: string;
|
|
2323
|
+
extension?: string | undefined;
|
|
2324
|
+
}>, z.ZodObject<{
|
|
2325
|
+
type: z.ZodLiteral<"deliver">;
|
|
2326
|
+
deliverId: z.ZodString;
|
|
2327
|
+
path: z.ZodString;
|
|
2328
|
+
filename: z.ZodString;
|
|
2329
|
+
destination: z.ZodOptional<z.ZodString>;
|
|
2330
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
2331
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
2332
|
+
}, "strip", z.ZodTypeAny, {
|
|
2333
|
+
path: string;
|
|
2334
|
+
type: "deliver";
|
|
2335
|
+
deliverId: string;
|
|
2336
|
+
filename: string;
|
|
2337
|
+
destination?: string | undefined;
|
|
2338
|
+
size?: number | undefined;
|
|
2339
|
+
contentType?: string | undefined;
|
|
2340
|
+
}, {
|
|
2341
|
+
path: string;
|
|
2342
|
+
type: "deliver";
|
|
2343
|
+
deliverId: string;
|
|
2344
|
+
filename: string;
|
|
2345
|
+
destination?: string | undefined;
|
|
2346
|
+
size?: number | undefined;
|
|
2347
|
+
contentType?: string | undefined;
|
|
2348
|
+
}>, z.ZodObject<{
|
|
2349
|
+
type: z.ZodLiteral<"regard">;
|
|
2350
|
+
regard: z.ZodObject<{
|
|
2351
|
+
address: z.ZodString;
|
|
2352
|
+
modelKind: z.ZodOptional<z.ZodString>;
|
|
2353
|
+
groupId: z.ZodString;
|
|
2354
|
+
paneId: z.ZodString;
|
|
2355
|
+
}, "strip", z.ZodTypeAny, {
|
|
2356
|
+
address: string;
|
|
2357
|
+
groupId: string;
|
|
2358
|
+
paneId: string;
|
|
2359
|
+
modelKind?: string | undefined;
|
|
2360
|
+
}, {
|
|
2361
|
+
address: string;
|
|
2362
|
+
groupId: string;
|
|
2363
|
+
paneId: string;
|
|
2364
|
+
modelKind?: string | undefined;
|
|
2365
|
+
}>;
|
|
2366
|
+
}, "strip", z.ZodTypeAny, {
|
|
2367
|
+
type: "regard";
|
|
2368
|
+
regard: {
|
|
2369
|
+
address: string;
|
|
2370
|
+
groupId: string;
|
|
2371
|
+
paneId: string;
|
|
2372
|
+
modelKind?: string | undefined;
|
|
2373
|
+
};
|
|
2374
|
+
}, {
|
|
2375
|
+
type: "regard";
|
|
2376
|
+
regard: {
|
|
2377
|
+
address: string;
|
|
2378
|
+
groupId: string;
|
|
2379
|
+
paneId: string;
|
|
2380
|
+
modelKind?: string | undefined;
|
|
2381
|
+
};
|
|
2382
|
+
}>, z.ZodObject<{
|
|
2383
|
+
type: z.ZodLiteral<"watched">;
|
|
2384
|
+
subject: z.ZodString;
|
|
2385
|
+
state: z.ZodEnum<["live", "settled", "stale"]>;
|
|
2386
|
+
}, "strip", z.ZodTypeAny, {
|
|
2387
|
+
type: "watched";
|
|
2388
|
+
subject: string;
|
|
2389
|
+
state: "live" | "settled" | "stale";
|
|
2390
|
+
}, {
|
|
2391
|
+
type: "watched";
|
|
2392
|
+
subject: string;
|
|
2393
|
+
state: "live" | "settled" | "stale";
|
|
2394
|
+
}>]>;
|
|
2395
|
+
/** A message the daemon sends to a surface. */
|
|
2396
|
+
export type ServerMessage = z.infer<typeof serverMessageSchema>;
|
|
2397
|
+
/**
|
|
2398
|
+
* The message types this contract build knows. A surface receiving a typed
|
|
2399
|
+
* message outside this set is talking to a newer daemon: the open-world rule
|
|
2400
|
+
* is to skip it quietly, not to warn on every arrival.
|
|
2401
|
+
*/
|
|
2402
|
+
export declare const SERVER_MESSAGE_TYPES: ReadonlySet<string>;
|