@sentropic/cluster-mesh 0.25.0 → 0.27.0
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/comments/storage-schema.d.ts +1 -1
- package/dist/comments/transport-contracts.d.ts +1 -1
- package/dist/compile/contract/diagnostics.d.ts +9 -0
- package/dist/compile/contract/diagnostics.d.ts.map +1 -0
- package/dist/compile/contract/diagnostics.js +82 -0
- package/dist/compile/contract/diagnostics.js.map +1 -0
- package/dist/compile/contract/encoding.d.ts +12 -0
- package/dist/compile/contract/encoding.d.ts.map +1 -0
- package/dist/compile/contract/encoding.js +95 -0
- package/dist/compile/contract/encoding.js.map +1 -0
- package/dist/compile/contract/index.d.ts +9 -0
- package/dist/compile/contract/index.d.ts.map +1 -0
- package/dist/compile/contract/index.js +9 -0
- package/dist/compile/contract/index.js.map +1 -0
- package/dist/compile/contract/json.d.ts +3 -0
- package/dist/compile/contract/json.d.ts.map +1 -0
- package/dist/compile/contract/json.js +75 -0
- package/dist/compile/contract/json.js.map +1 -0
- package/dist/compile/contract/output.d.ts +5 -0
- package/dist/compile/contract/output.d.ts.map +1 -0
- package/dist/compile/contract/output.js +57 -0
- package/dist/compile/contract/output.js.map +1 -0
- package/dist/compile/contract/recipe.d.ts +5 -0
- package/dist/compile/contract/recipe.d.ts.map +1 -0
- package/dist/compile/contract/recipe.js +86 -0
- package/dist/compile/contract/recipe.js.map +1 -0
- package/dist/compile/contract/schema.d.ts +26 -0
- package/dist/compile/contract/schema.d.ts.map +1 -0
- package/dist/compile/contract/schema.js +92 -0
- package/dist/compile/contract/schema.js.map +1 -0
- package/dist/compile/contract/types.d.ts +166 -0
- package/dist/compile/contract/types.d.ts.map +1 -0
- package/dist/compile/contract/types.js +21 -0
- package/dist/compile/contract/types.js.map +1 -0
- package/dist/compile/contract/vectors.d.ts +38 -0
- package/dist/compile/contract/vectors.d.ts.map +1 -0
- package/dist/compile/contract/vectors.js +29 -0
- package/dist/compile/contract/vectors.js.map +1 -0
- package/dist/forge/contracts.d.ts +60 -0
- package/dist/forge/contracts.d.ts.map +1 -0
- package/dist/forge/contracts.js +19 -0
- package/dist/forge/contracts.js.map +1 -0
- package/dist/forge/custody.d.ts +7 -0
- package/dist/forge/custody.d.ts.map +1 -0
- package/dist/forge/custody.js +76 -0
- package/dist/forge/custody.js.map +1 -0
- package/dist/forge/enrollment.d.ts +151 -0
- package/dist/forge/enrollment.d.ts.map +1 -0
- package/dist/forge/enrollment.js +98 -0
- package/dist/forge/enrollment.js.map +1 -0
- package/dist/forge/github-api.d.ts +6 -0
- package/dist/forge/github-api.d.ts.map +1 -0
- package/dist/forge/github-api.js +131 -0
- package/dist/forge/github-api.js.map +1 -0
- package/dist/forge/hono.d.ts +14 -0
- package/dist/forge/hono.d.ts.map +1 -0
- package/dist/forge/hono.js +141 -0
- package/dist/forge/hono.js.map +1 -0
- package/dist/forge/lifecycle.d.ts +108 -0
- package/dist/forge/lifecycle.d.ts.map +1 -0
- package/dist/forge/lifecycle.js +160 -0
- package/dist/forge/lifecycle.js.map +1 -0
- package/dist/forge/records.d.ts +70 -0
- package/dist/forge/records.d.ts.map +1 -0
- package/dist/forge/records.js +2 -0
- package/dist/forge/records.js.map +1 -0
- package/dist/forge/rotation.d.ts +46 -0
- package/dist/forge/rotation.d.ts.map +1 -0
- package/dist/forge/rotation.js +62 -0
- package/dist/forge/rotation.js.map +1 -0
- package/dist/identity/auth-abort.d.ts +9 -0
- package/dist/identity/auth-abort.d.ts.map +1 -0
- package/dist/identity/auth-abort.js +59 -0
- package/dist/identity/auth-abort.js.map +1 -0
- package/dist/identity/auth-binding.d.ts +3 -0
- package/dist/identity/auth-binding.d.ts.map +1 -0
- package/dist/identity/auth-binding.js +87 -0
- package/dist/identity/auth-binding.js.map +1 -0
- package/dist/identity/auth-boundary.d.ts +11 -0
- package/dist/identity/auth-boundary.d.ts.map +1 -0
- package/dist/identity/auth-boundary.js +73 -0
- package/dist/identity/auth-boundary.js.map +1 -0
- package/dist/identity/auth-completion.d.ts +9 -0
- package/dist/identity/auth-completion.d.ts.map +1 -0
- package/dist/identity/auth-completion.js +24 -0
- package/dist/identity/auth-completion.js.map +1 -0
- package/dist/identity/auth-credentials.d.ts +5 -0
- package/dist/identity/auth-credentials.d.ts.map +1 -0
- package/dist/identity/auth-credentials.js +82 -0
- package/dist/identity/auth-credentials.js.map +1 -0
- package/dist/identity/auth-email.d.ts +8 -0
- package/dist/identity/auth-email.d.ts.map +1 -0
- package/dist/identity/auth-email.js +104 -0
- package/dist/identity/auth-email.js.map +1 -0
- package/dist/identity/auth-hono.d.ts +5 -0
- package/dist/identity/auth-hono.d.ts.map +1 -0
- package/dist/identity/auth-hono.js +10 -0
- package/dist/identity/auth-hono.js.map +1 -0
- package/dist/identity/auth-proofs.d.ts +11 -0
- package/dist/identity/auth-proofs.d.ts.map +1 -0
- package/dist/identity/auth-proofs.js +107 -0
- package/dist/identity/auth-proofs.js.map +1 -0
- package/dist/identity/auth-service-tenant.d.ts +4 -0
- package/dist/identity/auth-service-tenant.d.ts.map +1 -0
- package/dist/identity/auth-service-tenant.js +54 -0
- package/dist/identity/auth-service-tenant.js.map +1 -0
- package/dist/identity/auth-sessions.d.ts +8 -0
- package/dist/identity/auth-sessions.d.ts.map +1 -0
- package/dist/identity/auth-sessions.js +141 -0
- package/dist/identity/auth-sessions.js.map +1 -0
- package/dist/identity/auth-social.d.ts +4 -0
- package/dist/identity/auth-social.d.ts.map +1 -0
- package/dist/identity/auth-social.js +82 -0
- package/dist/identity/auth-social.js.map +1 -0
- package/dist/identity/auth-users.d.ts +9 -0
- package/dist/identity/auth-users.d.ts.map +1 -0
- package/dist/identity/auth-users.js +116 -0
- package/dist/identity/auth-users.js.map +1 -0
- package/dist/identity/auth-webauthn.d.ts +22 -0
- package/dist/identity/auth-webauthn.d.ts.map +1 -0
- package/dist/identity/auth-webauthn.js +108 -0
- package/dist/identity/auth-webauthn.js.map +1 -0
- package/dist/identity/cascade.d.ts +12 -0
- package/dist/identity/cascade.d.ts.map +1 -0
- package/dist/identity/cascade.js +19 -0
- package/dist/identity/cascade.js.map +1 -0
- package/dist/identity/connector-custody.d.ts +85 -0
- package/dist/identity/connector-custody.d.ts.map +1 -0
- package/dist/identity/connector-custody.js +288 -0
- package/dist/identity/connector-custody.js.map +1 -0
- package/dist/identity/conversation.d.ts +50 -0
- package/dist/identity/conversation.d.ts.map +1 -0
- package/dist/identity/conversation.js +102 -0
- package/dist/identity/conversation.js.map +1 -0
- package/dist/identity/custody-crypto.d.ts +37 -0
- package/dist/identity/custody-crypto.d.ts.map +1 -0
- package/dist/identity/custody-crypto.js +173 -0
- package/dist/identity/custody-crypto.js.map +1 -0
- package/dist/identity/decision.d.ts +28 -0
- package/dist/identity/decision.d.ts.map +1 -0
- package/dist/identity/decision.js +97 -0
- package/dist/identity/decision.js.map +1 -0
- package/dist/identity/index.d.ts +9 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +13 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/identity/ledger.d.ts +120 -0
- package/dist/identity/ledger.d.ts.map +1 -0
- package/dist/identity/ledger.js +226 -0
- package/dist/identity/ledger.js.map +1 -0
- package/dist/identity/postgres.d.ts +13 -0
- package/dist/identity/postgres.d.ts.map +1 -0
- package/dist/identity/postgres.js +207 -0
- package/dist/identity/postgres.js.map +1 -0
- package/dist/identity/sqlite.d.ts +14 -0
- package/dist/identity/sqlite.d.ts.map +1 -0
- package/dist/identity/sqlite.js +193 -0
- package/dist/identity/sqlite.js.map +1 -0
- package/dist/identity-contracts/accounts.d.ts.map +1 -1
- package/dist/identity-contracts/accounts.js +4 -3
- package/dist/identity-contracts/accounts.js.map +1 -1
- package/dist/identity-contracts/boundary-resolution.d.ts +31 -0
- package/dist/identity-contracts/boundary-resolution.d.ts.map +1 -0
- package/dist/identity-contracts/boundary-resolution.js +56 -0
- package/dist/identity-contracts/boundary-resolution.js.map +1 -0
- package/dist/identity-contracts/composition-descriptors.d.ts +17 -0
- package/dist/identity-contracts/composition-descriptors.d.ts.map +1 -0
- package/dist/identity-contracts/composition-descriptors.js +77 -0
- package/dist/identity-contracts/composition-descriptors.js.map +1 -0
- package/dist/identity-contracts/custody-auth.d.ts +122 -0
- package/dist/identity-contracts/custody-auth.d.ts.map +1 -0
- package/dist/identity-contracts/custody-auth.js +2 -0
- package/dist/identity-contracts/custody-auth.js.map +1 -0
- package/dist/identity-contracts/custody-descriptors.d.ts +18 -0
- package/dist/identity-contracts/custody-descriptors.d.ts.map +1 -0
- package/dist/identity-contracts/custody-descriptors.js +83 -0
- package/dist/identity-contracts/custody-descriptors.js.map +1 -0
- package/dist/identity-contracts/custody-errors.d.ts +21 -0
- package/dist/identity-contracts/custody-errors.d.ts.map +1 -0
- package/dist/identity-contracts/custody-errors.js +80 -0
- package/dist/identity-contracts/custody-errors.js.map +1 -0
- package/dist/identity-contracts/custody-operations.d.ts +79 -0
- package/dist/identity-contracts/custody-operations.d.ts.map +1 -0
- package/dist/identity-contracts/custody-operations.js +2 -0
- package/dist/identity-contracts/custody-operations.js.map +1 -0
- package/dist/identity-contracts/custody.d.ts +587 -0
- package/dist/identity-contracts/custody.d.ts.map +1 -0
- package/dist/identity-contracts/custody.js +7 -0
- package/dist/identity-contracts/custody.js.map +1 -0
- package/dist/identity-contracts/doubles.d.ts +11 -2
- package/dist/identity-contracts/doubles.d.ts.map +1 -1
- package/dist/identity-contracts/doubles.js +20 -0
- package/dist/identity-contracts/doubles.js.map +1 -1
- package/dist/identity-contracts/index.d.ts +10 -0
- package/dist/identity-contracts/index.d.ts.map +1 -1
- package/dist/identity-contracts/index.js +10 -0
- package/dist/identity-contracts/index.js.map +1 -1
- package/dist/identity-contracts/oauth-reads.d.ts +42 -0
- package/dist/identity-contracts/oauth-reads.d.ts.map +1 -0
- package/dist/identity-contracts/oauth-reads.js +38 -0
- package/dist/identity-contracts/oauth-reads.js.map +1 -0
- package/dist/identity-contracts/replica-sync.d.ts +89 -0
- package/dist/identity-contracts/replica-sync.d.ts.map +1 -0
- package/dist/identity-contracts/replica-sync.js +7 -0
- package/dist/identity-contracts/replica-sync.js.map +1 -0
- package/dist/identity-contracts/service-tenancy.d.ts +43 -0
- package/dist/identity-contracts/service-tenancy.d.ts.map +1 -0
- package/dist/identity-contracts/service-tenancy.js +75 -0
- package/dist/identity-contracts/service-tenancy.js.map +1 -0
- package/dist/identity-contracts/workspace-deletion.d.ts +56 -0
- package/dist/identity-contracts/workspace-deletion.d.ts.map +1 -0
- package/dist/identity-contracts/workspace-deletion.js +7 -0
- package/dist/identity-contracts/workspace-deletion.js.map +1 -0
- package/dist/identity-stores/index.d.ts +4 -0
- package/dist/identity-stores/index.d.ts.map +1 -0
- package/dist/identity-stores/index.js +7 -0
- package/dist/identity-stores/index.js.map +1 -0
- package/dist/identity-stores/tenancy-postgres.d.ts +23 -0
- package/dist/identity-stores/tenancy-postgres.d.ts.map +1 -0
- package/dist/identity-stores/tenancy-postgres.js +294 -0
- package/dist/identity-stores/tenancy-postgres.js.map +1 -0
- package/dist/identity-stores/tenancy-schema.d.ts +11 -0
- package/dist/identity-stores/tenancy-schema.d.ts.map +1 -0
- package/dist/identity-stores/tenancy-schema.js +74 -0
- package/dist/identity-stores/tenancy-schema.js.map +1 -0
- package/dist/identity-stores/tenancy-sqlite.d.ts +24 -0
- package/dist/identity-stores/tenancy-sqlite.d.ts.map +1 -0
- package/dist/identity-stores/tenancy-sqlite.js +288 -0
- package/dist/identity-stores/tenancy-sqlite.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/loaders/notifications/index.d.ts +5 -0
- package/dist/loaders/notifications/index.d.ts.map +1 -0
- package/dist/loaders/notifications/index.js +6 -0
- package/dist/loaders/notifications/index.js.map +1 -0
- package/dist/mcp/stateful-preflight.d.ts +1 -1
- package/dist/messaging/email-port.d.ts +49 -0
- package/dist/messaging/email-port.d.ts.map +1 -0
- package/dist/messaging/email-port.js +92 -0
- package/dist/messaging/email-port.js.map +1 -0
- package/dist/messaging/index.d.ts +1 -0
- package/dist/messaging/index.d.ts.map +1 -1
- package/dist/messaging/index.js +1 -0
- package/dist/messaging/index.js.map +1 -1
- package/dist/modules/catalog.d.ts +5 -4
- package/dist/modules/catalog.d.ts.map +1 -1
- package/dist/modules/catalog.js +10 -5
- package/dist/modules/catalog.js.map +1 -1
- package/dist/modules/contracts.d.ts +1 -1
- package/dist/modules/contracts.d.ts.map +1 -1
- package/dist/modules/contracts.js +1 -0
- package/dist/modules/contracts.js.map +1 -1
- package/dist/notifications/incident-policy.d.ts +6 -0
- package/dist/notifications/incident-policy.d.ts.map +1 -0
- package/dist/notifications/incident-policy.js +119 -0
- package/dist/notifications/incident-policy.js.map +1 -0
- package/dist/notifications/incident-schedule.d.ts +14 -0
- package/dist/notifications/incident-schedule.d.ts.map +1 -0
- package/dist/notifications/incident-schedule.js +36 -0
- package/dist/notifications/incident-schedule.js.map +1 -0
- package/dist/notifications/incident-state.d.ts +72 -0
- package/dist/notifications/incident-state.d.ts.map +1 -0
- package/dist/notifications/incident-state.js +72 -0
- package/dist/notifications/incident-state.js.map +1 -0
- package/dist/notifications/index.d.ts +9 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +9 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/ops-job-failure-contract.d.ts +19 -0
- package/dist/notifications/ops-job-failure-contract.d.ts.map +1 -0
- package/dist/notifications/ops-job-failure-contract.js +183 -0
- package/dist/notifications/ops-job-failure-contract.js.map +1 -0
- package/dist/notifications/ops-job-failure-types.d.ts +81 -0
- package/dist/notifications/ops-job-failure-types.d.ts.map +1 -0
- package/dist/notifications/ops-job-failure-types.js +73 -0
- package/dist/notifications/ops-job-failure-types.js.map +1 -0
- package/dist/notifications/recipients-http.d.ts +66 -0
- package/dist/notifications/recipients-http.d.ts.map +1 -0
- package/dist/notifications/recipients-http.js +148 -0
- package/dist/notifications/recipients-http.js.map +1 -0
- package/dist/notifications/recipients.d.ts +50 -0
- package/dist/notifications/recipients.d.ts.map +1 -0
- package/dist/notifications/recipients.js +59 -0
- package/dist/notifications/recipients.js.map +1 -0
- package/dist/prompts/registry.d.ts +55 -0
- package/dist/prompts/registry.d.ts.map +1 -0
- package/dist/prompts/registry.js +76 -0
- package/dist/prompts/registry.js.map +1 -0
- package/dist/remote/assembly-contract.d.ts +96 -0
- package/dist/remote/assembly-contract.d.ts.map +1 -0
- package/dist/remote/assembly-contract.js +150 -0
- package/dist/remote/assembly-contract.js.map +1 -0
- package/dist/remote/contract-receipt.d.ts +36 -0
- package/dist/remote/contract-receipt.d.ts.map +1 -0
- package/dist/remote/contract-receipt.js +109 -0
- package/dist/remote/contract-receipt.js.map +1 -0
- package/dist/remote/credit-baseline.d.ts +60 -0
- package/dist/remote/credit-baseline.d.ts.map +1 -0
- package/dist/remote/credit-baseline.js +117 -0
- package/dist/remote/credit-baseline.js.map +1 -0
- package/dist/runtime/heavy-phase-queue.d.ts +101 -0
- package/dist/runtime/heavy-phase-queue.d.ts.map +1 -0
- package/dist/runtime/heavy-phase-queue.js +129 -0
- package/dist/runtime/heavy-phase-queue.js.map +1 -0
- package/dist/sessions/content-policy.d.ts +55 -0
- package/dist/sessions/content-policy.d.ts.map +1 -0
- package/dist/sessions/content-policy.js +133 -0
- package/dist/sessions/content-policy.js.map +1 -0
- package/dist/sessions/registry-admin.d.ts +19 -0
- package/dist/sessions/registry-admin.d.ts.map +1 -0
- package/dist/sessions/registry-admin.js +42 -0
- package/dist/sessions/registry-admin.js.map +1 -0
- package/dist/sessions/registry-freshness.d.ts +8 -0
- package/dist/sessions/registry-freshness.d.ts.map +1 -0
- package/dist/sessions/registry-freshness.js +108 -0
- package/dist/sessions/registry-freshness.js.map +1 -0
- package/dist/sessions/registry-ingest.d.ts +5 -0
- package/dist/sessions/registry-ingest.d.ts.map +1 -0
- package/dist/sessions/registry-ingest.js +113 -0
- package/dist/sessions/registry-ingest.js.map +1 -0
- package/dist/sessions/registry-publish.d.ts +18 -0
- package/dist/sessions/registry-publish.d.ts.map +1 -0
- package/dist/sessions/registry-publish.js +134 -0
- package/dist/sessions/registry-publish.js.map +1 -0
- package/dist/sessions/registry-store.d.ts +51 -0
- package/dist/sessions/registry-store.d.ts.map +1 -0
- package/dist/sessions/registry-store.js +134 -0
- package/dist/sessions/registry-store.js.map +1 -0
- package/dist/sessions/registry-types.d.ts +180 -0
- package/dist/sessions/registry-types.d.ts.map +1 -0
- package/dist/sessions/registry-types.js +32 -0
- package/dist/sessions/registry-types.js.map +1 -0
- package/dist/sessions/registry.d.ts +45 -0
- package/dist/sessions/registry.d.ts.map +1 -0
- package/dist/sessions/registry.js +74 -0
- package/dist/sessions/registry.js.map +1 -0
- package/dist/sessions/relay-bind.d.ts +38 -0
- package/dist/sessions/relay-bind.d.ts.map +1 -0
- package/dist/sessions/relay-bind.js +74 -0
- package/dist/sessions/relay-bind.js.map +1 -0
- package/dist/sessions/relay-brand.d.ts +2 -0
- package/dist/sessions/relay-brand.d.ts.map +1 -0
- package/dist/sessions/relay-brand.js +7 -0
- package/dist/sessions/relay-brand.js.map +1 -0
- package/dist/sessions/relay-capsule.d.ts +50 -0
- package/dist/sessions/relay-capsule.d.ts.map +1 -0
- package/dist/sessions/relay-capsule.js +72 -0
- package/dist/sessions/relay-capsule.js.map +1 -0
- package/dist/sessions/relay-chain-failure.d.ts +25 -0
- package/dist/sessions/relay-chain-failure.d.ts.map +1 -0
- package/dist/sessions/relay-chain-failure.js +23 -0
- package/dist/sessions/relay-chain-failure.js.map +1 -0
- package/dist/sessions/relay-chain.d.ts +74 -0
- package/dist/sessions/relay-chain.d.ts.map +1 -0
- package/dist/sessions/relay-chain.js +71 -0
- package/dist/sessions/relay-chain.js.map +1 -0
- package/dist/sessions/relay-composition.d.ts +8 -0
- package/dist/sessions/relay-composition.d.ts.map +1 -0
- package/dist/sessions/relay-composition.js +65 -0
- package/dist/sessions/relay-composition.js.map +1 -0
- package/dist/sessions/relay-credit.d.ts +40 -0
- package/dist/sessions/relay-credit.d.ts.map +1 -0
- package/dist/sessions/relay-credit.js +68 -0
- package/dist/sessions/relay-credit.js.map +1 -0
- package/dist/sessions/relay-engine.d.ts +19 -0
- package/dist/sessions/relay-engine.d.ts.map +1 -0
- package/dist/sessions/relay-engine.js +34 -0
- package/dist/sessions/relay-engine.js.map +1 -0
- package/dist/sessions/relay-frames.d.ts +28 -0
- package/dist/sessions/relay-frames.d.ts.map +1 -0
- package/dist/sessions/relay-frames.js +72 -0
- package/dist/sessions/relay-frames.js.map +1 -0
- package/dist/sessions/relay-lane-client.d.ts +7 -0
- package/dist/sessions/relay-lane-client.d.ts.map +1 -0
- package/dist/sessions/relay-lane-client.js +137 -0
- package/dist/sessions/relay-lane-client.js.map +1 -0
- package/dist/sessions/relay-lane-lease.d.ts +20 -0
- package/dist/sessions/relay-lane-lease.d.ts.map +1 -0
- package/dist/sessions/relay-lane-lease.js +74 -0
- package/dist/sessions/relay-lane-lease.js.map +1 -0
- package/dist/sessions/relay-lane-record.d.ts +28 -0
- package/dist/sessions/relay-lane-record.d.ts.map +1 -0
- package/dist/sessions/relay-lane-record.js +28 -0
- package/dist/sessions/relay-lane-record.js.map +1 -0
- package/dist/sessions/relay-lane-stream.d.ts +13 -0
- package/dist/sessions/relay-lane-stream.d.ts.map +1 -0
- package/dist/sessions/relay-lane-stream.js +148 -0
- package/dist/sessions/relay-lane-stream.js.map +1 -0
- package/dist/sessions/relay-routes.d.ts +368 -0
- package/dist/sessions/relay-routes.d.ts.map +1 -0
- package/dist/sessions/relay-routes.js +46 -0
- package/dist/sessions/relay-routes.js.map +1 -0
- package/dist/sessions/relay-skeleton.d.ts +4 -0
- package/dist/sessions/relay-skeleton.d.ts.map +1 -0
- package/dist/sessions/relay-skeleton.js +85 -0
- package/dist/sessions/relay-skeleton.js.map +1 -0
- package/dist/sessions/relay-types.d.ts +107 -0
- package/dist/sessions/relay-types.d.ts.map +1 -0
- package/dist/sessions/relay-types.js +2 -0
- package/dist/sessions/relay-types.js.map +1 -0
- package/dist/sessions/relay-validate.d.ts +8 -0
- package/dist/sessions/relay-validate.d.ts.map +1 -0
- package/dist/sessions/relay-validate.js +169 -0
- package/dist/sessions/relay-validate.js.map +1 -0
- package/dist/sessions/relay-wire.d.ts +8 -0
- package/dist/sessions/relay-wire.d.ts.map +1 -0
- package/dist/sessions/relay-wire.js +37 -0
- package/dist/sessions/relay-wire.js.map +1 -0
- package/dist/sessions/relay-wiring.d.ts +26 -0
- package/dist/sessions/relay-wiring.d.ts.map +1 -0
- package/dist/sessions/relay-wiring.js +13 -0
- package/dist/sessions/relay-wiring.js.map +1 -0
- package/dist/sessions/relay.d.ts +11 -0
- package/dist/sessions/relay.d.ts.map +1 -0
- package/dist/sessions/relay.js +71 -0
- package/dist/sessions/relay.js.map +1 -0
- package/dist/storage/artifact-blob.d.ts +50 -0
- package/dist/storage/artifact-blob.d.ts.map +1 -0
- package/dist/storage/artifact-blob.js +2 -0
- package/dist/storage/artifact-blob.js.map +1 -0
- package/dist/storage/descriptor.d.ts +1 -1
- package/dist/storage/errors.d.ts +1 -1
- package/dist/storage/identity/atomic-deletion.d.ts +4 -0
- package/dist/storage/identity/atomic-deletion.d.ts.map +1 -0
- package/dist/storage/identity/atomic-deletion.js +235 -0
- package/dist/storage/identity/atomic-deletion.js.map +1 -0
- package/dist/storage/identity/custody-composition.d.ts +9 -0
- package/dist/storage/identity/custody-composition.d.ts.map +1 -0
- package/dist/storage/identity/custody-composition.js +31 -0
- package/dist/storage/identity/custody-composition.js.map +1 -0
- package/dist/storage/identity/custody-delivery-record.d.ts +4 -0
- package/dist/storage/identity/custody-delivery-record.d.ts.map +1 -0
- package/dist/storage/identity/custody-delivery-record.js +11 -0
- package/dist/storage/identity/custody-delivery-record.js.map +1 -0
- package/dist/storage/identity/custody-host.d.ts +16 -0
- package/dist/storage/identity/custody-host.d.ts.map +1 -0
- package/dist/storage/identity/custody-host.js +5 -0
- package/dist/storage/identity/custody-host.js.map +1 -0
- package/dist/storage/identity/custody-import-deliveries.d.ts +6 -0
- package/dist/storage/identity/custody-import-deliveries.d.ts.map +1 -0
- package/dist/storage/identity/custody-import-deliveries.js +46 -0
- package/dist/storage/identity/custody-import-deliveries.js.map +1 -0
- package/dist/storage/identity/custody-import.d.ts +4 -0
- package/dist/storage/identity/custody-import.d.ts.map +1 -0
- package/dist/storage/identity/custody-import.js +364 -0
- package/dist/storage/identity/custody-import.js.map +1 -0
- package/dist/storage/identity/custody-journal-postgres.d.ts +125 -0
- package/dist/storage/identity/custody-journal-postgres.d.ts.map +1 -0
- package/dist/storage/identity/custody-journal-postgres.js +428 -0
- package/dist/storage/identity/custody-journal-postgres.js.map +1 -0
- package/dist/storage/identity/custody-journal-sqlite.d.ts +121 -0
- package/dist/storage/identity/custody-journal-sqlite.d.ts.map +1 -0
- package/dist/storage/identity/custody-journal-sqlite.js +345 -0
- package/dist/storage/identity/custody-journal-sqlite.js.map +1 -0
- package/dist/storage/identity/custody-lifecycle.d.ts +4 -0
- package/dist/storage/identity/custody-lifecycle.d.ts.map +1 -0
- package/dist/storage/identity/custody-lifecycle.js +42 -0
- package/dist/storage/identity/custody-lifecycle.js.map +1 -0
- package/dist/storage/identity/custody-postgres.d.ts +96 -0
- package/dist/storage/identity/custody-postgres.d.ts.map +1 -0
- package/dist/storage/identity/custody-postgres.js +726 -0
- package/dist/storage/identity/custody-postgres.js.map +1 -0
- package/dist/storage/identity/custody-records.d.ts +17 -0
- package/dist/storage/identity/custody-records.d.ts.map +1 -0
- package/dist/storage/identity/custody-records.js +260 -0
- package/dist/storage/identity/custody-records.js.map +1 -0
- package/dist/storage/identity/custody-shared.d.ts +28 -0
- package/dist/storage/identity/custody-shared.d.ts.map +1 -0
- package/dist/storage/identity/custody-shared.js +24 -0
- package/dist/storage/identity/custody-shared.js.map +1 -0
- package/dist/storage/identity/custody-sqlite.d.ts +93 -0
- package/dist/storage/identity/custody-sqlite.d.ts.map +1 -0
- package/dist/storage/identity/custody-sqlite.js +568 -0
- package/dist/storage/identity/custody-sqlite.js.map +1 -0
- package/dist/storage/identity/custody-tombstone-record.d.ts +3 -0
- package/dist/storage/identity/custody-tombstone-record.d.ts.map +1 -0
- package/dist/storage/identity/custody-tombstone-record.js +8 -0
- package/dist/storage/identity/custody-tombstone-record.js.map +1 -0
- package/dist/storage/identity/custody-transaction-guards.d.ts +16 -0
- package/dist/storage/identity/custody-transaction-guards.d.ts.map +1 -0
- package/dist/storage/identity/custody-transaction-guards.js +64 -0
- package/dist/storage/identity/custody-transaction-guards.js.map +1 -0
- package/dist/storage/identity/custody-transaction-ports.d.ts +9 -0
- package/dist/storage/identity/custody-transaction-ports.d.ts.map +1 -0
- package/dist/storage/identity/custody-transaction-ports.js +106 -0
- package/dist/storage/identity/custody-transaction-ports.js.map +1 -0
- package/dist/storage/identity/deletion-planes.d.ts +10 -0
- package/dist/storage/identity/deletion-planes.d.ts.map +1 -0
- package/dist/storage/identity/deletion-planes.js +54 -0
- package/dist/storage/identity/deletion-planes.js.map +1 -0
- package/dist/storage/identity/index.d.ts +18 -0
- package/dist/storage/identity/index.d.ts.map +1 -0
- package/dist/storage/identity/index.js +22 -0
- package/dist/storage/identity/index.js.map +1 -0
- package/dist/storage/identity/postgres.d.ts +16 -0
- package/dist/storage/identity/postgres.d.ts.map +1 -0
- package/dist/storage/identity/postgres.js +345 -0
- package/dist/storage/identity/postgres.js.map +1 -0
- package/dist/storage/identity/records.d.ts +12 -0
- package/dist/storage/identity/records.d.ts.map +1 -0
- package/dist/storage/identity/records.js +84 -0
- package/dist/storage/identity/records.js.map +1 -0
- package/dist/storage/identity/replica-sync.d.ts +4 -0
- package/dist/storage/identity/replica-sync.d.ts.map +1 -0
- package/dist/storage/identity/replica-sync.js +402 -0
- package/dist/storage/identity/replica-sync.js.map +1 -0
- package/dist/storage/identity/schema.d.ts +13 -0
- package/dist/storage/identity/schema.d.ts.map +1 -0
- package/dist/storage/identity/schema.js +418 -0
- package/dist/storage/identity/schema.js.map +1 -0
- package/dist/storage/identity/sqlite-schema.d.ts +4 -0
- package/dist/storage/identity/sqlite-schema.d.ts.map +1 -0
- package/dist/storage/identity/sqlite-schema.js +17 -0
- package/dist/storage/identity/sqlite-schema.js.map +1 -0
- package/dist/storage/identity/sqlite.d.ts +25 -0
- package/dist/storage/identity/sqlite.d.ts.map +1 -0
- package/dist/storage/identity/sqlite.js +233 -0
- package/dist/storage/identity/sqlite.js.map +1 -0
- package/dist/storage/identity/stores.d.ts +10 -0
- package/dist/storage/identity/stores.d.ts.map +1 -0
- package/dist/storage/identity/stores.js +5 -0
- package/dist/storage/identity/stores.js.map +1 -0
- package/dist/storage/identity/wiring.d.ts +20 -0
- package/dist/storage/identity/wiring.d.ts.map +1 -0
- package/dist/storage/identity/wiring.js +26 -0
- package/dist/storage/identity/wiring.js.map +1 -0
- package/dist/storage/identity/workspace-deletion.d.ts +3 -0
- package/dist/storage/identity/workspace-deletion.d.ts.map +1 -0
- package/dist/storage/identity/workspace-deletion.js +100 -0
- package/dist/storage/identity/workspace-deletion.js.map +1 -0
- package/dist/storage/index.d.ts +1 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/postgres/journal.d.ts +1 -1
- package/dist/storage/postgres/profiles.d.ts +2 -2
- package/dist/storage/postgres/scope.d.ts +1 -1
- package/dist/storage/root-facade.d.ts +1 -1
- package/dist/storage/root-journal.d.ts +1 -1
- package/dist/storage/root-profiles.d.ts +1 -1
- package/package.json +56 -4
- package/ui/AdminUsersScreen.svelte +197 -0
- package/ui/AdminUsersScreen.svelte.d.ts +4 -0
- package/ui/LoginScreen.svelte +15 -0
- package/ui/LoginScreen.svelte.d.ts +4 -0
- package/ui/MembershipDecisionsScreen.svelte +76 -0
- package/ui/MembershipDecisionsScreen.svelte.d.ts +4 -0
- package/ui/RegistrationScreen.svelte +15 -0
- package/ui/RegistrationScreen.svelte.d.ts +4 -0
- package/ui/WorkspaceMembersScreen.svelte +86 -0
- package/ui/WorkspaceMembersScreen.svelte.d.ts +4 -0
- package/ui/auth-flow.ts +44 -0
- package/ui/management-ports.ts +36 -0
- package/ui/management-transport.ts +29 -0
- package/contracts/engram-memory-neutral-contract-v1.d.ts +0 -367
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-users.js","sourceRoot":"","sources":["../../src/identity/auth-users.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAEjF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAc,EAAE;IACnD,IAAI,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,sBAAsB,CAAC,2BAA2B,CAAC,CAAC;IACjI,OAAO,IAAkB,CAAC;AAC5B,CAAC,CAAC;AACF,MAAM,GAAG,GAAG,CAAC,IAAU,EAAU,EAAE;IACjC,IAAI,CAAC,CAAC,IAAI,YAAY,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAAE,MAAM,IAAI,sBAAsB,CAAC,2BAA2B,CAAC,CAAC;IAC/H,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;AAC5B,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAI,KAAkC,EAAE,QAAqB,EAAE,KAAiB,EAAkE,EAAE;IAC/K,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IACrB,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IACnC,MAAM,gBAAgB,GAAG,KAAK,EAAE,IAAwB,EAAiB,EAAE;QACzE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;YAAC,MAAM,KAAK,CAAC,QAAQ,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K,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACzH,OAAO,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5B,CAAC;KACF,CAAC;IACF,MAAM,OAAO,GAAG,CAAC,IAAwB,EAAW,EAAE,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,QAAQ,EAAE,wBAAwB,EAAE,2BAA2B,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC5K,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE;YACtB,GAAG,KAAK,CAAC,aAAa,EAAE,cAAc;YACtC,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACvD,kBAAkB,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,KAAK,2BAA2B;mBAChF,CAAC,IAAI,CAAC,aAAa,KAAK,wBAAwB,IAAI,IAAI,CAAC,aAAa,KAAK,IAAI,IAAI,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI;YACvI,gBAAgB;SACjB,EAAE,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AuthHonoPorts, AuthHonoWebAuthnRegistrationService, AuthHonoWebAuthnAuthenticationService, AuthHonoVerifiedRegistrationResponse } from '@sentropic/auth-hono';
|
|
2
|
+
import type { IdentityAuthBindingInput } from '../identity-contracts/custody-auth.js';
|
|
3
|
+
import type { WebAuthnChallengeV1 } from '../identity-contracts/custody.js';
|
|
4
|
+
export declare const authHonoRuntime: () => typeof import("@sentropic/auth-hono");
|
|
5
|
+
export type AuthUv = 'required' | 'preferred' | 'discouraged';
|
|
6
|
+
export interface WebAuthnAttempt {
|
|
7
|
+
flow: 'registration' | 'authentication' | null;
|
|
8
|
+
completionOwner: string | null;
|
|
9
|
+
assertion?: {
|
|
10
|
+
credentialId: string;
|
|
11
|
+
newCounter: number;
|
|
12
|
+
};
|
|
13
|
+
owner: string | null;
|
|
14
|
+
registration: AuthHonoVerifiedRegistrationResponse['registrationInfo'] | undefined;
|
|
15
|
+
registrationUv: boolean;
|
|
16
|
+
issuanceUv: AuthUv;
|
|
17
|
+
}
|
|
18
|
+
export declare const authWebAuthnServices: <H>(input: IdentityAuthBindingInput<H>, ports: AuthHonoPorts, state: WebAuthnAttempt, challenge: () => WebAuthnChallengeV1 | undefined, consumeTicket: (id: string) => Promise<void>, check: () => void) => {
|
|
19
|
+
registration: AuthHonoWebAuthnRegistrationService;
|
|
20
|
+
authentication: AuthHonoWebAuthnAuthenticationService;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=auth-webauthn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-webauthn.d.ts","sourceRoot":"","sources":["../../src/identity/auth-webauthn.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,mCAAmC,EAAE,qCAAqC,EAAE,oCAAoC,EAAE,MAAM,sBAAsB,CAAC;AAC5K,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAI5E,eAAO,MAAM,eAAe,6CAA4I,CAAC;AACzK,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,CAAC;AAC9D,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,cAAc,GAAG,gBAAgB,GAAG,IAAI,CAAC;IAC/C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IACzD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,oCAAoC,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;IACnF,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,oBAAoB,aAAc,yBAAyB,CAAC,CAAC,SAAS,aAAa,SAAS,eAAe,aAC3G,MAAM,mBAAmB,GAAG,SAAS,iBAAiB,CAAC,EAAE,EAAE,MAAM,KAAK,QAAQ,IAAI,CAAC,SAAS,MAAM,IAAI,KAChH;IAAE,YAAY,EAAE,mCAAmC,CAAC;IAAC,cAAc,EAAE,qCAAqC,CAAA;CAkF5G,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { IdentityCustodyErrorV1 } from '../identity-contracts/custody-errors.js';
|
|
4
|
+
import { finishAuthCompletion, guardAuthStep, refuseWebAuthn } from './auth-abort.js';
|
|
5
|
+
export const authHonoRuntime = () => createRequire(import.meta.url)(fileURLToPath(import.meta.resolve('@sentropic/auth-hono')));
|
|
6
|
+
const strongest = (...values) => values.includes('required') ? 'required' : values.includes('preferred') ? 'preferred' : 'discouraged';
|
|
7
|
+
export const authWebAuthnServices = (input, ports, state, challenge, consumeTicket, check) => {
|
|
8
|
+
const runtime = authHonoRuntime();
|
|
9
|
+
const server = createRequire(import.meta.resolve('@sentropic/auth-hono'))('@simplewebauthn/server');
|
|
10
|
+
const uv = async (flow, id) => {
|
|
11
|
+
const user = id ? await ports.users.findById(id) : null;
|
|
12
|
+
return strongest(flow === 'registration' ? 'preferred' : 'discouraged', flow === 'registration' ? input.webAuthnPolicy.registrationUserVerification : input.webAuthnPolicy.authenticationUserVerification, user ? input.accountPolicy.resolveUserVerification?.(user) ?? (flow === 'registration' ? 'preferred' : 'required') : flow === 'registration' ? 'preferred' : 'required');
|
|
13
|
+
};
|
|
14
|
+
const verificationPolicy = async (flow, expectedChallenge) => {
|
|
15
|
+
const stored = challenge();
|
|
16
|
+
if (!stored || stored.purpose !== flow || stored.challenge !== expectedChallenge)
|
|
17
|
+
throw new IdentityCustodyErrorV1('identity_transaction_unbound');
|
|
18
|
+
const origins = stored.allowedOrigins.filter((origin) => input.rp.expectedOrigins.includes(origin));
|
|
19
|
+
if (stored.rpId !== input.rp.id || origins.length === 0)
|
|
20
|
+
refuseWebAuthn(flow, flow + '_verification_failed', flow === 'registration' ? 'Registration verification failed.' : 'Authentication verification failed.', flow === 'registration' ? 400 : 401);
|
|
21
|
+
return { expectedRPID: stored.rpId, expectedOrigin: origins, requireUserVerification: strongest(stored.userVerification, await uv(flow, state.owner)) === 'required' };
|
|
22
|
+
};
|
|
23
|
+
const registrationTimeoutMs = input.webAuthnPolicy.registrationTimeoutMs;
|
|
24
|
+
const authenticationTimeoutMs = input.webAuthnPolicy.authenticationTimeoutMs;
|
|
25
|
+
const registration = runtime.createAuthWebAuthnRegistrationService({ ports, rp: input.rp,
|
|
26
|
+
timeoutMs: registrationTimeoutMs,
|
|
27
|
+
challengeTtlSeconds: registrationTimeoutMs === undefined ? undefined : Math.max(1, Math.ceil(registrationTimeoutMs / 1000)),
|
|
28
|
+
verifyRegistrationResponse: async (args) => {
|
|
29
|
+
const policy = await verificationPolicy('registration', args.expectedChallenge);
|
|
30
|
+
let result;
|
|
31
|
+
try {
|
|
32
|
+
result = await server.verifyRegistrationResponse({ ...args, ...policy });
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return refuseWebAuthn('registration', 'registration_verification_failed', 'Registration verification failed.', 400);
|
|
36
|
+
}
|
|
37
|
+
if (result.verified && result.registrationInfo) {
|
|
38
|
+
if (policy.requireUserVerification && !result.registrationInfo.userVerified)
|
|
39
|
+
refuseWebAuthn('registration', 'registration_verification_failed', 'Registration verification failed.', 400);
|
|
40
|
+
state.registration = result.registrationInfo;
|
|
41
|
+
state.registrationUv = result.registrationInfo.userVerified;
|
|
42
|
+
}
|
|
43
|
+
return result;
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
const authentication = runtime.createAuthWebAuthnAuthenticationService({ ports, rp: input.rp,
|
|
47
|
+
timeoutMs: authenticationTimeoutMs,
|
|
48
|
+
challengeTtlSeconds: authenticationTimeoutMs === undefined ? undefined : Math.max(1, Math.ceil(authenticationTimeoutMs / 1000)),
|
|
49
|
+
verifyAuthenticationResponse: async (args) => {
|
|
50
|
+
const policy = await verificationPolicy('authentication', args.expectedChallenge);
|
|
51
|
+
let result;
|
|
52
|
+
try {
|
|
53
|
+
result = await server.verifyAuthenticationResponse({ ...args, ...policy });
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
if (policy.requireUserVerification && error instanceof Error && error.message === 'User verification required, but user could not be verified') {
|
|
57
|
+
return refuseWebAuthn('authentication', 'user_verification_required', 'User verification is required.', 403);
|
|
58
|
+
}
|
|
59
|
+
return refuseWebAuthn('authentication', 'authentication_verification_failed', 'Authentication verification failed.', 401);
|
|
60
|
+
}
|
|
61
|
+
if (result.verified && policy.requireUserVerification && !result.authenticationInfo.userVerified)
|
|
62
|
+
refuseWebAuthn('authentication', 'user_verification_required', 'User verification is required.', 403);
|
|
63
|
+
if (result.verified)
|
|
64
|
+
state.assertion = { credentialId: args.credential.id, newCounter: result.authenticationInfo.newCounter };
|
|
65
|
+
return result;
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
return {
|
|
69
|
+
registration: {
|
|
70
|
+
generateRegistrationOptions: async (value) => {
|
|
71
|
+
check();
|
|
72
|
+
state.issuanceUv = await uv('registration', value.userId);
|
|
73
|
+
const options = await registration.generateRegistrationOptions(value);
|
|
74
|
+
options.authenticatorSelection = { ...options.authenticatorSelection, userVerification: state.issuanceUv };
|
|
75
|
+
return options;
|
|
76
|
+
},
|
|
77
|
+
verifyRegistration: async (value) => {
|
|
78
|
+
check();
|
|
79
|
+
state.flow = 'registration';
|
|
80
|
+
state.owner = value.userId;
|
|
81
|
+
state.registration = undefined;
|
|
82
|
+
return finishAuthCompletion('registration', await guardAuthStep('registration', 'credential', () => registration.verifyRegistration({ ...value,
|
|
83
|
+
beforePersist: async (context) => guardAuthStep('registration', 'ticket', async () => {
|
|
84
|
+
await consumeTicket(context.userId);
|
|
85
|
+
await value.beforePersist?.(context);
|
|
86
|
+
}),
|
|
87
|
+
})));
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
authentication: {
|
|
91
|
+
generateAuthenticationOptions: async (value) => {
|
|
92
|
+
check();
|
|
93
|
+
state.issuanceUv = await uv('authentication', value.userId);
|
|
94
|
+
const options = await authentication.generateAuthenticationOptions(value);
|
|
95
|
+
options.userVerification = state.issuanceUv;
|
|
96
|
+
return options;
|
|
97
|
+
},
|
|
98
|
+
verifyAuthentication: async (value) => {
|
|
99
|
+
check();
|
|
100
|
+
state.flow = 'authentication';
|
|
101
|
+
state.owner = null;
|
|
102
|
+
state.assertion = undefined;
|
|
103
|
+
return finishAuthCompletion('authentication', await guardAuthStep('authentication', 'credential', () => authentication.verifyAuthentication(value)));
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=auth-webauthn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-webauthn.js","sourceRoot":"","sources":["../../src/identity/auth-webauthn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtF,MAAM,CAAC,MAAM,eAAe,GAAG,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C,KAAK,CAAC,UAAU,GAAG,MAAM,EAAE,CAAC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBACrE,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC;gBAC1E,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAC;gBAAC,OAAO,OAAO,CAAC;YAC9D,CAAC;YACD,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;gBACpC,KAAK,EAAE,CAAC;gBAAC,KAAK,CAAC,IAAI,GAAG,gBAAgB,CAAC;gBAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;gBAAC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;gBACxF,OAAO,oBAAoB,CAAC,gBAAgB,EAAE,MAAM,aAAa,CAAC,gBAAgB,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type PersonCascade } from '../identity-contracts/enforcement.js';
|
|
2
|
+
import type { AgentPlaneRevocationPort, IdentityAuditPort, LoginSessionStore, TenantMembershipStore, UserAccountStore } from '../identity-contracts/ports.js';
|
|
3
|
+
import type { IdentityClock } from '../identity-contracts/types.js';
|
|
4
|
+
export declare function createPersonRevocation(input: {
|
|
5
|
+
readonly accounts: UserAccountStore;
|
|
6
|
+
readonly sessions: LoginSessionStore;
|
|
7
|
+
readonly memberships: TenantMembershipStore;
|
|
8
|
+
readonly ledger: IdentityAuditPort;
|
|
9
|
+
readonly agentPlane?: AgentPlaneRevocationPort;
|
|
10
|
+
readonly clock?: IdentityClock;
|
|
11
|
+
}): PersonCascade;
|
|
12
|
+
//# sourceMappingURL=cascade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cascade.d.ts","sourceRoot":"","sources":["../../src/identity/cascade.ts"],"names":[],"mappings":"AAQA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC/F,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,WAAW,EAAE,qBAAqB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,wBAAwB,CAAC;IAC/C,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;CAChC,GAAG,aAAa,CAShB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// A2.3 identity slice: F14 person revocation composition. The cascade
|
|
2
|
+
// itself is frozen in the contracts (`createPersonCascade`); this helper
|
|
3
|
+
// binds it over the A2.1/A2.2 store ports plus this lot's durable ledger as
|
|
4
|
+
// the audit port, so every revocation is receipted per step and audited into
|
|
5
|
+
// the hash-linked ledger. The `agent_plane` step stays queued until M4 binds
|
|
6
|
+
// `AgentPlaneRevocationPort`; later planes turn `not_applicable` receipts
|
|
7
|
+
// into `applied` without amending the frozen step union.
|
|
8
|
+
import { createPersonCascade } from '../identity-contracts/enforcement.js';
|
|
9
|
+
export function createPersonRevocation(input) {
|
|
10
|
+
return createPersonCascade({
|
|
11
|
+
accounts: input.accounts,
|
|
12
|
+
sessions: input.sessions,
|
|
13
|
+
memberships: input.memberships,
|
|
14
|
+
agentPlane: input.agentPlane,
|
|
15
|
+
audit: input.ledger,
|
|
16
|
+
clock: input.clock,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=cascade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cascade.js","sourceRoot":"","sources":["../../src/identity/cascade.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,yEAAyE;AACzE,4EAA4E;AAC5E,6EAA6E;AAC7E,6EAA6E;AAC7E,0EAA0E;AAC1E,yDAAyD;AAEzD,OAAO,EAAE,mBAAmB,EAAsB,MAAM,sCAAsC,CAAC;AAU/F,MAAM,UAAU,sBAAsB,CAAC,KAOtC;IACC,OAAO,mBAAmB,CAAC;QACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ConnectorRevocationCaptureV1, ConnectorRevocationCustodyPortV1, IdentityTransactionV1, IdentityExternalRevocationV1, IdentityRevocationClaimV1 } from '../identity-contracts/custody.js';
|
|
2
|
+
import type { CustodyOpHost } from '../storage/identity/custody-host.js';
|
|
3
|
+
import type { SqliteConnection } from '../storage/sqlite/connection.js';
|
|
4
|
+
import type { PgSession } from '../storage/postgres/protocol.js';
|
|
5
|
+
export declare const CONNECTOR_CUSTODY_KEY_REF_V1 = "secret-crypto:v1";
|
|
6
|
+
export declare const deriveConnectorCustodyKeyV1: (masterKey: Uint8Array) => Uint8Array;
|
|
7
|
+
export interface ConnectorCapabilityV1 {
|
|
8
|
+
readonly tokenKind: 'access' | 'refresh';
|
|
9
|
+
readonly token: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SealedCapabilityV1 {
|
|
12
|
+
readonly custodyRef: string;
|
|
13
|
+
readonly keyRef: string;
|
|
14
|
+
readonly nonce: string;
|
|
15
|
+
readonly ciphertext: string;
|
|
16
|
+
readonly authTag: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const sealConnectorCapabilityV1: (input: {
|
|
19
|
+
readonly key: Uint8Array;
|
|
20
|
+
readonly keyRef: string;
|
|
21
|
+
readonly custodyRef: string;
|
|
22
|
+
readonly deliveryId: string;
|
|
23
|
+
readonly connectorAccountId: string;
|
|
24
|
+
readonly provider: string;
|
|
25
|
+
readonly capability: ConnectorCapabilityV1;
|
|
26
|
+
}) => SealedCapabilityV1;
|
|
27
|
+
export declare const openConnectorCapabilityV1: (input: {
|
|
28
|
+
readonly key: Uint8Array;
|
|
29
|
+
readonly keyRef: string;
|
|
30
|
+
readonly custodyRef: string;
|
|
31
|
+
readonly deliveryId: string;
|
|
32
|
+
readonly connectorAccountId: string;
|
|
33
|
+
readonly provider: string;
|
|
34
|
+
readonly nonce: string;
|
|
35
|
+
readonly ciphertext: string;
|
|
36
|
+
readonly authTag: string;
|
|
37
|
+
}) => ConnectorCapabilityV1;
|
|
38
|
+
/** Raw profile access for the custodian: one live transaction handle. */
|
|
39
|
+
export interface ConnectorCustodyRaw {
|
|
40
|
+
readonly profile: 'postgres' | 'sqlite';
|
|
41
|
+
readonly schema: string;
|
|
42
|
+
readonly session: PgSession | null;
|
|
43
|
+
readonly connection: SqliteConnection | null;
|
|
44
|
+
}
|
|
45
|
+
/** Test/production custodian factory. The custodian owns one internal copy of
|
|
46
|
+
* the derived key; `dispose()` zeroes it. Provider delivery is bound
|
|
47
|
+
* separately and never sees the key. */
|
|
48
|
+
export declare const createNodeConnectorCustody: (input: {
|
|
49
|
+
readonly keyRef?: string;
|
|
50
|
+
readonly masterKey: Uint8Array;
|
|
51
|
+
readonly disposeMasterCopy?: boolean;
|
|
52
|
+
}) => {
|
|
53
|
+
readonly keyRef: string;
|
|
54
|
+
dispose(): void;
|
|
55
|
+
captureCapability(captureInput: {
|
|
56
|
+
readonly deliveryId: string;
|
|
57
|
+
readonly connectorAccountId: string;
|
|
58
|
+
readonly provider: string;
|
|
59
|
+
readonly at: string;
|
|
60
|
+
}, raw: ConnectorCustodyRaw, source: ConnectorCapabilityV1 | null): Promise<ConnectorRevocationCaptureV1>;
|
|
61
|
+
assertCaptured(record: IdentityExternalRevocationV1, raw: ConnectorCustodyRaw): Promise<void>;
|
|
62
|
+
eraseAcknowledged(record: IdentityExternalRevocationV1, raw: ConnectorCustodyRaw): Promise<void>;
|
|
63
|
+
};
|
|
64
|
+
export type NodeConnectorCustody = ReturnType<typeof createNodeConnectorCustody>;
|
|
65
|
+
/**
|
|
66
|
+
* Acknowledges one claimed delivery and erases its connector custody row in
|
|
67
|
+
* the same transaction. Non-connector deliveries skip custody.
|
|
68
|
+
*/
|
|
69
|
+
export declare const acknowledgeIdentityRevocationV1: <H>(input: {
|
|
70
|
+
readonly tx: IdentityTransactionV1<H>;
|
|
71
|
+
readonly claim: IdentityRevocationClaimV1;
|
|
72
|
+
readonly at: string;
|
|
73
|
+
readonly connectorCustody: ConnectorRevocationCustodyPortV1<H> | null;
|
|
74
|
+
}) => Promise<void>;
|
|
75
|
+
/** Root-bound source reader must lock and read on this exact host transaction. */
|
|
76
|
+
export declare const createConnectorRevocationCustodyPortV1: (input: {
|
|
77
|
+
readonly custody: NodeConnectorCustody;
|
|
78
|
+
readonly readSource: (connectorAccountId: string, tx: IdentityTransactionV1<CustodyOpHost>) => Promise<{
|
|
79
|
+
readonly userId: string;
|
|
80
|
+
readonly workspaceId: string | null;
|
|
81
|
+
readonly provider: string;
|
|
82
|
+
readonly capability: ConnectorCapabilityV1 | null;
|
|
83
|
+
} | null>;
|
|
84
|
+
}) => ConnectorRevocationCustodyPortV1<CustodyOpHost>;
|
|
85
|
+
//# sourceMappingURL=connector-custody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector-custody.d.ts","sourceRoot":"","sources":["../../src/identity/connector-custody.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Q,4BAA4B,CAAC,CAAC;IAC1G,cAAc,CAAC,MAAM,EAAE,4BAA4B,EAAE,GAAG,EAAE,mBAAmB,GAAG,QAAQ,IAAI,CAAC,CAAC;IAC9F,iBAAiB,CAAC,MAAM,EAAE,4BAA4B,EAAE,GAAG,EAAE,mBAAmB,GAAG,QAAQ,IAAI,CAAC,CAAC;CAgGlG,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,+BAA+B,aAAoB;IAC9D,QAAQ,CAAC,EAAE,EAAE,sBAAsB,CAAC,CAAC,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,yBAAyB,CAAC;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,gBAAgB,EAAE,iCAAiC,CAAC,CAAC,GAAG,IAAI,CAAC;CACvE,KAAG,QAAQ,IAAI,CAiBf,CAAC;AAMF,kFAAkF;AAClF,eAAO,MAAM,sCAAsC,UAAW;IAC5D,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,CAAC,kBAAkB,EAAE,MAAM,EAAE,EAAE,EAAE,sBAAsB,aAAa,CAAC,KAAK,QAAQ;QACrG,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QACxF,QAAQ,CAAC,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAC;KACnD,GAAG,IAAI,CAAC,CAAC;CACX,KAAG,iCAAiC,aAAa,CAUhD,CAAC"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
// Host connector revocation custody: the new host-owned encrypted copy of the
|
|
2
|
+
// minimal revocation capability, referenced by opaque custodyRef only. CM
|
|
3
|
+
// identity/outbox rows never carry tokens or envelopes. Envelope v1 uses
|
|
4
|
+
// AES-256-GCM with a dedicated HKDF-derived key, canonical AAD and immediate
|
|
5
|
+
// erase-on-acknowledgement in the same transaction as the outbox ack.
|
|
6
|
+
import { createCipheriv, createDecipheriv, createHash, hkdfSync, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
7
|
+
import { sameRevocationTarget } from '../storage/identity/custody-delivery-record.js';
|
|
8
|
+
import { IdentityCustodyErrorV1 } from '../identity-contracts/custody-errors.js';
|
|
9
|
+
export const CONNECTOR_CUSTODY_KEY_REF_V1 = 'secret-crypto:v1';
|
|
10
|
+
const HKDF_SALT = 'sentropic-secret-custody-v1';
|
|
11
|
+
const HKDF_INFO = 'A2.0b/connector-revocation/v1';
|
|
12
|
+
const ENVELOPE_VERSION = '1';
|
|
13
|
+
export const deriveConnectorCustodyKeyV1 = (masterKey) => {
|
|
14
|
+
if (masterKey.byteLength !== 32)
|
|
15
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
16
|
+
const derived = hkdfSync('sha256', Buffer.from(masterKey), HKDF_SALT, HKDF_INFO, 32);
|
|
17
|
+
return new Uint8Array(derived);
|
|
18
|
+
};
|
|
19
|
+
const aadBytesV1 = (input) => Buffer.from(JSON.stringify(['A2.0b-connector-custody', '1', input.custodyRef, input.deliveryId, input.connectorAccountId, input.provider, input.keyRef]), 'utf8');
|
|
20
|
+
const decodeLength = (value, expectedBytes) => {
|
|
21
|
+
let decoded;
|
|
22
|
+
try {
|
|
23
|
+
decoded = Buffer.from(value, 'base64url');
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
27
|
+
}
|
|
28
|
+
if (decoded.toString('base64url') !== value)
|
|
29
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
30
|
+
if (expectedBytes !== null && decoded.byteLength !== expectedBytes) {
|
|
31
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
32
|
+
}
|
|
33
|
+
return decoded;
|
|
34
|
+
};
|
|
35
|
+
const encodeCapability = (capability) => {
|
|
36
|
+
if ((capability.tokenKind !== 'access' && capability.tokenKind !== 'refresh') || capability.token.length === 0 || capability.token.length > 4096) {
|
|
37
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
38
|
+
}
|
|
39
|
+
return Buffer.from(JSON.stringify({ tokenKind: capability.tokenKind, token: capability.token }), 'utf8');
|
|
40
|
+
};
|
|
41
|
+
const decodeCapability = (plaintext) => {
|
|
42
|
+
let parsed;
|
|
43
|
+
try {
|
|
44
|
+
parsed = JSON.parse(Buffer.from(plaintext).toString('utf8'));
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
48
|
+
}
|
|
49
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
50
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
51
|
+
const keys = Object.keys(parsed);
|
|
52
|
+
if (keys.length !== 2 || keys[0] !== 'tokenKind' || keys[1] !== 'token') {
|
|
53
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
54
|
+
}
|
|
55
|
+
const record = parsed;
|
|
56
|
+
if ((record.tokenKind !== 'access' && record.tokenKind !== 'refresh') || typeof record.token !== 'string' || record.token.length === 0) {
|
|
57
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
58
|
+
}
|
|
59
|
+
return { tokenKind: record.tokenKind, token: record.token };
|
|
60
|
+
};
|
|
61
|
+
export const sealConnectorCapabilityV1 = (input) => {
|
|
62
|
+
const plaintext = encodeCapability(input.capability);
|
|
63
|
+
const nonce = randomBytes(12);
|
|
64
|
+
try {
|
|
65
|
+
const cipher = createCipheriv('aes-256-gcm', Buffer.from(input.key), nonce);
|
|
66
|
+
cipher.setAAD(aadBytesV1(input));
|
|
67
|
+
const ciphertext = Buffer.concat([cipher.update(plaintext), cipher.final()]);
|
|
68
|
+
const authTag = cipher.getAuthTag();
|
|
69
|
+
if (ciphertext.byteLength === 0 || ciphertext.byteLength > 4096) {
|
|
70
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
custodyRef: input.custodyRef,
|
|
74
|
+
keyRef: input.keyRef,
|
|
75
|
+
nonce: nonce.toString('base64url'),
|
|
76
|
+
ciphertext: ciphertext.toString('base64url'),
|
|
77
|
+
authTag: authTag.toString('base64url'),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
plaintext.fill(0);
|
|
82
|
+
nonce.fill(0);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
export const openConnectorCapabilityV1 = (input) => {
|
|
86
|
+
const nonce = decodeLength(input.nonce, 12);
|
|
87
|
+
const authTag = decodeLength(input.authTag, 16);
|
|
88
|
+
const ciphertext = decodeLength(input.ciphertext, null);
|
|
89
|
+
if (ciphertext.byteLength === 0 || ciphertext.byteLength > 4096) {
|
|
90
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
91
|
+
}
|
|
92
|
+
let plaintext;
|
|
93
|
+
try {
|
|
94
|
+
const decipher = createDecipheriv('aes-256-gcm', Buffer.from(input.key), Buffer.from(nonce));
|
|
95
|
+
decipher.setAAD(aadBytesV1(input));
|
|
96
|
+
decipher.setAuthTag(Buffer.from(authTag));
|
|
97
|
+
plaintext = Buffer.concat([decipher.update(Buffer.from(ciphertext)), decipher.final()]);
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
nonce.fill(0);
|
|
101
|
+
authTag.fill(0);
|
|
102
|
+
ciphertext.fill(0);
|
|
103
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
return decodeCapability(new Uint8Array(plaintext.buffer, plaintext.byteOffset, plaintext.byteLength));
|
|
107
|
+
}
|
|
108
|
+
finally {
|
|
109
|
+
plaintext.fill(0);
|
|
110
|
+
nonce.fill(0);
|
|
111
|
+
authTag.fill(0);
|
|
112
|
+
ciphertext.fill(0);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const custodyTableOf = (raw) => raw.profile === 'postgres' ? `"${raw.schema}"."connector_revocation_custody"` : '"connector_revocation_custody"';
|
|
116
|
+
const pgExec = async (raw, text, values) => {
|
|
117
|
+
if (!raw.session)
|
|
118
|
+
throw new IdentityCustodyErrorV1('identity_transaction_unbound');
|
|
119
|
+
const result = await raw.session.execute({ text, values });
|
|
120
|
+
return { rows: result.rows, rowCount: result.rowCount ?? 0 };
|
|
121
|
+
};
|
|
122
|
+
const sqliteExec = (raw, text, values) => {
|
|
123
|
+
if (!raw.connection)
|
|
124
|
+
throw new IdentityCustodyErrorV1('identity_transaction_unbound');
|
|
125
|
+
const upper = text.trimStart().slice(0, 6).toUpperCase();
|
|
126
|
+
if (upper === 'SELECT') {
|
|
127
|
+
return { rows: raw.connection.prepare(text).all(...values), rowCount: 0 };
|
|
128
|
+
}
|
|
129
|
+
const result = raw.connection.prepare(text).run(...values);
|
|
130
|
+
return { rows: [], rowCount: Number(result.changes) };
|
|
131
|
+
};
|
|
132
|
+
/** Test/production custodian factory. The custodian owns one internal copy of
|
|
133
|
+
* the derived key; `dispose()` zeroes it. Provider delivery is bound
|
|
134
|
+
* separately and never sees the key. */
|
|
135
|
+
export const createNodeConnectorCustody = (input) => {
|
|
136
|
+
const keyRef = input.keyRef ?? CONNECTOR_CUSTODY_KEY_REF_V1;
|
|
137
|
+
const masterCopy = new Uint8Array(input.masterKey);
|
|
138
|
+
if (input.disposeMasterCopy === true)
|
|
139
|
+
input.masterKey.fill(0);
|
|
140
|
+
let key = deriveConnectorCustodyKeyV1(masterCopy);
|
|
141
|
+
masterCopy.fill(0);
|
|
142
|
+
const activeKey = () => {
|
|
143
|
+
if (!key)
|
|
144
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_missing');
|
|
145
|
+
return key;
|
|
146
|
+
};
|
|
147
|
+
const findByDelivery = async (deliveryId, raw) => {
|
|
148
|
+
const table = custodyTableOf(raw);
|
|
149
|
+
const result = raw.profile === 'postgres'
|
|
150
|
+
? await pgExec(raw, `SELECT * FROM ${table} WHERE "delivery_id" = $1`, [deliveryId])
|
|
151
|
+
: sqliteExec(raw, `SELECT * FROM ${table} WHERE "delivery_id" = ?`, [deliveryId]);
|
|
152
|
+
const row = result.rows[0];
|
|
153
|
+
if (!row)
|
|
154
|
+
return null;
|
|
155
|
+
return {
|
|
156
|
+
custodyRef: String(row['custody_ref']),
|
|
157
|
+
deliveryId: String(row['delivery_id']),
|
|
158
|
+
connectorAccountId: String(row['connector_account_id']),
|
|
159
|
+
provider: String(row['provider']),
|
|
160
|
+
keyRef: String(row['key_ref']),
|
|
161
|
+
nonce: String(row['nonce']),
|
|
162
|
+
ciphertext: String(row['ciphertext']),
|
|
163
|
+
authTag: String(row['auth_tag']),
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
return {
|
|
167
|
+
keyRef,
|
|
168
|
+
dispose: () => {
|
|
169
|
+
if (key) {
|
|
170
|
+
key.fill(0);
|
|
171
|
+
key = null;
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
captureCapability: async (captureInput, raw, source) => {
|
|
175
|
+
if (source === null)
|
|
176
|
+
return { kind: 'no_capability' };
|
|
177
|
+
const custodyRef = `cc-${createHash('sha256').update(captureInput.deliveryId, 'utf8').digest('hex').slice(0, 32)}`;
|
|
178
|
+
const existing = await findByDelivery(captureInput.deliveryId, raw);
|
|
179
|
+
if (existing) {
|
|
180
|
+
if (existing.connectorAccountId !== captureInput.connectorAccountId || existing.provider !== captureInput.provider) {
|
|
181
|
+
throw new IdentityCustodyErrorV1('identity_operation_conflict');
|
|
182
|
+
}
|
|
183
|
+
const opened = openConnectorCapabilityV1({ key: activeKey(), keyRef: existing.keyRef, custodyRef: existing.custodyRef, deliveryId: captureInput.deliveryId, connectorAccountId: existing.connectorAccountId, provider: existing.provider, nonce: existing.nonce, ciphertext: existing.ciphertext, authTag: existing.authTag });
|
|
184
|
+
const openedToken = Buffer.from(opened.token, 'utf8');
|
|
185
|
+
const sourceToken = Buffer.from(source.token, 'utf8');
|
|
186
|
+
const equal = opened.tokenKind === source.tokenKind && openedToken.byteLength === sourceToken.byteLength && timingSafeEqual(openedToken, sourceToken);
|
|
187
|
+
openedToken.fill(0);
|
|
188
|
+
sourceToken.fill(0);
|
|
189
|
+
if (!equal)
|
|
190
|
+
throw new IdentityCustodyErrorV1('identity_operation_conflict');
|
|
191
|
+
return { kind: 'captured', reference: { custodyRef: existing.custodyRef, deliveryId: captureInput.deliveryId, connectorAccountId: existing.connectorAccountId, provider: existing.provider, createdAt: captureInput.at } };
|
|
192
|
+
}
|
|
193
|
+
const sealed = sealConnectorCapabilityV1({ key: activeKey(), keyRef, custodyRef, deliveryId: captureInput.deliveryId, connectorAccountId: captureInput.connectorAccountId, provider: captureInput.provider, capability: source });
|
|
194
|
+
const table = custodyTableOf(raw);
|
|
195
|
+
try {
|
|
196
|
+
if (raw.profile === 'postgres') {
|
|
197
|
+
await pgExec(raw, `INSERT INTO ${table} ("custody_ref","delivery_id","connector_account_id","provider","envelope_version","key_ref","nonce","ciphertext","auth_tag","created_at") VALUES ($1,$2,$3,$4,'1',$5,$6,$7,$8,$9)`, [custodyRef, captureInput.deliveryId, captureInput.connectorAccountId, captureInput.provider, keyRef, sealed.nonce, sealed.ciphertext, sealed.authTag, captureInput.at]);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
sqliteExec(raw, `INSERT INTO ${table} ("custody_ref","delivery_id","connector_account_id","provider","envelope_version","key_ref","nonce","ciphertext","auth_tag","created_at") VALUES (?,?,?,?, '1',?,?,?,?,?)`, [custodyRef, captureInput.deliveryId, captureInput.connectorAccountId, captureInput.provider, keyRef, sealed.nonce, sealed.ciphertext, sealed.authTag, captureInput.at]);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
205
|
+
if (message.includes('23505') || message.includes('UNIQUE constraint failed')) {
|
|
206
|
+
throw new IdentityCustodyErrorV1('identity_operation_conflict');
|
|
207
|
+
}
|
|
208
|
+
throw error;
|
|
209
|
+
}
|
|
210
|
+
return { kind: 'captured', reference: { custodyRef, deliveryId: captureInput.deliveryId, connectorAccountId: captureInput.connectorAccountId, provider: captureInput.provider, createdAt: captureInput.at } };
|
|
211
|
+
},
|
|
212
|
+
assertCaptured: async (record, raw) => {
|
|
213
|
+
if (record.targetKind !== 'connector_grant')
|
|
214
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
215
|
+
const row = await findByDelivery(record.deliveryId, raw);
|
|
216
|
+
if (!row)
|
|
217
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_missing');
|
|
218
|
+
if (row.connectorAccountId !== record.targetRef || row.custodyRef !== record.custodyRef)
|
|
219
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
220
|
+
openConnectorCapabilityV1({ key: activeKey(), keyRef: row.keyRef, custodyRef: row.custodyRef, deliveryId: row.deliveryId, connectorAccountId: row.connectorAccountId, provider: row.provider, nonce: row.nonce, ciphertext: row.ciphertext, authTag: row.authTag });
|
|
221
|
+
},
|
|
222
|
+
eraseAcknowledged: async (record, raw) => {
|
|
223
|
+
if (record.state !== 'delivered' || record.targetKind !== 'connector_grant') {
|
|
224
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
225
|
+
}
|
|
226
|
+
const row = await findByDelivery(record.deliveryId, raw);
|
|
227
|
+
if (!row)
|
|
228
|
+
return;
|
|
229
|
+
if (row.connectorAccountId !== record.targetRef || row.custodyRef !== record.custodyRef)
|
|
230
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
231
|
+
const table = custodyTableOf(raw);
|
|
232
|
+
if (raw.profile === 'postgres') {
|
|
233
|
+
await pgExec(raw, `DELETE FROM ${table} WHERE "custody_ref" = $1`, [row.custodyRef]);
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
sqliteExec(raw, `DELETE FROM ${table} WHERE "custody_ref" = ?`, [row.custodyRef]);
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Acknowledges one claimed delivery and erases its connector custody row in
|
|
243
|
+
* the same transaction. Non-connector deliveries skip custody.
|
|
244
|
+
*/
|
|
245
|
+
export const acknowledgeIdentityRevocationV1 = async (input) => {
|
|
246
|
+
const { tx, claim } = input;
|
|
247
|
+
if (tx.mode !== 'write')
|
|
248
|
+
throw new IdentityCustodyErrorV1('identity_transaction_unbound');
|
|
249
|
+
const delivery = await tx.revocationOutbox.find(claim.record.deliveryId);
|
|
250
|
+
if (!delivery || !sameRevocationTarget(delivery, claim.record))
|
|
251
|
+
throw new IdentityCustodyErrorV1('identity_delivery_claim_conflict');
|
|
252
|
+
if (delivery.state === 'delivered')
|
|
253
|
+
return;
|
|
254
|
+
if (!claim.workerId || !Number.isSafeInteger(claim.claimVersion) || claim.claimVersion <= 0
|
|
255
|
+
|| delivery.claimOwner !== claim.workerId || delivery.claimVersion !== claim.claimVersion
|
|
256
|
+
|| !delivery.leaseUntil || delivery.leaseUntil <= input.at)
|
|
257
|
+
throw new IdentityCustodyErrorV1('identity_delivery_claim_conflict');
|
|
258
|
+
if (delivery.targetKind === 'connector_grant') {
|
|
259
|
+
if (!input.connectorCustody)
|
|
260
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_missing');
|
|
261
|
+
await input.connectorCustody.assertCaptured(delivery, tx);
|
|
262
|
+
}
|
|
263
|
+
await tx.revocationOutbox.acknowledge({ deliveryId: delivery.deliveryId, workerId: claim.workerId, claimVersion: claim.claimVersion, at: input.at });
|
|
264
|
+
const acknowledged = await tx.revocationOutbox.find(delivery.deliveryId);
|
|
265
|
+
if (!acknowledged || acknowledged.state !== 'delivered')
|
|
266
|
+
throw new IdentityCustodyErrorV1('identity_delivery_claim_conflict');
|
|
267
|
+
if (acknowledged.targetKind === 'connector_grant')
|
|
268
|
+
await input.connectorCustody.eraseAcknowledged(acknowledged, tx);
|
|
269
|
+
};
|
|
270
|
+
const connectorRaw = (tx) => tx.profile === 'postgres'
|
|
271
|
+
? { profile: 'postgres', schema: tx.hostTransaction.schema ?? '', session: tx.hostTransaction.raw, connection: null }
|
|
272
|
+
: { profile: 'sqlite', schema: '', session: null, connection: tx.hostTransaction.raw };
|
|
273
|
+
/** Root-bound source reader must lock and read on this exact host transaction. */
|
|
274
|
+
export const createConnectorRevocationCustodyPortV1 = (input) => ({
|
|
275
|
+
capture: async (capture, tx) => {
|
|
276
|
+
if (tx.mode !== 'write')
|
|
277
|
+
throw new IdentityCustodyErrorV1('identity_transaction_unbound');
|
|
278
|
+
const source = await input.readSource(capture.connectorAccountId, tx);
|
|
279
|
+
if (!source)
|
|
280
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_missing');
|
|
281
|
+
if (!capture.subjectId || source.userId !== capture.subjectId)
|
|
282
|
+
throw new IdentityCustodyErrorV1('identity_revocation_custody_invalid');
|
|
283
|
+
return input.custody.captureCapability({ ...capture, provider: source.provider }, connectorRaw(tx), source.capability);
|
|
284
|
+
},
|
|
285
|
+
assertCaptured: (record, tx) => input.custody.assertCaptured(record, connectorRaw(tx)),
|
|
286
|
+
eraseAcknowledged: (record, tx) => input.custody.eraseAcknowledged(record, connectorRaw(tx)),
|
|
287
|
+
});
|
|
288
|
+
//# sourceMappingURL=connector-custody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector-custody.js","sourceRoot":"","sources":["../../src/identity/connector-custody.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,0EAA0E;AAC1E,yEAAyE;AACzE,6EAA6E;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