@leitwerk-dev/server 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.ts +65 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +909 -0
- package/dist/app.js.map +1 -0
- package/dist/auth/auth-config.d.ts +21 -0
- package/dist/auth/auth-config.d.ts.map +1 -0
- package/dist/auth/auth-config.js +42 -0
- package/dist/auth/auth-config.js.map +1 -0
- package/dist/auth/auth-service.d.ts +41 -0
- package/dist/auth/auth-service.d.ts.map +1 -0
- package/dist/auth/auth-service.js +129 -0
- package/dist/auth/auth-service.js.map +1 -0
- package/dist/auth/auth-test-helpers.d.ts +10 -0
- package/dist/auth/auth-test-helpers.d.ts.map +1 -0
- package/dist/auth/auth-test-helpers.js +30 -0
- package/dist/auth/auth-test-helpers.js.map +1 -0
- package/dist/auth/auth-tokens.d.ts +4 -0
- package/dist/auth/auth-tokens.d.ts.map +1 -0
- package/dist/auth/auth-tokens.js +11 -0
- package/dist/auth/auth-tokens.js.map +1 -0
- package/dist/auth/fastify-auth.d.ts +12 -0
- package/dist/auth/fastify-auth.d.ts.map +1 -0
- package/dist/auth/fastify-auth.js +20 -0
- package/dist/auth/fastify-auth.js.map +1 -0
- package/dist/auth/oidc-client.d.ts +21 -0
- package/dist/auth/oidc-client.d.ts.map +1 -0
- package/dist/auth/oidc-client.js +55 -0
- package/dist/auth/oidc-client.js.map +1 -0
- package/dist/auth/routes.d.ts +4 -0
- package/dist/auth/routes.d.ts.map +1 -0
- package/dist/auth/routes.js +74 -0
- package/dist/auth/routes.js.map +1 -0
- package/dist/commit-message-policy.d.ts +5 -0
- package/dist/commit-message-policy.d.ts.map +1 -0
- package/dist/commit-message-policy.js +15 -0
- package/dist/commit-message-policy.js.map +1 -0
- package/dist/config/config-loader.d.ts +18 -0
- package/dist/config/config-loader.d.ts.map +1 -0
- package/dist/config/config-loader.js +924 -0
- package/dist/config/config-loader.js.map +1 -0
- package/dist/config/config-types.d.ts +219 -0
- package/dist/config/config-types.d.ts.map +1 -0
- package/dist/config/config-types.js +2 -0
- package/dist/config/config-types.js.map +1 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/url-policy.d.ts +6 -0
- package/dist/config/url-policy.d.ts.map +1 -0
- package/dist/config/url-policy.js +25 -0
- package/dist/config/url-policy.js.map +1 -0
- package/dist/db/auth-repo.d.ts +39 -0
- package/dist/db/auth-repo.d.ts.map +1 -0
- package/dist/db/auth-repo.js +92 -0
- package/dist/db/auth-repo.js.map +1 -0
- package/dist/db/credential-cipher.d.ts +13 -0
- package/dist/db/credential-cipher.d.ts.map +1 -0
- package/dist/db/credential-cipher.js +47 -0
- package/dist/db/credential-cipher.js.map +1 -0
- package/dist/db/database.d.ts +30 -0
- package/dist/db/database.d.ts.map +1 -0
- package/dist/db/database.js +423 -0
- package/dist/db/database.js.map +1 -0
- package/dist/db/external-write-log-repo.d.ts +14 -0
- package/dist/db/external-write-log-repo.d.ts.map +1 -0
- package/dist/db/external-write-log-repo.js +49 -0
- package/dist/db/external-write-log-repo.js.map +1 -0
- package/dist/db/future-execution-repo.d.ts +61 -0
- package/dist/db/future-execution-repo.d.ts.map +1 -0
- package/dist/db/future-execution-repo.js +267 -0
- package/dist/db/future-execution-repo.js.map +1 -0
- package/dist/db/index.d.ts +4 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +4 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/launcher-recent-value-repo.d.ts +21 -0
- package/dist/db/launcher-recent-value-repo.d.ts.map +1 -0
- package/dist/db/launcher-recent-value-repo.js +76 -0
- package/dist/db/launcher-recent-value-repo.js.map +1 -0
- package/dist/db/pending-external-source-fire-repo.d.ts +41 -0
- package/dist/db/pending-external-source-fire-repo.d.ts.map +1 -0
- package/dist/db/pending-external-source-fire-repo.js +108 -0
- package/dist/db/pending-external-source-fire-repo.js.map +1 -0
- package/dist/db/process-event-repo.d.ts +19 -0
- package/dist/db/process-event-repo.d.ts.map +1 -0
- package/dist/db/process-event-repo.js +98 -0
- package/dist/db/process-event-repo.js.map +1 -0
- package/dist/db/process-handoff-dedup-key-repo.d.ts +17 -0
- package/dist/db/process-handoff-dedup-key-repo.d.ts.map +1 -0
- package/dist/db/process-handoff-dedup-key-repo.js +34 -0
- package/dist/db/process-handoff-dedup-key-repo.js.map +1 -0
- package/dist/db/process-input-repo.d.ts +20 -0
- package/dist/db/process-input-repo.d.ts.map +1 -0
- package/dist/db/process-input-repo.js +90 -0
- package/dist/db/process-input-repo.js.map +1 -0
- package/dist/db/process-instance-repo.d.ts +60 -0
- package/dist/db/process-instance-repo.d.ts.map +1 -0
- package/dist/db/process-instance-repo.js +281 -0
- package/dist/db/process-instance-repo.js.map +1 -0
- package/dist/db/process-leaf-outcome-snapshot-repo.d.ts +23 -0
- package/dist/db/process-leaf-outcome-snapshot-repo.d.ts.map +1 -0
- package/dist/db/process-leaf-outcome-snapshot-repo.js +77 -0
- package/dist/db/process-leaf-outcome-snapshot-repo.js.map +1 -0
- package/dist/db/process-project-repo.d.ts +32 -0
- package/dist/db/process-project-repo.d.ts.map +1 -0
- package/dist/db/process-project-repo.js +129 -0
- package/dist/db/process-project-repo.js.map +1 -0
- package/dist/db/process-question-request-repo.d.ts +26 -0
- package/dist/db/process-question-request-repo.d.ts.map +1 -0
- package/dist/db/process-question-request-repo.js +99 -0
- package/dist/db/process-question-request-repo.js.map +1 -0
- package/dist/db/process-skill-repo.d.ts +9 -0
- package/dist/db/process-skill-repo.d.ts.map +1 -0
- package/dist/db/process-skill-repo.js +58 -0
- package/dist/db/process-skill-repo.js.map +1 -0
- package/dist/db/process-title-job-repo.d.ts +53 -0
- package/dist/db/process-title-job-repo.d.ts.map +1 -0
- package/dist/db/process-title-job-repo.js +173 -0
- package/dist/db/process-title-job-repo.js.map +1 -0
- package/dist/db/process-turn-annotation-repo.d.ts +30 -0
- package/dist/db/process-turn-annotation-repo.d.ts.map +1 -0
- package/dist/db/process-turn-annotation-repo.js +104 -0
- package/dist/db/process-turn-annotation-repo.js.map +1 -0
- package/dist/db/process-turn-record-repo.d.ts +47 -0
- package/dist/db/process-turn-record-repo.d.ts.map +1 -0
- package/dist/db/process-turn-record-repo.js +125 -0
- package/dist/db/process-turn-record-repo.js.map +1 -0
- package/dist/db/provider-credential-repo.d.ts +23 -0
- package/dist/db/provider-credential-repo.d.ts.map +1 -0
- package/dist/db/provider-credential-repo.js +60 -0
- package/dist/db/provider-credential-repo.js.map +1 -0
- package/dist/db/repo-helpers.d.ts +5 -0
- package/dist/db/repo-helpers.d.ts.map +1 -0
- package/dist/db/repo-helpers.js +20 -0
- package/dist/db/repo-helpers.js.map +1 -0
- package/dist/db/repositories.d.ts +71 -0
- package/dist/db/repositories.d.ts.map +1 -0
- package/dist/db/repositories.js +73 -0
- package/dist/db/repositories.js.map +1 -0
- package/dist/db/schema-ddl.d.ts +6 -0
- package/dist/db/schema-ddl.d.ts.map +1 -0
- package/dist/db/schema-ddl.js +99 -0
- package/dist/db/schema-ddl.js.map +1 -0
- package/dist/db/schema.d.ts +4678 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +475 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/db/skill-repo.d.ts +28 -0
- package/dist/db/skill-repo.d.ts.map +1 -0
- package/dist/db/skill-repo.js +476 -0
- package/dist/db/skill-repo.js.map +1 -0
- package/dist/db/turn-start-record-repo.d.ts +15 -0
- package/dist/db/turn-start-record-repo.d.ts.map +1 -0
- package/dist/db/turn-start-record-repo.js +67 -0
- package/dist/db/turn-start-record-repo.js.map +1 -0
- package/dist/db/worker-lease-repo.d.ts +32 -0
- package/dist/db/worker-lease-repo.d.ts.map +1 -0
- package/dist/db/worker-lease-repo.js +109 -0
- package/dist/db/worker-lease-repo.js.map +1 -0
- package/dist/domain-logic/cron.d.ts +2 -0
- package/dist/domain-logic/cron.d.ts.map +1 -0
- package/dist/domain-logic/cron.js +25 -0
- package/dist/domain-logic/cron.js.map +1 -0
- package/dist/domain-logic/idempotency.d.ts +3 -0
- package/dist/domain-logic/idempotency.d.ts.map +1 -0
- package/dist/domain-logic/idempotency.js +3 -0
- package/dist/domain-logic/idempotency.js.map +1 -0
- package/dist/domain-logic/index.d.ts +7 -0
- package/dist/domain-logic/index.d.ts.map +1 -0
- package/dist/domain-logic/index.js +6 -0
- package/dist/domain-logic/index.js.map +1 -0
- package/dist/domain-logic/input-sequencer.d.ts +16 -0
- package/dist/domain-logic/input-sequencer.d.ts.map +1 -0
- package/dist/domain-logic/input-sequencer.js +2 -0
- package/dist/domain-logic/input-sequencer.js.map +1 -0
- package/dist/domain-logic/outcome-tools.d.ts +13 -0
- package/dist/domain-logic/outcome-tools.d.ts.map +1 -0
- package/dist/domain-logic/outcome-tools.js +267 -0
- package/dist/domain-logic/outcome-tools.js.map +1 -0
- package/dist/domain-logic/process-state-machine.d.ts +32 -0
- package/dist/domain-logic/process-state-machine.d.ts.map +1 -0
- package/dist/domain-logic/process-state-machine.js +140 -0
- package/dist/domain-logic/process-state-machine.js.map +1 -0
- package/dist/domain-logic/scheduled-action-lock.d.ts +21 -0
- package/dist/domain-logic/scheduled-action-lock.d.ts.map +1 -0
- package/dist/domain-logic/scheduled-action-lock.js +39 -0
- package/dist/domain-logic/scheduled-action-lock.js.map +1 -0
- package/dist/domain-logic/string-normalize.d.ts +2 -0
- package/dist/domain-logic/string-normalize.d.ts.map +1 -0
- package/dist/domain-logic/string-normalize.js +2 -0
- package/dist/domain-logic/string-normalize.js.map +1 -0
- package/dist/domain-logic/turn-record-guards.d.ts +9 -0
- package/dist/domain-logic/turn-record-guards.d.ts.map +1 -0
- package/dist/domain-logic/turn-record-guards.js +26 -0
- package/dist/domain-logic/turn-record-guards.js.map +1 -0
- package/dist/domain-logic/worker-lease-lifecycle.d.ts +30 -0
- package/dist/domain-logic/worker-lease-lifecycle.d.ts.map +1 -0
- package/dist/domain-logic/worker-lease-lifecycle.js +77 -0
- package/dist/domain-logic/worker-lease-lifecycle.js.map +1 -0
- package/dist/effects/post-commit-effect.d.ts +48 -0
- package/dist/effects/post-commit-effect.d.ts.map +1 -0
- package/dist/effects/post-commit-effect.js +8 -0
- package/dist/effects/post-commit-effect.js.map +1 -0
- package/dist/effects/post-commit-runner.d.ts +32 -0
- package/dist/effects/post-commit-runner.d.ts.map +1 -0
- package/dist/effects/post-commit-runner.js +215 -0
- package/dist/effects/post-commit-runner.js.map +1 -0
- package/dist/extension-ui/catalog.d.ts +42 -0
- package/dist/extension-ui/catalog.d.ts.map +1 -0
- package/dist/extension-ui/catalog.js +265 -0
- package/dist/extension-ui/catalog.js.map +1 -0
- package/dist/extensions/extension-host.d.ts +14 -0
- package/dist/extensions/extension-host.d.ts.map +1 -0
- package/dist/extensions/extension-host.js +34 -0
- package/dist/extensions/extension-host.js.map +1 -0
- package/dist/external-source-service.d.ts +16 -0
- package/dist/external-source-service.d.ts.map +1 -0
- package/dist/external-source-service.js +1033 -0
- package/dist/external-source-service.js.map +1 -0
- package/dist/filesystem-process-watchers.d.ts +22 -0
- package/dist/filesystem-process-watchers.d.ts.map +1 -0
- package/dist/filesystem-process-watchers.js +79 -0
- package/dist/filesystem-process-watchers.js.map +1 -0
- package/dist/future-execution/execution.d.ts +60 -0
- package/dist/future-execution/execution.d.ts.map +1 -0
- package/dist/future-execution/execution.js +321 -0
- package/dist/future-execution/execution.js.map +1 -0
- package/dist/future-execution/index.d.ts +2 -0
- package/dist/future-execution/index.d.ts.map +1 -0
- package/dist/future-execution/index.js +2 -0
- package/dist/future-execution/index.js.map +1 -0
- package/dist/future-execution/lifecycle.d.ts +197 -0
- package/dist/future-execution/lifecycle.d.ts.map +1 -0
- package/dist/future-execution/lifecycle.js +783 -0
- package/dist/future-execution/lifecycle.js.map +1 -0
- package/dist/future-execution/model-projection.d.ts +40 -0
- package/dist/future-execution/model-projection.d.ts.map +1 -0
- package/dist/future-execution/model-projection.js +98 -0
- package/dist/future-execution/model-projection.js.map +1 -0
- package/dist/future-execution/reconciliation.d.ts +29 -0
- package/dist/future-execution/reconciliation.d.ts.map +1 -0
- package/dist/future-execution/reconciliation.js +91 -0
- package/dist/future-execution/reconciliation.js.map +1 -0
- package/dist/future-execution/support.d.ts +16 -0
- package/dist/future-execution/support.d.ts.map +1 -0
- package/dist/future-execution/support.js +36 -0
- package/dist/future-execution/support.js.map +1 -0
- package/dist/future-execution/transition-planner.d.ts +49 -0
- package/dist/future-execution/transition-planner.d.ts.map +1 -0
- package/dist/future-execution/transition-planner.js +84 -0
- package/dist/future-execution/transition-planner.js.map +1 -0
- package/dist/future-execution-broadcast.d.ts +4 -0
- package/dist/future-execution-broadcast.d.ts.map +1 -0
- package/dist/future-execution-broadcast.js +13 -0
- package/dist/future-execution-broadcast.js.map +1 -0
- package/dist/future-execution-presenter.d.ts +22 -0
- package/dist/future-execution-presenter.d.ts.map +1 -0
- package/dist/future-execution-presenter.js +143 -0
- package/dist/future-execution-presenter.js.map +1 -0
- package/dist/future-execution-scheduler.d.ts +10 -0
- package/dist/future-execution-scheduler.d.ts.map +1 -0
- package/dist/future-execution-scheduler.js +37 -0
- package/dist/future-execution-scheduler.js.map +1 -0
- package/dist/index.d.ts +31 -898
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -238
- package/dist/index.js.map +1 -1
- package/dist/instance-tree.d.ts +22 -0
- package/dist/instance-tree.d.ts.map +1 -0
- package/dist/instance-tree.js +41 -0
- package/dist/instance-tree.js.map +1 -0
- package/dist/launch-title.d.ts +11 -0
- package/dist/launch-title.d.ts.map +1 -0
- package/dist/launch-title.js +36 -0
- package/dist/launch-title.js.map +1 -0
- package/dist/launcher-model-config-service.d.ts +33 -0
- package/dist/launcher-model-config-service.d.ts.map +1 -0
- package/dist/launcher-model-config-service.js +73 -0
- package/dist/launcher-model-config-service.js.map +1 -0
- package/dist/launcher-recent-values-service.d.ts +12 -0
- package/dist/launcher-recent-values-service.d.ts.map +1 -0
- package/dist/launcher-recent-values-service.js +43 -0
- package/dist/launcher-recent-values-service.js.map +1 -0
- package/dist/leaf-outcome-snapshot-capture.d.ts +26 -0
- package/dist/leaf-outcome-snapshot-capture.d.ts.map +1 -0
- package/dist/leaf-outcome-snapshot-capture.js +101 -0
- package/dist/leaf-outcome-snapshot-capture.js.map +1 -0
- package/dist/live-turn-projection.d.ts +2 -0
- package/dist/live-turn-projection.d.ts.map +1 -0
- package/dist/live-turn-projection.js +2 -0
- package/dist/live-turn-projection.js.map +1 -0
- package/dist/main.d.ts +2 -2
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +58 -119
- package/dist/main.js.map +1 -1
- package/dist/model-providers/builtin-server-adapter.d.ts +7 -0
- package/dist/model-providers/builtin-server-adapter.d.ts.map +1 -0
- package/dist/model-providers/builtin-server-adapter.js +65 -0
- package/dist/model-providers/builtin-server-adapter.js.map +1 -0
- package/dist/model-providers/credentials.d.ts +34 -0
- package/dist/model-providers/credentials.d.ts.map +1 -0
- package/dist/model-providers/credentials.js +165 -0
- package/dist/model-providers/credentials.js.map +1 -0
- package/dist/model-providers/index.d.ts +7 -0
- package/dist/model-providers/index.d.ts.map +1 -0
- package/dist/model-providers/index.js +7 -0
- package/dist/model-providers/index.js.map +1 -0
- package/dist/model-providers/model-status-cache.d.ts +44 -0
- package/dist/model-providers/model-status-cache.d.ts.map +1 -0
- package/dist/model-providers/model-status-cache.js +220 -0
- package/dist/model-providers/model-status-cache.js.map +1 -0
- package/dist/model-providers/provider-boundary-utils.d.ts +5 -0
- package/dist/model-providers/provider-boundary-utils.d.ts.map +1 -0
- package/dist/model-providers/provider-boundary-utils.js +32 -0
- package/dist/model-providers/provider-boundary-utils.js.map +1 -0
- package/dist/model-providers/provider-options.d.ts +34 -0
- package/dist/model-providers/provider-options.d.ts.map +1 -0
- package/dist/model-providers/provider-options.js +76 -0
- package/dist/model-providers/provider-options.js.map +1 -0
- package/dist/model-providers/registry.d.ts +35 -0
- package/dist/model-providers/registry.d.ts.map +1 -0
- package/dist/model-providers/registry.js +138 -0
- package/dist/model-providers/registry.js.map +1 -0
- package/dist/model-providers/server-adapters.d.ts +28 -0
- package/dist/model-providers/server-adapters.d.ts.map +1 -0
- package/dist/model-providers/server-adapters.js +63 -0
- package/dist/model-providers/server-adapters.js.map +1 -0
- package/dist/pi-resources/assemble.d.ts +36 -0
- package/dist/pi-resources/assemble.d.ts.map +1 -0
- package/dist/pi-resources/assemble.js +275 -0
- package/dist/pi-resources/assemble.js.map +1 -0
- package/dist/pi-resources/bundle-cache.d.ts +27 -0
- package/dist/pi-resources/bundle-cache.d.ts.map +1 -0
- package/dist/pi-resources/bundle-cache.js +125 -0
- package/dist/pi-resources/bundle-cache.js.map +1 -0
- package/dist/pi-resources/bundle-pin-lifecycle.d.ts +13 -0
- package/dist/pi-resources/bundle-pin-lifecycle.d.ts.map +1 -0
- package/dist/pi-resources/bundle-pin-lifecycle.js +41 -0
- package/dist/pi-resources/bundle-pin-lifecycle.js.map +1 -0
- package/dist/pi-resources/index.d.ts +4 -0
- package/dist/pi-resources/index.d.ts.map +1 -0
- package/dist/pi-resources/index.js +4 -0
- package/dist/pi-resources/index.js.map +1 -0
- package/dist/pi-resources/resource-collector.d.ts +41 -0
- package/dist/pi-resources/resource-collector.d.ts.map +1 -0
- package/dist/pi-resources/resource-collector.js +163 -0
- package/dist/pi-resources/resource-collector.js.map +1 -0
- package/dist/pi-session-tree.d.ts +26 -0
- package/dist/pi-session-tree.d.ts.map +1 -0
- package/dist/pi-session-tree.js +106 -0
- package/dist/pi-session-tree.js.map +1 -0
- package/dist/primary-path-snapshot.d.ts +20 -0
- package/dist/primary-path-snapshot.d.ts.map +1 -0
- package/dist/primary-path-snapshot.js +246 -0
- package/dist/primary-path-snapshot.js.map +1 -0
- package/dist/process-action-input-validation.d.ts +8 -0
- package/dist/process-action-input-validation.d.ts.map +1 -0
- package/dist/process-action-input-validation.js +75 -0
- package/dist/process-action-input-validation.js.map +1 -0
- package/dist/process-action-next-turn-model.d.ts +20 -0
- package/dist/process-action-next-turn-model.d.ts.map +1 -0
- package/dist/process-action-next-turn-model.js +102 -0
- package/dist/process-action-next-turn-model.js.map +1 -0
- package/dist/process-action-planner.d.ts +35 -0
- package/dist/process-action-planner.d.ts.map +1 -0
- package/dist/process-action-planner.js +93 -0
- package/dist/process-action-planner.js.map +1 -0
- package/dist/process-action-registry.d.ts +64 -0
- package/dist/process-action-registry.d.ts.map +1 -0
- package/dist/process-action-registry.js +332 -0
- package/dist/process-action-registry.js.map +1 -0
- package/dist/process-attention-notifier.d.ts +6 -0
- package/dist/process-attention-notifier.d.ts.map +1 -0
- package/dist/process-attention-notifier.js +41 -0
- package/dist/process-attention-notifier.js.map +1 -0
- package/dist/process-deletion-service.d.ts +42 -0
- package/dist/process-deletion-service.d.ts.map +1 -0
- package/dist/process-deletion-service.js +48 -0
- package/dist/process-deletion-service.js.map +1 -0
- package/dist/process-engine/decision.d.ts +36 -0
- package/dist/process-engine/decision.d.ts.map +1 -0
- package/dist/process-engine/decision.js +22 -0
- package/dist/process-engine/decision.js.map +1 -0
- package/dist/process-engine/engine.d.ts +3 -0
- package/dist/process-engine/engine.d.ts.map +1 -0
- package/dist/process-engine/engine.js +168 -0
- package/dist/process-engine/engine.js.map +1 -0
- package/dist/process-engine/index.d.ts +11 -0
- package/dist/process-engine/index.d.ts.map +1 -0
- package/dist/process-engine/index.js +8 -0
- package/dist/process-engine/index.js.map +1 -0
- package/dist/process-engine/internal-failures.d.ts +17 -0
- package/dist/process-engine/internal-failures.d.ts.map +1 -0
- package/dist/process-engine/internal-failures.js +32 -0
- package/dist/process-engine/internal-failures.js.map +1 -0
- package/dist/process-engine/operation.d.ts +34 -0
- package/dist/process-engine/operation.d.ts.map +1 -0
- package/dist/process-engine/operation.js +4 -0
- package/dist/process-engine/operation.js.map +1 -0
- package/dist/process-engine/ops/abort-process.d.ts +7 -0
- package/dist/process-engine/ops/abort-process.d.ts.map +1 -0
- package/dist/process-engine/ops/abort-process.js +104 -0
- package/dist/process-engine/ops/abort-process.js.map +1 -0
- package/dist/process-engine/ops/abort-turn.d.ts +8 -0
- package/dist/process-engine/ops/abort-turn.d.ts.map +1 -0
- package/dist/process-engine/ops/abort-turn.js +48 -0
- package/dist/process-engine/ops/abort-turn.js.map +1 -0
- package/dist/process-engine/ops/accept-worker-turn-start.d.ts +10 -0
- package/dist/process-engine/ops/accept-worker-turn-start.d.ts.map +1 -0
- package/dist/process-engine/ops/accept-worker-turn-start.js +137 -0
- package/dist/process-engine/ops/accept-worker-turn-start.js.map +1 -0
- package/dist/process-engine/ops/continue-failed-turn.d.ts +13 -0
- package/dist/process-engine/ops/continue-failed-turn.d.ts.map +1 -0
- package/dist/process-engine/ops/continue-failed-turn.js +109 -0
- package/dist/process-engine/ops/continue-failed-turn.js.map +1 -0
- package/dist/process-engine/ops/deferred-process-activation.d.ts +16 -0
- package/dist/process-engine/ops/deferred-process-activation.d.ts.map +1 -0
- package/dist/process-engine/ops/deferred-process-activation.js +98 -0
- package/dist/process-engine/ops/deferred-process-activation.js.map +1 -0
- package/dist/process-engine/ops/execute-action.d.ts +17 -0
- package/dist/process-engine/ops/execute-action.d.ts.map +1 -0
- package/dist/process-engine/ops/execute-action.js +292 -0
- package/dist/process-engine/ops/execute-action.js.map +1 -0
- package/dist/process-engine/ops/index.d.ts +17 -0
- package/dist/process-engine/ops/index.d.ts.map +1 -0
- package/dist/process-engine/ops/index.js +17 -0
- package/dist/process-engine/ops/index.js.map +1 -0
- package/dist/process-engine/ops/park-process.d.ts +7 -0
- package/dist/process-engine/ops/park-process.d.ts.map +1 -0
- package/dist/process-engine/ops/park-process.js +14 -0
- package/dist/process-engine/ops/park-process.js.map +1 -0
- package/dist/process-engine/ops/queue-inputs.d.ts +12 -0
- package/dist/process-engine/ops/queue-inputs.d.ts.map +1 -0
- package/dist/process-engine/ops/queue-inputs.js +35 -0
- package/dist/process-engine/ops/queue-inputs.js.map +1 -0
- package/dist/process-engine/ops/retry-failed-turn.d.ts +9 -0
- package/dist/process-engine/ops/retry-failed-turn.d.ts.map +1 -0
- package/dist/process-engine/ops/retry-failed-turn.js +74 -0
- package/dist/process-engine/ops/retry-failed-turn.js.map +1 -0
- package/dist/process-engine/ops/retry-startup.d.ts +11 -0
- package/dist/process-engine/ops/retry-startup.d.ts.map +1 -0
- package/dist/process-engine/ops/retry-startup.js +65 -0
- package/dist/process-engine/ops/retry-startup.js.map +1 -0
- package/dist/process-engine/ops/start-process.d.ts +8 -0
- package/dist/process-engine/ops/start-process.d.ts.map +1 -0
- package/dist/process-engine/ops/start-process.js +20 -0
- package/dist/process-engine/ops/start-process.js.map +1 -0
- package/dist/process-engine/ops/turn-failed.d.ts +7 -0
- package/dist/process-engine/ops/turn-failed.d.ts.map +1 -0
- package/dist/process-engine/ops/turn-failed.js +34 -0
- package/dist/process-engine/ops/turn-failed.js.map +1 -0
- package/dist/process-engine/ops/turn-outcome.d.ts +7 -0
- package/dist/process-engine/ops/turn-outcome.d.ts.map +1 -0
- package/dist/process-engine/ops/turn-outcome.js +345 -0
- package/dist/process-engine/ops/turn-outcome.js.map +1 -0
- package/dist/process-engine/ops/update-product-refs.d.ts +7 -0
- package/dist/process-engine/ops/update-product-refs.d.ts.map +1 -0
- package/dist/process-engine/ops/update-product-refs.js +18 -0
- package/dist/process-engine/ops/update-product-refs.js.map +1 -0
- package/dist/process-engine/ops/update-semantic-refs.d.ts +7 -0
- package/dist/process-engine/ops/update-semantic-refs.d.ts.map +1 -0
- package/dist/process-engine/ops/update-semantic-refs.js +21 -0
- package/dist/process-engine/ops/update-semantic-refs.js.map +1 -0
- package/dist/process-engine/ops/worker-failure.d.ts +11 -0
- package/dist/process-engine/ops/worker-failure.d.ts.map +1 -0
- package/dist/process-engine/ops/worker-failure.js +79 -0
- package/dist/process-engine/ops/worker-failure.js.map +1 -0
- package/dist/process-engine/reactions.d.ts +14 -0
- package/dist/process-engine/reactions.d.ts.map +1 -0
- package/dist/process-engine/reactions.js +23 -0
- package/dist/process-engine/reactions.js.map +1 -0
- package/dist/process-engine/recorder.d.ts +14 -0
- package/dist/process-engine/recorder.d.ts.map +1 -0
- package/dist/process-engine/recorder.js +245 -0
- package/dist/process-engine/recorder.js.map +1 -0
- package/dist/process-engine/runner.d.ts +6 -0
- package/dist/process-engine/runner.d.ts.map +1 -0
- package/dist/process-engine/runner.js +194 -0
- package/dist/process-engine/runner.js.map +1 -0
- package/dist/process-engine/startup-reconciliation.d.ts +26 -0
- package/dist/process-engine/startup-reconciliation.d.ts.map +1 -0
- package/dist/process-engine/startup-reconciliation.js +130 -0
- package/dist/process-engine/startup-reconciliation.js.map +1 -0
- package/dist/process-engine/state-json.d.ts +2 -0
- package/dist/process-engine/state-json.d.ts.map +1 -0
- package/dist/process-engine/state-json.js +5 -0
- package/dist/process-engine/state-json.js.map +1 -0
- package/dist/process-engine/turn-start-preflight.d.ts +30 -0
- package/dist/process-engine/turn-start-preflight.d.ts.map +1 -0
- package/dist/process-engine/turn-start-preflight.js +229 -0
- package/dist/process-engine/turn-start-preflight.js.map +1 -0
- package/dist/process-engine/turn-worker-requirement.d.ts +8 -0
- package/dist/process-engine/turn-worker-requirement.d.ts.map +1 -0
- package/dist/process-engine/turn-worker-requirement.js +11 -0
- package/dist/process-engine/turn-worker-requirement.js.map +1 -0
- package/dist/process-engine/types.d.ts +184 -0
- package/dist/process-engine/types.d.ts.map +1 -0
- package/dist/process-engine/types.js +2 -0
- package/dist/process-engine/types.js.map +1 -0
- package/dist/process-engine/worker-reconciliation.d.ts +8 -0
- package/dist/process-engine/worker-reconciliation.d.ts.map +1 -0
- package/dist/process-engine/worker-reconciliation.js +29 -0
- package/dist/process-engine/worker-reconciliation.js.map +1 -0
- package/dist/process-engine/writes/build-continue-failed-turn-writes.d.ts +13 -0
- package/dist/process-engine/writes/build-continue-failed-turn-writes.d.ts.map +1 -0
- package/dist/process-engine/writes/build-continue-failed-turn-writes.js +95 -0
- package/dist/process-engine/writes/build-continue-failed-turn-writes.js.map +1 -0
- package/dist/process-engine/writes/build-process-abort-writes.d.ts +11 -0
- package/dist/process-engine/writes/build-process-abort-writes.d.ts.map +1 -0
- package/dist/process-engine/writes/build-process-abort-writes.js +64 -0
- package/dist/process-engine/writes/build-process-abort-writes.js.map +1 -0
- package/dist/process-engine/writes/build-process-action-writes.d.ts +25 -0
- package/dist/process-engine/writes/build-process-action-writes.d.ts.map +1 -0
- package/dist/process-engine/writes/build-process-action-writes.js +140 -0
- package/dist/process-engine/writes/build-process-action-writes.js.map +1 -0
- package/dist/process-engine/writes/build-process-park-writes.d.ts +9 -0
- package/dist/process-engine/writes/build-process-park-writes.d.ts.map +1 -0
- package/dist/process-engine/writes/build-process-park-writes.js +48 -0
- package/dist/process-engine/writes/build-process-park-writes.js.map +1 -0
- package/dist/process-engine/writes/build-retry-writes.d.ts +11 -0
- package/dist/process-engine/writes/build-retry-writes.d.ts.map +1 -0
- package/dist/process-engine/writes/build-retry-writes.js +83 -0
- package/dist/process-engine/writes/build-retry-writes.js.map +1 -0
- package/dist/process-engine/writes/build-server-transition-writes.d.ts +6 -0
- package/dist/process-engine/writes/build-server-transition-writes.d.ts.map +1 -0
- package/dist/process-engine/writes/build-server-transition-writes.js +81 -0
- package/dist/process-engine/writes/build-server-transition-writes.js.map +1 -0
- package/dist/process-engine/writes/build-turn-failed-writes.d.ts +10 -0
- package/dist/process-engine/writes/build-turn-failed-writes.d.ts.map +1 -0
- package/dist/process-engine/writes/build-turn-failed-writes.js +52 -0
- package/dist/process-engine/writes/build-turn-failed-writes.js.map +1 -0
- package/dist/process-engine/writes/build-turn-outcome-writes.d.ts +15 -0
- package/dist/process-engine/writes/build-turn-outcome-writes.d.ts.map +1 -0
- package/dist/process-engine/writes/build-turn-outcome-writes.js +171 -0
- package/dist/process-engine/writes/build-turn-outcome-writes.js.map +1 -0
- package/dist/process-engine/writes/build-turn-selection-writes.d.ts +15 -0
- package/dist/process-engine/writes/build-turn-selection-writes.d.ts.map +1 -0
- package/dist/process-engine/writes/build-turn-selection-writes.js +214 -0
- package/dist/process-engine/writes/build-turn-selection-writes.js.map +1 -0
- package/dist/process-engine/writes/build-worker-failure-writes.d.ts +12 -0
- package/dist/process-engine/writes/build-worker-failure-writes.d.ts.map +1 -0
- package/dist/process-engine/writes/build-worker-failure-writes.js +58 -0
- package/dist/process-engine/writes/build-worker-failure-writes.js.map +1 -0
- package/dist/process-engine/writes/commit-writes.d.ts +28 -0
- package/dist/process-engine/writes/commit-writes.d.ts.map +1 -0
- package/dist/process-engine/writes/commit-writes.js +252 -0
- package/dist/process-engine/writes/commit-writes.js.map +1 -0
- package/dist/process-engine/writes/deferred-extension-events.d.ts +11 -0
- package/dist/process-engine/writes/deferred-extension-events.d.ts.map +1 -0
- package/dist/process-engine/writes/deferred-extension-events.js +13 -0
- package/dist/process-engine/writes/deferred-extension-events.js.map +1 -0
- package/dist/process-engine/writes/process-effects.d.ts +5 -0
- package/dist/process-engine/writes/process-effects.d.ts.map +1 -0
- package/dist/process-engine/writes/process-effects.js +20 -0
- package/dist/process-engine/writes/process-effects.js.map +1 -0
- package/dist/process-engine/writes/writes.d.ts +134 -0
- package/dist/process-engine/writes/writes.d.ts.map +1 -0
- package/dist/process-engine/writes/writes.js +139 -0
- package/dist/process-engine/writes/writes.js.map +1 -0
- package/dist/process-graph.d.ts +6 -0
- package/dist/process-graph.d.ts.map +1 -0
- package/dist/process-graph.js +7 -0
- package/dist/process-graph.js.map +1 -0
- package/dist/process-input-dispatch.d.ts +30 -0
- package/dist/process-input-dispatch.d.ts.map +1 -0
- package/dist/process-input-dispatch.js +85 -0
- package/dist/process-input-dispatch.js.map +1 -0
- package/dist/process-instance-tree-presenter.d.ts +11 -0
- package/dist/process-instance-tree-presenter.d.ts.map +1 -0
- package/dist/process-instance-tree-presenter.js +202 -0
- package/dist/process-instance-tree-presenter.js.map +1 -0
- package/dist/process-launch-executor.d.ts +41 -0
- package/dist/process-launch-executor.d.ts.map +1 -0
- package/dist/process-launch-executor.js +295 -0
- package/dist/process-launch-executor.js.map +1 -0
- package/dist/process-launch-plan-model-config.d.ts +4 -0
- package/dist/process-launch-plan-model-config.d.ts.map +1 -0
- package/dist/process-launch-plan-model-config.js +22 -0
- package/dist/process-launch-plan-model-config.js.map +1 -0
- package/dist/process-launch-plan.d.ts +12 -0
- package/dist/process-launch-plan.d.ts.map +1 -0
- package/dist/process-launch-plan.js +63 -0
- package/dist/process-launch-plan.js.map +1 -0
- package/dist/process-launcher-registry.d.ts +11 -0
- package/dist/process-launcher-registry.d.ts.map +1 -0
- package/dist/process-launcher-registry.js +104 -0
- package/dist/process-launcher-registry.js.map +1 -0
- package/dist/process-model-availability-recovery.d.ts +22 -0
- package/dist/process-model-availability-recovery.d.ts.map +1 -0
- package/dist/process-model-availability-recovery.js +41 -0
- package/dist/process-model-availability-recovery.js.map +1 -0
- package/dist/process-model-availability-transitions.d.ts +8 -0
- package/dist/process-model-availability-transitions.d.ts.map +1 -0
- package/dist/process-model-availability-transitions.js +14 -0
- package/dist/process-model-availability-transitions.js.map +1 -0
- package/dist/process-model-integrity-reconciler.d.ts +16 -0
- package/dist/process-model-integrity-reconciler.d.ts.map +1 -0
- package/dist/process-model-integrity-reconciler.js +27 -0
- package/dist/process-model-integrity-reconciler.js.map +1 -0
- package/dist/process-model-policy/construct.d.ts +19 -0
- package/dist/process-model-policy/construct.d.ts.map +1 -0
- package/dist/process-model-policy/construct.js +94 -0
- package/dist/process-model-policy/construct.js.map +1 -0
- package/dist/process-model-policy/evaluate.d.ts +7 -0
- package/dist/process-model-policy/evaluate.d.ts.map +1 -0
- package/dist/process-model-policy/evaluate.js +163 -0
- package/dist/process-model-policy/evaluate.js.map +1 -0
- package/dist/process-model-policy/fingerprint.d.ts +3 -0
- package/dist/process-model-policy/fingerprint.d.ts.map +1 -0
- package/dist/process-model-policy/fingerprint.js +39 -0
- package/dist/process-model-policy/fingerprint.js.map +1 -0
- package/dist/process-model-policy/index.d.ts +16 -0
- package/dist/process-model-policy/index.d.ts.map +1 -0
- package/dist/process-model-policy/index.js +47 -0
- package/dist/process-model-policy/index.js.map +1 -0
- package/dist/process-model-policy/input.d.ts +12 -0
- package/dist/process-model-policy/input.d.ts.map +1 -0
- package/dist/process-model-policy/input.js +79 -0
- package/dist/process-model-policy/input.js.map +1 -0
- package/dist/process-model-policy/integrity.d.ts +9 -0
- package/dist/process-model-policy/integrity.d.ts.map +1 -0
- package/dist/process-model-policy/integrity.js +53 -0
- package/dist/process-model-policy/integrity.js.map +1 -0
- package/dist/process-model-policy/launch.d.ts +5 -0
- package/dist/process-model-policy/launch.d.ts.map +1 -0
- package/dist/process-model-policy/launch.js +171 -0
- package/dist/process-model-policy/launch.js.map +1 -0
- package/dist/process-model-policy/project.d.ts +3 -0
- package/dist/process-model-policy/project.d.ts.map +1 -0
- package/dist/process-model-policy/project.js +144 -0
- package/dist/process-model-policy/project.js.map +1 -0
- package/dist/process-model-policy/stable-availability.d.ts +17 -0
- package/dist/process-model-policy/stable-availability.d.ts.map +1 -0
- package/dist/process-model-policy/stable-availability.js +16 -0
- package/dist/process-model-policy/stable-availability.js.map +1 -0
- package/dist/process-model-policy/types.d.ts +261 -0
- package/dist/process-model-policy/types.d.ts.map +1 -0
- package/dist/process-model-policy/types.js +9 -0
- package/dist/process-model-policy/types.js.map +1 -0
- package/dist/process-model-policy-presenter.d.ts +17 -0
- package/dist/process-model-policy-presenter.d.ts.map +1 -0
- package/dist/process-model-policy-presenter.js +77 -0
- package/dist/process-model-policy-presenter.js.map +1 -0
- package/dist/process-model-selection.d.ts +32 -0
- package/dist/process-model-selection.d.ts.map +1 -0
- package/dist/process-model-selection.js +101 -0
- package/dist/process-model-selection.js.map +1 -0
- package/dist/process-operation-coordinator.d.ts +5 -0
- package/dist/process-operation-coordinator.d.ts.map +1 -0
- package/dist/process-operation-coordinator.js +23 -0
- package/dist/process-operation-coordinator.js.map +1 -0
- package/dist/process-operator-attention.d.ts +33 -0
- package/dist/process-operator-attention.d.ts.map +1 -0
- package/dist/process-operator-attention.js +149 -0
- package/dist/process-operator-attention.js.map +1 -0
- package/dist/process-overview-presenter.d.ts +61 -0
- package/dist/process-overview-presenter.d.ts.map +1 -0
- package/dist/process-overview-presenter.js +220 -0
- package/dist/process-overview-presenter.js.map +1 -0
- package/dist/process-question-service.d.ts +40 -0
- package/dist/process-question-service.d.ts.map +1 -0
- package/dist/process-question-service.js +131 -0
- package/dist/process-question-service.js.map +1 -0
- package/dist/process-session-store.d.ts +79 -0
- package/dist/process-session-store.d.ts.map +1 -0
- package/dist/process-session-store.js +210 -0
- package/dist/process-session-store.js.map +1 -0
- package/dist/process-title-generator.d.ts +80 -0
- package/dist/process-title-generator.d.ts.map +1 -0
- package/dist/process-title-generator.js +628 -0
- package/dist/process-title-generator.js.map +1 -0
- package/dist/process-turn-trace.d.ts +19 -0
- package/dist/process-turn-trace.d.ts.map +1 -0
- package/dist/process-turn-trace.js +482 -0
- package/dist/process-turn-trace.js.map +1 -0
- package/dist/process-ui-registry.d.ts +10 -0
- package/dist/process-ui-registry.d.ts.map +1 -0
- package/dist/process-ui-registry.js +22 -0
- package/dist/process-ui-registry.js.map +1 -0
- package/dist/process-ui-snapshot-presenter.d.ts +92 -0
- package/dist/process-ui-snapshot-presenter.d.ts.map +1 -0
- package/dist/process-ui-snapshot-presenter.js +875 -0
- package/dist/process-ui-snapshot-presenter.js.map +1 -0
- package/dist/process-watcher-registry.d.ts +40 -0
- package/dist/process-watcher-registry.d.ts.map +1 -0
- package/dist/process-watcher-registry.js +152 -0
- package/dist/process-watcher-registry.js.map +1 -0
- package/dist/product-ref-state.d.ts +13 -0
- package/dist/product-ref-state.d.ts.map +1 -0
- package/dist/product-ref-state.js +84 -0
- package/dist/product-ref-state.js.map +1 -0
- package/dist/product-turn-result-markdown.d.ts +9 -0
- package/dist/product-turn-result-markdown.d.ts.map +1 -0
- package/dist/product-turn-result-markdown.js +44 -0
- package/dist/product-turn-result-markdown.js.map +1 -0
- package/dist/project-mutation-service.d.ts +31 -0
- package/dist/project-mutation-service.d.ts.map +1 -0
- package/dist/project-mutation-service.js +68 -0
- package/dist/project-mutation-service.js.map +1 -0
- package/dist/repository-credentials/service.d.ts +22 -0
- package/dist/repository-credentials/service.d.ts.map +1 -0
- package/dist/repository-credentials/service.js +49 -0
- package/dist/repository-credentials/service.js.map +1 -0
- package/dist/result-image-store.d.ts +29 -0
- package/dist/result-image-store.d.ts.map +1 -0
- package/dist/result-image-store.js +85 -0
- package/dist/result-image-store.js.map +1 -0
- package/dist/result-image-validation.d.ts +15 -0
- package/dist/result-image-validation.d.ts.map +1 -0
- package/dist/result-image-validation.js +47 -0
- package/dist/result-image-validation.js.map +1 -0
- package/dist/routes/future-executions.d.ts +5 -0
- package/dist/routes/future-executions.d.ts.map +1 -0
- package/dist/routes/future-executions.js +62 -0
- package/dist/routes/future-executions.js.map +1 -0
- package/dist/routes/internal-worker-auth.d.ts +14 -0
- package/dist/routes/internal-worker-auth.d.ts.map +1 -0
- package/dist/routes/internal-worker-auth.js +33 -0
- package/dist/routes/internal-worker-auth.js.map +1 -0
- package/dist/routes/internal-worker-session-snapshot.d.ts +14 -0
- package/dist/routes/internal-worker-session-snapshot.d.ts.map +1 -0
- package/dist/routes/internal-worker-session-snapshot.js +172 -0
- package/dist/routes/internal-worker-session-snapshot.js.map +1 -0
- package/dist/routes/launchers.d.ts +5 -0
- package/dist/routes/launchers.d.ts.map +1 -0
- package/dist/routes/launchers.js +140 -0
- package/dist/routes/launchers.js.map +1 -0
- package/dist/routes/process-actions.d.ts +5 -0
- package/dist/routes/process-actions.d.ts.map +1 -0
- package/dist/routes/process-actions.js +210 -0
- package/dist/routes/process-actions.js.map +1 -0
- package/dist/routes/process-detail.d.ts +4 -0
- package/dist/routes/process-detail.d.ts.map +1 -0
- package/dist/routes/process-detail.js +110 -0
- package/dist/routes/process-detail.js.map +1 -0
- package/dist/routes/process-diagnostics-assembler.d.ts +9 -0
- package/dist/routes/process-diagnostics-assembler.d.ts.map +1 -0
- package/dist/routes/process-diagnostics-assembler.js +92 -0
- package/dist/routes/process-diagnostics-assembler.js.map +1 -0
- package/dist/routes/process-engine-http.d.ts +10 -0
- package/dist/routes/process-engine-http.d.ts.map +1 -0
- package/dist/routes/process-engine-http.js +82 -0
- package/dist/routes/process-engine-http.js.map +1 -0
- package/dist/routes/process-primary-path-assembler.d.ts +18 -0
- package/dist/routes/process-primary-path-assembler.d.ts.map +1 -0
- package/dist/routes/process-primary-path-assembler.js +67 -0
- package/dist/routes/process-primary-path-assembler.js.map +1 -0
- package/dist/routes/process-questions.d.ts +4 -0
- package/dist/routes/process-questions.d.ts.map +1 -0
- package/dist/routes/process-questions.js +12 -0
- package/dist/routes/process-questions.js.map +1 -0
- package/dist/routes/process-route-helpers.d.ts +142 -0
- package/dist/routes/process-route-helpers.d.ts.map +1 -0
- package/dist/routes/process-route-helpers.js +523 -0
- package/dist/routes/process-route-helpers.js.map +1 -0
- package/dist/routes/process-session.d.ts +4 -0
- package/dist/routes/process-session.d.ts.map +1 -0
- package/dist/routes/process-session.js +24 -0
- package/dist/routes/process-session.js.map +1 -0
- package/dist/routes/processes.d.ts +5 -0
- package/dist/routes/processes.d.ts.map +1 -0
- package/dist/routes/processes.js +15 -0
- package/dist/routes/processes.js.map +1 -0
- package/dist/routes/result-images.d.ts +9 -0
- package/dist/routes/result-images.d.ts.map +1 -0
- package/dist/routes/result-images.js +92 -0
- package/dist/routes/result-images.js.map +1 -0
- package/dist/routes/skills.d.ts +7 -0
- package/dist/routes/skills.d.ts.map +1 -0
- package/dist/routes/skills.js +36 -0
- package/dist/routes/skills.js.map +1 -0
- package/dist/routes/ui-renderers.d.ts +8 -0
- package/dist/routes/ui-renderers.d.ts.map +1 -0
- package/dist/routes/ui-renderers.js +40 -0
- package/dist/routes/ui-renderers.js.map +1 -0
- package/dist/routes/watchers.d.ts +7 -0
- package/dist/routes/watchers.d.ts.map +1 -0
- package/dist/routes/watchers.js +82 -0
- package/dist/routes/watchers.js.map +1 -0
- package/dist/runtime-server-config.d.ts +16 -0
- package/dist/runtime-server-config.d.ts.map +1 -0
- package/dist/runtime-server-config.js +46 -0
- package/dist/runtime-server-config.js.map +1 -0
- package/dist/scheduled-action-preflight.d.ts +29 -0
- package/dist/scheduled-action-preflight.d.ts.map +1 -0
- package/dist/scheduled-action-preflight.js +53 -0
- package/dist/scheduled-action-preflight.js.map +1 -0
- package/dist/semantic-entry-ref-state.d.ts +15 -0
- package/dist/semantic-entry-ref-state.d.ts.map +1 -0
- package/dist/semantic-entry-ref-state.js +97 -0
- package/dist/semantic-entry-ref-state.js.map +1 -0
- package/dist/semantic-state-json.d.ts +7 -0
- package/dist/semantic-state-json.d.ts.map +1 -0
- package/dist/semantic-state-json.js +7 -0
- package/dist/semantic-state-json.js.map +1 -0
- package/dist/semantic-turn-result-markdown.d.ts +19 -0
- package/dist/semantic-turn-result-markdown.d.ts.map +1 -0
- package/dist/semantic-turn-result-markdown.js +45 -0
- package/dist/semantic-turn-result-markdown.js.map +1 -0
- package/dist/server-automatic-turn-drainer.d.ts +13 -0
- package/dist/server-automatic-turn-drainer.d.ts.map +1 -0
- package/dist/server-automatic-turn-drainer.js +235 -0
- package/dist/server-automatic-turn-drainer.js.map +1 -0
- package/dist/server-bootstrap/build-host-capabilities.d.ts +36 -0
- package/dist/server-bootstrap/build-host-capabilities.d.ts.map +1 -0
- package/dist/server-bootstrap/build-host-capabilities.js +82 -0
- package/dist/server-bootstrap/build-host-capabilities.js.map +1 -0
- package/dist/server-bootstrap/load-extension-catalog.d.ts +13 -0
- package/dist/server-bootstrap/load-extension-catalog.d.ts.map +1 -0
- package/dist/server-bootstrap/load-extension-catalog.js +17 -0
- package/dist/server-bootstrap/load-extension-catalog.js.map +1 -0
- package/dist/server-bootstrap/register-http.d.ts +19 -0
- package/dist/server-bootstrap/register-http.d.ts.map +1 -0
- package/dist/server-bootstrap/register-http.js +45 -0
- package/dist/server-bootstrap/register-http.js.map +1 -0
- package/dist/server-bootstrap/register-websocket.d.ts +13 -0
- package/dist/server-bootstrap/register-websocket.d.ts.map +1 -0
- package/dist/server-bootstrap/register-websocket.js +111 -0
- package/dist/server-bootstrap/register-websocket.js.map +1 -0
- package/dist/server-topology.d.ts +30 -0
- package/dist/server-topology.d.ts.map +1 -0
- package/dist/server-topology.js +33 -0
- package/dist/server-topology.js.map +1 -0
- package/dist/skills/catalog-service.d.ts +18 -0
- package/dist/skills/catalog-service.d.ts.map +1 -0
- package/dist/skills/catalog-service.js +66 -0
- package/dist/skills/catalog-service.js.map +1 -0
- package/dist/skills/catalog-sync.d.ts +9 -0
- package/dist/skills/catalog-sync.d.ts.map +1 -0
- package/dist/skills/catalog-sync.js +7 -0
- package/dist/skills/catalog-sync.js.map +1 -0
- package/dist/skills/invocation-detector.d.ts +12 -0
- package/dist/skills/invocation-detector.d.ts.map +1 -0
- package/dist/skills/invocation-detector.js +54 -0
- package/dist/skills/invocation-detector.js.map +1 -0
- package/dist/skills/skill-dependencies.d.ts +3 -0
- package/dist/skills/skill-dependencies.d.ts.map +1 -0
- package/dist/skills/skill-dependencies.js +17 -0
- package/dist/skills/skill-dependencies.js.map +1 -0
- package/dist/skills/skill-id.d.ts +3 -0
- package/dist/skills/skill-id.d.ts.map +1 -0
- package/dist/skills/skill-id.js +3 -0
- package/dist/skills/skill-id.js.map +1 -0
- package/dist/skills/source-importer.d.ts +18 -0
- package/dist/skills/source-importer.d.ts.map +1 -0
- package/dist/skills/source-importer.js +151 -0
- package/dist/skills/source-importer.js.map +1 -0
- package/dist/supervisor/adoption/adoption-plan.d.ts +14 -0
- package/dist/supervisor/adoption/adoption-plan.d.ts.map +1 -0
- package/dist/supervisor/adoption/adoption-plan.js +25 -0
- package/dist/supervisor/adoption/adoption-plan.js.map +1 -0
- package/dist/supervisor/adoption/worker-adoption-coordinator.d.ts +53 -0
- package/dist/supervisor/adoption/worker-adoption-coordinator.d.ts.map +1 -0
- package/dist/supervisor/adoption/worker-adoption-coordinator.js +225 -0
- package/dist/supervisor/adoption/worker-adoption-coordinator.js.map +1 -0
- package/dist/supervisor/idle-worker-ttl.d.ts +19 -0
- package/dist/supervisor/idle-worker-ttl.d.ts.map +1 -0
- package/dist/supervisor/idle-worker-ttl.js +26 -0
- package/dist/supervisor/idle-worker-ttl.js.map +1 -0
- package/dist/supervisor/ipc-handler.d.ts +37 -0
- package/dist/supervisor/ipc-handler.d.ts.map +1 -0
- package/dist/supervisor/ipc-handler.js +258 -0
- package/dist/supervisor/ipc-handler.js.map +1 -0
- package/dist/supervisor/stale-heartbeat-watchdog.d.ts +18 -0
- package/dist/supervisor/stale-heartbeat-watchdog.d.ts.map +1 -0
- package/dist/supervisor/stale-heartbeat-watchdog.js +46 -0
- package/dist/supervisor/stale-heartbeat-watchdog.js.map +1 -0
- package/dist/supervisor/synthetic-worker-failure.d.ts +13 -0
- package/dist/supervisor/synthetic-worker-failure.d.ts.map +1 -0
- package/dist/supervisor/synthetic-worker-failure.js +21 -0
- package/dist/supervisor/synthetic-worker-failure.js.map +1 -0
- package/dist/supervisor/worker-api-compatibility.d.ts +9 -0
- package/dist/supervisor/worker-api-compatibility.d.ts.map +1 -0
- package/dist/supervisor/worker-api-compatibility.js +20 -0
- package/dist/supervisor/worker-api-compatibility.js.map +1 -0
- package/dist/supervisor/worker-connect-token.d.ts +4 -0
- package/dist/supervisor/worker-connect-token.d.ts.map +1 -0
- package/dist/supervisor/worker-connect-token.js +13 -0
- package/dist/supervisor/worker-connect-token.js.map +1 -0
- package/dist/supervisor/worker-event-ingestor.d.ts +29 -0
- package/dist/supervisor/worker-event-ingestor.d.ts.map +1 -0
- package/dist/supervisor/worker-event-ingestor.js +193 -0
- package/dist/supervisor/worker-event-ingestor.js.map +1 -0
- package/dist/supervisor/worker-input-ack-handler.d.ts +12 -0
- package/dist/supervisor/worker-input-ack-handler.d.ts.map +1 -0
- package/dist/supervisor/worker-input-ack-handler.js +37 -0
- package/dist/supervisor/worker-input-ack-handler.js.map +1 -0
- package/dist/supervisor/worker-lease-observer.d.ts +35 -0
- package/dist/supervisor/worker-lease-observer.d.ts.map +1 -0
- package/dist/supervisor/worker-lease-observer.js +79 -0
- package/dist/supervisor/worker-lease-observer.js.map +1 -0
- package/dist/supervisor/worker-shutdown-controller.d.ts +16 -0
- package/dist/supervisor/worker-shutdown-controller.d.ts.map +1 -0
- package/dist/supervisor/worker-shutdown-controller.js +68 -0
- package/dist/supervisor/worker-shutdown-controller.js.map +1 -0
- package/dist/supervisor/worker-start-payload-builder.d.ts +33 -0
- package/dist/supervisor/worker-start-payload-builder.d.ts.map +1 -0
- package/dist/supervisor/worker-start-payload-builder.js +271 -0
- package/dist/supervisor/worker-start-payload-builder.js.map +1 -0
- package/dist/supervisor/worker-storage-layout.d.ts +17 -0
- package/dist/supervisor/worker-storage-layout.d.ts.map +1 -0
- package/dist/supervisor/worker-storage-layout.js +60 -0
- package/dist/supervisor/worker-storage-layout.js.map +1 -0
- package/dist/supervisor/worker-supervisor.d.ts +60 -0
- package/dist/supervisor/worker-supervisor.d.ts.map +1 -0
- package/dist/supervisor/worker-supervisor.js +666 -0
- package/dist/supervisor/worker-supervisor.js.map +1 -0
- package/dist/supervisor/worker-turn-ipc-recorder.d.ts +16 -0
- package/dist/supervisor/worker-turn-ipc-recorder.d.ts.map +1 -0
- package/dist/supervisor/worker-turn-ipc-recorder.js +62 -0
- package/dist/supervisor/worker-turn-ipc-recorder.js.map +1 -0
- package/dist/supervisor/worker-websocket-ipc.d.ts +55 -0
- package/dist/supervisor/worker-websocket-ipc.d.ts.map +1 -0
- package/dist/supervisor/worker-websocket-ipc.js +220 -0
- package/dist/supervisor/worker-websocket-ipc.js.map +1 -0
- package/dist/test-helpers/fake-worker-supervisor.d.ts +15 -0
- package/dist/test-helpers/fake-worker-supervisor.d.ts.map +1 -0
- package/dist/test-helpers/fake-worker-supervisor.js +59 -0
- package/dist/test-helpers/fake-worker-supervisor.js.map +1 -0
- package/dist/test-helpers/in-process-worker.d.ts +2 -0
- package/dist/test-helpers/in-process-worker.d.ts.map +1 -0
- package/dist/test-helpers/in-process-worker.js +2 -0
- package/dist/test-helpers/in-process-worker.js.map +1 -0
- package/dist/test-helpers/ipc-handler-harness.d.ts +17 -0
- package/dist/test-helpers/ipc-handler-harness.d.ts.map +1 -0
- package/dist/test-helpers/ipc-handler-harness.js +332 -0
- package/dist/test-helpers/ipc-handler-harness.js.map +1 -0
- package/dist/test-helpers/leaf-outcome-fixtures.d.ts +37 -0
- package/dist/test-helpers/leaf-outcome-fixtures.d.ts.map +1 -0
- package/dist/test-helpers/leaf-outcome-fixtures.js +81 -0
- package/dist/test-helpers/leaf-outcome-fixtures.js.map +1 -0
- package/dist/test-helpers/model-provider-fixtures.d.ts +4 -0
- package/dist/test-helpers/model-provider-fixtures.d.ts.map +1 -0
- package/dist/test-helpers/model-provider-fixtures.js +8 -0
- package/dist/test-helpers/model-provider-fixtures.js.map +1 -0
- package/dist/test-helpers/process-binding-fixtures.d.ts +23 -0
- package/dist/test-helpers/process-binding-fixtures.d.ts.map +1 -0
- package/dist/test-helpers/process-binding-fixtures.js +121 -0
- package/dist/test-helpers/process-binding-fixtures.js.map +1 -0
- package/dist/test-helpers/process-fixtures.d.ts +20 -0
- package/dist/test-helpers/process-fixtures.d.ts.map +1 -0
- package/dist/test-helpers/process-fixtures.js +212 -0
- package/dist/test-helpers/process-fixtures.js.map +1 -0
- package/dist/test-helpers/process-model-fixtures.d.ts +52 -0
- package/dist/test-helpers/process-model-fixtures.d.ts.map +1 -0
- package/dist/test-helpers/process-model-fixtures.js +159 -0
- package/dist/test-helpers/process-model-fixtures.js.map +1 -0
- package/dist/test-helpers/process-title-fixtures.d.ts +3 -0
- package/dist/test-helpers/process-title-fixtures.d.ts.map +1 -0
- package/dist/test-helpers/process-title-fixtures.js +36 -0
- package/dist/test-helpers/process-title-fixtures.js.map +1 -0
- package/dist/test-helpers/structural-process-fixtures.d.ts +7 -0
- package/dist/test-helpers/structural-process-fixtures.d.ts.map +1 -0
- package/dist/test-helpers/structural-process-fixtures.js +24 -0
- package/dist/test-helpers/structural-process-fixtures.js.map +1 -0
- package/dist/test-helpers/turn-fixtures.d.ts +168 -0
- package/dist/test-helpers/turn-fixtures.d.ts.map +1 -0
- package/dist/test-helpers/turn-fixtures.js +148 -0
- package/dist/test-helpers/turn-fixtures.js.map +1 -0
- package/dist/test-helpers/turn-start-preflight-fixtures.d.ts +12 -0
- package/dist/test-helpers/turn-start-preflight-fixtures.d.ts.map +1 -0
- package/dist/test-helpers/turn-start-preflight-fixtures.js +34 -0
- package/dist/test-helpers/turn-start-preflight-fixtures.js.map +1 -0
- package/dist/test-helpers/unit-deps.d.ts +17 -0
- package/dist/test-helpers/unit-deps.d.ts.map +1 -0
- package/dist/test-helpers/unit-deps.js +106 -0
- package/dist/test-helpers/unit-deps.js.map +1 -0
- package/dist/testing.d.ts +8 -114
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +6 -345
- package/dist/testing.js.map +1 -1
- package/dist/worker-runtime-profile-selection.d.ts +56 -0
- package/dist/worker-runtime-profile-selection.d.ts.map +1 -0
- package/dist/worker-runtime-profile-selection.js +90 -0
- package/dist/worker-runtime-profile-selection.js.map +1 -0
- package/dist/ws/broadcast.d.ts +15 -0
- package/dist/ws/broadcast.d.ts.map +1 -0
- package/dist/ws/broadcast.js +34 -0
- package/dist/ws/broadcast.js.map +1 -0
- package/package.json +10 -10
|
@@ -0,0 +1,924 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { parseDurationMs } from "@leitwerk-dev/watcher-utils";
|
|
4
|
+
import { createDefu } from "defu";
|
|
5
|
+
import * as v from "valibot";
|
|
6
|
+
import { parse as parseYaml } from "yaml";
|
|
7
|
+
import { normalizeRepositoryLocator } from "../commit-message-policy.js";
|
|
8
|
+
import { SAFE_SKILL_ID_PATTERN } from "../skills/skill-id.js";
|
|
9
|
+
import { isHttpsOrLoopbackHttpUrl, isValidHttpUrl, parseHttpUrl } from "./url-policy.js";
|
|
10
|
+
const DEFAULT_SEARCH_PATHS = ["./leitwerk.yaml", "~/.leitwerk/leitwerk.yaml"];
|
|
11
|
+
const REDACTED_LOG_VALUE = "<redacted>";
|
|
12
|
+
const SENSITIVE_CONFIG_KEY_PATTERN = /(token|secret|password|passphrase|api[_-]?key|private[_-]?key|known[_-]?hosts|webhook)/i;
|
|
13
|
+
const DEFAULT_MODEL_PROFILES = [];
|
|
14
|
+
function expandHome(p) {
|
|
15
|
+
if (p.startsWith("~/")) {
|
|
16
|
+
const home = process.env.HOME ?? process.env.USERPROFILE ?? "";
|
|
17
|
+
return resolve(home, p.slice(2));
|
|
18
|
+
}
|
|
19
|
+
return resolve(p);
|
|
20
|
+
}
|
|
21
|
+
function describeType(value) {
|
|
22
|
+
if (Array.isArray(value)) {
|
|
23
|
+
return "array";
|
|
24
|
+
}
|
|
25
|
+
if (value === null) {
|
|
26
|
+
return "null";
|
|
27
|
+
}
|
|
28
|
+
return typeof value;
|
|
29
|
+
}
|
|
30
|
+
function cloneValue(value) {
|
|
31
|
+
return structuredClone(value);
|
|
32
|
+
}
|
|
33
|
+
const mergeConfigDefaults = createDefu((object, key, value) => {
|
|
34
|
+
if (Array.isArray(object[key]) && Array.isArray(value)) {
|
|
35
|
+
object[key] = value;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
});
|
|
40
|
+
function mergeConfigValue(defaultValue, overrideValue) {
|
|
41
|
+
return mergeConfigDefaults(cloneValue(overrideValue), cloneValue(defaultValue));
|
|
42
|
+
}
|
|
43
|
+
export function applyConfigDefaults(raw) {
|
|
44
|
+
const merged = mergeConfigValue(getDefaultConfig(), raw);
|
|
45
|
+
if (Object.hasOwn(raw, "worker_runtime_profiles")) {
|
|
46
|
+
merged.worker_runtime_profiles =
|
|
47
|
+
raw.worker_runtime_profiles;
|
|
48
|
+
}
|
|
49
|
+
return merged;
|
|
50
|
+
}
|
|
51
|
+
export function resolveConfigPath(explicitPath) {
|
|
52
|
+
if (explicitPath) {
|
|
53
|
+
const expanded = expandHome(explicitPath);
|
|
54
|
+
return existsSync(expanded) ? expanded : null;
|
|
55
|
+
}
|
|
56
|
+
for (const candidate of DEFAULT_SEARCH_PATHS) {
|
|
57
|
+
const expanded = expandHome(candidate);
|
|
58
|
+
if (existsSync(expanded))
|
|
59
|
+
return expanded;
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
export function loadConfigFromFile(filePath) {
|
|
64
|
+
try {
|
|
65
|
+
const raw = readFileSync(filePath, "utf-8");
|
|
66
|
+
const parsedYaml = parseYaml(raw);
|
|
67
|
+
const parsed = parsedYaml === null ? {} : parsedYaml;
|
|
68
|
+
const parsedRecord = v.safeParse(unknownRecordSchema, parsed);
|
|
69
|
+
if (!parsedRecord.success) {
|
|
70
|
+
return {
|
|
71
|
+
ok: false,
|
|
72
|
+
error: `Config validation errors:\nExpected object at <root>, got ${describeType(parsed)}`,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const config = applyConfigDefaults(parsedRecord.output);
|
|
76
|
+
const errors = validateResolvedConfig(config);
|
|
77
|
+
if (errors.length > 0) {
|
|
78
|
+
return { ok: false, error: `Config validation errors:\n${errors.join("\n")}` };
|
|
79
|
+
}
|
|
80
|
+
return { ok: true, config, filePath };
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
return { ok: false, error: `Failed to load config from ${filePath}: ${err}` };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export function loadConfig(explicitPath) {
|
|
87
|
+
const filePath = resolveConfigPath(explicitPath);
|
|
88
|
+
if (!filePath) {
|
|
89
|
+
return { ok: true, config: getDefaultConfig(), filePath: "<defaults>" };
|
|
90
|
+
}
|
|
91
|
+
return loadConfigFromFile(filePath);
|
|
92
|
+
}
|
|
93
|
+
const stringArraySchema = v.array(v.string());
|
|
94
|
+
const unknownRecordSchema = v.pipe(v.unknown(), v.check((value) => typeof value === "object" && value !== null && !Array.isArray(value), "Expected object"), v.record(v.string(), v.unknown()));
|
|
95
|
+
const modelTurnConfigSchema = v.looseObject({
|
|
96
|
+
model_profile: v.optional(v.string()),
|
|
97
|
+
});
|
|
98
|
+
const watcherLaunchConfigSchema = v.looseObject({
|
|
99
|
+
default_model_profile: v.optional(v.string()),
|
|
100
|
+
turn_configs: v.optional(v.record(v.string(), modelTurnConfigSchema)),
|
|
101
|
+
});
|
|
102
|
+
const jiraWatcherSchema = v.looseObject({
|
|
103
|
+
type: v.literal("jira"),
|
|
104
|
+
enabled: v.boolean(),
|
|
105
|
+
project: v.string(),
|
|
106
|
+
poll_interval: v.string(),
|
|
107
|
+
labels: v.looseObject({
|
|
108
|
+
trigger: v.string(),
|
|
109
|
+
done: v.string(),
|
|
110
|
+
required: v.optional(stringArraySchema),
|
|
111
|
+
forbidden: v.optional(stringArraySchema),
|
|
112
|
+
}),
|
|
113
|
+
target_branch_label_prefix: v.string(),
|
|
114
|
+
launch: v.optional(watcherLaunchConfigSchema),
|
|
115
|
+
});
|
|
116
|
+
const gitlabMrWatcherSchema = v.looseObject({
|
|
117
|
+
type: v.literal("gitlab_mr"),
|
|
118
|
+
enabled: v.boolean(),
|
|
119
|
+
group: v.string(),
|
|
120
|
+
poll_interval: v.string(),
|
|
121
|
+
labels: v.looseObject({
|
|
122
|
+
trigger: v.string(),
|
|
123
|
+
done: v.string(),
|
|
124
|
+
}),
|
|
125
|
+
launch: v.optional(watcherLaunchConfigSchema),
|
|
126
|
+
});
|
|
127
|
+
const filesystemWatcherSchema = v.looseObject({
|
|
128
|
+
type: v.literal("filesystem"),
|
|
129
|
+
enabled: v.boolean(),
|
|
130
|
+
poll_interval: v.string(),
|
|
131
|
+
file_path: v.string(),
|
|
132
|
+
launch: v.optional(watcherLaunchConfigSchema),
|
|
133
|
+
});
|
|
134
|
+
const authNonEmptyString = v.pipe(v.string(), v.nonEmpty());
|
|
135
|
+
const authOidcProviderSchema = v.looseObject({
|
|
136
|
+
id: v.picklist(["forgejo", "gitlab"]),
|
|
137
|
+
kind: v.literal("oidc"),
|
|
138
|
+
issuer: authNonEmptyString,
|
|
139
|
+
client_id: authNonEmptyString,
|
|
140
|
+
client_secret: authNonEmptyString,
|
|
141
|
+
redirect_uri: v.optional(authNonEmptyString),
|
|
142
|
+
scopes: v.optional(v.pipe(stringArraySchema, v.nonEmpty())),
|
|
143
|
+
identity_claim: v.optional(authNonEmptyString),
|
|
144
|
+
});
|
|
145
|
+
const authConfigSchema = v.looseObject({
|
|
146
|
+
enabled: v.optional(v.boolean()),
|
|
147
|
+
session: v.optional(v.looseObject({
|
|
148
|
+
cookie_name: v.optional(authNonEmptyString),
|
|
149
|
+
ttl: v.optional(authNonEmptyString),
|
|
150
|
+
})),
|
|
151
|
+
providers: v.optional(v.array(authOidcProviderSchema)),
|
|
152
|
+
allowlist: v.optional(stringArraySchema),
|
|
153
|
+
});
|
|
154
|
+
const processWatcherConfigSchema = v.variant("type", [
|
|
155
|
+
jiraWatcherSchema,
|
|
156
|
+
gitlabMrWatcherSchema,
|
|
157
|
+
filesystemWatcherSchema,
|
|
158
|
+
]);
|
|
159
|
+
const safeSkillIdSchema = v.pipe(v.string(), v.regex(SAFE_SKILL_ID_PATTERN));
|
|
160
|
+
const skillSchema = v.strictObject({
|
|
161
|
+
id: safeSkillIdSchema,
|
|
162
|
+
label: v.optional(v.pipe(v.string(), v.nonEmpty())),
|
|
163
|
+
description: v.optional(v.pipe(v.string(), v.nonEmpty())),
|
|
164
|
+
source: v.variant("kind", [
|
|
165
|
+
v.strictObject({ kind: v.literal("local"), path: v.pipe(v.string(), v.nonEmpty()) }),
|
|
166
|
+
v.strictObject({
|
|
167
|
+
kind: v.literal("git"),
|
|
168
|
+
url: v.pipe(v.string(), v.nonEmpty()),
|
|
169
|
+
ref: v.pipe(v.string(), v.nonEmpty()),
|
|
170
|
+
path: v.pipe(v.string(), v.nonEmpty()),
|
|
171
|
+
}),
|
|
172
|
+
]),
|
|
173
|
+
});
|
|
174
|
+
const skillRepositorySchema = v.strictObject({
|
|
175
|
+
id: safeSkillIdSchema,
|
|
176
|
+
label: v.optional(v.pipe(v.string(), v.nonEmpty())),
|
|
177
|
+
url: v.pipe(v.string(), v.nonEmpty()),
|
|
178
|
+
ref: v.pipe(v.string(), v.nonEmpty()),
|
|
179
|
+
path: v.optional(v.pipe(v.string(), v.nonEmpty())),
|
|
180
|
+
});
|
|
181
|
+
const configSchema = v.looseObject({
|
|
182
|
+
skills: v.optional(v.array(skillSchema)),
|
|
183
|
+
skill_repositories: v.optional(v.array(skillRepositorySchema)),
|
|
184
|
+
commit_messages: v.optional(v.strictObject({
|
|
185
|
+
templates: v.record(v.string(), v.strictObject({ rules: v.pipe(v.string(), v.nonEmpty()) })),
|
|
186
|
+
default_template: v.optional(v.nullable(v.pipe(v.string(), v.nonEmpty()))),
|
|
187
|
+
repositories: v.record(v.string(), v.pipe(v.string(), v.nonEmpty())),
|
|
188
|
+
})),
|
|
189
|
+
server: v.looseObject({
|
|
190
|
+
host: v.string(),
|
|
191
|
+
port: v.number(),
|
|
192
|
+
base_url: v.string(),
|
|
193
|
+
websocket: v.looseObject({
|
|
194
|
+
heartbeat_interval: v.string(),
|
|
195
|
+
client_timeout: v.string(),
|
|
196
|
+
toast_ttl: v.string(),
|
|
197
|
+
}),
|
|
198
|
+
}),
|
|
199
|
+
storage: v.looseObject({
|
|
200
|
+
sqlite_path: v.string(),
|
|
201
|
+
process_workspaces_dir: v.string(),
|
|
202
|
+
tree_files_dir: v.string(),
|
|
203
|
+
}),
|
|
204
|
+
components: v.record(v.string(), v.looseObject({
|
|
205
|
+
repo: v.string(),
|
|
206
|
+
default_branch: v.string(),
|
|
207
|
+
worker_runtime_profile: v.optional(v.string()),
|
|
208
|
+
})),
|
|
209
|
+
workers: v.looseObject({
|
|
210
|
+
runner: v.optional(v.picklist(["docker", "kubernetes", "local"])),
|
|
211
|
+
default_runtime_profile: v.optional(v.string()),
|
|
212
|
+
max_parallel_processes: v.number(),
|
|
213
|
+
startup_timeout: v.string(),
|
|
214
|
+
shutdown_grace_period: v.string(),
|
|
215
|
+
heartbeat_interval: v.string(),
|
|
216
|
+
turn_max_duration: v.string(),
|
|
217
|
+
turn_inactivity_timeout: v.string(),
|
|
218
|
+
turn_abort_grace_period: v.string(),
|
|
219
|
+
stale_heartbeat_timeout: v.string(),
|
|
220
|
+
resume_on_boot: v.boolean(),
|
|
221
|
+
idle_worker_ttl: v.string(),
|
|
222
|
+
session_snapshot_max_size_bytes: v.optional(v.number()),
|
|
223
|
+
log_worker_events_to_stdout: v.boolean(),
|
|
224
|
+
cleanup: v.looseObject({
|
|
225
|
+
transient_ttl: v.string(),
|
|
226
|
+
completed_process_retention: v.string(),
|
|
227
|
+
error_process_retention: v.string(),
|
|
228
|
+
}),
|
|
229
|
+
}),
|
|
230
|
+
local_worker: v.optional(v.looseObject({
|
|
231
|
+
command: v.string(),
|
|
232
|
+
args: stringArraySchema,
|
|
233
|
+
})),
|
|
234
|
+
pi: v.looseObject({
|
|
235
|
+
agent_dir: v.string(),
|
|
236
|
+
model_profiles: v.array(v.looseObject({
|
|
237
|
+
id: v.string(),
|
|
238
|
+
provider: v.string(),
|
|
239
|
+
model_id: v.string(),
|
|
240
|
+
thinking_level: v.optional(v.string()),
|
|
241
|
+
provider_options: v.optional(v.record(v.string(), v.string())),
|
|
242
|
+
})),
|
|
243
|
+
system_prompt_template: v.optional(v.string()),
|
|
244
|
+
process_title_generation: v.looseObject({
|
|
245
|
+
model_profile: v.nullable(v.string()),
|
|
246
|
+
retry: v.looseObject({
|
|
247
|
+
max_attempts: v.pipe(v.number(), v.integer(), v.minValue(1)),
|
|
248
|
+
base_delay: v.string(),
|
|
249
|
+
max_delay: v.string(),
|
|
250
|
+
}),
|
|
251
|
+
}),
|
|
252
|
+
retry: v.looseObject({
|
|
253
|
+
enabled: v.boolean(),
|
|
254
|
+
max_retries: v.number(),
|
|
255
|
+
base_delay: v.string(),
|
|
256
|
+
provider: v.looseObject({
|
|
257
|
+
timeout: v.nullable(v.string()),
|
|
258
|
+
max_retries: v.nullable(v.number()),
|
|
259
|
+
max_retry_delay: v.string(),
|
|
260
|
+
}),
|
|
261
|
+
}),
|
|
262
|
+
}),
|
|
263
|
+
process_configs: v.optional(v.record(v.string(), v.looseObject({
|
|
264
|
+
default_model_profile: v.optional(v.string()),
|
|
265
|
+
allowed_model_profiles: v.optional(v.pipe(stringArraySchema, v.nonEmpty())),
|
|
266
|
+
worker_runtime_profile: v.optional(v.string()),
|
|
267
|
+
pi: v.optional(v.looseObject({
|
|
268
|
+
system_prompt_template: v.optional(v.string()),
|
|
269
|
+
append_system_prompt_template: v.optional(v.string()),
|
|
270
|
+
})),
|
|
271
|
+
turn_configs: v.optional(v.record(v.string(), modelTurnConfigSchema)),
|
|
272
|
+
watchers: v.optional(v.record(v.string(), processWatcherConfigSchema)),
|
|
273
|
+
}))),
|
|
274
|
+
notifications: v.looseObject({
|
|
275
|
+
all: v.looseObject({ enabled: v.boolean(), type: v.string(), url: v.string() }),
|
|
276
|
+
debug: v.looseObject({ enabled: v.boolean(), type: v.string(), url: v.string() }),
|
|
277
|
+
squad: v.looseObject({
|
|
278
|
+
enabled: v.boolean(),
|
|
279
|
+
type: v.string(),
|
|
280
|
+
routing_field: v.string(),
|
|
281
|
+
routes: v.record(v.string(), v.looseObject({ url: v.string() })),
|
|
282
|
+
}),
|
|
283
|
+
}),
|
|
284
|
+
sandbox: v.looseObject({ enabled: v.boolean(), profile: v.string() }),
|
|
285
|
+
extension_loading: v.looseObject({
|
|
286
|
+
sources: stringArraySchema,
|
|
287
|
+
}),
|
|
288
|
+
auth: v.optional(authConfigSchema),
|
|
289
|
+
docker: v.optional(v.looseObject({
|
|
290
|
+
socket: v.string(),
|
|
291
|
+
network: v.string(),
|
|
292
|
+
server_url: v.string(),
|
|
293
|
+
server_ca_file: v.optional(v.string()),
|
|
294
|
+
process_volume: v.looseObject({
|
|
295
|
+
mode: v.picklist(["bind", "named_volume"]),
|
|
296
|
+
host_root: v.string(),
|
|
297
|
+
mount_path: v.string(),
|
|
298
|
+
}),
|
|
299
|
+
dind: v.optional(v.looseObject({
|
|
300
|
+
privileged: v.boolean(),
|
|
301
|
+
sysbox: v.boolean(),
|
|
302
|
+
sysbox_runtime: v.optional(v.string()),
|
|
303
|
+
})),
|
|
304
|
+
})),
|
|
305
|
+
kubernetes: v.optional(v.looseObject({
|
|
306
|
+
server_namespace: v.string(),
|
|
307
|
+
process_namespace_prefix: v.string(),
|
|
308
|
+
server_url: v.string(),
|
|
309
|
+
server_ca_file: v.optional(v.string()),
|
|
310
|
+
api_server_url: v.optional(v.string()),
|
|
311
|
+
default_worker_runtime_profile: v.optional(v.string()),
|
|
312
|
+
worker_service_account: v.optional(v.string()),
|
|
313
|
+
process_volume: v.looseObject({
|
|
314
|
+
storage_class_name: v.optional(v.string()),
|
|
315
|
+
size: v.string(),
|
|
316
|
+
access_modes: stringArraySchema,
|
|
317
|
+
mount_path: v.string(),
|
|
318
|
+
}),
|
|
319
|
+
pod: v.optional(v.looseObject({
|
|
320
|
+
node_selector: v.optional(v.record(v.string(), v.string())),
|
|
321
|
+
tolerations: v.optional(v.array(v.unknown())),
|
|
322
|
+
annotations: v.optional(v.record(v.string(), v.string())),
|
|
323
|
+
})),
|
|
324
|
+
image_pull_secrets: v.optional(stringArraySchema),
|
|
325
|
+
image_pull_secret_copies: v.optional(v.array(v.strictObject({
|
|
326
|
+
source_name: v.pipe(v.string(), v.nonEmpty()),
|
|
327
|
+
target_name: v.pipe(v.string(), v.nonEmpty()),
|
|
328
|
+
}))),
|
|
329
|
+
})),
|
|
330
|
+
worker_runtime_profiles: v.optional(v.record(v.string(), v.looseObject({
|
|
331
|
+
image: v.string(),
|
|
332
|
+
image_pull_policy: v.optional(v.string()),
|
|
333
|
+
resources: v.optional(v.looseObject({
|
|
334
|
+
cpu: v.optional(v.string()),
|
|
335
|
+
memory: v.optional(v.string()),
|
|
336
|
+
limits: v.optional(v.looseObject({ cpu: v.optional(v.string()), memory: v.optional(v.string()) })),
|
|
337
|
+
})),
|
|
338
|
+
dind: v.optional(v.picklist(["privileged", "sysbox"])),
|
|
339
|
+
}))),
|
|
340
|
+
internal_tls: v.optional(v.looseObject({
|
|
341
|
+
enabled: v.boolean(),
|
|
342
|
+
cert_file: v.optional(v.string()),
|
|
343
|
+
key_file: v.optional(v.string()),
|
|
344
|
+
client_ca_file: v.optional(v.string()),
|
|
345
|
+
})),
|
|
346
|
+
extensions: unknownRecordSchema,
|
|
347
|
+
});
|
|
348
|
+
function formatValibotPath(issue) {
|
|
349
|
+
if (!issue.path || issue.path.length === 0) {
|
|
350
|
+
return "<root>";
|
|
351
|
+
}
|
|
352
|
+
let formatted = "";
|
|
353
|
+
for (const item of issue.path) {
|
|
354
|
+
const key = item.key;
|
|
355
|
+
if (typeof key === "number") {
|
|
356
|
+
formatted += `[${key}]`;
|
|
357
|
+
continue;
|
|
358
|
+
}
|
|
359
|
+
if (formatted.length > 0) {
|
|
360
|
+
formatted += ".";
|
|
361
|
+
}
|
|
362
|
+
formatted += String(key);
|
|
363
|
+
}
|
|
364
|
+
return formatted;
|
|
365
|
+
}
|
|
366
|
+
function formatConfigSchemaIssue(issue) {
|
|
367
|
+
const path = formatValibotPath(issue);
|
|
368
|
+
if (issue.type === "non_empty") {
|
|
369
|
+
return { path, message: `${path} must not be empty when specified` };
|
|
370
|
+
}
|
|
371
|
+
return { path, message: `${path}: ${issue.message}` };
|
|
372
|
+
}
|
|
373
|
+
function collectConfigSchemaErrors(config) {
|
|
374
|
+
const parsed = v.safeParse(configSchema, config, { abortEarly: false });
|
|
375
|
+
if (parsed.success) {
|
|
376
|
+
return [];
|
|
377
|
+
}
|
|
378
|
+
return parsed.issues.map((issue) => formatConfigSchemaIssue(issue).message);
|
|
379
|
+
}
|
|
380
|
+
function validateModelProfileReference(args) {
|
|
381
|
+
if (typeof args.value !== "string" || args.value.trim() === "") {
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
if (!args.configuredModelProfileIds.has(args.value)) {
|
|
385
|
+
args.errors.push(`Unknown model profile '${args.value}' at ${args.path}`);
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
if (args.allowedModelProfileIds !== null && !args.allowedModelProfileIds.has(args.value)) {
|
|
389
|
+
args.errors.push(`Model profile '${args.value}' at ${args.path} is not in allowed_model_profiles`);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
function collectModelProfileReferenceErrors(config) {
|
|
393
|
+
const errors = [];
|
|
394
|
+
const configuredModelProfileIds = new Set(config.pi.model_profiles
|
|
395
|
+
.map((profile) => profile.id)
|
|
396
|
+
.filter((profileId) => typeof profileId === "string" && profileId.trim() !== ""));
|
|
397
|
+
const titleModelProfile = config.pi.process_title_generation.model_profile;
|
|
398
|
+
if (typeof titleModelProfile === "string") {
|
|
399
|
+
if (titleModelProfile.trim() === "") {
|
|
400
|
+
errors.push("pi.process_title_generation.model_profile must be a non-empty string when specified");
|
|
401
|
+
}
|
|
402
|
+
else if (!configuredModelProfileIds.has(titleModelProfile)) {
|
|
403
|
+
errors.push(`Unknown model profile '${titleModelProfile}' at pi.process_title_generation.model_profile`);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
for (const [processId, processConfig] of Object.entries(config.process_configs ?? {})) {
|
|
407
|
+
const processConfigPath = `process_configs.${processId}`;
|
|
408
|
+
let processAllowedProfiles = null;
|
|
409
|
+
if (processConfig.allowed_model_profiles !== undefined) {
|
|
410
|
+
processAllowedProfiles = new Set();
|
|
411
|
+
for (const [index, profileId] of processConfig.allowed_model_profiles.entries()) {
|
|
412
|
+
const allowedProfilePath = `${processConfigPath}.allowed_model_profiles[${index}]`;
|
|
413
|
+
if (typeof profileId !== "string" || profileId.trim() === "") {
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
if (!configuredModelProfileIds.has(profileId)) {
|
|
417
|
+
errors.push(`Unknown model profile '${profileId}' at ${allowedProfilePath}`);
|
|
418
|
+
continue;
|
|
419
|
+
}
|
|
420
|
+
processAllowedProfiles.add(profileId);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
for (const [watcherId, watcherConfig] of Object.entries(processConfig.watchers ?? {})) {
|
|
424
|
+
const launch = watcherConfig.launch;
|
|
425
|
+
if (!launch) {
|
|
426
|
+
continue;
|
|
427
|
+
}
|
|
428
|
+
const watcherPath = `${processConfigPath}.watchers.${watcherId}`;
|
|
429
|
+
validateModelProfileReference({
|
|
430
|
+
value: launch.default_model_profile,
|
|
431
|
+
path: `${watcherPath}.launch.default_model_profile`,
|
|
432
|
+
errors,
|
|
433
|
+
configuredModelProfileIds,
|
|
434
|
+
allowedModelProfileIds: processAllowedProfiles,
|
|
435
|
+
});
|
|
436
|
+
for (const [turnId, turnConfig] of Object.entries(launch.turn_configs ?? {})) {
|
|
437
|
+
validateModelProfileReference({
|
|
438
|
+
value: turnConfig.model_profile,
|
|
439
|
+
path: `${watcherPath}.launch.turn_configs.${turnId}.model_profile`,
|
|
440
|
+
errors,
|
|
441
|
+
configuredModelProfileIds,
|
|
442
|
+
allowedModelProfileIds: processAllowedProfiles,
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
return errors;
|
|
448
|
+
}
|
|
449
|
+
function isValidPositiveDuration(value) {
|
|
450
|
+
return parseDurationMs(value, -1, { allowHours: true }) > 0;
|
|
451
|
+
}
|
|
452
|
+
function collectServerBaseUrlErrors(config) {
|
|
453
|
+
return isValidHttpUrl(config.server.base_url)
|
|
454
|
+
? []
|
|
455
|
+
: ["server.base_url must be an absolute http(s) URL"];
|
|
456
|
+
}
|
|
457
|
+
function collectWorkerRuntimeProfileErrors(config) {
|
|
458
|
+
const errors = [];
|
|
459
|
+
const profileIds = new Set(Object.keys(config.worker_runtime_profiles ?? {}));
|
|
460
|
+
const checkReference = (value, path) => {
|
|
461
|
+
if (typeof value !== "string" || value.trim() === "") {
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
if (!profileIds.has(value)) {
|
|
465
|
+
errors.push(`Unknown worker runtime profile '${value}' at ${path}`);
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
for (const [id, profile] of Object.entries(config.worker_runtime_profiles ?? {})) {
|
|
469
|
+
if (typeof profile.image !== "string" || profile.image.trim() === "") {
|
|
470
|
+
errors.push(`worker_runtime_profiles.${id}.image must be a non-empty string`);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
// Local is intentionally best-effort and does not consume image/profile
|
|
474
|
+
// selection. Keep Docker/Kubernetes as the contract-defining profile users.
|
|
475
|
+
if (config.workers.runner === "local") {
|
|
476
|
+
return errors;
|
|
477
|
+
}
|
|
478
|
+
checkReference(config.workers.default_runtime_profile, "workers.default_runtime_profile");
|
|
479
|
+
if (config.workers.runner === "kubernetes") {
|
|
480
|
+
checkReference(config.kubernetes?.default_worker_runtime_profile, "kubernetes.default_worker_runtime_profile");
|
|
481
|
+
}
|
|
482
|
+
for (const [key, component] of Object.entries(config.components)) {
|
|
483
|
+
checkReference(component.worker_runtime_profile, `components.${key}.worker_runtime_profile`);
|
|
484
|
+
}
|
|
485
|
+
for (const [processId, processConfig] of Object.entries(config.process_configs ?? {})) {
|
|
486
|
+
checkReference(processConfig.worker_runtime_profile, `process_configs.${processId}.worker_runtime_profile`);
|
|
487
|
+
}
|
|
488
|
+
return errors;
|
|
489
|
+
}
|
|
490
|
+
function collectWorkersConfigErrors(config) {
|
|
491
|
+
const errors = [];
|
|
492
|
+
const maxSnapshotBytes = config.workers.session_snapshot_max_size_bytes;
|
|
493
|
+
if (maxSnapshotBytes !== undefined &&
|
|
494
|
+
(!Number.isSafeInteger(maxSnapshotBytes) || maxSnapshotBytes <= 0)) {
|
|
495
|
+
errors.push("workers.session_snapshot_max_size_bytes must be a positive safe integer");
|
|
496
|
+
}
|
|
497
|
+
return errors;
|
|
498
|
+
}
|
|
499
|
+
function collectLocalRunnerConfigErrors(config) {
|
|
500
|
+
if (config.workers.runner !== "local")
|
|
501
|
+
return [];
|
|
502
|
+
const errors = [];
|
|
503
|
+
const local = config.local_worker;
|
|
504
|
+
if (!local)
|
|
505
|
+
return ["local_worker config block is required when workers.runner is 'local'"];
|
|
506
|
+
requireNonEmpty("local_worker", { command: local.command }, errors);
|
|
507
|
+
if (!Array.isArray(local.args))
|
|
508
|
+
errors.push("local_worker.args must be an array");
|
|
509
|
+
for (const [id, profile] of Object.entries(config.worker_runtime_profiles ?? {})) {
|
|
510
|
+
if (profile.dind !== undefined) {
|
|
511
|
+
errors.push(`worker_runtime_profiles.${id}.dind is not supported when workers.runner is 'local'`);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
return errors;
|
|
515
|
+
}
|
|
516
|
+
function collectDockerRunnerConfigErrors(config) {
|
|
517
|
+
if (config.workers.runner !== "docker") {
|
|
518
|
+
return [];
|
|
519
|
+
}
|
|
520
|
+
const errors = [];
|
|
521
|
+
const docker = config.docker;
|
|
522
|
+
if (!docker) {
|
|
523
|
+
return ["docker config block is required when workers.runner is 'docker'"];
|
|
524
|
+
}
|
|
525
|
+
if (Object.keys(config.worker_runtime_profiles ?? {}).length === 0) {
|
|
526
|
+
errors.push("worker_runtime_profiles must include at least one profile when workers.runner is 'docker'");
|
|
527
|
+
}
|
|
528
|
+
if (!config.workers.default_runtime_profile?.trim()) {
|
|
529
|
+
errors.push("workers.default_runtime_profile is required when workers.runner is 'docker'");
|
|
530
|
+
}
|
|
531
|
+
if (!isValidHttpUrl(docker.server_url)) {
|
|
532
|
+
errors.push("docker.server_url must be an absolute http(s) URL");
|
|
533
|
+
}
|
|
534
|
+
errors.push(...collectProductionWorkerTransportSecurityErrors({
|
|
535
|
+
runner: "docker",
|
|
536
|
+
serverUrl: docker.server_url,
|
|
537
|
+
serverCaFile: docker.server_ca_file,
|
|
538
|
+
internalTlsEnabled: config.internal_tls?.enabled === true,
|
|
539
|
+
}));
|
|
540
|
+
errors.push(...collectWorkerDindCapabilityErrors(config));
|
|
541
|
+
return errors;
|
|
542
|
+
}
|
|
543
|
+
function collectProductionWorkerTransportSecurityErrors(input) {
|
|
544
|
+
const errors = [];
|
|
545
|
+
const parsed = parseHttpUrl(input.serverUrl);
|
|
546
|
+
if (!parsed) {
|
|
547
|
+
return errors;
|
|
548
|
+
}
|
|
549
|
+
const prefix = input.runner;
|
|
550
|
+
if (input.internalTlsEnabled) {
|
|
551
|
+
if (parsed.protocol !== "https:") {
|
|
552
|
+
errors.push(`${prefix}.server_url must use https when internal_tls.enabled is true`);
|
|
553
|
+
}
|
|
554
|
+
if (!input.serverCaFile?.trim()) {
|
|
555
|
+
errors.push(`${prefix}.server_ca_file is required when internal_tls.enabled is true and workers.runner is '${input.runner}'`);
|
|
556
|
+
}
|
|
557
|
+
return errors;
|
|
558
|
+
}
|
|
559
|
+
if (parsed.protocol !== "http:") {
|
|
560
|
+
errors.push(`${prefix}.server_url must use http when internal_tls.enabled is false`);
|
|
561
|
+
}
|
|
562
|
+
return errors;
|
|
563
|
+
}
|
|
564
|
+
function isSafeKubernetesNamespacePrefix(value) {
|
|
565
|
+
return /^(?!-)[a-z0-9-]+-$/.test(value) && value.length <= 40;
|
|
566
|
+
}
|
|
567
|
+
function isSafeKubernetesDnsLabel(value) {
|
|
568
|
+
return /^(?!-)[a-z0-9-]{1,63}(?<!-)$/.test(value);
|
|
569
|
+
}
|
|
570
|
+
function requireNonEmpty(prefix, fields, errors) {
|
|
571
|
+
for (const [key, value] of Object.entries(fields)) {
|
|
572
|
+
if (typeof value !== "string" || value.trim() === "")
|
|
573
|
+
errors.push(`${prefix}.${key} must be a non-empty string`);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
function collectKubernetesRunnerConfigErrors(config) {
|
|
577
|
+
if (config.workers.runner !== "kubernetes")
|
|
578
|
+
return [];
|
|
579
|
+
const errors = [];
|
|
580
|
+
const k = config.kubernetes;
|
|
581
|
+
if (!k)
|
|
582
|
+
return ["kubernetes config block is required when workers.runner is 'kubernetes'"];
|
|
583
|
+
requireNonEmpty("kubernetes", { server_namespace: k.server_namespace, server_url: k.server_url }, errors);
|
|
584
|
+
requireNonEmpty("kubernetes.process_volume", { size: k.process_volume.size, mount_path: k.process_volume.mount_path }, errors);
|
|
585
|
+
if (k.server_namespace.trim() && !isSafeKubernetesDnsLabel(k.server_namespace))
|
|
586
|
+
errors.push("kubernetes.server_namespace must be a safe DNS label");
|
|
587
|
+
if (!k.process_namespace_prefix.trim())
|
|
588
|
+
errors.push("kubernetes.process_namespace_prefix must be a non-empty string");
|
|
589
|
+
else if (!isSafeKubernetesNamespacePrefix(k.process_namespace_prefix))
|
|
590
|
+
errors.push("kubernetes.process_namespace_prefix must contain only lowercase DNS-label characters and end with '-'");
|
|
591
|
+
if (k.server_namespace.trim() &&
|
|
592
|
+
k.process_namespace_prefix.trim() &&
|
|
593
|
+
k.server_namespace.startsWith(k.process_namespace_prefix))
|
|
594
|
+
errors.push("kubernetes.server_namespace must be dedicated and must not match the process namespace prefix");
|
|
595
|
+
if (!isValidHttpUrl(k.server_url))
|
|
596
|
+
errors.push("kubernetes.server_url must be an absolute http(s) URL");
|
|
597
|
+
errors.push(...collectProductionWorkerTransportSecurityErrors({
|
|
598
|
+
runner: "kubernetes",
|
|
599
|
+
serverUrl: k.server_url,
|
|
600
|
+
serverCaFile: k.server_ca_file,
|
|
601
|
+
internalTlsEnabled: config.internal_tls?.enabled === true,
|
|
602
|
+
}));
|
|
603
|
+
if (k.api_server_url !== undefined && !isValidHttpUrl(k.api_server_url))
|
|
604
|
+
errors.push("kubernetes.api_server_url must be an absolute http(s) URL");
|
|
605
|
+
if (Object.keys(config.worker_runtime_profiles ?? {}).length === 0)
|
|
606
|
+
errors.push("worker_runtime_profiles must include at least one profile when workers.runner is 'kubernetes'");
|
|
607
|
+
const defaultProfile = k.default_worker_runtime_profile ?? config.workers.default_runtime_profile;
|
|
608
|
+
if (!defaultProfile?.trim())
|
|
609
|
+
errors.push("kubernetes.default_worker_runtime_profile or workers.default_runtime_profile is required when workers.runner is 'kubernetes'");
|
|
610
|
+
if (k.process_volume.access_modes.length === 0)
|
|
611
|
+
errors.push("kubernetes.process_volume.access_modes must not be empty");
|
|
612
|
+
for (const [id, profile] of Object.entries(config.worker_runtime_profiles ?? {})) {
|
|
613
|
+
if (profile.dind !== undefined)
|
|
614
|
+
errors.push(`worker_runtime_profiles.${id}.dind is not supported when workers.runner is 'kubernetes'`);
|
|
615
|
+
}
|
|
616
|
+
return errors;
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Rejects DinD opt-in on a runtime profile unless the host runtime advertises
|
|
620
|
+
* the matching capability under `docker.dind`. This is the config-time gate the
|
|
621
|
+
* plan calls for: "DinD opt-in is rejected unless the runtime supports it."
|
|
622
|
+
*/
|
|
623
|
+
function collectWorkerDindCapabilityErrors(config) {
|
|
624
|
+
const errors = [];
|
|
625
|
+
const cap = config.docker?.dind;
|
|
626
|
+
for (const [id, profile] of Object.entries(config.worker_runtime_profiles ?? {})) {
|
|
627
|
+
const mode = profile.dind;
|
|
628
|
+
if (!mode)
|
|
629
|
+
continue;
|
|
630
|
+
const enabled = mode === "privileged" ? cap?.privileged : cap?.sysbox;
|
|
631
|
+
if (!enabled) {
|
|
632
|
+
errors.push(`worker_runtime_profiles.${id}.dind is '${mode}' but docker.dind.${mode} is not enabled`);
|
|
633
|
+
continue;
|
|
634
|
+
}
|
|
635
|
+
if (mode === "sysbox" && !cap?.sysbox_runtime?.trim())
|
|
636
|
+
errors.push(`worker_runtime_profiles.${id}.dind is 'sysbox' but docker.dind.sysbox_runtime is not configured`);
|
|
637
|
+
}
|
|
638
|
+
return errors;
|
|
639
|
+
}
|
|
640
|
+
function collectInternalTlsConfigErrors(config) {
|
|
641
|
+
const tls = config.internal_tls;
|
|
642
|
+
if (!tls?.enabled)
|
|
643
|
+
return [];
|
|
644
|
+
const errors = [];
|
|
645
|
+
requireNonEmpty("internal_tls", { cert_file: tls.cert_file, key_file: tls.key_file }, errors);
|
|
646
|
+
if (tls.client_ca_file?.trim()) {
|
|
647
|
+
errors.push("internal_tls.client_ca_file is not supported for worker IPC yet; workers do not receive client certificate/key material");
|
|
648
|
+
}
|
|
649
|
+
return errors.map((e) => e.replace("must be a non-empty string", "is required when internal_tls.enabled is true"));
|
|
650
|
+
}
|
|
651
|
+
function collectAuthConfigErrors(config) {
|
|
652
|
+
const errors = [];
|
|
653
|
+
const auth = config.auth;
|
|
654
|
+
if (!auth || auth.enabled !== true) {
|
|
655
|
+
return errors;
|
|
656
|
+
}
|
|
657
|
+
const providers = auth.providers ?? [];
|
|
658
|
+
if (providers.length === 0) {
|
|
659
|
+
errors.push("auth.providers must include one OIDC provider when auth.enabled is true");
|
|
660
|
+
}
|
|
661
|
+
if (providers.length > 1) {
|
|
662
|
+
errors.push("auth.providers currently supports exactly one provider");
|
|
663
|
+
}
|
|
664
|
+
if (providers.length > 0 && !isHttpsOrLoopbackHttpUrl(config.server.base_url)) {
|
|
665
|
+
errors.push("server.base_url must use https when auth is enabled, except for localhost");
|
|
666
|
+
}
|
|
667
|
+
for (const [index, provider] of providers.entries()) {
|
|
668
|
+
if (provider.id !== "forgejo") {
|
|
669
|
+
errors.push(`auth.providers[${index}].id must be forgejo in Phase 1`);
|
|
670
|
+
}
|
|
671
|
+
if (!isHttpsOrLoopbackHttpUrl(provider.issuer)) {
|
|
672
|
+
errors.push(`auth.providers[${index}].issuer must be an absolute https URL, except for localhost`);
|
|
673
|
+
}
|
|
674
|
+
if (provider.redirect_uri !== undefined && !isHttpsOrLoopbackHttpUrl(provider.redirect_uri)) {
|
|
675
|
+
errors.push(`auth.providers[${index}].redirect_uri must be an absolute https URL, except for localhost`);
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
if (auth.session?.ttl !== undefined && !isValidPositiveDuration(auth.session.ttl)) {
|
|
679
|
+
errors.push("auth.session.ttl must be a positive duration");
|
|
680
|
+
}
|
|
681
|
+
return errors;
|
|
682
|
+
}
|
|
683
|
+
function hasOwnKey(value, key) {
|
|
684
|
+
return (typeof value === "object" &&
|
|
685
|
+
value !== null &&
|
|
686
|
+
!Array.isArray(value) &&
|
|
687
|
+
Object.hasOwn(value, key));
|
|
688
|
+
}
|
|
689
|
+
function collectLegacyConfigKeyErrors(config) {
|
|
690
|
+
const legacyKeys = [
|
|
691
|
+
{
|
|
692
|
+
section: "pi",
|
|
693
|
+
key: "process_dir",
|
|
694
|
+
message: "pi.process_dir was renamed to pi.agent_dir; move the configured value",
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
section: "local_worker",
|
|
698
|
+
key: "process_volume_root",
|
|
699
|
+
message: "local_worker.process_volume_root was removed; remove the key because local workers use storage.process_workspaces_dir and storage.tree_files_dir directly",
|
|
700
|
+
},
|
|
701
|
+
];
|
|
702
|
+
return legacyKeys
|
|
703
|
+
.filter(({ section, key }) => hasOwnKey(config[section], key))
|
|
704
|
+
.map(({ message }) => message);
|
|
705
|
+
}
|
|
706
|
+
function collectCommitMessageConfigErrors(config) {
|
|
707
|
+
const section = config.commit_messages;
|
|
708
|
+
if (!section)
|
|
709
|
+
return [];
|
|
710
|
+
const errors = [];
|
|
711
|
+
const templateIds = new Set(Object.keys(section.templates));
|
|
712
|
+
if (section.default_template && !templateIds.has(section.default_template)) {
|
|
713
|
+
errors.push(`Unknown commit-message template '${section.default_template}' at commit_messages.default_template`);
|
|
714
|
+
}
|
|
715
|
+
const normalized = new Map();
|
|
716
|
+
for (const [locator, templateId] of Object.entries(section.repositories)) {
|
|
717
|
+
if (!templateIds.has(templateId)) {
|
|
718
|
+
errors.push(`Unknown commit-message template '${templateId}' at commit_messages.repositories.${locator}`);
|
|
719
|
+
}
|
|
720
|
+
const key = normalizeRepositoryLocator(locator);
|
|
721
|
+
if (!key) {
|
|
722
|
+
errors.push("commit_messages repository locators must be non-empty");
|
|
723
|
+
continue;
|
|
724
|
+
}
|
|
725
|
+
const prior = normalized.get(key);
|
|
726
|
+
if (prior && prior !== templateId) {
|
|
727
|
+
errors.push(`Conflicting commit-message mappings normalize to repository locator '${key}'`);
|
|
728
|
+
}
|
|
729
|
+
else {
|
|
730
|
+
normalized.set(key, templateId);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
return errors;
|
|
734
|
+
}
|
|
735
|
+
function validateResolvedConfig(config) {
|
|
736
|
+
const legacyKeyErrors = collectLegacyConfigKeyErrors(config);
|
|
737
|
+
if (legacyKeyErrors.length > 0) {
|
|
738
|
+
return legacyKeyErrors;
|
|
739
|
+
}
|
|
740
|
+
const shapeErrors = collectConfigSchemaErrors(config);
|
|
741
|
+
if (shapeErrors.length > 0) {
|
|
742
|
+
return shapeErrors;
|
|
743
|
+
}
|
|
744
|
+
const resolvedConfig = config;
|
|
745
|
+
const skillIds = new Set();
|
|
746
|
+
const skillErrors = [];
|
|
747
|
+
for (const skill of resolvedConfig.skills ?? []) {
|
|
748
|
+
if (skillIds.has(skill.id))
|
|
749
|
+
skillErrors.push(`Duplicate skill id '${skill.id}' at skills`);
|
|
750
|
+
skillIds.add(skill.id);
|
|
751
|
+
}
|
|
752
|
+
const repositoryIds = new Set();
|
|
753
|
+
for (const repository of resolvedConfig.skill_repositories ?? []) {
|
|
754
|
+
if (repositoryIds.has(repository.id)) {
|
|
755
|
+
skillErrors.push(`Duplicate skill repository id '${repository.id}' at skill_repositories`);
|
|
756
|
+
}
|
|
757
|
+
repositoryIds.add(repository.id);
|
|
758
|
+
}
|
|
759
|
+
return [
|
|
760
|
+
...skillErrors,
|
|
761
|
+
...collectServerBaseUrlErrors(resolvedConfig),
|
|
762
|
+
...collectCommitMessageConfigErrors(resolvedConfig),
|
|
763
|
+
...collectModelProfileReferenceErrors(resolvedConfig),
|
|
764
|
+
...collectWorkerRuntimeProfileErrors(resolvedConfig),
|
|
765
|
+
...collectWorkersConfigErrors(resolvedConfig),
|
|
766
|
+
...collectLocalRunnerConfigErrors(resolvedConfig),
|
|
767
|
+
...collectDockerRunnerConfigErrors(resolvedConfig),
|
|
768
|
+
...collectKubernetesRunnerConfigErrors(resolvedConfig),
|
|
769
|
+
...collectInternalTlsConfigErrors(resolvedConfig),
|
|
770
|
+
...collectAuthConfigErrors(resolvedConfig),
|
|
771
|
+
];
|
|
772
|
+
}
|
|
773
|
+
export function validateConfig(raw) {
|
|
774
|
+
const config = applyConfigDefaults(raw);
|
|
775
|
+
return validateResolvedConfig(config);
|
|
776
|
+
}
|
|
777
|
+
function shouldRedactForLogging(path, key) {
|
|
778
|
+
if (SENSITIVE_CONFIG_KEY_PATTERN.test(key)) {
|
|
779
|
+
return true;
|
|
780
|
+
}
|
|
781
|
+
if (path[0] === "notifications" && key === "url") {
|
|
782
|
+
return true;
|
|
783
|
+
}
|
|
784
|
+
if (key === "url" && path.some((segment) => /webhook/i.test(segment))) {
|
|
785
|
+
return true;
|
|
786
|
+
}
|
|
787
|
+
return false;
|
|
788
|
+
}
|
|
789
|
+
function redactLoggedValue(value) {
|
|
790
|
+
if (typeof value === "string" && value.length === 0) {
|
|
791
|
+
return "";
|
|
792
|
+
}
|
|
793
|
+
return REDACTED_LOG_VALUE;
|
|
794
|
+
}
|
|
795
|
+
export function sanitizeConfigForLogging(value, path = []) {
|
|
796
|
+
if (Array.isArray(value)) {
|
|
797
|
+
return value.map((entry, index) => sanitizeConfigForLogging(entry, [...path, String(index)]));
|
|
798
|
+
}
|
|
799
|
+
const parsedRecord = v.safeParse(unknownRecordSchema, value);
|
|
800
|
+
if (!parsedRecord.success) {
|
|
801
|
+
return value;
|
|
802
|
+
}
|
|
803
|
+
const sanitized = {};
|
|
804
|
+
for (const [key, entry] of Object.entries(parsedRecord.output)) {
|
|
805
|
+
if (shouldRedactForLogging(path, key)) {
|
|
806
|
+
sanitized[key] = redactLoggedValue(entry);
|
|
807
|
+
continue;
|
|
808
|
+
}
|
|
809
|
+
sanitized[key] = sanitizeConfigForLogging(entry, [...path, key]);
|
|
810
|
+
}
|
|
811
|
+
return sanitized;
|
|
812
|
+
}
|
|
813
|
+
export function getDefaultConfig() {
|
|
814
|
+
return {
|
|
815
|
+
skills: [],
|
|
816
|
+
skill_repositories: [],
|
|
817
|
+
commit_messages: {
|
|
818
|
+
templates: {},
|
|
819
|
+
default_template: null,
|
|
820
|
+
repositories: {},
|
|
821
|
+
},
|
|
822
|
+
server: {
|
|
823
|
+
host: "127.0.0.1",
|
|
824
|
+
port: 8080,
|
|
825
|
+
base_url: "http://127.0.0.1:8080",
|
|
826
|
+
websocket: { heartbeat_interval: "10s", client_timeout: "30s", toast_ttl: "6s" },
|
|
827
|
+
},
|
|
828
|
+
storage: {
|
|
829
|
+
sqlite_path: ":memory:",
|
|
830
|
+
process_workspaces_dir: "/tmp/leitwerk/workspaces",
|
|
831
|
+
tree_files_dir: "/tmp/leitwerk/trees",
|
|
832
|
+
},
|
|
833
|
+
components: {},
|
|
834
|
+
workers: {
|
|
835
|
+
runner: "docker",
|
|
836
|
+
default_runtime_profile: "generic",
|
|
837
|
+
max_parallel_processes: 8,
|
|
838
|
+
startup_timeout: "30s",
|
|
839
|
+
shutdown_grace_period: "15s",
|
|
840
|
+
heartbeat_interval: "5s",
|
|
841
|
+
turn_max_duration: "30m",
|
|
842
|
+
turn_inactivity_timeout: "5m",
|
|
843
|
+
turn_abort_grace_period: "5s",
|
|
844
|
+
stale_heartbeat_timeout: "30s",
|
|
845
|
+
resume_on_boot: true,
|
|
846
|
+
idle_worker_ttl: "0s",
|
|
847
|
+
session_snapshot_max_size_bytes: 128 * 1024 * 1024,
|
|
848
|
+
log_worker_events_to_stdout: false,
|
|
849
|
+
cleanup: {
|
|
850
|
+
transient_ttl: "1h",
|
|
851
|
+
completed_process_retention: "168h",
|
|
852
|
+
error_process_retention: "720h",
|
|
853
|
+
},
|
|
854
|
+
},
|
|
855
|
+
pi: {
|
|
856
|
+
agent_dir: "~/.pi/leitwerk",
|
|
857
|
+
model_profiles: cloneValue(DEFAULT_MODEL_PROFILES),
|
|
858
|
+
process_title_generation: {
|
|
859
|
+
model_profile: null,
|
|
860
|
+
retry: {
|
|
861
|
+
max_attempts: 6,
|
|
862
|
+
base_delay: "5s",
|
|
863
|
+
max_delay: "5m",
|
|
864
|
+
},
|
|
865
|
+
},
|
|
866
|
+
retry: {
|
|
867
|
+
enabled: true,
|
|
868
|
+
max_retries: 3,
|
|
869
|
+
base_delay: "2s",
|
|
870
|
+
provider: {
|
|
871
|
+
timeout: null,
|
|
872
|
+
max_retries: null,
|
|
873
|
+
max_retry_delay: "60s",
|
|
874
|
+
},
|
|
875
|
+
},
|
|
876
|
+
},
|
|
877
|
+
process_configs: {},
|
|
878
|
+
notifications: {
|
|
879
|
+
all: { enabled: false, type: "teams_webhook", url: "" },
|
|
880
|
+
debug: { enabled: false, type: "teams_webhook", url: "" },
|
|
881
|
+
squad: { enabled: false, type: "teams_webhook", routing_field: "", routes: {} },
|
|
882
|
+
},
|
|
883
|
+
sandbox: { enabled: false, profile: "" },
|
|
884
|
+
extension_loading: {
|
|
885
|
+
sources: [],
|
|
886
|
+
},
|
|
887
|
+
local_worker: {
|
|
888
|
+
command: "node",
|
|
889
|
+
args: ["@leitwerk-dev/worker/worker-entry"],
|
|
890
|
+
},
|
|
891
|
+
docker: {
|
|
892
|
+
socket: "unix:///var/run/docker.sock",
|
|
893
|
+
network: "leitwerk",
|
|
894
|
+
server_url: "http://leitwerk-server:8080",
|
|
895
|
+
process_volume: {
|
|
896
|
+
mode: "bind",
|
|
897
|
+
host_root: "/var/lib/leitwerk/processes",
|
|
898
|
+
mount_path: "/state",
|
|
899
|
+
},
|
|
900
|
+
},
|
|
901
|
+
kubernetes: {
|
|
902
|
+
server_namespace: "leitwerk-system",
|
|
903
|
+
process_namespace_prefix: "leitwerk-process-",
|
|
904
|
+
server_url: "http://leitwerk-server.leitwerk-system.svc.cluster.local:8080",
|
|
905
|
+
default_worker_runtime_profile: "generic",
|
|
906
|
+
worker_service_account: "leitwerk-worker",
|
|
907
|
+
process_volume: {
|
|
908
|
+
size: "20Gi",
|
|
909
|
+
access_modes: ["ReadWriteOnce"],
|
|
910
|
+
mount_path: "/state",
|
|
911
|
+
},
|
|
912
|
+
pod: { node_selector: {}, tolerations: [], annotations: {} },
|
|
913
|
+
image_pull_secrets: [],
|
|
914
|
+
image_pull_secret_copies: [],
|
|
915
|
+
},
|
|
916
|
+
worker_runtime_profiles: {
|
|
917
|
+
generic: { image: "ghcr.io/example/leitwerk-worker-generic:0.1.0" },
|
|
918
|
+
},
|
|
919
|
+
internal_tls: { enabled: false },
|
|
920
|
+
extensions: {},
|
|
921
|
+
auth: { enabled: false },
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
//# sourceMappingURL=config-loader.js.map
|