@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
package/src/cli/spec.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build a diagnostic spec (wire graph + schema hash) from the project's
|
|
3
|
-
* `defineDomain` definition. This mirrors what the codegen'd worker assembles —
|
|
4
|
-
* but only for inspection / `/meta` provenance. The live install bundle is
|
|
5
|
-
* always produced by the worker at request time, so a failure here is non-fatal
|
|
6
|
-
* for dev/deploy (the CLI logs and continues) and fatal only for
|
|
7
|
-
* `astrale-domain build`, where the spec IS the product.
|
|
8
|
-
*
|
|
9
|
-
* The modules (`schema` / `methods` / `views` / `functions`) come straight off
|
|
10
|
-
* the definition — the SAME values the author wired into `defineDomain`, which
|
|
11
|
-
* the adapter codegen also assembles. One source, no second filesystem probe to
|
|
12
|
-
* drift from it.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import type { Schema } from '@astrale-os/kernel-dsl'
|
|
16
|
-
|
|
17
|
-
import { hashInstallGraph } from '@astrale-os/kernel-core/domain'
|
|
18
|
-
|
|
19
|
-
import type { DomainDefinition } from '../config/define-domain.js'
|
|
20
|
-
import type { RemoteDomainConfig } from '../domain/index.js'
|
|
21
|
-
|
|
22
|
-
import { buildInstallGraph, defineRemoteDomain } from '../domain/index.js'
|
|
23
|
-
|
|
24
|
-
export async function buildProjectSpec(
|
|
25
|
-
def: DomainDefinition,
|
|
26
|
-
url: string,
|
|
27
|
-
): Promise<{ wire: Record<string, unknown>; schemaHash: string }> {
|
|
28
|
-
// The definition's module values are untyped against `RemoteDomainConfig` by
|
|
29
|
-
// nature (deps/schema generics erased on `DomainDefinition`); funnel them
|
|
30
|
-
// through ONE cast into the config shape `defineRemoteDomain` validates.
|
|
31
|
-
const config = {
|
|
32
|
-
schema: def.schema,
|
|
33
|
-
methods: def.methods,
|
|
34
|
-
...(def.core ? { core: def.core } : {}),
|
|
35
|
-
...(def.views ? { views: def.views } : {}),
|
|
36
|
-
...(def.functions ? { remoteFunctions: def.functions } : {}),
|
|
37
|
-
...(def.path ? { path: def.path } : {}),
|
|
38
|
-
} as RemoteDomainConfig<Schema, unknown>
|
|
39
|
-
|
|
40
|
-
const domain = defineRemoteDomain<unknown>()(config)
|
|
41
|
-
const wire = buildInstallGraph(domain, url)
|
|
42
|
-
const schemaHash = await hashInstallGraph(wire)
|
|
43
|
-
return { wire: wire as unknown as Record<string, unknown>, schemaHash }
|
|
44
|
-
}
|
package/src/config/adapter.ts
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The deployment-adapter contract.
|
|
3
|
-
*
|
|
4
|
-
* A deployment target = one npm package implementing `DomainAdapter<Params>`.
|
|
5
|
-
* The adapter is GENERIC over its own `Params` so envs AND provider settings
|
|
6
|
-
* stay 100% adapter-specific (a Cloudflare adapter's `{ route, secrets }` is
|
|
7
|
-
* nothing like a Node adapter's `{ port }`). The CLI resolves
|
|
8
|
-
* `envs[<env>] → Params` via `adapter.params(env)` and then drives the adapter
|
|
9
|
-
* with the resolved params — install of the resulting URL and the `requires`
|
|
10
|
-
* check are generic and live in the CLI, never in the adapter.
|
|
11
|
-
*
|
|
12
|
-
* The central guarantee: `watch()` and `deploy()` both return a `url` — that's
|
|
13
|
-
* what the CLI prints, what `astrale domain install <url>` consumes, and
|
|
14
|
-
* the worker's `iss` identity. The URL is an OUTPUT of watch/deploy; nothing
|
|
15
|
-
* in the contract asks an adapter to predict it ahead of time.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Generic, target-independent domain metadata the CLI hands every adapter so
|
|
20
|
-
* it can codegen the worker entry. (Extends the bare `WatchCtx`/`DeployCtx` of
|
|
21
|
-
* the spec with the fields a real codegen needs.)
|
|
22
|
-
*/
|
|
23
|
-
export interface DomainInfo {
|
|
24
|
-
/**
|
|
25
|
-
* The domain's addressing name — the graph slug it mounts under (e.g.
|
|
26
|
-
* `'crm.acme.dev'`). NOT the cryptographic identity: the JWT `iss` is the
|
|
27
|
-
* worker's serving URL, pinned by the kernel at install time.
|
|
28
|
-
*/
|
|
29
|
-
origin: string
|
|
30
|
-
/** Cross-domain deps by origin — verified at install (CLI/kernel), not here. */
|
|
31
|
-
requires: readonly string[]
|
|
32
|
-
/** Optional Astrale Path called by the kernel after install (as __SYSTEM__). */
|
|
33
|
-
postInstall?: string
|
|
34
|
-
/**
|
|
35
|
-
* Whether the domain declares Views / standalone Functions — read from the
|
|
36
|
-
* `defineDomain` definition, NOT probed from the filesystem. The adapter
|
|
37
|
-
* codegen imports the corresponding module only when true.
|
|
38
|
-
*/
|
|
39
|
-
hasViews: boolean
|
|
40
|
-
hasFunctions: boolean
|
|
41
|
-
/**
|
|
42
|
-
* Views whose binding is backed by a worker-relative SPA mount. This is domain
|
|
43
|
-
* contract metadata (`defineView({ mount })`), not a frontend source folder:
|
|
44
|
-
* adapters decide, per env, which client assets serve these mounts.
|
|
45
|
-
*/
|
|
46
|
-
mountedViews: Array<{ slug: string; mount: string }>
|
|
47
|
-
/**
|
|
48
|
-
* Whether the domain declares a `deps` mapper (`defineDomain({ deps })`).
|
|
49
|
-
* When true the adapter codegen imports it from the domain's fixed `deps`
|
|
50
|
-
* module and passes it to the worker entry; when false the worker passes the
|
|
51
|
-
* raw env straight through as `ctx.deps`. Read from the definition, never
|
|
52
|
-
* probed from the filesystem.
|
|
53
|
-
*/
|
|
54
|
-
hasDeps: boolean
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface WatchCtx {
|
|
58
|
-
/** Absolute path to the domain project root. */
|
|
59
|
-
projectDir: string
|
|
60
|
-
/** Absolute path where the CLI writes the diagnostic `spec.json`. */
|
|
61
|
-
specPath: string
|
|
62
|
-
/** Flat secret map loaded from the env's `secrets` file — injected locally in dev. */
|
|
63
|
-
secrets: Record<string, string>
|
|
64
|
-
/** Domain metadata for codegen. */
|
|
65
|
-
domain: DomainInfo
|
|
66
|
-
/** The env key being watched (e.g. 'dev'). */
|
|
67
|
-
env: string
|
|
68
|
-
/** Invoked by the adapter on every hot-reload so the CLI can re-log. */
|
|
69
|
-
onReload(): void
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface DeployCtx {
|
|
73
|
-
projectDir: string
|
|
74
|
-
specPath: string
|
|
75
|
-
/** Flat secret map loaded from the env's `secrets` file (gitignored). */
|
|
76
|
-
secrets: Record<string, string>
|
|
77
|
-
domain: DomainInfo
|
|
78
|
-
/** The env key being deployed (e.g. 'dev' | 'prod' | 'canary'). */
|
|
79
|
-
env: string
|
|
80
|
-
/**
|
|
81
|
-
* Build the expected install-graph hash for a concrete serving URL from the
|
|
82
|
-
* current domain definition. Adapters that must verify live drift during
|
|
83
|
-
* deploy should use this instead of reading `.astrale/spec.json`, which is a
|
|
84
|
-
* post-deploy diagnostic artifact and may be stale.
|
|
85
|
-
*/
|
|
86
|
-
schemaHashForUrl?(url: string): Promise<string | undefined>
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/** A running local watch — exposes its URL and a stop handle. */
|
|
90
|
-
export interface WatchHandle {
|
|
91
|
-
/** Local URL the worker is reachable at (e.g. http://localhost:8787). */
|
|
92
|
-
url: string
|
|
93
|
-
stop(): Promise<void>
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/** A completed deploy — the authoritative public URL. */
|
|
97
|
-
export interface DeployResult {
|
|
98
|
-
url: string
|
|
99
|
-
/**
|
|
100
|
-
* Adapter-specific next-steps block printed INSTEAD of the CLI's default
|
|
101
|
-
* "install on an instance" footer — managed deploys already installed the
|
|
102
|
-
* domain, so the default hint is wrong there. Pre-indented plain lines.
|
|
103
|
-
*/
|
|
104
|
-
nextSteps?: string
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export interface DomainAdapter<Params> {
|
|
108
|
-
/** 'astrale-host' | 'cloudflare' | 'node' | … */
|
|
109
|
-
name: string
|
|
110
|
-
|
|
111
|
-
/** Resolve an env key to this adapter's typed params. Throws on unknown key. */
|
|
112
|
-
params(env: string): Params
|
|
113
|
-
|
|
114
|
-
/** Local + hot-reload (watch) → controllable handle. Orthogonal to env. */
|
|
115
|
-
watch(params: Params, ctx: WatchCtx): Promise<WatchHandle>
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Optional: re-run codegen for an ALREADY-RUNNING `watch` after
|
|
119
|
-
* `astrale.config.ts` changed — same shape as `watch` but it must NOT spawn
|
|
120
|
-
* anything: it only rewrites the generated files, and the running dev server
|
|
121
|
-
* (which watches them, e.g. `wrangler dev` on its `--config`) picks them up.
|
|
122
|
-
* Adapters without it fall back to "restart to apply config changes".
|
|
123
|
-
*/
|
|
124
|
-
regenerate?(params: Params, ctx: WatchCtx): Promise<void>
|
|
125
|
-
|
|
126
|
-
/** Build + bundle + ship (the adapter owns ITS build) → authoritative URL. */
|
|
127
|
-
deploy(params: Params, ctx: DeployCtx): Promise<DeployResult>
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Optional: the path (relative to the project root) of the gitignored secrets
|
|
131
|
-
* file for these params. The CLI loads it and passes the parsed map as
|
|
132
|
-
* `ctx.secrets` — keeping secret-file loading generic while the path stays
|
|
133
|
-
* provider-typed. Return `undefined` for "no secrets file".
|
|
134
|
-
*/
|
|
135
|
-
secretsFile?(params: Params): string | undefined
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Spec passed to `defineAdapter` — identical to `DomainAdapter` minus the
|
|
140
|
-
* `params(env)` resolver, which the helper attaches from `envs`. Custom adapter
|
|
141
|
-
* authors use this so they never re-implement env→params resolution.
|
|
142
|
-
*/
|
|
143
|
-
export interface AdapterSpec<Params> {
|
|
144
|
-
name: string
|
|
145
|
-
/** The provider-typed env map (`{ dev: {...}, prod: {...}, … }`). */
|
|
146
|
-
envs: Record<string, Params>
|
|
147
|
-
watch(params: Params, ctx: WatchCtx): Promise<WatchHandle>
|
|
148
|
-
regenerate?(params: Params, ctx: WatchCtx): Promise<void>
|
|
149
|
-
deploy(params: Params, ctx: DeployCtx): Promise<DeployResult>
|
|
150
|
-
secretsFile?(params: Params): string | undefined
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Build a `DomainAdapter` from a spec + an env map, attaching a `params(env)`
|
|
155
|
-
* resolver that throws a clear error on an unknown key (listing the valid ones).
|
|
156
|
-
*/
|
|
157
|
-
export function defineAdapter<Params>(spec: AdapterSpec<Params>): DomainAdapter<Params> {
|
|
158
|
-
const keys = Object.keys(spec.envs)
|
|
159
|
-
return {
|
|
160
|
-
name: spec.name,
|
|
161
|
-
params(env: string): Params {
|
|
162
|
-
const params = spec.envs[env]
|
|
163
|
-
if (params === undefined) {
|
|
164
|
-
const known = keys.length ? keys.join(', ') : '(none)'
|
|
165
|
-
throw new Error(
|
|
166
|
-
`Adapter "${spec.name}": unknown env "${env}". Known envs: ${known}. ` +
|
|
167
|
-
`Add it to the adapter's env map in astrale.config.ts.`,
|
|
168
|
-
)
|
|
169
|
-
}
|
|
170
|
-
return params
|
|
171
|
-
},
|
|
172
|
-
watch: spec.watch,
|
|
173
|
-
deploy: spec.deploy,
|
|
174
|
-
...(spec.regenerate ? { regenerate: spec.regenerate } : {}),
|
|
175
|
-
...(spec.secretsFile ? { secretsFile: spec.secretsFile } : {}),
|
|
176
|
-
}
|
|
177
|
-
}
|
|
@@ -1,354 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `defineDomain` — the WORKER-SAFE definition of a domain: what the domain *is*
|
|
3
|
-
* (its `schema`, `methods`, `deps`, `views`, standalone `functions`) plus its
|
|
4
|
-
* addressing identity (`origin`, `requires`, `postInstall`). It
|
|
5
|
-
* deliberately carries NO deployment adapter — the adapter (`cloudflare(...)`,
|
|
6
|
-
* `astrale(...)`) is node-only code (filesystem, wrangler) that must never enter
|
|
7
|
-
* the worker bundle. The author wires this in a `domain.ts` the generated worker
|
|
8
|
-
* imports directly, then attaches the adapter separately with `deploy(domain,
|
|
9
|
-
* adapter)` in `astrale.config.ts` (see `./deploy`).
|
|
10
|
-
*
|
|
11
|
-
* The modules are wired EXPLICITLY here — imported and passed in — not
|
|
12
|
-
* discovered from magic folder names. A renamed or mistyped module is a compile
|
|
13
|
-
* error at this call site, never a silently-missing worker route. The adapter
|
|
14
|
-
* reads this one definition for domain-side codegen; frontend source folders
|
|
15
|
-
* live in adapter env config. `defineDomain` itself builds no server and boots
|
|
16
|
-
* no kernel — it validates and packages the declaration.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import type { Core, Schema } from '@astrale-os/kernel-dsl'
|
|
20
|
-
|
|
21
|
-
import { DomainOrigin } from '@astrale-os/kernel-core/domain'
|
|
22
|
-
|
|
23
|
-
import type { AnyRemoteFunctionDef, ViewDef } from '../define/index.js'
|
|
24
|
-
import type { SchemaMethodsImpl } from '../method/index.js'
|
|
25
|
-
|
|
26
|
-
// A registry holds views / functions of every deps + param/result shape. Their
|
|
27
|
-
// per-entry typing is enforced at the `defineView` / `defineRemoteFunction` call
|
|
28
|
-
// site; here they're held loosely and, crucially, kept OUT of `TDeps` inference
|
|
29
|
-
// — so `TDeps` is fixed by `methods` alone (the authoritative deps source) and a
|
|
30
|
-
// view authored with the default `unknown` deps can't fight `methods`'s `Env`.
|
|
31
|
-
// oxlint-disable-next-line no-explicit-any
|
|
32
|
-
type AnyViewDef = ViewDef<any>
|
|
33
|
-
// The function bag is the canonical, variance-correct one from `../define` (it
|
|
34
|
-
// must accept functions of any auth policy — see the note there). Aliased to
|
|
35
|
-
// keep the local usages below terse.
|
|
36
|
-
type AnyFunctionDef = AnyRemoteFunctionDef
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Optional presentation metadata for the domain, served verbatim on the
|
|
40
|
-
* worker's `/meta` endpoint (see `../deploy/meta`) so a host UI can brand a
|
|
41
|
-
* freshly-installed domain. Both the block and every field are optional.
|
|
42
|
-
*/
|
|
43
|
-
export interface DomainManifest {
|
|
44
|
-
/** Domain logo — an inline SVG string or a `data:` URL (no extra validation). */
|
|
45
|
-
logo?: string
|
|
46
|
-
/**
|
|
47
|
-
* Slug of one of THIS domain's own views to open first — the domain's entry
|
|
48
|
-
* surface. This is the SERVED form: a plain slug, stamped verbatim onto
|
|
49
|
-
* `/meta`. Authors don't write the slug directly — they pass the view OBJECT
|
|
50
|
-
* to `defineDomain` (see {@link DomainManifestConfig.entrypoint}), which
|
|
51
|
-
* resolves it to this slug. Pinned at app install to the `View` node at
|
|
52
|
-
* `/<origin>/views/<slug>` via the app's `entrypoint` edge.
|
|
53
|
-
*/
|
|
54
|
-
entrypoint?: string
|
|
55
|
-
/**
|
|
56
|
-
* The ROLES this domain declares — named capability identities a workspace
|
|
57
|
-
* registers when an app for this domain is installed, then assigns to users
|
|
58
|
-
* (`default: true` roles are auto-assigned to the installing user). The
|
|
59
|
-
* domain itself grants each role its resource permissions (typically in its
|
|
60
|
-
* `postInstall`); declaring a role here only names it. Slugs are validated
|
|
61
|
-
* (lowercase slug charset, unique) at `defineDomain`.
|
|
62
|
-
*/
|
|
63
|
-
roles?: readonly DomainRoleDecl[]
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/** One declared role of the domain (see {@link DomainManifest.roles}). */
|
|
67
|
-
export interface DomainRoleDecl {
|
|
68
|
-
/** Stable role slug, unique within the domain (e.g. `"editor"`). */
|
|
69
|
-
slug: string
|
|
70
|
-
/** Display name; defaults to the slug. */
|
|
71
|
-
name?: string
|
|
72
|
-
/** What holding this role means — shown in permission UIs. */
|
|
73
|
-
description?: string
|
|
74
|
-
/** Auto-assign this role to the user installing an app for this domain. */
|
|
75
|
-
default?: boolean
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* The author-facing manifest accepted by {@link defineDomain} — identical to the
|
|
80
|
-
* served {@link DomainManifest} except `entrypoint` is the view OBJECT (a value
|
|
81
|
-
* of the `views` map) rather than its slug. `defineDomain` resolves it to the
|
|
82
|
-
* slug by identity, so a renamed or dropped view is a compile error at the
|
|
83
|
-
* reference site, never a stale string (the same guarantee `postInstall` gives
|
|
84
|
-
* for functions).
|
|
85
|
-
*/
|
|
86
|
-
export interface DomainManifestConfig extends Omit<DomainManifest, 'entrypoint'> {
|
|
87
|
-
/**
|
|
88
|
-
* The view to open first — the domain's entry surface. Pass the view OBJECT
|
|
89
|
-
* from this domain's own `views` map (e.g. `entrypoint: views.welcome`).
|
|
90
|
-
* Resolved to its slug here and served as {@link DomainManifest.entrypoint}.
|
|
91
|
-
*/
|
|
92
|
-
entrypoint?: AnyViewDef
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface DefineDomainConfig<S extends Schema, TDeps, TEnv = unknown> {
|
|
96
|
-
/** The domain schema (from `schema/`). Its `.domain` seeds the default origin. */
|
|
97
|
-
schema: S
|
|
98
|
-
/**
|
|
99
|
-
* The domain's method implementations (from `methods/`), one per schema
|
|
100
|
-
* method. Typed against `schema` — an unimplemented or misnamed method is a
|
|
101
|
-
* compile error here.
|
|
102
|
-
*/
|
|
103
|
-
methods: SchemaMethodsImpl<S, TDeps>
|
|
104
|
-
/** Declarative genesis nodes and edges materialized with the domain at install time. */
|
|
105
|
-
core?: Core<S>
|
|
106
|
-
/**
|
|
107
|
-
* Map the worker `env` to the handler dependency container (`ctx.deps`).
|
|
108
|
-
* Run ONCE per cold isolate per serving URL (the built app is cached), NOT
|
|
109
|
-
* per request — so it's the place to construct ports/clients once instead of
|
|
110
|
-
* re-deriving them in every handler. Its return type IS `TDeps`: type it the
|
|
111
|
-
* shape your `methods` read (e.g. `(env) => ({ platform: buildPlatform(env) })`)
|
|
112
|
-
* and the methods get the rich container, not raw env. The same value reaches
|
|
113
|
-
* view/function handlers and the `install.authorize` hook.
|
|
114
|
-
*
|
|
115
|
-
* Omit for the common case: `env` is passed straight through (`TDeps = TEnv`),
|
|
116
|
-
* so existing domains are unaffected. The function itself is imported by the
|
|
117
|
-
* generated worker from a fixed `deps` module, mirroring `methods` — wire it
|
|
118
|
-
* here so the type check binds `env → TDeps` and the adapter knows to emit it.
|
|
119
|
-
*/
|
|
120
|
-
deps?: (env: TEnv, url: string) => TDeps
|
|
121
|
-
/**
|
|
122
|
-
* The domain's Views (iframe-mountable UIs), keyed by slug. Omit when the
|
|
123
|
-
* domain has none. Each becomes a `View` node + a worker route.
|
|
124
|
-
*/
|
|
125
|
-
views?: Record<string, AnyViewDef>
|
|
126
|
-
/**
|
|
127
|
-
* The domain's standalone Functions (callables not bound to a class), keyed
|
|
128
|
-
* by slug. Omit when the domain has none.
|
|
129
|
-
*/
|
|
130
|
-
functions?: Record<string, AnyFunctionDef>
|
|
131
|
-
/**
|
|
132
|
-
* Optional presentation metadata stamped onto `/meta`. When `manifest.entrypoint`
|
|
133
|
-
* is set it MUST be a view from this domain's own `views` map — passed as the
|
|
134
|
-
* OBJECT (`entrypoint: views.welcome`), resolved to its slug here. A view that
|
|
135
|
-
* isn't in `views` is a compile error at the reference site, and the
|
|
136
|
-
* resolution throws loudly if it's somehow absent — so a typo can never dangle
|
|
137
|
-
* to a NOT_FOUND view path at install.
|
|
138
|
-
*/
|
|
139
|
-
manifest?: DomainManifestConfig
|
|
140
|
-
/**
|
|
141
|
-
* The domain's **addressing name** (the graph slug it mounts under, e.g.
|
|
142
|
-
* `'crm.acme.dev'`). Defaults to `schema.domain`. Must be a name, never a
|
|
143
|
-
* URL. This is **NOT** the cryptographic identity: the `iss` is the worker's
|
|
144
|
-
* **serving URL**, pinned by the kernel to the URL it fetched the domain at
|
|
145
|
-
* during install (and verified against that URL's JWKS). `origin` is a free
|
|
146
|
-
* addressing label, only required to be unique in the graph.
|
|
147
|
-
*/
|
|
148
|
-
origin?: string
|
|
149
|
-
/** Cross-domain deps, by origin. Verified present on the instance at install. */
|
|
150
|
-
requires?: readonly string[]
|
|
151
|
-
/**
|
|
152
|
-
* Where the Domain node physically lives in the graph TREE — an absolute tree
|
|
153
|
-
* path whose LAST segment is the origin (e.g. `'/domains/crm.acme.dev'`).
|
|
154
|
-
* Optional; defaults to `/domains/<origin>`. This moves ONLY the physical
|
|
155
|
-
* `has_parent` position: the domain's `installed_in` edge and EVERY typed
|
|
156
|
-
* address (`/:<origin>`, `/:<origin>:Class`, …) stay ROOT-mounted, so
|
|
157
|
-
* addressing is unchanged. A platform domain that must stay top-level sets its
|
|
158
|
-
* own origin path (e.g. `'/shell.astrale.ai'`).
|
|
159
|
-
*/
|
|
160
|
-
path?: string
|
|
161
|
-
/**
|
|
162
|
-
* The function the kernel runs once after install, as __SYSTEM__ — where the
|
|
163
|
-
* domain seeds itself / posts its own grants. Reference it from the `functions`
|
|
164
|
-
* map: `postInstall: functions.seed`. The SDK derives its path by identity, so a
|
|
165
|
-
* typo or a renamed key is a compile error here, never a stale string. It is
|
|
166
|
-
* always a standalone function (a domain bootstrap belongs to the domain, not to
|
|
167
|
-
* a class) under THIS domain — you never write the origin, and the kernel
|
|
168
|
-
* resolves it relative to wherever the domain is installed.
|
|
169
|
-
*/
|
|
170
|
-
postInstall?: AnyFunctionDef
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export interface DomainDefinition {
|
|
174
|
-
schema: Schema
|
|
175
|
-
// oxlint-disable-next-line no-explicit-any -- erased at the consumption casts in spec/codegen
|
|
176
|
-
methods: SchemaMethodsImpl<Schema, any>
|
|
177
|
-
/** Declarative genesis nodes and edges, preserved through codegen and diagnostic builds. */
|
|
178
|
-
core?: Core<Schema>
|
|
179
|
-
/**
|
|
180
|
-
* env → deps mapper, when the author supplied one. Held loosely (the worker
|
|
181
|
-
* imports the real function from its own `deps` module); the CLI reads only
|
|
182
|
-
* its PRESENCE to set `DomainInfo.hasDeps`, the codegen signal.
|
|
183
|
-
*/
|
|
184
|
-
// oxlint-disable-next-line no-explicit-any -- presence is what the CLI consumes; the typed binding lives at the call site
|
|
185
|
-
deps?: (env: any, url: string) => any
|
|
186
|
-
views?: Record<string, ViewDef>
|
|
187
|
-
functions?: Record<string, AnyFunctionDef>
|
|
188
|
-
/** Presentation metadata for `/meta`, validated at definition time. */
|
|
189
|
-
manifest?: DomainManifest
|
|
190
|
-
origin: string
|
|
191
|
-
requires: readonly string[]
|
|
192
|
-
postInstall?: string
|
|
193
|
-
/** Physical tree path for the Domain node; default `/domains/<origin>`. */
|
|
194
|
-
path?: string
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export function defineDomain<S extends Schema, TDeps, TEnv = unknown>(
|
|
198
|
-
config: DefineDomainConfig<S, TDeps, TEnv>,
|
|
199
|
-
): DomainDefinition {
|
|
200
|
-
const rawOrigin = config.origin ?? schemaDomain(config.schema)
|
|
201
|
-
if (!rawOrigin) {
|
|
202
|
-
throw new Error(
|
|
203
|
-
'defineDomain: could not resolve `origin`. Set it explicitly or give the ' +
|
|
204
|
-
'schema a base domain (`defineSchema("crm.acme.dev", …)`).',
|
|
205
|
-
)
|
|
206
|
-
}
|
|
207
|
-
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(rawOrigin)) {
|
|
208
|
-
throw new Error(
|
|
209
|
-
`defineDomain: \`origin\` must be a stable name (e.g. "crm.acme.dev"), not a URL — got "${rawOrigin}". ` +
|
|
210
|
-
'The deployment URL is an output of deploy, not the identity.',
|
|
211
|
-
)
|
|
212
|
-
}
|
|
213
|
-
// Canonicalize + validate the origin exactly as the kernel does (lowercased,
|
|
214
|
-
// FQDN-like, matches DOMAIN_ORIGIN_RE). Failing HERE gives a clear authoring-
|
|
215
|
-
// time error instead of a cryptic failure deep in codegen / install, and makes
|
|
216
|
-
// `origin` the same lowercased form the kernel stores graph nodes under.
|
|
217
|
-
let origin: string
|
|
218
|
-
try {
|
|
219
|
-
origin = DomainOrigin(rawOrigin)
|
|
220
|
-
} catch {
|
|
221
|
-
throw new Error(
|
|
222
|
-
`defineDomain: invalid \`origin\` "${rawOrigin}". Use a lowercase FQDN-like slug ` +
|
|
223
|
-
'(letters, digits, ".", "_", "-"), e.g. "crm.acme.dev".',
|
|
224
|
-
)
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// `requires` entries are domain origins — validate them with the same rule as
|
|
228
|
-
// `origin` so a URL or mixed-case entry fails at authoring time, not install.
|
|
229
|
-
const requires = (config.requires ?? []).map((dep) => {
|
|
230
|
-
try {
|
|
231
|
-
return DomainOrigin(dep)
|
|
232
|
-
} catch {
|
|
233
|
-
throw new Error(
|
|
234
|
-
`defineDomain: invalid \`requires\` entry "${dep}". Use the dependency's origin slug ` +
|
|
235
|
-
'(lowercase FQDN-like, e.g. "example.astrale.ai"), not a URL.',
|
|
236
|
-
)
|
|
237
|
-
}
|
|
238
|
-
})
|
|
239
|
-
|
|
240
|
-
// `path`, when set, is the Domain's physical tree path. Validate the
|
|
241
|
-
// two invariants the serializer/kernel rely on, string-only (no AbsolutePath
|
|
242
|
-
// import — this module must stay worker-safe): it is absolute with at least one
|
|
243
|
-
// segment, and its LAST segment equals the origin (the kernel derives origin
|
|
244
|
-
// from the mount basename in a few places, e.g. has_parent slug + get-access-
|
|
245
|
-
// token origin recovery). Full structural parse happens at build time.
|
|
246
|
-
if (config.path !== undefined) {
|
|
247
|
-
const loc = config.path
|
|
248
|
-
if (!loc.startsWith('/') || loc === '/') {
|
|
249
|
-
throw new Error(
|
|
250
|
-
`defineDomain: \`path\` must be an absolute graph path with at least ` +
|
|
251
|
-
`one segment (e.g. "/domains/${origin}"), not "${loc}".`,
|
|
252
|
-
)
|
|
253
|
-
}
|
|
254
|
-
if (loc.split('/').pop() !== origin) {
|
|
255
|
-
throw new Error(
|
|
256
|
-
`defineDomain: \`path\` last segment must equal the origin "${origin}" ` +
|
|
257
|
-
`(e.g. "/domains/${origin}" or "/${origin}"), got "${loc}".`,
|
|
258
|
-
)
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// A `manifest.entrypoint` view is resolved to its slug below (in the return),
|
|
263
|
-
// where a view absent from `views` throws — see `resolveManifest`.
|
|
264
|
-
|
|
265
|
-
// Declared roles must carry valid, unique slugs — a role slug becomes a graph
|
|
266
|
-
// path segment and an identity subject, so the kernel's reserved separators
|
|
267
|
-
// (`/`, `:`, `@`) can never appear in one. Fail at authoring time.
|
|
268
|
-
if (config.manifest?.roles !== undefined) {
|
|
269
|
-
const seen = new Set<string>()
|
|
270
|
-
for (const role of config.manifest.roles) {
|
|
271
|
-
if (!/^[a-z0-9][a-z0-9_-]*$/.test(role.slug)) {
|
|
272
|
-
throw new Error(
|
|
273
|
-
`defineDomain: invalid \`manifest.roles\` slug "${role.slug}". ` +
|
|
274
|
-
'Use a lowercase slug (letters, digits, "_", "-"), e.g. "editor".',
|
|
275
|
-
)
|
|
276
|
-
}
|
|
277
|
-
if (seen.has(role.slug)) {
|
|
278
|
-
throw new Error(`defineDomain: duplicate \`manifest.roles\` slug "${role.slug}".`)
|
|
279
|
-
}
|
|
280
|
-
seen.add(role.slug)
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
return {
|
|
285
|
-
schema: config.schema,
|
|
286
|
-
methods: config.methods as DomainDefinition['methods'],
|
|
287
|
-
...(config.core ? { core: config.core as DomainDefinition['core'] } : {}),
|
|
288
|
-
...(config.deps ? { deps: config.deps as DomainDefinition['deps'] } : {}),
|
|
289
|
-
...(config.views ? { views: config.views as Record<string, ViewDef> } : {}),
|
|
290
|
-
...(config.functions ? { functions: config.functions } : {}),
|
|
291
|
-
...(config.manifest ? { manifest: resolveManifest(config.manifest, config.views) } : {}),
|
|
292
|
-
origin,
|
|
293
|
-
requires,
|
|
294
|
-
...(config.path ? { path: config.path } : {}),
|
|
295
|
-
...(config.postInstall !== undefined
|
|
296
|
-
? { postInstall: normalizePostInstall(config.postInstall, origin, config.functions) }
|
|
297
|
-
: {}),
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Lower the author-facing manifest (view OBJECT for `entrypoint`) to the served
|
|
303
|
-
* {@link DomainManifest} (slug for `entrypoint`). The entrypoint view is matched
|
|
304
|
-
* to its `views`-map key by IDENTITY — the same mechanism `normalizePostInstall`
|
|
305
|
-
* uses for functions — so a view absent from `views` (one from another domain,
|
|
306
|
-
* or dropped) throws here instead of dangling to a NOT_FOUND view path at install.
|
|
307
|
-
*/
|
|
308
|
-
function resolveManifest(
|
|
309
|
-
manifest: DomainManifestConfig,
|
|
310
|
-
views: Record<string, AnyViewDef> | undefined,
|
|
311
|
-
): DomainManifest {
|
|
312
|
-
const { entrypoint, ...rest } = manifest
|
|
313
|
-
if (entrypoint === undefined) return rest
|
|
314
|
-
const slug = views ? Object.entries(views).find(([, def]) => def === entrypoint)?.[0] : undefined
|
|
315
|
-
if (slug === undefined) {
|
|
316
|
-
const viewKeys = Object.keys(views ?? {})
|
|
317
|
-
throw new Error(
|
|
318
|
-
"defineDomain: `manifest.entrypoint` must be one of this domain's own views " +
|
|
319
|
-
'(pass the view object, e.g. `entrypoint: views.welcome`). ' +
|
|
320
|
-
`Available views: ${viewKeys.length > 0 ? viewKeys.map((k) => `"${k}"`).join(', ') : '(none)'}.`,
|
|
321
|
-
)
|
|
322
|
-
}
|
|
323
|
-
return { ...rest, entrypoint: slug }
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* Resolve a `postInstall` function reference to the colon-path the bundle carries.
|
|
328
|
-
* The slug is the `functions` map key the reference is registered under (found by
|
|
329
|
-
* identity), so a renamed key is a compile error at the reference site AND the
|
|
330
|
-
* derived path follows the rename. The origin is never the author's to supply
|
|
331
|
-
* (postInstall is always a standalone function of THIS domain) and the path is
|
|
332
|
-
* mount-agnostic — the kernel resolves it wherever the domain is installed.
|
|
333
|
-
*/
|
|
334
|
-
function normalizePostInstall(
|
|
335
|
-
postInstall: AnyFunctionDef,
|
|
336
|
-
origin: string,
|
|
337
|
-
functions: Record<string, AnyFunctionDef> | undefined,
|
|
338
|
-
): string {
|
|
339
|
-
const slug = functions
|
|
340
|
-
? Object.entries(functions).find(([, def]) => def === postInstall)?.[0]
|
|
341
|
-
: undefined
|
|
342
|
-
if (slug === undefined) {
|
|
343
|
-
throw new Error(
|
|
344
|
-
"defineDomain: `postInstall` must reference a function from this domain's `functions` map " +
|
|
345
|
-
'(e.g. `postInstall: functions.seed`).',
|
|
346
|
-
)
|
|
347
|
-
}
|
|
348
|
-
return `/:${origin}:function.${slug}`
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
function schemaDomain(schema: Schema): string | undefined {
|
|
352
|
-
const value = (schema as unknown as { domain?: unknown }).domain
|
|
353
|
-
return typeof value === 'string' && value.length > 0 ? value : undefined
|
|
354
|
-
}
|
package/src/config/deploy.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `deploy` — bind a worker-safe `DomainDefinition` to a deployment adapter,
|
|
3
|
-
* producing the value `astrale.config.ts` default-exports for the CLI.
|
|
4
|
-
*
|
|
5
|
-
* The split exists to keep the worker bundle clean: `defineDomain` (in the
|
|
6
|
-
* author's `domain.ts`) carries only worker-safe modules and is what the
|
|
7
|
-
* generated worker imports; the adapter (`cloudflare(...)` / `astrale(...)`) is
|
|
8
|
-
* node-only code that the worker must never pull in. `deploy(domain, adapter)`
|
|
9
|
-
* is authored in `astrale.config.ts` — a Node-only module the CLI loads but the
|
|
10
|
-
* worker never imports — so the adapter stays out of the bundle.
|
|
11
|
-
*
|
|
12
|
-
* export const domain = defineDomain({ schema, methods, deps, views })
|
|
13
|
-
*
|
|
14
|
-
* import { domain } from './domain'
|
|
15
|
-
* export default deploy(domain, cloudflare({ dev, prod }))
|
|
16
|
-
*
|
|
17
|
-
* The returned shape is just the definition with `adapter` attached — exactly
|
|
18
|
-
* what the CLI already reads (`def.adapter`, `def.origin`, `def.schema`, …), so
|
|
19
|
-
* the loader is unchanged.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
import type { DomainAdapter } from './adapter.js'
|
|
23
|
-
import type { DomainDefinition } from './define-domain.js'
|
|
24
|
-
|
|
25
|
-
/** A domain definition bound to its deployment adapter — the CLI's input. */
|
|
26
|
-
export interface DeployConfig<Params = unknown> extends DomainDefinition {
|
|
27
|
-
adapter: DomainAdapter<Params>
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function deploy<Params>(
|
|
31
|
-
domain: DomainDefinition,
|
|
32
|
-
adapter: DomainAdapter<Params>,
|
|
33
|
-
): DeployConfig<Params> {
|
|
34
|
-
return { ...domain, adapter }
|
|
35
|
-
}
|
package/src/config/index.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `@astrale-os/sdk` config surface — the author-facing declaration of a
|
|
3
|
-
* standalone domain (`astrale.config.ts`) and the deployment-adapter contract.
|
|
4
|
-
*
|
|
5
|
-
* import { defineDomain, deploy } from '@astrale-os/sdk'
|
|
6
|
-
* import { cloudflare } from '@astrale-os/adapter-cloudflare'
|
|
7
|
-
*
|
|
8
|
-
* `defineDomain` (in `domain.ts`) declares the WORKER-SAFE domain — what it is +
|
|
9
|
-
* its identity, no adapter. `deploy(domain, adapter)` (in `astrale.config.ts`)
|
|
10
|
-
* binds it to a deployment target; the `astrale-domain` bin (folded into this
|
|
11
|
-
* package — see `../cli`) reads that default export and drives the adapter.
|
|
12
|
-
* Neither builds a server nor boots a kernel — they validate and package the
|
|
13
|
-
* declaration.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
export { defineDomain } from './define-domain.js'
|
|
17
|
-
export type { DefineDomainConfig, DomainDefinition, DomainManifest } from './define-domain.js'
|
|
18
|
-
|
|
19
|
-
export { deploy } from './deploy.js'
|
|
20
|
-
export type { DeployConfig } from './deploy.js'
|
|
21
|
-
|
|
22
|
-
export { defineAdapter } from './adapter.js'
|
|
23
|
-
export type {
|
|
24
|
-
AdapterSpec,
|
|
25
|
-
DeployCtx,
|
|
26
|
-
DeployResult,
|
|
27
|
-
DomainAdapter,
|
|
28
|
-
DomainInfo,
|
|
29
|
-
WatchCtx,
|
|
30
|
-
WatchHandle,
|
|
31
|
-
} from './adapter.js'
|
package/src/define/index.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { defineView } from './view.js'
|
|
2
|
-
export type { ViewDef, ViewRenderContext } from './view.js'
|
|
3
|
-
|
|
4
|
-
export { defineRemoteFunction } from './remote-function.js'
|
|
5
|
-
export type {
|
|
6
|
-
AnyRemoteFunctionDef,
|
|
7
|
-
RemoteFunctionAuthorizeContext,
|
|
8
|
-
RemoteFunctionContext,
|
|
9
|
-
RemoteFunctionDef,
|
|
10
|
-
} from './remote-function.js'
|