@astrale-os/kernel-client 0.6.0-beta.6 → 0.6.0-beta.61
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 +7 -6
- package/dist/auth/auth.js +2 -3
- package/dist/auth/authorization.d.ts +2 -3
- package/dist/auth/authorization.js +0 -1
- package/dist/auth/credential.d.ts +5 -1
- package/dist/auth/credential.js +6 -3
- package/dist/auth/identity.d.ts +6 -9
- package/dist/auth/identity.js +0 -1
- package/dist/auth/index.d.ts +3 -4
- package/dist/auth/index.js +2 -3
- package/dist/auth/register.d.ts +24 -0
- package/dist/auth/register.js +10 -0
- package/dist/client/admission.d.ts +4 -2
- package/dist/client/admission.js +8 -2
- package/dist/client/client.d.ts +0 -1
- package/dist/client/client.js +0 -1
- package/dist/client/credential.d.ts +0 -1
- package/dist/client/credential.js +0 -1
- package/dist/client/index.d.ts +0 -1
- package/dist/client/index.js +0 -1
- package/dist/client/request.d.ts +3 -3
- package/dist/client/request.js +3 -1
- package/dist/client/result.d.ts +3 -4
- package/dist/client/result.js +3 -1
- package/dist/client/routing-control.d.ts +0 -1
- package/dist/client/routing-control.js +0 -1
- package/dist/errors/client-error.d.ts +0 -1
- package/dist/errors/client-error.js +2 -1
- package/dist/errors/index.d.ts +7 -7
- package/dist/errors/index.js +7 -7
- package/dist/errors/miss-error.d.ts +0 -1
- package/dist/errors/miss-error.js +0 -1
- package/dist/errors/protocol-error.d.ts +0 -1
- package/dist/errors/protocol-error.js +0 -1
- package/dist/errors/response-error.d.ts +0 -1
- package/dist/errors/response-error.js +0 -1
- package/dist/errors/session-error.d.ts +9 -0
- package/dist/errors/session-error.js +9 -0
- package/dist/errors/stale-route-error.d.ts +0 -1
- package/dist/errors/stale-route-error.js +0 -1
- package/dist/errors/transport-error.d.ts +18 -6
- package/dist/errors/transport-error.js +11 -7
- 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 +147 -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 +124 -0
- package/dist/graph/domain/provenance.d.ts +6 -0
- package/dist/graph/domain/provenance.js +11 -0
- package/dist/graph/errors.d.ts +2 -3
- package/dist/graph/errors.js +1 -2
- package/dist/graph/expectation.d.ts +3 -0
- package/dist/graph/expectation.js +6 -0
- package/dist/graph/graph.d.ts +12 -8
- package/dist/graph/graph.js +0 -1
- package/dist/graph/index.d.ts +2 -2
- package/dist/graph/index.js +1 -1
- package/dist/graph/mutation.d.ts +2 -4
- package/dist/graph/mutation.js +10 -2
- package/dist/graph/page/index.d.ts +0 -1
- package/dist/graph/page/index.js +0 -1
- package/dist/graph/page/neighbors.d.ts +4 -5
- package/dist/graph/page/neighbors.js +7 -7
- package/dist/graph/page/page.d.ts +5 -2
- package/dist/graph/page/page.js +0 -1
- package/dist/graph/page-contract.d.ts +1 -2
- package/dist/graph/page-contract.js +0 -1
- package/dist/graph/provenance.d.ts +14 -0
- package/dist/graph/provenance.js +42 -0
- package/dist/graph/query.d.ts +3 -1
- package/dist/graph/query.js +33 -13
- package/dist/graph/read.d.ts +3 -4
- package/dist/graph/read.js +6 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/pacer/batcher/batcher.d.ts +0 -1
- package/dist/pacer/batcher/batcher.js +0 -1
- package/dist/pacer/batcher/defaults.d.ts +0 -1
- package/dist/pacer/batcher/defaults.js +0 -1
- package/dist/pacer/batcher/index.d.ts +0 -1
- package/dist/pacer/batcher/index.js +0 -1
- package/dist/pacer/index.d.ts +0 -1
- package/dist/pacer/index.js +0 -1
- package/dist/pacer/limiter/defaults.d.ts +0 -1
- package/dist/pacer/limiter/defaults.js +0 -1
- package/dist/pacer/limiter/index.d.ts +0 -1
- package/dist/pacer/limiter/index.js +0 -1
- package/dist/pacer/limiter/limiter.d.ts +0 -1
- package/dist/pacer/limiter/limiter.js +0 -1
- package/dist/pacer/queue/defaults.d.ts +0 -1
- package/dist/pacer/queue/defaults.js +0 -1
- package/dist/pacer/queue/index.d.ts +0 -1
- package/dist/pacer/queue/index.js +0 -1
- package/dist/pacer/queue/queue.d.ts +0 -1
- package/dist/pacer/queue/queue.js +0 -1
- package/dist/pacer/retry/defaults.d.ts +0 -1
- package/dist/pacer/retry/defaults.js +0 -1
- package/dist/pacer/retry/index.d.ts +0 -1
- package/dist/pacer/retry/index.js +0 -1
- package/dist/pacer/retry/retry.d.ts +0 -1
- package/dist/pacer/retry/retry.js +0 -1
- package/dist/pool/index.d.ts +0 -1
- package/dist/pool/index.js +0 -1
- package/dist/pool/pool.d.ts +0 -1
- package/dist/pool/pool.js +0 -1
- package/dist/pool/target.d.ts +0 -1
- package/dist/pool/target.js +0 -1
- package/dist/schema/admission.d.ts +1 -2
- package/dist/schema/admission.js +0 -1
- package/dist/schema/contracts.d.ts +6 -16
- package/dist/schema/contracts.js +0 -1
- package/dist/schema/index.d.ts +2 -3
- package/dist/schema/index.js +1 -2
- package/dist/schema/introspection.d.ts +1 -2
- package/dist/schema/introspection.js +5 -2
- package/dist/schema/operation.d.ts +0 -1
- package/dist/schema/operation.js +2 -3
- package/dist/schema/schema.d.ts +11 -10
- package/dist/schema/schema.js +80 -11
- package/dist/session/bound.d.ts +45 -0
- package/dist/session/bound.js +89 -0
- package/dist/session/context/control.d.ts +0 -1
- package/dist/session/context/control.js +0 -1
- package/dist/session/context/index.d.ts +0 -1
- package/dist/session/context/index.js +0 -1
- package/dist/session/context/limits.d.ts +0 -1
- package/dist/session/context/limits.js +0 -1
- package/dist/session/context/operation.d.ts +0 -1
- package/dist/session/context/operation.js +19 -17
- package/dist/session/context/policy.d.ts +0 -1
- package/dist/session/context/policy.js +0 -1
- package/dist/session/discovery/bundle.d.ts +5 -2
- package/dist/session/discovery/bundle.js +34 -15
- package/dist/session/discovery/discovery.d.ts +4 -2
- package/dist/session/discovery/discovery.js +34 -6
- package/dist/session/discovery/index.d.ts +2 -1
- package/dist/session/discovery/index.js +0 -1
- package/dist/session/discovery/publication.d.ts +0 -1
- package/dist/session/discovery/publication.js +4 -4
- package/dist/session/discovery/snapshot.d.ts +0 -1
- package/dist/session/discovery/snapshot.js +0 -1
- package/dist/session/discovery/transport.d.ts +6 -0
- package/dist/session/discovery/transport.js +13 -0
- package/dist/session/index.d.ts +4 -3
- package/dist/session/index.js +2 -1
- package/dist/session/reference.d.ts +18 -10
- package/dist/session/reference.js +31 -9
- package/dist/session/routing/auth.d.ts +0 -1
- package/dist/session/routing/auth.js +0 -1
- package/dist/session/routing/cache.d.ts +27 -8
- package/dist/session/routing/cache.js +218 -25
- package/dist/session/routing/dispatch.d.ts +3 -7
- package/dist/session/routing/dispatch.js +36 -26
- package/dist/session/routing/envelope.d.ts +2 -1
- package/dist/session/routing/envelope.js +14 -10
- package/dist/session/routing/index.d.ts +1 -3
- package/dist/session/routing/index.js +1 -2
- package/dist/session/routing/request.d.ts +0 -1
- package/dist/session/routing/request.js +0 -1
- package/dist/session/session.d.ts +16 -7
- package/dist/session/session.js +49 -30
- package/dist/session/session.typecheck.d.ts +0 -1
- package/dist/session/session.typecheck.js +87 -3
- package/dist/session/views/catalog.d.ts +0 -1
- package/dist/session/views/catalog.js +13 -5
- package/dist/session/views/index.d.ts +0 -1
- package/dist/session/views/index.js +0 -1
- package/dist/session/views/resolve.d.ts +0 -1
- package/dist/session/views/resolve.js +0 -1
- package/dist/store/entity-index.d.ts +0 -1
- package/dist/store/entity-index.js +0 -1
- package/dist/store/index.d.ts +0 -1
- package/dist/store/index.js +0 -1
- package/dist/store/memory.d.ts +2 -2
- package/dist/store/memory.js +38 -15
- package/dist/store/mutation.d.ts +1 -2
- package/dist/store/mutation.js +6 -4
- package/dist/store/observe.d.ts +0 -1
- package/dist/store/observe.js +0 -1
- package/dist/store/optimistic.d.ts +0 -1
- package/dist/store/optimistic.js +0 -1
- package/dist/store/query-key.d.ts +2 -2
- package/dist/store/query-key.js +7 -3
- package/dist/store/shape.d.ts +4 -2
- package/dist/store/shape.js +4 -2
- package/dist/store/store.d.ts +2 -4
- package/dist/store/store.js +6 -5
- package/dist/store/store.typecheck.d.ts +0 -1
- package/dist/store/store.typecheck.js +3 -9
- package/dist/transport/auto/decision.d.ts +0 -1
- package/dist/transport/auto/decision.js +0 -1
- package/dist/transport/auto/fallback.d.ts +2 -2
- package/dist/transport/auto/fallback.js +10 -11
- package/dist/transport/auto/index.d.ts +0 -1
- package/dist/transport/auto/index.js +0 -1
- package/dist/transport/auto/transport.d.ts +0 -1
- package/dist/transport/auto/transport.js +5 -6
- package/dist/transport/auto/warning.d.ts +0 -1
- package/dist/transport/auto/warning.js +5 -3
- package/dist/transport/deadline.d.ts +0 -1
- package/dist/transport/deadline.js +0 -1
- package/dist/transport/failure.d.ts +7 -0
- package/dist/transport/failure.js +9 -0
- package/dist/transport/http/byte-stream.d.ts +17 -0
- package/dist/transport/http/byte-stream.js +86 -0
- package/dist/transport/http/index.d.ts +0 -1
- package/dist/transport/http/index.js +0 -1
- package/dist/transport/http/response.d.ts +0 -1
- package/dist/transport/http/response.js +0 -1
- package/dist/transport/http/stream.d.ts +0 -1
- package/dist/transport/http/stream.js +7 -7
- package/dist/transport/http/transport.d.ts +0 -1
- package/dist/transport/http/transport.js +43 -20
- package/dist/transport/index.d.ts +0 -1
- package/dist/transport/index.js +0 -1
- package/dist/transport/transport.d.ts +0 -1
- package/dist/transport/transport.js +0 -1
- package/dist/transport/websocket/connection.d.ts +0 -1
- package/dist/transport/websocket/connection.js +16 -26
- package/dist/transport/websocket/exchange.d.ts +0 -1
- package/dist/transport/websocket/exchange.js +5 -9
- package/dist/transport/websocket/index.d.ts +0 -1
- package/dist/transport/websocket/index.js +0 -1
- package/dist/transport/websocket/transport.d.ts +0 -1
- package/dist/transport/websocket/transport.js +7 -20
- package/package.json +12 -14
- package/dist/auth/auth.d.ts.map +0 -1
- package/dist/auth/auth.js.map +0 -1
- package/dist/auth/authorization.d.ts.map +0 -1
- package/dist/auth/authorization.js.map +0 -1
- package/dist/auth/credential.d.ts.map +0 -1
- package/dist/auth/credential.js.map +0 -1
- package/dist/auth/identity.d.ts.map +0 -1
- package/dist/auth/identity.js.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/provision.d.ts +0 -9
- package/dist/auth/provision.d.ts.map +0 -1
- package/dist/auth/provision.js +0 -11
- package/dist/auth/provision.js.map +0 -1
- package/dist/client/admission.d.ts.map +0 -1
- package/dist/client/admission.js.map +0 -1
- package/dist/client/client.d.ts.map +0 -1
- package/dist/client/client.js.map +0 -1
- package/dist/client/credential.d.ts.map +0 -1
- package/dist/client/credential.js.map +0 -1
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/index.js.map +0 -1
- package/dist/client/request.d.ts.map +0 -1
- package/dist/client/request.js.map +0 -1
- package/dist/client/result.d.ts.map +0 -1
- package/dist/client/result.js.map +0 -1
- package/dist/client/routing-control.d.ts.map +0 -1
- package/dist/client/routing-control.js.map +0 -1
- package/dist/errors/client-error.d.ts.map +0 -1
- package/dist/errors/client-error.js.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js.map +0 -1
- package/dist/errors/miss-error.d.ts.map +0 -1
- package/dist/errors/miss-error.js.map +0 -1
- package/dist/errors/protocol-error.d.ts.map +0 -1
- package/dist/errors/protocol-error.js.map +0 -1
- package/dist/errors/response-error.d.ts.map +0 -1
- package/dist/errors/response-error.js.map +0 -1
- package/dist/errors/stale-route-error.d.ts.map +0 -1
- package/dist/errors/stale-route-error.js.map +0 -1
- package/dist/errors/transport-error.d.ts.map +0 -1
- package/dist/errors/transport-error.js.map +0 -1
- package/dist/graph/errors.d.ts.map +0 -1
- package/dist/graph/errors.js.map +0 -1
- package/dist/graph/graph.d.ts.map +0 -1
- package/dist/graph/graph.js.map +0 -1
- package/dist/graph/index.d.ts.map +0 -1
- package/dist/graph/index.js.map +0 -1
- package/dist/graph/mutation.d.ts.map +0 -1
- package/dist/graph/mutation.js.map +0 -1
- package/dist/graph/page/index.d.ts.map +0 -1
- package/dist/graph/page/index.js.map +0 -1
- package/dist/graph/page/neighbors.d.ts.map +0 -1
- package/dist/graph/page/neighbors.js.map +0 -1
- package/dist/graph/page/page.d.ts.map +0 -1
- package/dist/graph/page/page.js.map +0 -1
- package/dist/graph/page-contract.d.ts.map +0 -1
- package/dist/graph/page-contract.js.map +0 -1
- package/dist/graph/query.d.ts.map +0 -1
- package/dist/graph/query.js.map +0 -1
- package/dist/graph/read.d.ts.map +0 -1
- package/dist/graph/read.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/pacer/batcher/batcher.d.ts.map +0 -1
- package/dist/pacer/batcher/batcher.js.map +0 -1
- package/dist/pacer/batcher/defaults.d.ts.map +0 -1
- package/dist/pacer/batcher/defaults.js.map +0 -1
- package/dist/pacer/batcher/index.d.ts.map +0 -1
- package/dist/pacer/batcher/index.js.map +0 -1
- package/dist/pacer/index.d.ts.map +0 -1
- package/dist/pacer/index.js.map +0 -1
- package/dist/pacer/limiter/defaults.d.ts.map +0 -1
- package/dist/pacer/limiter/defaults.js.map +0 -1
- package/dist/pacer/limiter/index.d.ts.map +0 -1
- package/dist/pacer/limiter/index.js.map +0 -1
- package/dist/pacer/limiter/limiter.d.ts.map +0 -1
- package/dist/pacer/limiter/limiter.js.map +0 -1
- package/dist/pacer/queue/defaults.d.ts.map +0 -1
- package/dist/pacer/queue/defaults.js.map +0 -1
- package/dist/pacer/queue/index.d.ts.map +0 -1
- package/dist/pacer/queue/index.js.map +0 -1
- package/dist/pacer/queue/queue.d.ts.map +0 -1
- package/dist/pacer/queue/queue.js.map +0 -1
- package/dist/pacer/retry/defaults.d.ts.map +0 -1
- package/dist/pacer/retry/defaults.js.map +0 -1
- package/dist/pacer/retry/index.d.ts.map +0 -1
- package/dist/pacer/retry/index.js.map +0 -1
- package/dist/pacer/retry/retry.d.ts.map +0 -1
- package/dist/pacer/retry/retry.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/pool/target.d.ts.map +0 -1
- package/dist/pool/target.js.map +0 -1
- package/dist/schema/admission.d.ts.map +0 -1
- package/dist/schema/admission.js.map +0 -1
- package/dist/schema/contracts.d.ts.map +0 -1
- package/dist/schema/contracts.js.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/index.js.map +0 -1
- package/dist/schema/introspection.d.ts.map +0 -1
- package/dist/schema/introspection.js.map +0 -1
- package/dist/schema/operation.d.ts.map +0 -1
- package/dist/schema/operation.js.map +0 -1
- package/dist/schema/schema.d.ts.map +0 -1
- package/dist/schema/schema.js.map +0 -1
- package/dist/session/context/control.d.ts.map +0 -1
- package/dist/session/context/control.js.map +0 -1
- package/dist/session/context/index.d.ts.map +0 -1
- package/dist/session/context/index.js.map +0 -1
- package/dist/session/context/limits.d.ts.map +0 -1
- package/dist/session/context/limits.js.map +0 -1
- package/dist/session/context/operation.d.ts.map +0 -1
- package/dist/session/context/operation.js.map +0 -1
- package/dist/session/context/policy.d.ts.map +0 -1
- package/dist/session/context/policy.js.map +0 -1
- package/dist/session/discovery/bundle.d.ts.map +0 -1
- package/dist/session/discovery/bundle.js.map +0 -1
- package/dist/session/discovery/discovery.d.ts.map +0 -1
- package/dist/session/discovery/discovery.js.map +0 -1
- package/dist/session/discovery/index.d.ts.map +0 -1
- package/dist/session/discovery/index.js.map +0 -1
- package/dist/session/discovery/publication.d.ts.map +0 -1
- package/dist/session/discovery/publication.js.map +0 -1
- package/dist/session/discovery/snapshot.d.ts.map +0 -1
- package/dist/session/discovery/snapshot.js.map +0 -1
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/index.js.map +0 -1
- package/dist/session/reference.d.ts.map +0 -1
- package/dist/session/reference.js.map +0 -1
- package/dist/session/routing/auth.d.ts.map +0 -1
- package/dist/session/routing/auth.js.map +0 -1
- package/dist/session/routing/cache.d.ts.map +0 -1
- package/dist/session/routing/cache.js.map +0 -1
- package/dist/session/routing/dispatch.d.ts.map +0 -1
- package/dist/session/routing/dispatch.js.map +0 -1
- package/dist/session/routing/envelope.d.ts.map +0 -1
- package/dist/session/routing/envelope.js.map +0 -1
- package/dist/session/routing/expectation.d.ts +0 -7
- package/dist/session/routing/expectation.d.ts.map +0 -1
- package/dist/session/routing/expectation.js +0 -2
- package/dist/session/routing/expectation.js.map +0 -1
- package/dist/session/routing/index.d.ts.map +0 -1
- package/dist/session/routing/index.js.map +0 -1
- package/dist/session/routing/request.d.ts.map +0 -1
- package/dist/session/routing/request.js.map +0 -1
- package/dist/session/session.d.ts.map +0 -1
- package/dist/session/session.js.map +0 -1
- package/dist/session/session.typecheck.d.ts.map +0 -1
- package/dist/session/session.typecheck.js.map +0 -1
- package/dist/session/views/catalog.d.ts.map +0 -1
- package/dist/session/views/catalog.js.map +0 -1
- package/dist/session/views/index.d.ts.map +0 -1
- package/dist/session/views/index.js.map +0 -1
- package/dist/session/views/resolve.d.ts.map +0 -1
- package/dist/session/views/resolve.js.map +0 -1
- package/dist/store/entity-index.d.ts.map +0 -1
- package/dist/store/entity-index.js.map +0 -1
- package/dist/store/index.d.ts.map +0 -1
- package/dist/store/index.js.map +0 -1
- package/dist/store/memory.d.ts.map +0 -1
- package/dist/store/memory.js.map +0 -1
- package/dist/store/mutation.d.ts.map +0 -1
- package/dist/store/mutation.js.map +0 -1
- package/dist/store/observe.d.ts.map +0 -1
- package/dist/store/observe.js.map +0 -1
- package/dist/store/optimistic.d.ts.map +0 -1
- package/dist/store/optimistic.js.map +0 -1
- package/dist/store/query-key.d.ts.map +0 -1
- package/dist/store/query-key.js.map +0 -1
- package/dist/store/shape.d.ts.map +0 -1
- package/dist/store/shape.js.map +0 -1
- package/dist/store/store.d.ts.map +0 -1
- package/dist/store/store.js.map +0 -1
- package/dist/store/store.typecheck.d.ts.map +0 -1
- package/dist/store/store.typecheck.js.map +0 -1
- package/dist/transport/auto/decision.d.ts.map +0 -1
- package/dist/transport/auto/decision.js.map +0 -1
- package/dist/transport/auto/fallback.d.ts.map +0 -1
- package/dist/transport/auto/fallback.js.map +0 -1
- package/dist/transport/auto/index.d.ts.map +0 -1
- package/dist/transport/auto/index.js.map +0 -1
- package/dist/transport/auto/transport.d.ts.map +0 -1
- package/dist/transport/auto/transport.js.map +0 -1
- package/dist/transport/auto/warning.d.ts.map +0 -1
- package/dist/transport/auto/warning.js.map +0 -1
- package/dist/transport/deadline.d.ts.map +0 -1
- package/dist/transport/deadline.js.map +0 -1
- package/dist/transport/http/index.d.ts.map +0 -1
- package/dist/transport/http/index.js.map +0 -1
- package/dist/transport/http/response.d.ts.map +0 -1
- package/dist/transport/http/response.js.map +0 -1
- package/dist/transport/http/stream.d.ts.map +0 -1
- package/dist/transport/http/stream.js.map +0 -1
- package/dist/transport/http/transport.d.ts.map +0 -1
- package/dist/transport/http/transport.js.map +0 -1
- package/dist/transport/index.d.ts.map +0 -1
- package/dist/transport/index.js.map +0 -1
- package/dist/transport/transport.d.ts.map +0 -1
- package/dist/transport/transport.js.map +0 -1
- package/dist/transport/websocket/connection.d.ts.map +0 -1
- package/dist/transport/websocket/connection.js.map +0 -1
- package/dist/transport/websocket/exchange.d.ts.map +0 -1
- package/dist/transport/websocket/exchange.js.map +0 -1
- package/dist/transport/websocket/index.d.ts.map +0 -1
- package/dist/transport/websocket/index.js.map +0 -1
- package/dist/transport/websocket/transport.d.ts.map +0 -1
- package/dist/transport/websocket/transport.js.map +0 -1
package/dist/auth/auth.d.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import type { Identity, IdentityId, MintedCredential,
|
|
1
|
+
import type { Identity, Authentication, IdentityId, MintedCredential, RegisterResult } from '@astrale-os/kernel-core/auth';
|
|
2
2
|
import type { PathLike } from '@astrale-os/kernel-core/path';
|
|
3
3
|
import type { Input } from '../client/index.js';
|
|
4
4
|
import type { RequestOptions } from '../transport/index.js';
|
|
5
5
|
import type { PolicyDecisionInput } from './authorization.js';
|
|
6
|
-
import type { DelegateOptions, MintOptions } from './credential.js';
|
|
6
|
+
import type { DelegateOptions, MintOptions, ImpersonateOptions } from './credential.js';
|
|
7
7
|
import type { WhoisInput } from './identity.js';
|
|
8
|
+
import type { RegisterRequest } from './register.js';
|
|
8
9
|
export type AuthCall = (target: PathLike, input: Input, options?: RequestOptions) => Promise<Input>;
|
|
9
10
|
export interface AuthApi {
|
|
10
|
-
|
|
11
|
-
whoami(options?: RequestOptions): Promise<Identity>;
|
|
12
|
-
whois(input: WhoisInput, options?: RequestOptions): Promise<Identity | null>;
|
|
11
|
+
register(input: RegisterRequest, options?: RequestOptions): Promise<RegisterResult>;
|
|
12
|
+
whoami(options?: RequestOptions): Promise<Identity & Authentication>;
|
|
13
|
+
whois(input: WhoisInput, options?: RequestOptions): Promise<(Identity & Authentication) | null>;
|
|
13
14
|
can(input: PolicyDecisionInput, options?: RequestOptions): Promise<boolean>;
|
|
15
|
+
impersonate(input: ImpersonateOptions, options?: RequestOptions): Promise<MintedCredential>;
|
|
14
16
|
mint(input: MintOptions, options?: RequestOptions): Promise<MintedCredential>;
|
|
15
17
|
delegate(identity: IdentityId, input: DelegateOptions, options?: RequestOptions): Promise<MintedCredential>;
|
|
16
18
|
}
|
|
17
19
|
/** Bind the current Core identity syscalls without recreating legacy grant-edge verbs. */
|
|
18
20
|
export declare function createAuth(call: AuthCall): AuthApi;
|
|
19
|
-
//# sourceMappingURL=auth.d.ts.map
|
package/dist/auth/auth.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { authorizationApi } from './authorization.js';
|
|
2
2
|
import { credentialApi } from './credential.js';
|
|
3
3
|
import { identityApi } from './identity.js';
|
|
4
|
-
import {
|
|
4
|
+
import { registerApi } from './register.js';
|
|
5
5
|
/** Bind the current Core identity syscalls without recreating legacy grant-edge verbs. */
|
|
6
6
|
export function createAuth(call) {
|
|
7
7
|
if (typeof call !== 'function')
|
|
8
8
|
throw new TypeError('Auth call capability is invalid.');
|
|
9
9
|
return Object.freeze({
|
|
10
|
-
...
|
|
10
|
+
...registerApi(call),
|
|
11
11
|
...identityApi(call),
|
|
12
12
|
...authorizationApi(call),
|
|
13
13
|
...credentialApi(call),
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
//# sourceMappingURL=auth.js.map
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { NodeId } from '@astrale-os/kernel-core/graph/node';
|
|
2
2
|
import type { NodePath, PathLike } from '@astrale-os/kernel-core/path';
|
|
3
|
-
import type {
|
|
3
|
+
import type { PolicyRef } from '@astrale-os/kernel-dsl/v1';
|
|
4
4
|
import type { RequestOptions } from '../transport/index.js';
|
|
5
5
|
import type { AuthCall } from './auth.js';
|
|
6
6
|
export interface PolicyDecisionInput {
|
|
7
|
-
readonly policy: PathLike |
|
|
7
|
+
readonly policy: PathLike | PolicyRef;
|
|
8
8
|
readonly object: NodeId;
|
|
9
9
|
}
|
|
10
10
|
export declare const IDENTITY_CAN_PATH: NodePath;
|
|
11
11
|
export declare function authorizationApi(call: AuthCall): Readonly<{
|
|
12
12
|
can(input: PolicyDecisionInput, options?: RequestOptions): Promise<boolean>;
|
|
13
13
|
}>;
|
|
14
|
-
//# sourceMappingURL=authorization.d.ts.map
|
|
@@ -7,14 +7,18 @@ export interface MintOptions {
|
|
|
7
7
|
readonly ttlSeconds: number;
|
|
8
8
|
readonly grant?: UnresolvedGrant;
|
|
9
9
|
}
|
|
10
|
+
export interface ImpersonateOptions extends MintOptions {
|
|
11
|
+
readonly identity: IdentityId;
|
|
12
|
+
}
|
|
10
13
|
export interface DelegateOptions {
|
|
11
14
|
readonly audience: string;
|
|
12
15
|
readonly ttlSeconds: number;
|
|
13
16
|
readonly attenuation: UnresolvedIdentityExpr;
|
|
14
17
|
}
|
|
18
|
+
export declare const IDENTITY_IMPERSONATE_PATH: NodePath;
|
|
15
19
|
export declare const IDENTITY_MINT_PATH: NodePath;
|
|
16
20
|
export declare function credentialApi(call: AuthCall): Readonly<{
|
|
21
|
+
impersonate(input: ImpersonateOptions, options?: RequestOptions): Promise<MintedCredential>;
|
|
17
22
|
mint(input: MintOptions, options?: RequestOptions): Promise<MintedCredential>;
|
|
18
23
|
delegate(principal: IdentityId, input: DelegateOptions, options?: RequestOptions): Promise<MintedCredential>;
|
|
19
24
|
}>;
|
|
20
|
-
//# sourceMappingURL=credential.d.ts.map
|
package/dist/auth/credential.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { Path } from '@astrale-os/kernel-core/path';
|
|
2
2
|
import { identity } from '@astrale-os/kernel-core/schema/kernel/syscalls/references';
|
|
3
3
|
const identityOwner = Path.project(identity.whoami.owner);
|
|
4
|
+
export const IDENTITY_IMPERSONATE_PATH = Path.staticMethod(identityOwner, identity.impersonate.name).raw;
|
|
4
5
|
export const IDENTITY_MINT_PATH = Path.staticMethod(identityOwner, identity.mint.name).raw;
|
|
5
6
|
export function credentialApi(call) {
|
|
6
7
|
return Object.freeze({
|
|
8
|
+
async impersonate(input, options) {
|
|
9
|
+
return credential(await call(IDENTITY_IMPERSONATE_PATH, input, options));
|
|
10
|
+
},
|
|
7
11
|
async mint(input, options) {
|
|
8
12
|
return credential(await call(IDENTITY_MINT_PATH, input, options));
|
|
9
13
|
},
|
|
10
14
|
async delegate(principal, input, options) {
|
|
11
|
-
const target = Path.
|
|
12
|
-
return credential(await call(target, input, options));
|
|
15
|
+
const target = Path.staticMethod(identityOwner, identity.delegate.name).raw;
|
|
16
|
+
return credential(await call(target, { ...input, principal }, options));
|
|
13
17
|
},
|
|
14
18
|
});
|
|
15
19
|
}
|
|
@@ -19,4 +23,3 @@ function credential(input) {
|
|
|
19
23
|
}
|
|
20
24
|
return input;
|
|
21
25
|
}
|
|
22
|
-
//# sourceMappingURL=credential.js.map
|
package/dist/auth/identity.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Authentication, Identity } from '@astrale-os/kernel-core/auth';
|
|
2
2
|
import type { NodePath } from '@astrale-os/kernel-core/path';
|
|
3
3
|
import type { RequestOptions } from '../transport/index.js';
|
|
4
4
|
import type { AuthCall } from './auth.js';
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export type WhoisInput = Authentication;
|
|
6
|
+
export interface IdentityApi {
|
|
7
|
+
whoami(options?: RequestOptions): Promise<Identity & Authentication>;
|
|
8
|
+
whois(input: WhoisInput, options?: RequestOptions): Promise<(Identity & Authentication) | null>;
|
|
8
9
|
}
|
|
9
10
|
export declare const IDENTITY_WHOAMI_PATH: NodePath;
|
|
10
11
|
export declare const IDENTITY_WHOIS_PATH: NodePath;
|
|
11
|
-
export declare function identityApi(call: AuthCall):
|
|
12
|
-
whoami(options?: RequestOptions): Promise<Identity>;
|
|
13
|
-
whois(input: WhoisInput, options?: RequestOptions): Promise<Identity | null>;
|
|
14
|
-
}>;
|
|
15
|
-
//# sourceMappingURL=identity.d.ts.map
|
|
12
|
+
export declare function identityApi(call: AuthCall): IdentityApi;
|
package/dist/auth/identity.js
CHANGED
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { createAuth, type AuthApi, type AuthCall } from './auth.js';
|
|
2
2
|
export { IDENTITY_CAN_PATH, type PolicyDecisionInput } from './authorization.js';
|
|
3
|
-
export { IDENTITY_MINT_PATH, type DelegateOptions, type MintOptions } from './credential.js';
|
|
3
|
+
export { IDENTITY_MINT_PATH, IDENTITY_IMPERSONATE_PATH, type DelegateOptions, type MintOptions, type ImpersonateOptions, } from './credential.js';
|
|
4
4
|
export { IDENTITY_WHOAMI_PATH, IDENTITY_WHOIS_PATH, type WhoisInput } from './identity.js';
|
|
5
|
-
export {
|
|
6
|
-
export type { Identity, IdentityId, Subject, IssuerId, MintedCredential,
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
5
|
+
export { IDENTITY_REGISTER_PATH, type RegisterIdentity, type RegisterRequest } from './register.js';
|
|
6
|
+
export type { Identity, IdentityId, Subject, IssuerId, MintedCredential, RegisterResult, UnresolvedGrant, UnresolvedIdentityExpr, } from '@astrale-os/kernel-core/auth';
|
package/dist/auth/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { createAuth } from './auth.js';
|
|
2
2
|
export { IDENTITY_CAN_PATH } from './authorization.js';
|
|
3
|
-
export { IDENTITY_MINT_PATH } from './credential.js';
|
|
3
|
+
export { IDENTITY_MINT_PATH, IDENTITY_IMPERSONATE_PATH, } from './credential.js';
|
|
4
4
|
export { IDENTITY_WHOAMI_PATH, IDENTITY_WHOIS_PATH } from './identity.js';
|
|
5
|
-
export {
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
5
|
+
export { IDENTITY_REGISTER_PATH } from './register.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IdentityId, JsonWebKey, RegisterResult } from '@astrale-os/kernel-core/auth';
|
|
2
|
+
import type { NodePath } from '@astrale-os/kernel-core/path';
|
|
3
|
+
import type { RequestOptions } from '../transport/index.js';
|
|
4
|
+
import type { AuthCall } from './auth.js';
|
|
5
|
+
export declare const IDENTITY_REGISTER_PATH: NodePath;
|
|
6
|
+
export type RegisterIdentity = {
|
|
7
|
+
readonly id: IdentityId;
|
|
8
|
+
readonly mode: 'external';
|
|
9
|
+
readonly credential: string;
|
|
10
|
+
readonly publicKey?: never;
|
|
11
|
+
} | {
|
|
12
|
+
readonly id: IdentityId;
|
|
13
|
+
readonly mode: 'self';
|
|
14
|
+
readonly publicKey: JsonWebKey;
|
|
15
|
+
readonly credential: string;
|
|
16
|
+
};
|
|
17
|
+
/** JSON-safe client request; binary credential inputs remain Runtime-internal. */
|
|
18
|
+
export interface RegisterRequest {
|
|
19
|
+
readonly idempotencyKey: string;
|
|
20
|
+
readonly identities: readonly [RegisterIdentity, ...RegisterIdentity[]];
|
|
21
|
+
}
|
|
22
|
+
export declare function registerApi(call: AuthCall): Readonly<{
|
|
23
|
+
register(input: RegisterRequest, options?: RequestOptions): Promise<RegisterResult>;
|
|
24
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Path } from '@astrale-os/kernel-core/path';
|
|
2
|
+
import { register } from '@astrale-os/kernel-core/schema/kernel/syscalls/references';
|
|
3
|
+
export const IDENTITY_REGISTER_PATH = Path.project(register).raw;
|
|
4
|
+
export function registerApi(call) {
|
|
5
|
+
return Object.freeze({
|
|
6
|
+
async register(input, options) {
|
|
7
|
+
return (await call(IDENTITY_REGISTER_PATH, input, options));
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { invocation as protocol } from '@astrale-os/kernel-protocol';
|
|
2
2
|
import type { Call } from './request.js';
|
|
3
3
|
/** Parent-private Call acceptance shared by Client and Client Session. */
|
|
4
|
-
export declare function acceptCall(input:
|
|
5
|
-
|
|
4
|
+
export declare function acceptCall(input: {
|
|
5
|
+
readonly target: Call['target'];
|
|
6
|
+
readonly input: unknown;
|
|
7
|
+
}): protocol.Call;
|
package/dist/client/admission.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Target } from '@astrale-os/kernel-core/callable';
|
|
1
2
|
import { Path } from '@astrale-os/kernel-core/path';
|
|
2
3
|
import * as portable from '@astrale-os/kernel-dsl/value';
|
|
3
4
|
/** Parent-private Call acceptance shared by Client and Client Session. */
|
|
@@ -5,7 +6,13 @@ export function acceptCall(input) {
|
|
|
5
6
|
if (input === null || typeof input !== 'object' || Array.isArray(input)) {
|
|
6
7
|
throw new TypeError('Client call must be an object.');
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
const target = input.target;
|
|
10
|
+
return Object.freeze({
|
|
11
|
+
target: typeof target === 'object' && target !== null && 'callable' in target
|
|
12
|
+
? Target(target)
|
|
13
|
+
: admitPath(target),
|
|
14
|
+
input: admitInput(input.input),
|
|
15
|
+
});
|
|
9
16
|
}
|
|
10
17
|
function admitPath(input) {
|
|
11
18
|
try {
|
|
@@ -32,4 +39,3 @@ function freezeValue(input) {
|
|
|
32
39
|
}
|
|
33
40
|
return input;
|
|
34
41
|
}
|
|
35
|
-
//# sourceMappingURL=admission.js.map
|
package/dist/client/client.d.ts
CHANGED
package/dist/client/client.js
CHANGED
|
@@ -10,4 +10,3 @@ export interface AuthenticatedClient {
|
|
|
10
10
|
export type CredentialDispatch = (credential: RemoteCredential, call: Call, options?: ClientDispatchOptions) => Promise<Result>;
|
|
11
11
|
export declare function authenticated(dispatchWith: CredentialDispatch, credential: RemoteCredential): AuthenticatedClient;
|
|
12
12
|
export declare function resolveCredential(input: RemoteCredential, signal?: AbortSignal): Promise<string>;
|
|
13
|
-
//# sourceMappingURL=credential.d.ts.map
|
package/dist/client/index.d.ts
CHANGED
|
@@ -4,4 +4,3 @@ export type { AuthenticatedClient, RemoteCredential } from './credential.js';
|
|
|
4
4
|
export { call, type Call, type ClientDispatchOptions } from './request.js';
|
|
5
5
|
export type { Binary, BinaryResponse, Input, RedirectResult, Result, Stream, StreamResult, ValueResult, } from './result.js';
|
|
6
6
|
export { isAdmittedMissError, isAdmittedStaleRouteError } from './routing-control.js';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/client/index.js
CHANGED
package/dist/client/request.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { Target } from '@astrale-os/kernel-core/callable';
|
|
1
2
|
import type { PathLike } from '@astrale-os/kernel-core/path';
|
|
2
3
|
import type * as protocol from '@astrale-os/kernel-protocol/invocation';
|
|
3
4
|
import type { RequestOptions, TransportRequest } from '../transport/index.js';
|
|
4
5
|
import type { Input } from './result.js';
|
|
5
6
|
/** One portable call before Path canonicalization, correlation, and credential binding. */
|
|
6
7
|
export interface Call {
|
|
7
|
-
readonly target: PathLike;
|
|
8
|
+
readonly target: PathLike | Target;
|
|
8
9
|
readonly input: Input;
|
|
9
10
|
}
|
|
10
11
|
export interface ClientDispatchOptions extends RequestOptions {
|
|
@@ -21,7 +22,6 @@ export interface AdmittedRequest {
|
|
|
21
22
|
readonly schema?: protocol.SchemaTarget;
|
|
22
23
|
readonly options: RequestOptions;
|
|
23
24
|
}
|
|
24
|
-
export declare function call(target: PathLike, input: Input): Call;
|
|
25
|
+
export declare function call(target: PathLike | Target, input: Input): Call;
|
|
25
26
|
export declare function admitRequest(input: Call, options: ClientDispatchOptions | undefined, lifecycle: AbortSignal): AdmittedRequest;
|
|
26
27
|
export declare function invocation(request: AdmittedRequest, credential?: string, trace?: protocol.Trace): TransportRequest;
|
|
27
|
-
//# sourceMappingURL=request.d.ts.map
|
package/dist/client/request.js
CHANGED
|
@@ -45,6 +45,9 @@ function admitRequestOptions(input) {
|
|
|
45
45
|
if (input === null || typeof input !== 'object' || Array.isArray(input)) {
|
|
46
46
|
throw new TypeError('Client request options must be an object.');
|
|
47
47
|
}
|
|
48
|
+
if (Reflect.ownKeys(input).some((field) => !['signal', 'timeoutMs', 'idempotencyKey', 'delegate', 'routing', 'schema'].includes(String(field)))) {
|
|
49
|
+
throw new TypeError('Client request options contain unsupported fields.');
|
|
50
|
+
}
|
|
48
51
|
if (input.timeoutMs !== undefined &&
|
|
49
52
|
(!Number.isSafeInteger(input.timeoutMs) ||
|
|
50
53
|
input.timeoutMs < 1 ||
|
|
@@ -98,4 +101,3 @@ function lifecycleOptions(input, lifecycle) {
|
|
|
98
101
|
...(input?.idempotencyKey === undefined ? {} : { idempotencyKey: input.idempotencyKey }),
|
|
99
102
|
});
|
|
100
103
|
}
|
|
101
|
-
//# sourceMappingURL=request.js.map
|
package/dist/client/result.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BinaryOutput, CallableResult } from '@astrale-os/kernel-core/callable';
|
|
2
2
|
import type { Value } from '@astrale-os/kernel-dsl/value';
|
|
3
3
|
import type { invocation as protocol } from '@astrale-os/kernel-protocol';
|
|
4
4
|
/** Caller-visible value accepted from one admitted remote invocation. */
|
|
5
5
|
export type Input = Value;
|
|
6
|
-
/** Caller-visible
|
|
7
|
-
export type Binary =
|
|
6
|
+
/** Caller-visible buffered or streaming binary response. */
|
|
7
|
+
export type Binary = BinaryOutput;
|
|
8
8
|
/** Caller-owned remote stream. */
|
|
9
9
|
export interface Stream extends AsyncIterable<Value> {
|
|
10
10
|
cancel(reason?: string): Promise<void>;
|
|
@@ -33,4 +33,3 @@ export declare function requireValue(result: Promise<Result>): Promise<ValueResu
|
|
|
33
33
|
export declare function requireStream(result: Promise<Result>): Promise<StreamResult>;
|
|
34
34
|
export declare function requireBinary(result: Promise<Result>): Promise<BinaryResponse>;
|
|
35
35
|
export {};
|
|
36
|
-
//# sourceMappingURL=result.d.ts.map
|
package/dist/client/result.js
CHANGED
|
@@ -24,6 +24,8 @@ async function rejectMismatch(expected, result) {
|
|
|
24
24
|
if (result.kind === 'stream') {
|
|
25
25
|
await result.stream.cancel(`Expected ${expected} Function result.`).catch(() => undefined);
|
|
26
26
|
}
|
|
27
|
+
if (result.kind === 'binary' && !(result.value.body instanceof Uint8Array)) {
|
|
28
|
+
await result.value.body[Symbol.asyncIterator]().return?.();
|
|
29
|
+
}
|
|
27
30
|
mismatch(expected, result.kind);
|
|
28
31
|
}
|
|
29
|
-
//# sourceMappingURL=result.js.map
|
|
@@ -8,4 +8,3 @@ export declare function admittedStaleRouteError(currentEtag: publication.Etag, i
|
|
|
8
8
|
export declare function isAdmittedMissError(input: unknown): input is MissError;
|
|
9
9
|
/** Distinguish decoded routing control from public or caller-supplied lookalike errors. */
|
|
10
10
|
export declare function isAdmittedStaleRouteError(input: unknown): input is StaleRouteError;
|
|
11
|
-
//# sourceMappingURL=routing-control.d.ts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export class ClientError extends Error {
|
|
2
2
|
constructor(message, options) {
|
|
3
|
+
if (message.trim() === '')
|
|
4
|
+
throw new TypeError('Client error message must be non-blank.');
|
|
3
5
|
super(message, options);
|
|
4
6
|
this.name = 'ClientError';
|
|
5
7
|
}
|
|
6
8
|
}
|
|
7
|
-
//# sourceMappingURL=client-error.js.map
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
|
|
1
|
+
export * from './client-error.js';
|
|
2
|
+
export * from './miss-error.js';
|
|
3
|
+
export * from './protocol-error.js';
|
|
4
|
+
export * from './response-error.js';
|
|
5
|
+
export * from './session-error.js';
|
|
6
|
+
export * from './stale-route-error.js';
|
|
7
|
+
export * from './transport-error.js';
|
package/dist/errors/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
|
|
1
|
+
export * from './client-error.js';
|
|
2
|
+
export * from './miss-error.js';
|
|
3
|
+
export * from './protocol-error.js';
|
|
4
|
+
export * from './response-error.js';
|
|
5
|
+
export * from './session-error.js';
|
|
6
|
+
export * from './stale-route-error.js';
|
|
7
|
+
export * from './transport-error.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ClientError } from './client-error.js';
|
|
2
|
+
export type SessionFailure = 'cancelled' | 'closed' | 'timeout';
|
|
3
|
+
export interface SessionErrorOptions extends ErrorOptions {
|
|
4
|
+
readonly failure: SessionFailure;
|
|
5
|
+
}
|
|
6
|
+
export declare class SessionError extends ClientError {
|
|
7
|
+
readonly failure: SessionFailure;
|
|
8
|
+
constructor(message: string, options: SessionErrorOptions);
|
|
9
|
+
}
|
|
@@ -3,16 +3,28 @@ import { ClientError } from './client-error.js';
|
|
|
3
3
|
/** Whether an invocation is proven not to have crossed the transport boundary. */
|
|
4
4
|
export type TransportDelivery = 'not-sent' | 'unknown';
|
|
5
5
|
/** Observable transport phase in which communication stopped. */
|
|
6
|
-
export type TransportPhase = 'connect' | 'send' | 'receive' | 'timeout' | 'closed';
|
|
7
|
-
export
|
|
8
|
-
readonly
|
|
6
|
+
export type TransportPhase = 'connect' | 'send' | 'receive' | 'timeout' | 'closed' | 'unknown';
|
|
7
|
+
export type TransportContext = {
|
|
8
|
+
readonly kind: 'acquisition';
|
|
9
|
+
readonly resource: 'publication' | 'bundle';
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: 'invocation';
|
|
9
12
|
readonly delivery: TransportDelivery;
|
|
10
13
|
readonly invocation?: protocol.InvocationId;
|
|
14
|
+
};
|
|
15
|
+
export interface AcquisitionTransportErrorOptions extends ErrorOptions {
|
|
16
|
+
readonly phase: TransportPhase;
|
|
17
|
+
readonly resource: 'publication' | 'bundle';
|
|
11
18
|
}
|
|
12
|
-
export
|
|
19
|
+
export interface InvocationTransportErrorOptions extends ErrorOptions {
|
|
13
20
|
readonly phase: TransportPhase;
|
|
14
21
|
readonly delivery: TransportDelivery;
|
|
15
22
|
readonly invocation?: protocol.InvocationId;
|
|
16
|
-
constructor(message: string, options: TransportErrorOptions);
|
|
17
23
|
}
|
|
18
|
-
|
|
24
|
+
export declare class TransportError extends ClientError {
|
|
25
|
+
readonly phase: TransportPhase;
|
|
26
|
+
readonly context: TransportContext;
|
|
27
|
+
private constructor();
|
|
28
|
+
static acquisition(message: string, options: AcquisitionTransportErrorOptions): TransportError;
|
|
29
|
+
static invocation(message: string, options: InvocationTransportErrorOptions): TransportError;
|
|
30
|
+
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { ClientError } from './client-error.js';
|
|
2
2
|
export class TransportError extends ClientError {
|
|
3
3
|
phase;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
constructor(message, options) {
|
|
4
|
+
context;
|
|
5
|
+
constructor(message, phase, context, options) {
|
|
7
6
|
super(message, options);
|
|
7
|
+
this.phase = phase;
|
|
8
|
+
this.context = context;
|
|
8
9
|
this.name = 'TransportError';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Object.freeze(context);
|
|
11
|
+
}
|
|
12
|
+
static acquisition(message, options) {
|
|
13
|
+
return new TransportError(message, options.phase, { kind: 'acquisition', resource: options.resource }, options);
|
|
14
|
+
}
|
|
15
|
+
static invocation(message, options) {
|
|
16
|
+
return new TransportError(message, options.phase, { kind: 'invocation', delivery: options.delivery, invocation: options.invocation }, options);
|
|
12
17
|
}
|
|
13
18
|
}
|
|
14
|
-
//# sourceMappingURL=transport-error.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Edge } from '@astrale-os/kernel-core/graph/edge';
|
|
2
|
+
import type { Node } from '@astrale-os/kernel-core/graph/node';
|
|
3
|
+
import type { QueryAST, QuerySingleSourceClassOf } from '@astrale-os/kernel-core/graph/query';
|
|
4
|
+
import type { Domain } from '@astrale-os/kernel-dsl/v1/domain';
|
|
5
|
+
import type { AnyResolvedClass, ResolvedClass } from '@astrale-os/kernel-dsl/v1/language';
|
|
6
|
+
import type { GraphApi, GraphQueryOptions } from '../graph.js';
|
|
7
|
+
import type { BoundEdge, BoundNode } from './model.js';
|
|
8
|
+
import type { BoundQueryPage } from './page.js';
|
|
9
|
+
import type { MethodCall } from './project.js';
|
|
10
|
+
export type DomainQueryOptions = Omit<GraphQueryOptions, 'expected'>;
|
|
11
|
+
type AdmittedSourceClasses<Query extends QueryAST> = [QuerySingleSourceClassOf<Query>] extends [
|
|
12
|
+
never
|
|
13
|
+
] ? never : QuerySingleSourceClassOf<Query> extends AnyResolvedClass ? unknown : never;
|
|
14
|
+
export interface DomainBinding<DomainValue extends Domain = Domain> {
|
|
15
|
+
readonly domain: DomainValue;
|
|
16
|
+
readonly graph: GraphApi;
|
|
17
|
+
query<Query extends QueryAST>(query: Query & AdmittedSourceClasses<Query>, options: DomainQueryOptions): Promise<BoundQueryPage<Query>>;
|
|
18
|
+
wrapNode<Class extends ResolvedClass<'node'>>(selected: Class, node: Node): BoundNode<Class>;
|
|
19
|
+
wrapEdge<Class extends ResolvedClass<'edge'>>(selected: Class, edge: Edge): BoundEdge<Class>;
|
|
20
|
+
}
|
|
21
|
+
export declare function createDomainBinding<DomainValue extends Domain>(domain: DomainValue, graph: GraphApi, call: MethodCall): DomainBinding<DomainValue>;
|
|
22
|
+
export {};
|