@leitwerk-dev/server 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +898 -31
- package/dist/index.js +238 -29
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +2 -2
- package/dist/main.js +119 -58
- package/dist/main.js.map +1 -1
- package/dist/testing.d.ts +114 -8
- package/dist/testing.js +345 -6
- package/dist/testing.js.map +1 -1
- package/package.json +10 -10
- package/dist/app.d.ts +0 -65
- package/dist/app.d.ts.map +0 -1
- package/dist/app.js +0 -909
- package/dist/app.js.map +0 -1
- package/dist/auth/auth-config.d.ts +0 -21
- package/dist/auth/auth-config.d.ts.map +0 -1
- package/dist/auth/auth-config.js +0 -42
- package/dist/auth/auth-config.js.map +0 -1
- package/dist/auth/auth-service.d.ts +0 -41
- package/dist/auth/auth-service.d.ts.map +0 -1
- package/dist/auth/auth-service.js +0 -129
- package/dist/auth/auth-service.js.map +0 -1
- package/dist/auth/auth-test-helpers.d.ts +0 -10
- package/dist/auth/auth-test-helpers.d.ts.map +0 -1
- package/dist/auth/auth-test-helpers.js +0 -30
- package/dist/auth/auth-test-helpers.js.map +0 -1
- package/dist/auth/auth-tokens.d.ts +0 -4
- package/dist/auth/auth-tokens.d.ts.map +0 -1
- package/dist/auth/auth-tokens.js +0 -11
- package/dist/auth/auth-tokens.js.map +0 -1
- package/dist/auth/fastify-auth.d.ts +0 -12
- package/dist/auth/fastify-auth.d.ts.map +0 -1
- package/dist/auth/fastify-auth.js +0 -20
- package/dist/auth/fastify-auth.js.map +0 -1
- package/dist/auth/oidc-client.d.ts +0 -21
- package/dist/auth/oidc-client.d.ts.map +0 -1
- package/dist/auth/oidc-client.js +0 -55
- package/dist/auth/oidc-client.js.map +0 -1
- package/dist/auth/routes.d.ts +0 -4
- package/dist/auth/routes.d.ts.map +0 -1
- package/dist/auth/routes.js +0 -74
- package/dist/auth/routes.js.map +0 -1
- package/dist/commit-message-policy.d.ts +0 -5
- package/dist/commit-message-policy.d.ts.map +0 -1
- package/dist/commit-message-policy.js +0 -15
- package/dist/commit-message-policy.js.map +0 -1
- package/dist/config/config-loader.d.ts +0 -18
- package/dist/config/config-loader.d.ts.map +0 -1
- package/dist/config/config-loader.js +0 -924
- package/dist/config/config-loader.js.map +0 -1
- package/dist/config/config-types.d.ts +0 -219
- package/dist/config/config-types.d.ts.map +0 -1
- package/dist/config/config-types.js +0 -2
- package/dist/config/config-types.js.map +0 -1
- package/dist/config/index.d.ts +0 -3
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -2
- package/dist/config/index.js.map +0 -1
- package/dist/config/url-policy.d.ts +0 -6
- package/dist/config/url-policy.d.ts.map +0 -1
- package/dist/config/url-policy.js +0 -25
- package/dist/config/url-policy.js.map +0 -1
- package/dist/db/auth-repo.d.ts +0 -39
- package/dist/db/auth-repo.d.ts.map +0 -1
- package/dist/db/auth-repo.js +0 -92
- package/dist/db/auth-repo.js.map +0 -1
- package/dist/db/credential-cipher.d.ts +0 -13
- package/dist/db/credential-cipher.d.ts.map +0 -1
- package/dist/db/credential-cipher.js +0 -47
- package/dist/db/credential-cipher.js.map +0 -1
- package/dist/db/database.d.ts +0 -30
- package/dist/db/database.d.ts.map +0 -1
- package/dist/db/database.js +0 -423
- package/dist/db/database.js.map +0 -1
- package/dist/db/external-write-log-repo.d.ts +0 -14
- package/dist/db/external-write-log-repo.d.ts.map +0 -1
- package/dist/db/external-write-log-repo.js +0 -49
- package/dist/db/external-write-log-repo.js.map +0 -1
- package/dist/db/future-execution-repo.d.ts +0 -61
- package/dist/db/future-execution-repo.d.ts.map +0 -1
- package/dist/db/future-execution-repo.js +0 -267
- package/dist/db/future-execution-repo.js.map +0 -1
- package/dist/db/index.d.ts +0 -4
- package/dist/db/index.d.ts.map +0 -1
- package/dist/db/index.js +0 -4
- package/dist/db/index.js.map +0 -1
- package/dist/db/launcher-recent-value-repo.d.ts +0 -21
- package/dist/db/launcher-recent-value-repo.d.ts.map +0 -1
- package/dist/db/launcher-recent-value-repo.js +0 -76
- package/dist/db/launcher-recent-value-repo.js.map +0 -1
- package/dist/db/pending-external-source-fire-repo.d.ts +0 -41
- package/dist/db/pending-external-source-fire-repo.d.ts.map +0 -1
- package/dist/db/pending-external-source-fire-repo.js +0 -108
- package/dist/db/pending-external-source-fire-repo.js.map +0 -1
- package/dist/db/process-event-repo.d.ts +0 -19
- package/dist/db/process-event-repo.d.ts.map +0 -1
- package/dist/db/process-event-repo.js +0 -98
- package/dist/db/process-event-repo.js.map +0 -1
- package/dist/db/process-handoff-dedup-key-repo.d.ts +0 -17
- package/dist/db/process-handoff-dedup-key-repo.d.ts.map +0 -1
- package/dist/db/process-handoff-dedup-key-repo.js +0 -34
- package/dist/db/process-handoff-dedup-key-repo.js.map +0 -1
- package/dist/db/process-input-repo.d.ts +0 -20
- package/dist/db/process-input-repo.d.ts.map +0 -1
- package/dist/db/process-input-repo.js +0 -90
- package/dist/db/process-input-repo.js.map +0 -1
- package/dist/db/process-instance-repo.d.ts +0 -60
- package/dist/db/process-instance-repo.d.ts.map +0 -1
- package/dist/db/process-instance-repo.js +0 -281
- package/dist/db/process-instance-repo.js.map +0 -1
- package/dist/db/process-leaf-outcome-snapshot-repo.d.ts +0 -23
- package/dist/db/process-leaf-outcome-snapshot-repo.d.ts.map +0 -1
- package/dist/db/process-leaf-outcome-snapshot-repo.js +0 -77
- package/dist/db/process-leaf-outcome-snapshot-repo.js.map +0 -1
- package/dist/db/process-project-repo.d.ts +0 -32
- package/dist/db/process-project-repo.d.ts.map +0 -1
- package/dist/db/process-project-repo.js +0 -129
- package/dist/db/process-project-repo.js.map +0 -1
- package/dist/db/process-question-request-repo.d.ts +0 -26
- package/dist/db/process-question-request-repo.d.ts.map +0 -1
- package/dist/db/process-question-request-repo.js +0 -99
- package/dist/db/process-question-request-repo.js.map +0 -1
- package/dist/db/process-skill-repo.d.ts +0 -9
- package/dist/db/process-skill-repo.d.ts.map +0 -1
- package/dist/db/process-skill-repo.js +0 -58
- package/dist/db/process-skill-repo.js.map +0 -1
- package/dist/db/process-title-job-repo.d.ts +0 -53
- package/dist/db/process-title-job-repo.d.ts.map +0 -1
- package/dist/db/process-title-job-repo.js +0 -173
- package/dist/db/process-title-job-repo.js.map +0 -1
- package/dist/db/process-turn-annotation-repo.d.ts +0 -30
- package/dist/db/process-turn-annotation-repo.d.ts.map +0 -1
- package/dist/db/process-turn-annotation-repo.js +0 -104
- package/dist/db/process-turn-annotation-repo.js.map +0 -1
- package/dist/db/process-turn-record-repo.d.ts +0 -47
- package/dist/db/process-turn-record-repo.d.ts.map +0 -1
- package/dist/db/process-turn-record-repo.js +0 -125
- package/dist/db/process-turn-record-repo.js.map +0 -1
- package/dist/db/provider-credential-repo.d.ts +0 -23
- package/dist/db/provider-credential-repo.d.ts.map +0 -1
- package/dist/db/provider-credential-repo.js +0 -60
- package/dist/db/provider-credential-repo.js.map +0 -1
- package/dist/db/repo-helpers.d.ts +0 -5
- package/dist/db/repo-helpers.d.ts.map +0 -1
- package/dist/db/repo-helpers.js +0 -20
- package/dist/db/repo-helpers.js.map +0 -1
- package/dist/db/repositories.d.ts +0 -71
- package/dist/db/repositories.d.ts.map +0 -1
- package/dist/db/repositories.js +0 -73
- package/dist/db/repositories.js.map +0 -1
- package/dist/db/schema-ddl.d.ts +0 -6
- package/dist/db/schema-ddl.d.ts.map +0 -1
- package/dist/db/schema-ddl.js +0 -99
- package/dist/db/schema-ddl.js.map +0 -1
- package/dist/db/schema.d.ts +0 -4678
- package/dist/db/schema.d.ts.map +0 -1
- package/dist/db/schema.js +0 -475
- package/dist/db/schema.js.map +0 -1
- package/dist/db/skill-repo.d.ts +0 -28
- package/dist/db/skill-repo.d.ts.map +0 -1
- package/dist/db/skill-repo.js +0 -476
- package/dist/db/skill-repo.js.map +0 -1
- package/dist/db/turn-start-record-repo.d.ts +0 -15
- package/dist/db/turn-start-record-repo.d.ts.map +0 -1
- package/dist/db/turn-start-record-repo.js +0 -67
- package/dist/db/turn-start-record-repo.js.map +0 -1
- package/dist/db/worker-lease-repo.d.ts +0 -32
- package/dist/db/worker-lease-repo.d.ts.map +0 -1
- package/dist/db/worker-lease-repo.js +0 -109
- package/dist/db/worker-lease-repo.js.map +0 -1
- package/dist/domain-logic/cron.d.ts +0 -2
- package/dist/domain-logic/cron.d.ts.map +0 -1
- package/dist/domain-logic/cron.js +0 -25
- package/dist/domain-logic/cron.js.map +0 -1
- package/dist/domain-logic/idempotency.d.ts +0 -3
- package/dist/domain-logic/idempotency.d.ts.map +0 -1
- package/dist/domain-logic/idempotency.js +0 -3
- package/dist/domain-logic/idempotency.js.map +0 -1
- package/dist/domain-logic/index.d.ts +0 -7
- package/dist/domain-logic/index.d.ts.map +0 -1
- package/dist/domain-logic/index.js +0 -6
- package/dist/domain-logic/index.js.map +0 -1
- package/dist/domain-logic/input-sequencer.d.ts +0 -16
- package/dist/domain-logic/input-sequencer.d.ts.map +0 -1
- package/dist/domain-logic/input-sequencer.js +0 -2
- package/dist/domain-logic/input-sequencer.js.map +0 -1
- package/dist/domain-logic/outcome-tools.d.ts +0 -13
- package/dist/domain-logic/outcome-tools.d.ts.map +0 -1
- package/dist/domain-logic/outcome-tools.js +0 -267
- package/dist/domain-logic/outcome-tools.js.map +0 -1
- package/dist/domain-logic/process-state-machine.d.ts +0 -32
- package/dist/domain-logic/process-state-machine.d.ts.map +0 -1
- package/dist/domain-logic/process-state-machine.js +0 -140
- package/dist/domain-logic/process-state-machine.js.map +0 -1
- package/dist/domain-logic/scheduled-action-lock.d.ts +0 -21
- package/dist/domain-logic/scheduled-action-lock.d.ts.map +0 -1
- package/dist/domain-logic/scheduled-action-lock.js +0 -39
- package/dist/domain-logic/scheduled-action-lock.js.map +0 -1
- package/dist/domain-logic/string-normalize.d.ts +0 -2
- package/dist/domain-logic/string-normalize.d.ts.map +0 -1
- package/dist/domain-logic/string-normalize.js +0 -2
- package/dist/domain-logic/string-normalize.js.map +0 -1
- package/dist/domain-logic/turn-record-guards.d.ts +0 -9
- package/dist/domain-logic/turn-record-guards.d.ts.map +0 -1
- package/dist/domain-logic/turn-record-guards.js +0 -26
- package/dist/domain-logic/turn-record-guards.js.map +0 -1
- package/dist/domain-logic/worker-lease-lifecycle.d.ts +0 -30
- package/dist/domain-logic/worker-lease-lifecycle.d.ts.map +0 -1
- package/dist/domain-logic/worker-lease-lifecycle.js +0 -77
- package/dist/domain-logic/worker-lease-lifecycle.js.map +0 -1
- package/dist/effects/post-commit-effect.d.ts +0 -48
- package/dist/effects/post-commit-effect.d.ts.map +0 -1
- package/dist/effects/post-commit-effect.js +0 -8
- package/dist/effects/post-commit-effect.js.map +0 -1
- package/dist/effects/post-commit-runner.d.ts +0 -32
- package/dist/effects/post-commit-runner.d.ts.map +0 -1
- package/dist/effects/post-commit-runner.js +0 -215
- package/dist/effects/post-commit-runner.js.map +0 -1
- package/dist/extension-ui/catalog.d.ts +0 -42
- package/dist/extension-ui/catalog.d.ts.map +0 -1
- package/dist/extension-ui/catalog.js +0 -265
- package/dist/extension-ui/catalog.js.map +0 -1
- package/dist/extensions/extension-host.d.ts +0 -14
- package/dist/extensions/extension-host.d.ts.map +0 -1
- package/dist/extensions/extension-host.js +0 -34
- package/dist/extensions/extension-host.js.map +0 -1
- package/dist/external-source-service.d.ts +0 -16
- package/dist/external-source-service.d.ts.map +0 -1
- package/dist/external-source-service.js +0 -1033
- package/dist/external-source-service.js.map +0 -1
- package/dist/filesystem-process-watchers.d.ts +0 -22
- package/dist/filesystem-process-watchers.d.ts.map +0 -1
- package/dist/filesystem-process-watchers.js +0 -79
- package/dist/filesystem-process-watchers.js.map +0 -1
- package/dist/future-execution/execution.d.ts +0 -60
- package/dist/future-execution/execution.d.ts.map +0 -1
- package/dist/future-execution/execution.js +0 -321
- package/dist/future-execution/execution.js.map +0 -1
- package/dist/future-execution/index.d.ts +0 -2
- package/dist/future-execution/index.d.ts.map +0 -1
- package/dist/future-execution/index.js +0 -2
- package/dist/future-execution/index.js.map +0 -1
- package/dist/future-execution/lifecycle.d.ts +0 -197
- package/dist/future-execution/lifecycle.d.ts.map +0 -1
- package/dist/future-execution/lifecycle.js +0 -783
- package/dist/future-execution/lifecycle.js.map +0 -1
- package/dist/future-execution/model-projection.d.ts +0 -40
- package/dist/future-execution/model-projection.d.ts.map +0 -1
- package/dist/future-execution/model-projection.js +0 -98
- package/dist/future-execution/model-projection.js.map +0 -1
- package/dist/future-execution/reconciliation.d.ts +0 -29
- package/dist/future-execution/reconciliation.d.ts.map +0 -1
- package/dist/future-execution/reconciliation.js +0 -91
- package/dist/future-execution/reconciliation.js.map +0 -1
- package/dist/future-execution/support.d.ts +0 -16
- package/dist/future-execution/support.d.ts.map +0 -1
- package/dist/future-execution/support.js +0 -36
- package/dist/future-execution/support.js.map +0 -1
- package/dist/future-execution/transition-planner.d.ts +0 -49
- package/dist/future-execution/transition-planner.d.ts.map +0 -1
- package/dist/future-execution/transition-planner.js +0 -84
- package/dist/future-execution/transition-planner.js.map +0 -1
- package/dist/future-execution-broadcast.d.ts +0 -4
- package/dist/future-execution-broadcast.d.ts.map +0 -1
- package/dist/future-execution-broadcast.js +0 -13
- package/dist/future-execution-broadcast.js.map +0 -1
- package/dist/future-execution-presenter.d.ts +0 -22
- package/dist/future-execution-presenter.d.ts.map +0 -1
- package/dist/future-execution-presenter.js +0 -143
- package/dist/future-execution-presenter.js.map +0 -1
- package/dist/future-execution-scheduler.d.ts +0 -10
- package/dist/future-execution-scheduler.d.ts.map +0 -1
- package/dist/future-execution-scheduler.js +0 -37
- package/dist/future-execution-scheduler.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/instance-tree.d.ts +0 -22
- package/dist/instance-tree.d.ts.map +0 -1
- package/dist/instance-tree.js +0 -41
- package/dist/instance-tree.js.map +0 -1
- package/dist/launch-title.d.ts +0 -11
- package/dist/launch-title.d.ts.map +0 -1
- package/dist/launch-title.js +0 -36
- package/dist/launch-title.js.map +0 -1
- package/dist/launcher-model-config-service.d.ts +0 -33
- package/dist/launcher-model-config-service.d.ts.map +0 -1
- package/dist/launcher-model-config-service.js +0 -73
- package/dist/launcher-model-config-service.js.map +0 -1
- package/dist/launcher-recent-values-service.d.ts +0 -12
- package/dist/launcher-recent-values-service.d.ts.map +0 -1
- package/dist/launcher-recent-values-service.js +0 -43
- package/dist/launcher-recent-values-service.js.map +0 -1
- package/dist/leaf-outcome-snapshot-capture.d.ts +0 -26
- package/dist/leaf-outcome-snapshot-capture.d.ts.map +0 -1
- package/dist/leaf-outcome-snapshot-capture.js +0 -101
- package/dist/leaf-outcome-snapshot-capture.js.map +0 -1
- package/dist/live-turn-projection.d.ts +0 -2
- package/dist/live-turn-projection.d.ts.map +0 -1
- package/dist/live-turn-projection.js +0 -2
- package/dist/live-turn-projection.js.map +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/model-providers/builtin-server-adapter.d.ts +0 -7
- package/dist/model-providers/builtin-server-adapter.d.ts.map +0 -1
- package/dist/model-providers/builtin-server-adapter.js +0 -65
- package/dist/model-providers/builtin-server-adapter.js.map +0 -1
- package/dist/model-providers/credentials.d.ts +0 -34
- package/dist/model-providers/credentials.d.ts.map +0 -1
- package/dist/model-providers/credentials.js +0 -165
- package/dist/model-providers/credentials.js.map +0 -1
- package/dist/model-providers/index.d.ts +0 -7
- package/dist/model-providers/index.d.ts.map +0 -1
- package/dist/model-providers/index.js +0 -7
- package/dist/model-providers/index.js.map +0 -1
- package/dist/model-providers/model-status-cache.d.ts +0 -44
- package/dist/model-providers/model-status-cache.d.ts.map +0 -1
- package/dist/model-providers/model-status-cache.js +0 -220
- package/dist/model-providers/model-status-cache.js.map +0 -1
- package/dist/model-providers/provider-boundary-utils.d.ts +0 -5
- package/dist/model-providers/provider-boundary-utils.d.ts.map +0 -1
- package/dist/model-providers/provider-boundary-utils.js +0 -32
- package/dist/model-providers/provider-boundary-utils.js.map +0 -1
- package/dist/model-providers/provider-options.d.ts +0 -34
- package/dist/model-providers/provider-options.d.ts.map +0 -1
- package/dist/model-providers/provider-options.js +0 -76
- package/dist/model-providers/provider-options.js.map +0 -1
- package/dist/model-providers/registry.d.ts +0 -35
- package/dist/model-providers/registry.d.ts.map +0 -1
- package/dist/model-providers/registry.js +0 -138
- package/dist/model-providers/registry.js.map +0 -1
- package/dist/model-providers/server-adapters.d.ts +0 -28
- package/dist/model-providers/server-adapters.d.ts.map +0 -1
- package/dist/model-providers/server-adapters.js +0 -63
- package/dist/model-providers/server-adapters.js.map +0 -1
- package/dist/pi-resources/assemble.d.ts +0 -36
- package/dist/pi-resources/assemble.d.ts.map +0 -1
- package/dist/pi-resources/assemble.js +0 -275
- package/dist/pi-resources/assemble.js.map +0 -1
- package/dist/pi-resources/bundle-cache.d.ts +0 -27
- package/dist/pi-resources/bundle-cache.d.ts.map +0 -1
- package/dist/pi-resources/bundle-cache.js +0 -125
- package/dist/pi-resources/bundle-cache.js.map +0 -1
- package/dist/pi-resources/bundle-pin-lifecycle.d.ts +0 -13
- package/dist/pi-resources/bundle-pin-lifecycle.d.ts.map +0 -1
- package/dist/pi-resources/bundle-pin-lifecycle.js +0 -41
- package/dist/pi-resources/bundle-pin-lifecycle.js.map +0 -1
- package/dist/pi-resources/index.d.ts +0 -4
- package/dist/pi-resources/index.d.ts.map +0 -1
- package/dist/pi-resources/index.js +0 -4
- package/dist/pi-resources/index.js.map +0 -1
- package/dist/pi-resources/resource-collector.d.ts +0 -41
- package/dist/pi-resources/resource-collector.d.ts.map +0 -1
- package/dist/pi-resources/resource-collector.js +0 -163
- package/dist/pi-resources/resource-collector.js.map +0 -1
- package/dist/pi-session-tree.d.ts +0 -26
- package/dist/pi-session-tree.d.ts.map +0 -1
- package/dist/pi-session-tree.js +0 -106
- package/dist/pi-session-tree.js.map +0 -1
- package/dist/primary-path-snapshot.d.ts +0 -20
- package/dist/primary-path-snapshot.d.ts.map +0 -1
- package/dist/primary-path-snapshot.js +0 -246
- package/dist/primary-path-snapshot.js.map +0 -1
- package/dist/process-action-input-validation.d.ts +0 -8
- package/dist/process-action-input-validation.d.ts.map +0 -1
- package/dist/process-action-input-validation.js +0 -75
- package/dist/process-action-input-validation.js.map +0 -1
- package/dist/process-action-next-turn-model.d.ts +0 -20
- package/dist/process-action-next-turn-model.d.ts.map +0 -1
- package/dist/process-action-next-turn-model.js +0 -102
- package/dist/process-action-next-turn-model.js.map +0 -1
- package/dist/process-action-planner.d.ts +0 -35
- package/dist/process-action-planner.d.ts.map +0 -1
- package/dist/process-action-planner.js +0 -93
- package/dist/process-action-planner.js.map +0 -1
- package/dist/process-action-registry.d.ts +0 -64
- package/dist/process-action-registry.d.ts.map +0 -1
- package/dist/process-action-registry.js +0 -332
- package/dist/process-action-registry.js.map +0 -1
- package/dist/process-attention-notifier.d.ts +0 -6
- package/dist/process-attention-notifier.d.ts.map +0 -1
- package/dist/process-attention-notifier.js +0 -41
- package/dist/process-attention-notifier.js.map +0 -1
- package/dist/process-deletion-service.d.ts +0 -42
- package/dist/process-deletion-service.d.ts.map +0 -1
- package/dist/process-deletion-service.js +0 -48
- package/dist/process-deletion-service.js.map +0 -1
- package/dist/process-engine/decision.d.ts +0 -36
- package/dist/process-engine/decision.d.ts.map +0 -1
- package/dist/process-engine/decision.js +0 -22
- package/dist/process-engine/decision.js.map +0 -1
- package/dist/process-engine/engine.d.ts +0 -3
- package/dist/process-engine/engine.d.ts.map +0 -1
- package/dist/process-engine/engine.js +0 -168
- package/dist/process-engine/engine.js.map +0 -1
- package/dist/process-engine/index.d.ts +0 -11
- package/dist/process-engine/index.d.ts.map +0 -1
- package/dist/process-engine/index.js +0 -8
- package/dist/process-engine/index.js.map +0 -1
- package/dist/process-engine/internal-failures.d.ts +0 -17
- package/dist/process-engine/internal-failures.d.ts.map +0 -1
- package/dist/process-engine/internal-failures.js +0 -32
- package/dist/process-engine/internal-failures.js.map +0 -1
- package/dist/process-engine/operation.d.ts +0 -34
- package/dist/process-engine/operation.d.ts.map +0 -1
- package/dist/process-engine/operation.js +0 -4
- package/dist/process-engine/operation.js.map +0 -1
- package/dist/process-engine/ops/abort-process.d.ts +0 -7
- package/dist/process-engine/ops/abort-process.d.ts.map +0 -1
- package/dist/process-engine/ops/abort-process.js +0 -104
- package/dist/process-engine/ops/abort-process.js.map +0 -1
- package/dist/process-engine/ops/abort-turn.d.ts +0 -8
- package/dist/process-engine/ops/abort-turn.d.ts.map +0 -1
- package/dist/process-engine/ops/abort-turn.js +0 -48
- package/dist/process-engine/ops/abort-turn.js.map +0 -1
- package/dist/process-engine/ops/accept-worker-turn-start.d.ts +0 -10
- package/dist/process-engine/ops/accept-worker-turn-start.d.ts.map +0 -1
- package/dist/process-engine/ops/accept-worker-turn-start.js +0 -137
- package/dist/process-engine/ops/accept-worker-turn-start.js.map +0 -1
- package/dist/process-engine/ops/continue-failed-turn.d.ts +0 -13
- package/dist/process-engine/ops/continue-failed-turn.d.ts.map +0 -1
- package/dist/process-engine/ops/continue-failed-turn.js +0 -109
- package/dist/process-engine/ops/continue-failed-turn.js.map +0 -1
- package/dist/process-engine/ops/deferred-process-activation.d.ts +0 -16
- package/dist/process-engine/ops/deferred-process-activation.d.ts.map +0 -1
- package/dist/process-engine/ops/deferred-process-activation.js +0 -98
- package/dist/process-engine/ops/deferred-process-activation.js.map +0 -1
- package/dist/process-engine/ops/execute-action.d.ts +0 -17
- package/dist/process-engine/ops/execute-action.d.ts.map +0 -1
- package/dist/process-engine/ops/execute-action.js +0 -292
- package/dist/process-engine/ops/execute-action.js.map +0 -1
- package/dist/process-engine/ops/index.d.ts +0 -17
- package/dist/process-engine/ops/index.d.ts.map +0 -1
- package/dist/process-engine/ops/index.js +0 -17
- package/dist/process-engine/ops/index.js.map +0 -1
- package/dist/process-engine/ops/park-process.d.ts +0 -7
- package/dist/process-engine/ops/park-process.d.ts.map +0 -1
- package/dist/process-engine/ops/park-process.js +0 -14
- package/dist/process-engine/ops/park-process.js.map +0 -1
- package/dist/process-engine/ops/queue-inputs.d.ts +0 -12
- package/dist/process-engine/ops/queue-inputs.d.ts.map +0 -1
- package/dist/process-engine/ops/queue-inputs.js +0 -35
- package/dist/process-engine/ops/queue-inputs.js.map +0 -1
- package/dist/process-engine/ops/retry-failed-turn.d.ts +0 -9
- package/dist/process-engine/ops/retry-failed-turn.d.ts.map +0 -1
- package/dist/process-engine/ops/retry-failed-turn.js +0 -74
- package/dist/process-engine/ops/retry-failed-turn.js.map +0 -1
- package/dist/process-engine/ops/retry-startup.d.ts +0 -11
- package/dist/process-engine/ops/retry-startup.d.ts.map +0 -1
- package/dist/process-engine/ops/retry-startup.js +0 -65
- package/dist/process-engine/ops/retry-startup.js.map +0 -1
- package/dist/process-engine/ops/start-process.d.ts +0 -8
- package/dist/process-engine/ops/start-process.d.ts.map +0 -1
- package/dist/process-engine/ops/start-process.js +0 -20
- package/dist/process-engine/ops/start-process.js.map +0 -1
- package/dist/process-engine/ops/turn-failed.d.ts +0 -7
- package/dist/process-engine/ops/turn-failed.d.ts.map +0 -1
- package/dist/process-engine/ops/turn-failed.js +0 -34
- package/dist/process-engine/ops/turn-failed.js.map +0 -1
- package/dist/process-engine/ops/turn-outcome.d.ts +0 -7
- package/dist/process-engine/ops/turn-outcome.d.ts.map +0 -1
- package/dist/process-engine/ops/turn-outcome.js +0 -345
- package/dist/process-engine/ops/turn-outcome.js.map +0 -1
- package/dist/process-engine/ops/update-product-refs.d.ts +0 -7
- package/dist/process-engine/ops/update-product-refs.d.ts.map +0 -1
- package/dist/process-engine/ops/update-product-refs.js +0 -18
- package/dist/process-engine/ops/update-product-refs.js.map +0 -1
- package/dist/process-engine/ops/update-semantic-refs.d.ts +0 -7
- package/dist/process-engine/ops/update-semantic-refs.d.ts.map +0 -1
- package/dist/process-engine/ops/update-semantic-refs.js +0 -21
- package/dist/process-engine/ops/update-semantic-refs.js.map +0 -1
- package/dist/process-engine/ops/worker-failure.d.ts +0 -11
- package/dist/process-engine/ops/worker-failure.d.ts.map +0 -1
- package/dist/process-engine/ops/worker-failure.js +0 -79
- package/dist/process-engine/ops/worker-failure.js.map +0 -1
- package/dist/process-engine/reactions.d.ts +0 -14
- package/dist/process-engine/reactions.d.ts.map +0 -1
- package/dist/process-engine/reactions.js +0 -23
- package/dist/process-engine/reactions.js.map +0 -1
- package/dist/process-engine/recorder.d.ts +0 -14
- package/dist/process-engine/recorder.d.ts.map +0 -1
- package/dist/process-engine/recorder.js +0 -245
- package/dist/process-engine/recorder.js.map +0 -1
- package/dist/process-engine/runner.d.ts +0 -6
- package/dist/process-engine/runner.d.ts.map +0 -1
- package/dist/process-engine/runner.js +0 -194
- package/dist/process-engine/runner.js.map +0 -1
- package/dist/process-engine/startup-reconciliation.d.ts +0 -26
- package/dist/process-engine/startup-reconciliation.d.ts.map +0 -1
- package/dist/process-engine/startup-reconciliation.js +0 -130
- package/dist/process-engine/startup-reconciliation.js.map +0 -1
- package/dist/process-engine/state-json.d.ts +0 -2
- package/dist/process-engine/state-json.d.ts.map +0 -1
- package/dist/process-engine/state-json.js +0 -5
- package/dist/process-engine/state-json.js.map +0 -1
- package/dist/process-engine/turn-start-preflight.d.ts +0 -30
- package/dist/process-engine/turn-start-preflight.d.ts.map +0 -1
- package/dist/process-engine/turn-start-preflight.js +0 -229
- package/dist/process-engine/turn-start-preflight.js.map +0 -1
- package/dist/process-engine/turn-worker-requirement.d.ts +0 -8
- package/dist/process-engine/turn-worker-requirement.d.ts.map +0 -1
- package/dist/process-engine/turn-worker-requirement.js +0 -11
- package/dist/process-engine/turn-worker-requirement.js.map +0 -1
- package/dist/process-engine/types.d.ts +0 -184
- package/dist/process-engine/types.d.ts.map +0 -1
- package/dist/process-engine/types.js +0 -2
- package/dist/process-engine/types.js.map +0 -1
- package/dist/process-engine/worker-reconciliation.d.ts +0 -8
- package/dist/process-engine/worker-reconciliation.d.ts.map +0 -1
- package/dist/process-engine/worker-reconciliation.js +0 -29
- package/dist/process-engine/worker-reconciliation.js.map +0 -1
- package/dist/process-engine/writes/build-continue-failed-turn-writes.d.ts +0 -13
- package/dist/process-engine/writes/build-continue-failed-turn-writes.d.ts.map +0 -1
- package/dist/process-engine/writes/build-continue-failed-turn-writes.js +0 -95
- package/dist/process-engine/writes/build-continue-failed-turn-writes.js.map +0 -1
- package/dist/process-engine/writes/build-process-abort-writes.d.ts +0 -11
- package/dist/process-engine/writes/build-process-abort-writes.d.ts.map +0 -1
- package/dist/process-engine/writes/build-process-abort-writes.js +0 -64
- package/dist/process-engine/writes/build-process-abort-writes.js.map +0 -1
- package/dist/process-engine/writes/build-process-action-writes.d.ts +0 -25
- package/dist/process-engine/writes/build-process-action-writes.d.ts.map +0 -1
- package/dist/process-engine/writes/build-process-action-writes.js +0 -140
- package/dist/process-engine/writes/build-process-action-writes.js.map +0 -1
- package/dist/process-engine/writes/build-process-park-writes.d.ts +0 -9
- package/dist/process-engine/writes/build-process-park-writes.d.ts.map +0 -1
- package/dist/process-engine/writes/build-process-park-writes.js +0 -48
- package/dist/process-engine/writes/build-process-park-writes.js.map +0 -1
- package/dist/process-engine/writes/build-retry-writes.d.ts +0 -11
- package/dist/process-engine/writes/build-retry-writes.d.ts.map +0 -1
- package/dist/process-engine/writes/build-retry-writes.js +0 -83
- package/dist/process-engine/writes/build-retry-writes.js.map +0 -1
- package/dist/process-engine/writes/build-server-transition-writes.d.ts +0 -6
- package/dist/process-engine/writes/build-server-transition-writes.d.ts.map +0 -1
- package/dist/process-engine/writes/build-server-transition-writes.js +0 -81
- package/dist/process-engine/writes/build-server-transition-writes.js.map +0 -1
- package/dist/process-engine/writes/build-turn-failed-writes.d.ts +0 -10
- package/dist/process-engine/writes/build-turn-failed-writes.d.ts.map +0 -1
- package/dist/process-engine/writes/build-turn-failed-writes.js +0 -52
- package/dist/process-engine/writes/build-turn-failed-writes.js.map +0 -1
- package/dist/process-engine/writes/build-turn-outcome-writes.d.ts +0 -15
- package/dist/process-engine/writes/build-turn-outcome-writes.d.ts.map +0 -1
- package/dist/process-engine/writes/build-turn-outcome-writes.js +0 -171
- package/dist/process-engine/writes/build-turn-outcome-writes.js.map +0 -1
- package/dist/process-engine/writes/build-turn-selection-writes.d.ts +0 -15
- package/dist/process-engine/writes/build-turn-selection-writes.d.ts.map +0 -1
- package/dist/process-engine/writes/build-turn-selection-writes.js +0 -214
- package/dist/process-engine/writes/build-turn-selection-writes.js.map +0 -1
- package/dist/process-engine/writes/build-worker-failure-writes.d.ts +0 -12
- package/dist/process-engine/writes/build-worker-failure-writes.d.ts.map +0 -1
- package/dist/process-engine/writes/build-worker-failure-writes.js +0 -58
- package/dist/process-engine/writes/build-worker-failure-writes.js.map +0 -1
- package/dist/process-engine/writes/commit-writes.d.ts +0 -28
- package/dist/process-engine/writes/commit-writes.d.ts.map +0 -1
- package/dist/process-engine/writes/commit-writes.js +0 -252
- package/dist/process-engine/writes/commit-writes.js.map +0 -1
- package/dist/process-engine/writes/deferred-extension-events.d.ts +0 -11
- package/dist/process-engine/writes/deferred-extension-events.d.ts.map +0 -1
- package/dist/process-engine/writes/deferred-extension-events.js +0 -13
- package/dist/process-engine/writes/deferred-extension-events.js.map +0 -1
- package/dist/process-engine/writes/process-effects.d.ts +0 -5
- package/dist/process-engine/writes/process-effects.d.ts.map +0 -1
- package/dist/process-engine/writes/process-effects.js +0 -20
- package/dist/process-engine/writes/process-effects.js.map +0 -1
- package/dist/process-engine/writes/writes.d.ts +0 -134
- package/dist/process-engine/writes/writes.d.ts.map +0 -1
- package/dist/process-engine/writes/writes.js +0 -139
- package/dist/process-engine/writes/writes.js.map +0 -1
- package/dist/process-graph.d.ts +0 -6
- package/dist/process-graph.d.ts.map +0 -1
- package/dist/process-graph.js +0 -7
- package/dist/process-graph.js.map +0 -1
- package/dist/process-input-dispatch.d.ts +0 -30
- package/dist/process-input-dispatch.d.ts.map +0 -1
- package/dist/process-input-dispatch.js +0 -85
- package/dist/process-input-dispatch.js.map +0 -1
- package/dist/process-instance-tree-presenter.d.ts +0 -11
- package/dist/process-instance-tree-presenter.d.ts.map +0 -1
- package/dist/process-instance-tree-presenter.js +0 -202
- package/dist/process-instance-tree-presenter.js.map +0 -1
- package/dist/process-launch-executor.d.ts +0 -41
- package/dist/process-launch-executor.d.ts.map +0 -1
- package/dist/process-launch-executor.js +0 -295
- package/dist/process-launch-executor.js.map +0 -1
- package/dist/process-launch-plan-model-config.d.ts +0 -4
- package/dist/process-launch-plan-model-config.d.ts.map +0 -1
- package/dist/process-launch-plan-model-config.js +0 -22
- package/dist/process-launch-plan-model-config.js.map +0 -1
- package/dist/process-launch-plan.d.ts +0 -12
- package/dist/process-launch-plan.d.ts.map +0 -1
- package/dist/process-launch-plan.js +0 -63
- package/dist/process-launch-plan.js.map +0 -1
- package/dist/process-launcher-registry.d.ts +0 -11
- package/dist/process-launcher-registry.d.ts.map +0 -1
- package/dist/process-launcher-registry.js +0 -104
- package/dist/process-launcher-registry.js.map +0 -1
- package/dist/process-model-availability-recovery.d.ts +0 -22
- package/dist/process-model-availability-recovery.d.ts.map +0 -1
- package/dist/process-model-availability-recovery.js +0 -41
- package/dist/process-model-availability-recovery.js.map +0 -1
- package/dist/process-model-availability-transitions.d.ts +0 -8
- package/dist/process-model-availability-transitions.d.ts.map +0 -1
- package/dist/process-model-availability-transitions.js +0 -14
- package/dist/process-model-availability-transitions.js.map +0 -1
- package/dist/process-model-integrity-reconciler.d.ts +0 -16
- package/dist/process-model-integrity-reconciler.d.ts.map +0 -1
- package/dist/process-model-integrity-reconciler.js +0 -27
- package/dist/process-model-integrity-reconciler.js.map +0 -1
- package/dist/process-model-policy/construct.d.ts +0 -19
- package/dist/process-model-policy/construct.d.ts.map +0 -1
- package/dist/process-model-policy/construct.js +0 -94
- package/dist/process-model-policy/construct.js.map +0 -1
- package/dist/process-model-policy/evaluate.d.ts +0 -7
- package/dist/process-model-policy/evaluate.d.ts.map +0 -1
- package/dist/process-model-policy/evaluate.js +0 -163
- package/dist/process-model-policy/evaluate.js.map +0 -1
- package/dist/process-model-policy/fingerprint.d.ts +0 -3
- package/dist/process-model-policy/fingerprint.d.ts.map +0 -1
- package/dist/process-model-policy/fingerprint.js +0 -39
- package/dist/process-model-policy/fingerprint.js.map +0 -1
- package/dist/process-model-policy/index.d.ts +0 -16
- package/dist/process-model-policy/index.d.ts.map +0 -1
- package/dist/process-model-policy/index.js +0 -47
- package/dist/process-model-policy/index.js.map +0 -1
- package/dist/process-model-policy/input.d.ts +0 -12
- package/dist/process-model-policy/input.d.ts.map +0 -1
- package/dist/process-model-policy/input.js +0 -79
- package/dist/process-model-policy/input.js.map +0 -1
- package/dist/process-model-policy/integrity.d.ts +0 -9
- package/dist/process-model-policy/integrity.d.ts.map +0 -1
- package/dist/process-model-policy/integrity.js +0 -53
- package/dist/process-model-policy/integrity.js.map +0 -1
- package/dist/process-model-policy/launch.d.ts +0 -5
- package/dist/process-model-policy/launch.d.ts.map +0 -1
- package/dist/process-model-policy/launch.js +0 -171
- package/dist/process-model-policy/launch.js.map +0 -1
- package/dist/process-model-policy/project.d.ts +0 -3
- package/dist/process-model-policy/project.d.ts.map +0 -1
- package/dist/process-model-policy/project.js +0 -144
- package/dist/process-model-policy/project.js.map +0 -1
- package/dist/process-model-policy/stable-availability.d.ts +0 -17
- package/dist/process-model-policy/stable-availability.d.ts.map +0 -1
- package/dist/process-model-policy/stable-availability.js +0 -16
- package/dist/process-model-policy/stable-availability.js.map +0 -1
- package/dist/process-model-policy/types.d.ts +0 -261
- package/dist/process-model-policy/types.d.ts.map +0 -1
- package/dist/process-model-policy/types.js +0 -9
- package/dist/process-model-policy/types.js.map +0 -1
- package/dist/process-model-policy-presenter.d.ts +0 -17
- package/dist/process-model-policy-presenter.d.ts.map +0 -1
- package/dist/process-model-policy-presenter.js +0 -77
- package/dist/process-model-policy-presenter.js.map +0 -1
- package/dist/process-model-selection.d.ts +0 -32
- package/dist/process-model-selection.d.ts.map +0 -1
- package/dist/process-model-selection.js +0 -101
- package/dist/process-model-selection.js.map +0 -1
- package/dist/process-operation-coordinator.d.ts +0 -5
- package/dist/process-operation-coordinator.d.ts.map +0 -1
- package/dist/process-operation-coordinator.js +0 -23
- package/dist/process-operation-coordinator.js.map +0 -1
- package/dist/process-operator-attention.d.ts +0 -33
- package/dist/process-operator-attention.d.ts.map +0 -1
- package/dist/process-operator-attention.js +0 -149
- package/dist/process-operator-attention.js.map +0 -1
- package/dist/process-overview-presenter.d.ts +0 -61
- package/dist/process-overview-presenter.d.ts.map +0 -1
- package/dist/process-overview-presenter.js +0 -220
- package/dist/process-overview-presenter.js.map +0 -1
- package/dist/process-question-service.d.ts +0 -40
- package/dist/process-question-service.d.ts.map +0 -1
- package/dist/process-question-service.js +0 -131
- package/dist/process-question-service.js.map +0 -1
- package/dist/process-session-store.d.ts +0 -79
- package/dist/process-session-store.d.ts.map +0 -1
- package/dist/process-session-store.js +0 -210
- package/dist/process-session-store.js.map +0 -1
- package/dist/process-title-generator.d.ts +0 -80
- package/dist/process-title-generator.d.ts.map +0 -1
- package/dist/process-title-generator.js +0 -628
- package/dist/process-title-generator.js.map +0 -1
- package/dist/process-turn-trace.d.ts +0 -19
- package/dist/process-turn-trace.d.ts.map +0 -1
- package/dist/process-turn-trace.js +0 -482
- package/dist/process-turn-trace.js.map +0 -1
- package/dist/process-ui-registry.d.ts +0 -10
- package/dist/process-ui-registry.d.ts.map +0 -1
- package/dist/process-ui-registry.js +0 -22
- package/dist/process-ui-registry.js.map +0 -1
- package/dist/process-ui-snapshot-presenter.d.ts +0 -92
- package/dist/process-ui-snapshot-presenter.d.ts.map +0 -1
- package/dist/process-ui-snapshot-presenter.js +0 -875
- package/dist/process-ui-snapshot-presenter.js.map +0 -1
- package/dist/process-watcher-registry.d.ts +0 -40
- package/dist/process-watcher-registry.d.ts.map +0 -1
- package/dist/process-watcher-registry.js +0 -152
- package/dist/process-watcher-registry.js.map +0 -1
- package/dist/product-ref-state.d.ts +0 -13
- package/dist/product-ref-state.d.ts.map +0 -1
- package/dist/product-ref-state.js +0 -84
- package/dist/product-ref-state.js.map +0 -1
- package/dist/product-turn-result-markdown.d.ts +0 -9
- package/dist/product-turn-result-markdown.d.ts.map +0 -1
- package/dist/product-turn-result-markdown.js +0 -44
- package/dist/product-turn-result-markdown.js.map +0 -1
- package/dist/project-mutation-service.d.ts +0 -31
- package/dist/project-mutation-service.d.ts.map +0 -1
- package/dist/project-mutation-service.js +0 -68
- package/dist/project-mutation-service.js.map +0 -1
- package/dist/repository-credentials/service.d.ts +0 -22
- package/dist/repository-credentials/service.d.ts.map +0 -1
- package/dist/repository-credentials/service.js +0 -49
- package/dist/repository-credentials/service.js.map +0 -1
- package/dist/result-image-store.d.ts +0 -29
- package/dist/result-image-store.d.ts.map +0 -1
- package/dist/result-image-store.js +0 -85
- package/dist/result-image-store.js.map +0 -1
- package/dist/result-image-validation.d.ts +0 -15
- package/dist/result-image-validation.d.ts.map +0 -1
- package/dist/result-image-validation.js +0 -47
- package/dist/result-image-validation.js.map +0 -1
- package/dist/routes/future-executions.d.ts +0 -5
- package/dist/routes/future-executions.d.ts.map +0 -1
- package/dist/routes/future-executions.js +0 -62
- package/dist/routes/future-executions.js.map +0 -1
- package/dist/routes/internal-worker-auth.d.ts +0 -14
- package/dist/routes/internal-worker-auth.d.ts.map +0 -1
- package/dist/routes/internal-worker-auth.js +0 -33
- package/dist/routes/internal-worker-auth.js.map +0 -1
- package/dist/routes/internal-worker-session-snapshot.d.ts +0 -14
- package/dist/routes/internal-worker-session-snapshot.d.ts.map +0 -1
- package/dist/routes/internal-worker-session-snapshot.js +0 -172
- package/dist/routes/internal-worker-session-snapshot.js.map +0 -1
- package/dist/routes/launchers.d.ts +0 -5
- package/dist/routes/launchers.d.ts.map +0 -1
- package/dist/routes/launchers.js +0 -140
- package/dist/routes/launchers.js.map +0 -1
- package/dist/routes/process-actions.d.ts +0 -5
- package/dist/routes/process-actions.d.ts.map +0 -1
- package/dist/routes/process-actions.js +0 -210
- package/dist/routes/process-actions.js.map +0 -1
- package/dist/routes/process-detail.d.ts +0 -4
- package/dist/routes/process-detail.d.ts.map +0 -1
- package/dist/routes/process-detail.js +0 -110
- package/dist/routes/process-detail.js.map +0 -1
- package/dist/routes/process-diagnostics-assembler.d.ts +0 -9
- package/dist/routes/process-diagnostics-assembler.d.ts.map +0 -1
- package/dist/routes/process-diagnostics-assembler.js +0 -92
- package/dist/routes/process-diagnostics-assembler.js.map +0 -1
- package/dist/routes/process-engine-http.d.ts +0 -10
- package/dist/routes/process-engine-http.d.ts.map +0 -1
- package/dist/routes/process-engine-http.js +0 -82
- package/dist/routes/process-engine-http.js.map +0 -1
- package/dist/routes/process-primary-path-assembler.d.ts +0 -18
- package/dist/routes/process-primary-path-assembler.d.ts.map +0 -1
- package/dist/routes/process-primary-path-assembler.js +0 -67
- package/dist/routes/process-primary-path-assembler.js.map +0 -1
- package/dist/routes/process-questions.d.ts +0 -4
- package/dist/routes/process-questions.d.ts.map +0 -1
- package/dist/routes/process-questions.js +0 -12
- package/dist/routes/process-questions.js.map +0 -1
- package/dist/routes/process-route-helpers.d.ts +0 -142
- package/dist/routes/process-route-helpers.d.ts.map +0 -1
- package/dist/routes/process-route-helpers.js +0 -523
- package/dist/routes/process-route-helpers.js.map +0 -1
- package/dist/routes/process-session.d.ts +0 -4
- package/dist/routes/process-session.d.ts.map +0 -1
- package/dist/routes/process-session.js +0 -24
- package/dist/routes/process-session.js.map +0 -1
- package/dist/routes/processes.d.ts +0 -5
- package/dist/routes/processes.d.ts.map +0 -1
- package/dist/routes/processes.js +0 -15
- package/dist/routes/processes.js.map +0 -1
- package/dist/routes/result-images.d.ts +0 -9
- package/dist/routes/result-images.d.ts.map +0 -1
- package/dist/routes/result-images.js +0 -92
- package/dist/routes/result-images.js.map +0 -1
- package/dist/routes/skills.d.ts +0 -7
- package/dist/routes/skills.d.ts.map +0 -1
- package/dist/routes/skills.js +0 -36
- package/dist/routes/skills.js.map +0 -1
- package/dist/routes/ui-renderers.d.ts +0 -8
- package/dist/routes/ui-renderers.d.ts.map +0 -1
- package/dist/routes/ui-renderers.js +0 -40
- package/dist/routes/ui-renderers.js.map +0 -1
- package/dist/routes/watchers.d.ts +0 -7
- package/dist/routes/watchers.d.ts.map +0 -1
- package/dist/routes/watchers.js +0 -82
- package/dist/routes/watchers.js.map +0 -1
- package/dist/runtime-server-config.d.ts +0 -16
- package/dist/runtime-server-config.d.ts.map +0 -1
- package/dist/runtime-server-config.js +0 -46
- package/dist/runtime-server-config.js.map +0 -1
- package/dist/scheduled-action-preflight.d.ts +0 -29
- package/dist/scheduled-action-preflight.d.ts.map +0 -1
- package/dist/scheduled-action-preflight.js +0 -53
- package/dist/scheduled-action-preflight.js.map +0 -1
- package/dist/semantic-entry-ref-state.d.ts +0 -15
- package/dist/semantic-entry-ref-state.d.ts.map +0 -1
- package/dist/semantic-entry-ref-state.js +0 -97
- package/dist/semantic-entry-ref-state.js.map +0 -1
- package/dist/semantic-state-json.d.ts +0 -7
- package/dist/semantic-state-json.d.ts.map +0 -1
- package/dist/semantic-state-json.js +0 -7
- package/dist/semantic-state-json.js.map +0 -1
- package/dist/semantic-turn-result-markdown.d.ts +0 -19
- package/dist/semantic-turn-result-markdown.d.ts.map +0 -1
- package/dist/semantic-turn-result-markdown.js +0 -45
- package/dist/semantic-turn-result-markdown.js.map +0 -1
- package/dist/server-automatic-turn-drainer.d.ts +0 -13
- package/dist/server-automatic-turn-drainer.d.ts.map +0 -1
- package/dist/server-automatic-turn-drainer.js +0 -235
- package/dist/server-automatic-turn-drainer.js.map +0 -1
- package/dist/server-bootstrap/build-host-capabilities.d.ts +0 -36
- package/dist/server-bootstrap/build-host-capabilities.d.ts.map +0 -1
- package/dist/server-bootstrap/build-host-capabilities.js +0 -82
- package/dist/server-bootstrap/build-host-capabilities.js.map +0 -1
- package/dist/server-bootstrap/load-extension-catalog.d.ts +0 -13
- package/dist/server-bootstrap/load-extension-catalog.d.ts.map +0 -1
- package/dist/server-bootstrap/load-extension-catalog.js +0 -17
- package/dist/server-bootstrap/load-extension-catalog.js.map +0 -1
- package/dist/server-bootstrap/register-http.d.ts +0 -19
- package/dist/server-bootstrap/register-http.d.ts.map +0 -1
- package/dist/server-bootstrap/register-http.js +0 -45
- package/dist/server-bootstrap/register-http.js.map +0 -1
- package/dist/server-bootstrap/register-websocket.d.ts +0 -13
- package/dist/server-bootstrap/register-websocket.d.ts.map +0 -1
- package/dist/server-bootstrap/register-websocket.js +0 -111
- package/dist/server-bootstrap/register-websocket.js.map +0 -1
- package/dist/server-topology.d.ts +0 -30
- package/dist/server-topology.d.ts.map +0 -1
- package/dist/server-topology.js +0 -33
- package/dist/server-topology.js.map +0 -1
- package/dist/skills/catalog-service.d.ts +0 -18
- package/dist/skills/catalog-service.d.ts.map +0 -1
- package/dist/skills/catalog-service.js +0 -66
- package/dist/skills/catalog-service.js.map +0 -1
- package/dist/skills/catalog-sync.d.ts +0 -9
- package/dist/skills/catalog-sync.d.ts.map +0 -1
- package/dist/skills/catalog-sync.js +0 -7
- package/dist/skills/catalog-sync.js.map +0 -1
- package/dist/skills/invocation-detector.d.ts +0 -12
- package/dist/skills/invocation-detector.d.ts.map +0 -1
- package/dist/skills/invocation-detector.js +0 -54
- package/dist/skills/invocation-detector.js.map +0 -1
- package/dist/skills/skill-dependencies.d.ts +0 -3
- package/dist/skills/skill-dependencies.d.ts.map +0 -1
- package/dist/skills/skill-dependencies.js +0 -17
- package/dist/skills/skill-dependencies.js.map +0 -1
- package/dist/skills/skill-id.d.ts +0 -3
- package/dist/skills/skill-id.d.ts.map +0 -1
- package/dist/skills/skill-id.js +0 -3
- package/dist/skills/skill-id.js.map +0 -1
- package/dist/skills/source-importer.d.ts +0 -18
- package/dist/skills/source-importer.d.ts.map +0 -1
- package/dist/skills/source-importer.js +0 -151
- package/dist/skills/source-importer.js.map +0 -1
- package/dist/supervisor/adoption/adoption-plan.d.ts +0 -14
- package/dist/supervisor/adoption/adoption-plan.d.ts.map +0 -1
- package/dist/supervisor/adoption/adoption-plan.js +0 -25
- package/dist/supervisor/adoption/adoption-plan.js.map +0 -1
- package/dist/supervisor/adoption/worker-adoption-coordinator.d.ts +0 -53
- package/dist/supervisor/adoption/worker-adoption-coordinator.d.ts.map +0 -1
- package/dist/supervisor/adoption/worker-adoption-coordinator.js +0 -225
- package/dist/supervisor/adoption/worker-adoption-coordinator.js.map +0 -1
- package/dist/supervisor/idle-worker-ttl.d.ts +0 -19
- package/dist/supervisor/idle-worker-ttl.d.ts.map +0 -1
- package/dist/supervisor/idle-worker-ttl.js +0 -26
- package/dist/supervisor/idle-worker-ttl.js.map +0 -1
- package/dist/supervisor/ipc-handler.d.ts +0 -37
- package/dist/supervisor/ipc-handler.d.ts.map +0 -1
- package/dist/supervisor/ipc-handler.js +0 -258
- package/dist/supervisor/ipc-handler.js.map +0 -1
- package/dist/supervisor/stale-heartbeat-watchdog.d.ts +0 -18
- package/dist/supervisor/stale-heartbeat-watchdog.d.ts.map +0 -1
- package/dist/supervisor/stale-heartbeat-watchdog.js +0 -46
- package/dist/supervisor/stale-heartbeat-watchdog.js.map +0 -1
- package/dist/supervisor/synthetic-worker-failure.d.ts +0 -13
- package/dist/supervisor/synthetic-worker-failure.d.ts.map +0 -1
- package/dist/supervisor/synthetic-worker-failure.js +0 -21
- package/dist/supervisor/synthetic-worker-failure.js.map +0 -1
- package/dist/supervisor/worker-api-compatibility.d.ts +0 -9
- package/dist/supervisor/worker-api-compatibility.d.ts.map +0 -1
- package/dist/supervisor/worker-api-compatibility.js +0 -20
- package/dist/supervisor/worker-api-compatibility.js.map +0 -1
- package/dist/supervisor/worker-connect-token.d.ts +0 -4
- package/dist/supervisor/worker-connect-token.d.ts.map +0 -1
- package/dist/supervisor/worker-connect-token.js +0 -13
- package/dist/supervisor/worker-connect-token.js.map +0 -1
- package/dist/supervisor/worker-event-ingestor.d.ts +0 -29
- package/dist/supervisor/worker-event-ingestor.d.ts.map +0 -1
- package/dist/supervisor/worker-event-ingestor.js +0 -193
- package/dist/supervisor/worker-event-ingestor.js.map +0 -1
- package/dist/supervisor/worker-input-ack-handler.d.ts +0 -12
- package/dist/supervisor/worker-input-ack-handler.d.ts.map +0 -1
- package/dist/supervisor/worker-input-ack-handler.js +0 -37
- package/dist/supervisor/worker-input-ack-handler.js.map +0 -1
- package/dist/supervisor/worker-lease-observer.d.ts +0 -35
- package/dist/supervisor/worker-lease-observer.d.ts.map +0 -1
- package/dist/supervisor/worker-lease-observer.js +0 -79
- package/dist/supervisor/worker-lease-observer.js.map +0 -1
- package/dist/supervisor/worker-shutdown-controller.d.ts +0 -16
- package/dist/supervisor/worker-shutdown-controller.d.ts.map +0 -1
- package/dist/supervisor/worker-shutdown-controller.js +0 -68
- package/dist/supervisor/worker-shutdown-controller.js.map +0 -1
- package/dist/supervisor/worker-start-payload-builder.d.ts +0 -33
- package/dist/supervisor/worker-start-payload-builder.d.ts.map +0 -1
- package/dist/supervisor/worker-start-payload-builder.js +0 -271
- package/dist/supervisor/worker-start-payload-builder.js.map +0 -1
- package/dist/supervisor/worker-storage-layout.d.ts +0 -17
- package/dist/supervisor/worker-storage-layout.d.ts.map +0 -1
- package/dist/supervisor/worker-storage-layout.js +0 -60
- package/dist/supervisor/worker-storage-layout.js.map +0 -1
- package/dist/supervisor/worker-supervisor.d.ts +0 -60
- package/dist/supervisor/worker-supervisor.d.ts.map +0 -1
- package/dist/supervisor/worker-supervisor.js +0 -666
- package/dist/supervisor/worker-supervisor.js.map +0 -1
- package/dist/supervisor/worker-turn-ipc-recorder.d.ts +0 -16
- package/dist/supervisor/worker-turn-ipc-recorder.d.ts.map +0 -1
- package/dist/supervisor/worker-turn-ipc-recorder.js +0 -62
- package/dist/supervisor/worker-turn-ipc-recorder.js.map +0 -1
- package/dist/supervisor/worker-websocket-ipc.d.ts +0 -55
- package/dist/supervisor/worker-websocket-ipc.d.ts.map +0 -1
- package/dist/supervisor/worker-websocket-ipc.js +0 -220
- package/dist/supervisor/worker-websocket-ipc.js.map +0 -1
- package/dist/test-helpers/fake-worker-supervisor.d.ts +0 -15
- package/dist/test-helpers/fake-worker-supervisor.d.ts.map +0 -1
- package/dist/test-helpers/fake-worker-supervisor.js +0 -59
- package/dist/test-helpers/fake-worker-supervisor.js.map +0 -1
- package/dist/test-helpers/in-process-worker.d.ts +0 -2
- package/dist/test-helpers/in-process-worker.d.ts.map +0 -1
- package/dist/test-helpers/in-process-worker.js +0 -2
- package/dist/test-helpers/in-process-worker.js.map +0 -1
- package/dist/test-helpers/ipc-handler-harness.d.ts +0 -17
- package/dist/test-helpers/ipc-handler-harness.d.ts.map +0 -1
- package/dist/test-helpers/ipc-handler-harness.js +0 -332
- package/dist/test-helpers/ipc-handler-harness.js.map +0 -1
- package/dist/test-helpers/leaf-outcome-fixtures.d.ts +0 -37
- package/dist/test-helpers/leaf-outcome-fixtures.d.ts.map +0 -1
- package/dist/test-helpers/leaf-outcome-fixtures.js +0 -81
- package/dist/test-helpers/leaf-outcome-fixtures.js.map +0 -1
- package/dist/test-helpers/model-provider-fixtures.d.ts +0 -4
- package/dist/test-helpers/model-provider-fixtures.d.ts.map +0 -1
- package/dist/test-helpers/model-provider-fixtures.js +0 -8
- package/dist/test-helpers/model-provider-fixtures.js.map +0 -1
- package/dist/test-helpers/process-binding-fixtures.d.ts +0 -23
- package/dist/test-helpers/process-binding-fixtures.d.ts.map +0 -1
- package/dist/test-helpers/process-binding-fixtures.js +0 -121
- package/dist/test-helpers/process-binding-fixtures.js.map +0 -1
- package/dist/test-helpers/process-fixtures.d.ts +0 -20
- package/dist/test-helpers/process-fixtures.d.ts.map +0 -1
- package/dist/test-helpers/process-fixtures.js +0 -212
- package/dist/test-helpers/process-fixtures.js.map +0 -1
- package/dist/test-helpers/process-model-fixtures.d.ts +0 -52
- package/dist/test-helpers/process-model-fixtures.d.ts.map +0 -1
- package/dist/test-helpers/process-model-fixtures.js +0 -159
- package/dist/test-helpers/process-model-fixtures.js.map +0 -1
- package/dist/test-helpers/process-title-fixtures.d.ts +0 -3
- package/dist/test-helpers/process-title-fixtures.d.ts.map +0 -1
- package/dist/test-helpers/process-title-fixtures.js +0 -36
- package/dist/test-helpers/process-title-fixtures.js.map +0 -1
- package/dist/test-helpers/structural-process-fixtures.d.ts +0 -7
- package/dist/test-helpers/structural-process-fixtures.d.ts.map +0 -1
- package/dist/test-helpers/structural-process-fixtures.js +0 -24
- package/dist/test-helpers/structural-process-fixtures.js.map +0 -1
- package/dist/test-helpers/turn-fixtures.d.ts +0 -168
- package/dist/test-helpers/turn-fixtures.d.ts.map +0 -1
- package/dist/test-helpers/turn-fixtures.js +0 -148
- package/dist/test-helpers/turn-fixtures.js.map +0 -1
- package/dist/test-helpers/turn-start-preflight-fixtures.d.ts +0 -12
- package/dist/test-helpers/turn-start-preflight-fixtures.d.ts.map +0 -1
- package/dist/test-helpers/turn-start-preflight-fixtures.js +0 -34
- package/dist/test-helpers/turn-start-preflight-fixtures.js.map +0 -1
- package/dist/test-helpers/unit-deps.d.ts +0 -17
- package/dist/test-helpers/unit-deps.d.ts.map +0 -1
- package/dist/test-helpers/unit-deps.js +0 -106
- package/dist/test-helpers/unit-deps.js.map +0 -1
- package/dist/testing.d.ts.map +0 -1
- package/dist/worker-runtime-profile-selection.d.ts +0 -56
- package/dist/worker-runtime-profile-selection.d.ts.map +0 -1
- package/dist/worker-runtime-profile-selection.js +0 -90
- package/dist/worker-runtime-profile-selection.js.map +0 -1
- package/dist/ws/broadcast.d.ts +0 -15
- package/dist/ws/broadcast.d.ts.map +0 -1
- package/dist/ws/broadcast.js +0 -34
- package/dist/ws/broadcast.js.map +0 -1
|
@@ -1,924 +0,0 @@
|
|
|
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
|