@iowarp/clio-coder 0.3.4 → 0.3.7
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 +65 -2
- package/CONTRIBUTING.md +6 -6
- package/README.md +16 -5
- package/dist/{acp-S5R4RR5B.js → acp-SK4MD6MM.js} +11 -11
- package/dist/{agents-P6DMMVZY.js → agents-2FN2K6ME.js} +33 -26
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-2XCZLPKS.js → auth-QIYZWM5I.js} +15 -15
- package/dist/{chunk-EKMEHE4H.js → chunk-33YXPOE3.js} +2 -3
- package/dist/{chunk-VAWWTKDP.js → chunk-3HAPLH5M.js} +11 -11
- package/dist/{chunk-YCWGATWI.js → chunk-465YSENW.js} +3 -3
- package/dist/{chunk-4OC57DA6.js → chunk-4DGYLA73.js} +53 -2
- package/dist/{chunk-UZHIZC5S.js → chunk-4DWFMQDR.js} +61 -76
- package/dist/{chunk-ZWMF7253.js → chunk-5C3AQNDW.js} +328 -9
- package/dist/{chunk-22NAGB7X.js → chunk-5C77SEEY.js} +5 -94
- package/dist/{chunk-WPQLXFOZ.js → chunk-5FR74PWO.js} +3 -2
- package/dist/{chunk-35MKKU5R.js → chunk-5UJ6ECTS.js} +18 -10
- package/dist/{chunk-BRXQQJFP.js → chunk-6M7VS3J3.js} +571 -50
- package/dist/{chunk-QQK64KLB.js → chunk-6TUKSZVF.js} +141 -23
- package/dist/{chunk-N4CZJQRK.js → chunk-AB4XIIVB.js} +8 -6
- package/dist/{chunk-KRPY7NTG.js → chunk-BMWK7ZIZ.js} +14 -20
- package/dist/{chunk-4BPJXDWC.js → chunk-C4JBQ5SR.js} +30 -14
- package/dist/{chunk-ZYKPLLNQ.js → chunk-CEYBNUGC.js} +821 -83
- package/dist/{chunk-VEZEGCGW.js → chunk-D4MDIG46.js} +20 -18
- package/dist/chunk-DJNLUABN.js +843 -0
- package/dist/{chunk-BP4OYD6A.js → chunk-DMD2AGVS.js} +21 -2
- package/dist/{chunk-KOHPCX4K.js → chunk-DOOEX22V.js} +2 -2
- package/dist/chunk-DQA7QLMD.js +123 -0
- package/dist/chunk-DR52UMZW.js +21 -0
- package/dist/{chunk-3HZ5RWN2.js → chunk-EBEFWSGL.js} +9 -7
- package/dist/{chunk-EDRHSCIE.js → chunk-EELBMBT6.js} +128 -13
- package/dist/{chunk-HV5X7OR2.js → chunk-EOOQZZDE.js} +16 -14
- package/dist/{chunk-WR67VIZY.js → chunk-FOT2FX5J.js} +63 -5
- package/dist/{chunk-BPGS2WCQ.js → chunk-GEYXPTRF.js} +2 -1
- package/dist/{chunk-FYYLNIL5.js → chunk-GH5622CP.js} +2 -2
- package/dist/{chunk-BEY543CS.js → chunk-GOXNB3AO.js} +5 -2
- package/dist/chunk-GWS3VEIW.js +195 -0
- package/dist/{chunk-G4BMMOKF.js → chunk-HVDIIIQW.js} +2 -2
- package/dist/chunk-HWUFFB6L.js +83 -0
- package/dist/{chunk-X6COSD2O.js → chunk-J7PIKKWC.js} +8 -436
- package/dist/{chunk-NILBFAPG.js → chunk-JNXPYBB4.js} +2 -2
- package/dist/{chunk-4VP4KH3K.js → chunk-JRIO5UD2.js} +4 -4
- package/dist/{chunk-K6WL7QZT.js → chunk-JTSEDYVQ.js} +7 -7
- package/dist/{chunk-QKMUKYO7.js → chunk-KCMKRQX4.js} +236 -84
- package/dist/chunk-KZ2H5X4G.js +1026 -0
- package/dist/{chunk-A2GZF7DC.js → chunk-LADCF22A.js} +13 -13
- package/dist/chunk-LCGCVYZ4.js +57 -0
- package/dist/chunk-M4AKACEO.js +382 -0
- package/dist/{chunk-POHLU5DW.js → chunk-M6L6IDJG.js} +3 -3
- package/dist/{chunk-4JUF2NNX.js → chunk-MXI6J5JF.js} +7 -7
- package/dist/{chunk-X4RCMKVQ.js → chunk-NDINPTJ4.js} +2 -2
- package/dist/{chunk-TTNYS3EA.js → chunk-OB5HIGJY.js} +1 -1
- package/dist/{chunk-7RXG6QRZ.js → chunk-OBMAI2DP.js} +61 -840
- package/dist/{chunk-5M54SPOL.js → chunk-ODFEOB4F.js} +161 -5
- package/dist/chunk-PD3MESLB.js +242 -0
- package/dist/{chunk-ED4KHGC3.js → chunk-PPAMZ32Z.js} +9 -2
- package/dist/{chunk-VMNQ6OZA.js → chunk-QCTRSGHQ.js} +963 -786
- package/dist/chunk-RVG5JXAL.js +41 -0
- package/dist/{chunk-RD5U66HV.js → chunk-SROCI7ZU.js} +7 -7
- package/dist/{chunk-MFFY33HR.js → chunk-THKY7CD7.js} +466 -205
- package/dist/{chunk-34475P3I.js → chunk-TSHXZTOQ.js} +5 -4
- package/dist/{chunk-PCZJO5TI.js → chunk-UFQ3F4FW.js} +13 -178
- package/dist/{chunk-AD2SYQYC.js → chunk-UHXRNZ2J.js} +121 -3
- package/dist/chunk-UND3GU2L.js +103 -0
- package/dist/{chunk-QQL5RT5M.js → chunk-UUANF5CR.js} +2323 -2114
- package/dist/{chunk-VJWL6YS5.js → chunk-UUVG37B4.js} +2 -2
- package/dist/chunk-UVDSQ6LW.js +472 -0
- package/dist/{chunk-QWU7ZBO7.js → chunk-VQNODYQ4.js} +215 -56
- package/dist/chunk-VREKEFLL.js +37 -0
- package/dist/{chunk-2TZWSW76.js → chunk-WHGPSPT5.js} +2 -2
- package/dist/{chunk-TW3WDMVS.js → chunk-WHJYKASB.js} +2 -2
- package/dist/{chunk-MEQ45TQ4.js → chunk-WJHBC77E.js} +21 -7
- package/dist/{chunk-HXG4IURW.js → chunk-X2KV5FXT.js} +2 -2
- package/dist/{chunk-YHZX5GEU.js → chunk-XAKHZX5N.js} +2 -2
- package/dist/{chunk-2LZI5CAG.js → chunk-XEGB6BCN.js} +228 -36
- package/dist/{chunk-E25LMLRW.js → chunk-YD734TPH.js} +2 -2
- package/dist/{verifiers-4UUM6TEE.js → chunk-YTYFXUI3.js} +121 -372
- package/dist/{chunk-3JLKSKD7.js → chunk-ZGH7FGS5.js} +17 -7
- package/dist/{chunk-VSNATDE6.js → chunk-ZZMN5OM4.js} +2 -2
- package/dist/cli/index.js +34 -32
- package/dist/{clio-J5JIOIDS.js → clio-WBVQEBKO.js} +7 -7
- package/dist/{code-nav-AXCXSBHX.js → code-nav-FGGFIE7L.js} +7 -7
- package/dist/codewiki/build-worker.js +4 -4
- package/dist/{components-KELWS457.js → components-F7OEATSO.js} +5 -5
- package/dist/{config-OEBMIN2U.js → config-TRBL3RCF.js} +48 -41
- package/dist/{configure-PUQOSIXQ.js → configure-OLCVPHNM.js} +17 -17
- package/dist/{context-URSXPBCK.js → context-MJIJ6GOX.js} +12 -12
- package/dist/{context-EKDCKUUZ.js → context-WFPKQSM6.js} +26 -9
- package/dist/{context-MGSE4Z2T.js → context-XEWE3MOJ.js} +44 -37
- package/dist/{context-clear-KDAJRNUK.js → context-clear-KNOS2JPB.js} +44 -37
- package/dist/{context-index-BZ4UYMTC.js → context-index-SSR5ECNE.js} +3 -3
- package/dist/{context-working-set-SBKMPPI2.js → context-working-set-EUXAZI6N.js} +14 -13
- package/dist/{dispatch-runner-MSWN72NK.js → dispatch-runner-B7MTOVKL.js} +321 -60
- package/dist/{docs-2C2LTVT2.js → docs-FLJTIDSE.js} +5 -5
- package/dist/{doctor-7BSE27PJ.js → doctor-RN4YKO2X.js} +15 -15
- package/dist/{eval-IZGDOO4H.js → eval-RUBJVSNQ.js} +52 -236
- package/dist/{evidence-SR7WXB5B.js → evidence-JZNBUOQZ.js} +39 -33
- package/dist/{evolve-K7VE2CBX.js → evolve-FJVC4KKI.js} +39 -33
- package/dist/{extensions-QVDOHDGJ.js → extensions-IQL36S7K.js} +5 -5
- package/dist/{fleet-7XMJNQNF.js → fleet-BDKYJFCP.js} +243 -370
- package/dist/fleet-commands-ZFIWZSB3.js +70 -0
- package/dist/fleet-graph-Y6HPXIVF.js +125 -0
- package/dist/fleet-new-RDVJLHHH.js +48 -0
- package/dist/{fleet-preflight-AQNAH644.js → fleet-preflight-BHSNPBMH.js} +2 -2
- package/dist/fleet-validate-BIYREGIK.js +79 -0
- package/dist/{init-JGNPAYXT.js → init-LQUB5COQ.js} +57 -48
- package/dist/library-NJAHIGG4.js +217 -0
- package/dist/memory-OG6HOYKM.js +472 -0
- package/dist/{models-ZMMLFJNN.js → models-5ZG5XY7J.js} +23 -22
- package/dist/{monitor-2F3T5KHP.js → monitor-TJ7AMTGB.js} +69 -35
- package/dist/{orchestrator-ORHT43JB.js → orchestrator-WZYB54DM.js} +4868 -1189
- package/dist/{paths-UXLN5YYZ.js → paths-XUC7GS6E.js} +5 -5
- package/dist/{reset-NXGTYNUO.js → reset-PXQT45IY.js} +8 -8
- package/dist/{run-RF4WJGMT.js → run-FQ74YF62.js} +82 -62
- package/dist/{share-UT3W6E4M.js → share-FW7SVCL3.js} +34 -10
- package/dist/{skills-PSACKC5Q.js → skills-7E7IRB3R.js} +25 -9
- package/dist/{skills-eval-WJSI55RZ.js → skills-eval-LI75W6OK.js} +43 -35
- package/dist/{targets-PIIRAOYS.js → targets-4CIFKCTW.js} +27 -24
- package/dist/{terminal-lease-ULWXWNVY.js → terminal-lease-WUZY7ZV5.js} +5 -4
- package/dist/{uninstall-FZCQCDKC.js → uninstall-7FV7IP4E.js} +5 -5
- package/dist/{upgrade-346TZ6AV.js → upgrade-K2HVIVMQ.js} +21 -20
- package/dist/{usage-6KKXR32N.js → usage-GTZELZQX.js} +159 -59
- package/dist/verifiers-RLAHT27O.js +336 -0
- package/dist/{verify-X5HDROLA.js → verify-BX3BRKH5.js} +7 -6
- package/dist/{wiki-generate-7STOCIFZ.js → wiki-generate-ASIFASCN.js} +58 -48
- package/dist/worker/entry.js +98 -84
- package/dist/{workspace-G4ZWUIPR.js → workspace-ZJ6BFM3Q.js} +4 -4
- package/docs/README.md +4 -3
- package/docs/acp.md +1 -1
- package/docs/alcf-provider.md +1 -1
- package/docs/architecture.md +2 -2
- package/docs/artifact-placement.md +1 -2
- package/docs/artifact-versions.md +10 -6
- package/docs/built-in-agents.md +26 -2
- package/docs/capacity-and-scheduling.md +1 -1
- package/docs/commands-and-modes.md +90 -8
- package/docs/configuration-and-targets.md +90 -2
- package/docs/context-engine.md +4 -2
- package/docs/context-working-set.md +4 -4
- package/docs/development-pipeline.md +1 -1
- package/docs/dispatch-architecture-rationale.md +1 -1
- package/docs/documentation-coverage.md +4 -4
- package/docs/documentation-guide.md +4 -4
- package/docs/eval-runner.md +1 -1
- package/docs/evals-internal.md +4 -45
- package/docs/evidence-and-memory.md +70 -10
- package/docs/evolution.md +1 -1
- package/docs/exit-codes-and-output.md +4 -1
- package/docs/extensions-and-sharing.md +6 -2
- package/docs/fleet-demo-runbook.md +2 -2
- package/docs/fleet-dispatch.md +224 -11
- package/docs/git-commit-provenance.md +2 -2
- package/docs/glossary.md +1 -1
- package/docs/installation-and-lifecycle.md +2 -2
- package/docs/middleware-and-components.md +20 -2
- package/docs/model-catalog.md +1 -1
- package/docs/observability.md +55 -8
- package/docs/proactive-memory.md +26 -16
- package/docs/prompt-envelope-and-tools.md +4 -2
- package/docs/provider-adapter-cookbook.md +1 -1
- package/docs/release-cut-checklist.md +83 -65
- package/docs/resource-library.md +59 -0
- package/docs/safety-model.md +29 -7
- package/docs/scientific-validation.md +3 -3
- package/docs/session-lifecycle.md +37 -1
- package/docs/skills-marketplace.md +16 -3
- package/docs/tool-usage.md +14 -7
- package/docs/trace-store.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/docs/tui-design.md +38 -4
- package/docs/worker-dispatch-mechanics.md +3 -3
- package/package.json +7 -4
- package/src/cli/agents.ts +2 -3
- package/src/cli/argv.ts +14 -1
- package/src/cli/fleet-commands.ts +37 -0
- package/src/cli/fleet-graph.ts +102 -0
- package/src/cli/fleet-new.ts +36 -0
- package/src/cli/fleet-preflight.ts +121 -0
- package/src/cli/fleet-validate.ts +30 -0
- package/src/cli/fleet.ts +188 -335
- package/src/cli/index.ts +4 -2
- package/src/cli/library.ts +190 -0
- package/src/cli/memory.ts +272 -10
- package/src/cli/modes/json-stream.ts +2 -2
- package/src/cli/modes/print.ts +12 -1
- package/src/cli/run.ts +22 -2
- package/src/cli/share.ts +13 -1
- package/src/cli/targets.ts +12 -3
- package/src/cli/usage.ts +160 -20
- package/src/core/bus-events.ts +7 -0
- package/src/core/commit-attribution.ts +4 -4
- package/src/core/config.ts +130 -0
- package/src/core/defaults.ts +81 -0
- package/src/core/response-model-id.ts +134 -0
- package/src/core/toml.ts +62 -0
- package/src/core/workspace-files.ts +0 -1
- package/src/domains/agents/builtins/architect.md +2 -1
- package/src/domains/agents/builtins/oracle.md +33 -0
- package/src/domains/agents/catalog.ts +18 -5
- package/src/domains/agents/fleet-contract.ts +278 -16
- package/src/domains/agents/index.ts +14 -0
- package/src/domains/agents/recipe.ts +54 -14
- package/src/domains/agents/result-contract.ts +242 -5
- package/src/domains/config/classify.ts +4 -0
- package/src/domains/context/bootstrap.ts +36 -27
- package/src/domains/context/project-metadata.ts +19 -63
- package/src/domains/context/prompt-context.ts +8 -0
- package/src/domains/context/working-set/policies/index.ts +3 -4
- package/src/domains/dispatch/active-route-planner.ts +14 -0
- package/src/domains/dispatch/backoff.ts +2 -1
- package/src/domains/dispatch/budget-envelope.ts +396 -0
- package/src/domains/dispatch/capability-match.ts +1 -0
- package/src/domains/dispatch/checkout-writer-lease.ts +175 -0
- package/src/domains/dispatch/contract.ts +36 -0
- package/src/domains/dispatch/delegation-plan.ts +167 -0
- package/src/domains/dispatch/execution-plan.ts +76 -5
- package/src/domains/dispatch/execution-role.ts +3 -1
- package/src/domains/dispatch/execution-scheduler.ts +183 -67
- package/src/domains/dispatch/extension.ts +339 -36
- package/src/domains/dispatch/fleet-gate.ts +14 -0
- package/src/domains/dispatch/fleet-plan.ts +63 -3
- package/src/domains/dispatch/fleet-run.ts +737 -0
- package/src/domains/dispatch/gate-role-prompts.ts +9 -0
- package/src/domains/dispatch/host-verification.ts +178 -0
- package/src/domains/dispatch/index.ts +38 -0
- package/src/domains/dispatch/intent.ts +159 -0
- package/src/domains/dispatch/orphan-recovery.ts +1 -0
- package/src/domains/dispatch/receipt-integrity.ts +12 -4
- package/src/domains/dispatch/state.ts +37 -3
- package/src/domains/dispatch/types.ts +61 -9
- package/src/domains/dispatch/validation.ts +80 -6
- package/src/domains/dispatch/worker-spawn.ts +14 -3
- package/src/domains/eval/metrics/evidence.ts +0 -116
- package/src/domains/eval/metrics/invariants.ts +1 -1
- package/src/domains/eval/runners/clio-run.ts +1 -10
- package/src/domains/eval/runners/external-command.ts +2 -29
- package/src/domains/eval/schema/suite.ts +0 -7
- package/src/domains/eval/suites/run.ts +1 -7
- package/src/domains/evidence/trust-status.ts +10 -1
- package/src/domains/memory/index.ts +22 -0
- package/src/domains/memory/operations.ts +58 -1
- package/src/domains/memory/promotion.ts +281 -0
- package/src/domains/memory/prompt-section.ts +25 -5
- package/src/domains/memory/proposal.ts +51 -7
- package/src/domains/memory/task-bank.ts +3 -2
- package/src/domains/memory/task-memory-handoff.ts +181 -24
- package/src/domains/memory/task-memory-policy.ts +3 -1
- package/src/domains/memory/types.ts +37 -0
- package/src/domains/memory/validate.ts +178 -0
- package/src/domains/middleware/index.ts +15 -0
- package/src/domains/middleware/memory-intervention.ts +35 -25
- package/src/domains/middleware/runtime.ts +6 -0
- package/src/domains/middleware/skills-reminder.ts +19 -4
- package/src/domains/middleware/stalled-turn.ts +43 -1
- package/src/domains/middleware/types.ts +10 -0
- package/src/domains/middleware/watchdog.ts +281 -0
- package/src/domains/observability/contract.ts +9 -2
- package/src/domains/observability/cost.ts +31 -4
- package/src/domains/observability/extension.ts +2 -2
- package/src/domains/observability/index.ts +10 -0
- package/src/domains/observability/out-of-turn-usage.ts +223 -0
- package/src/domains/providers/index.ts +3 -0
- package/src/domains/providers/model-discovery.ts +9 -0
- package/src/domains/providers/runtime-resolution.ts +38 -1
- package/src/domains/providers/runtimes/common/probe-helpers.ts +97 -16
- package/src/domains/providers/types/context-window-slots.ts +18 -0
- package/src/domains/providers/types/runtime-descriptor.ts +3 -1
- package/src/domains/resources/index.ts +20 -0
- package/src/domains/resources/library.ts +326 -0
- package/src/domains/resources/skills/marketplace.ts +37 -12
- package/src/domains/safety/call-target.ts +211 -14
- package/src/domains/safety/decision-presentation.ts +268 -0
- package/src/domains/safety/redaction.ts +73 -0
- package/src/domains/session/context-ledger.ts +10 -1
- package/src/domains/session/decision-board.ts +4 -0
- package/src/domains/session/entries.ts +3 -0
- package/src/domains/session/handoff.ts +629 -0
- package/src/domains/session/history.ts +68 -19
- package/src/domains/session/usage.ts +24 -7
- package/src/domains/share/archive.ts +67 -2
- package/src/engine/acp/event-mapper.ts +7 -0
- package/src/engine/acp/server.ts +29 -2
- package/src/engine/apis/lmstudio.ts +25 -4
- package/src/engine/apis/openai-completions.ts +147 -22
- package/src/engine/claude/sdk-runtime.ts +8 -2
- package/src/engine/claude/tool-safety.ts +13 -0
- package/src/engine/loop-guard.ts +27 -3
- package/src/engine/worker-events.ts +4 -3
- package/src/engine/worker-runtime.ts +59 -54
- package/src/entry/orchestrator.ts +55 -1
- package/src/interactive/bus-notices.ts +26 -0
- package/src/interactive/chat-loop-messages.ts +22 -0
- package/src/interactive/chat-loop.ts +248 -1
- package/src/interactive/chat-renderer.ts +41 -3
- package/src/interactive/clio-editor.ts +44 -7
- package/src/interactive/context-overlay.ts +43 -5
- package/src/interactive/cost-overlay.ts +70 -11
- package/src/interactive/council-dispatch.ts +30 -0
- package/src/interactive/council-grid.ts +213 -0
- package/src/interactive/council.ts +99 -0
- package/src/interactive/dispatch-board.ts +471 -50
- package/src/interactive/fleet-run-preview.ts +307 -0
- package/src/interactive/footer/notifications.ts +219 -0
- package/src/interactive/footer/widgets.ts +13 -0
- package/src/interactive/handoff-round.ts +56 -0
- package/src/interactive/interactive-application.ts +49 -2
- package/src/interactive/interactive-event-projection.ts +9 -1
- package/src/interactive/interactive-input-runtime.ts +11 -1
- package/src/interactive/interactive-presentation.ts +11 -1
- package/src/interactive/interactive-slash-runtime.ts +52 -2
- package/src/interactive/interactive-subscriptions.ts +14 -2
- package/src/interactive/memory-overlay.ts +89 -4
- package/src/interactive/oracle.ts +179 -0
- package/src/interactive/overlay-ask-user-lifecycle.ts +7 -1
- package/src/interactive/overlay-frame.ts +5 -2
- package/src/interactive/overlay-general-openers.ts +230 -2
- package/src/interactive/overlay-key-routing.ts +58 -2
- package/src/interactive/overlay-lifecycle.ts +52 -5
- package/src/interactive/overlay-permission-lifecycle.ts +33 -8
- package/src/interactive/overlay-resource-openers.ts +11 -3
- package/src/interactive/overlay-session-lifecycle.ts +234 -2
- package/src/interactive/overlay-transitions.ts +11 -0
- package/src/interactive/overlays/ask-user.ts +74 -30
- package/src/interactive/overlays/decisions.ts +3 -1
- package/src/interactive/overlays/fleet-run-approval.ts +208 -0
- package/src/interactive/overlays/handoff-review.ts +185 -0
- package/src/interactive/overlays/library-install-confirm.ts +151 -0
- package/src/interactive/overlays/list-overlay.ts +168 -2
- package/src/interactive/overlays/settings.ts +101 -4
- package/src/interactive/overlays/side-question.ts +139 -0
- package/src/interactive/overlays/skills-hub.ts +401 -15
- package/src/interactive/permission-hint.ts +35 -0
- package/src/interactive/permission-overlay.ts +95 -45
- package/src/interactive/renderers/tool-execution.ts +19 -49
- package/src/interactive/session-last-turn.ts +8 -1
- package/src/interactive/session-usage-reseed.ts +36 -10
- package/src/interactive/side-question.ts +171 -0
- package/src/interactive/slash-commands.ts +434 -7
- package/src/interactive/slash-spec.ts +19 -6
- package/src/interactive/status/summary.ts +5 -0
- package/src/interactive/status/types.ts +5 -0
- package/src/interactive/terminal-lease.ts +1 -0
- package/src/interactive/theme/tokens.ts +30 -0
- package/src/interactive/turn-context.ts +96 -23
- package/src/interactive/turn-middleware.ts +16 -1
- package/src/interactive/turn-runtime.ts +37 -8
- package/src/interactive/turn-state.ts +3 -0
- package/src/interactive/watchdog-run.ts +75 -0
- package/src/interactive/worker-progress.ts +440 -0
- package/src/interactive/worker-share.ts +56 -1
- package/src/interactive/worker-stream.ts +58 -110
- package/src/tools/agent-tools.ts +28 -3
- package/src/tools/ask-user.ts +21 -1
- package/src/tools/bootstrap.ts +3 -0
- package/src/tools/compete-worktrees.ts +13 -79
- package/src/tools/context/index.ts +2 -2
- package/src/tools/dispatch-admission.ts +242 -8
- package/src/tools/dispatch-arguments.ts +65 -1
- package/src/tools/dispatch-event-text.ts +19 -0
- package/src/tools/dispatch-plan.ts +136 -6
- package/src/tools/dispatch-runner.ts +319 -13
- package/src/tools/dispatch-types.ts +20 -1
- package/src/tools/dispatch.ts +96 -3
- package/src/tools/monitor.ts +31 -0
- package/src/tools/profiles.ts +18 -4
- package/src/tools/registry.ts +15 -5
- package/src/tools/result-disposition.ts +156 -0
- package/src/tools/result-shaping.ts +59 -1
- package/src/tools/task-worktree.ts +238 -0
- package/src/tools/verify/authoring.ts +116 -55
- package/src/tools/verify/scripts.ts +62 -0
- package/src/tools/worker-evidence.ts +21 -1
- package/src/worker/spec-contract.ts +44 -3
- package/dist/chunk-EFADSJET.js +0 -18
- package/dist/chunk-HC4CLZ2Y.js +0 -68
- package/dist/memory-4ALKDJ4Q.js +0 -246
- package/src/domains/eval/metrics/chaos-stream.ts +0 -93
|
@@ -11,11 +11,12 @@ import {
|
|
|
11
11
|
loadEvalTaskFile,
|
|
12
12
|
verifyReceiptIntegrity,
|
|
13
13
|
writeEvalArtifactV4
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZGH7FGS5.js";
|
|
15
15
|
import {
|
|
16
16
|
shellQuote
|
|
17
17
|
} from "./chunk-TXOTCRLG.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5C77SEEY.js";
|
|
19
|
+
import "./chunk-UND3GU2L.js";
|
|
19
20
|
import "./chunk-AOCYTWAV.js";
|
|
20
21
|
import "./chunk-MV3K5QF2.js";
|
|
21
22
|
import "./chunk-UL3WSD3F.js";
|
|
@@ -23,26 +24,26 @@ import "./chunk-ECH6PKUQ.js";
|
|
|
23
24
|
import "./chunk-CGKSTWHD.js";
|
|
24
25
|
import {
|
|
25
26
|
detectProjectProfile
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-XAKHZX5N.js";
|
|
27
28
|
import {
|
|
28
29
|
readCodewiki,
|
|
29
30
|
structuralCodewikiHash
|
|
30
31
|
} from "./chunk-LBMZMYH2.js";
|
|
31
32
|
import {
|
|
32
33
|
enumerateWorkspaceFiles
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
34
|
+
} from "./chunk-33YXPOE3.js";
|
|
35
|
+
import "./chunk-465YSENW.js";
|
|
35
36
|
import {
|
|
36
37
|
printError
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PPAMZ32Z.js";
|
|
38
39
|
import "./chunk-5TSRNF4G.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-IKCO5N3L.js";
|
|
41
|
-
import "./chunk-3I7MS7N2.js";
|
|
40
|
+
import "./chunk-JRIO5UD2.js";
|
|
42
41
|
import "./chunk-SST6Z5JA.js";
|
|
43
42
|
import {
|
|
44
43
|
InvalidIdError
|
|
45
44
|
} from "./chunk-R346GLFC.js";
|
|
45
|
+
import "./chunk-IKCO5N3L.js";
|
|
46
|
+
import "./chunk-3I7MS7N2.js";
|
|
46
47
|
import {
|
|
47
48
|
require_dist
|
|
48
49
|
} from "./chunk-APJ265NV.js";
|
|
@@ -1323,100 +1324,6 @@ function evidenceMetricsFromReceipt(receipt) {
|
|
|
1323
1324
|
...typeof receipt.costUsd === "number" && Number.isFinite(receipt.costUsd) ? { "cost.usd": receipt.costUsd } : {}
|
|
1324
1325
|
};
|
|
1325
1326
|
}
|
|
1326
|
-
function dispatchCountFromJsonl(stdout) {
|
|
1327
|
-
let executionEnds = 0;
|
|
1328
|
-
let canonicalFinishes = 0;
|
|
1329
|
-
const seenExecutionEnds = /* @__PURE__ */ new Set();
|
|
1330
|
-
const seenCanonicalFinishes = /* @__PURE__ */ new Set();
|
|
1331
|
-
let sawCanonicalFinishEvent = false;
|
|
1332
|
-
for (const event of jsonlEvents(stdout)) {
|
|
1333
|
-
if (event.type === "tool_execution_end") {
|
|
1334
|
-
if (stringField(event, "toolName") !== "dispatch") continue;
|
|
1335
|
-
const callId2 = stringField(event, "toolCallId");
|
|
1336
|
-
if (callId2 !== void 0) {
|
|
1337
|
-
if (seenExecutionEnds.has(callId2)) continue;
|
|
1338
|
-
seenExecutionEnds.add(callId2);
|
|
1339
|
-
}
|
|
1340
|
-
executionEnds += 1;
|
|
1341
|
-
continue;
|
|
1342
|
-
}
|
|
1343
|
-
if (event.type !== "clio_tool_finish" || !isRecord5(event.payload)) continue;
|
|
1344
|
-
sawCanonicalFinishEvent = true;
|
|
1345
|
-
if (stringField(event.payload, "tool") !== "dispatch") continue;
|
|
1346
|
-
const callId = stringField(event.payload, "toolCallId") ?? stringField(event, "toolCallId");
|
|
1347
|
-
if (callId !== void 0) {
|
|
1348
|
-
if (seenCanonicalFinishes.has(callId)) continue;
|
|
1349
|
-
seenCanonicalFinishes.add(callId);
|
|
1350
|
-
}
|
|
1351
|
-
canonicalFinishes += 1;
|
|
1352
|
-
}
|
|
1353
|
-
return sawCanonicalFinishEvent ? canonicalFinishes : executionEnds;
|
|
1354
|
-
}
|
|
1355
|
-
function scoutDispatchCountFromJsonl(stdout) {
|
|
1356
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1357
|
-
let count = 0;
|
|
1358
|
-
for (const event of jsonlEvents(stdout)) {
|
|
1359
|
-
if (event.type !== "tool_execution_start" || stringField(event, "toolName") !== "dispatch") continue;
|
|
1360
|
-
if (!isRecord5(event.args) || !dispatchArgsIncludeAgent(event.args, "scout")) continue;
|
|
1361
|
-
const callId = stringField(event, "toolCallId");
|
|
1362
|
-
if (callId !== void 0) {
|
|
1363
|
-
if (seen.has(callId)) continue;
|
|
1364
|
-
seen.add(callId);
|
|
1365
|
-
}
|
|
1366
|
-
count += 1;
|
|
1367
|
-
}
|
|
1368
|
-
return count;
|
|
1369
|
-
}
|
|
1370
|
-
function dispatchArgsIncludeAgent(args, expectedAgent) {
|
|
1371
|
-
const sharedAgent = stringField(args, "agent") ?? stringField(args, "agent_id") ?? stringField(args, "agentId");
|
|
1372
|
-
let tasks = args.tasks;
|
|
1373
|
-
if (typeof tasks === "string") {
|
|
1374
|
-
const trimmed = tasks.trim();
|
|
1375
|
-
if (trimmed.startsWith("[") || trimmed.startsWith("{")) {
|
|
1376
|
-
try {
|
|
1377
|
-
tasks = JSON.parse(trimmed);
|
|
1378
|
-
} catch {
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
const taskList = Array.isArray(tasks) ? tasks : tasks === void 0 ? [{ task: args.task }] : [tasks];
|
|
1383
|
-
return taskList.some((task) => {
|
|
1384
|
-
if (typeof task === "string") return sharedAgent?.toLowerCase() === expectedAgent;
|
|
1385
|
-
if (!isRecord5(task)) return false;
|
|
1386
|
-
const agent = stringField(task, "agent") ?? stringField(task, "agent_id") ?? stringField(task, "agentId") ?? sharedAgent;
|
|
1387
|
-
return agent?.toLowerCase() === expectedAgent;
|
|
1388
|
-
});
|
|
1389
|
-
}
|
|
1390
|
-
function wikiStaleAcknowledgedFromJsonl(stdout) {
|
|
1391
|
-
let sawWikiLookup = false;
|
|
1392
|
-
for (const event of jsonlEvents(stdout)) {
|
|
1393
|
-
if (event.type !== "tool_execution_start") continue;
|
|
1394
|
-
const toolName = stringField(event, "toolName");
|
|
1395
|
-
if (toolName === "code_nav" && isRecord5(event.args) && event.args.mode === "wiki") {
|
|
1396
|
-
sawWikiLookup = true;
|
|
1397
|
-
continue;
|
|
1398
|
-
}
|
|
1399
|
-
if (sawWikiLookup && (toolName === "read" || toolName === "grep")) return true;
|
|
1400
|
-
}
|
|
1401
|
-
return false;
|
|
1402
|
-
}
|
|
1403
|
-
function* jsonlEvents(stdout) {
|
|
1404
|
-
for (const line of stdout.split(/\r?\n/)) {
|
|
1405
|
-
if (line.trim().length === 0) continue;
|
|
1406
|
-
try {
|
|
1407
|
-
const parsed = JSON.parse(line);
|
|
1408
|
-
if (isRecord5(parsed)) yield parsed;
|
|
1409
|
-
} catch {
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
function stringField(record, field) {
|
|
1414
|
-
const value = record[field];
|
|
1415
|
-
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
1416
|
-
}
|
|
1417
|
-
function isRecord5(value) {
|
|
1418
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1419
|
-
}
|
|
1420
1327
|
|
|
1421
1328
|
// src/domains/eval/metrics/token-stream.ts
|
|
1422
1329
|
init_esm_shims();
|
|
@@ -1438,10 +1345,10 @@ function createTokenUsageFold() {
|
|
|
1438
1345
|
} catch {
|
|
1439
1346
|
return;
|
|
1440
1347
|
}
|
|
1441
|
-
if (!
|
|
1442
|
-
const message =
|
|
1348
|
+
if (!isRecord5(event) || event.type !== "message_end") return;
|
|
1349
|
+
const message = isRecord5(event.message) ? event.message : void 0;
|
|
1443
1350
|
if (message === void 0 || message.role !== "assistant") return;
|
|
1444
|
-
const usage =
|
|
1351
|
+
const usage = isRecord5(message.usage) ? message.usage : void 0;
|
|
1445
1352
|
if (usage === void 0) return;
|
|
1446
1353
|
measured = true;
|
|
1447
1354
|
const input = numberField2(usage, "input");
|
|
@@ -1454,7 +1361,7 @@ function createTokenUsageFold() {
|
|
|
1454
1361
|
tokens.cacheRead += cacheRead;
|
|
1455
1362
|
tokens.cacheWrite += cacheWrite;
|
|
1456
1363
|
tokens.total += totalTokens > 0 ? totalTokens : input + output + cacheRead + cacheWrite;
|
|
1457
|
-
if (
|
|
1364
|
+
if (isRecord5(usage.cost)) costUsd += numberField2(usage.cost, "total");
|
|
1458
1365
|
};
|
|
1459
1366
|
return {
|
|
1460
1367
|
push(chunk) {
|
|
@@ -1504,7 +1411,7 @@ function numberField2(record, field) {
|
|
|
1504
1411
|
const value = record[field];
|
|
1505
1412
|
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
1506
1413
|
}
|
|
1507
|
-
function
|
|
1414
|
+
function isRecord5(value) {
|
|
1508
1415
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1509
1416
|
}
|
|
1510
1417
|
|
|
@@ -1512,76 +1419,6 @@ function isRecord6(value) {
|
|
|
1512
1419
|
init_esm_shims();
|
|
1513
1420
|
import { spawn } from "node:child_process";
|
|
1514
1421
|
import { performance } from "node:perf_hooks";
|
|
1515
|
-
|
|
1516
|
-
// src/domains/eval/metrics/chaos-stream.ts
|
|
1517
|
-
init_esm_shims();
|
|
1518
|
-
var EMPTY_CHAOS_OBSERVATION = { markerCount: 0, marker: null };
|
|
1519
|
-
function createChaosFold() {
|
|
1520
|
-
let markerCount = 0;
|
|
1521
|
-
let marker = null;
|
|
1522
|
-
let pending = "";
|
|
1523
|
-
const consume = (line) => {
|
|
1524
|
-
if (line.trim().length === 0) return;
|
|
1525
|
-
let parsed;
|
|
1526
|
-
try {
|
|
1527
|
-
parsed = JSON.parse(line);
|
|
1528
|
-
} catch {
|
|
1529
|
-
return;
|
|
1530
|
-
}
|
|
1531
|
-
if (!isRecord7(parsed) || parsed.type !== "clio_soak_chaos") return;
|
|
1532
|
-
markerCount += 1;
|
|
1533
|
-
marker = parseChaosMarker(parsed);
|
|
1534
|
-
};
|
|
1535
|
-
return {
|
|
1536
|
-
push(chunk) {
|
|
1537
|
-
pending += chunk;
|
|
1538
|
-
for (; ; ) {
|
|
1539
|
-
const newline = pending.indexOf("\n");
|
|
1540
|
-
if (newline === -1) break;
|
|
1541
|
-
consume(pending.slice(0, newline).replace(/\r$/u, ""));
|
|
1542
|
-
pending = pending.slice(newline + 1);
|
|
1543
|
-
}
|
|
1544
|
-
},
|
|
1545
|
-
observation() {
|
|
1546
|
-
if (pending.length > 0) {
|
|
1547
|
-
consume(pending.replace(/\r$/u, ""));
|
|
1548
|
-
pending = "";
|
|
1549
|
-
}
|
|
1550
|
-
return { markerCount, marker: marker === null ? null : { ...marker } };
|
|
1551
|
-
}
|
|
1552
|
-
};
|
|
1553
|
-
}
|
|
1554
|
-
function addChaosObservations(left, right) {
|
|
1555
|
-
const markerCount = left.markerCount + right.markerCount;
|
|
1556
|
-
return {
|
|
1557
|
-
markerCount,
|
|
1558
|
-
marker: markerCount === 1 ? left.marker ?? right.marker : null
|
|
1559
|
-
};
|
|
1560
|
-
}
|
|
1561
|
-
function chaosMetricEntries(observation) {
|
|
1562
|
-
if (observation.markerCount !== 1 || observation.marker === null) return {};
|
|
1563
|
-
return {
|
|
1564
|
-
"chaos.seed": observation.marker.seed,
|
|
1565
|
-
"chaos.faultInjected": observation.marker.faultInjected,
|
|
1566
|
-
"chaos.exitCode": observation.marker.exitCode,
|
|
1567
|
-
"process.orphanedChildren": observation.marker.orphanedChildren
|
|
1568
|
-
};
|
|
1569
|
-
}
|
|
1570
|
-
function parseChaosMarker(event) {
|
|
1571
|
-
if (event.type !== "clio_soak_chaos") return null;
|
|
1572
|
-
const { seed, faultInjected, exitCode, orphanedChildren } = event;
|
|
1573
|
-
if (!isFiniteInteger2(seed) || typeof faultInjected !== "boolean" || !isFiniteInteger2(exitCode)) return null;
|
|
1574
|
-
if (!isFiniteInteger2(orphanedChildren) || orphanedChildren < 0) return null;
|
|
1575
|
-
return { seed, faultInjected, exitCode, orphanedChildren };
|
|
1576
|
-
}
|
|
1577
|
-
function isFiniteInteger2(value) {
|
|
1578
|
-
return typeof value === "number" && Number.isFinite(value) && Number.isInteger(value);
|
|
1579
|
-
}
|
|
1580
|
-
function isRecord7(value) {
|
|
1581
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
|
-
// src/domains/eval/runners/external-command.ts
|
|
1585
1422
|
var OUTPUT_LIMIT = 2e5;
|
|
1586
1423
|
var OUTPUT_HEAD_LIMIT = 2e4;
|
|
1587
1424
|
var OUTPUT_TRUNCATION_MARKER = "\n[output middle truncated; tail preserved]\n";
|
|
@@ -1595,7 +1432,6 @@ async function runExternalCommandRunner(runner, cwd, timeoutMs, env) {
|
|
|
1595
1432
|
let wallTimeMs = 0;
|
|
1596
1433
|
let usage = UNMEASURED_TOKEN_USAGE;
|
|
1597
1434
|
let streamInvariants = EMPTY_STREAM_INVARIANTS;
|
|
1598
|
-
let chaos = EMPTY_CHAOS_OBSERVATION;
|
|
1599
1435
|
let fleetLoops = EMPTY_FLEET_LOOP_OBSERVATION;
|
|
1600
1436
|
for (const command of commands) {
|
|
1601
1437
|
const result = await runShellCommand(command, cwd, runner.timeoutMs ?? timeoutMs, env);
|
|
@@ -1604,7 +1440,6 @@ async function runExternalCommandRunner(runner, cwd, timeoutMs, env) {
|
|
|
1604
1440
|
wallTimeMs += result.wallTimeMs;
|
|
1605
1441
|
usage = addTokenStreamUsage(usage, result.usage);
|
|
1606
1442
|
streamInvariants = addStreamInvariants(streamInvariants, result.streamInvariants);
|
|
1607
|
-
chaos = addChaosObservations(chaos, result.chaos);
|
|
1608
1443
|
fleetLoops = addFleetLoopObservations(fleetLoops, result.fleetLoops);
|
|
1609
1444
|
if (result.exitCode !== 0) {
|
|
1610
1445
|
return {
|
|
@@ -1618,11 +1453,10 @@ async function runExternalCommandRunner(runner, cwd, timeoutMs, env) {
|
|
|
1618
1453
|
"latency.wallMs": wallTimeMs,
|
|
1619
1454
|
...tokenMetricEntries(usage),
|
|
1620
1455
|
...streamInvariantMetrics(streamInvariants),
|
|
1621
|
-
...chaosMetricEntries(chaos),
|
|
1622
1456
|
...fleetLoopMetricEntries(fleetLoops),
|
|
1623
1457
|
"verifier.exitCode": result.exitCode
|
|
1624
1458
|
},
|
|
1625
|
-
artifacts:
|
|
1459
|
+
artifacts: {}
|
|
1626
1460
|
};
|
|
1627
1461
|
}
|
|
1628
1462
|
}
|
|
@@ -1637,11 +1471,10 @@ async function runExternalCommandRunner(runner, cwd, timeoutMs, env) {
|
|
|
1637
1471
|
"latency.wallMs": wallTimeMs,
|
|
1638
1472
|
...tokenMetricEntries(usage),
|
|
1639
1473
|
...streamInvariantMetrics(streamInvariants),
|
|
1640
|
-
...chaosMetricEntries(chaos),
|
|
1641
1474
|
...fleetLoopMetricEntries(fleetLoops),
|
|
1642
1475
|
"verifier.exitCode": 0
|
|
1643
1476
|
},
|
|
1644
|
-
artifacts:
|
|
1477
|
+
artifacts: {}
|
|
1645
1478
|
};
|
|
1646
1479
|
}
|
|
1647
1480
|
function runShellCommand(command, cwd, timeoutMs, env) {
|
|
@@ -1652,7 +1485,6 @@ function runShellCommand(command, cwd, timeoutMs, env) {
|
|
|
1652
1485
|
const metricCapture = createJsonlMetricCapture();
|
|
1653
1486
|
const usageFold = createTokenUsageFold();
|
|
1654
1487
|
const streamFold = createStreamInvariantFold();
|
|
1655
|
-
const chaosFold = createChaosFold();
|
|
1656
1488
|
const fleetLoopFold = createFleetLoopFold();
|
|
1657
1489
|
let timedOut = false;
|
|
1658
1490
|
let settled = false;
|
|
@@ -1671,7 +1503,6 @@ function runShellCommand(command, cwd, timeoutMs, env) {
|
|
|
1671
1503
|
metricCapture.push(chunk);
|
|
1672
1504
|
usageFold.push(chunk);
|
|
1673
1505
|
streamFold.push(chunk);
|
|
1674
|
-
chaosFold.push(chunk);
|
|
1675
1506
|
fleetLoopFold.push(chunk);
|
|
1676
1507
|
});
|
|
1677
1508
|
child.stderr.on("data", (chunk) => {
|
|
@@ -1693,7 +1524,6 @@ function runShellCommand(command, cwd, timeoutMs, env) {
|
|
|
1693
1524
|
metricJsonl: metricCapture.finish(),
|
|
1694
1525
|
usage: usageFold.usage(),
|
|
1695
1526
|
streamInvariants: streamFold.invariants(),
|
|
1696
|
-
chaos: chaosFold.observation(),
|
|
1697
1527
|
fleetLoops: fleetLoopFold.observation(),
|
|
1698
1528
|
stderr,
|
|
1699
1529
|
wallTimeMs: Math.round(performance.now() - started),
|
|
@@ -1728,7 +1558,7 @@ function createJsonlMetricCapture() {
|
|
|
1728
1558
|
} catch {
|
|
1729
1559
|
return;
|
|
1730
1560
|
}
|
|
1731
|
-
if (!
|
|
1561
|
+
if (!isRecord6(parsed)) return;
|
|
1732
1562
|
const compact = compactMetricEvent(parsed);
|
|
1733
1563
|
if (compact === null) return;
|
|
1734
1564
|
const encoded = JSON.stringify(compact);
|
|
@@ -1773,48 +1603,41 @@ function createJsonlMetricCapture() {
|
|
|
1773
1603
|
}
|
|
1774
1604
|
function compactMetricEvent(event) {
|
|
1775
1605
|
const type = event.type;
|
|
1776
|
-
if (type === "clio_soak_chaos") {
|
|
1777
|
-
const marker = parseChaosMarker(event);
|
|
1778
|
-
return marker === null ? null : { type, ...marker };
|
|
1779
|
-
}
|
|
1780
1606
|
if (type === "tool_execution_start") {
|
|
1781
|
-
const toolName =
|
|
1607
|
+
const toolName = stringField(event, "toolName");
|
|
1782
1608
|
if (toolName !== "dispatch" && toolName !== "code_nav" && toolName !== "read" && toolName !== "grep") {
|
|
1783
1609
|
return null;
|
|
1784
1610
|
}
|
|
1785
1611
|
return {
|
|
1786
1612
|
type,
|
|
1787
|
-
...
|
|
1613
|
+
...stringField(event, "toolCallId") !== void 0 ? { toolCallId: stringField(event, "toolCallId") } : {},
|
|
1788
1614
|
toolName,
|
|
1789
|
-
...toolName === "dispatch" &&
|
|
1615
|
+
...toolName === "dispatch" && isRecord6(event.args) ? { args: event.args } : toolName === "code_nav" && isRecord6(event.args) ? { args: { mode: event.args.mode } } : {}
|
|
1790
1616
|
};
|
|
1791
1617
|
}
|
|
1792
1618
|
if (type === "tool_execution_end") {
|
|
1793
1619
|
return {
|
|
1794
1620
|
type,
|
|
1795
|
-
...
|
|
1796
|
-
...
|
|
1621
|
+
...stringField(event, "toolCallId") !== void 0 ? { toolCallId: stringField(event, "toolCallId") } : {},
|
|
1622
|
+
...stringField(event, "toolName") !== void 0 ? { toolName: stringField(event, "toolName") } : {},
|
|
1797
1623
|
...event.isError === true ? { isError: true } : {},
|
|
1798
|
-
...
|
|
1624
|
+
...stringField(event, "outcome") !== void 0 ? { outcome: stringField(event, "outcome") } : {}
|
|
1799
1625
|
};
|
|
1800
1626
|
}
|
|
1801
|
-
if (type !== "clio_tool_finish" || !
|
|
1627
|
+
if (type !== "clio_tool_finish" || !isRecord6(event.payload)) return null;
|
|
1802
1628
|
return {
|
|
1803
1629
|
type,
|
|
1804
1630
|
payload: {
|
|
1805
|
-
...
|
|
1806
|
-
...
|
|
1807
|
-
...
|
|
1631
|
+
...stringField(event.payload, "tool") !== void 0 ? { tool: stringField(event.payload, "tool") } : {},
|
|
1632
|
+
...stringField(event.payload, "toolCallId") !== void 0 ? { toolCallId: stringField(event.payload, "toolCallId") } : stringField(event, "toolCallId") !== void 0 ? { toolCallId: stringField(event, "toolCallId") } : {},
|
|
1633
|
+
...stringField(event.payload, "outcome") !== void 0 ? { outcome: stringField(event.payload, "outcome") } : {}
|
|
1808
1634
|
}
|
|
1809
1635
|
};
|
|
1810
1636
|
}
|
|
1811
|
-
function
|
|
1812
|
-
return observation.markerCount === 1 && observation.marker !== null ? { chaosSeed: String(observation.marker.seed) } : {};
|
|
1813
|
-
}
|
|
1814
|
-
function isRecord8(value) {
|
|
1637
|
+
function isRecord6(value) {
|
|
1815
1638
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1816
1639
|
}
|
|
1817
|
-
function
|
|
1640
|
+
function stringField(record, field) {
|
|
1818
1641
|
const value = record[field];
|
|
1819
1642
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
1820
1643
|
}
|
|
@@ -1855,9 +1678,6 @@ async function runClioRunRunner(runner, cwd, clioEntry, timeoutMs, target, env)
|
|
|
1855
1678
|
"tools.failed": tools.failed,
|
|
1856
1679
|
"tools.blocked": tools.blocked,
|
|
1857
1680
|
"verifier.exitCode": result.exitCode,
|
|
1858
|
-
"dispatch.count": dispatchCountFromJsonl(toolMetricStream),
|
|
1859
|
-
"dispatch.scoutCount": scoutDispatchCountFromJsonl(toolMetricStream),
|
|
1860
|
-
"wiki.staleAcknowledged": wikiStaleAcknowledgedFromJsonl(toolMetricStream),
|
|
1861
1681
|
...receipt === null ? {} : evidenceMetricsFromReceipt(receipt),
|
|
1862
1682
|
...receipt === null ? {} : { "evidence.qualityLabel": receipt.quality.typedValidations.length > 0 ? "measured" : "unmeasured" }
|
|
1863
1683
|
},
|
|
@@ -1878,13 +1698,13 @@ function toolCallMetricsFromJsonl(stdout) {
|
|
|
1878
1698
|
let event;
|
|
1879
1699
|
try {
|
|
1880
1700
|
const parsed = JSON.parse(line);
|
|
1881
|
-
if (!
|
|
1701
|
+
if (!isRecord7(parsed)) continue;
|
|
1882
1702
|
event = parsed;
|
|
1883
1703
|
} catch {
|
|
1884
1704
|
continue;
|
|
1885
1705
|
}
|
|
1886
1706
|
if (event.type === "tool_execution_end") {
|
|
1887
|
-
const callId2 =
|
|
1707
|
+
const callId2 = stringField2(event, "toolCallId");
|
|
1888
1708
|
if (callId2 !== void 0) {
|
|
1889
1709
|
if (seenExecutionEnds.has(callId2)) continue;
|
|
1890
1710
|
seenExecutionEnds.add(callId2);
|
|
@@ -1892,10 +1712,10 @@ function toolCallMetricsFromJsonl(stdout) {
|
|
|
1892
1712
|
recordToolOutcome(executionEnds, toolOutcome(event) ?? (event.isError === true ? "error" : "ok"));
|
|
1893
1713
|
continue;
|
|
1894
1714
|
}
|
|
1895
|
-
if (event.type !== "clio_tool_finish" || !
|
|
1715
|
+
if (event.type !== "clio_tool_finish" || !isRecord7(event.payload)) continue;
|
|
1896
1716
|
const outcome = toolOutcome(event.payload);
|
|
1897
1717
|
if (outcome === void 0) continue;
|
|
1898
|
-
const callId =
|
|
1718
|
+
const callId = stringField2(event.payload, "toolCallId") ?? stringField2(event, "toolCallId");
|
|
1899
1719
|
if (callId !== void 0) {
|
|
1900
1720
|
if (seenCanonicalFinishes.has(callId)) continue;
|
|
1901
1721
|
seenCanonicalFinishes.add(callId);
|
|
@@ -1913,11 +1733,11 @@ function toolOutcome(record) {
|
|
|
1913
1733
|
const outcome = record.outcome;
|
|
1914
1734
|
return outcome === "ok" || outcome === "error" || outcome === "blocked" ? outcome : void 0;
|
|
1915
1735
|
}
|
|
1916
|
-
function
|
|
1736
|
+
function stringField2(record, field) {
|
|
1917
1737
|
const value = record[field];
|
|
1918
1738
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
1919
1739
|
}
|
|
1920
|
-
function
|
|
1740
|
+
function isRecord7(value) {
|
|
1921
1741
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1922
1742
|
}
|
|
1923
1743
|
|
|
@@ -1995,12 +1815,12 @@ async function runContextInitRunner(runner, cwd, clioEntry, timeoutMs, target, e
|
|
|
1995
1815
|
` : result.stderr;
|
|
1996
1816
|
const run = recordField(generation, "run");
|
|
1997
1817
|
const tokens = recordField(run, "tokens");
|
|
1998
|
-
const effectiveTarget =
|
|
1999
|
-
const effectiveModel =
|
|
2000
|
-
const effectiveRuntime =
|
|
2001
|
-
const effectiveRuntimeKind =
|
|
2002
|
-
const effectiveThinking =
|
|
2003
|
-
const structuredOutputMode =
|
|
1818
|
+
const effectiveTarget = stringField3(run, "targetId");
|
|
1819
|
+
const effectiveModel = stringField3(run, "wireModelId");
|
|
1820
|
+
const effectiveRuntime = stringField3(run, "runtimeId");
|
|
1821
|
+
const effectiveRuntimeKind = stringField3(run, "runtimeKind");
|
|
1822
|
+
const effectiveThinking = stringField3(run, "thinkingLevel");
|
|
1823
|
+
const structuredOutputMode = stringField3(run, "structuredOutputMode");
|
|
2004
1824
|
const clioMdPath = join2(cwd, "CLIO-CODER.md");
|
|
2005
1825
|
const clioMdBytes = existsSync2(clioMdPath) ? statSync(clioMdPath).size : 0;
|
|
2006
1826
|
return {
|
|
@@ -2022,9 +1842,9 @@ async function runContextInitRunner(runner, cwd, clioEntry, timeoutMs, target, e
|
|
|
2022
1842
|
"tools.failed": numberField3(run, "toolFailures"),
|
|
2023
1843
|
"tools.blocked": numberField3(run, "toolBlocked"),
|
|
2024
1844
|
"context.clioMdBytes": clioMdBytes,
|
|
2025
|
-
"context.initMode":
|
|
2026
|
-
"context.initParserOutcome":
|
|
2027
|
-
"context.initFallback":
|
|
1845
|
+
"context.initMode": stringField3(generation, "mode") ?? "unknown",
|
|
1846
|
+
"context.initParserOutcome": stringField3(generation, "parserOutcome") ?? "unknown",
|
|
1847
|
+
"context.initFallback": stringField3(generation, "fallbackReason") !== null,
|
|
2028
1848
|
"context.initPromptBytes": numberField3(run, "promptBytes"),
|
|
2029
1849
|
"context.initOutputBytes": numberField3(run, "outputBytes"),
|
|
2030
1850
|
"context.initTargetId": effectiveTarget,
|
|
@@ -2045,7 +1865,7 @@ async function runContextInitRunner(runner, cwd, clioEntry, timeoutMs, target, e
|
|
|
2045
1865
|
effectiveModel,
|
|
2046
1866
|
effectiveRuntime,
|
|
2047
1867
|
effectiveThinking,
|
|
2048
|
-
bootstrapRunId:
|
|
1868
|
+
bootstrapRunId: stringField3(run, "runId")
|
|
2049
1869
|
}
|
|
2050
1870
|
};
|
|
2051
1871
|
}
|
|
@@ -2099,9 +1919,9 @@ function isValidGenerationPayload(payload, generation) {
|
|
|
2099
1919
|
function generationRouteError(generation, target) {
|
|
2100
1920
|
const run = recordField(generation, "run");
|
|
2101
1921
|
if (!run) return null;
|
|
2102
|
-
const actualTarget =
|
|
2103
|
-
const actualModel =
|
|
2104
|
-
const actualThinking =
|
|
1922
|
+
const actualTarget = stringField3(run, "targetId");
|
|
1923
|
+
const actualModel = stringField3(run, "wireModelId");
|
|
1924
|
+
const actualThinking = stringField3(run, "thinkingLevel");
|
|
2105
1925
|
if (actualTarget !== null && actualTarget !== target.id) {
|
|
2106
1926
|
return `context-init runner requested target '${target.id}' but the bootstrap receipt used '${actualTarget}'`;
|
|
2107
1927
|
}
|
|
@@ -2130,7 +1950,7 @@ function numberField3(value, field) {
|
|
|
2130
1950
|
const selected = record?.[field];
|
|
2131
1951
|
return typeof selected === "number" && Number.isFinite(selected) ? selected : null;
|
|
2132
1952
|
}
|
|
2133
|
-
function
|
|
1953
|
+
function stringField3(value, field) {
|
|
2134
1954
|
const record = recordField(value);
|
|
2135
1955
|
const selected = record?.[field];
|
|
2136
1956
|
return typeof selected === "string" && selected.length > 0 ? selected : null;
|
|
@@ -2325,7 +2145,7 @@ async function runMatrixItem(loaded, task, target, repeatIndex, clioEntry) {
|
|
|
2325
2145
|
CLIO_CODER_ENTRY: clioEntry
|
|
2326
2146
|
});
|
|
2327
2147
|
const patch = collectPatchMetrics(workspace.dir);
|
|
2328
|
-
const receiptExitCode =
|
|
2148
|
+
const receiptExitCode = runner.exitCode;
|
|
2329
2149
|
const journalMetrics = invariantMetrics(stateDir, receiptExitCode);
|
|
2330
2150
|
const metrics = {
|
|
2331
2151
|
...zeroToolCallMetrics(),
|
|
@@ -2388,10 +2208,6 @@ async function runMatrixItem(loaded, task, target, repeatIndex, clioEntry) {
|
|
|
2388
2208
|
await rm3(stateDir, { recursive: true, force: true });
|
|
2389
2209
|
}
|
|
2390
2210
|
}
|
|
2391
|
-
function receiptProcessExitCode(runner) {
|
|
2392
|
-
const chaosExitCode = runner.metrics["chaos.exitCode"];
|
|
2393
|
-
return typeof chaosExitCode === "number" && Number.isInteger(chaosExitCode) ? chaosExitCode : runner.exitCode;
|
|
2394
|
-
}
|
|
2395
2211
|
function invariantMetrics(stateDir, runnerExitCode) {
|
|
2396
2212
|
const journal = readRunJournal(stateDir);
|
|
2397
2213
|
return {
|
|
@@ -2738,4 +2554,4 @@ function reportFormat(value) {
|
|
|
2738
2554
|
export {
|
|
2739
2555
|
runEvalCommand
|
|
2740
2556
|
};
|
|
2741
|
-
//# sourceMappingURL=eval-
|
|
2557
|
+
//# sourceMappingURL=eval-RUBJVSNQ.js.map
|
|
@@ -7,59 +7,65 @@ import {
|
|
|
7
7
|
listEvidenceOverviews,
|
|
8
8
|
loadEvidenceRunProvenance,
|
|
9
9
|
provenanceTranscriptLines
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-UUANF5CR.js";
|
|
11
|
+
import "./chunk-6TUKSZVF.js";
|
|
12
|
+
import "./chunk-KZ2H5X4G.js";
|
|
13
|
+
import "./chunk-M4AKACEO.js";
|
|
14
|
+
import "./chunk-RVG5JXAL.js";
|
|
15
|
+
import "./chunk-ZGH7FGS5.js";
|
|
16
|
+
import "./chunk-TSHXZTOQ.js";
|
|
15
17
|
import "./chunk-TXOTCRLG.js";
|
|
16
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-HVDIIIQW.js";
|
|
17
19
|
import "./chunk-W6GROXXM.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-KCMKRQX4.js";
|
|
21
|
+
import "./chunk-CEYBNUGC.js";
|
|
22
|
+
import "./chunk-5FR74PWO.js";
|
|
23
|
+
import "./chunk-OBMAI2DP.js";
|
|
24
|
+
import "./chunk-5C77SEEY.js";
|
|
25
|
+
import "./chunk-UND3GU2L.js";
|
|
24
26
|
import "./chunk-CMZWFGD2.js";
|
|
25
27
|
import "./chunk-I4HZDVNP.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-UL3WSD3F.js";
|
|
28
|
+
import "./chunk-GH5622CP.js";
|
|
28
29
|
import "./chunk-OQE5J4C6.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-GOXNB3AO.js";
|
|
31
|
+
import "./chunk-HWUFFB6L.js";
|
|
32
|
+
import "./chunk-DJNLUABN.js";
|
|
33
|
+
import "./chunk-AOCYTWAV.js";
|
|
34
|
+
import "./chunk-MV3K5QF2.js";
|
|
35
|
+
import "./chunk-UL3WSD3F.js";
|
|
36
|
+
import "./chunk-ODFEOB4F.js";
|
|
32
37
|
import "./chunk-OZNBF4L3.js";
|
|
33
38
|
import "./chunk-4BJ5BYCE.js";
|
|
39
|
+
import "./chunk-ECH6PKUQ.js";
|
|
34
40
|
import "./chunk-6XLNIQDB.js";
|
|
35
41
|
import "./chunk-5B2AEOW5.js";
|
|
36
42
|
import "./chunk-CGKSTWHD.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-XAKHZX5N.js";
|
|
44
|
+
import "./chunk-33YXPOE3.js";
|
|
45
|
+
import "./chunk-465YSENW.js";
|
|
40
46
|
import {
|
|
41
47
|
printError,
|
|
42
48
|
printOk
|
|
43
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-PPAMZ32Z.js";
|
|
44
50
|
import "./chunk-5TSRNF4G.js";
|
|
45
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-VQNODYQ4.js";
|
|
46
52
|
import "./chunk-CFGTUFWB.js";
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-4OC57DA6.js";
|
|
49
|
-
import "./chunk-LL4KHSZI.js";
|
|
50
|
-
import "./chunk-4VP4KH3K.js";
|
|
51
|
-
import "./chunk-VEZEGCGW.js";
|
|
52
|
-
import "./chunk-FQ4SKYE4.js";
|
|
53
|
-
import "./chunk-IKCO5N3L.js";
|
|
54
|
-
import "./chunk-3I7MS7N2.js";
|
|
53
|
+
import "./chunk-JRIO5UD2.js";
|
|
55
54
|
import "./chunk-IHXBNWMM.js";
|
|
56
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-GEYXPTRF.js";
|
|
56
|
+
import "./chunk-UHXRNZ2J.js";
|
|
57
|
+
import "./chunk-4DGYLA73.js";
|
|
58
|
+
import "./chunk-LL4KHSZI.js";
|
|
57
59
|
import "./chunk-SST6Z5JA.js";
|
|
58
60
|
import "./chunk-FO5ZOVUY.js";
|
|
59
61
|
import {
|
|
60
62
|
InvalidIdError
|
|
61
63
|
} from "./chunk-R346GLFC.js";
|
|
64
|
+
import "./chunk-D4MDIG46.js";
|
|
65
|
+
import "./chunk-FQ4SKYE4.js";
|
|
62
66
|
import "./chunk-4ZG3XFUR.js";
|
|
67
|
+
import "./chunk-IKCO5N3L.js";
|
|
68
|
+
import "./chunk-3I7MS7N2.js";
|
|
63
69
|
import "./chunk-FCSXB6T2.js";
|
|
64
70
|
import "./chunk-APJ265NV.js";
|
|
65
71
|
import "./chunk-YXLYO42X.js";
|
|
@@ -70,7 +76,7 @@ import {
|
|
|
70
76
|
import "./chunk-6EJMN2Y3.js";
|
|
71
77
|
import "./chunk-WEPFGWHJ.js";
|
|
72
78
|
import "./chunk-ZGVHUX3M.js";
|
|
73
|
-
import "./chunk-
|
|
79
|
+
import "./chunk-OB5HIGJY.js";
|
|
74
80
|
import "./chunk-7CR24IG7.js";
|
|
75
81
|
import "./chunk-IWHMRKLL.js";
|
|
76
82
|
import {
|
|
@@ -286,4 +292,4 @@ function formatList(values) {
|
|
|
286
292
|
export {
|
|
287
293
|
runEvidenceCommand
|
|
288
294
|
};
|
|
289
|
-
//# sourceMappingURL=evidence-
|
|
295
|
+
//# sourceMappingURL=evidence-JZNBUOQZ.js.map
|