@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
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
credentialWriteFailed,
|
|
12
12
|
printPlaintextCredentialWarning
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PUVDKJ2Y.js";
|
|
14
14
|
import {
|
|
15
15
|
columnWidths,
|
|
16
16
|
formatColumnRow,
|
|
@@ -19,52 +19,55 @@ import {
|
|
|
19
19
|
printOk
|
|
20
20
|
} from "./chunk-VPKWYKEY.js";
|
|
21
21
|
import "./chunk-5TSRNF4G.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-XPWWI35G.js";
|
|
23
23
|
import "./chunk-CFGTUFWB.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-NZMNUPZZ.js";
|
|
25
|
+
import "./chunk-2JH2WHGE.js";
|
|
26
|
+
import "./chunk-HAXOFFRH.js";
|
|
27
27
|
import "./chunk-R346GLFC.js";
|
|
28
|
-
import "./chunk-PMZVFWSR.js";
|
|
29
|
-
import "./chunk-BTK3SSSK.js";
|
|
30
28
|
import {
|
|
31
29
|
readSettings
|
|
32
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GHS5EBTQ.js";
|
|
33
31
|
import "./chunk-D7E7WCDF.js";
|
|
32
|
+
import "./chunk-BTK3SSSK.js";
|
|
33
|
+
import "./chunk-PMZVFWSR.js";
|
|
34
34
|
import "./chunk-F4EKGO4N.js";
|
|
35
|
-
import "./chunk-EBY63B7G.js";
|
|
36
35
|
import "./chunk-IWHMRKLL.js";
|
|
37
36
|
import {
|
|
38
37
|
EMPTY_CAPABILITIES,
|
|
39
38
|
registerBuiltinRuntimes
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-VW6DOEDG.js";
|
|
41
40
|
import "./chunk-UXCU4E3T.js";
|
|
42
41
|
import "./chunk-LL4KHSZI.js";
|
|
42
|
+
import "./chunk-JSC3U7TI.js";
|
|
43
43
|
import "./chunk-S66XZJOF.js";
|
|
44
|
+
import "./chunk-JIEGK6UF.js";
|
|
45
|
+
import "./chunk-EBY63B7G.js";
|
|
46
|
+
import "./chunk-6EJMN2Y3.js";
|
|
44
47
|
import {
|
|
45
48
|
listProviderSupportEntries,
|
|
46
49
|
resolveProviderReference,
|
|
47
50
|
supportGroupLabel
|
|
48
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-LLDJM5XK.js";
|
|
49
52
|
import {
|
|
50
53
|
authNotRequiredStatus,
|
|
51
54
|
openAuthStorage,
|
|
52
55
|
registerClioOAuthProviders,
|
|
53
56
|
resolveRuntimeAuthTarget,
|
|
54
57
|
targetRequiresAuth
|
|
55
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-ID64D7PE.js";
|
|
56
59
|
import "./chunk-336NSSKI.js";
|
|
57
60
|
import "./chunk-IKCO5N3L.js";
|
|
58
61
|
import "./chunk-3I7MS7N2.js";
|
|
59
62
|
import "./chunk-APJ265NV.js";
|
|
60
|
-
import "./chunk-BYP5D4HI.js";
|
|
61
63
|
import "./chunk-WEPFGWHJ.js";
|
|
62
64
|
import {
|
|
63
65
|
getRuntimeRegistry
|
|
64
66
|
} from "./chunk-NUGM5KR6.js";
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-5OIVVPHF.js";
|
|
68
|
+
import "./chunk-YPC6ZR5L.js";
|
|
67
69
|
import "./chunk-YXLYO42X.js";
|
|
70
|
+
import "./chunk-BYP5D4HI.js";
|
|
68
71
|
import {
|
|
69
72
|
init_esm_shims
|
|
70
73
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -546,4 +549,4 @@ async function runAuthCommand(args) {
|
|
|
546
549
|
export {
|
|
547
550
|
runAuthCommand
|
|
548
551
|
};
|
|
549
|
-
//# sourceMappingURL=auth-
|
|
552
|
+
//# sourceMappingURL=auth-E5SW4HMS.js.map
|
|
@@ -2,16 +2,21 @@ import { createRequire as __clioCreateRequire } from "node:module"; const requir
|
|
|
2
2
|
import {
|
|
3
3
|
BUILTIN_RUNTIMES,
|
|
4
4
|
registerBuiltinRuntimes
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VW6DOEDG.js";
|
|
6
6
|
import "./chunk-UXCU4E3T.js";
|
|
7
7
|
import "./chunk-LL4KHSZI.js";
|
|
8
|
+
import "./chunk-JSC3U7TI.js";
|
|
8
9
|
import "./chunk-S66XZJOF.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-JIEGK6UF.js";
|
|
11
|
+
import "./chunk-EBY63B7G.js";
|
|
12
|
+
import "./chunk-6EJMN2Y3.js";
|
|
13
|
+
import "./chunk-5OIVVPHF.js";
|
|
14
|
+
import "./chunk-YPC6ZR5L.js";
|
|
11
15
|
import "./chunk-YXLYO42X.js";
|
|
16
|
+
import "./chunk-BYP5D4HI.js";
|
|
12
17
|
import "./chunk-3R73A4XB.js";
|
|
13
18
|
export {
|
|
14
19
|
BUILTIN_RUNTIMES,
|
|
15
20
|
registerBuiltinRuntimes
|
|
16
21
|
};
|
|
17
|
-
//# sourceMappingURL=builtins-
|
|
22
|
+
//# sourceMappingURL=builtins-IA7V7FUC.js.map
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
openLedger,
|
|
9
9
|
readFleetRun
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AF4YM7Z4.js";
|
|
11
|
+
import {
|
|
12
|
+
WRITE_BOUNDARY_VIOLATION_REASON
|
|
13
|
+
} from "./chunk-B4VEBZKF.js";
|
|
11
14
|
import {
|
|
12
15
|
formatTrustSummaryLine,
|
|
13
16
|
inspectRunReceiptTrustStatus
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
WRITE_BOUNDARY_VIOLATION_REASON
|
|
17
|
-
} from "./chunk-W6NIE6OW.js";
|
|
17
|
+
} from "./chunk-IWT4SF4R.js";
|
|
18
18
|
import {
|
|
19
19
|
readRunEventJournal,
|
|
20
20
|
runEventJournalPath
|
|
@@ -570,4 +570,4 @@ export {
|
|
|
570
570
|
loadFleetRunViewModel,
|
|
571
571
|
runFleetView
|
|
572
572
|
};
|
|
573
|
-
//# sourceMappingURL=chunk-
|
|
573
|
+
//# sourceMappingURL=chunk-2APPQIER.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
|
openAuthStorage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ID64D7PE.js";
|
|
5
5
|
import {
|
|
6
6
|
getRuntimeRegistry
|
|
7
7
|
} from "./chunk-NUGM5KR6.js";
|
|
@@ -30,4 +30,4 @@ function credentialsPresent() {
|
|
|
30
30
|
export {
|
|
31
31
|
credentialsPresent
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
33
|
+
//# sourceMappingURL=chunk-2JH2WHGE.js.map
|
|
@@ -4,16 +4,20 @@ import {
|
|
|
4
4
|
TASK_MEMORY_POLICY_DEFAULT_TIMEOUT_MS,
|
|
5
5
|
runTaskMemoryPolicy,
|
|
6
6
|
taskMemoryBankDelta
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2WZ546HR.js";
|
|
8
8
|
import {
|
|
9
9
|
isTerminalRunEnvelope
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PAJQJ7BS.js";
|
|
11
11
|
import {
|
|
12
12
|
taskBoardCounts
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-L47TF46W.js";
|
|
14
14
|
import {
|
|
15
15
|
hashToolCall
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RSJ25QSL.js";
|
|
17
|
+
import {
|
|
18
|
+
legacyToolResultDigest,
|
|
19
|
+
sanitizeToolResultDigest
|
|
20
|
+
} from "./chunk-JDAY6FIL.js";
|
|
17
21
|
import {
|
|
18
22
|
SKILL_INSTALL_OFFER_OPTION_NEVER,
|
|
19
23
|
SKILL_INSTALL_OFFER_OPTION_NOT_NOW,
|
|
@@ -21,20 +25,16 @@ import {
|
|
|
21
25
|
SKILL_INSTALL_OFFER_OPTION_USER,
|
|
22
26
|
SKILL_SUGGESTION_ANCHOR,
|
|
23
27
|
SKILL_SUGGESTION_PREFIX
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import {
|
|
26
|
-
legacyToolResultDigest,
|
|
27
|
-
sanitizeToolResultDigest
|
|
28
|
-
} from "./chunk-B7HM5Z7T.js";
|
|
28
|
+
} from "./chunk-JGRC33J2.js";
|
|
29
29
|
import {
|
|
30
30
|
ToolNames
|
|
31
31
|
} from "./chunk-K6BSR66V.js";
|
|
32
32
|
import {
|
|
33
33
|
registerForegroundStream
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-XPWWI35G.js";
|
|
35
35
|
import {
|
|
36
36
|
ceilChars
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-NZMNUPZZ.js";
|
|
38
38
|
import {
|
|
39
39
|
BusChannels
|
|
40
40
|
} from "./chunk-F4EKGO4N.js";
|
|
@@ -45,12 +45,12 @@ import {
|
|
|
45
45
|
import {
|
|
46
46
|
require_dist
|
|
47
47
|
} from "./chunk-APJ265NV.js";
|
|
48
|
-
import {
|
|
49
|
-
clioConfigDir
|
|
50
|
-
} from "./chunk-BYP5D4HI.js";
|
|
51
48
|
import {
|
|
52
49
|
safeResourceWrite
|
|
53
50
|
} from "./chunk-WEPFGWHJ.js";
|
|
51
|
+
import {
|
|
52
|
+
clioConfigDir
|
|
53
|
+
} from "./chunk-BYP5D4HI.js";
|
|
54
54
|
import {
|
|
55
55
|
__toESM,
|
|
56
56
|
init_esm_shims
|
|
@@ -970,8 +970,11 @@ function readPersistedHookReceipts(persistPath) {
|
|
|
970
970
|
// src/domains/middleware/skills-reminder.ts
|
|
971
971
|
init_esm_shims();
|
|
972
972
|
var SKILLS_REMINDER_REGISTRATION_ID = "observer.skills-reminder";
|
|
973
|
-
function skillsReminderMessage(installed, installable = 0) {
|
|
973
|
+
function skillsReminderMessage(installed, installable = 0, modelActivation = false) {
|
|
974
974
|
const counts = installable > 0 ? `${installed} installed, ${installable} installable from the marketplace` : `${installed} installed`;
|
|
975
|
+
if (modelActivation) {
|
|
976
|
+
return `[Skills] ${counts}. Start this task by listing them with context(scope="skills") and checking for a match; if one matches, load it with context(scope="skills", name="<name>") and continue the task in the same turn. A marketplace skill is not installed and is offered for install when the operator runs it. If none match, do not mention skills and continue with the task.`;
|
|
977
|
+
}
|
|
975
978
|
return `[Skills] ${counts}. Start this task by listing them with context(scope="skills") and checking for a match; if one matches, open your reply with the line \`${SKILL_SUGGESTION_ANCHOR}\` (a comma-separated sequence, in order, when several compose) and then continue the task in the same turn without the skill. Only the operator loads a skill, and a marketplace skill is offered for install when the operator runs it. If none match, do not mention skills and continue with the task.`;
|
|
976
979
|
}
|
|
977
980
|
var NO_EFFECTS = [];
|
|
@@ -1070,7 +1073,18 @@ function createSkillsReminderRegistration(deps) {
|
|
|
1070
1073
|
return NO_EFFECTS;
|
|
1071
1074
|
}
|
|
1072
1075
|
if (installed <= 0 && installable <= 0) return NO_EFFECTS;
|
|
1073
|
-
|
|
1076
|
+
let modelActivation = false;
|
|
1077
|
+
try {
|
|
1078
|
+
modelActivation = deps.modelMayActivateSkills?.() ?? false;
|
|
1079
|
+
} catch {
|
|
1080
|
+
}
|
|
1081
|
+
return [
|
|
1082
|
+
{
|
|
1083
|
+
kind: "inject_reminder",
|
|
1084
|
+
severity: "info",
|
|
1085
|
+
message: skillsReminderMessage(installed, installable, modelActivation)
|
|
1086
|
+
}
|
|
1087
|
+
];
|
|
1074
1088
|
}
|
|
1075
1089
|
};
|
|
1076
1090
|
}
|
|
@@ -1206,9 +1220,6 @@ function offerBindingTag(offerTag) {
|
|
|
1206
1220
|
function marketplaceOfferReminder(entry, offerTag) {
|
|
1207
1221
|
return `[Marketplace] This request may need expertise no installed skill covers. The local marketplace has "${entry.name}" (not installed): ${entry.description} First check the installed side with context(scope="skills"); if ${entry.name} is genuinely the right fit and nothing installed serves, ask the operator with ask_user (mode=single_question, header "Install skill") whether to install ${entry.name}, offering exactly these options in this order: "${SKILL_INSTALL_OFFER_OPTION_PROJECT}", "${SKILL_INSTALL_OFFER_OPTION_USER}", "${SKILL_INSTALL_OFFER_OPTION_NOT_NOW}", "${SKILL_INSTALL_OFFER_OPTION_NEVER}". Include the exact tag ${offerBindingTag(offerTag)} verbatim in that question's text so the harness can bind the answer to this offer; the harness acts only on an answer carrying this tag. Then continue the task in the same turn. The harness handles the answer; never install or load a skill yourself. If it is not actually needed, do not mention it.`;
|
|
1208
1222
|
}
|
|
1209
|
-
function marketplaceAutoInstallReminder(entry, result) {
|
|
1210
|
-
return `[Marketplace] Installed skill "${entry.name}" from Clio's own local marketplace (full-auto) to ${result.path}. Source ${result.sourceUrl}, sha256 ${result.installedHash}. ${entry.description} It is installed but not active \u2014 activation stays operator-gated. If it fits this task, suggest /skill ${entry.name} to the operator; never load it yourself.`;
|
|
1211
|
-
}
|
|
1212
1223
|
function answersFromDetails(details) {
|
|
1213
1224
|
const raw = details?.answers;
|
|
1214
1225
|
if (!Array.isArray(raw)) return [];
|
|
@@ -1355,19 +1366,6 @@ function createMarketplaceOfferRegistration(deps) {
|
|
|
1355
1366
|
const match = bestMatch(input.text ?? "");
|
|
1356
1367
|
if (!match) return NO_EFFECTS2;
|
|
1357
1368
|
offeredNames.add(match.entry.name);
|
|
1358
|
-
if (deps.getAutonomy() === "full-auto") {
|
|
1359
|
-
try {
|
|
1360
|
-
const result = installGated(match.entry, "project");
|
|
1361
|
-
return [
|
|
1362
|
-
{
|
|
1363
|
-
kind: "inject_reminder",
|
|
1364
|
-
severity: "info",
|
|
1365
|
-
message: marketplaceAutoInstallReminder(match.entry, result)
|
|
1366
|
-
}
|
|
1367
|
-
];
|
|
1368
|
-
} catch {
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
1369
|
const tag = newOfferTag();
|
|
1372
1370
|
pendingOffer = { entry: match.entry, tag };
|
|
1373
1371
|
return [{ kind: "inject_reminder", severity: "info", message: marketplaceOfferReminder(match.entry, tag) }];
|
|
@@ -1387,6 +1385,10 @@ var MEMORY_INTERVENTION_ACTIVITY_LIMIT = 20;
|
|
|
1387
1385
|
var CALL_DESCRIPTION_MAX_CHARS = 180;
|
|
1388
1386
|
var NO_EFFECTS3 = [];
|
|
1389
1387
|
function createMemoryInterventionRegistration(deps) {
|
|
1388
|
+
let generation = 0;
|
|
1389
|
+
let generationController = new AbortController();
|
|
1390
|
+
let observedSessionId;
|
|
1391
|
+
let disposed = false;
|
|
1390
1392
|
const pending = /* @__PURE__ */ new Map();
|
|
1391
1393
|
const trajectory = [];
|
|
1392
1394
|
const failures = /* @__PURE__ */ new Map();
|
|
@@ -1411,11 +1413,17 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1411
1413
|
let annotatedSinceTurnEnd = false;
|
|
1412
1414
|
let consecutiveLlmTimeouts = 0;
|
|
1413
1415
|
return {
|
|
1416
|
+
reset,
|
|
1417
|
+
dispose() {
|
|
1418
|
+
disposed = true;
|
|
1419
|
+
reset();
|
|
1420
|
+
},
|
|
1414
1421
|
id: MEMORY_INTERVENTION_REGISTRATION_ID,
|
|
1415
1422
|
description: "maintain bounded task execution memory and selectively remind after repeated failures or compaction",
|
|
1416
1423
|
hooks: ["before_tool", "after_tool", "turn_start", "turn_end", "on_compaction"],
|
|
1417
1424
|
evaluate(input) {
|
|
1418
|
-
|
|
1425
|
+
observeSession(input);
|
|
1426
|
+
if (disposed || !settings().enabled) return NO_EFFECTS3;
|
|
1419
1427
|
try {
|
|
1420
1428
|
switch (input.hook) {
|
|
1421
1429
|
case "before_tool":
|
|
@@ -1482,7 +1490,8 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1482
1490
|
* would have been buffered anyway.
|
|
1483
1491
|
*/
|
|
1484
1492
|
async evaluateAsync(input, context) {
|
|
1485
|
-
|
|
1493
|
+
observeSession(input);
|
|
1494
|
+
if (disposed || !settings().enabled || input.hook !== "turn_end" || pendingTriggers.size === 0) return NO_EFFECTS3;
|
|
1486
1495
|
const boundary = input.turnId ?? input.metadata?.userTurnId?.toString() ?? `tool-step:${toolStep}`;
|
|
1487
1496
|
if (boundary === lastPromptedBoundary) return NO_EFFECTS3;
|
|
1488
1497
|
if (deps.deliversDeferredReminders === false) {
|
|
@@ -1512,31 +1521,68 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1512
1521
|
(effect) => effect.kind === "inject_reminder" && effect.message.startsWith("Memory:")
|
|
1513
1522
|
) ?? false);
|
|
1514
1523
|
rulesInjectedSincePromptedStep = false;
|
|
1524
|
+
const stepGeneration = generation;
|
|
1515
1525
|
promptedStepInFlight = true;
|
|
1516
1526
|
outstandingStep = runPromptedStep({
|
|
1517
1527
|
deterministicTrigger: triggers.some((trigger) => trigger !== "interval"),
|
|
1518
1528
|
suppressIntervention: rulesAlreadySpoke,
|
|
1519
1529
|
triggerReasons: triggers
|
|
1520
1530
|
}).then((result) => {
|
|
1531
|
+
if (stepGeneration !== generation || disposed) return;
|
|
1521
1532
|
if (rulesAlreadySpoke && result.decision === "silent") lastDecision = "injected";
|
|
1522
1533
|
if (result.reminder === null) return;
|
|
1523
1534
|
lastInjectedMessage = result.reminder;
|
|
1524
1535
|
deps.onDeferredReminder?.(result.reminder);
|
|
1525
1536
|
}).catch(() => {
|
|
1526
1537
|
}).finally(() => {
|
|
1527
|
-
promptedStepInFlight = false;
|
|
1538
|
+
if (stepGeneration === generation) promptedStepInFlight = false;
|
|
1528
1539
|
});
|
|
1529
1540
|
return NO_EFFECTS3;
|
|
1530
1541
|
},
|
|
1531
1542
|
runPromptedStep,
|
|
1532
1543
|
signalLoop() {
|
|
1533
|
-
if (settings().enabled) pendingTriggers.add("loop_signal");
|
|
1544
|
+
if (!disposed && settings().enabled) pendingTriggers.add("loop_signal");
|
|
1534
1545
|
},
|
|
1535
1546
|
lastDecision: () => lastDecision,
|
|
1536
1547
|
recentActivity: () => [...activity],
|
|
1537
1548
|
stepInFlight: () => promptedStepInFlight,
|
|
1538
1549
|
whenIdle: () => outstandingStep
|
|
1539
1550
|
};
|
|
1551
|
+
function observeSession(input) {
|
|
1552
|
+
if (input.sessionId === void 0) return;
|
|
1553
|
+
if (observedSessionId !== void 0 && observedSessionId !== input.sessionId) reset();
|
|
1554
|
+
observedSessionId = input.sessionId;
|
|
1555
|
+
}
|
|
1556
|
+
function reset() {
|
|
1557
|
+
generation += 1;
|
|
1558
|
+
generationController.abort();
|
|
1559
|
+
generationController = new AbortController();
|
|
1560
|
+
deps.bank.clear();
|
|
1561
|
+
pending.clear();
|
|
1562
|
+
trajectory.length = 0;
|
|
1563
|
+
failures.clear();
|
|
1564
|
+
toolStep = 0;
|
|
1565
|
+
lastTurnEndStep = 0;
|
|
1566
|
+
reactivateAfterCompaction = false;
|
|
1567
|
+
lastInjectedOperationFingerprint = null;
|
|
1568
|
+
currentTask = "(current task unavailable)";
|
|
1569
|
+
toolsSinceMemoryStep = 0;
|
|
1570
|
+
consecutiveErrors = 0;
|
|
1571
|
+
lastPromptedBoundary = null;
|
|
1572
|
+
lastInjectedMessage = null;
|
|
1573
|
+
lastDecision = null;
|
|
1574
|
+
pendingTriggers.clear();
|
|
1575
|
+
activity.length = 0;
|
|
1576
|
+
annotatedThisTurn.clear();
|
|
1577
|
+
telemetryBankSnapshot = deps.bank.snapshot();
|
|
1578
|
+
promptedStepInFlight = false;
|
|
1579
|
+
promptedStepTier = "rules";
|
|
1580
|
+
outstandingStep = Promise.resolve();
|
|
1581
|
+
rulesInjectedSincePromptedStep = false;
|
|
1582
|
+
annotatedSinceTurnEnd = false;
|
|
1583
|
+
consecutiveLlmTimeouts = 0;
|
|
1584
|
+
observedSessionId = void 0;
|
|
1585
|
+
}
|
|
1540
1586
|
function settings() {
|
|
1541
1587
|
const live = deps.getSettings?.();
|
|
1542
1588
|
return {
|
|
@@ -1563,12 +1609,16 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1563
1609
|
effects: NO_EFFECTS3
|
|
1564
1610
|
});
|
|
1565
1611
|
const live = settings();
|
|
1566
|
-
|
|
1612
|
+
const stepGeneration = generation;
|
|
1613
|
+
const isCurrent = () => !disposed && stepGeneration === generation;
|
|
1614
|
+
const usageSink = deps.captureStepUsage?.();
|
|
1615
|
+
if (disposed || !live.enabled) {
|
|
1567
1616
|
const result = silent("no_client");
|
|
1568
1617
|
lastDecision = result.decision;
|
|
1569
1618
|
return result;
|
|
1570
1619
|
}
|
|
1571
1620
|
const started = process.hrtime.bigint();
|
|
1621
|
+
let attemptStarted = started;
|
|
1572
1622
|
const triggers = input.triggerReasons?.length ? input.triggerReasons : ["manual"];
|
|
1573
1623
|
let tier = "rules";
|
|
1574
1624
|
promptedStepTier = tier;
|
|
@@ -1589,7 +1639,13 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1589
1639
|
} else {
|
|
1590
1640
|
tier = "llm";
|
|
1591
1641
|
promptedStepTier = tier;
|
|
1592
|
-
|
|
1642
|
+
const runClient = (selected, timeoutMs) => runTaskMemoryPolicy(deps.bank, selected, {
|
|
1643
|
+
isCurrent,
|
|
1644
|
+
signal: generationController.signal,
|
|
1645
|
+
onStepUsage: (usage) => {
|
|
1646
|
+
if (usageSink) usageSink(usage, isCurrent());
|
|
1647
|
+
else deps.onStepUsage?.(usage);
|
|
1648
|
+
},
|
|
1593
1649
|
task: input.task?.trim() || currentTask,
|
|
1594
1650
|
trajectory: [...trajectory],
|
|
1595
1651
|
deterministicTrigger: input.deterministicTrigger,
|
|
@@ -1597,9 +1653,37 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1597
1653
|
modelMaxTokens: positiveInteger(deps.getModelMaxTokens?.(live.maxTokens), live.maxTokens),
|
|
1598
1654
|
...input.suppressIntervention === void 0 ? {} : { suppressIntervention: input.suppressIntervention },
|
|
1599
1655
|
previousReminder: lastInjectedMessage,
|
|
1600
|
-
timeoutMs
|
|
1656
|
+
timeoutMs,
|
|
1601
1657
|
...deps.onEnvelope === void 0 ? {} : { onEnvelope: deps.onEnvelope }
|
|
1602
1658
|
});
|
|
1659
|
+
const remainingMs = () => Math.floor(live.timeoutMs - Number(process.hrtime.bigint() - started) / 1e6);
|
|
1660
|
+
const initialTimeoutMs = remainingMs();
|
|
1661
|
+
promptedResult = initialTimeoutMs <= 0 ? { ...silent("deadline"), decision: "timeout" } : await runClient(client, initialTimeoutMs);
|
|
1662
|
+
if (promptedResult.reason === "client_error" && isCurrent() && remainingMs() > 0) {
|
|
1663
|
+
let fallback = null;
|
|
1664
|
+
let fallbackReady = false;
|
|
1665
|
+
try {
|
|
1666
|
+
fallback = deps.getFallbackModelClient?.() ?? null;
|
|
1667
|
+
fallbackReady = fallback !== null && deps.backgroundEndpointBusy?.() !== true;
|
|
1668
|
+
} catch {
|
|
1669
|
+
}
|
|
1670
|
+
const fallbackTimeoutMs = remainingMs();
|
|
1671
|
+
if (fallback !== null && fallbackReady && isCurrent() && fallbackTimeoutMs > 0) {
|
|
1672
|
+
emitTelemetry(
|
|
1673
|
+
triggers,
|
|
1674
|
+
tier,
|
|
1675
|
+
promptedResult.decision,
|
|
1676
|
+
promptedResult.reason,
|
|
1677
|
+
0,
|
|
1678
|
+
promptedResult.inputTokens,
|
|
1679
|
+
promptedResult.outputTokens,
|
|
1680
|
+
started,
|
|
1681
|
+
{ bankOperations: promptedResult.bankOperations, droppedOperations: promptedResult.droppedOperations }
|
|
1682
|
+
);
|
|
1683
|
+
attemptStarted = process.hrtime.bigint();
|
|
1684
|
+
promptedResult = await runClient(fallback, fallbackTimeoutMs);
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1603
1687
|
}
|
|
1604
1688
|
}
|
|
1605
1689
|
} catch (error) {
|
|
@@ -1616,15 +1700,11 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1616
1700
|
error: error instanceof Error ? error.message : "resolving the background model client failed"
|
|
1617
1701
|
});
|
|
1618
1702
|
}
|
|
1703
|
+
if (!isCurrent()) return { ...promptedResult, reminder: null, effects: NO_EFFECTS3 };
|
|
1704
|
+
if (promptedResult.reason === "endpoint_busy") telemetryDecision = "dropped";
|
|
1619
1705
|
if (tier === "llm" && promptedResult.decision === "timeout") consecutiveLlmTimeouts += 1;
|
|
1620
1706
|
else if (tier === "llm" && telemetryDecision !== "dropped") consecutiveLlmTimeouts = 0;
|
|
1621
1707
|
lastDecision = promptedResult.decision;
|
|
1622
|
-
if (promptedResult.usage !== null) {
|
|
1623
|
-
try {
|
|
1624
|
-
deps.onStepUsage?.(promptedResult.usage);
|
|
1625
|
-
} catch {
|
|
1626
|
-
}
|
|
1627
|
-
}
|
|
1628
1708
|
if (promptedResult.decision === "injected") reportInjectedEntries(promptedResult.reminder);
|
|
1629
1709
|
emitTelemetry(
|
|
1630
1710
|
triggers,
|
|
@@ -1634,7 +1714,7 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1634
1714
|
citedEntryCount(promptedResult.reminder),
|
|
1635
1715
|
promptedResult.inputTokens,
|
|
1636
1716
|
promptedResult.outputTokens,
|
|
1637
|
-
|
|
1717
|
+
attemptStarted,
|
|
1638
1718
|
{ bankOperations: promptedResult.bankOperations, droppedOperations: promptedResult.droppedOperations }
|
|
1639
1719
|
);
|
|
1640
1720
|
return {
|
|
@@ -3004,4 +3084,4 @@ export {
|
|
|
3004
3084
|
createWatchdogRegistration,
|
|
3005
3085
|
MiddlewareDomainModule
|
|
3006
3086
|
};
|
|
3007
|
-
//# sourceMappingURL=chunk-
|
|
3087
|
+
//# sourceMappingURL=chunk-2UG5F4C5.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
|
compileExecutionPlan
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-E3TPLWFX.js";
|
|
5
5
|
import {
|
|
6
6
|
deriveExecutionRole
|
|
7
7
|
} from "./chunk-H7IXIC72.js";
|
|
@@ -94,4 +94,4 @@ function compileScoutTransition(input) {
|
|
|
94
94
|
export {
|
|
95
95
|
compileScoutTransition
|
|
96
96
|
};
|
|
97
|
-
//# sourceMappingURL=chunk-
|
|
97
|
+
//# sourceMappingURL=chunk-2UH2KFUP.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-RKKLTLYB.js";
|
|
5
5
|
import {
|
|
6
6
|
enabledExtensionResourceRoots
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7DRAWPTZ.js";
|
|
8
8
|
import {
|
|
9
9
|
PATH_BOUNDARY_MAX_ENTRIES,
|
|
10
10
|
normalizePathBoundary,
|
|
@@ -5073,4 +5073,4 @@ export {
|
|
|
5073
5073
|
listFleetContracts,
|
|
5074
5074
|
renderFleetPrompt
|
|
5075
5075
|
};
|
|
5076
|
-
//# sourceMappingURL=chunk-
|
|
5076
|
+
//# sourceMappingURL=chunk-2VIKGWFZ.js.map
|