@iowarp/clio-coder 0.4.2 → 0.4.3
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 +35 -0
- package/CONTRIBUTING.md +86 -19
- package/README.md +35 -6
- package/dist/{acp-TMDQZDIG.js → acp-H2NGRPWO.js} +11 -11
- package/dist/{agents-5N5NG3XG.js → agents-TL5LLUQP.js} +54 -53
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-Z5CCBXKQ.js → auth-E5SW4HMS.js} +19 -16
- package/dist/{builtins-K6TNDT24.js → builtins-IA7V7FUC.js} +9 -4
- package/dist/{chunk-ZW4HH5JJ.js → chunk-2APPQIER.js} +6 -6
- package/dist/{chunk-72GZI5EV.js → chunk-2JH2WHGE.js} +2 -2
- package/dist/{chunk-UBRFI4HS.js → chunk-2UG5F4C5.js} +127 -47
- package/dist/{chunk-UH632ZYL.js → chunk-2UH2KFUP.js} +2 -2
- package/dist/{chunk-3F7VUY77.js → chunk-2VIKGWFZ.js} +2 -2
- package/dist/{chunk-I66EAJFY.js → chunk-2WZ546HR.js} +267 -232
- package/dist/{chunk-RKSR6VSF.js → chunk-4IUZQIJ3.js} +29 -1
- package/dist/{chunk-2X4RYJTJ.js → chunk-4UVU7BJ5.js} +2 -2
- package/dist/{chunk-M2DAX4F6.js → chunk-4WR7VSYB.js} +2 -2
- package/dist/{chunk-5KW52TEP.js → chunk-54CBCGIR.js} +5 -5
- 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-LJID3DYZ.js → chunk-64I3JVYM.js} +2 -2
- package/dist/{chunk-4JDLP6ZS.js → chunk-6PTFB5VS.js} +7 -7
- package/dist/{chunk-VN3SHNBN.js → chunk-7DICMOS6.js} +2 -2
- package/dist/{chunk-HLAFFSEK.js → chunk-7DRAWPTZ.js} +2 -2
- package/dist/chunk-7E7I3WLS.js +3762 -0
- package/dist/{chunk-YJISEZKC.js → chunk-7ZYNNDKC.js} +6 -6
- package/dist/{chunk-I66ZTYNP.js → chunk-AF4YM7Z4.js} +236 -101
- package/dist/{chunk-2HFQNRV3.js → chunk-AX2THNSA.js} +12 -12
- package/dist/{chunk-PGF63K6I.js → chunk-B4OAX3SI.js} +65 -3
- package/dist/{chunk-W6NIE6OW.js → chunk-B4VEBZKF.js} +3 -3
- package/dist/{chunk-JBCS7CRR.js → chunk-BEPZRGGU.js} +10 -10
- package/dist/{chunk-XGDPUNND.js → chunk-CE5AX47J.js} +2 -2
- package/dist/{chunk-I64IFBLB.js → chunk-DWUOQKRU.js} +17 -10
- package/dist/{chunk-DZAW46HP.js → chunk-E3TPLWFX.js} +3 -3
- package/dist/{chunk-HIICAHCJ.js → chunk-EKCHAPYA.js} +2 -2
- package/dist/{chunk-XE3PCIXH.js → chunk-F5JHEYZM.js} +7 -7
- package/dist/{chunk-5PFYMY2V.js → chunk-FTMGRKEF.js} +2 -2
- package/dist/{chunk-ZNT2M6TG.js → chunk-G76U63X4.js} +17 -17
- package/dist/{chunk-34BHNEE3.js → chunk-GHS5EBTQ.js} +58 -7
- package/dist/{chunk-2NHR3NAY.js → chunk-GI7YYQ3F.js} +40 -34
- package/dist/{chunk-DYHAXKHD.js → chunk-GWZNEVM2.js} +12 -8
- package/dist/chunk-GYV6VZOC.js +26 -0
- package/dist/{chunk-MQXIVJ35.js → chunk-HAXOFFRH.js} +5 -5
- package/dist/{chunk-W4YEMFBX.js → chunk-HEQY7ZFI.js} +2 -2
- package/dist/{chunk-IKOZFYBN.js → chunk-I7ZPNEJM.js} +145 -102
- package/dist/{chunk-WNP7O5WZ.js → chunk-ID64D7PE.js} +4 -4
- package/dist/{chunk-XQRY4DTA.js → chunk-IGLP3ODT.js} +10 -10
- package/dist/chunk-IJNZMHLA.js +101 -0
- package/dist/{chunk-JWJGP5DQ.js → chunk-INY6HTFL.js} +7 -7
- package/dist/{chunk-PBP4B7XR.js → chunk-IUE3Y34X.js} +2 -2
- package/dist/{chunk-B74PXLU7.js → chunk-IWT4SF4R.js} +3 -3
- package/dist/{chunk-B7HM5Z7T.js → chunk-JDAY6FIL.js} +5 -5
- package/dist/{chunk-PJX3WQUQ.js → chunk-JEQ3XTHC.js} +2 -2
- package/dist/{chunk-FSP7CMNU.js → chunk-JGRC33J2.js} +50 -4
- package/dist/{chunk-X7IARSHT.js → chunk-JKKCYP3C.js} +9 -9
- package/dist/{chunk-HJWWJ6IL.js → chunk-JSC3U7TI.js} +16 -4
- package/dist/{chunk-SSEYRH53.js → chunk-KK4JZPBQ.js} +19 -140
- package/dist/{chunk-IHXBNWMM.js → chunk-KXDSS5WJ.js} +7 -3
- package/dist/{chunk-Q4XWMHX6.js → chunk-L47TF46W.js} +2 -2
- package/dist/{chunk-O3YUNJZ2.js → chunk-LDJG7DW3.js} +81 -24
- package/dist/{chunk-CDNVLKUX.js → chunk-LLDJM5XK.js} +13 -7
- package/dist/{chunk-F2I26BDK.js → chunk-MUW2BDDH.js} +4 -4
- package/dist/{chunk-HKMD33FO.js → chunk-MWUZBSAQ.js} +79 -76
- package/dist/{chunk-QQLGQY2A.js → chunk-N2Z7HLVY.js} +20 -20
- package/dist/{chunk-DZEK6CJN.js → chunk-NIQJ66N4.js} +19 -19
- package/dist/{chunk-CWVRRIEI.js → chunk-NZMNUPZZ.js} +2 -2
- package/dist/{chunk-462T4EGZ.js → chunk-O5CVSAG5.js} +2 -2
- package/dist/{chunk-TPEQIQIE.js → chunk-OML5D5V5.js} +8 -8
- package/dist/{chunk-IKSLQ4XV.js → chunk-PAJQJ7BS.js} +558 -216
- package/dist/{chunk-ZW55JB7N.js → chunk-PUVDKJ2Y.js} +2 -2
- package/dist/{chunk-UH347SHR.js → chunk-QWGDJJYJ.js} +11 -11
- package/dist/chunk-R6Q67RJH.js +134 -0
- package/dist/{chunk-CRFOIAX3.js → chunk-RRNP2ANY.js} +6 -6
- package/dist/{chunk-IDNA72AH.js → chunk-RSJ25QSL.js} +2 -2
- package/dist/chunk-SKHCAU7K.js +385 -0
- package/dist/{chunk-RLYRBIYQ.js → chunk-TM6LQDI3.js} +20 -12
- package/dist/chunk-UOIZ7DA4.js +41 -0
- package/dist/{chunk-P75RZCJW.js → chunk-UPZU6GE4.js} +3 -3
- package/dist/{chunk-MCMZMDAC.js → chunk-V2ANDPVT.js} +4 -4
- package/dist/{chunk-AK5XEFVZ.js → chunk-VA5FNYMT.js} +26 -13
- package/dist/{chunk-IMXMHHMQ.js → chunk-VW6DOEDG.js} +332 -57
- package/dist/{chunk-XOXV5GKE.js → chunk-W6RRQCPQ.js} +16 -7
- package/dist/{chunk-CYZW7JHJ.js → chunk-WBKFA554.js} +8 -8
- package/dist/{chunk-BO7Y52RY.js → chunk-WCXUNS7U.js} +7 -7
- package/dist/{chunk-ZGNYYXQ6.js → chunk-WRBAGUNF.js} +3 -3
- package/dist/{chunk-FVDGR2ZL.js → chunk-XIVNBFZS.js} +85 -30
- package/dist/{chunk-BYMNWQ7O.js → chunk-XPWWI35G.js} +299 -58
- package/dist/{chunk-KPXDY6QF.js → chunk-XRZT5WY5.js} +2 -2
- package/dist/{chunk-AZ4WMN4W.js → chunk-Y3CBHOR6.js} +2 -2
- package/dist/{chunk-VXMFAE2W.js → chunk-YPC6ZR5L.js} +19 -6
- package/dist/{chunk-54ODD65L.js → chunk-YQWYVTMC.js} +4 -4
- package/dist/{chunk-M2WXEHER.js → chunk-ZA4VCIGV.js} +2 -2
- package/dist/{chunk-7BHIY2MW.js → chunk-ZDN3Y73Y.js} +6 -6
- package/dist/{chunk-E7GT7O5N.js → chunk-ZWPRK62N.js} +7 -4
- package/dist/cli/index.js +38 -37
- package/dist/{clio-7VB377CC.js → clio-CMMK4KRR.js} +7 -7
- package/dist/{code-nav-YVLCYA7V.js → code-nav-MDZNQS33.js} +7 -7
- package/dist/{components-UBWCQSRW.js → components-UCUQ4QXW.js} +4 -4
- package/dist/{config-4HVOS65E.js → config-SVM5P5YI.js} +76 -74
- package/dist/{configure-PIWO7B24.js → configure-LE3IK2TJ.js} +26 -24
- package/dist/{context-IYEHL3WQ.js → context-2OHRKS42.js} +66 -63
- package/dist/{context-N6ZE3LGJ.js → context-E3VC7RX5.js} +15 -11
- package/dist/{context-KQYIWPWT.js → context-VNCR7KAG.js} +60 -45
- package/dist/{context-clear-G4OGZJDS.js → context-clear-BW4O37TG.js} +61 -59
- package/dist/context-map-COB37XXN.js +505 -0
- package/dist/{context-working-set-BWLF6LJP.js → context-working-set-VDS25HXZ.js} +17 -16
- package/dist/{dispatch-runner-2QQAITS3.js → dispatch-runner-5AHT53RF.js} +85 -74
- package/dist/{doctor-LHBD36VU.js → doctor-WNNVO6FY.js} +37 -37
- package/dist/{eval-C45FYRJ6.js → eval-7G7SGAYO.js} +285 -114
- package/dist/{eval-inventory-6DEJPLBF.js → eval-inventory-Y6QRFOH5.js} +4 -4
- package/dist/{evidence-6SHONYAF.js → evidence-VD6736FQ.js} +63 -62
- package/dist/{evolve-KRKMV72X.js → evolve-AL3NGVRL.js} +62 -61
- package/dist/{extensions-KPZ2UHBB.js → extensions-MOVJ32NM.js} +7 -7
- package/dist/{fleet-IVTCKDHT.js → fleet-QZHUMAGI.js} +110 -108
- package/dist/{fleet-commands-EDWL3IT7.js → fleet-commands-BAYT5FJZ.js} +10 -10
- package/dist/{fleet-decisions-YP3YEFGK.js → fleet-decisions-IREVMRU4.js} +7 -6
- package/dist/{fleet-graph-ZFWKHY2M.js → fleet-graph-YCTT3HTI.js} +19 -18
- package/dist/{fleet-inspect-FVUNCBML.js → fleet-inspect-QVJTDAVB.js} +55 -54
- package/dist/{fleet-preflight-UN5XED4R.js → fleet-preflight-25QAFPK4.js} +4 -4
- package/dist/{fleet-validate-XOWC4HSX.js → fleet-validate-5O57AAJ7.js} +23 -22
- package/dist/{fleet-verify-UN3SODEL.js → fleet-verify-CPH2W2T6.js} +56 -55
- package/dist/{fleet-view-TWHJKCN6.js → fleet-view-SWBR3VGQ.js} +55 -54
- package/dist/{init-T2QORQ3Y.js → init-J477LKZH.js} +78 -76
- package/dist/{interop-IN5I2A66.js → interop-3FCM6XLG.js} +11 -11
- package/dist/{library-LSCATDLZ.js → library-QUQEIUG6.js} +28 -27
- package/dist/{memory-HYOKAGGJ.js → memory-SGGSEP65.js} +64 -63
- package/dist/{models-2GPMFYCM.js → models-HEKUAXXK.js} +49 -43
- package/dist/{monitor-E4ASVUJH.js → monitor-HKU57TYQ.js} +61 -60
- package/dist/{orchestrator-DDMPR3PY.js → orchestrator-VDFAEFAI.js} +919 -546
- package/dist/{panes-E3RUXOW5.js → panes-DN2SSFOH.js} +3 -3
- package/dist/{panes-IXKLOKA2.js → panes-TALGNPZT.js} +8 -8
- package/dist/{paths-L7LGY6RN.js → paths-NBMFAIEZ.js} +5 -5
- package/dist/reset-EAJFFJVB.js +344 -0
- package/dist/{resources-OTRSN34L.js → resources-OVKSEFVE.js} +27 -20
- package/dist/{run-5DEYH5QK.js → run-7DP7ZF2J.js} +113 -109
- package/dist/{share-IHWTLO3M.js → share-WML67FT3.js} +26 -25
- package/dist/{skills-IYMXMKW4.js → skills-SG662R2K.js} +39 -31
- package/dist/{skills-eval-DROHSJAR.js → skills-eval-VVZEUU46.js} +74 -73
- package/dist/{skills-inventory-D7X4L4ZX.js → skills-inventory-I2E23GET.js} +21 -20
- package/dist/{slash-commands-QBM7UZ3B.js → slash-commands-S7MBJDQK.js} +35 -34
- package/dist/{steer-Z5DO23FJ.js → steer-2LQOMCPB.js} +3 -3
- package/dist/{support-U7QOWY26.js → support-CC2UJBJ6.js} +6 -6
- package/dist/{targets-P2FUC4IL.js → targets-4QC3HIEW.js} +48 -45
- package/dist/{terminal-lease-YREJ3JX2.js → terminal-lease-TUHIJ6Y2.js} +2 -2
- package/dist/{tools-5B7RO6MV.js → tools-TFGJICCU.js} +8 -8
- package/dist/{trace-YMGMUM6A.js → trace-FXMXUZUF.js} +7 -7
- package/dist/uninstall-5PEVOE5B.js +408 -0
- package/dist/upgrade-M4WXY6KN.js +303 -0
- package/dist/{usage-ME5MPXGX.js → usage-N7ZNVLEM.js} +147 -102
- package/dist/{verifiers-BVZ7IWOO.js → verifiers-DJTP4XX6.js} +15 -15
- package/dist/{verify-5K7ZKQFC.js → verify-RWE4PPEK.js} +9 -9
- package/dist/{wiki-generate-F5W5QTYY.js → wiki-generate-C7IQOXSP.js} +84 -82
- package/dist/{with-panes-BYOJCLAM.js → with-panes-4GCGSL7J.js} +9 -9
- package/dist/worker/entry.js +61 -60
- package/docs/architecture/artifact-placement.md +1 -0
- package/docs/architecture/artifact-versions.md +1 -1
- package/docs/architecture/context-engine.md +4 -0
- package/docs/architecture/middleware-and-components.md +1 -1
- package/docs/architecture/model-catalog.md +21 -10
- package/docs/architecture/observability.md +12 -1
- package/docs/architecture/prompt-envelope-and-tools.md +2 -0
- package/docs/architecture/provider-adapter-cookbook.md +63 -0
- package/docs/architecture/safety-model.md +15 -5
- package/docs/guide/built-in-agents.md +17 -3
- package/docs/guide/commands-and-modes.md +1 -1
- package/docs/guide/configuration-and-targets.md +97 -9
- package/docs/guide/configuration-reference.md +7 -2
- package/docs/guide/environment-variables.md +2 -0
- 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/process/development-pipeline.md +34 -1
- package/docs/process/eval-runner.md +67 -3
- 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 +40 -5
- 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 +46 -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 +23 -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 +65 -5
- package/skills/workflow/cut-it/evals.md +101 -0
- package/skills/workflow/design-council/SKILL.md +117 -27
- package/skills/workflow/design-council/evals.md +161 -0
- package/skills/workflow/grill-me/SKILL.md +86 -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/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 +1082 -528
- package/src/cli/context-map.ts +114 -0
- package/src/cli/context.ts +4 -0
- package/src/cli/index.ts +1 -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 -2
- package/src/cli/select.ts +664 -0
- package/src/cli/skills.ts +9 -2
- package/src/cli/targets.ts +3 -0
- package/src/cli/uninstall.ts +233 -165
- package/src/cli/upgrade.ts +204 -149
- package/src/cli/usage.ts +86 -27
- package/src/cli/validate-model.ts +3 -3
- 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/safe-exec.ts +17 -2
- package/src/core/skill-activation.ts +89 -2
- 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/wiki/map-seed.ts +589 -0
- package/src/domains/context/wiki/plan.ts +2 -2
- 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/contract.ts +11 -1
- package/src/domains/dispatch/extension.ts +134 -29
- package/src/domains/dispatch/types.ts +3 -0
- 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 +5 -2
- 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/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 +3 -35
- package/src/domains/middleware/memory-intervention.ts +127 -32
- package/src/domains/middleware/memory-step-endpoint.ts +3 -2
- package/src/domains/middleware/skills-reminder.ts +31 -2
- package/src/domains/observability/compaction-usage.ts +118 -0
- package/src/domains/observability/cost.ts +1 -1
- package/src/domains/observability/extension.ts +6 -1
- package/src/domains/observability/out-of-turn-usage.ts +52 -21
- 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 +2 -0
- package/src/domains/providers/model-runtime-capabilities.ts +15 -5
- package/src/domains/providers/models/local-models/clio-coder-local-coding-targets.yaml +32 -12
- package/src/domains/providers/runtimes/antigravity/antigravity-code.ts +225 -45
- 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/autonomy.ts +15 -0
- package/src/domains/safety/index.ts +1 -0
- package/src/domains/safety/path-policy.ts +1 -1
- package/src/domains/safety/policy-engine.ts +34 -11
- package/src/domains/safety/protected-artifacts.ts +191 -88
- package/src/domains/safety/run-effects.ts +2 -22
- package/src/domains/safety/skill-authority.ts +55 -0
- package/src/domains/session/compaction/compact.ts +72 -22
- package/src/domains/session/entries.ts +6 -0
- package/src/domains/session/usage.ts +3 -3
- 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/openai-completions.ts +117 -14
- package/src/engine/external-subprocess.ts +114 -6
- package/src/entry/background-model-metadata.ts +18 -0
- package/src/entry/compaction-prompt.ts +57 -0
- package/src/entry/orchestrator.ts +405 -216
- 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/interactive-slash-runtime.ts +2 -1
- package/src/interactive/renderers/worker-entry.ts +32 -0
- package/src/interactive/slash-commands.ts +24 -6
- 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/worker-receipts.ts +1 -0
- package/src/interactive/worker-stream.ts +6 -1
- package/src/tools/context/index.ts +30 -9
- package/src/tools/dispatch-arguments.ts +1 -0
- package/src/tools/dispatch-event-text.ts +10 -0
- package/src/tools/dispatch-plan.ts +1 -0
- package/src/tools/dispatch-runner.ts +12 -0
- package/src/tools/registry.ts +11 -5
- 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/reset-OAQP3W4O.js +0 -230
- package/dist/uninstall-N34PCTGJ.js +0 -331
- package/dist/upgrade-PXK3S2YM.js +0 -325
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
detectInstallMethod
|
|
4
|
+
} from "./chunk-UOIZ7DA4.js";
|
|
5
|
+
import {
|
|
6
|
+
listMigrations,
|
|
7
|
+
readMigrationManifest,
|
|
8
|
+
runPending
|
|
9
|
+
} from "./chunk-GWZNEVM2.js";
|
|
10
|
+
import "./chunk-5ICU3EUH.js";
|
|
11
|
+
import {
|
|
12
|
+
readStateInfo
|
|
13
|
+
} from "./chunk-IGLP3ODT.js";
|
|
14
|
+
import "./chunk-3M6DQK6S.js";
|
|
15
|
+
import "./chunk-LCGCVYZ4.js";
|
|
16
|
+
import "./chunk-NDDGJUXD.js";
|
|
17
|
+
import "./chunk-5MEZN6CB.js";
|
|
18
|
+
import {
|
|
19
|
+
createLifecyclePresenter,
|
|
20
|
+
shortenPath
|
|
21
|
+
} from "./chunk-SKHCAU7K.js";
|
|
22
|
+
import "./chunk-2IR2NMPA.js";
|
|
23
|
+
import {
|
|
24
|
+
initializeClioHome
|
|
25
|
+
} from "./chunk-I7XBWTYH.js";
|
|
26
|
+
import "./chunk-PUVDKJ2Y.js";
|
|
27
|
+
import {
|
|
28
|
+
printError
|
|
29
|
+
} from "./chunk-VPKWYKEY.js";
|
|
30
|
+
import "./chunk-5TSRNF4G.js";
|
|
31
|
+
import "./chunk-QSNYB6ZV.js";
|
|
32
|
+
import "./chunk-QDC3K2U3.js";
|
|
33
|
+
import "./chunk-KXDSS5WJ.js";
|
|
34
|
+
import "./chunk-GHS5EBTQ.js";
|
|
35
|
+
import "./chunk-D7E7WCDF.js";
|
|
36
|
+
import {
|
|
37
|
+
getVersionInfo
|
|
38
|
+
} from "./chunk-XPLRXC72.js";
|
|
39
|
+
import "./chunk-IWHMRKLL.js";
|
|
40
|
+
import "./chunk-UXCU4E3T.js";
|
|
41
|
+
import "./chunk-LL4KHSZI.js";
|
|
42
|
+
import "./chunk-S66XZJOF.js";
|
|
43
|
+
import "./chunk-EBY63B7G.js";
|
|
44
|
+
import "./chunk-ID64D7PE.js";
|
|
45
|
+
import "./chunk-336NSSKI.js";
|
|
46
|
+
import "./chunk-IKCO5N3L.js";
|
|
47
|
+
import "./chunk-3I7MS7N2.js";
|
|
48
|
+
import "./chunk-APJ265NV.js";
|
|
49
|
+
import "./chunk-WEPFGWHJ.js";
|
|
50
|
+
import "./chunk-YXLYO42X.js";
|
|
51
|
+
import {
|
|
52
|
+
clioStateDir
|
|
53
|
+
} from "./chunk-BYP5D4HI.js";
|
|
54
|
+
import {
|
|
55
|
+
init_esm_shims
|
|
56
|
+
} from "./chunk-3R73A4XB.js";
|
|
57
|
+
|
|
58
|
+
// src/cli/upgrade.ts
|
|
59
|
+
init_esm_shims();
|
|
60
|
+
import { spawn } from "node:child_process";
|
|
61
|
+
var CHANNELS = ["latest", "beta", "dev"];
|
|
62
|
+
var HELP = `clio-coder upgrade [--dry-run] [--channel=<latest|beta|dev>] [--skip-migrations] [--json]
|
|
63
|
+
|
|
64
|
+
Upgrade Clio Coder and apply pending state migrations. An npm-installed
|
|
65
|
+
binary is reinstalled via npm; a source-checkout install instead prints
|
|
66
|
+
the git-based update steps and never touches the global npm prefix.
|
|
67
|
+
|
|
68
|
+
Flags:
|
|
69
|
+
--dry-run print planned actions without changing anything
|
|
70
|
+
--channel=<chan> npm dist-tag to install (latest|beta|dev). npm installs only.
|
|
71
|
+
--skip-migrations skip migrations after the install step
|
|
72
|
+
--json emit machine-readable JSON output
|
|
73
|
+
--help, -h show this message
|
|
74
|
+
`;
|
|
75
|
+
var SOURCE_UPGRADE_STEPS = ["git pull", "npm run install:local", "hash -r"];
|
|
76
|
+
var SOURCE_UPGRADE_LEAD = "To update the checkout itself, run:";
|
|
77
|
+
function parseUpgradeArgs(argv) {
|
|
78
|
+
let dryRun = false;
|
|
79
|
+
let channel = "latest";
|
|
80
|
+
let skipMigrations = false;
|
|
81
|
+
let help = false;
|
|
82
|
+
let postInstall = false;
|
|
83
|
+
let json = false;
|
|
84
|
+
const toChannel = (value) => {
|
|
85
|
+
if (value === void 0 || !CHANNELS.includes(value)) {
|
|
86
|
+
throw new Error(`--channel must be one of ${CHANNELS.join("|")}, got '${value ?? ""}'`);
|
|
87
|
+
}
|
|
88
|
+
return value;
|
|
89
|
+
};
|
|
90
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
91
|
+
const arg = argv[i];
|
|
92
|
+
if (arg === void 0 || arg === "upgrade") continue;
|
|
93
|
+
if (arg === "--help" || arg === "-h") help = true;
|
|
94
|
+
else if (arg === "--dry-run") dryRun = true;
|
|
95
|
+
else if (arg === "--skip-migrations") skipMigrations = true;
|
|
96
|
+
else if (arg === "--post-install") postInstall = true;
|
|
97
|
+
else if (arg === "--json") json = true;
|
|
98
|
+
else if (arg.startsWith("--channel=")) channel = toChannel(arg.slice("--channel=".length));
|
|
99
|
+
else if (arg === "--channel") {
|
|
100
|
+
channel = toChannel(argv[i + 1]);
|
|
101
|
+
i += 1;
|
|
102
|
+
} else throw new Error(`unknown upgrade argument: ${arg}`);
|
|
103
|
+
}
|
|
104
|
+
return { dryRun, channel, skipMigrations, help, postInstall, json };
|
|
105
|
+
}
|
|
106
|
+
async function lookUpAvailableVersion(channel, method, noNetwork) {
|
|
107
|
+
const seam = process.env.CLIO_CODER_TEST_UPGRADE_AVAILABLE;
|
|
108
|
+
if (seam) return { asked: true, version: seam === "unreachable" ? null : seam };
|
|
109
|
+
if (noNetwork) return { asked: false, reason: "network checks are disabled" };
|
|
110
|
+
if (method === "source") return { asked: false, reason: "source checkout" };
|
|
111
|
+
try {
|
|
112
|
+
const res = await fetch(`https://registry.npmjs.org/@iowarp/clio-coder/${channel}`, {
|
|
113
|
+
headers: { Accept: "application/json" },
|
|
114
|
+
signal: AbortSignal.timeout(2500)
|
|
115
|
+
});
|
|
116
|
+
if (!res.ok) return { asked: true, version: null };
|
|
117
|
+
const data = await res.json();
|
|
118
|
+
return { asked: true, version: typeof data.version === "string" ? data.version : null };
|
|
119
|
+
} catch {
|
|
120
|
+
return { asked: true, version: null };
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
async function runChild(command, args, label) {
|
|
124
|
+
await new Promise((resolve, reject) => {
|
|
125
|
+
const child = spawn(command, [...args], { stdio: ["ignore", "pipe", "pipe"] });
|
|
126
|
+
let tail = "";
|
|
127
|
+
const keepTail = (chunk) => {
|
|
128
|
+
tail = `${tail}${chunk.toString("utf8")}`.slice(-2e3);
|
|
129
|
+
};
|
|
130
|
+
child.stdout?.on("data", keepTail);
|
|
131
|
+
child.stderr?.on("data", keepTail);
|
|
132
|
+
child.on("error", reject);
|
|
133
|
+
child.on("close", (code) => {
|
|
134
|
+
if (code === 0) {
|
|
135
|
+
resolve();
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const lastLine = tail.trimEnd().split("\n").at(-1) ?? "";
|
|
139
|
+
reject(new Error(`${label} exited with code ${code ?? -1}${lastLine ? `: ${lastLine}` : ""}`));
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
async function runNpmInstall(channel) {
|
|
144
|
+
if (process.env.CLIO_CODER_TEST_UPGRADE_FAIL === "npm") {
|
|
145
|
+
throw new Error("npm ERR! 404 Not Found (mock failure)");
|
|
146
|
+
}
|
|
147
|
+
await runChild("npm", ["install", "-g", `@iowarp/clio-coder@${channel}`], "npm install");
|
|
148
|
+
}
|
|
149
|
+
async function runDoctorFixAfterInstall() {
|
|
150
|
+
if (process.env.CLIO_CODER_TEST_UPGRADE_FAIL === "doctor") {
|
|
151
|
+
throw new Error("mock doctor fix failure");
|
|
152
|
+
}
|
|
153
|
+
await runChild("clio-coder", ["doctor", "--fix"], "clio-coder doctor --fix");
|
|
154
|
+
}
|
|
155
|
+
async function runPostInstallUpgrade(opts) {
|
|
156
|
+
const args = ["upgrade", "--post-install", `--channel=${opts.channel}`];
|
|
157
|
+
if (opts.skipMigrations) args.push("--skip-migrations");
|
|
158
|
+
await runChild("clio-coder", args, "clio-coder upgrade --post-install");
|
|
159
|
+
}
|
|
160
|
+
async function runUpgradeCommand(argv) {
|
|
161
|
+
let opts;
|
|
162
|
+
try {
|
|
163
|
+
opts = parseUpgradeArgs(argv);
|
|
164
|
+
} catch (err) {
|
|
165
|
+
printError(err instanceof Error ? err.message : String(err));
|
|
166
|
+
return 2;
|
|
167
|
+
}
|
|
168
|
+
if (opts.help) {
|
|
169
|
+
process.stdout.write(HELP);
|
|
170
|
+
return 0;
|
|
171
|
+
}
|
|
172
|
+
const presenter = createLifecyclePresenter({ json: opts.json });
|
|
173
|
+
presenter.header("Upgrade", "upgrade");
|
|
174
|
+
const before = getVersionInfo().clio;
|
|
175
|
+
const stateDir = clioStateDir();
|
|
176
|
+
const method = detectInstallMethod();
|
|
177
|
+
const methodLabel = method === "source" ? "source checkout" : "npm global";
|
|
178
|
+
presenter.setMethod(methodLabel);
|
|
179
|
+
const noNetwork = Boolean(process.env.CLIO_CODER_TEST_UPGRADE_NO_NETWORK);
|
|
180
|
+
const lookup = await lookUpAvailableVersion(opts.channel, method, noNetwork);
|
|
181
|
+
const availableVersion = lookup.asked ? lookup.version : null;
|
|
182
|
+
presenter.step(`Installation method: ${methodLabel}`);
|
|
183
|
+
presenter.step(`Current version: ${before}`);
|
|
184
|
+
if (availableVersion !== null) presenter.step(`Available version: ${availableVersion}`);
|
|
185
|
+
else if (!lookup.asked) presenter.step(`Available version: not checked (${lookup.reason})`);
|
|
186
|
+
else presenter.step("Available version: unknown (the registry could not be reached)");
|
|
187
|
+
if (method === "npm") presenter.step(`Channel: ${opts.channel}`);
|
|
188
|
+
presenter.step(`State dir: ${shortenPath(stateDir)}`);
|
|
189
|
+
const migrations = listMigrations();
|
|
190
|
+
const migrationIds = migrations.map((m) => m.id);
|
|
191
|
+
const appliedIds = new Set(readMigrationManifest(stateDir).applied);
|
|
192
|
+
const pendingMigrationIds = opts.skipMigrations ? [] : migrationIds.filter((id) => !appliedIds.has(id));
|
|
193
|
+
const recorded = readStateInfo()?.version ?? null;
|
|
194
|
+
const describeRefresh = () => recorded === null ? "state metadata (none recorded)" : recorded === before ? `state metadata (already ${before})` : `state metadata ${recorded} -> ${before}`;
|
|
195
|
+
const versionIsCurrent = (lookup.asked ? lookup.version === before : true) && (recorded === null || recorded === before);
|
|
196
|
+
const hasPendingMigrations = pendingMigrationIds.length > 0;
|
|
197
|
+
if (versionIsCurrent && !hasPendingMigrations) {
|
|
198
|
+
presenter.warn(`Already on ${before}, with no pending migrations. Nothing to do.`);
|
|
199
|
+
if (method === "source") presenter.commandAdvice(SOURCE_UPGRADE_LEAD, SOURCE_UPGRADE_STEPS.join("\n"));
|
|
200
|
+
if (opts.dryRun) presenter.warn("Dry run: no changes made");
|
|
201
|
+
presenter.done("Done");
|
|
202
|
+
return 0;
|
|
203
|
+
}
|
|
204
|
+
if (opts.dryRun) {
|
|
205
|
+
if (method === "source") presenter.commandAdvice(SOURCE_UPGRADE_LEAD, SOURCE_UPGRADE_STEPS.join("\n"));
|
|
206
|
+
else presenter.note(`Would run: npm install -g @iowarp/clio-coder@${opts.channel}`);
|
|
207
|
+
if (opts.skipMigrations) presenter.note("Would skip migrations (--skip-migrations).");
|
|
208
|
+
else if (pendingMigrationIds.length === 0) presenter.note("No pending migrations.");
|
|
209
|
+
else {
|
|
210
|
+
presenter.note(
|
|
211
|
+
`Would apply ${pendingMigrationIds.length} pending migration${pendingMigrationIds.length === 1 ? "" : "s"}:`
|
|
212
|
+
);
|
|
213
|
+
for (const id of pendingMigrationIds) presenter.substep(id, "\u2013");
|
|
214
|
+
}
|
|
215
|
+
presenter.note(`Would refresh ${describeRefresh()}.`);
|
|
216
|
+
presenter.warn("Dry run: no changes made");
|
|
217
|
+
presenter.done("Done");
|
|
218
|
+
return 0;
|
|
219
|
+
}
|
|
220
|
+
if (opts.postInstall) {
|
|
221
|
+
presenter.note("Running post-install checks with the active clio-coder binary.");
|
|
222
|
+
} else if (method === "source") {
|
|
223
|
+
presenter.note("Source checkout: no npm install to run.");
|
|
224
|
+
} else if (noNetwork) {
|
|
225
|
+
presenter.note("CLIO_CODER_TEST_UPGRADE_NO_NETWORK is set; skipping npm install.");
|
|
226
|
+
} else {
|
|
227
|
+
try {
|
|
228
|
+
await runNpmInstall(opts.channel);
|
|
229
|
+
presenter.completedStep(`Installed @iowarp/clio-coder@${opts.channel}`);
|
|
230
|
+
} catch (err) {
|
|
231
|
+
presenter.fail("npm install failed", err instanceof Error ? err.message : String(err));
|
|
232
|
+
presenter.commandAdvice(
|
|
233
|
+
"To upgrade by hand, run:",
|
|
234
|
+
`npm install -g @iowarp/clio-coder@${opts.channel}
|
|
235
|
+
clio-coder doctor --fix`
|
|
236
|
+
);
|
|
237
|
+
presenter.finish();
|
|
238
|
+
return 1;
|
|
239
|
+
}
|
|
240
|
+
try {
|
|
241
|
+
await runPostInstallUpgrade(opts);
|
|
242
|
+
presenter.done("Done");
|
|
243
|
+
return 0;
|
|
244
|
+
} catch (err) {
|
|
245
|
+
presenter.fail("post-install checks failed", err instanceof Error ? err.message : String(err));
|
|
246
|
+
presenter.commandAdvice("To finish the upgrade by hand, run:", "clio-coder doctor --fix");
|
|
247
|
+
presenter.finish();
|
|
248
|
+
return 1;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
let appliedCount = 0;
|
|
252
|
+
if (opts.skipMigrations) {
|
|
253
|
+
presenter.note("Skipping migrations (--skip-migrations).");
|
|
254
|
+
} else {
|
|
255
|
+
let result;
|
|
256
|
+
try {
|
|
257
|
+
if (process.env.CLIO_CODER_TEST_UPGRADE_FAIL === "migration") {
|
|
258
|
+
throw new Error("mock migration failure in 2026-09-01-settings-v2");
|
|
259
|
+
}
|
|
260
|
+
result = await runPending(stateDir);
|
|
261
|
+
} catch (err) {
|
|
262
|
+
presenter.fail("migration failed", err instanceof Error ? err.message : String(err));
|
|
263
|
+
presenter.commandAdvice(
|
|
264
|
+
"The rest of the upgrade does not depend on it. To continue, run:",
|
|
265
|
+
"clio-coder upgrade --skip-migrations"
|
|
266
|
+
);
|
|
267
|
+
presenter.finish();
|
|
268
|
+
return 1;
|
|
269
|
+
}
|
|
270
|
+
const applied = [...result.applied];
|
|
271
|
+
appliedCount = applied.length;
|
|
272
|
+
if (appliedCount === 0) presenter.note("No pending migrations.");
|
|
273
|
+
else for (const id of applied) presenter.completedStep(`Applied migration ${id}`);
|
|
274
|
+
}
|
|
275
|
+
if (method === "source" || noNetwork) {
|
|
276
|
+
const refresh = describeRefresh();
|
|
277
|
+
initializeClioHome();
|
|
278
|
+
presenter.completedStep(`Refreshed ${refresh}`);
|
|
279
|
+
} else {
|
|
280
|
+
try {
|
|
281
|
+
await runDoctorFixAfterInstall();
|
|
282
|
+
presenter.completedStep("Checked the install with clio-coder doctor --fix");
|
|
283
|
+
} catch (err) {
|
|
284
|
+
presenter.fail("doctor fix failed", err instanceof Error ? err.message : String(err));
|
|
285
|
+
presenter.commandAdvice("To resolve the findings by hand, run:", "clio-coder doctor --fix");
|
|
286
|
+
presenter.finish();
|
|
287
|
+
return 1;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
if (method === "source") presenter.commandAdvice(SOURCE_UPGRADE_LEAD, SOURCE_UPGRADE_STEPS.join("\n"));
|
|
291
|
+
const after = getVersionInfo().clio;
|
|
292
|
+
if (appliedCount > 0 || (recorded ?? before) !== after) {
|
|
293
|
+
presenter.note(
|
|
294
|
+
`Now on ${after}${appliedCount > 0 ? `, ${appliedCount} migration${appliedCount === 1 ? "" : "s"} applied` : ""}.`
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
presenter.done("Done");
|
|
298
|
+
return 0;
|
|
299
|
+
}
|
|
300
|
+
export {
|
|
301
|
+
runUpgradeCommand
|
|
302
|
+
};
|
|
303
|
+
//# sourceMappingURL=upgrade-M4WXY6KN.js.map
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
summarizeFailedCompactionUsage
|
|
4
|
+
} from "./chunk-IJNZMHLA.js";
|
|
2
5
|
import {
|
|
3
6
|
readEvidenceIndex,
|
|
4
7
|
readOutOfTurnUsageRows
|
|
5
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VA5FNYMT.js";
|
|
6
9
|
import {
|
|
7
10
|
loadMemoryRecordsSync
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-BEPZRGGU.js";
|
|
12
|
+
import "./chunk-G76U63X4.js";
|
|
13
|
+
import "./chunk-UPZU6GE4.js";
|
|
14
|
+
import "./chunk-RRNP2ANY.js";
|
|
15
|
+
import "./chunk-DR52UMZW.js";
|
|
16
|
+
import "./chunk-AF4YM7Z4.js";
|
|
17
|
+
import "./chunk-B4VEBZKF.js";
|
|
18
|
+
import "./chunk-E3TPLWFX.js";
|
|
19
|
+
import "./chunk-WRBAGUNF.js";
|
|
20
|
+
import "./chunk-IWT4SF4R.js";
|
|
12
21
|
import {
|
|
13
22
|
addResponseModelIdObservationCount,
|
|
14
23
|
emptyResponseModelIdObservationCounts,
|
|
@@ -17,109 +26,104 @@ import {
|
|
|
17
26
|
parseSessionEntries,
|
|
18
27
|
readAuditRows,
|
|
19
28
|
responseModelIdObservationCountsLabel
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-DZAW46HP.js";
|
|
29
|
+
} from "./chunk-JKKCYP3C.js";
|
|
30
|
+
import "./chunk-FTMGRKEF.js";
|
|
31
|
+
import "./chunk-XRZT5WY5.js";
|
|
24
32
|
import "./chunk-RVG5JXAL.js";
|
|
25
|
-
import {
|
|
26
|
-
foldPromptCacheTelemetry,
|
|
27
|
-
hasPromptCacheTelemetry
|
|
28
|
-
} from "./chunk-3DPEIQKN.js";
|
|
29
|
-
import "./chunk-5PFYMY2V.js";
|
|
30
33
|
import "./chunk-VIA6RFQZ.js";
|
|
31
34
|
import "./chunk-T56WDKA5.js";
|
|
32
35
|
import "./chunk-W6GROXXM.js";
|
|
33
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-2VIKGWFZ.js";
|
|
37
|
+
import "./chunk-RKKLTLYB.js";
|
|
38
|
+
import "./chunk-6PTFB5VS.js";
|
|
34
39
|
import "./chunk-TXOTCRLG.js";
|
|
35
|
-
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
40
|
import {
|
|
41
41
|
loadSkills
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-LDJG7DW3.js";
|
|
43
43
|
import "./chunk-NDDGJUXD.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import
|
|
54
|
-
|
|
44
|
+
import "./chunk-CE5AX47J.js";
|
|
45
|
+
import {
|
|
46
|
+
foldPromptCacheTelemetry,
|
|
47
|
+
hasPromptCacheTelemetry
|
|
48
|
+
} from "./chunk-3DPEIQKN.js";
|
|
49
|
+
import "./chunk-7DRAWPTZ.js";
|
|
50
|
+
import "./chunk-5MEZN6CB.js";
|
|
51
|
+
import "./chunk-PUVDKJ2Y.js";
|
|
52
|
+
import "./chunk-HVDIIIQW.js";
|
|
53
|
+
import {
|
|
54
|
+
formatColumns,
|
|
55
|
+
printError
|
|
56
|
+
} from "./chunk-VPKWYKEY.js";
|
|
57
|
+
import "./chunk-5TSRNF4G.js";
|
|
58
|
+
import "./chunk-2WZ546HR.js";
|
|
59
|
+
import "./chunk-PAJQJ7BS.js";
|
|
60
|
+
import "./chunk-EKCHAPYA.js";
|
|
61
|
+
import "./chunk-L47TF46W.js";
|
|
62
|
+
import "./chunk-RSJ25QSL.js";
|
|
63
|
+
import "./chunk-XIVNBFZS.js";
|
|
55
64
|
import "./chunk-NEDJ26B5.js";
|
|
56
65
|
import "./chunk-42FMPA75.js";
|
|
57
66
|
import "./chunk-H7IXIC72.js";
|
|
58
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-7DICMOS6.js";
|
|
59
68
|
import "./chunk-OQE5J4C6.js";
|
|
60
|
-
import "./chunk-FSP7CMNU.js";
|
|
61
|
-
import "./chunk-B7HM5Z7T.js";
|
|
62
|
-
import "./chunk-OZNBF4L3.js";
|
|
63
|
-
import "./chunk-4BJ5BYCE.js";
|
|
64
|
-
import "./chunk-6XLNIQDB.js";
|
|
65
|
-
import "./chunk-NMJXSHBJ.js";
|
|
66
|
-
import "./chunk-VAVR4IJY.js";
|
|
67
|
-
import "./chunk-2LEAKD4C.js";
|
|
68
69
|
import "./chunk-HHV2GANA.js";
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-
|
|
70
|
+
import "./chunk-B4OAX3SI.js";
|
|
71
|
+
import "./chunk-I7ZPNEJM.js";
|
|
72
|
+
import "./chunk-GYV6VZOC.js";
|
|
71
73
|
import "./chunk-UL3WSD3F.js";
|
|
74
|
+
import "./chunk-JDAY6FIL.js";
|
|
75
|
+
import "./chunk-OZNBF4L3.js";
|
|
72
76
|
import "./chunk-ECH6PKUQ.js";
|
|
77
|
+
import "./chunk-6XLNIQDB.js";
|
|
73
78
|
import "./chunk-5B2AEOW5.js";
|
|
79
|
+
import "./chunk-VAVR4IJY.js";
|
|
80
|
+
import "./chunk-JGRC33J2.js";
|
|
81
|
+
import "./chunk-4BJ5BYCE.js";
|
|
74
82
|
import "./chunk-K6BSR66V.js";
|
|
75
|
-
import "./chunk-
|
|
76
|
-
import "./chunk-33YXPOE3.js";
|
|
77
|
-
import "./chunk-7CR24IG7.js";
|
|
78
|
-
import "./chunk-XPLRXC72.js";
|
|
79
|
-
import "./chunk-ZW55JB7N.js";
|
|
80
|
-
import {
|
|
81
|
-
formatColumns,
|
|
82
|
-
printError
|
|
83
|
-
} from "./chunk-VPKWYKEY.js";
|
|
84
|
-
import "./chunk-5TSRNF4G.js";
|
|
85
|
-
import "./chunk-BYMNWQ7O.js";
|
|
83
|
+
import "./chunk-XPWWI35G.js";
|
|
86
84
|
import "./chunk-CFGTUFWB.js";
|
|
87
|
-
import "./chunk-
|
|
88
|
-
import "./chunk-
|
|
85
|
+
import "./chunk-NZMNUPZZ.js";
|
|
86
|
+
import "./chunk-2JH2WHGE.js";
|
|
89
87
|
import {
|
|
90
88
|
cwdHash
|
|
91
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-HAXOFFRH.js";
|
|
92
90
|
import "./chunk-R346GLFC.js";
|
|
93
|
-
import "./chunk-
|
|
94
|
-
import "./chunk-
|
|
95
|
-
import "./chunk-IHXBNWMM.js";
|
|
96
|
-
import "./chunk-34BHNEE3.js";
|
|
91
|
+
import "./chunk-KXDSS5WJ.js";
|
|
92
|
+
import "./chunk-GHS5EBTQ.js";
|
|
97
93
|
import "./chunk-D7E7WCDF.js";
|
|
98
|
-
import "./chunk-
|
|
94
|
+
import "./chunk-BTK3SSSK.js";
|
|
95
|
+
import "./chunk-NMJXSHBJ.js";
|
|
96
|
+
import "./chunk-PMZVFWSR.js";
|
|
99
97
|
import "./chunk-F4EKGO4N.js";
|
|
100
|
-
import "./chunk-
|
|
101
|
-
import "./chunk-
|
|
102
|
-
import "./chunk-
|
|
98
|
+
import "./chunk-XAKHZX5N.js";
|
|
99
|
+
import "./chunk-33YXPOE3.js";
|
|
100
|
+
import "./chunk-7CR24IG7.js";
|
|
101
|
+
import "./chunk-XPLRXC72.js";
|
|
103
102
|
import "./chunk-IWHMRKLL.js";
|
|
104
|
-
import "./chunk-
|
|
103
|
+
import "./chunk-VW6DOEDG.js";
|
|
105
104
|
import "./chunk-UXCU4E3T.js";
|
|
106
105
|
import "./chunk-LL4KHSZI.js";
|
|
106
|
+
import "./chunk-JSC3U7TI.js";
|
|
107
107
|
import "./chunk-S66XZJOF.js";
|
|
108
|
-
import "./chunk-
|
|
109
|
-
import "./chunk-
|
|
108
|
+
import "./chunk-JIEGK6UF.js";
|
|
109
|
+
import "./chunk-EBY63B7G.js";
|
|
110
|
+
import "./chunk-6EJMN2Y3.js";
|
|
111
|
+
import "./chunk-LLDJM5XK.js";
|
|
112
|
+
import "./chunk-ID64D7PE.js";
|
|
110
113
|
import "./chunk-336NSSKI.js";
|
|
111
114
|
import "./chunk-IKCO5N3L.js";
|
|
112
115
|
import "./chunk-3I7MS7N2.js";
|
|
113
116
|
import "./chunk-APJ265NV.js";
|
|
117
|
+
import "./chunk-WEPFGWHJ.js";
|
|
118
|
+
import "./chunk-NUGM5KR6.js";
|
|
119
|
+
import "./chunk-5OIVVPHF.js";
|
|
120
|
+
import "./chunk-YPC6ZR5L.js";
|
|
121
|
+
import "./chunk-YXLYO42X.js";
|
|
122
|
+
import "./chunk-2LEAKD4C.js";
|
|
114
123
|
import {
|
|
115
124
|
clioDataDir,
|
|
116
125
|
clioStateDir
|
|
117
126
|
} 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
127
|
import {
|
|
124
128
|
init_esm_shims
|
|
125
129
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -169,19 +173,20 @@ function addResponseModelIdObservation(counts, call) {
|
|
|
169
173
|
addResponseModelIdObservationCount(counts, call.responseModelIdObservation, call.apiCalls ?? 1);
|
|
170
174
|
}
|
|
171
175
|
function emptyCallOrigins() {
|
|
172
|
-
return { rows: 0, sideQuestions: 0, handoffs: 0, prewarms: 0, backgroundMemory: 0 };
|
|
176
|
+
return { rows: 0, sideQuestions: 0, handoffs: 0, prewarms: 0, backgroundMemory: 0, failedCompaction: 0 };
|
|
173
177
|
}
|
|
174
178
|
function turnsOf(origins) {
|
|
175
|
-
return origins.rows - origins.sideQuestions - origins.handoffs - origins.prewarms - origins.backgroundMemory;
|
|
179
|
+
return origins.rows - origins.sideQuestions - origins.handoffs - origins.prewarms - origins.backgroundMemory - origins.failedCompaction;
|
|
176
180
|
}
|
|
177
181
|
function hasLabelledCall(origins) {
|
|
178
|
-
return origins.sideQuestions > 0 || origins.handoffs > 0 || origins.prewarms > 0 || origins.backgroundMemory > 0;
|
|
182
|
+
return origins.sideQuestions > 0 || origins.handoffs > 0 || origins.prewarms > 0 || origins.backgroundMemory > 0 || origins.failedCompaction > 0;
|
|
179
183
|
}
|
|
180
184
|
function addOutOfTurnRow(origins, row) {
|
|
181
185
|
origins.rows += 1;
|
|
182
186
|
if (row.label === "side-question") origins.sideQuestions += 1;
|
|
183
187
|
else if (row.label === "prewarm") origins.prewarms += 1;
|
|
184
188
|
else if (row.label === "background-memory") origins.backgroundMemory += 1;
|
|
189
|
+
else if (row.label === "failed-compaction") origins.failedCompaction += 1;
|
|
185
190
|
else origins.handoffs += 1;
|
|
186
191
|
}
|
|
187
192
|
function outOfTurnUsageCall(row) {
|
|
@@ -190,15 +195,28 @@ function outOfTurnUsageCall(row) {
|
|
|
190
195
|
attributedModelId: row.attributedModelId,
|
|
191
196
|
requestedModelId: row.attributedModelId,
|
|
192
197
|
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
|
|
198
|
+
input: row.usage.input ?? 0,
|
|
199
|
+
output: row.usage.output ?? 0,
|
|
200
|
+
cacheRead: row.usage.cacheRead ?? 0,
|
|
201
|
+
cacheWrite: row.usage.cacheWrite ?? 0,
|
|
202
|
+
reasoningTokens: row.usage.reasoning ?? 0,
|
|
203
|
+
totalTokens: row.usage.totalTokens ?? 0,
|
|
204
|
+
costUsd: row.usage.costUsd ?? 0
|
|
200
205
|
};
|
|
201
206
|
}
|
|
207
|
+
function reportedUsageTotals(totals, rows) {
|
|
208
|
+
const failedCompaction = summarizeFailedCompactionUsage(rows);
|
|
209
|
+
if (failedCompaction.calls === 0) return totals;
|
|
210
|
+
const reported = { ...totals, knownSubtotals: true, failedCompaction };
|
|
211
|
+
for (const [field, missing] of Object.entries(failedCompaction.unobservedUsageCalls)) {
|
|
212
|
+
const key = field === "reasoning" ? "reasoningTokens" : field;
|
|
213
|
+
if (missing > 0 && reported[key] === 0) reported[key] = null;
|
|
214
|
+
}
|
|
215
|
+
return reported;
|
|
216
|
+
}
|
|
217
|
+
function usageAmount(value) {
|
|
218
|
+
return typeof value === "number" ? String(value) : "unknown";
|
|
219
|
+
}
|
|
202
220
|
function addUsageCall(totals, call) {
|
|
203
221
|
totals.apiCalls += call.apiCalls ?? 1;
|
|
204
222
|
totals.input += call.input;
|
|
@@ -415,6 +433,8 @@ async function runUsageCommand(argv) {
|
|
|
415
433
|
addOutOfTurnRow(callOrigins, row);
|
|
416
434
|
}
|
|
417
435
|
const usageMeasurable = presence.sessionsPresent || outOfTurnRows.length > 0;
|
|
436
|
+
const reportedTotals = reportedUsageTotals(usageTotals, outOfTurnRows);
|
|
437
|
+
const failedCompaction = summarizeFailedCompactionUsage(outOfTurnRows);
|
|
418
438
|
const usageRows = [...usageByModel.values()].sort(
|
|
419
439
|
(a, b) => b.totals.totalTokens - a.totals.totalTokens || a.providerId.localeCompare(b.providerId)
|
|
420
440
|
);
|
|
@@ -489,13 +509,14 @@ async function runUsageCommand(argv) {
|
|
|
489
509
|
emit({
|
|
490
510
|
kind: "fact",
|
|
491
511
|
fact: "tokens",
|
|
492
|
-
...
|
|
512
|
+
...reportedTotals,
|
|
493
513
|
...hasLabelledCall(callOrigins) ? {
|
|
494
514
|
turns: turnsOf(callOrigins),
|
|
495
515
|
sideQuestions: callOrigins.sideQuestions,
|
|
496
516
|
handoffs: callOrigins.handoffs,
|
|
497
517
|
prewarms: callOrigins.prewarms,
|
|
498
|
-
backgroundMemorySteps: callOrigins.backgroundMemory
|
|
518
|
+
backgroundMemorySteps: callOrigins.backgroundMemory,
|
|
519
|
+
...callOrigins.failedCompaction > 0 ? { failedCompactionCalls: callOrigins.failedCompaction } : {}
|
|
499
520
|
} : {}
|
|
500
521
|
});
|
|
501
522
|
for (const row of usageRows) {
|
|
@@ -506,7 +527,12 @@ async function runUsageCommand(argv) {
|
|
|
506
527
|
attributedModelId: row.attributedModelId,
|
|
507
528
|
requestedModelIds: [...row.requestedModelIds].sort(),
|
|
508
529
|
responseModelIdObservationCounts: row.responseModelIdObservationCounts,
|
|
509
|
-
...
|
|
530
|
+
...reportedUsageTotals(
|
|
531
|
+
row.totals,
|
|
532
|
+
outOfTurnRows.filter(
|
|
533
|
+
(call) => call.target === row.providerId && call.attributedModelId === row.attributedModelId
|
|
534
|
+
)
|
|
535
|
+
)
|
|
510
536
|
});
|
|
511
537
|
}
|
|
512
538
|
for (const session of cacheSessions) {
|
|
@@ -566,7 +592,7 @@ async function runUsageCommand(argv) {
|
|
|
566
592
|
out(` audited tool calls in window: ${auditToolCalls.length} (${auditBlocked.length} blocked/denied)`);
|
|
567
593
|
if (usageMeasurable) {
|
|
568
594
|
out(
|
|
569
|
-
` tokens in window: ${
|
|
595
|
+
` 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
596
|
);
|
|
571
597
|
if (hasLabelledCall(callOrigins)) {
|
|
572
598
|
out(` turns in window: ${turnsOf(callOrigins)}`);
|
|
@@ -577,7 +603,18 @@ async function runUsageCommand(argv) {
|
|
|
577
603
|
out(` background memory steps in window: ${callOrigins.backgroundMemory}`);
|
|
578
604
|
}
|
|
579
605
|
}
|
|
580
|
-
|
|
606
|
+
if (failedCompaction.calls > 0) {
|
|
607
|
+
out(
|
|
608
|
+
` failed-compaction streams: ${failedCompaction.calls} (${failedCompaction.erroredCalls} errored, ${failedCompaction.abortedCalls} aborted, ${failedCompaction.successfulCalls} completed before the attempt failed)`
|
|
609
|
+
);
|
|
610
|
+
out(" usage figures are known subtotals; missing compaction usage is not zero or a complete spending bound");
|
|
611
|
+
out(
|
|
612
|
+
` errored compaction known cost: ${failedCompaction.erroredKnownUsage.costUsd === null ? "unknown" : `$${failedCompaction.erroredKnownUsage.costUsd.toFixed(4)}`}`
|
|
613
|
+
);
|
|
614
|
+
}
|
|
615
|
+
out(
|
|
616
|
+
` ${failedCompaction.calls > 0 ? "known reported/estimated" : "provider-reported"} cost in window: ${typeof reportedTotals.costUsd === "number" ? `$${reportedTotals.costUsd.toFixed(4)}` : "unknown"}`
|
|
617
|
+
);
|
|
581
618
|
}
|
|
582
619
|
if (usageRows.length > 0) {
|
|
583
620
|
out("");
|
|
@@ -598,19 +635,27 @@ async function runUsageCommand(argv) {
|
|
|
598
635
|
"tokens",
|
|
599
636
|
"cost"
|
|
600
637
|
],
|
|
601
|
-
...usageRows.map((row) =>
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
638
|
+
...usageRows.map((row) => {
|
|
639
|
+
const reported = reportedUsageTotals(
|
|
640
|
+
row.totals,
|
|
641
|
+
outOfTurnRows.filter(
|
|
642
|
+
(call) => call.target === row.providerId && call.attributedModelId === row.attributedModelId
|
|
643
|
+
)
|
|
644
|
+
);
|
|
645
|
+
return [
|
|
646
|
+
row.providerId,
|
|
647
|
+
row.attributedModelId,
|
|
648
|
+
[...row.requestedModelIds].sort().join(","),
|
|
649
|
+
responseModelIdObservationCountsLabel(row.responseModelIdObservationCounts),
|
|
650
|
+
String(row.totals.apiCalls),
|
|
651
|
+
usageAmount(reported.input),
|
|
652
|
+
usageAmount(reported.output),
|
|
653
|
+
usageAmount(reported.cacheRead),
|
|
654
|
+
usageAmount(reported.reasoningTokens),
|
|
655
|
+
usageAmount(reported.totalTokens),
|
|
656
|
+
typeof reported.costUsd === "number" ? `$${reported.costUsd.toFixed(4)}` : "unknown"
|
|
657
|
+
];
|
|
658
|
+
})
|
|
614
659
|
])
|
|
615
660
|
)
|
|
616
661
|
);
|
|
@@ -963,4 +1008,4 @@ function isRecord(value) {
|
|
|
963
1008
|
export {
|
|
964
1009
|
runUsageCommand
|
|
965
1010
|
};
|
|
966
|
-
//# sourceMappingURL=usage-
|
|
1011
|
+
//# sourceMappingURL=usage-N7ZNVLEM.js.map
|