@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
package/src/cli/reset.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { type Dirent,
|
|
1
|
+
import { type Dirent, readdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
4
|
import { initializeClioHome } from "../core/init.js";
|
|
5
5
|
import { resetXdgCache, resolveClioDirs } from "../core/xdg.js";
|
|
6
|
+
import { createLifecyclePresenter, type LifecycleItem, measurePath } from "./lifecycle-presenter.js";
|
|
6
7
|
import { type RemovalFailure, removePath, reportRemovalFailures } from "./removal.js";
|
|
7
|
-
import { printError
|
|
8
|
-
import { terminalColumns, wrapPlain } from "./text-layout.js";
|
|
8
|
+
import { printError } from "./shared.js";
|
|
9
9
|
|
|
10
|
-
const HELP = `clio-coder reset [--state|--data|--cache|--auth|--config|--all] [--dry-run] [--force]
|
|
10
|
+
const HELP = `clio-coder reset [--state|--data|--cache|--auth|--config|--all] [--dry-run] [--force] [--json]
|
|
11
11
|
|
|
12
|
-
Recover or wipe Clio Coder state while keeping the clio
|
|
13
|
-
Each level clears exactly the root (or file) it names and nothing else
|
|
12
|
+
Recover or wipe Clio Coder state while keeping the clio-coder launcher installed.
|
|
13
|
+
Each level clears exactly the root (or file) it names and nothing else, then the
|
|
14
|
+
empty roots are recreated so the next run has somewhere to write.
|
|
14
15
|
|
|
15
16
|
Levels (combinable except --all):
|
|
16
17
|
--state state root only (default). Holds every session transcript, so a
|
|
@@ -19,34 +20,24 @@ Levels (combinable except --all):
|
|
|
19
20
|
--cache cache root only
|
|
20
21
|
--auth credentials.yaml only
|
|
21
22
|
--config settings.yaml only
|
|
22
|
-
--all all four roots: config
|
|
23
|
-
|
|
24
|
-
Every run reads each selected root and lists what is inside it before removing
|
|
25
|
-
anything, so what a level covers is read off that listing rather than off this
|
|
26
|
-
text. --dry-run prints the same listing and changes nothing.
|
|
23
|
+
--all all four roots whole: config (settings, credentials, and anything
|
|
24
|
+
else under it), data, state, and cache
|
|
27
25
|
|
|
28
26
|
Safety:
|
|
29
|
-
--force
|
|
27
|
+
--force, -f required for destructive execution in non-interactive environments
|
|
30
28
|
--dry-run print what would be reset without changing anything
|
|
29
|
+
--json emit machine-readable JSON output
|
|
30
|
+
--help, -h show this message
|
|
31
31
|
`;
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
const ROOT_NOTES: Readonly<Record<string, string>> = {
|
|
43
|
-
state:
|
|
44
|
-
"the state root holds every session transcript and the audit trail beside it; resume and /view lose their history",
|
|
45
|
-
// Vendored tools are named because they are the one durable product a reset
|
|
46
|
-
// cannot regenerate from anything local: getting them back is a download.
|
|
47
|
-
data:
|
|
48
|
-
"the data root holds durable products (memory, evidence, evals, and any vendored external tools, which a reinstall re-downloads)",
|
|
49
|
-
};
|
|
33
|
+
const ROOT_NOTES = {
|
|
34
|
+
state: "State holds every session transcript and the audit trail; resume and /view lose their history.",
|
|
35
|
+
data: "Data holds memory, evidence, evals, and vendored tools; the tools have to be downloaded again.",
|
|
36
|
+
config: "Settings return to their defaults.",
|
|
37
|
+
auth: "Saved API keys are gone; each target has to be authenticated again.",
|
|
38
|
+
cache: "Cache is disposable and rebuilds itself.",
|
|
39
|
+
all: "Everything goes: settings, credentials, memory, evidence, transcripts, and caches. A clean install remains.",
|
|
40
|
+
} as const;
|
|
50
41
|
|
|
51
42
|
interface ParsedResetArgs {
|
|
52
43
|
state: boolean;
|
|
@@ -57,6 +48,7 @@ interface ParsedResetArgs {
|
|
|
57
48
|
all: boolean;
|
|
58
49
|
force: boolean;
|
|
59
50
|
dryRun: boolean;
|
|
51
|
+
json: boolean;
|
|
60
52
|
help: boolean;
|
|
61
53
|
}
|
|
62
54
|
|
|
@@ -70,6 +62,7 @@ function parseResetArgs(argv: ReadonlyArray<string>): ParsedResetArgs {
|
|
|
70
62
|
all: false,
|
|
71
63
|
force: false,
|
|
72
64
|
dryRun: false,
|
|
65
|
+
json: false,
|
|
73
66
|
help: false,
|
|
74
67
|
};
|
|
75
68
|
for (const arg of argv) {
|
|
@@ -99,6 +92,9 @@ function parseResetArgs(argv: ReadonlyArray<string>): ParsedResetArgs {
|
|
|
99
92
|
case "--dry-run":
|
|
100
93
|
parsed.dryRun = true;
|
|
101
94
|
break;
|
|
95
|
+
case "--json":
|
|
96
|
+
parsed.json = true;
|
|
97
|
+
break;
|
|
102
98
|
case "--help":
|
|
103
99
|
case "-h":
|
|
104
100
|
parsed.help = true;
|
|
@@ -117,49 +113,26 @@ function parseResetArgs(argv: ReadonlyArray<string>): ParsedResetArgs {
|
|
|
117
113
|
return parsed;
|
|
118
114
|
}
|
|
119
115
|
|
|
120
|
-
function report(label: string, path: string): void {
|
|
121
|
-
process.stdout.write(` ${label.padEnd(12)} ${path}${existsSync(path) ? "" : " (absent)"}\n`);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
116
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* This is the inventory, read off the disk on the run that is about to remove
|
|
129
|
-
* it. `--help` used to carry a remembered one, "sessions, audit, receipts,
|
|
130
|
-
* runs, install metadata", which named five things and omitted `interviews/`,
|
|
131
|
-
* `scratch/`, and every dispatch artifact written since that sentence was
|
|
132
|
-
* typed. A list nobody has to maintain cannot drift from what the removal takes.
|
|
117
|
+
* What sits directly under a root, named so the operator recognizes what the
|
|
118
|
+
* reset takes. Directories keep their trailing slash; the list is capped so one
|
|
119
|
+
* crowded root cannot push the decision off the screen.
|
|
133
120
|
*/
|
|
134
|
-
function rootContents(path: string): string
|
|
121
|
+
function rootContents(path: string, limit = 4): string | undefined {
|
|
135
122
|
let entries: Dirent[];
|
|
136
123
|
try {
|
|
137
124
|
entries = readdirSync(path, { withFileTypes: true });
|
|
138
125
|
} catch {
|
|
139
|
-
return
|
|
126
|
+
return undefined;
|
|
140
127
|
}
|
|
141
|
-
return
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
let count: number;
|
|
145
|
-
try {
|
|
146
|
-
count = readdirSync(join(path, entry.name)).length;
|
|
147
|
-
} catch {
|
|
148
|
-
return `${entry.name}/`;
|
|
149
|
-
}
|
|
150
|
-
return `${entry.name}/ (${count})`;
|
|
151
|
-
})
|
|
128
|
+
if (entries.length === 0) return undefined;
|
|
129
|
+
const names = entries
|
|
130
|
+
.map((entry) => (entry.isDirectory() ? `${entry.name}/` : entry.name))
|
|
152
131
|
.sort((left, right) => left.localeCompare(right));
|
|
132
|
+
const shown = names.slice(0, limit).join(", ");
|
|
133
|
+
return names.length > limit ? `${shown}, +${names.length - limit} more` : shown;
|
|
153
134
|
}
|
|
154
135
|
|
|
155
|
-
/** Write `text` indented under a root line, wrapped to the terminal. */
|
|
156
|
-
function writeIndented(text: string, indent: number): void {
|
|
157
|
-
const [first = "", ...rest] = wrapPlain(text, Math.max(20, terminalColumns() - indent), indent);
|
|
158
|
-
process.stdout.write(`${" ".repeat(indent)}${first}\n`);
|
|
159
|
-
for (const line of rest) process.stdout.write(`${line}\n`);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/** Reconstruct the invocation to rerun after a partial failure. */
|
|
163
136
|
function resetInvocation(args: ParsedResetArgs): string {
|
|
164
137
|
const levels = (
|
|
165
138
|
[
|
|
@@ -176,81 +149,230 @@ function resetInvocation(args: ParsedResetArgs): string {
|
|
|
176
149
|
return `clio-coder reset ${levels.join(" ")} --force`;
|
|
177
150
|
}
|
|
178
151
|
|
|
179
|
-
export function runResetCommand(argv: ReadonlyArray<string>): number {
|
|
152
|
+
export async function runResetCommand(argv: ReadonlyArray<string>): Promise<number> {
|
|
180
153
|
let args: ParsedResetArgs;
|
|
181
154
|
try {
|
|
182
155
|
args = parseResetArgs(argv);
|
|
183
156
|
} catch (error) {
|
|
184
157
|
printError(error instanceof Error ? error.message : String(error));
|
|
185
|
-
process.
|
|
158
|
+
process.stderr.write(HELP);
|
|
186
159
|
return 2;
|
|
187
160
|
}
|
|
188
161
|
if (args.help) {
|
|
189
162
|
process.stdout.write(HELP);
|
|
190
163
|
return 0;
|
|
191
164
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
165
|
+
|
|
166
|
+
// One sentence, and nothing on stdout: a caller that piped this run is
|
|
167
|
+
// parsing stdout, and a help dump there is indistinguishable from output.
|
|
168
|
+
const isInteractive = Boolean(process.stdin.isTTY);
|
|
169
|
+
if (!args.dryRun && !args.force && !isInteractive) {
|
|
170
|
+
printError("`clio-coder reset` needs a terminal to confirm; pass --force to skip the prompt");
|
|
195
171
|
return 2;
|
|
196
172
|
}
|
|
197
173
|
|
|
198
174
|
const dirs = resolveClioDirs();
|
|
199
175
|
const settingsPath = join(dirs.config, "settings.yaml");
|
|
200
176
|
const credentialsPath = join(dirs.config, "credentials.yaml");
|
|
177
|
+
const presenter = createLifecyclePresenter({ json: args.json });
|
|
178
|
+
|
|
179
|
+
presenter.header("Reset Clio Coder", "reset");
|
|
201
180
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
181
|
+
// Determine scopes to clear
|
|
182
|
+
const resetData = args.all || args.data;
|
|
183
|
+
const resetState = args.all || args.state;
|
|
184
|
+
const resetCache = args.all || args.cache;
|
|
185
|
+
|
|
186
|
+
const configSize = measurePath(dirs.config);
|
|
187
|
+
const dataSize = measurePath(dirs.data);
|
|
188
|
+
const stateSize = measurePath(dirs.state);
|
|
189
|
+
const cacheSize = measurePath(dirs.cache);
|
|
190
|
+
|
|
191
|
+
const items: LifecycleItem[] = [];
|
|
192
|
+
|
|
193
|
+
// State
|
|
194
|
+
if (resetState) {
|
|
195
|
+
items.push({
|
|
196
|
+
label: "State",
|
|
197
|
+
path: dirs.state,
|
|
198
|
+
bytes: stateSize.bytes,
|
|
199
|
+
status: stateSize.exists ? "remove" : "absent",
|
|
200
|
+
detail: rootContents(dirs.state),
|
|
201
|
+
});
|
|
202
|
+
} else {
|
|
203
|
+
items.push({
|
|
204
|
+
label: "State",
|
|
205
|
+
path: dirs.state,
|
|
206
|
+
bytes: stateSize.bytes,
|
|
207
|
+
status: stateSize.exists ? "keep" : "absent",
|
|
208
|
+
detail: stateSize.exists ? "survives" : undefined,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Data
|
|
213
|
+
if (resetData) {
|
|
214
|
+
items.push({
|
|
215
|
+
label: "Data",
|
|
216
|
+
path: dirs.data,
|
|
217
|
+
bytes: dataSize.bytes,
|
|
218
|
+
status: dataSize.exists ? "remove" : "absent",
|
|
219
|
+
});
|
|
220
|
+
} else {
|
|
221
|
+
items.push({
|
|
222
|
+
label: "Data",
|
|
223
|
+
path: dirs.data,
|
|
224
|
+
bytes: dataSize.bytes,
|
|
225
|
+
status: dataSize.exists ? "keep" : "absent",
|
|
226
|
+
detail: dataSize.exists ? "survives" : undefined,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Config / settings / auth
|
|
231
|
+
if (args.all) {
|
|
232
|
+
items.push({
|
|
233
|
+
label: "Config",
|
|
234
|
+
path: dirs.config,
|
|
235
|
+
bytes: configSize.bytes,
|
|
236
|
+
status: configSize.exists ? "remove" : "absent",
|
|
237
|
+
});
|
|
238
|
+
} else {
|
|
239
|
+
const stSettings = measurePath(settingsPath);
|
|
240
|
+
if (args.config) {
|
|
241
|
+
items.push({
|
|
242
|
+
label: "Settings",
|
|
243
|
+
path: settingsPath,
|
|
244
|
+
bytes: stSettings.bytes,
|
|
245
|
+
status: stSettings.exists ? "remove" : "absent",
|
|
246
|
+
});
|
|
247
|
+
} else {
|
|
248
|
+
items.push({
|
|
249
|
+
label: "Settings",
|
|
250
|
+
path: settingsPath,
|
|
251
|
+
bytes: stSettings.bytes,
|
|
252
|
+
status: stSettings.exists ? "keep" : "absent",
|
|
253
|
+
detail: stSettings.exists ? "survives" : undefined,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const stCreds = measurePath(credentialsPath);
|
|
258
|
+
if (args.auth) {
|
|
259
|
+
items.push({
|
|
260
|
+
label: "Credentials",
|
|
261
|
+
path: credentialsPath,
|
|
262
|
+
bytes: stCreds.bytes,
|
|
263
|
+
status: stCreds.exists ? "remove" : "absent",
|
|
264
|
+
});
|
|
265
|
+
} else {
|
|
266
|
+
items.push({
|
|
267
|
+
label: "Credentials",
|
|
268
|
+
path: credentialsPath,
|
|
269
|
+
bytes: stCreds.bytes,
|
|
270
|
+
status: stCreds.exists ? "keep" : "absent",
|
|
271
|
+
detail: stCreds.exists ? "survives" : undefined,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Cache
|
|
277
|
+
if (resetCache) {
|
|
278
|
+
items.push({
|
|
279
|
+
label: "Cache",
|
|
280
|
+
path: dirs.cache,
|
|
281
|
+
bytes: cacheSize.bytes,
|
|
282
|
+
status: cacheSize.exists ? "remove" : "absent",
|
|
283
|
+
});
|
|
284
|
+
} else {
|
|
285
|
+
items.push({
|
|
286
|
+
label: "Cache",
|
|
287
|
+
path: dirs.cache,
|
|
288
|
+
bytes: cacheSize.bytes,
|
|
289
|
+
status: cacheSize.exists ? "keep" : "absent",
|
|
290
|
+
detail: cacheSize.exists ? "survives" : undefined,
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// The launcher is not listed. Reset never touches it, and a row for a path a
|
|
295
|
+
// command cannot act on is one more line between the operator and the four
|
|
296
|
+
// that decide whether to go ahead.
|
|
297
|
+
presenter.listItems("The following will be cleared", items);
|
|
298
|
+
|
|
299
|
+
// One consequence line, not one per scope. `--all` states the whole outcome,
|
|
300
|
+
// so the per-root notes underneath it would only repeat it.
|
|
301
|
+
const notes: string[] = args.all
|
|
302
|
+
? [ROOT_NOTES.all]
|
|
214
303
|
: [
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
//
|
|
223
|
-
//
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
304
|
+
resetState ? ROOT_NOTES.state : null,
|
|
305
|
+
resetData ? ROOT_NOTES.data : null,
|
|
306
|
+
args.config ? ROOT_NOTES.config : null,
|
|
307
|
+
args.auth ? ROOT_NOTES.auth : null,
|
|
308
|
+
].filter((note): note is NonNullable<typeof note> => note !== null);
|
|
309
|
+
for (const note of notes) presenter.note(note);
|
|
310
|
+
|
|
311
|
+
// Only when something actually survives. On `--all` the note above already
|
|
312
|
+
// says nothing does, and on a scoped reset over an empty home every row is
|
|
313
|
+
// absent, which is not the same claim as "it was there and it is going".
|
|
314
|
+
const surviving = items.filter((item) => item.status === "keep").map((item) => item.label);
|
|
315
|
+
if (surviving.length > 0) presenter.note(`Survives: ${surviving.join(", ")}`);
|
|
316
|
+
|
|
317
|
+
if (args.dryRun) {
|
|
318
|
+
presenter.warn("Dry run: no changes made");
|
|
319
|
+
presenter.done("Done");
|
|
320
|
+
return 0;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (!args.force) {
|
|
324
|
+
const confirmed = await presenter.confirm("Are you sure you want to reset the selected state?", false);
|
|
325
|
+
if (!confirmed) {
|
|
326
|
+
presenter.warn("Reset cancelled");
|
|
327
|
+
presenter.done("Cancelled");
|
|
328
|
+
return 0;
|
|
329
|
+
}
|
|
230
330
|
}
|
|
231
331
|
|
|
332
|
+
const toRemove: Array<{ label: string; path: string }> = [];
|
|
333
|
+
if (args.all) {
|
|
334
|
+
toRemove.push(
|
|
335
|
+
{ label: "Config", path: dirs.config },
|
|
336
|
+
{ label: "Data", path: dirs.data },
|
|
337
|
+
{ label: "State", path: dirs.state },
|
|
338
|
+
{ label: "Cache", path: dirs.cache },
|
|
339
|
+
);
|
|
340
|
+
} else {
|
|
341
|
+
if (args.config) toRemove.push({ label: "Settings", path: settingsPath });
|
|
342
|
+
if (args.auth) toRemove.push({ label: "Credentials", path: credentialsPath });
|
|
343
|
+
if (args.data) toRemove.push({ label: "Data", path: dirs.data });
|
|
344
|
+
if (args.state) toRemove.push({ label: "State", path: dirs.state });
|
|
345
|
+
if (args.cache) toRemove.push({ label: "Cache", path: dirs.cache });
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// `removePath` returns null both for a path it deleted and for one that was
|
|
349
|
+
// never there, so presence is asked here. Announcing "Reset Cache" over an
|
|
350
|
+
// absent cache is the one result line an operator cannot check.
|
|
232
351
|
const failures: RemovalFailure[] = [];
|
|
233
|
-
|
|
234
|
-
|
|
352
|
+
let cleared = 0;
|
|
353
|
+
for (const entry of toRemove) {
|
|
354
|
+
const existed = measurePath(entry.path).exists;
|
|
355
|
+
const failure = removePath(entry.label, entry.path, false);
|
|
235
356
|
if (failure) failures.push(failure);
|
|
357
|
+
else if (existed) {
|
|
358
|
+
presenter.completedStep(`Cleared ${entry.label}`);
|
|
359
|
+
cleared += 1;
|
|
360
|
+
}
|
|
236
361
|
}
|
|
362
|
+
if (failures.length === 0 && cleared === 0)
|
|
363
|
+
presenter.completedStep("Nothing to clear; every selected root was already empty");
|
|
237
364
|
|
|
238
365
|
resetXdgCache();
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
// that survived.
|
|
242
|
-
if (!args.dryRun) initializeClioHome();
|
|
366
|
+
initializeClioHome();
|
|
367
|
+
presenter.completedStep("Recreated the empty roots");
|
|
243
368
|
|
|
244
369
|
if (failures.length > 0) {
|
|
245
|
-
|
|
370
|
+
presenter.fail("reset did not clear everything");
|
|
246
371
|
reportRemovalFailures(resetInvocation(args), failures);
|
|
372
|
+
presenter.finish();
|
|
247
373
|
return 1;
|
|
248
374
|
}
|
|
249
375
|
|
|
250
|
-
|
|
251
|
-
printOk(args.all ? "reset --all preview complete" : "reset preview complete");
|
|
252
|
-
} else {
|
|
253
|
-
printOk(args.all ? "reset config, data, state, and cache" : "reset complete");
|
|
254
|
-
}
|
|
376
|
+
presenter.done("Done");
|
|
255
377
|
return 0;
|
|
256
378
|
}
|
package/src/cli/run.ts
CHANGED
|
@@ -29,7 +29,11 @@ import { SafetyDomainModule } from "../domains/safety/index.js";
|
|
|
29
29
|
import { SchedulingDomainModule } from "../domains/scheduling/index.js";
|
|
30
30
|
import { SessionDomainModule } from "../domains/session/index.js";
|
|
31
31
|
import type { ImageContent } from "../engine/types.js";
|
|
32
|
-
import {
|
|
32
|
+
import {
|
|
33
|
+
assistantTextFromEvent,
|
|
34
|
+
receiptGatewayRoutingLabel,
|
|
35
|
+
receiptResponseModelIdObservationLabel,
|
|
36
|
+
} from "../tools/dispatch-event-text.js";
|
|
33
37
|
import { isToolProfileName } from "../tools/profiles.js";
|
|
34
38
|
import { parseRunCliArgs, type RunCliArgs } from "./args.js";
|
|
35
39
|
import { runClioCommand } from "./clio.js";
|
|
@@ -58,7 +62,6 @@ Flags:
|
|
|
58
62
|
--frequency-penalty <N> one-run frequency penalty override
|
|
59
63
|
--repeat-penalty <N> one-run repeat penalty override
|
|
60
64
|
--max-context-tokens <N> one-run context-window override for supported local runtimes
|
|
61
|
-
--kv-cache-mode <mode> one-run KV-cache mode override: f16|f32|none|false|q8_0|q4_0|q4_1|iq4_nl|q5_0|q5_1
|
|
62
65
|
--json stream JSONL events for the main-agent path; dispatch streams events and receipt JSON
|
|
63
66
|
--json-events <mode> main-agent JSON stream mode: full|terminal; implies --json
|
|
64
67
|
--steer-channel <path> read live steering lines from a FIFO or appended regular file
|
|
@@ -209,7 +212,6 @@ export async function runClioRun(
|
|
|
209
212
|
return withRunOverrides(
|
|
210
213
|
{
|
|
211
214
|
...(parsed.maxContextTokens !== undefined ? { maxContextTokens: parsed.maxContextTokens } : {}),
|
|
212
|
-
...(parsed.kvCacheMode !== undefined ? { kvCacheMode: parsed.kvCacheMode } : {}),
|
|
213
215
|
},
|
|
214
216
|
async () => {
|
|
215
217
|
if (parsed.help) {
|
|
@@ -562,7 +564,8 @@ function formatReceipt(r: RunReceipt): string {
|
|
|
562
564
|
typeof r.reasoningTokenCount === "number" && r.reasoningTokenCount > 0 ? ` reasoning=${r.reasoningTokenCount}` : "";
|
|
563
565
|
const failure = r.failureMessage ? ` error=${r.failureMessage}` : "";
|
|
564
566
|
const responseModelIdObservation = receiptResponseModelIdObservationLabel(r);
|
|
565
|
-
|
|
567
|
+
const gatewayRouting = receiptGatewayRoutingLabel(r);
|
|
568
|
+
return `receipt: ${r.runId} agent=${r.agentId} exit=${r.exitCode} target=${r.targetId} requested_model_id=${r.wireModelId}${responseModelIdObservation ? ` ${responseModelIdObservation}` : ""}${gatewayRouting ? ` ${gatewayRouting}` : ""} tokens=${r.tokenCount}${reasoning}${failure} start=${r.startedAt} end=${r.endedAt}`;
|
|
566
569
|
}
|
|
567
570
|
|
|
568
571
|
function mapExitCode(r: RunReceipt): number {
|