clinkx 0.3.0 → 1.1.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/CHANGELOG.md +119 -0
- package/LICENSE +10 -0
- package/README.md +154 -26
- package/clinkx-workflows/dist/allowed-roots.d.ts +1 -0
- package/clinkx-workflows/dist/allowed-roots.js +5 -0
- package/clinkx-workflows/dist/allowed-roots.js.map +1 -0
- package/clinkx-workflows/dist/artifacts.d.ts +20 -1
- package/clinkx-workflows/dist/artifacts.js +38 -9
- package/clinkx-workflows/dist/artifacts.js.map +1 -1
- package/clinkx-workflows/dist/backend.d.ts +4 -0
- package/clinkx-workflows/dist/chairman-knobs.d.ts +24 -0
- package/clinkx-workflows/dist/chairman-knobs.js +27 -0
- package/clinkx-workflows/dist/chairman-knobs.js.map +1 -0
- package/clinkx-workflows/dist/citation-check.d.ts +40 -0
- package/clinkx-workflows/dist/citation-check.js +348 -0
- package/clinkx-workflows/dist/citation-check.js.map +1 -0
- package/clinkx-workflows/dist/clink-client.d.ts +12 -1
- package/clinkx-workflows/dist/clink-client.js +56 -5
- package/clinkx-workflows/dist/clink-client.js.map +1 -1
- package/clinkx-workflows/dist/config.d.ts +173 -16
- package/clinkx-workflows/dist/config.js +417 -26
- package/clinkx-workflows/dist/config.js.map +1 -1
- package/clinkx-workflows/dist/contained-file.d.ts +172 -0
- package/clinkx-workflows/dist/contained-file.js +483 -0
- package/clinkx-workflows/dist/contained-file.js.map +1 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-contract.d.ts +416 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-contract.js +328 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-contract.js.map +1 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-router.d.ts +24 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-router.js +39 -0
- package/clinkx-workflows/dist/context-builder-lifecycle-router.js.map +1 -0
- package/clinkx-workflows/dist/context-cache-key.d.ts +53 -0
- package/clinkx-workflows/dist/context-cache-key.js +91 -0
- package/clinkx-workflows/dist/context-cache-key.js.map +1 -0
- package/clinkx-workflows/dist/context-mode-resolver.d.ts +27 -0
- package/clinkx-workflows/dist/context-mode-resolver.js +126 -0
- package/clinkx-workflows/dist/context-mode-resolver.js.map +1 -0
- package/clinkx-workflows/dist/context-preflight.d.ts +189 -0
- package/clinkx-workflows/dist/context-preflight.js +91 -0
- package/clinkx-workflows/dist/context-preflight.js.map +1 -0
- package/clinkx-workflows/dist/council-execution-policy.d.ts +68 -0
- package/clinkx-workflows/dist/council-execution-policy.js +110 -0
- package/clinkx-workflows/dist/council-execution-policy.js.map +1 -0
- package/clinkx-workflows/dist/council-expander.d.ts +10 -9
- package/clinkx-workflows/dist/council-expander.js +20 -10
- package/clinkx-workflows/dist/council-expander.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/activity-contract.d.ts +5718 -0
- package/clinkx-workflows/dist/dashboard/activity-contract.js +157 -0
- package/clinkx-workflows/dist/dashboard/activity-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/activity-lease.d.ts +25 -0
- package/clinkx-workflows/dist/dashboard/activity-lease.js +34 -0
- package/clinkx-workflows/dist/dashboard/activity-lease.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/activity-reader.d.ts +90 -0
- package/clinkx-workflows/dist/dashboard/activity-reader.js +493 -0
- package/clinkx-workflows/dist/dashboard/activity-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/api-routes.d.ts +40 -0
- package/clinkx-workflows/dist/dashboard/api-routes.js +1155 -0
- package/clinkx-workflows/dist/dashboard/api-routes.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/artifact-index.d.ts +37 -0
- package/clinkx-workflows/dist/dashboard/artifact-index.js +145 -0
- package/clinkx-workflows/dist/dashboard/artifact-index.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.d.ts +31 -0
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.js +65 -0
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/controller.d.ts +26 -0
- package/clinkx-workflows/dist/dashboard/auth/controller.js +596 -0
- package/clinkx-workflows/dist/dashboard/auth/controller.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/credential-store.d.ts +60 -0
- package/clinkx-workflows/dist/dashboard/auth/credential-store.js +776 -0
- package/clinkx-workflows/dist/dashboard/auth/credential-store.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/enrollment-gate.d.ts +9 -0
- package/clinkx-workflows/dist/dashboard/auth/enrollment-gate.js +44 -0
- package/clinkx-workflows/dist/dashboard/auth/enrollment-gate.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/session-store.d.ts +17 -0
- package/clinkx-workflows/dist/dashboard/auth/session-store.js +77 -0
- package/clinkx-workflows/dist/dashboard/auth/session-store.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/auth/webauthn-service.d.ts +25 -0
- package/clinkx-workflows/dist/dashboard/auth/webauthn-service.js +71 -0
- package/clinkx-workflows/dist/dashboard/auth/webauthn-service.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/context-builder-invocation-contract.d.ts +3865 -0
- package/clinkx-workflows/dist/dashboard/context-builder-invocation-contract.js +69 -0
- package/clinkx-workflows/dist/dashboard/context-builder-invocation-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/context-run-liveness.d.ts +37 -0
- package/clinkx-workflows/dist/dashboard/context-run-liveness.js +49 -0
- package/clinkx-workflows/dist/dashboard/context-run-liveness.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/context-run-reader.d.ts +256 -0
- package/clinkx-workflows/dist/dashboard/context-run-reader.js +1301 -0
- package/clinkx-workflows/dist/dashboard/context-run-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/contracts.d.ts +28483 -0
- package/clinkx-workflows/dist/dashboard/contracts.js +1284 -0
- package/clinkx-workflows/dist/dashboard/contracts.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/generation.d.ts +14 -0
- package/clinkx-workflows/dist/dashboard/generation.js +41 -0
- package/clinkx-workflows/dist/dashboard/generation.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/index.d.ts +32 -0
- package/clinkx-workflows/dist/dashboard/index.js +20 -0
- package/clinkx-workflows/dist/dashboard/index.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/invocation-contract.d.ts +786 -0
- package/clinkx-workflows/dist/dashboard/invocation-contract.js +201 -0
- package/clinkx-workflows/dist/dashboard/invocation-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/lazy-content.d.ts +114 -0
- package/clinkx-workflows/dist/dashboard/lazy-content.js +799 -0
- package/clinkx-workflows/dist/dashboard/lazy-content.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/native-transcript/contract.d.ts +90 -0
- package/clinkx-workflows/dist/dashboard/native-transcript/contract.js +31 -0
- package/clinkx-workflows/dist/dashboard/native-transcript/contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/native-transcript/projection.d.ts +12 -0
- package/clinkx-workflows/dist/dashboard/native-transcript/projection.js +286 -0
- package/clinkx-workflows/dist/dashboard/native-transcript/projection.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/progress-report-contract.d.ts +446 -0
- package/clinkx-workflows/dist/dashboard/progress-report-contract.js +221 -0
- package/clinkx-workflows/dist/dashboard/progress-report-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/progress-report-reader.d.ts +50 -0
- package/clinkx-workflows/dist/dashboard/progress-report-reader.js +529 -0
- package/clinkx-workflows/dist/dashboard/progress-report-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-overlay.d.ts +89 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-overlay.js +71 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-overlay.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-store.d.ts +29 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-store.js +111 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-store.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/prompt-builder-library-contract.d.ts +194 -0
- package/clinkx-workflows/dist/dashboard/prompt-builder-library-contract.js +89 -0
- package/clinkx-workflows/dist/dashboard/prompt-builder-library-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/prompt-builder-library-store.d.ts +26 -0
- package/clinkx-workflows/dist/dashboard/prompt-builder-library-store.js +102 -0
- package/clinkx-workflows/dist/dashboard/prompt-builder-library-store.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/read-model.d.ts +86 -0
- package/clinkx-workflows/dist/dashboard/read-model.js +440 -0
- package/clinkx-workflows/dist/dashboard/read-model.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/request-admission.d.ts +31 -0
- package/clinkx-workflows/dist/dashboard/request-admission.js +130 -0
- package/clinkx-workflows/dist/dashboard/request-admission.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/scanner.d.ts +78 -0
- package/clinkx-workflows/dist/dashboard/scanner.js +1154 -0
- package/clinkx-workflows/dist/dashboard/scanner.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/server-factory.d.ts +63 -0
- package/clinkx-workflows/dist/dashboard/server-factory.js +483 -0
- package/clinkx-workflows/dist/dashboard/server-factory.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-contract.d.ts +2778 -0
- package/clinkx-workflows/dist/dashboard/session-log-contract.js +506 -0
- package/clinkx-workflows/dist/dashboard/session-log-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-identity.d.ts +21 -0
- package/clinkx-workflows/dist/dashboard/session-log-identity.js +101 -0
- package/clinkx-workflows/dist/dashboard/session-log-identity.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-journal.d.ts +43 -0
- package/clinkx-workflows/dist/dashboard/session-log-journal.js +529 -0
- package/clinkx-workflows/dist/dashboard/session-log-journal.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-reader.d.ts +61 -0
- package/clinkx-workflows/dist/dashboard/session-log-reader.js +378 -0
- package/clinkx-workflows/dist/dashboard/session-log-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-redaction.d.ts +14 -0
- package/clinkx-workflows/dist/dashboard/session-log-redaction.js +1101 -0
- package/clinkx-workflows/dist/dashboard/session-log-redaction.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-retention.d.ts +23 -0
- package/clinkx-workflows/dist/dashboard/session-log-retention.js +212 -0
- package/clinkx-workflows/dist/dashboard/session-log-retention.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/static-responses.d.ts +10 -0
- package/clinkx-workflows/dist/dashboard/static-responses.js +94 -0
- package/clinkx-workflows/dist/dashboard/static-responses.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/worker-lock-observer.d.ts +28 -0
- package/clinkx-workflows/dist/dashboard/worker-lock-observer.js +241 -0
- package/clinkx-workflows/dist/dashboard/worker-lock-observer.js.map +1 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-400-normal-CYLoc0-x.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-500-normal-BgVn5rGT.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/index-JPHQVtn9.js +106 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/style-DOMHk-j6.css +1 -0
- package/clinkx-workflows/dist/dashboard-ui/contracts/council-plan-review-input-v1.json +158 -0
- package/clinkx-workflows/dist/dashboard-ui/index.html +15 -0
- package/clinkx-workflows/dist/dashboard-ui/licenses/IBM-Plex-Mono-OFL.txt +93 -0
- package/clinkx-workflows/dist/dashboard-ui/licenses/IBM-Plex-Sans-OFL.txt +93 -0
- package/clinkx-workflows/dist/dashboard-ui/licenses/JetBrains-Mono-OFL.txt +93 -0
- package/clinkx-workflows/dist/dashboard-ui/licenses/NOTICE.md +32 -0
- package/clinkx-workflows/dist/dashboard-ui/theme-init.js +8 -0
- package/clinkx-workflows/dist/definition-normalizer.d.ts +19 -0
- package/clinkx-workflows/dist/definition-normalizer.js.map +1 -1
- package/clinkx-workflows/dist/delegate-finalizer-policy.d.ts +26 -0
- package/clinkx-workflows/dist/delegate-finalizer-policy.js +72 -0
- package/clinkx-workflows/dist/delegate-finalizer-policy.js.map +1 -0
- package/clinkx-workflows/dist/delegate-signature.d.ts +14 -0
- package/clinkx-workflows/dist/delegate-signature.js +14 -0
- package/clinkx-workflows/dist/delegate-signature.js.map +1 -0
- package/clinkx-workflows/dist/delegate-validate.d.ts +108 -0
- package/clinkx-workflows/dist/delegate-validate.js +148 -0
- package/clinkx-workflows/dist/delegate-validate.js.map +1 -0
- package/clinkx-workflows/dist/engine.d.ts +251 -0
- package/clinkx-workflows/dist/engine.js +1342 -92
- package/clinkx-workflows/dist/engine.js.map +1 -1
- package/clinkx-workflows/dist/errors.d.ts +24 -2
- package/clinkx-workflows/dist/errors.js +30 -2
- package/clinkx-workflows/dist/errors.js.map +1 -1
- package/clinkx-workflows/dist/fidelity.d.ts +47 -1
- package/clinkx-workflows/dist/fidelity.js +54 -1
- package/clinkx-workflows/dist/fidelity.js.map +1 -1
- package/clinkx-workflows/dist/fingerprint.d.ts +25 -7
- package/clinkx-workflows/dist/fingerprint.js +33 -10
- package/clinkx-workflows/dist/fingerprint.js.map +1 -1
- package/clinkx-workflows/dist/index.d.ts +19 -0
- package/clinkx-workflows/dist/index.js +68 -1
- package/clinkx-workflows/dist/index.js.map +1 -1
- package/clinkx-workflows/dist/loader.d.ts +9 -3
- package/clinkx-workflows/dist/loader.js +92 -21
- package/clinkx-workflows/dist/loader.js.map +1 -1
- package/clinkx-workflows/dist/logger.d.ts +1 -1
- package/clinkx-workflows/dist/logger.js +17 -3
- package/clinkx-workflows/dist/logger.js.map +1 -1
- package/clinkx-workflows/dist/monotonic-clock.d.ts +19 -0
- package/clinkx-workflows/dist/monotonic-clock.js +22 -0
- package/clinkx-workflows/dist/monotonic-clock.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/admission.d.ts +160 -0
- package/clinkx-workflows/dist/plan-review/admission.js +290 -0
- package/clinkx-workflows/dist/plan-review/admission.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/context-policy.d.ts +55 -0
- package/clinkx-workflows/dist/plan-review/context-policy.js +146 -0
- package/clinkx-workflows/dist/plan-review/context-policy.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/contract.d.ts +763 -0
- package/clinkx-workflows/dist/plan-review/contract.js +289 -0
- package/clinkx-workflows/dist/plan-review/contract.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/digest.d.ts +68 -0
- package/clinkx-workflows/dist/plan-review/digest.js +241 -0
- package/clinkx-workflows/dist/plan-review/digest.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/discovery.d.ts +45 -0
- package/clinkx-workflows/dist/plan-review/discovery.js +36 -0
- package/clinkx-workflows/dist/plan-review/discovery.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/execution-contract.d.ts +298 -0
- package/clinkx-workflows/dist/plan-review/execution-contract.js +194 -0
- package/clinkx-workflows/dist/plan-review/execution-contract.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/expander.d.ts +48 -0
- package/clinkx-workflows/dist/plan-review/expander.js +243 -0
- package/clinkx-workflows/dist/plan-review/expander.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/projector.d.ts +126 -0
- package/clinkx-workflows/dist/plan-review/projector.js +437 -0
- package/clinkx-workflows/dist/plan-review/projector.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/publication.d.ts +95 -0
- package/clinkx-workflows/dist/plan-review/publication.js +182 -0
- package/clinkx-workflows/dist/plan-review/publication.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/ranking-reducer.d.ts +34 -0
- package/clinkx-workflows/dist/plan-review/ranking-reducer.js +139 -0
- package/clinkx-workflows/dist/plan-review/ranking-reducer.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/resume.d.ts +38 -0
- package/clinkx-workflows/dist/plan-review/resume.js +122 -0
- package/clinkx-workflows/dist/plan-review/resume.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/rubric.d.ts +7 -0
- package/clinkx-workflows/dist/plan-review/rubric.js +24 -0
- package/clinkx-workflows/dist/plan-review/rubric.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/run-state.d.ts +398 -0
- package/clinkx-workflows/dist/plan-review/run-state.js +183 -0
- package/clinkx-workflows/dist/plan-review/run-state.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/runtime-policy.d.ts +74 -0
- package/clinkx-workflows/dist/plan-review/runtime-policy.js +186 -0
- package/clinkx-workflows/dist/plan-review/runtime-policy.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/snapshot.d.ts +81 -0
- package/clinkx-workflows/dist/plan-review/snapshot.js +170 -0
- package/clinkx-workflows/dist/plan-review/snapshot.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/stage-error.d.ts +19 -0
- package/clinkx-workflows/dist/plan-review/stage-error.js +20 -0
- package/clinkx-workflows/dist/plan-review/stage-error.js.map +1 -0
- package/clinkx-workflows/dist/post-processors/index.d.ts +20 -0
- package/clinkx-workflows/dist/post-processors/index.js +21 -0
- package/clinkx-workflows/dist/post-processors/index.js.map +1 -0
- package/clinkx-workflows/dist/prompt-budget.d.ts +7 -0
- package/clinkx-workflows/dist/prompt-budget.js +7 -1
- package/clinkx-workflows/dist/prompt-budget.js.map +1 -1
- package/clinkx-workflows/dist/reducers/index.js +2 -0
- package/clinkx-workflows/dist/reducers/index.js.map +1 -1
- package/clinkx-workflows/dist/roster-contract.d.ts +889 -0
- package/clinkx-workflows/dist/roster-contract.js +180 -0
- package/clinkx-workflows/dist/roster-contract.js.map +1 -0
- package/clinkx-workflows/dist/rosters.d.ts +14 -0
- package/clinkx-workflows/dist/rosters.js +169 -0
- package/clinkx-workflows/dist/rosters.js.map +1 -0
- package/clinkx-workflows/dist/run-health.d.ts +7 -0
- package/clinkx-workflows/dist/run-health.js +25 -0
- package/clinkx-workflows/dist/run-health.js.map +1 -0
- package/clinkx-workflows/dist/run-lock-heartbeat.d.ts +2 -0
- package/clinkx-workflows/dist/run-lock-heartbeat.js +3 -0
- package/clinkx-workflows/dist/run-lock-heartbeat.js.map +1 -0
- package/clinkx-workflows/dist/run-summary/cards/council-plan-review.d.ts +34 -0
- package/clinkx-workflows/dist/run-summary/cards/council-plan-review.js +74 -0
- package/clinkx-workflows/dist/run-summary/cards/council-plan-review.js.map +1 -0
- package/clinkx-workflows/dist/run-summary/cards/index.js +5 -0
- package/clinkx-workflows/dist/run-summary/cards/index.js.map +1 -1
- package/clinkx-workflows/dist/run-summary.d.ts +13 -0
- package/clinkx-workflows/dist/run-summary.js +29 -1
- package/clinkx-workflows/dist/run-summary.js.map +1 -1
- package/clinkx-workflows/dist/schema.d.ts +140 -21
- package/clinkx-workflows/dist/schema.js +34 -1
- package/clinkx-workflows/dist/schema.js.map +1 -1
- package/clinkx-workflows/dist/seed-terms.d.ts +30 -0
- package/clinkx-workflows/dist/seed-terms.js +176 -0
- package/clinkx-workflows/dist/seed-terms.js.map +1 -0
- package/clinkx-workflows/dist/server.d.ts +5 -2
- package/clinkx-workflows/dist/server.js +84 -52
- package/clinkx-workflows/dist/server.js.map +1 -1
- package/clinkx-workflows/dist/shutdown.d.ts +29 -18
- package/clinkx-workflows/dist/shutdown.js +90 -64
- package/clinkx-workflows/dist/shutdown.js.map +1 -1
- package/clinkx-workflows/dist/state-schema.d.ts +61 -0
- package/clinkx-workflows/dist/state.d.ts +175 -3
- package/clinkx-workflows/dist/state.js +1398 -44
- package/clinkx-workflows/dist/state.js.map +1 -1
- package/clinkx-workflows/dist/stdio-watchdog.d.ts +52 -0
- package/clinkx-workflows/dist/stdio-watchdog.js +212 -0
- package/clinkx-workflows/dist/stdio-watchdog.js.map +1 -0
- package/clinkx-workflows/dist/transport.d.ts +15 -0
- package/clinkx-workflows/dist/transport.js +19 -10
- package/clinkx-workflows/dist/transport.js.map +1 -1
- package/clinkx-workflows/dist/types.d.ts +20 -2
- package/clinkx-workflows/dist/validators/council.d.ts +334 -101
- package/clinkx-workflows/dist/validators/council.js +52 -13
- package/clinkx-workflows/dist/validators/council.js.map +1 -1
- package/clinkx-workflows/dist/validators/index.d.ts +1 -0
- package/clinkx-workflows/dist/validators/index.js +3 -0
- package/clinkx-workflows/dist/validators/index.js.map +1 -1
- package/clinkx-workflows/dist/validators/plan-review.d.ts +398 -0
- package/clinkx-workflows/dist/validators/plan-review.js +316 -0
- package/clinkx-workflows/dist/validators/plan-review.js.map +1 -0
- package/clinkx-workflows/dist/workflow-receipt.js +188 -4
- package/clinkx-workflows/dist/workflow-receipt.js.map +1 -1
- package/clinkx-workflows/dist/workflow-tools.d.ts +118 -3
- package/clinkx-workflows/dist/workflow-tools.js +2110 -175
- package/clinkx-workflows/dist/workflow-tools.js.map +1 -1
- package/clinkx-workflows/dist/workspace-signature.d.ts +16 -0
- package/clinkx-workflows/dist/workspace-signature.js +388 -0
- package/clinkx-workflows/dist/workspace-signature.js.map +1 -0
- package/clinkx-workflows/templates/council/answer-chairman.txt +3 -0
- package/clinkx-workflows/templates/council/answer-cross-reviewer.txt +3 -0
- package/clinkx-workflows/templates/council/answer-specialist.txt +5 -1
- package/clinkx-workflows/templates/council/chairman.txt +3 -0
- package/clinkx-workflows/templates/council/code-review-chairman.txt +16 -0
- package/clinkx-workflows/templates/council/code-review-cross-reviewer.txt +7 -1
- package/clinkx-workflows/templates/council/code-review-reviewer.txt +22 -3
- package/clinkx-workflows/templates/council/debug-chairman.txt +3 -0
- package/clinkx-workflows/templates/council/debug-cross-reviewer.txt +3 -0
- package/clinkx-workflows/templates/council/debug-debugger.txt +5 -1
- package/clinkx-workflows/templates/council/discover-analyst.txt +5 -1
- package/clinkx-workflows/templates/council/discover-chairman.txt +3 -0
- package/clinkx-workflows/templates/council/discover-cross-reviewer.txt +3 -0
- package/clinkx-workflows/templates/council/member.txt +5 -1
- package/clinkx-workflows/templates/council/plan-review-chairman.txt +71 -0
- package/clinkx-workflows/templates/council/plan-review-cross-reviewer.txt +54 -0
- package/clinkx-workflows/templates/council/plan-review-reviewer.txt +63 -0
- package/clinkx-workflows/templates/council/reviewer.txt +3 -0
- package/clinkx-workflows/templates/plan-review/chairman.txt +48 -0
- package/clinkx-workflows/templates/plan-review/cross-review.txt +52 -0
- package/clinkx-workflows/templates/plan-review/ranking.txt +16 -0
- package/clinkx-workflows/templates/plan-review/reviewer.txt +57 -0
- package/clinkx-workflows/workflows/council-answer.yaml +100 -8
- package/clinkx-workflows/workflows/council-code-review.yaml +106 -8
- package/clinkx-workflows/workflows/council-debug.yaml +100 -8
- package/clinkx-workflows/workflows/council-default.yaml +104 -8
- package/clinkx-workflows/workflows/council-discover.yaml +100 -8
- package/clinkx-workflows/workflows/council-plan-review.yaml +253 -0
- package/clinkx-workflows/workflows/plan-review-receipts.yaml +230 -0
- package/conf/adapters/agy.json +56 -0
- package/conf/adapters/claude.json +12 -0
- package/conf/adapters/codex-app-server.json +44 -0
- package/conf/adapters/codex.json +14 -2
- package/conf/adapters/glm.json +24 -3
- package/conf/adapters/grok.json +67 -0
- package/conf/adapters/hapi/agy.json +59 -0
- package/conf/adapters/hapi/claude.json +12 -0
- package/conf/adapters/hapi/codex.json +14 -2
- package/conf/adapters/hapi/glm.json +25 -4
- package/conf/rosters/default-council.json +21 -0
- package/dist/activity-journal.d.ts +56 -0
- package/dist/activity-journal.js +706 -0
- package/dist/activity-journal.js.map +1 -0
- package/dist/allowed-roots.d.ts +41 -0
- package/dist/allowed-roots.js +125 -3
- package/dist/allowed-roots.js.map +1 -1
- package/dist/codex/activity-session-log.d.ts +14 -0
- package/dist/codex/activity-session-log.js +206 -0
- package/dist/codex/activity-session-log.js.map +1 -0
- package/dist/codex/agent-tools.d.ts +23 -0
- package/dist/codex/agent-tools.js +1306 -0
- package/dist/codex/agent-tools.js.map +1 -0
- package/dist/codex/app-server-client.d.ts +79 -0
- package/dist/codex/app-server-client.js +593 -0
- package/dist/codex/app-server-client.js.map +1 -0
- package/dist/codex/app-server-registry.d.ts +407 -0
- package/dist/codex/app-server-registry.js +1493 -0
- package/dist/codex/app-server-registry.js.map +1 -0
- package/dist/codex/client-types.d.ts +115 -0
- package/dist/codex/client-types.js +2 -0
- package/dist/codex/client-types.js.map +1 -0
- package/dist/codex/protocol.d.ts +5375 -0
- package/dist/codex/protocol.js +614 -0
- package/dist/codex/protocol.js.map +1 -0
- package/dist/codex/session.d.ts +263 -0
- package/dist/codex/session.js +466 -0
- package/dist/codex/session.js.map +1 -0
- package/dist/config.d.ts +386 -23
- package/dist/config.js +184 -15
- package/dist/config.js.map +1 -1
- package/dist/context-builder/anchors.d.ts +1 -0
- package/dist/context-builder/anchors.js +3 -0
- package/dist/context-builder/anchors.js.map +1 -1
- package/dist/context-builder/bundle.d.ts +48 -2
- package/dist/context-builder/bundle.js +388 -2417
- package/dist/context-builder/bundle.js.map +1 -1
- package/dist/context-builder/codemap.d.ts +5 -0
- package/dist/context-builder/codemap.js +387 -13
- package/dist/context-builder/codemap.js.map +1 -1
- package/dist/context-builder/config.d.ts +1 -0
- package/dist/context-builder/config.js +12 -0
- package/dist/context-builder/config.js.map +1 -1
- package/dist/context-builder/context-run-catalog.d.ts +17 -0
- package/dist/context-builder/context-run-catalog.js +99 -0
- package/dist/context-builder/context-run-catalog.js.map +1 -0
- package/dist/context-builder/delegate-finalizer-effective.d.ts +33 -0
- package/dist/context-builder/delegate-finalizer-effective.js +82 -0
- package/dist/context-builder/delegate-finalizer-effective.js.map +1 -0
- package/dist/context-builder/delegate-packet.d.ts +55 -0
- package/dist/context-builder/delegate-packet.js +430 -74
- package/dist/context-builder/delegate-packet.js.map +1 -1
- package/dist/context-builder/delegate-reconstruction.d.ts +29 -0
- package/dist/context-builder/delegate-reconstruction.js +110 -41
- package/dist/context-builder/delegate-reconstruction.js.map +1 -1
- package/dist/context-builder/delegate-validation.d.ts +41 -1
- package/dist/context-builder/delegate-validation.js +237 -48
- package/dist/context-builder/delegate-validation.js.map +1 -1
- package/dist/context-builder/delegate.d.ts +11 -0
- package/dist/context-builder/delegate.js +210 -58
- package/dist/context-builder/delegate.js.map +1 -1
- package/dist/context-builder/diagnostics.d.ts +11 -2
- package/dist/context-builder/diagnostics.js +39 -6
- package/dist/context-builder/diagnostics.js.map +1 -1
- package/dist/context-builder/discovery-progress.d.ts +25 -0
- package/dist/context-builder/discovery-progress.js +64 -0
- package/dist/context-builder/discovery-progress.js.map +1 -0
- package/dist/context-builder/discovery-watchdog.d.ts +15 -0
- package/dist/context-builder/discovery-watchdog.js +39 -0
- package/dist/context-builder/discovery-watchdog.js.map +1 -0
- package/dist/context-builder/discovery.d.ts +36 -1
- package/dist/context-builder/discovery.js +584 -172
- package/dist/context-builder/discovery.js.map +1 -1
- package/dist/context-builder/external-gaps.d.ts +73 -0
- package/dist/context-builder/external-gaps.js +248 -0
- package/dist/context-builder/external-gaps.js.map +1 -0
- package/dist/context-builder/globs.d.ts +1 -0
- package/dist/context-builder/globs.js +25 -10
- package/dist/context-builder/globs.js.map +1 -1
- package/dist/context-builder/handler.d.ts +67 -2
- package/dist/context-builder/handler.js +1810 -2440
- package/dist/context-builder/handler.js.map +1 -1
- package/dist/context-builder/invocation-sidecar.d.ts +41 -0
- package/dist/context-builder/invocation-sidecar.js +189 -0
- package/dist/context-builder/invocation-sidecar.js.map +1 -0
- package/dist/context-builder/lifecycle-contract.d.ts +424 -0
- package/dist/context-builder/lifecycle-contract.js +523 -0
- package/dist/context-builder/lifecycle-contract.js.map +1 -0
- package/dist/context-builder/lifecycle-journal.d.ts +62 -0
- package/dist/context-builder/lifecycle-journal.js +88 -0
- package/dist/context-builder/lifecycle-journal.js.map +1 -0
- package/dist/context-builder/lifecycle-observer.d.ts +102 -0
- package/dist/context-builder/lifecycle-observer.js +258 -0
- package/dist/context-builder/lifecycle-observer.js.map +1 -0
- package/dist/context-builder/lifecycle-reconcile.d.ts +32 -0
- package/dist/context-builder/lifecycle-reconcile.js +191 -0
- package/dist/context-builder/lifecycle-reconcile.js.map +1 -0
- package/dist/context-builder/lifecycle-recovery.d.ts +2 -0
- package/dist/context-builder/lifecycle-recovery.js +14 -0
- package/dist/context-builder/lifecycle-recovery.js.map +1 -0
- package/dist/context-builder/mutation-lock.d.ts +32 -0
- package/dist/context-builder/mutation-lock.js +321 -0
- package/dist/context-builder/mutation-lock.js.map +1 -0
- package/dist/context-builder/path-signals.js +9 -5
- package/dist/context-builder/path-signals.js.map +1 -1
- package/dist/context-builder/progress.d.ts +3 -1
- package/dist/context-builder/progress.js +23 -0
- package/dist/context-builder/progress.js.map +1 -1
- package/dist/context-builder/receipt.d.ts +6 -4
- package/dist/context-builder/receipt.js +12 -1
- package/dist/context-builder/receipt.js.map +1 -1
- package/dist/context-builder/refine-handler.d.ts +14 -0
- package/dist/context-builder/refine-handler.js +790 -0
- package/dist/context-builder/refine-handler.js.map +1 -0
- package/dist/context-builder/review-coverage.d.ts +116 -0
- package/dist/context-builder/review-coverage.js +544 -0
- package/dist/context-builder/review-coverage.js.map +1 -0
- package/dist/context-builder/schema.d.ts +315 -2
- package/dist/context-builder/schema.js +133 -7
- package/dist/context-builder/schema.js.map +1 -1
- package/dist/context-builder/secrets.d.ts +59 -0
- package/dist/context-builder/secrets.js +2255 -44
- package/dist/context-builder/secrets.js.map +1 -1
- package/dist/context-builder/selection.d.ts +7 -3
- package/dist/context-builder/selection.js +200 -738
- package/dist/context-builder/selection.js.map +1 -1
- package/dist/context-builder/session-log-identity.d.ts +1 -0
- package/dist/context-builder/session-log-identity.js +66 -0
- package/dist/context-builder/session-log-identity.js.map +1 -0
- package/dist/context-builder/slice-range-math.d.ts +16 -0
- package/dist/context-builder/slice-range-math.js +137 -0
- package/dist/context-builder/slice-range-math.js.map +1 -0
- package/dist/context-builder/status.d.ts +23 -2
- package/dist/context-builder/status.js +60 -4
- package/dist/context-builder/status.js.map +1 -1
- package/dist/context-builder/storage.d.ts +59 -2
- package/dist/context-builder/storage.js +500 -168
- package/dist/context-builder/storage.js.map +1 -1
- package/dist/context-builder/token-estimate.d.ts +13 -2
- package/dist/context-builder/token-estimate.js +77 -4
- package/dist/context-builder/token-estimate.js.map +1 -1
- package/dist/context-builder/versions.d.ts +44 -0
- package/dist/context-builder/versions.js +45 -0
- package/dist/context-builder/versions.js.map +1 -0
- package/dist/context-builder/workflow-runner.d.ts +75 -0
- package/dist/context-builder/workflow-runner.js +1241 -0
- package/dist/context-builder/workflow-runner.js.map +1 -0
- package/dist/context-builder/write-watchdog.d.ts +14 -0
- package/dist/context-builder/write-watchdog.js +38 -0
- package/dist/context-builder/write-watchdog.js.map +1 -0
- package/dist/dashboard-adapter-catalog.d.ts +9 -0
- package/dist/dashboard-adapter-catalog.js +53 -0
- package/dist/dashboard-adapter-catalog.js.map +1 -0
- package/dist/dashboard-cli.d.ts +81 -0
- package/dist/dashboard-cli.js +623 -0
- package/dist/dashboard-cli.js.map +1 -0
- package/dist/dashboard-companion/client.d.ts +37 -0
- package/dist/dashboard-companion/client.js +229 -0
- package/dist/dashboard-companion/client.js.map +1 -0
- package/dist/dashboard-companion/config.d.ts +8 -0
- package/dist/dashboard-companion/config.js +52 -0
- package/dist/dashboard-companion/config.js.map +1 -0
- package/dist/dashboard-companion/http-proxy.d.ts +10 -0
- package/dist/dashboard-companion/http-proxy.js +234 -0
- package/dist/dashboard-companion/http-proxy.js.map +1 -0
- package/dist/dashboard-companion/protocol.d.ts +80 -0
- package/dist/dashboard-companion/protocol.js +458 -0
- package/dist/dashboard-companion/protocol.js.map +1 -0
- package/dist/dashboard-companion/standalone-assets.d.ts +12 -0
- package/dist/dashboard-companion/standalone-assets.js +72 -0
- package/dist/dashboard-companion/standalone-assets.js.map +1 -0
- package/dist/dashboard-companion/standalone-entry.d.ts +1 -0
- package/dist/dashboard-companion/standalone-entry.js +17 -0
- package/dist/dashboard-companion/standalone-entry.js.map +1 -0
- package/dist/dashboard-gateway/config.d.ts +9 -0
- package/dist/dashboard-gateway/config.js +44 -0
- package/dist/dashboard-gateway/config.js.map +1 -0
- package/dist/dashboard-gateway/index.d.ts +12 -0
- package/dist/dashboard-gateway/index.js +786 -0
- package/dist/dashboard-gateway/index.js.map +1 -0
- package/dist/dashboard-gateway/main.d.ts +1 -0
- package/dist/dashboard-gateway/main.js +25 -0
- package/dist/dashboard-gateway/main.js.map +1 -0
- package/dist/dashboard-pairing-token.d.ts +1 -0
- package/dist/dashboard-pairing-token.js +5 -0
- package/dist/dashboard-pairing-token.js.map +1 -0
- package/dist/elaris/client.d.ts +73 -0
- package/dist/elaris/client.js +825 -0
- package/dist/elaris/client.js.map +1 -0
- package/dist/elaris/config.d.ts +18 -0
- package/dist/elaris/config.js +75 -0
- package/dist/elaris/config.js.map +1 -0
- package/dist/elaris/errors.d.ts +41 -0
- package/dist/elaris/errors.js +205 -0
- package/dist/elaris/errors.js.map +1 -0
- package/dist/elaris/github-repo.d.ts +18 -0
- package/dist/elaris/github-repo.js +89 -0
- package/dist/elaris/github-repo.js.map +1 -0
- package/dist/elaris/index.d.ts +10 -0
- package/dist/elaris/index.js +11 -0
- package/dist/elaris/index.js.map +1 -0
- package/dist/elaris/redact.d.ts +89 -0
- package/dist/elaris/redact.js +423 -0
- package/dist/elaris/redact.js.map +1 -0
- package/dist/elaris/run-id.d.ts +5 -0
- package/dist/elaris/run-id.js +20 -0
- package/dist/elaris/run-id.js.map +1 -0
- package/dist/elaris/status.d.ts +45 -0
- package/dist/elaris/status.js +122 -0
- package/dist/elaris/status.js.map +1 -0
- package/dist/elaris/tool-schemas.d.ts +314 -0
- package/dist/elaris/tool-schemas.js +208 -0
- package/dist/elaris/tool-schemas.js.map +1 -0
- package/dist/elaris/tools.d.ts +73 -0
- package/dist/elaris/tools.js +1065 -0
- package/dist/elaris/tools.js.map +1 -0
- package/dist/elaris/types.d.ts +1541 -0
- package/dist/elaris/types.js +252 -0
- package/dist/elaris/types.js.map +1 -0
- package/dist/errors.d.ts +16 -0
- package/dist/errors.js +19 -0
- package/dist/errors.js.map +1 -1
- package/dist/handler.d.ts +4 -0
- package/dist/handler.js +15 -2
- package/dist/handler.js.map +1 -1
- package/dist/index.d.ts +20 -2
- package/dist/index.js +154 -6
- package/dist/index.js.map +1 -1
- package/dist/local-clink-backend.d.ts +3 -0
- package/dist/local-clink-backend.js +4 -0
- package/dist/local-clink-backend.js.map +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/logger.js +18 -3
- package/dist/logger.js.map +1 -1
- package/dist/package-info.d.ts +2 -0
- package/dist/package-info.js +18 -0
- package/dist/package-info.js.map +1 -0
- package/dist/parsers/agy-stream-json.d.ts +14 -0
- package/dist/parsers/agy-stream-json.js +172 -0
- package/dist/parsers/agy-stream-json.js.map +1 -0
- package/dist/parsers/codex-jsonl.js +48 -3
- package/dist/parsers/codex-jsonl.js.map +1 -1
- package/dist/parsers/extract.d.ts +10 -1
- package/dist/parsers/extract.js +16 -4
- package/dist/parsers/extract.js.map +1 -1
- package/dist/parsers/observed-invocation.d.ts +20 -0
- package/dist/parsers/observed-invocation.js +42 -0
- package/dist/parsers/observed-invocation.js.map +1 -0
- package/dist/pipeline.d.ts +17 -0
- package/dist/pipeline.js +181 -10
- package/dist/pipeline.js.map +1 -1
- package/dist/progress-report/lock.d.ts +74 -0
- package/dist/progress-report/lock.js +343 -0
- package/dist/progress-report/lock.js.map +1 -0
- package/dist/progress-report/schema.d.ts +808 -0
- package/dist/progress-report/schema.js +119 -0
- package/dist/progress-report/schema.js.map +1 -0
- package/dist/progress-report/store.d.ts +66 -0
- package/dist/progress-report/store.js +766 -0
- package/dist/progress-report/store.js.map +1 -0
- package/dist/progress-report/tools.d.ts +20 -0
- package/dist/progress-report/tools.js +141 -0
- package/dist/progress-report/tools.js.map +1 -0
- package/dist/prompt-mode.d.ts +1 -1
- package/dist/prompt-mode.js +7 -2
- package/dist/prompt-mode.js.map +1 -1
- package/dist/run-dir.d.ts +24 -0
- package/dist/run-dir.js +201 -2
- package/dist/run-dir.js.map +1 -1
- package/dist/runner.d.ts +20 -0
- package/dist/runner.js +192 -16
- package/dist/runner.js.map +1 -1
- package/dist/safety.d.ts +54 -4
- package/dist/safety.js +186 -5
- package/dist/safety.js.map +1 -1
- package/dist/schema.d.ts +15 -7
- package/dist/schema.js +20 -0
- package/dist/schema.js.map +1 -1
- package/dist/server.d.ts +7 -1
- package/dist/server.js +451 -23
- package/dist/server.js.map +1 -1
- package/dist/session-log-stream.d.ts +18 -0
- package/dist/session-log-stream.js +566 -0
- package/dist/session-log-stream.js.map +1 -0
- package/dist/stdio-activity.d.ts +28 -0
- package/dist/stdio-activity.js +72 -0
- package/dist/stdio-activity.js.map +1 -0
- package/package.json +47 -5
- package/conf/adapters/gemini.json +0 -44
- package/conf/adapters/hapi/gemini.json +0 -47
- package/dist/parsers/gemini-json.d.ts +0 -2
- package/dist/parsers/gemini-json.js +0 -72
- package/dist/parsers/gemini-json.js.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The context-builder delegate signature for "the finalizer reported external
|
|
3
|
+
* evidence gaps under external_gap_policy:degrade": status "partial" WITHOUT
|
|
4
|
+
* fallback. No other path produces that pair (fallback always sets
|
|
5
|
+
* fallback_used:true; a clean run is "succeeded"), so it is the single shared
|
|
6
|
+
* definition for engine context_quality, run health, and receipt status.
|
|
7
|
+
*
|
|
8
|
+
* Deliberately narrower than workflow-runner's cache predicate
|
|
9
|
+
* (isDelegateDegradedForCache), which also refuses fallback bundles.
|
|
10
|
+
*/
|
|
11
|
+
export function isDelegateExternalGapDegrade(delegate) {
|
|
12
|
+
return delegate?.status === "partial" && delegate.fallback_used === false;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=delegate-signature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delegate-signature.js","sourceRoot":"","sources":["../src/delegate-signature.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,UAAU,4BAA4B,CAC1C,QAAoF;IAEpF,OAAO,QAAQ,EAAE,MAAM,KAAK,SAAS,IAAI,QAAQ,CAAC,aAAa,KAAK,KAAK,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PreflightContextDelegateInput } from "./context-preflight.js";
|
|
3
|
+
export declare const WorkflowDelegateSchema: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
|
|
4
|
+
enabled: z.ZodLiteral<true>;
|
|
5
|
+
curator: z.ZodObject<{
|
|
6
|
+
cli_name: z.ZodString;
|
|
7
|
+
role: z.ZodString;
|
|
8
|
+
model: z.ZodOptional<z.ZodString>;
|
|
9
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strict", z.ZodTypeAny, {
|
|
11
|
+
cli_name: string;
|
|
12
|
+
role: string;
|
|
13
|
+
model?: string | undefined;
|
|
14
|
+
effort?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
cli_name: string;
|
|
17
|
+
role: string;
|
|
18
|
+
model?: string | undefined;
|
|
19
|
+
effort?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
finalizer: z.ZodObject<{
|
|
22
|
+
cli_name: z.ZodString;
|
|
23
|
+
role: z.ZodString;
|
|
24
|
+
model: z.ZodOptional<z.ZodString>;
|
|
25
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
26
|
+
} & {
|
|
27
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
min_score: z.ZodDefault<z.ZodNumber>;
|
|
29
|
+
}, "strict", z.ZodTypeAny, {
|
|
30
|
+
cli_name: string;
|
|
31
|
+
role: string;
|
|
32
|
+
min_score: number;
|
|
33
|
+
model?: string | undefined;
|
|
34
|
+
effort?: string | undefined;
|
|
35
|
+
enabled?: boolean | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
cli_name: string;
|
|
38
|
+
role: string;
|
|
39
|
+
model?: string | undefined;
|
|
40
|
+
effort?: string | undefined;
|
|
41
|
+
enabled?: boolean | undefined;
|
|
42
|
+
min_score?: number | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
timeout_seconds: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
max_response_chars: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
failure_policy: z.ZodOptional<z.ZodEnum<["fallback", "fail"]>>;
|
|
47
|
+
external_gap_policy: z.ZodOptional<z.ZodEnum<["fail", "degrade"]>>;
|
|
48
|
+
}, "strict", z.ZodTypeAny, {
|
|
49
|
+
curator: {
|
|
50
|
+
cli_name: string;
|
|
51
|
+
role: string;
|
|
52
|
+
model?: string | undefined;
|
|
53
|
+
effort?: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
finalizer: {
|
|
56
|
+
cli_name: string;
|
|
57
|
+
role: string;
|
|
58
|
+
min_score: number;
|
|
59
|
+
model?: string | undefined;
|
|
60
|
+
effort?: string | undefined;
|
|
61
|
+
enabled?: boolean | undefined;
|
|
62
|
+
};
|
|
63
|
+
enabled: true;
|
|
64
|
+
timeout_seconds?: number | undefined;
|
|
65
|
+
max_response_chars?: number | undefined;
|
|
66
|
+
failure_policy?: "fail" | "fallback" | undefined;
|
|
67
|
+
external_gap_policy?: "fail" | "degrade" | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
curator: {
|
|
70
|
+
cli_name: string;
|
|
71
|
+
role: string;
|
|
72
|
+
model?: string | undefined;
|
|
73
|
+
effort?: string | undefined;
|
|
74
|
+
};
|
|
75
|
+
finalizer: {
|
|
76
|
+
cli_name: string;
|
|
77
|
+
role: string;
|
|
78
|
+
model?: string | undefined;
|
|
79
|
+
effort?: string | undefined;
|
|
80
|
+
enabled?: boolean | undefined;
|
|
81
|
+
min_score?: number | undefined;
|
|
82
|
+
};
|
|
83
|
+
enabled: true;
|
|
84
|
+
timeout_seconds?: number | undefined;
|
|
85
|
+
max_response_chars?: number | undefined;
|
|
86
|
+
failure_policy?: "fail" | "fallback" | undefined;
|
|
87
|
+
external_gap_policy?: "fail" | "degrade" | undefined;
|
|
88
|
+
}>, z.ZodObject<{
|
|
89
|
+
enabled: z.ZodDefault<z.ZodLiteral<false>>;
|
|
90
|
+
}, "strict", z.ZodTypeAny, {
|
|
91
|
+
enabled: false;
|
|
92
|
+
}, {
|
|
93
|
+
enabled?: false | undefined;
|
|
94
|
+
}>]>>;
|
|
95
|
+
export type WorkflowDelegateInput = z.infer<typeof WorkflowDelegateSchema>;
|
|
96
|
+
export declare class WorkflowDelegateValidationError extends Error {
|
|
97
|
+
constructor(message: string);
|
|
98
|
+
}
|
|
99
|
+
export declare function parseWorkflowDelegateInput(value: unknown): WorkflowDelegateInput;
|
|
100
|
+
/**
|
|
101
|
+
* Whether a raw (pre-parse) `cb_delegate` value — a JSON string or an object —
|
|
102
|
+
* carries an explicit `finalizer.min_score`. Parsing defaults `min_score`, so
|
|
103
|
+
* explicitness is only observable here. Any unparseable or unexpected shape is
|
|
104
|
+
* not explicit; `parseWorkflowDelegateInput` owns reporting it.
|
|
105
|
+
*/
|
|
106
|
+
export declare function delegateFinalizerMinScoreExplicit(raw: unknown): boolean;
|
|
107
|
+
export declare function isWorkflowDelegateAbsent(value: unknown): boolean;
|
|
108
|
+
export declare function asPreflightDelegateInput(delegate: WorkflowDelegateInput): PreflightContextDelegateInput;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const DELEGATE_DEFAULT_FINALIZER_MIN_SCORE = 8.5;
|
|
3
|
+
const DELEGATE_MAX_TIMEOUT_SECONDS = 600;
|
|
4
|
+
const DELEGATE_MAX_RESPONSE_CHARS = 200_000;
|
|
5
|
+
const NonBlankStringSchema = z.string().trim().min(1);
|
|
6
|
+
// Keep in sync with schema.ts model regex and MODEL_OVERRIDE_PATTERN (workflow-tools.ts).
|
|
7
|
+
const ModelSchema = z
|
|
8
|
+
.string()
|
|
9
|
+
.trim()
|
|
10
|
+
.min(1)
|
|
11
|
+
.max(128)
|
|
12
|
+
.regex(/^[^\s\u0000-][^\s\u0000]*$/);
|
|
13
|
+
// Keep in sync with schema.ts effort regex and EFFORT_OVERRIDE_PATTERN (workflow-tools.ts).
|
|
14
|
+
const EffortSchema = z
|
|
15
|
+
.string()
|
|
16
|
+
.trim()
|
|
17
|
+
.min(1)
|
|
18
|
+
.max(32)
|
|
19
|
+
.regex(/^[a-z0-9][a-z0-9_-]*$/);
|
|
20
|
+
const DelegateProviderConfigSchema = z
|
|
21
|
+
.object({
|
|
22
|
+
cli_name: NonBlankStringSchema,
|
|
23
|
+
role: NonBlankStringSchema,
|
|
24
|
+
model: ModelSchema.optional(),
|
|
25
|
+
effort: EffortSchema.optional(),
|
|
26
|
+
})
|
|
27
|
+
.strict();
|
|
28
|
+
const DelegateFinalizerConfigSchema = DelegateProviderConfigSchema.extend({
|
|
29
|
+
enabled: z.boolean().optional(),
|
|
30
|
+
min_score: z
|
|
31
|
+
.number()
|
|
32
|
+
.min(0)
|
|
33
|
+
.max(10)
|
|
34
|
+
.default(DELEGATE_DEFAULT_FINALIZER_MIN_SCORE),
|
|
35
|
+
}).strict();
|
|
36
|
+
const DisabledDelegateSchema = z
|
|
37
|
+
.object({
|
|
38
|
+
enabled: z.literal(false).default(false),
|
|
39
|
+
})
|
|
40
|
+
.strict();
|
|
41
|
+
const EnabledDelegateSchema = z
|
|
42
|
+
.object({
|
|
43
|
+
enabled: z.literal(true),
|
|
44
|
+
curator: DelegateProviderConfigSchema,
|
|
45
|
+
finalizer: DelegateFinalizerConfigSchema,
|
|
46
|
+
timeout_seconds: z
|
|
47
|
+
.number()
|
|
48
|
+
.int()
|
|
49
|
+
.min(1)
|
|
50
|
+
.max(DELEGATE_MAX_TIMEOUT_SECONDS)
|
|
51
|
+
.optional(),
|
|
52
|
+
max_response_chars: z
|
|
53
|
+
.number()
|
|
54
|
+
.int()
|
|
55
|
+
.positive()
|
|
56
|
+
.max(DELEGATE_MAX_RESPONSE_CHARS)
|
|
57
|
+
.optional(),
|
|
58
|
+
failure_policy: z.enum(["fallback", "fail"]).optional(),
|
|
59
|
+
external_gap_policy: z.enum(["fail", "degrade"]).optional(),
|
|
60
|
+
})
|
|
61
|
+
.strict();
|
|
62
|
+
export const WorkflowDelegateSchema = z
|
|
63
|
+
.union([EnabledDelegateSchema, DisabledDelegateSchema])
|
|
64
|
+
.default({ enabled: false });
|
|
65
|
+
export class WorkflowDelegateValidationError extends Error {
|
|
66
|
+
constructor(message) {
|
|
67
|
+
super(message);
|
|
68
|
+
this.name = "WorkflowDelegateValidationError";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export function parseWorkflowDelegateInput(value) {
|
|
72
|
+
const parsedJson = parseDelegateJsonIfNeeded(value);
|
|
73
|
+
const result = WorkflowDelegateSchema.safeParse(parsedJson);
|
|
74
|
+
if (!result.success) {
|
|
75
|
+
throw new WorkflowDelegateValidationError(`Invalid cb_delegate: ${result.error.issues.map((issue) => issue.message).join("; ")}`);
|
|
76
|
+
}
|
|
77
|
+
return result.data;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Whether a raw (pre-parse) `cb_delegate` value — a JSON string or an object —
|
|
81
|
+
* carries an explicit `finalizer.min_score`. Parsing defaults `min_score`, so
|
|
82
|
+
* explicitness is only observable here. Any unparseable or unexpected shape is
|
|
83
|
+
* not explicit; `parseWorkflowDelegateInput` owns reporting it.
|
|
84
|
+
*/
|
|
85
|
+
export function delegateFinalizerMinScoreExplicit(raw) {
|
|
86
|
+
let value = raw;
|
|
87
|
+
if (typeof raw === "string") {
|
|
88
|
+
try {
|
|
89
|
+
value = JSON.parse(raw);
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const finalizer = ownPlainProperty(value, "finalizer");
|
|
96
|
+
return ownPlainProperty(finalizer, "min_score") !== undefined;
|
|
97
|
+
}
|
|
98
|
+
function ownPlainProperty(value, key) {
|
|
99
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
return Object.hasOwn(value, key)
|
|
103
|
+
? value[key]
|
|
104
|
+
: undefined;
|
|
105
|
+
}
|
|
106
|
+
export function isWorkflowDelegateAbsent(value) {
|
|
107
|
+
return value == null || (typeof value === "string" && value.trim() === "");
|
|
108
|
+
}
|
|
109
|
+
function parseDelegateJsonIfNeeded(value) {
|
|
110
|
+
if (typeof value !== "string") {
|
|
111
|
+
return value;
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
return JSON.parse(value);
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
throw new WorkflowDelegateValidationError(`cb_delegate must be a valid JSON string: ${error instanceof Error ? error.message : String(error)}`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
export function asPreflightDelegateInput(delegate) {
|
|
121
|
+
if (delegate.enabled !== true) {
|
|
122
|
+
return { enabled: false };
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
enabled: true,
|
|
126
|
+
curator: {
|
|
127
|
+
cli_name: delegate.curator.cli_name,
|
|
128
|
+
role: delegate.curator.role,
|
|
129
|
+
...(delegate.curator.model === undefined ? {} : { model: delegate.curator.model }),
|
|
130
|
+
...(delegate.curator.effort === undefined ? {} : { effort: delegate.curator.effort }),
|
|
131
|
+
},
|
|
132
|
+
finalizer: {
|
|
133
|
+
cli_name: delegate.finalizer.cli_name,
|
|
134
|
+
role: delegate.finalizer.role,
|
|
135
|
+
...(delegate.finalizer.enabled === undefined ? {} : { enabled: delegate.finalizer.enabled }),
|
|
136
|
+
min_score: delegate.finalizer.min_score,
|
|
137
|
+
...(delegate.finalizer.model === undefined ? {} : { model: delegate.finalizer.model }),
|
|
138
|
+
...(delegate.finalizer.effort === undefined ? {} : { effort: delegate.finalizer.effort }),
|
|
139
|
+
},
|
|
140
|
+
...(delegate.timeout_seconds === undefined ? {} : { timeout_seconds: delegate.timeout_seconds }),
|
|
141
|
+
...(delegate.max_response_chars === undefined ? {} : { max_response_chars: delegate.max_response_chars }),
|
|
142
|
+
...(delegate.failure_policy === undefined ? {} : { failure_policy: delegate.failure_policy }),
|
|
143
|
+
...(delegate.external_gap_policy === undefined
|
|
144
|
+
? {}
|
|
145
|
+
: { external_gap_policy: delegate.external_gap_policy }),
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=delegate-validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delegate-validate.js","s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
import type { NormalizedWorkflowDefinition } from "./definition-normalizer.js";
|
|
66
|
+
import type { PlanReviewCallBinding } from "./plan-review/run-state.js";
|
|
67
|
+
import { type CouncilPlanReviewError } from "./plan-review/publication.js";
|
|
66
68
|
import { type ChildFailureMetadata } from "./errors.js";
|
|
67
69
|
import { type FidelityReport } from "./fidelity.js";
|
|
68
70
|
import type { CallState, FailureClass, RunStatus } from "./state-schema.js";
|
|
71
|
+
import type { InvocationAuditWrite, ObservedInvocationV1 } from "./dashboard/invocation-contract.js";
|
|
69
72
|
import type { ClinkBackend } from "./backend.js";
|
|
70
73
|
import type { ValidatorRegistry } from "./validators/index.js";
|
|
71
74
|
import { type ArtifactRecord } from "./artifacts.js";
|
|
75
|
+
import type { PlanReviewContextPolicy, PlanReviewContextProvenance } from "./plan-review/run-state.js";
|
|
76
|
+
import type { ContextBuilderMetricsShape, ContextBuilderRunner, LightCallerProvenance, PreflightContextResult, WorkflowContext } from "./context-preflight.js";
|
|
77
|
+
import { type WorkflowContextPolicy, type WorkflowContextRequestedMode, type WorkflowContextEffectiveMode } from "./context-mode-resolver.js";
|
|
78
|
+
/**
|
|
79
|
+
* Maps a runner's {@link PreflightContextResult} to the persisted {@link WorkflowContext}.
|
|
80
|
+
* Single source of truth for this mapping: the transient `receipt` field is dropped, and
|
|
81
|
+
* optional `delegate` metadata is spread only when present.
|
|
82
|
+
*/
|
|
83
|
+
export declare function mapPreflightResultToWorkflowContext(result: PreflightContextResult, contextMode?: WorkflowContextEffectiveMode | undefined, lightCaller?: LightCallerProvenance | undefined): WorkflowContext;
|
|
84
|
+
export type PreflightPartialClassification = {
|
|
85
|
+
readonly severity: "benign" | "degraded";
|
|
86
|
+
readonly partial_reason: "omissions_only" | "cap_or_truncation";
|
|
87
|
+
};
|
|
88
|
+
export declare function classifyPreflightPartial(metrics: ContextBuilderMetricsShape): PreflightPartialClassification;
|
|
72
89
|
export interface ExecutedCall {
|
|
73
90
|
readonly stageId: string;
|
|
74
91
|
readonly callId: string;
|
|
@@ -96,7 +113,9 @@ export interface EngineResumeState {
|
|
|
96
113
|
readonly stageId: string;
|
|
97
114
|
readonly callId: string;
|
|
98
115
|
readonly error: string;
|
|
116
|
+
readonly terminal: boolean;
|
|
99
117
|
}> | undefined;
|
|
118
|
+
readonly nextRetryCounts?: ReadonlyMap<string, number> | undefined;
|
|
100
119
|
}
|
|
101
120
|
type HookResult = Promise<void> | void;
|
|
102
121
|
export interface EngineRunStateChange {
|
|
@@ -107,6 +126,7 @@ export interface EngineRunStateChange {
|
|
|
107
126
|
readonly completedAt?: string | undefined;
|
|
108
127
|
readonly error?: string | undefined;
|
|
109
128
|
readonly failureClass?: FailureClass | undefined;
|
|
129
|
+
readonly planReviewError?: CouncilPlanReviewError | undefined;
|
|
110
130
|
}
|
|
111
131
|
export interface EngineCallPreparedEvent {
|
|
112
132
|
readonly runId: string;
|
|
@@ -117,6 +137,8 @@ export interface EngineCallPreparedEvent {
|
|
|
117
137
|
readonly retryCount: number;
|
|
118
138
|
readonly contextProducing: boolean;
|
|
119
139
|
readonly input: Readonly<Record<string, unknown>>;
|
|
140
|
+
/** Root-injected model/effort audit. Omitted when no derive hook is wired. */
|
|
141
|
+
readonly invocation?: InvocationAuditWrite | undefined;
|
|
120
142
|
}
|
|
121
143
|
export interface EngineCallStateChange {
|
|
122
144
|
readonly runId: string;
|
|
@@ -135,6 +157,14 @@ export interface EngineCallStateChange {
|
|
|
135
157
|
readonly fidelity?: FidelityReport | undefined;
|
|
136
158
|
readonly artifact?: ArtifactRecord | undefined;
|
|
137
159
|
readonly childDebugMetadata?: ChildFailureMetadata | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* Runtime-observed model/effort knobs from the child `_debug` block.
|
|
162
|
+
* Attached only on the terminal succeeded emit today: the failed path
|
|
163
|
+
* carries childDebugMetadata, whose ChildFailureMetadata shape has no
|
|
164
|
+
* observed_invocation field, so failed events omit it. Never attached on
|
|
165
|
+
* running events or intermediate retry failures. Telemetry-only.
|
|
166
|
+
*/
|
|
167
|
+
readonly observedInvocation?: ObservedInvocationV1 | undefined;
|
|
138
168
|
}
|
|
139
169
|
export interface EngineRetryEvent {
|
|
140
170
|
readonly runId: string;
|
|
@@ -167,12 +197,20 @@ export interface EngineHooks {
|
|
|
167
197
|
readonly onRetryScheduled?: ((event: EngineRetryEvent) => HookResult) | undefined;
|
|
168
198
|
readonly onProgress?: ((event: EngineProgressEvent) => HookResult) | undefined;
|
|
169
199
|
}
|
|
200
|
+
export type EngineTerminalResultPolicy = {
|
|
201
|
+
readonly kind: "final_call";
|
|
202
|
+
} | {
|
|
203
|
+
readonly kind: "plan_review_artifacts";
|
|
204
|
+
readonly project: () => Promise<string>;
|
|
205
|
+
};
|
|
170
206
|
export interface WorkflowEngineOptions {
|
|
171
207
|
readonly definition: NormalizedWorkflowDefinition;
|
|
172
208
|
readonly session: ClinkBackend;
|
|
173
209
|
readonly variables: Readonly<Record<string, unknown>>;
|
|
174
210
|
readonly validatorRegistry: ValidatorRegistry;
|
|
175
211
|
readonly runId: string;
|
|
212
|
+
/** Portable generation used only for session-log journal ownership. */
|
|
213
|
+
readonly sessionLogGeneration?: string | undefined;
|
|
176
214
|
readonly runDir: string;
|
|
177
215
|
readonly signal?: AbortSignal | undefined;
|
|
178
216
|
readonly maxParallel?: number | undefined;
|
|
@@ -182,13 +220,66 @@ export interface WorkflowEngineOptions {
|
|
|
182
220
|
readonly allowedRoots?: readonly string[] | undefined;
|
|
183
221
|
readonly hooks?: EngineHooks | undefined;
|
|
184
222
|
readonly resume?: EngineResumeState | undefined;
|
|
223
|
+
readonly contextBuilderRunner?: ContextBuilderRunner | undefined;
|
|
224
|
+
readonly contextDefault?: WorkflowContextRequestedMode | undefined;
|
|
225
|
+
readonly defaultCurator?: string | undefined;
|
|
226
|
+
readonly commitPreflightContext?: ((input: {
|
|
227
|
+
readonly variables: Readonly<Record<string, unknown>>;
|
|
228
|
+
readonly workflow_context: WorkflowContext;
|
|
229
|
+
}) => Promise<void>) | undefined;
|
|
230
|
+
/** Persisted workflow_context is the sole resume proof that preflight committed. */
|
|
231
|
+
readonly restoredWorkflowContext?: WorkflowContext | undefined;
|
|
232
|
+
/** Fail closed when resumed context is absent and an enabled mode has no runner. */
|
|
233
|
+
readonly requireContextPreflight?: boolean | undefined;
|
|
234
|
+
/** Admission-time policy replayed unchanged across execution and resume. */
|
|
235
|
+
readonly initialContextPolicy?: WorkflowContextPolicy | undefined;
|
|
236
|
+
/**
|
|
237
|
+
* Non-overridable plan-review context policy (A-7). Present only for
|
|
238
|
+
* `plan-review-receipts` runs. When set, the enforced exclusions are folded
|
|
239
|
+
* into the curator's input BEFORE dispatch and the finalized selection is
|
|
240
|
+
* post-filtered — the caller cannot re-admit the plan via globs or focus.
|
|
241
|
+
*/
|
|
242
|
+
readonly planReviewContextPolicy?: PlanReviewContextPolicy | undefined;
|
|
243
|
+
/** Verified call bindings persisted by plan-review admission and resume. */
|
|
244
|
+
readonly planReviewCallBindings?: readonly PlanReviewCallBinding[] | undefined;
|
|
245
|
+
/**
|
|
246
|
+
* Canonical text of the verified plan snapshot (A-6/D9). Set on resume, where
|
|
247
|
+
* a persisted prepared retry replays its prompt verbatim and `buildCallInput`
|
|
248
|
+
* never re-runs the expander — this is what that prompt is checked against.
|
|
249
|
+
* Omitting it while a bound call has a persisted prepared input fails closed.
|
|
250
|
+
*/
|
|
251
|
+
readonly planReviewSnapshotText?: string | undefined;
|
|
252
|
+
/** Records that the policy was enforced, for resume replay (A-7). */
|
|
253
|
+
readonly commitPlanReviewContextProvenance?: ((provenance: PlanReviewContextProvenance) => Promise<void>) | undefined;
|
|
254
|
+
/** Narrow opt-in terminal projection. All existing workflows use final_call. */
|
|
255
|
+
readonly terminalResultPolicy?: EngineTerminalResultPolicy | undefined;
|
|
256
|
+
/**
|
|
257
|
+
* Optional root-injected model/effort provenance audit. The engine has no
|
|
258
|
+
* adapter registry and cannot derive `adapter_pin` itself. Standalone
|
|
259
|
+
* servers omit this; prepared events then carry no `invocation`.
|
|
260
|
+
*/
|
|
261
|
+
readonly deriveInvocationAudit?: (cliName: string, role: string, knobs: {
|
|
262
|
+
model?: string;
|
|
263
|
+
effort?: string;
|
|
264
|
+
}) => InvocationAuditWrite;
|
|
185
265
|
}
|
|
266
|
+
/**
|
|
267
|
+
* The allowed roots a workflow engine derives for itself when the caller supplies
|
|
268
|
+
* none. Exported so admission-time path checks can validate against the SAME set
|
|
269
|
+
* the engine will enforce at dispatch, rather than re-deriving a near-copy.
|
|
270
|
+
*
|
|
271
|
+
* Note this set is engine-owned: `CLINKX_ALLOWED_ROOTS` is not consulted and
|
|
272
|
+
* cannot widen it.
|
|
273
|
+
*/
|
|
274
|
+
export declare function defaultWorkflowAllowedRoots(runDir: string): readonly string[];
|
|
186
275
|
export declare class WorkflowEngine {
|
|
187
276
|
private readonly definition;
|
|
188
277
|
private readonly session;
|
|
189
278
|
private readonly variables;
|
|
279
|
+
private effectiveVariables;
|
|
190
280
|
private readonly validatorRegistry;
|
|
191
281
|
private readonly runId;
|
|
282
|
+
private readonly sessionLogGeneration;
|
|
192
283
|
private readonly runDir;
|
|
193
284
|
private readonly signal;
|
|
194
285
|
private readonly queueDepth;
|
|
@@ -199,22 +290,182 @@ export declare class WorkflowEngine {
|
|
|
199
290
|
private readonly resumeCompletedCalls;
|
|
200
291
|
private readonly resumePreparedInputs;
|
|
201
292
|
private readonly resumeFailedCalls;
|
|
293
|
+
private readonly resumeNextRetryCounts;
|
|
202
294
|
private readonly contextProducingCalls;
|
|
295
|
+
private readonly planReviewDeliveredAliases;
|
|
203
296
|
private readonly artifactStore;
|
|
297
|
+
private readonly contextBuilderRunner;
|
|
298
|
+
private readonly contextDefault;
|
|
299
|
+
private readonly defaultCurator;
|
|
300
|
+
private readonly commitPreflightContext;
|
|
301
|
+
private readonly restoredWorkflowContext;
|
|
302
|
+
private readonly requireContextPreflight;
|
|
303
|
+
private readonly initialContextPolicy;
|
|
304
|
+
private readonly planReviewContextPolicy;
|
|
305
|
+
private readonly planReviewCallBindings;
|
|
306
|
+
private readonly commitPlanReviewContextProvenance;
|
|
307
|
+
private readonly terminalResultPolicy;
|
|
308
|
+
private readonly deriveInvocationAudit;
|
|
309
|
+
/**
|
|
310
|
+
* Workflow budget expiry on the MONOTONIC clock (`monotonicNowMs()`), not on
|
|
311
|
+
* the wall clock. Never compare it to `Date.now()`; read it only through
|
|
312
|
+
* `workflowRemainingMs()`.
|
|
313
|
+
*/
|
|
314
|
+
private workflowDeadlineAtMonoMs;
|
|
315
|
+
/**
|
|
316
|
+
* `stage.id`.`call.id` keys already written to a terminal state by
|
|
317
|
+
* `emitTerminalCallAbort`. A parallel stage still surfaces that throw through
|
|
318
|
+
* `materializeUnexpectedFailure`, whose emit carries no startedAt/durationMs
|
|
319
|
+
* and attempt 1 / retryCount 0 — persisted unconditionally, it would erase the
|
|
320
|
+
* terminal entry's timing. Bounded by the run's call count.
|
|
321
|
+
*/
|
|
322
|
+
private readonly terminalizedCallKeys;
|
|
204
323
|
constructor(options: WorkflowEngineOptions);
|
|
205
324
|
execute(): Promise<WorkflowExecutionResult>;
|
|
325
|
+
/**
|
|
326
|
+
* Resume-path entry point. `execute()` is never called on the resume preflight
|
|
327
|
+
* engine, so without this the deadline is never installed and the
|
|
328
|
+
* curator/finalizer delegate runs unbounded. Installs the SAME fresh full
|
|
329
|
+
* `timeout_seconds` budget a resumed run gets (D1), runs preflight under it,
|
|
330
|
+
* and always tears it down.
|
|
331
|
+
*/
|
|
332
|
+
prepareContextPreflightWithDeadline(): Promise<void>;
|
|
333
|
+
/**
|
|
334
|
+
* Complete the workflow context gate without dispatching a provider call.
|
|
335
|
+
* Resume uses this before backend construction when workflow_context is absent.
|
|
336
|
+
*/
|
|
337
|
+
prepareContextPreflight(signal: AbortSignal): Promise<void>;
|
|
338
|
+
private resolveTerminalResult;
|
|
206
339
|
private executeParallelStage;
|
|
207
340
|
private executeSequentialStage;
|
|
208
341
|
private executeSingleCall;
|
|
342
|
+
/**
|
|
343
|
+
* Terminalize a call that is about to be abandoned by a throw rather than
|
|
344
|
+
* by the retry loop's own failure path.
|
|
345
|
+
*
|
|
346
|
+
* Both abort/deadline exits from executeSingleCall leave the loop OUTSIDE
|
|
347
|
+
* the attempt `try`, so without this the persisted entry is stranded as
|
|
348
|
+
* "running" with no completedAt — a durable lie that resume, the dashboard
|
|
349
|
+
* and run health all read. The caller still rethrows: this only records the
|
|
350
|
+
* outcome, it never swallows it.
|
|
351
|
+
*/
|
|
352
|
+
private emitTerminalCallAbort;
|
|
353
|
+
/**
|
|
354
|
+
* F4: bounded corrective suffix for the next already-scheduled retry after
|
|
355
|
+
* a JSON/schema-shaped failure. Returns undefined (no suffix) unless ALL of:
|
|
356
|
+
* - the call declares a JSON contract (mirrors the expect_json derivation
|
|
357
|
+
* in buildCallInput);
|
|
358
|
+
* - the run is NOT typed plan review (identity: the plan-review-receipts
|
|
359
|
+
* workflow name on the
|
|
360
|
+
* normalized definition, plus the plan-review runtime signals as
|
|
361
|
+
* defense-in-depth — plan-review dispatch bytes are pinned);
|
|
362
|
+
* - the failure is JSON/schema-shaped (SchemaValidationError,
|
|
363
|
+
* OutputSizeError as the second correctable class, or a child
|
|
364
|
+
* invalid_json_output rejection);
|
|
365
|
+
* - appending stays inside the same prompt-budget ceiling the dispatch-time
|
|
366
|
+
* gate enforces (best-effort re-estimate; skip with a warn on overflow or
|
|
367
|
+
* estimator failure — never a new failure mode).
|
|
368
|
+
* The suffix is always derived from the ORIGINAL prompt, so it can never
|
|
369
|
+
* stack across attempts, and it is never persisted to state.
|
|
370
|
+
*/
|
|
371
|
+
/**
|
|
372
|
+
* Typed plan review (identity: the plan-review-receipts workflow name, plus
|
|
373
|
+
* the plan-review runtime signals as defense-in-depth). Its dispatch bytes
|
|
374
|
+
* and retry behavior are pinned, so no corrective machinery may touch it.
|
|
375
|
+
*/
|
|
376
|
+
private isTypedPlanReviewCall;
|
|
377
|
+
/**
|
|
378
|
+
* D7: under retry.mode "transport_only" a malformed-JSON answer is a
|
|
379
|
+
* permanent failure, so it would never be retried. A JSON-contract call gets
|
|
380
|
+
* ONE corrective attempt when the failure is primarily JSON-shaped; a
|
|
381
|
+
* secondary-only invalid_json_output reason never creates eligibility.
|
|
382
|
+
* failureClass is not reclassified.
|
|
383
|
+
*/
|
|
384
|
+
private isCorrectiveRetryEligible;
|
|
385
|
+
private buildCorrectiveRetrySuffix;
|
|
209
386
|
private invokeCall;
|
|
387
|
+
private computeDispatchDeadline;
|
|
388
|
+
private prepareDispatchInput;
|
|
210
389
|
private maybeWriteArtifact;
|
|
211
390
|
private resolveDynamicPaths;
|
|
391
|
+
private resolveDynamicPathVariable;
|
|
392
|
+
private setEffectiveVariable;
|
|
393
|
+
/**
|
|
394
|
+
* Derive the engine-computed `context_available` template variable after
|
|
395
|
+
* context-builder preflight has had a chance to append to
|
|
396
|
+
* `context_bundle_files`. True when the union of the effective
|
|
397
|
+
* `context_files` and `context_bundle_files` path lists is non-empty.
|
|
398
|
+
* Stored as the STRING "true"/"false" since the template engine stringifies
|
|
399
|
+
* variable values. Engine-derived; setting it is expected.
|
|
400
|
+
*/
|
|
401
|
+
private deriveContextAvailable;
|
|
402
|
+
/**
|
|
403
|
+
* Build the citation allowlist for a post-processor run: the union of files
|
|
404
|
+
* parsed from the `diff_context` variable, the resolved `context_files`, the
|
|
405
|
+
* resolved `context_bundle_files`, and the source files selected by any
|
|
406
|
+
* curated context-builder bundle among them. Both full paths and basenames
|
|
407
|
+
* are stored so citation matching is lenient.
|
|
408
|
+
*
|
|
409
|
+
* A curated preflight copies only `bundle.md` and `manifest.json` into
|
|
410
|
+
* `context_bundle_files`, so without the manifest's `selected_context`
|
|
411
|
+
* every citation to a real source file would be stripped. Reading from the
|
|
412
|
+
* (persisted) variable keeps this working on resume.
|
|
413
|
+
*/
|
|
414
|
+
private buildPostProcessorAllowlist;
|
|
415
|
+
/**
|
|
416
|
+
* Add each `selected_context` entry of a context-builder manifest to the
|
|
417
|
+
* allowlist: its root-relative `path` and, when its root resolves, the
|
|
418
|
+
* absolute form. The allowlist is advisory, so an unreadable, oversized
|
|
419
|
+
* (> 8 MiB), non-JSON, or non-context-builder manifest is skipped silently
|
|
420
|
+
* and malformed entries are ignored.
|
|
421
|
+
*/
|
|
422
|
+
private addCuratedBundleSelections;
|
|
423
|
+
/**
|
|
424
|
+
* Resolve a path-list variable to absolute paths without enforcing allowed
|
|
425
|
+
* roots (the post-processor allowlist is advisory, not a security boundary).
|
|
426
|
+
* Both the raw and resolved forms are returned so basename matching works
|
|
427
|
+
* regardless of how a citation spells the file.
|
|
428
|
+
*/
|
|
429
|
+
private resolvePathListLenient;
|
|
430
|
+
private runContextBuilderPreflight;
|
|
431
|
+
/**
|
|
432
|
+
* Strip every force-excluded plan path from the effective context path
|
|
433
|
+
* variables (A-7). Idempotent and safe to call on any path — no policy means
|
|
434
|
+
* no-op, so non-plan-review runs are byte-unchanged.
|
|
435
|
+
*
|
|
436
|
+
* Returns the paths that were removed, for provenance.
|
|
437
|
+
*/
|
|
438
|
+
private enforcePlanReviewContextExclusions;
|
|
439
|
+
private buildWorkflowContext;
|
|
440
|
+
private resolveContextPolicy;
|
|
441
|
+
private readOptionalStringVariable;
|
|
442
|
+
private readOptionalNumberVariable;
|
|
443
|
+
private readOptionalBooleanVariable;
|
|
444
|
+
private readStringArrayVariable;
|
|
212
445
|
private createDeadlineController;
|
|
446
|
+
/** Remaining workflow budget in ms; undefined when no deadline is installed. */
|
|
447
|
+
private workflowRemainingMs;
|
|
448
|
+
/**
|
|
449
|
+
* True only while a workflow deadline is set AND already past. Pure: reads
|
|
450
|
+
* the deadline the running `execute()` installed and the clock, nothing else.
|
|
451
|
+
* `execute()` clears `workflowDeadlineAtMonoMs` in its `finally`, so this can
|
|
452
|
+
* never report a stale deadline from a prior run. The reading is monotonic:
|
|
453
|
+
* a wall-clock step (NTP correction, suspend/resume, manual change) can
|
|
454
|
+
* neither manufacture nor erase an exhausted budget.
|
|
455
|
+
*/
|
|
456
|
+
private isWorkflowDeadlineExhausted;
|
|
213
457
|
private throwIfAborted;
|
|
214
458
|
private validateFinalStage;
|
|
215
459
|
private validateAdvertisedCliNames;
|
|
216
460
|
private defaultAllowedRoots;
|
|
461
|
+
private recordPlanReviewDeliveredAliases;
|
|
217
462
|
private buildCallInput;
|
|
463
|
+
/**
|
|
464
|
+
* Derive a per-call invocation audit from the materialized input.
|
|
465
|
+
* Uses the dispatched cli_name/role (plan-review bindings may rewrite
|
|
466
|
+
* cli_name on resume) and never mutates `input`.
|
|
467
|
+
*/
|
|
468
|
+
private maybeInvocationAudit;
|
|
218
469
|
private materializeUnexpectedFailure;
|
|
219
470
|
private emitRunStateChange;
|
|
220
471
|
private emitCallPrepared;
|