@leitwerk-dev/server 0.3.0 → 0.4.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-WfwKzrVk.d.ts → app-CsuxFZT5.d.ts} +332 -111
- package/dist/app-JM4CBTND.js +8 -0
- package/dist/app.d.ts +9 -0
- package/dist/app.d.ts.map +1 -1
- package/dist/auth/fastify-auth.d.ts +9 -0
- package/dist/auth/fastify-auth.d.ts.map +1 -1
- package/dist/{chunk-LK3RO6C7.js → chunk-FPMDWQF7.js} +3050 -645
- package/dist/chunk-FPMDWQF7.js.map +1 -0
- package/dist/{chunk-KIOQNNG6.js → chunk-MBHRCQFE.js} +2781 -1822
- package/dist/chunk-MBHRCQFE.js.map +1 -0
- package/dist/config/config-loader.d.ts +1 -1
- package/dist/config/config-loader.d.ts.map +1 -1
- package/dist/config/config-types.d.ts +14 -1
- package/dist/config/config-types.d.ts.map +1 -1
- package/dist/config/kubernetes-docker-isolation.d.ts +7 -0
- package/dist/config/kubernetes-docker-isolation.d.ts.map +1 -0
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/execution-inspection-repo.d.ts +15 -0
- package/dist/db/execution-inspection-repo.d.ts.map +1 -0
- package/dist/db/history-window.d.ts +11 -0
- package/dist/db/history-window.d.ts.map +1 -0
- package/dist/db/mapped-llm-run-repo.d.ts +56 -0
- package/dist/db/mapped-llm-run-repo.d.ts.map +1 -0
- package/dist/db/process-event-repo.d.ts +2 -0
- package/dist/db/process-event-repo.d.ts.map +1 -1
- package/dist/db/process-instance-repo.d.ts +4 -1
- package/dist/db/process-instance-repo.d.ts.map +1 -1
- package/dist/db/process-leaf-outcome-snapshot-repo.d.ts +2 -1
- package/dist/db/process-leaf-outcome-snapshot-repo.d.ts.map +1 -1
- package/dist/db/process-project-repo.d.ts +2 -0
- package/dist/db/process-project-repo.d.ts.map +1 -1
- package/dist/db/process-skill-repo.d.ts.map +1 -1
- package/dist/db/process-turn-annotation-repo.d.ts +4 -1
- package/dist/db/process-turn-annotation-repo.d.ts.map +1 -1
- package/dist/db/process-turn-record-repo.d.ts +7 -1
- package/dist/db/process-turn-record-repo.d.ts.map +1 -1
- package/dist/db/publication-repo.d.ts +5 -0
- package/dist/db/publication-repo.d.ts.map +1 -0
- package/dist/db/repo-helpers.d.ts +6 -0
- package/dist/db/repo-helpers.d.ts.map +1 -1
- package/dist/db/repositories.d.ts +16 -0
- package/dist/db/repositories.d.ts.map +1 -1
- package/dist/db/schema.d.ts +1177 -71
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/scoped-settings-repo.d.ts +37 -0
- package/dist/db/scoped-settings-repo.d.ts.map +1 -0
- package/dist/db/skill-repo.d.ts +3 -0
- package/dist/db/skill-repo.d.ts.map +1 -1
- package/dist/db/turn-start-record-repo.d.ts +2 -1
- package/dist/db/turn-start-record-repo.d.ts.map +1 -1
- package/dist/db/turn-summary-repo.d.ts +1 -1
- package/dist/db/turn-summary-repo.d.ts.map +1 -1
- package/dist/db/worker-lease-repo.d.ts +2 -1
- package/dist/db/worker-lease-repo.d.ts.map +1 -1
- package/dist/domain-logic/outcome-tools.d.ts.map +1 -1
- package/dist/external-source-service.d.ts.map +1 -1
- package/dist/future-execution/execution.d.ts +4 -1
- package/dist/future-execution/execution.d.ts.map +1 -1
- package/dist/future-execution/launch-lifecycle.d.ts +9 -25
- package/dist/future-execution/launch-lifecycle.d.ts.map +1 -1
- package/dist/future-execution/lifecycle.d.ts +3 -28
- package/dist/future-execution/lifecycle.d.ts.map +1 -1
- package/dist/future-execution/model-projection.d.ts.map +1 -1
- package/dist/future-execution/reconciliation.d.ts +1 -0
- package/dist/future-execution/reconciliation.d.ts.map +1 -1
- package/dist/future-execution-presenter.d.ts +4 -14
- package/dist/future-execution-presenter.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/integration-tool-registry.d.ts +11 -2
- package/dist/integration-tool-registry.d.ts.map +1 -1
- package/dist/launch-coordinator-test-harness.d.ts.map +1 -1
- package/dist/launch-coordinator.d.ts.map +1 -1
- package/dist/launcher-model-config-service.d.ts +7 -1
- package/dist/launcher-model-config-service.d.ts.map +1 -1
- package/dist/leaf-outcome-snapshot-capture.d.ts +1 -0
- package/dist/leaf-outcome-snapshot-capture.d.ts.map +1 -1
- package/dist/main.js +3 -3
- package/dist/primary-path-snapshot.d.ts.map +1 -1
- package/dist/process-action-presenter.d.ts +11 -0
- package/dist/process-action-presenter.d.ts.map +1 -0
- package/dist/process-action-registry.d.ts.map +1 -1
- package/dist/process-engine/decision.d.ts +2 -0
- package/dist/process-engine/decision.d.ts.map +1 -1
- package/dist/process-engine/engine.d.ts.map +1 -1
- package/dist/process-engine/mapped-turns.d.ts +45 -0
- package/dist/process-engine/mapped-turns.d.ts.map +1 -0
- package/dist/process-engine/operation.d.ts +1 -1
- package/dist/process-engine/operation.d.ts.map +1 -1
- package/dist/process-engine/ops/accept-worker-turn-start.d.ts +2 -0
- package/dist/process-engine/ops/accept-worker-turn-start.d.ts.map +1 -1
- package/dist/process-engine/ops/continue-failed-turn.d.ts.map +1 -1
- package/dist/process-engine/ops/process-observation.d.ts +6 -0
- package/dist/process-engine/ops/process-observation.d.ts.map +1 -0
- package/dist/process-engine/ops/retry-failed-turn.d.ts.map +1 -1
- package/dist/process-engine/ops/retry-startup.d.ts.map +1 -1
- package/dist/process-engine/ops/start-process.d.ts +2 -0
- package/dist/process-engine/ops/start-process.d.ts.map +1 -1
- package/dist/process-engine/ops/turn-outcome.d.ts.map +1 -1
- package/dist/process-engine/ops/turn-wait.d.ts +30 -0
- package/dist/process-engine/ops/turn-wait.d.ts.map +1 -0
- package/dist/process-engine/ops/update-model-config.d.ts +9 -0
- package/dist/process-engine/ops/update-model-config.d.ts.map +1 -0
- package/dist/process-engine/recorder.d.ts.map +1 -1
- package/dist/process-engine/turn-start-preflight.d.ts +6 -0
- package/dist/process-engine/turn-start-preflight.d.ts.map +1 -1
- package/dist/process-engine/turn-wait-state.d.ts +24 -0
- package/dist/process-engine/turn-wait-state.d.ts.map +1 -0
- package/dist/process-engine/turn-worker-requirement.d.ts +2 -0
- package/dist/process-engine/turn-worker-requirement.d.ts.map +1 -1
- package/dist/process-engine/types.d.ts +10 -1
- package/dist/process-engine/types.d.ts.map +1 -1
- package/dist/process-engine/writes/build-process-abort-writes.d.ts +3 -1
- package/dist/process-engine/writes/build-process-abort-writes.d.ts.map +1 -1
- package/dist/process-engine/writes/build-recovery-start-writes.d.ts.map +1 -1
- package/dist/process-engine/writes/build-turn-outcome-writes.d.ts +10 -1
- 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.map +1 -1
- package/dist/process-engine/writes/commit-writes.d.ts +2 -0
- package/dist/process-engine/writes/commit-writes.d.ts.map +1 -1
- package/dist/process-engine/writes/reserve-selected-turn-start.d.ts +5 -0
- package/dist/process-engine/writes/reserve-selected-turn-start.d.ts.map +1 -0
- package/dist/process-engine/writes/writes.d.ts +35 -49
- 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-inspection-reader.d.ts +21 -0
- package/dist/process-inspection-reader.d.ts.map +1 -0
- package/dist/process-inspection-trace.d.ts +13 -0
- package/dist/process-inspection-trace.d.ts.map +1 -0
- package/dist/process-inspection.d.ts +22 -0
- package/dist/process-inspection.d.ts.map +1 -0
- package/dist/process-instance-tree-presenter.d.ts +4 -3
- package/dist/process-instance-tree-presenter.d.ts.map +1 -1
- package/dist/process-launch-executor.d.ts +2 -0
- package/dist/process-launch-executor.d.ts.map +1 -1
- package/dist/process-launch-plan.d.ts +1 -0
- package/dist/process-launch-plan.d.ts.map +1 -1
- package/dist/process-launcher-registry.d.ts.map +1 -1
- package/dist/process-model-config.d.ts +19 -0
- package/dist/process-model-config.d.ts.map +1 -0
- package/dist/process-model-policy/construct.d.ts.map +1 -1
- package/dist/process-model-policy/evaluate.d.ts.map +1 -1
- package/dist/process-model-policy/index.d.ts +4 -1
- package/dist/process-model-policy/index.d.ts.map +1 -1
- package/dist/process-model-policy/project.d.ts.map +1 -1
- package/dist/process-model-policy/types.d.ts +18 -0
- package/dist/process-model-policy/types.d.ts.map +1 -1
- package/dist/process-model-policy-presenter.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-turn-navigation.d.ts +12 -2
- package/dist/process-turn-navigation.d.ts.map +1 -1
- package/dist/process-turn-trace.d.ts.map +1 -1
- package/dist/process-ui-snapshot-presenter.d.ts +15 -3
- package/dist/process-ui-snapshot-presenter.d.ts.map +1 -1
- package/dist/routes/future-executions.d.ts.map +1 -1
- package/dist/routes/launchers.d.ts.map +1 -1
- package/dist/routes/process-actions.d.ts.map +1 -1
- package/dist/routes/process-detail.d.ts.map +1 -1
- package/dist/routes/process-diagnostics-assembler.d.ts +3 -1
- package/dist/routes/process-diagnostics-assembler.d.ts.map +1 -1
- package/dist/routes/process-model-config.d.ts +4 -0
- package/dist/routes/process-model-config.d.ts.map +1 -0
- package/dist/routes/process-primary-path-assembler.d.ts +4 -12
- package/dist/routes/process-primary-path-assembler.d.ts.map +1 -1
- package/dist/routes/process-route-helpers.d.ts +15 -41
- package/dist/routes/process-route-helpers.d.ts.map +1 -1
- package/dist/routes/processes.d.ts.map +1 -1
- package/dist/routes/settings.d.ts +11 -0
- package/dist/routes/settings.d.ts.map +1 -0
- package/dist/routes/ticket-creation.d.ts.map +1 -1
- package/dist/scoped-settings-service.d.ts +83 -0
- package/dist/scoped-settings-service.d.ts.map +1 -0
- package/dist/server-bootstrap/build-host-capabilities.d.ts +2 -0
- package/dist/server-bootstrap/build-host-capabilities.d.ts.map +1 -1
- package/dist/server-bootstrap/register-http.d.ts.map +1 -1
- package/dist/session-summary-projection.d.ts.map +1 -1
- package/dist/skills/bundled-skills.d.ts +5 -0
- package/dist/skills/bundled-skills.d.ts.map +1 -0
- package/dist/skills/catalog-service.d.ts +1 -0
- package/dist/skills/catalog-service.d.ts.map +1 -1
- package/dist/skills/extension-importer.d.ts +11 -0
- package/dist/skills/extension-importer.d.ts.map +1 -0
- package/dist/skills/launch-skills.d.ts +11 -0
- package/dist/skills/launch-skills.d.ts.map +1 -0
- package/dist/skills/skill-frontmatter.d.ts +5 -0
- package/dist/skills/skill-frontmatter.d.ts.map +1 -1
- package/dist/skills/source-importer.d.ts +3 -0
- package/dist/skills/source-importer.d.ts.map +1 -1
- package/dist/startup-evidence.d.ts +3 -0
- package/dist/startup-evidence.d.ts.map +1 -1
- package/dist/supervisor/execution-inspection-ingestor.d.ts +9 -0
- package/dist/supervisor/execution-inspection-ingestor.d.ts.map +1 -0
- package/dist/supervisor/ipc-handler.d.ts +2 -0
- package/dist/supervisor/ipc-handler.d.ts.map +1 -1
- package/dist/supervisor/worker-event-ingestor.d.ts +1 -0
- package/dist/supervisor/worker-event-ingestor.d.ts.map +1 -1
- package/dist/supervisor/worker-start-payload-builder.d.ts +2 -0
- package/dist/supervisor/worker-start-payload-builder.d.ts.map +1 -1
- package/dist/supervisor/worker-supervisor.d.ts +4 -0
- package/dist/supervisor/worker-supervisor.d.ts.map +1 -1
- package/dist/supervisor/worker-turn-ipc-recorder.d.ts +2 -2
- package/dist/supervisor/worker-turn-ipc-recorder.d.ts.map +1 -1
- package/dist/test-helpers/accepted-turn-start.d.ts +18 -4
- package/dist/test-helpers/accepted-turn-start.d.ts.map +1 -1
- package/dist/test-helpers/owned-test-deps.d.ts +18 -0
- package/dist/test-helpers/owned-test-deps.d.ts.map +1 -0
- package/dist/test-helpers/prepared-fixture-start.d.ts.map +1 -1
- package/dist/test-helpers/process-model-fixtures.d.ts +1 -0
- package/dist/test-helpers/process-model-fixtures.d.ts.map +1 -1
- package/dist/test-helpers/scoped-settings-fixtures.d.ts +16 -0
- package/dist/test-helpers/scoped-settings-fixtures.d.ts.map +1 -0
- package/dist/test-helpers/skill-fixtures.d.ts +4 -0
- package/dist/test-helpers/skill-fixtures.d.ts.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +14 -10
- package/dist/testing.js.map +1 -1
- package/dist/tool-approval-gate.d.ts +3 -0
- package/dist/tool-approval-gate.d.ts.map +1 -1
- package/dist/turn-progress.d.ts.map +1 -1
- package/dist/turn-wait-service.d.ts +28 -0
- package/dist/turn-wait-service.d.ts.map +1 -0
- package/dist/worker-runtime-profile-selection.d.ts +2 -0
- package/dist/worker-runtime-profile-selection.d.ts.map +1 -1
- package/package.json +20 -19
- package/src/app.ts +117 -5
- package/src/auth/fastify-auth.ts +13 -0
- package/src/config/config-loader.ts +40 -2
- package/src/config/config-types.ts +14 -1
- package/src/config/kubernetes-docker-isolation.ts +21 -0
- package/src/db/database.ts +159 -40
- package/src/db/execution-inspection-repo.ts +163 -0
- package/src/db/history-window.ts +18 -0
- package/src/db/mapped-llm-run-repo.ts +177 -0
- package/src/db/process-event-repo.ts +88 -10
- package/src/db/process-instance-repo.ts +9 -2
- package/src/db/process-leaf-outcome-snapshot-repo.ts +8 -2
- package/src/db/process-project-repo.ts +4 -0
- package/src/db/process-skill-repo.ts +9 -2
- package/src/db/process-turn-annotation-repo.ts +27 -9
- package/src/db/process-turn-record-repo.ts +53 -13
- package/src/db/publication-repo.ts +63 -0
- package/src/db/repo-helpers.ts +11 -1
- package/src/db/repositories.ts +22 -0
- package/src/db/schema.ts +173 -2
- package/src/db/scoped-settings-repo.ts +234 -0
- package/src/db/skill-repo.ts +89 -27
- package/src/db/turn-start-record-repo.ts +13 -3
- package/src/db/turn-summary-repo.ts +12 -3
- package/src/db/worker-lease-repo.ts +8 -2
- package/src/domain-logic/outcome-tools.ts +4 -149
- package/src/external-source-service.ts +33 -7
- package/src/future-execution/execution.ts +9 -2
- package/src/future-execution/launch-lifecycle.ts +87 -78
- package/src/future-execution/lifecycle.ts +5 -34
- package/src/future-execution/model-projection.ts +2 -0
- package/src/future-execution/reconciliation.ts +7 -0
- package/src/future-execution-presenter.ts +14 -22
- package/src/integration-tool-registry.ts +59 -26
- package/src/launch-coordinator-test-harness.ts +8 -4
- package/src/launch-coordinator.ts +10 -1
- package/src/launcher-model-config-service.ts +24 -3
- package/src/leaf-outcome-snapshot-capture.ts +2 -0
- package/src/primary-path-snapshot.ts +3 -4
- package/src/process-action-presenter.ts +98 -0
- package/src/process-action-registry.ts +31 -39
- package/src/process-engine/decision.ts +10 -0
- package/src/process-engine/engine.ts +13 -4
- package/src/process-engine/mapped-turns.ts +328 -0
- package/src/process-engine/operation.ts +1 -1
- package/src/process-engine/ops/accept-worker-turn-start.ts +6 -0
- package/src/process-engine/ops/continue-failed-turn.ts +2 -13
- package/src/process-engine/ops/process-observation.ts +119 -0
- package/src/process-engine/ops/retry-failed-turn.ts +2 -12
- package/src/process-engine/ops/retry-startup.ts +10 -13
- package/src/process-engine/ops/start-process.ts +34 -2
- package/src/process-engine/ops/turn-outcome.ts +65 -62
- package/src/process-engine/ops/turn-wait.ts +225 -0
- package/src/process-engine/ops/update-model-config.ts +66 -0
- package/src/process-engine/recorder.ts +33 -5
- package/src/process-engine/runner.ts +8 -8
- package/src/process-engine/turn-start-preflight.ts +168 -105
- package/src/process-engine/turn-wait-state.ts +126 -0
- package/src/process-engine/turn-worker-requirement.ts +4 -0
- package/src/process-engine/types.ts +15 -0
- package/src/process-engine/writes/build-process-abort-writes.ts +30 -19
- package/src/process-engine/writes/build-recovery-start-writes.ts +1 -0
- package/src/process-engine/writes/build-turn-outcome-writes.ts +118 -21
- package/src/process-engine/writes/build-turn-selection-writes.ts +2 -31
- package/src/process-engine/writes/commit-writes.ts +20 -2
- package/src/process-engine/writes/reserve-selected-turn-start.ts +44 -0
- package/src/process-engine/writes/writes.ts +73 -61
- package/src/process-graph.ts +0 -1
- package/src/process-inspection-reader.ts +305 -0
- package/src/process-inspection-trace.ts +176 -0
- package/src/process-inspection.ts +169 -0
- package/src/process-instance-tree-presenter.ts +56 -216
- package/src/process-launch-executor.ts +5 -2
- package/src/process-launch-plan.ts +17 -2
- package/src/process-launcher-registry.ts +28 -16
- package/src/process-model-config.ts +100 -0
- package/src/process-model-policy/construct.ts +1 -0
- package/src/process-model-policy/evaluate.ts +34 -32
- package/src/process-model-policy/index.ts +45 -3
- package/src/process-model-policy/project.ts +62 -76
- package/src/process-model-policy/types.ts +26 -0
- package/src/process-model-policy-presenter.ts +7 -3
- package/src/process-runtime-availability.ts +9 -4
- package/src/process-turn-navigation.ts +86 -8
- package/src/process-turn-trace.ts +12 -24
- package/src/process-ui-snapshot-presenter.ts +249 -298
- package/src/routes/future-executions.ts +5 -5
- package/src/routes/launchers.ts +51 -1
- package/src/routes/process-actions.ts +10 -10
- package/src/routes/process-detail.ts +25 -2
- package/src/routes/process-diagnostics-assembler.ts +32 -6
- package/src/routes/process-model-config.ts +70 -0
- package/src/routes/process-primary-path-assembler.ts +17 -33
- package/src/routes/process-route-helpers.ts +161 -327
- package/src/routes/processes.ts +2 -0
- package/src/routes/settings.ts +173 -0
- package/src/routes/ticket-creation.ts +28 -5
- package/src/scoped-settings-service.ts +736 -0
- package/src/server-bootstrap/build-host-capabilities.ts +42 -0
- package/src/server-bootstrap/register-http.ts +7 -1
- package/src/session-summary-projection.ts +1 -2
- package/src/skills/bundled-skills.ts +64 -0
- package/src/skills/catalog-service.ts +35 -6
- package/src/skills/extension-importer.ts +97 -0
- package/src/skills/launch-skills.ts +19 -0
- package/src/skills/skill-frontmatter.ts +13 -0
- package/src/skills/source-importer.ts +3 -0
- package/src/startup-evidence.ts +20 -0
- package/src/supervisor/execution-inspection-ingestor.ts +55 -0
- package/src/supervisor/ipc-handler.ts +29 -18
- package/src/supervisor/worker-event-ingestor.ts +30 -14
- package/src/supervisor/worker-start-payload-builder.ts +42 -0
- package/src/supervisor/worker-supervisor.ts +5 -0
- package/src/supervisor/worker-turn-ipc-recorder.ts +13 -1
- package/src/test-helpers/accepted-turn-start.ts +51 -27
- package/src/test-helpers/owned-test-deps.ts +45 -0
- package/src/test-helpers/prepared-fixture-start.ts +1 -0
- package/src/test-helpers/process-model-fixtures.ts +2 -0
- package/src/test-helpers/scoped-settings-fixtures.ts +126 -0
- package/src/test-helpers/skill-fixtures.ts +28 -0
- package/src/testing.ts +4 -1
- package/src/tool-approval-gate.ts +16 -0
- package/src/turn-progress.ts +3 -2
- package/src/turn-wait-service.ts +228 -0
- package/src/worker-runtime-profile-selection.ts +8 -1
- package/dist/app-4QSV4FUQ.js +0 -8
- package/dist/chunk-KIOQNNG6.js.map +0 -1
- package/dist/chunk-LK3RO6C7.js.map +0 -1
- /package/dist/{app-4QSV4FUQ.js.map → app-JM4CBTND.js.map} +0 -0
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { CatalogPiContribution, ExtensionCatalog, DiscoveredExtensionEntry, LeitwerkRuntimeLane } from '@leitwerk-dev/extension-runtime';
|
|
3
3
|
import * as _leitwerk_dev_process_sdk from '@leitwerk-dev/process-sdk';
|
|
4
|
-
import { ServerExtensionEventMap, ModelProviderDefinition, ProviderCredentialStatus, ProviderAvailability, PiServerAdapter, HandoffDedupKeyRecordLike, ProcessActionDefinition, ServerProcessContext, ProcessActionPreviewDefinition, BuiltServerProcessDefinition, TurnDefinition, ExtensionProcessDefinition, ProcessActionExecutionSource, TurnAcceptanceState, ProcessActionSchedulingDefinition, ProcessLaunchPlan, LaunchPlanPreparationResultLike, QueuedProcessInputLike, ProcessLeafOutcomeDefinition, ServerExtensionEventName, DeferredProcessActivationSnapshotQuery, DeferredProcessActivationSnapshotResult, PreparedDeferredProcessActivation, DeferredProcessActivationOutcome, DeferredProcessActivationFailure, ProcessGraphRegistry, ActionExecutionResultLike, ProcessActionServiceLike, ProcessLaunchPlanServiceLike, ProcessLauncherService, ProgrammaticLaunchRequestLike, ProgrammaticLaunchResultLike, RegisteredProcessWatcherLike, ExternalSourceServiceLike, ProcessModelSelectionServiceLike, ProvidedCapability } from '@leitwerk-dev/process-sdk';
|
|
4
|
+
import { ServerExtensionEventMap, ModelProviderDefinition, ProviderCredentialStatus, ProviderAvailability, PiServerAdapter, HandoffDedupKeyRecordLike, ProcessActionDefinition, ServerProcessContext, ProcessActionPreviewDefinition, BuiltServerProcessDefinition, TurnDefinition, ExtensionProcessDefinition, ProcessActionExecutionSource, TurnAcceptanceState, ProcessActionSchedulingDefinition, ScopedSettingsResolver, ProcessLaunchPlan, LaunchPlanPreparationResultLike, QueuedProcessInputLike, ProcessLeafOutcomeDefinition, ServerExtensionEventName, ProcessObservationUpdate, DeferredProcessActivationSnapshotQuery, DeferredProcessActivationSnapshotResult, PreparedDeferredProcessActivation, DeferredProcessActivationOutcome, DeferredProcessActivationFailure, ProcessGraphRegistry, WaitingProcessRestart, ActionExecutionResultLike, ProcessActionServiceLike, ProcessLaunchPlanServiceLike, ProcessLauncherService, ProgrammaticLaunchRequestLike, ProgrammaticLaunchResultLike, RegisteredProcessWatcherLike, ExternalSourceServiceLike, ProcessModelSelectionServiceLike, ProvidedCapability } from '@leitwerk-dev/process-sdk';
|
|
5
5
|
import { ProcessStateExportHelperRelay, ProcessStateExporter, WorkerRunner, ProcessVolume } from '@leitwerk-dev/worker-runners';
|
|
6
6
|
import { FastifyInstance } from 'fastify';
|
|
7
7
|
import { ConfigSnapshot, ServerConfigSnapshot, StorageConfigSnapshot, ComponentConfigSnapshot, WorkersConfigSnapshot, ProcessConfigSnapshot, NotificationsConfigSnapshot, SandboxConfigSnapshot, ExtensionLoadingConfigSnapshot } from '@leitwerk-dev/protocol/config-snapshot';
|
|
8
8
|
import { DockerNetworkConfig, PiResourceBundle, PiResourceProvenanceKind, WorkerQuestionResponsePayload, WorkerQuestionRequestedPayload, WorkerTurnFailedPayload, WorkerIntegrationToolRequestPayload, WorkerIntegrationToolResultPayload, WorkerIntegrationToolCancelPayload, WorkerTurnStartAcceptedPayload, WorkerCredentialUpdateResultPayload, IpcEnvelope, ServerToWorkerMessage, InputDelivery, WorkerTurnTerminalRecordedPayload } from '@leitwerk-dev/worker-protocol';
|
|
9
9
|
import { drizzle } from 'drizzle-orm/node-sqlite';
|
|
10
10
|
import * as _leitwerk_dev_protocol from '@leitwerk-dev/protocol';
|
|
11
|
-
import { LeafOutcomeRendererDescriptor, BrowserUiExtensionDescriptor, CompactTurnSummary, PrimaryPathUiSnapshot, TurnTracePreview, SkillSelection, SkillOptionSummary, SkillCatalogItem, InstalledSkillCatalogItem, SkillCatalogDetail, InstalledSkillCatalogDetail, WsFrame, KnownDurableWsFrameType, WsPayloadByType, KnownEphemeralWsFrameType, PrimaryPathEntrySnapshot, DurableWsFrameInput, ParsedLauncherRequestBody, LauncherModelConfigDefaults, LauncherValidationError, ParsedActionRequestBody, SkillsCatalogResponseBody } from '@leitwerk-dev/protocol';
|
|
12
|
-
import { Actor, StartupObservation, ExternalWriteLog, FutureExecutionScheduleKind, DurableModelSelection, FutureExecutionBlockReason, FutureExecutionKind, FutureExecution, LaunchOrigin, LaunchChecklistStep, LaunchRun, ProcessEvent, InputSource, InputKind, ProcessInputTarget, ProcessInput, ProcessCustomizableFields,
|
|
11
|
+
import { LeafOutcomeRendererDescriptor, BrowserUiExtensionDescriptor, InspectionConfigurationRevision, CompactTurnSummary, PrimaryPathUiSnapshot, TurnTracePreview, SkillSelection, SkillRevisionProvenance, SkillOptionSummary, SkillCatalogItem, InstalledSkillCatalogItem, SkillCatalogDetail, InstalledSkillCatalogDetail, WsFrame, KnownDurableWsFrameType, WsPayloadByType, KnownEphemeralWsFrameType, PrimaryPathEntrySnapshot, DurableWsFrameInput, ParsedLauncherRequestBody, LauncherModelConfigDefaults, validateScheduleRequestInput, LauncherValidationError, ParsedActionRequestBody, SkillsCatalogResponseBody } from '@leitwerk-dev/protocol';
|
|
12
|
+
import { Actor, ExecutionInspectionRecord, InspectionContextObservation, SettingsSubject, SettingsOverride, StartupObservation, ExternalWriteLog, FutureExecutionScheduleKind, DurableModelSelection, FutureExecutionBlockReason, FutureExecutionKind, FutureExecution, LaunchOrigin, LaunchChecklistStep, LaunchRun, TurnId, MappedRunStatus, MappedItem, MappedRun, ProcessEvent, InputSource, InputKind, ProcessInputTarget, ProcessInput, ProcessCustomizableFields, ProcessLifecycleStatus, CurrentExecutionRef, ModelSelectionKind, ProcessSelectedTurnModelSource, ProcessInstance, ProcessLeafOutcomeSnapshotStatus, ProcessLeafOutcomeSnapshot, ProcessProject, ProcessQuestionRequest, NormalizedQuestion, ProcessRelation, ProcessToolApprovalRequest, ProcessToolApprovalDestination, ToolApprovalStatus, TurnAnnotationReference, ProcessTurnAnnotation, ProcessTurnType, ProcessTurnRecordStatus, ModelSelectionProvenance, MappedTurnItemRef, WorkerErrorClass, ProcessTurnRecordPathType, ProcessTurnRecord, TurnStartRecord, TurnStartRecordState, WorkerState, WorkerBootstrapReceipt, WorkerLease, ProcessTurnTerminalLifecycleStatus, ProcessSemanticEntryRefKey, ScopedSettingsSnapshot, SettingsContext, LaunchModelConfigInput, TurnStartKind, QuestionAnswerDraft, ProcessProductRef, TurnFailedPayload, TurnOutcomePayload } from '@leitwerk-dev/domain';
|
|
13
|
+
import { ApiTokenMetadata, ProcessSelectedTurnSummary, SettingsPreview, SettingFieldView, SettingsScopesResponse, SettingsOverviewResponse } from '@leitwerk-dev/protocol/http-contracts';
|
|
13
14
|
import { ToolCallRendererDefinition } from '@leitwerk-dev/protocol/tool-renderer-contract';
|
|
14
|
-
import {
|
|
15
|
+
import { createTopicWikiRepo } from '@leitwerk-dev/wiki/server';
|
|
16
|
+
import { PublicationStore } from '@leitwerk-dev/external-writes';
|
|
15
17
|
import { ExternalWriteLogRecordInput } from '@leitwerk-dev/external-writes/internal';
|
|
16
18
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
17
19
|
import { SessionTransferAttemptWire, SessionTransferLimits, LeitwerkTransferManifestV1 } from '@leitwerk-dev/session-transfer';
|
|
@@ -150,11 +152,17 @@ interface KubernetesProcessVolumeConfig {
|
|
|
150
152
|
}
|
|
151
153
|
/** @internal */
|
|
152
154
|
interface KubernetesDockerConfig {
|
|
155
|
+
/** Default profile for Docker processes without an explicit process/component profile. @internal */
|
|
156
|
+
worker_runtime_profile?: string;
|
|
157
|
+
/** Docker-only selector keys override matching global Pod selector keys. @internal */
|
|
158
|
+
node_selector?: Record<string, string>;
|
|
153
159
|
/** Pod RuntimeClass selected for every Docker-requiring process. @internal */
|
|
154
160
|
runtime_class_name?: string;
|
|
155
161
|
/** Pod user-namespace policy passed directly to spec.hostUsers. @internal */
|
|
156
162
|
host_users?: boolean;
|
|
157
|
-
/**
|
|
163
|
+
/** Trusted sandbox policy for a separately qualified cluster runtime. @internal */
|
|
164
|
+
isolation?: "gvisor" | "virtual-machine";
|
|
165
|
+
/** Legacy alias for isolation: gvisor when isolation is omitted. @internal */
|
|
158
166
|
gvisor?: boolean;
|
|
159
167
|
/** StorageClass selected for the process's single retained PVC. @internal */
|
|
160
168
|
process_storage_class_name?: string;
|
|
@@ -197,6 +205,11 @@ interface LocalWorkerRunnerConfig {
|
|
|
197
205
|
}
|
|
198
206
|
/** @internal */
|
|
199
207
|
interface KubernetesRunnerConfig {
|
|
208
|
+
/** Optional worker image preparation on eligible nodes; disabled by default. @internal */
|
|
209
|
+
image_preload?: {
|
|
210
|
+
/** @internal */
|
|
211
|
+
enabled: boolean;
|
|
212
|
+
};
|
|
200
213
|
/** Dedicated namespace where the singleton server runs. @internal */
|
|
201
214
|
server_namespace: string;
|
|
202
215
|
/** Safe DNS prefix used to derive one namespace per process instance. @internal */
|
|
@@ -361,6 +374,8 @@ interface LeitwerkConfig extends ConfigSnapshot {
|
|
|
361
374
|
internal_tls?: InternalTlsConfig;
|
|
362
375
|
/** Git repositories scanned for operator-managed skills. @internal */
|
|
363
376
|
skill_repositories?: SkillRepositoryConfig[];
|
|
377
|
+
/** Installed skill IDs included in new launches unless replaced by process defaults. @public */
|
|
378
|
+
default_skills?: string[];
|
|
364
379
|
/** Server-owned repository-aware commit-message generation rules. @internal */
|
|
365
380
|
commit_messages?: CommitMessageConfig;
|
|
366
381
|
/** Bounded archive and extraction ceilings for local session transfer. @internal */
|
|
@@ -613,6 +628,55 @@ declare function createApiTokenRepo(db: LeitwerkDb): {
|
|
|
613
628
|
touch(id: string, at: string): void;
|
|
614
629
|
};
|
|
615
630
|
|
|
631
|
+
/** Immutable content and incremental observation references. No session ancestry is copied. @internal */
|
|
632
|
+
declare function createExecutionInspectionRepo(db: LeitwerkDb): {
|
|
633
|
+
/** Model identities without loading retained prompts or message contents. @internal */
|
|
634
|
+
modelInputs(instanceId: string, turnRecordId: string): Pick<InspectionConfigurationRevision, "id" | "timestamp" | "boundaryEntryId" | "model">[];
|
|
635
|
+
/** @internal */
|
|
636
|
+
append(input: Omit<ExecutionInspectionRecord, "sequence">): "stored" | "replay";
|
|
637
|
+
/** Expanded evidence is read only on demand. @internal */
|
|
638
|
+
list(instanceId: string, turnRecordId: string): ExecutionInspectionRecord[];
|
|
639
|
+
/** Small origin/product references for compact lineage without loading prompts. @internal */
|
|
640
|
+
listContextFacts(instanceId: string, turnRecordIds?: string[]): InspectionContextObservation[];
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
/** @internal */
|
|
644
|
+
declare function createPublicationRepo(db: LeitwerkDb): PublicationStore;
|
|
645
|
+
|
|
646
|
+
/** @internal */
|
|
647
|
+
type SettingsWrite = Omit<SettingsOverride, "revision" | "createdAt" | "updatedAt"> & {
|
|
648
|
+
/** @internal */
|
|
649
|
+
expectedRevision: number;
|
|
650
|
+
};
|
|
651
|
+
/** @internal */
|
|
652
|
+
type SubjectWrite = Pick<SettingsSubject, "scopeType" | "identity" | "label" | "context"> & {
|
|
653
|
+
/** @internal */
|
|
654
|
+
id?: string;
|
|
655
|
+
};
|
|
656
|
+
/** @internal */
|
|
657
|
+
declare function createScopedSettingsRepo(db: LeitwerkDb): {
|
|
658
|
+
/** @internal */
|
|
659
|
+
listSubjects(): SettingsSubject[];
|
|
660
|
+
/** @internal */
|
|
661
|
+
getSubject(id: string): SettingsSubject | null;
|
|
662
|
+
/** @internal */
|
|
663
|
+
findIdentity(scopeType: string, identity: string): SettingsSubject | null;
|
|
664
|
+
/** @internal */
|
|
665
|
+
findAlias(alias: string): SettingsSubject | null;
|
|
666
|
+
/** @internal */
|
|
667
|
+
putSubject(input: SubjectWrite): SettingsSubject;
|
|
668
|
+
/** @internal */
|
|
669
|
+
putAlias(alias: string, subjectId: string): void;
|
|
670
|
+
/** @internal */
|
|
671
|
+
listOverrides(subjectId?: string): SettingsOverride[];
|
|
672
|
+
/** @internal */
|
|
673
|
+
getOverride(subjectId: string, key: string): SettingsOverride | null;
|
|
674
|
+
/** Atomic compare-and-swap, including resets and first writes. @internal */
|
|
675
|
+
write(input: SettingsWrite): SettingsOverride | null;
|
|
676
|
+
/** Call inside a transaction after verifying that active overrides agree. @internal */
|
|
677
|
+
mergeLocatorSubject(sourceId: string, targetId: string): void;
|
|
678
|
+
};
|
|
679
|
+
|
|
616
680
|
/** @internal */
|
|
617
681
|
declare function createStartupObservationRepo(db: LeitwerkDb): {
|
|
618
682
|
/** @internal */
|
|
@@ -653,7 +717,7 @@ declare function createTurnSummaryRepo(db: LeitwerkDb): {
|
|
|
653
717
|
/** @internal */
|
|
654
718
|
put(instanceId: string, turnRecordId: string, summary: CompactTurnSummary): void;
|
|
655
719
|
/** @internal */
|
|
656
|
-
listByInstance(instanceId: string): Record<string, CompactTurnSummary>;
|
|
720
|
+
listByInstance(instanceId: string, turnRecordIds?: string[]): Record<string, CompactTurnSummary>;
|
|
657
721
|
/** @internal */
|
|
658
722
|
getSession(instanceId: string): SessionSummary | null;
|
|
659
723
|
/** @internal */
|
|
@@ -916,6 +980,58 @@ declare function createLauncherRecentValueRepo(db: LeitwerkDb): {
|
|
|
916
980
|
pruneField(launcherId: string, fieldId: string, limit?: number): void;
|
|
917
981
|
};
|
|
918
982
|
|
|
983
|
+
/** @internal */
|
|
984
|
+
interface CreateMappedRunInput {
|
|
985
|
+
/** @internal */
|
|
986
|
+
id: string;
|
|
987
|
+
/** @internal */
|
|
988
|
+
instanceId: string;
|
|
989
|
+
/** @internal */
|
|
990
|
+
turnId: TurnId;
|
|
991
|
+
/** @internal */
|
|
992
|
+
status: MappedRunStatus;
|
|
993
|
+
/** @internal */
|
|
994
|
+
items: ReadonlyArray<Pick<MappedItem, "itemIndex" | "itemKey" | "label" | "itemJson">>;
|
|
995
|
+
}
|
|
996
|
+
/** @internal */
|
|
997
|
+
interface CompleteMappedItemInput {
|
|
998
|
+
/** @internal */
|
|
999
|
+
runId: string;
|
|
1000
|
+
/** @internal */
|
|
1001
|
+
itemIndex: number;
|
|
1002
|
+
/** @internal */
|
|
1003
|
+
outcome: string;
|
|
1004
|
+
/** @internal */
|
|
1005
|
+
resultJson: string;
|
|
1006
|
+
/** @internal */
|
|
1007
|
+
turnRecordId: string;
|
|
1008
|
+
}
|
|
1009
|
+
/** @internal */
|
|
1010
|
+
declare function createMappedLlmRunRepo(db: LeitwerkDb): {
|
|
1011
|
+
/** @internal */
|
|
1012
|
+
create(input: CreateMappedRunInput): MappedRun;
|
|
1013
|
+
/** @internal */
|
|
1014
|
+
getById(id: string): MappedRun | null;
|
|
1015
|
+
/** @internal */
|
|
1016
|
+
getActiveByInstance(instanceId: string): MappedRun | null;
|
|
1017
|
+
/** @internal */
|
|
1018
|
+
listByInstance(instanceId: string): MappedRun[];
|
|
1019
|
+
/** @internal */
|
|
1020
|
+
listItems(runId: string): MappedItem[];
|
|
1021
|
+
/** @internal */
|
|
1022
|
+
listItemsByInstance(instanceId: string): MappedItem[];
|
|
1023
|
+
/** @internal */
|
|
1024
|
+
getItem(runId: string, itemIndex: number): MappedItem | null;
|
|
1025
|
+
/**
|
|
1026
|
+
* Records one item result and advances the run. Fails unless the item is the
|
|
1027
|
+
* run's current pending item, so a replayed outcome cannot complete it twice.
|
|
1028
|
+
* @internal
|
|
1029
|
+
*/
|
|
1030
|
+
completeItem(input: CompleteMappedItemInput): MappedRun;
|
|
1031
|
+
/** @internal */
|
|
1032
|
+
abortActiveByInstance(instanceId: string): number;
|
|
1033
|
+
};
|
|
1034
|
+
|
|
919
1035
|
/** @internal */
|
|
920
1036
|
interface PendingExternalSourceFire {
|
|
921
1037
|
/** @internal */
|
|
@@ -998,6 +1114,8 @@ interface CreateProcessEventInput {
|
|
|
998
1114
|
}
|
|
999
1115
|
/** @internal */
|
|
1000
1116
|
declare function createProcessEventRepo(db: LeitwerkDb): {
|
|
1117
|
+
/** Timeline facts without embedded process state or provider responses. @internal */
|
|
1118
|
+
listUiSnapshotEvents(instanceId: string, turnRecordIds: readonly string[]): ProcessEvent[];
|
|
1001
1119
|
/** @internal */
|
|
1002
1120
|
create(input: CreateProcessEventInput): ProcessEvent;
|
|
1003
1121
|
/** @internal */
|
|
@@ -1180,11 +1298,22 @@ declare function createProcessInstanceRepo(db: LeitwerkDb): {
|
|
|
1180
1298
|
/** @internal */
|
|
1181
1299
|
setGeneratedTitleIfBlank(id: string, title: string): ProcessInstance | null;
|
|
1182
1300
|
/** @public */
|
|
1183
|
-
update(id: string, input: UpdateProcessInstanceInput
|
|
1301
|
+
update(id: string, input: UpdateProcessInstanceInput, options?: {
|
|
1302
|
+
/** Scheduling-only writes retain process activity time; never part of a process patch. @internal */
|
|
1303
|
+
preserveUpdatedAt?: boolean;
|
|
1304
|
+
}): ProcessInstance | null;
|
|
1184
1305
|
/** @internal */
|
|
1185
1306
|
delete(id: string): boolean;
|
|
1186
1307
|
};
|
|
1187
1308
|
|
|
1309
|
+
/** @internal */
|
|
1310
|
+
interface HistoryWindow {
|
|
1311
|
+
/** @internal */
|
|
1312
|
+
since?: string;
|
|
1313
|
+
/** @internal */
|
|
1314
|
+
until?: string;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1188
1317
|
/** @internal */
|
|
1189
1318
|
interface CreateProcessLeafOutcomeSnapshotInput {
|
|
1190
1319
|
/** @internal */
|
|
@@ -1219,7 +1348,7 @@ declare function createProcessLeafOutcomeSnapshotRepo(db: LeitwerkDb): {
|
|
|
1219
1348
|
/** @internal */
|
|
1220
1349
|
create(input: CreateProcessLeafOutcomeSnapshotInput): ProcessLeafOutcomeSnapshot;
|
|
1221
1350
|
/** @internal */
|
|
1222
|
-
listByInstance(instanceId: string): ProcessLeafOutcomeSnapshot[];
|
|
1351
|
+
listByInstance(instanceId: string, window?: HistoryWindow): ProcessLeafOutcomeSnapshot[];
|
|
1223
1352
|
/** @internal */
|
|
1224
1353
|
getByInstanceAndLeafEntryId(instanceId: string, leafEntryId: string): ProcessLeafOutcomeSnapshot | null;
|
|
1225
1354
|
};
|
|
@@ -1254,6 +1383,8 @@ interface UpdateProcessProjectInput {
|
|
|
1254
1383
|
}
|
|
1255
1384
|
/** @public */
|
|
1256
1385
|
declare function createProcessProjectRepo(db: LeitwerkDb): {
|
|
1386
|
+
/** @internal */
|
|
1387
|
+
listAll(): ProcessProject[];
|
|
1257
1388
|
/** @internal */
|
|
1258
1389
|
create(input: CreateProcessProjectInput): ProcessProject;
|
|
1259
1390
|
/** @internal */
|
|
@@ -1750,7 +1881,9 @@ declare function createProcessTurnAnnotationRepo(db: LeitwerkDb): {
|
|
|
1750
1881
|
/** @internal */
|
|
1751
1882
|
findByKey(instanceId: string, annotationKey: string): ProcessTurnAnnotation | null;
|
|
1752
1883
|
/** @internal */
|
|
1753
|
-
listByInstance(instanceId: string): ProcessTurnAnnotation[];
|
|
1884
|
+
listByInstance(instanceId: string, window?: HistoryWindow): ProcessTurnAnnotation[];
|
|
1885
|
+
/** Keep presentation and observation fields without the raw source event. @internal */
|
|
1886
|
+
listForTimeline(instanceId: string, window?: HistoryWindow): ProcessTurnAnnotation[];
|
|
1754
1887
|
/** @internal */
|
|
1755
1888
|
update(id: string, input: UpdateProcessTurnAnnotationInput): ProcessTurnAnnotation | null;
|
|
1756
1889
|
/** @internal */
|
|
@@ -1793,6 +1926,8 @@ interface UpdateProcessTurnRecordInput {
|
|
|
1793
1926
|
/** @internal */
|
|
1794
1927
|
modelSelectionProvenance?: ModelSelectionProvenance | null;
|
|
1795
1928
|
/** @internal */
|
|
1929
|
+
iteration?: MappedTurnItemRef | null;
|
|
1930
|
+
/** @internal */
|
|
1796
1931
|
turnResultMarkdown?: string | null;
|
|
1797
1932
|
/** @internal */
|
|
1798
1933
|
errorSummary?: string | null;
|
|
@@ -1809,6 +1944,10 @@ declare function createProcessTurnRecordRepo(db: LeitwerkDb): {
|
|
|
1809
1944
|
getById(id: string): ProcessTurnRecord | null;
|
|
1810
1945
|
/** @public */
|
|
1811
1946
|
listByInstance(instanceId: string): ProcessTurnRecord[];
|
|
1947
|
+
/** Only absent summaries need repair; don't read every retained turn at startup. @internal */
|
|
1948
|
+
listMissingSummaries(instanceId: string): ProcessTurnRecord[];
|
|
1949
|
+
/** A stable page, even when new turns arrive or timestamps tie. @internal */
|
|
1950
|
+
listPage(instanceId: string, before?: Pick<ProcessTurnRecord, "startedAt" | "id">, limit?: number): ProcessTurnRecord[];
|
|
1812
1951
|
/** @internal */
|
|
1813
1952
|
getLatestSucceededPrimaryByInstance(instanceId: string): ProcessTurnRecord | null;
|
|
1814
1953
|
/** @internal */
|
|
@@ -1926,6 +2065,8 @@ declare function createSessionTransferRepo(db: LeitwerkDb): {
|
|
|
1926
2065
|
|
|
1927
2066
|
/** @internal */
|
|
1928
2067
|
interface ImportedSkill {
|
|
2068
|
+
/** Explicit extension provenance and dependencies. @internal */
|
|
2069
|
+
provenance?: SkillRevisionProvenance;
|
|
1929
2070
|
/** @internal */
|
|
1930
2071
|
skillId: string;
|
|
1931
2072
|
/** @internal */
|
|
@@ -1943,6 +2084,12 @@ interface ImportedRepositorySkill extends ImportedSkill {
|
|
|
1943
2084
|
sourcePath: string;
|
|
1944
2085
|
}
|
|
1945
2086
|
|
|
2087
|
+
/** @internal */
|
|
2088
|
+
interface ImportedExtensionSkill extends ImportedSkill {
|
|
2089
|
+
/** @internal */
|
|
2090
|
+
provenance: SkillRevisionProvenance;
|
|
2091
|
+
}
|
|
2092
|
+
|
|
1946
2093
|
/** @internal */
|
|
1947
2094
|
declare function createSkillRepo(db: LeitwerkDb): {
|
|
1948
2095
|
/** @internal */
|
|
@@ -1951,6 +2098,8 @@ declare function createSkillRepo(db: LeitwerkDb): {
|
|
|
1951
2098
|
resolveActive(ids: readonly string[]): SkillSelection[];
|
|
1952
2099
|
/** @internal */
|
|
1953
2100
|
reconcile(imported: readonly ImportedSkill[]): void;
|
|
2101
|
+
/** Reconcile all loaded extension packs in the caller's startup transaction. @internal */
|
|
2102
|
+
reconcileExtensions(imported: readonly ImportedExtensionSkill[]): void;
|
|
1954
2103
|
/** @internal */
|
|
1955
2104
|
backfillDependencies(): void;
|
|
1956
2105
|
/** @internal */
|
|
@@ -2030,7 +2179,7 @@ declare function createTurnStartRecordRepo(db: LeitwerkDb): {
|
|
|
2030
2179
|
/** @internal */
|
|
2031
2180
|
getById(id: string): TurnStartRecord | null;
|
|
2032
2181
|
/** @internal */
|
|
2033
|
-
listByInstance(instanceId: string): TurnStartRecord[];
|
|
2182
|
+
listByInstance(instanceId: string, window?: HistoryWindow): TurnStartRecord[];
|
|
2034
2183
|
/** @internal */
|
|
2035
2184
|
compareAndSetState(input: {
|
|
2036
2185
|
/** @internal */
|
|
@@ -2095,7 +2244,7 @@ declare function createWorkerLeaseRepo(db: LeitwerkDb): {
|
|
|
2095
2244
|
/** @internal */
|
|
2096
2245
|
getById(id: string): WorkerLease | null;
|
|
2097
2246
|
/** @internal */
|
|
2098
|
-
listByInstance(instanceId: string): WorkerLease[];
|
|
2247
|
+
listByInstance(instanceId: string, window?: HistoryWindow): WorkerLease[];
|
|
2099
2248
|
/** @internal */
|
|
2100
2249
|
listActive(): WorkerLease[];
|
|
2101
2250
|
/** @internal */
|
|
@@ -2110,6 +2259,14 @@ declare function createWorkerLeaseRepo(db: LeitwerkDb): {
|
|
|
2110
2259
|
|
|
2111
2260
|
/** @public */
|
|
2112
2261
|
interface RepositoryBundle {
|
|
2262
|
+
/** @internal */
|
|
2263
|
+
topicWiki: ReturnType<typeof createTopicWikiRepo>;
|
|
2264
|
+
/** @internal */
|
|
2265
|
+
publications: ReturnType<typeof createPublicationRepo>;
|
|
2266
|
+
/** @internal */
|
|
2267
|
+
executionInspections: ReturnType<typeof createExecutionInspectionRepo>;
|
|
2268
|
+
/** @internal */
|
|
2269
|
+
scopedSettings: ReturnType<typeof createScopedSettingsRepo>;
|
|
2113
2270
|
/** @internal */
|
|
2114
2271
|
startupObservations: ReturnType<typeof createStartupObservationRepo>;
|
|
2115
2272
|
/** @internal */
|
|
@@ -2151,6 +2308,8 @@ interface RepositoryBundle {
|
|
|
2151
2308
|
/** @internal */
|
|
2152
2309
|
turnAnnotations: ReturnType<typeof createProcessTurnAnnotationRepo>;
|
|
2153
2310
|
/** @internal */
|
|
2311
|
+
mappedRuns: ReturnType<typeof createMappedLlmRunRepo>;
|
|
2312
|
+
/** @internal */
|
|
2154
2313
|
leases: ReturnType<typeof createWorkerLeaseRepo>;
|
|
2155
2314
|
/** @internal */
|
|
2156
2315
|
providerCredentials: ReturnType<typeof createProviderCredentialRepo>;
|
|
@@ -2272,6 +2431,67 @@ interface ProcessActionRegistry {
|
|
|
2272
2431
|
resolveActionScheduling(processId: string, process: Pick<ProcessInstance, "selectedTurnId" | "paramsJson" | "stateJson">, actionId: string): ResolvedActionScheduling | null;
|
|
2273
2432
|
}
|
|
2274
2433
|
|
|
2434
|
+
/** @internal */
|
|
2435
|
+
type SettingsDraft = Omit<SettingsOverride, "actor" | "createdAt" | "updatedAt">;
|
|
2436
|
+
/** @internal */
|
|
2437
|
+
type SettingsChange = Omit<SettingsWrite, "schemaVersion" | "mode"> & Partial<Pick<SettingsWrite, "mode">>;
|
|
2438
|
+
/** @internal */
|
|
2439
|
+
type SubjectProcess = Pick<ProcessInstance, "id" | "processId" | "metadata">;
|
|
2440
|
+
/** @internal */
|
|
2441
|
+
type Project = Pick<_leitwerk_dev_process_sdk.ProcessLaunchProjectConfig, "key" | "repoLocator" | "metadata">;
|
|
2442
|
+
/** @internal */
|
|
2443
|
+
interface ProcessScopeContext {
|
|
2444
|
+
/** @internal */
|
|
2445
|
+
context: SettingsContext;
|
|
2446
|
+
/** @internal */
|
|
2447
|
+
subjects: Array<{
|
|
2448
|
+
/** @internal */
|
|
2449
|
+
project: Project;
|
|
2450
|
+
/** @internal */
|
|
2451
|
+
subject: SettingsSubject;
|
|
2452
|
+
}>;
|
|
2453
|
+
/** @internal */
|
|
2454
|
+
explanations: string[];
|
|
2455
|
+
}
|
|
2456
|
+
/** @internal */
|
|
2457
|
+
interface ProcessSettingsPreview {
|
|
2458
|
+
/** @internal */
|
|
2459
|
+
turnId: string;
|
|
2460
|
+
/** @internal */
|
|
2461
|
+
settings: ScopedSettingsSnapshot | null;
|
|
2462
|
+
/** @internal */
|
|
2463
|
+
error: string | null;
|
|
2464
|
+
}
|
|
2465
|
+
/** @internal */
|
|
2466
|
+
interface ScopedSettingsService extends ScopedSettingsResolver {
|
|
2467
|
+
/** @internal */
|
|
2468
|
+
capture(process: SubjectProcess, turnId: string, includeModelDefault?: boolean): ScopedSettingsSnapshot | undefined;
|
|
2469
|
+
/** @internal */
|
|
2470
|
+
modelDefault(processId: string, turnId: string, process?: SubjectProcess, plan?: ProcessLaunchPlan): string | null;
|
|
2471
|
+
/** @internal */
|
|
2472
|
+
preview(subjectId: string, draft?: SettingsDraft): Promise<SettingsPreview>;
|
|
2473
|
+
/** @internal */
|
|
2474
|
+
choices(subjectId: string, key: string, search?: string): Promise<SettingFieldView["choices"]>;
|
|
2475
|
+
/** @internal */
|
|
2476
|
+
write(change: SettingsChange): SettingsOverride;
|
|
2477
|
+
/** @internal */
|
|
2478
|
+
listScopes(): SettingsScopesResponse;
|
|
2479
|
+
/** @internal */
|
|
2480
|
+
overview(scopeType: string): Promise<SettingsOverviewResponse>;
|
|
2481
|
+
/** @internal */
|
|
2482
|
+
forProcess(process: SubjectProcess): ProcessScopeContext;
|
|
2483
|
+
/** @internal */
|
|
2484
|
+
forLaunch(plan: ProcessLaunchPlan): ProcessScopeContext;
|
|
2485
|
+
/** @internal */
|
|
2486
|
+
previewProcess(process: SubjectProcess): ProcessSettingsPreview[];
|
|
2487
|
+
/** @internal */
|
|
2488
|
+
definitions(): Array<Pick<SettingFieldView, "key" | "owner" | "schemaVersion" | "scopes" | "merge" | "form">>;
|
|
2489
|
+
/** @internal */
|
|
2490
|
+
refresh(): Promise<SettingsScopesResponse>;
|
|
2491
|
+
/** @internal */
|
|
2492
|
+
previewDraft(change: Omit<SettingsChange, "expectedRevision">): Promise<SettingsPreview>;
|
|
2493
|
+
}
|
|
2494
|
+
|
|
2275
2495
|
/** @internal */
|
|
2276
2496
|
type ProcessModelAvailabilitySnapshot = ModelStatusCacheSnapshot;
|
|
2277
2497
|
/** @internal */
|
|
@@ -2363,6 +2583,8 @@ type ProcessModelPolicyFailure = ProcessModelPolicyFailureBase & ({
|
|
|
2363
2583
|
/** @internal */
|
|
2364
2584
|
readonly source: "configuration" | "selection_provenance";
|
|
2365
2585
|
/** @internal */
|
|
2586
|
+
readonly message?: string;
|
|
2587
|
+
/** @internal */
|
|
2366
2588
|
readonly issues: readonly (PersistedModelConfigurationIssue | PersistedModelSelectionIssue)[];
|
|
2367
2589
|
} | {
|
|
2368
2590
|
/** @internal */
|
|
@@ -2438,6 +2660,8 @@ interface ProjectedLauncherModelPreview {
|
|
|
2438
2660
|
readonly description: string;
|
|
2439
2661
|
/** @internal */
|
|
2440
2662
|
readonly effective: {
|
|
2663
|
+
/** @internal */
|
|
2664
|
+
readonly error?: string;
|
|
2441
2665
|
/** @internal */
|
|
2442
2666
|
readonly source: ProjectedModelResolutionSource;
|
|
2443
2667
|
/** @internal */
|
|
@@ -2487,6 +2711,14 @@ type ProjectedProcessModelConfiguration = {
|
|
|
2487
2711
|
/** @internal */
|
|
2488
2712
|
readonly effectiveConfiguredModelProfileId: string | null;
|
|
2489
2713
|
/** @internal */
|
|
2714
|
+
readonly fixedModelProfileId: string | null;
|
|
2715
|
+
/** @internal */
|
|
2716
|
+
readonly effectiveModelProfileId: string | null;
|
|
2717
|
+
/** @internal */
|
|
2718
|
+
readonly effectiveSource: ProcessSelectedTurnModelSource | "none";
|
|
2719
|
+
/** @internal */
|
|
2720
|
+
readonly effectiveError?: string;
|
|
2721
|
+
/** @internal */
|
|
2490
2722
|
readonly source: "instance" | "process_config" | "default";
|
|
2491
2723
|
}[];
|
|
2492
2724
|
};
|
|
@@ -2579,6 +2811,8 @@ type ProcessModelPolicyProjectionSubject = {
|
|
|
2579
2811
|
/** @internal */
|
|
2580
2812
|
readonly kind: "launcher_preview";
|
|
2581
2813
|
/** @internal */
|
|
2814
|
+
readonly plan?: ProcessLaunchPlan;
|
|
2815
|
+
/** @internal */
|
|
2582
2816
|
readonly processId: string;
|
|
2583
2817
|
/** @internal */
|
|
2584
2818
|
readonly modelConfig: LaunchModelConfigInput;
|
|
@@ -2778,6 +3012,8 @@ interface IpcHandlerDeps extends Pick<RepositoryBundle, "processes" | "projects"
|
|
|
2778
3012
|
/** @internal */
|
|
2779
3013
|
startupObservations?: RepositoryBundle["startupObservations"];
|
|
2780
3014
|
/** @internal */
|
|
3015
|
+
executionInspections?: RepositoryBundle["executionInspections"];
|
|
3016
|
+
/** @internal */
|
|
2781
3017
|
getLaunchCoordinator?: () => LaunchCoordinator | undefined;
|
|
2782
3018
|
/** @internal */
|
|
2783
3019
|
processQuestions?: ProcessQuestionService;
|
|
@@ -3168,29 +3404,35 @@ type FutureExecutionTransitionPlan = {
|
|
|
3168
3404
|
/** @internal */
|
|
3169
3405
|
type DurableBroadcast = DurableWsFrameInput;
|
|
3170
3406
|
/** @internal */
|
|
3171
|
-
type
|
|
3407
|
+
type CreateWrite<T> = {
|
|
3172
3408
|
/** @internal */
|
|
3173
3409
|
kind: "create";
|
|
3174
3410
|
/** @internal */
|
|
3175
|
-
input:
|
|
3176
|
-
}
|
|
3411
|
+
input: T;
|
|
3412
|
+
};
|
|
3413
|
+
/** @internal */
|
|
3414
|
+
type UpdateWrite<T> = {
|
|
3177
3415
|
/** @internal */
|
|
3178
3416
|
kind: "update";
|
|
3179
3417
|
/** @internal */
|
|
3180
3418
|
id: string;
|
|
3181
3419
|
/** @internal */
|
|
3182
|
-
input:
|
|
3420
|
+
input: T;
|
|
3183
3421
|
};
|
|
3184
3422
|
/** @internal */
|
|
3185
|
-
type
|
|
3423
|
+
type DeleteWrite = {
|
|
3186
3424
|
/** @internal */
|
|
3187
|
-
kind: "
|
|
3425
|
+
kind: "delete";
|
|
3188
3426
|
/** @internal */
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3427
|
+
id: string;
|
|
3428
|
+
};
|
|
3429
|
+
/** @internal */
|
|
3430
|
+
type TurnRecordWrite = CreateWrite<CreateProcessTurnRecordInput> | UpdateWrite<UpdateProcessTurnRecordInput>;
|
|
3431
|
+
/** @internal */
|
|
3432
|
+
type TurnStartWrite = CreateWrite<Omit<TurnStartRecord, "id" | "createdAt" | "updatedAt"> & {
|
|
3433
|
+
/** @internal */
|
|
3434
|
+
id?: string;
|
|
3435
|
+
}> | {
|
|
3194
3436
|
/** @internal */
|
|
3195
3437
|
kind: "cas_state";
|
|
3196
3438
|
/** @internal */
|
|
@@ -3201,31 +3443,19 @@ type TurnStartWrite = {
|
|
|
3201
3443
|
state: TurnStartRecord["state"];
|
|
3202
3444
|
};
|
|
3203
3445
|
/** @internal */
|
|
3204
|
-
type TurnAnnotationWrite =
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
/** @internal */
|
|
3208
|
-
input: CreateProcessTurnAnnotationInput;
|
|
3209
|
-
} | {
|
|
3210
|
-
/** @internal */
|
|
3211
|
-
kind: "update";
|
|
3446
|
+
type TurnAnnotationWrite = CreateWrite<CreateProcessTurnAnnotationInput> | UpdateWrite<UpdateProcessTurnAnnotationInput> | DeleteWrite;
|
|
3447
|
+
/** Mapped-run writes, committed in order before turn starts. @internal */
|
|
3448
|
+
type MappedRunWrite = CreateWrite<CreateMappedRunInput> | {
|
|
3212
3449
|
/** @internal */
|
|
3213
|
-
|
|
3450
|
+
kind: "complete_item";
|
|
3214
3451
|
/** @internal */
|
|
3215
|
-
input:
|
|
3452
|
+
input: CompleteMappedItemInput;
|
|
3216
3453
|
} | {
|
|
3217
3454
|
/** @internal */
|
|
3218
|
-
kind: "
|
|
3219
|
-
/** @internal */
|
|
3220
|
-
id: string;
|
|
3455
|
+
kind: "abort_active";
|
|
3221
3456
|
};
|
|
3222
3457
|
/** @internal */
|
|
3223
|
-
type LeafOutcomeSnapshotWrite =
|
|
3224
|
-
/** @internal */
|
|
3225
|
-
kind: "create";
|
|
3226
|
-
/** @internal */
|
|
3227
|
-
input: CreateProcessLeafOutcomeSnapshotInput;
|
|
3228
|
-
};
|
|
3458
|
+
type LeafOutcomeSnapshotWrite = CreateWrite<CreateProcessLeafOutcomeSnapshotInput>;
|
|
3229
3459
|
/** @internal */
|
|
3230
3460
|
type WorkerIntent = {
|
|
3231
3461
|
/** @internal */
|
|
@@ -3248,24 +3478,7 @@ type WorkerIntent = {
|
|
|
3248
3478
|
reason: string;
|
|
3249
3479
|
};
|
|
3250
3480
|
/** @internal */
|
|
3251
|
-
type PendingExternalSourceFireWrite =
|
|
3252
|
-
/** @internal */
|
|
3253
|
-
kind: "create";
|
|
3254
|
-
/** @internal */
|
|
3255
|
-
input: CreatePendingExternalSourceFireInput;
|
|
3256
|
-
} | {
|
|
3257
|
-
/** @internal */
|
|
3258
|
-
kind: "update";
|
|
3259
|
-
/** @internal */
|
|
3260
|
-
id: string;
|
|
3261
|
-
/** @internal */
|
|
3262
|
-
input: UpdatePendingExternalSourceFireInput;
|
|
3263
|
-
} | {
|
|
3264
|
-
/** @internal */
|
|
3265
|
-
kind: "delete";
|
|
3266
|
-
/** @internal */
|
|
3267
|
-
id: string;
|
|
3268
|
-
};
|
|
3481
|
+
type PendingExternalSourceFireWrite = CreateWrite<CreatePendingExternalSourceFireInput> | UpdateWrite<UpdatePendingExternalSourceFireInput> | DeleteWrite;
|
|
3269
3482
|
/** @internal */
|
|
3270
3483
|
interface DecisionMetadata {
|
|
3271
3484
|
/** @internal */
|
|
@@ -3275,6 +3488,10 @@ interface DecisionMetadata {
|
|
|
3275
3488
|
}
|
|
3276
3489
|
/** @internal */
|
|
3277
3490
|
interface Writes {
|
|
3491
|
+
/** Internal scheduling writes do not count as process activity. @internal */
|
|
3492
|
+
preserveUpdatedAt?: boolean;
|
|
3493
|
+
/** A fenced, successful server-side wait check. Never supplied by extensions. @internal */
|
|
3494
|
+
waitForAdmission?: string;
|
|
3278
3495
|
/** @internal */
|
|
3279
3496
|
processPatch: UpdateProcessInstanceInput;
|
|
3280
3497
|
/** @internal */
|
|
@@ -3286,11 +3503,15 @@ interface Writes {
|
|
|
3286
3503
|
/** @internal */
|
|
3287
3504
|
input: UpdateProcessProjectInput;
|
|
3288
3505
|
};
|
|
3506
|
+
/** Initial bindings, committed before the first worker start. @internal */
|
|
3507
|
+
initialProjects?: CreateProcessProjectInput[];
|
|
3289
3508
|
/** @internal */
|
|
3290
3509
|
turnRecordWrites: TurnRecordWrite[];
|
|
3291
3510
|
/** @internal */
|
|
3292
3511
|
turnStartWrites: TurnStartWrite[];
|
|
3293
3512
|
/** @internal */
|
|
3513
|
+
mappedRunWrites: MappedRunWrite[];
|
|
3514
|
+
/** @internal */
|
|
3294
3515
|
turnAnnotationWrites: TurnAnnotationWrite[];
|
|
3295
3516
|
/** @internal */
|
|
3296
3517
|
leafOutcomeSnapshotWrites: LeafOutcomeSnapshotWrite[];
|
|
@@ -3323,6 +3544,8 @@ interface RecordCommit {
|
|
|
3323
3544
|
/** @internal */
|
|
3324
3545
|
committedProject: ProcessProject | null;
|
|
3325
3546
|
/** @internal */
|
|
3547
|
+
initialProjects?: ProcessProject[];
|
|
3548
|
+
/** @internal */
|
|
3326
3549
|
committedTurnRecords: ProcessTurnRecord[];
|
|
3327
3550
|
/** @internal */
|
|
3328
3551
|
committedLeafOutcomeSnapshots: ProcessLeafOutcomeSnapshot[];
|
|
@@ -3420,7 +3643,7 @@ interface OperationSpec<TKind extends string, TInput extends OperationInputBase,
|
|
|
3420
3643
|
*/
|
|
3421
3644
|
/** @internal */
|
|
3422
3645
|
decide: DecideFunction<TInput, TData>;
|
|
3423
|
-
/** Runs after
|
|
3646
|
+
/** Runs after durable recording and lock release, even if reaction derivation fails. @internal */
|
|
3424
3647
|
afterRecord?: AfterRecordFunction<TInput, TData>;
|
|
3425
3648
|
/** @internal */
|
|
3426
3649
|
messages?: OperationMessages | MessageResolver<TInput>;
|
|
@@ -3448,6 +3671,8 @@ interface ProcessEngineLogger {
|
|
|
3448
3671
|
}
|
|
3449
3672
|
/** @internal */
|
|
3450
3673
|
interface ProcessEngineDeps extends Pick<RepositoryBundle, "processes" | "events" | "futureExecutions" | "inputs" | "projects" | "pendingExternalSourceFires" | "leafOutcomeSnapshots" | "questionRequests" | "turnRecords" | "turnStarts" | "leases" | "turnAnnotations" | "transaction"> {
|
|
3674
|
+
/** Required for processes that declare mapped LLM turns. @internal */
|
|
3675
|
+
mappedRuns?: RepositoryBundle["mappedRuns"];
|
|
3451
3676
|
/** @internal */
|
|
3452
3677
|
processOperations: ProcessOperationCoordinator;
|
|
3453
3678
|
/** @internal */
|
|
@@ -3551,6 +3776,8 @@ type EngineResult<T = undefined> = EngineSuccess<T> | EngineFailure<T>;
|
|
|
3551
3776
|
type ActionExecutionResult = ActionExecutionResultLike;
|
|
3552
3777
|
/** @internal */
|
|
3553
3778
|
interface ProcessEngine {
|
|
3779
|
+
/** @internal */
|
|
3780
|
+
applyProcessObservation(instanceId: string, input: ProcessObservationUpdate): Promise<EngineResult<void>>;
|
|
3554
3781
|
/** @internal */
|
|
3555
3782
|
getDeferredProcessActivationSnapshots(query: DeferredProcessActivationSnapshotQuery): DeferredProcessActivationSnapshotResult;
|
|
3556
3783
|
/** @internal */
|
|
@@ -3569,6 +3796,8 @@ interface ProcessEngine {
|
|
|
3569
3796
|
startProcess(instanceId: string, startTurnId: TurnId, opts?: {
|
|
3570
3797
|
/** @internal */
|
|
3571
3798
|
actor?: Actor;
|
|
3799
|
+
/** @internal */
|
|
3800
|
+
restart?: WaitingProcessRestart;
|
|
3572
3801
|
}): Promise<EngineResult<void>>;
|
|
3573
3802
|
/** @internal */
|
|
3574
3803
|
abortProcess(instanceId: string, opts?: {
|
|
@@ -3639,6 +3868,9 @@ interface ProcessEngine {
|
|
|
3639
3868
|
proposedTurnRecordId: string;
|
|
3640
3869
|
/** @internal */
|
|
3641
3870
|
workerLeaseId: string;
|
|
3871
|
+
}, options?: {
|
|
3872
|
+
/** Runs after durable acceptance and lock release, before reactions. @internal */
|
|
3873
|
+
onRecorded?: (turnRecordId: string) => void;
|
|
3642
3874
|
}): Promise<EngineResult<{
|
|
3643
3875
|
/** @internal */
|
|
3644
3876
|
turnRecordId: string;
|
|
@@ -3837,6 +4069,9 @@ interface LauncherRecentValuesService {
|
|
|
3837
4069
|
record(launcherId: string, launcherInput: Record<string, unknown>): void;
|
|
3838
4070
|
}
|
|
3839
4071
|
|
|
4072
|
+
/** Server-owned defaults, resolved only when selecting skills for a new launch. @internal */
|
|
4073
|
+
type LaunchSkillDefaults = Pick<LeitwerkConfig, "default_skills" | "process_configs">;
|
|
4074
|
+
|
|
3840
4075
|
/** @internal */
|
|
3841
4076
|
type ProcessLaunchRelationInput = Omit<ProcessRelation, "kind" | "childInstanceId" | "createdAt">;
|
|
3842
4077
|
|
|
@@ -3928,28 +4163,9 @@ type LaunchMutationOutcome = {
|
|
|
3928
4163
|
interface NormalizedScheduledLaunchInput extends ParsedLauncherRequestBody {
|
|
3929
4164
|
}
|
|
3930
4165
|
/** @internal */
|
|
3931
|
-
type ValidatedLaunchSchedule = {
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
/** @internal */
|
|
3935
|
-
nextRunAt: null;
|
|
3936
|
-
/** @internal */
|
|
3937
|
-
cronExpression: null;
|
|
3938
|
-
} | {
|
|
3939
|
-
/** @internal */
|
|
3940
|
-
mode: "once";
|
|
3941
|
-
/** @internal */
|
|
3942
|
-
nextRunAt: string;
|
|
3943
|
-
/** @internal */
|
|
3944
|
-
cronExpression: null;
|
|
3945
|
-
} | {
|
|
3946
|
-
/** @internal */
|
|
3947
|
-
mode: "cron";
|
|
3948
|
-
/** @internal */
|
|
3949
|
-
nextRunAt: string;
|
|
3950
|
-
/** @internal */
|
|
3951
|
-
cronExpression: string;
|
|
3952
|
-
};
|
|
4166
|
+
type ValidatedLaunchSchedule = Extract<ReturnType<typeof validateScheduleRequestInput>, {
|
|
4167
|
+
ok: true;
|
|
4168
|
+
}>["value"];
|
|
3953
4169
|
/** @internal */
|
|
3954
4170
|
interface PreparedLaunch {
|
|
3955
4171
|
/** @internal */
|
|
@@ -3986,6 +4202,8 @@ type PreparedLaunchResult = {
|
|
|
3986
4202
|
|
|
3987
4203
|
/** @internal */
|
|
3988
4204
|
interface FutureExecutionExecutorDeps extends Pick<RepositoryBundle, "futureExecutions" | "processes" | "projects" | "processRelations" | "processSkills" | "skills" | "handoffDedupKeys" | "transaction"> {
|
|
4205
|
+
/** @internal */
|
|
4206
|
+
skillDefaults?: LaunchSkillDefaults;
|
|
3989
4207
|
/** @internal */
|
|
3990
4208
|
turnRecords?: RepositoryBundle["turnRecords"];
|
|
3991
4209
|
/** @internal */
|
|
@@ -4056,33 +4274,6 @@ interface FutureExecutionLifecycleOptions {
|
|
|
4056
4274
|
now?: () => Date;
|
|
4057
4275
|
}
|
|
4058
4276
|
/** @internal */
|
|
4059
|
-
type LifecycleFailure = {
|
|
4060
|
-
/** @internal */
|
|
4061
|
-
kind: "invalid";
|
|
4062
|
-
/** @internal */
|
|
4063
|
-
issues: readonly FutureExecutionIssue[];
|
|
4064
|
-
} | {
|
|
4065
|
-
/** @internal */
|
|
4066
|
-
kind: "not_found";
|
|
4067
|
-
/** @internal */
|
|
4068
|
-
target: "future_execution" | "launch" | "action" | "process";
|
|
4069
|
-
} | {
|
|
4070
|
-
/** @internal */
|
|
4071
|
-
kind: "conflict";
|
|
4072
|
-
/** @internal */
|
|
4073
|
-
issue: FutureExecutionIssue;
|
|
4074
|
-
} | {
|
|
4075
|
-
/** @internal */
|
|
4076
|
-
kind: "unavailable";
|
|
4077
|
-
/** @internal */
|
|
4078
|
-
reason: string;
|
|
4079
|
-
} | {
|
|
4080
|
-
/** @internal */
|
|
4081
|
-
kind: "failed";
|
|
4082
|
-
/** @internal */
|
|
4083
|
-
issue: FutureExecutionIssue;
|
|
4084
|
-
};
|
|
4085
|
-
/** @internal */
|
|
4086
4277
|
type ActionMutationOutcome = {
|
|
4087
4278
|
/** @internal */
|
|
4088
4279
|
kind: "scheduled";
|
|
@@ -4121,7 +4312,7 @@ type ActionMutationOutcome = {
|
|
|
4121
4312
|
error: string;
|
|
4122
4313
|
/** @internal */
|
|
4123
4314
|
code: string;
|
|
4124
|
-
} |
|
|
4315
|
+
} | LaunchFailure;
|
|
4125
4316
|
/** @internal */
|
|
4126
4317
|
type CancelFutureExecutionOutcome = {
|
|
4127
4318
|
/** @internal */
|
|
@@ -4170,6 +4361,8 @@ declare function createFutureExecutionLifecycle(deps: FutureExecutionLifecycleDe
|
|
|
4170
4361
|
prepareLaunch: (launcherId: string, request: NormalizedScheduledLaunchInput, opts?: {
|
|
4171
4362
|
/** @internal */
|
|
4172
4363
|
resolvedLauncher?: _leitwerk_dev_process_sdk.ResolvedProcessLauncher;
|
|
4364
|
+
/** @internal */
|
|
4365
|
+
futureExecutionId?: string;
|
|
4173
4366
|
}) => Promise<PreparedLaunchResult>;
|
|
4174
4367
|
/** @internal */
|
|
4175
4368
|
commitPreparedLaunch: (prepared: PreparedLaunch, opts?: {
|
|
@@ -4668,6 +4861,8 @@ declare function createToolApprovalGate(input: {
|
|
|
4668
4861
|
repos: ToolApprovalRepos;
|
|
4669
4862
|
/** @internal */
|
|
4670
4863
|
processOperations: ProcessOperationCoordinator;
|
|
4864
|
+
/** @internal */
|
|
4865
|
+
broadcaster: Pick<Broadcaster, "sendDurable">;
|
|
4671
4866
|
}): {
|
|
4672
4867
|
/** @internal */
|
|
4673
4868
|
reconcile: (instanceId: string) => void;
|
|
@@ -4696,22 +4891,39 @@ declare function createToolApprovalGate(input: {
|
|
|
4696
4891
|
/** @internal */
|
|
4697
4892
|
type ToolApprovalGate = ReturnType<typeof createToolApprovalGate>;
|
|
4698
4893
|
|
|
4894
|
+
/** @internal */
|
|
4699
4895
|
interface TokenAuditContext {
|
|
4896
|
+
/** @internal */
|
|
4700
4897
|
operation: string;
|
|
4898
|
+
/** @internal */
|
|
4701
4899
|
tokenId?: string;
|
|
4900
|
+
/** @internal */
|
|
4702
4901
|
actor?: Actor;
|
|
4902
|
+
/** @internal */
|
|
4703
4903
|
ownerKind?: "user" | "anonymous";
|
|
4904
|
+
/** @internal */
|
|
4704
4905
|
count?: number;
|
|
4705
4906
|
}
|
|
4706
4907
|
declare module "fastify" {
|
|
4908
|
+
/** @internal */
|
|
4707
4909
|
interface FastifyRequest {
|
|
4910
|
+
/** @internal */
|
|
4708
4911
|
actor?: Actor;
|
|
4912
|
+
/** @internal */
|
|
4709
4913
|
tokenAudit?: TokenAuditContext;
|
|
4710
4914
|
}
|
|
4711
4915
|
}
|
|
4712
4916
|
|
|
4713
4917
|
/** @public */
|
|
4714
|
-
interface RouteDeps extends Pick<RepositoryBundle, "processes" | "launchRuns" | "projects" | "inputs" | "events" | "turnSummaries" | "futureExecutions" | "skills" | "processSkills" | "handoffDedupKeys" | "leafOutcomeSnapshots" | "questionRequests" | "processRelations" | "toolApprovalRequests" | "turnRecords" | "turnStarts" | "turnAnnotations" | "leases" | "externalWrites" | "transaction"> {
|
|
4918
|
+
interface RouteDeps extends Pick<RepositoryBundle, "processes" | "launchRuns" | "projects" | "inputs" | "events" | "turnSummaries" | "executionInspections" | "futureExecutions" | "skills" | "processSkills" | "handoffDedupKeys" | "leafOutcomeSnapshots" | "questionRequests" | "processRelations" | "toolApprovalRequests" | "turnRecords" | "turnStarts" | "turnAnnotations" | "leases" | "externalWrites" | "transaction"> {
|
|
4919
|
+
/** @internal */
|
|
4920
|
+
scopedSettingsService?: ScopedSettingsService;
|
|
4921
|
+
/** @internal */
|
|
4922
|
+
topicWiki?: RepositoryBundle["topicWiki"];
|
|
4923
|
+
/** @internal */
|
|
4924
|
+
onSettingsChanged?: () => Promise<void>;
|
|
4925
|
+
/** @internal */
|
|
4926
|
+
mappedRuns?: RepositoryBundle["mappedRuns"];
|
|
4715
4927
|
/** @internal */
|
|
4716
4928
|
startupObservations?: RepositoryBundle["startupObservations"];
|
|
4717
4929
|
/** @public */
|
|
@@ -4774,6 +4986,15 @@ interface RouteDeps extends Pick<RepositoryBundle, "processes" | "launchRuns" |
|
|
|
4774
4986
|
|
|
4775
4987
|
/** @public */
|
|
4776
4988
|
interface AppOptions {
|
|
4989
|
+
/** Clock and cadence seam for readiness integration tests. @internal */
|
|
4990
|
+
turnWait?: {
|
|
4991
|
+
/** @internal */
|
|
4992
|
+
now?: () => number;
|
|
4993
|
+
/** @internal */
|
|
4994
|
+
pollIntervalMs?: number;
|
|
4995
|
+
/** @internal */
|
|
4996
|
+
timeoutMs?: number;
|
|
4997
|
+
};
|
|
4777
4998
|
/** @public */
|
|
4778
4999
|
config?: LeitwerkConfig;
|
|
4779
5000
|
/** @internal */
|