@astrale-os/sdk 0.4.18 → 0.5.0-beta.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/README.md +7 -5
- package/dist/auth/index.d.ts +3 -15
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +2 -10
- package/dist/auth/index.js.map +1 -1
- package/dist/capability/client.d.ts +25 -0
- package/dist/capability/client.d.ts.map +1 -0
- package/dist/capability/client.js +147 -0
- package/dist/capability/client.js.map +1 -0
- package/dist/capability/contract.d.ts +70 -0
- package/dist/capability/contract.d.ts.map +1 -0
- package/dist/capability/contract.js +3 -0
- package/dist/capability/contract.js.map +1 -0
- package/dist/capability/define.d.ts +14 -0
- package/dist/capability/define.d.ts.map +1 -0
- package/dist/capability/define.js +145 -0
- package/dist/capability/define.js.map +1 -0
- package/dist/capability/index.d.ts +3 -0
- package/dist/capability/index.d.ts.map +1 -0
- package/dist/capability/index.js +2 -0
- package/dist/capability/index.js.map +1 -0
- package/dist/cli/arguments.d.ts +21 -0
- package/dist/cli/arguments.d.ts.map +1 -0
- package/dist/cli/arguments.js +220 -0
- package/dist/cli/arguments.js.map +1 -0
- package/dist/cli/dotenv.d.ts +1 -4
- package/dist/cli/dotenv.d.ts.map +1 -1
- package/dist/cli/dotenv.js +6 -15
- package/dist/cli/dotenv.js.map +1 -1
- package/dist/cli/index.d.ts +4 -5
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +4 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/run.d.ts +4 -79
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +68 -326
- package/dist/cli/run.js.map +1 -1
- package/dist/deployment/artifact/bindings.d.ts +7 -0
- package/dist/deployment/artifact/bindings.d.ts.map +1 -0
- package/dist/deployment/artifact/bindings.js +44 -0
- package/dist/deployment/artifact/bindings.js.map +1 -0
- package/dist/deployment/artifact/deployment.d.ts +35 -0
- package/dist/deployment/artifact/deployment.d.ts.map +1 -0
- package/dist/deployment/artifact/deployment.js +90 -0
- package/dist/deployment/artifact/deployment.js.map +1 -0
- package/dist/deployment/artifact/index.d.ts +5 -0
- package/dist/deployment/artifact/index.d.ts.map +1 -0
- package/dist/deployment/artifact/index.js +4 -0
- package/dist/deployment/artifact/index.js.map +1 -0
- package/dist/deployment/check/check.d.ts +8 -0
- package/dist/deployment/check/check.d.ts.map +1 -0
- package/dist/deployment/check/check.js +94 -0
- package/dist/deployment/check/check.js.map +1 -0
- package/dist/deployment/check/contract.d.ts +29 -0
- package/dist/deployment/check/contract.d.ts.map +1 -0
- package/dist/deployment/check/contract.js +2 -0
- package/dist/deployment/check/contract.js.map +1 -0
- package/dist/deployment/check/index.d.ts +3 -0
- package/dist/deployment/check/index.d.ts.map +1 -0
- package/dist/deployment/check/index.js +2 -0
- package/dist/deployment/check/index.js.map +1 -0
- package/dist/deployment/index.d.ts +7 -0
- package/dist/deployment/index.d.ts.map +1 -0
- package/dist/deployment/index.js +4 -0
- package/dist/deployment/index.js.map +1 -0
- package/dist/deployment/provider/adapter.d.ts +56 -0
- package/dist/deployment/provider/adapter.d.ts.map +1 -0
- package/dist/deployment/provider/adapter.js +84 -0
- package/dist/deployment/provider/adapter.js.map +1 -0
- package/dist/deployment/provider/config.d.ts +10 -0
- package/dist/deployment/provider/config.d.ts.map +1 -0
- package/dist/deployment/provider/config.js +8 -0
- package/dist/deployment/provider/config.js.map +1 -0
- package/dist/deployment/provider/index.d.ts +5 -0
- package/dist/deployment/provider/index.d.ts.map +1 -0
- package/dist/deployment/provider/index.js +3 -0
- package/dist/deployment/provider/index.js.map +1 -0
- package/dist/domain/app.d.ts +34 -0
- package/dist/domain/app.d.ts.map +1 -0
- package/dist/domain/app.js +2 -0
- package/dist/domain/app.js.map +1 -0
- package/dist/domain/context.d.ts +66 -0
- package/dist/domain/context.d.ts.map +1 -0
- package/dist/domain/context.js +2 -0
- package/dist/domain/context.js.map +1 -0
- package/dist/domain/define.d.ts +91 -65
- package/dist/domain/define.d.ts.map +1 -1
- package/dist/domain/define.js +74 -59
- package/dist/domain/define.js.map +1 -1
- package/dist/domain/handlers.d.ts +53 -0
- package/dist/domain/handlers.d.ts.map +1 -0
- package/dist/domain/handlers.js +88 -0
- package/dist/domain/handlers.js.map +1 -0
- package/dist/domain/implement.d.ts +5 -0
- package/dist/domain/implement.d.ts.map +1 -0
- package/dist/domain/implement.js +23 -0
- package/dist/domain/implement.js.map +1 -0
- package/dist/domain/index.d.ts +11 -4
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js +6 -3
- package/dist/domain/index.js.map +1 -1
- package/dist/graph/class/index.d.ts +3 -0
- package/dist/graph/class/index.d.ts.map +1 -0
- package/dist/graph/class/index.js +3 -0
- package/dist/graph/class/index.js.map +1 -0
- package/dist/graph/edge/index.d.ts +3 -0
- package/dist/graph/edge/index.d.ts.map +1 -0
- package/dist/graph/edge/index.js +3 -0
- package/dist/graph/edge/index.js.map +1 -0
- package/dist/graph/index.d.ts +10 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +9 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/model/index.d.ts +3 -0
- package/dist/graph/model/index.d.ts.map +1 -0
- package/dist/graph/model/index.js +3 -0
- package/dist/graph/model/index.js.map +1 -0
- package/dist/graph/node/index.d.ts +3 -0
- package/dist/graph/node/index.d.ts.map +1 -0
- package/dist/graph/node/index.js +3 -0
- package/dist/graph/node/index.js.map +1 -0
- package/dist/graph/path/index.d.ts +3 -0
- package/dist/graph/path/index.d.ts.map +1 -0
- package/dist/graph/path/index.js +3 -0
- package/dist/graph/path/index.js.map +1 -0
- package/dist/graph/properties/index.d.ts +3 -0
- package/dist/graph/properties/index.d.ts.map +1 -0
- package/dist/graph/properties/index.js +3 -0
- package/dist/graph/properties/index.js.map +1 -0
- package/dist/index.d.ts +20 -27
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -47
- package/dist/index.js.map +1 -1
- package/dist/invocation/handler.d.ts +51 -0
- package/dist/invocation/handler.d.ts.map +1 -0
- package/dist/invocation/handler.js +266 -0
- package/dist/invocation/handler.js.map +1 -0
- package/dist/invocation/index.d.ts +3 -0
- package/dist/invocation/index.d.ts.map +1 -0
- package/dist/invocation/index.js +2 -0
- package/dist/invocation/index.js.map +1 -0
- package/dist/invocation/receiver.d.ts +5 -0
- package/dist/invocation/receiver.d.ts.map +1 -0
- package/dist/invocation/receiver.js +70 -0
- package/dist/invocation/receiver.js.map +1 -0
- package/dist/invocation/result.d.ts +5 -0
- package/dist/invocation/result.d.ts.map +1 -0
- package/dist/invocation/result.js +146 -0
- package/dist/invocation/result.js.map +1 -0
- package/dist/invocation/selection.d.ts +21 -0
- package/dist/invocation/selection.d.ts.map +1 -0
- package/dist/invocation/selection.js +113 -0
- package/dist/invocation/selection.js.map +1 -0
- package/dist/linter/adapters/typescript/discover.d.ts +4 -0
- package/dist/linter/adapters/typescript/discover.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/discover.js +412 -0
- package/dist/linter/adapters/typescript/discover.js.map +1 -0
- package/dist/linter/adapters/typescript/evidence-admission.d.ts +5 -0
- package/dist/linter/adapters/typescript/evidence-admission.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/evidence-admission.js +22 -0
- package/dist/linter/adapters/typescript/evidence-admission.js.map +1 -0
- package/dist/linter/adapters/typescript/imports.d.ts +7 -0
- package/dist/linter/adapters/typescript/imports.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/imports.js +171 -0
- package/dist/linter/adapters/typescript/imports.js.map +1 -0
- package/dist/linter/adapters/typescript/index.d.ts +48 -0
- package/dist/linter/adapters/typescript/index.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/index.js +8 -0
- package/dist/linter/adapters/typescript/index.js.map +1 -0
- package/dist/linter/adapters/typescript/query-observation.d.ts +4 -0
- package/dist/linter/adapters/typescript/query-observation.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/query-observation.js +172 -0
- package/dist/linter/adapters/typescript/query-observation.js.map +1 -0
- package/dist/linter/adapters/typescript/suppression-directives.d.ts +5 -0
- package/dist/linter/adapters/typescript/suppression-directives.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/suppression-directives.js +85 -0
- package/dist/linter/adapters/typescript/suppression-directives.js.map +1 -0
- package/dist/linter/adapters/typescript/syntax.d.ts +39 -0
- package/dist/linter/adapters/typescript/syntax.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/syntax.js +183 -0
- package/dist/linter/adapters/typescript/syntax.js.map +1 -0
- package/dist/linter/adapters/typescript/type-universe.d.ts +2 -0
- package/dist/linter/adapters/typescript/type-universe.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/type-universe.js +265 -0
- package/dist/linter/adapters/typescript/type-universe.js.map +1 -0
- package/dist/linter/catalog/compile.d.ts +3 -0
- package/dist/linter/catalog/compile.d.ts.map +1 -0
- package/dist/linter/catalog/compile.js +111 -0
- package/dist/linter/catalog/compile.js.map +1 -0
- package/dist/linter/catalog/index.d.ts +19 -0
- package/dist/linter/catalog/index.d.ts.map +1 -0
- package/dist/linter/catalog/index.js +3 -0
- package/dist/linter/catalog/index.js.map +1 -0
- package/dist/linter/catalog/revision.d.ts +7 -0
- package/dist/linter/catalog/revision.d.ts.map +1 -0
- package/dist/linter/catalog/revision.js +13 -0
- package/dist/linter/catalog/revision.js.map +1 -0
- package/dist/linter/diagnostics/error.d.ts +10 -0
- package/dist/linter/diagnostics/error.d.ts.map +1 -0
- package/dist/linter/diagnostics/error.js +10 -0
- package/dist/linter/diagnostics/error.js.map +1 -0
- package/dist/linter/diagnostics/index.d.ts +29 -0
- package/dist/linter/diagnostics/index.d.ts.map +1 -0
- package/dist/linter/diagnostics/index.js +3 -0
- package/dist/linter/diagnostics/index.js.map +1 -0
- package/dist/linter/diagnostics/sort.d.ts +3 -0
- package/dist/linter/diagnostics/sort.d.ts.map +1 -0
- package/dist/linter/diagnostics/sort.js +27 -0
- package/dist/linter/diagnostics/sort.js.map +1 -0
- package/dist/linter/evaluation/binding/bind.d.ts +5 -0
- package/dist/linter/evaluation/binding/bind.d.ts.map +1 -0
- package/dist/linter/evaluation/binding/bind.js +356 -0
- package/dist/linter/evaluation/binding/bind.js.map +1 -0
- package/dist/linter/evaluation/binding/diagnostic.d.ts +5 -0
- package/dist/linter/evaluation/binding/diagnostic.d.ts.map +1 -0
- package/dist/linter/evaluation/binding/diagnostic.js +17 -0
- package/dist/linter/evaluation/binding/diagnostic.js.map +1 -0
- package/dist/linter/evaluation/binding/index.d.ts +2 -0
- package/dist/linter/evaluation/binding/index.d.ts.map +1 -0
- package/dist/linter/evaluation/binding/index.js +2 -0
- package/dist/linter/evaluation/binding/index.js.map +1 -0
- package/dist/linter/evaluation/contract/availability.d.ts +28 -0
- package/dist/linter/evaluation/contract/availability.d.ts.map +1 -0
- package/dist/linter/evaluation/contract/availability.js +2 -0
- package/dist/linter/evaluation/contract/availability.js.map +1 -0
- package/dist/linter/evaluation/contract/decision.d.ts +26 -0
- package/dist/linter/evaluation/contract/decision.d.ts.map +1 -0
- package/dist/linter/evaluation/contract/decision.js +2 -0
- package/dist/linter/evaluation/contract/decision.js.map +1 -0
- package/dist/linter/evaluation/contract/evidence.d.ts +12 -0
- package/dist/linter/evaluation/contract/evidence.d.ts.map +1 -0
- package/dist/linter/evaluation/contract/evidence.js +2 -0
- package/dist/linter/evaluation/contract/evidence.js.map +1 -0
- package/dist/linter/evaluation/contract/implementation.d.ts +22 -0
- package/dist/linter/evaluation/contract/implementation.d.ts.map +1 -0
- package/dist/linter/evaluation/contract/implementation.js +2 -0
- package/dist/linter/evaluation/contract/implementation.js.map +1 -0
- package/dist/linter/evaluation/contract/index.d.ts +5 -0
- package/dist/linter/evaluation/contract/index.d.ts.map +1 -0
- package/dist/linter/evaluation/contract/index.js +2 -0
- package/dist/linter/evaluation/contract/index.js.map +1 -0
- package/dist/linter/evaluation/index.d.ts +3 -0
- package/dist/linter/evaluation/index.d.ts.map +1 -0
- package/dist/linter/evaluation/index.js +2 -0
- package/dist/linter/evaluation/index.js.map +1 -0
- package/dist/linter/implementations/source/capabilities.d.ts +3 -0
- package/dist/linter/implementations/source/capabilities.d.ts.map +1 -0
- package/dist/linter/implementations/source/capabilities.js +41 -0
- package/dist/linter/implementations/source/capabilities.js.map +1 -0
- package/dist/linter/implementations/source/contract.d.ts +17 -0
- package/dist/linter/implementations/source/contract.d.ts.map +1 -0
- package/dist/linter/implementations/source/contract.js +53 -0
- package/dist/linter/implementations/source/contract.js.map +1 -0
- package/dist/linter/implementations/source/functions.d.ts +3 -0
- package/dist/linter/implementations/source/functions.d.ts.map +1 -0
- package/dist/linter/implementations/source/functions.js +102 -0
- package/dist/linter/implementations/source/functions.js.map +1 -0
- package/dist/linter/implementations/source/global.d.ts +3 -0
- package/dist/linter/implementations/source/global.d.ts.map +1 -0
- package/dist/linter/implementations/source/global.js +812 -0
- package/dist/linter/implementations/source/global.js.map +1 -0
- package/dist/linter/implementations/source/index.d.ts +4 -0
- package/dist/linter/implementations/source/index.d.ts.map +1 -0
- package/dist/linter/implementations/source/index.js +4 -0
- package/dist/linter/implementations/source/index.js.map +1 -0
- package/dist/linter/implementations/source/integrations.d.ts +3 -0
- package/dist/linter/implementations/source/integrations.d.ts.map +1 -0
- package/dist/linter/implementations/source/integrations.js +186 -0
- package/dist/linter/implementations/source/integrations.js.map +1 -0
- package/dist/linter/implementations/source/migrations.d.ts +3 -0
- package/dist/linter/implementations/source/migrations.d.ts.map +1 -0
- package/dist/linter/implementations/source/migrations.js +115 -0
- package/dist/linter/implementations/source/migrations.js.map +1 -0
- package/dist/linter/implementations/source/mutations.d.ts +3 -0
- package/dist/linter/implementations/source/mutations.d.ts.map +1 -0
- package/dist/linter/implementations/source/mutations.js +185 -0
- package/dist/linter/implementations/source/mutations.js.map +1 -0
- package/dist/linter/implementations/source/queries.d.ts +3 -0
- package/dist/linter/implementations/source/queries.d.ts.map +1 -0
- package/dist/linter/implementations/source/queries.js +1000 -0
- package/dist/linter/implementations/source/queries.js.map +1 -0
- package/dist/linter/implementations/source/rules.d.ts +3 -0
- package/dist/linter/implementations/source/rules.d.ts.map +1 -0
- package/dist/linter/implementations/source/rules.js +141 -0
- package/dist/linter/implementations/source/rules.js.map +1 -0
- package/dist/linter/implementations/source/schema.d.ts +3 -0
- package/dist/linter/implementations/source/schema.d.ts.map +1 -0
- package/dist/linter/implementations/source/schema.js +105 -0
- package/dist/linter/implementations/source/schema.js.map +1 -0
- package/dist/linter/implementations/source/shared.d.ts +42 -0
- package/dist/linter/implementations/source/shared.d.ts.map +1 -0
- package/dist/linter/implementations/source/shared.js +239 -0
- package/dist/linter/implementations/source/shared.js.map +1 -0
- package/dist/linter/implementations/source/states.d.ts +3 -0
- package/dist/linter/implementations/source/states.d.ts.map +1 -0
- package/dist/linter/implementations/source/states.js +2 -0
- package/dist/linter/implementations/source/states.js.map +1 -0
- package/dist/linter/implementations/source/tests.d.ts +3 -0
- package/dist/linter/implementations/source/tests.d.ts.map +1 -0
- package/dist/linter/implementations/source/tests.js +28 -0
- package/dist/linter/implementations/source/tests.js.map +1 -0
- package/dist/linter/implementations/source/ui.d.ts +3 -0
- package/dist/linter/implementations/source/ui.d.ts.map +1 -0
- package/dist/linter/implementations/source/ui.js +21 -0
- package/dist/linter/implementations/source/ui.js.map +1 -0
- package/dist/linter/implementations/source/utils.d.ts +3 -0
- package/dist/linter/implementations/source/utils.d.ts.map +1 -0
- package/dist/linter/implementations/source/utils.js +29 -0
- package/dist/linter/implementations/source/utils.js.map +1 -0
- package/dist/linter/implementations/source/verifiers.d.ts +3 -0
- package/dist/linter/implementations/source/verifiers.d.ts.map +1 -0
- package/dist/linter/implementations/source/verifiers.js +33 -0
- package/dist/linter/implementations/source/verifiers.js.map +1 -0
- package/dist/linter/implementations/source/views.d.ts +3 -0
- package/dist/linter/implementations/source/views.d.ts.map +1 -0
- package/dist/linter/implementations/source/views.js +36 -0
- package/dist/linter/implementations/source/views.js.map +1 -0
- package/dist/linter/implementations/source/workflows.d.ts +3 -0
- package/dist/linter/implementations/source/workflows.d.ts.map +1 -0
- package/dist/linter/implementations/source/workflows.js +308 -0
- package/dist/linter/implementations/source/workflows.js.map +1 -0
- package/dist/linter/index.d.ts +7 -8
- package/dist/linter/index.d.ts.map +1 -1
- package/dist/linter/index.js +2 -4
- package/dist/linter/index.js.map +1 -1
- package/dist/linter/lint.d.ts +22 -6
- package/dist/linter/lint.d.ts.map +1 -1
- package/dist/linter/lint.js +58 -15
- package/dist/linter/lint.js.map +1 -1
- package/dist/linter/oxlint/index.d.ts +4 -0
- package/dist/linter/oxlint/index.d.ts.map +1 -0
- package/dist/linter/oxlint/index.js +2 -0
- package/dist/linter/oxlint/index.js.map +1 -0
- package/dist/linter/oxlint/process.d.ts +19 -0
- package/dist/linter/oxlint/process.d.ts.map +1 -0
- package/dist/linter/oxlint/process.js +170 -0
- package/dist/linter/oxlint/process.js.map +1 -0
- package/dist/linter/oxlint/run.d.ts +7 -6
- package/dist/linter/oxlint/run.d.ts.map +1 -1
- package/dist/linter/oxlint/run.js +166 -36
- package/dist/linter/oxlint/run.js.map +1 -1
- package/dist/linter/oxlint-config/ignore-patterns.d.ts +6 -0
- package/dist/linter/oxlint-config/ignore-patterns.d.ts.map +1 -0
- package/dist/linter/oxlint-config/ignore-patterns.js +10 -0
- package/dist/linter/oxlint-config/ignore-patterns.js.map +1 -0
- package/dist/linter/oxlint-config/index.d.ts +5 -0
- package/dist/linter/oxlint-config/index.d.ts.map +1 -0
- package/dist/linter/oxlint-config/index.js +18 -0
- package/dist/linter/oxlint-config/index.js.map +1 -0
- package/dist/linter/packs/domain.d.ts +3 -0
- package/dist/linter/packs/domain.d.ts.map +1 -0
- package/dist/linter/packs/domain.js +8 -0
- package/dist/linter/packs/domain.js.map +1 -0
- package/dist/linter/packs/index.d.ts +9 -0
- package/dist/linter/packs/index.d.ts.map +1 -0
- package/dist/linter/packs/index.js +2 -0
- package/dist/linter/packs/index.js.map +1 -0
- package/dist/linter/policy/compile.d.ts +3 -0
- package/dist/linter/policy/compile.d.ts.map +1 -0
- package/dist/linter/policy/compile.js +256 -0
- package/dist/linter/policy/compile.js.map +1 -0
- package/dist/linter/policy/generated.d.ts +5 -0
- package/dist/linter/policy/generated.d.ts.map +1 -0
- package/dist/linter/policy/generated.js +764 -0
- package/dist/linter/policy/generated.js.map +1 -0
- package/dist/linter/policy/index.d.ts +43 -0
- package/dist/linter/policy/index.d.ts.map +1 -0
- package/dist/linter/policy/index.js +3 -0
- package/dist/linter/policy/index.js.map +1 -0
- package/dist/linter/qualification/index.d.ts +11 -0
- package/dist/linter/qualification/index.d.ts.map +1 -0
- package/dist/linter/qualification/index.js +3 -0
- package/dist/linter/qualification/index.js.map +1 -0
- package/dist/linter/qualification/query-fixtures.d.ts +3 -0
- package/dist/linter/qualification/query-fixtures.d.ts.map +1 -0
- package/dist/linter/qualification/query-fixtures.js +69 -0
- package/dist/linter/qualification/query-fixtures.js.map +1 -0
- package/dist/linter/qualification/runner.d.ts +4 -0
- package/dist/linter/qualification/runner.d.ts.map +1 -0
- package/dist/linter/qualification/runner.js +7 -0
- package/dist/linter/qualification/runner.js.map +1 -0
- package/dist/linter/report/format.d.ts +4 -0
- package/dist/linter/report/format.d.ts.map +1 -0
- package/dist/linter/report/format.js +33 -0
- package/dist/linter/report/format.js.map +1 -0
- package/dist/linter/report/index.d.ts +3 -0
- package/dist/linter/report/index.d.ts.map +1 -0
- package/dist/linter/report/index.js +2 -0
- package/dist/linter/report/index.js.map +1 -0
- package/dist/linter/requirements/index.d.ts +3 -0
- package/dist/linter/requirements/index.d.ts.map +1 -0
- package/dist/linter/requirements/index.js +2 -0
- package/dist/linter/requirements/index.js.map +1 -0
- package/dist/linter/requirements/model.d.ts +9 -0
- package/dist/linter/requirements/model.d.ts.map +1 -0
- package/dist/linter/requirements/model.js +2 -0
- package/dist/linter/requirements/model.js.map +1 -0
- package/dist/linter/requirements/registry.d.ts +4 -0
- package/dist/linter/requirements/registry.d.ts.map +1 -0
- package/dist/linter/requirements/registry.js +188 -0
- package/dist/linter/requirements/registry.js.map +1 -0
- package/dist/linter/semantics/query/decision.d.ts +5 -0
- package/dist/linter/semantics/query/decision.d.ts.map +1 -0
- package/dist/linter/semantics/query/decision.js +74 -0
- package/dist/linter/semantics/query/decision.js.map +1 -0
- package/dist/linter/semantics/query/index.d.ts +4 -0
- package/dist/linter/semantics/query/index.d.ts.map +1 -0
- package/dist/linter/semantics/query/index.js +3 -0
- package/dist/linter/semantics/query/index.js.map +1 -0
- package/dist/linter/semantics/query/observation.d.ts +36 -0
- package/dist/linter/semantics/query/observation.d.ts.map +1 -0
- package/dist/linter/semantics/query/observation.js +13 -0
- package/dist/linter/semantics/query/observation.js.map +1 -0
- package/dist/linter/suppression/apply.d.ts +4 -0
- package/dist/linter/suppression/apply.d.ts.map +1 -0
- package/dist/linter/suppression/apply.js +48 -0
- package/dist/linter/suppression/apply.js.map +1 -0
- package/dist/linter/suppression/directive.d.ts +11 -0
- package/dist/linter/suppression/directive.d.ts.map +1 -0
- package/dist/linter/suppression/directive.js +2 -0
- package/dist/linter/suppression/directive.js.map +1 -0
- package/dist/linter/suppression/index.d.ts +14 -0
- package/dist/linter/suppression/index.d.ts.map +1 -0
- package/dist/linter/suppression/index.js +2 -0
- package/dist/linter/suppression/index.js.map +1 -0
- package/dist/mutation/contract.d.ts +134 -0
- package/dist/mutation/contract.d.ts.map +1 -0
- package/dist/mutation/contract.js +2 -0
- package/dist/mutation/contract.js.map +1 -0
- package/dist/mutation/define.d.ts +9 -0
- package/dist/mutation/define.d.ts.map +1 -0
- package/dist/mutation/define.js +24 -0
- package/dist/mutation/define.js.map +1 -0
- package/dist/mutation/errors.d.ts +3 -0
- package/dist/mutation/errors.d.ts.map +1 -0
- package/dist/mutation/errors.js +16 -0
- package/dist/mutation/errors.js.map +1 -0
- package/dist/mutation/execute.d.ts +11 -0
- package/dist/mutation/execute.d.ts.map +1 -0
- package/dist/mutation/execute.js +24 -0
- package/dist/mutation/execute.js.map +1 -0
- package/dist/mutation/index.d.ts +8 -0
- package/dist/mutation/index.d.ts.map +1 -0
- package/dist/mutation/index.js +5 -0
- package/dist/mutation/index.js.map +1 -0
- package/dist/mutation/rich.d.ts +4 -0
- package/dist/mutation/rich.d.ts.map +1 -0
- package/dist/mutation/rich.js +147 -0
- package/dist/mutation/rich.js.map +1 -0
- package/dist/query/composite/contract.d.ts +37 -0
- package/dist/query/composite/contract.d.ts.map +1 -0
- package/dist/query/composite/contract.js +2 -0
- package/dist/query/composite/contract.js.map +1 -0
- package/dist/query/composite/errors.d.ts +8 -0
- package/dist/query/composite/errors.d.ts.map +1 -0
- package/dist/query/composite/errors.js +9 -0
- package/dist/query/composite/errors.js.map +1 -0
- package/dist/query/composite/index.d.ts +6 -0
- package/dist/query/composite/index.d.ts.map +1 -0
- package/dist/query/composite/index.js +3 -0
- package/dist/query/composite/index.js.map +1 -0
- package/dist/query/composite/plan.d.ts +38 -0
- package/dist/query/composite/plan.d.ts.map +1 -0
- package/dist/query/composite/plan.js +225 -0
- package/dist/query/composite/plan.js.map +1 -0
- package/dist/query/contract.d.ts +58 -0
- package/dist/query/contract.d.ts.map +1 -0
- package/dist/query/contract.js +2 -0
- package/dist/query/contract.js.map +1 -0
- package/dist/query/define.d.ts +3 -0
- package/dist/query/define.d.ts.map +1 -0
- package/dist/query/define.js +90 -0
- package/dist/query/define.js.map +1 -0
- package/dist/query/definition.d.ts +29 -0
- package/dist/query/definition.d.ts.map +1 -0
- package/dist/query/definition.js +2 -0
- package/dist/query/definition.js.map +1 -0
- package/dist/query/errors.d.ts +9 -0
- package/dist/query/errors.d.ts.map +1 -0
- package/dist/query/errors.js +15 -0
- package/dist/query/errors.js.map +1 -0
- package/dist/query/execute.d.ts +20 -0
- package/dist/query/execute.d.ts.map +1 -0
- package/dist/query/execute.js +97 -0
- package/dist/query/execute.js.map +1 -0
- package/dist/query/index.d.ts +15 -0
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +8 -0
- package/dist/query/index.js.map +1 -0
- package/dist/query/node.d.ts +109 -0
- package/dist/query/node.d.ts.map +1 -0
- package/dist/query/node.js +156 -0
- package/dist/query/node.js.map +1 -0
- package/dist/query/result/contract.d.ts +23 -0
- package/dist/query/result/contract.d.ts.map +1 -0
- package/dist/query/result/contract.js +2 -0
- package/dist/query/result/contract.js.map +1 -0
- package/dist/query/result/index.d.ts +3 -0
- package/dist/query/result/index.d.ts.map +1 -0
- package/dist/query/result/index.js +2 -0
- package/dist/query/result/index.js.map +1 -0
- package/dist/query/result/projection.d.ts +3 -0
- package/dist/query/result/projection.d.ts.map +1 -0
- package/dist/query/result/projection.js +100 -0
- package/dist/query/result/projection.js.map +1 -0
- package/dist/query/selection.d.ts +4 -0
- package/dist/query/selection.d.ts.map +1 -0
- package/dist/query/selection.js +25 -0
- package/dist/query/selection.js.map +1 -0
- package/dist/react/compile.d.ts +9 -0
- package/dist/react/compile.d.ts.map +1 -0
- package/dist/react/compile.js +64 -0
- package/dist/react/compile.js.map +1 -0
- package/dist/react/define.d.ts +8 -0
- package/dist/react/define.d.ts.map +1 -0
- package/dist/react/define.js +89 -0
- package/dist/react/define.js.map +1 -0
- package/dist/react/definition.d.ts +69 -0
- package/dist/react/definition.d.ts.map +1 -0
- package/dist/react/definition.js +2 -0
- package/dist/react/definition.js.map +1 -0
- package/dist/react/index.d.ts +4 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +3 -0
- package/dist/react/index.js.map +1 -0
- package/dist/result/index.d.ts +3 -0
- package/dist/result/index.d.ts.map +1 -0
- package/dist/result/index.js +2 -0
- package/dist/result/index.js.map +1 -0
- package/dist/result/result.d.ts +10 -0
- package/dist/result/result.d.ts.map +1 -0
- package/dist/result/result.js +7 -0
- package/dist/result/result.js.map +1 -0
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +3 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/kernel/index.d.ts +3 -0
- package/dist/schema/kernel/index.d.ts.map +1 -0
- package/dist/schema/kernel/index.js +3 -0
- package/dist/schema/kernel/index.js.map +1 -0
- package/dist/schema/v1/index.d.ts +3 -0
- package/dist/schema/v1/index.d.ts.map +1 -0
- package/dist/schema/v1/index.js +3 -0
- package/dist/schema/v1/index.js.map +1 -0
- package/dist/server/application.d.ts +35 -0
- package/dist/server/application.d.ts.map +1 -0
- package/dist/server/application.js +124 -0
- package/dist/server/application.js.map +1 -0
- package/dist/server/index.d.ts +4 -13
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -8
- package/dist/server/index.js.map +1 -1
- package/dist/server/node/index.d.ts +3 -0
- package/dist/server/node/index.d.ts.map +1 -0
- package/dist/server/node/index.js +2 -0
- package/dist/server/node/index.js.map +1 -0
- package/dist/server/node/server.d.ts +14 -0
- package/dist/server/node/server.d.ts.map +1 -0
- package/dist/server/node/server.js +71 -0
- package/dist/server/node/server.js.map +1 -0
- package/dist/server/remote.d.ts +51 -0
- package/dist/server/remote.d.ts.map +1 -0
- package/dist/server/remote.js +631 -0
- package/dist/server/remote.js.map +1 -0
- package/dist/server/source.d.ts +13 -0
- package/dist/server/source.d.ts.map +1 -0
- package/dist/server/source.js +38 -0
- package/dist/server/source.js.map +1 -0
- package/dist/state/index.d.ts +4 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +2 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/machine.d.ts +28 -0
- package/dist/state/machine.d.ts.map +1 -0
- package/dist/state/machine.js +32 -0
- package/dist/state/machine.js.map +1 -0
- package/dist/state/relation.d.ts +28 -0
- package/dist/state/relation.d.ts.map +1 -0
- package/dist/state/relation.js +48 -0
- package/dist/state/relation.js.map +1 -0
- package/dist/value/index.d.ts +3 -0
- package/dist/value/index.d.ts.map +1 -0
- package/dist/value/index.js +3 -0
- package/dist/value/index.js.map +1 -0
- package/dist/view/admission.d.ts +6 -0
- package/dist/view/admission.d.ts.map +1 -0
- package/dist/view/admission.js +43 -0
- package/dist/view/admission.js.map +1 -0
- package/dist/view/compile.d.ts +15 -0
- package/dist/view/compile.d.ts.map +1 -0
- package/dist/view/compile.js +189 -0
- package/dist/view/compile.js.map +1 -0
- package/dist/view/define.d.ts +20 -0
- package/dist/view/define.d.ts.map +1 -0
- package/dist/view/define.js +236 -0
- package/dist/view/define.js.map +1 -0
- package/dist/view/definition.d.ts +96 -0
- package/dist/view/definition.d.ts.map +1 -0
- package/dist/view/definition.js +2 -0
- package/dist/view/definition.js.map +1 -0
- package/dist/view/index.d.ts +4 -0
- package/dist/view/index.d.ts.map +1 -0
- package/dist/view/index.js +3 -0
- package/dist/view/index.js.map +1 -0
- package/dist/workflow/binding.d.ts +43 -0
- package/dist/workflow/binding.d.ts.map +1 -0
- package/dist/workflow/binding.js +32 -0
- package/dist/workflow/binding.js.map +1 -0
- package/dist/workflow/contract.d.ts +56 -0
- package/dist/workflow/contract.d.ts.map +1 -0
- package/dist/workflow/contract.js +2 -0
- package/dist/workflow/contract.js.map +1 -0
- package/dist/workflow/define.d.ts +4 -0
- package/dist/workflow/define.d.ts.map +1 -0
- package/dist/workflow/define.js +57 -0
- package/dist/workflow/define.js.map +1 -0
- package/dist/workflow/index.d.ts +7 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +4 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/runner.d.ts +4 -0
- package/dist/workflow/runner.d.ts.map +1 -0
- package/dist/workflow/runner.js +24 -0
- package/dist/workflow/runner.js.map +1 -0
- package/dist/workflow/step/index.d.ts +3 -0
- package/dist/workflow/step/index.d.ts.map +1 -0
- package/dist/workflow/step/index.js +2 -0
- package/dist/workflow/step/index.js.map +1 -0
- package/dist/workflow/step/inline.d.ts +6 -0
- package/dist/workflow/step/inline.d.ts.map +1 -0
- package/dist/workflow/step/inline.js +44 -0
- package/dist/workflow/step/inline.js.map +1 -0
- package/dist/workflow/step/step.d.ts +5 -0
- package/dist/workflow/step/step.d.ts.map +1 -0
- package/dist/workflow/step/step.js +2 -0
- package/dist/workflow/step/step.js.map +1 -0
- package/package.json +124 -24
- package/dist/auth/authenticate.d.ts +0 -24
- package/dist/auth/authenticate.d.ts.map +0 -1
- package/dist/auth/authenticate.js +0 -29
- package/dist/auth/authenticate.js.map +0 -1
- package/dist/auth/check.d.ts +0 -38
- package/dist/auth/check.d.ts.map +0 -1
- package/dist/auth/check.js +0 -50
- package/dist/auth/check.js.map +0 -1
- package/dist/auth/compose.d.ts +0 -41
- package/dist/auth/compose.d.ts.map +0 -1
- package/dist/auth/compose.js +0 -45
- package/dist/auth/compose.js.map +0 -1
- package/dist/auth/errors.d.ts +0 -16
- package/dist/auth/errors.d.ts.map +0 -1
- package/dist/auth/errors.js +0 -26
- package/dist/auth/errors.js.map +0 -1
- package/dist/auth/function-context.d.ts +0 -28
- package/dist/auth/function-context.d.ts.map +0 -1
- package/dist/auth/function-context.js +0 -47
- package/dist/auth/function-context.js.map +0 -1
- package/dist/auth/identity.d.ts +0 -18
- package/dist/auth/identity.d.ts.map +0 -1
- package/dist/auth/identity.js +0 -2
- package/dist/auth/identity.js.map +0 -1
- package/dist/auth/issuer-mint.d.ts +0 -53
- package/dist/auth/issuer-mint.d.ts.map +0 -1
- package/dist/auth/issuer-mint.js +0 -35
- package/dist/auth/issuer-mint.js.map +0 -1
- package/dist/auth/kernel-client.d.ts +0 -37
- package/dist/auth/kernel-client.d.ts.map +0 -1
- package/dist/auth/kernel-client.js +0 -111
- package/dist/auth/kernel-client.js.map +0 -1
- package/dist/auth/resolve.d.ts +0 -19
- package/dist/auth/resolve.d.ts.map +0 -1
- package/dist/auth/resolve.js +0 -43
- package/dist/auth/resolve.js.map +0 -1
- package/dist/auth/sign.d.ts +0 -15
- package/dist/auth/sign.d.ts.map +0 -1
- package/dist/auth/sign.js +0 -24
- package/dist/auth/sign.js.map +0 -1
- package/dist/auth/verify.d.ts +0 -28
- package/dist/auth/verify.d.ts.map +0 -1
- package/dist/auth/verify.js +0 -151
- package/dist/auth/verify.js.map +0 -1
- package/dist/cli/spec.d.ts +0 -19
- package/dist/cli/spec.d.ts.map +0 -1
- package/dist/cli/spec.js +0 -33
- package/dist/cli/spec.js.map +0 -1
- package/dist/config/adapter.d.ts +0 -148
- package/dist/config/adapter.d.ts.map +0 -1
- package/dist/config/adapter.js +0 -40
- package/dist/config/adapter.js.map +0 -1
- package/dist/config/define-domain.d.ts +0 -177
- package/dist/config/define-domain.d.ts.map +0 -1
- package/dist/config/define-domain.js +0 -145
- package/dist/config/define-domain.js.map +0 -1
- package/dist/config/deploy.d.ts +0 -28
- package/dist/config/deploy.d.ts.map +0 -1
- package/dist/config/deploy.js +0 -24
- package/dist/config/deploy.js.map +0 -1
- package/dist/config/index.d.ts +0 -21
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -18
- package/dist/config/index.js.map +0 -1
- package/dist/define/index.d.ts +0 -5
- package/dist/define/index.d.ts.map +0 -1
- package/dist/define/index.js +0 -3
- package/dist/define/index.js.map +0 -1
- package/dist/define/remote-function.d.ts +0 -120
- package/dist/define/remote-function.d.ts.map +0 -1
- package/dist/define/remote-function.js +0 -26
- package/dist/define/remote-function.js.map +0 -1
- package/dist/define/view.d.ts +0 -104
- package/dist/define/view.d.ts.map +0 -1
- package/dist/define/view.js +0 -30
- package/dist/define/view.js.map +0 -1
- package/dist/deploy/check.d.ts +0 -30
- package/dist/deploy/check.d.ts.map +0 -1
- package/dist/deploy/check.js +0 -82
- package/dist/deploy/check.js.map +0 -1
- package/dist/deploy/index.d.ts +0 -3
- package/dist/deploy/index.d.ts.map +0 -1
- package/dist/deploy/index.js +0 -3
- package/dist/deploy/index.js.map +0 -1
- package/dist/deploy/meta.d.ts +0 -29
- package/dist/deploy/meta.d.ts.map +0 -1
- package/dist/deploy/meta.js +0 -45
- package/dist/deploy/meta.js.map +0 -1
- package/dist/dispatch/authorize.d.ts +0 -14
- package/dist/dispatch/authorize.d.ts.map +0 -1
- package/dist/dispatch/authorize.js +0 -24
- package/dist/dispatch/authorize.js.map +0 -1
- package/dist/dispatch/dispatcher.d.ts +0 -59
- package/dist/dispatch/dispatcher.d.ts.map +0 -1
- package/dist/dispatch/dispatcher.js +0 -237
- package/dist/dispatch/dispatcher.js.map +0 -1
- package/dist/dispatch/errors.d.ts +0 -47
- package/dist/dispatch/errors.d.ts.map +0 -1
- package/dist/dispatch/errors.js +0 -76
- package/dist/dispatch/errors.js.map +0 -1
- package/dist/dispatch/execute.d.ts +0 -44
- package/dist/dispatch/execute.d.ts.map +0 -1
- package/dist/dispatch/execute.js +0 -29
- package/dist/dispatch/execute.js.map +0 -1
- package/dist/dispatch/identity.d.ts +0 -75
- package/dist/dispatch/identity.d.ts.map +0 -1
- package/dist/dispatch/identity.js +0 -101
- package/dist/dispatch/identity.js.map +0 -1
- package/dist/dispatch/index.d.ts +0 -7
- package/dist/dispatch/index.d.ts.map +0 -1
- package/dist/dispatch/index.js +0 -7
- package/dist/dispatch/index.js.map +0 -1
- package/dist/dispatch/resolve.d.ts +0 -27
- package/dist/dispatch/resolve.d.ts.map +0 -1
- package/dist/dispatch/resolve.js +0 -65
- package/dist/dispatch/resolve.js.map +0 -1
- package/dist/dispatch/self.d.ts +0 -51
- package/dist/dispatch/self.d.ts.map +0 -1
- package/dist/dispatch/self.js +0 -116
- package/dist/dispatch/self.js.map +0 -1
- package/dist/dispatch/validate.d.ts +0 -35
- package/dist/dispatch/validate.d.ts.map +0 -1
- package/dist/dispatch/validate.js +0 -27
- package/dist/dispatch/validate.js.map +0 -1
- package/dist/domain/binding.d.ts +0 -18
- package/dist/domain/binding.d.ts.map +0 -1
- package/dist/domain/binding.js +0 -29
- package/dist/domain/binding.js.map +0 -1
- package/dist/domain/build-spec.d.ts +0 -37
- package/dist/domain/build-spec.d.ts.map +0 -1
- package/dist/domain/build-spec.js +0 -114
- package/dist/domain/build-spec.js.map +0 -1
- package/dist/domain/contract.d.ts +0 -17
- package/dist/domain/contract.d.ts.map +0 -1
- package/dist/domain/contract.js +0 -26
- package/dist/domain/contract.js.map +0 -1
- package/dist/domain/extend-functions.d.ts +0 -48
- package/dist/domain/extend-functions.d.ts.map +0 -1
- package/dist/domain/extend-functions.js +0 -85
- package/dist/domain/extend-functions.js.map +0 -1
- package/dist/domain/extend-views.d.ts +0 -45
- package/dist/domain/extend-views.d.ts.map +0 -1
- package/dist/domain/extend-views.js +0 -116
- package/dist/domain/extend-views.js.map +0 -1
- package/dist/linter/analyze.d.ts +0 -6
- package/dist/linter/analyze.d.ts.map +0 -1
- package/dist/linter/analyze.js +0 -12
- package/dist/linter/analyze.js.map +0 -1
- package/dist/linter/diagnostic.d.ts +0 -32
- package/dist/linter/diagnostic.d.ts.map +0 -1
- package/dist/linter/diagnostic.js +0 -35
- package/dist/linter/diagnostic.js.map +0 -1
- package/dist/linter/oxlint/config.d.ts +0 -14
- package/dist/linter/oxlint/config.d.ts.map +0 -1
- package/dist/linter/oxlint/config.js +0 -18
- package/dist/linter/oxlint/config.js.map +0 -1
- package/dist/linter/oxlint/plugin.d.ts +0 -13
- package/dist/linter/oxlint/plugin.d.ts.map +0 -1
- package/dist/linter/oxlint/plugin.js +0 -14
- package/dist/linter/oxlint/plugin.js.map +0 -1
- package/dist/linter/preflight.d.ts +0 -2
- package/dist/linter/preflight.d.ts.map +0 -1
- package/dist/linter/preflight.js +0 -162
- package/dist/linter/preflight.js.map +0 -1
- package/dist/linter/project.d.ts +0 -18
- package/dist/linter/project.d.ts.map +0 -1
- package/dist/linter/project.js +0 -150
- package/dist/linter/project.js.map +0 -1
- package/dist/linter/report.d.ts +0 -4
- package/dist/linter/report.d.ts.map +0 -1
- package/dist/linter/report.js +0 -22
- package/dist/linter/report.js.map +0 -1
- package/dist/linter/rules/catalog.d.ts +0 -56
- package/dist/linter/rules/catalog.d.ts.map +0 -1
- package/dist/linter/rules/catalog.js +0 -53
- package/dist/linter/rules/catalog.js.map +0 -1
- package/dist/linter/rules/core-has-no-async.d.ts +0 -3
- package/dist/linter/rules/core-has-no-async.d.ts.map +0 -1
- package/dist/linter/rules/core-has-no-async.js +0 -43
- package/dist/linter/rules/core-has-no-async.js.map +0 -1
- package/dist/linter/rules/core-is-pure.d.ts +0 -3
- package/dist/linter/rules/core-is-pure.d.ts.map +0 -1
- package/dist/linter/rules/core-is-pure.js +0 -74
- package/dist/linter/rules/core-is-pure.js.map +0 -1
- package/dist/linter/rules/no-nested-steps.d.ts +0 -3
- package/dist/linter/rules/no-nested-steps.d.ts.map +0 -1
- package/dist/linter/rules/no-nested-steps.js +0 -32
- package/dist/linter/rules/no-nested-steps.js.map +0 -1
- package/dist/linter/rules/no-read-inside-mutate.d.ts +0 -3
- package/dist/linter/rules/no-read-inside-mutate.d.ts.map +0 -1
- package/dist/linter/rules/no-read-inside-mutate.js +0 -64
- package/dist/linter/rules/no-read-inside-mutate.js.map +0 -1
- package/dist/linter/rules/one-remote-definition-per-file.d.ts +0 -3
- package/dist/linter/rules/one-remote-definition-per-file.d.ts.map +0 -1
- package/dist/linter/rules/one-remote-definition-per-file.js +0 -23
- package/dist/linter/rules/one-remote-definition-per-file.js.map +0 -1
- package/dist/linter/rules/oxlint-ast.d.ts +0 -30
- package/dist/linter/rules/oxlint-ast.d.ts.map +0 -1
- package/dist/linter/rules/oxlint-ast.js +0 -104
- package/dist/linter/rules/oxlint-ast.js.map +0 -1
- package/dist/linter/rules/oxlint-rule.d.ts +0 -45
- package/dist/linter/rules/oxlint-rule.d.ts.map +0 -1
- package/dist/linter/rules/oxlint-rule.js +0 -2
- package/dist/linter/rules/oxlint-rule.js.map +0 -1
- package/dist/linter/rules/project-rule.d.ts +0 -10
- package/dist/linter/rules/project-rule.d.ts.map +0 -1
- package/dist/linter/rules/project-rule.js +0 -24
- package/dist/linter/rules/project-rule.js.map +0 -1
- package/dist/linter/rules/thin-schema-composition-root.d.ts +0 -3
- package/dist/linter/rules/thin-schema-composition-root.d.ts.map +0 -1
- package/dist/linter/rules/thin-schema-composition-root.js +0 -23
- package/dist/linter/rules/thin-schema-composition-root.js.map +0 -1
- package/dist/linter/source.d.ts +0 -24
- package/dist/linter/source.d.ts.map +0 -1
- package/dist/linter/source.js +0 -279
- package/dist/linter/source.js.map +0 -1
- package/dist/linter/suppression.d.ts +0 -3
- package/dist/linter/suppression.d.ts.map +0 -1
- package/dist/linter/suppression.js +0 -11
- package/dist/linter/suppression.js.map +0 -1
- package/dist/method/class.d.ts +0 -71
- package/dist/method/class.d.ts.map +0 -1
- package/dist/method/class.js +0 -26
- package/dist/method/class.js.map +0 -1
- package/dist/method/context.d.ts +0 -99
- package/dist/method/context.d.ts.map +0 -1
- package/dist/method/context.js +0 -11
- package/dist/method/context.js.map +0 -1
- package/dist/method/index.d.ts +0 -6
- package/dist/method/index.d.ts.map +0 -1
- package/dist/method/index.js +0 -3
- package/dist/method/index.js.map +0 -1
- package/dist/method/single.d.ts +0 -81
- package/dist/method/single.d.ts.map +0 -1
- package/dist/method/single.js +0 -8
- package/dist/method/single.js.map +0 -1
- package/dist/server/auxiliary-routes.d.ts +0 -48
- package/dist/server/auxiliary-routes.d.ts.map +0 -1
- package/dist/server/auxiliary-routes.js +0 -322
- package/dist/server/auxiliary-routes.js.map +0 -1
- package/dist/server/config.d.ts +0 -83
- package/dist/server/config.d.ts.map +0 -1
- package/dist/server/config.js +0 -8
- package/dist/server/config.js.map +0 -1
- package/dist/server/create.d.ts +0 -8
- package/dist/server/create.d.ts.map +0 -1
- package/dist/server/create.js +0 -171
- package/dist/server/create.js.map +0 -1
- package/dist/server/domain-entry.d.ts +0 -77
- package/dist/server/domain-entry.d.ts.map +0 -1
- package/dist/server/domain-entry.js +0 -60
- package/dist/server/domain-entry.js.map +0 -1
- package/dist/server/handle.d.ts +0 -35
- package/dist/server/handle.d.ts.map +0 -1
- package/dist/server/handle.js +0 -9
- package/dist/server/handle.js.map +0 -1
- package/dist/server/jwks.d.ts +0 -11
- package/dist/server/jwks.d.ts.map +0 -1
- package/dist/server/jwks.js +0 -15
- package/dist/server/jwks.js.map +0 -1
- package/dist/server/require-env.d.ts +0 -15
- package/dist/server/require-env.d.ts.map +0 -1
- package/dist/server/require-env.js +0 -21
- package/dist/server/require-env.js.map +0 -1
- package/dist/server/service-entry.d.ts +0 -32
- package/dist/server/service-entry.d.ts.map +0 -1
- package/dist/server/service-entry.js +0 -150
- package/dist/server/service-entry.js.map +0 -1
- package/dist/server/serving-url.d.ts +0 -14
- package/dist/server/serving-url.d.ts.map +0 -1
- package/dist/server/serving-url.js +0 -28
- package/dist/server/serving-url.js.map +0 -1
- package/dist/server/start.d.ts +0 -11
- package/dist/server/start.d.ts.map +0 -1
- package/dist/server/start.js +0 -34
- package/dist/server/start.js.map +0 -1
- package/dist/server/worker-entry.d.ts +0 -157
- package/dist/server/worker-entry.d.ts.map +0 -1
- package/dist/server/worker-entry.js +0 -201
- package/dist/server/worker-entry.js.map +0 -1
- package/dist/service/functions.d.ts +0 -148
- package/dist/service/functions.d.ts.map +0 -1
- package/dist/service/functions.js +0 -115
- package/dist/service/functions.js.map +0 -1
- package/dist/service/index.d.ts +0 -3
- package/dist/service/index.d.ts.map +0 -1
- package/dist/service/index.js +0 -2
- package/dist/service/index.js.map +0 -1
- package/dist/step/index.d.ts +0 -5
- package/dist/step/index.d.ts.map +0 -1
- package/dist/step/index.js +0 -3
- package/dist/step/index.js.map +0 -1
- package/dist/step/inline.d.ts +0 -8
- package/dist/step/inline.d.ts.map +0 -1
- package/dist/step/inline.js +0 -22
- package/dist/step/inline.js.map +0 -1
- package/dist/step/step.d.ts +0 -28
- package/dist/step/step.d.ts.map +0 -1
- package/dist/step/step.js +0 -53
- package/dist/step/step.js.map +0 -1
- package/src/auth/authenticate.ts +0 -51
- package/src/auth/check.ts +0 -69
- package/src/auth/compose.ts +0 -56
- package/src/auth/errors.ts +0 -32
- package/src/auth/function-context.ts +0 -108
- package/src/auth/identity.ts +0 -17
- package/src/auth/index.ts +0 -19
- package/src/auth/issuer-mint.ts +0 -76
- package/src/auth/kernel-client.ts +0 -153
- package/src/auth/resolve.ts +0 -63
- package/src/auth/sign.ts +0 -36
- package/src/auth/verify.ts +0 -199
- package/src/cli/bin.ts +0 -15
- package/src/cli/dotenv.ts +0 -65
- package/src/cli/index.ts +0 -15
- package/src/cli/log.ts +0 -18
- package/src/cli/publish.ts +0 -341
- package/src/cli/run.ts +0 -749
- package/src/cli/spec.ts +0 -44
- package/src/config/adapter.ts +0 -177
- package/src/config/define-domain.ts +0 -354
- package/src/config/deploy.ts +0 -35
- package/src/config/index.ts +0 -31
- package/src/define/index.ts +0 -10
- package/src/define/remote-function.ts +0 -184
- package/src/define/view.ts +0 -112
- package/src/deploy/check.ts +0 -124
- package/src/deploy/index.ts +0 -2
- package/src/deploy/meta.ts +0 -50
- package/src/dispatch/authorize.ts +0 -29
- package/src/dispatch/dispatcher.ts +0 -321
- package/src/dispatch/errors.ts +0 -94
- package/src/dispatch/execute.ts +0 -67
- package/src/dispatch/identity.ts +0 -143
- package/src/dispatch/index.ts +0 -16
- package/src/dispatch/resolve.ts +0 -78
- package/src/dispatch/self.ts +0 -198
- package/src/dispatch/validate.ts +0 -41
- package/src/domain/binding.ts +0 -37
- package/src/domain/build-spec.ts +0 -156
- package/src/domain/contract.ts +0 -41
- package/src/domain/define.ts +0 -161
- package/src/domain/extend-functions.ts +0 -110
- package/src/domain/extend-views.ts +0 -151
- package/src/domain/index.ts +0 -4
- package/src/index.ts +0 -165
- package/src/linter/analyze.ts +0 -17
- package/src/linter/diagnostic.ts +0 -68
- package/src/linter/docs/DIAGNOSTICS.md +0 -47
- package/src/linter/docs/JUDGMENT.md +0 -81
- package/src/linter/docs/PRINCIPLES.md +0 -97
- package/src/linter/docs/README.md +0 -38
- package/src/linter/docs/RULE-AUTHORING.md +0 -144
- package/src/linter/docs/RULES.md +0 -153
- package/src/linter/index.ts +0 -14
- package/src/linter/lint.ts +0 -32
- package/src/linter/oxlint/astrale-ox.d.ts +0 -5
- package/src/linter/oxlint/config.ts +0 -19
- package/src/linter/oxlint/plugin.js +0 -16
- package/src/linter/oxlint/run.ts +0 -162
- package/src/linter/preflight.ts +0 -181
- package/src/linter/project.ts +0 -190
- package/src/linter/report.ts +0 -25
- package/src/linter/rules/catalog.ts +0 -67
- package/src/linter/rules/core-has-no-async.js +0 -43
- package/src/linter/rules/core-is-pure.ts +0 -103
- package/src/linter/rules/no-nested-steps.js +0 -37
- package/src/linter/rules/no-read-inside-mutate.js +0 -72
- package/src/linter/rules/one-remote-definition-per-file.ts +0 -29
- package/src/linter/rules/oxlint-ast.js +0 -110
- package/src/linter/rules/oxlint-rule.ts +0 -35
- package/src/linter/rules/project-rule.ts +0 -37
- package/src/linter/rules/thin-schema-composition-root.ts +0 -26
- package/src/linter/source.ts +0 -323
- package/src/linter/suppression.ts +0 -11
- package/src/method/class.ts +0 -163
- package/src/method/context.ts +0 -135
- package/src/method/index.ts +0 -19
- package/src/method/single.ts +0 -166
- package/src/server/auxiliary-routes.ts +0 -456
- package/src/server/config.ts +0 -85
- package/src/server/create.ts +0 -210
- package/src/server/domain-entry.ts +0 -125
- package/src/server/handle.ts +0 -37
- package/src/server/index.ts +0 -19
- package/src/server/jwks.ts +0 -18
- package/src/server/require-env.ts +0 -19
- package/src/server/service-entry.ts +0 -209
- package/src/server/serving-url.ts +0 -28
- package/src/server/start.ts +0 -42
- package/src/server/worker-entry.ts +0 -286
- package/src/service/functions.ts +0 -164
- package/src/service/index.ts +0 -18
- package/src/step/index.ts +0 -4
- package/src/step/inline.ts +0 -38
- package/src/step/step.ts +0 -95
|
@@ -0,0 +1,631 @@
|
|
|
1
|
+
import { call, Client } from '@astrale-os/kernel-client';
|
|
2
|
+
import { createAuth } from '@astrale-os/kernel-client/auth';
|
|
3
|
+
import { createGraph } from '@astrale-os/kernel-client/graph';
|
|
4
|
+
import { ClientSession } from '@astrale-os/kernel-client/session';
|
|
5
|
+
import { credential, delegation, issuer, jwk } from '@astrale-os/kernel-core/auth';
|
|
6
|
+
import { Domain } from '@astrale-os/kernel-core/domain';
|
|
7
|
+
import { NodeId } from '@astrale-os/kernel-core/graph/node';
|
|
8
|
+
import { Path } from '@astrale-os/kernel-core/path';
|
|
9
|
+
import { syscalls } from '@astrale-os/kernel-core/schema';
|
|
10
|
+
import { AuthenticationError } from '@astrale-os/kernel-ports/authentication';
|
|
11
|
+
import { FunctionError } from '@astrale-os/kernel-ports/functions';
|
|
12
|
+
import { errors as protocolErrors, installation, issuer as issuerProtocol, } from '@astrale-os/kernel-protocol';
|
|
13
|
+
import { errors as joseErrors, importJWK, jwtVerify, SignJWT } from 'jose';
|
|
14
|
+
import { bindCallables, createDeployment } from '../deployment/index.js';
|
|
15
|
+
import { createApplication } from './application.js';
|
|
16
|
+
const CALLBACK_TTL_SECONDS = 120;
|
|
17
|
+
const MAXIMUM_DISCOVERY_DOCUMENT_BYTES = 256 * 1024;
|
|
18
|
+
const DEFAULT_ROUTE_AGE_MS = 60_000;
|
|
19
|
+
/**
|
|
20
|
+
* Compose the portable V2 Deployment/Application pair for one remotely hosted Domain.
|
|
21
|
+
* The helper owns only generic remote identity, installation attestation, and callback authority;
|
|
22
|
+
* provider routing and lifecycle remain adapter capabilities.
|
|
23
|
+
*/
|
|
24
|
+
export function createRemoteApplication(input) {
|
|
25
|
+
const issuerId = httpIssuer(input.identity.issuer, input.identity.allowInsecureHttp === true);
|
|
26
|
+
if (input.identity.subject !== input.definition.schema.origin) {
|
|
27
|
+
throw new TypeError('Remote identity subject must equal the Domain origin.');
|
|
28
|
+
}
|
|
29
|
+
const delivery = input.deployment;
|
|
30
|
+
const deploymentInput = {
|
|
31
|
+
definition: input.definition,
|
|
32
|
+
issuer: issuerId,
|
|
33
|
+
bundleHref: delivery.bundleHref,
|
|
34
|
+
bindings: {
|
|
35
|
+
callables: bindCallables(input.definition, delivery.endpoint),
|
|
36
|
+
},
|
|
37
|
+
...(delivery.frontendBaseHref === undefined
|
|
38
|
+
? {}
|
|
39
|
+
: { frontendBaseHref: delivery.frontendBaseHref }),
|
|
40
|
+
...(delivery.frontendCacheKey === undefined
|
|
41
|
+
? {}
|
|
42
|
+
: { frontendCacheKey: delivery.frontendCacheKey }),
|
|
43
|
+
...(delivery.protocolViewBindings === undefined
|
|
44
|
+
? {}
|
|
45
|
+
: { protocolViewBindings: delivery.protocolViewBindings }),
|
|
46
|
+
...(delivery.routes === undefined ? {} : { routes: delivery.routes }),
|
|
47
|
+
...(delivery.manifest === undefined ? {} : { manifest: delivery.manifest }),
|
|
48
|
+
...(delivery.installation === undefined ? {} : { installation: delivery.installation }),
|
|
49
|
+
servingEndpoint: delivery.endpoint,
|
|
50
|
+
};
|
|
51
|
+
const deployed = createDeployment(deploymentInput);
|
|
52
|
+
const signing = signingMaterial(input.identity.privateKey);
|
|
53
|
+
let current = deployed;
|
|
54
|
+
const applicationInput = {
|
|
55
|
+
deployment: deployed,
|
|
56
|
+
environment: input.environment,
|
|
57
|
+
identity: remoteIdentity({ ...input.identity, issuer: issuerId }, signing),
|
|
58
|
+
server: input.server,
|
|
59
|
+
...(input.workflowRunner === undefined ? {} : { workflowRunner: input.workflowRunner }),
|
|
60
|
+
...(delivery.installation === undefined
|
|
61
|
+
? {}
|
|
62
|
+
: { installation: publicInstallationProvider(() => current, signing) }),
|
|
63
|
+
...(input.app === undefined ? {} : { app: input.app }),
|
|
64
|
+
};
|
|
65
|
+
const application = createApplication(applicationInput);
|
|
66
|
+
return Object.freeze({
|
|
67
|
+
app: application.app,
|
|
68
|
+
get publication() {
|
|
69
|
+
return application.publication;
|
|
70
|
+
},
|
|
71
|
+
replace(candidate) {
|
|
72
|
+
const replaced = application.replace(candidate);
|
|
73
|
+
current = candidate;
|
|
74
|
+
return replaced;
|
|
75
|
+
},
|
|
76
|
+
drain: application.drain,
|
|
77
|
+
close: application.close,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/** Build one immutable Application identity backed by an asymmetric private JWK. */
|
|
81
|
+
export function createRemoteIdentity(input) {
|
|
82
|
+
return remoteIdentity(input, signingMaterial(input.privateKey));
|
|
83
|
+
}
|
|
84
|
+
function remoteIdentity(input, signing) {
|
|
85
|
+
const selfIssuer = httpIssuer(input.issuer, input.allowInsecureHttp === true);
|
|
86
|
+
const fetchImpl = input.fetch ?? globalThis.fetch.bind(globalThis);
|
|
87
|
+
if (typeof fetchImpl !== 'function')
|
|
88
|
+
throw new TypeError('Remote identity requires Fetch.');
|
|
89
|
+
if (typeof input.subject !== 'string' || input.subject.length === 0) {
|
|
90
|
+
throw new TypeError('Remote identity subject must not be empty.');
|
|
91
|
+
}
|
|
92
|
+
if (input.allowEndpoint !== undefined && typeof input.allowEndpoint !== 'function') {
|
|
93
|
+
throw new TypeError('Remote identity endpoint policy is invalid.');
|
|
94
|
+
}
|
|
95
|
+
return Object.freeze({
|
|
96
|
+
issuer: selfIssuer,
|
|
97
|
+
signingAlgorithm: signing.algorithm,
|
|
98
|
+
loadPublicKeys: async () => [signing.publicKey],
|
|
99
|
+
admit: (request) => admitAttempt(request, signing, selfIssuer, fetchImpl, input),
|
|
100
|
+
authenticate: async (request) => {
|
|
101
|
+
const established = await establishCaller(request.credential, selfIssuer, fetchImpl, request.context.execution.signal, input);
|
|
102
|
+
if (established.verified.iss !== request.via.issuer) {
|
|
103
|
+
throw new AuthenticationError('INVALID_CREDENTIAL', 'Destination carrier issuer differs from the admitted Via Kernel.');
|
|
104
|
+
}
|
|
105
|
+
const context = request.context.execution;
|
|
106
|
+
const callbackAudience = established.verified.iss;
|
|
107
|
+
const composed = composedIdentity(established.delegation.credential);
|
|
108
|
+
const composedCredential = await signCallback(signing, selfIssuer, input.subject, callbackAudience, composed, established.verified, context);
|
|
109
|
+
const fetch = boundedFetch(fetchImpl, context.signal);
|
|
110
|
+
const session = new ClientSession({
|
|
111
|
+
url: invocationUrl(callbackAudience),
|
|
112
|
+
sourceIssuer: callbackAudience,
|
|
113
|
+
fetch,
|
|
114
|
+
auth: {
|
|
115
|
+
ttlSeconds: callbackTtl(context.deadline),
|
|
116
|
+
resolve: () => ({ credential: composedCredential }),
|
|
117
|
+
},
|
|
118
|
+
policy: {
|
|
119
|
+
maximumRouteAgeMs: DEFAULT_ROUTE_AGE_MS,
|
|
120
|
+
...(input.allowEndpoint === undefined ? {} : { allowEndpoint: input.allowEndpoint }),
|
|
121
|
+
...(input.allowInsecureHttp === true ? { allowInsecureHttp: true } : {}),
|
|
122
|
+
},
|
|
123
|
+
timeoutMs: Math.max(1, context.deadline - Date.now()),
|
|
124
|
+
});
|
|
125
|
+
const dispatch = (call, options) => session.dispatch(call, boundedSessionOptions(context, options));
|
|
126
|
+
const kernel = kernelCapability(session, dispatch, context);
|
|
127
|
+
const app = domainHandle(request.domain, dispatch);
|
|
128
|
+
return Object.freeze({
|
|
129
|
+
caller: established.caller,
|
|
130
|
+
app,
|
|
131
|
+
kernel,
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function signingMaterial(input) {
|
|
137
|
+
if (input === null || typeof input !== 'object' || Array.isArray(input)) {
|
|
138
|
+
throw new TypeError('Remote identity private key must be a JWK object.');
|
|
139
|
+
}
|
|
140
|
+
const algorithm = input.alg;
|
|
141
|
+
if (typeof algorithm !== 'string' || algorithm.length === 0) {
|
|
142
|
+
throw new TypeError('Remote identity private JWK requires alg.');
|
|
143
|
+
}
|
|
144
|
+
const keyId = input.kid;
|
|
145
|
+
if (keyId !== undefined && (typeof keyId !== 'string' || keyId.length === 0)) {
|
|
146
|
+
throw new TypeError('Remote identity private JWK kid is invalid.');
|
|
147
|
+
}
|
|
148
|
+
const value = input;
|
|
149
|
+
const { d: _d, p: _p, q: _q, dp: _dp, dq: _dq, qi: _qi, oth: _oth, k: _k, ...publicValue } = value;
|
|
150
|
+
const publicKey = jwk.acceptPublic({
|
|
151
|
+
...publicValue,
|
|
152
|
+
alg: algorithm,
|
|
153
|
+
...(keyId ? { kid: keyId } : {}),
|
|
154
|
+
});
|
|
155
|
+
return Object.freeze({
|
|
156
|
+
algorithm,
|
|
157
|
+
...(keyId === undefined ? {} : { keyId }),
|
|
158
|
+
privateKey: importJWK(input, algorithm),
|
|
159
|
+
publicKey,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
async function establishCaller(input, audience, fetch, signal, policy) {
|
|
163
|
+
try {
|
|
164
|
+
const context = await verifyCredential(input, audience, fetch, signal, policy);
|
|
165
|
+
const carried = delegation.accept(context.verified.claims.delegation);
|
|
166
|
+
let principal;
|
|
167
|
+
try {
|
|
168
|
+
principal = NodeId(context.verified.sub);
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
throw new CredentialRejected('Credential subject is not a Kernel IdentityId.');
|
|
172
|
+
}
|
|
173
|
+
return Object.freeze({
|
|
174
|
+
verified: context.verified,
|
|
175
|
+
delegation: carried,
|
|
176
|
+
caller: Object.freeze({
|
|
177
|
+
kind: 'authenticated',
|
|
178
|
+
principal,
|
|
179
|
+
authentication: credential.evidence(context),
|
|
180
|
+
}),
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
catch (cause) {
|
|
184
|
+
if (cause instanceof AuthenticationError)
|
|
185
|
+
throw cause;
|
|
186
|
+
if (cause instanceof IssuerUnavailable) {
|
|
187
|
+
throw new AuthenticationError('AUTHENTICATION_BACKEND_FAILED', cause.message, {
|
|
188
|
+
cause: cause.cause,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
if (cause instanceof CredentialRejected ||
|
|
192
|
+
cause instanceof joseErrors.JOSEError ||
|
|
193
|
+
cause instanceof protocolErrors.ProtocolError) {
|
|
194
|
+
throw new AuthenticationError('INVALID_CREDENTIAL', 'Credential is invalid.');
|
|
195
|
+
}
|
|
196
|
+
throw cause;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
async function verifyCredential(input, audience, fetch, signal, policy) {
|
|
200
|
+
let inspected;
|
|
201
|
+
try {
|
|
202
|
+
inspected = credential.inspect(input);
|
|
203
|
+
}
|
|
204
|
+
catch (cause) {
|
|
205
|
+
throw new CredentialRejected('Credential is malformed.', cause);
|
|
206
|
+
}
|
|
207
|
+
if (inspected.iss === undefined)
|
|
208
|
+
throw new CredentialRejected('Credential issuer is missing.');
|
|
209
|
+
let admittedIssuer;
|
|
210
|
+
try {
|
|
211
|
+
admittedIssuer = httpIssuer(inspected.iss, policy.allowInsecureHttp === true);
|
|
212
|
+
}
|
|
213
|
+
catch (cause) {
|
|
214
|
+
throw new CredentialRejected('Credential issuer is invalid.', cause);
|
|
215
|
+
}
|
|
216
|
+
const paths = issuerProtocol.paths(admittedIssuer);
|
|
217
|
+
const configurationUrl = new URL(paths.configuration, admittedIssuer).toString();
|
|
218
|
+
admitEndpoint(configurationUrl, policy);
|
|
219
|
+
const configurationResponse = await fetchDiscovery(fetch, configurationUrl, signal);
|
|
220
|
+
const configuration = issuerProtocol.acceptConfiguration(await boundedJson(configurationResponse, signal), admittedIssuer);
|
|
221
|
+
admitEndpoint(configuration.jwks_uri, policy);
|
|
222
|
+
const keysResponse = await fetchDiscovery(fetch, configuration.jwks_uri, signal);
|
|
223
|
+
const keys = issuerProtocol.acceptKeySet(await boundedJson(keysResponse, signal), configuration.id_token_signing_alg_values_supported).keys;
|
|
224
|
+
const compact = typeof input === 'string' ? input : new TextDecoder().decode(input);
|
|
225
|
+
const candidates = keys.filter((candidate) => inspected.kid === undefined || candidate.kid === inspected.kid);
|
|
226
|
+
const matches = [];
|
|
227
|
+
for (const candidate of candidates) {
|
|
228
|
+
try {
|
|
229
|
+
const imported = await importJWK(candidate, candidate.alg ?? configuration.id_token_signing_alg_values_supported[0]);
|
|
230
|
+
matches.push(await jwtVerify(compact, imported, {
|
|
231
|
+
issuer: admittedIssuer,
|
|
232
|
+
audience,
|
|
233
|
+
algorithms: [...configuration.id_token_signing_alg_values_supported],
|
|
234
|
+
}));
|
|
235
|
+
}
|
|
236
|
+
catch (cause) {
|
|
237
|
+
if (cause instanceof joseErrors.JOSEError)
|
|
238
|
+
continue;
|
|
239
|
+
throw cause;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (matches.length !== 1) {
|
|
243
|
+
throw new CredentialRejected('Credential signature is not uniquely verified.');
|
|
244
|
+
}
|
|
245
|
+
const match = matches[0];
|
|
246
|
+
let verified;
|
|
247
|
+
try {
|
|
248
|
+
verified = credential.acceptVerified({
|
|
249
|
+
method: 'jwt',
|
|
250
|
+
iss: match.payload.iss,
|
|
251
|
+
sub: match.payload.sub,
|
|
252
|
+
aud: match.payload.aud,
|
|
253
|
+
kid: match.protectedHeader.kid,
|
|
254
|
+
iat: match.payload.iat,
|
|
255
|
+
nbf: match.payload.nbf,
|
|
256
|
+
exp: match.payload.exp,
|
|
257
|
+
claims: match.payload,
|
|
258
|
+
});
|
|
259
|
+
credential.verifyAudience(verified, audience);
|
|
260
|
+
}
|
|
261
|
+
catch (cause) {
|
|
262
|
+
throw new CredentialRejected('Credential claims are invalid.', cause);
|
|
263
|
+
}
|
|
264
|
+
admitEndpoint(invocationUrl(admittedIssuer), policy);
|
|
265
|
+
return Object.freeze({ raw: input, verified });
|
|
266
|
+
}
|
|
267
|
+
async function fetchDiscovery(fetch, url, signal) {
|
|
268
|
+
let response;
|
|
269
|
+
try {
|
|
270
|
+
response = await fetch(url, { method: 'GET', redirect: 'error', signal });
|
|
271
|
+
}
|
|
272
|
+
catch (cause) {
|
|
273
|
+
if (signal.aborted)
|
|
274
|
+
throw signal.reason;
|
|
275
|
+
throw new IssuerUnavailable('Issuer discovery request failed.', cause);
|
|
276
|
+
}
|
|
277
|
+
if (!response.ok) {
|
|
278
|
+
await response.body?.cancel();
|
|
279
|
+
throw new IssuerUnavailable(`Issuer discovery returned HTTP ${response.status}.`);
|
|
280
|
+
}
|
|
281
|
+
return response;
|
|
282
|
+
}
|
|
283
|
+
async function boundedJson(response, signal) {
|
|
284
|
+
const declared = response.headers.get('content-length');
|
|
285
|
+
if (declared !== null && Number(declared) > MAXIMUM_DISCOVERY_DOCUMENT_BYTES) {
|
|
286
|
+
await response.body?.cancel();
|
|
287
|
+
throw new CredentialRejected('Issuer discovery document exceeds the byte limit.');
|
|
288
|
+
}
|
|
289
|
+
if (response.body === null)
|
|
290
|
+
throw new CredentialRejected('Issuer discovery response is empty.');
|
|
291
|
+
const reader = response.body.getReader();
|
|
292
|
+
const chunks = [];
|
|
293
|
+
let size = 0;
|
|
294
|
+
try {
|
|
295
|
+
for (;;) {
|
|
296
|
+
const read = await reader.read();
|
|
297
|
+
if (read.done)
|
|
298
|
+
break;
|
|
299
|
+
size += read.value.byteLength;
|
|
300
|
+
if (size > MAXIMUM_DISCOVERY_DOCUMENT_BYTES) {
|
|
301
|
+
await reader.cancel();
|
|
302
|
+
throw new CredentialRejected('Issuer discovery document exceeds the byte limit.');
|
|
303
|
+
}
|
|
304
|
+
chunks.push(read.value);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
catch (cause) {
|
|
308
|
+
if (signal.aborted)
|
|
309
|
+
throw signal.reason;
|
|
310
|
+
throw cause;
|
|
311
|
+
}
|
|
312
|
+
finally {
|
|
313
|
+
reader.releaseLock();
|
|
314
|
+
}
|
|
315
|
+
if (signal.aborted)
|
|
316
|
+
throw signal.reason;
|
|
317
|
+
const bytes = new Uint8Array(size);
|
|
318
|
+
let offset = 0;
|
|
319
|
+
for (const chunk of chunks) {
|
|
320
|
+
bytes.set(chunk, offset);
|
|
321
|
+
offset += chunk.byteLength;
|
|
322
|
+
}
|
|
323
|
+
try {
|
|
324
|
+
return JSON.parse(new TextDecoder().decode(bytes));
|
|
325
|
+
}
|
|
326
|
+
catch (cause) {
|
|
327
|
+
throw new CredentialRejected('Issuer discovery document is not JSON.', cause);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
function identityLeaf(nested) {
|
|
331
|
+
return Object.freeze({ kind: 'identity', credential: nested });
|
|
332
|
+
}
|
|
333
|
+
function composedIdentity(nested) {
|
|
334
|
+
return Object.freeze({
|
|
335
|
+
kind: 'union',
|
|
336
|
+
operands: Object.freeze([
|
|
337
|
+
Object.freeze({ kind: 'identity', self: true }),
|
|
338
|
+
identityLeaf(nested),
|
|
339
|
+
]),
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
async function signApplicationCallback(signing, callbackIssuer, subject, audience, execution) {
|
|
343
|
+
requireLive(execution);
|
|
344
|
+
const now = Math.floor(Date.now() / 1_000);
|
|
345
|
+
const expiresAt = Math.min(Math.floor(execution.deadline / 1_000), now + CALLBACK_TTL_SECONDS);
|
|
346
|
+
if (expiresAt <= now) {
|
|
347
|
+
throw new AuthenticationError('INVALID_CREDENTIAL', 'Callback credential would be expired.');
|
|
348
|
+
}
|
|
349
|
+
return new SignJWT({
|
|
350
|
+
grant: { v: 1, expr: { kind: 'identity', self: true } },
|
|
351
|
+
})
|
|
352
|
+
.setProtectedHeader({
|
|
353
|
+
alg: signing.algorithm,
|
|
354
|
+
...(signing.keyId === undefined ? {} : { kid: signing.keyId }),
|
|
355
|
+
})
|
|
356
|
+
.setIssuer(callbackIssuer)
|
|
357
|
+
.setSubject(subject)
|
|
358
|
+
.setAudience(audience)
|
|
359
|
+
.setIssuedAt(now)
|
|
360
|
+
.setExpirationTime(expiresAt)
|
|
361
|
+
.sign(await signing.privateKey);
|
|
362
|
+
}
|
|
363
|
+
async function signCallback(signing, callbackIssuer, subject, audience, expression, carrier, execution) {
|
|
364
|
+
requireLive(execution);
|
|
365
|
+
const now = Math.floor(Date.now() / 1_000);
|
|
366
|
+
const expiresAt = Math.min(carrier.exp ?? Number.POSITIVE_INFINITY, Math.floor(execution.deadline / 1_000), now + CALLBACK_TTL_SECONDS);
|
|
367
|
+
if (!Number.isFinite(expiresAt) || expiresAt <= now) {
|
|
368
|
+
throw new AuthenticationError('INVALID_CREDENTIAL', 'Credential proof has expired.');
|
|
369
|
+
}
|
|
370
|
+
return new SignJWT({ grant: { v: 1, expr: expression } })
|
|
371
|
+
.setProtectedHeader({
|
|
372
|
+
alg: signing.algorithm,
|
|
373
|
+
...(signing.keyId === undefined ? {} : { kid: signing.keyId }),
|
|
374
|
+
})
|
|
375
|
+
.setIssuer(callbackIssuer)
|
|
376
|
+
.setSubject(subject)
|
|
377
|
+
.setAudience(audience)
|
|
378
|
+
.setIssuedAt(now)
|
|
379
|
+
.setExpirationTime(expiresAt)
|
|
380
|
+
.sign(await signing.privateKey);
|
|
381
|
+
}
|
|
382
|
+
function kernelCapability(session, dispatch, execution) {
|
|
383
|
+
const value = (call, options) => session.call(call, boundedSessionOptions(execution, options));
|
|
384
|
+
const graph = createGraph(value);
|
|
385
|
+
const auth = createAuth((target, input, options) => value(call(target, input), boundedRequestOptions(execution, options)));
|
|
386
|
+
return Object.freeze({
|
|
387
|
+
...graph,
|
|
388
|
+
auth,
|
|
389
|
+
dispatch: (call, options) => dispatch(call, options),
|
|
390
|
+
call: (call, options) => session.call(call, boundedSessionOptions(execution, options)),
|
|
391
|
+
stream: (call, options) => session.stream(call, boundedSessionOptions(execution, options)),
|
|
392
|
+
binary: (call, options) => session.binary(call, boundedSessionOptions(execution, options)),
|
|
393
|
+
snapshot: (options) => session.snapshot(boundedSessionOptions(execution, options)),
|
|
394
|
+
viewsFor: (target, options) => session.viewsFor(target, boundedSessionOptions(execution, options)),
|
|
395
|
+
domain: async (domainSchema) => domainHandle(Domain.fromSchema(domainSchema), dispatch),
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
function domainHandle(domain, dispatch) {
|
|
399
|
+
const callables = concreteCallables(domain);
|
|
400
|
+
const invokeCallable = async (callable, receiver, input, options) => {
|
|
401
|
+
if (!callables.has(callable)) {
|
|
402
|
+
throw new FunctionError('FUNCTION_BINDING_INVALID', 'Callable is not a concrete member of the Domain.');
|
|
403
|
+
}
|
|
404
|
+
const target = 'on' in callable ? Path.instanceMethod(Path.from(receiver), callable.name) : callable.path;
|
|
405
|
+
if (target === undefined) {
|
|
406
|
+
throw new FunctionError('FUNCTION_BINDING_INVALID', 'Callable has no canonical Path.');
|
|
407
|
+
}
|
|
408
|
+
const result = await dispatch(call(target, input), options);
|
|
409
|
+
return callableOutput(callable, result);
|
|
410
|
+
};
|
|
411
|
+
const methodBinder = (method, receiver) => (input) => invokeCallable(method, Path.id(receiver.id), input);
|
|
412
|
+
const invoke = ((callable, receiverOrInput, inputOrOptions, options) => 'on' in callable
|
|
413
|
+
? invokeCallable(callable, receiverOrInput, inputOrOptions, options)
|
|
414
|
+
: invokeCallable(callable, undefined, receiverOrInput, inputOrOptions));
|
|
415
|
+
const bind = ((definitionOrValue, value) => value === undefined
|
|
416
|
+
? domain.$.wrap(definitionOrValue, methodBinder)
|
|
417
|
+
: domain.$.wrap(definitionOrValue, value, methodBinder));
|
|
418
|
+
return Object.freeze({
|
|
419
|
+
...domain,
|
|
420
|
+
$: Object.freeze({ ...domain.$, invoke, bind }),
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
function concreteCallables(domain) {
|
|
424
|
+
const result = new Set();
|
|
425
|
+
for (const definition of domain.$.definitions.values()) {
|
|
426
|
+
if (definition.kind === 'function') {
|
|
427
|
+
result.add(definition);
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
if ((definition.kind !== 'class' && definition.kind !== 'interface') ||
|
|
431
|
+
definition.family !== 'node') {
|
|
432
|
+
continue;
|
|
433
|
+
}
|
|
434
|
+
for (const method of definition.methods.values()) {
|
|
435
|
+
if (method.definition.inheritance !== 'abstract') {
|
|
436
|
+
result.add(method);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return result;
|
|
441
|
+
}
|
|
442
|
+
function callableOutput(callable, result) {
|
|
443
|
+
switch (callable.definition.output.mode) {
|
|
444
|
+
case 'value':
|
|
445
|
+
if (result.kind === 'value')
|
|
446
|
+
return result.value;
|
|
447
|
+
break;
|
|
448
|
+
case 'stream':
|
|
449
|
+
if (result.kind === 'stream')
|
|
450
|
+
return result.stream;
|
|
451
|
+
break;
|
|
452
|
+
case 'binary':
|
|
453
|
+
if (result.kind === 'binary')
|
|
454
|
+
return result.value;
|
|
455
|
+
break;
|
|
456
|
+
}
|
|
457
|
+
if (result.kind === 'stream')
|
|
458
|
+
void result.stream.cancel('Remote callable output kind changed.');
|
|
459
|
+
throw new FunctionError('FUNCTION_OUTPUT_INVALID', `Remote callable returned ${result.kind} for ${callable.definition.output.mode} output.`);
|
|
460
|
+
}
|
|
461
|
+
async function admitAttempt(request, signing, applicationIssuer, fetch, policy) {
|
|
462
|
+
const execution = request.context.execution;
|
|
463
|
+
const kernel = request.via.issuer;
|
|
464
|
+
const url = invocationUrl(kernel);
|
|
465
|
+
admitEndpoint(url, policy);
|
|
466
|
+
const callback = await signApplicationCallback(signing, applicationIssuer, request.domain.$.origin, kernel, execution);
|
|
467
|
+
const owner = Path.project(syscalls.function.admit.ref.owner);
|
|
468
|
+
const target = Path.staticMethod(owner, syscalls.function.admit.ref.name);
|
|
469
|
+
const client = new Client({ url, fetch: boundedFetch(fetch, execution.signal) });
|
|
470
|
+
try {
|
|
471
|
+
const portableRequest = {
|
|
472
|
+
call: request.call,
|
|
473
|
+
...(request.credential === undefined ? {} : { credential: request.credential }),
|
|
474
|
+
};
|
|
475
|
+
const value = await client.as(callback).call(call(target, portableRequest), {
|
|
476
|
+
...boundedRequestOptions(execution),
|
|
477
|
+
delegate: {
|
|
478
|
+
ttlSeconds: callbackTtl(execution.deadline),
|
|
479
|
+
delegation: { kind: 'identity', self: true },
|
|
480
|
+
},
|
|
481
|
+
});
|
|
482
|
+
if (!isTarget(value)) {
|
|
483
|
+
throw new FunctionError('FUNCTION_EXECUTION_FAILED', 'Kernel returned an invalid Function admission Target.');
|
|
484
|
+
}
|
|
485
|
+
return Object.freeze({
|
|
486
|
+
callable: value.callable,
|
|
487
|
+
...(value.receiver === undefined ? {} : { receiver: value.receiver }),
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
finally {
|
|
491
|
+
client.close();
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
function isTarget(input) {
|
|
495
|
+
if (input === null || typeof input !== 'object' || Array.isArray(input))
|
|
496
|
+
return false;
|
|
497
|
+
const fields = Reflect.ownKeys(input);
|
|
498
|
+
return (fields.every((field) => field === 'callable' || field === 'receiver') &&
|
|
499
|
+
fields.includes('callable') &&
|
|
500
|
+
typeof Reflect.get(input, 'callable') === 'string' &&
|
|
501
|
+
(Reflect.get(input, 'receiver') === undefined ||
|
|
502
|
+
typeof Reflect.get(input, 'receiver') === 'string'));
|
|
503
|
+
}
|
|
504
|
+
function publicInstallationProvider(current, signing) {
|
|
505
|
+
if (current().publication.installation?.authentication.kind !== 'public') {
|
|
506
|
+
throw new TypeError('Remote application helper currently requires a public install endpoint.');
|
|
507
|
+
}
|
|
508
|
+
return Object.freeze({
|
|
509
|
+
async create(request) {
|
|
510
|
+
const deployed = current();
|
|
511
|
+
if (deployed.publication.installation?.authentication.kind !== 'public') {
|
|
512
|
+
throw new FunctionError('FUNCTION_CONFLICT', 'Installation endpoint changed.');
|
|
513
|
+
}
|
|
514
|
+
if (request.etag !== deployed.publication.etag) {
|
|
515
|
+
throw new FunctionError('FUNCTION_CONFLICT', 'Installation Publication changed.');
|
|
516
|
+
}
|
|
517
|
+
const now = Math.floor(Date.now() / 1_000);
|
|
518
|
+
const attestation = await new SignJWT({
|
|
519
|
+
purpose: installation.PURPOSE,
|
|
520
|
+
nonce: request.nonce,
|
|
521
|
+
etag: deployed.publication.etag,
|
|
522
|
+
schemaRevision: deployed.publication.schema.revision,
|
|
523
|
+
})
|
|
524
|
+
.setProtectedHeader({
|
|
525
|
+
alg: signing.algorithm,
|
|
526
|
+
...(signing.keyId === undefined ? {} : { kid: signing.keyId }),
|
|
527
|
+
})
|
|
528
|
+
.setIssuer(deployed.publication.identity.issuer)
|
|
529
|
+
.setSubject(deployed.publication.origin)
|
|
530
|
+
.setAudience(request.kernelIssuer)
|
|
531
|
+
.setExpirationTime(now + CALLBACK_TTL_SECONDS)
|
|
532
|
+
.sign(await signing.privateKey);
|
|
533
|
+
return installation.accept({
|
|
534
|
+
format: 'astrale.domain.installation',
|
|
535
|
+
version: 1,
|
|
536
|
+
publication: deployed.publication,
|
|
537
|
+
attestation,
|
|
538
|
+
});
|
|
539
|
+
},
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
function boundedFetch(fetch, lifecycle) {
|
|
543
|
+
return (input, init = {}) => fetch(input, {
|
|
544
|
+
...init,
|
|
545
|
+
signal: init.signal === undefined || init.signal === null
|
|
546
|
+
? lifecycle
|
|
547
|
+
: AbortSignal.any([lifecycle, init.signal]),
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
function boundedRequestOptions(execution, options = {}) {
|
|
551
|
+
return boundedOptions(execution, options);
|
|
552
|
+
}
|
|
553
|
+
function boundedSessionOptions(execution, options) {
|
|
554
|
+
return boundedOptions(execution, options ?? {});
|
|
555
|
+
}
|
|
556
|
+
function boundedOptions(execution, options) {
|
|
557
|
+
requireLive(execution);
|
|
558
|
+
const remaining = Math.max(1, execution.deadline - Date.now());
|
|
559
|
+
return {
|
|
560
|
+
...options,
|
|
561
|
+
signal: options.signal === undefined
|
|
562
|
+
? execution.signal
|
|
563
|
+
: AbortSignal.any([execution.signal, options.signal]),
|
|
564
|
+
timeoutMs: Math.min(options.timeoutMs ?? remaining, remaining),
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
function requireLive(execution) {
|
|
568
|
+
if (execution.signal.aborted) {
|
|
569
|
+
throw new FunctionError('FUNCTION_CANCELLED', 'Remote invocation was cancelled.');
|
|
570
|
+
}
|
|
571
|
+
if (execution.deadline <= Date.now()) {
|
|
572
|
+
throw new FunctionError('FUNCTION_DEADLINE_EXCEEDED', 'Remote invocation deadline was exceeded.');
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
function callbackTtl(deadline) {
|
|
576
|
+
return Math.max(1, Math.min(CALLBACK_TTL_SECONDS, Math.floor((deadline - Date.now()) / 1_000)));
|
|
577
|
+
}
|
|
578
|
+
function httpIssuer(input, allowInsecureHttp) {
|
|
579
|
+
const admitted = issuer.accept(input);
|
|
580
|
+
let url;
|
|
581
|
+
try {
|
|
582
|
+
url = new URL(admitted);
|
|
583
|
+
}
|
|
584
|
+
catch (cause) {
|
|
585
|
+
throw new TypeError('Remote identity issuer must be an absolute HTTP(S) URL.', { cause });
|
|
586
|
+
}
|
|
587
|
+
if (url.username !== '' ||
|
|
588
|
+
url.password !== '' ||
|
|
589
|
+
url.search !== '' ||
|
|
590
|
+
url.hash !== '' ||
|
|
591
|
+
(url.protocol !== 'https:' && !(allowInsecureHttp && url.protocol === 'http:'))) {
|
|
592
|
+
throw new TypeError(allowInsecureHttp
|
|
593
|
+
? 'Remote identity issuer must be an absolute HTTP(S) URL without credentials, query, or fragment.'
|
|
594
|
+
: 'Remote identity issuer must be an absolute HTTPS URL without credentials, query, or fragment.');
|
|
595
|
+
}
|
|
596
|
+
return admitted;
|
|
597
|
+
}
|
|
598
|
+
function admitEndpoint(input, policy) {
|
|
599
|
+
let url;
|
|
600
|
+
try {
|
|
601
|
+
url = new URL(input);
|
|
602
|
+
}
|
|
603
|
+
catch (cause) {
|
|
604
|
+
throw new CredentialRejected('Credential issuer endpoint is invalid.', cause);
|
|
605
|
+
}
|
|
606
|
+
if (url.username !== '' ||
|
|
607
|
+
url.password !== '' ||
|
|
608
|
+
url.hash !== '' ||
|
|
609
|
+
(url.protocol !== 'https:' && !(policy.allowInsecureHttp === true && url.protocol === 'http:'))) {
|
|
610
|
+
throw new CredentialRejected('Credential issuer endpoint is not allowed.');
|
|
611
|
+
}
|
|
612
|
+
if (policy.allowEndpoint?.(url.toString()) === false) {
|
|
613
|
+
throw new CredentialRejected('Credential issuer endpoint is denied by policy.');
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
function invocationUrl(input) {
|
|
617
|
+
return `${input.replace(/\/+$/u, '')}/invoke`;
|
|
618
|
+
}
|
|
619
|
+
class CredentialRejected extends Error {
|
|
620
|
+
constructor(message, cause) {
|
|
621
|
+
super(message, { cause });
|
|
622
|
+
this.name = 'CredentialRejected';
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
class IssuerUnavailable extends Error {
|
|
626
|
+
constructor(message, cause) {
|
|
627
|
+
super(message, { cause });
|
|
628
|
+
this.name = 'IssuerUnavailable';
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
//# sourceMappingURL=remote.js.map
|