@byok-sdk/protocol 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -255,6 +255,222 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
255
255
  }, z.core.$strip>>;
256
256
  requiredToolsets: z.ZodArray<z.ZodString>;
257
257
  }, z.core.$strict>;
258
+ }, z.core.$strip>, z.ZodObject<{
259
+ v: z.ZodNumber;
260
+ id: z.ZodUUID;
261
+ ts: z.ZodISODateTime;
262
+ type: z.ZodLiteral<"task.offer_for_agent">;
263
+ task_id: z.ZodString;
264
+ session_ref: z.ZodOptional<z.ZodString>;
265
+ seq: z.ZodNumber;
266
+ payload: z.ZodObject<{
267
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
268
+ blobRef: z.ZodObject<{
269
+ blobId: z.ZodString;
270
+ contentHash: z.ZodString;
271
+ size: z.ZodNumber;
272
+ contentType: z.ZodString;
273
+ url: z.ZodOptional<z.ZodString>;
274
+ }, z.core.$strip>;
275
+ }, z.core.$strict>]>;
276
+ policy: z.ZodObject<{
277
+ mode: z.ZodEnum<{
278
+ auto: "auto";
279
+ confirm: "confirm";
280
+ plan: "plan";
281
+ readonly: "readonly";
282
+ }>;
283
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
284
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
285
+ workspaceRoot: z.ZodOptional<z.ZodString>;
286
+ network: z.ZodOptional<z.ZodBoolean>;
287
+ }, z.core.$strict>;
288
+ agentRef: z.ZodObject<{
289
+ agentId: z.ZodString;
290
+ profileRevision: z.ZodString;
291
+ }, z.core.$strict>;
292
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
293
+ runtime: z.ZodOptional<z.ZodEnum<{
294
+ claude: "claude";
295
+ codex: "codex";
296
+ pi: "pi";
297
+ }>>;
298
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
299
+ lane: z.ZodLiteral<"subscription">;
300
+ runtimeId: z.ZodEnum<{
301
+ claude: "claude";
302
+ codex: "codex";
303
+ }>;
304
+ providerId: z.ZodNull;
305
+ modelId: z.ZodString;
306
+ }, z.core.$strict>, z.ZodObject<{
307
+ lane: z.ZodLiteral<"byok">;
308
+ runtimeId: z.ZodLiteral<"pi">;
309
+ providerId: z.ZodString;
310
+ modelId: z.ZodString;
311
+ }, z.core.$strict>], "lane">>;
312
+ sessionRef: z.ZodOptional<z.ZodString>;
313
+ limits: z.ZodOptional<z.ZodObject<{
314
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
315
+ maxTokens: z.ZodOptional<z.ZodNumber>;
316
+ }, z.core.$strip>>;
317
+ }, z.core.$strict>;
318
+ }, z.core.$strip>, z.ZodObject<{
319
+ v: z.ZodNumber;
320
+ id: z.ZodUUID;
321
+ ts: z.ZodISODateTime;
322
+ type: z.ZodLiteral<"task.offer_for_agent_with_egress">;
323
+ task_id: z.ZodString;
324
+ session_ref: z.ZodOptional<z.ZodString>;
325
+ seq: z.ZodNumber;
326
+ payload: z.ZodObject<{
327
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
328
+ blobRef: z.ZodObject<{
329
+ blobId: z.ZodString;
330
+ contentHash: z.ZodString;
331
+ size: z.ZodNumber;
332
+ contentType: z.ZodString;
333
+ url: z.ZodOptional<z.ZodString>;
334
+ }, z.core.$strip>;
335
+ }, z.core.$strict>]>;
336
+ policy: z.ZodObject<{
337
+ mode: z.ZodEnum<{
338
+ auto: "auto";
339
+ confirm: "confirm";
340
+ plan: "plan";
341
+ readonly: "readonly";
342
+ }>;
343
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
344
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
345
+ workspaceRoot: z.ZodOptional<z.ZodString>;
346
+ network: z.ZodOptional<z.ZodBoolean>;
347
+ }, z.core.$strict>;
348
+ agentRef: z.ZodObject<{
349
+ agentId: z.ZodString;
350
+ profileRevision: z.ZodString;
351
+ }, z.core.$strict>;
352
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
353
+ runtime: z.ZodOptional<z.ZodEnum<{
354
+ claude: "claude";
355
+ codex: "codex";
356
+ pi: "pi";
357
+ }>>;
358
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
359
+ lane: z.ZodLiteral<"subscription">;
360
+ runtimeId: z.ZodEnum<{
361
+ claude: "claude";
362
+ codex: "codex";
363
+ }>;
364
+ providerId: z.ZodNull;
365
+ modelId: z.ZodString;
366
+ }, z.core.$strict>, z.ZodObject<{
367
+ lane: z.ZodLiteral<"byok">;
368
+ runtimeId: z.ZodLiteral<"pi">;
369
+ providerId: z.ZodString;
370
+ modelId: z.ZodString;
371
+ }, z.core.$strict>], "lane">>;
372
+ limits: z.ZodOptional<z.ZodObject<{
373
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
374
+ maxTokens: z.ZodOptional<z.ZodNumber>;
375
+ }, z.core.$strip>>;
376
+ sessionRef: z.ZodString;
377
+ egressPolicy: z.ZodObject<{
378
+ policyRevision: z.ZodString;
379
+ activity: z.ZodDiscriminatedUnion<[z.ZodObject<{
380
+ mode: z.ZodLiteral<"metadata-status">;
381
+ delivery: z.ZodLiteral<"latest-value">;
382
+ }, z.core.$strict>, z.ZodObject<{
383
+ mode: z.ZodLiteral<"contentful-trajectory">;
384
+ delivery: z.ZodLiteral<"latest-value">;
385
+ maxCoalesceMs: z.ZodNumber;
386
+ maxEventBytes: z.ZodNumber;
387
+ }, z.core.$strict>], "mode">;
388
+ reliable: z.ZodObject<{
389
+ maxPendingEventsPerAgent: z.ZodNumber;
390
+ maxPendingBytesPerAgent: z.ZodNumber;
391
+ maxPendingBytesPerTenant: z.ZodNumber;
392
+ }, z.core.$strict>;
393
+ transfers: z.ZodObject<{
394
+ workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
395
+ maxBytes: z.ZodNumber;
396
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
397
+ }, z.core.$strict>]>;
398
+ transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
399
+ maxBytes: z.ZodNumber;
400
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
401
+ }, z.core.$strict>]>;
402
+ artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
403
+ maxBytes: z.ZodNumber;
404
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
405
+ }, z.core.$strict>]>;
406
+ }, z.core.$strict>;
407
+ }, z.core.$strict>;
408
+ }, z.core.$strict>;
409
+ }, z.core.$strip>, z.ZodObject<{
410
+ v: z.ZodNumber;
411
+ id: z.ZodUUID;
412
+ ts: z.ZodISODateTime;
413
+ type: z.ZodLiteral<"agent.egress.ack">;
414
+ task_id: z.ZodOptional<z.ZodString>;
415
+ session_ref: z.ZodOptional<z.ZodString>;
416
+ seq: z.ZodNumber;
417
+ payload: z.ZodObject<{
418
+ agentRef: z.ZodObject<{
419
+ agentId: z.ZodString;
420
+ profileRevision: z.ZodString;
421
+ }, z.core.$strict>;
422
+ sessionRef: z.ZodString;
423
+ policyRevision: z.ZodString;
424
+ eventId: z.ZodUUID;
425
+ cursor: z.ZodNumber;
426
+ receiptId: z.ZodUUID;
427
+ }, z.core.$strict>;
428
+ }, z.core.$strip>, z.ZodObject<{
429
+ v: z.ZodNumber;
430
+ id: z.ZodUUID;
431
+ ts: z.ZodISODateTime;
432
+ type: z.ZodLiteral<"agent.content.read">;
433
+ task_id: z.ZodOptional<z.ZodString>;
434
+ session_ref: z.ZodOptional<z.ZodString>;
435
+ seq: z.ZodNumber;
436
+ payload: z.ZodObject<{
437
+ requestId: z.ZodUUID;
438
+ surface: z.ZodEnum<{
439
+ artifact: "artifact";
440
+ transcript: "transcript";
441
+ workspace: "workspace";
442
+ }>;
443
+ actor: z.ZodObject<{
444
+ kind: z.ZodEnum<{
445
+ agent: "agent";
446
+ system: "system";
447
+ user: "user";
448
+ }>;
449
+ id: z.ZodString;
450
+ }, z.core.$strict>;
451
+ agentRef: z.ZodObject<{
452
+ agentId: z.ZodString;
453
+ profileRevision: z.ZodString;
454
+ }, z.core.$strict>;
455
+ sessionRef: z.ZodString;
456
+ runtime: z.ZodEnum<{
457
+ claude: "claude";
458
+ codex: "codex";
459
+ pi: "pi";
460
+ }>;
461
+ cwd: z.ZodString;
462
+ policyRevision: z.ZodString;
463
+ target: z.ZodString;
464
+ mimeType: z.ZodString;
465
+ decodeAs: z.ZodEnum<{
466
+ bytes: "bytes";
467
+ utf8: "utf8";
468
+ }>;
469
+ policy: z.ZodObject<{
470
+ maxBytes: z.ZodNumber;
471
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
472
+ }, z.core.$strict>;
473
+ }, z.core.$strict>;
258
474
  }, z.core.$strip>, z.ZodObject<{
259
475
  v: z.ZodNumber;
260
476
  id: z.ZodUUID;
@@ -311,6 +527,10 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
311
527
  payload: z.ZodObject<{
312
528
  deviceId: z.ZodString;
313
529
  agentId: z.ZodOptional<z.ZodString>;
530
+ agentRef: z.ZodOptional<z.ZodObject<{
531
+ agentId: z.ZodString;
532
+ profileRevision: z.ZodString;
533
+ }, z.core.$strict>>;
314
534
  runtime: z.ZodOptional<z.ZodEnum<{
315
535
  claude: "claude";
316
536
  codex: "codex";
@@ -344,6 +564,10 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
344
564
  payload: z.ZodObject<{
345
565
  reason: z.ZodString;
346
566
  retryable: z.ZodOptional<z.ZodBoolean>;
567
+ agentRef: z.ZodOptional<z.ZodObject<{
568
+ agentId: z.ZodString;
569
+ profileRevision: z.ZodString;
570
+ }, z.core.$strict>>;
347
571
  }, z.core.$strip>;
348
572
  }, z.core.$strip>, z.ZodObject<{
349
573
  v: z.ZodNumber;
@@ -457,6 +681,10 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
457
681
  clientVersion: z.ZodString;
458
682
  reportedAt: z.ZodISODateTime;
459
683
  }, z.core.$strip>>;
684
+ agentRef: z.ZodOptional<z.ZodObject<{
685
+ agentId: z.ZodString;
686
+ profileRevision: z.ZodString;
687
+ }, z.core.$strict>>;
460
688
  }, z.core.$strip>;
461
689
  }, z.core.$strip>, z.ZodObject<{
462
690
  v: z.ZodNumber;
@@ -483,6 +711,10 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
483
711
  clientVersion: z.ZodString;
484
712
  reportedAt: z.ZodISODateTime;
485
713
  }, z.core.$strip>>;
714
+ agentRef: z.ZodOptional<z.ZodObject<{
715
+ agentId: z.ZodString;
716
+ profileRevision: z.ZodString;
717
+ }, z.core.$strict>>;
486
718
  }, z.core.$strip>;
487
719
  }, z.core.$strip>, z.ZodObject<{
488
720
  v: z.ZodNumber;
@@ -508,6 +740,10 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
508
740
  clientVersion: z.ZodString;
509
741
  reportedAt: z.ZodISODateTime;
510
742
  }, z.core.$strip>>;
743
+ agentRef: z.ZodOptional<z.ZodObject<{
744
+ agentId: z.ZodString;
745
+ profileRevision: z.ZodString;
746
+ }, z.core.$strict>>;
511
747
  }, z.core.$strip>;
512
748
  }, z.core.$strip>, z.ZodObject<{
513
749
  v: z.ZodNumber;
@@ -528,6 +764,139 @@ export declare const EventsPollResponseSchema: z.ZodObject<{
528
764
  }>;
529
765
  at: z.ZodISODateTime;
530
766
  }, z.core.$strip>;
767
+ }, z.core.$strip>, z.ZodObject<{
768
+ v: z.ZodNumber;
769
+ id: z.ZodUUID;
770
+ ts: z.ZodISODateTime;
771
+ type: z.ZodLiteral<"agent.egress.reliable">;
772
+ task_id: z.ZodOptional<z.ZodString>;
773
+ session_ref: z.ZodOptional<z.ZodString>;
774
+ seq: z.ZodOptional<z.ZodNumber>;
775
+ payload: z.ZodObject<{
776
+ agentRef: z.ZodObject<{
777
+ agentId: z.ZodString;
778
+ profileRevision: z.ZodString;
779
+ }, z.core.$strict>;
780
+ sessionRef: z.ZodString;
781
+ policyRevision: z.ZodString;
782
+ eventId: z.ZodUUID;
783
+ cursor: z.ZodNumber;
784
+ payload: z.ZodJSONSchema;
785
+ contentHash: z.ZodString;
786
+ byteCount: z.ZodNumber;
787
+ }, z.core.$strict>;
788
+ }, z.core.$strip>, z.ZodObject<{
789
+ v: z.ZodNumber;
790
+ id: z.ZodUUID;
791
+ ts: z.ZodISODateTime;
792
+ type: z.ZodLiteral<"agent.content.receipt">;
793
+ task_id: z.ZodOptional<z.ZodString>;
794
+ session_ref: z.ZodOptional<z.ZodString>;
795
+ seq: z.ZodOptional<z.ZodNumber>;
796
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
797
+ requestId: z.ZodUUID;
798
+ eventId: z.ZodUUID;
799
+ cursor: z.ZodNumber;
800
+ surface: z.ZodEnum<{
801
+ artifact: "artifact";
802
+ transcript: "transcript";
803
+ workspace: "workspace";
804
+ }>;
805
+ actor: z.ZodObject<{
806
+ kind: z.ZodEnum<{
807
+ agent: "agent";
808
+ system: "system";
809
+ user: "user";
810
+ }>;
811
+ id: z.ZodString;
812
+ }, z.core.$strict>;
813
+ agentRef: z.ZodObject<{
814
+ agentId: z.ZodString;
815
+ profileRevision: z.ZodString;
816
+ }, z.core.$strict>;
817
+ sessionRef: z.ZodString;
818
+ runtime: z.ZodEnum<{
819
+ claude: "claude";
820
+ codex: "codex";
821
+ pi: "pi";
822
+ }>;
823
+ cwd: z.ZodString;
824
+ policyRevision: z.ZodString;
825
+ target: z.ZodString;
826
+ mimeType: z.ZodString;
827
+ decodeAs: z.ZodEnum<{
828
+ bytes: "bytes";
829
+ utf8: "utf8";
830
+ }>;
831
+ decision: z.ZodLiteral<"allowed">;
832
+ byteCount: z.ZodNumber;
833
+ contentHash: z.ZodString;
834
+ blobRef: z.ZodObject<{
835
+ blobId: z.ZodString;
836
+ contentHash: z.ZodString;
837
+ size: z.ZodNumber;
838
+ contentType: z.ZodString;
839
+ url: z.ZodOptional<z.ZodString>;
840
+ }, z.core.$strip>;
841
+ }, z.core.$strict>, z.ZodObject<{
842
+ requestId: z.ZodUUID;
843
+ eventId: z.ZodUUID;
844
+ cursor: z.ZodNumber;
845
+ surface: z.ZodEnum<{
846
+ artifact: "artifact";
847
+ transcript: "transcript";
848
+ workspace: "workspace";
849
+ }>;
850
+ actor: z.ZodObject<{
851
+ kind: z.ZodEnum<{
852
+ agent: "agent";
853
+ system: "system";
854
+ user: "user";
855
+ }>;
856
+ id: z.ZodString;
857
+ }, z.core.$strict>;
858
+ agentRef: z.ZodObject<{
859
+ agentId: z.ZodString;
860
+ profileRevision: z.ZodString;
861
+ }, z.core.$strict>;
862
+ sessionRef: z.ZodString;
863
+ runtime: z.ZodEnum<{
864
+ claude: "claude";
865
+ codex: "codex";
866
+ pi: "pi";
867
+ }>;
868
+ cwd: z.ZodString;
869
+ policyRevision: z.ZodString;
870
+ target: z.ZodString;
871
+ mimeType: z.ZodString;
872
+ decodeAs: z.ZodEnum<{
873
+ bytes: "bytes";
874
+ utf8: "utf8";
875
+ }>;
876
+ decision: z.ZodLiteral<"denied">;
877
+ byteCount: z.ZodLiteral<0>;
878
+ reason: z.ZodEnum<{
879
+ "absolute-target": "absolute-target";
880
+ "byte-limit": "byte-limit";
881
+ "capability-missing": "capability-missing";
882
+ "dot-segment": "dot-segment";
883
+ "identity-mismatch": "identity-mismatch";
884
+ "invalid-request": "invalid-request";
885
+ "mime-not-allowlisted": "mime-not-allowlisted";
886
+ "non-relative-target": "non-relative-target";
887
+ "not-regular-file": "not-regular-file";
888
+ "path-escape": "path-escape";
889
+ "policy-disabled": "policy-disabled";
890
+ "policy-revision-mismatch": "policy-revision-mismatch";
891
+ "root-invalid": "root-invalid";
892
+ "root-not-allowlisted": "root-not-allowlisted";
893
+ "sensitive-name": "sensitive-name";
894
+ symlink: "symlink";
895
+ "target-missing": "target-missing";
896
+ "text-decode-failed": "text-decode-failed";
897
+ "text-not-allowlisted": "text-not-allowlisted";
898
+ }>;
899
+ }, z.core.$strict>], "decision">;
531
900
  }, z.core.$strip>], "type">>;
532
901
  cursor: z.ZodNumber;
533
902
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -702,6 +1071,222 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
702
1071
  }, z.core.$strip>>;
703
1072
  requiredToolsets: z.ZodArray<z.ZodString>;
704
1073
  }, z.core.$strict>;
1074
+ }, z.core.$strip>, z.ZodObject<{
1075
+ v: z.ZodNumber;
1076
+ id: z.ZodUUID;
1077
+ ts: z.ZodISODateTime;
1078
+ type: z.ZodLiteral<"task.offer_for_agent">;
1079
+ task_id: z.ZodString;
1080
+ session_ref: z.ZodOptional<z.ZodString>;
1081
+ seq: z.ZodNumber;
1082
+ payload: z.ZodObject<{
1083
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1084
+ blobRef: z.ZodObject<{
1085
+ blobId: z.ZodString;
1086
+ contentHash: z.ZodString;
1087
+ size: z.ZodNumber;
1088
+ contentType: z.ZodString;
1089
+ url: z.ZodOptional<z.ZodString>;
1090
+ }, z.core.$strip>;
1091
+ }, z.core.$strict>]>;
1092
+ policy: z.ZodObject<{
1093
+ mode: z.ZodEnum<{
1094
+ auto: "auto";
1095
+ confirm: "confirm";
1096
+ plan: "plan";
1097
+ readonly: "readonly";
1098
+ }>;
1099
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1100
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1101
+ workspaceRoot: z.ZodOptional<z.ZodString>;
1102
+ network: z.ZodOptional<z.ZodBoolean>;
1103
+ }, z.core.$strict>;
1104
+ agentRef: z.ZodObject<{
1105
+ agentId: z.ZodString;
1106
+ profileRevision: z.ZodString;
1107
+ }, z.core.$strict>;
1108
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1109
+ runtime: z.ZodOptional<z.ZodEnum<{
1110
+ claude: "claude";
1111
+ codex: "codex";
1112
+ pi: "pi";
1113
+ }>>;
1114
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1115
+ lane: z.ZodLiteral<"subscription">;
1116
+ runtimeId: z.ZodEnum<{
1117
+ claude: "claude";
1118
+ codex: "codex";
1119
+ }>;
1120
+ providerId: z.ZodNull;
1121
+ modelId: z.ZodString;
1122
+ }, z.core.$strict>, z.ZodObject<{
1123
+ lane: z.ZodLiteral<"byok">;
1124
+ runtimeId: z.ZodLiteral<"pi">;
1125
+ providerId: z.ZodString;
1126
+ modelId: z.ZodString;
1127
+ }, z.core.$strict>], "lane">>;
1128
+ sessionRef: z.ZodOptional<z.ZodString>;
1129
+ limits: z.ZodOptional<z.ZodObject<{
1130
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
1131
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1132
+ }, z.core.$strip>>;
1133
+ }, z.core.$strict>;
1134
+ }, z.core.$strip>, z.ZodObject<{
1135
+ v: z.ZodNumber;
1136
+ id: z.ZodUUID;
1137
+ ts: z.ZodISODateTime;
1138
+ type: z.ZodLiteral<"task.offer_for_agent_with_egress">;
1139
+ task_id: z.ZodString;
1140
+ session_ref: z.ZodOptional<z.ZodString>;
1141
+ seq: z.ZodNumber;
1142
+ payload: z.ZodObject<{
1143
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1144
+ blobRef: z.ZodObject<{
1145
+ blobId: z.ZodString;
1146
+ contentHash: z.ZodString;
1147
+ size: z.ZodNumber;
1148
+ contentType: z.ZodString;
1149
+ url: z.ZodOptional<z.ZodString>;
1150
+ }, z.core.$strip>;
1151
+ }, z.core.$strict>]>;
1152
+ policy: z.ZodObject<{
1153
+ mode: z.ZodEnum<{
1154
+ auto: "auto";
1155
+ confirm: "confirm";
1156
+ plan: "plan";
1157
+ readonly: "readonly";
1158
+ }>;
1159
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1160
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1161
+ workspaceRoot: z.ZodOptional<z.ZodString>;
1162
+ network: z.ZodOptional<z.ZodBoolean>;
1163
+ }, z.core.$strict>;
1164
+ agentRef: z.ZodObject<{
1165
+ agentId: z.ZodString;
1166
+ profileRevision: z.ZodString;
1167
+ }, z.core.$strict>;
1168
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1169
+ runtime: z.ZodOptional<z.ZodEnum<{
1170
+ claude: "claude";
1171
+ codex: "codex";
1172
+ pi: "pi";
1173
+ }>>;
1174
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1175
+ lane: z.ZodLiteral<"subscription">;
1176
+ runtimeId: z.ZodEnum<{
1177
+ claude: "claude";
1178
+ codex: "codex";
1179
+ }>;
1180
+ providerId: z.ZodNull;
1181
+ modelId: z.ZodString;
1182
+ }, z.core.$strict>, z.ZodObject<{
1183
+ lane: z.ZodLiteral<"byok">;
1184
+ runtimeId: z.ZodLiteral<"pi">;
1185
+ providerId: z.ZodString;
1186
+ modelId: z.ZodString;
1187
+ }, z.core.$strict>], "lane">>;
1188
+ limits: z.ZodOptional<z.ZodObject<{
1189
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
1190
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1191
+ }, z.core.$strip>>;
1192
+ sessionRef: z.ZodString;
1193
+ egressPolicy: z.ZodObject<{
1194
+ policyRevision: z.ZodString;
1195
+ activity: z.ZodDiscriminatedUnion<[z.ZodObject<{
1196
+ mode: z.ZodLiteral<"metadata-status">;
1197
+ delivery: z.ZodLiteral<"latest-value">;
1198
+ }, z.core.$strict>, z.ZodObject<{
1199
+ mode: z.ZodLiteral<"contentful-trajectory">;
1200
+ delivery: z.ZodLiteral<"latest-value">;
1201
+ maxCoalesceMs: z.ZodNumber;
1202
+ maxEventBytes: z.ZodNumber;
1203
+ }, z.core.$strict>], "mode">;
1204
+ reliable: z.ZodObject<{
1205
+ maxPendingEventsPerAgent: z.ZodNumber;
1206
+ maxPendingBytesPerAgent: z.ZodNumber;
1207
+ maxPendingBytesPerTenant: z.ZodNumber;
1208
+ }, z.core.$strict>;
1209
+ transfers: z.ZodObject<{
1210
+ workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1211
+ maxBytes: z.ZodNumber;
1212
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1213
+ }, z.core.$strict>]>;
1214
+ transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1215
+ maxBytes: z.ZodNumber;
1216
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1217
+ }, z.core.$strict>]>;
1218
+ artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1219
+ maxBytes: z.ZodNumber;
1220
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1221
+ }, z.core.$strict>]>;
1222
+ }, z.core.$strict>;
1223
+ }, z.core.$strict>;
1224
+ }, z.core.$strict>;
1225
+ }, z.core.$strip>, z.ZodObject<{
1226
+ v: z.ZodNumber;
1227
+ id: z.ZodUUID;
1228
+ ts: z.ZodISODateTime;
1229
+ type: z.ZodLiteral<"agent.egress.ack">;
1230
+ task_id: z.ZodOptional<z.ZodString>;
1231
+ session_ref: z.ZodOptional<z.ZodString>;
1232
+ seq: z.ZodNumber;
1233
+ payload: z.ZodObject<{
1234
+ agentRef: z.ZodObject<{
1235
+ agentId: z.ZodString;
1236
+ profileRevision: z.ZodString;
1237
+ }, z.core.$strict>;
1238
+ sessionRef: z.ZodString;
1239
+ policyRevision: z.ZodString;
1240
+ eventId: z.ZodUUID;
1241
+ cursor: z.ZodNumber;
1242
+ receiptId: z.ZodUUID;
1243
+ }, z.core.$strict>;
1244
+ }, z.core.$strip>, z.ZodObject<{
1245
+ v: z.ZodNumber;
1246
+ id: z.ZodUUID;
1247
+ ts: z.ZodISODateTime;
1248
+ type: z.ZodLiteral<"agent.content.read">;
1249
+ task_id: z.ZodOptional<z.ZodString>;
1250
+ session_ref: z.ZodOptional<z.ZodString>;
1251
+ seq: z.ZodNumber;
1252
+ payload: z.ZodObject<{
1253
+ requestId: z.ZodUUID;
1254
+ surface: z.ZodEnum<{
1255
+ artifact: "artifact";
1256
+ transcript: "transcript";
1257
+ workspace: "workspace";
1258
+ }>;
1259
+ actor: z.ZodObject<{
1260
+ kind: z.ZodEnum<{
1261
+ agent: "agent";
1262
+ system: "system";
1263
+ user: "user";
1264
+ }>;
1265
+ id: z.ZodString;
1266
+ }, z.core.$strict>;
1267
+ agentRef: z.ZodObject<{
1268
+ agentId: z.ZodString;
1269
+ profileRevision: z.ZodString;
1270
+ }, z.core.$strict>;
1271
+ sessionRef: z.ZodString;
1272
+ runtime: z.ZodEnum<{
1273
+ claude: "claude";
1274
+ codex: "codex";
1275
+ pi: "pi";
1276
+ }>;
1277
+ cwd: z.ZodString;
1278
+ policyRevision: z.ZodString;
1279
+ target: z.ZodString;
1280
+ mimeType: z.ZodString;
1281
+ decodeAs: z.ZodEnum<{
1282
+ bytes: "bytes";
1283
+ utf8: "utf8";
1284
+ }>;
1285
+ policy: z.ZodObject<{
1286
+ maxBytes: z.ZodNumber;
1287
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1288
+ }, z.core.$strict>;
1289
+ }, z.core.$strict>;
705
1290
  }, z.core.$strip>, z.ZodObject<{
706
1291
  v: z.ZodNumber;
707
1292
  id: z.ZodUUID;
@@ -758,6 +1343,10 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
758
1343
  payload: z.ZodObject<{
759
1344
  deviceId: z.ZodString;
760
1345
  agentId: z.ZodOptional<z.ZodString>;
1346
+ agentRef: z.ZodOptional<z.ZodObject<{
1347
+ agentId: z.ZodString;
1348
+ profileRevision: z.ZodString;
1349
+ }, z.core.$strict>>;
761
1350
  runtime: z.ZodOptional<z.ZodEnum<{
762
1351
  claude: "claude";
763
1352
  codex: "codex";
@@ -791,6 +1380,10 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
791
1380
  payload: z.ZodObject<{
792
1381
  reason: z.ZodString;
793
1382
  retryable: z.ZodOptional<z.ZodBoolean>;
1383
+ agentRef: z.ZodOptional<z.ZodObject<{
1384
+ agentId: z.ZodString;
1385
+ profileRevision: z.ZodString;
1386
+ }, z.core.$strict>>;
794
1387
  }, z.core.$strip>;
795
1388
  }, z.core.$strip>, z.ZodObject<{
796
1389
  v: z.ZodNumber;
@@ -904,6 +1497,10 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
904
1497
  clientVersion: z.ZodString;
905
1498
  reportedAt: z.ZodISODateTime;
906
1499
  }, z.core.$strip>>;
1500
+ agentRef: z.ZodOptional<z.ZodObject<{
1501
+ agentId: z.ZodString;
1502
+ profileRevision: z.ZodString;
1503
+ }, z.core.$strict>>;
907
1504
  }, z.core.$strip>;
908
1505
  }, z.core.$strip>, z.ZodObject<{
909
1506
  v: z.ZodNumber;
@@ -930,6 +1527,10 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
930
1527
  clientVersion: z.ZodString;
931
1528
  reportedAt: z.ZodISODateTime;
932
1529
  }, z.core.$strip>>;
1530
+ agentRef: z.ZodOptional<z.ZodObject<{
1531
+ agentId: z.ZodString;
1532
+ profileRevision: z.ZodString;
1533
+ }, z.core.$strict>>;
933
1534
  }, z.core.$strip>;
934
1535
  }, z.core.$strip>, z.ZodObject<{
935
1536
  v: z.ZodNumber;
@@ -955,6 +1556,10 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
955
1556
  clientVersion: z.ZodString;
956
1557
  reportedAt: z.ZodISODateTime;
957
1558
  }, z.core.$strip>>;
1559
+ agentRef: z.ZodOptional<z.ZodObject<{
1560
+ agentId: z.ZodString;
1561
+ profileRevision: z.ZodString;
1562
+ }, z.core.$strict>>;
958
1563
  }, z.core.$strip>;
959
1564
  }, z.core.$strip>, z.ZodObject<{
960
1565
  v: z.ZodNumber;
@@ -975,6 +1580,139 @@ export declare const MessagesSendRequestSchema: z.ZodObject<{
975
1580
  }>;
976
1581
  at: z.ZodISODateTime;
977
1582
  }, z.core.$strip>;
1583
+ }, z.core.$strip>, z.ZodObject<{
1584
+ v: z.ZodNumber;
1585
+ id: z.ZodUUID;
1586
+ ts: z.ZodISODateTime;
1587
+ type: z.ZodLiteral<"agent.egress.reliable">;
1588
+ task_id: z.ZodOptional<z.ZodString>;
1589
+ session_ref: z.ZodOptional<z.ZodString>;
1590
+ seq: z.ZodOptional<z.ZodNumber>;
1591
+ payload: z.ZodObject<{
1592
+ agentRef: z.ZodObject<{
1593
+ agentId: z.ZodString;
1594
+ profileRevision: z.ZodString;
1595
+ }, z.core.$strict>;
1596
+ sessionRef: z.ZodString;
1597
+ policyRevision: z.ZodString;
1598
+ eventId: z.ZodUUID;
1599
+ cursor: z.ZodNumber;
1600
+ payload: z.ZodJSONSchema;
1601
+ contentHash: z.ZodString;
1602
+ byteCount: z.ZodNumber;
1603
+ }, z.core.$strict>;
1604
+ }, z.core.$strip>, z.ZodObject<{
1605
+ v: z.ZodNumber;
1606
+ id: z.ZodUUID;
1607
+ ts: z.ZodISODateTime;
1608
+ type: z.ZodLiteral<"agent.content.receipt">;
1609
+ task_id: z.ZodOptional<z.ZodString>;
1610
+ session_ref: z.ZodOptional<z.ZodString>;
1611
+ seq: z.ZodOptional<z.ZodNumber>;
1612
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
1613
+ requestId: z.ZodUUID;
1614
+ eventId: z.ZodUUID;
1615
+ cursor: z.ZodNumber;
1616
+ surface: z.ZodEnum<{
1617
+ artifact: "artifact";
1618
+ transcript: "transcript";
1619
+ workspace: "workspace";
1620
+ }>;
1621
+ actor: z.ZodObject<{
1622
+ kind: z.ZodEnum<{
1623
+ agent: "agent";
1624
+ system: "system";
1625
+ user: "user";
1626
+ }>;
1627
+ id: z.ZodString;
1628
+ }, z.core.$strict>;
1629
+ agentRef: z.ZodObject<{
1630
+ agentId: z.ZodString;
1631
+ profileRevision: z.ZodString;
1632
+ }, z.core.$strict>;
1633
+ sessionRef: z.ZodString;
1634
+ runtime: z.ZodEnum<{
1635
+ claude: "claude";
1636
+ codex: "codex";
1637
+ pi: "pi";
1638
+ }>;
1639
+ cwd: z.ZodString;
1640
+ policyRevision: z.ZodString;
1641
+ target: z.ZodString;
1642
+ mimeType: z.ZodString;
1643
+ decodeAs: z.ZodEnum<{
1644
+ bytes: "bytes";
1645
+ utf8: "utf8";
1646
+ }>;
1647
+ decision: z.ZodLiteral<"allowed">;
1648
+ byteCount: z.ZodNumber;
1649
+ contentHash: z.ZodString;
1650
+ blobRef: z.ZodObject<{
1651
+ blobId: z.ZodString;
1652
+ contentHash: z.ZodString;
1653
+ size: z.ZodNumber;
1654
+ contentType: z.ZodString;
1655
+ url: z.ZodOptional<z.ZodString>;
1656
+ }, z.core.$strip>;
1657
+ }, z.core.$strict>, z.ZodObject<{
1658
+ requestId: z.ZodUUID;
1659
+ eventId: z.ZodUUID;
1660
+ cursor: z.ZodNumber;
1661
+ surface: z.ZodEnum<{
1662
+ artifact: "artifact";
1663
+ transcript: "transcript";
1664
+ workspace: "workspace";
1665
+ }>;
1666
+ actor: z.ZodObject<{
1667
+ kind: z.ZodEnum<{
1668
+ agent: "agent";
1669
+ system: "system";
1670
+ user: "user";
1671
+ }>;
1672
+ id: z.ZodString;
1673
+ }, z.core.$strict>;
1674
+ agentRef: z.ZodObject<{
1675
+ agentId: z.ZodString;
1676
+ profileRevision: z.ZodString;
1677
+ }, z.core.$strict>;
1678
+ sessionRef: z.ZodString;
1679
+ runtime: z.ZodEnum<{
1680
+ claude: "claude";
1681
+ codex: "codex";
1682
+ pi: "pi";
1683
+ }>;
1684
+ cwd: z.ZodString;
1685
+ policyRevision: z.ZodString;
1686
+ target: z.ZodString;
1687
+ mimeType: z.ZodString;
1688
+ decodeAs: z.ZodEnum<{
1689
+ bytes: "bytes";
1690
+ utf8: "utf8";
1691
+ }>;
1692
+ decision: z.ZodLiteral<"denied">;
1693
+ byteCount: z.ZodLiteral<0>;
1694
+ reason: z.ZodEnum<{
1695
+ "absolute-target": "absolute-target";
1696
+ "byte-limit": "byte-limit";
1697
+ "capability-missing": "capability-missing";
1698
+ "dot-segment": "dot-segment";
1699
+ "identity-mismatch": "identity-mismatch";
1700
+ "invalid-request": "invalid-request";
1701
+ "mime-not-allowlisted": "mime-not-allowlisted";
1702
+ "non-relative-target": "non-relative-target";
1703
+ "not-regular-file": "not-regular-file";
1704
+ "path-escape": "path-escape";
1705
+ "policy-disabled": "policy-disabled";
1706
+ "policy-revision-mismatch": "policy-revision-mismatch";
1707
+ "root-invalid": "root-invalid";
1708
+ "root-not-allowlisted": "root-not-allowlisted";
1709
+ "sensitive-name": "sensitive-name";
1710
+ symlink: "symlink";
1711
+ "target-missing": "target-missing";
1712
+ "text-decode-failed": "text-decode-failed";
1713
+ "text-not-allowlisted": "text-not-allowlisted";
1714
+ }>;
1715
+ }, z.core.$strict>], "decision">;
978
1716
  }, z.core.$strip>], "type">>;
979
1717
  }, z.core.$strip>;
980
1718
  export type MessagesSendRequest = z.infer<typeof MessagesSendRequestSchema>;