@astrale-os/kernel-core 0.9.0-beta.9 → 0.9.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/auth/authority/accept.js +4 -0
- package/dist/auth/authority/admission/admission.d.ts +4 -1
- package/dist/auth/authority/admission/admission.js +46 -147
- package/dist/auth/authority/admission/index.d.ts +1 -1
- package/dist/auth/authority/admission/index.js +1 -1
- package/dist/auth/authority/admission/references.d.ts +13 -0
- package/dist/auth/authority/admission/references.js +38 -0
- package/dist/auth/authority/admission/term.d.ts +6 -0
- package/dist/auth/authority/admission/term.js +60 -0
- package/dist/auth/authority/admission/wire.d.ts +8 -0
- package/dist/auth/authority/admission/wire.js +33 -0
- package/dist/auth/authority/canonical.d.ts +2 -0
- package/dist/auth/authority/canonical.js +15 -0
- package/dist/auth/authority/index.d.ts +9 -2
- package/dist/auth/authority/index.js +6 -1
- package/dist/auth/authority/language/index.d.ts +3 -1
- package/dist/auth/authority/language/index.js +1 -0
- package/dist/auth/authority/language/predicate.d.ts +31 -16
- package/dist/auth/authority/language/predicate.js +1 -1
- package/dist/auth/authority/language/program.d.ts +21 -0
- package/dist/auth/authority/language/program.js +2 -0
- package/dist/auth/authority/normalization/index.d.ts +1 -1
- package/dist/auth/authority/normalization/index.js +1 -1
- package/dist/auth/authority/normalization/normalize.d.ts +2 -0
- package/dist/auth/authority/normalization/normalize.js +38 -16
- package/dist/auth/authority/ownership.optimization.d.ts +8 -0
- package/dist/auth/authority/ownership.optimization.js +83 -0
- package/dist/auth/authority/prepare-binder-body.d.ts +4 -0
- package/dist/auth/authority/prepare-binder-body.js +31 -0
- package/dist/auth/authority/program.d.ts +28 -0
- package/dist/auth/authority/program.js +191 -0
- package/dist/auth/authority/semantics/class-authority.d.ts +8 -0
- package/dist/auth/authority/semantics/class-authority.js +26 -0
- package/dist/auth/authority/semantics/composition.d.ts +46 -0
- package/dist/auth/authority/semantics/composition.js +150 -0
- package/dist/auth/authority/semantics/failure.d.ts +21 -0
- package/dist/auth/authority/semantics/failure.js +10 -0
- package/dist/auth/authority/semantics/index.d.ts +13 -0
- package/dist/auth/authority/semantics/index.js +6 -0
- package/dist/auth/authority/semantics/interpret.d.ts +41 -0
- package/dist/auth/authority/semantics/interpret.js +388 -0
- package/dist/auth/authority/semantics/residual.d.ts +32 -0
- package/dist/auth/authority/semantics/residual.js +166 -0
- package/dist/auth/authority/semantics/snapshot.d.ts +40 -0
- package/dist/auth/authority/semantics/terms.d.ts +22 -0
- package/dist/auth/authority/semantics/terms.js +96 -0
- package/dist/auth/authority/semantics/vocabulary.d.ts +19 -0
- package/dist/auth/context/context.d.ts +4 -3
- package/dist/auth/expression/authoring/builder.d.ts +2 -11
- package/dist/auth/expression/authoring/builder.js +1 -45
- package/dist/auth/expression/authoring/index.d.ts +1 -1
- package/dist/auth/expression/authoring/index.js +1 -1
- package/dist/auth/expression/index.d.ts +1 -2
- package/dist/auth/expression/index.js +1 -2
- package/dist/auth/expression/language/identity-expression.d.ts +2 -22
- package/dist/auth/grant/index.d.ts +1 -1
- package/dist/auth/grant/index.js +1 -1
- package/dist/auth/grant/resolved/admission.d.ts +4 -3
- package/dist/auth/grant/resolved/admission.js +23 -13
- package/dist/auth/grant/resolved/grant.d.ts +1 -1
- package/dist/auth/grant/resolved/index.d.ts +1 -1
- package/dist/auth/grant/resolved/index.js +1 -1
- package/dist/auth/grant/unresolved/admission.d.ts +4 -1
- package/dist/auth/grant/unresolved/admission.js +27 -67
- package/dist/auth/grant/unresolved/limits.d.ts +2 -4
- package/dist/auth/grant/unresolved/limits.js +1 -5
- package/dist/auth/identity/admission.js +11 -3
- package/dist/auth/identity/identity.d.ts +15 -3
- package/dist/auth/identity/index.d.ts +1 -1
- package/dist/auth/index.d.ts +4 -4
- package/dist/auth/index.js +1 -1
- package/dist/auth/jwk/index.d.ts +1 -1
- package/dist/auth/jwk/index.js +1 -1
- package/dist/auth/jwk/thumbprint.d.ts +2 -0
- package/dist/auth/jwk/thumbprint.js +12 -6
- package/dist/auth/register/fingerprint/fingerprint.d.ts +25 -0
- package/dist/auth/register/fingerprint/fingerprint.js +31 -0
- package/dist/auth/register/fingerprint/index.d.ts +2 -0
- package/dist/auth/register/index.d.ts +5 -0
- package/dist/auth/register/request/admission.d.ts +3 -0
- package/dist/auth/register/request/admission.js +103 -0
- package/dist/auth/register/request/index.d.ts +3 -0
- package/dist/auth/register/request/limits.d.ts +6 -0
- package/dist/auth/register/request/limits.js +6 -0
- package/dist/auth/register/request/request.d.ts +19 -0
- package/dist/auth/{provision → register}/request/self-issuer.d.ts +1 -1
- package/dist/auth/{provision → register}/request/self-issuer.js +1 -1
- package/dist/auth/register/result/index.d.ts +1 -0
- package/dist/auth/register/result/result.d.ts +10 -0
- package/dist/auth/register/result/result.js +1 -0
- package/dist/callable/contract/body.d.ts +10 -0
- package/dist/callable/contract/body.js +7 -0
- package/dist/callable/contract/index.d.ts +2 -1
- package/dist/callable/contract/index.js +1 -1
- package/dist/callable/contract/output.d.ts +18 -2
- package/dist/callable/index.d.ts +3 -2
- package/dist/callable/index.js +2 -1
- package/dist/callable/invocation/call.d.ts +16 -2
- package/dist/callable/invocation/call.js +41 -1
- package/dist/callable/invocation/index.d.ts +1 -1
- package/dist/callable/invocation/index.js +1 -1
- package/dist/callable/invocation/result.d.ts +10 -3
- package/dist/dns-label.d.ts +1 -2
- package/dist/dns-label.js +2 -3
- package/dist/graph/graph/graph.d.ts +1 -5
- package/dist/graph/graph/graph.js +3 -27
- package/dist/graph/graph/index.d.ts +2 -4
- package/dist/graph/graph/index.js +2 -3
- package/dist/graph/graph/model/codec.js +4 -4
- package/dist/graph/graph/model/index.d.ts +1 -1
- package/dist/graph/graph/model/index.js +1 -1
- package/dist/graph/graph/model/model.d.ts +7 -7
- package/dist/graph/graph/model/model.js +6 -6
- package/dist/graph/graph/model/wire.d.ts +58 -78
- package/dist/graph/graph/model/wire.js +18 -19
- package/dist/graph/mutate/authoring/builder.d.ts +2 -2
- package/dist/graph/mutate/authoring/builder.js +2 -2
- package/dist/graph/mutate/authoring/create.js +13 -5
- package/dist/graph/mutate/index.d.ts +1 -1
- package/dist/graph/mutate/language/codec.js +3 -3
- package/dist/graph/mutate/language/model.d.ts +4 -4
- package/dist/graph/mutate/language/wire.d.ts +226 -215
- package/dist/graph/mutate/language/wire.js +42 -47
- package/dist/graph/mutate/result/index.d.ts +4 -3
- package/dist/graph/mutate/result/index.js +8 -6
- package/dist/graph/mutate/result/wire.d.ts +4 -4
- package/dist/graph/mutate/result/wire.js +7 -4
- package/dist/graph/node/identity/id.d.ts +0 -4
- package/dist/graph/node/identity/id.js +0 -5
- package/dist/graph/node/identity/order.js +20 -0
- package/dist/graph/path/authoring/path.d.ts +8 -5
- package/dist/graph/path/authoring/path.js +21 -3
- package/dist/graph/path/language/model.d.ts +8 -3
- package/dist/graph/path/language/syntax.js +23 -8
- package/dist/graph/query/authoring/builder.js +37 -5
- package/dist/graph/query/authoring/model.d.ts +20 -1
- package/dist/graph/query/index.d.ts +4 -2
- package/dist/graph/query/index.js +1 -0
- package/dist/graph/query/language/codec.js +18 -3
- package/dist/graph/query/language/fingerprint.js +8 -0
- package/dist/graph/query/language/model.d.ts +22 -4
- package/dist/graph/query/language/wire.d.ts +124 -114
- package/dist/graph/query/language/wire.js +54 -47
- package/dist/graph/query/order/index.d.ts +53 -0
- package/dist/graph/query/order/index.js +79 -0
- package/dist/graph/query/reference/evaluate.d.ts +1 -0
- package/dist/graph/query/reference/evaluate.js +39 -52
- package/dist/graph/query/result/index.js +1 -1
- package/dist/graph/query/result/wire.d.ts +93 -94
- package/dist/graph/query/result/wire.js +20 -20
- package/dist/graph/reconcile/condition/model.d.ts +2 -2
- package/dist/graph/reconcile/condition/references.d.ts +0 -1
- package/dist/graph/reconcile/condition/references.js +4 -4
- package/dist/graph/reconcile/correspondence.d.ts +9 -8
- package/dist/graph/reconcile/evidence.d.ts +2 -2
- package/dist/graph/reconcile/mutation/assess.d.ts +2 -1
- package/dist/graph/reconcile/observation.d.ts +4 -3
- package/dist/graph/reconcile/planning/canonical.d.ts +6 -0
- package/dist/graph/reconcile/planning/canonical.js +28 -0
- package/dist/graph/reconcile/planning/context.d.ts +3 -3
- package/dist/graph/reconcile/planning/model.d.ts +8 -4
- package/dist/graph/reconcile/planning/plan.js +2 -1
- package/dist/schema/authority/authority-relation.js +3 -0
- package/dist/schema/authority/claims.d.ts +24 -25
- package/dist/schema/authority/claims.js +8 -8
- package/dist/schema/authority/governed-by.d.ts +16 -91
- package/dist/schema/authority/governed-by.js +1 -1
- package/dist/schema/authority/operation-node.d.ts +27 -13
- package/dist/schema/authority/operations.d.ts +8 -168
- package/dist/schema/authority/policy.d.ts +27 -15
- package/dist/schema/authority/vocabulary.d.ts +3 -0
- package/dist/schema/authority/vocabulary.js +25 -0
- package/dist/schema/callables/entrypoint.d.ts +32 -0
- package/dist/schema/callables/entrypoint.js +12 -0
- package/dist/schema/callables/execution.d.ts +569 -0
- package/dist/schema/callables/execution.js +32 -0
- package/dist/schema/callables/function.d.ts +3400 -55
- package/dist/schema/callables/function.js +6 -4
- package/dist/schema/callables/index.d.ts +2 -1
- package/dist/schema/callables/index.js +2 -1
- package/dist/schema/callables/method-of.d.ts +18 -143
- package/dist/schema/callables/method-of.js +2 -2
- package/dist/schema/callables/view.d.ts +83 -51
- package/dist/schema/definitions/class.d.ts +45 -33
- package/dist/schema/definitions/extends.d.ts +16 -110
- package/dist/schema/definitions/instance-of.d.ts +17 -69
- package/dist/schema/domain/domain.d.ts +3343 -148
- package/dist/schema/domain/domain.js +6 -3
- package/dist/schema/domain/of-domain.d.ts +18 -192
- package/dist/schema/domain/of-domain.js +1 -1
- package/dist/schema/identity/composition.d.ts +5 -0
- package/dist/schema/identity/composition.js +5 -0
- package/dist/schema/identity/identity.d.ts +225 -122
- package/dist/schema/identity/identity.js +3 -4
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -0
- package/dist/schema/installation/operation-id.d.ts +1 -2
- package/dist/schema/installation/operation-id.js +2 -4
- package/dist/schema/introspection/index.d.ts +1 -1
- package/dist/schema/introspection/language.d.ts +12 -28
- package/dist/schema/kernel/projection/callables.js +2 -3
- package/dist/schema/kernel/projection/core.d.ts +7 -0
- package/dist/schema/kernel/projection/core.js +51 -0
- package/dist/schema/kernel/projection/definitions.d.ts +13 -0
- package/dist/schema/kernel/projection/definitions.js +71 -0
- package/dist/schema/kernel/projection/index.d.ts +3 -3
- package/dist/schema/kernel/projection/index.js +2 -2
- package/dist/schema/kernel/projection/methods.d.ts +5 -0
- package/dist/schema/kernel/projection/methods.js +41 -0
- package/dist/schema/kernel/projection/part.d.ts +34 -0
- package/dist/schema/kernel/projection/part.js +42 -0
- package/dist/schema/kernel/projection/paths.d.ts +6 -0
- package/dist/schema/kernel/projection/{keys.js → paths.js} +12 -14
- package/dist/schema/kernel/projection/project.d.ts +4 -2
- package/dist/schema/kernel/projection/project.js +33 -258
- package/dist/schema/kernel/projection/properties.d.ts +11 -0
- package/dist/schema/kernel/projection/properties.js +36 -0
- package/dist/schema/kernel/projection/relations.d.ts +7 -0
- package/dist/schema/kernel/projection/relations.js +61 -0
- package/dist/schema/kernel/projection/types.d.ts +28 -2
- package/dist/schema/kernel/schema.d.ts +9008 -4939
- package/dist/schema/kernel/schema.js +12 -8
- package/dist/schema/kernel/syscalls/contracts/admit.d.ts +15 -12
- package/dist/schema/kernel/syscalls/contracts/admit.js +16 -9
- package/dist/schema/kernel/syscalls/contracts/blob.d.ts +31 -0
- package/dist/schema/kernel/syscalls/contracts/blob.js +24 -0
- package/dist/schema/kernel/syscalls/contracts/can.d.ts +19 -8
- package/dist/schema/kernel/syscalls/contracts/can.js +12 -4
- package/dist/schema/kernel/syscalls/contracts/delegate.d.ts +6 -7
- package/dist/schema/kernel/syscalls/contracts/delegate.js +5 -5
- package/dist/schema/kernel/syscalls/contracts/execution.d.ts +300 -0
- package/dist/schema/kernel/syscalls/contracts/execution.js +116 -0
- package/dist/schema/kernel/syscalls/contracts/expected.d.ts +5 -0
- package/dist/schema/kernel/syscalls/contracts/expected.js +9 -0
- package/dist/schema/kernel/syscalls/contracts/identity.d.ts +18 -19
- package/dist/schema/kernel/syscalls/contracts/identity.js +6 -7
- package/dist/schema/kernel/syscalls/contracts/impersonate.d.ts +6 -0
- package/dist/schema/kernel/syscalls/contracts/impersonate.js +4 -0
- package/dist/schema/kernel/syscalls/contracts/index.d.ts +6 -3
- package/dist/schema/kernel/syscalls/contracts/index.js +6 -3
- package/dist/schema/kernel/syscalls/contracts/install.d.ts +309 -217
- package/dist/schema/kernel/syscalls/contracts/install.js +68 -26
- package/dist/schema/kernel/syscalls/contracts/installation.d.ts +70 -351
- package/dist/schema/kernel/syscalls/contracts/installation.js +29 -67
- package/dist/schema/kernel/syscalls/contracts/introspect.d.ts +11 -15
- package/dist/schema/kernel/syscalls/contracts/introspect.js +8 -15
- package/dist/schema/kernel/syscalls/contracts/journal.d.ts +26 -27
- package/dist/schema/kernel/syscalls/contracts/journal.js +15 -15
- package/dist/schema/kernel/syscalls/contracts/mint.d.ts +5 -7
- package/dist/schema/kernel/syscalls/contracts/mint.js +4 -5
- package/dist/schema/kernel/syscalls/contracts/mutate.d.ts +243 -224
- package/dist/schema/kernel/syscalls/contracts/mutate.js +7 -1
- package/dist/schema/kernel/syscalls/contracts/query.d.ts +239 -222
- package/dist/schema/kernel/syscalls/contracts/query.js +17 -15
- package/dist/schema/kernel/syscalls/contracts/register.d.ts +20 -0
- package/dist/schema/kernel/syscalls/contracts/register.js +24 -0
- package/dist/schema/kernel/syscalls/contracts/uninstall.d.ts +55 -148
- package/dist/schema/kernel/syscalls/contracts/uninstall.js +7 -5
- package/dist/schema/kernel/syscalls/contracts/view-host-requirements.d.ts +17 -0
- package/dist/schema/kernel/syscalls/contracts/view-host-requirements.js +40 -0
- package/dist/schema/kernel/syscalls/contracts/view-resolve.d.ts +27 -28
- package/dist/schema/kernel/syscalls/contracts/view-resolve.js +16 -24
- package/dist/schema/kernel/syscalls/contracts/whoami.d.ts +19 -20
- package/dist/schema/kernel/syscalls/contracts/whoami.js +2 -2
- package/dist/schema/kernel/syscalls/contracts/whois.d.ts +22 -23
- package/dist/schema/kernel/syscalls/contracts/whois.js +3 -3
- package/dist/schema/kernel/syscalls/declarations/admit.d.ts +18 -18
- package/dist/schema/kernel/syscalls/declarations/admit.js +3 -3
- package/dist/schema/kernel/syscalls/declarations/can.d.ts +19 -14
- package/dist/schema/kernel/syscalls/declarations/can.js +4 -4
- package/dist/schema/kernel/syscalls/declarations/delegate.d.ts +9 -12
- package/dist/schema/kernel/syscalls/declarations/delegate.js +4 -4
- package/dist/schema/kernel/syscalls/declarations/download.d.ts +12 -0
- package/dist/schema/kernel/syscalls/declarations/download.js +10 -0
- package/dist/schema/kernel/syscalls/declarations/execution.d.ts +255 -0
- package/dist/schema/kernel/syscalls/declarations/execution.js +52 -0
- package/dist/schema/kernel/syscalls/declarations/impersonate.d.ts +9 -0
- package/dist/schema/kernel/syscalls/declarations/impersonate.js +12 -0
- package/dist/schema/kernel/syscalls/declarations/index.d.ts +1079 -1323
- package/dist/schema/kernel/syscalls/declarations/index.js +18 -2
- package/dist/schema/kernel/syscalls/declarations/install.d.ts +85 -172
- package/dist/schema/kernel/syscalls/declarations/install.js +7 -3
- package/dist/schema/kernel/syscalls/declarations/introspect.d.ts +8 -19
- package/dist/schema/kernel/syscalls/declarations/introspect.js +3 -4
- package/dist/schema/kernel/syscalls/declarations/journal.d.ts +29 -31
- package/dist/schema/kernel/syscalls/declarations/journal.js +4 -2
- package/dist/schema/kernel/syscalls/declarations/mint.d.ts +8 -13
- package/dist/schema/kernel/syscalls/declarations/mint.js +5 -5
- package/dist/schema/kernel/syscalls/declarations/mutate.d.ts +239 -256
- package/dist/schema/kernel/syscalls/declarations/mutate.js +4 -2
- package/dist/schema/kernel/syscalls/declarations/query.d.ts +236 -260
- package/dist/schema/kernel/syscalls/declarations/query.js +4 -2
- package/dist/schema/kernel/syscalls/declarations/register.d.ts +23 -0
- package/dist/schema/kernel/syscalls/declarations/register.js +10 -0
- package/dist/schema/kernel/syscalls/declarations/uninstall.d.ts +51 -153
- package/dist/schema/kernel/syscalls/declarations/uninstall.js +6 -2
- package/dist/schema/kernel/syscalls/declarations/upload.d.ts +15 -0
- package/dist/schema/kernel/syscalls/declarations/upload.js +10 -0
- package/dist/schema/kernel/syscalls/declarations/use-policy.d.ts +4 -0
- package/dist/schema/kernel/syscalls/declarations/use-policy.js +9 -0
- package/dist/schema/kernel/syscalls/declarations/view-resolve.d.ts +30 -37
- package/dist/schema/kernel/syscalls/declarations/view-resolve.js +5 -3
- package/dist/schema/kernel/syscalls/declarations/whoami.d.ts +22 -26
- package/dist/schema/kernel/syscalls/declarations/whoami.js +3 -3
- package/dist/schema/kernel/syscalls/declarations/whois.d.ts +25 -29
- package/dist/schema/kernel/syscalls/declarations/whois.js +5 -3
- package/dist/schema/kernel/syscalls/descriptors/execution.d.ts +303 -0
- package/dist/schema/kernel/syscalls/descriptors/execution.js +11 -0
- package/dist/schema/kernel/syscalls/descriptors/function.d.ts +8 -2
- package/dist/schema/kernel/syscalls/descriptors/functions.d.ts +3 -1
- package/dist/schema/kernel/syscalls/descriptors/functions.js +3 -1
- package/dist/schema/kernel/syscalls/descriptors/identity.d.ts +47 -13
- package/dist/schema/kernel/syscalls/descriptors/identity.js +2 -1
- package/dist/schema/kernel/syscalls/descriptors/index.d.ts +2 -1
- package/dist/schema/kernel/syscalls/descriptors/index.js +2 -1
- package/dist/schema/kernel/syscalls/descriptors/results/view-resolution.d.ts +5 -2
- package/dist/schema/kernel/syscalls/descriptors/results/view-resolution.js +8 -38
- package/dist/schema/kernel/syscalls/descriptors/view.d.ts +11 -9
- package/dist/schema/kernel/syscalls/index.d.ts +2 -2
- package/dist/schema/kernel/syscalls/index.js +2 -2
- package/dist/schema/kernel/syscalls/references/execution.d.ts +55 -0
- package/dist/schema/kernel/syscalls/references/execution.js +13 -0
- package/dist/schema/kernel/syscalls/references/functions.d.ts +12 -2
- package/dist/schema/kernel/syscalls/references/functions.js +3 -1
- package/dist/schema/kernel/syscalls/references/identity.d.ts +9 -0
- package/dist/schema/kernel/syscalls/references/identity.js +1 -0
- package/dist/schema/kernel/syscalls/references/index.d.ts +2 -1
- package/dist/schema/kernel/syscalls/references/index.js +2 -1
- package/dist/schema/meta/created-by.d.ts +32 -0
- package/dist/schema/meta/created-by.js +17 -0
- package/dist/schema/meta/descriptable.d.ts +13 -11
- package/dist/schema/meta/edge.d.ts +5 -9
- package/dist/schema/meta/iconable.d.ts +13 -11
- package/dist/schema/meta/index.d.ts +1 -0
- package/dist/schema/meta/index.js +1 -0
- package/dist/schema/meta/named.d.ts +13 -9
- package/dist/schema/meta/node.d.ts +9 -1
- package/dist/schema/meta/remotable.d.ts +15 -22
- package/dist/schema/meta/statused.d.ts +13 -7
- package/dist/schema/meta/timestamped.d.ts +14 -12
- package/package.json +9 -7
- package/dist/auth/expression/normalization/canonicalize.d.ts +0 -7
- package/dist/auth/expression/normalization/canonicalize.js +0 -102
- package/dist/auth/expression/normalization/index.d.ts +0 -2
- package/dist/auth/expression/normalization/index.js +0 -2
- package/dist/auth/expression/normalization/raise-denials.d.ts +0 -3
- package/dist/auth/expression/normalization/raise-denials.js +0 -59
- package/dist/auth/provision/fingerprint/fingerprint.d.ts +0 -9
- package/dist/auth/provision/fingerprint/fingerprint.js +0 -33
- package/dist/auth/provision/fingerprint/index.d.ts +0 -2
- package/dist/auth/provision/index.d.ts +0 -5
- package/dist/auth/provision/request/admission.d.ts +0 -3
- package/dist/auth/provision/request/admission.js +0 -125
- package/dist/auth/provision/request/index.d.ts +0 -3
- package/dist/auth/provision/request/request.d.ts +0 -29
- package/dist/auth/provision/result/index.d.ts +0 -1
- package/dist/auth/provision/result/result.d.ts +0 -12
- package/dist/graph/graph/navigation/error.d.ts +0 -12
- package/dist/graph/graph/navigation/error.js +0 -20
- package/dist/graph/graph/navigation/index.d.ts +0 -2
- package/dist/graph/graph/navigation/index.js +0 -1
- package/dist/graph/graph/navigation/model.d.ts +0 -15
- package/dist/schema/callables/view-for.d.ts +0 -296
- package/dist/schema/callables/view-for.js +0 -12
- package/dist/schema/kernel/projection/keys.d.ts +0 -3
- package/dist/schema/kernel/projection/path.d.ts +0 -2
- package/dist/schema/kernel/projection/path.js +0 -140
- package/dist/schema/kernel/syscalls/contracts/provision.d.ts +0 -292
- package/dist/schema/kernel/syscalls/contracts/provision.js +0 -19
- package/dist/schema/kernel/syscalls/declarations/define.d.ts +0 -5
- package/dist/schema/kernel/syscalls/declarations/define.js +0 -7
- package/dist/schema/kernel/syscalls/declarations/provision.d.ts +0 -296
- package/dist/schema/kernel/syscalls/declarations/provision.js +0 -8
- /package/dist/auth/{provision/request/request.js → authority/semantics/snapshot.js} +0 -0
- /package/dist/auth/{provision/result/index.js → authority/semantics/vocabulary.js} +0 -0
- /package/dist/auth/{provision → register}/fingerprint/index.js +0 -0
- /package/dist/auth/{provision → register}/index.js +0 -0
- /package/dist/auth/{provision → register}/request/index.js +0 -0
- /package/dist/auth/{provision/result/result.js → register/request/request.js} +0 -0
- /package/dist/{graph/graph/navigation/model.js → auth/register/result/index.js} +0 -0
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Key } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
2
2
|
import type { Value } from '@astrale-os/kernel-dsl/value';
|
|
3
|
+
import { type NodePath } from '@astrale-os/kernel-core/path';
|
|
4
|
+
/**
|
|
5
|
+
* One declaration, optionally bound to an instance and to the caller's expectation of it: the
|
|
6
|
+
* fingerprint of the callable meaning it compiled against.
|
|
7
|
+
*/
|
|
8
|
+
export type Target = {
|
|
9
|
+
readonly callable: Key.Callable;
|
|
10
|
+
readonly instance?: NodePath;
|
|
11
|
+
readonly fingerprint?: `sha256:${string}`;
|
|
12
|
+
};
|
|
13
|
+
/** Capture a structured invocation target at a representation boundary. */
|
|
14
|
+
export declare function Target(input: Target): Target;
|
|
15
|
+
/** Project an admitted target to its canonical graph path without discarding the original Call. */
|
|
16
|
+
export declare function targetPath(target: NodePath | Target): NodePath;
|
|
3
17
|
/** One canonical callable invocation meaning, independent of its carrier. */
|
|
4
18
|
export interface Call {
|
|
5
|
-
readonly target: NodePath;
|
|
19
|
+
readonly target: NodePath | Target;
|
|
6
20
|
readonly input: Value;
|
|
7
21
|
}
|
|
@@ -1 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
import { Path } from '@astrale-os/kernel-core/path';
|
|
2
|
+
import { callableAddress } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
3
|
+
const FINGERPRINT_PATTERN = /^sha256:[0-9a-f]{64}$/u;
|
|
4
|
+
/** Capture a structured invocation target at a representation boundary. */
|
|
5
|
+
export function Target(input) {
|
|
6
|
+
if (input === null ||
|
|
7
|
+
typeof input !== 'object' ||
|
|
8
|
+
Array.isArray(input) ||
|
|
9
|
+
Reflect.ownKeys(input).some((field) => !['callable', 'instance', 'fingerprint'].includes(String(field)))) {
|
|
10
|
+
throw new TypeError('Invocation Target must contain only callable, instance and fingerprint.');
|
|
11
|
+
}
|
|
12
|
+
const callable = input.callable;
|
|
13
|
+
const coordinate = callableAddress(callable);
|
|
14
|
+
const fingerprint = input.fingerprint;
|
|
15
|
+
if (fingerprint !== undefined &&
|
|
16
|
+
(typeof fingerprint !== 'string' || !FINGERPRINT_PATTERN.test(fingerprint))) {
|
|
17
|
+
throw new TypeError('Invocation Target fingerprint is invalid.');
|
|
18
|
+
}
|
|
19
|
+
const suppliedInstance = input.instance;
|
|
20
|
+
const instance = suppliedInstance === undefined ? undefined : Path.parse(suppliedInstance);
|
|
21
|
+
if (instance !== undefined &&
|
|
22
|
+
(coordinate.kind !== 'method' || instance.ast.steps.at(-1)?.kind === 'method')) {
|
|
23
|
+
throw new TypeError('Only an instance Method target can carry a node instance path.');
|
|
24
|
+
}
|
|
25
|
+
return Object.freeze({
|
|
26
|
+
callable,
|
|
27
|
+
...(instance === undefined ? {} : { instance: instance.raw }),
|
|
28
|
+
...(fingerprint === undefined ? {} : { fingerprint }),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** Project an admitted target to its canonical graph path without discarding the original Call. */
|
|
32
|
+
export function targetPath(target) {
|
|
33
|
+
if (typeof target === 'string')
|
|
34
|
+
return target;
|
|
35
|
+
const coordinate = callableAddress(target.callable);
|
|
36
|
+
if (coordinate.kind === 'function')
|
|
37
|
+
return Path.project(coordinate).raw;
|
|
38
|
+
return target.instance === undefined
|
|
39
|
+
? Path.staticMethod(Path.project(coordinate.owner), coordinate.name).raw
|
|
40
|
+
: Path.instanceMethod(Path.parse(target.instance), target.callable).raw;
|
|
41
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export { Target, targetPath, type Call } from './call.js';
|
|
2
2
|
export type { CallableResult } from './result.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { Target, targetPath } from './call.js';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { NodeId } from '@astrale-os/kernel-core/graph/node';
|
|
2
|
+
import type { BinaryOutput } from '../contract/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Successful result of invoking a callable: its output in the declared mode, or the Execution a
|
|
5
|
+
* durable callable started, whose outcome later carries that output.
|
|
6
|
+
*/
|
|
3
7
|
export type CallableResult<Output, Stream extends AsyncIterable<Output>> = {
|
|
4
8
|
readonly kind: 'value';
|
|
5
9
|
readonly value: Output;
|
|
@@ -8,5 +12,8 @@ export type CallableResult<Output, Stream extends AsyncIterable<Output>> = {
|
|
|
8
12
|
readonly stream: Stream;
|
|
9
13
|
} | {
|
|
10
14
|
readonly kind: 'binary';
|
|
11
|
-
readonly value:
|
|
15
|
+
readonly value: BinaryOutput;
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: 'execution';
|
|
18
|
+
readonly execution: NodeId;
|
|
12
19
|
};
|
package/dist/dns-label.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
/**
|
|
3
2
|
* Canonical RFC 1035 §2.3.4 DNS label: lowercase alphanumeric + hyphen, no
|
|
4
3
|
* leading/trailing hyphen, 1–63 characters.
|
|
@@ -22,4 +21,4 @@ export declare function assertDnsLabel(value: string, name: string): void;
|
|
|
22
21
|
* instance id / public slug so non-DNS-safe values are rejected at parse time
|
|
23
22
|
* (the `.max(63)`/`.min(1)` give clear length errors before the regex check).
|
|
24
23
|
*/
|
|
25
|
-
export declare const dnsLabelSchema:
|
|
24
|
+
export declare const dnsLabelSchema: import("zod").ZodString;
|
package/dist/dns-label.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { string } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Canonical RFC 1035 §2.3.4 DNS label: lowercase alphanumeric + hyphen, no
|
|
4
4
|
* leading/trailing hyphen, 1–63 characters.
|
|
@@ -28,8 +28,7 @@ export function assertDnsLabel(value, name) {
|
|
|
28
28
|
* instance id / public slug so non-DNS-safe values are rejected at parse time
|
|
29
29
|
* (the `.max(63)`/`.min(1)` give clear length errors before the regex check).
|
|
30
30
|
*/
|
|
31
|
-
export const dnsLabelSchema =
|
|
32
|
-
.string()
|
|
31
|
+
export const dnsLabelSchema = string()
|
|
33
32
|
.min(1)
|
|
34
33
|
.max(63)
|
|
35
34
|
.regex(DNS_LABEL_RE, 'must be a lowercase DNS label [a-z0-9-], ≤63 chars, no leading/trailing hyphen');
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import type { Node } from '../node/index.js';
|
|
2
|
-
import type { PathLike } from '../path/index.js';
|
|
3
1
|
import type { GraphAdmissionContext } from './admission/index.js';
|
|
4
2
|
import type { Delta, DeltaResult } from './delta/index.js';
|
|
5
3
|
import type { GraphEdges, GraphNodes } from './indexes/index.js';
|
|
6
4
|
import type { MergeResult } from './merge/index.js';
|
|
7
5
|
import type { GraphData } from './model/index.js';
|
|
8
|
-
import type { GraphPathWalker } from './navigation/index.js';
|
|
9
6
|
/** Immutable indexed behavioral view over exactly one admitted GraphData value. */
|
|
10
7
|
export declare class Graph {
|
|
11
8
|
#private;
|
|
12
9
|
readonly nodes: GraphNodes;
|
|
13
10
|
readonly edges: GraphEdges;
|
|
14
11
|
private constructor();
|
|
15
|
-
static admit(data: GraphData, context: GraphAdmissionContext
|
|
12
|
+
static admit(data: GraphData, context: GraphAdmissionContext): Graph;
|
|
16
13
|
static empty(): Graph;
|
|
17
14
|
/** Compare reference-open observations without deriving deletion from absence. */
|
|
18
15
|
static delta(left: Graph, right: Graph): DeltaResult;
|
|
@@ -22,7 +19,6 @@ export declare class Graph {
|
|
|
22
19
|
static merge(base: Graph, current: Graph, target: Graph): MergeResult;
|
|
23
20
|
/** Apply the same exact merge rule to canonical finite values without schema re-admission. */
|
|
24
21
|
static mergeData(base: GraphData, current: GraphData, target: GraphData): MergeResult;
|
|
25
|
-
walk(path: PathLike): Node | undefined;
|
|
26
22
|
toData(): GraphData;
|
|
27
23
|
equals(other: Graph): boolean;
|
|
28
24
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { edgeKeyOf } from '../edge/index.js';
|
|
2
|
-
import { Path } from '../path/index.js';
|
|
3
2
|
import { equal as equalProperties } from '../properties/index.js';
|
|
4
3
|
import { admitGraphData } from './admission/index.js';
|
|
5
4
|
import { apply as applyDelta, delta as graphDelta } from './delta/index.js';
|
|
6
5
|
import { buildIndexes, createCollections } from './indexes/index.js';
|
|
7
6
|
import { mergeData as mergeGraphData } from './merge/index.js';
|
|
8
|
-
import { GraphPathWalkerRequiredError } from './navigation/index.js';
|
|
9
7
|
const EMPTY_DATA = Object.freeze({
|
|
10
8
|
nodes: Object.freeze([]),
|
|
11
9
|
edges: Object.freeze([]),
|
|
@@ -17,30 +15,17 @@ export class Graph {
|
|
|
17
15
|
nodes;
|
|
18
16
|
edges;
|
|
19
17
|
#data;
|
|
20
|
-
|
|
21
|
-
#walker;
|
|
22
|
-
#pathContext;
|
|
23
|
-
constructor(data, indexes, walker) {
|
|
18
|
+
constructor(data, indexes) {
|
|
24
19
|
this.#data = data;
|
|
25
|
-
this.#indexes = indexes;
|
|
26
|
-
this.#walker = walker;
|
|
27
20
|
const collections = createCollections(data.nodes, data.edges, indexes);
|
|
28
21
|
this.nodes = collections.nodes;
|
|
29
22
|
this.edges = collections.edges;
|
|
30
|
-
this.#pathContext = Object.freeze({
|
|
31
|
-
nodes: this.nodes,
|
|
32
|
-
edges: this.edges,
|
|
33
|
-
orientation: (classKey) => {
|
|
34
|
-
const info = this.#indexes.classes.byKey.get(classKey);
|
|
35
|
-
return info?.kind === 'edge' ? info.orientation : undefined;
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
23
|
Object.freeze(this);
|
|
39
24
|
}
|
|
40
|
-
static admit(data, context
|
|
25
|
+
static admit(data, context) {
|
|
41
26
|
const admitted = admitGraphData(data, context);
|
|
42
27
|
const indexes = buildIndexes(admitted.data.nodes, admitted.data.edges, admitted.classes);
|
|
43
|
-
return new Graph(admitted.data, indexes
|
|
28
|
+
return new Graph(admitted.data, indexes);
|
|
44
29
|
}
|
|
45
30
|
static empty() {
|
|
46
31
|
return Graph.#EMPTY;
|
|
@@ -61,15 +46,6 @@ export class Graph {
|
|
|
61
46
|
static mergeData(base, current, target) {
|
|
62
47
|
return mergeGraphData(base, current, target);
|
|
63
48
|
}
|
|
64
|
-
walk(path) {
|
|
65
|
-
const value = Path.from(path);
|
|
66
|
-
if (this.#walker !== undefined)
|
|
67
|
-
return this.#walker.walk(value, this.#pathContext);
|
|
68
|
-
if (value.ast.anchor.kind === 'id' && value.ast.steps.length === 0) {
|
|
69
|
-
return this.#indexes.nodes.byId.get(value.ast.anchor.id);
|
|
70
|
-
}
|
|
71
|
-
throw new GraphPathWalkerRequiredError(value.raw);
|
|
72
|
-
}
|
|
73
49
|
toData() {
|
|
74
50
|
return this.#data;
|
|
75
51
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
/** Stable aggregate facade over Graph model, admission, indexes,
|
|
1
|
+
/** Stable aggregate facade over Graph model, admission, indexes, delta, and merge. */
|
|
2
2
|
export { Graph } from './graph.js';
|
|
3
3
|
export type { Delta, DeltaConflict, DeltaResult } from './delta/index.js';
|
|
4
4
|
export type { MergeConflict, MergeResult } from './merge/index.js';
|
|
5
5
|
export { GraphData, GraphDataDecodeError, GraphSpec, GraphSpecDecodeError } from './model/index.js';
|
|
6
6
|
export type { AnonymousNodeSpec, GraphDataJson, GraphSpecEdge, GraphSpecEndpoint, GraphSpecJson, GraphSpecNode, } from './model/index.js';
|
|
7
|
-
export {
|
|
7
|
+
export { LocalAlias, isLocalAlias } from './model/index.js';
|
|
8
8
|
export type { GraphAdmissionContext, GraphClassInfo, GraphDiagnostic } from './admission/index.js';
|
|
9
9
|
export { GraphAdmissionError } from './admission/index.js';
|
|
10
10
|
export type { GraphEdges, GraphNodes } from './indexes/index.js';
|
|
11
|
-
export type { GraphPathContext, GraphPathWalker } from './navigation/index.js';
|
|
12
|
-
export { GraphPathAmbiguousError, GraphPathWalkerRequiredError } from './navigation/index.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** Stable aggregate facade over Graph model, admission, indexes,
|
|
1
|
+
/** Stable aggregate facade over Graph model, admission, indexes, delta, and merge. */
|
|
2
2
|
export { Graph } from './graph.js';
|
|
3
3
|
export { GraphData, GraphDataDecodeError, GraphSpec, GraphSpecDecodeError } from './model/index.js';
|
|
4
|
-
export {
|
|
4
|
+
export { LocalAlias, isLocalAlias } from './model/index.js';
|
|
5
5
|
export { GraphAdmissionError } from './admission/index.js';
|
|
6
|
-
export { GraphPathAmbiguousError, GraphPathWalkerRequiredError } from './navigation/index.js';
|
|
@@ -5,7 +5,7 @@ import { node as constructNode, NodeId } from '../../node/index.js';
|
|
|
5
5
|
import { NodePath } from '../../path/index.js';
|
|
6
6
|
import { normalizeProperties } from '../../properties/index.js';
|
|
7
7
|
import { decodeWire } from '../../wire.js';
|
|
8
|
-
import {
|
|
8
|
+
import { isLocalAlias, LocalAlias } from './model.js';
|
|
9
9
|
import { graphSpecSchema } from './wire.js';
|
|
10
10
|
export class GraphDataDecodeError extends TypeError {
|
|
11
11
|
path;
|
|
@@ -28,7 +28,7 @@ export class GraphSpecDecodeError extends TypeError {
|
|
|
28
28
|
/** Strengthen unknown JSON into detached immutable structural graph values. */
|
|
29
29
|
export function decodeGraphSpec(input) {
|
|
30
30
|
try {
|
|
31
|
-
const value = decodeWire(graphSpecSchema, portable.
|
|
31
|
+
const value = decodeWire(graphSpecSchema, portable.acceptForRead(input), specInvalid);
|
|
32
32
|
const nodes = value.nodes.map((node, index) => decodeSpecNode(node, `/nodes/${index}`));
|
|
33
33
|
const edges = value.edges.map((edge, index) => decodeSpecEdge(edge, `/edges/${index}`));
|
|
34
34
|
validateGraphSpec(nodes, edges);
|
|
@@ -124,10 +124,10 @@ function decodeEndpoint(input, path) {
|
|
|
124
124
|
return Object.freeze({ created: binding(input.created, `${path}/created`) });
|
|
125
125
|
}
|
|
126
126
|
function binding(input, path) {
|
|
127
|
-
if (!
|
|
127
|
+
if (!isLocalAlias(input)) {
|
|
128
128
|
specInvalid(path, 'Expected a local binding name of at most 64 characters');
|
|
129
129
|
}
|
|
130
|
-
return
|
|
130
|
+
return LocalAlias(input);
|
|
131
131
|
}
|
|
132
132
|
function validateGraphSpec(nodes, edges) {
|
|
133
133
|
const ids = new Set();
|
|
@@ -13,5 +13,5 @@ export declare const GraphSpec: {
|
|
|
13
13
|
encode(spec: GraphSpecValue): GraphSpecJson;
|
|
14
14
|
};
|
|
15
15
|
export type { AnonymousNodeSpec, GraphSpecEdge, GraphSpecEndpoint, GraphSpecJson, GraphSpecNode, } from './model.js';
|
|
16
|
-
export {
|
|
16
|
+
export { LocalAlias, isLocalAlias } from './model.js';
|
|
17
17
|
export { GraphSpecDecodeError } from './codec.js';
|
|
@@ -2,5 +2,5 @@ import { decodeGraphData, decodeGraphSpec, encodeGraphData, encodeGraphSpec } fr
|
|
|
2
2
|
export const GraphData = Object.freeze({ decode: decodeGraphData, encode: encodeGraphData });
|
|
3
3
|
export { GraphDataDecodeError } from './codec.js';
|
|
4
4
|
export const GraphSpec = Object.freeze({ decode: decodeGraphSpec, encode: encodeGraphSpec });
|
|
5
|
-
export {
|
|
5
|
+
export { LocalAlias, isLocalAlias } from './model.js';
|
|
6
6
|
export { GraphSpecDecodeError } from './codec.js';
|
|
@@ -2,21 +2,21 @@ import type { EdgeSpec } from '../../edge/index.js';
|
|
|
2
2
|
import type { Node, NodeId, NodeSpec } from '../../node/index.js';
|
|
3
3
|
import type { NodePath } from '../../path/index.js';
|
|
4
4
|
import type { Properties } from '../../properties/index.js';
|
|
5
|
-
declare const
|
|
5
|
+
declare const LOCAL_ALIAS_BRAND: unique symbol;
|
|
6
6
|
/** A graph-local lexical name. It is never Node identity. */
|
|
7
|
-
export type
|
|
8
|
-
readonly [
|
|
7
|
+
export type LocalAlias = string & {
|
|
8
|
+
readonly [LOCAL_ALIAS_BRAND]: true;
|
|
9
9
|
};
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
10
|
+
export declare function LocalAlias(input: string): LocalAlias;
|
|
11
|
+
export declare function isLocalAlias(input: unknown): input is LocalAlias;
|
|
12
12
|
export interface AnonymousNodeSpec extends NodeSpec {
|
|
13
|
-
readonly as:
|
|
13
|
+
readonly as: LocalAlias;
|
|
14
14
|
}
|
|
15
15
|
export type GraphSpecNode = Node | AnonymousNodeSpec;
|
|
16
16
|
export type GraphSpecEndpoint = NodeId | {
|
|
17
17
|
readonly path: NodePath;
|
|
18
18
|
} | {
|
|
19
|
-
readonly created:
|
|
19
|
+
readonly created: LocalAlias;
|
|
20
20
|
};
|
|
21
21
|
export type GraphSpecEdge = EdgeSpec<GraphSpecEndpoint>;
|
|
22
22
|
/** Detached structural graph values, including graph-local anonymous Nodes. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
export function
|
|
3
|
-
if (!
|
|
4
|
-
throw new TypeError(`Invalid local
|
|
1
|
+
const LOCAL_ALIAS_PATTERN = /^[A-Za-z][A-Za-z0-9_]{0,63}$/u;
|
|
2
|
+
export function LocalAlias(input) {
|
|
3
|
+
if (!isLocalAlias(input)) {
|
|
4
|
+
throw new TypeError(`Invalid local alias ${JSON.stringify(input)}.`);
|
|
5
5
|
}
|
|
6
6
|
return input;
|
|
7
7
|
}
|
|
8
|
-
export function
|
|
9
|
-
return typeof input === 'string' &&
|
|
8
|
+
export function isLocalAlias(input) {
|
|
9
|
+
return typeof input === 'string' && LOCAL_ALIAS_PATTERN.test(input);
|
|
10
10
|
}
|
|
@@ -1,79 +1,59 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type ZodType } from 'zod';
|
|
2
2
|
import { type EdgeSlug } from '../../edge/index.js';
|
|
3
|
-
export declare const graphNodeSchema:
|
|
4
|
-
id:
|
|
5
|
-
class:
|
|
6
|
-
props:
|
|
7
|
-
},
|
|
8
|
-
export declare const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
export declare const
|
|
14
|
-
source:
|
|
15
|
-
target:
|
|
16
|
-
class:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, z.core.$strict>]>;
|
|
61
|
-
class: z.ZodString;
|
|
62
|
-
slug: z.ZodOptional<z.ZodType<EdgeSlug, unknown, z.core.$ZodTypeInternals<EdgeSlug, unknown>>>;
|
|
63
|
-
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
64
|
-
}, z.core.$strict>>;
|
|
65
|
-
}, z.core.$strict>;
|
|
66
|
-
export declare const graphDataSchema: z.ZodObject<{
|
|
67
|
-
nodes: z.ZodArray<z.ZodObject<{
|
|
68
|
-
id: z.ZodString;
|
|
69
|
-
class: z.ZodString;
|
|
70
|
-
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
71
|
-
}, z.core.$strict>>;
|
|
72
|
-
edges: z.ZodArray<z.ZodObject<{
|
|
73
|
-
source: z.ZodString;
|
|
74
|
-
target: z.ZodString;
|
|
75
|
-
class: z.ZodString;
|
|
76
|
-
slug: z.ZodOptional<z.ZodType<EdgeSlug, unknown, z.core.$ZodTypeInternals<EdgeSlug, unknown>>>;
|
|
77
|
-
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
78
|
-
}, z.core.$strict>>;
|
|
79
|
-
}, z.core.$strict>;
|
|
3
|
+
export declare const graphNodeSchema: import("zod").ZodObject<{
|
|
4
|
+
id: import("zod").ZodString;
|
|
5
|
+
class: import("zod").ZodString;
|
|
6
|
+
props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
7
|
+
}, import("zod/v4/core").$strict>;
|
|
8
|
+
export declare const edgeKeySchema: import("zod").ZodObject<{
|
|
9
|
+
source: import("zod").ZodString;
|
|
10
|
+
target: import("zod").ZodString;
|
|
11
|
+
class: import("zod").ZodString;
|
|
12
|
+
}, import("zod/v4/core").$strict>;
|
|
13
|
+
export declare const graphEdgeSchema: import("zod").ZodObject<{
|
|
14
|
+
source: import("zod").ZodString;
|
|
15
|
+
target: import("zod").ZodString;
|
|
16
|
+
class: import("zod").ZodString;
|
|
17
|
+
slug: import("zod").ZodOptional<ZodType<EdgeSlug, unknown, import("zod/v4/core").$ZodTypeInternals<EdgeSlug, unknown>>>;
|
|
18
|
+
props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
19
|
+
}, import("zod/v4/core").$strict>;
|
|
20
|
+
export declare const graphSpecSchema: import("zod").ZodObject<{
|
|
21
|
+
nodes: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
22
|
+
id: import("zod").ZodString;
|
|
23
|
+
class: import("zod").ZodString;
|
|
24
|
+
props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
25
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
26
|
+
as: import("zod").ZodString;
|
|
27
|
+
class: import("zod").ZodString;
|
|
28
|
+
props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
29
|
+
}, import("zod/v4/core").$strict>]>>;
|
|
30
|
+
edges: import("zod").ZodArray<import("zod").ZodObject<{
|
|
31
|
+
source: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
32
|
+
path: import("zod").ZodString;
|
|
33
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
34
|
+
created: import("zod").ZodString;
|
|
35
|
+
}, import("zod/v4/core").$strict>]>;
|
|
36
|
+
target: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
37
|
+
path: import("zod").ZodString;
|
|
38
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
39
|
+
created: import("zod").ZodString;
|
|
40
|
+
}, import("zod/v4/core").$strict>]>;
|
|
41
|
+
class: import("zod").ZodString;
|
|
42
|
+
slug: import("zod").ZodOptional<ZodType<EdgeSlug, unknown, import("zod/v4/core").$ZodTypeInternals<EdgeSlug, unknown>>>;
|
|
43
|
+
props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
44
|
+
}, import("zod/v4/core").$strict>>;
|
|
45
|
+
}, import("zod/v4/core").$strict>;
|
|
46
|
+
export declare const graphDataSchema: import("zod").ZodObject<{
|
|
47
|
+
nodes: import("zod").ZodArray<import("zod").ZodObject<{
|
|
48
|
+
id: import("zod").ZodString;
|
|
49
|
+
class: import("zod").ZodString;
|
|
50
|
+
props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
51
|
+
}, import("zod/v4/core").$strict>>;
|
|
52
|
+
edges: import("zod").ZodArray<import("zod").ZodObject<{
|
|
53
|
+
source: import("zod").ZodString;
|
|
54
|
+
target: import("zod").ZodString;
|
|
55
|
+
class: import("zod").ZodString;
|
|
56
|
+
slug: import("zod").ZodOptional<ZodType<EdgeSlug, unknown, import("zod/v4/core").$ZodTypeInternals<EdgeSlug, unknown>>>;
|
|
57
|
+
props: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
58
|
+
}, import("zod/v4/core").$strict>>;
|
|
59
|
+
}, import("zod/v4/core").$strict>;
|
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
import { fullMatch } from '@astrale-os/kernel-dsl/v1/value/full-match';
|
|
2
|
-
import {
|
|
2
|
+
import { array, record, strictObject, string, union, unknown as unknownSchema, } from 'zod';
|
|
3
3
|
import { edgeSlugSchema } from '../../edge/index.js';
|
|
4
|
-
const text =
|
|
5
|
-
const props =
|
|
6
|
-
const binding =
|
|
7
|
-
const edgeSlug =
|
|
8
|
-
.string()
|
|
4
|
+
const text = string().min(1);
|
|
5
|
+
const props = record(string(), unknownSchema());
|
|
6
|
+
const binding = string().regex(/^[A-Za-z][A-Za-z0-9_]{0,63}$/u);
|
|
7
|
+
const edgeSlug = string()
|
|
9
8
|
.min(edgeSlugSchema.minLength)
|
|
10
9
|
.max(edgeSlugSchema.maxLength)
|
|
11
10
|
.check(fullMatch(edgeSlugSchema.fullMatch));
|
|
12
|
-
export const graphNodeSchema =
|
|
13
|
-
|
|
14
|
-
export const edgeKeySchema =
|
|
11
|
+
export const graphNodeSchema = strictObject({ id: text, class: text, props });
|
|
12
|
+
const anonymousGraphNodeSchema = strictObject({ as: binding, class: text, props });
|
|
13
|
+
export const edgeKeySchema = strictObject({ source: text, target: text, class: text });
|
|
15
14
|
export const graphEdgeSchema = edgeKeySchema.extend({ slug: edgeSlug.optional(), props });
|
|
16
|
-
const graphSpecEndpointSchema =
|
|
15
|
+
const graphSpecEndpointSchema = union([
|
|
17
16
|
text,
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
strictObject({ path: text }),
|
|
18
|
+
strictObject({ created: binding }),
|
|
20
19
|
]);
|
|
21
|
-
|
|
20
|
+
const graphSpecEdgeSchema = strictObject({
|
|
22
21
|
source: graphSpecEndpointSchema,
|
|
23
22
|
target: graphSpecEndpointSchema,
|
|
24
23
|
class: text,
|
|
25
24
|
slug: edgeSlug.optional(),
|
|
26
25
|
props,
|
|
27
26
|
});
|
|
28
|
-
export const graphSpecSchema =
|
|
29
|
-
nodes:
|
|
30
|
-
edges:
|
|
27
|
+
export const graphSpecSchema = strictObject({
|
|
28
|
+
nodes: array(union([graphNodeSchema, anonymousGraphNodeSchema])),
|
|
29
|
+
edges: array(graphSpecEdgeSchema),
|
|
31
30
|
});
|
|
32
|
-
export const graphDataSchema =
|
|
33
|
-
nodes:
|
|
34
|
-
edges:
|
|
31
|
+
export const graphDataSchema = strictObject({
|
|
32
|
+
nodes: array(graphNodeSchema),
|
|
33
|
+
edges: array(graphEdgeSchema),
|
|
35
34
|
});
|
|
@@ -6,7 +6,7 @@ import type { DeltaInput } from '../../properties/index.js';
|
|
|
6
6
|
import type { QueryEdgeAST, QueryNodeAST } from '../../query/index.js';
|
|
7
7
|
import type { MutationAST } from '../language/index.js';
|
|
8
8
|
import type { MutationInputEdgeSelector, MutationInputEndpoint, MutationPropertyConditionsInput, MutationPropsInput } from './model.js';
|
|
9
|
-
import {
|
|
9
|
+
import { LocalAlias } from '../../graph/index.js';
|
|
10
10
|
export type MutationQueryPreconditionInput = {
|
|
11
11
|
readonly query: QueryNodeAST;
|
|
12
12
|
readonly equals: {
|
|
@@ -39,7 +39,7 @@ export interface MutationBuilder {
|
|
|
39
39
|
readonly class: ClassKey;
|
|
40
40
|
readonly props?: MutationPropsInput;
|
|
41
41
|
}): {
|
|
42
|
-
readonly created:
|
|
42
|
+
readonly created: LocalAlias;
|
|
43
43
|
};
|
|
44
44
|
updateNode(input: {
|
|
45
45
|
readonly node: NodeTarget;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LocalAlias } from '../../graph/index.js';
|
|
2
2
|
import { createMutationAST } from './create.js';
|
|
3
3
|
/** Run one synchronous author and admit its complete operation set. */
|
|
4
4
|
export function buildMutationAST(author) {
|
|
@@ -38,7 +38,7 @@ export function buildMutationAST(author) {
|
|
|
38
38
|
expect: expectation,
|
|
39
39
|
createNode(input) {
|
|
40
40
|
requireOpen();
|
|
41
|
-
const created =
|
|
41
|
+
const created = LocalAlias(input.as);
|
|
42
42
|
operations.push({
|
|
43
43
|
op: 'node.create',
|
|
44
44
|
as: created,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Path } from '../../path/index.js';
|
|
1
|
+
import { Path, PathError } from '../../path/index.js';
|
|
3
2
|
import { MutationLanguage } from '../language/index.js';
|
|
4
3
|
/** Lower rich TypeScript inputs into the one canonical public MutationAST representation. */
|
|
5
4
|
export function createMutationAST(input) {
|
|
@@ -69,6 +68,9 @@ function lowerOperation(operation) {
|
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
function lowerEndpoint(endpoint) {
|
|
71
|
+
if (typeof endpoint === 'object' && endpoint !== null && 'kind' in endpoint) {
|
|
72
|
+
return nodeTargetText(endpoint);
|
|
73
|
+
}
|
|
72
74
|
return typeof endpoint === 'object' && endpoint !== null && 'created' in endpoint
|
|
73
75
|
? endpoint
|
|
74
76
|
: nodeTargetText(endpoint);
|
|
@@ -84,9 +86,15 @@ function pathText(path) {
|
|
|
84
86
|
return nodeTargetText(path);
|
|
85
87
|
}
|
|
86
88
|
function nodeTargetText(target) {
|
|
87
|
-
|
|
88
|
-
return target.raw;
|
|
89
|
-
|
|
89
|
+
try {
|
|
90
|
+
return Path.target(target).raw;
|
|
91
|
+
}
|
|
92
|
+
catch (cause) {
|
|
93
|
+
// The Mutation codec owns invalid-input errors and their operation/precondition coordinates.
|
|
94
|
+
if (cause instanceof PathError)
|
|
95
|
+
return target;
|
|
96
|
+
throw cause;
|
|
97
|
+
}
|
|
90
98
|
}
|
|
91
99
|
function mutationProps(input) {
|
|
92
100
|
return input;
|
|
@@ -2,7 +2,7 @@ import type { GraphSpec } from '../graph/index.js';
|
|
|
2
2
|
import type { MutationBuilder, MutationInput } from './authoring/index.js';
|
|
3
3
|
import type { MutationAST as MutationASTValue, MutationStructuralLimits } from './language/index.js';
|
|
4
4
|
export type { MutationBuilder, MutationInput, MutationInputEdgeSelector, MutationInputEndpoint, MutationInputOperation, MutationInputPrecondition, MutationPropertyConditionsInput, MutationPropsInput, MutationQueryPreconditionInput, } from './authoring/index.js';
|
|
5
|
-
export type { EdgeCreateOperation, EdgeDeleteOperation, EdgeUpdateOperation,
|
|
5
|
+
export type { EdgeCreateOperation, EdgeDeleteOperation, EdgeUpdateOperation, LocalAlias, MutationEdgeSelector, MutationEndpoint, MutationOperation, MutationPrecondition, MutationPropertyConditions, MutationProps, MutationQueryPrecondition, MutationStructuralLimits, NodeCreateOperation, NodeDeleteOperation, NodeUpdateOperation, QueryExpectedSelection, } from './language/index.js';
|
|
6
6
|
export { MutationASTDecodeError } from './language/index.js';
|
|
7
7
|
export type MutationAST = MutationASTValue;
|
|
8
8
|
export declare const MutationAST: {
|