@myagentroam/protocol 0.9.68 → 0.9.70

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.
@@ -1,31 +1,32 @@
1
1
  import { z } from 'zod';
2
2
  export declare const workspaceDirectTransferCapabilitySchema: z.ZodObject<{
3
- apiVersion: z.ZodLiteral<1>;
4
- probe: z.ZodBoolean;
3
+ apiVersion: z.ZodLiteral<2>;
4
+ transport: z.ZodBoolean;
5
5
  upload: z.ZodBoolean;
6
6
  download: z.ZodBoolean;
7
+ range: z.ZodBoolean;
7
8
  gitCommitBlob: z.ZodBoolean;
8
9
  maxChunkBytes: z.ZodNumber;
9
10
  }, "strict", z.ZodTypeAny, {
10
- apiVersion: 1;
11
- probe: boolean;
11
+ apiVersion: 2;
12
+ transport: boolean;
12
13
  upload: boolean;
13
14
  download: boolean;
15
+ range: boolean;
14
16
  gitCommitBlob: boolean;
15
17
  maxChunkBytes: number;
16
18
  }, {
17
- apiVersion: 1;
18
- probe: boolean;
19
+ apiVersion: 2;
20
+ transport: boolean;
19
21
  upload: boolean;
20
22
  download: boolean;
23
+ range: boolean;
21
24
  gitCommitBlob: boolean;
22
25
  maxChunkBytes: number;
23
26
  }>;
24
27
  export type WorkspaceDirectTransferCapability = z.infer<typeof workspaceDirectTransferCapabilitySchema>;
25
- export declare const directTransferPurposeSchema: z.ZodEnum<["PROBE", "TRANSFER"]>;
28
+ export declare const directTransferPurposeSchema: z.ZodEnum<["TRANSPORT", "TRANSFER"]>;
26
29
  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
30
  export declare const directTransferResourceSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
30
31
  kind: z.ZodLiteral<"WORKSPACE_FILE">;
31
32
  workspaceId: z.ZodString;
@@ -64,8 +65,7 @@ export declare const directTransferResourceSchema: z.ZodDiscriminatedUnion<"kind
64
65
  repositoryPath?: string | undefined;
65
66
  }>]>;
66
67
  export type DirectTransferResource = z.infer<typeof directTransferResourceSchema>;
67
- export declare const directTransferDescriptorSchema: z.ZodEffects<z.ZodObject<{
68
- direction: z.ZodEnum<["UPLOAD", "DOWNLOAD"]>;
68
+ export declare const directTransferDescriptorSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
69
69
  resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
70
70
  kind: z.ZodLiteral<"WORKSPACE_FILE">;
71
71
  workspaceId: z.ZodString;
@@ -106,6 +106,8 @@ export declare const directTransferDescriptorSchema: z.ZodEffects<z.ZodObject<{
106
106
  fileName: z.ZodString;
107
107
  size: z.ZodNumber;
108
108
  sha256: z.ZodString;
109
+ } & {
110
+ direction: z.ZodLiteral<"UPLOAD">;
109
111
  overwrite: z.ZodOptional<z.ZodBoolean>;
110
112
  resumeOffset: z.ZodOptional<z.ZodNumber>;
111
113
  composerAttachment: z.ZodOptional<z.ZodObject<{
@@ -119,7 +121,6 @@ export declare const directTransferDescriptorSchema: z.ZodEffects<z.ZodObject<{
119
121
  mime: string;
120
122
  }>>;
121
123
  }, "strict", z.ZodTypeAny, {
122
- direction: "UPLOAD" | "DOWNLOAD";
123
124
  resource: {
124
125
  path: string;
125
126
  kind: "WORKSPACE_FILE";
@@ -136,6 +137,7 @@ export declare const directTransferDescriptorSchema: z.ZodEffects<z.ZodObject<{
136
137
  fileName: string;
137
138
  size: number;
138
139
  sha256: string;
140
+ direction: "UPLOAD";
139
141
  overwrite?: boolean | undefined;
140
142
  resumeOffset?: number | undefined;
141
143
  composerAttachment?: {
@@ -143,7 +145,6 @@ export declare const directTransferDescriptorSchema: z.ZodEffects<z.ZodObject<{
143
145
  mime: string;
144
146
  } | undefined;
145
147
  }, {
146
- direction: "UPLOAD" | "DOWNLOAD";
147
148
  resource: {
148
149
  path: string;
149
150
  kind: "WORKSPACE_FILE";
@@ -160,6 +161,7 @@ export declare const directTransferDescriptorSchema: z.ZodEffects<z.ZodObject<{
160
161
  fileName: string;
161
162
  size: number;
162
163
  sha256: string;
164
+ direction: "UPLOAD";
163
165
  overwrite?: boolean | undefined;
164
166
  resumeOffset?: number | undefined;
165
167
  composerAttachment?: {
@@ -167,7 +169,6 @@ export declare const directTransferDescriptorSchema: z.ZodEffects<z.ZodObject<{
167
169
  mime: string;
168
170
  } | undefined;
169
171
  }>, {
170
- direction: "UPLOAD" | "DOWNLOAD";
171
172
  resource: {
172
173
  path: string;
173
174
  kind: "WORKSPACE_FILE";
@@ -184,6 +185,7 @@ export declare const directTransferDescriptorSchema: z.ZodEffects<z.ZodObject<{
184
185
  fileName: string;
185
186
  size: number;
186
187
  sha256: string;
188
+ direction: "UPLOAD";
187
189
  overwrite?: boolean | undefined;
188
190
  resumeOffset?: number | undefined;
189
191
  composerAttachment?: {
@@ -191,7 +193,6 @@ export declare const directTransferDescriptorSchema: z.ZodEffects<z.ZodObject<{
191
193
  mime: string;
192
194
  } | undefined;
193
195
  }, {
194
- direction: "UPLOAD" | "DOWNLOAD";
195
196
  resource: {
196
197
  path: string;
197
198
  kind: "WORKSPACE_FILE";
@@ -208,13 +209,167 @@ export declare const directTransferDescriptorSchema: z.ZodEffects<z.ZodObject<{
208
209
  fileName: string;
209
210
  size: number;
210
211
  sha256: string;
212
+ direction: "UPLOAD";
211
213
  overwrite?: boolean | undefined;
212
214
  resumeOffset?: number | undefined;
213
215
  composerAttachment?: {
214
216
  id: string;
215
217
  mime: string;
216
218
  } | undefined;
217
- }>;
219
+ }>, z.ZodEffects<z.ZodObject<{
220
+ resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
221
+ kind: z.ZodLiteral<"WORKSPACE_FILE">;
222
+ workspaceId: z.ZodString;
223
+ path: z.ZodString;
224
+ worktreePath: z.ZodOptional<z.ZodString>;
225
+ }, "strict", z.ZodTypeAny, {
226
+ path: string;
227
+ kind: "WORKSPACE_FILE";
228
+ workspaceId: string;
229
+ worktreePath?: string | undefined;
230
+ }, {
231
+ path: string;
232
+ kind: "WORKSPACE_FILE";
233
+ workspaceId: string;
234
+ worktreePath?: string | undefined;
235
+ }>, z.ZodObject<{
236
+ kind: z.ZodLiteral<"GIT_COMMIT_BLOB">;
237
+ workspaceId: z.ZodString;
238
+ commit: z.ZodString;
239
+ path: z.ZodString;
240
+ repositoryPath: z.ZodOptional<z.ZodString>;
241
+ worktreePath: z.ZodOptional<z.ZodString>;
242
+ }, "strict", z.ZodTypeAny, {
243
+ path: string;
244
+ kind: "GIT_COMMIT_BLOB";
245
+ workspaceId: string;
246
+ commit: string;
247
+ worktreePath?: string | undefined;
248
+ repositoryPath?: string | undefined;
249
+ }, {
250
+ path: string;
251
+ kind: "GIT_COMMIT_BLOB";
252
+ workspaceId: string;
253
+ commit: string;
254
+ worktreePath?: string | undefined;
255
+ repositoryPath?: string | undefined;
256
+ }>]>;
257
+ fileName: z.ZodString;
258
+ size: z.ZodNumber;
259
+ sha256: z.ZodString;
260
+ } & {
261
+ direction: z.ZodLiteral<"DOWNLOAD">;
262
+ revision: z.ZodString;
263
+ range: z.ZodOptional<z.ZodObject<{
264
+ offset: z.ZodNumber;
265
+ length: z.ZodNumber;
266
+ sha256: z.ZodString;
267
+ }, "strict", z.ZodTypeAny, {
268
+ length: number;
269
+ sha256: string;
270
+ offset: number;
271
+ }, {
272
+ length: number;
273
+ sha256: string;
274
+ offset: number;
275
+ }>>;
276
+ }, "strict", z.ZodTypeAny, {
277
+ resource: {
278
+ path: string;
279
+ kind: "WORKSPACE_FILE";
280
+ workspaceId: string;
281
+ worktreePath?: string | undefined;
282
+ } | {
283
+ path: string;
284
+ kind: "GIT_COMMIT_BLOB";
285
+ workspaceId: string;
286
+ commit: string;
287
+ worktreePath?: string | undefined;
288
+ repositoryPath?: string | undefined;
289
+ };
290
+ fileName: string;
291
+ size: number;
292
+ sha256: string;
293
+ direction: "DOWNLOAD";
294
+ revision: string;
295
+ range?: {
296
+ length: number;
297
+ sha256: string;
298
+ offset: number;
299
+ } | undefined;
300
+ }, {
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
+ direction: "DOWNLOAD";
318
+ revision: string;
319
+ range?: {
320
+ length: number;
321
+ sha256: string;
322
+ offset: number;
323
+ } | undefined;
324
+ }>, {
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
+ direction: "DOWNLOAD";
342
+ revision: string;
343
+ range?: {
344
+ length: number;
345
+ sha256: string;
346
+ offset: number;
347
+ } | undefined;
348
+ }, {
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
+ direction: "DOWNLOAD";
366
+ revision: string;
367
+ range?: {
368
+ length: number;
369
+ sha256: string;
370
+ offset: number;
371
+ } | undefined;
372
+ }>]>;
218
373
  export type DirectTransferDescriptor = z.infer<typeof directTransferDescriptorSchema>;
219
374
  export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpose", [z.ZodObject<{
220
375
  type: z.ZodLiteral<"direct.prepare">;
@@ -222,19 +377,19 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
222
377
  nodeId: z.ZodString;
223
378
  nodeGeneration: z.ZodString;
224
379
  } & {
225
- purpose: z.ZodLiteral<"PROBE">;
380
+ purpose: z.ZodLiteral<"TRANSPORT">;
226
381
  }, "strict", z.ZodTypeAny, {
227
382
  type: "direct.prepare";
228
383
  requestId: string;
229
384
  nodeId: string;
230
385
  nodeGeneration: string;
231
- purpose: "PROBE";
386
+ purpose: "TRANSPORT";
232
387
  }, {
233
388
  type: "direct.prepare";
234
389
  requestId: string;
235
390
  nodeId: string;
236
391
  nodeGeneration: string;
237
- purpose: "PROBE";
392
+ purpose: "TRANSPORT";
238
393
  }>, z.ZodObject<{
239
394
  type: z.ZodLiteral<"direct.prepare">;
240
395
  requestId: z.ZodString;
@@ -242,8 +397,8 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
242
397
  nodeGeneration: z.ZodString;
243
398
  } & {
244
399
  purpose: z.ZodLiteral<"TRANSFER">;
245
- transfer: z.ZodEffects<z.ZodObject<{
246
- direction: z.ZodEnum<["UPLOAD", "DOWNLOAD"]>;
400
+ transportSessionId: z.ZodString;
401
+ transfer: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
247
402
  resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
248
403
  kind: z.ZodLiteral<"WORKSPACE_FILE">;
249
404
  workspaceId: z.ZodString;
@@ -284,6 +439,8 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
284
439
  fileName: z.ZodString;
285
440
  size: z.ZodNumber;
286
441
  sha256: z.ZodString;
442
+ } & {
443
+ direction: z.ZodLiteral<"UPLOAD">;
287
444
  overwrite: z.ZodOptional<z.ZodBoolean>;
288
445
  resumeOffset: z.ZodOptional<z.ZodNumber>;
289
446
  composerAttachment: z.ZodOptional<z.ZodObject<{
@@ -297,7 +454,6 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
297
454
  mime: string;
298
455
  }>>;
299
456
  }, "strict", z.ZodTypeAny, {
300
- direction: "UPLOAD" | "DOWNLOAD";
301
457
  resource: {
302
458
  path: string;
303
459
  kind: "WORKSPACE_FILE";
@@ -314,6 +470,7 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
314
470
  fileName: string;
315
471
  size: number;
316
472
  sha256: string;
473
+ direction: "UPLOAD";
317
474
  overwrite?: boolean | undefined;
318
475
  resumeOffset?: number | undefined;
319
476
  composerAttachment?: {
@@ -321,7 +478,6 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
321
478
  mime: string;
322
479
  } | undefined;
323
480
  }, {
324
- direction: "UPLOAD" | "DOWNLOAD";
325
481
  resource: {
326
482
  path: string;
327
483
  kind: "WORKSPACE_FILE";
@@ -338,6 +494,7 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
338
494
  fileName: string;
339
495
  size: number;
340
496
  sha256: string;
497
+ direction: "UPLOAD";
341
498
  overwrite?: boolean | undefined;
342
499
  resumeOffset?: number | undefined;
343
500
  composerAttachment?: {
@@ -345,7 +502,6 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
345
502
  mime: string;
346
503
  } | undefined;
347
504
  }>, {
348
- direction: "UPLOAD" | "DOWNLOAD";
349
505
  resource: {
350
506
  path: string;
351
507
  kind: "WORKSPACE_FILE";
@@ -362,6 +518,7 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
362
518
  fileName: string;
363
519
  size: number;
364
520
  sha256: string;
521
+ direction: "UPLOAD";
365
522
  overwrite?: boolean | undefined;
366
523
  resumeOffset?: number | undefined;
367
524
  composerAttachment?: {
@@ -369,7 +526,6 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
369
526
  mime: string;
370
527
  } | undefined;
371
528
  }, {
372
- direction: "UPLOAD" | "DOWNLOAD";
373
529
  resource: {
374
530
  path: string;
375
531
  kind: "WORKSPACE_FILE";
@@ -386,21 +542,175 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
386
542
  fileName: string;
387
543
  size: number;
388
544
  sha256: string;
545
+ direction: "UPLOAD";
389
546
  overwrite?: boolean | undefined;
390
547
  resumeOffset?: number | undefined;
391
548
  composerAttachment?: {
392
549
  id: string;
393
550
  mime: string;
394
551
  } | undefined;
395
- }>;
552
+ }>, z.ZodEffects<z.ZodObject<{
553
+ resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
554
+ kind: z.ZodLiteral<"WORKSPACE_FILE">;
555
+ workspaceId: z.ZodString;
556
+ path: z.ZodString;
557
+ worktreePath: z.ZodOptional<z.ZodString>;
558
+ }, "strict", z.ZodTypeAny, {
559
+ path: string;
560
+ kind: "WORKSPACE_FILE";
561
+ workspaceId: string;
562
+ worktreePath?: string | undefined;
563
+ }, {
564
+ path: string;
565
+ kind: "WORKSPACE_FILE";
566
+ workspaceId: string;
567
+ worktreePath?: string | undefined;
568
+ }>, z.ZodObject<{
569
+ kind: z.ZodLiteral<"GIT_COMMIT_BLOB">;
570
+ workspaceId: z.ZodString;
571
+ commit: z.ZodString;
572
+ path: z.ZodString;
573
+ repositoryPath: z.ZodOptional<z.ZodString>;
574
+ worktreePath: z.ZodOptional<z.ZodString>;
575
+ }, "strict", z.ZodTypeAny, {
576
+ path: string;
577
+ kind: "GIT_COMMIT_BLOB";
578
+ workspaceId: string;
579
+ commit: string;
580
+ worktreePath?: string | undefined;
581
+ repositoryPath?: string | undefined;
582
+ }, {
583
+ path: string;
584
+ kind: "GIT_COMMIT_BLOB";
585
+ workspaceId: string;
586
+ commit: string;
587
+ worktreePath?: string | undefined;
588
+ repositoryPath?: string | undefined;
589
+ }>]>;
590
+ fileName: z.ZodString;
591
+ size: z.ZodNumber;
592
+ sha256: z.ZodString;
593
+ } & {
594
+ direction: z.ZodLiteral<"DOWNLOAD">;
595
+ revision: z.ZodString;
596
+ range: z.ZodOptional<z.ZodObject<{
597
+ offset: z.ZodNumber;
598
+ length: z.ZodNumber;
599
+ sha256: z.ZodString;
600
+ }, "strict", z.ZodTypeAny, {
601
+ length: number;
602
+ sha256: string;
603
+ offset: number;
604
+ }, {
605
+ length: number;
606
+ sha256: string;
607
+ offset: number;
608
+ }>>;
609
+ }, "strict", z.ZodTypeAny, {
610
+ resource: {
611
+ path: string;
612
+ kind: "WORKSPACE_FILE";
613
+ workspaceId: string;
614
+ worktreePath?: string | undefined;
615
+ } | {
616
+ path: string;
617
+ kind: "GIT_COMMIT_BLOB";
618
+ workspaceId: string;
619
+ commit: string;
620
+ worktreePath?: string | undefined;
621
+ repositoryPath?: string | undefined;
622
+ };
623
+ fileName: string;
624
+ size: number;
625
+ sha256: string;
626
+ direction: "DOWNLOAD";
627
+ revision: string;
628
+ range?: {
629
+ length: number;
630
+ sha256: string;
631
+ offset: number;
632
+ } | undefined;
633
+ }, {
634
+ resource: {
635
+ path: string;
636
+ kind: "WORKSPACE_FILE";
637
+ workspaceId: string;
638
+ worktreePath?: string | undefined;
639
+ } | {
640
+ path: string;
641
+ kind: "GIT_COMMIT_BLOB";
642
+ workspaceId: string;
643
+ commit: string;
644
+ worktreePath?: string | undefined;
645
+ repositoryPath?: string | undefined;
646
+ };
647
+ fileName: string;
648
+ size: number;
649
+ sha256: string;
650
+ direction: "DOWNLOAD";
651
+ revision: string;
652
+ range?: {
653
+ length: number;
654
+ sha256: string;
655
+ offset: number;
656
+ } | undefined;
657
+ }>, {
658
+ resource: {
659
+ path: string;
660
+ kind: "WORKSPACE_FILE";
661
+ workspaceId: string;
662
+ worktreePath?: string | undefined;
663
+ } | {
664
+ path: string;
665
+ kind: "GIT_COMMIT_BLOB";
666
+ workspaceId: string;
667
+ commit: string;
668
+ worktreePath?: string | undefined;
669
+ repositoryPath?: string | undefined;
670
+ };
671
+ fileName: string;
672
+ size: number;
673
+ sha256: string;
674
+ direction: "DOWNLOAD";
675
+ revision: string;
676
+ range?: {
677
+ length: number;
678
+ sha256: string;
679
+ offset: number;
680
+ } | undefined;
681
+ }, {
682
+ resource: {
683
+ path: string;
684
+ kind: "WORKSPACE_FILE";
685
+ workspaceId: string;
686
+ worktreePath?: string | undefined;
687
+ } | {
688
+ path: string;
689
+ kind: "GIT_COMMIT_BLOB";
690
+ workspaceId: string;
691
+ commit: string;
692
+ worktreePath?: string | undefined;
693
+ repositoryPath?: string | undefined;
694
+ };
695
+ fileName: string;
696
+ size: number;
697
+ sha256: string;
698
+ direction: "DOWNLOAD";
699
+ revision: string;
700
+ range?: {
701
+ length: number;
702
+ sha256: string;
703
+ offset: number;
704
+ } | undefined;
705
+ }>]>;
396
706
  }, "strict", z.ZodTypeAny, {
397
707
  type: "direct.prepare";
398
708
  requestId: string;
399
709
  nodeId: string;
400
710
  nodeGeneration: string;
401
711
  purpose: "TRANSFER";
712
+ transportSessionId: string;
402
713
  transfer: {
403
- direction: "UPLOAD" | "DOWNLOAD";
404
714
  resource: {
405
715
  path: string;
406
716
  kind: "WORKSPACE_FILE";
@@ -417,12 +727,37 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
417
727
  fileName: string;
418
728
  size: number;
419
729
  sha256: string;
730
+ direction: "UPLOAD";
420
731
  overwrite?: boolean | undefined;
421
732
  resumeOffset?: number | undefined;
422
733
  composerAttachment?: {
423
734
  id: string;
424
735
  mime: string;
425
736
  } | undefined;
737
+ } | {
738
+ resource: {
739
+ path: string;
740
+ kind: "WORKSPACE_FILE";
741
+ workspaceId: string;
742
+ worktreePath?: string | undefined;
743
+ } | {
744
+ path: string;
745
+ kind: "GIT_COMMIT_BLOB";
746
+ workspaceId: string;
747
+ commit: string;
748
+ worktreePath?: string | undefined;
749
+ repositoryPath?: string | undefined;
750
+ };
751
+ fileName: string;
752
+ size: number;
753
+ sha256: string;
754
+ direction: "DOWNLOAD";
755
+ revision: string;
756
+ range?: {
757
+ length: number;
758
+ sha256: string;
759
+ offset: number;
760
+ } | undefined;
426
761
  };
427
762
  }, {
428
763
  type: "direct.prepare";
@@ -430,8 +765,8 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
430
765
  nodeId: string;
431
766
  nodeGeneration: string;
432
767
  purpose: "TRANSFER";
768
+ transportSessionId: string;
433
769
  transfer: {
434
- direction: "UPLOAD" | "DOWNLOAD";
435
770
  resource: {
436
771
  path: string;
437
772
  kind: "WORKSPACE_FILE";
@@ -448,12 +783,37 @@ export declare const directPrepareRequestSchema: z.ZodDiscriminatedUnion<"purpos
448
783
  fileName: string;
449
784
  size: number;
450
785
  sha256: string;
786
+ direction: "UPLOAD";
451
787
  overwrite?: boolean | undefined;
452
788
  resumeOffset?: number | undefined;
453
789
  composerAttachment?: {
454
790
  id: string;
455
791
  mime: string;
456
792
  } | undefined;
793
+ } | {
794
+ resource: {
795
+ path: string;
796
+ kind: "WORKSPACE_FILE";
797
+ workspaceId: string;
798
+ worktreePath?: string | undefined;
799
+ } | {
800
+ path: string;
801
+ kind: "GIT_COMMIT_BLOB";
802
+ workspaceId: string;
803
+ commit: string;
804
+ worktreePath?: string | undefined;
805
+ repositoryPath?: string | undefined;
806
+ };
807
+ fileName: string;
808
+ size: number;
809
+ sha256: string;
810
+ direction: "DOWNLOAD";
811
+ revision: string;
812
+ range?: {
813
+ length: number;
814
+ sha256: string;
815
+ offset: number;
816
+ } | undefined;
457
817
  };
458
818
  }>]>;
459
819
  export type DirectPrepareRequest = z.infer<typeof directPrepareRequestSchema>;
@@ -538,19 +898,19 @@ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedU
538
898
  nodeId: z.ZodString;
539
899
  nodeGeneration: z.ZodString;
540
900
  } & {
541
- purpose: z.ZodLiteral<"PROBE">;
901
+ purpose: z.ZodLiteral<"TRANSPORT">;
542
902
  }, "strict", z.ZodTypeAny, {
543
903
  type: "direct.prepare";
544
904
  requestId: string;
545
905
  nodeId: string;
546
906
  nodeGeneration: string;
547
- purpose: "PROBE";
907
+ purpose: "TRANSPORT";
548
908
  }, {
549
909
  type: "direct.prepare";
550
910
  requestId: string;
551
911
  nodeId: string;
552
912
  nodeGeneration: string;
553
- purpose: "PROBE";
913
+ purpose: "TRANSPORT";
554
914
  }>, z.ZodObject<{
555
915
  type: z.ZodLiteral<"direct.prepare">;
556
916
  requestId: z.ZodString;
@@ -558,8 +918,8 @@ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedU
558
918
  nodeGeneration: z.ZodString;
559
919
  } & {
560
920
  purpose: z.ZodLiteral<"TRANSFER">;
561
- transfer: z.ZodEffects<z.ZodObject<{
562
- direction: z.ZodEnum<["UPLOAD", "DOWNLOAD"]>;
921
+ transportSessionId: z.ZodString;
922
+ transfer: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
563
923
  resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
564
924
  kind: z.ZodLiteral<"WORKSPACE_FILE">;
565
925
  workspaceId: z.ZodString;
@@ -600,6 +960,8 @@ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedU
600
960
  fileName: z.ZodString;
601
961
  size: z.ZodNumber;
602
962
  sha256: z.ZodString;
963
+ } & {
964
+ direction: z.ZodLiteral<"UPLOAD">;
603
965
  overwrite: z.ZodOptional<z.ZodBoolean>;
604
966
  resumeOffset: z.ZodOptional<z.ZodNumber>;
605
967
  composerAttachment: z.ZodOptional<z.ZodObject<{
@@ -613,7 +975,6 @@ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedU
613
975
  mime: string;
614
976
  }>>;
615
977
  }, "strict", z.ZodTypeAny, {
616
- direction: "UPLOAD" | "DOWNLOAD";
617
978
  resource: {
618
979
  path: string;
619
980
  kind: "WORKSPACE_FILE";
@@ -630,6 +991,7 @@ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedU
630
991
  fileName: string;
631
992
  size: number;
632
993
  sha256: string;
994
+ direction: "UPLOAD";
633
995
  overwrite?: boolean | undefined;
634
996
  resumeOffset?: number | undefined;
635
997
  composerAttachment?: {
@@ -637,7 +999,6 @@ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedU
637
999
  mime: string;
638
1000
  } | undefined;
639
1001
  }, {
640
- direction: "UPLOAD" | "DOWNLOAD";
641
1002
  resource: {
642
1003
  path: string;
643
1004
  kind: "WORKSPACE_FILE";
@@ -654,14 +1015,223 @@ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedU
654
1015
  fileName: string;
655
1016
  size: number;
656
1017
  sha256: string;
1018
+ direction: "UPLOAD";
1019
+ overwrite?: boolean | undefined;
1020
+ resumeOffset?: number | undefined;
1021
+ composerAttachment?: {
1022
+ id: string;
1023
+ mime: string;
1024
+ } | undefined;
1025
+ }>, {
1026
+ resource: {
1027
+ path: string;
1028
+ kind: "WORKSPACE_FILE";
1029
+ workspaceId: string;
1030
+ worktreePath?: string | undefined;
1031
+ } | {
1032
+ path: string;
1033
+ kind: "GIT_COMMIT_BLOB";
1034
+ workspaceId: string;
1035
+ commit: string;
1036
+ worktreePath?: string | undefined;
1037
+ repositoryPath?: string | undefined;
1038
+ };
1039
+ fileName: string;
1040
+ size: number;
1041
+ sha256: string;
1042
+ direction: "UPLOAD";
657
1043
  overwrite?: boolean | undefined;
658
1044
  resumeOffset?: number | undefined;
659
1045
  composerAttachment?: {
660
1046
  id: string;
661
1047
  mime: string;
662
1048
  } | undefined;
663
- }>, {
664
- direction: "UPLOAD" | "DOWNLOAD";
1049
+ }, {
1050
+ resource: {
1051
+ path: string;
1052
+ kind: "WORKSPACE_FILE";
1053
+ workspaceId: string;
1054
+ worktreePath?: string | undefined;
1055
+ } | {
1056
+ path: string;
1057
+ kind: "GIT_COMMIT_BLOB";
1058
+ workspaceId: string;
1059
+ commit: string;
1060
+ worktreePath?: string | undefined;
1061
+ repositoryPath?: string | undefined;
1062
+ };
1063
+ fileName: string;
1064
+ size: number;
1065
+ sha256: string;
1066
+ direction: "UPLOAD";
1067
+ overwrite?: boolean | undefined;
1068
+ resumeOffset?: number | undefined;
1069
+ composerAttachment?: {
1070
+ id: string;
1071
+ mime: string;
1072
+ } | undefined;
1073
+ }>, z.ZodEffects<z.ZodObject<{
1074
+ resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1075
+ kind: z.ZodLiteral<"WORKSPACE_FILE">;
1076
+ workspaceId: z.ZodString;
1077
+ path: z.ZodString;
1078
+ worktreePath: z.ZodOptional<z.ZodString>;
1079
+ }, "strict", z.ZodTypeAny, {
1080
+ path: string;
1081
+ kind: "WORKSPACE_FILE";
1082
+ workspaceId: string;
1083
+ worktreePath?: string | undefined;
1084
+ }, {
1085
+ path: string;
1086
+ kind: "WORKSPACE_FILE";
1087
+ workspaceId: string;
1088
+ worktreePath?: string | undefined;
1089
+ }>, z.ZodObject<{
1090
+ kind: z.ZodLiteral<"GIT_COMMIT_BLOB">;
1091
+ workspaceId: z.ZodString;
1092
+ commit: z.ZodString;
1093
+ path: z.ZodString;
1094
+ repositoryPath: z.ZodOptional<z.ZodString>;
1095
+ worktreePath: z.ZodOptional<z.ZodString>;
1096
+ }, "strict", z.ZodTypeAny, {
1097
+ path: string;
1098
+ kind: "GIT_COMMIT_BLOB";
1099
+ workspaceId: string;
1100
+ commit: string;
1101
+ worktreePath?: string | undefined;
1102
+ repositoryPath?: string | undefined;
1103
+ }, {
1104
+ path: string;
1105
+ kind: "GIT_COMMIT_BLOB";
1106
+ workspaceId: string;
1107
+ commit: string;
1108
+ worktreePath?: string | undefined;
1109
+ repositoryPath?: string | undefined;
1110
+ }>]>;
1111
+ fileName: z.ZodString;
1112
+ size: z.ZodNumber;
1113
+ sha256: z.ZodString;
1114
+ } & {
1115
+ direction: z.ZodLiteral<"DOWNLOAD">;
1116
+ revision: z.ZodString;
1117
+ range: z.ZodOptional<z.ZodObject<{
1118
+ offset: z.ZodNumber;
1119
+ length: z.ZodNumber;
1120
+ sha256: z.ZodString;
1121
+ }, "strict", z.ZodTypeAny, {
1122
+ length: number;
1123
+ sha256: string;
1124
+ offset: number;
1125
+ }, {
1126
+ length: number;
1127
+ sha256: string;
1128
+ offset: number;
1129
+ }>>;
1130
+ }, "strict", z.ZodTypeAny, {
1131
+ resource: {
1132
+ path: string;
1133
+ kind: "WORKSPACE_FILE";
1134
+ workspaceId: string;
1135
+ worktreePath?: string | undefined;
1136
+ } | {
1137
+ path: string;
1138
+ kind: "GIT_COMMIT_BLOB";
1139
+ workspaceId: string;
1140
+ commit: string;
1141
+ worktreePath?: string | undefined;
1142
+ repositoryPath?: string | undefined;
1143
+ };
1144
+ fileName: string;
1145
+ size: number;
1146
+ sha256: string;
1147
+ direction: "DOWNLOAD";
1148
+ revision: string;
1149
+ range?: {
1150
+ length: number;
1151
+ sha256: string;
1152
+ offset: number;
1153
+ } | undefined;
1154
+ }, {
1155
+ resource: {
1156
+ path: string;
1157
+ kind: "WORKSPACE_FILE";
1158
+ workspaceId: string;
1159
+ worktreePath?: string | undefined;
1160
+ } | {
1161
+ path: string;
1162
+ kind: "GIT_COMMIT_BLOB";
1163
+ workspaceId: string;
1164
+ commit: string;
1165
+ worktreePath?: string | undefined;
1166
+ repositoryPath?: string | undefined;
1167
+ };
1168
+ fileName: string;
1169
+ size: number;
1170
+ sha256: string;
1171
+ direction: "DOWNLOAD";
1172
+ revision: string;
1173
+ range?: {
1174
+ length: number;
1175
+ sha256: string;
1176
+ offset: number;
1177
+ } | undefined;
1178
+ }>, {
1179
+ resource: {
1180
+ path: string;
1181
+ kind: "WORKSPACE_FILE";
1182
+ workspaceId: string;
1183
+ worktreePath?: string | undefined;
1184
+ } | {
1185
+ path: string;
1186
+ kind: "GIT_COMMIT_BLOB";
1187
+ workspaceId: string;
1188
+ commit: string;
1189
+ worktreePath?: string | undefined;
1190
+ repositoryPath?: string | undefined;
1191
+ };
1192
+ fileName: string;
1193
+ size: number;
1194
+ sha256: string;
1195
+ direction: "DOWNLOAD";
1196
+ revision: string;
1197
+ range?: {
1198
+ length: number;
1199
+ sha256: string;
1200
+ offset: number;
1201
+ } | undefined;
1202
+ }, {
1203
+ resource: {
1204
+ path: string;
1205
+ kind: "WORKSPACE_FILE";
1206
+ workspaceId: string;
1207
+ worktreePath?: string | undefined;
1208
+ } | {
1209
+ path: string;
1210
+ kind: "GIT_COMMIT_BLOB";
1211
+ workspaceId: string;
1212
+ commit: string;
1213
+ worktreePath?: string | undefined;
1214
+ repositoryPath?: string | undefined;
1215
+ };
1216
+ fileName: string;
1217
+ size: number;
1218
+ sha256: string;
1219
+ direction: "DOWNLOAD";
1220
+ revision: string;
1221
+ range?: {
1222
+ length: number;
1223
+ sha256: string;
1224
+ offset: number;
1225
+ } | undefined;
1226
+ }>]>;
1227
+ }, "strict", z.ZodTypeAny, {
1228
+ type: "direct.prepare";
1229
+ requestId: string;
1230
+ nodeId: string;
1231
+ nodeGeneration: string;
1232
+ purpose: "TRANSFER";
1233
+ transportSessionId: string;
1234
+ transfer: {
665
1235
  resource: {
666
1236
  path: string;
667
1237
  kind: "WORKSPACE_FILE";
@@ -678,14 +1248,14 @@ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedU
678
1248
  fileName: string;
679
1249
  size: number;
680
1250
  sha256: string;
1251
+ direction: "UPLOAD";
681
1252
  overwrite?: boolean | undefined;
682
1253
  resumeOffset?: number | undefined;
683
1254
  composerAttachment?: {
684
1255
  id: string;
685
1256
  mime: string;
686
1257
  } | undefined;
687
- }, {
688
- direction: "UPLOAD" | "DOWNLOAD";
1258
+ } | {
689
1259
  resource: {
690
1260
  path: string;
691
1261
  kind: "WORKSPACE_FILE";
@@ -702,21 +1272,22 @@ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedU
702
1272
  fileName: string;
703
1273
  size: number;
704
1274
  sha256: string;
705
- overwrite?: boolean | undefined;
706
- resumeOffset?: number | undefined;
707
- composerAttachment?: {
708
- id: string;
709
- mime: string;
1275
+ direction: "DOWNLOAD";
1276
+ revision: string;
1277
+ range?: {
1278
+ length: number;
1279
+ sha256: string;
1280
+ offset: number;
710
1281
  } | undefined;
711
- }>;
712
- }, "strict", z.ZodTypeAny, {
1282
+ };
1283
+ }, {
713
1284
  type: "direct.prepare";
714
1285
  requestId: string;
715
1286
  nodeId: string;
716
1287
  nodeGeneration: string;
717
1288
  purpose: "TRANSFER";
1289
+ transportSessionId: string;
718
1290
  transfer: {
719
- direction: "UPLOAD" | "DOWNLOAD";
720
1291
  resource: {
721
1292
  path: string;
722
1293
  kind: "WORKSPACE_FILE";
@@ -733,21 +1304,14 @@ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedU
733
1304
  fileName: string;
734
1305
  size: number;
735
1306
  sha256: string;
1307
+ direction: "UPLOAD";
736
1308
  overwrite?: boolean | undefined;
737
1309
  resumeOffset?: number | undefined;
738
1310
  composerAttachment?: {
739
1311
  id: string;
740
1312
  mime: string;
741
1313
  } | 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";
1314
+ } | {
751
1315
  resource: {
752
1316
  path: string;
753
1317
  kind: "WORKSPACE_FILE";
@@ -764,11 +1328,12 @@ export declare const directBrowserMessageSchema: z.ZodUnion<[z.ZodDiscriminatedU
764
1328
  fileName: string;
765
1329
  size: number;
766
1330
  sha256: string;
767
- overwrite?: boolean | undefined;
768
- resumeOffset?: number | undefined;
769
- composerAttachment?: {
770
- id: string;
771
- mime: string;
1331
+ direction: "DOWNLOAD";
1332
+ revision: string;
1333
+ range?: {
1334
+ length: number;
1335
+ sha256: string;
1336
+ offset: number;
772
1337
  } | undefined;
773
1338
  };
774
1339
  }>]>, z.ZodObject<{
@@ -934,27 +1499,30 @@ export declare const directServerMessageSchema: z.ZodDiscriminatedUnion<"type",
934
1499
  directSessionId: z.ZodString;
935
1500
  nodeId: z.ZodString;
936
1501
  nodeGeneration: z.ZodString;
937
- purpose: z.ZodEnum<["PROBE", "TRANSFER"]>;
1502
+ purpose: z.ZodEnum<["TRANSPORT", "TRANSFER"]>;
938
1503
  expiresAt: z.ZodNumber;
1504
+ transportSessionId: z.ZodOptional<z.ZodString>;
939
1505
  resumeOffset: z.ZodOptional<z.ZodNumber>;
940
1506
  }, "strict", z.ZodTypeAny, {
941
1507
  type: "direct.prepared";
942
1508
  requestId: string;
943
1509
  nodeId: string;
944
1510
  nodeGeneration: string;
945
- purpose: "PROBE" | "TRANSFER";
1511
+ purpose: "TRANSPORT" | "TRANSFER";
946
1512
  directSessionId: string;
947
1513
  expiresAt: number;
948
1514
  resumeOffset?: number | undefined;
1515
+ transportSessionId?: string | undefined;
949
1516
  }, {
950
1517
  type: "direct.prepared";
951
1518
  requestId: string;
952
1519
  nodeId: string;
953
1520
  nodeGeneration: string;
954
- purpose: "PROBE" | "TRANSFER";
1521
+ purpose: "TRANSPORT" | "TRANSFER";
955
1522
  directSessionId: string;
956
1523
  expiresAt: number;
957
1524
  resumeOffset?: number | undefined;
1525
+ transportSessionId?: string | undefined;
958
1526
  }>, z.ZodObject<{
959
1527
  directSessionId: z.ZodString;
960
1528
  } & {
@@ -1082,22 +1650,6 @@ export declare const directServerMessageSchema: z.ZodDiscriminatedUnion<"type",
1082
1650
  openExpiresAt: number;
1083
1651
  }>, z.ZodObject<{
1084
1652
  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
1653
  } & {
1102
1654
  type: z.ZodLiteral<"direct.heartbeat">;
1103
1655
  alive: z.ZodLiteral<true>;
@@ -1119,12 +1671,12 @@ export declare const directServerMessageSchema: z.ZodDiscriminatedUnion<"type",
1119
1671
  offset: z.ZodNumber;
1120
1672
  }, "strict", z.ZodTypeAny, {
1121
1673
  type: "direct.opened";
1122
- directSessionId: string;
1123
1674
  offset: number;
1675
+ directSessionId: string;
1124
1676
  }, {
1125
1677
  type: "direct.opened";
1126
- directSessionId: string;
1127
1678
  offset: number;
1679
+ directSessionId: string;
1128
1680
  }>, z.ZodObject<{
1129
1681
  directSessionId: z.ZodString;
1130
1682
  } & {
@@ -1174,15 +1726,39 @@ export declare const directServerMessageSchema: z.ZodDiscriminatedUnion<"type",
1174
1726
  directSessionId?: string | undefined;
1175
1727
  }>]>;
1176
1728
  export type DirectServerMessage = z.infer<typeof directServerMessageSchema>;
1177
- export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1729
+ export declare const directNodeCommandSchema: z.ZodUnion<[z.ZodObject<{
1730
+ type: z.ZodLiteral<"direct.prepare">;
1731
+ directSessionId: z.ZodString;
1732
+ workbenchConnectionId: z.ZodString;
1733
+ nodeGeneration: z.ZodString;
1734
+ purpose: z.ZodLiteral<"TRANSPORT">;
1735
+ expiresAt: z.ZodNumber;
1736
+ userAuthorization: z.ZodUnknown;
1737
+ }, "strict", z.ZodTypeAny, {
1738
+ type: "direct.prepare";
1739
+ nodeGeneration: string;
1740
+ purpose: "TRANSPORT";
1741
+ directSessionId: string;
1742
+ expiresAt: number;
1743
+ workbenchConnectionId: string;
1744
+ userAuthorization?: unknown;
1745
+ }, {
1746
+ type: "direct.prepare";
1747
+ nodeGeneration: string;
1748
+ purpose: "TRANSPORT";
1749
+ directSessionId: string;
1750
+ expiresAt: number;
1751
+ workbenchConnectionId: string;
1752
+ userAuthorization?: unknown;
1753
+ }>, z.ZodObject<{
1178
1754
  type: z.ZodLiteral<"direct.prepare">;
1179
1755
  directSessionId: z.ZodString;
1756
+ transportSessionId: z.ZodString;
1180
1757
  workbenchConnectionId: z.ZodString;
1181
1758
  nodeGeneration: z.ZodString;
1182
- purpose: z.ZodEnum<["PROBE", "TRANSFER"]>;
1759
+ purpose: z.ZodLiteral<"TRANSFER">;
1183
1760
  expiresAt: z.ZodNumber;
1184
- transfer: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1185
- direction: z.ZodEnum<["UPLOAD", "DOWNLOAD"]>;
1761
+ transfer: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
1186
1762
  resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1187
1763
  kind: z.ZodLiteral<"WORKSPACE_FILE">;
1188
1764
  workspaceId: z.ZodString;
@@ -1223,6 +1799,8 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1223
1799
  fileName: z.ZodString;
1224
1800
  size: z.ZodNumber;
1225
1801
  sha256: z.ZodString;
1802
+ } & {
1803
+ direction: z.ZodLiteral<"UPLOAD">;
1226
1804
  overwrite: z.ZodOptional<z.ZodBoolean>;
1227
1805
  resumeOffset: z.ZodOptional<z.ZodNumber>;
1228
1806
  composerAttachment: z.ZodOptional<z.ZodObject<{
@@ -1236,7 +1814,6 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1236
1814
  mime: string;
1237
1815
  }>>;
1238
1816
  }, "strict", z.ZodTypeAny, {
1239
- direction: "UPLOAD" | "DOWNLOAD";
1240
1817
  resource: {
1241
1818
  path: string;
1242
1819
  kind: "WORKSPACE_FILE";
@@ -1253,6 +1830,7 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1253
1830
  fileName: string;
1254
1831
  size: number;
1255
1832
  sha256: string;
1833
+ direction: "UPLOAD";
1256
1834
  overwrite?: boolean | undefined;
1257
1835
  resumeOffset?: number | undefined;
1258
1836
  composerAttachment?: {
@@ -1260,7 +1838,6 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1260
1838
  mime: string;
1261
1839
  } | undefined;
1262
1840
  }, {
1263
- direction: "UPLOAD" | "DOWNLOAD";
1264
1841
  resource: {
1265
1842
  path: string;
1266
1843
  kind: "WORKSPACE_FILE";
@@ -1277,6 +1854,7 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1277
1854
  fileName: string;
1278
1855
  size: number;
1279
1856
  sha256: string;
1857
+ direction: "UPLOAD";
1280
1858
  overwrite?: boolean | undefined;
1281
1859
  resumeOffset?: number | undefined;
1282
1860
  composerAttachment?: {
@@ -1284,7 +1862,6 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1284
1862
  mime: string;
1285
1863
  } | undefined;
1286
1864
  }>, {
1287
- direction: "UPLOAD" | "DOWNLOAD";
1288
1865
  resource: {
1289
1866
  path: string;
1290
1867
  kind: "WORKSPACE_FILE";
@@ -1301,6 +1878,7 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1301
1878
  fileName: string;
1302
1879
  size: number;
1303
1880
  sha256: string;
1881
+ direction: "UPLOAD";
1304
1882
  overwrite?: boolean | undefined;
1305
1883
  resumeOffset?: number | undefined;
1306
1884
  composerAttachment?: {
@@ -1308,7 +1886,6 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1308
1886
  mime: string;
1309
1887
  } | undefined;
1310
1888
  }, {
1311
- direction: "UPLOAD" | "DOWNLOAD";
1312
1889
  resource: {
1313
1890
  path: string;
1314
1891
  kind: "WORKSPACE_FILE";
@@ -1325,23 +1902,174 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1325
1902
  fileName: string;
1326
1903
  size: number;
1327
1904
  sha256: string;
1905
+ direction: "UPLOAD";
1328
1906
  overwrite?: boolean | undefined;
1329
1907
  resumeOffset?: number | undefined;
1330
1908
  composerAttachment?: {
1331
1909
  id: string;
1332
1910
  mime: string;
1333
1911
  } | undefined;
1334
- }>>;
1912
+ }>, z.ZodEffects<z.ZodObject<{
1913
+ resource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1914
+ kind: z.ZodLiteral<"WORKSPACE_FILE">;
1915
+ workspaceId: z.ZodString;
1916
+ path: z.ZodString;
1917
+ worktreePath: z.ZodOptional<z.ZodString>;
1918
+ }, "strict", z.ZodTypeAny, {
1919
+ path: string;
1920
+ kind: "WORKSPACE_FILE";
1921
+ workspaceId: string;
1922
+ worktreePath?: string | undefined;
1923
+ }, {
1924
+ path: string;
1925
+ kind: "WORKSPACE_FILE";
1926
+ workspaceId: string;
1927
+ worktreePath?: string | undefined;
1928
+ }>, z.ZodObject<{
1929
+ kind: z.ZodLiteral<"GIT_COMMIT_BLOB">;
1930
+ workspaceId: z.ZodString;
1931
+ commit: z.ZodString;
1932
+ path: z.ZodString;
1933
+ repositoryPath: z.ZodOptional<z.ZodString>;
1934
+ worktreePath: z.ZodOptional<z.ZodString>;
1935
+ }, "strict", z.ZodTypeAny, {
1936
+ path: string;
1937
+ kind: "GIT_COMMIT_BLOB";
1938
+ workspaceId: string;
1939
+ commit: string;
1940
+ worktreePath?: string | undefined;
1941
+ repositoryPath?: string | undefined;
1942
+ }, {
1943
+ path: string;
1944
+ kind: "GIT_COMMIT_BLOB";
1945
+ workspaceId: string;
1946
+ commit: string;
1947
+ worktreePath?: string | undefined;
1948
+ repositoryPath?: string | undefined;
1949
+ }>]>;
1950
+ fileName: z.ZodString;
1951
+ size: z.ZodNumber;
1952
+ sha256: z.ZodString;
1953
+ } & {
1954
+ direction: z.ZodLiteral<"DOWNLOAD">;
1955
+ revision: z.ZodString;
1956
+ range: z.ZodOptional<z.ZodObject<{
1957
+ offset: z.ZodNumber;
1958
+ length: z.ZodNumber;
1959
+ sha256: z.ZodString;
1960
+ }, "strict", z.ZodTypeAny, {
1961
+ length: number;
1962
+ sha256: string;
1963
+ offset: number;
1964
+ }, {
1965
+ length: number;
1966
+ sha256: string;
1967
+ offset: number;
1968
+ }>>;
1969
+ }, "strict", z.ZodTypeAny, {
1970
+ resource: {
1971
+ path: string;
1972
+ kind: "WORKSPACE_FILE";
1973
+ workspaceId: string;
1974
+ worktreePath?: string | undefined;
1975
+ } | {
1976
+ path: string;
1977
+ kind: "GIT_COMMIT_BLOB";
1978
+ workspaceId: string;
1979
+ commit: string;
1980
+ worktreePath?: string | undefined;
1981
+ repositoryPath?: string | undefined;
1982
+ };
1983
+ fileName: string;
1984
+ size: number;
1985
+ sha256: string;
1986
+ direction: "DOWNLOAD";
1987
+ revision: string;
1988
+ range?: {
1989
+ length: number;
1990
+ sha256: string;
1991
+ offset: number;
1992
+ } | undefined;
1993
+ }, {
1994
+ resource: {
1995
+ path: string;
1996
+ kind: "WORKSPACE_FILE";
1997
+ workspaceId: string;
1998
+ worktreePath?: string | undefined;
1999
+ } | {
2000
+ path: string;
2001
+ kind: "GIT_COMMIT_BLOB";
2002
+ workspaceId: string;
2003
+ commit: string;
2004
+ worktreePath?: string | undefined;
2005
+ repositoryPath?: string | undefined;
2006
+ };
2007
+ fileName: string;
2008
+ size: number;
2009
+ sha256: string;
2010
+ direction: "DOWNLOAD";
2011
+ revision: string;
2012
+ range?: {
2013
+ length: number;
2014
+ sha256: string;
2015
+ offset: number;
2016
+ } | undefined;
2017
+ }>, {
2018
+ resource: {
2019
+ path: string;
2020
+ kind: "WORKSPACE_FILE";
2021
+ workspaceId: string;
2022
+ worktreePath?: string | undefined;
2023
+ } | {
2024
+ path: string;
2025
+ kind: "GIT_COMMIT_BLOB";
2026
+ workspaceId: string;
2027
+ commit: string;
2028
+ worktreePath?: string | undefined;
2029
+ repositoryPath?: string | undefined;
2030
+ };
2031
+ fileName: string;
2032
+ size: number;
2033
+ sha256: string;
2034
+ direction: "DOWNLOAD";
2035
+ revision: string;
2036
+ range?: {
2037
+ length: number;
2038
+ sha256: string;
2039
+ offset: number;
2040
+ } | undefined;
2041
+ }, {
2042
+ resource: {
2043
+ path: string;
2044
+ kind: "WORKSPACE_FILE";
2045
+ workspaceId: string;
2046
+ worktreePath?: string | undefined;
2047
+ } | {
2048
+ path: string;
2049
+ kind: "GIT_COMMIT_BLOB";
2050
+ workspaceId: string;
2051
+ commit: string;
2052
+ worktreePath?: string | undefined;
2053
+ repositoryPath?: string | undefined;
2054
+ };
2055
+ fileName: string;
2056
+ size: number;
2057
+ sha256: string;
2058
+ direction: "DOWNLOAD";
2059
+ revision: string;
2060
+ range?: {
2061
+ length: number;
2062
+ sha256: string;
2063
+ offset: number;
2064
+ } | undefined;
2065
+ }>]>;
1335
2066
  userAuthorization: z.ZodUnknown;
1336
2067
  }, "strict", z.ZodTypeAny, {
1337
2068
  type: "direct.prepare";
1338
2069
  nodeGeneration: string;
1339
- purpose: "PROBE" | "TRANSFER";
1340
- directSessionId: string;
1341
- expiresAt: number;
1342
- workbenchConnectionId: string;
1343
- transfer?: {
1344
- direction: "UPLOAD" | "DOWNLOAD";
2070
+ purpose: "TRANSFER";
2071
+ transportSessionId: string;
2072
+ transfer: {
1345
2073
  resource: {
1346
2074
  path: string;
1347
2075
  kind: "WORKSPACE_FILE";
@@ -1358,23 +2086,48 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1358
2086
  fileName: string;
1359
2087
  size: number;
1360
2088
  sha256: string;
2089
+ direction: "UPLOAD";
1361
2090
  overwrite?: boolean | undefined;
1362
2091
  resumeOffset?: number | undefined;
1363
2092
  composerAttachment?: {
1364
2093
  id: string;
1365
2094
  mime: string;
1366
2095
  } | undefined;
1367
- } | undefined;
2096
+ } | {
2097
+ resource: {
2098
+ path: string;
2099
+ kind: "WORKSPACE_FILE";
2100
+ workspaceId: string;
2101
+ worktreePath?: string | undefined;
2102
+ } | {
2103
+ path: string;
2104
+ kind: "GIT_COMMIT_BLOB";
2105
+ workspaceId: string;
2106
+ commit: string;
2107
+ worktreePath?: string | undefined;
2108
+ repositoryPath?: string | undefined;
2109
+ };
2110
+ fileName: string;
2111
+ size: number;
2112
+ sha256: string;
2113
+ direction: "DOWNLOAD";
2114
+ revision: string;
2115
+ range?: {
2116
+ length: number;
2117
+ sha256: string;
2118
+ offset: number;
2119
+ } | undefined;
2120
+ };
2121
+ directSessionId: string;
2122
+ expiresAt: number;
2123
+ workbenchConnectionId: string;
1368
2124
  userAuthorization?: unknown;
1369
2125
  }, {
1370
2126
  type: "direct.prepare";
1371
2127
  nodeGeneration: string;
1372
- purpose: "PROBE" | "TRANSFER";
1373
- directSessionId: string;
1374
- expiresAt: number;
1375
- workbenchConnectionId: string;
1376
- transfer?: {
1377
- direction: "UPLOAD" | "DOWNLOAD";
2128
+ purpose: "TRANSFER";
2129
+ transportSessionId: string;
2130
+ transfer: {
1378
2131
  resource: {
1379
2132
  path: string;
1380
2133
  kind: "WORKSPACE_FILE";
@@ -1391,13 +2144,41 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1391
2144
  fileName: string;
1392
2145
  size: number;
1393
2146
  sha256: string;
2147
+ direction: "UPLOAD";
1394
2148
  overwrite?: boolean | undefined;
1395
2149
  resumeOffset?: number | undefined;
1396
2150
  composerAttachment?: {
1397
2151
  id: string;
1398
2152
  mime: string;
1399
2153
  } | undefined;
1400
- } | undefined;
2154
+ } | {
2155
+ resource: {
2156
+ path: string;
2157
+ kind: "WORKSPACE_FILE";
2158
+ workspaceId: string;
2159
+ worktreePath?: string | undefined;
2160
+ } | {
2161
+ path: string;
2162
+ kind: "GIT_COMMIT_BLOB";
2163
+ workspaceId: string;
2164
+ commit: string;
2165
+ worktreePath?: string | undefined;
2166
+ repositoryPath?: string | undefined;
2167
+ };
2168
+ fileName: string;
2169
+ size: number;
2170
+ sha256: string;
2171
+ direction: "DOWNLOAD";
2172
+ revision: string;
2173
+ range?: {
2174
+ length: number;
2175
+ sha256: string;
2176
+ offset: number;
2177
+ } | undefined;
2178
+ };
2179
+ directSessionId: string;
2180
+ expiresAt: number;
2181
+ workbenchConnectionId: string;
1401
2182
  userAuthorization?: unknown;
1402
2183
  }>, z.ZodObject<{
1403
2184
  directSessionId: z.ZodString;
@@ -1509,6 +2290,7 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1509
2290
  directSessionId: z.ZodString;
1510
2291
  } & {
1511
2292
  type: z.ZodLiteral<"direct.grant">;
2293
+ transportSessionId: z.ZodString;
1512
2294
  grant: z.ZodString;
1513
2295
  browserFingerprint: z.ZodString;
1514
2296
  nodeFingerprint: z.ZodString;
@@ -1516,6 +2298,7 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1516
2298
  expiresAt: z.ZodNumber;
1517
2299
  }, "strict", z.ZodTypeAny, {
1518
2300
  type: "direct.grant";
2301
+ transportSessionId: string;
1519
2302
  directSessionId: string;
1520
2303
  expiresAt: number;
1521
2304
  grant: string;
@@ -1524,6 +2307,7 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1524
2307
  nodeFingerprint: string;
1525
2308
  }, {
1526
2309
  type: "direct.grant";
2310
+ transportSessionId: string;
1527
2311
  directSessionId: string;
1528
2312
  expiresAt: number;
1529
2313
  grant: string;
@@ -1534,12 +2318,15 @@ export declare const directNodeCommandSchema: z.ZodDiscriminatedUnion<"type", [z
1534
2318
  directSessionId: z.ZodString;
1535
2319
  } & {
1536
2320
  type: z.ZodLiteral<"direct.heartbeat">;
2321
+ expiresAt: z.ZodNumber;
1537
2322
  }, "strict", z.ZodTypeAny, {
1538
2323
  type: "direct.heartbeat";
1539
2324
  directSessionId: string;
2325
+ expiresAt: number;
1540
2326
  }, {
1541
2327
  type: "direct.heartbeat";
1542
2328
  directSessionId: string;
2329
+ expiresAt: number;
1543
2330
  }>, z.ZodObject<{
1544
2331
  directSessionId: z.ZodString;
1545
2332
  } & {
@@ -1673,33 +2460,17 @@ export declare const directNodeEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1673
2460
  directSessionId: string;
1674
2461
  }>, z.ZodObject<{
1675
2462
  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
2463
  } & {
1693
2464
  type: z.ZodLiteral<"direct.opened">;
1694
2465
  offset: z.ZodNumber;
1695
2466
  }, "strict", z.ZodTypeAny, {
1696
2467
  type: "direct.opened";
1697
- directSessionId: string;
1698
2468
  offset: number;
2469
+ directSessionId: string;
1699
2470
  }, {
1700
2471
  type: "direct.opened";
1701
- directSessionId: string;
1702
2472
  offset: number;
2473
+ directSessionId: string;
1703
2474
  }>, z.ZodObject<{
1704
2475
  directSessionId: z.ZodString;
1705
2476
  } & {