@iowarp/clio-coder 0.4.9 → 0.5.0
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 +11 -3
- package/CHANGELOG.md +153 -0
- package/CODE_OF_CONDUCT.md +10 -0
- package/CONTRIBUTING.md +208 -382
- package/NOTICE +8 -2
- package/README.md +199 -418
- package/ROADMAP.md +82 -0
- package/SECURITY.md +14 -11
- package/dist/acp-KS7ARGV6.js +132 -0
- package/dist/agents-YOGJ2YEJ.js +163 -0
- package/dist/assets/codewiki.json +1 -1
- package/dist/auth-CEDCO6O6.js +557 -0
- package/dist/background-YWTBPSQU.js +39 -0
- package/dist/builtins-GDYO4RTR.js +23 -0
- package/dist/chunk-27YTM2CV.js +175 -0
- package/dist/chunk-2AF6YC7Q.js +75 -0
- package/dist/chunk-2DTIWSAW.js +381 -0
- package/dist/chunk-2EMLKSCX.js +262 -0
- package/dist/chunk-2OJ3YZQP.js +665 -0
- package/dist/chunk-2VLYHHFT.js +35 -0
- package/dist/chunk-2WVPJF3Z.js +204 -0
- package/dist/chunk-33OASOS6.js +176 -0
- package/dist/chunk-3BD2LXYJ.js +19 -0
- package/dist/chunk-3JHUFKG7.js +30 -0
- package/dist/chunk-3JLTRPN7.js +711 -0
- package/dist/chunk-3LT34CAM.js +2796 -0
- package/dist/chunk-3O5JWP4L.js +1670 -0
- package/dist/chunk-3UW3KU4A.js +21 -0
- package/dist/chunk-4A6YRGV4.js +569 -0
- package/dist/chunk-4D2BRCZ3.js +67 -0
- package/dist/chunk-4SYHGVDE.js +668 -0
- package/dist/chunk-4VDHLCF5.js +66 -0
- package/dist/chunk-4WOOTKFD.js +637 -0
- package/dist/chunk-4WV4PI66.js +80 -0
- package/dist/chunk-53OXPRI6.js +195 -0
- package/dist/chunk-55RMDDFM.js +1347 -0
- package/dist/chunk-56XP4FJU.js +2025 -0
- package/dist/chunk-5B3RTYAK.js +123 -0
- package/dist/chunk-5CD243WE.js +45 -0
- package/dist/chunk-5JQR5B4D.js +709 -0
- package/dist/chunk-5KQEUIWM.js +597 -0
- package/dist/chunk-5LP5FNNR.js +915 -0
- package/dist/chunk-62UK7AGW.js +9344 -0
- package/dist/chunk-6CTHLZFB.js +563 -0
- package/dist/chunk-6EJYVCTN.js +23 -0
- package/dist/chunk-6OWUM2NC.js +12289 -0
- package/dist/chunk-6RJMYYIE.js +1023 -0
- package/dist/chunk-6W75D37F.js +643 -0
- package/dist/chunk-733ZBT5P.js +1721 -0
- package/dist/chunk-77DCC6JZ.js +3710 -0
- package/dist/chunk-7QXCO3AF.js +156 -0
- package/dist/chunk-7RET77VB.js +481 -0
- package/dist/chunk-A4MVRV4C.js +65 -0
- package/dist/chunk-ALJWT6O6.js +93 -0
- package/dist/chunk-AVSR2HKI.js +232 -0
- package/dist/chunk-B7GY6QER.js +42 -0
- package/dist/chunk-BFOSV5EZ.js +178 -0
- package/dist/chunk-BGOIM7NB.js +103 -0
- package/dist/chunk-BJH6WFIB.js +372 -0
- package/dist/chunk-BOBCCDJ6.js +1533 -0
- package/dist/chunk-BRCOSE7O.js +117 -0
- package/dist/chunk-BYFHHCFV.js +601 -0
- package/dist/chunk-C2CPOIH2.js +83 -0
- package/dist/chunk-C7AQTPCE.js +694 -0
- package/dist/chunk-CBAQPTDU.js +165 -0
- package/dist/chunk-CDQ2UC6W.js +125 -0
- package/dist/chunk-CN6SW5DC.js +177 -0
- package/dist/chunk-CRHPCPZP.js +132 -0
- package/dist/chunk-CTFPFW3H.js +44 -0
- package/dist/chunk-D3KWFOUT.js +103 -0
- package/dist/chunk-D65E25JG.js +185 -0
- package/dist/chunk-DCGHJQ2U.js +236 -0
- package/dist/chunk-DE2LU267.js +106 -0
- package/dist/chunk-DF6PI6GN.js +97 -0
- package/dist/chunk-DGC6X6XR.js +53 -0
- package/dist/chunk-DOUISWEE.js +526 -0
- package/dist/chunk-DR3TAEUA.js +188 -0
- package/dist/chunk-DVTBERFY.js +33 -0
- package/dist/chunk-DXSETN72.js +1051 -0
- package/dist/chunk-DZLR4UEH.js +128 -0
- package/dist/chunk-E6IPKW2E.js +77 -0
- package/dist/chunk-EG4ARXPC.js +139 -0
- package/dist/chunk-EKV4UBCM.js +652 -0
- package/dist/chunk-EOJPDNUP.js +1325 -0
- package/dist/chunk-EX57VVWW.js +4157 -0
- package/dist/chunk-EYTLV3W3.js +5937 -0
- package/dist/chunk-EZD2BXGP.js +475 -0
- package/dist/chunk-EZDCA34W.js +314 -0
- package/dist/chunk-FD2I4KBR.js +33 -0
- package/dist/chunk-FD3IAHQM.js +27 -0
- package/dist/chunk-FFYTC2KQ.js +416 -0
- package/dist/chunk-FGSQHUCK.js +110 -0
- package/dist/chunk-GCQFN7YI.js +32 -0
- package/dist/chunk-GGPF6LLE.js +38 -0
- package/dist/chunk-GGWI3OVM.js +215 -0
- package/dist/chunk-GLIQT7SU.js +172 -0
- package/dist/chunk-GN7QBEEI.js +95 -0
- package/dist/chunk-GRHOXDKB.js +1104 -0
- package/dist/chunk-HMN2C6YL.js +54 -0
- package/dist/chunk-HOEDA42N.js +310 -0
- package/dist/chunk-HOYZUKG7.js +192 -0
- package/dist/chunk-HQVN7G4F.js +1021 -0
- package/dist/chunk-HSQQFDB3.js +519 -0
- package/dist/chunk-I4ELN5BX.js +47 -0
- package/dist/chunk-I4Y4WKZR.js +386 -0
- package/dist/chunk-IFPDAD7R.js +797 -0
- package/dist/chunk-IN7DGBVS.js +582 -0
- package/dist/chunk-ISHUS7HC.js +396 -0
- package/dist/chunk-JPXLJSGR.js +191 -0
- package/dist/chunk-JQCLXSFI.js +69 -0
- package/dist/chunk-KBUTSJSR.js +61 -0
- package/dist/chunk-KW5HXKLJ.js +56 -0
- package/dist/chunk-L4APUGCT.js +139 -0
- package/dist/chunk-L7G7K4I2.js +505 -0
- package/dist/chunk-LAR7DX5E.js +1840 -0
- package/dist/chunk-LAVUQX3B.js +462 -0
- package/dist/chunk-LJRBX7QR.js +116 -0
- package/dist/chunk-LNOXCGN2.js +1864 -0
- package/dist/chunk-LTWH2ACR.js +23002 -0
- package/dist/chunk-LYJJ6546.js +661 -0
- package/dist/chunk-M2IPMWCN.js +457 -0
- package/dist/chunk-MGLRTOCK.js +101 -0
- package/dist/chunk-MZF5IKZT.js +160 -0
- package/dist/chunk-N24R6KWS.js +386 -0
- package/dist/chunk-NASYVWDB.js +604 -0
- package/dist/chunk-NBXFPI7U.js +195 -0
- package/dist/chunk-NDPF2N2L.js +400 -0
- package/dist/chunk-NFSK2VNU.js +446 -0
- package/dist/chunk-NG3QQSXY.js +43 -0
- package/dist/chunk-NOCSM22Y.js +63 -0
- package/dist/chunk-NVPXXW2H.js +1143 -0
- package/dist/chunk-O63U2I6I.js +30 -0
- package/dist/chunk-OJXOA6YU.js +98 -0
- package/dist/chunk-OPD7GL6F.js +1196 -0
- package/dist/chunk-OQ2EOAHA.js +14399 -0
- package/dist/chunk-OV62D6KO.js +688 -0
- package/dist/chunk-OZ76TLGU.js +740 -0
- package/dist/chunk-P4GNZPXO.js +1156 -0
- package/dist/chunk-PS6JAWJZ.js +78 -0
- package/dist/chunk-PXRCXGLK.js +1865 -0
- package/dist/chunk-QDUUOZ3S.js +108 -0
- package/dist/chunk-QG6I2T5E.js +1416 -0
- package/dist/chunk-QHSBROEW.js +308 -0
- package/dist/chunk-QNUQ7K7D.js +46 -0
- package/dist/chunk-QZTTRSJE.js +333 -0
- package/dist/chunk-R2UUNSNQ.js +1605 -0
- package/dist/chunk-R7FGRZNF.js +1794 -0
- package/dist/chunk-RNDCROSG.js +199 -0
- package/dist/chunk-S36CXHO2.js +302 -0
- package/dist/chunk-SJGS3GDI.js +575 -0
- package/dist/chunk-SQZHXUB3.js +510 -0
- package/dist/chunk-SUTLW6ND.js +686 -0
- package/dist/chunk-SYF7FVBL.js +179 -0
- package/dist/chunk-T2MDZES3.js +1577 -0
- package/dist/chunk-T33IYTZM.js +1146 -0
- package/dist/chunk-TDGYTWM6.js +49 -0
- package/dist/chunk-TGL5FZVD.js +132 -0
- package/dist/chunk-TGWZXJ7L.js +1205 -0
- package/dist/chunk-TKDRT2DF.js +114 -0
- package/dist/chunk-TV2EBCSQ.js +152 -0
- package/dist/chunk-U26XXPJS.js +367 -0
- package/dist/chunk-U5QU5ZOD.js +419 -0
- package/dist/chunk-U6YTUVOX.js +1011 -0
- package/dist/chunk-UCINIRHW.js +188 -0
- package/dist/chunk-UJD5MPP6.js +52 -0
- package/dist/chunk-URCXX7WJ.js +146 -0
- package/dist/chunk-UX2L5CUD.js +898 -0
- package/dist/chunk-UZVYEF57.js +114 -0
- package/dist/chunk-V35KZDUZ.js +218 -0
- package/dist/chunk-VESL6DQY.js +1058 -0
- package/dist/chunk-VKHLUZNO.js +986 -0
- package/dist/chunk-VOYUCAQF.js +584 -0
- package/dist/chunk-VYRQHORQ.js +414 -0
- package/dist/chunk-W53XSRQE.js +245 -0
- package/dist/chunk-X4CEFOSG.js +226 -0
- package/dist/chunk-XDHUDE5K.js +380 -0
- package/dist/chunk-XISLDHEL.js +1290 -0
- package/dist/chunk-XM34YQ2Y.js +169 -0
- package/dist/chunk-XMDBTYCH.js +661 -0
- package/dist/chunk-XS2QPZJE.js +449 -0
- package/dist/chunk-YBUECLAF.js +618 -0
- package/dist/chunk-YQ6XEFVK.js +332 -0
- package/dist/chunk-YYLCPDCC.js +990 -0
- package/dist/chunk-Z4GLJ6J4.js +1035 -0
- package/dist/chunk-ZARZ4POR.js +210 -0
- package/dist/chunk-ZJPORZTC.js +119 -0
- package/dist/chunk-ZNUZ3EXD.js +243 -0
- package/dist/chunk-ZPST2KQO.js +49 -0
- package/dist/chunk-ZR5YA6ZF.js +512 -0
- package/dist/chunk-ZU4JPCPR.js +319 -0
- package/dist/chunk-ZUKUCZYZ.js +39 -0
- package/dist/cli/index.js +56 -45
- package/dist/clio-K2PBVCEM.js +27 -0
- package/dist/clio-context-tools-GR4OHFSO.js +145 -0
- package/dist/code-nav-4X3OI6DK.js +715 -0
- package/dist/codewiki/build-worker.js +4 -4
- package/dist/compile-cache-YRB6QRO7.js +18 -0
- package/dist/components-RQOJ6NUR.js +675 -0
- package/dist/config-Q5J7UBAB.js +291 -0
- package/dist/config-XE7XYZLU.js +38 -0
- package/dist/config-graph-P3555574.js +175 -0
- package/dist/configure-KIJ32ZO6.js +104 -0
- package/dist/context-LFBQOSXT.js +344 -0
- package/dist/context-NNLBES2Y.js +82 -0
- package/dist/context-WBH3KSVR.js +302 -0
- package/dist/context-clear-YOHMQ6SQ.js +208 -0
- package/dist/context-index-X2N5UAIF.js +120 -0
- package/dist/context-map-HOSMGUG2.js +555 -0
- package/dist/context-working-set-MRAEVDNV.js +1564 -0
- package/dist/data-tool-JJPBGMQJ.js +2986 -0
- package/dist/detail-RHJOTGN4.js +139 -0
- package/dist/dispatch-runner-NC7PYNIO.js +2477 -0
- package/dist/docs-K4GBWRUX.js +342 -0
- package/dist/doctor-S5KZ2GTN.js +1138 -0
- package/dist/doctor-deep-2EJQSHIZ.js +130 -0
- package/dist/domain-loader-MB34FDPD.js +13 -0
- package/dist/eval-3D6M36N7.js +5220 -0
- package/dist/eval-inventory-SM3HNM47.js +260 -0
- package/dist/evals-FO6JEUCN.js +104 -0
- package/dist/evidence-6IYN52ET.js +262 -0
- package/dist/evidence-JVECPI3F.js +250 -0
- package/dist/evidence-XNVPPLVK.js +410 -0
- package/dist/evolve-TLPUDJDM.js +634 -0
- package/dist/extensions-ROZJ5X3J.js +311 -0
- package/dist/fleet-6RJWIOEO.js +284 -0
- package/dist/fleet-WKVBF5SZ.js +942 -0
- package/dist/fleet-commands-L6WFT7KZ.js +76 -0
- package/dist/fleet-decisions-BTQMWU5A.js +55 -0
- package/dist/fleet-graph-553DZ67Q.js +141 -0
- package/dist/fleet-inspect-236FZPRB.js +329 -0
- package/dist/fleet-new-CKUXP3CO.js +48 -0
- package/dist/fleet-preflight-NZQHABWO.js +95 -0
- package/dist/fleet-validate-7NLAE26R.js +96 -0
- package/dist/fleet-verify-E3RO6A5W.js +226 -0
- package/dist/fleet-view-KMZQY7YJ.js +144 -0
- package/dist/gui/client/assets/abnfDiagram-VCTEODGH-DPBWQwNn.js +1 -0
- package/dist/gui/client/assets/architecture-7GRP2DOG-D1w8FrFW.js +1 -0
- package/dist/gui/client/assets/architectureDiagram-5GKGNRK7-CVPgKd1-.js +36 -0
- package/dist/gui/client/assets/blockDiagram-I7D4REHJ-BLmnqkK5.js +129 -0
- package/dist/gui/client/assets/c4Diagram-7LVT6UL2-4AU9cfM7.js +38 -0
- package/dist/gui/client/assets/channel-DwFZ0m8S.js +1 -0
- package/dist/gui/client/assets/chunk-4HAMMTFA-EOWkKCav.js +62 -0
- package/dist/gui/client/assets/chunk-75Z2AOVW-CygeoIMl.js +2 -0
- package/dist/gui/client/assets/chunk-DU6HZSFF-s27fViLb.js +125 -0
- package/dist/gui/client/assets/chunk-F27PBJKO-BrHvwLsZ.js +1 -0
- package/dist/gui/client/assets/chunk-GMAD6QVW-DzPh-7jt.js +72 -0
- package/dist/gui/client/assets/chunk-GVQU2GXP-pIaQkIzm.js +1 -0
- package/dist/gui/client/assets/chunk-IMKFNOWR-BGJVE_Br.js +231 -0
- package/dist/gui/client/assets/chunk-L3NEJ4N5-B3YLuhww.js +1 -0
- package/dist/gui/client/assets/chunk-OSK3NFVY-BRj61HHU.js +10 -0
- package/dist/gui/client/assets/chunk-P2QGCYS3-Sno90KxP.js +1 -0
- package/dist/gui/client/assets/chunk-POPQ4Y6H-Cw8NTbxr.js +1 -0
- package/dist/gui/client/assets/chunk-PWAF6VOD-BIhHgz37.js +1 -0
- package/dist/gui/client/assets/chunk-SHT3W25Y-Cqv7npBj.js +168 -0
- package/dist/gui/client/assets/chunk-SVP7TREG-Hxzl6Dee.js +88 -0
- package/dist/gui/client/assets/chunk-TICWLB2K-CIFVyVP2.js +206 -0
- package/dist/gui/client/assets/classDiagram-ZZMXUADV-BJbAiI_w.js +1 -0
- package/dist/gui/client/assets/classDiagram-v2-VYDZK3BY-BJbAiI_w.js +1 -0
- package/dist/gui/client/assets/cynefin-OW5HDTMX-DecLWZ-y.js +1 -0
- package/dist/gui/client/assets/cynefinDiagram-5FMLGOSQ-CK-T2N-D.js +62 -0
- package/dist/gui/client/assets/dagre-GXQ25YYZ-C0dfg-OS.js +4 -0
- package/dist/gui/client/assets/diagram-S7CK7UJ4-EaJukVh-.js +30 -0
- package/dist/gui/client/assets/diagram-UQ7AKVKN-xcOucEtP.js +41 -0
- package/dist/gui/client/assets/diagram-VSXAHHWV-3AUJACMf.js +3 -0
- package/dist/gui/client/assets/diagram-VX7I27RA-TPknLqam.js +24 -0
- package/dist/gui/client/assets/diagram-Z3DM3KII-wa1q3YMF.js +24 -0
- package/dist/gui/client/assets/ebnfDiagram-PWID7BFC-JBCF2-s7.js +1 -0
- package/dist/gui/client/assets/erDiagram-RLTQ6QDP-CmXjXPc4.js +99 -0
- package/dist/gui/client/assets/eventmodeling-NTZA5JFV-D_1aJWYl.js +1 -0
- package/dist/gui/client/assets/flowDiagram-HODETNUW-BQtZlael.js +1 -0
- package/dist/gui/client/assets/framework-Bq-znqwW.js +9 -0
- package/dist/gui/client/assets/ganttDiagram-EL5Y4UJY-IPaL_kaa.js +292 -0
- package/dist/gui/client/assets/gitGraph-4MIJSDKK-Oy0Q3hoc.js +1 -0
- package/dist/gui/client/assets/gitGraphDiagram-WWUBYQGX-jtAuBmbc.js +106 -0
- package/dist/gui/client/assets/index-CuFuBEdL.css +1 -0
- package/dist/gui/client/assets/index-hMbEIsX0.js +87 -0
- package/dist/gui/client/assets/info-A6RAGUB7-UtEs1tv7.js +1 -0
- package/dist/gui/client/assets/infoDiagram-27XIBGKW-hlwR1pBW.js +2 -0
- package/dist/gui/client/assets/ishikawaDiagram-5VMMS53U-C6vMtfsd.js +70 -0
- package/dist/gui/client/assets/journeyDiagram-3NMN7TZE-EAwAl_PS.js +139 -0
- package/dist/gui/client/assets/kanban-definition-UXKFOSKX-CQOhRKHW.js +89 -0
- package/dist/gui/client/assets/line-DbcwGZTW.js +1 -0
- package/dist/gui/client/assets/mermaid-parser.core-C2QfVcHd.js +7 -0
- package/dist/gui/client/assets/mermaid.core-N9qUTre1.js +44 -0
- package/dist/gui/client/assets/mindmap-definition-YA3MSWOX-BR_FL9gK.js +96 -0
- package/dist/gui/client/assets/packet-AYTQ26CC-CbBJ2oAa.js +1 -0
- package/dist/gui/client/assets/pegDiagram-XKGWAZYB-BruU0IHM.js +1 -0
- package/dist/gui/client/assets/pie-WAS4IAKB-BWdSng4H.js +1 -0
- package/dist/gui/client/assets/pieDiagram-E7YTZNPT-CR3ljgdU.js +39 -0
- package/dist/gui/client/assets/quadrantDiagram-AXDQQJYC-C-boKslr.js +7 -0
- package/dist/gui/client/assets/radar-RG4KPBEZ-CGlOnAKG.js +1 -0
- package/dist/gui/client/assets/railroad-74A4TZTK-CDvuAlyC.js +1 -0
- package/dist/gui/client/assets/railroad-abnf-HS5TGJTU-CQUA9crC.js +1 -0
- package/dist/gui/client/assets/railroad-ebnf-LZEXJU2U-CD857gxq.js +1 -0
- package/dist/gui/client/assets/railroad-peg-WCYAUIDC-DUV4k35E.js +1 -0
- package/dist/gui/client/assets/railroadDiagram-O6MQD6OU-DMR4LXmA.js +1 -0
- package/dist/gui/client/assets/requirementDiagram-BXWQKSXE-DVltaF6c.js +84 -0
- package/dist/gui/client/assets/sankeyDiagram-P5KCCOFB-CHdNz472.js +40 -0
- package/dist/gui/client/assets/sequenceDiagram-WJ2MYXX4-DaMafIty.js +162 -0
- package/dist/gui/client/assets/stateDiagram-D77RDMKH-CEbBHqn3.js +1 -0
- package/dist/gui/client/assets/stateDiagram-v2-MP3YSRHH-B3JgDdFg.js +1 -0
- package/dist/gui/client/assets/swimlanes-42K2YHIH-BlPHndnJ.js +1 -0
- package/dist/gui/client/assets/swimlanesDiagram-VR7AAH4N-BPabHwsZ.js +8 -0
- package/dist/gui/client/assets/timeline-definition-24CTP7MA-E4Y1lPBI.js +120 -0
- package/dist/gui/client/assets/treeView-Q6P3EWNA-DrY0uhTN.js +1 -0
- package/dist/gui/client/assets/treemap-WGGIJYW6-CVotnLHf.js +1 -0
- package/dist/gui/client/assets/vennDiagram-4TSXK5OY-DJNrLIOF.js +34 -0
- package/dist/gui/client/assets/wardley-WFR3VGLG-ClOpAp5S.js +1 -0
- package/dist/gui/client/assets/wardleyDiagram-VM6X3IG4-qhMoKOXc.js +78 -0
- package/dist/gui/client/assets/xychartDiagram-S5SC5T6Z-CTuXoo9R.js +7 -0
- package/dist/gui/client/index.html +6 -0
- package/dist/gui/ops-worker.js +167 -0
- package/dist/gui/reads-worker.js +473 -0
- package/dist/gui/server.js +9780 -0
- package/dist/gui-QJS7XQMV.js +16 -0
- package/dist/init-DV5B6HQG.js +354 -0
- package/dist/install-6C45YXFP.js +19 -0
- package/dist/install-O7NSRU2W.js +13 -0
- package/dist/interactive-OXGYZYAS.js +22381 -0
- package/dist/interop-J7UOBOSF.js +254 -0
- package/dist/inventory-OEGIL6PY.js +144 -0
- package/dist/library-B3UPGY4V.js +83 -0
- package/dist/library-MXQA5DLT.js +309 -0
- package/dist/library-ROZAMUIL.js +496 -0
- package/dist/library-import-2LTWOVBD.js +190 -0
- package/dist/library-inventory-LJ3XHLWO.js +60 -0
- package/dist/library-validation-DARHHUNW.js +46 -0
- package/dist/mcp-2GSPYQ54.js +28 -0
- package/dist/memory-J3STUUIK.js +537 -0
- package/dist/models-Y3GMFJ2V.js +314 -0
- package/dist/monitor-LHNH577J.js +811 -0
- package/dist/orchestrator-DTAPXULA.js +12117 -0
- package/dist/panes-A743ONZ5.js +103 -0
- package/dist/panes-CTNO57ZY.js +76 -0
- package/dist/paths-3SBYJQDP.js +68 -0
- package/dist/preload-OJBMAIXF.js +140 -0
- package/dist/providers-CMETPZNS.js +232 -0
- package/dist/registry-37T4U6X2.js +15 -0
- package/dist/reset-O7EUCYWO.js +346 -0
- package/dist/resources-FY6XYFN2.js +189 -0
- package/dist/run-H64MEVTA.js +1067 -0
- package/dist/run-script-PQ5NRU3X.js +42 -0
- package/dist/settings-SNIQNXCW.js +73 -0
- package/dist/settings-controls-X6GMCPVG.js +202 -0
- package/dist/share-CAFMMQLM.js +299 -0
- package/dist/skills-ERKQUC7L.js +114 -0
- package/dist/skills-eval-CQ23MYQK.js +1099 -0
- package/dist/skills-inventory-TVUYJDVN.js +142 -0
- package/dist/slash-commands-ROG3KIFJ.js +107 -0
- package/dist/startup-background-KDWCQMWT.js +247 -0
- package/dist/steer-KKYXJSH4.js +77 -0
- package/dist/support-M3RCUUEL.js +40 -0
- package/dist/system-ZDW44ZGX.js +142 -0
- package/dist/target-runtimes-PWA22WVW.js +73 -0
- package/dist/targets-AJWA6E7Z.js +1207 -0
- package/dist/tasks-6L2JJRC5.js +39 -0
- package/dist/terminal-lease-YFUSDPAD.js +432 -0
- package/dist/tools-5XJUABRD.js +30 -0
- package/dist/trace-LA5MVR4Y.js +527 -0
- package/dist/tree-sitter-TQW3Y52T.js +4673 -0
- package/dist/tui-primitives-IUCVWLH5.js +19 -0
- package/dist/uninstall-SAWGGXAB.js +448 -0
- package/dist/upgrade-HSNSVTZG.js +300 -0
- package/dist/usage-XSILDHKF.js +1083 -0
- package/dist/verifiers-ECA5GIHL.js +633 -0
- package/dist/verify-R6QQCCEB.js +31 -0
- package/dist/version-PLZYB5KW.js +22 -0
- package/dist/web-fetch-PVZNMBOB.js +803 -0
- package/dist/wiki-generate-RP22WP5K.js +647 -0
- package/dist/with-panes-W3PAZPRF.js +629 -0
- package/dist/worker/entry.js +324 -284
- package/dist/workspace-check-3764ZKC2.js +83 -0
- package/docs/README.md +26 -10
- package/docs/architecture/acp.md +179 -12
- package/docs/architecture/artifact-placement.md +1 -1
- package/docs/architecture/capacity-and-scheduling.md +7 -8
- package/docs/architecture/context-engine.md +350 -95
- package/docs/architecture/model-catalog.md +18 -11
- package/docs/architecture/observability.md +1 -1
- package/docs/architecture/pi-boundary.md +59 -6
- package/docs/architecture/prompt-envelope-and-tools.md +147 -39
- package/docs/architecture/provider-adapter-cookbook.md +2 -2
- package/docs/architecture/safety-model.md +18 -4
- package/docs/architecture/trace-store.md +2 -2
- package/docs/architecture/tui-design.md +41 -81
- package/docs/architecture/worker-dispatch-mechanics.md +9 -1
- package/docs/gui/README.md +69 -0
- package/docs/gui/boundary-doctrine.md +104 -0
- package/docs/gui/chat-rendering-spec.md +1440 -0
- package/docs/gui/cli-surface-routing.md +148 -0
- package/docs/gui/delivery-order.md +53 -0
- package/docs/gui/event-bus-coverage.md +103 -0
- package/docs/gui/inspector-presentation.md +71 -0
- package/docs/gui/parity/01-cli-surface.md +74 -0
- package/docs/gui/parity/02-slash-and-surfaces.md +110 -0
- package/docs/gui/parity/03-domains-and-plan.md +69 -0
- package/docs/gui/performance-baseline.md +76 -0
- package/docs/gui/settings-write-surface.md +267 -0
- package/docs/gui/workflow-coverage.md +64 -0
- package/docs/guide/built-in-agents.md +1 -1
- package/docs/guide/commands-and-modes.md +256 -99
- package/docs/guide/configuration-and-targets.md +485 -124
- package/docs/guide/configuration-reference.md +165 -82
- package/docs/guide/doctor.md +127 -0
- package/docs/guide/environment-variables.md +1 -1
- package/docs/guide/exit-codes-and-output.md +3 -1
- package/docs/guide/extensions-and-sharing.md +3 -14
- package/docs/guide/fleet-dispatch.md +231 -45
- package/docs/guide/glossary.md +1 -1
- package/docs/guide/installation-and-lifecycle.md +27 -16
- package/docs/guide/interop.md +2 -2
- package/docs/guide/proactive-memory.md +154 -68
- package/docs/guide/resource-library.md +4 -0
- package/docs/guide/skills-marketplace.md +8 -4
- package/docs/guide/slurm.md +88 -0
- package/docs/guide/tool-usage.md +134 -11
- package/docs/guide/troubleshooting.md +4 -2
- package/docs/process/battletest-2026-09-20-fixes.md +161 -0
- package/docs/process/configure-tree-proposal.md +637 -0
- package/docs/process/documentation-coverage.md +8 -0
- package/docs/process/documentation-guide.md +18 -1
- package/docs/process/eval-runner.md +58 -14
- package/docs/process/performance-methodology.md +11 -3
- package/docs/process/release-cut-checklist.md +29 -3
- package/docs/process/tool-audit-v0.4.9.md +3 -0
- package/examples/extensions/README.md +1 -3
- package/examples/extensions/lab-status/clio-coder-extension.json +1 -1
- package/examples/extensions/measurements/clio-coder-extension.json +1 -1
- package/library/registry.yaml +30 -5
- package/library/skills/git/fix-issue/SKILL.md +2 -1
- package/library/skills/git/fix-issue/plugin.json +1 -1
- package/library/skills/git/ship/SKILL.md +2 -1
- package/library/skills/git/ship/plugin.json +1 -1
- package/library/skills/meta/clio-coder-test/SKILL.md +5 -6
- package/library/skills/meta/clio-coder-test/evals.md +2 -2
- package/library/skills/meta/clio-coder-test/references/test-map.md +2 -2
- package/library/skills/registry.yaml +9 -5
- package/library/skills/research/slurm-jobs/SKILL.md +110 -0
- package/library/skills/research/slurm-jobs/evals.md +39 -0
- package/library/skills/research/slurm-jobs/plugin.json +23 -0
- package/library/skills/skill-marketplace.json +18 -2
- package/package.json +15 -10
- package/src/cli/args.ts +59 -0
- package/src/cli/argv.ts +7 -0
- package/src/cli/clio.ts +9 -1
- package/src/cli/configure-controls.ts +136 -0
- package/src/cli/configure-onboarding.ts +24 -7
- package/src/cli/configure-quick.ts +32 -7
- package/src/cli/configure-target.ts +11 -1
- package/src/cli/configure.ts +253 -256
- package/src/cli/docs-server.ts +290 -0
- package/src/cli/docs.ts +60 -15
- package/src/cli/doctor-deep.ts +126 -0
- package/src/cli/doctor-hpc.ts +122 -0
- package/src/cli/doctor-slurm.ts +130 -0
- package/src/cli/doctor-task-worktrees.ts +88 -0
- package/src/cli/doctor.ts +165 -16
- package/src/cli/fleet-verify.ts +3 -2
- package/src/cli/gui.ts +111 -0
- package/src/cli/index.ts +14 -4
- package/src/cli/library.ts +2 -7
- package/src/cli/modes/json-stream.ts +4 -2
- package/src/cli/modes/print.ts +252 -25
- package/src/cli/run.ts +199 -71
- package/src/cli/skills.ts +25 -7
- package/src/cli/targets.ts +87 -9
- package/src/cli/uninstall.ts +28 -8
- package/src/cli/usage.ts +2 -1
- package/src/cli/workspace-check.ts +71 -0
- package/src/core/bash-exec.ts +8 -2
- package/src/core/bus-events.ts +32 -3
- package/src/core/cache-telemetry.ts +3 -2
- package/src/core/compile-cache.ts +11 -1
- package/src/core/config.ts +59 -6
- package/src/core/defaults.ts +27 -5
- package/src/core/diagnostics.ts +25 -0
- package/src/core/event-bus.ts +2 -1
- package/src/core/gateway-routing.ts +10 -3
- package/src/core/git-commit-attribution.ts +2 -1
- package/src/core/naming-compat.ts +6 -4
- package/src/core/package-root.ts +0 -9
- package/src/core/path-canonical.ts +143 -24
- package/src/core/residency-target-key.ts +2 -6
- package/src/core/run-overrides.ts +1 -1
- package/src/core/settings-awareness.ts +108 -0
- package/src/core/settings-controls.ts +673 -0
- package/src/core/settings-navigation.ts +116 -0
- package/src/core/theme-token-hex.ts +19 -9
- package/src/core/turn-constraints.ts +52 -0
- package/src/domains/agents/builtins/scout.md +7 -17
- package/src/domains/agents/catalog.ts +5 -1
- package/src/domains/agents/extension.ts +2 -1
- package/src/domains/agents/registry.ts +4 -3
- package/src/domains/agents/result-contract.ts +132 -1
- package/src/domains/config/classify.ts +11 -7
- package/src/domains/config/extension.ts +5 -1
- package/src/domains/config/keybindings.ts +2 -2
- package/src/domains/context/codewiki/coordinator.ts +10 -0
- package/src/domains/context/worker/snapshot.ts +6 -3
- package/src/domains/dispatch/active-route-planner.ts +2 -0
- package/src/domains/dispatch/agent-candidates.ts +5 -1
- package/src/domains/dispatch/capability-match.ts +1 -1
- package/src/domains/dispatch/contract.ts +28 -0
- package/src/domains/dispatch/event-pump.ts +37 -3
- package/src/domains/dispatch/extension.ts +391 -48
- package/src/domains/dispatch/failure-classification.ts +37 -2
- package/src/domains/dispatch/receipt-integrity.ts +3 -0
- package/src/domains/dispatch/run-identity.ts +10 -3
- package/src/domains/dispatch/target-breaker.ts +163 -0
- package/src/domains/dispatch/types.ts +29 -2
- package/src/domains/dispatch/worker-model-loads.ts +66 -0
- package/src/domains/dispatch/worker-protocol.ts +20 -1
- package/src/domains/dispatch/worker-spawn.ts +28 -2
- package/src/domains/eval/artifacts/redact.ts +9 -0
- package/src/domains/eval/metrics/noop.ts +61 -0
- package/src/domains/eval/reports/junit.ts +5 -1
- package/src/domains/eval/reports/text.ts +7 -0
- package/src/domains/eval/runners/clio-run.ts +19 -8
- package/src/domains/eval/runners/external-command.ts +29 -4
- package/src/domains/eval/schema/adapter.ts +6 -2
- package/src/domains/eval/schema/suite.ts +2 -0
- package/src/domains/eval/schema/validate.ts +3 -0
- package/src/domains/eval/suites/run.ts +167 -26
- package/src/domains/evidence/detail.ts +3 -2
- package/src/domains/extensions/operator-runtime.ts +11 -4
- package/src/domains/gateway/mcp/client.ts +1 -1
- package/src/domains/lifecycle/doctor.ts +42 -26
- package/src/domains/lifecycle/migrations/2026-09-18-ollama-runtime-id.ts +38 -0
- package/src/domains/lifecycle/migrations/index.ts +2 -0
- package/src/domains/middleware/demo-guidance.ts +36 -0
- package/src/domains/middleware/dispatch-nudge.ts +1 -1
- package/src/domains/middleware/memory-intervention.ts +51 -4
- package/src/domains/middleware/runtime.ts +5 -4
- package/src/domains/middleware/skills-reminder.ts +29 -52
- package/src/domains/middleware/task-nudge.ts +1 -0
- package/src/domains/middleware/watchdog.ts +4 -0
- package/src/domains/observability/extension.ts +2 -1
- package/src/domains/observability/out-of-turn-usage.ts +3 -2
- package/src/domains/observability/projection.ts +3 -2
- package/src/domains/observability/worker-progress.ts +48 -0
- package/src/domains/prompts/compiler.ts +148 -52
- package/src/domains/prompts/contract.ts +3 -3
- package/src/domains/prompts/demo-guidance.ts +8 -0
- package/src/domains/prompts/extension.ts +12 -7
- package/src/domains/prompts/fragments/identity/clio.md +2 -1
- package/src/domains/prompts/fragments/identity/docs-routing.md +2 -0
- package/src/domains/prompts/fragments/identity/self-awareness.md +4 -0
- package/src/domains/prompts/fragments/operating/contract.md +16 -7
- package/src/domains/prompts/fragments/operating/delegation.md +29 -13
- package/src/domains/prompts/fragments/operating/skills.md +18 -10
- package/src/domains/prompts/fragments/operating/worker.md +2 -0
- package/src/domains/providers/cache-deployment.ts +45 -2
- package/src/domains/providers/contract.ts +52 -11
- package/src/domains/providers/extension.ts +230 -53
- package/src/domains/providers/model-discovery.ts +22 -8
- package/src/domains/providers/models/local-models/clio-coder-local-coding-targets.yaml +5 -7
- package/src/domains/providers/plugins.ts +3 -4
- package/src/domains/providers/probe/fingerprint.ts +2 -2
- package/src/domains/providers/probe/reasoning.ts +9 -16
- package/src/domains/providers/probe/tool-call.ts +236 -0
- package/src/domains/providers/registry.ts +51 -8
- package/src/domains/providers/runtime-resolution.ts +60 -12
- package/src/domains/providers/runtimes/boot-manifest.ts +1 -1
- package/src/domains/providers/runtimes/builtins.ts +2 -2
- package/src/domains/providers/runtimes/common/lmstudio-http.ts +57 -41
- package/src/domains/providers/runtimes/common/local-synth.ts +3 -1
- package/src/domains/providers/runtimes/common/ollama-model-ids.ts +11 -0
- package/src/domains/providers/runtimes/common/probe-helpers.ts +53 -0
- package/src/domains/providers/runtimes/local-native/llamacpp-completion.ts +3 -1
- package/src/domains/providers/runtimes/local-native/llamacpp-embed.ts +7 -13
- package/src/domains/providers/runtimes/local-native/llamacpp-rerank.ts +7 -17
- package/src/domains/providers/runtimes/local-native/llamacpp.ts +1 -0
- package/src/domains/providers/runtimes/local-native/ollama.ts +211 -0
- package/src/domains/providers/runtimes/protocol/litellm.ts +77 -65
- package/src/domains/providers/support.ts +1 -1
- package/src/domains/providers/types/local-model-quirks.ts +2 -3
- package/src/domains/providers/types/runtime-descriptor.ts +23 -3
- package/src/domains/providers/types/target-descriptor.ts +15 -3
- package/src/domains/resources/collision.ts +7 -2
- package/src/domains/resources/index.ts +1 -0
- package/src/domains/resources/library-actions.ts +4 -2
- package/src/domains/resources/library-inventory.ts +6 -2
- package/src/domains/resources/prompts/loader.ts +20 -7
- package/src/domains/resources/skills/availability.ts +56 -0
- package/src/domains/resources/skills/loader.ts +20 -9
- package/src/domains/safety/action-classifier.ts +282 -31
- package/src/domains/safety/audit.ts +2 -1
- package/src/domains/safety/autonomy.ts +54 -11
- package/src/domains/safety/decision-presentation.ts +17 -4
- package/src/domains/safety/finish-contract-registration.ts +25 -1
- package/src/domains/safety/finish-contract.ts +20 -5
- package/src/domains/safety/path-policy.ts +6 -2
- package/src/domains/safety/policy-engine.ts +168 -48
- package/src/domains/safety/protected-artifacts.ts +527 -16
- package/src/domains/safety/read-scope.ts +120 -0
- package/src/domains/safety/skill-authority.ts +52 -16
- package/src/domains/scheduling/cluster.ts +14 -3
- package/src/domains/scheduling/contract.ts +7 -0
- package/src/domains/scheduling/extension.ts +20 -9
- package/src/domains/scheduling/local-capacity.ts +160 -0
- package/src/domains/session/context-accounting.ts +44 -31
- package/src/domains/session/context-ledger.ts +10 -3
- package/src/domains/session/entries.ts +4 -0
- package/src/domains/session/history.ts +1 -1
- package/src/domains/session/prompt-cache.ts +1 -0
- package/src/domains/session/prompt-manifest.ts +3 -1
- package/src/domains/session/retry.ts +4 -6
- package/src/domains/session/task-board.ts +19 -4
- package/src/domains/session/tree/preview.ts +3 -2
- package/src/engine/acp/commands.ts +653 -0
- package/src/engine/acp/server.ts +639 -20
- package/src/engine/acp/tool-mediator.ts +30 -7
- package/src/engine/acp/types.ts +58 -0
- package/src/engine/agent.ts +55 -10
- package/src/engine/ai.ts +11 -2
- package/src/engine/api-registry.ts +5 -4
- package/src/engine/apis/degraded-inference.ts +243 -0
- package/src/engine/apis/llamacpp-residency.ts +50 -6
- package/src/engine/apis/lmstudio-residency.ts +3 -5
- package/src/engine/apis/lmstudio.ts +137 -31
- package/src/engine/apis/ollama-http.ts +118 -0
- package/src/engine/apis/ollama-native.ts +216 -97
- package/src/engine/apis/openai-completions.ts +191 -189
- package/src/engine/apis/output-budget.ts +3 -1
- package/src/engine/apis/residency-lock.ts +2 -1
- package/src/engine/apis/residency.ts +339 -89
- package/src/engine/apis/sampling-overrides.ts +23 -2
- package/src/engine/apis/types.ts +1 -2
- package/src/engine/claude/tool-safety.ts +30 -5
- package/src/engine/context.ts +13 -0
- package/src/engine/env-api-keys.ts +2 -1
- package/src/engine/gemma-channel-filter.ts +3 -2
- package/src/engine/instrumented-tui.ts +25 -0
- package/src/engine/loop-guard.ts +172 -6
- package/src/engine/pi-mono-names.ts +16 -0
- package/src/engine/prewarm.ts +44 -15
- package/src/engine/provider-payload.ts +52 -14
- package/src/engine/session.ts +4 -2
- package/src/engine/worker-events.ts +9 -1
- package/src/engine/worker-runtime.ts +269 -42
- package/src/engine/worker-tools.ts +8 -3
- package/src/entry/boot-options.ts +23 -0
- package/src/entry/orchestrator.ts +207 -36
- package/src/interactive/assistant-generation-timing.ts +52 -0
- package/src/interactive/chat-loop-messages.ts +4 -1
- package/src/interactive/chat-loop.ts +59 -9
- package/src/interactive/chat-panel.ts +10 -1
- package/src/interactive/clio-editor.ts +51 -79
- package/src/interactive/context-meter.ts +1 -0
- package/src/interactive/context-overlay.ts +21 -8
- package/src/interactive/cost-overlay.ts +1 -1
- package/src/interactive/dispatch-board.ts +39 -8
- package/src/interactive/editor-bash.ts +0 -34
- package/src/interactive/editor-rails.ts +43 -0
- package/src/interactive/editor-submit.ts +34 -2
- package/src/interactive/footer/dashboard.ts +67 -38
- package/src/interactive/footer/demo-hints.ts +40 -0
- package/src/interactive/footer/key-hints.ts +21 -0
- package/src/interactive/footer/notifications.ts +1 -1
- package/src/interactive/footer/pages.ts +486 -0
- package/src/interactive/footer/system-metrics.ts +147 -0
- package/src/interactive/footer/widgets.ts +158 -63
- package/src/interactive/footer-panel.ts +29 -7
- package/src/interactive/interactive-application.ts +109 -21
- package/src/interactive/interactive-event-projection.ts +6 -2
- package/src/interactive/interactive-presentation.ts +25 -29
- package/src/interactive/interactive-slash-runtime.ts +32 -18
- package/src/interactive/interactive-subscriptions.ts +25 -5
- package/src/interactive/interactive-tickers.ts +21 -5
- package/src/interactive/keybinding-manager.ts +9 -0
- package/src/interactive/overlay-frame.ts +29 -7
- package/src/interactive/overlay-lifecycle.ts +5 -3
- package/src/interactive/overlay-model-selectors.ts +4 -0
- package/src/interactive/overlay-permission-lifecycle.ts +6 -5
- package/src/interactive/overlays/ask-user.ts +103 -110
- package/src/interactive/overlays/help-reference.ts +1 -0
- package/src/interactive/overlays/message-picker.ts +3 -29
- package/src/interactive/overlays/session-selector.ts +3 -2
- package/src/interactive/overlays/settings-sections.ts +2 -30
- package/src/interactive/overlays/settings.ts +310 -607
- package/src/interactive/permission-hint.ts +3 -3
- package/src/interactive/permission-overlay.ts +45 -27
- package/src/interactive/renderers/doctor-report.ts +43 -0
- package/src/interactive/renderers/tool-execution.ts +87 -62
- package/src/interactive/renderers/worker-entry.ts +76 -3
- package/src/interactive/side-question.ts +3 -1
- package/src/interactive/slash-commands.ts +78 -23
- package/src/interactive/startup-background.ts +131 -0
- package/src/interactive/startup-diagnostics.ts +16 -0
- package/src/interactive/status/state-machine.ts +16 -3
- package/src/interactive/status/types.ts +2 -0
- package/src/interactive/status/verbs.ts +1 -1
- package/src/interactive/terminal-lease.ts +26 -22
- package/src/interactive/theme/components.ts +1 -1
- package/src/interactive/theme/rules.ts +1 -1
- package/src/interactive/theme/tokens.ts +16 -10
- package/src/interactive/transcript-detail.ts +4 -0
- package/src/interactive/turn-context.ts +56 -20
- package/src/interactive/turn-middleware.ts +57 -9
- package/src/interactive/turn-prewarm.ts +121 -18
- package/src/interactive/turn-recovery.ts +10 -8
- package/src/interactive/turn-runtime.ts +74 -29
- package/src/interactive/turn-state.ts +3 -0
- package/src/interactive/welcome-art.ts +36 -0
- package/src/interactive/welcome-dashboard.ts +209 -49
- package/src/interactive/worker-replay.ts +4 -0
- package/src/interactive/worker-stream.ts +17 -2
- package/src/tools/agent-tools.ts +22 -1
- package/src/tools/builtin-tool-catalog.ts +2 -2
- package/src/tools/codewiki/code-nav.ts +1 -1
- package/src/tools/codewiki/shared.ts +39 -1
- package/src/tools/compete-worktrees.ts +8 -91
- package/src/tools/context/docs-engine.ts +44 -12
- package/src/tools/context/index.ts +126 -22
- package/src/tools/context/library.ts +1 -1
- package/src/tools/context/surface.ts +12 -7
- package/src/tools/core-bootstrap.ts +3 -0
- package/src/tools/dispatch-runner.ts +18 -0
- package/src/tools/dispatch-schema.ts +187 -206
- package/src/tools/edit.ts +46 -42
- package/src/tools/file-mutation-queue.ts +25 -26
- package/src/tools/gateway/clio-context-surface.ts +1 -1
- package/src/tools/gateway/index.ts +7 -3
- package/src/tools/gateway/mcp-capabilities.ts +5 -3
- package/src/tools/grep.ts +14 -2
- package/src/tools/ls.ts +1 -4
- package/src/tools/monitor.ts +14 -1
- package/src/tools/observation.ts +1 -3
- package/src/tools/path-utils.ts +51 -18
- package/src/tools/process-lease.ts +99 -0
- package/src/tools/read.ts +1 -1
- package/src/tools/registry.ts +71 -9
- package/src/tools/task-worktree.ts +296 -17
- package/src/tools/tasks.ts +29 -7
- package/src/tools/worker-evidence.ts +60 -1
- package/src/tools/worktree-root.ts +252 -0
- package/src/tools/write.ts +34 -30
- package/src/worker/entry.ts +18 -1
- package/src/worker/protocol.ts +54 -1
- package/src/worker/spec-contract.ts +22 -2
- package/dist/acp-ZWZCPS2A.js +0 -130
- package/dist/agents-LYSOWZUE.js +0 -150
- package/dist/auth-WBQGKWQ5.js +0 -551
- package/dist/background-BUMOBAQN.js +0 -37
- package/dist/builtins-ODRJOEDI.js +0 -22
- package/dist/chunk-2DRRZ57Q.js +0 -571
- package/dist/chunk-2JBZYUPY.js +0 -105
- package/dist/chunk-2VBWFXYE.js +0 -198
- package/dist/chunk-2X2R3UTH.js +0 -1018
- package/dist/chunk-32KJPXAM.js +0 -75
- package/dist/chunk-37LW32LZ.js +0 -32
- package/dist/chunk-3A3CUMKA.js +0 -54
- package/dist/chunk-3AND2EFU.js +0 -215
- package/dist/chunk-3RDHGNU7.js +0 -647
- package/dist/chunk-3SUDBGEI.js +0 -1323
- package/dist/chunk-3TQN67I2.js +0 -396
- package/dist/chunk-3U4BL2EV.js +0 -103
- package/dist/chunk-3UQADNG2.js +0 -302
- package/dist/chunk-434LRQ6Z.js +0 -13441
- package/dist/chunk-4ATBOFRP.js +0 -7802
- package/dist/chunk-4DNL43EZ.js +0 -139
- package/dist/chunk-4HFJKRGZ.js +0 -5250
- package/dist/chunk-555E2WVV.js +0 -322
- package/dist/chunk-5GZICIYO.js +0 -462
- package/dist/chunk-5PHVPU4G.js +0 -160
- package/dist/chunk-5RTEFNBP.js +0 -197
- package/dist/chunk-64XJW7NT.js +0 -380
- package/dist/chunk-6TKOFFGE.js +0 -1058
- package/dist/chunk-6UJ7RDI7.js +0 -1143
- package/dist/chunk-7FBCRWVT.js +0 -1801
- package/dist/chunk-7JSOSVLP.js +0 -283
- package/dist/chunk-7N3OLLSL.js +0 -637
- package/dist/chunk-7QQRPB2E.js +0 -915
- package/dist/chunk-A6DULIMH.js +0 -986
- package/dist/chunk-AB3QXXBC.js +0 -123
- package/dist/chunk-ACCECAH4.js +0 -49
- package/dist/chunk-AM6CEP2K.js +0 -2120
- package/dist/chunk-AUHVBIDW.js +0 -19
- package/dist/chunk-AY4XE6GN.js +0 -665
- package/dist/chunk-BBA2TAWV.js +0 -667
- package/dist/chunk-BFPHMSK7.js +0 -169
- package/dist/chunk-BMNVVKEW.js +0 -604
- package/dist/chunk-CKK25WN3.js +0 -72
- package/dist/chunk-CTGZCEI6.js +0 -33
- package/dist/chunk-DIAJYJYG.js +0 -446
- package/dist/chunk-DVNAPPXU.js +0 -27
- package/dist/chunk-DXVMLM3Z.js +0 -92
- package/dist/chunk-E3LEPLQ2.js +0 -68
- package/dist/chunk-EHZRAB4U.js +0 -63
- package/dist/chunk-EM2DIQAJ.js +0 -179
- package/dist/chunk-EM2WNQS2.js +0 -93
- package/dist/chunk-ETF4ROKH.js +0 -595
- package/dist/chunk-F2YM3JY4.js +0 -22513
- package/dist/chunk-FEBQWHJT.js +0 -1023
- package/dist/chunk-FPS4R2RN.js +0 -1975
- package/dist/chunk-GD55RTIW.js +0 -33
- package/dist/chunk-GJDRMBDI.js +0 -573
- package/dist/chunk-GREYLTZ5.js +0 -658
- package/dist/chunk-H2WSCZZT.js +0 -238
- package/dist/chunk-H6IUCY6Q.js +0 -117
- package/dist/chunk-H72DCH3E.js +0 -563
- package/dist/chunk-H7TXJR23.js +0 -705
- package/dist/chunk-HBJQQTKM.js +0 -40
- package/dist/chunk-HCVKSGNZ.js +0 -990
- package/dist/chunk-HVCAY2FH.js +0 -67
- package/dist/chunk-I47EJPYL.js +0 -1377
- package/dist/chunk-IALGWTLO.js +0 -36
- package/dist/chunk-IALZJE37.js +0 -1710
- package/dist/chunk-IC7JXLOM.js +0 -1577
- package/dist/chunk-IOSVTTCD.js +0 -108
- package/dist/chunk-IPTPMLA6.js +0 -475
- package/dist/chunk-IZZI3SKQ.js +0 -128
- package/dist/chunk-JABWPKFY.js +0 -27
- package/dist/chunk-JIYWMQZ5.js +0 -175
- package/dist/chunk-JKU34ACI.js +0 -693
- package/dist/chunk-JOBN2YQQ.js +0 -176
- package/dist/chunk-JOL2QRLE.js +0 -152
- package/dist/chunk-JTR3VSV3.js +0 -44
- package/dist/chunk-JU6MAMRJ.js +0 -362
- package/dist/chunk-JURMQWVJ.js +0 -15
- package/dist/chunk-K2BLQC5E.js +0 -262
- package/dist/chunk-K3XN4LZ4.js +0 -402
- package/dist/chunk-KIVFXGBM.js +0 -688
- package/dist/chunk-KKRXONXG.js +0 -43
- package/dist/chunk-KOAHT3N2.js +0 -395
- package/dist/chunk-KP5BPXR3.js +0 -73
- package/dist/chunk-KQ6IDQIB.js +0 -39
- package/dist/chunk-KRJQG47M.js +0 -1289
- package/dist/chunk-KW6OJ7IY.js +0 -221
- package/dist/chunk-L3NBWLSN.js +0 -314
- package/dist/chunk-L4RUTLRL.js +0 -59
- package/dist/chunk-LGTVWPRN.js +0 -47
- package/dist/chunk-LSQW6KZO.js +0 -200
- package/dist/chunk-LTR5QCLS.js +0 -446
- package/dist/chunk-LWJYOHT3.js +0 -165
- package/dist/chunk-M6YLF66Z.js +0 -2687
- package/dist/chunk-MJ4QEJVT.js +0 -185
- package/dist/chunk-MO65K5CH.js +0 -1148
- package/dist/chunk-MTOZEQHL.js +0 -637
- package/dist/chunk-MZDPF35R.js +0 -45
- package/dist/chunk-MZKYVIWW.js +0 -188
- package/dist/chunk-NBPA5QM6.js +0 -386
- package/dist/chunk-NMBEW4PP.js +0 -688
- package/dist/chunk-NPLLK3HO.js +0 -3610
- package/dist/chunk-NSYGPIVW.js +0 -39
- package/dist/chunk-NXTV5OI5.js +0 -1020
- package/dist/chunk-NYDG4QP4.js +0 -689
- package/dist/chunk-OA2GDACN.js +0 -146
- package/dist/chunk-PJI57EC6.js +0 -236
- package/dist/chunk-PJJBUGMR.js +0 -4484
- package/dist/chunk-PNJE7JPS.js +0 -50
- package/dist/chunk-PP23PZEV.js +0 -1347
- package/dist/chunk-PPIFDSBK.js +0 -409
- package/dist/chunk-PTFISXQO.js +0 -319
- package/dist/chunk-QB33Z5S7.js +0 -1865
- package/dist/chunk-QGNII5VC.js +0 -110
- package/dist/chunk-QH3ZTUOA.js +0 -113
- package/dist/chunk-QI72X67S.js +0 -481
- package/dist/chunk-QJMRYTCX.js +0 -56
- package/dist/chunk-QKHZZFKH.js +0 -98
- package/dist/chunk-RDKX2PME.js +0 -66
- package/dist/chunk-RL7LJYN4.js +0 -66
- package/dist/chunk-RPMNIFRY.js +0 -65
- package/dist/chunk-RQROVOV3.js +0 -670
- package/dist/chunk-S34A7BSP.js +0 -97
- package/dist/chunk-SJETVJHX.js +0 -119
- package/dist/chunk-SJMNU4ZS.js +0 -634
- package/dist/chunk-SL2RDHKO.js +0 -19
- package/dist/chunk-SLLG2G44.js +0 -85
- package/dist/chunk-SQAZN2V3.js +0 -2744
- package/dist/chunk-SQBT46OF.js +0 -814
- package/dist/chunk-SRCEQKQS.js +0 -165
- package/dist/chunk-TCUOGIL2.js +0 -52
- package/dist/chunk-TIWPKCVO.js +0 -42
- package/dist/chunk-U44YYLVV.js +0 -1529
- package/dist/chunk-UIU7MGZ3.js +0 -486
- package/dist/chunk-USBBEKHW.js +0 -177
- package/dist/chunk-VHKTOLEW.js +0 -1416
- package/dist/chunk-VPWGADBG.js +0 -3151
- package/dist/chunk-VQD7NH7Z.js +0 -356
- package/dist/chunk-VWFCAK34.js +0 -697
- package/dist/chunk-W5RM7YAH.js +0 -78
- package/dist/chunk-W72LLZAV.js +0 -243
- package/dist/chunk-WGRDABW7.js +0 -207
- package/dist/chunk-WWRV5RJI.js +0 -165
- package/dist/chunk-XCUDZQLX.js +0 -195
- package/dist/chunk-XFLSL7BT.js +0 -386
- package/dist/chunk-XJZEDCNT.js +0 -391
- package/dist/chunk-XLLEL3K7.js +0 -709
- package/dist/chunk-XNZWWDC3.js +0 -686
- package/dist/chunk-XRECG65F.js +0 -308
- package/dist/chunk-XTQ7MEJG.js +0 -457
- package/dist/chunk-XW2UZICE.js +0 -372
- package/dist/chunk-Y3M2T5RO.js +0 -891
- package/dist/chunk-YGDMBK7O.js +0 -567
- package/dist/chunk-YJCCMYYT.js +0 -125
- package/dist/chunk-YPQOPFP7.js +0 -797
- package/dist/chunk-YQYINEJI.js +0 -132
- package/dist/chunk-ZF6CV4WZ.js +0 -5614
- package/dist/chunk-ZKJU55MX.js +0 -326
- package/dist/chunk-ZKQ63XZ5.js +0 -1196
- package/dist/chunk-ZKVMDNAN.js +0 -962
- package/dist/chunk-ZST3FRCV.js +0 -132
- package/dist/clio-JUDCLNHC.js +0 -26
- package/dist/clio-context-tools-FT672MNZ.js +0 -136
- package/dist/code-nav-7OVCTP2Z.js +0 -688
- package/dist/compile-cache-WJEPUZEJ.js +0 -16
- package/dist/components-OZXZMDWU.js +0 -674
- package/dist/config-P3ZQVF63.js +0 -275
- package/dist/config-graph-GKAOBAS5.js +0 -160
- package/dist/configure-25LRYZJG.js +0 -86
- package/dist/context-72VQV7JX.js +0 -73
- package/dist/context-COWRWXP3.js +0 -286
- package/dist/context-WB3D474G.js +0 -344
- package/dist/context-clear-Y4LYMWC6.js +0 -192
- package/dist/context-index-W6A4V7OC.js +0 -120
- package/dist/context-map-DKL3QT6D.js +0 -555
- package/dist/context-working-set-TMZYVC7A.js +0 -1560
- package/dist/data-tool-KMBWKKWR.js +0 -2987
- package/dist/detail-4GLROGY5.js +0 -123
- package/dist/dispatch-runner-TR3LBP5P.js +0 -2446
- package/dist/docs-ZK777W2G.js +0 -101
- package/dist/doctor-WC4OV2OB.js +0 -814
- package/dist/eval-FUNWJNUJ.js +0 -5050
- package/dist/eval-inventory-CX24K2JT.js +0 -260
- package/dist/evals-L73EBHSU.js +0 -104
- package/dist/evidence-AVJ2RTHX.js +0 -392
- package/dist/evidence-P4NZOAK7.js +0 -233
- package/dist/evidence-Y55WKYHH.js +0 -246
- package/dist/evolve-MAWKRYWF.js +0 -617
- package/dist/extensions-PYQH3H47.js +0 -308
- package/dist/fleet-M4H2QBWT.js +0 -268
- package/dist/fleet-ULBXXRDR.js +0 -923
- package/dist/fleet-commands-7NNC4JZU.js +0 -76
- package/dist/fleet-decisions-EHEY7KPU.js +0 -52
- package/dist/fleet-graph-LQ2AHZT3.js +0 -136
- package/dist/fleet-inspect-5IGBIIYZ.js +0 -312
- package/dist/fleet-new-RCKGSRDV.js +0 -48
- package/dist/fleet-preflight-UTTNOKMG.js +0 -27
- package/dist/fleet-validate-YGILJKA6.js +0 -91
- package/dist/fleet-verify-AUWTCDKR.js +0 -210
- package/dist/fleet-view-TGUFCY5A.js +0 -127
- package/dist/init-GFN2Z7NF.js +0 -333
- package/dist/install-3RZDDP23.js +0 -13
- package/dist/install-6PIF6F6W.js +0 -19
- package/dist/interop-EF5JUWWK.js +0 -246
- package/dist/inventory-I6VJDDYF.js +0 -127
- package/dist/library-3J5IO2OJ.js +0 -75
- package/dist/library-IJTOFTDS.js +0 -307
- package/dist/library-Z3KZSHPE.js +0 -492
- package/dist/library-import-IMKFLDHX.js +0 -183
- package/dist/library-inventory-CQP5D6GU.js +0 -56
- package/dist/library-validation-33UTX7AI.js +0 -42
- package/dist/mcp-5FWZKUS6.js +0 -26
- package/dist/memory-36CWN67Y.js +0 -520
- package/dist/models-KQ6PQJJQ.js +0 -302
- package/dist/monitor-XX6ZD6KC.js +0 -785
- package/dist/orchestrator-SK6HDAOP.js +0 -42067
- package/dist/panes-L27QRXUH.js +0 -74
- package/dist/panes-LXZIWNOZ.js +0 -103
- package/dist/paths-7DJDU4P4.js +0 -67
- package/dist/preload-K2TDYI4Y.js +0 -124
- package/dist/registry-DESGAXWK.js +0 -11
- package/dist/reset-73VU3XNT.js +0 -345
- package/dist/resources-3BYJYVYL.js +0 -181
- package/dist/run-AR7PY6GW.js +0 -896
- package/dist/run-script-H2KUDIII.js +0 -41
- package/dist/settings-3VMBMWID.js +0 -72
- package/dist/share-HVWH4FPF.js +0 -293
- package/dist/skills-5TYEY75Q.js +0 -100
- package/dist/skills-eval-CK3MD63Z.js +0 -1083
- package/dist/skills-inventory-KSFYG3I6.js +0 -138
- package/dist/slash-commands-DMVHML7P.js +0 -98
- package/dist/steer-XCD6V3EW.js +0 -77
- package/dist/support-JAZL6VBR.js +0 -38
- package/dist/system-3TDQRMZZ.js +0 -116
- package/dist/targets-EZKHAYRN.js +0 -1117
- package/dist/tasks-SNEFHWYW.js +0 -36
- package/dist/terminal-lease-BNLFA4OF.js +0 -419
- package/dist/tools-7IM6BDCE.js +0 -28
- package/dist/trace-C3MBGD4S.js +0 -524
- package/dist/tree-sitter-AQUUOSYM.js +0 -4673
- package/dist/tui-primitives-36BY2774.js +0 -18
- package/dist/uninstall-WWLOSZ42.js +0 -432
- package/dist/upgrade-ETK2JNSJ.js +0 -297
- package/dist/usage-S2HOB7BZ.js +0 -1065
- package/dist/verifiers-QDTEVH7R.js +0 -632
- package/dist/verify-SUKUK6XM.js +0 -31
- package/dist/version-RFPKO6T7.js +0 -21
- package/dist/web/client/assets/abnfDiagram-VCTEODGH-BznNOe_I.js +0 -1
- package/dist/web/client/assets/architecture-7GRP2DOG-BQO9DL_y.js +0 -1
- package/dist/web/client/assets/architectureDiagram-5GKGNRK7-CKPbdvyx.js +0 -36
- package/dist/web/client/assets/blockDiagram-I7D4REHJ-prINbpbM.js +0 -129
- package/dist/web/client/assets/c4Diagram-7LVT6UL2-DkVRKtyU.js +0 -38
- package/dist/web/client/assets/channel-c4EeUUqA.js +0 -1
- package/dist/web/client/assets/chunk-4HAMMTFA-CV0Z1ApC.js +0 -62
- package/dist/web/client/assets/chunk-75Z2AOVW-D34Nohxq.js +0 -2
- package/dist/web/client/assets/chunk-DU6HZSFF-Das_cS-O.js +0 -125
- package/dist/web/client/assets/chunk-F27PBJKO-CmRojxkG.js +0 -1
- package/dist/web/client/assets/chunk-GMAD6QVW-ClYZmc73.js +0 -72
- package/dist/web/client/assets/chunk-GVQU2GXP-B2BiHFt-.js +0 -1
- package/dist/web/client/assets/chunk-IMKFNOWR-BGApZ8nP.js +0 -231
- package/dist/web/client/assets/chunk-L3NEJ4N5-DIzCgpkY.js +0 -1
- package/dist/web/client/assets/chunk-OSK3NFVY-BPT-yePv.js +0 -10
- package/dist/web/client/assets/chunk-P2QGCYS3-BC1WTc2t.js +0 -1
- package/dist/web/client/assets/chunk-POPQ4Y6H-BSjzBmZU.js +0 -1
- package/dist/web/client/assets/chunk-PWAF6VOD-BIjLs86Z.js +0 -1
- package/dist/web/client/assets/chunk-SHT3W25Y-CduDz2cm.js +0 -168
- package/dist/web/client/assets/chunk-SVP7TREG-XUn4pPAP.js +0 -88
- package/dist/web/client/assets/chunk-TICWLB2K-DcBy2DKy.js +0 -206
- package/dist/web/client/assets/classDiagram-ZZMXUADV-C0HR7YKN.js +0 -1
- package/dist/web/client/assets/classDiagram-v2-VYDZK3BY-C0HR7YKN.js +0 -1
- package/dist/web/client/assets/cynefin-OW5HDTMX-BecPbyM6.js +0 -1
- package/dist/web/client/assets/cynefinDiagram-5FMLGOSQ-BzMzFwyT.js +0 -62
- package/dist/web/client/assets/dagre-GXQ25YYZ-CAWJmRMG.js +0 -4
- package/dist/web/client/assets/diagram-S7CK7UJ4--lp0ALmn.js +0 -30
- package/dist/web/client/assets/diagram-UQ7AKVKN-gKUnsjcj.js +0 -41
- package/dist/web/client/assets/diagram-VSXAHHWV-BoN5D1Gh.js +0 -3
- package/dist/web/client/assets/diagram-VX7I27RA-BMtuswQ6.js +0 -24
- package/dist/web/client/assets/diagram-Z3DM3KII-DtU8LXrA.js +0 -24
- package/dist/web/client/assets/ebnfDiagram-PWID7BFC-DDcnv9BH.js +0 -1
- package/dist/web/client/assets/erDiagram-RLTQ6QDP-DvRb4iDL.js +0 -99
- package/dist/web/client/assets/eventmodeling-NTZA5JFV-01h4SbTc.js +0 -1
- package/dist/web/client/assets/flowDiagram-HODETNUW-Bll_YZ6T.js +0 -1
- package/dist/web/client/assets/framework-YGoR34M4.js +0 -9
- package/dist/web/client/assets/ganttDiagram-EL5Y4UJY-DdFZ9hvH.js +0 -292
- package/dist/web/client/assets/gitGraph-4MIJSDKK-DjD_AAMj.js +0 -1
- package/dist/web/client/assets/gitGraphDiagram-WWUBYQGX-CDyN9n2u.js +0 -106
- package/dist/web/client/assets/index-CVcy0FAn.js +0 -75
- package/dist/web/client/assets/index-Dsi52apB.css +0 -1
- package/dist/web/client/assets/info-A6RAGUB7-C_XK8Hq0.js +0 -1
- package/dist/web/client/assets/infoDiagram-27XIBGKW-DIe4tJ1i.js +0 -2
- package/dist/web/client/assets/ishikawaDiagram-5VMMS53U-CVl5unKI.js +0 -70
- package/dist/web/client/assets/journeyDiagram-3NMN7TZE-CPEB1Vt8.js +0 -139
- package/dist/web/client/assets/kanban-definition-UXKFOSKX-j-9WXjYQ.js +0 -89
- package/dist/web/client/assets/line-BIDAcEtX.js +0 -1
- package/dist/web/client/assets/mermaid-parser.core-Ux4vssh0.js +0 -7
- package/dist/web/client/assets/mermaid.core-CDuwVKeh.js +0 -44
- package/dist/web/client/assets/mindmap-definition-YA3MSWOX-5MlQEeQ6.js +0 -96
- package/dist/web/client/assets/packet-AYTQ26CC-DRO66c9Q.js +0 -1
- package/dist/web/client/assets/pegDiagram-XKGWAZYB-BakZnSjM.js +0 -1
- package/dist/web/client/assets/pie-WAS4IAKB-BEzcmhz8.js +0 -1
- package/dist/web/client/assets/pieDiagram-E7YTZNPT-DpmqgoPt.js +0 -39
- package/dist/web/client/assets/quadrantDiagram-AXDQQJYC-DuMPwwV2.js +0 -7
- package/dist/web/client/assets/radar-RG4KPBEZ-Djm3oXl5.js +0 -1
- package/dist/web/client/assets/railroad-74A4TZTK-Cpvkwsao.js +0 -1
- package/dist/web/client/assets/railroad-abnf-HS5TGJTU-CpRQ3ruG.js +0 -1
- package/dist/web/client/assets/railroad-ebnf-LZEXJU2U-1Rm5a5eJ.js +0 -1
- package/dist/web/client/assets/railroad-peg-WCYAUIDC-C8344cTh.js +0 -1
- package/dist/web/client/assets/railroadDiagram-O6MQD6OU-CgMS4B6R.js +0 -1
- package/dist/web/client/assets/requirementDiagram-BXWQKSXE-CX5eoNdN.js +0 -84
- package/dist/web/client/assets/sankeyDiagram-P5KCCOFB-CODBX2N3.js +0 -40
- package/dist/web/client/assets/sequenceDiagram-WJ2MYXX4-eUhhF8OR.js +0 -162
- package/dist/web/client/assets/stateDiagram-D77RDMKH-vR6l0NC2.js +0 -1
- package/dist/web/client/assets/stateDiagram-v2-MP3YSRHH-BYUm8jLY.js +0 -1
- package/dist/web/client/assets/swimlanes-42K2YHIH-v9Tw_zX7.js +0 -1
- package/dist/web/client/assets/swimlanesDiagram-VR7AAH4N-B2jdCvhD.js +0 -8
- package/dist/web/client/assets/timeline-definition-24CTP7MA-DxianbhU.js +0 -120
- package/dist/web/client/assets/treeView-Q6P3EWNA-DLxnZb9R.js +0 -1
- package/dist/web/client/assets/treemap-WGGIJYW6-I7UnZ6xJ.js +0 -1
- package/dist/web/client/assets/vennDiagram-4TSXK5OY-Ar7M8Mrj.js +0 -34
- package/dist/web/client/assets/wardley-WFR3VGLG-B8ZSHeDu.js +0 -1
- package/dist/web/client/assets/wardleyDiagram-VM6X3IG4-Qks2FmIn.js +0 -78
- package/dist/web/client/assets/xychartDiagram-S5SC5T6Z-BBBjRtiE.js +0 -7
- package/dist/web/client/index.html +0 -6
- package/dist/web/ops-worker.js +0 -37
- package/dist/web/reads-worker.js +0 -1726
- package/dist/web/server.js +0 -8499
- package/dist/web-EMGUGGEI.js +0 -13
- package/dist/web-fetch-6BRRVQON.js +0 -805
- package/dist/wiki-generate-XHSJTDOP.js +0 -627
- package/dist/with-panes-Z6BTEHMZ.js +0 -628
- package/evals/README.md +0 -9
- package/evals/behavioral-corpus-grader.mjs +0 -236
- package/evals/behavioral-machinery-baseline.json +0 -2276
- package/evals/behavioral-machinery-driver.ts +0 -250
- package/evals/behavioral-machinery-support.ts +0 -254
- package/evals/behavioral-machinery.yaml +0 -614
- package/evals/behavioral-model-negative-control.yaml +0 -69
- package/evals/behavioral-model.yaml +0 -482
- package/evals/fixtures/behavioral-facts.txt +0 -3
- package/evals/fixtures/behavioral-main.ts +0 -7
- package/evals/fixtures/decoy/note.txt +0 -2
- package/evals/fixtures/docs-retrieval.json +0 -102
- package/evals/fixtures/private/credentials.txt +0 -1
- package/evals/fixtures/scalar-decision.json +0 -17
- package/evals/fixtures/scout-citation-pipeline.json +0 -55
- package/evals/fixtures/source-explanation.json +0 -74
- package/evals/fixtures/tool-arguments.json +0 -18
- package/evals/fixtures/tool-surface/read.txt +0 -4
- package/evals/fixtures/tool-surface/subdir/keep.txt +0 -1
- package/evals/no-edit-memory-grader.mjs +0 -149
- package/evals/scalar-decision-grader.py +0 -41
- package/evals/scalar-decision-machinery.ts +0 -145
- package/evals/source-explanation-grader.mjs +0 -118
- package/evals/tool-surface-grader.mjs +0 -53
- package/evals/tool-surface-model.yaml +0 -274
- package/evals/tracked-metrics-baseline.yaml +0 -229
- package/evals/tracked-metrics-grader.mjs +0 -129
- package/src/cli/web.ts +0 -79
- package/src/domains/providers/runtimes/local-native/ollama-native.ts +0 -122
- /package/dist/assets/{web-notices → gui-notices}/@hono__node-server-LICENSE +0 -0
- /package/dist/assets/{web-notices → gui-notices}/hono-LICENSE +0 -0
- /package/dist/{web → gui}/client/THIRD_PARTY_LICENSES.md +0 -0
- /package/dist/{web → gui}/client/assets/arc-Pry-7G1_.js +0 -0
- /package/dist/{web → gui}/client/assets/array-BifhSqXX.js +0 -0
- /package/dist/{web → gui}/client/assets/atkinson-hyperlegible-next-latin-ext-wght-normal-C6vrW8VD.woff2 +0 -0
- /package/dist/{web → gui}/client/assets/atkinson-hyperlegible-next-latin-wght-normal-BcXVPD7q.woff2 +0 -0
- /package/dist/{web → gui}/client/assets/chunk-2Q5K7J3B-C1jixKkw.js +0 -0
- /package/dist/{web → gui}/client/assets/chunk-5VM5RSS4-ZNzvKenW.js +0 -0
- /package/dist/{web → gui}/client/assets/chunk-FOHPRMQF-CoA4358r.js +0 -0
- /package/dist/{web → gui}/client/assets/chunk-JWPE2WC7-DVXcaiue.js +0 -0
- /package/dist/{web → gui}/client/assets/chunk-XXDRQBXY-DqAYeljN.js +0 -0
- /package/dist/{web → gui}/client/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +0 -0
- /package/dist/{web → gui}/client/assets/commit-mono-latin-400-normal-s0S3qwFW.woff +0 -0
- /package/dist/{web → gui}/client/assets/commit-mono-latin-400-normal-wzhe4RuD.woff2 +0 -0
- /package/dist/{web → gui}/client/assets/cose-bilkent-JH36ORCC-CVh1icwb.js +0 -0
- /package/dist/{web → gui}/client/assets/cytoscape.esm-c2aL46s-.js +0 -0
- /package/dist/{web → gui}/client/assets/dagre-C-rnJpZF.js +0 -0
- /package/dist/{web → gui}/client/assets/defaultLocale-BFoDCU3G.js +0 -0
- /package/dist/{web → gui}/client/assets/dist-v5Q1xZ2K.js +0 -0
- /package/dist/{web → gui}/client/assets/graphlib-DS17s2tU.js +0 -0
- /package/dist/{web → gui}/client/assets/init-C-OQMol4.js +0 -0
- /package/dist/{web → gui}/client/assets/katex-ZlcWpGUi.js +0 -0
- /package/dist/{web → gui}/client/assets/linear-SzVmGSw4.js +0 -0
- /package/dist/{web → gui}/client/assets/newsreader-latin-ext-wght-normal-C-3rgBeH.woff2 +0 -0
- /package/dist/{web → gui}/client/assets/newsreader-latin-wght-normal-CCVVNp6i.woff2 +0 -0
- /package/dist/{web → gui}/client/assets/newsreader-vietnamese-wght-normal-Czsa-EzN.woff2 +0 -0
- /package/dist/{web → gui}/client/assets/ordinal-BDEzSJ7C.js +0 -0
- /package/dist/{web → gui}/client/assets/path-fybaL0A-.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-bash-D6zCJ74D.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-c-04YixN25.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-clike-DapgWyxx.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-core-BtsZdCS6.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-cpp-C-lJbC-6.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-css-CPgOzxXp.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-diff-BF8m0_mq.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-docker-DkT6yOFj.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-fortran-Be5x3y1V.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-go-C_8qAH5n.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-ini-BESK3y0r.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-javascript-BnO-swvr.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-json-Dp_-W-Hv.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-jsx-D-D0NWtC.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-julia-DIjOgiAV.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-latex-DNMbqcH_.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-makefile-CRKWLQ8l.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-markdown-C0FPJ1Iz.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-markup-Cp04rIa1.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-matlab-D-nk08al.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-python-CfiSVtM6.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-r-QmNGR8LX.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-rust-Bu9N8X3N.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-shell-session-Be4UuYoM.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-sql-CYhVDMEE.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-toml-DKb54GAT.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-tsx-p6J2Kc_4.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-typescript-BMqONzxf.js +0 -0
- /package/dist/{web → gui}/client/assets/prism-yaml-C0JHu8gr.js +0 -0
- /package/dist/{web → gui}/client/assets/purify.es-ChwZkWde.js +0 -0
- /package/dist/{web → gui}/client/assets/rolldown-runtime-hePW80VL.js +0 -0
- /package/dist/{web → gui}/client/assets/rough.esm-Dy-Kn_BL.js +0 -0
- /package/dist/{web → gui}/client/assets/sizeCapture-INFHLROL-B0uUizjq.js +0 -0
- /package/dist/{web → gui}/client/assets/src-B6xuSHsQ.js +0 -0
- /package/dist/{web → gui}/client/clio-coder-logo.webp +0 -0
- /package/dist/{web → gui}/client/icon-192.png +0 -0
- /package/dist/{web → gui}/client/icon-512.png +0 -0
- /package/dist/{web → gui}/client/manifest.webmanifest +0 -0
- /package/dist/{web → gui}/client/offline.css +0 -0
- /package/dist/{web → gui}/client/offline.html +0 -0
- /package/dist/{web → gui}/client/offline.js +0 -0
- /package/dist/{web → gui}/client/sw.js +0 -0
package/dist/chunk-FPS4R2RN.js
DELETED
|
@@ -1,1975 +0,0 @@
|
|
|
1
|
-
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
warnLegacyNaming
|
|
4
|
-
} from "./chunk-DVNAPPXU.js";
|
|
5
|
-
import {
|
|
6
|
-
ACTIVE_AGENT_AUTOMATION_ROLES,
|
|
7
|
-
ACTIVE_ROUTING_POSTURES,
|
|
8
|
-
ACTIVE_ROUTING_ROLES,
|
|
9
|
-
COUNCIL_MEMBER_LABEL_PATTERN,
|
|
10
|
-
DEFAULT_SETTINGS,
|
|
11
|
-
THEME_NAMED_COLORS,
|
|
12
|
-
THINKING_LEVELS,
|
|
13
|
-
normalizeOutputStyle
|
|
14
|
-
} from "./chunk-ZKJU55MX.js";
|
|
15
|
-
import {
|
|
16
|
-
require_dist
|
|
17
|
-
} from "./chunk-B5GGDIHT.js";
|
|
18
|
-
import {
|
|
19
|
-
MAX_TIMER_DELAY_MS
|
|
20
|
-
} from "./chunk-6EXUUOSN.js";
|
|
21
|
-
import {
|
|
22
|
-
withStateFileLockSync
|
|
23
|
-
} from "./chunk-DVJL77SO.js";
|
|
24
|
-
import {
|
|
25
|
-
clioConfigDir,
|
|
26
|
-
resolveClioDirs
|
|
27
|
-
} from "./chunk-CTTI7G3T.js";
|
|
28
|
-
import {
|
|
29
|
-
safeResourceWrite
|
|
30
|
-
} from "./chunk-ZZFWWYLX.js";
|
|
31
|
-
import {
|
|
32
|
-
__toESM,
|
|
33
|
-
init_esm_shims
|
|
34
|
-
} from "./chunk-ECBHH7LU.js";
|
|
35
|
-
|
|
36
|
-
// src/core/config.ts
|
|
37
|
-
init_esm_shims();
|
|
38
|
-
var import_yaml = __toESM(require_dist(), 1);
|
|
39
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
40
|
-
import { join } from "node:path";
|
|
41
|
-
function settingsPath() {
|
|
42
|
-
return join(clioConfigDir(), "settings.yaml");
|
|
43
|
-
}
|
|
44
|
-
function issuesKind(issues) {
|
|
45
|
-
return issues[0]?.kind ?? "schema";
|
|
46
|
-
}
|
|
47
|
-
function settingsRemedy(kind, path) {
|
|
48
|
-
if (kind === "unreadable") return `Restore read access to ${path}, then run \`clio-coder doctor\` to re-check.`;
|
|
49
|
-
if (kind === "syntax") return `Fix the YAML in ${path}, then run \`clio-coder doctor\` to re-check.`;
|
|
50
|
-
return `Fix the keys above in ${path}, then run \`clio-coder doctor\` to re-check.`;
|
|
51
|
-
}
|
|
52
|
-
function settingsRemedyInline(kind, path) {
|
|
53
|
-
if (kind === "unreadable") return `restore read access to ${path}`;
|
|
54
|
-
if (kind === "syntax") return `fix the YAML in ${path}`;
|
|
55
|
-
return `edit the named keys in ${path}`;
|
|
56
|
-
}
|
|
57
|
-
var SettingsValidationError = class extends Error {
|
|
58
|
-
issues;
|
|
59
|
-
/**
|
|
60
|
-
* The headline and the remedy both follow the failure kind. A file that
|
|
61
|
-
* cannot be read has no key at fault, so telling its reader to "fix the keys
|
|
62
|
-
* above" named a repair that does not exist for the problem they have.
|
|
63
|
-
*/
|
|
64
|
-
constructor(issues) {
|
|
65
|
-
const path = join(resolveClioDirs().config, "settings.yaml");
|
|
66
|
-
const kind = issuesKind(issues);
|
|
67
|
-
const lines = kind === "schema" ? issues.map((issue) => ` ${issue.path}: ${issue.message}`) : issues.map((issue) => ` ${issue.message}`);
|
|
68
|
-
const headline = kind === "schema" ? "settings.yaml failed validation:" : "settings.yaml cannot be loaded:";
|
|
69
|
-
super(
|
|
70
|
-
`${headline}
|
|
71
|
-
${lines.join("\n")}
|
|
72
|
-
|
|
73
|
-
${settingsRemedy(kind, path)}
|
|
74
|
-
\`clio-coder doctor --fix\` repairs directories and credential permissions; it never rewrites settings.
|
|
75
|
-
To discard these settings and start from defaults instead, run \`clio-coder reset --config --force\`.`
|
|
76
|
-
);
|
|
77
|
-
this.name = "SettingsValidationError";
|
|
78
|
-
this.issues = issues;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
function foldToOneLine(text) {
|
|
82
|
-
return text.replace(/\s*\n\s*/g, " ").trim();
|
|
83
|
-
}
|
|
84
|
-
function yamlErrorSummary(error) {
|
|
85
|
-
const raw = error instanceof Error ? error.message : String(error);
|
|
86
|
-
return (raw.split("\n")[0] ?? raw).trim().replace(/:$/u, "");
|
|
87
|
-
}
|
|
88
|
-
function settingsFailureHeadline(kind) {
|
|
89
|
-
if (kind === "unreadable") return "settings.yaml cannot be read";
|
|
90
|
-
if (kind === "syntax") return "settings.yaml is not valid YAML";
|
|
91
|
-
return "settings.yaml failed validation";
|
|
92
|
-
}
|
|
93
|
-
function formatSettingsIssues(issues) {
|
|
94
|
-
if (issues.length === 0) return "";
|
|
95
|
-
const path = join(resolveClioDirs().config, "settings.yaml");
|
|
96
|
-
const kind = issuesKind(issues);
|
|
97
|
-
const detail = kind === "schema" ? issues.map((issue) => `${issue.path}: ${issue.message}`).join("; ") : issues.map((issue) => issue.message.replace(/^(?:invalid YAML|unreadable): /u, "")).join("; ");
|
|
98
|
-
const discard = "`clio-coder reset --config --force` to start from defaults";
|
|
99
|
-
return foldToOneLine(
|
|
100
|
-
`${settingsFailureHeadline(kind)}: ${settingsRemedyInline(kind, path)}, or ${discard}. ${detail}`
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
function formatSettingsFailure(error) {
|
|
104
|
-
if (error instanceof SettingsValidationError && error.issues.length > 0) return formatSettingsIssues(error.issues);
|
|
105
|
-
return foldToOneLine(error instanceof Error ? error.message : String(error));
|
|
106
|
-
}
|
|
107
|
-
function isPlainObject(value) {
|
|
108
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
109
|
-
}
|
|
110
|
-
function cloneValue(value) {
|
|
111
|
-
return structuredClone(value);
|
|
112
|
-
}
|
|
113
|
-
var Issues = class {
|
|
114
|
-
list = [];
|
|
115
|
-
add(path, message) {
|
|
116
|
-
this.list.push({ path, message });
|
|
117
|
-
}
|
|
118
|
-
unknownKeys(path, raw, known) {
|
|
119
|
-
const knownSet = new Set(known);
|
|
120
|
-
for (const key of Object.keys(raw)) {
|
|
121
|
-
if (!knownSet.has(key)) this.add(path ? `${path}.${key}` : key, "unknown key");
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* A key that used to be honored and is not any more. `unknown key` is the
|
|
126
|
-
* true answer for a typo and the wrong one here: the operator wrote a real
|
|
127
|
-
* key that a real release read, and the useful thing to tell them is what
|
|
128
|
-
* replaced it, not that the schema has never heard of it. The keys stay
|
|
129
|
-
* listed as known at their {@link unknownKeys} call so this message is the
|
|
130
|
-
* one that lands.
|
|
131
|
-
*/
|
|
132
|
-
retiredKeys(path, raw, retired) {
|
|
133
|
-
for (const [key, because] of Object.entries(retired)) {
|
|
134
|
-
if (key in raw) this.add(path ? `${path}.${key}` : key, `retired: ${because}. Remove this key.`);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
function expectString(issues, path, value) {
|
|
139
|
-
if (typeof value !== "string") {
|
|
140
|
-
issues.add(path, `expected a string, got ${describe(value)}`);
|
|
141
|
-
return void 0;
|
|
142
|
-
}
|
|
143
|
-
const trimmed = value.trim();
|
|
144
|
-
if (trimmed.length === 0) {
|
|
145
|
-
issues.add(path, "expected a non-empty string");
|
|
146
|
-
return void 0;
|
|
147
|
-
}
|
|
148
|
-
return trimmed;
|
|
149
|
-
}
|
|
150
|
-
function expectBoolean(issues, path, value) {
|
|
151
|
-
if (typeof value !== "boolean") {
|
|
152
|
-
issues.add(path, `expected a boolean, got ${describe(value)}`);
|
|
153
|
-
return void 0;
|
|
154
|
-
}
|
|
155
|
-
return value;
|
|
156
|
-
}
|
|
157
|
-
function expectNumber(issues, path, value, opts) {
|
|
158
|
-
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
159
|
-
issues.add(path, `expected a number, got ${describe(value)}`);
|
|
160
|
-
return void 0;
|
|
161
|
-
}
|
|
162
|
-
if (opts?.min !== void 0 && value < opts.min) {
|
|
163
|
-
issues.add(path, `expected a number >= ${opts.min}, got ${value}`);
|
|
164
|
-
return void 0;
|
|
165
|
-
}
|
|
166
|
-
if (opts?.max !== void 0 && value > opts.max) {
|
|
167
|
-
issues.add(path, `expected a number <= ${opts.max}, got ${value}`);
|
|
168
|
-
return void 0;
|
|
169
|
-
}
|
|
170
|
-
return value;
|
|
171
|
-
}
|
|
172
|
-
function expectInteger(issues, path, value, opts) {
|
|
173
|
-
if (typeof value !== "number" || !Number.isInteger(value)) {
|
|
174
|
-
issues.add(path, `expected an integer, got ${describe(value)}`);
|
|
175
|
-
return void 0;
|
|
176
|
-
}
|
|
177
|
-
if (opts?.min !== void 0 && value < opts.min) {
|
|
178
|
-
issues.add(path, `expected an integer >= ${opts.min}, got ${value}`);
|
|
179
|
-
return void 0;
|
|
180
|
-
}
|
|
181
|
-
if (opts?.max !== void 0 && value > opts.max) {
|
|
182
|
-
issues.add(path, `expected an integer <= ${opts.max}, got ${value}`);
|
|
183
|
-
return void 0;
|
|
184
|
-
}
|
|
185
|
-
return value;
|
|
186
|
-
}
|
|
187
|
-
function expectEnum(issues, path, value, allowed) {
|
|
188
|
-
if (typeof value === "string" && allowed.includes(value)) return value;
|
|
189
|
-
issues.add(path, `expected one of ${allowed.join(" | ")}, got ${describe(value)}`);
|
|
190
|
-
return void 0;
|
|
191
|
-
}
|
|
192
|
-
function expectStringArray(issues, path, value) {
|
|
193
|
-
if (!Array.isArray(value)) {
|
|
194
|
-
issues.add(path, `expected a list of strings, got ${describe(value)}`);
|
|
195
|
-
return void 0;
|
|
196
|
-
}
|
|
197
|
-
const seen = /* @__PURE__ */ new Set();
|
|
198
|
-
const out = [];
|
|
199
|
-
for (let i = 0; i < value.length; i += 1) {
|
|
200
|
-
const entry = expectString(issues, `${path}[${i}]`, value[i]);
|
|
201
|
-
if (entry === void 0) continue;
|
|
202
|
-
if (seen.has(entry)) continue;
|
|
203
|
-
seen.add(entry);
|
|
204
|
-
out.push(entry);
|
|
205
|
-
}
|
|
206
|
-
return out;
|
|
207
|
-
}
|
|
208
|
-
function expectStringRecord(issues, path, value) {
|
|
209
|
-
if (!isPlainObject(value)) {
|
|
210
|
-
issues.add(path, `expected a string map, got ${describe(value)}`);
|
|
211
|
-
return void 0;
|
|
212
|
-
}
|
|
213
|
-
const out = {};
|
|
214
|
-
for (const [key, raw] of Object.entries(value)) {
|
|
215
|
-
const entry = expectString(issues, `${path}.${key}`, raw);
|
|
216
|
-
if (entry !== void 0) out[key] = entry;
|
|
217
|
-
}
|
|
218
|
-
return out;
|
|
219
|
-
}
|
|
220
|
-
function describe(value) {
|
|
221
|
-
if (value === null) return "null";
|
|
222
|
-
if (Array.isArray(value)) return "a list";
|
|
223
|
-
if (typeof value === "object") return "a map";
|
|
224
|
-
if (typeof value === "string") return value.trim().length === 0 ? "an empty string" : JSON.stringify(value);
|
|
225
|
-
return String(value);
|
|
226
|
-
}
|
|
227
|
-
var TOOL_CALL_FORMATS = ["openai", "anthropic", "hermes", "llama3-json", "mistral", "qwen", "xml"];
|
|
228
|
-
var THINKING_FORMATS = [
|
|
229
|
-
"qwen-chat-template",
|
|
230
|
-
"openrouter",
|
|
231
|
-
"zai",
|
|
232
|
-
"anthropic-extended",
|
|
233
|
-
"deepseek-r1",
|
|
234
|
-
"openai-codex",
|
|
235
|
-
"harmony"
|
|
236
|
-
];
|
|
237
|
-
var STRUCTURED_OUTPUTS = ["json-schema", "gbnf", "xgrammar", "none"];
|
|
238
|
-
var AUTONOMY_LEVELS = ["read-only", "suggest", "auto-edit", "full-auto"];
|
|
239
|
-
var TOOL_GOVERNANCE = ["clio-coder-policy", "agent-managed", "deny-all"];
|
|
240
|
-
function normalizeLegacyNamingValue(value, legacy, canonical) {
|
|
241
|
-
if (value !== legacy) return value;
|
|
242
|
-
warnLegacyNaming(legacy, canonical);
|
|
243
|
-
return canonical;
|
|
244
|
-
}
|
|
245
|
-
function validateCapabilities(issues, path, value) {
|
|
246
|
-
if (!isPlainObject(value)) {
|
|
247
|
-
issues.add(path, `expected a map, got ${describe(value)}`);
|
|
248
|
-
return void 0;
|
|
249
|
-
}
|
|
250
|
-
issues.unknownKeys(path, value, [
|
|
251
|
-
"chat",
|
|
252
|
-
"tools",
|
|
253
|
-
"toolCallFormat",
|
|
254
|
-
"reasoning",
|
|
255
|
-
"thinkingFormat",
|
|
256
|
-
"structuredOutputs",
|
|
257
|
-
"vision",
|
|
258
|
-
"audio",
|
|
259
|
-
"embeddings",
|
|
260
|
-
"rerank",
|
|
261
|
-
"fim",
|
|
262
|
-
"contextWindow",
|
|
263
|
-
"maxTokens"
|
|
264
|
-
]);
|
|
265
|
-
const out = {};
|
|
266
|
-
for (const key of ["chat", "tools", "reasoning", "vision", "audio", "embeddings", "rerank", "fim"]) {
|
|
267
|
-
if (key in value) {
|
|
268
|
-
const v = expectBoolean(issues, `${path}.${key}`, value[key]);
|
|
269
|
-
if (v !== void 0) out[key] = v;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
if ("toolCallFormat" in value) {
|
|
273
|
-
const v = expectEnum(issues, `${path}.toolCallFormat`, value.toolCallFormat, TOOL_CALL_FORMATS);
|
|
274
|
-
if (v !== void 0) out.toolCallFormat = v;
|
|
275
|
-
}
|
|
276
|
-
if ("thinkingFormat" in value) {
|
|
277
|
-
const v = expectEnum(issues, `${path}.thinkingFormat`, value.thinkingFormat, THINKING_FORMATS);
|
|
278
|
-
if (v !== void 0) out.thinkingFormat = v;
|
|
279
|
-
}
|
|
280
|
-
if ("structuredOutputs" in value) {
|
|
281
|
-
const v = expectEnum(issues, `${path}.structuredOutputs`, value.structuredOutputs, STRUCTURED_OUTPUTS);
|
|
282
|
-
if (v !== void 0) out.structuredOutputs = v;
|
|
283
|
-
}
|
|
284
|
-
if ("contextWindow" in value) {
|
|
285
|
-
const v = expectInteger(issues, `${path}.contextWindow`, value.contextWindow, { min: 0 });
|
|
286
|
-
if (v !== void 0) out.contextWindow = v;
|
|
287
|
-
}
|
|
288
|
-
if ("maxTokens" in value) {
|
|
289
|
-
const v = expectInteger(issues, `${path}.maxTokens`, value.maxTokens, { min: 0 });
|
|
290
|
-
if (v !== void 0) out.maxTokens = v;
|
|
291
|
-
}
|
|
292
|
-
return Object.keys(out).length > 0 ? out : void 0;
|
|
293
|
-
}
|
|
294
|
-
function validateAuth(issues, path, value) {
|
|
295
|
-
if (!isPlainObject(value)) {
|
|
296
|
-
issues.add(path, `expected a map, got ${describe(value)}`);
|
|
297
|
-
return void 0;
|
|
298
|
-
}
|
|
299
|
-
issues.unknownKeys(path, value, ["apiKeyEnvVar", "apiKeyRef", "oauthProfile", "headers"]);
|
|
300
|
-
const out = {};
|
|
301
|
-
for (const key of ["apiKeyEnvVar", "apiKeyRef", "oauthProfile"]) {
|
|
302
|
-
if (key in value) {
|
|
303
|
-
const v = expectString(issues, `${path}.${key}`, value[key]);
|
|
304
|
-
if (v !== void 0) out[key] = v;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
if ("headers" in value) {
|
|
308
|
-
const v = expectStringRecord(issues, `${path}.headers`, value.headers);
|
|
309
|
-
if (v !== void 0 && Object.keys(v).length > 0) out.headers = v;
|
|
310
|
-
}
|
|
311
|
-
return Object.keys(out).length > 0 ? out : void 0;
|
|
312
|
-
}
|
|
313
|
-
function validatePricing(issues, path, value) {
|
|
314
|
-
if (!isPlainObject(value)) {
|
|
315
|
-
issues.add(path, `expected a map, got ${describe(value)}`);
|
|
316
|
-
return void 0;
|
|
317
|
-
}
|
|
318
|
-
issues.unknownKeys(path, value, ["input", "output", "cacheRead", "cacheWrite"]);
|
|
319
|
-
const input = expectNumber(issues, `${path}.input`, value.input, { min: 0 });
|
|
320
|
-
const output = expectNumber(issues, `${path}.output`, value.output, { min: 0 });
|
|
321
|
-
if (input === void 0 || output === void 0) return void 0;
|
|
322
|
-
const out = { input, output };
|
|
323
|
-
if ("cacheRead" in value) {
|
|
324
|
-
const v = expectNumber(issues, `${path}.cacheRead`, value.cacheRead, { min: 0 });
|
|
325
|
-
if (v !== void 0) out.cacheRead = v;
|
|
326
|
-
}
|
|
327
|
-
if ("cacheWrite" in value) {
|
|
328
|
-
const v = expectNumber(issues, `${path}.cacheWrite`, value.cacheWrite, { min: 0 });
|
|
329
|
-
if (v !== void 0) out.cacheWrite = v;
|
|
330
|
-
}
|
|
331
|
-
return out;
|
|
332
|
-
}
|
|
333
|
-
function validateLmStudioSettings(issues, path, value) {
|
|
334
|
-
if (!isPlainObject(value)) {
|
|
335
|
-
issues.add(path, `expected a map, got ${describe(value)}`);
|
|
336
|
-
return void 0;
|
|
337
|
-
}
|
|
338
|
-
issues.unknownKeys(path, value, ["load", "request"]);
|
|
339
|
-
const out = {};
|
|
340
|
-
if ("load" in value) {
|
|
341
|
-
if (!isPlainObject(value.load)) {
|
|
342
|
-
issues.add(`${path}.load`, `expected a map, got ${describe(value.load)}`);
|
|
343
|
-
} else {
|
|
344
|
-
issues.unknownKeys(`${path}.load`, value.load, [
|
|
345
|
-
"contextLength",
|
|
346
|
-
"flashAttention",
|
|
347
|
-
"evalBatchSize",
|
|
348
|
-
"numExperts",
|
|
349
|
-
"offloadKvCacheToGpu"
|
|
350
|
-
]);
|
|
351
|
-
const load = {};
|
|
352
|
-
for (const key of ["contextLength", "evalBatchSize", "numExperts"]) {
|
|
353
|
-
if (key in value.load) {
|
|
354
|
-
const parsed = expectInteger(issues, `${path}.load.${key}`, value.load[key], { min: 1 });
|
|
355
|
-
if (parsed !== void 0) load[key] = parsed;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
for (const key of ["flashAttention", "offloadKvCacheToGpu"]) {
|
|
359
|
-
if (key in value.load) {
|
|
360
|
-
const parsed = expectBoolean(issues, `${path}.load.${key}`, value.load[key]);
|
|
361
|
-
if (parsed !== void 0) load[key] = parsed;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
if (Object.keys(load).length > 0) out.load = load;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
if ("request" in value) {
|
|
368
|
-
if (!isPlainObject(value.request)) {
|
|
369
|
-
issues.add(`${path}.request`, `expected a map, got ${describe(value.request)}`);
|
|
370
|
-
} else {
|
|
371
|
-
issues.unknownKeys(`${path}.request`, value.request, ["ttlSeconds", "draftModel", "reasoning"]);
|
|
372
|
-
const request = {};
|
|
373
|
-
if ("ttlSeconds" in value.request) {
|
|
374
|
-
const parsed = expectInteger(issues, `${path}.request.ttlSeconds`, value.request.ttlSeconds, { min: 1 });
|
|
375
|
-
if (parsed !== void 0) request.ttlSeconds = parsed;
|
|
376
|
-
}
|
|
377
|
-
if ("draftModel" in value.request) {
|
|
378
|
-
const parsed = expectString(issues, `${path}.request.draftModel`, value.request.draftModel);
|
|
379
|
-
if (parsed !== void 0) request.draftModel = parsed;
|
|
380
|
-
}
|
|
381
|
-
if ("reasoning" in value.request) {
|
|
382
|
-
const parsed = expectEnum(issues, `${path}.request.reasoning`, value.request.reasoning, [
|
|
383
|
-
"auto",
|
|
384
|
-
"off",
|
|
385
|
-
"on",
|
|
386
|
-
"low",
|
|
387
|
-
"medium",
|
|
388
|
-
"high"
|
|
389
|
-
]);
|
|
390
|
-
if (parsed !== void 0) request.reasoning = parsed;
|
|
391
|
-
}
|
|
392
|
-
if (Object.keys(request).length > 0) out.request = request;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
return Object.keys(out).length > 0 ? out : void 0;
|
|
396
|
-
}
|
|
397
|
-
function validateLiteLLMSettings(issues, path, value) {
|
|
398
|
-
if (!isPlainObject(value)) {
|
|
399
|
-
issues.add(path, `expected a map, got ${describe(value)}`);
|
|
400
|
-
return void 0;
|
|
401
|
-
}
|
|
402
|
-
issues.unknownKeys(path, value, ["request"]);
|
|
403
|
-
const out = {};
|
|
404
|
-
if ("request" in value) {
|
|
405
|
-
if (!isPlainObject(value.request)) {
|
|
406
|
-
issues.add(`${path}.request`, `expected a map, got ${describe(value.request)}`);
|
|
407
|
-
} else {
|
|
408
|
-
issues.unknownKeys(`${path}.request`, value.request, [
|
|
409
|
-
"tags",
|
|
410
|
-
"sendSessionId",
|
|
411
|
-
"timeoutSeconds",
|
|
412
|
-
"streamTimeoutSeconds",
|
|
413
|
-
"numRetries"
|
|
414
|
-
]);
|
|
415
|
-
const request = {};
|
|
416
|
-
if ("tags" in value.request) {
|
|
417
|
-
const parsed = expectStringArray(issues, `${path}.request.tags`, value.request.tags);
|
|
418
|
-
if (parsed !== void 0) {
|
|
419
|
-
const invalidTag = parsed.find((tag) => tag.includes(","));
|
|
420
|
-
if (invalidTag) issues.add(`${path}.request.tags`, "tags may not contain commas");
|
|
421
|
-
else if (parsed.length > 0) request.tags = [...new Set(parsed)];
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
if ("sendSessionId" in value.request) {
|
|
425
|
-
const parsed = expectBoolean(issues, `${path}.request.sendSessionId`, value.request.sendSessionId);
|
|
426
|
-
if (parsed !== void 0) request.sendSessionId = parsed;
|
|
427
|
-
}
|
|
428
|
-
for (const key of ["timeoutSeconds", "streamTimeoutSeconds"]) {
|
|
429
|
-
if (key in value.request) {
|
|
430
|
-
const parsed = expectNumber(issues, `${path}.request.${key}`, value.request[key], { min: 1e-3, max: 86400 });
|
|
431
|
-
if (parsed !== void 0) request[key] = parsed;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
if ("numRetries" in value.request) {
|
|
435
|
-
const parsed = expectInteger(issues, `${path}.request.numRetries`, value.request.numRetries, { min: 0, max: 100 });
|
|
436
|
-
if (parsed !== void 0) request.numRetries = parsed;
|
|
437
|
-
}
|
|
438
|
-
if (Object.keys(request).length > 0) out.request = request;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
return Object.keys(out).length > 0 ? out : void 0;
|
|
442
|
-
}
|
|
443
|
-
function validateTarget(issues, path, value) {
|
|
444
|
-
if (!isPlainObject(value)) {
|
|
445
|
-
issues.add(path, `expected a map, got ${describe(value)}`);
|
|
446
|
-
return null;
|
|
447
|
-
}
|
|
448
|
-
issues.unknownKeys(path, value, [
|
|
449
|
-
"id",
|
|
450
|
-
"runtime",
|
|
451
|
-
"url",
|
|
452
|
-
"auth",
|
|
453
|
-
"defaultModel",
|
|
454
|
-
"wireModels",
|
|
455
|
-
"capabilities",
|
|
456
|
-
"lifecycle",
|
|
457
|
-
"gateway",
|
|
458
|
-
"pricing",
|
|
459
|
-
"cache",
|
|
460
|
-
"lmstudio",
|
|
461
|
-
"litellm",
|
|
462
|
-
"maxConcurrentRequests"
|
|
463
|
-
]);
|
|
464
|
-
const id = "id" in value ? expectString(issues, `${path}.id`, value.id) : void 0;
|
|
465
|
-
const runtime = "runtime" in value ? expectString(issues, `${path}.runtime`, value.runtime) : void 0;
|
|
466
|
-
if (!("id" in value)) issues.add(`${path}.id`, "required");
|
|
467
|
-
if (!("runtime" in value)) issues.add(`${path}.runtime`, "required");
|
|
468
|
-
if (id === void 0 || runtime === void 0) return null;
|
|
469
|
-
const target = { id, runtime };
|
|
470
|
-
if ("url" in value) {
|
|
471
|
-
const v = expectString(issues, `${path}.url`, value.url);
|
|
472
|
-
if (v !== void 0) target.url = v;
|
|
473
|
-
}
|
|
474
|
-
if ("auth" in value) {
|
|
475
|
-
const v = validateAuth(issues, `${path}.auth`, value.auth);
|
|
476
|
-
if (v !== void 0) target.auth = v;
|
|
477
|
-
}
|
|
478
|
-
if ("wireModels" in value) {
|
|
479
|
-
const v = expectStringArray(issues, `${path}.wireModels`, value.wireModels);
|
|
480
|
-
if (v !== void 0 && v.length > 0) target.wireModels = v;
|
|
481
|
-
}
|
|
482
|
-
if ("defaultModel" in value) {
|
|
483
|
-
const v = expectString(issues, `${path}.defaultModel`, value.defaultModel);
|
|
484
|
-
if (v !== void 0) target.defaultModel = v;
|
|
485
|
-
} else if (target.wireModels?.[0]) {
|
|
486
|
-
target.defaultModel = target.wireModels[0];
|
|
487
|
-
}
|
|
488
|
-
if ("capabilities" in value) {
|
|
489
|
-
const v = validateCapabilities(issues, `${path}.capabilities`, value.capabilities);
|
|
490
|
-
if (v !== void 0) target.capabilities = v;
|
|
491
|
-
}
|
|
492
|
-
if ("lifecycle" in value) {
|
|
493
|
-
const v = expectEnum(
|
|
494
|
-
issues,
|
|
495
|
-
`${path}.lifecycle`,
|
|
496
|
-
normalizeLegacyNamingValue(value.lifecycle, "clio-managed", "clio-coder-managed"),
|
|
497
|
-
["user-managed", "clio-coder-managed"]
|
|
498
|
-
);
|
|
499
|
-
if (v !== void 0) target.lifecycle = v;
|
|
500
|
-
}
|
|
501
|
-
if ("gateway" in value) {
|
|
502
|
-
const v = expectBoolean(issues, `${path}.gateway`, value.gateway);
|
|
503
|
-
if (v !== void 0) target.gateway = v;
|
|
504
|
-
}
|
|
505
|
-
if ("pricing" in value) {
|
|
506
|
-
const v = validatePricing(issues, `${path}.pricing`, value.pricing);
|
|
507
|
-
if (v !== void 0) target.pricing = v;
|
|
508
|
-
}
|
|
509
|
-
if ("cache" in value) {
|
|
510
|
-
if (!isPlainObject(value.cache)) issues.add(`${path}.cache`, "expected a map");
|
|
511
|
-
else {
|
|
512
|
-
issues.unknownKeys(`${path}.cache`, value.cache, ["retention", "deployment", "warm"]);
|
|
513
|
-
target.cache = {};
|
|
514
|
-
if ("retention" in value.cache) {
|
|
515
|
-
const retention = expectEnum(issues, `${path}.cache.retention`, value.cache.retention, [
|
|
516
|
-
"none",
|
|
517
|
-
"short",
|
|
518
|
-
"long"
|
|
519
|
-
]);
|
|
520
|
-
if (retention !== void 0) target.cache.retention = retention;
|
|
521
|
-
}
|
|
522
|
-
if ("deployment" in value.cache) {
|
|
523
|
-
const binding = value.cache.deployment;
|
|
524
|
-
const bindingPath = `${path}.cache.deployment`;
|
|
525
|
-
if (!isPlainObject(binding)) issues.add(bindingPath, "expected a map");
|
|
526
|
-
else {
|
|
527
|
-
issues.unknownKeys(bindingPath, binding, ["backend", "controlUrl", "model", "build", "gatewayDeploymentId"]);
|
|
528
|
-
const backend = expectEnum(issues, `${bindingPath}.backend`, binding.backend, ["llamacpp", "vllm"]);
|
|
529
|
-
for (const key of ["controlUrl", "model", "build"]) {
|
|
530
|
-
if (typeof binding[key] !== "string" || !binding[key].trim())
|
|
531
|
-
issues.add(`${bindingPath}.${key}`, "expected a nonempty string");
|
|
532
|
-
}
|
|
533
|
-
if (typeof binding.controlUrl === "string") {
|
|
534
|
-
try {
|
|
535
|
-
const url = new URL(binding.controlUrl);
|
|
536
|
-
if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || url.search || url.hash)
|
|
537
|
-
throw new Error("invalid URL");
|
|
538
|
-
} catch {
|
|
539
|
-
issues.add(`${bindingPath}.controlUrl`, "expected an HTTP(S) URL without credentials, query, or fragment");
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
if (binding.gatewayDeploymentId !== void 0 && (typeof binding.gatewayDeploymentId !== "string" || !binding.gatewayDeploymentId.trim()))
|
|
543
|
-
issues.add(`${bindingPath}.gatewayDeploymentId`, "expected a nonempty string");
|
|
544
|
-
if (backend && typeof binding.controlUrl === "string" && typeof binding.model === "string" && typeof binding.build === "string") {
|
|
545
|
-
target.cache.deployment = {
|
|
546
|
-
backend,
|
|
547
|
-
controlUrl: binding.controlUrl,
|
|
548
|
-
model: binding.model,
|
|
549
|
-
build: binding.build,
|
|
550
|
-
...typeof binding.gatewayDeploymentId === "string" ? { gatewayDeploymentId: binding.gatewayDeploymentId } : {}
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
if ("warm" in value.cache) {
|
|
556
|
-
if (!isPlainObject(value.cache.warm)) issues.add(`${path}.cache.warm`, "expected a map");
|
|
557
|
-
else {
|
|
558
|
-
issues.unknownKeys(`${path}.cache.warm`, value.cache.warm, ["maxInputTokens", "maxDurationMs", "cooldownMs"]);
|
|
559
|
-
target.cache.warm = {};
|
|
560
|
-
for (const key of ["maxInputTokens", "maxDurationMs", "cooldownMs"]) {
|
|
561
|
-
const bound = value.cache.warm[key];
|
|
562
|
-
if (bound === void 0) continue;
|
|
563
|
-
if (typeof bound !== "number" || !Number.isSafeInteger(bound) || bound < 1)
|
|
564
|
-
issues.add(`${path}.cache.warm.${key}`, "expected a positive safe integer");
|
|
565
|
-
else target.cache.warm[key] = bound;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
if ("lmstudio" in value) {
|
|
572
|
-
const v = validateLmStudioSettings(issues, `${path}.lmstudio`, value.lmstudio);
|
|
573
|
-
if (v !== void 0) target.lmstudio = v;
|
|
574
|
-
}
|
|
575
|
-
if ("litellm" in value) {
|
|
576
|
-
const v = validateLiteLLMSettings(issues, `${path}.litellm`, value.litellm);
|
|
577
|
-
if (v !== void 0) target.litellm = v;
|
|
578
|
-
}
|
|
579
|
-
if ("maxConcurrentRequests" in value) {
|
|
580
|
-
const v = expectInteger(issues, `${path}.maxConcurrentRequests`, value.maxConcurrentRequests, { min: 1 });
|
|
581
|
-
if (v !== void 0) target.maxConcurrentRequests = v;
|
|
582
|
-
}
|
|
583
|
-
return target;
|
|
584
|
-
}
|
|
585
|
-
var SETTINGS_V1_PATH_MOVES = Object.freeze([
|
|
586
|
-
["autonomy", "safety.autonomy"],
|
|
587
|
-
["orchestrator.target", "chat.target"],
|
|
588
|
-
["orchestrator.model", "chat.model"],
|
|
589
|
-
["orchestrator.thinkingLevel", "chat.thinkingLevel"],
|
|
590
|
-
["scope[]", "chat.modelPicker.cycleSet[]"],
|
|
591
|
-
["modelSelector.favorites[]", "chat.modelPicker.favorites[]"],
|
|
592
|
-
["modelSelector.recentLimit", "chat.modelPicker.recentLimit"],
|
|
593
|
-
["defaults.maxTokens", "chat.maxOutputTokens"],
|
|
594
|
-
["prewarm.enabled", "chat.prewarm"],
|
|
595
|
-
["retry.enabled", "chat.retry.enabled"],
|
|
596
|
-
["retry.maxRetries", "chat.retry.maxRetries"],
|
|
597
|
-
["retry.baseDelayMs", "chat.retry.baseDelayMs"],
|
|
598
|
-
["retry.maxDelayMs", "chat.retry.maxDelayMs"],
|
|
599
|
-
["retry.streamStallMs", "chat.retry.streamStallMs"],
|
|
600
|
-
["workers.default.target", "fleet.default.target"],
|
|
601
|
-
["workers.default.model", "fleet.default.model"],
|
|
602
|
-
["workers.default.thinkingLevel", "fleet.default.thinkingLevel"],
|
|
603
|
-
["workers.default.node", "fleet.default.node"],
|
|
604
|
-
["workers.profiles.*.target", "fleet.profiles.*.target"],
|
|
605
|
-
["workers.profiles.*.model", "fleet.profiles.*.model"],
|
|
606
|
-
["workers.profiles.*.thinkingLevel", "fleet.profiles.*.thinkingLevel"],
|
|
607
|
-
["workers.profiles.*.node", "fleet.profiles.*.node"],
|
|
608
|
-
["workers.rosters.*.members[].label", "fleet.rosters.*.members[].label"],
|
|
609
|
-
["workers.rosters.*.members[].target", "fleet.rosters.*.members[].target"],
|
|
610
|
-
["workers.rosters.*.members[].model", "fleet.rosters.*.members[].model"],
|
|
611
|
-
["workers.rosters.*.members[].thinking", "fleet.rosters.*.members[].thinkingLevel"],
|
|
612
|
-
["workers.rosters.*.members[].color", "fleet.rosters.*.members[].color"],
|
|
613
|
-
["workers.agentBindings.*", "fleet.agentProfiles.*"],
|
|
614
|
-
["routing.activeRoles[]", "fleet.adaptiveRouting.roles[]"],
|
|
615
|
-
["routing.activePostures[]", "fleet.adaptiveRouting.postures[]"],
|
|
616
|
-
["routing.agentAutomation.activeAgentRoles[].agentId", "fleet.adaptiveRouting.agentRoles[].agentId"],
|
|
617
|
-
["routing.agentAutomation.activeAgentRoles[].executionRole", "fleet.adaptiveRouting.agentRoles[].executionRole"],
|
|
618
|
-
["budget.concurrency", "fleet.concurrency"],
|
|
619
|
-
["workers.maxRetries", "fleet.retry.maxRetries"],
|
|
620
|
-
["workers.resilienceCooldownMs", "fleet.retry.routeCooldownMs"],
|
|
621
|
-
["workers.onPermission", "fleet.permissions.mode"],
|
|
622
|
-
["workers.escalation.timeoutMs", "fleet.permissions.escalation.timeoutMs"],
|
|
623
|
-
["workers.escalation.fallback", "fleet.permissions.escalation.fallback"],
|
|
624
|
-
["guardrails.workerToolCallCap", "fleet.limits.toolCallsPerRun"],
|
|
625
|
-
["guardrails.internalDispatchTimeoutMs", "fleet.limits.internalRunTimeoutMs"],
|
|
626
|
-
["guardrails.maxDispatchRuns", "fleet.history.maxRuns"],
|
|
627
|
-
["compaction.auto", "context.compaction.auto"],
|
|
628
|
-
["compaction.threshold", "context.compaction.threshold"],
|
|
629
|
-
["compaction.model", "context.compaction.model"],
|
|
630
|
-
["compaction.systemPrompt", "context.compaction.systemPrompt"],
|
|
631
|
-
["background.target", "context.memory.target"],
|
|
632
|
-
["background.model", "context.memory.model"],
|
|
633
|
-
["memory.intervention.enabled", "context.memory.enabled"],
|
|
634
|
-
["memory.intervention.everyNTools", "context.memory.cadenceToolCalls"],
|
|
635
|
-
["memory.intervention.windowSteps", "context.memory.trajectorySteps"],
|
|
636
|
-
["memory.intervention.maxTokens", "context.memory.maxOutputTokens"],
|
|
637
|
-
["memory.intervention.timeoutMs", "context.memory.timeoutMs"],
|
|
638
|
-
["budget.sessionCeilingUsd", "safety.limits.sessionCostUsd"],
|
|
639
|
-
["guardrails.turnToolCallBudget", "safety.limits.chatToolCallsPerTurn"],
|
|
640
|
-
["guardrails.readMaxBytes", "safety.limits.readBytesPerCall"],
|
|
641
|
-
["guardrails.observationTurnBudgetBytes", "safety.limits.observationBytesPerTurn"],
|
|
642
|
-
["watchdog.enabled", "safety.review.enabled"],
|
|
643
|
-
["watchdog.target", "safety.review.target"],
|
|
644
|
-
["watchdog.cadenceToolCalls", "safety.review.cadenceToolCalls"],
|
|
645
|
-
["terminal.outputVerbosity", "interface.outputDetail"],
|
|
646
|
-
["terminal.smoothStreaming", "interface.smoothStreaming"],
|
|
647
|
-
["terminal.tuiMode", "interface.mode"],
|
|
648
|
-
["terminal.fullscreenScrollbar", "interface.fullscreenScrollbar"],
|
|
649
|
-
["terminal.showTerminalProgress", "interface.terminalProgress"],
|
|
650
|
-
["terminal.notify", "interface.desktopNotifications"],
|
|
651
|
-
// The panes keys shipped for exactly one release (v0.4.0, the day before
|
|
652
|
-
// this rework) but they did ship, and each has a direct v2 successor with
|
|
653
|
-
// an identical value domain, so they move like everything else. The
|
|
654
|
-
// retired agents/keepFailed pair and the `panes` root itself stay in
|
|
655
|
-
// SETTINGS_V1_RETIRED-adjacent handling via V1_ONLY_ROOTS.
|
|
656
|
-
["panes.enabled", "interface.panes.enabled"],
|
|
657
|
-
["panes.notifications", "interface.panes.notifications"],
|
|
658
|
-
["panes.journal", "fleet.history.journal"],
|
|
659
|
-
["panes.yazi.enabled", "interface.panes.files.enabled"],
|
|
660
|
-
["panes.yazi.mode", "interface.panes.files.mode"],
|
|
661
|
-
["panes.yazi.profile", "interface.panes.files.profile"],
|
|
662
|
-
["panes.yazi.followCwd", "interface.panes.files.followCwd"],
|
|
663
|
-
["keybindings.*", "interface.keybindings.*"],
|
|
664
|
-
["skills.trustProjectCompatRoots", "integrations.projectResources.trustProjectImports"],
|
|
665
|
-
["delegation.defaults.connectTimeoutMs", "integrations.externalAgents.defaults.connectTimeoutMs"],
|
|
666
|
-
["delegation.defaults.turnTimeoutMs", "integrations.externalAgents.defaults.turnTimeoutMs"],
|
|
667
|
-
["delegation.defaults.permissionTimeoutMs", "integrations.externalAgents.defaults.permissionTimeoutMs"],
|
|
668
|
-
["delegation.defaults.toolGovernance", "integrations.externalAgents.defaults.toolGovernance"],
|
|
669
|
-
["delegation.agents[].id", "integrations.externalAgents.entries[].id"],
|
|
670
|
-
["delegation.agents[].command", "integrations.externalAgents.entries[].command"],
|
|
671
|
-
["delegation.agents[].args[]", "integrations.externalAgents.entries[].args[]"],
|
|
672
|
-
["delegation.agents[].cwd", "integrations.externalAgents.entries[].cwd"],
|
|
673
|
-
["delegation.agents[].env.*", "integrations.externalAgents.entries[].env.*"],
|
|
674
|
-
["delegation.agents[].connectTimeoutMs", "integrations.externalAgents.entries[].connectTimeoutMs"],
|
|
675
|
-
["delegation.agents[].turnTimeoutMs", "integrations.externalAgents.entries[].turnTimeoutMs"],
|
|
676
|
-
["delegation.agents[].permissionTimeoutMs", "integrations.externalAgents.entries[].permissionTimeoutMs"],
|
|
677
|
-
["delegation.agents[].stallTimeoutMs", "integrations.externalAgents.entries[].stallTimeoutMs"],
|
|
678
|
-
["delegation.agents[].toolGovernance", "integrations.externalAgents.entries[].toolGovernance"],
|
|
679
|
-
["delegation.agents[].projectContext", "integrations.externalAgents.entries[].projectContext"],
|
|
680
|
-
["delegation.agents[].labels.*", "integrations.externalAgents.entries[].labels.*"],
|
|
681
|
-
["runtimePlugins[]", "integrations.runtimePlugins[]"],
|
|
682
|
-
["library.catalog", "integrations.library.catalog"],
|
|
683
|
-
["library.remote", "integrations.library.remote"],
|
|
684
|
-
["library.confirmedRemote", "integrations.library.confirmedRemote"],
|
|
685
|
-
["library.sync", "integrations.library.sync"],
|
|
686
|
-
["attribution.gitCommits", "integrations.git.commitAttribution"],
|
|
687
|
-
["fleet.nodes[].clioEntry", "fleet.nodes[].clioCoderEntry"]
|
|
688
|
-
]);
|
|
689
|
-
var SETTINGS_V1_RETIRED_PATHS = Object.freeze({
|
|
690
|
-
identity: "it was accepted and ignored; no behavior is lost",
|
|
691
|
-
"background.thinkingLevel": "proactive memory always resolves thinking off",
|
|
692
|
-
theme: "the only registered theme was not read by runtime rendering",
|
|
693
|
-
"compaction.excludeLastTurns": "only the temporary legacy mask used it; context.workingSet.protectLastTurns remains"
|
|
694
|
-
});
|
|
695
|
-
var V1_ONLY_ROOTS = /* @__PURE__ */ new Set([
|
|
696
|
-
"identity",
|
|
697
|
-
"autonomy",
|
|
698
|
-
"runtimePlugins",
|
|
699
|
-
"orchestrator",
|
|
700
|
-
"background",
|
|
701
|
-
"memory",
|
|
702
|
-
"watchdog",
|
|
703
|
-
"workers",
|
|
704
|
-
"routing",
|
|
705
|
-
"scope",
|
|
706
|
-
"modelSelector",
|
|
707
|
-
"budget",
|
|
708
|
-
"defaults",
|
|
709
|
-
"theme",
|
|
710
|
-
"terminal",
|
|
711
|
-
"skills",
|
|
712
|
-
"library",
|
|
713
|
-
"attribution",
|
|
714
|
-
"delegation",
|
|
715
|
-
"keybindings",
|
|
716
|
-
"compaction",
|
|
717
|
-
"prewarm",
|
|
718
|
-
"panes",
|
|
719
|
-
"retry",
|
|
720
|
-
"guardrails"
|
|
721
|
-
]);
|
|
722
|
-
function pathPatternSegments(pattern) {
|
|
723
|
-
return pattern.split(".");
|
|
724
|
-
}
|
|
725
|
-
function patternMatches(value, pattern) {
|
|
726
|
-
const out = [];
|
|
727
|
-
const visit = (current, segments, path) => {
|
|
728
|
-
const segment = segments[0];
|
|
729
|
-
if (segment === void 0) {
|
|
730
|
-
out.push({ path });
|
|
731
|
-
return;
|
|
732
|
-
}
|
|
733
|
-
const rest = segments.slice(1);
|
|
734
|
-
if (segment === "*") {
|
|
735
|
-
if (!isPlainObject(current)) return;
|
|
736
|
-
for (const [key2, child2] of Object.entries(current)) visit(child2, rest, path ? `${path}.${key2}` : key2);
|
|
737
|
-
return;
|
|
738
|
-
}
|
|
739
|
-
const list = segment.endsWith("[]");
|
|
740
|
-
const key = list ? segment.slice(0, -2) : segment;
|
|
741
|
-
if (!isPlainObject(current) || !(key in current)) return;
|
|
742
|
-
const child = current[key];
|
|
743
|
-
const nextPath = path ? `${path}.${key}` : key;
|
|
744
|
-
if (!list) {
|
|
745
|
-
visit(child, rest, nextPath);
|
|
746
|
-
return;
|
|
747
|
-
}
|
|
748
|
-
if (!Array.isArray(child)) return;
|
|
749
|
-
for (let index = 0; index < child.length; index += 1) visit(child[index], rest, `${nextPath}[${index}]`);
|
|
750
|
-
};
|
|
751
|
-
visit(value, pathPatternSegments(pattern), "");
|
|
752
|
-
return out;
|
|
753
|
-
}
|
|
754
|
-
function reportV1Tombstones(issues, raw) {
|
|
755
|
-
const reportedRoots = /* @__PURE__ */ new Set();
|
|
756
|
-
for (const [from, to] of SETTINGS_V1_PATH_MOVES) {
|
|
757
|
-
for (const match of patternMatches(raw, from)) {
|
|
758
|
-
issues.add(match.path, `retired settings-v1 path; use ${to} in version 2`);
|
|
759
|
-
reportedRoots.add(match.path.split(/[.[]/u)[0] ?? match.path);
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
for (const [path, reason] of Object.entries(SETTINGS_V1_RETIRED_PATHS)) {
|
|
763
|
-
for (const match of patternMatches(raw, path)) {
|
|
764
|
-
issues.add(match.path, `retired without replacement: ${reason}. Remove this key`);
|
|
765
|
-
reportedRoots.add(match.path.split(/[.[]/u)[0] ?? match.path);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
for (const root of V1_ONLY_ROOTS) {
|
|
769
|
-
if (root in raw && !reportedRoots.has(root)) {
|
|
770
|
-
const replacements = new Set(
|
|
771
|
-
SETTINGS_V1_PATH_MOVES.filter(([from]) => from.split(/[.[]/u)[0] === root).map(
|
|
772
|
-
([, to]) => to.split(/[.[]/u)[0] ?? to
|
|
773
|
-
)
|
|
774
|
-
);
|
|
775
|
-
const hint = replacements.size > 0 ? `; use ${[...replacements].join(" or ")} in version 2` : "";
|
|
776
|
-
issues.add(root, `retired settings-v1 namespace${hint}; migrate this document with \`clio-coder upgrade\``);
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
function validateRoute(issues, path, value, defaults, targets, options) {
|
|
781
|
-
const out = cloneValue(defaults);
|
|
782
|
-
if (!isPlainObject(value)) {
|
|
783
|
-
issues.add(path, `expected a map, got ${describe(value)}`);
|
|
784
|
-
return out;
|
|
785
|
-
}
|
|
786
|
-
const allowNode = options?.nodeIds !== void 0;
|
|
787
|
-
issues.unknownKeys(
|
|
788
|
-
path,
|
|
789
|
-
value,
|
|
790
|
-
allowNode ? ["target", "model", "thinkingLevel", "node"] : ["target", "model", "thinkingLevel"]
|
|
791
|
-
);
|
|
792
|
-
if ("target" in value) {
|
|
793
|
-
if (value.target === null) out.target = null;
|
|
794
|
-
else {
|
|
795
|
-
const parsed = expectString(issues, `${path}.target`, value.target);
|
|
796
|
-
if (parsed !== void 0) out.target = targets.some((entry) => entry.id === parsed) ? parsed : null;
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
if ("model" in value) {
|
|
800
|
-
if (value.model === null) out.model = null;
|
|
801
|
-
else {
|
|
802
|
-
const parsed = expectString(issues, `${path}.model`, value.model);
|
|
803
|
-
if (parsed !== void 0) out.model = parsed;
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
if ("thinkingLevel" in value) {
|
|
807
|
-
const parsed = expectEnum(issues, `${path}.thinkingLevel`, value.thinkingLevel, THINKING_LEVELS);
|
|
808
|
-
if (parsed !== void 0) out.thinkingLevel = parsed;
|
|
809
|
-
}
|
|
810
|
-
if (allowNode && "node" in value) {
|
|
811
|
-
if (value.node === null) delete out.node;
|
|
812
|
-
else {
|
|
813
|
-
const parsed = expectString(issues, `${path}.node`, value.node);
|
|
814
|
-
if (parsed !== void 0 && (parsed === "local" || options.nodeIds?.has(parsed) === true)) out.node = parsed;
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
if (!out.target) out.model = null;
|
|
818
|
-
else if (out.model === null) out.model = targets.find((entry) => entry.id === out.target)?.defaultModel ?? null;
|
|
819
|
-
return out;
|
|
820
|
-
}
|
|
821
|
-
function normalizeModelRefs(refs, targets) {
|
|
822
|
-
const targetIds = new Set(targets.map((target) => target.id));
|
|
823
|
-
return refs.filter((ref) => {
|
|
824
|
-
const [targetId, ...model] = ref.split("/");
|
|
825
|
-
return Boolean(targetId && targetIds.has(targetId) && model.join("/").trim());
|
|
826
|
-
});
|
|
827
|
-
}
|
|
828
|
-
function normalizeCycleSet(refs) {
|
|
829
|
-
return refs.filter((ref) => Boolean(ref.trim().split("/")[0]));
|
|
830
|
-
}
|
|
831
|
-
function validateExternalAgent(issues, path, value, defaults, seen) {
|
|
832
|
-
if (!isPlainObject(value)) {
|
|
833
|
-
issues.add(path, `expected a map, got ${describe(value)}`);
|
|
834
|
-
return null;
|
|
835
|
-
}
|
|
836
|
-
issues.unknownKeys(path, value, [
|
|
837
|
-
"id",
|
|
838
|
-
"command",
|
|
839
|
-
"args",
|
|
840
|
-
"cwd",
|
|
841
|
-
"env",
|
|
842
|
-
"connectTimeoutMs",
|
|
843
|
-
"turnTimeoutMs",
|
|
844
|
-
"permissionTimeoutMs",
|
|
845
|
-
"stallTimeoutMs",
|
|
846
|
-
"toolGovernance",
|
|
847
|
-
"projectContext",
|
|
848
|
-
"labels"
|
|
849
|
-
]);
|
|
850
|
-
const id = "id" in value ? expectString(issues, `${path}.id`, value.id) : void 0;
|
|
851
|
-
const command = "command" in value ? expectString(issues, `${path}.command`, value.command) : void 0;
|
|
852
|
-
if (!("id" in value)) issues.add(`${path}.id`, "required");
|
|
853
|
-
if (!("command" in value)) issues.add(`${path}.command`, "required");
|
|
854
|
-
if (id === void 0 || command === void 0) return null;
|
|
855
|
-
if (id === "auto") {
|
|
856
|
-
issues.add(`${path}.id`, "'auto' is reserved for coordinator-owned agent selection");
|
|
857
|
-
return null;
|
|
858
|
-
}
|
|
859
|
-
if (seen.has(id)) {
|
|
860
|
-
issues.add(`${path}.id`, `duplicate external agent id '${id}'`);
|
|
861
|
-
return null;
|
|
862
|
-
}
|
|
863
|
-
seen.add(id);
|
|
864
|
-
const agent = {
|
|
865
|
-
id,
|
|
866
|
-
command,
|
|
867
|
-
args: [],
|
|
868
|
-
connectTimeoutMs: defaults.connectTimeoutMs,
|
|
869
|
-
turnTimeoutMs: defaults.turnTimeoutMs,
|
|
870
|
-
permissionTimeoutMs: defaults.permissionTimeoutMs,
|
|
871
|
-
toolGovernance: defaults.toolGovernance
|
|
872
|
-
};
|
|
873
|
-
if ("args" in value) {
|
|
874
|
-
const parsed = expectStringArray(issues, `${path}.args`, value.args);
|
|
875
|
-
if (parsed !== void 0) agent.args = parsed;
|
|
876
|
-
}
|
|
877
|
-
for (const key of ["connectTimeoutMs", "turnTimeoutMs", "permissionTimeoutMs"]) {
|
|
878
|
-
if (!(key in value)) continue;
|
|
879
|
-
const parsed = expectInteger(issues, `${path}.${key}`, value[key], {
|
|
880
|
-
min: key === "turnTimeoutMs" ? 0 : 1,
|
|
881
|
-
max: MAX_TIMER_DELAY_MS
|
|
882
|
-
});
|
|
883
|
-
if (parsed !== void 0) agent[key] = parsed;
|
|
884
|
-
}
|
|
885
|
-
if ("stallTimeoutMs" in value) {
|
|
886
|
-
const parsed = expectInteger(issues, `${path}.stallTimeoutMs`, value.stallTimeoutMs);
|
|
887
|
-
if (parsed !== void 0) agent.stallTimeoutMs = parsed;
|
|
888
|
-
}
|
|
889
|
-
if ("toolGovernance" in value) {
|
|
890
|
-
const parsed = expectEnum(
|
|
891
|
-
issues,
|
|
892
|
-
`${path}.toolGovernance`,
|
|
893
|
-
normalizeLegacyNamingValue(value.toolGovernance, "clio-policy", "clio-coder-policy"),
|
|
894
|
-
TOOL_GOVERNANCE
|
|
895
|
-
);
|
|
896
|
-
if (parsed !== void 0) agent.toolGovernance = parsed;
|
|
897
|
-
}
|
|
898
|
-
if ("projectContext" in value) {
|
|
899
|
-
const parsed = expectEnum(issues, `${path}.projectContext`, value.projectContext, ["none", "bounded"]);
|
|
900
|
-
if (parsed !== void 0) agent.projectContext = parsed;
|
|
901
|
-
}
|
|
902
|
-
for (const key of ["cwd"]) {
|
|
903
|
-
if (!(key in value)) continue;
|
|
904
|
-
const parsed = expectString(issues, `${path}.${key}`, value[key]);
|
|
905
|
-
if (parsed !== void 0) agent[key] = parsed;
|
|
906
|
-
}
|
|
907
|
-
for (const key of ["env", "labels"]) {
|
|
908
|
-
if (!(key in value)) continue;
|
|
909
|
-
const parsed = expectStringRecord(issues, `${path}.${key}`, value[key]);
|
|
910
|
-
if (parsed !== void 0 && Object.keys(parsed).length > 0) agent[key] = parsed;
|
|
911
|
-
}
|
|
912
|
-
return agent;
|
|
913
|
-
}
|
|
914
|
-
function validateFleetNode(issues, path, value, seen) {
|
|
915
|
-
if (!isPlainObject(value)) {
|
|
916
|
-
issues.add(path, `expected a map, got ${describe(value)}`);
|
|
917
|
-
return null;
|
|
918
|
-
}
|
|
919
|
-
issues.unknownKeys(path, value, [
|
|
920
|
-
"id",
|
|
921
|
-
"host",
|
|
922
|
-
"user",
|
|
923
|
-
"port",
|
|
924
|
-
"identityFile",
|
|
925
|
-
"clioCoderEntry",
|
|
926
|
-
"clioEntry",
|
|
927
|
-
"labels",
|
|
928
|
-
"maxWorkers",
|
|
929
|
-
"residency"
|
|
930
|
-
]);
|
|
931
|
-
const id = "id" in value ? expectString(issues, `${path}.id`, value.id) : void 0;
|
|
932
|
-
const host = "host" in value ? expectString(issues, `${path}.host`, value.host) : void 0;
|
|
933
|
-
if (!("id" in value)) issues.add(`${path}.id`, "required");
|
|
934
|
-
if (!("host" in value)) issues.add(`${path}.host`, "required");
|
|
935
|
-
if (id === void 0 || host === void 0) return null;
|
|
936
|
-
if (id === "local") {
|
|
937
|
-
issues.add(`${path}.id`, "'local' is reserved for the implicit local node");
|
|
938
|
-
return null;
|
|
939
|
-
}
|
|
940
|
-
if (seen.has(id)) {
|
|
941
|
-
issues.add(`${path}.id`, `duplicate fleet node id '${id}'`);
|
|
942
|
-
return null;
|
|
943
|
-
}
|
|
944
|
-
seen.add(id);
|
|
945
|
-
const node = { id, host, maxWorkers: 2 };
|
|
946
|
-
for (const key of ["user", "identityFile", "clioCoderEntry"]) {
|
|
947
|
-
if (!(key in value)) continue;
|
|
948
|
-
const parsed = expectString(issues, `${path}.${key}`, value[key]);
|
|
949
|
-
if (parsed !== void 0) node[key] = parsed;
|
|
950
|
-
}
|
|
951
|
-
if ("port" in value) {
|
|
952
|
-
const parsed = expectInteger(issues, `${path}.port`, value.port, { min: 1 });
|
|
953
|
-
if (parsed !== void 0) node.port = parsed;
|
|
954
|
-
}
|
|
955
|
-
if ("labels" in value) {
|
|
956
|
-
const parsed = expectStringArray(issues, `${path}.labels`, value.labels);
|
|
957
|
-
if (parsed !== void 0) node.labels = parsed;
|
|
958
|
-
}
|
|
959
|
-
if ("maxWorkers" in value) {
|
|
960
|
-
const parsed = expectInteger(issues, `${path}.maxWorkers`, value.maxWorkers, { min: 1 });
|
|
961
|
-
if (parsed !== void 0) node.maxWorkers = parsed;
|
|
962
|
-
}
|
|
963
|
-
if ("residency" in value) {
|
|
964
|
-
const parsed = expectEnum(issues, `${path}.residency`, value.residency, ["observe", "manage"]);
|
|
965
|
-
if (parsed !== void 0) node.residency = parsed;
|
|
966
|
-
}
|
|
967
|
-
return node;
|
|
968
|
-
}
|
|
969
|
-
function validateKeybindings(issues, path, value) {
|
|
970
|
-
if (!isPlainObject(value)) {
|
|
971
|
-
issues.add(path, `expected a map, got ${describe(value)}`);
|
|
972
|
-
return {};
|
|
973
|
-
}
|
|
974
|
-
const next = {};
|
|
975
|
-
for (const [rawKey, rawValue] of Object.entries(value)) {
|
|
976
|
-
const legacyId = rawKey.trim();
|
|
977
|
-
const id = legacyId.startsWith("clio.") ? `clio-coder.${legacyId.slice("clio.".length)}` : legacyId;
|
|
978
|
-
if (!id) {
|
|
979
|
-
issues.add(path, "empty keybinding id");
|
|
980
|
-
continue;
|
|
981
|
-
}
|
|
982
|
-
if (id !== legacyId) {
|
|
983
|
-
warnLegacyNaming(legacyId, id);
|
|
984
|
-
if (Object.hasOwn(value, id)) continue;
|
|
985
|
-
}
|
|
986
|
-
if (typeof rawValue === "string") {
|
|
987
|
-
const parsed = expectString(issues, `${path}.${legacyId}`, rawValue);
|
|
988
|
-
if (parsed !== void 0) next[id] = parsed;
|
|
989
|
-
} else if (Array.isArray(rawValue)) {
|
|
990
|
-
const parsed = expectStringArray(issues, `${path}.${legacyId}`, rawValue);
|
|
991
|
-
if (parsed !== void 0 && parsed.length > 0) next[id] = parsed;
|
|
992
|
-
} else issues.add(`${path}.${legacyId}`, `expected a string or list of strings, got ${describe(rawValue)}`);
|
|
993
|
-
}
|
|
994
|
-
return next;
|
|
995
|
-
}
|
|
996
|
-
var TOP_LEVEL_KEYS = [
|
|
997
|
-
"version",
|
|
998
|
-
"targets",
|
|
999
|
-
"chat",
|
|
1000
|
-
"fleet",
|
|
1001
|
-
"context",
|
|
1002
|
-
"safety",
|
|
1003
|
-
"interface",
|
|
1004
|
-
"integrations",
|
|
1005
|
-
...V1_ONLY_ROOTS
|
|
1006
|
-
];
|
|
1007
|
-
function validateSettings(raw) {
|
|
1008
|
-
const issues = new Issues();
|
|
1009
|
-
const settings = cloneValue(DEFAULT_SETTINGS);
|
|
1010
|
-
if (!isPlainObject(raw)) {
|
|
1011
|
-
issues.add("(root)", `expected a map, got ${describe(raw)}`);
|
|
1012
|
-
return { settings, issues: issues.list };
|
|
1013
|
-
}
|
|
1014
|
-
reportV1Tombstones(issues, raw);
|
|
1015
|
-
issues.unknownKeys("", raw, TOP_LEVEL_KEYS);
|
|
1016
|
-
if ("version" in raw && raw.version !== 2) {
|
|
1017
|
-
issues.add("version", `expected 2, got ${describe(raw.version)}; run \`clio-coder upgrade\` for version 1`);
|
|
1018
|
-
}
|
|
1019
|
-
if ("targets" in raw) {
|
|
1020
|
-
if (!Array.isArray(raw.targets)) issues.add("targets", `expected a list, got ${describe(raw.targets)}`);
|
|
1021
|
-
else {
|
|
1022
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1023
|
-
const targets = [];
|
|
1024
|
-
for (let index = 0; index < raw.targets.length; index += 1) {
|
|
1025
|
-
const target = validateTarget(issues, `targets[${index}]`, raw.targets[index]);
|
|
1026
|
-
if (!target) continue;
|
|
1027
|
-
if (seen.has(target.id)) {
|
|
1028
|
-
issues.add(`targets[${index}].id`, `duplicate target id '${target.id}'`);
|
|
1029
|
-
continue;
|
|
1030
|
-
}
|
|
1031
|
-
seen.add(target.id);
|
|
1032
|
-
targets.push(target);
|
|
1033
|
-
}
|
|
1034
|
-
settings.targets = targets;
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
if ("chat" in raw) {
|
|
1038
|
-
if (!isPlainObject(raw.chat)) issues.add("chat", `expected a map, got ${describe(raw.chat)}`);
|
|
1039
|
-
else {
|
|
1040
|
-
const chat = raw.chat;
|
|
1041
|
-
issues.unknownKeys("chat", chat, [
|
|
1042
|
-
"target",
|
|
1043
|
-
"model",
|
|
1044
|
-
"thinkingLevel",
|
|
1045
|
-
"modelPicker",
|
|
1046
|
-
"maxOutputTokens",
|
|
1047
|
-
"prewarm",
|
|
1048
|
-
"retry"
|
|
1049
|
-
]);
|
|
1050
|
-
const routeInput = {};
|
|
1051
|
-
for (const key of ["target", "model", "thinkingLevel"]) {
|
|
1052
|
-
if (key in chat) routeInput[key] = chat[key];
|
|
1053
|
-
}
|
|
1054
|
-
const route = validateRoute(
|
|
1055
|
-
issues,
|
|
1056
|
-
"chat",
|
|
1057
|
-
routeInput,
|
|
1058
|
-
{ target: settings.chat.target, model: settings.chat.model, thinkingLevel: settings.chat.thinkingLevel },
|
|
1059
|
-
settings.targets
|
|
1060
|
-
);
|
|
1061
|
-
settings.chat.target = route.target;
|
|
1062
|
-
settings.chat.model = route.model;
|
|
1063
|
-
settings.chat.thinkingLevel = route.thinkingLevel;
|
|
1064
|
-
if ("modelPicker" in chat) {
|
|
1065
|
-
if (!isPlainObject(chat.modelPicker))
|
|
1066
|
-
issues.add("chat.modelPicker", `expected a map, got ${describe(chat.modelPicker)}`);
|
|
1067
|
-
else {
|
|
1068
|
-
issues.unknownKeys("chat.modelPicker", chat.modelPicker, ["cycleSet", "favorites", "recentLimit"]);
|
|
1069
|
-
if ("cycleSet" in chat.modelPicker) {
|
|
1070
|
-
const parsed = expectStringArray(issues, "chat.modelPicker.cycleSet", chat.modelPicker.cycleSet);
|
|
1071
|
-
if (parsed !== void 0) settings.chat.modelPicker.cycleSet = normalizeCycleSet(parsed);
|
|
1072
|
-
}
|
|
1073
|
-
if ("favorites" in chat.modelPicker) {
|
|
1074
|
-
const parsed = expectStringArray(issues, "chat.modelPicker.favorites", chat.modelPicker.favorites);
|
|
1075
|
-
if (parsed !== void 0) settings.chat.modelPicker.favorites = normalizeModelRefs(parsed, settings.targets);
|
|
1076
|
-
}
|
|
1077
|
-
if ("recentLimit" in chat.modelPicker) {
|
|
1078
|
-
const parsed = expectInteger(issues, "chat.modelPicker.recentLimit", chat.modelPicker.recentLimit, { min: 1 });
|
|
1079
|
-
if (parsed !== void 0) settings.chat.modelPicker.recentLimit = parsed;
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
if ("maxOutputTokens" in chat) {
|
|
1084
|
-
const parsed = expectInteger(issues, "chat.maxOutputTokens", chat.maxOutputTokens, { min: 0 });
|
|
1085
|
-
if (parsed !== void 0) settings.chat.maxOutputTokens = parsed;
|
|
1086
|
-
}
|
|
1087
|
-
if ("prewarm" in chat) {
|
|
1088
|
-
const parsed = expectBoolean(issues, "chat.prewarm", chat.prewarm);
|
|
1089
|
-
if (parsed !== void 0) settings.chat.prewarm = parsed;
|
|
1090
|
-
}
|
|
1091
|
-
if ("retry" in chat) {
|
|
1092
|
-
if (!isPlainObject(chat.retry)) issues.add("chat.retry", `expected a map, got ${describe(chat.retry)}`);
|
|
1093
|
-
else {
|
|
1094
|
-
issues.unknownKeys("chat.retry", chat.retry, [
|
|
1095
|
-
"enabled",
|
|
1096
|
-
"maxRetries",
|
|
1097
|
-
"baseDelayMs",
|
|
1098
|
-
"maxDelayMs",
|
|
1099
|
-
"streamStallMs",
|
|
1100
|
-
"firstTokenStallMs"
|
|
1101
|
-
]);
|
|
1102
|
-
if ("enabled" in chat.retry) {
|
|
1103
|
-
const parsed = expectBoolean(issues, "chat.retry.enabled", chat.retry.enabled);
|
|
1104
|
-
if (parsed !== void 0) settings.chat.retry.enabled = parsed;
|
|
1105
|
-
}
|
|
1106
|
-
for (const key of ["maxRetries", "baseDelayMs", "maxDelayMs", "streamStallMs", "firstTokenStallMs"]) {
|
|
1107
|
-
if (!(key in chat.retry)) continue;
|
|
1108
|
-
const parsed = expectInteger(issues, `chat.retry.${key}`, chat.retry[key], { min: 0 });
|
|
1109
|
-
if (parsed !== void 0) settings.chat.retry[key] = parsed;
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
let rawFleet = null;
|
|
1116
|
-
if ("fleet" in raw) {
|
|
1117
|
-
if (!isPlainObject(raw.fleet)) issues.add("fleet", `expected a map, got ${describe(raw.fleet)}`);
|
|
1118
|
-
else {
|
|
1119
|
-
rawFleet = raw.fleet;
|
|
1120
|
-
issues.unknownKeys("fleet", rawFleet, [
|
|
1121
|
-
"default",
|
|
1122
|
-
"profiles",
|
|
1123
|
-
"rosters",
|
|
1124
|
-
"agentProfiles",
|
|
1125
|
-
"adaptiveRouting",
|
|
1126
|
-
"nodes",
|
|
1127
|
-
"permissions",
|
|
1128
|
-
"concurrency",
|
|
1129
|
-
"retry",
|
|
1130
|
-
"limits",
|
|
1131
|
-
"history"
|
|
1132
|
-
]);
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
if (rawFleet && "nodes" in rawFleet) {
|
|
1136
|
-
if (!Array.isArray(rawFleet.nodes)) issues.add("fleet.nodes", `expected a list, got ${describe(rawFleet.nodes)}`);
|
|
1137
|
-
else {
|
|
1138
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1139
|
-
settings.fleet.nodes = rawFleet.nodes.map((entry, index) => validateFleetNode(issues, `fleet.nodes[${index}]`, entry, seen)).filter((entry) => entry !== null);
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
const fleetNodeIds = new Set(settings.fleet.nodes.map((node) => node.id));
|
|
1143
|
-
if (rawFleet) {
|
|
1144
|
-
if ("default" in rawFleet) {
|
|
1145
|
-
settings.fleet.default = validateRoute(
|
|
1146
|
-
issues,
|
|
1147
|
-
"fleet.default",
|
|
1148
|
-
rawFleet.default,
|
|
1149
|
-
settings.fleet.default,
|
|
1150
|
-
settings.targets,
|
|
1151
|
-
{
|
|
1152
|
-
nodeIds: fleetNodeIds
|
|
1153
|
-
}
|
|
1154
|
-
);
|
|
1155
|
-
}
|
|
1156
|
-
if ("profiles" in rawFleet) {
|
|
1157
|
-
if (!isPlainObject(rawFleet.profiles))
|
|
1158
|
-
issues.add("fleet.profiles", `expected a map, got ${describe(rawFleet.profiles)}`);
|
|
1159
|
-
else {
|
|
1160
|
-
const profiles = {};
|
|
1161
|
-
for (const [rawName, rawProfile] of Object.entries(rawFleet.profiles)) {
|
|
1162
|
-
const name = rawName.trim();
|
|
1163
|
-
if (!name) {
|
|
1164
|
-
issues.add("fleet.profiles", "empty profile name");
|
|
1165
|
-
continue;
|
|
1166
|
-
}
|
|
1167
|
-
const profile = validateRoute(
|
|
1168
|
-
issues,
|
|
1169
|
-
`fleet.profiles.${name}`,
|
|
1170
|
-
rawProfile,
|
|
1171
|
-
DEFAULT_SETTINGS.fleet.default,
|
|
1172
|
-
settings.targets,
|
|
1173
|
-
{
|
|
1174
|
-
nodeIds: fleetNodeIds
|
|
1175
|
-
}
|
|
1176
|
-
);
|
|
1177
|
-
if (profile.target) profiles[name] = profile;
|
|
1178
|
-
}
|
|
1179
|
-
settings.fleet.profiles = profiles;
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
if ("rosters" in rawFleet) {
|
|
1183
|
-
if (!isPlainObject(rawFleet.rosters))
|
|
1184
|
-
issues.add("fleet.rosters", `expected a map, got ${describe(rawFleet.rosters)}`);
|
|
1185
|
-
else {
|
|
1186
|
-
const rosters = {};
|
|
1187
|
-
for (const [rawName, rawRoster] of Object.entries(rawFleet.rosters)) {
|
|
1188
|
-
const name = rawName.trim();
|
|
1189
|
-
const path = `fleet.rosters.${name}`;
|
|
1190
|
-
if (!name) {
|
|
1191
|
-
issues.add("fleet.rosters", "empty roster name");
|
|
1192
|
-
continue;
|
|
1193
|
-
}
|
|
1194
|
-
if (!isPlainObject(rawRoster)) {
|
|
1195
|
-
issues.add(path, `expected a map, got ${describe(rawRoster)}`);
|
|
1196
|
-
continue;
|
|
1197
|
-
}
|
|
1198
|
-
issues.unknownKeys(path, rawRoster, ["members"]);
|
|
1199
|
-
if (!Array.isArray(rawRoster.members)) {
|
|
1200
|
-
issues.add(`${path}.members`, "expected a list");
|
|
1201
|
-
continue;
|
|
1202
|
-
}
|
|
1203
|
-
if (rawRoster.members.length < 2 || rawRoster.members.length > 5)
|
|
1204
|
-
issues.add(`${path}.members`, "expected 2 to 5 members");
|
|
1205
|
-
const members = [];
|
|
1206
|
-
const labels = /* @__PURE__ */ new Set();
|
|
1207
|
-
for (const [index, rawMember] of rawRoster.members.entries()) {
|
|
1208
|
-
const memberPath = `${path}.members[${index}]`;
|
|
1209
|
-
if (!isPlainObject(rawMember)) {
|
|
1210
|
-
issues.add(memberPath, `expected a map, got ${describe(rawMember)}`);
|
|
1211
|
-
continue;
|
|
1212
|
-
}
|
|
1213
|
-
issues.unknownKeys(memberPath, rawMember, ["label", "target", "model", "thinkingLevel", "color"]);
|
|
1214
|
-
const label = expectString(issues, `${memberPath}.label`, rawMember.label);
|
|
1215
|
-
const target = expectString(issues, `${memberPath}.target`, rawMember.target);
|
|
1216
|
-
if (label !== void 0 && !COUNCIL_MEMBER_LABEL_PATTERN.test(label))
|
|
1217
|
-
issues.add(`${memberPath}.label`, "expected [a-z][a-z0-9_-]{0,31}");
|
|
1218
|
-
if (label !== void 0 && labels.has(label)) issues.add(`${memberPath}.label`, "duplicate label");
|
|
1219
|
-
if (label !== void 0) labels.add(label);
|
|
1220
|
-
if (target !== void 0 && !settings.targets.some((entry) => entry.id === target))
|
|
1221
|
-
issues.add(`${memberPath}.target`, `unknown target '${target}'`);
|
|
1222
|
-
const model = rawMember.model === void 0 ? void 0 : expectString(issues, `${memberPath}.model`, rawMember.model);
|
|
1223
|
-
const thinkingLevel = rawMember.thinkingLevel === void 0 ? void 0 : expectEnum(issues, `${memberPath}.thinkingLevel`, rawMember.thinkingLevel, THINKING_LEVELS);
|
|
1224
|
-
const color = rawMember.color === void 0 ? void 0 : expectString(issues, `${memberPath}.color`, rawMember.color);
|
|
1225
|
-
if (color !== void 0 && !THEME_NAMED_COLORS.includes(color) && !/^#[0-9a-fA-F]{6}$/u.test(color)) {
|
|
1226
|
-
issues.add(`${memberPath}.color`, "expected a theme named color or 6-digit hex color");
|
|
1227
|
-
}
|
|
1228
|
-
if (label === void 0 || target === void 0) continue;
|
|
1229
|
-
members.push({
|
|
1230
|
-
label,
|
|
1231
|
-
target,
|
|
1232
|
-
...model ? { model } : {},
|
|
1233
|
-
...thinkingLevel ? { thinkingLevel } : {},
|
|
1234
|
-
...color ? { color } : {}
|
|
1235
|
-
});
|
|
1236
|
-
}
|
|
1237
|
-
if (rawRoster.members.length >= 2 && rawRoster.members.length <= 5 && members.length === rawRoster.members.length)
|
|
1238
|
-
rosters[name] = { members };
|
|
1239
|
-
}
|
|
1240
|
-
settings.fleet.rosters = rosters;
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
if ("agentProfiles" in rawFleet) {
|
|
1244
|
-
if (!isPlainObject(rawFleet.agentProfiles))
|
|
1245
|
-
issues.add("fleet.agentProfiles", `expected a map, got ${describe(rawFleet.agentProfiles)}`);
|
|
1246
|
-
else {
|
|
1247
|
-
const bindings = {};
|
|
1248
|
-
for (const [rawAgentId, rawProfileName] of Object.entries(rawFleet.agentProfiles)) {
|
|
1249
|
-
const agentId = rawAgentId.trim();
|
|
1250
|
-
if (!agentId) {
|
|
1251
|
-
issues.add("fleet.agentProfiles", "empty agent id");
|
|
1252
|
-
continue;
|
|
1253
|
-
}
|
|
1254
|
-
if (agentId === "auto") {
|
|
1255
|
-
issues.add("fleet.agentProfiles", "'auto' is reserved for coordinator-owned agent selection");
|
|
1256
|
-
continue;
|
|
1257
|
-
}
|
|
1258
|
-
const profile = expectString(issues, `fleet.agentProfiles.${agentId}`, rawProfileName);
|
|
1259
|
-
if (profile !== void 0) bindings[agentId] = profile;
|
|
1260
|
-
}
|
|
1261
|
-
settings.fleet.agentProfiles = bindings;
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
if ("adaptiveRouting" in rawFleet) {
|
|
1265
|
-
if (!isPlainObject(rawFleet.adaptiveRouting))
|
|
1266
|
-
issues.add("fleet.adaptiveRouting", `expected a map, got ${describe(rawFleet.adaptiveRouting)}`);
|
|
1267
|
-
else {
|
|
1268
|
-
const adaptive = rawFleet.adaptiveRouting;
|
|
1269
|
-
issues.unknownKeys("fleet.adaptiveRouting", adaptive, ["roles", "postures", "agentRoles"]);
|
|
1270
|
-
for (const [key, allowed] of [
|
|
1271
|
-
["roles", ACTIVE_ROUTING_ROLES],
|
|
1272
|
-
["postures", ACTIVE_ROUTING_POSTURES]
|
|
1273
|
-
]) {
|
|
1274
|
-
if (!(key in adaptive)) continue;
|
|
1275
|
-
const parsed = expectStringArray(issues, `fleet.adaptiveRouting.${key}`, adaptive[key]);
|
|
1276
|
-
if (parsed === void 0) continue;
|
|
1277
|
-
const allowedSet = new Set(allowed);
|
|
1278
|
-
for (const value of parsed)
|
|
1279
|
-
if (!allowedSet.has(value))
|
|
1280
|
-
issues.add(`fleet.adaptiveRouting.${key}`, `unsupported ${key === "roles" ? "role" : "posture"} '${value}'`);
|
|
1281
|
-
if (parsed.every((value) => allowedSet.has(value))) settings.fleet.adaptiveRouting[key] = parsed;
|
|
1282
|
-
}
|
|
1283
|
-
if ("agentRoles" in adaptive) {
|
|
1284
|
-
if (!Array.isArray(adaptive.agentRoles)) issues.add("fleet.adaptiveRouting.agentRoles", "expected a list");
|
|
1285
|
-
else {
|
|
1286
|
-
const pairs = [];
|
|
1287
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1288
|
-
for (const [index, value] of adaptive.agentRoles.entries()) {
|
|
1289
|
-
const path = `fleet.adaptiveRouting.agentRoles[${index}]`;
|
|
1290
|
-
if (!isPlainObject(value)) {
|
|
1291
|
-
issues.add(path, "expected a map");
|
|
1292
|
-
continue;
|
|
1293
|
-
}
|
|
1294
|
-
issues.unknownKeys(path, value, ["agentId", "executionRole"]);
|
|
1295
|
-
const agentId = expectString(issues, `${path}.agentId`, value.agentId);
|
|
1296
|
-
const executionRole = expectEnum(
|
|
1297
|
-
issues,
|
|
1298
|
-
`${path}.executionRole`,
|
|
1299
|
-
value.executionRole,
|
|
1300
|
-
ACTIVE_AGENT_AUTOMATION_ROLES
|
|
1301
|
-
);
|
|
1302
|
-
if (agentId === "auto")
|
|
1303
|
-
issues.add(`${path}.agentId`, "'auto' is reserved for coordinator-owned agent selection");
|
|
1304
|
-
if (agentId === void 0 || agentId === "auto" || executionRole === void 0) continue;
|
|
1305
|
-
const pairKey = `${agentId}\0${executionRole}`;
|
|
1306
|
-
if (seen.has(pairKey)) {
|
|
1307
|
-
issues.add(path, "duplicate agent and execution-role pair");
|
|
1308
|
-
continue;
|
|
1309
|
-
}
|
|
1310
|
-
seen.add(pairKey);
|
|
1311
|
-
pairs.push({ agentId, executionRole });
|
|
1312
|
-
}
|
|
1313
|
-
if (pairs.length === adaptive.agentRoles.length) settings.fleet.adaptiveRouting.agentRoles = pairs;
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
if ("permissions" in rawFleet) {
|
|
1319
|
-
if (!isPlainObject(rawFleet.permissions))
|
|
1320
|
-
issues.add("fleet.permissions", `expected a map, got ${describe(rawFleet.permissions)}`);
|
|
1321
|
-
else {
|
|
1322
|
-
issues.unknownKeys("fleet.permissions", rawFleet.permissions, ["mode", "escalation"]);
|
|
1323
|
-
if ("mode" in rawFleet.permissions) {
|
|
1324
|
-
const parsed = expectEnum(issues, "fleet.permissions.mode", rawFleet.permissions.mode, [
|
|
1325
|
-
"deny",
|
|
1326
|
-
"fail",
|
|
1327
|
-
"escalate"
|
|
1328
|
-
]);
|
|
1329
|
-
if (parsed !== void 0) settings.fleet.permissions.mode = parsed;
|
|
1330
|
-
}
|
|
1331
|
-
if ("escalation" in rawFleet.permissions) {
|
|
1332
|
-
if (!isPlainObject(rawFleet.permissions.escalation))
|
|
1333
|
-
issues.add("fleet.permissions.escalation", `expected a map, got ${describe(rawFleet.permissions.escalation)}`);
|
|
1334
|
-
else {
|
|
1335
|
-
const escalation = rawFleet.permissions.escalation;
|
|
1336
|
-
issues.unknownKeys("fleet.permissions.escalation", escalation, ["timeoutMs", "fallback"]);
|
|
1337
|
-
if ("timeoutMs" in escalation) {
|
|
1338
|
-
const parsed = expectInteger(issues, "fleet.permissions.escalation.timeoutMs", escalation.timeoutMs, { min: 1 });
|
|
1339
|
-
if (parsed !== void 0) settings.fleet.permissions.escalation.timeoutMs = parsed;
|
|
1340
|
-
}
|
|
1341
|
-
if ("fallback" in escalation) {
|
|
1342
|
-
const parsed = expectEnum(issues, "fleet.permissions.escalation.fallback", escalation.fallback, [
|
|
1343
|
-
"deny",
|
|
1344
|
-
"fail"
|
|
1345
|
-
]);
|
|
1346
|
-
if (parsed !== void 0) settings.fleet.permissions.escalation.fallback = parsed;
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
if ("concurrency" in rawFleet) {
|
|
1353
|
-
if (rawFleet.concurrency === "auto") settings.fleet.concurrency = "auto";
|
|
1354
|
-
else {
|
|
1355
|
-
const parsed = expectInteger(issues, "fleet.concurrency", rawFleet.concurrency, { min: 1 });
|
|
1356
|
-
if (parsed !== void 0) settings.fleet.concurrency = parsed;
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
for (const [blockName, fields] of [
|
|
1360
|
-
[
|
|
1361
|
-
"retry",
|
|
1362
|
-
[
|
|
1363
|
-
["maxRetries", 0],
|
|
1364
|
-
["routeCooldownMs", 0]
|
|
1365
|
-
]
|
|
1366
|
-
],
|
|
1367
|
-
[
|
|
1368
|
-
"limits",
|
|
1369
|
-
[
|
|
1370
|
-
["toolCallsPerRun", 1],
|
|
1371
|
-
["internalRunTimeoutMs", 1]
|
|
1372
|
-
]
|
|
1373
|
-
],
|
|
1374
|
-
["history", [["maxRuns", 1]]]
|
|
1375
|
-
]) {
|
|
1376
|
-
if (!(blockName in rawFleet)) continue;
|
|
1377
|
-
const block = rawFleet[blockName];
|
|
1378
|
-
if (!isPlainObject(block)) {
|
|
1379
|
-
issues.add(`fleet.${blockName}`, `expected a map, got ${describe(block)}`);
|
|
1380
|
-
continue;
|
|
1381
|
-
}
|
|
1382
|
-
const known = fields.map(([key]) => key);
|
|
1383
|
-
if (blockName === "history") known.push("journal");
|
|
1384
|
-
issues.unknownKeys(`fleet.${blockName}`, block, known);
|
|
1385
|
-
for (const [key, min] of fields) {
|
|
1386
|
-
if (!(key in block)) continue;
|
|
1387
|
-
const parsed = expectInteger(issues, `fleet.${blockName}.${key}`, block[key], { min });
|
|
1388
|
-
if (parsed !== void 0) settings.fleet[blockName][key] = parsed;
|
|
1389
|
-
}
|
|
1390
|
-
if (blockName === "history" && "journal" in block) {
|
|
1391
|
-
const parsed = expectBoolean(issues, "fleet.history.journal", block.journal);
|
|
1392
|
-
if (parsed !== void 0) settings.fleet.history.journal = parsed;
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
if ("context" in raw) {
|
|
1397
|
-
if (!isPlainObject(raw.context)) issues.add("context", `expected a map, got ${describe(raw.context)}`);
|
|
1398
|
-
else {
|
|
1399
|
-
const context = raw.context;
|
|
1400
|
-
issues.unknownKeys("context", context, ["toolResultMaxBytes", "workingSet", "compaction", "memory"]);
|
|
1401
|
-
if ("toolResultMaxBytes" in context) {
|
|
1402
|
-
const parsed = expectInteger(issues, "context.toolResultMaxBytes", context.toolResultMaxBytes, { min: 4096 });
|
|
1403
|
-
if (parsed !== void 0) settings.context.toolResultMaxBytes = parsed;
|
|
1404
|
-
}
|
|
1405
|
-
if ("workingSet" in context) {
|
|
1406
|
-
if (!isPlainObject(context.workingSet))
|
|
1407
|
-
issues.add("context.workingSet", `expected a map, got ${describe(context.workingSet)}`);
|
|
1408
|
-
else {
|
|
1409
|
-
const workingSet = context.workingSet;
|
|
1410
|
-
issues.unknownKeys("context.workingSet", workingSet, [
|
|
1411
|
-
"enabled",
|
|
1412
|
-
"policy",
|
|
1413
|
-
"target",
|
|
1414
|
-
"protectLastTurns",
|
|
1415
|
-
"minEvictableTokens"
|
|
1416
|
-
]);
|
|
1417
|
-
if ("enabled" in workingSet) {
|
|
1418
|
-
const parsed = expectBoolean(issues, "context.workingSet.enabled", workingSet.enabled);
|
|
1419
|
-
if (parsed !== void 0) settings.context.workingSet.enabled = parsed;
|
|
1420
|
-
}
|
|
1421
|
-
if ("policy" in workingSet) {
|
|
1422
|
-
const parsed = expectEnum(issues, "context.workingSet.policy", workingSet.policy, [
|
|
1423
|
-
"age-horizon",
|
|
1424
|
-
"structural-v1"
|
|
1425
|
-
]);
|
|
1426
|
-
if (parsed !== void 0) settings.context.workingSet.policy = parsed;
|
|
1427
|
-
}
|
|
1428
|
-
if ("target" in workingSet) {
|
|
1429
|
-
const parsed = expectNumber(issues, "context.workingSet.target", workingSet.target);
|
|
1430
|
-
if (parsed !== void 0 && (parsed <= 0 || parsed >= 1))
|
|
1431
|
-
issues.add("context.workingSet.target", `expected a number > 0 and < 1, got ${parsed}`);
|
|
1432
|
-
else if (parsed !== void 0) settings.context.workingSet.target = parsed;
|
|
1433
|
-
}
|
|
1434
|
-
for (const [key, min] of [
|
|
1435
|
-
["protectLastTurns", 1],
|
|
1436
|
-
["minEvictableTokens", 0]
|
|
1437
|
-
]) {
|
|
1438
|
-
if (!(key in workingSet)) continue;
|
|
1439
|
-
const parsed = expectInteger(issues, `context.workingSet.${key}`, workingSet[key], { min });
|
|
1440
|
-
if (parsed !== void 0) settings.context.workingSet[key] = parsed;
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
|
-
if ("compaction" in context) {
|
|
1445
|
-
if (!isPlainObject(context.compaction))
|
|
1446
|
-
issues.add("context.compaction", `expected a map, got ${describe(context.compaction)}`);
|
|
1447
|
-
else {
|
|
1448
|
-
const compaction = context.compaction;
|
|
1449
|
-
issues.unknownKeys("context.compaction", compaction, [
|
|
1450
|
-
"auto",
|
|
1451
|
-
"threshold",
|
|
1452
|
-
"model",
|
|
1453
|
-
"systemPrompt",
|
|
1454
|
-
"excludeLastTurns"
|
|
1455
|
-
]);
|
|
1456
|
-
if ("excludeLastTurns" in compaction)
|
|
1457
|
-
issues.add(
|
|
1458
|
-
"context.compaction.excludeLastTurns",
|
|
1459
|
-
"retired without replacement; use context.workingSet.protectLastTurns"
|
|
1460
|
-
);
|
|
1461
|
-
if ("auto" in compaction) {
|
|
1462
|
-
const parsed = expectBoolean(issues, "context.compaction.auto", compaction.auto);
|
|
1463
|
-
if (parsed !== void 0) settings.context.compaction.auto = parsed;
|
|
1464
|
-
}
|
|
1465
|
-
if ("threshold" in compaction) {
|
|
1466
|
-
const parsed = expectNumber(issues, "context.compaction.threshold", compaction.threshold, { min: 0, max: 1 });
|
|
1467
|
-
if (parsed !== void 0) settings.context.compaction.threshold = parsed;
|
|
1468
|
-
}
|
|
1469
|
-
for (const key of ["model", "systemPrompt"]) {
|
|
1470
|
-
if (!(key in compaction)) continue;
|
|
1471
|
-
const parsed = expectString(issues, `context.compaction.${key}`, compaction[key]);
|
|
1472
|
-
if (parsed !== void 0) settings.context.compaction[key] = parsed;
|
|
1473
|
-
}
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
if ("memory" in context) {
|
|
1477
|
-
if (!isPlainObject(context.memory)) issues.add("context.memory", `expected a map, got ${describe(context.memory)}`);
|
|
1478
|
-
else {
|
|
1479
|
-
const memory = context.memory;
|
|
1480
|
-
issues.unknownKeys("context.memory", memory, [
|
|
1481
|
-
"enabled",
|
|
1482
|
-
"target",
|
|
1483
|
-
"model",
|
|
1484
|
-
"cadenceToolCalls",
|
|
1485
|
-
"trajectorySteps",
|
|
1486
|
-
"maxOutputTokens",
|
|
1487
|
-
"timeoutMs"
|
|
1488
|
-
]);
|
|
1489
|
-
if ("enabled" in memory) {
|
|
1490
|
-
const parsed = expectBoolean(issues, "context.memory.enabled", memory.enabled);
|
|
1491
|
-
if (parsed !== void 0) settings.context.memory.enabled = parsed;
|
|
1492
|
-
}
|
|
1493
|
-
if ("target" in memory) {
|
|
1494
|
-
if (memory.target === null) settings.context.memory.target = null;
|
|
1495
|
-
else {
|
|
1496
|
-
const parsed = expectString(issues, "context.memory.target", memory.target);
|
|
1497
|
-
if (parsed !== void 0)
|
|
1498
|
-
settings.context.memory.target = settings.targets.some((target) => target.id === parsed) ? parsed : null;
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
if ("model" in memory) {
|
|
1502
|
-
if (memory.model === null) settings.context.memory.model = null;
|
|
1503
|
-
else {
|
|
1504
|
-
const parsed = expectString(issues, "context.memory.model", memory.model);
|
|
1505
|
-
if (parsed !== void 0) settings.context.memory.model = parsed;
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
if (!settings.context.memory.target) settings.context.memory.model = null;
|
|
1509
|
-
else if (settings.context.memory.model === null)
|
|
1510
|
-
settings.context.memory.model = settings.targets.find((target) => target.id === settings.context.memory.target)?.defaultModel ?? null;
|
|
1511
|
-
for (const [key, min] of [
|
|
1512
|
-
["cadenceToolCalls", 2],
|
|
1513
|
-
["trajectorySteps", 1],
|
|
1514
|
-
["maxOutputTokens", 1],
|
|
1515
|
-
["timeoutMs", 1]
|
|
1516
|
-
]) {
|
|
1517
|
-
if (!(key in memory)) continue;
|
|
1518
|
-
const parsed = expectInteger(issues, `context.memory.${key}`, memory[key], { min });
|
|
1519
|
-
if (parsed !== void 0) settings.context.memory[key] = parsed;
|
|
1520
|
-
}
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
}
|
|
1525
|
-
if ("safety" in raw) {
|
|
1526
|
-
if (!isPlainObject(raw.safety)) issues.add("safety", `expected a map, got ${describe(raw.safety)}`);
|
|
1527
|
-
else {
|
|
1528
|
-
const safety = raw.safety;
|
|
1529
|
-
issues.unknownKeys("safety", safety, ["autonomy", "limits", "review"]);
|
|
1530
|
-
if ("autonomy" in safety) {
|
|
1531
|
-
const parsed = expectEnum(issues, "safety.autonomy", safety.autonomy, AUTONOMY_LEVELS);
|
|
1532
|
-
if (parsed !== void 0) settings.safety.autonomy = parsed;
|
|
1533
|
-
}
|
|
1534
|
-
if ("limits" in safety) {
|
|
1535
|
-
if (!isPlainObject(safety.limits)) issues.add("safety.limits", `expected a map, got ${describe(safety.limits)}`);
|
|
1536
|
-
else {
|
|
1537
|
-
const limits = safety.limits;
|
|
1538
|
-
issues.unknownKeys("safety.limits", limits, [
|
|
1539
|
-
"sessionCostUsd",
|
|
1540
|
-
"chatToolCallsPerTurn",
|
|
1541
|
-
"readBytesPerCall",
|
|
1542
|
-
"observationBytesPerTurn"
|
|
1543
|
-
]);
|
|
1544
|
-
if ("sessionCostUsd" in limits) {
|
|
1545
|
-
const parsed = expectNumber(issues, "safety.limits.sessionCostUsd", limits.sessionCostUsd, { min: 0 });
|
|
1546
|
-
if (parsed !== void 0) settings.safety.limits.sessionCostUsd = parsed;
|
|
1547
|
-
}
|
|
1548
|
-
for (const key of ["chatToolCallsPerTurn", "readBytesPerCall", "observationBytesPerTurn"]) {
|
|
1549
|
-
if (!(key in limits)) continue;
|
|
1550
|
-
const parsed = expectInteger(issues, `safety.limits.${key}`, limits[key], { min: 1 });
|
|
1551
|
-
if (parsed !== void 0) settings.safety.limits[key] = parsed;
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
if ("review" in safety) {
|
|
1556
|
-
if (!isPlainObject(safety.review)) issues.add("safety.review", `expected a map, got ${describe(safety.review)}`);
|
|
1557
|
-
else {
|
|
1558
|
-
const review = safety.review;
|
|
1559
|
-
issues.unknownKeys("safety.review", review, ["enabled", "target", "cadenceToolCalls"]);
|
|
1560
|
-
if ("enabled" in review) {
|
|
1561
|
-
const parsed = expectBoolean(issues, "safety.review.enabled", review.enabled);
|
|
1562
|
-
if (parsed !== void 0) settings.safety.review.enabled = parsed;
|
|
1563
|
-
}
|
|
1564
|
-
if ("target" in review && review.target !== null) {
|
|
1565
|
-
const parsed = expectString(issues, "safety.review.target", review.target);
|
|
1566
|
-
if (parsed !== void 0 && settings.targets.some((target) => target.id === parsed))
|
|
1567
|
-
settings.safety.review.target = parsed;
|
|
1568
|
-
else if (parsed !== void 0) issues.add("safety.review.target", `unknown target '${parsed}'`);
|
|
1569
|
-
}
|
|
1570
|
-
if ("cadenceToolCalls" in review && review.cadenceToolCalls !== null) {
|
|
1571
|
-
const parsed = expectInteger(issues, "safety.review.cadenceToolCalls", review.cadenceToolCalls, { min: 1 });
|
|
1572
|
-
if (parsed !== void 0) settings.safety.review.cadenceToolCalls = parsed;
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
if ("interface" in raw) {
|
|
1579
|
-
if (!isPlainObject(raw.interface)) issues.add("interface", `expected a map, got ${describe(raw.interface)}`);
|
|
1580
|
-
else {
|
|
1581
|
-
const ui = raw.interface;
|
|
1582
|
-
issues.unknownKeys("interface", ui, [
|
|
1583
|
-
"outputDetail",
|
|
1584
|
-
"smoothStreaming",
|
|
1585
|
-
"mode",
|
|
1586
|
-
"fullscreenScrollbar",
|
|
1587
|
-
"terminalProgress",
|
|
1588
|
-
"desktopNotifications",
|
|
1589
|
-
"panes",
|
|
1590
|
-
"keybindings"
|
|
1591
|
-
]);
|
|
1592
|
-
for (const key of ["terminalProgress", "desktopNotifications"]) {
|
|
1593
|
-
if (!(key in ui)) continue;
|
|
1594
|
-
const parsed = expectBoolean(issues, `interface.${key}`, ui[key]);
|
|
1595
|
-
if (parsed !== void 0) settings.interface[key] = parsed;
|
|
1596
|
-
}
|
|
1597
|
-
if ("outputDetail" in ui) {
|
|
1598
|
-
const style = normalizeOutputStyle(ui.outputDetail);
|
|
1599
|
-
if (style) settings.interface.outputDetail = style;
|
|
1600
|
-
else issues.add("interface.outputDetail", "expected compact, standard, or detailed");
|
|
1601
|
-
}
|
|
1602
|
-
for (const [key, allowed] of [
|
|
1603
|
-
["smoothStreaming", ["off", "auto", "on"]],
|
|
1604
|
-
["mode", ["regular", "fullscreen"]],
|
|
1605
|
-
["fullscreenScrollbar", ["hidden", "auto", "always"]]
|
|
1606
|
-
]) {
|
|
1607
|
-
if (!(key in ui)) continue;
|
|
1608
|
-
const parsed = expectEnum(issues, `interface.${key}`, ui[key], allowed);
|
|
1609
|
-
if (parsed !== void 0) settings.interface[key] = parsed;
|
|
1610
|
-
}
|
|
1611
|
-
if ("panes" in ui) {
|
|
1612
|
-
if (!isPlainObject(ui.panes)) issues.add("interface.panes", `expected a map, got ${describe(ui.panes)}`);
|
|
1613
|
-
else {
|
|
1614
|
-
const panes = ui.panes;
|
|
1615
|
-
issues.unknownKeys("interface.panes", panes, ["enabled", "notifications", "layout", "workers", "files"]);
|
|
1616
|
-
if ("enabled" in panes) {
|
|
1617
|
-
const parsed = expectEnum(issues, "interface.panes.enabled", panes.enabled, ["auto", "embedded", "off"]);
|
|
1618
|
-
if (parsed !== void 0) settings.interface.panes.enabled = parsed;
|
|
1619
|
-
}
|
|
1620
|
-
if ("notifications" in panes) {
|
|
1621
|
-
const parsed = expectEnum(issues, "interface.panes.notifications", panes.notifications, [
|
|
1622
|
-
"failures",
|
|
1623
|
-
"all",
|
|
1624
|
-
"off"
|
|
1625
|
-
]);
|
|
1626
|
-
if (parsed !== void 0) settings.interface.panes.notifications = parsed;
|
|
1627
|
-
}
|
|
1628
|
-
if ("layout" in panes) {
|
|
1629
|
-
const parsed = expectEnum(issues, "interface.panes.layout", panes.layout, ["off", "workers", "cockpit"]);
|
|
1630
|
-
if (parsed !== void 0) settings.interface.panes.layout = parsed;
|
|
1631
|
-
}
|
|
1632
|
-
if ("workers" in panes) {
|
|
1633
|
-
if (!isPlainObject(panes.workers))
|
|
1634
|
-
issues.add("interface.panes.workers", `expected a map, got ${describe(panes.workers)}`);
|
|
1635
|
-
else {
|
|
1636
|
-
const workers = panes.workers;
|
|
1637
|
-
issues.unknownKeys("interface.panes.workers", workers, ["ratio"]);
|
|
1638
|
-
if ("ratio" in workers) {
|
|
1639
|
-
const parsed = expectNumber(issues, "interface.panes.workers.ratio", workers.ratio, {
|
|
1640
|
-
min: 0.05,
|
|
1641
|
-
max: 0.5
|
|
1642
|
-
});
|
|
1643
|
-
if (parsed !== void 0) settings.interface.panes.workers.ratio = parsed;
|
|
1644
|
-
}
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
if ("files" in panes) {
|
|
1648
|
-
if (!isPlainObject(panes.files))
|
|
1649
|
-
issues.add("interface.panes.files", `expected a map, got ${describe(panes.files)}`);
|
|
1650
|
-
else {
|
|
1651
|
-
const files = panes.files;
|
|
1652
|
-
issues.unknownKeys("interface.panes.files", files, ["enabled", "mode", "profile", "followCwd", "ratio"]);
|
|
1653
|
-
for (const key of ["enabled", "followCwd"]) {
|
|
1654
|
-
if (!(key in files)) continue;
|
|
1655
|
-
const parsed = expectBoolean(issues, `interface.panes.files.${key}`, files[key]);
|
|
1656
|
-
if (parsed !== void 0) settings.interface.panes.files[key] = parsed;
|
|
1657
|
-
}
|
|
1658
|
-
if ("mode" in files) {
|
|
1659
|
-
const parsed = expectEnum(issues, "interface.panes.files.mode", files.mode, ["companion", "chooser"]);
|
|
1660
|
-
if (parsed !== void 0) settings.interface.panes.files.mode = parsed;
|
|
1661
|
-
}
|
|
1662
|
-
if ("profile" in files) {
|
|
1663
|
-
const parsed = expectEnum(issues, "interface.panes.files.profile", files.profile, ["managed", "user"]);
|
|
1664
|
-
if (parsed !== void 0) settings.interface.panes.files.profile = parsed;
|
|
1665
|
-
}
|
|
1666
|
-
if ("ratio" in files) {
|
|
1667
|
-
const parsed = expectNumber(issues, "interface.panes.files.ratio", files.ratio, { min: 0.05, max: 0.5 });
|
|
1668
|
-
if (parsed !== void 0) settings.interface.panes.files.ratio = parsed;
|
|
1669
|
-
}
|
|
1670
|
-
}
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
if ("keybindings" in ui)
|
|
1675
|
-
settings.interface.keybindings = validateKeybindings(issues, "interface.keybindings", ui.keybindings);
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
if ("integrations" in raw) {
|
|
1679
|
-
if (!isPlainObject(raw.integrations)) issues.add("integrations", `expected a map, got ${describe(raw.integrations)}`);
|
|
1680
|
-
else {
|
|
1681
|
-
const integrations = raw.integrations;
|
|
1682
|
-
issues.unknownKeys("integrations", integrations, [
|
|
1683
|
-
"projectResources",
|
|
1684
|
-
"externalAgents",
|
|
1685
|
-
"runtimePlugins",
|
|
1686
|
-
"library",
|
|
1687
|
-
"git"
|
|
1688
|
-
]);
|
|
1689
|
-
if ("projectResources" in integrations) {
|
|
1690
|
-
if (!isPlainObject(integrations.projectResources))
|
|
1691
|
-
issues.add("integrations.projectResources", `expected a map, got ${describe(integrations.projectResources)}`);
|
|
1692
|
-
else {
|
|
1693
|
-
issues.unknownKeys("integrations.projectResources", integrations.projectResources, ["trustProjectImports"]);
|
|
1694
|
-
if ("trustProjectImports" in integrations.projectResources) {
|
|
1695
|
-
const parsed = expectBoolean(
|
|
1696
|
-
issues,
|
|
1697
|
-
"integrations.projectResources.trustProjectImports",
|
|
1698
|
-
integrations.projectResources.trustProjectImports
|
|
1699
|
-
);
|
|
1700
|
-
if (parsed !== void 0) settings.integrations.projectResources.trustProjectImports = parsed;
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
}
|
|
1704
|
-
if ("runtimePlugins" in integrations) {
|
|
1705
|
-
const parsed = expectStringArray(issues, "integrations.runtimePlugins", integrations.runtimePlugins);
|
|
1706
|
-
if (parsed !== void 0) settings.integrations.runtimePlugins = parsed;
|
|
1707
|
-
}
|
|
1708
|
-
if ("library" in integrations) {
|
|
1709
|
-
if (!isPlainObject(integrations.library))
|
|
1710
|
-
issues.add("integrations.library", `expected a map, got ${describe(integrations.library)}`);
|
|
1711
|
-
else {
|
|
1712
|
-
const library = integrations.library;
|
|
1713
|
-
issues.unknownKeys("integrations.library", library, ["catalog", "remote", "confirmedRemote", "sync"]);
|
|
1714
|
-
for (const key of ["catalog", "remote", "confirmedRemote"]) {
|
|
1715
|
-
if (!(key in library)) continue;
|
|
1716
|
-
const value = library[key];
|
|
1717
|
-
if (value !== null && typeof value !== "string")
|
|
1718
|
-
issues.add(`integrations.library.${key}`, `expected a string or null, got ${describe(value)}`);
|
|
1719
|
-
else settings.integrations.library[key] = value;
|
|
1720
|
-
}
|
|
1721
|
-
if ("sync" in library) {
|
|
1722
|
-
const parsed = expectBoolean(issues, "integrations.library.sync", library.sync);
|
|
1723
|
-
if (parsed !== void 0) settings.integrations.library.sync = parsed;
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
if ("git" in integrations) {
|
|
1728
|
-
if (!isPlainObject(integrations.git))
|
|
1729
|
-
issues.add("integrations.git", `expected a map, got ${describe(integrations.git)}`);
|
|
1730
|
-
else {
|
|
1731
|
-
issues.unknownKeys("integrations.git", integrations.git, ["commitAttribution"]);
|
|
1732
|
-
if ("commitAttribution" in integrations.git) {
|
|
1733
|
-
const parsed = expectBoolean(issues, "integrations.git.commitAttribution", integrations.git.commitAttribution);
|
|
1734
|
-
if (parsed !== void 0) settings.integrations.git.commitAttribution = parsed;
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
}
|
|
1738
|
-
if ("externalAgents" in integrations) {
|
|
1739
|
-
if (!isPlainObject(integrations.externalAgents))
|
|
1740
|
-
issues.add("integrations.externalAgents", `expected a map, got ${describe(integrations.externalAgents)}`);
|
|
1741
|
-
else {
|
|
1742
|
-
const external = integrations.externalAgents;
|
|
1743
|
-
issues.unknownKeys("integrations.externalAgents", external, ["entries", "defaults"]);
|
|
1744
|
-
if ("defaults" in external) {
|
|
1745
|
-
if (!isPlainObject(external.defaults))
|
|
1746
|
-
issues.add("integrations.externalAgents.defaults", `expected a map, got ${describe(external.defaults)}`);
|
|
1747
|
-
else {
|
|
1748
|
-
const defaults = external.defaults;
|
|
1749
|
-
issues.unknownKeys("integrations.externalAgents.defaults", defaults, [
|
|
1750
|
-
"connectTimeoutMs",
|
|
1751
|
-
"turnTimeoutMs",
|
|
1752
|
-
"permissionTimeoutMs",
|
|
1753
|
-
"toolGovernance"
|
|
1754
|
-
]);
|
|
1755
|
-
for (const key of ["connectTimeoutMs", "turnTimeoutMs", "permissionTimeoutMs"]) {
|
|
1756
|
-
if (!(key in defaults)) continue;
|
|
1757
|
-
const parsed = expectInteger(issues, `integrations.externalAgents.defaults.${key}`, defaults[key], {
|
|
1758
|
-
min: key === "turnTimeoutMs" ? 0 : 1,
|
|
1759
|
-
max: MAX_TIMER_DELAY_MS
|
|
1760
|
-
});
|
|
1761
|
-
if (parsed !== void 0) settings.integrations.externalAgents.defaults[key] = parsed;
|
|
1762
|
-
}
|
|
1763
|
-
if ("toolGovernance" in defaults) {
|
|
1764
|
-
const parsed = expectEnum(
|
|
1765
|
-
issues,
|
|
1766
|
-
"integrations.externalAgents.defaults.toolGovernance",
|
|
1767
|
-
normalizeLegacyNamingValue(defaults.toolGovernance, "clio-policy", "clio-coder-policy"),
|
|
1768
|
-
TOOL_GOVERNANCE
|
|
1769
|
-
);
|
|
1770
|
-
if (parsed !== void 0) settings.integrations.externalAgents.defaults.toolGovernance = parsed;
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
if ("entries" in external) {
|
|
1775
|
-
if (!Array.isArray(external.entries))
|
|
1776
|
-
issues.add("integrations.externalAgents.entries", `expected a list, got ${describe(external.entries)}`);
|
|
1777
|
-
else {
|
|
1778
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1779
|
-
settings.integrations.externalAgents.entries = external.entries.map(
|
|
1780
|
-
(entry, index) => validateExternalAgent(
|
|
1781
|
-
issues,
|
|
1782
|
-
`integrations.externalAgents.entries[${index}]`,
|
|
1783
|
-
entry,
|
|
1784
|
-
settings.integrations.externalAgents.defaults,
|
|
1785
|
-
seen
|
|
1786
|
-
)
|
|
1787
|
-
).filter((entry) => entry !== null);
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1794
|
-
return { settings, issues: issues.list };
|
|
1795
|
-
}
|
|
1796
|
-
function validateSettingsFile() {
|
|
1797
|
-
const path = join(resolveClioDirs().config, "settings.yaml");
|
|
1798
|
-
if (!existsSync(path)) return { settings: cloneValue(DEFAULT_SETTINGS), issues: [] };
|
|
1799
|
-
let text;
|
|
1800
|
-
try {
|
|
1801
|
-
text = readFileSync(path, "utf8");
|
|
1802
|
-
} catch (err) {
|
|
1803
|
-
return {
|
|
1804
|
-
settings: cloneValue(DEFAULT_SETTINGS),
|
|
1805
|
-
issues: [
|
|
1806
|
-
{ path: "(root)", message: `unreadable: ${err instanceof Error ? err.message : String(err)}`, kind: "unreadable" }
|
|
1807
|
-
]
|
|
1808
|
-
};
|
|
1809
|
-
}
|
|
1810
|
-
let parsed;
|
|
1811
|
-
try {
|
|
1812
|
-
parsed = (0, import_yaml.parse)(text);
|
|
1813
|
-
} catch (err) {
|
|
1814
|
-
return {
|
|
1815
|
-
settings: cloneValue(DEFAULT_SETTINGS),
|
|
1816
|
-
issues: [{ path: "(root)", message: `invalid YAML: ${yamlErrorSummary(err)}`, kind: "syntax" }]
|
|
1817
|
-
};
|
|
1818
|
-
}
|
|
1819
|
-
return validateSettings(parsed);
|
|
1820
|
-
}
|
|
1821
|
-
function readSettings() {
|
|
1822
|
-
const result = validateSettingsFile();
|
|
1823
|
-
if (result.issues.length > 0) throw new SettingsValidationError(result.issues);
|
|
1824
|
-
return result.settings;
|
|
1825
|
-
}
|
|
1826
|
-
function persistSettings(document) {
|
|
1827
|
-
safeResourceWrite(settingsPath(), (0, import_yaml.stringify)(document), { encoding: "utf8", mode: 420 });
|
|
1828
|
-
}
|
|
1829
|
-
function readSavedDocument() {
|
|
1830
|
-
const path = settingsPath();
|
|
1831
|
-
if (!existsSync(path)) return {};
|
|
1832
|
-
try {
|
|
1833
|
-
return (0, import_yaml.parse)(readFileSync(path, "utf8")) ?? {};
|
|
1834
|
-
} catch {
|
|
1835
|
-
return {};
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
function applySettingsDelta(saved, before, after) {
|
|
1839
|
-
if (!isPlainObject(before) || !isPlainObject(after)) return cloneValue(after);
|
|
1840
|
-
const out = isPlainObject(saved) ? { ...saved } : {};
|
|
1841
|
-
for (const [key, next] of Object.entries(after)) {
|
|
1842
|
-
if (deepEquals(before[key], next)) continue;
|
|
1843
|
-
out[key] = applySettingsDelta(out[key], before[key], next);
|
|
1844
|
-
}
|
|
1845
|
-
for (const key of Object.keys(out)) {
|
|
1846
|
-
if (!(key in after)) delete out[key];
|
|
1847
|
-
}
|
|
1848
|
-
return out;
|
|
1849
|
-
}
|
|
1850
|
-
function deepEquals(a, b) {
|
|
1851
|
-
if (a === b) return true;
|
|
1852
|
-
if (Array.isArray(a) || Array.isArray(b)) {
|
|
1853
|
-
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
|
|
1854
|
-
return a.every((entry, index) => deepEquals(entry, b[index]));
|
|
1855
|
-
}
|
|
1856
|
-
if (!isPlainObject(a) || !isPlainObject(b)) return false;
|
|
1857
|
-
const keys = Object.keys(a);
|
|
1858
|
-
if (keys.length !== Object.keys(b).length) return false;
|
|
1859
|
-
return keys.every((key) => key in b && deepEquals(a[key], b[key]));
|
|
1860
|
-
}
|
|
1861
|
-
function updateSavedSettingsDocument(mutate, options = {}) {
|
|
1862
|
-
withSettingsLock(() => {
|
|
1863
|
-
readSettings();
|
|
1864
|
-
const saved = readSavedDocument();
|
|
1865
|
-
persistSettings(mutate(cloneValue(saved)));
|
|
1866
|
-
}, options);
|
|
1867
|
-
}
|
|
1868
|
-
function withSettingsLock(fn, options = {}) {
|
|
1869
|
-
return withStateFileLockSync(settingsPath(), fn, { timeoutMs: options.timeoutMs ?? 1e4 });
|
|
1870
|
-
}
|
|
1871
|
-
function updateSettings(mutate, options = {}) {
|
|
1872
|
-
return withSettingsLock(() => {
|
|
1873
|
-
const saved = readSavedDocument();
|
|
1874
|
-
const current = readSettings();
|
|
1875
|
-
const before = cloneValue(current);
|
|
1876
|
-
const next = mutate(current) ?? current;
|
|
1877
|
-
const revalidated = validateSettings(JSON.parse(JSON.stringify(next)));
|
|
1878
|
-
if (revalidated.issues.length > 0) throw new SettingsValidationError(revalidated.issues);
|
|
1879
|
-
persistSettings(applySettingsDelta(saved, before, revalidated.settings));
|
|
1880
|
-
return revalidated.settings;
|
|
1881
|
-
}, options);
|
|
1882
|
-
}
|
|
1883
|
-
function useTargetInSettings(settings, targetId, options = {}) {
|
|
1884
|
-
const target = settings.targets.find((entry) => entry.id === targetId);
|
|
1885
|
-
if (!target) return null;
|
|
1886
|
-
const workerTarget = options.workerTargetId !== void 0 && options.workerTargetId !== target.id ? settings.targets.find((entry) => entry.id === options.workerTargetId) : target;
|
|
1887
|
-
if (!workerTarget) return null;
|
|
1888
|
-
const scoped = options.orchestratorModel !== void 0 || options.workerModel !== void 0 || options.workerTargetId !== void 0 || options.backgroundModel !== void 0;
|
|
1889
|
-
const roles = [];
|
|
1890
|
-
if (!scoped || options.orchestratorModel !== void 0) roles.push("chat");
|
|
1891
|
-
if (!scoped || options.workerModel !== void 0 || options.workerTargetId !== void 0) roles.push("fleet");
|
|
1892
|
-
if (options.backgroundModel !== void 0) roles.push("memory");
|
|
1893
|
-
const changedRoles = [];
|
|
1894
|
-
const sharedModel = options.model ?? target.defaultModel ?? null;
|
|
1895
|
-
for (const role of roles) {
|
|
1896
|
-
const current = role === "chat" ? settings.chat : role === "fleet" ? settings.fleet.default : settings.context.memory;
|
|
1897
|
-
const nextTarget = role === "fleet" ? workerTarget.id : target.id;
|
|
1898
|
-
const nextModel = role === "chat" ? options.orchestratorModel ?? sharedModel : role === "fleet" ? options.workerModel ?? (workerTarget === target ? sharedModel : workerTarget.defaultModel ?? null) : options.backgroundModel ?? null;
|
|
1899
|
-
if (current.target !== nextTarget || current.model !== nextModel) changedRoles.push(role);
|
|
1900
|
-
current.target = nextTarget;
|
|
1901
|
-
current.model = nextModel;
|
|
1902
|
-
}
|
|
1903
|
-
return { workerTargetId: workerTarget.id, roles, changedRoles };
|
|
1904
|
-
}
|
|
1905
|
-
function removeTargetFromSettings(settings, id) {
|
|
1906
|
-
if (!settings.targets.some((entry) => entry.id === id)) return false;
|
|
1907
|
-
settings.targets = settings.targets.filter((entry) => entry.id !== id);
|
|
1908
|
-
if (settings.chat.target === id) {
|
|
1909
|
-
settings.chat.target = null;
|
|
1910
|
-
settings.chat.model = null;
|
|
1911
|
-
}
|
|
1912
|
-
if (settings.context.memory.target === id) {
|
|
1913
|
-
settings.context.memory.target = null;
|
|
1914
|
-
settings.context.memory.model = null;
|
|
1915
|
-
}
|
|
1916
|
-
if (settings.fleet.default.target === id) {
|
|
1917
|
-
settings.fleet.default.target = null;
|
|
1918
|
-
settings.fleet.default.model = null;
|
|
1919
|
-
}
|
|
1920
|
-
for (const [name, profile] of Object.entries(settings.fleet.profiles)) {
|
|
1921
|
-
if (profile.target === id) delete settings.fleet.profiles[name];
|
|
1922
|
-
}
|
|
1923
|
-
settings.chat.modelPicker.cycleSet = settings.chat.modelPicker.cycleSet.filter((entry) => entry.split("/")[0] !== id);
|
|
1924
|
-
settings.chat.modelPicker.favorites = settings.chat.modelPicker.favorites.filter(
|
|
1925
|
-
(entry) => entry.split("/")[0] !== id
|
|
1926
|
-
);
|
|
1927
|
-
return true;
|
|
1928
|
-
}
|
|
1929
|
-
function setFleetProfileInSettings(settings, name, targetId, options = {}) {
|
|
1930
|
-
const target = settings.targets.find((entry) => entry.id === targetId);
|
|
1931
|
-
if (!target) return false;
|
|
1932
|
-
const existing = settings.fleet.profiles[name];
|
|
1933
|
-
settings.fleet.profiles[name] = {
|
|
1934
|
-
target: target.id,
|
|
1935
|
-
model: options.model ?? target.defaultModel ?? null,
|
|
1936
|
-
thinkingLevel: options.thinkingLevel ?? existing?.thinkingLevel ?? "off"
|
|
1937
|
-
};
|
|
1938
|
-
return true;
|
|
1939
|
-
}
|
|
1940
|
-
function removeFleetProfileFromSettings(settings, name) {
|
|
1941
|
-
delete settings.fleet.profiles[name];
|
|
1942
|
-
let removedBindings = 0;
|
|
1943
|
-
for (const [agentId, profileName] of Object.entries(settings.fleet.agentProfiles)) {
|
|
1944
|
-
if (profileName !== name) continue;
|
|
1945
|
-
delete settings.fleet.agentProfiles[agentId];
|
|
1946
|
-
removedBindings += 1;
|
|
1947
|
-
}
|
|
1948
|
-
return removedBindings;
|
|
1949
|
-
}
|
|
1950
|
-
function bindAgentProfileInSettings(settings, agentId, profileName) {
|
|
1951
|
-
if (settings.integrations.externalAgents.entries.some((agent) => agent.id === agentId)) return false;
|
|
1952
|
-
settings.fleet.agentProfiles[agentId] = profileName;
|
|
1953
|
-
return true;
|
|
1954
|
-
}
|
|
1955
|
-
|
|
1956
|
-
export {
|
|
1957
|
-
settingsPath,
|
|
1958
|
-
SettingsValidationError,
|
|
1959
|
-
formatSettingsIssues,
|
|
1960
|
-
formatSettingsFailure,
|
|
1961
|
-
SETTINGS_V1_PATH_MOVES,
|
|
1962
|
-
validateSettings,
|
|
1963
|
-
validateSettingsFile,
|
|
1964
|
-
readSettings,
|
|
1965
|
-
applySettingsDelta,
|
|
1966
|
-
updateSavedSettingsDocument,
|
|
1967
|
-
withSettingsLock,
|
|
1968
|
-
updateSettings,
|
|
1969
|
-
useTargetInSettings,
|
|
1970
|
-
removeTargetFromSettings,
|
|
1971
|
-
setFleetProfileInSettings,
|
|
1972
|
-
removeFleetProfileFromSettings,
|
|
1973
|
-
bindAgentProfileInSettings
|
|
1974
|
-
};
|
|
1975
|
-
//# sourceMappingURL=chunk-FPS4R2RN.js.map
|