@astrale-os/kernel-protocol 0.5.0-beta.4 → 0.5.0-beta.41
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 +1 -5
- 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 +1 -2
- package/dist/invocation/index.js +1 -2
- 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 +1 -2
- package/dist/invocation/schema.js +0 -1
- package/dist/invocation/service-reason.d.ts +3 -11
- package/dist/invocation/service-reason.js +0 -12
- 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 +0 -1
- 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 +7 -1
- package/dist/publication/bindings/view.js +111 -3
- package/dist/publication/bundle-admission.d.ts +0 -1
- package/dist/publication/bundle-admission.js +12 -13
- 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 +1 -2
- package/dist/publication/bundle.js +3 -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 +0 -1
- package/dist/publication/index.d.ts +2 -3
- package/dist/publication/index.js +0 -1
- package/dist/publication/manifest.d.ts +2 -3
- package/dist/publication/manifest.js +10 -6
- package/dist/publication/publication.d.ts +0 -1
- package/dist/publication/publication.js +9 -5
- package/dist/publication/reference.d.ts +1 -2
- package/dist/publication/reference.js +0 -1
- package/dist/publication/requirements.d.ts +14 -7
- package/dist/publication/requirements.js +141 -44
- 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 +5 -6
- 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 +12 -10
- 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 +15 -20
- package/dist/routes/encode.d.ts +2 -3
- package/dist/routes/encode.js +10 -15
- 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 +14 -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 +5 -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 +2 -3
- package/dist/runtime/artifact.js +3 -4
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.js +0 -1
- 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 +70 -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 +3 -3
- package/dist/schema/installation/introspection/codec.js +144 -204
- 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 +18 -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 +23 -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,35 @@
|
|
|
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 =
|
|
10
|
-
|
|
11
|
+
const request = admitRequest(input);
|
|
12
|
+
const wire = request.kind === 'bundle'
|
|
13
|
+
? encodeDomainBundle(result)
|
|
14
|
+
: encodeDomainInfo(result);
|
|
15
|
+
proveRequestedOrigin(request, result);
|
|
16
|
+
const { pack } = await import('msgpackr/pack');
|
|
11
17
|
return new Uint8Array(pack(wire));
|
|
12
18
|
}
|
|
13
19
|
export async function decode(input, bytes, limits) {
|
|
20
|
+
const request = admitRequest(input);
|
|
14
21
|
if (!(bytes instanceof Uint8Array))
|
|
15
22
|
invalid('Schema introspection evidence must be binary.');
|
|
16
23
|
admitLimit(limits.maximumPublicationBytes, 'Publication');
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
if (request.kind === 'bundle')
|
|
25
|
+
admitLimit(limits.maximumBundleBytes, 'Bundle');
|
|
26
|
+
const maximumEvidenceBytes = limits.maximumPublicationBytes +
|
|
27
|
+
(request.kind === 'bundle' ? limits.maximumBundleBytes : 0) +
|
|
28
|
+
4_096;
|
|
29
|
+
if (bytes.byteLength > maximumEvidenceBytes) {
|
|
19
30
|
invalid('Schema introspection evidence exceeds its declared bounds.');
|
|
20
31
|
}
|
|
21
|
-
const { unpack } = await import(
|
|
32
|
+
const { unpack } = await import('msgpackr');
|
|
22
33
|
let decoded;
|
|
23
34
|
try {
|
|
24
35
|
decoded = unpack(bytes);
|
|
@@ -26,202 +37,147 @@ export async function decode(input, bytes, limits) {
|
|
|
26
37
|
catch (cause) {
|
|
27
38
|
throw new TypeError('Schema introspection evidence is malformed.', { cause });
|
|
28
39
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
output.capabilities = capabilities(result.capabilities);
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return Object.freeze(output);
|
|
65
|
-
}
|
|
66
|
-
function decodeResult(fields, input, limits) {
|
|
67
|
-
const source = fields.includes('source') ? decodeSource(input.source, limits) : undefined;
|
|
68
|
-
const output = {};
|
|
69
|
-
for (const field of fields) {
|
|
70
|
-
switch (field) {
|
|
71
|
-
case 'state':
|
|
72
|
-
output.state = state(input.state);
|
|
73
|
-
break;
|
|
74
|
-
case 'target':
|
|
75
|
-
output.target = digest(input.target, 'Installation target');
|
|
76
|
-
break;
|
|
77
|
-
case 'source':
|
|
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;
|
|
90
|
-
}
|
|
40
|
+
const result = (request.kind === 'bundle'
|
|
41
|
+
? decodeDomainBundle(decoded, limits.maximumBundleBytes)
|
|
42
|
+
: acceptDomainInfo(decoded));
|
|
43
|
+
proveRequestedOrigin(request, result);
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
function proveRequestedOrigin(request, result) {
|
|
47
|
+
const origin = request.kind === 'bundle'
|
|
48
|
+
? result.domain.origin
|
|
49
|
+
: result.origin;
|
|
50
|
+
if (origin !== request.origin)
|
|
51
|
+
invalid('Schema introspection evidence does not match the requested origin.');
|
|
52
|
+
}
|
|
53
|
+
function encodeDomainBundle(input) {
|
|
54
|
+
exact(input, ['bundle', 'domain'], 'Domain Bundle result');
|
|
55
|
+
const admittedDomain = acceptDomainInfo(input.domain);
|
|
56
|
+
const domain = encodeDomainInfo(admittedDomain);
|
|
57
|
+
proveBundle(input.bundle, admittedDomain);
|
|
58
|
+
const encoded = encodedBundles.get(input.bundle) ?? bundle.encode(input.bundle);
|
|
59
|
+
if (!encodedBundles.has(input.bundle))
|
|
60
|
+
encodedBundles.set(input.bundle, encoded);
|
|
61
|
+
return Object.freeze({ domain, bundle: encoded });
|
|
62
|
+
}
|
|
63
|
+
function decodeDomainBundle(input, maximum) {
|
|
64
|
+
const value = record(input, 'Domain Bundle result');
|
|
65
|
+
exact(value, ['bundle', 'domain'], 'Domain Bundle result');
|
|
66
|
+
const domain = acceptDomainInfo(value.domain);
|
|
67
|
+
const encoded = boundedBytes(value.bundle, maximum, 'Bundle');
|
|
68
|
+
const cached = admittedBundles.get(domain.generation);
|
|
69
|
+
if (cached !== undefined && sameBytes(cached.bytes, encoded)) {
|
|
70
|
+
return Object.freeze({ domain, bundle: cached.bundle });
|
|
91
71
|
}
|
|
92
|
-
|
|
93
|
-
|
|
72
|
+
let admitted;
|
|
73
|
+
try {
|
|
74
|
+
admitted = bundle.decode(encoded);
|
|
94
75
|
}
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
76
|
+
catch (cause) {
|
|
77
|
+
throw new TypeError('Installed Domain Bundle is invalid.', { cause });
|
|
78
|
+
}
|
|
79
|
+
proveBundle(admitted, domain);
|
|
80
|
+
admittedBundles.delete(domain.generation);
|
|
81
|
+
admittedBundles.set(domain.generation, Object.freeze({ bytes: encoded, bundle: admitted }));
|
|
82
|
+
if (admittedBundles.size > MAXIMUM_ADMITTED_BUNDLES) {
|
|
83
|
+
admittedBundles.delete(admittedBundles.keys().next().value);
|
|
84
|
+
}
|
|
85
|
+
return Object.freeze({ domain, bundle: admitted });
|
|
86
|
+
}
|
|
87
|
+
function sameBytes(left, right) {
|
|
88
|
+
if (left.byteLength !== right.byteLength)
|
|
89
|
+
return false;
|
|
90
|
+
for (let index = 0; index < left.byteLength; index += 1) {
|
|
91
|
+
if (left[index] !== right[index])
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
function encodeDomainInfo(input) {
|
|
97
|
+
return acceptDomainInfo(input);
|
|
98
|
+
}
|
|
99
|
+
export function acceptDomainInfo(input) {
|
|
100
|
+
const value = record(input, 'Domain info');
|
|
101
|
+
exact(value, ['bindings', 'capabilities', 'generation', 'origin', 'publication', 'readiness', 'revision'], 'Domain info');
|
|
102
|
+
if (typeof value.origin !== 'string' || !patterns.origin.test(value.origin)) {
|
|
103
|
+
invalid('Domain info origin is invalid.');
|
|
104
|
+
}
|
|
105
|
+
if (typeof value.revision !== 'string' || !patterns.revision.test(value.revision)) {
|
|
106
|
+
invalid('Domain info revision is invalid.');
|
|
107
|
+
}
|
|
108
|
+
const origin = value.origin;
|
|
109
|
+
const revision = value.revision;
|
|
110
|
+
const published = publicationReference(value.publication, origin, revision);
|
|
111
|
+
return Object.freeze({
|
|
112
|
+
origin,
|
|
113
|
+
revision,
|
|
114
|
+
generation: digest(value.generation, 'Domain generation'),
|
|
115
|
+
publication: published,
|
|
116
|
+
readiness: digest(value.readiness, 'Domain readiness'),
|
|
117
|
+
capabilities: capabilities(value.capabilities),
|
|
118
|
+
bindings: bindings(value.bindings, origin),
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function publicationReference(input, origin, revision) {
|
|
122
|
+
if (input === null)
|
|
123
|
+
return null;
|
|
124
|
+
let admitted;
|
|
125
|
+
try {
|
|
126
|
+
admitted = publication.acceptReference(input);
|
|
103
127
|
}
|
|
104
|
-
|
|
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
|
-
});
|
|
128
|
+
catch (cause) {
|
|
129
|
+
throw new TypeError('Domain Publication metadata is invalid.', { cause });
|
|
110
130
|
}
|
|
111
|
-
if (
|
|
112
|
-
|
|
113
|
-
kind: 'remote',
|
|
114
|
-
publication: publication.encode(publication.accept(input.publication)),
|
|
115
|
-
});
|
|
131
|
+
if (admitted.origin !== origin || admitted.revision !== revision) {
|
|
132
|
+
invalid('Domain Publication metadata does not match its Schema coordinate.');
|
|
116
133
|
}
|
|
117
|
-
return
|
|
134
|
+
return admitted;
|
|
118
135
|
}
|
|
119
|
-
function
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
return Object.freeze({
|
|
125
|
-
kind: 'builtin',
|
|
126
|
-
bundle: ref(input.bundle, publication.BUNDLE_MEDIA_TYPE, 'Builtin schema Bundle'),
|
|
127
|
-
});
|
|
136
|
+
function bindings(input, origin) {
|
|
137
|
+
const value = record(input, 'Domain bindings');
|
|
138
|
+
exact(value, ['callables', 'views'], 'Domain bindings');
|
|
139
|
+
if (!Array.isArray(value.callables) || !Array.isArray(value.views)) {
|
|
140
|
+
invalid('Domain bindings are invalid.');
|
|
128
141
|
}
|
|
129
|
-
|
|
130
|
-
exact(input, ['artifact', 'bundle', 'kind'], 'Local installation source');
|
|
142
|
+
try {
|
|
131
143
|
return Object.freeze({
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
bundle: ref(input.bundle, publication.BUNDLE_MEDIA_TYPE, 'Local schema Bundle'),
|
|
144
|
+
callables: Object.freeze(value.callables.map((entry) => admitCallableBinding(entry, origin))),
|
|
145
|
+
views: Object.freeze(value.views.map((entry) => admitViewBinding(entry, origin))),
|
|
135
146
|
});
|
|
136
147
|
}
|
|
137
|
-
if (input.kind === 'remote') {
|
|
138
|
-
exact(input, ['kind', 'publication'], 'Remote installation source');
|
|
139
|
-
const encoded = boundedBytes(input.publication, limits.maximumPublicationBytes, 'Publication');
|
|
140
|
-
let admitted;
|
|
141
|
-
try {
|
|
142
|
-
admitted = publication.accept(json.decode(encoded));
|
|
143
|
-
}
|
|
144
|
-
catch (cause) {
|
|
145
|
-
throw new TypeError('Remote installed Publication is invalid.', { cause });
|
|
146
|
-
}
|
|
147
|
-
if (!equal(encoded, publication.encode(admitted))) {
|
|
148
|
-
invalid('Remote installed Publication is not canonical.');
|
|
149
|
-
}
|
|
150
|
-
return Object.freeze({ kind: 'remote', publication: admitted });
|
|
151
|
-
}
|
|
152
|
-
return invalid('Installation source kind is invalid.');
|
|
153
|
-
}
|
|
154
|
-
function encodeBundle(input, source) {
|
|
155
|
-
if (source === undefined || input === undefined)
|
|
156
|
-
invalid('Bundle source evidence is missing.');
|
|
157
|
-
const admitted = source.kind === 'remote'
|
|
158
|
-
? publication.acceptBundle(source.publication, input)
|
|
159
|
-
: bundle.accept(input);
|
|
160
|
-
const encoded = bundle.encode(admitted);
|
|
161
|
-
if (source.kind !== 'remote' &&
|
|
162
|
-
!same(artifact.identify(encoded, publication.BUNDLE_MEDIA_TYPE), source.bundle)) {
|
|
163
|
-
invalid('Local schema Bundle does not match its source Ref.');
|
|
164
|
-
}
|
|
165
|
-
return encoded;
|
|
166
|
-
}
|
|
167
|
-
function decodeBundle(input, source, maximum) {
|
|
168
|
-
const encoded = boundedBytes(input, maximum, 'Bundle');
|
|
169
|
-
let admitted;
|
|
170
|
-
try {
|
|
171
|
-
admitted =
|
|
172
|
-
source.kind === 'remote'
|
|
173
|
-
? publication.decodeBundle(source.publication, encoded)
|
|
174
|
-
: bundle.decode(encoded);
|
|
175
|
-
}
|
|
176
148
|
catch (cause) {
|
|
177
|
-
throw new TypeError('
|
|
178
|
-
}
|
|
179
|
-
if (!equal(encoded, bundle.encode(admitted)))
|
|
180
|
-
invalid('Installed schema Bundle is not canonical.');
|
|
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.');
|
|
149
|
+
throw new TypeError('Domain bindings are invalid.', { cause });
|
|
184
150
|
}
|
|
185
|
-
return admitted;
|
|
186
151
|
}
|
|
187
|
-
function
|
|
188
|
-
if (input
|
|
189
|
-
|
|
190
|
-
input.from?.kind !== 'installation' ||
|
|
191
|
-
input.select === null ||
|
|
192
|
-
typeof input.select !== 'object') {
|
|
193
|
-
invalid('Schema introspection request is invalid.');
|
|
194
|
-
}
|
|
195
|
-
const allowed = ['state', 'target', 'source', 'bundle', 'readiness', 'capabilities'];
|
|
196
|
-
const fields = Object.keys(input.select);
|
|
197
|
-
if (fields.length === 0 ||
|
|
198
|
-
fields.some((field) => !allowed.includes(field) ||
|
|
199
|
-
input.select[field] !== true) ||
|
|
200
|
-
(input.select.bundle === true && input.select.source !== true)) {
|
|
201
|
-
invalid('Schema introspection selection is invalid.');
|
|
152
|
+
function proveBundle(input, domain) {
|
|
153
|
+
if (input.root.origin !== domain.origin || schemaRevision(input.root) !== domain.revision) {
|
|
154
|
+
invalid('Installed Bundle root does not match the ready Domain coordinate.');
|
|
202
155
|
}
|
|
203
|
-
return Object.freeze(allowed.filter((field) => input.select[field] === true));
|
|
204
156
|
}
|
|
205
157
|
function capabilities(input) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
exact(input, ['materialized', 'requested'], 'Installation capabilities');
|
|
158
|
+
const value = record(input, 'Domain capabilities');
|
|
159
|
+
exact(value, ['materialized', 'requested'], 'Domain capabilities');
|
|
209
160
|
try {
|
|
210
|
-
const requested = publication.admitRequirements({ capabilities:
|
|
161
|
+
const requested = publication.admitRequirements({ capabilities: value.requested }).capabilities;
|
|
211
162
|
const materialized = publication.admitRequirements({
|
|
212
|
-
capabilities:
|
|
163
|
+
capabilities: value.materialized,
|
|
213
164
|
}).capabilities;
|
|
214
165
|
return Object.freeze({ requested, materialized });
|
|
215
166
|
}
|
|
216
167
|
catch (cause) {
|
|
217
|
-
throw new TypeError('
|
|
168
|
+
throw new TypeError('Domain capabilities are invalid.', { cause });
|
|
218
169
|
}
|
|
219
170
|
}
|
|
220
|
-
function
|
|
221
|
-
|
|
222
|
-
|
|
171
|
+
function admitRequest(input) {
|
|
172
|
+
const value = record(input, 'Schema introspection request');
|
|
173
|
+
exact(value, ['kind', 'origin'], 'Schema introspection request');
|
|
174
|
+
if (value.kind !== 'inspect' && value.kind !== 'bundle') {
|
|
175
|
+
invalid('Schema introspection kind is invalid.');
|
|
223
176
|
}
|
|
224
|
-
|
|
177
|
+
if (typeof value.origin !== 'string' || !patterns.origin.test(value.origin)) {
|
|
178
|
+
invalid('Schema introspection origin is invalid.');
|
|
179
|
+
}
|
|
180
|
+
return Object.freeze({ kind: value.kind, origin: value.origin });
|
|
225
181
|
}
|
|
226
182
|
function digest(input, label) {
|
|
227
183
|
if (typeof input !== 'string' || !/^sha256:[0-9a-f]{64}$/u.test(input)) {
|
|
@@ -229,21 +185,6 @@ function digest(input, label) {
|
|
|
229
185
|
}
|
|
230
186
|
return input;
|
|
231
187
|
}
|
|
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
188
|
function boundedBytes(input, maximum, label) {
|
|
248
189
|
if (!(input instanceof Uint8Array) || input.byteLength === 0 || input.byteLength > maximum) {
|
|
249
190
|
invalid(`${label} evidence is invalid or exceeds its bound.`);
|
|
@@ -254,6 +195,12 @@ function admitLimit(input, label) {
|
|
|
254
195
|
if (!Number.isSafeInteger(input) || input < 1)
|
|
255
196
|
invalid(`${label} evidence bound is invalid.`);
|
|
256
197
|
}
|
|
198
|
+
function record(input, label) {
|
|
199
|
+
if (input === null || typeof input !== 'object' || Array.isArray(input)) {
|
|
200
|
+
invalid(`${label} is invalid.`);
|
|
201
|
+
}
|
|
202
|
+
return input;
|
|
203
|
+
}
|
|
257
204
|
function exact(input, expected, label) {
|
|
258
205
|
const keys = Object.keys(input).sort();
|
|
259
206
|
const wanted = [...expected].sort();
|
|
@@ -261,13 +208,6 @@ function exact(input, expected, label) {
|
|
|
261
208
|
invalid(`${label} fields are invalid.`);
|
|
262
209
|
}
|
|
263
210
|
}
|
|
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
211
|
function invalid(message) {
|
|
271
212
|
throw new TypeError(message);
|
|
272
213
|
}
|
|
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, acceptDomainInfo, decode, encode } from './codec.js';
|
|
2
|
+
export type { Digest, DomainBundle, 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, acceptDomainInfo, decode, encode } from './codec.js';
|
|
@@ -1,34 +1,29 @@
|
|
|
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;
|
|
28
22
|
}
|
|
29
|
-
export type ResultFor<Input extends introspection.Introspection> =
|
|
23
|
+
export type ResultFor<Input extends introspection.Introspection> = Input extends {
|
|
24
|
+
readonly kind: 'bundle';
|
|
25
|
+
} ? DomainBundle : DomainInfo;
|
|
30
26
|
export interface Limits {
|
|
31
27
|
readonly maximumPublicationBytes: number;
|
|
32
28
|
readonly maximumBundleBytes: number;
|
|
33
29
|
}
|
|
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.41",
|
|
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,10 @@
|
|
|
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
|
+
},
|
|
70
78
|
"./publication/delivery": {
|
|
71
79
|
"types": "./dist/publication/delivery/index.d.ts",
|
|
72
80
|
"import": "./dist/publication/delivery/index.js"
|
|
@@ -87,6 +95,10 @@
|
|
|
87
95
|
"types": "./dist/routes/index.d.ts",
|
|
88
96
|
"import": "./dist/routes/index.js"
|
|
89
97
|
},
|
|
98
|
+
"./schema": {
|
|
99
|
+
"types": "./dist/schema/index.d.ts",
|
|
100
|
+
"import": "./dist/schema/index.js"
|
|
101
|
+
},
|
|
90
102
|
"./routes/admission": {
|
|
91
103
|
"types": "./dist/routes/admission.d.ts",
|
|
92
104
|
"import": "./dist/routes/admission.js"
|
|
@@ -121,19 +133,18 @@
|
|
|
121
133
|
"access": "public"
|
|
122
134
|
},
|
|
123
135
|
"dependencies": {
|
|
124
|
-
"@
|
|
125
|
-
"@astrale-os/kernel-
|
|
126
|
-
"@
|
|
136
|
+
"@astrale-os/kernel-core": "0.9.0-beta.38",
|
|
137
|
+
"@astrale-os/kernel-dsl": "0.2.0-beta.29",
|
|
138
|
+
"@noble/hashes": "2.3.0"
|
|
127
139
|
},
|
|
128
140
|
"devDependencies": {
|
|
129
141
|
"@astrale/typescript-config": "npm:@jsr/astrale__typescript-config@~1.1.0",
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"vitest": "^3.0.0"
|
|
142
|
+
"msgpackr": "^2.0.5",
|
|
143
|
+
"typescript": "7.0.2",
|
|
144
|
+
"vitest": "^4.1.10"
|
|
134
145
|
},
|
|
135
146
|
"peerDependencies": {
|
|
136
|
-
"msgpackr": "^
|
|
147
|
+
"msgpackr": "^2.0.5"
|
|
137
148
|
},
|
|
138
149
|
"peerDependenciesMeta": {
|
|
139
150
|
"msgpackr": {
|
|
@@ -141,12 +152,11 @@
|
|
|
141
152
|
}
|
|
142
153
|
},
|
|
143
154
|
"scripts": {
|
|
144
|
-
"build": "
|
|
155
|
+
"build": "tsc",
|
|
145
156
|
"clean": "rm -rf dist",
|
|
146
|
-
"typecheck": "
|
|
157
|
+
"typecheck": "tsc --noEmit",
|
|
147
158
|
"test": "vitest run",
|
|
148
159
|
"test:file": "vitest run",
|
|
149
|
-
"test:watch": "vitest"
|
|
150
|
-
"preinstall": "node -e \"try{require('./.check-workspace.cjs')}catch{}\""
|
|
160
|
+
"test:watch": "vitest"
|
|
151
161
|
}
|
|
152
162
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../artifact/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,MAAM,EAAE,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../artifact/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAyB,MAAM,UAAU,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ref.d.ts","sourceRoot":"","sources":["../../artifact/ref.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,MAAM,GAAG,UAAU,MAAM,EAAE,CAAA;AAEvC,MAAM,WAAW,GAAG;IAClB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAKD,oEAAoE;AACpE,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,GAAG,CAoB1C;AAED,2DAA2D;AAC3D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,GAAG,CASlE"}
|
package/dist/artifact/ref.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ref.js","sourceRoot":"","sources":["../../artifact/ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAU9C,MAAM,MAAM,GAAG,wBAAwB,CAAA;AACvC,MAAM,KAAK,GAAG,gCAAgC,CAAA;AAE9C,oEAAoE;AACpE,MAAM,UAAU,MAAM,CAAC,KAAc;IACnC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;IAC1F,MAAM,KAAK,G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AI,iBAAgB;IAEtC,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAElD;CACF;AAED,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAAA;IACvC,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,CAAA;CACtC"}
|
package/dist/codecs/codec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../codecs/codec.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,WAAY,SAAQ,WAAW;IACxB,IAAI,GAAG,aAAa,CAAA;IAEtC,YAAY,OAAe,EAAE,OAAsB;QACjD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IACzB,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../codecs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAA;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA"}
|
package/dist/codecs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../codecs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoC,MAAM,YAAY,CAAA;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../codecs/json.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAKvC,eAAO,MAAM,IAAI,EAAE,KAejB,CAAA"}
|
package/dist/codecs/json.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../codecs/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAIjG,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEpD,MAAM,CAAC,MAAM,IAAI,GAAU,MAAM,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,iBAAiB;IAC9B,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,SAAS,CAAC,SAAS;IAC3B,MAAM,CAAC,KAAqC;QAC1C,IAAI,CAAC;YACH,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,gBAAgB,EAAE,CAAC;gBACtC,MAAM,IAAI,WAAW,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;YACjE,CAAC;YACD,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-types.d.ts","sourceRoot":"","sources":["../../codecs/media-types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,EAAG,8BAAuC,CAAA;AACxE,eAAO,MAAM,oBAAoB,EAAG,iCAA0C,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-types.js","sourceRoot":"","sources":["../../codecs/media-types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,8BAAuC,CAAA;AACxE,MAAM,CAAC,MAAM,oBAAoB,GAAG,iCAA0C,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"msgpack.d.ts","sourceRoot":"","sources":["../../codecs/msgpack.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAYvC,wBAAsB,WAAW,IAAI,OAAO,CAAC,KAAK,CAAC,CASlD;AA+BD,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAEpD"}
|