@leitwerk-dev/server 0.2.0 → 0.2.1
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-7PKX73TU.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-XTXH6623.js → chunk-CNITOV76.js} +1359 -991
- package/dist/chunk-CNITOV76.js.map +1 -0
- package/dist/{chunk-AGC2ND53.js → chunk-ZSKM25SD.js} +588 -667
- package/dist/chunk-ZSKM25SD.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 +17 -0
- package/dist/test-helpers/accepted-turn-start.d.ts.map +1 -1
- 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 +4 -7
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +2 -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 +28 -2
- 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 +4 -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-7PKX73TU.js.map} +0 -0
|
@@ -27,65 +27,134 @@ import type { FutureExecutionTransitionPlan } from "../../future-execution/trans
|
|
|
27
27
|
import type { QueuedProcessInput } from "../../process-input-dispatch.js";
|
|
28
28
|
import type { DeferredProcessExtensionEvent } from "./deferred-extension-events.js";
|
|
29
29
|
|
|
30
|
+
/** @internal */
|
|
30
31
|
export type DurableBroadcast = DurableWsFrameInput;
|
|
31
32
|
|
|
33
|
+
/** @internal */
|
|
32
34
|
export type TurnRecordWrite =
|
|
33
35
|
| {
|
|
36
|
+
/** @internal */
|
|
34
37
|
kind: "create";
|
|
38
|
+
/** @internal */
|
|
35
39
|
input: CreateProcessTurnRecordInput;
|
|
36
40
|
}
|
|
37
41
|
| {
|
|
42
|
+
/** @internal */
|
|
38
43
|
kind: "update";
|
|
44
|
+
/** @internal */
|
|
39
45
|
id: string;
|
|
46
|
+
/** @internal */
|
|
40
47
|
input: UpdateProcessTurnRecordInput;
|
|
41
48
|
};
|
|
42
49
|
|
|
50
|
+
/** @internal */
|
|
43
51
|
export type TurnStartWrite =
|
|
44
52
|
| {
|
|
53
|
+
/** @internal */
|
|
45
54
|
kind: "create";
|
|
46
|
-
|
|
55
|
+
/** @internal */
|
|
56
|
+
input: Omit<TurnStartRecord, "id" | "createdAt" | "updatedAt"> & {
|
|
57
|
+
/** @internal */
|
|
58
|
+
id?: string;
|
|
59
|
+
};
|
|
47
60
|
}
|
|
48
61
|
| {
|
|
62
|
+
/** @internal */
|
|
49
63
|
kind: "cas_state";
|
|
64
|
+
/** @internal */
|
|
50
65
|
id: string;
|
|
66
|
+
/** @internal */
|
|
51
67
|
expectedKind: TurnStartRecord["state"]["kind"];
|
|
68
|
+
/** @internal */
|
|
52
69
|
state: TurnStartRecord["state"];
|
|
53
70
|
};
|
|
54
71
|
|
|
72
|
+
/** @internal */
|
|
55
73
|
export type TurnAnnotationWrite =
|
|
56
74
|
| {
|
|
75
|
+
/** @internal */
|
|
57
76
|
kind: "create";
|
|
77
|
+
/** @internal */
|
|
58
78
|
input: CreateProcessTurnAnnotationInput;
|
|
59
79
|
}
|
|
60
80
|
| {
|
|
81
|
+
/** @internal */
|
|
61
82
|
kind: "update";
|
|
83
|
+
/** @internal */
|
|
62
84
|
id: string;
|
|
85
|
+
/** @internal */
|
|
63
86
|
input: UpdateProcessTurnAnnotationInput;
|
|
64
87
|
}
|
|
65
88
|
| {
|
|
89
|
+
/** @internal */
|
|
66
90
|
kind: "delete";
|
|
91
|
+
/** @internal */
|
|
67
92
|
id: string;
|
|
68
93
|
};
|
|
69
94
|
|
|
95
|
+
/** @internal */
|
|
70
96
|
export type LeafOutcomeSnapshotWrite = {
|
|
97
|
+
/** @internal */
|
|
71
98
|
kind: "create";
|
|
99
|
+
/** @internal */
|
|
72
100
|
input: CreateProcessLeafOutcomeSnapshotInput;
|
|
73
101
|
};
|
|
74
102
|
|
|
103
|
+
/** @internal */
|
|
75
104
|
export type WorkerIntent =
|
|
76
|
-
| {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| {
|
|
105
|
+
| {
|
|
106
|
+
/** @internal */
|
|
107
|
+
kind: "reconcile";
|
|
108
|
+
}
|
|
109
|
+
| {
|
|
110
|
+
/** @internal */
|
|
111
|
+
kind: "restart_worker";
|
|
112
|
+
}
|
|
113
|
+
| {
|
|
114
|
+
/** @internal */
|
|
115
|
+
kind: "start_if_needed";
|
|
116
|
+
}
|
|
117
|
+
| {
|
|
118
|
+
/** @internal */
|
|
119
|
+
kind: "abort_turn";
|
|
120
|
+
/** @internal */
|
|
121
|
+
reason: string;
|
|
122
|
+
}
|
|
123
|
+
| {
|
|
124
|
+
/** @internal */
|
|
125
|
+
kind: "stop_with_reason";
|
|
126
|
+
/** @internal */
|
|
127
|
+
reason: string;
|
|
128
|
+
};
|
|
81
129
|
|
|
130
|
+
/** @internal */
|
|
82
131
|
export type PendingExternalSourceFireWrite =
|
|
83
|
-
| {
|
|
84
|
-
|
|
85
|
-
|
|
132
|
+
| {
|
|
133
|
+
/** @internal */
|
|
134
|
+
kind: "create";
|
|
135
|
+
/** @internal */
|
|
136
|
+
input: CreatePendingExternalSourceFireInput;
|
|
137
|
+
}
|
|
138
|
+
| {
|
|
139
|
+
/** @internal */
|
|
140
|
+
kind: "update";
|
|
141
|
+
/** @internal */
|
|
142
|
+
id: string;
|
|
143
|
+
/** @internal */
|
|
144
|
+
input: UpdatePendingExternalSourceFireInput;
|
|
145
|
+
}
|
|
146
|
+
| {
|
|
147
|
+
/** @internal */
|
|
148
|
+
kind: "delete";
|
|
149
|
+
/** @internal */
|
|
150
|
+
id: string;
|
|
151
|
+
};
|
|
86
152
|
|
|
153
|
+
/** @internal */
|
|
87
154
|
export interface DecisionMetadata {
|
|
155
|
+
/** @internal */
|
|
88
156
|
nextTurnModelProfileId?: string | null;
|
|
157
|
+
/** @internal */
|
|
89
158
|
providerOptions?: Readonly<Record<string, string>>;
|
|
90
159
|
}
|
|
91
160
|
|
|
@@ -100,29 +169,54 @@ const METADATA_KEY_GROUPS = {
|
|
|
100
169
|
],
|
|
101
170
|
} as const;
|
|
102
171
|
|
|
172
|
+
/** @internal */
|
|
103
173
|
export interface Writes {
|
|
174
|
+
/** @internal */
|
|
104
175
|
processPatch: UpdateProcessInstanceInput;
|
|
176
|
+
/** @internal */
|
|
105
177
|
changedFields: string[];
|
|
106
|
-
|
|
178
|
+
/** @internal */
|
|
179
|
+
projectWrite?: {
|
|
180
|
+
/** @internal */
|
|
181
|
+
id: string;
|
|
182
|
+
/** @internal */
|
|
183
|
+
input: UpdateProcessProjectInput;
|
|
184
|
+
};
|
|
185
|
+
/** @internal */
|
|
107
186
|
turnRecordWrites: TurnRecordWrite[];
|
|
187
|
+
/** @internal */
|
|
108
188
|
turnStartWrites: TurnStartWrite[];
|
|
189
|
+
/** @internal */
|
|
109
190
|
turnAnnotationWrites: TurnAnnotationWrite[];
|
|
191
|
+
/** @internal */
|
|
110
192
|
leafOutcomeSnapshotWrites: LeafOutcomeSnapshotWrite[];
|
|
193
|
+
/** @internal */
|
|
111
194
|
events: CreateProcessEventInput[];
|
|
195
|
+
/** @internal */
|
|
112
196
|
broadcasts: DurableBroadcast[];
|
|
197
|
+
/** @internal */
|
|
113
198
|
queuedInputs: QueuedProcessInput[];
|
|
199
|
+
/** @internal */
|
|
114
200
|
extensionEvents: DeferredProcessExtensionEvent[];
|
|
201
|
+
/** @internal */
|
|
115
202
|
futureExecutionPlans: FutureExecutionTransitionPlan[];
|
|
203
|
+
/** @internal */
|
|
116
204
|
pendingExternalSourceFireWrites: PendingExternalSourceFireWrite[];
|
|
205
|
+
/** @internal */
|
|
117
206
|
workerIntent?: WorkerIntent;
|
|
118
207
|
}
|
|
119
208
|
|
|
209
|
+
/** @internal */
|
|
120
210
|
export interface WriteBuildFailure {
|
|
211
|
+
/** @internal */
|
|
121
212
|
ok: false;
|
|
213
|
+
/** @internal */
|
|
122
214
|
code: string;
|
|
215
|
+
/** @internal */
|
|
123
216
|
message: string;
|
|
124
217
|
}
|
|
125
218
|
|
|
219
|
+
/** @internal */
|
|
126
220
|
export type WriteBuildResult = Writes | WriteBuildFailure;
|
|
127
221
|
|
|
128
222
|
export function createWrites(init: Partial<Writes> = {}): Writes {
|
package/src/process-graph.ts
CHANGED
|
@@ -6,16 +6,13 @@ import {
|
|
|
6
6
|
} from "@leitwerk-dev/process-sdk";
|
|
7
7
|
|
|
8
8
|
export {
|
|
9
|
-
getAllProcessGraphs,
|
|
10
9
|
getProcessGraph,
|
|
11
10
|
getProcessTurnGraph,
|
|
12
|
-
getReachableTurnIdsForProcessGraph,
|
|
13
11
|
getTurnTransitionsForProcessGraph,
|
|
14
12
|
hasProcessGraph,
|
|
15
13
|
isTurnAvailableForProcessGraph,
|
|
16
14
|
listLlmTurnIdsForProcessGraph,
|
|
17
15
|
type ProcessGraphRegistry,
|
|
18
|
-
type ProcessGraphTurnView,
|
|
19
16
|
type ProcessGraphView,
|
|
20
17
|
serializeProcessGraph,
|
|
21
18
|
toProcessGraphView,
|
|
@@ -7,6 +7,7 @@ import type { QueuedProcessInputLike } from "@leitwerk-dev/process-sdk";
|
|
|
7
7
|
import type { InputDelivery } from "@leitwerk-dev/worker-protocol";
|
|
8
8
|
import type { RepositoryBundle } from "./db/repositories.js";
|
|
9
9
|
import type { WorkerSupervisor } from "./supervisor/worker-supervisor.js";
|
|
10
|
+
/** @internal */
|
|
10
11
|
export interface QueuedProcessInput extends QueuedProcessInputLike {}
|
|
11
12
|
|
|
12
13
|
export interface ProcessInputDispatchDeps {
|
|
@@ -10,11 +10,16 @@ import type {
|
|
|
10
10
|
import type { LaunchPlanPreparationResultLike, ProcessLaunchPlan } from "@leitwerk-dev/process-sdk";
|
|
11
11
|
import type { ModelStatusCacheSnapshot } from "../model-providers/model-status-cache.js";
|
|
12
12
|
|
|
13
|
+
/** @internal */
|
|
13
14
|
export type ProcessModelAvailabilitySnapshot = ModelStatusCacheSnapshot;
|
|
14
15
|
|
|
16
|
+
/** @internal */
|
|
15
17
|
export type PersistedModelConfigurationIssue = {
|
|
18
|
+
/** @internal */
|
|
16
19
|
readonly code: "invalid_turn_configs_json";
|
|
20
|
+
/** @internal */
|
|
17
21
|
readonly reason: "invalid_json" | "not_object" | "turn_config_not_object";
|
|
22
|
+
/** @internal */
|
|
18
23
|
readonly turnId?: string;
|
|
19
24
|
};
|
|
20
25
|
|
|
@@ -33,34 +38,61 @@ export interface InvalidModelConfiguration {
|
|
|
33
38
|
|
|
34
39
|
export type ModelConfiguration = ValidModelConfiguration | InvalidModelConfiguration;
|
|
35
40
|
|
|
41
|
+
/** @internal */
|
|
36
42
|
export type PersistedModelRelationalIssue =
|
|
37
|
-
| { readonly code: "model_config_requires_llm_turn"; readonly turnId: string }
|
|
38
43
|
| {
|
|
44
|
+
/** @internal */
|
|
45
|
+
readonly code: "model_config_requires_llm_turn";
|
|
46
|
+
/** @internal */
|
|
47
|
+
readonly turnId: string;
|
|
48
|
+
}
|
|
49
|
+
| {
|
|
50
|
+
/** @internal */
|
|
39
51
|
readonly code: "selected_model_requires_selected_turn";
|
|
52
|
+
/** @internal */
|
|
40
53
|
readonly modelProfileId: string;
|
|
41
54
|
}
|
|
42
55
|
| {
|
|
56
|
+
/** @internal */
|
|
43
57
|
readonly code: "selected_model_requires_llm_turn";
|
|
58
|
+
/** @internal */
|
|
44
59
|
readonly turnId: string;
|
|
60
|
+
/** @internal */
|
|
45
61
|
readonly modelProfileId: string;
|
|
46
62
|
};
|
|
47
63
|
|
|
64
|
+
/** @internal */
|
|
48
65
|
export type PersistedModelSelectionIssue = {
|
|
66
|
+
/** @internal */
|
|
49
67
|
readonly code: "contradictory_provenance";
|
|
68
|
+
/** @internal */
|
|
50
69
|
readonly turnId: string;
|
|
70
|
+
/** @internal */
|
|
51
71
|
readonly modelProfileId: string;
|
|
72
|
+
/** @internal */
|
|
52
73
|
readonly kind: ModelSelectionKind;
|
|
74
|
+
/** @internal */
|
|
53
75
|
readonly source: ProcessSelectedTurnModelSource;
|
|
54
76
|
};
|
|
55
77
|
|
|
78
|
+
/** @internal */
|
|
56
79
|
export type PersistedModelIntegrityIssue =
|
|
57
80
|
| PersistedModelConfigurationIssue
|
|
58
81
|
| PersistedModelRelationalIssue
|
|
59
82
|
| PersistedModelSelectionIssue;
|
|
60
83
|
|
|
84
|
+
/** @internal */
|
|
61
85
|
export type PersistedModelIntegrity =
|
|
62
|
-
| {
|
|
63
|
-
|
|
86
|
+
| {
|
|
87
|
+
/** @internal */
|
|
88
|
+
readonly kind: "valid";
|
|
89
|
+
}
|
|
90
|
+
| {
|
|
91
|
+
/** @internal */
|
|
92
|
+
readonly kind: "malformed";
|
|
93
|
+
/** @internal */
|
|
94
|
+
readonly issues: readonly PersistedModelIntegrityIssue[];
|
|
95
|
+
};
|
|
64
96
|
|
|
65
97
|
export type ExistingTurnSelection =
|
|
66
98
|
| { readonly kind: "none" }
|
|
@@ -87,198 +119,350 @@ export type ModelOverride =
|
|
|
87
119
|
>;
|
|
88
120
|
};
|
|
89
121
|
|
|
122
|
+
/** @internal */
|
|
90
123
|
type ProcessModelPolicyFailureBase = {
|
|
124
|
+
/** @internal */
|
|
91
125
|
readonly ok: false;
|
|
126
|
+
/** @internal */
|
|
92
127
|
readonly selection: DurableModelSelection | null;
|
|
128
|
+
/** @internal */
|
|
93
129
|
readonly availabilityRevision?: number;
|
|
94
130
|
};
|
|
95
131
|
|
|
132
|
+
/** @internal */
|
|
96
133
|
export type ProcessModelPolicyFailure = ProcessModelPolicyFailureBase &
|
|
97
134
|
(
|
|
98
|
-
| { readonly code: "model_required" }
|
|
99
|
-
| { readonly code: "unknown_model_profile"; readonly modelProfileId: string }
|
|
100
135
|
| {
|
|
136
|
+
/** @internal */
|
|
137
|
+
readonly code: "model_required";
|
|
138
|
+
}
|
|
139
|
+
| {
|
|
140
|
+
/** @internal */
|
|
141
|
+
readonly code: "unknown_model_profile";
|
|
142
|
+
/** @internal */
|
|
143
|
+
readonly modelProfileId: string;
|
|
144
|
+
}
|
|
145
|
+
| {
|
|
146
|
+
/** @internal */
|
|
101
147
|
readonly code: "model_profile_not_allowed";
|
|
148
|
+
/** @internal */
|
|
102
149
|
readonly modelProfileId: string;
|
|
150
|
+
/** @internal */
|
|
103
151
|
readonly processId: string;
|
|
104
152
|
}
|
|
105
153
|
| {
|
|
154
|
+
/** @internal */
|
|
106
155
|
readonly code: "model_unavailable" | "model_stale";
|
|
156
|
+
/** @internal */
|
|
107
157
|
readonly reason: string | null;
|
|
108
158
|
}
|
|
109
159
|
| {
|
|
160
|
+
/** @internal */
|
|
110
161
|
readonly code: "invalid_model_configuration";
|
|
162
|
+
/** @internal */
|
|
111
163
|
readonly source: "configuration" | "selection_provenance";
|
|
164
|
+
/** @internal */
|
|
112
165
|
readonly issues: readonly (
|
|
113
166
|
| PersistedModelConfigurationIssue
|
|
114
167
|
| PersistedModelSelectionIssue
|
|
115
168
|
)[];
|
|
116
169
|
}
|
|
117
|
-
| {
|
|
170
|
+
| {
|
|
171
|
+
/** @internal */
|
|
172
|
+
readonly code: "stale_evaluation_snapshot";
|
|
173
|
+
}
|
|
118
174
|
);
|
|
175
|
+
/** @internal */
|
|
119
176
|
export interface ProcessModelPolicyResolution {
|
|
177
|
+
/** @internal */
|
|
120
178
|
readonly ok: true;
|
|
179
|
+
/** @internal */
|
|
121
180
|
readonly selection: DurableModelSelection | null;
|
|
181
|
+
/** @internal */
|
|
122
182
|
readonly availabilityRevision?: number;
|
|
123
183
|
}
|
|
184
|
+
/** @internal */
|
|
124
185
|
export type ProcessModelPolicyEvaluation = ProcessModelPolicyResolution | ProcessModelPolicyFailure;
|
|
125
186
|
|
|
187
|
+
/** @internal */
|
|
126
188
|
export interface ProjectedModelProfile {
|
|
189
|
+
/** @internal */
|
|
127
190
|
readonly id: string;
|
|
191
|
+
/** @internal */
|
|
128
192
|
readonly providerId: string;
|
|
193
|
+
/** @internal */
|
|
129
194
|
readonly modelId: string;
|
|
195
|
+
/** @internal */
|
|
130
196
|
readonly thinkingLevel: string;
|
|
197
|
+
/** @internal */
|
|
131
198
|
readonly availability: "available" | "unavailable" | "stale";
|
|
199
|
+
/** @internal */
|
|
132
200
|
readonly safeReason: string | null;
|
|
201
|
+
/** @internal */
|
|
133
202
|
readonly checkedAt: string | null;
|
|
134
203
|
}
|
|
135
204
|
|
|
205
|
+
/** @internal */
|
|
136
206
|
export interface ProjectedModelDefault {
|
|
207
|
+
/** @internal */
|
|
137
208
|
readonly processConfigModelProfileId: string | null;
|
|
209
|
+
/** @internal */
|
|
138
210
|
readonly instanceModelProfileId: string | null;
|
|
211
|
+
/** @internal */
|
|
139
212
|
readonly effectiveModelProfileId: string | null;
|
|
213
|
+
/** @internal */
|
|
140
214
|
readonly source: "instance" | "process_config" | "catalog_default" | "none";
|
|
141
215
|
}
|
|
142
216
|
|
|
217
|
+
/** @internal */
|
|
143
218
|
export type ProjectedModelResolutionSource = ProcessSelectedTurnModelSource | "none";
|
|
144
219
|
|
|
220
|
+
/** @internal */
|
|
145
221
|
export interface ProjectedLauncherModelSchema {
|
|
222
|
+
/** @internal */
|
|
146
223
|
readonly profiles: readonly ProjectedModelProfile[];
|
|
147
|
-
|
|
224
|
+
/** @internal */
|
|
225
|
+
readonly turns: readonly {
|
|
226
|
+
/** @internal */
|
|
227
|
+
readonly turnId: string;
|
|
228
|
+
/** @internal */
|
|
229
|
+
readonly description: string;
|
|
230
|
+
}[];
|
|
148
231
|
}
|
|
149
232
|
|
|
233
|
+
/** @internal */
|
|
150
234
|
export interface ProjectedLauncherModelPreview {
|
|
235
|
+
/** @internal */
|
|
151
236
|
readonly defaultModel: {
|
|
237
|
+
/** @internal */
|
|
152
238
|
readonly source: ProjectedModelDefault["source"];
|
|
239
|
+
/** @internal */
|
|
153
240
|
readonly profile: ProjectedModelProfile | null;
|
|
154
241
|
};
|
|
242
|
+
/** @internal */
|
|
155
243
|
readonly turns: readonly {
|
|
244
|
+
/** @internal */
|
|
156
245
|
readonly turnId: string;
|
|
246
|
+
/** @internal */
|
|
157
247
|
readonly description: string;
|
|
248
|
+
/** @internal */
|
|
158
249
|
readonly effective: {
|
|
250
|
+
/** @internal */
|
|
159
251
|
readonly source: ProjectedModelResolutionSource;
|
|
252
|
+
/** @internal */
|
|
160
253
|
readonly profile: ProjectedModelProfile | null;
|
|
161
254
|
};
|
|
162
255
|
}[];
|
|
163
256
|
}
|
|
164
257
|
|
|
258
|
+
/** @internal */
|
|
165
259
|
export type ProjectedProcessModelConfiguration = {
|
|
260
|
+
/** @internal */
|
|
166
261
|
readonly state:
|
|
167
|
-
| {
|
|
168
|
-
|
|
262
|
+
| {
|
|
263
|
+
/** @internal */
|
|
264
|
+
readonly kind: "ready";
|
|
265
|
+
}
|
|
266
|
+
| {
|
|
267
|
+
/** @internal */
|
|
268
|
+
readonly kind: "blocked";
|
|
269
|
+
/** @internal */
|
|
270
|
+
readonly issues: readonly PersistedModelConfigurationIssue[];
|
|
271
|
+
};
|
|
272
|
+
/** @internal */
|
|
169
273
|
readonly profiles: readonly ProjectedModelProfile[];
|
|
274
|
+
/** @internal */
|
|
170
275
|
readonly effectiveSelectedTurn: {
|
|
276
|
+
/** @internal */
|
|
171
277
|
readonly turnId: string;
|
|
278
|
+
/** @internal */
|
|
172
279
|
readonly description: string;
|
|
280
|
+
/** @internal */
|
|
173
281
|
readonly modelProfileId: string;
|
|
282
|
+
/** @internal */
|
|
174
283
|
readonly source: ProcessSelectedTurnModelSource;
|
|
175
284
|
} | null;
|
|
285
|
+
/** @internal */
|
|
176
286
|
readonly defaultModel: ProjectedModelDefault;
|
|
287
|
+
/** @internal */
|
|
177
288
|
readonly turns: readonly {
|
|
289
|
+
/** @internal */
|
|
178
290
|
readonly turnId: string;
|
|
291
|
+
/** @internal */
|
|
179
292
|
readonly description: string;
|
|
293
|
+
/** @internal */
|
|
180
294
|
readonly pathType: string;
|
|
295
|
+
/** @internal */
|
|
181
296
|
readonly processConfigModelProfileId: string | null;
|
|
297
|
+
/** @internal */
|
|
182
298
|
readonly instanceModelProfileId: string | null;
|
|
299
|
+
/** @internal */
|
|
183
300
|
readonly effectiveConfiguredModelProfileId: string | null;
|
|
301
|
+
/** @internal */
|
|
184
302
|
readonly source: "instance" | "process_config" | "default";
|
|
185
303
|
}[];
|
|
186
304
|
};
|
|
187
305
|
|
|
306
|
+
/** @internal */
|
|
188
307
|
export interface ProcessModelPolicyProjectionByKind {
|
|
308
|
+
/** @internal */
|
|
189
309
|
readonly profile_options: readonly ProjectedModelProfile[];
|
|
310
|
+
/** @internal */
|
|
190
311
|
readonly compatible_profiles: readonly string[];
|
|
312
|
+
/** @internal */
|
|
191
313
|
readonly launcher_schema: ProjectedLauncherModelSchema;
|
|
314
|
+
/** @internal */
|
|
192
315
|
readonly launcher_preview: ProjectedLauncherModelPreview;
|
|
316
|
+
/** @internal */
|
|
193
317
|
readonly process_configuration: ProjectedProcessModelConfiguration;
|
|
194
318
|
}
|
|
195
319
|
|
|
320
|
+
/** @internal */
|
|
196
321
|
export type ProcessModelPolicyEvaluationSubject =
|
|
197
322
|
| {
|
|
323
|
+
/** @internal */
|
|
198
324
|
readonly kind: "process_turn";
|
|
325
|
+
/** @internal */
|
|
199
326
|
readonly process: ProcessInstance;
|
|
327
|
+
/** @internal */
|
|
200
328
|
readonly turnId: string;
|
|
329
|
+
/** @internal */
|
|
201
330
|
readonly availability?: ProcessModelAvailabilitySnapshot;
|
|
331
|
+
/** @internal */
|
|
202
332
|
readonly startKind?: TurnStartKind;
|
|
203
|
-
/** True only when selecting the first turn of a persisted process. */
|
|
333
|
+
/** True only when selecting the first turn of a persisted process. @internal */
|
|
204
334
|
readonly initialSelection?: boolean;
|
|
335
|
+
/** @internal */
|
|
205
336
|
readonly modelOverride?: string | null;
|
|
206
337
|
}
|
|
207
338
|
| {
|
|
339
|
+
/** @internal */
|
|
208
340
|
readonly kind: "launch_plan_turn";
|
|
341
|
+
/** @internal */
|
|
209
342
|
readonly plan: ProcessLaunchPlan;
|
|
343
|
+
/** @internal */
|
|
210
344
|
readonly turnId: string;
|
|
345
|
+
/** @internal */
|
|
211
346
|
readonly availability: ProcessModelAvailabilitySnapshot;
|
|
212
347
|
}
|
|
213
348
|
| {
|
|
349
|
+
/** @internal */
|
|
214
350
|
readonly kind: "runtime_selection";
|
|
351
|
+
/** @internal */
|
|
215
352
|
readonly processId: string;
|
|
353
|
+
/** @internal */
|
|
216
354
|
readonly selection: DurableModelSelection | null;
|
|
355
|
+
/** @internal */
|
|
217
356
|
readonly availability: ProcessModelAvailabilitySnapshot;
|
|
218
357
|
}
|
|
219
358
|
| {
|
|
359
|
+
/** @internal */
|
|
220
360
|
readonly kind: "preparation_recovery";
|
|
361
|
+
/** @internal */
|
|
221
362
|
readonly cause: "availability_transition" | "startup_reconciliation";
|
|
363
|
+
/** @internal */
|
|
222
364
|
readonly process: ProcessInstance;
|
|
365
|
+
/** @internal */
|
|
223
366
|
readonly currentStart: TurnStartRecord;
|
|
367
|
+
/** @internal */
|
|
224
368
|
readonly availability: ProcessModelAvailabilitySnapshot;
|
|
225
369
|
};
|
|
226
370
|
|
|
371
|
+
/** @internal */
|
|
227
372
|
export type ProcessModelPolicyProjectionSubject =
|
|
228
373
|
| {
|
|
374
|
+
/** @internal */
|
|
229
375
|
readonly kind: "profile_options";
|
|
376
|
+
/** @internal */
|
|
230
377
|
readonly processId: string;
|
|
378
|
+
/** @internal */
|
|
231
379
|
readonly availability: ProcessModelAvailabilitySnapshot;
|
|
232
380
|
}
|
|
233
381
|
| {
|
|
382
|
+
/** @internal */
|
|
234
383
|
readonly kind: "compatible_profiles";
|
|
384
|
+
/** @internal */
|
|
235
385
|
readonly processId: string;
|
|
386
|
+
/** @internal */
|
|
236
387
|
readonly providerId: string;
|
|
388
|
+
/** @internal */
|
|
237
389
|
readonly modelId: string;
|
|
390
|
+
/** @internal */
|
|
238
391
|
readonly availability: ProcessModelAvailabilitySnapshot;
|
|
239
392
|
}
|
|
240
393
|
| {
|
|
394
|
+
/** @internal */
|
|
241
395
|
readonly kind: "launcher_schema";
|
|
396
|
+
/** @internal */
|
|
242
397
|
readonly processId: string;
|
|
398
|
+
/** @internal */
|
|
243
399
|
readonly availability?: ProcessModelAvailabilitySnapshot;
|
|
244
400
|
}
|
|
245
401
|
| {
|
|
402
|
+
/** @internal */
|
|
246
403
|
readonly kind: "launcher_preview";
|
|
404
|
+
/** @internal */
|
|
247
405
|
readonly processId: string;
|
|
406
|
+
/** @internal */
|
|
248
407
|
readonly modelConfig: LaunchModelConfigInput;
|
|
408
|
+
/** @internal */
|
|
249
409
|
readonly availability: ProcessModelAvailabilitySnapshot;
|
|
250
410
|
}
|
|
251
411
|
| {
|
|
412
|
+
/** @internal */
|
|
252
413
|
readonly kind: "process_configuration";
|
|
414
|
+
/** @internal */
|
|
253
415
|
readonly process: ProcessInstance;
|
|
416
|
+
/** @internal */
|
|
254
417
|
readonly availability: ProcessModelAvailabilitySnapshot;
|
|
255
418
|
};
|
|
256
419
|
|
|
420
|
+
/** @internal */
|
|
257
421
|
export type ProcessModelPolicyProjectionKind = ProcessModelPolicyProjectionSubject["kind"];
|
|
422
|
+
/** @internal */
|
|
258
423
|
export type ProcessModelPolicyProjectionSubjectFor<K extends ProcessModelPolicyProjectionKind> =
|
|
259
|
-
Extract<
|
|
424
|
+
Extract<
|
|
425
|
+
ProcessModelPolicyProjectionSubject,
|
|
426
|
+
{
|
|
427
|
+
/** @internal */
|
|
428
|
+
readonly kind: K;
|
|
429
|
+
}
|
|
430
|
+
>;
|
|
260
431
|
|
|
432
|
+
/** @internal */
|
|
261
433
|
export interface ProcessModelPolicyFingerprintSubject {
|
|
434
|
+
/** @internal */
|
|
262
435
|
readonly process: ProcessInstance;
|
|
436
|
+
/** @internal */
|
|
263
437
|
readonly currentStart: TurnStartRecord;
|
|
264
438
|
}
|
|
265
439
|
|
|
440
|
+
/** @internal */
|
|
266
441
|
export interface PrepareLaunchPlanOptions {
|
|
442
|
+
/** @internal */
|
|
267
443
|
readonly modelConfig?: LaunchModelConfigInput;
|
|
444
|
+
/** @internal */
|
|
268
445
|
readonly replaceModelConfig?: boolean;
|
|
446
|
+
/** @internal */
|
|
269
447
|
readonly invalidModelConfig?: "reject" | "omit";
|
|
270
448
|
}
|
|
271
449
|
|
|
450
|
+
/** @internal */
|
|
272
451
|
export interface ServerProcessModelPolicy {
|
|
452
|
+
/** @internal */
|
|
273
453
|
prepareLaunchPlan(
|
|
274
454
|
launchPlan: ProcessLaunchPlan,
|
|
275
455
|
opts?: PrepareLaunchPlanOptions,
|
|
276
456
|
): LaunchPlanPreparationResultLike;
|
|
457
|
+
/** @internal */
|
|
277
458
|
inspectPersistedState(process: ProcessInstance): PersistedModelIntegrity;
|
|
459
|
+
/** @internal */
|
|
278
460
|
evaluate(request: ProcessModelPolicyEvaluationSubject): ProcessModelPolicyEvaluation;
|
|
461
|
+
/** @internal */
|
|
279
462
|
project<K extends ProcessModelPolicyProjectionKind>(
|
|
280
463
|
request: ProcessModelPolicyProjectionSubjectFor<K>,
|
|
281
464
|
): ProcessModelPolicyProjectionByKind[K];
|
|
465
|
+
/** @internal */
|
|
282
466
|
fingerprint(request: ProcessModelPolicyFingerprintSubject): string;
|
|
283
467
|
}
|
|
284
468
|
export interface PolicyProfile {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
/** @internal */
|
|
1
2
|
export interface ProcessOperationCoordinator {
|
|
3
|
+
/** @internal */
|
|
2
4
|
runExclusive<T>(instanceId: string, operation: () => Promise<T> | T): Promise<T>;
|
|
3
5
|
}
|
|
4
6
|
|
|
7
|
+
/** @internal */
|
|
5
8
|
export function createProcessOperationCoordinator(): ProcessOperationCoordinator {
|
|
6
9
|
const tails = new Map<string, Promise<void>>();
|
|
7
10
|
|