@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
package/src/server/config.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `RemoteServerConfig` — input shape for `createRemoteServer`.
|
|
3
|
-
*
|
|
4
|
-
* Identity is per-function: `iss` = the worker's serving URL (`config.url`),
|
|
5
|
-
* `sub` = the function path, signed on each dispatch. No single `subject`.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { CorsConfig, WsAdapter } from '@astrale-os/kernel-server'
|
|
9
|
-
import type { Context } from 'hono'
|
|
10
|
-
import type { Hono } from 'hono'
|
|
11
|
-
|
|
12
|
-
import type { RemoteDomain } from '../domain/define.js'
|
|
13
|
-
|
|
14
|
-
export type RemoteServerConfig<TDeps> = {
|
|
15
|
-
/** Domain produced by `defineRemoteDomain(...)`. */
|
|
16
|
-
domain: RemoteDomain
|
|
17
|
-
/** Dependency container passed to every handler as `ctx.deps`. */
|
|
18
|
-
deps: TDeps
|
|
19
|
-
/**
|
|
20
|
-
* Server URL — the serving location AND the worker's JWT issuer identity
|
|
21
|
-
* (`iss`), decoupled from the addressing `origin` slug.
|
|
22
|
-
*
|
|
23
|
-
* The server's public key is published at `<url>/.well-known/jwks.json`
|
|
24
|
-
* so downstream verifiers can validate credentials signed by this server.
|
|
25
|
-
*/
|
|
26
|
-
url: string
|
|
27
|
-
/** Private key used to sign outbound credentials. Public form is exposed via JWKS. */
|
|
28
|
-
privateKey: JsonWebKey
|
|
29
|
-
/** Allowed transports. `'http'` is mandatory. `'ws'` is opt-in. Defaults to `['http']`. */
|
|
30
|
-
transports?: readonly ('http' | 'ws')[]
|
|
31
|
-
/**
|
|
32
|
-
* Runtime-specific WS adapter (from `hono/bun`, `@hono/node-ws`, `hono/deno`).
|
|
33
|
-
* Required when `transports` includes `'ws'`.
|
|
34
|
-
*/
|
|
35
|
-
ws?: WsAdapter
|
|
36
|
-
/** CORS configuration. Defaults to `{ origin: '*' }`. */
|
|
37
|
-
cors?: CorsConfig
|
|
38
|
-
/** Optional health endpoint path (defaults to `/health`; `false` disables). */
|
|
39
|
-
health?: string | false
|
|
40
|
-
/** Pre-existing Hono app to attach to (for nesting the SDK under a parent router). */
|
|
41
|
-
app?: Hono
|
|
42
|
-
/**
|
|
43
|
-
* Provenance stamped onto the auto-mounted `/meta` endpoint. Typically
|
|
44
|
-
* injected at build time by the bundler so downstream tooling can detect
|
|
45
|
-
* version drift between deployed server and expected schema.
|
|
46
|
-
*/
|
|
47
|
-
meta?: {
|
|
48
|
-
sdkCommit?: string
|
|
49
|
-
schemaHash?: string
|
|
50
|
-
domainName?: string
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Typed colon-path to a callable the installing kernel calls ONCE as the
|
|
54
|
-
* system identity, immediately after the domain installs. Use it to seed
|
|
55
|
-
* nodes and self-grant. Must be a semantic domain path under this domain's
|
|
56
|
-
* own origin (`/:origin:class.X:seed` / `/:origin:interface.Ops:seed`) — the
|
|
57
|
-
* kernel's origin guard refuses absolute tree paths, which cannot prove
|
|
58
|
-
* their origin from the string alone. Returned verbatim in the install
|
|
59
|
-
* bundle (a routing hint — the signed `graph_hash` already constrains what
|
|
60
|
-
* the callable can be).
|
|
61
|
-
*
|
|
62
|
-
* Example: `/:crm.acme.dev:class.Note:seed`
|
|
63
|
-
*/
|
|
64
|
-
postInstall?: string
|
|
65
|
-
/**
|
|
66
|
-
* Cross-domain dependencies by origin. Returned in the install bundle; the
|
|
67
|
-
* kernel verifies each origin is already present on the instance before
|
|
68
|
-
* installing, and refuses with a clear error if one is missing.
|
|
69
|
-
*/
|
|
70
|
-
requires?: readonly string[]
|
|
71
|
-
/**
|
|
72
|
-
* Optional private install hook. Throw to deny the install request.
|
|
73
|
-
* The public URL install contract still receives no caller kernel
|
|
74
|
-
* credential; private installs use the bearer token only.
|
|
75
|
-
*/
|
|
76
|
-
install?: {
|
|
77
|
-
authorize?: (args: {
|
|
78
|
-
c: Context
|
|
79
|
-
token?: string
|
|
80
|
-
kernelIssuer: string
|
|
81
|
-
nonce: string
|
|
82
|
-
deps: TDeps
|
|
83
|
-
}) => void | Promise<void>
|
|
84
|
-
}
|
|
85
|
-
}
|
package/src/server/create.ts
DELETED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Remote-domain server entry point. The worker serving URL is the issuer; each
|
|
3
|
-
* method/view/function signs with its own semantic subject.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { JwksKeys } from '@astrale-os/kernel-server'
|
|
7
|
-
|
|
8
|
-
import { deriveAllowedAlgorithms } from '@astrale-os/kernel-core'
|
|
9
|
-
import {
|
|
10
|
-
collectFunctionSubs,
|
|
11
|
-
domainInstallRequestSchema,
|
|
12
|
-
hashInstallGraph,
|
|
13
|
-
} from '@astrale-os/kernel-core/domain'
|
|
14
|
-
import { createKernelApp } from '@astrale-os/kernel-server'
|
|
15
|
-
import { Hono } from 'hono'
|
|
16
|
-
import { importJWK, SignJWT } from 'jose'
|
|
17
|
-
|
|
18
|
-
import type { ViewDef } from '../define/index.js'
|
|
19
|
-
import type { RemoteServerConfig } from './config.js'
|
|
20
|
-
import type { RemoteServer, RemoteServerHandle } from './handle.js'
|
|
21
|
-
|
|
22
|
-
import { MetaSchema } from '../deploy/meta.js'
|
|
23
|
-
import { SdkDispatcher } from '../dispatch/dispatcher.js'
|
|
24
|
-
import { buildAuxIdentityMap } from '../dispatch/identity.js'
|
|
25
|
-
import { buildMethodIndex } from '../dispatch/resolve.js'
|
|
26
|
-
import { buildInstallGraph, buildInstallGraphHash } from '../domain/build-spec.js'
|
|
27
|
-
import { toSdkContract } from '../domain/contract.js'
|
|
28
|
-
import { materializeRemoteDomain } from '../domain/define.js'
|
|
29
|
-
import { mountAuxiliaryRoutes } from './auxiliary-routes.js'
|
|
30
|
-
import { derivePublicJwk } from './jwks.js'
|
|
31
|
-
import { canonicalizeServingUrl } from './serving-url.js'
|
|
32
|
-
|
|
33
|
-
export function createRemoteServer<TDeps>(config: RemoteServerConfig<TDeps>): RemoteServer {
|
|
34
|
-
const methods = buildMethodIndex(config.domain.methods)
|
|
35
|
-
// Canonical serving URL drives signing, JWKS, /meta, and install credentials.
|
|
36
|
-
const iss = canonicalizeServingUrl(config.url)
|
|
37
|
-
|
|
38
|
-
// Stamp aux bindings against the same URL used as issuer.
|
|
39
|
-
const { compiled, auxiliary } = materializeRemoteDomain(config.domain, iss)
|
|
40
|
-
|
|
41
|
-
const dispatcher = new SdkDispatcher<TDeps>({
|
|
42
|
-
compiled,
|
|
43
|
-
methods,
|
|
44
|
-
deps: config.deps,
|
|
45
|
-
privateKey: config.privateKey,
|
|
46
|
-
issuer: iss,
|
|
47
|
-
// The canonicalized serving URL, NOT the raw config.url: `ctx.env.url` is
|
|
48
|
-
// documented as the worker's `iss` identity, so the two must be one value.
|
|
49
|
-
url: iss,
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
const publicJwk = derivePublicJwk(config.privateKey)
|
|
53
|
-
const jwks: JwksKeys = {
|
|
54
|
-
issuer: iss,
|
|
55
|
-
loadOwnKeys: async () => [publicJwk],
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Normal /meta schemaHash is the deterministic install-graph hash; explicit overrides win.
|
|
59
|
-
let cachedSchemaHash: Promise<string> | null = null
|
|
60
|
-
const resolveSchemaHash = (): Promise<string> =>
|
|
61
|
-
config.meta?.schemaHash !== undefined
|
|
62
|
-
? Promise.resolve(config.meta.schemaHash)
|
|
63
|
-
: (cachedSchemaHash ??= buildInstallGraphHash(config.domain, iss))
|
|
64
|
-
|
|
65
|
-
// Register `/meta` on the host app before `createKernelApp` mounts its
|
|
66
|
-
// catch-all routes so the verbatim path wins.
|
|
67
|
-
const hostApp = config.app ?? new Hono()
|
|
68
|
-
const metaBase = {
|
|
69
|
-
iss,
|
|
70
|
-
sdkCommit: config.meta?.sdkCommit,
|
|
71
|
-
domainName: config.meta?.domainName ?? compiled.$.origin,
|
|
72
|
-
...(config.domain.manifest ? { manifest: config.domain.manifest } : {}),
|
|
73
|
-
}
|
|
74
|
-
hostApp.get('/meta', async (c) =>
|
|
75
|
-
c.json(MetaSchema.parse({ ...metaBase, schemaHash: await resolveSchemaHash() })),
|
|
76
|
-
)
|
|
77
|
-
hostApp.post('/_astrale/install-domain', async (c) => {
|
|
78
|
-
const parsed = domainInstallRequestSchema.safeParse(await c.req.json().catch(() => null))
|
|
79
|
-
if (!parsed.success) {
|
|
80
|
-
return c.json({ error: 'Invalid install request', issues: parsed.error.issues }, 400)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const token = bearerToken(c.req.header('authorization'))
|
|
84
|
-
try {
|
|
85
|
-
await config.install?.authorize?.({
|
|
86
|
-
c,
|
|
87
|
-
...(token ? { token } : {}),
|
|
88
|
-
kernelIssuer: parsed.data.kernelIssuer,
|
|
89
|
-
nonce: parsed.data.nonce,
|
|
90
|
-
deps: config.deps,
|
|
91
|
-
})
|
|
92
|
-
} catch (err) {
|
|
93
|
-
return c.json({ error: 'Install denied', message: (err as Error).message }, 403)
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// The signed graph is built for this serving URL; the kernel verifies it as-is.
|
|
97
|
-
const graph = buildInstallGraph(config.domain, iss)
|
|
98
|
-
const graphHash = await hashInstallGraph(graph)
|
|
99
|
-
const origin = compiled.$.origin
|
|
100
|
-
// Signed claims and bundle fields must agree exactly.
|
|
101
|
-
const bundleExtras = {
|
|
102
|
-
...(config.postInstall ? { postInstall: config.postInstall } : {}),
|
|
103
|
-
...(config.requires && config.requires.length > 0 ? { requires: config.requires } : {}),
|
|
104
|
-
}
|
|
105
|
-
// Install credential issuer is the serving URL the kernel fetched.
|
|
106
|
-
const credential = await signInstallCredential({
|
|
107
|
-
privateKey: config.privateKey,
|
|
108
|
-
issuer: iss,
|
|
109
|
-
audience: parsed.data.kernelIssuer,
|
|
110
|
-
nonce: parsed.data.nonce,
|
|
111
|
-
graphHash,
|
|
112
|
-
subs: collectFunctionSubs(compiled),
|
|
113
|
-
...bundleExtras,
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
return c.json({
|
|
117
|
-
origin,
|
|
118
|
-
graph,
|
|
119
|
-
identity: { credential },
|
|
120
|
-
...bundleExtras,
|
|
121
|
-
})
|
|
122
|
-
})
|
|
123
|
-
|
|
124
|
-
// Resolved once and shared between the kernel envelope (createKernelApp) and
|
|
125
|
-
// the aux routes (mountAuxiliaryRoutes) so both honor the same policy.
|
|
126
|
-
const cors = config.cors ?? { origin: '*' }
|
|
127
|
-
|
|
128
|
-
// Aux routes mount before the kernel catch-all and sign with their member subjects.
|
|
129
|
-
if (auxiliary) {
|
|
130
|
-
const auxIdentities = buildAuxIdentityMap(compiled, config.privateKey, iss)
|
|
131
|
-
mountAuxiliaryRoutes<TDeps>({
|
|
132
|
-
app: hostApp,
|
|
133
|
-
url: auxiliary.url,
|
|
134
|
-
// oxlint-disable-next-line no-explicit-any
|
|
135
|
-
views: config.domain.views as Record<string, ViewDef<TDeps>> | undefined,
|
|
136
|
-
viewBindings: auxiliary.viewBindings,
|
|
137
|
-
remoteFunctions: config.domain.remoteFunctions,
|
|
138
|
-
remoteFunctionBindings: auxiliary.remoteFunctionBindings,
|
|
139
|
-
deps: config.deps,
|
|
140
|
-
identities: auxIdentities,
|
|
141
|
-
cors,
|
|
142
|
-
})
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
const { app } = createKernelApp({
|
|
146
|
-
dispatcher,
|
|
147
|
-
domain: config.domain.methods.map(toSdkContract),
|
|
148
|
-
host: { url: config.url },
|
|
149
|
-
jwks,
|
|
150
|
-
transports: config.transports,
|
|
151
|
-
cors,
|
|
152
|
-
health: config.health,
|
|
153
|
-
app: hostApp,
|
|
154
|
-
ws: config.ws,
|
|
155
|
-
})
|
|
156
|
-
|
|
157
|
-
return {
|
|
158
|
-
app,
|
|
159
|
-
// Expose the canonical issuer, not the raw env URL, for graph identity stamping.
|
|
160
|
-
iss,
|
|
161
|
-
async start(port?: number): Promise<RemoteServerHandle> {
|
|
162
|
-
const nodeStartModule = './start'
|
|
163
|
-
const { startNodeServer } = await import(nodeStartModule)
|
|
164
|
-
return startNodeServer(app, port)
|
|
165
|
-
},
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function bearerToken(header: string | undefined): string | undefined {
|
|
170
|
-
if (!header) return undefined
|
|
171
|
-
const match = /^Bearer\s+(.+)$/i.exec(header.trim())
|
|
172
|
-
return match?.[1]
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
async function signInstallCredential(args: {
|
|
176
|
-
privateKey: JsonWebKey
|
|
177
|
-
issuer: string
|
|
178
|
-
audience: string
|
|
179
|
-
nonce: string
|
|
180
|
-
graphHash: string
|
|
181
|
-
subs: string[]
|
|
182
|
-
postInstall?: string
|
|
183
|
-
requires?: readonly string[]
|
|
184
|
-
}): Promise<string> {
|
|
185
|
-
const alg = deriveAllowedAlgorithms(args.privateKey)[0]
|
|
186
|
-
if (!alg) {
|
|
187
|
-
throw new Error(
|
|
188
|
-
`createRemoteServer: cannot derive install signing algorithm from JWK (kty=${args.privateKey.kty}).`,
|
|
189
|
-
)
|
|
190
|
-
}
|
|
191
|
-
const kid = (args.privateKey as unknown as Record<string, unknown>).kid
|
|
192
|
-
const header = typeof kid === 'string' ? { alg, kid } : { alg }
|
|
193
|
-
const key = await importJWK(args.privateKey, alg)
|
|
194
|
-
|
|
195
|
-
// postInstall/requires are signed, not just copied into the bundle.
|
|
196
|
-
return new SignJWT({
|
|
197
|
-
subs: args.subs,
|
|
198
|
-
nonce: args.nonce,
|
|
199
|
-
graph_hash: args.graphHash,
|
|
200
|
-
...(args.postInstall ? { postInstall: args.postInstall } : {}),
|
|
201
|
-
...(args.requires ? { requires: args.requires } : {}),
|
|
202
|
-
})
|
|
203
|
-
.setProtectedHeader(header)
|
|
204
|
-
.setIssuer(args.issuer)
|
|
205
|
-
.setSubject(args.issuer)
|
|
206
|
-
.setAudience(args.audience)
|
|
207
|
-
.setIssuedAt()
|
|
208
|
-
.setExpirationTime('10m')
|
|
209
|
-
.sign(key)
|
|
210
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `domainWorkerEntry` — the one-call worker entry for a standalone domain.
|
|
3
|
-
*
|
|
4
|
-
* It folds the three steps every hand-rolled worker used to wire by hand —
|
|
5
|
-
* compile the runtime domain (`defineRemoteDomain`), build the server
|
|
6
|
-
* (`createRemoteServer`), and wrap it in the shared fetch plumbing
|
|
7
|
-
* (`createWorkerEntry`) — into a single declaration. The author passes the raw
|
|
8
|
-
* modules (`schema` / `methods` / `views` / `functions`) plus the identity and
|
|
9
|
-
* deploy bits; the helper does the rest. This is what the cloudflare adapter's
|
|
10
|
-
* codegen emits, and the recommended surface for a hand-rolled worker.
|
|
11
|
-
*
|
|
12
|
-
* Drop down to `createWorkerEntry` + `defineRemoteDomain` (from
|
|
13
|
-
* `@astrale-os/sdk/domain`) only when the worker needs something this config
|
|
14
|
-
* can't express — e.g. a serving-URL-dependent domain build (views stamped with
|
|
15
|
-
* the live url) or a globally-injected signing key resolved per request.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import type { Core, Schema } from '@astrale-os/kernel-dsl'
|
|
19
|
-
import type { Hono } from 'hono'
|
|
20
|
-
|
|
21
|
-
import type { DomainManifest } from '../config/define-domain.js'
|
|
22
|
-
import type { AnyRemoteFunctionDef, ViewDef } from '../define/index.js'
|
|
23
|
-
import type { SchemaMethodsImpl } from '../method/index.js'
|
|
24
|
-
import type { RemoteServerConfig } from './config.js'
|
|
25
|
-
import type { WorkerEntry, WorkerEntryConfig } from './worker-entry.js'
|
|
26
|
-
|
|
27
|
-
import { defineRemoteDomain } from '../domain/index.js'
|
|
28
|
-
import { createWorkerEntry } from './worker-entry.js'
|
|
29
|
-
|
|
30
|
-
export interface DomainWorkerEntryConfig<S extends Schema, TEnv, TDeps> {
|
|
31
|
-
/** The domain schema. */
|
|
32
|
-
schema: S
|
|
33
|
-
/** Method implementations, typed against `schema` under `TDeps`. */
|
|
34
|
-
methods: SchemaMethodsImpl<S, TDeps>
|
|
35
|
-
/** Optional Core override (extra genesis nodes / wiring). */
|
|
36
|
-
core?: Core<S>
|
|
37
|
-
/** Views (iframe-mountable UIs) keyed by slug. */
|
|
38
|
-
views?: Record<string, ViewDef<TDeps>>
|
|
39
|
-
/** Standalone Functions (callables not bound to a class) keyed by slug. */
|
|
40
|
-
functions?: Record<string, AnyRemoteFunctionDef>
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* The worker's signing key (its `iss` identity material). A static JWK, or a
|
|
44
|
-
* resolver from `env` for keys injected as a secret / shared globally.
|
|
45
|
-
*/
|
|
46
|
-
privateKey: JsonWebKey | ((env: TEnv) => JsonWebKey)
|
|
47
|
-
/** Cross-domain deps by origin — verified present at install. */
|
|
48
|
-
requires?: readonly string[]
|
|
49
|
-
/** Typed colon-path the kernel calls once as __SYSTEM__ after install. */
|
|
50
|
-
postInstall?: string
|
|
51
|
-
/**
|
|
52
|
-
* Physical tree path for the Domain node (absolute, e.g. `/domains/acme`);
|
|
53
|
-
* default `/domains/<origin>`. Rides in on the `...domain` spread from
|
|
54
|
-
* `defineDomain`; declared here so it is captured (not silently dropped like a
|
|
55
|
-
* spread prop absent from this type) and forwarded to `defineRemoteDomain`.
|
|
56
|
-
*/
|
|
57
|
-
path?: string
|
|
58
|
-
/** Provenance stamped on `/meta`. */
|
|
59
|
-
meta?: RemoteServerConfig<TDeps>['meta']
|
|
60
|
-
/** Presentation metadata (logo / initial view) stamped on `/meta`. */
|
|
61
|
-
manifest?: DomainManifest
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Map the worker `env` to the handler dependency container. Defaults to
|
|
65
|
-
* passing `env` straight through (the common case where handlers read
|
|
66
|
-
* bindings directly).
|
|
67
|
-
*/
|
|
68
|
-
deps?: (env: TEnv, url: string) => TDeps
|
|
69
|
-
/** Optional pre-built host Hono app (CORS / logging / extra routes). */
|
|
70
|
-
app?: (env: TEnv) => Hono
|
|
71
|
-
|
|
72
|
-
// ── createWorkerEntry plumbing (passed through verbatim) ──────────────────
|
|
73
|
-
resolveUrl?: WorkerEntryConfig<TEnv>['resolveUrl']
|
|
74
|
-
selfBinding?: WorkerEntryConfig<TEnv>['selfBinding']
|
|
75
|
-
routeSubrequest?: WorkerEntryConfig<TEnv>['routeSubrequest']
|
|
76
|
-
before?: WorkerEntryConfig<TEnv>['before']
|
|
77
|
-
rewriteRequest?: WorkerEntryConfig<TEnv>['rewriteRequest']
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Curried so `TDeps` can be fixed explicitly (it types `methods`/`views`) while
|
|
82
|
-
* `S` is inferred from `schema` — mirroring `defineRemoteDomain`. The common
|
|
83
|
-
* case `domainWorkerEntry<Env>()({ … })` leaves `TDeps = TEnv` (handlers read
|
|
84
|
-
* the env directly); pass both — `domainWorkerEntry<Env, Deps>()` — when the
|
|
85
|
-
* handler deps differ from the worker bindings and a `deps` mapper is supplied.
|
|
86
|
-
*/
|
|
87
|
-
export function domainWorkerEntry<TEnv, TDeps = TEnv>() {
|
|
88
|
-
return function <S extends Schema>(
|
|
89
|
-
config: DomainWorkerEntryConfig<S, TEnv, TDeps>,
|
|
90
|
-
): WorkerEntry<TEnv> {
|
|
91
|
-
const domain = defineRemoteDomain<TDeps>()({
|
|
92
|
-
schema: config.schema,
|
|
93
|
-
methods: config.methods,
|
|
94
|
-
...(config.core ? { core: config.core } : {}),
|
|
95
|
-
...(config.views ? { views: config.views } : {}),
|
|
96
|
-
...(config.functions ? { remoteFunctions: config.functions } : {}),
|
|
97
|
-
...(config.manifest ? { manifest: config.manifest } : {}),
|
|
98
|
-
...(config.path ? { path: config.path } : {}),
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
return createWorkerEntry<TEnv>({
|
|
102
|
-
...(config.resolveUrl ? { resolveUrl: config.resolveUrl } : {}),
|
|
103
|
-
...(config.selfBinding ? { selfBinding: config.selfBinding } : {}),
|
|
104
|
-
...(config.routeSubrequest ? { routeSubrequest: config.routeSubrequest } : {}),
|
|
105
|
-
...(config.before ? { before: config.before } : {}),
|
|
106
|
-
...(config.rewriteRequest ? { rewriteRequest: config.rewriteRequest } : {}),
|
|
107
|
-
// `createWorkerEntry` conflates the worker env and the handler deps into a
|
|
108
|
-
// single type param; we keep them distinct in the public config and bridge
|
|
109
|
-
// here. The runtime deps (and the methods typed against them) are correct;
|
|
110
|
-
// only this assembly is cast.
|
|
111
|
-
build: (url, env) =>
|
|
112
|
-
({
|
|
113
|
-
domain,
|
|
114
|
-
deps: config.deps ? config.deps(env, url) : (env as unknown as TDeps),
|
|
115
|
-
url,
|
|
116
|
-
privateKey:
|
|
117
|
-
typeof config.privateKey === 'function' ? config.privateKey(env) : config.privateKey,
|
|
118
|
-
...(config.requires && config.requires.length > 0 ? { requires: config.requires } : {}),
|
|
119
|
-
...(config.postInstall ? { postInstall: config.postInstall } : {}),
|
|
120
|
-
...(config.meta ? { meta: config.meta } : {}),
|
|
121
|
-
...(config.app ? { app: config.app(env) } : {}),
|
|
122
|
-
}) as unknown as RemoteServerConfig<TEnv>,
|
|
123
|
-
})
|
|
124
|
-
}
|
|
125
|
-
}
|
package/src/server/handle.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `RemoteServer` and `RemoteServerHandle` — output shapes for the SDK server.
|
|
3
|
-
*
|
|
4
|
-
* `RemoteServer` is what `createRemoteServer` returns: the assembled Hono
|
|
5
|
-
* app plus a Node convenience helper. `RemoteServerHandle` is what `start()`
|
|
6
|
-
* resolves to: the bound port and a `close()` function for graceful shutdown.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import type { Hono } from 'hono'
|
|
10
|
-
|
|
11
|
-
export type RemoteServer = {
|
|
12
|
-
/**
|
|
13
|
-
* The assembled Hono app. Use `app.fetch` for any runtime
|
|
14
|
-
* (Bun, Deno, Cloudflare Workers, or Node via `@hono/node-server`).
|
|
15
|
-
*/
|
|
16
|
-
app: Hono
|
|
17
|
-
/**
|
|
18
|
-
* The worker's canonical serving URL — its `iss` identity (full URL, trailing
|
|
19
|
-
* slash stripped, base path preserved). The single value the dispatcher signs
|
|
20
|
-
* with and the kernel pins. Read it to seed `Identity.iss` on graph nodes so
|
|
21
|
-
* the seeded value matches the signing issuer (never re-derive from a raw env).
|
|
22
|
-
*/
|
|
23
|
-
iss: string
|
|
24
|
-
/**
|
|
25
|
-
* Convenience helper: start a Node HTTP server on the given port using
|
|
26
|
-
* `@hono/node-server` (loaded via dynamic import). For other runtimes,
|
|
27
|
-
* use `app.fetch` directly.
|
|
28
|
-
*/
|
|
29
|
-
start: (port?: number) => Promise<RemoteServerHandle>
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export type RemoteServerHandle = {
|
|
33
|
-
/** The port the server is listening on (resolved even if `port: 0` was requested). */
|
|
34
|
-
port: number
|
|
35
|
-
/** Stop the server and release the port. */
|
|
36
|
-
close: () => Promise<void>
|
|
37
|
-
}
|
package/src/server/index.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { createRemoteServer } from './create.js'
|
|
2
|
-
export type { RemoteServerConfig } from './config.js'
|
|
3
|
-
export type { RemoteServer, RemoteServerHandle } from './handle.js'
|
|
4
|
-
export { derivePublicJwk } from './jwks.js'
|
|
5
|
-
export { requireEnv } from './require-env.js'
|
|
6
|
-
export { canonicalizeServingUrl } from './serving-url.js'
|
|
7
|
-
export { assets, createAppWorkerEntry, createWorkerEntry } from './worker-entry.js'
|
|
8
|
-
export type {
|
|
9
|
-
AppWorkerEntryConfig,
|
|
10
|
-
Fetcher,
|
|
11
|
-
WorkerApp,
|
|
12
|
-
WorkerEntry,
|
|
13
|
-
WorkerEntryConfig,
|
|
14
|
-
} from './worker-entry.js'
|
|
15
|
-
export { domainWorkerEntry } from './domain-entry.js'
|
|
16
|
-
export type { DomainWorkerEntryConfig } from './domain-entry.js'
|
|
17
|
-
export { serviceWorkerEntry } from './service-entry.js'
|
|
18
|
-
export type { ServiceWorkerEntryConfig, ServiceWorkerIdentityEnv } from './service-entry.js'
|
|
19
|
-
export { startNodeServer } from './start.js'
|
package/src/server/jwks.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Derive a public JWK from a private one.
|
|
3
|
-
*
|
|
4
|
-
* Strips the private components for both EC keys (drops `d`) and RSA keys
|
|
5
|
-
* (drops `d`, `p`, `q`, `dp`, `dq`, `qi`, and `oth` — the additional-primes
|
|
6
|
-
* array on multi-prime RSA keys). The result is safe to publish at
|
|
7
|
-
* `<url>/.well-known/jwks.json` so downstream verifiers can validate
|
|
8
|
-
* signatures the server produced.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export function derivePublicJwk(privateKey: JsonWebKey): Record<string, unknown> {
|
|
12
|
-
// oxlint-disable-next-line no-unused-vars
|
|
13
|
-
const { d, p, q, dp, dq, qi, oth, ...publicJwk } = privateKey as unknown as Record<
|
|
14
|
-
string,
|
|
15
|
-
unknown
|
|
16
|
-
>
|
|
17
|
-
return publicJwk
|
|
18
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Read a string-typed env var (process.env on Node, the Worker `env` binding
|
|
3
|
-
* on Cloudflare) and throw a clear error if it is missing or empty.
|
|
4
|
-
*
|
|
5
|
-
* Use this for **identity-bearing** values (issuer, baseDomain, audience,
|
|
6
|
-
* worker URL) where a guessed default silently mints wrong JWTs or bakes
|
|
7
|
-
* wrong refs into persisted artifacts. The conventional `?? 'literal'`
|
|
8
|
-
* fallback is the anti-pattern this exists to replace.
|
|
9
|
-
*
|
|
10
|
-
* In local dev these live in each domain worker's `worker/.dev.vars` (read
|
|
11
|
-
* natively by `wrangler dev`), so this throw never fires in a properly-prepared
|
|
12
|
-
* dev environment — only when wiring is genuinely missing.
|
|
13
|
-
*/
|
|
14
|
-
export function requireEnv(env: unknown, name: string, hint?: string): string {
|
|
15
|
-
const v = (env as Record<string, unknown> | null | undefined)?.[name]
|
|
16
|
-
if (typeof v === 'string' && v.length > 0) return v
|
|
17
|
-
const help = hint ? ` (${hint})` : ''
|
|
18
|
-
throw new Error(`Missing required env var: ${name}${help}`)
|
|
19
|
-
}
|