@byok-sdk/protocol 0.12.0 → 0.14.0

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.
@@ -148,6 +148,18 @@ export declare const DispatchSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodObje
148
148
  runtimeId: z.ZodLiteral<"pi">;
149
149
  providerId: z.ZodString;
150
150
  modelId: z.ZodString;
151
+ }, z.core.$strict>, z.ZodObject<{
152
+ lane: z.ZodLiteral<"byok-profile">;
153
+ runtimeId: z.ZodLiteral<"pi">;
154
+ providerProfile: z.ZodObject<{
155
+ profileRef: z.ZodString;
156
+ profileRevision: z.ZodString;
157
+ profileHash: z.ZodString;
158
+ modelId: z.ZodString;
159
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
160
+ "image-input": "image-input";
161
+ }>>;
162
+ }, z.core.$strict>;
151
163
  }, z.core.$strict>], "lane">;
152
164
  export type DispatchSelection = z.infer<typeof DispatchSelectionSchema>;
153
165
  /**
@@ -196,6 +208,18 @@ export declare const TaskOfferPayloadSchema: z.ZodObject<{
196
208
  runtimeId: z.ZodLiteral<"pi">;
197
209
  providerId: z.ZodString;
198
210
  modelId: z.ZodString;
211
+ }, z.core.$strict>, z.ZodObject<{
212
+ lane: z.ZodLiteral<"byok-profile">;
213
+ runtimeId: z.ZodLiteral<"pi">;
214
+ providerProfile: z.ZodObject<{
215
+ profileRef: z.ZodString;
216
+ profileRevision: z.ZodString;
217
+ profileHash: z.ZodString;
218
+ modelId: z.ZodString;
219
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
220
+ "image-input": "image-input";
221
+ }>>;
222
+ }, z.core.$strict>;
199
223
  }, z.core.$strict>], "lane">>;
200
224
  sessionRef: z.ZodOptional<z.ZodString>;
201
225
  workspaceHint: z.ZodOptional<z.ZodString>;
@@ -255,6 +279,18 @@ export declare const TaskOfferWithToolsetsPayloadSchema: z.ZodObject<{
255
279
  runtimeId: z.ZodLiteral<"pi">;
256
280
  providerId: z.ZodString;
257
281
  modelId: z.ZodString;
282
+ }, z.core.$strict>, z.ZodObject<{
283
+ lane: z.ZodLiteral<"byok-profile">;
284
+ runtimeId: z.ZodLiteral<"pi">;
285
+ providerProfile: z.ZodObject<{
286
+ profileRef: z.ZodString;
287
+ profileRevision: z.ZodString;
288
+ profileHash: z.ZodString;
289
+ modelId: z.ZodString;
290
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
291
+ "image-input": "image-input";
292
+ }>>;
293
+ }, z.core.$strict>;
258
294
  }, z.core.$strict>], "lane">>;
259
295
  sessionRef: z.ZodOptional<z.ZodString>;
260
296
  workspaceHint: z.ZodOptional<z.ZodString>;
@@ -315,6 +351,18 @@ export declare const TaskOfferForAgentPayloadSchema: z.ZodObject<{
315
351
  runtimeId: z.ZodLiteral<"pi">;
316
352
  providerId: z.ZodString;
317
353
  modelId: z.ZodString;
354
+ }, z.core.$strict>, z.ZodObject<{
355
+ lane: z.ZodLiteral<"byok-profile">;
356
+ runtimeId: z.ZodLiteral<"pi">;
357
+ providerProfile: z.ZodObject<{
358
+ profileRef: z.ZodString;
359
+ profileRevision: z.ZodString;
360
+ profileHash: z.ZodString;
361
+ modelId: z.ZodString;
362
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
363
+ "image-input": "image-input";
364
+ }>>;
365
+ }, z.core.$strict>;
318
366
  }, z.core.$strict>], "lane">>;
319
367
  terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
320
368
  mode: z.ZodLiteral<"none">;
@@ -379,6 +427,18 @@ export declare const TaskOfferForAgentWithEgressPayloadSchema: z.ZodObject<{
379
427
  runtimeId: z.ZodLiteral<"pi">;
380
428
  providerId: z.ZodString;
381
429
  modelId: z.ZodString;
430
+ }, z.core.$strict>, z.ZodObject<{
431
+ lane: z.ZodLiteral<"byok-profile">;
432
+ runtimeId: z.ZodLiteral<"pi">;
433
+ providerProfile: z.ZodObject<{
434
+ profileRef: z.ZodString;
435
+ profileRevision: z.ZodString;
436
+ profileHash: z.ZodString;
437
+ modelId: z.ZodString;
438
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
439
+ "image-input": "image-input";
440
+ }>>;
441
+ }, z.core.$strict>;
382
442
  }, z.core.$strict>], "lane">>;
383
443
  terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
384
444
  mode: z.ZodLiteral<"none">;
@@ -484,6 +544,18 @@ export declare const TaskOfferForAgentWithEgressFreshPayloadSchema: z.ZodObject<
484
544
  runtimeId: z.ZodLiteral<"pi">;
485
545
  providerId: z.ZodString;
486
546
  modelId: z.ZodString;
547
+ }, z.core.$strict>, z.ZodObject<{
548
+ lane: z.ZodLiteral<"byok-profile">;
549
+ runtimeId: z.ZodLiteral<"pi">;
550
+ providerProfile: z.ZodObject<{
551
+ profileRef: z.ZodString;
552
+ profileRevision: z.ZodString;
553
+ profileHash: z.ZodString;
554
+ modelId: z.ZodString;
555
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
556
+ "image-input": "image-input";
557
+ }>>;
558
+ }, z.core.$strict>;
487
559
  }, z.core.$strict>], "lane">>;
488
560
  terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
489
561
  mode: z.ZodLiteral<"none">;
@@ -938,12 +1010,46 @@ export declare const TaskProgressPayloadSchema: z.ZodObject<{
938
1010
  tool: z.ZodString;
939
1011
  input: z.ZodOptional<z.ZodUnknown>;
940
1012
  toolCallId: z.ZodOptional<z.ZodString>;
1013
+ spill: z.ZodOptional<z.ZodObject<{
1014
+ field: z.ZodEnum<{
1015
+ input: "input";
1016
+ output: "output";
1017
+ }>;
1018
+ totalBytes: z.ZodNumber;
1019
+ omittedBytes: z.ZodNumber;
1020
+ contentType: z.ZodLiteral<"application/json">;
1021
+ blob: z.ZodOptional<z.ZodObject<{
1022
+ blobId: z.ZodString;
1023
+ contentHash: z.ZodString;
1024
+ size: z.ZodNumber;
1025
+ contentType: z.ZodString;
1026
+ url: z.ZodOptional<z.ZodString>;
1027
+ }, z.core.$strip>>;
1028
+ unstoredReason: z.ZodOptional<z.ZodString>;
1029
+ }, z.core.$strict>>;
941
1030
  }, z.core.$strip>, z.ZodObject<{
942
1031
  type: z.ZodLiteral<"tool_result">;
943
1032
  tool: z.ZodString;
944
1033
  output: z.ZodOptional<z.ZodUnknown>;
945
1034
  toolCallId: z.ZodOptional<z.ZodString>;
946
1035
  isError: z.ZodOptional<z.ZodBoolean>;
1036
+ spill: z.ZodOptional<z.ZodObject<{
1037
+ field: z.ZodEnum<{
1038
+ input: "input";
1039
+ output: "output";
1040
+ }>;
1041
+ totalBytes: z.ZodNumber;
1042
+ omittedBytes: z.ZodNumber;
1043
+ contentType: z.ZodLiteral<"application/json">;
1044
+ blob: z.ZodOptional<z.ZodObject<{
1045
+ blobId: z.ZodString;
1046
+ contentHash: z.ZodString;
1047
+ size: z.ZodNumber;
1048
+ contentType: z.ZodString;
1049
+ url: z.ZodOptional<z.ZodString>;
1050
+ }, z.core.$strip>>;
1051
+ unstoredReason: z.ZodOptional<z.ZodString>;
1052
+ }, z.core.$strict>>;
947
1053
  }, z.core.$strip>, z.ZodObject<{
948
1054
  type: z.ZodLiteral<"artifact">;
949
1055
  name: z.ZodString;
@@ -1295,37 +1401,424 @@ export declare const TaskApprovalResolvedPayloadSchema: z.ZodObject<{
1295
1401
  at: z.ZodISODateTime;
1296
1402
  }, z.core.$strip>;
1297
1403
  export type TaskApprovalResolvedPayload = z.infer<typeof TaskApprovalResolvedPayloadSchema>;
1298
- export declare const MESSAGE_PAYLOAD_SCHEMAS: {
1299
- readonly 'conn.hello': z.ZodObject<{
1300
- protocolVersions: z.ZodArray<z.ZodNumber>;
1301
- capabilities: z.ZodArray<z.ZodString>;
1302
- deviceId: z.ZodString;
1303
- productId: z.ZodString;
1304
- clientVersion: z.ZodOptional<z.ZodString>;
1305
- runtimes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1306
- id: z.ZodEnum<{
1404
+ /** Protocol-owned task-opening family; the wire registry consumes these same entries. */
1405
+ declare const TASK_OFFER_PAYLOAD_SCHEMAS: {
1406
+ readonly 'task.offer': z.ZodObject<{
1407
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1408
+ blobRef: z.ZodObject<{
1409
+ blobId: z.ZodString;
1410
+ contentHash: z.ZodString;
1411
+ size: z.ZodNumber;
1412
+ contentType: z.ZodString;
1413
+ url: z.ZodOptional<z.ZodString>;
1414
+ }, z.core.$strip>;
1415
+ }, z.core.$strict>]>;
1416
+ policy: z.ZodObject<{
1417
+ mode: z.ZodEnum<{
1418
+ auto: "auto";
1419
+ confirm: "confirm";
1420
+ plan: "plan";
1421
+ readonly: "readonly";
1422
+ }>;
1423
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1424
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1425
+ workspaceRoot: z.ZodOptional<z.ZodString>;
1426
+ network: z.ZodOptional<z.ZodBoolean>;
1427
+ }, z.core.$strict>;
1428
+ runtime: z.ZodOptional<z.ZodEnum<{
1429
+ claude: "claude";
1430
+ codex: "codex";
1431
+ pi: "pi";
1432
+ }>>;
1433
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1434
+ lane: z.ZodLiteral<"subscription">;
1435
+ runtimeId: z.ZodEnum<{
1307
1436
  claude: "claude";
1308
1437
  codex: "codex";
1309
- pi: "pi";
1310
1438
  }>;
1311
- version: z.ZodOptional<z.ZodString>;
1312
- authPresent: z.ZodOptional<z.ZodBoolean>;
1313
- capabilities: z.ZodOptional<z.ZodObject<{
1314
- steer: z.ZodOptional<z.ZodBoolean>;
1315
- resume: z.ZodOptional<z.ZodBoolean>;
1316
- approvalInteractive: z.ZodOptional<z.ZodBoolean>;
1317
- mcpToolsets: z.ZodOptional<z.ZodBoolean>;
1318
- permissionModes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1319
- }, z.core.$strip>>;
1320
- }, z.core.$strip>>>;
1321
- configuredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1322
- cursor: z.ZodOptional<z.ZodNumber>;
1323
- }, z.core.$strip>;
1324
- readonly 'conn.ack': z.ZodObject<{
1325
- protocolVersion: z.ZodNumber;
1326
- capabilities: z.ZodArray<z.ZodString>;
1327
- serverTime: z.ZodISODateTime;
1439
+ providerId: z.ZodNull;
1440
+ modelId: z.ZodString;
1441
+ }, z.core.$strict>, z.ZodObject<{
1442
+ lane: z.ZodLiteral<"byok">;
1443
+ runtimeId: z.ZodLiteral<"pi">;
1444
+ providerId: z.ZodString;
1445
+ modelId: z.ZodString;
1446
+ }, z.core.$strict>, z.ZodObject<{
1447
+ lane: z.ZodLiteral<"byok-profile">;
1448
+ runtimeId: z.ZodLiteral<"pi">;
1449
+ providerProfile: z.ZodObject<{
1450
+ profileRef: z.ZodString;
1451
+ profileRevision: z.ZodString;
1452
+ profileHash: z.ZodString;
1453
+ modelId: z.ZodString;
1454
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1455
+ "image-input": "image-input";
1456
+ }>>;
1457
+ }, z.core.$strict>;
1458
+ }, z.core.$strict>], "lane">>;
1459
+ sessionRef: z.ZodOptional<z.ZodString>;
1460
+ workspaceHint: z.ZodOptional<z.ZodString>;
1461
+ limits: z.ZodOptional<z.ZodObject<{
1462
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
1463
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1464
+ }, z.core.$strip>>;
1328
1465
  }, z.core.$strip>;
1466
+ readonly 'task.offer_with_toolsets': z.ZodObject<{
1467
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1468
+ blobRef: z.ZodObject<{
1469
+ blobId: z.ZodString;
1470
+ contentHash: z.ZodString;
1471
+ size: z.ZodNumber;
1472
+ contentType: z.ZodString;
1473
+ url: z.ZodOptional<z.ZodString>;
1474
+ }, z.core.$strip>;
1475
+ }, z.core.$strict>]>;
1476
+ policy: z.ZodObject<{
1477
+ mode: z.ZodEnum<{
1478
+ auto: "auto";
1479
+ confirm: "confirm";
1480
+ plan: "plan";
1481
+ readonly: "readonly";
1482
+ }>;
1483
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1484
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1485
+ workspaceRoot: z.ZodOptional<z.ZodString>;
1486
+ network: z.ZodOptional<z.ZodBoolean>;
1487
+ }, z.core.$strict>;
1488
+ runtime: z.ZodOptional<z.ZodEnum<{
1489
+ claude: "claude";
1490
+ codex: "codex";
1491
+ pi: "pi";
1492
+ }>>;
1493
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1494
+ lane: z.ZodLiteral<"subscription">;
1495
+ runtimeId: z.ZodEnum<{
1496
+ claude: "claude";
1497
+ codex: "codex";
1498
+ }>;
1499
+ providerId: z.ZodNull;
1500
+ modelId: z.ZodString;
1501
+ }, z.core.$strict>, z.ZodObject<{
1502
+ lane: z.ZodLiteral<"byok">;
1503
+ runtimeId: z.ZodLiteral<"pi">;
1504
+ providerId: z.ZodString;
1505
+ modelId: z.ZodString;
1506
+ }, z.core.$strict>, z.ZodObject<{
1507
+ lane: z.ZodLiteral<"byok-profile">;
1508
+ runtimeId: z.ZodLiteral<"pi">;
1509
+ providerProfile: z.ZodObject<{
1510
+ profileRef: z.ZodString;
1511
+ profileRevision: z.ZodString;
1512
+ profileHash: z.ZodString;
1513
+ modelId: z.ZodString;
1514
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1515
+ "image-input": "image-input";
1516
+ }>>;
1517
+ }, z.core.$strict>;
1518
+ }, z.core.$strict>], "lane">>;
1519
+ sessionRef: z.ZodOptional<z.ZodString>;
1520
+ workspaceHint: z.ZodOptional<z.ZodString>;
1521
+ limits: z.ZodOptional<z.ZodObject<{
1522
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
1523
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1524
+ }, z.core.$strip>>;
1525
+ requiredToolsets: z.ZodArray<z.ZodString>;
1526
+ }, z.core.$strict>;
1527
+ readonly 'task.offer_for_agent': z.ZodObject<{
1528
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1529
+ blobRef: z.ZodObject<{
1530
+ blobId: z.ZodString;
1531
+ contentHash: z.ZodString;
1532
+ size: z.ZodNumber;
1533
+ contentType: z.ZodString;
1534
+ url: z.ZodOptional<z.ZodString>;
1535
+ }, z.core.$strip>;
1536
+ }, z.core.$strict>]>;
1537
+ policy: z.ZodObject<{
1538
+ mode: z.ZodEnum<{
1539
+ auto: "auto";
1540
+ confirm: "confirm";
1541
+ plan: "plan";
1542
+ readonly: "readonly";
1543
+ }>;
1544
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1545
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1546
+ workspaceRoot: z.ZodOptional<z.ZodString>;
1547
+ network: z.ZodOptional<z.ZodBoolean>;
1548
+ }, z.core.$strict>;
1549
+ agentRef: z.ZodObject<{
1550
+ agentId: z.ZodString;
1551
+ profileRevision: z.ZodString;
1552
+ }, z.core.$strict>;
1553
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1554
+ runtime: z.ZodOptional<z.ZodEnum<{
1555
+ claude: "claude";
1556
+ codex: "codex";
1557
+ pi: "pi";
1558
+ }>>;
1559
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1560
+ lane: z.ZodLiteral<"subscription">;
1561
+ runtimeId: z.ZodEnum<{
1562
+ claude: "claude";
1563
+ codex: "codex";
1564
+ }>;
1565
+ providerId: z.ZodNull;
1566
+ modelId: z.ZodString;
1567
+ }, z.core.$strict>, z.ZodObject<{
1568
+ lane: z.ZodLiteral<"byok">;
1569
+ runtimeId: z.ZodLiteral<"pi">;
1570
+ providerId: z.ZodString;
1571
+ modelId: z.ZodString;
1572
+ }, z.core.$strict>, z.ZodObject<{
1573
+ lane: z.ZodLiteral<"byok-profile">;
1574
+ runtimeId: z.ZodLiteral<"pi">;
1575
+ providerProfile: z.ZodObject<{
1576
+ profileRef: z.ZodString;
1577
+ profileRevision: z.ZodString;
1578
+ profileHash: z.ZodString;
1579
+ modelId: z.ZodString;
1580
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1581
+ "image-input": "image-input";
1582
+ }>>;
1583
+ }, z.core.$strict>;
1584
+ }, z.core.$strict>], "lane">>;
1585
+ terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1586
+ mode: z.ZodLiteral<"none">;
1587
+ }, z.core.$strict>, z.ZodObject<{
1588
+ mode: z.ZodLiteral<"result-document">;
1589
+ contract: z.ZodString;
1590
+ }, z.core.$strict>], "mode">>;
1591
+ sessionRef: z.ZodOptional<z.ZodString>;
1592
+ limits: z.ZodOptional<z.ZodObject<{
1593
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
1594
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1595
+ }, z.core.$strip>>;
1596
+ }, z.core.$strict>;
1597
+ readonly 'task.offer_for_agent_with_egress': z.ZodObject<{
1598
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1599
+ blobRef: z.ZodObject<{
1600
+ blobId: z.ZodString;
1601
+ contentHash: z.ZodString;
1602
+ size: z.ZodNumber;
1603
+ contentType: z.ZodString;
1604
+ url: z.ZodOptional<z.ZodString>;
1605
+ }, z.core.$strip>;
1606
+ }, z.core.$strict>]>;
1607
+ policy: z.ZodObject<{
1608
+ mode: z.ZodEnum<{
1609
+ auto: "auto";
1610
+ confirm: "confirm";
1611
+ plan: "plan";
1612
+ readonly: "readonly";
1613
+ }>;
1614
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1615
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1616
+ workspaceRoot: z.ZodOptional<z.ZodString>;
1617
+ network: z.ZodOptional<z.ZodBoolean>;
1618
+ }, z.core.$strict>;
1619
+ agentRef: z.ZodObject<{
1620
+ agentId: z.ZodString;
1621
+ profileRevision: z.ZodString;
1622
+ }, z.core.$strict>;
1623
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1624
+ runtime: z.ZodOptional<z.ZodEnum<{
1625
+ claude: "claude";
1626
+ codex: "codex";
1627
+ pi: "pi";
1628
+ }>>;
1629
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1630
+ lane: z.ZodLiteral<"subscription">;
1631
+ runtimeId: z.ZodEnum<{
1632
+ claude: "claude";
1633
+ codex: "codex";
1634
+ }>;
1635
+ providerId: z.ZodNull;
1636
+ modelId: z.ZodString;
1637
+ }, z.core.$strict>, z.ZodObject<{
1638
+ lane: z.ZodLiteral<"byok">;
1639
+ runtimeId: z.ZodLiteral<"pi">;
1640
+ providerId: z.ZodString;
1641
+ modelId: z.ZodString;
1642
+ }, z.core.$strict>, z.ZodObject<{
1643
+ lane: z.ZodLiteral<"byok-profile">;
1644
+ runtimeId: z.ZodLiteral<"pi">;
1645
+ providerProfile: z.ZodObject<{
1646
+ profileRef: z.ZodString;
1647
+ profileRevision: z.ZodString;
1648
+ profileHash: z.ZodString;
1649
+ modelId: z.ZodString;
1650
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1651
+ "image-input": "image-input";
1652
+ }>>;
1653
+ }, z.core.$strict>;
1654
+ }, z.core.$strict>], "lane">>;
1655
+ terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1656
+ mode: z.ZodLiteral<"none">;
1657
+ }, z.core.$strict>, z.ZodObject<{
1658
+ mode: z.ZodLiteral<"result-document">;
1659
+ contract: z.ZodString;
1660
+ }, z.core.$strict>], "mode">>;
1661
+ limits: z.ZodOptional<z.ZodObject<{
1662
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
1663
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1664
+ }, z.core.$strip>>;
1665
+ sessionRef: z.ZodString;
1666
+ egressPolicy: z.ZodObject<{
1667
+ policyRevision: z.ZodString;
1668
+ activity: z.ZodDiscriminatedUnion<[z.ZodObject<{
1669
+ mode: z.ZodLiteral<"metadata-status">;
1670
+ delivery: z.ZodLiteral<"latest-value">;
1671
+ }, z.core.$strict>, z.ZodObject<{
1672
+ mode: z.ZodLiteral<"contentful-trajectory">;
1673
+ delivery: z.ZodLiteral<"latest-value">;
1674
+ maxCoalesceMs: z.ZodNumber;
1675
+ maxEventBytes: z.ZodNumber;
1676
+ }, z.core.$strict>], "mode">;
1677
+ reliable: z.ZodObject<{
1678
+ maxPendingEventsPerAgent: z.ZodNumber;
1679
+ maxPendingBytesPerAgent: z.ZodNumber;
1680
+ maxPendingBytesPerTenant: z.ZodNumber;
1681
+ }, z.core.$strict>;
1682
+ transfers: z.ZodObject<{
1683
+ workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1684
+ maxBytes: z.ZodNumber;
1685
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1686
+ }, z.core.$strict>]>;
1687
+ transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1688
+ maxBytes: z.ZodNumber;
1689
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1690
+ }, z.core.$strict>]>;
1691
+ artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1692
+ maxBytes: z.ZodNumber;
1693
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1694
+ }, z.core.$strict>]>;
1695
+ }, z.core.$strict>;
1696
+ }, z.core.$strict>;
1697
+ messageEgress: z.ZodOptional<z.ZodObject<{
1698
+ mode: z.ZodLiteral<"required">;
1699
+ contract: z.ZodString;
1700
+ contentType: z.ZodEnum<{
1701
+ "text/markdown": "text/markdown";
1702
+ "text/plain": "text/plain";
1703
+ }>;
1704
+ maxBytes: z.ZodNumber;
1705
+ }, z.core.$strict>>;
1706
+ }, z.core.$strict>;
1707
+ readonly 'task.offer_for_agent_with_egress_fresh': z.ZodObject<{
1708
+ instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1709
+ blobRef: z.ZodObject<{
1710
+ blobId: z.ZodString;
1711
+ contentHash: z.ZodString;
1712
+ size: z.ZodNumber;
1713
+ contentType: z.ZodString;
1714
+ url: z.ZodOptional<z.ZodString>;
1715
+ }, z.core.$strip>;
1716
+ }, z.core.$strict>]>;
1717
+ policy: z.ZodObject<{
1718
+ mode: z.ZodEnum<{
1719
+ auto: "auto";
1720
+ confirm: "confirm";
1721
+ plan: "plan";
1722
+ readonly: "readonly";
1723
+ }>;
1724
+ allowTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1725
+ denyTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1726
+ workspaceRoot: z.ZodOptional<z.ZodString>;
1727
+ network: z.ZodOptional<z.ZodBoolean>;
1728
+ }, z.core.$strict>;
1729
+ agentRef: z.ZodObject<{
1730
+ agentId: z.ZodString;
1731
+ profileRevision: z.ZodString;
1732
+ }, z.core.$strict>;
1733
+ requiredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1734
+ runtime: z.ZodOptional<z.ZodEnum<{
1735
+ claude: "claude";
1736
+ codex: "codex";
1737
+ pi: "pi";
1738
+ }>>;
1739
+ dispatchSelection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1740
+ lane: z.ZodLiteral<"subscription">;
1741
+ runtimeId: z.ZodEnum<{
1742
+ claude: "claude";
1743
+ codex: "codex";
1744
+ }>;
1745
+ providerId: z.ZodNull;
1746
+ modelId: z.ZodString;
1747
+ }, z.core.$strict>, z.ZodObject<{
1748
+ lane: z.ZodLiteral<"byok">;
1749
+ runtimeId: z.ZodLiteral<"pi">;
1750
+ providerId: z.ZodString;
1751
+ modelId: z.ZodString;
1752
+ }, z.core.$strict>, z.ZodObject<{
1753
+ lane: z.ZodLiteral<"byok-profile">;
1754
+ runtimeId: z.ZodLiteral<"pi">;
1755
+ providerProfile: z.ZodObject<{
1756
+ profileRef: z.ZodString;
1757
+ profileRevision: z.ZodString;
1758
+ profileHash: z.ZodString;
1759
+ modelId: z.ZodString;
1760
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1761
+ "image-input": "image-input";
1762
+ }>>;
1763
+ }, z.core.$strict>;
1764
+ }, z.core.$strict>], "lane">>;
1765
+ terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1766
+ mode: z.ZodLiteral<"none">;
1767
+ }, z.core.$strict>, z.ZodObject<{
1768
+ mode: z.ZodLiteral<"result-document">;
1769
+ contract: z.ZodString;
1770
+ }, z.core.$strict>], "mode">>;
1771
+ limits: z.ZodOptional<z.ZodObject<{
1772
+ maxDurationMs: z.ZodOptional<z.ZodNumber>;
1773
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1774
+ }, z.core.$strip>>;
1775
+ egressPolicy: z.ZodObject<{
1776
+ policyRevision: z.ZodString;
1777
+ activity: z.ZodDiscriminatedUnion<[z.ZodObject<{
1778
+ mode: z.ZodLiteral<"metadata-status">;
1779
+ delivery: z.ZodLiteral<"latest-value">;
1780
+ }, z.core.$strict>, z.ZodObject<{
1781
+ mode: z.ZodLiteral<"contentful-trajectory">;
1782
+ delivery: z.ZodLiteral<"latest-value">;
1783
+ maxCoalesceMs: z.ZodNumber;
1784
+ maxEventBytes: z.ZodNumber;
1785
+ }, z.core.$strict>], "mode">;
1786
+ reliable: z.ZodObject<{
1787
+ maxPendingEventsPerAgent: z.ZodNumber;
1788
+ maxPendingBytesPerAgent: z.ZodNumber;
1789
+ maxPendingBytesPerTenant: z.ZodNumber;
1790
+ }, z.core.$strict>;
1791
+ transfers: z.ZodObject<{
1792
+ workspace: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1793
+ maxBytes: z.ZodNumber;
1794
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1795
+ }, z.core.$strict>]>;
1796
+ transcript: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1797
+ maxBytes: z.ZodNumber;
1798
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1799
+ }, z.core.$strict>]>;
1800
+ artifact: z.ZodUnion<readonly [z.ZodLiteral<"disabled">, z.ZodObject<{
1801
+ maxBytes: z.ZodNumber;
1802
+ allowedMimeTypes: z.ZodArray<z.ZodString>;
1803
+ }, z.core.$strict>]>;
1804
+ }, z.core.$strict>;
1805
+ }, z.core.$strict>;
1806
+ messageEgress: z.ZodOptional<z.ZodObject<{
1807
+ mode: z.ZodLiteral<"required">;
1808
+ contract: z.ZodString;
1809
+ contentType: z.ZodEnum<{
1810
+ "text/markdown": "text/markdown";
1811
+ "text/plain": "text/plain";
1812
+ }>;
1813
+ maxBytes: z.ZodNumber;
1814
+ }, z.core.$strict>>;
1815
+ }, z.core.$strict>;
1816
+ };
1817
+ export type TaskOfferType = keyof typeof TASK_OFFER_PAYLOAD_SCHEMAS;
1818
+ export declare const TASK_OFFER_TYPES: readonly TaskOfferType[];
1819
+ /** Classify task-opening offers without duplicating the protocol registry in consumers. */
1820
+ export declare function isTaskOfferType(type: string): type is TaskOfferType;
1821
+ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
1329
1822
  readonly 'task.offer': z.ZodObject<{
1330
1823
  instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1331
1824
  blobRef: z.ZodObject<{
@@ -1366,6 +1859,18 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
1366
1859
  runtimeId: z.ZodLiteral<"pi">;
1367
1860
  providerId: z.ZodString;
1368
1861
  modelId: z.ZodString;
1862
+ }, z.core.$strict>, z.ZodObject<{
1863
+ lane: z.ZodLiteral<"byok-profile">;
1864
+ runtimeId: z.ZodLiteral<"pi">;
1865
+ providerProfile: z.ZodObject<{
1866
+ profileRef: z.ZodString;
1867
+ profileRevision: z.ZodString;
1868
+ profileHash: z.ZodString;
1869
+ modelId: z.ZodString;
1870
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1871
+ "image-input": "image-input";
1872
+ }>>;
1873
+ }, z.core.$strict>;
1369
1874
  }, z.core.$strict>], "lane">>;
1370
1875
  sessionRef: z.ZodOptional<z.ZodString>;
1371
1876
  workspaceHint: z.ZodOptional<z.ZodString>;
@@ -1414,6 +1919,18 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
1414
1919
  runtimeId: z.ZodLiteral<"pi">;
1415
1920
  providerId: z.ZodString;
1416
1921
  modelId: z.ZodString;
1922
+ }, z.core.$strict>, z.ZodObject<{
1923
+ lane: z.ZodLiteral<"byok-profile">;
1924
+ runtimeId: z.ZodLiteral<"pi">;
1925
+ providerProfile: z.ZodObject<{
1926
+ profileRef: z.ZodString;
1927
+ profileRevision: z.ZodString;
1928
+ profileHash: z.ZodString;
1929
+ modelId: z.ZodString;
1930
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1931
+ "image-input": "image-input";
1932
+ }>>;
1933
+ }, z.core.$strict>;
1417
1934
  }, z.core.$strict>], "lane">>;
1418
1935
  sessionRef: z.ZodOptional<z.ZodString>;
1419
1936
  workspaceHint: z.ZodOptional<z.ZodString>;
@@ -1468,6 +1985,18 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
1468
1985
  runtimeId: z.ZodLiteral<"pi">;
1469
1986
  providerId: z.ZodString;
1470
1987
  modelId: z.ZodString;
1988
+ }, z.core.$strict>, z.ZodObject<{
1989
+ lane: z.ZodLiteral<"byok-profile">;
1990
+ runtimeId: z.ZodLiteral<"pi">;
1991
+ providerProfile: z.ZodObject<{
1992
+ profileRef: z.ZodString;
1993
+ profileRevision: z.ZodString;
1994
+ profileHash: z.ZodString;
1995
+ modelId: z.ZodString;
1996
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
1997
+ "image-input": "image-input";
1998
+ }>>;
1999
+ }, z.core.$strict>;
1471
2000
  }, z.core.$strict>], "lane">>;
1472
2001
  terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1473
2002
  mode: z.ZodLiteral<"none">;
@@ -1526,6 +2055,18 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
1526
2055
  runtimeId: z.ZodLiteral<"pi">;
1527
2056
  providerId: z.ZodString;
1528
2057
  modelId: z.ZodString;
2058
+ }, z.core.$strict>, z.ZodObject<{
2059
+ lane: z.ZodLiteral<"byok-profile">;
2060
+ runtimeId: z.ZodLiteral<"pi">;
2061
+ providerProfile: z.ZodObject<{
2062
+ profileRef: z.ZodString;
2063
+ profileRevision: z.ZodString;
2064
+ profileHash: z.ZodString;
2065
+ modelId: z.ZodString;
2066
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
2067
+ "image-input": "image-input";
2068
+ }>>;
2069
+ }, z.core.$strict>;
1529
2070
  }, z.core.$strict>], "lane">>;
1530
2071
  terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1531
2072
  mode: z.ZodLiteral<"none">;
@@ -1624,6 +2165,18 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
1624
2165
  runtimeId: z.ZodLiteral<"pi">;
1625
2166
  providerId: z.ZodString;
1626
2167
  modelId: z.ZodString;
2168
+ }, z.core.$strict>, z.ZodObject<{
2169
+ lane: z.ZodLiteral<"byok-profile">;
2170
+ runtimeId: z.ZodLiteral<"pi">;
2171
+ providerProfile: z.ZodObject<{
2172
+ profileRef: z.ZodString;
2173
+ profileRevision: z.ZodString;
2174
+ profileHash: z.ZodString;
2175
+ modelId: z.ZodString;
2176
+ requiredCapabilities: z.ZodArray<z.ZodEnum<{
2177
+ "image-input": "image-input";
2178
+ }>>;
2179
+ }, z.core.$strict>;
1627
2180
  }, z.core.$strict>], "lane">>;
1628
2181
  terminalProjection: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1629
2182
  mode: z.ZodLiteral<"none">;
@@ -1676,6 +2229,36 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
1676
2229
  maxBytes: z.ZodNumber;
1677
2230
  }, z.core.$strict>>;
1678
2231
  }, z.core.$strict>;
2232
+ readonly 'conn.hello': z.ZodObject<{
2233
+ protocolVersions: z.ZodArray<z.ZodNumber>;
2234
+ capabilities: z.ZodArray<z.ZodString>;
2235
+ deviceId: z.ZodString;
2236
+ productId: z.ZodString;
2237
+ clientVersion: z.ZodOptional<z.ZodString>;
2238
+ runtimes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2239
+ id: z.ZodEnum<{
2240
+ claude: "claude";
2241
+ codex: "codex";
2242
+ pi: "pi";
2243
+ }>;
2244
+ version: z.ZodOptional<z.ZodString>;
2245
+ authPresent: z.ZodOptional<z.ZodBoolean>;
2246
+ capabilities: z.ZodOptional<z.ZodObject<{
2247
+ steer: z.ZodOptional<z.ZodBoolean>;
2248
+ resume: z.ZodOptional<z.ZodBoolean>;
2249
+ approvalInteractive: z.ZodOptional<z.ZodBoolean>;
2250
+ mcpToolsets: z.ZodOptional<z.ZodBoolean>;
2251
+ permissionModes: z.ZodOptional<z.ZodArray<z.ZodString>>;
2252
+ }, z.core.$strip>>;
2253
+ }, z.core.$strip>>>;
2254
+ configuredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
2255
+ cursor: z.ZodOptional<z.ZodNumber>;
2256
+ }, z.core.$strip>;
2257
+ readonly 'conn.ack': z.ZodObject<{
2258
+ protocolVersion: z.ZodNumber;
2259
+ capabilities: z.ZodArray<z.ZodString>;
2260
+ serverTime: z.ZodISODateTime;
2261
+ }, z.core.$strip>;
1679
2262
  readonly 'agent.egress.reliable': z.ZodObject<{
1680
2263
  agentRef: z.ZodObject<{
1681
2264
  agentId: z.ZodString;
@@ -1938,12 +2521,46 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
1938
2521
  tool: z.ZodString;
1939
2522
  input: z.ZodOptional<z.ZodUnknown>;
1940
2523
  toolCallId: z.ZodOptional<z.ZodString>;
2524
+ spill: z.ZodOptional<z.ZodObject<{
2525
+ field: z.ZodEnum<{
2526
+ input: "input";
2527
+ output: "output";
2528
+ }>;
2529
+ totalBytes: z.ZodNumber;
2530
+ omittedBytes: z.ZodNumber;
2531
+ contentType: z.ZodLiteral<"application/json">;
2532
+ blob: z.ZodOptional<z.ZodObject<{
2533
+ blobId: z.ZodString;
2534
+ contentHash: z.ZodString;
2535
+ size: z.ZodNumber;
2536
+ contentType: z.ZodString;
2537
+ url: z.ZodOptional<z.ZodString>;
2538
+ }, z.core.$strip>>;
2539
+ unstoredReason: z.ZodOptional<z.ZodString>;
2540
+ }, z.core.$strict>>;
1941
2541
  }, z.core.$strip>, z.ZodObject<{
1942
2542
  type: z.ZodLiteral<"tool_result">;
1943
2543
  tool: z.ZodString;
1944
2544
  output: z.ZodOptional<z.ZodUnknown>;
1945
2545
  toolCallId: z.ZodOptional<z.ZodString>;
1946
2546
  isError: z.ZodOptional<z.ZodBoolean>;
2547
+ spill: z.ZodOptional<z.ZodObject<{
2548
+ field: z.ZodEnum<{
2549
+ input: "input";
2550
+ output: "output";
2551
+ }>;
2552
+ totalBytes: z.ZodNumber;
2553
+ omittedBytes: z.ZodNumber;
2554
+ contentType: z.ZodLiteral<"application/json">;
2555
+ blob: z.ZodOptional<z.ZodObject<{
2556
+ blobId: z.ZodString;
2557
+ contentHash: z.ZodString;
2558
+ size: z.ZodNumber;
2559
+ contentType: z.ZodString;
2560
+ url: z.ZodOptional<z.ZodString>;
2561
+ }, z.core.$strip>>;
2562
+ unstoredReason: z.ZodOptional<z.ZodString>;
2563
+ }, z.core.$strict>>;
1947
2564
  }, z.core.$strip>, z.ZodObject<{
1948
2565
  type: z.ZodLiteral<"artifact">;
1949
2566
  name: z.ZodString;
@@ -2089,3 +2706,4 @@ export declare const SERVER_TO_DAEMON_TYPES: readonly ["conn.ack", "task.offer",
2089
2706
  * handler or counted `accepted` on the `/byok/messages` wire.
2090
2707
  */
2091
2708
  export declare const DAEMON_TO_SERVER_TYPES: readonly ["task.claim", "task.started", "task.decline", "task.progress", "task.artifact", "task.await_approval", "task.complete", "task.fail", "task.cancelled", "task.approval_resolved", "agent.egress.reliable", "agent.message.publish", "agent.content.receipt"];
2709
+ export {};