@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,4 +1,4 @@
|
|
|
1
|
-
import { CONTENT_TYPE_JSON
|
|
1
|
+
import { CONTENT_TYPE_JSON } from '../../codecs/index.js';
|
|
2
2
|
import { admitSupportedCodecs } from '../binding-codecs.js';
|
|
3
3
|
const TOKEN = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u;
|
|
4
4
|
const QVALUE = /^(?:0(?:\.\d{0,3})?|1(?:\.0{0,3})?)$/u;
|
|
@@ -9,11 +9,7 @@ export function codecForContentType(contentType, supported) {
|
|
|
9
9
|
const mediaType = parseContentType(contentType);
|
|
10
10
|
if (mediaType === undefined)
|
|
11
11
|
return undefined;
|
|
12
|
-
const profile = mediaType === CONTENT_TYPE_JSON
|
|
13
|
-
? 'json'
|
|
14
|
-
: mediaType === CONTENT_TYPE_MSGPACK
|
|
15
|
-
? 'msgpack'
|
|
16
|
-
: undefined;
|
|
12
|
+
const profile = mediaType === CONTENT_TYPE_JSON ? 'json' : undefined;
|
|
17
13
|
return admitted.find((entry) => entry.profile === profile)?.codec;
|
|
18
14
|
}
|
|
19
15
|
export function negotiateResponseCodec(accept, requestCodec, supported) {
|
|
@@ -27,7 +23,7 @@ export function negotiateResponseCodec(accept, requestCodec, supported) {
|
|
|
27
23
|
if (ranges.length === 0)
|
|
28
24
|
return undefined;
|
|
29
25
|
const candidates = admitted.flatMap((entry) => {
|
|
30
|
-
const [type, subtype] =
|
|
26
|
+
const [type, subtype] = CONTENT_TYPE_JSON.split('/');
|
|
31
27
|
const governing = ranges
|
|
32
28
|
.filter((range) => range.mediaParameters === 0 &&
|
|
33
29
|
(range.type === '*' || range.type === type) &&
|
|
@@ -56,9 +52,6 @@ export function negotiateResponseCodec(accept, requestCodec, supported) {
|
|
|
56
52
|
});
|
|
57
53
|
return candidates[0]?.codec;
|
|
58
54
|
}
|
|
59
|
-
function contentTypeOf(profile) {
|
|
60
|
-
return profile === 'json' ? CONTENT_TYPE_JSON : CONTENT_TYPE_MSGPACK;
|
|
61
|
-
}
|
|
62
55
|
function parseContentType(input) {
|
|
63
56
|
if (splitOutsideQuotes(input, ',')?.length !== 1)
|
|
64
57
|
return undefined;
|
|
@@ -205,4 +198,3 @@ function splitOutsideQuotes(input, separator) {
|
|
|
205
198
|
parts.push(input.slice(start));
|
|
206
199
|
return parts;
|
|
207
200
|
}
|
|
208
|
-
//# sourceMappingURL=negotiation.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Request } from '../request.js';
|
|
2
|
+
export declare const REQUEST_ENVELOPE_FIELD: 'x-astrale-request';
|
|
3
|
+
export declare const BINARY_LENGTH_FIELD: 'x-astrale-binary-length';
|
|
4
|
+
export declare const BINARY_REQUEST_CONTENT_TYPE: 'application/octet-stream';
|
|
5
|
+
export declare const MAXIMUM_REQUEST_ENVELOPE_BYTES = 8192;
|
|
6
|
+
/** Decode one declared byte count: a canonical unsigned decimal within the safe integer range. */
|
|
7
|
+
export declare function decodeBinaryLength(input: string): number | undefined;
|
|
8
|
+
/** Encode one canonical V2 Request into the binary-request HTTP field. */
|
|
9
|
+
export declare function encodeBinaryRequestEnvelope(input: Request): string;
|
|
10
|
+
/** Decode one bounded base64url JSON V2 Request from the binary-request HTTP field. */
|
|
11
|
+
export declare function decodeBinaryRequestEnvelope(input: string | null): Request;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { json } from '../../codecs/index.js';
|
|
2
|
+
import { CODES, ProtocolError } from '../../errors/index.js';
|
|
3
|
+
import { decodeRequest } from '../request.js';
|
|
4
|
+
export const REQUEST_ENVELOPE_FIELD = 'x-astrale-request';
|
|
5
|
+
export const BINARY_LENGTH_FIELD = 'x-astrale-binary-length';
|
|
6
|
+
export const BINARY_REQUEST_CONTENT_TYPE = 'application/octet-stream';
|
|
7
|
+
export const MAXIMUM_REQUEST_ENVELOPE_BYTES = 8_192;
|
|
8
|
+
const BASE64URL = /^[A-Za-z0-9_-]+$/u;
|
|
9
|
+
const MAXIMUM_ENCODED_BYTES = Math.ceil(MAXIMUM_REQUEST_ENVELOPE_BYTES / 3) * 4;
|
|
10
|
+
const DECIMAL = /^(?:0|[1-9][0-9]*)$/u;
|
|
11
|
+
/** Decode one declared byte count: a canonical unsigned decimal within the safe integer range. */
|
|
12
|
+
export function decodeBinaryLength(input) {
|
|
13
|
+
if (!DECIMAL.test(input))
|
|
14
|
+
return undefined;
|
|
15
|
+
const length = Number(input);
|
|
16
|
+
return Number.isSafeInteger(length) ? length : undefined;
|
|
17
|
+
}
|
|
18
|
+
/** Encode one canonical V2 Request into the binary-request HTTP field. */
|
|
19
|
+
export function encodeBinaryRequestEnvelope(input) {
|
|
20
|
+
const request = decodeRequest(input);
|
|
21
|
+
const encoded = json.encode(request);
|
|
22
|
+
if (typeof encoded !== 'string')
|
|
23
|
+
throw new TypeError('JSON Request codec returned non-text output.');
|
|
24
|
+
const bytes = new TextEncoder().encode(encoded);
|
|
25
|
+
if (bytes.byteLength > MAXIMUM_REQUEST_ENVELOPE_BYTES)
|
|
26
|
+
return invalid();
|
|
27
|
+
return btoa(String.fromCharCode(...bytes))
|
|
28
|
+
.replaceAll('+', '-')
|
|
29
|
+
.replaceAll('/', '_')
|
|
30
|
+
.replace(/=+$/u, '');
|
|
31
|
+
}
|
|
32
|
+
/** Decode one bounded base64url JSON V2 Request from the binary-request HTTP field. */
|
|
33
|
+
export function decodeBinaryRequestEnvelope(input) {
|
|
34
|
+
if (input === null ||
|
|
35
|
+
input.length === 0 ||
|
|
36
|
+
input.length > MAXIMUM_ENCODED_BYTES ||
|
|
37
|
+
!BASE64URL.test(input)) {
|
|
38
|
+
return invalid();
|
|
39
|
+
}
|
|
40
|
+
let bytes;
|
|
41
|
+
try {
|
|
42
|
+
const binary = atob(input.replaceAll('-', '+').replaceAll('_', '/') + '='.repeat((4 - (input.length % 4)) % 4));
|
|
43
|
+
bytes = Uint8Array.from(binary, (character) => character.charCodeAt(0));
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return invalid();
|
|
47
|
+
}
|
|
48
|
+
if (bytes.byteLength > MAXIMUM_REQUEST_ENVELOPE_BYTES)
|
|
49
|
+
return invalid();
|
|
50
|
+
try {
|
|
51
|
+
// Require canonical base64url so alternate encodings cannot name the same envelope.
|
|
52
|
+
const canonical = btoa(String.fromCharCode(...bytes))
|
|
53
|
+
.replaceAll('+', '-')
|
|
54
|
+
.replaceAll('/', '_')
|
|
55
|
+
.replace(/=+$/u, '');
|
|
56
|
+
if (canonical !== input)
|
|
57
|
+
return invalid();
|
|
58
|
+
return decodeRequest(json.decode(bytes));
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return invalid();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function invalid() {
|
|
65
|
+
throw new ProtocolError({
|
|
66
|
+
code: CODES.INVALID_REQUEST,
|
|
67
|
+
message: 'HTTP binary Request envelope is invalid.',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
@@ -3,4 +3,3 @@ import type { StreamFrame } from '../stream.js';
|
|
|
3
3
|
export declare const STREAM_FRAMING_FIELD: 'x-astrale-stream-framing';
|
|
4
4
|
export declare const LENGTH_PREFIX_V1: 'length-prefix-v1';
|
|
5
5
|
export declare function encodeStreamFrame(codec: Codec, frame: StreamFrame): Uint8Array;
|
|
6
|
-
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -4,4 +4,3 @@ export declare const TRACESTATE_FIELD = "tracestate";
|
|
|
4
4
|
export declare const BAGGAGE_FIELD = "baggage";
|
|
5
5
|
export declare function decodeTraceHeaders(traceparent: string | null, tracestate: string | null): Trace | undefined;
|
|
6
6
|
export declare function encodeTraceHeaders(carrier: Trace | undefined): Readonly<Record<string, string>>;
|
|
7
|
-
//# sourceMappingURL=trace.d.ts.map
|
|
@@ -8,4 +8,3 @@ export declare const MAXIMUM_IDEMPOTENCY_KEY_LENGTH = 128;
|
|
|
8
8
|
/** Admit an opaque URL-safe ASCII key without assigning it semantic structure. */
|
|
9
9
|
export declare function acceptIdempotencyKey(input: unknown, label?: string): IdempotencyKey;
|
|
10
10
|
export {};
|
|
11
|
-
//# sourceMappingURL=idempotency.d.ts.map
|
|
@@ -14,4 +14,3 @@ export declare class InvocationError extends TypeError {
|
|
|
14
14
|
export declare function acceptInvocationId(input: unknown): InvocationId;
|
|
15
15
|
/** Compare both canonical coordinate fields exactly. */
|
|
16
16
|
export declare function sameInvocationId(left: InvocationId, right: InvocationId): boolean;
|
|
17
|
-
//# sourceMappingURL=identity.d.ts.map
|
|
@@ -5,17 +5,19 @@ export { acceptIdempotencyKey, HTTP_IDEMPOTENCY_KEY, MAXIMUM_IDEMPOTENCY_KEY_LEN
|
|
|
5
5
|
export { acceptInvocationId, InvocationError, MAXIMUM_INVOCATION_ID_LENGTH, sameInvocationId, type InvocationId, } from './identity.js';
|
|
6
6
|
export * as http from './http/index.js';
|
|
7
7
|
export { acceptDelegate, type Delegate } from './delegate.js';
|
|
8
|
+
export type { PublicationBindingInput, PublicationVia } from './legacy/index.js';
|
|
9
|
+
/** @deprecated The legacy routed witness every Kernel emits until the breaking release (AM-1). */
|
|
10
|
+
export * as legacy from './legacy/index.js';
|
|
8
11
|
export { decodeMiss, miss, type Miss } from './miss.js';
|
|
9
12
|
export { acceptRoute, acceptRedirection, decodeRedirectResponse, remoteRoute, type RemoteBindingInput, type Redirection, type RedirectResponse, type Route, } from './redirect.js';
|
|
10
13
|
export { decodeRequest, type Request } from './request.js';
|
|
11
14
|
export { admitTrace, MAXIMUM_TRACEPARENT_BYTES, MAXIMUM_TRACESTATE_BYTES, MAXIMUM_TRACESTATE_MEMBERS, type Trace, } from './trace.js';
|
|
12
|
-
export { acceptRouting, type Refresh, type Routing, type Via } from './routing.js';
|
|
15
|
+
export { acceptRouting, routedDigest, routedRevision, type Refresh, type Routing, type Via, } from './routing.js';
|
|
13
16
|
export { acceptSchemaTarget, type SchemaTarget } from './schema.js';
|
|
14
17
|
export { decodeResponse, type ErrorResponse, type Response, type ResponseContext, type SuccessResponse, } from './response.js';
|
|
15
|
-
export {
|
|
18
|
+
export { CALLABLE_FINGERPRINT_MISMATCH, DEPLOYMENT_RETIRED, SERVICE_CANDIDATE_INVALID, SERVICE_TRUST_REQUIRED, SERVICE_UNAVAILABLE, serviceErrorOf, type CallableFingerprintMismatchDetails, type CallableFingerprintMismatchReason, type DeploymentRetiredDetails, type DeploymentRetiredReason, type ServiceCandidateInvalidDetails, type ServiceCandidateInvalidReason, type ServiceErrorPayload, type ServiceReason, type ServiceTrustRequiredDetails, type ServiceTrustRequiredReason, type ServiceUnavailableDetails, type ServiceUnavailableReason, } from './service-reason.js';
|
|
16
19
|
export { decodeStale, stale, type Stale } from './stale-route.js';
|
|
17
20
|
export { decodeStreamFrame, type StreamEndFrame, type StreamErrorFrame, type StreamFrame, type StreamItemFrame, type StreamStartFrame, } from './stream.js';
|
|
18
|
-
export { acceptCall, type Call } from './target.js';
|
|
21
|
+
export { Target, targetPath, acceptCall, type Call } from './target.js';
|
|
19
22
|
export { VERSION, type Version } from './version.js';
|
|
20
23
|
export * as websocket from './websocket/index.js';
|
|
21
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/invocation/index.js
CHANGED
|
@@ -5,17 +5,18 @@ export { acceptIdempotencyKey, HTTP_IDEMPOTENCY_KEY, MAXIMUM_IDEMPOTENCY_KEY_LEN
|
|
|
5
5
|
export { acceptInvocationId, InvocationError, MAXIMUM_INVOCATION_ID_LENGTH, sameInvocationId, } from './identity.js';
|
|
6
6
|
export * as http from './http/index.js';
|
|
7
7
|
export { acceptDelegate } from './delegate.js';
|
|
8
|
+
/** @deprecated The legacy routed witness every Kernel emits until the breaking release (AM-1). */
|
|
9
|
+
export * as legacy from './legacy/index.js';
|
|
8
10
|
export { decodeMiss, miss } from './miss.js';
|
|
9
11
|
export { acceptRoute, acceptRedirection, decodeRedirectResponse, remoteRoute, } from './redirect.js';
|
|
10
12
|
export { decodeRequest } from './request.js';
|
|
11
13
|
export { admitTrace, MAXIMUM_TRACEPARENT_BYTES, MAXIMUM_TRACESTATE_BYTES, MAXIMUM_TRACESTATE_MEMBERS, } from './trace.js';
|
|
12
|
-
export { acceptRouting } from './routing.js';
|
|
14
|
+
export { acceptRouting, routedDigest, routedRevision, } from './routing.js';
|
|
13
15
|
export { acceptSchemaTarget } from './schema.js';
|
|
14
16
|
export { decodeResponse, } from './response.js';
|
|
15
|
-
export {
|
|
17
|
+
export { CALLABLE_FINGERPRINT_MISMATCH, DEPLOYMENT_RETIRED, SERVICE_CANDIDATE_INVALID, SERVICE_TRUST_REQUIRED, SERVICE_UNAVAILABLE, serviceErrorOf, } from './service-reason.js';
|
|
16
18
|
export { decodeStale, stale } from './stale-route.js';
|
|
17
19
|
export { decodeStreamFrame, } from './stream.js';
|
|
18
|
-
export { acceptCall } from './target.js';
|
|
20
|
+
export { Target, targetPath, acceptCall } from './target.js';
|
|
19
21
|
export { VERSION } from './version.js';
|
|
20
22
|
export * as websocket from './websocket/index.js';
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A source `Delegate` may still carry `attenuation` with the self expression
|
|
3
|
+
* `{ kind: 'identity', self: true }`, the one value published Clients and SDK Workers send. It names
|
|
4
|
+
* the caller every Delegate preserves anyway, so `acceptDelegate` drops it and returns the same
|
|
5
|
+
* `Delegate` as without it. Every other value, `undefined` and `null` included, stays refused.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated Omit `attenuation`; a Delegate always preserves the authenticated caller (ADR-3).
|
|
8
|
+
*
|
|
9
|
+
* Short-term consumers: Domain Workers built with `@astrale-os/sdk` 0.6.0-beta.0 to beta.3, whose
|
|
10
|
+
* `Function.admit` callback sends it (the Shell v3 Worker included), and callers that pass it in
|
|
11
|
+
* `delegate` to `@astrale-os/kernel-client` 0.6.0-beta.85 or earlier.
|
|
12
|
+
*
|
|
13
|
+
* Removal, in a separate breaking release, once those Workers are redeployed with a later SDK and
|
|
14
|
+
* every consumer runs a Client that omits the field: delete this file, its call in `../delegate.ts`
|
|
15
|
+
* and its vectors in INVOCATION-DELEGATE-OMISSION-EVIDENCE.
|
|
16
|
+
*/
|
|
17
|
+
export declare function withoutSelfAttenuation(object: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A source `Delegate` may still carry `attenuation` with the self expression
|
|
3
|
+
* `{ kind: 'identity', self: true }`, the one value published Clients and SDK Workers send. It names
|
|
4
|
+
* the caller every Delegate preserves anyway, so `acceptDelegate` drops it and returns the same
|
|
5
|
+
* `Delegate` as without it. Every other value, `undefined` and `null` included, stays refused.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated Omit `attenuation`; a Delegate always preserves the authenticated caller (ADR-3).
|
|
8
|
+
*
|
|
9
|
+
* Short-term consumers: Domain Workers built with `@astrale-os/sdk` 0.6.0-beta.0 to beta.3, whose
|
|
10
|
+
* `Function.admit` callback sends it (the Shell v3 Worker included), and callers that pass it in
|
|
11
|
+
* `delegate` to `@astrale-os/kernel-client` 0.6.0-beta.85 or earlier.
|
|
12
|
+
*
|
|
13
|
+
* Removal, in a separate breaking release, once those Workers are redeployed with a later SDK and
|
|
14
|
+
* every consumer runs a Client that omits the field: delete this file, its call in `../delegate.ts`
|
|
15
|
+
* and its vectors in INVOCATION-DELEGATE-OMISSION-EVIDENCE.
|
|
16
|
+
*/
|
|
17
|
+
export function withoutSelfAttenuation(object) {
|
|
18
|
+
if (!Object.hasOwn(object, 'attenuation') || !isSelf(object.attenuation))
|
|
19
|
+
return object;
|
|
20
|
+
const { attenuation: _self, ...rest } = object;
|
|
21
|
+
return rest;
|
|
22
|
+
}
|
|
23
|
+
function isSelf(value) {
|
|
24
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value))
|
|
25
|
+
return false;
|
|
26
|
+
const prototype = Object.getPrototypeOf(value);
|
|
27
|
+
if (prototype !== Object.prototype && prototype !== null)
|
|
28
|
+
return false;
|
|
29
|
+
if (Reflect.ownKeys(value).length !== 2)
|
|
30
|
+
return false;
|
|
31
|
+
const kind = Object.getOwnPropertyDescriptor(value, 'kind');
|
|
32
|
+
const self = Object.getOwnPropertyDescriptor(value, 'self');
|
|
33
|
+
return (kind?.enumerable === true &&
|
|
34
|
+
kind.value === 'identity' &&
|
|
35
|
+
self?.enumerable === true &&
|
|
36
|
+
self.value === true);
|
|
37
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Publication-based routing, retained for v2/v3 pins and frozen v3 projections of v4 pins.
|
|
3
|
+
* The Kernel emits this shape while decoders also accept release-based `Via`.
|
|
4
|
+
* Superseded by `Via` and `remoteRoute` from `@astrale-os/kernel-protocol/invocation`.
|
|
5
|
+
*
|
|
6
|
+
* Short-term consumers:
|
|
7
|
+
* - the Runtime redirect (`runtime/functions/runtime.ts`), the Kernel's only emitter until the
|
|
8
|
+
* breaking release (AM-1, CT5-E), because every client and View built before K5 decodes only
|
|
9
|
+
* this shape: the pinned document's own reference for a v2/v3 pin, the frozen v3 projection's
|
|
10
|
+
* for a v4 pin. The breaking release switches v4 pins to `remoteRoute`; v2/v3 pins keep this;
|
|
11
|
+
* - servers built from a v2/v3 Publication, which admit only this shape (the SDK's `requireVia`,
|
|
12
|
+
* the Server's `HandlerRequest.via`).
|
|
13
|
+
*
|
|
14
|
+
* Removal, in a separate breaking release: the conditions of `protocol/release/legacy/index.ts`
|
|
15
|
+
* hold (no installation pins a v2/v3 document) and every supported client relays `Via`. Then
|
|
16
|
+
* delete, in the same PR:
|
|
17
|
+
* - this folder, the `legacy` namespace of `invocation/index.ts` and its `PublicationVia` and
|
|
18
|
+
* `PublicationBindingInput` type exports;
|
|
19
|
+
* - the `publication` branch of `acceptVia` and of `routedRevision`/`routedDigest` in `routing.ts`;
|
|
20
|
+
* - the `PublicationVia` member of `Routing` (`routing.ts`) and of `Route.via` (`redirect.ts`);
|
|
21
|
+
* - the `PublicationVia` member of `routes.Invocation.routing` (`routes/request.ts`) and of the
|
|
22
|
+
* Server's `HandlerRequest.via` (`server/invocation/types.ts`), with the refusal of a release
|
|
23
|
+
* `Via` at a Publication-backed destination (law SV-PUBLICATION-ADMITS-LEGACY-VIA);
|
|
24
|
+
* - the legacy vectors of TEST-VIA-NAMES-EXACTLY-ONE-REFERENCE, and the Runtime redirect's last
|
|
25
|
+
* `legacy.remoteRoute` call with its dispatch test;
|
|
26
|
+
* - `PublicationVia` and `Route.via` from law PROTOCOL-LEGACY-WIRE-FIELDS and its test.
|
|
27
|
+
*/
|
|
28
|
+
export { remoteRoute } from './route.js';
|
|
29
|
+
export type { PublicationBindingInput, PublicationVia } from './via.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Publication-based routing, retained for v2/v3 pins and frozen v3 projections of v4 pins.
|
|
3
|
+
* The Kernel emits this shape while decoders also accept release-based `Via`.
|
|
4
|
+
* Superseded by `Via` and `remoteRoute` from `@astrale-os/kernel-protocol/invocation`.
|
|
5
|
+
*
|
|
6
|
+
* Short-term consumers:
|
|
7
|
+
* - the Runtime redirect (`runtime/functions/runtime.ts`), the Kernel's only emitter until the
|
|
8
|
+
* breaking release (AM-1, CT5-E), because every client and View built before K5 decodes only
|
|
9
|
+
* this shape: the pinned document's own reference for a v2/v3 pin, the frozen v3 projection's
|
|
10
|
+
* for a v4 pin. The breaking release switches v4 pins to `remoteRoute`; v2/v3 pins keep this;
|
|
11
|
+
* - servers built from a v2/v3 Publication, which admit only this shape (the SDK's `requireVia`,
|
|
12
|
+
* the Server's `HandlerRequest.via`).
|
|
13
|
+
*
|
|
14
|
+
* Removal, in a separate breaking release: the conditions of `protocol/release/legacy/index.ts`
|
|
15
|
+
* hold (no installation pins a v2/v3 document) and every supported client relays `Via`. Then
|
|
16
|
+
* delete, in the same PR:
|
|
17
|
+
* - this folder, the `legacy` namespace of `invocation/index.ts` and its `PublicationVia` and
|
|
18
|
+
* `PublicationBindingInput` type exports;
|
|
19
|
+
* - the `publication` branch of `acceptVia` and of `routedRevision`/`routedDigest` in `routing.ts`;
|
|
20
|
+
* - the `PublicationVia` member of `Routing` (`routing.ts`) and of `Route.via` (`redirect.ts`);
|
|
21
|
+
* - the `PublicationVia` member of `routes.Invocation.routing` (`routes/request.ts`) and of the
|
|
22
|
+
* Server's `HandlerRequest.via` (`server/invocation/types.ts`), with the refusal of a release
|
|
23
|
+
* `Via` at a Publication-backed destination (law SV-PUBLICATION-ADMITS-LEGACY-VIA);
|
|
24
|
+
* - the legacy vectors of TEST-VIA-NAMES-EXACTLY-ONE-REFERENCE, and the Runtime redirect's last
|
|
25
|
+
* `legacy.remoteRoute` call with its dispatch test;
|
|
26
|
+
* - `PublicationVia` and `Route.via` from law PROTOCOL-LEGACY-WIRE-FIELDS and its test.
|
|
27
|
+
*/
|
|
28
|
+
export { remoteRoute } from './route.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
|
|
2
|
+
import type { Key } from '@astrale-os/kernel-dsl/v1';
|
|
3
|
+
import type { Route } from '../redirect.js';
|
|
4
|
+
import type { PublicationBindingInput } from './via.js';
|
|
5
|
+
/**
|
|
6
|
+
* Project one remote binding into the route every Kernel emits until the breaking release (AM-1):
|
|
7
|
+
* a `PublicationVia` naming the v3 reference, the pinned document's own for a legacy pin and the
|
|
8
|
+
* frozen projection's for a v4 pin. It reads only the binding's Publication coordinates, so a
|
|
9
|
+
* binding that also carries a release digest still projects to its v3 reference.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Successor: `remoteRoute`, which projects a release binding to `Via`; the breaking
|
|
12
|
+
* release calls it instead.
|
|
13
|
+
*/
|
|
14
|
+
export declare function remoteRoute(origin: Key.Origin, binding: PublicationBindingInput, issuer: IssuerId): Route;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { acceptRoute } from '../redirect.js';
|
|
2
|
+
/**
|
|
3
|
+
* Project one remote binding into the route every Kernel emits until the breaking release (AM-1):
|
|
4
|
+
* a `PublicationVia` naming the v3 reference, the pinned document's own for a legacy pin and the
|
|
5
|
+
* frozen projection's for a v4 pin. It reads only the binding's Publication coordinates, so a
|
|
6
|
+
* binding that also carries a release digest still projects to its v3 reference.
|
|
7
|
+
*
|
|
8
|
+
* @deprecated Successor: `remoteRoute`, which projects a release binding to `Via`; the breaking
|
|
9
|
+
* release calls it instead.
|
|
10
|
+
*/
|
|
11
|
+
export function remoteRoute(origin, binding, issuer) {
|
|
12
|
+
return acceptRoute({
|
|
13
|
+
endpoint: binding.endpoint,
|
|
14
|
+
via: {
|
|
15
|
+
kind: 'via',
|
|
16
|
+
publication: {
|
|
17
|
+
origin,
|
|
18
|
+
identity: { issuer: binding.issuer, subject: binding.subject },
|
|
19
|
+
revision: binding.revision,
|
|
20
|
+
etag: binding.etag,
|
|
21
|
+
},
|
|
22
|
+
issuer,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
|
|
2
|
+
import type { InvocationEndpoints } from '../../release/bindings/invocation.js';
|
|
3
|
+
import type { Etag } from '../../release/legacy/etag.js';
|
|
4
|
+
import type { PublicationRef } from '../../release/legacy/reference.js';
|
|
5
|
+
/**
|
|
6
|
+
* Routed witness of a legacy pin, or of the v3 projection of a v4 pin: the reference keeps its
|
|
7
|
+
* Publication meaning (origin, identity, schema revision, Publication ETag).
|
|
8
|
+
*
|
|
9
|
+
* @deprecated Successor: `Via.release`, emitted by the breaking release (AM-1).
|
|
10
|
+
*/
|
|
11
|
+
export interface PublicationVia {
|
|
12
|
+
readonly kind: 'via';
|
|
13
|
+
readonly publication: PublicationRef;
|
|
14
|
+
readonly issuer: IssuerId;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Remote binding of a legacy pin, or of a v4 pin projected to its v3 Publication: the endpoint
|
|
18
|
+
* and the Publication reference coordinates the Kernel routes it with.
|
|
19
|
+
*
|
|
20
|
+
* @deprecated Successor: `RemoteBindingInput`, which carries the release digest.
|
|
21
|
+
*/
|
|
22
|
+
export interface PublicationBindingInput {
|
|
23
|
+
readonly endpoint: InvocationEndpoints;
|
|
24
|
+
readonly issuer: IssuerId;
|
|
25
|
+
readonly subject: string;
|
|
26
|
+
readonly revision: PublicationRef['revision'];
|
|
27
|
+
readonly etag: Etag;
|
|
28
|
+
}
|
|
29
|
+
/** Admit the Publication reference of one received `PublicationVia`. */
|
|
30
|
+
export declare function acceptPublicationReference(input: unknown, label: string): PublicationRef;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PublicationError } from '../../release/legacy/error.js';
|
|
2
|
+
import { acceptReference } from '../../release/legacy/reference.js';
|
|
3
|
+
import { invalid } from '../admission.js';
|
|
4
|
+
/** Admit the Publication reference of one received `PublicationVia`. */
|
|
5
|
+
export function acceptPublicationReference(input, label) {
|
|
6
|
+
try {
|
|
7
|
+
return acceptReference(input);
|
|
8
|
+
}
|
|
9
|
+
catch (cause) {
|
|
10
|
+
if (cause instanceof PublicationError) {
|
|
11
|
+
return invalid(`${label} is invalid: ${cause.message}`);
|
|
12
|
+
}
|
|
13
|
+
throw cause;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/dist/invocation/miss.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import type { IssuerId } from '@astrale-os/kernel-core/auth/issuer';
|
|
2
|
-
import type { Key } from '@astrale-os/kernel-dsl/v1';
|
|
3
|
-
import type { InvocationEndpoints } from '../
|
|
4
|
-
import type {
|
|
5
|
-
import type { PublicationRef } from '../publication/reference.js';
|
|
2
|
+
import type { Key, Revision } from '@astrale-os/kernel-dsl/v1';
|
|
3
|
+
import type { InvocationEndpoints } from '../release/bindings/invocation.js';
|
|
4
|
+
import type { ReleaseDigest } from '../release/digest.js';
|
|
6
5
|
import type { RequestId } from './correlation.js';
|
|
7
6
|
import type { InvocationId } from './identity.js';
|
|
7
|
+
import type { PublicationVia } from './legacy/via.js';
|
|
8
|
+
import type { Via } from './routing.js';
|
|
8
9
|
import type { Trace } from './trace.js';
|
|
9
10
|
export interface Route {
|
|
10
11
|
readonly endpoint: InvocationEndpoints;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Routed witness of the installed release. Its `PublicationVia` shape is deprecated (legacy
|
|
14
|
+
* pins and the v3 projection of v4 pins); successor: `Via`, emitted by the breaking release
|
|
15
|
+
* (AM-1).
|
|
16
|
+
*/
|
|
17
|
+
readonly via: Via | PublicationVia;
|
|
16
18
|
}
|
|
17
19
|
export interface Redirection {
|
|
18
20
|
readonly route: Route;
|
|
@@ -26,16 +28,16 @@ export interface RedirectResponse {
|
|
|
26
28
|
readonly invocation: InvocationId;
|
|
27
29
|
readonly redirect: Redirection;
|
|
28
30
|
}
|
|
31
|
+
/** Remote binding of one installed release: the endpoint and the release it routes to. */
|
|
29
32
|
export interface RemoteBindingInput {
|
|
30
33
|
readonly endpoint: InvocationEndpoints;
|
|
31
34
|
readonly issuer: IssuerId;
|
|
32
35
|
readonly subject: string;
|
|
33
|
-
readonly revision:
|
|
34
|
-
readonly
|
|
36
|
+
readonly revision: Revision;
|
|
37
|
+
readonly release: ReleaseDigest;
|
|
35
38
|
}
|
|
36
39
|
export declare function acceptRoute(input: unknown): Route;
|
|
37
|
-
/** Project
|
|
40
|
+
/** Project an installed release binding into a release `Via`; legacy emitters use `legacy.remoteRoute`. */
|
|
38
41
|
export declare function remoteRoute(origin: Key.Origin, binding: RemoteBindingInput, issuer: IssuerId): Route;
|
|
39
42
|
export declare function acceptRedirection(input: unknown): Redirection;
|
|
40
43
|
export declare function decodeRedirectResponse(input: unknown): RedirectResponse;
|
|
41
|
-
//# sourceMappingURL=redirect.d.ts.map
|
|
@@ -1,30 +1,18 @@
|
|
|
1
|
-
import { acceptInvocationEndpoints } from '../
|
|
2
|
-
import { PublicationError } from '../
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { acceptInvocationEndpoints } from '../release/legacy/bindings.js';
|
|
2
|
+
import { PublicationError } from '../release/legacy/error.js';
|
|
3
|
+
import { exactFields, invalid, invocation, portableObject, requestId, required, string, } from './admission.js';
|
|
4
|
+
import { acceptVia } from './routing.js';
|
|
5
5
|
import { admitTrace } from './trace.js';
|
|
6
6
|
const ROUTE_FIELDS = new Set(['endpoint', 'via']);
|
|
7
|
-
const VIA_FIELDS = new Set(['kind', 'publication', 'issuer']);
|
|
8
7
|
const REDIRECTION_FIELDS = new Set(['route', 'credential', 'trace']);
|
|
9
8
|
const REDIRECT_RESPONSE_FIELDS = new Set(['kind', 'requestId', 'invocation', 'redirect']);
|
|
10
9
|
export function acceptRoute(input) {
|
|
11
10
|
const object = portableObject(input, 'route');
|
|
12
11
|
exactFields(object, ROUTE_FIELDS, 'route');
|
|
13
12
|
required(object, ['endpoint', 'via'], 'route');
|
|
13
|
+
const via = acceptVia(portableObject(object.via, 'route.via'), 'route.via');
|
|
14
14
|
try {
|
|
15
|
-
|
|
16
|
-
exactFields(via, VIA_FIELDS, 'route.via');
|
|
17
|
-
required(via, ['kind', 'publication', 'issuer'], 'route.via');
|
|
18
|
-
if (via.kind !== 'via')
|
|
19
|
-
invalid('route.via.kind must be "via"');
|
|
20
|
-
return Object.freeze({
|
|
21
|
-
endpoint: acceptInvocationEndpoints(object.endpoint),
|
|
22
|
-
via: Object.freeze({
|
|
23
|
-
kind: 'via',
|
|
24
|
-
publication: acceptReference(via.publication),
|
|
25
|
-
issuer: issuerId(via.issuer, 'route.via.issuer'),
|
|
26
|
-
}),
|
|
27
|
-
});
|
|
15
|
+
return Object.freeze({ endpoint: acceptInvocationEndpoints(object.endpoint), via });
|
|
28
16
|
}
|
|
29
17
|
catch (cause) {
|
|
30
18
|
if (cause instanceof PublicationError) {
|
|
@@ -33,17 +21,17 @@ export function acceptRoute(input) {
|
|
|
33
21
|
throw cause;
|
|
34
22
|
}
|
|
35
23
|
}
|
|
36
|
-
/** Project
|
|
24
|
+
/** Project an installed release binding into a release `Via`; legacy emitters use `legacy.remoteRoute`. */
|
|
37
25
|
export function remoteRoute(origin, binding, issuer) {
|
|
38
26
|
return acceptRoute({
|
|
39
27
|
endpoint: binding.endpoint,
|
|
40
28
|
via: {
|
|
41
29
|
kind: 'via',
|
|
42
|
-
|
|
30
|
+
release: {
|
|
43
31
|
origin,
|
|
44
32
|
identity: { issuer: binding.issuer, subject: binding.subject },
|
|
45
33
|
revision: binding.revision,
|
|
46
|
-
|
|
34
|
+
digest: binding.release,
|
|
47
35
|
},
|
|
48
36
|
issuer,
|
|
49
37
|
},
|
|
@@ -79,4 +67,3 @@ export function decodeRedirectResponse(input) {
|
|
|
79
67
|
redirect: acceptRedirection(object.redirect),
|
|
80
68
|
});
|
|
81
69
|
}
|
|
82
|
-
//# sourceMappingURL=redirect.js.map
|
|
@@ -3,7 +3,7 @@ import { acceptDelegate } from './delegate.js';
|
|
|
3
3
|
import { acceptIdempotencyKey } from './idempotency.js';
|
|
4
4
|
import { acceptRouting } from './routing.js';
|
|
5
5
|
import { acceptSchemaTarget } from './schema.js';
|
|
6
|
-
import {
|
|
6
|
+
import { callFromSnapshot } from './target.js';
|
|
7
7
|
import { admitTrace } from './trace.js';
|
|
8
8
|
const REQUEST_FIELDS = new Set([
|
|
9
9
|
'version',
|
|
@@ -39,7 +39,7 @@ export function decodeRequest(input) {
|
|
|
39
39
|
return Object.freeze({
|
|
40
40
|
version: 2,
|
|
41
41
|
requestId: requestId(object.requestId, 'request.requestId'),
|
|
42
|
-
call:
|
|
42
|
+
call: callFromSnapshot(object.call),
|
|
43
43
|
...(credential === undefined ? {} : { credential }),
|
|
44
44
|
...(delegate === undefined ? {} : { delegate }),
|
|
45
45
|
...(routing === undefined ? {} : { routing }),
|
|
@@ -52,4 +52,3 @@ export function decodeRequest(input) {
|
|
|
52
52
|
...(trace === undefined ? {} : { trace }),
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
//# sourceMappingURL=request.js.map
|
|
@@ -17,4 +17,3 @@ export interface ErrorResponse extends ResponseContext {
|
|
|
17
17
|
}
|
|
18
18
|
export type Response<Result extends Value = Value> = SuccessResponse<Result> | ErrorResponse | RedirectResponse | Stale | Miss;
|
|
19
19
|
export declare function decodeResponse(input: unknown): Response;
|
|
20
|
-
//# sourceMappingURL=response.d.ts.map
|