@astrale-os/kernel-dsl 1.0.0-beta.3 → 1.0.0-beta.31
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/v1/addressing/class-key.js +3 -3
- package/dist/v1/addressing/definition-ref.js +21 -37
- package/dist/v1/addressing/domain-dependency.d.ts +0 -6
- package/dist/v1/addressing/domain-dependency.js +1 -6
- package/dist/v1/addressing/key.d.ts +4 -1
- package/dist/v1/addressing/key.js +23 -3
- package/dist/v1/addressing/ordering.d.ts +2 -0
- package/dist/v1/addressing/ordering.js +2 -0
- package/dist/v1/addressing/patterns.d.ts +1 -1
- package/dist/v1/addressing/patterns.js +2 -6
- package/dist/v1/builder/callable/authoring.d.ts +11 -5
- package/dist/v1/builder/callable/authoring.js +2 -0
- package/dist/v1/builder/class/authoring.d.ts +94 -224
- package/dist/v1/builder/class/authoring.js +30 -35
- package/dist/v1/builder/class/handle.d.ts +27 -0
- package/dist/v1/builder/class/handle.js +1 -0
- package/dist/v1/builder/class/input.d.ts +159 -0
- package/dist/v1/builder/class/projection.d.ts +129 -0
- package/dist/v1/builder/class/projection.js +1 -0
- package/dist/v1/builder/class/property.d.ts +3 -9
- package/dist/v1/builder/class/property.js +1 -0
- package/dist/v1/builder/core/authoring.d.ts +1 -1
- package/dist/v1/builder/index.d.ts +10 -2
- package/dist/v1/builder/index.js +2 -0
- package/dist/v1/builder/lowering/callable.js +1 -0
- package/dist/v1/builder/lowering/class.d.ts +9 -1
- package/dist/v1/builder/lowering/class.js +62 -17
- package/dist/v1/builder/lowering/policy.js +6 -24
- package/dist/v1/builder/lowering/property-keys.d.ts +27 -0
- package/dist/v1/builder/lowering/property-keys.js +108 -0
- package/dist/v1/builder/lowering/schema/compile.js +13 -6
- package/dist/v1/builder/lowering/schema/context.d.ts +9 -1
- package/dist/v1/builder/lowering/schema/context.js +36 -7
- package/dist/v1/builder/lowering/schema/lifetime.d.ts +11 -0
- package/dist/v1/builder/lowering/schema/lifetime.js +55 -0
- package/dist/v1/builder/lowering/value/compile.js +29 -22
- package/dist/v1/builder/lowering/value/file.d.ts +7 -0
- package/dist/v1/builder/lowering/value/file.js +14 -0
- package/dist/v1/builder/lowering/value/path.d.ts +1 -1
- package/dist/v1/builder/lowering/value/path.js +2 -4
- package/dist/v1/builder/lowering/value/zod.js +41 -7
- package/dist/v1/builder/policy/authoring.d.ts +80 -9
- package/dist/v1/builder/policy/authoring.js +99 -68
- package/dist/v1/builder/policy/legacy/edge.d.ts +28 -0
- package/dist/v1/builder/policy/legacy/edge.js +16 -0
- package/dist/v1/builder/schema/define.d.ts +0 -1
- package/dist/v1/builder/schema/diagnostic.d.ts +3 -2
- package/dist/v1/builder/schema/diagnostic.js +5 -10
- package/dist/v1/builder/schema/input.d.ts +4 -1
- package/dist/v1/builder/schema/projection/callable.d.ts +7 -5
- package/dist/v1/builder/schema/projection/class.d.ts +78 -16
- package/dist/v1/builder/schema/projection/core-input.d.ts +2 -1
- package/dist/v1/builder/schema/projection/domain.d.ts +13 -2
- package/dist/v1/builder/schema/projection/identity.d.ts +74 -9
- package/dist/v1/builder/schema/projection/model.d.ts +4 -2
- package/dist/v1/builder/schema/projection/property.d.ts +38 -4
- package/dist/v1/builder/schema/projection/resolved-class.d.ts +5 -4
- package/dist/v1/builder/schema/projection.d.ts +1 -1
- package/dist/v1/builder/schema/rule.d.ts +316 -0
- package/dist/v1/builder/schema/rule.js +192 -0
- package/dist/v1/builder/value/file.d.ts +34 -0
- package/dist/v1/builder/value/file.js +77 -0
- package/dist/v1/builder/value/full-match.d.ts +0 -1
- package/dist/v1/builder/value/full-match.js +0 -1
- package/dist/v1/builder/value/path-metadata.d.ts +1 -1
- package/dist/v1/builder/value/path.d.ts +1 -1
- package/dist/v1/bundle/codec.js +55 -74
- package/dist/v1/bundle/diagnostic.d.ts +3 -1
- package/dist/v1/bundle/diagnostic.js +9 -7
- package/dist/v1/bundle/index.d.ts +2 -0
- package/dist/v1/bundle/index.js +1 -0
- package/dist/v1/bundle/model.js +1 -1
- package/dist/v1/bundle/rule.d.ts +14 -0
- package/dist/v1/bundle/rule.js +41 -0
- package/dist/v1/bundle/structure.js +6 -8
- package/dist/v1/compiled/admission/accept.js +9 -15
- package/dist/v1/compiled/admission/closure.js +17 -34
- package/dist/v1/compiled/admission/diagnostic.d.ts +23 -1
- package/dist/v1/compiled/admission/diagnostic.js +40 -3
- package/dist/v1/compiled/admission/revision.d.ts +9 -1
- package/dist/v1/compiled/admission/revision.js +7 -3
- package/dist/v1/compiled/admission/semantics/class.d.ts +4 -1
- package/dist/v1/compiled/admission/semantics/class.js +48 -19
- package/dist/v1/compiled/admission/semantics/core.d.ts +1 -24
- package/dist/v1/compiled/admission/semantics/core.js +56 -24
- package/dist/v1/compiled/admission/semantics/edge.d.ts +2 -4
- package/dist/v1/compiled/admission/semantics/edge.js +6 -65
- package/dist/v1/compiled/admission/semantics/policy/admit.js +4 -19
- package/dist/v1/compiled/admission/semantics/policy/callable.js +2 -5
- package/dist/v1/compiled/admission/semantics/policy/contracts.d.ts +5 -20
- package/dist/v1/compiled/admission/semantics/policy/contracts.js +8 -21
- package/dist/v1/compiled/admission/semantics/policy/parity.js +44 -53
- package/dist/v1/compiled/admission/semantics/policy/pattern.d.ts +4 -1
- package/dist/v1/compiled/admission/semantics/policy/pattern.js +7 -21
- package/dist/v1/compiled/admission/semantics/policy/typing.d.ts +2 -24
- package/dist/v1/compiled/admission/semantics/policy/typing.js +19 -201
- package/dist/v1/compiled/admission/wire/callable.d.ts +5 -2
- package/dist/v1/compiled/admission/wire/callable.js +24 -20
- package/dist/v1/compiled/admission/wire/class.js +79 -30
- package/dist/v1/compiled/admission/wire/entry.d.ts +1 -1
- package/dist/v1/compiled/admission/wire/entry.js +36 -13
- package/dist/v1/compiled/admission/wire/policy.d.ts +4 -3
- package/dist/v1/compiled/admission/wire/policy.js +27 -20
- package/dist/v1/compiled/admission/wire/program.d.ts +13 -3
- package/dist/v1/compiled/admission/wire/program.js +39 -44
- package/dist/v1/compiled/admission/wire/property.d.ts +4 -1
- package/dist/v1/compiled/admission/wire/property.js +8 -5
- package/dist/v1/compiled/admission/wire/value.d.ts +0 -2
- package/dist/v1/compiled/admission/wire/value.js +0 -7
- package/dist/v1/compiled/codec/json.js +4 -3
- package/dist/v1/compiled/compiler/compile.js +15 -33
- package/dist/v1/compiled/diagnostic.d.ts +1 -1
- package/dist/v1/compiled/diagnostic.js +2 -3
- package/dist/v1/compiled/index.d.ts +2 -0
- package/dist/v1/compiled/index.js +1 -0
- package/dist/v1/compiled/loader/load.d.ts +3 -2
- package/dist/v1/compiled/loader/load.js +13 -52
- package/dist/v1/compiled/model/schema.d.ts +3 -0
- package/dist/v1/compiled/rule.d.ts +49 -0
- package/dist/v1/compiled/rule.js +169 -0
- package/dist/v1/domain/create.js +9 -10
- package/dist/v1/domain/model/domain.d.ts +2 -7
- package/dist/v1/domain/model/input.d.ts +19 -10
- package/dist/v1/domain/namespace/member-collection.js +8 -7
- package/dist/v1/domain/projection/classes.js +11 -8
- package/dist/v1/domain/validation/create.d.ts +7 -16
- package/dist/v1/domain/validation/create.js +35 -81
- package/dist/v1/index.d.ts +5 -3
- package/dist/v1/index.js +1 -1
- package/dist/v1/language/.spec/schemas/draft-2020-12.schema.json +462 -0
- package/dist/v1/language/.spec/schemas/value-schema.schema.json +23 -0
- package/dist/v1/language/callable/admission.d.ts +15 -0
- package/dist/v1/language/callable/admission.js +44 -0
- package/dist/v1/language/callable/model/callable.d.ts +10 -0
- package/dist/v1/language/callable/resolved.d.ts +26 -5
- package/dist/v1/language/chain.d.ts +7 -0
- package/dist/v1/language/chain.js +24 -0
- package/dist/v1/language/class/inheritance.d.ts +36 -5
- package/dist/v1/language/class/inheritance.js +85 -1
- package/dist/v1/language/class/lifetime.d.ts +50 -11
- package/dist/v1/language/class/lifetime.js +89 -20
- package/dist/v1/language/class/model/class.d.ts +45 -9
- package/dist/v1/language/class/model/edge.d.ts +31 -2
- package/dist/v1/language/class/model/property.d.ts +16 -7
- package/dist/v1/language/class/property-values.js +2 -4
- package/dist/v1/language/class/resolved.d.ts +9 -4
- package/dist/v1/language/class/unique.d.ts +143 -0
- package/dist/v1/language/class/unique.js +264 -0
- package/dist/v1/language/core/facts.d.ts +85 -0
- package/dist/v1/language/core/facts.js +116 -0
- package/dist/v1/language/cycle.d.ts +10 -0
- package/dist/v1/language/cycle.js +30 -0
- package/dist/v1/language/definition/metadata.d.ts +38 -0
- package/dist/v1/language/definition/metadata.js +51 -0
- package/dist/v1/language/freeze.d.ts +5 -0
- package/dist/v1/{schema/canonical → language}/freeze.js +4 -0
- package/dist/v1/language/index.d.ts +7 -2
- package/dist/v1/language/index.js +5 -1
- package/dist/v1/language/limits.d.ts +83 -0
- package/dist/v1/language/limits.js +77 -0
- package/dist/v1/language/policy/analysis/branches.d.ts +8 -0
- package/dist/v1/language/policy/analysis/branches.js +8 -8
- package/dist/v1/language/policy/analysis/budgets.d.ts +45 -12
- package/dist/v1/language/policy/analysis/budgets.js +140 -20
- package/dist/v1/language/policy/analysis/checks.js +8 -6
- package/dist/v1/language/policy/analysis/composition.d.ts +4 -0
- package/dist/v1/language/policy/analysis/composition.js +11 -0
- package/dist/v1/language/policy/analysis/typing.d.ts +51 -0
- package/dist/v1/language/policy/analysis/typing.js +456 -0
- package/dist/v1/language/policy/model/policy.d.ts +71 -9
- package/dist/v1/language/policy/model/policy.js +42 -4
- package/dist/v1/language/policy/normalization/normalize.d.ts +6 -6
- package/dist/v1/language/policy/normalization/normalize.js +46 -68
- package/dist/v1/language/suspended.d.ts +7 -0
- package/dist/v1/language/suspended.js +23 -0
- package/dist/v1/language/validation/diagnostic.d.ts +15 -1
- package/dist/v1/language/validation/diagnostic.js +21 -0
- package/dist/v1/language/validation/rule.d.ts +45 -0
- package/dist/v1/language/validation/rule.js +109 -0
- package/dist/v1/language/value/compile/fields.js +16 -16
- package/dist/v1/language/value/compile/load.d.ts +5 -0
- package/dist/v1/language/value/compile/load.js +13 -0
- package/dist/v1/language/value/evaluate/assertions.d.ts +5 -1
- package/dist/v1/language/value/evaluate/assertions.js +19 -8
- package/dist/v1/language/value/evaluate/evaluator.js +117 -120
- package/dist/v1/language/value/evaluate/preparation.d.ts +16 -0
- package/dist/v1/language/value/evaluate/preparation.js +100 -47
- package/dist/v1/language/value/evaluate/program.d.ts +2 -1
- package/dist/v1/language/value/evaluate/program.js +6 -6
- package/dist/v1/language/value/evaluate/validate.d.ts +3 -3
- package/dist/v1/language/value/evaluate/validate.js +15 -11
- package/dist/v1/language/value/evaluate/validity.optimization.d.ts +14 -0
- package/dist/v1/language/value/evaluate/validity.optimization.js +338 -0
- package/dist/v1/language/value/files.d.ts +44 -0
- package/dist/v1/language/value/files.js +151 -0
- package/dist/v1/language/value/inclusion/arrays.d.ts +3 -0
- package/dist/v1/language/value/inclusion/arrays.js +85 -0
- package/dist/v1/language/value/inclusion/assertions.d.ts +18 -0
- package/dist/v1/language/value/inclusion/assertions.js +28 -0
- package/dist/v1/language/value/inclusion/combinators.d.ts +3 -0
- package/dist/v1/language/value/inclusion/combinators.js +67 -0
- package/dist/v1/language/value/inclusion/equivalence.d.ts +4 -0
- package/dist/v1/language/value/inclusion/equivalence.js +76 -0
- package/dist/v1/language/value/inclusion/evidence.d.ts +34 -0
- package/dist/v1/language/value/inclusion/evidence.js +140 -0
- package/dist/v1/language/value/inclusion/includes.d.ts +29 -3
- package/dist/v1/language/value/inclusion/includes.js +58 -723
- package/dist/v1/language/value/inclusion/keywords.d.ts +5 -0
- package/dist/v1/language/value/inclusion/keywords.js +31 -0
- package/dist/v1/language/value/inclusion/kinds.d.ts +17 -0
- package/dist/v1/language/value/inclusion/kinds.js +57 -0
- package/dist/v1/language/value/inclusion/location.d.ts +24 -0
- package/dist/v1/language/value/inclusion/location.js +66 -0
- package/dist/v1/language/value/inclusion/numbers.d.ts +3 -0
- package/dist/v1/language/value/inclusion/numbers.js +41 -0
- package/dist/v1/language/value/inclusion/objects.d.ts +3 -0
- package/dist/v1/language/value/inclusion/objects.js +190 -0
- package/dist/v1/language/value/inclusion/strings.d.ts +3 -0
- package/dist/v1/language/value/inclusion/strings.js +29 -0
- package/dist/v1/language/value/inclusion/types.d.ts +3 -0
- package/dist/v1/language/value/inclusion/types.js +34 -0
- package/dist/v1/language/value/model/blob.d.ts +6 -0
- package/dist/v1/language/value/model/blob.js +8 -0
- package/dist/v1/language/value/model/file.d.ts +41 -0
- package/dist/v1/language/value/model/file.js +122 -0
- package/dist/v1/language/value/ordering.d.ts +14 -0
- package/dist/v1/language/value/ordering.js +144 -77
- package/dist/v1/language/value/profile/canonicalize.d.ts +6 -1
- package/dist/v1/language/value/profile/canonicalize.js +67 -87
- package/dist/v1/language/value/profile/json.validate.d.ts +12 -0
- package/dist/v1/language/value/profile/json.validate.js +18 -5
- package/dist/v1/language/value/profile/meta-schema.compiled.d.ts +1 -0
- package/dist/v1/language/value/profile/meta-schema.compiled.js +21 -5
- package/dist/v1/language/value/profile/rules.js +27 -44
- package/dist/v1/language/value/profile/validate.js +1 -10
- package/dist/v1/language/value/profile/vocabulary.d.ts +36 -2
- package/dist/v1/language/value/profile/vocabulary.js +58 -5
- package/dist/v1/language/value/reference/closure.js +6 -6
- package/dist/v1/language/value/reference/recursion.js +9 -48
- package/dist/v1/language/value/reference/references.d.ts +3 -1
- package/dist/v1/language/value/reference/references.js +7 -7
- package/dist/v1/language/value/reference/registry.index.d.ts +2 -0
- package/dist/v1/language/value/reference/registry.index.js +33 -16
- package/dist/v1/language/value/regexp/ast.js +6 -7
- package/dist/v1/language/value/regexp/compile.d.ts +5 -11
- package/dist/v1/language/value/regexp/compile.js +14 -12
- package/dist/v1/language/value/regexp/syntax.js +3 -2
- package/dist/v1/language/value/regexp/unicode.d.ts +1 -1
- package/dist/v1/language/value/regexp/unicode.js +1 -1
- package/dist/v1/language/value/syntax/keywords.d.ts +3 -3
- package/dist/v1/language/value/syntax/keywords.js +4 -20
- package/dist/v1/language/value/syntax/node-path/validate.js +2 -3
- package/dist/v1/language/value/syntax/pointer.d.ts +2 -0
- package/dist/v1/language/value/syntax/pointer.js +5 -2
- package/dist/v1/language/value/syntax/walk.d.ts +9 -0
- package/dist/v1/language/value/syntax/walk.js +37 -20
- package/dist/v1/schema/.spec/schemas/domain-schema.schema.json +2596 -0
- package/dist/v1/schema/admission/accept.d.ts +3 -1
- package/dist/v1/schema/admission/accept.js +6 -14
- package/dist/v1/schema/admission/callable.d.ts +21 -0
- package/dist/v1/schema/admission/callable.js +96 -0
- package/dist/v1/schema/analysis/class.d.ts +4 -0
- package/dist/v1/schema/analysis/class.js +57 -17
- package/dist/v1/schema/canonical/revision.d.ts +4 -1
- package/dist/v1/schema/canonical/revision.js +8 -5
- package/dist/v1/schema/compatibility/api.d.ts +4 -1
- package/dist/v1/schema/compatibility/api.js +2 -0
- package/dist/v1/schema/compatibility/comparators/callables.js +1 -1
- package/dist/v1/schema/compatibility/comparators/classes.d.ts +9 -4
- package/dist/v1/schema/compatibility/comparators/classes.js +50 -29
- package/dist/v1/schema/compatibility/comparators/index.d.ts +1 -1
- package/dist/v1/schema/compatibility/comparators/members.js +1 -1
- package/dist/v1/schema/compatibility/comparators/values.js +2 -2
- package/dist/v1/schema/compatibility/context.d.ts +5 -2
- package/dist/v1/schema/compatibility/context.js +8 -6
- package/dist/v1/schema/compatibility/coordinate.js +3 -3
- package/dist/v1/schema/compatibility/diff.js +2 -4
- package/dist/v1/schema/compatibility/extension.d.ts +11 -0
- package/dist/v1/schema/compatibility/extension.js +22 -0
- package/dist/v1/schema/compatibility/fields.d.ts +20 -4
- package/dist/v1/schema/compatibility/fields.js +13 -3
- package/dist/v1/schema/compatibility/meaning/footprint.js +16 -51
- package/dist/v1/schema/compatibility/model.d.ts +17 -5
- package/dist/v1/schema/compatibility/references.d.ts +0 -3
- package/dist/v1/schema/compatibility/references.js +1 -9
- package/dist/v1/schema/compatibility/report.js +1 -1
- package/dist/v1/schema/compatibility/rule.d.ts +13 -0
- package/dist/v1/schema/compatibility/rule.js +23 -0
- package/dist/v1/schema/compatibility/scope.d.ts +2 -0
- package/dist/v1/schema/compatibility/scope.js +4 -1
- package/dist/v1/schema/compatibility/structure/index.js +6 -4
- package/dist/v1/schema/compatibility/structure/requirements.js +58 -61
- package/dist/v1/schema/compatibility/versioning/index.js +1 -1
- package/dist/v1/schema/compatibility/versioning/surface.d.ts +1 -1
- package/dist/v1/schema/compatibility/versioning/surface.js +30 -2
- package/dist/v1/schema/compatibility/walk.d.ts +17 -0
- package/dist/v1/schema/compatibility/walk.js +41 -0
- package/dist/v1/schema/diagnostic.d.ts +17 -3
- package/dist/v1/schema/diagnostic.js +14 -11
- package/dist/v1/schema/enforcement/changes.d.ts +590 -0
- package/dist/v1/schema/enforcement/changes.js +566 -0
- package/dist/v1/schema/enforcement/derived.d.ts +236 -0
- package/dist/v1/schema/enforcement/derived.js +243 -0
- package/dist/v1/schema/enforcement/dispose.d.ts +308 -0
- package/dist/v1/schema/enforcement/dispose.js +275 -0
- package/dist/v1/schema/enforcement/facts.d.ts +89 -0
- package/dist/v1/schema/enforcement/facts.js +70 -0
- package/dist/v1/schema/enforcement/fields.d.ts +65 -0
- package/dist/v1/schema/enforcement/fields.js +36 -0
- package/dist/v1/schema/enforcement/index.d.ts +39 -0
- package/dist/v1/schema/enforcement/index.js +10 -0
- package/dist/v1/schema/enforcement/install.d.ts +1634 -0
- package/dist/v1/schema/enforcement/install.js +1223 -0
- package/dist/v1/schema/enforcement/lifecycle.d.ts +87 -0
- package/dist/v1/schema/enforcement/lifecycle.js +91 -0
- package/dist/v1/schema/enforcement/model.d.ts +253 -0
- package/dist/v1/schema/enforcement/model.js +1 -0
- package/dist/v1/schema/enforcement/obligations.d.ts +248 -0
- package/dist/v1/schema/enforcement/obligations.js +240 -0
- package/dist/v1/schema/enforcement/write.d.ts +1314 -0
- package/dist/v1/schema/enforcement/write.js +1017 -0
- package/dist/v1/schema/index.d.ts +11 -1
- package/dist/v1/schema/index.js +5 -0
- package/dist/v1/schema/model/schema.d.ts +23 -1
- package/dist/v1/schema/model/schema.js +1 -1
- package/dist/v1/schema/normalization/domain.d.ts +2 -0
- package/dist/v1/schema/normalization/domain.js +50 -13
- package/dist/v1/schema/resolution/closure.js +2 -1
- package/dist/v1/schema/resolution/context.js +17 -18
- package/dist/v1/schema/resolution/domain.d.ts +5 -0
- package/dist/v1/schema/resolution/domain.js +6 -12
- package/dist/v1/schema/resolution/origins.js +6 -8
- package/dist/v1/schema/rule.d.ts +25 -0
- package/dist/v1/schema/rule.js +459 -0
- package/dist/v1/schema/validation/callable.d.ts +35 -2
- package/dist/v1/schema/validation/callable.js +65 -9
- package/dist/v1/schema/validation/class.d.ts +6 -2
- package/dist/v1/schema/validation/class.js +128 -105
- package/dist/v1/schema/validation/core.js +103 -173
- package/dist/v1/schema/validation/domain.js +25 -15
- package/dist/v1/schema/validation/domain.json-schema.d.ts +15 -0
- package/dist/v1/schema/validation/domain.json-schema.js +222 -0
- package/dist/v1/schema/validation/domain.route.d.ts +6 -1
- package/dist/v1/schema/validation/domain.route.js +18 -0
- package/dist/v1/schema/validation/domain.structure.d.ts +7797 -0
- package/dist/v1/schema/validation/domain.structure.js +516 -160
- package/dist/v1/schema/validation/icon.d.ts +4 -0
- package/dist/v1/schema/validation/icon.js +29 -0
- package/dist/v1/schema/validation/json.json-schema.d.ts +40 -0
- package/dist/v1/schema/validation/json.json-schema.js +46 -0
- package/dist/v1/schema/validation/policy/budgets.d.ts +37 -2
- package/dist/v1/schema/validation/policy/budgets.js +94 -121
- package/dist/v1/schema/validation/policy/context.d.ts +6 -5
- package/dist/v1/schema/validation/policy/context.js +7 -10
- package/dist/v1/schema/validation/policy/objects.d.ts +1 -1
- package/dist/v1/schema/validation/policy/objects.js +6 -14
- package/dist/v1/schema/validation/policy/references.js +20 -62
- package/dist/v1/schema/validation/policy/typing.d.ts +3 -18
- package/dist/v1/schema/validation/policy/typing.js +22 -356
- package/dist/v1/schema/validation/policy/uses.d.ts +40 -3
- package/dist/v1/schema/validation/policy/uses.js +63 -91
- package/dist/v1/schema/validation/policy/validate.js +5 -5
- package/dist/v1/schema/validation/value-api.d.ts +27 -1
- package/dist/v1/schema/validation/value-api.js +37 -2
- package/dist/v1/schema/validation/value.d.ts +3 -0
- package/dist/v1/schema/validation/value.js +9 -17
- package/dist/v1/schema/validation/value.json-schema.d.ts +54 -0
- package/dist/v1/schema/validation/value.json-schema.js +163 -0
- package/dist/v1/schema/validation/view.js +4 -8
- package/dist/value/accept.d.ts +9 -3
- package/dist/value/accept.js +25 -1
- package/dist/value/canonical.d.ts +22 -1
- package/dist/value/canonical.js +114 -21
- package/dist/value/decode.d.ts +7 -0
- package/dist/value/decode.js +159 -9
- package/dist/value/equal.d.ts +9 -1
- package/dist/value/equal.js +37 -3
- package/dist/value/immutable.optimization.d.ts +2 -0
- package/dist/value/immutable.optimization.js +4 -0
- package/dist/value/index.d.ts +5 -3
- package/dist/value/index.js +2 -1
- package/dist/value/json.d.ts +2 -2
- package/dist/value/json.js +2 -2
- package/dist/value/limits.d.ts +11 -0
- package/dist/value/rule.d.ts +12 -0
- package/dist/value/rule.js +50 -0
- package/dist/value/types.d.ts +6 -0
- package/dist/value/unicode.d.ts +2 -1
- package/dist/value/unicode.js +2 -0
- package/package.json +15 -4
- package/dist/v1/builder/lowering/core-properties.d.ts +0 -10
- package/dist/v1/builder/lowering/core-properties.js +0 -76
- package/dist/v1/compiled/admission/semantics/cardinality.d.ts +0 -5
- package/dist/v1/compiled/admission/semantics/cardinality.js +0 -113
- package/dist/v1/compiled/admission/semantics/policy/equality.d.ts +0 -8
- package/dist/v1/compiled/admission/semantics/policy/equality.js +0 -27
- package/dist/v1/compiled/admission/semantics/policy/measure.d.ts +0 -9
- package/dist/v1/compiled/admission/semantics/policy/measure.js +0 -81
- package/dist/v1/compiled/admission/semantics/policy/variants.d.ts +0 -10
- package/dist/v1/compiled/admission/semantics/policy/variants.js +0 -65
- package/dist/v1/compiled/admission/wire/pattern.d.ts +0 -12
- package/dist/v1/compiled/admission/wire/pattern.js +0 -111
- package/dist/v1/language/class/index.d.ts +0 -8
- package/dist/v1/language/class/index.js +0 -1
- package/dist/v1/language/core/index.d.ts +0 -2
- package/dist/v1/language/value/index.d.ts +0 -11
- package/dist/v1/language/value/index.js +0 -8
- package/dist/v1/schema/canonical/domain.d.ts +0 -3
- package/dist/v1/schema/canonical/domain.digest.d.ts +0 -3
- package/dist/v1/schema/canonical/domain.digest.js +0 -5
- package/dist/v1/schema/canonical/domain.js +0 -5
- package/dist/v1/schema/canonical/freeze.d.ts +0 -1
- /package/dist/v1/{language/core/index.js → builder/class/input.js} +0 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.astrale.ai/dsl/v1/draft-2020-12",
|
|
4
|
+
"title": "JSON Schema Draft 2020-12",
|
|
5
|
+
"$comment": "The Draft 2020-12 meta-schemas the V1 value-schema dialect composes, each under its own $id, exactly as the validator of the dialect embeds them. With value-schema.schema.json, they resolve the dialect without a network fetch.",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"schema": {
|
|
8
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
9
|
+
"$id": "https://json-schema.org/draft/2020-12/schema",
|
|
10
|
+
"$vocabulary": {
|
|
11
|
+
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
12
|
+
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
13
|
+
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
|
|
14
|
+
"https://json-schema.org/draft/2020-12/vocab/validation": true,
|
|
15
|
+
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
|
|
16
|
+
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
|
|
17
|
+
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
18
|
+
},
|
|
19
|
+
"$dynamicAnchor": "meta",
|
|
20
|
+
"title": "Core and Validation specifications meta-schema",
|
|
21
|
+
"allOf": [
|
|
22
|
+
{
|
|
23
|
+
"$ref": "meta/core"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"$ref": "meta/applicator"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"$ref": "meta/unevaluated"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"$ref": "meta/validation"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"$ref": "meta/meta-data"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"$ref": "meta/format-annotation"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"$ref": "meta/content"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"type": [
|
|
45
|
+
"object",
|
|
46
|
+
"boolean"
|
|
47
|
+
],
|
|
48
|
+
"$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
|
|
49
|
+
"properties": {
|
|
50
|
+
"definitions": {
|
|
51
|
+
"$comment": "\"definitions\" has been replaced by \"$defs\".",
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": {
|
|
54
|
+
"$dynamicRef": "#meta"
|
|
55
|
+
},
|
|
56
|
+
"deprecated": true,
|
|
57
|
+
"default": {}
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": {
|
|
63
|
+
"anyOf": [
|
|
64
|
+
{
|
|
65
|
+
"$dynamicRef": "#meta"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"$ref": "meta/validation#/$defs/stringArray"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"deprecated": true,
|
|
73
|
+
"default": {}
|
|
74
|
+
},
|
|
75
|
+
"$recursiveAnchor": {
|
|
76
|
+
"$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",
|
|
77
|
+
"$ref": "meta/core#/$defs/anchorString",
|
|
78
|
+
"deprecated": true
|
|
79
|
+
},
|
|
80
|
+
"$recursiveRef": {
|
|
81
|
+
"$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
|
|
82
|
+
"$ref": "meta/core#/$defs/uriReferenceString",
|
|
83
|
+
"deprecated": true
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"core": {
|
|
88
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
89
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/core",
|
|
90
|
+
"$vocabulary": {
|
|
91
|
+
"https://json-schema.org/draft/2020-12/vocab/core": true
|
|
92
|
+
},
|
|
93
|
+
"$dynamicAnchor": "meta",
|
|
94
|
+
"title": "Core vocabulary meta-schema",
|
|
95
|
+
"type": [
|
|
96
|
+
"object",
|
|
97
|
+
"boolean"
|
|
98
|
+
],
|
|
99
|
+
"properties": {
|
|
100
|
+
"$id": {
|
|
101
|
+
"$ref": "#/$defs/uriReferenceString",
|
|
102
|
+
"$comment": "Non-empty fragments not allowed.",
|
|
103
|
+
"pattern": "^[^#]*#?$"
|
|
104
|
+
},
|
|
105
|
+
"$schema": {
|
|
106
|
+
"$ref": "#/$defs/uriString"
|
|
107
|
+
},
|
|
108
|
+
"$ref": {
|
|
109
|
+
"$ref": "#/$defs/uriReferenceString"
|
|
110
|
+
},
|
|
111
|
+
"$anchor": {
|
|
112
|
+
"$ref": "#/$defs/anchorString"
|
|
113
|
+
},
|
|
114
|
+
"$dynamicRef": {
|
|
115
|
+
"$ref": "#/$defs/uriReferenceString"
|
|
116
|
+
},
|
|
117
|
+
"$dynamicAnchor": {
|
|
118
|
+
"$ref": "#/$defs/anchorString"
|
|
119
|
+
},
|
|
120
|
+
"$vocabulary": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"propertyNames": {
|
|
123
|
+
"$ref": "#/$defs/uriString"
|
|
124
|
+
},
|
|
125
|
+
"additionalProperties": {
|
|
126
|
+
"type": "boolean"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"$comment": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
"$defs": {
|
|
133
|
+
"type": "object",
|
|
134
|
+
"additionalProperties": {
|
|
135
|
+
"$dynamicRef": "#meta"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"$defs": {
|
|
140
|
+
"anchorString": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
|
|
143
|
+
},
|
|
144
|
+
"uriString": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"format": "uri"
|
|
147
|
+
},
|
|
148
|
+
"uriReferenceString": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"format": "uri-reference"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"applicator": {
|
|
155
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
156
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/applicator",
|
|
157
|
+
"$vocabulary": {
|
|
158
|
+
"https://json-schema.org/draft/2020-12/vocab/applicator": true
|
|
159
|
+
},
|
|
160
|
+
"$dynamicAnchor": "meta",
|
|
161
|
+
"title": "Applicator vocabulary meta-schema",
|
|
162
|
+
"type": [
|
|
163
|
+
"object",
|
|
164
|
+
"boolean"
|
|
165
|
+
],
|
|
166
|
+
"properties": {
|
|
167
|
+
"prefixItems": {
|
|
168
|
+
"$ref": "#/$defs/schemaArray"
|
|
169
|
+
},
|
|
170
|
+
"items": {
|
|
171
|
+
"$dynamicRef": "#meta"
|
|
172
|
+
},
|
|
173
|
+
"contains": {
|
|
174
|
+
"$dynamicRef": "#meta"
|
|
175
|
+
},
|
|
176
|
+
"additionalProperties": {
|
|
177
|
+
"$dynamicRef": "#meta"
|
|
178
|
+
},
|
|
179
|
+
"properties": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"additionalProperties": {
|
|
182
|
+
"$dynamicRef": "#meta"
|
|
183
|
+
},
|
|
184
|
+
"default": {}
|
|
185
|
+
},
|
|
186
|
+
"patternProperties": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"additionalProperties": {
|
|
189
|
+
"$dynamicRef": "#meta"
|
|
190
|
+
},
|
|
191
|
+
"propertyNames": {
|
|
192
|
+
"format": "regex"
|
|
193
|
+
},
|
|
194
|
+
"default": {}
|
|
195
|
+
},
|
|
196
|
+
"dependentSchemas": {
|
|
197
|
+
"type": "object",
|
|
198
|
+
"additionalProperties": {
|
|
199
|
+
"$dynamicRef": "#meta"
|
|
200
|
+
},
|
|
201
|
+
"default": {}
|
|
202
|
+
},
|
|
203
|
+
"propertyNames": {
|
|
204
|
+
"$dynamicRef": "#meta"
|
|
205
|
+
},
|
|
206
|
+
"if": {
|
|
207
|
+
"$dynamicRef": "#meta"
|
|
208
|
+
},
|
|
209
|
+
"then": {
|
|
210
|
+
"$dynamicRef": "#meta"
|
|
211
|
+
},
|
|
212
|
+
"else": {
|
|
213
|
+
"$dynamicRef": "#meta"
|
|
214
|
+
},
|
|
215
|
+
"allOf": {
|
|
216
|
+
"$ref": "#/$defs/schemaArray"
|
|
217
|
+
},
|
|
218
|
+
"anyOf": {
|
|
219
|
+
"$ref": "#/$defs/schemaArray"
|
|
220
|
+
},
|
|
221
|
+
"oneOf": {
|
|
222
|
+
"$ref": "#/$defs/schemaArray"
|
|
223
|
+
},
|
|
224
|
+
"not": {
|
|
225
|
+
"$dynamicRef": "#meta"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"$defs": {
|
|
229
|
+
"schemaArray": {
|
|
230
|
+
"type": "array",
|
|
231
|
+
"minItems": 1,
|
|
232
|
+
"items": {
|
|
233
|
+
"$dynamicRef": "#meta"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"unevaluated": {
|
|
239
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
240
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/unevaluated",
|
|
241
|
+
"$vocabulary": {
|
|
242
|
+
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true
|
|
243
|
+
},
|
|
244
|
+
"$dynamicAnchor": "meta",
|
|
245
|
+
"title": "Unevaluated applicator vocabulary meta-schema",
|
|
246
|
+
"type": [
|
|
247
|
+
"object",
|
|
248
|
+
"boolean"
|
|
249
|
+
],
|
|
250
|
+
"properties": {
|
|
251
|
+
"unevaluatedItems": {
|
|
252
|
+
"$dynamicRef": "#meta"
|
|
253
|
+
},
|
|
254
|
+
"unevaluatedProperties": {
|
|
255
|
+
"$dynamicRef": "#meta"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"validation": {
|
|
260
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
261
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/validation",
|
|
262
|
+
"$vocabulary": {
|
|
263
|
+
"https://json-schema.org/draft/2020-12/vocab/validation": true
|
|
264
|
+
},
|
|
265
|
+
"$dynamicAnchor": "meta",
|
|
266
|
+
"title": "Validation vocabulary meta-schema",
|
|
267
|
+
"type": [
|
|
268
|
+
"object",
|
|
269
|
+
"boolean"
|
|
270
|
+
],
|
|
271
|
+
"properties": {
|
|
272
|
+
"type": {
|
|
273
|
+
"anyOf": [
|
|
274
|
+
{
|
|
275
|
+
"$ref": "#/$defs/simpleTypes"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"type": "array",
|
|
279
|
+
"items": {
|
|
280
|
+
"$ref": "#/$defs/simpleTypes"
|
|
281
|
+
},
|
|
282
|
+
"minItems": 1,
|
|
283
|
+
"uniqueItems": true
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
"const": true,
|
|
288
|
+
"enum": {
|
|
289
|
+
"type": "array",
|
|
290
|
+
"items": true
|
|
291
|
+
},
|
|
292
|
+
"multipleOf": {
|
|
293
|
+
"type": "number",
|
|
294
|
+
"exclusiveMinimum": 0
|
|
295
|
+
},
|
|
296
|
+
"maximum": {
|
|
297
|
+
"type": "number"
|
|
298
|
+
},
|
|
299
|
+
"exclusiveMaximum": {
|
|
300
|
+
"type": "number"
|
|
301
|
+
},
|
|
302
|
+
"minimum": {
|
|
303
|
+
"type": "number"
|
|
304
|
+
},
|
|
305
|
+
"exclusiveMinimum": {
|
|
306
|
+
"type": "number"
|
|
307
|
+
},
|
|
308
|
+
"maxLength": {
|
|
309
|
+
"$ref": "#/$defs/nonNegativeInteger"
|
|
310
|
+
},
|
|
311
|
+
"minLength": {
|
|
312
|
+
"$ref": "#/$defs/nonNegativeIntegerDefault0"
|
|
313
|
+
},
|
|
314
|
+
"pattern": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"format": "regex"
|
|
317
|
+
},
|
|
318
|
+
"maxItems": {
|
|
319
|
+
"$ref": "#/$defs/nonNegativeInteger"
|
|
320
|
+
},
|
|
321
|
+
"minItems": {
|
|
322
|
+
"$ref": "#/$defs/nonNegativeIntegerDefault0"
|
|
323
|
+
},
|
|
324
|
+
"uniqueItems": {
|
|
325
|
+
"type": "boolean",
|
|
326
|
+
"default": false
|
|
327
|
+
},
|
|
328
|
+
"maxContains": {
|
|
329
|
+
"$ref": "#/$defs/nonNegativeInteger"
|
|
330
|
+
},
|
|
331
|
+
"minContains": {
|
|
332
|
+
"$ref": "#/$defs/nonNegativeInteger",
|
|
333
|
+
"default": 1
|
|
334
|
+
},
|
|
335
|
+
"maxProperties": {
|
|
336
|
+
"$ref": "#/$defs/nonNegativeInteger"
|
|
337
|
+
},
|
|
338
|
+
"minProperties": {
|
|
339
|
+
"$ref": "#/$defs/nonNegativeIntegerDefault0"
|
|
340
|
+
},
|
|
341
|
+
"required": {
|
|
342
|
+
"$ref": "#/$defs/stringArray"
|
|
343
|
+
},
|
|
344
|
+
"dependentRequired": {
|
|
345
|
+
"type": "object",
|
|
346
|
+
"additionalProperties": {
|
|
347
|
+
"$ref": "#/$defs/stringArray"
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"$defs": {
|
|
352
|
+
"nonNegativeInteger": {
|
|
353
|
+
"type": "integer",
|
|
354
|
+
"minimum": 0
|
|
355
|
+
},
|
|
356
|
+
"nonNegativeIntegerDefault0": {
|
|
357
|
+
"$ref": "#/$defs/nonNegativeInteger",
|
|
358
|
+
"default": 0
|
|
359
|
+
},
|
|
360
|
+
"simpleTypes": {
|
|
361
|
+
"enum": [
|
|
362
|
+
"array",
|
|
363
|
+
"boolean",
|
|
364
|
+
"integer",
|
|
365
|
+
"null",
|
|
366
|
+
"number",
|
|
367
|
+
"object",
|
|
368
|
+
"string"
|
|
369
|
+
]
|
|
370
|
+
},
|
|
371
|
+
"stringArray": {
|
|
372
|
+
"type": "array",
|
|
373
|
+
"items": {
|
|
374
|
+
"type": "string"
|
|
375
|
+
},
|
|
376
|
+
"uniqueItems": true,
|
|
377
|
+
"default": []
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"meta-data": {
|
|
382
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
383
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/meta-data",
|
|
384
|
+
"$vocabulary": {
|
|
385
|
+
"https://json-schema.org/draft/2020-12/vocab/meta-data": true
|
|
386
|
+
},
|
|
387
|
+
"$dynamicAnchor": "meta",
|
|
388
|
+
"title": "Meta-data vocabulary meta-schema",
|
|
389
|
+
"type": [
|
|
390
|
+
"object",
|
|
391
|
+
"boolean"
|
|
392
|
+
],
|
|
393
|
+
"properties": {
|
|
394
|
+
"title": {
|
|
395
|
+
"type": "string"
|
|
396
|
+
},
|
|
397
|
+
"description": {
|
|
398
|
+
"type": "string"
|
|
399
|
+
},
|
|
400
|
+
"default": true,
|
|
401
|
+
"deprecated": {
|
|
402
|
+
"type": "boolean",
|
|
403
|
+
"default": false
|
|
404
|
+
},
|
|
405
|
+
"readOnly": {
|
|
406
|
+
"type": "boolean",
|
|
407
|
+
"default": false
|
|
408
|
+
},
|
|
409
|
+
"writeOnly": {
|
|
410
|
+
"type": "boolean",
|
|
411
|
+
"default": false
|
|
412
|
+
},
|
|
413
|
+
"examples": {
|
|
414
|
+
"type": "array",
|
|
415
|
+
"items": true
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"format-annotation": {
|
|
420
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
421
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/format-annotation",
|
|
422
|
+
"$vocabulary": {
|
|
423
|
+
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true
|
|
424
|
+
},
|
|
425
|
+
"$dynamicAnchor": "meta",
|
|
426
|
+
"title": "Format vocabulary meta-schema for annotation results",
|
|
427
|
+
"type": [
|
|
428
|
+
"object",
|
|
429
|
+
"boolean"
|
|
430
|
+
],
|
|
431
|
+
"properties": {
|
|
432
|
+
"format": {
|
|
433
|
+
"type": "string"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
"content": {
|
|
438
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
439
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/content",
|
|
440
|
+
"$vocabulary": {
|
|
441
|
+
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
442
|
+
},
|
|
443
|
+
"$dynamicAnchor": "meta",
|
|
444
|
+
"title": "Content vocabulary meta-schema",
|
|
445
|
+
"type": [
|
|
446
|
+
"object",
|
|
447
|
+
"boolean"
|
|
448
|
+
],
|
|
449
|
+
"properties": {
|
|
450
|
+
"contentEncoding": {
|
|
451
|
+
"type": "string"
|
|
452
|
+
},
|
|
453
|
+
"contentMediaType": {
|
|
454
|
+
"type": "string"
|
|
455
|
+
},
|
|
456
|
+
"contentSchema": {
|
|
457
|
+
"$dynamicRef": "#meta"
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.astrale.ai/dsl/v1/value-schema",
|
|
4
|
+
"$dynamicAnchor": "meta",
|
|
5
|
+
"$vocabulary": {
|
|
6
|
+
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
7
|
+
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
8
|
+
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
|
|
9
|
+
"https://json-schema.org/draft/2020-12/vocab/validation": true,
|
|
10
|
+
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
|
|
11
|
+
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
|
|
12
|
+
"https://json-schema.org/draft/2020-12/vocab/content": true,
|
|
13
|
+
"https://schemas.astrale.ai/dsl/v1/value-schema/vocabulary": true
|
|
14
|
+
},
|
|
15
|
+
"title": "Astrale V1 value schema",
|
|
16
|
+
"$comment": "The meta-schema of the V1 value-schema dialect: Draft 2020-12 and the required Astrale vocabulary (fullMatch, x-astrale-file, x-astrale-path, x-astrale-value-kind). Its $dynamicAnchor extends Draft 2020-12 at every subschema, not only the root. The rules of the profile beyond it are published as schema.values.RULES.",
|
|
17
|
+
"allOf": [{ "$ref": "https://json-schema.org/draft/2020-12/schema" }],
|
|
18
|
+
"properties": {
|
|
19
|
+
"fullMatch": { "type": "string" },
|
|
20
|
+
"x-astrale-file": { "type": "object" },
|
|
21
|
+
"x-astrale-path": { "type": "object" }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CallablePolicy } from '../policy/model/policy.js';
|
|
2
|
+
/**
|
|
3
|
+
* The language ceiling of a declared admission age, in seconds. Raising it later widens the
|
|
4
|
+
* language; lowering it would refuse accepted Schemas.
|
|
5
|
+
*/
|
|
6
|
+
export declare const MAXIMUM_ADMISSION_AGE_SECONDS = 300;
|
|
7
|
+
/** Whether `value` is a declarable admission age: an integer from 1 to the language ceiling. */
|
|
8
|
+
export declare function isAdmissionMaxAge(value: unknown): value is number;
|
|
9
|
+
/**
|
|
10
|
+
* The input fields an admission of this callable reads: the `field` of every `input` check object
|
|
11
|
+
* of its Policy, unique and in Unicode code-point order. A callable without Policy checks reads no
|
|
12
|
+
* input field. Two calls that agree on these fields, and on everything else the admission reads,
|
|
13
|
+
* receive the same admission.
|
|
14
|
+
*/
|
|
15
|
+
export declare function admissionInputFields(policy: CallablePolicy | undefined): readonly string[];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { compareUnicode } from '../../addressing/ordering.js';
|
|
2
|
+
import { PolicyComposition } from '../policy/model/policy.js';
|
|
3
|
+
/**
|
|
4
|
+
* The language ceiling of a declared admission age, in seconds. Raising it later widens the
|
|
5
|
+
* language; lowering it would refuse accepted Schemas.
|
|
6
|
+
*/
|
|
7
|
+
export const MAXIMUM_ADMISSION_AGE_SECONDS = 300;
|
|
8
|
+
/** Whether `value` is a declarable admission age: an integer from 1 to the language ceiling. */
|
|
9
|
+
export function isAdmissionMaxAge(value) {
|
|
10
|
+
return (typeof value === 'number' &&
|
|
11
|
+
Number.isInteger(value) &&
|
|
12
|
+
value >= 1 &&
|
|
13
|
+
value <= MAXIMUM_ADMISSION_AGE_SECONDS);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The input fields an admission of this callable reads: the `field` of every `input` check object
|
|
17
|
+
* of its Policy, unique and in Unicode code-point order. A callable without Policy checks reads no
|
|
18
|
+
* input field. Two calls that agree on these fields, and on everything else the admission reads,
|
|
19
|
+
* receive the same admission.
|
|
20
|
+
*/
|
|
21
|
+
export function admissionInputFields(policy) {
|
|
22
|
+
if (policy === undefined || policy === true)
|
|
23
|
+
return Object.freeze([]);
|
|
24
|
+
const fields = new Set();
|
|
25
|
+
collectInputFields(policy, fields);
|
|
26
|
+
return Object.freeze([...fields].sort(compareUnicode));
|
|
27
|
+
}
|
|
28
|
+
function collectInputFields(expression, fields) {
|
|
29
|
+
if ('check' in expression) {
|
|
30
|
+
if (expression.object.kind === 'input')
|
|
31
|
+
fields.add(expression.object.field);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if ('sameNode' in expression) {
|
|
35
|
+
for (const object of [expression.sameNode.left, expression.sameNode.right]) {
|
|
36
|
+
if (object.kind === 'input')
|
|
37
|
+
fields.add(object.field);
|
|
38
|
+
}
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
for (const child of PolicyComposition.of(expression).operands) {
|
|
42
|
+
collectInputFields(child, fields);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -21,6 +21,15 @@ export type OutputMode = CallableOutput['mode'];
|
|
|
21
21
|
export interface CallableExecution {
|
|
22
22
|
readonly durable: boolean;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Admission age of a callable: how old, in whole seconds, the admission decision used for one of its
|
|
26
|
+
* calls may be. A destination may reuse an admission it received within that age; a Runtime that
|
|
27
|
+
* never reuses one conforms. Absent means every call is admitted afresh, and `maxAge` is an integer
|
|
28
|
+
* from 1 to `MAXIMUM_ADMISSION_AGE_SECONDS`.
|
|
29
|
+
*/
|
|
30
|
+
export interface CallableAdmission {
|
|
31
|
+
readonly maxAge: number;
|
|
32
|
+
}
|
|
24
33
|
/** A binary Function receives portable metadata and one required byte stream. */
|
|
25
34
|
export interface BinaryInput {
|
|
26
35
|
readonly mode: 'binary';
|
|
@@ -39,6 +48,7 @@ export interface CallableDefinitionBase<Input extends CallableInputContract = Ca
|
|
|
39
48
|
readonly input: Input;
|
|
40
49
|
readonly output: CallableOutput;
|
|
41
50
|
readonly execution?: CallableExecution;
|
|
51
|
+
readonly admission?: CallableAdmission;
|
|
42
52
|
}
|
|
43
53
|
export type CallableDefinition<Input extends CallableInputContract = CallableInputContract> = CallableDefinitionBase<Input> & ({
|
|
44
54
|
readonly auth: 'anonymous' | 'authenticated';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { StructuralOptions } from '@astrale-os/kernel-dsl/value';
|
|
1
2
|
import type { DefinitionKey, FunctionRef, Key, MethodKey } from '../../addressing/index.js';
|
|
2
3
|
import type { ResolvedClass } from '../class/resolved.js';
|
|
3
4
|
import type { CallablePolicy } from '../policy/model/policy.js';
|
|
4
5
|
import type { Diagnostic } from '../validation/diagnostic.js';
|
|
5
|
-
import type { BinaryInputProjection, CallableExecution, FunctionDefinition, MethodDefinition } from './model/callable.js';
|
|
6
|
+
import type { BinaryInputProjection, CallableAdmission, CallableExecution, FunctionDefinition, MethodDefinition } from './model/callable.js';
|
|
6
7
|
import type { FunctionAuth } from './model/callable.js';
|
|
7
8
|
type CallableDefinitionOf<Definition extends FunctionDefinition | MethodDefinition, Auth extends FunctionAuth, Policy extends CallablePolicy> = Omit<Definition, 'auth' | 'policy'> & (Auth extends FunctionAuth ? {
|
|
8
9
|
readonly auth: Auth;
|
|
@@ -22,6 +23,8 @@ export interface ResolvedMethod<out Input = unknown, out Output = unknown, out S
|
|
|
22
23
|
readonly output: MethodDefinition['output'];
|
|
23
24
|
/** Present only for a durable Method. */
|
|
24
25
|
readonly execution?: CallableExecution;
|
|
26
|
+
/** Present only when the Method declares an admission age. */
|
|
27
|
+
readonly admission?: CallableAdmission;
|
|
25
28
|
readonly auth: Auth;
|
|
26
29
|
readonly policy?: Auth extends 'authorized' ? Policy : never;
|
|
27
30
|
readonly static: Static;
|
|
@@ -34,9 +37,17 @@ export interface ResolvedMethod<out Input = unknown, out Output = unknown, out S
|
|
|
34
37
|
readonly static: Static;
|
|
35
38
|
readonly abstract: Abstract;
|
|
36
39
|
};
|
|
37
|
-
|
|
40
|
+
/**
|
|
41
|
+
* The issues of `input` against the callable's input schema, `options` overriding the portable
|
|
42
|
+
* limits it is admitted under: those it crossed the wire under, for a call's input.
|
|
43
|
+
*/
|
|
44
|
+
validateInput(input: unknown, options?: StructuralOptions): readonly Diagnostic[];
|
|
38
45
|
validateInputField(field: string, input: unknown): readonly Diagnostic[];
|
|
39
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The issues of `output` against the callable's output schema, `options` overriding the portable
|
|
48
|
+
* limits it is admitted under: a value judged for size in another form is held to the schema alone.
|
|
49
|
+
*/
|
|
50
|
+
validateOutput(output: unknown, options?: StructuralOptions): readonly Diagnostic[];
|
|
40
51
|
readonly __input?: Input;
|
|
41
52
|
readonly __output?: Output;
|
|
42
53
|
}
|
|
@@ -53,14 +64,24 @@ export interface ResolvedFunction<out Input = unknown, out Output = unknown, out
|
|
|
53
64
|
readonly output: FunctionDefinition['output'];
|
|
54
65
|
/** Present only for a durable Function. */
|
|
55
66
|
readonly execution?: CallableExecution;
|
|
67
|
+
/** Present only when the Function declares an admission age. */
|
|
68
|
+
readonly admission?: CallableAdmission;
|
|
56
69
|
readonly auth: Auth;
|
|
57
70
|
readonly policy?: Auth extends 'authorized' ? Policy : never;
|
|
58
71
|
/** Present only when the callable input is a safely enumerable closed object. */
|
|
59
72
|
readonly inputFields?: readonly string[];
|
|
60
73
|
readonly definition: CallableDefinitionOf<FunctionDefinition, Auth, Policy>;
|
|
61
|
-
|
|
74
|
+
/**
|
|
75
|
+
* The issues of `input` against the callable's input schema, `options` overriding the portable
|
|
76
|
+
* limits it is admitted under: those it crossed the wire under, for a call's input.
|
|
77
|
+
*/
|
|
78
|
+
validateInput(input: unknown, options?: StructuralOptions): readonly Diagnostic[];
|
|
62
79
|
validateInputField(field: string, input: unknown): readonly Diagnostic[];
|
|
63
|
-
|
|
80
|
+
/**
|
|
81
|
+
* The issues of `output` against the callable's output schema, `options` overriding the portable
|
|
82
|
+
* limits it is admitted under: a value judged for size in another form is held to the schema alone.
|
|
83
|
+
*/
|
|
84
|
+
validateOutput(output: unknown, options?: StructuralOptions): readonly Diagnostic[];
|
|
64
85
|
readonly __input?: Input;
|
|
65
86
|
readonly __output?: Output;
|
|
66
87
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How many edges the longest chain from each node holds, for every node `nodes` reach: a direct
|
|
3
|
+
* target is at depth 1. A depth limit bounds how long a chain is and not how many chains share a
|
|
4
|
+
* node, so the walk reads each node once, and it holds its own stack. A node read again before its
|
|
5
|
+
* own chain ends sits on a cycle and adds nothing more, so a cycle counts once round.
|
|
6
|
+
*/
|
|
7
|
+
export declare function chainDepths<Node>(nodes: Iterable<Node>, targetsOf: (node: Node) => Iterable<Node>): ReadonlyMap<Node, number>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { runSuspended } from './suspended.js';
|
|
2
|
+
/**
|
|
3
|
+
* How many edges the longest chain from each node holds, for every node `nodes` reach: a direct
|
|
4
|
+
* target is at depth 1. A depth limit bounds how long a chain is and not how many chains share a
|
|
5
|
+
* node, so the walk reads each node once, and it holds its own stack. A node read again before its
|
|
6
|
+
* own chain ends sits on a cycle and adds nothing more, so a cycle counts once round.
|
|
7
|
+
*/
|
|
8
|
+
export function chainDepths(nodes, targetsOf) {
|
|
9
|
+
const depths = new Map();
|
|
10
|
+
function* depthOf(node) {
|
|
11
|
+
const known = depths.get(node);
|
|
12
|
+
if (known !== undefined)
|
|
13
|
+
return known;
|
|
14
|
+
depths.set(node, 0);
|
|
15
|
+
let depth = 0;
|
|
16
|
+
for (const target of targetsOf(node))
|
|
17
|
+
depth = Math.max(depth, 1 + (yield depthOf(target)));
|
|
18
|
+
depths.set(node, depth);
|
|
19
|
+
return depth;
|
|
20
|
+
}
|
|
21
|
+
for (const node of nodes)
|
|
22
|
+
runSuspended(depthOf(node));
|
|
23
|
+
return depths;
|
|
24
|
+
}
|