@astrale-os/sdk 0.4.19 → 0.5.0-beta.2
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 +5 -3
- package/dist/auth/exchange.d.ts +11 -0
- package/dist/auth/exchange.d.ts.map +1 -0
- package/dist/auth/exchange.js +8 -0
- package/dist/auth/exchange.js.map +1 -0
- package/dist/auth/index.d.ts +4 -15
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +3 -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 +47 -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 +91 -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 +68 -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 +99 -65
- package/dist/domain/define.d.ts.map +1 -1
- package/dist/domain/define.js +78 -60
- 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 +13 -4
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js +7 -3
- package/dist/domain/index.js.map +1 -1
- package/dist/domain/requirements.d.ts +26 -0
- package/dist/domain/requirements.d.ts.map +1 -0
- package/dist/domain/requirements.js +98 -0
- package/dist/domain/requirements.js.map +1 -0
- 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 +289 -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 +107 -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 -8
- 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 +6 -6
- package/dist/linter/oxlint/process.d.ts.map +1 -1
- package/dist/linter/oxlint/process.js +1 -1
- package/dist/linter/oxlint/process.js.map +1 -1
- package/dist/linter/oxlint/run.d.ts +5 -5
- package/dist/linter/oxlint/run.d.ts.map +1 -1
- package/dist/linter/oxlint/run.js +140 -20
- 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 +30 -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 +164 -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 +36 -0
- package/dist/server/application.d.ts.map +1 -0
- package/dist/server/application.js +126 -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 +56 -0
- package/dist/server/remote.d.ts.map +1 -0
- package/dist/server/remote.js +798 -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 +57 -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 +117 -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 -38
- package/dist/linter/diagnostic.d.ts.map +0 -1
- package/dist/linter/diagnostic.js +0 -37
- package/dist/linter/diagnostic.js.map +0 -1
- package/dist/linter/oxlint/config.d.ts +0 -15
- package/dist/linter/oxlint/config.d.ts.map +0 -1
- package/dist/linter/oxlint/config.js +0 -23
- package/dist/linter/oxlint/config.js.map +0 -1
- package/dist/linter/oxlint/ignore-patterns.d.ts +0 -9
- package/dist/linter/oxlint/ignore-patterns.d.ts.map +0 -1
- package/dist/linter/oxlint/ignore-patterns.js +0 -18
- package/dist/linter/oxlint/ignore-patterns.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 -769
- 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 -162
- 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 -85
- 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 -15
- package/src/linter/lint.ts +0 -34
- package/src/linter/oxlint/astrale-ox.d.ts +0 -5
- package/src/linter/oxlint/config.ts +0 -24
- package/src/linter/oxlint/ignore-patterns.ts +0 -17
- package/src/linter/oxlint/plugin.js +0 -16
- package/src/linter/oxlint/process.ts +0 -219
- package/src/linter/oxlint/run.ts +0 -175
- package/src/linter/preflight.ts +0 -182
- 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
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `SdkDispatcher` — implements direct KernelAPI calls and hosted invocations
|
|
3
|
-
* through the same SDK execution pipeline.
|
|
4
|
-
*
|
|
5
|
-
* Built once at server startup from the domain's `CompiledDomain` plus a typed
|
|
6
|
-
* deps container and a private JWK. Per-method identity configs are
|
|
7
|
-
* pre-resolved into a Map so dispatch is O(1) per call.
|
|
8
|
-
*
|
|
9
|
-
* Pipeline per call:
|
|
10
|
-
* resolve method → authenticate → validate → resolve self → execute
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import type { AuthedKernelAPI, DispatchResult, KernelAPI } from '@astrale-os/kernel-api'
|
|
14
|
-
import type { AuthPolicy } from '@astrale-os/kernel-api/routed'
|
|
15
|
-
import type { NodeBinder } from '@astrale-os/kernel-client/schema'
|
|
16
|
-
import type { CredentialInput, Path } from '@astrale-os/kernel-core'
|
|
17
|
-
import type { BoundMethod, CompiledDomain } from '@astrale-os/kernel-core/domain'
|
|
18
|
-
import type { Invocation, Capabilities, Dispatcher } from '@astrale-os/kernel-server'
|
|
19
|
-
|
|
20
|
-
import { createNodeBinder } from '@astrale-os/kernel-client/schema'
|
|
21
|
-
import { executeInvocation } from '@astrale-os/kernel-server'
|
|
22
|
-
|
|
23
|
-
import type { RemoteIdentityConfig } from '../auth/identity.js'
|
|
24
|
-
import type { AnyRemoteHandler } from '../method/single.js'
|
|
25
|
-
import type { MethodIndex } from './resolve.js'
|
|
26
|
-
|
|
27
|
-
import { makeFunctionContext } from '../auth/function-context.js'
|
|
28
|
-
import { makeDomainAuthority } from '../auth/issuer-mint.js'
|
|
29
|
-
import { resolveInboundAuth } from '../auth/resolve.js'
|
|
30
|
-
import { createInlineStep } from '../step/index.js'
|
|
31
|
-
import { runAuthorize } from './authorize.js'
|
|
32
|
-
import { MethodNotFoundError, SdkResultValidationError, SdkValidationError } from './errors.js'
|
|
33
|
-
import { executeHandler } from './execute.js'
|
|
34
|
-
import { buildIdentityMap } from './identity.js'
|
|
35
|
-
import { resolveMethod } from './resolve.js'
|
|
36
|
-
import { resolveSelf, withBoundNode, type ParsedSelf } from './self.js'
|
|
37
|
-
import { validateParams, validateResult } from './validate.js'
|
|
38
|
-
|
|
39
|
-
export type SdkDispatcherConfig<TDeps> = {
|
|
40
|
-
/** The compiled domain — source of the method layout and origin-addressed subs. */
|
|
41
|
-
compiled: CompiledDomain
|
|
42
|
-
/** Pre-built method map: ref → BoundMethod. */
|
|
43
|
-
methods: MethodIndex
|
|
44
|
-
/** Dependency container injected into every handler. */
|
|
45
|
-
deps: TDeps
|
|
46
|
-
/** Private key for signing outbound per-function credentials. */
|
|
47
|
-
privateKey: JsonWebKey
|
|
48
|
-
/**
|
|
49
|
-
* The worker's identity (`iss`) for outbound per-function credentials — its
|
|
50
|
-
* serving URL (e.g. `https://crm.test.com`), DECOUPLED from the domain's
|
|
51
|
-
* addressing `origin`. Matches the `iss` the kernel pins on each node at
|
|
52
|
-
* install (the URL it fetched the domain at).
|
|
53
|
-
*/
|
|
54
|
-
issuer: string
|
|
55
|
-
/** The worker's serving URL (`config.url`) — exposed to handlers as `ctx.env.url`. */
|
|
56
|
-
url: string
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export class SdkDispatcher<TDeps = unknown> implements KernelAPI, Dispatcher {
|
|
60
|
-
private readonly methods: MethodIndex
|
|
61
|
-
private readonly deps: TDeps
|
|
62
|
-
private readonly identities: Map<BoundMethod<AnyRemoteHandler>, RemoteIdentityConfig>
|
|
63
|
-
private readonly issuer: string
|
|
64
|
-
private readonly url: string
|
|
65
|
-
private readonly privateKey: JsonWebKey
|
|
66
|
-
/** Built once from the compiled domain — drives typed self and handler kernel binding. */
|
|
67
|
-
private readonly binder: NodeBinder<CompiledDomain['$']['schema']>
|
|
68
|
-
|
|
69
|
-
constructor(config: SdkDispatcherConfig<TDeps>) {
|
|
70
|
-
this.methods = config.methods
|
|
71
|
-
this.deps = config.deps
|
|
72
|
-
this.issuer = config.issuer
|
|
73
|
-
this.url = config.url
|
|
74
|
-
this.privateKey = config.privateKey
|
|
75
|
-
this.binder = createNodeBinder(config.compiled.$.schema)
|
|
76
|
-
const methodList = Array.from(new Set(config.methods.values()))
|
|
77
|
-
const identityMethods = methodList.filter((bound) => methodAuthPolicy(bound) !== 'public')
|
|
78
|
-
this.identities =
|
|
79
|
-
identityMethods.length > 0
|
|
80
|
-
? buildIdentityMap(config.compiled, identityMethods, config.privateKey, config.issuer)
|
|
81
|
-
: new Map()
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
async call(
|
|
85
|
-
path: Path | string,
|
|
86
|
-
credential: CredentialInput,
|
|
87
|
-
params: unknown,
|
|
88
|
-
self?: string,
|
|
89
|
-
): Promise<unknown> {
|
|
90
|
-
const result = await this.dispatch(path, credential, params, self)
|
|
91
|
-
switch (result.kind) {
|
|
92
|
-
case 'value':
|
|
93
|
-
return result.value
|
|
94
|
-
case 'stream':
|
|
95
|
-
return result.generator
|
|
96
|
-
case 'redirect':
|
|
97
|
-
throw new Error(`SdkDispatcher cannot redirect "${pathToString(path)}"`)
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
async stream(
|
|
102
|
-
path: Path | string,
|
|
103
|
-
credential: CredentialInput,
|
|
104
|
-
params: unknown,
|
|
105
|
-
self?: string,
|
|
106
|
-
): Promise<AsyncGenerator<unknown>> {
|
|
107
|
-
const result = await this.dispatch(path, credential, params, self)
|
|
108
|
-
if (result.kind !== 'stream') {
|
|
109
|
-
throw new Error(`Method "${pathToString(path)}" did not return an async generator`)
|
|
110
|
-
}
|
|
111
|
-
return result.generator
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* SDK dispatch never redirects — the SDK server IS the remote destination.
|
|
116
|
-
* Every call resolves locally; we just classify the return as value or stream
|
|
117
|
-
* and hand it back to the invocation host.
|
|
118
|
-
*/
|
|
119
|
-
async dispatch(
|
|
120
|
-
path: Path | string,
|
|
121
|
-
credential: CredentialInput,
|
|
122
|
-
params: unknown,
|
|
123
|
-
self?: string,
|
|
124
|
-
): Promise<DispatchResult> {
|
|
125
|
-
return executeInvocation(this, {
|
|
126
|
-
path,
|
|
127
|
-
credential,
|
|
128
|
-
params,
|
|
129
|
-
...(self === undefined ? {} : { self }),
|
|
130
|
-
})
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
async invoke(invocation: Invocation, caps: Capabilities): Promise<DispatchResult> {
|
|
134
|
-
const result = await this.run(invocation, caps)
|
|
135
|
-
return isAsyncGenerator(result)
|
|
136
|
-
? { kind: 'stream', generator: result }
|
|
137
|
-
: { kind: 'value', value: result }
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
as(credential: CredentialInput): AuthedKernelAPI {
|
|
141
|
-
return {
|
|
142
|
-
call: (path, params) => this.call(path, credential, params),
|
|
143
|
-
stream: (path, params) => this.stream(path, credential, params),
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
private async run(invocation: Invocation, caps: Capabilities): Promise<unknown> {
|
|
148
|
-
const { path, credential, params, self: selfRef } = invocation
|
|
149
|
-
const method = pathToString(path)
|
|
150
|
-
const bound = resolveMethod(this.methods, method)
|
|
151
|
-
if (!bound) throw new MethodNotFoundError(method)
|
|
152
|
-
|
|
153
|
-
const authPolicy: AuthPolicy = (bound.handler as { auth?: AuthPolicy }).auth ?? 'required'
|
|
154
|
-
const fnIdentity = this.identityFor(bound)
|
|
155
|
-
const { auth, kernel: rawKernel } = await resolveInboundAuth(credential, authPolicy, fnIdentity)
|
|
156
|
-
const kernel = rawKernel?.withSchema(this.binder.schema) ?? null
|
|
157
|
-
|
|
158
|
-
if (typeof params !== 'object' || params === null || Array.isArray(params)) {
|
|
159
|
-
throw new SdkValidationError([{ path: [], message: 'Params must be a plain object' }])
|
|
160
|
-
}
|
|
161
|
-
const validation = validateParams(bound.inputSchema, params)
|
|
162
|
-
if (!validation.ok) {
|
|
163
|
-
throw new SdkValidationError(validation.issues as SdkValidationError['issues'])
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// `undefined` (not `null`) for static methods — matches the `self` type on
|
|
167
|
-
// `RemoteContext` / `MethodImpl`, which is `undefined` for static methods.
|
|
168
|
-
let parsedSelf: ParsedSelf | undefined
|
|
169
|
-
if (!bound.isStatic) {
|
|
170
|
-
if (selfRef === undefined || selfRef === null || selfRef === '') {
|
|
171
|
-
throw new SdkValidationError(
|
|
172
|
-
[{ path: ['self'], message: 'Required for non-static method' }],
|
|
173
|
-
`"${bound.owner}.${bound.method}" is an instance method — it needs a target node. ` +
|
|
174
|
-
`Either call it via instance dispatch (e.g. "@<nodeId>::${bound.method}" ` +
|
|
175
|
-
`or "/path/to/node::${bound.method}"), or pass "self" as the fourth ` +
|
|
176
|
-
`dispatch argument (e.g. "@<nodeId>").`,
|
|
177
|
-
)
|
|
178
|
-
}
|
|
179
|
-
try {
|
|
180
|
-
parsedSelf = resolveSelf(String(selfRef))
|
|
181
|
-
} catch (err) {
|
|
182
|
-
// A malformed caller-supplied `self` is bad client input, not a server
|
|
183
|
-
// fault — surface it as VALIDATION_ERROR (422), matching the sibling
|
|
184
|
-
// missing-self branch above, instead of INTERNAL_ERROR (500).
|
|
185
|
-
throw new SdkValidationError(
|
|
186
|
-
[
|
|
187
|
-
{
|
|
188
|
-
path: ['self'],
|
|
189
|
-
message: err instanceof Error ? err.message : 'Failed to resolve self',
|
|
190
|
-
},
|
|
191
|
-
],
|
|
192
|
-
`Invalid "self" target "${selfRef}": ${err instanceof Error ? err.message : 'unparseable path'}`,
|
|
193
|
-
)
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
const handler = bound.handler as {
|
|
198
|
-
execute: (...args: unknown[]) => unknown
|
|
199
|
-
authorize?: (ctx: unknown) => void | Promise<void>
|
|
200
|
-
}
|
|
201
|
-
const handlerParams = validation.data
|
|
202
|
-
// Enrich the parsed self with the lazy `node()` accessor, bound to this
|
|
203
|
-
// request's kernel (null when the auth policy yields none — `node()` then
|
|
204
|
-
// rejects). Done here, not in `resolveSelf`, so the parse stays kernel-free.
|
|
205
|
-
const self = parsedSelf
|
|
206
|
-
? withBoundNode(parsedSelf, kernel, this.binder, bound.owner)
|
|
207
|
-
: undefined
|
|
208
|
-
const inboundIss = auth?.credential?.verified?.iss as string | undefined
|
|
209
|
-
const kernelUrl = kernel?.default ?? inboundIss
|
|
210
|
-
const caller =
|
|
211
|
-
auth && inboundIss
|
|
212
|
-
? {
|
|
213
|
-
iss: inboundIss,
|
|
214
|
-
url: kernelUrl ?? inboundIss,
|
|
215
|
-
}
|
|
216
|
-
: undefined
|
|
217
|
-
|
|
218
|
-
const ctx = {
|
|
219
|
-
params: handlerParams,
|
|
220
|
-
auth,
|
|
221
|
-
self,
|
|
222
|
-
deps: this.deps,
|
|
223
|
-
env: { url: this.url },
|
|
224
|
-
kernel,
|
|
225
|
-
...(caller !== undefined ? { caller } : {}),
|
|
226
|
-
domain: makeDomainAuthority(fnIdentity),
|
|
227
|
-
fn: makeFunctionContext(fnIdentity, this.deps, {
|
|
228
|
-
ref: bound.ref,
|
|
229
|
-
...(kernelUrl !== undefined ? { defaultKernelUrl: kernelUrl } : {}),
|
|
230
|
-
}),
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
if (handler.authorize) await runAuthorize(handler.authorize, ctx)
|
|
234
|
-
|
|
235
|
-
const result = await executeHandler({
|
|
236
|
-
handler,
|
|
237
|
-
ref: bound.ref,
|
|
238
|
-
...ctx,
|
|
239
|
-
step: createInlineStep({
|
|
240
|
-
scope: {
|
|
241
|
-
kind: 'method',
|
|
242
|
-
ref: bound.ref,
|
|
243
|
-
owner: bound.owner,
|
|
244
|
-
method: bound.method,
|
|
245
|
-
},
|
|
246
|
-
}),
|
|
247
|
-
defer: caps.defer,
|
|
248
|
-
sleep: caps.sleep,
|
|
249
|
-
})
|
|
250
|
-
|
|
251
|
-
if (isAsyncGenerator(result)) {
|
|
252
|
-
return validateOutputStream(bound, result)
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
return validateOutput(bound, result)
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
private identityFor(bound: BoundMethod<AnyRemoteHandler>): RemoteIdentityConfig {
|
|
259
|
-
const identity = this.identities.get(bound)
|
|
260
|
-
if (!identity) {
|
|
261
|
-
if (methodAuthPolicy(bound) === 'public') {
|
|
262
|
-
return { issuer: this.issuer, subject: bound.ref, privateKey: this.privateKey }
|
|
263
|
-
}
|
|
264
|
-
throw new Error(
|
|
265
|
-
`SdkDispatcher: no identity config for "${bound.owner}.${bound.method}" — ` +
|
|
266
|
-
`method is registered in the index but missing from the identity map.`,
|
|
267
|
-
)
|
|
268
|
-
}
|
|
269
|
-
return identity
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
function methodAuthPolicy(bound: BoundMethod<AnyRemoteHandler>): AuthPolicy {
|
|
274
|
-
return (bound.handler as { auth?: AuthPolicy }).auth ?? 'required'
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
function pathToString(path: string | { readonly raw: string }): string {
|
|
278
|
-
return typeof path === 'string' ? path : path.raw
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Validate a handler's output against `bound.outputSchema`, mirroring the
|
|
283
|
-
* kernel's dispatcher (`runtime/.../dispatcher.ts` + `events.ts`):
|
|
284
|
-
* - `binary` outputs skip validation (no schema applies).
|
|
285
|
-
* - async-generator outputs (`output: 'stream'`) are wrapped so each chunk
|
|
286
|
-
* is validated as it is yielded.
|
|
287
|
-
* - all other (`value`) outputs are validated once and returned parsed.
|
|
288
|
-
* Returns the synchronous shape (value or generator) so the caller's
|
|
289
|
-
* `dispatch()` can classify it without awaiting a stream to completion.
|
|
290
|
-
*/
|
|
291
|
-
function validateOutput(bound: BoundMethod<AnyRemoteHandler>, result: unknown): unknown {
|
|
292
|
-
if (bound.output === 'binary') return result
|
|
293
|
-
return validateChunk(bound, result)
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
async function* validateOutputStream(
|
|
297
|
-
bound: BoundMethod<AnyRemoteHandler>,
|
|
298
|
-
gen: AsyncGenerator<unknown>,
|
|
299
|
-
): AsyncGenerator<unknown> {
|
|
300
|
-
for await (const chunk of gen) {
|
|
301
|
-
yield validateChunk(bound, chunk)
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
/** Parse one output value against `bound.outputSchema` or throw a 500-class error. */
|
|
306
|
-
function validateChunk(bound: BoundMethod<AnyRemoteHandler>, value: unknown): unknown {
|
|
307
|
-
const out = validateResult(bound.outputSchema, value)
|
|
308
|
-
if (!out.ok) {
|
|
309
|
-
throw new SdkResultValidationError(out.issues as SdkResultValidationError['issues'], bound.ref)
|
|
310
|
-
}
|
|
311
|
-
return out.data
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
function isAsyncGenerator(value: unknown): value is AsyncGenerator<unknown> {
|
|
315
|
-
return (
|
|
316
|
-
value !== null &&
|
|
317
|
-
value !== undefined &&
|
|
318
|
-
typeof value === 'object' &&
|
|
319
|
-
Symbol.asyncIterator in value
|
|
320
|
-
)
|
|
321
|
-
}
|
package/src/dispatch/errors.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Errors thrown by the dispatch pipeline.
|
|
3
|
-
*
|
|
4
|
-
* Each implements `KernelErrorClassifiable` so `kernel-api/dispatch` can
|
|
5
|
-
* convert them into typed `KernelErrorPayload` values automatically.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { KernelErrorPayload, KernelErrorClassifiable } from '@astrale-os/kernel-api'
|
|
9
|
-
|
|
10
|
-
import { KERNEL_ERROR_CODES } from '@astrale-os/kernel-api'
|
|
11
|
-
|
|
12
|
-
/** A single Zod issue, normalized to the path/message the payload carries. */
|
|
13
|
-
type ValidationIssue = { path: (string | number)[]; message: string }
|
|
14
|
-
|
|
15
|
-
/** Shape Zod issues into the `data.errors` array of a `KernelErrorPayload`. */
|
|
16
|
-
function toPayloadErrors(issues: ValidationIssue[]): Array<{
|
|
17
|
-
path: (string | number)[]
|
|
18
|
-
code: 'INVALID'
|
|
19
|
-
message: string
|
|
20
|
-
}> {
|
|
21
|
-
return issues.map((i) => ({ path: i.path, code: 'INVALID', message: i.message }))
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class MethodNotFoundError extends Error implements KernelErrorClassifiable {
|
|
25
|
-
constructor(method: string) {
|
|
26
|
-
super(`Method not found: ${method}`)
|
|
27
|
-
this.name = 'MethodNotFoundError'
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
toKernelErrorPayload(): KernelErrorPayload {
|
|
31
|
-
return { code: KERNEL_ERROR_CODES.METHOD_NOT_FOUND, message: this.message }
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export class SdkValidationError extends Error implements KernelErrorClassifiable {
|
|
36
|
-
constructor(
|
|
37
|
-
readonly issues: ValidationIssue[],
|
|
38
|
-
message?: string,
|
|
39
|
-
) {
|
|
40
|
-
super(message ?? 'Invalid params')
|
|
41
|
-
this.name = 'SdkValidationError'
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
toKernelErrorPayload(): KernelErrorPayload {
|
|
45
|
-
return {
|
|
46
|
-
code: KERNEL_ERROR_CODES.VALIDATION_ERROR,
|
|
47
|
-
message: this.message,
|
|
48
|
-
data: { errors: toPayloadErrors(this.issues) },
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Thrown when a handler's return value (or a stream chunk) fails validation
|
|
55
|
-
* against its `outputSchema`. This is a server/handler fault — the author's
|
|
56
|
-
* code produced data that violates its own declared contract — so it maps to
|
|
57
|
-
* `INTERNAL_ERROR` (→ HTTP 500), NOT the `VALIDATION_ERROR` (422) used for
|
|
58
|
-
* bad caller input. Mirrors the kernel's `ResultValidationError`.
|
|
59
|
-
*/
|
|
60
|
-
export class SdkResultValidationError extends Error implements KernelErrorClassifiable {
|
|
61
|
-
constructor(
|
|
62
|
-
readonly issues: ValidationIssue[],
|
|
63
|
-
readonly ref?: string,
|
|
64
|
-
) {
|
|
65
|
-
super(`Function${ref ? ` "${ref}"` : ''} returned an invalid result`)
|
|
66
|
-
this.name = 'SdkResultValidationError'
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
toKernelErrorPayload(): KernelErrorPayload {
|
|
70
|
-
return {
|
|
71
|
-
code: KERNEL_ERROR_CODES.INTERNAL_ERROR,
|
|
72
|
-
message: this.message,
|
|
73
|
-
data: { errors: toPayloadErrors(this.issues) },
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Thrown by a `RemoteHandler.authorize` hook to deny a call.
|
|
80
|
-
*
|
|
81
|
-
* Wraps any error the hook throws — handlers can throw a plain `Error` and
|
|
82
|
-
* the dispatcher converts it. Already-typed `AuthorizationDeniedError`
|
|
83
|
-
* instances are passed through unchanged so callers can attach hints.
|
|
84
|
-
*/
|
|
85
|
-
export class AuthorizationDeniedError extends Error implements KernelErrorClassifiable {
|
|
86
|
-
constructor(message: string, cause?: unknown) {
|
|
87
|
-
super(message, { cause })
|
|
88
|
-
this.name = 'AuthorizationDeniedError'
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
toKernelErrorPayload(): KernelErrorPayload {
|
|
92
|
-
return { code: KERNEL_ERROR_CODES.PERMISSION_DENIED, message: this.message }
|
|
93
|
-
}
|
|
94
|
-
}
|
package/src/dispatch/execute.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Handler execution — pipeline step 4.
|
|
3
|
-
*
|
|
4
|
-
* Calls the resolved handler's `execute` with a fully assembled
|
|
5
|
-
* `RemoteContext`: validated params, auth context, optional bound self,
|
|
6
|
-
* typed deps, and a kernel `BoundClientSessionView`. The handler may return a
|
|
7
|
-
* value, a Promise, or an async generator (for `output: 'stream'`).
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import type { FnMap } from '@astrale-os/kernel-client'
|
|
11
|
-
import type { BoundClientSessionView } from '@astrale-os/kernel-client/session'
|
|
12
|
-
import type { AuthContext } from '@astrale-os/kernel-core'
|
|
13
|
-
import type { Defer, Sleep } from '@astrale-os/kernel-server'
|
|
14
|
-
|
|
15
|
-
import type { FunctionContextApi } from '../auth/function-context.js'
|
|
16
|
-
import type { DomainAuthority } from '../auth/issuer-mint.js'
|
|
17
|
-
import type { CallerContext, RemoteEnv } from '../method/context.js'
|
|
18
|
-
import type { Step } from '../step/index.js'
|
|
19
|
-
import type { SelfResult, TypedSelf } from './self.js'
|
|
20
|
-
|
|
21
|
-
// oxlint-disable-next-line no-explicit-any
|
|
22
|
-
type HandlerFn = (...args: any[]) => any
|
|
23
|
-
|
|
24
|
-
export type ExecuteParams = {
|
|
25
|
-
/** Handler may omit `execute` when authored as a stub (spec-only binding). */
|
|
26
|
-
handler: { execute?: HandlerFn }
|
|
27
|
-
/** Namespaced ref of the dispatched method — names the offending method in the
|
|
28
|
-
* stub-leak diagnostic below (the dispatcher passes `bound.ref`). */
|
|
29
|
-
ref?: string
|
|
30
|
-
params: Record<string, unknown>
|
|
31
|
-
auth: AuthContext | null
|
|
32
|
-
/** Untyped fallback ({@link withNode}) or the rich typed self ({@link withBoundNode}). */
|
|
33
|
-
self: SelfResult | TypedSelf<unknown> | undefined
|
|
34
|
-
deps: unknown
|
|
35
|
-
env: RemoteEnv
|
|
36
|
-
kernel: BoundClientSessionView<FnMap> | null
|
|
37
|
-
caller?: CallerContext
|
|
38
|
-
/** Mint seam for identities this domain issues. */
|
|
39
|
-
domain: DomainAuthority
|
|
40
|
-
fn: FunctionContextApi
|
|
41
|
-
step: Step
|
|
42
|
-
defer: Defer
|
|
43
|
-
sleep: Sleep
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export async function executeHandler(ctx: ExecuteParams): Promise<unknown> {
|
|
47
|
-
if (typeof ctx.handler.execute !== 'function') {
|
|
48
|
-
throw new Error(
|
|
49
|
-
`executeHandler: handler${ctx.ref ? ` for "${ctx.ref}"` : ''} has no \`execute\` body — ` +
|
|
50
|
-
`this is a binding stub that should have been resolved to a remote redirect upstream.`,
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
return ctx.handler.execute({
|
|
54
|
-
params: ctx.params,
|
|
55
|
-
auth: ctx.auth,
|
|
56
|
-
self: ctx.self,
|
|
57
|
-
deps: ctx.deps,
|
|
58
|
-
env: ctx.env,
|
|
59
|
-
kernel: ctx.kernel,
|
|
60
|
-
...(ctx.caller !== undefined ? { caller: ctx.caller } : {}),
|
|
61
|
-
domain: ctx.domain,
|
|
62
|
-
fn: ctx.fn,
|
|
63
|
-
step: ctx.step,
|
|
64
|
-
defer: ctx.defer,
|
|
65
|
-
sleep: ctx.sleep,
|
|
66
|
-
})
|
|
67
|
-
}
|
package/src/dispatch/identity.ts
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-callable identity — dispatcher runtime + install-time wiring.
|
|
3
|
-
*
|
|
4
|
-
* Three flavors of callable get an identity per the install-time identity
|
|
5
|
-
* binding, each keyed by its mount-stable semantic sub: Methods on
|
|
6
|
-
* classes/interfaces (sub = MethodPath), standalone-function MEMBERS
|
|
7
|
-
* (sub = FunctionPath `/:<origin>:function.<slug>`), and view MEMBERS
|
|
8
|
-
* (sub = ViewPath `/:<origin>:view.<slug>`).
|
|
9
|
-
*
|
|
10
|
-
* At server startup the method dispatcher and the View / RemoteFunction
|
|
11
|
-
* route mounter pre-compute, for every materialized callable, the
|
|
12
|
-
* `RemoteIdentityConfig` they sign outbound kernel calls with. The kernel
|
|
13
|
-
* then matches an existing function identity instead of provisioning a
|
|
14
|
-
* generic one.
|
|
15
|
-
*
|
|
16
|
-
* **Single source of truth:** every helper here is a thin lens over the
|
|
17
|
-
* canonical `resolveCallables` from `@astrale-os/kernel-core/domain`. The
|
|
18
|
-
* kernel validates install subs against the SAME function — drift = 0
|
|
19
|
-
* by construction. This closes the previous SDK-side gap where
|
|
20
|
-
* `collectMethodPaths` filtered to `own|override` and silently dropped
|
|
21
|
-
* `sealed`/`default` interface methods (which DO materialize as nodes).
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
import type { BoundMethod, CompiledDomain } from '@astrale-os/kernel-core/domain'
|
|
25
|
-
|
|
26
|
-
import { resolveCallables } from '@astrale-os/kernel-core/domain'
|
|
27
|
-
|
|
28
|
-
import type { RemoteIdentityConfig } from '../auth/identity.js'
|
|
29
|
-
import type { AnyRemoteHandler } from '../method/single.js'
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* For each materialized method node, emit its `MethodPath` (semantic,
|
|
33
|
-
* layout-independent) keyed by the method's namespaced ref. Used to
|
|
34
|
-
* build the install `subs` claim and to look up runtime per-method
|
|
35
|
-
* subjects in `buildIdentityMap`.
|
|
36
|
-
*
|
|
37
|
-
* Includes every method node the kernel materializes — class own/override
|
|
38
|
-
* AND interface own (sealed/default/override). Inherited (non-overriding)
|
|
39
|
-
* class methods reuse the interface's node via a `method_of` edge and
|
|
40
|
-
* are correctly absent here.
|
|
41
|
-
*/
|
|
42
|
-
export function collectMethodPaths(compiled: CompiledDomain): Record<string, string> {
|
|
43
|
-
const out: Record<string, string> = {}
|
|
44
|
-
for (const c of resolveCallables(compiled)) {
|
|
45
|
-
if (c.kind === 'method') out[c.ref] = c.sub
|
|
46
|
-
}
|
|
47
|
-
return out
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/** `{ views, remoteFunctions }` buckets keyed by slug — the shared shape
|
|
51
|
-
* for every per-aux-callable map (paths, identity configs). */
|
|
52
|
-
export type AuxBuckets<T> = {
|
|
53
|
-
views: Record<string, T>
|
|
54
|
-
remoteFunctions: Record<string, T>
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* slug → mount-stable semantic `sub` for each aux callable MEMBER node:
|
|
59
|
-
* - standalone-function members (`kind: 'function'`) → FunctionPath;
|
|
60
|
-
* - view members (`kind: 'view'`) → ViewPath (plus any hand-authored/legacy
|
|
61
|
-
* core `View` nodes, `kind: 'core'` className `View`, keyed by their AbsolutePath).
|
|
62
|
-
* The value is `resolveCallables(...).sub` — the exact subject the kernel stamped on
|
|
63
|
-
* the node at install, so an outbound-signing worker matches its own function identity.
|
|
64
|
-
*/
|
|
65
|
-
export type AuxIdentityPaths = AuxBuckets<string>
|
|
66
|
-
|
|
67
|
-
export function collectAuxIdentityPaths(compiled: CompiledDomain): AuxIdentityPaths {
|
|
68
|
-
const views: Record<string, string> = {}
|
|
69
|
-
const remoteFunctions: Record<string, string> = {}
|
|
70
|
-
for (const c of resolveCallables(compiled)) {
|
|
71
|
-
if (!c.slug) continue
|
|
72
|
-
if (c.kind === 'function') {
|
|
73
|
-
remoteFunctions[c.slug] = c.sub
|
|
74
|
-
} else if (c.kind === 'view' || (c.kind === 'core' && c.className === 'View')) {
|
|
75
|
-
views[c.slug] = c.sub
|
|
76
|
-
}
|
|
77
|
-
// Methods (`kind: 'method'`) get their identity via `collectMethodPaths`.
|
|
78
|
-
}
|
|
79
|
-
return { views, remoteFunctions }
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* slug → `RemoteIdentityConfig` for each auto-materialized View /
|
|
84
|
-
* RemoteFunction. Built once at server startup; consumed by
|
|
85
|
-
* `mountAuxiliaryRoutes` so each handler signs outbound `kernel.call(...)`
|
|
86
|
-
* with its own `sub` (its FunctionPath/ViewPath). Mirrors `buildIdentityMap`.
|
|
87
|
-
*/
|
|
88
|
-
export type AuxIdentityMap = AuxBuckets<RemoteIdentityConfig>
|
|
89
|
-
|
|
90
|
-
export function buildAuxIdentityMap(
|
|
91
|
-
compiled: CompiledDomain,
|
|
92
|
-
privateKey: JsonWebKey,
|
|
93
|
-
issuer: string,
|
|
94
|
-
): AuxIdentityMap {
|
|
95
|
-
const paths = collectAuxIdentityPaths(compiled)
|
|
96
|
-
const views: Record<string, RemoteIdentityConfig> = {}
|
|
97
|
-
for (const [slug, subject] of Object.entries(paths.views)) {
|
|
98
|
-
views[slug] = { issuer, subject, privateKey }
|
|
99
|
-
}
|
|
100
|
-
const remoteFunctions: Record<string, RemoteIdentityConfig> = {}
|
|
101
|
-
for (const [slug, subject] of Object.entries(paths.remoteFunctions)) {
|
|
102
|
-
remoteFunctions[slug] = { issuer, subject, privateKey }
|
|
103
|
-
}
|
|
104
|
-
return { views, remoteFunctions }
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Pre-resolve per-method identity configs. Lookup is by BoundMethod instance,
|
|
109
|
-
* so the dispatcher pays O(1) per call instead of re-constructing the config.
|
|
110
|
-
*
|
|
111
|
-
* `iss` = the worker's own **serving URL** (`issuer` arg, e.g.
|
|
112
|
-
* `https://crm.test.com`) — its cryptographic identity, DECOUPLED from the
|
|
113
|
-
* domain's addressing `origin` (a graph slug). The kernel stamps the same
|
|
114
|
-
* value on each function node at install (it pins `iss` to the URL it fetched
|
|
115
|
-
* the domain at) and verifies inbound credentials against that issuer's JWKS
|
|
116
|
-
* (OIDC discovery). The function `sub` stays the origin-addressed MethodPath —
|
|
117
|
-
* `sub` = which function, `iss` = who signs.
|
|
118
|
-
*/
|
|
119
|
-
export function buildIdentityMap(
|
|
120
|
-
compiled: CompiledDomain,
|
|
121
|
-
methods: BoundMethod<AnyRemoteHandler>[],
|
|
122
|
-
privateKey: JsonWebKey,
|
|
123
|
-
issuer: string,
|
|
124
|
-
): Map<BoundMethod<AnyRemoteHandler>, RemoteIdentityConfig> {
|
|
125
|
-
const paths = collectMethodPaths(compiled)
|
|
126
|
-
const out = new Map<BoundMethod<AnyRemoteHandler>, RemoteIdentityConfig>()
|
|
127
|
-
for (const bound of methods) {
|
|
128
|
-
const subject = paths[bound.ref]
|
|
129
|
-
if (!subject) {
|
|
130
|
-
// Under the "drift = 0" invariant every dispatched method's ref is a key
|
|
131
|
-
// in `paths`. A miss means an install/index drift — fail loudly at boot
|
|
132
|
-
// rather than signing with `bound.ref` (a namespaced ref, NOT a
|
|
133
|
-
// MethodPath sub), which would silently fail kernel identity matching at
|
|
134
|
-
// call time. Mirrors `identityFor` / `requireAuxIdentity`.
|
|
135
|
-
throw new Error(
|
|
136
|
-
`buildIdentityMap: method "${bound.ref}" is in the dispatch index but absent ` +
|
|
137
|
-
`from resolveCallables(compiled) — no identity subject to sign with.`,
|
|
138
|
-
)
|
|
139
|
-
}
|
|
140
|
-
out.set(bound, { issuer, subject, privateKey })
|
|
141
|
-
}
|
|
142
|
-
return out
|
|
143
|
-
}
|
package/src/dispatch/index.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { SdkDispatcher, type SdkDispatcherConfig } from './dispatcher.js'
|
|
2
|
-
export { resolveMethod, buildMethodIndex, type MethodIndex } from './resolve.js'
|
|
3
|
-
export {
|
|
4
|
-
validateParams,
|
|
5
|
-
validateResult,
|
|
6
|
-
type ValidationResult,
|
|
7
|
-
type ResultValidationResult,
|
|
8
|
-
} from './validate.js'
|
|
9
|
-
export { resolveSelf, withBoundNode, type SelfResult, type TypedSelf } from './self.js'
|
|
10
|
-
export { executeHandler, type ExecuteParams } from './execute.js'
|
|
11
|
-
export {
|
|
12
|
-
AuthorizationDeniedError,
|
|
13
|
-
MethodNotFoundError,
|
|
14
|
-
SdkValidationError,
|
|
15
|
-
SdkResultValidationError,
|
|
16
|
-
} from './errors.js'
|