@astrale-os/kernel-core 0.4.1
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/access.d.ts +48 -0
- package/dist/auth/access.d.ts.map +1 -0
- package/dist/auth/access.js +2 -0
- package/dist/auth/access.js.map +1 -0
- package/dist/auth/attestation/index.d.ts +2 -0
- package/dist/auth/attestation/index.d.ts.map +1 -0
- package/dist/auth/attestation/index.js +2 -0
- package/dist/auth/attestation/index.js.map +1 -0
- package/dist/auth/attestation/types.d.ts +5 -0
- package/dist/auth/attestation/types.d.ts.map +1 -0
- package/dist/auth/attestation/types.js +2 -0
- package/dist/auth/attestation/types.js.map +1 -0
- package/dist/auth/audience/errors.d.ts +8 -0
- package/dist/auth/audience/errors.d.ts.map +1 -0
- package/dist/auth/audience/errors.js +15 -0
- package/dist/auth/audience/errors.js.map +1 -0
- package/dist/auth/audience/index.d.ts +3 -0
- package/dist/auth/audience/index.d.ts.map +1 -0
- package/dist/auth/audience/index.js +3 -0
- package/dist/auth/audience/index.js.map +1 -0
- package/dist/auth/audience/verify-audience.d.ts +4 -0
- package/dist/auth/audience/verify-audience.d.ts.map +1 -0
- package/dist/auth/audience/verify-audience.js +18 -0
- package/dist/auth/audience/verify-audience.js.map +1 -0
- package/dist/auth/claims/errors.d.ts +22 -0
- package/dist/auth/claims/errors.d.ts.map +1 -0
- package/dist/auth/claims/errors.js +33 -0
- package/dist/auth/claims/errors.js.map +1 -0
- package/dist/auth/claims/index.d.ts +4 -0
- package/dist/auth/claims/index.d.ts.map +1 -0
- package/dist/auth/claims/index.js +4 -0
- package/dist/auth/claims/index.js.map +1 -0
- package/dist/auth/claims/required-claims.d.ts +16 -0
- package/dist/auth/claims/required-claims.d.ts.map +1 -0
- package/dist/auth/claims/required-claims.js +41 -0
- package/dist/auth/claims/required-claims.js.map +1 -0
- package/dist/auth/claims/types.d.ts +33 -0
- package/dist/auth/claims/types.d.ts.map +1 -0
- package/dist/auth/claims/types.js +17 -0
- package/dist/auth/claims/types.js.map +1 -0
- package/dist/auth/context.d.ts +23 -0
- package/dist/auth/context.d.ts.map +1 -0
- package/dist/auth/context.js +2 -0
- package/dist/auth/context.js.map +1 -0
- package/dist/auth/credentials/decode.d.ts +4 -0
- package/dist/auth/credentials/decode.d.ts.map +1 -0
- package/dist/auth/credentials/decode.js +7 -0
- package/dist/auth/credentials/decode.js.map +1 -0
- package/dist/auth/credentials/envelope.d.ts +15 -0
- package/dist/auth/credentials/envelope.d.ts.map +1 -0
- package/dist/auth/credentials/envelope.js +52 -0
- package/dist/auth/credentials/envelope.js.map +1 -0
- package/dist/auth/credentials/errors.d.ts +26 -0
- package/dist/auth/credentials/errors.d.ts.map +1 -0
- package/dist/auth/credentials/errors.js +37 -0
- package/dist/auth/credentials/errors.js.map +1 -0
- package/dist/auth/credentials/index.d.ts +6 -0
- package/dist/auth/credentials/index.d.ts.map +1 -0
- package/dist/auth/credentials/index.js +6 -0
- package/dist/auth/credentials/index.js.map +1 -0
- package/dist/auth/credentials/types.d.ts +19 -0
- package/dist/auth/credentials/types.d.ts.map +1 -0
- package/dist/auth/credentials/types.js +2 -0
- package/dist/auth/credentials/types.js.map +1 -0
- package/dist/auth/credentials/verify.d.ts +16 -0
- package/dist/auth/credentials/verify.d.ts.map +1 -0
- package/dist/auth/credentials/verify.js +12 -0
- package/dist/auth/credentials/verify.js.map +1 -0
- package/dist/auth/delegation/index.d.ts +2 -0
- package/dist/auth/delegation/index.d.ts.map +1 -0
- package/dist/auth/delegation/index.js +2 -0
- package/dist/auth/delegation/index.js.map +1 -0
- package/dist/auth/delegation/types.d.ts +6 -0
- package/dist/auth/delegation/types.d.ts.map +1 -0
- package/dist/auth/delegation/types.js +2 -0
- package/dist/auth/delegation/types.js.map +1 -0
- package/dist/auth/expression/buffer.d.ts +28 -0
- package/dist/auth/expression/buffer.d.ts.map +1 -0
- package/dist/auth/expression/buffer.js +101 -0
- package/dist/auth/expression/buffer.js.map +1 -0
- package/dist/auth/expression/builder.d.ts +177 -0
- package/dist/auth/expression/builder.d.ts.map +1 -0
- package/dist/auth/expression/builder.js +287 -0
- package/dist/auth/expression/builder.js.map +1 -0
- package/dist/auth/expression/codec.d.ts +28 -0
- package/dist/auth/expression/codec.d.ts.map +1 -0
- package/dist/auth/expression/codec.js +123 -0
- package/dist/auth/expression/codec.js.map +1 -0
- package/dist/auth/expression/compact.d.ts +24 -0
- package/dist/auth/expression/compact.d.ts.map +1 -0
- package/dist/auth/expression/compact.js +143 -0
- package/dist/auth/expression/compact.js.map +1 -0
- package/dist/auth/expression/dedup.d.ts +122 -0
- package/dist/auth/expression/dedup.d.ts.map +1 -0
- package/dist/auth/expression/dedup.js +290 -0
- package/dist/auth/expression/dedup.js.map +1 -0
- package/dist/auth/expression/encoding.d.ts +31 -0
- package/dist/auth/expression/encoding.d.ts.map +1 -0
- package/dist/auth/expression/encoding.js +345 -0
- package/dist/auth/expression/encoding.js.map +1 -0
- package/dist/auth/expression/index.d.ts +11 -0
- package/dist/auth/expression/index.d.ts.map +1 -0
- package/dist/auth/expression/index.js +11 -0
- package/dist/auth/expression/index.js.map +1 -0
- package/dist/auth/expression/prune.d.ts +41 -0
- package/dist/auth/expression/prune.d.ts.map +1 -0
- package/dist/auth/expression/prune.js +144 -0
- package/dist/auth/expression/prune.js.map +1 -0
- package/dist/auth/expression/scope.d.ts +81 -0
- package/dist/auth/expression/scope.d.ts.map +1 -0
- package/dist/auth/expression/scope.js +192 -0
- package/dist/auth/expression/scope.js.map +1 -0
- package/dist/auth/expression/types.d.ts +122 -0
- package/dist/auth/expression/types.d.ts.map +1 -0
- package/dist/auth/expression/types.js +2 -0
- package/dist/auth/expression/types.js.map +1 -0
- package/dist/auth/expression/validation.d.ts +35 -0
- package/dist/auth/expression/validation.d.ts.map +1 -0
- package/dist/auth/expression/validation.js +108 -0
- package/dist/auth/expression/validation.js.map +1 -0
- package/dist/auth/expression/zod.d.ts +19 -0
- package/dist/auth/expression/zod.d.ts.map +1 -0
- package/dist/auth/expression/zod.js +58 -0
- package/dist/auth/expression/zod.js.map +1 -0
- package/dist/auth/frozen/errors.d.ts +5 -0
- package/dist/auth/frozen/errors.d.ts.map +1 -0
- package/dist/auth/frozen/errors.js +8 -0
- package/dist/auth/frozen/errors.js.map +1 -0
- package/dist/auth/frozen/index.d.ts +3 -0
- package/dist/auth/frozen/index.d.ts.map +1 -0
- package/dist/auth/frozen/index.js +3 -0
- package/dist/auth/frozen/index.js.map +1 -0
- package/dist/auth/frozen/verify-frozen.d.ts +9 -0
- package/dist/auth/frozen/verify-frozen.d.ts.map +1 -0
- package/dist/auth/frozen/verify-frozen.js +13 -0
- package/dist/auth/frozen/verify-frozen.js.map +1 -0
- package/dist/auth/grants/constants.d.ts +4 -0
- package/dist/auth/grants/constants.d.ts.map +1 -0
- package/dist/auth/grants/constants.js +4 -0
- package/dist/auth/grants/constants.js.map +1 -0
- package/dist/auth/grants/errors.d.ts +57 -0
- package/dist/auth/grants/errors.d.ts.map +1 -0
- package/dist/auth/grants/errors.js +106 -0
- package/dist/auth/grants/errors.js.map +1 -0
- package/dist/auth/grants/grant-decoder.d.ts +40 -0
- package/dist/auth/grants/grant-decoder.d.ts.map +1 -0
- package/dist/auth/grants/grant-decoder.js +141 -0
- package/dist/auth/grants/grant-decoder.js.map +1 -0
- package/dist/auth/grants/grant-encoding.d.ts +47 -0
- package/dist/auth/grants/grant-encoding.d.ts.map +1 -0
- package/dist/auth/grants/grant-encoding.js +85 -0
- package/dist/auth/grants/grant-encoding.js.map +1 -0
- package/dist/auth/grants/index.d.ts +6 -0
- package/dist/auth/grants/index.d.ts.map +1 -0
- package/dist/auth/grants/index.js +6 -0
- package/dist/auth/grants/index.js.map +1 -0
- package/dist/auth/grants/types.d.ts +27 -0
- package/dist/auth/grants/types.d.ts.map +1 -0
- package/dist/auth/grants/types.js +5 -0
- package/dist/auth/grants/types.js.map +1 -0
- package/dist/auth/identity/index.d.ts +3 -0
- package/dist/auth/identity/index.d.ts.map +1 -0
- package/dist/auth/identity/index.js +3 -0
- package/dist/auth/identity/index.js.map +1 -0
- package/dist/auth/identity/types.d.ts +51 -0
- package/dist/auth/identity/types.d.ts.map +1 -0
- package/dist/auth/identity/types.js +23 -0
- package/dist/auth/identity/types.js.map +1 -0
- package/dist/auth/identity/verify.d.ts +3 -0
- package/dist/auth/identity/verify.d.ts.map +1 -0
- package/dist/auth/identity/verify.js +10 -0
- package/dist/auth/identity/verify.js.map +1 -0
- package/dist/auth/index.d.ts +15 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +15 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/issuers/ids.d.ts +15 -0
- package/dist/auth/issuers/ids.d.ts.map +1 -0
- package/dist/auth/issuers/ids.js +98 -0
- package/dist/auth/issuers/ids.js.map +1 -0
- package/dist/auth/issuers/index.d.ts +2 -0
- package/dist/auth/issuers/index.d.ts.map +1 -0
- package/dist/auth/issuers/index.js +2 -0
- package/dist/auth/issuers/index.js.map +1 -0
- package/dist/auth/jwks/index.d.ts +3 -0
- package/dist/auth/jwks/index.d.ts.map +1 -0
- package/dist/auth/jwks/index.js +3 -0
- package/dist/auth/jwks/index.js.map +1 -0
- package/dist/auth/jwks/thumbprint.d.ts +13 -0
- package/dist/auth/jwks/thumbprint.d.ts.map +1 -0
- package/dist/auth/jwks/thumbprint.js +15 -0
- package/dist/auth/jwks/thumbprint.js.map +1 -0
- package/dist/auth/jwks/types.d.ts +15 -0
- package/dist/auth/jwks/types.d.ts.map +1 -0
- package/dist/auth/jwks/types.js +8 -0
- package/dist/auth/jwks/types.js.map +1 -0
- package/dist/auth/methods/classifier.d.ts +9 -0
- package/dist/auth/methods/classifier.d.ts.map +1 -0
- package/dist/auth/methods/classifier.js +10 -0
- package/dist/auth/methods/classifier.js.map +1 -0
- package/dist/auth/methods/errors.d.ts +34 -0
- package/dist/auth/methods/errors.d.ts.map +1 -0
- package/dist/auth/methods/errors.js +67 -0
- package/dist/auth/methods/errors.js.map +1 -0
- package/dist/auth/methods/factory.d.ts +3 -0
- package/dist/auth/methods/factory.d.ts.map +1 -0
- package/dist/auth/methods/factory.js +11 -0
- package/dist/auth/methods/factory.js.map +1 -0
- package/dist/auth/methods/index.d.ts +7 -0
- package/dist/auth/methods/index.d.ts.map +1 -0
- package/dist/auth/methods/index.js +7 -0
- package/dist/auth/methods/index.js.map +1 -0
- package/dist/auth/methods/jwt/index.d.ts +2 -0
- package/dist/auth/methods/jwt/index.d.ts.map +1 -0
- package/dist/auth/methods/jwt/index.js +2 -0
- package/dist/auth/methods/jwt/index.js.map +1 -0
- package/dist/auth/methods/jwt/jwt.method.d.ts +14 -0
- package/dist/auth/methods/jwt/jwt.method.d.ts.map +1 -0
- package/dist/auth/methods/jwt/jwt.method.js +195 -0
- package/dist/auth/methods/jwt/jwt.method.js.map +1 -0
- package/dist/auth/methods/registry.d.ts +21 -0
- package/dist/auth/methods/registry.d.ts.map +1 -0
- package/dist/auth/methods/registry.js +18 -0
- package/dist/auth/methods/registry.js.map +1 -0
- package/dist/auth/methods/resolver.d.ts +9 -0
- package/dist/auth/methods/resolver.d.ts.map +1 -0
- package/dist/auth/methods/resolver.js +21 -0
- package/dist/auth/methods/resolver.js.map +1 -0
- package/dist/auth/permissions/describe.d.ts +9 -0
- package/dist/auth/permissions/describe.d.ts.map +1 -0
- package/dist/auth/permissions/describe.js +26 -0
- package/dist/auth/permissions/describe.js.map +1 -0
- package/dist/auth/permissions/index.d.ts +6 -0
- package/dist/auth/permissions/index.d.ts.map +1 -0
- package/dist/auth/permissions/index.js +6 -0
- package/dist/auth/permissions/index.js.map +1 -0
- package/dist/auth/permissions/operations.d.ts +19 -0
- package/dist/auth/permissions/operations.d.ts.map +1 -0
- package/dist/auth/permissions/operations.js +48 -0
- package/dist/auth/permissions/operations.js.map +1 -0
- package/dist/auth/permissions/permission.d.ts +30 -0
- package/dist/auth/permissions/permission.d.ts.map +1 -0
- package/dist/auth/permissions/permission.js +17 -0
- package/dist/auth/permissions/permission.js.map +1 -0
- package/dist/auth/permissions/semantic.d.ts +7 -0
- package/dist/auth/permissions/semantic.d.ts.map +1 -0
- package/dist/auth/permissions/semantic.js +6 -0
- package/dist/auth/permissions/semantic.js.map +1 -0
- package/dist/auth/permissions/validation.d.ts +6 -0
- package/dist/auth/permissions/validation.d.ts.map +1 -0
- package/dist/auth/permissions/validation.js +18 -0
- package/dist/auth/permissions/validation.js.map +1 -0
- package/dist/auth/policy/identity.d.ts +59 -0
- package/dist/auth/policy/identity.d.ts.map +1 -0
- package/dist/auth/policy/identity.js +9 -0
- package/dist/auth/policy/identity.js.map +1 -0
- package/dist/auth/policy/index.d.ts +6 -0
- package/dist/auth/policy/index.d.ts.map +1 -0
- package/dist/auth/policy/index.js +6 -0
- package/dist/auth/policy/index.js.map +1 -0
- package/dist/auth/policy/provision.d.ts +29 -0
- package/dist/auth/policy/provision.d.ts.map +1 -0
- package/dist/auth/policy/provision.js +12 -0
- package/dist/auth/policy/provision.js.map +1 -0
- package/dist/auth/policy/provisioning.d.ts +210 -0
- package/dist/auth/policy/provisioning.d.ts.map +1 -0
- package/dist/auth/policy/provisioning.js +20 -0
- package/dist/auth/policy/provisioning.js.map +1 -0
- package/dist/auth/policy/trust.types.d.ts +77 -0
- package/dist/auth/policy/trust.types.d.ts.map +1 -0
- package/dist/auth/policy/trust.types.js +16 -0
- package/dist/auth/policy/trust.types.js.map +1 -0
- package/dist/auth/policy/types.d.ts +32 -0
- package/dist/auth/policy/types.d.ts.map +1 -0
- package/dist/auth/policy/types.js +15 -0
- package/dist/auth/policy/types.js.map +1 -0
- package/dist/dns-label.d.ts +26 -0
- package/dist/dns-label.d.ts.map +1 -0
- package/dist/dns-label.js +36 -0
- package/dist/dns-label.js.map +1 -0
- package/dist/domain/accessors/bind.d.ts +21 -0
- package/dist/domain/accessors/bind.d.ts.map +1 -0
- package/dist/domain/accessors/bind.js +265 -0
- package/dist/domain/accessors/bind.js.map +1 -0
- package/dist/domain/accessors/errors.d.ts +26 -0
- package/dist/domain/accessors/errors.d.ts.map +1 -0
- package/dist/domain/accessors/errors.js +37 -0
- package/dist/domain/accessors/errors.js.map +1 -0
- package/dist/domain/accessors/flatten.d.ts +27 -0
- package/dist/domain/accessors/flatten.d.ts.map +1 -0
- package/dist/domain/accessors/flatten.js +67 -0
- package/dist/domain/accessors/flatten.js.map +1 -0
- package/dist/domain/accessors/group.d.ts +51 -0
- package/dist/domain/accessors/group.d.ts.map +1 -0
- package/dist/domain/accessors/group.js +111 -0
- package/dist/domain/accessors/group.js.map +1 -0
- package/dist/domain/accessors/index.d.ts +10 -0
- package/dist/domain/accessors/index.d.ts.map +1 -0
- package/dist/domain/accessors/index.js +9 -0
- package/dist/domain/accessors/index.js.map +1 -0
- package/dist/domain/accessors/interface-counts.d.ts +18 -0
- package/dist/domain/accessors/interface-counts.d.ts.map +1 -0
- package/dist/domain/accessors/interface-counts.js +33 -0
- package/dist/domain/accessors/interface-counts.js.map +1 -0
- package/dist/domain/accessors/methods.d.ts +38 -0
- package/dist/domain/accessors/methods.d.ts.map +1 -0
- package/dist/domain/accessors/methods.js +33 -0
- package/dist/domain/accessors/methods.js.map +1 -0
- package/dist/domain/accessors/node.d.ts +26 -0
- package/dist/domain/accessors/node.d.ts.map +1 -0
- package/dist/domain/accessors/node.js +111 -0
- package/dist/domain/accessors/node.js.map +1 -0
- package/dist/domain/accessors/shortcut.d.ts +57 -0
- package/dist/domain/accessors/shortcut.d.ts.map +1 -0
- package/dist/domain/accessors/shortcut.js +87 -0
- package/dist/domain/accessors/shortcut.js.map +1 -0
- package/dist/domain/accessors/types.d.ts +319 -0
- package/dist/domain/accessors/types.d.ts.map +1 -0
- package/dist/domain/accessors/types.js +2 -0
- package/dist/domain/accessors/types.js.map +1 -0
- package/dist/domain/addressing/edges.d.ts +9 -0
- package/dist/domain/addressing/edges.d.ts.map +1 -0
- package/dist/domain/addressing/edges.js +13 -0
- package/dist/domain/addressing/edges.js.map +1 -0
- package/dist/domain/addressing/grammar/domain.d.ts +16 -0
- package/dist/domain/addressing/grammar/domain.d.ts.map +1 -0
- package/dist/domain/addressing/grammar/domain.js +92 -0
- package/dist/domain/addressing/grammar/domain.js.map +1 -0
- package/dist/domain/addressing/grammar/instance-method.d.ts +14 -0
- package/dist/domain/addressing/grammar/instance-method.d.ts.map +1 -0
- package/dist/domain/addressing/grammar/instance-method.js +101 -0
- package/dist/domain/addressing/grammar/instance-method.js.map +1 -0
- package/dist/domain/addressing/grammar/set.d.ts +23 -0
- package/dist/domain/addressing/grammar/set.d.ts.map +1 -0
- package/dist/domain/addressing/grammar/set.js +31 -0
- package/dist/domain/addressing/grammar/set.js.map +1 -0
- package/dist/domain/addressing/grammar/tokens.d.ts +30 -0
- package/dist/domain/addressing/grammar/tokens.d.ts.map +1 -0
- package/dist/domain/addressing/grammar/tokens.js +34 -0
- package/dist/domain/addressing/grammar/tokens.js.map +1 -0
- package/dist/domain/addressing/keys/build.d.ts +10 -0
- package/dist/domain/addressing/keys/build.d.ts.map +1 -0
- package/dist/domain/addressing/keys/build.js +15 -0
- package/dist/domain/addressing/keys/build.js.map +1 -0
- package/dist/domain/addressing/keys/index.d.ts +4 -0
- package/dist/domain/addressing/keys/index.d.ts.map +1 -0
- package/dist/domain/addressing/keys/index.js +3 -0
- package/dist/domain/addressing/keys/index.js.map +1 -0
- package/dist/domain/addressing/keys/key.d.ts +70 -0
- package/dist/domain/addressing/keys/key.d.ts.map +1 -0
- package/dist/domain/addressing/keys/key.js +118 -0
- package/dist/domain/addressing/keys/key.js.map +1 -0
- package/dist/domain/addressing/keys/types.d.ts +28 -0
- package/dist/domain/addressing/keys/types.d.ts.map +1 -0
- package/dist/domain/addressing/keys/types.js +2 -0
- package/dist/domain/addressing/keys/types.js.map +1 -0
- package/dist/domain/addressing/layout/build.d.ts +20 -0
- package/dist/domain/addressing/layout/build.d.ts.map +1 -0
- package/dist/domain/addressing/layout/build.js +33 -0
- package/dist/domain/addressing/layout/build.js.map +1 -0
- package/dist/domain/addressing/layout/default.d.ts +67 -0
- package/dist/domain/addressing/layout/default.d.ts.map +1 -0
- package/dist/domain/addressing/layout/default.js +108 -0
- package/dist/domain/addressing/layout/default.js.map +1 -0
- package/dist/domain/addressing/layout/errors.d.ts +7 -0
- package/dist/domain/addressing/layout/errors.d.ts.map +1 -0
- package/dist/domain/addressing/layout/errors.js +10 -0
- package/dist/domain/addressing/layout/errors.js.map +1 -0
- package/dist/domain/addressing/layout/index.d.ts +8 -0
- package/dist/domain/addressing/layout/index.d.ts.map +1 -0
- package/dist/domain/addressing/layout/index.js +6 -0
- package/dist/domain/addressing/layout/index.js.map +1 -0
- package/dist/domain/addressing/layout/merge.d.ts +13 -0
- package/dist/domain/addressing/layout/merge.d.ts.map +1 -0
- package/dist/domain/addressing/layout/merge.js +19 -0
- package/dist/domain/addressing/layout/merge.js.map +1 -0
- package/dist/domain/addressing/layout/types.d.ts +15 -0
- package/dist/domain/addressing/layout/types.d.ts.map +1 -0
- package/dist/domain/addressing/layout/types.js +2 -0
- package/dist/domain/addressing/layout/types.js.map +1 -0
- package/dist/domain/addressing/layout/validate.d.ts +15 -0
- package/dist/domain/addressing/layout/validate.d.ts.map +1 -0
- package/dist/domain/addressing/layout/validate.js +31 -0
- package/dist/domain/addressing/layout/validate.js.map +1 -0
- package/dist/domain/addressing/namespace.d.ts +28 -0
- package/dist/domain/addressing/namespace.d.ts.map +1 -0
- package/dist/domain/addressing/namespace.js +30 -0
- package/dist/domain/addressing/namespace.js.map +1 -0
- package/dist/domain/addressing/paths/class.d.ts +47 -0
- package/dist/domain/addressing/paths/class.d.ts.map +1 -0
- package/dist/domain/addressing/paths/class.js +141 -0
- package/dist/domain/addressing/paths/class.js.map +1 -0
- package/dist/domain/addressing/paths/constants.d.ts +5 -0
- package/dist/domain/addressing/paths/constants.d.ts.map +1 -0
- package/dist/domain/addressing/paths/constants.js +10 -0
- package/dist/domain/addressing/paths/constants.js.map +1 -0
- package/dist/domain/addressing/paths/domain.d.ts +61 -0
- package/dist/domain/addressing/paths/domain.d.ts.map +1 -0
- package/dist/domain/addressing/paths/domain.js +185 -0
- package/dist/domain/addressing/paths/domain.js.map +1 -0
- package/dist/domain/addressing/paths/errors.d.ts +7 -0
- package/dist/domain/addressing/paths/errors.d.ts.map +1 -0
- package/dist/domain/addressing/paths/errors.js +12 -0
- package/dist/domain/addressing/paths/errors.js.map +1 -0
- package/dist/domain/addressing/paths/index.d.ts +12 -0
- package/dist/domain/addressing/paths/index.d.ts.map +1 -0
- package/dist/domain/addressing/paths/index.js +14 -0
- package/dist/domain/addressing/paths/index.js.map +1 -0
- package/dist/domain/addressing/paths/instance-method.d.ts +31 -0
- package/dist/domain/addressing/paths/instance-method.d.ts.map +1 -0
- package/dist/domain/addressing/paths/instance-method.js +103 -0
- package/dist/domain/addressing/paths/instance-method.js.map +1 -0
- package/dist/domain/addressing/paths/interface.d.ts +43 -0
- package/dist/domain/addressing/paths/interface.d.ts.map +1 -0
- package/dist/domain/addressing/paths/interface.js +138 -0
- package/dist/domain/addressing/paths/interface.js.map +1 -0
- package/dist/domain/addressing/paths/method.d.ts +50 -0
- package/dist/domain/addressing/paths/method.d.ts.map +1 -0
- package/dist/domain/addressing/paths/method.js +172 -0
- package/dist/domain/addressing/paths/method.js.map +1 -0
- package/dist/domain/addressing/paths/zod.d.ts +18 -0
- package/dist/domain/addressing/paths/zod.d.ts.map +1 -0
- package/dist/domain/addressing/paths/zod.js +19 -0
- package/dist/domain/addressing/paths/zod.js.map +1 -0
- package/dist/domain/addressing/refs/build.d.ts +33 -0
- package/dist/domain/addressing/refs/build.d.ts.map +1 -0
- package/dist/domain/addressing/refs/build.js +155 -0
- package/dist/domain/addressing/refs/build.js.map +1 -0
- package/dist/domain/addressing/refs/errors.d.ts +12 -0
- package/dist/domain/addressing/refs/errors.d.ts.map +1 -0
- package/dist/domain/addressing/refs/errors.js +21 -0
- package/dist/domain/addressing/refs/errors.js.map +1 -0
- package/dist/domain/addressing/refs/index.d.ts +7 -0
- package/dist/domain/addressing/refs/index.d.ts.map +1 -0
- package/dist/domain/addressing/refs/index.js +6 -0
- package/dist/domain/addressing/refs/index.js.map +1 -0
- package/dist/domain/addressing/refs/iterate.d.ts +17 -0
- package/dist/domain/addressing/refs/iterate.d.ts.map +1 -0
- package/dist/domain/addressing/refs/iterate.js +42 -0
- package/dist/domain/addressing/refs/iterate.js.map +1 -0
- package/dist/domain/addressing/refs/project.d.ts +26 -0
- package/dist/domain/addressing/refs/project.d.ts.map +1 -0
- package/dist/domain/addressing/refs/project.js +39 -0
- package/dist/domain/addressing/refs/project.js.map +1 -0
- package/dist/domain/addressing/refs/ref.d.ts +80 -0
- package/dist/domain/addressing/refs/ref.d.ts.map +1 -0
- package/dist/domain/addressing/refs/ref.js +146 -0
- package/dist/domain/addressing/refs/ref.js.map +1 -0
- package/dist/domain/addressing/refs/types.d.ts +167 -0
- package/dist/domain/addressing/refs/types.d.ts.map +1 -0
- package/dist/domain/addressing/refs/types.js +27 -0
- package/dist/domain/addressing/refs/types.js.map +1 -0
- package/dist/domain/addressing/segments/installed-in.d.ts +15 -0
- package/dist/domain/addressing/segments/installed-in.d.ts.map +1 -0
- package/dist/domain/addressing/segments/installed-in.js +19 -0
- package/dist/domain/addressing/segments/installed-in.js.map +1 -0
- package/dist/domain/addressing/segments/method-of.d.ts +10 -0
- package/dist/domain/addressing/segments/method-of.d.ts.map +1 -0
- package/dist/domain/addressing/segments/method-of.js +14 -0
- package/dist/domain/addressing/segments/method-of.js.map +1 -0
- package/dist/domain/addressing/segments/of-domain.d.ts +15 -0
- package/dist/domain/addressing/segments/of-domain.d.ts.map +1 -0
- package/dist/domain/addressing/segments/of-domain.js +19 -0
- package/dist/domain/addressing/segments/of-domain.js.map +1 -0
- package/dist/domain/compile/catalog/def-types.d.ts +28 -0
- package/dist/domain/compile/catalog/def-types.d.ts.map +1 -0
- package/dist/domain/compile/catalog/def-types.js +8 -0
- package/dist/domain/compile/catalog/def-types.js.map +1 -0
- package/dist/domain/compile/catalog/defs.d.ts +7 -0
- package/dist/domain/compile/catalog/defs.d.ts.map +1 -0
- package/dist/domain/compile/catalog/defs.js +8 -0
- package/dist/domain/compile/catalog/defs.js.map +1 -0
- package/dist/domain/compile/catalog/index.d.ts +4 -0
- package/dist/domain/compile/catalog/index.d.ts.map +1 -0
- package/dist/domain/compile/catalog/index.js +5 -0
- package/dist/domain/compile/catalog/index.js.map +1 -0
- package/dist/domain/compile/catalog/system-properties.d.ts +28 -0
- package/dist/domain/compile/catalog/system-properties.d.ts.map +1 -0
- package/dist/domain/compile/catalog/system-properties.js +71 -0
- package/dist/domain/compile/catalog/system-properties.js.map +1 -0
- package/dist/domain/compile/compile.d.ts +36 -0
- package/dist/domain/compile/compile.d.ts.map +1 -0
- package/dist/domain/compile/compile.js +91 -0
- package/dist/domain/compile/compile.js.map +1 -0
- package/dist/domain/compile/core/compile.d.ts +66 -0
- package/dist/domain/compile/core/compile.d.ts.map +1 -0
- package/dist/domain/compile/core/compile.js +139 -0
- package/dist/domain/compile/core/compile.js.map +1 -0
- package/dist/domain/compile/core/index.d.ts +3 -0
- package/dist/domain/compile/core/index.d.ts.map +1 -0
- package/dist/domain/compile/core/index.js +2 -0
- package/dist/domain/compile/core/index.js.map +1 -0
- package/dist/domain/compile/core/types.d.ts +15 -0
- package/dist/domain/compile/core/types.d.ts.map +1 -0
- package/dist/domain/compile/core/types.js +5 -0
- package/dist/domain/compile/core/types.js.map +1 -0
- package/dist/domain/compile/errors.d.ts +8 -0
- package/dist/domain/compile/errors.d.ts.map +1 -0
- package/dist/domain/compile/errors.js +12 -0
- package/dist/domain/compile/errors.js.map +1 -0
- package/dist/domain/compile/external-ids.d.ts +18 -0
- package/dist/domain/compile/external-ids.d.ts.map +1 -0
- package/dist/domain/compile/external-ids.js +23 -0
- package/dist/domain/compile/external-ids.js.map +1 -0
- package/dist/domain/compile/imports/index.d.ts +4 -0
- package/dist/domain/compile/imports/index.d.ts.map +1 -0
- package/dist/domain/compile/imports/index.js +3 -0
- package/dist/domain/compile/imports/index.js.map +1 -0
- package/dist/domain/compile/imports/resolve.d.ts +14 -0
- package/dist/domain/compile/imports/resolve.d.ts.map +1 -0
- package/dist/domain/compile/imports/resolve.js +47 -0
- package/dist/domain/compile/imports/resolve.js.map +1 -0
- package/dist/domain/compile/imports/scan.d.ts +21 -0
- package/dist/domain/compile/imports/scan.d.ts.map +1 -0
- package/dist/domain/compile/imports/scan.js +40 -0
- package/dist/domain/compile/imports/scan.js.map +1 -0
- package/dist/domain/compile/imports/types.d.ts +38 -0
- package/dist/domain/compile/imports/types.d.ts.map +1 -0
- package/dist/domain/compile/imports/types.js +2 -0
- package/dist/domain/compile/imports/types.js.map +1 -0
- package/dist/domain/compile/index.d.ts +9 -0
- package/dist/domain/compile/index.d.ts.map +1 -0
- package/dist/domain/compile/index.js +10 -0
- package/dist/domain/compile/index.js.map +1 -0
- package/dist/domain/compile/inheritance.d.ts +21 -0
- package/dist/domain/compile/inheritance.d.ts.map +1 -0
- package/dist/domain/compile/inheritance.js +52 -0
- package/dist/domain/compile/inheritance.js.map +1 -0
- package/dist/domain/compile/internals.d.ts +93 -0
- package/dist/domain/compile/internals.d.ts.map +1 -0
- package/dist/domain/compile/internals.js +78 -0
- package/dist/domain/compile/internals.js.map +1 -0
- package/dist/domain/compile/method/bind.d.ts +33 -0
- package/dist/domain/compile/method/bind.d.ts.map +1 -0
- package/dist/domain/compile/method/bind.js +182 -0
- package/dist/domain/compile/method/bind.js.map +1 -0
- package/dist/domain/compile/method/bound-method.d.ts +56 -0
- package/dist/domain/compile/method/bound-method.d.ts.map +1 -0
- package/dist/domain/compile/method/bound-method.js +2 -0
- package/dist/domain/compile/method/bound-method.js.map +1 -0
- package/dist/domain/compile/method/errors.d.ts +8 -0
- package/dist/domain/compile/method/errors.d.ts.map +1 -0
- package/dist/domain/compile/method/errors.js +12 -0
- package/dist/domain/compile/method/errors.js.map +1 -0
- package/dist/domain/compile/method/index.d.ts +12 -0
- package/dist/domain/compile/method/index.d.ts.map +1 -0
- package/dist/domain/compile/method/index.js +10 -0
- package/dist/domain/compile/method/index.js.map +1 -0
- package/dist/domain/compile/method/inheritance-keys.d.ts +24 -0
- package/dist/domain/compile/method/inheritance-keys.d.ts.map +1 -0
- package/dist/domain/compile/method/inheritance-keys.js +13 -0
- package/dist/domain/compile/method/inheritance-keys.js.map +1 -0
- package/dist/domain/compile/method/resolve.d.ts +93 -0
- package/dist/domain/compile/method/resolve.d.ts.map +1 -0
- package/dist/domain/compile/method/resolve.js +194 -0
- package/dist/domain/compile/method/resolve.js.map +1 -0
- package/dist/domain/compile/method/serialized.d.ts +130 -0
- package/dist/domain/compile/method/serialized.d.ts.map +1 -0
- package/dist/domain/compile/method/serialized.js +75 -0
- package/dist/domain/compile/method/serialized.js.map +1 -0
- package/dist/domain/compile/method/signature.d.ts +78 -0
- package/dist/domain/compile/method/signature.d.ts.map +1 -0
- package/dist/domain/compile/method/signature.js +8 -0
- package/dist/domain/compile/method/signature.js.map +1 -0
- package/dist/domain/compile/method/types.d.ts +101 -0
- package/dist/domain/compile/method/types.d.ts.map +1 -0
- package/dist/domain/compile/method/types.js +14 -0
- package/dist/domain/compile/method/types.js.map +1 -0
- package/dist/domain/compile/method/wire.d.ts +35 -0
- package/dist/domain/compile/method/wire.d.ts.map +1 -0
- package/dist/domain/compile/method/wire.js +50 -0
- package/dist/domain/compile/method/wire.js.map +1 -0
- package/dist/domain/compile/property/build.d.ts +20 -0
- package/dist/domain/compile/property/build.d.ts.map +1 -0
- package/dist/domain/compile/property/build.js +90 -0
- package/dist/domain/compile/property/build.js.map +1 -0
- package/dist/domain/compile/property/index.d.ts +3 -0
- package/dist/domain/compile/property/index.d.ts.map +1 -0
- package/dist/domain/compile/property/index.js +2 -0
- package/dist/domain/compile/property/index.js.map +1 -0
- package/dist/domain/compile/property/types.d.ts +84 -0
- package/dist/domain/compile/property/types.d.ts.map +1 -0
- package/dist/domain/compile/property/types.js +2 -0
- package/dist/domain/compile/property/types.js.map +1 -0
- package/dist/domain/compile/types.d.ts +56 -0
- package/dist/domain/compile/types.d.ts.map +1 -0
- package/dist/domain/compile/types.js +2 -0
- package/dist/domain/compile/types.js.map +1 -0
- package/dist/domain/compile/validation/index.d.ts +3 -0
- package/dist/domain/compile/validation/index.d.ts.map +1 -0
- package/dist/domain/compile/validation/index.js +2 -0
- package/dist/domain/compile/validation/index.js.map +1 -0
- package/dist/domain/compile/validation/validate.d.ts +26 -0
- package/dist/domain/compile/validation/validate.d.ts.map +1 -0
- package/dist/domain/compile/validation/validate.js +159 -0
- package/dist/domain/compile/validation/validate.js.map +1 -0
- package/dist/domain/deserialize/deserialize.d.ts +55 -0
- package/dist/domain/deserialize/deserialize.d.ts.map +1 -0
- package/dist/domain/deserialize/deserialize.js +863 -0
- package/dist/domain/deserialize/deserialize.js.map +1 -0
- package/dist/domain/deserialize/errors.d.ts +30 -0
- package/dist/domain/deserialize/errors.d.ts.map +1 -0
- package/dist/domain/deserialize/errors.js +10 -0
- package/dist/domain/deserialize/errors.js.map +1 -0
- package/dist/domain/deserialize/index.d.ts +22 -0
- package/dist/domain/deserialize/index.d.ts.map +1 -0
- package/dist/domain/deserialize/index.js +21 -0
- package/dist/domain/deserialize/index.js.map +1 -0
- package/dist/domain/errors.d.ts +11 -0
- package/dist/domain/errors.d.ts.map +1 -0
- package/dist/domain/errors.js +14 -0
- package/dist/domain/errors.js.map +1 -0
- package/dist/domain/identity/resolve-callables.d.ts +51 -0
- package/dist/domain/identity/resolve-callables.d.ts.map +1 -0
- package/dist/domain/identity/resolve-callables.js +75 -0
- package/dist/domain/identity/resolve-callables.js.map +1 -0
- package/dist/domain/index.d.ts +51 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +37 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/install-bundle.d.ts +44 -0
- package/dist/domain/install-bundle.d.ts.map +1 -0
- package/dist/domain/install-bundle.js +45 -0
- package/dist/domain/install-bundle.js.map +1 -0
- package/dist/domain/origin.d.ts +18 -0
- package/dist/domain/origin.d.ts.map +1 -0
- package/dist/domain/origin.js +11 -0
- package/dist/domain/origin.js.map +1 -0
- package/dist/domain/serialize/core.d.ts +28 -0
- package/dist/domain/serialize/core.d.ts.map +1 -0
- package/dist/domain/serialize/core.js +107 -0
- package/dist/domain/serialize/core.js.map +1 -0
- package/dist/domain/serialize/errors.d.ts +8 -0
- package/dist/domain/serialize/errors.d.ts.map +1 -0
- package/dist/domain/serialize/errors.js +12 -0
- package/dist/domain/serialize/errors.js.map +1 -0
- package/dist/domain/serialize/index.d.ts +6 -0
- package/dist/domain/serialize/index.d.ts.map +1 -0
- package/dist/domain/serialize/index.js +8 -0
- package/dist/domain/serialize/index.js.map +1 -0
- package/dist/domain/serialize/merge-trees.d.ts +14 -0
- package/dist/domain/serialize/merge-trees.d.ts.map +1 -0
- package/dist/domain/serialize/merge-trees.js +39 -0
- package/dist/domain/serialize/merge-trees.js.map +1 -0
- package/dist/domain/serialize/schema.d.ts +35 -0
- package/dist/domain/serialize/schema.d.ts.map +1 -0
- package/dist/domain/serialize/schema.js +525 -0
- package/dist/domain/serialize/schema.js.map +1 -0
- package/dist/domain/serialize/serialize.d.ts +43 -0
- package/dist/domain/serialize/serialize.d.ts.map +1 -0
- package/dist/domain/serialize/serialize.js +36 -0
- package/dist/domain/serialize/serialize.js.map +1 -0
- package/dist/domain/serialize/zod-schema.d.ts +17 -0
- package/dist/domain/serialize/zod-schema.d.ts.map +1 -0
- package/dist/domain/serialize/zod-schema.js +71 -0
- package/dist/domain/serialize/zod-schema.js.map +1 -0
- package/dist/events/envelope.d.ts +19 -0
- package/dist/events/envelope.d.ts.map +1 -0
- package/dist/events/envelope.js +2 -0
- package/dist/events/envelope.js.map +1 -0
- package/dist/events/ids.d.ts +9 -0
- package/dist/events/ids.d.ts.map +1 -0
- package/dist/events/ids.js +3 -0
- package/dist/events/ids.js.map +1 -0
- package/dist/events/index.d.ts +7 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +7 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/journal/filter.d.ts +14 -0
- package/dist/events/journal/filter.d.ts.map +1 -0
- package/dist/events/journal/filter.js +48 -0
- package/dist/events/journal/filter.js.map +1 -0
- package/dist/events/journal/index.d.ts +3 -0
- package/dist/events/journal/index.d.ts.map +1 -0
- package/dist/events/journal/index.js +2 -0
- package/dist/events/journal/index.js.map +1 -0
- package/dist/events/journal/types.d.ts +21 -0
- package/dist/events/journal/types.d.ts.map +1 -0
- package/dist/events/journal/types.js +2 -0
- package/dist/events/journal/types.js.map +1 -0
- package/dist/events/payloads.d.ts +61 -0
- package/dist/events/payloads.d.ts.map +1 -0
- package/dist/events/payloads.js +2 -0
- package/dist/events/payloads.js.map +1 -0
- package/dist/events/subscription.d.ts +9 -0
- package/dist/events/subscription.d.ts.map +1 -0
- package/dist/events/subscription.js +2 -0
- package/dist/events/subscription.js.map +1 -0
- package/dist/events/topics.d.ts +19 -0
- package/dist/events/topics.d.ts.map +1 -0
- package/dist/events/topics.js +6 -0
- package/dist/events/topics.js.map +1 -0
- package/dist/graph/edge/edge.d.ts +42 -0
- package/dist/graph/edge/edge.d.ts.map +1 -0
- package/dist/graph/edge/edge.js +2 -0
- package/dist/graph/edge/edge.js.map +1 -0
- package/dist/graph/edge/identity.d.ts +33 -0
- package/dist/graph/edge/identity.d.ts.map +1 -0
- package/dist/graph/edge/identity.js +10 -0
- package/dist/graph/edge/identity.js.map +1 -0
- package/dist/graph/edge/index.d.ts +4 -0
- package/dist/graph/edge/index.d.ts.map +1 -0
- package/dist/graph/edge/index.js +2 -0
- package/dist/graph/edge/index.js.map +1 -0
- package/dist/graph/edge/zod.d.ts +21 -0
- package/dist/graph/edge/zod.d.ts.map +1 -0
- package/dist/graph/edge/zod.js +27 -0
- package/dist/graph/edge/zod.js.map +1 -0
- package/dist/graph/errors.d.ts +100 -0
- package/dist/graph/errors.d.ts.map +1 -0
- package/dist/graph/errors.js +117 -0
- package/dist/graph/errors.js.map +1 -0
- package/dist/graph/graph/build/from.d.ts +62 -0
- package/dist/graph/graph/build/from.d.ts.map +1 -0
- package/dist/graph/graph/build/from.js +47 -0
- package/dist/graph/graph/build/from.js.map +1 -0
- package/dist/graph/graph/build/index.d.ts +11 -0
- package/dist/graph/graph/build/index.d.ts.map +1 -0
- package/dist/graph/graph/build/index.js +11 -0
- package/dist/graph/graph/build/index.js.map +1 -0
- package/dist/graph/graph/build/normalize.d.ts +20 -0
- package/dist/graph/graph/build/normalize.d.ts.map +1 -0
- package/dist/graph/graph/build/normalize.js +49 -0
- package/dist/graph/graph/build/normalize.js.map +1 -0
- package/dist/graph/graph/build/validate.d.ts +11 -0
- package/dist/graph/graph/build/validate.d.ts.map +1 -0
- package/dist/graph/graph/build/validate.js +56 -0
- package/dist/graph/graph/build/validate.js.map +1 -0
- package/dist/graph/graph/graph.d.ts +136 -0
- package/dist/graph/graph/graph.d.ts.map +1 -0
- package/dist/graph/graph/graph.js +220 -0
- package/dist/graph/graph/graph.js.map +1 -0
- package/dist/graph/graph/index.d.ts +24 -0
- package/dist/graph/graph/index.d.ts.map +1 -0
- package/dist/graph/graph/index.js +18 -0
- package/dist/graph/graph/index.js.map +1 -0
- package/dist/graph/graph/indexes/edges.d.ts +23 -0
- package/dist/graph/graph/indexes/edges.d.ts.map +1 -0
- package/dist/graph/graph/indexes/edges.js +49 -0
- package/dist/graph/graph/indexes/edges.js.map +1 -0
- package/dist/graph/graph/indexes/ids.d.ts +15 -0
- package/dist/graph/graph/indexes/ids.d.ts.map +1 -0
- package/dist/graph/graph/indexes/ids.js +30 -0
- package/dist/graph/graph/indexes/ids.js.map +1 -0
- package/dist/graph/graph/indexes/index.d.ts +22 -0
- package/dist/graph/graph/indexes/index.d.ts.map +1 -0
- package/dist/graph/graph/indexes/index.js +21 -0
- package/dist/graph/graph/indexes/index.js.map +1 -0
- package/dist/graph/graph/indexes/nodes.d.ts +15 -0
- package/dist/graph/graph/indexes/nodes.d.ts.map +1 -0
- package/dist/graph/graph/indexes/nodes.js +20 -0
- package/dist/graph/graph/indexes/nodes.js.map +1 -0
- package/dist/graph/graph/indexes/path-index.d.ts +54 -0
- package/dist/graph/graph/indexes/path-index.d.ts.map +1 -0
- package/dist/graph/graph/indexes/path-index.js +140 -0
- package/dist/graph/graph/indexes/path-index.js.map +1 -0
- package/dist/graph/graph/indexes/view.d.ts +60 -0
- package/dist/graph/graph/indexes/view.d.ts.map +1 -0
- package/dist/graph/graph/indexes/view.js +47 -0
- package/dist/graph/graph/indexes/view.js.map +1 -0
- package/dist/graph/graph/namespaces.d.ts +53 -0
- package/dist/graph/graph/namespaces.d.ts.map +1 -0
- package/dist/graph/graph/namespaces.js +2 -0
- package/dist/graph/graph/namespaces.js.map +1 -0
- package/dist/graph/graph/root.d.ts +36 -0
- package/dist/graph/graph/root.d.ts.map +1 -0
- package/dist/graph/graph/root.js +85 -0
- package/dist/graph/graph/root.js.map +1 -0
- package/dist/graph/graph/walker.d.ts +80 -0
- package/dist/graph/graph/walker.d.ts.map +1 -0
- package/dist/graph/graph/walker.js +126 -0
- package/dist/graph/graph/walker.js.map +1 -0
- package/dist/graph/graph/wire.d.ts +34 -0
- package/dist/graph/graph/wire.d.ts.map +1 -0
- package/dist/graph/graph/wire.js +37 -0
- package/dist/graph/graph/wire.js.map +1 -0
- package/dist/graph/index.d.ts +18 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +14 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/nav/ast/predicate/index.d.ts +3 -0
- package/dist/graph/nav/ast/predicate/index.d.ts.map +1 -0
- package/dist/graph/nav/ast/predicate/index.js +2 -0
- package/dist/graph/nav/ast/predicate/index.js.map +1 -0
- package/dist/graph/nav/ast/predicate/operations.d.ts +27 -0
- package/dist/graph/nav/ast/predicate/operations.d.ts.map +1 -0
- package/dist/graph/nav/ast/predicate/operations.js +75 -0
- package/dist/graph/nav/ast/predicate/operations.js.map +1 -0
- package/dist/graph/nav/ast/predicate/types.d.ts +28 -0
- package/dist/graph/nav/ast/predicate/types.d.ts.map +1 -0
- package/dist/graph/nav/ast/predicate/types.js +3 -0
- package/dist/graph/nav/ast/predicate/types.js.map +1 -0
- package/dist/graph/nav/ast/slug.d.ts +18 -0
- package/dist/graph/nav/ast/slug.d.ts.map +1 -0
- package/dist/graph/nav/ast/slug.js +19 -0
- package/dist/graph/nav/ast/slug.js.map +1 -0
- package/dist/graph/nav/ast/step/anchor.d.ts +33 -0
- package/dist/graph/nav/ast/step/anchor.d.ts.map +1 -0
- package/dist/graph/nav/ast/step/anchor.js +15 -0
- package/dist/graph/nav/ast/step/anchor.js.map +1 -0
- package/dist/graph/nav/ast/step/index.d.ts +7 -0
- package/dist/graph/nav/ast/step/index.d.ts.map +1 -0
- package/dist/graph/nav/ast/step/index.js +3 -0
- package/dist/graph/nav/ast/step/index.js.map +1 -0
- package/dist/graph/nav/ast/step/reverse.d.ts +21 -0
- package/dist/graph/nav/ast/step/reverse.d.ts.map +1 -0
- package/dist/graph/nav/ast/step/reverse.js +58 -0
- package/dist/graph/nav/ast/step/reverse.js.map +1 -0
- package/dist/graph/nav/ast/step/traversal.d.ts +39 -0
- package/dist/graph/nav/ast/step/traversal.d.ts.map +1 -0
- package/dist/graph/nav/ast/step/traversal.js +5 -0
- package/dist/graph/nav/ast/step/traversal.js.map +1 -0
- package/dist/graph/nav/grammar/core.d.ts +25 -0
- package/dist/graph/nav/grammar/core.d.ts.map +1 -0
- package/dist/graph/nav/grammar/core.js +12 -0
- package/dist/graph/nav/grammar/core.js.map +1 -0
- package/dist/graph/nav/grammar/extension.d.ts +35 -0
- package/dist/graph/nav/grammar/extension.d.ts.map +1 -0
- package/dist/graph/nav/grammar/extension.js +2 -0
- package/dist/graph/nav/grammar/extension.js.map +1 -0
- package/dist/graph/nav/grammar/index.d.ts +7 -0
- package/dist/graph/nav/grammar/index.d.ts.map +1 -0
- package/dist/graph/nav/grammar/index.js +4 -0
- package/dist/graph/nav/grammar/index.js.map +1 -0
- package/dist/graph/nav/grammar/registry.d.ts +25 -0
- package/dist/graph/nav/grammar/registry.d.ts.map +1 -0
- package/dist/graph/nav/grammar/registry.js +38 -0
- package/dist/graph/nav/grammar/registry.js.map +1 -0
- package/dist/graph/nav/index.d.ts +36 -0
- package/dist/graph/nav/index.d.ts.map +1 -0
- package/dist/graph/nav/index.js +32 -0
- package/dist/graph/nav/index.js.map +1 -0
- package/dist/graph/nav/lex/table.d.ts +16 -0
- package/dist/graph/nav/lex/table.d.ts.map +1 -0
- package/dist/graph/nav/lex/table.js +24 -0
- package/dist/graph/nav/lex/table.js.map +1 -0
- package/dist/graph/nav/lex/token.d.ts +23 -0
- package/dist/graph/nav/lex/token.d.ts.map +1 -0
- package/dist/graph/nav/lex/token.js +2 -0
- package/dist/graph/nav/lex/token.js.map +1 -0
- package/dist/graph/nav/lex/tokenize.d.ts +5 -0
- package/dist/graph/nav/lex/tokenize.d.ts.map +1 -0
- package/dist/graph/nav/lex/tokenize.js +40 -0
- package/dist/graph/nav/lex/tokenize.js.map +1 -0
- package/dist/graph/nav/parse/predicate.d.ts +21 -0
- package/dist/graph/nav/parse/predicate.d.ts.map +1 -0
- package/dist/graph/nav/parse/predicate.js +95 -0
- package/dist/graph/nav/parse/predicate.js.map +1 -0
- package/dist/graph/nav/parse/steps.d.ts +43 -0
- package/dist/graph/nav/parse/steps.d.ts.map +1 -0
- package/dist/graph/nav/parse/steps.js +234 -0
- package/dist/graph/nav/parse/steps.js.map +1 -0
- package/dist/graph/nav/parse/stream.d.ts +24 -0
- package/dist/graph/nav/parse/stream.d.ts.map +1 -0
- package/dist/graph/nav/parse/stream.js +45 -0
- package/dist/graph/nav/parse/stream.js.map +1 -0
- package/dist/graph/nav/parse/validation.d.ts +12 -0
- package/dist/graph/nav/parse/validation.d.ts.map +1 -0
- package/dist/graph/nav/parse/validation.js +7 -0
- package/dist/graph/nav/parse/validation.js.map +1 -0
- package/dist/graph/nav/path/build.d.ts +21 -0
- package/dist/graph/nav/path/build.d.ts.map +1 -0
- package/dist/graph/nav/path/build.js +53 -0
- package/dist/graph/nav/path/build.js.map +1 -0
- package/dist/graph/nav/path/errors.d.ts +50 -0
- package/dist/graph/nav/path/errors.d.ts.map +1 -0
- package/dist/graph/nav/path/errors.js +61 -0
- package/dist/graph/nav/path/errors.js.map +1 -0
- package/dist/graph/nav/path/index.d.ts +19 -0
- package/dist/graph/nav/path/index.d.ts.map +1 -0
- package/dist/graph/nav/path/index.js +19 -0
- package/dist/graph/nav/path/index.js.map +1 -0
- package/dist/graph/nav/path/kinds/chain.d.ts +38 -0
- package/dist/graph/nav/path/kinds/chain.d.ts.map +1 -0
- package/dist/graph/nav/path/kinds/chain.js +84 -0
- package/dist/graph/nav/path/kinds/chain.js.map +1 -0
- package/dist/graph/nav/path/kinds/id-path.d.ts +44 -0
- package/dist/graph/nav/path/kinds/id-path.d.ts.map +1 -0
- package/dist/graph/nav/path/kinds/id-path.js +104 -0
- package/dist/graph/nav/path/kinds/id-path.js.map +1 -0
- package/dist/graph/nav/path/kinds/path-type.d.ts +51 -0
- package/dist/graph/nav/path/kinds/path-type.d.ts.map +1 -0
- package/dist/graph/nav/path/kinds/path-type.js +2 -0
- package/dist/graph/nav/path/kinds/path-type.js.map +1 -0
- package/dist/graph/nav/path/kinds/registry.d.ts +51 -0
- package/dist/graph/nav/path/kinds/registry.d.ts.map +1 -0
- package/dist/graph/nav/path/kinds/registry.js +85 -0
- package/dist/graph/nav/path/kinds/registry.js.map +1 -0
- package/dist/graph/nav/path/parse.d.ts +30 -0
- package/dist/graph/nav/path/parse.d.ts.map +1 -0
- package/dist/graph/nav/path/parse.js +55 -0
- package/dist/graph/nav/path/parse.js.map +1 -0
- package/dist/graph/nav/path/path.d.ts +41 -0
- package/dist/graph/nav/path/path.d.ts.map +1 -0
- package/dist/graph/nav/path/path.js +59 -0
- package/dist/graph/nav/path/path.js.map +1 -0
- package/dist/graph/nav/path/zod.d.ts +99 -0
- package/dist/graph/nav/path/zod.d.ts.map +1 -0
- package/dist/graph/nav/path/zod.js +132 -0
- package/dist/graph/nav/path/zod.js.map +1 -0
- package/dist/graph/nav/scheme/index.d.ts +6 -0
- package/dist/graph/nav/scheme/index.d.ts.map +1 -0
- package/dist/graph/nav/scheme/index.js +5 -0
- package/dist/graph/nav/scheme/index.js.map +1 -0
- package/dist/graph/nav/scheme/registry.d.ts +17 -0
- package/dist/graph/nav/scheme/registry.d.ts.map +1 -0
- package/dist/graph/nav/scheme/registry.js +24 -0
- package/dist/graph/nav/scheme/registry.js.map +1 -0
- package/dist/graph/nav/scheme/segment.d.ts +53 -0
- package/dist/graph/nav/scheme/segment.d.ts.map +1 -0
- package/dist/graph/nav/scheme/segment.js +2 -0
- package/dist/graph/nav/scheme/segment.js.map +1 -0
- package/dist/graph/nav/scheme/slug.d.ts +40 -0
- package/dist/graph/nav/scheme/slug.d.ts.map +1 -0
- package/dist/graph/nav/scheme/slug.js +86 -0
- package/dist/graph/nav/scheme/slug.js.map +1 -0
- package/dist/graph/nav/scheme/span.d.ts +17 -0
- package/dist/graph/nav/scheme/span.d.ts.map +1 -0
- package/dist/graph/nav/scheme/span.js +41 -0
- package/dist/graph/nav/scheme/span.js.map +1 -0
- package/dist/graph/nav/scheme/walk.d.ts +20 -0
- package/dist/graph/nav/scheme/walk.d.ts.map +1 -0
- package/dist/graph/nav/scheme/walk.js +75 -0
- package/dist/graph/nav/scheme/walk.js.map +1 -0
- package/dist/graph/nav/serialize/predicate.d.ts +4 -0
- package/dist/graph/nav/serialize/predicate.d.ts.map +1 -0
- package/dist/graph/nav/serialize/predicate.js +24 -0
- package/dist/graph/nav/serialize/predicate.js.map +1 -0
- package/dist/graph/nav/serialize/steps.d.ts +30 -0
- package/dist/graph/nav/serialize/steps.d.ts.map +1 -0
- package/dist/graph/nav/serialize/steps.js +53 -0
- package/dist/graph/nav/serialize/steps.js.map +1 -0
- package/dist/graph/node/index.d.ts +2 -0
- package/dist/graph/node/index.d.ts.map +1 -0
- package/dist/graph/node/index.js +2 -0
- package/dist/graph/node/index.js.map +1 -0
- package/dist/graph/node/node.d.ts +41 -0
- package/dist/graph/node/node.d.ts.map +1 -0
- package/dist/graph/node/node.js +2 -0
- package/dist/graph/node/node.js.map +1 -0
- package/dist/graph/node/zod.d.ts +21 -0
- package/dist/graph/node/zod.d.ts.map +1 -0
- package/dist/graph/node/zod.js +23 -0
- package/dist/graph/node/zod.js.map +1 -0
- package/dist/graph/props/index.d.ts +2 -0
- package/dist/graph/props/index.d.ts.map +1 -0
- package/dist/graph/props/index.js +2 -0
- package/dist/graph/props/index.js.map +1 -0
- package/dist/graph/props/properties.d.ts +3 -0
- package/dist/graph/props/properties.d.ts.map +1 -0
- package/dist/graph/props/properties.js +2 -0
- package/dist/graph/props/properties.js.map +1 -0
- package/dist/graph/props/props.d.ts +3 -0
- package/dist/graph/props/props.d.ts.map +1 -0
- package/dist/graph/props/props.js +2 -0
- package/dist/graph/props/props.js.map +1 -0
- package/dist/graph/sync/apply/index.d.ts +4 -0
- package/dist/graph/sync/apply/index.d.ts.map +1 -0
- package/dist/graph/sync/apply/index.js +2 -0
- package/dist/graph/sync/apply/index.js.map +1 -0
- package/dist/graph/sync/apply/integrity.d.ts +11 -0
- package/dist/graph/sync/apply/integrity.d.ts.map +1 -0
- package/dist/graph/sync/apply/integrity.js +7 -0
- package/dist/graph/sync/apply/integrity.js.map +1 -0
- package/dist/graph/sync/apply/push-result.d.ts +19 -0
- package/dist/graph/sync/apply/push-result.d.ts.map +1 -0
- package/dist/graph/sync/apply/push-result.js +2 -0
- package/dist/graph/sync/apply/push-result.js.map +1 -0
- package/dist/graph/sync/apply/validation.d.ts +24 -0
- package/dist/graph/sync/apply/validation.d.ts.map +1 -0
- package/dist/graph/sync/apply/validation.js +2 -0
- package/dist/graph/sync/apply/validation.js.map +1 -0
- package/dist/graph/sync/diff/changeset.d.ts +79 -0
- package/dist/graph/sync/diff/changeset.d.ts.map +1 -0
- package/dist/graph/sync/diff/changeset.js +66 -0
- package/dist/graph/sync/diff/changeset.js.map +1 -0
- package/dist/graph/sync/diff/config.d.ts +26 -0
- package/dist/graph/sync/diff/config.d.ts.map +1 -0
- package/dist/graph/sync/diff/config.js +2 -0
- package/dist/graph/sync/diff/config.js.map +1 -0
- package/dist/graph/sync/diff/default.d.ts +15 -0
- package/dist/graph/sync/diff/default.d.ts.map +1 -0
- package/dist/graph/sync/diff/default.js +26 -0
- package/dist/graph/sync/diff/default.js.map +1 -0
- package/dist/graph/sync/diff/diff.d.ts +28 -0
- package/dist/graph/sync/diff/diff.d.ts.map +1 -0
- package/dist/graph/sync/diff/diff.js +116 -0
- package/dist/graph/sync/diff/diff.js.map +1 -0
- package/dist/graph/sync/diff/index.d.ts +7 -0
- package/dist/graph/sync/diff/index.d.ts.map +1 -0
- package/dist/graph/sync/diff/index.js +5 -0
- package/dist/graph/sync/diff/index.js.map +1 -0
- package/dist/graph/sync/diff/scope.d.ts +12 -0
- package/dist/graph/sync/diff/scope.d.ts.map +1 -0
- package/dist/graph/sync/diff/scope.js +17 -0
- package/dist/graph/sync/diff/scope.js.map +1 -0
- package/dist/graph/sync/index.d.ts +12 -0
- package/dist/graph/sync/index.d.ts.map +1 -0
- package/dist/graph/sync/index.js +21 -0
- package/dist/graph/sync/index.js.map +1 -0
- package/dist/graph/sync/matching.d.ts +53 -0
- package/dist/graph/sync/matching.d.ts.map +1 -0
- package/dist/graph/sync/matching.js +54 -0
- package/dist/graph/sync/matching.js.map +1 -0
- package/dist/graph/sync/merge/index.d.ts +3 -0
- package/dist/graph/sync/merge/index.d.ts.map +1 -0
- package/dist/graph/sync/merge/index.js +3 -0
- package/dist/graph/sync/merge/index.js.map +1 -0
- package/dist/graph/sync/merge/merge.d.ts +21 -0
- package/dist/graph/sync/merge/merge.d.ts.map +1 -0
- package/dist/graph/sync/merge/merge.js +105 -0
- package/dist/graph/sync/merge/merge.js.map +1 -0
- package/dist/graph/sync/merge/policy.d.ts +13 -0
- package/dist/graph/sync/merge/policy.d.ts.map +1 -0
- package/dist/graph/sync/merge/policy.js +2 -0
- package/dist/graph/sync/merge/policy.js.map +1 -0
- package/dist/graph/sync/patch/index.d.ts +4 -0
- package/dist/graph/sync/patch/index.d.ts.map +1 -0
- package/dist/graph/sync/patch/index.js +3 -0
- package/dist/graph/sync/patch/index.js.map +1 -0
- package/dist/graph/sync/patch/patch.d.ts +82 -0
- package/dist/graph/sync/patch/patch.d.ts.map +1 -0
- package/dist/graph/sync/patch/patch.js +230 -0
- package/dist/graph/sync/patch/patch.js.map +1 -0
- package/dist/graph/sync/patch/set-aliases.d.ts +18 -0
- package/dist/graph/sync/patch/set-aliases.d.ts.map +1 -0
- package/dist/graph/sync/patch/set-aliases.js +25 -0
- package/dist/graph/sync/patch/set-aliases.js.map +1 -0
- package/dist/graph/sync/patch/types.d.ts +62 -0
- package/dist/graph/sync/patch/types.d.ts.map +1 -0
- package/dist/graph/sync/patch/types.js +2 -0
- package/dist/graph/sync/patch/types.js.map +1 -0
- package/dist/graph/sync/plan.d.ts +17 -0
- package/dist/graph/sync/plan.d.ts.map +1 -0
- package/dist/graph/sync/plan.js +23 -0
- package/dist/graph/sync/plan.js.map +1 -0
- package/dist/graph/sync/policy/index.d.ts +2 -0
- package/dist/graph/sync/policy/index.d.ts.map +1 -0
- package/dist/graph/sync/policy/index.js +2 -0
- package/dist/graph/sync/policy/index.js.map +1 -0
- package/dist/graph/sync/policy/sync-policy.d.ts +12 -0
- package/dist/graph/sync/policy/sync-policy.d.ts.map +1 -0
- package/dist/graph/sync/policy/sync-policy.js +5 -0
- package/dist/graph/sync/policy/sync-policy.js.map +1 -0
- package/dist/graph/sync/reconcile/config.d.ts +9 -0
- package/dist/graph/sync/reconcile/config.d.ts.map +1 -0
- package/dist/graph/sync/reconcile/config.js +2 -0
- package/dist/graph/sync/reconcile/config.js.map +1 -0
- package/dist/graph/sync/reconcile/index.d.ts +6 -0
- package/dist/graph/sync/reconcile/index.d.ts.map +1 -0
- package/dist/graph/sync/reconcile/index.js +6 -0
- package/dist/graph/sync/reconcile/index.js.map +1 -0
- package/dist/graph/sync/reconcile/reconcile.d.ts +21 -0
- package/dist/graph/sync/reconcile/reconcile.d.ts.map +1 -0
- package/dist/graph/sync/reconcile/reconcile.js +83 -0
- package/dist/graph/sync/reconcile/reconcile.js.map +1 -0
- package/dist/graph/sync/reconcile/resolve-props.d.ts +3 -0
- package/dist/graph/sync/reconcile/resolve-props.d.ts.map +1 -0
- package/dist/graph/sync/reconcile/resolve-props.js +19 -0
- package/dist/graph/sync/reconcile/resolve-props.js.map +1 -0
- package/dist/graph/sync/reconcile/resolve.d.ts +15 -0
- package/dist/graph/sync/reconcile/resolve.d.ts.map +1 -0
- package/dist/graph/sync/reconcile/resolve.js +117 -0
- package/dist/graph/sync/reconcile/resolve.js.map +1 -0
- package/dist/graph/sync/reconcile/untracked.d.ts +5 -0
- package/dist/graph/sync/reconcile/untracked.d.ts.map +1 -0
- package/dist/graph/sync/reconcile/untracked.js +2 -0
- package/dist/graph/sync/reconcile/untracked.js.map +1 -0
- package/dist/graph/sync/remote/fold.d.ts +37 -0
- package/dist/graph/sync/remote/fold.d.ts.map +1 -0
- package/dist/graph/sync/remote/fold.js +74 -0
- package/dist/graph/sync/remote/fold.js.map +1 -0
- package/dist/graph/sync/remote/index.d.ts +4 -0
- package/dist/graph/sync/remote/index.d.ts.map +1 -0
- package/dist/graph/sync/remote/index.js +2 -0
- package/dist/graph/sync/remote/index.js.map +1 -0
- package/dist/graph/sync/remote/keys.d.ts +17 -0
- package/dist/graph/sync/remote/keys.d.ts.map +1 -0
- package/dist/graph/sync/remote/keys.js +2 -0
- package/dist/graph/sync/remote/keys.js.map +1 -0
- package/dist/graph/tree/aliases.d.ts +62 -0
- package/dist/graph/tree/aliases.d.ts.map +1 -0
- package/dist/graph/tree/aliases.js +139 -0
- package/dist/graph/tree/aliases.js.map +1 -0
- package/dist/graph/tree/build/index.d.ts +32 -0
- package/dist/graph/tree/build/index.d.ts.map +1 -0
- package/dist/graph/tree/build/index.js +40 -0
- package/dist/graph/tree/build/index.js.map +1 -0
- package/dist/graph/tree/build/layout.d.ts +29 -0
- package/dist/graph/tree/build/layout.d.ts.map +1 -0
- package/dist/graph/tree/build/layout.js +98 -0
- package/dist/graph/tree/build/layout.js.map +1 -0
- package/dist/graph/tree/build/validate.d.ts +43 -0
- package/dist/graph/tree/build/validate.d.ts.map +1 -0
- package/dist/graph/tree/build/validate.js +150 -0
- package/dist/graph/tree/build/validate.js.map +1 -0
- package/dist/graph/tree/edge/endpoint.d.ts +29 -0
- package/dist/graph/tree/edge/endpoint.d.ts.map +1 -0
- package/dist/graph/tree/edge/endpoint.js +10 -0
- package/dist/graph/tree/edge/endpoint.js.map +1 -0
- package/dist/graph/tree/edge/index.d.ts +5 -0
- package/dist/graph/tree/edge/index.d.ts.map +1 -0
- package/dist/graph/tree/edge/index.js +3 -0
- package/dist/graph/tree/edge/index.js.map +1 -0
- package/dist/graph/tree/edge/tree-edge.d.ts +35 -0
- package/dist/graph/tree/edge/tree-edge.d.ts.map +1 -0
- package/dist/graph/tree/edge/tree-edge.js +16 -0
- package/dist/graph/tree/edge/tree-edge.js.map +1 -0
- package/dist/graph/tree/errors.d.ts +32 -0
- package/dist/graph/tree/errors.d.ts.map +1 -0
- package/dist/graph/tree/errors.js +30 -0
- package/dist/graph/tree/errors.js.map +1 -0
- package/dist/graph/tree/helpers.d.ts +12 -0
- package/dist/graph/tree/helpers.d.ts.map +1 -0
- package/dist/graph/tree/helpers.js +11 -0
- package/dist/graph/tree/helpers.js.map +1 -0
- package/dist/graph/tree/index.d.ts +12 -0
- package/dist/graph/tree/index.d.ts.map +1 -0
- package/dist/graph/tree/index.js +10 -0
- package/dist/graph/tree/index.js.map +1 -0
- package/dist/graph/tree/path/absolute/constants.d.ts +8 -0
- package/dist/graph/tree/path/absolute/constants.d.ts.map +1 -0
- package/dist/graph/tree/path/absolute/constants.js +8 -0
- package/dist/graph/tree/path/absolute/constants.js.map +1 -0
- package/dist/graph/tree/path/absolute/grammar.d.ts +12 -0
- package/dist/graph/tree/path/absolute/grammar.d.ts.map +1 -0
- package/dist/graph/tree/path/absolute/grammar.js +110 -0
- package/dist/graph/tree/path/absolute/grammar.js.map +1 -0
- package/dist/graph/tree/path/absolute/index.d.ts +6 -0
- package/dist/graph/tree/path/absolute/index.d.ts.map +1 -0
- package/dist/graph/tree/path/absolute/index.js +6 -0
- package/dist/graph/tree/path/absolute/index.js.map +1 -0
- package/dist/graph/tree/path/absolute/register.d.ts +9 -0
- package/dist/graph/tree/path/absolute/register.d.ts.map +1 -0
- package/dist/graph/tree/path/absolute/register.js +19 -0
- package/dist/graph/tree/path/absolute/register.js.map +1 -0
- package/dist/graph/tree/path/absolute/segment.d.ts +17 -0
- package/dist/graph/tree/path/absolute/segment.d.ts.map +1 -0
- package/dist/graph/tree/path/absolute/segment.js +24 -0
- package/dist/graph/tree/path/absolute/segment.js.map +1 -0
- package/dist/graph/tree/path/absolute/type.d.ts +52 -0
- package/dist/graph/tree/path/absolute/type.d.ts.map +1 -0
- package/dist/graph/tree/path/absolute/type.js +197 -0
- package/dist/graph/tree/path/absolute/type.js.map +1 -0
- package/dist/graph/tree/path/absolute-path.d.ts +2 -0
- package/dist/graph/tree/path/absolute-path.d.ts.map +1 -0
- package/dist/graph/tree/path/absolute-path.js +3 -0
- package/dist/graph/tree/path/absolute-path.js.map +1 -0
- package/dist/graph/tree/path/constants.d.ts +8 -0
- package/dist/graph/tree/path/constants.d.ts.map +1 -0
- package/dist/graph/tree/path/constants.js +8 -0
- package/dist/graph/tree/path/constants.js.map +1 -0
- package/dist/graph/tree/path/index.d.ts +6 -0
- package/dist/graph/tree/path/index.d.ts.map +1 -0
- package/dist/graph/tree/path/index.js +5 -0
- package/dist/graph/tree/path/index.js.map +1 -0
- package/dist/graph/tree/path/relative/constants.d.ts +5 -0
- package/dist/graph/tree/path/relative/constants.d.ts.map +1 -0
- package/dist/graph/tree/path/relative/constants.js +5 -0
- package/dist/graph/tree/path/relative/constants.js.map +1 -0
- package/dist/graph/tree/path/relative/grammar.d.ts +19 -0
- package/dist/graph/tree/path/relative/grammar.d.ts.map +1 -0
- package/dist/graph/tree/path/relative/grammar.js +47 -0
- package/dist/graph/tree/path/relative/grammar.js.map +1 -0
- package/dist/graph/tree/path/relative/index.d.ts +5 -0
- package/dist/graph/tree/path/relative/index.d.ts.map +1 -0
- package/dist/graph/tree/path/relative/index.js +5 -0
- package/dist/graph/tree/path/relative/index.js.map +1 -0
- package/dist/graph/tree/path/relative/register.d.ts +11 -0
- package/dist/graph/tree/path/relative/register.d.ts.map +1 -0
- package/dist/graph/tree/path/relative/register.js +18 -0
- package/dist/graph/tree/path/relative/register.js.map +1 -0
- package/dist/graph/tree/path/relative/type.d.ts +42 -0
- package/dist/graph/tree/path/relative/type.d.ts.map +1 -0
- package/dist/graph/tree/path/relative/type.js +183 -0
- package/dist/graph/tree/path/relative/type.js.map +1 -0
- package/dist/graph/tree/path/relative-path.d.ts +2 -0
- package/dist/graph/tree/path/relative-path.d.ts.map +1 -0
- package/dist/graph/tree/path/relative-path.js +3 -0
- package/dist/graph/tree/path/relative-path.js.map +1 -0
- package/dist/graph/tree/path/tree-path.d.ts +4 -0
- package/dist/graph/tree/path/tree-path.d.ts.map +1 -0
- package/dist/graph/tree/path/tree-path.js +2 -0
- package/dist/graph/tree/path/tree-path.js.map +1 -0
- package/dist/graph/tree/serialize.d.ts +40 -0
- package/dist/graph/tree/serialize.d.ts.map +1 -0
- package/dist/graph/tree/serialize.js +73 -0
- package/dist/graph/tree/serialize.js.map +1 -0
- package/dist/graph/tree/tree.d.ts +121 -0
- package/dist/graph/tree/tree.d.ts.map +1 -0
- package/dist/graph/tree/tree.js +323 -0
- package/dist/graph/tree/tree.js.map +1 -0
- package/dist/graph/tree/types.d.ts +41 -0
- package/dist/graph/tree/types.d.ts.map +1 -0
- package/dist/graph/tree/types.js +2 -0
- package/dist/graph/tree/types.js.map +1 -0
- package/dist/graph/tree/zod.d.ts +19 -0
- package/dist/graph/tree/zod.d.ts.map +1 -0
- package/dist/graph/tree/zod.js +20 -0
- package/dist/graph/tree/zod.js.map +1 -0
- package/dist/graph/types.d.ts +33 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +2 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/graph/zod.d.ts +61 -0
- package/dist/graph/zod.d.ts.map +1 -0
- package/dist/graph/zod.js +55 -0
- package/dist/graph/zod.js.map +1 -0
- package/dist/ids.types.d.ts +69 -0
- package/dist/ids.types.d.ts.map +1 -0
- package/dist/ids.types.js +24 -0
- package/dist/ids.types.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/kernel.d.ts +9510 -0
- package/dist/kernel.d.ts.map +1 -0
- package/dist/kernel.js +84 -0
- package/dist/kernel.js.map +1 -0
- package/dist/path-dsl.d.ts +62 -0
- package/dist/path-dsl.d.ts.map +1 -0
- package/dist/path-dsl.js +100 -0
- package/dist/path-dsl.js.map +1 -0
- package/dist/schema/classes/Class.class.d.ts +279 -0
- package/dist/schema/classes/Class.class.d.ts.map +1 -0
- package/dist/schema/classes/Class.class.js +24 -0
- package/dist/schema/classes/Class.class.js.map +1 -0
- package/dist/schema/classes/Domain.class.d.ts +287 -0
- package/dist/schema/classes/Domain.class.d.ts.map +1 -0
- package/dist/schema/classes/Domain.class.js +28 -0
- package/dist/schema/classes/Domain.class.js.map +1 -0
- package/dist/schema/classes/Folder.class.d.ts +269 -0
- package/dist/schema/classes/Folder.class.d.ts.map +1 -0
- package/dist/schema/classes/Folder.class.js +21 -0
- package/dist/schema/classes/Folder.class.js.map +1 -0
- package/dist/schema/classes/Function.class.d.ts +1667 -0
- package/dist/schema/classes/Function.class.d.ts.map +1 -0
- package/dist/schema/classes/Function.class.js +49 -0
- package/dist/schema/classes/Function.class.js.map +1 -0
- package/dist/schema/classes/Interface.class.d.ts +92 -0
- package/dist/schema/classes/Interface.class.d.ts.map +1 -0
- package/dist/schema/classes/Interface.class.js +22 -0
- package/dist/schema/classes/Interface.class.js.map +1 -0
- package/dist/schema/classes/Root.class.d.ts +636 -0
- package/dist/schema/classes/Root.class.d.ts.map +1 -0
- package/dist/schema/classes/Root.class.js +23 -0
- package/dist/schema/classes/Root.class.js.map +1 -0
- package/dist/schema/classes/View.class.d.ts +3407 -0
- package/dist/schema/classes/View.class.d.ts.map +1 -0
- package/dist/schema/classes/View.class.js +48 -0
- package/dist/schema/classes/View.class.js.map +1 -0
- package/dist/schema/classes/edges/calls.class.d.ts +2 -0
- package/dist/schema/classes/edges/calls.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/calls.class.js +4 -0
- package/dist/schema/classes/edges/calls.class.js.map +1 -0
- package/dist/schema/classes/edges/constrained-by.class.d.ts +2 -0
- package/dist/schema/classes/edges/constrained-by.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/constrained-by.class.js +4 -0
- package/dist/schema/classes/edges/constrained-by.class.js.map +1 -0
- package/dist/schema/classes/edges/excluded-from.class.d.ts +2 -0
- package/dist/schema/classes/edges/excluded-from.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/excluded-from.class.js +4 -0
- package/dist/schema/classes/edges/excluded-from.class.js.map +1 -0
- package/dist/schema/classes/edges/extends-with.class.d.ts +2 -0
- package/dist/schema/classes/edges/extends-with.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/extends-with.class.js +4 -0
- package/dist/schema/classes/edges/extends-with.class.js.map +1 -0
- package/dist/schema/classes/edges/extends.class.d.ts +2 -0
- package/dist/schema/classes/edges/extends.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/extends.class.js +4 -0
- package/dist/schema/classes/edges/extends.class.js.map +1 -0
- package/dist/schema/classes/edges/from.class.d.ts +2 -0
- package/dist/schema/classes/edges/from.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/from.class.js +4 -0
- package/dist/schema/classes/edges/from.class.js.map +1 -0
- package/dist/schema/classes/edges/has-parent.class.d.ts +2 -0
- package/dist/schema/classes/edges/has-parent.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/has-parent.class.js +4 -0
- package/dist/schema/classes/edges/has-parent.class.js.map +1 -0
- package/dist/schema/classes/edges/has-perm.class.d.ts +2 -0
- package/dist/schema/classes/edges/has-perm.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/has-perm.class.js +5 -0
- package/dist/schema/classes/edges/has-perm.class.js.map +1 -0
- package/dist/schema/classes/edges/implements.class.d.ts +2 -0
- package/dist/schema/classes/edges/implements.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/implements.class.js +4 -0
- package/dist/schema/classes/edges/implements.class.js.map +1 -0
- package/dist/schema/classes/edges/index.d.ts +16 -0
- package/dist/schema/classes/edges/index.d.ts.map +1 -0
- package/dist/schema/classes/edges/index.js +16 -0
- package/dist/schema/classes/edges/index.js.map +1 -0
- package/dist/schema/classes/edges/installed-in.class.d.ts +2 -0
- package/dist/schema/classes/edges/installed-in.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/installed-in.class.js +5 -0
- package/dist/schema/classes/edges/installed-in.class.js.map +1 -0
- package/dist/schema/classes/edges/instance-of.class.d.ts +2 -0
- package/dist/schema/classes/edges/instance-of.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/instance-of.class.js +5 -0
- package/dist/schema/classes/edges/instance-of.class.js.map +1 -0
- package/dist/schema/classes/edges/method-of.class.d.ts +2 -0
- package/dist/schema/classes/edges/method-of.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/method-of.class.js +5 -0
- package/dist/schema/classes/edges/method-of.class.js.map +1 -0
- package/dist/schema/classes/edges/of-domain.class.d.ts +2 -0
- package/dist/schema/classes/edges/of-domain.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/of-domain.class.js +4 -0
- package/dist/schema/classes/edges/of-domain.class.js.map +1 -0
- package/dist/schema/classes/edges/to.class.d.ts +2 -0
- package/dist/schema/classes/edges/to.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/to.class.js +4 -0
- package/dist/schema/classes/edges/to.class.js.map +1 -0
- package/dist/schema/classes/edges/view-for.class.d.ts +3 -0
- package/dist/schema/classes/edges/view-for.class.d.ts.map +1 -0
- package/dist/schema/classes/edges/view-for.class.js +7 -0
- package/dist/schema/classes/edges/view-for.class.js.map +1 -0
- package/dist/schema/classes/icons.d.ts +23 -0
- package/dist/schema/classes/icons.d.ts.map +1 -0
- package/dist/schema/classes/icons.js +24 -0
- package/dist/schema/classes/icons.js.map +1 -0
- package/dist/schema/classes/index.d.ts +9 -0
- package/dist/schema/classes/index.d.ts.map +1 -0
- package/dist/schema/classes/index.js +9 -0
- package/dist/schema/classes/index.js.map +1 -0
- package/dist/schema/definitions/edge-class.d.ts +14 -0
- package/dist/schema/definitions/edge-class.d.ts.map +1 -0
- package/dist/schema/definitions/edge-class.js +16 -0
- package/dist/schema/definitions/edge-class.js.map +1 -0
- package/dist/schema/definitions/edge-interface.d.ts +18 -0
- package/dist/schema/definitions/edge-interface.d.ts.map +1 -0
- package/dist/schema/definitions/edge-interface.js +13 -0
- package/dist/schema/definitions/edge-interface.js.map +1 -0
- package/dist/schema/definitions/index.d.ts +5 -0
- package/dist/schema/definitions/index.d.ts.map +1 -0
- package/dist/schema/definitions/index.js +5 -0
- package/dist/schema/definitions/index.js.map +1 -0
- package/dist/schema/definitions/node-class.d.ts +19 -0
- package/dist/schema/definitions/node-class.d.ts.map +1 -0
- package/dist/schema/definitions/node-class.js +13 -0
- package/dist/schema/definitions/node-class.js.map +1 -0
- package/dist/schema/definitions/node-interface.d.ts +18 -0
- package/dist/schema/definitions/node-interface.d.ts.map +1 -0
- package/dist/schema/definitions/node-interface.js +13 -0
- package/dist/schema/definitions/node-interface.js.map +1 -0
- package/dist/schema/index.d.ts +5 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +5 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/interfaces/Container.interface.d.ts +94 -0
- package/dist/schema/interfaces/Container.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/Container.interface.js +24 -0
- package/dist/schema/interfaces/Container.interface.js.map +1 -0
- package/dist/schema/interfaces/Edge.interface.d.ts +25 -0
- package/dist/schema/interfaces/Edge.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/Edge.interface.js +4 -0
- package/dist/schema/interfaces/Edge.interface.js.map +1 -0
- package/dist/schema/interfaces/Function.interface.d.ts +785 -0
- package/dist/schema/interfaces/Function.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/Function.interface.js +28 -0
- package/dist/schema/interfaces/Function.interface.js.map +1 -0
- package/dist/schema/interfaces/Identity.interface.d.ts +183 -0
- package/dist/schema/interfaces/Identity.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/Identity.interface.js +103 -0
- package/dist/schema/interfaces/Identity.interface.js.map +1 -0
- package/dist/schema/interfaces/Node.interface.d.ts +81 -0
- package/dist/schema/interfaces/Node.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/Node.interface.js +72 -0
- package/dist/schema/interfaces/Node.interface.js.map +1 -0
- package/dist/schema/interfaces/UI.interface.d.ts +1654 -0
- package/dist/schema/interfaces/UI.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/UI.interface.js +17 -0
- package/dist/schema/interfaces/UI.interface.js.map +1 -0
- package/dist/schema/interfaces/generics/Descriptable.interface.d.ts +7 -0
- package/dist/schema/interfaces/generics/Descriptable.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/generics/Descriptable.interface.js +6 -0
- package/dist/schema/interfaces/generics/Descriptable.interface.js.map +1 -0
- package/dist/schema/interfaces/generics/Iconable.interface.d.ts +7 -0
- package/dist/schema/interfaces/generics/Iconable.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/generics/Iconable.interface.js +9 -0
- package/dist/schema/interfaces/generics/Iconable.interface.js.map +1 -0
- package/dist/schema/interfaces/generics/Named.interface.d.ts +8 -0
- package/dist/schema/interfaces/generics/Named.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/generics/Named.interface.js +9 -0
- package/dist/schema/interfaces/generics/Named.interface.js.map +1 -0
- package/dist/schema/interfaces/generics/Remotable.interface.d.ts +35 -0
- package/dist/schema/interfaces/generics/Remotable.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/generics/Remotable.interface.js +20 -0
- package/dist/schema/interfaces/generics/Remotable.interface.js.map +1 -0
- package/dist/schema/interfaces/generics/Sluggable.interface.d.ts +8 -0
- package/dist/schema/interfaces/generics/Sluggable.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/generics/Sluggable.interface.js +16 -0
- package/dist/schema/interfaces/generics/Sluggable.interface.js.map +1 -0
- package/dist/schema/interfaces/generics/Statused.interface.d.ts +21 -0
- package/dist/schema/interfaces/generics/Statused.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/generics/Statused.interface.js +7 -0
- package/dist/schema/interfaces/generics/Statused.interface.js.map +1 -0
- package/dist/schema/interfaces/generics/Timestamped.interface.d.ts +8 -0
- package/dist/schema/interfaces/generics/Timestamped.interface.d.ts.map +1 -0
- package/dist/schema/interfaces/generics/Timestamped.interface.js +6 -0
- package/dist/schema/interfaces/generics/Timestamped.interface.js.map +1 -0
- package/dist/schema/interfaces/generics/index.d.ts +8 -0
- package/dist/schema/interfaces/generics/index.d.ts.map +1 -0
- package/dist/schema/interfaces/generics/index.js +8 -0
- package/dist/schema/interfaces/generics/index.js.map +1 -0
- package/dist/schema/interfaces/index.d.ts +8 -0
- package/dist/schema/interfaces/index.d.ts.map +1 -0
- package/dist/schema/interfaces/index.js +8 -0
- package/dist/schema/interfaces/index.js.map +1 -0
- package/dist/schema/schema.d.ts +9446 -0
- package/dist/schema/schema.d.ts.map +1 -0
- package/dist/schema/schema.js +49 -0
- package/dist/schema/schema.js.map +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/dist/vitest.config.js +8 -0
- package/dist/vitest.config.js.map +1 -0
- package/package.json +129 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTH_V2 Scope Utilities
|
|
3
|
+
*
|
|
4
|
+
* Proper scope intersection logic.
|
|
5
|
+
* Scopes can only be made MORE restrictive, never less.
|
|
6
|
+
*/
|
|
7
|
+
import type { FilterDetail } from '#auth/access';
|
|
8
|
+
import type { Permission } from '#auth/permissions';
|
|
9
|
+
import type { IdentityId } from '#ids';
|
|
10
|
+
import type { IdentityExpr, Scope } from './types';
|
|
11
|
+
/**
|
|
12
|
+
* Intersect two individual scopes.
|
|
13
|
+
* Returns the most restrictive combination of both.
|
|
14
|
+
*
|
|
15
|
+
* Each dimension (nodes, perms, principals) is intersected:
|
|
16
|
+
* - nodes/principals: undefined = unrestricted, [] = nothing allowed
|
|
17
|
+
* - perms: undefined = unrestricted, 0 = nothing allowed, positive = these bits
|
|
18
|
+
*
|
|
19
|
+
* Returns null if the intersection is impossible (would allow nothing).
|
|
20
|
+
*/
|
|
21
|
+
export declare function intersectScope(a: Scope, b: Scope): Scope | null;
|
|
22
|
+
/**
|
|
23
|
+
* Intersect two scope arrays.
|
|
24
|
+
*
|
|
25
|
+
* Multiple scopes are OR'd (any scope passing = access granted).
|
|
26
|
+
* Intersection of two scope arrays = for each pair, compute intersection,
|
|
27
|
+
* keep only valid (non-null) results.
|
|
28
|
+
*
|
|
29
|
+
* Empty array = deny-all (no scope satisfies access). This matches
|
|
30
|
+
* `checkFilter` semantics, where `[]` is the encoding for "all
|
|
31
|
+
* intersections were impossible". Composing deny-all with any other
|
|
32
|
+
* scope set must remain deny-all — otherwise a previously-impossible
|
|
33
|
+
* branch is silently widened back to its sibling's scopes.
|
|
34
|
+
*
|
|
35
|
+
* The undefined/no-scopes case ("unrestricted") is encoded with
|
|
36
|
+
* `Scope[] | undefined` at call sites; consumers like `checkFilter`
|
|
37
|
+
* branch on `scopes === undefined` before calling here.
|
|
38
|
+
*
|
|
39
|
+
* @param a First scope array (OR'd together)
|
|
40
|
+
* @param b Second scope array (OR'd together)
|
|
41
|
+
* @returns Intersection of scopes (also OR'd together); `[]` when
|
|
42
|
+
* either input is `[]` or no scope pair has a non-null intersection.
|
|
43
|
+
*/
|
|
44
|
+
export declare function intersectScopes(a: Scope[], b: Scope[]): Scope[];
|
|
45
|
+
/**
|
|
46
|
+
* Check if a single scope allows the given principal and perm.
|
|
47
|
+
* Rich version that returns the failed check reason.
|
|
48
|
+
*/
|
|
49
|
+
export declare function scopePasses(scope: Scope, principal: IdentityId | undefined, perm: Permission): {
|
|
50
|
+
passes: boolean;
|
|
51
|
+
failedCheck?: 'principal' | 'perm';
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Check scope filter for cold path (returns FilterDetail[]).
|
|
55
|
+
*
|
|
56
|
+
* Distinguishes three cases:
|
|
57
|
+
* - undefined: no scopes at all → unrestricted (allowed)
|
|
58
|
+
* - []: all scope intersections were impossible → denied
|
|
59
|
+
* - non-empty: evaluate each scope against principal + perm
|
|
60
|
+
*/
|
|
61
|
+
export declare function checkFilter(scopes: Scope[] | undefined, principal: IdentityId | undefined, perm: Permission): {
|
|
62
|
+
allowed: boolean;
|
|
63
|
+
details?: FilterDetail[];
|
|
64
|
+
applicableScopes?: Scope[];
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Wrap an expression in a scope node.
|
|
68
|
+
*
|
|
69
|
+
* @param expr - The expression to wrap
|
|
70
|
+
* @param scope - The scope to apply
|
|
71
|
+
*/
|
|
72
|
+
export declare function applyScope(expr: IdentityExpr, scope: Scope): IdentityExpr;
|
|
73
|
+
/**
|
|
74
|
+
* Wrap an expression in a scope node with multiple scopes.
|
|
75
|
+
* Used by the auth layer to narrow delegated expressions.
|
|
76
|
+
*
|
|
77
|
+
* @param expr - The expression to narrow
|
|
78
|
+
* @param scopes - Scopes to apply (OR'd together)
|
|
79
|
+
*/
|
|
80
|
+
export declare function applyTopLevelScopes(expr: IdentityExpr, scopes: Scope[]): IdentityExpr;
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,GAAG,YAAY,CAEzE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,CAGrF"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTH_V2 Scope Utilities
|
|
3
|
+
*
|
|
4
|
+
* Proper scope intersection logic.
|
|
5
|
+
* Scopes can only be made MORE restrictive, never less.
|
|
6
|
+
*/
|
|
7
|
+
// =============================================================================
|
|
8
|
+
// SCOPE INTERSECTION
|
|
9
|
+
// =============================================================================
|
|
10
|
+
/**
|
|
11
|
+
* Intersect two arrays, returning elements present in both.
|
|
12
|
+
* undefined means "unrestricted" - the other array wins.
|
|
13
|
+
* Empty array means "nothing allowed".
|
|
14
|
+
*/
|
|
15
|
+
function intersectArrays(a, b) {
|
|
16
|
+
if (a === undefined && b === undefined)
|
|
17
|
+
return undefined;
|
|
18
|
+
if (a === undefined)
|
|
19
|
+
return b;
|
|
20
|
+
if (b === undefined)
|
|
21
|
+
return a;
|
|
22
|
+
const setB = new Set(b);
|
|
23
|
+
return a.filter((x) => setB.has(x));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Intersect two permission masks.
|
|
27
|
+
* undefined means "unrestricted" — the other mask wins.
|
|
28
|
+
* 0 means "nothing allowed".
|
|
29
|
+
*/
|
|
30
|
+
function intersectPermsMask(a, b) {
|
|
31
|
+
if (a === undefined && b === undefined)
|
|
32
|
+
return undefined;
|
|
33
|
+
if (a === undefined)
|
|
34
|
+
return b;
|
|
35
|
+
if (b === undefined)
|
|
36
|
+
return a;
|
|
37
|
+
return (a & b);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Intersect two individual scopes.
|
|
41
|
+
* Returns the most restrictive combination of both.
|
|
42
|
+
*
|
|
43
|
+
* Each dimension (nodes, perms, principals) is intersected:
|
|
44
|
+
* - nodes/principals: undefined = unrestricted, [] = nothing allowed
|
|
45
|
+
* - perms: undefined = unrestricted, 0 = nothing allowed, positive = these bits
|
|
46
|
+
*
|
|
47
|
+
* Returns null if the intersection is impossible (would allow nothing).
|
|
48
|
+
*/
|
|
49
|
+
export function intersectScope(a, b) {
|
|
50
|
+
const nodes = intersectArrays(a.nodes, b.nodes);
|
|
51
|
+
const perms = intersectPermsMask(a.perms, b.perms);
|
|
52
|
+
const principals = intersectArrays(a.principals, b.principals);
|
|
53
|
+
// If any dimension allows nothing, the scope is impossible
|
|
54
|
+
if (nodes?.length === 0 || perms === 0 || principals?.length === 0) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
// Build result, omitting undefined dimensions
|
|
58
|
+
const result = {};
|
|
59
|
+
if (nodes !== undefined)
|
|
60
|
+
result.nodes = nodes;
|
|
61
|
+
if (perms !== undefined)
|
|
62
|
+
result.perms = perms;
|
|
63
|
+
if (principals !== undefined)
|
|
64
|
+
result.principals = principals;
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Intersect two scope arrays.
|
|
69
|
+
*
|
|
70
|
+
* Multiple scopes are OR'd (any scope passing = access granted).
|
|
71
|
+
* Intersection of two scope arrays = for each pair, compute intersection,
|
|
72
|
+
* keep only valid (non-null) results.
|
|
73
|
+
*
|
|
74
|
+
* Empty array = deny-all (no scope satisfies access). This matches
|
|
75
|
+
* `checkFilter` semantics, where `[]` is the encoding for "all
|
|
76
|
+
* intersections were impossible". Composing deny-all with any other
|
|
77
|
+
* scope set must remain deny-all — otherwise a previously-impossible
|
|
78
|
+
* branch is silently widened back to its sibling's scopes.
|
|
79
|
+
*
|
|
80
|
+
* The undefined/no-scopes case ("unrestricted") is encoded with
|
|
81
|
+
* `Scope[] | undefined` at call sites; consumers like `checkFilter`
|
|
82
|
+
* branch on `scopes === undefined` before calling here.
|
|
83
|
+
*
|
|
84
|
+
* @param a First scope array (OR'd together)
|
|
85
|
+
* @param b Second scope array (OR'd together)
|
|
86
|
+
* @returns Intersection of scopes (also OR'd together); `[]` when
|
|
87
|
+
* either input is `[]` or no scope pair has a non-null intersection.
|
|
88
|
+
*/
|
|
89
|
+
export function intersectScopes(a, b) {
|
|
90
|
+
// Empty array = deny-all. Composing with anything stays deny-all.
|
|
91
|
+
if (a.length === 0 || b.length === 0)
|
|
92
|
+
return [];
|
|
93
|
+
const seen = new Set();
|
|
94
|
+
const results = [];
|
|
95
|
+
for (const scopeA of a) {
|
|
96
|
+
for (const scopeB of b) {
|
|
97
|
+
const intersection = intersectScope(scopeA, scopeB);
|
|
98
|
+
if (intersection !== null) {
|
|
99
|
+
const key = scopeToKey(intersection);
|
|
100
|
+
if (!seen.has(key)) {
|
|
101
|
+
seen.add(key);
|
|
102
|
+
results.push(intersection);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return results;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Create a deterministic string key for a scope (for deduplication).
|
|
111
|
+
* Uses JSON.stringify to avoid collisions from delimiter characters in IDs.
|
|
112
|
+
*/
|
|
113
|
+
function scopeToKey(scope) {
|
|
114
|
+
return JSON.stringify({
|
|
115
|
+
n: scope.nodes ? [...scope.nodes].sort() : null,
|
|
116
|
+
p: scope.perms ?? null,
|
|
117
|
+
r: scope.principals ? [...scope.principals].sort() : null,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
// =============================================================================
|
|
121
|
+
// RICH SCOPE CHECKS (used by pruning phase)
|
|
122
|
+
// =============================================================================
|
|
123
|
+
/**
|
|
124
|
+
* Check if a single scope allows the given principal and perm.
|
|
125
|
+
* Rich version that returns the failed check reason.
|
|
126
|
+
*/
|
|
127
|
+
export function scopePasses(scope, principal, perm) {
|
|
128
|
+
if (scope.principals !== undefined &&
|
|
129
|
+
(scope.principals.length === 0 || !principal || !scope.principals.includes(principal))) {
|
|
130
|
+
return { passes: false, failedCheck: 'principal' };
|
|
131
|
+
}
|
|
132
|
+
if (scope.perms !== undefined && (scope.perms & perm) === 0) {
|
|
133
|
+
return { passes: false, failedCheck: 'perm' };
|
|
134
|
+
}
|
|
135
|
+
return { passes: true };
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Check scope filter for cold path (returns FilterDetail[]).
|
|
139
|
+
*
|
|
140
|
+
* Distinguishes three cases:
|
|
141
|
+
* - undefined: no scopes at all → unrestricted (allowed)
|
|
142
|
+
* - []: all scope intersections were impossible → denied
|
|
143
|
+
* - non-empty: evaluate each scope against principal + perm
|
|
144
|
+
*/
|
|
145
|
+
export function checkFilter(scopes, principal, perm) {
|
|
146
|
+
if (scopes === undefined) {
|
|
147
|
+
return { allowed: true, applicableScopes: [] };
|
|
148
|
+
}
|
|
149
|
+
if (scopes.length === 0) {
|
|
150
|
+
return { allowed: false, details: [] };
|
|
151
|
+
}
|
|
152
|
+
const details = [];
|
|
153
|
+
const applicableScopes = [];
|
|
154
|
+
for (let i = 0; i < scopes.length; i++) {
|
|
155
|
+
const result = scopePasses(scopes[i], principal, perm);
|
|
156
|
+
if (result.passes) {
|
|
157
|
+
applicableScopes.push(scopes[i]);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
details.push({ scopeIndex: i, failedCheck: result.failedCheck });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (applicableScopes.length > 0) {
|
|
164
|
+
return { allowed: true, applicableScopes };
|
|
165
|
+
}
|
|
166
|
+
return { allowed: false, details };
|
|
167
|
+
}
|
|
168
|
+
// =============================================================================
|
|
169
|
+
// EXPRESSION TREE SCOPE OPERATIONS
|
|
170
|
+
// =============================================================================
|
|
171
|
+
/**
|
|
172
|
+
* Wrap an expression in a scope node.
|
|
173
|
+
*
|
|
174
|
+
* @param expr - The expression to wrap
|
|
175
|
+
* @param scope - The scope to apply
|
|
176
|
+
*/
|
|
177
|
+
export function applyScope(expr, scope) {
|
|
178
|
+
return { kind: 'scope', scopes: [scope], expr };
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Wrap an expression in a scope node with multiple scopes.
|
|
182
|
+
* Used by the auth layer to narrow delegated expressions.
|
|
183
|
+
*
|
|
184
|
+
* @param expr - The expression to narrow
|
|
185
|
+
* @param scopes - Scopes to apply (OR'd together)
|
|
186
|
+
*/
|
|
187
|
+
export function applyTopLevelScopes(expr, scopes) {
|
|
188
|
+
if (scopes.length === 0)
|
|
189
|
+
return expr;
|
|
190
|
+
return { kind: 'scope', scopes, expr };
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../../auth/expression/scope.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAEhF;;;;GAIG;AACH,SAAS,eAAe,CAAI,CAAkB,EAAE,CAAkB;IAChE,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IACxD,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,CAAA;IAC7B,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,CAAA;IAE7B,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAA;IACvB,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;AACrC,CAAC;AAED;;;;GAIG;AACH,SAAS,kBAAkB,CACzB,CAA6B,EAC7B,CAA6B;IAE7B,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IACxD,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,CAAA;IAC7B,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,CAAA;IAC7B,OAAO,CAAC,CAAC,GAAG,CA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AAI,EAAE,gBAAgB,EAAE,CAAA;IAC5C,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAA;AACpC,CAAC;AAED,gFAAgF;AAChF,mCAAmC;AACnC,gFAAgF;AAEhF;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,IAAkB,EAAE,KAAY;IACzD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;AACjD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAkB,EAAE,MAAe;IACrE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACpC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;AACxC,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { CredentialInput } from '#auth/credentials';
|
|
2
|
+
import type { PermissionMask } from '#auth/permissions';
|
|
3
|
+
import type { IdentityId, NodeId } from '#ids';
|
|
4
|
+
export type Scope = {
|
|
5
|
+
nodes?: NodeId[];
|
|
6
|
+
perms?: PermissionMask;
|
|
7
|
+
principals?: IdentityId[];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Expression tree for identity composition.
|
|
11
|
+
*
|
|
12
|
+
* - identity: leaf node representing a single identity
|
|
13
|
+
* - scope: wraps an expression with scope restrictions (scopes are OR'd)
|
|
14
|
+
* - union: OR of N expressions (A ∪ B ∪ C)
|
|
15
|
+
* - intersect: AND of N expressions (A ∩ B ∩ C)
|
|
16
|
+
* - exclude: set difference — base minus all excluded (base \ (e1 ∪ e2 ∪ ...))
|
|
17
|
+
*
|
|
18
|
+
* Scope nodes enable principal/perm filtering during pruning.
|
|
19
|
+
* Pruning evaluates scope nodes and propagates node restrictions
|
|
20
|
+
* to identity leaves, producing a PrunedIdentityExpr.
|
|
21
|
+
*/
|
|
22
|
+
export type IdentityExpr = {
|
|
23
|
+
kind: 'identity';
|
|
24
|
+
id: IdentityId;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'scope';
|
|
27
|
+
scopes: Scope[];
|
|
28
|
+
expr: IdentityExpr;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'union';
|
|
31
|
+
operands: IdentityExpr[];
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'intersect';
|
|
34
|
+
operands: IdentityExpr[];
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'exclude';
|
|
37
|
+
base: IdentityExpr;
|
|
38
|
+
excluded: IdentityExpr[];
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Unresolved identity expression (before kernel resolution).
|
|
42
|
+
*
|
|
43
|
+
* Client-side expressions reference identities by plain ID.
|
|
44
|
+
* Credential-based identity resolution is handled separately via a kernel operation/syscall.
|
|
45
|
+
*
|
|
46
|
+
* Structure mirrors resolved IdentityExpr.
|
|
47
|
+
*/
|
|
48
|
+
export type UnresolvedIdentityExpr = {
|
|
49
|
+
kind: 'identity';
|
|
50
|
+
self: true;
|
|
51
|
+
} | {
|
|
52
|
+
kind: 'identity';
|
|
53
|
+
credential: CredentialInput;
|
|
54
|
+
} | {
|
|
55
|
+
kind: 'scope';
|
|
56
|
+
scopes: Scope[];
|
|
57
|
+
expr: UnresolvedIdentityExpr;
|
|
58
|
+
} | {
|
|
59
|
+
kind: 'union';
|
|
60
|
+
operands: UnresolvedIdentityExpr[];
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'intersect';
|
|
63
|
+
operands: UnresolvedIdentityExpr[];
|
|
64
|
+
} | {
|
|
65
|
+
kind: 'exclude';
|
|
66
|
+
base: UnresolvedIdentityExpr;
|
|
67
|
+
excluded: UnresolvedIdentityExpr[];
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Self identity expression.
|
|
71
|
+
*/
|
|
72
|
+
export type SelfIdentityExpr = {
|
|
73
|
+
kind: 'identity';
|
|
74
|
+
self: true;
|
|
75
|
+
} | {
|
|
76
|
+
kind: 'scope';
|
|
77
|
+
scopes: Scope[];
|
|
78
|
+
expr: SelfIdentityExpr;
|
|
79
|
+
} | {
|
|
80
|
+
kind: 'union';
|
|
81
|
+
operands: SelfIdentityExpr[];
|
|
82
|
+
} | {
|
|
83
|
+
kind: 'intersect';
|
|
84
|
+
operands: SelfIdentityExpr[];
|
|
85
|
+
} | {
|
|
86
|
+
kind: 'exclude';
|
|
87
|
+
base: SelfIdentityExpr;
|
|
88
|
+
excluded: SelfIdentityExpr[];
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Expression tree after scope evaluation (pruning phase output).
|
|
92
|
+
*
|
|
93
|
+
* No 'scope' kind — all scopes have been evaluated:
|
|
94
|
+
* - principal/perm restrictions pruned dead branches (null → algebraic simplification)
|
|
95
|
+
* - node restrictions propagated to identity leaves as nodeRestriction
|
|
96
|
+
*
|
|
97
|
+
* Each identity leaf carries its own nodeRestriction (intersection of
|
|
98
|
+
* ancestor scope nodes). undefined = unrestricted, NodeId[] = must be
|
|
99
|
+
* descendant of at least one of these nodes.
|
|
100
|
+
*
|
|
101
|
+
* Algebraic simplifications applied during pruning:
|
|
102
|
+
* - A ∪ ∅ = A (filter null from union operands)
|
|
103
|
+
* - A ∩ ∅ = ∅ (any null in intersect → whole thing null)
|
|
104
|
+
* - ∅ \ A = ∅ (null base → null)
|
|
105
|
+
* - A \ ∅ = A (null excluded → drop it)
|
|
106
|
+
*/
|
|
107
|
+
export type PrunedIdentityExpr = {
|
|
108
|
+
kind: 'identity';
|
|
109
|
+
id: IdentityId;
|
|
110
|
+
nodeRestriction?: NodeId[];
|
|
111
|
+
} | {
|
|
112
|
+
kind: 'union';
|
|
113
|
+
operands: PrunedIdentityExpr[];
|
|
114
|
+
} | {
|
|
115
|
+
kind: 'intersect';
|
|
116
|
+
operands: PrunedIdentityExpr[];
|
|
117
|
+
} | {
|
|
118
|
+
kind: 'exclude';
|
|
119
|
+
base: PrunedIdentityExpr;
|
|
120
|
+
excluded: PrunedIdentityExpr[];
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../auth/expression/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAI9C,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,UAAU,CAAC,EAAE,UAAU,EAAE,CAAA;CAC1B,CAAA;AAID;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,EAAE,EAAE,UAAU,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,KAAK,EAAE,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,CAAA;AAIrE;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,GAC9B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,UAAU,CAAC;IA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C,QAAQ,EAAE,kBAAkB,EAAE,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,kBAAkB,EAAE,CAAA;CAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../auth/expression/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input Validation for Authorization
|
|
3
|
+
*
|
|
4
|
+
* Validates expression trees, Cypher identifiers, scopes, and access check inputs.
|
|
5
|
+
* Pure functions, no I/O.
|
|
6
|
+
*/
|
|
7
|
+
import type { Grant } from '#auth/grants';
|
|
8
|
+
import type { Permission } from '#auth/permissions';
|
|
9
|
+
import type { NodeId } from '#ids';
|
|
10
|
+
import { validatePermission, validatePermissionMask } from '#auth/permissions';
|
|
11
|
+
import type { IdentityExpr, Scope } from './types';
|
|
12
|
+
export { validatePermission, validatePermissionMask };
|
|
13
|
+
/**
|
|
14
|
+
* Validate a string is safe for Cypher interpolation.
|
|
15
|
+
* Throws if validation fails.
|
|
16
|
+
*/
|
|
17
|
+
export declare function validateCypherId(value: string, fieldName: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Exhaustive check helper - throws if an unknown expression kind is encountered.
|
|
20
|
+
*/
|
|
21
|
+
export declare function throwExhaustiveCheck(expr: never): never;
|
|
22
|
+
/**
|
|
23
|
+
* Validate all IDs in a scope array.
|
|
24
|
+
*/
|
|
25
|
+
export declare function validateScopes(scopes: Scope[] | undefined): void;
|
|
26
|
+
export declare const MAX_EXPRESSION_DEPTH = 100;
|
|
27
|
+
export declare function validateExpression(expr: IdentityExpr, depth?: number): void;
|
|
28
|
+
/**
|
|
29
|
+
* Validate all inputs for an access check.
|
|
30
|
+
*
|
|
31
|
+
* Path values are validated at parse time and so do not need separate
|
|
32
|
+
* Cypher-id validation here.
|
|
33
|
+
*/
|
|
34
|
+
export declare function validateAccessInputs(grant: Grant, perm: Permission, principal: NodeId): void;
|
|
35
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../auth/expression/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAElC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAE9E,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,CAAA;AAarD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAUvE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK,CAEvD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,SAAS,GAAG,IAAI,CAiBhE;AAED,eAAO,MAAM,oBAAoB,MAAM,CAAA;AAEvC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,GAAE,MAAU,GAAG,IAAI,CAqC9E;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAI5F"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input Validation for Authorization
|
|
3
|
+
*
|
|
4
|
+
* Validates expression trees, Cypher identifiers, scopes, and access check inputs.
|
|
5
|
+
* Pure functions, no I/O.
|
|
6
|
+
*/
|
|
7
|
+
import { validatePermission, validatePermissionMask } from '#auth/permissions';
|
|
8
|
+
export { validatePermission, validatePermissionMask };
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// INPUT VALIDATION (Security: Cypher Injection Prevention)
|
|
11
|
+
// =============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* Regex for safe Cypher identifiers.
|
|
14
|
+
* Allows: alphanumeric, underscore, hyphen, colon (for namespaced IDs)
|
|
15
|
+
* Max length: 256 chars to prevent DoS
|
|
16
|
+
*/
|
|
17
|
+
const SAFE_ID_REGEX = /^[a-zA-Z0-9_:-]{1,256}$/;
|
|
18
|
+
/**
|
|
19
|
+
* Validate a string is safe for Cypher interpolation.
|
|
20
|
+
* Throws if validation fails.
|
|
21
|
+
*/
|
|
22
|
+
export function validateCypherId(value, fieldName) {
|
|
23
|
+
if (typeof value !== 'string') {
|
|
24
|
+
throw new Error(`${fieldName} must be a string`);
|
|
25
|
+
}
|
|
26
|
+
if (value.length > 256 || !SAFE_ID_REGEX.test(value)) {
|
|
27
|
+
const preview = value.length > 50 ? value.slice(0, 50) + '...' : value;
|
|
28
|
+
throw new Error(`Invalid ${fieldName}: "${preview}" must contain only alphanumeric characters, underscores, hyphens, and colons (max 256 chars)`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Exhaustive check helper - throws if an unknown expression kind is encountered.
|
|
33
|
+
*/
|
|
34
|
+
export function throwExhaustiveCheck(expr) {
|
|
35
|
+
throw new Error(`Unknown expression kind: ${expr.kind}`);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Validate all IDs in a scope array.
|
|
39
|
+
*/
|
|
40
|
+
export function validateScopes(scopes) {
|
|
41
|
+
if (!scopes)
|
|
42
|
+
return;
|
|
43
|
+
for (const scope of scopes) {
|
|
44
|
+
if (scope.nodes) {
|
|
45
|
+
for (const nodeId of scope.nodes) {
|
|
46
|
+
validateCypherId(nodeId, 'scope node ID');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (scope.principals) {
|
|
50
|
+
for (const principalId of scope.principals) {
|
|
51
|
+
validateCypherId(principalId, 'scope principal ID');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (scope.perms !== undefined) {
|
|
55
|
+
validatePermissionMask(scope.perms);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export const MAX_EXPRESSION_DEPTH = 100;
|
|
60
|
+
export function validateExpression(expr, depth = 0) {
|
|
61
|
+
if (depth > MAX_EXPRESSION_DEPTH) {
|
|
62
|
+
throw new Error(`Expression tree exceeds maximum depth of ${MAX_EXPRESSION_DEPTH}`);
|
|
63
|
+
}
|
|
64
|
+
switch (expr.kind) {
|
|
65
|
+
case 'identity':
|
|
66
|
+
validateCypherId(expr.id, 'identity ID');
|
|
67
|
+
break;
|
|
68
|
+
case 'scope':
|
|
69
|
+
if (!expr.scopes || expr.scopes.length === 0) {
|
|
70
|
+
throw new Error('Scope node must have at least one scope');
|
|
71
|
+
}
|
|
72
|
+
validateScopes(expr.scopes);
|
|
73
|
+
validateExpression(expr.expr, depth + 1);
|
|
74
|
+
break;
|
|
75
|
+
case 'union':
|
|
76
|
+
case 'intersect':
|
|
77
|
+
if (!expr.operands || expr.operands.length < 2) {
|
|
78
|
+
throw new Error(`${expr.kind} must have at least 2 operands`);
|
|
79
|
+
}
|
|
80
|
+
for (const operand of expr.operands) {
|
|
81
|
+
validateExpression(operand, depth + 1);
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
case 'exclude':
|
|
85
|
+
validateExpression(expr.base, depth + 1);
|
|
86
|
+
if (!expr.excluded || expr.excluded.length < 1) {
|
|
87
|
+
throw new Error('exclude must have at least 1 excluded operand');
|
|
88
|
+
}
|
|
89
|
+
for (const excluded of expr.excluded) {
|
|
90
|
+
validateExpression(excluded, depth + 1);
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
default:
|
|
94
|
+
throwExhaustiveCheck(expr);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Validate all inputs for an access check.
|
|
99
|
+
*
|
|
100
|
+
* Path values are validated at parse time and so do not need separate
|
|
101
|
+
* Cypher-id validation here.
|
|
102
|
+
*/
|
|
103
|
+
export function validateAccessInputs(grant, perm, principal) {
|
|
104
|
+
validatePermission(perm);
|
|
105
|
+
validateCypherId(principal, 'principal');
|
|
106
|
+
validateExpression(grant.expr);
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../auth/expression/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAI9E,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,CAAA;AAErD,gFAAgF;AAChF,2DAA2D;AAC3D,gFAAgF;AAEhF;;;;GAIG;AACH,MAAM,aAAa,GAAG,yBAAyB,CAAA;AAE/C;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa,EAAE,SAAiB;IAC/D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,mBAAmB,CAAC,CAAA;IAClD,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACrD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;QACtE,MAAM,IAAI,KAAK,CACb,WAAW,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C,CAAA;IACxB,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;IACxC,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAChC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for identity expression trees.
|
|
3
|
+
*
|
|
4
|
+
* Bridges the existing runtime assertion (`validateUnresolvedExpr` in
|
|
5
|
+
* `grant-decoder.ts`) into a Zod schema so it can be used in ParamShape
|
|
6
|
+
* declarations on syscalls that accept expression params.
|
|
7
|
+
*
|
|
8
|
+
* Two schemas:
|
|
9
|
+
* - `unresolvedIdentityExprSchema` — accepts the full grammar including
|
|
10
|
+
* `Cred(...)` leaves. Use for delegation params.
|
|
11
|
+
* - `selfIdentityExprSchema` — narrower; rejects any `credential` leaf in
|
|
12
|
+
* the tree. Use for attestation and any field that must not chain
|
|
13
|
+
* credentials through other identities.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
import type { SelfIdentityExpr, UnresolvedIdentityExpr } from './types';
|
|
17
|
+
export declare const unresolvedIdentityExprSchema: z.ZodCustom<UnresolvedIdentityExpr, UnresolvedIdentityExpr>;
|
|
18
|
+
export declare const selfIdentityExprSchema: z.ZodCustom<SelfIdentityExpr, SelfIdentityExpr>;
|
|
19
|
+
//# sourceMappingURL=zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../auth/expression/zod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAyBvE,eAAO,MAAM,4BAA4B,6DAUxC,CAAA;AAED,eAAO,MAAM,sBAAsB,iDAWlC,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for identity expression trees.
|
|
3
|
+
*
|
|
4
|
+
* Bridges the existing runtime assertion (`validateUnresolvedExpr` in
|
|
5
|
+
* `grant-decoder.ts`) into a Zod schema so it can be used in ParamShape
|
|
6
|
+
* declarations on syscalls that accept expression params.
|
|
7
|
+
*
|
|
8
|
+
* Two schemas:
|
|
9
|
+
* - `unresolvedIdentityExprSchema` — accepts the full grammar including
|
|
10
|
+
* `Cred(...)` leaves. Use for delegation params.
|
|
11
|
+
* - `selfIdentityExprSchema` — narrower; rejects any `credential` leaf in
|
|
12
|
+
* the tree. Use for attestation and any field that must not chain
|
|
13
|
+
* credentials through other identities.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
import { validateUnresolvedExpr } from '#auth/grants/grant-decoder';
|
|
17
|
+
function assertNoCredentialLeaves(expr) {
|
|
18
|
+
switch (expr.kind) {
|
|
19
|
+
case 'identity':
|
|
20
|
+
if ('credential' in expr) {
|
|
21
|
+
throw new Error('SelfIdentityExpr cannot contain credential leaves — use UnresolvedIdentityExpr for delegation chains');
|
|
22
|
+
}
|
|
23
|
+
return;
|
|
24
|
+
case 'scope':
|
|
25
|
+
assertNoCredentialLeaves(expr.expr);
|
|
26
|
+
return;
|
|
27
|
+
case 'union':
|
|
28
|
+
case 'intersect':
|
|
29
|
+
for (const op of expr.operands)
|
|
30
|
+
assertNoCredentialLeaves(op);
|
|
31
|
+
return;
|
|
32
|
+
case 'exclude':
|
|
33
|
+
assertNoCredentialLeaves(expr.base);
|
|
34
|
+
for (const ex of expr.excluded)
|
|
35
|
+
assertNoCredentialLeaves(ex);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export const unresolvedIdentityExprSchema = z.custom((val) => {
|
|
40
|
+
try {
|
|
41
|
+
validateUnresolvedExpr(val, 'expr');
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
}, { message: 'Invalid UnresolvedIdentityExpr' });
|
|
48
|
+
export const selfIdentityExprSchema = z.custom((val) => {
|
|
49
|
+
try {
|
|
50
|
+
validateUnresolvedExpr(val, 'expr');
|
|
51
|
+
assertNoCredentialLeaves(val);
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
}, { message: 'Invalid SelfIdentityExpr (must not contain credential leaves)' });
|
|
58
|
+
//# sourceMappingURL=zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.js","sourceRoot":"","sources":["../../../auth/expression/zod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAInE,SAAS,wBAAwB,CAAC,IAA4B;IAC5D,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,UAAU;YACb,IAAI,YAAY,IAAI,IAAI,EAAE,CAAC;gBACzB,MAAM,IAAI,KAAK,CACb,sGAAsG,CACvG,CAAA;YACH,CAAC;YACD,OAAM;QACR,KAAK,OAAO;YACV,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACnC,OAAM;QACR,KAAK,OAAO,CAAC;QACb,KAAK,WAAW;YACd,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,QAAQ;gBAAE,wBAAwB,CAAC,EAAE,CAAC,CAAA;YAC5D,OAAM;QACR,KAAK,SAAS;YACZ,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACnC,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,QAAQ;gBAAE,wBAAwB,CAAC,EAAE,CAAC,CAAA;YAC5D,OAAM;IACV,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,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