@codemem/core 0.49.1 → 0.50.0-beta.1

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 (371) hide show
  1. package/dist/api-types.d.ts +7 -0
  2. package/dist/api-types.d.ts.map +1 -1
  3. package/dist/better-sqlite-coordinator-runtime.d.ts.map +1 -1
  4. package/dist/better-sqlite-coordinator-store.d.ts +56 -3
  5. package/dist/better-sqlite-coordinator-store.d.ts.map +1 -1
  6. package/dist/boundary-readiness-inventory.d.ts +27 -0
  7. package/dist/boundary-readiness-inventory.d.ts.map +1 -0
  8. package/dist/coordinator-account-link-receiver.d.ts +15 -0
  9. package/dist/coordinator-account-link-receiver.d.ts.map +1 -1
  10. package/dist/coordinator-account-link-status-client.d.ts +1 -1
  11. package/dist/coordinator-account-link-status-client.d.ts.map +1 -1
  12. package/dist/coordinator-actions.d.ts +12 -0
  13. package/dist/coordinator-actions.d.ts.map +1 -1
  14. package/dist/coordinator-api.d.ts +7 -0
  15. package/dist/coordinator-api.d.ts.map +1 -1
  16. package/dist/coordinator-auth-historical-store-test-fixture.d.ts.map +1 -1
  17. package/dist/coordinator-auth-link-revocation-test-harness.d.ts.map +1 -1
  18. package/dist/coordinator-auth-schema-stage.d.ts +14 -2
  19. package/dist/coordinator-auth-schema-stage.d.ts.map +1 -1
  20. package/dist/coordinator-block-tombstone-test-harness.d.ts +3 -0
  21. package/dist/coordinator-block-tombstone-test-harness.d.ts.map +1 -0
  22. package/dist/coordinator-bootstrap-authorization-api-test-harness.d.ts.map +1 -1
  23. package/dist/coordinator-bootstrap-authorization-test-harness.d.ts.map +1 -1
  24. package/dist/coordinator-bootstrap-revocation-test-harness.d.ts.map +1 -1
  25. package/dist/coordinator-boundary-readiness-client.d.ts +35 -0
  26. package/dist/coordinator-boundary-readiness-client.d.ts.map +1 -0
  27. package/dist/coordinator-boundary-readiness-route.d.ts +52 -0
  28. package/dist/coordinator-boundary-readiness-route.d.ts.map +1 -0
  29. package/dist/coordinator-boundary-readiness-test-harness.d.ts +15 -0
  30. package/dist/coordinator-boundary-readiness-test-harness.d.ts.map +1 -0
  31. package/dist/coordinator-boundary-readiness.d.ts +161 -0
  32. package/dist/coordinator-boundary-readiness.d.ts.map +1 -0
  33. package/dist/coordinator-browser-auth-app.d.ts +1 -1
  34. package/dist/coordinator-browser-auth-app.d.ts.map +1 -1
  35. package/dist/coordinator-browser-auth-callback.d.ts +2 -1
  36. package/dist/coordinator-browser-auth-callback.d.ts.map +1 -1
  37. package/dist/coordinator-controller-revocation-test-harness.d.ts.map +1 -1
  38. package/dist/coordinator-d1-schema-inventory.d.ts +2 -0
  39. package/dist/coordinator-d1-schema-inventory.d.ts.map +1 -1
  40. package/dist/coordinator-d1-scope-authorization-test-harness.d.ts.map +1 -1
  41. package/dist/coordinator-device-auth-link.d.ts +1 -0
  42. package/dist/coordinator-device-auth-link.d.ts.map +1 -1
  43. package/dist/coordinator-device-rejoin-browser-evidence.d.ts +28 -0
  44. package/dist/coordinator-device-rejoin-browser-evidence.d.ts.map +1 -0
  45. package/dist/coordinator-device-rejoin-browser-transaction-test-harness.d.ts +8 -0
  46. package/dist/coordinator-device-rejoin-browser-transaction-test-harness.d.ts.map +1 -0
  47. package/dist/coordinator-device-rejoin-browser-transaction.d.ts +43 -0
  48. package/dist/coordinator-device-rejoin-browser-transaction.d.ts.map +1 -0
  49. package/dist/coordinator-device-rejoin-browser-view.d.ts +30 -0
  50. package/dist/coordinator-device-rejoin-browser-view.d.ts.map +1 -0
  51. package/dist/coordinator-device-rejoin-browser.d.ts +26 -0
  52. package/dist/coordinator-device-rejoin-browser.d.ts.map +1 -0
  53. package/dist/coordinator-device-rejoin-client-requests.d.ts +70 -0
  54. package/dist/coordinator-device-rejoin-client-requests.d.ts.map +1 -0
  55. package/dist/coordinator-device-rejoin-client.d.ts +15 -0
  56. package/dist/coordinator-device-rejoin-client.d.ts.map +1 -0
  57. package/dist/coordinator-device-rejoin-confirmation-test-harness.d.ts +22 -0
  58. package/dist/coordinator-device-rejoin-confirmation-test-harness.d.ts.map +1 -0
  59. package/dist/coordinator-device-rejoin-confirmation.d.ts +18 -0
  60. package/dist/coordinator-device-rejoin-confirmation.d.ts.map +1 -0
  61. package/dist/coordinator-device-rejoin-destinations-test-harness.d.ts +7 -0
  62. package/dist/coordinator-device-rejoin-destinations-test-harness.d.ts.map +1 -0
  63. package/dist/coordinator-device-rejoin-destinations.d.ts +25 -0
  64. package/dist/coordinator-device-rejoin-destinations.d.ts.map +1 -0
  65. package/dist/coordinator-device-rejoin-display.d.ts +14 -0
  66. package/dist/coordinator-device-rejoin-display.d.ts.map +1 -0
  67. package/dist/coordinator-device-rejoin-event-client.d.ts +30 -0
  68. package/dist/coordinator-device-rejoin-event-client.d.ts.map +1 -0
  69. package/dist/coordinator-device-rejoin-events.d.ts +7 -0
  70. package/dist/coordinator-device-rejoin-events.d.ts.map +1 -0
  71. package/dist/coordinator-device-rejoin-finalize-test-harness.d.ts +14 -0
  72. package/dist/coordinator-device-rejoin-finalize-test-harness.d.ts.map +1 -0
  73. package/dist/coordinator-device-rejoin-finalize.d.ts +36 -0
  74. package/dist/coordinator-device-rejoin-finalize.d.ts.map +1 -0
  75. package/dist/coordinator-device-rejoin-http.d.ts +11 -0
  76. package/dist/coordinator-device-rejoin-http.d.ts.map +1 -0
  77. package/dist/coordinator-device-rejoin-link-evidence-test-harness.d.ts +17 -0
  78. package/dist/coordinator-device-rejoin-link-evidence-test-harness.d.ts.map +1 -0
  79. package/dist/coordinator-device-rejoin-link-evidence.d.ts +29 -0
  80. package/dist/coordinator-device-rejoin-link-evidence.d.ts.map +1 -0
  81. package/dist/coordinator-device-rejoin-link-lineage.d.ts +7 -0
  82. package/dist/coordinator-device-rejoin-link-lineage.d.ts.map +1 -0
  83. package/dist/coordinator-device-rejoin-oidc-pins.d.ts +14 -0
  84. package/dist/coordinator-device-rejoin-oidc-pins.d.ts.map +1 -0
  85. package/dist/coordinator-device-rejoin-proof.d.ts +41 -0
  86. package/dist/coordinator-device-rejoin-proof.d.ts.map +1 -0
  87. package/dist/coordinator-device-rejoin-schema-test-harness.d.ts +8 -0
  88. package/dist/coordinator-device-rejoin-schema-test-harness.d.ts.map +1 -0
  89. package/dist/coordinator-device-rejoin-schema.d.ts +9 -0
  90. package/dist/coordinator-device-rejoin-schema.d.ts.map +1 -0
  91. package/dist/coordinator-device-rejoin-start-evidence-test-harness.d.ts +40 -0
  92. package/dist/coordinator-device-rejoin-start-evidence-test-harness.d.ts.map +1 -0
  93. package/dist/coordinator-device-rejoin-start-evidence.d.ts +25 -0
  94. package/dist/coordinator-device-rejoin-start-evidence.d.ts.map +1 -0
  95. package/dist/coordinator-device-rejoin-start-http.d.ts +12 -0
  96. package/dist/coordinator-device-rejoin-start-http.d.ts.map +1 -0
  97. package/dist/coordinator-device-rejoin-start-input.d.ts +23 -0
  98. package/dist/coordinator-device-rejoin-start-input.d.ts.map +1 -0
  99. package/dist/coordinator-device-rejoin-start-write.d.ts +38 -0
  100. package/dist/coordinator-device-rejoin-start-write.d.ts.map +1 -0
  101. package/dist/coordinator-device-rejoin-status-http.d.ts +10 -0
  102. package/dist/coordinator-device-rejoin-status-http.d.ts.map +1 -0
  103. package/dist/coordinator-device-rejoin-status-live-test-harness.d.ts +33 -0
  104. package/dist/coordinator-device-rejoin-status-live-test-harness.d.ts.map +1 -0
  105. package/dist/coordinator-device-rejoin-status-projection.d.ts +28 -0
  106. package/dist/coordinator-device-rejoin-status-projection.d.ts.map +1 -0
  107. package/dist/coordinator-device-rejoin-status-test-harness.d.ts +8 -0
  108. package/dist/coordinator-device-rejoin-status-test-harness.d.ts.map +1 -0
  109. package/dist/coordinator-device-rejoin-status.d.ts +39 -0
  110. package/dist/coordinator-device-rejoin-status.d.ts.map +1 -0
  111. package/dist/coordinator-device-removal-commands.d.ts +13 -0
  112. package/dist/coordinator-device-removal-commands.d.ts.map +1 -0
  113. package/dist/coordinator-device-removal-commit-test-harness.d.ts +3 -0
  114. package/dist/coordinator-device-removal-commit-test-harness.d.ts.map +1 -0
  115. package/dist/coordinator-device-removal-commit.d.ts +44 -0
  116. package/dist/coordinator-device-removal-commit.d.ts.map +1 -0
  117. package/dist/coordinator-device-removal-dependents-test-harness.d.ts +9 -0
  118. package/dist/coordinator-device-removal-dependents-test-harness.d.ts.map +1 -0
  119. package/dist/coordinator-device-removal-dependents.d.ts +34 -0
  120. package/dist/coordinator-device-removal-dependents.d.ts.map +1 -0
  121. package/dist/coordinator-device-removal-list-test-harness.d.ts +4 -0
  122. package/dist/coordinator-device-removal-list-test-harness.d.ts.map +1 -0
  123. package/dist/coordinator-device-removal-list.d.ts +40 -0
  124. package/dist/coordinator-device-removal-list.d.ts.map +1 -0
  125. package/dist/coordinator-device-removal-preview-test-harness.d.ts +9 -0
  126. package/dist/coordinator-device-removal-preview-test-harness.d.ts.map +1 -0
  127. package/dist/coordinator-device-removal-routes.d.ts +13 -0
  128. package/dist/coordinator-device-removal-routes.d.ts.map +1 -0
  129. package/dist/coordinator-device-removal-target.d.ts +98 -0
  130. package/dist/coordinator-device-removal-target.d.ts.map +1 -0
  131. package/dist/coordinator-device-removal-test-harness.d.ts +70 -0
  132. package/dist/coordinator-device-removal-test-harness.d.ts.map +1 -0
  133. package/dist/coordinator-device-removal-writer-test-harness.d.ts +8 -0
  134. package/dist/coordinator-device-removal-writer-test-harness.d.ts.map +1 -0
  135. package/dist/coordinator-device-removal.d.ts +233 -0
  136. package/dist/coordinator-device-removal.d.ts.map +1 -0
  137. package/dist/coordinator-device-revocation-client.d.ts +2 -0
  138. package/dist/coordinator-device-revocation-client.d.ts.map +1 -1
  139. package/dist/coordinator-device-revocation-handler-test-harness.d.ts.map +1 -1
  140. package/dist/coordinator-device-revocation-handler.d.ts +1 -1
  141. package/dist/coordinator-device-revocation-handler.d.ts.map +1 -1
  142. package/dist/coordinator-device-revocation-route.d.ts.map +1 -1
  143. package/dist/coordinator-device-revocation-test-harness.d.ts.map +1 -1
  144. package/dist/coordinator-device-revocation.d.ts +20 -2
  145. package/dist/coordinator-device-revocation.d.ts.map +1 -1
  146. package/dist/coordinator-enrollment-reconciler.d.ts.map +1 -1
  147. package/dist/coordinator-enrollment-test-fixtures.d.ts +126 -0
  148. package/dist/coordinator-enrollment-test-fixtures.d.ts.map +1 -0
  149. package/dist/coordinator-history-sql-equivalence-test-fixtures.d.ts +1 -1
  150. package/dist/coordinator-history-sql-equivalence-test-fixtures.d.ts.map +1 -1
  151. package/dist/coordinator-identity-grant-revocation-test-harness.d.ts.map +1 -1
  152. package/dist/coordinator-identity-group-grant-test-harness.d.ts.map +1 -1
  153. package/dist/coordinator-invitation-lift-test-harness.d.ts +6 -0
  154. package/dist/coordinator-invitation-lift-test-harness.d.ts.map +1 -0
  155. package/dist/coordinator-invitation-removal.d.ts +71 -0
  156. package/dist/coordinator-invitation-removal.d.ts.map +1 -0
  157. package/dist/coordinator-join-review-guards.d.ts +2 -0
  158. package/dist/coordinator-join-review-guards.d.ts.map +1 -1
  159. package/dist/coordinator-join-revocation-test-harness.d.ts.map +1 -1
  160. package/dist/coordinator-key-id-fill-api-test-harness.d.ts +12 -0
  161. package/dist/coordinator-key-id-fill-api-test-harness.d.ts.map +1 -0
  162. package/dist/coordinator-key-id-fill-api.d.ts +19 -0
  163. package/dist/coordinator-key-id-fill-api.d.ts.map +1 -0
  164. package/dist/coordinator-legacy-device-ownership.d.ts +66 -5
  165. package/dist/coordinator-legacy-device-ownership.d.ts.map +1 -1
  166. package/dist/coordinator-legacy-owner-compatibility.d.ts +3 -0
  167. package/dist/coordinator-legacy-owner-compatibility.d.ts.map +1 -1
  168. package/dist/coordinator-membership-enrollment-test-harness.d.ts +4 -0
  169. package/dist/coordinator-membership-enrollment-test-harness.d.ts.map +1 -0
  170. package/dist/coordinator-membership-enrollment.d.ts +15 -0
  171. package/dist/coordinator-membership-enrollment.d.ts.map +1 -0
  172. package/dist/coordinator-owner-enrollment-commit.d.ts +1 -1
  173. package/dist/coordinator-owner-enrollment-commit.d.ts.map +1 -1
  174. package/dist/coordinator-owner-enrollment-qualification-test-harness.d.ts.map +1 -1
  175. package/dist/coordinator-owner-enrollment-qualification.d.ts +1 -0
  176. package/dist/coordinator-owner-enrollment-qualification.d.ts.map +1 -1
  177. package/dist/coordinator-owner-resolution-review-test-fixtures.d.ts.map +1 -1
  178. package/dist/coordinator-peer-discovery-revocation-test-harness.d.ts.map +1 -1
  179. package/dist/coordinator-peer-removal-api-test-harness.d.ts +29 -0
  180. package/dist/coordinator-peer-removal-api-test-harness.d.ts.map +1 -0
  181. package/dist/coordinator-peer-removal-query-test-harness.d.ts +4 -0
  182. package/dist/coordinator-peer-removal-query-test-harness.d.ts.map +1 -0
  183. package/dist/coordinator-peer-removal-query.d.ts +32 -0
  184. package/dist/coordinator-peer-removal-query.d.ts.map +1 -0
  185. package/dist/coordinator-peer-revocation-route.d.ts +45 -0
  186. package/dist/coordinator-peer-revocation-route.d.ts.map +1 -0
  187. package/dist/coordinator-peer-revocation.d.ts +61 -0
  188. package/dist/coordinator-peer-revocation.d.ts.map +1 -0
  189. package/dist/coordinator-presence-capabilities.d.ts +10 -0
  190. package/dist/coordinator-presence-capabilities.d.ts.map +1 -0
  191. package/dist/coordinator-project-revocation-test-harness.d.ts +1 -1
  192. package/dist/coordinator-project-revocation-test-harness.d.ts.map +1 -1
  193. package/dist/coordinator-recipient-revocation-test-harness.d.ts.map +1 -1
  194. package/dist/coordinator-refresh-lifecycle.d.ts +11 -0
  195. package/dist/coordinator-refresh-lifecycle.d.ts.map +1 -0
  196. package/dist/coordinator-rejoin-discovery.d.ts +16 -0
  197. package/dist/coordinator-rejoin-discovery.d.ts.map +1 -0
  198. package/dist/coordinator-rejoin-timestamp.d.ts +3 -0
  199. package/dist/coordinator-rejoin-timestamp.d.ts.map +1 -0
  200. package/dist/coordinator-removal-notice.d.ts +21 -0
  201. package/dist/coordinator-removal-notice.d.ts.map +1 -0
  202. package/dist/coordinator-removal-progress-listing-test-harness.d.ts +3 -0
  203. package/dist/coordinator-removal-progress-listing-test-harness.d.ts.map +1 -0
  204. package/dist/coordinator-runtime-ynLTJI6d.js +1712 -0
  205. package/dist/coordinator-runtime-ynLTJI6d.js.map +1 -0
  206. package/dist/coordinator-runtime.d.ts +20 -1
  207. package/dist/coordinator-runtime.d.ts.map +1 -1
  208. package/dist/coordinator-scope-authorization-api-test-harness.d.ts.map +1 -1
  209. package/dist/coordinator-store-contract.d.ts +21 -3
  210. package/dist/coordinator-store-contract.d.ts.map +1 -1
  211. package/dist/coordinator-store-test-harness.d.ts.map +1 -1
  212. package/dist/coordinator-sync-config.d.ts +14 -0
  213. package/dist/coordinator-sync-config.d.ts.map +1 -1
  214. package/dist/d1-coordinator-runtime.d.ts +3 -1
  215. package/dist/d1-coordinator-runtime.d.ts.map +1 -1
  216. package/dist/d1-coordinator-store.d.ts +63 -3
  217. package/dist/d1-coordinator-store.d.ts.map +1 -1
  218. package/dist/database-runtime-primitives.d.ts +1 -1
  219. package/dist/db.d.ts.map +1 -1
  220. package/dist/device-identity-binding.d.ts +24 -0
  221. package/dist/device-identity-binding.d.ts.map +1 -1
  222. package/dist/device-identity-inventory.d.ts +19 -1
  223. package/dist/device-identity-inventory.d.ts.map +1 -1
  224. package/dist/device-retirement.d.ts +43 -0
  225. package/dist/device-retirement.d.ts.map +1 -0
  226. package/dist/identity-device-assignment.d.ts +8 -0
  227. package/dist/identity-device-assignment.d.ts.map +1 -1
  228. package/dist/index.d.ts +34 -8
  229. package/dist/index.d.ts.map +1 -1
  230. package/dist/index.js +11649 -10631
  231. package/dist/index.js.map +1 -1
  232. package/dist/internal/cloudflare-coordinator.js +2317 -1542
  233. package/dist/internal/cloudflare-coordinator.js.map +1 -1
  234. package/dist/internal/relay-runtime.js +28 -28
  235. package/dist/legacy-pairing-assignment-conversion.d.ts +46 -0
  236. package/dist/legacy-pairing-assignment-conversion.d.ts.map +1 -0
  237. package/dist/legacy-pairing-assignment-state.d.ts +11 -0
  238. package/dist/legacy-pairing-assignment-state.d.ts.map +1 -0
  239. package/dist/legacy-team-setup-errors.d.ts +2 -1
  240. package/dist/legacy-team-setup-errors.d.ts.map +1 -1
  241. package/dist/local-origin-claim.d.ts +48 -0
  242. package/dist/local-origin-claim.d.ts.map +1 -0
  243. package/dist/maintenance/ai-structured.d.ts +2 -0
  244. package/dist/maintenance/ai-structured.d.ts.map +1 -1
  245. package/dist/observer-config.d.ts.map +1 -1
  246. package/dist/owned-recipient-d1-test-harness.d.ts.map +1 -1
  247. package/dist/owner-enrollment-link-authority.d.ts +1 -0
  248. package/dist/owner-enrollment-link-authority.d.ts.map +1 -1
  249. package/dist/{owner-enrollment-start-BsDwgxAh.js → owner-enrollment-start-D8QzF1Ar.js} +5548 -3637
  250. package/dist/owner-enrollment-start-D8QzF1Ar.js.map +1 -0
  251. package/dist/pairing-removal.d.ts +57 -0
  252. package/dist/pairing-removal.d.ts.map +1 -0
  253. package/dist/peer-project-filter-change.d.ts +33 -0
  254. package/dist/peer-project-filter-change.d.ts.map +1 -0
  255. package/dist/peer-project-filter-management.d.ts +7 -0
  256. package/dist/peer-project-filter-management.d.ts.map +1 -0
  257. package/dist/peer-project-filter-retention.d.ts +17 -0
  258. package/dist/peer-project-filter-retention.d.ts.map +1 -0
  259. package/dist/peer-removal-check-state.d.ts +24 -0
  260. package/dist/peer-removal-check-state.d.ts.map +1 -0
  261. package/dist/peer-removal.d.ts +34 -0
  262. package/dist/peer-removal.d.ts.map +1 -0
  263. package/dist/peer-traversal-coordinator-attempt-write-test-fixtures.d.ts.map +1 -1
  264. package/dist/peer-traversal-coordinator-decision-test-fixtures.d.ts.map +1 -1
  265. package/dist/policy-team-device-eligibility.d.ts +10 -0
  266. package/dist/policy-team-device-eligibility.d.ts.map +1 -1
  267. package/dist/project-boundary-migration-hold.d.ts +50 -0
  268. package/dist/project-boundary-migration-hold.d.ts.map +1 -0
  269. package/dist/project-boundary-migration-records.d.ts +46 -0
  270. package/dist/project-boundary-migration-records.d.ts.map +1 -0
  271. package/dist/project-filters-narrowing.d.ts +11 -0
  272. package/dist/project-filters-narrowing.d.ts.map +1 -0
  273. package/dist/project-scope-resume.d.ts +26 -0
  274. package/dist/project-scope-resume.d.ts.map +1 -0
  275. package/dist/project-scope-settings.d.ts +7 -0
  276. package/dist/project-scope-settings.d.ts.map +1 -1
  277. package/dist/project-scope-withdrawal.d.ts +48 -0
  278. package/dist/project-scope-withdrawal.d.ts.map +1 -0
  279. package/dist/project-withdrawal-state.d.ts +36 -0
  280. package/dist/project-withdrawal-state.d.ts.map +1 -0
  281. package/dist/{recipient-policy-contract-Ca40IBUh.js → recipient-policy-contract-BHxfaQZ2.js} +12 -5
  282. package/dist/recipient-policy-contract-BHxfaQZ2.js.map +1 -0
  283. package/dist/recipient-policy-contract.d.ts +7 -0
  284. package/dist/recipient-policy-contract.d.ts.map +1 -1
  285. package/dist/recipient-policy-contract.js +2 -2
  286. package/dist/recipient-policy-edges.d.ts.map +1 -1
  287. package/dist/recipient-policy-intent.d.ts +1 -0
  288. package/dist/recipient-policy-intent.d.ts.map +1 -1
  289. package/dist/recipient-policy-onboarding.d.ts.map +1 -1
  290. package/dist/recipient-policy-reconciler.d.ts.map +1 -1
  291. package/dist/recipient-policy-reconciliation.d.ts.map +1 -1
  292. package/dist/recipient-policy-team-create.d.ts +22 -0
  293. package/dist/recipient-policy-team-create.d.ts.map +1 -0
  294. package/dist/{relay-health-CeyhVeuq.js → relay-health-B8BpHFaE.js} +14 -14
  295. package/dist/{relay-health-CeyhVeuq.js.map → relay-health-B8BpHFaE.js.map} +1 -1
  296. package/dist/{relay-peer-client-DmZfZebO.js → relay-peer-client-w7WdS1AP.js} +3083 -2634
  297. package/dist/relay-peer-client-w7WdS1AP.js.map +1 -0
  298. package/dist/relay-server-test-fixtures.d.ts.map +1 -1
  299. package/dist/replication-cursor-orphan-cleanup.d.ts +14 -0
  300. package/dist/replication-cursor-orphan-cleanup.d.ts.map +1 -0
  301. package/dist/retired-device-aliases.d.ts +28 -0
  302. package/dist/retired-device-aliases.d.ts.map +1 -0
  303. package/dist/same-actor-peers.d.ts +5 -1
  304. package/dist/same-actor-peers.d.ts.map +1 -1
  305. package/dist/schema-bootstrap.d.ts +1 -0
  306. package/dist/schema-bootstrap.d.ts.map +1 -1
  307. package/dist/schema.d.ts +4456 -3623
  308. package/dist/schema.d.ts.map +1 -1
  309. package/dist/{scope-membership-cache-read-B6z47l2W.js → scope-resolution-B7FK15hx.js} +2242 -1608
  310. package/dist/scope-resolution-B7FK15hx.js.map +1 -0
  311. package/dist/semantic-worker-entry.js +1 -1
  312. package/dist/{semantic-worker-job-BLaC4xRY.js → semantic-worker-job-BjujlM4-.js} +3 -3
  313. package/dist/{semantic-worker-job-BLaC4xRY.js.map → semantic-worker-job-BjujlM4-.js.map} +1 -1
  314. package/dist/{semantic-worker-ranking-5-VSzEmx.js → semantic-worker-ranking-WaUCapnY.js} +66 -60
  315. package/dist/semantic-worker-ranking-WaUCapnY.js.map +1 -0
  316. package/dist/share-provisioning.d.ts +4 -0
  317. package/dist/share-provisioning.d.ts.map +1 -1
  318. package/dist/shared-owned-device-enrollment-test-harness.d.ts.map +1 -1
  319. package/dist/shared-owned-project-invites-test-harness.d.ts.map +1 -1
  320. package/dist/shared-owned-recipient-invites-test-harness.d.ts.map +1 -1
  321. package/dist/shared-ownership-writer-lifecycle-test-harness.d.ts.map +1 -1
  322. package/dist/snapshot-cross-scope-reconcile.d.ts +25 -0
  323. package/dist/snapshot-cross-scope-reconcile.d.ts.map +1 -0
  324. package/dist/{sync-auth-constants-BVzVfSmn.js → sync-auth-constants-DNUSV-Tn.js} +4482 -2842
  325. package/dist/sync-auth-constants-DNUSV-Tn.js.map +1 -0
  326. package/dist/sync-bootstrap.d.ts +2 -0
  327. package/dist/sync-bootstrap.d.ts.map +1 -1
  328. package/dist/sync-capability.d.ts +1 -1
  329. package/dist/sync-capability.d.ts.map +1 -1
  330. package/dist/sync-channel-progress.d.ts +7 -0
  331. package/dist/sync-channel-progress.d.ts.map +1 -1
  332. package/dist/sync-daemon.d.ts +4 -1
  333. package/dist/sync-daemon.d.ts.map +1 -1
  334. package/dist/sync-pass.d.ts.map +1 -1
  335. package/dist/sync-peer-addresses.d.ts +4 -2
  336. package/dist/sync-peer-addresses.d.ts.map +1 -1
  337. package/dist/sync-reachability-pass-BpTtRqcV.js +2 -0
  338. package/dist/{sync-reachability-pass-Dhn4N2hr.js → sync-reachability-pass-DKEORTbs.js} +2638 -2591
  339. package/dist/sync-reachability-pass-DKEORTbs.js.map +1 -0
  340. package/dist/sync-replication.d.ts +21 -3
  341. package/dist/sync-replication.d.ts.map +1 -1
  342. package/dist/sync-scope-protocol.d.ts.map +1 -1
  343. package/dist/test-environment-isolation.d.ts +2 -0
  344. package/dist/test-environment-isolation.d.ts.map +1 -0
  345. package/dist/test-schema.generated.d.ts +1 -1
  346. package/dist/test-schema.generated.d.ts.map +1 -1
  347. package/dist/test-utils.d.ts +4 -0
  348. package/dist/test-utils.d.ts.map +1 -1
  349. package/dist/{validated-vector-index-audit-B64yhEBF.js → validated-vector-index-audit-BtUovYuM.js} +269 -637
  350. package/dist/validated-vector-index-audit-BtUovYuM.js.map +1 -0
  351. package/dist/viewer-device-removal-commit.d.ts +56 -0
  352. package/dist/viewer-device-removal-commit.d.ts.map +1 -0
  353. package/dist/viewer-device-removal-evidence.d.ts +17 -0
  354. package/dist/viewer-device-removal-evidence.d.ts.map +1 -0
  355. package/dist/{scope-membership-semantics-B8qXaMqx.js → workspace-identity-C7EPmSZe.js} +121 -49
  356. package/dist/workspace-identity-C7EPmSZe.js.map +1 -0
  357. package/package.json +3 -3
  358. package/dist/coordinator-runtime-CEc6KhBE.js +0 -594
  359. package/dist/coordinator-runtime-CEc6KhBE.js.map +0 -1
  360. package/dist/owner-enrollment-start-BsDwgxAh.js.map +0 -1
  361. package/dist/recipient-policy-contract-Ca40IBUh.js.map +0 -1
  362. package/dist/relay-peer-client-DmZfZebO.js.map +0 -1
  363. package/dist/scope-membership-cache-read-B6z47l2W.js.map +0 -1
  364. package/dist/scope-membership-semantics-B8qXaMqx.js.map +0 -1
  365. package/dist/semantic-worker-ranking-5-VSzEmx.js.map +0 -1
  366. package/dist/sync-auth-constants-BVzVfSmn.js.map +0 -1
  367. package/dist/sync-reachability-pass-C_-w0t6b.js +0 -2
  368. package/dist/sync-reachability-pass-Dhn4N2hr.js.map +0 -1
  369. package/dist/validated-vector-index-audit-B64yhEBF.js.map +0 -1
  370. package/dist/workspace-identity-DI8bBR0Y.js +0 -76
  371. package/dist/workspace-identity-DI8bBR0Y.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-history-sql-equivalence-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-history-sql-equivalence-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAOpE,KAAK,OAAO,GAAG;IACd,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IACnD,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;CAC1D,CAAC;AAoBF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAsBvD;AAED,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;;;IA0BpE;;;OAGG;sBACoB;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE;;;GAc/C;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,iBAAiB;UAYpC,MAAM;SAAO,MAAM;cAAY,OAAO;IA0B1D;AAuDD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,iBAAiB;;aAG3C,MAAM;;;;;;GAShD"}
1
+ {"version":3,"file":"coordinator-history-sql-equivalence-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-history-sql-equivalence-test-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAOpE,KAAK,OAAO,GAAG;IACd,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IACnD,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;CAC1D,CAAC;AAoBF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAsBvD;AAED,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;;;IA0BpE;;;OAGG;sBACoB;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE;;;GAc/C;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,iBAAiB;UAYpC,MAAM;SAAO,MAAM;cAAY,OAAO;IA0B1D;AAuDD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,iBAAiB;;;aAG3C,MAAM;;;;;GAShD"}
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-identity-grant-revocation-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-identity-grant-revocation-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,kCAAkC,CAAC;AAQ7F,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,YAAY,EAEjB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACN,kBAAkB,EAClB,KAAK,cAAc,EAEnB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAEpD,eAAO,MAAM,qBAAqB,UAIjC,CAAC;AAIF,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,uCAAW,iBAQzE;AAwBD,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,SAAS,QAItE;AAiKD,wBAAgB,cAAc,CAAC,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,sBAyCxF;AAED,wBAAgB,oCAAoC,CACnD,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,kBAAkB,QA4BxF"}
1
+ {"version":3,"file":"coordinator-identity-grant-revocation-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-identity-grant-revocation-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,kCAAkC,CAAC;AAS7F,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,YAAY,EAEjB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACN,kBAAkB,EAClB,KAAK,cAAc,EAEnB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAEpD,eAAO,MAAM,qBAAqB,UAIjC,CAAC;AAIF,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,uCAAW,iBAQzE;AA6BD,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,SAAS,QAItE;AAiKD,wBAAgB,cAAc,CAAC,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,sBAyCxF;AAED,wBAAgB,oCAAoC,CACnD,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,kBAAkB,QA4BxF"}
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-identity-group-grant-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-identity-group-grant-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,kCAAkC,CAAC;AAC7F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,uCAAuC,CAAC;AAEhG,MAAM,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,KAAK,GAAG,kCAAkC,CAAC;IAClD,MAAM,EAAE,oCAAoC,CAAC;IAC7C,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CAC5C,CAAC;AACF,eAAO,MAAM,qBAAqB,UAYjC,CAAC;AACF,wBAAgB,eAAe,CAC9B,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;GAKnE;AACD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AA6YpD,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,SAAS,QASjE"}
1
+ {"version":3,"file":"coordinator-identity-group-grant-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-identity-group-grant-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,kCAAkC,CAAC;AAC7F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAEvE,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,uCAAuC,CAAC;AAEhG,MAAM,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,KAAK,GAAG,kCAAkC,CAAC;IAClD,MAAM,EAAE,oCAAoC,CAAC;IAC7C,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CAC5C,CAAC;AACF,eAAO,MAAM,qBAAqB,UAYjC,CAAC;AACF,wBAAgB,eAAe,CAC9B,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;GAKnE;AACD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AA8YpD,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,SAAS,QASjE"}
@@ -0,0 +1,6 @@
1
+ import { type CoordinatorRequestVerifier } from "./coordinator-api.js";
2
+ import type { revocationHarness } from "./coordinator-device-revocation-test-harness.js";
3
+ export declare const LIFT_NOW = "2026-11-17T12:00:00.000Z";
4
+ export declare const liftTables: string[];
5
+ export declare function registerInvitationLiftContract(test: ReturnType<typeof revocationHarness>, verifier: CoordinatorRequestVerifier): void;
6
+ //# sourceMappingURL=coordinator-invitation-lift-test-harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-invitation-lift-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-invitation-lift-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,0BAA0B,EAAwB,MAAM,sBAAsB,CAAC;AAC7F,OAAO,KAAK,EAEX,iBAAiB,EACjB,MAAM,iDAAiD,CAAC;AAMzD,eAAO,MAAM,QAAQ,6BAA6B,CAAC;AACnD,eAAO,MAAM,UAAU,UAYtB,CAAC;AAyNF,wBAAgB,8BAA8B,CAC7C,IAAI,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,EAC1C,QAAQ,EAAE,0BAA0B,QA2CpC"}
@@ -0,0 +1,71 @@
1
+ import type { AuthLinkStatement } from "./coordinator-auth-link.js";
2
+ interface RemovalSubject {
3
+ deviceId: string;
4
+ keyId: string | null;
5
+ publicKey: string;
6
+ }
7
+ type InviteRemovalSubject = RemovalSubject & {
8
+ inviteId: string;
9
+ };
10
+ export declare function invitationRemovalFence(ready: boolean, subject: InviteRemovalSubject): {
11
+ ordered: {
12
+ sql: string;
13
+ values: string[];
14
+ };
15
+ eligible: {
16
+ sql: string;
17
+ values: string[];
18
+ };
19
+ read: {
20
+ sql: string;
21
+ values: string[];
22
+ };
23
+ denial: {
24
+ sql: string;
25
+ values: string[];
26
+ };
27
+ } | null;
28
+ export declare function joinRequestRemovalFence(ready: boolean, subject: RemovalSubject & {
29
+ requestId: string;
30
+ }, tokenDigest: string): {
31
+ ordered: {
32
+ sql: string;
33
+ values: string[];
34
+ };
35
+ eligible: {
36
+ sql: string;
37
+ values: string[];
38
+ };
39
+ read: {
40
+ sql: string;
41
+ values: string[];
42
+ };
43
+ denial: {
44
+ sql: string;
45
+ values: string[];
46
+ };
47
+ } | null;
48
+ export type InvitationRemovalState = {
49
+ ordering: string;
50
+ active: number;
51
+ };
52
+ export type InvitationRemovalFence = ReturnType<typeof invitationRemovalFence>;
53
+ export declare function withInvitationRemovalGuard<T extends {
54
+ eligibilitySql: string;
55
+ eligibilityValues: unknown[];
56
+ boundEligibilitySql: string;
57
+ boundEligibilityValues: unknown[];
58
+ }>(guard: T, fence: InvitationRemovalFence): T;
59
+ export declare function joinRequestCreationDenial(fence: NonNullable<ReturnType<typeof invitationRemovalFence>>, subject: Pick<RemovalSubject, "deviceId" | "keyId">): {
60
+ sql: string;
61
+ values: (string | null)[];
62
+ };
63
+ export declare function invitationRemovalNeedsLift(state: InvitationRemovalState | null | undefined, options: {
64
+ consumed: boolean;
65
+ proofVerified?: boolean;
66
+ }): boolean;
67
+ /** Run only inside fresh acceptance, with the existing authority predicates. */
68
+ export declare function liftInvitationRemovals(subject: InviteRemovalSubject, now: string, eligibility: AuthLinkStatement): AuthLinkStatement;
69
+ export declare function invitationLiftStatements(subject: InviteRemovalSubject, now: string, eligibility: AuthLinkStatement, fence: NonNullable<InvitationRemovalFence>): AuthLinkStatement[];
70
+ export {};
71
+ //# sourceMappingURL=coordinator-invitation-removal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-invitation-removal.d.ts","sourceRoot":"","sources":["../src/coordinator-invitation-removal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,UAAU,cAAc;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,oBAAoB,GAAG,cAAc,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAmBlE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB;;;;;;;;;;;;;;;;;SAMnF;AAED,wBAAgB,uBAAuB,CACtC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,cAAc,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,EAC/C,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;SAWnB;AAuCD,MAAM,MAAM,sBAAsB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAC1E,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE/E,wBAAgB,0BAA0B,CACzC,CAAC,SAAS;IACT,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,OAAO,EAAE,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,OAAO,EAAE,CAAC;CAClC,EACA,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,sBAAsB,GAAG,CAAC,CAS5C;AAED,wBAAgB,yBAAyB,CACxC,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,EAC7D,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,CAAC;IAGlD,GAAG;IAEH,MAAM;EAEP;AAED,wBAAgB,0BAA0B,CACzC,KAAK,EAAE,sBAAsB,GAAG,IAAI,GAAG,SAAS,EAChD,OAAO,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,GACrD,OAAO,CAQT;AAED,gFAAgF;AAChF,wBAAgB,sBAAsB,CACrC,OAAO,EAAE,oBAAoB,EAC7B,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,iBAAiB,GAC5B,iBAAiB,CAkBnB;AAED,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,oBAAoB,EAC7B,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,iBAAiB,EAC9B,KAAK,EAAE,WAAW,CAAC,sBAAsB,CAAC,GACxC,iBAAiB,EAAE,CASrB"}
@@ -8,6 +8,8 @@ export declare function joinReviewGuardEvidence(row: CoordinatorJoinRequest & {
8
8
  seed: string | null;
9
9
  current: string | null;
10
10
  }, currentPublicKey: string | null): {
11
+ /** The request replaces the enrolled key text and keeps the stored key ID value. */
12
+ changesKeyTextOnly: boolean;
11
13
  revocationSql: string;
12
14
  revocationValues: (string | null)[];
13
15
  ownershipSql: string;
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-join-review-guards.d.ts","sourceRoot":"","sources":["../src/coordinator-join-review-guards.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACX,qBAAqB,EACrB,sBAAsB,EACtB,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,mBAAmB,kIACmC,CAAC;AAEpE,qFAAqF;AACrF,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,sBAAsB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,EACpD,IAAI,EAAE,qBAAqB,GAAG,IAAI,EAClC,IAAI,EAAE;IAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAC/E,gBAAgB,EAAE,MAAM,GAAG,IAAI;;;;;;;;;EAmD/B;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAc/D;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAYlE"}
1
+ {"version":3,"file":"coordinator-join-review-guards.d.ts","sourceRoot":"","sources":["../src/coordinator-join-review-guards.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACX,qBAAqB,EACrB,sBAAsB,EACtB,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,mBAAmB,kIACmC,CAAC;AAEpE,qFAAqF;AACrF,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,sBAAsB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,EACpD,IAAI,EAAE,qBAAqB,GAAG,IAAI,EAClC,IAAI,EAAE;IAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAC/E,gBAAgB,EAAE,MAAM,GAAG,IAAI;IAiC9B,oFAAoF;;;;;;;;;;EAyBrF;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAc/D;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAYlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-join-revocation-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-join-revocation-test-harness.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,KAAK,EACX,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,iDAAiD,CAAC;AAGzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AAIzF,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACrD,eAAO,MAAM,QAAQ,6BAA6B,CAAC;AACnD,eAAO,MAAM,UAAU,UAKtB,CAAC;AACF,wBAAgB,YAAY,CAAC,CAAC,EAAE,iBAAiB,wBAEhD;AACD,wBAAsB,WAAW,CAAC,CAAC,EAAE,iBAAiB,EAAE,SAAS,SAAoB;;;;;;;;;;GA2BpF;AAaD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,QAAQ,QAOxD;AAkWD,wBAAgB,uBAAuB,CACtC,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,kBAAkB,KAAK,KAAK,QAMlE"}
1
+ {"version":3,"file":"coordinator-join-revocation-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-join-revocation-test-harness.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,KAAK,EACX,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,iDAAiD,CAAC;AAOzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AAIzF,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACrD,eAAO,MAAM,QAAQ,6BAA6B,CAAC;AACnD,eAAO,MAAM,UAAU,UAKtB,CAAC;AACF,wBAAgB,YAAY,CAAC,CAAC,EAAE,iBAAiB,wBAEhD;AACD,wBAAsB,WAAW,CAAC,CAAC,EAAE,iBAAiB,EAAE,SAAS,SAAoB;;;;;;;;;;GA2BpF;AAcD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,QAAQ,QAOxD;AAkWD,wBAAgB,uBAAuB,CACtC,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,kBAAkB,KAAK,KAAK,QAMlE"}
@@ -0,0 +1,12 @@
1
+ import type { Store } from "./coordinator-auth-store-test-fixtures.js";
2
+ export interface KeyIdFillApiFixture {
3
+ store: Store;
4
+ exec(sql: string): Promise<void>;
5
+ }
6
+ export declare function keyIdFillApiHarness(fixture: (use: (value: KeyIdFillApiFixture) => Promise<void>) => Promise<void>): import("vitest").TestAPI<{
7
+ fixture: KeyIdFillApiFixture;
8
+ }>;
9
+ type FillTest = ReturnType<typeof keyIdFillApiHarness>;
10
+ export declare function registerKeyIdFillApiContract(test: FillTest): void;
11
+ export {};
12
+ //# sourceMappingURL=coordinator-key-id-fill-api-test-harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-key-id-fill-api-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-key-id-fill-api-test-harness.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAEvE,MAAM,WAAW,mBAAmB;IACnC,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC;AAKD,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;GAK9E;AAED,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AA0BvD,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,QAAQ,QAI1D"}
@@ -0,0 +1,19 @@
1
+ import type { Context, Hono } from "hono";
2
+ import type { DeviceAuthLinkDeps } from "./coordinator-device-auth-link.js";
3
+ import type { CoordinatorFillEnrollmentKeyIdsOptions } from "./coordinator-device-removal.js";
4
+ import type { CoordinatorStore } from "./coordinator-store-contract.js";
5
+ interface KeyIdFillRouteDeps extends Pick<DeviceAuthLinkDeps, "readRequestBytes" | "parseJsonObject" | "rateLimitedResponse"> {
6
+ storeFactory(): CoordinatorStore;
7
+ authorizeAdmin(secret: string | undefined): {
8
+ ok: true;
9
+ } | {
10
+ ok: false;
11
+ error: string;
12
+ };
13
+ }
14
+ export declare function registerCoordinatorKeyIdFillRoute(app: Hono, deps: KeyIdFillRouteDeps): void;
15
+ export declare function parseKeyIdFillOptions(data: Record<string, unknown>): CoordinatorFillEnrollmentKeyIdsOptions | null;
16
+ /** One page per request keeps the upgrade within D1's per-request query budget. */
17
+ export declare function fillAdminEnrollmentKeyIds(c: Context, store: CoordinatorStore, options: CoordinatorFillEnrollmentKeyIdsOptions): Promise<Response>;
18
+ export {};
19
+ //# sourceMappingURL=coordinator-key-id-fill-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-key-id-fill-api.d.ts","sourceRoot":"","sources":["../src/coordinator-key-id-fill-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,UAAU,kBACT,SAAQ,IAAI,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,qBAAqB,CAAC;IAChG,YAAY,IAAI,gBAAgB,CAAC;IACjC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACxF;AAED,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAkB3F;AAED,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,sCAAsC,GAAG,IAAI,CAW/C;AAED,mFAAmF;AACnF,wBAAsB,yBAAyB,CAC9C,CAAC,EAAE,OAAO,EACV,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,sCAAsC,GAC7C,OAAO,CAAC,QAAQ,CAAC,CAWnB"}
@@ -17,18 +17,79 @@ export declare function legacyProjectInviteOwnershipEvidence(evidence: ReturnTyp
17
17
  boundEligibilitySql: string;
18
18
  boundEligibilityValues: (string | number | null | undefined)[];
19
19
  };
20
- export declare const LEGACY_DEVICE_DENIAL_SQL = "SELECT CASE\nWHEN EXISTS (\nSELECT 1 FROM coordinator_device_revocations WHERE\n(subject_kind = 'device_id' AND subject_value = ?) OR\n(subject_kind = 'ed25519_key' AND subject_value = ?)) THEN 'device_revoked'\nWHEN EXISTS (\nSELECT 1 FROM coordinator_device_ownership_bindings WHERE device_id = ? OR key_id = ?) THEN 'device_ownership_requires_verified_identity'\nELSE 'invite_identity_conflict' END AS denial";
21
20
  /** Bind captured public key (null for absence), group/device, then group/device/public key. */
22
21
  export declare const LEGACY_ENROLLMENT_SOURCE_MATCH_SQL = "((? IS NULL AND NOT EXISTS (\nSELECT 1 FROM enrolled_devices WHERE group_id = ? AND device_id = ?)) OR EXISTS (\nSELECT 1 FROM enrolled_devices WHERE group_id = ? AND device_id = ? AND public_key = ?))";
23
- /** Incoming revocation, incoming ownership, captured current ownership, then source tuple.
24
- * Source drift deliberately falls through the denial validator to the unavailable error.
22
+ /**
23
+ * True when a write replaces the stored key text and the stored `key_id` value
24
+ * stays the same: another text form of one canonical key, or one opaque key in
25
+ * place of another. The stale-key trigger refuses a key text change whose key ID
26
+ * it cannot see change, so such a write first resets the key ID to the empty
27
+ * string and then writes the new text with the recomputed ID.
25
28
  */
26
- export declare const LEGACY_ENROLLMENT_DENIAL_SQL = "SELECT CASE\nWHEN EXISTS (\nSELECT 1 FROM coordinator_device_revocations WHERE\n(subject_kind = 'device_id' AND subject_value = ?) OR\n(subject_kind = 'ed25519_key' AND subject_value = ?)) THEN 'device_revoked'\nWHEN EXISTS (\nSELECT 1 FROM coordinator_device_ownership_bindings WHERE device_id = ? OR key_id = ?) OR EXISTS (\nSELECT 1 FROM coordinator_device_ownership_bindings WHERE device_id = ? OR key_id = ?)\nTHEN 'device_ownership_requires_verified_identity'\nWHEN NOT ((? IS NULL AND NOT EXISTS (\nSELECT 1 FROM enrolled_devices WHERE group_id = ? AND device_id = ?)) OR EXISTS (\nSELECT 1 FROM enrolled_devices WHERE group_id = ? AND device_id = ? AND public_key = ?)) THEN 'device_ownership_authorization_unavailable'\nELSE 'invite_identity_conflict' END AS denial";
27
- export declare const LEGACY_ENROLLMENT_WRITE_SQL = "INSERT INTO enrolled_devices(\ngroup_id, device_id, public_key, fingerprint, identity_id, display_name, enabled, created_at\n) SELECT ?, ?, ?, ?, ?, ?, 1, ?\nWHERE NOT EXISTS (\nSELECT 1 FROM coordinator_device_revocations WHERE\n(subject_kind = 'device_id' AND subject_value = ?) OR\n(subject_kind = 'ed25519_key' AND subject_value = ?))\nAND NOT EXISTS (\nSELECT 1 FROM coordinator_device_ownership_bindings WHERE device_id = ? OR key_id = ?)\nAND NOT EXISTS (\nSELECT 1 FROM coordinator_device_ownership_bindings WHERE device_id = ? OR key_id = ?)\nAND ((? IS NULL AND NOT EXISTS (\nSELECT 1 FROM enrolled_devices WHERE group_id = ? AND device_id = ?)) OR EXISTS (\nSELECT 1 FROM enrolled_devices WHERE group_id = ? AND device_id = ? AND public_key = ?))\nON CONFLICT(group_id, device_id) DO UPDATE SET\npublic_key = excluded.public_key, fingerprint = excluded.fingerprint,\nidentity_id = COALESCE(enrolled_devices.identity_id, excluded.identity_id),\ndisplay_name = excluded.display_name, enabled = 1\nWHERE (excluded.identity_id IS NULL OR enrolled_devices.identity_id IS NULL\nOR enrolled_devices.identity_id = excluded.identity_id)\nAND NOT EXISTS (\nSELECT 1 FROM coordinator_device_ownership_bindings WHERE device_id = ? OR key_id = ?)\nAND NOT EXISTS (\nSELECT 1 FROM coordinator_device_ownership_bindings WHERE device_id = ? OR key_id = ?)\nAND enrolled_devices.public_key = ?";
29
+ export declare function changesKeyTextOnly(key: {
30
+ publicKey: string;
31
+ keyId: string | null;
32
+ currentPublicKey: string | null;
33
+ currentKeyId: string | null;
34
+ }): boolean;
35
+ export interface LegacyEnrollmentWrite {
36
+ groupId: string;
37
+ deviceId: string;
38
+ publicKey: string;
39
+ fingerprint: string;
40
+ identityId: string | null;
41
+ displayName: string | null;
42
+ createdAt: string;
43
+ /** Canonical key ID of the incoming key, or null for a key that is not SSH Ed25519. */
44
+ keyId: string | null;
45
+ /** Public key of the enrollment read before this write, or null when none existed. */
46
+ currentPublicKey: string | null;
47
+ currentKeyId: string | null;
48
+ /** False on a schema without the `key_id` column, where the key ID is not stored. */
49
+ storeKeyId: boolean;
50
+ /** Direct enrollment only. Invitation writers keep their current checks until their own slices. */
51
+ checkRemoval: boolean;
52
+ inviteId?: string;
53
+ }
54
+ export interface LegacyEnrollmentStatement {
55
+ sql: string;
56
+ values: (string | null)[];
57
+ /** A read that raises on an incomplete write. It changes no row and has no count. */
58
+ assertion?: true;
59
+ }
60
+ export declare function legacyEnrollmentDenialStatement(input: LegacyEnrollmentWrite): LegacyEnrollmentStatement;
61
+ /**
62
+ * The enrollment write: an INSERT when no enrollment was captured, an UPDATE
63
+ * when one was, and two UPDATEs followed by a completion assertion for a key
64
+ * text change that keeps the key ID value (see changesKeyTextOnly). The
65
+ * enrollment triggers abort an insert over an existing row, so this table takes
66
+ * no ON CONFLICT clause. Every statement pins the captured source, and a source
67
+ * that moved leaves it without effect. The caller runs the statements in order
68
+ * in one transaction or atomic batch and reads the outcome of the writes with
69
+ * legacyEnrollmentWritten.
70
+ */
71
+ export declare function legacyEnrollmentWriteStatements(input: LegacyEnrollmentWrite): LegacyEnrollmentStatement[];
72
+ type LegacyEnableInput = {
73
+ groupId: string;
74
+ deviceId: string;
75
+ publicKey: string | null;
76
+ keyId: string | null;
77
+ storeKeyId: boolean;
78
+ };
79
+ export declare function legacyEnableWriteStatement(input: LegacyEnableInput): LegacyEnrollmentStatement;
80
+ export declare function legacyEnableDenialStatement(input: LegacyEnableInput): LegacyEnrollmentStatement;
81
+ export declare function legacyEnableDenied(row: unknown): false;
82
+ /**
83
+ * True when every write changed its row, false when none did. Anything else is
84
+ * not a result this writer can produce. The completion assertion has already
85
+ * rolled back a reset that its rewrite did not follow.
86
+ */
87
+ export declare function legacyEnrollmentWritten(changes: readonly number[]): boolean;
28
88
  export declare function captureLegacyEnrollmentPublicKey(row: unknown): string | null;
29
89
  export declare function captureLegacyEnrollment(groupId: string, input: CoordinatorEnrollDeviceInput): CoordinatorEnrollDeviceInput;
30
90
  export declare function assertLegacyDeviceScope(groupId: unknown, deviceId: unknown): void;
31
91
  export declare function legacyDeviceWriteChanges(result: unknown): number;
32
92
  export declare function legacyDeviceDenial(row: unknown): string;
33
93
  export declare function legacyDeviceAuthorizationFailure(error: unknown): never;
94
+ export {};
34
95
  //# sourceMappingURL=coordinator-legacy-device-ownership.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-legacy-device-ownership.d.ts","sourceRoot":"","sources":["../src/coordinator-legacy-device-ownership.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,KAAK,EACX,oCAAoC,EACpC,4BAA4B,EAC5B,MAAM,iCAAiC,CAAC;AAEzC,wBAAgB,+BAA+B,CAC9C,KAAK,EAAE,oCAAoC,GACzC,oCAAoC,CAqBtC;AAED,kGAAkG;AAClG,eAAO,MAAM,mCAAmC,qGACuC,CAAC;AAExF,yFAAyF;AACzF,wBAAgB,oCAAoC,CACnD,QAAQ,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,EACvD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE;IAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;;;;;;;;;EAa3D;AAED,eAAO,MAAM,wBAAwB,gaAGS,CAAC;AAE/C,+FAA+F;AAC/F,eAAO,MAAM,kCAAkC,8MAE0C,CAAC;AAE1F;;GAEG;AACH,eAAO,MAAM,4BAA4B,2wBAKK,CAAC;AAE/C,eAAO,MAAM,2BAA2B,g3CAeJ,CAAC;AAErC,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAS5E;AAED,wBAAgB,uBAAuB,CACtC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,4BAA4B,GACjC,4BAA4B,CAiB9B;AAUD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAEjF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAiBhE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAgBvD;AAED,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAWtE"}
1
+ {"version":3,"file":"coordinator-legacy-device-ownership.d.ts","sourceRoot":"","sources":["../src/coordinator-legacy-device-ownership.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,KAAK,EACX,oCAAoC,EACpC,4BAA4B,EAC5B,MAAM,iCAAiC,CAAC;AAEzC,wBAAgB,+BAA+B,CAC9C,KAAK,EAAE,oCAAoC,GACzC,oCAAoC,CAyBtC;AAED,kGAAkG;AAClG,eAAO,MAAM,mCAAmC,qGACuC,CAAC;AAExF,yFAAyF;AACzF,wBAAgB,oCAAoC,CACnD,QAAQ,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,EACvD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE;IAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;;;;;;;;;EAa3D;AAED,+FAA+F;AAC/F,eAAO,MAAM,kCAAkC,8MAE0C,CAAC;AA4D1F;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,GAAG,OAAO,CAGV;AAED,MAAM,WAAW,qBAAqB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SA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AG,IAAI,CAS5E;AAED,wBAAgB,uBAAuB,CACtC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,4BAA4B,GACjC,4BAA4B,CAiB9B;AAUD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAEjF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAiBhE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAkBvD;AAED,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAatE"}
@@ -18,6 +18,9 @@ export declare function legacyOwnerKeyMetadata(rows: readonly {
18
18
  * owner checks reuse them instead of repeatedly expanding their JSON inputs.
19
19
  * Join requested enrollments directly by group/device; a left-joined enrollment
20
20
  * CTE can materialize all groups sharing a key even with NOT MATERIALIZED.
21
+ * The enrollment CTE names its columns: `e.*` would add the stored
22
+ * `enrolled_devices.key_id`, which is null until filled, ahead of the key ID
23
+ * derived for this statement, and every `key_id` reference would read the stored one.
21
24
  */
22
25
  export declare const LEGACY_OWNER_INPUT_SQL: string;
23
26
  export declare const LEGACY_OWNER_SOURCE_CURRENT_SQL = "(NOT EXISTS (SELECT 1 FROM legacy_owner_requested)\n OR (NOT EXISTS (\n SELECT public_key FROM legacy_owner_source_keys EXCEPT SELECT public_key FROM legacy_owner_keys\n) AND NOT EXISTS (SELECT 1 FROM legacy_owner_requested WHERE key_id IS NULL)))";
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-legacy-owner-compatibility.d.ts","sourceRoot":"","sources":["../src/coordinator-legacy-owner-compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,OAAO,EAIN,KAAK,0CAA0C,EAG/C,MAAM,yCAAyC,CAAC;AAKjD,iFAAiF;AACjF,wBAAgB,2BAA2B,CAC1C,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,0CAA0C,CAAC,QAAQ,CAAC,GAC1D,0CAA0C,CAM5C;AA4BD,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,QAMS,CAAC;AAE5C;;;GAGG;AACH,wBAAsB,sBAAsB,CAC3C,IAAI,EAAE,SAAS;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,EAAE,GACrC,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,QAqBjC,CAAC;AAGH,eAAO,MAAM,+BAA+B,4PAGmC,CAAC;AAEhF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,QAqBtC,CAAC;AAEH,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB,QAGkB,CAAC;AAEvD;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE;IACtD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;KAC5C,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3E,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;CAClB,GAAG,iBAAiB,CA4DpB"}
1
+ {"version":3,"file":"coordinator-legacy-owner-compatibility.d.ts","sourceRoot":"","sources":["../src/coordinator-legacy-owner-compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,OAAO,EA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ment and the scope's group must still authorize the writing statement. */
3
+ export declare function registerMembershipEnrollmentContract(test: RemovalTest): void;
4
+ //# sourceMappingURL=coordinator-membership-enrollment-test-harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-membership-enrollment-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-membership-enrollment-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,EAGN,KAAK,WAAW,EAEhB,MAAM,8CAA8C,CAAC;AAEtD,wFAAwF;AACxF,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,WAAW,QAMrE"}
@@ -0,0 +1,15 @@
1
+ import type { normalizeCoordinatorGrantScopeMembershipInput } from "./coordinator-store-input-rules.js";
2
+ /**
3
+ * Both insert and conflict-update branches own the same live-enrollment check.
4
+ * The update repeats it so a BEFORE INSERT trigger cannot change that authority
5
+ * between source selection and conflict resolution. Effects remain conditional
6
+ * on this statement changing a row, as in the existing grant operation.
7
+ */
8
+ export declare function membershipGrantStatement(input: ReturnType<typeof normalizeCoordinatorGrantScopeMembershipInput>, operation: {
9
+ effectId: string;
10
+ now: string;
11
+ }): {
12
+ sql: string;
13
+ values: (string | number | null)[];
14
+ };
15
+ //# sourceMappingURL=coordinator-membership-enrollment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-membership-enrollment.d.ts","sourceRoot":"","sources":["../src/coordinator-membership-enrollment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6CAA6C,EAAE,MAAM,oCAAoC,CAAC;AAaxG;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACvC,KAAK,EAAE,UAAU,CAAC,OAAO,6CAA6C,CAAC,EACvE,SAAS,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE;IAI3C,GAAG;IAeH,MAAM;EAgBP"}
@@ -5,7 +5,7 @@ export { type OwnerAttempt, verifyOwnerEnrollmentSignature, } from "./coordinato
5
5
  export declare const COORDINATOR_OWNER_ENROLLMENT_AUDIT_SCHEMA_SQL = "\nCREATE TABLE IF NOT EXISTS coordinator_owner_enrollment_audit_log (\n coordinator_id TEXT NOT NULL, event_id TEXT NOT NULL, attempt_id TEXT NOT NULL,\n action TEXT NOT NULL CHECK (action = 'owner_device_enrolled'),\n binding_id TEXT NOT NULL, device_id TEXT NOT NULL, created_at_ms INTEGER NOT NULL,\n PRIMARY KEY (coordinator_id, event_id), UNIQUE (coordinator_id, attempt_id)\n);";
6
6
  /** Historical link provenance is equality only: never consult the old controller/device. */
7
7
  export declare const OWNER_ACTIVE_LINK_SQL = "EXISTS (SELECT 1 FROM coordinator_auth_account_links l\n WHERE l.coordinator_id = a.coordinator_id AND l.link_id = a.link_id\n AND l.authority_kind = 'controller_attestation' AND l.controller_attestation_id IS NOT NULL AND l.device_claim_id IS NULL\n AND l.issuer = a.issuer AND l.subject = a.account_subject AND l.identity_id = a.identity_id\n AND l.attempt_id = a.link_attempt_id AND l.controller_attestation_id = a.link_controller_attestation_id\n AND l.auth_config_revision = a.link_auth_config_revision AND l.revoked_at_ms IS NULL)";
8
- export declare function ownerExcludedLegacyDecisionSql(groupExpression: "r.group_id" | "json_extract(p.value,'$.groupId')"): string;
8
+ export declare function ownerExcludedLegacyDecisionSql(groupExpression: "r.group_id" | "json_extract(p.value,'$.groupId')" | "t.group_id"): string;
9
9
  interface OwnerEnrollmentCommitInput {
10
10
  backend: AuthLinkBackend;
11
11
  row: OwnerAttempt;
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-owner-enrollment-commit.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-commit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAOrF,OAAO,EACN,KAAK,qBAAqB,IAAI,YAAY,EAI1C,MAAM,yCAAyC,CAAC;AAKjD,OAAO,EACN,KAAK,YAAY,EACjB,8BAA8B,GAC9B,MAAM,yCAAyC,CAAC;AAEjD,oEAAoE;AACpE,eAAO,MAAM,6CAA6C,oYAMvD,CAAC;AAEJ,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB,6hBAKqD,CAAC;AAGxF,wBAAgB,8BAA8B,CAC7C,eAAe,EAAE,YAAY,GAAG,mCAAmC,GACjE,MAAM,CAOR;AAwDD,UAAU,0BAA0B;IACnC,OAAO,EAAE,eAAe,CAAC;IACzB,GAAG,EAAE,YAAY,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,OAAO,CAAC,CAyD/F;AAmOD,4GAA4G;AAC5G,wBAAsB,0BAA0B,CAC/C,OAAO,EAAE,eAAe,EACxB,GAAG,EAAE,YAAY,GACf,OAAO,CAAC,OAAO,CAAC,CAelB"}
1
+ {"version":3,"file":"coordinator-owner-enrollment-commit.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-commit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAarF,OAAO,EACN,KAAK,qBAAqB,IAAI,YAAY,EAI1C,MAAM,yCAAyC,CAAC;AAKjD,OAAO,EACN,KAAK,YAAY,EACjB,8BAA8B,GAC9B,MAAM,yCAAyC,CAAC;AAEjD,oEAAoE;AACpE,eAAO,MAAM,6CAA6C,oYAMvD,CAAC;AAEJ,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB,6hBAKqD,CAAC;AAGxF,wBAAgB,8BAA8B,CAC7C,eAAe,EAAE,YAAY,GAAG,mCAAmC,GAAG,YAAY,GAChF,MAAM,CAOR;AAwDD,UAAU,0BAA0B;IACnC,OAAO,EAAE,eAAe,CAAC;IACzB,GAAG,EAAE,YAAY,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,OAAO,CAAC,CA2D/F;AA4OD,4GAA4G;AAC5G,wBAAsB,0BAA0B,CAC/C,OAAO,EAAE,eAAe,EACxB,GAAG,EAAE,YAAY,GACf,OAAO,CAAC,OAAO,CAAC,CAelB"}
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-owner-enrollment-qualification-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-qualification-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AAG1F,eAAO,MAAM,mBAAmB,gDAAgD,CAAC;AACjF,eAAO,MAAM,wBAAwB,kJAA6H,CAAC;AAEnK,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;CAsB4B,CAAC;AACvD,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAGpC,wBAAgB,mBAAmB,CAClC,CAAC,EAAE,aAAa,EAChB,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAiB,EAC1C,EAAE,IAAe,EAAE,MAAW,EAAE,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,iBAOzE;AACD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,aAAa,sCAEjD;AAaD,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;GAKpE;AACD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAMpD,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,IAAI,QAiC1D"}
1
+ {"version":3,"file":"coordinator-owner-enrollment-qualification-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-qualification-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AAI1F,eAAO,MAAM,mBAAmB,gDAAgD,CAAC;AACjF,eAAO,MAAM,wBAAwB,kJAA6H,CAAC;AAEnK,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;CAsB4B,CAAC;AACvD,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAGpC,wBAAgB,mBAAmB,CAClC,CAAC,EAAE,aAAa,EAChB,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAiB,EAC1C,EAAE,IAAe,EAAE,MAAW,EAAE,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,iBAOzE;AACD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,aAAa,sCAEjD;AAaD,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;GAKpE;AACD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAMpD,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,IAAI,QAiC1D"}
@@ -21,6 +21,7 @@ export interface OwnerQualificationPreview {
21
21
  deviceId: string;
22
22
  fingerprint: string;
23
23
  }
24
+ export declare const QUALIFICATION_READY: string;
24
25
  export declare class OwnerEnrollmentQualificationOps {
25
26
  private readonly backend;
26
27
  private readonly clock;
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-owner-enrollment-qualification.d.ts","source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K,KAAK,CAAC,KAAK,EAAE;QAClB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;KACvB,GAAG,OAAO,CACR;QAAE,IAAI,EAAE,SAAS,GAAG,UAAU,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,GACzD,0BAA0B,GAC1B,gCAAgC,CAClC,CA6BA;IACD,OAAO,CAAC,QAAQ;IAMhB,kGAAkG;IAC5F,MAAM,CAAC,KAAK,EAAE;QACnB,eAAe,EAAE,MAAM,CAAC;QACxB,MAAM,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CACR;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,GAC5C,0BAA0B,GAC1B,gCAAgC,CAClC,CA4BA;IACD,OAAO,CAAC,OAAO;YASD,KAAK;CAoBnB"}
1
+ {"version":3,"file":"coordinator-owner-enrollment-qualification.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-qualification.ts"],"names":[],"mappings":"AAIA,OAAO,EACN,KAAK,eAAe,EAGpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAUrF,gGAAgG;AAChG,MAAM,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,eAAe,GAAG,aAAa,GAAG,iBAAiB,GAAG,wBAAwB,CAAC;CACtF,CAAC;AACF,+EAA+E;AAC/E,MAAM,MAAM,gCAAgC,GAAG;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAC3E,MAAM,WAAW,yBAAyB;IACzC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,M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ot":"","sources":["../src/coordinator-owner-resolution-review-test-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,KAAK,WAAW,EAAO,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,2CAA2C,CAAC;AAIjF,OAAO,EAMN,MAAM,EACN,MAAM,+DAA+D,CAAC;AAEvE,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,eAAO,MAAM,SAAS;IACrB,OAAO;IACP,QAAQ;IACR,UAAU;IACV,WAAW;CACX,CAAC;AACF,eAAO,MAAM,KAAK,0CAA0C,CAAC;AAC7D,wBAAgB,wBAAwB,SASvC;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,UAAO;;;;;;;;;;;;;;;;;;;;;;;;;;YAOvE,CAAC,mBAAmB,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;;GAK/D;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,SAAqB,QAYtE;AAED,wBAAsB,YAAY,CACjC,CAAC,EAAE,WAAW,EACd,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,EAC1C,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;GAW1C;AAED,wBAAsB,YAAY,CAAC,CAAC,EAAE,WAAW;;;;;GAOhD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,QAM3C;AAED,wBAAsB,cAAc,CAAC,CAAC,EAAE,WAAW,mBAgClD;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,WAAW,QAqD7C"}
1
+ {"version":3,"file":"coordinator-owner-resolution-review-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-resolution-review-test-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,KAAK,WAAW,EAAO,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,2CAA2C,CAAC;AAKjF,OAAO,EAMN,MAAM,EACN,MAAM,+DAA+D,CAAC;AAEvE,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,eAAO,MAAM,SAAS;IACrB,OAAO;IACP,QAAQ;IACR,UAAU;IACV,WAAW;CACX,CAAC;AACF,eAAO,MAAM,KAAK,0CAA0C,CAAC;AAC7D,wBAAgB,wBAAwB,SASvC;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,UAAO;;;;;;;;;;;;;;;;;;;;;;;;;;YAOvE,CAAC,mBAAmB,iBAAiB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;;GAK/D;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,SAAqB,QAYtE;AAED,wBAAsB,YAAY,CACjC,CAAC,EAAE,WAAW,EACd,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,EAC1C,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;GAW1C;AAED,wBAAsB,YAAY,CAAC,CAAC,EAAE,WAAW;;;;;GAOhD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,QAM3C;AAED,wBAAsB,cAAc,CAAC,CAAC,EAAE,WAAW,mBA8BlD;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,WAAW,QAqD7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-peer-discovery-revocation-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-peer-discovery-revocation-test-harness.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACX,eAAe,EACf,YAAY,EACZ,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/C,eAAO,MAAM,mBAAmB,UAQ/B,CAAC;AACF,eAAO,MAAM,MAAM,MAAO,YAAY,QAAQ,MAAM,WAAmC,CAAC;AACxF,wBAAsB,SAAS,CAAC,CAAC,EAAE,YAAY,iBAS9C;AA4CD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,QAMvD;AA2KD,wBAAgB,aAAa,CAC5B,EAAE,EAAE,cAAc,EAClB,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACzB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,GACnC,cAAc,CA8BhB;AAkDD,wBAAgB,0BAA0B,CACzC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,CACR,CAAC,EAAE,YAAY,EACf,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KACrB;IAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,EAC1D,KAAK,EAAE,MAAM,QA2Db;AACD,wBAAgB,6BAA6B,CAC5C,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,cAAc,QAyB7C;AACD,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;IAU1D,KAAK;IAAW,OAAO;EAChC"}
1
+ {"version":3,"file":"coordinator-peer-discovery-revocation-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-peer-discovery-revocation-test-harness.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACX,eAAe,EACf,YAAY,EACZ,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/C,eAAO,MAAM,mBAAmB,UAQ/B,CAAC;AACF,eAAO,MAAM,MAAM,MAAO,YAAY,QAAQ,MAAM,WAAmC,CAAC;AACxF,wBAAsB,SAAS,CAAC,CAAC,EAAE,YAAY,iBAS9C;AA8CD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,QAMvD;AA8KD,wBAAgB,aAAa,CAC5B,EAAE,EAAE,cAAc,EAClB,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACzB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,GACnC,cAAc,CA8BhB;AA4DD,wBAAgB,0BAA0B,CACzC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,CACR,CAAC,EAAE,YAAY,EACf,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KACrB;IAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,EAC1D,KAAK,EAAE,MAAM,QA2Db;AACD,wBAAgB,6BAA6B,CAC5C,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,cAAc,QAyB7C;AACD,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;IAU1D,KAAK;IAAW,OAAO;EAChC"}
@@ -0,0 +1,29 @@
1
+ import { type CoordinatorRequestVerifier } from "./coordinator-api.js";
2
+ import type { Store } from "./coordinator-auth-store-test-fixtures.js";
3
+ export interface PeerRemovalApiFixture {
4
+ store: Store;
5
+ prefix: string;
6
+ exec(sql: string, ...values: (string | number | null)[]): Promise<void>;
7
+ rows<T = Record<string, unknown>>(sql: string, ...values: (string | number | null)[]): Promise<T[]>;
8
+ measure(action: () => Promise<Response>): Promise<{
9
+ response: Response;
10
+ sql: string[];
11
+ }>;
12
+ /** Count fresh D1 construction too, without relying on a warm store's caches. */
13
+ freshStore?(): Store;
14
+ verifyRequest: CoordinatorRequestVerifier;
15
+ restoreRemovalStorage?(): Promise<void>;
16
+ valueBound(action: () => Promise<Response>): Promise<{
17
+ response: Response;
18
+ bytes: number[];
19
+ }>;
20
+ }
21
+ /** Simulate D1's per-value limit without a service call; record exact serialized UTF-8 sizes. */
22
+ export declare function checkValueBytes(values: unknown[], bytes: number[]): void;
23
+ export declare const peerRemovalApiHarness: (fixture: (use: (value: PeerRemovalApiFixture) => Promise<void>) => Promise<void>) => import("vitest").TestAPI<{
24
+ fixture: PeerRemovalApiFixture;
25
+ }>;
26
+ type Test = ReturnType<typeof peerRemovalApiHarness>;
27
+ export declare function registerPeerRemovalApiContract(test: Test): void;
28
+ export {};
29
+ //# sourceMappingURL=coordinator-peer-removal-api-test-harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-peer-removal-api-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-peer-removal-api-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,KAAK,0BAA0B,EAE/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAOvE,MAAM,WAAW,qBAAqB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,GAAG,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,EAAE,GACnC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,GAAG,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IACzF,iFAAiF;IACjF,UAAU,CAAC,IAAI,KAAK,CAAC;IACrB,aAAa,EAAE,0BAA0B,CAAC;IAC1C,qBAAqB,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,UAAU,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CAC9F;AACD,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAOjE;AACD,eAAO,MAAM,qBAAqB,YACxB,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;EAI9E,CAAC;AACJ,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAoGrD,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,IAAI,QAcxD"}
@@ -0,0 +1,4 @@
1
+ import { type RemovalTest } from "./coordinator-device-removal-test-harness.js";
2
+ /** Store-side E1–E11 and the lookup assertion of B15, independent of route changes. */
3
+ export declare function registerPeerRemovalQueryContract(test: RemovalTest): void;
4
+ //# sourceMappingURL=coordinator-peer-removal-query-test-harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-peer-removal-query-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-peer-removal-query-test-harness.ts"],"names":[],"mappings":"AAEA,OAAO,EAQN,KAAK,WAAW,EAEhB,MAAM,8CAA8C,CAAC;AAYtD,uFAAuF;AACvF,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,WAAW,QAUjE"}
@@ -0,0 +1,32 @@
1
+ export interface CoordinatorPeerRemovalLookupInput {
2
+ peers: readonly {
3
+ deviceId: string;
4
+ publicKey?: string;
5
+ }[];
6
+ }
7
+ export interface CoordinatorPeerRemovalLookupResult {
8
+ revoked: string[];
9
+ removed: string[];
10
+ enrolled: string[];
11
+ removal_seq: number;
12
+ }
13
+ interface Entry {
14
+ deviceId: string;
15
+ publicKey: string | null;
16
+ keyId: string | null;
17
+ }
18
+ /** Capture every entry before hashing can yield; preserve the existing metadata key parser. */
19
+ export declare function capturePeerRemovalLookup(raw: CoordinatorPeerRemovalLookupInput): Promise<Entry[]>;
20
+ /** Exactly two reads in one backend batch, with one JSON parameter regardless of entry count. */
21
+ export declare function peerRemovalSnapshotStatements(entries: readonly Entry[], available: string): {
22
+ sql: string;
23
+ values: string[];
24
+ read: boolean;
25
+ }[];
26
+ /** No backend evidence or IDs are copied into the result; IDs come only from captured entries. */
27
+ export declare function peerRemovalSnapshotResult(entries: readonly Entry[], state: {
28
+ available: number;
29
+ removal_seq: number;
30
+ }, rows: unknown[]): CoordinatorPeerRemovalLookupResult;
31
+ export {};
32
+ //# sourceMappingURL=coordinator-peer-removal-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-peer-removal-query.d.ts","sourceRoot":"","sources":["../src/coordinator-peer-removal-query.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,iCAAiC;IACjD,KAAK,EAAE,SAAS;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC3D;AACD,MAAM,WAAW,kCAAkC;IAClD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACpB;AACD,UAAU,KAAK;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAGD,+FAA+F;AAC/F,wBAAsB,wBAAwB,CAC7C,GAAG,EAAE,iCAAiC,GACpC,OAAO,CAAC,KAAK,EAAE,CAAC,CA0BlB;AAqBD,iGAAiG;AACjG,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM;;YAKzE,MAAM,EAAE;;IAexB;AAWD,kGAAkG;AAClG,wBAAgB,yBAAyB,CACxC,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,KAAK,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EACjD,IAAI,EAAE,OAAO,EAAE,GACb,kCAAkC,CA0BpC"}
@@ -0,0 +1,45 @@
1
+ import type { Context } from "hono";
2
+ import type { CoordinatorEnrollment, CoordinatorStore } from "./coordinator-store-contract.js";
3
+ export declare const PEER_REVOCATION_CHECK_PATH = "/v1/peers/revocations";
4
+ /** Snapshot reads have fixed cost. Preserve the existing request cardinality limit. */
5
+ export declare const PEER_REVOCATION_CHECK_MAX_PEERS = 25;
6
+ export interface PeerRevocationCheckPeer {
7
+ device_id: string;
8
+ public_key?: string;
9
+ }
10
+ interface SignedRequest {
11
+ method: string;
12
+ url: string;
13
+ groupId: string;
14
+ body: Uint8Array;
15
+ deviceId: string | null;
16
+ signature: string | null;
17
+ timestamp: string | null;
18
+ nonce: string | null;
19
+ }
20
+ export interface PeerRevocationCheckDeps {
21
+ storeFactory: () => CoordinatorStore;
22
+ authorizeRequest: (store: CoordinatorStore, request: SignedRequest) => Promise<{
23
+ ok: boolean;
24
+ error: string;
25
+ enrollment: CoordinatorEnrollment | null;
26
+ }>;
27
+ authErrorStatus: (error: string) => 401 | 403 | 409;
28
+ readRequestBytes: (c: Context, maxBytes: number) => Promise<Uint8Array | null>;
29
+ parseJsonObject: (raw: Uint8Array) => Record<string, unknown> | null;
30
+ rateLimitedResponse: (c: Context, key: string, options: {
31
+ authenticated: boolean;
32
+ }) => Response | null;
33
+ }
34
+ interface PeerRevocationApp {
35
+ post(path: string, handler: (c: Context) => Promise<Response>): unknown;
36
+ }
37
+ /** Exact device ID and key pairs, or null when any entry is malformed or the list is too long. */
38
+ export declare function parsePeerRevocationCheckPeers(value: unknown): PeerRevocationCheckPeer[] | null;
39
+ /**
40
+ * Lets an enrolled device read coordinator-wide revocation, removal and
41
+ * enrollment state for only the IDs or keys it names, without evidence.
42
+ */
43
+ export declare function registerCoordinatorPeerRevocationCheckRoute(app: PeerRevocationApp, deps: PeerRevocationCheckDeps): void;
44
+ export {};
45
+ //# sourceMappingURL=coordinator-peer-revocation-route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-peer-revocation-route.d.ts","sourceRoot":"","sources":["../src/coordinator-peer-revocation-route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAE/F,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAClE,uFAAuF;AACvF,eAAO,MAAM,+BAA+B,KAAK,CAAC;AAGlD,MAAM,WAAW,uBAAuB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,aAAa;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,S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fig } from "./coordinator-sync-config.js";
2
+ import type { MemoryStore } from "./store.js";
3
+ /** `unsupported` means the coordinator predates the check; `failed` means the answer was unusable. */
4
+ export type PeerRevocationCheckStatus = "checked" | "unsupported" | "failed";
5
+ /** A device this device asks the coordinator about. A binding without a pairing has no key to send. */
6
+ export interface PeerRemovalLookupEntry {
7
+ device_id: string;
8
+ public_key?: string;
9
+ }
10
+ export interface PeerRemovalLookup {
11
+ status: PeerRevocationCheckStatus;
12
+ /** IDs this device sent that the coordinator blocked. Never also in `removed`. */
13
+ revoked: string[];
14
+ /** IDs this device sent that the coordinator removed. */
15
+ removed: string[];
16
+ /** IDs this device sent that the coordinator holds any enrollment for. */
17
+ enrolled: string[];
18
+ /**
19
+ * The lowest `removal_seq` among the replies of a lookup that every batch
20
+ * answered and that left out no pairing or binding. Otherwise null.
21
+ */
22
+ removalSeq: number | null;
23
+ /** The local counter value read in the same transaction as the entries. */
24
+ generation: number | null;
25
+ /** Groups that answered this device's signed request with `403 device_removed`. */
26
+ removedFromGroups: string[];
27
+ }
28
+ /** What the coordinator says about one device, or that it gave no usable answer. */
29
+ export type PeerRemovalAnswer = {
30
+ answered: true;
31
+ enrolled: boolean;
32
+ removed: boolean;
33
+ revoked: boolean;
34
+ } | {
35
+ answered: false;
36
+ };
37
+ type StoreLike = Pick<MemoryStore, "db" | "dbPath">;
38
+ /**
39
+ * Asks the coordinator which of this device's pairings and bound devices it has
40
+ * blocked, removed, or still holds an enrollment for. Any failure keeps every
41
+ * pairing: the lists are empty and `removalSeq` is null unless every batch
42
+ * returned a valid reply. It changes no local state.
43
+ */
44
+ export declare function fetchPeerRemovalLookup(store: StoreLike, config: CoordinatorSyncConfig, options: {
45
+ localDeviceId: string;
46
+ keysDir?: string;
47
+ }): Promise<PeerRemovalLookup>;
48
+ /**
49
+ * Asks the coordinator about one device. No answer covers every case in which
50
+ * the caller must not guess: the coordinator cannot be reached, predates the
51
+ * check, replies with anything but a valid 200, or refuses this device in every
52
+ * configured group. It changes no local state.
53
+ */
54
+ export declare function queryPeerRemoval(store: StoreLike, config: CoordinatorSyncConfig, options: {
55
+ localDeviceId: string;
56
+ keysDir?: string;
57
+ deviceId: string;
58
+ publicKey?: string;
59
+ }): Promise<PeerRemovalAnswer>;
60
+ export {};
61
+ //# sourceMappingURL=coordinator-peer-revocation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-peer-revocation.d.ts","sourceRoot":"","sources":["../src/coordinator-peer-revocation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAO9C,sGAAsG;AACtG,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,aAAa,GAAG,QAAQ,CAAC;AAE7E,uGAAuG;AACvG,MAAM,WAAW,sBAAsB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,yBAAyB,CAAC;IAClC,kFAAkF;IAClF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,yDAAyD;IACzD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,2EAA2E;IAC3E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,mFAAmF;IACnF,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,oFAAoF;AACpF,MAAM,MAAM,iBAAiB,GAC1B;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACzE;IAAE,QAAQ,EAAE,KAAK,CAAA;CA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