@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-publish.js","sourceRoot":"","sources":["../../src/sessions/registry-publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAQjD,OAAO,EACL,eAAe,EACf,eAAe,EACf,WAAW,EACX,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,MAAM,EACN,UAAU,EACV,UAAU,GACX,MAAM,qBAAqB,CAAC;AAG7B,SAAS,eAAe,CAAC,KAAoB,EAAE,GAAe;IAC5D,IACE,OAAO,GAAG,CAAC,gBAAgB,KAAK,QA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;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAoB,EAAE,GAAe,EAAE,OAAe,EAAE,SAAiB;IACvG,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { CapabilitiesRecord, CoarseProjection, EngineKind, ListingGrantRecord, NativeSourceRef, OriginSnapshot, ProviderClass, RegistryInput, RevisionRef, SessionRef, SessionState } from './registry-types.js';
|
|
2
|
+
export interface SessionRow {
|
|
3
|
+
writerEpoch: number;
|
|
4
|
+
originRevision: number;
|
|
5
|
+
engineKind: EngineKind;
|
|
6
|
+
providerClass: ProviderClass;
|
|
7
|
+
state: SessionState;
|
|
8
|
+
nativeBinding: NativeSourceRef | null;
|
|
9
|
+
capabilities: CapabilitiesRecord | null;
|
|
10
|
+
tombstoned: boolean;
|
|
11
|
+
quarantined: boolean;
|
|
12
|
+
seenFacts: Map<string, string>;
|
|
13
|
+
activatedRead: boolean;
|
|
14
|
+
lastFreshnessAt: number | null;
|
|
15
|
+
lastFreshnessExpiry: number;
|
|
16
|
+
missedEmission: boolean;
|
|
17
|
+
freshnessValid: boolean;
|
|
18
|
+
routeStates: Map<string, {
|
|
19
|
+
readonly generation: number;
|
|
20
|
+
readonly state: string;
|
|
21
|
+
}>;
|
|
22
|
+
subscribers: Set<(event: {
|
|
23
|
+
readonly kind: string;
|
|
24
|
+
}) => void>;
|
|
25
|
+
}
|
|
26
|
+
export interface RegistryState {
|
|
27
|
+
readonly input: RegistryInput;
|
|
28
|
+
readonly now: () => number;
|
|
29
|
+
readonly sessions: Map<string, SessionRow>;
|
|
30
|
+
readonly refByRow: Map<SessionRow, SessionRef>;
|
|
31
|
+
readonly grants: Map<string, ListingGrantRecord>;
|
|
32
|
+
readonly sourceAcks: Map<string, string>;
|
|
33
|
+
readonly observations: unknown[];
|
|
34
|
+
droppedObservations: number;
|
|
35
|
+
unschedule: (() => void) | null;
|
|
36
|
+
}
|
|
37
|
+
export declare function createRegistryState(input: RegistryInput): RegistryState;
|
|
38
|
+
export declare function sessionKey(ref: SessionRef): string;
|
|
39
|
+
export declare function sha256Hex(input: string): string;
|
|
40
|
+
export declare function canonicalizeJson(value: unknown): string;
|
|
41
|
+
export declare function projectionDigestOf(projection: CoarseProjection): string;
|
|
42
|
+
export declare function snapshotDigestOf(snapshotBody: unknown): string;
|
|
43
|
+
export declare function outboxRefFor(key: string, revision: number): RevisionRef;
|
|
44
|
+
export declare function grantIsCurrent(state: RegistryState, grant: ListingGrantRecord): boolean;
|
|
45
|
+
export declare function grantCovers(grant: ListingGrantRecord, ref: SessionRef): boolean;
|
|
46
|
+
export declare function currentGrantFor(state: RegistryState, ref: SessionRef): ListingGrantRecord | null;
|
|
47
|
+
export declare function rowRef(state: RegistryState, row: SessionRow): SessionRef | null;
|
|
48
|
+
export declare function buildProjection(ref: SessionRef, row: SessionRow): CoarseProjection;
|
|
49
|
+
export declare function snapshotOf(ref: SessionRef, row: SessionRow): OriginSnapshot;
|
|
50
|
+
export declare function createSessionRow(): SessionRow;
|
|
51
|
+
//# sourceMappingURL=registry-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-store.d.ts","sourceRoot":"","sources":["../../src/sessions/registry-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,YAAY,EACb,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,EAAE,YAAY,C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istryState(input) {
|
|
4
|
+
return {
|
|
5
|
+
input,
|
|
6
|
+
now: input.now ?? (() => Date.now()),
|
|
7
|
+
sessions: new Map(),
|
|
8
|
+
refByRow: new Map(),
|
|
9
|
+
grants: new Map(),
|
|
10
|
+
sourceAcks: new Map(),
|
|
11
|
+
observations: [],
|
|
12
|
+
droppedObservations: 0,
|
|
13
|
+
unschedule: null,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function sessionKey(ref) {
|
|
17
|
+
return `${ref.originInstanceId}\0${ref.sessionId}\0${ref.incarnation}`;
|
|
18
|
+
}
|
|
19
|
+
export function sha256Hex(input) {
|
|
20
|
+
return createHash('sha256').update(input, 'utf8').digest('hex');
|
|
21
|
+
}
|
|
22
|
+
// RFC8785 (JCS) serialization for the closed registry payloads: recursively
|
|
23
|
+
// key-sorted objects, JSON primitive serialization, no insignificant whitespace.
|
|
24
|
+
export function canonicalizeJson(value) {
|
|
25
|
+
if (value === null)
|
|
26
|
+
return 'null';
|
|
27
|
+
if (Array.isArray(value))
|
|
28
|
+
return `[${value.map(canonicalizeJson).join(',')}]`;
|
|
29
|
+
switch (typeof value) {
|
|
30
|
+
case 'number':
|
|
31
|
+
if (!Number.isSafeInteger(value))
|
|
32
|
+
throw new TypeError('JCS: non-safe-integer number');
|
|
33
|
+
return String(value);
|
|
34
|
+
case 'boolean':
|
|
35
|
+
return String(value);
|
|
36
|
+
case 'string':
|
|
37
|
+
return JSON.stringify(value);
|
|
38
|
+
case 'object': {
|
|
39
|
+
const entries = Object.entries(value)
|
|
40
|
+
.filter(([, v]) => v !== undefined)
|
|
41
|
+
.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0));
|
|
42
|
+
return `{${entries.map(([k, v]) => `${JSON.stringify(k)}:${canonicalizeJson(v)}`).join(',')}}`;
|
|
43
|
+
}
|
|
44
|
+
default:
|
|
45
|
+
throw new TypeError('JCS: unsupported value');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// r2 revisionRules.registry digest domains: listing hashes only the closed
|
|
49
|
+
// coarse payload; activated hashes the complete signed snapshot body.
|
|
50
|
+
export function projectionDigestOf(projection) {
|
|
51
|
+
return sha256Hex(LISTING_DIGEST_DOMAIN + canonicalizeJson(projection));
|
|
52
|
+
}
|
|
53
|
+
export function snapshotDigestOf(snapshotBody) {
|
|
54
|
+
return sha256Hex(SNAPSHOT_DIGEST_DOMAIN + canonicalizeJson(snapshotBody));
|
|
55
|
+
}
|
|
56
|
+
export function outboxRefFor(key, revision) {
|
|
57
|
+
return {
|
|
58
|
+
id: `outbox-${sha256Hex(key).slice(0, 16)}-${revision}`,
|
|
59
|
+
revision,
|
|
60
|
+
digest: sha256Hex(`outbox:${key}:${revision}`),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export function grantIsCurrent(state, grant) {
|
|
64
|
+
if (grant.withdrawn)
|
|
65
|
+
return false;
|
|
66
|
+
const timestamp = state.now();
|
|
67
|
+
if (!Number.isSafeInteger(timestamp) || timestamp < 0)
|
|
68
|
+
return false;
|
|
69
|
+
return timestamp <= grant.expiresAt && grant.expiresAt - grant.issuedAt <= LISTING_LEASE_MS;
|
|
70
|
+
}
|
|
71
|
+
export function grantCovers(grant, ref) {
|
|
72
|
+
if (grant.originInstanceId !== ref.originInstanceId)
|
|
73
|
+
return false;
|
|
74
|
+
if (grant.scope.kind === 'named-sessions')
|
|
75
|
+
return grant.scope.sessions.includes(ref.sessionId);
|
|
76
|
+
return grant.futureSessionsOptIn;
|
|
77
|
+
}
|
|
78
|
+
export function currentGrantFor(state, ref) {
|
|
79
|
+
for (const grant of state.grants.values()) {
|
|
80
|
+
if (grantCovers(grant, ref) && grantIsCurrent(state, grant))
|
|
81
|
+
return grant;
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
export function rowRef(state, row) {
|
|
86
|
+
return state.refByRow.get(row) ?? null;
|
|
87
|
+
}
|
|
88
|
+
export function buildProjection(ref, row) {
|
|
89
|
+
return {
|
|
90
|
+
sessionRef: { ...ref },
|
|
91
|
+
engineKind: row.engineKind,
|
|
92
|
+
providerClass: row.providerClass,
|
|
93
|
+
originRevision: row.originRevision,
|
|
94
|
+
state: row.state,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export function snapshotOf(ref, row) {
|
|
98
|
+
return {
|
|
99
|
+
descriptor: {
|
|
100
|
+
sessionRef: { ...ref },
|
|
101
|
+
engineKind: row.engineKind,
|
|
102
|
+
providerClass: row.providerClass,
|
|
103
|
+
writerEpoch: row.writerEpoch,
|
|
104
|
+
originRevision: row.originRevision,
|
|
105
|
+
state: row.state,
|
|
106
|
+
nativeBinding: row.nativeBinding,
|
|
107
|
+
tombstoneFloor: row.tombstoned ? row.originRevision : 0,
|
|
108
|
+
denialFloors: [],
|
|
109
|
+
},
|
|
110
|
+
capabilities: row.capabilities,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export function createSessionRow() {
|
|
114
|
+
return {
|
|
115
|
+
writerEpoch: 1,
|
|
116
|
+
originRevision: 0,
|
|
117
|
+
engineKind: 'cli',
|
|
118
|
+
providerClass: 'claude',
|
|
119
|
+
state: 'unknown',
|
|
120
|
+
nativeBinding: null,
|
|
121
|
+
capabilities: null,
|
|
122
|
+
tombstoned: false,
|
|
123
|
+
quarantined: false,
|
|
124
|
+
seenFacts: new Map(),
|
|
125
|
+
activatedRead: false,
|
|
126
|
+
lastFreshnessAt: null,
|
|
127
|
+
lastFreshnessExpiry: 0,
|
|
128
|
+
missedEmission: false,
|
|
129
|
+
freshnessValid: false,
|
|
130
|
+
routeStates: new Map(),
|
|
131
|
+
subscribers: new Set(),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=registry-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-store.js","sourceRoot":"","sources":["../../src/sessions/registry-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EA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AClB,SAAS,EAAE,IAAI,GAAG,EAAE;QACpB,aAAa,EAAE,KAAK;QACpB,eAAe,EAAE,IAAI;QACrB,mBAAmB,EAAE,CAAC;QACtB,cAAc,EAAE,KAAK;QACrB,cAAc,EAAE,KAAK;QACrB,WAAW,EAAE,IAAI,GAAG,EAAE;QACtB,WAAW,EAAE,IAAI,GAAG,EAAE;KACvB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export declare const FRESHNESS_INTERVAL_MS = 5000;
|
|
2
|
+
export declare const FRESHNESS_BOUND_MS = 15000;
|
|
3
|
+
export declare const FRESHNESS_GRANT_MARGIN_MS = 5000;
|
|
4
|
+
export declare const LISTING_LEASE_MS = 60000;
|
|
5
|
+
export declare const OBSERVATION_QUEUE_CAP = 256;
|
|
6
|
+
export declare const LISTING_DIGEST_DOMAIN = "cluster-mesh.session-listing/1/coarse-v1\0";
|
|
7
|
+
export declare const SNAPSHOT_DIGEST_DOMAIN = "cluster-mesh.session/1/snapshot\0";
|
|
8
|
+
export declare const LISTING_STAGE_ROUTES: readonly ["GET M/listing-grants/:grantId", "POST M/listing-grants/:grantId/acks", "POST M/listing", "POST M/freshness"];
|
|
9
|
+
export declare const FORBIDDEN_LISTING_FIELDS: readonly ["cwd", "path", "title", "prompt", "cliModel", "cliVersion", "agentName", "agentRole", "waitingInput", "permissionDetail", "typedLogLocator", "contentHash"];
|
|
10
|
+
export type RelayErrorCode = 'relay_auth_required' | 'relay_scope_refused' | 'relay_consent_refused' | 'relay_lane_refused' | 'relay_loop' | 'relay_hop_limit' | 'relay_route_conflict' | 'relay_stale_generation' | 'relay_frame_conflict' | 'relay_grant_expired' | 'relay_grant_revoked' | 'relay_grant_unavailable' | 'relay_origin_refused' | 'relay_protocol_refused' | 'relay_oversize' | 'relay_version_unsupported' | 'relay_backpressure' | 'relay_unavailable' | 'relay_policy_unavailable';
|
|
11
|
+
export interface RelayError {
|
|
12
|
+
readonly format: 'cluster-mesh.session-relay/1';
|
|
13
|
+
readonly kind: 'error';
|
|
14
|
+
readonly code: RelayErrorCode;
|
|
15
|
+
readonly retryable: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function relayError(code: RelayErrorCode, retryable?: boolean): RelayError;
|
|
18
|
+
export interface SessionRef {
|
|
19
|
+
readonly originInstanceId: string;
|
|
20
|
+
readonly sessionId: string;
|
|
21
|
+
readonly incarnation: string;
|
|
22
|
+
}
|
|
23
|
+
export type EngineKind = 'cli' | 'app-chat';
|
|
24
|
+
export type ProviderClass = 'claude' | 'codex' | 'agy' | 'vibe' | 'muse' | 'other-cli' | 'app-native';
|
|
25
|
+
export type SessionState = 'running' | 'ended' | 'unknown';
|
|
26
|
+
export type Visibility = 'listing' | 'activated';
|
|
27
|
+
export interface CoarseProjection {
|
|
28
|
+
readonly sessionRef: SessionRef;
|
|
29
|
+
readonly engineKind: EngineKind;
|
|
30
|
+
readonly providerClass: ProviderClass;
|
|
31
|
+
readonly originRevision: number;
|
|
32
|
+
readonly state: SessionState;
|
|
33
|
+
}
|
|
34
|
+
export interface ProcessBindingRef {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly revision: number;
|
|
37
|
+
readonly digest: string;
|
|
38
|
+
}
|
|
39
|
+
export interface RevisionRef {
|
|
40
|
+
readonly id: string;
|
|
41
|
+
readonly revision: number;
|
|
42
|
+
readonly digest: string;
|
|
43
|
+
}
|
|
44
|
+
export interface NativeSourceRef {
|
|
45
|
+
readonly sourceSessionId: string;
|
|
46
|
+
readonly sourceGeneration: number;
|
|
47
|
+
readonly streamIncarnation: string;
|
|
48
|
+
}
|
|
49
|
+
export declare const LIFECYCLE_EVENT_KINDS: readonly ["admitted", "started", "waiting-input", "permission-pending", "capability-changed", "capture-enabled", "capture-paused", "capture-revoked", "route-opened", "route-degraded", "route-closed", "source-disconnected", "source-reconnected", "gap-detected", "completed", "stopped", "crashed", "tombstoned"];
|
|
50
|
+
export type LifecycleEventKind = (typeof LIFECYCLE_EVENT_KINDS)[number];
|
|
51
|
+
export declare const TERMINAL_KINDS: ReadonlySet<LifecycleEventKind>;
|
|
52
|
+
export interface LifecycleFact {
|
|
53
|
+
readonly kind: LifecycleEventKind;
|
|
54
|
+
readonly sourceRef: NativeSourceRef;
|
|
55
|
+
readonly sourceAt: number;
|
|
56
|
+
readonly factRef: RevisionRef;
|
|
57
|
+
}
|
|
58
|
+
export interface CapabilitiesRecord {
|
|
59
|
+
readonly sourceRef: NativeSourceRef;
|
|
60
|
+
readonly hostKind?: string;
|
|
61
|
+
readonly [field: string]: unknown;
|
|
62
|
+
}
|
|
63
|
+
export interface ListingGrantRecord {
|
|
64
|
+
readonly grantId: string;
|
|
65
|
+
readonly revision: number;
|
|
66
|
+
readonly originInstanceId: string;
|
|
67
|
+
readonly scope: {
|
|
68
|
+
readonly kind: 'named-sessions';
|
|
69
|
+
readonly sessions: readonly string[];
|
|
70
|
+
} | {
|
|
71
|
+
readonly kind: 'future-sessions';
|
|
72
|
+
readonly workspace: string;
|
|
73
|
+
};
|
|
74
|
+
readonly fieldSet: 'coarse-v1';
|
|
75
|
+
readonly purpose: 'session.list';
|
|
76
|
+
readonly issuedAt: number;
|
|
77
|
+
readonly expiresAt: number;
|
|
78
|
+
readonly withdrawn: boolean;
|
|
79
|
+
readonly futureSessionsOptIn: boolean;
|
|
80
|
+
}
|
|
81
|
+
export interface ObservationRecord {
|
|
82
|
+
readonly format: 'cluster-mesh.session-observation/1';
|
|
83
|
+
readonly kind: 'observation';
|
|
84
|
+
readonly observationId: string;
|
|
85
|
+
readonly observerRef: string;
|
|
86
|
+
readonly sessionTraceId: string;
|
|
87
|
+
readonly status: 'ok' | 'paused' | 'refused' | 'unknown';
|
|
88
|
+
readonly code: string;
|
|
89
|
+
readonly aggregatedBytes: number;
|
|
90
|
+
readonly aggregatedFrames: number;
|
|
91
|
+
readonly queueBytes: number;
|
|
92
|
+
readonly observedAt: number;
|
|
93
|
+
}
|
|
94
|
+
export type CommitResult = {
|
|
95
|
+
readonly status: 'local-committed';
|
|
96
|
+
readonly sessionRef: SessionRef;
|
|
97
|
+
readonly writerEpoch: number;
|
|
98
|
+
readonly originRevision: number;
|
|
99
|
+
readonly outboxRef: RevisionRef;
|
|
100
|
+
} | {
|
|
101
|
+
readonly status: 'refused';
|
|
102
|
+
readonly error: RelayError;
|
|
103
|
+
};
|
|
104
|
+
export type PublishResult = {
|
|
105
|
+
readonly status: 'remote-committed';
|
|
106
|
+
readonly sessionRef: SessionRef;
|
|
107
|
+
readonly writerEpoch: number;
|
|
108
|
+
readonly originRevision: number;
|
|
109
|
+
readonly projection: CoarseProjection;
|
|
110
|
+
readonly projectionDigest: string;
|
|
111
|
+
readonly sourceAckDigest: string;
|
|
112
|
+
} | {
|
|
113
|
+
readonly status: 'remote-unknown';
|
|
114
|
+
readonly sessionRef: SessionRef;
|
|
115
|
+
readonly writerEpoch: number;
|
|
116
|
+
readonly originRevision: number;
|
|
117
|
+
readonly outboxRef: RevisionRef;
|
|
118
|
+
readonly snapshot?: OriginSnapshot;
|
|
119
|
+
} | {
|
|
120
|
+
readonly status: 'rate-limited';
|
|
121
|
+
readonly nextEligibleAt: number;
|
|
122
|
+
} | {
|
|
123
|
+
readonly status: 'refused';
|
|
124
|
+
readonly error: RelayError;
|
|
125
|
+
};
|
|
126
|
+
export interface RegistryCallOptions {
|
|
127
|
+
readonly signal?: AbortSignal;
|
|
128
|
+
}
|
|
129
|
+
export interface SessionOriginIngestLifecycleParametersV1 {
|
|
130
|
+
readonly processBindingRef: ProcessBindingRef;
|
|
131
|
+
readonly fact: LifecycleFact;
|
|
132
|
+
}
|
|
133
|
+
export interface SessionOriginIngestCapabilitiesParametersV1 {
|
|
134
|
+
readonly processBindingRef: ProcessBindingRef;
|
|
135
|
+
readonly capabilities: CapabilitiesRecord;
|
|
136
|
+
}
|
|
137
|
+
export interface SessionOriginPublishListingParametersV1 {
|
|
138
|
+
readonly sessionRef: SessionRef;
|
|
139
|
+
readonly grantRef: RevisionRef;
|
|
140
|
+
}
|
|
141
|
+
export interface SessionOriginRenewFreshnessParametersV1 {
|
|
142
|
+
readonly sessionRef: SessionRef;
|
|
143
|
+
readonly visibility: Visibility;
|
|
144
|
+
}
|
|
145
|
+
export interface SessionOriginSnapshotParametersV1 {
|
|
146
|
+
readonly sessionRef: SessionRef;
|
|
147
|
+
}
|
|
148
|
+
export interface OriginSnapshot {
|
|
149
|
+
readonly descriptor: {
|
|
150
|
+
readonly sessionRef: SessionRef;
|
|
151
|
+
readonly engineKind: EngineKind;
|
|
152
|
+
readonly providerClass: ProviderClass;
|
|
153
|
+
readonly writerEpoch: number;
|
|
154
|
+
readonly originRevision: number;
|
|
155
|
+
readonly state: SessionState;
|
|
156
|
+
readonly nativeBinding: NativeSourceRef | null;
|
|
157
|
+
readonly tombstoneFloor: number;
|
|
158
|
+
readonly denialFloors: readonly unknown[];
|
|
159
|
+
};
|
|
160
|
+
readonly capabilities: CapabilitiesRecord | null;
|
|
161
|
+
}
|
|
162
|
+
export type EmitResult = {
|
|
163
|
+
readonly status: 'enqueued';
|
|
164
|
+
readonly queued: number;
|
|
165
|
+
} | {
|
|
166
|
+
readonly status: 'dropped';
|
|
167
|
+
readonly dropped: number;
|
|
168
|
+
};
|
|
169
|
+
export interface ListingRow {
|
|
170
|
+
readonly visibility: Visibility;
|
|
171
|
+
readonly projection: CoarseProjection;
|
|
172
|
+
readonly state: SessionState;
|
|
173
|
+
}
|
|
174
|
+
export interface RegistryInput {
|
|
175
|
+
readonly originInstanceId: string;
|
|
176
|
+
readonly now?: () => number;
|
|
177
|
+
readonly resolveSession?: (binding: ProcessBindingRef) => SessionRef | null;
|
|
178
|
+
readonly schedule?: (callback: () => void, intervalMs: number) => () => void;
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=registry-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-types.d.ts","sourceRoot":"","sources":["../../src/sessions/registry-types.ts"],"names":[],"mappings":"AAAA,eAAO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AAG,IAAI,CAAC;QAC/C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;QAChC,QAAQ,CAAC,YAAY,EAAE,SAAS,OAAO,EAAE,CAAC;KAC3C,CAAC;IACF,QAAQ,CAAC,YAAY,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAClD;AAED,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACxD;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,UAAU,GAAG,IAAI,CAAC;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;CAC9E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const FRESHNESS_INTERVAL_MS = 5000;
|
|
2
|
+
export const FRESHNESS_BOUND_MS = 15000;
|
|
3
|
+
export const FRESHNESS_GRANT_MARGIN_MS = 5000;
|
|
4
|
+
export const LISTING_LEASE_MS = 60_000;
|
|
5
|
+
export const OBSERVATION_QUEUE_CAP = 256;
|
|
6
|
+
export const LISTING_DIGEST_DOMAIN = 'cluster-mesh.session-listing/1/coarse-v1\0';
|
|
7
|
+
export const SNAPSHOT_DIGEST_DOMAIN = 'cluster-mesh.session/1/snapshot\0';
|
|
8
|
+
export const LISTING_STAGE_ROUTES = [
|
|
9
|
+
'GET M/listing-grants/:grantId',
|
|
10
|
+
'POST M/listing-grants/:grantId/acks',
|
|
11
|
+
'POST M/listing',
|
|
12
|
+
'POST M/freshness',
|
|
13
|
+
];
|
|
14
|
+
export const FORBIDDEN_LISTING_FIELDS = [
|
|
15
|
+
'cwd', 'path', 'title', 'prompt', 'cliModel', 'cliVersion',
|
|
16
|
+
'agentName', 'agentRole', 'waitingInput', 'permissionDetail',
|
|
17
|
+
'typedLogLocator', 'contentHash',
|
|
18
|
+
];
|
|
19
|
+
export function relayError(code, retryable = false) {
|
|
20
|
+
return { format: 'cluster-mesh.session-relay/1', kind: 'error', code, retryable };
|
|
21
|
+
}
|
|
22
|
+
export const LIFECYCLE_EVENT_KINDS = [
|
|
23
|
+
'admitted', 'started', 'waiting-input', 'permission-pending',
|
|
24
|
+
'capability-changed', 'capture-enabled', 'capture-paused', 'capture-revoked',
|
|
25
|
+
'route-opened', 'route-degraded', 'route-closed',
|
|
26
|
+
'source-disconnected', 'source-reconnected', 'gap-detected',
|
|
27
|
+
'completed', 'stopped', 'crashed', 'tombstoned',
|
|
28
|
+
];
|
|
29
|
+
export const TERMINAL_KINDS = new Set([
|
|
30
|
+
'tombstoned', 'completed', 'stopped', 'crashed',
|
|
31
|
+
]);
|
|
32
|
+
//# sourceMappingURL=registry-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-types.js","sourceRoot":"","sources":["../../src/sessions/registry-types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAC1C,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACxC,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AACvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AACzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,4CAA4C,CAAC;AAClF,MAAM,CAAC,MAAM,sBAAsB,GAAG,mCAAmC,CAAC;AAE1E,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,+BAA+B;IAC/B,qCAAqC;IACrC,gBAAgB;IAChB,kBAAkB;CACV,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY;IAC1D,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,kBAAkB;IAC5D,iBAAiB,EAAE,aAAa;CACxB,CAAC;AAkBX,MAAM,UAAU,UAAU,CAAC,IAAoB,EAAE,SAAS,GAAG,KAAK;IAChE,OAAO,EAAE,MAAM,EAAE,8BAA8B,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AACpF,CAAC;AAoBD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,oBAAoB;IAC5D,oBAAoB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB;IAC5E,cAAc,EAAE,gBAAgB,EAAE,cAAc;IAChD,qBAAqB,EAAE,oBAAoB,EAAE,cAAc;IAC3D,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY;CACvC,CAAC;AAIX,MAAM,CAAC,MAAM,cAAc,GAAoC,IAAI,GAAG,CAAC;IACrE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS;CAChD,CAAC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { CommitResult, EmitResult, ListingGrantRecord, ObservationRecord, PublishResult, RegistryCallOptions, RegistryInput, SessionOriginIngestCapabilitiesParametersV1, SessionOriginIngestLifecycleParametersV1, SessionOriginPublishListingParametersV1, SessionOriginRenewFreshnessParametersV1, SessionOriginSnapshotParametersV1, SessionRef, Visibility } from './registry-types.js';
|
|
2
|
+
import type { ListingRow } from './registry-types.js';
|
|
3
|
+
export * from './registry-types.js';
|
|
4
|
+
export declare function createSessionOriginRegistry(input: RegistryInput): {
|
|
5
|
+
registerGrant: (grant: ListingGrantRecord) => void;
|
|
6
|
+
withdrawGrant: (grantId: string) => void;
|
|
7
|
+
commitSourceAck: (ref: SessionRef, grantId: string, ackDigest: string) => void;
|
|
8
|
+
ingestLifecycle: (parameters: SessionOriginIngestLifecycleParametersV1, options?: RegistryCallOptions) => Promise<CommitResult>;
|
|
9
|
+
ingestCapabilities: (parameters: SessionOriginIngestCapabilitiesParametersV1, options?: RegistryCallOptions) => Promise<CommitResult>;
|
|
10
|
+
publishListing: (parameters: SessionOriginPublishListingParametersV1, options?: RegistryCallOptions) => Promise<PublishResult>;
|
|
11
|
+
renewFreshness: (parameters: SessionOriginRenewFreshnessParametersV1, options?: RegistryCallOptions) => Promise<PublishResult>;
|
|
12
|
+
snapshot: (parameters: SessionOriginSnapshotParametersV1, options?: RegistryCallOptions) => Promise<PublishResult>;
|
|
13
|
+
getListingRow: (ref: SessionRef) => ListingRow | null;
|
|
14
|
+
grantActivatedRead: (ref: SessionRef) => boolean;
|
|
15
|
+
loseActivatedRead: (ref: SessionRef) => void;
|
|
16
|
+
subscribe: (ref: SessionRef, callback: (event: {
|
|
17
|
+
readonly kind: string;
|
|
18
|
+
}) => void) => (() => void);
|
|
19
|
+
recordRouteState: (ref: SessionRef, route: {
|
|
20
|
+
readonly routeId: string;
|
|
21
|
+
readonly generation: number;
|
|
22
|
+
readonly state: string;
|
|
23
|
+
}) => boolean;
|
|
24
|
+
reportSplitBrain: (ref: SessionRef, left: {
|
|
25
|
+
readonly writerEpoch: number;
|
|
26
|
+
readonly originRevision: number;
|
|
27
|
+
readonly digest: string;
|
|
28
|
+
}, right: {
|
|
29
|
+
readonly writerEpoch: number;
|
|
30
|
+
readonly originRevision: number;
|
|
31
|
+
readonly digest: string;
|
|
32
|
+
}) => {
|
|
33
|
+
readonly quarantined: boolean;
|
|
34
|
+
};
|
|
35
|
+
isQuarantined: (ref: SessionRef) => boolean;
|
|
36
|
+
isLive: (ref: SessionRef) => boolean;
|
|
37
|
+
assertListingStageRoute: (method: string, path: string) => {
|
|
38
|
+
readonly admitted: boolean;
|
|
39
|
+
};
|
|
40
|
+
signFreshness: (ref: SessionRef, visibility: Visibility) => never;
|
|
41
|
+
emit: (observation: ObservationRecord) => EmitResult;
|
|
42
|
+
restart: () => void;
|
|
43
|
+
};
|
|
44
|
+
export type SessionOriginRegistryPortV1 = ReturnType<typeof createSessionOriginRegistry>;
|
|
45
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/sessions/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,2CAA2C,EAC3C,wCAAwC,EACxC,uCAAuC,EACvC,uCAAuC,EACvC,iCAAiC,EACjC,UAAU,EACV,UAAU,EACX,MAAM,qBAAqB,CAAC;AA2B7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,cAAc,qBAAqB,CAAC;AAsBpC,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,aAAa;2BAGrC,kBAAkB,KAAG,IAAI;6BACvB,MAAM,KAAG,IAAI;2BACf,UAAU,WAAW,MAAM,aAAa,MAAM,KAAG,IAAI;kCAG9D,wCAAwC,YAC1C,mBAAmB,KAC5B,QAAQ,YAAY,CAAC;qCAQV,2CAA2C,YAC7C,mBAAmB,KAC5B,QAAQ,YAAY,CAAC;iCAQV,uCAAuC,YACzC,mBAAmB,KAC5B,QAAQ,aAAa,CAAC;iCAMX,uCAA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-ingest.js';
|
|
3
|
+
import { commitSourceAck, getListingRow, publishListing, recordRouteState, registerGrant, setActivatedRead, snapshotSession, subscribeListing, withdrawGrant, } from './registry-publish.js';
|
|
4
|
+
import { isLive, renewFreshness, restartRegistry, signFreshness, } from './registry-freshness.js';
|
|
5
|
+
import { assertListingStageRoute, emitObservation, isQuarantined, reportSplitBrain, } from './registry-admin.js';
|
|
6
|
+
export * from './registry-types.js';
|
|
7
|
+
// r2 runtimeComposition: only invalid JavaScript API use (non-object
|
|
8
|
+
// parameters/options or a non-AbortSignal signal) throws/rejects TypeError;
|
|
9
|
+
// every authority/validation failure stays a typed refusal result.
|
|
10
|
+
function assertParameters(parameters) {
|
|
11
|
+
if (typeof parameters !== 'object' || parameters === null || Array.isArray(parameters)) {
|
|
12
|
+
throw new TypeError('SessionOriginRegistryPortV1: parameters must be a single named object');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function assertOptions(options) {
|
|
16
|
+
if (options === undefined)
|
|
17
|
+
return;
|
|
18
|
+
if (typeof options !== 'object' || options === null || Array.isArray(options)) {
|
|
19
|
+
throw new TypeError('SessionOriginRegistryPortV1: options must be an object');
|
|
20
|
+
}
|
|
21
|
+
const signal = options.signal;
|
|
22
|
+
if (signal !== undefined && !(signal instanceof AbortSignal)) {
|
|
23
|
+
throw new TypeError('SessionOriginRegistryPortV1: options.signal must be an AbortSignal');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export function createSessionOriginRegistry(input) {
|
|
27
|
+
const state = createRegistryState(input);
|
|
28
|
+
return {
|
|
29
|
+
registerGrant: (grant) => registerGrant(state, grant),
|
|
30
|
+
withdrawGrant: (grantId) => withdrawGrant(state, grantId),
|
|
31
|
+
commitSourceAck: (ref, grantId, ackDigest) => commitSourceAck(state, ref, grantId, ackDigest),
|
|
32
|
+
ingestLifecycle: async (parameters, options) => {
|
|
33
|
+
assertParameters(parameters);
|
|
34
|
+
assertOptions(options);
|
|
35
|
+
return Promise.resolve(ingestLifecycle(state, parameters.processBindingRef, parameters.fact));
|
|
36
|
+
},
|
|
37
|
+
ingestCapabilities: async (parameters, options) => {
|
|
38
|
+
assertParameters(parameters);
|
|
39
|
+
assertOptions(options);
|
|
40
|
+
return Promise.resolve(ingestCapabilities(state, parameters.processBindingRef, parameters.capabilities));
|
|
41
|
+
},
|
|
42
|
+
publishListing: async (parameters, options) => {
|
|
43
|
+
assertParameters(parameters);
|
|
44
|
+
assertOptions(options);
|
|
45
|
+
return Promise.resolve(publishListing(state, parameters.sessionRef, parameters.grantRef));
|
|
46
|
+
},
|
|
47
|
+
renewFreshness: async (parameters, options) => {
|
|
48
|
+
assertParameters(parameters);
|
|
49
|
+
assertOptions(options);
|
|
50
|
+
return Promise.resolve(renewFreshness(state, parameters.sessionRef, parameters.visibility));
|
|
51
|
+
},
|
|
52
|
+
snapshot: async (parameters, options) => {
|
|
53
|
+
assertParameters(parameters);
|
|
54
|
+
assertOptions(options);
|
|
55
|
+
return Promise.resolve(snapshotSession(state, parameters.sessionRef));
|
|
56
|
+
},
|
|
57
|
+
getListingRow: (ref) => getListingRow(state, ref),
|
|
58
|
+
grantActivatedRead: (ref) => setActivatedRead(state, ref, true),
|
|
59
|
+
loseActivatedRead: (ref) => { setActivatedRead(state, ref, false); },
|
|
60
|
+
subscribe: (ref, callback) => subscribeListing(state, ref, callback),
|
|
61
|
+
recordRouteState: (ref, route) => recordRouteState(state, ref, route),
|
|
62
|
+
reportSplitBrain: (ref, left, right) => reportSplitBrain(state, ref, left, right),
|
|
63
|
+
isQuarantined: (ref) => isQuarantined(state, ref),
|
|
64
|
+
isLive: (ref) => isLive(state, ref),
|
|
65
|
+
assertListingStageRoute: (method, path) => assertListingStageRoute(state, method, path),
|
|
66
|
+
signFreshness: (ref, visibility) => signFreshness(state, ref, visibility),
|
|
67
|
+
emit: (observation) => {
|
|
68
|
+
assertParameters(observation);
|
|
69
|
+
return emitObservation(state, observation);
|
|
70
|
+
},
|
|
71
|
+
restart: () => restartRegistry(state),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/sessions/registry.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EACL,eAAe,EACf,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,MAAM,EACN,cAAc,EACd,eAAe,EACf,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,aAAa,EACb,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAG7B,cAAc,qBAAqB,CAAC;AAEpC,qEAAqE;AACrE,4EAA4E;AAC5E,mEAAmE;AACnE,SAAS,gBAAgB,CAAC,UAAmB;IAC3C,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QACvF,MAAM,IAAI,SAAS,CAAC,uEAAuE,CAAC,CAAC;IAC/F,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,OAAgB;IACrC,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO;IAClC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9E,MAAM,IAAI,SAAS,CAAC,wDAAwD,CAAC,CAAC;IAChF,CAAC;IACD,MAAM,MAAM,GAAI,OAAyC,CAAC,MAAM,CAAC;IACjE,IAAI,MAAM,KAAK,SAA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,EAChG,KAAiG,EAC9D,EAAE,CAAC,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC;QACjF,aAAa,EAAE,CAAC,GAAe,EAAW,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC;QACtE,MAAM,EAAE,CAAC,GAAe,EAAW,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC;QACxD,uBAAuB,EAAE,CAAC,MAAc,EAAE,IAAY,EAAkC,EAAE,CACxF,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC;QAC9C,aAAa,EAAE,CAAC,GAAe,EAAE,UAAsB,EAAS,EAAE,CAChE,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,CAAC;QACvC,IAAI,EAAE,CAAC,WAA8B,EAAc,EAAE;YACnD,gBAAgB,CAAC,WAAW,CAAC,CAAC;YAC9B,OAAO,eAAe,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,EAAE,GAAS,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const RELAY_INNER_ALPN = "cluster-mesh.session-relay.inner.v1";
|
|
2
|
+
export declare const RELAY_TLS_EXPORTER_LABEL = "EXPORTER-cluster-mesh-session-relay-v1";
|
|
3
|
+
export declare const RELAY_TLS_EXPORTER_BYTES = 32;
|
|
4
|
+
export declare const RELAY_BIND_MIN_BYTES = 1;
|
|
5
|
+
export declare const RELAY_BIND_MAX_BYTES = 8192;
|
|
6
|
+
export type BindDecision = 'allow-model' | 'close-before-handler';
|
|
7
|
+
export interface BindGuardInput {
|
|
8
|
+
readonly alpn: string;
|
|
9
|
+
readonly spkiMatches: boolean;
|
|
10
|
+
readonly signerRoleMatches: boolean;
|
|
11
|
+
readonly signatureValid: boolean;
|
|
12
|
+
readonly exporterMatches: boolean;
|
|
13
|
+
readonly coordinatesMatch: boolean;
|
|
14
|
+
readonly earlyHttp2: boolean;
|
|
15
|
+
readonly secondBind: boolean;
|
|
16
|
+
readonly strictUtf8: boolean;
|
|
17
|
+
readonly jcs: boolean;
|
|
18
|
+
readonly duplicateKeys: boolean;
|
|
19
|
+
readonly unknownKeys: boolean;
|
|
20
|
+
readonly length: number;
|
|
21
|
+
readonly bodyLength: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function chainBindGuard(input: BindGuardInput): BindDecision;
|
|
24
|
+
export declare const RELAY_BIND_SERVER_CONSTRUCTION = "non-listening-tls-createServer-emit-connection-secureConnection";
|
|
25
|
+
export declare const RELAY_BIND_CLIENT_CONSTRUCTION = "tls-connect-over-circuit-then-h2-createConnection-same-socket";
|
|
26
|
+
export declare const RELAY_BIND_EVENT_ORDER: readonly string[];
|
|
27
|
+
export interface SocketConstructionInput {
|
|
28
|
+
readonly serverConstruction: string;
|
|
29
|
+
readonly clientConstruction: string;
|
|
30
|
+
readonly alpn: string;
|
|
31
|
+
readonly contextBytes: number;
|
|
32
|
+
readonly secondTls: boolean;
|
|
33
|
+
readonly sessionReused: boolean;
|
|
34
|
+
readonly events: readonly string[];
|
|
35
|
+
}
|
|
36
|
+
export declare function chainSocketConstruction(input: SocketConstructionInput): BindDecision;
|
|
37
|
+
export declare function relayBindContextSha256(bindBody: Record<string, unknown>): Uint8Array;
|
|
38
|
+
//# sourceMappingURL=relay-bind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relay-bind.d.ts","sourceRoot":"","sources":["../../src/sessions/relay-bind.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,wCAAwC,CAAC;AACtE,eAAO,MAAM,wBAAwB,2CAA2C,CAAC;AACjF,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,MAAM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