@codemem/core 0.49.1 → 0.50.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-types.d.ts +7 -0
- package/dist/api-types.d.ts.map +1 -1
- package/dist/better-sqlite-coordinator-runtime.d.ts.map +1 -1
- package/dist/better-sqlite-coordinator-store.d.ts +56 -3
- package/dist/better-sqlite-coordinator-store.d.ts.map +1 -1
- package/dist/boundary-readiness-inventory.d.ts +27 -0
- package/dist/boundary-readiness-inventory.d.ts.map +1 -0
- package/dist/coordinator-account-link-receiver.d.ts +15 -0
- package/dist/coordinator-account-link-receiver.d.ts.map +1 -1
- package/dist/coordinator-account-link-status-client.d.ts +1 -1
- package/dist/coordinator-account-link-status-client.d.ts.map +1 -1
- package/dist/coordinator-actions.d.ts +12 -0
- package/dist/coordinator-actions.d.ts.map +1 -1
- package/dist/coordinator-api.d.ts +7 -0
- package/dist/coordinator-api.d.ts.map +1 -1
- package/dist/coordinator-auth-historical-store-test-fixture.d.ts.map +1 -1
- package/dist/coordinator-auth-link-revocation-test-harness.d.ts.map +1 -1
- package/dist/coordinator-auth-schema-stage.d.ts +14 -2
- package/dist/coordinator-auth-schema-stage.d.ts.map +1 -1
- package/dist/coordinator-block-tombstone-test-harness.d.ts +3 -0
- package/dist/coordinator-block-tombstone-test-harness.d.ts.map +1 -0
- package/dist/coordinator-bootstrap-authorization-api-test-harness.d.ts.map +1 -1
- package/dist/coordinator-bootstrap-authorization-test-harness.d.ts.map +1 -1
- package/dist/coordinator-bootstrap-revocation-test-harness.d.ts.map +1 -1
- package/dist/coordinator-boundary-readiness-client.d.ts +35 -0
- package/dist/coordinator-boundary-readiness-client.d.ts.map +1 -0
- package/dist/coordinator-boundary-readiness-route.d.ts +52 -0
- package/dist/coordinator-boundary-readiness-route.d.ts.map +1 -0
- package/dist/coordinator-boundary-readiness-test-harness.d.ts +15 -0
- package/dist/coordinator-boundary-readiness-test-harness.d.ts.map +1 -0
- package/dist/coordinator-boundary-readiness.d.ts +161 -0
- package/dist/coordinator-boundary-readiness.d.ts.map +1 -0
- package/dist/coordinator-browser-auth-app.d.ts +1 -1
- package/dist/coordinator-browser-auth-app.d.ts.map +1 -1
- package/dist/coordinator-browser-auth-callback.d.ts +2 -1
- package/dist/coordinator-browser-auth-callback.d.ts.map +1 -1
- package/dist/coordinator-controller-revocation-test-harness.d.ts.map +1 -1
- package/dist/coordinator-d1-schema-inventory.d.ts +2 -0
- package/dist/coordinator-d1-schema-inventory.d.ts.map +1 -1
- package/dist/coordinator-d1-scope-authorization-test-harness.d.ts.map +1 -1
- package/dist/coordinator-device-auth-link.d.ts +1 -0
- package/dist/coordinator-device-auth-link.d.ts.map +1 -1
- package/dist/coordinator-device-rejoin-browser-evidence.d.ts +28 -0
- package/dist/coordinator-device-rejoin-browser-evidence.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-browser-transaction-test-harness.d.ts +8 -0
- package/dist/coordinator-device-rejoin-browser-transaction-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-browser-transaction.d.ts +43 -0
- package/dist/coordinator-device-rejoin-browser-transaction.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-browser-view.d.ts +30 -0
- package/dist/coordinator-device-rejoin-browser-view.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-browser.d.ts +26 -0
- package/dist/coordinator-device-rejoin-browser.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-client-requests.d.ts +70 -0
- package/dist/coordinator-device-rejoin-client-requests.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-client.d.ts +15 -0
- package/dist/coordinator-device-rejoin-client.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-confirmation-test-harness.d.ts +22 -0
- package/dist/coordinator-device-rejoin-confirmation-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-confirmation.d.ts +18 -0
- package/dist/coordinator-device-rejoin-confirmation.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-destinations-test-harness.d.ts +7 -0
- package/dist/coordinator-device-rejoin-destinations-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-destinations.d.ts +25 -0
- package/dist/coordinator-device-rejoin-destinations.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-display.d.ts +14 -0
- package/dist/coordinator-device-rejoin-display.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-event-client.d.ts +30 -0
- package/dist/coordinator-device-rejoin-event-client.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-events.d.ts +7 -0
- package/dist/coordinator-device-rejoin-events.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-finalize-test-harness.d.ts +14 -0
- package/dist/coordinator-device-rejoin-finalize-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-finalize.d.ts +36 -0
- package/dist/coordinator-device-rejoin-finalize.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-http.d.ts +11 -0
- package/dist/coordinator-device-rejoin-http.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-link-evidence-test-harness.d.ts +17 -0
- package/dist/coordinator-device-rejoin-link-evidence-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-link-evidence.d.ts +29 -0
- package/dist/coordinator-device-rejoin-link-evidence.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-link-lineage.d.ts +7 -0
- package/dist/coordinator-device-rejoin-link-lineage.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-oidc-pins.d.ts +14 -0
- package/dist/coordinator-device-rejoin-oidc-pins.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-proof.d.ts +41 -0
- package/dist/coordinator-device-rejoin-proof.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-schema-test-harness.d.ts +8 -0
- package/dist/coordinator-device-rejoin-schema-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-schema.d.ts +9 -0
- package/dist/coordinator-device-rejoin-schema.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-start-evidence-test-harness.d.ts +40 -0
- package/dist/coordinator-device-rejoin-start-evidence-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-start-evidence.d.ts +25 -0
- package/dist/coordinator-device-rejoin-start-evidence.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-start-http.d.ts +12 -0
- package/dist/coordinator-device-rejoin-start-http.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-start-input.d.ts +23 -0
- package/dist/coordinator-device-rejoin-start-input.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-start-write.d.ts +38 -0
- package/dist/coordinator-device-rejoin-start-write.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-status-http.d.ts +10 -0
- package/dist/coordinator-device-rejoin-status-http.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-status-live-test-harness.d.ts +33 -0
- package/dist/coordinator-device-rejoin-status-live-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-status-projection.d.ts +28 -0
- package/dist/coordinator-device-rejoin-status-projection.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-status-test-harness.d.ts +8 -0
- package/dist/coordinator-device-rejoin-status-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-rejoin-status.d.ts +39 -0
- package/dist/coordinator-device-rejoin-status.d.ts.map +1 -0
- package/dist/coordinator-device-removal-commands.d.ts +13 -0
- package/dist/coordinator-device-removal-commands.d.ts.map +1 -0
- package/dist/coordinator-device-removal-commit-test-harness.d.ts +3 -0
- package/dist/coordinator-device-removal-commit-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-removal-commit.d.ts +44 -0
- package/dist/coordinator-device-removal-commit.d.ts.map +1 -0
- package/dist/coordinator-device-removal-dependents-test-harness.d.ts +9 -0
- package/dist/coordinator-device-removal-dependents-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-removal-dependents.d.ts +34 -0
- package/dist/coordinator-device-removal-dependents.d.ts.map +1 -0
- package/dist/coordinator-device-removal-list-test-harness.d.ts +4 -0
- package/dist/coordinator-device-removal-list-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-removal-list.d.ts +40 -0
- package/dist/coordinator-device-removal-list.d.ts.map +1 -0
- package/dist/coordinator-device-removal-preview-test-harness.d.ts +9 -0
- package/dist/coordinator-device-removal-preview-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-removal-routes.d.ts +13 -0
- package/dist/coordinator-device-removal-routes.d.ts.map +1 -0
- package/dist/coordinator-device-removal-target.d.ts +98 -0
- package/dist/coordinator-device-removal-target.d.ts.map +1 -0
- package/dist/coordinator-device-removal-test-harness.d.ts +70 -0
- package/dist/coordinator-device-removal-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-removal-writer-test-harness.d.ts +8 -0
- package/dist/coordinator-device-removal-writer-test-harness.d.ts.map +1 -0
- package/dist/coordinator-device-removal.d.ts +233 -0
- package/dist/coordinator-device-removal.d.ts.map +1 -0
- package/dist/coordinator-device-revocation-client.d.ts +2 -0
- package/dist/coordinator-device-revocation-client.d.ts.map +1 -1
- package/dist/coordinator-device-revocation-handler-test-harness.d.ts.map +1 -1
- package/dist/coordinator-device-revocation-handler.d.ts +1 -1
- package/dist/coordinator-device-revocation-handler.d.ts.map +1 -1
- package/dist/coordinator-device-revocation-route.d.ts.map +1 -1
- package/dist/coordinator-device-revocation-test-harness.d.ts.map +1 -1
- package/dist/coordinator-device-revocation.d.ts +20 -2
- package/dist/coordinator-device-revocation.d.ts.map +1 -1
- package/dist/coordinator-enrollment-reconciler.d.ts.map +1 -1
- package/dist/coordinator-enrollment-test-fixtures.d.ts +126 -0
- package/dist/coordinator-enrollment-test-fixtures.d.ts.map +1 -0
- package/dist/coordinator-history-sql-equivalence-test-fixtures.d.ts +1 -1
- package/dist/coordinator-history-sql-equivalence-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-identity-grant-revocation-test-harness.d.ts.map +1 -1
- package/dist/coordinator-identity-group-grant-test-harness.d.ts.map +1 -1
- package/dist/coordinator-invitation-lift-test-harness.d.ts +6 -0
- package/dist/coordinator-invitation-lift-test-harness.d.ts.map +1 -0
- package/dist/coordinator-invitation-removal.d.ts +71 -0
- package/dist/coordinator-invitation-removal.d.ts.map +1 -0
- package/dist/coordinator-join-review-guards.d.ts +2 -0
- package/dist/coordinator-join-review-guards.d.ts.map +1 -1
- package/dist/coordinator-join-revocation-test-harness.d.ts.map +1 -1
- package/dist/coordinator-key-id-fill-api-test-harness.d.ts +12 -0
- package/dist/coordinator-key-id-fill-api-test-harness.d.ts.map +1 -0
- package/dist/coordinator-key-id-fill-api.d.ts +19 -0
- package/dist/coordinator-key-id-fill-api.d.ts.map +1 -0
- package/dist/coordinator-legacy-device-ownership.d.ts +66 -5
- package/dist/coordinator-legacy-device-ownership.d.ts.map +1 -1
- package/dist/coordinator-legacy-owner-compatibility.d.ts +3 -0
- package/dist/coordinator-legacy-owner-compatibility.d.ts.map +1 -1
- package/dist/coordinator-membership-enrollment-test-harness.d.ts +4 -0
- package/dist/coordinator-membership-enrollment-test-harness.d.ts.map +1 -0
- package/dist/coordinator-membership-enrollment.d.ts +15 -0
- package/dist/coordinator-membership-enrollment.d.ts.map +1 -0
- package/dist/coordinator-owner-enrollment-commit.d.ts +1 -1
- package/dist/coordinator-owner-enrollment-commit.d.ts.map +1 -1
- package/dist/coordinator-owner-enrollment-qualification-test-harness.d.ts.map +1 -1
- package/dist/coordinator-owner-enrollment-qualification.d.ts +1 -0
- package/dist/coordinator-owner-enrollment-qualification.d.ts.map +1 -1
- package/dist/coordinator-owner-resolution-review-test-fixtures.d.ts.map +1 -1
- package/dist/coordinator-peer-discovery-revocation-test-harness.d.ts.map +1 -1
- package/dist/coordinator-peer-removal-api-test-harness.d.ts +29 -0
- package/dist/coordinator-peer-removal-api-test-harness.d.ts.map +1 -0
- package/dist/coordinator-peer-removal-query-test-harness.d.ts +4 -0
- package/dist/coordinator-peer-removal-query-test-harness.d.ts.map +1 -0
- package/dist/coordinator-peer-removal-query.d.ts +32 -0
- package/dist/coordinator-peer-removal-query.d.ts.map +1 -0
- package/dist/coordinator-peer-revocation-route.d.ts +45 -0
- package/dist/coordinator-peer-revocation-route.d.ts.map +1 -0
- package/dist/coordinator-peer-revocation.d.ts +61 -0
- package/dist/coordinator-peer-revocation.d.ts.map +1 -0
- package/dist/coordinator-presence-capabilities.d.ts +10 -0
- package/dist/coordinator-presence-capabilities.d.ts.map +1 -0
- package/dist/coordinator-project-revocation-test-harness.d.ts +1 -1
- package/dist/coordinator-project-revocation-test-harness.d.ts.map +1 -1
- package/dist/coordinator-recipient-revocation-test-harness.d.ts.map +1 -1
- package/dist/coordinator-refresh-lifecycle.d.ts +11 -0
- package/dist/coordinator-refresh-lifecycle.d.ts.map +1 -0
- package/dist/coordinator-rejoin-discovery.d.ts +16 -0
- package/dist/coordinator-rejoin-discovery.d.ts.map +1 -0
- package/dist/coordinator-rejoin-timestamp.d.ts +3 -0
- package/dist/coordinator-rejoin-timestamp.d.ts.map +1 -0
- package/dist/coordinator-removal-notice.d.ts +21 -0
- package/dist/coordinator-removal-notice.d.ts.map +1 -0
- package/dist/coordinator-removal-progress-listing-test-harness.d.ts +3 -0
- package/dist/coordinator-removal-progress-listing-test-harness.d.ts.map +1 -0
- package/dist/coordinator-runtime-ynLTJI6d.js +1712 -0
- package/dist/coordinator-runtime-ynLTJI6d.js.map +1 -0
- package/dist/coordinator-runtime.d.ts +20 -1
- package/dist/coordinator-runtime.d.ts.map +1 -1
- package/dist/coordinator-scope-authorization-api-test-harness.d.ts.map +1 -1
- package/dist/coordinator-store-contract.d.ts +21 -3
- package/dist/coordinator-store-contract.d.ts.map +1 -1
- package/dist/coordinator-store-test-harness.d.ts.map +1 -1
- package/dist/coordinator-sync-config.d.ts +14 -0
- package/dist/coordinator-sync-config.d.ts.map +1 -1
- package/dist/d1-coordinator-runtime.d.ts +3 -1
- package/dist/d1-coordinator-runtime.d.ts.map +1 -1
- package/dist/d1-coordinator-store.d.ts +63 -3
- package/dist/d1-coordinator-store.d.ts.map +1 -1
- package/dist/database-runtime-primitives.d.ts +1 -1
- package/dist/db.d.ts.map +1 -1
- package/dist/device-identity-binding.d.ts +24 -0
- package/dist/device-identity-binding.d.ts.map +1 -1
- package/dist/device-identity-inventory.d.ts +19 -1
- package/dist/device-identity-inventory.d.ts.map +1 -1
- package/dist/device-retirement.d.ts +43 -0
- package/dist/device-retirement.d.ts.map +1 -0
- package/dist/identity-device-assignment.d.ts +8 -0
- package/dist/identity-device-assignment.d.ts.map +1 -1
- package/dist/index.d.ts +34 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11649 -10631
- package/dist/index.js.map +1 -1
- package/dist/internal/cloudflare-coordinator.js +2317 -1542
- package/dist/internal/cloudflare-coordinator.js.map +1 -1
- package/dist/internal/relay-runtime.js +28 -28
- package/dist/legacy-pairing-assignment-conversion.d.ts +46 -0
- package/dist/legacy-pairing-assignment-conversion.d.ts.map +1 -0
- package/dist/legacy-pairing-assignment-state.d.ts +11 -0
- package/dist/legacy-pairing-assignment-state.d.ts.map +1 -0
- package/dist/legacy-team-setup-errors.d.ts +2 -1
- package/dist/legacy-team-setup-errors.d.ts.map +1 -1
- package/dist/local-origin-claim.d.ts +48 -0
- package/dist/local-origin-claim.d.ts.map +1 -0
- package/dist/maintenance/ai-structured.d.ts +2 -0
- package/dist/maintenance/ai-structured.d.ts.map +1 -1
- package/dist/observer-config.d.ts.map +1 -1
- package/dist/owned-recipient-d1-test-harness.d.ts.map +1 -1
- package/dist/owner-enrollment-link-authority.d.ts +1 -0
- package/dist/owner-enrollment-link-authority.d.ts.map +1 -1
- package/dist/{owner-enrollment-start-BsDwgxAh.js → owner-enrollment-start-D8QzF1Ar.js} +5548 -3637
- package/dist/owner-enrollment-start-D8QzF1Ar.js.map +1 -0
- package/dist/pairing-removal.d.ts +57 -0
- package/dist/pairing-removal.d.ts.map +1 -0
- package/dist/peer-project-filter-change.d.ts +33 -0
- package/dist/peer-project-filter-change.d.ts.map +1 -0
- package/dist/peer-project-filter-management.d.ts +7 -0
- package/dist/peer-project-filter-management.d.ts.map +1 -0
- package/dist/peer-project-filter-retention.d.ts +17 -0
- package/dist/peer-project-filter-retention.d.ts.map +1 -0
- package/dist/peer-removal-check-state.d.ts +24 -0
- package/dist/peer-removal-check-state.d.ts.map +1 -0
- package/dist/peer-removal.d.ts +34 -0
- package/dist/peer-removal.d.ts.map +1 -0
- package/dist/peer-traversal-coordinator-attempt-write-test-fixtures.d.ts.map +1 -1
- package/dist/peer-traversal-coordinator-decision-test-fixtures.d.ts.map +1 -1
- package/dist/policy-team-device-eligibility.d.ts +10 -0
- package/dist/policy-team-device-eligibility.d.ts.map +1 -1
- package/dist/project-boundary-migration-hold.d.ts +50 -0
- package/dist/project-boundary-migration-hold.d.ts.map +1 -0
- package/dist/project-boundary-migration-records.d.ts +46 -0
- package/dist/project-boundary-migration-records.d.ts.map +1 -0
- package/dist/project-filters-narrowing.d.ts +11 -0
- package/dist/project-filters-narrowing.d.ts.map +1 -0
- package/dist/project-scope-resume.d.ts +26 -0
- package/dist/project-scope-resume.d.ts.map +1 -0
- package/dist/project-scope-settings.d.ts +7 -0
- package/dist/project-scope-settings.d.ts.map +1 -1
- package/dist/project-scope-withdrawal.d.ts +48 -0
- package/dist/project-scope-withdrawal.d.ts.map +1 -0
- package/dist/project-withdrawal-state.d.ts +36 -0
- package/dist/project-withdrawal-state.d.ts.map +1 -0
- package/dist/{recipient-policy-contract-Ca40IBUh.js → recipient-policy-contract-BHxfaQZ2.js} +12 -5
- package/dist/recipient-policy-contract-BHxfaQZ2.js.map +1 -0
- package/dist/recipient-policy-contract.d.ts +7 -0
- package/dist/recipient-policy-contract.d.ts.map +1 -1
- package/dist/recipient-policy-contract.js +2 -2
- package/dist/recipient-policy-edges.d.ts.map +1 -1
- package/dist/recipient-policy-intent.d.ts +1 -0
- package/dist/recipient-policy-intent.d.ts.map +1 -1
- package/dist/recipient-policy-onboarding.d.ts.map +1 -1
- package/dist/recipient-policy-reconciler.d.ts.map +1 -1
- package/dist/recipient-policy-reconciliation.d.ts.map +1 -1
- package/dist/recipient-policy-team-create.d.ts +22 -0
- package/dist/recipient-policy-team-create.d.ts.map +1 -0
- package/dist/{relay-health-CeyhVeuq.js → relay-health-B8BpHFaE.js} +14 -14
- package/dist/{relay-health-CeyhVeuq.js.map → relay-health-B8BpHFaE.js.map} +1 -1
- package/dist/{relay-peer-client-DmZfZebO.js → relay-peer-client-w7WdS1AP.js} +3083 -2634
- package/dist/relay-peer-client-w7WdS1AP.js.map +1 -0
- package/dist/relay-server-test-fixtures.d.ts.map +1 -1
- package/dist/replication-cursor-orphan-cleanup.d.ts +14 -0
- package/dist/replication-cursor-orphan-cleanup.d.ts.map +1 -0
- package/dist/retired-device-aliases.d.ts +28 -0
- package/dist/retired-device-aliases.d.ts.map +1 -0
- package/dist/same-actor-peers.d.ts +5 -1
- package/dist/same-actor-peers.d.ts.map +1 -1
- package/dist/schema-bootstrap.d.ts +1 -0
- package/dist/schema-bootstrap.d.ts.map +1 -1
- package/dist/schema.d.ts +4456 -3623
- package/dist/schema.d.ts.map +1 -1
- package/dist/{scope-membership-cache-read-B6z47l2W.js → scope-resolution-B7FK15hx.js} +2242 -1608
- package/dist/scope-resolution-B7FK15hx.js.map +1 -0
- package/dist/semantic-worker-entry.js +1 -1
- package/dist/{semantic-worker-job-BLaC4xRY.js → semantic-worker-job-BjujlM4-.js} +3 -3
- package/dist/{semantic-worker-job-BLaC4xRY.js.map → semantic-worker-job-BjujlM4-.js.map} +1 -1
- package/dist/{semantic-worker-ranking-5-VSzEmx.js → semantic-worker-ranking-WaUCapnY.js} +66 -60
- package/dist/semantic-worker-ranking-WaUCapnY.js.map +1 -0
- package/dist/share-provisioning.d.ts +4 -0
- package/dist/share-provisioning.d.ts.map +1 -1
- package/dist/shared-owned-device-enrollment-test-harness.d.ts.map +1 -1
- package/dist/shared-owned-project-invites-test-harness.d.ts.map +1 -1
- package/dist/shared-owned-recipient-invites-test-harness.d.ts.map +1 -1
- package/dist/shared-ownership-writer-lifecycle-test-harness.d.ts.map +1 -1
- package/dist/snapshot-cross-scope-reconcile.d.ts +25 -0
- package/dist/snapshot-cross-scope-reconcile.d.ts.map +1 -0
- package/dist/{sync-auth-constants-BVzVfSmn.js → sync-auth-constants-DNUSV-Tn.js} +4482 -2842
- package/dist/sync-auth-constants-DNUSV-Tn.js.map +1 -0
- package/dist/sync-bootstrap.d.ts +2 -0
- package/dist/sync-bootstrap.d.ts.map +1 -1
- package/dist/sync-capability.d.ts +1 -1
- package/dist/sync-capability.d.ts.map +1 -1
- package/dist/sync-channel-progress.d.ts +7 -0
- package/dist/sync-channel-progress.d.ts.map +1 -1
- package/dist/sync-daemon.d.ts +4 -1
- package/dist/sync-daemon.d.ts.map +1 -1
- package/dist/sync-pass.d.ts.map +1 -1
- package/dist/sync-peer-addresses.d.ts +4 -2
- package/dist/sync-peer-addresses.d.ts.map +1 -1
- package/dist/sync-reachability-pass-BpTtRqcV.js +2 -0
- package/dist/{sync-reachability-pass-Dhn4N2hr.js → sync-reachability-pass-DKEORTbs.js} +2638 -2591
- package/dist/sync-reachability-pass-DKEORTbs.js.map +1 -0
- package/dist/sync-replication.d.ts +21 -3
- package/dist/sync-replication.d.ts.map +1 -1
- package/dist/sync-scope-protocol.d.ts.map +1 -1
- package/dist/test-environment-isolation.d.ts +2 -0
- package/dist/test-environment-isolation.d.ts.map +1 -0
- package/dist/test-schema.generated.d.ts +1 -1
- package/dist/test-schema.generated.d.ts.map +1 -1
- package/dist/test-utils.d.ts +4 -0
- package/dist/test-utils.d.ts.map +1 -1
- package/dist/{validated-vector-index-audit-B64yhEBF.js → validated-vector-index-audit-BtUovYuM.js} +269 -637
- package/dist/validated-vector-index-audit-BtUovYuM.js.map +1 -0
- package/dist/viewer-device-removal-commit.d.ts +56 -0
- package/dist/viewer-device-removal-commit.d.ts.map +1 -0
- package/dist/viewer-device-removal-evidence.d.ts +17 -0
- package/dist/viewer-device-removal-evidence.d.ts.map +1 -0
- package/dist/{scope-membership-semantics-B8qXaMqx.js → workspace-identity-C7EPmSZe.js} +121 -49
- package/dist/workspace-identity-C7EPmSZe.js.map +1 -0
- package/package.json +3 -3
- package/dist/coordinator-runtime-CEc6KhBE.js +0 -594
- package/dist/coordinator-runtime-CEc6KhBE.js.map +0 -1
- package/dist/owner-enrollment-start-BsDwgxAh.js.map +0 -1
- package/dist/recipient-policy-contract-Ca40IBUh.js.map +0 -1
- package/dist/relay-peer-client-DmZfZebO.js.map +0 -1
- package/dist/scope-membership-cache-read-B6z47l2W.js.map +0 -1
- package/dist/scope-membership-semantics-B8qXaMqx.js.map +0 -1
- package/dist/semantic-worker-ranking-5-VSzEmx.js.map +0 -1
- package/dist/sync-auth-constants-BVzVfSmn.js.map +0 -1
- package/dist/sync-reachability-pass-C_-w0t6b.js +0 -2
- package/dist/sync-reachability-pass-Dhn4N2hr.js.map +0 -1
- package/dist/validated-vector-index-audit-B64yhEBF.js.map +0 -1
- package/dist/workspace-identity-DI8bBR0Y.js +0 -76
- package/dist/workspace-identity-DI8bBR0Y.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-bootstrap-authorization-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-bootstrap-authorization-test-harness.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coordinator-bootstrap-authorization-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-bootstrap-authorization-test-harness.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACX,eAAe,EACf,YAAY,EACZ,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAEN,KAAK,cAAc,EAEnB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/C,KAAK,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC;AACrC,eAAO,MAAM,kBAAkB,QAAuB,CAAC;AACvD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,WAAW,UAErF;AACD,wBAAsB,oBAAoB,CACzC,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,QAAQ,CAAC,EACzC,MAAM,UAAQ,gFAmBd;AAgED,wBAAgB,sCAAsC,CAAC,IAAI,EAAE,IAAI,QAMhE;AAmOD,wBAAgB,gCAAgC,CAC/C,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,cAAc,EAC7C,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,QASnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-bootstrap-revocation-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-bootstrap-revocation-test-harness.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coordinator-bootstrap-revocation-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-bootstrap-revocation-test-harness.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACX,eAAe,EACf,YAAY,EACZ,MAAM,oDAAoD,CAAC;AAE5D,OAAO,EACN,kBAAkB,EAClB,KAAK,cAAc,EAEnB,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,yBAAyB,UAKrC,CAAC;AACF,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AA8D/C,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,IAAI,QAM7D;AA8LD,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,sBAE5F;AACD,KAAK,OAAO,GAAG,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,kBAAkB,CAAC;AAI/F,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,QAI5E;AAwGD,wBAAgB,gCAAgC,CAC/C,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,cAAc,QAuC7C"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type BoundaryReadinessProject, type BoundaryReadinessRejection } from "./coordinator-boundary-readiness.js";
|
|
2
|
+
export interface SubmitBoundaryReadinessInput {
|
|
3
|
+
coordinatorUrl: string;
|
|
4
|
+
groupId: string;
|
|
5
|
+
deviceId: string;
|
|
6
|
+
dbPath: string;
|
|
7
|
+
keysDir?: string;
|
|
8
|
+
sequence: number;
|
|
9
|
+
omittedProjects: number;
|
|
10
|
+
projects: readonly BoundaryReadinessProject[];
|
|
11
|
+
timeoutS?: number;
|
|
12
|
+
}
|
|
13
|
+
type Failure = "invalid_input" | "request_too_large" | "signing_failed" | "transport_failed" | "invalid_response";
|
|
14
|
+
export type SubmitBoundaryReadinessResult = {
|
|
15
|
+
kind: "stored";
|
|
16
|
+
sequence: number;
|
|
17
|
+
rejected: BoundaryReadinessRejection[];
|
|
18
|
+
} | {
|
|
19
|
+
kind: "stale";
|
|
20
|
+
sequence: number;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "unsupported";
|
|
23
|
+
} | {
|
|
24
|
+
kind: "unavailable";
|
|
25
|
+
} | {
|
|
26
|
+
kind: "rejected";
|
|
27
|
+
status: number;
|
|
28
|
+
} | {
|
|
29
|
+
kind: "failed";
|
|
30
|
+
reason: Failure;
|
|
31
|
+
};
|
|
32
|
+
/** Sends one fitted record using an existing device key. The caller owns sequence and retry policy. */
|
|
33
|
+
export declare function submitBoundaryReadiness(input: SubmitBoundaryReadinessInput): Promise<SubmitBoundaryReadinessResult>;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=coordinator-boundary-readiness-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-boundary-readiness-client.d.ts","sourceRoot":"","sources":["../src/coordinator-boundary-readiness-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,MAAM,qCAAqC,CAAC;AAK7C,MAAM,WAAW,4BAA4B;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,OAAO,GACT,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,CAAC;AAEtB,MAAM,MAAM,6BAA6B,GACtC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,0BAA0B,EAAE,CAAA;CAAE,GAE5E;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAmGvC,uGAAuG;AACvG,wBAAsB,uBAAuB,CAC5C,KAAK,EAAE,4BAA4B,GACjC,OAAO,CAAC,6BAA6B,CAAC,CAiCxC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Context } from "hono";
|
|
2
|
+
import type { CoordinatorEnrollment, CoordinatorStore } from "./coordinator-store-contract.js";
|
|
3
|
+
export declare const BOUNDARY_READINESS_PATH = "/v1/boundary-readiness";
|
|
4
|
+
/** The sync feature a device advertises in presence while it runs the migration code. */
|
|
5
|
+
export declare const BOUNDARY_MIGRATION_SYNC_FEATURE = "project_boundary_migration_v1";
|
|
6
|
+
interface SignedRequest {
|
|
7
|
+
method: string;
|
|
8
|
+
url: string;
|
|
9
|
+
groupId: string;
|
|
10
|
+
body: Uint8Array;
|
|
11
|
+
deviceId: string | null;
|
|
12
|
+
signature: string | null;
|
|
13
|
+
timestamp: string | null;
|
|
14
|
+
nonce: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface BoundaryReadinessRouteDeps {
|
|
17
|
+
storeFactory: () => CoordinatorStore;
|
|
18
|
+
authorizeRequest: (store: CoordinatorStore, request: SignedRequest) => Promise<{
|
|
19
|
+
ok: boolean;
|
|
20
|
+
error: string;
|
|
21
|
+
enrollment: CoordinatorEnrollment | null;
|
|
22
|
+
}>;
|
|
23
|
+
authErrorStatus: (error: string) => 401 | 403 | 409;
|
|
24
|
+
readRequestBytes: (c: Context, maxBytes: number) => Promise<Uint8Array | null>;
|
|
25
|
+
parseJsonObject: (raw: Uint8Array) => Record<string, unknown> | null;
|
|
26
|
+
rateLimitedResponse: (c: Context, key: string, options: {
|
|
27
|
+
authenticated: boolean;
|
|
28
|
+
}) => Response | null;
|
|
29
|
+
}
|
|
30
|
+
interface BoundaryReadinessApp {
|
|
31
|
+
post(path: string, handler: (c: Context) => Promise<Response>): unknown;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A device that posts presence without the migration feature no longer runs the
|
|
35
|
+
* migration code, as after a downgrade. Its readiness record is removed before
|
|
36
|
+
* the presence is stored, so a failure here fails the request and the device
|
|
37
|
+
* tries again, instead of leaving a record that says an older build is ready.
|
|
38
|
+
*/
|
|
39
|
+
export declare function discardReadinessWithoutFeature(store: Pick<CoordinatorStore, "discardBoundaryReadiness">, presence: {
|
|
40
|
+
groupId: string;
|
|
41
|
+
deviceId: string;
|
|
42
|
+
capabilities?: Record<string, unknown>;
|
|
43
|
+
}): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Lets an enrolled device store its readiness record for one group. The device
|
|
46
|
+
* is the one whose key signed the request, never one the body names. A
|
|
47
|
+
* coordinator without this route answers 404, which a device reads as "not
|
|
48
|
+
* updated yet".
|
|
49
|
+
*/
|
|
50
|
+
export declare function registerCoordinatorBoundaryReadinessRoute(app: BoundaryReadinessApp, deps: BoundaryReadinessRouteDeps): void;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=coordinator-boundary-readiness-route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-boundary-readiness-route.d.ts","sourceRoot":"","sources":["../src/coordinator-boundary-readiness-route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAMpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAG/F,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE,yFAAyF;AACzF,eAAO,MAAM,+BAA+B,kCAAkC,CAAC;AAE/E,UAAU,aAAa;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IAC1C,YAAY,EAAE,MAAM,gBAAgB,CAAC;IACrC,gBAAgB,EAAE,CACjB,KAAK,EAAE,gBAAgB,EACvB,OA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th-store-test-fixtures.js";
|
|
2
|
+
/** A store and a prefix that no other test uses, so tests can share one database. */
|
|
3
|
+
export type BoundaryReadinessFixture = {
|
|
4
|
+
store: Store;
|
|
5
|
+
prefix: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function boundaryReadinessHarness(fixture: (use: (f: BoundaryReadinessFixture) => Promise<void>) => Promise<void>): import("vitest").TestAPI<{
|
|
8
|
+
fixture: BoundaryReadinessFixture;
|
|
9
|
+
}>;
|
|
10
|
+
export type BoundaryReadinessTest = ReturnType<typeof boundaryReadinessHarness>;
|
|
11
|
+
/** The clock every fixture injects into its store. */
|
|
12
|
+
export declare const BOUNDARY_READINESS_CLOCK_MS: number;
|
|
13
|
+
/** The readiness record contract, for the SQLite store and both D1 runtimes. */
|
|
14
|
+
export declare function registerBoundaryReadinessContract(test: BoundaryReadinessTest): void;
|
|
15
|
+
//# sourceMappingURL=coordinator-boundary-readiness-test-harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-boundary-readiness-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-boundary-readiness-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAUvE,qFAAqF;AACrF,MAAM,MAAM,wBAAwB,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,wBAAwB,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;GAK/E;AACD,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,sDAAsD;AACtD,eAAO,MAAM,2BAA2B,QAAmC,CAAC;AA4gB5E,gFAAgF;AAChF,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI,CAUnF"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import type { DeviceRemovalBackend } from "./coordinator-device-removal.js";
|
|
2
|
+
import type { CoordinatorScopeAuthorizationInput, CoordinatorScopeAuthorizationResult, CoordinatorScopeMembership } from "./coordinator-store-contract.js";
|
|
3
|
+
/**
|
|
4
|
+
* `record_id` names the write that stored the header. The project rows of one
|
|
5
|
+
* write are only replaced while the header still carries that write's ID, so two
|
|
6
|
+
* writes for the same device cannot mix their rows.
|
|
7
|
+
*
|
|
8
|
+
* Three header columns say what the record does not show. `omitted_projects`
|
|
9
|
+
* counts the Projects the device could not fit. `invalid_boundary_entries` counts
|
|
10
|
+
* entries left out for a malformed boundary ID. `unauthorized_source_scope_ids_json`
|
|
11
|
+
* lists the older scopes the record named and the device was not authorized in
|
|
12
|
+
* when it arrived. None has a default, so a writer cannot leave one out and
|
|
13
|
+
* produce a record that looks complete.
|
|
14
|
+
*/
|
|
15
|
+
export declare const BOUNDARY_READINESS_SCHEMA_SQL = "\nCREATE TABLE IF NOT EXISTS coordinator_boundary_readiness (\n group_id TEXT NOT NULL,\n device_id TEXT NOT NULL,\n sequence INTEGER NOT NULL,\n record_id TEXT NOT NULL,\n omitted_projects INTEGER NOT NULL,\n invalid_boundary_entries INTEGER NOT NULL,\n unauthorized_source_scope_ids_json TEXT NOT NULL,\n updated_at TEXT NOT NULL,\n PRIMARY KEY (group_id, device_id)\n);\n\nCREATE TABLE IF NOT EXISTS coordinator_boundary_readiness_projects (\n group_id TEXT NOT NULL,\n device_id TEXT NOT NULL,\n boundary_scope_id TEXT NOT NULL,\n source_scope_id TEXT NOT NULL,\n state TEXT NOT NULL,\n own_rows_in_source INTEGER NOT NULL,\n own_rows_in_boundary INTEGER NOT NULL,\n PRIMARY KEY (group_id, device_id, boundary_scope_id, source_scope_id)\n);\n\nCREATE INDEX IF NOT EXISTS idx_coordinator_boundary_readiness_projects_boundary\n ON coordinator_boundary_readiness_projects(group_id, boundary_scope_id);\n";
|
|
16
|
+
export declare const BOUNDARY_READINESS_MIGRATION_NAME = "0050_add_boundary_readiness.sql";
|
|
17
|
+
/** `present` is 1 when migration 0050, or SQLite initialization, has installed the storage. */
|
|
18
|
+
export declare const BOUNDARY_READINESS_STORAGE_PRESENT_SQL = "SELECT (\n\tEXISTS (SELECT 1 FROM sqlite_master\n\t\tWHERE type = 'table' AND name = 'coordinator_boundary_readiness')\n\tAND EXISTS (SELECT 1 FROM sqlite_master\n\t\tWHERE type = 'table' AND name = 'coordinator_boundary_readiness_projects')\n\tAND EXISTS (SELECT 1 FROM sqlite_master\n\t\tWHERE type = 'index' AND name = 'idx_coordinator_boundary_readiness_projects_boundary')) AS present";
|
|
19
|
+
export type BoundaryReadinessProjectState = "waiting" | "adopted" | "rolled_back";
|
|
20
|
+
/** One Project of a readiness record. The boundary ID stands in for the Project, so no name is stored. */
|
|
21
|
+
export interface BoundaryReadinessProject {
|
|
22
|
+
source_scope_id: string;
|
|
23
|
+
boundary_scope_id: string;
|
|
24
|
+
state: BoundaryReadinessProjectState;
|
|
25
|
+
own_rows_in_source: number;
|
|
26
|
+
own_rows_in_boundary: number;
|
|
27
|
+
}
|
|
28
|
+
export interface BoundaryReadinessRecord {
|
|
29
|
+
group_id: string;
|
|
30
|
+
device_id: string;
|
|
31
|
+
sequence: number;
|
|
32
|
+
/** Projects the device holds under an older scope and could not fit into this record. */
|
|
33
|
+
omitted_projects: number;
|
|
34
|
+
/** Entries left out because the boundary ID is malformed. A correct build sends none. */
|
|
35
|
+
invalid_boundary_entries: number;
|
|
36
|
+
/**
|
|
37
|
+
* Older scopes the record named and the device was not authorized in when it
|
|
38
|
+
* arrived. If the device is authorized in one of them later, this record no
|
|
39
|
+
* longer shows everything the device holds there.
|
|
40
|
+
*/
|
|
41
|
+
unauthorized_source_scope_ids: string[];
|
|
42
|
+
/**
|
|
43
|
+
* False when the record leaves out Projects the device holds: it was cut to
|
|
44
|
+
* fit, or an entry was malformed. A record that is not complete proves that
|
|
45
|
+
* the device runs the migration code and nothing about what it holds, so it
|
|
46
|
+
* must never be read as "the device does not hold the Projects it left out".
|
|
47
|
+
*/
|
|
48
|
+
complete: boolean;
|
|
49
|
+
updated_at: string;
|
|
50
|
+
projects: BoundaryReadinessProject[];
|
|
51
|
+
}
|
|
52
|
+
export interface PutBoundaryReadinessInput {
|
|
53
|
+
groupId: string;
|
|
54
|
+
deviceId: string;
|
|
55
|
+
/** Rises with every change the device makes to its record. An older or equal one is not stored. */
|
|
56
|
+
sequence: number;
|
|
57
|
+
projects: readonly BoundaryReadinessProject[];
|
|
58
|
+
/** How many more Projects the device has than `projects` lists. Defaults to none. */
|
|
59
|
+
omittedProjects?: number;
|
|
60
|
+
}
|
|
61
|
+
export type BoundaryReadinessRejectionReason = "boundary_scope_invalid" | "source_scope_not_authorized";
|
|
62
|
+
export interface BoundaryReadinessRejection {
|
|
63
|
+
source_scope_id: string;
|
|
64
|
+
boundary_scope_id: string;
|
|
65
|
+
reason: BoundaryReadinessRejectionReason;
|
|
66
|
+
}
|
|
67
|
+
export type PutBoundaryReadinessResult =
|
|
68
|
+
/** Stored with the entries the coordinator accepts. `rejected` lists the ones it left out. */
|
|
69
|
+
{
|
|
70
|
+
kind: "stored";
|
|
71
|
+
sequence: number;
|
|
72
|
+
rejected: BoundaryReadinessRejection[];
|
|
73
|
+
}
|
|
74
|
+
/** The stored record is as new or newer. `sequence` is the stored one. */
|
|
75
|
+
| {
|
|
76
|
+
kind: "stale";
|
|
77
|
+
sequence: number;
|
|
78
|
+
}
|
|
79
|
+
/** The device has no enabled enrollment in the group. */
|
|
80
|
+
| {
|
|
81
|
+
kind: "not_enrolled";
|
|
82
|
+
}
|
|
83
|
+
/** The coordinator's database has no readiness storage yet. */
|
|
84
|
+
| {
|
|
85
|
+
kind: "unavailable";
|
|
86
|
+
};
|
|
87
|
+
export interface BoundaryReadinessDeviceInput {
|
|
88
|
+
groupId: string;
|
|
89
|
+
deviceId: string;
|
|
90
|
+
}
|
|
91
|
+
export interface CoordinatorBoundaryReadinessStore {
|
|
92
|
+
/** Replaces the device's record for the group when `sequence` is newer than the stored one. */
|
|
93
|
+
putBoundaryReadiness(input: PutBoundaryReadinessInput): Promise<PutBoundaryReadinessResult>;
|
|
94
|
+
getBoundaryReadiness(input: BoundaryReadinessDeviceInput): Promise<BoundaryReadinessRecord | null>;
|
|
95
|
+
/** Removes the device's record for the group. Returns whether one was stored. */
|
|
96
|
+
discardBoundaryReadiness(input: BoundaryReadinessDeviceInput): Promise<boolean>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The scopes, out of `scopeIds`, that the device is an authorized member of in
|
|
100
|
+
* this group right now. It throws when a read could not run, because a read
|
|
101
|
+
* that failed is not a denial.
|
|
102
|
+
*/
|
|
103
|
+
export type BoundaryReadinessScopeAccess = (input: {
|
|
104
|
+
groupId: string;
|
|
105
|
+
deviceId: string;
|
|
106
|
+
scopeIds: readonly string[];
|
|
107
|
+
}) => Promise<Set<string>>;
|
|
108
|
+
/** The access read each store builds from its own membership and authorization reads. */
|
|
109
|
+
export declare function boundaryReadinessScopeAccess(store: {
|
|
110
|
+
listDeviceScopeMemberships(deviceId: string): Promise<CoordinatorScopeMembership[]>;
|
|
111
|
+
getScopeAuthorization(input: CoordinatorScopeAuthorizationInput): Promise<CoordinatorScopeAuthorizationResult>;
|
|
112
|
+
}): BoundaryReadinessScopeAccess;
|
|
113
|
+
/**
|
|
114
|
+
* The size limit of one record: the UTF-8 bytes of its Projects as compact JSON,
|
|
115
|
+
* in the field order of BoundaryReadinessProject. The limit is on bytes and on
|
|
116
|
+
* the number of older scopes below, so the store and a request agree on what
|
|
117
|
+
* fits. That is about 1,300 Projects with IDs of ordinary length, and fewer
|
|
118
|
+
* with long IDs.
|
|
119
|
+
*/
|
|
120
|
+
export declare const BOUNDARY_READINESS_MAX_PROJECTS_BYTES: number;
|
|
121
|
+
/**
|
|
122
|
+
* A record names at most this many older scopes. Each one the device is a member
|
|
123
|
+
* of costs an authorization read, and a D1 request can run only so many queries.
|
|
124
|
+
*/
|
|
125
|
+
export declare const BOUNDARY_READINESS_MAX_SOURCE_SCOPES = 64;
|
|
126
|
+
/**
|
|
127
|
+
* The body limit of a request that carries one record: the Projects, and room
|
|
128
|
+
* for the group ID, the sequence and the omitted count around them.
|
|
129
|
+
*/
|
|
130
|
+
export declare const BOUNDARY_READINESS_MAX_BODY_BYTES: number;
|
|
131
|
+
/**
|
|
132
|
+
* Cuts a device's Projects to the longest leading run that fits one record, and
|
|
133
|
+
* counts the rest. A record with a count above zero is not complete: it shows
|
|
134
|
+
* that the device runs the migration code, and the coordinator treats the
|
|
135
|
+
* device as not ready for any older scope it is in.
|
|
136
|
+
*/
|
|
137
|
+
export declare function fitBoundaryReadinessProjects(projects: readonly BoundaryReadinessProject[]): {
|
|
138
|
+
projects: BoundaryReadinessProject[];
|
|
139
|
+
omittedProjects: number;
|
|
140
|
+
};
|
|
141
|
+
/** Internal storage capability. The caller authenticates the device. */
|
|
142
|
+
export declare class BoundaryReadinessOperations implements CoordinatorBoundaryReadinessStore {
|
|
143
|
+
private readonly backend;
|
|
144
|
+
private readonly authorizedScopeIds;
|
|
145
|
+
private readonly clock;
|
|
146
|
+
constructor(backend: DeviceRemovalBackend, authorizedScopeIds: BoundaryReadinessScopeAccess, clock?: () => number);
|
|
147
|
+
private storagePresent;
|
|
148
|
+
/** Runs `work`, and returns `missing` when it failed because the storage is not installed. */
|
|
149
|
+
private whenStoragePresent;
|
|
150
|
+
/**
|
|
151
|
+
* Splits a record's entries into the ones the coordinator stores and the ones
|
|
152
|
+
* it leaves out. An entry is stored only for a boundary ID of the managed
|
|
153
|
+
* Project form and an older scope the device is authorized in right now.
|
|
154
|
+
* Malformed entries are set aside first, so they cost no authorization read.
|
|
155
|
+
*/
|
|
156
|
+
private sortProjects;
|
|
157
|
+
putBoundaryReadiness(raw: PutBoundaryReadinessInput): Promise<PutBoundaryReadinessResult>;
|
|
158
|
+
getBoundaryReadiness(raw: BoundaryReadinessDeviceInput): Promise<BoundaryReadinessRecord | null>;
|
|
159
|
+
discardBoundaryReadiness(raw: BoundaryReadinessDeviceInput): Promise<boolean>;
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=coordinator-boundary-readiness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-boundary-readiness.d.ts","sourceRoot":"","sources":["../src/coordinator-boundary-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,KAAK,EACX,kCAAkC,EAClC,mCAAmC,EACnC,0BAA0B,EAC1B,MAAM,iCAAiC,CAAC;AAWzC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,6BAA6B,+5BA0BzC,CAAC;AAEF,eAAO,MAAM,iCAAiC,oCAAoC,CAAC;AAEnF,+FAA+F;AAC/F,eAAO,MAAM,sCAAsC,0YAMmD,CAAC;AAEvG,MAAM,MAAM,6BAA6B,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;AAQlF,0GAA0G;AAC1G,MAAM,WAAW,wBAAwB;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,6BAA6B,CAAC;IACrC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,yFAAyF;IACzF,gBAAgB,EAAE,MAAM,CAAC;IACzB,yFAAyF;IACzF,wBAAwB,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC;;;;;OAKG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,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AA0B,CAAC,CA6C9F;IAEK,oBAAoB,CACzB,GAAG,EAAE,4BAA4B,GAC/B,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAmBzC;IAEK,wBAAwB,CAAC,GAAG,EAAE,4BAA4B,GAAG,OAAO,CAAC,OAAO,CAAC,CAWlF;CACD"}
|
|
@@ -12,7 +12,7 @@ import { type CoordinatorBrowserLinkInput } from "./coordinator-browser-link.js"
|
|
|
12
12
|
import { type CoordinatorBrowserLinkCompletionInput } from "./coordinator-browser-link-completion.js";
|
|
13
13
|
import { type CoordinatorBrowserLinkStartInput } from "./coordinator-browser-link-start.js";
|
|
14
14
|
import { type CoordinatorBrowserSigninStartInput } from "./coordinator-browser-signin-start.js";
|
|
15
|
-
import type
|
|
15
|
+
import { type CoordinatorOidcOptions } from "./coordinator-oidc.js";
|
|
16
16
|
import type { InMemoryRequestRateLimiter } from "./request-rate-limit.js";
|
|
17
17
|
export interface CoordinatorBrowserAuthOptions {
|
|
18
18
|
config: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-browser-auth-app.d.ts","sourceRoot":"","sources":["../src/coordinator-browser-auth-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAK/E,OAAO,KAAK,EACX,4BAA4B,EAC5B,6CAA6C,EAC7C,sCAAsC,EACtC,MAAM,oDAAoD,CAAC;AAI5D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EACN,4BAA4B,EAE5B,KAAK,0BAA0B,EAE/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EACN,KAAK,8BAA8B,EAEnC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACN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A;CAAE,CAAC,CAAC;AAC3E,wFAAwF;AACxF,wBAAsB,8BAA8B,CACnD,QAAQ,EAAE,8BAA8B,EACxC,KAAK,EAAE,sCAAsC,EAC7C,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO,GACnC,OAAO,CAAC,uCAAuC,CAAC,CAgElD"}
|
|
@@ -27,8 +27,9 @@ export interface CoordinatorBrowserAuthCallbackInput {
|
|
|
27
27
|
* owner dispatch; null means the callback is not a rebind.
|
|
28
28
|
*/
|
|
29
29
|
deviceRebindCallback?: (request: Request) => Promise<Response | null>;
|
|
30
|
+
deviceRejoinCallback?: (request: Request) => Promise<Response | null>;
|
|
30
31
|
}
|
|
31
|
-
export type CoordinatorBrowserAuthCallbackOutcome = "signed_in" | "signed_in_profile_not_recorded" | "session_live" | "link_dispatched" | "owner_dispatched" | "account_change_dispatched" | "device_rebind_dispatched" | "method_not_allowed" | "not_found" | "callback_invalid" | "state_invalid" | "cookie_invalid" | "cookie_missing" | "transaction_unavailable" | "verification_failed" | "signin_rejected" | "link_continuation_failed" | "internal_error";
|
|
32
|
+
export type CoordinatorBrowserAuthCallbackOutcome = "signed_in" | "signed_in_profile_not_recorded" | "session_live" | "link_dispatched" | "owner_dispatched" | "account_change_dispatched" | "device_rebind_dispatched" | "device_rejoin_dispatched" | "method_not_allowed" | "not_found" | "callback_invalid" | "state_invalid" | "cookie_invalid" | "cookie_missing" | "transaction_unavailable" | "verification_failed" | "signin_rejected" | "link_continuation_failed" | "internal_error";
|
|
32
33
|
export type CoordinatorBrowserAuthCallbackResponse = Readonly<{
|
|
33
34
|
response: Response;
|
|
34
35
|
outcome: CoordinatorBrowserAuthCallbackOutcome;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-browser-auth-callback.d.ts","sourceRoot":"","sources":["../src/coordinator-browser-auth-callback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CA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,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,6BAA6B,CAAC;IACrC,KAAK,EAAE,iCAAiC,CAAC;CACxC,CAAC,GACF,QAAQ,CAAC;IACT,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EACF,uBAAuB,GACvB,eAAe,GACf,uBAAuB,GACvB,gCAAgC,CAAC;CACnC,CAAC,CAAC;AA+VN,2FAA2F;AAC3F,wBAAsB,oCAAoC,CACzD,KAAK,EAAE,mCAAmC,GACxC,OAAO,CAAC,oCAAoC,CAAC,CAkD/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-controller-revocation-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-controller-revocation-test-harness.ts"],"names":[],"mappings":"AAUA,OAAO,EAEN,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator-controller-revocation-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-controller-revocation-test-harness.ts"],"names":[],"mappings":"AAUA,OAAO,EAEN,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,MAAM,iDAAiD,CAAC;AAIzD,OAAO,EACN,kBAAkB,EAClB,KAAK,cAAc,EAEnB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC3D,KAAK,IAAI,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAC7C,KAAK,OAAO,GAAG,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,IAAI,KAAK,kBAAkB,CAAC;AACxE,eAAO,MAAM,gBAAgB,UAS5B,CAAC;AA6BF,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,cAAc,QAMxE;AAwND,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,sBAyCjE;AACD,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,QAIvF"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* D1 ledger baseline needs no migration directory at run time. Tests compare both against
|
|
4
4
|
* the migration files. Generated from a database built from 0001 through 0045;
|
|
5
5
|
* 0046 and 0047 add columns and objects checked by the auth-stage readiness queries.
|
|
6
|
+
* 0048 adds device removal storage and 0049 the enrollment triggers on it. They
|
|
7
|
+
* follow the last auth stage, and a baseline records each only when its objects exist.
|
|
6
8
|
*/
|
|
7
9
|
export declare const COORDINATOR_D1_MIGRATION_NAMES: readonly string[];
|
|
8
10
|
/** Every V2 table and column, including auth tables, required by every baseline stage. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-d1-schema-inventory.d.ts","sourceRoot":"","sources":["../src/coordinator-d1-schema-inventory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"coordinator-d1-schema-inventory.d.ts","sourceRoot":"","sources":["../src/coordinator-d1-schema-inventory.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,EAAE,SAAS,MAAM,EAqD1D,CAAC;AAEH,0FAA0F;AAC1F,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAuhBnF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-d1-scope-authorization-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-d1-scope-authorization-test-harness.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coordinator-d1-scope-authorization-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-d1-scope-authorization-test-harness.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACX,eAAe,EACf,YAAY,EACZ,MAAM,oDAAoD,CAAC;AAG5D,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/C,KAAK,QAAQ,GAAG,CAAC,CAAC,EAAE,YAAY,KAAK,cAAc,CAAC;AAEpD,eAAO,MAAM,WAAW,UAOvB,CAAC;AAuFF,wBAAgB,gBAAgB,CAC/B,EAAE,EAAE,cAAc,EAClB,KAAK,EAAE;IACN,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,GAAG,OAAO,KAAK,OAAO,CAAC;CAC9E,GACC,cAAc,CAkChB;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,QAO/C;AAkQD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,QAKhE;AAsLD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,QAGnE"}
|
|
@@ -9,6 +9,7 @@ import type { CoordinatorEnrollment, CoordinatorStore } from "./coordinator-stor
|
|
|
9
9
|
export type CoordinatorDeviceAuthLinkStore = CoordinatorStore & Partial<CoordinatorAccountLinkStatusStore> & Partial<Pick<ResolvedAccountOwnerStatusOperations, "readResolvedAccountOwnerStatus">> & Pick<CoordinatorAuthControllerStore, "createAuthControllerAttestation" | "captureAuthControllerLegacyHistory"> & Pick<CoordinatorAuthLinkStore, "createAuthLinkAttempt" | "getAuthLinkAttemptStatus" | "finalizeAuthLinkAttempt" | "failAuthLinkAttempt"> & Pick<CoordinatorAuthBrowserTransactionStore, "retireAuthBrowserTransactions"> & {
|
|
10
10
|
/** Rebind storage (ADR 0005 Section 8), or null before its tables exist. */
|
|
11
11
|
readDeviceRebindBackend?(): Promise<AuthLinkBackend | null>;
|
|
12
|
+
readDeviceRejoinBackend?(): Promise<AuthLinkBackend | null>;
|
|
12
13
|
};
|
|
13
14
|
export interface CoordinatorDeviceAuthLinkOptions {
|
|
14
15
|
config: CoordinatorAuthBrowserConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator-device-auth-link.d.ts","sourceRoot":"","sources":["../src/coordinator-device-auth-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,KAAK,EACX,4BAA4B,EAC5B,sCAAsC,EACtC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAEvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAEN,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,MAAM,qCAAqC,CAAC;AAW7C,OAAO,EAEN,KAAK,oCAAoC,EACzC,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAE/F,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,GAC5D,OAAO,CAAC,iCAAiC,CAAC,GAC1C,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,gCAAgC,CAAC,CAAC,GACrF,IAAI,CACH,8BAA8B,EAC9B,iCAAiC,GAAG,oCAAoC,CACxE,GACD,IAAI,CACH,wBAAwB,EACtB,uBAAuB,GACvB,0BAA0B,GAC1B,yBAAyB,GACzB,qBAAqB,CACvB,GACD,IAAI,CAAC,sCAAsC,EAAE,+BAA+B,CAAC,GAAG;IAC/E,4EAA4E;IAC5E,uB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ACV,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,iBAAiB,GACtB,OAAO,CAAC,QAAQ,CAAC,CAuBnB;AA8CD,0FAA0F;AAC1F,wBAAgB,yCAAyC,CACxD,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,kBAAkB,GACtB,IAAI,CAaN;AAED,wBAAgB,uCAAuC,CACtD,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,kBAAkB,GACtB,IAAI,CA8BN"}
|
|
1
|
+
{"version":3,"file":"coordinator-device-auth-link.d.ts","sourceRoot":"","sources":["../src/coordinator-device-auth-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,KAAK,EACX,4BAA4B,EAC5B,sCAAsC,EACtC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAEvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAEN,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,MAAM,qCAAqC,CAAC;AAW7C,OAAO,EAEN,KAAK,oCAAoC,EACzC,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAE/F,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,GAC5D,OAAO,CAAC,iCAAiC,CAAC,GAC1C,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,gCAAgC,CAAC,CAAC,GACrF,IAAI,CACH,8BAA8B,EAC9B,iCAAiC,GAAG,oCAAoC,CACxE,GACD,IAAI,CACH,wBAAwB,EACtB,uBAAuB,GACvB,0BAA0B,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CACN,KAAK,EAAE,8BAA8B,EACrC,MAAM,EAAE,yBAAyB,EACjC,KAAK,EAAE,iBAAiB,KACpB,OAAO,CAAC,QAAQ,CAAC,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAC3C,CAAC,EAAE,OAAO,EACV,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,iBAAiB,GACtB,OAAO,CAAC,QAAQ,CAAC,CAuBnB;AA8CD,0FAA0F;AAC1F,wBAAgB,yCAAyC,CACxD,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,kBAAkB,GACtB,IAAI,CAaN;AAED,wBAAgB,uCAAuC,CACtD,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,kBAAkB,GACtB,IAAI,CA8BN"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AuthLinkStatement } from "./coordinator-auth-link.js";
|
|
2
|
+
import type { readDeviceRejoinLinkStorage } from "./coordinator-device-rejoin-link-evidence.js";
|
|
3
|
+
export declare const REJOIN_ATTEMPTS_TABLE = "coordinator_device_rejoin_attempts";
|
|
4
|
+
export declare const REJOIN_HASH: RegExp;
|
|
5
|
+
export type RejoinLinkStorage = NonNullable<Awaited<ReturnType<typeof readDeviceRejoinLinkStorage>>>;
|
|
6
|
+
/** The browser guard supplies the hashes, config and time. Neither comes from a form field. */
|
|
7
|
+
export interface DeviceRejoinBrowserScope {
|
|
8
|
+
coordinatorId: string;
|
|
9
|
+
attemptId: string;
|
|
10
|
+
origin: string;
|
|
11
|
+
issuer: string;
|
|
12
|
+
authConfigRevision: string;
|
|
13
|
+
redirectUri: string;
|
|
14
|
+
transactionHash: string;
|
|
15
|
+
binderHash: string;
|
|
16
|
+
now: number;
|
|
17
|
+
}
|
|
18
|
+
type Phase = {
|
|
19
|
+
state: "browser_claimed";
|
|
20
|
+
claimToken: string;
|
|
21
|
+
} | {
|
|
22
|
+
state: "oidc_verified";
|
|
23
|
+
};
|
|
24
|
+
export declare function validRejoinBrowserScope(c: DeviceRejoinBrowserScope): boolean;
|
|
25
|
+
/** The caller appends CTEs to the transaction's exact, single-attempt scope. */
|
|
26
|
+
export declare function rejoinConsumedBrowserCtes(c: DeviceRejoinBrowserScope, storage: RejoinLinkStorage, phase: Phase): AuthLinkStatement;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=coordinator-device-rejoin-browser-evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-rejoin-browser-evidence.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rejoin-browser-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAEhG,eAAO,MAAM,qBAAqB,uCAAuC,CAAC;AAC1E,eAAO,MAAM,WAAW,QAAoB,CAAC;AAC7C,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAC1C,OAAO,CAAC,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CACvD,CAAC;AAEF,+FAA+F;AAC/F,MAAM,WAAW,wBAAwB;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,KAAK,KAAK,GAAG;IAAE,KAAK,EAAE,iBAAiB,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,CAAC;AAE3F,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAO5E;AAED,gFAAgF;AAChF,wBAAgB,yBAAyB,CACxC,CAAC,EAAE,wBAAwB,EAC3B,OAAO,EAAE,iBAAiB,EAC1B,KAAK,EAAE,KAAK,GACV,iBAAiB,CAqCnB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AuthLinkBackend } from "./coordinator-auth-link.js";
|
|
2
|
+
import { type RejoinConfirmationFixture } from "./coordinator-device-rejoin-confirmation-test-harness.js";
|
|
3
|
+
type Fixture = RejoinConfirmationFixture & {
|
|
4
|
+
batch: AuthLinkBackend["batch"];
|
|
5
|
+
};
|
|
6
|
+
export declare function registerRejoinBrowserTransactionTests(withFixture: (use: (db: Fixture) => Promise<void>) => Promise<void>): void;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=coordinator-device-rejoin-browser-transaction-test-harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-rejoin-browser-transaction-test-harness.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rejoin-browser-transaction-test-harness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAUlE,OAAO,EAGN,KAAK,yBAAyB,EAC9B,MAAM,0DAA0D,CAAC;AAGlE,KAAK,OAAO,GAAG,yBAAyB,GAAG;IAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAA;CAAE,CAAC;AA8B/E,wBAAgB,qCAAqC,CACpD,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,QAqDnE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AuthLinkBackend } from "./coordinator-auth-link.js";
|
|
2
|
+
import { type DeviceRejoinBrowserScope } from "./coordinator-device-rejoin-browser-evidence.js";
|
|
3
|
+
type Config = Omit<DeviceRejoinBrowserScope, "attemptId" | "transactionHash" | "binderHash">;
|
|
4
|
+
type Claim = DeviceRejoinBrowserScope & {
|
|
5
|
+
startCode: string;
|
|
6
|
+
stateHash: string;
|
|
7
|
+
nonce: string;
|
|
8
|
+
pkceVerifier: string;
|
|
9
|
+
};
|
|
10
|
+
/** The CSRF-checked form supplies its start code; OIDC and the cookie supply the other pins. */
|
|
11
|
+
export declare function claimDeviceRejoinBrowser(backend: AuthLinkBackend, input: Claim): Promise<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Null means the callback doesn't match this flow. A matched callback is single-use:
|
|
14
|
+
* spend that transaction before reading the provider response or using its account.
|
|
15
|
+
*/
|
|
16
|
+
export declare function consumeDeviceRejoinCallback(backend: Pick<AuthLinkBackend, "first" | "run">, input: Config & {
|
|
17
|
+
stateHash: string;
|
|
18
|
+
binderHash: string;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
kind: "refused";
|
|
21
|
+
claimToken?: undefined;
|
|
22
|
+
attemptId?: undefined;
|
|
23
|
+
transactionHash?: undefined;
|
|
24
|
+
nonce?: undefined;
|
|
25
|
+
pkceVerifier?: undefined;
|
|
26
|
+
loopbackRedirect?: undefined;
|
|
27
|
+
identityId?: undefined;
|
|
28
|
+
deviceId?: undefined;
|
|
29
|
+
fingerprint?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
kind: "consumed";
|
|
32
|
+
claimToken: `${string}-${string}-${string}-${string}-${string}`;
|
|
33
|
+
attemptId: string;
|
|
34
|
+
transactionHash: string;
|
|
35
|
+
nonce: string;
|
|
36
|
+
pkceVerifier: string;
|
|
37
|
+
loopbackRedirect: string;
|
|
38
|
+
identityId: string;
|
|
39
|
+
deviceId: string;
|
|
40
|
+
fingerprint: string;
|
|
41
|
+
} | null>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=coordinator-device-rejoin-browser-transaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-rejoin-browser-transaction.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rejoin-browser-transaction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAMrF,OAAO,EACN,KAAK,wBAAwB,EAG7B,MAAM,iDAAiD,CAAC;AAGzD,KAAK,MAAM,GAAG,IAAI,CAAC,wBAAwB,EAAE,WAAW,GAAG,iBAAiB,GAAG,YAAY,CAAC,CAAC;AAC7F,KAAK,KAAK,GAAG,wBAAwB,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AA0DF,gGAAgG;AAChG,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,KAAK,GACV,OAAO,CAAC,OAAO,CAAC,CAmBlB;AAqBD;;;GAGG;AACH,wBAAsB,2BAA2B,CAChD,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,KAAK,CAAC,EAC/C,KAAK,EAAE,MAAM,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE;UA4BvB,SAAS;;;;;;;;;;;UAEpC,UAAU;;;;;;;;;;UAWjB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const DEVICE_REJOIN_BROWSER_PATHS: Readonly<{
|
|
2
|
+
start: "/auth/rejoin/start";
|
|
3
|
+
confirm: "/auth/rejoin/confirm";
|
|
4
|
+
}>;
|
|
5
|
+
export declare function renderRejoinStartPage(input: {
|
|
6
|
+
attemptId: string;
|
|
7
|
+
startCode: string;
|
|
8
|
+
csrf: string;
|
|
9
|
+
}): Promise<import("./coordinator-auth-browser-view.js").CoordinatorAuthBrowserPage>;
|
|
10
|
+
type ReturnTarget = {
|
|
11
|
+
attemptId: string;
|
|
12
|
+
loopbackRedirect: string;
|
|
13
|
+
};
|
|
14
|
+
type BrowserRefusal = "retry" | "account_not_linked" | "wrong_account" | "removal_changed" | "no_destination";
|
|
15
|
+
export declare function renderRejoinRefusal(input: ReturnTarget, reason: BrowserRefusal): Promise<import("./coordinator-auth-browser-view.js").CoordinatorAuthBrowserPage>;
|
|
16
|
+
export declare function renderRejoinReview(input: ReturnTarget & {
|
|
17
|
+
deviceId: string;
|
|
18
|
+
identityId: string;
|
|
19
|
+
fingerprint: string;
|
|
20
|
+
account: string;
|
|
21
|
+
destinationsJson: string;
|
|
22
|
+
nonDestinationsJson: string;
|
|
23
|
+
confirmation: string;
|
|
24
|
+
csrf: string;
|
|
25
|
+
}): Promise<import("./coordinator-auth-browser-view.js").CoordinatorAuthBrowserPage>;
|
|
26
|
+
export declare function renderRejoinNotice({ unknown }: {
|
|
27
|
+
unknown: boolean;
|
|
28
|
+
}): Promise<import("./coordinator-auth-browser-view.js").CoordinatorAuthBrowserPage>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=coordinator-device-rejoin-browser-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-rejoin-browser-view.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rejoin-browser-view.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,2BAA2B;;;EAGtC,CAAC;AASH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACb,oFAWA;AAaD,KAAK,YAAY,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAAC;AACpE,KAAK,cAAc,GAChB,OAAO,GACP,oBAAoB,GACpB,eAAe,GACf,iBAAiB,GACjB,gBAAgB,CAAC;AAqBpB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,oFAQ9E;AAED,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,YAAY,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACb,oFA4BD;AAED,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,oFAMnE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CoordinatorAuthBrowserConfig } from "./coordinator-auth-browser-transaction-contract.js";
|
|
2
|
+
import type { AuthLinkBackend } from "./coordinator-auth-link.js";
|
|
3
|
+
import { type BrowserCsrfKey } from "./coordinator-browser-csrf.js";
|
|
4
|
+
import type { CoordinatorOidcClient } from "./coordinator-oidc.js";
|
|
5
|
+
import type { InMemoryRequestRateLimiter } from "./request-rate-limit.js";
|
|
6
|
+
interface Context {
|
|
7
|
+
backend: AuthLinkBackend;
|
|
8
|
+
client: CoordinatorOidcClient;
|
|
9
|
+
scope: {
|
|
10
|
+
store: CoordinatorAuthBrowserConfig;
|
|
11
|
+
publicOrigin: string;
|
|
12
|
+
};
|
|
13
|
+
csrfKey: BrowserCsrfKey;
|
|
14
|
+
limiter: InMemoryRequestRateLimiter;
|
|
15
|
+
now(): number;
|
|
16
|
+
}
|
|
17
|
+
interface DeviceRejoinBrowserHandlers {
|
|
18
|
+
startPage(request: Request, clientKey: string): Promise<Response>;
|
|
19
|
+
start(request: Request, clientKey: string): Promise<Response>;
|
|
20
|
+
confirm(request: Request, clientKey: string): Promise<Response>;
|
|
21
|
+
callback(request: Request): Promise<Response | null>;
|
|
22
|
+
}
|
|
23
|
+
/** Site registration owns path/method pinning. Each state change repeats its own store predicates. */
|
|
24
|
+
export declare function createDeviceRejoinBrowser(ctx: Context): DeviceRejoinBrowserHandlers;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=coordinator-device-rejoin-browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-device-rejoin-browser.d.ts","sourceRoot":"","sources":["../src/coordinator-device-rejoin-browser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAMvG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAYlE,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,+BAA+B,CAAC;AAuB3F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,UAAU,OAAO;IAChB,OAAO,EAAE,eAAe,CAAC;IACzB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,KAAK,EAAE;QAAE,KAAK,EAAE,4BAA4B,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IACrE,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,0BAA0B,CAAC;IACpC,GAAG,IAAI,MAAM,CAAC;CACd;AAuRD,UAAU,2BAA2B;IACpC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC9D,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChE,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;CACrD;AAED,sGAAsG;AACtG,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,2BAA2B,CAgBnF"}
|