@iowarp/clio-coder 0.4.2 → 0.4.4
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 +98 -0
- package/CONTRIBUTING.md +86 -19
- package/README.md +35 -6
- package/dist/{acp-TMDQZDIG.js → acp-WNAYYF4F.js} +12 -13
- package/dist/{agents-5N5NG3XG.js → agents-3OKXHLOI.js} +60 -57
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-Z5CCBXKQ.js → auth-VKNNMGPU.js} +21 -19
- package/dist/{builtins-K6TNDT24.js → builtins-WGALA46I.js} +9 -4
- package/dist/{chunk-XE3PCIXH.js → chunk-23L32XTI.js} +12 -9
- package/dist/{chunk-I64IFBLB.js → chunk-25QBEXRS.js} +18 -11
- package/dist/{chunk-CDNVLKUX.js → chunk-26QSH3EJ.js} +13 -7
- package/dist/{chunk-QQLGQY2A.js → chunk-2ASED4PZ.js} +22 -22
- package/dist/{chunk-MCEPRMZW.js → chunk-2CU2H6KE.js} +2 -2
- package/dist/chunk-2DSOYNFC.js +108 -0
- package/dist/{chunk-72GZI5EV.js → chunk-2JH2WHGE.js} +2 -2
- package/dist/{chunk-I66EAJFY.js → chunk-2WZ546HR.js} +267 -232
- package/dist/{chunk-O3YUNJZ2.js → chunk-2ZSONWVL.js} +82 -25
- package/dist/{chunk-2NHR3NAY.js → chunk-36CT5VVL.js} +331 -42
- package/dist/{chunk-2X4RYJTJ.js → chunk-3GY4F45V.js} +3 -3
- package/dist/{chunk-ZW55JB7N.js → chunk-3ODX73FK.js} +4 -6
- package/dist/{chunk-PBP4B7XR.js → chunk-3UNOLWNZ.js} +3 -3
- package/dist/{chunk-4JDLP6ZS.js → chunk-3UUXNFEX.js} +14 -10
- package/dist/{chunk-RKSR6VSF.js → chunk-4IUZQIJ3.js} +29 -1
- package/dist/{chunk-ZW4HH5JJ.js → chunk-4M6Z5QVF.js} +6 -6
- package/dist/{chunk-K6BSR66V.js → chunk-4NSRCOYP.js} +4 -1
- package/dist/{chunk-M2DAX4F6.js → chunk-4WR7VSYB.js} +2 -2
- package/dist/{chunk-FSP7CMNU.js → chunk-54X7T7DK.js} +61 -6
- package/dist/{chunk-54ODD65L.js → chunk-5636DCO5.js} +4 -4
- package/dist/chunk-57XXR6DR.js +3763 -0
- package/dist/{chunk-3KIPBMUA.js → chunk-5ICU3EUH.js} +2 -2
- package/dist/{chunk-77QIVUZB.js → chunk-5MEZN6CB.js} +4 -4
- package/dist/{chunk-O42A54GG.js → chunk-5OIVVPHF.js} +2 -2
- package/dist/{chunk-YJISEZKC.js → chunk-5TUB6SLS.js} +6 -6
- package/dist/{chunk-IMXMHHMQ.js → chunk-6OSVSQL5.js} +341 -57
- package/dist/{chunk-Q4XWMHX6.js → chunk-6PAZTBPA.js} +14 -2
- package/dist/{chunk-FVDGR2ZL.js → chunk-6Q3CYFD3.js} +112 -39
- package/dist/{chunk-IDNA72AH.js → chunk-6QOTUPRG.js} +155 -36
- package/dist/{chunk-X7IARSHT.js → chunk-6UINWWS6.js} +16 -10
- package/dist/{chunk-CYZW7JHJ.js → chunk-72YIHOZQ.js} +9 -9
- package/dist/{chunk-IKSLQ4XV.js → chunk-75W7L2E2.js} +752 -861
- package/dist/{chunk-CRFOIAX3.js → chunk-7UGL4MB5.js} +6 -6
- package/dist/{chunk-HIICAHCJ.js → chunk-AUPNRN7C.js} +2 -2
- package/dist/{chunk-7BHIY2MW.js → chunk-BJVFZO5U.js} +8 -50
- package/dist/{chunk-B74PXLU7.js → chunk-CUSRQKPU.js} +65 -3
- package/dist/chunk-DQOVN6KV.js +386 -0
- package/dist/{chunk-E7GT7O5N.js → chunk-DT3LWJOB.js} +7 -4
- package/dist/chunk-DXKJURES.js +671 -0
- package/dist/{chunk-JBCS7CRR.js → chunk-EL24TAU4.js} +10 -10
- package/dist/{chunk-TPEQIQIE.js → chunk-ELWDPP3Y.js} +8 -8
- package/dist/{chunk-NDINPTJ4.js → chunk-ELZVTCGV.js} +5 -4
- package/dist/chunk-EXLD33WO.js +381 -0
- package/dist/chunk-FEAXX7B6.js +101 -0
- package/dist/{chunk-RLYRBIYQ.js → chunk-FFUPXJC4.js} +90 -331
- package/dist/{chunk-5PFYMY2V.js → chunk-FTMGRKEF.js} +2 -2
- package/dist/{chunk-34BHNEE3.js → chunk-GHS5EBTQ.js} +58 -7
- package/dist/{chunk-DYHAXKHD.js → chunk-GWZNEVM2.js} +12 -8
- package/dist/chunk-GX5WYQO4.js +59 -0
- package/dist/chunk-GYV6VZOC.js +26 -0
- package/dist/{chunk-MQXIVJ35.js → chunk-HAXOFFRH.js} +5 -5
- package/dist/chunk-I2DWJ4GM.js +390 -0
- package/dist/{chunk-TXOTCRLG.js → chunk-I5FWO7L5.js} +5 -5
- package/dist/{chunk-WNP7O5WZ.js → chunk-ID64D7PE.js} +4 -4
- package/dist/{chunk-XQRY4DTA.js → chunk-IGLP3ODT.js} +10 -10
- package/dist/chunk-IRXAATOX.js +539 -0
- package/dist/chunk-IXIY2H4R.js +44 -0
- package/dist/{chunk-SSEYRH53.js → chunk-IZXGRF7P.js} +92 -147
- package/dist/{chunk-5TSRNF4G.js → chunk-JCI2ROMZ.js} +164 -6
- package/dist/{chunk-JWJGP5DQ.js → chunk-JEIYHLOR.js} +7 -7
- package/dist/{chunk-F2I26BDK.js → chunk-JQLNNIKT.js} +4 -4
- package/dist/{chunk-BYMNWQ7O.js → chunk-JSD46VO2.js} +315 -63
- package/dist/{chunk-AK5XEFVZ.js → chunk-JT2RFCC5.js} +64 -14
- package/dist/{chunk-MCMZMDAC.js → chunk-K6T2ZAMZ.js} +168 -6
- package/dist/{chunk-PGF63K6I.js → chunk-KFV5L5SK.js} +73 -4
- package/dist/{chunk-IHXBNWMM.js → chunk-KXDSS5WJ.js} +7 -3
- package/dist/{chunk-PJX3WQUQ.js → chunk-LLXSDWXS.js} +3 -3
- package/dist/{chunk-DZAW46HP.js → chunk-LTIKRKFL.js} +3 -3
- package/dist/{chunk-DZEK6CJN.js → chunk-N56KALIC.js} +21 -21
- package/dist/{chunk-B7HM5Z7T.js → chunk-NAI6ZFCY.js} +9 -5
- package/dist/{chunk-I66ZTYNP.js → chunk-NRO2BJRH.js} +2656 -2213
- package/dist/{chunk-ZGNYYXQ6.js → chunk-NXIMQY5W.js} +3 -3
- package/dist/{chunk-IKOZFYBN.js → chunk-NXYCB2VD.js} +149 -106
- package/dist/{chunk-CWVRRIEI.js → chunk-NZMNUPZZ.js} +2 -2
- package/dist/{chunk-462T4EGZ.js → chunk-O5CVSAG5.js} +2 -2
- package/dist/chunk-ODGTEFFI.js +50 -0
- package/dist/{chunk-3F7VUY77.js → chunk-OEJSLEPW.js} +2 -2
- package/dist/{chunk-KKOJXO6R.js → chunk-OMQNJVKW.js} +4 -2
- package/dist/{chunk-5KW52TEP.js → chunk-Q4WO54TA.js} +132 -77
- package/dist/{chunk-W6NIE6OW.js → chunk-QUFRYSWI.js} +13 -7
- package/dist/{chunk-42FMPA75.js → chunk-QZWQA4DE.js} +2 -2
- package/dist/chunk-R6Q67RJH.js +134 -0
- package/dist/{chunk-W4YEMFBX.js → chunk-RAY4OVGZ.js} +3 -3
- package/dist/{chunk-ZNT2M6TG.js → chunk-RQCKCSRL.js} +17 -17
- package/dist/{chunk-LJID3DYZ.js → chunk-RXTN6AKH.js} +3 -3
- package/dist/{chunk-P75RZCJW.js → chunk-RZDWV63N.js} +3 -3
- package/dist/{chunk-UH632ZYL.js → chunk-S6PYF2XF.js} +2 -2
- package/dist/{chunk-HJWWJ6IL.js → chunk-TOIVGRUX.js} +17 -5
- package/dist/{chunk-HLAFFSEK.js → chunk-TQAHXW6Y.js} +2 -2
- package/dist/{chunk-JIEGK6UF.js → chunk-U6TMQNSI.js} +48 -4
- package/dist/{chunk-2HFQNRV3.js → chunk-UEPWCCTY.js} +12 -12
- package/dist/chunk-UOIZ7DA4.js +41 -0
- package/dist/{chunk-UH347SHR.js → chunk-USR47QNF.js} +11 -11
- package/dist/{chunk-AZ4WMN4W.js → chunk-V6HJFQZE.js} +2 -2
- package/dist/chunk-V76WTFTW.js +318 -0
- package/dist/{chunk-NMJXSHBJ.js → chunk-W54I7H25.js} +2 -2
- package/dist/{chunk-KPXDY6QF.js → chunk-XRZT5WY5.js} +2 -2
- package/dist/{chunk-UBRFI4HS.js → chunk-XULDXHTN.js} +142 -50
- package/dist/chunk-XXYSBZIQ.js +283 -0
- package/dist/{chunk-HKMD33FO.js → chunk-Y55JBDO5.js} +405 -122
- package/dist/{chunk-XOXV5GKE.js → chunk-YD5GIKET.js} +17 -8
- package/dist/{chunk-XGDPUNND.js → chunk-YECAMM3D.js} +2 -2
- package/dist/{chunk-BO7Y52RY.js → chunk-YNFKXPEC.js} +7 -7
- package/dist/{chunk-VXMFAE2W.js → chunk-YPC6ZR5L.js} +19 -6
- package/dist/{chunk-M2WXEHER.js → chunk-ZA4VCIGV.js} +2 -2
- package/dist/cli/index.js +42 -40
- package/dist/{clio-7VB377CC.js → clio-QLICPCF5.js} +7 -7
- package/dist/{code-nav-YVLCYA7V.js → code-nav-IJR2DBPR.js} +9 -9
- package/dist/{components-UBWCQSRW.js → components-2TGAI2RC.js} +5 -6
- package/dist/{config-4HVOS65E.js → config-IUA6OYNS.js} +88 -81
- package/dist/{configure-PIWO7B24.js → configure-VEPX4NMX.js} +26 -25
- package/dist/{context-KQYIWPWT.js → context-2DKHWH2T.js} +60 -45
- package/dist/{context-IYEHL3WQ.js → context-4MPR7WKB.js} +78 -69
- package/dist/{context-N6ZE3LGJ.js → context-BOYF5EJM.js} +15 -11
- package/dist/{context-clear-G4OGZJDS.js → context-clear-S4ZJCQUX.js} +73 -65
- package/dist/context-map-COB37XXN.js +505 -0
- package/dist/{context-working-set-BWLF6LJP.js → context-working-set-3I3FYX6Y.js} +18 -17
- package/dist/detail-A7JAVSIG.js +98 -0
- package/dist/{dispatch-runner-2QQAITS3.js → dispatch-runner-RJ5I2F2O.js} +99 -75
- package/dist/{docs-PD3EXDKU.js → docs-SPOV3BAN.js} +3 -5
- package/dist/{doctor-LHBD36VU.js → doctor-DKICC2SN.js} +71 -48
- package/dist/{eval-C45FYRJ6.js → eval-OQOQUDHK.js} +308 -146
- package/dist/{eval-inventory-6DEJPLBF.js → eval-inventory-Y6QRFOH5.js} +4 -4
- package/dist/{evidence-6SHONYAF.js → evidence-4DQ25GUQ.js} +79 -175
- package/dist/evidence-4F5USFKH.js +208 -0
- package/dist/{evolve-KRKMV72X.js → evolve-GSS52E5J.js} +71 -67
- package/dist/{extensions-KPZ2UHBB.js → extensions-G7MFLYHT.js} +8 -9
- package/dist/{fleet-IVTCKDHT.js → fleet-Q37YHHAQ.js} +126 -118
- package/dist/{fleet-commands-EDWL3IT7.js → fleet-commands-G7E4N7SM.js} +16 -13
- package/dist/{fleet-decisions-YP3YEFGK.js → fleet-decisions-O7M6QBA2.js} +9 -8
- package/dist/{fleet-graph-ZFWKHY2M.js → fleet-graph-TOUBW6OW.js} +21 -20
- package/dist/{fleet-inspect-FVUNCBML.js → fleet-inspect-SW33JJNI.js} +65 -60
- package/dist/{fleet-preflight-UN5XED4R.js → fleet-preflight-CV2655TW.js} +4 -5
- package/dist/{fleet-validate-XOWC4HSX.js → fleet-validate-KESZX2YH.js} +25 -24
- package/dist/{fleet-verify-UN3SODEL.js → fleet-verify-UQPMTVE3.js} +66 -61
- package/dist/{fleet-view-TWHJKCN6.js → fleet-view-MN2VG4MR.js} +65 -60
- package/dist/{init-T2QORQ3Y.js → init-PXEXQSBF.js} +90 -82
- package/dist/{interop-IN5I2A66.js → interop-ZG5T62U3.js} +12 -13
- package/dist/inventory-C26CFDRR.js +101 -0
- package/dist/{library-LSCATDLZ.js → library-B2W4N74O.js} +29 -29
- package/dist/{memory-HYOKAGGJ.js → memory-YCANYS5A.js} +73 -69
- package/dist/{models-2GPMFYCM.js → models-GERTU3YI.js} +51 -47
- package/dist/{monitor-E4ASVUJH.js → monitor-CPNIUULB.js} +74 -67
- package/dist/{orchestrator-DDMPR3PY.js → orchestrator-J4BSH4WQ.js} +1288 -1606
- package/dist/{panes-E3RUXOW5.js → panes-BOHAEGYC.js} +4 -4
- package/dist/{panes-IXKLOKA2.js → panes-NXSLDQZ2.js} +10 -11
- package/dist/{paths-L7LGY6RN.js → paths-VSUWNC22.js} +6 -7
- package/dist/reset-TNWTB5LU.js +343 -0
- package/dist/{resources-OTRSN34L.js → resources-4PXNMD5G.js} +29 -22
- package/dist/{run-5DEYH5QK.js → run-D6XJ34CN.js} +132 -132
- package/dist/{share-IHWTLO3M.js → share-2NWMJJEE.js} +27 -27
- package/dist/{skills-IYMXMKW4.js → skills-KR7WON5G.js} +40 -33
- package/dist/{skills-eval-DROHSJAR.js → skills-eval-O2ZNOLDS.js} +81 -77
- package/dist/{skills-inventory-D7X4L4ZX.js → skills-inventory-ZZOUBK7O.js} +23 -22
- package/dist/{slash-commands-QBM7UZ3B.js → slash-commands-ZXPJD64J.js} +47 -37
- package/dist/{steer-Z5DO23FJ.js → steer-XA25PSCS.js} +4 -4
- package/dist/{support-U7QOWY26.js → support-7EMVWYG2.js} +6 -6
- package/dist/{targets-P2FUC4IL.js → targets-OMH2XCSN.js} +50 -49
- package/dist/tasks-IPAGMEIX.js +36 -0
- package/dist/{terminal-lease-YREJ3JX2.js → terminal-lease-C2J3JYRE.js} +4 -4
- package/dist/{tools-5B7RO6MV.js → tools-EFFEAIDP.js} +8 -9
- package/dist/{trace-YMGMUM6A.js → trace-FXMXUZUF.js} +7 -7
- package/dist/uninstall-HALS6BLF.js +407 -0
- package/dist/upgrade-MS72RJEP.js +306 -0
- package/dist/{usage-ME5MPXGX.js → usage-NHG6MCJM.js} +162 -108
- package/dist/{verifiers-BVZ7IWOO.js → verifiers-7AUNVXDY.js} +155 -22
- package/dist/{verify-5K7ZKQFC.js → verify-FWYGPKMR.js} +14 -12
- package/dist/{web-fetch-MPARV2K7.js → web-fetch-V4FKSDAV.js} +4 -4
- package/dist/{wiki-generate-F5W5QTYY.js → wiki-generate-743CIGJW.js} +99 -90
- package/dist/{with-panes-BYOJCLAM.js → with-panes-BDQEWBRT.js} +10 -10
- package/dist/worker/entry.js +72 -68
- package/docs/README.md +3 -2
- package/docs/architecture/acp.md +17 -0
- package/docs/architecture/artifact-placement.md +1 -0
- package/docs/architecture/artifact-versions.md +2 -2
- package/docs/architecture/context-engine.md +4 -0
- package/docs/architecture/dispatch-typed-intent.md +1 -1
- package/docs/architecture/evidence-and-memory.md +1 -1
- package/docs/architecture/middleware-and-components.md +1 -1
- package/docs/architecture/model-catalog.md +21 -10
- package/docs/architecture/observability.md +19 -2
- package/docs/architecture/prompt-envelope-and-tools.md +17 -5
- package/docs/architecture/provider-adapter-cookbook.md +63 -0
- package/docs/architecture/safety-model.md +25 -22
- package/docs/architecture/tui-design.md +1 -1
- package/docs/guide/built-in-agents.md +25 -11
- package/docs/guide/commands-and-modes.md +18 -3
- package/docs/guide/configuration-and-targets.md +100 -10
- package/docs/guide/configuration-reference.md +17 -7
- package/docs/guide/environment-variables.md +4 -2
- package/docs/guide/installation-and-lifecycle.md +37 -4
- package/docs/guide/proactive-memory.md +66 -55
- package/docs/guide/skills-marketplace.md +18 -0
- package/docs/guide/tool-usage.md +78 -3
- package/docs/history/config-knobs-audit.md +2 -2
- package/docs/process/development-pipeline.md +40 -2
- package/docs/process/eval-runner.md +67 -3
- package/docs/process/git-commit-provenance.md +15 -0
- package/docs/process/release-cut-checklist.md +207 -0
- package/docs/process/scientific-validation.md +18 -17
- package/evals/behavioral-machinery-support.ts +1 -0
- package/evals/behavioral-machinery.yaml +1 -1
- package/evals/behavioral-model.yaml +3 -2
- package/package.json +2 -2
- package/skills/README.md +7 -5
- package/skills/coding/ast-grep/SKILL.md +101 -30
- package/skills/coding/ast-grep/evals.md +26 -0
- package/skills/coding/coding-standards/SKILL.md +47 -2
- package/skills/coding/coding-standards/evals.md +23 -0
- package/skills/coding/prototype/SKILL.md +87 -28
- package/skills/coding/prototype/evals.md +19 -0
- package/skills/coding/tdd/SKILL.md +80 -53
- package/skills/coding/tdd/evals.md +20 -0
- package/skills/context/context-handoff/SKILL.md +43 -2
- package/skills/context/context-handoff/evals.md +44 -0
- package/skills/context/context-prime/SKILL.md +45 -15
- package/skills/context/context-prime/evals.md +45 -0
- package/skills/git/branch-closeout/SKILL.md +132 -0
- package/skills/git/branch-closeout/evals.md +133 -0
- package/skills/git/branch-closeout/references/closeout-checklist.md +81 -0
- package/skills/git/file-ticket/SKILL.md +77 -63
- package/skills/git/file-ticket/assets/issue-template.md +22 -0
- package/skills/git/file-ticket/evals.md +31 -26
- package/skills/git/file-ticket/references/issue-discovery.md +49 -0
- package/skills/git/fix-issue/SKILL.md +87 -64
- package/skills/git/fix-issue/evals.md +35 -31
- package/skills/git/fix-issue/references/diagnosis-and-rca.md +46 -0
- package/skills/git/resolve-merge-conflicts/SKILL.md +100 -51
- package/skills/git/resolve-merge-conflicts/evals.md +52 -25
- package/skills/git/resolve-merge-conflicts/references/conflict-matrix.md +126 -0
- package/skills/git/ship/SKILL.md +103 -67
- package/skills/git/ship/assets/pr-template.md +21 -0
- package/skills/git/ship/evals.md +44 -28
- package/skills/git/ship/references/remote-and-branch-policy.md +62 -0
- package/skills/git/worktree-create/SKILL.md +80 -50
- package/skills/git/worktree-create/evals.md +40 -33
- package/skills/git/worktree-create/references/worktree-setup.md +62 -66
- package/skills/git/worktree-merge/SKILL.md +112 -65
- package/skills/git/worktree-merge/evals.md +42 -34
- package/skills/git/worktree-merge/references/merge-strategies.md +52 -0
- package/skills/planning/archify/SKILL.md +196 -0
- package/skills/planning/archify/evals.md +65 -0
- package/skills/planning/architecture/SKILL.md +61 -12
- package/skills/planning/architecture/evals.md +65 -0
- package/skills/planning/backlog/SKILL.md +130 -14
- package/skills/planning/backlog/evals.md +142 -0
- package/skills/planning/prd/SKILL.md +47 -6
- package/skills/planning/prd/evals.md +54 -0
- package/skills/planning/product-intent/SKILL.md +57 -2
- package/skills/planning/product-intent/evals.md +70 -0
- package/skills/planning/tech-spec/SKILL.md +53 -2
- package/skills/planning/tech-spec/evals.md +73 -0
- package/skills/registry.yaml +58 -50
- package/skills/remote.yaml +13 -0
- package/skills/research/arxiv-literature/SKILL.md +76 -18
- package/skills/research/arxiv-literature/evals.md +50 -0
- package/skills/research/experiment-protocol/SKILL.md +20 -1
- package/skills/research/experiment-protocol/evals.md +23 -0
- package/skills/research/scientific-debugging/SKILL.md +24 -1
- package/skills/research/scientific-debugging/evals.md +18 -0
- package/skills/research/scientific-modernization/SKILL.md +26 -1
- package/skills/research/scientific-modernization/evals.md +27 -0
- package/skills/skill-marketplace.json +63 -28
- package/skills/workflow/cut-it/SKILL.md +64 -5
- package/skills/workflow/cut-it/evals.md +101 -0
- package/skills/workflow/design-council/SKILL.md +112 -27
- package/skills/workflow/design-council/evals.md +161 -0
- package/skills/workflow/grill-me/SKILL.md +85 -10
- package/skills/workflow/grill-me/evals.md +153 -0
- package/skills/workflow/workflow-distiller/SKILL.md +76 -17
- package/skills/workflow/workflow-distiller/evals.md +118 -0
- package/src/cli/args.ts +0 -8
- package/src/cli/configure-interop.ts +105 -13
- package/src/cli/configure-oauth.ts +57 -0
- package/src/cli/configure-onboarding.ts +980 -0
- package/src/cli/configure-target.ts +594 -0
- package/src/cli/configure.ts +1084 -529
- package/src/cli/context-map.ts +114 -0
- package/src/cli/context.ts +4 -0
- package/src/cli/doctor-state-size.ts +1 -12
- package/src/cli/doctor-validation-contract.ts +28 -0
- package/src/cli/doctor.ts +5 -0
- package/src/cli/evidence-detail.ts +1 -75
- package/src/cli/evidence-inventory.ts +1 -167
- package/src/cli/index.ts +3 -0
- package/src/cli/lifecycle-presenter.ts +436 -0
- package/src/cli/models.ts +10 -2
- package/src/cli/modes/print.ts +5 -1
- package/src/cli/reset.ts +228 -106
- package/src/cli/run.ts +7 -4
- package/src/cli/select.ts +664 -0
- package/src/cli/skills.ts +9 -2
- package/src/cli/targets.ts +3 -0
- package/src/cli/tasks.ts +84 -0
- package/src/cli/uninstall.ts +233 -165
- package/src/cli/upgrade.ts +210 -150
- package/src/cli/usage.ts +92 -27
- package/src/cli/validate-model.ts +3 -3
- package/src/cli/verifiers.ts +147 -1
- package/src/cli/wiki-generate.ts +1 -0
- package/src/core/commit-attribution.ts +41 -1
- package/src/core/config.ts +56 -0
- package/src/core/external-diagnostic.ts +44 -0
- package/src/core/gateway-routing.ts +157 -0
- package/src/core/git-commit-attribution.ts +46 -3
- package/src/core/run-overrides.ts +0 -5
- package/src/core/safe-exec.ts +17 -2
- package/src/core/skill-activation.ts +92 -2
- package/src/core/tool-names.ts +5 -2
- package/src/domains/agents/builtins/architect.md +1 -1
- package/src/domains/agents/builtins/coder.md +1 -1
- package/src/domains/agents/builtins/documenter.md +1 -1
- package/src/domains/agents/builtins/git-master.md +1 -1
- package/src/domains/agents/builtins/provenance.md +7 -7
- package/src/domains/agents/builtins/tester.md +1 -1
- package/src/domains/agents/builtins/verifier.md +2 -2
- package/src/domains/agents/builtins/wiki-writer.md +4 -3
- package/src/domains/agents/builtins/world-knowledge.md +31 -0
- package/src/domains/agents/catalog.ts +1 -1
- package/src/domains/agents/result-contract.ts +70 -0
- package/src/domains/context/extension.ts +31 -7
- package/src/domains/context/refresh.ts +3 -0
- package/src/domains/context/wiki/frontmatter.ts +5 -2
- package/src/domains/context/wiki/generate.ts +6 -0
- package/src/domains/context/wiki/map-seed.ts +589 -0
- package/src/domains/context/wiki/plan.ts +2 -2
- package/src/domains/context/wiki/prompts.ts +43 -0
- package/src/domains/dispatch/active-route-planner.ts +4 -0
- package/src/domains/dispatch/admission.ts +29 -0
- package/src/domains/dispatch/agent-candidates.ts +10 -0
- package/src/domains/dispatch/budget-envelope.ts +86 -1
- package/src/domains/dispatch/capability-match.ts +1 -0
- package/src/domains/dispatch/capacity-lease.ts +17 -0
- package/src/domains/dispatch/code-step.ts +11 -4
- package/src/domains/dispatch/contract.ts +42 -8
- package/src/domains/dispatch/execution-scheduler.ts +2 -0
- package/src/domains/dispatch/extension.ts +184 -56
- package/src/domains/dispatch/fleet-commit-attribution.ts +5 -0
- package/src/domains/dispatch/fleet-run.ts +1 -0
- package/src/domains/dispatch/host-verification.ts +114 -13
- package/src/domains/dispatch/intent.ts +28 -18
- package/src/domains/dispatch/orphan-recovery.ts +2 -0
- package/src/domains/dispatch/receipt-integrity.ts +4 -0
- package/src/domains/dispatch/reservation-store.ts +5 -3
- package/src/domains/dispatch/state.ts +15 -2
- package/src/domains/dispatch/types.ts +20 -2
- package/src/domains/dispatch/worker-model-metadata.ts +38 -0
- package/src/domains/eval/metrics/call-ledger-stream.ts +34 -11
- package/src/domains/eval/metrics/token-stream.ts +201 -31
- package/src/domains/eval/metrics/tracked.ts +40 -4
- package/src/domains/eval/runners/clio-run.ts +17 -11
- package/src/domains/eval/runners/context-index.ts +2 -7
- package/src/domains/eval/runners/context-init.ts +3 -6
- package/src/domains/eval/runners/external-command.ts +29 -11
- package/src/domains/eval/schema/suite.ts +28 -0
- package/src/domains/eval/schema/verdict.ts +2 -2
- package/src/domains/eval/suites/resolve.ts +13 -1
- package/src/domains/eval/suites/run.ts +24 -3
- package/src/domains/evidence/build.ts +102 -15
- package/src/domains/evidence/detail.ts +69 -0
- package/src/domains/evidence/eval.ts +13 -1
- package/src/domains/evidence/finish-contract-map.ts +5 -1
- package/src/domains/evidence/inventory.ts +167 -0
- package/src/domains/evidence/store.ts +16 -0
- package/src/domains/evidence/types.ts +12 -0
- package/src/domains/extensions/resources.ts +7 -0
- package/src/domains/interop/registry.ts +6 -2
- package/src/domains/interop/types.ts +4 -0
- package/src/domains/lifecycle/migrations/index.ts +4 -0
- package/src/domains/memory/task-memory-policy.ts +70 -26
- package/src/domains/memory/task-memory-telemetry.ts +1 -0
- package/src/domains/middleware/index.ts +0 -1
- package/src/domains/middleware/marketplace-offer.ts +22 -35
- package/src/domains/middleware/memory-intervention.ts +127 -32
- package/src/domains/middleware/memory-step-endpoint.ts +3 -2
- package/src/domains/middleware/runtime.ts +7 -3
- package/src/domains/middleware/skills-reminder.ts +31 -2
- package/src/domains/mux/detect.ts +3 -6
- package/src/domains/observability/accountability.ts +15 -1
- package/src/domains/observability/compaction-usage.ts +118 -0
- package/src/domains/observability/contract.ts +52 -7
- package/src/domains/observability/cost.ts +1 -1
- package/src/domains/observability/evidence-index.ts +10 -0
- package/src/domains/observability/extension.ts +15 -6
- package/src/domains/observability/out-of-turn-usage.ts +52 -21
- package/src/domains/observability/projection.ts +394 -45
- package/src/{interactive → domains/observability}/worker-progress.ts +3 -3
- package/src/domains/prompts/fragments/operating/contract.md +2 -0
- package/src/domains/prompts/fragments/wiki/page.md +8 -0
- package/src/domains/providers/contract.ts +4 -1
- package/src/domains/providers/extension.ts +40 -9
- package/src/domains/providers/model-capabilities.ts +9 -0
- package/src/domains/providers/model-discovery.ts +3 -4
- package/src/domains/providers/model-runtime-capabilities.ts +15 -5
- package/src/domains/providers/models/local-models/clio-coder-local-coding-targets.yaml +48 -26
- package/src/domains/providers/runtimes/antigravity/antigravity-code.ts +225 -45
- package/src/domains/providers/runtimes/claude/claude-code.ts +9 -0
- package/src/domains/providers/runtimes/common/lmstudio-http.ts +6 -2
- package/src/domains/providers/runtimes/common/local-synth.ts +2 -0
- package/src/domains/providers/runtimes/protocol/litellm.ts +119 -29
- package/src/domains/providers/support.ts +11 -5
- package/src/domains/providers/target-model-cache.ts +25 -2
- package/src/domains/providers/types/capability-flags.ts +2 -0
- package/src/domains/providers/types/runtime-descriptor.ts +20 -1
- package/src/domains/providers/types/target-descriptor.ts +19 -0
- package/src/domains/resources/index.ts +3 -0
- package/src/domains/resources/skills/install.ts +72 -7
- package/src/domains/resources/skills/loader.ts +7 -0
- package/src/domains/resources/skills/marketplace.ts +63 -11
- package/src/domains/safety/action-classifier.ts +7 -0
- package/src/domains/safety/autonomy.ts +15 -0
- package/src/domains/safety/default-path-policy.ts +2 -0
- package/src/domains/safety/finish-contract-registration.ts +29 -14
- package/src/domains/safety/finish-contract.ts +252 -40
- package/src/domains/safety/index.ts +21 -1
- package/src/domains/safety/path-policy.ts +1 -1
- package/src/domains/safety/policy-engine.ts +60 -17
- package/src/domains/safety/protected-artifacts.ts +191 -88
- package/src/domains/safety/rigor.ts +53 -39
- package/src/domains/safety/run-effects.ts +2 -22
- package/src/domains/safety/skill-authority.ts +55 -0
- package/src/domains/safety/validation-contract.ts +388 -0
- package/src/domains/session/archive-readers.ts +10 -1
- package/src/domains/session/compaction/compact.ts +72 -22
- package/src/domains/session/decision-board.ts +101 -2
- package/src/domains/session/entries.ts +50 -7
- package/src/domains/session/extension.ts +4 -4
- package/src/domains/session/handoff.ts +2 -1
- package/src/domains/session/manager.ts +2 -3
- package/src/domains/session/task-board.ts +14 -1
- package/src/domains/session/tree/fork.ts +1 -2
- package/src/domains/session/tree/navigator.ts +1 -1
- package/src/domains/session/usage.ts +3 -3
- package/src/domains/user-tasks/acceptance.ts +56 -0
- package/src/domains/user-tasks/active-acceptance.ts +40 -0
- package/src/domains/user-tasks/store.ts +34 -3
- package/src/engine/acp/adapter.ts +24 -6
- package/src/engine/acp/server.ts +21 -4
- package/src/engine/acp/transport.ts +53 -8
- package/src/engine/acp/types.ts +4 -0
- package/src/engine/agent.ts +13 -3
- package/src/engine/ai.ts +26 -8
- package/src/engine/antigravity/subprocess-runtime.ts +386 -120
- package/src/engine/api-registry.ts +3 -0
- package/src/engine/apis/ollama-native.ts +15 -0
- package/src/engine/apis/openai-completions.ts +117 -14
- package/src/engine/claude/subprocess-runtime.ts +107 -60
- package/src/engine/external-subprocess.ts +122 -6
- package/src/entry/background-model-metadata.ts +18 -0
- package/src/entry/compaction-prompt.ts +57 -0
- package/src/entry/orchestrator.ts +416 -218
- package/src/entry/task-memory-lifecycle.ts +35 -0
- package/src/interactive/chat-loop-messages.ts +13 -4
- package/src/interactive/chat-loop.ts +65 -2
- package/src/interactive/chat-renderer.ts +1 -0
- package/src/interactive/cost-overlay.ts +26 -2
- package/src/interactive/dispatch-board.ts +46 -717
- package/src/interactive/fleet-run-preview.ts +2 -1
- package/src/interactive/interactive-application.ts +3 -2
- package/src/interactive/interactive-presentation.ts +55 -12
- package/src/interactive/interactive-slash-runtime.ts +4 -2
- package/src/interactive/oracle.ts +5 -2
- package/src/interactive/overlays/fleet-run-approval.ts +3 -2
- package/src/interactive/overlays/message-picker.ts +2 -2
- package/src/interactive/overlays/settings.ts +2 -2
- package/src/interactive/overlays/tree-selector.ts +2 -2
- package/src/interactive/renderers/branch-summary.ts +1 -1
- package/src/interactive/renderers/worker-entry.ts +32 -0
- package/src/interactive/slash-autocomplete.ts +4 -6
- package/src/interactive/slash-commands.ts +49 -45
- package/src/interactive/slash-spec.ts +28 -0
- package/src/interactive/theme/labels.ts +19 -13
- package/src/interactive/turn-context.ts +9 -5
- package/src/interactive/turn-recovery.ts +8 -0
- package/src/interactive/turn-runtime.ts +27 -11
- package/src/interactive/turn-state.ts +7 -0
- package/src/interactive/view/artifacts.ts +2 -0
- package/src/interactive/worker-receipts.ts +1 -0
- package/src/interactive/worker-stream.ts +13 -4
- package/src/tools/bootstrap.ts +4 -0
- package/src/tools/builtin-tool-catalog.ts +31 -0
- package/src/tools/compete-worktrees.ts +7 -1
- package/src/tools/context/index.ts +30 -9
- package/src/tools/core-bootstrap.ts +16 -0
- package/src/tools/decide.ts +136 -0
- package/src/tools/dispatch-admission.ts +21 -0
- package/src/tools/dispatch-arguments.ts +1 -0
- package/src/tools/dispatch-event-text.ts +10 -0
- package/src/tools/dispatch-plan.ts +6 -2
- package/src/tools/dispatch-runner.ts +27 -1
- package/src/tools/dispatch-types.ts +6 -0
- package/src/tools/evidence.ts +96 -0
- package/src/tools/limitation.ts +76 -0
- package/src/tools/policy.ts +9 -0
- package/src/tools/presentation.ts +3 -0
- package/src/tools/registry.ts +11 -5
- package/src/tools/result-shaping.ts +17 -5
- package/src/tools/task-worktree.ts +13 -3
- package/src/tools/tasks.ts +10 -1
- package/src/tools/verify/authoring.ts +170 -83
- package/src/tools/verify/catalog.ts +122 -5
- package/src/tools/verify/index.ts +2 -1
- package/src/tools/verify/numeric.ts +298 -0
- package/src/tools/verify/perf.ts +143 -0
- package/src/tools/verify/scripts.ts +229 -2
- package/src/tools/worker-evidence.ts +3 -1
- package/src/worker/spec-contract.ts +4 -0
- package/dist/chunk-2Z2IKEXI.js +0 -1554
- package/dist/chunk-RVG5JXAL.js +0 -41
- package/dist/chunk-T56WDKA5.js +0 -183
- package/dist/chunk-VN3SHNBN.js +0 -313
- package/dist/chunk-VPKWYKEY.js +0 -169
- package/dist/reset-OAQP3W4O.js +0 -230
- package/dist/uninstall-N34PCTGJ.js +0 -331
- package/dist/upgrade-PXK3S2YM.js +0 -325
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
summarizeFailedCompactionUsage
|
|
4
|
+
} from "./chunk-FEAXX7B6.js";
|
|
2
5
|
import {
|
|
3
6
|
readEvidenceIndex,
|
|
4
|
-
readOutOfTurnUsageRows
|
|
5
|
-
|
|
7
|
+
readOutOfTurnUsageRows,
|
|
8
|
+
summarizeEvidenceIndex
|
|
9
|
+
} from "./chunk-JT2RFCC5.js";
|
|
6
10
|
import {
|
|
7
11
|
loadMemoryRecordsSync
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-EL24TAU4.js";
|
|
13
|
+
import "./chunk-RQCKCSRL.js";
|
|
14
|
+
import "./chunk-RZDWV63N.js";
|
|
15
|
+
import "./chunk-7UGL4MB5.js";
|
|
16
|
+
import "./chunk-DR52UMZW.js";
|
|
17
|
+
import "./chunk-NRO2BJRH.js";
|
|
18
|
+
import "./chunk-NXIMQY5W.js";
|
|
19
|
+
import "./chunk-XRZT5WY5.js";
|
|
20
|
+
import "./chunk-QUFRYSWI.js";
|
|
21
|
+
import "./chunk-LTIKRKFL.js";
|
|
22
|
+
import "./chunk-ODGTEFFI.js";
|
|
23
|
+
import "./chunk-CUSRQKPU.js";
|
|
12
24
|
import {
|
|
13
25
|
addResponseModelIdObservationCount,
|
|
14
26
|
emptyResponseModelIdObservationCounts,
|
|
@@ -17,109 +29,105 @@ import {
|
|
|
17
29
|
parseSessionEntries,
|
|
18
30
|
readAuditRows,
|
|
19
31
|
responseModelIdObservationCountsLabel
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-6UINWWS6.js";
|
|
33
|
+
import "./chunk-FTMGRKEF.js";
|
|
34
|
+
import "./chunk-VIA6RFQZ.js";
|
|
35
|
+
import "./chunk-W6GROXXM.js";
|
|
36
|
+
import "./chunk-I2DWJ4GM.js";
|
|
37
|
+
import "./chunk-OEJSLEPW.js";
|
|
38
|
+
import "./chunk-RKKLTLYB.js";
|
|
39
|
+
import "./chunk-K6T2ZAMZ.js";
|
|
40
|
+
import "./chunk-3UUXNFEX.js";
|
|
41
|
+
import {
|
|
42
|
+
loadSkills
|
|
43
|
+
} from "./chunk-2ZSONWVL.js";
|
|
44
|
+
import "./chunk-NDDGJUXD.js";
|
|
45
|
+
import "./chunk-YECAMM3D.js";
|
|
46
|
+
import "./chunk-V76WTFTW.js";
|
|
25
47
|
import {
|
|
26
48
|
foldPromptCacheTelemetry,
|
|
27
49
|
hasPromptCacheTelemetry
|
|
28
50
|
} from "./chunk-3DPEIQKN.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-W6GROXXM.js";
|
|
33
|
-
import "./chunk-4JDLP6ZS.js";
|
|
34
|
-
import "./chunk-TXOTCRLG.js";
|
|
51
|
+
import "./chunk-TQAHXW6Y.js";
|
|
52
|
+
import "./chunk-5MEZN6CB.js";
|
|
53
|
+
import "./chunk-3ODX73FK.js";
|
|
35
54
|
import "./chunk-HVDIIIQW.js";
|
|
36
|
-
import "./chunk-ZNT2M6TG.js";
|
|
37
|
-
import "./chunk-P75RZCJW.js";
|
|
38
|
-
import "./chunk-CRFOIAX3.js";
|
|
39
|
-
import "./chunk-DR52UMZW.js";
|
|
40
55
|
import {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-IKSLQ4XV.js";
|
|
51
|
-
import "./chunk-HIICAHCJ.js";
|
|
52
|
-
import "./chunk-Q4XWMHX6.js";
|
|
53
|
-
import "./chunk-IDNA72AH.js";
|
|
54
|
-
import "./chunk-FVDGR2ZL.js";
|
|
56
|
+
formatColumns,
|
|
57
|
+
printError
|
|
58
|
+
} from "./chunk-JCI2ROMZ.js";
|
|
59
|
+
import "./chunk-2WZ546HR.js";
|
|
60
|
+
import "./chunk-75W7L2E2.js";
|
|
61
|
+
import "./chunk-6QOTUPRG.js";
|
|
62
|
+
import "./chunk-AUPNRN7C.js";
|
|
63
|
+
import "./chunk-6PAZTBPA.js";
|
|
64
|
+
import "./chunk-6Q3CYFD3.js";
|
|
55
65
|
import "./chunk-NEDJ26B5.js";
|
|
56
|
-
import "./chunk-42FMPA75.js";
|
|
57
|
-
import "./chunk-H7IXIC72.js";
|
|
58
|
-
import "./chunk-VN3SHNBN.js";
|
|
59
66
|
import "./chunk-OQE5J4C6.js";
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-B7HM5Z7T.js";
|
|
67
|
+
import "./chunk-NAI6ZFCY.js";
|
|
62
68
|
import "./chunk-OZNBF4L3.js";
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
67
|
-
import "./chunk-
|
|
69
|
+
import "./chunk-QZWQA4DE.js";
|
|
70
|
+
import "./chunk-H7IXIC72.js";
|
|
71
|
+
import "./chunk-KFV5L5SK.js";
|
|
72
|
+
import "./chunk-NXYCB2VD.js";
|
|
73
|
+
import "./chunk-ECH6PKUQ.js";
|
|
74
|
+
import "./chunk-IRXAATOX.js";
|
|
75
|
+
import "./chunk-BJVFZO5U.js";
|
|
76
|
+
import "./chunk-DXKJURES.js";
|
|
68
77
|
import "./chunk-HHV2GANA.js";
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-IKOZFYBN.js";
|
|
78
|
+
import "./chunk-GYV6VZOC.js";
|
|
71
79
|
import "./chunk-UL3WSD3F.js";
|
|
72
|
-
import "./chunk-ECH6PKUQ.js";
|
|
73
80
|
import "./chunk-5B2AEOW5.js";
|
|
74
|
-
import "./chunk-
|
|
75
|
-
import "./chunk-
|
|
76
|
-
import "./chunk-
|
|
77
|
-
import "./chunk-
|
|
78
|
-
import "./chunk-
|
|
79
|
-
import "./chunk-
|
|
80
|
-
import
|
|
81
|
-
formatColumns,
|
|
82
|
-
printError
|
|
83
|
-
} from "./chunk-VPKWYKEY.js";
|
|
84
|
-
import "./chunk-5TSRNF4G.js";
|
|
85
|
-
import "./chunk-BYMNWQ7O.js";
|
|
81
|
+
import "./chunk-VAVR4IJY.js";
|
|
82
|
+
import "./chunk-4BJ5BYCE.js";
|
|
83
|
+
import "./chunk-54X7T7DK.js";
|
|
84
|
+
import "./chunk-I5FWO7L5.js";
|
|
85
|
+
import "./chunk-6XLNIQDB.js";
|
|
86
|
+
import "./chunk-4NSRCOYP.js";
|
|
87
|
+
import "./chunk-JSD46VO2.js";
|
|
86
88
|
import "./chunk-CFGTUFWB.js";
|
|
87
|
-
import "./chunk-
|
|
88
|
-
import "./chunk-
|
|
89
|
+
import "./chunk-NZMNUPZZ.js";
|
|
90
|
+
import "./chunk-2JH2WHGE.js";
|
|
91
|
+
import "./chunk-KXDSS5WJ.js";
|
|
92
|
+
import "./chunk-GHS5EBTQ.js";
|
|
93
|
+
import "./chunk-D7E7WCDF.js";
|
|
89
94
|
import {
|
|
90
95
|
cwdHash
|
|
91
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-HAXOFFRH.js";
|
|
92
97
|
import "./chunk-R346GLFC.js";
|
|
93
|
-
import "./chunk-PMZVFWSR.js";
|
|
94
98
|
import "./chunk-BTK3SSSK.js";
|
|
95
|
-
import "./chunk-
|
|
96
|
-
import "./chunk-
|
|
97
|
-
import "./chunk-D7E7WCDF.js";
|
|
98
|
-
import "./chunk-HJWWJ6IL.js";
|
|
99
|
+
import "./chunk-W54I7H25.js";
|
|
100
|
+
import "./chunk-PMZVFWSR.js";
|
|
99
101
|
import "./chunk-F4EKGO4N.js";
|
|
100
|
-
import "./chunk-
|
|
101
|
-
import "./chunk-
|
|
102
|
-
import "./chunk-
|
|
102
|
+
import "./chunk-XAKHZX5N.js";
|
|
103
|
+
import "./chunk-33YXPOE3.js";
|
|
104
|
+
import "./chunk-7CR24IG7.js";
|
|
105
|
+
import "./chunk-XPLRXC72.js";
|
|
103
106
|
import "./chunk-IWHMRKLL.js";
|
|
104
|
-
import "./chunk-
|
|
107
|
+
import "./chunk-6OSVSQL5.js";
|
|
105
108
|
import "./chunk-UXCU4E3T.js";
|
|
106
109
|
import "./chunk-LL4KHSZI.js";
|
|
107
110
|
import "./chunk-S66XZJOF.js";
|
|
108
|
-
import "./chunk-
|
|
109
|
-
import "./chunk-
|
|
111
|
+
import "./chunk-TOIVGRUX.js";
|
|
112
|
+
import "./chunk-U6TMQNSI.js";
|
|
113
|
+
import "./chunk-EBY63B7G.js";
|
|
114
|
+
import "./chunk-6EJMN2Y3.js";
|
|
115
|
+
import "./chunk-26QSH3EJ.js";
|
|
116
|
+
import "./chunk-ID64D7PE.js";
|
|
110
117
|
import "./chunk-336NSSKI.js";
|
|
111
118
|
import "./chunk-IKCO5N3L.js";
|
|
112
119
|
import "./chunk-3I7MS7N2.js";
|
|
113
120
|
import "./chunk-APJ265NV.js";
|
|
121
|
+
import "./chunk-WEPFGWHJ.js";
|
|
122
|
+
import "./chunk-NUGM5KR6.js";
|
|
123
|
+
import "./chunk-5OIVVPHF.js";
|
|
124
|
+
import "./chunk-YPC6ZR5L.js";
|
|
125
|
+
import "./chunk-YXLYO42X.js";
|
|
126
|
+
import "./chunk-2LEAKD4C.js";
|
|
114
127
|
import {
|
|
115
128
|
clioDataDir,
|
|
116
129
|
clioStateDir
|
|
117
130
|
} from "./chunk-BYP5D4HI.js";
|
|
118
|
-
import "./chunk-WEPFGWHJ.js";
|
|
119
|
-
import "./chunk-NUGM5KR6.js";
|
|
120
|
-
import "./chunk-O42A54GG.js";
|
|
121
|
-
import "./chunk-VXMFAE2W.js";
|
|
122
|
-
import "./chunk-YXLYO42X.js";
|
|
123
131
|
import {
|
|
124
132
|
init_esm_shims
|
|
125
133
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -169,19 +177,20 @@ function addResponseModelIdObservation(counts, call) {
|
|
|
169
177
|
addResponseModelIdObservationCount(counts, call.responseModelIdObservation, call.apiCalls ?? 1);
|
|
170
178
|
}
|
|
171
179
|
function emptyCallOrigins() {
|
|
172
|
-
return { rows: 0, sideQuestions: 0, handoffs: 0, prewarms: 0, backgroundMemory: 0 };
|
|
180
|
+
return { rows: 0, sideQuestions: 0, handoffs: 0, prewarms: 0, backgroundMemory: 0, failedCompaction: 0 };
|
|
173
181
|
}
|
|
174
182
|
function turnsOf(origins) {
|
|
175
|
-
return origins.rows - origins.sideQuestions - origins.handoffs - origins.prewarms - origins.backgroundMemory;
|
|
183
|
+
return origins.rows - origins.sideQuestions - origins.handoffs - origins.prewarms - origins.backgroundMemory - origins.failedCompaction;
|
|
176
184
|
}
|
|
177
185
|
function hasLabelledCall(origins) {
|
|
178
|
-
return origins.sideQuestions > 0 || origins.handoffs > 0 || origins.prewarms > 0 || origins.backgroundMemory > 0;
|
|
186
|
+
return origins.sideQuestions > 0 || origins.handoffs > 0 || origins.prewarms > 0 || origins.backgroundMemory > 0 || origins.failedCompaction > 0;
|
|
179
187
|
}
|
|
180
188
|
function addOutOfTurnRow(origins, row) {
|
|
181
189
|
origins.rows += 1;
|
|
182
190
|
if (row.label === "side-question") origins.sideQuestions += 1;
|
|
183
191
|
else if (row.label === "prewarm") origins.prewarms += 1;
|
|
184
192
|
else if (row.label === "background-memory") origins.backgroundMemory += 1;
|
|
193
|
+
else if (row.label === "failed-compaction") origins.failedCompaction += 1;
|
|
185
194
|
else origins.handoffs += 1;
|
|
186
195
|
}
|
|
187
196
|
function outOfTurnUsageCall(row) {
|
|
@@ -190,15 +199,28 @@ function outOfTurnUsageCall(row) {
|
|
|
190
199
|
attributedModelId: row.attributedModelId,
|
|
191
200
|
requestedModelId: row.attributedModelId,
|
|
192
201
|
responseModelIdObservation: { state: "not-observed" },
|
|
193
|
-
input: row.usage.input,
|
|
194
|
-
output: row.usage.output,
|
|
195
|
-
cacheRead: row.usage.cacheRead,
|
|
196
|
-
cacheWrite: row.usage.cacheWrite,
|
|
197
|
-
reasoningTokens: row.usage.reasoning,
|
|
198
|
-
totalTokens: row.usage.totalTokens,
|
|
199
|
-
costUsd: row.usage.costUsd
|
|
202
|
+
input: row.usage.input ?? 0,
|
|
203
|
+
output: row.usage.output ?? 0,
|
|
204
|
+
cacheRead: row.usage.cacheRead ?? 0,
|
|
205
|
+
cacheWrite: row.usage.cacheWrite ?? 0,
|
|
206
|
+
reasoningTokens: row.usage.reasoning ?? 0,
|
|
207
|
+
totalTokens: row.usage.totalTokens ?? 0,
|
|
208
|
+
costUsd: row.usage.costUsd ?? 0
|
|
200
209
|
};
|
|
201
210
|
}
|
|
211
|
+
function reportedUsageTotals(totals, rows) {
|
|
212
|
+
const failedCompaction = summarizeFailedCompactionUsage(rows);
|
|
213
|
+
if (failedCompaction.calls === 0) return totals;
|
|
214
|
+
const reported = { ...totals, knownSubtotals: true, failedCompaction };
|
|
215
|
+
for (const [field, missing] of Object.entries(failedCompaction.unobservedUsageCalls)) {
|
|
216
|
+
const key = field === "reasoning" ? "reasoningTokens" : field;
|
|
217
|
+
if (missing > 0 && reported[key] === 0) reported[key] = null;
|
|
218
|
+
}
|
|
219
|
+
return reported;
|
|
220
|
+
}
|
|
221
|
+
function usageAmount(value) {
|
|
222
|
+
return typeof value === "number" ? String(value) : "unknown";
|
|
223
|
+
}
|
|
202
224
|
function addUsageCall(totals, call) {
|
|
203
225
|
totals.apiCalls += call.apiCalls ?? 1;
|
|
204
226
|
totals.input += call.input;
|
|
@@ -324,6 +346,7 @@ async function runUsageCommand(argv) {
|
|
|
324
346
|
return decision === "blocked" || decision === "denied";
|
|
325
347
|
});
|
|
326
348
|
const evidenceRows = readEvidenceIndex(stateDir).filter((row) => inWindow(row.generatedAt, windowStart, now));
|
|
349
|
+
const accountability = summarizeEvidenceIndex(evidenceRows);
|
|
327
350
|
let memoryRecords = [];
|
|
328
351
|
try {
|
|
329
352
|
memoryRecords = loadMemoryRecordsSync(clioDataDir());
|
|
@@ -415,6 +438,8 @@ async function runUsageCommand(argv) {
|
|
|
415
438
|
addOutOfTurnRow(callOrigins, row);
|
|
416
439
|
}
|
|
417
440
|
const usageMeasurable = presence.sessionsPresent || outOfTurnRows.length > 0;
|
|
441
|
+
const reportedTotals = reportedUsageTotals(usageTotals, outOfTurnRows);
|
|
442
|
+
const failedCompaction = summarizeFailedCompactionUsage(outOfTurnRows);
|
|
418
443
|
const usageRows = [...usageByModel.values()].sort(
|
|
419
444
|
(a, b) => b.totals.totalTokens - a.totals.totalTokens || a.providerId.localeCompare(b.providerId)
|
|
420
445
|
);
|
|
@@ -484,18 +509,21 @@ async function runUsageCommand(argv) {
|
|
|
484
509
|
else emit({ kind: "fact", fact: "session-store-missing", path: presence.sessionsPath });
|
|
485
510
|
if (presence.receiptsPresent) emit({ kind: "fact", fact: "dispatch-runs", value: receipts.length });
|
|
486
511
|
else emit({ kind: "fact", fact: "receipt-store-missing", path: presence.receiptsPath });
|
|
512
|
+
emit({ kind: "fact", fact: "unverified-successes", value: accountability.unverifiedSuccesses });
|
|
513
|
+
emit({ kind: "fact", fact: "ungrounded-claims", value: accountability.ungroundedClaims });
|
|
487
514
|
emit({ kind: "fact", fact: "audit-tool-calls", value: auditToolCalls.length, blocked: auditBlocked.length });
|
|
488
515
|
if (usageMeasurable) {
|
|
489
516
|
emit({
|
|
490
517
|
kind: "fact",
|
|
491
518
|
fact: "tokens",
|
|
492
|
-
...
|
|
519
|
+
...reportedTotals,
|
|
493
520
|
...hasLabelledCall(callOrigins) ? {
|
|
494
521
|
turns: turnsOf(callOrigins),
|
|
495
522
|
sideQuestions: callOrigins.sideQuestions,
|
|
496
523
|
handoffs: callOrigins.handoffs,
|
|
497
524
|
prewarms: callOrigins.prewarms,
|
|
498
|
-
backgroundMemorySteps: callOrigins.backgroundMemory
|
|
525
|
+
backgroundMemorySteps: callOrigins.backgroundMemory,
|
|
526
|
+
...callOrigins.failedCompaction > 0 ? { failedCompactionCalls: callOrigins.failedCompaction } : {}
|
|
499
527
|
} : {}
|
|
500
528
|
});
|
|
501
529
|
for (const row of usageRows) {
|
|
@@ -506,7 +534,12 @@ async function runUsageCommand(argv) {
|
|
|
506
534
|
attributedModelId: row.attributedModelId,
|
|
507
535
|
requestedModelIds: [...row.requestedModelIds].sort(),
|
|
508
536
|
responseModelIdObservationCounts: row.responseModelIdObservationCounts,
|
|
509
|
-
...
|
|
537
|
+
...reportedUsageTotals(
|
|
538
|
+
row.totals,
|
|
539
|
+
outOfTurnRows.filter(
|
|
540
|
+
(call) => call.target === row.providerId && call.attributedModelId === row.attributedModelId
|
|
541
|
+
)
|
|
542
|
+
)
|
|
510
543
|
});
|
|
511
544
|
}
|
|
512
545
|
for (const session of cacheSessions) {
|
|
@@ -566,7 +599,7 @@ async function runUsageCommand(argv) {
|
|
|
566
599
|
out(` audited tool calls in window: ${auditToolCalls.length} (${auditBlocked.length} blocked/denied)`);
|
|
567
600
|
if (usageMeasurable) {
|
|
568
601
|
out(
|
|
569
|
-
` tokens in window: ${
|
|
602
|
+
` tokens in window: ${usageAmount(reportedTotals.totalTokens)} over ${usageTotals.apiCalls} model calls (input ${usageAmount(reportedTotals.input)}, output ${usageAmount(reportedTotals.output)}, cache read ${usageAmount(reportedTotals.cacheRead)}, cache write ${usageAmount(reportedTotals.cacheWrite)}, reasoning ${usageAmount(reportedTotals.reasoningTokens)})`
|
|
570
603
|
);
|
|
571
604
|
if (hasLabelledCall(callOrigins)) {
|
|
572
605
|
out(` turns in window: ${turnsOf(callOrigins)}`);
|
|
@@ -577,7 +610,18 @@ async function runUsageCommand(argv) {
|
|
|
577
610
|
out(` background memory steps in window: ${callOrigins.backgroundMemory}`);
|
|
578
611
|
}
|
|
579
612
|
}
|
|
580
|
-
|
|
613
|
+
if (failedCompaction.calls > 0) {
|
|
614
|
+
out(
|
|
615
|
+
` failed-compaction streams: ${failedCompaction.calls} (${failedCompaction.erroredCalls} errored, ${failedCompaction.abortedCalls} aborted, ${failedCompaction.successfulCalls} completed before the attempt failed)`
|
|
616
|
+
);
|
|
617
|
+
out(" usage figures are known subtotals; missing compaction usage is not zero or a complete spending bound");
|
|
618
|
+
out(
|
|
619
|
+
` errored compaction known cost: ${failedCompaction.erroredKnownUsage.costUsd === null ? "unknown" : `$${failedCompaction.erroredKnownUsage.costUsd.toFixed(4)}`}`
|
|
620
|
+
);
|
|
621
|
+
}
|
|
622
|
+
out(
|
|
623
|
+
` ${failedCompaction.calls > 0 ? "known reported/estimated" : "provider-reported"} cost in window: ${typeof reportedTotals.costUsd === "number" ? `$${reportedTotals.costUsd.toFixed(4)}` : "unknown"}`
|
|
624
|
+
);
|
|
581
625
|
}
|
|
582
626
|
if (usageRows.length > 0) {
|
|
583
627
|
out("");
|
|
@@ -598,19 +642,27 @@ async function runUsageCommand(argv) {
|
|
|
598
642
|
"tokens",
|
|
599
643
|
"cost"
|
|
600
644
|
],
|
|
601
|
-
...usageRows.map((row) =>
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
645
|
+
...usageRows.map((row) => {
|
|
646
|
+
const reported = reportedUsageTotals(
|
|
647
|
+
row.totals,
|
|
648
|
+
outOfTurnRows.filter(
|
|
649
|
+
(call) => call.target === row.providerId && call.attributedModelId === row.attributedModelId
|
|
650
|
+
)
|
|
651
|
+
);
|
|
652
|
+
return [
|
|
653
|
+
row.providerId,
|
|
654
|
+
row.attributedModelId,
|
|
655
|
+
[...row.requestedModelIds].sort().join(","),
|
|
656
|
+
responseModelIdObservationCountsLabel(row.responseModelIdObservationCounts),
|
|
657
|
+
String(row.totals.apiCalls),
|
|
658
|
+
usageAmount(reported.input),
|
|
659
|
+
usageAmount(reported.output),
|
|
660
|
+
usageAmount(reported.cacheRead),
|
|
661
|
+
usageAmount(reported.reasoningTokens),
|
|
662
|
+
usageAmount(reported.totalTokens),
|
|
663
|
+
typeof reported.costUsd === "number" ? `$${reported.costUsd.toFixed(4)}` : "unknown"
|
|
664
|
+
];
|
|
665
|
+
})
|
|
614
666
|
])
|
|
615
667
|
)
|
|
616
668
|
);
|
|
@@ -695,6 +747,8 @@ async function runUsageCommand(argv) {
|
|
|
695
747
|
)
|
|
696
748
|
);
|
|
697
749
|
}
|
|
750
|
+
out(` unverified successes: ${accountability.unverifiedSuccesses}`);
|
|
751
|
+
out(` ungrounded claims: ${accountability.ungroundedClaims}`);
|
|
698
752
|
if (tagCounts.size > 0) {
|
|
699
753
|
out("");
|
|
700
754
|
out(" failure tags (from evidence index)");
|
|
@@ -963,4 +1017,4 @@ function isRecord(value) {
|
|
|
963
1017
|
export {
|
|
964
1018
|
runUsageCommand
|
|
965
1019
|
};
|
|
966
|
-
//# sourceMappingURL=usage-
|
|
1020
|
+
//# sourceMappingURL=usage-NHG6MCJM.js.map
|
|
@@ -4,41 +4,47 @@ import {
|
|
|
4
4
|
discoverVerifierAuthoring,
|
|
5
5
|
previewVerifierDraft,
|
|
6
6
|
runVerifierAuthoringWorkflow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q4WO54TA.js";
|
|
8
8
|
import {
|
|
9
9
|
verifyTool
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import
|
|
10
|
+
} from "./chunk-23L32XTI.js";
|
|
11
|
+
import {
|
|
12
|
+
recordPerfBaseline
|
|
13
|
+
} from "./chunk-K6T2ZAMZ.js";
|
|
12
14
|
import "./chunk-LCGCVYZ4.js";
|
|
13
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-V76WTFTW.js";
|
|
16
|
+
import {
|
|
17
|
+
printError,
|
|
18
|
+
printOk
|
|
19
|
+
} from "./chunk-JCI2ROMZ.js";
|
|
20
|
+
import "./chunk-GX5WYQO4.js";
|
|
14
21
|
import "./chunk-VG7TBQIY.js";
|
|
22
|
+
import "./chunk-OQE5J4C6.js";
|
|
23
|
+
import "./chunk-ECH6PKUQ.js";
|
|
24
|
+
import "./chunk-BJVFZO5U.js";
|
|
15
25
|
import {
|
|
26
|
+
DECLARED_CHECK_KINDS,
|
|
16
27
|
PROJECT_VERIFIER_CATALOG_RELATIVE_PATH,
|
|
17
|
-
loadProjectVerifierCatalog
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import "./chunk-6XLNIQDB.js";
|
|
28
|
+
loadProjectVerifierCatalog,
|
|
29
|
+
normalizeNumericTolerance
|
|
30
|
+
} from "./chunk-DXKJURES.js";
|
|
21
31
|
import {
|
|
22
32
|
isProjectVerifierCheckId
|
|
23
33
|
} from "./chunk-UL3WSD3F.js";
|
|
24
|
-
import "./chunk-ECH6PKUQ.js";
|
|
25
34
|
import "./chunk-5B2AEOW5.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import
|
|
28
|
-
|
|
29
|
-
printOk
|
|
30
|
-
} from "./chunk-VPKWYKEY.js";
|
|
31
|
-
import "./chunk-5TSRNF4G.js";
|
|
35
|
+
import "./chunk-I5FWO7L5.js";
|
|
36
|
+
import "./chunk-6XLNIQDB.js";
|
|
37
|
+
import "./chunk-4NSRCOYP.js";
|
|
32
38
|
import {
|
|
33
39
|
SAFE_EXEC_DEFAULT_TIMEOUT_MS
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-TOIVGRUX.js";
|
|
41
|
+
import "./chunk-U6TMQNSI.js";
|
|
36
42
|
import "./chunk-EBY63B7G.js";
|
|
37
43
|
import "./chunk-6EJMN2Y3.js";
|
|
38
44
|
import "./chunk-APJ265NV.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-VXMFAE2W.js";
|
|
45
|
+
import "./chunk-YPC6ZR5L.js";
|
|
41
46
|
import "./chunk-YXLYO42X.js";
|
|
47
|
+
import "./chunk-BYP5D4HI.js";
|
|
42
48
|
import {
|
|
43
49
|
init_esm_shims
|
|
44
50
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -208,11 +214,22 @@ Usage:
|
|
|
208
214
|
clio-coder verifiers edit <id> [--description <text>] [--command <json-argv>] [fields] [--yes]
|
|
209
215
|
clio-coder verifiers rename <old> <new> [--yes]
|
|
210
216
|
clio-coder verifiers remove <id> [--yes]
|
|
217
|
+
clio-coder verifiers baseline <id>
|
|
211
218
|
|
|
212
219
|
Fields:
|
|
213
220
|
--cwd <path> repository-relative working directory (default .)
|
|
214
221
|
--timeout-ms <number> bounded timeout in milliseconds (default 120000)
|
|
215
222
|
--tags <a,b> comma-separated catalog tags
|
|
223
|
+
--kind <kind> command (default), numeric-compare, or perf-budget
|
|
224
|
+
--reference <path> numeric-compare: repository-relative reference JSON of string -> number | number[]
|
|
225
|
+
--tolerance <json> numeric-compare: {"relative"?,"absolute"?,"ulp"?}, at least one;
|
|
226
|
+
perf-budget with --baseline: {"relative"} headroom over the baseline
|
|
227
|
+
--budget-ms <number> perf-budget: wall-time bound in milliseconds
|
|
228
|
+
--budget-relative <r> perf-budget with --budget-ms: fractional headroom over the bound
|
|
229
|
+
--baseline <path> perf-budget: repository-relative baseline JSON written by 'verifiers baseline <id>'
|
|
230
|
+
|
|
231
|
+
baseline runs a perf-budget check once and records its wall time at the check's
|
|
232
|
+
baseline path; a failing or timed-out command records nothing.
|
|
216
233
|
|
|
217
234
|
Discovery and every preview are read-only. Mutating commands write only with
|
|
218
235
|
--yes after printing the exact argv, cwd, timeout, tags, source provenance, and
|
|
@@ -231,7 +248,13 @@ var VALUE_OPTIONS = /* @__PURE__ */ new Set([
|
|
|
231
248
|
"--tags",
|
|
232
249
|
"--exclude",
|
|
233
250
|
"--rename",
|
|
234
|
-
"--dry-run"
|
|
251
|
+
"--dry-run",
|
|
252
|
+
"--kind",
|
|
253
|
+
"--reference",
|
|
254
|
+
"--tolerance",
|
|
255
|
+
"--budget-ms",
|
|
256
|
+
"--budget-relative",
|
|
257
|
+
"--baseline"
|
|
235
258
|
]);
|
|
236
259
|
function parseAuthoringArgs(argv) {
|
|
237
260
|
const positional = [];
|
|
@@ -289,6 +312,82 @@ function parseTimeout(value) {
|
|
|
289
312
|
function tags(value) {
|
|
290
313
|
return value === void 0 ? [] : value.split(",").map((tag) => tag.trim()).filter((tag) => tag.length > 0);
|
|
291
314
|
}
|
|
315
|
+
function parseJsonObject(value, option) {
|
|
316
|
+
try {
|
|
317
|
+
const parsed = JSON.parse(value);
|
|
318
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
319
|
+
return new Error(`${option} must be a JSON object`);
|
|
320
|
+
}
|
|
321
|
+
return parsed;
|
|
322
|
+
} catch (error) {
|
|
323
|
+
return new Error(`${option} must be valid JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
function kindFieldsFromArgs(parsed) {
|
|
327
|
+
const kindValue = oneValue(parsed, "--kind") ?? "command";
|
|
328
|
+
if (!DECLARED_CHECK_KINDS.includes(kindValue)) {
|
|
329
|
+
return new Error(`--kind must be one of ${DECLARED_CHECK_KINDS.join(", ")}`);
|
|
330
|
+
}
|
|
331
|
+
const kind = kindValue;
|
|
332
|
+
const reference = oneValue(parsed, "--reference");
|
|
333
|
+
const toleranceValue = oneValue(parsed, "--tolerance");
|
|
334
|
+
const budgetMs = oneValue(parsed, "--budget-ms");
|
|
335
|
+
const budgetRelative = oneValue(parsed, "--budget-relative");
|
|
336
|
+
const baseline = oneValue(parsed, "--baseline");
|
|
337
|
+
if (kind === "command") {
|
|
338
|
+
const stray = [
|
|
339
|
+
["--reference", reference],
|
|
340
|
+
["--tolerance", toleranceValue],
|
|
341
|
+
["--budget-ms", budgetMs],
|
|
342
|
+
["--budget-relative", budgetRelative],
|
|
343
|
+
["--baseline", baseline]
|
|
344
|
+
].filter(([, value]) => value !== void 0);
|
|
345
|
+
if (stray.length > 0)
|
|
346
|
+
return new Error(`${stray.map(([name]) => name).join(", ")} require --kind numeric-compare or perf-budget`);
|
|
347
|
+
return {};
|
|
348
|
+
}
|
|
349
|
+
if (kind === "numeric-compare") {
|
|
350
|
+
if (budgetMs !== void 0 || budgetRelative !== void 0 || baseline !== void 0) {
|
|
351
|
+
return new Error("--budget-ms, --budget-relative, and --baseline belong to --kind perf-budget");
|
|
352
|
+
}
|
|
353
|
+
if (reference === void 0) return new Error("--reference is required for --kind numeric-compare");
|
|
354
|
+
if (toleranceValue === void 0) return new Error("--tolerance is required for --kind numeric-compare");
|
|
355
|
+
const toleranceJson = parseJsonObject(toleranceValue, "--tolerance");
|
|
356
|
+
if (toleranceJson instanceof Error) return toleranceJson;
|
|
357
|
+
const tolerance = normalizeNumericTolerance(toleranceJson);
|
|
358
|
+
if (tolerance instanceof Error) return new Error(`--tolerance ${tolerance.message}`);
|
|
359
|
+
return { kind, numeric: { reference, tolerance } };
|
|
360
|
+
}
|
|
361
|
+
if (reference !== void 0) return new Error("--reference belongs to --kind numeric-compare");
|
|
362
|
+
if (budgetMs === void 0 === (baseline === void 0)) {
|
|
363
|
+
return new Error("--kind perf-budget requires exactly one of --budget-ms or --baseline");
|
|
364
|
+
}
|
|
365
|
+
if (budgetMs !== void 0) {
|
|
366
|
+
if (toleranceValue !== void 0) return new Error("use --budget-relative for headroom over --budget-ms");
|
|
367
|
+
const wallTimeMs = Number(budgetMs);
|
|
368
|
+
if (!Number.isFinite(wallTimeMs) || wallTimeMs <= 0) return new Error("--budget-ms must be a positive number");
|
|
369
|
+
const budget = { wallTimeMs };
|
|
370
|
+
if (budgetRelative !== void 0) {
|
|
371
|
+
const relative = Number(budgetRelative);
|
|
372
|
+
if (!Number.isFinite(relative) || relative < 0) return new Error("--budget-relative must be a non-negative number");
|
|
373
|
+
budget.tolerance = { relative };
|
|
374
|
+
}
|
|
375
|
+
return { kind, perf: { budget } };
|
|
376
|
+
}
|
|
377
|
+
if (budgetRelative !== void 0)
|
|
378
|
+
return new Error("--budget-relative belongs with --budget-ms; use --tolerance with --baseline");
|
|
379
|
+
const perf = { baseline };
|
|
380
|
+
if (toleranceValue !== void 0) {
|
|
381
|
+
const toleranceJson = parseJsonObject(toleranceValue, "--tolerance");
|
|
382
|
+
if (toleranceJson instanceof Error) return toleranceJson;
|
|
383
|
+
const relative = toleranceJson.relative;
|
|
384
|
+
if (typeof relative !== "number" || !Number.isFinite(relative) || relative < 0) {
|
|
385
|
+
return new Error('--tolerance for a baseline must be {"relative": <non-negative number>}');
|
|
386
|
+
}
|
|
387
|
+
perf.tolerance = { relative };
|
|
388
|
+
}
|
|
389
|
+
return { kind, perf };
|
|
390
|
+
}
|
|
292
391
|
function requiredValue(parsed, option) {
|
|
293
392
|
const value = oneValue(parsed, option);
|
|
294
393
|
return value === void 0 || value.length === 0 ? new Error(`${option} is required`) : value;
|
|
@@ -314,6 +413,8 @@ function addRevision(parsed) {
|
|
|
314
413
|
if (command instanceof Error) return command;
|
|
315
414
|
const timeoutMs = parseTimeout(oneValue(parsed, "--timeout-ms"));
|
|
316
415
|
if (timeoutMs instanceof Error) return timeoutMs;
|
|
416
|
+
const kindFields = kindFieldsFromArgs(parsed);
|
|
417
|
+
if (kindFields instanceof Error) return kindFields;
|
|
317
418
|
return {
|
|
318
419
|
kind: "add",
|
|
319
420
|
check: {
|
|
@@ -322,7 +423,8 @@ function addRevision(parsed) {
|
|
|
322
423
|
command,
|
|
323
424
|
cwd: oneValue(parsed, "--cwd") ?? ".",
|
|
324
425
|
timeoutMs,
|
|
325
|
-
tags: tags(oneValue(parsed, "--tags"))
|
|
426
|
+
tags: tags(oneValue(parsed, "--tags")),
|
|
427
|
+
...kindFields
|
|
326
428
|
}
|
|
327
429
|
};
|
|
328
430
|
}
|
|
@@ -348,6 +450,13 @@ function editRevision(parsed) {
|
|
|
348
450
|
}
|
|
349
451
|
const tagValue = oneValue(parsed, "--tags");
|
|
350
452
|
if (tagValue !== void 0) changes.tags = tags(tagValue);
|
|
453
|
+
if (oneValue(parsed, "--kind") !== void 0) {
|
|
454
|
+
const kindFields = kindFieldsFromArgs(parsed);
|
|
455
|
+
if (kindFields instanceof Error) return kindFields;
|
|
456
|
+
changes.kind = kindFields.kind ?? "command";
|
|
457
|
+
if (kindFields.numeric !== void 0) changes.numeric = kindFields.numeric;
|
|
458
|
+
if (kindFields.perf !== void 0) changes.perf = kindFields.perf;
|
|
459
|
+
}
|
|
351
460
|
if (Object.keys(changes).length === 0) return new Error("edit requires at least one changed field");
|
|
352
461
|
return { kind: "edit", id, changes };
|
|
353
462
|
}
|
|
@@ -419,6 +528,29 @@ async function executeWorkflow(parsed, options) {
|
|
|
419
528
|
for (const dryRun of result.dryRuns) code = Math.max(code, printDryRun(dryRun.id, dryRun.result));
|
|
420
529
|
return code;
|
|
421
530
|
}
|
|
531
|
+
async function baselineCommand(id) {
|
|
532
|
+
if (id === void 0) {
|
|
533
|
+
printError("baseline requires a check ID");
|
|
534
|
+
return 2;
|
|
535
|
+
}
|
|
536
|
+
const loaded = loadProjectVerifierCatalog(process.cwd());
|
|
537
|
+
if (!loaded.ok) {
|
|
538
|
+
printError(`production catalog parser rejected ${loaded.reason}`);
|
|
539
|
+
return 1;
|
|
540
|
+
}
|
|
541
|
+
const check = loaded.source?.checks.find((candidate) => candidate.id === id);
|
|
542
|
+
if (check === void 0) {
|
|
543
|
+
printError(`no catalog check '${id}' in ${PROJECT_VERIFIER_CATALOG_RELATIVE_PATH}`);
|
|
544
|
+
return 1;
|
|
545
|
+
}
|
|
546
|
+
const recorded = await recordPerfBaseline(check);
|
|
547
|
+
if (!recorded.ok) {
|
|
548
|
+
printError(`baseline '${id}' not recorded: ${recorded.message}`);
|
|
549
|
+
return 1;
|
|
550
|
+
}
|
|
551
|
+
printOk(`recorded baseline for '${id}': ${Math.round(recorded.wallTimeMs)}ms at ${recorded.path}`);
|
|
552
|
+
return 0;
|
|
553
|
+
}
|
|
422
554
|
async function discoverCommand() {
|
|
423
555
|
const discovery = discoverVerifierAuthoring();
|
|
424
556
|
if (!discovery.ok) {
|
|
@@ -462,6 +594,7 @@ async function runVerifiersCommand(argv) {
|
|
|
462
594
|
const command = parsed.positional[0];
|
|
463
595
|
if (command === "discover") return discoverCommand();
|
|
464
596
|
if (command === "validate") return validateCommand();
|
|
597
|
+
if (command === "baseline") return baselineCommand(parsed.positional[1]);
|
|
465
598
|
if (command === "dry-run") {
|
|
466
599
|
const id = parsed.positional[1];
|
|
467
600
|
if (id === void 0) {
|
|
@@ -493,4 +626,4 @@ async function runVerifiersCommand(argv) {
|
|
|
493
626
|
export {
|
|
494
627
|
runVerifiersCommand
|
|
495
628
|
};
|
|
496
|
-
//# sourceMappingURL=verifiers-
|
|
629
|
+
//# sourceMappingURL=verifiers-7AUNVXDY.js.map
|