@astrale-os/kernel-client 0.5.1 → 0.6.0-beta.10
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/auth/auth.d.ts +18 -0
- package/dist/auth/auth.js +15 -0
- package/dist/auth/authorization.d.ts +13 -0
- package/dist/auth/authorization.js +17 -0
- package/dist/auth/credential.d.ts +19 -0
- package/dist/auth/credential.js +21 -0
- package/dist/auth/identity.d.ts +14 -0
- package/dist/auth/identity.js +15 -0
- package/dist/auth/index.d.ts +6 -16
- package/dist/auth/index.js +5 -10
- package/dist/auth/provision.d.ts +8 -0
- package/dist/auth/provision.js +10 -0
- package/dist/client/admission.d.ts +4 -0
- package/dist/client/admission.js +34 -0
- package/dist/client/client.d.ts +24 -109
- package/dist/client/client.js +80 -381
- package/dist/client/credential.d.ts +12 -0
- package/dist/client/credential.js +51 -0
- package/dist/client/index.d.ts +6 -0
- package/dist/client/index.js +4 -0
- package/dist/client/request.d.ts +26 -0
- package/dist/client/request.js +100 -0
- package/dist/client/result.d.ts +35 -0
- package/dist/client/result.js +28 -0
- package/dist/client/routing-control.d.ts +10 -0
- package/dist/client/routing-control.js +23 -0
- package/dist/errors/client-error.d.ts +3 -0
- package/dist/errors/client-error.js +8 -0
- package/dist/errors/index.d.ts +7 -6
- package/dist/errors/index.js +7 -4
- package/dist/errors/miss-error.d.ts +8 -0
- package/dist/errors/miss-error.js +10 -0
- package/dist/errors/protocol-error.d.ts +9 -0
- package/dist/errors/protocol-error.js +9 -0
- package/dist/errors/response-error.d.ts +11 -0
- package/dist/errors/response-error.js +16 -0
- package/dist/errors/session-error.d.ts +8 -20
- package/dist/errors/session-error.js +6 -22
- package/dist/errors/stale-route-error.d.ts +9 -0
- package/dist/errors/stale-route-error.js +12 -0
- package/dist/errors/transport-error.d.ts +30 -0
- package/dist/errors/transport-error.js +18 -0
- package/dist/graph/domain/binding.d.ts +22 -0
- package/dist/graph/domain/binding.js +123 -0
- package/dist/graph/domain/domain.typecheck.d.ts +1 -0
- package/dist/graph/domain/domain.typecheck.js +139 -0
- package/dist/graph/domain/index.d.ts +3 -0
- package/dist/graph/domain/index.js +1 -0
- package/dist/graph/domain/model.d.ts +18 -0
- package/dist/graph/domain/model.js +1 -0
- package/dist/graph/domain/page.d.ts +23 -0
- package/dist/graph/domain/page.js +42 -0
- package/dist/graph/domain/project.d.ts +8 -0
- package/dist/graph/domain/project.js +120 -0
- package/dist/graph/domain/provenance.d.ts +6 -0
- package/dist/graph/domain/provenance.js +11 -0
- package/dist/graph/errors.d.ts +8 -0
- package/dist/graph/errors.js +14 -0
- package/dist/graph/graph.d.ts +26 -0
- package/dist/graph/graph.js +18 -0
- package/dist/graph/index.d.ts +8 -26
- package/dist/graph/index.js +6 -21
- package/dist/graph/mutation.d.ts +5 -0
- package/dist/graph/mutation.js +17 -0
- package/dist/graph/page/index.d.ts +2 -0
- package/dist/graph/page/index.js +1 -0
- package/dist/graph/page/neighbors.d.ts +9 -0
- package/dist/graph/page/neighbors.js +34 -0
- package/dist/graph/page/page.d.ts +37 -0
- package/dist/graph/page/page.js +55 -0
- package/dist/graph/page-contract.d.ts +13 -0
- package/dist/graph/page-contract.js +1 -0
- package/dist/graph/provenance.d.ts +12 -0
- package/dist/graph/provenance.js +37 -0
- package/dist/graph/query.d.ts +4 -0
- package/dist/graph/query.js +69 -0
- package/dist/graph/read.d.ts +6 -0
- package/dist/graph/read.js +17 -0
- package/dist/index.d.ts +6 -25
- package/dist/index.js +6 -21
- package/dist/pacer/batcher/batcher.d.ts +7 -0
- package/dist/pacer/batcher/batcher.js +13 -0
- package/dist/pacer/batcher/defaults.d.ts +2 -0
- package/dist/pacer/batcher/defaults.js +2 -0
- package/dist/pacer/batcher/index.d.ts +1 -0
- package/dist/pacer/batcher/index.js +1 -0
- package/dist/pacer/index.d.ts +4 -10
- package/dist/pacer/index.js +4 -11
- package/dist/pacer/limiter/defaults.d.ts +2 -0
- package/dist/pacer/limiter/defaults.js +2 -0
- package/dist/pacer/limiter/index.d.ts +1 -0
- package/dist/pacer/limiter/index.js +1 -0
- package/dist/pacer/limiter/limiter.d.ts +7 -0
- package/dist/pacer/limiter/limiter.js +14 -0
- package/dist/pacer/queue/defaults.d.ts +1 -0
- package/dist/pacer/queue/defaults.js +1 -0
- package/dist/pacer/queue/index.d.ts +1 -0
- package/dist/pacer/queue/index.js +1 -0
- package/dist/pacer/queue/queue.d.ts +6 -0
- package/dist/pacer/queue/queue.js +12 -0
- package/dist/pacer/retry/defaults.d.ts +6 -0
- package/dist/pacer/retry/defaults.js +16 -0
- package/dist/pacer/retry/index.d.ts +1 -0
- package/dist/pacer/retry/index.js +1 -0
- package/dist/pacer/retry/retry.d.ts +9 -0
- package/dist/pacer/retry/retry.js +55 -0
- package/dist/pool/index.d.ts +2 -4
- package/dist/pool/index.js +0 -2
- package/dist/pool/pool.d.ts +19 -59
- package/dist/pool/pool.js +46 -64
- package/dist/pool/target.d.ts +15 -0
- package/dist/pool/target.js +49 -0
- package/dist/schema/admission.d.ts +12 -0
- package/dist/schema/admission.js +17 -0
- package/dist/schema/contracts.d.ts +12 -0
- package/dist/schema/contracts.js +1 -0
- package/dist/schema/index.d.ts +3 -16
- package/dist/schema/index.js +2 -12
- package/dist/schema/introspection.d.ts +5 -0
- package/dist/schema/introspection.js +15 -0
- package/dist/schema/operation.d.ts +5 -0
- package/dist/schema/operation.js +9 -0
- package/dist/schema/schema.d.ts +19 -0
- package/dist/schema/schema.js +43 -0
- package/dist/session/bound.d.ts +42 -9
- package/dist/session/bound.js +70 -37
- package/dist/session/context/control.d.ts +5 -0
- package/dist/session/context/control.js +17 -0
- package/dist/session/context/index.d.ts +4 -0
- package/dist/session/context/index.js +4 -0
- package/dist/session/context/limits.d.ts +7 -0
- package/dist/session/context/limits.js +18 -0
- package/dist/session/context/operation.d.ts +19 -0
- package/dist/session/context/operation.js +72 -0
- package/dist/session/context/policy.d.ts +11 -0
- package/dist/session/context/policy.js +69 -0
- package/dist/session/discovery/bundle.d.ts +17 -0
- package/dist/session/discovery/bundle.js +55 -0
- package/dist/session/discovery/discovery.d.ts +19 -0
- package/dist/session/discovery/discovery.js +55 -0
- package/dist/session/discovery/index.d.ts +20 -0
- package/dist/session/discovery/index.js +15 -0
- package/dist/session/discovery/publication.d.ts +23 -0
- package/dist/session/discovery/publication.js +123 -0
- package/dist/session/discovery/snapshot.d.ts +12 -0
- package/dist/session/discovery/snapshot.js +3 -0
- package/dist/session/discovery/transport.d.ts +6 -0
- package/dist/session/discovery/transport.js +13 -0
- package/dist/session/index.d.ts +10 -16
- package/dist/session/index.js +3 -9
- package/dist/session/reference.d.ts +36 -0
- package/dist/session/reference.js +74 -0
- package/dist/session/routing/auth.d.ts +18 -0
- package/dist/session/routing/auth.js +39 -0
- package/dist/session/routing/cache.d.ts +20 -0
- package/dist/session/routing/cache.js +115 -0
- package/dist/session/routing/dispatch.d.ts +34 -0
- package/dist/session/routing/dispatch.js +137 -0
- package/dist/session/routing/envelope.d.ts +13 -0
- package/dist/session/routing/envelope.js +35 -0
- package/dist/session/routing/expectation.d.ts +6 -0
- package/dist/session/routing/expectation.js +1 -0
- package/dist/session/routing/index.d.ts +6 -0
- package/dist/session/routing/index.js +5 -0
- package/dist/session/routing/request.d.ts +8 -0
- package/dist/session/routing/request.js +25 -0
- package/dist/session/session.d.ts +67 -0
- package/dist/session/session.js +257 -0
- package/dist/session/session.typecheck.d.ts +1 -0
- package/dist/session/session.typecheck.js +31 -0
- package/dist/session/views/catalog.d.ts +15 -0
- package/dist/session/views/catalog.js +70 -0
- package/dist/session/views/index.d.ts +2 -0
- package/dist/session/views/index.js +2 -0
- package/dist/session/views/resolve.d.ts +11 -0
- package/dist/session/views/resolve.js +13 -0
- package/dist/store/entity-index.d.ts +22 -0
- package/dist/store/entity-index.js +94 -0
- package/dist/store/index.d.ts +1 -26
- package/dist/store/index.js +1 -19
- package/dist/store/memory.d.ts +46 -97
- package/dist/store/memory.js +346 -763
- package/dist/store/mutation.d.ts +5 -0
- package/dist/store/mutation.js +34 -0
- package/dist/store/observe.d.ts +3 -0
- package/dist/store/observe.js +17 -0
- package/dist/store/optimistic.d.ts +12 -0
- package/dist/store/optimistic.js +43 -0
- package/dist/store/query-key.d.ts +5 -0
- package/dist/store/query-key.js +22 -0
- package/dist/store/shape.d.ts +25 -0
- package/dist/store/shape.js +29 -0
- package/dist/store/store.d.ts +68 -0
- package/dist/store/store.js +144 -0
- package/dist/store/store.typecheck.d.ts +1 -0
- package/dist/store/store.typecheck.js +40 -0
- package/dist/transport/auto/decision.d.ts +22 -0
- package/dist/transport/auto/decision.js +48 -0
- package/dist/transport/auto/fallback.d.ts +16 -0
- package/dist/transport/auto/fallback.js +75 -0
- package/dist/transport/auto/index.d.ts +2 -0
- package/dist/transport/auto/index.js +2 -0
- package/dist/transport/auto/transport.d.ts +37 -0
- package/dist/transport/auto/transport.js +140 -0
- package/dist/transport/auto/warning.d.ts +13 -0
- package/dist/transport/auto/warning.js +18 -0
- package/dist/transport/deadline.d.ts +11 -0
- package/dist/transport/deadline.js +39 -0
- package/dist/transport/failure.d.ts +7 -0
- package/dist/transport/failure.js +9 -0
- package/dist/transport/http/index.d.ts +1 -0
- package/dist/transport/http/index.js +1 -0
- package/dist/transport/http/response.d.ts +8 -0
- package/dist/transport/http/response.js +79 -0
- package/dist/transport/http/stream.d.ts +26 -0
- package/dist/transport/http/stream.js +214 -0
- package/dist/transport/http/transport.d.ts +32 -0
- package/dist/transport/http/transport.js +343 -0
- package/dist/transport/index.d.ts +2 -8
- package/dist/transport/index.js +1 -6
- package/dist/transport/transport.d.ts +34 -0
- package/dist/transport/transport.js +1 -0
- package/dist/transport/websocket/connection.d.ts +38 -0
- package/dist/transport/websocket/connection.js +284 -0
- package/dist/transport/websocket/exchange.d.ts +46 -0
- package/dist/transport/websocket/exchange.js +300 -0
- package/dist/transport/websocket/index.d.ts +1 -0
- package/dist/transport/websocket/index.js +1 -0
- package/dist/transport/websocket/transport.d.ts +46 -0
- package/dist/transport/websocket/transport.js +164 -0
- package/package.json +41 -35
- package/dist/auth/addressing.d.ts +0 -32
- package/dist/auth/addressing.d.ts.map +0 -1
- package/dist/auth/addressing.js +0 -36
- package/dist/auth/addressing.js.map +0 -1
- package/dist/auth/api.d.ts +0 -70
- package/dist/auth/api.d.ts.map +0 -1
- package/dist/auth/api.js +0 -36
- package/dist/auth/api.js.map +0 -1
- package/dist/auth/batch.d.ts +0 -18
- package/dist/auth/batch.d.ts.map +0 -1
- package/dist/auth/batch.js +0 -25
- package/dist/auth/batch.js.map +0 -1
- package/dist/auth/composition.d.ts +0 -27
- package/dist/auth/composition.d.ts.map +0 -1
- package/dist/auth/composition.js +0 -83
- package/dist/auth/composition.js.map +0 -1
- package/dist/auth/defaults.d.ts +0 -3
- package/dist/auth/defaults.d.ts.map +0 -1
- package/dist/auth/defaults.js +0 -3
- package/dist/auth/defaults.js.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/minting.d.ts +0 -35
- package/dist/auth/minting.d.ts.map +0 -1
- package/dist/auth/minting.js +0 -31
- package/dist/auth/minting.js.map +0 -1
- package/dist/auth/permissions.d.ts +0 -55
- package/dist/auth/permissions.d.ts.map +0 -1
- package/dist/auth/permissions.js +0 -47
- package/dist/auth/permissions.js.map +0 -1
- package/dist/auth/principal.d.ts +0 -19
- package/dist/auth/principal.d.ts.map +0 -1
- package/dist/auth/principal.js +0 -46
- package/dist/auth/principal.js.map +0 -1
- package/dist/auth/shorthands.d.ts +0 -19
- package/dist/auth/shorthands.d.ts.map +0 -1
- package/dist/auth/shorthands.js +0 -27
- package/dist/auth/shorthands.js.map +0 -1
- package/dist/client/batch.d.ts +0 -26
- package/dist/client/batch.d.ts.map +0 -1
- package/dist/client/batch.js +0 -8
- package/dist/client/batch.js.map +0 -1
- package/dist/client/bound.d.ts +0 -27
- package/dist/client/bound.d.ts.map +0 -1
- package/dist/client/bound.js +0 -14
- package/dist/client/bound.js.map +0 -1
- package/dist/client/client.d.ts.map +0 -1
- package/dist/client/client.js.map +0 -1
- package/dist/client/config.d.ts +0 -112
- package/dist/client/config.d.ts.map +0 -1
- package/dist/client/config.js +0 -10
- package/dist/client/config.js.map +0 -1
- package/dist/client/fn-map.d.ts +0 -61
- package/dist/client/fn-map.d.ts.map +0 -1
- package/dist/client/fn-map.js +0 -2
- package/dist/client/fn-map.js.map +0 -1
- package/dist/client/freeze.d.ts +0 -32
- package/dist/client/freeze.d.ts.map +0 -1
- package/dist/client/freeze.js +0 -42
- package/dist/client/freeze.js.map +0 -1
- package/dist/client/hooks.d.ts +0 -49
- package/dist/client/hooks.d.ts.map +0 -1
- package/dist/client/hooks.js +0 -2
- package/dist/client/hooks.js.map +0 -1
- package/dist/errors/errors.d.ts +0 -156
- package/dist/errors/errors.d.ts.map +0 -1
- package/dist/errors/errors.js +0 -238
- package/dist/errors/errors.js.map +0 -1
- package/dist/errors/guards.d.ts +0 -39
- package/dist/errors/guards.d.ts.map +0 -1
- package/dist/errors/guards.js +0 -127
- package/dist/errors/guards.js.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js.map +0 -1
- package/dist/errors/session-error.d.ts.map +0 -1
- package/dist/errors/session-error.js.map +0 -1
- package/dist/graph/api.d.ts +0 -85
- package/dist/graph/api.d.ts.map +0 -1
- package/dist/graph/api.js +0 -66
- package/dist/graph/api.js.map +0 -1
- package/dist/graph/index.d.ts.map +0 -1
- package/dist/graph/index.js.map +0 -1
- package/dist/graph/mutate/builder.d.ts +0 -108
- package/dist/graph/mutate/builder.d.ts.map +0 -1
- package/dist/graph/mutate/builder.js +0 -127
- package/dist/graph/mutate/builder.js.map +0 -1
- package/dist/graph/mutate/index.d.ts +0 -5
- package/dist/graph/mutate/index.d.ts.map +0 -1
- package/dist/graph/mutate/index.js +0 -3
- package/dist/graph/mutate/index.js.map +0 -1
- package/dist/graph/mutate/shorthands.d.ts +0 -42
- package/dist/graph/mutate/shorthands.d.ts.map +0 -1
- package/dist/graph/mutate/shorthands.js +0 -65
- package/dist/graph/mutate/shorthands.js.map +0 -1
- package/dist/graph/named.d.ts +0 -38
- package/dist/graph/named.d.ts.map +0 -1
- package/dist/graph/named.js +0 -47
- package/dist/graph/named.js.map +0 -1
- package/dist/graph/query/builder.d.ts +0 -116
- package/dist/graph/query/builder.d.ts.map +0 -1
- package/dist/graph/query/builder.js +0 -136
- package/dist/graph/query/builder.js.map +0 -1
- package/dist/graph/query/edge-ref.d.ts +0 -13
- package/dist/graph/query/edge-ref.d.ts.map +0 -1
- package/dist/graph/query/edge-ref.js +0 -56
- package/dist/graph/query/edge-ref.js.map +0 -1
- package/dist/graph/query/edges.d.ts +0 -10
- package/dist/graph/query/edges.d.ts.map +0 -1
- package/dist/graph/query/edges.js +0 -11
- package/dist/graph/query/edges.js.map +0 -1
- package/dist/graph/query/errors.d.ts +0 -31
- package/dist/graph/query/errors.d.ts.map +0 -1
- package/dist/graph/query/errors.js +0 -28
- package/dist/graph/query/errors.js.map +0 -1
- package/dist/graph/query/filter.d.ts +0 -50
- package/dist/graph/query/filter.d.ts.map +0 -1
- package/dist/graph/query/filter.js +0 -32
- package/dist/graph/query/filter.js.map +0 -1
- package/dist/graph/query/index.d.ts +0 -12
- package/dist/graph/query/index.d.ts.map +0 -1
- package/dist/graph/query/index.js +0 -7
- package/dist/graph/query/index.js.map +0 -1
- package/dist/graph/query/lower.d.ts +0 -30
- package/dist/graph/query/lower.d.ts.map +0 -1
- package/dist/graph/query/lower.js +0 -171
- package/dist/graph/query/lower.js.map +0 -1
- package/dist/graph/query/shorthands.d.ts +0 -34
- package/dist/graph/query/shorthands.d.ts.map +0 -1
- package/dist/graph/query/shorthands.js +0 -71
- package/dist/graph/query/shorthands.js.map +0 -1
- package/dist/graph/query/traverse.d.ts +0 -59
- package/dist/graph/query/traverse.d.ts.map +0 -1
- package/dist/graph/query/traverse.js +0 -144
- package/dist/graph/query/traverse.js.map +0 -1
- package/dist/graph/reconcile/execute.d.ts +0 -8
- package/dist/graph/reconcile/execute.d.ts.map +0 -1
- package/dist/graph/reconcile/execute.js +0 -56
- package/dist/graph/reconcile/execute.js.map +0 -1
- package/dist/graph/reconcile/index.d.ts +0 -5
- package/dist/graph/reconcile/index.d.ts.map +0 -1
- package/dist/graph/reconcile/index.js +0 -3
- package/dist/graph/reconcile/index.js.map +0 -1
- package/dist/graph/reconcile/input.d.ts +0 -80
- package/dist/graph/reconcile/input.d.ts.map +0 -1
- package/dist/graph/reconcile/input.js +0 -5
- package/dist/graph/reconcile/input.js.map +0 -1
- package/dist/graph/reconcile/normalize.d.ts +0 -3
- package/dist/graph/reconcile/normalize.d.ts.map +0 -1
- package/dist/graph/reconcile/normalize.js +0 -144
- package/dist/graph/reconcile/normalize.js.map +0 -1
- package/dist/graph/reconcile/result.d.ts +0 -19
- package/dist/graph/reconcile/result.d.ts.map +0 -1
- package/dist/graph/reconcile/result.js +0 -95
- package/dist/graph/reconcile/result.js.map +0 -1
- package/dist/graph/reconcile/scope.d.ts +0 -6
- package/dist/graph/reconcile/scope.d.ts.map +0 -1
- package/dist/graph/reconcile/scope.js +0 -69
- package/dist/graph/reconcile/scope.js.map +0 -1
- package/dist/graph/result/envelope.d.ts +0 -37
- package/dist/graph/result/envelope.d.ts.map +0 -1
- package/dist/graph/result/envelope.js +0 -59
- package/dist/graph/result/envelope.js.map +0 -1
- package/dist/graph/result/index.d.ts +0 -6
- package/dist/graph/result/index.d.ts.map +0 -1
- package/dist/graph/result/index.js +0 -4
- package/dist/graph/result/index.js.map +0 -1
- package/dist/graph/result/next.d.ts +0 -16
- package/dist/graph/result/next.d.ts.map +0 -1
- package/dist/graph/result/next.js +0 -77
- package/dist/graph/result/next.js.map +0 -1
- package/dist/graph/result/paged.d.ts +0 -30
- package/dist/graph/result/paged.d.ts.map +0 -1
- package/dist/graph/result/paged.js +0 -41
- package/dist/graph/result/paged.js.map +0 -1
- package/dist/graph/wire.d.ts +0 -33
- package/dist/graph/wire.d.ts.map +0 -1
- package/dist/graph/wire.js +0 -16
- package/dist/graph/wire.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/pacer/batcher.d.ts +0 -11
- package/dist/pacer/batcher.d.ts.map +0 -1
- package/dist/pacer/batcher.js +0 -15
- package/dist/pacer/batcher.js.map +0 -1
- package/dist/pacer/defaults.d.ts +0 -18
- package/dist/pacer/defaults.d.ts.map +0 -1
- package/dist/pacer/defaults.js +0 -18
- package/dist/pacer/defaults.js.map +0 -1
- package/dist/pacer/index.d.ts.map +0 -1
- package/dist/pacer/index.js.map +0 -1
- package/dist/pacer/queue.d.ts +0 -11
- package/dist/pacer/queue.d.ts.map +0 -1
- package/dist/pacer/queue.js +0 -15
- package/dist/pacer/queue.js.map +0 -1
- package/dist/pacer/rate-limiter.d.ts +0 -11
- package/dist/pacer/rate-limiter.d.ts.map +0 -1
- package/dist/pacer/rate-limiter.js +0 -15
- package/dist/pacer/rate-limiter.js.map +0 -1
- package/dist/pacer/retry.d.ts +0 -14
- package/dist/pacer/retry.d.ts.map +0 -1
- package/dist/pacer/retry.js +0 -50
- package/dist/pacer/retry.js.map +0 -1
- package/dist/pool/errors.d.ts +0 -13
- package/dist/pool/errors.d.ts.map +0 -1
- package/dist/pool/errors.js +0 -16
- package/dist/pool/errors.js.map +0 -1
- package/dist/pool/index.d.ts.map +0 -1
- package/dist/pool/index.js.map +0 -1
- package/dist/pool/pool.d.ts.map +0 -1
- package/dist/pool/pool.js.map +0 -1
- package/dist/schema/bound/binder.d.ts +0 -49
- package/dist/schema/bound/binder.d.ts.map +0 -1
- package/dist/schema/bound/binder.js +0 -195
- package/dist/schema/bound/binder.js.map +0 -1
- package/dist/schema/bound/bound-node.d.ts +0 -105
- package/dist/schema/bound/bound-node.d.ts.map +0 -1
- package/dist/schema/bound/bound-node.js +0 -128
- package/dist/schema/bound/bound-node.js.map +0 -1
- package/dist/schema/bound/index.d.ts +0 -10
- package/dist/schema/bound/index.d.ts.map +0 -1
- package/dist/schema/bound/index.js +0 -5
- package/dist/schema/bound/index.js.map +0 -1
- package/dist/schema/bound/view.d.ts +0 -44
- package/dist/schema/bound/view.d.ts.map +0 -1
- package/dist/schema/bound/view.js +0 -117
- package/dist/schema/bound/view.js.map +0 -1
- package/dist/schema/bound/write-props.d.ts +0 -38
- package/dist/schema/bound/write-props.d.ts.map +0 -1
- package/dist/schema/bound/write-props.js +0 -2
- package/dist/schema/bound/write-props.js.map +0 -1
- package/dist/schema/call-args.d.ts +0 -6
- package/dist/schema/call-args.d.ts.map +0 -1
- package/dist/schema/call-args.js +0 -21
- package/dist/schema/call-args.js.map +0 -1
- package/dist/schema/class-proxy.d.ts +0 -11
- package/dist/schema/class-proxy.d.ts.map +0 -1
- package/dist/schema/class-proxy.js +0 -46
- package/dist/schema/class-proxy.js.map +0 -1
- package/dist/schema/extract.d.ts +0 -24
- package/dist/schema/extract.d.ts.map +0 -1
- package/dist/schema/extract.js +0 -45
- package/dist/schema/extract.js.map +0 -1
- package/dist/schema/from-entries.d.ts +0 -12
- package/dist/schema/from-entries.d.ts.map +0 -1
- package/dist/schema/from-entries.js +0 -39
- package/dist/schema/from-entries.js.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/index.js.map +0 -1
- package/dist/schema/known-dispatch.d.ts +0 -6
- package/dist/schema/known-dispatch.d.ts.map +0 -1
- package/dist/schema/known-dispatch.js +0 -39
- package/dist/schema/known-dispatch.js.map +0 -1
- package/dist/schema/node-proxy.d.ts +0 -21
- package/dist/schema/node-proxy.d.ts.map +0 -1
- package/dist/schema/node-proxy.js +0 -75
- package/dist/schema/node-proxy.js.map +0 -1
- package/dist/schema/persistence.d.ts +0 -31
- package/dist/schema/persistence.d.ts.map +0 -1
- package/dist/schema/persistence.js +0 -2
- package/dist/schema/persistence.js.map +0 -1
- package/dist/schema/proxy-types.d.ts +0 -131
- package/dist/schema/proxy-types.d.ts.map +0 -1
- package/dist/schema/proxy-types.js +0 -2
- package/dist/schema/proxy-types.js.map +0 -1
- package/dist/schema/registry.d.ts +0 -50
- package/dist/schema/registry.d.ts.map +0 -1
- package/dist/schema/registry.js +0 -110
- package/dist/schema/registry.js.map +0 -1
- package/dist/schema/resolve.d.ts +0 -26
- package/dist/schema/resolve.d.ts.map +0 -1
- package/dist/schema/resolve.js +0 -27
- package/dist/schema/resolve.js.map +0 -1
- package/dist/schema/typed-client.d.ts +0 -10
- package/dist/schema/typed-client.d.ts.map +0 -1
- package/dist/schema/typed-client.js +0 -26
- package/dist/schema/typed-client.js.map +0 -1
- package/dist/schema/types.d.ts +0 -9
- package/dist/schema/types.d.ts.map +0 -1
- package/dist/schema/types.js +0 -2
- package/dist/schema/types.js.map +0 -1
- package/dist/session/bound.d.ts.map +0 -1
- package/dist/session/bound.js.map +0 -1
- package/dist/session/client-session.d.ts +0 -72
- package/dist/session/client-session.d.ts.map +0 -1
- package/dist/session/client-session.js +0 -673
- package/dist/session/client-session.js.map +0 -1
- package/dist/session/config.d.ts +0 -168
- package/dist/session/config.d.ts.map +0 -1
- package/dist/session/config.js +0 -2
- package/dist/session/config.js.map +0 -1
- package/dist/session/delegation/cache.d.ts +0 -139
- package/dist/session/delegation/cache.d.ts.map +0 -1
- package/dist/session/delegation/cache.js +0 -256
- package/dist/session/delegation/cache.js.map +0 -1
- package/dist/session/delegation/errors.d.ts +0 -44
- package/dist/session/delegation/errors.d.ts.map +0 -1
- package/dist/session/delegation/errors.js +0 -62
- package/dist/session/delegation/errors.js.map +0 -1
- package/dist/session/delegation/policy.d.ts +0 -183
- package/dist/session/delegation/policy.d.ts.map +0 -1
- package/dist/session/delegation/policy.js +0 -114
- package/dist/session/delegation/policy.js.map +0 -1
- package/dist/session/delegation/utils.d.ts +0 -4
- package/dist/session/delegation/utils.d.ts.map +0 -1
- package/dist/session/delegation/utils.js +0 -12
- package/dist/session/delegation/utils.js.map +0 -1
- package/dist/session/delegation-mint.d.ts +0 -13
- package/dist/session/delegation-mint.d.ts.map +0 -1
- package/dist/session/delegation-mint.js +0 -39
- package/dist/session/delegation-mint.js.map +0 -1
- package/dist/session/dispatch-routes.d.ts +0 -27
- package/dist/session/dispatch-routes.d.ts.map +0 -1
- package/dist/session/dispatch-routes.js +0 -77
- package/dist/session/dispatch-routes.js.map +0 -1
- package/dist/session/errors/index.d.ts +0 -6
- package/dist/session/errors/index.d.ts.map +0 -1
- package/dist/session/errors/index.js +0 -8
- package/dist/session/errors/index.js.map +0 -1
- package/dist/session/errors/session-errors.d.ts +0 -52
- package/dist/session/errors/session-errors.d.ts.map +0 -1
- package/dist/session/errors/session-errors.js +0 -70
- package/dist/session/errors/session-errors.js.map +0 -1
- package/dist/session/forward.d.ts +0 -15
- package/dist/session/forward.d.ts.map +0 -1
- package/dist/session/forward.js +0 -40
- package/dist/session/forward.js.map +0 -1
- package/dist/session/helpers.d.ts +0 -23
- package/dist/session/helpers.d.ts.map +0 -1
- package/dist/session/helpers.js +0 -56
- package/dist/session/helpers.js.map +0 -1
- package/dist/session/hooks.d.ts +0 -140
- package/dist/session/hooks.d.ts.map +0 -1
- package/dist/session/hooks.js +0 -2
- package/dist/session/hooks.js.map +0 -1
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/index.js.map +0 -1
- package/dist/session/redirect/errors.d.ts +0 -45
- package/dist/session/redirect/errors.d.ts.map +0 -1
- package/dist/session/redirect/errors.js +0 -52
- package/dist/session/redirect/errors.js.map +0 -1
- package/dist/session/redirect/policy.d.ts +0 -79
- package/dist/session/redirect/policy.d.ts.map +0 -1
- package/dist/session/redirect/policy.js +0 -69
- package/dist/session/redirect/policy.js.map +0 -1
- package/dist/session/types.d.ts +0 -54
- package/dist/session/types.d.ts.map +0 -1
- package/dist/session/types.js +0 -2
- package/dist/session/types.js.map +0 -1
- package/dist/store/canonicalize.d.ts +0 -44
- package/dist/store/canonicalize.d.ts.map +0 -1
- package/dist/store/canonicalize.js +0 -0
- package/dist/store/canonicalize.js.map +0 -1
- package/dist/store/entities.d.ts +0 -81
- package/dist/store/entities.d.ts.map +0 -1
- package/dist/store/entities.js +0 -202
- package/dist/store/entities.js.map +0 -1
- package/dist/store/index.d.ts.map +0 -1
- package/dist/store/index.js.map +0 -1
- package/dist/store/invalidate.d.ts +0 -66
- package/dist/store/invalidate.d.ts.map +0 -1
- package/dist/store/invalidate.js +0 -117
- package/dist/store/invalidate.js.map +0 -1
- package/dist/store/memory.d.ts.map +0 -1
- package/dist/store/memory.js.map +0 -1
- package/dist/store/overlay.d.ts +0 -118
- package/dist/store/overlay.d.ts.map +0 -1
- package/dist/store/overlay.js +0 -237
- package/dist/store/overlay.js.map +0 -1
- package/dist/store/schedule.d.ts +0 -31
- package/dist/store/schedule.d.ts.map +0 -1
- package/dist/store/schedule.js +0 -76
- package/dist/store/schedule.js.map +0 -1
- package/dist/store/shapes.d.ts +0 -92
- package/dist/store/shapes.d.ts.map +0 -1
- package/dist/store/shapes.js +0 -369
- package/dist/store/shapes.js.map +0 -1
- package/dist/store/types.d.ts +0 -168
- package/dist/store/types.d.ts.map +0 -1
- package/dist/store/types.js +0 -7
- package/dist/store/types.js.map +0 -1
- package/dist/transport/binary.d.ts +0 -15
- package/dist/transport/binary.d.ts.map +0 -1
- package/dist/transport/binary.js +0 -2
- package/dist/transport/binary.js.map +0 -1
- package/dist/transport/contract.d.ts +0 -58
- package/dist/transport/contract.d.ts.map +0 -1
- package/dist/transport/contract.js +0 -11
- package/dist/transport/contract.js.map +0 -1
- package/dist/transport/fetch.d.ts +0 -31
- package/dist/transport/fetch.d.ts.map +0 -1
- package/dist/transport/fetch.js +0 -78
- package/dist/transport/fetch.js.map +0 -1
- package/dist/transport/http-envelope.d.ts +0 -49
- package/dist/transport/http-envelope.d.ts.map +0 -1
- package/dist/transport/http-envelope.js +0 -418
- package/dist/transport/http-envelope.js.map +0 -1
- package/dist/transport/http-routed.d.ts +0 -61
- package/dist/transport/http-routed.d.ts.map +0 -1
- package/dist/transport/http-routed.js +0 -409
- package/dist/transport/http-routed.js.map +0 -1
- package/dist/transport/index.d.ts.map +0 -1
- package/dist/transport/index.js.map +0 -1
- package/dist/transport/request-id.d.ts +0 -9
- package/dist/transport/request-id.d.ts.map +0 -1
- package/dist/transport/request-id.js +0 -12
- package/dist/transport/request-id.js.map +0 -1
- package/dist/transport/ws-envelope.d.ts +0 -74
- package/dist/transport/ws-envelope.d.ts.map +0 -1
- package/dist/transport/ws-envelope.js +0 -567
- package/dist/transport/ws-envelope.js.map +0 -1
- package/dist/util/race-signal.d.ts +0 -12
- package/dist/util/race-signal.d.ts.map +0 -1
- package/dist/util/race-signal.js +0 -34
- package/dist/util/race-signal.js.map +0 -1
- package/dist/wire/controller.d.ts +0 -38
- package/dist/wire/controller.d.ts.map +0 -1
- package/dist/wire/controller.js +0 -38
- package/dist/wire/controller.js.map +0 -1
- package/dist/wire/index.d.ts +0 -7
- package/dist/wire/index.d.ts.map +0 -1
- package/dist/wire/index.js +0 -4
- package/dist/wire/index.js.map +0 -1
- package/dist/wire/meta.d.ts +0 -81
- package/dist/wire/meta.d.ts.map +0 -1
- package/dist/wire/meta.js +0 -44
- package/dist/wire/meta.js.map +0 -1
- package/dist/wire/sse.d.ts +0 -67
- package/dist/wire/sse.d.ts.map +0 -1
- package/dist/wire/sse.js +0 -170
- package/dist/wire/sse.js.map +0 -1
|
@@ -1,673 +0,0 @@
|
|
|
1
|
-
import { SELF_DELEGATION } from '../auth/defaults.js';
|
|
2
|
-
import { KernelClient as KernelClientImpl } from '../client/client.js';
|
|
3
|
-
import { withDetails } from '../errors/errors.js';
|
|
4
|
-
import { PoolClosedError } from '../pool/errors.js';
|
|
5
|
-
import { ClientPool as ClientPoolImpl } from '../pool/pool.js';
|
|
6
|
-
import { SchemaRegistry } from '../schema/registry.js';
|
|
7
|
-
import { createSchemaClient } from '../schema/typed-client.js';
|
|
8
|
-
import { createBoundSessionView } from './bound.js';
|
|
9
|
-
import { DelegationCache as DelegationCacheImpl, delegationCacheKey } from './delegation/cache.js';
|
|
10
|
-
import { DelegationPolicyError, DelegationRefusedError } from './delegation/errors.js';
|
|
11
|
-
import { allowAllDelegations } from './delegation/policy.js';
|
|
12
|
-
import { DispatchRouteCache } from './dispatch-routes.js';
|
|
13
|
-
import { IdentityPickerError, PersistenceLoadFailedError, RegistryWriteFailedError, SchemaOwnershipConflictError, UnresolvedIdentityError, } from './errors/session-errors.js';
|
|
14
|
-
import { forwardedFor } from './forward.js';
|
|
15
|
-
import { classifyError, freezeHops, generateCid, unwrapResult } from './helpers.js';
|
|
16
|
-
import { HopLimitExceededError, RedirectPolicyError, RedirectRefusedError, } from './redirect/errors.js';
|
|
17
|
-
import { allowAllPolicy } from './redirect/policy.js';
|
|
18
|
-
const DEFAULT_MAX_HOPS = 1;
|
|
19
|
-
/**
|
|
20
|
-
* ClientSession — the orchestration layer above `KernelClient`.
|
|
21
|
-
*
|
|
22
|
-
* Composes `ClientPool`, `DelegationCache`, `DelegationPolicy`,
|
|
23
|
-
* `RedirectPolicy`, and `SchemaPersistence` into a single call
|
|
24
|
-
* surface. See `docs/specs/kernel-client-session.md`.
|
|
25
|
-
*/
|
|
26
|
-
export class ClientSession {
|
|
27
|
-
default;
|
|
28
|
-
registry;
|
|
29
|
-
#pool;
|
|
30
|
-
#delegation;
|
|
31
|
-
#delegationPolicy;
|
|
32
|
-
#redirect;
|
|
33
|
-
#identity;
|
|
34
|
-
#hooks;
|
|
35
|
-
#logger;
|
|
36
|
-
#schemaStore;
|
|
37
|
-
#ownsRegistry;
|
|
38
|
-
#ownsPool;
|
|
39
|
-
#maxHops;
|
|
40
|
-
#routes;
|
|
41
|
-
#closed = false;
|
|
42
|
-
#constructionReady = null;
|
|
43
|
-
#pendingMints = new Map();
|
|
44
|
-
#mintInvocations = new Map();
|
|
45
|
-
constructor(config) {
|
|
46
|
-
if (!config.default)
|
|
47
|
-
throw new Error('ClientSessionConfig.default is required');
|
|
48
|
-
this.default = config.default;
|
|
49
|
-
this.#identity = config.identity;
|
|
50
|
-
this.#hooks = config.hooks ?? {};
|
|
51
|
-
this.#logger = config.logger ?? console;
|
|
52
|
-
this.#maxHops = config.maxHops ?? DEFAULT_MAX_HOPS;
|
|
53
|
-
this.#routes =
|
|
54
|
-
config.routes instanceof DispatchRouteCache
|
|
55
|
-
? config.routes
|
|
56
|
-
: new DispatchRouteCache(config.routes);
|
|
57
|
-
const schemaStore = config.schemaStore;
|
|
58
|
-
this.#schemaStore = schemaStore;
|
|
59
|
-
const schema = config.schema;
|
|
60
|
-
if (SchemaRegistry.is(schema)) {
|
|
61
|
-
if (schemaStore)
|
|
62
|
-
throw new SchemaOwnershipConflictError();
|
|
63
|
-
this.registry = schema;
|
|
64
|
-
this.#ownsRegistry = false;
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
this.registry = new SchemaRegistry();
|
|
68
|
-
this.#ownsRegistry = true;
|
|
69
|
-
if (Array.isArray(schema) && schema.length > 0)
|
|
70
|
-
this.registry.load(schema);
|
|
71
|
-
}
|
|
72
|
-
this.#redirect = config.redirect ?? allowAllPolicy();
|
|
73
|
-
// Wrap caller-provided cache config so ClientSession can fire `onDelegationMint`
|
|
74
|
-
// with waiter cids. Pre-constructed caches pass through — caller owns the
|
|
75
|
-
// mint and ClientSession doesn't intercept.
|
|
76
|
-
if (config.delegation) {
|
|
77
|
-
if (config.delegation instanceof DelegationCacheImpl) {
|
|
78
|
-
this.#delegation = config.delegation;
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
const userConfig = config.delegation;
|
|
82
|
-
this.#delegation = new DelegationCacheImpl({
|
|
83
|
-
...userConfig,
|
|
84
|
-
mint: this.wrapMint(userConfig.mint, userConfig.ttl ?? 300),
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
this.#delegationPolicy =
|
|
89
|
-
config.delegationPolicy ?? allowAllDelegations({ default: this.default });
|
|
90
|
-
// Externally-constructed pools are caller-owned and survive disconnect();
|
|
91
|
-
// ClientSession only tears down pools it constructed itself.
|
|
92
|
-
if (config.pool instanceof ClientPoolImpl) {
|
|
93
|
-
this.#pool = config.pool;
|
|
94
|
-
this.#ownsPool = false;
|
|
95
|
-
}
|
|
96
|
-
else if (config.pool) {
|
|
97
|
-
this.#pool = new ClientPoolImpl(config.pool);
|
|
98
|
-
this.#ownsPool = true;
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
const registry = this.registry;
|
|
102
|
-
this.#pool = new ClientPoolImpl({
|
|
103
|
-
clientFactory: (url) => new KernelClientImpl({
|
|
104
|
-
url,
|
|
105
|
-
schema: registry,
|
|
106
|
-
hooks: undefined,
|
|
107
|
-
fetch: config.fetch,
|
|
108
|
-
}),
|
|
109
|
-
});
|
|
110
|
-
this.#ownsPool = true;
|
|
111
|
-
}
|
|
112
|
-
if (this.#schemaStore && this.#ownsRegistry) {
|
|
113
|
-
this.#constructionReady = this.hydrate(config.schema);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Idempotent teardown. Tears down the pool (and every cached client).
|
|
118
|
-
* Registry, schema store, and delegation cache are untouched — they may
|
|
119
|
-
* be shared across ClientSessions.
|
|
120
|
-
*/
|
|
121
|
-
disconnect() {
|
|
122
|
-
if (this.#closed)
|
|
123
|
-
return;
|
|
124
|
-
this.#closed = true;
|
|
125
|
-
if (this.#ownsPool)
|
|
126
|
-
this.#pool.disconnect();
|
|
127
|
-
}
|
|
128
|
-
get pool() {
|
|
129
|
-
return this.#pool;
|
|
130
|
-
}
|
|
131
|
-
get delegation() {
|
|
132
|
-
return this.#delegation;
|
|
133
|
-
}
|
|
134
|
-
describe(method) {
|
|
135
|
-
return this.registry.resolve(method);
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Await schema-persistence hydration. Every dispatch primitive awaits this
|
|
139
|
-
* implicitly; consumers can await it explicitly to front-load load failures.
|
|
140
|
-
*/
|
|
141
|
-
async ready() {
|
|
142
|
-
if (this.#constructionReady)
|
|
143
|
-
await this.#constructionReady;
|
|
144
|
-
}
|
|
145
|
-
// ─── Dispatch primitives ───────────────────────────────────────────────────
|
|
146
|
-
async call(method, params, opts) {
|
|
147
|
-
return this.dispatch('call', method, params, opts);
|
|
148
|
-
}
|
|
149
|
-
async stream(method, params, opts) {
|
|
150
|
-
return this.dispatch('stream', method, params, opts);
|
|
151
|
-
}
|
|
152
|
-
async binary(method, params, opts) {
|
|
153
|
-
return this.dispatch('binary', method, params, opts);
|
|
154
|
-
}
|
|
155
|
-
signal(method, params, opts) {
|
|
156
|
-
if (this.#closed)
|
|
157
|
-
throw new PoolClosedError();
|
|
158
|
-
// Fire-and-forget: background task runs the same pre-dispatch delegation
|
|
159
|
-
// logic as `call`; errors surface via `onError`.
|
|
160
|
-
const initialTarget = opts?.url ?? this.default;
|
|
161
|
-
const cid = opts?.correlationId ?? generateCid();
|
|
162
|
-
void this.runSignal(method, params, opts, cid).catch((err) => {
|
|
163
|
-
const context = classifyError(err);
|
|
164
|
-
void this.fireError(err, method, params, (opts?.credential ?? ''), initialTarget, cid, opts?.maxHops ?? this.#maxHops, [{ url: initialTarget, at: Date.now() }], context);
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
// ─── Bound view + schema proxy ────────────────────────────────────────────
|
|
168
|
-
as(credential, opts) {
|
|
169
|
-
return createBoundSessionView(this, credential, opts);
|
|
170
|
-
}
|
|
171
|
-
withSchema(schema) {
|
|
172
|
-
return createSchemaClient(async (method, params, credential, callOpts) => {
|
|
173
|
-
const shellOpts = {};
|
|
174
|
-
if (callOpts?.timeout !== undefined)
|
|
175
|
-
shellOpts.timeout = callOpts.timeout;
|
|
176
|
-
if (callOpts?.signal !== undefined)
|
|
177
|
-
shellOpts.signal = callOpts.signal;
|
|
178
|
-
if (callOpts?.class !== undefined)
|
|
179
|
-
shellOpts.class = callOpts.class;
|
|
180
|
-
if (callOpts?.correlationId !== undefined)
|
|
181
|
-
shellOpts.correlationId = callOpts.correlationId;
|
|
182
|
-
if (callOpts?.url !== undefined)
|
|
183
|
-
shellOpts.url = callOpts.url;
|
|
184
|
-
if (callOpts?.delegation !== undefined)
|
|
185
|
-
shellOpts.delegation = callOpts.delegation;
|
|
186
|
-
if (callOpts?.attestation !== undefined)
|
|
187
|
-
shellOpts.attestation = callOpts.attestation;
|
|
188
|
-
if (callOpts?.skipDelegation !== undefined)
|
|
189
|
-
shellOpts.skipDelegation = callOpts.skipDelegation;
|
|
190
|
-
if (callOpts?.maxHops !== undefined)
|
|
191
|
-
shellOpts.maxHops = callOpts.maxHops;
|
|
192
|
-
if (callOpts?.self !== undefined)
|
|
193
|
-
shellOpts.self = callOpts.self;
|
|
194
|
-
if (credential !== undefined)
|
|
195
|
-
shellOpts.credential = credential;
|
|
196
|
-
return this.call(method, params, shellOpts);
|
|
197
|
-
}, schema);
|
|
198
|
-
}
|
|
199
|
-
// ─── Internal dispatch loop ───────────────────────────────────────────────
|
|
200
|
-
async dispatch(kind, method, params, opts) {
|
|
201
|
-
if (this.#closed)
|
|
202
|
-
throw new PoolClosedError();
|
|
203
|
-
// Seed values so the outer catch can build a ClientSessionErrorCtx even when
|
|
204
|
-
// identity-resolution or persistence-hydration is what threw.
|
|
205
|
-
const cid = opts?.correlationId ?? generateCid();
|
|
206
|
-
const initialTarget = opts?.url ?? this.default;
|
|
207
|
-
const effectiveMaxHops = opts?.maxHops ?? this.#maxHops;
|
|
208
|
-
const hops = [{ url: initialTarget, at: Date.now() }];
|
|
209
|
-
const startedAt = Date.now();
|
|
210
|
-
let baseCred = (opts?.credential ?? '');
|
|
211
|
-
let target = initialTarget;
|
|
212
|
-
let directTarget = false;
|
|
213
|
-
let hopIndex = 0;
|
|
214
|
-
let dispatchMethod = method;
|
|
215
|
-
// Replaced (not merged) by `redirection.self` on each hop.
|
|
216
|
-
let currentSelf = opts?.self;
|
|
217
|
-
// The audience the kernel told us this hop's target expects (`redirection.iss`).
|
|
218
|
-
let currentIss;
|
|
219
|
-
try {
|
|
220
|
-
// Hydration + identity-resolve inside try so their errors route through
|
|
221
|
-
// `onError` instead of escaping as unclassified rejections.
|
|
222
|
-
await this.ready();
|
|
223
|
-
baseCred = await this.resolveIdentity(opts);
|
|
224
|
-
const route = await this.#routes.resolve(method, params, opts, this.registry);
|
|
225
|
-
if (route) {
|
|
226
|
-
target = route.url;
|
|
227
|
-
dispatchMethod = route.method;
|
|
228
|
-
currentSelf = route.self;
|
|
229
|
-
currentIss = route.iss;
|
|
230
|
-
directTarget = true;
|
|
231
|
-
hops[0] = { url: target, at: hops[0].at };
|
|
232
|
-
}
|
|
233
|
-
const beforeCtx = {
|
|
234
|
-
method: dispatchMethod,
|
|
235
|
-
params,
|
|
236
|
-
credential: baseCred,
|
|
237
|
-
url: target,
|
|
238
|
-
correlationId: cid,
|
|
239
|
-
maxHops: effectiveMaxHops,
|
|
240
|
-
};
|
|
241
|
-
await this.fire('onBeforeCall', beforeCtx);
|
|
242
|
-
while (true) {
|
|
243
|
-
const resolved = await this.resolveDelegatedCredential({
|
|
244
|
-
target,
|
|
245
|
-
method: dispatchMethod,
|
|
246
|
-
params,
|
|
247
|
-
opts,
|
|
248
|
-
cid,
|
|
249
|
-
hops,
|
|
250
|
-
baseCred,
|
|
251
|
-
beforeCtx,
|
|
252
|
-
iss: currentIss,
|
|
253
|
-
});
|
|
254
|
-
const credential = resolved.credential;
|
|
255
|
-
const delegationMintedThisHop = resolved.mintedThisHop;
|
|
256
|
-
const client = this.#pool.clientFor(target);
|
|
257
|
-
const result = await this.wireSend(client, kind, dispatchMethod, params, credential, opts, hopIndex, cid, currentSelf,
|
|
258
|
-
// Learned routes and redirect follow-ups must override schema bindings
|
|
259
|
-
// on the inner client, so the per-hop target rides as `opts.url`.
|
|
260
|
-
directTarget || hopIndex > 0 ? target : undefined);
|
|
261
|
-
if (result.kind !== 'redirect') {
|
|
262
|
-
const unwrapped = unwrapResult(result);
|
|
263
|
-
const afterCtx = Object.freeze({
|
|
264
|
-
...beforeCtx,
|
|
265
|
-
result: unwrapped,
|
|
266
|
-
hops: freezeHops(hops),
|
|
267
|
-
durationMs: Date.now() - startedAt,
|
|
268
|
-
});
|
|
269
|
-
await this.fire('onAfterCall', afterCtx);
|
|
270
|
-
return unwrapped;
|
|
271
|
-
}
|
|
272
|
-
const redirection = result.redirection;
|
|
273
|
-
// `maxHops: 0` means "refuse any redirect" — surface
|
|
274
|
-
// RedirectRefusedError, not HopLimitExceededError.
|
|
275
|
-
if (effectiveMaxHops === 0) {
|
|
276
|
-
const refusedCtx = Object.freeze({
|
|
277
|
-
...beforeCtx,
|
|
278
|
-
fromUrl: target,
|
|
279
|
-
redirection,
|
|
280
|
-
reason: 'maxHops: 0 refuses every redirect',
|
|
281
|
-
});
|
|
282
|
-
await this.fire('onRedirectRefused', refusedCtx);
|
|
283
|
-
throw new RedirectRefusedError(redirection, 'maxHops: 0 refuses every redirect');
|
|
284
|
-
}
|
|
285
|
-
if (hops.length > effectiveMaxHops) {
|
|
286
|
-
throw new HopLimitExceededError(method, freezeHops(hops));
|
|
287
|
-
}
|
|
288
|
-
let redirectDecision;
|
|
289
|
-
try {
|
|
290
|
-
redirectDecision = await this.#redirect.decide(redirection, freezeHops(hops), cid, opts?.signal);
|
|
291
|
-
}
|
|
292
|
-
catch (cause) {
|
|
293
|
-
throw new RedirectPolicyError(redirection, { cause: cause });
|
|
294
|
-
}
|
|
295
|
-
if (redirectDecision.follow === false) {
|
|
296
|
-
const refusedCtx = {
|
|
297
|
-
...beforeCtx,
|
|
298
|
-
fromUrl: target,
|
|
299
|
-
redirection,
|
|
300
|
-
reason: redirectDecision.reason,
|
|
301
|
-
};
|
|
302
|
-
await this.fire('onRedirectRefused', refusedCtx);
|
|
303
|
-
throw new RedirectRefusedError(redirection, redirectDecision.reason);
|
|
304
|
-
}
|
|
305
|
-
if (redirection.schema) {
|
|
306
|
-
try {
|
|
307
|
-
this.registry.save(redirection.schema);
|
|
308
|
-
}
|
|
309
|
-
catch (cause) {
|
|
310
|
-
throw new RegistryWriteFailedError(redirection.schema.ref, {
|
|
311
|
-
cause: cause,
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
// Persistence is best-effort: save errors surface through onError
|
|
315
|
-
// (or logger.warn fallback) and the call proceeds.
|
|
316
|
-
if (this.#ownsRegistry && this.#schemaStore) {
|
|
317
|
-
const learned = redirection.schema;
|
|
318
|
-
void this.#schemaStore.save(learned).catch((err) => {
|
|
319
|
-
if (this.#hooks.onError) {
|
|
320
|
-
const ctx = {
|
|
321
|
-
...beforeCtx,
|
|
322
|
-
error: err,
|
|
323
|
-
hops: freezeHops(hops),
|
|
324
|
-
context: 'persistence.save',
|
|
325
|
-
};
|
|
326
|
-
void this.fire('onError', ctx);
|
|
327
|
-
}
|
|
328
|
-
else {
|
|
329
|
-
this.#logger.warn?.('schemaStore.save failed', err);
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
await this.#routes.remember(dispatchMethod, opts?.class, redirection, this.registry);
|
|
335
|
-
const followCtx = Object.freeze({
|
|
336
|
-
...beforeCtx,
|
|
337
|
-
fromHop: hopIndex,
|
|
338
|
-
fromUrl: target,
|
|
339
|
-
toUrl: redirection.url,
|
|
340
|
-
redirection,
|
|
341
|
-
...(redirection.schema ? { schemaLearned: redirection.schema } : {}),
|
|
342
|
-
delegationMinted: delegationMintedThisHop,
|
|
343
|
-
});
|
|
344
|
-
await this.fire('onRedirectFollow', followCtx);
|
|
345
|
-
hops.push({ url: redirection.url, at: Date.now() });
|
|
346
|
-
target = redirection.url;
|
|
347
|
-
directTarget = false;
|
|
348
|
-
hopIndex += 1;
|
|
349
|
-
dispatchMethod = redirection.path;
|
|
350
|
-
currentSelf = redirection.self;
|
|
351
|
-
currentIss = redirection.iss;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
catch (err) {
|
|
355
|
-
const decorated = this.decorate(err, method, params, target, cid, hops);
|
|
356
|
-
const context = classifyError(decorated);
|
|
357
|
-
await this.fireError(decorated, method, params, baseCred, initialTarget, cid, effectiveMaxHops, hops, context);
|
|
358
|
-
throw decorated;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
// ─── Signal dispatch (fire-and-forget) ─────────────────────────────────────
|
|
362
|
-
async runSignal(method, params, opts, cid) {
|
|
363
|
-
// Await hydration inside runSignal so a PersistenceLoadFailedError reaches
|
|
364
|
-
// the signal's outer .catch instead of becoming an unhandled rejection on
|
|
365
|
-
// the constructor's hydration promise.
|
|
366
|
-
await this.ready();
|
|
367
|
-
const baseCred = await this.resolveIdentity(opts);
|
|
368
|
-
const route = await this.#routes.resolve(method, params, opts, this.registry);
|
|
369
|
-
const target = route?.url ?? opts?.url ?? this.default;
|
|
370
|
-
const dispatchMethod = route?.method ?? method;
|
|
371
|
-
const selfOverride = route?.self ?? opts?.self;
|
|
372
|
-
const resolved = await this.resolveDelegatedCredential({
|
|
373
|
-
target,
|
|
374
|
-
method: dispatchMethod,
|
|
375
|
-
params,
|
|
376
|
-
opts,
|
|
377
|
-
cid,
|
|
378
|
-
hops: [{ url: target, at: Date.now() }],
|
|
379
|
-
baseCred,
|
|
380
|
-
// Signals surface delegation refusal via `onError`, not the paired
|
|
381
|
-
// `onDelegationRefused` hook — undefined disables it in the helper.
|
|
382
|
-
beforeCtx: undefined,
|
|
383
|
-
iss: route?.iss,
|
|
384
|
-
});
|
|
385
|
-
const credential = resolved.credential;
|
|
386
|
-
const client = this.#pool.clientFor(target);
|
|
387
|
-
client.signal(dispatchMethod, params, credential, {
|
|
388
|
-
...forwardedFor(opts, 0, route ? target : undefined),
|
|
389
|
-
correlationId: cid,
|
|
390
|
-
...(selfOverride !== undefined ? { self: selfOverride } : {}),
|
|
391
|
-
});
|
|
392
|
-
await this.fire('onAfterSignal', {
|
|
393
|
-
method: dispatchMethod,
|
|
394
|
-
params,
|
|
395
|
-
url: target,
|
|
396
|
-
correlationId: cid,
|
|
397
|
-
dispatchedAt: Date.now(),
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
// ─── Helpers ───────────────────────────────────────────────────────────────
|
|
401
|
-
/**
|
|
402
|
-
* Wrap the caller's mint to fire `onDelegationMint` with the list of
|
|
403
|
-
* waiter cids — read AFTER the mint resolves so late joiners to the dedup
|
|
404
|
-
* are included.
|
|
405
|
-
*/
|
|
406
|
-
wrapMint(userMint, defaultTtl) {
|
|
407
|
-
return async (audience, delegation, attestation, context) => {
|
|
408
|
-
const key = delegationCacheKey(audience, delegation, attestation, context?.authority);
|
|
409
|
-
// Bump before awaiting so a synchronous before/after snapshot in
|
|
410
|
-
// dispatch observes the increment even across microtask re-entry.
|
|
411
|
-
this.#mintInvocations.set(key, (this.#mintInvocations.get(key) ?? 0) + 1);
|
|
412
|
-
const startedAt = Date.now();
|
|
413
|
-
const result = await userMint(audience, delegation, attestation, context);
|
|
414
|
-
const durationMs = Date.now() - startedAt;
|
|
415
|
-
const pending = this.#pendingMints.get(key);
|
|
416
|
-
// `pending` is empty when a consumer called cache.get directly
|
|
417
|
-
// (bypassing ClientSession) — legal, but triggeringCorrelationIds stays [].
|
|
418
|
-
const cids = pending ? [...pending.cids] : [];
|
|
419
|
-
const firstMethod = pending?.methods[0] ?? '';
|
|
420
|
-
void this.fire('onDelegationMint', {
|
|
421
|
-
audience,
|
|
422
|
-
delegation,
|
|
423
|
-
...(attestation !== undefined ? { attestation } : {}),
|
|
424
|
-
triggeringCorrelationIds: cids,
|
|
425
|
-
triggeringMethod: firstMethod,
|
|
426
|
-
durationMs,
|
|
427
|
-
ttl: result.ttl ?? defaultTtl,
|
|
428
|
-
});
|
|
429
|
-
return result;
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
|
-
trackPendingMint(audience, delegation, attestation, authority, cid, method) {
|
|
433
|
-
const key = delegationCacheKey(audience, delegation, attestation, authority);
|
|
434
|
-
let entry = this.#pendingMints.get(key);
|
|
435
|
-
if (!entry) {
|
|
436
|
-
entry = { cids: [], methods: [] };
|
|
437
|
-
this.#pendingMints.set(key, entry);
|
|
438
|
-
}
|
|
439
|
-
entry.cids.push(cid);
|
|
440
|
-
entry.methods.push(method);
|
|
441
|
-
return key;
|
|
442
|
-
}
|
|
443
|
-
untrackPendingMint(key, cid) {
|
|
444
|
-
const entry = this.#pendingMints.get(key);
|
|
445
|
-
if (!entry)
|
|
446
|
-
return;
|
|
447
|
-
const idx = entry.cids.indexOf(cid);
|
|
448
|
-
if (idx !== -1) {
|
|
449
|
-
entry.cids.splice(idx, 1);
|
|
450
|
-
entry.methods.splice(idx, 1);
|
|
451
|
-
}
|
|
452
|
-
if (entry.cids.length === 0)
|
|
453
|
-
this.#pendingMints.delete(key);
|
|
454
|
-
}
|
|
455
|
-
async hydrate(schemaConfig) {
|
|
456
|
-
if (!this.#schemaStore)
|
|
457
|
-
return;
|
|
458
|
-
let loaded;
|
|
459
|
-
try {
|
|
460
|
-
loaded = await this.#schemaStore.load();
|
|
461
|
-
}
|
|
462
|
-
catch (cause) {
|
|
463
|
-
throw new PersistenceLoadFailedError({ cause: cause });
|
|
464
|
-
}
|
|
465
|
-
// Persisted schemas first, then the explicit `schema` array —
|
|
466
|
-
// caller-passed preload is authoritative on drift.
|
|
467
|
-
for (const entry of loaded) {
|
|
468
|
-
try {
|
|
469
|
-
this.registry.save(entry);
|
|
470
|
-
}
|
|
471
|
-
catch {
|
|
472
|
-
// Swallowed: conflicts resolve via the explicit-array pass below.
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
if (Array.isArray(schemaConfig) && schemaConfig.length > 0) {
|
|
476
|
-
for (const entry of schemaConfig) {
|
|
477
|
-
try {
|
|
478
|
-
this.registry.save(entry);
|
|
479
|
-
}
|
|
480
|
-
catch {
|
|
481
|
-
// Already loaded in constructor; re-save is best-effort.
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
async resolveIdentity(opts) {
|
|
487
|
-
if (opts?.credential !== undefined)
|
|
488
|
-
return opts.credential;
|
|
489
|
-
if (this.#identity === undefined) {
|
|
490
|
-
throw new UnresolvedIdentityError('No identity configured and no opts.credential passed — cannot dispatch');
|
|
491
|
-
}
|
|
492
|
-
if (typeof this.#identity === 'function') {
|
|
493
|
-
let resolved;
|
|
494
|
-
try {
|
|
495
|
-
resolved = await this.#identity();
|
|
496
|
-
}
|
|
497
|
-
catch (cause) {
|
|
498
|
-
throw new IdentityPickerError({ cause: cause });
|
|
499
|
-
}
|
|
500
|
-
if (resolved === undefined) {
|
|
501
|
-
throw new UnresolvedIdentityError('Identity picker returned undefined — user not signed in or session expired');
|
|
502
|
-
}
|
|
503
|
-
return resolved;
|
|
504
|
-
}
|
|
505
|
-
return this.#identity;
|
|
506
|
-
}
|
|
507
|
-
audienceFor(target, method, params, ctx) {
|
|
508
|
-
try {
|
|
509
|
-
return this.#delegationPolicy.audienceFor(target, method, params, ctx);
|
|
510
|
-
}
|
|
511
|
-
catch (cause) {
|
|
512
|
-
throw new DelegationPolicyError(undefined, { cause: cause });
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Per-hop credential resolution shared by `dispatch` and `runSignal`.
|
|
517
|
-
* Handles `skipDelegation` bypass, policy derivation (wrapped as
|
|
518
|
-
* `DelegationPolicyError` on throw), async `decide` consent + refinement,
|
|
519
|
-
* and cache lookup with pending-mint bookkeeping.
|
|
520
|
-
*
|
|
521
|
-
* Returns `mintedThisHop` for `RedirectFollowCtx.delegationMinted`, keyed
|
|
522
|
-
* off the per-key mint counter so `ttl: 0` mints and concurrent LRU
|
|
523
|
-
* eviction don't lie. `beforeCtx: undefined` disables the pre-throw
|
|
524
|
-
* `onDelegationRefused` hook (signals use `onError` instead).
|
|
525
|
-
*/
|
|
526
|
-
async resolveDelegatedCredential(args) {
|
|
527
|
-
const { target, method, params, opts, cid, hops, baseCred, beforeCtx, iss } = args;
|
|
528
|
-
if (opts?.skipDelegation) {
|
|
529
|
-
return { credential: baseCred, mintedThisHop: false };
|
|
530
|
-
}
|
|
531
|
-
const delegationCtx = {
|
|
532
|
-
target,
|
|
533
|
-
method,
|
|
534
|
-
params,
|
|
535
|
-
correlationId: cid,
|
|
536
|
-
hops,
|
|
537
|
-
...(iss !== undefined ? { iss } : {}),
|
|
538
|
-
};
|
|
539
|
-
const audience = this.audienceFor(target, method, params, delegationCtx);
|
|
540
|
-
if (audience === undefined) {
|
|
541
|
-
return { credential: baseCred, mintedThisHop: false };
|
|
542
|
-
}
|
|
543
|
-
let delegation;
|
|
544
|
-
let attestation;
|
|
545
|
-
try {
|
|
546
|
-
delegation =
|
|
547
|
-
opts?.delegation ??
|
|
548
|
-
this.#delegationPolicy.delegationFor?.(target, method, params, delegationCtx) ??
|
|
549
|
-
SELF_DELEGATION;
|
|
550
|
-
attestation =
|
|
551
|
-
opts?.attestation ??
|
|
552
|
-
this.#delegationPolicy.attestationFor?.(target, method, params, delegationCtx);
|
|
553
|
-
}
|
|
554
|
-
catch (cause) {
|
|
555
|
-
throw new DelegationPolicyError(audience, { cause: cause });
|
|
556
|
-
}
|
|
557
|
-
if (this.#delegationPolicy.decide) {
|
|
558
|
-
const preRefineDelegation = delegation;
|
|
559
|
-
const preRefineAttestation = attestation;
|
|
560
|
-
let decision;
|
|
561
|
-
try {
|
|
562
|
-
decision = await this.#delegationPolicy.decide(audience, preRefineDelegation, preRefineAttestation, delegationCtx, opts?.signal);
|
|
563
|
-
}
|
|
564
|
-
catch (cause) {
|
|
565
|
-
throw new DelegationPolicyError(audience, { cause: cause });
|
|
566
|
-
}
|
|
567
|
-
if (decision.allow === false) {
|
|
568
|
-
if (beforeCtx !== undefined) {
|
|
569
|
-
const refusedCtx = {
|
|
570
|
-
...beforeCtx,
|
|
571
|
-
target,
|
|
572
|
-
audience,
|
|
573
|
-
delegation: preRefineDelegation,
|
|
574
|
-
...(preRefineAttestation !== undefined ? { attestation: preRefineAttestation } : {}),
|
|
575
|
-
reason: decision.reason,
|
|
576
|
-
};
|
|
577
|
-
await this.fire('onDelegationRefused', refusedCtx);
|
|
578
|
-
}
|
|
579
|
-
throw new DelegationRefusedError(audience, preRefineDelegation, preRefineAttestation, decision.reason);
|
|
580
|
-
}
|
|
581
|
-
// Substitute before cache lookup so the refined shape becomes both
|
|
582
|
-
// the cache key and what `onDelegationMint` reports.
|
|
583
|
-
if (decision.delegation !== undefined)
|
|
584
|
-
delegation = decision.delegation;
|
|
585
|
-
if (decision.attestation !== undefined)
|
|
586
|
-
attestation = decision.attestation;
|
|
587
|
-
}
|
|
588
|
-
if (!this.#delegation) {
|
|
589
|
-
// No cache → base credential dispatches; the target kernel rejects
|
|
590
|
-
// with AuthenticationError if it needed a delegation.
|
|
591
|
-
return { credential: baseCred, mintedThisHop: false };
|
|
592
|
-
}
|
|
593
|
-
// Key the counter identically to the cache (post-refine) so mints for
|
|
594
|
-
// other audiences don't inflate this call's delta.
|
|
595
|
-
const cacheKey = delegationCacheKey(audience, delegation, attestation, baseCred);
|
|
596
|
-
const mintsBefore = this.#mintInvocations.get(cacheKey) ?? 0;
|
|
597
|
-
const pendingKey = this.trackPendingMint(audience, delegation, attestation, baseCred, cid, method);
|
|
598
|
-
let credential;
|
|
599
|
-
try {
|
|
600
|
-
credential = await this.#delegation.get(audience, delegation, attestation, {
|
|
601
|
-
authority: baseCred,
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
finally {
|
|
605
|
-
this.untrackPendingMint(pendingKey, cid);
|
|
606
|
-
}
|
|
607
|
-
return {
|
|
608
|
-
credential,
|
|
609
|
-
mintedThisHop: (this.#mintInvocations.get(cacheKey) ?? 0) > mintsBefore,
|
|
610
|
-
};
|
|
611
|
-
}
|
|
612
|
-
async wireSend(client, kind, method, params, credential, opts, hopIndex, cid, selfOverride, redirectTarget) {
|
|
613
|
-
const callOpts = {
|
|
614
|
-
...forwardedFor(opts, hopIndex, redirectTarget),
|
|
615
|
-
correlationId: cid,
|
|
616
|
-
// Loop-local override supersedes `opts.self` after hop 0.
|
|
617
|
-
...(selfOverride !== undefined && { self: selfOverride }),
|
|
618
|
-
};
|
|
619
|
-
switch (kind) {
|
|
620
|
-
case 'call':
|
|
621
|
-
return client.send(method, params, credential, callOpts);
|
|
622
|
-
case 'stream':
|
|
623
|
-
return client.sendStream(method, params, credential, callOpts);
|
|
624
|
-
case 'binary':
|
|
625
|
-
return client.sendBinary(method, params, credential, callOpts);
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
decorate(err, method, params, url, correlationId, hops) {
|
|
629
|
-
if (!(err instanceof Error))
|
|
630
|
-
return new Error(String(err));
|
|
631
|
-
const webOs = err;
|
|
632
|
-
const existing = webOs.details ?? {};
|
|
633
|
-
// `transport` is opaque to ClientSession — copy what the client stamped, or
|
|
634
|
-
// leave undefined. ClientSession does not invent a transport name.
|
|
635
|
-
const merged = {
|
|
636
|
-
method: existing.method ?? method,
|
|
637
|
-
params: existing.params ?? params,
|
|
638
|
-
url: existing.url ?? url,
|
|
639
|
-
correlationId: existing.correlationId ?? correlationId,
|
|
640
|
-
hops: freezeHops(hops),
|
|
641
|
-
};
|
|
642
|
-
if (existing.transport !== undefined)
|
|
643
|
-
merged.transport = existing.transport;
|
|
644
|
-
withDetails(err, merged);
|
|
645
|
-
return err;
|
|
646
|
-
}
|
|
647
|
-
async fire(name, ctx) {
|
|
648
|
-
const hook = this.#hooks[name];
|
|
649
|
-
if (!hook)
|
|
650
|
-
return;
|
|
651
|
-
try {
|
|
652
|
-
await hook(ctx);
|
|
653
|
-
}
|
|
654
|
-
catch (err) {
|
|
655
|
-
this.#logger.error?.(`ClientSessionHooks.${name} threw`, err);
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
async fireError(error, method, params, credential, url, correlationId, maxHops, hops, context) {
|
|
659
|
-
const ctx = {
|
|
660
|
-
method,
|
|
661
|
-
params,
|
|
662
|
-
credential,
|
|
663
|
-
url,
|
|
664
|
-
correlationId,
|
|
665
|
-
maxHops,
|
|
666
|
-
error: error,
|
|
667
|
-
hops: freezeHops(hops),
|
|
668
|
-
context,
|
|
669
|
-
};
|
|
670
|
-
await this.fire('onError', ctx);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
//# sourceMappingURL=client-session.js.map
|