@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
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
truncateHead,
|
|
5
5
|
truncateTail
|
|
6
6
|
} from "./chunk-OZNBF4L3.js";
|
|
7
|
-
import {
|
|
8
|
-
createRedactionTally,
|
|
9
|
-
redactSecretsText
|
|
10
|
-
} from "./chunk-4BJ5BYCE.js";
|
|
11
7
|
import {
|
|
12
8
|
byteLength,
|
|
13
9
|
truncateUtf8
|
|
14
10
|
} from "./chunk-6XLNIQDB.js";
|
|
11
|
+
import {
|
|
12
|
+
createRedactionTally,
|
|
13
|
+
redactSecretsText
|
|
14
|
+
} from "./chunk-4BJ5BYCE.js";
|
|
15
15
|
import {
|
|
16
16
|
GUARDRAIL_DEFAULTS,
|
|
17
17
|
resolveGuardrail
|
|
@@ -1097,4 +1097,4 @@ export {
|
|
|
1097
1097
|
observationBudgetExhausted,
|
|
1098
1098
|
finalizeObservation
|
|
1099
1099
|
};
|
|
1100
|
-
//# sourceMappingURL=chunk-
|
|
1100
|
+
//# sourceMappingURL=chunk-JDAY6FIL.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-K6BSR66V.js";
|
|
8
8
|
import {
|
|
9
9
|
StringEnum
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YPC6ZR5L.js";
|
|
11
11
|
import {
|
|
12
12
|
init_esm_shims
|
|
13
13
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -39,4 +39,4 @@ var monitorToolSurface = {
|
|
|
39
39
|
export {
|
|
40
40
|
monitorToolSurface
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=chunk-
|
|
42
|
+
//# sourceMappingURL=chunk-JEQ3XTHC.js.map
|
|
@@ -11,19 +11,57 @@ var SKILL_INSTALL_OFFER_OPTION_PROJECT = "Install for this project";
|
|
|
11
11
|
var SKILL_INSTALL_OFFER_OPTION_USER = "Install globally";
|
|
12
12
|
var SKILL_INSTALL_OFFER_OPTION_NOT_NOW = "Not now";
|
|
13
13
|
var SKILL_INSTALL_OFFER_OPTION_NEVER = "Never offer this skill";
|
|
14
|
+
function armedSkillSurface(policy) {
|
|
15
|
+
if (!policy) return void 0;
|
|
16
|
+
const declared = [...policy.loadedSkillPolicies.entries()].filter(
|
|
17
|
+
([, declaration]) => (declaration.allowedTools?.length ?? 0) > 0 || (declaration.disallowedTools?.length ?? 0) > 0
|
|
18
|
+
);
|
|
19
|
+
if (declared.length === 0) return void 0;
|
|
20
|
+
return {
|
|
21
|
+
allowedSkillNames: [...policy.allowedSkillNames],
|
|
22
|
+
requests: [...policy.requests],
|
|
23
|
+
loadedSkillNames: new Set(policy.loadedSkillNames),
|
|
24
|
+
loadedSkillPolicies: new Map(declared),
|
|
25
|
+
carriedSurface: true
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function skillSurfaceNames(policy) {
|
|
29
|
+
return policy ? [...policy.loadedSkillPolicies.keys()] : [];
|
|
30
|
+
}
|
|
31
|
+
function skillSurfaceLabels(policy) {
|
|
32
|
+
if (!policy) return [];
|
|
33
|
+
return [...policy.loadedSkillPolicies.keys()].map(
|
|
34
|
+
(name) => policy.requests.some((request) => request.name === name) ? `${name} (operator)` : `${name} (model)`
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
function withModelSkillActivation(policy, enabled) {
|
|
38
|
+
if (policy) {
|
|
39
|
+
policy.modelActivation = enabled;
|
|
40
|
+
return policy;
|
|
41
|
+
}
|
|
42
|
+
if (!enabled) return void 0;
|
|
43
|
+
return {
|
|
44
|
+
allowedSkillNames: [],
|
|
45
|
+
requests: [],
|
|
46
|
+
loadedSkillNames: /* @__PURE__ */ new Set(),
|
|
47
|
+
loadedSkillPolicies: /* @__PURE__ */ new Map(),
|
|
48
|
+
modelActivation: true
|
|
49
|
+
};
|
|
50
|
+
}
|
|
14
51
|
var SKILL_SURFACE_EXEMPT_TOOLS = /* @__PURE__ */ new Set(["context", "ask_user"]);
|
|
15
52
|
function evaluateSkillToolSurface(policy, tool) {
|
|
16
53
|
if (!policy || policy.loadedSkillPolicies.size === 0) return null;
|
|
17
54
|
if (SKILL_SURFACE_EXEMPT_TOOLS.has(tool)) return null;
|
|
18
55
|
const entries = [...policy.loadedSkillPolicies.entries()];
|
|
19
56
|
const skills = entries.map(([name]) => name);
|
|
57
|
+
const carriedSurface = policy.carriedSurface === true;
|
|
20
58
|
const disallowedBy = entries.filter(([, declared]) => declared.disallowedTools?.includes(tool) === true).map(([name]) => name);
|
|
21
|
-
if (disallowedBy.length > 0) return { skills, mergedAllowedTools: null, disallowedBy };
|
|
59
|
+
if (disallowedBy.length > 0) return { skills, mergedAllowedTools: null, disallowedBy, carriedSurface };
|
|
22
60
|
const allowLists = entries.map(([, declared]) => declared.allowedTools);
|
|
23
61
|
if (allowLists.some((list) => list === void 0 || list.length === 0)) return null;
|
|
24
62
|
const merged = [...new Set(allowLists.flatMap((list) => [...list ?? []]))];
|
|
25
63
|
if (merged.includes(tool)) return null;
|
|
26
|
-
return { skills, mergedAllowedTools: merged, disallowedBy: [] };
|
|
64
|
+
return { skills, mergedAllowedTools: merged, disallowedBy: [], carriedSurface };
|
|
27
65
|
}
|
|
28
66
|
function agentSkillToolPolicy(skillNames) {
|
|
29
67
|
const allowedSkillNames = [...new Set(skillNames.map((name) => name.trim()).filter((name) => name.length > 0))];
|
|
@@ -82,6 +120,9 @@ function isAutonomyLevel(value) {
|
|
|
82
120
|
}
|
|
83
121
|
var AUTONOMY_EXPOSURES = ["local", "outward"];
|
|
84
122
|
var DEFAULT_AUTONOMY_EXPOSURE = "local";
|
|
123
|
+
function modelMayActivateSkills(level) {
|
|
124
|
+
return level === "auto-edit" || level === "full-auto";
|
|
125
|
+
}
|
|
85
126
|
function mapAutonomy(level, actionClass, options = {}) {
|
|
86
127
|
if (actionClass === "git_destructive") return "deny";
|
|
87
128
|
if ((level === "auto-edit" || level === "suggest") && options.exposure === "outward") return "ask";
|
|
@@ -256,7 +297,7 @@ function isOptionalCompactionUsage(value) {
|
|
|
256
297
|
if (value === void 0) return true;
|
|
257
298
|
if (!isRecord(value)) return false;
|
|
258
299
|
const cost = value.cost;
|
|
259
|
-
return isNumber(value.input) && isNumber(value.output) && isNumber(value.cacheRead) && isNumber(value.cacheWrite) && isNumber(value.reasoning) && isNumber(value.totalTokens) && isNumber(value.apiCalls) && isRecord(cost) && isNumber(cost.total);
|
|
300
|
+
return isOptionalString(value.targetId) && isOptionalString(value.modelId) && isNumber(value.input) && isNumber(value.output) && isNumber(value.cacheRead) && isNumber(value.cacheWrite) && isNumber(value.reasoning) && isNumber(value.totalTokens) && isNumber(value.apiCalls) && isRecord(cost) && isNumber(cost.total);
|
|
260
301
|
}
|
|
261
302
|
function isProtectedArtifact(value) {
|
|
262
303
|
if (!isRecord(value)) return false;
|
|
@@ -323,6 +364,10 @@ export {
|
|
|
323
364
|
SKILL_INSTALL_OFFER_OPTION_USER,
|
|
324
365
|
SKILL_INSTALL_OFFER_OPTION_NOT_NOW,
|
|
325
366
|
SKILL_INSTALL_OFFER_OPTION_NEVER,
|
|
367
|
+
armedSkillSurface,
|
|
368
|
+
skillSurfaceNames,
|
|
369
|
+
skillSurfaceLabels,
|
|
370
|
+
withModelSkillActivation,
|
|
326
371
|
evaluateSkillToolSurface,
|
|
327
372
|
agentSkillToolPolicy,
|
|
328
373
|
skillActivationFromToolDetails,
|
|
@@ -331,10 +376,11 @@ export {
|
|
|
331
376
|
DEFAULT_AUTONOMY_LEVEL,
|
|
332
377
|
isAutonomyLevel,
|
|
333
378
|
DEFAULT_AUTONOMY_EXPOSURE,
|
|
379
|
+
modelMayActivateSkills,
|
|
334
380
|
mapAutonomy,
|
|
335
381
|
autonomyDenyRejection,
|
|
336
382
|
autonomyAskRejection,
|
|
337
383
|
isSessionHeader,
|
|
338
384
|
isSessionEntry
|
|
339
385
|
};
|
|
340
|
-
//# sourceMappingURL=chunk-
|
|
386
|
+
//# sourceMappingURL=chunk-JGRC33J2.js.map
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
probeWorkspace
|
|
7
7
|
} from "./chunk-HVDIIIQW.js";
|
|
8
|
+
import {
|
|
9
|
+
protectArtifact
|
|
10
|
+
} from "./chunk-I7ZPNEJM.js";
|
|
8
11
|
import {
|
|
9
12
|
isSessionEntry,
|
|
10
13
|
isSessionHeader
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
protectArtifact
|
|
14
|
-
} from "./chunk-IKOZFYBN.js";
|
|
14
|
+
} from "./chunk-JGRC33J2.js";
|
|
15
15
|
import {
|
|
16
16
|
stripTokenizerSentinels
|
|
17
17
|
} from "./chunk-CFGTUFWB.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
readSessionMeta,
|
|
27
27
|
resumeSession,
|
|
28
28
|
sessionPaths
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-HAXOFFRH.js";
|
|
30
30
|
import {
|
|
31
31
|
BusChannels
|
|
32
32
|
} from "./chunk-F4EKGO4N.js";
|
|
@@ -1243,9 +1243,9 @@ function ledgerUsageCalls(entries, defaults = {}) {
|
|
|
1243
1243
|
const usage2 = entry.usage;
|
|
1244
1244
|
if (!usage2 || usage2.totalTokens <= 0) continue;
|
|
1245
1245
|
calls.push({
|
|
1246
|
-
providerId: currentTarget ?? "unknown",
|
|
1247
|
-
attributedModelId: currentModel ?? "unknown",
|
|
1248
|
-
requestedModelId: currentModel ?? "unknown",
|
|
1246
|
+
providerId: usage2.targetId ?? currentTarget ?? "unknown",
|
|
1247
|
+
attributedModelId: usage2.modelId ?? currentModel ?? "unknown",
|
|
1248
|
+
requestedModelId: usage2.modelId ?? currentModel ?? "unknown",
|
|
1249
1249
|
responseModelIdObservation: { state: "not-observed" },
|
|
1250
1250
|
input: usage2.input,
|
|
1251
1251
|
output: usage2.output,
|
|
@@ -1481,4 +1481,4 @@ export {
|
|
|
1481
1481
|
ledgerUsageCalls,
|
|
1482
1482
|
SessionDomainModule
|
|
1483
1483
|
};
|
|
1484
|
-
//# sourceMappingURL=chunk-
|
|
1484
|
+
//# sourceMappingURL=chunk-JKKCYP3C.js.map
|
|
@@ -32,12 +32,24 @@ var ENV_ALLOWLIST = [
|
|
|
32
32
|
"TEMP",
|
|
33
33
|
"TMP",
|
|
34
34
|
"CI",
|
|
35
|
-
"NO_COLOR"
|
|
35
|
+
"NO_COLOR",
|
|
36
|
+
// Platform/session location variables needed by installed local CLIs. These
|
|
37
|
+
// locate operator-owned state; provider keys and Clio gates are deliberately
|
|
38
|
+
// absent from this allowlist.
|
|
39
|
+
"XDG_CONFIG_HOME",
|
|
40
|
+
"XDG_CACHE_HOME",
|
|
41
|
+
"XDG_STATE_HOME",
|
|
42
|
+
"APPDATA",
|
|
43
|
+
"LOCALAPPDATA",
|
|
44
|
+
"SYSTEMROOT",
|
|
45
|
+
"WINDIR",
|
|
46
|
+
"COMSPEC",
|
|
47
|
+
"PATHEXT"
|
|
36
48
|
];
|
|
37
|
-
function buildSafeToolEnv(extra = {}) {
|
|
49
|
+
function buildSafeToolEnv(extra = {}, source = process.env) {
|
|
38
50
|
const env = {};
|
|
39
51
|
for (const key of ENV_ALLOWLIST) {
|
|
40
|
-
const value =
|
|
52
|
+
const value = source[key];
|
|
41
53
|
if (value !== void 0) env[key] = value;
|
|
42
54
|
}
|
|
43
55
|
for (const [key, value] of Object.entries(extra)) {
|
|
@@ -181,4 +193,4 @@ export {
|
|
|
181
193
|
runCommandVector,
|
|
182
194
|
combineSafeOutput
|
|
183
195
|
};
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
196
|
+
//# sourceMappingURL=chunk-JSC3U7TI.js.map
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
planWikiGeneration
|
|
4
|
+
} from "./chunk-R6Q67RJH.js";
|
|
2
5
|
import {
|
|
3
6
|
loadFragments,
|
|
4
7
|
renderCodewikiDigest
|
|
5
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Y3CBHOR6.js";
|
|
6
9
|
import {
|
|
7
10
|
loadMemoryRecordsSync
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
createTomlFileReader,
|
|
11
|
-
tomlTableAt
|
|
12
|
-
} from "./chunk-LCGCVYZ4.js";
|
|
11
|
+
} from "./chunk-BEPZRGGU.js";
|
|
13
12
|
import {
|
|
14
13
|
WIKI_INDEX,
|
|
15
14
|
WIKI_PLAN_FILE,
|
|
@@ -45,6 +44,10 @@ import {
|
|
|
45
44
|
statePath,
|
|
46
45
|
writeClioState
|
|
47
46
|
} from "./chunk-MXHC5QYU.js";
|
|
47
|
+
import {
|
|
48
|
+
createTomlFileReader,
|
|
49
|
+
tomlTableAt
|
|
50
|
+
} from "./chunk-LCGCVYZ4.js";
|
|
48
51
|
import {
|
|
49
52
|
classifyProjectPreload
|
|
50
53
|
} from "./chunk-JVCV3ICN.js";
|
|
@@ -52,6 +55,15 @@ import {
|
|
|
52
55
|
compileGlobRegex,
|
|
53
56
|
normalizeGlobInput
|
|
54
57
|
} from "./chunk-VG7TBQIY.js";
|
|
58
|
+
import {
|
|
59
|
+
ceilChars
|
|
60
|
+
} from "./chunk-NZMNUPZZ.js";
|
|
61
|
+
import {
|
|
62
|
+
INTEROP_AGENT_KINDS
|
|
63
|
+
} from "./chunk-KXDSS5WJ.js";
|
|
64
|
+
import {
|
|
65
|
+
BusChannels
|
|
66
|
+
} from "./chunk-F4EKGO4N.js";
|
|
55
67
|
import {
|
|
56
68
|
computeFingerprintCached,
|
|
57
69
|
isStale
|
|
@@ -66,15 +78,6 @@ import {
|
|
|
66
78
|
import {
|
|
67
79
|
enumerateWorkspaceFiles
|
|
68
80
|
} from "./chunk-33YXPOE3.js";
|
|
69
|
-
import {
|
|
70
|
-
ceilChars
|
|
71
|
-
} from "./chunk-CWVRRIEI.js";
|
|
72
|
-
import {
|
|
73
|
-
INTEROP_AGENT_KINDS
|
|
74
|
-
} from "./chunk-IHXBNWMM.js";
|
|
75
|
-
import {
|
|
76
|
-
BusChannels
|
|
77
|
-
} from "./chunk-F4EKGO4N.js";
|
|
78
81
|
import {
|
|
79
82
|
require_dist
|
|
80
83
|
} from "./chunk-APJ265NV.js";
|
|
@@ -2998,126 +3001,6 @@ function normalizeRepoPath(sourceRoot, candidate) {
|
|
|
2998
3001
|
return rel.split("\\").join("/");
|
|
2999
3002
|
}
|
|
3000
3003
|
|
|
3001
|
-
// src/domains/context/wiki/plan.ts
|
|
3002
|
-
init_esm_shims();
|
|
3003
|
-
var WIKI_DEPTH_STRATEGY = {
|
|
3004
|
-
simple: { areaDepth: 1, areaShare: 0.08, minAreaLines: 400 },
|
|
3005
|
-
medium: { areaDepth: 2, areaShare: 0.03, minAreaLines: 250 },
|
|
3006
|
-
detailed: { areaDepth: 3, areaShare: 8e-3, minAreaLines: 150 }
|
|
3007
|
-
};
|
|
3008
|
-
var MAX_PAGE_SOURCES = 8;
|
|
3009
|
-
function areaForPath(path, maxDepth) {
|
|
3010
|
-
const directories = path.split("/").filter(Boolean).slice(0, -1);
|
|
3011
|
-
if (directories.length === 0) return ".";
|
|
3012
|
-
return directories.slice(0, Math.max(1, maxDepth)).join("/");
|
|
3013
|
-
}
|
|
3014
|
-
function classifyDepth(sourceFiles, sourceLines) {
|
|
3015
|
-
if (sourceFiles <= 150 && sourceLines <= 3e4) return "simple";
|
|
3016
|
-
if (sourceFiles <= 800 && sourceLines <= 15e4) return "medium";
|
|
3017
|
-
return "detailed";
|
|
3018
|
-
}
|
|
3019
|
-
function slugSegment(segment) {
|
|
3020
|
-
const slug = segment.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
3021
|
-
return slug.length > 0 ? slug : "section";
|
|
3022
|
-
}
|
|
3023
|
-
function areaSegments(area) {
|
|
3024
|
-
const parts = area.split("/").filter((part) => part.length > 0 && part !== ".");
|
|
3025
|
-
if (parts.length === 0) return ["root"];
|
|
3026
|
-
if (parts[0] !== "src") return parts;
|
|
3027
|
-
return parts.length === 1 ? ["source"] : parts.slice(1);
|
|
3028
|
-
}
|
|
3029
|
-
function pagePathForArea(area) {
|
|
3030
|
-
return `${areaSegments(area).map(slugSegment).join("/")}.md`;
|
|
3031
|
-
}
|
|
3032
|
-
function titleForArea(area) {
|
|
3033
|
-
const name2 = areaSegments(area).join(" ").replace(/[-_]+/g, " ").trim();
|
|
3034
|
-
return name2.length > 0 ? name2.charAt(0).toUpperCase() + name2.slice(1) : "Overview";
|
|
3035
|
-
}
|
|
3036
|
-
function rankedSources(files) {
|
|
3037
|
-
return [...files].sort((a, b) => {
|
|
3038
|
-
const roleRank = (file) => file.role === "entry" ? 0 : file.role === "test" ? 2 : 1;
|
|
3039
|
-
return roleRank(a) - roleRank(b) || b.loc - a.loc || a.path.localeCompare(b.path);
|
|
3040
|
-
}).slice(0, MAX_PAGE_SOURCES).map((file) => file.path);
|
|
3041
|
-
}
|
|
3042
|
-
function collectAreas(source, areaDepth) {
|
|
3043
|
-
const byKey = /* @__PURE__ */ new Map();
|
|
3044
|
-
for (const file of source) {
|
|
3045
|
-
const key = areaForPath(file.path, areaDepth);
|
|
3046
|
-
const area = byKey.get(key) ?? { key, files: [], lines: 0 };
|
|
3047
|
-
area.files.push(file);
|
|
3048
|
-
area.lines += Math.max(0, file.loc);
|
|
3049
|
-
byKey.set(key, area);
|
|
3050
|
-
}
|
|
3051
|
-
return [...byKey.values()].sort((a, b) => b.lines - a.lines || a.key.localeCompare(b.key));
|
|
3052
|
-
}
|
|
3053
|
-
function overviewPage(source) {
|
|
3054
|
-
const entries = source.filter((file) => file.role === "entry");
|
|
3055
|
-
return {
|
|
3056
|
-
path: "architecture.md",
|
|
3057
|
-
title: "Architecture",
|
|
3058
|
-
intent: "Explain what this repository is, its top-level composition, how a request or command flows through it, and where the boundaries between its major areas are.",
|
|
3059
|
-
sources: rankedSources(entries.length > 0 ? entries : source),
|
|
3060
|
-
status: "pending",
|
|
3061
|
-
attempts: 0
|
|
3062
|
-
};
|
|
3063
|
-
}
|
|
3064
|
-
function buildCandidatePlan(codewiki, depth) {
|
|
3065
|
-
const source = codewiki.files.filter((file) => file.lang !== "config");
|
|
3066
|
-
const totalLines = source.reduce((total, file) => total + Math.max(0, file.loc), 0);
|
|
3067
|
-
const { areaDepth, areaShare, minAreaLines } = WIKI_DEPTH_STRATEGY[depth];
|
|
3068
|
-
const threshold = Math.max(minAreaLines, Math.floor(totalLines * areaShare));
|
|
3069
|
-
const areas = collectAreas(source, areaDepth);
|
|
3070
|
-
const included = areas.filter((area) => area.lines >= threshold);
|
|
3071
|
-
const selected = included.length > 0 ? included : areas.slice(0, 1);
|
|
3072
|
-
const selectedKeys = new Set(selected.map((area) => area.key));
|
|
3073
|
-
const extras = /* @__PURE__ */ new Map();
|
|
3074
|
-
for (const area of areas) {
|
|
3075
|
-
if (selectedKeys.has(area.key)) continue;
|
|
3076
|
-
const ancestor = selected.find((candidate) => area.key.startsWith(`${candidate.key}/`));
|
|
3077
|
-
const host = ancestor?.key ?? selected[0]?.key;
|
|
3078
|
-
if (host === void 0) continue;
|
|
3079
|
-
extras.set(host, [...extras.get(host) ?? [], ...area.files]);
|
|
3080
|
-
}
|
|
3081
|
-
const pages = selected.map((area) => {
|
|
3082
|
-
const files = [...area.files, ...extras.get(area.key) ?? []];
|
|
3083
|
-
return {
|
|
3084
|
-
path: pagePathForArea(area.key),
|
|
3085
|
-
title: titleForArea(area.key),
|
|
3086
|
-
intent: `Document ${area.key} (${area.files.length} indexed files, ${area.lines} lines): what it owns, its entry points and important symbols, the state and lifecycle invariants it enforces, an upstream caller and a downstream dependency, the focused tests that prove its behavior, and what to watch when editing it.`,
|
|
3087
|
-
sources: rankedSources(files),
|
|
3088
|
-
status: "pending",
|
|
3089
|
-
attempts: 0
|
|
3090
|
-
};
|
|
3091
|
-
});
|
|
3092
|
-
return dedupePagePaths({
|
|
3093
|
-
version: 1,
|
|
3094
|
-
overview: "",
|
|
3095
|
-
pages: [overviewPage(source), ...pages]
|
|
3096
|
-
});
|
|
3097
|
-
}
|
|
3098
|
-
function dedupePagePaths(plan) {
|
|
3099
|
-
const seen = /* @__PURE__ */ new Set();
|
|
3100
|
-
const pages = [];
|
|
3101
|
-
for (const page of plan.pages) {
|
|
3102
|
-
let path = page.path;
|
|
3103
|
-
let suffix = 2;
|
|
3104
|
-
while (seen.has(path)) {
|
|
3105
|
-
path = page.path.replace(/\.md$/, `-${suffix}.md`);
|
|
3106
|
-
suffix += 1;
|
|
3107
|
-
}
|
|
3108
|
-
seen.add(path);
|
|
3109
|
-
pages.push({ ...page, path });
|
|
3110
|
-
}
|
|
3111
|
-
return { ...plan, pages };
|
|
3112
|
-
}
|
|
3113
|
-
function planWikiGeneration(codewiki, requestedDepth = "auto") {
|
|
3114
|
-
const source = codewiki.files.filter((file) => file.lang !== "config");
|
|
3115
|
-
const sourceFiles = source.length;
|
|
3116
|
-
const sourceLines = source.reduce((total, file) => total + Math.max(0, file.loc), 0);
|
|
3117
|
-
const depth = requestedDepth === "auto" ? classifyDepth(sourceFiles, sourceLines) : requestedDepth;
|
|
3118
|
-
return { requestedDepth, depth, sourceFiles, sourceLines, plan: buildCandidatePlan(codewiki, depth) };
|
|
3119
|
-
}
|
|
3120
|
-
|
|
3121
3004
|
// src/domains/context/wiki/generate.ts
|
|
3122
3005
|
function progress2(input, event) {
|
|
3123
3006
|
input.onProgress?.(event);
|
|
@@ -4089,10 +3972,6 @@ export {
|
|
|
4089
3972
|
loadProjectRules,
|
|
4090
3973
|
selectActiveRules,
|
|
4091
3974
|
assembleWikiTree,
|
|
4092
|
-
WIKI_DEPTH_STRATEGY,
|
|
4093
|
-
pagePathForArea,
|
|
4094
|
-
buildCandidatePlan,
|
|
4095
|
-
planWikiGeneration,
|
|
4096
3975
|
runWikiGenerate,
|
|
4097
3976
|
runContextRefresh,
|
|
4098
3977
|
ContextDomainModule,
|
|
@@ -4100,4 +3979,4 @@ export {
|
|
|
4100
3979
|
buildWikiPlanPrompt,
|
|
4101
3980
|
buildWikiPagePrompt
|
|
4102
3981
|
};
|
|
4103
|
-
//# sourceMappingURL=chunk-
|
|
3982
|
+
//# sourceMappingURL=chunk-KK4JZPBQ.js.map
|
|
@@ -94,8 +94,10 @@ var INTEROP_AGENT_KINDS = [
|
|
|
94
94
|
id: "antigravity",
|
|
95
95
|
label: "Antigravity CLI",
|
|
96
96
|
binaryNames: ["agy"],
|
|
97
|
-
userDir: ".
|
|
98
|
-
|
|
97
|
+
userDir: ".gemini/antigravity-cli",
|
|
98
|
+
legacyUserDirs: [".antigravitycli"],
|
|
99
|
+
projectDir: ".gemini/antigravity-cli",
|
|
100
|
+
legacyProjectDirs: [".antigravitycli"],
|
|
99
101
|
instructionFiles: []
|
|
100
102
|
},
|
|
101
103
|
{
|
|
@@ -123,7 +125,9 @@ function foreignAgentDirs() {
|
|
|
123
125
|
const dirs = [];
|
|
124
126
|
for (const kind of INTEROP_AGENT_KINDS) {
|
|
125
127
|
dirs.push(`~/${kind.userDir}/`);
|
|
128
|
+
for (const legacy of kind.legacyUserDirs ?? []) dirs.push(`~/${legacy}/`);
|
|
126
129
|
if (kind.projectDir !== void 0) dirs.push(`${kind.projectDir}/`);
|
|
130
|
+
for (const legacy of kind.legacyProjectDirs ?? []) dirs.push(`${legacy}/`);
|
|
127
131
|
}
|
|
128
132
|
return [...new Set(dirs)];
|
|
129
133
|
}
|
|
@@ -134,4 +138,4 @@ export {
|
|
|
134
138
|
interopSourceRank,
|
|
135
139
|
foreignAgentDirs
|
|
136
140
|
};
|
|
137
|
-
//# sourceMappingURL=chunk-
|
|
141
|
+
//# sourceMappingURL=chunk-KXDSS5WJ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
isSessionEntry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JGRC33J2.js";
|
|
5
5
|
import {
|
|
6
6
|
init_esm_shims
|
|
7
7
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -371,4 +371,4 @@ export {
|
|
|
371
371
|
foldSessionTaskHistory,
|
|
372
372
|
createTaskBoardStore
|
|
373
373
|
};
|
|
374
|
-
//# sourceMappingURL=chunk-
|
|
374
|
+
//# sourceMappingURL=chunk-L47TF46W.js.map
|