@sentropic/cluster-mesh 0.24.0 → 0.26.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/README.md +5 -0
- 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/engram-memory/wire-adaptation.d.ts +1 -1
- package/dist/engram-memory/wire-adaptation.d.ts.map +1 -1
- package/dist/engram-memory/wire-adaptation.js +24 -8
- package/dist/engram-memory/wire-adaptation.js.map +1 -1
- 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/access.d.ts +54 -0
- package/dist/identity-contracts/access.d.ts.map +1 -0
- package/dist/identity-contracts/access.js +168 -0
- package/dist/identity-contracts/access.js.map +1 -0
- package/dist/identity-contracts/accounts.d.ts +44 -0
- package/dist/identity-contracts/accounts.d.ts.map +1 -0
- package/dist/identity-contracts/accounts.js +150 -0
- package/dist/identity-contracts/accounts.js.map +1 -0
- 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/descriptors.d.ts +12 -0
- package/dist/identity-contracts/descriptors.d.ts.map +1 -0
- package/dist/identity-contracts/descriptors.js +57 -0
- package/dist/identity-contracts/descriptors.js.map +1 -0
- package/dist/identity-contracts/doubles.d.ts +124 -0
- package/dist/identity-contracts/doubles.d.ts.map +1 -0
- package/dist/identity-contracts/doubles.js +360 -0
- package/dist/identity-contracts/doubles.js.map +1 -0
- package/dist/identity-contracts/enforcement.d.ts +27 -0
- package/dist/identity-contracts/enforcement.d.ts.map +1 -0
- package/dist/identity-contracts/enforcement.js +155 -0
- package/dist/identity-contracts/enforcement.js.map +1 -0
- package/dist/identity-contracts/errors.d.ts +71 -0
- package/dist/identity-contracts/errors.d.ts.map +1 -0
- package/dist/identity-contracts/errors.js +129 -0
- package/dist/identity-contracts/errors.js.map +1 -0
- package/dist/identity-contracts/index.d.ts +22 -0
- package/dist/identity-contracts/index.d.ts.map +1 -0
- package/dist/identity-contracts/index.js +23 -0
- package/dist/identity-contracts/index.js.map +1 -0
- 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/ports.d.ts +116 -0
- package/dist/identity-contracts/ports.d.ts.map +1 -0
- package/dist/identity-contracts/ports.js +7 -0
- package/dist/identity-contracts/ports.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/resolution.d.ts +56 -0
- package/dist/identity-contracts/resolution.d.ts.map +1 -0
- package/dist/identity-contracts/resolution.js +87 -0
- package/dist/identity-contracts/resolution.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/tenancy.d.ts +52 -0
- package/dist/identity-contracts/tenancy.d.ts.map +1 -0
- package/dist/identity-contracts/tenancy.js +171 -0
- package/dist/identity-contracts/tenancy.js.map +1 -0
- package/dist/identity-contracts/types.d.ts +253 -0
- package/dist/identity-contracts/types.d.ts.map +1 -0
- package/dist/identity-contracts/types.js +7 -0
- package/dist/identity-contracts/types.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-contracts/workspaces.d.ts +37 -0
- package/dist/identity-contracts/workspaces.d.ts.map +1 -0
- package/dist/identity-contracts/workspaces.js +118 -0
- package/dist/identity-contracts/workspaces.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 +15 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/mcp/memory-compose.d.ts +11 -0
- package/dist/integrations/mcp/memory-compose.d.ts.map +1 -0
- package/dist/integrations/mcp/memory-compose.js +79 -0
- package/dist/integrations/mcp/memory-compose.js.map +1 -0
- package/dist/integrations/mcp/memory-definition.d.ts +28 -0
- package/dist/integrations/mcp/memory-definition.d.ts.map +1 -0
- package/dist/integrations/mcp/memory-definition.js +2 -0
- package/dist/integrations/mcp/memory-definition.js.map +1 -0
- package/dist/integrations/mcp/memory-manifest.d.ts +4 -0
- package/dist/integrations/mcp/memory-manifest.d.ts.map +1 -0
- package/dist/integrations/mcp/memory-manifest.js +9 -0
- package/dist/integrations/mcp/memory-manifest.js.map +1 -0
- package/dist/integrations/mcp/memory-transport.d.ts +21 -0
- package/dist/integrations/mcp/memory-transport.d.ts.map +1 -0
- package/dist/integrations/mcp/memory-transport.js +47 -0
- package/dist/integrations/mcp/memory-transport.js.map +1 -0
- package/dist/integrations/mcp/memory.d.ts +19 -0
- package/dist/integrations/mcp/memory.d.ts.map +1 -0
- package/dist/integrations/mcp/memory.js +40 -0
- package/dist/integrations/mcp/memory.js.map +1 -0
- package/dist/loaders/mcp/index.d.ts +1 -0
- package/dist/loaders/mcp/index.d.ts.map +1 -1
- package/dist/loaders/mcp/index.js +1 -0
- package/dist/loaders/mcp/index.js.map +1 -1
- package/dist/loaders/mcp/memory.d.ts +6 -0
- package/dist/loaders/mcp/memory.d.ts.map +1 -0
- package/dist/loaders/mcp/memory.js +9 -0
- package/dist/loaders/mcp/memory.js.map +1 -0
- 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 +7 -4
- package/dist/modules/catalog.d.ts.map +1 -1
- package/dist/modules/catalog.js +24 -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 +3 -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/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/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/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/docs/memory-mcp-candidate.md +46 -0
- package/docs/memory-mcp.md +98 -0
- package/examples/memory-mcp-stdio.mjs +42 -0
- package/package.json +66 -5
- 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":"accounts.js","sourceRoot":"","sources":["../../src/identity-contracts/accounts.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,8EAA8E;AAE9E,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,mBAAmB,GAQpB,MAAM,YAAY,CAAC;AAgBpB,SAAS,gBAAgB,CAAC,IAAgB;IACxC,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,WAAW,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAIlC;IACC,MAAM,KAAK,GAAG,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0,0 +1,31 @@
|
|
|
1
|
+
import { type BoundaryDomain, type MembershipLookup } from '../boundaries.js';
|
|
2
|
+
import type { ClusterNodeId } from '../membership.js';
|
|
3
|
+
import type { TenantMembershipStore, TenantRegistryStore, WorkspaceDirectoryStore } from './ports.js';
|
|
4
|
+
import type { TenantRole } from './types.js';
|
|
5
|
+
export interface TenantBoundaryResolutionV1 {
|
|
6
|
+
/** Registry id (TenantRecord.tenantId). */
|
|
7
|
+
readonly tenantId: string;
|
|
8
|
+
/** Immutable slug (TenantRecord.slug); this is the tid on the wire. */
|
|
9
|
+
readonly tid: string;
|
|
10
|
+
readonly userId: string;
|
|
11
|
+
readonly tenantRole: TenantRole;
|
|
12
|
+
/** TenantMembershipRecord.updatedAt; keys membership-revision caches (r2 F12). */
|
|
13
|
+
readonly membershipRevision: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TenantBoundaryPortV1 {
|
|
16
|
+
resolveApproved(input: MembershipLookup): Promise<TenantBoundaryResolutionV1 | null>;
|
|
17
|
+
}
|
|
18
|
+
/** Authoritative read chain: workspace → tenant (must be active) → approved
|
|
19
|
+
membership. Attempt-agnostic: works over standalone or transaction-bound
|
|
20
|
+
(`tx.stores`) stores. No caching; fresh reads per call. */
|
|
21
|
+
export declare function createTenantBoundaryPortV1(input: {
|
|
22
|
+
readonly workspaces: WorkspaceDirectoryStore;
|
|
23
|
+
readonly tenants: TenantRegistryStore;
|
|
24
|
+
readonly memberships: TenantMembershipStore;
|
|
25
|
+
}): TenantBoundaryPortV1;
|
|
26
|
+
/** Frozen BoundaryDomain shape over the new port; tid is the tenant slug. */
|
|
27
|
+
export declare function createIdentityBoundaryDomainV1(input: {
|
|
28
|
+
readonly homeNodeId: ClusterNodeId;
|
|
29
|
+
readonly boundary: TenantBoundaryPortV1;
|
|
30
|
+
}): BoundaryDomain;
|
|
31
|
+
//# sourceMappingURL=boundary-resolution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundary-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): boundary resolution over the
|
|
2
|
+
// CM tenancy stores. Pure domain over the frozen store ports; the frozen 1.0
|
|
3
|
+
// createBoundaryDomain / ValidatedMembershipPort stay untouched (§3.2) and the
|
|
4
|
+
// app seam cut-over is lot G6. Port-level misses are null, store errors throw;
|
|
5
|
+
// the domain maps any miss to the frozen TenantBoundaryError.
|
|
6
|
+
import { TenantBoundaryError } from '../errors.js';
|
|
7
|
+
import { deriveWorkspaceReference } from '../boundaries.js';
|
|
8
|
+
/** Authoritative read chain: workspace → tenant (must be active) → approved
|
|
9
|
+
membership. Attempt-agnostic: works over standalone or transaction-bound
|
|
10
|
+
(`tx.stores`) stores. No caching; fresh reads per call. */
|
|
11
|
+
export function createTenantBoundaryPortV1(input) {
|
|
12
|
+
return {
|
|
13
|
+
async resolveApproved(lookup) {
|
|
14
|
+
const workspace = await input.workspaces.findWorkspace(lookup.workspaceId);
|
|
15
|
+
if (!workspace)
|
|
16
|
+
return null;
|
|
17
|
+
const tenant = await input.tenants.findTenant(workspace.tenantId);
|
|
18
|
+
if (!tenant || tenant.status !== 'active')
|
|
19
|
+
return null;
|
|
20
|
+
const membership = await input.memberships.findApprovedMembership(lookup.userId, workspace.tenantId);
|
|
21
|
+
if (!membership || membership.status !== 'approved' || membership.userId !== lookup.userId)
|
|
22
|
+
return null;
|
|
23
|
+
if (tenant.tenantId.trim().length === 0 || tenant.slug.trim().length === 0)
|
|
24
|
+
return null;
|
|
25
|
+
return {
|
|
26
|
+
tenantId: tenant.tenantId,
|
|
27
|
+
tid: tenant.slug,
|
|
28
|
+
userId: membership.userId,
|
|
29
|
+
tenantRole: membership.tenantRole,
|
|
30
|
+
membershipRevision: membership.updatedAt,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/** Frozen BoundaryDomain shape over the new port; tid is the tenant slug. */
|
|
36
|
+
export function createIdentityBoundaryDomainV1(input) {
|
|
37
|
+
return {
|
|
38
|
+
workspaceReference: deriveWorkspaceReference,
|
|
39
|
+
async resolve(lookup) {
|
|
40
|
+
const resolution = await input.boundary.resolveApproved(lookup);
|
|
41
|
+
if (!resolution
|
|
42
|
+
|| resolution.userId !== lookup.userId
|
|
43
|
+
|| resolution.tenantId.trim().length === 0
|
|
44
|
+
|| resolution.tid.trim().length === 0) {
|
|
45
|
+
throw new TenantBoundaryError();
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
tid: resolution.tid,
|
|
49
|
+
workspace: await deriveWorkspaceReference(lookup.workspaceId),
|
|
50
|
+
userId: resolution.userId,
|
|
51
|
+
homeNodeId: input.homeNodeId,
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=boundary-resolution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundary-resolution.js","sourceRoot":"","sources":["../../src/identity-contracts/boundary-resolution.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAC/E,8DAA8D;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAA8C,MAAM,kBAAkB,CAAC;AAoBxG;;8DAE8D;AAC9D,MAAM,UAAU,0BAA0B,CAAC,KAI1C;IACC,OAAO;QACL,KAAK,CAAC,eAAe,CAAC,MAAM;YAC1B,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YAC3E,IAAI,CAAC,SAAS;gBAAE,OAAO,IAAI,CAAC;YAC5B,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAClE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ;gBAAE,OAAO,IAAI,CAAC;YACvD,MAAM,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AAM,CAAC,WAAW,CAAC;gBAC7D,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,UAAU,EAAE,KAAK,CAAC,UAAU;aAC7B,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const IDENTITY_COMPOSITION_CONTRACT_VERSION: "1.2.0";
|
|
2
|
+
export type IdentityCompositionDomainV1 = 'boundary_resolution' | 'oauth_tenant_reads' | 'service_principal_tenancy' | 'atomic_workspace_deletion' | 'identity_replica_sync';
|
|
3
|
+
export interface IdentityCompositionDescriptorV1 {
|
|
4
|
+
readonly domain: IdentityCompositionDomainV1;
|
|
5
|
+
readonly version: typeof IDENTITY_COMPOSITION_CONTRACT_VERSION;
|
|
6
|
+
readonly baseContractVersion: '1.0.0';
|
|
7
|
+
readonly amendment: 'A4-composition-gaps';
|
|
8
|
+
readonly status: 'contract-only';
|
|
9
|
+
readonly profiles: readonly ['postgres', 'sqlite'];
|
|
10
|
+
readonly records: readonly string[];
|
|
11
|
+
readonly ports: readonly string[];
|
|
12
|
+
readonly factories: readonly string[];
|
|
13
|
+
readonly errorType: 'IdentityCustodyErrorV1';
|
|
14
|
+
}
|
|
15
|
+
export declare const IDENTITY_COMPOSITION_DESCRIPTORS: readonly IdentityCompositionDescriptorV1[];
|
|
16
|
+
export declare const identityCompositionDescriptorV1: (domain: IdentityCompositionDomainV1) => IdentityCompositionDescriptorV1 | undefined;
|
|
17
|
+
//# sourceMappingURL=composition-descriptors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition-descriptors.d.ts","sourceRoot":"","sources":["../../src/identity-contracts/composition-descriptors.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,qCAAqC,SAAmB,CAAC;AAEtE,MAAM,MAAM,2BAA2B,GACnC,qBAAqB,GACrB,oBAAoB,GACpB,2BAA2B,GAC3B,2BAA2B,GAC3B,uBAAuB,CAAC;AAE5B,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,OAAO,qCAAqC,CAAC;IAC/D,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACnD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC;CAC9C;AAED,eAAO,MAAM,gCAAgC,EAAE,SAAS,+BAA+B,EAoEtF,CAAC;AAEF,eAAO,MAAM,+BAA+B,WAClC,2BAA2B,KAClC,+BAA+B,GAAG,SACsC,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// A4 composition-gaps bundle 1.2.0 descriptors (design a4-cm-gaps-r2 §3.1).
|
|
2
|
+
// The frozen 1.0 descriptor array and the A2.0b 1.1.0/2.0.0 amendment rows are
|
|
3
|
+
// untouched; this file names the additive composition bundle only. Each
|
|
4
|
+
// parallel lot appends its own domain row; the union below is the closed set
|
|
5
|
+
// of bundle domains.
|
|
6
|
+
export const IDENTITY_COMPOSITION_CONTRACT_VERSION = '1.2.0';
|
|
7
|
+
export const IDENTITY_COMPOSITION_DESCRIPTORS = [
|
|
8
|
+
{
|
|
9
|
+
domain: 'oauth_tenant_reads',
|
|
10
|
+
version: IDENTITY_COMPOSITION_CONTRACT_VERSION,
|
|
11
|
+
baseContractVersion: '1.0.0',
|
|
12
|
+
amendment: 'A4-composition-gaps',
|
|
13
|
+
status: 'contract-only',
|
|
14
|
+
profiles: ['postgres', 'sqlite'],
|
|
15
|
+
records: ['OAuthConsentRecord', 'ServiceClientBinding'],
|
|
16
|
+
ports: ['OAuthConsentReadStoreV1', 'ServiceClientReadStoreV1', 'OAuthTenantStoreV1'],
|
|
17
|
+
factories: ['oauthTenantStoreV1', 'oauthTenantStoreV1FromStores'],
|
|
18
|
+
errorType: 'IdentityCustodyErrorV1',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
domain: 'boundary_resolution',
|
|
22
|
+
version: IDENTITY_COMPOSITION_CONTRACT_VERSION,
|
|
23
|
+
baseContractVersion: '1.0.0',
|
|
24
|
+
amendment: 'A4-composition-gaps',
|
|
25
|
+
status: 'contract-only',
|
|
26
|
+
profiles: ['postgres', 'sqlite'],
|
|
27
|
+
records: ['TenantBoundaryResolutionV1'],
|
|
28
|
+
ports: ['TenantBoundaryPortV1'],
|
|
29
|
+
factories: ['createTenantBoundaryPortV1', 'createIdentityBoundaryDomainV1'],
|
|
30
|
+
errorType: 'IdentityCustodyErrorV1',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
domain: 'service_principal_tenancy',
|
|
34
|
+
version: IDENTITY_COMPOSITION_CONTRACT_VERSION,
|
|
35
|
+
baseContractVersion: '1.0.0',
|
|
36
|
+
amendment: 'A4-composition-gaps',
|
|
37
|
+
status: 'contract-only',
|
|
38
|
+
profiles: ['postgres', 'sqlite'],
|
|
39
|
+
records: ['ServiceTidClaimV1'],
|
|
40
|
+
ports: ['ServiceTenantEnrollmentSourceV1', 'ServicePrincipalTidIssuerV1'],
|
|
41
|
+
factories: ['createServicePrincipalTidIssuerV1'],
|
|
42
|
+
errorType: 'IdentityCustodyErrorV1',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
domain: 'atomic_workspace_deletion',
|
|
46
|
+
version: IDENTITY_COMPOSITION_CONTRACT_VERSION,
|
|
47
|
+
baseContractVersion: '1.0.0',
|
|
48
|
+
amendment: 'A4-composition-gaps',
|
|
49
|
+
status: 'contract-only',
|
|
50
|
+
profiles: ['postgres', 'sqlite'],
|
|
51
|
+
records: ['WorkspaceDeletionCommandV1', 'WorkspaceDeletionReceiptV1', 'WorkspaceBusinessDeletionReceiptV1'],
|
|
52
|
+
ports: ['AtomicWorkspaceDeletionV1', 'WorkspaceDeletionAuthorizationPortV1', 'WorkspaceBusinessDeletionPortV1', 'WorkspaceDeletionPlanePortV1'],
|
|
53
|
+
factories: ['createAtomicWorkspaceDeletionV1'],
|
|
54
|
+
errorType: 'IdentityCustodyErrorV1',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
domain: 'identity_replica_sync',
|
|
58
|
+
version: IDENTITY_COMPOSITION_CONTRACT_VERSION,
|
|
59
|
+
baseContractVersion: '1.0.0',
|
|
60
|
+
amendment: 'A4-composition-gaps',
|
|
61
|
+
status: 'contract-only',
|
|
62
|
+
profiles: ['postgres', 'sqlite'],
|
|
63
|
+
records: [
|
|
64
|
+
'IdentityReplicaSyncRowV1',
|
|
65
|
+
'IdentityReplicaSyncBatchV1',
|
|
66
|
+
'IdentityReplicaSyncCountsV1',
|
|
67
|
+
'IdentityReplicaSyncReceiptV1',
|
|
68
|
+
'IdentityReplicaSyncIssueReferenceV1',
|
|
69
|
+
'IdentityReplicaSyncValidationV1',
|
|
70
|
+
],
|
|
71
|
+
ports: ['IdentityReplicaSyncPortV1', 'IdentityReplicaExportPortV1'],
|
|
72
|
+
factories: ['createIdentityReplicaSyncV1', 'createIdentityReplicaExporterV1'],
|
|
73
|
+
errorType: 'IdentityCustodyErrorV1',
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
export const identityCompositionDescriptorV1 = (domain) => IDENTITY_COMPOSITION_DESCRIPTORS.find((entry) => entry.domain === domain);
|
|
77
|
+
//# sourceMappingURL=composition-descriptors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition-descriptors.js","sourceRoot":"","sources":["../../src/identity-contracts/composition-descriptors.ts"],"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ticationService, AuthHonoMagicLinkService, AuthHonoSessionService, AuthHonoEmailVerificationService, FederationResolveInput, FederationResolveOutcome, AuthHonoRequestMagicLinkResult, AuthHonoRequestEmailCodeResult, AuthHonoVerifyRegistrationResult, AuthHonoVerifyAuthenticationResult, AuthHonoVerifyMagicLinkResult, AuthHonoVerifyEmailCodeResult } from '@sentropic/auth-hono';
|
|
2
|
+
import type { IdentityTransactionV1, IdentityDigestPortV1, IdentityLoginTokenPortV1, IdentityEmailTicketTokenPortV1, IdentityEmailCodeKeyRingV1 } from './custody.js';
|
|
3
|
+
import type { ServiceTenantEnrollmentSourceV1 } from './service-tenancy.js';
|
|
4
|
+
export type IdentityDeferredMailV1 = {
|
|
5
|
+
readonly kind: 'code';
|
|
6
|
+
readonly email: string;
|
|
7
|
+
readonly code: string;
|
|
8
|
+
readonly expiresAt: string;
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: 'magic_link';
|
|
11
|
+
readonly email: string;
|
|
12
|
+
readonly token: string;
|
|
13
|
+
readonly expiresAt: string;
|
|
14
|
+
readonly url: string;
|
|
15
|
+
};
|
|
16
|
+
export type IdentityAuthAccountPolicyV1 = Pick<AuthHonoAccountPolicyPort, 'normalizeEmail' | 'deriveDisplayName' | 'resolveUserVerification' | 'roleForNewUser' | 'statusForNewUser'>;
|
|
17
|
+
export interface IdentityAuthBusinessHooksV1<H> {
|
|
18
|
+
afterUserCreated(user: AuthHonoUserRecord, tx: IdentityTransactionV1<H>): Promise<void>;
|
|
19
|
+
provisionWorkspace(userId: string, tx: IdentityTransactionV1<H>): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export type IdentityAuthCompletionFlowV1 = 'registration' | 'authentication' | 'magic_link' | 'email_code' | 'magic_link_issue' | 'email_code_issue' | 'session_validate' | 'session_refresh' | 'social' | 'credential_rename' | 'credential_revoke' | 'social_unlink';
|
|
22
|
+
export type IdentityAuthRefusalV1 = {
|
|
23
|
+
readonly flow: 'magic_link_issue';
|
|
24
|
+
readonly result: Extract<AuthHonoRequestMagicLinkResult, {
|
|
25
|
+
success: false;
|
|
26
|
+
}>;
|
|
27
|
+
} | {
|
|
28
|
+
readonly flow: 'email_code_issue';
|
|
29
|
+
readonly result: Extract<AuthHonoRequestEmailCodeResult, {
|
|
30
|
+
success: false;
|
|
31
|
+
}>;
|
|
32
|
+
} | {
|
|
33
|
+
readonly flow: 'registration';
|
|
34
|
+
readonly result: Extract<AuthHonoVerifyRegistrationResult, {
|
|
35
|
+
verified: false;
|
|
36
|
+
}>;
|
|
37
|
+
} | {
|
|
38
|
+
readonly flow: 'authentication';
|
|
39
|
+
readonly result: Extract<AuthHonoVerifyAuthenticationResult, {
|
|
40
|
+
verified: false;
|
|
41
|
+
}>;
|
|
42
|
+
} | {
|
|
43
|
+
readonly flow: 'magic_link';
|
|
44
|
+
readonly result: Extract<AuthHonoVerifyMagicLinkResult, {
|
|
45
|
+
valid: false;
|
|
46
|
+
}>;
|
|
47
|
+
} | {
|
|
48
|
+
readonly flow: 'email_code';
|
|
49
|
+
readonly result: Extract<AuthHonoVerifyEmailCodeResult, {
|
|
50
|
+
valid: false;
|
|
51
|
+
}>;
|
|
52
|
+
} | {
|
|
53
|
+
readonly flow: 'session_validate' | 'session_refresh' | 'credential_rename';
|
|
54
|
+
readonly result: null;
|
|
55
|
+
} | {
|
|
56
|
+
readonly flow: 'credential_revoke' | 'social_unlink';
|
|
57
|
+
readonly result: false;
|
|
58
|
+
};
|
|
59
|
+
export type IdentityAuthCompletionOutcomeV1<T> = {
|
|
60
|
+
readonly committed: true;
|
|
61
|
+
readonly value: T;
|
|
62
|
+
} | {
|
|
63
|
+
readonly committed: false;
|
|
64
|
+
readonly refusal: IdentityAuthRefusalV1;
|
|
65
|
+
};
|
|
66
|
+
export interface IdentityAuthHonoTransactionBindingV1 {
|
|
67
|
+
readonly ports: AuthHonoPorts;
|
|
68
|
+
readonly registration: AuthHonoWebAuthnRegistrationService;
|
|
69
|
+
readonly authentication: AuthHonoWebAuthnAuthenticationService;
|
|
70
|
+
readonly magicLink: AuthHonoMagicLinkService;
|
|
71
|
+
resolveFederatedUser(input: FederationResolveInput): Promise<FederationResolveOutcome>;
|
|
72
|
+
readonly sessions: AuthHonoSessionService;
|
|
73
|
+
readonly emailVerification: AuthHonoEmailVerificationService;
|
|
74
|
+
readonly deferredMail: readonly IdentityDeferredMailV1[];
|
|
75
|
+
flushAudit(): Promise<void>;
|
|
76
|
+
}
|
|
77
|
+
/** Factory input shared only by the implementation modules. */
|
|
78
|
+
export interface IdentityAuthBindingInput<H> {
|
|
79
|
+
readonly tx: IdentityTransactionV1<H>;
|
|
80
|
+
readonly hostPorts: AuthHonoPorts;
|
|
81
|
+
readonly digest: IdentityDigestPortV1;
|
|
82
|
+
readonly loginTokens: IdentityLoginTokenPortV1;
|
|
83
|
+
readonly ticketTokens: IdentityEmailTicketTokenPortV1;
|
|
84
|
+
readonly emailCodeKeys: IdentityEmailCodeKeyRingV1;
|
|
85
|
+
readonly rp: AuthHonoRelyingPartyConfig;
|
|
86
|
+
readonly accountPolicy: IdentityAuthAccountPolicyV1;
|
|
87
|
+
/**
|
|
88
|
+
* Optional per-flow ceremony timeouts in milliseconds. When present, both the
|
|
89
|
+
* client-facing `timeout` and the server-side challenge TTL derive from the
|
|
90
|
+
* same value so the stored proof never outlives the ceremony the user sees.
|
|
91
|
+
* When absent, the auth service defaults apply.
|
|
92
|
+
*/
|
|
93
|
+
readonly webAuthnPolicy: {
|
|
94
|
+
readonly registrationUserVerification: 'required' | 'preferred' | 'discouraged';
|
|
95
|
+
readonly authenticationUserVerification: 'required' | 'preferred' | 'discouraged';
|
|
96
|
+
readonly registrationTimeoutMs?: number;
|
|
97
|
+
readonly authenticationTimeoutMs?: number;
|
|
98
|
+
};
|
|
99
|
+
readonly magicLink: {
|
|
100
|
+
readonly baseUrl: string;
|
|
101
|
+
readonly tokenBytes: number;
|
|
102
|
+
readonly ttlSeconds: number;
|
|
103
|
+
};
|
|
104
|
+
readonly social: {
|
|
105
|
+
readonly autoLinkProviders: readonly string[];
|
|
106
|
+
};
|
|
107
|
+
readonly business: IdentityAuthBusinessHooksV1<H>;
|
|
108
|
+
readonly trustedRegistration: {
|
|
109
|
+
readonly email: string;
|
|
110
|
+
readonly clientId: string | null;
|
|
111
|
+
} | null;
|
|
112
|
+
/**
|
|
113
|
+
* P3 (lot G3): CM-owned service-principal tenancy. When present, the binding
|
|
114
|
+
* builds `ports.serviceTenant` itself from the issuer over `tx.stores`;
|
|
115
|
+
* setting it together with `hostPorts.serviceTenant` is refused at
|
|
116
|
+
* construction. When absent, the host port passes through unchanged.
|
|
117
|
+
*/
|
|
118
|
+
readonly serviceTenancy?: {
|
|
119
|
+
readonly enrollments?: ServiceTenantEnrollmentSourceV1;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=custody-auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custody-auth.d.ts","sourceRoot":"","sources":["../../src/identity-contracts/custody-auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,0BAA0B,EACxF,mCAAmC,EAAE,qCAAqC,EAAE,wBAAwB,EACpG,sBAAsB,EAAE,gCAAgC,EAAE,sBAAsB,EAAE,wBAAwB,EAC1G,8BAA8B,EAAE,8BAA8B,EAAE,gCAAgC,EAChG,kCAAkC,EAAE,6BAA6B,EAAE,6BAA6B,EACjG,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AACtK,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AAE5E,MAAM,MAAM,sBAAsB,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;I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AQ,CAAC,SAAS,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3G,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;IACnE,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC;IAClD,QAAQ,CAAC,mBAAmB,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IAClG;;;;;OAKG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE;QAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,+BAA+B,CAAA;KAAE,CAAC;CACtF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custody-auth.js","sourceRoot":"","sources":["../../src/identity-contracts/custody-auth.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const IDENTITY_CUSTODY_CONTRACT_VERSION: "1.1.0";
|
|
2
|
+
export declare const IDENTITY_ATOMIC_DELETION_CONTRACT_VERSION: "2.0.0";
|
|
3
|
+
export type IdentityAmendmentDomainV1 = 'account_authentication_profile' | 'webauthn_custody' | 'single_use_proofs' | 'digest_invitations' | 'bound_login_sessions' | 'social_subjects' | 'authentication_completion' | 'revocation_delivery' | 'identity_import' | 'transaction_binding' | 'atomic_person_deletion';
|
|
4
|
+
export interface IdentityAmendmentDescriptorV1 {
|
|
5
|
+
readonly domain: IdentityAmendmentDomainV1;
|
|
6
|
+
readonly version: '1.1.0' | '2.0.0';
|
|
7
|
+
readonly baseContractVersion: '1.0.0';
|
|
8
|
+
readonly amendment: 'A2.0b';
|
|
9
|
+
readonly status: 'contract-only';
|
|
10
|
+
readonly profiles: readonly ['postgres', 'sqlite'];
|
|
11
|
+
readonly records: readonly string[];
|
|
12
|
+
readonly ports: readonly string[];
|
|
13
|
+
readonly factories: readonly string[];
|
|
14
|
+
readonly errorType: 'IdentityCustodyErrorV1';
|
|
15
|
+
}
|
|
16
|
+
export declare const IDENTITY_A20B_DESCRIPTORS: readonly IdentityAmendmentDescriptorV1[];
|
|
17
|
+
export declare const identityAmendmentDescriptorV1: (domain: IdentityAmendmentDomainV1) => IdentityAmendmentDescriptorV1 | undefined;
|
|
18
|
+
//# sourceMappingURL=custody-descriptors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custody-descriptors.d.ts","sourceRoot":"","sources":["../../src/identity-contracts/custody-descriptors.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iCAAiC,SAAmB,CAAC;AAClE,eAAO,MAAM,yCAAyC,SAAmB,CAAC;AAE1E,MAAM,MAAM,yBAAyB,GACjC,gCAAgC,GAChC,kBAAkB,GAClB,mBAAmB,GACnB,oBAAoB,GACpB,sBAAsB,GACtB,iBAAiB,GACjB,2BAA2B,GAC3B,qBAAqB,GACrB,iBAAiB,GACjB,qBAAqB,GACrB,wBAAwB,CAAC;AAE7B,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC;IACpC,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACnD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC;CAC9C;AAqBD,eAAO,MAAM,yBAAyB,EAAE,SAAS,6BAA6B,EAyH7E,CAAC;AAEF,eAAO,MAAM,6BAA6B,WAChC,yBAAyB,KAChC,6BAA6B,GAAG,SACiC,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// A2.0b versioned amendment descriptors. The frozen 1.0 descriptor array is
|
|
2
|
+
// untouched; these rows name the additive custody bundle (1.1.0) and the
|
|
3
|
+
// atomic deletion contract (2.0.0).
|
|
4
|
+
export const IDENTITY_CUSTODY_CONTRACT_VERSION = '1.1.0';
|
|
5
|
+
export const IDENTITY_ATOMIC_DELETION_CONTRACT_VERSION = '2.0.0';
|
|
6
|
+
const descriptor = (domain, version, records, ports, factories = []) => ({
|
|
7
|
+
domain,
|
|
8
|
+
version,
|
|
9
|
+
baseContractVersion: '1.0.0',
|
|
10
|
+
amendment: 'A2.0b',
|
|
11
|
+
status: 'contract-only',
|
|
12
|
+
profiles: ['postgres', 'sqlite'],
|
|
13
|
+
records,
|
|
14
|
+
ports,
|
|
15
|
+
factories,
|
|
16
|
+
errorType: 'IdentityCustodyErrorV1',
|
|
17
|
+
});
|
|
18
|
+
export const IDENTITY_A20B_DESCRIPTORS = [
|
|
19
|
+
descriptor('account_authentication_profile', '1.1.0', ['IdentityAccountProfileV1'], ['IdentityAccountProfileStoreV1', 'IdentitySubjectLifecyclePortV1']),
|
|
20
|
+
descriptor('webauthn_custody', '1.1.0', ['WebAuthnCredentialV1'], ['WebAuthnCredentialStoreV1']),
|
|
21
|
+
descriptor('single_use_proofs', '1.1.0', [
|
|
22
|
+
'IdentityDigestV1',
|
|
23
|
+
'SingleUseProofKindV1',
|
|
24
|
+
'SingleUseProofKeyV1',
|
|
25
|
+
'SingleUseProofBaseV1',
|
|
26
|
+
'WebAuthnChallengeV1',
|
|
27
|
+
'EmailCodeProofV1',
|
|
28
|
+
'MagicLinkProofV1',
|
|
29
|
+
'SingleUseProofV1',
|
|
30
|
+
'SingleUseProofMatchV1',
|
|
31
|
+
'EmailRegistrationTicketV1',
|
|
32
|
+
'IdentityEmailCodeKeyRingV1',
|
|
33
|
+
], [
|
|
34
|
+
'SingleUseProofStoreV1',
|
|
35
|
+
'EmailRegistrationTicketStoreV1',
|
|
36
|
+
'IdentityDigestPortV1',
|
|
37
|
+
'IdentityEmailCodeKeyRingPortV1',
|
|
38
|
+
]),
|
|
39
|
+
descriptor('digest_invitations', '1.1.0', ['DigestInvitationV1', 'IssuedDigestInvitationV1'], ['DigestInvitationStoreV1', 'IdentityDigestPortV1']),
|
|
40
|
+
descriptor('bound_login_sessions', '1.1.0', ['BoundLoginSessionV1', 'SignedLoginBindingV1', 'VerifiedLoginClaimsV1'], ['BoundLoginSessionStoreV1', 'IdentityLoginVerifierPortV1', 'IdentityLoginTokenPortV1']),
|
|
41
|
+
descriptor('social_subjects', '1.1.0', ['SocialIdentityV1'], ['SocialIdentityStoreV1']),
|
|
42
|
+
descriptor('authentication_completion', '1.1.0', ['IdentityEmailTicketClaimsV1', 'IdentityDeferredMailV1', 'IdentityAuthHonoTransactionBindingV1', 'IdentityAuthCompletionFlowV1', 'IdentityAuthRefusalV1', 'IdentityAuthCompletionOutcomeV1'], ['IdentityEmailTicketTokenPortV1', 'IdentityAuthAccountPolicyV1', 'IdentityAuthBusinessHooksV1'], ['createIdentityAuthHonoTransactionBindingV1', 'runIdentityAuthCompletionV1']),
|
|
43
|
+
descriptor('identity_import', '1.1.0', [
|
|
44
|
+
'IdentityImportRowV1',
|
|
45
|
+
'IdentityImportBatchV1',
|
|
46
|
+
'IdentityImportIssueReferenceV1',
|
|
47
|
+
'IdentityImportValidationV1',
|
|
48
|
+
'IdentityImportReceiptV1',
|
|
49
|
+
'IdentityLegacyConnectorTombstoneV1',
|
|
50
|
+
], ['IdentityCustodyImportPortV1', 'IdentityImportFencePortV1'], ['createIdentityCustodyImporterV1']),
|
|
51
|
+
descriptor('transaction_binding', '1.1.0', [
|
|
52
|
+
'IdentityIsoTimeV1',
|
|
53
|
+
'IdentitySha256HexV1',
|
|
54
|
+
'IdentityBase64UrlV1',
|
|
55
|
+
'IdentityRevisionV1',
|
|
56
|
+
'IdentityStorageProfileV1',
|
|
57
|
+
'IdentityTransactionV1',
|
|
58
|
+
'IdentityRunOptionsV1',
|
|
59
|
+
'IdentityHostRunOptionsV1',
|
|
60
|
+
'PostgresIdentityBindingV1',
|
|
61
|
+
'SqliteIdentityBindingV1',
|
|
62
|
+
'IdentityCustodyStoresV1',
|
|
63
|
+
'IdentityCustodySchemaAssetV1',
|
|
64
|
+
'IdentityCustodySchemaReceiptV1',
|
|
65
|
+
'IdentityCustodyErrorCodeV1',
|
|
66
|
+
], ['IdentityUnitOfWorkV1', 'PostgresIdentityHostV1', 'SqliteIdentityHostV1'], ['createPostgresIdentityUnitOfWorkV1', 'createSqliteIdentityUnitOfWorkV1', 'bindPostgresIdentityTransactionV1', 'bindSqliteIdentityTransactionV1', 'createPostgresIdentityCustodyStoresV1', 'createSqliteIdentityCustodyStoresV1', 'identityCustodySchemaAssetV1', 'applyPostgresIdentityCustodySchemaV1', 'applySqliteIdentityCustodySchemaV1']),
|
|
67
|
+
descriptor('revocation_delivery', '1.1.0', ['IdentityRevocationTargetKindV1', 'IdentityExternalRevocationDraftV1', 'IdentityExternalRevocationV1', 'IdentityRevocationClaimV1', 'ConnectorRevocationCustodyReferenceV1', 'ConnectorRevocationCaptureV1'], ['IdentityRevocationOutboxPortV1', 'IdentityRevocationDeliveryPortV1', 'ConnectorRevocationCustodyPortV1'], ['acknowledgeIdentityRevocationV1']),
|
|
68
|
+
descriptor('atomic_person_deletion', '2.0.0', [
|
|
69
|
+
'BusinessDeletionHandlerIdV1',
|
|
70
|
+
'PersonDeletionCommandV2',
|
|
71
|
+
'BusinessDeletionPlanV1',
|
|
72
|
+
'BusinessDeletionReceiptV1',
|
|
73
|
+
'IdentityCleanupReceiptV1',
|
|
74
|
+
'AtomicRevocationStepOutcomeV2',
|
|
75
|
+
'AtomicRevocationDetailV2',
|
|
76
|
+
'AtomicRevocationStepReceiptV2',
|
|
77
|
+
'PersonDeletionReceiptV2',
|
|
78
|
+
'IdentityDeletionOperationV2',
|
|
79
|
+
'IdentityDeletionAttemptV2',
|
|
80
|
+
], ['AtomicPersonDeletionV2', 'BusinessDeletionPortV1', 'PersonDeletionAuthorizationPortV1', 'PersonDeletionPlanePortV2', 'PersonOrphanCleanupPortV1', 'IdentityDeletionJournalPortV2'], ['createAtomicPersonDeletionV2']),
|
|
81
|
+
];
|
|
82
|
+
export const identityAmendmentDescriptorV1 = (domain) => IDENTITY_A20B_DESCRIPTORS.find((entry) => entry.domain === domain);
|
|
83
|
+
//# sourceMappingURL=custody-descriptors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custody-descriptors.js","sourceRoot":"","sources":["../../src/identity-contracts/custody-descriptors.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,yEAAyE;AACzE,oCAAoC;AAEpC,MAAM,CAAC,MAAM,iCAAiC,GAAG,OAAgB,CAAC;AAClE,MAAM,CAAC,MAAM,yCAAyC,GAAG,OAAgB,CAAC;AA4B1E,MAAM,UAAU,GAAG,CACjB,MAAiC,EACjC,OAA0B,EAC1B,OAA0B,EAC1B,KAAwB,EACxB,YAA+B,EAAE,EACF,EAAE,CAAC,CAAC;IACnC,MAAM;IACN,OAAO;IACP,mBAAmB,EAAE,OAAO;IAC5B,SAAS,EAAE,OAAO;IAClB,MAAM,EAAE,eAAe;IACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAChC,OAAO;IACP,KAAK;IACL,SAAS;IACT,SAAS,EAAE,wBAAwB;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAA6C;IACjF,UAAU,CACR,gCAAgC,EACh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AM,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type IdentityCustodyErrorCodeV1 = 'identity_contract_unavailable' | 'identity_material_invalid' | 'identity_material_missing' | 'identity_record_conflict' | 'identity_subject_retired' | 'webauthn_credential_conflict' | 'webauthn_counter_rejected' | 'webauthn_credential_stale' | 'proof_state_conflict' | 'proof_binding_mismatch' | 'login_binding_mismatch' | 'login_refresh_conflict' | 'social_subject_conflict' | 'identity_import_conflict' | 'identity_import_invalid' | 'identity_transaction_unbound' | 'identity_transaction_indeterminate' | 'identity_cascade_participant_missing' | 'identity_cascade_step_failed' | 'identity_cascade_diagnostic_failed' | 'identity_delivery_claim_conflict' | 'identity_revocation_custody_missing' | 'identity_revocation_custody_invalid' | 'identity_orphan_detected' | 'identity_operation_conflict' | 'identity_workspace_admin_required' | 'identity_sync_conflict' | 'identity_sync_invalid';
|
|
2
|
+
export declare class IdentityCustodyErrorV1 extends Error {
|
|
3
|
+
readonly code: IdentityCustodyErrorCodeV1;
|
|
4
|
+
readonly retryable: boolean;
|
|
5
|
+
readonly operationId: string | undefined;
|
|
6
|
+
constructor(code: IdentityCustodyErrorCodeV1, options?: {
|
|
7
|
+
readonly retryable?: boolean;
|
|
8
|
+
readonly operationId?: string;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export interface ScrubbedIdentityError {
|
|
12
|
+
readonly code: string;
|
|
13
|
+
readonly reason?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Log-safe projection of any thrown value. Only allowlisted codes and fixed
|
|
17
|
+
* custody messages survive; raw messages, causes, SQL parameters and driver
|
|
18
|
+
* errors are never returned.
|
|
19
|
+
*/
|
|
20
|
+
export declare const scrubIdentityErrorForLog: (error: unknown) => ScrubbedIdentityError;
|
|
21
|
+
//# sourceMappingURL=custody-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custody-errors.d.ts","sourceRoot":"","sources":["../../src/identity-contracts/custody-errors.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,0BAA0B,GAClC,+BAA+B,GAC/B,2BAA2B,GAC3B,2BAA2B,GAC3B,0BAA0B,GAC1B,0BAA0B,GAC1B,8BAA8B,GAC9B,2BAA2B,GAC3B,2BAA2B,GAC3B,sBAAsB,GACtB,wBAAwB,GACxB,wBAAwB,GACxB,wBAAwB,GACxB,yBAAyB,GACzB,0BAA0B,GAC1B,yBAAyB,GACzB,8BAA8B,GAC9B,oCAAoC,GACpC,sCAAsC,GACtC,8BAA8B,GAC9B,oCAAoC,GACpC,kCAAkC,GAClC,qCAAqC,GACrC,qCAAqC,GACrC,0BAA0B,GAC1B,6BAA6B,GAC7B,mCAAmC,GACnC,wBAAwB,GACxB,uBAAuB,CAAC;AAiC5B,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;gBAGvC,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE;CAQ5E;AAoBD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,UAAW,OAAO,KAAG,qBAUzD,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// A2.0b custody errors: one typed error for every new failure. Messages are
|
|
2
|
+
// fixed by code; they never interpolate SQL parameters, ids, emails, digests,
|
|
3
|
+
// tokens, provider subjects or custody material.
|
|
4
|
+
const FIXED_MESSAGES = {
|
|
5
|
+
identity_contract_unavailable: 'Identity custody contract is unavailable for this composition',
|
|
6
|
+
identity_material_invalid: 'Identity material is invalid',
|
|
7
|
+
identity_material_missing: 'Identity material is missing for this authentication',
|
|
8
|
+
identity_record_conflict: 'Identity record conflicts with stored material',
|
|
9
|
+
identity_subject_retired: 'Identity subject is retired',
|
|
10
|
+
webauthn_credential_conflict: 'WebAuthn credential id is already registered',
|
|
11
|
+
webauthn_counter_rejected: 'WebAuthn counter transition is rejected',
|
|
12
|
+
webauthn_credential_stale: 'WebAuthn credential snapshot is stale',
|
|
13
|
+
proof_state_conflict: 'Single-use proof revision conflicts with stored state',
|
|
14
|
+
proof_binding_mismatch: 'Single-use proof binding does not match',
|
|
15
|
+
login_binding_mismatch: 'Login binding does not match stored session material',
|
|
16
|
+
login_refresh_conflict: 'Refresh token rotation conflicts with stored material',
|
|
17
|
+
social_subject_conflict: 'Social subject is already linked to a stored account',
|
|
18
|
+
identity_import_conflict: 'Import row conflicts with stored material',
|
|
19
|
+
identity_import_invalid: 'Import row is invalid',
|
|
20
|
+
identity_transaction_unbound: 'Identity store cannot join the active transaction',
|
|
21
|
+
identity_transaction_indeterminate: 'Identity transaction outcome is indeterminate',
|
|
22
|
+
identity_cascade_participant_missing: 'Required deletion participant is missing',
|
|
23
|
+
identity_cascade_step_failed: 'Required deletion step failed',
|
|
24
|
+
identity_cascade_diagnostic_failed: 'Deletion diagnostic persistence failed',
|
|
25
|
+
identity_delivery_claim_conflict: 'Delivery claim is superseded or expired',
|
|
26
|
+
identity_revocation_custody_missing: 'Revocation custody material is missing',
|
|
27
|
+
identity_revocation_custody_invalid: 'Revocation custody material is invalid',
|
|
28
|
+
identity_orphan_detected: 'Orphan identity or business reference detected',
|
|
29
|
+
identity_operation_conflict: 'Operation id conflicts with a different command',
|
|
30
|
+
identity_workspace_admin_required: 'Workspace administration is required for this operation.',
|
|
31
|
+
identity_sync_conflict: 'Replica sync row conflicts with stored material',
|
|
32
|
+
identity_sync_invalid: 'Replica sync row is invalid',
|
|
33
|
+
};
|
|
34
|
+
export class IdentityCustodyErrorV1 extends Error {
|
|
35
|
+
code;
|
|
36
|
+
retryable;
|
|
37
|
+
operationId;
|
|
38
|
+
constructor(code, options) {
|
|
39
|
+
super(FIXED_MESSAGES[code]);
|
|
40
|
+
this.name = 'IdentityCustodyErrorV1';
|
|
41
|
+
this.code = code;
|
|
42
|
+
this.retryable = options?.retryable ?? false;
|
|
43
|
+
this.operationId = options?.operationId;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/** Allowlisted frozen error codes that may cross the log boundary. */
|
|
47
|
+
const FROZEN_LOG_ALLOWLIST = new Set([
|
|
48
|
+
'identity_not_found',
|
|
49
|
+
'identity_conflict',
|
|
50
|
+
'account_not_active',
|
|
51
|
+
'invalid_account_transition',
|
|
52
|
+
'tenant_not_active',
|
|
53
|
+
'tenant_offboard_blocked',
|
|
54
|
+
'invalid_membership_transition',
|
|
55
|
+
'invitation_invalid',
|
|
56
|
+
'login_session_invalid',
|
|
57
|
+
'device_code_invalid',
|
|
58
|
+
'workspace_already_enrolled',
|
|
59
|
+
'self_action_forbidden',
|
|
60
|
+
'admin_user_protected',
|
|
61
|
+
'proof_verification_failed',
|
|
62
|
+
]);
|
|
63
|
+
/**
|
|
64
|
+
* Log-safe projection of any thrown value. Only allowlisted codes and fixed
|
|
65
|
+
* custody messages survive; raw messages, causes, SQL parameters and driver
|
|
66
|
+
* errors are never returned.
|
|
67
|
+
*/
|
|
68
|
+
export const scrubIdentityErrorForLog = (error) => {
|
|
69
|
+
if (error instanceof IdentityCustodyErrorV1)
|
|
70
|
+
return { code: error.code };
|
|
71
|
+
if (typeof error === 'object' && error !== null && 'code' in error) {
|
|
72
|
+
const code = error.code;
|
|
73
|
+
if (typeof code === 'string' && FROZEN_LOG_ALLOWLIST.has(code)) {
|
|
74
|
+
const reason = error.reason;
|
|
75
|
+
return typeof reason === 'string' ? { code, reason } : { code };
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return { code: 'internal' };
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=custody-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custody-errors.js","sourceRoot":"","sources":["../../src/identity-contracts/custody-errors.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,8EAA8E;AAC9E,iDAAiD;AAgCjD,MAAM,cAAc,GAAyD;IAC3E,6BAA6B,EAAE,+DAA+D;IAC9F,yBAAyB,EAAE,8BAA8B;IACzD,yBAAyB,EAAE,sDAAsD;IACjF,wBAAwB,EAAE,gDAAgD;IAC1E,wBAAwB,EAAE,6BAA6B;IACvD,4BAA4B,EAAE,8CAA8C;IAC5E,yBAAyB,EAAE,yCAAyC;IACpE,yBAAyB,EAAE,uCAAuC;IAClE,oBAAoB,EAAE,uDAAuD;IAC7E,sBAAsB,EAAE,yCAAyC;IACjE,sBAAsB,EAAE,sDAAsD;IAC9E,sBAAsB,EAAE,uDAAuD;IAC/E,uBAAuB,EAAE,sDAAsD;IAC/E,wBAAwB,EAAE,2CAA2C;IACrE,uBAAuB,EAAE,uBAAuB;IAChD,4BAA4B,EAAE,mDAAmD;IACjF,kCAAkC,EAAE,+CAA+C;IACnF,oCAAoC,EAAE,0CAA0C;IAChF,4BAA4B,EAAE,+BAA+B;IAC7D,kCAAkC,EAAE,wCAAwC;IAC5E,gCAAgC,EAAE,yCAAyC;IAC3E,mCAAmC,EAAE,wCAAwC;IAC7E,mCAAmC,EAAE,wCAAwC;IAC7E,wBAAwB,EAAE,gDAAgD;IAC1E,2BAA2B,EAAE,iDAAiD;IAC9E,iCAAiC,EAAE,0DAA0D;IAC7F,sBAAsB,EAAE,iDAAiD;IACzE,qBAAqB,EAAE,6BAA6B;CACrD,CAAC;AAEF,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IACtC,IAAI,CAA6B;IACjC,SAAS,CAAU;IACnB,WAAW,CAAqB;IAEzC,YACE,IAAgC,EAChC,OAAyE;QAEzE,KAAK,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