@codemem/core 0.49.0 → 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 (378) 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/distill-draft.d.ts +6 -0
  227. package/dist/distill-draft.d.ts.map +1 -1
  228. package/dist/distill-judge.d.ts +1 -1
  229. package/dist/distill-judge.d.ts.map +1 -1
  230. package/dist/identity-device-assignment.d.ts +8 -0
  231. package/dist/identity-device-assignment.d.ts.map +1 -1
  232. package/dist/index.d.ts +34 -8
  233. package/dist/index.d.ts.map +1 -1
  234. package/dist/index.js +11664 -10635
  235. package/dist/index.js.map +1 -1
  236. package/dist/internal/cloudflare-coordinator.js +2317 -1542
  237. package/dist/internal/cloudflare-coordinator.js.map +1 -1
  238. package/dist/internal/relay-runtime.js +29 -29
  239. package/dist/legacy-pairing-assignment-conversion.d.ts +46 -0
  240. package/dist/legacy-pairing-assignment-conversion.d.ts.map +1 -0
  241. package/dist/legacy-pairing-assignment-state.d.ts +11 -0
  242. package/dist/legacy-pairing-assignment-state.d.ts.map +1 -0
  243. package/dist/legacy-team-setup-errors.d.ts +2 -1
  244. package/dist/legacy-team-setup-errors.d.ts.map +1 -1
  245. package/dist/local-origin-claim.d.ts +48 -0
  246. package/dist/local-origin-claim.d.ts.map +1 -0
  247. package/dist/maintenance/ai-structured.d.ts +2 -0
  248. package/dist/maintenance/ai-structured.d.ts.map +1 -1
  249. package/dist/observer-config.d.ts.map +1 -1
  250. package/dist/owned-recipient-d1-test-harness.d.ts.map +1 -1
  251. package/dist/owner-enrollment-link-authority.d.ts +1 -0
  252. package/dist/owner-enrollment-link-authority.d.ts.map +1 -1
  253. package/dist/{owner-enrollment-start-BsDwgxAh.js → owner-enrollment-start-D8QzF1Ar.js} +5548 -3637
  254. package/dist/owner-enrollment-start-D8QzF1Ar.js.map +1 -0
  255. package/dist/pairing-removal.d.ts +57 -0
  256. package/dist/pairing-removal.d.ts.map +1 -0
  257. package/dist/peer-project-filter-change.d.ts +33 -0
  258. package/dist/peer-project-filter-change.d.ts.map +1 -0
  259. package/dist/peer-project-filter-management.d.ts +7 -0
  260. package/dist/peer-project-filter-management.d.ts.map +1 -0
  261. package/dist/peer-project-filter-retention.d.ts +17 -0
  262. package/dist/peer-project-filter-retention.d.ts.map +1 -0
  263. package/dist/peer-removal-check-state.d.ts +24 -0
  264. package/dist/peer-removal-check-state.d.ts.map +1 -0
  265. package/dist/peer-removal.d.ts +34 -0
  266. package/dist/peer-removal.d.ts.map +1 -0
  267. package/dist/peer-traversal-coordinator-attempt-write-test-fixtures.d.ts.map +1 -1
  268. package/dist/peer-traversal-coordinator-decision-test-fixtures.d.ts.map +1 -1
  269. package/dist/policy-team-device-eligibility.d.ts +10 -0
  270. package/dist/policy-team-device-eligibility.d.ts.map +1 -1
  271. package/dist/project-boundary-migration-hold.d.ts +50 -0
  272. package/dist/project-boundary-migration-hold.d.ts.map +1 -0
  273. package/dist/project-boundary-migration-records.d.ts +46 -0
  274. package/dist/project-boundary-migration-records.d.ts.map +1 -0
  275. package/dist/project-filters-narrowing.d.ts +11 -0
  276. package/dist/project-filters-narrowing.d.ts.map +1 -0
  277. package/dist/project-scope-resume.d.ts +26 -0
  278. package/dist/project-scope-resume.d.ts.map +1 -0
  279. package/dist/project-scope-settings.d.ts +7 -0
  280. package/dist/project-scope-settings.d.ts.map +1 -1
  281. package/dist/project-scope-withdrawal.d.ts +48 -0
  282. package/dist/project-scope-withdrawal.d.ts.map +1 -0
  283. package/dist/project-withdrawal-state.d.ts +36 -0
  284. package/dist/project-withdrawal-state.d.ts.map +1 -0
  285. package/dist/{recipient-policy-contract-Ca40IBUh.js → recipient-policy-contract-BHxfaQZ2.js} +12 -5
  286. package/dist/recipient-policy-contract-BHxfaQZ2.js.map +1 -0
  287. package/dist/recipient-policy-contract.d.ts +7 -0
  288. package/dist/recipient-policy-contract.d.ts.map +1 -1
  289. package/dist/recipient-policy-contract.js +2 -2
  290. package/dist/recipient-policy-edges.d.ts.map +1 -1
  291. package/dist/recipient-policy-intent.d.ts +1 -0
  292. package/dist/recipient-policy-intent.d.ts.map +1 -1
  293. package/dist/recipient-policy-onboarding.d.ts.map +1 -1
  294. package/dist/recipient-policy-reconciler.d.ts.map +1 -1
  295. package/dist/recipient-policy-reconciliation.d.ts.map +1 -1
  296. package/dist/recipient-policy-team-create.d.ts +22 -0
  297. package/dist/recipient-policy-team-create.d.ts.map +1 -0
  298. package/dist/{relay-health-CeyhVeuq.js → relay-health-B8BpHFaE.js} +14 -14
  299. package/dist/{relay-health-CeyhVeuq.js.map → relay-health-B8BpHFaE.js.map} +1 -1
  300. package/dist/{relay-peer-client-j0rOyeuZ.js → relay-peer-client-w7WdS1AP.js} +3083 -2634
  301. package/dist/relay-peer-client-w7WdS1AP.js.map +1 -0
  302. package/dist/relay-server-test-fixtures.d.ts.map +1 -1
  303. package/dist/replication-cursor-orphan-cleanup.d.ts +14 -0
  304. package/dist/replication-cursor-orphan-cleanup.d.ts.map +1 -0
  305. package/dist/retired-device-aliases.d.ts +28 -0
  306. package/dist/retired-device-aliases.d.ts.map +1 -0
  307. package/dist/same-actor-peers.d.ts +5 -1
  308. package/dist/same-actor-peers.d.ts.map +1 -1
  309. package/dist/schema-bootstrap.d.ts +1 -0
  310. package/dist/schema-bootstrap.d.ts.map +1 -1
  311. package/dist/schema.d.ts +4456 -3623
  312. package/dist/schema.d.ts.map +1 -1
  313. package/dist/{scope-membership-cache-read-B6z47l2W.js → scope-resolution-B7FK15hx.js} +2242 -1608
  314. package/dist/scope-resolution-B7FK15hx.js.map +1 -0
  315. package/dist/semantic-worker-entry.js +1 -1
  316. package/dist/{semantic-worker-job-BLaC4xRY.js → semantic-worker-job-BjujlM4-.js} +3 -3
  317. package/dist/{semantic-worker-job-BLaC4xRY.js.map → semantic-worker-job-BjujlM4-.js.map} +1 -1
  318. package/dist/{semantic-worker-ranking-5-VSzEmx.js → semantic-worker-ranking-WaUCapnY.js} +66 -60
  319. package/dist/semantic-worker-ranking-WaUCapnY.js.map +1 -0
  320. package/dist/share-provisioning.d.ts +4 -0
  321. package/dist/share-provisioning.d.ts.map +1 -1
  322. package/dist/shared-owned-device-enrollment-test-harness.d.ts.map +1 -1
  323. package/dist/shared-owned-project-invites-test-harness.d.ts.map +1 -1
  324. package/dist/shared-owned-recipient-invites-test-harness.d.ts.map +1 -1
  325. package/dist/shared-ownership-writer-lifecycle-test-harness.d.ts.map +1 -1
  326. package/dist/snapshot-cross-scope-reconcile.d.ts +25 -0
  327. package/dist/snapshot-cross-scope-reconcile.d.ts.map +1 -0
  328. package/dist/{sync-auth-constants-BVzVfSmn.js → sync-auth-constants-DNUSV-Tn.js} +4482 -2842
  329. package/dist/sync-auth-constants-DNUSV-Tn.js.map +1 -0
  330. package/dist/sync-bootstrap.d.ts +2 -0
  331. package/dist/sync-bootstrap.d.ts.map +1 -1
  332. package/dist/sync-capability.d.ts +1 -1
  333. package/dist/sync-capability.d.ts.map +1 -1
  334. package/dist/sync-channel-pass.d.ts.map +1 -1
  335. package/dist/sync-channel-progress.d.ts +7 -0
  336. package/dist/sync-channel-progress.d.ts.map +1 -1
  337. package/dist/sync-daemon.d.ts +4 -1
  338. package/dist/sync-daemon.d.ts.map +1 -1
  339. package/dist/sync-pass.d.ts +3 -7
  340. package/dist/sync-pass.d.ts.map +1 -1
  341. package/dist/sync-peer-addresses.d.ts +4 -2
  342. package/dist/sync-peer-addresses.d.ts.map +1 -1
  343. package/dist/sync-reachability-pass-BpTtRqcV.js +2 -0
  344. package/dist/{sync-reachability-pass-Co6WjaUD.js → sync-reachability-pass-DKEORTbs.js} +2934 -2865
  345. package/dist/sync-reachability-pass-DKEORTbs.js.map +1 -0
  346. package/dist/sync-reachability-pass.d.ts.map +1 -1
  347. package/dist/sync-replication.d.ts +21 -3
  348. package/dist/sync-replication.d.ts.map +1 -1
  349. package/dist/sync-scope-protocol.d.ts.map +1 -1
  350. package/dist/test-environment-isolation.d.ts +2 -0
  351. package/dist/test-environment-isolation.d.ts.map +1 -0
  352. package/dist/test-schema.generated.d.ts +1 -1
  353. package/dist/test-schema.generated.d.ts.map +1 -1
  354. package/dist/test-utils.d.ts +4 -0
  355. package/dist/test-utils.d.ts.map +1 -1
  356. package/dist/{validated-vector-index-audit-B64yhEBF.js → validated-vector-index-audit-BtUovYuM.js} +269 -637
  357. package/dist/validated-vector-index-audit-BtUovYuM.js.map +1 -0
  358. package/dist/viewer-device-removal-commit.d.ts +56 -0
  359. package/dist/viewer-device-removal-commit.d.ts.map +1 -0
  360. package/dist/viewer-device-removal-evidence.d.ts +17 -0
  361. package/dist/viewer-device-removal-evidence.d.ts.map +1 -0
  362. package/dist/{scope-membership-semantics-B8qXaMqx.js → workspace-identity-C7EPmSZe.js} +121 -49
  363. package/dist/workspace-identity-C7EPmSZe.js.map +1 -0
  364. package/package.json +3 -3
  365. package/dist/coordinator-runtime-BYCjEE7A.js +0 -594
  366. package/dist/coordinator-runtime-BYCjEE7A.js.map +0 -1
  367. package/dist/owner-enrollment-start-BsDwgxAh.js.map +0 -1
  368. package/dist/recipient-policy-contract-Ca40IBUh.js.map +0 -1
  369. package/dist/relay-peer-client-j0rOyeuZ.js.map +0 -1
  370. package/dist/scope-membership-cache-read-B6z47l2W.js.map +0 -1
  371. package/dist/scope-membership-semantics-B8qXaMqx.js.map +0 -1
  372. package/dist/semantic-worker-ranking-5-VSzEmx.js.map +0 -1
  373. package/dist/sync-auth-constants-BVzVfSmn.js.map +0 -1
  374. package/dist/sync-reachability-pass-5bOMxdoW.js +0 -2
  375. package/dist/sync-reachability-pass-Co6WjaUD.js.map +0 -1
  376. package/dist/validated-vector-index-audit-B64yhEBF.js.map +0 -1
  377. package/dist/workspace-identity-DI8bBR0Y.js +0 -76
  378. package/dist/workspace-identity-DI8bBR0Y.js.map +0 -1
@@ -1,7 +1,8 @@
1
1
  import { createHash as e } from "node:crypto";
2
- import { Buffer as t } from "node:buffer";
2
+ import { resolve as t } from "node:path";
3
+ import { Buffer as n } from "node:buffer";
3
4
  //#region src/coordinator-ed25519-key-id.ts
4
- function n(e) {
5
+ function r(e) {
5
6
  try {
6
7
  let t = atob(e);
7
8
  return Uint8Array.from(t, (e) => e.charCodeAt(0));
@@ -9,69 +10,81 @@ function n(e) {
9
10
  return null;
10
11
  }
11
12
  }
12
- function r(e) {
13
+ function i(e) {
13
14
  if (e.length < 4) return null;
14
15
  let t = new DataView(e.buffer, e.byteOffset, e.byteLength), n = 4 + t.getUint32(0);
15
16
  if (e.length < n + 4) return null;
16
17
  let r = t.getUint32(n), i = n + 4;
17
18
  return r !== 32 || e.length < i + r ? null : e.subarray(i, i + r);
18
19
  }
19
- function i(e) {
20
+ function a(e) {
20
21
  let t = /* @__PURE__ */ new Uint8Array(51), n = new DataView(t.buffer);
21
22
  return n.setUint32(0, 11), t.set(new TextEncoder().encode("ssh-ed25519"), 4), n.setUint32(15, 32), t.set(e, 19), t;
22
23
  }
23
- function a(e) {
24
- return o(e, n);
24
+ function o(e) {
25
+ return s(e, r);
25
26
  }
26
- function o(e, t) {
27
+ function s(e, t) {
27
28
  if (typeof e != "string") return { kind: "other" };
28
- let [n, a] = e.trim().split(/\s+/);
29
+ let [n, r] = e.trim().split(/\s+/);
29
30
  if (n !== "ssh-ed25519") return { kind: "other" };
30
- if (!a) return { kind: "malformed_ed25519" };
31
+ if (!r) return { kind: "malformed_ed25519" };
31
32
  let o;
32
33
  try {
33
- o = t(a);
34
+ o = t(r);
34
35
  } catch {
35
36
  return { kind: "malformed_ed25519" };
36
37
  }
37
38
  if (!o) return { kind: "malformed_ed25519" };
38
- let s = r(o);
39
+ let s = i(o);
39
40
  return s ? {
40
41
  kind: "ed25519",
41
- blob: i(s)
42
+ blob: a(s)
42
43
  } : { kind: "malformed_ed25519" };
43
44
  }
44
- async function s(e) {
45
- return c(a(e));
46
- }
47
45
  async function c(e) {
46
+ return l(o(e));
47
+ }
48
+ async function l(e) {
48
49
  if (e.kind !== "ed25519") return null;
49
50
  let t = new Uint8Array(e.blob), n = await globalThis.crypto.subtle.digest("SHA-256", t.buffer);
50
51
  return Array.from(new Uint8Array(n), (e) => e.toString(16).padStart(2, "0")).join("");
51
52
  }
52
53
  //#endregion
53
54
  //#region src/coordinator-ed25519-key-id-compat.ts
54
- function l(e) {
55
+ function u(e) {
55
56
  try {
56
- return t.from(e, "base64");
57
+ return n.from(e, "base64");
57
58
  } catch {
58
59
  return null;
59
60
  }
60
61
  }
61
- function u(e) {
62
- return o(e, l);
62
+ function d(e) {
63
+ return s(e, u);
63
64
  }
64
- async function d(e) {
65
- return c(u(e));
65
+ async function f(e) {
66
+ return l(d(e));
66
67
  }
67
68
  //#endregion
68
69
  //#region src/sync-fingerprint.ts
69
- function f(t) {
70
+ function p(t) {
70
71
  return e("sha256").update(t, "utf-8").digest("hex");
71
72
  }
72
73
  //#endregion
74
+ //#region src/project-identity.ts
75
+ var m = /^(?:command failed(?:\s|:)|error:\s|fatal:\s|git:\s)/iu, h = /^(?:giterror|git error|git command failed):[^\r\n]*(?:not a git repository|unknown revision or path|no such remote)\b/iu;
76
+ function g(e) {
77
+ if (typeof e != "string") return !1;
78
+ let t = e.trim();
79
+ return t ? t.includes("\n") || t.includes("\r") ? !0 : m.test(t) || h.test(t) : !1;
80
+ }
81
+ function _(e) {
82
+ let t = e?.trim();
83
+ return !t || g(t) ? null : t;
84
+ }
85
+ //#endregion
73
86
  //#region src/coordinator-scope-authorization.ts
74
- var p = [
87
+ var v = [
75
88
  "scope_id",
76
89
  "label",
77
90
  "kind",
@@ -84,7 +97,7 @@ var p = [
84
97
  "status",
85
98
  "created_at",
86
99
  "updated_at"
87
- ], m = [
100
+ ], y = [
88
101
  "scope_id",
89
102
  "device_id",
90
103
  "role",
@@ -96,7 +109,7 @@ var p = [
96
109
  "manifest_hash",
97
110
  "signed_manifest_json",
98
111
  "updated_at"
99
- ], h = [
112
+ ], b = [
100
113
  "group_id",
101
114
  "device_id",
102
115
  "public_key",
@@ -105,7 +118,7 @@ var p = [
105
118
  "display_name",
106
119
  "enabled",
107
120
  "created_at"
108
- ], g = /* @__PURE__ */ new Set([
121
+ ], x = /* @__PURE__ */ new Set([
109
122
  "coordinator_id",
110
123
  "group_id",
111
124
  "manifest_issuer_device_id",
@@ -114,29 +127,29 @@ var p = [
114
127
  "identity_id",
115
128
  "display_name"
116
129
  ]);
117
- function _(e) {
130
+ function S(e) {
118
131
  return typeof e == "string" && e.length > 0 && !e.includes("\0");
119
132
  }
120
- function v(e) {
133
+ function C(e) {
121
134
  let t = Object.getOwnPropertyDescriptor(e, "groupId"), n = Object.getOwnPropertyDescriptor(e, "scopeId");
122
- if (!t || !n || !("value" in t) || !("value" in n) || !_(t.value) || !_(n.value)) throw Error("scope_authorization_unavailable");
135
+ if (!t || !n || !("value" in t) || !("value" in n) || !S(t.value) || !S(n.value)) throw Error("scope_authorization_unavailable");
123
136
  return {
124
137
  groupId: t.value,
125
138
  scopeId: n.value
126
139
  };
127
140
  }
128
- function y(e, t) {
141
+ function w(e, t) {
129
142
  if (!e || typeof e != "object" || Array.isArray(e)) throw Error("scope_authorization_unavailable");
130
143
  let n = e;
131
- for (let e of t) if (!b(e, n[e])) throw Error("scope_authorization_unavailable");
144
+ for (let e of t) if (!T(e, n[e])) throw Error("scope_authorization_unavailable");
132
145
  }
133
- function b(e, t) {
134
- return e === "membership_epoch" || e === "enabled" ? Number.isSafeInteger(t) && t >= 0 : e === "public_key" ? typeof t == "string" : e === "display_name" || e === "identity_id" ? t === null || typeof t == "string" && !t.includes("\0") : g.has(e) && t === null ? !0 : _(t);
146
+ function T(e, t) {
147
+ return e === "membership_epoch" || e === "enabled" ? Number.isSafeInteger(t) && t >= 0 : e === "public_key" ? typeof t == "string" : e === "display_name" || e === "identity_id" ? t === null || typeof t == "string" && !t.includes("\0") : x.has(e) && t === null ? !0 : S(t);
135
148
  }
136
- function x(e, t) {
149
+ function E(e, t) {
137
150
  return e.group_id !== t || e.authority_type !== "coordinator" ? "scope_source_mismatch" : e.status === "active" ? null : "scope_inactive";
138
151
  }
139
- function S(e, t) {
152
+ function D(e, t) {
140
153
  return t.scope_id !== e.scope_id || t.status !== "active" || t.membership_epoch < e.membership_epoch ? !1 : [
141
154
  "group_id",
142
155
  "coordinator_id",
@@ -144,7 +157,7 @@ function S(e, t) {
144
157
  "manifest_hash"
145
158
  ].every((n) => t[n] === null || t[n] === e[n]);
146
159
  }
147
- function C(e, t) {
160
+ function O(e, t) {
148
161
  if (typeof e != "string") throw Error("scope_authorization_unavailable");
149
162
  let n = JSON.parse(e);
150
163
  if (!Array.isArray(n)) throw Error("scope_authorization_unavailable");
@@ -153,29 +166,29 @@ function C(e, t) {
153
166
  let t = JSON.stringify(e);
154
167
  if (!r.delete(t)) throw Error("scope_authorization_unavailable");
155
168
  }
156
- return n.sort(w);
169
+ return n.sort(k);
157
170
  }
158
- function w(e, t) {
171
+ function k(e, t) {
159
172
  let n = e.membership.device_id, r = t.membership.device_id;
160
173
  return n < r ? -1 : +(n > r);
161
174
  }
162
- function T(e, t, n) {
175
+ function A(e, t, n) {
163
176
  return t.map((t) => `${e}.${t} IS json_extract(captured.value, '$.${n}${t}')`).join(" AND ");
164
177
  }
165
- var E = `WITH current_scope AS (${`SELECT s.* FROM json_each(?) captured
166
- JOIN coordinator_scopes s ON ${T("s", p, "")}
178
+ var j = `WITH current_scope AS (${`SELECT s.* FROM json_each(?) captured
179
+ JOIN coordinator_scopes s ON ${A("s", v, "")}
167
180
  JOIN groups g ON g.group_id = s.group_id WHERE g.archived_at IS NULL AND s.status = 'active'
168
181
  AND s.authority_type = 'coordinator'`})
169
182
  SELECT current_scope.*, (SELECT json_group_array(json(value)) FROM
170
183
  (${`SELECT captured.value FROM json_each(?) captured
171
- JOIN coordinator_scope_memberships m ON ${T("m", m, "membership.")}
172
- JOIN enrolled_devices e ON ${T("e", h, "enrollment.")}
184
+ JOIN coordinator_scope_memberships m ON ${A("m", y, "membership.")}
185
+ JOIN enrolled_devices e ON ${A("e", b, "enrollment.")}
173
186
  WHERE e.enabled = 1 AND m.status = 'active'
174
187
  AND NOT EXISTS (SELECT 1 FROM coordinator_device_revocations r WHERE
175
188
  (r.subject_kind = 'device_id' AND r.subject_value = e.device_id) OR
176
189
  (r.subject_kind = 'ed25519_key' AND r.subject_value = json_extract(captured.value, '$.keyId')))
177
- ORDER BY m.device_id ASC`})) AS members_json FROM current_scope`, D = "Revocation blocks future sync for this Space. It does not remove data already copied to the revoked device; offline devices, backups, copied databases, malicious peers, or old versions may retain data.";
178
- function O(e) {
190
+ ORDER BY m.device_id ASC`})) AS members_json FROM current_scope`, M = "Revocation blocks future sync for this Space. It does not remove data already copied to the revoked device; offline devices, backups, copied databases, malicious peers, or old versions may retain data.";
191
+ function N(e) {
179
192
  let t = Number.isFinite(e.membershipEpoch) ? Number(e.membershipEpoch) : null, n = Number.isFinite(e.requiredEpoch) ? Number(e.requiredEpoch) : null;
180
193
  return t == null || n == null ? {
181
194
  membership_epoch: t,
@@ -189,17 +202,76 @@ function O(e) {
189
202
  reason: t < n ? "stale_epoch" : "current"
190
203
  };
191
204
  }
192
- function k(e) {
205
+ function P(e) {
193
206
  return {
194
207
  scope_id: e.scopeId,
195
208
  device_id: e.deviceId,
196
209
  membership_epoch: Number.isFinite(e.membershipEpoch) ? Number(e.membershipEpoch) : null,
197
210
  prevents_future_sync: !0,
198
211
  deletes_already_copied_data: !1,
199
- message: D
212
+ message: M
213
+ };
214
+ }
215
+ //#endregion
216
+ //#region src/workspace-identity.ts
217
+ function F(e) {
218
+ return e.trim().replaceAll("\\", "/").replace(/\/+$/, "") || e.trim();
219
+ }
220
+ function I(e) {
221
+ return F(t(e));
222
+ }
223
+ function L(t) {
224
+ let n = [
225
+ t.cwd,
226
+ t.project,
227
+ t.workspaceId
228
+ ].map((e) => _(e)).find((e) => e !== null), r = [
229
+ t.gitRemote,
230
+ t.gitBranch,
231
+ t.cwd,
232
+ t.project,
233
+ t.workspaceId
234
+ ].map((e) => typeof e == "string" ? e.trim() : null), i = n ?? "unknown";
235
+ return !n && r.some(g) && (i = JSON.stringify(r)), `unmapped:${e("sha256").update(i, "utf8").digest("hex")}`;
236
+ }
237
+ function R(e) {
238
+ let t = _(e.gitRemote), n = _(e.gitBranch), r = _(e.repositoryIdentity), i = _(e.cwd), a = _(e.workspaceId), o = _(e.project);
239
+ if (r && !e.branchScoped) return {
240
+ value: F(r),
241
+ source: "git_repository",
242
+ displayProject: o
243
+ };
244
+ if (t) {
245
+ let r = F(t);
246
+ return e.branchScoped && n ? {
247
+ value: `${r}:${n}`,
248
+ source: "git_remote_branch",
249
+ displayProject: o
250
+ } : {
251
+ value: r,
252
+ source: "git_remote",
253
+ displayProject: o
254
+ };
255
+ }
256
+ return r ? {
257
+ value: F(r),
258
+ source: "git_repository",
259
+ displayProject: o
260
+ } : i ? {
261
+ value: I(i),
262
+ source: "cwd",
263
+ displayProject: o
264
+ } : a ? {
265
+ value: F(a),
266
+ source: "workspace_id",
267
+ displayProject: o
268
+ } : {
269
+ value: L(e),
270
+ source: "unmapped",
271
+ displayProject: o
200
272
  };
201
273
  }
202
274
  //#endregion
203
- export { c as _, m as a, v as c, y as d, x as f, s as g, u as h, h as i, S as l, d as m, k as n, E as o, f as p, O as r, p as s, D as t, C as u, a as v };
275
+ export { d as _, b as a, o as b, v as c, O as d, w as f, f as g, p as h, N as i, C as l, _ as m, M as n, y as o, E as p, P as r, j as s, R as t, D as u, c as v, l as y };
204
276
 
205
- //# sourceMappingURL=scope-membership-semantics-B8qXaMqx.js.map
277
+ //# sourceMappingURL=workspace-identity-C7EPmSZe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-identity-C7EPmSZe.js","names":[],"sources":["../src/coordinator-ed25519-key-id.ts","../src/coordinator-ed25519-key-id-compat.ts","../src/sync-fingerprint.ts","../src/project-identity.ts","../src/coordinator-scope-authorization.ts","../src/scope-membership-semantics.ts","../src/workspace-identity.ts"],"sourcesContent":["export type SshEd25519Parse =\n\t| { kind: \"ed25519\"; blob: Uint8Array }\n\t| { kind: \"malformed_ed25519\" }\n\t| { kind: \"other\" };\n\nfunction decodeWire(encoded: string): Uint8Array | null {\n\ttry {\n\t\tconst binary = atob(encoded);\n\t\treturn Uint8Array.from(binary, (character) => character.charCodeAt(0));\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nfunction readRawKey(wire: Uint8Array): Uint8Array | null {\n\tif (wire.length < 4) return null;\n\tconst view = new DataView(wire.buffer, wire.byteOffset, wire.byteLength);\n\tconst typeEnd = 4 + view.getUint32(0);\n\tif (wire.length < typeEnd + 4) return null;\n\tconst keyLength = view.getUint32(typeEnd);\n\tconst keyStart = typeEnd + 4;\n\tif (keyLength !== 32 || wire.length < keyStart + keyLength) return null;\n\treturn wire.subarray(keyStart, keyStart + keyLength);\n}\n\nfunction canonicalBlob(rawKey: Uint8Array): Uint8Array {\n\tconst blob = new Uint8Array(51);\n\tconst view = new DataView(blob.buffer);\n\tview.setUint32(0, 11);\n\tblob.set(new TextEncoder().encode(\"ssh-ed25519\"), 4);\n\tview.setUint32(15, 32);\n\tblob.set(rawKey, 19);\n\treturn blob;\n}\n\n/**\n * Internal string contract, not an authentication acceptance check. Like the\n * Worker verifier, skip the inner type bytes and ignore trailing wire bytes.\n * atob rejects some encodings accepted by Node's Buffer base64 decoder.\n */\nexport function parseSshEd25519PublicKey(publicKey: string): SshEd25519Parse {\n\treturn parseSshEd25519PublicKeyWithDecoder(publicKey, decodeWire);\n}\n\n/** Internal trusted decoder seam; callers must not use it to decide authentication acceptance. */\nexport function parseSshEd25519PublicKeyWithDecoder(\n\tpublicKey: string,\n\tdecode: (encoded: string) => Uint8Array | null,\n): SshEd25519Parse {\n\tif (typeof publicKey !== \"string\") return { kind: \"other\" };\n\tconst [keyType, keyData] = publicKey.trim().split(/\\s+/);\n\tif (keyType !== \"ssh-ed25519\") return { kind: \"other\" };\n\tif (!keyData) return { kind: \"malformed_ed25519\" };\n\tlet wire: Uint8Array | null;\n\ttry {\n\t\twire = decode(keyData);\n\t} catch {\n\t\treturn { kind: \"malformed_ed25519\" };\n\t}\n\tif (!wire) return { kind: \"malformed_ed25519\" };\n\tconst rawKey = readRawKey(wire);\n\tif (!rawKey) return { kind: \"malformed_ed25519\" };\n\treturn { kind: \"ed25519\", blob: canonicalBlob(rawKey) };\n}\n\n/** SHA-256 hex of the canonical SSH blob; leaves legacy text fingerprints unchanged. */\nexport async function ed25519KeyId(publicKey: string): Promise<string | null> {\n\treturn hashEd25519KeyId(parseSshEd25519PublicKey(publicKey));\n}\n\n/** Internal canonical identity hash, not proof of key possession or authorization. */\nexport async function hashEd25519KeyId(parsed: SshEd25519Parse): Promise<string | null> {\n\tif (parsed.kind !== \"ed25519\") return null;\n\t// Copy to an owned ArrayBuffer for the portable Web Crypto BufferSource API.\n\tconst bytes = new Uint8Array(parsed.blob);\n\tconst digest = await globalThis.crypto.subtle.digest(\"SHA-256\", bytes.buffer);\n\treturn Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n}\n","import { Buffer } from \"node:buffer\";\nimport {\n\thashEd25519KeyId,\n\tparseSshEd25519PublicKeyWithDecoder,\n\ttype SshEd25519Parse,\n} from \"./coordinator-ed25519-key-id.js\";\n\nfunction decodeWireForRevocation(encoded: string): Uint8Array | null {\n\ttry {\n\t\treturn Buffer.from(encoded, \"base64\");\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n/** Metadata only: Buffer aliases do not expand signature acceptance or prove key possession. */\nexport function parseSshEd25519PublicKeyForRevocation(publicKey: string): SshEd25519Parse {\n\treturn parseSshEd25519PublicKeyWithDecoder(publicKey, decodeWireForRevocation);\n}\n\n/** Canonical SSH identity for revocation metadata, not an authorization check. */\nexport async function ed25519KeyIdForRevocation(publicKey: string): Promise<string | null> {\n\treturn hashEd25519KeyId(parseSshEd25519PublicKeyForRevocation(publicKey));\n}\n","import { createHash } from \"node:crypto\";\n\n/** SHA-256 hex digest of a public key string. */\nexport function fingerprintPublicKey(publicKey: string): string {\n\treturn createHash(\"sha256\").update(publicKey, \"utf-8\").digest(\"hex\");\n}\n","const COMMAND_FAILURE_PREFIX = /^(?:command failed(?:\\s|:)|error:\\s|fatal:\\s|git:\\s)/iu;\nconst WRAPPED_GIT_FAILURE =\n\t/^(?:giterror|git error|git command failed):[^\\r\\n]*(?:not a git repository|unknown revision or path|no such remote)\\b/iu;\n\n/** Return true when a discovery failure was supplied where Project identity was expected. */\nexport function isMalformedProjectIdentity(value: unknown): boolean {\n\tif (typeof value !== \"string\") return false;\n\tconst cleaned = value.trim();\n\tif (!cleaned) return false;\n\tif (cleaned.includes(\"\\n\") || cleaned.includes(\"\\r\")) return true;\n\treturn COMMAND_FAILURE_PREFIX.test(cleaned) || WRAPPED_GIT_FAILURE.test(cleaned);\n}\n\nexport function cleanProjectIdentity(value: string | null | undefined): string | null {\n\tconst cleaned = value?.trim();\n\tif (!cleaned || isMalformedProjectIdentity(cleaned)) return null;\n\treturn cleaned;\n}\n","import type {\n\tCoordinatorEnrollment,\n\tCoordinatorScope,\n\tCoordinatorScopeAuthorizationInput,\n\tCoordinatorScopeAuthorizationResult,\n\tCoordinatorScopeMembership,\n} from \"./coordinator-store-contract.js\";\n\nexport const SCOPE_FIELDS = [\n\t\"scope_id\",\n\t\"label\",\n\t\"kind\",\n\t\"authority_type\",\n\t\"coordinator_id\",\n\t\"group_id\",\n\t\"manifest_issuer_device_id\",\n\t\"membership_epoch\",\n\t\"manifest_hash\",\n\t\"status\",\n\t\"created_at\",\n\t\"updated_at\",\n] as const;\nexport const MEMBERSHIP_FIELDS = [\n\t\"scope_id\",\n\t\"device_id\",\n\t\"role\",\n\t\"status\",\n\t\"membership_epoch\",\n\t\"coordinator_id\",\n\t\"group_id\",\n\t\"manifest_issuer_device_id\",\n\t\"manifest_hash\",\n\t\"signed_manifest_json\",\n\t\"updated_at\",\n] as const;\nexport const ENROLLMENT_FIELDS = [\n\t\"group_id\",\n\t\"device_id\",\n\t\"public_key\",\n\t\"fingerprint\",\n\t\"identity_id\",\n\t\"display_name\",\n\t\"enabled\",\n\t\"created_at\",\n] as const;\n\nconst NULLABLE_FIELDS = new Set([\n\t\"coordinator_id\",\n\t\"group_id\",\n\t\"manifest_issuer_device_id\",\n\t\"manifest_hash\",\n\t\"signed_manifest_json\",\n\t\"identity_id\",\n\t\"display_name\",\n]);\nfunction text(value: unknown): value is string {\n\treturn typeof value === \"string\" && value.length > 0 && !value.includes(\"\\0\");\n}\n\nexport function captureScopeAuthorizationInput(\n\traw: CoordinatorScopeAuthorizationInput,\n): CoordinatorScopeAuthorizationInput {\n\tconst group = Object.getOwnPropertyDescriptor(raw, \"groupId\");\n\tconst scope = Object.getOwnPropertyDescriptor(raw, \"scopeId\");\n\tif (\n\t\t!group ||\n\t\t!scope ||\n\t\t!(\"value\" in group) ||\n\t\t!(\"value\" in scope) ||\n\t\t!text(group.value) ||\n\t\t!text(scope.value)\n\t)\n\t\tthrow new Error(\"scope_authorization_unavailable\");\n\treturn { groupId: group.value, scopeId: scope.value };\n}\n\n/** Reject malformed storage instead of treating it as an empty snapshot. */\nexport function requireScopeAuthorizationRecord(row: unknown, fields: readonly string[]): void {\n\tif (!row || typeof row !== \"object\" || Array.isArray(row))\n\t\tthrow new Error(\"scope_authorization_unavailable\");\n\tconst record = row as Record<string, unknown>;\n\tfor (const field of fields) {\n\t\tif (!validField(field, record[field])) throw new Error(\"scope_authorization_unavailable\");\n\t}\n}\n\nfunction validField(field: string, value: unknown): boolean {\n\tif (field === \"membership_epoch\" || field === \"enabled\")\n\t\treturn Number.isSafeInteger(value) && (value as number) >= 0;\n\t// Key parsing decides whether string evidence is usable, including empty legacy text.\n\tif (field === \"public_key\") return typeof value === \"string\";\n\tif (field === \"display_name\" || field === \"identity_id\")\n\t\treturn value === null || (typeof value === \"string\" && !value.includes(\"\\0\"));\n\tif (NULLABLE_FIELDS.has(field) && value === null) return true;\n\treturn text(value);\n}\n\nexport function scopeAuthorizationError(\n\tscope: CoordinatorScope,\n\tgroupId: string,\n): Extract<CoordinatorScopeAuthorizationResult, { kind: \"rejected\" }>[\"error\"] | null {\n\tif (scope.group_id !== groupId || scope.authority_type !== \"coordinator\")\n\t\treturn \"scope_source_mismatch\";\n\tif (scope.status !== \"active\") return \"scope_inactive\";\n\treturn null;\n}\n\n/** Null legacy member source fields inherit the explicit scope source, never owner/issuer authority.\n * An unbound scope group cannot authorize; a null coordinator ID preserves group-bound legacy rows.\n * Neither source metadata nor roles and labels infer tenant ownership or account-session proof. */\nexport function isCurrentScopeMember(\n\tscope: CoordinatorScope,\n\tmember: CoordinatorScopeMembership,\n): boolean {\n\tif (\n\t\tmember.scope_id !== scope.scope_id ||\n\t\tmember.status !== \"active\" ||\n\t\tmember.membership_epoch < scope.membership_epoch\n\t)\n\t\treturn false;\n\treturn (\n\t\t[\"group_id\", \"coordinator_id\", \"manifest_issuer_device_id\", \"manifest_hash\"] as const\n\t).every((field) => member[field] === null || member[field] === scope[field]);\n}\n\nexport interface CapturedScopeMember {\n\tmembership: CoordinatorScopeMembership;\n\tenrollment: CoordinatorEnrollment;\n\tkeyId: string;\n}\n\nexport function parseScopeAuthorizationMembers(\n\traw: unknown,\n\tcaptured: CapturedScopeMember[],\n): CapturedScopeMember[] {\n\tif (typeof raw !== \"string\") throw new Error(\"scope_authorization_unavailable\");\n\tconst members: unknown = JSON.parse(raw);\n\tif (!Array.isArray(members)) throw new Error(\"scope_authorization_unavailable\");\n\tconst expected = new Set(captured.map((member) => JSON.stringify(member)));\n\tfor (const member of members) {\n\t\tconst encoded = JSON.stringify(member);\n\t\tif (!expected.delete(encoded)) throw new Error(\"scope_authorization_unavailable\");\n\t}\n\treturn (members as CapturedScopeMember[]).sort(compareMemberDeviceIds);\n}\n\nfunction compareMemberDeviceIds(left: CapturedScopeMember, right: CapturedScopeMember): number {\n\tconst leftId = left.membership.device_id;\n\tconst rightId = right.membership.device_id;\n\tif (leftId < rightId) return -1;\n\tif (leftId > rightId) return 1;\n\treturn 0;\n}\n\nfunction pinned(alias: string, fields: readonly string[], path: string): string {\n\treturn fields\n\t\t.map((field) => `${alias}.${field} IS json_extract(captured.value, '$.${path}${field}')`)\n\t\t.join(\" AND \");\n}\n\n/** Final reads pin every captured DTO field and canonical revocation subject; no replacement key is promoted. */\nexport const READ_CURRENT_SCOPE_SQL = `SELECT s.* FROM json_each(?) captured\nJOIN coordinator_scopes s ON ${pinned(\"s\", SCOPE_FIELDS, \"\")}\nJOIN groups g ON g.group_id = s.group_id WHERE g.archived_at IS NULL AND s.status = 'active'\nAND s.authority_type = 'coordinator'`;\nexport const READ_CURRENT_SCOPE_MEMBERS_SQL = `SELECT captured.value FROM json_each(?) captured\nJOIN coordinator_scope_memberships m ON ${pinned(\"m\", MEMBERSHIP_FIELDS, \"membership.\")}\nJOIN enrolled_devices e ON ${pinned(\"e\", ENROLLMENT_FIELDS, \"enrollment.\")}\nWHERE e.enabled = 1 AND m.status = 'active'\nAND NOT EXISTS (SELECT 1 FROM coordinator_device_revocations r WHERE\n(r.subject_kind = 'device_id' AND r.subject_value = e.device_id) OR\n(r.subject_kind = 'ed25519_key' AND r.subject_value = json_extract(captured.value, '$.keyId')))\nORDER BY m.device_id ASC`;\n\nexport const READ_SCOPE_AUTHORIZATION_SQL = `WITH current_scope AS (${READ_CURRENT_SCOPE_SQL})\nSELECT current_scope.*, (SELECT json_group_array(json(value)) FROM\n(${READ_CURRENT_SCOPE_MEMBERS_SQL})) AS members_json FROM current_scope`;\n","export const SCOPE_MEMBERSHIP_REVOCATION_LIMITATION =\n\t\"Revocation blocks future sync for this Space. It does not remove data already copied to the revoked device; offline devices, backups, copied databases, malicious peers, or old versions may retain data.\";\n\nexport interface ScopeMembershipRevocationNotice {\n\tscope_id: string;\n\tdevice_id: string;\n\tmembership_epoch: number | null;\n\tprevents_future_sync: true;\n\tdeletes_already_copied_data: false;\n\tmessage: string;\n}\n\nexport interface ScopeMembershipEpochStatus {\n\tmembership_epoch: number | null;\n\trequired_epoch: number | null;\n\tstale: boolean;\n\treason: \"current\" | \"stale_epoch\" | \"unknown_epoch\";\n}\n\nexport function scopeMembershipEpochStatus(input: {\n\tmembershipEpoch?: number | null;\n\trequiredEpoch?: number | null;\n}): ScopeMembershipEpochStatus {\n\tconst membershipEpoch = Number.isFinite(input.membershipEpoch)\n\t\t? Number(input.membershipEpoch)\n\t\t: null;\n\tconst requiredEpoch = Number.isFinite(input.requiredEpoch) ? Number(input.requiredEpoch) : null;\n\tif (membershipEpoch == null || requiredEpoch == null) {\n\t\treturn {\n\t\t\tmembership_epoch: membershipEpoch,\n\t\t\trequired_epoch: requiredEpoch,\n\t\t\tstale: false,\n\t\t\treason: \"unknown_epoch\",\n\t\t};\n\t}\n\treturn {\n\t\tmembership_epoch: membershipEpoch,\n\t\trequired_epoch: requiredEpoch,\n\t\tstale: membershipEpoch < requiredEpoch,\n\t\treason: membershipEpoch < requiredEpoch ? \"stale_epoch\" : \"current\",\n\t};\n}\n\nexport function explainScopeMembershipRevocation(input: {\n\tscopeId: string;\n\tdeviceId: string;\n\tmembershipEpoch?: number | null;\n}): ScopeMembershipRevocationNotice {\n\treturn {\n\t\tscope_id: input.scopeId,\n\t\tdevice_id: input.deviceId,\n\t\tmembership_epoch: Number.isFinite(input.membershipEpoch) ? Number(input.membershipEpoch) : null,\n\t\tprevents_future_sync: true,\n\t\tdeletes_already_copied_data: false,\n\t\tmessage: SCOPE_MEMBERSHIP_REVOCATION_LIMITATION,\n\t};\n}\n","import { createHash } from \"node:crypto\";\nimport { resolve } from \"node:path\";\nimport { cleanProjectIdentity, isMalformedProjectIdentity } from \"./project-identity.js\";\n\nexport type WorkspaceIdentitySource =\n\t| \"git_remote\"\n\t| \"git_remote_branch\"\n\t| \"git_repository\"\n\t| \"cwd\"\n\t| \"workspace_id\"\n\t| \"unmapped\";\n\nexport interface WorkspaceIdentityInput {\n\tgitRemote?: string | null;\n\tgitBranch?: string | null;\n\trepositoryIdentity?: string | null;\n\tcwd?: string | null;\n\tworkspaceId?: string | null;\n\tproject?: string | null;\n\tbranchScoped?: boolean;\n\tallowRepositoryCwdFallback?: boolean;\n}\n\nexport interface CanonicalWorkspaceIdentity {\n\tvalue: string;\n\tsource: WorkspaceIdentitySource;\n\tdisplayProject: string | null;\n}\n\nfunction normalizeSlash(value: string): string {\n\tconst normalized = value.trim().replaceAll(\"\\\\\", \"/\").replace(/\\/+$/, \"\");\n\treturn normalized || value.trim();\n}\n\nfunction normalizeCwd(cwd: string): string {\n\t// Callers should pass an already-realpathed session cwd when symlink\n\t// resolution matters; this pure helper only normalizes path syntax.\n\treturn normalizeSlash(resolve(cwd));\n}\n\nfunction unmappedIdentity(input: WorkspaceIdentityInput): string {\n\tconst validSeed = [input.cwd, input.project, input.workspaceId]\n\t\t.map((value) => cleanProjectIdentity(value))\n\t\t.find((value) => value !== null);\n\tconst identityTuple = [\n\t\tinput.gitRemote,\n\t\tinput.gitBranch,\n\t\tinput.cwd,\n\t\tinput.project,\n\t\tinput.workspaceId,\n\t].map((value) => (typeof value === \"string\" ? value.trim() : null));\n\tlet seed = validSeed ?? \"unknown\";\n\tif (!validSeed && identityTuple.some(isMalformedProjectIdentity)) {\n\t\tseed = JSON.stringify(identityTuple);\n\t}\n\tconst digest = createHash(\"sha256\").update(seed, \"utf8\").digest(\"hex\");\n\treturn `unmapped:${digest}`;\n}\n\nexport function canonicalWorkspaceIdentity(\n\tinput: WorkspaceIdentityInput,\n): CanonicalWorkspaceIdentity {\n\tconst gitRemote = cleanProjectIdentity(input.gitRemote);\n\tconst gitBranch = cleanProjectIdentity(input.gitBranch);\n\tconst repositoryIdentity = cleanProjectIdentity(input.repositoryIdentity);\n\tconst cwd = cleanProjectIdentity(input.cwd);\n\tconst workspaceId = cleanProjectIdentity(input.workspaceId);\n\tconst project = cleanProjectIdentity(input.project);\n\n\tif (repositoryIdentity && !input.branchScoped) {\n\t\treturn {\n\t\t\tvalue: normalizeSlash(repositoryIdentity),\n\t\t\tsource: \"git_repository\",\n\t\t\tdisplayProject: project,\n\t\t};\n\t}\n\n\tif (gitRemote) {\n\t\tconst normalizedRemote = normalizeSlash(gitRemote);\n\t\tif (input.branchScoped && gitBranch) {\n\t\t\treturn {\n\t\t\t\tvalue: `${normalizedRemote}:${gitBranch}`,\n\t\t\t\tsource: \"git_remote_branch\",\n\t\t\t\tdisplayProject: project,\n\t\t\t};\n\t\t}\n\t\treturn { value: normalizedRemote, source: \"git_remote\", displayProject: project };\n\t}\n\n\tif (repositoryIdentity) {\n\t\treturn {\n\t\t\tvalue: normalizeSlash(repositoryIdentity),\n\t\t\tsource: \"git_repository\",\n\t\t\tdisplayProject: project,\n\t\t};\n\t}\n\n\tif (cwd) {\n\t\treturn { value: normalizeCwd(cwd), source: \"cwd\", displayProject: project };\n\t}\n\n\tif (workspaceId) {\n\t\treturn { value: normalizeSlash(workspaceId), source: \"workspace_id\", displayProject: project };\n\t}\n\n\treturn { value: unmappedIdentity(input), source: \"unmapped\", displayProject: project };\n}\n"],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AA0B,MAC9D,IAAO,KAAK,UAAU,CAAa,IAG7B,YADQ,EAAW,QAAQ,CAAC,CAAC,OAAO,GAAM,MAAM,CAAC,CAAC,OAAO,KAC7C;AACpB;AAEA,SAAgB,EACf,GAC6B;CAC7B,IAAM,IAAY,EAAqB,EAAM,SAAS,GAChD,IAAY,EAAqB,EAAM,SAAS,GAChD,IAAqB,EAAqB,EAAM,kBAAkB,GAClE,IAAM,EAAqB,EAAM,GAAG,GACpC,IAAc,EAAqB,EAAM,WAAW,GACpD,IAAU,EAAqB,EAAM,OAAO;CAElD,IAAI,KAAsB,CAAC,EAAM,cAChC,OAAO;EACN,OAAO,EAAe,CAAkB;EACxC,QAAQ;EACR,gBAAgB;CACjB;CAGD,IAAI,GAAW;EACd,IAAM,IAAmB,EAAe,CAAS;EAQjD,OAPI,EAAM,gBAAgB,IAClB;GACN,OAAO,GAAG,EAAiB,GAAG;GAC9B,QAAQ;GACR,gBAAgB;EACjB,IAEM;GAAE,OAAO;GAAkB,QAAQ;GAAc,gBAAgB;EAAQ;CACjF;CAkBA,OAhBI,IACI;EACN,OAAO,EAAe,CAAkB;EACxC,QAAQ;EACR,gBAAgB;CACjB,IAGG,IACI;EAAE,OAAO,EAAa,CAAG;EAAG,QAAQ;EAAO,gBAAgB;CAAQ,IAGvE,IACI;EAAE,OAAO,EAAe,CAAW;EAAG,QAAQ;EAAgB,gBAAgB;CAAQ,IAGvF;EAAE,OAAO,EAAiB,CAAK;EAAG,QAAQ;EAAY,gBAAgB;CAAQ;AACtF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemem/core",
3
- "version": "0.49.0",
3
+ "version": "0.50.0-beta.1",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {
@@ -39,7 +39,7 @@
39
39
  "dist/"
40
40
  ],
41
41
  "devDependencies": {
42
- "@codemem/embeddings": "^0.49.0",
42
+ "@codemem/embeddings": "^0.50.0-beta.1",
43
43
  "@types/better-sqlite3": "^9.6.0",
44
44
  "@types/ws": "8.18.1",
45
45
  "typescript": "^7.0.2",
@@ -65,7 +65,7 @@
65
65
  "zod": "4.6.6"
66
66
  },
67
67
  "peerDependencies": {
68
- "@codemem/embeddings": "^0.49.0"
68
+ "@codemem/embeddings": "^0.50.0-beta.1"
69
69
  },
70
70
  "peerDependenciesMeta": {
71
71
  "@codemem/embeddings": {