@sentropic/cluster-mesh 0.25.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/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 +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -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/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/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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentropic/cluster-mesh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Injectable Cluster Mesh control-plane contracts, namespace modules, and single-instance runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,6 +12,34 @@
|
|
|
12
12
|
"main": "./dist/index.js",
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"exports": {
|
|
15
|
+
"./compile/contract": {
|
|
16
|
+
"types": "./dist/compile/contract/index.d.ts",
|
|
17
|
+
"import": "./dist/compile/contract/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./ui/WorkspaceMembersScreen.svelte": {
|
|
20
|
+
"types": "./ui/WorkspaceMembersScreen.svelte.d.ts", "svelte": "./ui/WorkspaceMembersScreen.svelte", "import": "./ui/WorkspaceMembersScreen.svelte"
|
|
21
|
+
},
|
|
22
|
+
"./ui/MembershipDecisionsScreen.svelte": {
|
|
23
|
+
"types": "./ui/MembershipDecisionsScreen.svelte.d.ts", "svelte": "./ui/MembershipDecisionsScreen.svelte", "import": "./ui/MembershipDecisionsScreen.svelte"
|
|
24
|
+
},
|
|
25
|
+
"./ui/AdminUsersScreen.svelte": {
|
|
26
|
+
"types": "./ui/AdminUsersScreen.svelte.d.ts", "svelte": "./ui/AdminUsersScreen.svelte", "import": "./ui/AdminUsersScreen.svelte"
|
|
27
|
+
},
|
|
28
|
+
"./ui/management": {
|
|
29
|
+
"types": "./ui/management-transport.ts", "import": "./ui/management-transport.ts"
|
|
30
|
+
},
|
|
31
|
+
"./ui/management-ports": {
|
|
32
|
+
"types": "./ui/management-ports.ts", "import": "./ui/management-ports.ts"
|
|
33
|
+
},
|
|
34
|
+
"./ui/auth-flow": {
|
|
35
|
+
"types": "./ui/auth-flow.ts", "import": "./ui/auth-flow.ts"
|
|
36
|
+
},
|
|
37
|
+
"./ui/LoginScreen.svelte": {
|
|
38
|
+
"types": "./ui/LoginScreen.svelte.d.ts", "svelte": "./ui/LoginScreen.svelte", "import": "./ui/LoginScreen.svelte"
|
|
39
|
+
},
|
|
40
|
+
"./ui/RegistrationScreen.svelte": {
|
|
41
|
+
"types": "./ui/RegistrationScreen.svelte.d.ts", "svelte": "./ui/RegistrationScreen.svelte", "import": "./ui/RegistrationScreen.svelte"
|
|
42
|
+
},
|
|
15
43
|
"./speech": {
|
|
16
44
|
"types": "./dist/speech/index.d.ts",
|
|
17
45
|
"import": "./dist/speech/index.js"
|
|
@@ -20,10 +48,18 @@
|
|
|
20
48
|
"types": "./dist/index.d.ts",
|
|
21
49
|
"import": "./dist/index.js"
|
|
22
50
|
},
|
|
51
|
+
"./identity/auth-hono": {
|
|
52
|
+
"types": "./dist/identity/auth-hono.d.ts",
|
|
53
|
+
"import": "./dist/identity/auth-hono.js"
|
|
54
|
+
},
|
|
23
55
|
"./live-storage/registration": {
|
|
24
56
|
"types": "./dist/live-storage/registration.d.ts",
|
|
25
57
|
"import": "./dist/live-storage/registration.js"
|
|
26
58
|
},
|
|
59
|
+
"./sessions/relay": {
|
|
60
|
+
"types": "./dist/sessions/relay.d.ts",
|
|
61
|
+
"import": "./dist/sessions/relay.js"
|
|
62
|
+
},
|
|
27
63
|
"./storage": {
|
|
28
64
|
"types": "./dist/storage/index.d.ts",
|
|
29
65
|
"import": "./dist/storage/index.js"
|
|
@@ -56,6 +92,14 @@
|
|
|
56
92
|
"types": "./dist/compose/comments.d.ts",
|
|
57
93
|
"import": "./dist/compose/comments.js"
|
|
58
94
|
},
|
|
95
|
+
"./notifications": {
|
|
96
|
+
"types": "./dist/notifications/index.d.ts",
|
|
97
|
+
"import": "./dist/notifications/index.js"
|
|
98
|
+
},
|
|
99
|
+
"./loaders/notifications": {
|
|
100
|
+
"types": "./dist/loaders/notifications/index.d.ts",
|
|
101
|
+
"import": "./dist/loaders/notifications/index.js"
|
|
102
|
+
},
|
|
59
103
|
"./llm-mesh": {
|
|
60
104
|
"types": "./dist/integrations/llm-mesh/index.d.ts",
|
|
61
105
|
"import": "./dist/integrations/llm-mesh/index.js"
|
|
@@ -182,6 +226,7 @@
|
|
|
182
226
|
}
|
|
183
227
|
},
|
|
184
228
|
"files": [
|
|
229
|
+
"ui",
|
|
185
230
|
"dist",
|
|
186
231
|
"examples/memory-mcp-stdio.mjs",
|
|
187
232
|
"docs/memory-mcp.md",
|
|
@@ -196,6 +241,7 @@
|
|
|
196
241
|
"access": "public"
|
|
197
242
|
},
|
|
198
243
|
"sideEffects": [
|
|
244
|
+
"./ui/*.svelte",
|
|
199
245
|
"./dist/modules/topology.js",
|
|
200
246
|
"./dist/modules/topology-guard.js",
|
|
201
247
|
"./dist/modules/topology-guard-gateway.js",
|
|
@@ -217,17 +263,23 @@
|
|
|
217
263
|
"hono": "^4.10.7"
|
|
218
264
|
},
|
|
219
265
|
"peerDependencies": {
|
|
266
|
+
"@sentropic/design-system-svelte": "^0.34.0",
|
|
267
|
+
"@sentropic/auth-ui": "^0.9.0",
|
|
268
|
+
"svelte": "^5.0.0",
|
|
220
269
|
"@sentropic/engram": ">=0.22.0 <0.23.0",
|
|
221
270
|
"@sentropic/comments": "^0.3.0",
|
|
222
|
-
"@sentropic/llm-mesh": "0.19.2 || >=0.22.0 <0.
|
|
223
|
-
"@sentropic/llm-gateway": ">=0.19.0 <0.
|
|
271
|
+
"@sentropic/llm-mesh": "0.19.2 || >=0.22.0 <0.39.0",
|
|
272
|
+
"@sentropic/llm-gateway": ">=0.19.0 <0.24.0",
|
|
224
273
|
"@sentropic/mcp-auth": ">=0.2.1 <0.3.0",
|
|
225
|
-
"@sentropic/auth-hono": "^0.15.0 || ^0.16.0 || ^0.17.0",
|
|
274
|
+
"@sentropic/auth-hono": "^0.15.0 || ^0.16.0 || ^0.17.0 || ^0.18.0",
|
|
226
275
|
"@sentropic/artifacts": ">=0.2.0 <0.3.0",
|
|
227
276
|
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
228
277
|
"jose": "^5.10.0"
|
|
229
278
|
},
|
|
230
279
|
"peerDependenciesMeta": {
|
|
280
|
+
"@sentropic/design-system-svelte": { "optional": true },
|
|
281
|
+
"@sentropic/auth-ui": { "optional": true },
|
|
282
|
+
"svelte": { "optional": true },
|
|
231
283
|
"@sentropic/engram": { "optional": true },
|
|
232
284
|
"@sentropic/comments": { "optional": true },
|
|
233
285
|
"@sentropic/llm-mesh": { "optional": true },
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
import type { IdentityManagementScreenPorts, IdentityAdminUserView as AdminUserRow } from './management-ports.js';
|
|
4
|
+
export let ports: IdentityManagementScreenPorts;
|
|
5
|
+
|
|
6
|
+
export let embeddedTitle: string | null = null;
|
|
7
|
+
|
|
8
|
+
type AccountStatus = AdminUserRow['accountStatus'];
|
|
9
|
+
type Role = AdminUserRow['role'];
|
|
10
|
+
const operations = new Map<string, string>();
|
|
11
|
+
|
|
12
|
+
let loading = false;
|
|
13
|
+
let statusFilter: AccountStatus | '' = '';
|
|
14
|
+
let roleOnApprove: Role = 'editor';
|
|
15
|
+
let items: AdminUserRow[] = [];
|
|
16
|
+
|
|
17
|
+
const t = (key: string, options?: { values?: Record<string, string> }) => ports.text(key, options);
|
|
18
|
+
|
|
19
|
+
const isAdminApp = () => ports.role === 'admin_app';
|
|
20
|
+
const isProtectedAdminUser = (u: AdminUserRow): boolean => u.role === 'admin_app' || u.role === 'admin_org';
|
|
21
|
+
const canDisable = (u: AdminUserRow): boolean => !isProtectedAdminUser(u) && u.id !== (ports.userId ?? '');
|
|
22
|
+
const isDisabled = (u: AdminUserRow): boolean => u.accountStatus === 'disabled_by_admin' || u.accountStatus === 'disabled_by_user';
|
|
23
|
+
const canDelete = (u: AdminUserRow): boolean => canDisable(u); // same safety gates, plus server requires disabled
|
|
24
|
+
|
|
25
|
+
async function load() {
|
|
26
|
+
loading = true;
|
|
27
|
+
try {
|
|
28
|
+
const data = await ports.transport.listUsers(statusFilter || undefined);
|
|
29
|
+
// Defensive: avoid keyed each crash if server returns duplicates (e.g. multiple owned workspaces).
|
|
30
|
+
const uniq = new Map<string, AdminUserRow>();
|
|
31
|
+
for (const u of data.items ?? []) {
|
|
32
|
+
if (!u?.id) continue;
|
|
33
|
+
if (!uniq.has(u.id)) uniq.set(u.id, u);
|
|
34
|
+
}
|
|
35
|
+
items = Array.from(uniq.values());
|
|
36
|
+
} catch {
|
|
37
|
+
ports.notify({ type: 'error', message: t('adminUsers.errors.load') });
|
|
38
|
+
} finally {
|
|
39
|
+
loading = false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async function approve(userId: string) {
|
|
44
|
+
try {
|
|
45
|
+
await ports.transport.approveUser(userId, roleOnApprove);
|
|
46
|
+
ports.notify({ type: 'success', message: t('adminUsers.toasts.approved') });
|
|
47
|
+
await load();
|
|
48
|
+
} catch {
|
|
49
|
+
ports.notify({ type: 'error', message: t('adminUsers.errors.approve') });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function disable(userId: string) {
|
|
54
|
+
if (!await ports.confirm(t('adminUsers.confirm.disable'))) return;
|
|
55
|
+
try {
|
|
56
|
+
await ports.transport.disableUser(userId);
|
|
57
|
+
ports.notify({ type: 'success', message: t('adminUsers.toasts.disabled') });
|
|
58
|
+
await load();
|
|
59
|
+
} catch {
|
|
60
|
+
ports.notify({ type: 'error', message: t('adminUsers.errors.disable') });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function reactivate(userId: string) {
|
|
65
|
+
try {
|
|
66
|
+
await ports.transport.reactivateUser(userId);
|
|
67
|
+
ports.notify({ type: 'success', message: t('adminUsers.toasts.reactivated') });
|
|
68
|
+
await load();
|
|
69
|
+
} catch {
|
|
70
|
+
ports.notify({ type: 'error', message: t('adminUsers.errors.reactivate') });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
async function deleteUser(u: AdminUserRow) {
|
|
75
|
+
if (!canDelete(u)) return;
|
|
76
|
+
if (!isDisabled(u)) {
|
|
77
|
+
ports.notify({ type: 'error', message: t('adminUsers.errors.mustDisableBeforeDelete') });
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (!await ports.confirm(t('adminUsers.confirm.deletePermanently', { values: { target: u.email ?? u.id } }))) return;
|
|
81
|
+
try {
|
|
82
|
+
const operationId = operations.get(u.id) ?? ports.operationId();
|
|
83
|
+
operations.set(u.id, operationId);
|
|
84
|
+
const receipt = await ports.transport.deleteUser(u.id, operationId);
|
|
85
|
+
ports.notify({ type: receipt.complete ? 'success' : 'info',
|
|
86
|
+
message: t(receipt.complete ? 'adminUsers.toasts.deleted' : 'adminUsers.toasts.deletionPending') });
|
|
87
|
+
await load();
|
|
88
|
+
} catch {
|
|
89
|
+
ports.notify({ type: 'error', message: t('adminUsers.errors.delete') });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
onMount(load);
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
{#if !ports.userId}
|
|
97
|
+
<div class="text-slate-600">{ports.text('common.loading')}</div>
|
|
98
|
+
{:else if !isAdminApp()}
|
|
99
|
+
<div class="rounded border border-slate-200 bg-white p-4">
|
|
100
|
+
<h2 class="text-sm font-semibold text-slate-800">{ports.text('adminUsers.accessDenied.title')}</h2>
|
|
101
|
+
<p class="mt-2 text-sm text-slate-600">{ports.text('adminUsers.accessDenied.body')}</p>
|
|
102
|
+
</div>
|
|
103
|
+
{:else}
|
|
104
|
+
<div class="space-y-4 rounded border border-slate-200 bg-white p-6">
|
|
105
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
106
|
+
<h2 class="text-lg font-semibold text-slate-800">{embeddedTitle ?? ports.text('adminUsers.title')}</h2>
|
|
107
|
+
<div class="ml-auto flex flex-wrap items-center gap-2">
|
|
108
|
+
<label class="text-sm text-slate-600">
|
|
109
|
+
{ports.text('common.status')}:
|
|
110
|
+
<select class="ml-2 rounded border border-slate-200 px-2 py-1" bind:value={statusFilter} on:change={load}>
|
|
111
|
+
<option value="">{ports.text('common.all')}</option>
|
|
112
|
+
<option value="pending_admin_approval">{ports.text('adminUsers.status.pending_admin_approval')}</option>
|
|
113
|
+
<option value="approval_expired_readonly">{ports.text('adminUsers.status.approval_expired_readonly')}</option>
|
|
114
|
+
<option value="active">{ports.text('adminUsers.status.active')}</option>
|
|
115
|
+
<option value="disabled_by_admin">{ports.text('adminUsers.status.disabled_by_admin')}</option>
|
|
116
|
+
<option value="disabled_by_user">{ports.text('adminUsers.status.disabled_by_user')}</option>
|
|
117
|
+
</select>
|
|
118
|
+
</label>
|
|
119
|
+
<label class="text-sm text-slate-600">
|
|
120
|
+
{ports.text('adminUsers.roleOnApprove')}:
|
|
121
|
+
<select class="ml-2 rounded border border-slate-200 px-2 py-1" bind:value={roleOnApprove}>
|
|
122
|
+
<option value="editor">{ports.text('adminUsers.role.editor')}</option>
|
|
123
|
+
<option value="guest">{ports.text('adminUsers.role.guest')}</option>
|
|
124
|
+
<option value="admin_org">{ports.text('adminUsers.role.admin_org')}</option>
|
|
125
|
+
<option value="admin_app">{ports.text('adminUsers.role.admin_app')}</option>
|
|
126
|
+
</select>
|
|
127
|
+
</label>
|
|
128
|
+
<button class="rounded bg-primary px-3 py-1.5 text-sm text-white" on:click={load} disabled={loading}>
|
|
129
|
+
{ports.text('common.refresh')}
|
|
130
|
+
</button>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div class="rounded border border-slate-200 bg-white p-4">
|
|
135
|
+
{#if loading}
|
|
136
|
+
<div class="text-sm text-slate-600">{ports.text('common.loading')}</div>
|
|
137
|
+
{:else if items.length === 0}
|
|
138
|
+
<div class="text-sm text-slate-600">{ports.text('adminUsers.empty')}</div>
|
|
139
|
+
{:else}
|
|
140
|
+
<div class="overflow-x-auto">
|
|
141
|
+
<table class="min-w-full text-sm">
|
|
142
|
+
<thead>
|
|
143
|
+
<tr class="border-b border-slate-200 text-left text-slate-600">
|
|
144
|
+
<th class="py-2 pr-3">{ports.text('common.email')}</th>
|
|
145
|
+
<th class="py-2 pr-3">{ports.text('common.name')}</th>
|
|
146
|
+
<th class="py-2 pr-3">{ports.text('common.role')}</th>
|
|
147
|
+
<th class="py-2 pr-3">{ports.text('common.status')}</th>
|
|
148
|
+
<th class="py-2 pr-3">{ports.text('adminUsers.table.emailVerified')}</th>
|
|
149
|
+
<th class="py-2 pr-3">{ports.text('common.workspace')}</th>
|
|
150
|
+
<th class="py-2 pr-3"></th>
|
|
151
|
+
</tr>
|
|
152
|
+
</thead>
|
|
153
|
+
<tbody>
|
|
154
|
+
{#each items as u (u.id)}
|
|
155
|
+
<tr class="border-b border-slate-100">
|
|
156
|
+
<td class="py-2 pr-3">{u.email ?? '—'}</td>
|
|
157
|
+
<td class="py-2 pr-3">{u.displayName ?? '—'}</td>
|
|
158
|
+
<td class="py-2 pr-3">{ports.text(`adminUsers.role.${u.role}`)}</td>
|
|
159
|
+
<td class="py-2 pr-3">{ports.text(`adminUsers.status.${u.accountStatus}`)}</td>
|
|
160
|
+
<td class="py-2 pr-3">{u.emailVerified ? ports.text('common.yes') : ports.text('common.no')}</td>
|
|
161
|
+
<td class="py-2 pr-3">{u.workspaceName ?? u.workspaceId ?? '—'}</td>
|
|
162
|
+
<td class="py-2 pr-3">
|
|
163
|
+
<div class="flex flex-wrap gap-2">
|
|
164
|
+
{#if u.accountStatus === 'pending_admin_approval' || u.accountStatus === 'approval_expired_readonly'}
|
|
165
|
+
<button class="rounded bg-emerald-600 px-2 py-1 text-white" on:click={() => approve(u.id)}>
|
|
166
|
+
{ports.text('adminUsers.actions.approve')}
|
|
167
|
+
</button>
|
|
168
|
+
{/if}
|
|
169
|
+
{#if isDisabled(u)}
|
|
170
|
+
<button class="rounded bg-amber-600 px-2 py-1 text-white" on:click={() => reactivate(u.id)}>
|
|
171
|
+
{ports.text('adminUsers.actions.reactivate')}
|
|
172
|
+
</button>
|
|
173
|
+
{/if}
|
|
174
|
+
{#if canDisable(u)}
|
|
175
|
+
{#if !isDisabled(u)}
|
|
176
|
+
<button class="rounded bg-rose-600 px-2 py-1 text-white" on:click={() => disable(u.id)}>
|
|
177
|
+
{ports.text('adminUsers.actions.disable')}
|
|
178
|
+
</button>
|
|
179
|
+
{/if}
|
|
180
|
+
{#if isDisabled(u)}
|
|
181
|
+
<button class="rounded bg-rose-700 px-2 py-1 text-white" on:click={() => deleteUser(u)}>
|
|
182
|
+
{ports.text('common.delete')}
|
|
183
|
+
</button>
|
|
184
|
+
{/if}
|
|
185
|
+
{/if}
|
|
186
|
+
</div>
|
|
187
|
+
</td>
|
|
188
|
+
</tr>
|
|
189
|
+
{/each}
|
|
190
|
+
</tbody>
|
|
191
|
+
</table>
|
|
192
|
+
</div>
|
|
193
|
+
{/if}
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
</div>
|
|
197
|
+
{/if}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SvelteComponent } from 'svelte';
|
|
2
|
+
import type { IdentityManagementScreenPorts } from './management-ports.js';
|
|
3
|
+
declare class AdminUsersScreen extends SvelteComponent<{ ports: IdentityManagementScreenPorts; embeddedTitle?: string | null }> {}
|
|
4
|
+
export default AdminUsersScreen;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import AuthLogin from '@sentropic/auth-ui/components/AuthLogin.svelte';
|
|
3
|
+
import { completeIdentityAuth, type IdentityAuthScreenPorts } from './auth-flow.js';
|
|
4
|
+
export let ports: IdentityAuthScreenPorts;
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<AuthLogin transport={ports.transport} labels={ports.labels} presetEmail={ports.presentation.email}
|
|
8
|
+
onLoggedIn={session => completeIdentityAuth(ports, session)}>
|
|
9
|
+
<a slot="no-account" href={ports.registerHref} class="text-primary focus-visible:ring-2 focus-visible:ring-primary/30">
|
|
10
|
+
{ports.labels.loginNoAccount}
|
|
11
|
+
</a>
|
|
12
|
+
<a slot="register-new-device" href={ports.registerHref} class="text-primary focus-visible:ring-2 focus-visible:ring-primary/30">
|
|
13
|
+
{ports.labels.loginRegisterNewDevice}
|
|
14
|
+
</a>
|
|
15
|
+
</AuthLogin>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Alert, Button, Input } from '@sentropic/design-system-svelte';
|
|
3
|
+
import type { IdentityManagementScreenPorts, IdentityMembershipView } from './management-ports.js';
|
|
4
|
+
export let ports: IdentityManagementScreenPorts;
|
|
5
|
+
let tenantId = '', loadedTenantId = '', loading = false, error = '', notice = '';
|
|
6
|
+
let items: IdentityMembershipView[] = [];
|
|
7
|
+
let generation = 0;
|
|
8
|
+
$: if (tenantId.trim() !== loadedTenantId) items = [];
|
|
9
|
+
|
|
10
|
+
async function load() {
|
|
11
|
+
const scope = tenantId.trim(), attempt = ++generation;
|
|
12
|
+
if (!scope) return;
|
|
13
|
+
loading = true; error = ''; notice = '';
|
|
14
|
+
try {
|
|
15
|
+
const result = await ports.transport.listMemberships(scope);
|
|
16
|
+
if (attempt === generation && tenantId.trim() === scope) { loadedTenantId = scope; items = result.items; }
|
|
17
|
+
} catch { if (attempt === generation) error = ports.text('identity.membershipLoadFailed'); }
|
|
18
|
+
finally { if (attempt === generation) loading = false; }
|
|
19
|
+
}
|
|
20
|
+
async function request() {
|
|
21
|
+
const scope = tenantId.trim();
|
|
22
|
+
if (!scope) return;
|
|
23
|
+
loading = true; error = ''; notice = '';
|
|
24
|
+
try {
|
|
25
|
+
await ports.transport.requestMembership(scope);
|
|
26
|
+
notice = ports.text('identity.requestReceived'); // Same public result for unknown tenants.
|
|
27
|
+
} catch { error = ports.text('identity.actionFailed'); }
|
|
28
|
+
finally { loading = false; }
|
|
29
|
+
}
|
|
30
|
+
async function decide(member: IdentityMembershipView, decision: 'approve' | 'reject' | 'suspend') {
|
|
31
|
+
const scope = loadedTenantId;
|
|
32
|
+
if (!scope || scope !== tenantId.trim() || (member.userId === ports.userId && decision !== 'suspend')) return;
|
|
33
|
+
loading = true; error = ''; notice = '';
|
|
34
|
+
try {
|
|
35
|
+
await ports.transport.decideMembership(scope, member.userId, decision);
|
|
36
|
+
await load();
|
|
37
|
+
} catch { error = ports.text('identity.actionFailed'); }
|
|
38
|
+
finally { loading = false; }
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<section class="space-y-4 rounded-lg border border-slate-200 bg-white p-6" aria-busy={loading}>
|
|
43
|
+
<h1 class="text-lg font-semibold text-slate-800">{ports.text('identity.membershipTitle')}</h1>
|
|
44
|
+
<p class="text-sm text-slate-600">{ports.text('identity.approvalsIndependent')}</p>
|
|
45
|
+
<form class="flex flex-wrap items-end gap-3" onsubmit={event => { event.preventDefault(); void load(); }}>
|
|
46
|
+
<Input id="cm-membership-tenant" label={ports.text('identity.tenant')} bind:value={tenantId} disabled={loading} required />
|
|
47
|
+
<Button type="submit" disabled={loading || !tenantId.trim()}>{ports.text('identity.loadDecisions')}</Button>
|
|
48
|
+
<Button type="button" variant="secondary" onclick={request} disabled={loading || !tenantId.trim()}>{ports.text('identity.requestMembership')}</Button>
|
|
49
|
+
</form>
|
|
50
|
+
{#if error}<Alert tone="error" title={error} />{/if}
|
|
51
|
+
{#if notice}<Alert tone="info" title={notice} />{/if}
|
|
52
|
+
{#if loadedTenantId && !loading && !items.length}<p>{ports.text('identity.noMemberships')}</p>{/if}
|
|
53
|
+
<div class="overflow-x-auto">
|
|
54
|
+
<table class="min-w-full text-sm">
|
|
55
|
+
<thead><tr><th class="text-left">{ports.text('identity.person')}</th><th class="text-left">{ports.text('common.status')}</th><th>{ports.text('common.role')}</th><th class="text-left">{ports.text('identity.decidedBy')}</th><th></th></tr></thead>
|
|
56
|
+
<tbody>{#each items as member (member.userId)}
|
|
57
|
+
<tr class="border-t border-slate-200">
|
|
58
|
+
<td class="p-2">{member.userId}</td><td class="p-2">{ports.text(`identity.membershipStatus.${member.status}`)}</td>
|
|
59
|
+
<td class="p-2">{ports.text(`identity.tenantRole.${member.role}`)}</td>
|
|
60
|
+
<td class="p-2">{member.decidedBy ?? '—'} {member.decidedAt ?? ''}</td>
|
|
61
|
+
<td class="flex flex-wrap gap-2 p-2">
|
|
62
|
+
{#if ['invited','requested','suspended'].includes(member.status)}
|
|
63
|
+
<Button type="button" onclick={() => decide(member, 'approve')} disabled={loading || member.userId === ports.userId}>{ports.text('adminUsers.actions.approve')}</Button>
|
|
64
|
+
{/if}
|
|
65
|
+
{#if ['invited','requested'].includes(member.status)}
|
|
66
|
+
<Button type="button" variant="secondary" onclick={() => decide(member, 'reject')} disabled={loading || member.userId === ports.userId}>{ports.text('identity.reject')}</Button>
|
|
67
|
+
{/if}
|
|
68
|
+
{#if member.status === 'approved'}
|
|
69
|
+
<Button type="button" variant="secondary" onclick={() => decide(member, 'suspend')} disabled={loading}>{ports.text('identity.suspend')}</Button>
|
|
70
|
+
{/if}
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
{/each}</tbody>
|
|
74
|
+
</table>
|
|
75
|
+
</div>
|
|
76
|
+
</section>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SvelteComponent } from 'svelte';
|
|
2
|
+
import type { IdentityManagementScreenPorts } from './management-ports.js';
|
|
3
|
+
declare class MembershipDecisionsScreen extends SvelteComponent<{ ports: IdentityManagementScreenPorts }> {}
|
|
4
|
+
export default MembershipDecisionsScreen;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import AuthRegister from '@sentropic/auth-ui/components/AuthRegister.svelte';
|
|
3
|
+
import { completeIdentityAuth, registrationScreenTransport, type IdentityAuthScreenPorts } from './auth-flow.js';
|
|
4
|
+
export let ports: IdentityAuthScreenPorts;
|
|
5
|
+
$: transport = registrationScreenTransport(ports);
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<AuthRegister {transport} labels={ports.labels} presetEmail={ports.presentation.email}
|
|
9
|
+
presetVerificationToken={ports.presentation.verificationToken}
|
|
10
|
+
skipEmailVerification={Boolean(ports.presentation.verificationToken)}
|
|
11
|
+
onRegistered={session => completeIdentityAuth(ports, session)}>
|
|
12
|
+
<a slot="login-link" href={ports.loginHref} class="text-primary focus-visible:ring-2 focus-visible:ring-primary/30">
|
|
13
|
+
{ports.labels.registerAlreadyHaveAccount}
|
|
14
|
+
</a>
|
|
15
|
+
</AuthRegister>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
import { Alert, Button, Input } from '@sentropic/design-system-svelte';
|
|
4
|
+
import type { IdentityManagementScreenPorts, IdentityWorkspaceMemberView } from './management-ports.js';
|
|
5
|
+
export let ports: IdentityManagementScreenPorts;
|
|
6
|
+
export let workspaceId: string;
|
|
7
|
+
export let refreshVersion = 0;
|
|
8
|
+
const roles = ['viewer', 'commenter', 'editor', 'admin'];
|
|
9
|
+
let items: IdentityWorkspaceMemberView[] = [], email = '', role = 'viewer', error = '', busy = false;
|
|
10
|
+
let mounted = false, requestedKey = '', loadedScope = '', generation = 0;
|
|
11
|
+
$: scopeKey = JSON.stringify([workspaceId, refreshVersion, ports.userId]);
|
|
12
|
+
$: canManage = items.some(member => member.userId === ports.userId && member.role === 'admin');
|
|
13
|
+
$: if (mounted && scopeKey !== requestedKey) { requestedKey = scopeKey; void load(workspaceId); }
|
|
14
|
+
onMount(() => { mounted = true; return () => { mounted = false; generation++; }; });
|
|
15
|
+
|
|
16
|
+
async function load(scope: string) {
|
|
17
|
+
const attempt = ++generation;
|
|
18
|
+
items = []; loadedScope = ''; error = '';
|
|
19
|
+
if (!scope) return;
|
|
20
|
+
busy = true;
|
|
21
|
+
try {
|
|
22
|
+
const result = await ports.transport.listMembers(scope);
|
|
23
|
+
if (attempt === generation && workspaceId === scope) { items = result.items; loadedScope = scope; }
|
|
24
|
+
} catch { if (attempt === generation) error = ports.text('workspaceSettings.errors.loadMembers'); }
|
|
25
|
+
finally { if (attempt === generation) busy = false; }
|
|
26
|
+
}
|
|
27
|
+
async function perform(scope: string, operation: () => Promise<void>, toastKey: string) {
|
|
28
|
+
if (busy || loadedScope !== scope || workspaceId !== scope || !canManage) return;
|
|
29
|
+
busy = true; error = '';
|
|
30
|
+
try {
|
|
31
|
+
await operation();
|
|
32
|
+
ports.notify({ type: 'success', message: ports.text(toastKey) });
|
|
33
|
+
await ports.refreshWorkspaceScope?.();
|
|
34
|
+
if (workspaceId === scope) await load(scope);
|
|
35
|
+
} catch { error = ports.text('identity.actionFailed'); }
|
|
36
|
+
finally { busy = false; }
|
|
37
|
+
}
|
|
38
|
+
async function add() {
|
|
39
|
+
const scope = workspaceId, address = email.trim(), selectedRole = role;
|
|
40
|
+
if (!address) return;
|
|
41
|
+
await perform(scope, () => ports.transport.addMember(scope, address, selectedRole), 'workspaceSettings.toasts.memberAdded');
|
|
42
|
+
}
|
|
43
|
+
async function changeRole(event: Event, member: IdentityWorkspaceMemberView) {
|
|
44
|
+
const select = event.currentTarget;
|
|
45
|
+
if (!(select instanceof HTMLSelectElement) || member.userId === ports.userId) return;
|
|
46
|
+
const selectedRole = select.value, scope = workspaceId;
|
|
47
|
+
select.value = member.role; // Display only committed authority.
|
|
48
|
+
await perform(scope, () => ports.transport.setMemberRole(scope, member.userId, selectedRole), 'workspaceSettings.toasts.roleUpdated');
|
|
49
|
+
}
|
|
50
|
+
async function remove(member: IdentityWorkspaceMemberView) {
|
|
51
|
+
const scope = workspaceId;
|
|
52
|
+
if (member.userId === ports.userId || !await ports.confirm(ports.text('workspaceSettings.confirm.removeMember'))) return;
|
|
53
|
+
await perform(scope, () => ports.transport.removeMember(scope, member.userId), 'workspaceSettings.toasts.memberRemoved');
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<section class="space-y-4 rounded-lg border border-slate-200 bg-white p-4" aria-busy={busy}>
|
|
58
|
+
<h4 class="font-medium">{ports.text('workspaceSettings.members.title')}</h4>
|
|
59
|
+
{#if error}<Alert tone="error" title={error} />{/if}
|
|
60
|
+
{#if canManage}
|
|
61
|
+
<form class="flex flex-wrap items-end gap-2" onsubmit={event => { event.preventDefault(); void add(); }}>
|
|
62
|
+
<Input id="cm-member-email" label={ports.text('common.email')} type="email" bind:value={email} disabled={busy} required />
|
|
63
|
+
<label class="text-sm">{ports.text('common.role')}
|
|
64
|
+
<select class="rounded border border-slate-300 px-3 py-2" bind:value={role} disabled={busy}>
|
|
65
|
+
{#each roles as value}<option value={value}>{ports.text(`roles.${value}`)}</option>{/each}
|
|
66
|
+
</select>
|
|
67
|
+
</label>
|
|
68
|
+
<Button type="submit" disabled={busy || !email.trim()}>{ports.text('common.add')}</Button>
|
|
69
|
+
</form>
|
|
70
|
+
{/if}
|
|
71
|
+
<div class="overflow-x-auto"><table class="min-w-full text-sm">
|
|
72
|
+
<thead><tr><th class="text-left">{ports.text('common.email')}</th><th class="text-left">{ports.text('common.name')}</th><th>{ports.text('common.role')}</th><th></th></tr></thead>
|
|
73
|
+
<tbody>{#each items as member (member.userId)}
|
|
74
|
+
<tr class="border-t border-slate-200">
|
|
75
|
+
<td class="p-2">{member.email ?? '—'}</td><td class="p-2">{member.displayName ?? '—'}</td>
|
|
76
|
+
<td class="p-2"><select class="rounded border border-slate-300 px-3 py-2" value={member.role}
|
|
77
|
+
aria-label={ports.text('common.role')} onchange={event => changeRole(event, member)} disabled={busy || !canManage || member.userId === ports.userId}>
|
|
78
|
+
{#each roles as value}<option value={value}>{ports.text(`roles.${value}`)}</option>{/each}
|
|
79
|
+
</select></td>
|
|
80
|
+
<td class="p-2">{#if canManage && member.userId !== ports.userId}
|
|
81
|
+
<Button type="button" variant="secondary" onclick={() => remove(member)} disabled={busy}>{ports.text('workspaceSettings.members.remove')}</Button>
|
|
82
|
+
{/if}</td>
|
|
83
|
+
</tr>
|
|
84
|
+
{/each}</tbody>
|
|
85
|
+
</table></div>
|
|
86
|
+
</section>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SvelteComponent } from 'svelte';
|
|
2
|
+
import type { IdentityManagementScreenPorts } from './management-ports.js';
|
|
3
|
+
declare class WorkspaceMembersScreen extends SvelteComponent<{ ports: IdentityManagementScreenPorts; workspaceId: string; refreshVersion?: number }> {}
|
|
4
|
+
export default WorkspaceMembersScreen;
|
package/ui/auth-flow.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { AuthUiLabels, AuthUiSession, AuthUiTransport } from '@sentropic/auth-ui';
|
|
2
|
+
|
|
3
|
+
export interface IdentityAuthPresentation {
|
|
4
|
+
readonly email?: string;
|
|
5
|
+
readonly verificationToken?: string;
|
|
6
|
+
readonly oauthContinuation?: string;
|
|
7
|
+
readonly returnPath?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IdentityAuthScreenPorts {
|
|
10
|
+
readonly transport: AuthUiTransport;
|
|
11
|
+
readonly labels: AuthUiLabels;
|
|
12
|
+
readonly presentation: IdentityAuthPresentation;
|
|
13
|
+
readonly loginHref: string;
|
|
14
|
+
readonly registerHref: string;
|
|
15
|
+
commitSession(session: AuthUiSession): void | Promise<void>;
|
|
16
|
+
navigate(path: string): void | Promise<void>;
|
|
17
|
+
resumeOAuth(continuation: string): void | Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Presentation is never authority; the server verifies the sealed continuation. */
|
|
21
|
+
export const registrationScreenTransport = (ports: IdentityAuthScreenPorts): AuthUiTransport => {
|
|
22
|
+
const present = <T>(input: T) => ({ ...input, oauthContinuation: ports.presentation.oauthContinuation });
|
|
23
|
+
return { ...ports.transport,
|
|
24
|
+
createPasskeyRegistrationOptions: input => ports.transport.createPasskeyRegistrationOptions(present(input)),
|
|
25
|
+
verifyPasskeyRegistration: input => ports.transport.verifyPasskeyRegistration(present(input)),
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export async function completeIdentityAuth(ports: IdentityAuthScreenPorts, session: AuthUiSession): Promise<void> {
|
|
30
|
+
await ports.commitSession(session);
|
|
31
|
+
if (ports.presentation.oauthContinuation) {
|
|
32
|
+
await ports.resumeOAuth(ports.presentation.oauthContinuation);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const path = ports.presentation.returnPath;
|
|
36
|
+
let target = '/neutral';
|
|
37
|
+
if (path?.startsWith('/')) {
|
|
38
|
+
try {
|
|
39
|
+
const url = new URL(path, 'https://identity.invalid');
|
|
40
|
+
if (url.origin === 'https://identity.invalid') target = `${url.pathname}${url.search}${url.hash}`;
|
|
41
|
+
} catch { /* Invalid presentation returns to the fixed internal page. */ }
|
|
42
|
+
}
|
|
43
|
+
await ports.navigate(target);
|
|
44
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type IdentityScreenText = (key: string, options?: { values?: Record<string, string> }) => string;
|
|
2
|
+
export interface IdentityAdminUserView {
|
|
3
|
+
id: string; email: string | null; displayName: string | null;
|
|
4
|
+
role: 'admin_app' | 'admin_org' | 'editor' | 'guest';
|
|
5
|
+
accountStatus: 'active' | 'pending_admin_approval' | 'approval_expired_readonly' | 'disabled_by_user' | 'disabled_by_admin';
|
|
6
|
+
emailVerified: boolean; approvalDueAt: string | null; approvedAt: string | null; approvedByUserId: string | null;
|
|
7
|
+
disabledAt: string | null; disabledReason: string | null; createdAt: string; updatedAt: string | null;
|
|
8
|
+
workspaceId: string | null; workspaceName: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface IdentityMembershipView {
|
|
11
|
+
userId: string; tenantId: string; status: string; role: string;
|
|
12
|
+
decidedBy: string | null; decidedAt: string | null; updatedAt: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IdentityWorkspaceMemberView { userId: string; email: string | null; displayName: string | null; role: string }
|
|
15
|
+
export interface IdentityManagementTransport {
|
|
16
|
+
listUsers(status?: string): Promise<{ items: IdentityAdminUserView[] }>;
|
|
17
|
+
approveUser(userId: string, role: IdentityAdminUserView['role']): Promise<void>;
|
|
18
|
+
disableUser(userId: string): Promise<void>;
|
|
19
|
+
reactivateUser(userId: string): Promise<void>;
|
|
20
|
+
deleteUser(userId: string, operationId: string): Promise<{ complete: boolean; operationId: string }>;
|
|
21
|
+
listMemberships(tenantId: string): Promise<{ items: IdentityMembershipView[] }>;
|
|
22
|
+
requestMembership(tenantId: string): Promise<void>;
|
|
23
|
+
decideMembership(tenantId: string, userId: string, decision: 'approve' | 'reject' | 'suspend'): Promise<void>;
|
|
24
|
+
listMembers(workspaceId: string): Promise<{ items: IdentityWorkspaceMemberView[] }>;
|
|
25
|
+
addMember(workspaceId: string, email: string, role: string): Promise<void>;
|
|
26
|
+
setMemberRole(workspaceId: string, userId: string, role: string): Promise<void>;
|
|
27
|
+
removeMember(workspaceId: string, userId: string): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
export interface IdentityManagementScreenPorts {
|
|
30
|
+
readonly userId: string | null; readonly role: string | null;
|
|
31
|
+
readonly transport: IdentityManagementTransport; readonly text: IdentityScreenText;
|
|
32
|
+
notify(input: { type: 'success' | 'error' | 'info'; message: string }): void;
|
|
33
|
+
confirm(message: string): boolean | Promise<boolean>;
|
|
34
|
+
operationId(): string;
|
|
35
|
+
refreshWorkspaceScope?(): Promise<void>;
|
|
36
|
+
}
|