@codemem/core 0.46.3 → 0.47.0-beta.3

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 (481) hide show
  1. package/dist/address-utils.d.ts.map +1 -1
  2. package/dist/better-sqlite-coordinator-runtime.d.ts +2 -0
  3. package/dist/better-sqlite-coordinator-runtime.d.ts.map +1 -1
  4. package/dist/better-sqlite-coordinator-store.d.ts +109 -5
  5. package/dist/better-sqlite-coordinator-store.d.ts.map +1 -1
  6. package/dist/coordinator-account-change-browser.d.ts +39 -0
  7. package/dist/coordinator-account-change-browser.d.ts.map +1 -0
  8. package/dist/coordinator-account-change-contract.d.ts +4 -0
  9. package/dist/coordinator-account-change-contract.d.ts.map +1 -0
  10. package/dist/coordinator-account-change-http-test-fixtures.d.ts +101 -0
  11. package/dist/coordinator-account-change-http-test-fixtures.d.ts.map +1 -0
  12. package/dist/coordinator-account-change-schema.d.ts +5 -0
  13. package/dist/coordinator-account-change-schema.d.ts.map +1 -0
  14. package/dist/coordinator-account-change.d.ts +100 -0
  15. package/dist/coordinator-account-change.d.ts.map +1 -0
  16. package/dist/coordinator-account-connection-link.d.ts +25 -0
  17. package/dist/coordinator-account-connection-link.d.ts.map +1 -0
  18. package/dist/coordinator-account-connection-schema.d.ts +68 -0
  19. package/dist/coordinator-account-connection-schema.d.ts.map +1 -0
  20. package/dist/coordinator-account-connection-session.d.ts +15 -0
  21. package/dist/coordinator-account-connection-session.d.ts.map +1 -0
  22. package/dist/coordinator-account-connection-storage.d.ts +46 -0
  23. package/dist/coordinator-account-connection-storage.d.ts.map +1 -0
  24. package/dist/coordinator-account-historical-revoke.d.ts +7 -0
  25. package/dist/coordinator-account-historical-revoke.d.ts.map +1 -0
  26. package/dist/coordinator-account-link-receipt.d.ts +20 -0
  27. package/dist/coordinator-account-link-receipt.d.ts.map +1 -0
  28. package/dist/coordinator-account-link-receiver.d.ts +28 -0
  29. package/dist/coordinator-account-link-receiver.d.ts.map +1 -0
  30. package/dist/coordinator-account-link-runtime.d.ts +45 -0
  31. package/dist/coordinator-account-link-runtime.d.ts.map +1 -0
  32. package/dist/coordinator-account-link-signer.d.ts +15 -0
  33. package/dist/coordinator-account-link-signer.d.ts.map +1 -0
  34. package/dist/coordinator-account-link-status-client.d.ts +37 -0
  35. package/dist/coordinator-account-link-status-client.d.ts.map +1 -0
  36. package/dist/coordinator-account-link-status.d.ts +23 -0
  37. package/dist/coordinator-account-link-status.d.ts.map +1 -0
  38. package/dist/coordinator-account-unlink-schema.d.ts +7 -0
  39. package/dist/coordinator-account-unlink-schema.d.ts.map +1 -0
  40. package/dist/coordinator-actions.d.ts +29 -0
  41. package/dist/coordinator-actions.d.ts.map +1 -1
  42. package/dist/coordinator-api.d.ts +21 -1
  43. package/dist/coordinator-api.d.ts.map +1 -1
  44. package/dist/coordinator-auth-account-profile-contract.d.ts +41 -0
  45. package/dist/coordinator-auth-account-profile-contract.d.ts.map +1 -0
  46. package/dist/coordinator-auth-account-profile.d.ts +27 -0
  47. package/dist/coordinator-auth-account-profile.d.ts.map +1 -0
  48. package/dist/coordinator-auth-browser-migration-test-harness.d.ts +18 -0
  49. package/dist/coordinator-auth-browser-migration-test-harness.d.ts.map +1 -0
  50. package/dist/coordinator-auth-browser-owner-purpose-test-harness.d.ts +6 -0
  51. package/dist/coordinator-auth-browser-owner-purpose-test-harness.d.ts.map +1 -0
  52. package/dist/coordinator-auth-browser-proof-test-fixtures.d.ts +25 -0
  53. package/dist/coordinator-auth-browser-proof-test-fixtures.d.ts.map +1 -0
  54. package/dist/coordinator-auth-browser-schema-upgrade.d.ts +6 -0
  55. package/dist/coordinator-auth-browser-schema-upgrade.d.ts.map +1 -0
  56. package/dist/coordinator-auth-browser-style.d.ts +6 -0
  57. package/dist/coordinator-auth-browser-style.d.ts.map +1 -0
  58. package/dist/coordinator-auth-browser-transaction-contract.d.ts +130 -0
  59. package/dist/coordinator-auth-browser-transaction-contract.d.ts.map +1 -0
  60. package/dist/coordinator-auth-browser-transaction-test-fixtures.d.ts +14 -0
  61. package/dist/coordinator-auth-browser-transaction-test-fixtures.d.ts.map +1 -0
  62. package/dist/coordinator-auth-browser-transaction.d.ts +36 -0
  63. package/dist/coordinator-auth-browser-transaction.d.ts.map +1 -0
  64. package/dist/coordinator-auth-browser-view.d.ts +84 -0
  65. package/dist/coordinator-auth-browser-view.d.ts.map +1 -0
  66. package/dist/coordinator-auth-contract.d.ts +71 -0
  67. package/dist/coordinator-auth-contract.d.ts.map +1 -0
  68. package/dist/coordinator-auth-controller-review-route.d.ts +38 -0
  69. package/dist/coordinator-auth-controller-review-route.d.ts.map +1 -0
  70. package/dist/coordinator-auth-controller.d.ts +87 -0
  71. package/dist/coordinator-auth-controller.d.ts.map +1 -0
  72. package/dist/coordinator-auth-device-claim-eligibility.d.ts +43 -0
  73. package/dist/coordinator-auth-device-claim-eligibility.d.ts.map +1 -0
  74. package/dist/coordinator-auth-device-claim-schema.d.ts +116 -0
  75. package/dist/coordinator-auth-device-claim-schema.d.ts.map +1 -0
  76. package/dist/coordinator-auth-historical-migration-test-fixture.d.ts +2 -0
  77. package/dist/coordinator-auth-historical-migration-test-fixture.d.ts.map +1 -0
  78. package/dist/coordinator-auth-historical-store-test-fixture.d.ts +13 -0
  79. package/dist/coordinator-auth-historical-store-test-fixture.d.ts.map +1 -0
  80. package/dist/coordinator-auth-historical-test-fixture.d.ts +48 -0
  81. package/dist/coordinator-auth-historical-test-fixture.d.ts.map +1 -0
  82. package/dist/coordinator-auth-legacy-assignment.d.ts +12 -0
  83. package/dist/coordinator-auth-legacy-assignment.d.ts.map +1 -0
  84. package/dist/coordinator-auth-lifecycle-admission-schema.d.ts +28 -0
  85. package/dist/coordinator-auth-lifecycle-admission-schema.d.ts.map +1 -0
  86. package/dist/coordinator-auth-lifecycle-browser-schema.d.ts +15 -0
  87. package/dist/coordinator-auth-lifecycle-browser-schema.d.ts.map +1 -0
  88. package/dist/coordinator-auth-lifecycle-current-readiness.d.ts +7 -0
  89. package/dist/coordinator-auth-lifecycle-current-readiness.d.ts.map +1 -0
  90. package/dist/coordinator-auth-lifecycle-first-link.d.ts +17 -0
  91. package/dist/coordinator-auth-lifecycle-first-link.d.ts.map +1 -0
  92. package/dist/coordinator-auth-lifecycle-fresh-schema.d.ts +14 -0
  93. package/dist/coordinator-auth-lifecycle-fresh-schema.d.ts.map +1 -0
  94. package/dist/coordinator-auth-lifecycle-predecessor-shapes.d.ts +24 -0
  95. package/dist/coordinator-auth-lifecycle-predecessor-shapes.d.ts.map +1 -0
  96. package/dist/coordinator-auth-lifecycle-predecessor.d.ts +9 -0
  97. package/dist/coordinator-auth-lifecycle-predecessor.d.ts.map +1 -0
  98. package/dist/coordinator-auth-lifecycle-profile-schema.d.ts +13 -0
  99. package/dist/coordinator-auth-lifecycle-profile-schema.d.ts.map +1 -0
  100. package/dist/coordinator-auth-lifecycle-recognition.d.ts +22 -0
  101. package/dist/coordinator-auth-lifecycle-recognition.d.ts.map +1 -0
  102. package/dist/coordinator-auth-lifecycle-schema.d.ts +20 -0
  103. package/dist/coordinator-auth-lifecycle-schema.d.ts.map +1 -0
  104. package/dist/coordinator-auth-lifecycle-upgrade-copy.d.ts +36 -0
  105. package/dist/coordinator-auth-lifecycle-upgrade-copy.d.ts.map +1 -0
  106. package/dist/coordinator-auth-lifecycle-upgrade-sqlite.d.ts +11 -0
  107. package/dist/coordinator-auth-lifecycle-upgrade-sqlite.d.ts.map +1 -0
  108. package/dist/coordinator-auth-lifecycle-upgrade-test-fixture.d.ts +31 -0
  109. package/dist/coordinator-auth-lifecycle-upgrade-test-fixture.d.ts.map +1 -0
  110. package/dist/coordinator-auth-lifecycle-upgrade.d.ts +6 -0
  111. package/dist/coordinator-auth-lifecycle-upgrade.d.ts.map +1 -0
  112. package/dist/coordinator-auth-link-authority-upgrade.d.ts +17 -0
  113. package/dist/coordinator-auth-link-authority-upgrade.d.ts.map +1 -0
  114. package/dist/coordinator-auth-link-authority.d.ts +92 -0
  115. package/dist/coordinator-auth-link-authority.d.ts.map +1 -0
  116. package/dist/coordinator-auth-link-change-schema.d.ts +21 -0
  117. package/dist/coordinator-auth-link-change-schema.d.ts.map +1 -0
  118. package/dist/coordinator-auth-link-contract.d.ts +137 -0
  119. package/dist/coordinator-auth-link-contract.d.ts.map +1 -0
  120. package/dist/coordinator-auth-link-input.d.ts +7 -0
  121. package/dist/coordinator-auth-link-input.d.ts.map +1 -0
  122. package/dist/coordinator-auth-link-legacy-inline-test-fixture.d.ts +2 -0
  123. package/dist/coordinator-auth-link-legacy-inline-test-fixture.d.ts.map +1 -0
  124. package/dist/coordinator-auth-link-liveness.d.ts +8 -0
  125. package/dist/coordinator-auth-link-liveness.d.ts.map +1 -0
  126. package/dist/coordinator-auth-link-maintenance-fixtures.d.ts +14 -0
  127. package/dist/coordinator-auth-link-maintenance-fixtures.d.ts.map +1 -0
  128. package/dist/coordinator-auth-link-profile.d.ts +15 -0
  129. package/dist/coordinator-auth-link-profile.d.ts.map +1 -0
  130. package/dist/coordinator-auth-link-provenance.d.ts +17 -0
  131. package/dist/coordinator-auth-link-provenance.d.ts.map +1 -0
  132. package/dist/coordinator-auth-link-revocation-test-harness.d.ts +19 -0
  133. package/dist/coordinator-auth-link-revocation-test-harness.d.ts.map +1 -0
  134. package/dist/coordinator-auth-link-source.d.ts +15 -0
  135. package/dist/coordinator-auth-link-source.d.ts.map +1 -0
  136. package/dist/coordinator-auth-link-test-fixtures.d.ts +49 -0
  137. package/dist/coordinator-auth-link-test-fixtures.d.ts.map +1 -0
  138. package/dist/coordinator-auth-link.d.ts +91 -0
  139. package/dist/coordinator-auth-link.d.ts.map +1 -0
  140. package/dist/coordinator-auth-loopback.d.ts +11 -0
  141. package/dist/coordinator-auth-loopback.d.ts.map +1 -0
  142. package/dist/coordinator-auth-proof.d.ts +4 -0
  143. package/dist/coordinator-auth-proof.d.ts.map +1 -0
  144. package/dist/coordinator-auth-schema-operator.d.ts +6 -0
  145. package/dist/coordinator-auth-schema-operator.d.ts.map +1 -0
  146. package/dist/coordinator-auth-schema.d.ts +18 -0
  147. package/dist/coordinator-auth-schema.d.ts.map +1 -0
  148. package/dist/coordinator-auth-session-bound-test-fixtures.d.ts +7 -0
  149. package/dist/coordinator-auth-session-bound-test-fixtures.d.ts.map +1 -0
  150. package/dist/coordinator-auth-session-contract.d.ts +104 -0
  151. package/dist/coordinator-auth-session-contract.d.ts.map +1 -0
  152. package/dist/coordinator-auth-session-test-fixtures.d.ts +31 -0
  153. package/dist/coordinator-auth-session-test-fixtures.d.ts.map +1 -0
  154. package/dist/coordinator-auth-session.d.ts +44 -0
  155. package/dist/coordinator-auth-session.d.ts.map +1 -0
  156. package/dist/coordinator-auth-store-test-fixtures.d.ts +26 -0
  157. package/dist/coordinator-auth-store-test-fixtures.d.ts.map +1 -0
  158. package/dist/coordinator-bootstrap-authorization-api-test-harness.d.ts +5 -0
  159. package/dist/coordinator-bootstrap-authorization-api-test-harness.d.ts.map +1 -0
  160. package/dist/coordinator-bootstrap-authorization-test-harness.d.ts +11 -0
  161. package/dist/coordinator-bootstrap-authorization-test-harness.d.ts.map +1 -0
  162. package/dist/coordinator-bootstrap-grant-authorization.d.ts +28 -0
  163. package/dist/coordinator-bootstrap-grant-authorization.d.ts.map +1 -0
  164. package/dist/coordinator-bootstrap-grant-issuance.d.ts +22 -0
  165. package/dist/coordinator-bootstrap-grant-issuance.d.ts.map +1 -0
  166. package/dist/coordinator-bootstrap-revocation-test-harness.d.ts +11 -0
  167. package/dist/coordinator-bootstrap-revocation-test-harness.d.ts.map +1 -0
  168. package/dist/coordinator-browser-account.d.ts +36 -0
  169. package/dist/coordinator-browser-account.d.ts.map +1 -0
  170. package/dist/coordinator-browser-auth-app.d.ts +84 -0
  171. package/dist/coordinator-browser-auth-app.d.ts.map +1 -0
  172. package/dist/coordinator-browser-auth-callback.d.ts +47 -0
  173. package/dist/coordinator-browser-auth-callback.d.ts.map +1 -0
  174. package/dist/coordinator-browser-auth-config.d.ts +32 -0
  175. package/dist/coordinator-browser-auth-config.d.ts.map +1 -0
  176. package/dist/coordinator-browser-credential.d.ts +40 -0
  177. package/dist/coordinator-browser-credential.d.ts.map +1 -0
  178. package/dist/coordinator-browser-csrf.d.ts +19 -0
  179. package/dist/coordinator-browser-csrf.d.ts.map +1 -0
  180. package/dist/coordinator-browser-form-body.d.ts +42 -0
  181. package/dist/coordinator-browser-form-body.d.ts.map +1 -0
  182. package/dist/coordinator-browser-form-guard.d.ts +55 -0
  183. package/dist/coordinator-browser-form-guard.d.ts.map +1 -0
  184. package/dist/coordinator-browser-link-completion.d.ts +32 -0
  185. package/dist/coordinator-browser-link-completion.d.ts.map +1 -0
  186. package/dist/coordinator-browser-link-start.d.ts +39 -0
  187. package/dist/coordinator-browser-link-start.d.ts.map +1 -0
  188. package/dist/coordinator-browser-link.d.ts +36 -0
  189. package/dist/coordinator-browser-link.d.ts.map +1 -0
  190. package/dist/coordinator-browser-request.d.ts +10 -0
  191. package/dist/coordinator-browser-request.d.ts.map +1 -0
  192. package/dist/coordinator-browser-signin-start.d.ts +38 -0
  193. package/dist/coordinator-browser-signin-start.d.ts.map +1 -0
  194. package/dist/coordinator-browser-start-transaction.d.ts +6 -0
  195. package/dist/coordinator-browser-start-transaction.d.ts.map +1 -0
  196. package/dist/coordinator-controller-revocation-test-harness.d.ts +11 -0
  197. package/dist/coordinator-controller-revocation-test-harness.d.ts.map +1 -0
  198. package/dist/coordinator-d1-scope-authorization-test-harness.d.ts +14 -0
  199. package/dist/coordinator-d1-scope-authorization-test-harness.d.ts.map +1 -0
  200. package/dist/coordinator-device-account-change.d.ts +17 -0
  201. package/dist/coordinator-device-account-change.d.ts.map +1 -0
  202. package/dist/coordinator-device-auth-link.d.ts +43 -0
  203. package/dist/coordinator-device-auth-link.d.ts.map +1 -0
  204. package/dist/coordinator-device-local.d.ts +9 -0
  205. package/dist/coordinator-device-local.d.ts.map +1 -0
  206. package/dist/coordinator-device-ownership-schema.d.ts +3 -0
  207. package/dist/coordinator-device-ownership-schema.d.ts.map +1 -0
  208. package/dist/coordinator-device-ownership-test-harness.d.ts +17 -0
  209. package/dist/coordinator-device-ownership-test-harness.d.ts.map +1 -0
  210. package/dist/coordinator-device-revocation-client.d.ts +41 -0
  211. package/dist/coordinator-device-revocation-client.d.ts.map +1 -0
  212. package/dist/coordinator-device-revocation-handler-test-harness.d.ts +4 -0
  213. package/dist/coordinator-device-revocation-handler-test-harness.d.ts.map +1 -0
  214. package/dist/coordinator-device-revocation-handler.d.ts +17 -0
  215. package/dist/coordinator-device-revocation-handler.d.ts.map +1 -0
  216. package/dist/coordinator-device-revocation-route.d.ts +14 -0
  217. package/dist/coordinator-device-revocation-route.d.ts.map +1 -0
  218. package/dist/coordinator-device-revocation-test-harness.d.ts +34 -0
  219. package/dist/coordinator-device-revocation-test-harness.d.ts.map +1 -0
  220. package/dist/coordinator-device-revocation.d.ts +67 -0
  221. package/dist/coordinator-device-revocation.d.ts.map +1 -0
  222. package/dist/coordinator-ed25519-key-id-compat.d.ts +6 -0
  223. package/dist/coordinator-ed25519-key-id-compat.d.ts.map +1 -0
  224. package/dist/coordinator-ed25519-key-id-test-fixtures.d.ts +30 -0
  225. package/dist/coordinator-ed25519-key-id-test-fixtures.d.ts.map +1 -0
  226. package/dist/coordinator-ed25519-key-id.d.ts +21 -0
  227. package/dist/coordinator-ed25519-key-id.d.ts.map +1 -0
  228. package/dist/coordinator-enrollment-revocation-test-harness.d.ts +6 -0
  229. package/dist/coordinator-enrollment-revocation-test-harness.d.ts.map +1 -0
  230. package/dist/coordinator-hono-test-fixtures.d.ts +2 -0
  231. package/dist/coordinator-hono-test-fixtures.d.ts.map +1 -0
  232. package/dist/coordinator-identity-grant-revocation-test-harness.d.ts +11 -0
  233. package/dist/coordinator-identity-grant-revocation-test-harness.d.ts.map +1 -0
  234. package/dist/coordinator-identity-group-grant-client.d.ts +9 -0
  235. package/dist/coordinator-identity-group-grant-client.d.ts.map +1 -0
  236. package/dist/coordinator-identity-group-grant-input-test-harness.d.ts +3 -0
  237. package/dist/coordinator-identity-group-grant-input-test-harness.d.ts.map +1 -0
  238. package/dist/coordinator-identity-group-grant-test-harness.d.ts +17 -0
  239. package/dist/coordinator-identity-group-grant-test-harness.d.ts.map +1 -0
  240. package/dist/coordinator-identity-group-grant.d.ts +51 -0
  241. package/dist/coordinator-identity-group-grant.d.ts.map +1 -0
  242. package/dist/coordinator-invite-review.d.ts +64 -0
  243. package/dist/coordinator-invite-review.d.ts.map +1 -0
  244. package/dist/coordinator-join-review-guards.d.ts +22 -0
  245. package/dist/coordinator-join-review-guards.d.ts.map +1 -0
  246. package/dist/coordinator-join-revocation-test-harness.d.ts +23 -0
  247. package/dist/coordinator-join-revocation-test-harness.d.ts.map +1 -0
  248. package/dist/coordinator-legacy-device-ownership.d.ts +34 -0
  249. package/dist/coordinator-legacy-device-ownership.d.ts.map +1 -0
  250. package/dist/coordinator-oidc-test-fixtures.d.ts +50 -0
  251. package/dist/coordinator-oidc-test-fixtures.d.ts.map +1 -0
  252. package/dist/coordinator-oidc.d.ts +59 -0
  253. package/dist/coordinator-oidc.d.ts.map +1 -0
  254. package/dist/coordinator-owner-attempt-migration-test-harness.d.ts +16 -0
  255. package/dist/coordinator-owner-attempt-migration-test-harness.d.ts.map +1 -0
  256. package/dist/coordinator-owner-enrollment-client.d.ts +29 -0
  257. package/dist/coordinator-owner-enrollment-client.d.ts.map +1 -0
  258. package/dist/coordinator-owner-enrollment-commit-test-fixtures.d.ts +31 -0
  259. package/dist/coordinator-owner-enrollment-commit-test-fixtures.d.ts.map +1 -0
  260. package/dist/coordinator-owner-enrollment-commit.d.ts +23 -0
  261. package/dist/coordinator-owner-enrollment-commit.d.ts.map +1 -0
  262. package/dist/coordinator-owner-enrollment-historical-test-fixture.d.ts +11 -0
  263. package/dist/coordinator-owner-enrollment-historical-test-fixture.d.ts.map +1 -0
  264. package/dist/coordinator-owner-enrollment-http.d.ts +67 -0
  265. package/dist/coordinator-owner-enrollment-http.d.ts.map +1 -0
  266. package/dist/coordinator-owner-enrollment-proof.d.ts +67 -0
  267. package/dist/coordinator-owner-enrollment-proof.d.ts.map +1 -0
  268. package/dist/coordinator-owner-enrollment-qualification-schema.d.ts +107 -0
  269. package/dist/coordinator-owner-enrollment-qualification-schema.d.ts.map +1 -0
  270. package/dist/coordinator-owner-enrollment-qualification-test-harness.d.ts +39 -0
  271. package/dist/coordinator-owner-enrollment-qualification-test-harness.d.ts.map +1 -0
  272. package/dist/coordinator-owner-enrollment-qualification.d.ts +56 -0
  273. package/dist/coordinator-owner-enrollment-qualification.d.ts.map +1 -0
  274. package/dist/coordinator-owner-enrollment-schema.d.ts +7 -0
  275. package/dist/coordinator-owner-enrollment-schema.d.ts.map +1 -0
  276. package/dist/coordinator-owner-enrollment-start-test-fixtures.d.ts +54 -0
  277. package/dist/coordinator-owner-enrollment-start-test-fixtures.d.ts.map +1 -0
  278. package/dist/coordinator-owner-enrollment-test-harness.d.ts +72 -0
  279. package/dist/coordinator-owner-enrollment-test-harness.d.ts.map +1 -0
  280. package/dist/coordinator-owner-profile-adoption.d.ts +34 -0
  281. package/dist/coordinator-owner-profile-adoption.d.ts.map +1 -0
  282. package/dist/coordinator-owner-profile-client-test-harness.d.ts +57 -0
  283. package/dist/coordinator-owner-profile-client-test-harness.d.ts.map +1 -0
  284. package/dist/coordinator-owner-profile-client.d.ts +38 -0
  285. package/dist/coordinator-owner-profile-client.d.ts.map +1 -0
  286. package/dist/coordinator-owner-profile-files.d.ts +62 -0
  287. package/dist/coordinator-owner-profile-files.d.ts.map +1 -0
  288. package/dist/coordinator-owner-qualification-http.d.ts +14 -0
  289. package/dist/coordinator-owner-qualification-http.d.ts.map +1 -0
  290. package/dist/coordinator-owner-qualification-route.d.ts +16 -0
  291. package/dist/coordinator-owner-qualification-route.d.ts.map +1 -0
  292. package/dist/coordinator-owner-review-local.d.ts +35 -0
  293. package/dist/coordinator-owner-review-local.d.ts.map +1 -0
  294. package/dist/coordinator-peer-discovery-revocation-test-harness.d.ts +21 -0
  295. package/dist/coordinator-peer-discovery-revocation-test-harness.d.ts.map +1 -0
  296. package/dist/coordinator-peer-discovery.d.ts +15 -0
  297. package/dist/coordinator-peer-discovery.d.ts.map +1 -0
  298. package/dist/coordinator-project-invite-guards.d.ts +13 -0
  299. package/dist/coordinator-project-invite-guards.d.ts.map +1 -0
  300. package/dist/coordinator-project-revocation-test-harness.d.ts +25 -0
  301. package/dist/coordinator-project-revocation-test-harness.d.ts.map +1 -0
  302. package/dist/coordinator-recipient-revocation-test-harness.d.ts +30 -0
  303. package/dist/coordinator-recipient-revocation-test-harness.d.ts.map +1 -0
  304. package/dist/coordinator-runtime.d.ts +1 -0
  305. package/dist/coordinator-runtime.d.ts.map +1 -1
  306. package/dist/coordinator-scope-authorization-api-test-harness.d.ts +8 -0
  307. package/dist/coordinator-scope-authorization-api-test-harness.d.ts.map +1 -0
  308. package/dist/coordinator-scope-authorization-response.d.ts +10 -0
  309. package/dist/coordinator-scope-authorization-response.d.ts.map +1 -0
  310. package/dist/coordinator-scope-authorization.d.ts +25 -0
  311. package/dist/coordinator-scope-authorization.d.ts.map +1 -0
  312. package/dist/coordinator-store-contract.d.ts +48 -1
  313. package/dist/coordinator-store-contract.d.ts.map +1 -1
  314. package/dist/coordinator-store.d.ts +2 -1
  315. package/dist/coordinator-store.d.ts.map +1 -1
  316. package/dist/d1-coordinator-runtime.d.ts +9 -1
  317. package/dist/d1-coordinator-runtime.d.ts.map +1 -1
  318. package/dist/d1-coordinator-store.d.ts +108 -5
  319. package/dist/d1-coordinator-store.d.ts.map +1 -1
  320. package/dist/db.d.ts.map +1 -1
  321. package/dist/export-import.d.ts +2 -0
  322. package/dist/export-import.d.ts.map +1 -1
  323. package/dist/extraction-tier-routing.d.ts.map +1 -1
  324. package/dist/file-context-transport.d.ts +93 -0
  325. package/dist/file-context-transport.d.ts.map +1 -0
  326. package/dist/file-context.d.ts +58 -0
  327. package/dist/file-context.d.ts.map +1 -0
  328. package/dist/filters.d.ts +14 -3
  329. package/dist/filters.d.ts.map +1 -1
  330. package/dist/index.d.ts +43 -11
  331. package/dist/index.d.ts.map +1 -1
  332. package/dist/index.js +29731 -23760
  333. package/dist/index.js.map +1 -1
  334. package/dist/ingest-pipeline.d.ts +4 -0
  335. package/dist/ingest-pipeline.d.ts.map +1 -1
  336. package/dist/ingest-xml-parser.d.ts +2 -5
  337. package/dist/ingest-xml-parser.d.ts.map +1 -1
  338. package/dist/ingest-xml-scan.d.ts +30 -0
  339. package/dist/ingest-xml-scan.d.ts.map +1 -0
  340. package/dist/internal/cloudflare-coordinator.d.ts +23 -2
  341. package/dist/internal/cloudflare-coordinator.d.ts.map +1 -1
  342. package/dist/internal/cloudflare-coordinator.js +4109 -372
  343. package/dist/internal/cloudflare-coordinator.js.map +1 -1
  344. package/dist/legacy-recipient-policy-projection.d.ts.map +1 -1
  345. package/dist/maintenance/relink.d.ts.map +1 -1
  346. package/dist/managed-scope-test-fixtures.d.ts +25 -0
  347. package/dist/managed-scope-test-fixtures.d.ts.map +1 -0
  348. package/dist/memory-creation-provenance.d.ts +13 -0
  349. package/dist/memory-creation-provenance.d.ts.map +1 -0
  350. package/dist/memory-local-capture-test-fixtures.d.ts +39 -0
  351. package/dist/memory-local-capture-test-fixtures.d.ts.map +1 -0
  352. package/dist/memory-local-capture.d.ts +29 -0
  353. package/dist/memory-local-capture.d.ts.map +1 -0
  354. package/dist/memory-ownership-recovery.d.ts.map +1 -1
  355. package/dist/memory-retirement-delivery.d.ts.map +1 -1
  356. package/dist/memory-source-identity.d.ts +3 -0
  357. package/dist/memory-source-identity.d.ts.map +1 -1
  358. package/dist/observer-client.d.ts.map +1 -1
  359. package/dist/observer-output.d.ts.map +1 -1
  360. package/dist/opencode-v2-generation.d.ts.map +1 -1
  361. package/dist/owned-recipient-d1-test-harness.d.ts +7 -0
  362. package/dist/owned-recipient-d1-test-harness.d.ts.map +1 -0
  363. package/dist/owner-browser-admission-authority.d.ts +24 -0
  364. package/dist/owner-browser-admission-authority.d.ts.map +1 -0
  365. package/dist/owner-browser-admission-body.d.ts +8 -0
  366. package/dist/owner-browser-admission-body.d.ts.map +1 -0
  367. package/dist/owner-browser-admission.d.ts +30 -0
  368. package/dist/owner-browser-admission.d.ts.map +1 -0
  369. package/dist/owner-enrollment-admission.d.ts +58 -0
  370. package/dist/owner-enrollment-admission.d.ts.map +1 -0
  371. package/dist/owner-enrollment-link-authority.d.ts +26 -0
  372. package/dist/owner-enrollment-link-authority.d.ts.map +1 -0
  373. package/dist/owner-enrollment-owner-pin-test-harness.d.ts +21 -0
  374. package/dist/owner-enrollment-owner-pin-test-harness.d.ts.map +1 -0
  375. package/dist/owner-enrollment-owner-pin.d.ts +14 -0
  376. package/dist/owner-enrollment-owner-pin.d.ts.map +1 -0
  377. package/dist/owner-enrollment-start-xsoRbhG2.js +14318 -0
  378. package/dist/owner-enrollment-start-xsoRbhG2.js.map +1 -0
  379. package/dist/owner-enrollment-start.d.ts +109 -0
  380. package/dist/owner-enrollment-start.d.ts.map +1 -0
  381. package/dist/owner-qualified-consumer-access-test-harness.d.ts +3 -0
  382. package/dist/owner-qualified-consumer-access-test-harness.d.ts.map +1 -0
  383. package/dist/owner-qualified-consumer-adversarial-test-harness.d.ts +5 -0
  384. package/dist/owner-qualified-consumer-adversarial-test-harness.d.ts.map +1 -0
  385. package/dist/owner-qualified-consumer-test-fixture.d.ts +4 -0
  386. package/dist/owner-qualified-consumer-test-fixture.d.ts.map +1 -0
  387. package/dist/owner-qualified-consumer-test-harness.d.ts +69 -0
  388. package/dist/owner-qualified-consumer-test-harness.d.ts.map +1 -0
  389. package/dist/pack.d.ts.map +1 -1
  390. package/dist/pi-session-search.d.ts +73 -0
  391. package/dist/pi-session-search.d.ts.map +1 -0
  392. package/dist/pi-sessions-import.d.ts +72 -0
  393. package/dist/pi-sessions-import.d.ts.map +1 -0
  394. package/dist/policy-team-device-eligibility.d.ts.map +1 -1
  395. package/dist/project-scope-settings.d.ts +4 -0
  396. package/dist/project-scope-settings.d.ts.map +1 -1
  397. package/dist/{promise-B3UhYSzv.js → promise-BgC-VNzX.js} +436 -214
  398. package/dist/promise-BgC-VNzX.js.map +1 -0
  399. package/dist/{service-contender-9rqn6x4v-pocTjwT1.js → pty-handoff-9rqn6x4v-Dxw6kceQ.js} +2 -2
  400. package/dist/pty-handoff-9rqn6x4v-Dxw6kceQ.js.map +1 -0
  401. package/dist/raw-event-auth-recovery.d.ts +1 -1
  402. package/dist/raw-event-auth-recovery.d.ts.map +1 -1
  403. package/dist/raw-event-flush.d.ts.map +1 -1
  404. package/dist/recipient-policy-deny-overlay.d.ts +9 -0
  405. package/dist/recipient-policy-deny-overlay.d.ts.map +1 -0
  406. package/dist/recipient-policy-reconciliation.d.ts +1 -9
  407. package/dist/recipient-policy-reconciliation.d.ts.map +1 -1
  408. package/dist/ref-queries.d.ts +7 -2
  409. package/dist/ref-queries.d.ts.map +1 -1
  410. package/dist/schema-bootstrap.d.ts +2 -0
  411. package/dist/schema-bootstrap.d.ts.map +1 -1
  412. package/dist/schema.d.ts +160 -0
  413. package/dist/schema.d.ts.map +1 -1
  414. package/dist/scope-membership-cache-test-fixtures.d.ts +19 -0
  415. package/dist/scope-membership-cache-test-fixtures.d.ts.map +1 -0
  416. package/dist/scope-membership-cache.d.ts +15 -2
  417. package/dist/scope-membership-cache.d.ts.map +1 -1
  418. package/dist/scope-membership-evidence.d.ts +17 -0
  419. package/dist/scope-membership-evidence.d.ts.map +1 -0
  420. package/dist/scope-membership-snapshot.d.ts +22 -0
  421. package/dist/scope-membership-snapshot.d.ts.map +1 -0
  422. package/dist/scope-membership-wire.d.ts +4 -0
  423. package/dist/scope-membership-wire.d.ts.map +1 -0
  424. package/dist/scope-resolution.d.ts +15 -37
  425. package/dist/scope-resolution.d.ts.map +1 -1
  426. package/dist/scope-stamping.d.ts +7 -0
  427. package/dist/scope-stamping.d.ts.map +1 -1
  428. package/dist/scope-write-authority-error.d.ts +5 -0
  429. package/dist/scope-write-authority-error.d.ts.map +1 -0
  430. package/dist/search.d.ts +3 -1
  431. package/dist/search.d.ts.map +1 -1
  432. package/dist/session-export-identity-mutation.d.ts +4 -0
  433. package/dist/session-export-identity-mutation.d.ts.map +1 -0
  434. package/dist/session-export-identity.d.ts +7 -0
  435. package/dist/session-export-identity.d.ts.map +1 -0
  436. package/dist/shared-owned-device-enrollment-test-harness.d.ts +33 -0
  437. package/dist/shared-owned-device-enrollment-test-harness.d.ts.map +1 -0
  438. package/dist/shared-owned-join-approval-test-harness.d.ts +9 -0
  439. package/dist/shared-owned-join-approval-test-harness.d.ts.map +1 -0
  440. package/dist/shared-owned-project-invites-test-harness.d.ts +23 -0
  441. package/dist/shared-owned-project-invites-test-harness.d.ts.map +1 -0
  442. package/dist/shared-owned-recipient-invites-test-harness.d.ts +11 -0
  443. package/dist/shared-owned-recipient-invites-test-harness.d.ts.map +1 -0
  444. package/dist/shared-ownership-writer-lifecycle-test-harness.d.ts +19 -0
  445. package/dist/shared-ownership-writer-lifecycle-test-harness.d.ts.map +1 -0
  446. package/dist/store.d.ts +81 -13
  447. package/dist/store.d.ts.map +1 -1
  448. package/dist/summary-memory.d.ts +1 -1
  449. package/dist/summary-memory.d.ts.map +1 -1
  450. package/dist/sync-bootstrap.d.ts.map +1 -1
  451. package/dist/sync-http-client.d.ts +1 -0
  452. package/dist/sync-http-client.d.ts.map +1 -1
  453. package/dist/sync-identity.d.ts +6 -0
  454. package/dist/sync-identity.d.ts.map +1 -1
  455. package/dist/sync-pass.d.ts.map +1 -1
  456. package/dist/sync-replication.d.ts +6 -3
  457. package/dist/sync-replication.d.ts.map +1 -1
  458. package/dist/sync-scope-protocol.d.ts +6 -0
  459. package/dist/sync-scope-protocol.d.ts.map +1 -1
  460. package/dist/sync-status-test-fixtures.d.ts +21 -0
  461. package/dist/sync-status-test-fixtures.d.ts.map +1 -0
  462. package/dist/test-schema.generated.d.ts +1 -1
  463. package/dist/test-schema.generated.d.ts.map +1 -1
  464. package/dist/vector-corpus-epoch.d.ts +10 -0
  465. package/dist/vector-corpus-epoch.d.ts.map +1 -0
  466. package/dist/vector-cutover-validation.d.ts +19 -0
  467. package/dist/vector-cutover-validation.d.ts.map +1 -0
  468. package/dist/vector-metadata-snapshot.d.ts +21 -0
  469. package/dist/vector-metadata-snapshot.d.ts.map +1 -0
  470. package/dist/vector-migration.d.ts.map +1 -1
  471. package/dist/vectors.d.ts +8 -1
  472. package/dist/vectors.d.ts.map +1 -1
  473. package/dist/wildcard-match.d.ts +9 -0
  474. package/dist/wildcard-match.d.ts.map +1 -0
  475. package/dist/workspace-identity.d.ts +18 -0
  476. package/dist/workspace-identity.d.ts.map +1 -0
  477. package/package.json +5 -4
  478. package/dist/coordinator-api-CdUQtf5l.js +0 -3755
  479. package/dist/coordinator-api-CdUQtf5l.js.map +0 -1
  480. package/dist/promise-B3UhYSzv.js.map +0 -1
  481. package/dist/service-contender-9rqn6x4v-pocTjwT1.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-owner-enrollment-http.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-http.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,67 @@
1
+ /** Private ceremony metadata and pending-key proof, never current account/group authority. */
2
+ export interface OwnerAttempt {
3
+ coordinator_id: string;
4
+ attempt_id: string;
5
+ purpose: "owner_enroll";
6
+ origin: string;
7
+ device_id: string;
8
+ public_key: string;
9
+ key_id: string;
10
+ fingerprint: string;
11
+ issuer: string;
12
+ auth_config_revision: string;
13
+ admission_owner_hash: string | null;
14
+ loopback_redirect: string | null;
15
+ browser_start_hash: string;
16
+ browser_transaction_hash: string | null;
17
+ browser_binder_hash: string | null;
18
+ account_subject: string | null;
19
+ identity_id: string | null;
20
+ link_id: string | null;
21
+ link_attempt_id: string | null;
22
+ link_controller_attestation_id: string | null;
23
+ link_auth_config_revision: string | null;
24
+ grant_revisions_json: string | null;
25
+ confirmation_hash: string | null;
26
+ completion_secret_hash: string | null;
27
+ final_key_proof_hash: string | null;
28
+ state: string;
29
+ created_at_ms: number;
30
+ expires_at_ms: number;
31
+ finalized_at_ms: number | null;
32
+ binding_id: string | null;
33
+ audit_event_id: string | null;
34
+ final_outcome_json: string | null;
35
+ }
36
+ /** The optional column exists only after explicit schema installation. */
37
+ export interface OwnerAuthorityAttempt extends OwnerAttempt {
38
+ owner_qualification_id?: string | null;
39
+ }
40
+ export interface GrantPin {
41
+ groupId: string;
42
+ revision: number;
43
+ }
44
+ export declare function readGrantPins(value: string | null): GrantPin[] | null;
45
+ export declare function validAttemptTime(row: OwnerAttempt): boolean;
46
+ export declare function validWriteTime(value: unknown): value is number;
47
+ type OwnerFinalPins = Pick<OwnerAttempt, "coordinator_id" | "origin" | "auth_config_revision" | "attempt_id" | "device_id" | "public_key" | "key_id" | "fingerprint" | "issuer" | "confirmation_hash">;
48
+ /** The pending device can sign these pins from its start and the owner-only loopback delivery. */
49
+ export declare function ownerEnrollmentFinalMessage(a: OwnerFinalPins, completionSecret: string): string;
50
+ /** Commitment shown to the original browser, including the exact linked account and grants. */
51
+ export declare function ownerEnrollmentConfirmationHash(a: OwnerAuthorityAttempt): Promise<string>;
52
+ /** Verifies the pending-key signature and hashes proof bytes, not the stored completion hash or current authority. */
53
+ export declare function verifyPendingKeySignatureAndHashes(a: OwnerAttempt, completionSecret: string, signature: string): Promise<{
54
+ completionHash: string;
55
+ keyProofHash: string;
56
+ } | null>;
57
+ export declare function verifyOwnerEnrollmentSignature(publicKey: string, message: string, signature: string): Promise<boolean>;
58
+ /** Validates proof and metadata only; the atomic writer must still check live authority in SQL. */
59
+ export declare function verifyOwnerEnrollmentCompletion(a: OwnerAttempt, revision: string, now: number, completionSecret: string, signature: string): Promise<{
60
+ completionHash: string;
61
+ keyProofHash: string;
62
+ grants: GrantPin[];
63
+ } | null>;
64
+ /** Receipt shape is not evidence that a database commit occurred or permission remains active. */
65
+ export declare function validOwnerEnrollmentReceiptMetadata(a: OwnerAttempt): boolean;
66
+ export {};
67
+ //# sourceMappingURL=coordinator-owner-enrollment-proof.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-owner-enrollment-proof.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-proof.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Inert storage only, not an issuer or proof of authority. Future issuance must
3
+ * resolve every fact server-side from the exact link, claim and genuine review.
4
+ * No subject/email copy or cascading references: historical evidence survives
5
+ * removal or revocation of the original device. Nothing installs this on open.
6
+ */
7
+ export interface CoordinatorOwnerEnrollmentQualificationRow {
8
+ readonly qualification_id: string;
9
+ readonly coordinator_id: string;
10
+ readonly link_id: string;
11
+ readonly device_claim_id: string;
12
+ readonly identity_id: string;
13
+ readonly source_group_id: string;
14
+ readonly device_id: string;
15
+ readonly public_key: string;
16
+ readonly fingerprint: string;
17
+ readonly key_id: string;
18
+ readonly controller_attestation_id: string;
19
+ readonly controller_attestation_revision: number;
20
+ readonly controller_attestation_created_at: string;
21
+ readonly review_receipt_id: string;
22
+ readonly evidence_digest: string;
23
+ readonly enrollment_identity_id: string | null;
24
+ readonly link_attempt_id: string;
25
+ readonly link_auth_config_revision: string;
26
+ readonly link_created_at_ms: number;
27
+ readonly created_at_ms: number;
28
+ readonly revoked_at_ms: number | null;
29
+ }
30
+ export declare const COORDINATOR_OWNER_ENROLLMENT_QUALIFICATION_SCHEMA_STATEMENTS: readonly [`
31
+ CREATE TABLE IF NOT EXISTS coordinator_owner_enrollment_qualifications (
32
+ qualification_id TEXT PRIMARY KEY NOT NULL CHECK (typeof(qualification_id) = 'text' AND length(qualification_id) BETWEEN 1 AND 256 AND qualification_id = trim(qualification_id) AND length(trim(qualification_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(qualification_id, char(0)) = 0),
33
+ coordinator_id TEXT NOT NULL CHECK (typeof(coordinator_id) = 'text' AND length(coordinator_id) BETWEEN 1 AND 256 AND coordinator_id = trim(coordinator_id) AND length(trim(coordinator_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(coordinator_id, char(0)) = 0),
34
+ link_id TEXT NOT NULL CHECK (typeof(link_id) = 'text' AND length(link_id) BETWEEN 1 AND 256 AND link_id = trim(link_id) AND length(trim(link_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(link_id, char(0)) = 0),
35
+ device_claim_id TEXT NOT NULL CHECK (typeof(device_claim_id) = 'text' AND length(device_claim_id) BETWEEN 1 AND 256 AND device_claim_id = trim(device_claim_id) AND length(trim(device_claim_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(device_claim_id, char(0)) = 0),
36
+ identity_id TEXT NOT NULL CHECK (typeof(identity_id) = 'text' AND length(identity_id) BETWEEN 1 AND 256 AND identity_id = trim(identity_id) AND length(trim(identity_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(identity_id, char(0)) = 0),
37
+ source_group_id TEXT NOT NULL CHECK (typeof(source_group_id) = 'text' AND length(source_group_id) BETWEEN 1 AND 256 AND source_group_id = trim(source_group_id) AND length(trim(source_group_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(source_group_id, char(0)) = 0),
38
+ device_id TEXT NOT NULL CHECK (typeof(device_id) = 'text' AND length(device_id) BETWEEN 1 AND 256 AND device_id = trim(device_id) AND length(trim(device_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(device_id, char(0)) = 0),
39
+ public_key TEXT NOT NULL CHECK (typeof(public_key) = 'text' AND length(public_key) BETWEEN 1 AND 4096 AND length(trim(public_key, char(9)||char(10)||char(13)||' ')) > 0 AND instr(public_key, char(0)) = 0),
40
+ fingerprint TEXT NOT NULL CHECK (typeof(fingerprint) = 'text' AND length(fingerprint) = 64 AND fingerprint NOT GLOB '*[^0-9a-f]*' AND instr(fingerprint, char(0)) = 0),
41
+ key_id TEXT NOT NULL CHECK (typeof(key_id) = 'text' AND length(key_id) = 64 AND key_id NOT GLOB '*[^0-9a-f]*' AND instr(key_id, char(0)) = 0),
42
+ controller_attestation_id TEXT NOT NULL CHECK (typeof(controller_attestation_id) = 'text' AND length(controller_attestation_id) BETWEEN 1 AND 256 AND controller_attestation_id = trim(controller_attestation_id) AND length(trim(controller_attestation_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(controller_attestation_id, char(0)) = 0),
43
+ controller_attestation_revision INTEGER NOT NULL CHECK (typeof(controller_attestation_revision) = 'integer' AND controller_attestation_revision = 1),
44
+ controller_attestation_created_at TEXT NOT NULL CHECK (typeof(controller_attestation_created_at) = 'text' AND length(trim(controller_attestation_created_at, char(9)||char(10)||char(13)||' ')) > 0 AND instr(controller_attestation_created_at, char(0)) = 0),
45
+ review_receipt_id TEXT NOT NULL CHECK (typeof(review_receipt_id) = 'text' AND length(review_receipt_id) BETWEEN 1 AND 256 AND review_receipt_id = trim(review_receipt_id) AND length(trim(review_receipt_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(review_receipt_id, char(0)) = 0),
46
+ evidence_digest TEXT NOT NULL CHECK (typeof(evidence_digest) = 'text' AND length(evidence_digest) = 64 AND evidence_digest NOT GLOB '*[^0-9a-f]*' AND instr(evidence_digest, char(0)) = 0),
47
+ enrollment_identity_id TEXT CHECK (enrollment_identity_id IS NULL OR (typeof(enrollment_identity_id) = 'text' AND length(enrollment_identity_id) BETWEEN 1 AND 256 AND enrollment_identity_id = trim(enrollment_identity_id) AND length(trim(enrollment_identity_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(enrollment_identity_id, char(0)) = 0)),
48
+ link_attempt_id TEXT NOT NULL CHECK (typeof(link_attempt_id) = 'text' AND length(link_attempt_id) BETWEEN 1 AND 256 AND link_attempt_id = trim(link_attempt_id) AND length(trim(link_attempt_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(link_attempt_id, char(0)) = 0),
49
+ link_auth_config_revision TEXT NOT NULL CHECK (typeof(link_auth_config_revision) = 'text' AND length(link_auth_config_revision) = 64 AND link_auth_config_revision NOT GLOB '*[^0-9a-f]*' AND instr(link_auth_config_revision, char(0)) = 0),
50
+ link_created_at_ms INTEGER NOT NULL CHECK (typeof(link_created_at_ms) = 'integer' AND link_created_at_ms BETWEEN 0 AND 9007199254740991),
51
+ created_at_ms INTEGER NOT NULL CHECK (typeof(created_at_ms) = 'integer' AND created_at_ms BETWEEN link_created_at_ms AND 9007199254740991),
52
+ revoked_at_ms INTEGER CHECK (revoked_at_ms IS NULL OR (typeof(revoked_at_ms) = 'integer' AND revoked_at_ms BETWEEN created_at_ms AND 9007199254740991)),
53
+ UNIQUE (coordinator_id, link_id)
54
+ ) WITHOUT ROWID;
55
+ `, `
56
+ -- Qualifications are born active; revocation requires an explicit UPDATE.
57
+ CREATE TRIGGER IF NOT EXISTS owner_enrollment_qualification_insert_active
58
+ BEFORE INSERT ON coordinator_owner_enrollment_qualifications
59
+ WHEN NEW.revoked_at_ms IS NOT NULL
60
+ BEGIN SELECT RAISE(ABORT, 'owner_enrollment_qualification_birth_revoked'); END;
61
+ `, `
62
+ -- Each collision probe uses a unique index, never a coordinator-wide OR scan.
63
+ -- Reject even same-value UPSERT/REPLACE: revocation must use explicit UPDATE.
64
+ CREATE TRIGGER IF NOT EXISTS owner_enrollment_qualification_insert_collision
65
+ BEFORE INSERT ON coordinator_owner_enrollment_qualifications
66
+ WHEN EXISTS (SELECT 1 FROM coordinator_owner_enrollment_qualifications WHERE qualification_id = NEW.qualification_id)
67
+ OR EXISTS (SELECT 1 FROM coordinator_owner_enrollment_qualifications WHERE coordinator_id = NEW.coordinator_id AND link_id = NEW.link_id)
68
+ BEGIN SELECT RAISE(ABORT, 'owner_enrollment_qualification_collision'); END;
69
+ `, `
70
+ -- Compare storage classes explicitly, including the nullable enrollment snapshot.
71
+ CREATE TRIGGER IF NOT EXISTS owner_enrollment_qualification_immutable_update
72
+ BEFORE UPDATE ON coordinator_owner_enrollment_qualifications
73
+ WHEN OLD.qualification_id IS NOT NEW.qualification_id OR typeof(NEW.qualification_id) <> 'text'
74
+ OR OLD.coordinator_id IS NOT NEW.coordinator_id OR typeof(NEW.coordinator_id) <> 'text'
75
+ OR OLD.link_id IS NOT NEW.link_id OR typeof(NEW.link_id) <> 'text'
76
+ OR OLD.device_claim_id IS NOT NEW.device_claim_id OR typeof(NEW.device_claim_id) <> 'text'
77
+ OR OLD.identity_id IS NOT NEW.identity_id OR typeof(NEW.identity_id) <> 'text'
78
+ OR OLD.source_group_id IS NOT NEW.source_group_id OR typeof(NEW.source_group_id) <> 'text'
79
+ OR OLD.device_id IS NOT NEW.device_id OR typeof(NEW.device_id) <> 'text'
80
+ OR OLD.public_key IS NOT NEW.public_key OR typeof(NEW.public_key) <> 'text'
81
+ OR OLD.fingerprint IS NOT NEW.fingerprint OR typeof(NEW.fingerprint) <> 'text'
82
+ OR OLD.key_id IS NOT NEW.key_id OR typeof(NEW.key_id) <> 'text'
83
+ OR OLD.controller_attestation_id IS NOT NEW.controller_attestation_id OR typeof(NEW.controller_attestation_id) <> 'text'
84
+ OR OLD.controller_attestation_revision IS NOT NEW.controller_attestation_revision OR typeof(NEW.controller_attestation_revision) <> 'integer'
85
+ OR OLD.controller_attestation_created_at IS NOT NEW.controller_attestation_created_at OR typeof(NEW.controller_attestation_created_at) <> 'text'
86
+ OR OLD.review_receipt_id IS NOT NEW.review_receipt_id OR typeof(NEW.review_receipt_id) <> 'text'
87
+ OR OLD.evidence_digest IS NOT NEW.evidence_digest OR typeof(NEW.evidence_digest) <> 'text'
88
+ OR OLD.enrollment_identity_id IS NOT NEW.enrollment_identity_id OR typeof(OLD.enrollment_identity_id) <> typeof(NEW.enrollment_identity_id)
89
+ OR OLD.link_attempt_id IS NOT NEW.link_attempt_id OR typeof(NEW.link_attempt_id) <> 'text'
90
+ OR OLD.link_auth_config_revision IS NOT NEW.link_auth_config_revision OR typeof(NEW.link_auth_config_revision) <> 'text'
91
+ OR OLD.link_created_at_ms IS NOT NEW.link_created_at_ms OR typeof(NEW.link_created_at_ms) <> 'integer'
92
+ OR OLD.created_at_ms IS NOT NEW.created_at_ms OR typeof(NEW.created_at_ms) <> 'integer'
93
+ BEGIN SELECT RAISE(ABORT, 'owner_enrollment_qualification_immutable'); END;
94
+ `, `
95
+ CREATE TRIGGER IF NOT EXISTS owner_enrollment_qualification_revocation_update
96
+ BEFORE UPDATE ON coordinator_owner_enrollment_qualifications
97
+ WHEN (OLD.revoked_at_ms IS NOT NULL AND OLD.revoked_at_ms IS NOT NEW.revoked_at_ms)
98
+ OR (NEW.revoked_at_ms IS NOT NULL AND (typeof(NEW.revoked_at_ms) <> 'integer'
99
+ OR NEW.revoked_at_ms < OLD.created_at_ms OR NEW.revoked_at_ms > 9007199254740991))
100
+ BEGIN SELECT RAISE(ABORT, 'owner_enrollment_qualification_revocation_monotonic'); END;
101
+ `, `
102
+ CREATE TRIGGER IF NOT EXISTS owner_enrollment_qualification_immutable_delete
103
+ BEFORE DELETE ON coordinator_owner_enrollment_qualifications
104
+ BEGIN SELECT RAISE(ABORT, 'owner_enrollment_qualification_immutable'); END;
105
+ `];
106
+ export declare const COORDINATOR_OWNER_ENROLLMENT_QUALIFICATION_SCHEMA_SQL: string;
107
+ //# sourceMappingURL=coordinator-owner-enrollment-qualification-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-owner-enrollment-qualification-schema.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-qualification-schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,0CAA0C;IAC1D,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,+BAA+B,EAAE,MAAM,CAAC;IACjD,QAAQ,CAAC,iCAAiC,EAAE,MAAM,CAAC;IACnD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAGD,eAAO,MAAM,4DAA4D,YACxE;;;;;;;;;;;;;;;;;;;;;;;;;CAyBA,EACA;;;;;;CAMA,EACA;;;;;;;;CAQA,EACA;;;;;;;;;;;;;;;;;;;;;;;;;CAyBA,EACA;;;;;;;CAOA,EACA;;;;CAIA,CACS,CAAC;AAEX,eAAO,MAAM,qDAAqD,QACM,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { SchemaFixture } from "./coordinator-auth-browser-migration-test-harness.js";
2
+ export declare const QUALIFICATION_TABLE = "coordinator_owner_enrollment_qualifications";
3
+ export declare const qualificationDefinitions = "SELECT type,name,sql FROM sqlite_master WHERE tbl_name = 'coordinator_owner_enrollment_qualifications' AND sql IS NOT NULL ORDER BY type,name";
4
+ export declare const qualification: {
5
+ qualification_id: string;
6
+ coordinator_id: string;
7
+ link_id: string;
8
+ device_claim_id: string;
9
+ identity_id: string;
10
+ source_group_id: string;
11
+ device_id: string;
12
+ public_key: string;
13
+ fingerprint: string;
14
+ key_id: string;
15
+ controller_attestation_id: string;
16
+ controller_attestation_revision: number;
17
+ controller_attestation_created_at: string;
18
+ review_receipt_id: string;
19
+ evidence_digest: string;
20
+ enrollment_identity_id: string;
21
+ link_attempt_id: string;
22
+ link_auth_config_revision: string;
23
+ link_created_at_ms: number;
24
+ created_at_ms: number;
25
+ revoked_at_ms: null;
26
+ };
27
+ type Value = string | number | null;
28
+ export declare function insertQualification(f: SchemaFixture, row?: Record<string, Value>, { mode, suffix }?: {
29
+ mode?: string;
30
+ suffix?: string;
31
+ }): Promise<void>;
32
+ export declare function qualificationRows(f: SchemaFixture): Promise<Record<string, unknown>[]>;
33
+ export declare function qualificationHarness(fixture: (use: (f: SchemaFixture) => Promise<void>) => Promise<void>): import("vitest").TestAPI<{
34
+ fixture: SchemaFixture;
35
+ }>;
36
+ type Test = ReturnType<typeof qualificationHarness>;
37
+ export declare function registerQualificationSchemaTests(test: Test): void;
38
+ export {};
39
+ //# sourceMappingURL=coordinator-owner-enrollment-qualification-test-harness.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,56 @@
1
+ import { type AuthLinkBackend } from "./coordinator-auth-link.js";
2
+ import type { CoordinatorAuthLinkConfig } from "./coordinator-auth-link-contract.js";
3
+ /** Internal admin capability only. No route, store startup, grant or owner consumer uses it. */
4
+ export type OwnerQualificationRejected = {
5
+ kind: "rejected";
6
+ error: "invalid_input" | "unavailable" | "preview_changed" | "qualification_conflict";
7
+ };
8
+ /** The write may have committed. This is not a denial or proof of rollback. */
9
+ export type OwnerQualificationOutcomeUnknown = {
10
+ kind: "outcome_unknown";
11
+ };
12
+ export interface OwnerQualificationPreview {
13
+ kind: "ready";
14
+ digest: string;
15
+ attestationId: string;
16
+ reviewReceiptId: string;
17
+ linkId: string;
18
+ claimId: string;
19
+ identityId: string;
20
+ groupId: string;
21
+ deviceId: string;
22
+ fingerprint: string;
23
+ }
24
+ export declare class OwnerEnrollmentQualificationOps {
25
+ private readonly backend;
26
+ private readonly clock;
27
+ private readonly config;
28
+ constructor(backend: AuthLinkBackend, config: CoordinatorAuthLinkConfig, clock?: () => number);
29
+ /** Read-only deployment check; operations repeat it before resolving authority. */
30
+ schemaReady(): Promise<boolean>;
31
+ private prepare;
32
+ private liveStatement;
33
+ private live;
34
+ preview(input: {
35
+ attestationId: string;
36
+ }): Promise<OwnerQualificationPreview | OwnerQualificationRejected>;
37
+ issue(input: {
38
+ attestationId: string;
39
+ expectedDigest: string;
40
+ }): Promise<{
41
+ kind: "created" | "existing";
42
+ qualificationId: string;
43
+ } | OwnerQualificationRejected | OwnerQualificationOutcomeUnknown>;
44
+ private existing;
45
+ /** Revoke only a fixed server-resolved record/link pair; never require the old device to live. */
46
+ revoke(input: {
47
+ qualificationId: string;
48
+ linkId: string;
49
+ }): Promise<{
50
+ kind: "revoked";
51
+ qualificationId: string;
52
+ } | OwnerQualificationRejected | OwnerQualificationOutcomeUnknown>;
53
+ private matches;
54
+ private retry;
55
+ }
56
+ //# sourceMappingURL=coordinator-owner-enrollment-qualification.d.ts.map
@@ -0,0 +1 @@
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,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACpB;AAoHD,qBAAa,+BAA+B;IAG1C,OAAO,CAAC,QAAQ,CAAC,OAAO;IAExB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAJvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAC1D,YACkB,OAAO,EAAE,eAAe,EACzC,MAAM,EAAE,yBAAyB,EAChB,KAAK,GAAE,MAAM,MAAiB,EAI/C;IACD,mFAAmF;IAC7E,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAUpC;YACa,OAAO;IA4BrB,OAAO,CAAC,aAAa;YAiBP,IAAI;IAIZ,OAAO,CAAC,KAAK,EAAE;QACpB,aAAa,EAAE,MAAM,CAAC;KACtB,GAAG,OAAO,CAAC,yBAAyB,GAAG,0BAA0B,CAAC,CAalE;IACK,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"}
@@ -0,0 +1,7 @@
1
+ /** Inert ceremony storage, not a verified-identity capability or an enrollment writer.
2
+ * Finalized rows are retained prior-commit receipts, never current permission.
3
+ * The winning future UPDATE must write the outcome and purge handoff material together.
4
+ * Fresh installs only: existing tables require explicit migration 0036, never a rebuild on open.
5
+ */
6
+ export declare const COORDINATOR_OWNER_ENROLLMENT_SCHEMA_SQL = "\nCREATE TABLE IF NOT EXISTS coordinator_owner_enrollment_attempts (\n coordinator_id TEXT NOT NULL CHECK (typeof(coordinator_id) = 'text' AND length(trim(coordinator_id)) BETWEEN 1 AND 256 AND instr(coordinator_id, char(0)) = 0),\n attempt_id TEXT NOT NULL CHECK (typeof(attempt_id) = 'text' AND length(trim(attempt_id)) BETWEEN 1 AND 256 AND instr(attempt_id, char(0)) = 0),\n purpose TEXT NOT NULL CHECK (purpose = 'owner_enroll'),\n origin TEXT NOT NULL CHECK (typeof(origin) = 'text' AND length(trim(origin)) > 0 AND instr(origin, char(0)) = 0),\n device_id TEXT NOT NULL CHECK (typeof(device_id) = 'text' AND length(trim(device_id)) BETWEEN 1 AND 256 AND instr(device_id, char(0)) = 0),\n public_key TEXT NOT NULL CHECK (typeof(public_key) = 'text' AND length(trim(public_key)) > 0 AND instr(public_key, char(0)) = 0),\n key_id TEXT NOT NULL CHECK (typeof(key_id) = 'text' AND length(key_id) = 64 AND key_id NOT GLOB '*[^0-9a-f]*' AND instr(key_id, char(0)) = 0),\n fingerprint TEXT NOT NULL CHECK (typeof(fingerprint) = 'text' AND length(fingerprint) = 64 AND fingerprint NOT GLOB '*[^0-9a-f]*' AND instr(fingerprint, char(0)) = 0),\n issuer TEXT NOT NULL CHECK (typeof(issuer) = 'text' AND length(trim(issuer)) > 0 AND instr(issuer, char(0)) = 0),\n auth_config_revision TEXT NOT NULL CHECK (typeof(auth_config_revision) = 'text' AND length(auth_config_revision) = 64 AND auth_config_revision NOT GLOB '*[^0-9a-f]*' AND instr(auth_config_revision, char(0)) = 0),\n loopback_redirect TEXT CHECK (loopback_redirect IS NULL OR (typeof(loopback_redirect) = 'text' AND length(trim(loopback_redirect)) > 0 AND instr(loopback_redirect, char(0)) = 0)),\n browser_start_hash TEXT NOT NULL CHECK (typeof(browser_start_hash) = 'text' AND length(browser_start_hash) = 64 AND browser_start_hash NOT GLOB '*[^0-9a-f]*' AND instr(browser_start_hash, char(0)) = 0),\n browser_transaction_hash TEXT CHECK (browser_transaction_hash IS NULL OR (typeof(browser_transaction_hash) = 'text' AND length(browser_transaction_hash) = 64 AND browser_transaction_hash NOT GLOB '*[^0-9a-f]*' AND instr(browser_transaction_hash, char(0)) = 0)),\n browser_binder_hash TEXT CHECK (browser_binder_hash IS NULL OR (typeof(browser_binder_hash) = 'text' AND length(browser_binder_hash) = 64 AND browser_binder_hash NOT GLOB '*[^0-9a-f]*' AND instr(browser_binder_hash, char(0)) = 0)),\n account_subject TEXT CHECK (account_subject IS NULL OR (typeof(account_subject) = 'text' AND length(account_subject) BETWEEN 1 AND 255 AND instr(account_subject, char(0)) = 0)),\n identity_id TEXT CHECK (identity_id IS NULL OR (typeof(identity_id) = 'text' AND length(trim(identity_id)) BETWEEN 1 AND 256 AND instr(identity_id, char(0)) = 0)),\n link_id TEXT CHECK (link_id IS NULL OR (typeof(link_id) = 'text' AND length(trim(link_id)) BETWEEN 1 AND 256 AND instr(link_id, char(0)) = 0)),\n link_attempt_id TEXT CHECK (link_attempt_id IS NULL OR (typeof(link_attempt_id) = 'text' AND length(trim(link_attempt_id)) BETWEEN 1 AND 256 AND instr(link_attempt_id, char(0)) = 0)),\n link_controller_attestation_id TEXT CHECK (link_controller_attestation_id IS NULL OR (typeof(link_controller_attestation_id) = 'text' AND length(trim(link_controller_attestation_id)) BETWEEN 1 AND 256 AND instr(link_controller_attestation_id, char(0)) = 0)),\n link_auth_config_revision TEXT CHECK (link_auth_config_revision IS NULL OR (typeof(link_auth_config_revision) = 'text' AND length(link_auth_config_revision) = 64 AND link_auth_config_revision NOT GLOB '*[^0-9a-f]*' AND instr(link_auth_config_revision, char(0)) = 0)),\n grant_revisions_json TEXT CHECK (grant_revisions_json IS NULL OR (typeof(grant_revisions_json) = 'text' AND json_valid(grant_revisions_json) AND json_type(grant_revisions_json) = 'array')),\n confirmation_hash TEXT CHECK (confirmation_hash IS NULL OR (typeof(confirmation_hash) = 'text' AND length(confirmation_hash) = 64 AND confirmation_hash NOT GLOB '*[^0-9a-f]*' AND instr(confirmation_hash, char(0)) = 0)),\n completion_secret_hash TEXT CHECK (completion_secret_hash IS NULL OR (typeof(completion_secret_hash) = 'text' AND length(completion_secret_hash) = 64 AND completion_secret_hash NOT GLOB '*[^0-9a-f]*' AND instr(completion_secret_hash, char(0)) = 0)),\n final_key_proof_hash TEXT CHECK (final_key_proof_hash IS NULL OR (typeof(final_key_proof_hash) = 'text' AND length(final_key_proof_hash) = 64 AND final_key_proof_hash NOT GLOB '*[^0-9a-f]*' AND instr(final_key_proof_hash, char(0)) = 0)),\n state TEXT NOT NULL CHECK (state IN ('pending','browser_claimed','oidc_verified','confirmed','finalized','expired','failed','retired')),\n created_at_ms INTEGER NOT NULL CHECK (typeof(created_at_ms) = 'integer' AND created_at_ms BETWEEN 0 AND 9007199254140991),\n expires_at_ms INTEGER NOT NULL CHECK (typeof(expires_at_ms) = 'integer' AND expires_at_ms = created_at_ms + 600000),\n finalized_at_ms INTEGER CHECK (finalized_at_ms IS NULL OR (typeof(finalized_at_ms) = 'integer' AND finalized_at_ms >= created_at_ms AND finalized_at_ms < expires_at_ms)),\n binding_id TEXT CHECK (binding_id IS NULL OR (typeof(binding_id) = 'text' AND length(trim(binding_id)) BETWEEN 1 AND 256 AND instr(binding_id, char(0)) = 0)),\n audit_event_id TEXT CHECK (audit_event_id IS NULL OR (typeof(audit_event_id) = 'text' AND length(trim(audit_event_id)) BETWEEN 1 AND 256 AND instr(audit_event_id, char(0)) = 0)),\n final_outcome_json TEXT CHECK (final_outcome_json IS NULL OR (typeof(final_outcome_json) = 'text' AND json_valid(final_outcome_json) AND json_type(final_outcome_json) = 'object')),\n admission_owner_hash TEXT CHECK (admission_owner_hash IS NULL OR (typeof(admission_owner_hash) = 'text' AND length(admission_owner_hash) = 64 AND admission_owner_hash NOT GLOB '*[^0-9a-f]*' AND instr(admission_owner_hash, char(0)) = 0)),\n owner_qualification_id TEXT CHECK (owner_qualification_id IS NULL OR (typeof(owner_qualification_id) = 'text' AND length(owner_qualification_id) BETWEEN 1 AND 256 AND owner_qualification_id = trim(owner_qualification_id) AND length(trim(owner_qualification_id, char(9)||char(10)||char(13)||' ')) > 0 AND instr(owner_qualification_id, char(0)) = 0)),\n PRIMARY KEY (coordinator_id, attempt_id),\n UNIQUE (coordinator_id, browser_start_hash),\n UNIQUE (coordinator_id, browser_transaction_hash),\n UNIQUE (coordinator_id, completion_secret_hash),\n CHECK (state NOT IN ('pending','browser_claimed','oidc_verified','confirmed') OR loopback_redirect IS NOT NULL),\n CHECK (state <> 'pending' OR browser_transaction_hash IS NULL),\n CHECK ((browser_transaction_hash IS NULL) = (browser_binder_hash IS NULL)),\n CHECK (state NOT IN ('pending','browser_claimed') OR account_subject IS NULL),\n CHECK (state NOT IN ('pending','browser_claimed','oidc_verified') OR (confirmation_hash IS NULL AND completion_secret_hash IS NULL)),\n CHECK (state NOT IN ('browser_claimed','oidc_verified','confirmed','finalized') OR browser_transaction_hash IS NOT NULL),\n CHECK ((account_subject IS NULL AND identity_id IS NULL AND link_id IS NULL AND link_attempt_id IS NULL AND link_controller_attestation_id IS NULL AND owner_qualification_id IS NULL AND link_auth_config_revision IS NULL AND grant_revisions_json IS NULL) OR (account_subject IS NOT NULL AND identity_id IS NOT NULL AND link_id IS NOT NULL AND link_attempt_id IS NOT NULL AND ((link_controller_attestation_id IS NOT NULL AND owner_qualification_id IS NULL) OR (link_controller_attestation_id IS NULL AND owner_qualification_id IS NOT NULL)) AND link_auth_config_revision IS NOT NULL AND grant_revisions_json IS NOT NULL)),\n CHECK (state NOT IN ('oidc_verified','confirmed','finalized') OR account_subject IS NOT NULL),\n CHECK (state NOT IN ('confirmed','finalized') OR (confirmation_hash IS NOT NULL AND completion_secret_hash IS NOT NULL)),\n CHECK ((state = 'finalized' AND finalized_at_ms IS NOT NULL AND binding_id IS NOT NULL AND audit_event_id IS NOT NULL AND final_outcome_json IS NOT NULL AND final_key_proof_hash IS NOT NULL AND loopback_redirect IS NULL) OR (state <> 'finalized' AND finalized_at_ms IS NULL AND binding_id IS NULL AND audit_event_id IS NULL AND final_outcome_json IS NULL AND final_key_proof_hash IS NULL))\n);\nCREATE INDEX IF NOT EXISTS idx_owner_enrollment_device_created\n ON coordinator_owner_enrollment_attempts(coordinator_id, device_id, created_at_ms);\nCREATE INDEX IF NOT EXISTS idx_owner_enrollment_identity_expiry\n ON coordinator_owner_enrollment_attempts(coordinator_id, identity_id, expires_at_ms);\nCREATE INDEX IF NOT EXISTS idx_owner_enrollment_state_expiry\n ON coordinator_owner_enrollment_attempts(coordinator_id, state, expires_at_ms);\n-- Birth facts and recorded commitments survive retries and transient browser cleanup.\nCREATE TRIGGER IF NOT EXISTS owner_enrollment_pins_update\nBEFORE UPDATE ON coordinator_owner_enrollment_attempts WHEN OLD.state <> 'finalized' AND (\n OLD.coordinator_id IS NOT NEW.coordinator_id OR OLD.attempt_id IS NOT NEW.attempt_id\n OR OLD.purpose IS NOT NEW.purpose OR OLD.origin IS NOT NEW.origin\n OR OLD.device_id IS NOT NEW.device_id OR OLD.public_key IS NOT NEW.public_key\n OR OLD.key_id IS NOT NEW.key_id OR OLD.fingerprint IS NOT NEW.fingerprint\n OR OLD.issuer IS NOT NEW.issuer OR OLD.auth_config_revision IS NOT NEW.auth_config_revision\n OR OLD.browser_start_hash IS NOT NEW.browser_start_hash\n OR OLD.created_at_ms IS NOT NEW.created_at_ms OR OLD.expires_at_ms IS NOT NEW.expires_at_ms\n OR (OLD.loopback_redirect IS NOT NEW.loopback_redirect AND NOT (\n OLD.loopback_redirect IS NOT NULL AND NEW.loopback_redirect IS NULL\n AND NEW.state IN ('finalized','expired','failed','retired')))\n OR (OLD.browser_transaction_hash IS NOT NULL AND OLD.browser_transaction_hash IS NOT NEW.browser_transaction_hash)\n OR (OLD.browser_binder_hash IS NOT NULL AND OLD.browser_binder_hash IS NOT NEW.browser_binder_hash)\n OR (OLD.account_subject IS NOT NULL AND OLD.account_subject IS NOT NEW.account_subject)\n OR (OLD.identity_id IS NOT NULL AND OLD.identity_id IS NOT NEW.identity_id)\n OR (OLD.link_id IS NOT NULL AND OLD.link_id IS NOT NEW.link_id)\n OR (OLD.link_attempt_id IS NOT NULL AND OLD.link_attempt_id IS NOT NEW.link_attempt_id)\n OR (OLD.link_controller_attestation_id IS NOT NULL AND OLD.link_controller_attestation_id IS NOT NEW.link_controller_attestation_id)\n OR (OLD.link_auth_config_revision IS NOT NULL AND OLD.link_auth_config_revision IS NOT NEW.link_auth_config_revision)\n OR (OLD.grant_revisions_json IS NOT NULL AND OLD.grant_revisions_json IS NOT NEW.grant_revisions_json)\n OR (OLD.confirmation_hash IS NOT NULL AND OLD.confirmation_hash IS NOT NEW.confirmation_hash)\n OR (OLD.completion_secret_hash IS NOT NULL AND OLD.completion_secret_hash IS NOT NEW.completion_secret_hash)\n OR (OLD.browser_transaction_hash IS NULL AND NEW.browser_transaction_hash IS NOT NULL\n AND NOT (OLD.state = 'pending' AND NEW.state = 'browser_claimed'))\n OR (OLD.account_subject IS NULL AND NEW.account_subject IS NOT NULL\n AND NOT (OLD.state = 'browser_claimed' AND NEW.state = 'oidc_verified'))\n OR ((OLD.confirmation_hash IS NULL AND NEW.confirmation_hash IS NOT NULL\n OR OLD.completion_secret_hash IS NULL AND NEW.completion_secret_hash IS NOT NULL)\n AND NOT (OLD.state = 'oidc_verified' AND NEW.state = 'confirmed'))\n OR (OLD.state IN ('expired','failed','retired') AND OLD.state IS NOT NEW.state)\n OR (EXISTS (SELECT 1 FROM coordinator_owner_enrollment_attempts a WHERE a.state <> 'finalized'\n AND a.rowid <> OLD.rowid AND (a.rowid = NEW.rowid OR (a.coordinator_id = NEW.coordinator_id\n AND (a.attempt_id = NEW.attempt_id OR a.browser_start_hash = NEW.browser_start_hash\n OR a.browser_transaction_hash = NEW.browser_transaction_hash OR a.completion_secret_hash = NEW.completion_secret_hash))))\n AND NOT EXISTS (SELECT 1 FROM coordinator_owner_enrollment_attempts a WHERE a.state = 'finalized'\n AND a.rowid <> OLD.rowid AND (a.rowid = NEW.rowid OR (a.coordinator_id = NEW.coordinator_id\n AND (a.attempt_id = NEW.attempt_id OR a.browser_start_hash = NEW.browser_start_hash\n OR a.browser_transaction_hash = NEW.browser_transaction_hash OR a.completion_secret_hash = NEW.completion_secret_hash)))))\n)\nBEGIN SELECT RAISE(ABORT, 'owner_enrollment_pins_immutable'); END;\n-- REPLACE can delete a conflicting row without running UPDATE or DELETE triggers.\nCREATE TRIGGER IF NOT EXISTS owner_enrollment_pins_insert\nBEFORE INSERT ON coordinator_owner_enrollment_attempts\nWHEN EXISTS (SELECT 1 FROM coordinator_owner_enrollment_attempts a WHERE a.state <> 'finalized'\n AND (a.rowid = NEW.rowid OR (a.coordinator_id = NEW.coordinator_id AND (a.attempt_id = NEW.attempt_id\n OR a.browser_start_hash = NEW.browser_start_hash OR a.browser_transaction_hash = NEW.browser_transaction_hash\n OR a.completion_secret_hash = NEW.completion_secret_hash)))\n AND (a.coordinator_id,a.attempt_id,a.purpose,a.origin,a.device_id,a.public_key,a.key_id,a.fingerprint,\n a.issuer,a.auth_config_revision,a.loopback_redirect,a.browser_start_hash,a.browser_transaction_hash,a.browser_binder_hash,\n a.account_subject,a.identity_id,a.link_id,a.link_attempt_id,a.link_controller_attestation_id,a.link_auth_config_revision,\n a.grant_revisions_json,a.confirmation_hash,a.completion_secret_hash,a.final_key_proof_hash,a.state,\n a.created_at_ms,a.expires_at_ms,a.finalized_at_ms,a.binding_id,a.audit_event_id,a.final_outcome_json)\n IS NOT (NEW.coordinator_id,NEW.attempt_id,NEW.purpose,NEW.origin,NEW.device_id,NEW.public_key,NEW.key_id,NEW.fingerprint,\n NEW.issuer,NEW.auth_config_revision,NEW.loopback_redirect,NEW.browser_start_hash,NEW.browser_transaction_hash,NEW.browser_binder_hash,\n NEW.account_subject,NEW.identity_id,NEW.link_id,NEW.link_attempt_id,NEW.link_controller_attestation_id,NEW.link_auth_config_revision,\n NEW.grant_revisions_json,NEW.confirmation_hash,NEW.completion_secret_hash,NEW.final_key_proof_hash,NEW.state,\n NEW.created_at_ms,NEW.expires_at_ms,NEW.finalized_at_ms,NEW.binding_id,NEW.audit_event_id,NEW.final_outcome_json))\n AND NOT EXISTS (SELECT 1 FROM coordinator_owner_enrollment_attempts a WHERE a.state = 'finalized'\n AND (a.rowid = NEW.rowid OR (a.coordinator_id = NEW.coordinator_id AND (a.attempt_id = NEW.attempt_id\n OR a.browser_start_hash = NEW.browser_start_hash OR a.browser_transaction_hash = NEW.browser_transaction_hash\n OR a.completion_secret_hash = NEW.completion_secret_hash))))\nBEGIN SELECT RAISE(ABORT, 'owner_enrollment_pins_immutable'); END;\n-- Admission is a birth fact, including NULL for preexisting/operator attempts.\nCREATE TRIGGER IF NOT EXISTS owner_enrollment_admission_update\nBEFORE UPDATE ON coordinator_owner_enrollment_attempts\nWHEN OLD.admission_owner_hash IS NOT NEW.admission_owner_hash\nBEGIN SELECT RAISE(ABORT, 'owner_enrollment_admission_immutable'); END;\n-- Probe each unique key separately; a coordinator-only OR plan scans every prior attempt.\nCREATE TRIGGER IF NOT EXISTS owner_enrollment_admission_insert\nBEFORE INSERT ON coordinator_owner_enrollment_attempts\nWHEN EXISTS (SELECT 1 FROM coordinator_owner_enrollment_attempts a\n WHERE a.rowid IN (\n SELECT rowid FROM coordinator_owner_enrollment_attempts WHERE rowid = NEW.rowid\n UNION ALL SELECT rowid FROM coordinator_owner_enrollment_attempts WHERE coordinator_id = NEW.coordinator_id AND attempt_id = NEW.attempt_id\n UNION ALL SELECT rowid FROM coordinator_owner_enrollment_attempts WHERE coordinator_id = NEW.coordinator_id AND browser_start_hash = NEW.browser_start_hash\n UNION ALL SELECT rowid FROM coordinator_owner_enrollment_attempts WHERE coordinator_id = NEW.coordinator_id AND browser_transaction_hash = NEW.browser_transaction_hash\n UNION ALL SELECT rowid FROM coordinator_owner_enrollment_attempts WHERE coordinator_id = NEW.coordinator_id AND completion_secret_hash = NEW.completion_secret_hash)\n AND a.admission_owner_hash IS NOT NEW.admission_owner_hash)\nBEGIN SELECT RAISE(ABORT, 'owner_enrollment_admission_immutable'); END;\n-- The authority branch, including its NULL pin, is fixed at first owner resolution.\n-- A device-claim qualification never becomes the original link's controller attestation.\nCREATE TRIGGER IF NOT EXISTS owner_enrollment_authority_update\nBEFORE UPDATE ON coordinator_owner_enrollment_attempts\nWHEN (OLD.account_subject IS NOT NULL AND (\n OLD.owner_qualification_id IS NOT NEW.owner_qualification_id\n OR OLD.link_controller_attestation_id IS NOT NEW.link_controller_attestation_id))\n OR (OLD.owner_qualification_id IS NOT NEW.owner_qualification_id AND NOT (\n OLD.account_subject IS NULL AND NEW.account_subject IS NOT NULL\n AND OLD.state = 'browser_claimed' AND NEW.state = 'oidc_verified'))\nBEGIN SELECT RAISE(ABORT, 'owner_enrollment_pins_immutable'); END;\n-- REPLACE and UPSERT must not switch authority through any unique-key collision.\nCREATE TRIGGER IF NOT EXISTS owner_enrollment_authority_insert\nBEFORE INSERT ON coordinator_owner_enrollment_attempts\nWHEN EXISTS (SELECT 1 FROM coordinator_owner_enrollment_attempts a\n WHERE a.rowid IN (\n SELECT rowid FROM coordinator_owner_enrollment_attempts WHERE rowid = NEW.rowid\n UNION ALL SELECT rowid FROM coordinator_owner_enrollment_attempts WHERE coordinator_id = NEW.coordinator_id AND attempt_id = NEW.attempt_id\n UNION ALL SELECT rowid FROM coordinator_owner_enrollment_attempts WHERE coordinator_id = NEW.coordinator_id AND browser_start_hash = NEW.browser_start_hash\n UNION ALL SELECT rowid FROM coordinator_owner_enrollment_attempts WHERE coordinator_id = NEW.coordinator_id AND browser_transaction_hash = NEW.browser_transaction_hash\n UNION ALL SELECT rowid FROM coordinator_owner_enrollment_attempts WHERE coordinator_id = NEW.coordinator_id AND completion_secret_hash = NEW.completion_secret_hash)\n AND (a.owner_qualification_id IS NOT NEW.owner_qualification_id\n OR a.link_controller_attestation_id IS NOT NEW.link_controller_attestation_id))\nBEGIN SELECT RAISE(ABORT, 'owner_enrollment_pins_immutable'); END;\n-- Retained receipts cannot be changed, deleted, or erased through REPLACE.\nCREATE TRIGGER IF NOT EXISTS owner_enrollment_finalized_update\nBEFORE UPDATE ON coordinator_owner_enrollment_attempts WHEN OLD.state = 'finalized'\nBEGIN SELECT RAISE(ABORT, 'owner_enrollment_receipt_immutable'); END;\nCREATE TRIGGER IF NOT EXISTS owner_enrollment_finalized_update_collision\nBEFORE UPDATE ON coordinator_owner_enrollment_attempts\nWHEN EXISTS (SELECT 1 FROM coordinator_owner_enrollment_attempts a WHERE a.state = 'finalized'\n AND a.rowid <> OLD.rowid AND (a.rowid = NEW.rowid OR (a.coordinator_id = NEW.coordinator_id\n AND (a.attempt_id = NEW.attempt_id OR a.browser_start_hash = NEW.browser_start_hash\n OR a.browser_transaction_hash = NEW.browser_transaction_hash OR a.completion_secret_hash = NEW.completion_secret_hash))))\nBEGIN SELECT RAISE(ABORT, 'owner_enrollment_receipt_immutable'); END;\nCREATE TRIGGER IF NOT EXISTS owner_enrollment_finalized_delete\nBEFORE DELETE ON coordinator_owner_enrollment_attempts WHEN OLD.state = 'finalized'\nBEGIN SELECT RAISE(ABORT, 'owner_enrollment_receipt_immutable'); END;\nCREATE TRIGGER IF NOT EXISTS owner_enrollment_finalized_replace\nBEFORE INSERT ON coordinator_owner_enrollment_attempts\nWHEN EXISTS (SELECT 1 FROM coordinator_owner_enrollment_attempts a WHERE a.state = 'finalized'\n AND (a.rowid = NEW.rowid OR (a.coordinator_id = NEW.coordinator_id AND (a.attempt_id = NEW.attempt_id\n OR a.browser_start_hash = NEW.browser_start_hash OR a.browser_transaction_hash = NEW.browser_transaction_hash\n OR a.completion_secret_hash = NEW.completion_secret_hash))))\nBEGIN SELECT RAISE(ABORT, 'owner_enrollment_receipt_immutable'); END;\n";
7
+ //# sourceMappingURL=coordinator-owner-enrollment-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-owner-enrollment-schema.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,uCAAuC,0rmBAsLnD,CAAC"}
@@ -0,0 +1,54 @@
1
+ import Database from "better-sqlite3";
2
+ import type { AuthLinkBackend } from "./coordinator-auth-link.js";
3
+ import { type Store } from "./coordinator-auth-store-test-fixtures.js";
4
+ import { issueBrowserCookie } from "./coordinator-browser-credential.js";
5
+ import { type BrowserCsrfKey } from "./coordinator-browser-csrf.js";
6
+ import { commitPendingKey } from "./coordinator-owner-enrollment-commit-test-fixtures.js";
7
+ export declare const ORIGIN = "https://app.example.test";
8
+ export declare const config: {
9
+ enabled: boolean;
10
+ coordinatorId: string;
11
+ issuer: string;
12
+ redirectUri: string;
13
+ revision: string;
14
+ clientId: string;
15
+ clientSecret: string;
16
+ };
17
+ export declare const ATTEMPTS = "coordinator_owner_enrollment_attempts";
18
+ export declare const TRANSACTIONS = "coordinator_auth_browser_transactions";
19
+ export declare const hash: (value: string | Uint8Array) => string;
20
+ export declare const proof: () => string;
21
+ export declare function ownerStartTransaction(f: OwnerStartFixture, mode: "missing" | "expired" | "signin" | "link" | "owner_enroll" | "drift"): Promise<string>;
22
+ export declare function nativeBackend(db: Database.Database, beforeBatch?: () => void): AuthLinkBackend;
23
+ export declare function pairedReadBackends(fixture: OwnerStartFixture): AuthLinkBackend[];
24
+ export interface OwnerStartFixture {
25
+ store: Store;
26
+ db: Database.Database;
27
+ second: Database.Database;
28
+ key: ReturnType<typeof commitPendingKey>;
29
+ backend: AuthLinkBackend;
30
+ rows(table: string): Record<string, unknown>[];
31
+ snapshot(): Record<string, unknown>[][];
32
+ close(): void;
33
+ }
34
+ export declare function ownerStartFixture(prepared?: {
35
+ db: Database.Database;
36
+ store: Store;
37
+ close(): void;
38
+ }): OwnerStartFixture;
39
+ export interface BrowserForm {
40
+ csrfKey: BrowserCsrfKey;
41
+ cookie: Awaited<ReturnType<typeof issueBrowserCookie>>;
42
+ fields: Record<string, string>;
43
+ request(changes?: {
44
+ cookie?: string;
45
+ origin?: string;
46
+ fields?: Record<string, string>;
47
+ }): Request;
48
+ }
49
+ export declare function browserForm(attemptId: string, startCode: string): Promise<BrowserForm>;
50
+ export declare function seedOwnerCallbackAuthority(f: OwnerStartFixture): void;
51
+ /** Independent, pre-existing grants; account births are prepared before store open in Core fixtures. */
52
+ export declare function seedOwnerCallbackGroups(f: OwnerStartFixture): void;
53
+ export declare function ownerCallbackAuthority(f: OwnerStartFixture): unknown[];
54
+ //# sourceMappingURL=coordinator-owner-enrollment-start-test-fixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-owner-enrollment-start-test-fixtures.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-start-test-fixtures.ts"],"names":[],"mappings":"AAIA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAErF,OAAO,EAAE,KAAK,KAAK,EAAc,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EACN,KAAK,cAAc,EAGnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAG1F,eAAO,MAAM,MAAM,6BAA6B,CAAC;AACjD,eAAO,MAAM,MAAM;IAClB,OAAO;IACP,aAAa;IACb,MAAM;IACN,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,YAAY;CACZ,CAAC;AACF,eAAO,MAAM,QAAQ,0CAA0C,CAAC;AAChE,eAAO,MAAM,YAAY,0CAA0C,CAAC;AACpE,eAAO,MAAM,IAAI,UAAW,MAAM,GAAG,UAAU,WACE,CAAC;AAClD,eAAO,MAAM,KAAK,cAA8C,CAAC;AAGjE,wBAAsB,qBAAqB,CAC1C,CAAC,EAAE,iBAAiB,EACpB,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,cAAc,GAAG,OAAO,mBA4B1E;AAGD,wBAAgB,aAAa,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,MAAM,IAAI,GAAG,eAAe,CAa9F;AAGD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,eAAe,EAAE,CAiBhF;AAED,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,KAAK,CAAC;IACb,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACtB,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC1B,GAAG,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;IACzC,OAAO,EAAE,eAAe,CAAC;IACzB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAC/C,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC;IACxC,KAAK,IAAI,IAAI,CAAC;CACd;AACD,wBAAgB,iBAAiB,CAAC,QAAQ,CAAC,EAAE;IAC5C,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;CACd,GAAG,iBAAiB,CAiDpB;AAED,MAAM,WAAW,WAAW;IAC3B,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;IACvD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,OAAO,CAAC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC;CAClG;AACD,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAyB5F;AAID,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAiBrE;AAED,wGAAwG;AACxG,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAwBlE;AAGD,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,iBAAiB,GAAG,OAAO,EAAE,CAOtE"}
@@ -0,0 +1,72 @@
1
+ import type { SchemaFixture } from "./coordinator-auth-browser-migration-test-harness.js";
2
+ import type { Store } from "./coordinator-auth-store-test-fixtures.js";
3
+ export declare const OWNER_TABLE = "coordinator_owner_enrollment_attempts";
4
+ export declare const ownerDefinitions = "SELECT type,name,sql FROM sqlite_master WHERE tbl_name = 'coordinator_owner_enrollment_attempts' AND sql IS NOT NULL ORDER BY type,name";
5
+ export declare const pendingOwner: {
6
+ admission_owner_hash: null;
7
+ coordinator_id: string;
8
+ attempt_id: string;
9
+ purpose: string;
10
+ origin: string;
11
+ device_id: string;
12
+ public_key: string;
13
+ key_id: string;
14
+ fingerprint: string;
15
+ issuer: string;
16
+ auth_config_revision: string;
17
+ loopback_redirect: string;
18
+ browser_start_hash: string;
19
+ browser_binder_hash: null;
20
+ state: string;
21
+ created_at_ms: number;
22
+ expires_at_ms: number;
23
+ };
24
+ export declare const finalizedOwner: {
25
+ admission_owner_hash: null;
26
+ coordinator_id: string;
27
+ attempt_id: string;
28
+ purpose: string;
29
+ origin: string;
30
+ device_id: string;
31
+ public_key: string;
32
+ key_id: string;
33
+ fingerprint: string;
34
+ issuer: string;
35
+ auth_config_revision: string;
36
+ browser_start_hash: string;
37
+ created_at_ms: number;
38
+ expires_at_ms: number;
39
+ account_subject: string;
40
+ identity_id: string;
41
+ link_id: string;
42
+ link_attempt_id: string;
43
+ link_controller_attestation_id: string;
44
+ link_auth_config_revision: string;
45
+ grant_revisions_json: string;
46
+ state: string;
47
+ browser_transaction_hash: string;
48
+ browser_binder_hash: string;
49
+ confirmation_hash: string;
50
+ completion_secret_hash: string;
51
+ final_key_proof_hash: string;
52
+ loopback_redirect: null;
53
+ finalized_at_ms: number;
54
+ binding_id: string;
55
+ audit_event_id: string;
56
+ final_outcome_json: string;
57
+ };
58
+ type Value = string | number | null;
59
+ type InsertMode = "INSERT" | "INSERT OR REPLACE" | "INSERT OR IGNORE";
60
+ export declare function insertOwner(f: SchemaFixture, row?: Record<string, Value>, { mode }?: {
61
+ mode?: InsertMode;
62
+ }): Promise<void>;
63
+ export declare function ownerRows(f: SchemaFixture): Promise<Record<string, unknown>[]>;
64
+ export type OwnerFixture = SchemaFixture & {
65
+ store: Store;
66
+ };
67
+ export declare function ownerHarness(fixture: (use: (f: OwnerFixture) => Promise<void>) => Promise<void>): import("vitest").TestAPI<{
68
+ fixture: OwnerFixture;
69
+ }>;
70
+ export declare function registerOwnerSchemaTests(test: ReturnType<typeof ownerHarness>): void;
71
+ export {};
72
+ //# sourceMappingURL=coordinator-owner-enrollment-test-harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-owner-enrollment-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-enrollment-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AAG1F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAOvE,eAAO,MAAM,WAAW,0CAA0C,CAAC;AACnE,eAAO,MAAM,gBAAgB,4IAAqH,CAAC;AACnJ,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;CAkBxB,CAAC;AAUF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAc1B,CAAC;AACF,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AACpC,KAAK,UAAU,GAAG,QAAQ,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AACtE,wBAAgB,WAAW,CAC1B,CAAC,EAAE,aAAa,EAChB,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAgB,EACzC,EAAE,IAAe,EAAE,GAAE;IAAE,IAAI,CAAC,EAAE,UAAU,CAAA;CAAO,iBAO/C;AACD,wBAAgB,SAAS,CAAC,CAAC,EAAE,aAAa,sCAEzC;AACD,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AAC5D,wBAAgB,YAAY,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;GAI/F;AAGD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,QAY7E"}
@@ -0,0 +1,34 @@
1
+ import type { Database } from "./db.js";
2
+ import type { OwnerEnrollmentReceipt } from "./owner-enrollment-start.js";
3
+ export type OwnerProfileReview = {
4
+ deviceId: string;
5
+ publicKey: string;
6
+ actorId: string;
7
+ captureId: string | null;
8
+ captureAssociation: "pending" | "associated" | "none";
9
+ localMemoryCount: number;
10
+ retainedForeignMemoryCount: number;
11
+ digest: string;
12
+ preservedDigest: string;
13
+ actorsDigest: string;
14
+ };
15
+ export declare function ownerProfileConflict(): never;
16
+ export declare function reviewOwnerProfile(input: {
17
+ db: Database;
18
+ actorId?: string;
19
+ expectedPublicKey: string;
20
+ }): OwnerProfileReview;
21
+ export type OwnerProfileAdoption = {
22
+ db: Database;
23
+ review: OwnerProfileReview;
24
+ receipt: OwnerEnrollmentReceipt;
25
+ coordinatorId: string;
26
+ keyId: string;
27
+ displayName: string;
28
+ assertRuntime: () => void;
29
+ };
30
+ /** A receipt retry checks committed metadata; it never runs the adoption mutations again. */
31
+ export declare function hasCommittedOwnerProfile(input: OwnerProfileAdoption): boolean;
32
+ /** Internal metadata writer, not authorization. The client supplies a verified receipt and explicit review. */
33
+ export declare function adoptOwnerProfile(input: OwnerProfileAdoption): void;
34
+ //# sourceMappingURL=coordinator-owner-profile-adoption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-owner-profile-adoption.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-profile-adoption.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AASxC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAG1E,MAAM,MAAM,kBAAkB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,kBAAkB,EAAE,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC;IACtD,gBAAgB,EAAE,MAAM,CAAC;IACzB,0BAA0B,EAAE,MAAM,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAyCF,wBAAgB,oBAAoB,IAAI,KAAK,CAI5C;AAsGD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACzC,EAAE,EAAE,QAAQ,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;CAC1B,GAAG,kBAAkB,CAyCrB;AA4BD,MAAM,MAAM,oBAAoB,GAAG;IAClC,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,EAAE,sBAAsB,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC;AACF,6FAA6F;AAC7F,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CA+B7E;AAiBD,+GAA+G;AAC/G,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAwDnE"}
@@ -0,0 +1,57 @@
1
+ import Sqlite from "better-sqlite3";
2
+ import * as enrollmentReceiver from "./coordinator-account-link-receiver.js";
3
+ import { type OwnerProfileClientOptions } from "./coordinator-owner-profile-client.js";
4
+ export declare function registerOwnerProfileClientMockState(state: {
5
+ signing: {
6
+ corrupt: boolean;
7
+ };
8
+ databaseOpens: Array<{
9
+ readonly?: boolean;
10
+ }>;
11
+ assertOffline?: () => void;
12
+ }): void;
13
+ declare const pin: {
14
+ coordinatorId: string;
15
+ origin: string;
16
+ issuer: string;
17
+ revision: string;
18
+ };
19
+ declare const received: {
20
+ kind: string;
21
+ bindingId: string;
22
+ identityId: string;
23
+ groups: string[];
24
+ };
25
+ declare const now = "2026-10-12T12:00:00Z";
26
+ declare const read: (name: string) => any;
27
+ declare const facts: () => {
28
+ memories: unknown[];
29
+ bindings: unknown[];
30
+ history: unknown[];
31
+ captureBirth: unknown[];
32
+ creationSnapshots: unknown[];
33
+ foreignRevisions: unknown[];
34
+ };
35
+ declare function insertMemory(input: {
36
+ actorId: string;
37
+ entityId: string;
38
+ }): void;
39
+ declare function rotateKey(): void;
40
+ declare function fakeFetch(input: string | URL | Request, init?: RequestInit): Promise<Response>;
41
+ declare function browser(): Promise<void>;
42
+ declare function prepared(): Promise<string>;
43
+ declare function interruptedPrepare(): Promise<import("vitest").Mock<typeof enrollmentReceiver.createCoordinatorOwnerEnrollmentReceiver>>;
44
+ export declare const fixture: {
45
+ readonly directory: string;
46
+ readonly db: Sqlite.Database;
47
+ options: OwnerProfileClientOptions;
48
+ readonly publicKey: string;
49
+ calls: Array<{
50
+ path: string;
51
+ authorization: string | null;
52
+ }>;
53
+ readonly finalBodies: string[];
54
+ failFinal: boolean;
55
+ };
56
+ export { browser, facts, fakeFetch, insertMemory, interruptedPrepare, now, pin, prepared, read, received, rotateKey, };
57
+ //# sourceMappingURL=coordinator-owner-profile-client-test-harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator-owner-profile-client-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-owner-profile-client-test-harness.ts"],"names":[],"mappings":"AAKA,OAAO,MAAM,MAAM,gBAAgB,CAAC;AAEpC,OAAO,KAAK,kBAAkB,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAEN,KAAK,yBAAyB,EAC9B,MAAM,uCAAuC,CAAC;AAiB/C,wBAAgB,mCAAmC,CAAC,KAAK,EAAE;IAC1D,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAC9B,aAAa,EAAE,KAAK,CAAC;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC7C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B,GAAG,IAAI,CAIP;AAED,QAAA,MAAM,GAAG;IACR,aAAa;IACb,MAAM;IACN,MAAM;IACN,QAAQ;CACR,CAAC;AACF,QAAA,MAAM,QAAQ;IACb,IAAI;IACJ,SAAS;IACT,UAAU;IACV,MAAM;CACN,CAAC;AACF,QAAA,MAAM,GAAG,yBAAyB,CAAC;AAUnC,QAAA,MAAM,IAAI,SAAU,MAAM,QAAmE,CAAC;AAC9F,QAAA,MAAM,KAAK;IACV,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,YAAY;IACZ,iBAAiB;IACjB,gBAAgB;CACf,CAAC;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAKxE;AAaD,iBAAS,SAAS,IAAI,IAAI,CAMzB;AACD,iBAAe,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAiB7F;AACD,iBAAS,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAiBhC;AA+ED,iBAAe,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAYzC;AACD,iBAAe,kBAAkB,uGAsBhC;AAGD,eAAO,MAAM,OAAO,EAAE;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC7B,OAAO,EAAE,yBAAyB,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IAC7D,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;CAgCnB,CAAC;AACF,OAAO,EACN,OAAO,EACP,KAAK,EACL,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,GAAG,EACH,GAAG,EACH,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,SAAS,GACT,CAAC"}