@astrale-os/kernel-protocol 0.5.0-beta.8 → 0.5.0
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 +0 -1
- package/dist/errors/protocol-error.d.ts +0 -1
- package/dist/errors/protocol-error.js +0 -1
- package/dist/errors/reason.d.ts +0 -1
- package/dist/errors/reason.js +0 -1
- package/dist/errors/retry.d.ts +25 -0
- package/dist/errors/retry.js +46 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/invocation/admission.d.ts +2 -3
- package/dist/invocation/admission.js +5 -6
- package/dist/invocation/binary.d.ts +1 -1
- package/dist/invocation/binary.js +21 -5
- package/dist/invocation/binding-codecs.d.ts +3 -3
- 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 +2 -35
- 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 +5 -5
- package/dist/invocation/index.js +4 -4
- package/dist/invocation/maintenance.d.ts +14 -0
- package/dist/invocation/maintenance.js +18 -0
- package/dist/invocation/miss.d.ts +0 -1
- package/dist/invocation/miss.js +0 -1
- package/dist/invocation/redirect.d.ts +10 -13
- package/dist/invocation/redirect.js +10 -23
- package/dist/invocation/request.d.ts +3 -1
- package/dist/invocation/request.js +9 -3
- package/dist/invocation/response.d.ts +6 -2
- package/dist/invocation/response.js +26 -16
- package/dist/invocation/routing.d.ts +14 -5
- package/dist/invocation/routing.js +35 -21
- package/dist/invocation/schema.d.ts +6 -5
- package/dist/invocation/schema.js +5 -12
- package/dist/invocation/service-reason.d.ts +20 -16
- package/dist/invocation/service-reason.js +27 -20
- package/dist/invocation/stale-route.d.ts +3 -4
- 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/{publication → release}/bindings/callable.js +6 -7
- package/dist/{publication → release}/bindings/index.d.ts +0 -1
- 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 +11 -0
- package/dist/release/bindings/view.js +54 -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/{publication → release}/bundle-admission.js +15 -21
- 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/{publication → release}/bundle.d.ts +5 -3
- package/dist/{publication → release}/bundle.js +13 -8
- 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/{publication → release}/delivery/claims.d.ts +7 -3
- package/dist/{publication → release}/delivery/claims.js +20 -14
- package/dist/release/delivery/delivery.d.ts +11 -0
- package/dist/{publication → release}/delivery/delivery.js +7 -13
- 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 +5 -2
- package/dist/{publication → release}/delivery/index.js +4 -1
- package/dist/{publication → release}/delivery/limits.d.ts +2 -2
- package/dist/release/delivery/limits.js +5 -0
- package/dist/{publication → release}/delivery/request.d.ts +10 -10
- package/dist/{publication → release}/delivery/request.js +9 -11
- 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 +17 -0
- package/dist/release/index.js +10 -0
- package/dist/release/issuer.d.ts +5 -0
- package/dist/release/issuer.js +34 -0
- package/dist/release/manifest.d.ts +6 -0
- package/dist/release/manifest.js +22 -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 +125 -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 +0 -1
- package/dist/{publication → release}/schema.js +4 -5
- package/dist/release/served.d.ts +27 -0
- package/dist/release/served.js +56 -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 +3 -4
- 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 +2 -3
- package/dist/routes/compiler.js +7 -4
- package/dist/routes/credential.d.ts +12 -3
- package/dist/routes/credential.js +9 -5
- package/dist/routes/decode.d.ts +5 -3
- package/dist/routes/decode.js +24 -18
- package/dist/routes/deployment-retired.d.ts +30 -0
- package/dist/routes/deployment-retired.js +96 -0
- package/dist/routes/encode.d.ts +0 -1
- package/dist/routes/encode.js +12 -6
- 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 +3 -4
- package/dist/routes/evidence.js +7 -34
- package/dist/routes/header.d.ts +9 -0
- package/dist/routes/header.js +34 -0
- package/dist/routes/index.d.ts +2 -3
- package/dist/routes/index.js +2 -3
- 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 +0 -1
- package/dist/routes/plan.d.ts +1 -2
- package/dist/routes/plan.js +0 -1
- package/dist/routes/request.d.ts +3 -2
- package/dist/routes/request.js +0 -1
- package/dist/routes/reservation.d.ts +4 -3
- package/dist/routes/reservation.js +14 -9
- package/dist/routes/routing.d.ts +18 -7
- package/dist/routes/routing.js +28 -50
- package/dist/routes/scalar.d.ts +0 -1
- package/dist/routes/scalar.js +0 -1
- 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 -2
- package/dist/routes/template.js +0 -4
- package/dist/runtime/artifact.d.ts +5 -5
- package/dist/runtime/artifact.js +7 -5
- 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 +82 -0
- package/dist/schema/installation/index.d.ts +2 -1
- package/dist/schema/installation/index.js +1 -1
- package/dist/schema/installation/introspection/codec.d.ts +5 -3
- package/dist/schema/installation/introspection/codec.js +319 -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 +84 -26
- package/dist/schema/installation/introspection/result.js +0 -1
- package/dist/schema/installation/result.d.ts +15 -0
- package/dist/schema/installation/result.js +1 -0
- package/package.json +23 -78
- 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.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.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.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.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 -31
- 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 -134
- 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 +0 -69
- 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 -181
- 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,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
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 {
|
|
1
|
+
import type { ReleaseDigest } from '../release/digest.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. */
|
|
@@ -6,8 +6,7 @@ export interface Stale {
|
|
|
6
6
|
readonly kind: 'stale';
|
|
7
7
|
readonly requestId: RequestId;
|
|
8
8
|
readonly invocation: InvocationId;
|
|
9
|
-
readonly current:
|
|
9
|
+
readonly current: ReleaseDigest;
|
|
10
10
|
}
|
|
11
11
|
export declare function decodeStale(input: unknown): Stale;
|
|
12
|
-
export declare function stale(requestId: RequestId, assigned: InvocationId, current:
|
|
13
|
-
//# sourceMappingURL=stale-route.d.ts.map
|
|
12
|
+
export declare function stale(requestId: RequestId, assigned: InvocationId, current: ReleaseDigest): Stale;
|
|
@@ -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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
|
|
2
|
+
/**
|
|
3
|
+
* The workflow engine a Kernel drives, as Domains discover it at
|
|
4
|
+
* `<issuer>/.well-known/astrale/workflow-engine.json`: the engine signs every request to a Domain with
|
|
5
|
+
* one of these Restate request identity keys. Several keys let the Host rotate without a gap.
|
|
6
|
+
*/
|
|
7
|
+
export interface WorkflowEngine {
|
|
8
|
+
readonly issuer: IssuerId;
|
|
9
|
+
readonly identity_keys: readonly [string, ...string[]];
|
|
10
|
+
}
|
|
11
|
+
/** Admit one Restate request identity key without imposing a key-set policy. */
|
|
12
|
+
export declare function acceptWorkflowEngineIdentityKey(input: unknown): string;
|
|
13
|
+
export declare function workflowEngine(issuer: string, identityKeys: readonly string[]): WorkflowEngine;
|
|
14
|
+
/**
|
|
15
|
+
* Admit a discovered engine for the expected issuer. Unlike issuer configuration, unknown fields are
|
|
16
|
+
* ignored: the Kernel may add some without breaking deployed Domains.
|
|
17
|
+
*/
|
|
18
|
+
export declare function acceptWorkflowEngine(input: unknown, expectedIssuer?: string): WorkflowEngine;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { fail } from './error.js';
|
|
2
|
+
import { acceptIssuer } from './url.js';
|
|
3
|
+
/** Restate's `publickeyv1_` id: base58btc of a raw Ed25519 public key. */
|
|
4
|
+
const IDENTITY_KEY = /^publickeyv1_[1-9A-HJ-NP-Za-km-z]{32,64}$/u;
|
|
5
|
+
const BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
6
|
+
const MAXIMUM_IDENTITY_KEYS = 8;
|
|
7
|
+
/** Admit one Restate request identity key without imposing a key-set policy. */
|
|
8
|
+
export function acceptWorkflowEngineIdentityKey(input) {
|
|
9
|
+
if (typeof input !== 'string' || !IDENTITY_KEY.test(input) || decodedKeyBytes(input) !== 32) {
|
|
10
|
+
fail('ISSUER_DISCOVERY_INVALID', 'Workflow engine identity keys are invalid.');
|
|
11
|
+
}
|
|
12
|
+
return input;
|
|
13
|
+
}
|
|
14
|
+
export function workflowEngine(issuer, identityKeys) {
|
|
15
|
+
return Object.freeze({
|
|
16
|
+
issuer: acceptIssuer(issuer),
|
|
17
|
+
identity_keys: acceptIdentityKeys(identityKeys),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Admit a discovered engine for the expected issuer. Unlike issuer configuration, unknown fields are
|
|
22
|
+
* ignored: the Kernel may add some without breaking deployed Domains.
|
|
23
|
+
*/
|
|
24
|
+
export function acceptWorkflowEngine(input, expectedIssuer) {
|
|
25
|
+
if (input === null || typeof input !== 'object' || Array.isArray(input)) {
|
|
26
|
+
fail('ISSUER_DISCOVERY_INVALID', 'Workflow engine discovery is invalid.');
|
|
27
|
+
}
|
|
28
|
+
const value = input;
|
|
29
|
+
const admitted = acceptIssuer(value.issuer);
|
|
30
|
+
if (expectedIssuer !== undefined && admitted !== acceptIssuer(expectedIssuer)) {
|
|
31
|
+
fail('ISSUER_DISCOVERY_MISMATCH', 'Workflow engine discovery does not match the issuer.');
|
|
32
|
+
}
|
|
33
|
+
return Object.freeze({ issuer: admitted, identity_keys: acceptIdentityKeys(value.identity_keys) });
|
|
34
|
+
}
|
|
35
|
+
function acceptIdentityKeys(input) {
|
|
36
|
+
if (!Array.isArray(input) ||
|
|
37
|
+
input.length === 0 ||
|
|
38
|
+
input.length > MAXIMUM_IDENTITY_KEYS ||
|
|
39
|
+
new Set(input).size !== input.length) {
|
|
40
|
+
fail('ISSUER_DISCOVERY_INVALID', 'Workflow engine identity keys are invalid.');
|
|
41
|
+
}
|
|
42
|
+
return Object.freeze(Array.from(input, acceptWorkflowEngineIdentityKey));
|
|
43
|
+
}
|
|
44
|
+
/** Base58 leading '1' digits represent zero bytes omitted by the integer value. */
|
|
45
|
+
function decodedKeyBytes(key) {
|
|
46
|
+
const encoded = key.slice('publickeyv1_'.length);
|
|
47
|
+
let value = 0n;
|
|
48
|
+
for (const digit of encoded)
|
|
49
|
+
value = value * 58n + BigInt(BASE58.indexOf(digit));
|
|
50
|
+
let bytes = 0;
|
|
51
|
+
for (; value > 0n; value >>= 8n)
|
|
52
|
+
bytes++;
|
|
53
|
+
for (const digit of encoded) {
|
|
54
|
+
if (digit !== '1')
|
|
55
|
+
break;
|
|
56
|
+
bytes++;
|
|
57
|
+
}
|
|
58
|
+
return bytes;
|
|
59
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { callableAddress, Key } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
2
|
-
import { exact, record } from '../content.js';
|
|
3
2
|
import { fail } from '../error.js';
|
|
3
|
+
import { exact, record } from '../shape.js';
|
|
4
4
|
import { acceptInvocationEndpoints } from './invocation.js';
|
|
5
5
|
export function admitCallableBinding(input, origin) {
|
|
6
|
-
const value = record(input, '
|
|
7
|
-
exact(value, ['callable', 'endpoint'], '
|
|
6
|
+
const value = record(input, 'RELEASE_BINDING_INVALID', 'Callable binding is invalid.');
|
|
7
|
+
exact(value, ['callable', 'endpoint'], 'RELEASE_BINDING_INVALID');
|
|
8
8
|
return Object.freeze({
|
|
9
9
|
callable: admitCallableKey(value.callable, origin),
|
|
10
10
|
endpoint: acceptInvocationEndpoints(value.endpoint),
|
|
@@ -17,19 +17,18 @@ export function admitCallableKey(input, origin) {
|
|
|
17
17
|
}
|
|
18
18
|
catch (cause) {
|
|
19
19
|
if (cause instanceof TypeError) {
|
|
20
|
-
return fail('
|
|
20
|
+
return fail('RELEASE_BINDING_INVALID', 'Callable key is invalid.', cause);
|
|
21
21
|
}
|
|
22
22
|
throw cause;
|
|
23
23
|
}
|
|
24
24
|
if (Key.origin(callable) !== origin) {
|
|
25
|
-
fail('
|
|
25
|
+
fail('RELEASE_BINDING_INVALID', 'Binding must name one callable owned by the root Domain.');
|
|
26
26
|
}
|
|
27
27
|
try {
|
|
28
28
|
callableAddress(callable);
|
|
29
29
|
}
|
|
30
30
|
catch (cause) {
|
|
31
|
-
return fail('
|
|
31
|
+
return fail('RELEASE_BINDING_INVALID', 'Binding must name one callable owned by the root Domain.', cause);
|
|
32
32
|
}
|
|
33
33
|
return callable;
|
|
34
34
|
}
|
|
35
|
-
//# sourceMappingURL=callable.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { admitCallableBinding, admitCallableKey, type CallableBinding } from './callable.js';
|
|
2
2
|
export { acceptInvocationEndpoints, type InvocationEndpoints } from './invocation.js';
|
|
3
3
|
export { admitViewBinding, type ViewBinding } from './view.js';
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|