@fnndsc/calypso 0.4.3 → 0.5.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 +4 -3
- package/dist/daemon/berth.js +10 -3
- package/dist/daemon/berth.js.map +1 -1
- package/dist/daemon/broker.d.ts +87 -0
- package/dist/daemon/broker.js +102 -0
- package/dist/daemon/broker.js.map +1 -0
- package/dist/daemon/discovery.js +5 -1
- package/dist/daemon/discovery.js.map +1 -1
- package/dist/daemon/engine.d.ts +6 -0
- package/dist/daemon/launch.d.ts +30 -0
- package/dist/daemon/launch.js +37 -12
- package/dist/daemon/launch.js.map +1 -1
- package/dist/daemon/server.d.ts +42 -33
- package/dist/daemon/server.js +106 -98
- package/dist/daemon/server.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/protocol/messages.d.ts +351 -25
- package/dist/protocol/messages.js +78 -8
- package/dist/protocol/messages.js.map +1 -1
- package/package.json +4 -4
|
@@ -14,22 +14,51 @@
|
|
|
14
14
|
import { z } from 'zod';
|
|
15
15
|
/** The sink channel an output event belongs to. */
|
|
16
16
|
export declare const channelSchema: z.ZodEnum<["data", "err", "status"]>;
|
|
17
|
-
/**
|
|
17
|
+
/** Capabilities an attaching surface can safely execute on its own machine. */
|
|
18
|
+
export declare const surfaceCapabilitiesMessageSchema: z.ZodObject<{
|
|
19
|
+
shellCommands: z.ZodBoolean;
|
|
20
|
+
hiddenInput: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
shellCommands: boolean;
|
|
23
|
+
hiddenInput?: boolean | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
shellCommands: boolean;
|
|
26
|
+
hiddenInput?: boolean | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
/** Attach to a session: declares the contract version, token, and surface capabilities. */
|
|
18
29
|
export declare const attachMessageSchema: z.ZodObject<{
|
|
19
30
|
type: z.ZodLiteral<"attach">;
|
|
20
31
|
protocolVersion: z.ZodNumber;
|
|
21
32
|
token: z.ZodString;
|
|
22
33
|
session: z.ZodOptional<z.ZodString>;
|
|
34
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
shellCommands: z.ZodBoolean;
|
|
36
|
+
hiddenInput: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
shellCommands: boolean;
|
|
39
|
+
hiddenInput?: boolean | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
shellCommands: boolean;
|
|
42
|
+
hiddenInput?: boolean | undefined;
|
|
43
|
+
}>>;
|
|
23
44
|
}, "strip", z.ZodTypeAny, {
|
|
24
45
|
type: "attach";
|
|
25
46
|
protocolVersion: number;
|
|
26
47
|
token: string;
|
|
27
48
|
session?: string | undefined;
|
|
49
|
+
capabilities?: {
|
|
50
|
+
shellCommands: boolean;
|
|
51
|
+
hiddenInput?: boolean | undefined;
|
|
52
|
+
} | undefined;
|
|
28
53
|
}, {
|
|
29
54
|
type: "attach";
|
|
30
55
|
protocolVersion: number;
|
|
31
56
|
token: string;
|
|
32
57
|
session?: string | undefined;
|
|
58
|
+
capabilities?: {
|
|
59
|
+
shellCommands: boolean;
|
|
60
|
+
hiddenInput?: boolean | undefined;
|
|
61
|
+
} | undefined;
|
|
33
62
|
}>;
|
|
34
63
|
/** Execute one input line, correlated by `id`. */
|
|
35
64
|
export declare const executeMessageSchema: z.ZodObject<{
|
|
@@ -45,6 +74,17 @@ export declare const executeMessageSchema: z.ZodObject<{
|
|
|
45
74
|
id: string;
|
|
46
75
|
line: string;
|
|
47
76
|
}>;
|
|
77
|
+
/** Requests cancellation of the caller's currently executing command. */
|
|
78
|
+
export declare const cancelMessageSchema: z.ZodObject<{
|
|
79
|
+
type: z.ZodLiteral<"cancel">;
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
type: "cancel";
|
|
83
|
+
id: string;
|
|
84
|
+
}, {
|
|
85
|
+
type: "cancel";
|
|
86
|
+
id: string;
|
|
87
|
+
}>;
|
|
48
88
|
/** Request completion candidates for a partial line, correlated by `id`. */
|
|
49
89
|
export declare const completeRequestSchema: z.ZodObject<{
|
|
50
90
|
type: z.ZodLiteral<"complete">;
|
|
@@ -73,6 +113,20 @@ export declare const promptAnswerMessageSchema: z.ZodObject<{
|
|
|
73
113
|
promptId: string;
|
|
74
114
|
answer: string;
|
|
75
115
|
}>;
|
|
116
|
+
/** Reports a prompt failure to the daemon (surface cannot or did not answer), correlated by `promptId`. */
|
|
117
|
+
export declare const promptErrorMessageSchema: z.ZodObject<{
|
|
118
|
+
type: z.ZodLiteral<"promptError">;
|
|
119
|
+
promptId: z.ZodString;
|
|
120
|
+
reason: z.ZodString;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
type: "promptError";
|
|
123
|
+
promptId: string;
|
|
124
|
+
reason: string;
|
|
125
|
+
}, {
|
|
126
|
+
type: "promptError";
|
|
127
|
+
promptId: string;
|
|
128
|
+
reason: string;
|
|
129
|
+
}>;
|
|
76
130
|
/** Returns the output of a pipeline segment the daemon asked the surface to run, correlated by `pipeId`. */
|
|
77
131
|
export declare const pipeResultMessageSchema: z.ZodObject<{
|
|
78
132
|
type: z.ZodLiteral<"pipeResult">;
|
|
@@ -94,12 +148,40 @@ export declare const pipeErrorMessageSchema: z.ZodObject<{
|
|
|
94
148
|
reason: z.ZodString;
|
|
95
149
|
}, "strip", z.ZodTypeAny, {
|
|
96
150
|
type: "pipeError";
|
|
97
|
-
pipeId: string;
|
|
98
151
|
reason: string;
|
|
152
|
+
pipeId: string;
|
|
99
153
|
}, {
|
|
100
154
|
type: "pipeError";
|
|
155
|
+
reason: string;
|
|
101
156
|
pipeId: string;
|
|
157
|
+
}>;
|
|
158
|
+
/** Returns the exit code of a shell command the daemon asked the surface to run. */
|
|
159
|
+
export declare const shellResultMessageSchema: z.ZodObject<{
|
|
160
|
+
type: z.ZodLiteral<"shellResult">;
|
|
161
|
+
shellId: z.ZodString;
|
|
162
|
+
exitCode: z.ZodNumber;
|
|
163
|
+
}, "strip", z.ZodTypeAny, {
|
|
164
|
+
type: "shellResult";
|
|
165
|
+
shellId: string;
|
|
166
|
+
exitCode: number;
|
|
167
|
+
}, {
|
|
168
|
+
type: "shellResult";
|
|
169
|
+
shellId: string;
|
|
170
|
+
exitCode: number;
|
|
171
|
+
}>;
|
|
172
|
+
/** Returns a surface shell-launch failure to the daemon, correlated by `shellId`. */
|
|
173
|
+
export declare const shellErrorMessageSchema: z.ZodObject<{
|
|
174
|
+
type: z.ZodLiteral<"shellError">;
|
|
175
|
+
shellId: z.ZodString;
|
|
176
|
+
reason: z.ZodString;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
type: "shellError";
|
|
179
|
+
reason: string;
|
|
180
|
+
shellId: string;
|
|
181
|
+
}, {
|
|
182
|
+
type: "shellError";
|
|
102
183
|
reason: string;
|
|
184
|
+
shellId: string;
|
|
103
185
|
}>;
|
|
104
186
|
/** Returns the edited content from a local-edit the daemon requested, correlated by `editId`. */
|
|
105
187
|
export declare const editResultMessageSchema: z.ZodObject<{
|
|
@@ -118,22 +200,54 @@ export declare const editResultMessageSchema: z.ZodObject<{
|
|
|
118
200
|
content: string;
|
|
119
201
|
changed: boolean;
|
|
120
202
|
}>;
|
|
203
|
+
/** Reports a local-edit failure to the daemon, correlated by `editId`. */
|
|
204
|
+
export declare const editErrorMessageSchema: z.ZodObject<{
|
|
205
|
+
type: z.ZodLiteral<"editError">;
|
|
206
|
+
editId: z.ZodString;
|
|
207
|
+
reason: z.ZodString;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
type: "editError";
|
|
210
|
+
reason: string;
|
|
211
|
+
editId: string;
|
|
212
|
+
}, {
|
|
213
|
+
type: "editError";
|
|
214
|
+
reason: string;
|
|
215
|
+
editId: string;
|
|
216
|
+
}>;
|
|
121
217
|
/** Any message a surface may send to the daemon. */
|
|
122
218
|
export declare const clientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
123
219
|
type: z.ZodLiteral<"attach">;
|
|
124
220
|
protocolVersion: z.ZodNumber;
|
|
125
221
|
token: z.ZodString;
|
|
126
222
|
session: z.ZodOptional<z.ZodString>;
|
|
223
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
224
|
+
shellCommands: z.ZodBoolean;
|
|
225
|
+
hiddenInput: z.ZodOptional<z.ZodBoolean>;
|
|
226
|
+
}, "strip", z.ZodTypeAny, {
|
|
227
|
+
shellCommands: boolean;
|
|
228
|
+
hiddenInput?: boolean | undefined;
|
|
229
|
+
}, {
|
|
230
|
+
shellCommands: boolean;
|
|
231
|
+
hiddenInput?: boolean | undefined;
|
|
232
|
+
}>>;
|
|
127
233
|
}, "strip", z.ZodTypeAny, {
|
|
128
234
|
type: "attach";
|
|
129
235
|
protocolVersion: number;
|
|
130
236
|
token: string;
|
|
131
237
|
session?: string | undefined;
|
|
238
|
+
capabilities?: {
|
|
239
|
+
shellCommands: boolean;
|
|
240
|
+
hiddenInput?: boolean | undefined;
|
|
241
|
+
} | undefined;
|
|
132
242
|
}, {
|
|
133
243
|
type: "attach";
|
|
134
244
|
protocolVersion: number;
|
|
135
245
|
token: string;
|
|
136
246
|
session?: string | undefined;
|
|
247
|
+
capabilities?: {
|
|
248
|
+
shellCommands: boolean;
|
|
249
|
+
hiddenInput?: boolean | undefined;
|
|
250
|
+
} | undefined;
|
|
137
251
|
}>, z.ZodObject<{
|
|
138
252
|
type: z.ZodLiteral<"execute">;
|
|
139
253
|
id: z.ZodString;
|
|
@@ -146,6 +260,15 @@ export declare const clientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
146
260
|
type: "execute";
|
|
147
261
|
id: string;
|
|
148
262
|
line: string;
|
|
263
|
+
}>, z.ZodObject<{
|
|
264
|
+
type: z.ZodLiteral<"cancel">;
|
|
265
|
+
id: z.ZodString;
|
|
266
|
+
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
type: "cancel";
|
|
268
|
+
id: string;
|
|
269
|
+
}, {
|
|
270
|
+
type: "cancel";
|
|
271
|
+
id: string;
|
|
149
272
|
}>, z.ZodObject<{
|
|
150
273
|
type: z.ZodLiteral<"complete">;
|
|
151
274
|
id: z.ZodString;
|
|
@@ -170,6 +293,18 @@ export declare const clientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
170
293
|
type: "promptAnswer";
|
|
171
294
|
promptId: string;
|
|
172
295
|
answer: string;
|
|
296
|
+
}>, z.ZodObject<{
|
|
297
|
+
type: z.ZodLiteral<"promptError">;
|
|
298
|
+
promptId: z.ZodString;
|
|
299
|
+
reason: z.ZodString;
|
|
300
|
+
}, "strip", z.ZodTypeAny, {
|
|
301
|
+
type: "promptError";
|
|
302
|
+
promptId: string;
|
|
303
|
+
reason: string;
|
|
304
|
+
}, {
|
|
305
|
+
type: "promptError";
|
|
306
|
+
promptId: string;
|
|
307
|
+
reason: string;
|
|
173
308
|
}>, z.ZodObject<{
|
|
174
309
|
type: z.ZodLiteral<"pipeResult">;
|
|
175
310
|
pipeId: z.ZodString;
|
|
@@ -188,12 +323,36 @@ export declare const clientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
188
323
|
reason: z.ZodString;
|
|
189
324
|
}, "strip", z.ZodTypeAny, {
|
|
190
325
|
type: "pipeError";
|
|
191
|
-
pipeId: string;
|
|
192
326
|
reason: string;
|
|
327
|
+
pipeId: string;
|
|
193
328
|
}, {
|
|
194
329
|
type: "pipeError";
|
|
330
|
+
reason: string;
|
|
195
331
|
pipeId: string;
|
|
332
|
+
}>, z.ZodObject<{
|
|
333
|
+
type: z.ZodLiteral<"shellResult">;
|
|
334
|
+
shellId: z.ZodString;
|
|
335
|
+
exitCode: z.ZodNumber;
|
|
336
|
+
}, "strip", z.ZodTypeAny, {
|
|
337
|
+
type: "shellResult";
|
|
338
|
+
shellId: string;
|
|
339
|
+
exitCode: number;
|
|
340
|
+
}, {
|
|
341
|
+
type: "shellResult";
|
|
342
|
+
shellId: string;
|
|
343
|
+
exitCode: number;
|
|
344
|
+
}>, z.ZodObject<{
|
|
345
|
+
type: z.ZodLiteral<"shellError">;
|
|
346
|
+
shellId: z.ZodString;
|
|
347
|
+
reason: z.ZodString;
|
|
348
|
+
}, "strip", z.ZodTypeAny, {
|
|
349
|
+
type: "shellError";
|
|
196
350
|
reason: string;
|
|
351
|
+
shellId: string;
|
|
352
|
+
}, {
|
|
353
|
+
type: "shellError";
|
|
354
|
+
reason: string;
|
|
355
|
+
shellId: string;
|
|
197
356
|
}>, z.ZodObject<{
|
|
198
357
|
type: z.ZodLiteral<"editResult">;
|
|
199
358
|
editId: z.ZodString;
|
|
@@ -209,22 +368,82 @@ export declare const clientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
209
368
|
editId: string;
|
|
210
369
|
content: string;
|
|
211
370
|
changed: boolean;
|
|
371
|
+
}>, z.ZodObject<{
|
|
372
|
+
type: z.ZodLiteral<"editError">;
|
|
373
|
+
editId: z.ZodString;
|
|
374
|
+
reason: z.ZodString;
|
|
375
|
+
}, "strip", z.ZodTypeAny, {
|
|
376
|
+
type: "editError";
|
|
377
|
+
reason: string;
|
|
378
|
+
editId: string;
|
|
379
|
+
}, {
|
|
380
|
+
type: "editError";
|
|
381
|
+
reason: string;
|
|
382
|
+
editId: string;
|
|
212
383
|
}>]>;
|
|
213
384
|
/** A message a surface sends to the daemon. */
|
|
214
385
|
export type ClientMessage = z.infer<typeof clientMessageSchema>;
|
|
215
|
-
/**
|
|
386
|
+
/**
|
|
387
|
+
* Acknowledges a successful attach. The optional `stack` block reports the
|
|
388
|
+
* daemon's own installed versions and build hash, so a remote surface can
|
|
389
|
+
* greet with the truth of the process it attached to rather than whatever is
|
|
390
|
+
* installed client-side; older daemons simply omit it.
|
|
391
|
+
*/
|
|
216
392
|
export declare const attachedMessageSchema: z.ZodObject<{
|
|
217
393
|
type: z.ZodLiteral<"attached">;
|
|
218
394
|
session: z.ZodString;
|
|
219
395
|
protocolVersion: z.ZodNumber;
|
|
396
|
+
stack: z.ZodOptional<z.ZodObject<{
|
|
397
|
+
chell: z.ZodString;
|
|
398
|
+
calypso: z.ZodString;
|
|
399
|
+
build: z.ZodString;
|
|
400
|
+
brasa: z.ZodOptional<z.ZodString>;
|
|
401
|
+
chili: z.ZodOptional<z.ZodString>;
|
|
402
|
+
salsa: z.ZodOptional<z.ZodString>;
|
|
403
|
+
cumin: z.ZodOptional<z.ZodString>;
|
|
404
|
+
}, "strip", z.ZodTypeAny, {
|
|
405
|
+
chell: string;
|
|
406
|
+
calypso: string;
|
|
407
|
+
build: string;
|
|
408
|
+
brasa?: string | undefined;
|
|
409
|
+
chili?: string | undefined;
|
|
410
|
+
salsa?: string | undefined;
|
|
411
|
+
cumin?: string | undefined;
|
|
412
|
+
}, {
|
|
413
|
+
chell: string;
|
|
414
|
+
calypso: string;
|
|
415
|
+
build: string;
|
|
416
|
+
brasa?: string | undefined;
|
|
417
|
+
chili?: string | undefined;
|
|
418
|
+
salsa?: string | undefined;
|
|
419
|
+
cumin?: string | undefined;
|
|
420
|
+
}>>;
|
|
220
421
|
}, "strip", z.ZodTypeAny, {
|
|
221
422
|
type: "attached";
|
|
222
423
|
protocolVersion: number;
|
|
223
424
|
session: string;
|
|
425
|
+
stack?: {
|
|
426
|
+
chell: string;
|
|
427
|
+
calypso: string;
|
|
428
|
+
build: string;
|
|
429
|
+
brasa?: string | undefined;
|
|
430
|
+
chili?: string | undefined;
|
|
431
|
+
salsa?: string | undefined;
|
|
432
|
+
cumin?: string | undefined;
|
|
433
|
+
} | undefined;
|
|
224
434
|
}, {
|
|
225
435
|
type: "attached";
|
|
226
436
|
protocolVersion: number;
|
|
227
437
|
session: string;
|
|
438
|
+
stack?: {
|
|
439
|
+
chell: string;
|
|
440
|
+
calypso: string;
|
|
441
|
+
build: string;
|
|
442
|
+
brasa?: string | undefined;
|
|
443
|
+
chili?: string | undefined;
|
|
444
|
+
salsa?: string | undefined;
|
|
445
|
+
cumin?: string | undefined;
|
|
446
|
+
} | undefined;
|
|
228
447
|
}>;
|
|
229
448
|
/** The final result of one executed line: one envelope per command. */
|
|
230
449
|
export declare const resultMessageSchema: z.ZodObject<{
|
|
@@ -387,11 +606,11 @@ export declare const outputMessageSchema: z.ZodObject<{
|
|
|
387
606
|
chunk: string;
|
|
388
607
|
}>;
|
|
389
608
|
/** The operation producing structured progress. */
|
|
390
|
-
export declare const progressOperationSchema: z.ZodEnum<["upload", "download", "pull", "workflow"]>;
|
|
609
|
+
export declare const progressOperationSchema: z.ZodEnum<["upload", "download", "pull", "workflow", "pipeline", "group"]>;
|
|
391
610
|
/** Broad class of progress producer. */
|
|
392
|
-
export declare const progressKindSchema: z.ZodEnum<["transfer", "retrieve", "workflow"]>;
|
|
611
|
+
export declare const progressKindSchema: z.ZodEnum<["transfer", "retrieve", "workflow", "inspection"]>;
|
|
393
612
|
/** Lifecycle phase of a progress operation. */
|
|
394
|
-
export declare const progressPhaseSchema: z.ZodEnum<["scanning", "transferring", "watching", "retrying", "complete", "failed"]>;
|
|
613
|
+
export declare const progressPhaseSchema: z.ZodEnum<["scanning", "transferring", "watching", "retrying", "reading", "complete", "failed"]>;
|
|
395
614
|
/** Unit used by the primary progress counter. */
|
|
396
615
|
export declare const progressUnitSchema: z.ZodEnum<["files", "bytes", "series", "jobs", "nodes"]>;
|
|
397
616
|
/** State of the operation or item being reported. */
|
|
@@ -400,9 +619,9 @@ export declare const progressStatusSchema: z.ZodEnum<["running", "done", "unconf
|
|
|
400
619
|
export declare const progressMessageSchema: z.ZodObject<{
|
|
401
620
|
type: z.ZodLiteral<"progress">;
|
|
402
621
|
id: z.ZodString;
|
|
403
|
-
operation: z.ZodEnum<["upload", "download", "pull", "workflow"]>;
|
|
404
|
-
kind: z.ZodOptional<z.ZodEnum<["transfer", "retrieve", "workflow"]>>;
|
|
405
|
-
phase: z.ZodEnum<["scanning", "transferring", "watching", "retrying", "complete", "failed"]>;
|
|
622
|
+
operation: z.ZodEnum<["upload", "download", "pull", "workflow", "pipeline", "group"]>;
|
|
623
|
+
kind: z.ZodOptional<z.ZodEnum<["transfer", "retrieve", "workflow", "inspection"]>>;
|
|
624
|
+
phase: z.ZodEnum<["scanning", "transferring", "watching", "retrying", "reading", "complete", "failed"]>;
|
|
406
625
|
label: z.ZodOptional<z.ZodString>;
|
|
407
626
|
itemId: z.ZodOptional<z.ZodString>;
|
|
408
627
|
current: z.ZodOptional<z.ZodNumber>;
|
|
@@ -413,10 +632,10 @@ export declare const progressMessageSchema: z.ZodObject<{
|
|
|
413
632
|
}, "strip", z.ZodTypeAny, {
|
|
414
633
|
type: "progress";
|
|
415
634
|
id: string;
|
|
416
|
-
operation: "upload" | "download" | "pull" | "workflow";
|
|
417
|
-
phase: "complete" | "scanning" | "transferring" | "watching" | "retrying" | "failed";
|
|
635
|
+
operation: "upload" | "download" | "pull" | "workflow" | "pipeline" | "group";
|
|
636
|
+
phase: "complete" | "scanning" | "transferring" | "watching" | "retrying" | "reading" | "failed";
|
|
418
637
|
status?: "error" | "unknown" | "running" | "done" | "unconfirmed" | "stalled" | "timeout" | undefined;
|
|
419
|
-
kind?: "workflow" | "transfer" | "retrieve" | undefined;
|
|
638
|
+
kind?: "workflow" | "transfer" | "retrieve" | "inspection" | undefined;
|
|
420
639
|
label?: string | undefined;
|
|
421
640
|
itemId?: string | undefined;
|
|
422
641
|
current?: number | undefined;
|
|
@@ -426,10 +645,10 @@ export declare const progressMessageSchema: z.ZodObject<{
|
|
|
426
645
|
}, {
|
|
427
646
|
type: "progress";
|
|
428
647
|
id: string;
|
|
429
|
-
operation: "upload" | "download" | "pull" | "workflow";
|
|
430
|
-
phase: "complete" | "scanning" | "transferring" | "watching" | "retrying" | "failed";
|
|
648
|
+
operation: "upload" | "download" | "pull" | "workflow" | "pipeline" | "group";
|
|
649
|
+
phase: "complete" | "scanning" | "transferring" | "watching" | "retrying" | "reading" | "failed";
|
|
431
650
|
status?: "error" | "unknown" | "running" | "done" | "unconfirmed" | "stalled" | "timeout" | undefined;
|
|
432
|
-
kind?: "workflow" | "transfer" | "retrieve" | undefined;
|
|
651
|
+
kind?: "workflow" | "transfer" | "retrieve" | "inspection" | undefined;
|
|
433
652
|
label?: string | undefined;
|
|
434
653
|
itemId?: string | undefined;
|
|
435
654
|
current?: number | undefined;
|
|
@@ -619,12 +838,18 @@ export declare const promptContextSchema: z.ZodObject<{
|
|
|
619
838
|
procWarmup: z.ZodOptional<z.ZodObject<{
|
|
620
839
|
loaded: z.ZodNumber;
|
|
621
840
|
total: z.ZodOptional<z.ZodNumber>;
|
|
841
|
+
restored: z.ZodOptional<z.ZodBoolean>;
|
|
842
|
+
state: z.ZodOptional<z.ZodEnum<["cold", "cached", "failed"]>>;
|
|
622
843
|
}, "strip", z.ZodTypeAny, {
|
|
623
844
|
loaded: number;
|
|
624
845
|
total?: number | undefined;
|
|
846
|
+
restored?: boolean | undefined;
|
|
847
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
625
848
|
}, {
|
|
626
849
|
loaded: number;
|
|
627
850
|
total?: number | undefined;
|
|
851
|
+
restored?: boolean | undefined;
|
|
852
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
628
853
|
}>>;
|
|
629
854
|
}, "strip", z.ZodTypeAny, {
|
|
630
855
|
user: string;
|
|
@@ -637,6 +862,8 @@ export declare const promptContextSchema: z.ZodObject<{
|
|
|
637
862
|
procWarmup?: {
|
|
638
863
|
loaded: number;
|
|
639
864
|
total?: number | undefined;
|
|
865
|
+
restored?: boolean | undefined;
|
|
866
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
640
867
|
} | undefined;
|
|
641
868
|
}, {
|
|
642
869
|
user: string;
|
|
@@ -649,6 +876,8 @@ export declare const promptContextSchema: z.ZodObject<{
|
|
|
649
876
|
procWarmup?: {
|
|
650
877
|
loaded: number;
|
|
651
878
|
total?: number | undefined;
|
|
879
|
+
restored?: boolean | undefined;
|
|
880
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
652
881
|
} | undefined;
|
|
653
882
|
}>;
|
|
654
883
|
export type PromptContext = z.infer<typeof promptContextSchema>;
|
|
@@ -671,12 +900,18 @@ export declare const promptLineMessageSchema: z.ZodObject<{
|
|
|
671
900
|
procWarmup: z.ZodOptional<z.ZodObject<{
|
|
672
901
|
loaded: z.ZodNumber;
|
|
673
902
|
total: z.ZodOptional<z.ZodNumber>;
|
|
903
|
+
restored: z.ZodOptional<z.ZodBoolean>;
|
|
904
|
+
state: z.ZodOptional<z.ZodEnum<["cold", "cached", "failed"]>>;
|
|
674
905
|
}, "strip", z.ZodTypeAny, {
|
|
675
906
|
loaded: number;
|
|
676
907
|
total?: number | undefined;
|
|
908
|
+
restored?: boolean | undefined;
|
|
909
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
677
910
|
}, {
|
|
678
911
|
loaded: number;
|
|
679
912
|
total?: number | undefined;
|
|
913
|
+
restored?: boolean | undefined;
|
|
914
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
680
915
|
}>>;
|
|
681
916
|
}, "strip", z.ZodTypeAny, {
|
|
682
917
|
user: string;
|
|
@@ -689,6 +924,8 @@ export declare const promptLineMessageSchema: z.ZodObject<{
|
|
|
689
924
|
procWarmup?: {
|
|
690
925
|
loaded: number;
|
|
691
926
|
total?: number | undefined;
|
|
927
|
+
restored?: boolean | undefined;
|
|
928
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
692
929
|
} | undefined;
|
|
693
930
|
}, {
|
|
694
931
|
user: string;
|
|
@@ -701,6 +938,8 @@ export declare const promptLineMessageSchema: z.ZodObject<{
|
|
|
701
938
|
procWarmup?: {
|
|
702
939
|
loaded: number;
|
|
703
940
|
total?: number | undefined;
|
|
941
|
+
restored?: boolean | undefined;
|
|
942
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
704
943
|
} | undefined;
|
|
705
944
|
}>;
|
|
706
945
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -716,6 +955,8 @@ export declare const promptLineMessageSchema: z.ZodObject<{
|
|
|
716
955
|
procWarmup?: {
|
|
717
956
|
loaded: number;
|
|
718
957
|
total?: number | undefined;
|
|
958
|
+
restored?: boolean | undefined;
|
|
959
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
719
960
|
} | undefined;
|
|
720
961
|
};
|
|
721
962
|
}, {
|
|
@@ -731,6 +972,8 @@ export declare const promptLineMessageSchema: z.ZodObject<{
|
|
|
731
972
|
procWarmup?: {
|
|
732
973
|
loaded: number;
|
|
733
974
|
total?: number | undefined;
|
|
975
|
+
restored?: boolean | undefined;
|
|
976
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
734
977
|
} | undefined;
|
|
735
978
|
};
|
|
736
979
|
}>;
|
|
@@ -755,6 +998,20 @@ export declare const pipeMessageSchema: z.ZodObject<{
|
|
|
755
998
|
pipeId: string;
|
|
756
999
|
command: string;
|
|
757
1000
|
}>;
|
|
1001
|
+
/** Asks the surface to run a shell command on its own machine, never on the daemon host. */
|
|
1002
|
+
export declare const shellMessageSchema: z.ZodObject<{
|
|
1003
|
+
type: z.ZodLiteral<"shell">;
|
|
1004
|
+
shellId: z.ZodString;
|
|
1005
|
+
command: z.ZodString;
|
|
1006
|
+
}, "strip", z.ZodTypeAny, {
|
|
1007
|
+
type: "shell";
|
|
1008
|
+
shellId: string;
|
|
1009
|
+
command: string;
|
|
1010
|
+
}, {
|
|
1011
|
+
type: "shell";
|
|
1012
|
+
shellId: string;
|
|
1013
|
+
command: string;
|
|
1014
|
+
}>;
|
|
758
1015
|
/**
|
|
759
1016
|
* Asks the surface to open content in its local editor (never on the daemon
|
|
760
1017
|
* host) and return the edited result.
|
|
@@ -780,14 +1037,57 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
780
1037
|
type: z.ZodLiteral<"attached">;
|
|
781
1038
|
session: z.ZodString;
|
|
782
1039
|
protocolVersion: z.ZodNumber;
|
|
1040
|
+
stack: z.ZodOptional<z.ZodObject<{
|
|
1041
|
+
chell: z.ZodString;
|
|
1042
|
+
calypso: z.ZodString;
|
|
1043
|
+
build: z.ZodString;
|
|
1044
|
+
brasa: z.ZodOptional<z.ZodString>;
|
|
1045
|
+
chili: z.ZodOptional<z.ZodString>;
|
|
1046
|
+
salsa: z.ZodOptional<z.ZodString>;
|
|
1047
|
+
cumin: z.ZodOptional<z.ZodString>;
|
|
1048
|
+
}, "strip", z.ZodTypeAny, {
|
|
1049
|
+
chell: string;
|
|
1050
|
+
calypso: string;
|
|
1051
|
+
build: string;
|
|
1052
|
+
brasa?: string | undefined;
|
|
1053
|
+
chili?: string | undefined;
|
|
1054
|
+
salsa?: string | undefined;
|
|
1055
|
+
cumin?: string | undefined;
|
|
1056
|
+
}, {
|
|
1057
|
+
chell: string;
|
|
1058
|
+
calypso: string;
|
|
1059
|
+
build: string;
|
|
1060
|
+
brasa?: string | undefined;
|
|
1061
|
+
chili?: string | undefined;
|
|
1062
|
+
salsa?: string | undefined;
|
|
1063
|
+
cumin?: string | undefined;
|
|
1064
|
+
}>>;
|
|
783
1065
|
}, "strip", z.ZodTypeAny, {
|
|
784
1066
|
type: "attached";
|
|
785
1067
|
protocolVersion: number;
|
|
786
1068
|
session: string;
|
|
1069
|
+
stack?: {
|
|
1070
|
+
chell: string;
|
|
1071
|
+
calypso: string;
|
|
1072
|
+
build: string;
|
|
1073
|
+
brasa?: string | undefined;
|
|
1074
|
+
chili?: string | undefined;
|
|
1075
|
+
salsa?: string | undefined;
|
|
1076
|
+
cumin?: string | undefined;
|
|
1077
|
+
} | undefined;
|
|
787
1078
|
}, {
|
|
788
1079
|
type: "attached";
|
|
789
1080
|
protocolVersion: number;
|
|
790
1081
|
session: string;
|
|
1082
|
+
stack?: {
|
|
1083
|
+
chell: string;
|
|
1084
|
+
calypso: string;
|
|
1085
|
+
build: string;
|
|
1086
|
+
brasa?: string | undefined;
|
|
1087
|
+
chili?: string | undefined;
|
|
1088
|
+
salsa?: string | undefined;
|
|
1089
|
+
cumin?: string | undefined;
|
|
1090
|
+
} | undefined;
|
|
791
1091
|
}>, z.ZodObject<{
|
|
792
1092
|
type: z.ZodLiteral<"result">;
|
|
793
1093
|
id: z.ZodString;
|
|
@@ -945,9 +1245,9 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
945
1245
|
}>, z.ZodObject<{
|
|
946
1246
|
type: z.ZodLiteral<"progress">;
|
|
947
1247
|
id: z.ZodString;
|
|
948
|
-
operation: z.ZodEnum<["upload", "download", "pull", "workflow"]>;
|
|
949
|
-
kind: z.ZodOptional<z.ZodEnum<["transfer", "retrieve", "workflow"]>>;
|
|
950
|
-
phase: z.ZodEnum<["scanning", "transferring", "watching", "retrying", "complete", "failed"]>;
|
|
1248
|
+
operation: z.ZodEnum<["upload", "download", "pull", "workflow", "pipeline", "group"]>;
|
|
1249
|
+
kind: z.ZodOptional<z.ZodEnum<["transfer", "retrieve", "workflow", "inspection"]>>;
|
|
1250
|
+
phase: z.ZodEnum<["scanning", "transferring", "watching", "retrying", "reading", "complete", "failed"]>;
|
|
951
1251
|
label: z.ZodOptional<z.ZodString>;
|
|
952
1252
|
itemId: z.ZodOptional<z.ZodString>;
|
|
953
1253
|
current: z.ZodOptional<z.ZodNumber>;
|
|
@@ -958,10 +1258,10 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
958
1258
|
}, "strip", z.ZodTypeAny, {
|
|
959
1259
|
type: "progress";
|
|
960
1260
|
id: string;
|
|
961
|
-
operation: "upload" | "download" | "pull" | "workflow";
|
|
962
|
-
phase: "complete" | "scanning" | "transferring" | "watching" | "retrying" | "failed";
|
|
1261
|
+
operation: "upload" | "download" | "pull" | "workflow" | "pipeline" | "group";
|
|
1262
|
+
phase: "complete" | "scanning" | "transferring" | "watching" | "retrying" | "reading" | "failed";
|
|
963
1263
|
status?: "error" | "unknown" | "running" | "done" | "unconfirmed" | "stalled" | "timeout" | undefined;
|
|
964
|
-
kind?: "workflow" | "transfer" | "retrieve" | undefined;
|
|
1264
|
+
kind?: "workflow" | "transfer" | "retrieve" | "inspection" | undefined;
|
|
965
1265
|
label?: string | undefined;
|
|
966
1266
|
itemId?: string | undefined;
|
|
967
1267
|
current?: number | undefined;
|
|
@@ -971,10 +1271,10 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
971
1271
|
}, {
|
|
972
1272
|
type: "progress";
|
|
973
1273
|
id: string;
|
|
974
|
-
operation: "upload" | "download" | "pull" | "workflow";
|
|
975
|
-
phase: "complete" | "scanning" | "transferring" | "watching" | "retrying" | "failed";
|
|
1274
|
+
operation: "upload" | "download" | "pull" | "workflow" | "pipeline" | "group";
|
|
1275
|
+
phase: "complete" | "scanning" | "transferring" | "watching" | "retrying" | "reading" | "failed";
|
|
976
1276
|
status?: "error" | "unknown" | "running" | "done" | "unconfirmed" | "stalled" | "timeout" | undefined;
|
|
977
|
-
kind?: "workflow" | "transfer" | "retrieve" | undefined;
|
|
1277
|
+
kind?: "workflow" | "transfer" | "retrieve" | "inspection" | undefined;
|
|
978
1278
|
label?: string | undefined;
|
|
979
1279
|
itemId?: string | undefined;
|
|
980
1280
|
current?: number | undefined;
|
|
@@ -1145,12 +1445,18 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
1145
1445
|
procWarmup: z.ZodOptional<z.ZodObject<{
|
|
1146
1446
|
loaded: z.ZodNumber;
|
|
1147
1447
|
total: z.ZodOptional<z.ZodNumber>;
|
|
1448
|
+
restored: z.ZodOptional<z.ZodBoolean>;
|
|
1449
|
+
state: z.ZodOptional<z.ZodEnum<["cold", "cached", "failed"]>>;
|
|
1148
1450
|
}, "strip", z.ZodTypeAny, {
|
|
1149
1451
|
loaded: number;
|
|
1150
1452
|
total?: number | undefined;
|
|
1453
|
+
restored?: boolean | undefined;
|
|
1454
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
1151
1455
|
}, {
|
|
1152
1456
|
loaded: number;
|
|
1153
1457
|
total?: number | undefined;
|
|
1458
|
+
restored?: boolean | undefined;
|
|
1459
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
1154
1460
|
}>>;
|
|
1155
1461
|
}, "strip", z.ZodTypeAny, {
|
|
1156
1462
|
user: string;
|
|
@@ -1163,6 +1469,8 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
1163
1469
|
procWarmup?: {
|
|
1164
1470
|
loaded: number;
|
|
1165
1471
|
total?: number | undefined;
|
|
1472
|
+
restored?: boolean | undefined;
|
|
1473
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
1166
1474
|
} | undefined;
|
|
1167
1475
|
}, {
|
|
1168
1476
|
user: string;
|
|
@@ -1175,6 +1483,8 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
1175
1483
|
procWarmup?: {
|
|
1176
1484
|
loaded: number;
|
|
1177
1485
|
total?: number | undefined;
|
|
1486
|
+
restored?: boolean | undefined;
|
|
1487
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
1178
1488
|
} | undefined;
|
|
1179
1489
|
}>;
|
|
1180
1490
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1190,6 +1500,8 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
1190
1500
|
procWarmup?: {
|
|
1191
1501
|
loaded: number;
|
|
1192
1502
|
total?: number | undefined;
|
|
1503
|
+
restored?: boolean | undefined;
|
|
1504
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
1193
1505
|
} | undefined;
|
|
1194
1506
|
};
|
|
1195
1507
|
}, {
|
|
@@ -1205,6 +1517,8 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
1205
1517
|
procWarmup?: {
|
|
1206
1518
|
loaded: number;
|
|
1207
1519
|
total?: number | undefined;
|
|
1520
|
+
restored?: boolean | undefined;
|
|
1521
|
+
state?: "failed" | "cold" | "cached" | undefined;
|
|
1208
1522
|
} | undefined;
|
|
1209
1523
|
};
|
|
1210
1524
|
}>, z.ZodObject<{
|
|
@@ -1222,6 +1536,18 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
1222
1536
|
input: string;
|
|
1223
1537
|
pipeId: string;
|
|
1224
1538
|
command: string;
|
|
1539
|
+
}>, z.ZodObject<{
|
|
1540
|
+
type: z.ZodLiteral<"shell">;
|
|
1541
|
+
shellId: z.ZodString;
|
|
1542
|
+
command: z.ZodString;
|
|
1543
|
+
}, "strip", z.ZodTypeAny, {
|
|
1544
|
+
type: "shell";
|
|
1545
|
+
shellId: string;
|
|
1546
|
+
command: string;
|
|
1547
|
+
}, {
|
|
1548
|
+
type: "shell";
|
|
1549
|
+
shellId: string;
|
|
1550
|
+
command: string;
|
|
1225
1551
|
}>, z.ZodObject<{
|
|
1226
1552
|
type: z.ZodLiteral<"edit">;
|
|
1227
1553
|
editId: z.ZodString;
|