@superbee/core 0.2.0-pre.1 → 0.2.0-pre.11

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.
Files changed (219) hide show
  1. package/README.md +148 -0
  2. package/dist/artifact-contract.d.ts +90 -0
  3. package/dist/artifact-contract.d.ts.map +1 -0
  4. package/dist/artifact-contract.js +205 -0
  5. package/dist/artifact-contract.js.map +1 -0
  6. package/dist/backend.d.ts +16 -1
  7. package/dist/backend.d.ts.map +1 -1
  8. package/dist/backend.js +85 -42
  9. package/dist/backend.js.map +1 -1
  10. package/dist/bundle-ops.d.ts +1 -1
  11. package/dist/bundle-ops.d.ts.map +1 -1
  12. package/dist/bundle-ops.js +2 -2
  13. package/dist/bundle-ops.js.map +1 -1
  14. package/dist/bundle.d.ts +2 -1
  15. package/dist/bundle.d.ts.map +1 -1
  16. package/dist/bundle.js +3 -3
  17. package/dist/bundle.js.map +1 -1
  18. package/dist/document-codec.d.ts +6 -1
  19. package/dist/document-codec.d.ts.map +1 -1
  20. package/dist/document-codec.js +8 -4
  21. package/dist/document-codec.js.map +1 -1
  22. package/dist/document-field-actions.d.ts +13 -1
  23. package/dist/document-field-actions.d.ts.map +1 -1
  24. package/dist/document-field-actions.js +47 -6
  25. package/dist/document-field-actions.js.map +1 -1
  26. package/dist/document-mutation.d.ts +15 -1
  27. package/dist/document-mutation.d.ts.map +1 -1
  28. package/dist/document-mutation.js +42 -11
  29. package/dist/document-mutation.js.map +1 -1
  30. package/dist/document-write-policy.d.ts.map +1 -1
  31. package/dist/document-write-policy.js +4 -2
  32. package/dist/document-write-policy.js.map +1 -1
  33. package/dist/engine.d.ts +1 -1
  34. package/dist/engine.d.ts.map +1 -1
  35. package/dist/engine.js +4 -3
  36. package/dist/engine.js.map +1 -1
  37. package/dist/file-journaled-backend-internal.d.ts +19 -0
  38. package/dist/file-journaled-backend-internal.d.ts.map +1 -0
  39. package/dist/file-journaled-backend-internal.js +10 -0
  40. package/dist/file-journaled-backend-internal.js.map +1 -0
  41. package/dist/file-journaled-backend.d.ts +162 -0
  42. package/dist/file-journaled-backend.d.ts.map +1 -0
  43. package/dist/file-journaled-backend.js +1113 -0
  44. package/dist/file-journaled-backend.js.map +1 -0
  45. package/dist/filesystem-host.d.ts +15 -0
  46. package/dist/filesystem-host.d.ts.map +1 -0
  47. package/dist/filesystem-host.js +20 -0
  48. package/dist/filesystem-host.js.map +1 -0
  49. package/dist/filesystem-identity.d.ts +86 -4
  50. package/dist/filesystem-identity.d.ts.map +1 -1
  51. package/dist/filesystem-identity.js +338 -102
  52. package/dist/filesystem-identity.js.map +1 -1
  53. package/dist/filesystem-lock.d.ts +16 -3
  54. package/dist/filesystem-lock.d.ts.map +1 -1
  55. package/dist/filesystem-lock.js +323 -77
  56. package/dist/filesystem-lock.js.map +1 -1
  57. package/dist/filesystem-push-role.d.ts +77 -0
  58. package/dist/filesystem-push-role.d.ts.map +1 -0
  59. package/dist/filesystem-push-role.js +165 -0
  60. package/dist/filesystem-push-role.js.map +1 -0
  61. package/dist/filesystem.d.ts +17 -0
  62. package/dist/filesystem.d.ts.map +1 -0
  63. package/dist/filesystem.js +18 -0
  64. package/dist/filesystem.js.map +1 -0
  65. package/dist/frontmatter.d.ts +8 -0
  66. package/dist/frontmatter.d.ts.map +1 -1
  67. package/dist/frontmatter.js +14 -4
  68. package/dist/frontmatter.js.map +1 -1
  69. package/dist/governed-body-write.d.ts +106 -0
  70. package/dist/governed-body-write.d.ts.map +1 -0
  71. package/dist/governed-body-write.js +251 -0
  72. package/dist/governed-body-write.js.map +1 -0
  73. package/dist/heads-digest.d.ts +32 -0
  74. package/dist/heads-digest.d.ts.map +1 -0
  75. package/dist/heads-digest.js +37 -0
  76. package/dist/heads-digest.js.map +1 -0
  77. package/dist/host-policy-snapshot.d.ts +9 -0
  78. package/dist/host-policy-snapshot.d.ts.map +1 -0
  79. package/dist/host-policy-snapshot.js +33 -0
  80. package/dist/host-policy-snapshot.js.map +1 -0
  81. package/dist/host-text.d.ts +31 -0
  82. package/dist/host-text.d.ts.map +1 -0
  83. package/dist/host-text.js +77 -0
  84. package/dist/host-text.js.map +1 -0
  85. package/dist/hosted-transport/answer-rows.d.ts +216 -0
  86. package/dist/hosted-transport/answer-rows.d.ts.map +1 -0
  87. package/dist/hosted-transport/answer-rows.js +396 -0
  88. package/dist/hosted-transport/answer-rows.js.map +1 -0
  89. package/dist/hosted-transport/carrier.d.ts +142 -0
  90. package/dist/hosted-transport/carrier.d.ts.map +1 -0
  91. package/dist/hosted-transport/carrier.js +241 -0
  92. package/dist/hosted-transport/carrier.js.map +1 -0
  93. package/dist/hosted-transport/history-pages.d.ts +55 -0
  94. package/dist/hosted-transport/history-pages.d.ts.map +1 -0
  95. package/dist/hosted-transport/history-pages.js +69 -0
  96. package/dist/hosted-transport/history-pages.js.map +1 -0
  97. package/dist/hosted-transport/index.d.ts +18 -0
  98. package/dist/hosted-transport/index.d.ts.map +1 -0
  99. package/dist/hosted-transport/index.js +18 -0
  100. package/dist/hosted-transport/index.js.map +1 -0
  101. package/dist/hosted-transport/operations.d.ts +85 -0
  102. package/dist/hosted-transport/operations.d.ts.map +1 -0
  103. package/dist/hosted-transport/operations.js +128 -0
  104. package/dist/hosted-transport/operations.js.map +1 -0
  105. package/dist/hosted-transport/paged-reads.d.ts +87 -0
  106. package/dist/hosted-transport/paged-reads.d.ts.map +1 -0
  107. package/dist/hosted-transport/paged-reads.js +238 -0
  108. package/dist/hosted-transport/paged-reads.js.map +1 -0
  109. package/dist/hosted-transport/read-adapter.d.ts +250 -0
  110. package/dist/hosted-transport/read-adapter.d.ts.map +1 -0
  111. package/dist/hosted-transport/read-adapter.js +557 -0
  112. package/dist/hosted-transport/read-adapter.js.map +1 -0
  113. package/dist/hosted-transport/root-write.d.ts +114 -0
  114. package/dist/hosted-transport/root-write.d.ts.map +1 -0
  115. package/dist/hosted-transport/root-write.js +171 -0
  116. package/dist/hosted-transport/root-write.js.map +1 -0
  117. package/dist/hosted-transport/whole-document-transport.d.ts +203 -0
  118. package/dist/hosted-transport/whole-document-transport.d.ts.map +1 -0
  119. package/dist/hosted-transport/whole-document-transport.js +438 -0
  120. package/dist/hosted-transport/whole-document-transport.js.map +1 -0
  121. package/dist/index.d.ts +22 -8
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +15 -5
  124. package/dist/index.js.map +1 -1
  125. package/dist/indexeddb-backend.d.ts +38 -6
  126. package/dist/indexeddb-backend.d.ts.map +1 -1
  127. package/dist/indexeddb-backend.js +511 -46
  128. package/dist/indexeddb-backend.js.map +1 -1
  129. package/dist/journaled-backend.d.ts +296 -7
  130. package/dist/journaled-backend.d.ts.map +1 -1
  131. package/dist/journaled-backend.js +312 -0
  132. package/dist/journaled-backend.js.map +1 -1
  133. package/dist/kind-coverage.d.ts +99 -0
  134. package/dist/kind-coverage.d.ts.map +1 -0
  135. package/dist/kind-coverage.js +186 -0
  136. package/dist/kind-coverage.js.map +1 -0
  137. package/dist/kinds.d.ts +31 -1
  138. package/dist/kinds.d.ts.map +1 -1
  139. package/dist/kinds.js +83 -16
  140. package/dist/kinds.js.map +1 -1
  141. package/dist/links.d.ts +1 -1
  142. package/dist/links.d.ts.map +1 -1
  143. package/dist/links.js +5 -10
  144. package/dist/links.js.map +1 -1
  145. package/dist/managed-document-metadata.d.ts +2 -0
  146. package/dist/managed-document-metadata.d.ts.map +1 -0
  147. package/dist/managed-document-metadata.js +9 -0
  148. package/dist/managed-document-metadata.js.map +1 -0
  149. package/dist/memory-backend.d.ts +2 -2
  150. package/dist/memory-backend.d.ts.map +1 -1
  151. package/dist/memory-backend.js +32 -16
  152. package/dist/memory-backend.js.map +1 -1
  153. package/dist/paths.d.ts +6 -2
  154. package/dist/paths.d.ts.map +1 -1
  155. package/dist/paths.js +35 -33
  156. package/dist/paths.js.map +1 -1
  157. package/dist/platform.d.ts +84 -6
  158. package/dist/platform.d.ts.map +1 -1
  159. package/dist/platform.js +9 -4
  160. package/dist/platform.js.map +1 -1
  161. package/dist/portable-export.d.ts +119 -0
  162. package/dist/portable-export.d.ts.map +1 -0
  163. package/dist/portable-export.js +501 -0
  164. package/dist/portable-export.js.map +1 -0
  165. package/dist/publication-filesystem.d.ts +1 -1
  166. package/dist/publication-filesystem.d.ts.map +1 -1
  167. package/dist/publication-filesystem.js +1 -1
  168. package/dist/publication-filesystem.js.map +1 -1
  169. package/dist/query-filter.d.ts +7 -2
  170. package/dist/query-filter.d.ts.map +1 -1
  171. package/dist/query-filter.js +24 -1
  172. package/dist/query-filter.js.map +1 -1
  173. package/dist/query-order.d.ts +22 -0
  174. package/dist/query-order.d.ts.map +1 -0
  175. package/dist/query-order.js +42 -0
  176. package/dist/query-order.js.map +1 -0
  177. package/dist/remote-backend.d.ts +91 -27
  178. package/dist/remote-backend.d.ts.map +1 -1
  179. package/dist/remote-backend.js +217 -49
  180. package/dist/remote-backend.js.map +1 -1
  181. package/dist/remote-document-codec.d.ts +15 -0
  182. package/dist/remote-document-codec.d.ts.map +1 -0
  183. package/dist/remote-document-codec.js +103 -0
  184. package/dist/remote-document-codec.js.map +1 -0
  185. package/dist/remote-error.d.ts +38 -0
  186. package/dist/remote-error.d.ts.map +1 -0
  187. package/dist/remote-error.js +59 -0
  188. package/dist/remote-error.js.map +1 -0
  189. package/dist/remote-operations.d.ts +6 -3
  190. package/dist/remote-operations.d.ts.map +1 -1
  191. package/dist/remote-operations.js +20 -5
  192. package/dist/remote-operations.js.map +1 -1
  193. package/dist/remote-parsers.d.ts +86 -0
  194. package/dist/remote-parsers.d.ts.map +1 -0
  195. package/dist/remote-parsers.js +181 -0
  196. package/dist/remote-parsers.js.map +1 -0
  197. package/dist/remote.d.ts +7 -2
  198. package/dist/remote.d.ts.map +1 -1
  199. package/dist/remote.js +6 -1
  200. package/dist/remote.js.map +1 -1
  201. package/dist/site-capabilities.d.ts +339 -0
  202. package/dist/site-capabilities.d.ts.map +1 -0
  203. package/dist/site-capabilities.js +717 -0
  204. package/dist/site-capabilities.js.map +1 -0
  205. package/dist/storage.d.ts +4 -2
  206. package/dist/storage.d.ts.map +1 -1
  207. package/dist/storage.js +4 -1
  208. package/dist/storage.js.map +1 -1
  209. package/dist/types.d.ts +28 -5
  210. package/dist/types.d.ts.map +1 -1
  211. package/dist/uncertain-write.d.ts +49 -13
  212. package/dist/uncertain-write.d.ts.map +1 -1
  213. package/dist/uncertain-write.js +36 -12
  214. package/dist/uncertain-write.js.map +1 -1
  215. package/dist/versioning.d.ts +9 -4
  216. package/dist/versioning.d.ts.map +1 -1
  217. package/dist/versioning.js +9 -4
  218. package/dist/versioning.js.map +1 -1
  219. package/package.json +38 -2
package/dist/remote.js CHANGED
@@ -1,3 +1,8 @@
1
1
  /** Browser-safe client adapter for the Superbee wire protocol. */
2
- export { RemoteBackend, RemoteError } from "./remote-backend.js";
2
+ export { RemoteBackend } from "./remote-backend.js";
3
+ export { RemoteError } from "./remote-error.js";
4
+ // The heads and snapshot grammar's reference validators, for a host that serves the same grammar
5
+ // through routes of its own; `RemoteBackend.heads` and `RemoteBackend.snapshot` call these.
6
+ export { SNAPSHOT_DIGEST_MISMATCH, SNAPSHOT_TRUNCATED, parseHeadsAnswer, readSnapshotStream } from "./remote-parsers.js";
7
+ export { headsDigest, isHeadsDigest, sortHeads } from "./heads-digest.js";
3
8
  //# sourceMappingURL=remote.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote.js","sourceRoot":"","sources":["../src/remote.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"remote.js","sourceRoot":"","sources":["../src/remote.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,iGAAiG;AACjG,4FAA4F;AAC5F,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,339 @@
1
+ /**
2
+ * MCP tool hints, plus Portal's `untrustedContentHint` and `privateInputHint`. Other keys pass
3
+ * through unchanged.
4
+ *
5
+ * These are self-declared: a capability states them about itself and nothing at runtime enforces
6
+ * them. `checkSiteCapability` tests recorded fixtures, and `composeSiteCapabilities` with
7
+ * `requireReadOnly` refuses a capability that does not declare `readOnlyHint: true`, but neither
8
+ * proves what the code does. They are acceptable as a control only for in-process code from the
9
+ * same reviewed deploy; never cite them as a control for code a host did not review.
10
+ */
11
+ export interface SiteCapabilityAnnotations {
12
+ readonly readOnlyHint?: boolean;
13
+ readonly destructiveHint?: boolean;
14
+ readonly idempotentHint?: boolean;
15
+ readonly openWorldHint?: boolean;
16
+ /** The result carries text authored or copied by others: a model must treat it as data. */
17
+ readonly untrustedContentHint?: boolean;
18
+ /** The input may carry private data: a surface takes it only in a request body (POST) and never caches or stores it. */
19
+ readonly privateInputHint?: boolean;
20
+ readonly [hint: string]: unknown;
21
+ }
22
+ /** What a surface passes to `execute`. Every surface passes `signal`; a provider adapter also
23
+ * passes its `toolCallId`; a host that pins the clock (fixtures, evals) passes `now`. */
24
+ export interface SiteCapabilityInvocation {
25
+ readonly signal: AbortSignal;
26
+ readonly toolCallId?: string;
27
+ /** Milliseconds since the epoch. A capability reads the clock only through this when present. */
28
+ readonly now?: () => number;
29
+ }
30
+ /** A citable record in a successful result. The host mints source IDs from these; the tool never
31
+ * does (`siteRecordSource`). */
32
+ export interface SiteRecordCitation {
33
+ /** The record's stable ID, as it appears in the result. */
34
+ readonly recordId: string;
35
+ /** The record's same-origin page path, such as `/fairport/places/lift-bridge`. */
36
+ readonly path: string;
37
+ /** When the record's data was current (ISO 8601). */
38
+ readonly asOf: string;
39
+ }
40
+ /**
41
+ * A tool a site or a recipe pack provides.
42
+ *
43
+ * How it maps onto the existing tool shapes (each mapping is a function below, so no caller relies
44
+ * on structural luck):
45
+ * - Portal `PortalWebMcpAdditionalToolV0` (`@superbee/portal-webmcp` 0.3.x `additionalTools`,
46
+ * restated here as `PortalAdditionalTool`): a `SiteCapability` is assignable to it, and Portal's
47
+ * registration keeps only the fields it binds. `toPortalAdditionalTool` makes that explicit;
48
+ * `siteCapabilityFromPortalTool` maps the other way.
49
+ * - The hosted provider port's `AgentProviderTool` (`name`, `description`, `inputSchema`,
50
+ * `execute(input, { signal, toolCallId })`): assignable; `toProviderTool` keeps only those fields.
51
+ * - The hosted `ToolDescriptor`, whose `execute` takes an optional invocation with an optional
52
+ * signal: NOT assignable, because a capability always receives a signal. `toToolDescriptor`
53
+ * supplies one.
54
+ */
55
+ export interface SiteCapability<Result = unknown> {
56
+ /** `^[a-z][a-z0-9_]{2,63}$`: valid for MCP, WebMCP, the Messages API and Managed Agents. */
57
+ readonly name: string;
58
+ /** Stable identity of this implementation, as Portal's `implementationId`: a changed meaning
59
+ * behind an unchanged schema gets a new one. */
60
+ readonly implementationId: string;
61
+ readonly title?: string;
62
+ readonly description: string;
63
+ /** JSON Schema of the input, with `type: "object"`. */
64
+ readonly inputSchema: Readonly<Record<string, unknown>>;
65
+ readonly outputSchema?: Readonly<Record<string, unknown>>;
66
+ readonly annotations?: SiteCapabilityAnnotations;
67
+ /** Largest serialized result in UTF-8 bytes. Defaults to `DEFAULT_MAXIMUM_OUTPUT_BYTES`. */
68
+ readonly maximumOutputBytes?: number;
69
+ /** Runs the capability. Failures a caller can act on are results (`{ ok: false, error }`), not
70
+ * throws; a throw is a fault. */
71
+ execute(input: unknown, invocation: SiteCapabilityInvocation): Promise<Result>;
72
+ /** The citable records in a successful result. Never called on a failed result. */
73
+ mintSources?(result: Result): readonly SiteRecordCitation[];
74
+ }
75
+ /** Portal's `PortalWebMcpAdditionalToolV0` (`@superbee/portal-webmcp` 0.3.1, `registration.d.ts`),
76
+ * restated so this package stays dependency-free. */
77
+ export interface PortalAdditionalTool {
78
+ readonly name: string;
79
+ readonly implementationId: string;
80
+ readonly description: string;
81
+ readonly inputSchema: Readonly<Record<string, unknown>>;
82
+ readonly annotations?: Readonly<Record<string, unknown>>;
83
+ execute(input: unknown, context: {
84
+ signal: AbortSignal;
85
+ }): Promise<unknown>;
86
+ }
87
+ /** A host-minted citation of one site record. Like a Portal document source it binds the
88
+ * publication the record was read from, so a citation names exact bytes, not only a date. */
89
+ export interface SiteRecordSourceRef {
90
+ readonly sourceId: string;
91
+ readonly kind: "site-record";
92
+ readonly siteId: string;
93
+ readonly recordId: string;
94
+ readonly path: string;
95
+ readonly asOf: string;
96
+ readonly artifactDigest: string;
97
+ readonly snapshotDigest: string;
98
+ }
99
+ export declare const SITE_CAPABILITY_NAME_PATTERN: RegExp;
100
+ /** Package-owned tools only (Portal's `PORTAL_WEBMCP_RESERVED_PREFIX_V0`). */
101
+ export declare const RESERVED_TOOL_PREFIX = "superbee_";
102
+ export declare const DEFAULT_MAXIMUM_OUTPUT_BYTES = 65536;
103
+ /** The closed error-code set a site capability's `{ ok: false }` results use by default. */
104
+ export declare const SITE_CAPABILITY_ERROR_CODES: readonly ["INVALID_INPUT", "NOT_FOUND", "AMBIGUOUS", "NOT_AVAILABLE"];
105
+ export declare const utf8Bytes: (text: string) => number;
106
+ /**
107
+ * JSON with object keys sorted at every depth, so equal values serialize to equal bytes. Throws on
108
+ * anything JSON cannot carry exactly: functions, symbols, `undefined` array items, non-finite
109
+ * numbers, bigints and cycles. Object properties whose value is `undefined` are omitted, as
110
+ * `JSON.stringify` does.
111
+ */
112
+ export declare function canonicalJson(value: unknown): string;
113
+ /**
114
+ * Whether `path` is a plain same-origin page path: absolute, not protocol-relative, no query,
115
+ * fragment, backslash, control character, encoded slash or dot segment, and unchanged by URL
116
+ * normalization. The same checks as agent-surface's `portalAssistantRoute`. Syntax only: a path
117
+ * such as `/a/%252e%252e/b` or `/a/..;/b` passes, so the host's route-membership check
118
+ * (`admittedPath` in `siteRecordSource`) must still refuse any path it does not serve.
119
+ */
120
+ export declare function isSafeSitePath(path: unknown): path is string;
121
+ /**
122
+ * The host-minted `site-record` source for one citation a capability returned, or `undefined`
123
+ * when the citation is malformed, its path is not a safe same-origin path, or the path is not one
124
+ * the host admits. `sourceId` is the host's own ID for this read; a model-produced ID or URL never
125
+ * mints a source. `admittedPath` is the host's route-membership check (the publication's
126
+ * digest-bound route list, or the build's route list): syntax alone does not admit a path.
127
+ */
128
+ export declare function siteRecordSource(options: {
129
+ sourceId: string;
130
+ siteId: string;
131
+ /** The publication the capability read: its artifact and snapshot digests. */
132
+ publication: {
133
+ artifactDigest: string;
134
+ snapshotDigest: string;
135
+ };
136
+ citation: SiteRecordCitation;
137
+ admittedPath: (path: string) => boolean;
138
+ }): SiteRecordSourceRef | undefined;
139
+ /**
140
+ * Portal's `additionalTools` shape as a `SiteCapability`. The Portal tool keeps receiving exactly
141
+ * `{ signal }`; `extras` adds what Portal's shape has no field for. The reverse needs no adapter:
142
+ * a `SiteCapability` is already a valid `PortalAdditionalTool`.
143
+ */
144
+ export declare function siteCapabilityFromPortalTool(tool: PortalAdditionalTool, extras?: Pick<SiteCapability, "title" | "outputSchema" | "maximumOutputBytes" | "mintSources">): SiteCapability;
145
+ /** Portal's `additionalTools` entry for a capability: exactly the fields Portal binds, with the
146
+ * capability receiving `{ signal }`. */
147
+ export declare function toPortalAdditionalTool(capability: SiteCapability): PortalAdditionalTool;
148
+ /** The provider port's tool shape (hosted `AgentProviderTool`): name, description, input schema
149
+ * and `execute(input, { signal, toolCallId })`. */
150
+ export declare function toProviderTool(capability: SiteCapability): {
151
+ name: string;
152
+ description: string;
153
+ inputSchema: Record<string, unknown>;
154
+ execute(input: unknown, invocation: {
155
+ signal: AbortSignal;
156
+ toolCallId: string;
157
+ }): Promise<unknown>;
158
+ };
159
+ /** The hosted `ToolDescriptor` shape, whose callers may omit the invocation or its signal; the
160
+ * capability then receives a signal that never aborts. */
161
+ export declare function toToolDescriptor(capability: SiteCapability): {
162
+ name: string;
163
+ description: string;
164
+ inputSchema: Record<string, unknown>;
165
+ annotations?: Record<string, unknown>;
166
+ execute(input: unknown, invocation?: {
167
+ signal?: AbortSignal;
168
+ }): Promise<unknown>;
169
+ };
170
+ /**
171
+ * One annotation set from several declarations of the same capability (for example a WebMCP
172
+ * declaration and an MCP declaration that each carry some hints). For the MCP hints the more
173
+ * cautious value wins: `readOnlyHint` and `idempotentHint` are true only if no set says false;
174
+ * `destructiveHint`, `openWorldHint`, `untrustedContentHint` and `privateInputHint` are true if any
175
+ * set says true. A hint a set leaves out does not count either way, so the result can carry a hint
176
+ * only some sets declared; MCP's defaults for absent hints (`readOnlyHint` false, `openWorldHint`
177
+ * true) apply only when no set declares it. Any other key must not disagree between sets; a
178
+ * disagreement throws.
179
+ */
180
+ export declare function mergeAnnotations(...sets: readonly (SiteCapabilityAnnotations | undefined)[]): SiteCapabilityAnnotations;
181
+ /** The descriptor a surface shows a model: what the descriptor limits and the identity cover. */
182
+ export declare function siteCapabilityDescriptor(capability: SiteCapability): {
183
+ annotations?: SiteCapabilityAnnotations | undefined;
184
+ outputSchema?: Readonly<Record<string, unknown>> | undefined;
185
+ description: string;
186
+ inputSchema: Readonly<Record<string, unknown>>;
187
+ title?: string | undefined;
188
+ name: string;
189
+ };
190
+ /** The three tiers of site-capability design, composed in this order. */
191
+ export type SiteCapabilityTier = "generic" | "pack" | "site";
192
+ /** One declared list. `pack` and `site` lists own a namespace: each name starts with
193
+ * `<namespace>_` (`guide_open_now`, `hm_who_handles`). `generic` lists (the Portal snapshot reads,
194
+ * hosted reads) have none and alone may use the reserved `superbee_` prefix. */
195
+ export interface SiteCapabilityGroup {
196
+ readonly tier: SiteCapabilityTier;
197
+ readonly namespace?: string;
198
+ readonly capabilities: readonly SiteCapability[];
199
+ }
200
+ export interface SiteCapabilityLimits {
201
+ readonly maxTools: number;
202
+ /** Per descriptor (`siteCapabilityDescriptor`), canonical JSON in UTF-8 bytes. */
203
+ readonly maxDescriptorBytes: number;
204
+ /** All kept descriptors together. */
205
+ readonly maxTotalDescriptorBytes: number;
206
+ }
207
+ export declare const DEFAULT_SITE_CAPABILITY_LIMITS: SiteCapabilityLimits;
208
+ export interface ComposeSiteCapabilitiesOptions {
209
+ /** The surface this list is for (`hm-ask`, `webmcp`, `mcp`); part of the identity digest. */
210
+ readonly surface: string;
211
+ /** Names this surface does not offer. Applied after every conflict check, so a filter can never
212
+ * hide a conflict. Naming a capability that is not composed refuses. */
213
+ readonly exclude?: readonly string[];
214
+ /** Refuse any capability that does not declare `readOnlyHint: true`, or declares
215
+ * `destructiveHint: true`, in any tier (a static-site surface has no writes). Checked before
216
+ * `exclude`, so excluding a write tool does not make the list acceptable. The hints are
217
+ * self-declared (see `SiteCapabilityAnnotations`). */
218
+ readonly requireReadOnly?: boolean;
219
+ readonly limits?: Partial<SiteCapabilityLimits>;
220
+ }
221
+ export type SiteCapabilityCompositionRefusal =
222
+ /** The surface ID is empty or longer than 256 bytes. */
223
+ "invalid_surface"
224
+ /** A group has an unknown tier, a missing, invalid, reserved or repeated namespace, or a
225
+ * namespace on the generic tier. */
226
+ | "invalid_group"
227
+ /** A capability is not structurally valid (see `checkSiteCapability` for behavior). */
228
+ | "invalid_descriptor" | "duplicate_name"
229
+ /** A `superbee_` name outside the generic tier. */
230
+ | "reserved_prefix"
231
+ /** A pack or site name that does not start with its group's namespace. */
232
+ | "outside_namespace"
233
+ /** `requireReadOnly` and a capability that does not declare itself read-only. */
234
+ | "not_read_only" | "unknown_exclusion" | "too_many_tools" | "descriptor_too_large" | "total_too_large";
235
+ export type SiteCapabilityComposition = {
236
+ readonly ok: true;
237
+ readonly surface: string;
238
+ /** Frozen snapshots in composed order: generic, then packs, then site extras, each in
239
+ * declaration order. Pass them unchanged to a provider adapter, Portal registration or an
240
+ * MCP server. */
241
+ readonly capabilities: readonly SiteCapability[];
242
+ /** The tier of each entry of `capabilities`, index for index. */
243
+ readonly tiers: readonly SiteCapabilityTier[];
244
+ /** Names removed by `exclude`, in composed order. */
245
+ readonly dropped: readonly string[];
246
+ /** SHA-256 of the canonical JSON `{ schema: "superbee-site-capabilities/v1", surface, tools }`,
247
+ * where each tool is `{ tier, namespace, implementationId, maximumOutputBytes, descriptor }`
248
+ * for the kept capabilities in composed order. It identifies one surface's tool list: record
249
+ * it per session and compare it at provisioning. It is not Portal registration's
250
+ * `identityDigest`, which also binds the publication, owner and activation. */
251
+ readonly identityDigest: `sha256:${string}`;
252
+ } | {
253
+ readonly ok: false;
254
+ readonly refused: SiteCapabilityCompositionRefusal;
255
+ /** The names (or, for `invalid_group`, the namespaces) involved, when there are any. */
256
+ readonly names: readonly string[];
257
+ /** A fixed English explanation; never echoes descriptor text. */
258
+ readonly detail: string;
259
+ };
260
+ /**
261
+ * Composes the capabilities one surface offers. This is the one owner of the composition rule;
262
+ * Portal's registration applies the same reserved-prefix and duplicate refusals to its own
263
+ * additional tools and can call this instead. Conflicts refuse the whole
264
+ * composition, never shadow: a duplicate name, a `superbee_` name outside the generic tier, or a
265
+ * pack or site name outside its namespace. Order is deterministic (generic, packs, site extras,
266
+ * each in declaration order), which prompt caching and the Managed Agents byte check depend on.
267
+ * The surface's exclusions apply after the conflict checks; the limits apply to what is kept.
268
+ */
269
+ export declare function composeSiteCapabilities(groups: readonly SiteCapabilityGroup[], options: ComposeSiteCapabilitiesOptions): SiteCapabilityComposition;
270
+ /** The requirements `checkSiteCapability` tests from fixtures. Whether each record carries its own
271
+ * sources with checked dates has no site-neutral shape; a site checks that, and anything else
272
+ * site-specific, with its own fixture assertions (`SiteCapabilityFixture.check`, reported as
273
+ * `site`). */
274
+ export type SiteCapabilityRequirement = "descriptor" | "read_only" | "dated" | "stable_ids" | "public_urls" | "errors" | "bounded" | "deterministic" | "input_checked" | "fixed_text" | "site";
275
+ /** One recorded input and what it must produce. */
276
+ export interface SiteCapabilityFixture {
277
+ /** Shown in problems; defaults to the fixture's index. */
278
+ readonly name?: string;
279
+ readonly input: unknown;
280
+ readonly expect: "ok" | "error";
281
+ /** For `expect: "error"`, the exact code. */
282
+ readonly errorCode?: string;
283
+ /** The pinned clock for this fixture, in milliseconds since the epoch. */
284
+ readonly now?: number;
285
+ /** A site's own assertion over the result (per-record sources, anything site-specific): return a
286
+ * problem description, or nothing when the result is acceptable. */
287
+ readonly check?: (result: unknown) => string | undefined | void;
288
+ }
289
+ export interface CheckSiteCapabilityOptions {
290
+ /** The site's own origin, such as `https://hereandmain.town`. Every absolute http(s) URL in a
291
+ * result must be on it, or on one of `externalHosts`. */
292
+ readonly origin: string;
293
+ /** Hosts whose pages a result may link to: a provider's own page for a feed-only item. */
294
+ readonly externalHosts?: readonly string[];
295
+ /** The closed error-code set; defaults to `SITE_CAPABILITY_ERROR_CODES`. */
296
+ readonly errorCodes?: readonly string[];
297
+ /** The pinned clock for fixtures without their own. Defaults to 2026-01-01T12:00:00Z. */
298
+ readonly now?: number;
299
+ /** Probe one successful fixture's input with an unknown argument, which must be refused
300
+ * with `{ ok: false }`. Default true. */
301
+ readonly probeUnknownArgument?: boolean;
302
+ }
303
+ export interface SiteCapabilityProblem {
304
+ readonly requirement: SiteCapabilityRequirement;
305
+ readonly fixture?: string;
306
+ readonly detail: string;
307
+ }
308
+ export interface SiteCapabilityCheck {
309
+ readonly ok: boolean;
310
+ readonly problems: readonly SiteCapabilityProblem[];
311
+ }
312
+ /**
313
+ * Tests one capability against recorded fixtures and the site capability requirements:
314
+ * a valid, read-only descriptor; results that are deterministic for a pinned clock, bounded,
315
+ * dated (`as_of`) when successful, and `{ ok: false, error: { code, message } }` with a closed code
316
+ * and a message that never echoes input when not; absolute URLs only on the site's origin or its
317
+ * declared external hosts; every citation from `mintSources` naming a record ID present in the
318
+ * result and a safe same-origin path; unknown arguments refused; and a descriptor that running
319
+ * the fixtures does not change. Runs each fixture twice. Never throws for a capability's fault.
320
+ */
321
+ export declare function checkSiteCapability(capability: SiteCapability, fixtures: readonly SiteCapabilityFixture[], options: CheckSiteCapabilityOptions): Promise<SiteCapabilityCheck>;
322
+ /** One named conformance case. `run` resolves when the capability conforms and rejects with an
323
+ * `Error` naming every problem otherwise. Runner-neutral: wrap each case in `node:test`, Vitest or
324
+ * any other runner (`for (const c of cases) test(c.name, c.run)`). */
325
+ export interface SiteCapabilityConformanceCase {
326
+ readonly name: string;
327
+ run(): Promise<void>;
328
+ }
329
+ /**
330
+ * The reusable conformance suite for one capability: one case per requirement checked by
331
+ * `checkSiteCapability`, plus the composition and mapping cases every surface relies on (it
332
+ * composes alone in its own namespace on a read-only surface, and its provider, Portal and
333
+ * descriptor mappings carry the same name, description and schema). A site, a pack and any host
334
+ * run the same cases over the same fixtures.
335
+ */
336
+ export declare function siteCapabilityConformanceCases(capability: SiteCapability, fixtures: readonly SiteCapabilityFixture[], options: CheckSiteCapabilityOptions & {
337
+ readonly namespace?: string;
338
+ }): readonly SiteCapabilityConformanceCase[];
339
+ //# sourceMappingURL=site-capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"site-capabilities.d.ts","sourceRoot":"","sources":["../src/site-capabilities.ts"],"names":[],"mappings":"AAcA;;;;;;;;;GASG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,2FAA2F;IAC3F,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC,wHAAwH;IACxH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CAClC;AAED;yFACyF;AACzF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAA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