@leitwerk-dev/server 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-4QSV4FUQ.js +8 -0
- package/dist/{app-D4XHIbwA.d.ts → app-WfwKzrVk.d.ts} +2029 -410
- package/dist/app.d.ts +55 -12
- package/dist/app.d.ts.map +1 -1
- package/dist/{chunk-AGC2ND53.js → chunk-KIOQNNG6.js} +1645 -750
- package/dist/chunk-KIOQNNG6.js.map +1 -0
- package/dist/{chunk-XTXH6623.js → chunk-LK3RO6C7.js} +1543 -2111
- package/dist/chunk-LK3RO6C7.js.map +1 -0
- package/dist/config/config-loader.d.ts +11 -0
- package/dist/config/config-loader.d.ts.map +1 -1
- package/dist/config/config-types.d.ts +152 -51
- package/dist/config/config-types.d.ts.map +1 -1
- package/dist/db/api-token-repo.d.ts +24 -0
- package/dist/db/api-token-repo.d.ts.map +1 -1
- package/dist/db/auth-repo.d.ts +30 -0
- package/dist/db/auth-repo.d.ts.map +1 -1
- package/dist/db/credential-cipher.d.ts +8 -3
- package/dist/db/credential-cipher.d.ts.map +1 -1
- package/dist/db/database.d.ts +19 -1
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/external-write-log-repo.d.ts +6 -1
- package/dist/db/external-write-log-repo.d.ts.map +1 -1
- package/dist/db/future-execution-repo.d.ts +47 -0
- package/dist/db/future-execution-repo.d.ts.map +1 -1
- package/dist/db/launch-run-repo.d.ts +17 -0
- package/dist/db/launch-run-repo.d.ts.map +1 -1
- package/dist/db/launcher-recent-value-repo.d.ts +15 -0
- package/dist/db/launcher-recent-value-repo.d.ts.map +1 -1
- package/dist/db/pending-external-source-fire-repo.d.ts +33 -0
- package/dist/db/pending-external-source-fire-repo.d.ts.map +1 -1
- package/dist/db/process-event-repo.d.ts +17 -0
- package/dist/db/process-event-repo.d.ts.map +1 -1
- package/dist/db/process-handoff-dedup-key-repo.d.ts +8 -0
- package/dist/db/process-handoff-dedup-key-repo.d.ts.map +1 -1
- package/dist/db/process-input-repo.d.ts +15 -0
- package/dist/db/process-input-repo.d.ts.map +1 -1
- package/dist/db/process-instance-repo.d.ts +49 -0
- package/dist/db/process-instance-repo.d.ts.map +1 -1
- package/dist/db/process-leaf-outcome-snapshot-repo.d.ts +18 -0
- package/dist/db/process-leaf-outcome-snapshot-repo.d.ts.map +1 -1
- package/dist/db/process-project-repo.d.ts +20 -0
- package/dist/db/process-project-repo.d.ts.map +1 -1
- package/dist/db/process-question-request-repo.d.ts +19 -0
- package/dist/db/process-question-request-repo.d.ts.map +1 -1
- package/dist/db/process-relation-repo.d.ts +5 -0
- package/dist/db/process-relation-repo.d.ts.map +1 -1
- package/dist/db/process-skill-repo.d.ts +4 -0
- package/dist/db/process-skill-repo.d.ts.map +1 -1
- package/dist/db/process-title-job-repo.d.ts +22 -0
- package/dist/db/process-title-job-repo.d.ts.map +1 -1
- package/dist/db/process-tool-approval-request-repo.d.ts +20 -0
- package/dist/db/process-tool-approval-request-repo.d.ts.map +1 -1
- package/dist/db/process-turn-annotation-repo.d.ts +22 -2
- package/dist/db/process-turn-annotation-repo.d.ts.map +1 -1
- package/dist/db/process-turn-record-repo.d.ts +27 -0
- package/dist/db/process-turn-record-repo.d.ts.map +1 -1
- package/dist/db/provider-credential-repo.d.ts +16 -0
- package/dist/db/provider-credential-repo.d.ts.map +1 -1
- package/dist/db/repositories.d.ts +33 -0
- package/dist/db/repositories.d.ts.map +1 -1
- package/dist/db/session-transfer-repo.d.ts +49 -1
- package/dist/db/session-transfer-repo.d.ts.map +1 -1
- package/dist/db/skill-repo.d.ts +20 -0
- package/dist/db/skill-repo.d.ts.map +1 -1
- package/dist/db/startup-observation-repo.d.ts +3 -0
- package/dist/db/startup-observation-repo.d.ts.map +1 -1
- package/dist/db/ticket-destination-recent-repo.d.ts +14 -0
- package/dist/db/ticket-destination-recent-repo.d.ts.map +1 -1
- package/dist/db/turn-start-record-repo.d.ts +9 -0
- package/dist/db/turn-start-record-repo.d.ts.map +1 -1
- package/dist/db/turn-summary-repo.d.ts +18 -0
- package/dist/db/turn-summary-repo.d.ts.map +1 -1
- package/dist/db/worker-lease-repo.d.ts +31 -1
- package/dist/db/worker-lease-repo.d.ts.map +1 -1
- package/dist/effects/post-commit-effect.d.ts +29 -0
- package/dist/effects/post-commit-effect.d.ts.map +1 -1
- package/dist/effects/post-commit-runner.d.ts +1 -0
- package/dist/effects/post-commit-runner.d.ts.map +1 -1
- package/dist/entry-ref-patch.d.ts +3 -0
- package/dist/entry-ref-patch.d.ts.map +1 -1
- package/dist/extension-ui/catalog.d.ts +15 -0
- package/dist/extension-ui/catalog.d.ts.map +1 -1
- package/dist/extensions/extension-host.d.ts +6 -0
- package/dist/extensions/extension-host.d.ts.map +1 -1
- package/dist/external-source-service.d.ts +8 -0
- package/dist/external-source-service.d.ts.map +1 -1
- package/dist/future-execution/execution.d.ts +23 -1
- package/dist/future-execution/execution.d.ts.map +1 -1
- package/dist/future-execution/launch-lifecycle.d.ts +76 -0
- package/dist/future-execution/launch-lifecycle.d.ts.map +1 -1
- package/dist/future-execution/lifecycle.d.ts +99 -0
- package/dist/future-execution/lifecycle.d.ts.map +1 -1
- package/dist/future-execution/model-projection.d.ts +6 -0
- package/dist/future-execution/model-projection.d.ts.map +1 -1
- package/dist/future-execution/transition-planner.d.ts +25 -0
- package/dist/future-execution/transition-planner.d.ts.map +1 -1
- package/dist/future-execution-scheduler.d.ts +1 -1
- package/dist/future-execution-scheduler.d.ts.map +1 -1
- package/dist/index.d.ts +3 -30
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -239
- package/dist/index.js.map +1 -1
- package/dist/instance-tree.d.ts +3 -0
- package/dist/instance-tree.d.ts.map +1 -1
- package/dist/integration-tool-registry.d.ts +4 -1
- package/dist/integration-tool-registry.d.ts.map +1 -1
- package/dist/launch-coordinator.d.ts +33 -0
- package/dist/launch-coordinator.d.ts.map +1 -1
- package/dist/launch-pipeline.d.ts +60 -0
- package/dist/launch-pipeline.d.ts.map +1 -1
- package/dist/launcher-recent-values-service.d.ts +3 -0
- package/dist/launcher-recent-values-service.d.ts.map +1 -1
- package/dist/main.js +7 -14
- package/dist/main.js.map +1 -1
- package/dist/model-providers/builtin-server-adapter.d.ts +1 -0
- package/dist/model-providers/builtin-server-adapter.d.ts.map +1 -1
- package/dist/model-providers/credentials.d.ts +17 -0
- package/dist/model-providers/credentials.d.ts.map +1 -1
- package/dist/model-providers/model-status-cache.d.ts +30 -1
- package/dist/model-providers/model-status-cache.d.ts.map +1 -1
- package/dist/model-providers/provider-options.d.ts +21 -1
- package/dist/model-providers/provider-options.d.ts.map +1 -1
- package/dist/model-providers/registry.d.ts +22 -2
- package/dist/model-providers/registry.d.ts.map +1 -1
- package/dist/model-providers/server-adapters.d.ts +19 -0
- package/dist/model-providers/server-adapters.d.ts.map +1 -1
- package/dist/pi-resources/assemble.d.ts +24 -4
- package/dist/pi-resources/assemble.d.ts.map +1 -1
- package/dist/pi-resources/bundle-cache.d.ts +20 -1
- package/dist/pi-resources/bundle-cache.d.ts.map +1 -1
- package/dist/pi-resources/bundle-pin-lifecycle.d.ts +5 -1
- package/dist/pi-resources/bundle-pin-lifecycle.d.ts.map +1 -1
- package/dist/pi-resources/resource-collector.d.ts +11 -0
- package/dist/pi-resources/resource-collector.d.ts.map +1 -1
- package/dist/pi-session-tree.d.ts +13 -1
- package/dist/pi-session-tree.d.ts.map +1 -1
- package/dist/process-action-registry.d.ts +47 -0
- package/dist/process-action-registry.d.ts.map +1 -1
- package/dist/process-deletion-service.d.ts +12 -0
- package/dist/process-deletion-service.d.ts.map +1 -1
- package/dist/process-engine/decision.d.ts +12 -0
- package/dist/process-engine/decision.d.ts.map +1 -1
- package/dist/process-engine/engine.d.ts +1 -0
- package/dist/process-engine/engine.d.ts.map +1 -1
- package/dist/process-engine/operation.d.ts +23 -2
- package/dist/process-engine/operation.d.ts.map +1 -1
- package/dist/process-engine/startup-reconciliation.d.ts +14 -0
- package/dist/process-engine/startup-reconciliation.d.ts.map +1 -1
- package/dist/process-engine/types.d.ts +112 -1
- package/dist/process-engine/types.d.ts.map +1 -1
- package/dist/process-engine/writes/build-process-park-writes.d.ts +3 -0
- package/dist/process-engine/writes/build-process-park-writes.d.ts.map +1 -1
- package/dist/process-engine/writes/build-recovery-start-writes.d.ts +4 -0
- package/dist/process-engine/writes/build-recovery-start-writes.d.ts.map +1 -1
- package/dist/process-engine/writes/build-retry-writes.d.ts +3 -0
- package/dist/process-engine/writes/build-retry-writes.d.ts.map +1 -1
- package/dist/process-engine/writes/build-turn-failed-writes.d.ts +6 -0
- package/dist/process-engine/writes/build-turn-failed-writes.d.ts.map +1 -1
- package/dist/process-engine/writes/build-turn-outcome-writes.d.ts +8 -0
- package/dist/process-engine/writes/build-turn-outcome-writes.d.ts.map +1 -1
- package/dist/process-engine/writes/build-turn-selection-writes.d.ts +8 -0
- package/dist/process-engine/writes/build-turn-selection-writes.d.ts.map +1 -1
- package/dist/process-engine/writes/commit-writes.d.ts +14 -0
- package/dist/process-engine/writes/commit-writes.d.ts.map +1 -1
- package/dist/process-engine/writes/deferred-extension-events.d.ts +4 -0
- package/dist/process-engine/writes/deferred-extension-events.d.ts.map +1 -1
- package/dist/process-engine/writes/writes.d.ts +67 -0
- package/dist/process-engine/writes/writes.d.ts.map +1 -1
- package/dist/process-graph.d.ts +1 -1
- package/dist/process-graph.d.ts.map +1 -1
- package/dist/process-input-dispatch.d.ts +1 -0
- package/dist/process-input-dispatch.d.ts.map +1 -1
- package/dist/process-launch-executor.d.ts +1 -0
- package/dist/process-launch-executor.d.ts.map +1 -1
- package/dist/process-model-policy/types.d.ts +157 -1
- package/dist/process-model-policy/types.d.ts.map +1 -1
- package/dist/process-operation-coordinator.d.ts +3 -0
- package/dist/process-operation-coordinator.d.ts.map +1 -1
- package/dist/process-question-service.d.ts +36 -20
- package/dist/process-question-service.d.ts.map +1 -1
- package/dist/process-runtime-availability.d.ts +2 -1
- package/dist/process-runtime-availability.d.ts.map +1 -1
- package/dist/process-session-store.d.ts +15 -4
- package/dist/process-session-store.d.ts.map +1 -1
- package/dist/process-title-generator.d.ts +53 -0
- package/dist/process-title-generator.d.ts.map +1 -1
- package/dist/process-turn-navigation.d.ts +1 -30
- package/dist/process-turn-navigation.d.ts.map +1 -1
- package/dist/process-turn-trace.d.ts +7 -0
- package/dist/process-turn-trace.d.ts.map +1 -1
- package/dist/process-ui-registry.d.ts +2 -0
- package/dist/process-ui-registry.d.ts.map +1 -1
- package/dist/process-ui-snapshot-presenter.d.ts +68 -1
- package/dist/process-ui-snapshot-presenter.d.ts.map +1 -1
- package/dist/process-watcher-registry.d.ts +5 -0
- package/dist/process-watcher-registry.d.ts.map +1 -1
- package/dist/product-ref-state.d.ts +1 -0
- package/dist/product-ref-state.d.ts.map +1 -1
- package/dist/project-mutation-service.d.ts +19 -0
- package/dist/project-mutation-service.d.ts.map +1 -1
- package/dist/result-image-store.d.ts +20 -0
- package/dist/result-image-store.d.ts.map +1 -1
- package/dist/routes/process-route-helpers.d.ts +30 -0
- package/dist/routes/process-route-helpers.d.ts.map +1 -1
- package/dist/routes/ui-renderers.d.ts +4 -0
- package/dist/routes/ui-renderers.d.ts.map +1 -1
- package/dist/routes/watchers.d.ts +3 -0
- package/dist/routes/watchers.d.ts.map +1 -1
- package/dist/semantic-entry-ref-state.d.ts +1 -0
- package/dist/semantic-entry-ref-state.d.ts.map +1 -1
- package/dist/server-bootstrap/app-lifecycle.d.ts +24 -0
- package/dist/server-bootstrap/app-lifecycle.d.ts.map +1 -0
- package/dist/server-bootstrap/build-host-capabilities.d.ts +5 -1
- package/dist/server-bootstrap/build-host-capabilities.d.ts.map +1 -1
- package/dist/server-topology.d.ts +8 -1
- package/dist/server-topology.d.ts.map +1 -1
- package/dist/session-transfer-helper-relays.d.ts +24 -0
- package/dist/session-transfer-helper-relays.d.ts.map +1 -1
- package/dist/session-transfer-service.d.ts +63 -1
- package/dist/session-transfer-service.d.ts.map +1 -1
- package/dist/skills/catalog-service.d.ts +7 -0
- package/dist/skills/catalog-service.d.ts.map +1 -1
- package/dist/skills/source-importer.d.ts +8 -0
- package/dist/skills/source-importer.d.ts.map +1 -1
- package/dist/startup-evidence.d.ts.map +1 -1
- package/dist/supervisor/ipc-handler.d.ts +28 -0
- package/dist/supervisor/ipc-handler.d.ts.map +1 -1
- package/dist/supervisor/worker-event-ingestor.d.ts +10 -0
- package/dist/supervisor/worker-event-ingestor.d.ts.map +1 -1
- package/dist/supervisor/worker-start-payload-builder.d.ts +13 -0
- package/dist/supervisor/worker-start-payload-builder.d.ts.map +1 -1
- package/dist/supervisor/worker-storage-layout.d.ts +12 -0
- package/dist/supervisor/worker-storage-layout.d.ts.map +1 -1
- package/dist/supervisor/worker-supervisor.d.ts +47 -3
- package/dist/supervisor/worker-supervisor.d.ts.map +1 -1
- package/dist/supervisor/worker-turn-ipc-recorder.d.ts +19 -0
- package/dist/supervisor/worker-turn-ipc-recorder.d.ts.map +1 -1
- package/dist/supervisor/worker-unit-reclaimer.d.ts +3 -0
- package/dist/supervisor/worker-unit-reclaimer.d.ts.map +1 -1
- package/dist/supervisor/worker-websocket-ipc.d.ts +37 -0
- package/dist/supervisor/worker-websocket-ipc.d.ts.map +1 -1
- package/dist/test-helpers/accepted-turn-start.d.ts +22 -0
- package/dist/test-helpers/accepted-turn-start.d.ts.map +1 -1
- package/dist/test-helpers/prepared-fixture-start.d.ts +14 -0
- package/dist/test-helpers/prepared-fixture-start.d.ts.map +1 -0
- package/dist/test-helpers/session-snapshot-fixtures.d.ts +1 -1
- package/dist/test-helpers/session-snapshot-fixtures.d.ts.map +1 -1
- package/dist/test-helpers/turn-start-preflight-fixtures.d.ts +8 -1
- package/dist/test-helpers/turn-start-preflight-fixtures.d.ts.map +1 -1
- package/dist/test-helpers/unit-deps.d.ts +8 -0
- package/dist/test-helpers/unit-deps.d.ts.map +1 -1
- package/dist/testing.d.ts +5 -7
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +60 -53
- package/dist/testing.js.map +1 -1
- package/dist/tool-approval-gate.d.ts +21 -0
- package/dist/tool-approval-gate.d.ts.map +1 -1
- package/dist/turn-result-markdown.d.ts +2 -0
- package/dist/turn-result-markdown.d.ts.map +1 -1
- package/dist/worker-runtime-profile-selection.d.ts +20 -4
- package/dist/worker-runtime-profile-selection.d.ts.map +1 -1
- package/dist/ws/broadcast.d.ts +10 -0
- package/dist/ws/broadcast.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/app.ts +916 -892
- package/src/config/config-loader.ts +12 -0
- package/src/config/config-types.ts +166 -66
- package/src/db/api-token-repo.ts +35 -2
- package/src/db/auth-repo.ts +35 -1
- package/src/db/credential-cipher.ts +8 -3
- package/src/db/database.ts +14 -0
- package/src/db/external-write-log-repo.ts +6 -1
- package/src/db/future-execution-repo.ts +51 -1
- package/src/db/launch-run-repo.ts +17 -0
- package/src/db/launcher-recent-value-repo.ts +15 -0
- package/src/db/pending-external-source-fire-repo.ts +33 -0
- package/src/db/process-event-repo.ts +21 -1
- package/src/db/process-handoff-dedup-key-repo.ts +8 -0
- package/src/db/process-input-repo.ts +15 -0
- package/src/db/process-instance-repo.ts +57 -2
- package/src/db/process-leaf-outcome-snapshot-repo.ts +18 -0
- package/src/db/process-project-repo.ts +20 -0
- package/src/db/process-question-request-repo.ts +19 -0
- package/src/db/process-relation-repo.ts +8 -1
- package/src/db/process-skill-repo.ts +4 -0
- package/src/db/process-title-job-repo.ts +30 -2
- package/src/db/process-tool-approval-request-repo.ts +24 -1
- package/src/db/process-turn-annotation-repo.ts +22 -2
- package/src/db/process-turn-record-repo.ts +27 -0
- package/src/db/provider-credential-repo.ts +20 -1
- package/src/db/repositories.ts +36 -1
- package/src/db/session-transfer-repo.ts +71 -9
- package/src/db/skill-repo.ts +24 -1
- package/src/db/startup-observation-repo.ts +3 -0
- package/src/db/ticket-destination-recent-repo.ts +14 -0
- package/src/db/turn-start-record-repo.ts +12 -1
- package/src/db/turn-summary-repo.ts +29 -2
- package/src/db/worker-lease-repo.ts +31 -1
- package/src/deployment-preflight.ts +1 -1
- package/src/effects/post-commit-effect.ts +42 -3
- package/src/effects/post-commit-runner.ts +1 -0
- package/src/entry-ref-patch.ts +9 -1
- package/src/extension-ui/catalog.ts +15 -0
- package/src/extensions/extension-host.ts +6 -0
- package/src/external-source-service.ts +12 -1
- package/src/future-execution/execution.ts +45 -8
- package/src/future-execution/launch-lifecycle.ts +145 -17
- package/src/future-execution/lifecycle.ts +124 -13
- package/src/future-execution/model-projection.ts +6 -0
- package/src/future-execution/transition-planner.ts +25 -0
- package/src/future-execution-scheduler.ts +7 -6
- package/src/index.ts +5 -153
- package/src/instance-tree.ts +3 -0
- package/src/integration-tool-registry.ts +17 -8
- package/src/launch-coordinator.ts +55 -5
- package/src/launch-pipeline.ts +103 -12
- package/src/launcher-recent-values-service.ts +3 -0
- package/src/main.ts +3 -10
- package/src/model-providers/builtin-server-adapter.ts +1 -0
- package/src/model-providers/credentials.ts +17 -0
- package/src/model-providers/model-status-cache.ts +30 -1
- package/src/model-providers/provider-options.ts +25 -2
- package/src/model-providers/registry.ts +22 -2
- package/src/model-providers/server-adapters.ts +19 -0
- package/src/pi-resources/assemble.ts +24 -4
- package/src/pi-resources/bundle-cache.ts +20 -1
- package/src/pi-resources/bundle-pin-lifecycle.ts +8 -2
- package/src/pi-resources/resource-collector.ts +11 -0
- package/src/pi-session-tree.ts +13 -1
- package/src/process-action-registry.ts +53 -1
- package/src/process-deletion-service.ts +29 -4
- package/src/process-engine/decision.ts +12 -0
- package/src/process-engine/engine.ts +1 -0
- package/src/process-engine/operation.ts +23 -2
- package/src/process-engine/startup-reconciliation.ts +14 -0
- package/src/process-engine/types.ts +176 -14
- package/src/process-engine/writes/build-process-park-writes.ts +3 -0
- package/src/process-engine/writes/build-recovery-start-writes.ts +4 -0
- package/src/process-engine/writes/build-retry-writes.ts +3 -0
- package/src/process-engine/writes/build-turn-failed-writes.ts +6 -0
- package/src/process-engine/writes/build-turn-outcome-writes.ts +8 -0
- package/src/process-engine/writes/build-turn-selection-writes.ts +8 -0
- package/src/process-engine/writes/commit-writes.ts +14 -0
- package/src/process-engine/writes/deferred-extension-events.ts +4 -0
- package/src/process-engine/writes/writes.ts +104 -10
- package/src/process-graph.ts +0 -3
- package/src/process-input-dispatch.ts +1 -0
- package/src/process-launch-executor.ts +1 -0
- package/src/process-model-policy/types.ts +195 -11
- package/src/process-operation-coordinator.ts +3 -0
- package/src/process-question-service.ts +53 -11
- package/src/process-runtime-availability.ts +4 -3
- package/src/process-session-store.ts +15 -4
- package/src/process-title-generator.ts +71 -5
- package/src/process-turn-navigation.ts +4 -1
- package/src/process-turn-trace.ts +7 -0
- package/src/process-ui-registry.ts +2 -0
- package/src/process-ui-snapshot-presenter.ts +75 -3
- package/src/process-watcher-registry.ts +5 -0
- package/src/product-ref-state.ts +1 -0
- package/src/project-mutation-service.ts +22 -1
- package/src/result-image-store.ts +27 -2
- package/src/routes/process-route-helpers.ts +30 -0
- package/src/routes/ui-renderers.ts +4 -0
- package/src/routes/watchers.ts +3 -0
- package/src/semantic-entry-ref-state.ts +1 -0
- package/src/server-bootstrap/app-lifecycle.ts +150 -0
- package/src/server-topology.ts +8 -1
- package/src/session-transfer-helper-relays.ts +33 -2
- package/src/session-transfer-service.ts +75 -7
- package/src/skills/catalog-service.ts +7 -0
- package/src/skills/source-importer.ts +8 -0
- package/src/startup-evidence.ts +23 -41
- package/src/supervisor/ipc-handler.ts +33 -1
- package/src/supervisor/worker-event-ingestor.ts +10 -0
- package/src/supervisor/worker-start-payload-builder.ts +16 -1
- package/src/supervisor/worker-storage-layout.ts +12 -0
- package/src/supervisor/worker-supervisor.ts +119 -133
- package/src/supervisor/worker-turn-ipc-recorder.ts +19 -0
- package/src/supervisor/worker-unit-reclaimer.ts +3 -0
- package/src/supervisor/worker-websocket-ipc.ts +57 -3
- package/src/test-helpers/accepted-turn-start.ts +32 -3
- package/src/test-helpers/prepared-fixture-start.ts +74 -0
- package/src/test-helpers/session-snapshot-fixtures.ts +1 -1
- package/src/test-helpers/turn-start-preflight-fixtures.ts +8 -1
- package/src/test-helpers/unit-deps.ts +13 -1
- package/src/testing.ts +5 -23
- package/src/tool-approval-gate.ts +32 -3
- package/src/turn-result-markdown.ts +2 -0
- package/src/worker-runtime-profile-selection.ts +24 -5
- package/src/ws/broadcast.ts +20 -1
- package/dist/app-I4QQUL5B.js +0 -10
- package/dist/chunk-AGC2ND53.js.map +0 -1
- package/dist/chunk-XTXH6623.js.map +0 -1
- /package/dist/{app-I4QQUL5B.js.map → app-4QSV4FUQ.js.map} +0 -0
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
import type { LeitwerkConfig } from "./config-types.js";
|
|
2
|
+
/** @public */
|
|
2
3
|
export interface ConfigLoadResult {
|
|
4
|
+
/** @public */
|
|
3
5
|
ok: true;
|
|
6
|
+
/** @public */
|
|
4
7
|
config: LeitwerkConfig;
|
|
8
|
+
/** @internal */
|
|
5
9
|
filePath: string;
|
|
6
10
|
}
|
|
11
|
+
/** @public */
|
|
7
12
|
export interface ConfigLoadError {
|
|
13
|
+
/** @public */
|
|
8
14
|
ok: false;
|
|
15
|
+
/** @public */
|
|
9
16
|
error: string;
|
|
10
17
|
}
|
|
18
|
+
/** @internal */
|
|
11
19
|
export declare function applyConfigDefaults(raw: Record<string, unknown>): LeitwerkConfig;
|
|
12
20
|
export declare function resolveConfigPath(explicitPath?: string): string | null;
|
|
13
21
|
export declare function loadConfigFromFile(filePath: string): ConfigLoadResult | ConfigLoadError;
|
|
22
|
+
/** @public */
|
|
14
23
|
export declare function loadConfig(explicitPath?: string): ConfigLoadResult | ConfigLoadError;
|
|
15
24
|
export declare function validateConfig(raw: Record<string, unknown>): string[];
|
|
25
|
+
/** @internal */
|
|
16
26
|
export declare function sanitizeConfigForLogging(value: unknown, path?: readonly string[]): unknown;
|
|
27
|
+
/** @public */
|
|
17
28
|
export declare function getDefaultConfig(): LeitwerkConfig;
|
|
18
29
|
//# sourceMappingURL=config-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/config/config-loader.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAqBxD,MAAM,WAAW,gBAAgB;IAChC,EAAE,EAAE,IAAI,CAAC;IACT,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC/B,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACd;AAiCD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,cAAc,CAOhF;AAED,wBAAgB,iBAAiB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUtE;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAqBvF;AAED,wBAAgB,UAAU,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAMpF;
|
|
1
|
+
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/config/config-loader.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAqBxD,cAAc;AACd,MAAM,WAAW,gBAAgB;IAChC,cAAc;IACd,EAAE,EAAE,IAAI,CAAC;IACT,cAAc;IACd,MAAM,EAAE,cAAc,CAAC;IACvB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,cAAc;AACd,MAAM,WAAW,eAAe;IAC/B,cAAc;IACd,EAAE,EAAE,KAAK,CAAC;IACV,cAAc;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAiCD,gBAAgB;AAChB,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,cAAc,CAOhF;AAED,wBAAgB,iBAAiB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUtE;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAqBvF;AAED,cAAc;AACd,wBAAgB,UAAU,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAMpF;AAkyBD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAGrE;AAUD,gBAAgB;AAChB,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,GAAE,SAAS,MAAM,EAAO,GAAG,OAAO,CAkB9F;AAED,cAAc;AACd,wBAAgB,gBAAgB,IAAI,cAAc,CAsHjD"}
|
|
@@ -1,174 +1,252 @@
|
|
|
1
|
-
import type { ComponentConfigSnapshot, ConfigSnapshot, ExtensionLoadingConfigSnapshot, NotificationsConfigSnapshot, ProcessConfigSnapshot, SandboxConfigSnapshot, ServerConfigSnapshot, StorageConfigSnapshot, WorkersConfigSnapshot } from "@leitwerk-dev/protocol";
|
|
1
|
+
import type { ComponentConfigSnapshot, ConfigSnapshot, ExtensionLoadingConfigSnapshot, NotificationsConfigSnapshot, ProcessConfigSnapshot, SandboxConfigSnapshot, ServerConfigSnapshot, StorageConfigSnapshot, WorkersConfigSnapshot } from "@leitwerk-dev/protocol/config-snapshot";
|
|
2
2
|
import type { DockerNetworkConfig } from "@leitwerk-dev/worker-protocol";
|
|
3
|
-
export type { ComponentConfigSnapshot as ComponentConfig, ConfigSnapshot, ExtensionLoadingConfigSnapshot as ExtensionLoadingConfig, ModelProfileSnapshot as ModelProfile,
|
|
3
|
+
export type { ComponentConfigSnapshot as ComponentConfig, ConfigSnapshot, ExtensionLoadingConfigSnapshot as ExtensionLoadingConfig, ModelProfileSnapshot as ModelProfile, ProcessConfigSnapshot as ProcessConfig, SandboxConfigSnapshot as SandboxConfig, ServerConfigSnapshot as ServerConfig, StorageConfigSnapshot as StorageConfig, WorkersConfigSnapshot as WorkersConfig, } from "@leitwerk-dev/protocol/config-snapshot";
|
|
4
|
+
/** @internal */
|
|
4
5
|
export interface SkillRepositoryConfig {
|
|
6
|
+
/** @internal */
|
|
5
7
|
id: string;
|
|
8
|
+
/** @internal */
|
|
6
9
|
label?: string;
|
|
10
|
+
/** @internal */
|
|
7
11
|
url: string;
|
|
12
|
+
/** @internal */
|
|
8
13
|
ref: string;
|
|
9
|
-
/** Directory recursively scanned for skill directories. Defaults to `skills`. */
|
|
14
|
+
/** Directory recursively scanned for skill directories. Defaults to `skills`. @internal */
|
|
10
15
|
path?: string;
|
|
11
16
|
}
|
|
17
|
+
/** @internal */
|
|
12
18
|
export interface AuthSessionConfig {
|
|
19
|
+
/** @internal */
|
|
13
20
|
cookie_name?: string;
|
|
21
|
+
/** @internal */
|
|
14
22
|
ttl?: string;
|
|
15
23
|
}
|
|
24
|
+
/** @internal */
|
|
16
25
|
export interface AuthOidcProviderConfig {
|
|
26
|
+
/** @internal */
|
|
17
27
|
id: string;
|
|
28
|
+
/** @internal */
|
|
18
29
|
kind: "oidc";
|
|
30
|
+
/** @internal */
|
|
19
31
|
issuer: string;
|
|
32
|
+
/** @internal */
|
|
20
33
|
client_id: string;
|
|
34
|
+
/** @internal */
|
|
21
35
|
client_secret: string;
|
|
36
|
+
/** @internal */
|
|
22
37
|
redirect_uri?: string;
|
|
38
|
+
/** @internal */
|
|
23
39
|
scopes?: string[];
|
|
40
|
+
/** @internal */
|
|
24
41
|
identity_claim?: string;
|
|
25
42
|
}
|
|
43
|
+
/** @internal */
|
|
26
44
|
export interface AuthGithubProviderConfig {
|
|
45
|
+
/** @internal */
|
|
27
46
|
id: "github";
|
|
47
|
+
/** @internal */
|
|
28
48
|
kind: "oauth2";
|
|
49
|
+
/** @internal */
|
|
29
50
|
client_id: string;
|
|
51
|
+
/** @internal */
|
|
30
52
|
client_secret: string;
|
|
31
|
-
/** GitHub organization whose active members may sign in. */
|
|
53
|
+
/** GitHub organization whose active members may sign in. @internal */
|
|
32
54
|
organization: string;
|
|
55
|
+
/** @internal */
|
|
33
56
|
redirect_uri?: string;
|
|
34
57
|
}
|
|
58
|
+
/** @internal */
|
|
35
59
|
export type AuthProviderConfig = AuthOidcProviderConfig | AuthGithubProviderConfig;
|
|
60
|
+
/** @internal */
|
|
36
61
|
export interface ApiTokensConfig {
|
|
62
|
+
/** @internal */
|
|
37
63
|
enabled?: boolean;
|
|
64
|
+
/** @internal */
|
|
38
65
|
default_ttl?: string;
|
|
66
|
+
/** @internal */
|
|
39
67
|
max_ttl?: string;
|
|
68
|
+
/** @internal */
|
|
40
69
|
allow_no_expiry?: boolean;
|
|
41
70
|
}
|
|
71
|
+
/** @internal */
|
|
42
72
|
export interface AuthConfig {
|
|
73
|
+
/** @internal */
|
|
43
74
|
api_tokens?: ApiTokensConfig;
|
|
44
|
-
/** Only true enables authentication; omit or set false to keep the leitwerk unauthenticated. */
|
|
75
|
+
/** Only true enables authentication; omit or set false to keep the leitwerk unauthenticated. @internal */
|
|
45
76
|
enabled?: boolean;
|
|
77
|
+
/** @internal */
|
|
46
78
|
session?: AuthSessionConfig;
|
|
79
|
+
/** @internal */
|
|
47
80
|
providers?: AuthProviderConfig[];
|
|
48
|
-
/** Raw OIDC identity claim values that may sign in. GitHub uses organization membership. */
|
|
81
|
+
/** Raw OIDC identity claim values that may sign in. GitHub uses organization membership. @internal */
|
|
49
82
|
allowlist?: string[];
|
|
50
83
|
}
|
|
84
|
+
/** @internal */
|
|
51
85
|
export interface DockerProcessVolumeConfig {
|
|
52
|
-
/** `bind` mounts a host path; `named_volume` uses a Docker-managed volume. */
|
|
86
|
+
/** `bind` mounts a host path; `named_volume` uses a Docker-managed volume. @internal */
|
|
53
87
|
mode: "bind" | "named_volume";
|
|
54
|
-
/** Host root under which per-process volumes are created (bind mode). */
|
|
88
|
+
/** Host root under which per-process volumes are created (bind mode). @internal */
|
|
55
89
|
host_root: string;
|
|
56
|
-
/** Path inside the worker container where the volume is mounted. */
|
|
90
|
+
/** Path inside the worker container where the volume is mounted. @internal */
|
|
57
91
|
mount_path: string;
|
|
58
92
|
}
|
|
93
|
+
/** @internal */
|
|
59
94
|
export interface DockerPrivateDaemonConfig {
|
|
60
|
-
/** Exact isolation used for every Docker-requiring process. */
|
|
95
|
+
/** Exact isolation used for every Docker-requiring process. @internal */
|
|
61
96
|
isolation: "privileged" | "sysbox-runc";
|
|
62
97
|
}
|
|
63
98
|
/**
|
|
64
99
|
* Server-only Docker run-mode wiring. The worker never receives this block; it
|
|
65
100
|
* dials back over WebSocket using launcher-injected connect env.
|
|
66
101
|
*/
|
|
102
|
+
/** @internal */
|
|
67
103
|
export interface DockerRunnerConfig {
|
|
68
|
-
/** Docker Engine API socket (Podman/OrbStack/nerdctl compatible). */
|
|
104
|
+
/** Docker Engine API socket (Podman/OrbStack/nerdctl compatible). @internal */
|
|
69
105
|
socket: string;
|
|
70
|
-
/** Shared private user-defined network for server + workers. */
|
|
106
|
+
/** Shared private user-defined network for server + workers. @internal */
|
|
71
107
|
network: string;
|
|
72
|
-
/** Stable internal HTTP(S) base URL workers use for IPC, never a host IP. */
|
|
108
|
+
/** Stable internal HTTP(S) base URL workers use for IPC, never a host IP. @internal */
|
|
73
109
|
server_url: string;
|
|
74
|
-
/** CA the worker trusts for internal TLS (self-signed ok on a private net). */
|
|
110
|
+
/** CA the worker trusts for internal TLS (self-signed ok on a private net). @internal */
|
|
75
111
|
server_ca_file?: string;
|
|
112
|
+
/** @internal */
|
|
76
113
|
process_volume: DockerProcessVolumeConfig;
|
|
77
|
-
/** Private daemon realization for Docker-requiring processes. */
|
|
114
|
+
/** Private daemon realization for Docker-requiring processes. @internal */
|
|
78
115
|
private_daemon?: DockerPrivateDaemonConfig;
|
|
79
116
|
}
|
|
117
|
+
/** @internal */
|
|
80
118
|
export interface KubernetesProcessVolumeConfig {
|
|
81
|
-
/** Optional ready-volume target; zero stops replenishment. */
|
|
119
|
+
/** Optional ready-volume target; zero stops replenishment. @internal */
|
|
82
120
|
pre_provision?: {
|
|
121
|
+
/** @internal */
|
|
83
122
|
count: number;
|
|
84
123
|
};
|
|
124
|
+
/** @internal */
|
|
85
125
|
storage_class_name?: string;
|
|
126
|
+
/** @internal */
|
|
86
127
|
size: string;
|
|
128
|
+
/** @internal */
|
|
87
129
|
access_modes: string[];
|
|
130
|
+
/** @internal */
|
|
88
131
|
mount_path: string;
|
|
89
132
|
}
|
|
133
|
+
/** @internal */
|
|
90
134
|
export interface KubernetesDockerConfig {
|
|
91
|
-
/** Pod RuntimeClass selected for every Docker-requiring process. */
|
|
135
|
+
/** Pod RuntimeClass selected for every Docker-requiring process. @internal */
|
|
92
136
|
runtime_class_name?: string;
|
|
93
|
-
/** Pod user-namespace policy passed directly to spec.hostUsers. */
|
|
137
|
+
/** Pod user-namespace policy passed directly to spec.hostUsers. @internal */
|
|
94
138
|
host_users?: boolean;
|
|
95
|
-
/**
|
|
139
|
+
/** @internal Opt in to the verified gVisor Docker wrapper and guest capabilities. */
|
|
140
|
+
gvisor?: boolean;
|
|
141
|
+
/** StorageClass selected for the process's single retained PVC. @internal */
|
|
96
142
|
process_storage_class_name?: string;
|
|
143
|
+
/** @internal */
|
|
97
144
|
network?: DockerNetworkConfig;
|
|
98
145
|
}
|
|
146
|
+
/** @internal */
|
|
99
147
|
export interface KubernetesHostAliasConfig {
|
|
148
|
+
/** @internal */
|
|
100
149
|
ip: string;
|
|
150
|
+
/** @internal */
|
|
101
151
|
hostnames: string[];
|
|
102
152
|
}
|
|
153
|
+
/** @internal */
|
|
103
154
|
export interface KubernetesPodConfig {
|
|
155
|
+
/** @internal */
|
|
104
156
|
node_selector?: Record<string, string>;
|
|
157
|
+
/** @internal */
|
|
105
158
|
tolerations?: unknown[];
|
|
159
|
+
/** @internal */
|
|
106
160
|
annotations?: Record<string, string>;
|
|
161
|
+
/** @internal */
|
|
107
162
|
host_aliases?: KubernetesHostAliasConfig[];
|
|
108
163
|
}
|
|
164
|
+
/** @internal */
|
|
109
165
|
export interface KubernetesImagePullSecretCopyConfig {
|
|
110
|
-
/** Secret name in the server namespace. */
|
|
166
|
+
/** Secret name in the server namespace. @internal */
|
|
111
167
|
source_name: string;
|
|
112
|
-
/** Secret name created in each process namespace. */
|
|
168
|
+
/** Secret name created in each process namespace. @internal */
|
|
113
169
|
target_name: string;
|
|
114
170
|
}
|
|
115
|
-
/** Server-only Kubernetes run-mode wiring. */
|
|
171
|
+
/** Server-only Kubernetes run-mode wiring. @public */
|
|
116
172
|
export interface LocalWorkerRunnerConfig {
|
|
117
|
-
/** Command used by the best-effort local dev/test runner. */
|
|
173
|
+
/** Command used by the best-effort local dev/test runner. @internal */
|
|
118
174
|
command: string;
|
|
119
|
-
/** Arguments passed to the local worker command. */
|
|
175
|
+
/** Arguments passed to the local worker command. @internal */
|
|
120
176
|
args: string[];
|
|
121
|
-
/** Explicit acknowledgement that Docker processes inherit host Docker authority. */
|
|
177
|
+
/** Explicit acknowledgement that Docker processes inherit host Docker authority. @public */
|
|
122
178
|
allow_host_docker?: boolean;
|
|
123
179
|
}
|
|
180
|
+
/** @internal */
|
|
124
181
|
export interface KubernetesRunnerConfig {
|
|
125
|
-
/** Dedicated namespace where the singleton server runs. */
|
|
182
|
+
/** Dedicated namespace where the singleton server runs. @internal */
|
|
126
183
|
server_namespace: string;
|
|
127
|
-
/** Safe DNS prefix used to derive one namespace per process instance. */
|
|
184
|
+
/** Safe DNS prefix used to derive one namespace per process instance. @internal */
|
|
128
185
|
process_namespace_prefix: string;
|
|
129
|
-
/** Stable in-cluster HTTP(S) base URL workers use to dial the server. */
|
|
186
|
+
/** Stable in-cluster HTTP(S) base URL workers use to dial the server. @internal */
|
|
130
187
|
server_url: string;
|
|
131
|
-
/** Server-local CA bundle copied into process namespaces for worker TLS trust. */
|
|
188
|
+
/** Server-local CA bundle copied into process namespaces for worker TLS trust. @internal */
|
|
132
189
|
server_ca_file?: string;
|
|
133
|
-
/** Optional Kubernetes API URL override; defaults to the in-cluster service. */
|
|
190
|
+
/** Optional Kubernetes API URL override; defaults to the in-cluster service. @internal */
|
|
134
191
|
api_server_url?: string;
|
|
192
|
+
/** @internal */
|
|
135
193
|
default_worker_runtime_profile?: string;
|
|
194
|
+
/** @internal */
|
|
136
195
|
worker_service_account?: string;
|
|
196
|
+
/** @internal */
|
|
137
197
|
process_volume: KubernetesProcessVolumeConfig;
|
|
138
|
-
/** Trusted private-Docker realization. Incomplete blocks leave Docker processes unavailable. */
|
|
198
|
+
/** Trusted private-Docker realization. Incomplete blocks leave Docker processes unavailable. @internal */
|
|
139
199
|
docker?: KubernetesDockerConfig;
|
|
200
|
+
/** @internal */
|
|
140
201
|
pod?: KubernetesPodConfig;
|
|
202
|
+
/** @internal */
|
|
141
203
|
image_pull_secrets?: string[];
|
|
204
|
+
/** @internal */
|
|
142
205
|
image_pull_secret_copies?: KubernetesImagePullSecretCopyConfig[];
|
|
143
206
|
}
|
|
207
|
+
/** @internal */
|
|
144
208
|
export interface WorkerRuntimeProfileCpuMemoryConfig {
|
|
209
|
+
/** @internal */
|
|
145
210
|
cpu?: string;
|
|
211
|
+
/** @internal */
|
|
146
212
|
memory?: string;
|
|
147
213
|
}
|
|
214
|
+
/** @internal */
|
|
148
215
|
export interface DockerRegistryConfig {
|
|
149
|
-
/** Actual registry permissions are enforced by the registry, not this binding. */
|
|
216
|
+
/** Actual registry permissions are enforced by the registry, not this binding. @internal */
|
|
150
217
|
profiles: Record<string, {
|
|
218
|
+
/** @internal */
|
|
151
219
|
registry: string;
|
|
220
|
+
/** @internal */
|
|
152
221
|
username: string;
|
|
222
|
+
/** @internal */
|
|
153
223
|
password: string;
|
|
154
224
|
}>;
|
|
225
|
+
/** @internal */
|
|
155
226
|
process_bindings: Record<string, string[]>;
|
|
156
227
|
}
|
|
228
|
+
/** @internal */
|
|
157
229
|
export interface WorkerRuntimeProfileResourcesConfig {
|
|
230
|
+
/** @internal */
|
|
158
231
|
requests?: WorkerRuntimeProfileCpuMemoryConfig;
|
|
232
|
+
/** @internal */
|
|
159
233
|
limits?: WorkerRuntimeProfileCpuMemoryConfig;
|
|
160
|
-
/** Back-compat shorthand interpreted as limits by Docker and manifest builders. */
|
|
234
|
+
/** Back-compat shorthand interpreted as limits by Docker and manifest builders. @internal */
|
|
161
235
|
cpu?: string;
|
|
236
|
+
/** @internal */
|
|
162
237
|
memory?: string;
|
|
163
238
|
}
|
|
164
239
|
/**
|
|
165
240
|
* A reusable worker image selection authored only in leitwerk config.
|
|
166
241
|
* Repository branch content must never select an image.
|
|
167
242
|
*/
|
|
243
|
+
/** @internal */
|
|
168
244
|
export interface WorkerRuntimeProfileConfig {
|
|
169
|
-
/** Fully qualified image reference, ideally digest-pinned for production. */
|
|
245
|
+
/** Fully qualified image reference, ideally digest-pinned for production. @internal */
|
|
170
246
|
image: string;
|
|
247
|
+
/** @internal */
|
|
171
248
|
image_pull_policy?: string;
|
|
249
|
+
/** @internal */
|
|
172
250
|
resources?: WorkerRuntimeProfileResourcesConfig;
|
|
173
251
|
}
|
|
174
252
|
/**
|
|
@@ -179,72 +257,95 @@ export interface WorkerRuntimeProfileConfig {
|
|
|
179
257
|
* terminated separately by a reverse proxy. Disabled by default so local and
|
|
180
258
|
* parity runs stay on plain HTTP.
|
|
181
259
|
*/
|
|
260
|
+
/** @internal */
|
|
182
261
|
export interface CommitMessageTemplateConfig {
|
|
183
|
-
/** Human-readable instructions applied to generated commit messages. */
|
|
262
|
+
/** Human-readable instructions applied to generated commit messages. @internal */
|
|
184
263
|
rules: string;
|
|
185
264
|
}
|
|
265
|
+
/** @internal */
|
|
186
266
|
export interface CommitMessageConfig {
|
|
187
|
-
/** Named, reusable formatting-rule templates. */
|
|
267
|
+
/** Named, reusable formatting-rule templates. @internal */
|
|
188
268
|
templates: Record<string, CommitMessageTemplateConfig>;
|
|
189
|
-
/** Template used when a repository has no explicit mapping. Null/omitted uses built-in guidance. */
|
|
269
|
+
/** Template used when a repository has no explicit mapping. Null/omitted uses built-in guidance. @internal */
|
|
190
270
|
default_template?: string | null;
|
|
191
|
-
/** Repository locator to template id. Locators are normalized before matching. */
|
|
271
|
+
/** Repository locator to template id. Locators are normalized before matching. @internal */
|
|
192
272
|
repositories: Record<string, string>;
|
|
193
273
|
}
|
|
274
|
+
/** @internal */
|
|
194
275
|
export interface InternalTlsConfig {
|
|
276
|
+
/** @internal */
|
|
195
277
|
enabled: boolean;
|
|
196
|
-
/** PEM cert chain the server presents on the internal listener. */
|
|
278
|
+
/** PEM cert chain the server presents on the internal listener. @internal */
|
|
197
279
|
cert_file?: string;
|
|
198
|
-
/** PEM private key for {@link InternalTlsConfig.cert_file}. */
|
|
280
|
+
/** PEM private key for {@link InternalTlsConfig.cert_file}. @internal */
|
|
199
281
|
key_file?: string;
|
|
200
282
|
/**
|
|
201
283
|
* Reserved for future worker client-certificate verification. Currently
|
|
202
284
|
* rejected by validation because workers do not receive client cert/key material.
|
|
203
285
|
*/
|
|
286
|
+
/** @internal */
|
|
204
287
|
client_ca_file?: string;
|
|
205
288
|
}
|
|
289
|
+
/** @internal */
|
|
206
290
|
export interface SessionTransferConfig {
|
|
291
|
+
/** @internal */
|
|
207
292
|
max_entries: number;
|
|
293
|
+
/** @internal */
|
|
208
294
|
max_logical_bytes: number;
|
|
295
|
+
/** @internal */
|
|
209
296
|
max_compressed_bytes: number;
|
|
210
297
|
}
|
|
298
|
+
/** @internal */
|
|
211
299
|
export interface DevelopmentToolsConfig {
|
|
300
|
+
/** @internal */
|
|
212
301
|
install_timeout: string;
|
|
302
|
+
/** @internal */
|
|
213
303
|
local: {
|
|
304
|
+
/** @internal */
|
|
214
305
|
mise_command: string;
|
|
215
306
|
};
|
|
216
307
|
}
|
|
217
|
-
/** Server-owned config. `auth` and runner wiring are intentionally server-only and are not part of the worker ConfigSnapshot. */
|
|
308
|
+
/** Server-owned config. `auth` and runner wiring are intentionally server-only and are not part of the worker ConfigSnapshot. @public */
|
|
218
309
|
export interface LeitwerkConfig extends ConfigSnapshot {
|
|
310
|
+
/** @public */
|
|
219
311
|
server: ServerConfigSnapshot;
|
|
312
|
+
/** @public */
|
|
220
313
|
storage: StorageConfigSnapshot;
|
|
314
|
+
/** @internal */
|
|
221
315
|
components: Record<string, ComponentConfigSnapshot>;
|
|
316
|
+
/** @public */
|
|
222
317
|
workers: WorkersConfigSnapshot;
|
|
318
|
+
/** @internal */
|
|
223
319
|
development_tools: DevelopmentToolsConfig;
|
|
320
|
+
/** @public */
|
|
224
321
|
process_configs?: Record<string, ProcessConfigSnapshot>;
|
|
322
|
+
/** @internal */
|
|
225
323
|
notifications: NotificationsConfigSnapshot;
|
|
324
|
+
/** @internal */
|
|
226
325
|
sandbox: SandboxConfigSnapshot;
|
|
326
|
+
/** @public */
|
|
227
327
|
extension_loading: ExtensionLoadingConfigSnapshot;
|
|
228
|
-
/** Extension-owned config blocks, keyed by extension ID. */
|
|
328
|
+
/** Extension-owned config blocks, keyed by extension ID. @public */
|
|
229
329
|
extensions: Record<string, unknown>;
|
|
330
|
+
/** @internal */
|
|
230
331
|
auth?: AuthConfig;
|
|
231
|
-
/** Server-only Docker run-mode wiring; stripped from the worker snapshot. */
|
|
332
|
+
/** Server-only Docker run-mode wiring; stripped from the worker snapshot. @internal */
|
|
232
333
|
docker?: DockerRunnerConfig;
|
|
233
|
-
/** Server-only credentials delivered exclusively through authenticated worker.start. */
|
|
334
|
+
/** Server-only credentials delivered exclusively through authenticated worker.start. @internal */
|
|
234
335
|
docker_registries?: DockerRegistryConfig;
|
|
235
|
-
/** Server-only Kubernetes run-mode wiring; stripped from the worker snapshot. */
|
|
336
|
+
/** Server-only Kubernetes run-mode wiring; stripped from the worker snapshot. @internal */
|
|
236
337
|
kubernetes?: KubernetesRunnerConfig;
|
|
237
|
-
/** Server-only best-effort local dev/test runner wiring; stripped from the worker snapshot. */
|
|
338
|
+
/** Server-only best-effort local dev/test runner wiring; stripped from the worker snapshot. @public */
|
|
238
339
|
local_worker?: LocalWorkerRunnerConfig;
|
|
239
|
-
/** Reusable worker image selections; stripped from the worker snapshot. */
|
|
340
|
+
/** Reusable worker image selections; stripped from the worker snapshot. @internal */
|
|
240
341
|
worker_runtime_profiles?: Record<string, WorkerRuntimeProfileConfig>;
|
|
241
|
-
/** Server-only internal TLS for worker IPC; stripped from the worker snapshot. */
|
|
342
|
+
/** Server-only internal TLS for worker IPC; stripped from the worker snapshot. @internal */
|
|
242
343
|
internal_tls?: InternalTlsConfig;
|
|
243
|
-
/** Git repositories scanned for operator-managed skills. */
|
|
344
|
+
/** Git repositories scanned for operator-managed skills. @internal */
|
|
244
345
|
skill_repositories?: SkillRepositoryConfig[];
|
|
245
|
-
/** Server-owned repository-aware commit-message generation rules. */
|
|
346
|
+
/** Server-owned repository-aware commit-message generation rules. @internal */
|
|
246
347
|
commit_messages?: CommitMessageConfig;
|
|
247
|
-
/** Bounded archive and extraction ceilings for local session transfer. */
|
|
348
|
+
/** Bounded archive and extraction ceilings for local session transfer. @internal */
|
|
248
349
|
session_transfer?: SessionTransferConfig;
|
|
249
350
|
}
|
|
250
351
|
//# sourceMappingURL=config-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types.d.ts","sourceRoot":"","sources":["../../src/config/config-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,uBAAuB,EACvB,cAAc,EACd,8BAA8B,EAC9B,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,MAAM,
|
|
1
|
+
{"version":3,"file":"config-types.d.ts","sourceRoot":"","sources":["../../src/config/config-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,uBAAuB,EACvB,cAAc,EACd,8BAA8B,EAC9B,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAq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,8BAA8B,CAAC;IAClD,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,gBAAgB;IAChB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,uFAAuF;IACvF,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,kGAAkG;IAClG,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;IACzC,2FAA2F;IAC3F,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,uGAAuG;IACvG,YAAY,CAAC,EAAE,uBAAuB,CAAC;IACvC,qFAAqF;IACrF,uBAAuB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IACrE,4FAA4F;IAC5F,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC7C,+EAA+E;IAC/E,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;CACzC"}
|
|
@@ -1,33 +1,57 @@
|
|
|
1
1
|
import type { Actor } from "@leitwerk-dev/domain";
|
|
2
2
|
import type { ApiTokenMetadata } from "@leitwerk-dev/protocol/http-contracts";
|
|
3
3
|
import type { LeitwerkDb } from "./database.js";
|
|
4
|
+
/** @internal */
|
|
4
5
|
export type TokenProviderBinding = {
|
|
6
|
+
/** @internal */
|
|
5
7
|
id: string;
|
|
8
|
+
/** @internal */
|
|
6
9
|
kind: "oidc";
|
|
10
|
+
/** @internal */
|
|
7
11
|
issuer: string;
|
|
12
|
+
/** @internal */
|
|
8
13
|
identityClaim: string;
|
|
9
14
|
} | {
|
|
15
|
+
/** @internal */
|
|
10
16
|
id: string;
|
|
17
|
+
/** @internal */
|
|
11
18
|
kind: "oauth2";
|
|
19
|
+
/** @internal */
|
|
12
20
|
organization: string;
|
|
13
21
|
};
|
|
22
|
+
/** @internal */
|
|
14
23
|
export interface ApiTokenOwner {
|
|
24
|
+
/** @internal */
|
|
15
25
|
kind: "user" | "anonymous";
|
|
26
|
+
/** @internal */
|
|
16
27
|
id: string;
|
|
28
|
+
/** @internal */
|
|
17
29
|
actor: Actor;
|
|
30
|
+
/** @internal */
|
|
18
31
|
providerBinding: TokenProviderBinding | null;
|
|
19
32
|
}
|
|
33
|
+
/** @internal */
|
|
20
34
|
export interface ApiTokenRecord extends ApiTokenMetadata {
|
|
35
|
+
/** @internal */
|
|
21
36
|
secretHash: string;
|
|
37
|
+
/** @internal */
|
|
22
38
|
owner: ApiTokenOwner;
|
|
23
39
|
}
|
|
40
|
+
/** @internal */
|
|
24
41
|
export declare function createApiTokenRepo(db: LeitwerkDb): {
|
|
42
|
+
/** @internal */
|
|
25
43
|
create({ owner, ...fields }: ApiTokenRecord): void;
|
|
44
|
+
/** @internal */
|
|
26
45
|
list(owner: ApiTokenOwner): ApiTokenRecord[];
|
|
46
|
+
/** @internal */
|
|
27
47
|
findByHash(hash: string): ApiTokenRecord | null;
|
|
48
|
+
/** @internal */
|
|
28
49
|
revoke(owner: ApiTokenOwner, id: string, at: string): boolean;
|
|
50
|
+
/** @internal */
|
|
29
51
|
revokeAll(owner: ApiTokenOwner, at: string): number;
|
|
52
|
+
/** @internal */
|
|
30
53
|
revokeAnonymous(at: string): number;
|
|
54
|
+
/** @internal */
|
|
31
55
|
touch(id: string, at: string): void;
|
|
32
56
|
};
|
|
33
57
|
//# sourceMappingURL=api-token-repo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-token-repo.d.ts","sourceRoot":"","sources":["../../src/db/api-token-repo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,MAAM,MAA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G,cAAc,GAAG,IAAI;IAI/C,gBAAgB;kBACF,aAAa,MAAM,MAAM,MAAM,MAAM,GAAG,OAAO;IAS7D,gBAAgB;qBACC,aAAa,MAAM,MAAM,GAAG,MAAM;IAQnD,gBAAgB;wBACI,MAAM,GAAG,MAAM;IAQnC,gBAAgB;cACN,MAAM,MAAM,MAAM,GAAG,IAAI;EAIpC"}
|
package/dist/db/auth-repo.d.ts
CHANGED
|
@@ -1,39 +1,69 @@
|
|
|
1
1
|
import type { Actor } from "@leitwerk-dev/domain";
|
|
2
2
|
import type { LeitwerkDb } from "./database.js";
|
|
3
|
+
/** @internal */
|
|
3
4
|
export interface AuthSessionRecord {
|
|
5
|
+
/** @internal */
|
|
4
6
|
idHash: string;
|
|
7
|
+
/** @internal */
|
|
5
8
|
actor: Actor;
|
|
9
|
+
/** @internal */
|
|
6
10
|
createdAt: string;
|
|
11
|
+
/** @internal */
|
|
7
12
|
expiresAt: string;
|
|
8
13
|
}
|
|
14
|
+
/** @internal */
|
|
9
15
|
export interface AuthLoginFlowRecord {
|
|
16
|
+
/** @internal */
|
|
10
17
|
idHash: string;
|
|
18
|
+
/** @internal */
|
|
11
19
|
providerId: string;
|
|
20
|
+
/** @internal */
|
|
12
21
|
state: string;
|
|
22
|
+
/** @internal */
|
|
13
23
|
pkceVerifier: string;
|
|
24
|
+
/** @internal */
|
|
14
25
|
createdAt: string;
|
|
26
|
+
/** @internal */
|
|
15
27
|
expiresAt: string;
|
|
16
28
|
}
|
|
29
|
+
/** @internal */
|
|
17
30
|
export declare function createAuthSessionRepo(db: LeitwerkDb): {
|
|
31
|
+
/** @internal */
|
|
18
32
|
create(input: {
|
|
33
|
+
/** @internal */
|
|
19
34
|
idHash: string;
|
|
35
|
+
/** @internal */
|
|
20
36
|
actor: Actor;
|
|
37
|
+
/** @internal */
|
|
21
38
|
expiresAt: string;
|
|
22
39
|
}): AuthSessionRecord;
|
|
40
|
+
/** @internal */
|
|
23
41
|
getValid(idHash: string, atIso?: string): AuthSessionRecord | null;
|
|
42
|
+
/** @internal */
|
|
24
43
|
delete(idHash: string): boolean;
|
|
44
|
+
/** @internal */
|
|
25
45
|
deleteExpired(atIso?: string): number;
|
|
26
46
|
};
|
|
47
|
+
/** @internal */
|
|
27
48
|
export declare function createAuthLoginFlowRepo(db: LeitwerkDb): {
|
|
49
|
+
/** @internal */
|
|
28
50
|
create(input: {
|
|
51
|
+
/** @internal */
|
|
29
52
|
idHash: string;
|
|
53
|
+
/** @internal */
|
|
30
54
|
providerId: string;
|
|
55
|
+
/** @internal */
|
|
31
56
|
state: string;
|
|
57
|
+
/** @internal */
|
|
32
58
|
pkceVerifier: string;
|
|
59
|
+
/** @internal */
|
|
33
60
|
expiresAt: string;
|
|
34
61
|
}): AuthLoginFlowRecord;
|
|
62
|
+
/** @internal */
|
|
35
63
|
getValid(idHash: string, atIso?: string): AuthLoginFlowRecord | null;
|
|
64
|
+
/** @internal */
|
|
36
65
|
delete(idHash: string): boolean;
|
|
66
|
+
/** @internal */
|
|
37
67
|
deleteExpired(atIso?: string): number;
|
|
38
68
|
};
|
|
39
69
|
//# sourceMappingURL=auth-repo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-repo.d.ts","sourceRoot":"","sources":["../../src/db/auth-repo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,SA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gB;AAChB,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,UAAU;IAEpD,gBAAgB;kBACF;QACb,gBAAgB;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,gBAAgB;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,gBAAgB;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,gBAAgB;QAChB,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB;QAChB,SAAS,EAAE,MAAM,CAAC;KAClB,GAAG,mBAAmB;IAavB,gBAAgB;qBACC,MAAM,UAAS,MAAM,GAAW,mBAAmB,GAAG,IAAI;IAS3E,gBAAgB;mBACD,MAAM,GAAG,OAAO;IAK/B,gBAAgB;0BACK,MAAM,GAAW,MAAM;EAK7C"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
/** Application boundary for encrypted credential payloads. Callers supply deployment key material. */
|
|
1
|
+
/** Application boundary for encrypted credential payloads. Callers supply deployment key material. @internal */
|
|
2
2
|
export interface CredentialCipher {
|
|
3
|
+
/** @internal */
|
|
3
4
|
encrypt(plaintext: string): string;
|
|
5
|
+
/** @internal */
|
|
4
6
|
decrypt(ciphertext: string): string;
|
|
5
7
|
}
|
|
8
|
+
/** @internal */
|
|
6
9
|
export declare const PROVIDER_CREDENTIAL_KEY_ENV = "LEITWERK_CREDENTIAL_ENCRYPTION_KEY";
|
|
7
|
-
/** A missing deployment key may inspect an empty table but can never read or write credentials. */
|
|
10
|
+
/** A missing deployment key may inspect an empty table but can never read or write credentials. @internal */
|
|
8
11
|
export declare function createUnavailableCredentialCipher(): CredentialCipher;
|
|
9
|
-
/** Parses an exact 32-byte Base64 deployment secret. */
|
|
12
|
+
/** Parses an exact 32-byte Base64 deployment secret. @internal */
|
|
10
13
|
export declare function createCredentialCipherFromBase64(value: string): CredentialCipher;
|
|
14
|
+
/** @internal */
|
|
11
15
|
export declare function createCredentialCipherFromEnvironment(environment?: NodeJS.ProcessEnv): CredentialCipher | null;
|
|
16
|
+
/** @internal */
|
|
12
17
|
export declare function createAes256GcmCredentialCipher(key: Buffer): CredentialCipher;
|
|
13
18
|
//# sourceMappingURL=credential-cipher.d.ts.map
|