@semiont/core 0.5.28 → 0.5.30

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.
package/dist/index.d.ts CHANGED
@@ -848,275 +848,6 @@ interface paths {
848
848
  patch?: never;
849
849
  trace?: never;
850
850
  };
851
- "/api/admin/exchange/backup": {
852
- parameters: {
853
- query?: never;
854
- header?: never;
855
- path?: never;
856
- cookie?: never;
857
- };
858
- get?: never;
859
- put?: never;
860
- /**
861
- * Backup Knowledge Base
862
- * @description Create a lossless backup of the knowledge base as a streaming tar.gz archive
863
- */
864
- post: {
865
- parameters: {
866
- query?: never;
867
- header?: never;
868
- path?: never;
869
- cookie?: never;
870
- };
871
- requestBody?: never;
872
- responses: {
873
- /** @description Streaming backup archive */
874
- 200: {
875
- headers: {
876
- [name: string]: unknown;
877
- };
878
- content: {
879
- "application/gzip": string;
880
- };
881
- };
882
- /** @description Unauthorized */
883
- 401: {
884
- headers: {
885
- [name: string]: unknown;
886
- };
887
- content: {
888
- "application/json": components["schemas"]["ErrorResponse"];
889
- };
890
- };
891
- /** @description Forbidden - Admin access required */
892
- 403: {
893
- headers: {
894
- [name: string]: unknown;
895
- };
896
- content: {
897
- "application/json": components["schemas"]["ErrorResponse"];
898
- };
899
- };
900
- };
901
- };
902
- delete?: never;
903
- options?: never;
904
- head?: never;
905
- patch?: never;
906
- trace?: never;
907
- };
908
- "/api/admin/exchange/restore": {
909
- parameters: {
910
- query?: never;
911
- header?: never;
912
- path?: never;
913
- cookie?: never;
914
- };
915
- get?: never;
916
- put?: never;
917
- /**
918
- * Restore Knowledge Base
919
- * @description Restore knowledge base from a backup archive. Returns SSE progress events.
920
- */
921
- post: {
922
- parameters: {
923
- query?: never;
924
- header?: never;
925
- path?: never;
926
- cookie?: never;
927
- };
928
- requestBody: {
929
- content: {
930
- "multipart/form-data": {
931
- /**
932
- * Format: binary
933
- * @description Backup archive (.tar.gz)
934
- */
935
- file: string;
936
- };
937
- };
938
- };
939
- responses: {
940
- /** @description SSE stream of restore progress events */
941
- 200: {
942
- headers: {
943
- [name: string]: unknown;
944
- };
945
- content: {
946
- "text/event-stream": string;
947
- };
948
- };
949
- /** @description Invalid file format */
950
- 400: {
951
- headers: {
952
- [name: string]: unknown;
953
- };
954
- content: {
955
- "application/json": components["schemas"]["ErrorResponse"];
956
- };
957
- };
958
- /** @description Unauthorized */
959
- 401: {
960
- headers: {
961
- [name: string]: unknown;
962
- };
963
- content: {
964
- "application/json": components["schemas"]["ErrorResponse"];
965
- };
966
- };
967
- /** @description Forbidden - Admin access required */
968
- 403: {
969
- headers: {
970
- [name: string]: unknown;
971
- };
972
- content: {
973
- "application/json": components["schemas"]["ErrorResponse"];
974
- };
975
- };
976
- };
977
- };
978
- delete?: never;
979
- options?: never;
980
- head?: never;
981
- patch?: never;
982
- trace?: never;
983
- };
984
- "/api/moderate/exchange/export": {
985
- parameters: {
986
- query?: never;
987
- header?: never;
988
- path?: never;
989
- cookie?: never;
990
- };
991
- get?: never;
992
- put?: never;
993
- /**
994
- * Export Knowledge Base as JSON-LD
995
- * @description Export the knowledge base as a JSON-LD Linked Data tar.gz archive
996
- */
997
- post: {
998
- parameters: {
999
- query?: {
1000
- /** @description Include archived resources in export */
1001
- includeArchived?: boolean;
1002
- };
1003
- header?: never;
1004
- path?: never;
1005
- cookie?: never;
1006
- };
1007
- requestBody?: never;
1008
- responses: {
1009
- /** @description Streaming JSON-LD archive */
1010
- 200: {
1011
- headers: {
1012
- [name: string]: unknown;
1013
- };
1014
- content: {
1015
- "application/gzip": string;
1016
- };
1017
- };
1018
- /** @description Unauthorized */
1019
- 401: {
1020
- headers: {
1021
- [name: string]: unknown;
1022
- };
1023
- content: {
1024
- "application/json": components["schemas"]["ErrorResponse"];
1025
- };
1026
- };
1027
- /** @description Forbidden - moderator or admin role required */
1028
- 403: {
1029
- headers: {
1030
- [name: string]: unknown;
1031
- };
1032
- content: {
1033
- "application/json": components["schemas"]["ErrorResponse"];
1034
- };
1035
- };
1036
- };
1037
- };
1038
- delete?: never;
1039
- options?: never;
1040
- head?: never;
1041
- patch?: never;
1042
- trace?: never;
1043
- };
1044
- "/api/moderate/exchange/import": {
1045
- parameters: {
1046
- query?: never;
1047
- header?: never;
1048
- path?: never;
1049
- cookie?: never;
1050
- };
1051
- get?: never;
1052
- put?: never;
1053
- /**
1054
- * Import Knowledge Base from JSON-LD
1055
- * @description Import resources from a JSON-LD Linked Data archive. Returns SSE progress events.
1056
- */
1057
- post: {
1058
- parameters: {
1059
- query?: never;
1060
- header?: never;
1061
- path?: never;
1062
- cookie?: never;
1063
- };
1064
- requestBody: {
1065
- content: {
1066
- "multipart/form-data": {
1067
- /**
1068
- * Format: binary
1069
- * @description JSON-LD archive (.tar.gz)
1070
- */
1071
- file: string;
1072
- };
1073
- };
1074
- };
1075
- responses: {
1076
- /** @description SSE stream of import progress events */
1077
- 200: {
1078
- headers: {
1079
- [name: string]: unknown;
1080
- };
1081
- content: {
1082
- "text/event-stream": string;
1083
- };
1084
- };
1085
- /** @description Invalid file format */
1086
- 400: {
1087
- headers: {
1088
- [name: string]: unknown;
1089
- };
1090
- content: {
1091
- "application/json": components["schemas"]["ErrorResponse"];
1092
- };
1093
- };
1094
- /** @description Unauthorized */
1095
- 401: {
1096
- headers: {
1097
- [name: string]: unknown;
1098
- };
1099
- content: {
1100
- "application/json": components["schemas"]["ErrorResponse"];
1101
- };
1102
- };
1103
- /** @description Forbidden - moderator or admin role required */
1104
- 403: {
1105
- headers: {
1106
- [name: string]: unknown;
1107
- };
1108
- content: {
1109
- "application/json": components["schemas"]["ErrorResponse"];
1110
- };
1111
- };
1112
- };
1113
- };
1114
- delete?: never;
1115
- options?: never;
1116
- head?: never;
1117
- patch?: never;
1118
- trace?: never;
1119
- };
1120
851
  "/api/cookies/consent": {
1121
852
  parameters: {
1122
853
  query?: never;
@@ -1399,7 +1130,7 @@ interface paths {
1399
1130
  put?: never;
1400
1131
  /**
1401
1132
  * Create a resource
1402
- * @description Upload binary content + metadata as multipart/form-data. The backend writes content to disk, then emits yield:create on the bus; Stower persists it and returns a 202 with the new resourceId. Full reconciliation happens via SSE domain events (yield:created).
1133
+ * @description Upload binary content + metadata as multipart/form-data. The gateway writes content to disk, then emits yield:create on the bus; Stower persists it and returns a 202 with the new resourceId. Full reconciliation happens via SSE domain events (yield:created).
1403
1134
  *
1404
1135
  * Generation workers and the /know/compose page both hit this route — bytes always travel on the HTTP wire, never on the bus.
1405
1136
  */
@@ -1477,196 +1208,7 @@ interface paths {
1477
1208
  patch?: never;
1478
1209
  trace?: never;
1479
1210
  };
1480
- "/resources/{id}": {
1481
- parameters: {
1482
- query?: never;
1483
- header?: never;
1484
- path?: never;
1485
- cookie?: never;
1486
- };
1487
- /**
1488
- * Get a resource's stored representation (the pipe)
1489
- * @description Returns the stored representation's bytes, verbatim, with the stored media type in Content-Type (`application/octet-stream` when the stored metadata carries none). The Accept header is never read: there is no content negotiation and no transcoding, so the served bytes always hash to the representation's registered checksum.
1490
- *
1491
- * The resource's JSON-LD description (descriptor + annotations + inbound entity references) lives at GET /resources/{id}/jsonld; every content response advertises it via a `Link: rel="describedby"` header.
1492
- *
1493
- * Content is immutable (checksum-addressed), and this route is bearer-authenticated, so responses carry `Cache-Control: private, max-age=31536000, immutable`.
1494
- */
1495
- get: {
1496
- parameters: {
1497
- query?: never;
1498
- header?: never;
1499
- path: {
1500
- id: string;
1501
- };
1502
- cookie?: never;
1503
- };
1504
- requestBody?: never;
1505
- responses: {
1506
- /** @description The stored representation's bytes, verbatim */
1507
- 200: {
1508
- headers: {
1509
- /** @description `</resources/{id}/jsonld>; rel="describedby"; type="application/ld+json"` — where to dereference the resource's JSON-LD description */
1510
- Link?: string;
1511
- [name: string]: unknown;
1512
- };
1513
- content: {
1514
- "*/*": string;
1515
- };
1516
- };
1517
- /** @description Resource or representation not found */
1518
- 404: {
1519
- headers: {
1520
- [name: string]: unknown;
1521
- };
1522
- content: {
1523
- "application/json": components["schemas"]["ErrorResponse"];
1524
- };
1525
- };
1526
- /** @description Failed to retrieve resource */
1527
- 500: {
1528
- headers: {
1529
- [name: string]: unknown;
1530
- };
1531
- content: {
1532
- "application/json": components["schemas"]["ErrorResponse"];
1533
- };
1534
- };
1535
- };
1536
- };
1537
- put?: never;
1538
- post?: never;
1539
- delete?: never;
1540
- options?: never;
1541
- head?: never;
1542
- patch?: never;
1543
- trace?: never;
1544
- };
1545
- "/resources/{id}/anchored-text": {
1546
- parameters: {
1547
- query?: never;
1548
- header?: never;
1549
- path?: never;
1550
- cookie?: never;
1551
- };
1552
- /**
1553
- * Get a resource's anchored text
1554
- * @description The coordinate map derived from a resource's bytes: its recovered text plus the positioned runs that index it. Assembled via the bus gateway.
1555
- *
1556
- * Whole-resource, not paginated — a producer iterates page by page, but every consumer wants one map: a browser quoting the text under a hand-drawn rectangle, a headless client analysing a document.
1557
- *
1558
- * This endpoint never runs recognition. The Smelter is the sole producer and publishes at ingest; a read that finds nothing waits for that resource's content generation to settle and then answers 204. A 204 is the common case and not an error — a native text layer is read in the browser, and a media type with no extractor never produces a map at all. Callers degrade: for a PDF annotation that means geometry with no quoted text.
1559
- */
1560
- get: {
1561
- parameters: {
1562
- query?: never;
1563
- header?: never;
1564
- path: {
1565
- id: string;
1566
- };
1567
- cookie?: never;
1568
- };
1569
- requestBody?: never;
1570
- responses: {
1571
- /** @description The stored extraction outcome: the coordinate map with its provenance (method, PDF class, OCR confidence, unread pages), or a named decline. */
1572
- 200: {
1573
- headers: {
1574
- [name: string]: unknown;
1575
- };
1576
- content: {
1577
- "application/json": components["schemas"]["ExtractionOutcome"];
1578
- };
1579
- };
1580
- /** @description No map has been derived for this resource. The ordinary answer for a native text layer or a media type with no extractor — not an error, and distinct from 404, which means the resource itself is absent. Carried as an empty body rather than a JSON `null` body so that a generated client's typed 200 field stays absent: unmarshalling `null` into a struct is a no-op in several languages, which would make "no map" indistinguishable from an empty one. */
1581
- 204: {
1582
- headers: {
1583
- [name: string]: unknown;
1584
- };
1585
- content?: never;
1586
- };
1587
- /** @description Resource not found */
1588
- 404: {
1589
- headers: {
1590
- [name: string]: unknown;
1591
- };
1592
- content: {
1593
- "application/json": components["schemas"]["ErrorResponse"];
1594
- };
1595
- };
1596
- /** @description Request timed out (bus gateway) */
1597
- 504: {
1598
- headers: {
1599
- [name: string]: unknown;
1600
- };
1601
- content: {
1602
- "application/json": components["schemas"]["ErrorResponse"];
1603
- };
1604
- };
1605
- };
1606
- };
1607
- put?: never;
1608
- post?: never;
1609
- delete?: never;
1610
- options?: never;
1611
- head?: never;
1612
- patch?: never;
1613
- trace?: never;
1614
- };
1615
- "/anchored-text/keys": {
1616
- parameters: {
1617
- query?: never;
1618
- header?: never;
1619
- path?: never;
1620
- cookie?: never;
1621
- };
1622
- /**
1623
- * List the keys under which anchored text is currently stored
1624
- * @description The anchored-text store's would-hit keys — the reconcile planner's bulk existence read (PERSIST-ANCHORS P0). The Smelter diffs this against the catalog to find resources whose derived coordinate map was lost (a transient store, a failed publish) and plans re-derivation; one request per reconcile, keys only, because each map is ~32 KB per scanned page and only presence is being asked.
1625
- *
1626
- * Keys are resource ids today; after PERSIST-ANCHORS P1 they are content checksums. Only entries a read would actually serve are listed — stale-stamped or unreadable entries are excluded, exactly as a read would exclude them.
1627
- *
1628
- * Agents only: this is projection-maintenance planning data, same trust boundary as publishing a map.
1629
- */
1630
- get: {
1631
- parameters: {
1632
- query?: never;
1633
- header?: never;
1634
- path?: never;
1635
- cookie?: never;
1636
- };
1637
- requestBody?: never;
1638
- responses: {
1639
- /** @description Every key under which anchored text would currently be served. */
1640
- 200: {
1641
- headers: {
1642
- [name: string]: unknown;
1643
- };
1644
- content: {
1645
- "application/json": {
1646
- keys: string[];
1647
- };
1648
- };
1649
- };
1650
- /** @description Caller is not an agent */
1651
- 403: {
1652
- headers: {
1653
- [name: string]: unknown;
1654
- };
1655
- content: {
1656
- "application/json": components["schemas"]["ErrorResponse"];
1657
- };
1658
- };
1659
- };
1660
- };
1661
- put?: never;
1662
- post?: never;
1663
- delete?: never;
1664
- options?: never;
1665
- head?: never;
1666
- patch?: never;
1667
- trace?: never;
1668
- };
1669
- "/anchored-text/{checksum}": {
1211
+ "/resources/{id}": {
1670
1212
  parameters: {
1671
1213
  query?: never;
1672
1214
  header?: never;
@@ -1674,85 +1216,37 @@ interface paths {
1674
1216
  cookie?: never;
1675
1217
  };
1676
1218
  /**
1677
- * Read a representation's stored extraction outcome by content checksum
1678
- * @description The cache-consult read (PERSIST-ANCHORS P2c): the extraction seam asks "has this exact byte content already been extracted?" and every cache consumer runs out of process (the smelter worker, the detection workers), so the consult must cross the wire or the cache is write-only from exactly the processes it exists to serve.
1219
+ * Get a resource's stored representation (the pipe)
1220
+ * @description Returns the stored representation's bytes, verbatim, with the stored media type in Content-Type (`application/octet-stream` when the stored metadata carries none). The Accept header is never read: there is no content negotiation and no transcoding, so the served bytes always hash to the representation's registered checksum.
1679
1221
  *
1680
- * Checksum-addressed and barrier-free, deliberately: presence at this instant is the question, the same semantics as the keys listing. The read-your-writes settle barrier belongs to the resource-addressed reader (GET /resources/{id}/anchored-text), which resolves a mutable resource id through the view index; a caller holding the checksum already holds the content identity and needs no resolution and no wait.
1222
+ * The resource's JSON-LD description (descriptor + annotations + inbound entity references) lives at GET /resources/{id}/jsonld; every content response advertises it via a `Link: rel="describedby"` header.
1681
1223
  *
1682
- * Agents only projection-maintenance traffic, the same trust boundary as the PUT beside it.
1224
+ * Content is immutable (checksum-addressed), and this route is bearer-authenticated, so responses carry `Cache-Control: private, max-age=31536000, immutable`.
1683
1225
  */
1684
1226
  get: {
1685
1227
  parameters: {
1686
1228
  query?: never;
1687
1229
  header?: never;
1688
1230
  path: {
1689
- /** @description Hex SHA-256 checksum of the representation bytes. */
1690
- checksum: string;
1231
+ id: string;
1691
1232
  };
1692
1233
  cookie?: never;
1693
1234
  };
1694
1235
  requestBody?: never;
1695
1236
  responses: {
1696
- /** @description The stored extraction outcome — a success with provenance, or a cached decline. */
1237
+ /** @description The stored representation's bytes, verbatim */
1697
1238
  200: {
1698
1239
  headers: {
1240
+ /** @description `</resources/{id}/jsonld>; rel="describedby"; type="application/ld+json"` — where to dereference the resource's JSON-LD description */
1241
+ Link?: string;
1699
1242
  [name: string]: unknown;
1700
1243
  };
1701
1244
  content: {
1702
- "application/json": components["schemas"]["ExtractionOutcome"];
1703
- };
1704
- };
1705
- /** @description No entry under this checksum. The ordinary cache miss — carried as an empty body rather than a JSON null for the same generated-client reason as the resource-addressed GET. */
1706
- 204: {
1707
- headers: {
1708
- [name: string]: unknown;
1709
- };
1710
- content?: never;
1711
- };
1712
- /** @description Caller is not an agent */
1713
- 403: {
1714
- headers: {
1715
- [name: string]: unknown;
1716
- };
1717
- content: {
1718
- "application/json": components["schemas"]["ErrorResponse"];
1719
- };
1720
- };
1721
- };
1722
- };
1723
- /**
1724
- * Publish anchored text for a representation, keyed by its content checksum
1725
- * @description Store the coordinate map derived from a representation's bytes, under the SHA-256 checksum of those bytes (PERSIST-ANCHORS decision A: one artifact per representation, and a representation is its bytes). The producer supplies the checksum because it alone knows which bytes it actually read — deriving the key server-side from the resource's current representation would file old geometry under a new checksum when a byte change races the publish, and that entry would read as present to the reconcile planner forever. Reads remain resource-addressed (GET /resources/{id}/anchored-text); the server resolves the resource to its current representation's checksum.
1726
- *
1727
- * The Smelter is the sole producer: it is the only process that reads those bytes at ingest, so it is the only one positioned to derive a map cheaply, and it runs separately from the backend.
1728
- *
1729
- * Agents only. A map is derived data every consumer trusts to place annotation geometry, so a browser session must not be able to write one.
1730
- */
1731
- put: {
1732
- parameters: {
1733
- query?: never;
1734
- header?: never;
1735
- path: {
1736
- /** @description Hex SHA-256 checksum of the representation bytes the map was derived from. */
1737
- checksum: string;
1738
- };
1739
- cookie?: never;
1740
- };
1741
- requestBody: {
1742
- content: {
1743
- "application/json": components["schemas"]["ExtractionOutcome"];
1744
- };
1745
- };
1746
- responses: {
1747
- /** @description Stored */
1748
- 204: {
1749
- headers: {
1750
- [name: string]: unknown;
1245
+ "*/*": string;
1751
1246
  };
1752
- content?: never;
1753
1247
  };
1754
- /** @description Body is not a valid ExtractionOutcome */
1755
- 400: {
1248
+ /** @description Resource or representation not found */
1249
+ 404: {
1756
1250
  headers: {
1757
1251
  [name: string]: unknown;
1758
1252
  };
@@ -1760,8 +1254,8 @@ interface paths {
1760
1254
  "application/json": components["schemas"]["ErrorResponse"];
1761
1255
  };
1762
1256
  };
1763
- /** @description Caller is not an agent */
1764
- 403: {
1257
+ /** @description Failed to retrieve resource */
1258
+ 500: {
1765
1259
  headers: {
1766
1260
  [name: string]: unknown;
1767
1261
  };
@@ -1771,6 +1265,7 @@ interface paths {
1771
1265
  };
1772
1266
  };
1773
1267
  };
1268
+ put?: never;
1774
1269
  post?: never;
1775
1270
  delete?: never;
1776
1271
  options?: never;
@@ -2093,7 +1588,7 @@ interface components {
2093
1588
  domain: string;
2094
1589
  isAdmin: boolean;
2095
1590
  };
2096
- /** @description Short-lived access token (1 hour). Use as Authorization: Bearer header on API calls. */
1591
+ /** @description Short-lived access token. Use as Authorization: Bearer header on API calls. The TTL is deliberately NOT restated here — docs/system/administration/AUTHENTICATION.md holds the one table of token lifetimes, and a second copy is how this description came to claim an hour for a ten-minute token. A client must refresh from the refresh token rather than assume any particular window. */
2097
1592
  token: string;
2098
1593
  /** @description Long-lived refresh token (30 days). Exchange via POST /api/tokens/refresh for a fresh access token. */
2099
1594
  refreshToken: string;
@@ -2356,6 +1851,11 @@ interface components {
2356
1851
  correlationId: string;
2357
1852
  response: Omit<components["schemas"]["ExtractionOutcome"], "kind"> | null;
2358
1853
  };
1854
+ /** @description Request the stored extraction outcome for a content identity the caller already holds — the detection workers' read-through cache consult (ANCHORED-TEXT-TO-SMELTER P2). A hit — success or decline — is served whole and the caller skips extraction; null is a miss and the caller extracts locally. Read-only: the Smelter is the sole writer and never answers over this channel. */
1855
+ BrowseAnchoredTextByChecksumRequest: {
1856
+ correlationId: string;
1857
+ checksum: string;
1858
+ };
2359
1859
  /** @description Request to browse a single resource */
2360
1860
  BrowseResourceRequest: {
2361
1861
  correlationId: string;
@@ -2407,8 +1907,10 @@ interface components {
2407
1907
  payload: {
2408
1908
  [key: string]: unknown;
2409
1909
  };
2410
- /** @description Optional resource scope for broadcast channels (e.g. resourceId). Publishers only — frontends must never set this. */
1910
+ /** @description Optional resource scope for broadcast channels (e.g. resourceId). Publishers only — clients must never set this. */
2411
1911
  scope?: string;
1912
+ /** @description Routing address for this request's reply (CORRELATED-REPLY-ROUTING D1/D2): the emit doubles as a claim on the correlationId, and delivery matches BOTH this and the emitting principal. Top-level, not inside `payload` — a wire concern like `scope`, so it never enters a channel's domain type. Optional in the schema because a plain broadcast needs no return address; the route requires it when the channel is a registered request channel and the payload carries a correlationId. */
1913
+ clientId?: string;
2412
1914
  };
2413
1915
  /** @description Subscription matrix for the bus SSE stream (MULTI-RESOURCE-SCOPE). `global` channels are delivered unscoped; each `scoped` entry subscribes the connection to one resource scope's channels, optionally resuming replay from that scope's last-seen persisted event id. At least one global channel or one scoped entry is required. */
2414
1916
  BusSubscribeRequest: {
@@ -2425,6 +1927,8 @@ interface components {
2425
1927
  /** @description This scope's last-seen persisted event id (`p-<scope>-<seq>`). The server replays this scope's persisted events after it before joining the live tail, and emits a scoped `bus:resume-gap` when it cannot cover the gap (unparseable or mismatched id, retention exceeded, or query error). */
2426
1928
  lastEventId?: string;
2427
1929
  }[];
1930
+ /** @description Routing address for correlated replies (CORRELATED-REPLY-ROUTING D1): a UUID minted once per bus-client lifetime — per actor, NOT per connection, so it survives a make-before-break reconnect and both overlap connections share it. Required: a subscriber without one could never receive a correlated frame, and that must fail loudly here rather than silently at delivery. Not authentication — the JWT stays that; this is an unguessable routing address, never echoed into any payload or broadcast frame. */
1931
+ clientId: string;
2428
1932
  };
2429
1933
  CloneResourceWithTokenResponse: {
2430
1934
  /** @description Generated clone token */
@@ -2542,7 +2046,7 @@ interface components {
2542
2046
  DiscoveredKB: {
2543
2047
  /** @description Hostname the KB is reachable on from this machine (today always "localhost" — local stacks bind locally and codespace KBs arrive through a local port forward) */
2544
2048
  host: string;
2545
- /** @description Local TCP port of the KB's API (the backend port for a local stack; the allocated forward port for a codespace stack) */
2049
+ /** @description Local TCP port of the KB's API (the gateway port for a local stack; the allocated forward port for a codespace stack) */
2546
2050
  port: number;
2547
2051
  /**
2548
2052
  * @description Where the stack actually runs. "local": containers on this machine. "codespace": a GitHub-hosted VM whose KB is port-forwarded here.
@@ -2560,7 +2064,7 @@ interface components {
2560
2064
  };
2561
2065
  /**
2562
2066
  * DiscoveryDocument
2563
- * @description The launcher's KB discovery document — the schema authority for <stateDir>/discovery/kbs.json, which the semiont launcher (Go, apps/launcher) regenerates on every stack mutation and the frontend container mounts read-only at /discovery. NOT an API endpoint: a static document fetched same-origin by browsers (via the frontend's static server) or read from disk by local Node consumers. An empty kbs list is meaningful ("the launcher manages nothing right now") and distinct from an absent file. Design record: .plans/BROWSER-KB-DISCOVERY.md.
2067
+ * @description The launcher's KB discovery document — the schema authority for <stateDir>/discovery/kbs.json, which the semiont launcher (Go, apps/launcher) regenerates on every stack mutation and the Browser container mounts read-only at /discovery. NOT an API endpoint: a static document fetched same-origin by browsers (via the Browser's static server) or read from disk by local Node consumers. An empty kbs list is meaningful ("the launcher manages nothing right now") and distinct from an absent file. Design record: .plans/BROWSER-KB-DISCOVERY.md.
2564
2068
  */
2565
2069
  DiscoveryDocument: {
2566
2070
  /**
@@ -2739,6 +2243,8 @@ interface components {
2739
2243
  };
2740
2244
  /** @description Progress payload emitted on the gather:annotation-progress SSE channel during LLM context gathering. */
2741
2245
  GatherProgress: {
2246
+ /** @description The request this progress belongs to (CORRELATED-REPLY-ROUTING D3). Required: `CORRELATED_CHANNELS` derives every operation's progress channel into the delivery filter, so a frame without it cannot be matched to a claim and is silently dropped. */
2247
+ correlationId: string;
2742
2248
  message?: string;
2743
2249
  percentage?: number;
2744
2250
  };
@@ -2849,9 +2355,9 @@ interface components {
2849
2355
  };
2850
2356
  /** @description Params bag for `job:create` with `jobType: 'generation'` — exactly the shape yield.fromContext(context, options) takes: options + the gathered context. The job's ids are DERIVED from context.focus at the dispatcher (resource focus → focus.resource; annotation focus → focus.sourceResource, with the worker auto-binding to focus.annotation); a caller-supplied referenceId is rejected. Carried inside JobCreateCommand.params; this schema is the generation shape's contract, including its requiredness. */
2851
2357
  GenerationJobParams: {
2852
- /** @description Title of the generated resource. */
2358
+ /** @description Title of the generated resource. Non-empty: the dispatcher and worker both reject an empty title via isGenerationJobParams. NOTE minLength is documentation here — JobCreateCommand.params is additionalProperties:true, so /bus/emit's generated validator never sees this field (GENERATION-OUTPUT-FORMAT D9b). */
2853
2359
  title: string;
2854
- /** @description Storage URI for the generated resource's content. */
2360
+ /** @description Storage URI for the generated resource's content — AUTHORITATIVE: the worker writes exactly here and never derives a location from the title. Non-empty, and there is no fallback; the dispatcher and worker both reject an empty value via isGenerationJobParams. NOTE minLength is documentation here — JobCreateCommand.params is additionalProperties:true, so /bus/emit's generated validator never sees this field (GENERATION-OUTPUT-FORMAT D6/D9). */
2855
2361
  storageUri: string;
2856
2362
  /** @description The gathered context that grounds the generation. Its `focus` names the anchor: the DISPATCHER derives the job's resourceId from it (resource focus → focus.resource; annotation focus → focus.sourceResource, with the worker auto-binding to focus.annotation) and REJECTS a caller-supplied id — the context is authoritative. Under `cite`, the ids its embedding carries are the only valid citation targets. */
2857
2363
  context: components["schemas"]["GatheredContext"];
@@ -2997,12 +2503,29 @@ interface components {
2997
2503
  assessmentsFound: number;
2998
2504
  assessmentsCreated: number;
2999
2505
  };
3000
- /** @description Request to cancel a job */
2506
+ /** @description Request to cancel a job. Target one running or pending job by `jobId` (JOB-RESTART-SAFETY P4), or a whole category of pending jobs by `jobType`. A `jobId`-targeted request that names a RUNNING job is honoured cooperatively by the owning worker, which stops at its next unit boundary and emits JobCancelCommand — the queue is never made to yank a running job out from under a live worker. */
3001
2507
  JobCancelRequest: {
3002
2508
  /** @description Correlation id for request/reply matching, set by the SDK's busRequest so the confirmed-write ack/failure routes back. Absent for the local cancelRequest UI signal. */
3003
2509
  correlationId?: string;
3004
- /** @enum {string} */
3005
- jobType: "annotation" | "generation";
2510
+ /** @description Cancel this one job. A pending job is cancelled immediately by the gateway; a running job is cancelled cooperatively by its worker. Takes precedence over jobType. */
2511
+ jobId?: string;
2512
+ /**
2513
+ * @description Cancel all PENDING jobs in this category — the bulk UI signal. Ignored when jobId is present.
2514
+ * @enum {string}
2515
+ */
2516
+ jobType?: "annotation" | "generation";
2517
+ };
2518
+ /** @description A worker's confirmation that it has cooperatively stopped a running job at a unit boundary (JOB-RESTART-SAFETY P4) — the queue moves the job to cancelled/. Distinct from JobCancelRequest (the client→worker REQUEST to stop): this is the worker announcing it did, so the running job is never yanked to cancelled/ out from under a live worker (the roach-motel race). */
2519
+ JobCancelCommand: {
2520
+ /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
2521
+ _userId?: string;
2522
+ resourceId: string;
2523
+ jobId: string;
2524
+ jobType: components["schemas"]["JobType"];
2525
+ /** @description Annotation this job is attached to, when applicable. Lets the UI route cancellation feedback to a specific annotation. */
2526
+ annotationId?: string;
2527
+ /** @description Entity-type units whose annotations were fully emitted before cancellation. Recorded on the cancelled job's metadata so the work already done stays visible. */
2528
+ completedUnits?: string[];
3006
2529
  };
3007
2530
  /** @description Command to claim a pending job (atomic CAS: pending → running) */
3008
2531
  JobClaimCommand: {
@@ -3077,6 +2600,23 @@ interface components {
3077
2600
  /** @description Annotation this job is attached to, when applicable. Lets the UI route failure feedback (error toast, revert state) to a specific annotation. */
3078
2601
  annotationId?: string;
3079
2602
  error: string;
2603
+ /** @description Entity-type units whose annotations were fully emitted before this failure (checkpointed resume). The queue records them on the retried job's metadata; a retried claim skips them so completed work is neither redone nor duplicated. */
2604
+ completedUnits?: string[];
2605
+ /**
2606
+ * @description Worker-side classification of the failure, made where the error is still typed. 'deterministic' — the same request cannot succeed on a second attempt — skips the retry budget; absent or 'transient' retries as before. Only KNOWN-deterministic failures carry the class.
2607
+ * @enum {string}
2608
+ */
2609
+ failureClass?: "transient" | "deterministic";
2610
+ /** @description Whether the queue will re-queue this job for another attempt. Computed by the worker from the SAME predicate the queue applies at failJob (one decision site, `willRetryAfter` in @semiont/jobs) using the retry budget carried on the claimed record. FALSE (or absent) means this failure is TERMINAL: a client's job-watch stream ends here. TRUE means the work continues on a fresh attempt — the failure is an event, not the end, and a stream that terminated on it would report a recovering run as a failed one (JOB-RESTART-SAFETY P5). */
2611
+ willRetry?: boolean;
2612
+ };
2613
+ /** @description Command to persist a running job's completed-unit checkpoint AT unit completion (JOB-RESTART-SAFETY P2). Distinct from JobFailCommand's checkpoint, which lands only on a clean failure: a worker that dies (crash/OOM/kill) never emits job:fail, so this durable, unthrottled write is what lets the janitor's stale-running recovery resume a dead worker's job rather than redo its finished units. */
2614
+ JobCheckpointCommand: {
2615
+ /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
2616
+ _userId?: string;
2617
+ jobId: string;
2618
+ /** @description Entity-type units whose annotations have been fully emitted so far. Unioned into the running job's metadata checkpoint; a retry after recovery skips them. */
2619
+ completedUnits: string[];
3080
2620
  };
3081
2621
  /** @description Result of a job that completed without doing its work because the resource could not be read. Distinct from a failure: nothing went wrong, there was simply no text to work with — an encrypted or damaged PDF, a scan whose text could not be recognized, or a document that yielded nothing. The reasons are the extraction vocabulary the Smelter reports on `smelt:settled`, MINUS `no-extractor`: a media type that can never yield text (a zip, an image) is a bad request rather than a decline, so a worker asked to detect over one throws and the job reports `job:fail`. Everything here is a resource-specific outcome — the same media type would have succeeded on a different document. */
3082
2622
  JobDeclinedResult: {
@@ -3091,7 +2631,7 @@ interface components {
3091
2631
  */
3092
2632
  declined: true;
3093
2633
  /**
3094
- * @description Why the resource could not be read. A CODE, not a sentence: the client owns the wording, so a browser renders it in the user's language and the CLI renders English terminal copy from the same value. The prose `message` this schema used to carry was composed backend-side and was therefore English everywhere (ASSIST-PROGRESS-CONSOLIDATION P5).
2634
+ * @description Why the resource could not be read. A CODE, not a sentence: the client owns the wording, so a browser renders it in the user's language and the CLI renders English terminal copy from the same value. The prose `message` this schema used to carry was composed gateway-side and was therefore English everywhere (ASSIST-PROGRESS-CONSOLIDATION P5).
3095
2635
  * @enum {string}
3096
2636
  */
3097
2637
  reason: "no-text-layer" | "encrypted" | "corrupt" | "too-large" | "empty";
@@ -3161,6 +2701,8 @@ interface components {
3161
2701
  value: string;
3162
2702
  /** @description Annotations found for it. */
3163
2703
  foundCount: number;
2704
+ /** @description Annotations actually persisted for it — post-dedupe and post-durability-acknowledgement, so it counts what the event log holds, not what the model proposed. Beside foundCount this is the per-unit yield the sizing work is judged by. Present on flows whose units persist as they complete (reference-annotation); the tagging flow reports the same fact as byCategory on its result, because its annotations are built after the per-category loop. */
2705
+ persistedCount?: number;
3164
2706
  }[];
3165
2707
  /** @description Echoed job parameters for display in the progress UI. `label` is a CODE, not a sentence — the client owns the wording, same rule as the progress message. `value` is the user's own input (an entity-type list, their instructions) and is deliberately NOT translated: it is their words, not ours. */
3166
2708
  requestParams?: {
@@ -3399,6 +2941,7 @@ interface components {
3399
2941
  /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
3400
2942
  _userId?: string;
3401
2943
  resourceId: string;
2944
+ /** @description Optional: where the resource's bytes live, so the archive can act on the file. An instruction to this handler, not a copy of the stored fact (that lives on the primary Representation). Working-tree URI, only file:// is supported. */
3402
2945
  storageUri?: string;
3403
2946
  keepFile?: boolean;
3404
2947
  noGit?: boolean;
@@ -3438,6 +2981,29 @@ interface components {
3438
2981
  annotationId: string;
3439
2982
  };
3440
2983
  };
2984
+ /** @description Bus command to persist a detection unit's annotations as one acknowledged batch (JOB-RESTART-SAFETY P6). Unlike mark:create, which is fire-and-forget and resolves when the bus accepts it, this command is answered only after every annotation is in the event log — so a worker can gate unit completion on durability rather than on emission. The batch is the unit: a partial commit is reported as a failure, and the worker retries the whole unit, which is safe because annotation ids are deterministic (P3). */
2985
+ MarkCommitCommand: {
2986
+ /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
2987
+ _userId?: string;
2988
+ /** @description Correlation id set by busRequest so the mark:commit-ok / mark:commit-failed reply routes back to the awaiting worker. */
2989
+ correlationId: string;
2990
+ /** @description Resource every annotation in this batch targets. */
2991
+ resourceId: string;
2992
+ /** @description The unit's annotations, already built with deterministic ids. Re-committing an identical batch is a no-op rather than a duplicate. */
2993
+ annotations: components["schemas"]["Annotation"][];
2994
+ };
2995
+ /** @description Durability acknowledgement for a mark:commit batch: every annotation named by the command is in the event log at the moment this is emitted. */
2996
+ MarkCommitOk: {
2997
+ /** @description Correlation id echoed from the mark:commit command so busRequest can match the reply. */
2998
+ correlationId: string;
2999
+ /** @description What the commit persisted. */
3000
+ response: {
3001
+ /** @description Annotations this commit appended to the event log. Equals the batch size on success — a retry re-appends what already landed rather than counting it out, because the annotation fold is idempotent by id and the log is append-only. Not a dedupe count. */
3002
+ persisted: number;
3003
+ /** @description Ids the batch covers, whether appended now or already present. */
3004
+ annotationIds: string[];
3005
+ };
3006
+ };
3441
3007
  /** @description Raw annotation creation intent — bus handler assembles the W3C annotation */
3442
3008
  MarkCreateRequest: {
3443
3009
  correlationId: string;
@@ -3487,6 +3053,7 @@ interface components {
3487
3053
  /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
3488
3054
  _userId?: string;
3489
3055
  resourceId: string;
3056
+ /** @description Optional: where the resource's bytes are expected to be. When present the handler VERIFIES the file exists and fails loudly if it does not, rather than succeeding as a no-op. An instruction, not a copy of the stored fact (that lives on the primary Representation). Working-tree URI, only file:// is supported. */
3490
3057
  storageUri?: string;
3491
3058
  };
3492
3059
  /** @description Bus command to update an annotation's body with patch operations. */
@@ -3578,7 +3145,7 @@ interface components {
3578
3145
  "@type"?: string | string[];
3579
3146
  /** @description MIME/media type (e.g., text/markdown, image/png). */
3580
3147
  mediaType: string;
3581
- /** @description Working-tree URI identifying where the bytes live. Only file:// is supported (e.g. file://docs/overview.md). */
3148
+ /** @description Working-tree URI identifying where this rendition's bytes live. Only file:// is supported (e.g. file://docs/overview.md). The single home of the storage location: maintained across moves (yield:moved relocates it), absent when the resource has no stored bytes. */
3582
3149
  storageUri?: string;
3583
3150
  filename?: string;
3584
3151
  /** @description Size of the payload in bytes. */
@@ -3629,6 +3196,8 @@ interface components {
3629
3196
  format: components["schemas"]["ContentFormat"];
3630
3197
  contentChecksum: string;
3631
3198
  contentByteSize?: number;
3199
+ /** @description Where the clone's bytes are, on the resource's primary Representation — the same single home `yield:created` writes to (STORAGE-URI-ONE-HOME). */
3200
+ storageUri?: string;
3632
3201
  parentResourceId: string;
3633
3202
  entityTypes?: string[];
3634
3203
  language?: string;
@@ -3641,7 +3210,7 @@ interface components {
3641
3210
  contentChecksum: string;
3642
3211
  contentByteSize?: number;
3643
3212
  entityTypes?: string[];
3644
- /** @description Working-tree URI (e.g. file://docs/overview.md) */
3213
+ /** @description The creating instruction's URI, recorded on the event. Append-only, so this value never changes — the LOCATION the projection serves is maintained across moves and lives on the resource's primary Representation, relocated by yield:moved. Optional: a resource may have no bytes. Working-tree URI, only file:// is supported (e.g. file://docs/overview.md). */
3645
3214
  storageUri?: string;
3646
3215
  language?: string;
3647
3216
  isDraft?: boolean;
@@ -3715,10 +3284,6 @@ interface components {
3715
3284
  * @description Original URI from a source knowledge base when this resource was imported
3716
3285
  */
3717
3286
  originatedFrom?: string;
3718
- /** @description Working-tree URI for this resource (e.g. file://docs/overview.md). Stable across updates and moves. */
3719
- storageUri?: string;
3720
- /** @description SHA-256 hex hash of the current content. Updated on resource.created, resource.updated, resource.cloned events. */
3721
- currentChecksum?: string;
3722
3287
  } & {
3723
3288
  [key: string]: unknown;
3724
3289
  };
@@ -3831,7 +3396,7 @@ interface components {
3831
3396
  projectName?: string;
3832
3397
  /** @description Current git branch of the knowledge base repository */
3833
3398
  gitBranch?: string;
3834
- /** @description The knowledge base's did:web identity — 'did:web:' + the committed [site] domain, byte-identical to the string the launcher publishes in its discovery document. REQUIRED: a KB that declares no domain does not run (the launcher refuses to start it, and the backend refuses to boot), so a response without this field means the caller reached something that bypassed both. Identifies WHICH knowledge base this is; it does NOT identify which running copy — one KB reachable at two addresses (a local clone and a codespace of one repo) reports the same did at both. Use it to verify what you connected to, not to select among discovered entries. */
3399
+ /** @description The knowledge base's did:web identity — 'did:web:' + the committed [site] domain, byte-identical to the string the launcher publishes in its discovery document. REQUIRED: a KB that declares no domain does not run (the launcher refuses to start it, and the gateway refuses to boot), so a response without this field means the caller reached something that bypassed both. Identifies WHICH knowledge base this is; it does NOT identify which running copy — one KB reachable at two addresses (a local clone and a codespace of one repo) reports the same did at both. Use it to verify what you connected to, not to select among discovered entries. */
3835
3400
  did: string;
3836
3401
  };
3837
3402
  /** @description A persisted domain event with metadata. Flat shape — event fields and metadata are peers. */
@@ -3988,14 +3553,18 @@ interface components {
3988
3553
  /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
3989
3554
  _userId?: string;
3990
3555
  };
3991
- /** @description Bus command to create a cloned resource from a clone token. */
3556
+ /** @description Bus command to create a cloned resource from a clone token. Bytes are stored gateway-side BEFORE this command is emitted (GATEWAY.md D4a: the Archivist serves no bytes) — the command carries the storage coordinates, never content. */
3992
3557
  YieldCloneCreateCommand: {
3993
3558
  correlationId: string;
3994
3559
  /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
3995
3560
  _userId?: string;
3996
3561
  token: string;
3997
3562
  name: string;
3998
- content: string;
3563
+ /** @description Where the caller already wrote the clone's bytes — an instruction, not a copy of the stored fact (that lives on the primary Representation). Bytes are stored through the byte door BEFORE this command is sent, so this names an existing file. Working-tree URI, only file:// is supported. */
3564
+ storageUri: string;
3565
+ contentChecksum: string;
3566
+ byteSize: number;
3567
+ format: components["schemas"]["ContentFormat"];
3999
3568
  archiveOriginal?: boolean;
4000
3569
  };
4001
3570
  /** @description Success response after creating a cloned resource. */
@@ -4022,6 +3591,7 @@ interface components {
4022
3591
  /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
4023
3592
  _userId?: string;
4024
3593
  name: string;
3594
+ /** @description The caller's instruction for WHERE the bytes are — not a copy of the stored fact. The stored location lives on the resource's primary Representation (`Representation.storageUri`), which is its single home; this field is the message that puts it there. Working-tree URI, only file:// is supported (e.g. file://docs/overview.md). */
4025
3595
  storageUri: string;
4026
3596
  contentChecksum: string;
4027
3597
  byteSize: number;
@@ -4037,6 +3607,34 @@ interface components {
4037
3607
  generator?: components["schemas"]["Agent"] | components["schemas"]["Agent"][];
4038
3608
  noGit?: boolean;
4039
3609
  };
3610
+ /**
3611
+ * @description Command: stow an already-uploaded clone's bytes and append `yield:cloned`.
3612
+ *
3613
+ * The INNER half of the clone flow. `yield:clone-create` reaches the CloneTokenManager, which alone can validate the token and read the source's entity types; it then emits this so the Stower — the only appendEvent caller — writes the domain event.
3614
+ *
3615
+ * Distinct from `yield:create` because a clone is a distinct operation, not a creation with an extra field. It REQUIRES a parent, and that requirement is what a separate command expresses: an optional `parentResourceId` on the create command could not say that a clone without a parent is not a clone. `ResourceClonedPayload` requires it for the same reason.
3616
+ *
3617
+ * Generated resources are NOT clones: they carry provenance in `generatedFrom` and stay on `yield:create`.
3618
+ */
3619
+ YieldClonePersistCommand: {
3620
+ /** @description Correlation id so busRequest can match the reply. */
3621
+ correlationId: string;
3622
+ /** @description Injected by the gateway from the authenticated principal; never supplied by a wire caller. */
3623
+ _userId?: string;
3624
+ name: string;
3625
+ /** @description The caller's instruction for WHERE the bytes are — the uploader wrote them before emitting this. The stored location lives on the clone's primary Representation (STORAGE-URI-ONE-HOME). */
3626
+ storageUri: string;
3627
+ contentChecksum: string;
3628
+ byteSize: number;
3629
+ format: components["schemas"]["ContentFormat"];
3630
+ language?: string;
3631
+ /** @description Inherited from the source resource by the CloneTokenManager, which is the only party that knows the token is valid. */
3632
+ entityTypes?: string[];
3633
+ /** @description The resource this one is cloned FROM. Required: it is what makes this a clone rather than a creation. */
3634
+ parentResourceId: string;
3635
+ /** @description The bytes were already written by the uploader; the Stower's register does the one `git add` on apply (GATEWAY.md D4b). */
3636
+ noGit?: boolean;
3637
+ };
4040
3638
  /** @description Success reply after creating a yielded resource, matched to the originating command by correlationId. */
4041
3639
  YieldCreateOk: {
4042
3640
  /** @description Correlation id echoed from the yield:create command so busRequest can match the reply. */
@@ -4046,6 +3644,15 @@ interface components {
4046
3644
  resourceId: string;
4047
3645
  };
4048
3646
  };
3647
+ /** @description Success reply after cloning a resource, matched to the originating command by correlationId. */
3648
+ YieldClonePersistOk: {
3649
+ /** @description Correlation id echoed from the yield:clone-persist command so busRequest can match the reply. */
3650
+ correlationId?: string;
3651
+ /** @description The clone's identity — a new resource, distinct from its parent. */
3652
+ response: {
3653
+ resourceId: string;
3654
+ };
3655
+ };
4049
3656
  /** @description Bus command to move (rename) a yielded resource. */
4050
3657
  YieldMvCommand: {
4051
3658
  /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
@@ -4061,6 +3668,7 @@ interface components {
4061
3668
  /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
4062
3669
  _userId?: string;
4063
3670
  resourceId: string;
3671
+ /** @description The caller's instruction for WHERE the bytes are — not a copy of the stored fact. The stored location lives on the resource's primary Representation (`Representation.storageUri`), which is its single home; this field is the message that puts it there. Working-tree URI, only file:// is supported (e.g. file://docs/overview.md). */
4064
3672
  storageUri: string;
4065
3673
  contentChecksum: string;
4066
3674
  byteSize: number;
@@ -4408,7 +4016,7 @@ interface AnchorRect {
4408
4016
  *
4409
4017
  * The complete EventMap for the RxJS EventBus. Every channel name and
4410
4018
  * its payload type is defined here — domain events, commands, reads,
4411
- * results, SSE stream payloads, and frontend UI events.
4019
+ * results, SSE stream payloads, and Browser UI events.
4412
4020
  *
4413
4021
  * Identifier discipline: where a payload carries an annotation or
4414
4022
  * resource id, the TypeScript layer narrows the OpenAPI `string` to the
@@ -4454,6 +4062,7 @@ type EventMap = {
4454
4062
  'yield:representation-added': StoredEvent<EventOfType<'yield:representation-added'>>;
4455
4063
  'yield:representation-removed': StoredEvent<EventOfType<'yield:representation-removed'>>;
4456
4064
  'yield:create': components['schemas']['YieldCreateCommand'];
4065
+ 'yield:clone-persist': components['schemas']['YieldClonePersistCommand'];
4457
4066
  'yield:update': components['schemas']['YieldUpdateCommand'];
4458
4067
  'yield:mv': components['schemas']['YieldMvCommand'];
4459
4068
  'yield:clone': void;
@@ -4462,6 +4071,10 @@ type EventMap = {
4462
4071
  'yield:clone-create': components['schemas']['YieldCloneCreateCommand'];
4463
4072
  'yield:create-ok': components['schemas']['YieldCreateOk'];
4464
4073
  'yield:create-failed': components['schemas']['CommandError'];
4074
+ 'yield:clone-persist-ok': components['schemas']['YieldClonePersistOk'];
4075
+ 'yield:clone-persist-failed': {
4076
+ correlationId: string;
4077
+ } & components['schemas']['CommandError'];
4465
4078
  'yield:update-ok': components['schemas']['YieldUpdateOk'];
4466
4079
  'yield:update-failed': components['schemas']['CommandError'];
4467
4080
  'yield:move-failed': {
@@ -4501,6 +4114,16 @@ type EventMap = {
4501
4114
  'mark:update-entity-types': components['schemas']['MarkUpdateEntityTypesCommand'];
4502
4115
  'mark:create-ok': components['schemas']['MarkCreateOk'];
4503
4116
  'mark:create-failed': components['schemas']['CommandError'];
4117
+ /**
4118
+ * Persist a detection unit's annotations as ONE acknowledged batch
4119
+ * (JOB-RESTART-SAFETY P6). Answered only after every annotation is in
4120
+ * the event log, so a worker can gate unit completion on durability
4121
+ * instead of on emission — which is what makes an Archivist outage a
4122
+ * delay rather than silent data loss.
4123
+ */
4124
+ 'mark:commit': components['schemas']['MarkCommitCommand'];
4125
+ 'mark:commit-ok': components['schemas']['MarkCommitOk'];
4126
+ 'mark:commit-failed': components['schemas']['CommandError'];
4504
4127
  'mark:delete-ok': components['schemas']['MarkDeleteOk'];
4505
4128
  'mark:delete-failed': components['schemas']['CommandError'];
4506
4129
  'mark:archive-ok': {
@@ -4601,6 +4224,14 @@ type EventMap = {
4601
4224
  'browse:anchored-text-failed': {
4602
4225
  correlationId: string;
4603
4226
  } & components['schemas']['CommandError'];
4227
+ 'browse:anchored-text-by-checksum-requested': components['schemas']['BrowseAnchoredTextByChecksumRequest'];
4228
+ 'browse:anchored-text-by-checksum-result': {
4229
+ correlationId: string;
4230
+ response: components['schemas']['ExtractionOutcome'] | null;
4231
+ };
4232
+ 'browse:anchored-text-by-checksum-failed': {
4233
+ correlationId: string;
4234
+ } & components['schemas']['CommandError'];
4604
4235
  'browse:resources-requested': components['schemas']['BrowseResourcesRequest'];
4605
4236
  'browse:resources-result': {
4606
4237
  correlationId: string;
@@ -4706,8 +4337,10 @@ type EventMap = {
4706
4337
  'job:report-progress': components['schemas']['JobReportProgressCommand'];
4707
4338
  'job:complete': components['schemas']['JobCompleteCommand'];
4708
4339
  'job:fail': components['schemas']['JobFailCommand'];
4340
+ 'job:checkpoint': components['schemas']['JobCheckpointCommand'];
4709
4341
  'job:queued': components['schemas']['JobQueuedEvent'];
4710
4342
  'job:cancel-requested': components['schemas']['JobCancelRequest'];
4343
+ 'job:cancel': components['schemas']['JobCancelCommand'];
4711
4344
  'job:status-requested': components['schemas']['JobStatusRequest'];
4712
4345
  'job:create': components['schemas']['JobCreateCommand'];
4713
4346
  'job:claim': components['schemas']['JobClaimCommand'];
@@ -4737,7 +4370,7 @@ type EventMap = {
4737
4370
  * Emitted by the Weaver after applying an event (or a batch's last event)
4738
4371
  * for a resource to the graph. `sequenceNumber` is the resource-stream
4739
4372
  * sequence of the last applied event. Folded by `WeaveProgress`
4740
- * (make-meaning) into the backend-local applied map that the
4373
+ * (make-meaning) into the gateway-local applied map that the
4741
4374
  * `whenApplied` barrier awaits. In-process signal today; crosses the
4742
4375
  * bus gateway after WEAVER-ISOLATION.
4743
4376
  */
@@ -4867,6 +4500,7 @@ declare const CHANNEL_SCHEMAS: {
4867
4500
  readonly 'yield:representation-added': null;
4868
4501
  readonly 'yield:representation-removed': null;
4869
4502
  readonly 'yield:create': "YieldCreateCommand";
4503
+ readonly 'yield:clone-persist': "YieldClonePersistCommand";
4870
4504
  readonly 'yield:update': "YieldUpdateCommand";
4871
4505
  readonly 'yield:mv': "YieldMvCommand";
4872
4506
  readonly 'yield:clone': null;
@@ -4875,6 +4509,8 @@ declare const CHANNEL_SCHEMAS: {
4875
4509
  readonly 'yield:clone-create': "YieldCloneCreateCommand";
4876
4510
  readonly 'yield:create-ok': "YieldCreateOk";
4877
4511
  readonly 'yield:create-failed': "CommandError";
4512
+ readonly 'yield:clone-persist-ok': "YieldClonePersistOk";
4513
+ readonly 'yield:clone-persist-failed': null;
4878
4514
  readonly 'yield:update-ok': "YieldUpdateOk";
4879
4515
  readonly 'yield:update-failed': null;
4880
4516
  readonly 'yield:move-failed': null;
@@ -4904,6 +4540,9 @@ declare const CHANNEL_SCHEMAS: {
4904
4540
  readonly 'frame:add-tag-schema': "FrameAddTagSchemaCommand";
4905
4541
  readonly 'mark:create-ok': "MarkCreateOk";
4906
4542
  readonly 'mark:create-failed': "CommandError";
4543
+ readonly 'mark:commit': "MarkCommitCommand";
4544
+ readonly 'mark:commit-ok': "MarkCommitOk";
4545
+ readonly 'mark:commit-failed': "CommandError";
4907
4546
  readonly 'mark:delete-ok': "MarkDeleteOk";
4908
4547
  readonly 'mark:delete-failed': "CommandError";
4909
4548
  readonly 'mark:archive-ok': null;
@@ -4953,6 +4592,9 @@ declare const CHANNEL_SCHEMAS: {
4953
4592
  readonly 'browse:anchored-text-requested': "BrowseAnchoredTextRequest";
4954
4593
  readonly 'browse:anchored-text-result': "BrowseAnchoredTextResult";
4955
4594
  readonly 'browse:anchored-text-failed': null;
4595
+ readonly 'browse:anchored-text-by-checksum-requested': "BrowseAnchoredTextByChecksumRequest";
4596
+ readonly 'browse:anchored-text-by-checksum-result': "BrowseAnchoredTextResult";
4597
+ readonly 'browse:anchored-text-by-checksum-failed': null;
4956
4598
  readonly 'browse:resources-requested': "BrowseResourcesRequest";
4957
4599
  readonly 'browse:resources-result': "BrowseResourcesResult";
4958
4600
  readonly 'browse:resources-failed': null;
@@ -5009,8 +4651,10 @@ declare const CHANNEL_SCHEMAS: {
5009
4651
  readonly 'job:report-progress': "JobReportProgressCommand";
5010
4652
  readonly 'job:complete': "JobCompleteCommand";
5011
4653
  readonly 'job:fail': "JobFailCommand";
4654
+ readonly 'job:checkpoint': "JobCheckpointCommand";
5012
4655
  readonly 'job:queued': "JobQueuedEvent";
5013
4656
  readonly 'job:cancel-requested': "JobCancelRequest";
4657
+ readonly 'job:cancel': "JobCancelCommand";
5014
4658
  readonly 'job:status-requested': "JobStatusRequest";
5015
4659
  readonly 'job:create': "JobCreateCommand";
5016
4660
  readonly 'job:claim': "JobClaimCommand";
@@ -5198,6 +4842,13 @@ declare class EventBus {
5198
4842
  * using runtime `PersistedEventType` strings.
5199
4843
  */
5200
4844
  getDomainEvent(eventType: PersistedEventType): Subject<StoredEvent>;
4845
+ /**
4846
+ * Channel names with at least one live observer right now. Introspection
4847
+ * for composition-parity gates: `get()` creates subjects lazily, so mere
4848
+ * access does not count — only real subscriptions do. Scoped channels
4849
+ * appear under their namespaced key (`<scope>:<channel>`).
4850
+ */
4851
+ observedChannels(): string[];
5201
4852
  /**
5202
4853
  * Destroy the event bus and complete all subjects
5203
4854
  *
@@ -5434,7 +5085,7 @@ declare function errField(error: unknown): unknown;
5434
5085
  * Bus logging — runtime-toggleable cross-wire visibility.
5435
5086
  *
5436
5087
  * One line per event that crosses a process boundary, in a grep-able
5437
- * format that's symmetric across frontend and backend:
5088
+ * format that's symmetric across frontend and gateway:
5438
5089
  *
5439
5090
  * [bus EMIT] <channel> [scope=X] [cid=<first8>] <payload>
5440
5091
  * [bus RECV] <channel> [scope=X] [cid=<first8>] <payload>
@@ -5924,7 +5575,11 @@ declare function getChecksum(resource: ResourceDescriptor | undefined): string |
5924
5575
  */
5925
5576
  declare function getLanguage(resource: ResourceDescriptor | undefined): string | undefined;
5926
5577
  /**
5927
- * Get storage URI from primary representation
5578
+ * Get the storage URI from the primary representation — the field's ONE home
5579
+ * (STORAGE-URI-ONE-HOME): bytes are a fact about a rendition, so their
5580
+ * location lives on the Representation, never on the descriptor. This is the
5581
+ * accessor every descriptor-holding read goes through; `undefined` means the
5582
+ * resource has no stored bytes.
5928
5583
  *
5929
5584
  * @param resource - ResourceDescriptor
5930
5585
  * @returns Storage URI or undefined
@@ -6014,7 +5669,7 @@ declare function decodeRepresentation(buffer: Buffer, mediaType: string): string
6014
5669
  * - `not-found` — resource missing (HTTP 404)
6015
5670
  * - `conflict` — concurrent modification, duplicate, etc. (HTTP 409)
6016
5671
  * - `bad-request` — request malformed (HTTP 400)
6017
- * - `unavailable` — backend unreachable, network error, 5xx
5672
+ * - `unavailable` — gateway unreachable, network error, 5xx
6018
5673
  * - `error` — unclassified fallback
6019
5674
  */
6020
5675
  type TransportErrorCode = 'unauthorized' | 'forbidden' | 'not-found' | 'conflict' | 'bad-request' | 'unavailable' | 'error';
@@ -6050,11 +5705,11 @@ declare class ConflictError extends SemiontError {
6050
5705
  *
6051
5706
  * ITransport — bus primitives + lifecycle. Universal: every
6052
5707
  * concrete transport implements this.
6053
- * IBackendOperations — auth, admin, exchange, system endpoints.
5708
+ * IGatewayOperations — auth, admin, and system endpoints.
6054
5709
  * HTTP-shaped today; an in-process transport may
6055
5710
  * implement none, some, or a different set.
6056
5711
  * Optional on `SemiontClient` — passed only when
6057
- * the host has a backend that supports them.
5712
+ * the host has a gateway that supports them.
6058
5713
  * IContentTransport — binary I/O (putBinary / getBinary). Narrow by
6059
5714
  * design because binary has different backpressure
6060
5715
  * and streaming characteristics.
@@ -6066,21 +5721,28 @@ declare class ConflictError extends SemiontError {
6066
5721
  type Agent$1 = components['schemas']['Agent'];
6067
5722
  type GetResourceResponse = components['schemas']['GetResourceResponse'];
6068
5723
  /**
6069
- * Six-state lifecycle for a transport's connection. Drives UI affordances
5724
+ * Seven-state lifecycle for a transport's connection. Drives UI affordances
6070
5725
  * (connecting spinners, reconnecting banners, etc.) and is observed via
6071
5726
  * `ITransport.state$`.
6072
5727
  *
6073
- * initial ─ pre-`start()`; never enters subscribers' streams
6074
- * except as the first replayed value
6075
- * connecting ─ in-flight initial open
6076
- * open ─ healthy, delivering events
6077
- * reconnecting ─ open → dropped, retrying; may be transient
6078
- * degraded ─ has been reconnecting for > DEGRADED_THRESHOLD_MS;
6079
- * UI banner threshold; distinguishes brief mount-
6080
- * churn cycles from sustained disconnection
6081
- * closed stop()/dispose() called; terminal
6082
- */
6083
- type ConnectionState = 'initial' | 'connecting' | 'open' | 'reconnecting' | 'degraded' | 'closed';
5728
+ * initial ─ pre-`start()`; never enters subscribers' streams
5729
+ * except as the first replayed value
5730
+ * connecting ─ in-flight initial open
5731
+ * open ─ healthy, delivering events
5732
+ * reconnecting ─ open → dropped, retrying; may be transient
5733
+ * degraded ─ has been reconnecting for > DEGRADED_THRESHOLD_MS;
5734
+ * UI banner threshold; distinguishes brief mount-
5735
+ * churn cycles from sustained disconnection
5736
+ * unauthenticated not attempting: the credential is absent, or was
5737
+ * refused (401) and only a DIFFERENT one is worth
5738
+ * trying. No network activity; recovers on its own
5739
+ * when a usable credential appears (a re-login, a
5740
+ * session refresh). The refusal itself surfaces on
5741
+ * the transport's error stream (SSE-AUTH-RESILIENCE
5742
+ * D3/D6a — one state for both answers)
5743
+ * closed ─ stop()/dispose() called; terminal
5744
+ */
5745
+ type ConnectionState = 'initial' | 'connecting' | 'open' | 'reconnecting' | 'degraded' | 'unauthenticated' | 'closed';
6084
5746
  type AuthResponse = components['schemas']['AuthResponse'];
6085
5747
  type TokenRefreshResponse = components['schemas']['TokenRefreshResponse'];
6086
5748
  type AdminUserStatsResponse = components['schemas']['AdminUserStatsResponse'];
@@ -6123,27 +5785,6 @@ type UserResponse = ResponseContent<paths['/api/users/me']['get']>;
6123
5785
  type UpdateUserRequest = RequestContent<paths['/api/admin/users/{id}']['patch']>;
6124
5786
  type UpdateUserResponse = ResponseContent<paths['/api/admin/users/{id}']['patch']>;
6125
5787
  type ListUsersResponse = ResponseContent<paths['/api/admin/users']['get']>;
6126
- type ProgressEvent = {
6127
- phase: string;
6128
- message?: string;
6129
- result?: Record<string, unknown>;
6130
- };
6131
- type ProgressCallback = (event: ProgressEvent) => void;
6132
- /**
6133
- * Stream-shaped return type for backend download operations
6134
- * (`backupKnowledgeBase`, `exportKnowledgeBase`). Transport-neutral —
6135
- * any implementation can produce a `ReadableStream<Uint8Array>` without
6136
- * fabricating a fetch `Response`. HTTP wraps `response.body` and
6137
- * `response.headers`; in-process implementations return their own stream.
6138
- *
6139
- * The same shape `IContentTransport.getBinaryStream` already uses for
6140
- * binary downloads.
6141
- */
6142
- interface BackendDownload {
6143
- stream: ReadableStream<Uint8Array>;
6144
- contentType: string;
6145
- filename?: string;
6146
- }
6147
5788
  interface ITransport {
6148
5789
  /**
6149
5790
  * Base URL the transport speaks to. For HTTP this is `https://host[:port]`;
@@ -6159,7 +5800,7 @@ interface ITransport {
6159
5800
  *
6160
5801
  * Resolves with the number of subscribers the emit reached
6161
5802
  * (`/bus/emit` responds `{subscribers: n}`; GUIDED-TOUR P1), or `-1`
6162
- * when the count is unknown — an older backend, an unreadable body, or
5803
+ * when the count is unknown — an older gateway, an unreadable body, or
6163
5804
  * an in-process transport where the question does not apply. `-1` is
6164
5805
  * the same sentinel the Go client uses: a parse failure must stay
6165
5806
  * distinguishable from a genuine empty room.
@@ -6228,9 +5869,9 @@ interface ITransport {
6228
5869
  dispose(): void;
6229
5870
  }
6230
5871
  /**
6231
- * Auth, admin, exchange, and system endpoints. HTTP-shaped today —
5872
+ * Auth, admin, and system endpoints. HTTP-shaped today —
6232
5873
  * `HttpTransport` implements both this and `ITransport`; the
6233
- * `SemiontClient` constructor takes a `IBackendOperations` argument
5874
+ * `SemiontClient` constructor takes a `IGatewayOperations` argument
6234
5875
  * separately from the bus transport so non-HTTP transports
6235
5876
  * (`LocalTransport`) can implement just the bus surface and the
6236
5877
  * SemiontClient cleanly omits `client.auth` / `client.admin`.
@@ -6239,7 +5880,7 @@ interface ITransport {
6239
5880
  * `TransportErrorCode` (see `errors.ts`) so the routing layer
6240
5881
  * (`SemiontBrowser`) stays transport-neutral.
6241
5882
  */
6242
- interface IBackendOperations {
5883
+ interface IGatewayOperations {
6243
5884
  authenticatePassword(email: Email, password: string): Promise<AuthResponse>;
6244
5885
  authenticateGoogle(credential: GoogleCredential): Promise<AuthResponse>;
6245
5886
  refreshAccessToken(token: RefreshToken): Promise<TokenRefreshResponse>;
@@ -6253,22 +5894,6 @@ interface IBackendOperations {
6253
5894
  getUserStats(): Promise<AdminUserStatsResponse>;
6254
5895
  updateUser(id: UserDID, data: UpdateUserRequest): Promise<UpdateUserResponse>;
6255
5896
  getOAuthConfig(): Promise<OAuthConfigResponse>;
6256
- backupKnowledgeBase(): Promise<BackendDownload>;
6257
- /**
6258
- * Stream of `ProgressEvent`s for a restore/import operation. The
6259
- * Observable emits each progress event in order and completes when
6260
- * the operation is done; the final event carries `phase: 'complete'`
6261
- * (or `'error'` / `'failed'` followed by an Observable error).
6262
- *
6263
- * The SDK wraps the contract's `Observable<ProgressEvent>` as a
6264
- * `StreamObservable<ProgressEvent>` so consumers can `await` for the
6265
- * final event or `.subscribe(...)` to render every step.
6266
- */
6267
- restoreKnowledgeBase(file: File): Observable<ProgressEvent>;
6268
- exportKnowledgeBase(params?: {
6269
- includeArchived?: boolean;
6270
- }): Promise<BackendDownload>;
6271
- importKnowledgeBase(file: File): Observable<ProgressEvent>;
6272
5897
  healthCheck(): Promise<HealthCheckResponse>;
6273
5898
  getStatus(): Promise<StatusResponse>;
6274
5899
  }
@@ -6284,6 +5909,15 @@ interface PutBinaryRequest {
6284
5909
  generationPrompt?: string;
6285
5910
  generator?: Agent$1 | Agent$1[];
6286
5911
  isDraft?: boolean;
5912
+ /**
5913
+ * Clone provenance (EXTRACT-ARCHIVIST P3): when set, the gateway stores
5914
+ * the bytes and routes creation through `yield:clone-create` — the
5915
+ * CloneTokenManager validates the token and inherits source metadata.
5916
+ * Bytes never ride the bus (D4a).
5917
+ */
5918
+ cloneToken?: string;
5919
+ /** Clone-only: archive the source resource after a successful clone. */
5920
+ archiveOriginal?: boolean;
6287
5921
  }
6288
5922
  /**
6289
5923
  * Optional byte-progress hook for `putBinary`. Receives raw byte counts;
@@ -6339,85 +5973,6 @@ interface IContentTransport {
6339
5973
  getResourceGraph(resourceId: ResourceId, options?: {
6340
5974
  auth?: AccessToken;
6341
5975
  }): Promise<GetResourceResponse>;
6342
- /**
6343
- * Store anchored text — the coordinate map a producer derived from a
6344
- * representation's bytes (OCR, a native text layer, a table or form
6345
- * reader) — under **the content checksum of those bytes** (PERSIST-ANCHORS
6346
- * decision A: one artifact per representation, and a representation IS its
6347
- * bytes).
6348
- *
6349
- * The producer supplies the checksum because it alone knows which bytes it
6350
- * actually read. That is a correctness rule, not a convenience: if the
6351
- * store derived the key from the resource's CURRENT representation at
6352
- * write time, a byte change racing the publish would file old geometry
6353
- * under the new checksum — wrong quotes served, and the reconcile diff
6354
- * sees "artifact present" so it never heals. Producer-supplied, the same
6355
- * race files the map under the OLD checksum: an unreachable orphan, and
6356
- * the new checksum's missing artifact is exactly what the third drift
6357
- * class re-derives (SMELTER-AXIOMS S15).
6358
- *
6359
- * Its own method rather than a `putBinary` of some derived media type: a
6360
- * coordinate map is not a *representation* of the resource, and dressing it
6361
- * as one would make a derived artifact indistinguishable from content a user
6362
- * uploaded.
6363
- *
6364
- * Whole-representation, like `getResourceGraph` is whole-resource. The
6365
- * producer iterates page by page; every consumer wants one map.
6366
- */
6367
- putAnchoredText(checksum: string, outcome: ExtractionOutcome, options?: {
6368
- auth?: AccessToken;
6369
- }): Promise<void>;
6370
- /**
6371
- * The resource's anchored text, or `null` when none has been derived.
6372
- *
6373
- * Deliberately resource-addressed while `putAnchoredText` is
6374
- * checksum-addressed: readers hold a resource id, and the server resolves
6375
- * it to the current representation's checksum through the view — the
6376
- * `resourceId → checksum` index of PERSIST-ANCHORS decision A. A reader
6377
- * therefore can never receive geometry for bytes the resource no longer
6378
- * has: the pointer moves, the artifacts stay, the index always follows
6379
- * the pointer.
6380
- *
6381
- * `null` is not an error and is the common case: a native text layer is read
6382
- * in the browser, and a resource whose media type has no extractor never
6383
- * produces a map at all. Callers degrade — for a PDF annotation that means
6384
- * geometry with no quoted text, which is the behaviour that shipped before
6385
- * any of this existed.
6386
- */
6387
- getAnchoredText(resourceId: ResourceId, options?: {
6388
- auth?: AccessToken;
6389
- }): Promise<ExtractionOutcome | null>;
6390
- /**
6391
- * The stored extraction outcome for exactly this byte content, or `null`
6392
- * for a miss — the cache-consult read (PERSIST-ANCHORS P2c). Every cache
6393
- * consumer runs out of process (the smelter worker, the detection
6394
- * workers), so the `extract()` seam's consult crosses the wire through
6395
- * this method; without it the cache would be write-only from exactly the
6396
- * processes it exists to serve.
6397
- *
6398
- * Checksum-addressed and barrier-free, unlike `getAnchoredText`:
6399
- * presence at this instant is the question (the keys listing's
6400
- * semantics), and a caller holding the checksum already holds the
6401
- * content identity — nothing to resolve, nothing to wait for.
6402
- */
6403
- getAnchoredTextByChecksum(checksum: string, options?: {
6404
- auth?: AccessToken;
6405
- }): Promise<ExtractionOutcome | null>;
6406
- /**
6407
- * Every key under which anchored text would currently be served — the
6408
- * reconcile planner's bulk existence read (PERSIST-ANCHORS P0). The
6409
- * Smelter diffs this against the catalog to find resources whose artifact
6410
- * was lost (a transient store, a failed publish) and plans re-derivation;
6411
- * one call per reconcile, never a `getAnchoredText` probe per resource,
6412
- * because each map is ~32 KB per scanned page and only presence is asked.
6413
- *
6414
- * Keys are resource ids today; after PERSIST-ANCHORS P1 they are content
6415
- * checksums. Callers compare against whichever handle the store is keyed
6416
- * by — the diff moves with the rekey, this contract does not.
6417
- */
6418
- listAnchoredTextKeys(options?: {
6419
- auth?: AccessToken;
6420
- }): Promise<string[]>;
6421
5976
  dispose(): void;
6422
5977
  }
6423
5978
 
@@ -6461,6 +6016,10 @@ declare const BUS_OPERATIONS: {
6461
6016
  readonly result: "browse:anchored-text-result";
6462
6017
  readonly failure: "browse:anchored-text-failed";
6463
6018
  };
6019
+ readonly 'browse:anchored-text-by-checksum-requested': {
6020
+ readonly result: "browse:anchored-text-by-checksum-result";
6021
+ readonly failure: "browse:anchored-text-by-checksum-failed";
6022
+ };
6464
6023
  readonly 'browse:resources-requested': {
6465
6024
  readonly result: "browse:resources-result";
6466
6025
  readonly failure: "browse:resources-failed";
@@ -6546,6 +6105,10 @@ declare const BUS_OPERATIONS: {
6546
6105
  readonly result: "mark:create-ok";
6547
6106
  readonly failure: "mark:create-failed";
6548
6107
  };
6108
+ readonly 'mark:commit': {
6109
+ readonly result: "mark:commit-ok";
6110
+ readonly failure: "mark:commit-failed";
6111
+ };
6549
6112
  readonly 'mark:delete': {
6550
6113
  readonly result: "mark:delete-ok";
6551
6114
  readonly failure: "mark:delete-failed";
@@ -6578,6 +6141,10 @@ declare const BUS_OPERATIONS: {
6578
6141
  readonly result: "yield:create-ok";
6579
6142
  readonly failure: "yield:create-failed";
6580
6143
  };
6144
+ readonly 'yield:clone-persist': {
6145
+ readonly result: "yield:clone-persist-ok";
6146
+ readonly failure: "yield:clone-persist-failed";
6147
+ };
6581
6148
  readonly 'yield:update': {
6582
6149
  readonly result: "yield:update-ok";
6583
6150
  readonly failure: "yield:update-failed";
@@ -6626,7 +6193,7 @@ type BusOperationKey = keyof typeof BUS_OPERATIONS;
6626
6193
  * and SSE infrastructure. A reply channel must NOT go here — declare its
6627
6194
  * operation in `BUS_OPERATIONS` instead.
6628
6195
  */
6629
- declare const BRIDGED_BROADCASTS: readonly ["job:report-progress", "job:complete", "job:fail", "frame:entity-type-added", "frame:tag-schema-added", "beckon:focus", "beckon:sparkle", "bus:resume-gap", "browse:resource-open", "browse:resource-viewed", "session:joined", "session:left", "browse:click"];
6196
+ declare const BRIDGED_BROADCASTS: readonly ["job:report-progress", "job:complete", "job:fail", "frame:entity-type-added", "frame:tag-schema-added", "yield:created", "yield:updated", "yield:cloned", "yield:moved", "beckon:focus", "beckon:sparkle", "bus:resume-gap", "browse:resource-open", "browse:resource-viewed", "session:joined", "session:left", "browse:click"];
6630
6197
  type OpSpecs = (typeof BUS_OPERATIONS)[keyof typeof BUS_OPERATIONS];
6631
6198
  type ProgressChannel<O> = O extends {
6632
6199
  progress: infer P extends EventName;
@@ -6651,11 +6218,24 @@ type BridgedChannel = RegistryReply | (typeof BRIDGED_BROADCASTS)[number];
6651
6218
  type BusReply<Op extends BusOperationKey> = EventMap[(typeof BUS_OPERATIONS)[Op]['result'] & EventName] extends {
6652
6219
  response: infer R;
6653
6220
  } ? R : void;
6654
- type BusRequestErrorCode = 'bus.timeout' | 'bus.rejected' | 'bus.closed' | 'bus.bad-payload' | 'bus.unauthorized' | 'bus.forbidden' | 'bus.not-found';
6221
+ type BusRequestErrorCode = 'bus.timeout' | 'bus.rejected' | 'bus.closed' | 'bus.bad-payload' | 'bus.unauthorized' | 'bus.forbidden' | 'bus.not-found' | 'bus.unsubscribed';
6655
6222
  declare class BusRequestError extends SemiontError {
6656
6223
  code: BusRequestErrorCode;
6657
6224
  constructor(message: string, code: BusRequestErrorCode, details?: Record<string, unknown>);
6658
6225
  }
6226
+ /**
6227
+ * The reply channels — result, failure, and (for streaming operations)
6228
+ * progress — of every operation in `channels`, deduplicated. Entries that
6229
+ * are not operation request channels (broadcast signals, domain events)
6230
+ * contribute nothing.
6231
+ *
6232
+ * This is THE derivation for a narrowed-subscription transport profile
6233
+ * (`HttpTransportConfig.channels`: subscribe exactly the reply channels of
6234
+ * the operations a process awaits) and for a service's outbound reply pump
6235
+ * (forward exactly the replies of the operations it answers). Restating a
6236
+ * reply channel by hand was the recurring unbridged-reply bug class.
6237
+ */
6238
+ declare function replyChannelsFor(channels: readonly string[]): EventName[];
6659
6239
  /**
6660
6240
  * Subset of ITransport that `busRequest` needs: a way to send a command and
6661
6241
  * a way to observe channels. Generic enough that an in-process transport
@@ -6689,6 +6269,16 @@ interface BusRequestPrimitive {
6689
6269
  * lose replies omits the surface and `busRequest` behaves as before.
6690
6270
  */
6691
6271
  trackReply?(correlationId: string): () => void;
6272
+ /**
6273
+ * Whether this transport's receive path delivers `channel` — i.e. a reply
6274
+ * published there can actually reach this process. Wire transports whose
6275
+ * subscription set is configurable (a worker subscribing only the reply
6276
+ * channels it awaits) implement this so `busRequest` on a channel outside
6277
+ * the set fails fast with `bus.unsubscribed` instead of burning its
6278
+ * timeout on a reply that could never arrive. OPTIONAL: an in-process
6279
+ * transport delivers every channel and omits it.
6280
+ */
6281
+ isSubscribed?(channel: string): boolean;
6692
6282
  }
6693
6283
  /**
6694
6284
  * Request/reply over the bus, keyed by the operation's request channel.
@@ -7017,7 +6607,7 @@ declare function reconcileSelector(content: string, llm: LlmSelectorInput): Reco
7017
6607
  /**
7018
6608
  * Text encoding utilities for consistent charset handling
7019
6609
  *
7020
- * Ensures frontend decoding matches backend decoding by respecting
6610
+ * Ensures frontend decoding matches gateway decoding by respecting
7021
6611
  * charset parameters in mediaType (e.g., "text/plain; charset=iso-8859-1")
7022
6612
  */
7023
6613
  /**
@@ -7036,7 +6626,7 @@ declare function extractCharset(mediaType: string): string;
7036
6626
  *
7037
6627
  * Uses TextDecoder with the charset extracted from mediaType parameter.
7038
6628
  * This ensures the same character space is used for both annotation creation
7039
- * (backend) and rendering (frontend).
6629
+ * (gateway) and rendering (frontend).
7040
6630
  *
7041
6631
  * @param buffer - Binary data to decode
7042
6632
  * @param mediaType - Media type with optional charset parameter
@@ -7120,11 +6710,16 @@ declare function isValidEmail(email: string): boolean;
7120
6710
  * embedding, never mojibake)
7121
6711
  * - `authorable` — offered in the compose editor's format dropdown
7122
6712
  * - `uploadable` — big tent: true for every registry member
6713
+ * - `generatable` — the generation worker can produce it as a yield artifact
7123
6714
  *
7124
6715
  * Capabilities are orthogonal strategies, not a ladder: images render but
7125
6716
  * yield no text; PDFs yield text but aren't authorable. A "tier" is a
7126
6717
  * derived reading, not a stored fact.
7127
6718
  *
6719
+ * Questions ANSWERABLE from those rows get a helper, never a row of their own —
6720
+ * `isAnnotatable` reads `anchoring`, and a second stored field would be a fact
6721
+ * that can contradict the one it was derived from.
6722
+ *
7128
6723
  * Import-leniency invariant: restore/import preserves archive mediaTypes
7129
6724
  * verbatim, so "every stored mediaType is registry-valid" holds only for
7130
6725
  * content that entered through the validated create/yield gate. No code
@@ -7301,6 +6896,15 @@ declare function baseMediaType(format: string): string;
7301
6896
  declare function isSupportedMediaType(format: string): format is SupportedMediaType;
7302
6897
  /** Capabilities for a format (parameters tolerated), or undefined on registry miss. */
7303
6898
  declare function capabilitiesOf(format: string): MediaTypeCapabilities | undefined;
6899
+ /**
6900
+ * The clone-format gate (MEDIA-TYPES.md Phase 5, moved here for
6901
+ * EXTRACT-ARCHIVIST's clone wire-shape change): a clone opens in the
6902
+ * compose editor, so authorable sources keep their base media type and
6903
+ * everything else falls back to text/plain. Lives beside the registry it
6904
+ * reads; the SDK applies it when deriving a clone upload's format and the
6905
+ * CloneTokenManager's tests pin it.
6906
+ */
6907
+ declare function cloneFormat(sourceMediaType: string | undefined): SupportedMediaType;
7304
6908
  /**
7305
6909
  * Lenient extension lookup for naming foreign/imported content: '.dat' on
7306
6910
  * registry miss. Exporters use this — a vocabulary change must never
@@ -7321,6 +6925,19 @@ declare function mediaTypeForExtension(ext: string): SupportedMediaType | undefi
7321
6925
  * unregistered text subtypes embed too), everything else is 'none'.
7322
6926
  */
7323
6927
  declare function textExtractionOf(format: string): TextExtraction;
6928
+ /**
6929
+ * WHETHER a type can carry annotations — `anchoring` remains the authority on
6930
+ * HOW. Derived rather than stored: a parallel `annotatable` row field would be
6931
+ * two facts that can disagree, with nothing to adjudicate
6932
+ * `{ annotatable: true, anchoring: 'none' }`.
6933
+ *
6934
+ * Strict on a registry miss, where `textExtractionOf` above is lenient. The
6935
+ * asymmetry is deliberate. Extracting the wrong bytes costs one bad vector,
6936
+ * and refusing to extract costs a resource nobody can find, so extraction
6937
+ * guesses; an annotation is a durable write against a coordinate model the
6938
+ * system does not have for an unknown type, so it refuses.
6939
+ */
6940
+ declare function isAnnotatable(format: string): boolean;
7324
6941
  /** Types offered in the compose editor's format dropdown. */
7325
6942
  declare const AUTHORABLE_MEDIA_TYPES: readonly SupportedMediaType[];
7326
6943
  /** Registry rows whose text the Smelter can extract. Rows only — the
@@ -7462,6 +7079,61 @@ interface StateUnit {
7462
7079
  dispose(): void;
7463
7080
  }
7464
7081
 
7082
+ /**
7083
+ * Storage URI Derivation
7084
+ *
7085
+ * Builds the name a resource's content lives under in the working tree, from
7086
+ * its title and validated media type. Extensions come from the media-type
7087
+ * registry; formats are validated upstream at the create/yield boundary, so
7088
+ * the lookup is strict — no fallback.
7089
+ *
7090
+ * Lives in `@semiont/core` rather than `@semiont/content` (moved
7091
+ * 2026-08-24, GENERATION-OUTPUT-FORMAT D10) because the generation form
7092
+ * proposes a default path and react-ui cannot depend on the node-flavoured
7093
+ * content package. This module imports only the registry, so it is
7094
+ * browser-safe.
7095
+ */
7096
+
7097
+ /**
7098
+ * The FILENAME a resource's content takes: slug + the registry's extension.
7099
+ *
7100
+ * The name is lowercased, runs of non-alphanumeric characters collapse to
7101
+ * single hyphens, and leading/trailing hyphens are stripped.
7102
+ *
7103
+ * This is the fragment form, for callers composing a path themselves — the
7104
+ * generation form's input sits beside a `file://` prefix chip, so it must not
7105
+ * strip a prefix this helper just added.
7106
+ *
7107
+ * @example
7108
+ * storageFileName("My Document", "text/markdown") // => "my-document.md"
7109
+ */
7110
+ declare function storageFileName(name: string, format: SupportedMediaType): string;
7111
+ /**
7112
+ * Derive a full `file://` storage URI from a resource name and media type.
7113
+ *
7114
+ * @example
7115
+ * deriveStorageUri("My Document", "text/markdown") // => "file://my-document.md"
7116
+ */
7117
+ declare function deriveStorageUri(name: string, format: SupportedMediaType): string;
7118
+ /**
7119
+ * The folder a resource lives in, WITHOUT a trailing slash — `''` when it sits
7120
+ * at the tree root. Accepts a `file://` URI or a bare path.
7121
+ */
7122
+ declare function folderOf(storageUri: string | undefined): string;
7123
+ /**
7124
+ * The Save location a form PROPOSES: beside the source resource, named for the
7125
+ * title, extended for the chosen format (GENERATION-OUTPUT-FORMAT D11).
7126
+ *
7127
+ * Deriving the whole filename — extension included — has a happy consequence:
7128
+ * while untouched, switching format rewrites the extension too, so D7's
7129
+ * mismatch refusal becomes unreachable except on hand-edited paths. It guards
7130
+ * deliberate edits rather than trapping ordinary use.
7131
+ *
7132
+ * Returns `''` for an empty title: a bare extension (".md") reads as a hidden
7133
+ * file and is nobody's intent.
7134
+ */
7135
+ declare function proposeStoragePath(folder: string, title: string, format: SupportedMediaType): string;
7136
+
7465
7137
  /**
7466
7138
  * Common type guard utilities
7467
7139
  */
@@ -7761,9 +7433,9 @@ interface BuildRequirements {
7761
7433
  }
7762
7434
  /**
7763
7435
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
7764
- * via the `definition` "BackendServiceConfig".
7436
+ * via the `definition` "GatewayServiceConfig".
7765
7437
  */
7766
- interface BackendServiceConfig {
7438
+ interface GatewayServiceConfig {
7767
7439
  platform: ServicePlatformConfig;
7768
7440
  devMode?: boolean;
7769
7441
  command?: string;
@@ -7812,58 +7484,6 @@ interface BackendServiceConfig {
7812
7484
  [k: string]: string;
7813
7485
  };
7814
7486
  }
7815
- /**
7816
- * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
7817
- * via the `definition` "FrontendServiceConfig".
7818
- */
7819
- interface FrontendServiceConfig {
7820
- platform: ServicePlatformConfig;
7821
- devMode?: boolean;
7822
- command?: string;
7823
- port: number;
7824
- siteName: string;
7825
- image?: string;
7826
- projectRoot?: string;
7827
- databaseUrl?: string;
7828
- timeout?: number;
7829
- wait?: number;
7830
- logsEndpoint?: string;
7831
- tag?: string;
7832
- resources?: ResourceRequirements;
7833
- security?: SecurityRequirements;
7834
- build?: boolean | BuildRequirements;
7835
- dockerfile?: string;
7836
- buildContext?: string;
7837
- buildArgs?: {
7838
- [k: string]: string;
7839
- };
7840
- buildTarget?: string;
7841
- prebuilt?: boolean;
7842
- noCache?: boolean;
7843
- secrets?: string[];
7844
- labels?: {
7845
- [k: string]: string;
7846
- };
7847
- annotations?: {
7848
- [k: string]: string;
7849
- };
7850
- dependencies?: string[];
7851
- externalDependencies?: (string | {
7852
- name?: string;
7853
- url?: string;
7854
- required?: boolean;
7855
- healthCheck?: string;
7856
- [k: string]: unknown;
7857
- })[];
7858
- environment?: {
7859
- [k: string]: string;
7860
- };
7861
- env?: {
7862
- [k: string]: string;
7863
- };
7864
- publicURL?: string;
7865
- allowedOrigins?: string[];
7866
- }
7867
7487
  /**
7868
7488
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
7869
7489
  * via the `definition` "VectorsServiceConfig".
@@ -8034,13 +7654,26 @@ interface McpServiceConfig {
8034
7654
  * via the `definition` "ServicesConfig".
8035
7655
  */
8036
7656
  interface ServicesConfig {
8037
- backend?: BackendServiceConfig;
8038
- frontend?: FrontendServiceConfig;
7657
+ gateway?: GatewayServiceConfig;
8039
7658
  database?: DatabaseServiceConfig;
8040
7659
  graph?: GraphServiceConfig;
8041
7660
  mcp?: McpServiceConfig;
8042
7661
  vectors: VectorsServiceConfig;
8043
7662
  embedding: EmbeddingServiceConfig;
7663
+ archivist?: ArchivistServiceConfig;
7664
+ [k: string]: unknown;
7665
+ }
7666
+ /**
7667
+ * The Archivist service — the out-of-process keeper of the record (EXTRACT-ARCHIVIST). Internal-only: the gateway dials host:port for the D1 sequence-ranged event read path; nothing public.
7668
+ *
7669
+ * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
7670
+ * via the `definition` "ArchivistServiceConfig".
7671
+ */
7672
+ interface ArchivistServiceConfig {
7673
+ platform?: ServicePlatformConfig;
7674
+ host?: string;
7675
+ port?: number;
7676
+ image?: string;
8044
7677
  [k: string]: unknown;
8045
7678
  }
8046
7679
  /**
@@ -8055,7 +7688,7 @@ interface SiteConfig {
8055
7688
  /**
8056
7689
  * Primary domain for the site
8057
7690
  */
8058
- domain: string;
7691
+ domain?: string;
8059
7692
  /**
8060
7693
  * Administrator email address
8061
7694
  */
@@ -8130,6 +7763,17 @@ interface EnvironmentConfig {
8130
7763
  * Environment name
8131
7764
  */
8132
7765
  name?: string;
7766
+ /**
7767
+ * The KB's committed identity, staged by the launcher (SINGLE-KB-MOUNT D4). Top-level in the staged file, out of any environment section's reach; never overridable.
7768
+ */
7769
+ kb?: {
7770
+ name: string;
7771
+ domain?: string;
7772
+ /**
7773
+ * Sign-in policy committed in the KB's .semiont/config, staged alongside the identity because the gateway no longer mounts the tree that holds it.
7774
+ */
7775
+ oauthAllowedDomains?: string[];
7776
+ };
8133
7777
  platform?: {
8134
7778
  default?: PlatformType$1;
8135
7779
  [k: string]: unknown;
@@ -8356,8 +8000,8 @@ declare function deriveViews(graph: KnowledgeGraph, mainResourceId: string, foca
8356
8000
  *
8357
8001
  * Exists for startup-critical network calls in long-running peers (worker,
8358
8002
  * smelter, weaver): each authenticates against the KS the moment its
8359
- * container starts, and the backend may not be reachable for a few seconds
8360
- * (backend restart, container-network warm-up). Orchestration runs these
8003
+ * container starts, and the gateway may not be reachable for a few seconds
8004
+ * (gateway restart, container-network warm-up). Orchestration runs these
8361
8005
  * processes with `--rm` and no restart policy, so a process that dies on
8362
8006
  * the first `TypeError: fetch failed` is dead for good — the retry window
8363
8007
  * here is the only recovery it gets.
@@ -8380,7 +8024,7 @@ interface RetryAttemptInfo {
8380
8024
  error: unknown;
8381
8025
  }
8382
8026
  /**
8383
- * Default policy for startup connections to the backend: 8 attempts with
8027
+ * Default policy for startup connections to the gateway: 8 attempts with
8384
8028
  * delays 1s, 2s, 4s, then capped at 8s — ~39s of patience before giving up.
8385
8029
  */
8386
8030
  declare const STARTUP_FETCH_RETRY: RetryPolicy;
@@ -8388,7 +8032,7 @@ declare const STARTUP_FETCH_RETRY: RetryPolicy;
8388
8032
  * True for the errors `fetch` throws when the connection itself fails —
8389
8033
  * undici's `TypeError: fetch failed` (ECONNREFUSED, ENOTFOUND, reset,
8390
8034
  * timeout — the socket error rides in `cause`). Deliberately false for
8391
- * HTTP-level failures (a 401 means the backend is UP and rejected us;
8035
+ * HTTP-level failures (a 401 means the gateway is UP and rejected us;
8392
8036
  * retrying won't change its mind) and for programming errors.
8393
8037
  */
8394
8038
  declare function isTransientFetchError(error: unknown): boolean;
@@ -8466,5 +8110,5 @@ declare function getShardPath(key: string, numBuckets?: number): [string, string
8466
8110
  */
8467
8111
  declare const DISCOVERY_URL_PATH = "/discovery/kbs.json";
8468
8112
 
8469
- export { AUTHORABLE_MEDIA_TYPES, BRIDGED_CHANNELS, BUS_OPERATIONS, BusRequestError, CHANNEL_SCHEMAS, CONTEXT_FULL_WEIGHT, CONTEXT_PARTIAL_WEIGHT, ConfigurationError, ConflictError, DEFAULT_CHUNKING_CONFIG, DISCOVERY_URL_PATH, EMBEDDABLE_MEDIA_TYPES, EventBus, GENERATABLE_MEDIA_TYPES, JWTTokenSchema, LOCALES, MEDIA_TYPES, NotFoundError, PERSISTED_EVENT_TYPES, POSITION_WEIGHT_MAX, POSITION_WINDOW, RESOURCE_BROADCAST_TYPES, STARTUP_FETCH_RETRY, ScopedEventBus, ScriptError, SemiontError, UnauthorizedError, ValidationError, accessToken, agentToDid, anchorAnnotation, anchorRuns, annotationId, annotationUri, applyBodyOperations, assembleAnnotation, authCode, baseMediaType, baseUrl, buildContentCache, burstBuffer, busLog, busLogEnabled, busRequest, capabilitiesOf, chunkText, cloneToken, createCircleSvg, createFragmentSelector, createPolygonSvg, createRectangleSvg, createTomlConfigLoader, decodeRepresentation, decodeWithCharset, deriveViews, didToAgent, email, entityType, errField, estimateTokens, extensionForMediaType, extractBoundingBox, extractCharset, extractContext, findBestTextMatch, findBodyItem, findClaimSpan, formatLocaleDisplay, generateUuid, getAllLocaleCodes, getAllPlatformTypes, getAnnotationExactText, getAnnotationUriFromEvent, getBodySource, getBodyType, getChecksum, getCommentText, getCreator, getDerivedFrom, getExactText, getFragmentSelector, getLanguage, getLocaleEnglishName, getLocaleInfo, getLocaleNativeName, getNodeEncoding, getPageFromFragment, getPrimaryMediaType, getPrimaryRepresentation, getPrimarySelector, getResourceEntityTypes, getResourceId, getShardPath, getStorageUri, getSvgSelector, getTargetSelector, getTargetSource, getTextPositionSelector, getTextQuoteSelector, googleCredential, hasTargetSelector, isAnnotationId, isArchived, isArray, isAssessment, isBodyResolved, isBoolean, isComment, isDefined, isDraft, isEventRelatedToAnnotation, isFunction, isGatheredContext, isGenerationJobParams, isHighlight, isNull, isNullish, isNumber, isObject, isReference, isResolvedReference, isResourceId, isStoredEvent, isString, isStubReference, isSupportedMediaType, isTag, isTextRun, isTransientFetchError, isUndefined, isValidEmail, isValidPlatformType, jobId, jumpConsistentHash, kbDid, loadTomlConfig, locate, mcpToken, mediaTypeForExtension, normalizeCoordinates, normalizeText, parseEnvironment, parseFragmentSelector, parseSvgSelector, reconcileSelector, refreshToken, resourceAnnotationUri, resourceId, resourceUri, retryWithBackoff, scaleSvgToNative, searchQuery, serializePerKey, setBusLogTraceIdProvider, softwareToAgent, textExtractionOf, textUnder, userDID, userId, userToAgent, userToDid, uuidV4, validateData, validateEnvironment, validateSvgMarkup, verifyPosition };
8470
- export type { AccessToken, AnchorConfidence, AnchorMethod, AnchorRect, AnchorSelectors, AnchorStrategy, AnchoredText, AnchoringModel, Annotation, AnnotationCategory, AnnotationId, AnnotationUri, AnthropicProviderConfig, AppConfig, AssembledAnnotation, AuthCode, BackendDownload, BackendServiceConfig, BaseUrl, BodyItem, BodyItemIdentity, BodyOperation, BoundingBox, Brand, BridgedChannel, BurstBufferOptions, BusOp, BusOperationKey, BusOperationSpec, BusRequestErrorCode, BusRequestPrimitive, ChunkingConfig, CloneToken, CollaboratorEntry, ConnectionState, ContentCache, ContentFormat, CreateAnnotationInternal, DatabaseServiceConfig, DiscoveredKB, DiscoveryDocument, Email, EmbeddingServiceConfig, EmittableChannel, EntityType, EntityTypeStats, Environment, EnvironmentConfig, EventBase, EventInput, EventMap, EventMetadata, EventName, EventOfType, EventQuery, EventSignature, ExtractionOutcome, FragmentSelector, FrontendServiceConfig, GatheredContext, GenerationJobParams, GoogleAuthRequest, GoogleCredential, GraphConnection, GraphDatabaseType, GraphPath, GraphServiceConfig, GraphViews, HealthCheckResponse, IBackendOperations, IContentTransport, ITransport, InferenceProvidersConfig, JobId, JobType, ListUsersResponse, LlmSelectorInput, LocaleInfo, Logger, MCPToken, MatchQuality, McpServiceConfig, MediaTypeCapabilities, Motivation, OllamaProviderConfig, PdfCoordinate, PdfTextItem, PdfTextRun, PersistedEvent, PersistedEventType, PlatformType, Point, ProgressCallback, ProgressEvent, PutBinaryOptions, PutBinaryProgress, PutBinaryRequest, ReconciledSelector, RefreshToken, RenderMode, RenderedAnchor, ResourceAnnotationUri, ResourceAnnotations, ResourceBroadcastType, ResourceDescriptor, ResourceFilter, ResourceId, ResourceUri, RetryAttemptInfo, RetryPolicy, SearchQuery, SelectionData, Selector, SemiontConfig, ServicePlatformConfig, ServicesConfig, SiteConfig, StateUnit, StatusResponse, StoredEvent, StoredEventLike, SupportedMediaType, SvgSelector, TagCategory, TagSchema, TextExtraction, TextPosition, TextPositionSelector, TextQuoteSelector, ActorInferenceConfig as TomlActorInferenceConfig, TomlFileReader, InferenceConfig as TomlInferenceConfig, WorkerInferenceConfig as TomlWorkerInferenceConfig, TransportErrorCode, UpdateResourceInput, UpdateUserRequest, UpdateUserResponse, UserDID, UserId, UserResponse, ValidationFailure, ValidationResult, ValidationSuccess, VectorsServiceConfig, components, operations, paths };
8113
+ export { AUTHORABLE_MEDIA_TYPES, BRIDGED_CHANNELS, BUS_OPERATIONS, BusRequestError, CHANNEL_SCHEMAS, CONTEXT_FULL_WEIGHT, CONTEXT_PARTIAL_WEIGHT, ConfigurationError, ConflictError, DEFAULT_CHUNKING_CONFIG, DISCOVERY_URL_PATH, EMBEDDABLE_MEDIA_TYPES, EventBus, GENERATABLE_MEDIA_TYPES, JWTTokenSchema, LOCALES, MEDIA_TYPES, NotFoundError, PERSISTED_EVENT_TYPES, POSITION_WEIGHT_MAX, POSITION_WINDOW, RESOURCE_BROADCAST_TYPES, STARTUP_FETCH_RETRY, ScopedEventBus, ScriptError, SemiontError, UnauthorizedError, ValidationError, accessToken, agentToDid, anchorAnnotation, anchorRuns, annotationId, annotationUri, applyBodyOperations, assembleAnnotation, authCode, baseMediaType, baseUrl, buildContentCache, burstBuffer, busLog, busLogEnabled, busRequest, capabilitiesOf, chunkText, cloneFormat, cloneToken, createCircleSvg, createFragmentSelector, createPolygonSvg, createRectangleSvg, createTomlConfigLoader, decodeRepresentation, decodeWithCharset, deriveStorageUri, deriveViews, didToAgent, email, entityType, errField, estimateTokens, extensionForMediaType, extractBoundingBox, extractCharset, extractContext, findBestTextMatch, findBodyItem, findClaimSpan, folderOf, formatLocaleDisplay, generateUuid, getAllLocaleCodes, getAllPlatformTypes, getAnnotationExactText, getAnnotationUriFromEvent, getBodySource, getBodyType, getChecksum, getCommentText, getCreator, getDerivedFrom, getExactText, getFragmentSelector, getLanguage, getLocaleEnglishName, getLocaleInfo, getLocaleNativeName, getNodeEncoding, getPageFromFragment, getPrimaryMediaType, getPrimaryRepresentation, getPrimarySelector, getResourceEntityTypes, getResourceId, getShardPath, getStorageUri, getSvgSelector, getTargetSelector, getTargetSource, getTextPositionSelector, getTextQuoteSelector, googleCredential, hasTargetSelector, isAnnotatable, isAnnotationId, isArchived, isArray, isAssessment, isBodyResolved, isBoolean, isComment, isDefined, isDraft, isEventRelatedToAnnotation, isFunction, isGatheredContext, isGenerationJobParams, isHighlight, isNull, isNullish, isNumber, isObject, isReference, isResolvedReference, isResourceId, isStoredEvent, isString, isStubReference, isSupportedMediaType, isTag, isTextRun, isTransientFetchError, isUndefined, isValidEmail, isValidPlatformType, jobId, jumpConsistentHash, kbDid, loadTomlConfig, locate, mcpToken, mediaTypeForExtension, normalizeCoordinates, normalizeText, parseEnvironment, parseFragmentSelector, parseSvgSelector, proposeStoragePath, reconcileSelector, refreshToken, replyChannelsFor, resourceAnnotationUri, resourceId, resourceUri, retryWithBackoff, scaleSvgToNative, searchQuery, serializePerKey, setBusLogTraceIdProvider, softwareToAgent, storageFileName, textExtractionOf, textUnder, userDID, userId, userToAgent, userToDid, uuidV4, validateData, validateEnvironment, validateSvgMarkup, verifyPosition };
8114
+ export type { AccessToken, AnchorConfidence, AnchorMethod, AnchorRect, AnchorSelectors, AnchorStrategy, AnchoredText, AnchoringModel, Annotation, AnnotationCategory, AnnotationId, AnnotationUri, AnthropicProviderConfig, AppConfig, ArchivistServiceConfig, AssembledAnnotation, AuthCode, BaseUrl, BodyItem, BodyItemIdentity, BodyOperation, BoundingBox, Brand, BridgedChannel, BurstBufferOptions, BusOp, BusOperationKey, BusOperationSpec, BusRequestErrorCode, BusRequestPrimitive, ChunkingConfig, CloneToken, CollaboratorEntry, ConnectionState, ContentCache, ContentFormat, CreateAnnotationInternal, DatabaseServiceConfig, DiscoveredKB, DiscoveryDocument, Email, EmbeddingServiceConfig, EmittableChannel, EntityType, EntityTypeStats, Environment, EnvironmentConfig, EventBase, EventInput, EventMap, EventMetadata, EventName, EventOfType, EventQuery, EventSignature, ExtractionOutcome, FragmentSelector, GatewayServiceConfig, GatheredContext, GenerationJobParams, GoogleAuthRequest, GoogleCredential, GraphConnection, GraphDatabaseType, GraphPath, GraphServiceConfig, GraphViews, HealthCheckResponse, IContentTransport, IGatewayOperations, ITransport, InferenceProvidersConfig, JobId, JobType, ListUsersResponse, LlmSelectorInput, LocaleInfo, Logger, MCPToken, MatchQuality, McpServiceConfig, MediaTypeCapabilities, Motivation, OllamaProviderConfig, PdfCoordinate, PdfTextItem, PdfTextRun, PersistedEvent, PersistedEventType, PlatformType, Point, PutBinaryOptions, PutBinaryProgress, PutBinaryRequest, ReconciledSelector, RefreshToken, RenderMode, RenderedAnchor, ResourceAnnotationUri, ResourceAnnotations, ResourceBroadcastType, ResourceDescriptor, ResourceFilter, ResourceId, ResourceUri, RetryAttemptInfo, RetryPolicy, SearchQuery, SelectionData, Selector, SemiontConfig, ServicePlatformConfig, ServicesConfig, SiteConfig, StateUnit, StatusResponse, StoredEvent, StoredEventLike, SupportedMediaType, SvgSelector, TagCategory, TagSchema, TextExtraction, TextPosition, TextPositionSelector, TextQuoteSelector, ActorInferenceConfig as TomlActorInferenceConfig, TomlFileReader, InferenceConfig as TomlInferenceConfig, WorkerInferenceConfig as TomlWorkerInferenceConfig, TransportErrorCode, UpdateResourceInput, UpdateUserRequest, UpdateUserResponse, UserDID, UserId, UserResponse, ValidationFailure, ValidationResult, ValidationSuccess, VectorsServiceConfig, components, operations, paths };