@byok-sdk/protocol 0.29.0 → 0.30.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.
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { EnvelopeSchema } from './envelope';
2
3
  /**
3
4
  * HTTP-side request/response shapes for the reference server's auth and blob
4
5
  * endpoints (M1 Part B). These are plain HTTP bodies, not wire envelopes —
@@ -151,1422 +152,11 @@ export type EventsPollResponse = z.infer<typeof EventsPollResponseSchema>;
151
152
  * hard-coded, driftable copy of it.
152
153
  */
153
154
  export declare const MAX_MESSAGES_PER_BATCH = 256;
155
+ /** Request body ceiling for `POST /byok/messages`; the cloud answers 413 above it, so the client chunks its drain by it. */
156
+ export declare const MESSAGES_SEND_MAX_BODY_BYTES: number;
157
+ /** Annotated so declaration emit names `EnvelopeSchema` instead of copying it. Type-only. */
154
158
  export declare const MessagesSendRequestSchema: z.ZodObject<{
155
- messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
156
- v: z.ZodNumber;
157
- id: z.ZodUUID;
158
- ts: z.ZodISODateTime;
159
- type: z.ZodLiteral<"conn.hello">;
160
- task_id: z.ZodOptional<z.ZodString>;
161
- session_ref: z.ZodOptional<z.ZodString>;
162
- seq: z.ZodOptional<z.ZodNumber>;
163
- payload: z.ZodObject<{
164
- protocolVersions: z.ZodArray<z.ZodNumber>;
165
- capabilities: z.ZodArray<z.ZodString>;
166
- deviceId: z.ZodString;
167
- productId: z.ZodString;
168
- clientVersion: z.ZodOptional<z.ZodString>;
169
- runtimes: z.ZodOptional<z.ZodArray<z.ZodObject<{
170
- id: z.ZodEnum<{
171
- claude: "claude";
172
- codex: "codex";
173
- pi: "pi";
174
- }>;
175
- version: z.ZodOptional<z.ZodString>;
176
- authPresent: z.ZodOptional<z.ZodBoolean>;
177
- capabilities: z.ZodOptional<z.ZodObject<{
178
- steer: z.ZodOptional<z.ZodBoolean>;
179
- resume: z.ZodOptional<z.ZodBoolean>;
180
- approvalInteractive: z.ZodOptional<z.ZodBoolean>;
181
- mcpToolsets: z.ZodOptional<z.ZodBoolean>;
182
- messageDraft: z.ZodOptional<z.ZodBoolean>;
183
- }, z.core.$strip>>;
184
- }, z.core.$strip>>>;
185
- harnesses: z.ZodOptional<z.ZodArray<z.ZodObject<{
186
- id: z.ZodString;
187
- version: z.ZodOptional<z.ZodString>;
188
- capabilities: z.ZodObject<{
189
- steer: z.ZodOptional<z.ZodBoolean>;
190
- resume: z.ZodOptional<z.ZodBoolean>;
191
- approvalInteractive: z.ZodOptional<z.ZodBoolean>;
192
- mcpToolsets: z.ZodOptional<z.ZodBoolean>;
193
- messageDraft: z.ZodOptional<z.ZodBoolean>;
194
- }, z.core.$strip>;
195
- }, z.core.$strip>>>;
196
- configuredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
197
- cursor: z.ZodOptional<z.ZodNumber>;
198
- }, z.core.$strip>;
199
- }, z.core.$strip>, z.ZodObject<{
200
- v: z.ZodNumber;
201
- id: z.ZodUUID;
202
- ts: z.ZodISODateTime;
203
- type: z.ZodLiteral<"conn.ack">;
204
- task_id: z.ZodOptional<z.ZodString>;
205
- session_ref: z.ZodOptional<z.ZodString>;
206
- seq: z.ZodNumber;
207
- payload: z.ZodObject<{
208
- protocolVersion: z.ZodNumber;
209
- capabilities: z.ZodArray<z.ZodString>;
210
- serverTime: z.ZodISODateTime;
211
- }, z.core.$strip>;
212
- }, z.core.$strip>, z.ZodObject<{
213
- v: z.ZodNumber;
214
- id: z.ZodUUID;
215
- ts: z.ZodISODateTime;
216
- type: z.ZodLiteral<"task.offer">;
217
- task_id: z.ZodString;
218
- session_ref: z.ZodOptional<z.ZodString>;
219
- seq: z.ZodNumber;
220
- payload: z.ZodObject<{
221
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
222
- blobRef: z.ZodObject<{
223
- blobId: z.ZodString;
224
- contentHash: z.ZodString;
225
- size: z.ZodNumber;
226
- contentType: z.ZodString;
227
- url: z.ZodOptional<z.ZodString>;
228
- }, z.core.$strip>;
229
- }, z.core.$strict>]>;
230
- runtime: z.ZodOptional<z.ZodEnum<{
231
- claude: "claude";
232
- codex: "codex";
233
- pi: "pi";
234
- }>>;
235
- harnessId: z.ZodOptional<z.ZodString>;
236
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
237
- lane: z.ZodLiteral<"subscription">;
238
- runtimeId: z.ZodEnum<{
239
- claude: "claude";
240
- codex: "codex";
241
- }>;
242
- providerId: z.ZodNull;
243
- modelId: z.ZodString;
244
- }, z.core.$strict>, z.ZodObject<{
245
- lane: z.ZodLiteral<"byok">;
246
- runtimeId: z.ZodLiteral<"pi">;
247
- providerId: z.ZodString;
248
- modelId: z.ZodString;
249
- }, z.core.$strict>, z.ZodObject<{
250
- lane: z.ZodLiteral<"byok-profile">;
251
- runtimeId: z.ZodLiteral<"pi">;
252
- providerProfile: z.ZodObject<{
253
- profileRef: z.ZodString;
254
- profileRevision: z.ZodString;
255
- profileHash: z.ZodString;
256
- modelId: z.ZodString;
257
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
258
- "image-input": "image-input";
259
- }>>;
260
- }, z.core.$strict>;
261
- }, z.core.$strict>], "lane">>;
262
- sessionRef: z.ZodOptional<z.ZodString>;
263
- workspaceHint: z.ZodOptional<z.ZodString>;
264
- limits: z.ZodOptional<z.ZodObject<{
265
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
266
- maxTokens: z.ZodOptional<z.ZodNumber>;
267
- }, z.core.$strip>>;
268
- }, z.core.$strip>;
269
- }, z.core.$strip>, z.ZodObject<{
270
- v: z.ZodNumber;
271
- id: z.ZodUUID;
272
- ts: z.ZodISODateTime;
273
- type: z.ZodLiteral<"task.offer_with_toolsets">;
274
- task_id: z.ZodString;
275
- session_ref: z.ZodOptional<z.ZodString>;
276
- seq: z.ZodNumber;
277
- payload: z.ZodObject<{
278
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
279
- blobRef: z.ZodObject<{
280
- blobId: z.ZodString;
281
- contentHash: z.ZodString;
282
- size: z.ZodNumber;
283
- contentType: z.ZodString;
284
- url: z.ZodOptional<z.ZodString>;
285
- }, z.core.$strip>;
286
- }, z.core.$strict>]>;
287
- runtime: z.ZodOptional<z.ZodEnum<{
288
- claude: "claude";
289
- codex: "codex";
290
- pi: "pi";
291
- }>>;
292
- harnessId: z.ZodOptional<z.ZodString>;
293
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
294
- lane: z.ZodLiteral<"subscription">;
295
- runtimeId: z.ZodEnum<{
296
- claude: "claude";
297
- codex: "codex";
298
- }>;
299
- providerId: z.ZodNull;
300
- modelId: z.ZodString;
301
- }, z.core.$strict>, z.ZodObject<{
302
- lane: z.ZodLiteral<"byok">;
303
- runtimeId: z.ZodLiteral<"pi">;
304
- providerId: z.ZodString;
305
- modelId: z.ZodString;
306
- }, z.core.$strict>, z.ZodObject<{
307
- lane: z.ZodLiteral<"byok-profile">;
308
- runtimeId: z.ZodLiteral<"pi">;
309
- providerProfile: z.ZodObject<{
310
- profileRef: z.ZodString;
311
- profileRevision: z.ZodString;
312
- profileHash: z.ZodString;
313
- modelId: z.ZodString;
314
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
315
- "image-input": "image-input";
316
- }>>;
317
- }, z.core.$strict>;
318
- }, z.core.$strict>], "lane">>;
319
- sessionRef: z.ZodOptional<z.ZodString>;
320
- workspaceHint: z.ZodOptional<z.ZodString>;
321
- limits: z.ZodOptional<z.ZodObject<{
322
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
323
- maxTokens: z.ZodOptional<z.ZodNumber>;
324
- }, z.core.$strip>>;
325
- requiredToolsets: z.ZodArray<z.ZodString>;
326
- }, z.core.$strict>;
327
- }, z.core.$strip>, z.ZodObject<{
328
- v: z.ZodNumber;
329
- id: z.ZodUUID;
330
- ts: z.ZodISODateTime;
331
- type: z.ZodLiteral<"task.offer_for_agent">;
332
- task_id: z.ZodString;
333
- session_ref: z.ZodOptional<z.ZodString>;
334
- seq: z.ZodNumber;
335
- payload: z.ZodObject<{
336
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
337
- blobRef: z.ZodObject<{
338
- blobId: z.ZodString;
339
- contentHash: z.ZodString;
340
- size: z.ZodNumber;
341
- contentType: z.ZodString;
342
- url: z.ZodOptional<z.ZodString>;
343
- }, z.core.$strip>;
344
- }, z.core.$strict>]>;
345
- agentRef: z.ZodObject<{
346
- agentId: z.ZodString;
347
- profileRevision: z.ZodString;
348
- }, z.core.$strict>;
349
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
350
- agentMemory: z.ZodOptional<z.ZodEnum<{
351
- none: "none";
352
- read: "read";
353
- "read-write": "read-write";
354
- }>>;
355
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
356
- runtime: z.ZodOptional<z.ZodEnum<{
357
- claude: "claude";
358
- codex: "codex";
359
- pi: "pi";
360
- }>>;
361
- harnessId: z.ZodOptional<z.ZodString>;
362
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
363
- lane: z.ZodLiteral<"subscription">;
364
- runtimeId: z.ZodEnum<{
365
- claude: "claude";
366
- codex: "codex";
367
- }>;
368
- providerId: z.ZodNull;
369
- modelId: z.ZodString;
370
- }, z.core.$strict>, z.ZodObject<{
371
- lane: z.ZodLiteral<"byok">;
372
- runtimeId: z.ZodLiteral<"pi">;
373
- providerId: z.ZodString;
374
- modelId: z.ZodString;
375
- }, z.core.$strict>, z.ZodObject<{
376
- lane: z.ZodLiteral<"byok-profile">;
377
- runtimeId: z.ZodLiteral<"pi">;
378
- providerProfile: z.ZodObject<{
379
- profileRef: z.ZodString;
380
- profileRevision: z.ZodString;
381
- profileHash: z.ZodString;
382
- modelId: z.ZodString;
383
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
384
- "image-input": "image-input";
385
- }>>;
386
- }, z.core.$strict>;
387
- }, z.core.$strict>], "lane">>;
388
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
389
- mode: z.ZodLiteral<"none">;
390
- }, z.core.$strict>, z.ZodObject<{
391
- mode: z.ZodLiteral<"result-document">;
392
- contract: z.ZodString;
393
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
394
- }, z.core.$strict>], "mode">>;
395
- sessionRef: z.ZodOptional<z.ZodString>;
396
- limits: z.ZodOptional<z.ZodObject<{
397
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
398
- maxTokens: z.ZodOptional<z.ZodNumber>;
399
- }, z.core.$strip>>;
400
- }, z.core.$strict>;
401
- }, z.core.$strip>, z.ZodObject<{
402
- v: z.ZodNumber;
403
- id: z.ZodUUID;
404
- ts: z.ZodISODateTime;
405
- type: z.ZodLiteral<"task.offer_for_agent_with_egress">;
406
- task_id: z.ZodString;
407
- session_ref: z.ZodOptional<z.ZodString>;
408
- seq: z.ZodNumber;
409
- payload: z.ZodObject<{
410
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
411
- blobRef: z.ZodObject<{
412
- blobId: z.ZodString;
413
- contentHash: z.ZodString;
414
- size: z.ZodNumber;
415
- contentType: z.ZodString;
416
- url: z.ZodOptional<z.ZodString>;
417
- }, z.core.$strip>;
418
- }, z.core.$strict>]>;
419
- agentRef: z.ZodObject<{
420
- agentId: z.ZodString;
421
- profileRevision: z.ZodString;
422
- }, z.core.$strict>;
423
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
424
- agentMemory: z.ZodOptional<z.ZodEnum<{
425
- none: "none";
426
- read: "read";
427
- "read-write": "read-write";
428
- }>>;
429
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
430
- runtime: z.ZodOptional<z.ZodEnum<{
431
- claude: "claude";
432
- codex: "codex";
433
- pi: "pi";
434
- }>>;
435
- harnessId: z.ZodOptional<z.ZodString>;
436
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
437
- lane: z.ZodLiteral<"subscription">;
438
- runtimeId: z.ZodEnum<{
439
- claude: "claude";
440
- codex: "codex";
441
- }>;
442
- providerId: z.ZodNull;
443
- modelId: z.ZodString;
444
- }, z.core.$strict>, z.ZodObject<{
445
- lane: z.ZodLiteral<"byok">;
446
- runtimeId: z.ZodLiteral<"pi">;
447
- providerId: z.ZodString;
448
- modelId: z.ZodString;
449
- }, z.core.$strict>, z.ZodObject<{
450
- lane: z.ZodLiteral<"byok-profile">;
451
- runtimeId: z.ZodLiteral<"pi">;
452
- providerProfile: z.ZodObject<{
453
- profileRef: z.ZodString;
454
- profileRevision: z.ZodString;
455
- profileHash: z.ZodString;
456
- modelId: z.ZodString;
457
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
458
- "image-input": "image-input";
459
- }>>;
460
- }, z.core.$strict>;
461
- }, z.core.$strict>], "lane">>;
462
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
463
- mode: z.ZodLiteral<"none">;
464
- }, z.core.$strict>, z.ZodObject<{
465
- mode: z.ZodLiteral<"result-document">;
466
- contract: z.ZodString;
467
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
468
- }, z.core.$strict>], "mode">>;
469
- limits: z.ZodOptional<z.ZodObject<{
470
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
471
- maxTokens: z.ZodOptional<z.ZodNumber>;
472
- }, z.core.$strip>>;
473
- sessionRef: z.ZodString;
474
- egressPolicy: z.ZodObject<{
475
- policyRevision: z.ZodString;
476
- activity: z.ZodObject<{
477
- delivery: z.ZodLiteral<"latest-value">;
478
- maxCoalesceMs: z.ZodNumber;
479
- maxEventBytes: z.ZodNumber;
480
- }, z.core.$strict>;
481
- reliable: z.ZodObject<{
482
- maxPendingEventsPerAgent: z.ZodNumber;
483
- maxPendingBytesPerAgent: z.ZodNumber;
484
- maxPendingBytesPerTenant: z.ZodNumber;
485
- }, z.core.$strict>;
486
- transfers: z.ZodObject<{
487
- workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
488
- maxBytes: z.ZodNumber;
489
- allowedMimeTypes: z.ZodArray<z.ZodString>;
490
- }, z.core.$strict>]>;
491
- transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
492
- maxBytes: z.ZodNumber;
493
- allowedMimeTypes: z.ZodArray<z.ZodString>;
494
- }, z.core.$strict>]>;
495
- artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
496
- maxBytes: z.ZodNumber;
497
- allowedMimeTypes: z.ZodArray<z.ZodString>;
498
- }, z.core.$strict>]>;
499
- }, z.core.$strict>;
500
- }, z.core.$strict>;
501
- messageEgress: z.ZodOptional<z.ZodObject<{
502
- mode: z.ZodLiteral<"required">;
503
- contract: z.ZodString;
504
- contentType: z.ZodEnum<{
505
- "text/markdown": "text/markdown";
506
- "text/plain": "text/plain";
507
- }>;
508
- maxBytes: z.ZodNumber;
509
- }, z.core.$strict>>;
510
- }, z.core.$strict>;
511
- }, z.core.$strip>, z.ZodObject<{
512
- v: z.ZodNumber;
513
- id: z.ZodUUID;
514
- ts: z.ZodISODateTime;
515
- type: z.ZodLiteral<"task.offer_for_agent_with_egress_fresh">;
516
- task_id: z.ZodString;
517
- session_ref: z.ZodOptional<z.ZodString>;
518
- seq: z.ZodNumber;
519
- payload: z.ZodObject<{
520
- instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
521
- blobRef: z.ZodObject<{
522
- blobId: z.ZodString;
523
- contentHash: z.ZodString;
524
- size: z.ZodNumber;
525
- contentType: z.ZodString;
526
- url: z.ZodOptional<z.ZodString>;
527
- }, z.core.$strip>;
528
- }, z.core.$strict>]>;
529
- agentRef: z.ZodObject<{
530
- agentId: z.ZodString;
531
- profileRevision: z.ZodString;
532
- }, z.core.$strict>;
533
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
534
- agentMemory: z.ZodOptional<z.ZodEnum<{
535
- none: "none";
536
- read: "read";
537
- "read-write": "read-write";
538
- }>>;
539
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
540
- runtime: z.ZodOptional<z.ZodEnum<{
541
- claude: "claude";
542
- codex: "codex";
543
- pi: "pi";
544
- }>>;
545
- harnessId: z.ZodOptional<z.ZodString>;
546
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
547
- lane: z.ZodLiteral<"subscription">;
548
- runtimeId: z.ZodEnum<{
549
- claude: "claude";
550
- codex: "codex";
551
- }>;
552
- providerId: z.ZodNull;
553
- modelId: z.ZodString;
554
- }, z.core.$strict>, z.ZodObject<{
555
- lane: z.ZodLiteral<"byok">;
556
- runtimeId: z.ZodLiteral<"pi">;
557
- providerId: z.ZodString;
558
- modelId: z.ZodString;
559
- }, z.core.$strict>, z.ZodObject<{
560
- lane: z.ZodLiteral<"byok-profile">;
561
- runtimeId: z.ZodLiteral<"pi">;
562
- providerProfile: z.ZodObject<{
563
- profileRef: z.ZodString;
564
- profileRevision: z.ZodString;
565
- profileHash: z.ZodString;
566
- modelId: z.ZodString;
567
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
568
- "image-input": "image-input";
569
- }>>;
570
- }, z.core.$strict>;
571
- }, z.core.$strict>], "lane">>;
572
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
573
- mode: z.ZodLiteral<"none">;
574
- }, z.core.$strict>, z.ZodObject<{
575
- mode: z.ZodLiteral<"result-document">;
576
- contract: z.ZodString;
577
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
578
- }, z.core.$strict>], "mode">>;
579
- limits: z.ZodOptional<z.ZodObject<{
580
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
581
- maxTokens: z.ZodOptional<z.ZodNumber>;
582
- }, z.core.$strip>>;
583
- egressPolicy: z.ZodObject<{
584
- policyRevision: z.ZodString;
585
- activity: z.ZodObject<{
586
- delivery: z.ZodLiteral<"latest-value">;
587
- maxCoalesceMs: z.ZodNumber;
588
- maxEventBytes: z.ZodNumber;
589
- }, z.core.$strict>;
590
- reliable: z.ZodObject<{
591
- maxPendingEventsPerAgent: z.ZodNumber;
592
- maxPendingBytesPerAgent: z.ZodNumber;
593
- maxPendingBytesPerTenant: z.ZodNumber;
594
- }, z.core.$strict>;
595
- transfers: z.ZodObject<{
596
- workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
597
- maxBytes: z.ZodNumber;
598
- allowedMimeTypes: z.ZodArray<z.ZodString>;
599
- }, z.core.$strict>]>;
600
- transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
601
- maxBytes: z.ZodNumber;
602
- allowedMimeTypes: z.ZodArray<z.ZodString>;
603
- }, z.core.$strict>]>;
604
- artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
605
- maxBytes: z.ZodNumber;
606
- allowedMimeTypes: z.ZodArray<z.ZodString>;
607
- }, z.core.$strict>]>;
608
- }, z.core.$strict>;
609
- }, z.core.$strict>;
610
- messageEgress: z.ZodOptional<z.ZodObject<{
611
- mode: z.ZodLiteral<"required">;
612
- contract: z.ZodString;
613
- contentType: z.ZodEnum<{
614
- "text/markdown": "text/markdown";
615
- "text/plain": "text/plain";
616
- }>;
617
- maxBytes: z.ZodNumber;
618
- }, z.core.$strict>>;
619
- }, z.core.$strict>;
620
- }, z.core.$strip>, z.ZodObject<{
621
- v: z.ZodNumber;
622
- id: z.ZodUUID;
623
- ts: z.ZodISODateTime;
624
- type: z.ZodLiteral<"task.offer_prepared">;
625
- task_id: z.ZodString;
626
- session_ref: z.ZodOptional<z.ZodString>;
627
- seq: z.ZodNumber;
628
- payload: z.ZodObject<{
629
- agentRef: z.ZodObject<{
630
- agentId: z.ZodString;
631
- profileRevision: z.ZodString;
632
- }, z.core.$strict>;
633
- homeAccess: z.ZodOptional<z.ZodLiteral<"memory-reader">>;
634
- requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
635
- runtime: z.ZodOptional<z.ZodEnum<{
636
- claude: "claude";
637
- codex: "codex";
638
- pi: "pi";
639
- }>>;
640
- harnessId: z.ZodOptional<z.ZodString>;
641
- dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
642
- lane: z.ZodLiteral<"subscription">;
643
- runtimeId: z.ZodEnum<{
644
- claude: "claude";
645
- codex: "codex";
646
- }>;
647
- providerId: z.ZodNull;
648
- modelId: z.ZodString;
649
- }, z.core.$strict>, z.ZodObject<{
650
- lane: z.ZodLiteral<"byok">;
651
- runtimeId: z.ZodLiteral<"pi">;
652
- providerId: z.ZodString;
653
- modelId: z.ZodString;
654
- }, z.core.$strict>, z.ZodObject<{
655
- lane: z.ZodLiteral<"byok-profile">;
656
- runtimeId: z.ZodLiteral<"pi">;
657
- providerProfile: z.ZodObject<{
658
- profileRef: z.ZodString;
659
- profileRevision: z.ZodString;
660
- profileHash: z.ZodString;
661
- modelId: z.ZodString;
662
- requiredCapabilities: z.ZodArray<z.ZodEnum<{
663
- "image-input": "image-input";
664
- }>>;
665
- }, z.core.$strict>;
666
- }, z.core.$strict>], "lane">>;
667
- terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
668
- mode: z.ZodLiteral<"none">;
669
- }, z.core.$strict>, z.ZodObject<{
670
- mode: z.ZodLiteral<"result-document">;
671
- contract: z.ZodString;
672
- schema: z.ZodCustom<import("./result-schema").ResultSchema, import("./result-schema").ResultSchema>;
673
- }, z.core.$strict>], "mode">>;
674
- limits: z.ZodOptional<z.ZodObject<{
675
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
676
- maxTokens: z.ZodOptional<z.ZodNumber>;
677
- }, z.core.$strip>>;
678
- preparation: z.ZodObject<{
679
- reference: z.ZodString;
680
- requestDigest: z.ZodString;
681
- artifactDigest: z.ZodOptional<z.ZodString>;
682
- }, z.core.$strict>;
683
- agentMemory: z.ZodEnum<{
684
- none: "none";
685
- read: "read";
686
- "read-write": "read-write";
687
- }>;
688
- egressPolicy: z.ZodObject<{
689
- policyRevision: z.ZodString;
690
- activity: z.ZodObject<{
691
- delivery: z.ZodLiteral<"latest-value">;
692
- maxCoalesceMs: z.ZodNumber;
693
- maxEventBytes: z.ZodNumber;
694
- }, z.core.$strict>;
695
- reliable: z.ZodObject<{
696
- maxPendingEventsPerAgent: z.ZodNumber;
697
- maxPendingBytesPerAgent: z.ZodNumber;
698
- maxPendingBytesPerTenant: z.ZodNumber;
699
- }, z.core.$strict>;
700
- transfers: z.ZodObject<{
701
- workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
702
- maxBytes: z.ZodNumber;
703
- allowedMimeTypes: z.ZodArray<z.ZodString>;
704
- }, z.core.$strict>]>;
705
- transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
706
- maxBytes: z.ZodNumber;
707
- allowedMimeTypes: z.ZodArray<z.ZodString>;
708
- }, z.core.$strict>]>;
709
- artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
710
- maxBytes: z.ZodNumber;
711
- allowedMimeTypes: z.ZodArray<z.ZodString>;
712
- }, z.core.$strict>]>;
713
- }, z.core.$strict>;
714
- }, z.core.$strict>;
715
- messageEgress: z.ZodOptional<z.ZodObject<{
716
- mode: z.ZodLiteral<"required">;
717
- contract: z.ZodString;
718
- contentType: z.ZodEnum<{
719
- "text/markdown": "text/markdown";
720
- "text/plain": "text/plain";
721
- }>;
722
- maxBytes: z.ZodNumber;
723
- }, z.core.$strict>>;
724
- }, z.core.$strict>;
725
- }, z.core.$strip>, z.ZodObject<{
726
- v: z.ZodNumber;
727
- id: z.ZodUUID;
728
- ts: z.ZodISODateTime;
729
- type: z.ZodLiteral<"agent.egress.ack">;
730
- task_id: z.ZodOptional<z.ZodString>;
731
- session_ref: z.ZodOptional<z.ZodString>;
732
- seq: z.ZodNumber;
733
- payload: z.ZodObject<{
734
- agentRef: z.ZodObject<{
735
- agentId: z.ZodString;
736
- profileRevision: z.ZodString;
737
- }, z.core.$strict>;
738
- sessionRef: z.ZodString;
739
- policyRevision: z.ZodString;
740
- eventId: z.ZodUUID;
741
- cursor: z.ZodNumber;
742
- receiptId: z.ZodUUID;
743
- }, z.core.$strict>;
744
- }, z.core.$strip>, z.ZodObject<{
745
- v: z.ZodNumber;
746
- id: z.ZodUUID;
747
- ts: z.ZodISODateTime;
748
- type: z.ZodLiteral<"agent.message.disposition">;
749
- task_id: z.ZodString;
750
- session_ref: z.ZodOptional<z.ZodString>;
751
- seq: z.ZodNumber;
752
- payload: z.ZodObject<{
753
- agentRef: z.ZodObject<{
754
- agentId: z.ZodString;
755
- profileRevision: z.ZodString;
756
- }, z.core.$strict>;
757
- sessionRef: z.ZodString;
758
- contract: z.ZodString;
759
- messageId: z.ZodUUID;
760
- cursor: z.ZodNumber;
761
- contentHash: z.ZodString;
762
- outcome: z.ZodEnum<{
763
- accepted: "accepted";
764
- held: "held";
765
- refused: "refused";
766
- }>;
767
- receiptId: z.ZodUUID;
768
- reasonCode: z.ZodOptional<z.ZodString>;
769
- }, z.core.$strict>;
770
- }, z.core.$strip>, z.ZodObject<{
771
- v: z.ZodNumber;
772
- id: z.ZodUUID;
773
- ts: z.ZodISODateTime;
774
- type: z.ZodLiteral<"agent.content.read">;
775
- task_id: z.ZodOptional<z.ZodString>;
776
- session_ref: z.ZodOptional<z.ZodString>;
777
- seq: z.ZodNumber;
778
- payload: z.ZodObject<{
779
- requestId: z.ZodUUID;
780
- surface: z.ZodEnum<{
781
- artifact: "artifact";
782
- transcript: "transcript";
783
- workspace: "workspace";
784
- }>;
785
- actor: z.ZodObject<{
786
- kind: z.ZodEnum<{
787
- agent: "agent";
788
- system: "system";
789
- user: "user";
790
- }>;
791
- id: z.ZodString;
792
- }, z.core.$strict>;
793
- agentRef: z.ZodObject<{
794
- agentId: z.ZodString;
795
- profileRevision: z.ZodString;
796
- }, z.core.$strict>;
797
- sessionRef: z.ZodString;
798
- runtime: z.ZodEnum<{
799
- claude: "claude";
800
- codex: "codex";
801
- pi: "pi";
802
- }>;
803
- cwd: z.ZodString;
804
- policyRevision: z.ZodString;
805
- target: z.ZodString;
806
- mimeType: z.ZodString;
807
- decodeAs: z.ZodEnum<{
808
- bytes: "bytes";
809
- utf8: "utf8";
810
- }>;
811
- policy: z.ZodObject<{
812
- maxBytes: z.ZodNumber;
813
- allowedMimeTypes: z.ZodArray<z.ZodString>;
814
- }, z.core.$strict>;
815
- }, z.core.$strict>;
816
- }, z.core.$strip>, z.ZodObject<{
817
- v: z.ZodNumber;
818
- id: z.ZodUUID;
819
- ts: z.ZodISODateTime;
820
- type: z.ZodLiteral<"agent.home.projection">;
821
- task_id: z.ZodOptional<z.ZodNever>;
822
- session_ref: z.ZodOptional<z.ZodString>;
823
- seq: z.ZodNumber;
824
- payload: z.ZodObject<{
825
- requestId: z.ZodUUID;
826
- agentRef: z.ZodObject<{
827
- agentId: z.ZodString;
828
- profileRevision: z.ZodString;
829
- }, z.core.$strict>;
830
- projectionHash: z.ZodString;
831
- projection: z.ZodType<import("./agent-home-projection").AgentHomeProjectionValue, unknown, z.core.$ZodTypeInternals<import("./agent-home-projection").AgentHomeProjectionValue, unknown>>;
832
- }, z.core.$strict>;
833
- }, z.core.$strip>, z.ZodObject<{
834
- v: z.ZodNumber;
835
- id: z.ZodUUID;
836
- ts: z.ZodISODateTime;
837
- type: z.ZodLiteral<"agent.input.preparation">;
838
- task_id: z.ZodOptional<z.ZodNever>;
839
- session_ref: z.ZodOptional<z.ZodString>;
840
- seq: z.ZodNumber;
841
- payload: z.ZodObject<{
842
- agentMemory: z.ZodEnum<{
843
- none: "none";
844
- read: "read";
845
- "read-write": "read-write";
846
- }>;
847
- requestId: z.ZodUUID;
848
- agentRef: z.ZodObject<{
849
- agentId: z.ZodString;
850
- profileRevision: z.ZodString;
851
- }, z.core.$strict>;
852
- profileId: z.ZodString;
853
- policyRevision: z.ZodString;
854
- source: z.ZodObject<{
855
- revision: z.ZodString;
856
- digest: z.ZodString;
857
- }, z.core.$strict>;
858
- selection: z.ZodObject<{
859
- model: z.ZodObject<{
860
- id: z.ZodString;
861
- name: z.ZodString;
862
- api: z.ZodLiteral<"openai-completions">;
863
- provider: z.ZodString;
864
- baseUrl: z.ZodString;
865
- reasoning: z.ZodBoolean;
866
- input: z.ZodArray<z.ZodEnum<{
867
- image: "image";
868
- text: "text";
869
- }>>;
870
- cost: z.ZodObject<{
871
- input: z.ZodNumber;
872
- output: z.ZodNumber;
873
- cacheRead: z.ZodNumber;
874
- cacheWrite: z.ZodNumber;
875
- }, z.core.$strict>;
876
- contextWindow: z.ZodNumber;
877
- maxTokens: z.ZodNumber;
878
- thinkingLevelMap: z.ZodOptional<z.ZodObject<{
879
- off: z.ZodNullable<z.ZodString>;
880
- minimal: z.ZodNullable<z.ZodString>;
881
- low: z.ZodNullable<z.ZodString>;
882
- medium: z.ZodNullable<z.ZodString>;
883
- high: z.ZodNullable<z.ZodString>;
884
- xhigh: z.ZodNullable<z.ZodString>;
885
- max: z.ZodNullable<z.ZodString>;
886
- }, z.core.$strict>>;
887
- compat: z.ZodOptional<z.ZodObject<{
888
- supportsStore: z.ZodOptional<z.ZodBoolean>;
889
- supportsDeveloperRole: z.ZodOptional<z.ZodBoolean>;
890
- supportsReasoningEffort: z.ZodOptional<z.ZodBoolean>;
891
- supportsUsageInStreaming: z.ZodOptional<z.ZodBoolean>;
892
- maxTokensField: z.ZodOptional<z.ZodEnum<{
893
- max_completion_tokens: "max_completion_tokens";
894
- max_tokens: "max_tokens";
895
- }>>;
896
- thinkingFormat: z.ZodOptional<z.ZodEnum<{
897
- "ant-ling": "ant-ling";
898
- baseten: "baseten";
899
- "chat-template": "chat-template";
900
- deepseek: "deepseek";
901
- openai: "openai";
902
- openrouter: "openrouter";
903
- qwen: "qwen";
904
- "qwen-chat-template": "qwen-chat-template";
905
- "string-thinking": "string-thinking";
906
- together: "together";
907
- zai: "zai";
908
- }>>;
909
- zaiToolStream: z.ZodOptional<z.ZodBoolean>;
910
- }, z.core.$strict>>;
911
- }, z.core.$strict>;
912
- options: z.ZodObject<{
913
- cacheRetention: z.ZodEnum<{
914
- long: "long";
915
- none: "none";
916
- short: "short";
917
- }>;
918
- maxTokens: z.ZodNumber;
919
- temperature: z.ZodOptional<z.ZodNumber>;
920
- toolChoice: z.ZodOptional<z.ZodEnum<{
921
- auto: "auto";
922
- none: "none";
923
- }>>;
924
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
925
- high: "high";
926
- low: "low";
927
- max: "max";
928
- medium: "medium";
929
- minimal: "minimal";
930
- xhigh: "xhigh";
931
- }>>;
932
- }, z.core.$strict>;
933
- }, z.core.$strict>;
934
- deadlineAt: z.ZodISODateTime;
935
- context: z.ZodUnion<readonly [z.ZodObject<{
936
- inline: z.ZodString;
937
- }, z.core.$strict>, z.ZodObject<{
938
- blobRef: z.ZodObject<{
939
- blobId: z.ZodString;
940
- contentHash: z.ZodString;
941
- size: z.ZodNumber;
942
- contentType: z.ZodString;
943
- url: z.ZodOptional<z.ZodString>;
944
- }, z.core.$strip>;
945
- contentHash: z.ZodString;
946
- }, z.core.$strict>]>;
947
- requiredToolsets: z.ZodArray<z.ZodString>;
948
- accountingPolicyRef: z.ZodOptional<z.ZodObject<{
949
- revision: z.ZodString;
950
- ruledRuntime: z.ZodString;
951
- ruledTarget: z.ZodObject<{
952
- endpoint: z.ZodString;
953
- modelId: z.ZodString;
954
- }, z.core.$strict>;
955
- ruledResidualKeys: z.ZodArray<z.ZodString>;
956
- }, z.core.$strict>>;
957
- }, z.core.$strict>;
958
- }, z.core.$strip>, z.ZodObject<{
959
- v: z.ZodNumber;
960
- id: z.ZodUUID;
961
- ts: z.ZodISODateTime;
962
- type: z.ZodLiteral<"provider.provisioning.available">;
963
- task_id: z.ZodOptional<z.ZodNever>;
964
- session_ref: z.ZodOptional<z.ZodString>;
965
- seq: z.ZodNumber;
966
- payload: z.ZodObject<{
967
- requestId: z.ZodUUID;
968
- }, z.core.$strict>;
969
- }, z.core.$strip>, z.ZodObject<{
970
- v: z.ZodNumber;
971
- id: z.ZodUUID;
972
- ts: z.ZodISODateTime;
973
- type: z.ZodLiteral<"agent.memory.intent.available">;
974
- task_id: z.ZodOptional<z.ZodNever>;
975
- session_ref: z.ZodOptional<z.ZodString>;
976
- seq: z.ZodNumber;
977
- payload: z.ZodObject<{
978
- intentId: z.ZodUUID;
979
- agentRef: z.ZodObject<{
980
- agentId: z.ZodString;
981
- profileRevision: z.ZodString;
982
- }, z.core.$strict>;
983
- }, z.core.$strict>;
984
- }, z.core.$strip>, z.ZodObject<{
985
- v: z.ZodNumber;
986
- id: z.ZodUUID;
987
- ts: z.ZodISODateTime;
988
- type: z.ZodLiteral<"task.approve">;
989
- task_id: z.ZodString;
990
- session_ref: z.ZodOptional<z.ZodString>;
991
- seq: z.ZodNumber;
992
- payload: z.ZodObject<{
993
- approvalId: z.ZodOptional<z.ZodString>;
994
- }, z.core.$strip>;
995
- }, z.core.$strip>, z.ZodObject<{
996
- v: z.ZodNumber;
997
- id: z.ZodUUID;
998
- ts: z.ZodISODateTime;
999
- type: z.ZodLiteral<"task.reject">;
1000
- task_id: z.ZodString;
1001
- session_ref: z.ZodOptional<z.ZodString>;
1002
- seq: z.ZodNumber;
1003
- payload: z.ZodObject<{
1004
- reason: z.ZodOptional<z.ZodString>;
1005
- approvalId: z.ZodOptional<z.ZodString>;
1006
- }, z.core.$strip>;
1007
- }, z.core.$strip>, z.ZodObject<{
1008
- v: z.ZodNumber;
1009
- id: z.ZodUUID;
1010
- ts: z.ZodISODateTime;
1011
- type: z.ZodLiteral<"task.cancel">;
1012
- task_id: z.ZodString;
1013
- session_ref: z.ZodOptional<z.ZodString>;
1014
- seq: z.ZodNumber;
1015
- payload: z.ZodObject<{
1016
- reason: z.ZodOptional<z.ZodString>;
1017
- }, z.core.$strip>;
1018
- }, z.core.$strip>, z.ZodObject<{
1019
- v: z.ZodNumber;
1020
- id: z.ZodUUID;
1021
- ts: z.ZodISODateTime;
1022
- type: z.ZodLiteral<"task.steer">;
1023
- task_id: z.ZodString;
1024
- session_ref: z.ZodOptional<z.ZodString>;
1025
- seq: z.ZodNumber;
1026
- payload: z.ZodObject<{
1027
- text: z.ZodString;
1028
- }, z.core.$strip>;
1029
- }, z.core.$strip>, z.ZodObject<{
1030
- v: z.ZodNumber;
1031
- id: z.ZodUUID;
1032
- ts: z.ZodISODateTime;
1033
- type: z.ZodLiteral<"task.claim">;
1034
- task_id: z.ZodString;
1035
- session_ref: z.ZodOptional<z.ZodString>;
1036
- seq: z.ZodOptional<z.ZodNumber>;
1037
- payload: z.ZodObject<{
1038
- deviceId: z.ZodString;
1039
- agentId: z.ZodOptional<z.ZodString>;
1040
- agentRef: z.ZodOptional<z.ZodObject<{
1041
- agentId: z.ZodString;
1042
- profileRevision: z.ZodString;
1043
- }, z.core.$strict>>;
1044
- runtime: z.ZodOptional<z.ZodEnum<{
1045
- claude: "claude";
1046
- codex: "codex";
1047
- pi: "pi";
1048
- }>>;
1049
- harnessId: z.ZodOptional<z.ZodString>;
1050
- capabilities: z.ZodOptional<z.ZodObject<{
1051
- steer: z.ZodOptional<z.ZodBoolean>;
1052
- resume: z.ZodOptional<z.ZodBoolean>;
1053
- approvalInteractive: z.ZodOptional<z.ZodBoolean>;
1054
- mcpToolsets: z.ZodOptional<z.ZodBoolean>;
1055
- messageDraft: z.ZodOptional<z.ZodBoolean>;
1056
- }, z.core.$strip>>;
1057
- }, z.core.$strip>;
1058
- }, z.core.$strip>, z.ZodObject<{
1059
- v: z.ZodNumber;
1060
- id: z.ZodUUID;
1061
- ts: z.ZodISODateTime;
1062
- type: z.ZodLiteral<"task.started">;
1063
- task_id: z.ZodString;
1064
- session_ref: z.ZodOptional<z.ZodString>;
1065
- seq: z.ZodOptional<z.ZodNumber>;
1066
- payload: z.ZodObject<{}, z.core.$strip>;
1067
- }, z.core.$strip>, z.ZodObject<{
1068
- v: z.ZodNumber;
1069
- id: z.ZodUUID;
1070
- ts: z.ZodISODateTime;
1071
- type: z.ZodLiteral<"task.decline">;
1072
- task_id: z.ZodString;
1073
- session_ref: z.ZodOptional<z.ZodString>;
1074
- seq: z.ZodOptional<z.ZodNumber>;
1075
- payload: z.ZodObject<{
1076
- reason: z.ZodString;
1077
- retryable: z.ZodOptional<z.ZodBoolean>;
1078
- agentRef: z.ZodOptional<z.ZodObject<{
1079
- agentId: z.ZodString;
1080
- profileRevision: z.ZodString;
1081
- }, z.core.$strict>>;
1082
- code: z.ZodOptional<z.ZodEnum<{
1083
- agent_home_reader_busy: "agent_home_reader_busy";
1084
- agent_home_writer_busy: "agent_home_writer_busy";
1085
- }>>;
1086
- }, z.core.$strip>;
1087
- }, z.core.$strip>, z.ZodObject<{
1088
- v: z.ZodNumber;
1089
- id: z.ZodUUID;
1090
- ts: z.ZodISODateTime;
1091
- type: z.ZodLiteral<"task.progress">;
1092
- task_id: z.ZodString;
1093
- session_ref: z.ZodOptional<z.ZodString>;
1094
- seq: z.ZodOptional<z.ZodNumber>;
1095
- payload: z.ZodObject<{
1096
- seq: z.ZodNumber;
1097
- events: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
1098
- type: z.ZodLiteral<"progress">;
1099
- text: z.ZodString;
1100
- }, z.core.$strip>, z.ZodObject<{
1101
- type: z.ZodLiteral<"tool_use">;
1102
- tool: z.ZodString;
1103
- mcp: z.ZodOptional<z.ZodObject<{
1104
- server: z.ZodString;
1105
- tool: z.ZodString;
1106
- }, z.core.$strict>>;
1107
- input: z.ZodOptional<z.ZodUnknown>;
1108
- toolCallId: z.ZodOptional<z.ZodString>;
1109
- spill: z.ZodOptional<z.ZodObject<{
1110
- field: z.ZodEnum<{
1111
- input: "input";
1112
- output: "output";
1113
- }>;
1114
- totalBytes: z.ZodNumber;
1115
- omittedBytes: z.ZodNumber;
1116
- contentType: z.ZodLiteral<"application/json">;
1117
- blob: z.ZodOptional<z.ZodObject<{
1118
- blobId: z.ZodString;
1119
- contentHash: z.ZodString;
1120
- size: z.ZodNumber;
1121
- contentType: z.ZodString;
1122
- url: z.ZodOptional<z.ZodString>;
1123
- }, z.core.$strip>>;
1124
- unstoredReason: z.ZodOptional<z.ZodString>;
1125
- }, z.core.$strict>>;
1126
- }, z.core.$strip>, z.ZodObject<{
1127
- type: z.ZodLiteral<"tool_result">;
1128
- tool: z.ZodString;
1129
- mcp: z.ZodOptional<z.ZodObject<{
1130
- server: z.ZodString;
1131
- tool: z.ZodString;
1132
- }, z.core.$strict>>;
1133
- output: z.ZodOptional<z.ZodUnknown>;
1134
- toolCallId: z.ZodOptional<z.ZodString>;
1135
- isError: z.ZodOptional<z.ZodBoolean>;
1136
- spill: z.ZodOptional<z.ZodObject<{
1137
- field: z.ZodEnum<{
1138
- input: "input";
1139
- output: "output";
1140
- }>;
1141
- totalBytes: z.ZodNumber;
1142
- omittedBytes: z.ZodNumber;
1143
- contentType: z.ZodLiteral<"application/json">;
1144
- blob: z.ZodOptional<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
- unstoredReason: z.ZodOptional<z.ZodString>;
1152
- }, z.core.$strict>>;
1153
- }, z.core.$strip>, z.ZodObject<{
1154
- type: z.ZodLiteral<"artifact">;
1155
- name: z.ZodString;
1156
- contentType: z.ZodString;
1157
- }, z.core.$strip>, z.ZodObject<{
1158
- type: z.ZodLiteral<"needs_approval">;
1159
- summary: z.ZodString;
1160
- }, z.core.$strip>, z.ZodObject<{
1161
- type: z.ZodLiteral<"turn_end">;
1162
- }, z.core.$strip>, z.ZodObject<{
1163
- type: z.ZodLiteral<"error">;
1164
- message: z.ZodString;
1165
- }, z.core.$strip>, z.ZodObject<{
1166
- type: z.ZodLiteral<"usage">;
1167
- inputTokens: z.ZodOptional<z.ZodNumber>;
1168
- cachedInputTokens: z.ZodOptional<z.ZodNumber>;
1169
- outputTokens: z.ZodOptional<z.ZodNumber>;
1170
- reasoningTokens: z.ZodOptional<z.ZodNumber>;
1171
- totalTokens: z.ZodOptional<z.ZodNumber>;
1172
- contextTokens: z.ZodOptional<z.ZodNumber>;
1173
- contextWindow: z.ZodOptional<z.ZodNumber>;
1174
- contextSource: z.ZodOptional<z.ZodEnum<{
1175
- estimate: "estimate";
1176
- provider: "provider";
1177
- }>>;
1178
- }, z.core.$strip>], "type">, z.ZodObject<{
1179
- type: z.ZodString;
1180
- }, z.core.$loose>]>>;
1181
- }, z.core.$strip>;
1182
- }, z.core.$strip>, z.ZodObject<{
1183
- v: z.ZodNumber;
1184
- id: z.ZodUUID;
1185
- ts: z.ZodISODateTime;
1186
- type: z.ZodLiteral<"task.artifact">;
1187
- task_id: z.ZodString;
1188
- session_ref: z.ZodOptional<z.ZodString>;
1189
- seq: z.ZodOptional<z.ZodNumber>;
1190
- payload: z.ZodObject<{
1191
- name: z.ZodString;
1192
- contentType: z.ZodString;
1193
- inline: z.ZodOptional<z.ZodString>;
1194
- blobRef: z.ZodOptional<z.ZodObject<{
1195
- blobId: z.ZodString;
1196
- contentHash: z.ZodString;
1197
- size: z.ZodNumber;
1198
- contentType: z.ZodString;
1199
- url: z.ZodOptional<z.ZodString>;
1200
- }, z.core.$strip>>;
1201
- }, z.core.$strip>;
1202
- }, z.core.$strip>, z.ZodObject<{
1203
- v: z.ZodNumber;
1204
- id: z.ZodUUID;
1205
- ts: z.ZodISODateTime;
1206
- type: z.ZodLiteral<"task.await_approval">;
1207
- task_id: z.ZodString;
1208
- session_ref: z.ZodOptional<z.ZodString>;
1209
- seq: z.ZodOptional<z.ZodNumber>;
1210
- payload: z.ZodObject<{
1211
- summary: z.ZodString;
1212
- approvalId: z.ZodOptional<z.ZodString>;
1213
- }, z.core.$strip>;
1214
- }, z.core.$strip>, z.ZodObject<{
1215
- v: z.ZodNumber;
1216
- id: z.ZodUUID;
1217
- ts: z.ZodISODateTime;
1218
- type: z.ZodLiteral<"task.complete">;
1219
- task_id: z.ZodString;
1220
- session_ref: z.ZodOptional<z.ZodString>;
1221
- seq: z.ZodOptional<z.ZodNumber>;
1222
- payload: z.ZodObject<{
1223
- harnessId: z.ZodOptional<z.ZodString>;
1224
- summary: z.ZodString;
1225
- finalMessage: z.ZodOptional<z.ZodString>;
1226
- sessionRef: z.ZodString;
1227
- artifactRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1228
- blobId: z.ZodString;
1229
- contentHash: z.ZodString;
1230
- size: z.ZodNumber;
1231
- contentType: z.ZodString;
1232
- url: z.ZodOptional<z.ZodString>;
1233
- }, z.core.$strip>>>;
1234
- document: z.ZodOptional<z.ZodUnknown>;
1235
- usage: z.ZodOptional<z.ZodObject<{
1236
- runtime: z.ZodEnum<{
1237
- claude: "claude";
1238
- codex: "codex";
1239
- pi: "pi";
1240
- }>;
1241
- provider: z.ZodOptional<z.ZodString>;
1242
- model: z.ZodOptional<z.ZodString>;
1243
- promptTokens: z.ZodOptional<z.ZodNumber>;
1244
- completionTokens: z.ZodOptional<z.ZodNumber>;
1245
- durationMs: z.ZodOptional<z.ZodNumber>;
1246
- clientVersion: z.ZodString;
1247
- reportedAt: z.ZodISODateTime;
1248
- }, z.core.$strip>>;
1249
- preparedObservation: z.ZodOptional<z.ZodObject<{
1250
- requestDigest: z.ZodString;
1251
- initialPromptTokens: z.ZodNumber;
1252
- maxPromptTokens: z.ZodNumber;
1253
- }, z.core.$strict>>;
1254
- agentRef: z.ZodOptional<z.ZodObject<{
1255
- agentId: z.ZodString;
1256
- profileRevision: z.ZodString;
1257
- }, z.core.$strict>>;
1258
- agentHomeProjection: z.ZodOptional<z.ZodObject<{
1259
- profileRevision: z.ZodString;
1260
- projectionHash: z.ZodString;
1261
- }, z.core.$strict>>;
1262
- agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1263
- outcome: z.ZodLiteral<"unchanged">;
1264
- }, z.core.$strict>, z.ZodObject<{
1265
- outcome: z.ZodLiteral<"reader-attributed">;
1266
- paths: z.ZodArray<z.ZodString>;
1267
- }, z.core.$strict>, z.ZodObject<{
1268
- outcome: z.ZodLiteral<"unattributed">;
1269
- paths: z.ZodArray<z.ZodString>;
1270
- }, z.core.$strict>, z.ZodObject<{
1271
- outcome: z.ZodLiteral<"unmeasured">;
1272
- }, z.core.$strict>], "outcome">>;
1273
- }, z.core.$strip>;
1274
- }, z.core.$strip>, z.ZodObject<{
1275
- v: z.ZodNumber;
1276
- id: z.ZodUUID;
1277
- ts: z.ZodISODateTime;
1278
- type: z.ZodLiteral<"task.fail">;
1279
- task_id: z.ZodString;
1280
- session_ref: z.ZodOptional<z.ZodString>;
1281
- seq: z.ZodOptional<z.ZodNumber>;
1282
- payload: z.ZodObject<{
1283
- recovery: z.ZodOptional<z.ZodObject<{
1284
- kind: z.ZodLiteral<"daemon_interrupted">;
1285
- offerId: z.ZodUUID;
1286
- }, z.core.$strict>>;
1287
- harnessId: z.ZodOptional<z.ZodString>;
1288
- reason: z.ZodString;
1289
- retryable: z.ZodOptional<z.ZodBoolean>;
1290
- usage: z.ZodOptional<z.ZodObject<{
1291
- runtime: z.ZodEnum<{
1292
- claude: "claude";
1293
- codex: "codex";
1294
- pi: "pi";
1295
- }>;
1296
- provider: z.ZodOptional<z.ZodString>;
1297
- model: z.ZodOptional<z.ZodString>;
1298
- promptTokens: z.ZodOptional<z.ZodNumber>;
1299
- completionTokens: z.ZodOptional<z.ZodNumber>;
1300
- durationMs: z.ZodOptional<z.ZodNumber>;
1301
- clientVersion: z.ZodString;
1302
- reportedAt: z.ZodISODateTime;
1303
- }, z.core.$strip>>;
1304
- preparedObservation: z.ZodOptional<z.ZodObject<{
1305
- requestDigest: z.ZodString;
1306
- initialPromptTokens: z.ZodNumber;
1307
- maxPromptTokens: z.ZodNumber;
1308
- }, z.core.$strict>>;
1309
- agentRef: z.ZodOptional<z.ZodObject<{
1310
- agentId: z.ZodString;
1311
- profileRevision: z.ZodString;
1312
- }, z.core.$strict>>;
1313
- agentHomeProjection: z.ZodOptional<z.ZodObject<{
1314
- profileRevision: z.ZodString;
1315
- projectionHash: z.ZodString;
1316
- }, z.core.$strict>>;
1317
- agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1318
- outcome: z.ZodLiteral<"unchanged">;
1319
- }, z.core.$strict>, z.ZodObject<{
1320
- outcome: z.ZodLiteral<"reader-attributed">;
1321
- paths: z.ZodArray<z.ZodString>;
1322
- }, z.core.$strict>, z.ZodObject<{
1323
- outcome: z.ZodLiteral<"unattributed">;
1324
- paths: z.ZodArray<z.ZodString>;
1325
- }, z.core.$strict>, z.ZodObject<{
1326
- outcome: z.ZodLiteral<"unmeasured">;
1327
- }, z.core.$strict>], "outcome">>;
1328
- }, z.core.$strip>;
1329
- }, z.core.$strip>, z.ZodObject<{
1330
- v: z.ZodNumber;
1331
- id: z.ZodUUID;
1332
- ts: z.ZodISODateTime;
1333
- type: z.ZodLiteral<"task.cancelled">;
1334
- task_id: z.ZodString;
1335
- session_ref: z.ZodOptional<z.ZodString>;
1336
- seq: z.ZodOptional<z.ZodNumber>;
1337
- payload: z.ZodObject<{
1338
- harnessId: z.ZodOptional<z.ZodString>;
1339
- reason: z.ZodOptional<z.ZodString>;
1340
- usage: z.ZodOptional<z.ZodObject<{
1341
- runtime: z.ZodEnum<{
1342
- claude: "claude";
1343
- codex: "codex";
1344
- pi: "pi";
1345
- }>;
1346
- provider: z.ZodOptional<z.ZodString>;
1347
- model: z.ZodOptional<z.ZodString>;
1348
- promptTokens: z.ZodOptional<z.ZodNumber>;
1349
- completionTokens: z.ZodOptional<z.ZodNumber>;
1350
- durationMs: z.ZodOptional<z.ZodNumber>;
1351
- clientVersion: z.ZodString;
1352
- reportedAt: z.ZodISODateTime;
1353
- }, z.core.$strip>>;
1354
- agentRef: z.ZodOptional<z.ZodObject<{
1355
- agentId: z.ZodString;
1356
- profileRevision: z.ZodString;
1357
- }, z.core.$strict>>;
1358
- agentHomeProjection: z.ZodOptional<z.ZodObject<{
1359
- profileRevision: z.ZodString;
1360
- projectionHash: z.ZodString;
1361
- }, z.core.$strict>>;
1362
- agentHomeMemoryChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1363
- outcome: z.ZodLiteral<"unchanged">;
1364
- }, z.core.$strict>, z.ZodObject<{
1365
- outcome: z.ZodLiteral<"reader-attributed">;
1366
- paths: z.ZodArray<z.ZodString>;
1367
- }, z.core.$strict>, z.ZodObject<{
1368
- outcome: z.ZodLiteral<"unattributed">;
1369
- paths: z.ZodArray<z.ZodString>;
1370
- }, z.core.$strict>, z.ZodObject<{
1371
- outcome: z.ZodLiteral<"unmeasured">;
1372
- }, z.core.$strict>], "outcome">>;
1373
- }, z.core.$strip>;
1374
- }, z.core.$strip>, z.ZodObject<{
1375
- v: z.ZodNumber;
1376
- id: z.ZodUUID;
1377
- ts: z.ZodISODateTime;
1378
- type: z.ZodLiteral<"task.approval_resolved">;
1379
- task_id: z.ZodString;
1380
- session_ref: z.ZodOptional<z.ZodString>;
1381
- seq: z.ZodOptional<z.ZodNumber>;
1382
- payload: z.ZodObject<{
1383
- approvalId: z.ZodString;
1384
- decision: z.ZodEnum<{
1385
- approve: "approve";
1386
- reject: "reject";
1387
- }>;
1388
- resolvedBy: z.ZodEnum<{
1389
- local: "local";
1390
- }>;
1391
- at: z.ZodISODateTime;
1392
- }, z.core.$strip>;
1393
- }, z.core.$strip>, z.ZodObject<{
1394
- v: z.ZodNumber;
1395
- id: z.ZodUUID;
1396
- ts: z.ZodISODateTime;
1397
- type: z.ZodLiteral<"agent.egress.reliable">;
1398
- task_id: z.ZodOptional<z.ZodString>;
1399
- session_ref: z.ZodOptional<z.ZodString>;
1400
- seq: z.ZodOptional<z.ZodNumber>;
1401
- payload: z.ZodObject<{
1402
- agentRef: z.ZodObject<{
1403
- agentId: z.ZodString;
1404
- profileRevision: z.ZodString;
1405
- }, z.core.$strict>;
1406
- sessionRef: z.ZodString;
1407
- policyRevision: z.ZodString;
1408
- eventId: z.ZodUUID;
1409
- cursor: z.ZodNumber;
1410
- payload: z.ZodJSONSchema;
1411
- contentHash: z.ZodString;
1412
- byteCount: z.ZodNumber;
1413
- }, z.core.$strict>;
1414
- }, z.core.$strip>, z.ZodObject<{
1415
- v: z.ZodNumber;
1416
- id: z.ZodUUID;
1417
- ts: z.ZodISODateTime;
1418
- type: z.ZodLiteral<"agent.message.draft">;
1419
- task_id: z.ZodString;
1420
- session_ref: z.ZodOptional<z.ZodString>;
1421
- seq: z.ZodOptional<z.ZodNumber>;
1422
- payload: z.ZodObject<{
1423
- agentRef: z.ZodObject<{
1424
- agentId: z.ZodString;
1425
- profileRevision: z.ZodString;
1426
- }, z.core.$strict>;
1427
- revision: z.ZodNumber;
1428
- offset: z.ZodNumber;
1429
- text: z.ZodString;
1430
- overflow: z.ZodOptional<z.ZodLiteral<true>>;
1431
- }, z.core.$strict>;
1432
- }, z.core.$strip>, z.ZodObject<{
1433
- v: z.ZodNumber;
1434
- id: z.ZodUUID;
1435
- ts: z.ZodISODateTime;
1436
- type: z.ZodLiteral<"agent.message.publish">;
1437
- task_id: z.ZodString;
1438
- session_ref: z.ZodOptional<z.ZodString>;
1439
- seq: z.ZodOptional<z.ZodNumber>;
1440
- payload: z.ZodObject<{
1441
- agentRef: z.ZodObject<{
1442
- agentId: z.ZodString;
1443
- profileRevision: z.ZodString;
1444
- }, z.core.$strict>;
1445
- sessionRef: z.ZodString;
1446
- contract: z.ZodString;
1447
- messageId: z.ZodUUID;
1448
- cursor: z.ZodNumber;
1449
- contentType: z.ZodEnum<{
1450
- "text/markdown": "text/markdown";
1451
- "text/plain": "text/plain";
1452
- }>;
1453
- body: z.ZodString;
1454
- contentHash: z.ZodString;
1455
- byteCount: z.ZodNumber;
1456
- }, z.core.$strict>;
1457
- }, z.core.$strip>, z.ZodObject<{
1458
- v: z.ZodNumber;
1459
- id: z.ZodUUID;
1460
- ts: z.ZodISODateTime;
1461
- type: z.ZodLiteral<"agent.content.receipt">;
1462
- task_id: z.ZodOptional<z.ZodString>;
1463
- session_ref: z.ZodOptional<z.ZodString>;
1464
- seq: z.ZodOptional<z.ZodNumber>;
1465
- payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
1466
- requestId: z.ZodUUID;
1467
- eventId: z.ZodUUID;
1468
- cursor: z.ZodNumber;
1469
- surface: z.ZodEnum<{
1470
- artifact: "artifact";
1471
- transcript: "transcript";
1472
- workspace: "workspace";
1473
- }>;
1474
- actor: z.ZodObject<{
1475
- kind: z.ZodEnum<{
1476
- agent: "agent";
1477
- system: "system";
1478
- user: "user";
1479
- }>;
1480
- id: z.ZodString;
1481
- }, z.core.$strict>;
1482
- agentRef: z.ZodObject<{
1483
- agentId: z.ZodString;
1484
- profileRevision: z.ZodString;
1485
- }, z.core.$strict>;
1486
- sessionRef: z.ZodString;
1487
- runtime: z.ZodEnum<{
1488
- claude: "claude";
1489
- codex: "codex";
1490
- pi: "pi";
1491
- }>;
1492
- cwd: z.ZodString;
1493
- policyRevision: z.ZodString;
1494
- target: z.ZodString;
1495
- mimeType: z.ZodString;
1496
- decodeAs: z.ZodEnum<{
1497
- bytes: "bytes";
1498
- utf8: "utf8";
1499
- }>;
1500
- decision: z.ZodLiteral<"allowed">;
1501
- byteCount: z.ZodNumber;
1502
- contentHash: z.ZodString;
1503
- blobRef: z.ZodObject<{
1504
- blobId: z.ZodString;
1505
- contentHash: z.ZodString;
1506
- size: z.ZodNumber;
1507
- contentType: z.ZodString;
1508
- url: z.ZodOptional<z.ZodString>;
1509
- }, z.core.$strip>;
1510
- }, z.core.$strict>, z.ZodObject<{
1511
- requestId: z.ZodUUID;
1512
- eventId: z.ZodUUID;
1513
- cursor: z.ZodNumber;
1514
- surface: z.ZodEnum<{
1515
- artifact: "artifact";
1516
- transcript: "transcript";
1517
- workspace: "workspace";
1518
- }>;
1519
- actor: z.ZodObject<{
1520
- kind: z.ZodEnum<{
1521
- agent: "agent";
1522
- system: "system";
1523
- user: "user";
1524
- }>;
1525
- id: z.ZodString;
1526
- }, z.core.$strict>;
1527
- agentRef: z.ZodObject<{
1528
- agentId: z.ZodString;
1529
- profileRevision: z.ZodString;
1530
- }, z.core.$strict>;
1531
- sessionRef: z.ZodString;
1532
- runtime: z.ZodEnum<{
1533
- claude: "claude";
1534
- codex: "codex";
1535
- pi: "pi";
1536
- }>;
1537
- cwd: z.ZodString;
1538
- policyRevision: z.ZodString;
1539
- target: z.ZodString;
1540
- mimeType: z.ZodString;
1541
- decodeAs: z.ZodEnum<{
1542
- bytes: "bytes";
1543
- utf8: "utf8";
1544
- }>;
1545
- decision: z.ZodLiteral<"denied">;
1546
- byteCount: z.ZodLiteral<0>;
1547
- reason: z.ZodEnum<{
1548
- "absolute-target": "absolute-target";
1549
- "byte-limit": "byte-limit";
1550
- "capability-missing": "capability-missing";
1551
- "dot-segment": "dot-segment";
1552
- "identity-mismatch": "identity-mismatch";
1553
- "invalid-request": "invalid-request";
1554
- "mime-not-allowlisted": "mime-not-allowlisted";
1555
- "non-relative-target": "non-relative-target";
1556
- "not-regular-file": "not-regular-file";
1557
- "path-escape": "path-escape";
1558
- "policy-disabled": "policy-disabled";
1559
- "policy-revision-mismatch": "policy-revision-mismatch";
1560
- "root-invalid": "root-invalid";
1561
- "root-not-allowlisted": "root-not-allowlisted";
1562
- "sensitive-name": "sensitive-name";
1563
- symlink: "symlink";
1564
- "target-missing": "target-missing";
1565
- "text-decode-failed": "text-decode-failed";
1566
- "text-not-allowlisted": "text-not-allowlisted";
1567
- }>;
1568
- }, z.core.$strict>], "decision">;
1569
- }, z.core.$strip>], "type">>;
159
+ messages: z.ZodArray<typeof EnvelopeSchema>;
1570
160
  }, z.core.$strip>;
1571
161
  export type MessagesSendRequest = z.infer<typeof MessagesSendRequestSchema>;
1572
162
  /**
@@ -2130,6 +720,14 @@ export declare const BYOK_RECORDS_PATH = "/byok/records";
2130
720
  export declare const BYOK_RECORD_ROUTE = "/byok/records/:kind/:key";
2131
721
  /** Client builder for a truth record path. Mirrors the `:kind/:key` template, each segment URL-encoded. */
2132
722
  export declare function byokRecordPath(kind: string, key: string): string;
723
+ /** `POST /byok/e2ee/member-key` — device proof: register the device's member key bundle and pairing MAC (#654). */
724
+ export declare const BYOK_E2EE_MEMBER_KEY_PATH = "/byok/e2ee/member-key";
725
+ /** `POST /byok/e2ee/chain` (device proof: append) and `GET` (device: read) — the member chain. */
726
+ export declare const BYOK_E2EE_CHAIN_PATH = "/byok/e2ee/chain";
727
+ /** `POST /byok/e2ee/key-packages` (device proof: put) and `GET` (device: this device's packages). */
728
+ export declare const BYOK_E2EE_KEY_PACKAGES_PATH = "/byok/e2ee/key-packages";
729
+ /** `GET /byok/e2ee/pairing-mac` — device: the client pairing MAC relayed to this device. */
730
+ export declare const BYOK_E2EE_PAIRING_MAC_PATH = "/byok/e2ee/pairing-mac";
2133
731
  /** `GET /byok/skill-packs` — skill-pack manifest catalogue. */
2134
732
  export declare const BYOK_SKILL_PACKS_PATH = "/byok/skill-packs";
2135
733
  /** Router template for a skill-pack file — `GET /byok/skill-packs/:name/files/:path`. */