clinkx 0.3.0 → 1.0.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 +33 -0
- package/LICENSE +10 -0
- package/README.md +82 -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/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 +2 -1
- package/clinkx-workflows/dist/clink-client.js +17 -4
- package/clinkx-workflows/dist/clink-client.js.map +1 -1
- package/clinkx-workflows/dist/config.d.ts +145 -16
- package/clinkx-workflows/dist/config.js +384 -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 +184 -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-expander.d.ts +1 -1
- package/clinkx-workflows/dist/council-expander.js +2 -1
- package/clinkx-workflows/dist/council-expander.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/activity-contract.d.ts +165 -0
- package/clinkx-workflows/dist/dashboard/activity-contract.js +105 -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 +86 -0
- package/clinkx-workflows/dist/dashboard/activity-reader.js +480 -0
- package/clinkx-workflows/dist/dashboard/activity-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/api-routes.d.ts +36 -0
- package/clinkx-workflows/dist/dashboard/api-routes.js +1047 -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-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 +222 -0
- package/clinkx-workflows/dist/dashboard/context-run-reader.js +1178 -0
- package/clinkx-workflows/dist/dashboard/context-run-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/contracts.d.ts +8936 -0
- package/clinkx-workflows/dist/dashboard/contracts.js +1157 -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 +28 -0
- package/clinkx-workflows/dist/dashboard/index.js +16 -0
- package/clinkx-workflows/dist/dashboard/index.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/lazy-content.d.ts +101 -0
- package/clinkx-workflows/dist/dashboard/lazy-content.js +748 -0
- package/clinkx-workflows/dist/dashboard/lazy-content.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/progress-report-contract.d.ts +303 -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 +581 -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 +28 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-store.js +110 -0
- package/clinkx-workflows/dist/dashboard/progress-report-status-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 +126 -0
- package/clinkx-workflows/dist/dashboard/request-admission.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/scanner.d.ts +75 -0
- package/clinkx-workflows/dist/dashboard/scanner.js +1110 -0
- package/clinkx-workflows/dist/dashboard/scanner.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/server-factory.d.ts +50 -0
- package/clinkx-workflows/dist/dashboard/server-factory.js +431 -0
- package/clinkx-workflows/dist/dashboard/server-factory.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/session-log-contract.d.ts +2611 -0
- package/clinkx-workflows/dist/dashboard/session-log-contract.js +480 -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 +522 -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 +6 -0
- package/clinkx-workflows/dist/dashboard/session-log-redaction.js +367 -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-DOkMXTfB.js +25 -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-ChJsn0KD.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-validate.d.ts +78 -0
- package/clinkx-workflows/dist/delegate-validate.js +97 -0
- package/clinkx-workflows/dist/delegate-validate.js.map +1 -0
- package/clinkx-workflows/dist/engine.d.ts +141 -0
- package/clinkx-workflows/dist/engine.js +882 -28
- package/clinkx-workflows/dist/engine.js.map +1 -1
- package/clinkx-workflows/dist/errors.d.ts +2 -0
- package/clinkx-workflows/dist/errors.js.map +1 -1
- package/clinkx-workflows/dist/fingerprint.d.ts +1 -1
- package/clinkx-workflows/dist/fingerprint.js +1 -1
- package/clinkx-workflows/dist/index.d.ts +19 -0
- package/clinkx-workflows/dist/index.js +15 -0
- 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/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/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 +76 -21
- package/clinkx-workflows/dist/schema.js +10 -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 +82 -52
- package/clinkx-workflows/dist/server.js.map +1 -1
- package/clinkx-workflows/dist/shutdown.d.ts +18 -20
- package/clinkx-workflows/dist/shutdown.js +43 -61
- package/clinkx-workflows/dist/shutdown.js.map +1 -1
- package/clinkx-workflows/dist/state-schema.d.ts +38 -0
- package/clinkx-workflows/dist/state.d.ts +170 -3
- package/clinkx-workflows/dist/state.js +1275 -28
- package/clinkx-workflows/dist/state.js.map +1 -1
- 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 +14 -2
- package/clinkx-workflows/dist/validators/council.d.ts +318 -85
- 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 +48 -3
- package/clinkx-workflows/dist/workflow-tools.js +1402 -59
- 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-specialist.txt +2 -1
- package/clinkx-workflows/templates/council/code-review-chairman.txt +13 -0
- package/clinkx-workflows/templates/council/code-review-cross-reviewer.txt +4 -1
- package/clinkx-workflows/templates/council/code-review-reviewer.txt +19 -3
- package/clinkx-workflows/templates/council/debug-debugger.txt +2 -1
- package/clinkx-workflows/templates/council/discover-analyst.txt +2 -1
- package/clinkx-workflows/templates/council/member.txt +2 -1
- package/clinkx-workflows/templates/council/plan-review-chairman.txt +68 -0
- package/clinkx-workflows/templates/council/plan-review-cross-reviewer.txt +51 -0
- package/clinkx-workflows/templates/council/plan-review-reviewer.txt +60 -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 +97 -8
- package/clinkx-workflows/workflows/council-code-review.yaml +103 -8
- package/clinkx-workflows/workflows/council-debug.yaml +97 -8
- package/clinkx-workflows/workflows/council-default.yaml +97 -8
- package/clinkx-workflows/workflows/council-discover.yaml +97 -8
- package/clinkx-workflows/workflows/council-plan-review.yaml +250 -0
- package/clinkx-workflows/workflows/plan-review-receipts.yaml +230 -0
- package/conf/adapters/agy.json +49 -0
- package/conf/adapters/claude.json +5 -0
- package/conf/adapters/codex-app-server.json +44 -0
- package/conf/adapters/codex.json +7 -2
- package/conf/adapters/glm.json +5 -0
- package/conf/adapters/grok.json +60 -0
- package/conf/adapters/hapi/agy.json +52 -0
- package/conf/adapters/hapi/claude.json +5 -0
- package/conf/adapters/hapi/codex.json +7 -2
- package/conf/adapters/hapi/glm.json +5 -0
- package/dist/activity-journal.d.ts +42 -0
- package/dist/activity-journal.js +381 -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 +1270 -0
- package/dist/codex/agent-tools.js.map +1 -0
- package/dist/codex/app-server-client.d.ts +76 -0
- package/dist/codex/app-server-client.js +582 -0
- package/dist/codex/app-server-client.js.map +1 -0
- package/dist/codex/app-server-registry.d.ts +389 -0
- package/dist/codex/app-server-registry.js +1407 -0
- package/dist/codex/app-server-registry.js.map +1 -0
- package/dist/codex/client-types.d.ts +109 -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 +185 -19
- package/dist/config.js +82 -16
- 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 +35 -2
- package/dist/context-builder/bundle.js +342 -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-packet.d.ts +37 -0
- package/dist/context-builder/delegate-packet.js +359 -67
- package/dist/context-builder/delegate-packet.js.map +1 -1
- package/dist/context-builder/delegate-validation.d.ts +10 -1
- package/dist/context-builder/delegate-validation.js +153 -41
- package/dist/context-builder/delegate-validation.js.map +1 -1
- package/dist/context-builder/delegate.d.ts +2 -0
- package/dist/context-builder/delegate.js +1 -0
- 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.d.ts +29 -1
- package/dist/context-builder/discovery.js +475 -175
- package/dist/context-builder/discovery.js.map +1 -1
- package/dist/context-builder/globs.js +10 -10
- package/dist/context-builder/globs.js.map +1 -1
- package/dist/context-builder/handler.d.ts +26 -2
- package/dist/context-builder/handler.js +1158 -2416
- package/dist/context-builder/handler.js.map +1 -1
- 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/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 +84 -0
- package/dist/context-builder/review-coverage.js +437 -0
- package/dist/context-builder/review-coverage.js.map +1 -0
- package/dist/context-builder/schema.d.ts +239 -1
- package/dist/context-builder/schema.js +112 -6
- package/dist/context-builder/schema.js.map +1 -1
- package/dist/context-builder/secrets.d.ts +28 -0
- package/dist/context-builder/secrets.js +1473 -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 +22 -1
- package/dist/context-builder/status.js +59 -4
- package/dist/context-builder/status.js.map +1 -1
- package/dist/context-builder/storage.d.ts +35 -2
- package/dist/context-builder/storage.js +271 -14
- 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 +29 -0
- package/dist/context-builder/versions.js +30 -0
- package/dist/context-builder/versions.js.map +1 -0
- package/dist/context-builder/workflow-runner.d.ts +69 -0
- package/dist/context-builder/workflow-runner.js +1051 -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 +46 -0
- package/dist/dashboard-adapter-catalog.js.map +1 -0
- package/dist/dashboard-cli.d.ts +79 -0
- package/dist/dashboard-cli.js +585 -0
- package/dist/dashboard-cli.js.map +1 -0
- package/dist/dashboard-companion/client.d.ts +36 -0
- package/dist/dashboard-companion/client.js +210 -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 +455 -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 +11 -0
- package/dist/dashboard-gateway/index.js +755 -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 +10 -1
- package/dist/handler.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +13 -3
- 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/package-info.d.ts +2 -0
- package/dist/package-info.js +18 -0
- package/dist/package-info.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 +11 -3
- package/dist/parsers/extract.js.map +1 -1
- package/dist/pipeline.d.ts +4 -0
- package/dist/pipeline.js +129 -8
- package/dist/pipeline.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 +13 -0
- package/dist/runner.js +184 -15
- package/dist/runner.js.map +1 -1
- package/dist/safety.d.ts +4 -4
- package/dist/safety.js +4 -4
- package/dist/schema.d.ts +7 -7
- package/dist/server.d.ts +1 -0
- package/dist/server.js +359 -17
- package/dist/server.js.map +1 -1
- package/dist/session-log-stream.d.ts +18 -0
- package/dist/session-log-stream.js +319 -0
- package/dist/session-log-stream.js.map +1 -0
- package/package.json +46 -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,348 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Citation check post-processor.
|
|
3
|
+
*
|
|
4
|
+
* Deterministically filters citation "evidence" in code-review schema outputs
|
|
5
|
+
* down to files that actually exist in the review's allowlist (the union of
|
|
6
|
+
* diff-touched files, caller-provided context_files, and curated
|
|
7
|
+
* context_bundle_files). Unverifiable evidence is dropped; findings are never
|
|
8
|
+
* deleted — when a finding's only support was unverifiable its confidence is
|
|
9
|
+
* capped so it cannot masquerade as high-confidence.
|
|
10
|
+
*
|
|
11
|
+
* Pure and side-effect free: operates on a deep clone of the input.
|
|
12
|
+
*/
|
|
13
|
+
import { basename } from "node:path";
|
|
14
|
+
/** Confidence ceiling applied to findings/refs whose citations don't verify. */
|
|
15
|
+
const UNVERIFIED_CONFIDENCE_CAP = 50;
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// Allowlist construction
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
/**
|
|
20
|
+
* Add a path and its basename to the allowlist so matching is lenient
|
|
21
|
+
* (a citation may reference either the repo-relative path or the bare file).
|
|
22
|
+
*/
|
|
23
|
+
export function addPathWithBasename(set, p) {
|
|
24
|
+
if (typeof p !== "string" || p.length === 0) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
set.add(p);
|
|
28
|
+
set.add(basename(p));
|
|
29
|
+
}
|
|
30
|
+
/** Strip a unified-diff `a/` or `b/` path prefix. */
|
|
31
|
+
function stripDiffPrefix(token) {
|
|
32
|
+
if (token.startsWith("a/") || token.startsWith("b/")) {
|
|
33
|
+
return token.slice(2);
|
|
34
|
+
}
|
|
35
|
+
return token;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Parse a unified diff string into an allowlist of touched files (full path
|
|
39
|
+
* plus basename for each). Recognizes `diff --git a/x b/x`, `+++ b/x`, and
|
|
40
|
+
* `--- a/x` header lines. `/dev/null` sentinels are excluded.
|
|
41
|
+
*/
|
|
42
|
+
export function buildAllowlistFromDiff(diff) {
|
|
43
|
+
const set = new Set();
|
|
44
|
+
if (typeof diff !== "string" || diff.length === 0) {
|
|
45
|
+
return set;
|
|
46
|
+
}
|
|
47
|
+
for (const line of diff.split(/\r?\n/)) {
|
|
48
|
+
if (line.startsWith("diff --git ")) {
|
|
49
|
+
const rest = line.slice("diff --git ".length).trim();
|
|
50
|
+
for (const token of rest.split(/\s+/)) {
|
|
51
|
+
addPathWithBasename(set, stripDiffPrefix(token));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
else if (line.startsWith("+++ ") || line.startsWith("--- ")) {
|
|
55
|
+
addPathWithBasename(set, stripDiffPrefix(line.slice(4).trim()));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
set.delete("/dev/null");
|
|
59
|
+
set.delete("null");
|
|
60
|
+
return set;
|
|
61
|
+
}
|
|
62
|
+
// ---------------------------------------------------------------------------
|
|
63
|
+
// Matching helpers
|
|
64
|
+
// ---------------------------------------------------------------------------
|
|
65
|
+
function isRecord(value) {
|
|
66
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
67
|
+
}
|
|
68
|
+
/** Extract the file portion of a `path` or `path:line` location string. */
|
|
69
|
+
function fileFromLocation(location) {
|
|
70
|
+
if (typeof location !== "string" || location.length === 0) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
const colon = location.indexOf(":");
|
|
74
|
+
const file = colon === -1 ? location : location.slice(0, colon);
|
|
75
|
+
return file.length > 0 ? file : undefined;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* True when `shorter` is a separator-aware path-suffix of `longer` (or equal):
|
|
79
|
+
* `src/foo.ts` is a suffix of `/abs/src/foo.ts` (the latter ends with `/` +
|
|
80
|
+
* the former). Handles both `/` and `\` separators. Used to recognize that the
|
|
81
|
+
* relative and absolute forms of the SAME file are not two distinct files.
|
|
82
|
+
*/
|
|
83
|
+
function isPathSuffix(longer, shorter) {
|
|
84
|
+
if (longer === shorter) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
if (longer.length <= shorter.length || !longer.endsWith(shorter)) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
const boundary = longer[longer.length - shorter.length - 1];
|
|
91
|
+
return boundary === "/" || boundary === "\\";
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Count, per basename, how many DISTINCT FILE IDENTITIES in the allowlist share
|
|
95
|
+
* that basename.
|
|
96
|
+
*
|
|
97
|
+
* The allowlist is a flat Set mixing full repo-relative paths AND bare
|
|
98
|
+
* basenames (see {@link addPathWithBasename}). To decide whether a basename
|
|
99
|
+
* match is *unambiguous* we only consider path-bearing entries — i.e. entries
|
|
100
|
+
* that contain a path separator. (A bare-basename entry carries no directory
|
|
101
|
+
* information, so it cannot disambiguate one directory from another.)
|
|
102
|
+
*
|
|
103
|
+
* Crucially, the engine's `resolvePathListLenient` adds BOTH the raw-relative
|
|
104
|
+
* and the resolved-absolute form of each context file, so one real file yields
|
|
105
|
+
* two string-distinct entries (`src/foo.ts` and `/abs/.../src/foo.ts`) that
|
|
106
|
+
* share a basename. Counting those as 2 would wrongly mark a legitimate
|
|
107
|
+
* bare-basename citation as ambiguous. So within each basename group we collapse
|
|
108
|
+
* entries where one path is a separator-aware suffix of another (the same file
|
|
109
|
+
* in two forms) and count only the resulting distinct identities. Two genuinely
|
|
110
|
+
* different files (`src/a/foo.ts`, `src/b/foo.ts`) are not suffixes of each
|
|
111
|
+
* other, so they remain count 2 — correctly ambiguous.
|
|
112
|
+
*
|
|
113
|
+
* When a basename maps to two-or-more distinct identities it is ambiguous, so a
|
|
114
|
+
* basename-only citation is rejected; mapping to 0 or 1 is unambiguous and
|
|
115
|
+
* accepted (see {@link isAllowedFile}).
|
|
116
|
+
*
|
|
117
|
+
* Note: this is advisory defense-in-depth against fabricated LLM citations,
|
|
118
|
+
* not a security boundary.
|
|
119
|
+
*/
|
|
120
|
+
function buildBasenameMultiplicity(allowlist) {
|
|
121
|
+
// Bucket path-bearing entries by basename first, deduping exact strings.
|
|
122
|
+
const groups = new Map();
|
|
123
|
+
const seenPaths = new Set();
|
|
124
|
+
for (const entry of allowlist) {
|
|
125
|
+
// Only path-bearing entries (those with a separator) disambiguate.
|
|
126
|
+
if (!entry.includes("/") && !entry.includes("\\")) {
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
if (seenPaths.has(entry)) {
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
seenPaths.add(entry);
|
|
133
|
+
const base = basename(entry);
|
|
134
|
+
const group = groups.get(base);
|
|
135
|
+
if (group === undefined) {
|
|
136
|
+
groups.set(base, [entry]);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
group.push(entry);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// Within each (tiny) group, collapse suffix-duplicates of the same file to a
|
|
143
|
+
// single identity. O(group^2); groups are small.
|
|
144
|
+
const counts = new Map();
|
|
145
|
+
for (const [base, paths] of groups) {
|
|
146
|
+
let identities = 0;
|
|
147
|
+
for (let i = 0; i < paths.length; i++) {
|
|
148
|
+
const candidate = paths[i];
|
|
149
|
+
let collapsed = false;
|
|
150
|
+
for (let j = 0; j < paths.length; j++) {
|
|
151
|
+
if (i === j) {
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
const other = paths[j];
|
|
155
|
+
// `candidate` collapses into `other` when `candidate` is a suffix of the
|
|
156
|
+
// strictly longer `other` (so each same-file pair is counted exactly
|
|
157
|
+
// once, via its longest/absolute form).
|
|
158
|
+
if (other.length > candidate.length && isPathSuffix(other, candidate)) {
|
|
159
|
+
collapsed = true;
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (!collapsed) {
|
|
164
|
+
identities++;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
counts.set(base, identities);
|
|
168
|
+
}
|
|
169
|
+
return counts;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* A file citation is verified when:
|
|
173
|
+
* - it carries a directory component and exactly matches a full-path allowlist
|
|
174
|
+
* entry; OR
|
|
175
|
+
* - it is a bare basename present in the allowlist whose basename is
|
|
176
|
+
* unambiguous (fewer than two distinct full paths share it).
|
|
177
|
+
*
|
|
178
|
+
* The basename fallback is deliberately conservative: common filenames
|
|
179
|
+
* (index.ts, schema.ts, handler.ts) collide across directories, so a
|
|
180
|
+
* directory-qualified citation that does not match a full path is NOT downgraded
|
|
181
|
+
* to a basename match — this stops a fabricated `src/unrelated/schema.ts` from
|
|
182
|
+
* riding on an unrelated `schema.ts` already in the allowlist. Advisory
|
|
183
|
+
* defense-in-depth, not a security boundary.
|
|
184
|
+
*/
|
|
185
|
+
function isAllowedFile(file, allowlist, basenameMultiplicity) {
|
|
186
|
+
const base = basename(file);
|
|
187
|
+
// Citation carries a directory component: require an exact full-path match.
|
|
188
|
+
// Do NOT fall back to a basename match — a citation that was specific about a
|
|
189
|
+
// directory that isn't allowed (e.g. a fabricated `src/unrelated/schema.ts`)
|
|
190
|
+
// must not ride on an allowed `src/other/schema.ts`. Note we cannot rely on
|
|
191
|
+
// `allowlist.has(file)` alone for the bare case because the allowlist also
|
|
192
|
+
// stores bare basenames (see addPathWithBasename), so a bare-basename
|
|
193
|
+
// citation would always "match" without the multiplicity gate below.
|
|
194
|
+
if (file !== base) {
|
|
195
|
+
return allowlist.has(file);
|
|
196
|
+
}
|
|
197
|
+
// Bare-basename citation: accept only when that basename is present AND
|
|
198
|
+
// unambiguous. Ambiguity means TWO OR MORE distinct full paths share the
|
|
199
|
+
// basename — only then could the bare citation point at the wrong file.
|
|
200
|
+
// Multiplicity 0 (the entry exists only as a bare basename / a root-level
|
|
201
|
+
// file with no directory variants) or 1 is unambiguous and accepted; >=2 is
|
|
202
|
+
// rejected.
|
|
203
|
+
if (!allowlist.has(base)) {
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
return (basenameMultiplicity.get(base) ?? 0) < 2;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Cap a finding/ref's confidence to {@link UNVERIFIED_CONFIDENCE_CAP} because
|
|
210
|
+
* its citation did not verify. Confidence is OPTIONAL in the schema, so:
|
|
211
|
+
* - if it is already a number, lower it to the cap (never raised);
|
|
212
|
+
* - if it is absent / non-numeric, SET it to the cap so every unverifiable
|
|
213
|
+
* finding carries an explicit low-confidence signal.
|
|
214
|
+
* Mutates the (deep-cloned) record in place; never deletes the finding/ref.
|
|
215
|
+
*/
|
|
216
|
+
function capUnverifiedConfidence(record) {
|
|
217
|
+
const existing = record["confidence"];
|
|
218
|
+
const numeric = typeof existing === "number" ? existing : undefined;
|
|
219
|
+
record["confidence"] = Math.min(numeric ?? UNVERIFIED_CONFIDENCE_CAP, UNVERIFIED_CONFIDENCE_CAP);
|
|
220
|
+
}
|
|
221
|
+
/** An evidence entry is verifiable iff its `.location` file is in the allowlist. */
|
|
222
|
+
function isAllowedEvidence(entry, allowlist, basenameMultiplicity) {
|
|
223
|
+
const file = fileFromLocation(isRecord(entry) ? entry["location"] : undefined);
|
|
224
|
+
if (file === undefined) {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
return isAllowedFile(file, allowlist, basenameMultiplicity);
|
|
228
|
+
}
|
|
229
|
+
// ---------------------------------------------------------------------------
|
|
230
|
+
// Schema walks
|
|
231
|
+
// ---------------------------------------------------------------------------
|
|
232
|
+
/**
|
|
233
|
+
* Reviewer schema: validate `<key>[].file` and filter `<key>[].evidence[]`
|
|
234
|
+
* against the allowlist. Confidence is capped/set to {@link UNVERIFIED_CONFIDENCE_CAP}
|
|
235
|
+
* when EITHER the finding's top-level `file` is set but not allowed (a fabricated
|
|
236
|
+
* primary file — mirrors {@link processRefs} semantics), OR the finding had
|
|
237
|
+
* evidence that was entirely filtered out. Because confidence is OPTIONAL, an
|
|
238
|
+
* unverified finding that OMITS confidence gets it SET to the cap so it can't
|
|
239
|
+
* masquerade as unscored/high-confidence (see {@link capUnverifiedConfidence}).
|
|
240
|
+
* Never remove the finding itself.
|
|
241
|
+
*/
|
|
242
|
+
function processReviewerFindings(root, key, allowlist, basenameMultiplicity) {
|
|
243
|
+
const findings = root[key];
|
|
244
|
+
if (!Array.isArray(findings)) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
for (const finding of findings) {
|
|
248
|
+
if (!isRecord(finding)) {
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
// Top-level `file` validation (mirrors processRefs). A fabricated primary
|
|
252
|
+
// file caps confidence even when the finding carries no evidence, or carries
|
|
253
|
+
// valid evidence pointing at a *different* allowed file.
|
|
254
|
+
const file = finding["file"];
|
|
255
|
+
const fileUnverified = typeof file === "string" &&
|
|
256
|
+
file.length > 0 &&
|
|
257
|
+
!isAllowedFile(file, allowlist, basenameMultiplicity);
|
|
258
|
+
let evidenceUnverified = false;
|
|
259
|
+
const evidence = finding["evidence"];
|
|
260
|
+
if (Array.isArray(evidence)) {
|
|
261
|
+
const hadEvidence = evidence.length > 0;
|
|
262
|
+
const kept = evidence.filter((entry) => isAllowedEvidence(entry, allowlist, basenameMultiplicity));
|
|
263
|
+
finding["evidence"] = kept;
|
|
264
|
+
evidenceUnverified = hadEvidence && kept.length === 0;
|
|
265
|
+
}
|
|
266
|
+
if (fileUnverified || evidenceUnverified) {
|
|
267
|
+
capUnverifiedConfidence(finding);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Cross-reviewer refs: drop invalid evidence; cap/set confidence to the cap when
|
|
273
|
+
* EITHER the ref's `.file` is set but not in the allowlist (a fabricated primary
|
|
274
|
+
* file), OR the ref HAD evidence that was entirely filtered out (mirrors
|
|
275
|
+
* {@link processReviewerFindings} semantics — `file`, `evidence`, and
|
|
276
|
+
* `confidence` are all OPTIONAL in the cross-review ref schema, so a ref with no
|
|
277
|
+
* `file`, fabricated evidence, and no `confidence` must still be downgraded). An
|
|
278
|
+
* omitted confidence value is SET to the cap so it cannot masquerade as
|
|
279
|
+
* unscored/high-confidence. Refs are never dropped.
|
|
280
|
+
*/
|
|
281
|
+
function processRefs(refs, allowlist, basenameMultiplicity) {
|
|
282
|
+
if (!Array.isArray(refs)) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
for (const ref of refs) {
|
|
286
|
+
if (!isRecord(ref)) {
|
|
287
|
+
continue;
|
|
288
|
+
}
|
|
289
|
+
let evidenceUnverified = false;
|
|
290
|
+
const evidence = ref["evidence"];
|
|
291
|
+
if (Array.isArray(evidence)) {
|
|
292
|
+
const hadEvidence = evidence.length > 0;
|
|
293
|
+
const kept = evidence.filter((entry) => isAllowedEvidence(entry, allowlist, basenameMultiplicity));
|
|
294
|
+
ref["evidence"] = kept;
|
|
295
|
+
evidenceUnverified = hadEvidence && kept.length === 0;
|
|
296
|
+
}
|
|
297
|
+
const file = ref["file"];
|
|
298
|
+
const fileUnverified = typeof file === "string" &&
|
|
299
|
+
file.length > 0 &&
|
|
300
|
+
!isAllowedFile(file, allowlist, basenameMultiplicity);
|
|
301
|
+
if (fileUnverified || evidenceUnverified) {
|
|
302
|
+
capUnverifiedConfidence(ref);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
function processCrossReviewer(root, allowlist, basenameMultiplicity) {
|
|
307
|
+
const feedback = root["per_review_feedback"];
|
|
308
|
+
if (!Array.isArray(feedback)) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
for (const fb of feedback) {
|
|
312
|
+
if (!isRecord(fb)) {
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
processRefs(fb["missed_issue_refs"], allowlist, basenameMultiplicity);
|
|
316
|
+
processRefs(fb["false_positive_refs"], allowlist, basenameMultiplicity);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
// ---------------------------------------------------------------------------
|
|
320
|
+
// Entry point
|
|
321
|
+
// ---------------------------------------------------------------------------
|
|
322
|
+
/**
|
|
323
|
+
* Filter unverifiable citations from a code-review schema artifact.
|
|
324
|
+
*
|
|
325
|
+
* Only acts when `ctx.schemaId` identifies a code-review schema (id includes
|
|
326
|
+
* `"code_review"`); otherwise the input is returned unchanged. Both the
|
|
327
|
+
* reviewer and cross-reviewer shapes are handled defensively — missing/optional
|
|
328
|
+
* fields are tolerated, and the input is deep-cloned before mutation.
|
|
329
|
+
*/
|
|
330
|
+
export function citationCheck(validated, ctx) {
|
|
331
|
+
if (!ctx.schemaId.includes("code_review")) {
|
|
332
|
+
return validated;
|
|
333
|
+
}
|
|
334
|
+
const clone = structuredClone(validated);
|
|
335
|
+
if (!isRecord(clone)) {
|
|
336
|
+
return clone;
|
|
337
|
+
}
|
|
338
|
+
// Precompute basename → full-path multiplicity once per call so the matching
|
|
339
|
+
// helpers can reject ambiguous basename-only citations (Fix #4).
|
|
340
|
+
const basenameMultiplicity = buildBasenameMultiplicity(ctx.allowlist);
|
|
341
|
+
// Reviewer schema locations.
|
|
342
|
+
processReviewerFindings(clone, "blocking_issues", ctx.allowlist, basenameMultiplicity);
|
|
343
|
+
processReviewerFindings(clone, "structural_findings", ctx.allowlist, basenameMultiplicity);
|
|
344
|
+
// Cross-reviewer schema locations.
|
|
345
|
+
processCrossReviewer(clone, ctx.allowlist, basenameMultiplicity);
|
|
346
|
+
return clone;
|
|
347
|
+
}
|
|
348
|
+
//# sourceMappingURL=citation-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"citation-check.js","sourceRoot":"","sources":["../src/citation-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAQrC,gFAAgF;AAChF,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAErC,8EAA8E;AAC9E,yBAAyB;AACzB,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAgB,EAAE,CAAS;IAC7D,IAAI,OAAO,CAAC,KAAK,QAA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AC,CAAC;QACtE,WAAW,CAAC,EAAE,CAAC,qBAAqB,CAAC,EAAE,SAAS,EAAE,oBAAoB,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC;AAED,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAE9E;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAC3B,SAAkB,EAClB,GAAiD;IAEjD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QAC1C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,KAAK,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;IACzC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,6EAA6E;IAC7E,iEAAiE;IACjE,MAAM,oBAAoB,GAAG,yBAAyB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAEtE,6BAA6B;IAC7B,uBAAuB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IACvF,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,EAAE,GAAG,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IAC3F,mCAAmC;IACnC,oBAAoB,CAAC,KAAK,EAAE,GAAG,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IAEjE,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* - Only output_text is stored/threaded/hashed
|
|
14
14
|
*/
|
|
15
15
|
import type { ClinkBackend, ToolCallResult } from "./backend.js";
|
|
16
|
+
import type { SessionLogOwnerV1 } from "./dashboard/session-log-contract.js";
|
|
16
17
|
/** Parsed result from a clink call. */
|
|
17
18
|
export interface ClinkCallResult {
|
|
18
19
|
/** Primary output text (for storage/threading/hashing). */
|
|
@@ -48,4 +49,4 @@ export declare function parseCallResult(result: ToolCallResult): ClinkCallResult
|
|
|
48
49
|
export declare function callClink(session: ClinkBackend, input: Record<string, unknown>, signal?: AbortSignal, context?: {
|
|
49
50
|
stageId: string;
|
|
50
51
|
callId: string;
|
|
51
|
-
}, timeoutMs?: number): Promise<ClinkCallResult>;
|
|
52
|
+
}, timeoutMs?: number, sessionLogOwner?: SessionLogOwnerV1): Promise<ClinkCallResult>;
|
|
@@ -24,12 +24,16 @@ import { basename } from "node:path";
|
|
|
24
24
|
export function buildCallArgs(input) {
|
|
25
25
|
// Clone to avoid mutating caller's input
|
|
26
26
|
const args = { ...input };
|
|
27
|
+
delete args["sessionLogOwner"];
|
|
28
|
+
delete args["session_log_owner"];
|
|
27
29
|
// Always enable debug for internal calls
|
|
28
30
|
args["debug"] = true;
|
|
29
31
|
// Strip host _meta.progressToken (1-11a: progress isolation)
|
|
30
32
|
if (args["_meta"] != null && typeof args["_meta"] === "object") {
|
|
31
33
|
const meta = { ...args["_meta"] };
|
|
32
34
|
delete meta["progressToken"];
|
|
35
|
+
delete meta["sessionLogOwner"];
|
|
36
|
+
delete meta["session_log_owner"];
|
|
33
37
|
// Only keep _meta if it still has keys
|
|
34
38
|
if (Object.keys(meta).length > 0) {
|
|
35
39
|
args["_meta"] = meta;
|
|
@@ -96,16 +100,17 @@ function sanitizeDebugMetadataForLog(debug) {
|
|
|
96
100
|
* @throws InvalidCallError on child -32602
|
|
97
101
|
* @throws CallExecutionError on child isError: true
|
|
98
102
|
*/
|
|
99
|
-
export async function callClink(session, input, signal, context, timeoutMs) {
|
|
103
|
+
export async function callClink(session, input, signal, context, timeoutMs, sessionLogOwner) {
|
|
100
104
|
const args = buildCallArgs(input);
|
|
101
105
|
const stageId = context?.stageId ?? "unknown";
|
|
102
106
|
const callId = context?.callId ?? "unknown";
|
|
103
107
|
let result;
|
|
104
108
|
try {
|
|
105
|
-
result = await session.callTool(args, signal != null || timeoutMs != null
|
|
109
|
+
result = await session.callTool(args, signal != null || timeoutMs != null || sessionLogOwner != null
|
|
106
110
|
? {
|
|
107
111
|
...(signal != null ? { signal } : {}),
|
|
108
112
|
...(timeoutMs != null ? { timeoutMs } : {}),
|
|
113
|
+
...(sessionLogOwner != null ? { sessionLogOwner } : {}),
|
|
109
114
|
}
|
|
110
115
|
: undefined);
|
|
111
116
|
}
|
|
@@ -123,9 +128,14 @@ export async function callClink(session, input, signal, context, timeoutMs) {
|
|
|
123
128
|
const childDebugMetadata = extractChildFailureMetadata(parsed.debugMetadata);
|
|
124
129
|
// Fallback: if pipeline missed the panic class (e.g. wrapper formatting
|
|
125
130
|
// differences), detect the codex-local crash signature in output text.
|
|
131
|
+
// Structured metadata takes precedence: when the child's _debug already
|
|
132
|
+
// carries a codex_panic_class, trust that classification and skip
|
|
133
|
+
// prose re-synthesis (kept only for old children without structured _debug).
|
|
126
134
|
let effectiveFailureClass = failureClass;
|
|
127
135
|
let effectiveChildDebugMetadata = childDebugMetadata;
|
|
128
|
-
if (failureClass === "permanent" &&
|
|
136
|
+
if (failureClass === "permanent" &&
|
|
137
|
+
parsed.outputText != null &&
|
|
138
|
+
childDebugMetadata?.codex_panic_class == null) {
|
|
129
139
|
const codexLocalMatch = parsed.outputText.match(/\[codex-local\]:?\s*Local Codex process failed(?::\s*Process exited with code:\s*(\d+))?/);
|
|
130
140
|
if (codexLocalMatch != null) {
|
|
131
141
|
const exitCode = codexLocalMatch[1] != null ? Number(codexLocalMatch[1]) : null;
|
|
@@ -222,11 +232,14 @@ function extractChildFailureMetadata(debug) {
|
|
|
222
232
|
adapter_config_path: typeof debug["adapter_config_path"] === "string" ? debug["adapter_config_path"] : undefined,
|
|
223
233
|
exit_code: typeof debug["exit_code"] === "number" || debug["exit_code"] === null ? debug["exit_code"] : undefined,
|
|
224
234
|
codex_panic_class: typeof debug["codex_panic_class"] === "string" ? debug["codex_panic_class"] : undefined,
|
|
235
|
+
semantic_failure_reason: typeof debug["semantic_failure_reason"] === "string" ? debug["semantic_failure_reason"] : undefined,
|
|
236
|
+
secondary_failure_reason: typeof debug["secondary_failure_reason"] === "string" ? debug["secondary_failure_reason"] : undefined,
|
|
225
237
|
};
|
|
226
238
|
// Only return if at least one field is present
|
|
227
239
|
const hasContent = meta.rejection_reason != null || meta.parse_status != null ||
|
|
228
240
|
meta.parse_source != null || meta.adapter_config_path != null || meta.exit_code !== undefined ||
|
|
229
|
-
meta.codex_panic_class != null
|
|
241
|
+
meta.codex_panic_class != null || meta.semantic_failure_reason != null ||
|
|
242
|
+
meta.secondary_failure_reason != null;
|
|
230
243
|
return hasContent ? meta : undefined;
|
|
231
244
|
}
|
|
232
245
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clink-client.js","sourceRoot":"","sources":["../src/clink-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAA6B,MAAM,aAAa,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"clink-client.js","sourceRoot":"","sources":["../src/clink-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAA6B,MAAM,aAAa,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAYrC;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAC3B,KAA8B;IAE9B,yCAAyC;IACzC,MAAM,IAAI,GAA4B,EAAE,GAAG,KAAK,EAAE,CAAC;IACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC/B,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAEjC,yCAAyC;IACzC,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAErB,6DAA6D;IAC7D,IA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