@pithy-sh/core 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/README.md +54 -0
  2. package/dist/audit/auditEvent.js +1 -1
  3. package/dist/audit/chain.d.ts +289 -0
  4. package/dist/audit/chain.d.ts.map +1 -0
  5. package/dist/audit/chain.js +400 -0
  6. package/dist/audit/citations.d.ts +52 -0
  7. package/dist/audit/citations.d.ts.map +1 -0
  8. package/dist/audit/citations.js +13 -0
  9. package/dist/audit/composed.d.ts +18 -0
  10. package/dist/audit/composed.d.ts.map +1 -0
  11. package/dist/audit/composed.js +28 -0
  12. package/dist/capability/bindings.d.ts +22 -0
  13. package/dist/capability/bindings.d.ts.map +1 -1
  14. package/dist/capability/bindings.js +32 -2
  15. package/dist/capability/capability.d.ts +133 -15
  16. package/dist/capability/capability.d.ts.map +1 -1
  17. package/dist/capability/capability.js +17 -2
  18. package/dist/capability/erasure.d.ts +75 -0
  19. package/dist/capability/erasure.d.ts.map +1 -0
  20. package/dist/capability/erasure.js +2 -0
  21. package/dist/capability/manifest.d.ts +5 -0
  22. package/dist/capability/manifest.d.ts.map +1 -1
  23. package/dist/capability/personColumns.d.ts +28 -0
  24. package/dist/capability/personColumns.d.ts.map +1 -0
  25. package/dist/capability/personColumns.js +66 -0
  26. package/dist/capability/personRows.d.ts +62 -0
  27. package/dist/capability/personRows.d.ts.map +1 -0
  28. package/dist/capability/personRows.js +59 -0
  29. package/dist/capability/purge.d.ts +113 -4
  30. package/dist/capability/purge.d.ts.map +1 -1
  31. package/dist/capability/purge.js +138 -5
  32. package/dist/capability/settings.d.ts +10 -0
  33. package/dist/capability/settings.d.ts.map +1 -1
  34. package/dist/capability/vectorIndex.d.ts +36 -0
  35. package/dist/capability/vectorIndex.d.ts.map +1 -0
  36. package/dist/capability/vectorIndex.js +25 -0
  37. package/dist/cli/commandCatalog.generated.d.ts +434 -4
  38. package/dist/cli/commandCatalog.generated.d.ts.map +1 -1
  39. package/dist/cli/commandCatalog.generated.js +455 -2
  40. package/dist/cli/commandFacts.d.ts +8 -5
  41. package/dist/cli/commandFacts.d.ts.map +1 -1
  42. package/dist/cli/commandFacts.js +12 -3
  43. package/dist/consent/purpose.d.ts +70 -0
  44. package/dist/consent/purpose.d.ts.map +1 -0
  45. package/dist/consent/purpose.js +97 -0
  46. package/dist/consent/reader.d.ts +99 -0
  47. package/dist/consent/reader.d.ts.map +1 -0
  48. package/dist/consent/reader.js +33 -0
  49. package/dist/controlPlane/audit/actions.d.ts +15 -4
  50. package/dist/controlPlane/audit/actions.d.ts.map +1 -1
  51. package/dist/controlPlane/audit/actions.js +16 -5
  52. package/dist/controlPlane/capability.d.ts +10 -0
  53. package/dist/controlPlane/capability.d.ts.map +1 -1
  54. package/dist/controlPlane/capability.js +56 -8
  55. package/dist/controlPlane/context.d.ts +4 -0
  56. package/dist/controlPlane/context.d.ts.map +1 -1
  57. package/dist/controlPlane/context.js +3 -2
  58. package/dist/controlPlane/data/connection.d.ts +21 -2
  59. package/dist/controlPlane/data/connection.d.ts.map +1 -1
  60. package/dist/controlPlane/data/connection.js +13 -4
  61. package/dist/controlPlane/data/connections.d.ts +94 -0
  62. package/dist/controlPlane/data/connections.d.ts.map +1 -0
  63. package/dist/controlPlane/data/connections.js +151 -0
  64. package/dist/controlPlane/data/hold.d.ts +46 -0
  65. package/dist/controlPlane/data/hold.d.ts.map +1 -0
  66. package/dist/controlPlane/data/hold.js +36 -0
  67. package/dist/controlPlane/data/oidcTrust.d.ts +122 -0
  68. package/dist/controlPlane/data/oidcTrust.d.ts.map +1 -0
  69. package/dist/controlPlane/data/oidcTrust.js +173 -0
  70. package/dist/controlPlane/data/tables.d.ts +4 -0
  71. package/dist/controlPlane/data/tables.d.ts.map +1 -1
  72. package/dist/controlPlane/data/tables.js +9 -4
  73. package/dist/controlPlane/data/trustFirstCall.d.ts +16 -0
  74. package/dist/controlPlane/data/trustFirstCall.d.ts.map +1 -0
  75. package/dist/controlPlane/data/trustFirstCall.js +25 -0
  76. package/dist/controlPlane/discovery/adminRoute.d.ts +165 -2
  77. package/dist/controlPlane/discovery/adminRoute.d.ts.map +1 -1
  78. package/dist/controlPlane/discovery/adminRoute.js +32 -8
  79. package/dist/controlPlane/discovery/routeInput.d.ts +23 -0
  80. package/dist/controlPlane/discovery/routeInput.d.ts.map +1 -0
  81. package/dist/controlPlane/discovery/routeInput.js +80 -0
  82. package/dist/controlPlane/discovery/toolName.d.ts +21 -0
  83. package/dist/controlPlane/discovery/toolName.d.ts.map +1 -0
  84. package/dist/controlPlane/discovery/toolName.js +25 -0
  85. package/dist/controlPlane/erasure/attest.d.ts +78 -0
  86. package/dist/controlPlane/erasure/attest.d.ts.map +1 -0
  87. package/dist/controlPlane/erasure/attest.js +164 -0
  88. package/dist/controlPlane/erasure/read.d.ts +39 -0
  89. package/dist/controlPlane/erasure/read.d.ts.map +1 -0
  90. package/dist/controlPlane/erasure/read.js +140 -0
  91. package/dist/controlPlane/error/errors.d.ts +61 -2
  92. package/dist/controlPlane/error/errors.d.ts.map +1 -1
  93. package/dist/controlPlane/error/errors.js +13 -0
  94. package/dist/controlPlane/evidence/derive.d.ts +124 -0
  95. package/dist/controlPlane/evidence/derive.d.ts.map +1 -0
  96. package/dist/controlPlane/evidence/derive.js +343 -0
  97. package/dist/controlPlane/evidence/mapping.d.ts +85 -0
  98. package/dist/controlPlane/evidence/mapping.d.ts.map +1 -0
  99. package/dist/controlPlane/evidence/mapping.js +114 -0
  100. package/dist/controlPlane/evidence/pack.d.ts +46 -0
  101. package/dist/controlPlane/evidence/pack.d.ts.map +1 -0
  102. package/dist/controlPlane/evidence/pack.js +124 -0
  103. package/dist/controlPlane/http/connections.d.ts +96 -0
  104. package/dist/controlPlane/http/connections.d.ts.map +1 -0
  105. package/dist/controlPlane/http/connections.js +109 -0
  106. package/dist/controlPlane/http/guard.d.ts +23 -2
  107. package/dist/controlPlane/http/guard.d.ts.map +1 -1
  108. package/dist/controlPlane/http/guard.js +103 -7
  109. package/dist/controlPlane/http/handlers.d.ts +212 -10
  110. package/dist/controlPlane/http/handlers.d.ts.map +1 -1
  111. package/dist/controlPlane/http/handlers.js +117 -26
  112. package/dist/controlPlane/http/holds.d.ts +57 -0
  113. package/dist/controlPlane/http/holds.d.ts.map +1 -0
  114. package/dist/controlPlane/http/holds.js +98 -0
  115. package/dist/controlPlane/http/presence.d.ts +27 -0
  116. package/dist/controlPlane/http/presence.d.ts.map +1 -0
  117. package/dist/controlPlane/http/presence.js +67 -0
  118. package/dist/controlPlane/http/processing.d.ts +73 -0
  119. package/dist/controlPlane/http/processing.d.ts.map +1 -0
  120. package/dist/controlPlane/http/processing.js +17 -0
  121. package/dist/controlPlane/http/responses.d.ts +927 -3
  122. package/dist/controlPlane/http/responses.d.ts.map +1 -1
  123. package/dist/controlPlane/http/responses.js +283 -7
  124. package/dist/controlPlane/http/routes.d.ts +12 -2
  125. package/dist/controlPlane/http/routes.d.ts.map +1 -1
  126. package/dist/controlPlane/http/routes.js +182 -5
  127. package/dist/controlPlane/http/schemas.d.ts +63 -0
  128. package/dist/controlPlane/http/schemas.d.ts.map +1 -1
  129. package/dist/controlPlane/http/schemas.js +39 -1
  130. package/dist/controlPlane/http/verify.d.ts.map +1 -1
  131. package/dist/controlPlane/http/verify.js +13 -1
  132. package/dist/controlPlane/http/verifyTrust.d.ts +76 -0
  133. package/dist/controlPlane/http/verifyTrust.d.ts.map +1 -0
  134. package/dist/controlPlane/http/verifyTrust.js +75 -0
  135. package/dist/controlPlane/migrations/0004_connection_trusts.d.ts +15 -0
  136. package/dist/controlPlane/migrations/0004_connection_trusts.d.ts.map +1 -0
  137. package/dist/controlPlane/migrations/0004_connection_trusts.js +23 -0
  138. package/dist/controlPlane/migrations/0005_holds.d.ts +12 -0
  139. package/dist/controlPlane/migrations/0005_holds.d.ts.map +1 -0
  140. package/dist/controlPlane/migrations/0005_holds.js +26 -0
  141. package/dist/controlPlane/processing/derive.d.ts +77 -0
  142. package/dist/controlPlane/processing/derive.d.ts.map +1 -0
  143. package/dist/controlPlane/processing/derive.js +206 -0
  144. package/dist/controlPlane/processing/read.d.ts +10 -0
  145. package/dist/controlPlane/processing/read.d.ts.map +1 -0
  146. package/dist/controlPlane/processing/read.js +89 -0
  147. package/dist/controlPlane/scope/kind.d.ts +46 -0
  148. package/dist/controlPlane/scope/kind.d.ts.map +1 -0
  149. package/dist/controlPlane/scope/kind.js +52 -0
  150. package/dist/controlPlane/scope/scope.d.ts +58 -3
  151. package/dist/controlPlane/scope/scope.d.ts.map +1 -1
  152. package/dist/controlPlane/scope/scope.js +59 -4
  153. package/dist/controlPlane/token/jws.js +1 -1
  154. package/dist/controlPlane/token/mint.js +1 -1
  155. package/dist/controlPlane/wire.d.ts +23 -0
  156. package/dist/controlPlane/wire.d.ts.map +1 -1
  157. package/dist/controlPlane/wire.js +24 -1
  158. package/dist/createBackend.d.ts +13 -0
  159. package/dist/createBackend.d.ts.map +1 -1
  160. package/dist/createBackend.js +11 -3
  161. package/dist/createEntrypoint.d.ts +14 -1
  162. package/dist/createEntrypoint.d.ts.map +1 -1
  163. package/dist/createEntrypoint.js +19 -5
  164. package/dist/error/http.d.ts +216 -0
  165. package/dist/error/http.d.ts.map +1 -1
  166. package/dist/error/payload.d.ts +432 -0
  167. package/dist/error/payload.d.ts.map +1 -1
  168. package/dist/error/payload.js +144 -0
  169. package/dist/error/pithyError.d.ts +22 -0
  170. package/dist/error/pithyError.d.ts.map +1 -1
  171. package/dist/error/pithyError.js +31 -1
  172. package/dist/http/routeSpec.d.ts +46 -1
  173. package/dist/http/routeSpec.d.ts.map +1 -1
  174. package/dist/http/routeSpec.js +39 -5
  175. package/dist/http/validation.d.ts +11 -2
  176. package/dist/http/validation.d.ts.map +1 -1
  177. package/dist/http/validation.js +20 -3
  178. package/dist/http/verification.d.ts.map +1 -1
  179. package/dist/http/verification.js +1 -1
  180. package/dist/i18n/translator.d.ts +2 -1
  181. package/dist/i18n/translator.d.ts.map +1 -1
  182. package/dist/index.d.ts +1 -1
  183. package/dist/index.d.ts.map +1 -1
  184. package/dist/index.js +3 -3
  185. package/dist/logger/record.d.ts +126 -0
  186. package/dist/logger/record.d.ts.map +1 -1
  187. package/dist/mcp/annotations.d.ts +20 -0
  188. package/dist/mcp/annotations.d.ts.map +1 -0
  189. package/dist/mcp/annotations.js +23 -0
  190. package/dist/mcp/tools.d.ts +75 -0
  191. package/dist/mcp/tools.d.ts.map +1 -0
  192. package/dist/mcp/tools.js +118 -0
  193. package/dist/openapi/document.d.ts.map +1 -1
  194. package/dist/openapi/document.js +8 -26
  195. package/dist/openapi/operations.d.ts +35 -0
  196. package/dist/openapi/operations.d.ts.map +1 -0
  197. package/dist/openapi/operations.js +37 -0
  198. package/dist/presence/channel.d.ts +11 -0
  199. package/dist/presence/channel.d.ts.map +1 -0
  200. package/dist/presence/channel.js +65 -0
  201. package/dist/presence/declaration.d.ts +154 -0
  202. package/dist/presence/declaration.d.ts.map +1 -0
  203. package/dist/presence/declaration.js +164 -0
  204. package/dist/presence/durableObject.d.ts +61 -0
  205. package/dist/presence/durableObject.d.ts.map +1 -0
  206. package/dist/presence/durableObject.js +257 -0
  207. package/dist/presence/frames.d.ts +166 -0
  208. package/dist/presence/frames.d.ts.map +1 -0
  209. package/dist/presence/frames.js +90 -0
  210. package/dist/presence/http/guard.d.ts +11 -0
  211. package/dist/presence/http/guard.d.ts.map +1 -0
  212. package/dist/presence/http/guard.js +20 -0
  213. package/dist/presence/http/responses.d.ts +31 -0
  214. package/dist/presence/http/responses.d.ts.map +1 -0
  215. package/dist/presence/http/responses.js +34 -0
  216. package/dist/presence/http/routes.d.ts +24 -0
  217. package/dist/presence/http/routes.d.ts.map +1 -0
  218. package/dist/presence/http/routes.js +127 -0
  219. package/dist/presence/http/schemas.d.ts +29 -0
  220. package/dist/presence/http/schemas.d.ts.map +1 -0
  221. package/dist/presence/http/schemas.js +28 -0
  222. package/dist/presence/names.d.ts +23 -0
  223. package/dist/presence/names.d.ts.map +1 -0
  224. package/dist/presence/names.js +22 -0
  225. package/dist/presence/room.d.ts +95 -0
  226. package/dist/presence/room.d.ts.map +1 -0
  227. package/dist/presence/room.js +105 -0
  228. package/dist/presence/ticket.d.ts +55 -0
  229. package/dist/presence/ticket.d.ts.map +1 -0
  230. package/dist/presence/ticket.js +109 -0
  231. package/dist/privacy/classify.js +1 -1
  232. package/dist/privacy/encrypted.js +1 -1
  233. package/dist/processing/activity.d.ts +134 -0
  234. package/dist/processing/activity.d.ts.map +1 -0
  235. package/dist/processing/activity.js +161 -0
  236. package/dist/processing/composed.d.ts +18 -0
  237. package/dist/processing/composed.d.ts.map +1 -0
  238. package/dist/processing/composed.js +28 -0
  239. package/dist/processing/vocabulary.d.ts +26 -0
  240. package/dist/processing/vocabulary.d.ts.map +1 -0
  241. package/dist/processing/vocabulary.js +35 -0
  242. package/dist/queue/consumer.d.ts +59 -0
  243. package/dist/queue/consumer.d.ts.map +1 -0
  244. package/dist/queue/consumer.js +46 -0
  245. package/dist/retention/composed.d.ts +37 -0
  246. package/dist/retention/composed.d.ts.map +1 -0
  247. package/dist/retention/composed.js +66 -0
  248. package/dist/retention/holds.d.ts +61 -0
  249. package/dist/retention/holds.d.ts.map +1 -0
  250. package/dist/retention/holds.js +107 -0
  251. package/dist/retention/holdsPurge.d.ts +22 -0
  252. package/dist/retention/holdsPurge.d.ts.map +1 -0
  253. package/dist/retention/holdsPurge.js +50 -0
  254. package/dist/retention/policy.d.ts +132 -0
  255. package/dist/retention/policy.d.ts.map +1 -0
  256. package/dist/retention/policy.js +197 -0
  257. package/dist/session/rotated.d.ts +34 -0
  258. package/dist/session/rotated.d.ts.map +1 -0
  259. package/dist/session/rotated.js +25 -0
  260. package/dist/test-utils/connectionFixtures.d.ts +13 -0
  261. package/dist/test-utils/connectionFixtures.d.ts.map +1 -0
  262. package/dist/test-utils/connectionFixtures.js +58 -0
  263. package/dist/test-utils/interleave.d.ts +12 -0
  264. package/dist/test-utils/interleave.d.ts.map +1 -0
  265. package/dist/test-utils/interleave.js +26 -0
  266. package/dist/testWorker.d.ts +8 -0
  267. package/dist/testWorker.d.ts.map +1 -0
  268. package/dist/testWorker.js +9 -0
  269. package/dist/version.generated.d.ts +1 -1
  270. package/dist/version.generated.js +1 -1
  271. package/dist/workflow/dispatchRoute.js +1 -1
  272. package/package.json +1 -1
  273. package/src/audit/auditEvent.ts +1 -1
  274. package/src/audit/chain.ts +551 -0
  275. package/src/audit/citations.ts +63 -0
  276. package/src/audit/composed.ts +30 -0
  277. package/src/capability/bindings.ts +61 -0
  278. package/src/capability/capability.ts +166 -18
  279. package/src/capability/erasure.ts +82 -0
  280. package/src/capability/personColumns.ts +83 -0
  281. package/src/capability/personRows.ts +125 -0
  282. package/src/capability/purge.ts +208 -8
  283. package/src/capability/settings.ts +7 -0
  284. package/src/capability/vectorIndex.ts +60 -0
  285. package/src/cli/commandCatalog.generated.ts +488 -2
  286. package/src/cli/commandFacts.ts +12 -3
  287. package/src/cloudflare-test.d.ts +3 -1
  288. package/src/consent/purpose.ts +160 -0
  289. package/src/consent/reader.ts +134 -0
  290. package/src/controlPlane/audit/actions.ts +15 -4
  291. package/src/controlPlane/capability.ts +99 -20
  292. package/src/controlPlane/context.ts +10 -2
  293. package/src/controlPlane/data/connection.ts +16 -2
  294. package/src/controlPlane/data/connections.ts +231 -0
  295. package/src/controlPlane/data/hold.ts +52 -0
  296. package/src/controlPlane/data/oidcTrust.ts +249 -0
  297. package/src/controlPlane/data/tables.ts +7 -0
  298. package/src/controlPlane/data/trustFirstCall.ts +37 -0
  299. package/src/controlPlane/discovery/adminRoute.ts +71 -9
  300. package/src/controlPlane/discovery/routeInput.ts +86 -0
  301. package/src/controlPlane/discovery/toolName.ts +23 -0
  302. package/src/controlPlane/erasure/attest.ts +205 -0
  303. package/src/controlPlane/erasure/read.ts +169 -0
  304. package/src/controlPlane/error/errors.ts +69 -2
  305. package/src/controlPlane/evidence/derive.ts +426 -0
  306. package/src/controlPlane/evidence/mapping.ts +118 -0
  307. package/src/controlPlane/evidence/pack.ts +190 -0
  308. package/src/controlPlane/http/connections.ts +129 -0
  309. package/src/controlPlane/http/guard.ts +178 -10
  310. package/src/controlPlane/http/handlers.ts +172 -40
  311. package/src/controlPlane/http/holds.ts +108 -0
  312. package/src/controlPlane/http/presence.ts +71 -0
  313. package/src/controlPlane/http/processing.ts +19 -0
  314. package/src/controlPlane/http/responses.ts +590 -7
  315. package/src/controlPlane/http/routes.ts +302 -3
  316. package/src/controlPlane/http/schemas.ts +126 -0
  317. package/src/controlPlane/http/verify.ts +19 -2
  318. package/src/controlPlane/http/verifyTrust.ts +176 -0
  319. package/src/controlPlane/migrations/0004_connection_trusts.ts +30 -0
  320. package/src/controlPlane/migrations/0005_holds.ts +40 -0
  321. package/src/controlPlane/processing/derive.ts +359 -0
  322. package/src/controlPlane/processing/read.ts +102 -0
  323. package/src/controlPlane/scope/kind.ts +63 -0
  324. package/src/controlPlane/scope/scope.ts +65 -3
  325. package/src/controlPlane/wire.ts +26 -0
  326. package/src/createBackend.ts +31 -6
  327. package/src/createEntrypoint.ts +34 -2
  328. package/src/error/payload.ts +302 -0
  329. package/src/error/pithyError.ts +42 -0
  330. package/src/http/routeSpec.ts +75 -5
  331. package/src/http/validation.ts +35 -3
  332. package/src/http/verification.ts +3 -1
  333. package/src/i18n/translator.ts +2 -1
  334. package/src/index.ts +2 -0
  335. package/src/mcp/annotations.ts +38 -0
  336. package/src/mcp/tools.ts +220 -0
  337. package/src/openapi/document.ts +8 -28
  338. package/src/openapi/operations.ts +62 -0
  339. package/src/presence/channel.ts +46 -0
  340. package/src/presence/declaration.ts +283 -0
  341. package/src/presence/durableObject.ts +287 -0
  342. package/src/presence/frames.ts +153 -0
  343. package/src/presence/http/guard.ts +23 -0
  344. package/src/presence/http/responses.ts +63 -0
  345. package/src/presence/http/routes.ts +165 -0
  346. package/src/presence/http/schemas.ts +39 -0
  347. package/src/presence/names.ts +45 -0
  348. package/src/presence/room.ts +145 -0
  349. package/src/presence/ticket.ts +145 -0
  350. package/src/processing/activity.ts +289 -0
  351. package/src/processing/composed.ts +33 -0
  352. package/src/processing/vocabulary.ts +43 -0
  353. package/src/queue/consumer.ts +104 -0
  354. package/src/retention/composed.ts +75 -0
  355. package/src/retention/holds.ts +175 -0
  356. package/src/retention/holdsPurge.ts +50 -0
  357. package/src/retention/policy.ts +305 -0
  358. package/src/session/rotated.ts +53 -0
  359. package/src/test-utils/connectionFixtures.ts +58 -0
  360. package/src/test-utils/interleave.ts +31 -0
  361. package/src/testWorker.ts +13 -0
  362. package/src/version.generated.ts +1 -1
@@ -107,6 +107,11 @@ const AuthAccountDeletedPublic = z.object({
107
107
  status: z.literal(403).describe("Forbidden — the account exists and may not act. Not 404, because until the purge runs it can come back, and not 401, because signing in again cannot help."),
108
108
  ...publicFields
109
109
  }).describe("The account is deleted and awaiting its purge (403).");
110
+ const AuthHandoffInvalidPublic = z.object({
111
+ code: z.literal("auth/handoff_invalid").describe("The one-time code a native app trades for its session after a redirect sign-in is spent, expired, was never issued, or came with the wrong verifier. One code for all four, so the answer says nothing about which codes exist or why a trade failed. The remedy is the same for each: sign in again."),
112
+ status: z.literal(400).describe("Bad Request — the code presented cannot be traded. Not 401: no credential was presented to refuse."),
113
+ ...publicFields
114
+ }).describe("A sign-in handoff code that is spent, expired, unknown or presented with the wrong verifier (400).");
110
115
  const NotFoundPublic = z.object({
111
116
  code: z.literal("core/not_found").describe("The requested resource does not exist."),
112
117
  status: z.literal(404).describe("Not Found."),
@@ -162,6 +167,16 @@ const WebhookUnverifiedPublic = z.object({
162
167
  status: z.literal(401).describe("Unauthorized — the delivery did not prove its origin."),
163
168
  ...publicFields
164
169
  }).describe("An inbound webhook failed its signature check (401).");
170
+ const PresenceTicketInvalidPublic = z.object({
171
+ code: z.literal("core/presence_ticket_invalid").describe("A presence socket was opened without a ticket this Worker accepts. Deliberately one code for every failing step — no ticket, a bad signature, an expired one, one already spent, or one minted for another room — so a caller holding a stolen ticket learns nothing about which check it tripped. `detail` names the step for the log, and the codec strips it."),
172
+ status: z.literal(401).describe("Unauthorized — mint a fresh ticket and open the socket with it."),
173
+ ...publicFields
174
+ }).describe("A presence socket upgrade carried no valid ticket (401).");
175
+ const PresenceRoomFullPublic = z.object({
176
+ code: z.literal("core/presence_room_full").describe("A presence room already holds as many participants as its room kind allows."),
177
+ status: z.literal(409).describe("Conflict — the room is at its participant cap. Try again when someone leaves."),
178
+ ...publicFields
179
+ }).describe("A presence room is at its participant cap (409).");
165
180
  const CloudflareNotConfiguredPublic = z.object({
166
181
  code: z.literal("cloudflare/not_configured").describe("The CF REST client is missing required configuration (token, account, or a resource id)."),
167
182
  status: z.literal(500).describe("Internal Server Error — a configuration fault, not a client request."),
@@ -397,6 +412,21 @@ const LedgerInvalidAmountPublic = z.object({
397
412
  status: z.literal(400).describe("Bad Request — the amount is not a positive integer."),
398
413
  ...publicFields
399
414
  }).describe("An amount is not a positive integer (400).");
415
+ const LedgerEntryNotFoundPublic = z.object({
416
+ code: z.literal("ledger/entry_not_found").describe("No ledger entry with that reference exists on the account named. An entry on another account is answered the same way, so a reversal can never reach past the account its path names."),
417
+ status: z.literal(404).describe("Not Found."),
418
+ ...publicFields
419
+ }).describe("A referenced ledger entry does not exist on that account (404).");
420
+ const LedgerEntryNotReversiblePublic = z.object({
421
+ code: z.literal("ledger/entry_not_reversible").describe("Only a credit or a debit reverses, and never one that is itself a reversal. A hold has release; a capture spends escrow and a transfer touches a second account, so both are refused. `params.kind` names the entry's kind, and `params.reverses` the entry a reversal reversed. Nothing was written."),
422
+ status: z.literal(409).describe("Conflict — the entry's kind does not reverse."),
423
+ ...publicFields
424
+ }).describe("A ledger entry of a kind that does not reverse (409).");
425
+ const LedgerRefConflictPublic = z.object({
426
+ code: z.literal("ledger/ref_conflict").describe("The ref a control-plane write would be written under is already held by a different entry, so the write cannot be recorded and is not a replay either: a credit's or a debit's key already used for another account, the other act, another amount or a hold, or the derived ref of a reversal or a hold's resolution held by an unrelated entry. Nothing moved; the entry stays unreversed, or the hold stays open."),
427
+ status: z.literal(409).describe("Conflict — the ref belongs to another entry."),
428
+ ...publicFields
429
+ }).describe("A write whose ref another entry already holds (409).");
400
430
  const RatingUnknownAlgorithmPublic = z.object({
401
431
  code: z.literal("rating/unknown_algorithm").describe("A game wires a rating algorithm id that no one registered. Algorithm ids come from the built-ins (`elo`/`glicko`/`trueskill`) or `registerRatingAlgorithm`, not the database."),
402
432
  status: z.literal(400).describe("Bad Request — the adopter's config names an unregistered algorithm."),
@@ -427,6 +457,46 @@ const RatingRecordForbiddenPublic = z.object({
427
457
  status: z.literal(403).describe("Forbidden — the caller may not record outcomes."),
428
458
  ...publicFields
429
459
  }).describe("The caller lacks the scope to record a rated outcome (403).");
460
+ const ConsentUnknownPurposePublic = z.object({
461
+ code: z.literal("consent/unknown_purpose").describe("No consent purpose with that id is declared by a composed capability or in `consent({ purposes })`."),
462
+ status: z.literal(404).describe("Not Found."),
463
+ ...publicFields
464
+ }).describe("A consent purpose that is not declared (404).");
465
+ const ConsentStaleNoticePublic = z.object({
466
+ code: z.literal("consent/stale_notice").describe("The grant names a notice version that is not the purpose's current one. A person agrees to the notice in force, so the screen showing an older one has to be reloaded."),
467
+ status: z.literal(409).describe("Conflict — the notice has moved on."),
468
+ ...publicFields
469
+ }).describe("A grant against a notice version that is not current (409).");
470
+ const ConsentMethodBelowMinimumPublic = z.object({
471
+ code: z.literal("consent/method_below_minimum").describe("The grant was given by a method below the purpose's minimum — a click where the purpose needs a typed name, a drawn signature or a provider's envelope."),
472
+ status: z.literal(400).describe("Bad Request — the method is below the purpose's minimum."),
473
+ ...publicFields
474
+ }).describe("A grant below the purpose's minimum method (400).");
475
+ const ConsentWithdrawalBelowGrantPublic = z.object({
476
+ code: z.literal("consent/withdrawal_below_grant").describe("The purpose requires a withdrawal at least at the grade of the grant it withdraws, as a HIPAA revocation must be in writing, and this one is below it."),
477
+ status: z.literal(400).describe("Bad Request — the withdrawal is below the grant's method."),
478
+ ...publicFields
479
+ }).describe("A withdrawal below the grade its purpose requires (400).");
480
+ const ConsentEvidenceMissingPublic = z.object({
481
+ code: z.literal("consent/evidence_missing").describe("The method names evidence the request did not carry: a typed name for `typed`, a drawn image for `drawn`, a provider and envelope for `provider`, or the document a signed grant is given against."),
482
+ status: z.literal(400).describe("Bad Request — the evidence for the method is missing."),
483
+ ...publicFields
484
+ }).describe("A grant or withdrawal missing the evidence its method needs (400).");
485
+ const ConsentExpiryPassedPublic = z.object({
486
+ code: z.literal("consent/expiry_passed").describe("The grant's expiry is not in the future, so it would answer no from the moment it was recorded."),
487
+ status: z.literal(400).describe("Bad Request — the expiry has already passed."),
488
+ ...publicFields
489
+ }).describe("A grant whose expiry has already passed (400).");
490
+ const ConsentDocumentNotFoundPublic = z.object({
491
+ code: z.literal("consent/document_not_found").describe("No signed document with that content hash is kept."),
492
+ status: z.literal(404).describe("Not Found."),
493
+ ...publicFields
494
+ }).describe("A signed document that is not kept (404).");
495
+ const ConsentEvidenceStoreMissingPublic = z.object({
496
+ code: z.literal("consent/evidence_store_missing").describe("A drawn signature or a provider's certificate is stored in R2, and the Worker has no `CONSENT_EVIDENCE` bucket bound. A binding we never got, so the answer is in this Worker's wiring."),
497
+ status: z.literal(500).describe("Internal Server Error — the evidence bucket is not bound."),
498
+ ...publicFields
499
+ }).describe("The evidence bucket is not bound (500).");
430
500
  const MatchmakingRoomNotFoundPublic = z.object({
431
501
  code: z.literal("matchmaking/room_not_found").describe("No open room has that code — it never existed, expired, or was already used up."),
432
502
  status: z.literal(404).describe("Not Found."),
@@ -687,6 +757,26 @@ const OrganizationNominationInvalidPublic = z.object({
687
757
  status: z.literal(400).describe("Bad Request — no offer this caller may accept."),
688
758
  ...publicFields
689
759
  }).describe("No standing ownership offer this caller may accept (400).");
760
+ const OrganizationLastOwnerPublic = z.object({
761
+ code: z.literal("organization/last_owner").describe("An operator write would leave the account with nobody holding the role a transfer of ownership confers: removing or demoting its only owner. An account with no owner is the unadministrable state membership administration exists to get out of, so the way out is to force ownership onto somebody else first, which `params.ownershipRoute` names."),
762
+ status: z.literal(409).describe("Conflict — an account nobody owns is not a state to arrive at."),
763
+ ...publicFields
764
+ }).describe("The last owner cannot be removed or demoted (409).");
765
+ const OrganizationAlreadyMemberPublic = z.object({
766
+ code: z.literal("organization/already_member").describe("An operator tried to add somebody who already holds a membership in the account. One membership per person per organization, so this is a refusal rather than a second row — and `params.role` names the role they already hold, because the next step is a role change rather than an add."),
767
+ status: z.literal(409).describe("Conflict."),
768
+ ...publicFields
769
+ }).describe("That person is already a member (409).");
770
+ const OrganizationSeatLimitReachedPublic = z.object({
771
+ code: z.literal("organization/seat_limit_reached").describe("The account holds as many members as its seat limit allows, so another one would exceed it. `params.seatLimit` names the limit. An operator add may override it, and the override is recorded; an invitation accepted against a full account is refused until a seat frees."),
772
+ status: z.literal(409).describe("Conflict."),
773
+ ...publicFields
774
+ }).describe("The account has no free seat (409).");
775
+ const OrganizationSuspendedPublic = z.object({
776
+ code: z.literal("organization/organization_suspended").describe("The organization this request acts in is suspended by an operator, so nobody can act in it until it is reinstated (#623). The caller's own account is not affected, and their other organizations are not either. `params.suspendedUntil`, when present, is when the suspension ends by itself, ISO-8601. Not `organization/forbidden`, because no role would let them, and not `organization/not_found`, because the caller is a proved member and already knows the organization exists."),
777
+ status: z.literal(403).describe("Forbidden — the organization may not be acted in, whoever asks."),
778
+ ...publicFields
779
+ }).describe("The organization is suspended (403).");
690
780
  const ArtifactsNotFoundPublic = z.object({
691
781
  code: z.literal("artifacts/not_found").describe("No such repository, **or** one the caller holds no grant on and does not own. One code for both, byte for byte: a repository's name is in its clone URL, and a refusal that told the two apart would hand it over. Also what the credential route answers for a repository with remote access off. Which it was survives in `detail`, which the HTTP codec strips."),
692
782
  status: z.literal(404).describe("Not Found."),
@@ -809,6 +899,7 @@ const KitPublicErrorPayload = z.discriminatedUnion("code", [
809
899
  AuthSessionNotFreshPublic,
810
900
  AuthAccountSuspendedPublic,
811
901
  AuthAccountDeletedPublic,
902
+ AuthHandoffInvalidPublic,
812
903
  NotFoundPublic,
813
904
  ConflictPublic,
814
905
  RateLimitPublic,
@@ -820,6 +911,8 @@ const KitPublicErrorPayload = z.discriminatedUnion("code", [
820
911
  UnknownWorkflowPublic,
821
912
  WorkflowFailedPublic,
822
913
  WebhookUnverifiedPublic,
914
+ PresenceTicketInvalidPublic,
915
+ PresenceRoomFullPublic,
823
916
  CloudflareNotConfiguredPublic,
824
917
  CloudflareRequestFailedPublic,
825
918
  CloudflareInvalidResponsePublic,
@@ -867,12 +960,23 @@ const KitPublicErrorPayload = z.discriminatedUnion("code", [
867
960
  LedgerInsufficientFundsPublic,
868
961
  LedgerHoldNotOpenPublic,
869
962
  LedgerInvalidAmountPublic,
963
+ LedgerEntryNotFoundPublic,
964
+ LedgerEntryNotReversiblePublic,
965
+ LedgerRefConflictPublic,
870
966
  RatingUnknownAlgorithmPublic,
871
967
  RatingUnsupportedPlayerCountPublic,
872
968
  RatingInvalidParamsPublic,
873
969
  RatingGameNotFoundPublic,
874
970
  RatingPoolNotFoundPublic,
875
971
  RatingRecordForbiddenPublic,
972
+ ConsentUnknownPurposePublic,
973
+ ConsentStaleNoticePublic,
974
+ ConsentMethodBelowMinimumPublic,
975
+ ConsentWithdrawalBelowGrantPublic,
976
+ ConsentEvidenceMissingPublic,
977
+ ConsentExpiryPassedPublic,
978
+ ConsentDocumentNotFoundPublic,
979
+ ConsentEvidenceStoreMissingPublic,
876
980
  MatchmakingRoomNotFoundPublic,
877
981
  MatchmakingRoomFullPublic,
878
982
  MatchmakingInvalidCodePublic,
@@ -925,6 +1029,10 @@ const KitPublicErrorPayload = z.discriminatedUnion("code", [
925
1029
  OrganizationLastAdministratorPublic,
926
1030
  OrganizationSlugTakenPublic,
927
1031
  OrganizationNominationInvalidPublic,
1032
+ OrganizationLastOwnerPublic,
1033
+ OrganizationAlreadyMemberPublic,
1034
+ OrganizationSeatLimitReachedPublic,
1035
+ OrganizationSuspendedPublic,
928
1036
  ArtifactsNotFoundPublic,
929
1037
  ArtifactsForbiddenPublic,
930
1038
  ArtifactsInvalidNamePublic,
@@ -957,6 +1065,7 @@ const AuthProviderUnavailable = AuthProviderUnavailablePublic.extend(internalFie
957
1065
  const AuthSessionNotFresh = AuthSessionNotFreshPublic.extend(internalFields).describe(AuthSessionNotFreshPublic.description ?? "");
958
1066
  const AuthAccountSuspended = AuthAccountSuspendedPublic.extend(internalFields).describe(AuthAccountSuspendedPublic.description ?? "");
959
1067
  const AuthAccountDeleted = AuthAccountDeletedPublic.extend(internalFields).describe(AuthAccountDeletedPublic.description ?? "");
1068
+ const AuthHandoffInvalid = AuthHandoffInvalidPublic.extend(internalFields).describe(AuthHandoffInvalidPublic.description ?? "");
960
1069
  const NotFound = NotFoundPublic.extend(internalFields).describe(NotFoundPublic.description ?? "");
961
1070
  const Conflict = ConflictPublic.extend(internalFields).describe(ConflictPublic.description ?? "");
962
1071
  const RateLimit = RateLimitPublic.extend(internalFields).describe(RateLimitPublic.description ?? "");
@@ -968,6 +1077,8 @@ const MissingWorkflowBinding = MissingWorkflowBindingPublic.extend(internalField
968
1077
  const UnknownWorkflow = UnknownWorkflowPublic.extend(internalFields).describe(UnknownWorkflowPublic.description ?? "");
969
1078
  const WorkflowFailed = WorkflowFailedPublic.extend(internalFields).describe(WorkflowFailedPublic.description ?? "");
970
1079
  const WebhookUnverified = WebhookUnverifiedPublic.extend(internalFields).describe(WebhookUnverifiedPublic.description ?? "");
1080
+ const PresenceTicketInvalid = PresenceTicketInvalidPublic.extend(internalFields).describe(PresenceTicketInvalidPublic.description ?? "");
1081
+ const PresenceRoomFull = PresenceRoomFullPublic.extend(internalFields).describe(PresenceRoomFullPublic.description ?? "");
971
1082
  const CloudflareNotConfigured = CloudflareNotConfiguredPublic.extend(internalFields).describe(CloudflareNotConfiguredPublic.description ?? "");
972
1083
  const CloudflareRequestFailed = CloudflareRequestFailedPublic.extend(internalFields).describe(CloudflareRequestFailedPublic.description ?? "");
973
1084
  const CloudflareInvalidResponse = CloudflareInvalidResponsePublic.extend(internalFields).describe(CloudflareInvalidResponsePublic.description ?? "");
@@ -1015,12 +1126,23 @@ const LedgerHoldNotFound = LedgerHoldNotFoundPublic.extend(internalFields).descr
1015
1126
  const LedgerInsufficientFunds = LedgerInsufficientFundsPublic.extend(internalFields).describe(LedgerInsufficientFundsPublic.description ?? "");
1016
1127
  const LedgerHoldNotOpen = LedgerHoldNotOpenPublic.extend(internalFields).describe(LedgerHoldNotOpenPublic.description ?? "");
1017
1128
  const LedgerInvalidAmount = LedgerInvalidAmountPublic.extend(internalFields).describe(LedgerInvalidAmountPublic.description ?? "");
1129
+ const LedgerEntryNotFound = LedgerEntryNotFoundPublic.extend(internalFields).describe(LedgerEntryNotFoundPublic.description ?? "");
1130
+ const LedgerEntryNotReversible = LedgerEntryNotReversiblePublic.extend(internalFields).describe(LedgerEntryNotReversiblePublic.description ?? "");
1131
+ const LedgerRefConflict = LedgerRefConflictPublic.extend(internalFields).describe(LedgerRefConflictPublic.description ?? "");
1018
1132
  const RatingUnknownAlgorithm = RatingUnknownAlgorithmPublic.extend(internalFields).describe(RatingUnknownAlgorithmPublic.description ?? "");
1019
1133
  const RatingUnsupportedPlayerCount = RatingUnsupportedPlayerCountPublic.extend(internalFields).describe(RatingUnsupportedPlayerCountPublic.description ?? "");
1020
1134
  const RatingInvalidParams = RatingInvalidParamsPublic.extend(internalFields).describe(RatingInvalidParamsPublic.description ?? "");
1021
1135
  const RatingGameNotFound = RatingGameNotFoundPublic.extend(internalFields).describe(RatingGameNotFoundPublic.description ?? "");
1022
1136
  const RatingPoolNotFound = RatingPoolNotFoundPublic.extend(internalFields).describe(RatingPoolNotFoundPublic.description ?? "");
1023
1137
  const RatingRecordForbidden = RatingRecordForbiddenPublic.extend(internalFields).describe(RatingRecordForbiddenPublic.description ?? "");
1138
+ const ConsentUnknownPurpose = ConsentUnknownPurposePublic.extend(internalFields).describe(ConsentUnknownPurposePublic.description ?? "");
1139
+ const ConsentStaleNotice = ConsentStaleNoticePublic.extend(internalFields).describe(ConsentStaleNoticePublic.description ?? "");
1140
+ const ConsentMethodBelowMinimum = ConsentMethodBelowMinimumPublic.extend(internalFields).describe(ConsentMethodBelowMinimumPublic.description ?? "");
1141
+ const ConsentWithdrawalBelowGrant = ConsentWithdrawalBelowGrantPublic.extend(internalFields).describe(ConsentWithdrawalBelowGrantPublic.description ?? "");
1142
+ const ConsentEvidenceMissing = ConsentEvidenceMissingPublic.extend(internalFields).describe(ConsentEvidenceMissingPublic.description ?? "");
1143
+ const ConsentExpiryPassed = ConsentExpiryPassedPublic.extend(internalFields).describe(ConsentExpiryPassedPublic.description ?? "");
1144
+ const ConsentDocumentNotFound = ConsentDocumentNotFoundPublic.extend(internalFields).describe(ConsentDocumentNotFoundPublic.description ?? "");
1145
+ const ConsentEvidenceStoreMissing = ConsentEvidenceStoreMissingPublic.extend(internalFields).describe(ConsentEvidenceStoreMissingPublic.description ?? "");
1024
1146
  const MatchmakingRoomNotFound = MatchmakingRoomNotFoundPublic.extend(internalFields).describe(MatchmakingRoomNotFoundPublic.description ?? "");
1025
1147
  const MatchmakingRoomFull = MatchmakingRoomFullPublic.extend(internalFields).describe(MatchmakingRoomFullPublic.description ?? "");
1026
1148
  const MatchmakingInvalidCode = MatchmakingInvalidCodePublic.extend(internalFields).describe(MatchmakingInvalidCodePublic.description ?? "");
@@ -1083,6 +1205,10 @@ const OrganizationInvitationInvalid = OrganizationInvitationInvalidPublic.extend
1083
1205
  const OrganizationLastAdministrator = OrganizationLastAdministratorPublic.extend(internalFields).describe(OrganizationLastAdministratorPublic.description ?? "");
1084
1206
  const OrganizationSlugTaken = OrganizationSlugTakenPublic.extend(internalFields).describe(OrganizationSlugTakenPublic.description ?? "");
1085
1207
  const OrganizationNominationInvalid = OrganizationNominationInvalidPublic.extend(internalFields).describe(OrganizationNominationInvalidPublic.description ?? "");
1208
+ const OrganizationLastOwner = OrganizationLastOwnerPublic.extend(internalFields).describe(OrganizationLastOwnerPublic.description ?? "");
1209
+ const OrganizationAlreadyMember = OrganizationAlreadyMemberPublic.extend(internalFields).describe(OrganizationAlreadyMemberPublic.description ?? "");
1210
+ const OrganizationSeatLimitReached = OrganizationSeatLimitReachedPublic.extend(internalFields).describe(OrganizationSeatLimitReachedPublic.description ?? "");
1211
+ const OrganizationSuspended = OrganizationSuspendedPublic.extend(internalFields).describe(OrganizationSuspendedPublic.description ?? "");
1086
1212
  const ArtifactsNotFound = ArtifactsNotFoundPublic.extend(internalFields).describe(ArtifactsNotFoundPublic.description ?? "");
1087
1213
  const ArtifactsForbidden = ArtifactsForbiddenPublic.extend(internalFields).describe(ArtifactsForbiddenPublic.description ?? "");
1088
1214
  const ArtifactsInvalidName = ArtifactsInvalidNamePublic.extend(internalFields).describe(ArtifactsInvalidNamePublic.description ?? "");
@@ -1110,6 +1236,7 @@ const KitErrorPayload = z.discriminatedUnion("code", [
1110
1236
  AuthSessionNotFresh,
1111
1237
  AuthAccountSuspended,
1112
1238
  AuthAccountDeleted,
1239
+ AuthHandoffInvalid,
1113
1240
  NotFound,
1114
1241
  Conflict,
1115
1242
  RateLimit,
@@ -1121,6 +1248,8 @@ const KitErrorPayload = z.discriminatedUnion("code", [
1121
1248
  UnknownWorkflow,
1122
1249
  WorkflowFailed,
1123
1250
  WebhookUnverified,
1251
+ PresenceTicketInvalid,
1252
+ PresenceRoomFull,
1124
1253
  CloudflareNotConfigured,
1125
1254
  CloudflareRequestFailed,
1126
1255
  CloudflareInvalidResponse,
@@ -1168,12 +1297,23 @@ const KitErrorPayload = z.discriminatedUnion("code", [
1168
1297
  LedgerInsufficientFunds,
1169
1298
  LedgerHoldNotOpen,
1170
1299
  LedgerInvalidAmount,
1300
+ LedgerEntryNotFound,
1301
+ LedgerEntryNotReversible,
1302
+ LedgerRefConflict,
1171
1303
  RatingUnknownAlgorithm,
1172
1304
  RatingUnsupportedPlayerCount,
1173
1305
  RatingInvalidParams,
1174
1306
  RatingGameNotFound,
1175
1307
  RatingPoolNotFound,
1176
1308
  RatingRecordForbidden,
1309
+ ConsentUnknownPurpose,
1310
+ ConsentStaleNotice,
1311
+ ConsentMethodBelowMinimum,
1312
+ ConsentWithdrawalBelowGrant,
1313
+ ConsentEvidenceMissing,
1314
+ ConsentExpiryPassed,
1315
+ ConsentDocumentNotFound,
1316
+ ConsentEvidenceStoreMissing,
1177
1317
  MatchmakingRoomNotFound,
1178
1318
  MatchmakingRoomFull,
1179
1319
  MatchmakingInvalidCode,
@@ -1226,6 +1366,10 @@ const KitErrorPayload = z.discriminatedUnion("code", [
1226
1366
  OrganizationLastAdministrator,
1227
1367
  OrganizationSlugTaken,
1228
1368
  OrganizationNominationInvalid,
1369
+ OrganizationLastOwner,
1370
+ OrganizationAlreadyMember,
1371
+ OrganizationSeatLimitReached,
1372
+ OrganizationSuspended,
1229
1373
  ArtifactsNotFound,
1230
1374
  ArtifactsForbidden,
1231
1375
  ArtifactsInvalidName,
@@ -120,6 +120,28 @@ export declare class WebhookUnverifiedError extends PithyError {
120
120
  cause?: unknown;
121
121
  });
122
122
  }
123
+ /**
124
+ * One code for every way a presence socket's ticket fails — missing, forged, expired, spent, or minted for
125
+ * another room. The step goes in `detail`, which the codec strips: a caller holding somebody else's ticket
126
+ * learns only that it no longer works.
127
+ */
128
+ export declare class PresenceTicketInvalidError extends PithyError {
129
+ readonly payload: Extract<ErrorPayload, {
130
+ code: "core/presence_ticket_invalid";
131
+ }>;
132
+ constructor(args?: ErrorArgs, options?: {
133
+ cause?: unknown;
134
+ });
135
+ }
136
+ /** A presence room is at the participant cap its room kind declares. */
137
+ export declare class PresenceRoomFullError extends PithyError {
138
+ readonly payload: Extract<ErrorPayload, {
139
+ code: "core/presence_room_full";
140
+ }>;
141
+ constructor(args?: ErrorArgs, options?: {
142
+ cause?: unknown;
143
+ });
144
+ }
123
145
  export declare class ForbiddenError extends PithyError {
124
146
  readonly payload: Extract<ErrorPayload, {
125
147
  code: "auth/forbidden";
@@ -1 +1 @@
1
- {"version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AI,GAAE,SAAc,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAY9D;CACF;AAED,qBAAa,aAAc,SAAQ,UAAU;IAC3C,SAAiB,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE;QAAE,IAAI,EAAE,eAAe,CAAA;KAAE,CAAC,CAAC;IAE3E,YAAY,IAAI,GAAE,SAAc,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAY9D;CACF;AAED;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAC3C,SAAiB,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE;QAAE,IAAI,EAAE,sBAAsB,CAAA;KAAE,CAAC,CAAC;IAElF,YAAY,IAAI,GAAE,SAAc,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAY9D;CACF;AAED,sGAAsG;AACtG,qBAAa,oBAAqB,SAAQ,UAAU;IAClD,SAAiB,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE;QAAE,IAAI,EAAE,uBAAuB,CAAA;KAAE,CAAC,CAAC;IAEnF,YAAY,IAAI,GAAE,SAAc,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAY9D;CACF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAE,SAAc,GAAG,eAAe,CAarF;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEhD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGjD"}
@@ -123,6 +123,36 @@ var WebhookUnverifiedError = class extends PithyError {
123
123
  }, options);
124
124
  }
125
125
  };
126
+ /**
127
+ * One code for every way a presence socket's ticket fails — missing, forged, expired, spent, or minted for
128
+ * another room. The step goes in `detail`, which the codec strips: a caller holding somebody else's ticket
129
+ * learns only that it no longer works.
130
+ */
131
+ var PresenceTicketInvalidError = class extends PithyError {
132
+ constructor(args = {}, options) {
133
+ super({
134
+ code: "core/presence_ticket_invalid",
135
+ status: 401,
136
+ message: args.message ?? "That presence ticket is not valid.",
137
+ action: args.action ?? "Mint a fresh ticket and open the socket within 60 seconds.",
138
+ detail: args.detail,
139
+ params: args.params
140
+ }, options);
141
+ }
142
+ };
143
+ /** A presence room is at the participant cap its room kind declares. */
144
+ var PresenceRoomFullError = class extends PithyError {
145
+ constructor(args = {}, options) {
146
+ super({
147
+ code: "core/presence_room_full",
148
+ status: 409,
149
+ message: args.message ?? "That room is full.",
150
+ action: args.action,
151
+ detail: args.detail,
152
+ params: args.params
153
+ }, options);
154
+ }
155
+ };
126
156
  var ForbiddenError = class extends PithyError {
127
157
  constructor(args = {}, options) {
128
158
  super({
@@ -257,4 +287,4 @@ function sentenceOf(error) {
257
287
  return action ? `${messageOf(error)} ${action}` : messageOf(error);
258
288
  }
259
289
  //#endregion
260
- export { ConflictError, ForbiddenError, InputRequiredError, InternalError, NotFoundError, PersonRequiredError, PithyError, PreconditionFailedError, RateLimitError, UnauthorizedError, UpstreamError, UpstreamTimeoutError, ValidationError, WebhookUnverifiedError, fromZodError, messageOf, sentenceOf };
290
+ export { ConflictError, ForbiddenError, InputRequiredError, InternalError, NotFoundError, PersonRequiredError, PithyError, PreconditionFailedError, PresenceRoomFullError, PresenceTicketInvalidError, RateLimitError, UnauthorizedError, UpstreamError, UpstreamTimeoutError, ValidationError, WebhookUnverifiedError, fromZodError, messageOf, sentenceOf };
@@ -37,6 +37,24 @@ export interface RouteResponse {
37
37
  }
38
38
  /** The HTTP methods an `app.all` route is documented under. OpenAPI has no "any method". */
39
39
  export type DocumentedMethod = "get" | "post" | "put" | "patch" | "delete" | "head" | "options";
40
+ /**
41
+ * What a tool does beyond reading, which every non-`GET` tool must say (`docs/AGENT-ACCESS.md` §4).
42
+ *
43
+ * **A route is a tool only when it says so, and a non-`GET` says so louder.** One that sends mail, charges a card or
44
+ * deletes something is a tool an agent can call in a loop, so the effect is not inferred from the method: it is
45
+ * declared, it sets the tool's MCP annotations, it is written into the tool's description, and it is counted on the
46
+ * consent screen beside its capability.
47
+ */
48
+ export declare const TOOL_EFFECTS: readonly ["writes", "sends", "charges", "deletes"];
49
+ export type ToolEffect = (typeof TOOL_EFFECTS)[number];
50
+ /**
51
+ * A route's opt-in to the app's MCP endpoint. `true` is a read, and only a `GET` may say it; anything else declares
52
+ * its {@link ToolEffect}. `createBackend` refuses a composition where either half is wrong — `describeRoute` cannot
53
+ * see the method it is mounted under, so the composition is the first place the pair can be checked.
54
+ */
55
+ export type RouteTool = true | {
56
+ readonly effect: ToolEffect;
57
+ };
40
58
  /** What a route is for, how its caller is verified, and what it returns. */
41
59
  export interface RouteSpec {
42
60
  /** One sentence, in the brand voice. The operation's title in the contract. */
@@ -58,8 +76,35 @@ export interface RouteSpec {
58
76
  readonly responses: Readonly<Record<number, z.ZodType | RouteResponse>>;
59
77
  /** For an `app.all` route only: the methods it is documented under. */
60
78
  readonly methods?: readonly DocumentedMethod[];
79
+ /**
80
+ * The power a caller's role must hold to reach this route at all. **Declaring it installs the gate**: the
81
+ * same middleware that carries this spec refuses a caller whose acting organization's role does not hold it, so
82
+ * what the MCP endpoint filters `tools/list` on and what the route enforces are one value and cannot drift.
83
+ *
84
+ * A route whose access depends on the record — its owner may, a manager may — declares the power that lets a
85
+ * member reach it at all, and keeps its in-handler check. Absent, the route is gated by its other guards alone,
86
+ * and a tool for it is offered to every signed-in user the endpoint admits.
87
+ */
88
+ readonly power?: string;
89
+ /**
90
+ * The route's permanent name within its capability, e.g. `threads.reply`. Its MCP tool is
91
+ * `<capability>_<operation>`, through the one normalizer the control-plane server's tools use. Unique within a
92
+ * capability, and never renamed once published: an agent references a tool by name.
93
+ */
94
+ readonly operation?: string;
95
+ /**
96
+ * The route's opt-in to the app's MCP endpoint. Absent, the route is not a tool. See {@link RouteTool}.
97
+ */
98
+ readonly tool?: RouteTool;
61
99
  }
62
- /** Declare what a route is for, how its caller is verified, and what it returns. See {@link RouteSpec}. */
100
+ /**
101
+ * Declare what a route is for, how its caller is verified, and what it returns. See {@link RouteSpec}.
102
+ *
103
+ * With a {@link RouteSpec.power} it is also the route's power gate, read off the acting-organization seam the way
104
+ * every capability outside tenancy asks it. It sits first on the route line, so it answers an anonymous caller
105
+ * itself rather than assuming a guard below it will: a 401, because signing in might help, where a role that does
106
+ * not hold the power is a 403.
107
+ */
63
108
  export declare function describeRoute(spec: RouteSpec): MiddlewareHandler;
64
109
  /** The spec a {@link describeRoute} middleware carries, or `undefined` for any other handler. */
65
110
  export declare function routeSpecOf(handler: unknown): RouteSpec | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"routeSpec.d.ts","sourceRoot":"","sources":["../../src/http/routeSpec.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,8GAA8G;AAC9G,eAAO,MAAM,UAAU,eAAgC,CAAC;AAExD,yGAAyG;AACzG,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kGAAkG;IAClG,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;IAC5B,gGAAgG;IAChG,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,4FAA4F;AAC5F,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SA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AS,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,iBAAiB,CA4BhE;AAED,iGAAiG;AACjG,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAGnE"}
@@ -1,5 +1,6 @@
1
1
  // SPDX-FileCopyrightText: 2026 Pithy
2
2
  // SPDX-License-Identifier: MIT
3
+ import { ForbiddenError, UnauthorizedError } from "../error/pithyError.js";
3
4
  //#region src/http/routeSpec.ts
4
5
  /**
5
6
  * The third half of a route declaration. `validate` says what a caller may send and the guards say who
@@ -24,12 +25,45 @@
24
25
  */
25
26
  /** The key a {@link describeRoute} middleware carries its spec under. Global, so two copies of core agree. */
26
27
  const ROUTE_SPEC = Symbol.for("pithy.routeSpec");
27
- /** Declare what a route is for, how its caller is verified, and what it returns. See {@link RouteSpec}. */
28
+ /**
29
+ * What a tool does beyond reading, which every non-`GET` tool must say (`docs/AGENT-ACCESS.md` §4).
30
+ *
31
+ * **A route is a tool only when it says so, and a non-`GET` says so louder.** One that sends mail, charges a card or
32
+ * deletes something is a tool an agent can call in a loop, so the effect is not inferred from the method: it is
33
+ * declared, it sets the tool's MCP annotations, it is written into the tool's description, and it is counted on the
34
+ * consent screen beside its capability.
35
+ */
36
+ const TOOL_EFFECTS = [
37
+ "writes",
38
+ "sends",
39
+ "charges",
40
+ "deletes"
41
+ ];
42
+ /**
43
+ * Declare what a route is for, how its caller is verified, and what it returns. See {@link RouteSpec}.
44
+ *
45
+ * With a {@link RouteSpec.power} it is also the route's power gate, read off the acting-organization seam the way
46
+ * every capability outside tenancy asks it. It sits first on the route line, so it answers an anonymous caller
47
+ * itself rather than assuming a guard below it will: a 401, because signing in might help, where a role that does
48
+ * not hold the power is a 403.
49
+ */
28
50
  function describeRoute(spec) {
29
- const middleware = async (_c, next) => {
51
+ const { power } = spec;
52
+ return Object.assign(power === void 0 ? async (_c, next) => {
53
+ await next();
54
+ } : async (c, next) => {
55
+ if (!c.var.auth) throw new UnauthorizedError({
56
+ message: "Authentication required.",
57
+ action: "Sign in and retry with a valid session or bearer token.",
58
+ detail: `describeRoute(power: ${power}) ran with no signed-in caller`
59
+ });
60
+ const acting = await c.var.actingOrganization();
61
+ if (acting === null || !acting.roleAllows(power)) throw new ForbiddenError({
62
+ message: `Your role does not allow \`${power}\`.`,
63
+ detail: acting === null ? `no organization is in force for user ${c.var.auth.userId}, so ${power} is not held` : `the role in organization ${acting.organizationId} does not hold ${power}`
64
+ });
30
65
  await next();
31
- };
32
- return Object.assign(middleware, { [ROUTE_SPEC]: spec });
66
+ }, { [ROUTE_SPEC]: spec });
33
67
  }
34
68
  /** The spec a {@link describeRoute} middleware carries, or `undefined` for any other handler. */
35
69
  function routeSpecOf(handler) {
@@ -37,4 +71,4 @@ function routeSpecOf(handler) {
37
71
  return handler[ROUTE_SPEC];
38
72
  }
39
73
  //#endregion
40
- export { ROUTE_SPEC, describeRoute, routeSpecOf };
74
+ export { ROUTE_SPEC, TOOL_EFFECTS, describeRoute, routeSpecOf };
@@ -1,6 +1,6 @@
1
1
  // SPDX-FileCopyrightText: 2026 Pithy
2
2
  // SPDX-License-Identifier: MIT
3
- import type { ValidationTargets } from "hono";
3
+ import type { Context, MiddlewareHandler, ValidationTargets } from "hono";
4
4
  import type { z } from "zod";
5
5
  /**
6
6
  * How a route declares what it accepts. Its sibling {@link ./verification.VerificationStrategy}
@@ -60,12 +60,21 @@ export interface RequestContract {
60
60
  * app.post(path, requireAuth(), validate("param", BoardParam), validate("json", SubmitScoreBody), handler);
61
61
  * ```
62
62
  */
63
- export declare function validate<Target extends keyof ValidationTargets, Schema extends z.ZodType>(target: Target, schema: Schema): import("hono").MiddlewareHandler<import("hono").Env, string, {
63
+ export declare function validate<Target extends keyof ValidationTargets, Schema extends z.ZodType>(target: Target, schema: Schema, onInvalid?: InvalidRequestListener): MiddlewareHandler<import("hono").Env, string, {
64
64
  in: (undefined extends (Schema extends import("zod/v3").ZodType<any, import("zod/v3").ZodTypeDef, any> ? import("zod/v3").input<Schema> : Schema extends z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? z.core.input<Schema> : never) ? true : false) extends true ? { [K in Target]?: ([Schema extends import("zod/v3").ZodType<any, import("zod/v3").ZodTypeDef, any> ? import("zod/v3").input<Schema> : Schema extends z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? z.core.input<Schema> : never] extends [ValidationTargets[K]] ? ValidationTargets[K] & (Schema extends import("zod/v3").ZodType<any, import("zod/v3").ZodTypeDef, any> ? import("zod/v3").input<Schema> : Schema extends z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? z.core.input<Schema> : never) : import("hono/validator").InferInput<Schema extends import("zod/v3").ZodType<any, import("zod/v3").ZodTypeDef, any> ? import("zod/v3").input<Schema> : Schema extends z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? z.core.input<Schema> : never, K, import("hono/types").ParsedFormValue>) | undefined; } : { [K in Target]: [Schema extends import("zod/v3").ZodType<any, import("zod/v3").ZodTypeDef, any> ? import("zod/v3").input<Schema> : Schema extends z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? z.core.input<Schema> : never] extends [ValidationTargets[K]] ? ValidationTargets[K] & (Schema extends import("zod/v3").ZodType<any, import("zod/v3").ZodTypeDef, any> ? import("zod/v3").input<Schema> : Schema extends z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? z.core.input<Schema> : never) : import("hono/validator").InferInput<Schema extends import("zod/v3").ZodType<any, import("zod/v3").ZodTypeDef, any> ? import("zod/v3").input<Schema> : Schema extends z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? z.core.input<Schema> : never, K, import("hono/types").ParsedFormValue>; };
65
65
  out: { [K in Target]: Schema extends import("zod/v3").ZodType<any, import("zod/v3").ZodTypeDef, any> ? import("zod/v3").output<Schema> : Schema extends z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? z.infer<Schema> : never; };
66
66
  }, never> & {
67
67
  [REQUEST_CONTRACT]: RequestContract;
68
68
  };
69
+ /**
70
+ * Told when {@link validate} refuses a request — a body that does not parse, or one that fails the schema —
71
+ * before the refusal is thrown. A route whose every attempt must be on the audit trail records the refusal
72
+ * here. It cannot turn the refusal into anything else: the error is thrown after it returns, and a listener
73
+ * that throws replaces it. `input` is what the request sent for the validated part, as it arrived; it is
74
+ * `undefined` when there was nothing to read, as for a body that is not JSON. Input validated by an earlier
75
+ * {@link validate} on the same route is readable with `c.req.valid(target)`.
76
+ */
77
+ export type InvalidRequestListener = (c: Context, error: unknown, input: unknown) => Promise<void> | void;
69
78
  /** The contract a {@link validate} middleware carries, or `undefined` for any other handler. */
70
79
  export declare function requestContractOf(handler: unknown): RequestContract | undefined;
71
80
  //# sourceMappingURL=validation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/http/validation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAA;CAAE,CAAC;AAEhG;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAG/D;AAED,6GAA6G;AAC7G,eAAO,MAAM,gBAAgB,eAAsC,CAAC;AAEpE,4GAA4G;AAC5G,MAAM,WAAW,eAAe;IAC9B,kGAAkG;I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CAAC,CAAC,OAAO,EACvF,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,sBAAsB;;;;;EA0BnC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE1G,gGAAgG;AAChG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,GAAG,SAAS,CAG/E"}
@@ -23,13 +23,30 @@ const REQUEST_CONTRACT = Symbol.for("pithy.requestContract");
23
23
  * app.post(path, requireAuth(), validate("param", BoardParam), validate("json", SubmitScoreBody), handler);
24
24
  * ```
25
25
  */
26
- function validate(target, schema) {
27
- const middleware = zValidator(target, schema, validationHook);
26
+ function validate(target, schema, onInvalid) {
28
27
  const contract = {
29
28
  target,
30
29
  schema
31
30
  };
32
- return Object.assign(middleware, { [REQUEST_CONTRACT]: contract });
31
+ if (!onInvalid) return Object.assign(zValidator(target, schema, validationHook), { [REQUEST_CONTRACT]: contract });
32
+ const refusedInput = /* @__PURE__ */ new WeakMap();
33
+ const middleware = zValidator(target, schema, (outcome, c) => {
34
+ if (!outcome.success) refusedInput.set(c, outcome.data);
35
+ validationHook(outcome);
36
+ });
37
+ const listened = async (c, next) => {
38
+ let reached = false;
39
+ try {
40
+ return await middleware(c, async () => {
41
+ reached = true;
42
+ await next();
43
+ });
44
+ } catch (error) {
45
+ if (!reached) await onInvalid(c, error, refusedInput.get(c));
46
+ throw error;
47
+ }
48
+ };
49
+ return Object.assign(listened, { [REQUEST_CONTRACT]: contract });
33
50
  }
34
51
  /** The contract a {@link validate} middleware carries, or `undefined` for any other handler. */
35
52
  function requestContractOf(handler) {
@@ -1 +1 @@
1
- {"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/http/verification.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,+JAYiE,CAAC;AACnG,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/http/verification.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,+JAciE,CAAC;AACnG,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -9,7 +9,7 @@ import { z } from "zod";
9
9
  * strategy, so it is deliberately not listed here.)
10
10
  */
11
11
  const VerificationStrategy = z.union([
12
- z.literal("bearer").describe("Short-lived access token via Authorization: Bearer; validated by @pithy-sh/auth."),
12
+ z.literal("bearer").describe("A session token via Authorization: Bearer, rotated before it expires; validated by @pithy-sh/auth."),
13
13
  z.literal("session").describe("Cookie-based web session, CSRF-protected; validated by @pithy-sh/auth."),
14
14
  z.literal("signed-webhook").describe("Inbound webhook, authenticated by the sender's own proof over the exact received bytes — one name over several mechanisms (an HMAC, a signed JWS chain, an OIDC token), because the sender chooses it. `requireSignedWebhook` (./signedWebhook) implements the timestamped-HMAC form; a rail whose sender proves it differently implements its own."),
15
15
  z.literal("control-plane").describe("M2M admin via a customer-issued scoped credential; default-denied."),
@@ -83,7 +83,8 @@ export interface TranslatorInput {
83
83
  readonly formattingLocale?: string;
84
84
  /**
85
85
  * The catalogs to walk, most-specific first. `@pithy-sh/i18n` passes adopter-locale, adopter-default,
86
- * kit-locale, kit-default; a copied screen passes its own baked English and nothing else.
86
+ * kit-locale, composed-locale, composed-default, composed English; a copied screen passes its own baked
87
+ * English and nothing else.
87
88
  */
88
89
  readonly layers: readonly (MessageCatalog | undefined)[];
89
90
  }
@@ -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