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,69 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { InvocationAuditReadSchema, InvocationAuditV1Schema, } from "./invocation-contract.js";
|
|
3
|
+
import { validateContextBuilderOperationId } from "../context-builder-lifecycle-contract.js";
|
|
4
|
+
export const CONTEXT_BUILDER_INVOCATION_AUDIT_FILENAME = "invocation-audit.json";
|
|
5
|
+
export const WORKFLOW_CONTEXT_PREFLIGHT_SNAPSHOT_DIRECTORY = ".context-preflight";
|
|
6
|
+
export const MAX_CONTEXT_BUILDER_INVOCATION_AUDIT_BYTES = 8 * 1_024;
|
|
7
|
+
export const CONTEXT_BUILDER_INVOCATION_AUDIT_V1_SCHEMA_VERSION = "context-builder-invocation-audit-v1";
|
|
8
|
+
export const CONTEXT_BUILDER_INVOCATION_AUDIT_V2_SCHEMA_VERSION = "context-builder-invocation-audit-v2";
|
|
9
|
+
/** Exact decoder for already-persisted sidecars. */
|
|
10
|
+
export const ContextBuilderInvocationAuditV1Schema = z.object({
|
|
11
|
+
schema_version: z.literal(CONTEXT_BUILDER_INVOCATION_AUDIT_V1_SCHEMA_VERSION),
|
|
12
|
+
curator: InvocationAuditV1Schema.optional(),
|
|
13
|
+
finalizer: InvocationAuditV1Schema.optional(),
|
|
14
|
+
}).strict();
|
|
15
|
+
/**
|
|
16
|
+
* Canonical new sidecar. Seat-level read unions permit a writer to promote an
|
|
17
|
+
* existing V1 document without rewriting or inventing its already-recorded
|
|
18
|
+
* audit. The sidecar remains separate from manifests and receipts.
|
|
19
|
+
*/
|
|
20
|
+
export const ContextBuilderInvocationAuditV2Schema = z.object({
|
|
21
|
+
schema_version: z.literal(CONTEXT_BUILDER_INVOCATION_AUDIT_V2_SCHEMA_VERSION),
|
|
22
|
+
curator: InvocationAuditReadSchema.optional(),
|
|
23
|
+
finalizer: InvocationAuditReadSchema.optional(),
|
|
24
|
+
}).strict();
|
|
25
|
+
export const ContextBuilderInvocationAuditReadSchema = z.union([
|
|
26
|
+
ContextBuilderInvocationAuditV2Schema,
|
|
27
|
+
ContextBuilderInvocationAuditV1Schema,
|
|
28
|
+
]);
|
|
29
|
+
/**
|
|
30
|
+
* Decode persisted audit bytes without repairing malformed UTF-8. Keeping the
|
|
31
|
+
* BOM as data preserves the prior JSON rejection behavior, while the explicit
|
|
32
|
+
* roundtrip makes byte-preserving promotion and snapshot publication provable.
|
|
33
|
+
*/
|
|
34
|
+
export function decodeContextBuilderInvocationAuditBytes(bytes) {
|
|
35
|
+
let serialized;
|
|
36
|
+
try {
|
|
37
|
+
serialized = new TextDecoder("utf-8", {
|
|
38
|
+
fatal: true,
|
|
39
|
+
ignoreBOM: true,
|
|
40
|
+
}).decode(bytes);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
throw new SyntaxError("context builder invocation audit is not valid UTF-8");
|
|
44
|
+
}
|
|
45
|
+
if (!Buffer.from(serialized, "utf8").equals(Buffer.from(bytes))) {
|
|
46
|
+
throw new SyntaxError("context builder invocation audit changed during UTF-8 decoding");
|
|
47
|
+
}
|
|
48
|
+
const parsed = JSON.parse(serialized);
|
|
49
|
+
return {
|
|
50
|
+
document: ContextBuilderInvocationAuditReadSchema.parse(parsed),
|
|
51
|
+
serialized,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export function workflowContextBuilderInvocationAuditRelativePath(contextRunId) {
|
|
55
|
+
return `${WORKFLOW_CONTEXT_PREFLIGHT_SNAPSHOT_DIRECTORY}/${validateContextBuilderOperationId(contextRunId)}/${CONTEXT_BUILDER_INVOCATION_AUDIT_FILENAME}`;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Encode canonical V2 bytes and enforce the same cap used by contained-file
|
|
59
|
+
* readers. Callers decide whether an over-cap write is best-effort or fatal.
|
|
60
|
+
*/
|
|
61
|
+
export function serializeContextBuilderInvocationAuditV2(document) {
|
|
62
|
+
const serialized = `${JSON.stringify(ContextBuilderInvocationAuditV2Schema.parse(document))}\n`;
|
|
63
|
+
if (Buffer.byteLength(serialized, "utf8") >
|
|
64
|
+
MAX_CONTEXT_BUILDER_INVOCATION_AUDIT_BYTES) {
|
|
65
|
+
throw new RangeError("context builder invocation audit exceeds 8 KiB");
|
|
66
|
+
}
|
|
67
|
+
return serialized;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=context-builder-invocation-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-builder-invocation-contract.js","sourceRoot":"","sources":["../../src/dashboard/context-builder-invocation-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,0CAA0C,CAAC;AAE7F,MAAM,CAAC,MAAM,yCAAyC,GACpD,uBAAgC,CAAC;AACnC,MAAM,CAAC,MAAM,6CAA6C,GACxD,oBAA6B,CAAC;AAChC,MAAM,CAAC,MAAM,0CAA0C,GAAG,CAAC,GAAG,KAAK,CAAC;AAEpE,MAAM,CAAC,MAAM,kDAAkD,GAC7D,qCAA8C,CAAC;AACjD,MAAM,CAAC,MAAM,kDAAkD,GAC7D,qCAA8C,CAAC;AAEjD,oDAAoD;AACpD,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,cAAc,EAAE,CAAC,CAAC,OAAO,CACvB,kDAAkD,CACnD;IACD,OAAO,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IAC3C,SAAS,EAAE,uBAAuB,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ;;;;GAIG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,cAAc,EAAE,CAAC,CAAC,OAAO,CACvB,kDAAkD,CACnD;IACD,OAAO,EAAE,yBAAyB,CAAC,QAAQ,EAAE;IAC7C,SAAS,EAAE,yBAAyB,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAAC;IAC7D,qCAAqC;IACrC,qCAAqC;CACtC,CAAC,CAAC;AAYH;;;;GAIG;AACH,MAAM,UAAU,wCAAwC,CACtD,KAAiB;IAKjB,IAAI,UAAkB,CAAC;IACvB,IAAI,CAAC;QACH,UAAU,GAAG,IAAI,WAAW,CAAC,OAAO,EAAE;YACpC,KAAK,EAAE,IAAI;YACX,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,WAAW,CAAC,qDAAqD,CAAC,CAAC;IAC/E,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,WAAW,CAAC,gEAAgE,CAAC,CAAC;IAC1F,CAAC;IAED,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC/C,OAAO;QACL,QAAQ,EAAE,uCAAuC,CAAC,KAAK,CAAC,MAAM,CAAC;QAC/D,UAAU;KACX,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iDAAiD,CAC/D,YAAoB;IAEpB,OAAO,GAAG,6CAA6C,IAAI,iCAAiC,CAC1F,YAAY,CACb,IAAI,yCAAyC,EAAE,CAAC;AACnD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wCAAwC,CACtD,QAAyC;IAEzC,MAAM,UAAU,GAAG,GAAG,IAAI,CAAC,SAAS,CAClC,qCAAqC,CAAC,KAAK,CAAC,QAAQ,CAAC,CACtD,IAAI,CAAC;IACN,IACE,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC;QACnC,0CAA0C,EAC5C,CAAC;QACD,MAAM,IAAI,UAAU,CAAC,gDAAgD,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ContextBuilderLifecyclePhase, type ContextBuilderLifecycleStatus } from "../context-builder-lifecycle-contract.js";
|
|
2
|
+
/**
|
|
3
|
+
* Write-like phases have no long-running subprocess. Matches the producer
|
|
4
|
+
* mutation-lock stale window (`CONTEXT_BUILDER_STALE_MUTATION_LOCK_MS` in
|
|
5
|
+
* `src/context-builder/storage.ts`) — duplicated here because the dashboard
|
|
6
|
+
* package does not import the producer.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CONTEXT_RUN_WRITE_STALE_AFTER_MS: number;
|
|
9
|
+
/** Any other active phase uses the contract duration ceiling. */
|
|
10
|
+
export declare const CONTEXT_RUN_ACTIVE_STALE_AFTER_MS = 86400000;
|
|
11
|
+
export type ContextRunLiveness = "live" | "orphaned" | "unknown";
|
|
12
|
+
export type ContextRunLivenessOverlay = Readonly<{
|
|
13
|
+
orphaned: boolean;
|
|
14
|
+
liveness: ContextRunLiveness;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Read-time liveness overlay. Never persist the result.
|
|
18
|
+
*
|
|
19
|
+
* Terminal / missing lifecycle → `unknown` (never death). Active
|
|
20
|
+
* (`pending`/`running`) with a missing or unparseable `updatedAt` → `unknown`.
|
|
21
|
+
* Active with a parseable `updatedAt` uses a phase-aware age: write-like
|
|
22
|
+
* phases stale after 10 minutes, every other active phase after 24h. A
|
|
23
|
+
* producer clock slightly ahead (negative age) stays `live`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function classifyContextRunLiveness(input: Readonly<{
|
|
26
|
+
status?: ContextBuilderLifecycleStatus | null;
|
|
27
|
+
phase?: ContextBuilderLifecyclePhase | null;
|
|
28
|
+
updatedAt?: string | null;
|
|
29
|
+
nowMs: number;
|
|
30
|
+
}>): ContextRunLivenessOverlay;
|
|
31
|
+
export declare function isContextRunLivePin(row: Readonly<{
|
|
32
|
+
orphaned?: boolean;
|
|
33
|
+
liveness?: ContextRunLiveness;
|
|
34
|
+
lifecycle?: Readonly<{
|
|
35
|
+
status: string;
|
|
36
|
+
}> | null;
|
|
37
|
+
}>): boolean;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { MAX_CONTEXT_BUILDER_LIFECYCLE_DURATION_MS, } from "../context-builder-lifecycle-contract.js";
|
|
2
|
+
/**
|
|
3
|
+
* Write-like phases have no long-running subprocess. Matches the producer
|
|
4
|
+
* mutation-lock stale window (`CONTEXT_BUILDER_STALE_MUTATION_LOCK_MS` in
|
|
5
|
+
* `src/context-builder/storage.ts`) — duplicated here because the dashboard
|
|
6
|
+
* package does not import the producer.
|
|
7
|
+
*/
|
|
8
|
+
export const CONTEXT_RUN_WRITE_STALE_AFTER_MS = 10 * 60 * 1_000;
|
|
9
|
+
/** Any other active phase uses the contract duration ceiling. */
|
|
10
|
+
export const CONTEXT_RUN_ACTIVE_STALE_AFTER_MS = MAX_CONTEXT_BUILDER_LIFECYCLE_DURATION_MS;
|
|
11
|
+
const WRITE_LIKE_PHASES = new Set([
|
|
12
|
+
"writing",
|
|
13
|
+
"committing",
|
|
14
|
+
"materializing",
|
|
15
|
+
]);
|
|
16
|
+
/**
|
|
17
|
+
* Read-time liveness overlay. Never persist the result.
|
|
18
|
+
*
|
|
19
|
+
* Terminal / missing lifecycle → `unknown` (never death). Active
|
|
20
|
+
* (`pending`/`running`) with a missing or unparseable `updatedAt` → `unknown`.
|
|
21
|
+
* Active with a parseable `updatedAt` uses a phase-aware age: write-like
|
|
22
|
+
* phases stale after 10 minutes, every other active phase after 24h. A
|
|
23
|
+
* producer clock slightly ahead (negative age) stays `live`.
|
|
24
|
+
*/
|
|
25
|
+
export function classifyContextRunLiveness(input) {
|
|
26
|
+
if (input.status !== "pending" && input.status !== "running") {
|
|
27
|
+
return { orphaned: false, liveness: "unknown" };
|
|
28
|
+
}
|
|
29
|
+
if (input.updatedAt == null) {
|
|
30
|
+
return { orphaned: false, liveness: "unknown" };
|
|
31
|
+
}
|
|
32
|
+
const updatedMs = Date.parse(input.updatedAt);
|
|
33
|
+
if (!Number.isFinite(updatedMs)) {
|
|
34
|
+
return { orphaned: false, liveness: "unknown" };
|
|
35
|
+
}
|
|
36
|
+
const thresholdMs = input.phase != null && WRITE_LIKE_PHASES.has(input.phase)
|
|
37
|
+
? CONTEXT_RUN_WRITE_STALE_AFTER_MS
|
|
38
|
+
: CONTEXT_RUN_ACTIVE_STALE_AFTER_MS;
|
|
39
|
+
if (input.nowMs - updatedMs <= thresholdMs) {
|
|
40
|
+
return { orphaned: false, liveness: "live" };
|
|
41
|
+
}
|
|
42
|
+
return { orphaned: true, liveness: "orphaned" };
|
|
43
|
+
}
|
|
44
|
+
export function isContextRunLivePin(row) {
|
|
45
|
+
const status = row.lifecycle?.status;
|
|
46
|
+
return ((status === "pending" || status === "running") &&
|
|
47
|
+
row.liveness === "live");
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=context-run-liveness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-run-liveness.js","sourceRoot":"","sources":["../../src/dashboard/context-run-liveness.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yCAAyC,GAG1C,MAAM,0CAA0C,CAAC;AAElD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;AAEhE,iEAAiE;AACjE,MAAM,CAAC,MAAM,iCAAiC,GAC5C,yCAAyC,CAAC;AAE5C,MAAM,iBAAiB,GAA8C,IAAI,GAAG,CAAC;IAC3E,SAAS;IACT,YAAY;IACZ,eAAe;CAChB,CAAC,CAAC;AASH;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAKzC;IACA,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC7D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClD,CAAC;IACD,IAAI,KAAK,CAAC,SAAS,IAAI,IAAI,EAAE,CAAC;QAC5B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClD,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC9C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAChC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClD,CAAC;IACD,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,IAAI,IAAI,IAAI,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;QAC3E,CAAC,CAAC,gCAAgC;QAClC,CAAC,CAAC,iCAAiC,CAAC;IACtC,IAAI,KAAK,CAAC,KAAK,GAAG,SAAS,IAAI,WAAW,EAAE,CAAC;QAC3C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC/C,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAIlC;IACA,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC;IACrC,OAAO,CACL,CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,CAAC;QAC9C,GAAG,CAAC,QAAQ,KAAK,MAAM,CACxB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded dashboard reader for the standalone / refine Context Run journal.
|
|
3
|
+
*
|
|
4
|
+
* This module enumerates and directly resolves stable row identities without
|
|
5
|
+
* exposing raw lifecycle state or manifest content.
|
|
6
|
+
*
|
|
7
|
+
* Two sources feed one projected row type:
|
|
8
|
+
* 1. `.context-runs/<contextRunId>/state.json` — authoritative live/terminal
|
|
9
|
+
* H0 lifecycle snapshots written by the producer journal. Validated back
|
|
10
|
+
* through the frozen schema; malformed rows are dropped.
|
|
11
|
+
* 2. Historical artifact run directories carrying `manifest.json` — a
|
|
12
|
+
* terminal lifecycle row is SYNTHESIZED from the manifest for the exact
|
|
13
|
+
* legacy 7-key and current 8-key artifact shapes; a 9-key (or larger)
|
|
14
|
+
* manifest is surfaced as `compatibility: "legacy_unsupported"` with no
|
|
15
|
+
* fabricated detail.
|
|
16
|
+
*
|
|
17
|
+
* Safety invariants:
|
|
18
|
+
* - Every read goes through {@link readContainedRelativeFile} (no-follow,
|
|
19
|
+
* containment-checked, size-capped). Symlinked entries and traversal names
|
|
20
|
+
* are skipped or rejected.
|
|
21
|
+
* - Workflow-owned records (`wfpre*` / `wfctx*`) are excluded from both
|
|
22
|
+
* sources.
|
|
23
|
+
* - Only safe scalar/enum/numeric fields are projected. Tasks, raw context,
|
|
24
|
+
* full manifests, provider output, raw error strings, and arbitrary JSON are
|
|
25
|
+
* NEVER read into a row. The single, deliberate path carve-out is the
|
|
26
|
+
* top-level project-folder root: `roots[].path` is projected verbatim into
|
|
27
|
+
* `ContextRunRow.projectFolders` (historical_manifest rows only) so the
|
|
28
|
+
* detail page can show the folder the run was created for. Selected-context
|
|
29
|
+
* file paths, task text, and all other manifest content stay private.
|
|
30
|
+
*
|
|
31
|
+
* Carve-out — bounded artifact-body reads (`readArtifact`): the invariant above
|
|
32
|
+
* applies to projected ROWS, which stay scalar-only. `readArtifact` is a
|
|
33
|
+
* separate, opt-in side channel that serves a single artifact file body
|
|
34
|
+
* (e.g. `bundle.md`) for an already-resolved run identity. It is allowlisted to
|
|
35
|
+
* the fixed artifact-key set, size-capped at the manifest ceiling, generation-
|
|
36
|
+
* pinned, and goes through the same no-follow containment read as rows. It does
|
|
37
|
+
* not enrich rows and is reached only via the dedicated HTTP route, never inline
|
|
38
|
+
* in list/detail projection.
|
|
39
|
+
*/
|
|
40
|
+
import { type FileHandle } from "node:fs/promises";
|
|
41
|
+
import { type ContextBuilderLifecycleStateV1, type ContextBuilderOperationKind } from "../context-builder-lifecycle-contract.js";
|
|
42
|
+
import { readContainedRelativeFile, type ContainedFileFingerprint, type OpenedDescriptorPathVerifier } from "../contained-file.js";
|
|
43
|
+
import { type ContextBuilderInvocationAuditRead } from "./context-builder-invocation-contract.js";
|
|
44
|
+
import { type ContextRunLiveness } from "./context-run-liveness.js";
|
|
45
|
+
/**
|
|
46
|
+
* Artifact key → on-disk filename. Duplicated from the producer
|
|
47
|
+
* (`src/context-builder/storage.ts`) by convention — the dashboard package does
|
|
48
|
+
* not import the producer. A parity test pins this copy to the producer export.
|
|
49
|
+
* `manifest_json` lives at `<runDir>/manifest.json`; every other key lives at
|
|
50
|
+
* `<runDir>/artifacts/<filename>` (see producer `resolveContextBuilderRunPaths`).
|
|
51
|
+
*/
|
|
52
|
+
export declare const CONTEXT_RUN_ARTIFACT_FILE_NAMES: Readonly<{
|
|
53
|
+
readonly manifest_json: "manifest.json";
|
|
54
|
+
readonly bundle_md: "bundle.md";
|
|
55
|
+
readonly selected_context_jsonl: "selected-context.jsonl";
|
|
56
|
+
readonly tree_json: "tree.json";
|
|
57
|
+
readonly search_jsonl: "search.jsonl";
|
|
58
|
+
readonly slices_jsonl: "slices.jsonl";
|
|
59
|
+
readonly codemap_jsonl: "codemap.jsonl";
|
|
60
|
+
readonly summary_json: "summary.json";
|
|
61
|
+
}>;
|
|
62
|
+
export type ContextRunArtifactKey = keyof typeof CONTEXT_RUN_ARTIFACT_FILE_NAMES;
|
|
63
|
+
export declare const CONTEXT_RUN_ARTIFACT_KEYS: readonly ContextRunArtifactKey[];
|
|
64
|
+
export declare const DEFAULT_CONTEXT_RUN_READER_MAX_ROWS = 500;
|
|
65
|
+
export declare const DEFAULT_CONTEXT_RUN_READER_MAX_DIR_ENTRIES = 5000;
|
|
66
|
+
export declare const DEFAULT_CONTEXT_RUN_READER_MAX_STATE_BYTES: number;
|
|
67
|
+
export declare const DEFAULT_CONTEXT_RUN_READER_MAX_MANIFEST_BYTES: number;
|
|
68
|
+
/**
|
|
69
|
+
* Per-artifact-body cap for {@link readArtifact}. Sized above the producer's
|
|
70
|
+
* `max_total_bytes` ceiling (5_000_000, src/context-builder/schema.ts) so a
|
|
71
|
+
* producer-legal `bundle.md` / `selected-context.jsonl` is served rather than
|
|
72
|
+
* 413'd, while still bounding the body endpoint. Distinct from the manifest
|
|
73
|
+
* cap so each can move independently.
|
|
74
|
+
*/
|
|
75
|
+
export declare const DEFAULT_CONTEXT_RUN_READER_MAX_ARTIFACT_BYTES: number;
|
|
76
|
+
export type ContextRunSource = "journal" | "historical_manifest";
|
|
77
|
+
export type ContextRunCompatibility = "current" | "legacy_synthesized" | "legacy_unsupported";
|
|
78
|
+
export interface ContextRunCounts {
|
|
79
|
+
readonly filesSeen: number;
|
|
80
|
+
readonly filesConsidered: number;
|
|
81
|
+
readonly filesSelected: number;
|
|
82
|
+
readonly filesOmitted: number;
|
|
83
|
+
readonly searchResults: number;
|
|
84
|
+
readonly bytesRead: number;
|
|
85
|
+
readonly bytesWritten: number;
|
|
86
|
+
}
|
|
87
|
+
export interface ContextRunCoverage {
|
|
88
|
+
readonly policy: ContextBuilderLifecycleStateV1["coverage"]["policy"];
|
|
89
|
+
readonly status: ContextBuilderLifecycleStateV1["coverage"]["status"];
|
|
90
|
+
readonly required: number;
|
|
91
|
+
readonly selected: number;
|
|
92
|
+
readonly missing: number;
|
|
93
|
+
}
|
|
94
|
+
export interface ContextRunLifecycleProjection {
|
|
95
|
+
readonly status: ContextBuilderLifecycleStateV1["status"];
|
|
96
|
+
readonly phase: ContextBuilderLifecycleStateV1["phase"];
|
|
97
|
+
readonly createdAt: string | null;
|
|
98
|
+
readonly updatedAt: string | null;
|
|
99
|
+
readonly startedAt: string | null;
|
|
100
|
+
readonly completedAt: string | null;
|
|
101
|
+
readonly durationMs: number | null;
|
|
102
|
+
readonly curator: {
|
|
103
|
+
readonly status: ContextBuilderLifecycleStateV1["curator"]["execution_status"];
|
|
104
|
+
readonly score: number | null;
|
|
105
|
+
};
|
|
106
|
+
readonly finalizer: {
|
|
107
|
+
readonly status: ContextBuilderLifecycleStateV1["finalizer"]["execution_status"];
|
|
108
|
+
readonly score: number | null;
|
|
109
|
+
};
|
|
110
|
+
readonly cache: {
|
|
111
|
+
readonly lookup: ContextBuilderLifecycleStateV1["cache"]["lookup"];
|
|
112
|
+
readonly write: ContextBuilderLifecycleStateV1["cache"]["write"];
|
|
113
|
+
};
|
|
114
|
+
readonly fallback: {
|
|
115
|
+
readonly status: ContextBuilderLifecycleStateV1["fallback"]["status"];
|
|
116
|
+
};
|
|
117
|
+
readonly counts: ContextRunCounts;
|
|
118
|
+
readonly coverage: ContextRunCoverage;
|
|
119
|
+
readonly reasonCodes: ContextBuilderLifecycleStateV1["reason_codes"];
|
|
120
|
+
readonly artifactRunId: string | null;
|
|
121
|
+
}
|
|
122
|
+
export interface ContextRunRow {
|
|
123
|
+
/** Operation ID for journal rows; artifact run_id for historical rows. */
|
|
124
|
+
readonly id: string;
|
|
125
|
+
/** Opaque identity for the current source-directory incarnation. */
|
|
126
|
+
readonly contextGeneration: string;
|
|
127
|
+
readonly source: ContextRunSource;
|
|
128
|
+
readonly compatibility: ContextRunCompatibility;
|
|
129
|
+
readonly operationKind: ContextBuilderOperationKind;
|
|
130
|
+
/** Null only when the shape is `legacy_unsupported`. */
|
|
131
|
+
readonly lifecycle: ContextRunLifecycleProjection | null;
|
|
132
|
+
/**
|
|
133
|
+
* Project folder(s) the context run operated on, from the manifest
|
|
134
|
+
* `roots[].path`. A narrow, deliberate exception to the "no paths in a row"
|
|
135
|
+
* rule: historical_manifest rows carry the persisted roots verbatim, while
|
|
136
|
+
* journal (`current`) rows report `[]` (their lifecycle state lives apart
|
|
137
|
+
* from the manifest and reading it per detail fetch is not worth the cost).
|
|
138
|
+
*/
|
|
139
|
+
readonly projectFolders: readonly string[];
|
|
140
|
+
/**
|
|
141
|
+
* Read-time overlay. Never persisted. Terminal / unsupported rows are
|
|
142
|
+
* `liveness: "unknown"`; a stale active journal is `orphaned`.
|
|
143
|
+
*/
|
|
144
|
+
readonly orphaned: boolean;
|
|
145
|
+
readonly liveness: ContextRunLiveness;
|
|
146
|
+
}
|
|
147
|
+
export interface ContextRunInvocationAudit {
|
|
148
|
+
readonly curator?: ContextBuilderInvocationAuditRead["curator"];
|
|
149
|
+
readonly finalizer?: ContextBuilderInvocationAuditRead["finalizer"];
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Detail projection only. List rows stay the lean {@link ContextRunRow}
|
|
153
|
+
* shape and never carry `invocationAudit`.
|
|
154
|
+
*/
|
|
155
|
+
export interface ContextRunDetailRow extends ContextRunRow {
|
|
156
|
+
readonly invocationAudit?: ContextRunInvocationAudit;
|
|
157
|
+
}
|
|
158
|
+
export interface ContextBuilderInvocationAuditDependency {
|
|
159
|
+
readonly artifactRunId: string;
|
|
160
|
+
readonly contextGeneration: string;
|
|
161
|
+
readonly fingerprint: ContainedFileFingerprint;
|
|
162
|
+
}
|
|
163
|
+
export type ContextBuilderInvocationAuditArtifactResult = Readonly<{
|
|
164
|
+
kind: "available";
|
|
165
|
+
audit: ContextBuilderInvocationAuditRead;
|
|
166
|
+
dependency: ContextBuilderInvocationAuditDependency;
|
|
167
|
+
}> | Readonly<{
|
|
168
|
+
kind: "missing";
|
|
169
|
+
}> | Readonly<{
|
|
170
|
+
kind: "context_generation_changed";
|
|
171
|
+
}> | Readonly<{
|
|
172
|
+
kind: "unavailable";
|
|
173
|
+
reason: "context_generation_race";
|
|
174
|
+
}>;
|
|
175
|
+
export interface ContextRunReadResult {
|
|
176
|
+
readonly rows: readonly ContextRunRow[];
|
|
177
|
+
/** A directory / row cap was hit; the listing is not exhaustive. */
|
|
178
|
+
readonly truncated: boolean;
|
|
179
|
+
}
|
|
180
|
+
export interface ContextRunReaderOptions {
|
|
181
|
+
readonly runsDir: string;
|
|
182
|
+
readonly maxRows?: number;
|
|
183
|
+
readonly maxDirEntries?: number;
|
|
184
|
+
readonly maxStateBytes?: number;
|
|
185
|
+
readonly maxManifestBytes?: number;
|
|
186
|
+
readonly maxArtifactBytes?: number;
|
|
187
|
+
}
|
|
188
|
+
export type ContextRunDetailResult = Readonly<{
|
|
189
|
+
kind: "available";
|
|
190
|
+
row: ContextRunDetailRow;
|
|
191
|
+
}> | Readonly<{
|
|
192
|
+
kind: "missing";
|
|
193
|
+
}> | Readonly<{
|
|
194
|
+
kind: "context_generation_changed";
|
|
195
|
+
}> | Readonly<{
|
|
196
|
+
kind: "unavailable";
|
|
197
|
+
reason: "context_generation_race";
|
|
198
|
+
}>;
|
|
199
|
+
/**
|
|
200
|
+
* Result of a bounded artifact-body read. The `artifactRunId` is the directory
|
|
201
|
+
* the body was actually read from (the journal row's linked artifact run, or the
|
|
202
|
+
* historical row's own id); callers re-confirm via readDetail to close a
|
|
203
|
+
* journal-state-swap TOCTOU. `contextGeneration` is the generation pinned to the
|
|
204
|
+
* artifact directory at read time.
|
|
205
|
+
*/
|
|
206
|
+
export type ContextRunArtifactResult = Readonly<{
|
|
207
|
+
kind: "available";
|
|
208
|
+
content: string;
|
|
209
|
+
artifactRunId: string;
|
|
210
|
+
contextGeneration: string;
|
|
211
|
+
}> | Readonly<{
|
|
212
|
+
kind: "missing";
|
|
213
|
+
}> | Readonly<{
|
|
214
|
+
kind: "context_generation_changed";
|
|
215
|
+
}> | Readonly<{
|
|
216
|
+
kind: "content_too_large";
|
|
217
|
+
}> | Readonly<{
|
|
218
|
+
kind: "unavailable";
|
|
219
|
+
reason: "context_generation_race";
|
|
220
|
+
}>;
|
|
221
|
+
export interface ContextRunReader {
|
|
222
|
+
readonly list: (options: ContextRunReaderOptions) => Promise<ContextRunReadResult>;
|
|
223
|
+
readonly readDetail: (options: ContextRunReaderOptions, id: string, contextGeneration?: string) => Promise<ContextRunDetailResult>;
|
|
224
|
+
readonly readArtifact: (options: ContextRunReaderOptions, id: string, artifactKey: ContextRunArtifactKey, contextGeneration?: string) => Promise<ContextRunArtifactResult>;
|
|
225
|
+
/**
|
|
226
|
+
* Detail-only bridge for a lifecycle-validated artifact identity. This does
|
|
227
|
+
* not enumerate or admit the artifact as a Context Run row.
|
|
228
|
+
*/
|
|
229
|
+
readonly readInvocationAuditArtifact?: (options: ContextRunReaderOptions, artifactRunId: string, contextGeneration?: string) => Promise<ContextBuilderInvocationAuditArtifactResult>;
|
|
230
|
+
}
|
|
231
|
+
interface ContextRunAuthorityFileSystem {
|
|
232
|
+
readonly open: (path: string, flags: number) => Promise<FileHandle>;
|
|
233
|
+
readonly realpath: (path: string) => Promise<string>;
|
|
234
|
+
}
|
|
235
|
+
export interface ContextRunReaderAuthorityOptions {
|
|
236
|
+
readonly fileSystem?: ContextRunAuthorityFileSystem | undefined;
|
|
237
|
+
readonly descriptorPathVerifier?: OpenedDescriptorPathVerifier | undefined;
|
|
238
|
+
readonly readContainedFile?: typeof readContainedRelativeFile | undefined;
|
|
239
|
+
/** Deterministic race-injection seam; never used by production callers. */
|
|
240
|
+
readonly beforeCommitVerification?: ((identity: Readonly<{
|
|
241
|
+
id: string;
|
|
242
|
+
source: ContextRunSource;
|
|
243
|
+
}>) => void | Promise<void>) | undefined;
|
|
244
|
+
/** Injectable clock for the read-time liveness overlay. */
|
|
245
|
+
readonly now?: () => Date;
|
|
246
|
+
}
|
|
247
|
+
export declare class ContextRunSourceUnavailableError extends Error {
|
|
248
|
+
constructor();
|
|
249
|
+
}
|
|
250
|
+
export declare function createContextRunReader(options?: ContextRunReaderAuthorityOptions): ContextRunReader;
|
|
251
|
+
export declare function readContextRuns(options: ContextRunReaderOptions): Promise<ContextRunReadResult>;
|
|
252
|
+
export declare function readContextRunArtifact(options: ContextRunReaderOptions, id: string, artifactKey: ContextRunArtifactKey, contextGeneration?: string): Promise<ContextRunArtifactResult>;
|
|
253
|
+
/** Resolve one stable row identity directly, independent of list limits/order. */
|
|
254
|
+
export declare function readContextRun(options: ContextRunReaderOptions, id: string, contextGeneration?: string): Promise<ContextRunDetailResult>;
|
|
255
|
+
export declare function projectContextRunLifecycleState(state: ContextBuilderLifecycleStateV1): ContextRunLifecycleProjection;
|
|
256
|
+
export {};
|