@byok-sdk/protocol 0.13.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.
@@ -1010,12 +1010,46 @@ export declare const TaskProgressPayloadSchema: z.ZodObject<{
1010
1010
  tool: z.ZodString;
1011
1011
  input: z.ZodOptional<z.ZodUnknown>;
1012
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>>;
1013
1030
  }, z.core.$strip>, z.ZodObject<{
1014
1031
  type: z.ZodLiteral<"tool_result">;
1015
1032
  tool: z.ZodString;
1016
1033
  output: z.ZodOptional<z.ZodUnknown>;
1017
1034
  toolCallId: z.ZodOptional<z.ZodString>;
1018
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>>;
1019
1053
  }, z.core.$strip>, z.ZodObject<{
1020
1054
  type: z.ZodLiteral<"artifact">;
1021
1055
  name: z.ZodString;
@@ -1367,37 +1401,424 @@ export declare const TaskApprovalResolvedPayloadSchema: z.ZodObject<{
1367
1401
  at: z.ZodISODateTime;
1368
1402
  }, z.core.$strip>;
1369
1403
  export type TaskApprovalResolvedPayload = z.infer<typeof TaskApprovalResolvedPayloadSchema>;
1370
- export declare const MESSAGE_PAYLOAD_SCHEMAS: {
1371
- readonly 'conn.hello': z.ZodObject<{
1372
- protocolVersions: z.ZodArray<z.ZodNumber>;
1373
- capabilities: z.ZodArray<z.ZodString>;
1374
- deviceId: z.ZodString;
1375
- productId: z.ZodString;
1376
- clientVersion: z.ZodOptional<z.ZodString>;
1377
- runtimes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1378
- 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<{
1379
1436
  claude: "claude";
1380
1437
  codex: "codex";
1381
- pi: "pi";
1382
1438
  }>;
1383
- version: z.ZodOptional<z.ZodString>;
1384
- authPresent: z.ZodOptional<z.ZodBoolean>;
1385
- capabilities: z.ZodOptional<z.ZodObject<{
1386
- steer: z.ZodOptional<z.ZodBoolean>;
1387
- resume: z.ZodOptional<z.ZodBoolean>;
1388
- approvalInteractive: z.ZodOptional<z.ZodBoolean>;
1389
- mcpToolsets: z.ZodOptional<z.ZodBoolean>;
1390
- permissionModes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1391
- }, z.core.$strip>>;
1392
- }, z.core.$strip>>>;
1393
- configuredToolsets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1394
- cursor: z.ZodOptional<z.ZodNumber>;
1395
- }, z.core.$strip>;
1396
- readonly 'conn.ack': z.ZodObject<{
1397
- protocolVersion: z.ZodNumber;
1398
- capabilities: z.ZodArray<z.ZodString>;
1399
- 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>>;
1400
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: {
1401
1822
  readonly 'task.offer': z.ZodObject<{
1402
1823
  instruction: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1403
1824
  blobRef: z.ZodObject<{
@@ -1808,6 +2229,36 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
1808
2229
  maxBytes: z.ZodNumber;
1809
2230
  }, z.core.$strict>>;
1810
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>;
1811
2262
  readonly 'agent.egress.reliable': z.ZodObject<{
1812
2263
  agentRef: z.ZodObject<{
1813
2264
  agentId: z.ZodString;
@@ -2070,12 +2521,46 @@ export declare const MESSAGE_PAYLOAD_SCHEMAS: {
2070
2521
  tool: z.ZodString;
2071
2522
  input: z.ZodOptional<z.ZodUnknown>;
2072
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>>;
2073
2541
  }, z.core.$strip>, z.ZodObject<{
2074
2542
  type: z.ZodLiteral<"tool_result">;
2075
2543
  tool: z.ZodString;
2076
2544
  output: z.ZodOptional<z.ZodUnknown>;
2077
2545
  toolCallId: z.ZodOptional<z.ZodString>;
2078
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>>;
2079
2564
  }, z.core.$strip>, z.ZodObject<{
2080
2565
  type: z.ZodLiteral<"artifact">;
2081
2566
  name: z.ZodString;
@@ -2221,3 +2706,4 @@ export declare const SERVER_TO_DAEMON_TYPES: readonly ["conn.ack", "task.offer",
2221
2706
  * handler or counted `accepted` on the `/byok/messages` wire.
2222
2707
  */
2223
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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byok-sdk/protocol",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "BYOK SDK wire protocol: envelope schema, message types, and codec helpers",
5
5
  "type": "module",
6
6
  "license": "MIT",