@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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { acceptViewResolution, } from '@astrale-os/kernel-core/schema/kernel/syscalls/view-resolution';
|
|
2
|
+
import { Key as ViewKey } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
3
|
+
import { ClientError } from '../../errors/index.js';
|
|
4
|
+
import { allowEndpoint } from '../context/index.js';
|
|
5
|
+
export function rootViewCatalog(publication, artifact, policy) {
|
|
6
|
+
const views = publication.bindings.views
|
|
7
|
+
.map((binding) => {
|
|
8
|
+
allowEndpoint(binding.href, policy);
|
|
9
|
+
const declaration = artifact.root.views[viewName(binding.view)];
|
|
10
|
+
if (declaration === undefined) {
|
|
11
|
+
throw new ClientError('Published View has no verified root declaration.');
|
|
12
|
+
}
|
|
13
|
+
const { ref: _ref, ...viewDeclaration } = declaration;
|
|
14
|
+
return Object.freeze({
|
|
15
|
+
key: binding.view,
|
|
16
|
+
declaration: Object.freeze(viewDeclaration),
|
|
17
|
+
href: binding.href,
|
|
18
|
+
handshake: binding.handshake,
|
|
19
|
+
issuer: publication.identity.issuer,
|
|
20
|
+
etag: publication.etag,
|
|
21
|
+
revision: publication.schema.revision,
|
|
22
|
+
});
|
|
23
|
+
})
|
|
24
|
+
.sort((left, right) => compareKeys(left.key, right.key));
|
|
25
|
+
const catalogViews = Object.freeze(views);
|
|
26
|
+
const entrypointRef = publication.manifest?.entrypoint;
|
|
27
|
+
const entrypoint = entrypointRef === undefined
|
|
28
|
+
? undefined
|
|
29
|
+
: catalogViews.find(({ key }) => key === ViewKey.of(entrypointRef));
|
|
30
|
+
if (entrypointRef !== undefined && entrypoint === undefined) {
|
|
31
|
+
throw new ClientError('Published View entrypoint has no verified Publication binding.');
|
|
32
|
+
}
|
|
33
|
+
return Object.freeze({
|
|
34
|
+
...(entrypoint === undefined ? {} : { entrypoint }),
|
|
35
|
+
views: catalogViews,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export function catalogFromKeys(root, keys) {
|
|
39
|
+
const selected = new Set(keys);
|
|
40
|
+
const views = Object.freeze(root.views.filter(({ key }) => selected.has(key)));
|
|
41
|
+
return Object.freeze({
|
|
42
|
+
...(root.entrypoint !== undefined && selected.has(root.entrypoint.key)
|
|
43
|
+
? { entrypoint: root.entrypoint }
|
|
44
|
+
: {}),
|
|
45
|
+
views,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/** Re-admit one Runtime-resolved heterogeneous View catalog at the Client trust boundary. */
|
|
49
|
+
export function targetViewCatalog(input, policy) {
|
|
50
|
+
let resolution;
|
|
51
|
+
try {
|
|
52
|
+
resolution = acceptViewResolution(input);
|
|
53
|
+
}
|
|
54
|
+
catch (cause) {
|
|
55
|
+
throw new ClientError('Resolved View catalog is invalid.', { cause });
|
|
56
|
+
}
|
|
57
|
+
for (const view of resolution.views)
|
|
58
|
+
allowEndpoint(view.href, policy);
|
|
59
|
+
return Object.freeze({ views: resolution.views });
|
|
60
|
+
}
|
|
61
|
+
function compareKeys(left, right) {
|
|
62
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
63
|
+
}
|
|
64
|
+
function viewName(input) {
|
|
65
|
+
const coordinate = input.slice(input.indexOf(':') + 1);
|
|
66
|
+
const match = /^view\.([A-Za-z][A-Za-z0-9_]*)$/u.exec(coordinate);
|
|
67
|
+
if (match === null)
|
|
68
|
+
throw new ClientError('Published View key is invalid.');
|
|
69
|
+
return match[1];
|
|
70
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PathLike } from '@astrale-os/kernel-core/path';
|
|
2
|
+
import type { Call, Input } from '../../client/index.js';
|
|
3
|
+
import type { SessionOperation } from '../context/index.js';
|
|
4
|
+
import type { ViewCatalog } from './catalog.js';
|
|
5
|
+
export type ViewInvoker = (call: Call, operation: SessionOperation) => Promise<Input>;
|
|
6
|
+
export type ViewCatalogAdmission = (input: unknown) => ViewCatalog;
|
|
7
|
+
/**
|
|
8
|
+
* Invoke Runtime-owned target View resolution through the canonical source Kernel call, then admit
|
|
9
|
+
* its heterogeneous installed-Publication projection.
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveViewsFor(invoke: ViewInvoker, admitCatalog: ViewCatalogAdmission, target: PathLike, operation: SessionOperation): Promise<ViewCatalog>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Path } from '@astrale-os/kernel-core/path';
|
|
2
|
+
import { view } from '@astrale-os/kernel-core/schema/kernel/syscalls/references';
|
|
3
|
+
import { call } from '../../client/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Invoke Runtime-owned target View resolution through the canonical source Kernel call, then admit
|
|
6
|
+
* its heterogeneous installed-Publication projection.
|
|
7
|
+
*/
|
|
8
|
+
export async function resolveViewsFor(invoke, admitCatalog, target, operation) {
|
|
9
|
+
const path = Path.from(target).raw;
|
|
10
|
+
const owner = Path.project(view.resolve.owner);
|
|
11
|
+
const targetView = Path.staticMethod(owner, view.resolve.name);
|
|
12
|
+
return admitCatalog(await invoke(call(targetView, { target: path }), operation));
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Edge, EdgeKey } from '@astrale-os/kernel-core/graph/edge';
|
|
2
|
+
import type { Node, NodeId } from '@astrale-os/kernel-core/graph/node';
|
|
3
|
+
import type { QueryResult } from '@astrale-os/kernel-core/graph/query';
|
|
4
|
+
export interface FactReferences {
|
|
5
|
+
readonly nodes: readonly NodeId[];
|
|
6
|
+
readonly edges: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
export interface Integration {
|
|
9
|
+
readonly references: FactReferences;
|
|
10
|
+
readonly changedNodes: ReadonlySet<NodeId>;
|
|
11
|
+
readonly changedEdges: ReadonlySet<string>;
|
|
12
|
+
}
|
|
13
|
+
export declare class EntityIndex {
|
|
14
|
+
private readonly nodes;
|
|
15
|
+
private readonly edges;
|
|
16
|
+
integrate(result: QueryResult): Integration;
|
|
17
|
+
node(id: NodeId): Node | undefined;
|
|
18
|
+
edge(key: string): Edge | undefined;
|
|
19
|
+
sweep(reachableNodes: ReadonlySet<NodeId>, reachableEdges: ReadonlySet<string>): void;
|
|
20
|
+
clear(): void;
|
|
21
|
+
}
|
|
22
|
+
export declare function edgeIdentity(key: EdgeKey): string;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { encodeEdgeKey } from '@astrale-os/kernel-core/graph/edge';
|
|
2
|
+
export class EntityIndex {
|
|
3
|
+
nodes = new Map();
|
|
4
|
+
edges = new Map();
|
|
5
|
+
integrate(result) {
|
|
6
|
+
const changedNodes = new Set();
|
|
7
|
+
const changedEdges = new Set();
|
|
8
|
+
const nodeReferences = [];
|
|
9
|
+
const edgeReferences = [];
|
|
10
|
+
const integrateNode = (node) => {
|
|
11
|
+
nodeReferences.push(node.id);
|
|
12
|
+
const current = this.nodes.get(node.id);
|
|
13
|
+
if (current === undefined || signature(current) !== signature(node)) {
|
|
14
|
+
this.nodes.set(node.id, node);
|
|
15
|
+
changedNodes.add(node.id);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const referenceNode = (node) => {
|
|
19
|
+
nodeReferences.push(node.id);
|
|
20
|
+
};
|
|
21
|
+
const integrateEdge = (edge) => {
|
|
22
|
+
const key = encodeEdgeKey(edge);
|
|
23
|
+
edgeReferences.push(key);
|
|
24
|
+
const current = this.edges.get(key);
|
|
25
|
+
if (current === undefined || signature(current) !== signature(edge)) {
|
|
26
|
+
this.edges.set(key, edge);
|
|
27
|
+
changedEdges.add(key);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const referenceEdge = (edge) => {
|
|
31
|
+
edgeReferences.push(encodeEdgeKey(edge));
|
|
32
|
+
};
|
|
33
|
+
if (result.kind === 'graph') {
|
|
34
|
+
result.graph.nodes.forEach(integrateNode);
|
|
35
|
+
result.graph.edges.forEach(integrateEdge);
|
|
36
|
+
}
|
|
37
|
+
else if (result.kind === 'nodes') {
|
|
38
|
+
for (const projection of result.nodes) {
|
|
39
|
+
if (projection.kind === 'value')
|
|
40
|
+
integrateNode(projection.value);
|
|
41
|
+
else
|
|
42
|
+
referenceNode(projection.value);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else if (result.kind === 'edges') {
|
|
46
|
+
for (const item of result.edges) {
|
|
47
|
+
if (item.edge.kind === 'value')
|
|
48
|
+
integrateEdge(item.edge.value);
|
|
49
|
+
else
|
|
50
|
+
referenceEdge(item.edge.value);
|
|
51
|
+
if (item.source.kind === 'value')
|
|
52
|
+
integrateNode(item.source.value);
|
|
53
|
+
else
|
|
54
|
+
referenceNode(item.source.value);
|
|
55
|
+
if (item.target.kind === 'value')
|
|
56
|
+
integrateNode(item.target.value);
|
|
57
|
+
else
|
|
58
|
+
referenceNode(item.target.value);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return Object.freeze({
|
|
62
|
+
references: Object.freeze({
|
|
63
|
+
nodes: Object.freeze(nodeReferences),
|
|
64
|
+
edges: Object.freeze(edgeReferences),
|
|
65
|
+
}),
|
|
66
|
+
changedNodes,
|
|
67
|
+
changedEdges,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
node(id) {
|
|
71
|
+
return this.nodes.get(id);
|
|
72
|
+
}
|
|
73
|
+
edge(key) {
|
|
74
|
+
return this.edges.get(key);
|
|
75
|
+
}
|
|
76
|
+
sweep(reachableNodes, reachableEdges) {
|
|
77
|
+
for (const id of this.nodes.keys())
|
|
78
|
+
if (!reachableNodes.has(id))
|
|
79
|
+
this.nodes.delete(id);
|
|
80
|
+
for (const key of this.edges.keys())
|
|
81
|
+
if (!reachableEdges.has(key))
|
|
82
|
+
this.edges.delete(key);
|
|
83
|
+
}
|
|
84
|
+
clear() {
|
|
85
|
+
this.nodes.clear();
|
|
86
|
+
this.edges.clear();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export function edgeIdentity(key) {
|
|
90
|
+
return encodeEdgeKey(key);
|
|
91
|
+
}
|
|
92
|
+
function signature(value) {
|
|
93
|
+
return JSON.stringify(value);
|
|
94
|
+
}
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,26 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* The client-side graph memory (FRONTEND_GRAPH_DX_SPEC / SHELL_REACT_API).
|
|
3
|
-
*
|
|
4
|
-
* A partial, normalized client copy of the graph kept correct by shapes
|
|
5
|
-
* (standing queries): entity store + shape store + optimistic overlay, over a
|
|
6
|
-
* `GraphApi`. Framework-free — the React bindings layer over `createMemory`.
|
|
7
|
-
* Tier 0 (client self-invalidation) — see `memory.ts` for the interim-ordering
|
|
8
|
-
* caveats until the wire amendments (§6) land.
|
|
9
|
-
*
|
|
10
|
-
* Layout: `canonicalize` (shape keying), `entities`, `shapes`, `overlay`,
|
|
11
|
-
* `invalidate` (§5.6 matching), `memory` (the facade).
|
|
12
|
-
*/
|
|
13
|
-
export { createMemory } from './memory.js';
|
|
14
|
-
export type { GraphMemory } from './memory.js';
|
|
15
|
-
export { canonicalizeAST, shapeInputToAST, shapeKey, stableStringify, stripCursors, } from './canonicalize.js';
|
|
16
|
-
export type { RootResolver, ShapeInput } from './canonicalize.js';
|
|
17
|
-
export { EntityStore } from './entities.js';
|
|
18
|
-
export type { EdgeRecord, NodeRecord, ResultLike } from './entities.js';
|
|
19
|
-
export { ShapeStore } from './shapes.js';
|
|
20
|
-
export type { ShapeEntry } from './shapes.js';
|
|
21
|
-
export { Overlay, normalizePatch } from './overlay.js';
|
|
22
|
-
export type { NormalPatch, OverlayEffects, OverlayUnit } from './overlay.js';
|
|
23
|
-
export { affectedShapes, matchesEdge, matchesNodeStructural, subtreeDelta } from './invalidate.js';
|
|
24
|
-
export type { GatherSpec, InvalidateCtx, ShapeView } from './invalidate.js';
|
|
25
|
-
export type { GatherMeta, LiveResult, MaterializedShape, MutateOptions, ReadOptions, MemoryError, MemoryEvent, MemoryOptions, ShapeMeta, Windowed, } from './types.js';
|
|
26
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { GraphStore, type StoreMutationOptions, type StoreOptions, type StoreQuery, type StoreQueryResponse, type StoreReadOptions, type StoreSnapshot, } from './store.js';
|
package/dist/store/index.js
CHANGED
|
@@ -1,19 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* The client-side graph memory (FRONTEND_GRAPH_DX_SPEC / SHELL_REACT_API).
|
|
3
|
-
*
|
|
4
|
-
* A partial, normalized client copy of the graph kept correct by shapes
|
|
5
|
-
* (standing queries): entity store + shape store + optimistic overlay, over a
|
|
6
|
-
* `GraphApi`. Framework-free — the React bindings layer over `createMemory`.
|
|
7
|
-
* Tier 0 (client self-invalidation) — see `memory.ts` for the interim-ordering
|
|
8
|
-
* caveats until the wire amendments (§6) land.
|
|
9
|
-
*
|
|
10
|
-
* Layout: `canonicalize` (shape keying), `entities`, `shapes`, `overlay`,
|
|
11
|
-
* `invalidate` (§5.6 matching), `memory` (the facade).
|
|
12
|
-
*/
|
|
13
|
-
export { createMemory } from './memory.js';
|
|
14
|
-
export { canonicalizeAST, shapeInputToAST, shapeKey, stableStringify, stripCursors, } from './canonicalize.js';
|
|
15
|
-
export { EntityStore } from './entities.js';
|
|
16
|
-
export { ShapeStore } from './shapes.js';
|
|
17
|
-
export { Overlay, normalizePatch } from './overlay.js';
|
|
18
|
-
export { affectedShapes, matchesEdge, matchesNodeStructural, subtreeDelta } from './invalidate.js';
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { GraphStore, } from './store.js';
|
package/dist/store/memory.d.ts
CHANGED
|
@@ -1,99 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* REVALIDATES them (refetch = reconcile). "Slow but never wrong."
|
|
19
|
-
* - The optimistic overlay is DISPLAY-ONLY. Prop updates on cached nodes and
|
|
20
|
-
* deletes get an overlay (no-flicker prediction); creates/links/unlinks are
|
|
21
|
-
* reconcile-only (a create/link misprediction is a phantom, forbidden; a
|
|
22
|
-
* delete misprediction is loud — a brief reappearance). The overlay is held
|
|
23
|
-
* from apply until the reconciling refetch lands, then dropped — never
|
|
24
|
-
* folded into confirmed state.
|
|
25
|
-
* - Ordering: the logical merge clock is stamped at response ARRIVAL, and a
|
|
26
|
-
* per-scope mutation EPOCH closes the read-straddles-commit window (a
|
|
27
|
-
* response older than a commit is integrated-then-restaled).
|
|
28
|
-
* - Isolation: the `with` lens partitions the ENTITY store, not just the
|
|
29
|
-
* shape key — lenses never share entities.
|
|
30
|
-
*
|
|
31
|
-
* The public surface (`GraphMemory`/`LiveResult`, `createMemory`) is stable:
|
|
32
|
-
* when seq/rev/delta/watch (§6/§7) land, this becomes "fast and never wrong"
|
|
33
|
-
* with no surface change (`commitOverlay` is already the server-delta seam).
|
|
34
|
-
*/
|
|
35
|
-
import type { Node } from '@astrale-os/kernel-core';
|
|
36
|
-
import type { EdgeIdentity, GraphApi, MutationResultWire, PatchBuilder, PatchInput, PathLike, Properties, ReconcileInput, ReconcileResult } from '../graph/index.js';
|
|
37
|
-
import type { ShapeInput } from './canonicalize.js';
|
|
38
|
-
import type { LiveResult, MutateOptions, ReadOptions, MemoryOptions } from './types.js';
|
|
39
|
-
/** The framework-free memory surface (SHELL_REACT §5 + FRONTEND §4.5). */
|
|
40
|
-
export interface GraphMemory {
|
|
41
|
-
/** The principal/isolation key this handle is bound to. */
|
|
42
|
-
readonly scope: string;
|
|
43
|
-
/** The raw floor, untouched. */
|
|
44
|
-
readonly api: GraphApi;
|
|
45
|
-
/** Read-through: resolve the shape, fetching if cold, then return the live result. */
|
|
46
|
-
query(shape: ShapeInput, opts?: ReadOptions): Promise<LiveResult>;
|
|
47
|
-
/** Memory-only, synchronous — no I/O. `null` when the shape is cold. */
|
|
48
|
-
peek(shape: ShapeInput, opts?: ReadOptions): LiveResult | null;
|
|
49
|
-
/** Warm the exact shape a later render reads. */
|
|
50
|
-
preload(shape: ShapeInput, opts?: ReadOptions): Promise<void>;
|
|
51
|
-
/** External-store subscription: `onStoreChange` fires when this shape changes. */
|
|
52
|
-
subscribe(shape: ShapeInput, onStoreChange: () => void, opts?: ReadOptions): () => void;
|
|
53
|
-
/** The current live result for a shape — stable ref when unchanged (getSnapshot). */
|
|
54
|
-
getSnapshot(shape: ShapeInput, opts?: ReadOptions): LiveResult;
|
|
55
|
-
/** A promise that resolves once the shape first has confirmed data (suspense). */
|
|
56
|
-
promise(shape: ShapeInput, opts?: ReadOptions): Promise<LiveResult>;
|
|
57
|
-
/** Convenience: subscribe + push the current (and each subsequent) snapshot to `cb`. */
|
|
58
|
-
watch(shape: ShapeInput, cb: (result: LiveResult) => void, opts?: ReadOptions): () => void;
|
|
59
|
-
/** Batch write — optimistic-auto (§4.4). Builder or pre-built patch. */
|
|
60
|
-
mutate(arg: ((m: PatchBuilder) => void | Promise<void>) | PatchInput, opts?: MutateOptions): Promise<MutationResultWire>;
|
|
61
|
-
/** Delegates to `GraphApi.reconcile`; the store only invalidates touched shapes. */
|
|
62
|
-
reconcile(input: ReconcileInput): Promise<ReconcileResult>;
|
|
63
|
-
update(node: Node | PathLike, props: Properties, opts?: MutateOptions): Promise<void>;
|
|
64
|
-
create(cls: PathLike, at: PathLike, props?: Properties, opts?: MutateOptions): Promise<string>;
|
|
65
|
-
remove(node: Node | PathLike, opts?: MutateOptions): Promise<void>;
|
|
66
|
-
link(edge: EdgeIdentity & {
|
|
67
|
-
props?: Properties;
|
|
68
|
-
}, opts?: MutateOptions): Promise<string>;
|
|
69
|
-
unlink(edge: EdgeIdentity, opts?: MutateOptions): Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* Apply a MANUAL optimistic overlay decoupled from any dispatch (§1.6 — the
|
|
72
|
-
* method-dispatch seam a patch arm can't express, e.g. `user::switchSpace`).
|
|
73
|
-
* SAFE MODE: only the display-safe arms (prop updates on cached nodes,
|
|
74
|
-
* deletes) predict; the caller dispatches whatever it likes, then `commit()`s
|
|
75
|
-
* (reconcile the touched shapes from the server, drop the overlay) or
|
|
76
|
-
* `rollback()`s.
|
|
77
|
-
*/
|
|
78
|
-
overlay(build: (m: PatchBuilder) => void, opts?: {
|
|
79
|
-
scope?: string;
|
|
80
|
-
}): OptimisticOverlay;
|
|
81
|
-
/** An isolated handle for another scope (principal). No store sharing (§5.4). */
|
|
82
|
-
forScope(scope: string, api?: GraphApi): GraphMemory;
|
|
83
|
-
/** Release unobserved shapes past their ttl and GC unreachable entities. */
|
|
84
|
-
sweep(): void;
|
|
1
|
+
import type { QueryAST } from '@astrale-os/kernel-core/graph/query';
|
|
2
|
+
import type { QueryPageRequest } from '../graph/index.js';
|
|
3
|
+
import type { GraphApi } from '../graph/index.js';
|
|
4
|
+
import type { StoreQueryResponse, StoreReadOptions, StoreSnapshot } from './store.js';
|
|
5
|
+
import { ClientError } from '../errors/index.js';
|
|
6
|
+
import { EntityIndex } from './entity-index.js';
|
|
7
|
+
import { OptimisticOverlay } from './optimistic.js';
|
|
8
|
+
import { QueryShape } from './shape.js';
|
|
9
|
+
export interface GraphMemoryOptions {
|
|
10
|
+
readonly graph: GraphApi;
|
|
11
|
+
readonly ttlMs: number;
|
|
12
|
+
readonly concurrency: number;
|
|
13
|
+
readonly maximumShapes: number;
|
|
14
|
+
readonly now: () => number;
|
|
15
|
+
readonly onError?: (error: unknown) => void;
|
|
16
|
+
readonly lifecycle: AbortSignal;
|
|
17
|
+
readonly requireOpen: () => void;
|
|
85
18
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
19
|
+
export declare class GraphMemory {
|
|
20
|
+
private readonly options;
|
|
21
|
+
readonly entities: EntityIndex;
|
|
22
|
+
readonly overlay: OptimisticOverlay;
|
|
23
|
+
private readonly shapes;
|
|
24
|
+
private readonly pending;
|
|
25
|
+
private active;
|
|
26
|
+
constructor(options: GraphMemoryOptions);
|
|
27
|
+
ensure(key: string, ast: QueryAST, page: QueryPageRequest): QueryShape;
|
|
28
|
+
get(key: string): QueryShape | undefined;
|
|
29
|
+
read(shape: QueryShape, options: StoreReadOptions): Promise<StoreQueryResponse>;
|
|
30
|
+
snapshot(shape: QueryShape | undefined): StoreSnapshot;
|
|
31
|
+
subscribe(shape: QueryShape, listener: () => void): () => void;
|
|
32
|
+
invalidate(shape?: QueryShape): void;
|
|
33
|
+
optimistic(): void;
|
|
34
|
+
settleOptimistic(): void;
|
|
35
|
+
sweep(): void;
|
|
36
|
+
private releaseExpired;
|
|
37
|
+
private evictLeastRecentlyUsed;
|
|
38
|
+
private releasable;
|
|
39
|
+
private touch;
|
|
40
|
+
private sweepEntities;
|
|
41
|
+
close(error: ClientError): void;
|
|
42
|
+
private materialize;
|
|
43
|
+
private materializeResult;
|
|
44
|
+
private publish;
|
|
45
|
+
private schedule;
|
|
46
|
+
private drain;
|
|
47
|
+
private report;
|
|
96
48
|
}
|
|
97
|
-
/** Bind the memory onto a `GraphApi`. */
|
|
98
|
-
export declare function createMemory(api: GraphApi, opts?: MemoryOptions): GraphMemory;
|
|
99
|
-
//# sourceMappingURL=memory.d.ts.map
|