@astrale-os/kernel-protocol 0.5.0-beta.7 → 0.5.0-beta.71
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 +1 -2
- package/dist/artifact/index.js +1 -2
- package/dist/artifact/ref.d.ts +2 -1
- package/dist/artifact/ref.js +4 -4
- package/dist/codecs/codec.d.ts +0 -1
- package/dist/codecs/codec.js +0 -1
- package/dist/codecs/index.d.ts +1 -3
- package/dist/codecs/index.js +1 -3
- package/dist/codecs/json.d.ts +0 -1
- package/dist/codecs/json.js +0 -1
- package/dist/codecs/media-types.d.ts +0 -2
- package/dist/codecs/media-types.js +0 -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 +1 -1
- package/dist/errors/index.js +1 -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/errors/retry.d.ts +23 -0
- package/dist/errors/retry.js +44 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/invocation/admission.d.ts +2 -3
- package/dist/invocation/admission.js +7 -11
- package/dist/invocation/binary.d.ts +1 -1
- package/dist/invocation/binary.js +21 -5
- package/dist/invocation/binding-codecs.d.ts +1 -2
- package/dist/invocation/binding-codecs.js +1 -7
- 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 -21
- package/dist/invocation/delegate.js +4 -36
- package/dist/invocation/http/binary.d.ts +3 -2
- package/dist/invocation/http/binary.js +6 -2
- package/dist/invocation/http/index.d.ts +2 -2
- package/dist/invocation/http/index.js +2 -2
- package/dist/invocation/http/negotiation.d.ts +0 -1
- package/dist/invocation/http/negotiation.js +3 -11
- package/dist/invocation/http/request.d.ts +11 -0
- package/dist/invocation/http/request.js +69 -0
- 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 +6 -4
- package/dist/invocation/index.js +5 -4
- package/dist/invocation/legacy/delegate.d.ts +17 -0
- package/dist/invocation/legacy/delegate.js +37 -0
- package/dist/invocation/legacy/index.d.ts +29 -0
- package/dist/invocation/legacy/index.js +28 -0
- package/dist/invocation/legacy/route.d.ts +14 -0
- package/dist/invocation/legacy/route.js +25 -0
- package/dist/invocation/legacy/via.d.ts +30 -0
- package/dist/invocation/legacy/via.js +15 -0
- package/dist/invocation/miss.d.ts +0 -1
- package/dist/invocation/miss.js +0 -1
- package/dist/invocation/redirect.d.ts +15 -13
- package/dist/invocation/redirect.js +9 -22
- package/dist/invocation/request.d.ts +0 -1
- package/dist/invocation/request.js +2 -3
- package/dist/invocation/response.d.ts +0 -1
- package/dist/invocation/response.js +0 -1
- package/dist/invocation/routing.d.ts +19 -6
- package/dist/invocation/routing.js +50 -21
- package/dist/invocation/schema.d.ts +6 -5
- package/dist/invocation/schema.js +5 -12
- package/dist/invocation/service-reason.d.ts +21 -17
- package/dist/invocation/service-reason.js +27 -20
- package/dist/invocation/stale-route.d.ts +1 -2
- 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 +5 -3
- package/dist/invocation/target.js +25 -4
- 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 +1 -1
- package/dist/invocation/websocket/index.d.ts +1 -2
- package/dist/invocation/websocket/index.js +1 -2
- package/dist/invocation/websocket/subprotocol.d.ts +1 -3
- package/dist/invocation/websocket/subprotocol.js +3 -5
- package/dist/issuer/claims.d.ts +7 -0
- package/dist/issuer/claims.js +7 -0
- 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 +2 -1
- package/dist/issuer/index.js +2 -1
- package/dist/issuer/key-set.d.ts +0 -1
- package/dist/issuer/key-set.js +0 -1
- package/dist/issuer/paths.d.ts +2 -1
- package/dist/issuer/paths.js +1 -1
- package/dist/issuer/url.d.ts +0 -1
- package/dist/issuer/url.js +0 -1
- package/dist/issuer/workflow-engine.d.ts +18 -0
- package/dist/issuer/workflow-engine.js +59 -0
- package/dist/{publication → release}/bindings/callable.d.ts +0 -1
- package/dist/release/bindings/callable.js +34 -0
- package/dist/{publication → release}/bindings/index.d.ts +1 -2
- package/dist/{publication → release}/bindings/index.js +0 -1
- package/dist/{publication → release}/bindings/invocation.d.ts +0 -1
- package/dist/release/bindings/invocation.js +13 -0
- package/dist/release/bindings/view.d.ts +16 -0
- package/dist/release/bindings/view.js +148 -0
- package/dist/release/build.d.ts +6 -0
- package/dist/release/build.js +7 -0
- package/dist/release/bundle-admission.d.ts +21 -0
- package/dist/release/bundle-admission.js +66 -0
- package/dist/{publication → release}/bundle-descriptor.d.ts +0 -1
- package/dist/release/bundle-descriptor.js +19 -0
- package/dist/release/bundle-evidence.d.ts +3 -0
- package/dist/release/bundle-evidence.js +13 -0
- package/dist/release/bundle.d.ts +12 -0
- package/dist/{publication → release}/bundle.js +16 -11
- package/dist/{publication → release}/declaration.d.ts +0 -1
- package/dist/release/declaration.js +1 -0
- package/dist/{publication → release}/delivery/attestation.d.ts +1 -1
- package/dist/{publication → release}/delivery/attestation.js +0 -1
- package/dist/release/delivery/claims.d.ts +21 -0
- package/dist/release/delivery/claims.js +68 -0
- package/dist/release/delivery/delivery.d.ts +11 -0
- package/dist/release/delivery/delivery.js +24 -0
- package/dist/{publication → release}/delivery/error.d.ts +2 -1
- package/dist/{publication → release}/delivery/error.js +1 -1
- package/dist/{publication → release}/delivery/index.d.ts +6 -2
- package/dist/{publication → release}/delivery/index.js +5 -1
- package/dist/{publication → release}/delivery/limits.d.ts +2 -2
- package/dist/release/delivery/limits.js +5 -0
- package/dist/release/delivery/request.d.ts +21 -0
- package/dist/release/delivery/request.js +60 -0
- package/dist/{publication → release}/delivery-declaration.d.ts +0 -1
- package/dist/{publication → release}/delivery-declaration.js +4 -5
- package/dist/{publication → release}/delivery-endpoint.d.ts +0 -1
- package/dist/release/delivery-endpoint.js +22 -0
- package/dist/release/digest.d.ts +13 -0
- package/dist/{publication/etag.js → release/digest.js} +1 -7
- package/dist/release/error.d.ts +7 -0
- package/dist/release/error.js +11 -0
- package/dist/release/index.d.ts +21 -0
- package/dist/release/index.js +14 -0
- package/dist/release/issuer.d.ts +5 -0
- package/dist/release/issuer.js +34 -0
- package/dist/release/legacy/bindings.d.ts +14 -0
- package/dist/release/legacy/bindings.js +11 -0
- package/dist/release/legacy/bundle-admission.d.ts +6 -0
- package/dist/release/legacy/bundle-admission.js +10 -0
- package/dist/release/legacy/bundle-evidence.d.ts +8 -0
- package/dist/release/legacy/bundle-evidence.js +11 -0
- package/dist/release/legacy/bundle.d.ts +24 -0
- package/dist/release/legacy/bundle.js +31 -0
- package/dist/release/legacy/delivery/attestation.d.ts +6 -0
- package/dist/release/legacy/delivery/attestation.js +1 -0
- package/dist/{publication → release/legacy}/delivery/claims.d.ts +10 -2
- package/dist/{publication → release/legacy}/delivery/claims.js +7 -3
- package/dist/release/legacy/delivery/delivery.d.ts +18 -0
- package/dist/{publication → release/legacy}/delivery/delivery.js +6 -3
- package/dist/release/legacy/delivery/error.d.ts +16 -0
- package/dist/release/legacy/delivery/error.js +6 -0
- package/dist/release/legacy/delivery/index.d.ts +13 -0
- package/dist/release/legacy/delivery/index.js +13 -0
- package/dist/release/legacy/delivery/limits.d.ts +21 -0
- package/dist/release/legacy/delivery/limits.js +22 -0
- package/dist/release/legacy/delivery/request.d.ts +26 -0
- package/dist/{publication → release/legacy}/delivery/request.js +8 -4
- package/dist/release/legacy/delivery-declaration.d.ts +9 -0
- package/dist/release/legacy/delivery-declaration.js +11 -0
- package/dist/release/legacy/error.d.ts +26 -0
- package/dist/release/legacy/error.js +114 -0
- package/dist/release/legacy/etag.d.ts +12 -0
- package/dist/release/legacy/etag.js +14 -0
- package/dist/release/legacy/index.d.ts +75 -0
- package/dist/release/legacy/index.js +15 -0
- package/dist/release/legacy/profiles.d.ts +23 -0
- package/dist/release/legacy/profiles.js +36 -0
- package/dist/release/legacy/projection.d.ts +13 -0
- package/dist/release/legacy/projection.js +25 -0
- package/dist/release/legacy/publication.d.ts +90 -0
- package/dist/release/legacy/publication.js +124 -0
- package/dist/release/legacy/reference.d.ts +47 -0
- package/dist/{publication → release/legacy}/reference.js +27 -4
- package/dist/release/legacy/requirements.d.ts +30 -0
- package/dist/release/legacy/requirements.js +20 -0
- package/dist/release/manifest.d.ts +10 -0
- package/dist/release/manifest.js +66 -0
- package/dist/release/reference.d.ts +26 -0
- package/dist/release/reference.js +70 -0
- package/dist/release/release.d.ts +60 -0
- package/dist/release/release.js +123 -0
- package/dist/release/requirements.d.ts +41 -0
- package/dist/release/requirements.js +306 -0
- package/dist/{publication → release}/route.d.ts +0 -1
- package/dist/{publication → release}/route.js +24 -25
- package/dist/{publication → release}/schema.d.ts +1 -2
- package/dist/{publication → release}/schema.js +4 -5
- package/dist/release/served.d.ts +26 -0
- package/dist/release/served.js +65 -0
- package/dist/release/shape.d.ts +8 -0
- package/dist/{publication/content.js → release/shape.js} +0 -1
- package/dist/routes/admission.d.ts +1 -2
- package/dist/routes/admission.js +7 -86
- package/dist/routes/binding.d.ts +4 -5
- package/dist/routes/binding.js +11 -22
- package/dist/routes/collision.d.ts +0 -1
- package/dist/routes/collision.js +0 -1
- package/dist/routes/compiler.d.ts +4 -5
- package/dist/routes/compiler.js +20 -13
- package/dist/routes/credential.d.ts +12 -2
- package/dist/routes/credential.js +11 -4
- package/dist/routes/decode.d.ts +6 -4
- package/dist/routes/decode.js +32 -30
- package/dist/routes/deployment-retired.d.ts +30 -0
- package/dist/routes/deployment-retired.js +96 -0
- package/dist/routes/encode.d.ts +2 -3
- package/dist/routes/encode.js +22 -20
- package/dist/routes/entries.d.ts +23 -0
- package/dist/routes/entries.js +150 -0
- 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 +4 -5
- package/dist/routes/evidence.js +8 -34
- package/dist/routes/header.d.ts +9 -0
- package/dist/routes/header.js +34 -0
- package/dist/routes/index.d.ts +5 -3
- package/dist/routes/index.js +5 -3
- package/dist/routes/legacy/index.d.ts +29 -0
- package/dist/routes/legacy/index.js +29 -0
- package/dist/routes/legacy/routing.d.ts +24 -0
- package/dist/routes/legacy/routing.js +45 -0
- package/dist/routes/legacy/table.d.ts +34 -0
- package/dist/routes/legacy/table.js +50 -0
- package/dist/routes/mapping.d.ts +1 -2
- package/dist/routes/mapping.js +4 -5
- package/dist/routes/match.d.ts +1 -2
- package/dist/routes/match.js +0 -1
- package/dist/routes/placement.d.ts +2 -3
- package/dist/routes/placement.js +1 -2
- package/dist/routes/plan.d.ts +6 -6
- package/dist/routes/plan.js +0 -1
- package/dist/routes/request.d.ts +5 -4
- package/dist/routes/request.js +0 -1
- package/dist/routes/reservation.d.ts +4 -3
- package/dist/routes/reservation.js +10 -4
- package/dist/routes/routing.d.ts +30 -7
- package/dist/routes/routing.js +34 -50
- package/dist/routes/scalar.d.ts +3 -4
- package/dist/routes/scalar.js +5 -6
- package/dist/routes/select.d.ts +1 -2
- 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 +3 -3
- package/dist/routes/table.js +0 -1
- package/dist/routes/target.d.ts +5 -1
- package/dist/routes/target.js +16 -1
- package/dist/routes/template.d.ts +0 -1
- package/dist/routes/template.js +0 -1
- package/dist/runtime/artifact.d.ts +8 -7
- package/dist/runtime/artifact.js +23 -11
- 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 +9 -0
- package/dist/schema/installation/codec.js +74 -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 +14 -3
- package/dist/schema/installation/introspection/codec.js +323 -194
- 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 +96 -23
- package/dist/schema/installation/introspection/result.js +0 -1
- package/dist/schema/installation/legacy/index.d.ts +39 -0
- package/dist/schema/installation/legacy/index.js +39 -0
- package/dist/schema/installation/legacy/installation.d.ts +9 -0
- package/dist/schema/installation/legacy/installation.js +28 -0
- package/dist/schema/installation/legacy/introspection.d.ts +10 -0
- package/dist/schema/installation/legacy/introspection.js +70 -0
- package/dist/schema/installation/legacy/msgpack.d.ts +1 -0
- package/dist/schema/installation/legacy/msgpack.js +143 -0
- package/dist/schema/installation/result.d.ts +9 -0
- package/dist/schema/installation/result.js +1 -0
- package/package.json +78 -37
- 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 +0 -5
- package/dist/codecs/msgpack.d.ts.map +0 -1
- package/dist/codecs/msgpack.js +0 -51
- 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 +0 -32
- 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 +0 -14
- package/dist/publication/bindings/invocation.js.map +0 -1
- package/dist/publication/bindings/view.d.ts +0 -8
- package/dist/publication/bindings/view.d.ts.map +0 -1
- package/dist/publication/bindings/view.js +0 -29
- package/dist/publication/bindings/view.js.map +0 -1
- package/dist/publication/bundle-admission.d.ts +0 -5
- package/dist/publication/bundle-admission.d.ts.map +0 -1
- package/dist/publication/bundle-admission.js +0 -66
- 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 +0 -20
- package/dist/publication/bundle-descriptor.js.map +0 -1
- package/dist/publication/bundle-evidence.d.ts +0 -4
- package/dist/publication/bundle-evidence.d.ts.map +0 -1
- package/dist/publication/bundle-evidence.js +0 -14
- package/dist/publication/bundle-evidence.js.map +0 -1
- package/dist/publication/bundle.d.ts +0 -10
- package/dist/publication/bundle.d.ts.map +0 -1
- package/dist/publication/bundle.js.map +0 -1
- package/dist/publication/content.d.ts +0 -11
- 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 +0 -2
- 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 +0 -10
- 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 +0 -5
- package/dist/publication/delivery/limits.js.map +0 -1
- package/dist/publication/delivery/request.d.ts +0 -16
- 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 +0 -23
- package/dist/publication/delivery-endpoint.js.map +0 -1
- package/dist/publication/error.d.ts +0 -8
- package/dist/publication/error.d.ts.map +0 -1
- package/dist/publication/error.js +0 -12
- package/dist/publication/error.js.map +0 -1
- package/dist/publication/etag.d.ts +0 -7
- package/dist/publication/etag.d.ts.map +0 -1
- package/dist/publication/etag.js.map +0 -1
- package/dist/publication/index.d.ts +0 -18
- package/dist/publication/index.d.ts.map +0 -1
- package/dist/publication/index.js +0 -11
- package/dist/publication/index.js.map +0 -1
- package/dist/publication/manifest.d.ts +0 -7
- package/dist/publication/manifest.d.ts.map +0 -1
- package/dist/publication/manifest.js +0 -26
- package/dist/publication/manifest.js.map +0 -1
- package/dist/publication/publication.d.ts +0 -37
- package/dist/publication/publication.d.ts.map +0 -1
- package/dist/publication/publication.js +0 -131
- package/dist/publication/publication.js.map +0 -1
- package/dist/publication/reference.d.ts +0 -18
- package/dist/publication/reference.d.ts.map +0 -1
- package/dist/publication/reference.js.map +0 -1
- package/dist/publication/requirements.d.ts +0 -27
- package/dist/publication/requirements.d.ts.map +0 -1
- package/dist/publication/requirements.js +0 -185
- 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 +0 -9
- package/dist/routes/release-unavailable.d.ts.map +0 -1
- package/dist/routes/release-unavailable.js +0 -33
- 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,15 +1,28 @@
|
|
|
1
1
|
import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { Revision } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
3
|
+
import type { Object as ValueObject } from '@astrale-os/kernel-dsl/value';
|
|
4
|
+
import type { Sha256Digest } from '../release/digest.js';
|
|
5
|
+
import type { ReleaseRef } from '../release/reference.js';
|
|
6
|
+
import type { PublicationVia } from './legacy/via.js';
|
|
7
|
+
/** Routed witness of one installed release: the Kernel routed this call to that exact release. */
|
|
4
8
|
export interface Via {
|
|
5
9
|
readonly kind: 'via';
|
|
6
|
-
readonly
|
|
10
|
+
readonly release: ReleaseRef;
|
|
7
11
|
readonly issuer: IssuerId;
|
|
8
12
|
}
|
|
9
13
|
export interface Refresh {
|
|
10
14
|
readonly kind: 'refresh';
|
|
11
|
-
readonly stale:
|
|
15
|
+
readonly stale: Sha256Digest;
|
|
12
16
|
}
|
|
13
|
-
|
|
17
|
+
/** A received `Via` names exactly one of a `ReleaseRef` or a legacy `PublicationRef`. */
|
|
18
|
+
export type Routing = Via | PublicationVia | Refresh;
|
|
14
19
|
export declare function acceptRouting(input: unknown): Routing;
|
|
15
|
-
|
|
20
|
+
/** Admit one routed witness carrying exactly one of `release` or legacy `publication`. */
|
|
21
|
+
export declare function acceptVia(object: ValueObject, label: string): Via | PublicationVia;
|
|
22
|
+
/** Schema revision of the release or Publication the witness routed the call to. */
|
|
23
|
+
export declare function routedRevision(via: Via | PublicationVia): Revision;
|
|
24
|
+
/**
|
|
25
|
+
* Digest designating what the witness routed the call to: the release digest of a `Via`, the
|
|
26
|
+
* Publication ETag of a legacy `PublicationVia`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function routedDigest(via: Via | PublicationVia): Sha256Digest;
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { acceptReference } from '../
|
|
1
|
+
import { ReleaseError } from '../release/error.js';
|
|
2
|
+
import { acceptReference } from '../release/reference.js';
|
|
3
3
|
import { digest, exactFields, invalid, issuerId, portableObject, required } from './admission.js';
|
|
4
|
-
|
|
4
|
+
import { acceptPublicationReference } from './legacy/via.js';
|
|
5
|
+
const VIA_FIELDS = new Set(['kind', 'release', 'publication', 'issuer']);
|
|
5
6
|
const REFRESH_FIELDS = new Set(['kind', 'stale']);
|
|
6
7
|
export function acceptRouting(input) {
|
|
7
8
|
const object = portableObject(input, 'routing');
|
|
8
|
-
if (object.kind === 'via')
|
|
9
|
-
|
|
10
|
-
required(object, ['kind', 'publication', 'issuer'], 'via routing');
|
|
11
|
-
try {
|
|
12
|
-
return Object.freeze({
|
|
13
|
-
kind: 'via',
|
|
14
|
-
publication: acceptReference(object.publication),
|
|
15
|
-
issuer: issuerId(object.issuer, 'via routing.issuer'),
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
catch (cause) {
|
|
19
|
-
if (cause instanceof PublicationError) {
|
|
20
|
-
return invalid(`via routing.publication is invalid: ${cause.message}`);
|
|
21
|
-
}
|
|
22
|
-
throw cause;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
9
|
+
if (object.kind === 'via')
|
|
10
|
+
return acceptVia(object, 'via routing');
|
|
25
11
|
if (object.kind === 'refresh') {
|
|
26
12
|
exactFields(object, REFRESH_FIELDS, 'refresh routing');
|
|
27
13
|
required(object, ['kind', 'stale'], 'refresh routing');
|
|
@@ -32,4 +18,47 @@ export function acceptRouting(input) {
|
|
|
32
18
|
}
|
|
33
19
|
return invalid('routing.kind must be "via" or "refresh"');
|
|
34
20
|
}
|
|
35
|
-
|
|
21
|
+
/** Admit one routed witness carrying exactly one of `release` or legacy `publication`. */
|
|
22
|
+
export function acceptVia(object, label) {
|
|
23
|
+
exactFields(object, VIA_FIELDS, label);
|
|
24
|
+
if (object.kind !== 'via')
|
|
25
|
+
invalid(`${label}.kind must be "via"`);
|
|
26
|
+
const hasRelease = Object.hasOwn(object, 'release');
|
|
27
|
+
if (hasRelease === Object.hasOwn(object, 'publication')) {
|
|
28
|
+
invalid(`${label} must contain exactly one of release or publication`);
|
|
29
|
+
}
|
|
30
|
+
required(object, ['issuer'], label);
|
|
31
|
+
if (!hasRelease) {
|
|
32
|
+
return Object.freeze({
|
|
33
|
+
kind: 'via',
|
|
34
|
+
publication: acceptPublicationReference(object.publication, `${label}.publication`),
|
|
35
|
+
issuer: issuerId(object.issuer, `${label}.issuer`),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return Object.freeze({
|
|
39
|
+
kind: 'via',
|
|
40
|
+
release: acceptReleaseReference(object.release, `${label}.release`),
|
|
41
|
+
issuer: issuerId(object.issuer, `${label}.issuer`),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/** Schema revision of the release or Publication the witness routed the call to. */
|
|
45
|
+
export function routedRevision(via) {
|
|
46
|
+
return 'release' in via ? via.release.revision : via.publication.revision;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Digest designating what the witness routed the call to: the release digest of a `Via`, the
|
|
50
|
+
* Publication ETag of a legacy `PublicationVia`.
|
|
51
|
+
*/
|
|
52
|
+
export function routedDigest(via) {
|
|
53
|
+
return 'release' in via ? via.release.digest : via.publication.etag;
|
|
54
|
+
}
|
|
55
|
+
function acceptReleaseReference(input, label) {
|
|
56
|
+
try {
|
|
57
|
+
return acceptReference(input);
|
|
58
|
+
}
|
|
59
|
+
catch (cause) {
|
|
60
|
+
if (cause instanceof ReleaseError)
|
|
61
|
+
return invalid(`${label} is invalid: ${cause.message}`);
|
|
62
|
+
throw cause;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Sha256Digest } from '../release/digest.js';
|
|
2
|
+
/**
|
|
3
|
+
* Source-Kernel precondition for one invocation: the exact installed artifact target, or the
|
|
4
|
+
* fingerprint of the callable meaning the static consumer compiled against.
|
|
5
|
+
*/
|
|
4
6
|
export type SchemaTarget = {
|
|
5
7
|
readonly target: Sha256Digest;
|
|
6
8
|
} | {
|
|
7
|
-
readonly
|
|
9
|
+
readonly fingerprint: Sha256Digest;
|
|
8
10
|
};
|
|
9
11
|
export declare function acceptSchemaTarget(input: unknown): SchemaTarget;
|
|
10
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
2
1
|
import { digest, exactFields, invalid, portableObject } from './admission.js';
|
|
3
|
-
const FIELDS = new Set(['target', '
|
|
2
|
+
const FIELDS = new Set(['target', 'fingerprint']);
|
|
4
3
|
export function acceptSchemaTarget(input) {
|
|
5
4
|
const object = portableObject(input, 'schema target');
|
|
6
5
|
exactFields(object, FIELDS, 'schema target');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (hasTarget === hasRevision) {
|
|
10
|
-
invalid('schema target must contain exactly one of target or revision');
|
|
6
|
+
if ([...FIELDS].filter((field) => Object.hasOwn(object, field)).length !== 1) {
|
|
7
|
+
invalid('schema target must contain exactly one of target or fingerprint');
|
|
11
8
|
}
|
|
12
|
-
if (
|
|
9
|
+
if (Object.hasOwn(object, 'target')) {
|
|
13
10
|
return Object.freeze({ target: digest(object.target, 'schema target.target') });
|
|
14
11
|
}
|
|
15
|
-
|
|
16
|
-
invalid('schema target.revision must be a Schema revision');
|
|
17
|
-
}
|
|
18
|
-
return Object.freeze({ revision: object.revision });
|
|
12
|
+
return Object.freeze({ fingerprint: digest(object.fingerprint, 'schema target.fingerprint') });
|
|
19
13
|
}
|
|
20
|
-
//# sourceMappingURL=schema.js.map
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
|
|
2
|
-
import type { Revision } from '@astrale-os/kernel-dsl/v1/
|
|
2
|
+
import type { Revision } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
3
3
|
import type { Object as ValueObject } from '@astrale-os/kernel-dsl/value';
|
|
4
|
-
import {
|
|
4
|
+
import { Key } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
5
5
|
import type { ErrorPayload, ErrorReason } from '../errors/index.js';
|
|
6
|
+
import type { ReleaseDigest, Sha256Digest } from '../release/digest.js';
|
|
6
7
|
import { CODES } from '../errors/index.js';
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const SCHEMA_REVISION_MISMATCH: 'SCHEMA_REVISION_MISMATCH';
|
|
8
|
+
export declare const CALLABLE_FINGERPRINT_MISMATCH: 'CALLABLE_FINGERPRINT_MISMATCH';
|
|
9
9
|
export declare const SERVICE_TRUST_REQUIRED: 'SERVICE_TRUST_REQUIRED';
|
|
10
10
|
export declare const SERVICE_UNAVAILABLE: 'SERVICE_UNAVAILABLE';
|
|
11
11
|
export declare const SERVICE_CANDIDATE_INVALID: 'SERVICE_CANDIDATE_INVALID';
|
|
12
|
-
|
|
12
|
+
/** A deployment answers that it no longer serves: it runs no other code in its place. */
|
|
13
|
+
export declare const DEPLOYMENT_RETIRED: 'DEPLOYMENT_RETIRED';
|
|
14
|
+
export type CallableFingerprintMismatchDetails = ValueObject & {
|
|
13
15
|
readonly origin: Key.Origin;
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
|
|
17
|
-
export type SchemaRevisionMismatchDetails = ValueObject & {
|
|
18
|
-
readonly origin: Key.Origin;
|
|
19
|
-
readonly expectedRevision: Revision;
|
|
20
|
-
readonly installedRevision: Revision;
|
|
16
|
+
readonly callable: Key.Callable;
|
|
17
|
+
readonly expectedFingerprint: Sha256Digest;
|
|
18
|
+
readonly installedFingerprint: Sha256Digest;
|
|
21
19
|
};
|
|
22
20
|
export type ServiceTrustRequiredDetails = ValueObject & {
|
|
23
21
|
readonly origin: Key.Origin;
|
|
@@ -31,19 +29,25 @@ export type ServiceUnavailableDetails = ValueObject & {
|
|
|
31
29
|
export type ServiceCandidateInvalidDetails = ValueObject & {
|
|
32
30
|
readonly origin: Key.Origin;
|
|
33
31
|
};
|
|
34
|
-
export type
|
|
35
|
-
|
|
32
|
+
export type DeploymentRetiredDetails = ValueObject & {
|
|
33
|
+
readonly deployment: IssuerId;
|
|
34
|
+
readonly release?: ReleaseDigest;
|
|
35
|
+
};
|
|
36
|
+
export type CallableFingerprintMismatchReason = ErrorReason<typeof CALLABLE_FINGERPRINT_MISMATCH, CallableFingerprintMismatchDetails>;
|
|
36
37
|
export type ServiceTrustRequiredReason = ErrorReason<typeof SERVICE_TRUST_REQUIRED, ServiceTrustRequiredDetails>;
|
|
37
38
|
export type ServiceUnavailableReason = ErrorReason<typeof SERVICE_UNAVAILABLE, ServiceUnavailableDetails>;
|
|
38
39
|
export type ServiceCandidateInvalidReason = ErrorReason<typeof SERVICE_CANDIDATE_INVALID, ServiceCandidateInvalidDetails>;
|
|
39
|
-
export type
|
|
40
|
+
export type DeploymentRetiredReason = ErrorReason<typeof DEPLOYMENT_RETIRED, DeploymentRetiredDetails>;
|
|
41
|
+
export type ServiceReason = CallableFingerprintMismatchReason | ServiceTrustRequiredReason | ServiceUnavailableReason | ServiceCandidateInvalidReason | DeploymentRetiredReason;
|
|
40
42
|
export type ServiceErrorPayload = (Omit<ErrorPayload, 'code' | 'data'> & {
|
|
41
43
|
readonly code: typeof CODES.CONFLICT;
|
|
42
|
-
readonly data:
|
|
44
|
+
readonly data: CallableFingerprintMismatchReason | ServiceTrustRequiredReason;
|
|
43
45
|
}) | (Omit<ErrorPayload, 'code' | 'data'> & {
|
|
44
46
|
readonly code: typeof CODES.BACKEND_UNAVAILABLE;
|
|
45
47
|
readonly data: ServiceUnavailableReason | ServiceCandidateInvalidReason;
|
|
48
|
+
}) | (Omit<ErrorPayload, 'code' | 'data'> & {
|
|
49
|
+
readonly code: typeof CODES.NOT_FOUND;
|
|
50
|
+
readonly data: DeploymentRetiredReason;
|
|
46
51
|
});
|
|
47
52
|
/** Recognize only exact outer-code, reason-code, and detail-shape combinations. */
|
|
48
53
|
export declare function serviceErrorOf(input: ErrorPayload): ServiceErrorPayload | undefined;
|
|
49
|
-
//# sourceMappingURL=service-reason.d.ts.map
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import { AuthValueError } from '@astrale-os/kernel-core/auth/error';
|
|
2
2
|
import { accept as acceptIssuer } from '@astrale-os/kernel-core/auth/issuer';
|
|
3
|
-
import { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
3
|
+
import { Key, patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
4
4
|
import { CODES, reasonOf } from '../errors/index.js';
|
|
5
|
-
export const
|
|
6
|
-
export const SCHEMA_REVISION_MISMATCH = 'SCHEMA_REVISION_MISMATCH';
|
|
5
|
+
export const CALLABLE_FINGERPRINT_MISMATCH = 'CALLABLE_FINGERPRINT_MISMATCH';
|
|
7
6
|
export const SERVICE_TRUST_REQUIRED = 'SERVICE_TRUST_REQUIRED';
|
|
8
7
|
export const SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE';
|
|
9
8
|
export const SERVICE_CANDIDATE_INVALID = 'SERVICE_CANDIDATE_INVALID';
|
|
9
|
+
/** A deployment answers that it no longer serves: it runs no other code in its place. */
|
|
10
|
+
export const DEPLOYMENT_RETIRED = 'DEPLOYMENT_RETIRED';
|
|
10
11
|
/** Recognize only exact outer-code, reason-code, and detail-shape combinations. */
|
|
11
12
|
export function serviceErrorOf(input) {
|
|
12
13
|
const reason = reasonOf(input.data);
|
|
13
14
|
if (reason === undefined)
|
|
14
15
|
return undefined;
|
|
15
16
|
switch (reason.code) {
|
|
16
|
-
case
|
|
17
|
-
return input.code === CODES.CONFLICT &&
|
|
18
|
-
? input
|
|
19
|
-
: undefined;
|
|
20
|
-
case SCHEMA_UPGRADE_REQUIRED:
|
|
21
|
-
return input.code === CODES.CONFLICT && schemaUpgradeDetails(reason.details)
|
|
17
|
+
case CALLABLE_FINGERPRINT_MISMATCH:
|
|
18
|
+
return input.code === CODES.CONFLICT && callableFingerprintMismatchDetails(reason.details)
|
|
22
19
|
? input
|
|
23
20
|
: undefined;
|
|
24
21
|
case SERVICE_TRUST_REQUIRED:
|
|
@@ -33,21 +30,22 @@ export function serviceErrorOf(input) {
|
|
|
33
30
|
return input.code === CODES.BACKEND_UNAVAILABLE && candidateInvalidDetails(reason.details)
|
|
34
31
|
? input
|
|
35
32
|
: undefined;
|
|
33
|
+
case DEPLOYMENT_RETIRED:
|
|
34
|
+
return input.code === CODES.NOT_FOUND && deploymentRetiredDetails(reason.details)
|
|
35
|
+
? input
|
|
36
|
+
: undefined;
|
|
36
37
|
default:
|
|
37
38
|
return undefined;
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
return (exact(input, ['origin', '
|
|
41
|
+
function callableFingerprintMismatchDetails(input) {
|
|
42
|
+
return (exact(input, ['origin', 'callable', 'expectedFingerprint', 'installedFingerprint']) &&
|
|
42
43
|
isOrigin(input.origin) &&
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
isOrigin(input.origin) &&
|
|
49
|
-
isRevision(input.installedRevision) &&
|
|
50
|
-
isRevision(input.candidateRevision));
|
|
44
|
+
typeof input.callable === 'string' &&
|
|
45
|
+
Key.is(input.callable) &&
|
|
46
|
+
Key.origin(input.callable) === input.origin &&
|
|
47
|
+
isDigest(input.expectedFingerprint) &&
|
|
48
|
+
isDigest(input.installedFingerprint));
|
|
51
49
|
}
|
|
52
50
|
function serviceTrustDetails(input) {
|
|
53
51
|
return (exact(input, ['origin', 'installedIssuer', 'candidateIssuer']) &&
|
|
@@ -61,6 +59,13 @@ function serviceUnavailableDetails(input) {
|
|
|
61
59
|
function candidateInvalidDetails(input) {
|
|
62
60
|
return exact(input, ['origin']) && isOrigin(input.origin);
|
|
63
61
|
}
|
|
62
|
+
function deploymentRetiredDetails(input) {
|
|
63
|
+
return Object.hasOwn(input, 'release')
|
|
64
|
+
? exact(input, ['deployment', 'release']) &&
|
|
65
|
+
isIssuer(input.deployment) &&
|
|
66
|
+
isDigest(input.release)
|
|
67
|
+
: exact(input, ['deployment']) && isIssuer(input.deployment);
|
|
68
|
+
}
|
|
64
69
|
function exact(input, fields) {
|
|
65
70
|
return (Object.keys(input).length === fields.length &&
|
|
66
71
|
fields.every((field) => Object.hasOwn(input, field)));
|
|
@@ -71,6 +76,9 @@ function isOrigin(input) {
|
|
|
71
76
|
function isRevision(input) {
|
|
72
77
|
return typeof input === 'string' && patterns.revision.test(input);
|
|
73
78
|
}
|
|
79
|
+
function isDigest(input) {
|
|
80
|
+
return typeof input === 'string' && /^sha256:[0-9a-f]{64}$/u.test(input);
|
|
81
|
+
}
|
|
74
82
|
function isIssuer(input) {
|
|
75
83
|
if (typeof input !== 'string')
|
|
76
84
|
return false;
|
|
@@ -83,4 +91,3 @@ function isIssuer(input) {
|
|
|
83
91
|
throw cause;
|
|
84
92
|
}
|
|
85
93
|
}
|
|
86
|
-
//# sourceMappingURL=service-reason.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Etag } from '../
|
|
1
|
+
import type { Etag } from '../release/legacy/etag.js';
|
|
2
2
|
import type { RequestId } from './correlation.js';
|
|
3
3
|
import type { InvocationId } from './identity.js';
|
|
4
4
|
/** Reserved pre-handler routing control; never an application ErrorResponse. */
|
|
@@ -10,4 +10,3 @@ export interface Stale {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function decodeStale(input: unknown): Stale;
|
|
12
12
|
export declare function stale(requestId: RequestId, assigned: InvocationId, current: Etag): Stale;
|
|
13
|
-
//# sourceMappingURL=stale-route.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { Value } from '@astrale-os/kernel-dsl/value';
|
|
2
|
+
import { type Call } from '@astrale-os/kernel-core/callable';
|
|
3
|
+
export { Target, targetPath, type Call } from '@astrale-os/kernel-core/callable';
|
|
3
4
|
export declare function acceptCall(input: unknown): Call;
|
|
4
|
-
|
|
5
|
+
/** Package-private: consume the detached portable subtree captured by request admission. */
|
|
6
|
+
export declare function callFromSnapshot(input: Value): Call;
|
|
@@ -1,12 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Target } from '@astrale-os/kernel-core/callable';
|
|
2
|
+
import { PathError } from '@astrale-os/kernel-core/path';
|
|
3
|
+
import { exactFields, invalid, nodePath, portableObject, required } from './admission.js';
|
|
4
|
+
export { Target, targetPath } from '@astrale-os/kernel-core/callable';
|
|
2
5
|
const CALL_FIELDS = new Set(['target', 'input']);
|
|
3
6
|
export function acceptCall(input) {
|
|
4
|
-
|
|
7
|
+
return callFromSnapshot(portableObject(input, 'call'));
|
|
8
|
+
}
|
|
9
|
+
/** Package-private: consume the detached portable subtree captured by request admission. */
|
|
10
|
+
export function callFromSnapshot(input) {
|
|
11
|
+
if (input === null || typeof input !== 'object' || Array.isArray(input)) {
|
|
12
|
+
invalid('call must be an object');
|
|
13
|
+
}
|
|
14
|
+
const object = input;
|
|
5
15
|
exactFields(object, CALL_FIELDS, 'call');
|
|
6
16
|
required(object, ['target', 'input'], 'call');
|
|
7
17
|
return Object.freeze({
|
|
8
|
-
target:
|
|
18
|
+
target: acceptTarget(object.target),
|
|
9
19
|
input: object.input,
|
|
10
20
|
});
|
|
11
21
|
}
|
|
12
|
-
|
|
22
|
+
function acceptTarget(input) {
|
|
23
|
+
if (typeof input === 'string')
|
|
24
|
+
return nodePath(input, 'call.target');
|
|
25
|
+
try {
|
|
26
|
+
return Target(input);
|
|
27
|
+
}
|
|
28
|
+
catch (cause) {
|
|
29
|
+
if (cause instanceof TypeError || cause instanceof PathError)
|
|
30
|
+
return invalid('call.target must be a canonical NodePath or declaration Target');
|
|
31
|
+
throw cause;
|
|
32
|
+
}
|
|
33
|
+
}
|
package/dist/invocation/trace.js
CHANGED
|
@@ -14,6 +14,7 @@ export function encodeBinary(response) {
|
|
|
14
14
|
requestId: response.requestId,
|
|
15
15
|
invocation: response.invocation,
|
|
16
16
|
mediaType: response.mediaType,
|
|
17
|
+
status: response.status,
|
|
17
18
|
...(headers === undefined ? {} : { headers }),
|
|
18
19
|
}));
|
|
19
20
|
if (metadata.byteLength > MAXIMUM_METADATA_BYTES)
|
|
@@ -69,4 +70,3 @@ function invalid() {
|
|
|
69
70
|
message: 'WebSocket binary response is invalid.',
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
|
-
//# sourceMappingURL=binary.js.map
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export { decodeBinary, encodeBinary } from './binary.js';
|
|
2
|
-
export { JSON_SUBPROTOCOL,
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
2
|
+
export { JSON_SUBPROTOCOL, selectSubprotocol, subprotocolFor, type Subprotocol, type SubprotocolSelection, } from './subprotocol.js';
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export { decodeBinary, encodeBinary } from './binary.js';
|
|
2
|
-
export { JSON_SUBPROTOCOL,
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
2
|
+
export { JSON_SUBPROTOCOL, selectSubprotocol, subprotocolFor, } from './subprotocol.js';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { Codec } from '../../codecs/index.js';
|
|
2
2
|
export declare const JSON_SUBPROTOCOL: 'astrale.invocation.v2.json';
|
|
3
|
-
export
|
|
4
|
-
export type Subprotocol = typeof JSON_SUBPROTOCOL | typeof MSGPACK_SUBPROTOCOL;
|
|
3
|
+
export type Subprotocol = typeof JSON_SUBPROTOCOL;
|
|
5
4
|
export interface SubprotocolSelection {
|
|
6
5
|
readonly subprotocol: Subprotocol;
|
|
7
6
|
readonly codec: Codec;
|
|
8
7
|
}
|
|
9
8
|
export declare function subprotocolFor(codec: Codec): Subprotocol;
|
|
10
9
|
export declare function selectSubprotocol(offered: string | null, supported: readonly Codec[]): SubprotocolSelection | undefined;
|
|
11
|
-
//# sourceMappingURL=subprotocol.d.ts.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { admitSupportedCodecs, codecProfile } from '../binding-codecs.js';
|
|
2
2
|
export const JSON_SUBPROTOCOL = 'astrale.invocation.v2.json';
|
|
3
|
-
export const MSGPACK_SUBPROTOCOL = 'astrale.invocation.v2.msgpack';
|
|
4
3
|
const TOKEN = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u;
|
|
5
4
|
export function subprotocolFor(codec) {
|
|
6
|
-
|
|
7
|
-
if (profile === undefined)
|
|
5
|
+
if (codecProfile(codec) === undefined) {
|
|
8
6
|
throw new TypeError('codec is not a canonical Invocation codec.');
|
|
9
|
-
|
|
7
|
+
}
|
|
8
|
+
return JSON_SUBPROTOCOL;
|
|
10
9
|
}
|
|
11
10
|
export function selectSubprotocol(offered, supported) {
|
|
12
11
|
const admitted = admitSupportedCodecs(supported);
|
|
@@ -27,4 +26,3 @@ export function selectSubprotocol(offered, supported) {
|
|
|
27
26
|
}
|
|
28
27
|
return undefined;
|
|
29
28
|
}
|
|
30
|
-
//# sourceMappingURL=subprotocol.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Private JWT claim of the self credential a durable step's Domain signs for the Kernel: the id of
|
|
3
|
+
* the Execution the step belongs to. After a consented issuer change, the Kernel accepts the
|
|
4
|
+
* replaced issuer past its window only for a credential naming an unfinished run of its Domain
|
|
5
|
+
* that was in flight at that change.
|
|
6
|
+
*/
|
|
7
|
+
export declare const EXECUTION_CLAIM = "execution";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Private JWT claim of the self credential a durable step's Domain signs for the Kernel: the id of
|
|
3
|
+
* the Execution the step belongs to. After a consented issuer change, the Kernel accepts the
|
|
4
|
+
* replaced issuer past its window only for a credential naming an unfinished run of its Domain
|
|
5
|
+
* that was in flight at that change.
|
|
6
|
+
*/
|
|
7
|
+
export const EXECUTION_CLAIM = 'execution';
|
|
@@ -12,4 +12,3 @@ export interface ConfigurationOptions {
|
|
|
12
12
|
export declare function configuration(issuer: string, algorithms: readonly [string, ...string[]], options?: ConfigurationOptions): Configuration;
|
|
13
13
|
export declare function acceptConfiguration(input: unknown, expectedIssuer?: string): Configuration;
|
|
14
14
|
export declare function acceptAlgorithms(input: unknown): readonly [string, ...string[]];
|
|
15
|
-
//# sourceMappingURL=configuration.d.ts.map
|
package/dist/issuer/error.d.ts
CHANGED
package/dist/issuer/error.js
CHANGED
|
@@ -23,4 +23,3 @@ export declare function acceptResponse(input: unknown): Response;
|
|
|
23
23
|
export declare function acceptErrorResponse(input: unknown): ErrorResponse;
|
|
24
24
|
export declare function acceptHttpRequest(input: HttpRequest): Request;
|
|
25
25
|
export declare function responseHeaders(): Readonly<Record<string, string>>;
|
|
26
|
-
//# sourceMappingURL=exchange.d.ts.map
|
package/dist/issuer/exchange.js
CHANGED
package/dist/issuer/hosted.d.ts
CHANGED
package/dist/issuer/hosted.js
CHANGED
package/dist/issuer/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export { EXECUTION_CLAIM } from './claims.js';
|
|
1
2
|
export { acceptConfiguration, configuration, type Configuration, type ConfigurationOptions, } from './configuration.js';
|
|
2
3
|
export { DiscoveryError, type DiscoveryErrorCode } from './error.js';
|
|
3
4
|
export { hosted } from './hosted.js';
|
|
4
5
|
export { acceptKeySet, keySet, type KeySet } from './key-set.js';
|
|
5
6
|
export { paths, type Paths } from './paths.js';
|
|
7
|
+
export { acceptWorkflowEngine, acceptWorkflowEngineIdentityKey, workflowEngine, type WorkflowEngine, } from './workflow-engine.js';
|
|
6
8
|
export * as exchange from './exchange.js';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/issuer/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export { EXECUTION_CLAIM } from './claims.js';
|
|
1
2
|
export { acceptConfiguration, configuration, } from './configuration.js';
|
|
2
3
|
export { DiscoveryError } from './error.js';
|
|
3
4
|
export { hosted } from './hosted.js';
|
|
4
5
|
export { acceptKeySet, keySet } from './key-set.js';
|
|
5
6
|
export { paths } from './paths.js';
|
|
7
|
+
export { acceptWorkflowEngine, acceptWorkflowEngineIdentityKey, workflowEngine, } from './workflow-engine.js';
|
|
6
8
|
export * as exchange from './exchange.js';
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
package/dist/issuer/key-set.d.ts
CHANGED
|
@@ -4,4 +4,3 @@ export interface KeySet {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function keySet(keys: readonly JsonWebKey[], algorithms: readonly [string, ...string[]]): KeySet;
|
|
6
6
|
export declare function acceptKeySet(input: unknown, algorithms: readonly [string, ...string[]]): KeySet;
|
|
7
|
-
//# sourceMappingURL=key-set.d.ts.map
|
package/dist/issuer/key-set.js
CHANGED
package/dist/issuer/paths.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export interface Paths {
|
|
|
2
2
|
readonly configuration: string;
|
|
3
3
|
readonly keys: string;
|
|
4
4
|
readonly tokenExchange: string;
|
|
5
|
+
/** Where Domains discover the workflow engine of a Kernel that drives one. */
|
|
6
|
+
readonly workflowEngine: string;
|
|
5
7
|
}
|
|
6
8
|
export declare function paths(issuer: string): Paths;
|
|
7
|
-
//# sourceMappingURL=paths.d.ts.map
|
package/dist/issuer/paths.js
CHANGED
|
@@ -6,6 +6,6 @@ export function paths(issuer) {
|
|
|
6
6
|
configuration: `${pathname}/.well-known/openid-configuration`,
|
|
7
7
|
keys: `${pathname}/.well-known/jwks.json`,
|
|
8
8
|
tokenExchange: `${pathname}/.well-known/astrale/token`,
|
|
9
|
+
workflowEngine: `${pathname}/.well-known/astrale/workflow-engine.json`,
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
|
-
//# sourceMappingURL=paths.js.map
|
package/dist/issuer/url.d.ts
CHANGED
package/dist/issuer/url.js
CHANGED