@codemem/core 0.49.1 → 0.50.0-beta.2
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 +14 -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 +42 -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-ChgCIqfx.js +1716 -0
- package/dist/coordinator-runtime-ChgCIqfx.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 +11908 -10664
- package/dist/index.js.map +1 -1
- package/dist/ingest-events.d.ts.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 +32 -32
- 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-completion-manifest.d.ts +41 -0
- package/dist/legacy-team-setup-completion-manifest.d.ts.map +1 -1
- package/dist/legacy-team-setup-errors.d.ts +3 -2
- 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-CD7R8wy3.js} +5548 -3637
- package/dist/owner-enrollment-start-CD7R8wy3.js.map +1 -0
- package/dist/pairing-removal.d.ts +58 -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/pi-hooks.d.ts +1 -5
- package/dist/pi-hooks.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 +21 -1
- 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/raw-event-flush.d.ts.map +1 -1
- 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-CrFrhN_q.js} +3140 -2687
- package/dist/relay-peer-client-CrFrhN_q.js.map +1 -0
- package/dist/relay-server-test-fixtures.d.ts.map +1 -1
- package/dist/removed-device-local-ids.d.ts +16 -0
- package/dist/removed-device-local-ids.d.ts.map +1 -0
- 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.d.ts +28 -1
- package/dist/scope-membership-cache-read.d.ts.map +1 -1
- package/dist/scope-membership-cache-test-fixtures.d.ts +1 -0
- package/dist/scope-membership-cache-test-fixtures.d.ts.map +1 -1
- package/dist/scope-membership-cache.d.ts +1 -1
- package/dist/scope-membership-cache.d.ts.map +1 -1
- package/dist/scope-membership-evidence.d.ts +17 -1
- package/dist/scope-membership-evidence.d.ts.map +1 -1
- package/dist/{scope-membership-cache-read-B6z47l2W.js → scope-resolution-DXzf4k16.js} +2287 -1613
- package/dist/scope-resolution-DXzf4k16.js.map +1 -0
- package/dist/semantic-worker-entry.js +1 -1
- package/dist/{semantic-worker-job-BLaC4xRY.js → semantic-worker-job-DjfAtX64.js} +3 -3
- package/dist/{semantic-worker-job-BLaC4xRY.js.map → semantic-worker-job-DjfAtX64.js.map} +1 -1
- package/dist/{semantic-worker-ranking-5-VSzEmx.js → semantic-worker-ranking-CZCemeb4.js} +59 -53
- package/dist/semantic-worker-ranking-CZCemeb4.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-CifCg69d.js} +4484 -2842
- package/dist/sync-auth-constants-CifCg69d.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-pass.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 +2 -0
- 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-BFTEIkZH.js +2 -0
- package/dist/{sync-reachability-pass-Dhn4N2hr.js → sync-reachability-pass-vOvswNNG.js} +3219 -3025
- package/dist/sync-reachability-pass-vOvswNNG.js.map +1 -0
- package/dist/sync-replication.d.ts +26 -3
- package/dist/sync-replication.d.ts.map +1 -1
- package/dist/sync-scope-protocol.d.ts.map +1 -1
- package/dist/sync-status-test-fixtures.d.ts +1 -1
- package/dist/sync-status-test-fixtures.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 +7 -0
- package/dist/test-utils.d.ts.map +1 -1
- package/dist/{validated-vector-index-audit-B64yhEBF.js → validated-vector-index-audit-CFSIbYIn.js} +255 -623
- package/dist/validated-vector-index-audit-CFSIbYIn.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":"raw-event-flush.d.ts","sourceRoot":"","sources":["../src/raw-event-flush.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,EACN,KAAK,aAAa,EAIlB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAgBvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,mFAAmF;AACnF,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAStD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAenE,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACjC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,GACZ,aAAa,CAcf;
|
|
1
|
+
{"version":3,"file":"raw-event-flush.d.ts","sourceRoot":"","sources":["../src/raw-event-flush.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,EACN,KAAK,aAAa,EAIlB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAgBvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,mFAAmF;AACnF,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAStD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAenE,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACjC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,GACZ,aAAa,CAcf;AAgPD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAClC,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ract-BHxfaQZ2.js}
RENAMED
|
@@ -9,16 +9,23 @@ var e = 1, t = [
|
|
|
9
9
|
"team_local_rename_pending",
|
|
10
10
|
"team_rename_failed"
|
|
11
11
|
], n = [
|
|
12
|
+
"team_name_invalid",
|
|
13
|
+
"team_name_taken",
|
|
14
|
+
"team_creator_unavailable",
|
|
15
|
+
"team_create_admin_required",
|
|
16
|
+
"team_create_coordinator_required",
|
|
17
|
+
"team_create_failed"
|
|
18
|
+
], r = [
|
|
12
19
|
"keep_current_setup",
|
|
13
20
|
"reject_suggestion",
|
|
14
21
|
"keep_project_local",
|
|
15
22
|
"keep_identities_separate",
|
|
16
23
|
"remove_stale_device"
|
|
17
|
-
],
|
|
18
|
-
function
|
|
19
|
-
return
|
|
24
|
+
], i = new Set(r);
|
|
25
|
+
function a(e) {
|
|
26
|
+
return i.has(e);
|
|
20
27
|
}
|
|
21
28
|
//#endregion
|
|
22
|
-
export { i, n,
|
|
29
|
+
export { a, t as i, r as n, n as r, e as t };
|
|
23
30
|
|
|
24
|
-
//# sourceMappingURL=recipient-policy-contract-
|
|
31
|
+
//# sourceMappingURL=recipient-policy-contract-BHxfaQZ2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipient-policy-contract-BHxfaQZ2.js","names":[],"sources":["../src/recipient-policy-contract.ts"],"sourcesContent":["export const RECIPIENT_POLICY_CONTRACT_VERSION = 1 as const;\n\nexport type RecipientPolicyContractVersion = typeof RECIPIENT_POLICY_CONTRACT_VERSION;\n\nexport const RECIPIENT_POLICY_TEAM_RENAME_ERROR_CODES = [\n\t\"team_name_invalid\",\n\t\"team_not_found\",\n\t\"team_rename_stale\",\n\t\"team_link_stale\",\n\t\"team_link_ambiguous\",\n\t\"team_coordinator_rename_failed\",\n\t\"team_local_rename_pending\",\n\t\"team_rename_failed\",\n] as const;\n\nexport type RecipientPolicyTeamRenameErrorCode =\n\t(typeof RECIPIENT_POLICY_TEAM_RENAME_ERROR_CODES)[number];\n\nexport const RECIPIENT_POLICY_TEAM_CREATE_ERROR_CODES = [\n\t\"team_name_invalid\",\n\t\"team_name_taken\",\n\t\"team_creator_unavailable\",\n\t\"team_create_admin_required\",\n\t\"team_create_coordinator_required\",\n\t\"team_create_failed\",\n] as const;\n\nexport type RecipientPolicyTeamCreateErrorCode =\n\t(typeof RECIPIENT_POLICY_TEAM_CREATE_ERROR_CODES)[number];\n\nexport interface RecipientPolicyTeamCreateResultV1 {\n\tversion: 1;\n\tteamId: string;\n\tdisplayName: string;\n}\n\nexport interface RecipientPolicyTeamRenameResultV1 {\n\tversion: 1;\n\tteamId: string;\n\tdisplayName: string;\n\trevision: string;\n\tlinkedCoordinatorGroupRenamed: boolean;\n}\n\nexport type RecipientPolicyEdgeRecipientRefV1 =\n\t| { recipientKind: \"identity\"; identityId: string }\n\t| { recipientKind: \"team\"; teamId: string };\n\nexport interface RecipientPolicyEdgeChangeV1 {\n\tcanonicalProjectIdentity: string;\n\trecipient: RecipientPolicyEdgeRecipientRefV1;\n\taction: \"add\" | \"remove\";\n}\n\nexport interface RecipientPolicyEdgePreviewRequestV1 {\n\tversion: 1;\n\tchanges: RecipientPolicyEdgeChangeV1[];\n}\n\nexport interface RecipientPolicyEdgeCommitRequestV1 extends RecipientPolicyEdgePreviewRequestV1 {\n\treviewedPolicyDigest: string;\n}\n\nexport interface RecipientPolicyEdgePreviewProjectV1 {\n\tcanonicalProjectIdentity: string;\n\tdisplayName: string;\n\texistingMemoryCount: number;\n\tfutureMemoriesShared: true;\n}\n\nexport interface RecipientPolicyEdgeIdentitySummaryV1 {\n\tidentityId: string;\n\tdisplayName: string;\n\tverification: \"local\";\n}\n\nexport type RecipientPolicyEdgeSelectedRecipientV1 =\n\t| ({ recipientKind: \"identity\" } & RecipientPolicyEdgeIdentitySummaryV1)\n\t| {\n\t\t\trecipientKind: \"team\";\n\t\t\tteamId: string;\n\t\t\tdisplayName: string;\n\t\t\tcurrentMembers: RecipientPolicyEdgeIdentitySummaryV1[];\n\t\t\tfutureMembersInherit: true;\n\t };\n\nexport interface RecipientPolicyEdgeEffectiveDeviceV1 {\n\tcanonicalProjectIdentity: string;\n\tidentityId: string;\n\tdeviceId: string;\n\tdisplayName: string;\n}\n\nexport interface RecipientPolicyEdgePreviewResponseV1 {\n\tversion: 1;\n\tnormalizedChanges: RecipientPolicyEdgeChangeV1[];\n\toutcomes: RecipientPolicyEdgeCommitOutcomeV1[];\n\tprojects: RecipientPolicyEdgePreviewProjectV1[];\n\tselectedRecipients: RecipientPolicyEdgeSelectedRecipientV1[];\n\teffectiveDevices: RecipientPolicyEdgeEffectiveDeviceV1[];\n\tunchangedProjects: RecipientPolicyEdgePreviewProjectV1[];\n\treviewedPolicyDigest: string;\n\taddCount: number;\n\tremoveCount: number;\n\tnetWriteCount: number;\n}\n\nexport type RecipientPolicyEdgeOutcomeV1 =\n\t| \"added\"\n\t| \"removed\"\n\t| \"already_present\"\n\t| \"already_absent\";\n\nexport interface RecipientPolicyEdgeCommitOutcomeV1 {\n\tchange: RecipientPolicyEdgeChangeV1;\n\toutcome: RecipientPolicyEdgeOutcomeV1;\n}\n\nexport interface RecipientPolicyEdgeCommitResultV1 {\n\tversion: 1;\n\tstatus: \"applied\" | \"stale\" | \"invalid\" | \"not_found\" | \"conflict\";\n\treviewedPolicyDigest: string;\n\terrorCode: string | null;\n\toutcomes: RecipientPolicyEdgeCommitOutcomeV1[];\n\twriteCount: number;\n\tidempotent: boolean;\n}\n\nexport type RecipientPolicyIdentityKindV1 = \"personal\" | \"work\" | \"other\";\nexport type RecipientPolicyIdentityStatusV1 = \"active\" | \"pending\" | \"merged\";\n\nexport interface RecipientPolicyIdentityV1 {\n\tversion: RecipientPolicyContractVersion;\n\tidentityId: string;\n\tdisplayName: string;\n\tkind: RecipientPolicyIdentityKindV1;\n\tverification: \"local\";\n\tstatus: RecipientPolicyIdentityStatusV1;\n\tmergedIntoIdentityId: string | null;\n}\n\nexport interface RecipientPolicyTeamV1 {\n\tversion: RecipientPolicyContractVersion;\n\tteamId: string;\n\tdisplayName: string;\n\tstatus: \"active\" | \"archived\";\n}\n\nexport interface RecipientPolicyTeamMembershipV1 {\n\tversion: RecipientPolicyContractVersion;\n\tteamId: string;\n\tidentityId: string;\n\trole: \"member\" | \"admin\";\n\tstatus: \"active\" | \"pending\" | \"revoked\";\n}\n\nexport interface RecipientPolicyIdentityDeviceV1 {\n\tversion: RecipientPolicyContractVersion;\n\tidentityId: string;\n\tdeviceId: string;\n\tdisplayName: string;\n\tstatus: \"active\" | \"revoked\";\n}\n\nexport interface RecipientPolicyProjectV1 {\n\tversion: RecipientPolicyContractVersion;\n\tcanonicalIdentity: string;\n\tdisplayName: string;\n}\n\nexport type RecipientPolicyIntentSourceV1 = \"user\" | \"migration\" | \"legacy_project_invite\";\n\ninterface RecipientPolicyProjectRecipientBaseV1 {\n\tversion: RecipientPolicyContractVersion;\n\tcanonicalProjectIdentity: string;\n\tintentSource: RecipientPolicyIntentSourceV1;\n\tpolicyRevision: string;\n\tstatus: \"active\" | \"revoked\";\n}\n\nexport type RecipientPolicyProjectRecipientV1 =\n\t| (RecipientPolicyProjectRecipientBaseV1 & {\n\t\t\trecipientKind: \"identity\";\n\t\t\tidentityId: string;\n\t })\n\t| (RecipientPolicyProjectRecipientBaseV1 & {\n\t\t\trecipientKind: \"team\";\n\t\t\tteamId: string;\n\t });\n\ninterface RecipientPolicyEffectiveDeviceBaseV1 {\n\tversion: RecipientPolicyContractVersion;\n\tcanonicalProjectIdentity: string;\n\tidentityId: string;\n\tdeviceId: string;\n}\n\nexport type RecipientPolicyEffectiveDeviceV1 =\n\t| (RecipientPolicyEffectiveDeviceBaseV1 & {\n\t\t\tvia: \"direct_identity\";\n\t })\n\t| (RecipientPolicyEffectiveDeviceBaseV1 & {\n\t\t\tvia: \"team_membership\";\n\t\t\tteamId: string;\n\t });\n\nexport type RecipientPolicyAuthorityV1 = \"legacy_scope\" | \"recipient_policy\";\nexport type RecipientPolicyParityV1 = \"unknown\" | \"matched\" | \"diverged\";\n\nexport interface RecipientPolicyEnforcementV1 {\n\tversion: RecipientPolicyContractVersion;\n\tcanonicalProjectIdentity: string;\n\tauthority: RecipientPolicyAuthorityV1;\n\tparity: RecipientPolicyParityV1;\n\tcutoverState: \"legacy\" | \"eligible\" | \"active\" | \"rolled_back\";\n\tmanagedScopeId: string | null;\n\tdesiredDeviceIds: string[];\n\tcurrentDeviceIds: string[];\n\tsafeErrorCode: string | null;\n}\n\nexport type RecipientPolicyReviewDecisionV1 =\n\t| \"apply_recommendation\"\n\t| \"choose_recipients\"\n\t| \"preserve_current_access\"\n\t| \"reject_suggestion\"\n\t| \"keep_current_setup\"\n\t| \"keep_project_local\"\n\t| \"keep_identities_separate\"\n\t| \"attach_device_to_identity\"\n\t| \"create_identity\"\n\t| \"remove_stale_device\";\n\nexport const RECIPIENT_POLICY_NO_OP_DECISIONS = [\n\t\"keep_current_setup\",\n\t\"reject_suggestion\",\n\t\"keep_project_local\",\n\t\"keep_identities_separate\",\n\t\"remove_stale_device\",\n] as const satisfies readonly RecipientPolicyReviewDecisionV1[];\n\nconst RECIPIENT_POLICY_NO_OP_DECISION_SET = new Set<RecipientPolicyReviewDecisionV1>(\n\tRECIPIENT_POLICY_NO_OP_DECISIONS,\n);\n\nexport function isRecipientPolicyNoOpDecision(\n\tdecision: RecipientPolicyReviewDecisionV1 | string,\n): decision is (typeof RECIPIENT_POLICY_NO_OP_DECISIONS)[number] {\n\treturn RECIPIENT_POLICY_NO_OP_DECISION_SET.has(decision as RecipientPolicyReviewDecisionV1);\n}\n\nexport interface RecipientPolicyReviewOptionV1 {\n\tdecision: RecipientPolicyReviewDecisionV1;\n\tlabel: string;\n\teffect: \"none\" | \"grant_reviewed_access\" | \"revoke_reviewed_access\" | \"metadata_only\";\n\taffectedProjectCount: number;\n\taffectedMemoryCount: number;\n\taffectedDeviceCount: number;\n\t/** Additive exact preview used by actionable review APIs. */\n\tpreview?: RecipientPolicyReviewPreviewV1;\n}\n\nexport interface RecipientPolicyReviewPreviewProjectV1 {\n\tcanonicalIdentity: string;\n\tdisplayName: string;\n}\n\nexport interface RecipientPolicyReviewPreviewDeviceV1 {\n\tdeviceId: string;\n\tdisplayName: string;\n\tidentityId: string | null;\n\tassignment: \"assigned\" | \"unassigned\";\n}\n\nexport interface RecipientPolicyReviewPreviewV1 {\n\tprojects: RecipientPolicyReviewPreviewProjectV1[];\n\teffectiveDevices: RecipientPolicyReviewPreviewDeviceV1[];\n\taffectedProjectCount: number;\n\taffectedMemoryCount: number;\n\taffectedDeviceCount: number;\n\teffect: RecipientPolicyReviewOptionV1[\"effect\"];\n\trequiresDecisionInput: boolean;\n}\n\nexport interface RecipientPolicyReviewResolutionV1 {\n\tdecision: RecipientPolicyReviewDecisionV1;\n\tdecidedByIdentityId: string;\n\tdecidedByDeviceId: string;\n\tresolvedAt: string;\n}\n\nexport type RecipientPolicyReviewConditionCodeV1 =\n\t| \"suggest_local_identity\"\n\t| \"suggest_team_candidate\"\n\t| \"unassigned_effective_device\";\n\nexport interface RecipientPolicyReviewProjectGroupV1 {\n\tidentity: string;\n\tdisplayName: string;\n}\n\nexport interface RecipientPolicyReviewItemV1 {\n\tversion: RecipientPolicyContractVersion;\n\treviewItemId: string;\n\tsourceFingerprint: string;\n\tconditionCode: RecipientPolicyReviewConditionCodeV1;\n\tprojectGroup: RecipientPolicyReviewProjectGroupV1;\n\tfinding: string;\n\treason: string;\n\trecommendedDecision: RecipientPolicyReviewDecisionV1;\n\toptions: RecipientPolicyReviewOptionV1[];\n\tstate: \"open\" | \"resolved\";\n\tresolution: RecipientPolicyReviewResolutionV1 | null;\n}\n\nexport interface RecipientPolicyBlockedItemV1 {\n\tversion: RecipientPolicyContractVersion;\n\tblockedItemId: string;\n\tfinding: string;\n\treason: string;\n\townerLabel: string;\n\trepairAction: string;\n\trepair: {\n\t\tkind: \"reassign_project\" | \"open_project_administration\";\n\t\tprojectIdentity: string;\n\t\tlabel: string;\n\t};\n}\n\nexport interface RecipientPolicyProjectionV1 {\n\tversion: RecipientPolicyContractVersion;\n\tproject: RecipientPolicyProjectV1;\n\tintent: RecipientPolicyProjectRecipientV1[];\n\teffectiveDevices: RecipientPolicyEffectiveDeviceV1[];\n\tenforcement: RecipientPolicyEnforcementV1;\n\treviewItems: RecipientPolicyReviewItemV1[];\n\tblockedItems: RecipientPolicyBlockedItemV1[];\n}\n\nexport interface RecipientPolicyReconciliationStatusV1 {\n\tversion: RecipientPolicyContractVersion;\n\tcanonicalProjectIdentity: string;\n\tstate: \"projected\" | \"parity_verified\" | \"active\" | \"waiting\" | \"needs_attention\" | \"rolled_back\";\n\tauthority: RecipientPolicyAuthorityV1;\n\tparity: RecipientPolicyParityV1;\n\tlastCompletedAt: string | null;\n\tsafeErrorCode: string | null;\n}\n\nexport type LegacyTeamSetupActivationChangeV1 = \"add\" | \"update\" | \"remove\";\n\nexport interface LegacyTeamSetupTeamChangeV1 {\n\tteamId: string;\n\tchange: LegacyTeamSetupActivationChangeV1;\n\tfromDeviceEligibilityMode: \"person_all_devices\" | \"reviewed_allowlist\" | null;\n\ttoDeviceEligibilityMode: \"reviewed_allowlist\";\n}\n\nexport interface LegacyTeamSetupMembershipChangeV1 {\n\tteamId: string;\n\tidentityId: string;\n\tchange: LegacyTeamSetupActivationChangeV1;\n}\n\nexport interface LegacyTeamSetupProjectChangeV1 {\n\tprojectRef: string;\n\tfromProjectIdentity: string | null;\n\ttoProjectIdentity: string | null;\n\tchange: LegacyTeamSetupActivationChangeV1;\n}\n\nexport interface LegacyTeamSetupRecipientChangeV1 {\n\tcanonicalProjectIdentity: string;\n\trecipientKind: \"team\";\n\trecipientId: string;\n\tchange: LegacyTeamSetupActivationChangeV1;\n}\n\nexport interface LegacyTeamSetupDeviceAccessChangeV1 {\n\tcanonicalProjectIdentity: string;\n\tdeviceId: string;\n\tchange: \"add\" | \"remove\";\n}\n\nexport interface LegacyTeamSetupAccessDeltaV1 {\n\tteamChanges: LegacyTeamSetupTeamChangeV1[];\n\tmembershipChanges: LegacyTeamSetupMembershipChangeV1[];\n\tprojectChanges: LegacyTeamSetupProjectChangeV1[];\n\trecipientChanges: LegacyTeamSetupRecipientChangeV1[];\n\tdeviceAccessChanges: LegacyTeamSetupDeviceAccessChangeV1[];\n}\n\nexport interface LegacyTeamSetupActivationPreviewV1 {\n\tcandidateRef: string;\n\tattemptId: string;\n\tfinishDigest: string;\n\taccessDeltaDigest: string;\n\taccessDelta: LegacyTeamSetupAccessDeltaV1;\n}\n\nexport interface LegacyTeamSetupActivationResultV1 {\n\tstatus: \"completed\";\n\tteamId: string;\n\tattemptId: string;\n\taccessDeltaDigest: string;\n\tcompletedAt: string;\n}\n"],"mappings":";AAAA,IAAa,IAAoC,GAIpC,IAA2C;CACvD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,GAKa,IAA2C;CACvD;CACA;CACA;CACA;CACA;CACA;AACD,GAgNa,IAAmC;CAC/C;CACA;CACA;CACA;CACA;AACD,GAEM,IAAsC,IAAI,IAC/C,CACD;AAEA,SAAgB,EACf,GACgE;CAChE,OAAO,EAAoC,IAAI,CAA2C;AAC3F"}
|
|
@@ -2,6 +2,13 @@ export declare const RECIPIENT_POLICY_CONTRACT_VERSION: 1;
|
|
|
2
2
|
export type RecipientPolicyContractVersion = typeof RECIPIENT_POLICY_CONTRACT_VERSION;
|
|
3
3
|
export declare const RECIPIENT_POLICY_TEAM_RENAME_ERROR_CODES: readonly ["team_name_invalid", "team_not_found", "team_rename_stale", "team_link_stale", "team_link_ambiguous", "team_coordinator_rename_failed", "team_local_rename_pending", "team_rename_failed"];
|
|
4
4
|
export type RecipientPolicyTeamRenameErrorCode = (typeof RECIPIENT_POLICY_TEAM_RENAME_ERROR_CODES)[number];
|
|
5
|
+
export declare const RECIPIENT_POLICY_TEAM_CREATE_ERROR_CODES: readonly ["team_name_invalid", "team_name_taken", "team_creator_unavailable", "team_create_admin_required", "team_create_coordinator_required", "team_create_failed"];
|
|
6
|
+
export type RecipientPolicyTeamCreateErrorCode = (typeof RECIPIENT_POLICY_TEAM_CREATE_ERROR_CODES)[number];
|
|
7
|
+
export interface RecipientPolicyTeamCreateResultV1 {
|
|
8
|
+
version: 1;
|
|
9
|
+
teamId: string;
|
|
10
|
+
displayName: string;
|
|
11
|
+
}
|
|
5
12
|
export interface RecipientPolicyTeamRenameResultV1 {
|
|
6
13
|
version: 1;
|
|
7
14
|
teamId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipient-policy-contract.d.ts","sourceRoot":"","sources":["../src/recipient-policy-contract.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,EAAG,CAAU,CAAC;AAE5D,MAAM,MAAM,8BAA8B,GAAG,OAAO,iCAAiC,CAAC;AAEtF,eAAO,MAAM,wCAAwC,YACpD,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,gCAAgC,EAChC,2BAA2B,EAC3B,oBAAoB,CACX,CAAC;AAEX,MAAM,MAAM,kCAAkC,GAC7C,CAAC,OAAO,wCAAwC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,MAAM,WAAW,iCAAiC;IACjD,OAAO,EAAE,CAAC,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,6BAA6B,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,MAAM,iCAAiC,GAC1C;IAAE,aAAa,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7C,MAAM,WAAW,2BAA2B;IAC3C,wBAAwB,EAAE,MAAM,CAAC;IACjC,SAAS,EAAE,iCAAiC,CAAC;IAC7C,MAAM,EAAE,KAAK,GAAG,QAAQ,CAAC;CACzB;AAED,MAAM,WAAW,mCAAmC;IACnD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CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"recipient-policy-contract.d.ts","sourceRoot":"","sources":["../src/recipient-policy-contract.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,EAAG,CAAU,CAAC;AAE5D,MAAM,MAAM,8BAA8B,GAAG,OAAO,iCAAiC,CAAC;AAEtF,eAAO,MAAM,wCAAwC,YACpD,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,gCAAgC,EAChC,2BAA2B,EAC3B,oBAAoB,CACX,CAAC;AAEX,MAAM,MAAM,kCAAkC,GAC7C,CAAC,OAAO,wCAAwC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,eAAO,MAAM,wCAAwC,YACpD,mBAAmB,EACnB,iBAAiB,EACjB,0BAA0B,EAC1B,4BAA4B,EAC5B,kCAAkC,EAClC,oBAAoB,CACX,CAAC;AAEX,MAAM,MAAM,kCAAkC,GAC7C,CAAC,OAAO,wCAAwC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,MAAM,WAAW,iCAAiC;IACjD,OAAO,EAAE,CAAC,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iCAAiC;IACjD,OAAO,EAAE,CAAC,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,6BAA6B,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,MAAM,iCAAiC,GAC1C;IAAE,aAAa,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,MAAM,EA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,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,4BAA4B,CAAC;CAC1C;AAED,MAAM,WAAW,iCAAiC;IACjD,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./recipient-policy-contract-BHxfaQZ2.js";
|
|
2
|
+
export { i as RECIPIENT_POLICY_CONTRACT_VERSION, n as RECIPIENT_POLICY_NO_OP_DECISIONS, r as RECIPIENT_POLICY_TEAM_CREATE_ERROR_CODES, t as RECIPIENT_POLICY_TEAM_RENAME_ERROR_CODES, e as isRecipientPolicyNoOpDecision };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipient-policy-edges.d.ts","sourceRoot":"","sources":["../src/recipient-policy-edges.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOxC,OAAO,KAAK,EAGX,kCAAkC,EAClC,iCAAiC,EAIjC,mCAAmC,EACnC,oCAAoC,EAGpC,MAAM,gCAAgC,CAAC;AAcxC,YAAY,EACX,2BAA2B,EAC3B,kCAAkC,EAClC,kCAAkC,EAClC,iCAAiC,EACjC,oCAAoC,EACpC,oCAAoC,EACpC,4BAA4B,EAC5B,mCAAmC,EACnC,mCAAmC,EACnC,oCAAoC,EACpC,iCAAiC,EACjC,sCAAsC,GACtC,MAAM,gCAAgC,CAAC;AAIxC,qBAAa,+BAAgC,SAAQ,KAAK;IACzD,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,WAAW,CAAC;IACz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5,6 +5,7 @@ export interface RecipientPolicyIntentGraphV1 {
|
|
|
5
5
|
identities: RecipientPolicyIdentityV1[];
|
|
6
6
|
teams: RecipientPolicyTeamV1[];
|
|
7
7
|
teamMemberships: RecipientPolicyTeamMembershipV1[];
|
|
8
|
+
/** Bindings that device removal ended are left out, as if the device had none. */
|
|
8
9
|
identityDevices: RecipientPolicyIdentityDeviceV1[];
|
|
9
10
|
projectRecipients: RecipientPolicyProjectRecipientV1[];
|
|
10
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipient-policy-intent.d.ts","sourceRoot":"","sources":["../src/recipient-policy-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAEN,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAC9B,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,EACpC,KAAK,qBAAqB,EAC1B,MAAM,gCAAgC,CAAC;AAMxC,MAAM,WAAW,4BAA4B;IAC5C,OAAO,EAAE,8BAA8B,CAAC;IACxC,UAAU,EAAE,yBAAyB,EAAE,CAAC;IACxC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,eAAe,EAAE,+BAA+B,EAAE,CAAC;IACnD,eAAe,EAAE,+BAA+B,EAAE,CAAC;IACnD,iBAAiB,EAAE,iCAAiC,EAAE,CAAC;CACvD;AAsFD,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,QAAQ,GAAG,4BAA4B,CAoFpF"}
|
|
1
|
+
{"version":3,"file":"recipient-policy-intent.d.ts","sourceRoot":"","sources":["../src/recipient-policy-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAEN,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAC9B,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,EACpC,KAAK,qBAAqB,EAC1B,MAAM,gCAAgC,CAAC;AAMxC,MAAM,WAAW,4BAA4B;IAC5C,OAAO,EAAE,8BAA8B,CAAC;IACxC,UAAU,EAAE,yBAAyB,EAAE,CAAC;IACxC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,eAAe,EAAE,+BAA+B,EAAE,CAAC;IACnD,kFAAkF;IAClF,eAAe,EAAE,+BAA+B,EAAE,CAAC;IACnD,iBAAiB,EAAE,iCAAiC,EAAE,CAAC;CACvD;AAsFD,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,QAAQ,GAAG,4BAA4B,CAoFpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipient-policy-onboarding.d.ts","sourceRoot":"","sources":["../src/recipient-policy-onboarding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"recipient-policy-onboarding.d.ts","sourceRoot":"","sources":["../src/recipient-policy-onboarding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAkBxC,OAAO,EAEN,KAAK,yBAAyB,EAC9B,MAAM,gCAAgC,CAAC;AAexC,MAAM,MAAM,kCAAkC,GAAG,MAAM,GAAG,gBAAgB,GAAG,YAAY,CAAC;AAE1F,MAAM,WAAW,kCAAkC;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,sCAAsC;IAC/C,OAAO,EAAE,CAAC,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACx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M,CAAC;IAE3B,YAAY,MAAM,EAAE,SAAS,GAAG,WAAW,EAAE,SAAS,EAAE,MAAM,EAK7D;CACD;AA2yBD,wBAAgB,gCAAgC,CAC/C,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,yCAAyC,EAClD,OAAO,GAAE;IAAE,wBAAwB,CAAC,EAAE,gBAAgB,GAAG,oBAAoB,CAAA;CAAO,GAClF,kCAAkC,CAEpC;AAyCD,wBAAgB,kDAAkD,CACjE,cAAc,EAAE,yBAAyB,EACzC,OAAO,EAAE,6CAA6C,GACpD,kCAAkC,CAEpC;AA0bD,wBAAgB,sCAAsC,CACrD,EAAE,EAAE,QAAQ,EACZ,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,GACd,IAAI,CA+BN;AAqVD,wBAAgB,2CAA2C,CAC1D,EAAE,EAAE,QAAQ,EACZ,KAAK,EAAE,mCAAmC,GACxC,MAAM,CA+CR;AA0CD,wBAAgB,+BAA+B,CAC9C,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,wCAAwC,EACjD,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAAO,GAClC,uCAAuC,CA+DzC;AAED,wBAAgB,iDAAiD,CAChE,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,4CAA4C,EACrD,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAAO,GAClC,uCAAuC,CAgGzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipient-policy-reconciler.d.ts","sourceRoot":"","sources":["../src/recipient-policy-reconciler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"recipient-policy-reconciler.d.ts","sourceRoot":"","sources":["../src/recipient-policy-reconciler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CA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B,6BAA6B,CAC5C,EAAE,EAAE,QAAQ,EACZ,KAAK,EAAE;IAAE,wBAAwB,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC3D,IAAI,CAqBN;AA2uCD,wBAAsB,+BAA+B,CACpD,EAAE,EAAE,QAAQ,EACZ,KAAK,EAAE,oCAAoC,EAC3C,OAAO,EAAE,gCAAgC,GACvC,OAAO,CAAC,8BAA8B,CAAC,CAmDzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipient-policy-reconciliation.d.ts","sourceRoot":"","sources":["../src/recipient-policy-reconciliation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"recipient-policy-reconciliation.d.ts","sourceRoot":"","sources":["../src/recipient-policy-reconciliation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOxC,OAAO,EACN,yBAAyB,EAGzB,MAAM,mCAAmC,CAAC;AAM3C,OAAO,EAAE,8CAA8C,EAAE,MAAM,oCAAoC,CAAC;AAGpG,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC,MAAM,MAAM,6BAA6B,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE7F,MAAM,MAAM,kCAAkC,GAC3C,oCAAoC,GACpC,2BAA2B,GAC3B,kBAAkB,GAClB,qBAAqB,GACrB,iBAAiB,GACjB,cAAc,GACd,iBAAiB,GACjB,yBAAyB,GACzB,8BAA8B,GAC9B,sCAAsC,GACtC,8BAA8B,GAC9B,8BAA8B,GAC9B,iCAAiC,GACjC,6BAA6B,GAC7B,yBAAyB,GACzB,0BAA0B,CAAC;AAsB9B,MAAM,WAAW,iCAAiC;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,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,EAAE,CASpC;AAED,wBAAgB,+BAA+B,CAC9C,EAAE,EAAE,QAAQ,EACZ,KAAK,EAAE;IACN,wBAAwB,EAAE,MAAM,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;CAC3B,GACC,OAAO,CAST"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Database } from "./db.js";
|
|
2
|
+
import type { RecipientPolicyTeamCreateErrorCode, RecipientPolicyTeamCreateResultV1 } from "./recipient-policy-contract.js";
|
|
3
|
+
export { RECIPIENT_POLICY_TEAM_CREATE_ERROR_CODES, type RecipientPolicyTeamCreateErrorCode, type RecipientPolicyTeamCreateResultV1, } from "./recipient-policy-contract.js";
|
|
4
|
+
export declare class RecipientPolicyTeamCreateError extends Error {
|
|
5
|
+
readonly code: RecipientPolicyTeamCreateErrorCode;
|
|
6
|
+
constructor(code: RecipientPolicyTeamCreateErrorCode);
|
|
7
|
+
}
|
|
8
|
+
export interface CreateRecipientPolicyTeamInput {
|
|
9
|
+
displayName: string;
|
|
10
|
+
/** The Identity creating the Team. It becomes the Team's first admin member. */
|
|
11
|
+
creatorIdentityId: string;
|
|
12
|
+
now: string;
|
|
13
|
+
/** Tests pass a fixed ID; production generates one. */
|
|
14
|
+
teamId?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Creates an active Team whose only member is its creator, as admin. Membership
|
|
18
|
+
* includes all of the creator's devices. The Team shares nothing until a Project
|
|
19
|
+
* is shared with it, so creating it changes no one's access.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createRecipientPolicyTeam(db: Database, input: CreateRecipientPolicyTeamInput): RecipientPolicyTeamCreateResultV1;
|
|
22
|
+
//# sourceMappingURL=recipient-policy-team-create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipient-policy-team-create.d.ts","sourceRoot":"","sources":["../src/recipient-policy-team-create.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EACX,kCAAkC,EAClC,iCAAiC,EACjC,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EACN,wCAAwC,EACxC,KAAK,kCAAkC,EACvC,KAAK,iCAAiC,GACtC,MAAM,gCAAgC,CAAC;AAExC,qBAAa,8BAA+B,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,EAAE,kCAAkC;IAA7D,YAAqB,IAAI,EAAE,kCAAkC,EAG5D;CACD;AAED,MAAM,WAAW,8BAA8B;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AA+ED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACxC,EAAE,EAAE,QAAQ,EACZ,KAAK,EAAE,8BAA8B,GACnC,iCAAiC,CASnC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as e, a as t, c as n, f as r, o as i, p as a, u as o } from "./workspace-identity-C7EPmSZe.js";
|
|
2
2
|
import { createHash as s } from "node:crypto";
|
|
3
3
|
//#region src/scope-membership-wire.ts
|
|
4
4
|
function c() {
|
|
@@ -7,28 +7,28 @@ function c() {
|
|
|
7
7
|
function l(e, t) {
|
|
8
8
|
return (e?.[t] !== 1 || !Array.isArray(e.items)) && c(), e.items;
|
|
9
9
|
}
|
|
10
|
-
function u(e,
|
|
10
|
+
function u(e, t) {
|
|
11
11
|
let i = /* @__PURE__ */ new Set();
|
|
12
12
|
return l(e, "version").map((e) => {
|
|
13
|
-
|
|
14
|
-
let
|
|
15
|
-
return (
|
|
13
|
+
r(e, n);
|
|
14
|
+
let o = e;
|
|
15
|
+
return (a(o, t) || i.has(o.scope_id)) && c(), i.add(o.scope_id), o;
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
function d(n,
|
|
19
|
-
|
|
18
|
+
function d(n, a) {
|
|
19
|
+
r(n, ["key_id"]);
|
|
20
20
|
let l = n;
|
|
21
|
-
|
|
21
|
+
r(l.membership, i), r(l.enrollment, t);
|
|
22
22
|
let u = l.membership, d = l.enrollment;
|
|
23
|
-
(!a
|
|
24
|
-
let f =
|
|
23
|
+
(!o(a, u) || d.group_id !== a.group_id || d.device_id !== u.device_id || d.enabled !== 1 || typeof l.key_id != "string" || !/^[a-f0-9]{64}$/.test(l.key_id)) && c();
|
|
24
|
+
let f = e(d.public_key);
|
|
25
25
|
return (f.kind !== "ed25519" || s("sha256").update(f.blob).digest("hex") !== l.key_id) && c(), u;
|
|
26
26
|
}
|
|
27
|
-
function f(e,
|
|
27
|
+
function f(e, t, i, o) {
|
|
28
28
|
let s = l(e, "authorization_version");
|
|
29
|
-
|
|
29
|
+
r(e?.scope, n);
|
|
30
30
|
let u = e?.scope;
|
|
31
|
-
(!
|
|
31
|
+
(!t || u.scope_id !== o || a(u, i) || n.some((e) => u[e] !== t[e])) && c();
|
|
32
32
|
let f = /* @__PURE__ */ new Set();
|
|
33
33
|
return s.map((e) => {
|
|
34
34
|
let t = d(e, u);
|
|
@@ -492,4 +492,4 @@ var j = class {
|
|
|
492
492
|
//#endregion
|
|
493
493
|
export { M as n, j as t };
|
|
494
494
|
|
|
495
|
-
//# sourceMappingURL=relay-health-
|
|
495
|
+
//# sourceMappingURL=relay-health-B8BpHFaE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relay-health-CeyhVeuq.js","names":[],"sources":["../src/scope-membership-wire.ts","../src/relay-health-probe.ts","../src/relay-health.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { parseSshEd25519PublicKeyForRevocation } from \"./coordinator-ed25519-key-id-compat.js\";\nimport {\n\tENROLLMENT_FIELDS,\n\tisCurrentScopeMember,\n\tMEMBERSHIP_FIELDS,\n\trequireScopeAuthorizationRecord,\n\tSCOPE_FIELDS,\n\tscopeAuthorizationError,\n} from \"./coordinator-scope-authorization.js\";\nimport type {\n\tCoordinatorEnrollment,\n\tCoordinatorScope,\n\tCoordinatorScopeMembership,\n} from \"./coordinator-store-contract.js\";\n\nfunction unavailable(): never {\n\tthrow new Error(\"scope_authorization_unavailable\");\n}\n\nfunction items(payload: Record<string, unknown> | null, versionField: string): unknown[] {\n\tif (payload?.[versionField] !== 1 || !Array.isArray(payload.items)) unavailable();\n\treturn payload.items;\n}\n\nexport function decodeScopeCatalogue(\n\tpayload: Record<string, unknown> | null,\n\tgroupId: string,\n): CoordinatorScope[] {\n\tconst seen = new Set<string>();\n\treturn items(payload, \"version\").map((raw) => {\n\t\trequireScopeAuthorizationRecord(raw, SCOPE_FIELDS);\n\t\tconst scope = raw as CoordinatorScope;\n\t\tif (scopeAuthorizationError(scope, groupId) || seen.has(scope.scope_id)) unavailable();\n\t\tseen.add(scope.scope_id);\n\t\treturn scope;\n\t});\n}\n\nfunction decodeMember(raw: unknown, scope: CoordinatorScope): CoordinatorScopeMembership {\n\trequireScopeAuthorizationRecord(raw, [\"key_id\"]);\n\tconst item = raw as Record<string, unknown>;\n\trequireScopeAuthorizationRecord(item.membership, MEMBERSHIP_FIELDS);\n\trequireScopeAuthorizationRecord(item.enrollment, ENROLLMENT_FIELDS);\n\tconst membership = item.membership as CoordinatorScopeMembership;\n\tconst enrollment = item.enrollment as CoordinatorEnrollment;\n\tif (\n\t\t!isCurrentScopeMember(scope, membership) ||\n\t\tenrollment.group_id !== scope.group_id ||\n\t\tenrollment.device_id !== membership.device_id ||\n\t\tenrollment.enabled !== 1 ||\n\t\ttypeof item.key_id !== \"string\" ||\n\t\t!/^[a-f0-9]{64}$/.test(item.key_id)\n\t)\n\t\tunavailable();\n\t// Preserve the producer's legacy fingerprint tuple without redefining its canonical key ID.\n\tconst parsed = parseSshEd25519PublicKeyForRevocation(enrollment.public_key);\n\tif (\n\t\tparsed.kind !== \"ed25519\" ||\n\t\tcreateHash(\"sha256\").update(parsed.blob).digest(\"hex\") !== item.key_id\n\t)\n\t\tunavailable();\n\treturn membership;\n}\n\nexport function decodeScopeMembers(\n\tpayload: Record<string, unknown> | null,\n\tcatalogueScope: CoordinatorScope | undefined,\n\tgroupId: string,\n\tscopeId: string,\n): CoordinatorScopeMembership[] {\n\tconst rows = items(payload, \"authorization_version\");\n\trequireScopeAuthorizationRecord(payload?.scope, SCOPE_FIELDS);\n\tconst scope = payload?.scope as CoordinatorScope;\n\t// The legacy fetcher interface cannot carry newer scope metadata to reconciliation.\n\t// Reject a catalogue/snapshot race rather than mark that older tuple fresh.\n\tif (\n\t\t!catalogueScope ||\n\t\tscope.scope_id !== scopeId ||\n\t\tscopeAuthorizationError(scope, groupId) ||\n\t\tSCOPE_FIELDS.some((field) => scope[field] !== catalogueScope[field])\n\t)\n\t\tunavailable();\n\tconst seen = new Set<string>();\n\treturn rows.map((raw) => {\n\t\tconst membership = decodeMember(raw, scope);\n\t\tif (seen.has(membership.device_id)) unavailable();\n\t\tseen.add(membership.device_id);\n\t\treturn membership;\n\t});\n}\n","import type { CoordinatorScope } from \"./coordinator-store-contract.js\";\nimport { decodeScopeCatalogue, decodeScopeMembers } from \"./scope-membership-wire.js\";\n\nexport type RelayHealthEndpoint = \"catalogue\" | \"members\";\n/** The operator's clock source must account for rounding in its error bound. */\nexport interface RelayHealthClockStamp {\n\treadonly utcMs: number;\n\treadonly verified: boolean;\n\treadonly maxErrorMs: number;\n\treadonly resolutionMs: number;\n}\nexport interface RelayHealthProbeOptions {\n\treadonly coordinatorOrigin: string;\n\treadonly groupId: string;\n\treadonly syntheticScopeId: string;\n\treadonly probeDeviceId: string;\n\treadonly clock: () => RelayHealthClockStamp;\n\t/** Normal enrolled-device v2 signing, including a fresh nonce for each exact URL. */\n\treadonly sign: (input: {\n\t\turl: string;\n\t\tmethod: \"GET\";\n\t\tbody: Uint8Array;\n\t}) => Promise<Headers | Record<string, string>>;\n\treadonly fetch?: typeof fetch;\n\treadonly allowLoopbackHttpFixture?: boolean;\n}\nexport interface RelayHealthProbeObservation {\n\treadonly endpoint: RelayHealthEndpoint;\n\treadonly completedAt: RelayHealthClockStamp;\n\treadonly durationMs: number;\n\treadonly outcome: \"success\" | \"failure\" | \"denied\";\n}\n\nexport function verifiedRelayHealthTime(stamp: RelayHealthClockStamp): number | null {\n\tif (\n\t\tstamp.verified !== true ||\n\t\t!Number.isSafeInteger(stamp.utcMs) ||\n\t\tstamp.utcMs < 0 ||\n\t\t!Number.isFinite(stamp.maxErrorMs) ||\n\t\tstamp.maxErrorMs < 0 ||\n\t\t!Number.isFinite(stamp.resolutionMs) ||\n\t\tstamp.resolutionMs <= 0 ||\n\t\tstamp.maxErrorMs + stamp.resolutionMs > 5000\n\t)\n\t\treturn null;\n\treturn stamp.utcMs;\n}\n\nfunction requireProbeHeaders(response: Response): void {\n\tlet headerBytes = 0;\n\tfor (const [name, value] of response.headers) headerBytes += name.length + value.length;\n\tif (headerBytes > 8192 || !response.headers.get(\"content-type\")?.startsWith(\"application/json\"))\n\t\tthrow new Error(\"relay_health_response_invalid\");\n}\n\nasync function readProbeResponse(\n\tresponse: Response,\n\tsignal: AbortSignal,\n): Promise<Record<string, unknown>> {\n\tconst reader = response.body?.getReader();\n\tif (!reader) throw new Error(\"relay_health_response_invalid\");\n\tconst bytes = new Uint8Array(64 * 1024);\n\tlet size = 0;\n\tconst cancel = () => {\n\t\tvoid reader.cancel().catch(() => {});\n\t};\n\tsignal.addEventListener(\"abort\", cancel, { once: true });\n\ttry {\n\t\trequireProbeHeaders(response);\n\t\twhile (true) {\n\t\t\tif (signal.aborted) throw new Error(\"relay_health_timeout\");\n\t\t\tconst { done, value } = await reader.read();\n\t\t\tif (signal.aborted) throw new Error(\"relay_health_timeout\");\n\t\t\tif (done) break;\n\t\t\tif (size + value.byteLength > bytes.length) throw new Error(\"relay_health_response_large\");\n\t\t\tbytes.set(value, size);\n\t\t\tsize += value.byteLength;\n\t\t}\n\t\tconst value: unknown = JSON.parse(\n\t\t\tnew TextDecoder(\"utf-8\", { fatal: true }).decode(bytes.subarray(0, size)),\n\t\t);\n\t\tif (!value || typeof value !== \"object\" || Array.isArray(value))\n\t\t\tthrow new Error(\"relay_health_response_invalid\");\n\t\treturn value as Record<string, unknown>;\n\t} finally {\n\t\tsignal.removeEventListener(\"abort\", cancel);\n\t\tcancel();\n\t\treader.releaseLock();\n\t}\n}\n\n/** Internal producer. Observations are emitted only after the actual request finishes. */\nfunction probeOrigin(options: RelayHealthProbeOptions): URL {\n\tconst origin = new URL(options.coordinatorOrigin);\n\tconst loopback = [\"127.0.0.1\", \"[::1]\"].includes(origin.hostname);\n\tif (\n\t\torigin.username ||\n\t\torigin.password ||\n\t\torigin.search ||\n\t\torigin.hash ||\n\t\torigin.pathname !== \"/\" ||\n\t\t(origin.protocol !== \"https:\" &&\n\t\t\t!(options.allowLoopbackHttpFixture && loopback && origin.protocol === \"http:\"))\n\t)\n\t\tthrow new Error(\"relay_health_origin_invalid\");\n\treturn origin;\n}\n\nclass HealthProbe {\n\tprivate readonly origin: URL;\n\tprivate scope: CoordinatorScope | undefined;\n\tconstructor(\n\t\tprivate readonly options: RelayHealthProbeOptions,\n\t\tprivate readonly observe: (observation: RelayHealthProbeObservation) => void,\n\t) {\n\t\tthis.options = Object.freeze({ ...options });\n\t\tthis.origin = probeOrigin(options);\n\t}\n\tprivate validate(endpoint: RelayHealthEndpoint, payload: Record<string, unknown>): void {\n\t\tconst options = this.options;\n\t\tif (endpoint === \"catalogue\") {\n\t\t\tthis.scope = decodeScopeCatalogue(payload, options.groupId).find(\n\t\t\t\t(item) => item.scope_id === options.syntheticScopeId,\n\t\t\t);\n\t\t\tif (!this.scope) throw new Error(\"relay_health_scope_missing\");\n\t\t\treturn;\n\t\t}\n\t\tif (\n\t\t\t!decodeScopeMembers(payload, this.scope, options.groupId, options.syntheticScopeId).some(\n\t\t\t\t(member) => member.device_id === options.probeDeviceId,\n\t\t\t)\n\t\t)\n\t\t\tthrow new Error(\"relay_health_member_missing\");\n\t}\n\tprivate async fetchValidated(\n\t\tendpoint: RelayHealthEndpoint,\n\t\turl: URL,\n\t\tsignal: AbortSignal,\n\t): Promise<RelayHealthProbeObservation[\"outcome\"]> {\n\t\tconst options = this.options;\n\t\tconst headers = new Headers(\n\t\t\tawait options.sign({ url: url.href, method: \"GET\", body: new Uint8Array() }),\n\t\t);\n\t\tif (\n\t\t\theaders.get(\"X-Opencode-Device\") !== options.probeDeviceId ||\n\t\t\t!/^v2:[A-Za-z0-9+/]{86}==$/.test(headers.get(\"X-Opencode-Signature\") ?? \"\") ||\n\t\t\t!/^\\d{1,10}$/.test(headers.get(\"X-Opencode-Timestamp\") ?? \"\") ||\n\t\t\t!/^[0-9a-f]{32}$/.test(headers.get(\"X-Opencode-Nonce\") ?? \"\")\n\t\t)\n\t\t\tthrow new Error(\"relay_health_probe_identity\");\n\t\tif (signal.aborted) throw new Error(\"relay_health_timeout\");\n\t\tconst response = await (options.fetch ?? fetch)(url.href, {\n\t\t\tmethod: \"GET\",\n\t\t\theaders,\n\t\t\tredirect: \"error\",\n\t\t\tsignal,\n\t\t});\n\t\tif (response.status !== 200) {\n\t\t\tvoid response.body?.cancel().catch(() => {});\n\t\t\tif (response.status === 401 || response.status === 403) return \"denied\";\n\t\t\tthrow new Error(\"relay_health_status\");\n\t\t}\n\t\tconst payload = await readProbeResponse(response, signal);\n\t\tif (signal.aborted) throw new Error(\"relay_health_timeout\");\n\t\tthis.validate(endpoint, payload);\n\t\treturn \"success\";\n\t}\n\tprivate async request(endpoint: RelayHealthEndpoint, signal?: AbortSignal): Promise<void> {\n\t\tconst options = this.options;\n\t\tconst url = new URL(\n\t\t\tendpoint === \"catalogue\"\n\t\t\t\t? \"/v1/scopes\"\n\t\t\t\t: `/v1/scopes/${encodeURIComponent(options.syntheticScopeId)}/members`,\n\t\t\tthis.origin,\n\t\t);\n\t\turl.searchParams.set(\"group_id\", options.groupId);\n\t\tconst started = performance.now();\n\t\tconst abort = new AbortController();\n\t\tlet timeout: ReturnType<typeof setTimeout> | undefined;\n\t\tlet outcome: RelayHealthProbeObservation[\"outcome\"] = \"failure\";\n\t\tlet stop = () => {};\n\t\tconst expired = new Promise<never>((_, reject) => {\n\t\t\tstop = () => {\n\t\t\t\tabort.abort();\n\t\t\t\treject(new Error(\"relay_health_timeout\"));\n\t\t\t};\n\t\t\ttimeout = setTimeout(stop, 3000);\n\t\t\tsignal?.addEventListener(\"abort\", stop, { once: true });\n\t\t\tif (signal?.aborted) stop();\n\t\t});\n\t\ttry {\n\t\t\toutcome = await Promise.race([this.fetchValidated(endpoint, url, abort.signal), expired]);\n\t\t} catch {\n\t\t\toutcome = \"failure\";\n\t\t} finally {\n\t\t\tclearTimeout(timeout);\n\t\t\tsignal?.removeEventListener(\"abort\", stop);\n\t\t\tconst durationMs = performance.now() - started;\n\t\t\tthis.observe({\n\t\t\t\tendpoint,\n\t\t\t\tcompletedAt: options.clock(),\n\t\t\t\tdurationMs,\n\t\t\t\toutcome: durationMs > 3000 ? \"failure\" : outcome,\n\t\t\t});\n\t\t}\n\t}\n\tasync run(signal?: AbortSignal): Promise<void> {\n\t\tthis.scope = undefined;\n\t\tif (!signal?.aborted) await this.request(\"catalogue\", signal);\n\t\tif (!signal?.aborted) await this.request(\"members\", signal);\n\t\tthis.scope = undefined;\n\t}\n}\n\nexport function createRelayHealthProbe(\n\toptions: RelayHealthProbeOptions,\n\tobserve: (observation: RelayHealthProbeObservation) => void,\n): (signal?: AbortSignal) => Promise<void> {\n\tconst probe = new HealthProbe(options, observe);\n\treturn (signal) => probe.run(signal);\n}\n","import type { Hono } from \"hono\";\nimport {\n\tcreateRelayHealthProbe,\n\ttype RelayHealthClockStamp,\n\ttype RelayHealthEndpoint,\n\ttype RelayHealthProbeObservation,\n\ttype RelayHealthProbeOptions,\n\tverifiedRelayHealthTime,\n} from \"./relay-health-probe.js\";\nimport type { RelayHealthPublication, RelayHealthPublisher } from \"./relay-health-storage.js\";\n\ntype Cohort = \"probe-server\" | \"probe-client\" | \"real-client\";\nexport type RelayHealthServerCohort = Exclude<Cohort, \"probe-client\">;\nconst ENDPOINTS: readonly RelayHealthEndpoint[] = [\"catalogue\", \"members\"];\nconst COHORTS: readonly Cohort[] = [\"probe-server\", \"probe-client\", \"real-client\"];\nconst WINDOW_MS = 60000;\nconst FRESH_MS = 50000;\nconst MAX_SAMPLES = 4096;\n\nexport interface RelayHealthWindow {\n\tdurations: number[];\n\tfailures: number;\n\tsuccessAt: number | null;\n\tlastSuccessAt: number | null;\n\tbadWindows: number;\n}\n/** One authenticated server observation, produced by coordinator instrumentation. */\nexport interface RelayHealthServerSample {\n\treadonly groupId: string;\n\treadonly cohort: RelayHealthServerCohort;\n\treadonly observation: RelayHealthProbeObservation;\n}\n/** What instrumentation saw for one matched request. A fault means classification threw. */\nexport interface RelayHealthServerEvent {\n\treadonly sample: RelayHealthServerSample | null;\n\treadonly fault: boolean;\n}\nexport interface RelayHealthInstrumentationOptions {\n\t/** Instrumented group IDs mapped to each group's synthetic probe scope. */\n\treadonly groups: ReadonlyMap<string, string>;\n\treadonly probeDeviceId: string;\n\treadonly clock: () => RelayHealthClockStamp;\n}\n/** The part of a monitor the coordinator app calls. */\nexport interface RelayHealthServerHook {\n\tverifiedGroupMember(request: Request, deviceId: string, groupId: string): void;\n\tinstall(app: Hono): void;\n}\n/** Persistable monitor state. Timers, in-flight cycles and the monotonic cycle guard are excluded. */\nexport interface RelayHealthState {\n\treadonly version: 1;\n\treadonly windows: Readonly<Record<string, RelayHealthWindow>>;\n\treadonly windowStart: number | null;\n\treadonly fullWindow: boolean;\n\treadonly tripped: boolean;\n\treadonly healthyWindows: number;\n\treadonly clockValid: boolean;\n\treadonly revision: number | null;\n\treadonly lastNow: number | null;\n\treadonly publishedState: RelayHealthPublication[\"state\"] | null;\n\treadonly lastTrip?: RelayHealthTrip | null;\n}\nexport interface RelayHealthSnapshot extends RelayHealthPublication {\n\treadonly revision: number | null;\n\treadonly validUntilMs: number | null;\n\treadonly healthyWindows: number;\n\treadonly samples: number;\n\t/** The most recent trip, kept after recovery so operators can see what happened. */\n\treadonly lastTrip: RelayHealthTrip | null;\n}\nexport interface RelayHealthOptions extends RelayHealthProbeOptions {\n\treadonly enabled: boolean;\n\treadonly publish: RelayHealthPublisher;\n\t/** Called with the trip reason each time the monitor trips, so hosts can log it. */\n\treadonly onTrip?: (trip: RelayHealthTrip) => void;\n}\n/** Why the monitor last tripped, with the cohort window when a window caused it. */\nexport interface RelayHealthTrip {\n\treadonly reason:\n\t\t| \"window_bad\"\n\t\t| \"sample_invalid\"\n\t\t| \"late_failure\"\n\t\t| \"publish_failed\"\n\t\t| \"probe_cycle_failed\"\n\t\t| \"stopped\";\n\treadonly cohort?: string;\n\treadonly samples?: number;\n\treadonly failures?: number;\n\treadonly maxDurationMs?: number;\n\treadonly atMs: number | null;\n}\nexport interface RelayHealthRuntimeOptions extends Omit<RelayHealthOptions, \"publish\"> {\n\treadonly authorityId: string;\n\t/** Receives a stopped monitor. The owner explicitly starts and stops maintenance. */\n\treadonly onMonitor: (monitor: RelayHealthMonitor) => void;\n}\n\nfunction emptyWindow(): RelayHealthWindow {\n\treturn { durations: [], failures: 0, successAt: null, lastSuccessAt: null, badWindows: 0 };\n}\nfunction fresh(timestamp: number | null, now: number): timestamp is number {\n\treturn timestamp !== null && timestamp <= now && timestamp + FRESH_MS > now;\n}\nfunction healthy(window: RelayHealthWindow, now: number): boolean {\n\tconst count = window.durations.length;\n\tif (!count || !fresh(window.successAt, now)) return false;\n\treturn !badPerformance(window);\n}\nfunction badPerformance(window: RelayHealthWindow): boolean {\n\tconst count = window.durations.length;\n\tif (count < 20) return window.failures > 0 || window.durations.some((value) => value > 3000);\n\tconst sorted = [...window.durations].sort((a, b) => a - b);\n\treturn (\n\t\t(sorted[Math.ceil(count * 0.95) - 1] ?? Infinity) > 1000 || window.failures / count > 0.001\n\t);\n}\n\nconst nullableNumber = (value: unknown): value is number | null =>\n\tvalue === null || (typeof value === \"number\" && Number.isFinite(value));\n\nfunction isWindow(value: unknown): value is RelayHealthWindow {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst window = value as Record<string, unknown>;\n\treturn (\n\t\tArray.isArray(window.durations) &&\n\t\twindow.durations.length <= MAX_SAMPLES &&\n\t\twindow.durations.every((duration) => typeof duration === \"number\" && duration >= 0) &&\n\t\tNumber.isSafeInteger(window.failures) &&\n\t\tNumber.isSafeInteger(window.badWindows) &&\n\t\tnullableNumber(window.successAt) &&\n\t\tnullableNumber(window.lastSuccessAt)\n\t);\n}\n\nfunction isRelayHealthState(value: unknown): value is RelayHealthState {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst state = value as Record<string, unknown>;\n\tconst windows = state.windows as Record<string, unknown> | null;\n\tconst keys = ENDPOINTS.flatMap((endpoint) => COHORTS.map((cohort) => `${endpoint}:${cohort}`));\n\treturn (\n\t\tstate.version === 1 &&\n\t\t!!windows &&\n\t\ttypeof windows === \"object\" &&\n\t\tObject.keys(windows).length === keys.length &&\n\t\tkeys.every((key) => isWindow(windows[key])) &&\n\t\tnullableNumber(state.windowStart) &&\n\t\ttypeof state.fullWindow === \"boolean\" &&\n\t\ttypeof state.tripped === \"boolean\" &&\n\t\tNumber.isSafeInteger(state.healthyWindows) &&\n\t\ttypeof state.clockValid === \"boolean\" &&\n\t\t(state.revision === null || Number.isSafeInteger(state.revision)) &&\n\t\tnullableNumber(state.lastNow) &&\n\t\t(state.publishedState === null ||\n\t\t\t[\"ready\", \"paused\", \"tripped\"].includes(String(state.publishedState)))\n\t);\n}\n\n/**\n * Times authenticated catalogue and member reads and classifies each into a server\n * cohort. The sink decides where samples go, so a monitor can record them locally\n * and a Worker can forward them to the isolate that owns the monitor.\n */\nexport class RelayHealthInstrumentation implements RelayHealthServerHook {\n\tprivate readonly verified = new WeakMap<Request, { deviceId: string; groupId: string }>();\n\n\tconstructor(\n\t\tprivate readonly options: RelayHealthInstrumentationOptions,\n\t\tprivate readonly sink: (event: RelayHealthServerEvent) => void | Promise<void>,\n\t) {\n\t\tthis.options = Object.freeze({ ...options });\n\t}\n\t/** Called only after the existing normal enrollment proof and nonce check succeed. */\n\tverifiedGroupMember(request: Request, deviceId: string, groupId: string): void {\n\t\tif (this.options.groups.has(groupId)) this.verified.set(request, { deviceId, groupId });\n\t}\n\tprivate endpoint(request: Request): RelayHealthEndpoint | null {\n\t\tif (request.method !== \"GET\") return null;\n\t\tconst url = new URL(request.url);\n\t\tif (!this.options.groups.has((url.searchParams.get(\"group_id\") ?? \"\").trim())) return null;\n\t\tif (url.pathname === \"/v1/scopes\") return \"catalogue\";\n\t\treturn /^\\/v1\\/scopes\\/[^/]+\\/members$/.test(url.pathname) ? \"members\" : null;\n\t}\n\tprivate complete(\n\t\trequest: Request,\n\t\tendpoint: RelayHealthEndpoint,\n\t\tstarted: number,\n\t\tstatus: number,\n\t): RelayHealthServerSample | null {\n\t\tconst principal = this.verified.get(request);\n\t\tthis.verified.delete(request);\n\t\t// Admission health measures authenticated work, not callers exhausting a rate bucket.\n\t\tif (!principal || status === 401 || status === 403 || status === 429) return null;\n\t\tconst url = new URL(request.url);\n\t\tconst scopeId = this.options.groups.get(principal.groupId) ?? \"\";\n\t\tconst synthetic = url.pathname === `/v1/scopes/${encodeURIComponent(scopeId)}/members`;\n\t\tconst probe =\n\t\t\tprincipal.deviceId === this.options.probeDeviceId && (endpoint === \"catalogue\" || synthetic);\n\t\tconst success = status === 200;\n\t\tif (!success && status < 500) return null;\n\t\treturn {\n\t\t\tgroupId: principal.groupId,\n\t\t\tcohort: probe ? \"probe-server\" : \"real-client\",\n\t\t\tobservation: {\n\t\t\t\tendpoint,\n\t\t\t\tcompletedAt: this.options.clock(),\n\t\t\t\tdurationMs: performance.now() - started,\n\t\t\t\toutcome: success ? \"success\" : \"failure\",\n\t\t\t},\n\t\t};\n\t}\n\tinstall(app: Hono): void {\n\t\tapp.use(\"*\", async (c, next) => {\n\t\t\tconst endpoint = this.endpoint(c.req.raw);\n\t\t\tif (!endpoint) {\n\t\t\t\tawait next();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst started = performance.now();\n\t\t\tlet status = 500;\n\t\t\ttry {\n\t\t\t\tawait next();\n\t\t\t\tstatus = c.res.status;\n\t\t\t} finally {\n\t\t\t\tlet event: RelayHealthServerEvent;\n\t\t\t\ttry {\n\t\t\t\t\tevent = { sample: this.complete(c.req.raw, endpoint, started, status), fault: false };\n\t\t\t\t} catch {\n\t\t\t\t\tevent = { sample: null, fault: true };\n\t\t\t\t}\n\t\t\t\t// An event without a sample still lets a local monitor re-check its state,\n\t\t\t\t// as before. Telemetry delivery must never change the coordinator response,\n\t\t\t\t// so a failing sink is dropped here.\n\t\t\t\ttry {\n\t\t\t\t\tawait this.sink(event);\n\t\t\t\t} catch {\n\t\t\t\t\t// Health samples are best effort.\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\n/** One authority with one configured realm. No public observation ingestion surface. */\nexport class RelayHealthMonitor {\n\tprivate readonly windows = new Map<string, RelayHealthWindow>();\n\tprivate readonly instrumentation: RelayHealthInstrumentation;\n\tprivate readonly probe: (signal?: AbortSignal) => Promise<void>;\n\tprivate windowStart: number | null = null;\n\tprivate fullWindow = false;\n\tprivate tripped = true;\n\tprivate healthyWindows = 0;\n\tprivate clockValid = false;\n\tprivate revision: number | null = null;\n\tprivate lastNow: number | null = null;\n\tprivate lastCycle = -Infinity;\n\tprivate running = false;\n\tprivate suspended = false;\n\tprivate cycleAbort: AbortController | undefined;\n\tprivate activeCycle: Promise<RelayHealthSnapshot> | undefined;\n\tprivate timer: ReturnType<typeof setTimeout> | undefined;\n\tprivate publication: Promise<void> | undefined;\n\tprivate publicationRequested = false;\n\tprivate publishedState: RelayHealthPublication[\"state\"] | null = null;\n\tprivate publishedObservedAtMs: number | null = null;\n\tprivate lastTrip: RelayHealthTrip | null = null;\n\n\tconstructor(private readonly options: RelayHealthOptions) {\n\t\tthis.options = Object.freeze({ ...options });\n\t\tfor (const endpoint of ENDPOINTS)\n\t\t\tfor (const cohort of COHORTS) this.windows.set(`${endpoint}:${cohort}`, emptyWindow());\n\t\tthis.probe = createRelayHealthProbe(options, (observation) => this.observeProbe(observation));\n\t\tthis.instrumentation = new RelayHealthInstrumentation(\n\t\t\t{\n\t\t\t\tgroups: new Map([[options.groupId, options.syntheticScopeId]]),\n\t\t\t\tprobeDeviceId: options.probeDeviceId,\n\t\t\t\tclock: options.clock,\n\t\t\t},\n\t\t\t(event) => this.afterServerRequest(event),\n\t\t);\n\t}\n\tprivate clock(): number | null {\n\t\ttry {\n\t\t\tconst now = verifiedRelayHealthTime(this.options.clock());\n\t\t\tif (now !== null && (this.lastNow === null || now >= this.lastNow)) {\n\t\t\t\tthis.lastNow = now;\n\t\t\t\tthis.clockValid = true;\n\t\t\t\treturn now;\n\t\t\t}\n\t\t} catch {\n\t\t\t/* A missing clock proof cannot renew readiness. */\n\t\t}\n\t\tthis.invalidateClock();\n\t\treturn null;\n\t}\n\tprivate invalidateClock(): void {\n\t\tthis.clockValid = false;\n\t\tthis.healthyWindows = 0;\n\t\tthis.fullWindow = false;\n\t\tfor (const window of this.windows.values()) {\n\t\t\twindow.lastSuccessAt = null;\n\t\t\twindow.successAt = null;\n\t\t}\n\t}\n\tprivate trip(trip: Omit<RelayHealthTrip, \"atMs\">): void {\n\t\tthis.tripped = true;\n\t\tthis.healthyWindows = 0;\n\t\tthis.lastTrip = { ...trip, atMs: this.lastNow };\n\t\tthis.options.onTrip?.(this.lastTrip);\n\t}\n\tprivate window(endpoint: RelayHealthEndpoint, cohort: Cohort): RelayHealthWindow {\n\t\tconst window = this.windows.get(`${endpoint}:${cohort}`);\n\t\tif (!window) throw new Error(\"relay_health_internal_cohort\");\n\t\treturn window;\n\t}\n\tprivate finishWindow(end: number): void {\n\t\tlet allHealthy = this.fullWindow;\n\t\tfor (const [key, window] of this.windows)\n\t\t\tif (!this.finishCohort(key, window, end)) allHealthy = false;\n\t\tif (allHealthy && this.clockValid) {\n\t\t\tthis.healthyWindows = Math.min(5, this.healthyWindows + 1);\n\t\t\tif (this.healthyWindows === 5) this.tripped = false;\n\t\t} else this.healthyWindows = 0;\n\t}\n\tprivate finishCohort(key: string, window: RelayHealthWindow, end: number): boolean {\n\t\tconst count = window.durations.length;\n\t\tif (key.endsWith(\":real-client\") && count === 0) {\n\t\t\twindow.badWindows = 0;\n\t\t\treturn true;\n\t\t}\n\t\tconst bad = badPerformance(window);\n\t\twindow.badWindows = count >= 20 && bad ? window.badWindows + 1 : 0;\n\t\tif (window.badWindows >= 2 || (count > 0 && count < 20 && bad))\n\t\t\tthis.trip({\n\t\t\t\treason: \"window_bad\",\n\t\t\t\tcohort: key,\n\t\t\t\tsamples: count,\n\t\t\t\tfailures: window.failures,\n\t\t\t\tmaxDurationMs: Math.max(...window.durations),\n\t\t\t});\n\t\treturn healthy(window, end);\n\t}\n\tprivate advance(now: number): void {\n\t\tconst start = Math.floor(now / WINDOW_MS) * WINDOW_MS;\n\t\tif (this.windowStart === null) {\n\t\t\tthis.windowStart = start;\n\t\t\treturn;\n\t\t}\n\t\tif (start === this.windowStart) return;\n\t\tif (start > this.windowStart + WINDOW_MS) this.fullWindow = false;\n\t\tthis.finishWindow(this.windowStart + WINDOW_MS);\n\t\tif (start > this.windowStart + WINDOW_MS) this.healthyWindows = 0;\n\t\tfor (const window of this.windows.values()) {\n\t\t\twindow.durations = [];\n\t\t\twindow.failures = 0;\n\t\t\twindow.successAt = null;\n\t\t\tif (start > this.windowStart + WINDOW_MS) window.badWindows = 0;\n\t\t}\n\t\tthis.windowStart = start;\n\t\tthis.fullWindow = true;\n\t}\n\tprivate observe(\n\t\tendpoint: RelayHealthEndpoint,\n\t\tcohort: Cohort,\n\t\tobservation: RelayHealthProbeObservation,\n\t): void {\n\t\tif (this.suspended) return;\n\t\tconst now = this.clock();\n\t\tconst completedAt = verifiedRelayHealthTime(observation.completedAt);\n\t\tif (now === null || !fresh(completedAt, now)) {\n\t\t\tthis.invalidateClock();\n\t\t\treturn;\n\t\t}\n\t\tthis.advance(now);\n\t\tif (observation.outcome === \"denied\") return;\n\t\tconst window = this.window(endpoint, cohort);\n\t\tthis.addSample(window, completedAt, observation);\n\t}\n\tprivate addSample(\n\t\twindow: RelayHealthWindow,\n\t\tcompletedAt: number,\n\t\tobservation: RelayHealthProbeObservation,\n\t): void {\n\t\tconst duration = observation.durationMs;\n\t\tif (!Number.isFinite(duration) || duration < 0 || window.durations.length >= MAX_SAMPLES) {\n\t\t\tthis.fullWindow = false;\n\t\t\tthis.trip({ reason: \"sample_invalid\", samples: window.durations.length });\n\t\t\treturn;\n\t\t}\n\t\tconst failure = observation.outcome === \"failure\" || duration > 3000;\n\t\t// Delayed producer delivery must not count towards a newer recovery minute.\n\t\tif (this.windowStart !== null && completedAt < this.windowStart) {\n\t\t\tif (failure) this.trip({ reason: \"late_failure\", maxDurationMs: duration });\n\t\t\telse window.lastSuccessAt = Math.max(window.lastSuccessAt ?? 0, completedAt);\n\t\t\treturn;\n\t\t}\n\t\twindow.durations.push(duration);\n\t\tif (failure) {\n\t\t\twindow.failures++;\n\t\t} else {\n\t\t\twindow.successAt = Math.max(window.successAt ?? 0, completedAt);\n\t\t\twindow.lastSuccessAt = Math.max(window.lastSuccessAt ?? 0, completedAt);\n\t\t}\n\t}\n\tprivate observeProbe(observation: RelayHealthProbeObservation): void {\n\t\tthis.observe(observation.endpoint, \"probe-client\", observation);\n\t}\n\t/** Called only after the existing normal enrollment proof and nonce check succeed. */\n\tverifiedGroupMember(request: Request, deviceId: string, groupId: string): void {\n\t\tif (this.options.enabled) this.instrumentation.verifiedGroupMember(request, deviceId, groupId);\n\t}\n\t/** Install before routes so timing includes auth, nonce, DB, serialization and close. */\n\tinstall(app: Hono): void {\n\t\tif (this.options.enabled) this.instrumentation.install(app);\n\t}\n\tprivate async afterServerRequest(event: RelayHealthServerEvent): Promise<void> {\n\t\tif (event.fault) this.invalidateClock();\n\t\telse if (event.sample)\n\t\t\tthis.observe(\n\t\t\t\tevent.sample.observation.endpoint,\n\t\t\t\tevent.sample.cohort,\n\t\t\t\tevent.sample.observation,\n\t\t\t);\n\t\tif (this.snapshot().state !== this.publishedState) await this.publish();\n\t}\n\t/**\n\t * Trusted internal producer link for an owner whose instrumentation runs elsewhere,\n\t * such as another Worker isolate. The sample keeps its own completion time.\n\t */\n\tasync recordServerSample(sample: RelayHealthServerSample): Promise<void> {\n\t\tif (!this.options.enabled || sample.groupId !== this.options.groupId) return;\n\t\tawait this.afterServerRequest({ sample, fault: false });\n\t\t// Any forwarded sample can advance a ready stamp after the cycle published.\n\t\t// Publish that advance so admission does not retain older observations.\n\t\tconst snapshot = this.snapshot();\n\t\tif (snapshot.state === \"ready\" && snapshot.observedAtMs !== this.publishedObservedAtMs)\n\t\t\tawait this.publish();\n\t}\n\tsnapshot(): RelayHealthSnapshot {\n\t\tconst now = this.clock();\n\t\tif (now !== null) this.advance(now);\n\t\tconst required = ENDPOINTS.flatMap((endpoint) => [\n\t\t\tthis.window(endpoint, \"probe-server\").lastSuccessAt,\n\t\t\tthis.window(endpoint, \"probe-client\").lastSuccessAt,\n\t\t]);\n\t\tfor (const endpoint of ENDPOINTS) {\n\t\t\tconst real = this.window(endpoint, \"real-client\");\n\t\t\tif (real.durations.length > 0) required.push(real.lastSuccessAt);\n\t\t}\n\t\tconst observedAtMs =\n\t\t\tnow !== null && this.clockValid && required.every((value) => fresh(value, now))\n\t\t\t\t? Math.min(...(required as number[]))\n\t\t\t\t: null;\n\t\tlet state: RelayHealthPublication[\"state\"] = \"paused\";\n\t\tconst lowVolumeFailure = [...this.windows.values()].some(\n\t\t\t(window) =>\n\t\t\t\twindow.durations.length > 0 && window.durations.length < 20 && badPerformance(window),\n\t\t);\n\t\tif (this.tripped) state = \"tripped\";\n\t\telse if (this.options.enabled && !this.suspended && observedAtMs !== null && !lowVolumeFailure)\n\t\t\tstate = \"ready\";\n\t\treturn {\n\t\t\trevision: this.revision,\n\t\t\tstate,\n\t\t\tobservedAtMs,\n\t\t\tvalidUntilMs: observedAtMs === null ? null : observedAtMs + FRESH_MS,\n\t\t\thealthyWindows: this.healthyWindows,\n\t\t\tsamples: [...this.windows.values()].reduce((sum, window) => sum + window.durations.length, 0),\n\t\t\tlastTrip: this.lastTrip,\n\t\t};\n\t}\n\tprivate publish(): Promise<void> {\n\t\tthis.publicationRequested = true;\n\t\tif (this.publication) return this.publication;\n\t\t// Establish ownership before the drain can finish or fail synchronously.\n\t\tthis.publication = Promise.resolve().then(() => this.drainPublications());\n\t\treturn this.publication;\n\t}\n\tprivate async drainPublications(): Promise<void> {\n\t\ttry {\n\t\t\twhile (this.publicationRequested) {\n\t\t\t\tthis.publicationRequested = false;\n\t\t\t\ttry {\n\t\t\t\t\tconst snapshot = this.snapshot();\n\t\t\t\t\tconst revision = await this.options.publish(snapshot);\n\t\t\t\t\tif (!Number.isSafeInteger(revision) || revision === null || revision < 1)\n\t\t\t\t\t\tthrow new Error(\"relay_health_receipt_invalid\");\n\t\t\t\t\tthis.revision = revision;\n\t\t\t\t\tthis.publishedState = snapshot.state;\n\t\t\t\t\tthis.publishedObservedAtMs = snapshot.observedAtMs;\n\t\t\t\t\t// A newer state can match the previous publication while this write is in flight.\n\t\t\t\t\tif (this.snapshot().state !== snapshot.state) this.publicationRequested = true;\n\t\t\t\t} catch {\n\t\t\t\t\tthis.trip({ reason: \"publish_failed\" });\n\t\t\t\t\tthis.revision = null;\n\t\t\t\t\tthis.publishedState = null;\n\t\t\t\t\tthis.publishedObservedAtMs = null;\n\t\t\t\t\tthis.invalidateClock();\n\t\t\t\t\tthis.publicationRequested = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\t// Release ownership before settling the promise so a tail request starts a new drain.\n\t\t\tthis.publication = undefined;\n\t\t}\n\t}\n\trunProbeCycle(): Promise<RelayHealthSnapshot> {\n\t\tconst monotonicNow = performance.now();\n\t\tif (!this.options.enabled || this.running || monotonicNow - this.lastCycle < 30000)\n\t\t\treturn Promise.resolve(this.snapshot());\n\t\tthis.lastCycle = monotonicNow;\n\t\treturn this.startCycle();\n\t}\n\t/**\n\t * Runs one cycle now, for an owner that schedules cycles itself instead of\n\t * calling start(), such as a Durable Object alarm. The owner enforces the\n\t * 30 s cadence, because a fresh object has no monotonic history.\n\t */\n\trunScheduledCycle(): Promise<RelayHealthSnapshot> {\n\t\tif (!this.options.enabled || this.running) return Promise.resolve(this.snapshot());\n\t\treturn this.startCycle();\n\t}\n\tprivate startCycle(): Promise<RelayHealthSnapshot> {\n\t\tthis.suspended = false;\n\t\tthis.running = true;\n\t\tthis.cycleAbort = new AbortController();\n\t\tthis.activeCycle = this.runCycle(this.cycleAbort.signal);\n\t\treturn this.activeCycle;\n\t}\n\tprivate async runCycle(signal: AbortSignal): Promise<RelayHealthSnapshot> {\n\t\ttry {\n\t\t\t// Publish the conservative startup state before any positive observation.\n\t\t\tif (this.publishedState === null) await this.publish();\n\t\t\tif (!signal.aborted) await this.probe(signal);\n\t\t} catch {\n\t\t\tthis.invalidateClock();\n\t\t}\n\t\tawait this.publish();\n\t\tthis.running = false;\n\t\treturn this.snapshot();\n\t}\n\t/** Window and publication state for an owner that persists the monitor between cycles. */\n\texportState(): RelayHealthState {\n\t\tconst windows: Record<string, RelayHealthWindow> = {};\n\t\tfor (const [key, window] of this.windows)\n\t\t\twindows[key] = { ...window, durations: [...window.durations] };\n\t\treturn {\n\t\t\tversion: 1,\n\t\t\twindows,\n\t\t\twindowStart: this.windowStart,\n\t\t\tfullWindow: this.fullWindow,\n\t\t\ttripped: this.tripped,\n\t\t\thealthyWindows: this.healthyWindows,\n\t\t\tclockValid: this.clockValid,\n\t\t\trevision: this.revision,\n\t\t\tlastNow: this.lastNow,\n\t\t\tpublishedState: this.publishedState,\n\t\t\tlastTrip: this.lastTrip,\n\t\t};\n\t}\n\t/**\n\t * Restores exported state into a new, idle monitor. Returns false and keeps the\n\t * conservative startup state when the value does not have the exported shape,\n\t * or when `maxGapMs` is set and the state was last updated longer ago than that\n\t * by the verified clock. A restart after such a gap must repeat the five-window\n\t * recovery, as a new Node monitor does.\n\t */\n\timportState(value: unknown, options: { readonly maxGapMs?: number } = {}): boolean {\n\t\tif (this.running || !isRelayHealthState(value)) return false;\n\t\tif (options.maxGapMs !== undefined && !this.withinGap(value.lastNow, options.maxGapMs))\n\t\t\treturn false;\n\t\tfor (const [key, window] of Object.entries(value.windows))\n\t\t\tthis.windows.set(key, { ...window, durations: [...window.durations] });\n\t\tthis.windowStart = value.windowStart;\n\t\tthis.fullWindow = value.fullWindow;\n\t\tthis.tripped = value.tripped;\n\t\tthis.healthyWindows = value.healthyWindows;\n\t\tthis.clockValid = value.clockValid;\n\t\tthis.revision = value.revision;\n\t\tthis.lastNow = value.lastNow;\n\t\tthis.publishedState = value.publishedState;\n\t\tthis.lastTrip = value.lastTrip ?? null;\n\t\treturn true;\n\t}\n\tprivate withinGap(lastNow: number | null, maxGapMs: number): boolean {\n\t\tlet now: number | null = null;\n\t\ttry {\n\t\t\tnow = verifiedRelayHealthTime(this.options.clock());\n\t\t} catch {\n\t\t\t/* No clock proof, so the gap is unknown. */\n\t\t}\n\t\treturn now !== null && lastNow !== null && now >= lastNow && now - lastNow <= maxGapMs;\n\t}\n\tstart(): void {\n\t\tif (!this.options.enabled || this.timer !== undefined) return;\n\t\tthis.scheduleMaintenance(30000);\n\t\tvoid this.runProbeCycle().catch(() => {\n\t\t\tthis.trip({ reason: \"probe_cycle_failed\" });\n\t\t});\n\t}\n\tprivate scheduleMaintenance(delayMs: number): void {\n\t\tthis.timer = setTimeout(() => {\n\t\t\tif (this.timer === undefined) return;\n\t\t\tconst remaining = 30000 - (performance.now() - this.lastCycle);\n\t\t\tthis.scheduleMaintenance(remaining > 0 ? remaining : 30000);\n\t\t\tif (remaining <= 0)\n\t\t\t\tvoid this.runProbeCycle().catch(() => {\n\t\t\t\t\tthis.trip({ reason: \"probe_cycle_failed\" });\n\t\t\t\t});\n\t\t}, Math.ceil(delayMs));\n\t\tthis.timer.unref?.();\n\t}\n\tasync stop(): Promise<boolean> {\n\t\tif (!this.options.enabled) return true;\n\t\tclearTimeout(this.timer);\n\t\tthis.timer = undefined;\n\t\tthis.suspended = true;\n\t\tthis.trip({ reason: \"stopped\" });\n\t\tthis.invalidateClock();\n\t\tthis.cycleAbort?.abort();\n\t\tawait this.activeCycle;\n\t\tawait this.publish();\n\t\treturn this.publishedState === \"tripped\" && this.revision !== null;\n\t}\n}\n"],"mappings":";;;AAgBA,SAAS,IAAqB;CAC7B,MAAU,MAAM,iCAAiC;AAClD;AAEA,SAAS,EAAM,GAAyC,GAAiC;CAExF,QADI,IAAU,OAAkB,KAAK,CAAC,MAAM,QAAQ,EAAQ,KAAK,MAAG,EAAY,GACzE,EAAQ;AAChB;AAEA,SAAgB,EACf,GACA,GACqB;CACrB,IAAM,oBAAO,IAAI,IAAY;CAC7B,OAAO,EAAM,GAAS,SAAS,CAAC,CAAC,KAAK,MAAQ;EAC7C,EAAgC,GAAK,CAAY;EACjD,IAAM,IAAQ;EAGd,QAFI,EAAwB,GAAO,CAAO,KAAK,EAAK,IAAI,EAAM,QAAQ,MAAG,EAAY,GACrF,EAAK,IAAI,EAAM,QAAQ,GAChB;CACR,CAAC;AACF;AAEA,SAAS,EAAa,GAAc,GAAqD;CACxF,EAAgC,GAAK,CAAC,QAAQ,CAAC;CAC/C,IAAM,IAAO;CAEb,AADA,EAAgC,EAAK,YAAY,CAAiB,GAClE,EAAgC,EAAK,YAAY,CAAiB;CAClE,IAAM,IAAa,EAAK,YAClB,IAAa,EAAK;CACxB,CACC,CAAC,EAAqB,GAAO,CAAU,KACvC,EAAW,aAAa,EAAM,YAC9B,EAAW,cAAc,EAAW,aACpC,EAAW,YAAY,KACvB,OAAO,EAAK,UAAW,YACvB,CAAC,iBAAiB,KAAK,EAAK,MAAM,MAElC,EAAY;CAEb,IAAM,IAAS,EAAsC,EAAW,UAAU;CAM1E,QAJC,EAAO,SAA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C,GAC/B,KAAK,gBAAgB,GACrB,KAAK,YAAY,MAAM,GACvB,MAAM,KAAK,aACX,MAAM,KAAK,QAAQ,GACZ,KAAK,mBAAmB,aAAa,KAAK,aAAa;CAC/D;AACD"}
|
|
1
|
+
{"version":3,"file":"relay-health-B8BpHFaE.js","names":[],"sources":["../src/scope-membership-wire.ts","../src/relay-health-probe.ts","../src/relay-health.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { parseSshEd25519PublicKeyForRevocation } from \"./coordinator-ed25519-key-id-compat.js\";\nimport {\n\tENROLLMENT_FIELDS,\n\tisCurrentScopeMember,\n\tMEMBERSHIP_FIELDS,\n\trequireScopeAuthorizationRecord,\n\tSCOPE_FIELDS,\n\tscopeAuthorizationError,\n} from \"./coordinator-scope-authorization.js\";\nimport type {\n\tCoordinatorEnrollment,\n\tCoordinatorScope,\n\tCoordinatorScopeMembership,\n} from \"./coordinator-store-contract.js\";\n\nfunction unavailable(): never {\n\tthrow new Error(\"scope_authorization_unavailable\");\n}\n\nfunction items(payload: Record<string, unknown> | null, versionField: string): unknown[] {\n\tif (payload?.[versionField] !== 1 || !Array.isArray(payload.items)) unavailable();\n\treturn payload.items;\n}\n\nexport function decodeScopeCatalogue(\n\tpayload: Record<string, unknown> | null,\n\tgroupId: string,\n): CoordinatorScope[] {\n\tconst seen = new Set<string>();\n\treturn items(payload, \"version\").map((raw) => {\n\t\trequireScopeAuthorizationRecord(raw, SCOPE_FIELDS);\n\t\tconst scope = raw as CoordinatorScope;\n\t\tif (scopeAuthorizationError(scope, groupId) || seen.has(scope.scope_id)) unavailable();\n\t\tseen.add(scope.scope_id);\n\t\treturn scope;\n\t});\n}\n\nfunction decodeMember(raw: unknown, scope: CoordinatorScope): CoordinatorScopeMembership {\n\trequireScopeAuthorizationRecord(raw, [\"key_id\"]);\n\tconst item = raw as Record<string, unknown>;\n\trequireScopeAuthorizationRecord(item.membership, MEMBERSHIP_FIELDS);\n\trequireScopeAuthorizationRecord(item.enrollment, ENROLLMENT_FIELDS);\n\tconst membership = item.membership as CoordinatorScopeMembership;\n\tconst enrollment = item.enrollment as CoordinatorEnrollment;\n\tif (\n\t\t!isCurrentScopeMember(scope, membership) ||\n\t\tenrollment.group_id !== scope.group_id ||\n\t\tenrollment.device_id !== membership.device_id ||\n\t\tenrollment.enabled !== 1 ||\n\t\ttypeof item.key_id !== \"string\" ||\n\t\t!/^[a-f0-9]{64}$/.test(item.key_id)\n\t)\n\t\tunavailable();\n\t// Preserve the producer's legacy fingerprint tuple without redefining its canonical key ID.\n\tconst parsed = parseSshEd25519PublicKeyForRevocation(enrollment.public_key);\n\tif (\n\t\tparsed.kind !== \"ed25519\" ||\n\t\tcreateHash(\"sha256\").update(parsed.blob).digest(\"hex\") !== item.key_id\n\t)\n\t\tunavailable();\n\treturn membership;\n}\n\nexport function decodeScopeMembers(\n\tpayload: Record<string, unknown> | null,\n\tcatalogueScope: CoordinatorScope | undefined,\n\tgroupId: string,\n\tscopeId: string,\n): CoordinatorScopeMembership[] {\n\tconst rows = items(payload, \"authorization_version\");\n\trequireScopeAuthorizationRecord(payload?.scope, SCOPE_FIELDS);\n\tconst scope = payload?.scope as CoordinatorScope;\n\t// The legacy fetcher interface cannot carry newer scope metadata to reconciliation.\n\t// Reject a catalogue/snapshot race rather than mark that older tuple fresh.\n\tif (\n\t\t!catalogueScope ||\n\t\tscope.scope_id !== scopeId ||\n\t\tscopeAuthorizationError(scope, groupId) ||\n\t\tSCOPE_FIELDS.some((field) => scope[field] !== catalogueScope[field])\n\t)\n\t\tunavailable();\n\tconst seen = new Set<string>();\n\treturn rows.map((raw) => {\n\t\tconst membership = decodeMember(raw, scope);\n\t\tif (seen.has(membership.device_id)) unavailable();\n\t\tseen.add(membership.device_id);\n\t\treturn membership;\n\t});\n}\n","import type { CoordinatorScope } from \"./coordinator-store-contract.js\";\nimport { decodeScopeCatalogue, decodeScopeMembers } from \"./scope-membership-wire.js\";\n\nexport type RelayHealthEndpoint = \"catalogue\" | \"members\";\n/** The operator's clock source must account for rounding in its error bound. */\nexport interface RelayHealthClockStamp {\n\treadonly utcMs: number;\n\treadonly verified: boolean;\n\treadonly maxErrorMs: number;\n\treadonly resolutionMs: number;\n}\nexport interface RelayHealthProbeOptions {\n\treadonly coordinatorOrigin: string;\n\treadonly groupId: string;\n\treadonly syntheticScopeId: string;\n\treadonly probeDeviceId: string;\n\treadonly clock: () => RelayHealthClockStamp;\n\t/** Normal enrolled-device v2 signing, including a fresh nonce for each exact URL. */\n\treadonly sign: (input: {\n\t\turl: string;\n\t\tmethod: \"GET\";\n\t\tbody: Uint8Array;\n\t}) => Promise<Headers | Record<string, string>>;\n\treadonly fetch?: typeof fetch;\n\treadonly allowLoopbackHttpFixture?: boolean;\n}\nexport interface RelayHealthProbeObservation {\n\treadonly endpoint: RelayHealthEndpoint;\n\treadonly completedAt: RelayHealthClockStamp;\n\treadonly durationMs: number;\n\treadonly outcome: \"success\" | \"failure\" | \"denied\";\n}\n\nexport function verifiedRelayHealthTime(stamp: RelayHealthClockStamp): number | null {\n\tif (\n\t\tstamp.verified !== true ||\n\t\t!Number.isSafeInteger(stamp.utcMs) ||\n\t\tstamp.utcMs < 0 ||\n\t\t!Number.isFinite(stamp.maxErrorMs) ||\n\t\tstamp.maxErrorMs < 0 ||\n\t\t!Number.isFinite(stamp.resolutionMs) ||\n\t\tstamp.resolutionMs <= 0 ||\n\t\tstamp.maxErrorMs + stamp.resolutionMs > 5000\n\t)\n\t\treturn null;\n\treturn stamp.utcMs;\n}\n\nfunction requireProbeHeaders(response: Response): void {\n\tlet headerBytes = 0;\n\tfor (const [name, value] of response.headers) headerBytes += name.length + value.length;\n\tif (headerBytes > 8192 || !response.headers.get(\"content-type\")?.startsWith(\"application/json\"))\n\t\tthrow new Error(\"relay_health_response_invalid\");\n}\n\nasync function readProbeResponse(\n\tresponse: Response,\n\tsignal: AbortSignal,\n): Promise<Record<string, unknown>> {\n\tconst reader = response.body?.getReader();\n\tif (!reader) throw new Error(\"relay_health_response_invalid\");\n\tconst bytes = new Uint8Array(64 * 1024);\n\tlet size = 0;\n\tconst cancel = () => {\n\t\tvoid reader.cancel().catch(() => {});\n\t};\n\tsignal.addEventListener(\"abort\", cancel, { once: true });\n\ttry {\n\t\trequireProbeHeaders(response);\n\t\twhile (true) {\n\t\t\tif (signal.aborted) throw new Error(\"relay_health_timeout\");\n\t\t\tconst { done, value } = await reader.read();\n\t\t\tif (signal.aborted) throw new Error(\"relay_health_timeout\");\n\t\t\tif (done) break;\n\t\t\tif (size + value.byteLength > bytes.length) throw new Error(\"relay_health_response_large\");\n\t\t\tbytes.set(value, size);\n\t\t\tsize += value.byteLength;\n\t\t}\n\t\tconst value: unknown = JSON.parse(\n\t\t\tnew TextDecoder(\"utf-8\", { fatal: true }).decode(bytes.subarray(0, size)),\n\t\t);\n\t\tif (!value || typeof value !== \"object\" || Array.isArray(value))\n\t\t\tthrow new Error(\"relay_health_response_invalid\");\n\t\treturn value as Record<string, unknown>;\n\t} finally {\n\t\tsignal.removeEventListener(\"abort\", cancel);\n\t\tcancel();\n\t\treader.releaseLock();\n\t}\n}\n\n/** Internal producer. Observations are emitted only after the actual request finishes. */\nfunction probeOrigin(options: RelayHealthProbeOptions): URL {\n\tconst origin = new URL(options.coordinatorOrigin);\n\tconst loopback = [\"127.0.0.1\", \"[::1]\"].includes(origin.hostname);\n\tif (\n\t\torigin.username ||\n\t\torigin.password ||\n\t\torigin.search ||\n\t\torigin.hash ||\n\t\torigin.pathname !== \"/\" ||\n\t\t(origin.protocol !== \"https:\" &&\n\t\t\t!(options.allowLoopbackHttpFixture && loopback && origin.protocol === \"http:\"))\n\t)\n\t\tthrow new Error(\"relay_health_origin_invalid\");\n\treturn origin;\n}\n\nclass HealthProbe {\n\tprivate readonly origin: URL;\n\tprivate scope: CoordinatorScope | undefined;\n\tconstructor(\n\t\tprivate readonly options: RelayHealthProbeOptions,\n\t\tprivate readonly observe: (observation: RelayHealthProbeObservation) => void,\n\t) {\n\t\tthis.options = Object.freeze({ ...options });\n\t\tthis.origin = probeOrigin(options);\n\t}\n\tprivate validate(endpoint: RelayHealthEndpoint, payload: Record<string, unknown>): void {\n\t\tconst options = this.options;\n\t\tif (endpoint === \"catalogue\") {\n\t\t\tthis.scope = decodeScopeCatalogue(payload, options.groupId).find(\n\t\t\t\t(item) => item.scope_id === options.syntheticScopeId,\n\t\t\t);\n\t\t\tif (!this.scope) throw new Error(\"relay_health_scope_missing\");\n\t\t\treturn;\n\t\t}\n\t\tif (\n\t\t\t!decodeScopeMembers(payload, this.scope, options.groupId, options.syntheticScopeId).some(\n\t\t\t\t(member) => member.device_id === options.probeDeviceId,\n\t\t\t)\n\t\t)\n\t\t\tthrow new Error(\"relay_health_member_missing\");\n\t}\n\tprivate async fetchValidated(\n\t\tendpoint: RelayHealthEndpoint,\n\t\turl: URL,\n\t\tsignal: AbortSignal,\n\t): Promise<RelayHealthProbeObservation[\"outcome\"]> {\n\t\tconst options = this.options;\n\t\tconst headers = new Headers(\n\t\t\tawait options.sign({ url: url.href, method: \"GET\", body: new Uint8Array() }),\n\t\t);\n\t\tif (\n\t\t\theaders.get(\"X-Opencode-Device\") !== options.probeDeviceId ||\n\t\t\t!/^v2:[A-Za-z0-9+/]{86}==$/.test(headers.get(\"X-Opencode-Signature\") ?? \"\") ||\n\t\t\t!/^\\d{1,10}$/.test(headers.get(\"X-Opencode-Timestamp\") ?? \"\") ||\n\t\t\t!/^[0-9a-f]{32}$/.test(headers.get(\"X-Opencode-Nonce\") ?? \"\")\n\t\t)\n\t\t\tthrow new Error(\"relay_health_probe_identity\");\n\t\tif (signal.aborted) throw new Error(\"relay_health_timeout\");\n\t\tconst response = await (options.fetch ?? fetch)(url.href, {\n\t\t\tmethod: \"GET\",\n\t\t\theaders,\n\t\t\tredirect: \"error\",\n\t\t\tsignal,\n\t\t});\n\t\tif (response.status !== 200) {\n\t\t\tvoid response.body?.cancel().catch(() => {});\n\t\t\tif (response.status === 401 || response.status === 403) return \"denied\";\n\t\t\tthrow new Error(\"relay_health_status\");\n\t\t}\n\t\tconst payload = await readProbeResponse(response, signal);\n\t\tif (signal.aborted) throw new Error(\"relay_health_timeout\");\n\t\tthis.validate(endpoint, payload);\n\t\treturn \"success\";\n\t}\n\tprivate async request(endpoint: RelayHealthEndpoint, signal?: AbortSignal): Promise<void> {\n\t\tconst options = this.options;\n\t\tconst url = new URL(\n\t\t\tendpoint === \"catalogue\"\n\t\t\t\t? \"/v1/scopes\"\n\t\t\t\t: `/v1/scopes/${encodeURIComponent(options.syntheticScopeId)}/members`,\n\t\t\tthis.origin,\n\t\t);\n\t\turl.searchParams.set(\"group_id\", options.groupId);\n\t\tconst started = performance.now();\n\t\tconst abort = new AbortController();\n\t\tlet timeout: ReturnType<typeof setTimeout> | undefined;\n\t\tlet outcome: RelayHealthProbeObservation[\"outcome\"] = \"failure\";\n\t\tlet stop = () => {};\n\t\tconst expired = new Promise<never>((_, reject) => {\n\t\t\tstop = () => {\n\t\t\t\tabort.abort();\n\t\t\t\treject(new Error(\"relay_health_timeout\"));\n\t\t\t};\n\t\t\ttimeout = setTimeout(stop, 3000);\n\t\t\tsignal?.addEventListener(\"abort\", stop, { once: true });\n\t\t\tif (signal?.aborted) stop();\n\t\t});\n\t\ttry {\n\t\t\toutcome = await Promise.race([this.fetchValidated(endpoint, url, abort.signal), expired]);\n\t\t} catch {\n\t\t\toutcome = \"failure\";\n\t\t} finally {\n\t\t\tclearTimeout(timeout);\n\t\t\tsignal?.removeEventListener(\"abort\", stop);\n\t\t\tconst durationMs = performance.now() - started;\n\t\t\tthis.observe({\n\t\t\t\tendpoint,\n\t\t\t\tcompletedAt: options.clock(),\n\t\t\t\tdurationMs,\n\t\t\t\toutcome: durationMs > 3000 ? \"failure\" : outcome,\n\t\t\t});\n\t\t}\n\t}\n\tasync run(signal?: AbortSignal): Promise<void> {\n\t\tthis.scope = undefined;\n\t\tif (!signal?.aborted) await this.request(\"catalogue\", signal);\n\t\tif (!signal?.aborted) await this.request(\"members\", signal);\n\t\tthis.scope = undefined;\n\t}\n}\n\nexport function createRelayHealthProbe(\n\toptions: RelayHealthProbeOptions,\n\tobserve: (observation: RelayHealthProbeObservation) => void,\n): (signal?: AbortSignal) => Promise<void> {\n\tconst probe = new HealthProbe(options, observe);\n\treturn (signal) => probe.run(signal);\n}\n","import type { Hono } from \"hono\";\nimport {\n\tcreateRelayHealthProbe,\n\ttype RelayHealthClockStamp,\n\ttype RelayHealthEndpoint,\n\ttype RelayHealthProbeObservation,\n\ttype RelayHealthProbeOptions,\n\tverifiedRelayHealthTime,\n} from \"./relay-health-probe.js\";\nimport type { RelayHealthPublication, RelayHealthPublisher } from \"./relay-health-storage.js\";\n\ntype Cohort = \"probe-server\" | \"probe-client\" | \"real-client\";\nexport type RelayHealthServerCohort = Exclude<Cohort, \"probe-client\">;\nconst ENDPOINTS: readonly RelayHealthEndpoint[] = [\"catalogue\", \"members\"];\nconst COHORTS: readonly Cohort[] = [\"probe-server\", \"probe-client\", \"real-client\"];\nconst WINDOW_MS = 60000;\nconst FRESH_MS = 50000;\nconst MAX_SAMPLES = 4096;\n\nexport interface RelayHealthWindow {\n\tdurations: number[];\n\tfailures: number;\n\tsuccessAt: number | null;\n\tlastSuccessAt: number | null;\n\tbadWindows: number;\n}\n/** One authenticated server observation, produced by coordinator instrumentation. */\nexport interface RelayHealthServerSample {\n\treadonly groupId: string;\n\treadonly cohort: RelayHealthServerCohort;\n\treadonly observation: RelayHealthProbeObservation;\n}\n/** What instrumentation saw for one matched request. A fault means classification threw. */\nexport interface RelayHealthServerEvent {\n\treadonly sample: RelayHealthServerSample | null;\n\treadonly fault: boolean;\n}\nexport interface RelayHealthInstrumentationOptions {\n\t/** Instrumented group IDs mapped to each group's synthetic probe scope. */\n\treadonly groups: ReadonlyMap<string, string>;\n\treadonly probeDeviceId: string;\n\treadonly clock: () => RelayHealthClockStamp;\n}\n/** The part of a monitor the coordinator app calls. */\nexport interface RelayHealthServerHook {\n\tverifiedGroupMember(request: Request, deviceId: string, groupId: string): void;\n\tinstall(app: Hono): void;\n}\n/** Persistable monitor state. Timers, in-flight cycles and the monotonic cycle guard are excluded. */\nexport interface RelayHealthState {\n\treadonly version: 1;\n\treadonly windows: Readonly<Record<string, RelayHealthWindow>>;\n\treadonly windowStart: number | null;\n\treadonly fullWindow: boolean;\n\treadonly tripped: boolean;\n\treadonly healthyWindows: number;\n\treadonly clockValid: boolean;\n\treadonly revision: number | null;\n\treadonly lastNow: number | null;\n\treadonly publishedState: RelayHealthPublication[\"state\"] | null;\n\treadonly lastTrip?: RelayHealthTrip | null;\n}\nexport interface RelayHealthSnapshot extends RelayHealthPublication {\n\treadonly revision: number | null;\n\treadonly validUntilMs: number | null;\n\treadonly healthyWindows: number;\n\treadonly samples: number;\n\t/** The most recent trip, kept after recovery so operators can see what happened. */\n\treadonly lastTrip: RelayHealthTrip | null;\n}\nexport interface RelayHealthOptions extends RelayHealthProbeOptions {\n\treadonly enabled: boolean;\n\treadonly publish: RelayHealthPublisher;\n\t/** Called with the trip reason each time the monitor trips, so hosts can log it. */\n\treadonly onTrip?: (trip: RelayHealthTrip) => void;\n}\n/** Why the monitor last tripped, with the cohort window when a window caused it. */\nexport interface RelayHealthTrip {\n\treadonly reason:\n\t\t| \"window_bad\"\n\t\t| \"sample_invalid\"\n\t\t| \"late_failure\"\n\t\t| \"publish_failed\"\n\t\t| \"probe_cycle_failed\"\n\t\t| \"stopped\";\n\treadonly cohort?: string;\n\treadonly samples?: number;\n\treadonly failures?: number;\n\treadonly maxDurationMs?: number;\n\treadonly atMs: number | null;\n}\nexport interface RelayHealthRuntimeOptions extends Omit<RelayHealthOptions, \"publish\"> {\n\treadonly authorityId: string;\n\t/** Receives a stopped monitor. The owner explicitly starts and stops maintenance. */\n\treadonly onMonitor: (monitor: RelayHealthMonitor) => void;\n}\n\nfunction emptyWindow(): RelayHealthWindow {\n\treturn { durations: [], failures: 0, successAt: null, lastSuccessAt: null, badWindows: 0 };\n}\nfunction fresh(timestamp: number | null, now: number): timestamp is number {\n\treturn timestamp !== null && timestamp <= now && timestamp + FRESH_MS > now;\n}\nfunction healthy(window: RelayHealthWindow, now: number): boolean {\n\tconst count = window.durations.length;\n\tif (!count || !fresh(window.successAt, now)) return false;\n\treturn !badPerformance(window);\n}\nfunction badPerformance(window: RelayHealthWindow): boolean {\n\tconst count = window.durations.length;\n\tif (count < 20) return window.failures > 0 || window.durations.some((value) => value > 3000);\n\tconst sorted = [...window.durations].sort((a, b) => a - b);\n\treturn (\n\t\t(sorted[Math.ceil(count * 0.95) - 1] ?? Infinity) > 1000 || window.failures / count > 0.001\n\t);\n}\n\nconst nullableNumber = (value: unknown): value is number | null =>\n\tvalue === null || (typeof value === \"number\" && Number.isFinite(value));\n\nfunction isWindow(value: unknown): value is RelayHealthWindow {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst window = value as Record<string, unknown>;\n\treturn (\n\t\tArray.isArray(window.durations) &&\n\t\twindow.durations.length <= MAX_SAMPLES &&\n\t\twindow.durations.every((duration) => typeof duration === \"number\" && duration >= 0) &&\n\t\tNumber.isSafeInteger(window.failures) &&\n\t\tNumber.isSafeInteger(window.badWindows) &&\n\t\tnullableNumber(window.successAt) &&\n\t\tnullableNumber(window.lastSuccessAt)\n\t);\n}\n\nfunction isRelayHealthState(value: unknown): value is RelayHealthState {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst state = value as Record<string, unknown>;\n\tconst windows = state.windows as Record<string, unknown> | null;\n\tconst keys = ENDPOINTS.flatMap((endpoint) => COHORTS.map((cohort) => `${endpoint}:${cohort}`));\n\treturn (\n\t\tstate.version === 1 &&\n\t\t!!windows &&\n\t\ttypeof windows === \"object\" &&\n\t\tObject.keys(windows).length === keys.length &&\n\t\tkeys.every((key) => isWindow(windows[key])) &&\n\t\tnullableNumber(state.windowStart) &&\n\t\ttypeof state.fullWindow === \"boolean\" &&\n\t\ttypeof state.tripped === \"boolean\" &&\n\t\tNumber.isSafeInteger(state.healthyWindows) &&\n\t\ttypeof state.clockValid === \"boolean\" &&\n\t\t(state.revision === null || Number.isSafeInteger(state.revision)) &&\n\t\tnullableNumber(state.lastNow) &&\n\t\t(state.publishedState === null ||\n\t\t\t[\"ready\", \"paused\", \"tripped\"].includes(String(state.publishedState)))\n\t);\n}\n\n/**\n * Times authenticated catalogue and member reads and classifies each into a server\n * cohort. The sink decides where samples go, so a monitor can record them locally\n * and a Worker can forward them to the isolate that owns the monitor.\n */\nexport class RelayHealthInstrumentation implements RelayHealthServerHook {\n\tprivate readonly verified = new WeakMap<Request, { deviceId: string; groupId: string }>();\n\n\tconstructor(\n\t\tprivate readonly options: RelayHealthInstrumentationOptions,\n\t\tprivate readonly sink: (event: RelayHealthServerEvent) => void | Promise<void>,\n\t) {\n\t\tthis.options = Object.freeze({ ...options });\n\t}\n\t/** Called only after the existing normal enrollment proof and nonce check succeed. */\n\tverifiedGroupMember(request: Request, deviceId: string, groupId: string): void {\n\t\tif (this.options.groups.has(groupId)) this.verified.set(request, { deviceId, groupId });\n\t}\n\tprivate endpoint(request: Request): RelayHealthEndpoint | null {\n\t\tif (request.method !== \"GET\") return null;\n\t\tconst url = new URL(request.url);\n\t\tif (!this.options.groups.has((url.searchParams.get(\"group_id\") ?? \"\").trim())) return null;\n\t\tif (url.pathname === \"/v1/scopes\") return \"catalogue\";\n\t\treturn /^\\/v1\\/scopes\\/[^/]+\\/members$/.test(url.pathname) ? \"members\" : null;\n\t}\n\tprivate complete(\n\t\trequest: Request,\n\t\tendpoint: RelayHealthEndpoint,\n\t\tstarted: number,\n\t\tstatus: number,\n\t): RelayHealthServerSample | null {\n\t\tconst principal = this.verified.get(request);\n\t\tthis.verified.delete(request);\n\t\t// Admission health measures authenticated work, not callers exhausting a rate bucket.\n\t\tif (!principal || status === 401 || status === 403 || status === 429) return null;\n\t\tconst url = new URL(request.url);\n\t\tconst scopeId = this.options.groups.get(principal.groupId) ?? \"\";\n\t\tconst synthetic = url.pathname === `/v1/scopes/${encodeURIComponent(scopeId)}/members`;\n\t\tconst probe =\n\t\t\tprincipal.deviceId === this.options.probeDeviceId && (endpoint === \"catalogue\" || synthetic);\n\t\tconst success = status === 200;\n\t\tif (!success && status < 500) return null;\n\t\treturn {\n\t\t\tgroupId: principal.groupId,\n\t\t\tcohort: probe ? \"probe-server\" : \"real-client\",\n\t\t\tobservation: {\n\t\t\t\tendpoint,\n\t\t\t\tcompletedAt: this.options.clock(),\n\t\t\t\tdurationMs: performance.now() - started,\n\t\t\t\toutcome: success ? \"success\" : \"failure\",\n\t\t\t},\n\t\t};\n\t}\n\tinstall(app: Hono): void {\n\t\tapp.use(\"*\", async (c, next) => {\n\t\t\tconst endpoint = this.endpoint(c.req.raw);\n\t\t\tif (!endpoint) {\n\t\t\t\tawait next();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst started = performance.now();\n\t\t\tlet status = 500;\n\t\t\ttry {\n\t\t\t\tawait next();\n\t\t\t\tstatus = c.res.status;\n\t\t\t} finally {\n\t\t\t\tlet event: RelayHealthServerEvent;\n\t\t\t\ttry {\n\t\t\t\t\tevent = { sample: this.complete(c.req.raw, endpoint, started, status), fault: false };\n\t\t\t\t} catch {\n\t\t\t\t\tevent = { sample: null, fault: true };\n\t\t\t\t}\n\t\t\t\t// An event without a sample still lets a local monitor re-check its state,\n\t\t\t\t// as before. Telemetry delivery must never change the coordinator response,\n\t\t\t\t// so a failing sink is dropped here.\n\t\t\t\ttry {\n\t\t\t\t\tawait this.sink(event);\n\t\t\t\t} catch {\n\t\t\t\t\t// Health samples are best effort.\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\n/** One authority with one configured realm. No public observation ingestion surface. */\nexport class RelayHealthMonitor {\n\tprivate readonly windows = new Map<string, RelayHealthWindow>();\n\tprivate readonly instrumentation: RelayHealthInstrumentation;\n\tprivate readonly probe: (signal?: AbortSignal) => Promise<void>;\n\tprivate windowStart: number | null = null;\n\tprivate fullWindow = false;\n\tprivate tripped = true;\n\tprivate healthyWindows = 0;\n\tprivate clockValid = false;\n\tprivate revision: number | null = null;\n\tprivate lastNow: number | null = null;\n\tprivate lastCycle = -Infinity;\n\tprivate running = false;\n\tprivate suspended = false;\n\tprivate cycleAbort: AbortController | undefined;\n\tprivate activeCycle: Promise<RelayHealthSnapshot> | undefined;\n\tprivate timer: ReturnType<typeof setTimeout> | undefined;\n\tprivate publication: Promise<void> | undefined;\n\tprivate publicationRequested = false;\n\tprivate publishedState: RelayHealthPublication[\"state\"] | null = null;\n\tprivate publishedObservedAtMs: number | null = null;\n\tprivate lastTrip: RelayHealthTrip | null = null;\n\n\tconstructor(private readonly options: RelayHealthOptions) {\n\t\tthis.options = Object.freeze({ ...options });\n\t\tfor (const endpoint of ENDPOINTS)\n\t\t\tfor (const cohort of COHORTS) this.windows.set(`${endpoint}:${cohort}`, emptyWindow());\n\t\tthis.probe = createRelayHealthProbe(options, (observation) => this.observeProbe(observation));\n\t\tthis.instrumentation = new RelayHealthInstrumentation(\n\t\t\t{\n\t\t\t\tgroups: new Map([[options.groupId, options.syntheticScopeId]]),\n\t\t\t\tprobeDeviceId: options.probeDeviceId,\n\t\t\t\tclock: options.clock,\n\t\t\t},\n\t\t\t(event) => this.afterServerRequest(event),\n\t\t);\n\t}\n\tprivate clock(): number | null {\n\t\ttry {\n\t\t\tconst now = verifiedRelayHealthTime(this.options.clock());\n\t\t\tif (now !== null && (this.lastNow === null || now >= this.lastNow)) {\n\t\t\t\tthis.lastNow = now;\n\t\t\t\tthis.clockValid = true;\n\t\t\t\treturn now;\n\t\t\t}\n\t\t} catch {\n\t\t\t/* A missing clock proof cannot renew readiness. */\n\t\t}\n\t\tthis.invalidateClock();\n\t\treturn null;\n\t}\n\tprivate invalidateClock(): void {\n\t\tthis.clockValid = false;\n\t\tthis.healthyWindows = 0;\n\t\tthis.fullWindow = false;\n\t\tfor (const window of this.windows.values()) {\n\t\t\twindow.lastSuccessAt = null;\n\t\t\twindow.successAt = null;\n\t\t}\n\t}\n\tprivate trip(trip: Omit<RelayHealthTrip, \"atMs\">): void {\n\t\tthis.tripped = true;\n\t\tthis.healthyWindows = 0;\n\t\tthis.lastTrip = { ...trip, atMs: this.lastNow };\n\t\tthis.options.onTrip?.(this.lastTrip);\n\t}\n\tprivate window(endpoint: RelayHealthEndpoint, cohort: Cohort): RelayHealthWindow {\n\t\tconst window = this.windows.get(`${endpoint}:${cohort}`);\n\t\tif (!window) throw new Error(\"relay_health_internal_cohort\");\n\t\treturn window;\n\t}\n\tprivate finishWindow(end: number): void {\n\t\tlet allHealthy = this.fullWindow;\n\t\tfor (const [key, window] of this.windows)\n\t\t\tif (!this.finishCohort(key, window, end)) allHealthy = false;\n\t\tif (allHealthy && this.clockValid) {\n\t\t\tthis.healthyWindows = Math.min(5, this.healthyWindows + 1);\n\t\t\tif (this.healthyWindows === 5) this.tripped = false;\n\t\t} else this.healthyWindows = 0;\n\t}\n\tprivate finishCohort(key: string, window: RelayHealthWindow, end: number): boolean {\n\t\tconst count = window.durations.length;\n\t\tif (key.endsWith(\":real-client\") && count === 0) {\n\t\t\twindow.badWindows = 0;\n\t\t\treturn true;\n\t\t}\n\t\tconst bad = badPerformance(window);\n\t\twindow.badWindows = count >= 20 && bad ? window.badWindows + 1 : 0;\n\t\tif (window.badWindows >= 2 || (count > 0 && count < 20 && bad))\n\t\t\tthis.trip({\n\t\t\t\treason: \"window_bad\",\n\t\t\t\tcohort: key,\n\t\t\t\tsamples: count,\n\t\t\t\tfailures: window.failures,\n\t\t\t\tmaxDurationMs: Math.max(...window.durations),\n\t\t\t});\n\t\treturn healthy(window, end);\n\t}\n\tprivate advance(now: number): void {\n\t\tconst start = Math.floor(now / WINDOW_MS) * WINDOW_MS;\n\t\tif (this.windowStart === null) {\n\t\t\tthis.windowStart = start;\n\t\t\treturn;\n\t\t}\n\t\tif (start === this.windowStart) return;\n\t\tif (start > this.windowStart + WINDOW_MS) this.fullWindow = false;\n\t\tthis.finishWindow(this.windowStart + WINDOW_MS);\n\t\tif (start > this.windowStart + WINDOW_MS) this.healthyWindows = 0;\n\t\tfor (const window of this.windows.values()) {\n\t\t\twindow.durations = [];\n\t\t\twindow.failures = 0;\n\t\t\twindow.successAt = null;\n\t\t\tif (start > this.windowStart + WINDOW_MS) window.badWindows = 0;\n\t\t}\n\t\tthis.windowStart = start;\n\t\tthis.fullWindow = true;\n\t}\n\tprivate observe(\n\t\tendpoint: RelayHealthEndpoint,\n\t\tcohort: Cohort,\n\t\tobservation: RelayHealthProbeObservation,\n\t): void {\n\t\tif (this.suspended) return;\n\t\tconst now = this.clock();\n\t\tconst completedAt = verifiedRelayHealthTime(observation.completedAt);\n\t\tif (now === null || !fresh(completedAt, now)) {\n\t\t\tthis.invalidateClock();\n\t\t\treturn;\n\t\t}\n\t\tthis.advance(now);\n\t\tif (observation.outcome === \"denied\") return;\n\t\tconst window = this.window(endpoint, cohort);\n\t\tthis.addSample(window, completedAt, observation);\n\t}\n\tprivate addSample(\n\t\twindow: RelayHealthWindow,\n\t\tcompletedAt: number,\n\t\tobservation: RelayHealthProbeObservation,\n\t): void {\n\t\tconst duration = observation.durationMs;\n\t\tif (!Number.isFinite(duration) || duration < 0 || window.durations.length >= MAX_SAMPLES) {\n\t\t\tthis.fullWindow = false;\n\t\t\tthis.trip({ reason: \"sample_invalid\", samples: window.durations.length });\n\t\t\treturn;\n\t\t}\n\t\tconst failure = observation.outcome === \"failure\" || duration > 3000;\n\t\t// Delayed producer delivery must not count towards a newer recovery minute.\n\t\tif (this.windowStart !== null && completedAt < this.windowStart) {\n\t\t\tif (failure) this.trip({ reason: \"late_failure\", maxDurationMs: duration });\n\t\t\telse window.lastSuccessAt = Math.max(window.lastSuccessAt ?? 0, completedAt);\n\t\t\treturn;\n\t\t}\n\t\twindow.durations.push(duration);\n\t\tif (failure) {\n\t\t\twindow.failures++;\n\t\t} else {\n\t\t\twindow.successAt = Math.max(window.successAt ?? 0, completedAt);\n\t\t\twindow.lastSuccessAt = Math.max(window.lastSuccessAt ?? 0, completedAt);\n\t\t}\n\t}\n\tprivate observeProbe(observation: RelayHealthProbeObservation): void {\n\t\tthis.observe(observation.endpoint, \"probe-client\", observation);\n\t}\n\t/** Called only after the existing normal enrollment proof and nonce check succeed. */\n\tverifiedGroupMember(request: Request, deviceId: string, groupId: string): void {\n\t\tif (this.options.enabled) this.instrumentation.verifiedGroupMember(request, deviceId, groupId);\n\t}\n\t/** Install before routes so timing includes auth, nonce, DB, serialization and close. */\n\tinstall(app: Hono): void {\n\t\tif (this.options.enabled) this.instrumentation.install(app);\n\t}\n\tprivate async afterServerRequest(event: RelayHealthServerEvent): Promise<void> {\n\t\tif (event.fault) this.invalidateClock();\n\t\telse if (event.sample)\n\t\t\tthis.observe(\n\t\t\t\tevent.sample.observation.endpoint,\n\t\t\t\tevent.sample.cohort,\n\t\t\t\tevent.sample.observation,\n\t\t\t);\n\t\tif (this.snapshot().state !== this.publishedState) await this.publish();\n\t}\n\t/**\n\t * Trusted internal producer link for an owner whose instrumentation runs elsewhere,\n\t * such as another Worker isolate. The sample keeps its own completion time.\n\t */\n\tasync recordServerSample(sample: RelayHealthServerSample): Promise<void> {\n\t\tif (!this.options.enabled || sample.groupId !== this.options.groupId) return;\n\t\tawait this.afterServerRequest({ sample, fault: false });\n\t\t// Any forwarded sample can advance a ready stamp after the cycle published.\n\t\t// Publish that advance so admission does not retain older observations.\n\t\tconst snapshot = this.snapshot();\n\t\tif (snapshot.state === \"ready\" && snapshot.observedAtMs !== this.publishedObservedAtMs)\n\t\t\tawait this.publish();\n\t}\n\tsnapshot(): RelayHealthSnapshot {\n\t\tconst now = this.clock();\n\t\tif (now !== null) this.advance(now);\n\t\tconst required = ENDPOINTS.flatMap((endpoint) => [\n\t\t\tthis.window(endpoint, \"probe-server\").lastSuccessAt,\n\t\t\tthis.window(endpoint, \"probe-client\").lastSuccessAt,\n\t\t]);\n\t\tfor (const endpoint of ENDPOINTS) {\n\t\t\tconst real = this.window(endpoint, \"real-client\");\n\t\t\tif (real.durations.length > 0) required.push(real.lastSuccessAt);\n\t\t}\n\t\tconst observedAtMs =\n\t\t\tnow !== null && this.clockValid && required.every((value) => fresh(value, now))\n\t\t\t\t? Math.min(...(required as number[]))\n\t\t\t\t: null;\n\t\tlet state: RelayHealthPublication[\"state\"] = \"paused\";\n\t\tconst lowVolumeFailure = [...this.windows.values()].some(\n\t\t\t(window) =>\n\t\t\t\twindow.durations.length > 0 && window.durations.length < 20 && badPerformance(window),\n\t\t);\n\t\tif (this.tripped) state = \"tripped\";\n\t\telse if (this.options.enabled && !this.suspended && observedAtMs !== null && !lowVolumeFailure)\n\t\t\tstate = \"ready\";\n\t\treturn {\n\t\t\trevision: this.revision,\n\t\t\tstate,\n\t\t\tobservedAtMs,\n\t\t\tvalidUntilMs: observedAtMs === null ? null : observedAtMs + FRESH_MS,\n\t\t\thealthyWindows: this.healthyWindows,\n\t\t\tsamples: [...this.windows.values()].reduce((sum, window) => sum + window.durations.length, 0),\n\t\t\tlastTrip: this.lastTrip,\n\t\t};\n\t}\n\tprivate publish(): Promise<void> {\n\t\tthis.publicationRequested = true;\n\t\tif (this.publication) return this.publication;\n\t\t// Establish ownership before the drain can finish or fail synchronously.\n\t\tthis.publication = Promise.resolve().then(() => this.drainPublications());\n\t\treturn this.publication;\n\t}\n\tprivate async drainPublications(): Promise<void> {\n\t\ttry {\n\t\t\twhile (this.publicationRequested) {\n\t\t\t\tthis.publicationRequested = false;\n\t\t\t\ttry {\n\t\t\t\t\tconst snapshot = this.snapshot();\n\t\t\t\t\tconst revision = await this.options.publish(snapshot);\n\t\t\t\t\tif (!Number.isSafeInteger(revision) || revision === null || revision < 1)\n\t\t\t\t\t\tthrow new Error(\"relay_health_receipt_invalid\");\n\t\t\t\t\tthis.revision = revision;\n\t\t\t\t\tthis.publishedState = snapshot.state;\n\t\t\t\t\tthis.publishedObservedAtMs = snapshot.observedAtMs;\n\t\t\t\t\t// A newer state can match the previous publication while this write is in flight.\n\t\t\t\t\tif (this.snapshot().state !== snapshot.state) this.publicationRequested = true;\n\t\t\t\t} catch {\n\t\t\t\t\tthis.trip({ reason: \"publish_failed\" });\n\t\t\t\t\tthis.revision = null;\n\t\t\t\t\tthis.publishedState = null;\n\t\t\t\t\tthis.publishedObservedAtMs = null;\n\t\t\t\t\tthis.invalidateClock();\n\t\t\t\t\tthis.publicationRequested = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\t// Release ownership before settling the promise so a tail request starts a new drain.\n\t\t\tthis.publication = undefined;\n\t\t}\n\t}\n\trunProbeCycle(): Promise<RelayHealthSnapshot> {\n\t\tconst monotonicNow = performance.now();\n\t\tif (!this.options.enabled || this.running || monotonicNow - this.lastCycle < 30000)\n\t\t\treturn Promise.resolve(this.snapshot());\n\t\tthis.lastCycle = monotonicNow;\n\t\treturn this.startCycle();\n\t}\n\t/**\n\t * Runs one cycle now, for an owner that schedules cycles itself instead of\n\t * calling start(), such as a Durable Object alarm. The owner enforces the\n\t * 30 s cadence, because a fresh object has no monotonic history.\n\t */\n\trunScheduledCycle(): Promise<RelayHealthSnapshot> {\n\t\tif (!this.options.enabled || this.running) return Promise.resolve(this.snapshot());\n\t\treturn this.startCycle();\n\t}\n\tprivate startCycle(): Promise<RelayHealthSnapshot> {\n\t\tthis.suspended = false;\n\t\tthis.running = true;\n\t\tthis.cycleAbort = new AbortController();\n\t\tthis.activeCycle = this.runCycle(this.cycleAbort.signal);\n\t\treturn this.activeCycle;\n\t}\n\tprivate async runCycle(signal: AbortSignal): Promise<RelayHealthSnapshot> {\n\t\ttry {\n\t\t\t// Publish the conservative startup state before any positive observation.\n\t\t\tif (this.publishedState === null) await this.publish();\n\t\t\tif (!signal.aborted) await this.probe(signal);\n\t\t} catch {\n\t\t\tthis.invalidateClock();\n\t\t}\n\t\tawait this.publish();\n\t\tthis.running = false;\n\t\treturn this.snapshot();\n\t}\n\t/** Window and publication state for an owner that persists the monitor between cycles. */\n\texportState(): RelayHealthState {\n\t\tconst windows: Record<string, RelayHealthWindow> = {};\n\t\tfor (const [key, window] of this.windows)\n\t\t\twindows[key] = { ...window, durations: [...window.durations] };\n\t\treturn {\n\t\t\tversion: 1,\n\t\t\twindows,\n\t\t\twindowStart: this.windowStart,\n\t\t\tfullWindow: this.fullWindow,\n\t\t\ttripped: this.tripped,\n\t\t\thealthyWindows: this.healthyWindows,\n\t\t\tclockValid: this.clockValid,\n\t\t\trevision: this.revision,\n\t\t\tlastNow: this.lastNow,\n\t\t\tpublishedState: this.publishedState,\n\t\t\tlastTrip: this.lastTrip,\n\t\t};\n\t}\n\t/**\n\t * Restores exported state into a new, idle monitor. Returns false and keeps the\n\t * conservative startup state when the value does not have the exported shape,\n\t * or when `maxGapMs` is set and the state was last updated longer ago than that\n\t * by the verified clock. A restart after such a gap must repeat the five-window\n\t * recovery, as a new Node monitor does.\n\t */\n\timportState(value: unknown, options: { readonly maxGapMs?: number } = {}): boolean {\n\t\tif (this.running || !isRelayHealthState(value)) return false;\n\t\tif (options.maxGapMs !== undefined && !this.withinGap(value.lastNow, options.maxGapMs))\n\t\t\treturn false;\n\t\tfor (const [key, window] of Object.entries(value.windows))\n\t\t\tthis.windows.set(key, { ...window, durations: [...window.durations] });\n\t\tthis.windowStart = value.windowStart;\n\t\tthis.fullWindow = value.fullWindow;\n\t\tthis.tripped = value.tripped;\n\t\tthis.healthyWindows = value.healthyWindows;\n\t\tthis.clockValid = value.clockValid;\n\t\tthis.revision = value.revision;\n\t\tthis.lastNow = value.lastNow;\n\t\tthis.publishedState = value.publishedState;\n\t\tthis.lastTrip = value.lastTrip ?? null;\n\t\treturn true;\n\t}\n\tprivate withinGap(lastNow: number | null, maxGapMs: number): boolean {\n\t\tlet now: number | null = null;\n\t\ttry {\n\t\t\tnow = verifiedRelayHealthTime(this.options.clock());\n\t\t} catch {\n\t\t\t/* No clock proof, so the gap is unknown. */\n\t\t}\n\t\treturn now !== null && lastNow !== null && now >= lastNow && now - lastNow <= maxGapMs;\n\t}\n\tstart(): void {\n\t\tif (!this.options.enabled || this.timer !== undefined) return;\n\t\tthis.scheduleMaintenance(30000);\n\t\tvoid this.runProbeCycle().catch(() => {\n\t\t\tthis.trip({ reason: \"probe_cycle_failed\" });\n\t\t});\n\t}\n\tprivate scheduleMaintenance(delayMs: number): void {\n\t\tthis.timer = setTimeout(() => {\n\t\t\tif (this.timer === undefined) return;\n\t\t\tconst remaining = 30000 - (performance.now() - this.lastCycle);\n\t\t\tthis.scheduleMaintenance(remaining > 0 ? remaining : 30000);\n\t\t\tif (remaining <= 0)\n\t\t\t\tvoid this.runProbeCycle().catch(() => {\n\t\t\t\t\tthis.trip({ reason: \"probe_cycle_failed\" });\n\t\t\t\t});\n\t\t}, Math.ceil(delayMs));\n\t\tthis.timer.unref?.();\n\t}\n\tasync stop(): Promise<boolean> {\n\t\tif (!this.options.enabled) return true;\n\t\tclearTimeout(this.timer);\n\t\tthis.timer = undefined;\n\t\tthis.suspended = true;\n\t\tthis.trip({ reason: \"stopped\" });\n\t\tthis.invalidateClock();\n\t\tthis.cycleAbort?.abort();\n\t\tawait this.activeCycle;\n\t\tawait this.publish();\n\t\treturn this.publishedState === \"tripped\" && this.revision !== null;\n\t}\n}\n"],"mappings":";;;AAgBA,SAAS,IAAqB;CAC7B,MAAU,MAAM,iCAAiC;AAClD;AAEA,SAAS,EAAM,GAAyC,GAAiC;CAExF,QADI,IAAU,OAAkB,KAAK,CAAC,MAAM,QAAQ,EAAQ,KAAK,MAAG,EAAY,GACzE,EAAQ;AAChB;AAEA,SAAgB,EACf,GACA,GACqB;CACrB,IAAM,oBAAO,IAAI,IAAY;CAC7B,OAAO,EAAM,GAAS,SAAS,CAAC,CAAC,KAAK,MAAQ;EAC7C,EAAgC,GAAK,CAAY;EACjD,IAAM,IAAQ;EAGd,QAFI,EAAwB,GAAO,CAAO,KAAK,EAAK,IAAI,EAAM,QAAQ,MAAG,EAAY,GACrF,EAAK,IAAI,EAAM,QAAQ,GAChB;CACR,CAAC;AACF;AAEA,SAAS,EAAa,GAAc,GAAqD;CACxF,EAAgC,GA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