@astrale-os/kernel-protocol 0.5.0-beta.6 → 0.5.0-beta.60
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/artifact/index.d.ts +0 -1
- package/dist/artifact/index.js +0 -1
- package/dist/artifact/ref.d.ts +0 -1
- package/dist/artifact/ref.js +0 -1
- package/dist/codecs/codec.d.ts +0 -1
- package/dist/codecs/codec.js +0 -1
- package/dist/codecs/index.d.ts +0 -1
- package/dist/codecs/index.js +0 -1
- package/dist/codecs/json.d.ts +0 -1
- package/dist/codecs/json.js +0 -1
- package/dist/codecs/media-types.d.ts +0 -1
- package/dist/codecs/media-types.js +0 -1
- package/dist/codecs/msgpack.d.ts +0 -1
- package/dist/codecs/msgpack.js +4 -2
- package/dist/errors/codes.d.ts +0 -1
- package/dist/errors/codes.js +0 -1
- package/dist/errors/http-status.d.ts +0 -1
- package/dist/errors/http-status.js +0 -1
- package/dist/errors/index.d.ts +0 -1
- package/dist/errors/index.js +0 -1
- package/dist/errors/payload.d.ts +0 -1
- package/dist/errors/payload.js +3 -3
- package/dist/errors/protocol-error.d.ts +0 -1
- package/dist/errors/protocol-error.js +4 -3
- package/dist/errors/reason.d.ts +0 -1
- package/dist/errors/reason.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/invocation/admission.d.ts +0 -1
- package/dist/invocation/admission.js +2 -6
- package/dist/invocation/binary.d.ts +1 -1
- package/dist/invocation/binary.js +14 -2
- package/dist/invocation/binding-codecs.d.ts +0 -1
- package/dist/invocation/binding-codecs.js +0 -1
- package/dist/invocation/cancellation.d.ts +0 -1
- package/dist/invocation/cancellation.js +0 -1
- package/dist/invocation/correlation.d.ts +0 -1
- package/dist/invocation/correlation.js +0 -1
- package/dist/invocation/delegate.d.ts +0 -1
- package/dist/invocation/delegate.js +0 -1
- package/dist/invocation/http/binary.d.ts +3 -2
- package/dist/invocation/http/binary.js +4 -2
- package/dist/invocation/http/index.d.ts +1 -2
- package/dist/invocation/http/index.js +1 -2
- package/dist/invocation/http/negotiation.d.ts +0 -1
- package/dist/invocation/http/negotiation.js +0 -1
- package/dist/invocation/http/stream.d.ts +0 -1
- package/dist/invocation/http/stream.js +0 -1
- package/dist/invocation/http/trace.d.ts +0 -1
- package/dist/invocation/http/trace.js +0 -1
- package/dist/invocation/idempotency.d.ts +0 -1
- package/dist/invocation/idempotency.js +0 -1
- package/dist/invocation/identity.d.ts +0 -1
- package/dist/invocation/identity.js +0 -1
- package/dist/invocation/index.d.ts +2 -3
- package/dist/invocation/index.js +2 -3
- package/dist/invocation/miss.d.ts +0 -1
- package/dist/invocation/miss.js +0 -1
- package/dist/invocation/redirect.d.ts +0 -1
- package/dist/invocation/redirect.js +0 -1
- package/dist/invocation/request.d.ts +0 -1
- package/dist/invocation/request.js +0 -1
- package/dist/invocation/response.d.ts +0 -1
- package/dist/invocation/response.js +0 -1
- package/dist/invocation/routing.d.ts +0 -1
- package/dist/invocation/routing.js +0 -1
- package/dist/invocation/schema.d.ts +10 -4
- package/dist/invocation/schema.js +7 -7
- package/dist/invocation/service-reason.d.ts +16 -12
- package/dist/invocation/service-reason.js +15 -9
- package/dist/invocation/stale-route.d.ts +0 -1
- package/dist/invocation/stale-route.js +0 -1
- package/dist/invocation/stream.d.ts +0 -1
- package/dist/invocation/stream.js +0 -1
- package/dist/invocation/target.d.ts +2 -3
- package/dist/invocation/target.js +17 -3
- package/dist/invocation/trace.d.ts +0 -1
- package/dist/invocation/trace.js +0 -1
- package/dist/invocation/version.d.ts +0 -1
- package/dist/invocation/version.js +0 -1
- package/dist/invocation/websocket/binary.d.ts +0 -1
- package/dist/invocation/websocket/binary.js +2 -2
- package/dist/invocation/websocket/index.d.ts +0 -1
- package/dist/invocation/websocket/index.js +0 -1
- package/dist/invocation/websocket/subprotocol.d.ts +0 -1
- package/dist/invocation/websocket/subprotocol.js +0 -1
- package/dist/issuer/configuration.d.ts +0 -1
- package/dist/issuer/configuration.js +0 -1
- package/dist/issuer/error.d.ts +0 -1
- package/dist/issuer/error.js +0 -1
- package/dist/issuer/exchange.d.ts +0 -1
- package/dist/issuer/exchange.js +0 -1
- package/dist/issuer/hosted.d.ts +0 -1
- package/dist/issuer/hosted.js +0 -1
- package/dist/issuer/index.d.ts +0 -1
- package/dist/issuer/index.js +0 -1
- package/dist/issuer/key-set.d.ts +0 -1
- package/dist/issuer/key-set.js +0 -1
- package/dist/issuer/paths.d.ts +0 -1
- package/dist/issuer/paths.js +0 -1
- package/dist/issuer/url.d.ts +0 -1
- package/dist/issuer/url.js +0 -1
- package/dist/publication/bindings/callable.d.ts +0 -1
- package/dist/publication/bindings/callable.js +8 -6
- package/dist/publication/bindings/index.d.ts +1 -2
- package/dist/publication/bindings/index.js +0 -1
- package/dist/publication/bindings/invocation.d.ts +0 -1
- package/dist/publication/bindings/invocation.js +0 -1
- package/dist/publication/bindings/view.d.ts +9 -1
- package/dist/publication/bindings/view.js +122 -3
- package/dist/publication/bundle-admission.d.ts +0 -1
- package/dist/publication/bundle-admission.js +14 -14
- package/dist/publication/bundle-descriptor.d.ts +0 -1
- package/dist/publication/bundle-descriptor.js +0 -1
- package/dist/publication/bundle-evidence.d.ts +0 -1
- package/dist/publication/bundle-evidence.js +0 -1
- package/dist/publication/bundle.d.ts +4 -2
- package/dist/publication/bundle.js +9 -4
- package/dist/publication/content.d.ts +0 -1
- package/dist/publication/content.js +0 -1
- package/dist/publication/declaration.d.ts +0 -1
- package/dist/publication/declaration.js +0 -1
- package/dist/publication/delivery/attestation.d.ts +0 -1
- package/dist/publication/delivery/attestation.js +0 -1
- package/dist/publication/delivery/claims.d.ts +1 -2
- package/dist/publication/delivery/claims.js +0 -1
- package/dist/publication/delivery/delivery.d.ts +0 -1
- package/dist/publication/delivery/delivery.js +0 -1
- package/dist/publication/delivery/error.d.ts +0 -1
- package/dist/publication/delivery/error.js +0 -1
- package/dist/publication/delivery/index.d.ts +0 -1
- package/dist/publication/delivery/index.js +0 -1
- package/dist/publication/delivery/limits.d.ts +0 -1
- package/dist/publication/delivery/limits.js +0 -1
- package/dist/publication/delivery/request.d.ts +0 -1
- package/dist/publication/delivery/request.js +0 -1
- package/dist/publication/delivery-declaration.d.ts +0 -1
- package/dist/publication/delivery-declaration.js +0 -1
- package/dist/publication/delivery-endpoint.d.ts +0 -1
- package/dist/publication/delivery-endpoint.js +0 -1
- package/dist/publication/error.d.ts +0 -1
- package/dist/publication/error.js +0 -1
- package/dist/publication/etag.d.ts +0 -1
- package/dist/publication/etag.js +5 -2
- package/dist/publication/index.d.ts +4 -5
- package/dist/publication/index.js +2 -3
- package/dist/publication/legacy-requirements.d.ts +12 -0
- package/dist/publication/legacy-requirements.js +23 -0
- package/dist/publication/manifest.d.ts +2 -3
- package/dist/publication/manifest.js +10 -6
- package/dist/publication/publication.d.ts +4 -3
- package/dist/publication/publication.js +27 -12
- package/dist/publication/reference.d.ts +1 -2
- package/dist/publication/reference.js +0 -1
- package/dist/publication/requirements.d.ts +15 -8
- package/dist/publication/requirements.js +147 -45
- package/dist/publication/route.d.ts +0 -1
- package/dist/publication/route.js +0 -1
- package/dist/publication/schema.d.ts +1 -2
- package/dist/publication/schema.js +0 -1
- package/dist/routes/admission.d.ts +0 -1
- package/dist/routes/admission.js +5 -6
- package/dist/routes/binding.d.ts +3 -4
- package/dist/routes/binding.js +6 -8
- package/dist/routes/collision.d.ts +0 -1
- package/dist/routes/collision.js +0 -1
- package/dist/routes/compiler.d.ts +2 -3
- package/dist/routes/compiler.js +14 -12
- package/dist/routes/credential.d.ts +0 -1
- package/dist/routes/credential.js +0 -1
- package/dist/routes/decode.d.ts +2 -3
- package/dist/routes/decode.js +14 -25
- package/dist/routes/encode.d.ts +2 -3
- package/dist/routes/encode.js +18 -17
- package/dist/routes/error-response.d.ts +0 -1
- package/dist/routes/error-response.js +0 -1
- package/dist/routes/error.d.ts +0 -1
- package/dist/routes/error.js +0 -1
- package/dist/routes/evidence.d.ts +3 -4
- package/dist/routes/evidence.js +15 -14
- package/dist/routes/index.d.ts +0 -1
- package/dist/routes/index.js +0 -1
- package/dist/routes/mapping.d.ts +0 -1
- package/dist/routes/mapping.js +0 -1
- package/dist/routes/match.d.ts +0 -1
- package/dist/routes/match.js +0 -1
- package/dist/routes/placement.d.ts +0 -1
- package/dist/routes/placement.js +1 -2
- package/dist/routes/plan.d.ts +5 -5
- package/dist/routes/plan.js +0 -1
- package/dist/routes/release-unavailable.d.ts +0 -1
- package/dist/routes/release-unavailable.js +0 -1
- package/dist/routes/request.d.ts +0 -1
- package/dist/routes/request.js +3 -2
- package/dist/routes/reservation.d.ts +0 -1
- package/dist/routes/reservation.js +7 -2
- package/dist/routes/routing.d.ts +0 -1
- package/dist/routes/routing.js +0 -1
- package/dist/routes/scalar.d.ts +3 -4
- package/dist/routes/scalar.js +5 -6
- package/dist/routes/select.d.ts +0 -1
- package/dist/routes/select.js +0 -1
- package/dist/routes/stream.d.ts +0 -1
- package/dist/routes/stream.js +0 -1
- package/dist/routes/table.d.ts +0 -1
- package/dist/routes/table.js +0 -1
- package/dist/routes/target.d.ts +0 -1
- package/dist/routes/target.js +0 -1
- package/dist/routes/template.d.ts +0 -1
- package/dist/routes/template.js +0 -1
- package/dist/runtime/artifact.d.ts +6 -5
- package/dist/runtime/artifact.js +22 -10
- package/dist/runtime/index.d.ts +1 -2
- package/dist/runtime/index.js +1 -2
- package/dist/schema/index.d.ts +0 -1
- package/dist/schema/index.js +0 -1
- package/dist/schema/installation/codec.d.ts +4 -0
- package/dist/schema/installation/codec.js +71 -0
- package/dist/schema/installation/index.d.ts +2 -1
- package/dist/schema/installation/index.js +1 -1
- package/dist/schema/installation/introspection/codec.d.ts +5 -3
- package/dist/schema/installation/introspection/codec.js +184 -192
- package/dist/schema/installation/introspection/index.d.ts +2 -3
- package/dist/schema/installation/introspection/index.js +1 -2
- package/dist/schema/installation/introspection/result.d.ts +36 -23
- package/dist/schema/installation/introspection/result.js +0 -1
- package/dist/schema/installation/result.d.ts +9 -0
- package/dist/schema/installation/result.js +1 -0
- package/package.json +27 -13
- package/dist/artifact/index.d.ts.map +0 -1
- package/dist/artifact/index.js.map +0 -1
- package/dist/artifact/ref.d.ts.map +0 -1
- package/dist/artifact/ref.js.map +0 -1
- package/dist/codecs/codec.d.ts.map +0 -1
- package/dist/codecs/codec.js.map +0 -1
- package/dist/codecs/index.d.ts.map +0 -1
- package/dist/codecs/index.js.map +0 -1
- package/dist/codecs/json.d.ts.map +0 -1
- package/dist/codecs/json.js.map +0 -1
- package/dist/codecs/media-types.d.ts.map +0 -1
- package/dist/codecs/media-types.js.map +0 -1
- package/dist/codecs/msgpack.d.ts.map +0 -1
- package/dist/codecs/msgpack.js.map +0 -1
- package/dist/errors/codes.d.ts.map +0 -1
- package/dist/errors/codes.js.map +0 -1
- package/dist/errors/http-status.d.ts.map +0 -1
- package/dist/errors/http-status.js.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js.map +0 -1
- package/dist/errors/payload.d.ts.map +0 -1
- package/dist/errors/payload.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/reason.d.ts.map +0 -1
- package/dist/errors/reason.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/invocation/admission.d.ts.map +0 -1
- package/dist/invocation/admission.js.map +0 -1
- package/dist/invocation/binary.d.ts.map +0 -1
- package/dist/invocation/binary.js.map +0 -1
- package/dist/invocation/binding-codecs.d.ts.map +0 -1
- package/dist/invocation/binding-codecs.js.map +0 -1
- package/dist/invocation/cancellation.d.ts.map +0 -1
- package/dist/invocation/cancellation.js.map +0 -1
- package/dist/invocation/correlation.d.ts.map +0 -1
- package/dist/invocation/correlation.js.map +0 -1
- package/dist/invocation/delegate.d.ts.map +0 -1
- package/dist/invocation/delegate.js.map +0 -1
- package/dist/invocation/http/binary.d.ts.map +0 -1
- package/dist/invocation/http/binary.js.map +0 -1
- package/dist/invocation/http/index.d.ts.map +0 -1
- package/dist/invocation/http/index.js.map +0 -1
- package/dist/invocation/http/negotiation.d.ts.map +0 -1
- package/dist/invocation/http/negotiation.js.map +0 -1
- package/dist/invocation/http/stream.d.ts.map +0 -1
- package/dist/invocation/http/stream.js.map +0 -1
- package/dist/invocation/http/trace.d.ts.map +0 -1
- package/dist/invocation/http/trace.js.map +0 -1
- package/dist/invocation/idempotency.d.ts.map +0 -1
- package/dist/invocation/idempotency.js.map +0 -1
- package/dist/invocation/identity.d.ts.map +0 -1
- package/dist/invocation/identity.js.map +0 -1
- package/dist/invocation/index.d.ts.map +0 -1
- package/dist/invocation/index.js.map +0 -1
- package/dist/invocation/miss.d.ts.map +0 -1
- package/dist/invocation/miss.js.map +0 -1
- package/dist/invocation/redirect.d.ts.map +0 -1
- package/dist/invocation/redirect.js.map +0 -1
- package/dist/invocation/request.d.ts.map +0 -1
- package/dist/invocation/request.js.map +0 -1
- package/dist/invocation/response.d.ts.map +0 -1
- package/dist/invocation/response.js.map +0 -1
- package/dist/invocation/routing.d.ts.map +0 -1
- package/dist/invocation/routing.js.map +0 -1
- package/dist/invocation/schema.d.ts.map +0 -1
- package/dist/invocation/schema.js.map +0 -1
- package/dist/invocation/service-reason.d.ts.map +0 -1
- package/dist/invocation/service-reason.js.map +0 -1
- package/dist/invocation/stale-route.d.ts.map +0 -1
- package/dist/invocation/stale-route.js.map +0 -1
- package/dist/invocation/stream.d.ts.map +0 -1
- package/dist/invocation/stream.js.map +0 -1
- package/dist/invocation/target.d.ts.map +0 -1
- package/dist/invocation/target.js.map +0 -1
- package/dist/invocation/trace.d.ts.map +0 -1
- package/dist/invocation/trace.js.map +0 -1
- package/dist/invocation/version.d.ts.map +0 -1
- package/dist/invocation/version.js.map +0 -1
- package/dist/invocation/websocket/binary.d.ts.map +0 -1
- package/dist/invocation/websocket/binary.js.map +0 -1
- package/dist/invocation/websocket/index.d.ts.map +0 -1
- package/dist/invocation/websocket/index.js.map +0 -1
- package/dist/invocation/websocket/subprotocol.d.ts.map +0 -1
- package/dist/invocation/websocket/subprotocol.js.map +0 -1
- package/dist/issuer/configuration.d.ts.map +0 -1
- package/dist/issuer/configuration.js.map +0 -1
- package/dist/issuer/error.d.ts.map +0 -1
- package/dist/issuer/error.js.map +0 -1
- package/dist/issuer/exchange.d.ts.map +0 -1
- package/dist/issuer/exchange.js.map +0 -1
- package/dist/issuer/hosted.d.ts.map +0 -1
- package/dist/issuer/hosted.js.map +0 -1
- package/dist/issuer/index.d.ts.map +0 -1
- package/dist/issuer/index.js.map +0 -1
- package/dist/issuer/key-set.d.ts.map +0 -1
- package/dist/issuer/key-set.js.map +0 -1
- package/dist/issuer/paths.d.ts.map +0 -1
- package/dist/issuer/paths.js.map +0 -1
- package/dist/issuer/url.d.ts.map +0 -1
- package/dist/issuer/url.js.map +0 -1
- package/dist/publication/bindings/callable.d.ts.map +0 -1
- package/dist/publication/bindings/callable.js.map +0 -1
- package/dist/publication/bindings/index.d.ts.map +0 -1
- package/dist/publication/bindings/index.js.map +0 -1
- package/dist/publication/bindings/invocation.d.ts.map +0 -1
- package/dist/publication/bindings/invocation.js.map +0 -1
- package/dist/publication/bindings/view.d.ts.map +0 -1
- package/dist/publication/bindings/view.js.map +0 -1
- package/dist/publication/bundle-admission.d.ts.map +0 -1
- package/dist/publication/bundle-admission.js.map +0 -1
- package/dist/publication/bundle-descriptor.d.ts.map +0 -1
- package/dist/publication/bundle-descriptor.js.map +0 -1
- package/dist/publication/bundle-evidence.d.ts.map +0 -1
- package/dist/publication/bundle-evidence.js.map +0 -1
- package/dist/publication/bundle.d.ts.map +0 -1
- package/dist/publication/bundle.js.map +0 -1
- package/dist/publication/content.d.ts.map +0 -1
- package/dist/publication/content.js.map +0 -1
- package/dist/publication/declaration.d.ts.map +0 -1
- package/dist/publication/declaration.js.map +0 -1
- package/dist/publication/delivery/attestation.d.ts.map +0 -1
- package/dist/publication/delivery/attestation.js.map +0 -1
- package/dist/publication/delivery/claims.d.ts.map +0 -1
- package/dist/publication/delivery/claims.js.map +0 -1
- package/dist/publication/delivery/delivery.d.ts.map +0 -1
- package/dist/publication/delivery/delivery.js.map +0 -1
- package/dist/publication/delivery/error.d.ts.map +0 -1
- package/dist/publication/delivery/error.js.map +0 -1
- package/dist/publication/delivery/index.d.ts.map +0 -1
- package/dist/publication/delivery/index.js.map +0 -1
- package/dist/publication/delivery/limits.d.ts.map +0 -1
- package/dist/publication/delivery/limits.js.map +0 -1
- package/dist/publication/delivery/request.d.ts.map +0 -1
- package/dist/publication/delivery/request.js.map +0 -1
- package/dist/publication/delivery-declaration.d.ts.map +0 -1
- package/dist/publication/delivery-declaration.js.map +0 -1
- package/dist/publication/delivery-endpoint.d.ts.map +0 -1
- package/dist/publication/delivery-endpoint.js.map +0 -1
- package/dist/publication/error.d.ts.map +0 -1
- package/dist/publication/error.js.map +0 -1
- package/dist/publication/etag.d.ts.map +0 -1
- package/dist/publication/etag.js.map +0 -1
- package/dist/publication/index.d.ts.map +0 -1
- package/dist/publication/index.js.map +0 -1
- package/dist/publication/manifest.d.ts.map +0 -1
- package/dist/publication/manifest.js.map +0 -1
- package/dist/publication/publication.d.ts.map +0 -1
- package/dist/publication/publication.js.map +0 -1
- package/dist/publication/reference.d.ts.map +0 -1
- package/dist/publication/reference.js.map +0 -1
- package/dist/publication/requirements.d.ts.map +0 -1
- package/dist/publication/requirements.js.map +0 -1
- package/dist/publication/route.d.ts.map +0 -1
- package/dist/publication/route.js.map +0 -1
- package/dist/publication/schema.d.ts.map +0 -1
- package/dist/publication/schema.js.map +0 -1
- package/dist/routes/admission.d.ts.map +0 -1
- package/dist/routes/admission.js.map +0 -1
- package/dist/routes/binding.d.ts.map +0 -1
- package/dist/routes/binding.js.map +0 -1
- package/dist/routes/collision.d.ts.map +0 -1
- package/dist/routes/collision.js.map +0 -1
- package/dist/routes/compiler.d.ts.map +0 -1
- package/dist/routes/compiler.js.map +0 -1
- package/dist/routes/credential.d.ts.map +0 -1
- package/dist/routes/credential.js.map +0 -1
- package/dist/routes/decode.d.ts.map +0 -1
- package/dist/routes/decode.js.map +0 -1
- package/dist/routes/encode.d.ts.map +0 -1
- package/dist/routes/encode.js.map +0 -1
- package/dist/routes/error-response.d.ts.map +0 -1
- package/dist/routes/error-response.js.map +0 -1
- package/dist/routes/error.d.ts.map +0 -1
- package/dist/routes/error.js.map +0 -1
- package/dist/routes/evidence.d.ts.map +0 -1
- package/dist/routes/evidence.js.map +0 -1
- package/dist/routes/index.d.ts.map +0 -1
- package/dist/routes/index.js.map +0 -1
- package/dist/routes/mapping.d.ts.map +0 -1
- package/dist/routes/mapping.js.map +0 -1
- package/dist/routes/match.d.ts.map +0 -1
- package/dist/routes/match.js.map +0 -1
- package/dist/routes/placement.d.ts.map +0 -1
- package/dist/routes/placement.js.map +0 -1
- package/dist/routes/plan.d.ts.map +0 -1
- package/dist/routes/plan.js.map +0 -1
- package/dist/routes/release-unavailable.d.ts.map +0 -1
- package/dist/routes/release-unavailable.js.map +0 -1
- package/dist/routes/request.d.ts.map +0 -1
- package/dist/routes/request.js.map +0 -1
- package/dist/routes/reservation.d.ts.map +0 -1
- package/dist/routes/reservation.js.map +0 -1
- package/dist/routes/routing.d.ts.map +0 -1
- package/dist/routes/routing.js.map +0 -1
- package/dist/routes/scalar.d.ts.map +0 -1
- package/dist/routes/scalar.js.map +0 -1
- package/dist/routes/select.d.ts.map +0 -1
- package/dist/routes/select.js.map +0 -1
- package/dist/routes/stream.d.ts.map +0 -1
- package/dist/routes/stream.js.map +0 -1
- package/dist/routes/table.d.ts.map +0 -1
- package/dist/routes/table.js.map +0 -1
- package/dist/routes/target.d.ts.map +0 -1
- package/dist/routes/target.js.map +0 -1
- package/dist/routes/template.d.ts.map +0 -1
- package/dist/routes/template.js.map +0 -1
- package/dist/runtime/artifact.d.ts.map +0 -1
- package/dist/runtime/artifact.js.map +0 -1
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/index.js.map +0 -1
- package/dist/schema/installation/index.d.ts.map +0 -1
- package/dist/schema/installation/index.js.map +0 -1
- package/dist/schema/installation/introspection/codec.d.ts.map +0 -1
- package/dist/schema/installation/introspection/codec.js.map +0 -1
- package/dist/schema/installation/introspection/index.d.ts.map +0 -1
- package/dist/schema/installation/introspection/index.js.map +0 -1
- package/dist/schema/installation/introspection/result.d.ts.map +0 -1
- package/dist/schema/installation/introspection/result.js.map +0 -1
|
@@ -1,24 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
1
|
+
import { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
2
|
+
import * as bundle from '@astrale-os/kernel-dsl/v1/bundle/transport';
|
|
3
|
+
import { revision as schemaRevision } from '@astrale-os/kernel-dsl/v1/schema/revision';
|
|
4
|
+
import { admitCallableBinding, admitViewBinding } from '../../../publication/bindings/index.js';
|
|
4
5
|
import * as publication from '../../../publication/index.js';
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
export const MEDIA_TYPE = 'application/vnd.astrale.schema-introspection.v2+msgpack';
|
|
7
|
+
const encodedBundles = new WeakMap();
|
|
8
|
+
const admittedBundles = new Map();
|
|
9
|
+
const MAXIMUM_ADMITTED_BUNDLES = 128;
|
|
7
10
|
export async function encode(input, result) {
|
|
8
|
-
const
|
|
9
|
-
const wire =
|
|
11
|
+
const request = admitRequest(input);
|
|
12
|
+
const wire = request.kind === 'bundle'
|
|
13
|
+
? encodeDomainBundle(result)
|
|
14
|
+
: request.kind === 'dependencies'
|
|
15
|
+
? encodeDomainDependencies(result)
|
|
16
|
+
: encodeDomainInfo(result);
|
|
17
|
+
proveRequestedOrigin(request, result);
|
|
18
|
+
// Non-literal specifiers keep msgpackr's Node-typed declarations out of consumers (see codecs/msgpack.ts).
|
|
10
19
|
const { pack } = await import('msgpackr/pack');
|
|
11
20
|
return new Uint8Array(pack(wire));
|
|
12
21
|
}
|
|
13
22
|
export async function decode(input, bytes, limits) {
|
|
23
|
+
const request = admitRequest(input);
|
|
14
24
|
if (!(bytes instanceof Uint8Array))
|
|
15
25
|
invalid('Schema introspection evidence must be binary.');
|
|
16
26
|
admitLimit(limits.maximumPublicationBytes, 'Publication');
|
|
17
|
-
|
|
18
|
-
|
|
27
|
+
if (request.kind === 'bundle')
|
|
28
|
+
admitLimit(limits.maximumBundleBytes, 'Bundle');
|
|
29
|
+
const maximumEvidenceBytes = limits.maximumPublicationBytes +
|
|
30
|
+
(request.kind === 'bundle' ? limits.maximumBundleBytes : 0) +
|
|
31
|
+
4_096;
|
|
32
|
+
if (bytes.byteLength > maximumEvidenceBytes) {
|
|
19
33
|
invalid('Schema introspection evidence exceeds its declared bounds.');
|
|
20
34
|
}
|
|
21
|
-
const { unpack } = await import('msgpackr
|
|
35
|
+
const { unpack } = await import('msgpackr');
|
|
22
36
|
let decoded;
|
|
23
37
|
try {
|
|
24
38
|
decoded = unpack(bytes);
|
|
@@ -26,202 +40,196 @@ export async function decode(input, bytes, limits) {
|
|
|
26
40
|
catch (cause) {
|
|
27
41
|
throw new TypeError('Schema introspection evidence is malformed.', { cause });
|
|
28
42
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return
|
|
43
|
+
const result = (request.kind === 'bundle'
|
|
44
|
+
? decodeDomainBundle(decoded, limits.maximumBundleBytes)
|
|
45
|
+
: request.kind === 'dependencies'
|
|
46
|
+
? acceptDomainDependencies(decoded)
|
|
47
|
+
: acceptDomainInfo(decoded));
|
|
48
|
+
proveRequestedOrigin(request, result);
|
|
49
|
+
return result;
|
|
36
50
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
output.source = source;
|
|
51
|
-
break;
|
|
52
|
-
case 'bundle':
|
|
53
|
-
output.bundle = encodeBundle(result.bundle, result.source);
|
|
54
|
-
break;
|
|
55
|
-
case 'readiness':
|
|
56
|
-
output.readiness =
|
|
57
|
-
result.readiness === null ? null : digest(result.readiness, 'Installation readiness');
|
|
58
|
-
break;
|
|
59
|
-
case 'capabilities':
|
|
60
|
-
output.capabilities = capabilities(result.capabilities);
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return Object.freeze(output);
|
|
51
|
+
function proveRequestedOrigin(request, result) {
|
|
52
|
+
const origin = request.kind === 'inspect'
|
|
53
|
+
? result.origin
|
|
54
|
+
: result.domain.origin;
|
|
55
|
+
if (origin !== request.origin)
|
|
56
|
+
invalid('Schema introspection evidence does not match the requested origin.');
|
|
57
|
+
}
|
|
58
|
+
function encodeDomainDependencies(input) {
|
|
59
|
+
const admitted = acceptDomainDependencies(input);
|
|
60
|
+
return Object.freeze({
|
|
61
|
+
domain: encodeDomainInfo(admitted.domain),
|
|
62
|
+
dependencies: admitted.dependencies.map((binding) => ({ ...binding })),
|
|
63
|
+
});
|
|
65
64
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
output.source = source;
|
|
79
|
-
break;
|
|
80
|
-
case 'bundle':
|
|
81
|
-
output.bundle = decodeBundle(input.bundle, source, limits.maximumBundleBytes);
|
|
82
|
-
break;
|
|
83
|
-
case 'readiness':
|
|
84
|
-
output.readiness =
|
|
85
|
-
input.readiness === null ? null : digest(input.readiness, 'Installation readiness');
|
|
86
|
-
break;
|
|
87
|
-
case 'capabilities':
|
|
88
|
-
output.capabilities = capabilities(input.capabilities);
|
|
89
|
-
break;
|
|
65
|
+
/** Admit dependency bindings: origin-ordered, one per origin, each label agreeing with its revisions. */
|
|
66
|
+
export function acceptDomainDependencies(input) {
|
|
67
|
+
const value = record(input, 'Domain dependencies result');
|
|
68
|
+
exact(value, ['dependencies', 'domain'], 'Domain dependencies result');
|
|
69
|
+
const domain = acceptDomainInfo(value.domain);
|
|
70
|
+
if (!Array.isArray(value.dependencies))
|
|
71
|
+
invalid('Domain dependency bindings are invalid.');
|
|
72
|
+
const dependencies = value.dependencies.map(acceptDependencyBinding);
|
|
73
|
+
for (const [index, binding] of dependencies.entries()) {
|
|
74
|
+
const previous = dependencies[index - 1];
|
|
75
|
+
if (previous !== undefined && previous.origin >= binding.origin) {
|
|
76
|
+
invalid('Domain dependency bindings must be origin-ordered and unique.');
|
|
90
77
|
}
|
|
78
|
+
if (binding.origin === domain.origin)
|
|
79
|
+
invalid('Domain dependency bindings cannot name the Domain.');
|
|
91
80
|
}
|
|
92
|
-
|
|
93
|
-
invalid('A ready Installation requires readiness evidence.');
|
|
94
|
-
}
|
|
95
|
-
return Object.freeze(output);
|
|
81
|
+
return Object.freeze({ domain, dependencies: Object.freeze(dependencies) });
|
|
96
82
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
});
|
|
83
|
+
function acceptDependencyBinding(input) {
|
|
84
|
+
const value = record(input, 'Domain dependency binding');
|
|
85
|
+
exact(value, ['active', 'binding', 'origin', 'pinned'], 'Domain dependency binding');
|
|
86
|
+
if (typeof value.origin !== 'string' || !patterns.origin.test(value.origin)) {
|
|
87
|
+
invalid('Domain dependency binding origin is invalid.');
|
|
103
88
|
}
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
kind: 'local',
|
|
107
|
-
artifact: ref(input.artifact, runtime.MEDIA_TYPE, 'Local Runtime Artifact'),
|
|
108
|
-
bundle: ref(input.bundle, publication.BUNDLE_MEDIA_TYPE, 'Local schema Bundle'),
|
|
109
|
-
});
|
|
89
|
+
if (typeof value.pinned !== 'string' || !patterns.revision.test(value.pinned)) {
|
|
90
|
+
invalid('Domain dependency binding pinned revision is invalid.');
|
|
110
91
|
}
|
|
111
|
-
if (
|
|
112
|
-
|
|
113
|
-
kind: 'remote',
|
|
114
|
-
publication: publication.encode(publication.accept(input.publication)),
|
|
115
|
-
});
|
|
92
|
+
if (typeof value.active !== 'string' || !patterns.revision.test(value.active)) {
|
|
93
|
+
invalid('Domain dependency binding active revision is invalid.');
|
|
116
94
|
}
|
|
117
|
-
|
|
95
|
+
const expected = value.pinned === value.active ? 'exact' : 'retained';
|
|
96
|
+
if (value.binding !== expected)
|
|
97
|
+
invalid('Domain dependency binding label is invalid.');
|
|
98
|
+
return Object.freeze({
|
|
99
|
+
origin: value.origin,
|
|
100
|
+
pinned: value.pinned,
|
|
101
|
+
active: value.active,
|
|
102
|
+
binding: expected,
|
|
103
|
+
});
|
|
118
104
|
}
|
|
119
|
-
function
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
105
|
+
function encodeDomainBundle(input) {
|
|
106
|
+
exact(input, ['bundle', 'domain'], 'Domain Bundle result');
|
|
107
|
+
const admittedDomain = acceptDomainInfo(input.domain);
|
|
108
|
+
const domain = encodeDomainInfo(admittedDomain);
|
|
109
|
+
proveBundle(input.bundle, admittedDomain);
|
|
110
|
+
const encoded = encodedBundles.get(input.bundle) ?? bundle.encode(input.bundle);
|
|
111
|
+
if (!encodedBundles.has(input.bundle))
|
|
112
|
+
encodedBundles.set(input.bundle, encoded);
|
|
113
|
+
return Object.freeze({ domain, bundle: encoded });
|
|
114
|
+
}
|
|
115
|
+
function decodeDomainBundle(input, maximum) {
|
|
116
|
+
const value = record(input, 'Domain Bundle result');
|
|
117
|
+
exact(value, ['bundle', 'domain'], 'Domain Bundle result');
|
|
118
|
+
const domain = acceptDomainInfo(value.domain);
|
|
119
|
+
const encoded = boundedBytes(value.bundle, maximum, 'Bundle');
|
|
120
|
+
const cached = admittedBundles.get(domain.generation);
|
|
121
|
+
if (cached !== undefined && sameBytes(cached.bytes, encoded)) {
|
|
122
|
+
return Object.freeze({ domain, bundle: cached.bundle });
|
|
128
123
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
kind: 'local',
|
|
133
|
-
artifact: ref(input.artifact, runtime.MEDIA_TYPE, 'Local Runtime Artifact'),
|
|
134
|
-
bundle: ref(input.bundle, publication.BUNDLE_MEDIA_TYPE, 'Local schema Bundle'),
|
|
135
|
-
});
|
|
124
|
+
let admitted;
|
|
125
|
+
try {
|
|
126
|
+
admitted = bundle.decode(encoded);
|
|
136
127
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
return
|
|
128
|
+
catch (cause) {
|
|
129
|
+
throw new TypeError('Installed Domain Bundle is invalid.', { cause });
|
|
130
|
+
}
|
|
131
|
+
proveBundle(admitted, domain);
|
|
132
|
+
admittedBundles.delete(domain.generation);
|
|
133
|
+
admittedBundles.set(domain.generation, Object.freeze({ bytes: encoded, bundle: admitted }));
|
|
134
|
+
if (admittedBundles.size > MAXIMUM_ADMITTED_BUNDLES) {
|
|
135
|
+
admittedBundles.delete(admittedBundles.keys().next().value);
|
|
136
|
+
}
|
|
137
|
+
return Object.freeze({ domain, bundle: admitted });
|
|
138
|
+
}
|
|
139
|
+
function sameBytes(left, right) {
|
|
140
|
+
if (left.byteLength !== right.byteLength)
|
|
141
|
+
return false;
|
|
142
|
+
for (let index = 0; index < left.byteLength; index += 1) {
|
|
143
|
+
if (left[index] !== right[index])
|
|
144
|
+
return false;
|
|
151
145
|
}
|
|
152
|
-
return
|
|
146
|
+
return true;
|
|
153
147
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
148
|
+
function encodeDomainInfo(input) {
|
|
149
|
+
return acceptDomainInfo(input);
|
|
150
|
+
}
|
|
151
|
+
export function acceptDomainInfo(input) {
|
|
152
|
+
const value = record(input, 'Domain info');
|
|
153
|
+
exact(value, ['bindings', 'capabilities', 'generation', 'origin', 'publication', 'readiness', 'revision'], 'Domain info');
|
|
154
|
+
if (typeof value.origin !== 'string' || !patterns.origin.test(value.origin)) {
|
|
155
|
+
invalid('Domain info origin is invalid.');
|
|
156
|
+
}
|
|
157
|
+
if (typeof value.revision !== 'string' || !patterns.revision.test(value.revision)) {
|
|
158
|
+
invalid('Domain info revision is invalid.');
|
|
164
159
|
}
|
|
165
|
-
|
|
160
|
+
const origin = value.origin;
|
|
161
|
+
const revision = value.revision;
|
|
162
|
+
const published = publicationReference(value.publication, origin, revision);
|
|
163
|
+
return Object.freeze({
|
|
164
|
+
origin,
|
|
165
|
+
revision,
|
|
166
|
+
generation: digest(value.generation, 'Domain generation'),
|
|
167
|
+
publication: published,
|
|
168
|
+
readiness: digest(value.readiness, 'Domain readiness'),
|
|
169
|
+
capabilities: capabilities(value.capabilities),
|
|
170
|
+
bindings: bindings(value.bindings, origin),
|
|
171
|
+
});
|
|
166
172
|
}
|
|
167
|
-
function
|
|
168
|
-
|
|
173
|
+
function publicationReference(input, origin, revision) {
|
|
174
|
+
if (input === null)
|
|
175
|
+
return null;
|
|
169
176
|
let admitted;
|
|
170
177
|
try {
|
|
171
|
-
admitted =
|
|
172
|
-
source.kind === 'remote'
|
|
173
|
-
? publication.decodeBundle(source.publication, encoded)
|
|
174
|
-
: bundle.decode(encoded);
|
|
178
|
+
admitted = publication.acceptReference(input);
|
|
175
179
|
}
|
|
176
180
|
catch (cause) {
|
|
177
|
-
throw new TypeError('
|
|
181
|
+
throw new TypeError('Domain Publication metadata is invalid.', { cause });
|
|
178
182
|
}
|
|
179
|
-
if (
|
|
180
|
-
invalid('
|
|
181
|
-
if (source.kind !== 'remote' &&
|
|
182
|
-
!same(artifact.identify(encoded, publication.BUNDLE_MEDIA_TYPE), source.bundle)) {
|
|
183
|
-
invalid('Local schema Bundle does not match its source Ref.');
|
|
183
|
+
if (admitted.origin !== origin || admitted.revision !== revision) {
|
|
184
|
+
invalid('Domain Publication metadata does not match its Schema coordinate.');
|
|
184
185
|
}
|
|
185
186
|
return admitted;
|
|
186
187
|
}
|
|
187
|
-
function
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
typeof input.select !== 'object') {
|
|
193
|
-
invalid('Schema introspection request is invalid.');
|
|
188
|
+
function bindings(input, origin) {
|
|
189
|
+
const value = record(input, 'Domain bindings');
|
|
190
|
+
exact(value, ['callables', 'views'], 'Domain bindings');
|
|
191
|
+
if (!Array.isArray(value.callables) || !Array.isArray(value.views)) {
|
|
192
|
+
invalid('Domain bindings are invalid.');
|
|
194
193
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
194
|
+
try {
|
|
195
|
+
return Object.freeze({
|
|
196
|
+
callables: Object.freeze(value.callables.map((entry) => admitCallableBinding(entry, origin))),
|
|
197
|
+
views: Object.freeze(value.views.map((entry) => admitViewBinding(entry, origin))),
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
catch (cause) {
|
|
201
|
+
throw new TypeError('Domain bindings are invalid.', { cause });
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function proveBundle(input, domain) {
|
|
205
|
+
if (input.root.origin !== domain.origin || schemaRevision(input.root) !== domain.revision) {
|
|
206
|
+
invalid('Installed Bundle root does not match the ready Domain coordinate.');
|
|
202
207
|
}
|
|
203
|
-
return Object.freeze(allowed.filter((field) => input.select[field] === true));
|
|
204
208
|
}
|
|
205
209
|
function capabilities(input) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
exact(input, ['materialized', 'requested'], 'Installation capabilities');
|
|
210
|
+
const value = record(input, 'Domain capabilities');
|
|
211
|
+
exact(value, ['materialized', 'requested'], 'Domain capabilities');
|
|
209
212
|
try {
|
|
210
|
-
const requested = publication.admitRequirements({ capabilities:
|
|
213
|
+
const requested = publication.admitRequirements({ capabilities: value.requested }).capabilities;
|
|
211
214
|
const materialized = publication.admitRequirements({
|
|
212
|
-
capabilities:
|
|
215
|
+
capabilities: value.materialized,
|
|
213
216
|
}).capabilities;
|
|
214
217
|
return Object.freeze({ requested, materialized });
|
|
215
218
|
}
|
|
216
219
|
catch (cause) {
|
|
217
|
-
throw new TypeError('
|
|
220
|
+
throw new TypeError('Domain capabilities are invalid.', { cause });
|
|
218
221
|
}
|
|
219
222
|
}
|
|
220
|
-
function
|
|
221
|
-
|
|
222
|
-
|
|
223
|
+
function admitRequest(input) {
|
|
224
|
+
const value = record(input, 'Schema introspection request');
|
|
225
|
+
exact(value, ['kind', 'origin'], 'Schema introspection request');
|
|
226
|
+
if (value.kind !== 'inspect' && value.kind !== 'bundle' && value.kind !== 'dependencies') {
|
|
227
|
+
invalid('Schema introspection kind is invalid.');
|
|
223
228
|
}
|
|
224
|
-
|
|
229
|
+
if (typeof value.origin !== 'string' || !patterns.origin.test(value.origin)) {
|
|
230
|
+
invalid('Schema introspection origin is invalid.');
|
|
231
|
+
}
|
|
232
|
+
return Object.freeze({ kind: value.kind, origin: value.origin });
|
|
225
233
|
}
|
|
226
234
|
function digest(input, label) {
|
|
227
235
|
if (typeof input !== 'string' || !/^sha256:[0-9a-f]{64}$/u.test(input)) {
|
|
@@ -229,21 +237,6 @@ function digest(input, label) {
|
|
|
229
237
|
}
|
|
230
238
|
return input;
|
|
231
239
|
}
|
|
232
|
-
function ref(input, mediaType, label) {
|
|
233
|
-
let admitted;
|
|
234
|
-
try {
|
|
235
|
-
admitted = artifact.accept(input);
|
|
236
|
-
}
|
|
237
|
-
catch (cause) {
|
|
238
|
-
throw new TypeError(`${label} Ref is invalid.`, { cause });
|
|
239
|
-
}
|
|
240
|
-
if (admitted.mediaType !== mediaType)
|
|
241
|
-
invalid(`${label} media type is invalid.`);
|
|
242
|
-
return admitted;
|
|
243
|
-
}
|
|
244
|
-
function same(left, right) {
|
|
245
|
-
return (left.digest === right.digest && left.mediaType === right.mediaType && left.size === right.size);
|
|
246
|
-
}
|
|
247
240
|
function boundedBytes(input, maximum, label) {
|
|
248
241
|
if (!(input instanceof Uint8Array) || input.byteLength === 0 || input.byteLength > maximum) {
|
|
249
242
|
invalid(`${label} evidence is invalid or exceeds its bound.`);
|
|
@@ -254,6 +247,12 @@ function admitLimit(input, label) {
|
|
|
254
247
|
if (!Number.isSafeInteger(input) || input < 1)
|
|
255
248
|
invalid(`${label} evidence bound is invalid.`);
|
|
256
249
|
}
|
|
250
|
+
function record(input, label) {
|
|
251
|
+
if (input === null || typeof input !== 'object' || Array.isArray(input)) {
|
|
252
|
+
invalid(`${label} is invalid.`);
|
|
253
|
+
}
|
|
254
|
+
return input;
|
|
255
|
+
}
|
|
257
256
|
function exact(input, expected, label) {
|
|
258
257
|
const keys = Object.keys(input).sort();
|
|
259
258
|
const wanted = [...expected].sort();
|
|
@@ -261,13 +260,6 @@ function exact(input, expected, label) {
|
|
|
261
260
|
invalid(`${label} fields are invalid.`);
|
|
262
261
|
}
|
|
263
262
|
}
|
|
264
|
-
function equal(left, right) {
|
|
265
|
-
return left.byteLength === right.byteLength && left.every((byte, index) => byte === right[index]);
|
|
266
|
-
}
|
|
267
|
-
function isRecord(input) {
|
|
268
|
-
return input !== null && typeof input === 'object' && !Array.isArray(input);
|
|
269
|
-
}
|
|
270
263
|
function invalid(message) {
|
|
271
264
|
throw new TypeError(message);
|
|
272
265
|
}
|
|
273
|
-
//# sourceMappingURL=codec.js.map
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export { MEDIA_TYPE, decode, encode } from './codec.js';
|
|
2
|
-
export type { Digest,
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { MEDIA_TYPE, acceptDomainDependencies, acceptDomainInfo, decode, encode } from './codec.js';
|
|
2
|
+
export type { DependencyBinding, Digest, DomainBundle, DomainDependencies, DomainInfo, Limits, ResultFor, } from './result.js';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { MEDIA_TYPE, decode, encode } from './codec.js';
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { MEDIA_TYPE, acceptDomainDependencies, acceptDomainInfo, decode, encode } from './codec.js';
|
|
@@ -1,34 +1,47 @@
|
|
|
1
1
|
import type { introspection } from '@astrale-os/kernel-core/schema';
|
|
2
|
-
import type { bundle } from '@astrale-os/kernel-dsl/v1';
|
|
3
|
-
import type {
|
|
4
|
-
import type { Publication } from '../../../publication/index.js';
|
|
5
|
-
import type { PublicationRequirements } from '../../../publication/index.js';
|
|
2
|
+
import type { bundle, Key, Revision } from '@astrale-os/kernel-dsl/v1';
|
|
3
|
+
import type { Publication, PublicationRef, PublicationRequirements } from '../../../publication/index.js';
|
|
6
4
|
export type Digest = `sha256:${string}`;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
readonly
|
|
10
|
-
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
} | {
|
|
15
|
-
readonly kind: 'remote';
|
|
16
|
-
readonly publication: Publication;
|
|
17
|
-
};
|
|
18
|
-
export interface Installation {
|
|
19
|
-
readonly state: 'installed' | 'ready' | 'removing';
|
|
20
|
-
readonly target: Digest;
|
|
21
|
-
readonly source: Source;
|
|
22
|
-
readonly bundle: bundle.Bundle;
|
|
23
|
-
readonly readiness: Digest | null;
|
|
5
|
+
/** Lightweight proof of one exact ready installed Domain generation. */
|
|
6
|
+
export interface DomainInfo {
|
|
7
|
+
readonly origin: Key.Origin;
|
|
8
|
+
readonly revision: Revision;
|
|
9
|
+
readonly generation: Digest;
|
|
10
|
+
readonly publication: PublicationRef | null;
|
|
11
|
+
readonly readiness: Digest;
|
|
24
12
|
readonly capabilities: {
|
|
25
13
|
readonly requested: PublicationRequirements['capabilities'];
|
|
26
14
|
readonly materialized: PublicationRequirements['capabilities'];
|
|
27
15
|
};
|
|
16
|
+
readonly bindings: Publication['bindings'];
|
|
17
|
+
}
|
|
18
|
+
/** Explicit complete Bundle observed coherently with its ready Domain generation. */
|
|
19
|
+
export interface DomainBundle {
|
|
20
|
+
readonly domain: DomainInfo;
|
|
21
|
+
readonly bundle: bundle.Bundle;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* How one ready Domain generation binds one dependency of its exact closure: `exact` when the
|
|
25
|
+
* pinned revision is the one the Kernel serves, `retained` when the Kernel serves another revision
|
|
26
|
+
* and keeps the pinned one as inactive context admitted by unchanged meaning.
|
|
27
|
+
*/
|
|
28
|
+
export interface DependencyBinding {
|
|
29
|
+
readonly origin: Key.Origin;
|
|
30
|
+
readonly pinned: Revision;
|
|
31
|
+
readonly active: Revision;
|
|
32
|
+
readonly binding: 'exact' | 'retained';
|
|
33
|
+
}
|
|
34
|
+
/** The origin-ordered dependency bindings observed coherently with a ready Domain generation. */
|
|
35
|
+
export interface DomainDependencies {
|
|
36
|
+
readonly domain: DomainInfo;
|
|
37
|
+
readonly dependencies: readonly DependencyBinding[];
|
|
28
38
|
}
|
|
29
|
-
export type ResultFor<Input extends introspection.Introspection> =
|
|
39
|
+
export type ResultFor<Input extends introspection.Introspection> = Input extends {
|
|
40
|
+
readonly kind: 'bundle';
|
|
41
|
+
} ? DomainBundle : Input extends {
|
|
42
|
+
readonly kind: 'dependencies';
|
|
43
|
+
} ? DomainDependencies : DomainInfo;
|
|
30
44
|
export interface Limits {
|
|
31
45
|
readonly maximumPublicationBytes: number;
|
|
32
46
|
readonly maximumBundleBytes: number;
|
|
33
47
|
}
|
|
34
|
-
//# sourceMappingURL=result.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InstallReceipt } from '@astrale-os/kernel-core/schema/kernel/syscalls/contracts';
|
|
2
|
+
import type { DomainInfo } from './introspection/index.js';
|
|
3
|
+
export type InstallResult = {
|
|
4
|
+
readonly changed: true;
|
|
5
|
+
readonly receipt: InstallReceipt;
|
|
6
|
+
} | {
|
|
7
|
+
readonly changed: false;
|
|
8
|
+
readonly domains: readonly [DomainInfo, ...DomainInfo[]];
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/kernel-protocol",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.60",
|
|
4
4
|
"description": "Portable Astrale invocation, publication, installation, routing, and issuer protocols",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -59,6 +59,10 @@
|
|
|
59
59
|
"types": "./dist/artifact/index.d.ts",
|
|
60
60
|
"import": "./dist/artifact/index.js"
|
|
61
61
|
},
|
|
62
|
+
"./publication": {
|
|
63
|
+
"types": "./dist/publication/index.d.ts",
|
|
64
|
+
"import": "./dist/publication/index.js"
|
|
65
|
+
},
|
|
62
66
|
"./publication/publication": {
|
|
63
67
|
"types": "./dist/publication/publication.d.ts",
|
|
64
68
|
"import": "./dist/publication/publication.js"
|
|
@@ -67,6 +71,14 @@
|
|
|
67
71
|
"types": "./dist/publication/reference.d.ts",
|
|
68
72
|
"import": "./dist/publication/reference.js"
|
|
69
73
|
},
|
|
74
|
+
"./publication/requirements": {
|
|
75
|
+
"types": "./dist/publication/requirements.d.ts",
|
|
76
|
+
"import": "./dist/publication/requirements.js"
|
|
77
|
+
},
|
|
78
|
+
"./publication/legacy-requirements": {
|
|
79
|
+
"types": "./dist/publication/legacy-requirements.d.ts",
|
|
80
|
+
"import": "./dist/publication/legacy-requirements.js"
|
|
81
|
+
},
|
|
70
82
|
"./publication/delivery": {
|
|
71
83
|
"types": "./dist/publication/delivery/index.d.ts",
|
|
72
84
|
"import": "./dist/publication/delivery/index.js"
|
|
@@ -87,6 +99,10 @@
|
|
|
87
99
|
"types": "./dist/routes/index.d.ts",
|
|
88
100
|
"import": "./dist/routes/index.js"
|
|
89
101
|
},
|
|
102
|
+
"./schema": {
|
|
103
|
+
"types": "./dist/schema/index.d.ts",
|
|
104
|
+
"import": "./dist/schema/index.js"
|
|
105
|
+
},
|
|
90
106
|
"./routes/admission": {
|
|
91
107
|
"types": "./dist/routes/admission.d.ts",
|
|
92
108
|
"import": "./dist/routes/admission.js"
|
|
@@ -121,19 +137,18 @@
|
|
|
121
137
|
"access": "public"
|
|
122
138
|
},
|
|
123
139
|
"dependencies": {
|
|
124
|
-
"@
|
|
125
|
-
"@astrale-os/kernel-
|
|
126
|
-
"@
|
|
140
|
+
"@astrale-os/kernel-core": "0.9.0-beta.54",
|
|
141
|
+
"@astrale-os/kernel-dsl": "0.2.0-beta.39",
|
|
142
|
+
"@noble/hashes": "2.3.0"
|
|
127
143
|
},
|
|
128
144
|
"devDependencies": {
|
|
129
145
|
"@astrale/typescript-config": "npm:@jsr/astrale__typescript-config@~1.1.0",
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"vitest": "^3.0.0"
|
|
146
|
+
"msgpackr": "^2.0.5",
|
|
147
|
+
"typescript": "7.0.2",
|
|
148
|
+
"vitest": "^5.0.1"
|
|
134
149
|
},
|
|
135
150
|
"peerDependencies": {
|
|
136
|
-
"msgpackr": "^
|
|
151
|
+
"msgpackr": "^2.0.5"
|
|
137
152
|
},
|
|
138
153
|
"peerDependenciesMeta": {
|
|
139
154
|
"msgpackr": {
|
|
@@ -141,12 +156,11 @@
|
|
|
141
156
|
}
|
|
142
157
|
},
|
|
143
158
|
"scripts": {
|
|
144
|
-
"build": "
|
|
159
|
+
"build": "tsc",
|
|
145
160
|
"clean": "rm -rf dist",
|
|
146
|
-
"typecheck": "
|
|
161
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.workers.json",
|
|
147
162
|
"test": "vitest run",
|
|
148
163
|
"test:file": "vitest run",
|
|
149
|
-
"test:watch": "vitest"
|
|
150
|
-
"preinstall": "node -e \"try{require('./.check-workspace.cjs')}catch{}\""
|
|
164
|
+
"test:watch": "vitest"
|
|
151
165
|
}
|
|
152
166
|
}
|