@iowarp/clio-coder 0.4.6 → 0.4.8
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/.claude-plugin/marketplace.json +283 -0
- package/CHANGELOG.md +79 -0
- package/CONTRIBUTING.md +178 -96
- package/NOTICE +8 -0
- package/README.md +100 -47
- package/dist/acp-JWPQZM2D.js +130 -0
- package/dist/agents-4GCDIRVX.js +149 -0
- package/dist/assets/codewiki.json +1 -1
- package/dist/assets/tui-notices/get-east-asian-width-LICENSE +9 -0
- package/dist/assets/tui-notices/marked-LICENSE +44 -0
- package/dist/assets/tui-notices/pi-tui-LICENSE +21 -0
- package/dist/assets/web-notices/@hono__node-server-LICENSE +21 -0
- package/dist/assets/web-notices/hono-LICENSE +21 -0
- package/dist/auth-SYAKTDQE.js +551 -0
- package/dist/background-OW67WMYR.js +37 -0
- package/dist/builtins-TKS63VNV.js +22 -0
- package/dist/chunk-2JSCCEKO.js +85 -0
- package/dist/chunk-2SXGG2IV.js +391 -0
- package/dist/chunk-2U2U5POA.js +59 -0
- package/dist/chunk-2ZWLMA3T.js +658 -0
- package/dist/chunk-36XSBPXL.js +579 -0
- package/dist/chunk-3IQOZRQ6.js +396 -0
- package/dist/chunk-3XE4NRLF.js +324 -0
- package/dist/chunk-44U2OUSM.js +243 -0
- package/dist/chunk-4P6M2TTE.js +119 -0
- package/dist/chunk-526ABLHD.js +1219 -0
- package/dist/chunk-5C2OQHLR.js +674 -0
- package/dist/chunk-5D2FNBMG.js +185 -0
- package/dist/chunk-5EQO5NWP.js +243 -0
- package/dist/chunk-5HULHKT2.js +32 -0
- package/dist/chunk-5UG6EZI3.js +66 -0
- package/dist/chunk-5W4FRA5Q.js +22283 -0
- package/dist/chunk-6R5MBXBJ.js +386 -0
- package/dist/chunk-6TKOFFGE.js +1058 -0
- package/dist/chunk-6UJ7RDI7.js +1143 -0
- package/dist/chunk-6X7VOCDY.js +44 -0
- package/dist/chunk-7QQRPB2E.js +915 -0
- package/dist/chunk-ARRUMZ7X.js +1377 -0
- package/dist/chunk-ATB3Q7YO.js +663 -0
- package/dist/chunk-AUHVBIDW.js +19 -0
- package/dist/chunk-BE4I3UJ2.js +668 -0
- package/dist/chunk-BFPHMSK7.js +169 -0
- package/dist/chunk-BHJMMCXS.js +466 -0
- package/dist/chunk-BIY22UUK.js +1322 -0
- package/dist/chunk-D55WO5J7.js +110 -0
- package/dist/chunk-DVJL77SO.js +162 -0
- package/dist/chunk-E2NSPYLC.js +814 -0
- package/dist/chunk-EFXMQYI6.js +4484 -0
- package/dist/chunk-EPYATQMG.js +2718 -0
- package/dist/chunk-EXKUF426.js +1801 -0
- package/dist/chunk-F7Y6QTPL.js +689 -0
- package/dist/chunk-FB3KTE2J.js +1710 -0
- package/dist/chunk-FNVPQQYT.js +117 -0
- package/dist/chunk-GEVQNST4.js +101 -0
- package/dist/chunk-GEYX2NZ5.js +697 -0
- package/dist/chunk-GJBJHJNY.js +2120 -0
- package/dist/chunk-GM4TY6VN.js +1233 -0
- package/dist/chunk-GVU4CXPJ.js +5191 -0
- package/dist/chunk-H5DPSUBB.js +637 -0
- package/dist/chunk-H77XBUBM.js +688 -0
- package/dist/chunk-HMGAKB7E.js +380 -0
- package/dist/chunk-HP7KJ5O2.js +797 -0
- package/dist/chunk-HVCAY2FH.js +67 -0
- package/dist/chunk-ICYIUNO4.js +35 -0
- package/dist/chunk-IILXVWJY.js +223 -0
- package/dist/chunk-JCVIL6TY.js +595 -0
- package/dist/chunk-JIMWEYWO.js +63 -0
- package/dist/chunk-JLBVCROW.js +562 -0
- package/dist/chunk-JOBN2YQQ.js +176 -0
- package/dist/chunk-JOL2QRLE.js +152 -0
- package/dist/chunk-JRA6OBHY.js +974 -0
- package/dist/chunk-JV25I7ID.js +1865 -0
- package/dist/chunk-JYKUMHCQ.js +705 -0
- package/dist/chunk-K3W6BF5C.js +283 -0
- package/dist/chunk-K45LHSCI.js +194 -0
- package/dist/chunk-K53E2PTW.js +1289 -0
- package/dist/chunk-K5UJD6MM.js +39 -0
- package/dist/chunk-KGP3UQGJ.js +200 -0
- package/dist/chunk-KKRXONXG.js +43 -0
- package/dist/chunk-KWJXCL2X.js +103 -0
- package/dist/chunk-L75H5B3B.js +446 -0
- package/dist/chunk-LLCGGVSW.js +108 -0
- package/dist/chunk-LZCCBLRC.js +57 -0
- package/dist/chunk-LZDLYSUN.js +197 -0
- package/dist/chunk-MATCRH3M.js +667 -0
- package/dist/chunk-MEHBW2SP.js +132 -0
- package/dist/chunk-MUXNDNMZ.js +659 -0
- package/dist/chunk-MWMW53WW.js +7346 -0
- package/dist/chunk-MZDPF35R.js +45 -0
- package/dist/chunk-MZKYVIWW.js +188 -0
- package/dist/chunk-O2QJDRWP.js +362 -0
- package/dist/chunk-O3HSB2YL.js +693 -0
- package/dist/chunk-OEMFEL26.js +891 -0
- package/dist/chunk-OH3YYA3B.js +15 -0
- package/dist/chunk-OPC4DQD6.js +634 -0
- package/dist/chunk-ORRNGQDV.js +207 -0
- package/dist/chunk-P4JS3MH5.js +165 -0
- package/dist/chunk-P7GTE4FX.js +308 -0
- package/dist/chunk-PAQVETLA.js +962 -0
- package/dist/chunk-PFZJMXIY.js +146 -0
- package/dist/chunk-PGEFOTJB.js +1974 -0
- package/dist/chunk-PJ5H5B7A.js +3151 -0
- package/dist/chunk-PMUUAABD.js +604 -0
- package/dist/chunk-Q32C6AWI.js +236 -0
- package/dist/chunk-QGIC5SX5.js +139 -0
- package/dist/chunk-QLAGXTTV.js +482 -0
- package/dist/chunk-QLKCCC2J.js +573 -0
- package/dist/chunk-QWUSS2QP.js +3630 -0
- package/dist/chunk-QYSAZMSH.js +47 -0
- package/dist/chunk-R5NRX5N4.js +123 -0
- package/dist/chunk-RAUOKUZV.js +1572 -0
- package/dist/chunk-RBES4TCZ.js +302 -0
- package/dist/chunk-RFCKPS2V.js +26 -0
- package/dist/chunk-RFULVPBX.js +318 -0
- package/dist/chunk-RKFNU5UA.js +404 -0
- package/dist/chunk-RM3XJX7P.js +1148 -0
- package/dist/chunk-RNLAPBJL.js +386 -0
- package/dist/chunk-RPMNIFRY.js +65 -0
- package/dist/chunk-RRZFRIJP.js +42 -0
- package/dist/chunk-RXI7K4J5.js +4493 -0
- package/dist/chunk-SER7RRAE.js +4271 -0
- package/dist/chunk-STC6CWUZ.js +402 -0
- package/dist/chunk-TEHVMHOK.js +97 -0
- package/dist/chunk-TOPICHGR.js +33 -0
- package/dist/chunk-U3TPUXOQ.js +2653 -0
- package/dist/chunk-UB33F3YW.js +709 -0
- package/dist/chunk-UDAK6GR2.js +175 -0
- package/dist/chunk-USBBEKHW.js +177 -0
- package/dist/chunk-V4ZKOKRB.js +13433 -0
- package/dist/chunk-W5RM7YAH.js +78 -0
- package/dist/chunk-W7KNI3F5.js +215 -0
- package/dist/chunk-WFTSK7N3.js +637 -0
- package/dist/chunk-WJWNZXRM.js +395 -0
- package/dist/chunk-WLHX3MM5.js +63 -0
- package/dist/chunk-WS4FOGLY.js +686 -0
- package/dist/chunk-WTZVSMQZ.js +52 -0
- package/dist/chunk-WWRV5RJI.js +165 -0
- package/dist/chunk-X6FLVUM5.js +141 -0
- package/dist/chunk-XC5POIL4.js +68 -0
- package/dist/chunk-XTLJDC2X.js +1013 -0
- package/dist/chunk-XW2UZICE.js +372 -0
- package/dist/chunk-Y3JU5RPK.js +8 -0
- package/dist/chunk-YGIV24MF.js +1018 -0
- package/dist/chunk-YJCCMYYT.js +125 -0
- package/dist/chunk-YKIIWURD.js +36 -0
- package/dist/chunk-YQ3GFEUY.js +341 -0
- package/dist/chunk-YXANQGCX.js +179 -0
- package/dist/chunk-YXFKLMX2.js +222 -0
- package/dist/chunk-ZST3FRCV.js +132 -0
- package/dist/cli/index.js +40 -40
- package/dist/clio-BPBAPZGA.js +26 -0
- package/dist/code-nav-KBQ3RIFK.js +686 -0
- package/dist/components-6DKAXWFN.js +674 -0
- package/dist/config-FWL5JK2H.js +270 -0
- package/dist/config-graph-ACDB26L2.js +156 -0
- package/dist/configure-ZIZ4YV62.js +85 -0
- package/dist/context-EZZPT2ZV.js +1074 -0
- package/dist/context-VIL5MFRH.js +282 -0
- package/dist/context-Z3GOBHDK.js +344 -0
- package/dist/context-clear-ZPB3L7MN.js +188 -0
- package/dist/context-index-W6A4V7OC.js +120 -0
- package/dist/context-map-DKL3QT6D.js +555 -0
- package/dist/context-working-set-2GLBVF7L.js +1559 -0
- package/dist/detail-VSBWYSGZ.js +119 -0
- package/dist/dispatch-runner-EEEHGKX4.js +2442 -0
- package/dist/docs-VMMWFVHL.js +101 -0
- package/dist/doctor-V5L4IQGP.js +812 -0
- package/dist/eval-VJYJ2BV3.js +5050 -0
- package/dist/eval-inventory-CX24K2JT.js +260 -0
- package/dist/evals-J2H5V6DD.js +104 -0
- package/dist/evidence-POWAEBEW.js +229 -0
- package/dist/evidence-XCCCLS36.js +242 -0
- package/dist/evidence-Y35YSXH6.js +388 -0
- package/dist/evolve-GPG72VB6.js +613 -0
- package/dist/extensions-YIZ7W3DA.js +308 -0
- package/dist/fleet-2MDCQ2VK.js +264 -0
- package/dist/fleet-W2AF3TOJ.js +919 -0
- package/dist/fleet-commands-WS56G26H.js +75 -0
- package/dist/fleet-decisions-MYGZ3JW7.js +52 -0
- package/dist/fleet-graph-ELTBXBAV.js +136 -0
- package/dist/fleet-inspect-45IK73L4.js +308 -0
- package/dist/fleet-preflight-T5NCZKHE.js +22 -0
- package/dist/fleet-validate-VG4JBLA4.js +91 -0
- package/dist/fleet-verify-VTSABAYO.js +206 -0
- package/dist/fleet-view-XC7WMKSS.js +123 -0
- package/dist/init-VTJNNTIP.js +329 -0
- package/dist/install-6PIF6F6W.js +19 -0
- package/dist/interop-IU6BNA7C.js +246 -0
- package/dist/inventory-QPQUTUUZ.js +123 -0
- package/dist/library-HUTAS57T.js +492 -0
- package/dist/library-LF7DLU6S.js +306 -0
- package/dist/library-Q3NWL5CM.js +75 -0
- package/dist/library-import-PPW4YUC5.js +183 -0
- package/dist/library-inventory-DIRVFRZU.js +56 -0
- package/dist/library-validation-XHUZ3INE.js +42 -0
- package/dist/memory-Z2LSKNV6.js +516 -0
- package/dist/models-3FTREYPY.js +302 -0
- package/dist/monitor-HF2MQRB3.js +781 -0
- package/dist/orchestrator-UYPA6W4S.js +41502 -0
- package/dist/panes-736XB73K.js +74 -0
- package/dist/panes-C4P3PIWT.js +103 -0
- package/dist/paths-JQ4QYIYB.js +67 -0
- package/dist/preload-XSLRYH3Y.js +120 -0
- package/dist/reset-V7QSPZYE.js +345 -0
- package/dist/resources-OJGDFHYT.js +181 -0
- package/dist/run-T354SMDW.js +892 -0
- package/dist/settings-MWZXO6RV.js +72 -0
- package/dist/share-Y5ZKJPND.js +293 -0
- package/dist/skills-4GLZC4LN.js +100 -0
- package/dist/skills-eval-L5T7GODM.js +1074 -0
- package/dist/skills-inventory-LASKXEZI.js +138 -0
- package/dist/slash-commands-OIMRU36D.js +95 -0
- package/dist/steer-KMAM2Y2C.js +77 -0
- package/dist/support-AWC3XKPX.js +38 -0
- package/dist/system-CD75NYBU.js +116 -0
- package/dist/targets-VSZX2J2S.js +1116 -0
- package/dist/tasks-AN567LYH.js +36 -0
- package/dist/terminal-lease-6KTWNHVY.js +418 -0
- package/dist/tools-AGRK3V5J.js +28 -0
- package/dist/trace-P4MQZD33.js +524 -0
- package/dist/tui-primitives-A6MUW32V.js +18 -0
- package/dist/uninstall-BRUTEPIC.js +432 -0
- package/dist/upgrade-SBCGHQGJ.js +307 -0
- package/dist/usage-BIDVTO6V.js +1061 -0
- package/dist/verifiers-LTGCAMXS.js +630 -0
- package/dist/verify-OZU4LLNP.js +30 -0
- package/dist/web/client/THIRD_PARTY_LICENSES.md +1809 -0
- package/dist/web/client/assets/abnfDiagram-VCTEODGH-C5wfoHm3.js +1 -0
- package/dist/web/client/assets/arc-oH91sfLl.js +1 -0
- package/dist/web/client/assets/architecture-7GRP2DOG-EGozsYEO.js +1 -0
- package/dist/web/client/assets/architectureDiagram-5GKGNRK7-z9FokbJl.js +36 -0
- package/dist/web/client/assets/array-BifhSqXX.js +1 -0
- package/dist/web/client/assets/atkinson-hyperlegible-next-latin-ext-wght-normal-C6vrW8VD.woff2 +0 -0
- package/dist/web/client/assets/atkinson-hyperlegible-next-latin-wght-normal-BcXVPD7q.woff2 +0 -0
- package/dist/web/client/assets/blockDiagram-I7D4REHJ-wi0_CYHL.js +129 -0
- package/dist/web/client/assets/c4Diagram-7LVT6UL2-DV7NYc2W.js +38 -0
- package/dist/web/client/assets/channel-CiUWbHN9.js +1 -0
- package/dist/web/client/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dist/web/client/assets/chunk-4HAMMTFA-Bhsegh3F.js +62 -0
- package/dist/web/client/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/dist/web/client/assets/chunk-75Z2AOVW-RQCckcQG.js +2 -0
- package/dist/web/client/assets/chunk-DU6HZSFF-C5USiOAy.js +125 -0
- package/dist/web/client/assets/chunk-F27PBJKO-BcNqv2x1.js +1 -0
- package/dist/web/client/assets/chunk-FOHPRMQF-CoA4358r.js +161 -0
- package/dist/web/client/assets/chunk-GMAD6QVW-Bq8JWiZT.js +72 -0
- package/dist/web/client/assets/chunk-GVQU2GXP-DbchrAeJ.js +1 -0
- package/dist/web/client/assets/chunk-IMKFNOWR-DrpvjocK.js +231 -0
- package/dist/web/client/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dist/web/client/assets/chunk-L3NEJ4N5-DHLmTnCe.js +1 -0
- package/dist/web/client/assets/chunk-OSK3NFVY-CsRbtN9n.js +10 -0
- package/dist/web/client/assets/chunk-P2QGCYS3-aqPbxoMh.js +1 -0
- package/dist/web/client/assets/chunk-POPQ4Y6H-Dl5vw0h0.js +1 -0
- package/dist/web/client/assets/chunk-PWAF6VOD-D7OBRSdO.js +1 -0
- package/dist/web/client/assets/chunk-SHT3W25Y-CdKCIwuB.js +168 -0
- package/dist/web/client/assets/chunk-SVP7TREG-B94Nu_1-.js +88 -0
- package/dist/web/client/assets/chunk-TICWLB2K-jjRQI_hk.js +206 -0
- package/dist/web/client/assets/chunk-XXDRQBXY-azkbKE37.js +1 -0
- package/dist/web/client/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dist/web/client/assets/classDiagram-ZZMXUADV-CMODalmo.js +1 -0
- package/dist/web/client/assets/classDiagram-v2-VYDZK3BY-CMODalmo.js +1 -0
- package/dist/web/client/assets/commit-mono-latin-400-normal-s0S3qwFW.woff +0 -0
- package/dist/web/client/assets/commit-mono-latin-400-normal-wzhe4RuD.woff2 +0 -0
- package/dist/web/client/assets/cose-bilkent-JH36ORCC-RbQL23qS.js +1 -0
- package/dist/web/client/assets/cynefin-OW5HDTMX--i9RDU5f.js +1 -0
- package/dist/web/client/assets/cynefinDiagram-5FMLGOSQ-cRcvyBdp.js +62 -0
- package/dist/web/client/assets/cytoscape.esm-c2aL46s-.js +321 -0
- package/dist/web/client/assets/dagre-C-rnJpZF.js +1 -0
- package/dist/web/client/assets/dagre-GXQ25YYZ-C9mZmAPe.js +4 -0
- package/dist/web/client/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/dist/web/client/assets/diagram-S7CK7UJ4-Oj_zlLDY.js +30 -0
- package/dist/web/client/assets/diagram-UQ7AKVKN-BWKbbfcR.js +41 -0
- package/dist/web/client/assets/diagram-VSXAHHWV-C3N3f7DO.js +3 -0
- package/dist/web/client/assets/diagram-VX7I27RA-CtDKDAWe.js +24 -0
- package/dist/web/client/assets/diagram-Z3DM3KII-B8bkBRCz.js +24 -0
- package/dist/web/client/assets/dist-D0_q-A2b.js +1 -0
- package/dist/web/client/assets/ebnfDiagram-PWID7BFC-CskW-Whx.js +1 -0
- package/dist/web/client/assets/erDiagram-RLTQ6QDP-C-83cgCW.js +99 -0
- package/dist/web/client/assets/eventmodeling-NTZA5JFV-DjVq8wKU.js +1 -0
- package/dist/web/client/assets/flowDiagram-HODETNUW-BUiCBGXt.js +1 -0
- package/dist/web/client/assets/ganttDiagram-EL5Y4UJY-B2lb8lvF.js +292 -0
- package/dist/web/client/assets/gitGraph-4MIJSDKK-B40cQtBE.js +1 -0
- package/dist/web/client/assets/gitGraphDiagram-WWUBYQGX-CH-7P7Di.js +106 -0
- package/dist/web/client/assets/graphlib-DS17s2tU.js +1 -0
- package/dist/web/client/assets/index-Dsi52apB.css +1 -0
- package/dist/web/client/assets/index-FSIC94pi.js +83 -0
- package/dist/web/client/assets/info-A6RAGUB7-eCCE9D_Q.js +1 -0
- package/dist/web/client/assets/infoDiagram-27XIBGKW-DRnvqMjM.js +2 -0
- package/dist/web/client/assets/init-C-OQMol4.js +1 -0
- package/dist/web/client/assets/ishikawaDiagram-5VMMS53U-DBA_55wp.js +70 -0
- package/dist/web/client/assets/journeyDiagram-3NMN7TZE-C-ewpNl7.js +139 -0
- package/dist/web/client/assets/kanban-definition-UXKFOSKX-B1taGsu0.js +89 -0
- package/dist/web/client/assets/katex-ZlcWpGUi.js +257 -0
- package/dist/web/client/assets/line-lZ0kyxDI.js +1 -0
- package/dist/web/client/assets/linear-DIc8FgZj.js +1 -0
- package/dist/web/client/assets/mermaid-parser.core-SXolxpXw.js +7 -0
- package/dist/web/client/assets/mermaid.core-DXgQtkNg.js +44 -0
- package/dist/web/client/assets/mindmap-definition-YA3MSWOX-DXJas9K7.js +96 -0
- package/dist/web/client/assets/newsreader-latin-ext-wght-normal-C-3rgBeH.woff2 +0 -0
- package/dist/web/client/assets/newsreader-latin-wght-normal-CCVVNp6i.woff2 +0 -0
- package/dist/web/client/assets/newsreader-vietnamese-wght-normal-Czsa-EzN.woff2 +0 -0
- package/dist/web/client/assets/ordinal-BDEzSJ7C.js +1 -0
- package/dist/web/client/assets/packet-AYTQ26CC-OqVl_07o.js +1 -0
- package/dist/web/client/assets/path-fybaL0A-.js +1 -0
- package/dist/web/client/assets/pegDiagram-XKGWAZYB-CPE_zdfN.js +1 -0
- package/dist/web/client/assets/pie-WAS4IAKB-DAxnMBLe.js +1 -0
- package/dist/web/client/assets/pieDiagram-E7YTZNPT-Uwjpufxv.js +39 -0
- package/dist/web/client/assets/prism-bash-D6zCJ74D.js +1 -0
- package/dist/web/client/assets/prism-c-04YixN25.js +1 -0
- package/dist/web/client/assets/prism-clike-DapgWyxx.js +1 -0
- package/dist/web/client/assets/prism-core-BngLtbUd.js +1 -0
- package/dist/web/client/assets/prism-cpp-C-lJbC-6.js +1 -0
- package/dist/web/client/assets/prism-css-CPgOzxXp.js +1 -0
- package/dist/web/client/assets/prism-diff-BF8m0_mq.js +3 -0
- package/dist/web/client/assets/prism-docker-DkT6yOFj.js +1 -0
- package/dist/web/client/assets/prism-fortran-Be5x3y1V.js +1 -0
- package/dist/web/client/assets/prism-go-C_8qAH5n.js +1 -0
- package/dist/web/client/assets/prism-ini-BESK3y0r.js +1 -0
- package/dist/web/client/assets/prism-javascript-BnO-swvr.js +1 -0
- package/dist/web/client/assets/prism-json-Dp_-W-Hv.js +1 -0
- package/dist/web/client/assets/prism-jsx-D-D0NWtC.js +1 -0
- package/dist/web/client/assets/prism-julia-DIjOgiAV.js +1 -0
- package/dist/web/client/assets/prism-latex-DNMbqcH_.js +1 -0
- package/dist/web/client/assets/prism-makefile-CRKWLQ8l.js +1 -0
- package/dist/web/client/assets/prism-markdown-C0FPJ1Iz.js +1 -0
- package/dist/web/client/assets/prism-markup-Cp04rIa1.js +1 -0
- package/dist/web/client/assets/prism-matlab-D-nk08al.js +1 -0
- package/dist/web/client/assets/prism-python-CfiSVtM6.js +1 -0
- package/dist/web/client/assets/prism-r-QmNGR8LX.js +1 -0
- package/dist/web/client/assets/prism-rust-Bu9N8X3N.js +1 -0
- package/dist/web/client/assets/prism-shell-session-Be4UuYoM.js +1 -0
- package/dist/web/client/assets/prism-sql-CYhVDMEE.js +1 -0
- package/dist/web/client/assets/prism-toml-DKb54GAT.js +1 -0
- package/dist/web/client/assets/prism-tsx-p6J2Kc_4.js +1 -0
- package/dist/web/client/assets/prism-typescript-BMqONzxf.js +1 -0
- package/dist/web/client/assets/prism-yaml-C0JHu8gr.js +1 -0
- package/dist/web/client/assets/purify.es-ChwZkWde.js +3 -0
- package/dist/web/client/assets/quadrantDiagram-AXDQQJYC-Bjs4yjgs.js +7 -0
- package/dist/web/client/assets/radar-RG4KPBEZ-CuCKjHM3.js +1 -0
- package/dist/web/client/assets/railroad-74A4TZTK-CnQK-Cc1.js +1 -0
- package/dist/web/client/assets/railroad-abnf-HS5TGJTU-BcW01NZG.js +1 -0
- package/dist/web/client/assets/railroad-ebnf-LZEXJU2U-B7YCEDDd.js +1 -0
- package/dist/web/client/assets/railroad-peg-WCYAUIDC-DjNZbSTZ.js +1 -0
- package/dist/web/client/assets/railroadDiagram-O6MQD6OU-BDDIPNLL.js +1 -0
- package/dist/web/client/assets/requirementDiagram-BXWQKSXE-B5Ydyxc1.js +84 -0
- package/dist/web/client/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/dist/web/client/assets/sankeyDiagram-P5KCCOFB-Bw2Qym75.js +40 -0
- package/dist/web/client/assets/sequenceDiagram-WJ2MYXX4-BZf36nO0.js +162 -0
- package/dist/web/client/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
- package/dist/web/client/assets/src-yeptRXpt.js +1 -0
- package/dist/web/client/assets/stateDiagram-D77RDMKH-DnH6JRkp.js +1 -0
- package/dist/web/client/assets/stateDiagram-v2-MP3YSRHH-C7QtHeK4.js +1 -0
- package/dist/web/client/assets/swimlanes-42K2YHIH-D9PZmtZg.js +1 -0
- package/dist/web/client/assets/swimlanesDiagram-VR7AAH4N-CBZlPFky.js +8 -0
- package/dist/web/client/assets/timeline-definition-24CTP7MA-CrkZZBo7.js +120 -0
- package/dist/web/client/assets/treeView-Q6P3EWNA-C9zDShoC.js +1 -0
- package/dist/web/client/assets/treemap-WGGIJYW6-B-plj9yK.js +1 -0
- package/dist/web/client/assets/vennDiagram-4TSXK5OY-VeOdaphN.js +34 -0
- package/dist/web/client/assets/wardley-WFR3VGLG-Wl1P_m6L.js +1 -0
- package/dist/web/client/assets/wardleyDiagram-VM6X3IG4-B85-R9t2.js +78 -0
- package/dist/web/client/assets/xychartDiagram-S5SC5T6Z-BrD8OW8m.js +7 -0
- package/dist/web/client/clio-coder-logo.webp +0 -0
- package/dist/web/client/icon-192.png +0 -0
- package/dist/web/client/icon-512.png +0 -0
- package/dist/web/client/index.html +4 -0
- package/dist/web/client/manifest.webmanifest +15 -0
- package/dist/web/client/offline.css +55 -0
- package/dist/web/client/offline.html +5 -0
- package/dist/web/client/offline.js +27 -0
- package/dist/web/client/sw.js +34 -0
- package/dist/web/ops-worker.js +37 -0
- package/dist/web/reads-worker.js +1726 -0
- package/dist/web/server.js +8499 -0
- package/dist/web-EU6ATJWA.js +13 -0
- package/dist/web-fetch-U22Q7HV4.js +788 -0
- package/dist/wiki-generate-LZRLFG6I.js +623 -0
- package/dist/with-panes-X5CZOGML.js +628 -0
- package/dist/worker/entry.js +300 -93
- package/docs/README.md +58 -14
- package/docs/architecture/acp.md +5 -9
- package/docs/architecture/alcf-provider.md +0 -3
- package/docs/architecture/architecture.md +8 -10
- package/docs/architecture/artifact-placement.md +0 -3
- package/docs/architecture/artifact-versions.md +3 -6
- package/docs/architecture/capacity-and-scheduling.md +0 -3
- package/docs/architecture/context-engine.md +35 -4
- package/docs/architecture/context-working-set.md +0 -3
- package/docs/architecture/dispatch-architecture-rationale.md +0 -3
- package/docs/architecture/dispatch-typed-intent.md +0 -3
- package/docs/architecture/evidence-and-memory.md +0 -3
- package/docs/architecture/library.md +30 -0
- package/docs/architecture/middleware-and-components.md +1 -4
- package/docs/architecture/model-catalog.md +21 -4
- package/docs/architecture/observability.md +0 -3
- package/docs/architecture/pi-boundary.md +23 -8
- package/docs/architecture/prompt-envelope-and-tools.md +6 -9
- package/docs/architecture/provider-adapter-cookbook.md +1 -4
- package/docs/architecture/safety-model.md +21 -5
- package/docs/architecture/session-lifecycle.md +12 -4
- package/docs/architecture/time-conventions.md +0 -3
- package/docs/architecture/trace-store.md +28 -20
- package/docs/architecture/tui-design.md +108 -12
- package/docs/architecture/worker-context.md +104 -0
- package/docs/architecture/worker-dispatch-mechanics.md +1 -4
- package/docs/guide/authoring-plugins.md +158 -0
- package/docs/guide/built-in-agents.md +5 -8
- package/docs/guide/commands-and-modes.md +162 -61
- package/docs/guide/configuration-and-targets.md +198 -5
- package/docs/guide/configuration-reference.md +36 -38
- package/docs/guide/environment-variables.md +2 -5
- package/docs/guide/exit-codes-and-output.md +1 -4
- package/docs/guide/extensions-and-sharing.md +92 -55
- package/docs/guide/fleet-dispatch.md +31 -7
- package/docs/guide/glossary.md +1 -4
- package/docs/guide/harness-extensions.md +289 -0
- package/docs/guide/installation-and-lifecycle.md +10 -13
- package/docs/guide/interop.md +241 -0
- package/docs/guide/panes-and-files.md +3 -6
- package/docs/guide/plugins.md +77 -0
- package/docs/guide/proactive-memory.md +0 -3
- package/docs/guide/resource-library.md +109 -45
- package/docs/guide/skills-marketplace.md +34 -73
- package/docs/guide/tool-usage.md +19 -10
- package/docs/guide/troubleshooting.md +1 -4
- package/docs/history/config-knobs-audit.md +0 -3
- package/docs/history/release-cut-checklist.md +0 -3
- package/docs/process/development-pipeline.md +14 -17
- package/docs/process/documentation-coverage.md +31 -4
- package/docs/process/documentation-guide.md +28 -27
- package/docs/process/eval-runner.md +8 -6
- package/docs/process/evals-internal.md +0 -3
- package/docs/process/evolution.md +0 -3
- package/docs/process/fleet-demo-runbook.md +0 -3
- package/docs/process/git-commit-provenance.md +0 -3
- package/docs/process/performance-methodology.md +2 -5
- package/docs/process/release-cut-checklist.md +114 -217
- package/docs/process/scientific-validation.md +23 -3
- package/evals/scalar-decision-machinery.ts +1 -1
- package/examples/extensions/README.md +67 -0
- package/examples/extensions/lab-status/clio-coder-extension.json +14 -0
- package/examples/extensions/lab-status/extension.mjs +68 -0
- package/examples/extensions/lab-status/jobs.synthetic.json +9 -0
- package/examples/extensions/measurements/clio-coder-extension.json +28 -0
- package/examples/extensions/measurements/summarize.cjs +23 -0
- package/library/README.md +109 -0
- package/library/_authoring/templates/agent/README.md +28 -0
- package/library/_authoring/templates/agent/agents/benchmark-scout.md +30 -0
- package/library/_authoring/templates/agent/plugin.json +23 -0
- package/library/_authoring/templates/fleet/README.md +29 -0
- package/library/_authoring/templates/fleet/fleets/pipeline-review.md +31 -0
- package/library/_authoring/templates/fleet/plugin.json +23 -0
- package/library/_authoring/templates/plugin/README.md +37 -0
- package/library/_authoring/templates/plugin/agents/data-curator.md +31 -0
- package/library/_authoring/templates/plugin/assets/curation-guide.md +22 -0
- package/library/_authoring/templates/plugin/plugin.json +42 -0
- package/library/_authoring/templates/plugin/prompts/inspect-dataset.md +15 -0
- package/library/_authoring/templates/plugin/skills/dataset-curation/SKILL.md +36 -0
- package/library/_authoring/templates/plugin/skills/dataset-curation/evals.md +17 -0
- package/library/_authoring/templates/prompt/README.md +28 -0
- package/library/_authoring/templates/prompt/plugin.json +23 -0
- package/library/_authoring/templates/prompt/prompts/paper-summary.md +26 -0
- package/library/_authoring/templates/skill/README.md +24 -0
- package/library/_authoring/templates/skill/SKILL.md +39 -0
- package/library/_authoring/templates/skill/evals.md +30 -0
- package/library/_authoring/templates/skill/plugin.json +23 -0
- package/library/agents/README.md +7 -0
- package/library/fleets/README.md +7 -0
- package/library/plugins/materio/README.md +137 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-lab-definer.md +208 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-literature-reviewer.md +308 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-research-explorer.md +249 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-task-executor.md +416 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-task-verifier.md +60 -0
- package/library/plugins/materio/ai.iowarp.clio/agents/materio-workflow-planner.md +238 -0
- package/library/plugins/materio/ai.iowarp.clio/fleets/materio-execute-task.md +50 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/add-task.md +66 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/archive-task.md +65 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/checkpoint.md +26 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/define-research-tasks.md +230 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/define-virtual-lab.md +181 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/execute-task.md +292 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/help.md +129 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/identify-research.md +206 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/literature-review.md +201 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/pause-research.md +12 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/progress.md +105 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/remove-task.md +63 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/resume-research.md +64 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/settings.md +16 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/status.md +92 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/upload-data.md +104 -0
- package/library/plugins/materio/ai.iowarp.clio/prompts/materio/wtfp.md +145 -0
- package/library/plugins/materio/ai.iowarp.clio/references/execution.md +56 -0
- package/library/plugins/materio/ai.iowarp.portability/provenance.json +9 -0
- package/library/plugins/materio/assets/actions/add-task.md +86 -0
- package/library/plugins/materio/assets/actions/archive-task.md +84 -0
- package/library/plugins/materio/assets/actions/checkpoint.md +47 -0
- package/library/plugins/materio/assets/actions/define-research-tasks.md +228 -0
- package/library/plugins/materio/assets/actions/define-virtual-lab.md +179 -0
- package/library/plugins/materio/assets/actions/execute-task.md +290 -0
- package/library/plugins/materio/assets/actions/help.md +140 -0
- package/library/plugins/materio/assets/actions/identify-research.md +204 -0
- package/library/plugins/materio/assets/actions/literature-review.md +199 -0
- package/library/plugins/materio/assets/actions/pause-research.md +34 -0
- package/library/plugins/materio/assets/actions/progress.md +125 -0
- package/library/plugins/materio/assets/actions/remove-task.md +82 -0
- package/library/plugins/materio/assets/actions/resume-research.md +84 -0
- package/library/plugins/materio/assets/actions/settings.md +38 -0
- package/library/plugins/materio/assets/actions/status.md +112 -0
- package/library/plugins/materio/assets/actions/upload-data.md +123 -0
- package/library/plugins/materio/assets/actions/wtfp.md +179 -0
- package/library/plugins/materio/assets/references/research-domains.md +134 -0
- package/library/plugins/materio/assets/references/research-policy.md +77 -0
- package/library/plugins/materio/assets/references/traditional-workflows.md +146 -0
- package/library/plugins/materio/assets/scripts/check_physics.py +271 -0
- package/library/plugins/materio/assets/scripts/check_scripts.py +248 -0
- package/library/plugins/materio/assets/scripts/project_plugin.py +165 -0
- package/library/plugins/materio/assets/scripts/research_state.py +400 -0
- package/library/plugins/materio/assets/scripts/verify_citations.py +616 -0
- package/library/plugins/materio/assets/templates/RESEARCH.md +39 -0
- package/library/plugins/materio/assets/templates/VIRTUAL-LAB.md +120 -0
- package/library/plugins/materio/assets/templates/WORKFLOW.md +42 -0
- package/library/plugins/materio/assets/templates/config.json +5 -0
- package/library/plugins/materio/evals/scripts.yaml +29 -0
- package/library/plugins/materio/plugin.json +530 -0
- package/library/plugins/materio/skills/materio-lab-definer/SKILL.md +74 -0
- package/library/plugins/materio/skills/materio-literature-reviewer/SKILL.md +64 -0
- package/library/plugins/materio/skills/materio-research-explorer/SKILL.md +74 -0
- package/library/plugins/materio/skills/materio-task-executor/SKILL.md +214 -0
- package/library/plugins/materio/skills/materio-task-verifier/SKILL.md +46 -0
- package/library/plugins/materio/skills/materio-workflow-planner/SKILL.md +79 -0
- package/library/plugins/materio/tests/test_check_physics.py +139 -0
- package/library/plugins/materio/tests/test_check_scripts.py +140 -0
- package/library/plugins/materio/tests/test_research_state.py +291 -0
- package/library/plugins/materio/tests/test_verify_citations.py +337 -0
- package/library/prompts/README.md +7 -0
- package/library/registry.yaml +921 -0
- package/library/skills/README.md +120 -0
- package/library/skills/coding/ast-grep/SKILL.md +213 -0
- package/library/skills/coding/ast-grep/evals.md +82 -0
- package/library/skills/coding/ast-grep/plugin.json +23 -0
- package/library/skills/coding/coding-standards/SKILL.md +164 -0
- package/library/skills/coding/coding-standards/evals.md +57 -0
- package/library/skills/coding/coding-standards/plugin.json +23 -0
- package/library/skills/coding/prototype/SKILL.md +151 -0
- package/library/skills/coding/prototype/evals.md +61 -0
- package/library/skills/coding/prototype/plugin.json +23 -0
- package/library/skills/coding/tdd/SKILL.md +134 -0
- package/library/skills/coding/tdd/evals.md +61 -0
- package/library/skills/coding/tdd/plugin.json +23 -0
- package/library/skills/context/context-handoff/SKILL.md +176 -0
- package/library/skills/context/context-handoff/evals.md +101 -0
- package/library/skills/context/context-handoff/plugin.json +23 -0
- package/library/skills/context/context-prime/SKILL.md +131 -0
- package/library/skills/context/context-prime/evals.md +99 -0
- package/library/skills/context/context-prime/plugin.json +23 -0
- package/library/skills/git/branch-closeout/SKILL.md +132 -0
- package/library/skills/git/branch-closeout/plugin.json +23 -0
- package/library/skills/git/file-ticket/SKILL.md +126 -0
- package/library/skills/git/file-ticket/plugin.json +23 -0
- package/library/skills/git/fix-issue/SKILL.md +136 -0
- package/library/skills/git/fix-issue/plugin.json +23 -0
- package/library/skills/git/resolve-merge-conflicts/SKILL.md +151 -0
- package/library/skills/git/resolve-merge-conflicts/evals.md +85 -0
- package/library/skills/git/resolve-merge-conflicts/plugin.json +23 -0
- package/library/skills/git/ship/SKILL.md +134 -0
- package/library/skills/git/ship/plugin.json +23 -0
- package/library/skills/git/worktree-create/SKILL.md +127 -0
- package/library/skills/git/worktree-create/plugin.json +23 -0
- package/library/skills/git/worktree-merge/SKILL.md +147 -0
- package/library/skills/git/worktree-merge/plugin.json +23 -0
- package/library/skills/meta/clio-coder-dev/SKILL.md +101 -0
- package/library/skills/meta/clio-coder-dev/evals.md +46 -0
- package/library/skills/meta/clio-coder-dev/plugin.json +23 -0
- package/library/skills/meta/clio-coder-test/SKILL.md +156 -0
- package/library/skills/meta/clio-coder-test/evals.md +62 -0
- package/library/skills/meta/clio-coder-test/plugin.json +23 -0
- package/library/skills/meta/clio-coder-test/references/test-map.md +97 -0
- package/library/skills/meta/credentials/SKILL.md +132 -0
- package/library/skills/meta/credentials/evals.md +104 -0
- package/library/skills/meta/credentials/plugin.json +23 -0
- package/library/skills/meta/find-skills/SKILL.md +85 -0
- package/library/skills/meta/find-skills/evals.md +65 -0
- package/library/skills/meta/find-skills/plugin.json +23 -0
- package/library/skills/meta/herdr/SKILL.md +133 -0
- package/library/skills/meta/herdr/evals.md +38 -0
- package/library/skills/meta/herdr/plugin.json +23 -0
- package/library/skills/meta/skill-craft/SKILL.md +139 -0
- package/library/skills/meta/skill-craft/evals.md +49 -0
- package/library/skills/meta/skill-craft/plugin.json +23 -0
- package/library/skills/planning/archify/SKILL.md +196 -0
- package/library/skills/planning/archify/plugin.json +23 -0
- package/library/skills/planning/architecture/SKILL.md +184 -0
- package/library/skills/planning/architecture/evals.md +101 -0
- package/library/skills/planning/architecture/plugin.json +23 -0
- package/library/skills/planning/backlog/SKILL.md +212 -0
- package/library/skills/planning/backlog/evals.md +185 -0
- package/library/skills/planning/backlog/plugin.json +23 -0
- package/library/skills/planning/prd/SKILL.md +129 -0
- package/library/skills/planning/prd/evals.md +103 -0
- package/library/skills/planning/prd/plugin.json +23 -0
- package/library/skills/planning/product-intent/SKILL.md +173 -0
- package/library/skills/planning/product-intent/evals.md +106 -0
- package/library/skills/planning/product-intent/plugin.json +23 -0
- package/library/skills/planning/tech-spec/SKILL.md +172 -0
- package/library/skills/planning/tech-spec/evals.md +120 -0
- package/library/skills/planning/tech-spec/plugin.json +23 -0
- package/library/skills/registry.yaml +144 -0
- package/library/skills/remote.yaml +13 -0
- package/library/skills/research/arxiv-literature/SKILL.md +168 -0
- package/library/skills/research/arxiv-literature/evals.md +108 -0
- package/library/skills/research/arxiv-literature/plugin.json +23 -0
- package/library/skills/research/experiment-protocol/SKILL.md +148 -0
- package/library/skills/research/experiment-protocol/evals.md +114 -0
- package/library/skills/research/experiment-protocol/plugin.json +23 -0
- package/library/skills/research/scientific-debugging/SKILL.md +149 -0
- package/library/skills/research/scientific-debugging/evals.md +156 -0
- package/library/skills/research/scientific-debugging/plugin.json +23 -0
- package/library/skills/research/scientific-modernization/SKILL.md +170 -0
- package/library/skills/research/scientific-modernization/evals.md +111 -0
- package/library/skills/research/scientific-modernization/plugin.json +23 -0
- package/library/skills/skill-marketplace.json +507 -0
- package/library/skills/workflow/cut-it/SKILL.md +153 -0
- package/library/skills/workflow/cut-it/evals.md +143 -0
- package/library/skills/workflow/cut-it/plugin.json +23 -0
- package/library/skills/workflow/design-council/SKILL.md +233 -0
- package/library/skills/workflow/design-council/evals.md +258 -0
- package/library/skills/workflow/design-council/plugin.json +23 -0
- package/library/skills/workflow/grill-me/SKILL.md +267 -0
- package/library/skills/workflow/grill-me/evals.md +231 -0
- package/library/skills/workflow/grill-me/plugin.json +23 -0
- package/library/skills/workflow/workflow-distiller/SKILL.md +204 -0
- package/library/skills/workflow/workflow-distiller/evals.md +233 -0
- package/library/skills/workflow/workflow-distiller/plugin.json +23 -0
- package/package.json +23 -14
- package/src/cli/agents.ts +1 -1
- package/src/cli/config-inspect.ts +1 -1
- package/src/cli/configure.ts +2 -2
- package/src/cli/docs.ts +65 -328
- package/src/cli/eval.ts +40 -6
- package/src/cli/extensions.ts +74 -8
- package/src/cli/fleet-preflight.ts +2 -0
- package/src/cli/fleet.ts +2 -0
- package/src/cli/index.ts +4 -4
- package/src/cli/interop-inspect.ts +61 -33
- package/src/cli/interop.ts +79 -9
- package/src/cli/library-import.ts +139 -0
- package/src/cli/library.ts +418 -120
- package/src/cli/run.ts +26 -9
- package/src/cli/skills-eval.ts +43 -6
- package/src/cli/skills-inventory.ts +6 -2
- package/src/cli/skills.ts +44 -491
- package/src/cli/trace.ts +4 -65
- package/src/cli/uninstall.ts +26 -0
- package/src/cli/usage.ts +3 -0
- package/src/cli/web.ts +79 -0
- package/src/core/bus-events.ts +8 -4
- package/src/core/config.ts +71 -0
- package/src/core/defaults.ts +1 -1
- package/src/core/domain-loader.ts +37 -28
- package/src/core/recent-models.ts +2 -2
- package/src/core/session-routing.ts +3 -3
- package/src/core/state-file-lock.ts +1 -1
- package/src/core/termination.ts +13 -9
- package/src/core/tool-names.ts +5 -0
- package/src/domains/agents/contract.ts +1 -1
- package/src/domains/agents/extension.ts +53 -9
- package/src/domains/agents/fleet-commands.ts +92 -1
- package/src/domains/agents/fleet-contract.ts +87 -19
- package/src/domains/agents/recipe.ts +5 -4
- package/src/domains/agents/registry.ts +80 -24
- package/src/domains/config/extension.ts +5 -4
- package/src/domains/config/keybindings.ts +155 -95
- package/src/domains/context/worker/contract.ts +91 -0
- package/src/domains/context/worker/pressure.ts +120 -0
- package/src/domains/context/worker/recall.ts +62 -0
- package/src/domains/context/worker/select.ts +164 -0
- package/src/domains/context/worker/snapshot.ts +35 -0
- package/src/domains/context/worker/store.ts +16 -0
- package/src/domains/context/working-set/replay/synthetic.ts +2 -1
- package/src/domains/dispatch/active-route-planner.ts +2 -0
- package/src/domains/dispatch/backoff.ts +1 -0
- package/src/domains/dispatch/code-step.ts +12 -2
- package/src/domains/dispatch/contract.ts +3 -0
- package/src/domains/dispatch/execution-plan.ts +2 -0
- package/src/domains/dispatch/extension.ts +184 -39
- package/src/domains/dispatch/fleet-plan.ts +10 -0
- package/src/domains/dispatch/fleet-run.ts +1 -0
- package/src/domains/dispatch/index.ts +1 -0
- package/src/domains/dispatch/orphan-recovery.ts +2 -0
- package/src/domains/dispatch/receipt-integrity.ts +7 -0
- package/src/domains/dispatch/state.ts +2 -2
- package/src/domains/dispatch/types.ts +7 -0
- package/src/domains/dispatch/validation.ts +12 -0
- package/src/domains/dispatch/workspace-checkpoint.ts +1 -1
- package/src/domains/eval/metrics/tracked.ts +22 -2
- package/src/domains/evidence/failure-attribution.ts +1 -0
- package/src/domains/evidence/trust-status.ts +22 -3
- package/src/domains/extensions/command-schema.ts +145 -0
- package/src/domains/extensions/command-tools.ts +15 -0
- package/src/domains/extensions/compatibility.ts +7 -0
- package/src/domains/extensions/contract.ts +0 -4
- package/src/domains/extensions/discovery.ts +69 -205
- package/src/domains/extensions/extension.ts +0 -4
- package/src/domains/extensions/index.ts +1 -5
- package/src/domains/extensions/manager.ts +1 -6
- package/src/domains/extensions/operator-commands.ts +29 -0
- package/src/domains/extensions/operator-runtime.ts +485 -0
- package/src/domains/extensions/public-api.ts +53 -0
- package/src/domains/extensions/runtime-child.mjs +114 -0
- package/src/domains/extensions/runtime-process.ts +306 -0
- package/src/domains/extensions/runtime-schema.ts +146 -0
- package/src/domains/extensions/snapshot-access.ts +21 -0
- package/src/domains/extensions/snapshot.ts +4 -32
- package/src/domains/extensions/state.ts +5 -83
- package/src/domains/extensions/types.ts +33 -34
- package/src/domains/interop/adopt.ts +546 -0
- package/src/domains/interop/detect.ts +50 -12
- package/src/domains/interop/foreign.ts +554 -0
- package/src/domains/interop/import.ts +277 -0
- package/src/domains/interop/index.ts +24 -0
- package/src/domains/interop/install.ts +6 -0
- package/src/domains/interop/inventory.ts +351 -0
- package/src/domains/interop/projection.ts +360 -0
- package/src/domains/interop/registry.ts +106 -3
- package/src/domains/interop/types.ts +51 -0
- package/src/domains/lifecycle/migrations/index.ts +0 -2
- package/src/domains/lifecycle/naming-resources.ts +1 -1
- package/src/domains/middleware/hooks.ts +2 -2
- package/src/domains/middleware/marketplace-offer.ts +1 -1
- package/src/domains/mux/contract.ts +1 -1
- package/src/domains/observability/background-memory-usage.ts +3 -0
- package/src/domains/observability/compaction-usage.ts +2 -0
- package/src/domains/observability/cost.ts +5 -0
- package/src/domains/observability/extension.ts +1 -0
- package/src/domains/observability/out-of-turn-usage.ts +2 -0
- package/src/domains/observability/trace-store.ts +65 -5
- package/src/domains/plugins/catalog.ts +204 -0
- package/src/domains/plugins/contract.ts +24 -0
- package/src/domains/plugins/discovery.ts +316 -0
- package/src/domains/plugins/extension.ts +40 -0
- package/src/domains/plugins/index.ts +77 -0
- package/src/domains/plugins/integrity.ts +6 -0
- package/src/domains/plugins/manifest.ts +3 -0
- package/src/domains/plugins/resources.ts +102 -0
- package/src/domains/plugins/state.ts +753 -0
- package/src/domains/plugins/types.ts +217 -0
- package/src/domains/prompts/extension.ts +4 -10
- package/src/domains/prompts/fragments/operating/skills.md +10 -10
- package/src/domains/providers/cache-deployment.ts +147 -0
- package/src/domains/providers/catalog.ts +12 -7
- package/src/domains/providers/extension.ts +27 -5
- package/src/domains/providers/index.ts +1 -0
- package/src/domains/providers/plugins.ts +3 -13
- package/src/domains/providers/runtimes/common/local-synth.ts +4 -0
- package/src/domains/providers/types/target-descriptor.ts +17 -0
- package/src/domains/resources/common-loader.ts +9 -6
- package/src/domains/resources/index.ts +67 -0
- package/src/domains/resources/library-actions.ts +836 -0
- package/src/domains/resources/library-evals.ts +38 -0
- package/src/domains/resources/library-inventory.ts +1048 -0
- package/src/domains/resources/library-types.ts +50 -0
- package/src/domains/resources/library-validation.ts +634 -0
- package/src/domains/resources/library.ts +437 -156
- package/src/domains/resources/package-references.ts +66 -0
- package/src/domains/resources/prompts/loader.ts +75 -41
- package/src/domains/resources/skills/install.ts +2 -2
- package/src/domains/resources/skills/loader.ts +77 -22
- package/src/domains/resources/skills/marketplace.ts +48 -57
- package/src/domains/resources/skills/promotion.ts +2 -2
- package/src/domains/resources/skills/provenance-pin.ts +17 -4
- package/src/domains/safety/action-classifier.ts +2 -2
- package/src/domains/safety/default-path-policy.ts +3 -1
- package/src/domains/safety/policy-engine.ts +1 -1
- package/src/domains/safety/protected-artifacts.ts +21 -5
- package/src/domains/safety/skill-authority.ts +5 -2
- package/src/domains/session/compaction/compact.ts +4 -1
- package/src/domains/session/entries.ts +1 -0
- package/src/domains/session/usage.ts +6 -7
- package/src/domains/share/archive.ts +1 -1
- package/src/engine/acp/server.ts +11 -0
- package/src/engine/ai.ts +2 -0
- package/src/engine/apis/openai-completions.ts +61 -6
- package/src/engine/notices/pi-tui-LICENSE +21 -0
- package/src/engine/prewarm.ts +232 -0
- package/src/engine/provider-diagnostics.ts +6 -1
- package/src/engine/tui.ts +3 -0
- package/src/engine/worker-runtime.ts +58 -14
- package/src/engine/worker-tools.ts +5 -0
- package/src/entry/orchestrator.ts +46 -21
- package/src/entry/plugin-reload.ts +18 -0
- package/src/interactive/application-controller.ts +67 -21
- package/src/interactive/chat-loop-messages.ts +3 -0
- package/src/interactive/chat-loop.ts +32 -11
- package/src/interactive/chat-panel.ts +5 -1
- package/src/interactive/clio-editor.ts +53 -21
- package/src/interactive/command-output.ts +56 -1
- package/src/interactive/editor-submit.ts +65 -28
- package/src/interactive/fleet-run-preview.ts +2 -0
- package/src/interactive/follow-up-queue-panel.ts +3 -3
- package/src/interactive/footer/dashboard.ts +4 -1
- package/src/interactive/footer/notifications.ts +2 -2
- package/src/interactive/footer/widgets.ts +2 -2
- package/src/interactive/interactive-application.ts +209 -21
- package/src/interactive/interactive-input-runtime.ts +254 -7
- package/src/interactive/interactive-presentation.ts +41 -12
- package/src/interactive/interactive-slash-runtime.ts +37 -8
- package/src/interactive/keybinding-manager.ts +156 -79
- package/src/interactive/keyboard-owner.ts +37 -0
- package/src/interactive/leader-key.ts +49 -102
- package/src/interactive/leader-menu.ts +45 -0
- package/src/interactive/overlay-ask-user-lifecycle.ts +9 -1
- package/src/interactive/overlay-frame.ts +15 -0
- package/src/interactive/overlay-key-routing.ts +46 -47
- package/src/interactive/overlay-lifecycle.ts +30 -15
- package/src/interactive/overlay-resource-openers.ts +56 -46
- package/src/interactive/overlays/ask-user.ts +630 -556
- package/src/interactive/overlays/extension-panel.ts +70 -0
- package/src/interactive/overlays/extensions.ts +28 -5
- package/src/interactive/overlays/fleet-run-approval.ts +7 -3
- package/src/interactive/overlays/help-reference.ts +89 -40
- package/src/interactive/overlays/interop.ts +122 -3
- package/src/interactive/overlays/keybinding-detail.ts +2 -2
- package/src/interactive/overlays/library-lifecycle.ts +90 -0
- package/src/interactive/overlays/library-model.ts +574 -0
- package/src/interactive/overlays/library-review.ts +557 -0
- package/src/interactive/overlays/library-tabs.ts +3 -15
- package/src/interactive/overlays/library.ts +602 -0
- package/src/interactive/overlays/list-overlay.ts +218 -39
- package/src/interactive/overlays/model-selector.ts +28 -25
- package/src/interactive/overlays/session-selector.ts +9 -3
- package/src/interactive/overlays/settings.ts +25 -18
- package/src/interactive/overlays/tree-selector.ts +16 -11
- package/src/interactive/permission-hint.ts +13 -0
- package/src/interactive/permission-overlay.ts +77 -28
- package/src/interactive/prewarm.ts +11 -197
- package/src/interactive/prompt-source-label.ts +21 -0
- package/src/interactive/renderers/reference-card.ts +35 -0
- package/src/interactive/renderers/worker-entry.ts +35 -3
- package/src/interactive/session-usage-reseed.ts +2 -0
- package/src/interactive/side-question.ts +2 -0
- package/src/interactive/slash-autocomplete.ts +99 -1
- package/src/interactive/slash-commands.ts +390 -67
- package/src/interactive/slash-spec.ts +0 -1
- package/src/interactive/terminal-lease.ts +44 -12
- package/src/interactive/turn-context.ts +1 -0
- package/src/interactive/turn-persistence.ts +3 -0
- package/src/interactive/turn-prewarm.ts +126 -19
- package/src/interactive/turn-queues.ts +8 -7
- package/src/interactive/turn-runtime.ts +15 -1
- package/src/interactive/view/view-overlay.ts +19 -14
- package/src/interactive/welcome-dashboard.ts +525 -408
- package/src/tools/bootstrap.ts +8 -0
- package/src/tools/builtin-tool-catalog.ts +15 -6
- package/src/tools/context/index.ts +58 -5
- package/src/tools/context/library.ts +465 -0
- package/src/tools/context/surface.ts +20 -6
- package/src/tools/core-bootstrap.ts +3 -0
- package/src/tools/dispatch-admission.ts +24 -1
- package/src/tools/dispatch-arguments.ts +8 -0
- package/src/tools/dispatch-plan.ts +32 -0
- package/src/tools/dispatch-schema.ts +31 -1
- package/src/tools/dispatch-types.ts +3 -0
- package/src/tools/dispatch.ts +1 -1
- package/src/tools/harness-extensions.ts +169 -0
- package/src/tools/observation.ts +4 -0
- package/src/tools/policy.ts +7 -1
- package/src/tools/registry.ts +31 -3
- package/src/tools/worker-evidence.ts +5 -0
- package/src/worker/context-seed.ts +192 -0
- package/src/worker/entry.ts +1 -0
- package/src/worker/spec-contract.ts +35 -1
- package/dist/acp-UVEVWSDL.js +0 -130
- package/dist/agents-VWY37DTK.js +0 -148
- package/dist/auth-PCV2XQDV.js +0 -551
- package/dist/builtins-PD652MTK.js +0 -22
- package/dist/chunk-22PQ4TX4.js +0 -360
- package/dist/chunk-24T2YZ7A.js +0 -22648
- package/dist/chunk-2AKYFREM.js +0 -1008
- package/dist/chunk-2QPI3TR3.js +0 -162
- package/dist/chunk-3BJGMT2D.js +0 -324
- package/dist/chunk-3HQVBIKD.js +0 -308
- package/dist/chunk-3JLFK5MW.js +0 -193
- package/dist/chunk-3O2ZAUGQ.js +0 -283
- package/dist/chunk-3QKXHCGS.js +0 -59
- package/dist/chunk-3T4DXWP6.js +0 -668
- package/dist/chunk-3UW3KU4A.js +0 -21
- package/dist/chunk-3WBALRQH.js +0 -5076
- package/dist/chunk-4DU2TVI4.js +0 -108
- package/dist/chunk-4U4TKZFR.js +0 -5052
- package/dist/chunk-4VMV6OS6.js +0 -101
- package/dist/chunk-536HXRFE.js +0 -1257
- package/dist/chunk-5CMARGPF.js +0 -477
- package/dist/chunk-5CY4Q6QI.js +0 -141
- package/dist/chunk-5QRX7SLS.js +0 -1018
- package/dist/chunk-5VTJP36Q.js +0 -36
- package/dist/chunk-5ZSZEYJK.js +0 -119
- package/dist/chunk-6HAO6X5B.js +0 -197
- package/dist/chunk-6OII3LOK.js +0 -404
- package/dist/chunk-6RYDAVQT.js +0 -4338
- package/dist/chunk-6VRRJT7L.js +0 -146
- package/dist/chunk-6YA46L5A.js +0 -386
- package/dist/chunk-77CZRFTE.js +0 -634
- package/dist/chunk-7JSSKXG2.js +0 -1215
- package/dist/chunk-7WUZEB2M.js +0 -165
- package/dist/chunk-7YJWEF2L.js +0 -974
- package/dist/chunk-ACCKVSHU.js +0 -44
- package/dist/chunk-B3MOMLJ4.js +0 -433
- package/dist/chunk-BBV5TKE6.js +0 -35
- package/dist/chunk-BLTEAUCB.js +0 -668
- package/dist/chunk-BS4GAMUB.js +0 -233
- package/dist/chunk-BT7HGDOX.js +0 -3151
- package/dist/chunk-CBSKDFWL.js +0 -101
- package/dist/chunk-CXQ37WJH.js +0 -45
- package/dist/chunk-DXLUVUD4.js +0 -1490
- package/dist/chunk-DZK63TZJ.js +0 -1334
- package/dist/chunk-E7RF4KBO.js +0 -266
- package/dist/chunk-ECOMVOHP.js +0 -139
- package/dist/chunk-EHOSNVVM.js +0 -59
- package/dist/chunk-F5Z7EWMN.js +0 -4484
- package/dist/chunk-FQOOGXBH.js +0 -579
- package/dist/chunk-GLYBJ4RQ.js +0 -396
- package/dist/chunk-HHVJNVUJ.js +0 -179
- package/dist/chunk-HL26ADLH.js +0 -77
- package/dist/chunk-HPTJF6DG.js +0 -2465
- package/dist/chunk-HXHFDHB6.js +0 -962
- package/dist/chunk-HZ2T2YED.js +0 -1687
- package/dist/chunk-HZFBVU5X.js +0 -666
- package/dist/chunk-I2K2NCZQ.js +0 -659
- package/dist/chunk-IGLVVNEG.js +0 -402
- package/dist/chunk-IKRWLEDA.js +0 -1567
- package/dist/chunk-J2FYEQ5L.js +0 -33
- package/dist/chunk-JMPL7NUB.js +0 -108
- package/dist/chunk-K2HL3GBL.js +0 -998
- package/dist/chunk-KAFMW7WM.js +0 -386
- package/dist/chunk-KTFSFCVN.js +0 -46
- package/dist/chunk-LIN2K3EL.js +0 -66
- package/dist/chunk-LUL5Z66S.js +0 -221
- package/dist/chunk-LVFANMOH.js +0 -466
- package/dist/chunk-LY4N4TTL.js +0 -117
- package/dist/chunk-LZBMXNLP.js +0 -1196
- package/dist/chunk-M6TAYK66.js +0 -807
- package/dist/chunk-N2OKBREN.js +0 -243
- package/dist/chunk-NC4KV7EL.js +0 -39
- package/dist/chunk-NF3BK5WR.js +0 -42
- package/dist/chunk-NNWJYUNO.js +0 -573
- package/dist/chunk-NTK3WTHM.js +0 -141
- package/dist/chunk-ODUTYZIU.js +0 -688
- package/dist/chunk-OQM5IVJY.js +0 -1377
- package/dist/chunk-P5JMBPDJ.js +0 -7192
- package/dist/chunk-P5SC4DLJ.js +0 -47
- package/dist/chunk-P6M7RKMI.js +0 -97
- package/dist/chunk-PWWSIB2A.js +0 -52
- package/dist/chunk-PZN2LQY6.js +0 -674
- package/dist/chunk-Q7NNUHQV.js +0 -705
- package/dist/chunk-QCOV5DFY.js +0 -911
- package/dist/chunk-QNWRHOMF.js +0 -692
- package/dist/chunk-QRFXEO6Y.js +0 -17
- package/dist/chunk-QXFBABFJ.js +0 -380
- package/dist/chunk-RGZNQ5CT.js +0 -657
- package/dist/chunk-SRZOW5L2.js +0 -1865
- package/dist/chunk-SXQKNKRA.js +0 -223
- package/dist/chunk-T334FW2H.js +0 -362
- package/dist/chunk-T52TPHYC.js +0 -318
- package/dist/chunk-TJFDL26W.js +0 -658
- package/dist/chunk-TN5FW4XY.js +0 -172
- package/dist/chunk-U7H5WRG5.js +0 -123
- package/dist/chunk-UFYNOQK4.js +0 -302
- package/dist/chunk-URBGEOH3.js +0 -32
- package/dist/chunk-USZA7GWL.js +0 -341
- package/dist/chunk-UUQ5G6EZ.js +0 -697
- package/dist/chunk-VAHLPXPY.js +0 -399
- package/dist/chunk-VANN3GDP.js +0 -2488
- package/dist/chunk-VHMX7SXF.js +0 -1289
- package/dist/chunk-WJIMKGD6.js +0 -132
- package/dist/chunk-WKUYQBCG.js +0 -795
- package/dist/chunk-WNGF5AJX.js +0 -1911
- package/dist/chunk-WV6TDAPN.js +0 -3627
- package/dist/chunk-X3BI7HTV.js +0 -562
- package/dist/chunk-XWMSPJYN.js +0 -149
- package/dist/chunk-YPRSNUTC.js +0 -395
- package/dist/chunk-ZS43Y2FT.js +0 -438
- package/dist/clio-QQCMTUZE.js +0 -26
- package/dist/code-nav-GUPM6766.js +0 -686
- package/dist/components-TNIKXCBH.js +0 -674
- package/dist/config-IIM7YOD3.js +0 -621
- package/dist/configure-4ZM5HWJX.js +0 -73
- package/dist/context-44BZLJ3J.js +0 -344
- package/dist/context-AIDVQKMW.js +0 -278
- package/dist/context-OL5P3HEP.js +0 -1031
- package/dist/context-clear-OQV76MYP.js +0 -184
- package/dist/context-index-HP2JFUWA.js +0 -120
- package/dist/context-map-INTXD54D.js +0 -555
- package/dist/context-working-set-ZUW3EGLS.js +0 -1556
- package/dist/detail-UXPWRANG.js +0 -115
- package/dist/dispatch-runner-P3ZW6G77.js +0 -2438
- package/dist/docs-BL7ROUFN.js +0 -292
- package/dist/doctor-JJVGPZWT.js +0 -797
- package/dist/eval-V2RTN3UH.js +0 -4972
- package/dist/eval-inventory-QOYZERXJ.js +0 -315
- package/dist/evidence-35PYWGSO.js +0 -225
- package/dist/evidence-CIGGKI6J.js +0 -383
- package/dist/evolve-33SM3NJP.js +0 -609
- package/dist/extensions-YVRHX6ZI.js +0 -229
- package/dist/fleet-LFO7SIPC.js +0 -908
- package/dist/fleet-commands-RLK72GU3.js +0 -75
- package/dist/fleet-decisions-3SBSCTCW.js +0 -159
- package/dist/fleet-graph-JZIBCGMW.js +0 -134
- package/dist/fleet-inspect-2L5YGGZJ.js +0 -469
- package/dist/fleet-preflight-QRSHIIDE.js +0 -22
- package/dist/fleet-validate-LIAVKDUU.js +0 -92
- package/dist/fleet-verify-JIK3OQZR.js +0 -202
- package/dist/fleet-view-IWHYGQKK.js +0 -118
- package/dist/init-NJEDOTQW.js +0 -321
- package/dist/interop-RVCAYECG.js +0 -115
- package/dist/inventory-74UL7UHU.js +0 -118
- package/dist/library-CTKZA7K3.js +0 -226
- package/dist/memory-I76I5VUH.js +0 -512
- package/dist/models-D4YDIQZQ.js +0 -289
- package/dist/monitor-NKVD55HX.js +0 -775
- package/dist/orchestrator-I6OATVPK.js +0 -39518
- package/dist/panes-7BTYH3XQ.js +0 -103
- package/dist/panes-WPOMEMRH.js +0 -74
- package/dist/paths-J3KN7UAO.js +0 -67
- package/dist/preload-EJAWJEIO.js +0 -116
- package/dist/reset-4XMQKDNZ.js +0 -345
- package/dist/resources-TVYVXK3Q.js +0 -125
- package/dist/run-OWQNNSJU.js +0 -872
- package/dist/share-NPZZMUXG.js +0 -290
- package/dist/skills-OXFEAWMT.js +0 -510
- package/dist/skills-eval-J5TCKSJA.js +0 -1034
- package/dist/skills-inventory-7II4DM57.js +0 -133
- package/dist/slash-commands-MDSDSWYF.js +0 -92
- package/dist/steer-S7D7IKPU.js +0 -77
- package/dist/support-5VAEC32W.js +0 -38
- package/dist/targets-KILZEOCE.js +0 -1109
- package/dist/tasks-R6P6OV22.js +0 -36
- package/dist/terminal-lease-LZCG2KN3.js +0 -405
- package/dist/tools-6OCQ6SVB.js +0 -28
- package/dist/trace-JHLXWUMN.js +0 -572
- package/dist/tui-primitives-RCY2HN7G.js +0 -17
- package/dist/uninstall-FXYMFFRT.js +0 -407
- package/dist/upgrade-D2OZH6IQ.js +0 -307
- package/dist/usage-PIASNUS4.js +0 -1052
- package/dist/verifiers-LTHUY2PX.js +0 -630
- package/dist/verify-HYF7KBVE.js +0 -30
- package/dist/web-fetch-MQN4FH3X.js +0 -788
- package/dist/wiki-generate-RK7JQ5NP.js +0 -615
- package/dist/with-panes-OFTNAR4Y.js +0 -628
- package/skills/README.md +0 -418
- package/skills/coding/ast-grep/SKILL.md +0 -213
- package/skills/coding/ast-grep/evals.md +0 -82
- package/skills/coding/coding-standards/SKILL.md +0 -164
- package/skills/coding/coding-standards/evals.md +0 -57
- package/skills/coding/prototype/SKILL.md +0 -151
- package/skills/coding/prototype/evals.md +0 -61
- package/skills/coding/tdd/SKILL.md +0 -134
- package/skills/coding/tdd/evals.md +0 -61
- package/skills/context/context-handoff/SKILL.md +0 -176
- package/skills/context/context-handoff/evals.md +0 -101
- package/skills/context/context-prime/SKILL.md +0 -131
- package/skills/context/context-prime/evals.md +0 -99
- package/skills/git/branch-closeout/SKILL.md +0 -132
- package/skills/git/file-ticket/SKILL.md +0 -126
- package/skills/git/fix-issue/SKILL.md +0 -136
- package/skills/git/resolve-merge-conflicts/SKILL.md +0 -151
- package/skills/git/resolve-merge-conflicts/evals.md +0 -85
- package/skills/git/ship/SKILL.md +0 -134
- package/skills/git/worktree-create/SKILL.md +0 -127
- package/skills/git/worktree-merge/SKILL.md +0 -147
- package/skills/meta/clio-coder-dev/SKILL.md +0 -101
- package/skills/meta/clio-coder-dev/evals.md +0 -46
- package/skills/meta/clio-coder-test/SKILL.md +0 -146
- package/skills/meta/clio-coder-test/evals.md +0 -48
- package/skills/meta/clio-coder-test/references/test-map.md +0 -96
- package/skills/meta/credentials/SKILL.md +0 -132
- package/skills/meta/credentials/evals.md +0 -104
- package/skills/meta/find-skills/SKILL.md +0 -78
- package/skills/meta/find-skills/evals.md +0 -47
- package/skills/meta/herdr/SKILL.md +0 -133
- package/skills/meta/herdr/evals.md +0 -38
- package/skills/meta/skill-craft/SKILL.md +0 -125
- package/skills/meta/skill-craft/evals.md +0 -41
- package/skills/planning/archify/SKILL.md +0 -196
- package/skills/planning/architecture/SKILL.md +0 -184
- package/skills/planning/architecture/evals.md +0 -101
- package/skills/planning/backlog/SKILL.md +0 -212
- package/skills/planning/backlog/evals.md +0 -185
- package/skills/planning/prd/SKILL.md +0 -129
- package/skills/planning/prd/evals.md +0 -103
- package/skills/planning/product-intent/SKILL.md +0 -173
- package/skills/planning/product-intent/evals.md +0 -106
- package/skills/planning/tech-spec/SKILL.md +0 -172
- package/skills/planning/tech-spec/evals.md +0 -120
- package/skills/registry.yaml +0 -144
- package/skills/remote.yaml +0 -13
- package/skills/research/arxiv-literature/SKILL.md +0 -168
- package/skills/research/arxiv-literature/evals.md +0 -108
- package/skills/research/experiment-protocol/SKILL.md +0 -148
- package/skills/research/experiment-protocol/evals.md +0 -114
- package/skills/research/scientific-debugging/SKILL.md +0 -149
- package/skills/research/scientific-debugging/evals.md +0 -156
- package/skills/research/scientific-modernization/SKILL.md +0 -170
- package/skills/research/scientific-modernization/evals.md +0 -111
- package/skills/skill-marketplace.json +0 -507
- package/skills/workflow/cut-it/SKILL.md +0 -153
- package/skills/workflow/cut-it/evals.md +0 -143
- package/skills/workflow/design-council/SKILL.md +0 -233
- package/skills/workflow/design-council/evals.md +0 -258
- package/skills/workflow/grill-me/SKILL.md +0 -267
- package/skills/workflow/grill-me/evals.md +0 -231
- package/skills/workflow/workflow-distiller/SKILL.md +0 -201
- package/skills/workflow/workflow-distiller/evals.md +0 -225
- package/src/domains/extensions/resource-path.ts +0 -27
- package/src/domains/extensions/resources.ts +0 -37
- package/src/domains/lifecycle/migrations/2026-09-01-extension-install-digests.ts +0 -27
- package/src/interactive/overlays/agents.ts +0 -70
- package/src/interactive/overlays/library-install-confirm.ts +0 -152
- package/src/interactive/overlays/prompts.ts +0 -89
- package/src/interactive/overlays/skills-hub.ts +0 -615
- /package/{skills → library/skills}/coding/ast-grep/references/rule_reference.md +0 -0
- /package/{skills → library/skills}/coding/prototype/references/LOGIC.md +0 -0
- /package/{skills → library/skills}/coding/prototype/references/UI.md +0 -0
- /package/{skills → library/skills}/coding/tdd/references/mocking.md +0 -0
- /package/{skills → library/skills}/coding/tdd/references/tests.md +0 -0
- /package/{skills → library/skills}/context/context-handoff/scripts/new-handoff.sh +0 -0
- /package/{skills → library/skills}/git/branch-closeout/evals.md +0 -0
- /package/{skills → library/skills}/git/branch-closeout/references/closeout-checklist.md +0 -0
- /package/{skills → library/skills}/git/file-ticket/assets/issue-template.md +0 -0
- /package/{skills → library/skills}/git/file-ticket/evals.md +0 -0
- /package/{skills → library/skills}/git/file-ticket/references/issue-discovery.md +0 -0
- /package/{skills → library/skills}/git/fix-issue/evals.md +0 -0
- /package/{skills → library/skills}/git/fix-issue/references/diagnosis-and-rca.md +0 -0
- /package/{skills → library/skills}/git/resolve-merge-conflicts/references/conflict-matrix.md +0 -0
- /package/{skills → library/skills}/git/ship/assets/pr-template.md +0 -0
- /package/{skills → library/skills}/git/ship/evals.md +0 -0
- /package/{skills → library/skills}/git/ship/references/remote-and-branch-policy.md +0 -0
- /package/{skills → library/skills}/git/worktree-create/evals.md +0 -0
- /package/{skills → library/skills}/git/worktree-create/references/worktree-setup.md +0 -0
- /package/{skills → library/skills}/git/worktree-merge/evals.md +0 -0
- /package/{skills → library/skills}/git/worktree-merge/references/merge-strategies.md +0 -0
- /package/{skills → library/skills}/meta/clio-coder-test/references/harness.md +0 -0
- /package/{skills → library/skills}/planning/archify/evals.md +0 -0
package/dist/chunk-536HXRFE.js
DELETED
|
@@ -1,1257 +0,0 @@
|
|
|
1
|
-
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
frontmatterRegion,
|
|
4
|
-
normalizedSkillHash,
|
|
5
|
-
stripProvenanceLines
|
|
6
|
-
} from "./chunk-DNCE23JJ.js";
|
|
7
|
-
import {
|
|
8
|
-
readRootEntries,
|
|
9
|
-
splitYamlFrontmatter,
|
|
10
|
-
stringField
|
|
11
|
-
} from "./chunk-U7H5WRG5.js";
|
|
12
|
-
import {
|
|
13
|
-
enabledExtensionResourceRoots
|
|
14
|
-
} from "./chunk-22PQ4TX4.js";
|
|
15
|
-
import {
|
|
16
|
-
warnLegacyNaming
|
|
17
|
-
} from "./chunk-DVNAPPXU.js";
|
|
18
|
-
import {
|
|
19
|
-
INTEROP_AGENT_KINDS,
|
|
20
|
-
interopSourceRank
|
|
21
|
-
} from "./chunk-5CY4Q6QI.js";
|
|
22
|
-
import {
|
|
23
|
-
ToolNames
|
|
24
|
-
} from "./chunk-EHOSNVVM.js";
|
|
25
|
-
import {
|
|
26
|
-
resolvePackageRoot
|
|
27
|
-
} from "./chunk-E3LEPLQ2.js";
|
|
28
|
-
import {
|
|
29
|
-
fsyncDirectory
|
|
30
|
-
} from "./chunk-ZZFWWYLX.js";
|
|
31
|
-
import {
|
|
32
|
-
clioConfigDir
|
|
33
|
-
} from "./chunk-CTTI7G3T.js";
|
|
34
|
-
import {
|
|
35
|
-
init_esm_shims
|
|
36
|
-
} from "./chunk-ECBHH7LU.js";
|
|
37
|
-
|
|
38
|
-
// src/domains/resources/skills/install.ts
|
|
39
|
-
init_esm_shims();
|
|
40
|
-
import { execFileSync } from "node:child_process";
|
|
41
|
-
import {
|
|
42
|
-
cpSync,
|
|
43
|
-
existsSync as existsSync3,
|
|
44
|
-
mkdirSync,
|
|
45
|
-
mkdtempSync,
|
|
46
|
-
readFileSync as readFileSync3,
|
|
47
|
-
renameSync,
|
|
48
|
-
rmSync,
|
|
49
|
-
statSync,
|
|
50
|
-
writeFileSync
|
|
51
|
-
} from "node:fs";
|
|
52
|
-
import { homedir as homedir2, tmpdir } from "node:os";
|
|
53
|
-
import path3 from "node:path";
|
|
54
|
-
|
|
55
|
-
// src/domains/resources/skills/loader.ts
|
|
56
|
-
init_esm_shims();
|
|
57
|
-
import { createHash } from "node:crypto";
|
|
58
|
-
import { existsSync as existsSync2, readdirSync as readdirSync2, readFileSync as readFileSync2, realpathSync } from "node:fs";
|
|
59
|
-
import { homedir } from "node:os";
|
|
60
|
-
import path2 from "node:path";
|
|
61
|
-
|
|
62
|
-
// src/domains/resources/skills/marketplace.ts
|
|
63
|
-
init_esm_shims();
|
|
64
|
-
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
65
|
-
import path from "node:path";
|
|
66
|
-
var MARKETPLACE_UNCONFIGURED = "no local skill marketplace catalog or index configured";
|
|
67
|
-
function packageCatalogDir() {
|
|
68
|
-
try {
|
|
69
|
-
return path.join(resolvePackageRoot(), "skills");
|
|
70
|
-
} catch {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function packageIndexPath() {
|
|
75
|
-
try {
|
|
76
|
-
return path.join(resolvePackageRoot(), "skills", "skill-marketplace.json");
|
|
77
|
-
} catch {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
function defaultIndexPath() {
|
|
82
|
-
try {
|
|
83
|
-
const configured = path.join(clioConfigDir(), "skill-marketplace.json");
|
|
84
|
-
if (existsSync(configured)) return configured;
|
|
85
|
-
} catch {
|
|
86
|
-
}
|
|
87
|
-
const bundled = packageIndexPath();
|
|
88
|
-
return bundled && existsSync(bundled) ? bundled : null;
|
|
89
|
-
}
|
|
90
|
-
function isIndexSkill(value) {
|
|
91
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
92
|
-
const record = value;
|
|
93
|
-
return typeof record.name === "string" && record.name.trim().length > 0 && typeof record.description === "string" && typeof record.sourceUrl === "string" && record.sourceUrl.trim().length > 0;
|
|
94
|
-
}
|
|
95
|
-
function optionalString(value) {
|
|
96
|
-
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
97
|
-
}
|
|
98
|
-
function optionalTriggerList(value) {
|
|
99
|
-
if (!Array.isArray(value)) return void 0;
|
|
100
|
-
const triggers = value.filter((entry) => typeof entry === "string").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
101
|
-
return triggers.length > 0 ? triggers : void 0;
|
|
102
|
-
}
|
|
103
|
-
function indexAudit(value) {
|
|
104
|
-
return value === "pass" || value === "warn" || value === "fail" || value === "unknown" ? value : void 0;
|
|
105
|
-
}
|
|
106
|
-
function parseMarketplaceIndex(indexPath, diagnostics = []) {
|
|
107
|
-
try {
|
|
108
|
-
const parsed = JSON.parse(readFileSync(indexPath, "utf8"));
|
|
109
|
-
const rawSkills = Array.isArray(parsed) ? parsed : parsed && typeof parsed === "object" && Array.isArray(parsed.skills) ? parsed.skills : [];
|
|
110
|
-
return rawSkills.filter(isIndexSkill).flatMap((skill) => {
|
|
111
|
-
const record = skill;
|
|
112
|
-
const version = optionalString(record.version);
|
|
113
|
-
const audit = indexAudit(record.audit);
|
|
114
|
-
const category = optionalString(record.category);
|
|
115
|
-
const triggers = optionalTriggerList(record.triggers);
|
|
116
|
-
if (record.kind !== void 0 && !["skill", "agent", "prompt", "fleet"].includes(String(record.kind))) {
|
|
117
|
-
diagnostics.push(`skill marketplace index entry has unsupported kind: ${skill.name}`);
|
|
118
|
-
return [];
|
|
119
|
-
}
|
|
120
|
-
if (record.requires !== void 0 && (!Array.isArray(record.requires) || record.requires.some((entry) => typeof entry !== "string"))) {
|
|
121
|
-
diagnostics.push(`library_requirement_malformed: ${skill.name}`);
|
|
122
|
-
return [];
|
|
123
|
-
}
|
|
124
|
-
const kind = record.kind === "agent" || record.kind === "prompt" || record.kind === "fleet" ? record.kind : "skill";
|
|
125
|
-
const requires = Array.isArray(record.requires) ? record.requires.filter((entry) => typeof entry === "string") : void 0;
|
|
126
|
-
const overlay = optionalString(record.overlay);
|
|
127
|
-
if (overlay && (path.isAbsolute(overlay) || overlay.split("/").includes(".."))) {
|
|
128
|
-
diagnostics.push(`skill marketplace index entry has an overlay outside the package: ${skill.name}`);
|
|
129
|
-
return [];
|
|
130
|
-
}
|
|
131
|
-
const exclude = optionalTriggerList(record.exclude);
|
|
132
|
-
return [
|
|
133
|
-
{
|
|
134
|
-
kind,
|
|
135
|
-
name: skill.name.trim(),
|
|
136
|
-
description: skill.description.trim(),
|
|
137
|
-
sourceUrl: skill.sourceUrl.trim(),
|
|
138
|
-
...version ? { version } : {},
|
|
139
|
-
...audit ? { audit } : {},
|
|
140
|
-
...category ? { category } : {},
|
|
141
|
-
...triggers ? { triggers } : {},
|
|
142
|
-
...requires ? { requires } : {},
|
|
143
|
-
...overlay ? { overlay } : {},
|
|
144
|
-
...exclude ? { exclude } : {},
|
|
145
|
-
origin: "index"
|
|
146
|
-
}
|
|
147
|
-
];
|
|
148
|
-
});
|
|
149
|
-
} catch (err) {
|
|
150
|
-
diagnostics.push(`skill marketplace index unreadable: ${err instanceof Error ? err.message : String(err)}`);
|
|
151
|
-
return [];
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
function looksLikeSkillCatalog(dir) {
|
|
155
|
-
if (!existsSync(dir)) return false;
|
|
156
|
-
try {
|
|
157
|
-
return readdirSync(dir, { withFileTypes: true }).some((entry) => {
|
|
158
|
-
if (!entry.isDirectory()) return false;
|
|
159
|
-
const child = path.join(dir, entry.name);
|
|
160
|
-
if (existsSync(path.join(child, "SKILL.md"))) return true;
|
|
161
|
-
try {
|
|
162
|
-
return readdirSync(child, { withFileTypes: true }).some(
|
|
163
|
-
(inner) => inner.isDirectory() && existsSync(path.join(child, inner.name, "SKILL.md"))
|
|
164
|
-
);
|
|
165
|
-
} catch {
|
|
166
|
-
return false;
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
} catch {
|
|
170
|
-
return false;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
function resolveCatalogDir(options) {
|
|
174
|
-
if (options.catalogDir === null) return null;
|
|
175
|
-
if (options.catalogDir) return path.resolve(options.catalogDir);
|
|
176
|
-
const fromEnv = process.env.CLIO_CODER_SKILL_CATALOG_DIR;
|
|
177
|
-
if (fromEnv && fromEnv.trim().length > 0) return path.resolve(fromEnv.trim());
|
|
178
|
-
const repoCatalog = path.join(options.cwd ?? process.cwd(), "skills");
|
|
179
|
-
if (looksLikeSkillCatalog(repoCatalog)) return repoCatalog;
|
|
180
|
-
const bundled = packageCatalogDir();
|
|
181
|
-
return bundled && looksLikeSkillCatalog(bundled) ? bundled : null;
|
|
182
|
-
}
|
|
183
|
-
function catalogCategory(catalogDir, baseDir) {
|
|
184
|
-
const rel = path.relative(catalogDir, baseDir);
|
|
185
|
-
const category = path.dirname(rel);
|
|
186
|
-
if (rel.length === 0 || rel.startsWith("..") || category === "." || category.startsWith("..")) return void 0;
|
|
187
|
-
return category;
|
|
188
|
-
}
|
|
189
|
-
function catalogEntry(skill, catalogDir) {
|
|
190
|
-
const version = typeof skill.metadata.version === "string" ? skill.metadata.version : void 0;
|
|
191
|
-
const category = catalogCategory(catalogDir, skill.baseDir);
|
|
192
|
-
const triggers = optionalTriggerList(skill.metadata.triggers);
|
|
193
|
-
return {
|
|
194
|
-
name: skill.name,
|
|
195
|
-
description: skill.description,
|
|
196
|
-
sourceUrl: skill.baseDir,
|
|
197
|
-
...version ? { version } : {},
|
|
198
|
-
...skill.provenance?.audit ? { audit: skill.provenance.audit } : {},
|
|
199
|
-
...category ? { category } : {},
|
|
200
|
-
...triggers ? { triggers } : {},
|
|
201
|
-
origin: "catalog",
|
|
202
|
-
kind: "skill"
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
function catalogSkills(dir, diagnostics) {
|
|
206
|
-
const list = loadSkills({ disableDiscovery: true, explicitSkillPaths: [dir] });
|
|
207
|
-
for (const diag of list.diagnostics) {
|
|
208
|
-
if (diag.type === "warning" || diag.type === "error") diagnostics.push(diag.message);
|
|
209
|
-
}
|
|
210
|
-
return list.items.map((skill) => catalogEntry(skill, dir));
|
|
211
|
-
}
|
|
212
|
-
function discoverMarketplaceSkills(options = {}) {
|
|
213
|
-
const diagnostics = [];
|
|
214
|
-
const skills = [];
|
|
215
|
-
const seen = /* @__PURE__ */ new Set();
|
|
216
|
-
const indexPath = options.indexPath === null ? null : options.indexPath ?? process.env.CLIO_CODER_SKILL_MARKETPLACE_INDEX ?? null;
|
|
217
|
-
const resolvedIndexPath = indexPath ?? defaultIndexPath();
|
|
218
|
-
const indexSkills = options.indexPath !== null && resolvedIndexPath && existsSync(resolvedIndexPath) ? parseMarketplaceIndex(resolvedIndexPath, diagnostics) : [];
|
|
219
|
-
const overlayNames = new Set(indexSkills.filter((skill) => skill.overlay).map((skill) => skill.name));
|
|
220
|
-
const catalogDir = resolveCatalogDir(options);
|
|
221
|
-
if (catalogDir) {
|
|
222
|
-
for (const skill of catalogSkills(catalogDir, diagnostics)) {
|
|
223
|
-
if (seen.has(skill.name) || overlayNames.has(skill.name)) continue;
|
|
224
|
-
seen.add(skill.name);
|
|
225
|
-
skills.push(skill);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
for (const skill of indexSkills) {
|
|
229
|
-
if (seen.has(skill.name)) continue;
|
|
230
|
-
seen.add(skill.name);
|
|
231
|
-
skills.push(skill);
|
|
232
|
-
}
|
|
233
|
-
if (skills.length === 0 && diagnostics.length === 0) {
|
|
234
|
-
diagnostics.push(MARKETPLACE_UNCONFIGURED);
|
|
235
|
-
}
|
|
236
|
-
return { status: skills.length > 0 ? "installable" : "unavailable", skills, diagnostics };
|
|
237
|
-
}
|
|
238
|
-
function getMarketplaceSkills(options = {}) {
|
|
239
|
-
return discoverMarketplaceSkills(options).skills;
|
|
240
|
-
}
|
|
241
|
-
function marketplaceInstallShaping(skill) {
|
|
242
|
-
const shaping = {};
|
|
243
|
-
if (skill.overlay) shaping.overlay = path.join(resolvePackageRoot(), skill.overlay);
|
|
244
|
-
if (skill.exclude && skill.exclude.length > 0) shaping.exclude = [...skill.exclude];
|
|
245
|
-
return shaping;
|
|
246
|
-
}
|
|
247
|
-
function resolveMarketplaceShaping(options = {}) {
|
|
248
|
-
return (installed) => {
|
|
249
|
-
const entry = getMarketplaceSkills(options).find(
|
|
250
|
-
(skill) => skill.name === installed.name && skill.sourceUrl === installed.sourceUrl
|
|
251
|
-
);
|
|
252
|
-
if (!entry || !entry.overlay && !entry.exclude) return void 0;
|
|
253
|
-
return marketplaceInstallShaping(entry);
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
function installSkill(input) {
|
|
257
|
-
const requested = input.source.trim();
|
|
258
|
-
const source = requested === "clio-dev" ? "clio-coder-dev" : requested === "clio-test" ? "clio-coder-test" : requested;
|
|
259
|
-
if (source !== requested) warnLegacyNaming(requested, source);
|
|
260
|
-
const spec = parseSkillSourceSpec(source);
|
|
261
|
-
if (spec?.kind === "local" && isSkillName(source) && !existsSync(spec.path)) {
|
|
262
|
-
const skill = getMarketplaceSkills({ ...input.cwd ? { cwd: input.cwd } : {} }).find(
|
|
263
|
-
(entry) => entry.name === source
|
|
264
|
-
);
|
|
265
|
-
if (!skill) {
|
|
266
|
-
throw new Error(`"${source}" is neither an existing local path nor available in the local marketplace`);
|
|
267
|
-
}
|
|
268
|
-
return installSkillFromSource({ ...input, ...marketplaceInstallShaping(skill), source: skill.sourceUrl });
|
|
269
|
-
}
|
|
270
|
-
return installSkillFromSource({ ...input, source });
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// src/domains/resources/skills/loader.ts
|
|
274
|
-
var MAX_NAME_LENGTH = 64;
|
|
275
|
-
var MAX_DESCRIPTION_LENGTH = 1024;
|
|
276
|
-
var MAX_SKILL_BYTES = 1024 * 1024;
|
|
277
|
-
var SKILL_ACTIVATION_BODY_CAP_BYTES = 50 * 1024;
|
|
278
|
-
var CORE_FRONTMATTER_KEYS = /* @__PURE__ */ new Set([
|
|
279
|
-
"name",
|
|
280
|
-
"description",
|
|
281
|
-
"disable-model-invocation",
|
|
282
|
-
"allowed-tools",
|
|
283
|
-
"disallowed-tools"
|
|
284
|
-
]);
|
|
285
|
-
var SKILL_PRECEDENCE = {
|
|
286
|
-
extension: 10,
|
|
287
|
-
userCompat: 20,
|
|
288
|
-
user: 30,
|
|
289
|
-
projectCompat: 40,
|
|
290
|
-
project: 50,
|
|
291
|
-
cli: 60
|
|
292
|
-
};
|
|
293
|
-
function sha256(value) {
|
|
294
|
-
return createHash("sha256").update(value, "utf8").digest("hex");
|
|
295
|
-
}
|
|
296
|
-
function defaultPrecedenceForScope(scope) {
|
|
297
|
-
switch (scope) {
|
|
298
|
-
case "package":
|
|
299
|
-
return SKILL_PRECEDENCE.extension;
|
|
300
|
-
case "user":
|
|
301
|
-
return SKILL_PRECEDENCE.user;
|
|
302
|
-
case "project":
|
|
303
|
-
return SKILL_PRECEDENCE.project;
|
|
304
|
-
case "cli":
|
|
305
|
-
return SKILL_PRECEDENCE.cli;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
function projectCompatTrusted(explicit) {
|
|
309
|
-
return explicit === true;
|
|
310
|
-
}
|
|
311
|
-
function defaultSkillRoots(input = {}) {
|
|
312
|
-
const cwd = input.cwd ?? process.cwd();
|
|
313
|
-
const home = input.home ?? homedir();
|
|
314
|
-
const configDir = input.configDir ?? clioConfigDirSafe();
|
|
315
|
-
const trustProject = projectCompatTrusted(input.trustProjectCompatRoots);
|
|
316
|
-
const roots = [];
|
|
317
|
-
for (const root of enabledExtensionResourceRoots("skills", cwd)) {
|
|
318
|
-
roots.push({
|
|
319
|
-
path: root.path,
|
|
320
|
-
scope: "package",
|
|
321
|
-
source: "extension",
|
|
322
|
-
origin: root.source,
|
|
323
|
-
precedence: SKILL_PRECEDENCE.extension,
|
|
324
|
-
trusted: true
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
for (const kind of INTEROP_AGENT_KINDS) {
|
|
328
|
-
if (kind.userSkillRoot === void 0 || kind.skillSource === void 0) continue;
|
|
329
|
-
roots.push({
|
|
330
|
-
path: path2.join(home, kind.userSkillRoot),
|
|
331
|
-
scope: "user",
|
|
332
|
-
source: kind.skillSource,
|
|
333
|
-
origin: `${kind.skillSource}-user`,
|
|
334
|
-
precedence: SKILL_PRECEDENCE.userCompat,
|
|
335
|
-
trusted: true,
|
|
336
|
-
containment: home
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
if (configDir) {
|
|
340
|
-
roots.push({
|
|
341
|
-
path: path2.join(configDir, "skills"),
|
|
342
|
-
scope: "user",
|
|
343
|
-
source: "clio-coder",
|
|
344
|
-
origin: "config",
|
|
345
|
-
precedence: SKILL_PRECEDENCE.user,
|
|
346
|
-
trusted: true,
|
|
347
|
-
containment: home
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
for (const kind of INTEROP_AGENT_KINDS) {
|
|
351
|
-
if (kind.projectSkillRoot === void 0 || kind.skillSource === void 0) continue;
|
|
352
|
-
roots.push({
|
|
353
|
-
path: path2.join(cwd, kind.projectSkillRoot),
|
|
354
|
-
scope: "project",
|
|
355
|
-
source: kind.skillSource,
|
|
356
|
-
origin: `${kind.skillSource}-project`,
|
|
357
|
-
precedence: SKILL_PRECEDENCE.projectCompat,
|
|
358
|
-
trusted: trustProject,
|
|
359
|
-
containment: cwd
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
roots.push({
|
|
363
|
-
path: path2.join(cwd, ".clio-coder", "skills"),
|
|
364
|
-
scope: "project",
|
|
365
|
-
source: "clio-coder",
|
|
366
|
-
origin: "project",
|
|
367
|
-
precedence: SKILL_PRECEDENCE.project,
|
|
368
|
-
trusted: true,
|
|
369
|
-
containment: cwd
|
|
370
|
-
});
|
|
371
|
-
return roots;
|
|
372
|
-
}
|
|
373
|
-
function clioConfigDirSafe() {
|
|
374
|
-
try {
|
|
375
|
-
return clioConfigDir();
|
|
376
|
-
} catch {
|
|
377
|
-
return null;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
function splitSkillFrontmatter(raw) {
|
|
381
|
-
const split = splitYamlFrontmatter(raw);
|
|
382
|
-
if (!split.ok && split.reason === "missing") {
|
|
383
|
-
throw new Error("skill file is missing YAML frontmatter");
|
|
384
|
-
}
|
|
385
|
-
if (!split.ok && split.reason === "missing closing delimiter") {
|
|
386
|
-
throw new Error("skill file is missing a closing YAML frontmatter delimiter");
|
|
387
|
-
}
|
|
388
|
-
if (!split.ok && split.reason === "must be a YAML object") {
|
|
389
|
-
throw new Error("skill frontmatter must be a YAML object");
|
|
390
|
-
}
|
|
391
|
-
if (!split.ok) throw new Error(`skill frontmatter is ${split.reason}`);
|
|
392
|
-
return split;
|
|
393
|
-
}
|
|
394
|
-
function booleanField(frontmatter, key) {
|
|
395
|
-
return frontmatter[key] === true;
|
|
396
|
-
}
|
|
397
|
-
function rawToolListField(frontmatter, key) {
|
|
398
|
-
const raw = frontmatter[key];
|
|
399
|
-
const entries = typeof raw === "string" ? raw.split(",") : Array.isArray(raw) ? raw.filter((entry) => typeof entry === "string") : null;
|
|
400
|
-
if (entries === null) return void 0;
|
|
401
|
-
const tools = entries.map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
402
|
-
return tools.length > 0 ? [...new Set(tools)] : void 0;
|
|
403
|
-
}
|
|
404
|
-
var TOOL_NAMES_BY_LOWERCASE = new Map(Object.values(ToolNames).map((name) => [name.toLowerCase(), name]));
|
|
405
|
-
function resolveDeclaredTools(declared) {
|
|
406
|
-
const tools = [];
|
|
407
|
-
const unrecognized = [];
|
|
408
|
-
for (const entry of declared) {
|
|
409
|
-
const resolved = TOOL_NAMES_BY_LOWERCASE.get(entry.toLowerCase());
|
|
410
|
-
if (resolved === void 0) unrecognized.push(entry);
|
|
411
|
-
else if (!tools.includes(resolved)) tools.push(resolved);
|
|
412
|
-
}
|
|
413
|
-
return { tools, unrecognized };
|
|
414
|
-
}
|
|
415
|
-
function declaredToolSurface(frontmatter, key, filePath, diagnostics) {
|
|
416
|
-
const declared = rawToolListField(frontmatter, key);
|
|
417
|
-
if (declared === void 0) return void 0;
|
|
418
|
-
const { tools, unrecognized } = resolveDeclaredTools(declared);
|
|
419
|
-
if (unrecognized.length > 0) {
|
|
420
|
-
diagnostics.push({
|
|
421
|
-
type: "warning",
|
|
422
|
-
message: `${key} names ${unrecognized.length === 1 ? "a tool" : "tools"} Clio does not have: ${unrecognized.join(", ")}`,
|
|
423
|
-
path: filePath
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
if (tools.length === 0 && key === "allowed-tools") {
|
|
427
|
-
diagnostics.push({
|
|
428
|
-
type: "warning",
|
|
429
|
-
message: "allowed-tools names no tool Clio has, so it narrows nothing; declare Clio tool names to confine this skill",
|
|
430
|
-
path: filePath
|
|
431
|
-
});
|
|
432
|
-
return void 0;
|
|
433
|
-
}
|
|
434
|
-
return tools.length > 0 ? tools : void 0;
|
|
435
|
-
}
|
|
436
|
-
function validationSubject(filePath) {
|
|
437
|
-
return path2.basename(filePath) === "SKILL.md" ? path2.basename(path2.dirname(filePath)) : path2.basename(filePath, ".md");
|
|
438
|
-
}
|
|
439
|
-
function validateNameFormat(name) {
|
|
440
|
-
const errors = [];
|
|
441
|
-
if (name.length > MAX_NAME_LENGTH) errors.push(`name exceeds ${MAX_NAME_LENGTH} characters (${name.length})`);
|
|
442
|
-
if (!/^[a-z0-9-]+$/.test(name)) {
|
|
443
|
-
errors.push("name contains invalid characters (must be lowercase a-z, 0-9, hyphens only)");
|
|
444
|
-
}
|
|
445
|
-
if (name.startsWith("-") || name.endsWith("-")) errors.push("name must not start or end with a hyphen");
|
|
446
|
-
if (name.includes("--")) errors.push("name must not contain consecutive hyphens");
|
|
447
|
-
return errors;
|
|
448
|
-
}
|
|
449
|
-
function validateDescription(description) {
|
|
450
|
-
if (!description) return ["description is required"];
|
|
451
|
-
if (description.length > MAX_DESCRIPTION_LENGTH) {
|
|
452
|
-
return [`description exceeds ${MAX_DESCRIPTION_LENGTH} characters (${description.length})`];
|
|
453
|
-
}
|
|
454
|
-
return [];
|
|
455
|
-
}
|
|
456
|
-
function warnLegacySkillMetadata(filePath) {
|
|
457
|
-
warnLegacyNaming(`clio: skill metadata in ${filePath}`, "clio-coder: skill metadata");
|
|
458
|
-
}
|
|
459
|
-
function extractMetadata(frontmatter, filePath) {
|
|
460
|
-
const metadata = {};
|
|
461
|
-
for (const [key, value] of Object.entries(frontmatter)) {
|
|
462
|
-
if (CORE_FRONTMATTER_KEYS.has(key)) continue;
|
|
463
|
-
if (key === "clio-coder") {
|
|
464
|
-
metadata.clioCoder = value;
|
|
465
|
-
continue;
|
|
466
|
-
}
|
|
467
|
-
if (key === "clio") {
|
|
468
|
-
warnLegacySkillMetadata(filePath);
|
|
469
|
-
if (!("clio-coder" in frontmatter)) metadata.clioCoder = value;
|
|
470
|
-
continue;
|
|
471
|
-
}
|
|
472
|
-
metadata[key] = value;
|
|
473
|
-
}
|
|
474
|
-
return metadata;
|
|
475
|
-
}
|
|
476
|
-
function extractProvenance(frontmatter, filePath) {
|
|
477
|
-
const canonicalRaw = frontmatter["clio-coder"];
|
|
478
|
-
const legacyRaw = frontmatter.clio;
|
|
479
|
-
if (legacyRaw !== void 0) warnLegacySkillMetadata(filePath);
|
|
480
|
-
const clioCoderRaw = canonicalRaw ?? legacyRaw;
|
|
481
|
-
const clioCoder = clioCoderRaw !== null && typeof clioCoderRaw === "object" && !Array.isArray(clioCoderRaw) ? clioCoderRaw : void 0;
|
|
482
|
-
const field = (...keys) => {
|
|
483
|
-
for (const key of keys) {
|
|
484
|
-
if (clioCoder) {
|
|
485
|
-
const nested = stringField(clioCoder, key);
|
|
486
|
-
if (nested !== null) return nested;
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
for (const key of keys) {
|
|
490
|
-
const flat = stringField(frontmatter, key);
|
|
491
|
-
if (flat !== null) return flat;
|
|
492
|
-
}
|
|
493
|
-
return null;
|
|
494
|
-
};
|
|
495
|
-
const installUrl = field("source-url", "sourceUrl", "install-url");
|
|
496
|
-
const registryId = field("registry-id", "registryId");
|
|
497
|
-
const registryUrl = field("registry-url", "registryUrl");
|
|
498
|
-
const installedAt = field("installed-at", "installedAt");
|
|
499
|
-
const updatedAt = field("updated-at", "updatedAt");
|
|
500
|
-
const installedHash = field("installed-hash", "installedHash");
|
|
501
|
-
const auditRaw = field("audit");
|
|
502
|
-
const audit = auditRaw === "pass" || auditRaw === "warn" || auditRaw === "fail" || auditRaw === "unknown" ? auditRaw : void 0;
|
|
503
|
-
const installedByRaw = field("installed-by", "installedBy");
|
|
504
|
-
const installedBy = installedByRaw === "worker" ? installedByRaw : void 0;
|
|
505
|
-
if (!installUrl && !registryId && !registryUrl && !installedAt && !updatedAt && !installedHash && !audit && !installedBy)
|
|
506
|
-
return void 0;
|
|
507
|
-
return {
|
|
508
|
-
...installUrl ? { installUrl } : {},
|
|
509
|
-
...registryId ? { registryId } : {},
|
|
510
|
-
...registryUrl ? { registryUrl } : {},
|
|
511
|
-
...installedAt ? { installedAt } : {},
|
|
512
|
-
...updatedAt ? { updatedAt } : {},
|
|
513
|
-
...installedHash ? { installedHash } : {},
|
|
514
|
-
...audit ? { audit } : {},
|
|
515
|
-
...installedBy ? { installedBy } : {}
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
|
-
function canonicalizePath(filePath) {
|
|
519
|
-
try {
|
|
520
|
-
return realpathSync.native(filePath);
|
|
521
|
-
} catch {
|
|
522
|
-
return path2.resolve(filePath);
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
function pathIsInside(candidate, anchor) {
|
|
526
|
-
return candidate === anchor || candidate.startsWith(anchor + path2.sep);
|
|
527
|
-
}
|
|
528
|
-
function containmentAnchor(root) {
|
|
529
|
-
if (root.containment === void 0) return null;
|
|
530
|
-
const anchor = canonicalizePath(root.containment);
|
|
531
|
-
const rootReal = canonicalizePath(root.path);
|
|
532
|
-
return pathIsInside(rootReal, anchor) ? anchor : rootReal;
|
|
533
|
-
}
|
|
534
|
-
function escapesContainment(fullPath, anchor, diagnostics) {
|
|
535
|
-
if (anchor === null) return false;
|
|
536
|
-
const resolved = canonicalizePath(fullPath);
|
|
537
|
-
if (pathIsInside(resolved, anchor)) return false;
|
|
538
|
-
diagnostics.push({
|
|
539
|
-
type: "warning",
|
|
540
|
-
message: `skill path resolves to ${resolved}, outside ${anchor}; a skill root may not leave its scope through a symlink`,
|
|
541
|
-
path: fullPath
|
|
542
|
-
});
|
|
543
|
-
return true;
|
|
544
|
-
}
|
|
545
|
-
function loadSkillFile(filePath, root) {
|
|
546
|
-
const diagnostics = [];
|
|
547
|
-
let bytes;
|
|
548
|
-
try {
|
|
549
|
-
bytes = readFileSync2(filePath);
|
|
550
|
-
} catch (err) {
|
|
551
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
552
|
-
return {
|
|
553
|
-
candidate: null,
|
|
554
|
-
diagnostics: [{ type: "warning", message: `skill file could not be read: ${reason}`, path: filePath }]
|
|
555
|
-
};
|
|
556
|
-
}
|
|
557
|
-
if (bytes.byteLength > MAX_SKILL_BYTES) {
|
|
558
|
-
return {
|
|
559
|
-
candidate: null,
|
|
560
|
-
diagnostics: [
|
|
561
|
-
{
|
|
562
|
-
type: "warning",
|
|
563
|
-
message: `skill file is ${bytes.byteLength} bytes, over the ${MAX_SKILL_BYTES}-byte limit for a SKILL.md`,
|
|
564
|
-
path: filePath
|
|
565
|
-
}
|
|
566
|
-
]
|
|
567
|
-
};
|
|
568
|
-
}
|
|
569
|
-
const raw = bytes.toString("utf8");
|
|
570
|
-
if (bytes.includes(0) || !Buffer.from(raw, "utf8").equals(bytes)) {
|
|
571
|
-
return {
|
|
572
|
-
candidate: null,
|
|
573
|
-
diagnostics: [
|
|
574
|
-
{
|
|
575
|
-
type: "warning",
|
|
576
|
-
message: "skill file is not valid UTF-8 text; a SKILL.md is a document, not a binary payload",
|
|
577
|
-
path: filePath
|
|
578
|
-
}
|
|
579
|
-
]
|
|
580
|
-
};
|
|
581
|
-
}
|
|
582
|
-
if (bytes.byteLength > SKILL_ACTIVATION_BODY_CAP_BYTES) {
|
|
583
|
-
diagnostics.push({
|
|
584
|
-
type: "warning",
|
|
585
|
-
message: `skill file is ${bytes.byteLength} bytes; activation delivers at most ${SKILL_ACTIVATION_BODY_CAP_BYTES}, so the model will not be shown the rest`,
|
|
586
|
-
path: filePath
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
let parsed;
|
|
590
|
-
try {
|
|
591
|
-
parsed = splitSkillFrontmatter(raw);
|
|
592
|
-
} catch (err) {
|
|
593
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
594
|
-
return { candidate: null, diagnostics: [{ type: "warning", message: reason, path: filePath }] };
|
|
595
|
-
}
|
|
596
|
-
const pathSubject = validationSubject(filePath);
|
|
597
|
-
const frontmatterName = stringField(parsed.frontmatter, "name");
|
|
598
|
-
const rawName = frontmatterName ?? pathSubject;
|
|
599
|
-
const name = rawName === "clio-dev" ? "clio-coder-dev" : rawName === "clio-test" ? "clio-coder-test" : rawName;
|
|
600
|
-
if (name !== rawName) warnLegacyNaming(rawName, name);
|
|
601
|
-
const description = stringField(parsed.frontmatter, "description");
|
|
602
|
-
for (const message of validateDescription(description)) diagnostics.push({ type: "warning", message, path: filePath });
|
|
603
|
-
if (frontmatterName && frontmatterName !== pathSubject) {
|
|
604
|
-
diagnostics.push({
|
|
605
|
-
type: "warning",
|
|
606
|
-
message: `name "${frontmatterName}" differs from path subject "${pathSubject}"; using frontmatter name`,
|
|
607
|
-
path: filePath
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
for (const message of validateNameFormat(name)) diagnostics.push({ type: "warning", message, path: filePath });
|
|
611
|
-
if (!description) return { candidate: null, diagnostics };
|
|
612
|
-
const baseDir = path2.dirname(filePath);
|
|
613
|
-
const scope = root.scope;
|
|
614
|
-
const sourceInfo = {
|
|
615
|
-
path: filePath,
|
|
616
|
-
scope,
|
|
617
|
-
...root.origin ? { source: root.origin } : {}
|
|
618
|
-
};
|
|
619
|
-
const provenance = extractProvenance(parsed.frontmatter, filePath);
|
|
620
|
-
const allowedTools = declaredToolSurface(parsed.frontmatter, "allowed-tools", filePath, diagnostics);
|
|
621
|
-
const disallowedTools = declaredToolSurface(parsed.frontmatter, "disallowed-tools", filePath, diagnostics);
|
|
622
|
-
const skill = {
|
|
623
|
-
name,
|
|
624
|
-
description,
|
|
625
|
-
filePath,
|
|
626
|
-
baseDir,
|
|
627
|
-
content: parsed.body.trim(),
|
|
628
|
-
sourceInfo,
|
|
629
|
-
disableModelInvocation: booleanField(parsed.frontmatter, "disable-model-invocation"),
|
|
630
|
-
...allowedTools ? { allowedTools } : {},
|
|
631
|
-
...disallowedTools ? { disallowedTools } : {},
|
|
632
|
-
source: root.source ?? "clio-coder",
|
|
633
|
-
scope,
|
|
634
|
-
hash: sha256(raw),
|
|
635
|
-
normalizedHash: normalizedSkillHash(raw),
|
|
636
|
-
pathSubject,
|
|
637
|
-
trusted: root.trusted ?? true,
|
|
638
|
-
precedence: root.precedence ?? defaultPrecedenceForScope(scope),
|
|
639
|
-
metadata: extractMetadata(parsed.frontmatter, filePath),
|
|
640
|
-
diagnostics,
|
|
641
|
-
...provenance ? { provenance } : {}
|
|
642
|
-
};
|
|
643
|
-
return { candidate: { skill, canonicalPath: canonicalizePath(filePath) }, diagnostics };
|
|
644
|
-
}
|
|
645
|
-
function isSkillMarkdownFile(entryName) {
|
|
646
|
-
return entryName === "SKILL.md" || entryName.endsWith(".md");
|
|
647
|
-
}
|
|
648
|
-
function collectSkills(root, dir, diagnostics, includeRootFiles, anchor = containmentAnchor(root)) {
|
|
649
|
-
if (!existsSync2(dir)) return [];
|
|
650
|
-
if (escapesContainment(dir, anchor, diagnostics)) return [];
|
|
651
|
-
let entries;
|
|
652
|
-
try {
|
|
653
|
-
entries = readdirSync2(dir, { withFileTypes: true });
|
|
654
|
-
} catch (err) {
|
|
655
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
656
|
-
diagnostics.push({ type: "warning", message: `skill root could not be read: ${reason}`, path: dir });
|
|
657
|
-
return [];
|
|
658
|
-
}
|
|
659
|
-
const skillEntry = entries.find((entry) => entry.name === "SKILL.md" && entry.isFile());
|
|
660
|
-
if (skillEntry) {
|
|
661
|
-
const skillPath = path2.join(dir, skillEntry.name);
|
|
662
|
-
if (escapesContainment(skillPath, anchor, diagnostics)) return [];
|
|
663
|
-
const loaded = loadSkillFile(skillPath, root);
|
|
664
|
-
diagnostics.push(...loaded.diagnostics);
|
|
665
|
-
return loaded.candidate ? [loaded.candidate] : [];
|
|
666
|
-
}
|
|
667
|
-
const candidates = [];
|
|
668
|
-
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
669
|
-
if (entry.name.startsWith(".") || entry.name === "node_modules") continue;
|
|
670
|
-
const fullPath = path2.join(dir, entry.name);
|
|
671
|
-
if (entry.isDirectory() || entry.isSymbolicLink() && existsSync2(path2.join(fullPath, "SKILL.md"))) {
|
|
672
|
-
candidates.push(...collectSkills(root, fullPath, diagnostics, false, anchor));
|
|
673
|
-
continue;
|
|
674
|
-
}
|
|
675
|
-
if (!includeRootFiles || !entry.isFile() && !entry.isSymbolicLink() || !isSkillMarkdownFile(entry.name)) continue;
|
|
676
|
-
if (escapesContainment(fullPath, anchor, diagnostics)) continue;
|
|
677
|
-
const loaded = loadSkillFile(fullPath, root);
|
|
678
|
-
diagnostics.push(...loaded.diagnostics);
|
|
679
|
-
if (loaded.candidate) candidates.push(loaded.candidate);
|
|
680
|
-
}
|
|
681
|
-
return candidates;
|
|
682
|
-
}
|
|
683
|
-
function loadSkillRoot(root, diagnostics) {
|
|
684
|
-
const entries = readRootEntries(root, "skill", diagnostics);
|
|
685
|
-
if (entries.length === 0) return [];
|
|
686
|
-
return collectSkills(root, root.path, diagnostics, true);
|
|
687
|
-
}
|
|
688
|
-
function explicitSkillRoot(filePath) {
|
|
689
|
-
return {
|
|
690
|
-
path: filePath,
|
|
691
|
-
scope: "cli",
|
|
692
|
-
source: "path",
|
|
693
|
-
origin: "explicit-path",
|
|
694
|
-
precedence: SKILL_PRECEDENCE.cli,
|
|
695
|
-
trusted: true
|
|
696
|
-
};
|
|
697
|
-
}
|
|
698
|
-
function loadExplicitSkillPath(inputPath, diagnostics) {
|
|
699
|
-
const resolved = path2.resolve(inputPath);
|
|
700
|
-
const root = explicitSkillRoot(resolved);
|
|
701
|
-
if (!existsSync2(resolved)) {
|
|
702
|
-
diagnostics.push({ type: "warning", message: `explicit skill path does not exist: ${resolved}`, path: resolved });
|
|
703
|
-
return [];
|
|
704
|
-
}
|
|
705
|
-
const skillFile = path2.basename(resolved) === "SKILL.md" || resolved.endsWith(".md") ? resolved : path2.join(resolved, "SKILL.md");
|
|
706
|
-
if (!existsSync2(skillFile)) {
|
|
707
|
-
const packages = collectSkills(root, resolved, diagnostics, false);
|
|
708
|
-
if (packages.length > 0) return packages;
|
|
709
|
-
diagnostics.push({
|
|
710
|
-
type: "warning",
|
|
711
|
-
message: `explicit skill path is not a SKILL.md file, skill directory, or catalog of skill packages: ${resolved}`,
|
|
712
|
-
path: resolved
|
|
713
|
-
});
|
|
714
|
-
return [];
|
|
715
|
-
}
|
|
716
|
-
const loaded = loadSkillFile(skillFile, root);
|
|
717
|
-
diagnostics.push(...loaded.diagnostics);
|
|
718
|
-
return loaded.candidate ? [loaded.candidate] : [];
|
|
719
|
-
}
|
|
720
|
-
function compareSkillCandidates(a, b) {
|
|
721
|
-
const precedence = a.precedence - b.precedence;
|
|
722
|
-
if (precedence !== 0) return precedence;
|
|
723
|
-
const rank = interopSourceRank(b.source) - interopSourceRank(a.source);
|
|
724
|
-
if (rank !== 0) return rank;
|
|
725
|
-
return a.filePath.localeCompare(b.filePath);
|
|
726
|
-
}
|
|
727
|
-
function dedupeCanonicalSkillPaths(candidates, diagnostics) {
|
|
728
|
-
const byPath = /* @__PURE__ */ new Map();
|
|
729
|
-
for (const candidate of candidates) {
|
|
730
|
-
const list = byPath.get(candidate.canonicalPath) ?? [];
|
|
731
|
-
list.push(candidate);
|
|
732
|
-
byPath.set(candidate.canonicalPath, list);
|
|
733
|
-
}
|
|
734
|
-
const winners = [];
|
|
735
|
-
for (const entries of byPath.values()) {
|
|
736
|
-
if (entries.length === 1) {
|
|
737
|
-
const only = entries[0];
|
|
738
|
-
if (only) winners.push(only);
|
|
739
|
-
continue;
|
|
740
|
-
}
|
|
741
|
-
const sorted = [...entries].sort((a, b) => compareSkillCandidates(a.skill, b.skill));
|
|
742
|
-
const winner = sorted[sorted.length - 1];
|
|
743
|
-
if (!winner) continue;
|
|
744
|
-
winners.push(winner);
|
|
745
|
-
for (const loser of sorted.slice(0, -1)) {
|
|
746
|
-
diagnostics.push({
|
|
747
|
-
type: "warning",
|
|
748
|
-
message: `${loser.skill.name} at ${loser.skill.filePath} resolves to the same canonical skill file as ${winner.skill.filePath}, which is the entry in use`,
|
|
749
|
-
path: loser.skill.filePath
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
return winners;
|
|
754
|
-
}
|
|
755
|
-
function resolveSkillCollisions(candidates) {
|
|
756
|
-
const byName = /* @__PURE__ */ new Map();
|
|
757
|
-
for (const candidate of candidates) {
|
|
758
|
-
const key = candidate.skill.name.trim();
|
|
759
|
-
if (key.length === 0) continue;
|
|
760
|
-
const list = byName.get(key) ?? [];
|
|
761
|
-
list.push(candidate);
|
|
762
|
-
byName.set(key, list);
|
|
763
|
-
}
|
|
764
|
-
const winners = [];
|
|
765
|
-
const diagnostics = [];
|
|
766
|
-
for (const [name, entries] of byName.entries()) {
|
|
767
|
-
const sorted = [...entries].sort((a, b) => compareSkillCandidates(a.skill, b.skill));
|
|
768
|
-
const winner = sorted[sorted.length - 1];
|
|
769
|
-
if (!winner) continue;
|
|
770
|
-
winners.push(winner.skill);
|
|
771
|
-
for (const loser of sorted.slice(0, -1)) {
|
|
772
|
-
diagnostics.push({
|
|
773
|
-
type: "collision",
|
|
774
|
-
message: `${name} from ${winner.skill.source}/${winner.skill.scope} overrides ${loser.skill.source}/${loser.skill.scope}`,
|
|
775
|
-
path: loser.skill.filePath,
|
|
776
|
-
collision: {
|
|
777
|
-
name,
|
|
778
|
-
winnerPath: winner.skill.filePath,
|
|
779
|
-
loserPath: loser.skill.filePath,
|
|
780
|
-
winnerScope: winner.skill.scope,
|
|
781
|
-
loserScope: loser.skill.scope
|
|
782
|
-
}
|
|
783
|
-
});
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
return { winners, diagnostics };
|
|
787
|
-
}
|
|
788
|
-
function requiresDiagnostics(winners) {
|
|
789
|
-
const names = new Set(winners.map((skill) => skill.name));
|
|
790
|
-
const out = [];
|
|
791
|
-
for (const skill of winners) {
|
|
792
|
-
const requires = skill.metadata.requires;
|
|
793
|
-
if (!Array.isArray(requires)) continue;
|
|
794
|
-
for (const entry of requires) {
|
|
795
|
-
if (typeof entry !== "string" || !entry.startsWith("skill:")) continue;
|
|
796
|
-
const dep = entry.slice("skill:".length).trim();
|
|
797
|
-
if (dep.length === 0 || names.has(dep)) continue;
|
|
798
|
-
out.push({
|
|
799
|
-
type: "warning",
|
|
800
|
-
message: `${skill.name} requires skill "${dep}" which is not available`,
|
|
801
|
-
path: skill.filePath
|
|
802
|
-
});
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
return out;
|
|
806
|
-
}
|
|
807
|
-
function loadSkills(input = {}) {
|
|
808
|
-
const roots = input.roots ?? (input.disableDiscovery === true ? [] : defaultSkillRoots(input));
|
|
809
|
-
const diagnostics = [];
|
|
810
|
-
const candidates = [
|
|
811
|
-
...roots.flatMap((root) => loadSkillRoot(root, diagnostics)),
|
|
812
|
-
...(input.explicitSkillPaths ?? []).flatMap((skillPath) => loadExplicitSkillPath(skillPath, diagnostics))
|
|
813
|
-
];
|
|
814
|
-
const deduped = dedupeCanonicalSkillPaths(candidates, diagnostics);
|
|
815
|
-
const resolved = resolveSkillCollisions(deduped);
|
|
816
|
-
const winners = [...resolved.winners].sort((a, b) => a.name.localeCompare(b.name));
|
|
817
|
-
return {
|
|
818
|
-
items: winners,
|
|
819
|
-
diagnostics: [...diagnostics, ...resolved.diagnostics, ...requiresDiagnostics(winners)]
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
function modelVisibleSkills(skills) {
|
|
823
|
-
return skills.filter((skill) => skill.trusted && !skill.disableModelInvocation);
|
|
824
|
-
}
|
|
825
|
-
function skillCatalogValidity(list) {
|
|
826
|
-
if (list.diagnostics.some((diag) => diag.type === "error")) return { ok: false, reason: "load-error" };
|
|
827
|
-
if (list.diagnostics.some((diag) => diag.type === "collision")) return { ok: false, reason: "collision" };
|
|
828
|
-
const loadedPaths = new Set(list.items.map((skill) => skill.filePath));
|
|
829
|
-
const unloadable = list.diagnostics.some(
|
|
830
|
-
(diag) => diag.type === "warning" && diag.path !== void 0 && !loadedPaths.has(diag.path)
|
|
831
|
-
);
|
|
832
|
-
if (unloadable) return { ok: false, reason: "unloadable-file" };
|
|
833
|
-
if (list.items.length === 0) return { ok: false, reason: "no-skills" };
|
|
834
|
-
return { ok: true, reason: null };
|
|
835
|
-
}
|
|
836
|
-
var SKILL_SURFACE_CLEAR_ARG = "off";
|
|
837
|
-
function parseSkillCommand(input) {
|
|
838
|
-
const trimmed = input.trim();
|
|
839
|
-
if (!trimmed.startsWith("/skill ")) return null;
|
|
840
|
-
const rest = trimmed.slice("/skill ".length).trim();
|
|
841
|
-
const separator = rest.search(/\s/);
|
|
842
|
-
const name = separator === -1 ? rest : rest.slice(0, separator);
|
|
843
|
-
if (name.length === 0) return null;
|
|
844
|
-
const args = separator === -1 ? "" : rest.slice(separator).trim();
|
|
845
|
-
return { name, args };
|
|
846
|
-
}
|
|
847
|
-
function expandSkillInvocationInput(input, skills, _options = {}) {
|
|
848
|
-
const command = parseSkillCommand(input);
|
|
849
|
-
if (!command) return { expanded: false, text: input, args: "", diagnostics: skills.diagnostics };
|
|
850
|
-
const skill = skills.items.find((entry) => entry.name === command.name);
|
|
851
|
-
const args = command.args;
|
|
852
|
-
if (!skill) return { expanded: false, text: input, args, diagnostics: skills.diagnostics };
|
|
853
|
-
return {
|
|
854
|
-
expanded: true,
|
|
855
|
-
text: args,
|
|
856
|
-
args,
|
|
857
|
-
skill,
|
|
858
|
-
triggeredBy: "slash-command",
|
|
859
|
-
diagnostics: skills.diagnostics
|
|
860
|
-
};
|
|
861
|
-
}
|
|
862
|
-
function parsePendingSkillRequests(input, skills, options = {}) {
|
|
863
|
-
const command = parseSkillCommand(input);
|
|
864
|
-
if (command) {
|
|
865
|
-
const name = command.name;
|
|
866
|
-
const args = command.args;
|
|
867
|
-
const installedSkill = skills.items.find((entry) => entry.name === name);
|
|
868
|
-
if (installedSkill) {
|
|
869
|
-
return {
|
|
870
|
-
text: args,
|
|
871
|
-
pendingSkillRequests: [
|
|
872
|
-
{
|
|
873
|
-
name,
|
|
874
|
-
args,
|
|
875
|
-
source: "slash-command",
|
|
876
|
-
installed: true,
|
|
877
|
-
filePath: installedSkill.filePath
|
|
878
|
-
}
|
|
879
|
-
]
|
|
880
|
-
};
|
|
881
|
-
}
|
|
882
|
-
const marketplaceSkill = getMarketplaceSkills(options.cwd ? { cwd: options.cwd } : {}).find((s) => s.name === name);
|
|
883
|
-
if (marketplaceSkill) {
|
|
884
|
-
return {
|
|
885
|
-
text: args,
|
|
886
|
-
pendingSkillRequests: [
|
|
887
|
-
{
|
|
888
|
-
name,
|
|
889
|
-
args,
|
|
890
|
-
source: "marketplace",
|
|
891
|
-
installed: false,
|
|
892
|
-
marketplaceRef: marketplaceSkill.sourceUrl
|
|
893
|
-
}
|
|
894
|
-
]
|
|
895
|
-
};
|
|
896
|
-
}
|
|
897
|
-
return {
|
|
898
|
-
text: args,
|
|
899
|
-
pendingSkillRequests: [
|
|
900
|
-
{
|
|
901
|
-
name,
|
|
902
|
-
args,
|
|
903
|
-
source: "slash-command",
|
|
904
|
-
installed: false
|
|
905
|
-
}
|
|
906
|
-
]
|
|
907
|
-
};
|
|
908
|
-
}
|
|
909
|
-
return {
|
|
910
|
-
text: input,
|
|
911
|
-
pendingSkillRequests: []
|
|
912
|
-
};
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
// src/domains/resources/skills/install.ts
|
|
916
|
-
var SKILL_NAME_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
917
|
-
var CLONE_TIMEOUT_MS = 6e4;
|
|
918
|
-
function isSkillName(value) {
|
|
919
|
-
return value.length > 0 && value.length <= 64 && SKILL_NAME_PATTERN.test(value);
|
|
920
|
-
}
|
|
921
|
-
function repoRelativePath(filePath) {
|
|
922
|
-
if (path3.isAbsolute(filePath) || filePath.includes("\0")) return null;
|
|
923
|
-
const segments = filePath.split("/");
|
|
924
|
-
if (segments.some((segment) => segment === "..")) return null;
|
|
925
|
-
const normalized = path3.posix.normalize(filePath);
|
|
926
|
-
if (normalized.startsWith("..") || path3.posix.isAbsolute(normalized)) return null;
|
|
927
|
-
return normalized;
|
|
928
|
-
}
|
|
929
|
-
function parseSkillSourceSpec(source) {
|
|
930
|
-
const trimmed = source.trim();
|
|
931
|
-
if (trimmed.length === 0) return null;
|
|
932
|
-
const browser = trimmed.match(/^https:\/\/github\.com\/([^/]+)\/([^/]+)\/(?:blob|tree)\/([^/]+)\/(.+?)\/?$/);
|
|
933
|
-
if (browser?.[1] && browser[2] && browser[3] && browser[4]) {
|
|
934
|
-
const filePath = repoRelativePath(browser[4]);
|
|
935
|
-
if (!filePath) return null;
|
|
936
|
-
return {
|
|
937
|
-
kind: "github",
|
|
938
|
-
cloneUrl: `https://github.com/${browser[1]}/${browser[2]}.git`,
|
|
939
|
-
branch: browser[3],
|
|
940
|
-
filePath,
|
|
941
|
-
original: trimmed
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
|
-
const raw = trimmed.match(/^https:\/\/raw\.githubusercontent\.com\/([^/]+)\/([^/]+)\/([^/]+)\/(.+?)\/?$/);
|
|
945
|
-
if (raw?.[1] && raw[2] && raw[3] && raw[4]) {
|
|
946
|
-
const filePath = repoRelativePath(raw[4]);
|
|
947
|
-
if (!filePath) return null;
|
|
948
|
-
return {
|
|
949
|
-
kind: "github",
|
|
950
|
-
cloneUrl: `https://github.com/${raw[1]}/${raw[2]}.git`,
|
|
951
|
-
branch: raw[3],
|
|
952
|
-
filePath,
|
|
953
|
-
original: trimmed
|
|
954
|
-
};
|
|
955
|
-
}
|
|
956
|
-
if (trimmed.startsWith("http://") || trimmed.startsWith("https://")) return null;
|
|
957
|
-
const expanded = trimmed.startsWith("~/") ? path3.join(homedir2(), trimmed.slice(2)) : trimmed;
|
|
958
|
-
return { kind: "local", path: path3.resolve(expanded), original: trimmed };
|
|
959
|
-
}
|
|
960
|
-
function installingAsWorker() {
|
|
961
|
-
return process.env.CLIO_CODER_WORKER_RUN === "1";
|
|
962
|
-
}
|
|
963
|
-
function yamlQuote(value) {
|
|
964
|
-
return `"${value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
965
|
-
}
|
|
966
|
-
function canonicalizeProductMetadataBlock(lines) {
|
|
967
|
-
const hasCanonical = lines.some((line) => /^clio-coder:/.test(line));
|
|
968
|
-
const canonical = [];
|
|
969
|
-
let dropLegacyChildren = false;
|
|
970
|
-
for (const line of lines) {
|
|
971
|
-
if (/^clio:/.test(line)) {
|
|
972
|
-
dropLegacyChildren = hasCanonical;
|
|
973
|
-
if (!hasCanonical) canonical.push(line.replace(/^clio:/, "clio-coder:"));
|
|
974
|
-
continue;
|
|
975
|
-
}
|
|
976
|
-
if (dropLegacyChildren) {
|
|
977
|
-
if (line.trim().length === 0 || /^[ \t]/.test(line)) continue;
|
|
978
|
-
dropLegacyChildren = false;
|
|
979
|
-
}
|
|
980
|
-
canonical.push(line);
|
|
981
|
-
}
|
|
982
|
-
return canonical;
|
|
983
|
-
}
|
|
984
|
-
function injectProvenanceFrontmatter(rawText, fields) {
|
|
985
|
-
const region = frontmatterRegion(rawText);
|
|
986
|
-
if (!region) throw new Error("skill file is missing YAML frontmatter");
|
|
987
|
-
const kept = stripProvenanceLines(region.lines);
|
|
988
|
-
const stamps = [
|
|
989
|
-
`source-url: ${yamlQuote(fields.sourceUrl)}`,
|
|
990
|
-
`installed-at: ${yamlQuote(fields.installedAt)}`,
|
|
991
|
-
...fields.updatedAt ? [`updated-at: ${yamlQuote(fields.updatedAt)}`] : [],
|
|
992
|
-
`installed-hash: ${yamlQuote(fields.installedHash)}`,
|
|
993
|
-
// Audit is a human decision; installs always land unreviewed.
|
|
994
|
-
"audit: unknown",
|
|
995
|
-
...fields.installedBy ? [`installed-by: ${yamlQuote(fields.installedBy)}`] : []
|
|
996
|
-
];
|
|
997
|
-
const canonicalKept = canonicalizeProductMetadataBlock(kept);
|
|
998
|
-
const clioIndex = canonicalKept.findIndex((line) => /^clio-coder:/.test(line));
|
|
999
|
-
if (clioIndex >= 0 && !/^clio-coder:\s*$/.test(canonicalKept[clioIndex])) {
|
|
1000
|
-
return `${region.head}${[...canonicalKept, ...stamps].join("\n")}${region.tail}`;
|
|
1001
|
-
}
|
|
1002
|
-
const nested = stamps.map((line) => ` ${line}`);
|
|
1003
|
-
if (clioIndex < 0) {
|
|
1004
|
-
return `${region.head}${[...canonicalKept, "clio-coder:", ...nested].join("\n")}${region.tail}`;
|
|
1005
|
-
}
|
|
1006
|
-
let blockEnd = clioIndex + 1;
|
|
1007
|
-
while (blockEnd < canonicalKept.length) {
|
|
1008
|
-
const line = canonicalKept[blockEnd];
|
|
1009
|
-
if (line.trim().length > 0 && !/^[ \t]/.test(line)) break;
|
|
1010
|
-
blockEnd += 1;
|
|
1011
|
-
}
|
|
1012
|
-
return `${region.head}${[...canonicalKept.slice(0, blockEnd), ...nested, ...canonicalKept.slice(blockEnd)].join(
|
|
1013
|
-
"\n"
|
|
1014
|
-
)}${region.tail}`;
|
|
1015
|
-
}
|
|
1016
|
-
function resolveSkillDir(target) {
|
|
1017
|
-
if (!existsSync3(target)) throw new Error(`skill source path does not exist: ${target}`);
|
|
1018
|
-
const stat = statSync(target);
|
|
1019
|
-
if (stat.isFile()) {
|
|
1020
|
-
if (!target.endsWith(".md")) throw new Error(`skill source must be a SKILL.md file or directory: ${target}`);
|
|
1021
|
-
return path3.dirname(target);
|
|
1022
|
-
}
|
|
1023
|
-
if (!existsSync3(path3.join(target, "SKILL.md"))) {
|
|
1024
|
-
throw new Error(`skill source directory has no SKILL.md: ${target}`);
|
|
1025
|
-
}
|
|
1026
|
-
return target;
|
|
1027
|
-
}
|
|
1028
|
-
function fetchSource(spec) {
|
|
1029
|
-
if (spec.kind === "local") {
|
|
1030
|
-
return { skillDir: resolveSkillDir(spec.path), cleanup: () => {
|
|
1031
|
-
} };
|
|
1032
|
-
}
|
|
1033
|
-
const tmp = mkdtempSync(path3.join(tmpdir(), "clio-coder-skill-"));
|
|
1034
|
-
const cleanup = () => rmSync(tmp, { recursive: true, force: true });
|
|
1035
|
-
try {
|
|
1036
|
-
execFileSync("git", ["clone", "--depth", "1", "--branch", spec.branch, spec.cloneUrl, tmp], {
|
|
1037
|
-
stdio: "pipe",
|
|
1038
|
-
timeout: CLONE_TIMEOUT_MS
|
|
1039
|
-
});
|
|
1040
|
-
const target = path3.join(tmp, spec.filePath);
|
|
1041
|
-
if (!existsSync3(target)) {
|
|
1042
|
-
throw new Error(
|
|
1043
|
-
`${spec.cloneUrl} (branch ${spec.branch}) has no ${spec.filePath}; the source-url may name a path that branch does not carry`
|
|
1044
|
-
);
|
|
1045
|
-
}
|
|
1046
|
-
return { skillDir: resolveSkillDir(target), cleanup };
|
|
1047
|
-
} catch (err) {
|
|
1048
|
-
cleanup();
|
|
1049
|
-
throw err instanceof Error ? err : new Error(String(err));
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
function copySkillDir(from, to, exclude = []) {
|
|
1053
|
-
mkdirSync(path3.dirname(to), { recursive: true });
|
|
1054
|
-
const excluded = new Set(exclude);
|
|
1055
|
-
cpSync(from, to, {
|
|
1056
|
-
recursive: true,
|
|
1057
|
-
filter: (source) => {
|
|
1058
|
-
const base = path3.basename(source);
|
|
1059
|
-
if (base === ".git" || base === "node_modules") return false;
|
|
1060
|
-
return !(excluded.size > 0 && path3.dirname(source) === from && excluded.has(base));
|
|
1061
|
-
}
|
|
1062
|
-
});
|
|
1063
|
-
}
|
|
1064
|
-
function shapeSource(fetched, shaping) {
|
|
1065
|
-
const exclude = shaping.exclude ?? [];
|
|
1066
|
-
if (!shaping.overlay && exclude.length === 0) return fetched;
|
|
1067
|
-
if (shaping.overlay && !existsSync3(shaping.overlay)) {
|
|
1068
|
-
fetched.cleanup();
|
|
1069
|
-
throw new Error(`skill overlay directory does not exist: ${shaping.overlay}`);
|
|
1070
|
-
}
|
|
1071
|
-
const tmp = mkdtempSync(path3.join(tmpdir(), "clio-coder-skill-shape-"));
|
|
1072
|
-
const shaped = path3.join(tmp, "skill");
|
|
1073
|
-
const cleanup = () => {
|
|
1074
|
-
rmSync(tmp, { recursive: true, force: true });
|
|
1075
|
-
fetched.cleanup();
|
|
1076
|
-
};
|
|
1077
|
-
try {
|
|
1078
|
-
copySkillDir(fetched.skillDir, shaped, exclude);
|
|
1079
|
-
if (shaping.overlay) copySkillDir(shaping.overlay, shaped);
|
|
1080
|
-
return { skillDir: resolveSkillDir(shaped), cleanup };
|
|
1081
|
-
} catch (err) {
|
|
1082
|
-
cleanup();
|
|
1083
|
-
throw err instanceof Error ? err : new Error(String(err));
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
var skillSwapSequence = 0;
|
|
1087
|
-
function swapSkillDir(stage, dest) {
|
|
1088
|
-
const suffix = `${process.pid}-${++skillSwapSequence}`;
|
|
1089
|
-
const staging = `${dest}.clio-coder-staging-${suffix}`;
|
|
1090
|
-
const backup = `${dest}.clio-coder-backup-${suffix}`;
|
|
1091
|
-
rmSync(staging, { recursive: true, force: true });
|
|
1092
|
-
try {
|
|
1093
|
-
stage(staging);
|
|
1094
|
-
} catch (err) {
|
|
1095
|
-
rmSync(staging, { recursive: true, force: true });
|
|
1096
|
-
throw err;
|
|
1097
|
-
}
|
|
1098
|
-
const hadPrevious = existsSync3(dest);
|
|
1099
|
-
if (hadPrevious) renameSync(dest, backup);
|
|
1100
|
-
try {
|
|
1101
|
-
renameSync(staging, dest);
|
|
1102
|
-
} catch (err) {
|
|
1103
|
-
if (hadPrevious) renameSync(backup, dest);
|
|
1104
|
-
rmSync(staging, { recursive: true, force: true });
|
|
1105
|
-
throw err;
|
|
1106
|
-
}
|
|
1107
|
-
if (hadPrevious) rmSync(backup, { recursive: true, force: true });
|
|
1108
|
-
fsyncDirectory(path3.dirname(dest));
|
|
1109
|
-
}
|
|
1110
|
-
function destinationRoot(scope, cwd, configDir) {
|
|
1111
|
-
return scope === "user" ? path3.join(configDir ?? clioConfigDir(), "skills") : path3.join(cwd, ".clio-coder", "skills");
|
|
1112
|
-
}
|
|
1113
|
-
function validateSourceSkill(skillDir) {
|
|
1114
|
-
const list = loadSkills({ disableDiscovery: true, explicitSkillPaths: [skillDir] });
|
|
1115
|
-
const errors = list.diagnostics.filter((diag) => diag.type === "error");
|
|
1116
|
-
if (errors.length > 0) {
|
|
1117
|
-
throw new Error(`skill source failed validation: ${errors.map((diag) => diag.message).join("; ")}`);
|
|
1118
|
-
}
|
|
1119
|
-
const skill = list.items[0];
|
|
1120
|
-
if (!skill || list.items.length !== 1) {
|
|
1121
|
-
throw new Error(`skill source did not resolve to exactly one skill: ${skillDir}`);
|
|
1122
|
-
}
|
|
1123
|
-
return { skill, warnings: list.diagnostics.map((diag) => diag.message) };
|
|
1124
|
-
}
|
|
1125
|
-
function installSkillFromSource(input) {
|
|
1126
|
-
const spec = parseSkillSourceSpec(input.source);
|
|
1127
|
-
if (!spec) throw new Error(`unsupported skill source: ${input.source}`);
|
|
1128
|
-
const cwd = input.cwd ?? process.cwd();
|
|
1129
|
-
const scope = input.scope ?? "project";
|
|
1130
|
-
const fetched = shapeSource(fetchSource(spec), input);
|
|
1131
|
-
try {
|
|
1132
|
-
const { skill, warnings } = validateSourceSkill(fetched.skillDir);
|
|
1133
|
-
const name = (input.name ?? skill.name).trim();
|
|
1134
|
-
if (!isSkillName(name)) {
|
|
1135
|
-
throw new Error(`invalid skill name "${name}": use lowercase letters, numbers, and single hyphens`);
|
|
1136
|
-
}
|
|
1137
|
-
const dest = path3.join(destinationRoot(scope, cwd, input.configDir), name);
|
|
1138
|
-
if (existsSync3(dest) && input.force !== true) {
|
|
1139
|
-
throw new Error(`skill already installed at ${dest} (use --force to overwrite)`);
|
|
1140
|
-
}
|
|
1141
|
-
const sourceRaw = readFileSync3(skill.filePath, "utf8");
|
|
1142
|
-
const installedHash = normalizedSkillHash(sourceRaw);
|
|
1143
|
-
const destFile = path3.join(dest, "SKILL.md");
|
|
1144
|
-
swapSkillDir((staging) => {
|
|
1145
|
-
copySkillDir(fetched.skillDir, staging);
|
|
1146
|
-
writeFileSync(
|
|
1147
|
-
path3.join(staging, "SKILL.md"),
|
|
1148
|
-
injectProvenanceFrontmatter(sourceRaw, {
|
|
1149
|
-
sourceUrl: spec.original,
|
|
1150
|
-
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1151
|
-
installedHash,
|
|
1152
|
-
...installingAsWorker() ? { installedBy: "worker" } : {}
|
|
1153
|
-
}),
|
|
1154
|
-
"utf8"
|
|
1155
|
-
);
|
|
1156
|
-
}, dest);
|
|
1157
|
-
const after = loadSkills({ cwd, ...scope === "user" && input.configDir ? { configDir: input.configDir } : {} });
|
|
1158
|
-
const installWarnings = after.diagnostics.filter((diag) => diag.path && path3.resolve(diag.path).startsWith(dest)).map((diag) => diag.message);
|
|
1159
|
-
return {
|
|
1160
|
-
name,
|
|
1161
|
-
scope,
|
|
1162
|
-
path: destFile,
|
|
1163
|
-
sourceUrl: spec.original,
|
|
1164
|
-
installedHash,
|
|
1165
|
-
warnings: [...warnings, ...installWarnings]
|
|
1166
|
-
};
|
|
1167
|
-
} finally {
|
|
1168
|
-
fetched.cleanup();
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
function managedSkills(cwd, configDir) {
|
|
1172
|
-
const list = loadSkills({ cwd, ...configDir ? { configDir } : {} });
|
|
1173
|
-
return list.items.filter(
|
|
1174
|
-
(skill) => skill.source === "clio-coder" && (skill.scope === "user" || skill.scope === "project")
|
|
1175
|
-
);
|
|
1176
|
-
}
|
|
1177
|
-
function updateOne(skill, force, shaping = {}) {
|
|
1178
|
-
const sourceUrl = skill.provenance?.installUrl;
|
|
1179
|
-
if (!sourceUrl) return { name: skill.name, status: "no-source", detail: "no source-url provenance recorded" };
|
|
1180
|
-
const spec = parseSkillSourceSpec(sourceUrl);
|
|
1181
|
-
if (!spec) return { name: skill.name, status: "error", detail: `unsupported source-url: ${sourceUrl}` };
|
|
1182
|
-
let fetched;
|
|
1183
|
-
try {
|
|
1184
|
-
fetched = shapeSource(fetchSource(spec), shaping);
|
|
1185
|
-
} catch (err) {
|
|
1186
|
-
return { name: skill.name, status: "error", detail: err instanceof Error ? err.message : String(err) };
|
|
1187
|
-
}
|
|
1188
|
-
try {
|
|
1189
|
-
validateSourceSkill(fetched.skillDir);
|
|
1190
|
-
const remoteFile = path3.join(fetched.skillDir, "SKILL.md");
|
|
1191
|
-
const remoteRaw = readFileSync3(remoteFile, "utf8");
|
|
1192
|
-
const remoteHash = normalizedSkillHash(remoteRaw);
|
|
1193
|
-
const localRaw = readFileSync3(skill.filePath, "utf8");
|
|
1194
|
-
const localHash = normalizedSkillHash(localRaw);
|
|
1195
|
-
const recordedHash = skill.provenance?.installedHash ?? null;
|
|
1196
|
-
if (remoteHash === localHash) return { name: skill.name, status: "up-to-date" };
|
|
1197
|
-
const locallyModified = recordedHash === null || localHash !== recordedHash;
|
|
1198
|
-
if (locallyModified && !force) {
|
|
1199
|
-
return { name: skill.name, status: "local-changes", detail: "skipped, use --force to overwrite" };
|
|
1200
|
-
}
|
|
1201
|
-
swapSkillDir((staging) => {
|
|
1202
|
-
copySkillDir(fetched.skillDir, staging);
|
|
1203
|
-
writeFileSync(
|
|
1204
|
-
path3.join(staging, "SKILL.md"),
|
|
1205
|
-
injectProvenanceFrontmatter(remoteRaw, {
|
|
1206
|
-
sourceUrl,
|
|
1207
|
-
installedAt: skill.provenance?.installedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
1208
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1209
|
-
installedHash: remoteHash,
|
|
1210
|
-
// Who installed a skill is set once; an update, worker- or
|
|
1211
|
-
// operator-run, does not change who put it there originally.
|
|
1212
|
-
...skill.provenance?.installedBy ? { installedBy: skill.provenance.installedBy } : {}
|
|
1213
|
-
}),
|
|
1214
|
-
"utf8"
|
|
1215
|
-
);
|
|
1216
|
-
}, skill.baseDir);
|
|
1217
|
-
return { name: skill.name, status: "updated" };
|
|
1218
|
-
} catch (err) {
|
|
1219
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
1220
|
-
return { name: skill.name, status: "error", detail: reason };
|
|
1221
|
-
} finally {
|
|
1222
|
-
fetched.cleanup();
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
function updateSkills(input = {}) {
|
|
1226
|
-
const cwd = input.cwd ?? process.cwd();
|
|
1227
|
-
const skills = managedSkills(cwd, input.configDir);
|
|
1228
|
-
const shapingFor = (skill) => skill.provenance?.installUrl && input.resolveShaping?.({ name: skill.name, sourceUrl: skill.provenance.installUrl }) || {};
|
|
1229
|
-
if (input.name) {
|
|
1230
|
-
const skill = skills.find((entry) => entry.name === input.name);
|
|
1231
|
-
if (!skill) return [{ name: input.name, status: "error", detail: "not found in Clio-managed skill roots" }];
|
|
1232
|
-
return [updateOne(skill, input.force === true, shapingFor(skill))];
|
|
1233
|
-
}
|
|
1234
|
-
if (input.all !== true) throw new Error("updateSkills requires a name or all=true");
|
|
1235
|
-
return skills.filter((skill) => skill.provenance?.installUrl).map((skill) => updateOne(skill, input.force === true, shapingFor(skill)));
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
export {
|
|
1239
|
-
parseSkillSourceSpec,
|
|
1240
|
-
updateSkills,
|
|
1241
|
-
MARKETPLACE_UNCONFIGURED,
|
|
1242
|
-
discoverMarketplaceSkills,
|
|
1243
|
-
getMarketplaceSkills,
|
|
1244
|
-
marketplaceInstallShaping,
|
|
1245
|
-
resolveMarketplaceShaping,
|
|
1246
|
-
installSkill,
|
|
1247
|
-
projectCompatTrusted,
|
|
1248
|
-
defaultSkillRoots,
|
|
1249
|
-
loadSkills,
|
|
1250
|
-
modelVisibleSkills,
|
|
1251
|
-
skillCatalogValidity,
|
|
1252
|
-
SKILL_SURFACE_CLEAR_ARG,
|
|
1253
|
-
parseSkillCommand,
|
|
1254
|
-
expandSkillInvocationInput,
|
|
1255
|
-
parsePendingSkillRequests
|
|
1256
|
-
};
|
|
1257
|
-
//# sourceMappingURL=chunk-536HXRFE.js.map
|