@myagentroam/protocol 0.9.67 → 0.9.69

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.
@@ -0,0 +1,1826 @@
1
+ import { z } from 'zod';
2
+ export declare const workspaceDirectTransferCapabilitySchema: z.ZodObject<{
3
+ apiVersion: z.ZodLiteral<1>;
4
+ probe: z.ZodBoolean;
5
+ upload: z.ZodBoolean;
6
+ download: z.ZodBoolean;
7
+ gitCommitBlob: z.ZodBoolean;
8
+ maxChunkBytes: z.ZodNumber;
9
+ }, "strict", z.ZodTypeAny, {
10
+ apiVersion: 1;
11
+ probe: boolean;
12
+ upload: boolean;
13
+ download: boolean;
14
+ gitCommitBlob: boolean;
15
+ maxChunkBytes: number;
16
+ }, {
17
+ apiVersion: 1;
18
+ probe: boolean;
19
+ upload: boolean;
20
+ download: boolean;
21
+ gitCommitBlob: boolean;
22
+ maxChunkBytes: number;
23
+ }>;
24
+ export type WorkspaceDirectTransferCapability = z.infer<typeof workspaceDirectTransferCapabilitySchema>;
25
+ export declare const directTransferPurposeSchema: z.ZodEnum<["PROBE", "TRANSFER"]>;
26
+ export declare const directTransferDirectionSchema: z.ZodEnum<["UPLOAD", "DOWNLOAD"]>;
27
+ export declare const directTransferProbeResultSchema: z.ZodEnum<["DIRECT_AVAILABLE", "RELAY_ONLY", "STALE"]>;
28
+ export type DirectTransferProbeResult = z.infer<typeof directTransferProbeResultSchema>;
29
+ export declare const directTransferResourceSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
30
+ kind: z.ZodLiteral<"WORKSPACE_FILE">;
31
+ workspaceId: z.ZodString;
32
+ path: z.ZodString;
33
+ worktreePath: z.ZodOptional<z.ZodString>;
34
+ }, "strict", z.ZodTypeAny, {
35
+ path: string;
36
+ kind: "WORKSPACE_FILE";
37
+ workspaceId: string;
38
+ worktreePath?: string | undefined;
39
+ }, {
40
+ path: string;
41
+ kind: "WORKSPACE_FILE";
42
+ workspaceId: string;
43
+ worktreePath?: string | undefined;
44
+ }>, z.ZodObject<{
45
+ kind: z.ZodLiteral<"GIT_COMMIT_BLOB">;
46
+ workspaceId: z.ZodString;
47
+ commit: z.ZodString;
48
+ path: z.ZodString;
49
+ repositoryPath: z.ZodOptional<z.ZodString>;
50
+ worktreePath: z.ZodOptional<z.ZodString>;
51
+ }, "strict", z.ZodTypeAny, {
52
+ path: string;
53
+ kind: "GIT_COMMIT_BLOB";
54
+ workspaceId: string;
55
+ commit: string;
56
+ worktreePath?: string | undefined;
57
+ repositoryPath?: string | undefined;
58
+ }, {
59
+ path: string;
60
+ kind: "GIT_COMMIT_BLOB";
61
+ workspaceId: string;
62
+ commit: string;
63
+ worktreePath?: string | undefined;
64
+ repositoryPath?: string | undefined;
65
+ }>]>;
66
+ export type DirectTransferResource = z.infer<typeof directTransferResourceSchema>;
67
+ export declare const directTransferDescriptorSchema: z.ZodEffects<z.ZodObject<{
68
+ direction: z.ZodEnum<["UPLOAD", "DOWNLOAD"]>;
69
+ resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
70
+ kind: z.ZodLiteral<"WORKSPACE_FILE">;
71
+ workspaceId: z.ZodString;
72
+ path: z.ZodString;
73
+ worktreePath: z.ZodOptional<z.ZodString>;
74
+ }, "strict", z.ZodTypeAny, {
75
+ path: string;
76
+ kind: "WORKSPACE_FILE";
77
+ workspaceId: string;
78
+ worktreePath?: string | undefined;
79
+ }, {
80
+ path: string;
81
+ kind: "WORKSPACE_FILE";
82
+ workspaceId: string;
83
+ worktreePath?: string | undefined;
84
+ }>, z.ZodObject<{
85
+ kind: z.ZodLiteral<"GIT_COMMIT_BLOB">;
86
+ workspaceId: z.ZodString;
87
+ commit: z.ZodString;
88
+ path: z.ZodString;
89
+ repositoryPath: z.ZodOptional<z.ZodString>;
90
+ worktreePath: z.ZodOptional<z.ZodString>;
91
+ }, "strict", z.ZodTypeAny, {
92
+ path: string;
93
+ kind: "GIT_COMMIT_BLOB";
94
+ workspaceId: string;
95
+ commit: string;
96
+ worktreePath?: string | undefined;
97
+ repositoryPath?: string | undefined;
98
+ }, {
99
+ path: string;
100
+ kind: "GIT_COMMIT_BLOB";
101
+ workspaceId: string;
102
+ commit: string;
103
+ worktreePath?: string | undefined;
104
+ repositoryPath?: string | undefined;
105
+ }>]>;
106
+ fileName: z.ZodString;
107
+ size: z.ZodNumber;
108
+ sha256: z.ZodString;
109
+ overwrite: z.ZodOptional<z.ZodBoolean>;
110
+ resumeOffset: z.ZodOptional<z.ZodNumber>;
111
+ composerAttachment: z.ZodOptional<z.ZodObject<{
112
+ id: z.ZodString;
113
+ mime: z.ZodString;
114
+ }, "strict", z.ZodTypeAny, {
115
+ id: string;
116
+ mime: string;
117
+ }, {
118
+ id: string;
119
+ mime: string;
120
+ }>>;
121
+ }, "strict", z.ZodTypeAny, {
122
+ direction: "UPLOAD" | "DOWNLOAD";
123
+ resource: {
124
+ path: string;
125
+ kind: "WORKSPACE_FILE";
126
+ workspaceId: string;
127
+ worktreePath?: string | undefined;
128
+ } | {
129
+ path: string;
130
+ kind: "GIT_COMMIT_BLOB";
131
+ workspaceId: string;
132
+ commit: string;
133
+ worktreePath?: string | undefined;
134
+ repositoryPath?: string | undefined;
135
+ };
136
+ fileName: string;
137
+ size: number;
138
+ sha256: string;
139
+ overwrite?: boolean | undefined;
140
+ resumeOffset?: number | undefined;
141
+ composerAttachment?: {
142
+ id: string;
143
+ mime: string;
144
+ } | undefined;
145
+ }, {
146
+ direction: "UPLOAD" | "DOWNLOAD";
147
+ resource: {
148
+ path: string;
149
+ kind: "WORKSPACE_FILE";
150
+ workspaceId: string;
151
+ worktreePath?: string | undefined;
152
+ } | {
153
+ path: string;
154
+ kind: "GIT_COMMIT_BLOB";
155
+ workspaceId: string;
156
+ commit: string;
157
+ worktreePath?: string | undefined;
158
+ repositoryPath?: string | undefined;
159
+ };
160
+ fileName: string;
161
+ size: number;
162
+ sha256: string;
163
+ overwrite?: boolean | undefined;
164
+ resumeOffset?: number | undefined;
165
+ composerAttachment?: {
166
+ id: string;
167
+ mime: string;
168
+ } | undefined;
169
+ }>, {
170
+ direction: "UPLOAD" | "DOWNLOAD";
171
+ resource: {
172
+ path: string;
173
+ kind: "WORKSPACE_FILE";
174
+ workspaceId: string;
175
+ worktreePath?: string | undefined;
176
+ } | {
177
+ path: string;
178
+ kind: "GIT_COMMIT_BLOB";
179
+ workspaceId: string;
180
+ commit: string;
181
+ worktreePath?: string | undefined;
182
+ repositoryPath?: string | undefined;
183
+ };
184
+ fileName: string;
185
+ size: number;
186
+ sha256: string;
187
+ overwrite?: boolean | undefined;
188
+ resumeOffset?: number | undefined;
189
+ composerAttachment?: {
190
+ id: string;
191
+ mime: string;
192
+ } | undefined;
193
+ }, {
194
+ direction: "UPLOAD" | "DOWNLOAD";
195
+ resource: {
196
+ path: string;
197
+ kind: "WORKSPACE_FILE";
198
+ workspaceId: string;
199
+ worktreePath?: string | undefined;
200
+ } | {
201
+ path: string;
202
+ kind: "GIT_COMMIT_BLOB";
203
+ workspaceId: string;
204
+ commit: string;
205
+ worktreePath?: string | undefined;
206
+ repositoryPath?: string | undefined;
207
+ };
208
+ fileName: string;
209
+ size: number;
210
+ sha256: string;
211
+ overwrite?: boolean | undefined;
212
+ resumeOffset?: number | undefined;
213
+ composerAttachment?: {
214
+ id: string;
215
+ mime: string;
216
+ } | undefined;
217
+ }>;
218
+ export type DirectTransferDescriptor = z.infer<typeof directTransferDescriptorSchema>;
219
+ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpose", [z.ZodObject<{
220
+ type: z.ZodLiteral<"direct.prepare">;
221
+ requestId: z.ZodString;
222
+ nodeId: z.ZodString;
223
+ nodeGeneration: z.ZodString;
224
+ } & {
225
+ purpose: z.ZodLiteral<"PROBE">;
226
+ }, "strict", z.ZodTypeAny, {
227
+ type: "direct.prepare";
228
+ requestId: string;
229
+ nodeId: string;
230
+ nodeGeneration: string;
231
+ purpose: "PROBE";
232
+ }, {
233
+ type: "direct.prepare";
234
+ requestId: string;
235
+ nodeId: string;
236
+ nodeGeneration: string;
237
+ purpose: "PROBE";
238
+ }>, z.ZodObject<{
239
+ type: z.ZodLiteral<"direct.prepare">;
240
+ requestId: z.ZodString;
241
+ nodeId: z.ZodString;
242
+ nodeGeneration: z.ZodString;
243
+ } & {
244
+ purpose: z.ZodLiteral<"TRANSFER">;
245
+ transfer: z.ZodEffects<z.ZodObject<{
246
+ direction: z.ZodEnum<["UPLOAD", "DOWNLOAD"]>;
247
+ resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
248
+ kind: z.ZodLiteral<"WORKSPACE_FILE">;
249
+ workspaceId: z.ZodString;
250
+ path: z.ZodString;
251
+ worktreePath: z.ZodOptional<z.ZodString>;
252
+ }, "strict", z.ZodTypeAny, {
253
+ path: string;
254
+ kind: "WORKSPACE_FILE";
255
+ workspaceId: string;
256
+ worktreePath?: string | undefined;
257
+ }, {
258
+ path: string;
259
+ kind: "WORKSPACE_FILE";
260
+ workspaceId: string;
261
+ worktreePath?: string | undefined;
262
+ }>, z.ZodObject<{
263
+ kind: z.ZodLiteral<"GIT_COMMIT_BLOB">;
264
+ workspaceId: z.ZodString;
265
+ commit: z.ZodString;
266
+ path: z.ZodString;
267
+ repositoryPath: z.ZodOptional<z.ZodString>;
268
+ worktreePath: z.ZodOptional<z.ZodString>;
269
+ }, "strict", z.ZodTypeAny, {
270
+ path: string;
271
+ kind: "GIT_COMMIT_BLOB";
272
+ workspaceId: string;
273
+ commit: string;
274
+ worktreePath?: string | undefined;
275
+ repositoryPath?: string | undefined;
276
+ }, {
277
+ path: string;
278
+ kind: "GIT_COMMIT_BLOB";
279
+ workspaceId: string;
280
+ commit: string;
281
+ worktreePath?: string | undefined;
282
+ repositoryPath?: string | undefined;
283
+ }>]>;
284
+ fileName: z.ZodString;
285
+ size: z.ZodNumber;
286
+ sha256: z.ZodString;
287
+ overwrite: z.ZodOptional<z.ZodBoolean>;
288
+ resumeOffset: z.ZodOptional<z.ZodNumber>;
289
+ composerAttachment: z.ZodOptional<z.ZodObject<{
290
+ id: z.ZodString;
291
+ mime: z.ZodString;
292
+ }, "strict", z.ZodTypeAny, {
293
+ id: string;
294
+ mime: string;
295
+ }, {
296
+ id: string;
297
+ mime: string;
298
+ }>>;
299
+ }, "strict", z.ZodTypeAny, {
300
+ direction: "UPLOAD" | "DOWNLOAD";
301
+ resource: {
302
+ path: string;
303
+ kind: "WORKSPACE_FILE";
304
+ workspaceId: string;
305
+ worktreePath?: string | undefined;
306
+ } | {
307
+ path: string;
308
+ kind: "GIT_COMMIT_BLOB";
309
+ workspaceId: string;
310
+ commit: string;
311
+ worktreePath?: string | undefined;
312
+ repositoryPath?: string | undefined;
313
+ };
314
+ fileName: string;
315
+ size: number;
316
+ sha256: string;
317
+ overwrite?: boolean | undefined;
318
+ resumeOffset?: number | undefined;
319
+ composerAttachment?: {
320
+ id: string;
321
+ mime: string;
322
+ } | undefined;
323
+ }, {
324
+ direction: "UPLOAD" | "DOWNLOAD";
325
+ resource: {
326
+ path: string;
327
+ kind: "WORKSPACE_FILE";
328
+ workspaceId: string;
329
+ worktreePath?: string | undefined;
330
+ } | {
331
+ path: string;
332
+ kind: "GIT_COMMIT_BLOB";
333
+ workspaceId: string;
334
+ commit: string;
335
+ worktreePath?: string | undefined;
336
+ repositoryPath?: string | undefined;
337
+ };
338
+ fileName: string;
339
+ size: number;
340
+ sha256: string;
341
+ overwrite?: boolean | undefined;
342
+ resumeOffset?: number | undefined;
343
+ composerAttachment?: {
344
+ id: string;
345
+ mime: string;
346
+ } | undefined;
347
+ }>, {
348
+ direction: "UPLOAD" | "DOWNLOAD";
349
+ resource: {
350
+ path: string;
351
+ kind: "WORKSPACE_FILE";
352
+ workspaceId: string;
353
+ worktreePath?: string | undefined;
354
+ } | {
355
+ path: string;
356
+ kind: "GIT_COMMIT_BLOB";
357
+ workspaceId: string;
358
+ commit: string;
359
+ worktreePath?: string | undefined;
360
+ repositoryPath?: string | undefined;
361
+ };
362
+ fileName: string;
363
+ size: number;
364
+ sha256: string;
365
+ overwrite?: boolean | undefined;
366
+ resumeOffset?: number | undefined;
367
+ composerAttachment?: {
368
+ id: string;
369
+ mime: string;
370
+ } | undefined;
371
+ }, {
372
+ direction: "UPLOAD" | "DOWNLOAD";
373
+ resource: {
374
+ path: string;
375
+ kind: "WORKSPACE_FILE";
376
+ workspaceId: string;
377
+ worktreePath?: string | undefined;
378
+ } | {
379
+ path: string;
380
+ kind: "GIT_COMMIT_BLOB";
381
+ workspaceId: string;
382
+ commit: string;
383
+ worktreePath?: string | undefined;
384
+ repositoryPath?: string | undefined;
385
+ };
386
+ fileName: string;
387
+ size: number;
388
+ sha256: string;
389
+ overwrite?: boolean | undefined;
390
+ resumeOffset?: number | undefined;
391
+ composerAttachment?: {
392
+ id: string;
393
+ mime: string;
394
+ } | undefined;
395
+ }>;
396
+ }, "strict", z.ZodTypeAny, {
397
+ type: "direct.prepare";
398
+ requestId: string;
399
+ nodeId: string;
400
+ nodeGeneration: string;
401
+ purpose: "TRANSFER";
402
+ transfer: {
403
+ direction: "UPLOAD" | "DOWNLOAD";
404
+ resource: {
405
+ path: string;
406
+ kind: "WORKSPACE_FILE";
407
+ workspaceId: string;
408
+ worktreePath?: string | undefined;
409
+ } | {
410
+ path: string;
411
+ kind: "GIT_COMMIT_BLOB";
412
+ workspaceId: string;
413
+ commit: string;
414
+ worktreePath?: string | undefined;
415
+ repositoryPath?: string | undefined;
416
+ };
417
+ fileName: string;
418
+ size: number;
419
+ sha256: string;
420
+ overwrite?: boolean | undefined;
421
+ resumeOffset?: number | undefined;
422
+ composerAttachment?: {
423
+ id: string;
424
+ mime: string;
425
+ } | undefined;
426
+ };
427
+ }, {
428
+ type: "direct.prepare";
429
+ requestId: string;
430
+ nodeId: string;
431
+ nodeGeneration: string;
432
+ purpose: "TRANSFER";
433
+ transfer: {
434
+ direction: "UPLOAD" | "DOWNLOAD";
435
+ resource: {
436
+ path: string;
437
+ kind: "WORKSPACE_FILE";
438
+ workspaceId: string;
439
+ worktreePath?: string | undefined;
440
+ } | {
441
+ path: string;
442
+ kind: "GIT_COMMIT_BLOB";
443
+ workspaceId: string;
444
+ commit: string;
445
+ worktreePath?: string | undefined;
446
+ repositoryPath?: string | undefined;
447
+ };
448
+ fileName: string;
449
+ size: number;
450
+ sha256: string;
451
+ overwrite?: boolean | undefined;
452
+ resumeOffset?: number | undefined;
453
+ composerAttachment?: {
454
+ id: string;
455
+ mime: string;
456
+ } | undefined;
457
+ };
458
+ }>]>;
459
+ export type DirectPrepareRequest = z.infer<typeof directPrepareRequestSchema>;
460
+ export declare const directIceCandidateSchema: z.ZodObject<{
461
+ candidate: z.ZodString;
462
+ sdpMid: z.ZodNullable<z.ZodString>;
463
+ sdpMLineIndex: z.ZodNullable<z.ZodNumber>;
464
+ }, "strict", z.ZodTypeAny, {
465
+ candidate: string;
466
+ sdpMid: string | null;
467
+ sdpMLineIndex: number | null;
468
+ }, {
469
+ candidate: string;
470
+ sdpMid: string | null;
471
+ sdpMLineIndex: number | null;
472
+ }>;
473
+ export type DirectIceCandidate = z.infer<typeof directIceCandidateSchema>;
474
+ export declare const directSignalSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
475
+ kind: z.ZodLiteral<"OFFER">;
476
+ sdp: z.ZodString;
477
+ fingerprint: z.ZodString;
478
+ }, "strict", z.ZodTypeAny, {
479
+ kind: "OFFER";
480
+ sdp: string;
481
+ fingerprint: string;
482
+ }, {
483
+ kind: "OFFER";
484
+ sdp: string;
485
+ fingerprint: string;
486
+ }>, z.ZodObject<{
487
+ kind: z.ZodLiteral<"ANSWER">;
488
+ sdp: z.ZodString;
489
+ fingerprint: z.ZodString;
490
+ }, "strict", z.ZodTypeAny, {
491
+ kind: "ANSWER";
492
+ sdp: string;
493
+ fingerprint: string;
494
+ }, {
495
+ kind: "ANSWER";
496
+ sdp: string;
497
+ fingerprint: string;
498
+ }>, z.ZodObject<{
499
+ kind: z.ZodLiteral<"CANDIDATE">;
500
+ candidate: z.ZodObject<{
501
+ candidate: z.ZodString;
502
+ sdpMid: z.ZodNullable<z.ZodString>;
503
+ sdpMLineIndex: z.ZodNullable<z.ZodNumber>;
504
+ }, "strict", z.ZodTypeAny, {
505
+ candidate: string;
506
+ sdpMid: string | null;
507
+ sdpMLineIndex: number | null;
508
+ }, {
509
+ candidate: string;
510
+ sdpMid: string | null;
511
+ sdpMLineIndex: number | null;
512
+ }>;
513
+ }, "strict", z.ZodTypeAny, {
514
+ kind: "CANDIDATE";
515
+ candidate: {
516
+ candidate: string;
517
+ sdpMid: string | null;
518
+ sdpMLineIndex: number | null;
519
+ };
520
+ }, {
521
+ kind: "CANDIDATE";
522
+ candidate: {
523
+ candidate: string;
524
+ sdpMid: string | null;
525
+ sdpMLineIndex: number | null;
526
+ };
527
+ }>, z.ZodObject<{
528
+ kind: z.ZodLiteral<"END_OF_CANDIDATES">;
529
+ }, "strict", z.ZodTypeAny, {
530
+ kind: "END_OF_CANDIDATES";
531
+ }, {
532
+ kind: "END_OF_CANDIDATES";
533
+ }>]>;
534
+ export type DirectSignal = z.infer<typeof directSignalSchema>;
535
+ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"purpose", [z.ZodObject<{
536
+ type: z.ZodLiteral<"direct.prepare">;
537
+ requestId: z.ZodString;
538
+ nodeId: z.ZodString;
539
+ nodeGeneration: z.ZodString;
540
+ } & {
541
+ purpose: z.ZodLiteral<"PROBE">;
542
+ }, "strict", z.ZodTypeAny, {
543
+ type: "direct.prepare";
544
+ requestId: string;
545
+ nodeId: string;
546
+ nodeGeneration: string;
547
+ purpose: "PROBE";
548
+ }, {
549
+ type: "direct.prepare";
550
+ requestId: string;
551
+ nodeId: string;
552
+ nodeGeneration: string;
553
+ purpose: "PROBE";
554
+ }>, z.ZodObject<{
555
+ type: z.ZodLiteral<"direct.prepare">;
556
+ requestId: z.ZodString;
557
+ nodeId: z.ZodString;
558
+ nodeGeneration: z.ZodString;
559
+ } & {
560
+ purpose: z.ZodLiteral<"TRANSFER">;
561
+ transfer: z.ZodEffects<z.ZodObject<{
562
+ direction: z.ZodEnum<["UPLOAD", "DOWNLOAD"]>;
563
+ resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
564
+ kind: z.ZodLiteral<"WORKSPACE_FILE">;
565
+ workspaceId: z.ZodString;
566
+ path: z.ZodString;
567
+ worktreePath: z.ZodOptional<z.ZodString>;
568
+ }, "strict", z.ZodTypeAny, {
569
+ path: string;
570
+ kind: "WORKSPACE_FILE";
571
+ workspaceId: string;
572
+ worktreePath?: string | undefined;
573
+ }, {
574
+ path: string;
575
+ kind: "WORKSPACE_FILE";
576
+ workspaceId: string;
577
+ worktreePath?: string | undefined;
578
+ }>, z.ZodObject<{
579
+ kind: z.ZodLiteral<"GIT_COMMIT_BLOB">;
580
+ workspaceId: z.ZodString;
581
+ commit: z.ZodString;
582
+ path: z.ZodString;
583
+ repositoryPath: z.ZodOptional<z.ZodString>;
584
+ worktreePath: z.ZodOptional<z.ZodString>;
585
+ }, "strict", z.ZodTypeAny, {
586
+ path: string;
587
+ kind: "GIT_COMMIT_BLOB";
588
+ workspaceId: string;
589
+ commit: string;
590
+ worktreePath?: string | undefined;
591
+ repositoryPath?: string | undefined;
592
+ }, {
593
+ path: string;
594
+ kind: "GIT_COMMIT_BLOB";
595
+ workspaceId: string;
596
+ commit: string;
597
+ worktreePath?: string | undefined;
598
+ repositoryPath?: string | undefined;
599
+ }>]>;
600
+ fileName: z.ZodString;
601
+ size: z.ZodNumber;
602
+ sha256: z.ZodString;
603
+ overwrite: z.ZodOptional<z.ZodBoolean>;
604
+ resumeOffset: z.ZodOptional<z.ZodNumber>;
605
+ composerAttachment: z.ZodOptional<z.ZodObject<{
606
+ id: z.ZodString;
607
+ mime: z.ZodString;
608
+ }, "strict", z.ZodTypeAny, {
609
+ id: string;
610
+ mime: string;
611
+ }, {
612
+ id: string;
613
+ mime: string;
614
+ }>>;
615
+ }, "strict", z.ZodTypeAny, {
616
+ direction: "UPLOAD" | "DOWNLOAD";
617
+ resource: {
618
+ path: string;
619
+ kind: "WORKSPACE_FILE";
620
+ workspaceId: string;
621
+ worktreePath?: string | undefined;
622
+ } | {
623
+ path: string;
624
+ kind: "GIT_COMMIT_BLOB";
625
+ workspaceId: string;
626
+ commit: string;
627
+ worktreePath?: string | undefined;
628
+ repositoryPath?: string | undefined;
629
+ };
630
+ fileName: string;
631
+ size: number;
632
+ sha256: string;
633
+ overwrite?: boolean | undefined;
634
+ resumeOffset?: number | undefined;
635
+ composerAttachment?: {
636
+ id: string;
637
+ mime: string;
638
+ } | undefined;
639
+ }, {
640
+ direction: "UPLOAD" | "DOWNLOAD";
641
+ resource: {
642
+ path: string;
643
+ kind: "WORKSPACE_FILE";
644
+ workspaceId: string;
645
+ worktreePath?: string | undefined;
646
+ } | {
647
+ path: string;
648
+ kind: "GIT_COMMIT_BLOB";
649
+ workspaceId: string;
650
+ commit: string;
651
+ worktreePath?: string | undefined;
652
+ repositoryPath?: string | undefined;
653
+ };
654
+ fileName: string;
655
+ size: number;
656
+ sha256: string;
657
+ overwrite?: boolean | undefined;
658
+ resumeOffset?: number | undefined;
659
+ composerAttachment?: {
660
+ id: string;
661
+ mime: string;
662
+ } | undefined;
663
+ }>, {
664
+ direction: "UPLOAD" | "DOWNLOAD";
665
+ resource: {
666
+ path: string;
667
+ kind: "WORKSPACE_FILE";
668
+ workspaceId: string;
669
+ worktreePath?: string | undefined;
670
+ } | {
671
+ path: string;
672
+ kind: "GIT_COMMIT_BLOB";
673
+ workspaceId: string;
674
+ commit: string;
675
+ worktreePath?: string | undefined;
676
+ repositoryPath?: string | undefined;
677
+ };
678
+ fileName: string;
679
+ size: number;
680
+ sha256: string;
681
+ overwrite?: boolean | undefined;
682
+ resumeOffset?: number | undefined;
683
+ composerAttachment?: {
684
+ id: string;
685
+ mime: string;
686
+ } | undefined;
687
+ }, {
688
+ direction: "UPLOAD" | "DOWNLOAD";
689
+ resource: {
690
+ path: string;
691
+ kind: "WORKSPACE_FILE";
692
+ workspaceId: string;
693
+ worktreePath?: string | undefined;
694
+ } | {
695
+ path: string;
696
+ kind: "GIT_COMMIT_BLOB";
697
+ workspaceId: string;
698
+ commit: string;
699
+ worktreePath?: string | undefined;
700
+ repositoryPath?: string | undefined;
701
+ };
702
+ fileName: string;
703
+ size: number;
704
+ sha256: string;
705
+ overwrite?: boolean | undefined;
706
+ resumeOffset?: number | undefined;
707
+ composerAttachment?: {
708
+ id: string;
709
+ mime: string;
710
+ } | undefined;
711
+ }>;
712
+ }, "strict", z.ZodTypeAny, {
713
+ type: "direct.prepare";
714
+ requestId: string;
715
+ nodeId: string;
716
+ nodeGeneration: string;
717
+ purpose: "TRANSFER";
718
+ transfer: {
719
+ direction: "UPLOAD" | "DOWNLOAD";
720
+ resource: {
721
+ path: string;
722
+ kind: "WORKSPACE_FILE";
723
+ workspaceId: string;
724
+ worktreePath?: string | undefined;
725
+ } | {
726
+ path: string;
727
+ kind: "GIT_COMMIT_BLOB";
728
+ workspaceId: string;
729
+ commit: string;
730
+ worktreePath?: string | undefined;
731
+ repositoryPath?: string | undefined;
732
+ };
733
+ fileName: string;
734
+ size: number;
735
+ sha256: string;
736
+ overwrite?: boolean | undefined;
737
+ resumeOffset?: number | undefined;
738
+ composerAttachment?: {
739
+ id: string;
740
+ mime: string;
741
+ } | undefined;
742
+ };
743
+ }, {
744
+ type: "direct.prepare";
745
+ requestId: string;
746
+ nodeId: string;
747
+ nodeGeneration: string;
748
+ purpose: "TRANSFER";
749
+ transfer: {
750
+ direction: "UPLOAD" | "DOWNLOAD";
751
+ resource: {
752
+ path: string;
753
+ kind: "WORKSPACE_FILE";
754
+ workspaceId: string;
755
+ worktreePath?: string | undefined;
756
+ } | {
757
+ path: string;
758
+ kind: "GIT_COMMIT_BLOB";
759
+ workspaceId: string;
760
+ commit: string;
761
+ worktreePath?: string | undefined;
762
+ repositoryPath?: string | undefined;
763
+ };
764
+ fileName: string;
765
+ size: number;
766
+ sha256: string;
767
+ overwrite?: boolean | undefined;
768
+ resumeOffset?: number | undefined;
769
+ composerAttachment?: {
770
+ id: string;
771
+ mime: string;
772
+ } | undefined;
773
+ };
774
+ }>]>, z.ZodObject<{
775
+ directSessionId: z.ZodString;
776
+ } & {
777
+ type: z.ZodLiteral<"direct.signal">;
778
+ signal: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
779
+ kind: z.ZodLiteral<"OFFER">;
780
+ sdp: z.ZodString;
781
+ fingerprint: z.ZodString;
782
+ }, "strict", z.ZodTypeAny, {
783
+ kind: "OFFER";
784
+ sdp: string;
785
+ fingerprint: string;
786
+ }, {
787
+ kind: "OFFER";
788
+ sdp: string;
789
+ fingerprint: string;
790
+ }>, z.ZodObject<{
791
+ kind: z.ZodLiteral<"ANSWER">;
792
+ sdp: z.ZodString;
793
+ fingerprint: z.ZodString;
794
+ }, "strict", z.ZodTypeAny, {
795
+ kind: "ANSWER";
796
+ sdp: string;
797
+ fingerprint: string;
798
+ }, {
799
+ kind: "ANSWER";
800
+ sdp: string;
801
+ fingerprint: string;
802
+ }>, z.ZodObject<{
803
+ kind: z.ZodLiteral<"CANDIDATE">;
804
+ candidate: z.ZodObject<{
805
+ candidate: z.ZodString;
806
+ sdpMid: z.ZodNullable<z.ZodString>;
807
+ sdpMLineIndex: z.ZodNullable<z.ZodNumber>;
808
+ }, "strict", z.ZodTypeAny, {
809
+ candidate: string;
810
+ sdpMid: string | null;
811
+ sdpMLineIndex: number | null;
812
+ }, {
813
+ candidate: string;
814
+ sdpMid: string | null;
815
+ sdpMLineIndex: number | null;
816
+ }>;
817
+ }, "strict", z.ZodTypeAny, {
818
+ kind: "CANDIDATE";
819
+ candidate: {
820
+ candidate: string;
821
+ sdpMid: string | null;
822
+ sdpMLineIndex: number | null;
823
+ };
824
+ }, {
825
+ kind: "CANDIDATE";
826
+ candidate: {
827
+ candidate: string;
828
+ sdpMid: string | null;
829
+ sdpMLineIndex: number | null;
830
+ };
831
+ }>, z.ZodObject<{
832
+ kind: z.ZodLiteral<"END_OF_CANDIDATES">;
833
+ }, "strict", z.ZodTypeAny, {
834
+ kind: "END_OF_CANDIDATES";
835
+ }, {
836
+ kind: "END_OF_CANDIDATES";
837
+ }>]>;
838
+ }, "strict", z.ZodTypeAny, {
839
+ type: "direct.signal";
840
+ directSessionId: string;
841
+ signal: {
842
+ kind: "OFFER";
843
+ sdp: string;
844
+ fingerprint: string;
845
+ } | {
846
+ kind: "ANSWER";
847
+ sdp: string;
848
+ fingerprint: string;
849
+ } | {
850
+ kind: "CANDIDATE";
851
+ candidate: {
852
+ candidate: string;
853
+ sdpMid: string | null;
854
+ sdpMLineIndex: number | null;
855
+ };
856
+ } | {
857
+ kind: "END_OF_CANDIDATES";
858
+ };
859
+ }, {
860
+ type: "direct.signal";
861
+ directSessionId: string;
862
+ signal: {
863
+ kind: "OFFER";
864
+ sdp: string;
865
+ fingerprint: string;
866
+ } | {
867
+ kind: "ANSWER";
868
+ sdp: string;
869
+ fingerprint: string;
870
+ } | {
871
+ kind: "CANDIDATE";
872
+ candidate: {
873
+ candidate: string;
874
+ sdpMid: string | null;
875
+ sdpMLineIndex: number | null;
876
+ };
877
+ } | {
878
+ kind: "END_OF_CANDIDATES";
879
+ };
880
+ }>, z.ZodObject<{
881
+ directSessionId: z.ZodString;
882
+ } & {
883
+ type: z.ZodLiteral<"direct.connected">;
884
+ }, "strict", z.ZodTypeAny, {
885
+ type: "direct.connected";
886
+ directSessionId: string;
887
+ }, {
888
+ type: "direct.connected";
889
+ directSessionId: string;
890
+ }>, z.ZodObject<{
891
+ directSessionId: z.ZodString;
892
+ } & {
893
+ type: z.ZodLiteral<"direct.heartbeat">;
894
+ }, "strict", z.ZodTypeAny, {
895
+ type: "direct.heartbeat";
896
+ directSessionId: string;
897
+ }, {
898
+ type: "direct.heartbeat";
899
+ directSessionId: string;
900
+ }>, z.ZodObject<{
901
+ directSessionId: z.ZodString;
902
+ } & {
903
+ type: z.ZodLiteral<"direct.complete">;
904
+ size: z.ZodNumber;
905
+ sha256: z.ZodString;
906
+ }, "strict", z.ZodTypeAny, {
907
+ type: "direct.complete";
908
+ size: number;
909
+ sha256: string;
910
+ directSessionId: string;
911
+ }, {
912
+ type: "direct.complete";
913
+ size: number;
914
+ sha256: string;
915
+ directSessionId: string;
916
+ }>, z.ZodObject<{
917
+ directSessionId: z.ZodString;
918
+ } & {
919
+ type: z.ZodLiteral<"direct.cancel">;
920
+ reason: z.ZodOptional<z.ZodString>;
921
+ }, "strict", z.ZodTypeAny, {
922
+ type: "direct.cancel";
923
+ directSessionId: string;
924
+ reason?: string | undefined;
925
+ }, {
926
+ type: "direct.cancel";
927
+ directSessionId: string;
928
+ reason?: string | undefined;
929
+ }>]>;
930
+ export type DirectBrowserMessage = z.infer<typeof directBrowserMessageSchema>;
931
+ export declare const directServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
932
+ type: z.ZodLiteral<"direct.prepared">;
933
+ requestId: z.ZodString;
934
+ directSessionId: z.ZodString;
935
+ nodeId: z.ZodString;
936
+ nodeGeneration: z.ZodString;
937
+ purpose: z.ZodEnum<["PROBE", "TRANSFER"]>;
938
+ expiresAt: z.ZodNumber;
939
+ resumeOffset: z.ZodOptional<z.ZodNumber>;
940
+ }, "strict", z.ZodTypeAny, {
941
+ type: "direct.prepared";
942
+ requestId: string;
943
+ nodeId: string;
944
+ nodeGeneration: string;
945
+ purpose: "PROBE" | "TRANSFER";
946
+ directSessionId: string;
947
+ expiresAt: number;
948
+ resumeOffset?: number | undefined;
949
+ }, {
950
+ type: "direct.prepared";
951
+ requestId: string;
952
+ nodeId: string;
953
+ nodeGeneration: string;
954
+ purpose: "PROBE" | "TRANSFER";
955
+ directSessionId: string;
956
+ expiresAt: number;
957
+ resumeOffset?: number | undefined;
958
+ }>, z.ZodObject<{
959
+ directSessionId: z.ZodString;
960
+ } & {
961
+ type: z.ZodLiteral<"direct.signal">;
962
+ signal: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
963
+ kind: z.ZodLiteral<"OFFER">;
964
+ sdp: z.ZodString;
965
+ fingerprint: z.ZodString;
966
+ }, "strict", z.ZodTypeAny, {
967
+ kind: "OFFER";
968
+ sdp: string;
969
+ fingerprint: string;
970
+ }, {
971
+ kind: "OFFER";
972
+ sdp: string;
973
+ fingerprint: string;
974
+ }>, z.ZodObject<{
975
+ kind: z.ZodLiteral<"ANSWER">;
976
+ sdp: z.ZodString;
977
+ fingerprint: z.ZodString;
978
+ }, "strict", z.ZodTypeAny, {
979
+ kind: "ANSWER";
980
+ sdp: string;
981
+ fingerprint: string;
982
+ }, {
983
+ kind: "ANSWER";
984
+ sdp: string;
985
+ fingerprint: string;
986
+ }>, z.ZodObject<{
987
+ kind: z.ZodLiteral<"CANDIDATE">;
988
+ candidate: z.ZodObject<{
989
+ candidate: z.ZodString;
990
+ sdpMid: z.ZodNullable<z.ZodString>;
991
+ sdpMLineIndex: z.ZodNullable<z.ZodNumber>;
992
+ }, "strict", z.ZodTypeAny, {
993
+ candidate: string;
994
+ sdpMid: string | null;
995
+ sdpMLineIndex: number | null;
996
+ }, {
997
+ candidate: string;
998
+ sdpMid: string | null;
999
+ sdpMLineIndex: number | null;
1000
+ }>;
1001
+ }, "strict", z.ZodTypeAny, {
1002
+ kind: "CANDIDATE";
1003
+ candidate: {
1004
+ candidate: string;
1005
+ sdpMid: string | null;
1006
+ sdpMLineIndex: number | null;
1007
+ };
1008
+ }, {
1009
+ kind: "CANDIDATE";
1010
+ candidate: {
1011
+ candidate: string;
1012
+ sdpMid: string | null;
1013
+ sdpMLineIndex: number | null;
1014
+ };
1015
+ }>, z.ZodObject<{
1016
+ kind: z.ZodLiteral<"END_OF_CANDIDATES">;
1017
+ }, "strict", z.ZodTypeAny, {
1018
+ kind: "END_OF_CANDIDATES";
1019
+ }, {
1020
+ kind: "END_OF_CANDIDATES";
1021
+ }>]>;
1022
+ }, "strict", z.ZodTypeAny, {
1023
+ type: "direct.signal";
1024
+ directSessionId: string;
1025
+ signal: {
1026
+ kind: "OFFER";
1027
+ sdp: string;
1028
+ fingerprint: string;
1029
+ } | {
1030
+ kind: "ANSWER";
1031
+ sdp: string;
1032
+ fingerprint: string;
1033
+ } | {
1034
+ kind: "CANDIDATE";
1035
+ candidate: {
1036
+ candidate: string;
1037
+ sdpMid: string | null;
1038
+ sdpMLineIndex: number | null;
1039
+ };
1040
+ } | {
1041
+ kind: "END_OF_CANDIDATES";
1042
+ };
1043
+ }, {
1044
+ type: "direct.signal";
1045
+ directSessionId: string;
1046
+ signal: {
1047
+ kind: "OFFER";
1048
+ sdp: string;
1049
+ fingerprint: string;
1050
+ } | {
1051
+ kind: "ANSWER";
1052
+ sdp: string;
1053
+ fingerprint: string;
1054
+ } | {
1055
+ kind: "CANDIDATE";
1056
+ candidate: {
1057
+ candidate: string;
1058
+ sdpMid: string | null;
1059
+ sdpMLineIndex: number | null;
1060
+ };
1061
+ } | {
1062
+ kind: "END_OF_CANDIDATES";
1063
+ };
1064
+ }>, z.ZodObject<{
1065
+ directSessionId: z.ZodString;
1066
+ } & {
1067
+ type: z.ZodLiteral<"direct.grant">;
1068
+ grant: z.ZodString;
1069
+ openExpiresAt: z.ZodNumber;
1070
+ expiresAt: z.ZodNumber;
1071
+ }, "strict", z.ZodTypeAny, {
1072
+ type: "direct.grant";
1073
+ directSessionId: string;
1074
+ expiresAt: number;
1075
+ grant: string;
1076
+ openExpiresAt: number;
1077
+ }, {
1078
+ type: "direct.grant";
1079
+ directSessionId: string;
1080
+ expiresAt: number;
1081
+ grant: string;
1082
+ openExpiresAt: number;
1083
+ }>, z.ZodObject<{
1084
+ directSessionId: z.ZodString;
1085
+ } & {
1086
+ type: z.ZodLiteral<"direct.probe-result">;
1087
+ result: z.ZodEnum<["DIRECT_AVAILABLE", "RELAY_ONLY"]>;
1088
+ routingHint: z.ZodOptional<z.ZodString>;
1089
+ }, "strict", z.ZodTypeAny, {
1090
+ type: "direct.probe-result";
1091
+ directSessionId: string;
1092
+ result: "DIRECT_AVAILABLE" | "RELAY_ONLY";
1093
+ routingHint?: string | undefined;
1094
+ }, {
1095
+ type: "direct.probe-result";
1096
+ directSessionId: string;
1097
+ result: "DIRECT_AVAILABLE" | "RELAY_ONLY";
1098
+ routingHint?: string | undefined;
1099
+ }>, z.ZodObject<{
1100
+ directSessionId: z.ZodString;
1101
+ } & {
1102
+ type: z.ZodLiteral<"direct.heartbeat">;
1103
+ alive: z.ZodLiteral<true>;
1104
+ expiresAt: z.ZodNumber;
1105
+ }, "strict", z.ZodTypeAny, {
1106
+ type: "direct.heartbeat";
1107
+ directSessionId: string;
1108
+ expiresAt: number;
1109
+ alive: true;
1110
+ }, {
1111
+ type: "direct.heartbeat";
1112
+ directSessionId: string;
1113
+ expiresAt: number;
1114
+ alive: true;
1115
+ }>, z.ZodObject<{
1116
+ directSessionId: z.ZodString;
1117
+ } & {
1118
+ type: z.ZodLiteral<"direct.opened">;
1119
+ offset: z.ZodNumber;
1120
+ }, "strict", z.ZodTypeAny, {
1121
+ type: "direct.opened";
1122
+ directSessionId: string;
1123
+ offset: number;
1124
+ }, {
1125
+ type: "direct.opened";
1126
+ directSessionId: string;
1127
+ offset: number;
1128
+ }>, z.ZodObject<{
1129
+ directSessionId: z.ZodString;
1130
+ } & {
1131
+ type: z.ZodLiteral<"direct.complete">;
1132
+ size: z.ZodNumber;
1133
+ sha256: z.ZodString;
1134
+ }, "strict", z.ZodTypeAny, {
1135
+ type: "direct.complete";
1136
+ size: number;
1137
+ sha256: string;
1138
+ directSessionId: string;
1139
+ }, {
1140
+ type: "direct.complete";
1141
+ size: number;
1142
+ sha256: string;
1143
+ directSessionId: string;
1144
+ }>, z.ZodObject<{
1145
+ directSessionId: z.ZodString;
1146
+ } & {
1147
+ type: z.ZodLiteral<"direct.closed">;
1148
+ code: z.ZodString;
1149
+ }, "strict", z.ZodTypeAny, {
1150
+ code: string;
1151
+ type: "direct.closed";
1152
+ directSessionId: string;
1153
+ }, {
1154
+ code: string;
1155
+ type: "direct.closed";
1156
+ directSessionId: string;
1157
+ }>, z.ZodObject<{
1158
+ type: z.ZodLiteral<"direct.error">;
1159
+ requestId: z.ZodOptional<z.ZodString>;
1160
+ directSessionId: z.ZodOptional<z.ZodString>;
1161
+ code: z.ZodString;
1162
+ message: z.ZodString;
1163
+ }, "strict", z.ZodTypeAny, {
1164
+ code: string;
1165
+ message: string;
1166
+ type: "direct.error";
1167
+ requestId?: string | undefined;
1168
+ directSessionId?: string | undefined;
1169
+ }, {
1170
+ code: string;
1171
+ message: string;
1172
+ type: "direct.error";
1173
+ requestId?: string | undefined;
1174
+ directSessionId?: string | undefined;
1175
+ }>]>;
1176
+ export type DirectServerMessage = z.infer<typeof directServerMessageSchema>;
1177
+ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1178
+ type: z.ZodLiteral<"direct.prepare">;
1179
+ directSessionId: z.ZodString;
1180
+ workbenchConnectionId: z.ZodString;
1181
+ nodeGeneration: z.ZodString;
1182
+ purpose: z.ZodEnum<["PROBE", "TRANSFER"]>;
1183
+ expiresAt: z.ZodNumber;
1184
+ transfer: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1185
+ direction: z.ZodEnum<["UPLOAD", "DOWNLOAD"]>;
1186
+ resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1187
+ kind: z.ZodLiteral<"WORKSPACE_FILE">;
1188
+ workspaceId: z.ZodString;
1189
+ path: z.ZodString;
1190
+ worktreePath: z.ZodOptional<z.ZodString>;
1191
+ }, "strict", z.ZodTypeAny, {
1192
+ path: string;
1193
+ kind: "WORKSPACE_FILE";
1194
+ workspaceId: string;
1195
+ worktreePath?: string | undefined;
1196
+ }, {
1197
+ path: string;
1198
+ kind: "WORKSPACE_FILE";
1199
+ workspaceId: string;
1200
+ worktreePath?: string | undefined;
1201
+ }>, z.ZodObject<{
1202
+ kind: z.ZodLiteral<"GIT_COMMIT_BLOB">;
1203
+ workspaceId: z.ZodString;
1204
+ commit: z.ZodString;
1205
+ path: z.ZodString;
1206
+ repositoryPath: z.ZodOptional<z.ZodString>;
1207
+ worktreePath: z.ZodOptional<z.ZodString>;
1208
+ }, "strict", z.ZodTypeAny, {
1209
+ path: string;
1210
+ kind: "GIT_COMMIT_BLOB";
1211
+ workspaceId: string;
1212
+ commit: string;
1213
+ worktreePath?: string | undefined;
1214
+ repositoryPath?: string | undefined;
1215
+ }, {
1216
+ path: string;
1217
+ kind: "GIT_COMMIT_BLOB";
1218
+ workspaceId: string;
1219
+ commit: string;
1220
+ worktreePath?: string | undefined;
1221
+ repositoryPath?: string | undefined;
1222
+ }>]>;
1223
+ fileName: z.ZodString;
1224
+ size: z.ZodNumber;
1225
+ sha256: z.ZodString;
1226
+ overwrite: z.ZodOptional<z.ZodBoolean>;
1227
+ resumeOffset: z.ZodOptional<z.ZodNumber>;
1228
+ composerAttachment: z.ZodOptional<z.ZodObject<{
1229
+ id: z.ZodString;
1230
+ mime: z.ZodString;
1231
+ }, "strict", z.ZodTypeAny, {
1232
+ id: string;
1233
+ mime: string;
1234
+ }, {
1235
+ id: string;
1236
+ mime: string;
1237
+ }>>;
1238
+ }, "strict", z.ZodTypeAny, {
1239
+ direction: "UPLOAD" | "DOWNLOAD";
1240
+ resource: {
1241
+ path: string;
1242
+ kind: "WORKSPACE_FILE";
1243
+ workspaceId: string;
1244
+ worktreePath?: string | undefined;
1245
+ } | {
1246
+ path: string;
1247
+ kind: "GIT_COMMIT_BLOB";
1248
+ workspaceId: string;
1249
+ commit: string;
1250
+ worktreePath?: string | undefined;
1251
+ repositoryPath?: string | undefined;
1252
+ };
1253
+ fileName: string;
1254
+ size: number;
1255
+ sha256: string;
1256
+ overwrite?: boolean | undefined;
1257
+ resumeOffset?: number | undefined;
1258
+ composerAttachment?: {
1259
+ id: string;
1260
+ mime: string;
1261
+ } | undefined;
1262
+ }, {
1263
+ direction: "UPLOAD" | "DOWNLOAD";
1264
+ resource: {
1265
+ path: string;
1266
+ kind: "WORKSPACE_FILE";
1267
+ workspaceId: string;
1268
+ worktreePath?: string | undefined;
1269
+ } | {
1270
+ path: string;
1271
+ kind: "GIT_COMMIT_BLOB";
1272
+ workspaceId: string;
1273
+ commit: string;
1274
+ worktreePath?: string | undefined;
1275
+ repositoryPath?: string | undefined;
1276
+ };
1277
+ fileName: string;
1278
+ size: number;
1279
+ sha256: string;
1280
+ overwrite?: boolean | undefined;
1281
+ resumeOffset?: number | undefined;
1282
+ composerAttachment?: {
1283
+ id: string;
1284
+ mime: string;
1285
+ } | undefined;
1286
+ }>, {
1287
+ direction: "UPLOAD" | "DOWNLOAD";
1288
+ resource: {
1289
+ path: string;
1290
+ kind: "WORKSPACE_FILE";
1291
+ workspaceId: string;
1292
+ worktreePath?: string | undefined;
1293
+ } | {
1294
+ path: string;
1295
+ kind: "GIT_COMMIT_BLOB";
1296
+ workspaceId: string;
1297
+ commit: string;
1298
+ worktreePath?: string | undefined;
1299
+ repositoryPath?: string | undefined;
1300
+ };
1301
+ fileName: string;
1302
+ size: number;
1303
+ sha256: string;
1304
+ overwrite?: boolean | undefined;
1305
+ resumeOffset?: number | undefined;
1306
+ composerAttachment?: {
1307
+ id: string;
1308
+ mime: string;
1309
+ } | undefined;
1310
+ }, {
1311
+ direction: "UPLOAD" | "DOWNLOAD";
1312
+ resource: {
1313
+ path: string;
1314
+ kind: "WORKSPACE_FILE";
1315
+ workspaceId: string;
1316
+ worktreePath?: string | undefined;
1317
+ } | {
1318
+ path: string;
1319
+ kind: "GIT_COMMIT_BLOB";
1320
+ workspaceId: string;
1321
+ commit: string;
1322
+ worktreePath?: string | undefined;
1323
+ repositoryPath?: string | undefined;
1324
+ };
1325
+ fileName: string;
1326
+ size: number;
1327
+ sha256: string;
1328
+ overwrite?: boolean | undefined;
1329
+ resumeOffset?: number | undefined;
1330
+ composerAttachment?: {
1331
+ id: string;
1332
+ mime: string;
1333
+ } | undefined;
1334
+ }>>;
1335
+ userAuthorization: z.ZodUnknown;
1336
+ }, "strict", z.ZodTypeAny, {
1337
+ type: "direct.prepare";
1338
+ nodeGeneration: string;
1339
+ purpose: "PROBE" | "TRANSFER";
1340
+ directSessionId: string;
1341
+ expiresAt: number;
1342
+ workbenchConnectionId: string;
1343
+ transfer?: {
1344
+ direction: "UPLOAD" | "DOWNLOAD";
1345
+ resource: {
1346
+ path: string;
1347
+ kind: "WORKSPACE_FILE";
1348
+ workspaceId: string;
1349
+ worktreePath?: string | undefined;
1350
+ } | {
1351
+ path: string;
1352
+ kind: "GIT_COMMIT_BLOB";
1353
+ workspaceId: string;
1354
+ commit: string;
1355
+ worktreePath?: string | undefined;
1356
+ repositoryPath?: string | undefined;
1357
+ };
1358
+ fileName: string;
1359
+ size: number;
1360
+ sha256: string;
1361
+ overwrite?: boolean | undefined;
1362
+ resumeOffset?: number | undefined;
1363
+ composerAttachment?: {
1364
+ id: string;
1365
+ mime: string;
1366
+ } | undefined;
1367
+ } | undefined;
1368
+ userAuthorization?: unknown;
1369
+ }, {
1370
+ type: "direct.prepare";
1371
+ nodeGeneration: string;
1372
+ purpose: "PROBE" | "TRANSFER";
1373
+ directSessionId: string;
1374
+ expiresAt: number;
1375
+ workbenchConnectionId: string;
1376
+ transfer?: {
1377
+ direction: "UPLOAD" | "DOWNLOAD";
1378
+ resource: {
1379
+ path: string;
1380
+ kind: "WORKSPACE_FILE";
1381
+ workspaceId: string;
1382
+ worktreePath?: string | undefined;
1383
+ } | {
1384
+ path: string;
1385
+ kind: "GIT_COMMIT_BLOB";
1386
+ workspaceId: string;
1387
+ commit: string;
1388
+ worktreePath?: string | undefined;
1389
+ repositoryPath?: string | undefined;
1390
+ };
1391
+ fileName: string;
1392
+ size: number;
1393
+ sha256: string;
1394
+ overwrite?: boolean | undefined;
1395
+ resumeOffset?: number | undefined;
1396
+ composerAttachment?: {
1397
+ id: string;
1398
+ mime: string;
1399
+ } | undefined;
1400
+ } | undefined;
1401
+ userAuthorization?: unknown;
1402
+ }>, z.ZodObject<{
1403
+ directSessionId: z.ZodString;
1404
+ } & {
1405
+ type: z.ZodLiteral<"direct.signal">;
1406
+ signal: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1407
+ kind: z.ZodLiteral<"OFFER">;
1408
+ sdp: z.ZodString;
1409
+ fingerprint: z.ZodString;
1410
+ }, "strict", z.ZodTypeAny, {
1411
+ kind: "OFFER";
1412
+ sdp: string;
1413
+ fingerprint: string;
1414
+ }, {
1415
+ kind: "OFFER";
1416
+ sdp: string;
1417
+ fingerprint: string;
1418
+ }>, z.ZodObject<{
1419
+ kind: z.ZodLiteral<"ANSWER">;
1420
+ sdp: z.ZodString;
1421
+ fingerprint: z.ZodString;
1422
+ }, "strict", z.ZodTypeAny, {
1423
+ kind: "ANSWER";
1424
+ sdp: string;
1425
+ fingerprint: string;
1426
+ }, {
1427
+ kind: "ANSWER";
1428
+ sdp: string;
1429
+ fingerprint: string;
1430
+ }>, z.ZodObject<{
1431
+ kind: z.ZodLiteral<"CANDIDATE">;
1432
+ candidate: z.ZodObject<{
1433
+ candidate: z.ZodString;
1434
+ sdpMid: z.ZodNullable<z.ZodString>;
1435
+ sdpMLineIndex: z.ZodNullable<z.ZodNumber>;
1436
+ }, "strict", z.ZodTypeAny, {
1437
+ candidate: string;
1438
+ sdpMid: string | null;
1439
+ sdpMLineIndex: number | null;
1440
+ }, {
1441
+ candidate: string;
1442
+ sdpMid: string | null;
1443
+ sdpMLineIndex: number | null;
1444
+ }>;
1445
+ }, "strict", z.ZodTypeAny, {
1446
+ kind: "CANDIDATE";
1447
+ candidate: {
1448
+ candidate: string;
1449
+ sdpMid: string | null;
1450
+ sdpMLineIndex: number | null;
1451
+ };
1452
+ }, {
1453
+ kind: "CANDIDATE";
1454
+ candidate: {
1455
+ candidate: string;
1456
+ sdpMid: string | null;
1457
+ sdpMLineIndex: number | null;
1458
+ };
1459
+ }>, z.ZodObject<{
1460
+ kind: z.ZodLiteral<"END_OF_CANDIDATES">;
1461
+ }, "strict", z.ZodTypeAny, {
1462
+ kind: "END_OF_CANDIDATES";
1463
+ }, {
1464
+ kind: "END_OF_CANDIDATES";
1465
+ }>]>;
1466
+ }, "strict", z.ZodTypeAny, {
1467
+ type: "direct.signal";
1468
+ directSessionId: string;
1469
+ signal: {
1470
+ kind: "OFFER";
1471
+ sdp: string;
1472
+ fingerprint: string;
1473
+ } | {
1474
+ kind: "ANSWER";
1475
+ sdp: string;
1476
+ fingerprint: string;
1477
+ } | {
1478
+ kind: "CANDIDATE";
1479
+ candidate: {
1480
+ candidate: string;
1481
+ sdpMid: string | null;
1482
+ sdpMLineIndex: number | null;
1483
+ };
1484
+ } | {
1485
+ kind: "END_OF_CANDIDATES";
1486
+ };
1487
+ }, {
1488
+ type: "direct.signal";
1489
+ directSessionId: string;
1490
+ signal: {
1491
+ kind: "OFFER";
1492
+ sdp: string;
1493
+ fingerprint: string;
1494
+ } | {
1495
+ kind: "ANSWER";
1496
+ sdp: string;
1497
+ fingerprint: string;
1498
+ } | {
1499
+ kind: "CANDIDATE";
1500
+ candidate: {
1501
+ candidate: string;
1502
+ sdpMid: string | null;
1503
+ sdpMLineIndex: number | null;
1504
+ };
1505
+ } | {
1506
+ kind: "END_OF_CANDIDATES";
1507
+ };
1508
+ }>, z.ZodObject<{
1509
+ directSessionId: z.ZodString;
1510
+ } & {
1511
+ type: z.ZodLiteral<"direct.grant">;
1512
+ grant: z.ZodString;
1513
+ browserFingerprint: z.ZodString;
1514
+ nodeFingerprint: z.ZodString;
1515
+ openExpiresAt: z.ZodNumber;
1516
+ expiresAt: z.ZodNumber;
1517
+ }, "strict", z.ZodTypeAny, {
1518
+ type: "direct.grant";
1519
+ directSessionId: string;
1520
+ expiresAt: number;
1521
+ grant: string;
1522
+ openExpiresAt: number;
1523
+ browserFingerprint: string;
1524
+ nodeFingerprint: string;
1525
+ }, {
1526
+ type: "direct.grant";
1527
+ directSessionId: string;
1528
+ expiresAt: number;
1529
+ grant: string;
1530
+ openExpiresAt: number;
1531
+ browserFingerprint: string;
1532
+ nodeFingerprint: string;
1533
+ }>, z.ZodObject<{
1534
+ directSessionId: z.ZodString;
1535
+ } & {
1536
+ type: z.ZodLiteral<"direct.heartbeat">;
1537
+ }, "strict", z.ZodTypeAny, {
1538
+ type: "direct.heartbeat";
1539
+ directSessionId: string;
1540
+ }, {
1541
+ type: "direct.heartbeat";
1542
+ directSessionId: string;
1543
+ }>, z.ZodObject<{
1544
+ directSessionId: z.ZodString;
1545
+ } & {
1546
+ type: z.ZodLiteral<"direct.cancel">;
1547
+ code: z.ZodString;
1548
+ }, "strict", z.ZodTypeAny, {
1549
+ code: string;
1550
+ type: "direct.cancel";
1551
+ directSessionId: string;
1552
+ }, {
1553
+ code: string;
1554
+ type: "direct.cancel";
1555
+ directSessionId: string;
1556
+ }>]>;
1557
+ export type DirectNodeCommand = z.infer<typeof directNodeCommandSchema>;
1558
+ export declare const directNodeEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1559
+ directSessionId: z.ZodString;
1560
+ } & {
1561
+ type: z.ZodLiteral<"direct.signal">;
1562
+ signal: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1563
+ kind: z.ZodLiteral<"OFFER">;
1564
+ sdp: z.ZodString;
1565
+ fingerprint: z.ZodString;
1566
+ }, "strict", z.ZodTypeAny, {
1567
+ kind: "OFFER";
1568
+ sdp: string;
1569
+ fingerprint: string;
1570
+ }, {
1571
+ kind: "OFFER";
1572
+ sdp: string;
1573
+ fingerprint: string;
1574
+ }>, z.ZodObject<{
1575
+ kind: z.ZodLiteral<"ANSWER">;
1576
+ sdp: z.ZodString;
1577
+ fingerprint: z.ZodString;
1578
+ }, "strict", z.ZodTypeAny, {
1579
+ kind: "ANSWER";
1580
+ sdp: string;
1581
+ fingerprint: string;
1582
+ }, {
1583
+ kind: "ANSWER";
1584
+ sdp: string;
1585
+ fingerprint: string;
1586
+ }>, z.ZodObject<{
1587
+ kind: z.ZodLiteral<"CANDIDATE">;
1588
+ candidate: z.ZodObject<{
1589
+ candidate: z.ZodString;
1590
+ sdpMid: z.ZodNullable<z.ZodString>;
1591
+ sdpMLineIndex: z.ZodNullable<z.ZodNumber>;
1592
+ }, "strict", z.ZodTypeAny, {
1593
+ candidate: string;
1594
+ sdpMid: string | null;
1595
+ sdpMLineIndex: number | null;
1596
+ }, {
1597
+ candidate: string;
1598
+ sdpMid: string | null;
1599
+ sdpMLineIndex: number | null;
1600
+ }>;
1601
+ }, "strict", z.ZodTypeAny, {
1602
+ kind: "CANDIDATE";
1603
+ candidate: {
1604
+ candidate: string;
1605
+ sdpMid: string | null;
1606
+ sdpMLineIndex: number | null;
1607
+ };
1608
+ }, {
1609
+ kind: "CANDIDATE";
1610
+ candidate: {
1611
+ candidate: string;
1612
+ sdpMid: string | null;
1613
+ sdpMLineIndex: number | null;
1614
+ };
1615
+ }>, z.ZodObject<{
1616
+ kind: z.ZodLiteral<"END_OF_CANDIDATES">;
1617
+ }, "strict", z.ZodTypeAny, {
1618
+ kind: "END_OF_CANDIDATES";
1619
+ }, {
1620
+ kind: "END_OF_CANDIDATES";
1621
+ }>]>;
1622
+ }, "strict", z.ZodTypeAny, {
1623
+ type: "direct.signal";
1624
+ directSessionId: string;
1625
+ signal: {
1626
+ kind: "OFFER";
1627
+ sdp: string;
1628
+ fingerprint: string;
1629
+ } | {
1630
+ kind: "ANSWER";
1631
+ sdp: string;
1632
+ fingerprint: string;
1633
+ } | {
1634
+ kind: "CANDIDATE";
1635
+ candidate: {
1636
+ candidate: string;
1637
+ sdpMid: string | null;
1638
+ sdpMLineIndex: number | null;
1639
+ };
1640
+ } | {
1641
+ kind: "END_OF_CANDIDATES";
1642
+ };
1643
+ }, {
1644
+ type: "direct.signal";
1645
+ directSessionId: string;
1646
+ signal: {
1647
+ kind: "OFFER";
1648
+ sdp: string;
1649
+ fingerprint: string;
1650
+ } | {
1651
+ kind: "ANSWER";
1652
+ sdp: string;
1653
+ fingerprint: string;
1654
+ } | {
1655
+ kind: "CANDIDATE";
1656
+ candidate: {
1657
+ candidate: string;
1658
+ sdpMid: string | null;
1659
+ sdpMLineIndex: number | null;
1660
+ };
1661
+ } | {
1662
+ kind: "END_OF_CANDIDATES";
1663
+ };
1664
+ }>, z.ZodObject<{
1665
+ directSessionId: z.ZodString;
1666
+ } & {
1667
+ type: z.ZodLiteral<"direct.connected">;
1668
+ }, "strict", z.ZodTypeAny, {
1669
+ type: "direct.connected";
1670
+ directSessionId: string;
1671
+ }, {
1672
+ type: "direct.connected";
1673
+ directSessionId: string;
1674
+ }>, z.ZodObject<{
1675
+ directSessionId: z.ZodString;
1676
+ } & {
1677
+ type: z.ZodLiteral<"direct.probe-result">;
1678
+ result: z.ZodEnum<["DIRECT_AVAILABLE", "RELAY_ONLY"]>;
1679
+ routingHint: z.ZodOptional<z.ZodString>;
1680
+ }, "strict", z.ZodTypeAny, {
1681
+ type: "direct.probe-result";
1682
+ directSessionId: string;
1683
+ result: "DIRECT_AVAILABLE" | "RELAY_ONLY";
1684
+ routingHint?: string | undefined;
1685
+ }, {
1686
+ type: "direct.probe-result";
1687
+ directSessionId: string;
1688
+ result: "DIRECT_AVAILABLE" | "RELAY_ONLY";
1689
+ routingHint?: string | undefined;
1690
+ }>, z.ZodObject<{
1691
+ directSessionId: z.ZodString;
1692
+ } & {
1693
+ type: z.ZodLiteral<"direct.opened">;
1694
+ offset: z.ZodNumber;
1695
+ }, "strict", z.ZodTypeAny, {
1696
+ type: "direct.opened";
1697
+ directSessionId: string;
1698
+ offset: number;
1699
+ }, {
1700
+ type: "direct.opened";
1701
+ directSessionId: string;
1702
+ offset: number;
1703
+ }>, z.ZodObject<{
1704
+ directSessionId: z.ZodString;
1705
+ } & {
1706
+ type: z.ZodLiteral<"direct.complete">;
1707
+ size: z.ZodNumber;
1708
+ sha256: z.ZodString;
1709
+ }, "strict", z.ZodTypeAny, {
1710
+ type: "direct.complete";
1711
+ size: number;
1712
+ sha256: string;
1713
+ directSessionId: string;
1714
+ }, {
1715
+ type: "direct.complete";
1716
+ size: number;
1717
+ sha256: string;
1718
+ directSessionId: string;
1719
+ }>, z.ZodObject<{
1720
+ directSessionId: z.ZodString;
1721
+ } & {
1722
+ type: z.ZodLiteral<"direct.error">;
1723
+ code: z.ZodString;
1724
+ message: z.ZodString;
1725
+ }, "strict", z.ZodTypeAny, {
1726
+ code: string;
1727
+ message: string;
1728
+ type: "direct.error";
1729
+ directSessionId: string;
1730
+ }, {
1731
+ code: string;
1732
+ message: string;
1733
+ type: "direct.error";
1734
+ directSessionId: string;
1735
+ }>]>;
1736
+ export type DirectNodeEvent = z.infer<typeof directNodeEventSchema>;
1737
+ export declare const directDataOpenFrameSchema: z.ZodObject<{
1738
+ type: z.ZodLiteral<"OPEN">;
1739
+ directSessionId: z.ZodString;
1740
+ grant: z.ZodString;
1741
+ }, "strict", z.ZodTypeAny, {
1742
+ type: "OPEN";
1743
+ directSessionId: string;
1744
+ grant: string;
1745
+ }, {
1746
+ type: "OPEN";
1747
+ directSessionId: string;
1748
+ grant: string;
1749
+ }>;
1750
+ export declare const directDataAckFrameSchema: z.ZodObject<{
1751
+ type: z.ZodLiteral<"ACK">;
1752
+ offset: z.ZodNumber;
1753
+ }, "strict", z.ZodTypeAny, {
1754
+ type: "ACK";
1755
+ offset: number;
1756
+ }, {
1757
+ type: "ACK";
1758
+ offset: number;
1759
+ }>;
1760
+ export declare const directDataCompleteFrameSchema: z.ZodObject<{
1761
+ type: z.ZodLiteral<"COMPLETE">;
1762
+ size: z.ZodNumber;
1763
+ sha256: z.ZodString;
1764
+ }, "strict", z.ZodTypeAny, {
1765
+ type: "COMPLETE";
1766
+ size: number;
1767
+ sha256: string;
1768
+ }, {
1769
+ type: "COMPLETE";
1770
+ size: number;
1771
+ sha256: string;
1772
+ }>;
1773
+ export declare const directDataErrorFrameSchema: z.ZodObject<{
1774
+ type: z.ZodLiteral<"ERROR">;
1775
+ code: z.ZodString;
1776
+ }, "strict", z.ZodTypeAny, {
1777
+ code: string;
1778
+ type: "ERROR";
1779
+ }, {
1780
+ code: string;
1781
+ type: "ERROR";
1782
+ }>;
1783
+ export declare const directDataControlFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1784
+ type: z.ZodLiteral<"OPEN">;
1785
+ directSessionId: z.ZodString;
1786
+ grant: z.ZodString;
1787
+ }, "strict", z.ZodTypeAny, {
1788
+ type: "OPEN";
1789
+ directSessionId: string;
1790
+ grant: string;
1791
+ }, {
1792
+ type: "OPEN";
1793
+ directSessionId: string;
1794
+ grant: string;
1795
+ }>, z.ZodObject<{
1796
+ type: z.ZodLiteral<"ACK">;
1797
+ offset: z.ZodNumber;
1798
+ }, "strict", z.ZodTypeAny, {
1799
+ type: "ACK";
1800
+ offset: number;
1801
+ }, {
1802
+ type: "ACK";
1803
+ offset: number;
1804
+ }>, z.ZodObject<{
1805
+ type: z.ZodLiteral<"COMPLETE">;
1806
+ size: z.ZodNumber;
1807
+ sha256: z.ZodString;
1808
+ }, "strict", z.ZodTypeAny, {
1809
+ type: "COMPLETE";
1810
+ size: number;
1811
+ sha256: string;
1812
+ }, {
1813
+ type: "COMPLETE";
1814
+ size: number;
1815
+ sha256: string;
1816
+ }>, z.ZodObject<{
1817
+ type: z.ZodLiteral<"ERROR">;
1818
+ code: z.ZodString;
1819
+ }, "strict", z.ZodTypeAny, {
1820
+ code: string;
1821
+ type: "ERROR";
1822
+ }, {
1823
+ code: string;
1824
+ type: "ERROR";
1825
+ }>]>;
1826
+ export type DirectDataControlFrame = z.infer<typeof directDataControlFrameSchema>;