@iowarp/clio-coder 0.3.8 → 0.3.9
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 +49 -0
- package/README.md +7 -3
- package/dist/{acp-U67UHUK2.js → acp-7LOELQFP.js} +6 -6
- package/dist/{agents-YU6SGALZ.js → agents-FIBG2SHA.js} +27 -25
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-5ZPJOIVG.js → auth-OI4LIH2I.js} +11 -12
- package/dist/{builtins-C6JMZVV6.js → builtins-AD25UL3C.js} +5 -5
- package/dist/{chunk-5FR74PWO.js → chunk-2JDWVJND.js} +2 -2
- package/dist/chunk-3DPEIQKN.js +113 -0
- package/dist/{chunk-4SPRNWDE.js → chunk-3DUR4WUA.js} +15 -15
- package/dist/{chunk-VHN4MY6O.js → chunk-3MRC2YSQ.js} +2 -2
- package/dist/{chunk-5DHKRSMQ.js → chunk-3UUY7R3Z.js} +11 -7
- package/dist/{chunk-IGWKHNIQ.js → chunk-3V5AYSEQ.js} +8 -8
- package/dist/{chunk-FHJEP5SW.js → chunk-465CC7FK.js} +8 -5
- package/dist/{chunk-5WIGXA4T.js → chunk-47CMYGET.js} +111 -4
- package/dist/{chunk-A3WNZD3P.js → chunk-4H6ULJ3H.js} +67 -21
- package/dist/{chunk-TB5666IT.js → chunk-4LJX2PUC.js} +3 -3
- package/dist/{chunk-XWSF374K.js → chunk-56KB5IJP.js} +2 -2
- package/dist/{chunk-SPULKLCF.js → chunk-5DQRIYDZ.js} +2 -2
- package/dist/{chunk-2HEJ2F35.js → chunk-5HFBWUMU.js} +20 -8
- package/dist/{chunk-WNIJTQQK.js → chunk-5PVQ4SRS.js} +78 -6
- package/dist/{chunk-DYIM5TJT.js → chunk-5QKCQQ3E.js} +262 -6
- package/dist/{chunk-TYPGUK6W.js → chunk-5T7RBWN2.js} +111 -5
- package/dist/{chunk-IIZWH4XA.js → chunk-774ILSRL.js} +2 -2
- package/dist/chunk-7C6RYZGQ.js +391 -0
- package/dist/{chunk-TANS5ZJS.js → chunk-AD7Y7STJ.js} +3 -3
- package/dist/{chunk-RWSI4YD7.js → chunk-AEYBF3TB.js} +33 -12
- package/dist/{chunk-DGSYXYMX.js → chunk-AMKHQW3C.js} +2 -2
- package/dist/{chunk-VWZOAB7K.js → chunk-B5XRQOLB.js} +7 -7
- package/dist/{chunk-WXY7KU3G.js → chunk-BVDVID7E.js} +2 -2
- package/dist/{chunk-PMDBGQSJ.js → chunk-CA42X6KT.js} +2 -2
- package/dist/{chunk-HLE42MG7.js → chunk-D73KXYPF.js} +3 -3
- package/dist/{chunk-5Q2VVUKB.js → chunk-DG4M6ZUE.js} +3 -3
- package/dist/{chunk-ME6CCNFO.js → chunk-EBOC7MT3.js} +6 -6
- package/dist/{chunk-MXKJU4JB.js → chunk-ECUO3KDP.js} +48 -7
- package/dist/{chunk-26LEYJZH.js → chunk-FALJGAWU.js} +2 -2
- package/dist/{chunk-GWS3VEIW.js → chunk-FWDFM5ZU.js} +24 -3
- package/dist/{chunk-7RGZWPB6.js → chunk-GAYUJ7LE.js} +67 -13
- package/dist/{chunk-VCBR6CU7.js → chunk-HAY4ZE2P.js} +2 -2
- package/dist/{chunk-FBVTI2TJ.js → chunk-HCBCAYZU.js} +11 -130
- package/dist/{chunk-WSB3FPX7.js → chunk-HJB5IUKP.js} +32 -136
- package/dist/{chunk-J3YUBZWY.js → chunk-HKO36JWF.js} +33 -5
- package/dist/{chunk-E77JEWSD.js → chunk-HPCTNZM2.js} +6 -36
- package/dist/{chunk-FJ3H4MN5.js → chunk-IHKBWSXF.js} +2 -2
- package/dist/{chunk-NMPKI6XL.js → chunk-JEQQR47K.js} +37 -18
- package/dist/{chunk-3BINW3FP.js → chunk-KV2AOLDF.js} +24 -4
- package/dist/{chunk-YS5VLNH5.js → chunk-LXPJXFM5.js} +7 -7
- package/dist/{chunk-7RFXX52T.js → chunk-MIX5N5AC.js} +271 -41
- package/dist/{chunk-K4XHGFR5.js → chunk-MLOK6ZOS.js} +1297 -218
- package/dist/{chunk-ZNLWCMVZ.js → chunk-MV2VUEJC.js} +2 -2
- package/dist/{chunk-MVVUPGPW.js → chunk-MXHC5QYU.js} +6 -6
- package/dist/{chunk-5H3GB5BO.js → chunk-N3PBVRTZ.js} +4 -382
- package/dist/{chunk-2HFZQUHL.js → chunk-N5XKWMDW.js} +17 -7
- package/dist/{chunk-5C3AQNDW.js → chunk-NNNWO6F2.js} +124 -36
- package/dist/{chunk-GU2UIAFZ.js → chunk-NQ6UCCOD.js} +3 -3
- package/dist/{chunk-N22QMJKY.js → chunk-NZU6YDNV.js} +4 -4
- package/dist/{chunk-ZVJ5BLO2.js → chunk-O6I4CIEU.js} +151 -13
- package/dist/{chunk-XN3L4EYL.js → chunk-OEDBCISO.js} +2 -2
- package/dist/{chunk-VAWNZU7Z.js → chunk-P3JGPQFL.js} +2 -2
- package/dist/{chunk-IJ7RPIYJ.js → chunk-PNY46YEY.js} +20 -3
- package/dist/{chunk-U6MBIEMB.js → chunk-PZ4I4JE2.js} +56 -35
- package/dist/{chunk-GPIEI3LY.js → chunk-QQ7EKM72.js} +2 -2
- package/dist/{chunk-WLFILSD5.js → chunk-R7LNVMCS.js} +66 -28
- package/dist/{chunk-GOXNB3AO.js → chunk-RAPCMZL4.js} +75 -4
- package/dist/chunk-RKKLTLYB.js +45 -0
- package/dist/{chunk-TT36MB5S.js → chunk-RKRLDWD3.js} +3 -1
- package/dist/{chunk-TTHACPOM.js → chunk-S4COXYBG.js} +456 -18
- package/dist/{chunk-WWCZ5F23.js → chunk-T3Z6VAAF.js} +69 -10
- package/dist/{chunk-GN57SG4G.js → chunk-TD7UE2L5.js} +9 -7
- package/dist/{chunk-TLQJPP24.js → chunk-TEO2TLVN.js} +523 -322
- package/dist/{chunk-FCSXB6T2.js → chunk-UOSL25KY.js} +14 -2
- package/dist/{chunk-KTYTFRMB.js → chunk-VKBMFOYV.js} +17 -15
- package/dist/{chunk-PT7HYKEM.js → chunk-VO2LKSTM.js} +2 -2
- package/dist/{chunk-P43ETTHK.js → chunk-VPTUJU4P.js} +2 -2
- package/dist/{chunk-WEH5XRJQ.js → chunk-WIE7ZOSW.js} +2 -2
- package/dist/{chunk-EMYUUSFG.js → chunk-WXCJ7VME.js} +5 -5
- package/dist/{chunk-4DGYLA73.js → chunk-XDOQXGFO.js} +22 -7
- package/dist/{chunk-JOZYP4GM.js → chunk-YKOFT37S.js} +5 -5
- package/dist/chunk-YSEHGPCT.js +127 -0
- package/dist/{chunk-HFSBBKSQ.js → chunk-YW7UVM5V.js} +138 -3
- package/dist/cli/index.js +27 -27
- package/dist/{clio-QVTYJ57A.js → clio-LT5V7SSZ.js} +6 -6
- package/dist/{code-nav-FGGFIE7L.js → code-nav-LMW275PA.js} +4 -4
- package/dist/{config-LW5IJFQN.js → config-RXS5T3JT.js} +71 -43
- package/dist/{configure-7XIZCOU4.js → configure-2WYWSCSD.js} +14 -15
- package/dist/{context-Y6Y7QPR6.js → context-I3BTOTCS.js} +12 -12
- package/dist/{context-L3WL3X7K.js → context-MVOORGMF.js} +34 -33
- package/dist/{context-N52ZA626.js → context-PALKKQYL.js} +20 -20
- package/dist/{context-clear-MBQRLSDQ.js → context-clear-N2WOYZ2K.js} +34 -33
- package/dist/{context-index-HVMFQHK3.js → context-index-HNG3MOME.js} +2 -2
- package/dist/{context-working-set-GS6DSO7F.js → context-working-set-MIEVECVZ.js} +10 -11
- package/dist/{dispatch-runner-22ZCNOM3.js → dispatch-runner-VVA4SRRH.js} +34 -33
- package/dist/doctor-TWBWFK5V.js +165 -0
- package/dist/{eval-BEC2WHDA.js → eval-IJ5VEZDJ.js} +2016 -142
- package/dist/{evidence-REJUMSKM.js → evidence-L5APPXNV.js} +29 -28
- package/dist/{evolve-PY5ZBA5K.js → evolve-RGNKFJ52.js} +29 -28
- package/dist/{extensions-HVKU65YU.js → extensions-7WYWUX5A.js} +9 -3
- package/dist/{fleet-7WZEWRFA.js → fleet-6CNVBZZP.js} +87 -55
- package/dist/{fleet-commands-UVHWM76J.js → fleet-commands-L2SXSYEI.js} +6 -6
- package/dist/{fleet-graph-6ULH7PES.js → fleet-graph-2J3OOIPO.js} +14 -12
- package/dist/{fleet-preflight-J53T6CCE.js → fleet-preflight-CZRJ4JP5.js} +3 -4
- package/dist/{fleet-validate-72PC4SLA.js → fleet-validate-C5RI6DP7.js} +16 -15
- package/dist/{init-OG3TPGQG.js → init-VBN2ACVA.js} +50 -48
- package/dist/{library-CNTMPLRF.js → library-JHGUMLY2.js} +13 -11
- package/dist/{memory-6IS7F275.js → memory-K4OQIYWG.js} +31 -30
- package/dist/{models-ENRJDA5W.js → models-2NCZUWDD.js} +23 -22
- package/dist/{monitor-XLDVO7TN.js → monitor-MMVTJABD.js} +35 -34
- package/dist/{orchestrator-6KSPYRHA.js → orchestrator-ZKBPCHW6.js} +1627 -294
- package/dist/{reset-RZ4ER727.js → reset-DD5JGOY3.js} +3 -3
- package/dist/{run-Y2CNK5RU.js → run-QEGNX7FL.js} +56 -55
- package/dist/{share-A55GYP6Z.js → share-JKD3BQMW.js} +13 -11
- package/dist/{skills-ALC5J6AT.js → skills-LMQIKDOZ.js} +14 -12
- package/dist/{skills-eval-JPBEBYQU.js → skills-eval-I7X2774U.js} +34 -32
- package/dist/{steer-GGWFUJUD.js → steer-CF5TDANS.js} +3 -3
- package/dist/{support-MIETYA5E.js → support-I7LOJLIF.js} +4 -4
- package/dist/{targets-VGNXIR3S.js → targets-RUSR6B5Z.js} +58 -32
- package/dist/{terminal-lease-WOBR64YA.js → terminal-lease-QYVORFR4.js} +6 -4
- package/dist/{trace-PNCASAXC.js → trace-ODOQIVIW.js} +61 -6
- package/dist/{upgrade-FUSUAGHR.js → upgrade-XANW3FXB.js} +17 -16
- package/dist/{usage-N4MKVHKD.js → usage-4H7ZRXQT.js} +88 -44
- package/dist/{verifiers-YAWOJ3H2.js → verifiers-UZXNBZEB.js} +6 -6
- package/dist/{verify-LTDHYBGY.js → verify-BVKWTNDL.js} +5 -5
- package/dist/{wiki-generate-6M7GHTBJ.js → wiki-generate-MY7WV2QI.js} +49 -47
- package/dist/worker/entry.js +29 -33
- package/docs/alcf-provider.md +1 -1
- package/docs/architecture.md +1 -1
- package/docs/artifact-versions.md +6 -1
- package/docs/built-in-agents.md +1 -1
- package/docs/capacity-and-scheduling.md +23 -2
- package/docs/commands-and-modes.md +1 -1
- package/docs/configuration-and-targets.md +30 -3
- package/docs/context-engine.md +63 -4
- package/docs/documentation-coverage.md +3 -3
- package/docs/documentation-guide.md +1 -1
- package/docs/environment-variables.md +2 -0
- package/docs/eval-runner.md +262 -11
- package/docs/evals-internal.md +72 -2
- package/docs/evidence-and-memory.md +11 -10
- package/docs/evolution.md +1 -1
- package/docs/extensions-and-sharing.md +3 -1
- package/docs/fleet-dispatch.md +4 -4
- package/docs/installation-and-lifecycle.md +1 -1
- package/docs/middleware-and-components.md +1 -1
- package/docs/model-catalog.md +1 -1
- package/docs/observability.md +53 -2
- package/docs/proactive-memory.md +127 -14
- package/docs/prompt-envelope-and-tools.md +19 -1
- package/docs/provider-adapter-cookbook.md +1 -1
- package/docs/release-cut-checklist.md +19 -3
- package/docs/safety-model.md +1 -1
- package/docs/scientific-validation.md +1 -1
- package/docs/skills-marketplace.md +1 -1
- package/docs/tool-usage.md +1 -1
- package/docs/trace-store.md +1 -1
- package/docs/troubleshooting.md +87 -0
- package/docs/tui-design.md +1 -1
- package/docs/worker-dispatch-mechanics.md +1 -1
- package/package.json +2 -1
- package/src/cli/agents.ts +1 -1
- package/src/cli/config-inspect.ts +33 -6
- package/src/cli/config.ts +1 -1
- package/src/cli/doctor-state-size.ts +82 -0
- package/src/cli/doctor.ts +3 -1
- package/src/cli/eval.ts +80 -16
- package/src/cli/extensions.ts +5 -1
- package/src/cli/fleet.ts +32 -3
- package/src/cli/targets.ts +44 -13
- package/src/cli/trace.ts +63 -4
- package/src/cli/usage.ts +63 -14
- package/src/core/bus-events.ts +29 -1
- package/src/core/cache-telemetry.ts +42 -0
- package/src/core/config.ts +18 -0
- package/src/core/defaults.ts +36 -6
- package/src/core/endpoint-key.ts +27 -0
- package/src/core/residency-target-key.ts +25 -0
- package/src/core/response-schema.ts +36 -2
- package/src/domains/config/classify.ts +3 -0
- package/src/domains/context/codewiki/coordinator.ts +12 -4
- package/src/domains/dispatch/admission.ts +40 -3
- package/src/domains/dispatch/capacity-lease.ts +98 -9
- package/src/domains/dispatch/contract.ts +11 -0
- package/src/domains/dispatch/execution-plan.ts +44 -4
- package/src/domains/dispatch/extension.ts +166 -42
- package/src/domains/dispatch/fleet-run.ts +23 -3
- package/src/domains/dispatch/heartbeat.ts +32 -8
- package/src/domains/dispatch/index.ts +3 -0
- package/src/domains/dispatch/orphan-recovery.ts +5 -0
- package/src/domains/dispatch/reservation-store.ts +116 -8
- package/src/domains/dispatch/state.ts +4 -0
- package/src/domains/dispatch/worker-spawn.ts +25 -11
- package/src/domains/dispatch/write-boundary-enforcer.ts +20 -3
- package/src/domains/dispatch/write-boundary.ts +62 -1
- package/src/domains/eval/artifacts/store.ts +62 -0
- package/src/domains/eval/compare/behavioral.ts +224 -0
- package/src/domains/eval/compare/compare.ts +355 -2
- package/src/domains/eval/compare/envelope.ts +128 -0
- package/src/domains/eval/compare/gates.ts +24 -6
- package/src/domains/eval/compare/thresholds.ts +30 -3
- package/src/domains/eval/execution-provenance.ts +240 -0
- package/src/domains/eval/metrics/aggregate.ts +136 -0
- package/src/domains/eval/metrics/call-ledger-stream.ts +112 -0
- package/src/domains/eval/metrics/tracked.ts +413 -0
- package/src/domains/eval/provenance.ts +117 -0
- package/src/domains/eval/reports/comparison.ts +128 -0
- package/src/domains/eval/reports/junit.ts +17 -3
- package/src/domains/eval/reports/markdown.ts +3 -3
- package/src/domains/eval/reports/text.ts +14 -0
- package/src/domains/eval/run-compare.ts +20 -0
- package/src/domains/eval/runners/clio-run.ts +127 -0
- package/src/domains/eval/runners/external-command.ts +28 -3
- package/src/domains/eval/schema/adapter.ts +111 -0
- package/src/domains/eval/schema/artifact.ts +20 -0
- package/src/domains/eval/schema/behavioral-metrics.ts +204 -0
- package/src/domains/eval/schema/behavioral.ts +520 -0
- package/src/domains/eval/schema/execution-envelope.ts +194 -0
- package/src/domains/eval/schema/serving.ts +74 -0
- package/src/domains/eval/schema/suite.ts +38 -8
- package/src/domains/eval/schema/validate.ts +58 -3
- package/src/domains/eval/schema/verdict.ts +237 -0
- package/src/domains/eval/suites/resolve.ts +2 -0
- package/src/domains/eval/suites/run.ts +264 -33
- package/src/domains/eval/verifiers/command.ts +2 -1
- package/src/domains/eval/workspaces/temp-copy.ts +145 -13
- package/src/domains/evidence/build.ts +2 -13
- package/src/domains/evidence/eval.ts +2 -12
- package/src/domains/evidence/findings-markdown.ts +33 -0
- package/src/domains/evidence/run-trust.ts +7 -113
- package/src/domains/evidence/trust-projection.ts +2 -2
- package/src/domains/extensions/compatibility.ts +285 -0
- package/src/domains/extensions/discovery.ts +38 -3
- package/src/domains/extensions/resources.ts +1 -1
- package/src/domains/extensions/state.ts +12 -3
- package/src/domains/extensions/types.ts +2 -0
- package/src/domains/lifecycle/doctor.ts +69 -1
- package/src/domains/memory/index.ts +14 -0
- package/src/domains/memory/task-bank-promotion.ts +64 -0
- package/src/domains/memory/task-memory-policy.ts +77 -8
- package/src/domains/memory/task-memory-spend.ts +131 -0
- package/src/domains/memory/task-memory-status.ts +7 -0
- package/src/domains/memory/task-memory-telemetry.ts +2 -0
- package/src/domains/middleware/index.ts +1 -0
- package/src/domains/middleware/memory-intervention.ts +69 -5
- package/src/domains/middleware/memory-step-endpoint.ts +71 -0
- package/src/domains/observability/background-memory-usage.ts +140 -0
- package/src/domains/observability/cost.ts +1 -1
- package/src/domains/observability/index.ts +7 -0
- package/src/domains/observability/out-of-turn-usage.ts +51 -2
- package/src/domains/observability/trace-store.ts +192 -2
- package/src/domains/prompts/compiler.ts +100 -13
- package/src/domains/providers/endpoint-capacity.ts +96 -0
- package/src/domains/providers/index.ts +10 -0
- package/src/domains/providers/models/local-models/clio-local-coding-targets.yaml +243 -1
- package/src/domains/providers/runtime-resolution.ts +8 -1
- package/src/domains/providers/runtimes/common/probe-helpers.ts +31 -9
- package/src/domains/providers/runtimes/local-native/llamacpp-anthropic.ts +1 -1
- package/src/domains/providers/runtimes/local-native/llamacpp-completion.ts +1 -1
- package/src/domains/providers/runtimes/local-native/llamacpp-embed.ts +1 -1
- package/src/domains/providers/runtimes/local-native/llamacpp-rerank.ts +1 -1
- package/src/domains/providers/runtimes/local-native/llamacpp.ts +4 -1
- package/src/domains/providers/runtimes/local-native/lmstudio.ts +4 -1
- package/src/domains/providers/runtimes/local-native/ollama-native.ts +6 -1
- package/src/domains/providers/types/capability-flags.ts +2 -0
- package/src/domains/providers/types/target-descriptor.ts +2 -0
- package/src/domains/resources/prompts/loader.ts +95 -33
- package/src/domains/safety/call-target.ts +52 -0
- package/src/domains/safety/run-effects.ts +35 -4
- package/src/domains/session/context-accounting.ts +52 -1
- package/src/domains/session/context-ledger.ts +37 -13
- package/src/domains/session/index.ts +6 -0
- package/src/domains/session/prompt-cache.ts +140 -0
- package/src/domains/session/prompt-manifest.ts +42 -0
- package/src/engine/acp/adapter.ts +18 -3
- package/src/engine/ai.ts +35 -0
- package/src/engine/apis/llamacpp-residency.ts +55 -3
- package/src/engine/apis/lmstudio.ts +25 -5
- package/src/engine/apis/ollama-native.ts +2 -1
- package/src/engine/apis/openai-completions.ts +80 -17
- package/src/engine/apis/residency-lock.ts +3 -1
- package/src/engine/apis/residency.ts +34 -1
- package/src/engine/provider-payload.ts +29 -1
- package/src/entry/orchestrator.ts +176 -30
- package/src/interactive/chat-loop-messages.ts +26 -7
- package/src/interactive/chat-loop.ts +318 -41
- package/src/interactive/chat-panel.ts +62 -8
- package/src/interactive/clio-editor.ts +45 -8
- package/src/interactive/context-activity.ts +5 -1
- package/src/interactive/context-meter.ts +1 -1
- package/src/interactive/context-overlay.ts +40 -10
- package/src/interactive/cost-overlay.ts +64 -6
- package/src/interactive/dispatch-board.ts +84 -12
- package/src/interactive/fleet-run-preview.ts +41 -15
- package/src/interactive/handoff-round.ts +41 -2
- package/src/interactive/interactive-application.ts +24 -1
- package/src/interactive/interactive-input-runtime.ts +8 -0
- package/src/interactive/interactive-presentation.ts +4 -0
- package/src/interactive/interactive-shell.ts +20 -17
- package/src/interactive/interactive-slash-runtime.ts +27 -4
- package/src/interactive/memory-overlay.ts +8 -0
- package/src/interactive/mutation-preview.ts +295 -0
- package/src/interactive/overlay-general-openers.ts +16 -0
- package/src/interactive/overlay-key-routing.ts +38 -0
- package/src/interactive/overlay-lifecycle.ts +38 -5
- package/src/interactive/overlay-permission-lifecycle.ts +22 -2
- package/src/interactive/overlay-session-lifecycle.ts +73 -9
- package/src/interactive/overlays/ask-user.ts +91 -19
- package/src/interactive/overlays/help-reference.ts +4 -0
- package/src/interactive/overlays/prompts.ts +11 -1
- package/src/interactive/overlays/settings.ts +35 -1
- package/src/interactive/permission-hint.ts +34 -2
- package/src/interactive/permission-overlay.ts +159 -9
- package/src/interactive/prewarm.ts +197 -0
- package/src/interactive/render-trace.ts +162 -15
- package/src/interactive/renderers/tool-execution.ts +4 -0
- package/src/interactive/side-question.ts +58 -1
- package/src/interactive/status/controller.ts +11 -0
- package/src/interactive/status/state-machine.ts +54 -2
- package/src/interactive/status/types.ts +7 -0
- package/src/interactive/terminal-lease.ts +2 -0
- package/src/interactive/turn-context.ts +299 -31
- package/src/interactive/turn-persistence.ts +14 -4
- package/src/interactive/turn-prewarm.ts +364 -0
- package/src/interactive/turn-queues.ts +7 -4
- package/src/interactive/turn-runtime.ts +8 -1
- package/src/interactive/turn-state.ts +23 -0
- package/src/interactive/view/view-overlay.ts +28 -3
- package/src/tools/ask-user.ts +43 -2
- package/src/tools/dispatch-plan.ts +17 -9
- package/src/tools/dispatch-scout.ts +1 -1
- package/src/tools/registry.ts +16 -0
- package/dist/chunk-AOCYTWAV.js +0 -449
- package/dist/chunk-HWUFFB6L.js +0 -83
- package/dist/chunk-R346GLFC.js +0 -31
- package/dist/doctor-M7YEDGAE.js +0 -91
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
export const EVAL_EXECUTION_ENVELOPE_SCHEMA_V1 = "clio.eval.execution-envelope.v1" as const;
|
|
2
|
+
|
|
3
|
+
export const EVAL_EXECUTION_MATRIX_DIMENSIONS_V1 = [
|
|
4
|
+
"prompt",
|
|
5
|
+
"recipe",
|
|
6
|
+
"target",
|
|
7
|
+
"wireModel",
|
|
8
|
+
"runtime",
|
|
9
|
+
"thinkingLevel",
|
|
10
|
+
"toolSignature",
|
|
11
|
+
"autonomy",
|
|
12
|
+
"policy",
|
|
13
|
+
"projectContext",
|
|
14
|
+
"corpus",
|
|
15
|
+
] as const;
|
|
16
|
+
|
|
17
|
+
export type EvalExecutionMatrixDimensionV1 = (typeof EVAL_EXECUTION_MATRIX_DIMENSIONS_V1)[number];
|
|
18
|
+
export type EvalPromptFragmentVersionV1 = number | "unversioned";
|
|
19
|
+
|
|
20
|
+
export interface EvalPromptFragmentIdentityV1 {
|
|
21
|
+
id: string;
|
|
22
|
+
version: EvalPromptFragmentVersionV1;
|
|
23
|
+
contentHash: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface EvalExecutionEnvelopeV1 {
|
|
27
|
+
schema: typeof EVAL_EXECUTION_ENVELOPE_SCHEMA_V1;
|
|
28
|
+
prompt: {
|
|
29
|
+
fragments: EvalPromptFragmentIdentityV1[];
|
|
30
|
+
/** Null means the machinery-only scenario made no model request. */
|
|
31
|
+
compositionHash: string | null;
|
|
32
|
+
};
|
|
33
|
+
/** Null for a main-agent or machinery runner that does not execute an agent recipe. */
|
|
34
|
+
recipe: { id: string; version: number; contentHash: string } | null;
|
|
35
|
+
target: string;
|
|
36
|
+
wireModel: string | null;
|
|
37
|
+
runtime: string | null;
|
|
38
|
+
thinkingLevel: string | null;
|
|
39
|
+
toolSignature: string | null;
|
|
40
|
+
autonomy: string | null;
|
|
41
|
+
policyHashes: {
|
|
42
|
+
rulePack: string | null;
|
|
43
|
+
project: string | null;
|
|
44
|
+
};
|
|
45
|
+
projectContext: {
|
|
46
|
+
kind: "none" | "session" | "worker";
|
|
47
|
+
tier: string | null;
|
|
48
|
+
contentHash: string | null;
|
|
49
|
+
chars: number | null;
|
|
50
|
+
sections: string[];
|
|
51
|
+
rulesApplied: string[];
|
|
52
|
+
operatorProfileApplied: boolean | null;
|
|
53
|
+
};
|
|
54
|
+
corpus: { id: string; version: string };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function parseEvalExecutionEnvelopeV1(value: unknown, source = "execution envelope"): EvalExecutionEnvelopeV1 {
|
|
58
|
+
const record = asRecord(value, source);
|
|
59
|
+
if (record.schema !== EVAL_EXECUTION_ENVELOPE_SCHEMA_V1) {
|
|
60
|
+
throw new Error(`${source}.schema: expected ${EVAL_EXECUTION_ENVELOPE_SCHEMA_V1}`);
|
|
61
|
+
}
|
|
62
|
+
const prompt = asRecord(record.prompt, `${source}.prompt`);
|
|
63
|
+
if (!Array.isArray(prompt.fragments)) throw new Error(`${source}.prompt.fragments: expected array`);
|
|
64
|
+
const fragments = prompt.fragments.map((entry, index) => {
|
|
65
|
+
const fragment = asRecord(entry, `${source}.prompt.fragments[${index}]`);
|
|
66
|
+
const version = fragment.version;
|
|
67
|
+
if (version !== "unversioned" && (!Number.isInteger(version) || typeof version !== "number" || version <= 0)) {
|
|
68
|
+
throw new Error(`${source}.prompt.fragments[${index}].version: expected positive integer or unversioned`);
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
id: readString(fragment.id, `${source}.prompt.fragments[${index}].id`),
|
|
72
|
+
version: version as EvalPromptFragmentVersionV1,
|
|
73
|
+
contentHash: readDigest(fragment.contentHash, `${source}.prompt.fragments[${index}].contentHash`),
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
const fragmentIds = fragments.map((fragment) => fragment.id);
|
|
77
|
+
if (new Set(fragmentIds).size !== fragmentIds.length) {
|
|
78
|
+
throw new Error(`${source}.prompt.fragments: duplicate fragment id`);
|
|
79
|
+
}
|
|
80
|
+
const recipe =
|
|
81
|
+
record.recipe === null
|
|
82
|
+
? null
|
|
83
|
+
: (() => {
|
|
84
|
+
const value = asRecord(record.recipe, `${source}.recipe`);
|
|
85
|
+
const version = value.version;
|
|
86
|
+
if (!Number.isInteger(version) || typeof version !== "number" || version <= 0) {
|
|
87
|
+
throw new Error(`${source}.recipe.version: expected positive integer`);
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
id: readString(value.id, `${source}.recipe.id`),
|
|
91
|
+
version,
|
|
92
|
+
contentHash: readDigest(value.contentHash, `${source}.recipe.contentHash`),
|
|
93
|
+
};
|
|
94
|
+
})();
|
|
95
|
+
const policyHashes = asRecord(record.policyHashes, `${source}.policyHashes`);
|
|
96
|
+
const projectContext = asRecord(record.projectContext, `${source}.projectContext`);
|
|
97
|
+
const projectKind = projectContext.kind;
|
|
98
|
+
if (projectKind !== "none" && projectKind !== "session" && projectKind !== "worker") {
|
|
99
|
+
throw new Error(`${source}.projectContext.kind: expected none, session, or worker`);
|
|
100
|
+
}
|
|
101
|
+
const corpus = asRecord(record.corpus, `${source}.corpus`);
|
|
102
|
+
return {
|
|
103
|
+
schema: EVAL_EXECUTION_ENVELOPE_SCHEMA_V1,
|
|
104
|
+
prompt: {
|
|
105
|
+
fragments,
|
|
106
|
+
compositionHash: readNullableDigest(prompt.compositionHash, `${source}.prompt.compositionHash`),
|
|
107
|
+
},
|
|
108
|
+
recipe,
|
|
109
|
+
target: readString(record.target, `${source}.target`),
|
|
110
|
+
wireModel: readNullableString(record.wireModel, `${source}.wireModel`),
|
|
111
|
+
runtime: readNullableString(record.runtime, `${source}.runtime`),
|
|
112
|
+
thinkingLevel: readNullableString(record.thinkingLevel, `${source}.thinkingLevel`),
|
|
113
|
+
toolSignature: readNullableDigest(record.toolSignature, `${source}.toolSignature`),
|
|
114
|
+
autonomy: readNullableString(record.autonomy, `${source}.autonomy`),
|
|
115
|
+
policyHashes: {
|
|
116
|
+
rulePack: readNullableDigest(policyHashes.rulePack, `${source}.policyHashes.rulePack`),
|
|
117
|
+
project: readNullableDigest(policyHashes.project, `${source}.policyHashes.project`),
|
|
118
|
+
},
|
|
119
|
+
projectContext: {
|
|
120
|
+
kind: projectKind,
|
|
121
|
+
tier: readNullableString(projectContext.tier, `${source}.projectContext.tier`),
|
|
122
|
+
contentHash: readNullableDigest(projectContext.contentHash, `${source}.projectContext.contentHash`),
|
|
123
|
+
chars: readNullableNonNegativeInteger(projectContext.chars, `${source}.projectContext.chars`),
|
|
124
|
+
sections: readStringArray(projectContext.sections, `${source}.projectContext.sections`),
|
|
125
|
+
rulesApplied: readStringArray(projectContext.rulesApplied, `${source}.projectContext.rulesApplied`),
|
|
126
|
+
operatorProfileApplied: readNullableBoolean(
|
|
127
|
+
projectContext.operatorProfileApplied,
|
|
128
|
+
`${source}.projectContext.operatorProfileApplied`,
|
|
129
|
+
),
|
|
130
|
+
},
|
|
131
|
+
corpus: {
|
|
132
|
+
id: readString(corpus.id, `${source}.corpus.id`),
|
|
133
|
+
version: readString(corpus.version, `${source}.corpus.version`),
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function parseEvalExecutionMatrixDimensionsV1(value: unknown, source: string): EvalExecutionMatrixDimensionV1[] {
|
|
139
|
+
if (!Array.isArray(value)) throw new Error(`${source}: expected array`);
|
|
140
|
+
const allowed = new Set<string>(EVAL_EXECUTION_MATRIX_DIMENSIONS_V1);
|
|
141
|
+
const dimensions = value.map((entry, index) => {
|
|
142
|
+
if (typeof entry !== "string" || !allowed.has(entry)) {
|
|
143
|
+
throw new Error(`${source}[${index}]: expected a declared execution-envelope dimension`);
|
|
144
|
+
}
|
|
145
|
+
return entry as EvalExecutionMatrixDimensionV1;
|
|
146
|
+
});
|
|
147
|
+
if (new Set(dimensions).size !== dimensions.length) throw new Error(`${source}: duplicate matrix dimension`);
|
|
148
|
+
return dimensions;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function readString(value: unknown, source: string): string {
|
|
152
|
+
if (typeof value !== "string" || value.length === 0) throw new Error(`${source}: expected non-empty string`);
|
|
153
|
+
return value;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function readNullableString(value: unknown, source: string): string | null {
|
|
157
|
+
if (value === null) return null;
|
|
158
|
+
return readString(value, source);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function readDigest(value: unknown, source: string): string {
|
|
162
|
+
const digest = readString(value, source);
|
|
163
|
+
if (!/^[a-f0-9]{64}$/u.test(digest)) throw new Error(`${source}: expected sha256 digest`);
|
|
164
|
+
return digest;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function readNullableDigest(value: unknown, source: string): string | null {
|
|
168
|
+
return value === null ? null : readDigest(value, source);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function readNullableNonNegativeInteger(value: unknown, source: string): number | null {
|
|
172
|
+
if (value === null) return null;
|
|
173
|
+
if (typeof value !== "number" || !Number.isInteger(value) || value < 0) {
|
|
174
|
+
throw new Error(`${source}: expected non-negative integer or null`);
|
|
175
|
+
}
|
|
176
|
+
return value;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function readNullableBoolean(value: unknown, source: string): boolean | null {
|
|
180
|
+
if (value === null || typeof value === "boolean") return value;
|
|
181
|
+
throw new Error(`${source}: expected boolean or null`);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function readStringArray(value: unknown, source: string): string[] {
|
|
185
|
+
if (!Array.isArray(value)) throw new Error(`${source}: expected array`);
|
|
186
|
+
const entries = value.map((entry, index) => readString(entry, `${source}[${index}]`));
|
|
187
|
+
if (new Set(entries).size !== entries.length) throw new Error(`${source}: duplicate value`);
|
|
188
|
+
return entries;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function asRecord(value: unknown, source: string): Record<string, unknown> {
|
|
192
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) return value as Record<string, unknown>;
|
|
193
|
+
throw new Error(`${source}: expected object`);
|
|
194
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export interface EvalServingConfigurationV1 {
|
|
2
|
+
targetId: string;
|
|
3
|
+
runtimeId: string | null;
|
|
4
|
+
modelId: string | null;
|
|
5
|
+
serverBuild: string | null;
|
|
6
|
+
total_slots: number | null;
|
|
7
|
+
thinkingLevel: string | null;
|
|
8
|
+
compiledPromptHash: string | null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function parseEvalServingConfigurationV1(value: unknown, source: string): EvalServingConfigurationV1 {
|
|
12
|
+
const record = asRecord(value, source);
|
|
13
|
+
const targetId = readString(record.targetId, `${source}.targetId`);
|
|
14
|
+
const totalSlots = record.total_slots;
|
|
15
|
+
if (totalSlots !== null && (typeof totalSlots !== "number" || !Number.isInteger(totalSlots) || totalSlots <= 0)) {
|
|
16
|
+
throw new Error(`${source}.total_slots: expected positive integer or null`);
|
|
17
|
+
}
|
|
18
|
+
const compiledPromptHash = readNullableString(record.compiledPromptHash, `${source}.compiledPromptHash`);
|
|
19
|
+
if (compiledPromptHash !== null && !/^[a-f0-9]{64}$/u.test(compiledPromptHash)) {
|
|
20
|
+
throw new Error(`${source}.compiledPromptHash: expected sha256 digest or null`);
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
targetId,
|
|
24
|
+
runtimeId: readNullableString(record.runtimeId, `${source}.runtimeId`),
|
|
25
|
+
modelId: readNullableString(record.modelId, `${source}.modelId`),
|
|
26
|
+
serverBuild: readNullableString(record.serverBuild, `${source}.serverBuild`),
|
|
27
|
+
total_slots: totalSlots as number | null,
|
|
28
|
+
thinkingLevel: readNullableString(record.thinkingLevel, `${source}.thinkingLevel`),
|
|
29
|
+
compiledPromptHash,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function sameEvalServingConfiguration(
|
|
34
|
+
left: EvalServingConfigurationV1,
|
|
35
|
+
right: EvalServingConfigurationV1,
|
|
36
|
+
): boolean {
|
|
37
|
+
return (
|
|
38
|
+
left.targetId === right.targetId &&
|
|
39
|
+
left.runtimeId === right.runtimeId &&
|
|
40
|
+
left.modelId === right.modelId &&
|
|
41
|
+
left.serverBuild === right.serverBuild &&
|
|
42
|
+
left.total_slots === right.total_slots &&
|
|
43
|
+
left.thinkingLevel === right.thinkingLevel &&
|
|
44
|
+
left.compiledPromptHash === right.compiledPromptHash
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function renderEvalServingConfiguration(config: EvalServingConfigurationV1): string {
|
|
49
|
+
return [
|
|
50
|
+
`target=${config.targetId}`,
|
|
51
|
+
`runtime=${config.runtimeId ?? "unknown"}`,
|
|
52
|
+
`model=${config.modelId ?? "unknown"}`,
|
|
53
|
+
`server_build=${config.serverBuild ?? "unknown"}`,
|
|
54
|
+
`total_slots=${config.total_slots ?? "unknown"}`,
|
|
55
|
+
`thinking=${config.thinkingLevel ?? "unknown"}`,
|
|
56
|
+
`compiled_prompt_hash=${config.compiledPromptHash ?? "unknown"}`,
|
|
57
|
+
].join(" ");
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function readString(value: unknown, source: string): string {
|
|
61
|
+
if (typeof value !== "string" || value.length === 0) throw new Error(`${source}: expected string`);
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function readNullableString(value: unknown, source: string): string | null {
|
|
66
|
+
if (value === null) return null;
|
|
67
|
+
if (typeof value !== "string" || value.length === 0) throw new Error(`${source}: expected string or null`);
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function asRecord(value: unknown, source: string): Record<string, unknown> {
|
|
72
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) return value as Record<string, unknown>;
|
|
73
|
+
throw new Error(`${source}: expected object`);
|
|
74
|
+
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { EvalBehaviorScenarioV1 } from "./behavioral.js";
|
|
2
|
+
import type { EvalExecutionMatrixDimensionV1 } from "./execution-envelope.js";
|
|
3
|
+
|
|
1
4
|
export const EVAL_SUITE_V2_VERSION = 2;
|
|
2
5
|
|
|
3
6
|
export const CANONICAL_METRICS = [
|
|
@@ -15,6 +18,13 @@ export const CANONICAL_METRICS = [
|
|
|
15
18
|
"tools.totalCalls",
|
|
16
19
|
"tools.failed",
|
|
17
20
|
"tools.blocked",
|
|
21
|
+
"tools.read.distinctPaths",
|
|
22
|
+
"tools.read.outsideAllowed",
|
|
23
|
+
"tools.read.decoyHits",
|
|
24
|
+
"tools.calls.dispatch",
|
|
25
|
+
"tools.blocked.bash",
|
|
26
|
+
"claims.unsupported",
|
|
27
|
+
"completion.reported",
|
|
18
28
|
"context.indexedFiles",
|
|
19
29
|
"context.coverage",
|
|
20
30
|
"context.structuralHash",
|
|
@@ -103,13 +113,20 @@ export const CANONICAL_METRICS = [
|
|
|
103
113
|
"stream.messageUpdateCount",
|
|
104
114
|
"stream.usageDoubleCounted",
|
|
105
115
|
"stream.segmentUsageMatchesMessages",
|
|
106
|
-
// The task outcome
|
|
107
|
-
//
|
|
108
|
-
//
|
|
116
|
+
// The task outcome: whether the model solved the workload. Its exit code is
|
|
117
|
+
// recorded beside the machinery invariants so a failed final result can still
|
|
118
|
+
// say "the grader failed and Clio behaved" rather than conflating the two.
|
|
109
119
|
"task.exitCode",
|
|
110
120
|
"task.solved",
|
|
111
121
|
] as const;
|
|
112
122
|
|
|
123
|
+
/**
|
|
124
|
+
* Per-tool call and block counters use a dynamic suffix because extension tool
|
|
125
|
+
* ids are not closed at build time. They otherwise have the same scalar,
|
|
126
|
+
* observable-event semantics as the fixed canonical metrics above.
|
|
127
|
+
*/
|
|
128
|
+
export const CANONICAL_METRIC_PREFIXES = ["tools.calls.", "tools.blocked."] as const;
|
|
129
|
+
|
|
113
130
|
export type EvalMetricName = (typeof CANONICAL_METRICS)[number];
|
|
114
131
|
export type EvalAssertionOp = "lt" | "lte" | "gt" | "gte" | "eq" | "neq";
|
|
115
132
|
export type EvalRunnerKind = "clio-run" | "context-index" | "context-init" | "external-command";
|
|
@@ -138,6 +155,8 @@ export interface EvalSuiteTargetV2 {
|
|
|
138
155
|
export interface EvalSuiteMatrixV2 {
|
|
139
156
|
targets: EvalSuiteTargetV2[];
|
|
140
157
|
repeats: number;
|
|
158
|
+
/** Execution-envelope fields this suite intentionally varies. All other fields must match for comparison. */
|
|
159
|
+
dimensions?: EvalExecutionMatrixDimensionV1[];
|
|
141
160
|
/**
|
|
142
161
|
* Cumulative receipt-cost ceiling in USD for the whole matrix. Once the
|
|
143
162
|
* summed `cost.usd` of finished items exceeds it, remaining items fail
|
|
@@ -167,6 +186,8 @@ export interface EvalWorkspaceV2 {
|
|
|
167
186
|
export interface EvalRunnerV2 {
|
|
168
187
|
kind: EvalRunnerKind;
|
|
169
188
|
prompt?: string;
|
|
189
|
+
/** One-run headless authority used to exercise allow and deny recovery. */
|
|
190
|
+
autonomy?: "read-only" | "suggest" | "auto-edit" | "full-auto";
|
|
170
191
|
/**
|
|
171
192
|
* Fleet agent recipe id for the clio-run runner. When set the runner
|
|
172
193
|
* invokes `clio-coder run --agent <id> --json`, whose stream ends with the full
|
|
@@ -183,11 +204,10 @@ export interface EvalRunnerV2 {
|
|
|
183
204
|
export interface EvalVerifyV2 {
|
|
184
205
|
commands?: string[];
|
|
185
206
|
/**
|
|
186
|
-
* Commands that
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* "the model did not solve it" from
|
|
190
|
-
* `commands` above cannot express because a failing verifier fails the item.
|
|
207
|
+
* Commands that grade the task outcome. They run in the workspace before the
|
|
208
|
+
* machinery verifiers and record `task.exitCode` and `task.solved`; a nonzero
|
|
209
|
+
* exit fails the final result while the verdict keeps machinery `ok`. This is
|
|
210
|
+
* what keeps "the model did not solve it" distinct from "Clio broke".
|
|
191
211
|
*/
|
|
192
212
|
measure?: string[];
|
|
193
213
|
assertions?: EvalMetricAssertion[];
|
|
@@ -196,11 +216,19 @@ export interface EvalVerifyV2 {
|
|
|
196
216
|
|
|
197
217
|
export interface EvalMetricsSpecV2 {
|
|
198
218
|
collect: string[];
|
|
219
|
+
/**
|
|
220
|
+
* Public fixture paths used to reduce read events to bounded counters. Raw
|
|
221
|
+
* paths stay out of behavioral fact values and evidence excerpts; the metric
|
|
222
|
+
* map records only distinct, outside-allowlist, and declared-decoy counts.
|
|
223
|
+
*/
|
|
224
|
+
readObservation?: { allowedPaths: string[]; decoyPaths: string[] };
|
|
199
225
|
}
|
|
200
226
|
|
|
201
227
|
export interface EvalSuiteTaskV2 {
|
|
202
228
|
id: string;
|
|
203
229
|
tags: string[];
|
|
230
|
+
/** Additive behavioral contract evaluated against observable run facts. */
|
|
231
|
+
behavioral?: EvalBehaviorScenarioV1;
|
|
204
232
|
workspace: EvalWorkspaceV2;
|
|
205
233
|
runner: EvalRunnerV2;
|
|
206
234
|
verify: EvalVerifyV2;
|
|
@@ -210,6 +238,8 @@ export interface EvalSuiteTaskV2 {
|
|
|
210
238
|
|
|
211
239
|
export interface EvalSuiteThresholdsV2 {
|
|
212
240
|
fail: EvalMetricAssertion[];
|
|
241
|
+
/** Budget notices are reported but never change the command exit status. */
|
|
242
|
+
informational?: EvalMetricAssertion[];
|
|
213
243
|
}
|
|
214
244
|
|
|
215
245
|
export interface EvalSuiteV2 {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { parseEvalBehaviorScenarioV1 } from "./behavioral.js";
|
|
2
|
+
import { parseEvalExecutionMatrixDimensionsV1 } from "./execution-envelope.js";
|
|
1
3
|
import {
|
|
2
4
|
EVAL_SUITE_V2_VERSION,
|
|
3
5
|
type EvalAssertionOp,
|
|
@@ -87,12 +89,26 @@ function readMatrix(value: unknown, path: string, issues: EvalValidationIssue[])
|
|
|
87
89
|
];
|
|
88
90
|
});
|
|
89
91
|
if (repeats === null || targets.length === 0) return null;
|
|
92
|
+
let dimensions: EvalSuiteV2["matrix"]["dimensions"];
|
|
93
|
+
if (value.dimensions !== undefined) {
|
|
94
|
+
try {
|
|
95
|
+
dimensions = parseEvalExecutionMatrixDimensionsV1(value.dimensions, `${path}.dimensions`);
|
|
96
|
+
} catch (error) {
|
|
97
|
+
issues.push({ path: `${path}.dimensions`, message: error instanceof Error ? error.message : String(error) });
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
90
101
|
const maxCostUsd = value.maxCostUsd;
|
|
91
102
|
if (maxCostUsd !== undefined && (typeof maxCostUsd !== "number" || !Number.isFinite(maxCostUsd) || maxCostUsd < 0)) {
|
|
92
103
|
issues.push({ path: `${path}.maxCostUsd`, message: "expected non-negative number" });
|
|
93
104
|
return null;
|
|
94
105
|
}
|
|
95
|
-
return {
|
|
106
|
+
return {
|
|
107
|
+
targets,
|
|
108
|
+
repeats,
|
|
109
|
+
...(dimensions === undefined ? {} : { dimensions }),
|
|
110
|
+
...(maxCostUsd === undefined ? {} : { maxCostUsd }),
|
|
111
|
+
};
|
|
96
112
|
}
|
|
97
113
|
|
|
98
114
|
function readTasks(value: unknown, path: string, issues: EvalValidationIssue[]): EvalSuiteTaskV2[] | null {
|
|
@@ -121,10 +137,12 @@ function readTask(value: unknown, path: string, issues: EvalValidationIssue[]):
|
|
|
121
137
|
const workspace = readWorkspace(value.workspace, `${path}.workspace`, issues);
|
|
122
138
|
const runner = readRunner(value.runner, `${path}.runner`, issues);
|
|
123
139
|
const timeoutMs = readPositiveInteger(value, path, "timeoutMs", issues);
|
|
140
|
+
const behavioral = readBehavioral(value.behavioral, `${path}.behavioral`, issues);
|
|
124
141
|
if (id === null || workspace === null || runner === null || timeoutMs === null) return null;
|
|
125
142
|
return {
|
|
126
143
|
id,
|
|
127
144
|
tags: readOptionalStringArray(value, "tags", `${path}.tags`, issues),
|
|
145
|
+
...(behavioral === undefined ? {} : { behavioral }),
|
|
128
146
|
workspace,
|
|
129
147
|
runner,
|
|
130
148
|
verify: readVerify(value.verify, `${path}.verify`, issues),
|
|
@@ -133,6 +151,20 @@ function readTask(value: unknown, path: string, issues: EvalValidationIssue[]):
|
|
|
133
151
|
};
|
|
134
152
|
}
|
|
135
153
|
|
|
154
|
+
function readBehavioral(
|
|
155
|
+
value: unknown,
|
|
156
|
+
path: string,
|
|
157
|
+
issues: EvalValidationIssue[],
|
|
158
|
+
): EvalSuiteTaskV2["behavioral"] | undefined {
|
|
159
|
+
if (value === undefined) return undefined;
|
|
160
|
+
try {
|
|
161
|
+
return parseEvalBehaviorScenarioV1(value, path);
|
|
162
|
+
} catch (error) {
|
|
163
|
+
issues.push({ path, message: error instanceof Error ? error.message : String(error) });
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
136
168
|
function readWorkspace(
|
|
137
169
|
value: unknown,
|
|
138
170
|
path: string,
|
|
@@ -178,6 +210,10 @@ function readRunner(
|
|
|
178
210
|
}
|
|
179
211
|
const prompt = optionalString(value, "prompt");
|
|
180
212
|
const agent = optionalString(value, "agent");
|
|
213
|
+
const autonomy = optionalString(value, "autonomy");
|
|
214
|
+
if (autonomy !== undefined && !["read-only", "suggest", "auto-edit", "full-auto"].includes(autonomy)) {
|
|
215
|
+
issues.push({ path: `${path}.autonomy`, message: "expected read-only, suggest, auto-edit, or full-auto" });
|
|
216
|
+
}
|
|
181
217
|
if (agent !== undefined && kind !== "clio-run") {
|
|
182
218
|
issues.push({ path: `${path}.agent`, message: "agent is only valid on the clio-run runner" });
|
|
183
219
|
}
|
|
@@ -185,6 +221,7 @@ function readRunner(
|
|
|
185
221
|
return {
|
|
186
222
|
kind: kind as EvalRunnerKind,
|
|
187
223
|
...(prompt === undefined ? {} : { prompt }),
|
|
224
|
+
...(autonomy === undefined ? {} : { autonomy: autonomy as NonNullable<EvalSuiteTaskV2["runner"]["autonomy"]> }),
|
|
188
225
|
...(agent === undefined ? {} : { agent }),
|
|
189
226
|
...(command === undefined ? {} : { command }),
|
|
190
227
|
commands: readOptionalStringArray(value, "commands", `${path}.commands`, issues),
|
|
@@ -221,7 +258,22 @@ function readMetrics(
|
|
|
221
258
|
issues.push({ path, message: "expected object" });
|
|
222
259
|
return { collect: [] };
|
|
223
260
|
}
|
|
224
|
-
|
|
261
|
+
const observation = value.readObservation;
|
|
262
|
+
let readObservation: EvalSuiteV2["tasks"][number]["metrics"]["readObservation"];
|
|
263
|
+
if (observation !== undefined) {
|
|
264
|
+
if (!isRecord(observation)) {
|
|
265
|
+
issues.push({ path: `${path}.readObservation`, message: "expected object" });
|
|
266
|
+
} else {
|
|
267
|
+
readObservation = {
|
|
268
|
+
allowedPaths: readOptionalStringArray(observation, "allowedPaths", `${path}.readObservation.allowedPaths`, issues),
|
|
269
|
+
decoyPaths: readOptionalStringArray(observation, "decoyPaths", `${path}.readObservation.decoyPaths`, issues),
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return {
|
|
274
|
+
collect: readOptionalStringArray(value, "collect", `${path}.collect`, issues),
|
|
275
|
+
...(readObservation === undefined ? {} : { readObservation }),
|
|
276
|
+
};
|
|
225
277
|
}
|
|
226
278
|
|
|
227
279
|
function readThresholds(
|
|
@@ -234,7 +286,10 @@ function readThresholds(
|
|
|
234
286
|
issues.push({ path, message: "expected object" });
|
|
235
287
|
return undefined;
|
|
236
288
|
}
|
|
237
|
-
return {
|
|
289
|
+
return {
|
|
290
|
+
fail: readAssertions(value.fail, `${path}.fail`, issues),
|
|
291
|
+
informational: readAssertions(value.informational, `${path}.informational`, issues),
|
|
292
|
+
};
|
|
238
293
|
}
|
|
239
294
|
|
|
240
295
|
function readAssertions(value: unknown, path: string, issues: EvalValidationIssue[]): EvalMetricAssertion[] {
|