@iowarp/clio-coder 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +82 -0
- package/README.md +7 -6
- package/dist/{acp-JWPQZM2D.js → acp-ZWZCPS2A.js} +13 -13
- package/dist/{agents-4GCDIRVX.js → agents-LYSOWZUE.js} +53 -52
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-SYAKTDQE.js → auth-WBQGKWQ5.js} +27 -27
- package/dist/{background-OW67WMYR.js → background-BUMOBAQN.js} +4 -4
- package/dist/{builtins-TKS63VNV.js → builtins-ODRJOEDI.js} +7 -7
- package/dist/{chunk-JLBVCROW.js → chunk-2DRRZ57Q.js} +33 -24
- package/dist/chunk-2JBZYUPY.js +105 -0
- package/dist/chunk-2KUBKL63.js +336 -0
- package/dist/{chunk-K45LHSCI.js → chunk-2VBWFXYE.js} +7 -3
- package/dist/{chunk-XTLJDC2X.js → chunk-2X2R3UTH.js} +23 -18
- package/dist/{chunk-5HULHKT2.js → chunk-37LW32LZ.js} +5 -5
- package/dist/{chunk-W7KNI3F5.js → chunk-3AND2EFU.js} +5 -5
- package/dist/{chunk-36XSBPXL.js → chunk-3RDHGNU7.js} +95 -27
- package/dist/{chunk-BIY22UUK.js → chunk-3SUDBGEI.js} +11 -10
- package/dist/{chunk-3IQOZRQ6.js → chunk-3TQN67I2.js} +7 -7
- package/dist/{chunk-KWJXCL2X.js → chunk-3U4BL2EV.js} +3 -3
- package/dist/{chunk-RBES4TCZ.js → chunk-3UQADNG2.js} +3 -3
- package/dist/{chunk-V4ZKOKRB.js → chunk-434LRQ6Z.js} +61 -53
- package/dist/{chunk-MWMW53WW.js → chunk-4ATBOFRP.js} +649 -193
- package/dist/{chunk-QGIC5SX5.js → chunk-4DNL43EZ.js} +3 -3
- package/dist/{chunk-GVU4CXPJ.js → chunk-4HFJKRGZ.js} +113 -54
- package/dist/{chunk-5A6XR3RJ.js → chunk-555E2WVV.js} +16 -2
- package/dist/{chunk-LZDLYSUN.js → chunk-5RTEFNBP.js} +3 -3
- package/dist/{chunk-HMGAKB7E.js → chunk-64XJW7NT.js} +15 -15
- package/dist/{chunk-EXKUF426.js → chunk-7FBCRWVT.js} +280 -280
- package/dist/{chunk-K3W6BF5C.js → chunk-7JSOSVLP.js} +2 -2
- package/dist/{chunk-WFTSK7N3.js → chunk-7N3OLLSL.js} +4 -4
- package/dist/{chunk-JRA6OBHY.js → chunk-A6DULIMH.js} +17 -5
- package/dist/{chunk-R5NRX5N4.js → chunk-AB3QXXBC.js} +2 -2
- package/dist/chunk-ACCECAH4.js +49 -0
- package/dist/{chunk-GJBJHJNY.js → chunk-AM6CEP2K.js} +5 -5
- package/dist/{chunk-MUXNDNMZ.js → chunk-AY4XE6GN.js} +19 -13
- package/dist/{chunk-MATCRH3M.js → chunk-BBA2TAWV.js} +9 -9
- package/dist/{chunk-PMUUAABD.js → chunk-BMNVVKEW.js} +9 -9
- package/dist/{chunk-TOPICHGR.js → chunk-CTGZCEI6.js} +2 -2
- package/dist/{chunk-L75H5B3B.js → chunk-DIAJYJYG.js} +2 -2
- package/dist/{chunk-JIMWEYWO.js → chunk-EHZRAB4U.js} +2 -2
- package/dist/{chunk-YXANQGCX.js → chunk-EM2DIQAJ.js} +6 -6
- package/dist/{chunk-JCVIL6TY.js → chunk-ETF4ROKH.js} +4 -4
- package/dist/{chunk-5W4FRA5Q.js → chunk-F2YM3JY4.js} +483 -253
- package/dist/{chunk-YGIV24MF.js → chunk-FEBQWHJT.js} +21 -16
- package/dist/{chunk-PGEFOTJB.js → chunk-FPS4R2RN.js} +5 -4
- package/dist/{chunk-XC5POIL4.js → chunk-G5R53COU.js} +1 -1
- package/dist/chunk-GHXGMFQ5.js +40 -0
- package/dist/{chunk-QLKCCC2J.js → chunk-GJDRMBDI.js} +14 -14
- package/dist/{chunk-2ZWLMA3T.js → chunk-GREYLTZ5.js} +7 -7
- package/dist/{chunk-YXFKLMX2.js → chunk-H2WSCZZT.js} +22 -6
- package/dist/{chunk-FNVPQQYT.js → chunk-H6IUCY6Q.js} +2 -2
- package/dist/{chunk-5C2OQHLR.js → chunk-H72DCH3E.js} +92 -203
- package/dist/{chunk-JYKUMHCQ.js → chunk-H7TXJR23.js} +21 -21
- package/dist/chunk-HBJQQTKM.js +40 -0
- package/dist/chunk-HCVKSGNZ.js +990 -0
- package/dist/{chunk-ARRUMZ7X.js → chunk-I47EJPYL.js} +3 -3
- package/dist/{chunk-YKIIWURD.js → chunk-IALGWTLO.js} +3 -3
- package/dist/{chunk-FB3KTE2J.js → chunk-IALZJE37.js} +4 -4
- package/dist/{chunk-RAUOKUZV.js → chunk-IC7JXLOM.js} +15 -10
- package/dist/{chunk-LLCGGVSW.js → chunk-IOSVTTCD.js} +7 -7
- package/dist/{chunk-DBREN25X.js → chunk-IPTPMLA6.js} +8 -3
- package/dist/{chunk-V552WL53.js → chunk-IZZI3SKQ.js} +3 -67
- package/dist/{chunk-UDAK6GR2.js → chunk-JIYWMQZ5.js} +2 -2
- package/dist/{chunk-O3HSB2YL.js → chunk-JKU34ACI.js} +2 -2
- package/dist/{chunk-6X7VOCDY.js → chunk-JTR3VSV3.js} +3 -3
- package/dist/{chunk-O2QJDRWP.js → chunk-JU6MAMRJ.js} +4 -4
- package/dist/chunk-JURMQWVJ.js +15 -0
- package/dist/{chunk-STC6CWUZ.js → chunk-K3XN4LZ4.js} +5 -5
- package/dist/{chunk-ATB3Q7YO.js → chunk-KIVFXGBM.js} +27 -2
- package/dist/{chunk-WJWNZXRM.js → chunk-KOAHT3N2.js} +2 -2
- package/dist/chunk-KP5BPXR3.js +73 -0
- package/dist/{chunk-K53E2PTW.js → chunk-KRJQG47M.js} +3 -3
- package/dist/{chunk-IILXVWJY.js → chunk-KW6OJ7IY.js} +19 -21
- package/dist/{chunk-A46ILRS2.js → chunk-L3NBWLSN.js} +4 -4
- package/dist/{chunk-2U2U5POA.js → chunk-L4RUTLRL.js} +5 -5
- package/dist/{chunk-QYSAZMSH.js → chunk-LGTVWPRN.js} +2 -2
- package/dist/{chunk-KGP3UQGJ.js → chunk-LSQW6KZO.js} +5 -5
- package/dist/{chunk-P4JS3MH5.js → chunk-LWJYOHT3.js} +8 -8
- package/dist/{chunk-U3TPUXOQ.js → chunk-M6YLF66Z.js} +74 -40
- package/dist/{chunk-5D2FNBMG.js → chunk-MJ4QEJVT.js} +2 -2
- package/dist/{chunk-RM3XJX7P.js → chunk-MO65K5CH.js} +5 -5
- package/dist/{chunk-H5DPSUBB.js → chunk-MTOZEQHL.js} +3 -3
- package/dist/{chunk-6R5MBXBJ.js → chunk-NBPA5QM6.js} +2 -2
- package/dist/{chunk-H77XBUBM.js → chunk-NMBEW4PP.js} +3 -3
- package/dist/{chunk-QWUSS2QP.js → chunk-NPLLK3HO.js} +67 -87
- package/dist/{chunk-K5UJD6MM.js → chunk-NSYGPIVW.js} +5 -5
- package/dist/{context-EZZPT2ZV.js → chunk-NXTV5OI5.js} +30 -84
- package/dist/{chunk-F7Y6QTPL.js → chunk-NYDG4QP4.js} +4 -4
- package/dist/{chunk-PFZJMXIY.js → chunk-OA2GDACN.js} +2 -2
- package/dist/{chunk-Q32C6AWI.js → chunk-PJI57EC6.js} +4 -4
- package/dist/{chunk-EFXMQYI6.js → chunk-PJJBUGMR.js} +52 -52
- package/dist/{chunk-ICYIUNO4.js → chunk-PNJE7JPS.js} +18 -3
- package/dist/chunk-PP23PZEV.js +1347 -0
- package/dist/chunk-PPIFDSBK.js +409 -0
- package/dist/{chunk-RFULVPBX.js → chunk-PTFISXQO.js} +6 -5
- package/dist/{chunk-JV25I7ID.js → chunk-QB33Z5S7.js} +5 -5
- package/dist/{chunk-D55WO5J7.js → chunk-QGNII5VC.js} +8 -8
- package/dist/{chunk-RKFNU5UA.js → chunk-QI72X67S.js} +104 -27
- package/dist/chunk-QKHZZFKH.js +98 -0
- package/dist/{chunk-5UG6EZI3.js → chunk-RDKX2PME.js} +4 -4
- package/dist/{chunk-B5ZTR6KZ.js → chunk-RL7LJYN4.js} +1 -1
- package/dist/{chunk-BE4I3UJ2.js → chunk-RQROVOV3.js} +15 -13
- package/dist/{chunk-TEHVMHOK.js → chunk-S34A7BSP.js} +3 -3
- package/dist/{chunk-4P6M2TTE.js → chunk-SJETVJHX.js} +2 -2
- package/dist/{chunk-OPC4DQD6.js → chunk-SJMNU4ZS.js} +2 -2
- package/dist/{chunk-2JSCCEKO.js → chunk-SLLG2G44.js} +2 -2
- package/dist/{chunk-EPYATQMG.js → chunk-SQAZN2V3.js} +42 -16
- package/dist/{chunk-E2NSPYLC.js → chunk-SQBT46OF.js} +5 -5
- package/dist/{chunk-WTZVSMQZ.js → chunk-TCUOGIL2.js} +5 -5
- package/dist/{chunk-RRZFRIJP.js → chunk-TIWPKCVO.js} +5 -5
- package/dist/{chunk-QLAGXTTV.js → chunk-UIU7MGZ3.js} +5 -1
- package/dist/{chunk-WLHX3MM5.js → chunk-V4XJWDHR.js} +21 -11
- package/dist/{chunk-PJ5H5B7A.js → chunk-VPWGADBG.js} +18 -18
- package/dist/{chunk-GEYX2NZ5.js → chunk-VWFCAK34.js} +6 -6
- package/dist/{chunk-44U2OUSM.js → chunk-W72LLZAV.js} +2 -2
- package/dist/{chunk-ORRNGQDV.js → chunk-WGRDABW7.js} +4 -4
- package/dist/{chunk-RNLAPBJL.js → chunk-XFLSL7BT.js} +2 -2
- package/dist/{chunk-2SXGG2IV.js → chunk-XJZEDCNT.js} +6 -6
- package/dist/{chunk-UB33F3YW.js → chunk-XLLEL3K7.js} +5 -5
- package/dist/{chunk-2GPGAE5W.js → chunk-XNIZBOFV.js} +15 -1
- package/dist/{chunk-WS4FOGLY.js → chunk-XNZWWDC3.js} +2 -2
- package/dist/{chunk-P7GTE4FX.js → chunk-XRECG65F.js} +2 -2
- package/dist/chunk-XTQ7MEJG.js +457 -0
- package/dist/{chunk-GEVQNST4.js → chunk-XZWSP67B.js} +2 -2
- package/dist/{chunk-OEMFEL26.js → chunk-Y3M2T5RO.js} +3 -3
- package/dist/{chunk-HP7KJ5O2.js → chunk-YPQOPFP7.js} +6 -6
- package/dist/{chunk-MEHBW2SP.js → chunk-YQYINEJI.js} +6 -6
- package/dist/{chunk-RXI7K4J5.js → chunk-ZF6CV4WZ.js} +1338 -217
- package/dist/{chunk-3XE4NRLF.js → chunk-ZKJU55MX.js} +4 -2
- package/dist/{chunk-526ABLHD.js → chunk-ZKQ63XZ5.js} +12 -35
- package/dist/{chunk-PAQVETLA.js → chunk-ZKVMDNAN.js} +5 -5
- package/dist/cli/index.js +47 -37
- package/dist/{clio-BPBAPZGA.js → clio-JUDCLNHC.js} +7 -7
- package/dist/clio-context-tools-FT672MNZ.js +136 -0
- package/dist/{code-nav-KBQ3RIFK.js → code-nav-7OVCTP2Z.js} +28 -26
- package/dist/{components-6DKAXWFN.js → components-OZXZMDWU.js} +5 -5
- package/dist/{config-FWL5JK2H.js → config-P3ZQVF63.js} +80 -75
- package/dist/{config-graph-ACDB26L2.js → config-graph-GKAOBAS5.js} +74 -70
- package/dist/{configure-ZIZ4YV62.js → configure-25LRYZJG.js} +45 -44
- package/dist/context-72VQV7JX.js +73 -0
- package/dist/{context-VIL5MFRH.js → context-COWRWXP3.js} +74 -70
- package/dist/{context-Z3GOBHDK.js → context-WB3D474G.js} +12 -12
- package/dist/{context-clear-ZPB3L7MN.js → context-clear-Y4LYMWC6.js} +70 -66
- package/dist/{context-working-set-2GLBVF7L.js → context-working-set-TMZYVC7A.js} +15 -14
- package/dist/data-tool-KMBWKKWR.js +2987 -0
- package/dist/{detail-VSBWYSGZ.js → detail-4GLROGY5.js} +71 -67
- package/dist/{dispatch-runner-EEEHGKX4.js → dispatch-runner-TR3LBP5P.js} +92 -88
- package/dist/{docs-VMMWFVHL.js → docs-ZK777W2G.js} +3 -3
- package/dist/{doctor-V5L4IQGP.js → doctor-WC4OV2OB.js} +61 -59
- package/dist/{eval-VJYJ2BV3.js → eval-FUNWJNUJ.js} +45 -45
- package/dist/{evals-J2H5V6DD.js → evals-L73EBHSU.js} +4 -4
- package/dist/{evidence-Y35YSXH6.js → evidence-AVJ2RTHX.js} +80 -76
- package/dist/{evidence-POWAEBEW.js → evidence-P4NZOAK7.js} +70 -66
- package/dist/{evidence-XCCCLS36.js → evidence-Y55WKYHH.js} +79 -75
- package/dist/{evolve-GPG72VB6.js → evolve-MAWKRYWF.js} +75 -71
- package/dist/{extensions-YIZ7W3DA.js → extensions-PYQH3H47.js} +8 -8
- package/dist/{fleet-2MDCQ2VK.js → fleet-M4H2QBWT.js} +84 -80
- package/dist/{fleet-W2AF3TOJ.js → fleet-ULBXXRDR.js} +123 -119
- package/dist/{fleet-commands-WS56G26H.js → fleet-commands-7NNC4JZU.js} +17 -16
- package/dist/{fleet-decisions-MYGZ3JW7.js → fleet-decisions-EHEY7KPU.js} +9 -9
- package/dist/{fleet-graph-ELTBXBAV.js → fleet-graph-LQ2AHZT3.js} +15 -15
- package/dist/{fleet-inspect-45IK73L4.js → fleet-inspect-5IGBIIYZ.js} +76 -72
- package/dist/{fleet-preflight-T5NCZKHE.js → fleet-preflight-UTTNOKMG.js} +7 -2
- package/dist/{fleet-validate-VG4JBLA4.js → fleet-validate-YGILJKA6.js} +20 -20
- package/dist/{fleet-verify-VTSABAYO.js → fleet-verify-AUWTCDKR.js} +70 -66
- package/dist/{fleet-view-XC7WMKSS.js → fleet-view-TGUFCY5A.js} +73 -69
- package/dist/{init-VTJNNTIP.js → init-GFN2Z7NF.js} +94 -90
- package/dist/{interop-IU6BNA7C.js → interop-EF5JUWWK.js} +21 -21
- package/dist/{inventory-QPQUTUUZ.js → inventory-I6VJDDYF.js} +73 -69
- package/dist/{library-Q3NWL5CM.js → library-3J5IO2OJ.js} +13 -13
- package/dist/{library-LF7DLU6S.js → library-IJTOFTDS.js} +16 -15
- package/dist/{library-HUTAS57T.js → library-Z3KZSHPE.js} +27 -27
- package/dist/{library-import-PPW4YUC5.js → library-import-IMKFLDHX.js} +21 -21
- package/dist/{library-inventory-DIRVFRZU.js → library-inventory-CQP5D6GU.js} +13 -13
- package/dist/{library-validation-XHUZ3INE.js → library-validation-33UTX7AI.js} +11 -11
- package/dist/mcp-5FWZKUS6.js +26 -0
- package/dist/{memory-Z2LSKNV6.js → memory-36CWN67Y.js} +75 -71
- package/dist/{models-3FTREYPY.js → models-KQ6PQJJQ.js} +49 -49
- package/dist/{monitor-HF2MQRB3.js → monitor-XX6ZD6KC.js} +83 -79
- package/dist/{orchestrator-UYPA6W4S.js → orchestrator-SK6HDAOP.js} +1337 -772
- package/dist/{panes-736XB73K.js → panes-L27QRXUH.js} +12 -12
- package/dist/{panes-C4P3PIWT.js → panes-LXZIWNOZ.js} +4 -4
- package/dist/{paths-JQ4QYIYB.js → paths-7DJDU4P4.js} +5 -5
- package/dist/{preload-XSLRYH3Y.js → preload-K2TDYI4Y.js} +70 -66
- package/dist/{reset-V7QSPZYE.js → reset-73VU3XNT.js} +10 -10
- package/dist/{resources-OJGDFHYT.js → resources-3BYJYVYL.js} +16 -16
- package/dist/{run-T354SMDW.js → run-AR7PY6GW.js} +132 -128
- package/dist/run-script-H2KUDIII.js +41 -0
- package/dist/{settings-MWZXO6RV.js → settings-3VMBMWID.js} +4 -4
- package/dist/{share-Y5ZKJPND.js → share-HVWH4FPF.js} +21 -21
- package/dist/{skills-4GLZC4LN.js → skills-5TYEY75Q.js} +22 -22
- package/dist/{skills-eval-L5T7GODM.js → skills-eval-CK3MD63Z.js} +96 -87
- package/dist/{skills-inventory-LASKXEZI.js → skills-inventory-KSFYG3I6.js} +16 -16
- package/dist/{slash-commands-OIMRU36D.js → slash-commands-DMVHML7P.js} +47 -44
- package/dist/{steer-KMAM2Y2C.js → steer-XCD6V3EW.js} +4 -4
- package/dist/{support-AWC3XKPX.js → support-JAZL6VBR.js} +7 -7
- package/dist/{system-CD75NYBU.js → system-3TDQRMZZ.js} +26 -26
- package/dist/{targets-VSZX2J2S.js → targets-EZKHAYRN.js} +66 -65
- package/dist/{tasks-AN567LYH.js → tasks-SNEFHWYW.js} +12 -12
- package/dist/{terminal-lease-6KTWNHVY.js → terminal-lease-BNLFA4OF.js} +8 -7
- package/dist/{tools-AGRK3V5J.js → tools-7IM6BDCE.js} +12 -12
- package/dist/{trace-P4MQZD33.js → trace-C3MBGD4S.js} +8 -8
- package/dist/{tui-primitives-A6MUW32V.js → tui-primitives-36BY2774.js} +2 -2
- package/dist/{uninstall-BRUTEPIC.js → uninstall-WWLOSZ42.js} +10 -10
- package/dist/{upgrade-SBCGHQGJ.js → upgrade-ETK2JNSJ.js} +37 -47
- package/dist/{usage-BIDVTO6V.js → usage-S2HOB7BZ.js} +93 -89
- package/dist/{verifiers-LTGCAMXS.js → verifiers-QDTEVH7R.js} +24 -22
- package/dist/{verify-OZU4LLNP.js → verify-SUKUK6XM.js} +15 -14
- package/dist/web/client/assets/{abnfDiagram-VCTEODGH-C5wfoHm3.js → abnfDiagram-VCTEODGH-BznNOe_I.js} +1 -1
- package/dist/web/client/assets/{arc-oH91sfLl.js → arc-Pry-7G1_.js} +1 -1
- package/dist/web/client/assets/architecture-7GRP2DOG-BQO9DL_y.js +1 -0
- package/dist/web/client/assets/architectureDiagram-5GKGNRK7-CKPbdvyx.js +36 -0
- package/dist/web/client/assets/{blockDiagram-I7D4REHJ-wi0_CYHL.js → blockDiagram-I7D4REHJ-prINbpbM.js} +1 -1
- package/dist/web/client/assets/{c4Diagram-7LVT6UL2-DV7NYc2W.js → c4Diagram-7LVT6UL2-DkVRKtyU.js} +1 -1
- package/dist/web/client/assets/channel-c4EeUUqA.js +1 -0
- package/dist/web/client/assets/{chunk-4HAMMTFA-Bhsegh3F.js → chunk-4HAMMTFA-CV0Z1ApC.js} +1 -1
- package/dist/web/client/assets/{chunk-75Z2AOVW-RQCckcQG.js → chunk-75Z2AOVW-D34Nohxq.js} +1 -1
- package/dist/web/client/assets/chunk-DU6HZSFF-Das_cS-O.js +125 -0
- package/dist/web/client/assets/{chunk-F27PBJKO-BcNqv2x1.js → chunk-F27PBJKO-CmRojxkG.js} +1 -1
- package/dist/web/client/assets/{chunk-GMAD6QVW-Bq8JWiZT.js → chunk-GMAD6QVW-ClYZmc73.js} +1 -1
- package/dist/web/client/assets/{chunk-GVQU2GXP-DbchrAeJ.js → chunk-GVQU2GXP-B2BiHFt-.js} +1 -1
- package/dist/web/client/assets/{chunk-IMKFNOWR-DrpvjocK.js → chunk-IMKFNOWR-BGApZ8nP.js} +1 -1
- package/dist/web/client/assets/{chunk-L3NEJ4N5-DHLmTnCe.js → chunk-L3NEJ4N5-DIzCgpkY.js} +1 -1
- package/dist/web/client/assets/{chunk-OSK3NFVY-CsRbtN9n.js → chunk-OSK3NFVY-BPT-yePv.js} +1 -1
- package/dist/web/client/assets/{chunk-P2QGCYS3-aqPbxoMh.js → chunk-P2QGCYS3-BC1WTc2t.js} +1 -1
- package/dist/web/client/assets/{chunk-POPQ4Y6H-Dl5vw0h0.js → chunk-POPQ4Y6H-BSjzBmZU.js} +1 -1
- package/dist/web/client/assets/{chunk-PWAF6VOD-D7OBRSdO.js → chunk-PWAF6VOD-BIjLs86Z.js} +1 -1
- package/dist/web/client/assets/{chunk-SHT3W25Y-CdKCIwuB.js → chunk-SHT3W25Y-CduDz2cm.js} +1 -1
- package/dist/web/client/assets/{chunk-SVP7TREG-B94Nu_1-.js → chunk-SVP7TREG-XUn4pPAP.js} +1 -1
- package/dist/web/client/assets/{chunk-TICWLB2K-jjRQI_hk.js → chunk-TICWLB2K-DcBy2DKy.js} +1 -1
- package/dist/web/client/assets/{chunk-XXDRQBXY-azkbKE37.js → chunk-XXDRQBXY-DqAYeljN.js} +1 -1
- package/dist/web/client/assets/classDiagram-ZZMXUADV-C0HR7YKN.js +1 -0
- package/dist/web/client/assets/classDiagram-v2-VYDZK3BY-C0HR7YKN.js +1 -0
- package/dist/web/client/assets/cose-bilkent-JH36ORCC-CVh1icwb.js +1 -0
- package/dist/web/client/assets/{cynefin-OW5HDTMX--i9RDU5f.js → cynefin-OW5HDTMX-BecPbyM6.js} +1 -1
- package/dist/web/client/assets/{cynefinDiagram-5FMLGOSQ-cRcvyBdp.js → cynefinDiagram-5FMLGOSQ-BzMzFwyT.js} +1 -1
- package/dist/web/client/assets/{dagre-GXQ25YYZ-C9mZmAPe.js → dagre-GXQ25YYZ-CAWJmRMG.js} +1 -1
- package/dist/web/client/assets/{diagram-S7CK7UJ4-Oj_zlLDY.js → diagram-S7CK7UJ4--lp0ALmn.js} +1 -1
- package/dist/web/client/assets/{diagram-UQ7AKVKN-BWKbbfcR.js → diagram-UQ7AKVKN-gKUnsjcj.js} +1 -1
- package/dist/web/client/assets/{diagram-VSXAHHWV-C3N3f7DO.js → diagram-VSXAHHWV-BoN5D1Gh.js} +1 -1
- package/dist/web/client/assets/{diagram-VX7I27RA-CtDKDAWe.js → diagram-VX7I27RA-BMtuswQ6.js} +1 -1
- package/dist/web/client/assets/{diagram-Z3DM3KII-B8bkBRCz.js → diagram-Z3DM3KII-DtU8LXrA.js} +1 -1
- package/dist/web/client/assets/dist-v5Q1xZ2K.js +1 -0
- package/dist/web/client/assets/{ebnfDiagram-PWID7BFC-CskW-Whx.js → ebnfDiagram-PWID7BFC-DDcnv9BH.js} +1 -1
- package/dist/web/client/assets/{erDiagram-RLTQ6QDP-C-83cgCW.js → erDiagram-RLTQ6QDP-DvRb4iDL.js} +1 -1
- package/dist/web/client/assets/eventmodeling-NTZA5JFV-01h4SbTc.js +1 -0
- package/dist/web/client/assets/flowDiagram-HODETNUW-Bll_YZ6T.js +1 -0
- package/dist/web/client/assets/framework-YGoR34M4.js +9 -0
- package/dist/web/client/assets/ganttDiagram-EL5Y4UJY-DdFZ9hvH.js +292 -0
- package/dist/web/client/assets/{gitGraph-4MIJSDKK-B40cQtBE.js → gitGraph-4MIJSDKK-DjD_AAMj.js} +1 -1
- package/dist/web/client/assets/{gitGraphDiagram-WWUBYQGX-CH-7P7Di.js → gitGraphDiagram-WWUBYQGX-CDyN9n2u.js} +1 -1
- package/dist/web/client/assets/index-CVcy0FAn.js +75 -0
- package/dist/web/client/assets/{info-A6RAGUB7-eCCE9D_Q.js → info-A6RAGUB7-C_XK8Hq0.js} +1 -1
- package/dist/web/client/assets/{infoDiagram-27XIBGKW-DRnvqMjM.js → infoDiagram-27XIBGKW-DIe4tJ1i.js} +1 -1
- package/dist/web/client/assets/{ishikawaDiagram-5VMMS53U-DBA_55wp.js → ishikawaDiagram-5VMMS53U-CVl5unKI.js} +1 -1
- package/dist/web/client/assets/{journeyDiagram-3NMN7TZE-C-ewpNl7.js → journeyDiagram-3NMN7TZE-CPEB1Vt8.js} +1 -1
- package/dist/web/client/assets/{kanban-definition-UXKFOSKX-B1taGsu0.js → kanban-definition-UXKFOSKX-j-9WXjYQ.js} +1 -1
- package/dist/web/client/assets/{line-lZ0kyxDI.js → line-BIDAcEtX.js} +1 -1
- package/dist/web/client/assets/{linear-DIc8FgZj.js → linear-SzVmGSw4.js} +1 -1
- package/dist/web/client/assets/{mermaid-parser.core-SXolxpXw.js → mermaid-parser.core-Ux4vssh0.js} +3 -3
- package/dist/web/client/assets/{mermaid.core-DXgQtkNg.js → mermaid.core-CDuwVKeh.js} +4 -4
- package/dist/web/client/assets/{mindmap-definition-YA3MSWOX-DXJas9K7.js → mindmap-definition-YA3MSWOX-5MlQEeQ6.js} +1 -1
- package/dist/web/client/assets/{packet-AYTQ26CC-OqVl_07o.js → packet-AYTQ26CC-DRO66c9Q.js} +1 -1
- package/dist/web/client/assets/{pegDiagram-XKGWAZYB-CPE_zdfN.js → pegDiagram-XKGWAZYB-BakZnSjM.js} +1 -1
- package/dist/web/client/assets/{pie-WAS4IAKB-DAxnMBLe.js → pie-WAS4IAKB-BEzcmhz8.js} +1 -1
- package/dist/web/client/assets/{pieDiagram-E7YTZNPT-Uwjpufxv.js → pieDiagram-E7YTZNPT-DpmqgoPt.js} +1 -1
- package/dist/web/client/assets/prism-core-BtsZdCS6.js +1 -0
- package/dist/web/client/assets/{quadrantDiagram-AXDQQJYC-Bjs4yjgs.js → quadrantDiagram-AXDQQJYC-DuMPwwV2.js} +1 -1
- package/dist/web/client/assets/{radar-RG4KPBEZ-CuCKjHM3.js → radar-RG4KPBEZ-Djm3oXl5.js} +1 -1
- package/dist/web/client/assets/{railroad-74A4TZTK-CnQK-Cc1.js → railroad-74A4TZTK-Cpvkwsao.js} +1 -1
- package/dist/web/client/assets/railroad-abnf-HS5TGJTU-CpRQ3ruG.js +1 -0
- package/dist/web/client/assets/railroad-ebnf-LZEXJU2U-1Rm5a5eJ.js +1 -0
- package/dist/web/client/assets/railroad-peg-WCYAUIDC-C8344cTh.js +1 -0
- package/dist/web/client/assets/{railroadDiagram-O6MQD6OU-BDDIPNLL.js → railroadDiagram-O6MQD6OU-CgMS4B6R.js} +1 -1
- package/dist/web/client/assets/{requirementDiagram-BXWQKSXE-B5Ydyxc1.js → requirementDiagram-BXWQKSXE-CX5eoNdN.js} +1 -1
- package/dist/web/client/assets/rolldown-runtime-hePW80VL.js +1 -0
- package/dist/web/client/assets/{sankeyDiagram-P5KCCOFB-Bw2Qym75.js → sankeyDiagram-P5KCCOFB-CODBX2N3.js} +1 -1
- package/dist/web/client/assets/{sequenceDiagram-WJ2MYXX4-BZf36nO0.js → sequenceDiagram-WJ2MYXX4-eUhhF8OR.js} +1 -1
- package/dist/web/client/assets/src-B6xuSHsQ.js +1 -0
- package/dist/web/client/assets/{stateDiagram-D77RDMKH-DnH6JRkp.js → stateDiagram-D77RDMKH-vR6l0NC2.js} +1 -1
- package/dist/web/client/assets/stateDiagram-v2-MP3YSRHH-BYUm8jLY.js +1 -0
- package/dist/web/client/assets/{swimlanes-42K2YHIH-D9PZmtZg.js → swimlanes-42K2YHIH-v9Tw_zX7.js} +1 -1
- package/dist/web/client/assets/swimlanesDiagram-VR7AAH4N-B2jdCvhD.js +8 -0
- package/dist/web/client/assets/{timeline-definition-24CTP7MA-CrkZZBo7.js → timeline-definition-24CTP7MA-DxianbhU.js} +1 -1
- package/dist/web/client/assets/{treeView-Q6P3EWNA-C9zDShoC.js → treeView-Q6P3EWNA-DLxnZb9R.js} +1 -1
- package/dist/web/client/assets/{treemap-WGGIJYW6-B-plj9yK.js → treemap-WGGIJYW6-I7UnZ6xJ.js} +1 -1
- package/dist/web/client/assets/{vennDiagram-4TSXK5OY-VeOdaphN.js → vennDiagram-4TSXK5OY-Ar7M8Mrj.js} +1 -1
- package/dist/web/client/assets/{wardley-WFR3VGLG-Wl1P_m6L.js → wardley-WFR3VGLG-B8ZSHeDu.js} +1 -1
- package/dist/web/client/assets/{wardleyDiagram-VM6X3IG4-B85-R9t2.js → wardleyDiagram-VM6X3IG4-Qks2FmIn.js} +1 -1
- package/dist/web/client/assets/{xychartDiagram-S5SC5T6Z-BrD8OW8m.js → xychartDiagram-S5SC5T6Z-BBBjRtiE.js} +1 -1
- package/dist/web/client/index.html +3 -1
- package/dist/web/reads-worker.js +17 -17
- package/dist/web/server.js +25 -25
- package/dist/{web-EU6ATJWA.js → web-EMGUGGEI.js} +3 -3
- package/dist/{web-fetch-U22Q7HV4.js → web-fetch-6BRRVQON.js} +22 -5
- package/dist/{wiki-generate-LZRLFG6I.js → wiki-generate-XHSJTDOP.js} +104 -100
- package/dist/{with-panes-X5CZOGML.js → with-panes-Z6BTEHMZ.js} +11 -11
- package/dist/worker/entry.js +101 -87
- package/docs/README.md +1 -1
- package/docs/architecture/artifact-placement.md +12 -1
- package/docs/architecture/library.md +1 -1
- package/docs/architecture/prompt-envelope-and-tools.md +37 -27
- package/docs/architecture/safety-model.md +19 -6
- package/docs/architecture/session-lifecycle.md +10 -4
- package/docs/architecture/tui-design.md +37 -14
- package/docs/guide/commands-and-modes.md +39 -19
- package/docs/guide/configuration-and-targets.md +7 -5
- package/docs/guide/configuration-reference.md +116 -13
- package/docs/guide/environment-variables.md +2 -5
- package/docs/guide/fleet-dispatch.md +3 -2
- package/docs/guide/glossary.md +1 -1
- package/docs/guide/installation-and-lifecycle.md +2 -2
- package/docs/guide/resource-library.md +1 -1
- package/docs/guide/tool-usage.md +166 -64
- package/docs/guide/troubleshooting.md +1 -1
- package/docs/process/documentation-guide.md +1 -0
- package/docs/process/fleet-demo-runbook.md +6 -6
- package/docs/process/scientific-validation.md +22 -2
- package/docs/process/tool-audit-v0.4.9.md +357 -0
- package/package.json +1 -1
- package/src/cli/argv.ts +31 -0
- package/src/cli/clio.ts +17 -13
- package/src/cli/config.ts +4 -0
- package/src/cli/doctor-panes.ts +1 -1
- package/src/cli/doctor.ts +3 -1
- package/src/cli/index.ts +14 -1
- package/src/cli/mcp.ts +106 -0
- package/src/cli/skills-eval.ts +8 -2
- package/src/cli/upgrade.ts +34 -38
- package/src/cli/verifiers.ts +1 -1
- package/src/core/bash-exec.ts +27 -4
- package/src/core/config.ts +2 -1
- package/src/core/defaults.ts +10 -1
- package/src/core/event-bus.ts +1 -1
- package/src/core/run-records.ts +438 -0
- package/src/core/safe-exec.ts +506 -56
- package/src/core/skill-activation.ts +5 -3
- package/src/core/termination.ts +3 -3
- package/src/core/tool-names.ts +33 -12
- package/src/domains/context/clio-md.ts +1 -1
- package/src/domains/context/worker/pressure.ts +6 -2
- package/src/domains/context/working-set/path-index.ts +7 -2
- package/src/domains/dispatch/code-step.ts +7 -2
- package/src/domains/dispatch/contract.ts +7 -0
- package/src/domains/dispatch/execution-role.ts +3 -3
- package/src/domains/dispatch/execution-scheduler.ts +204 -79
- package/src/domains/dispatch/extension.ts +131 -14
- package/src/domains/dispatch/fleet-preflight.ts +18 -3
- package/src/domains/dispatch/fleet-run.ts +1 -0
- package/src/domains/dispatch/gate-decisions.ts +3 -3
- package/src/domains/dispatch/heartbeat.ts +1 -1
- package/src/domains/dispatch/host-verification.ts +16 -14
- package/src/domains/dispatch/receipt-findings.ts +3 -4
- package/src/domains/dispatch/reservation-store.ts +7 -9
- package/src/domains/dispatch/route-facts.ts +1 -1
- package/src/domains/dispatch/state.ts +3 -3
- package/src/domains/dispatch/types.ts +1 -1
- package/src/domains/evidence/build.ts +35 -7
- package/src/domains/gateway/mcp/client.ts +923 -0
- package/src/domains/gateway/mcp/config.ts +456 -0
- package/src/domains/gateway/mcp/index.ts +88 -0
- package/src/domains/gateway/mcp/protocol.ts +273 -0
- package/src/domains/gateway/mcp/trust.ts +263 -0
- package/src/domains/lifecycle/doctor.ts +17 -3
- package/src/domains/mux/contract.ts +5 -9
- package/src/domains/mux/detect.ts +1 -1
- package/src/domains/mux/extension.ts +1 -1
- package/src/domains/mux/protocol.ts +5 -7
- package/src/domains/mux/socket-client.ts +3 -3
- package/src/domains/observability/accountability.ts +2 -2
- package/src/domains/observability/contract.ts +7 -3
- package/src/domains/observability/evidence-index.ts +2 -2
- package/src/domains/observability/projection.ts +10 -0
- package/src/domains/prompts/compiler.ts +41 -23
- package/src/domains/prompts/fragments/identity/docs-routing.md +2 -2
- package/src/domains/prompts/fragments/operating/skills.md +12 -10
- package/src/domains/providers/index.ts +5 -1
- package/src/domains/providers/models/local-models/clio-coder-local-coding-targets.yaml +42 -10
- package/src/domains/providers/probe/http.ts +44 -59
- package/src/domains/providers/probe/reasoning.ts +2 -0
- package/src/domains/providers/runtimes/local-native/llamacpp-embed.ts +20 -31
- package/src/domains/providers/runtimes/local-native/llamacpp-rerank.ts +9 -4
- package/src/domains/safety/action-classifier.ts +17 -1
- package/src/domains/safety/call-target.ts +14 -0
- package/src/domains/safety/contract.ts +1 -1
- package/src/domains/safety/finish-contract.ts +9 -3
- package/src/domains/safety/loop-detector.ts +1 -1
- package/src/domains/safety/policy-engine.ts +7 -0
- package/src/domains/safety/protected-artifacts.ts +3 -4
- package/src/domains/safety/rejection-feedback.ts +1 -1
- package/src/domains/safety/scope.ts +2 -3
- package/src/domains/safety/validation-contract.ts +3 -2
- package/src/domains/scheduling/budget.ts +5 -3
- package/src/domains/scheduling/contract.ts +2 -1
- package/src/domains/scheduling/extension.ts +3 -3
- package/src/domains/session/compaction/branch-summary.ts +1 -1
- package/src/domains/session/compaction/compact.ts +25 -2
- package/src/domains/session/compaction/cut-point.ts +1 -1
- package/src/domains/session/compaction/tokens.ts +5 -10
- package/src/domains/session/contract.ts +1 -1
- package/src/domains/session/cwd-fallback.ts +2 -2
- package/src/domains/session/handoff.ts +5 -1
- package/src/domains/session/history.ts +6 -0
- package/src/domains/session/manager.ts +14 -7
- package/src/domains/session/retry.ts +2 -1
- package/src/domains/session/session-artifacts.ts +12 -7
- package/src/domains/session/task-board.ts +2 -3
- package/src/engine/apis/openai-completions.ts +8 -0
- package/src/engine/loop-guard.ts +7 -0
- package/src/engine/provider-error-body.ts +65 -0
- package/src/engine/session.ts +118 -29
- package/src/engine/worker-runtime.ts +3 -0
- package/src/entry/boot-options.ts +2 -0
- package/src/entry/orchestrator.ts +18 -2
- package/src/interactive/chat-loop-policy.ts +1 -0
- package/src/interactive/chat-loop.ts +8 -4
- package/src/interactive/chat-panel.ts +23 -9
- package/src/interactive/chat-renderer.ts +33 -11
- package/src/interactive/clio-editor.ts +13 -5
- package/src/interactive/dispatch-board.ts +70 -30
- package/src/interactive/editor-submit.ts +30 -25
- package/src/interactive/footer/widgets.ts +12 -9
- package/src/interactive/interactive-presentation.ts +2 -3
- package/src/interactive/mux-bridge.ts +3 -7
- package/src/interactive/overlay-general-openers.ts +14 -7
- package/src/interactive/overlays/cwd-fallback.ts +1 -1
- package/src/interactive/overlays/library-model.ts +114 -35
- package/src/interactive/overlays/library.ts +52 -5
- package/src/interactive/overlays/list-overlay.ts +4 -1
- package/src/interactive/overlays/session-selector.ts +28 -23
- package/src/interactive/overlays/settings.ts +20 -1
- package/src/interactive/overlays/tree-selector.ts +47 -10
- package/src/interactive/panes-runtime.ts +1 -1
- package/src/interactive/renderers/compaction-summary.ts +1 -1
- package/src/interactive/renderers/provider-error.ts +118 -0
- package/src/interactive/renderers/retry-status.ts +59 -23
- package/src/interactive/renderers/tool-execution.ts +67 -7
- package/src/interactive/renderers/worker-answer.ts +198 -0
- package/src/interactive/renderers/worker-entry.ts +57 -163
- package/src/interactive/slash-commands.ts +26 -1
- package/src/interactive/slash-spec.ts +2 -2
- package/src/interactive/theme/labels.ts +66 -30
- package/src/interactive/turn-persistence.ts +6 -1
- package/src/interactive/turn-recovery.ts +2 -1
- package/src/interactive/turn-runtime.ts +22 -5
- package/src/interactive/view/artifacts.ts +3 -2
- package/src/interactive/view/view-overlay.ts +96 -20
- package/src/tools/agent-tools.ts +21 -7
- package/src/tools/artifact.ts +16 -8
- package/src/tools/bash.ts +90 -11
- package/src/tools/bootstrap.ts +42 -4
- package/src/tools/builtin-tool-catalog.ts +72 -7
- package/src/tools/context/index.ts +27 -31
- package/src/tools/context/library.ts +3 -1
- package/src/tools/context/surface.ts +12 -26
- package/src/tools/core-bootstrap.ts +72 -1
- package/src/tools/data/csv.ts +1189 -0
- package/src/tools/data/index.ts +308 -0
- package/src/tools/data/json.ts +1799 -0
- package/src/tools/data/jsonl.ts +561 -0
- package/src/tools/data/shared.ts +452 -0
- package/src/tools/edit-diff.ts +0 -7
- package/src/tools/edit.ts +115 -18
- package/src/tools/file-mutation-queue.ts +114 -4
- package/src/tools/find.ts +108 -29
- package/src/tools/gateway/caps.ts +11 -0
- package/src/tools/gateway/clio-context-surface.ts +41 -0
- package/src/tools/gateway/clio-context-tools.ts +77 -0
- package/src/tools/gateway/data-surface.ts +138 -0
- package/src/tools/gateway/data-tool.ts +201 -0
- package/src/tools/gateway/index.ts +342 -0
- package/src/tools/gateway/mcp-capabilities.ts +469 -0
- package/src/tools/grep.ts +88 -33
- package/src/tools/harness-extensions.ts +3 -0
- package/src/tools/ignore-policy.ts +7 -5
- package/src/tools/ls.ts +111 -20
- package/src/tools/policy.ts +35 -13
- package/src/tools/presentation.ts +6 -0
- package/src/tools/read.ts +634 -156
- package/src/tools/registry.ts +94 -6
- package/src/tools/run-script.ts +997 -0
- package/src/tools/spawn-hygiene.ts +157 -5
- package/src/tools/surface.ts +163 -0
- package/src/tools/verify/authoring.ts +8 -3
- package/src/tools/verify/catalog.ts +14 -1
- package/src/tools/verify/numeric.ts +367 -59
- package/src/tools/verify/perf.ts +171 -9
- package/src/tools/verify/scripts.ts +178 -26
- package/src/tools/web-fetch-surface.ts +22 -0
- package/src/tools/web-fetch.ts +26 -1
- package/src/tools/write.ts +45 -19
- package/dist/chunk-B6UM3OZC.js +0 -15
- package/dist/chunk-GJ24ODAX.js +0 -196
- package/dist/chunk-LZCCBLRC.js +0 -57
- package/dist/web/client/assets/architecture-7GRP2DOG-EGozsYEO.js +0 -1
- package/dist/web/client/assets/architectureDiagram-5GKGNRK7-z9FokbJl.js +0 -36
- package/dist/web/client/assets/channel-CiUWbHN9.js +0 -1
- package/dist/web/client/assets/chunk-DU6HZSFF-C5USiOAy.js +0 -125
- package/dist/web/client/assets/classDiagram-ZZMXUADV-CMODalmo.js +0 -1
- package/dist/web/client/assets/classDiagram-v2-VYDZK3BY-CMODalmo.js +0 -1
- package/dist/web/client/assets/cose-bilkent-JH36ORCC-RbQL23qS.js +0 -1
- package/dist/web/client/assets/dist-D0_q-A2b.js +0 -1
- package/dist/web/client/assets/eventmodeling-NTZA5JFV-DjVq8wKU.js +0 -1
- package/dist/web/client/assets/flowDiagram-HODETNUW-BUiCBGXt.js +0 -1
- package/dist/web/client/assets/ganttDiagram-EL5Y4UJY-B2lb8lvF.js +0 -292
- package/dist/web/client/assets/index-FSIC94pi.js +0 -83
- package/dist/web/client/assets/prism-core-BngLtbUd.js +0 -1
- package/dist/web/client/assets/railroad-abnf-HS5TGJTU-BcW01NZG.js +0 -1
- package/dist/web/client/assets/railroad-ebnf-LZEXJU2U-B7YCEDDd.js +0 -1
- package/dist/web/client/assets/railroad-peg-WCYAUIDC-DjNZbSTZ.js +0 -1
- package/dist/web/client/assets/src-yeptRXpt.js +0 -1
- package/dist/web/client/assets/stateDiagram-v2-MP3YSRHH-C7QtHeK4.js +0 -1
- package/dist/web/client/assets/swimlanesDiagram-VR7AAH4N-CBZlPFky.js +0 -8
|
@@ -1,29 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
export function
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const joined = kept.join("-");
|
|
24
|
-
leaf = joined.length > maxLeaf ? joined.slice(0, maxLeaf) : joined;
|
|
1
|
+
import { sanitizeCallTargetText } from "../../domains/safety/call-target.js";
|
|
2
|
+
import { stripTerminalSequences, truncateToWidth, visibleWidth } from "../../engine/tui.js";
|
|
3
|
+
|
|
4
|
+
const identitySegments = new Intl.Segmenter(undefined, { granularity: "grapheme" });
|
|
5
|
+
|
|
6
|
+
/** Keep both placement and the distinguishing suffix when an identity must fit. */
|
|
7
|
+
export function fitIdentityLabel(value: string, width: number): string {
|
|
8
|
+
value = sanitizeCallTargetText(value);
|
|
9
|
+
const room = Math.max(0, Math.floor(width));
|
|
10
|
+
if (visibleWidth(value) <= room) return value;
|
|
11
|
+
if (room <= 1) return room === 1 ? "…" : "";
|
|
12
|
+
const tailBudget = Math.ceil((room - 1) / 2);
|
|
13
|
+
let tail = "";
|
|
14
|
+
for (const { segment } of [...identitySegments.segment(value)].reverse()) {
|
|
15
|
+
if (visibleWidth(segment + tail) > tailBudget) break;
|
|
16
|
+
tail = segment + tail;
|
|
17
|
+
}
|
|
18
|
+
const headBudget = room - 1 - visibleWidth(tail);
|
|
19
|
+
let head = "";
|
|
20
|
+
for (const { segment } of identitySegments.segment(value)) {
|
|
21
|
+
if (visibleWidth(head + segment) > headBudget) break;
|
|
22
|
+
head += segment;
|
|
25
23
|
}
|
|
26
|
-
return
|
|
24
|
+
return `${head}…${tail}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Compact wire identity with explicit omission and its version/quantization suffix. */
|
|
28
|
+
export function abbreviateModelId(modelId: string | null | undefined): string {
|
|
29
|
+
const value = sanitizeCallTargetText(modelId ?? "");
|
|
30
|
+
if (value.length === 0) return "model";
|
|
31
|
+
if (visibleWidth(value) <= 24) return value;
|
|
32
|
+
const slash = value.lastIndexOf("/");
|
|
33
|
+
if (slash < 0) return fitIdentityLabel(value, 24);
|
|
34
|
+
const placement = value.slice(0, slash);
|
|
35
|
+
const model = value.slice(slash + 1);
|
|
36
|
+
const modelBudget = Math.min(18, visibleWidth(model));
|
|
37
|
+
return `${fitIdentityPrefix(placement, 23 - modelBudget)}/${fitIdentityLabel(model, modelBudget)}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Raw route fields stay separate until the surface knows its terminal-cell budget. */
|
|
41
|
+
export interface TargetIdentity {
|
|
42
|
+
targetId: string | null | undefined;
|
|
43
|
+
modelId: string | null | undefined;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function fitIdentityPrefix(value: string, width: number): string {
|
|
47
|
+
return stripTerminalSequences(truncateToWidth(value, Math.max(0, width), "…", false));
|
|
27
48
|
}
|
|
28
49
|
|
|
29
50
|
export interface TargetLabelOptions {
|
|
@@ -31,6 +52,8 @@ export interface TargetLabelOptions {
|
|
|
31
52
|
separator?: string;
|
|
32
53
|
/** Off for surfaces with room for the whole wire id. */
|
|
33
54
|
abbreviate?: boolean;
|
|
55
|
+
/** Fit raw target/model fields once, preserving family and suffix before placement. */
|
|
56
|
+
width?: number;
|
|
34
57
|
}
|
|
35
58
|
|
|
36
59
|
/**
|
|
@@ -53,12 +76,25 @@ export function formatTargetLabel(
|
|
|
53
76
|
modelId: string | null | undefined,
|
|
54
77
|
options: TargetLabelOptions = {},
|
|
55
78
|
): string {
|
|
56
|
-
const target = (targetId ?? "")
|
|
57
|
-
const model = (modelId ?? "")
|
|
58
|
-
|
|
79
|
+
const target = sanitizeCallTargetText(targetId ?? "");
|
|
80
|
+
const model = sanitizeCallTargetText(modelId ?? "");
|
|
81
|
+
const fit = (label: string): string => (options.width === undefined ? label : fitIdentityLabel(label, options.width));
|
|
82
|
+
if (target.length === 0 && model.length === 0) return fit("not configured");
|
|
83
|
+
if (options.width !== undefined && target.length > 0 && model.length > 0) {
|
|
84
|
+
const width = Math.max(0, Math.floor(options.width));
|
|
85
|
+
const separator = options.separator ?? " · ";
|
|
86
|
+
const full = `${target}${separator}${model}`;
|
|
87
|
+
if (visibleWidth(full) <= width) return full;
|
|
88
|
+
const leaf = model.slice(model.lastIndexOf("/") + 1);
|
|
89
|
+
const available = width - visibleWidth(separator);
|
|
90
|
+
if (available < 9) return fitIdentityLabel(leaf, width);
|
|
91
|
+
const modelBudget = Math.min(visibleWidth(leaf), Math.max(8, Math.ceil(available * 0.7)));
|
|
92
|
+
const targetBudget = Math.min(visibleWidth(target), available - modelBudget);
|
|
93
|
+
return `${fitIdentityPrefix(target, targetBudget)}${separator}${fitIdentityLabel(leaf, available - targetBudget)}`;
|
|
94
|
+
}
|
|
59
95
|
const shown = options.abbreviate === false ? model : abbreviateModelId(model);
|
|
60
|
-
if (target.length === 0) return `no target · ${shown}
|
|
61
|
-
if (model.length === 0) return `${target} · no model
|
|
96
|
+
if (target.length === 0) return fit(`no target · ${shown}`);
|
|
97
|
+
if (model.length === 0) return fit(`${target} · no model`);
|
|
62
98
|
return `${target}${options.separator ?? " · "}${shown}`;
|
|
63
99
|
}
|
|
64
100
|
|
|
@@ -78,6 +78,9 @@ export interface TurnPersistence {
|
|
|
78
78
|
* (reminder block, skill preamble, handoff, then the operator's words);
|
|
79
79
|
* `operatorText`, when it differs, is what the operator actually typed and
|
|
80
80
|
* is what a transcript replay renders under the operator marker.
|
|
81
|
+
* `displayText` is the literal editor input when an expansion (a prompt
|
|
82
|
+
* template or command) replaced it; the session picker and replay show it,
|
|
83
|
+
* while compaction keeps reasserting the expanded `operatorText`.
|
|
81
84
|
*/
|
|
82
85
|
appendSubmittedUserTurn(
|
|
83
86
|
agentRuntime: AgentRuntime,
|
|
@@ -85,6 +88,7 @@ export interface TurnPersistence {
|
|
|
85
88
|
images: ReadonlyArray<unknown> | undefined,
|
|
86
89
|
synthetic: boolean,
|
|
87
90
|
operatorText?: string,
|
|
91
|
+
displayText?: string,
|
|
88
92
|
): string | null;
|
|
89
93
|
appendRetryStatus(status: RetryStatusPayload): void;
|
|
90
94
|
appendModelChangeEntry(target: ChatLoopTarget): void;
|
|
@@ -404,7 +408,7 @@ export function createTurnPersistence(deps: TurnPersistenceDeps): TurnPersistenc
|
|
|
404
408
|
finishTracedTurn("success", null);
|
|
405
409
|
},
|
|
406
410
|
|
|
407
|
-
appendSubmittedUserTurn(agentRuntime, text, images, synthetic, operatorText): string | null {
|
|
411
|
+
appendSubmittedUserTurn(agentRuntime, text, images, synthetic, operatorText, displayText): string | null {
|
|
408
412
|
if (!deps.session) return null;
|
|
409
413
|
if (!deps.session.current()) {
|
|
410
414
|
deps.session.create({
|
|
@@ -415,6 +419,7 @@ export function createTurnPersistence(deps: TurnPersistenceDeps): TurnPersistenc
|
|
|
415
419
|
}
|
|
416
420
|
const payload: Record<string, unknown> = images ? { content: [{ type: "text", text }, ...images] } : { text };
|
|
417
421
|
if (operatorText !== undefined && operatorText !== text) payload.operatorText = operatorText;
|
|
422
|
+
if (displayText !== undefined && displayText !== (operatorText ?? text)) payload.displayText = displayText;
|
|
418
423
|
if (synthetic) {
|
|
419
424
|
payload.synthetic = true;
|
|
420
425
|
payload.source = "middleware_request_continuation";
|
|
@@ -275,7 +275,8 @@ export function createTurnRecovery(deps: TurnRecoveryDeps): TurnRecovery {
|
|
|
275
275
|
maxAttempts: settings.maxRetries,
|
|
276
276
|
errorMessage: message,
|
|
277
277
|
});
|
|
278
|
-
|
|
278
|
+
// The exhausted status already exposes this failure and retains its full
|
|
279
|
+
// diagnostic. A second raw notice bypasses bounded error presentation.
|
|
279
280
|
pruneFailedAssistantFromContext(agentRuntime.agent);
|
|
280
281
|
return true;
|
|
281
282
|
}
|
|
@@ -571,20 +571,30 @@ export function createTurnRuntime(deps: TurnRuntimeDeps): TurnRuntime {
|
|
|
571
571
|
stallTimer = setTimeout(
|
|
572
572
|
() => {
|
|
573
573
|
stallTimer = null;
|
|
574
|
-
const
|
|
574
|
+
const retry = deps.retrySettings();
|
|
575
575
|
// Zero disables the escalation; an operator who wants a stream to
|
|
576
576
|
// hang forever keeps that by setting `retry.streamStallMs: 0`.
|
|
577
|
-
if (
|
|
577
|
+
if (retry.streamStallMs <= 0) return;
|
|
578
578
|
if (stallSuspendDepth > 0 || toolsInFlight > 0) {
|
|
579
|
-
armStallTimer(
|
|
579
|
+
armStallTimer(retry.streamStallMs);
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
// Silence before a call's first delta is not silence mid-stream. A
|
|
583
|
+
// local server that slept reloads the model and prefills cold before
|
|
584
|
+
// it can emit anything, which is minutes of healthy quiet; a stream
|
|
585
|
+
// that already produced output and stops is a wedged slot.
|
|
586
|
+
const awaitingFirstToken = apiCallStartedAt !== null && apiCallFirstDeltaAt === null;
|
|
587
|
+
if (awaitingFirstToken && retry.firstTokenStallMs <= 0) {
|
|
588
|
+
armStallTimer(retry.streamStallMs);
|
|
580
589
|
return;
|
|
581
590
|
}
|
|
591
|
+
const stallMs = awaitingFirstToken ? Math.max(retry.firstTokenStallMs, retry.streamStallMs) : retry.streamStallMs;
|
|
582
592
|
const idleMs = performance.now() - lastActivityAt;
|
|
583
593
|
if (idleMs < stallMs) {
|
|
584
594
|
armStallTimer(stallMs - idleMs);
|
|
585
595
|
return;
|
|
586
596
|
}
|
|
587
|
-
state.streamStallReason = `stream stalled: no output from ${localRuntime.targetId} for ${Math.round(idleMs / 1000)}s, aborting (stream timeout)`;
|
|
597
|
+
state.streamStallReason = `stream stalled: no ${awaitingFirstToken ? "first token" : "output"} from ${localRuntime.targetId} for ${Math.round(idleMs / 1000)}s, aborting (stream timeout)`;
|
|
588
598
|
localRuntime.agent.abort();
|
|
589
599
|
},
|
|
590
600
|
Math.max(1, delayMs),
|
|
@@ -767,7 +777,14 @@ export function createTurnRuntime(deps: TurnRuntimeDeps): TurnRuntime {
|
|
|
767
777
|
typeof assistantEvent.delta === "string" &&
|
|
768
778
|
assistantEvent.delta.length > 0);
|
|
769
779
|
if (hasDelta && firstAssistantDeltaAt === null) firstAssistantDeltaAt = eventClock;
|
|
770
|
-
if (hasDelta && apiCallFirstDeltaAt === null)
|
|
780
|
+
if (hasDelta && apiCallFirstDeltaAt === null) {
|
|
781
|
+
apiCallFirstDeltaAt = eventClock;
|
|
782
|
+
// The timer may be armed for the longer first-token window; the
|
|
783
|
+
// stream is live now, so the mid-stream window applies from here.
|
|
784
|
+
const stallMs = deps.retrySettings().streamStallMs;
|
|
785
|
+
clearStallTimer();
|
|
786
|
+
if (stallMs > 0) armStallTimer(stallMs);
|
|
787
|
+
}
|
|
771
788
|
}
|
|
772
789
|
if (enrichedEvent.type === "agent_end") {
|
|
773
790
|
context.noteRunCacheSummary(enrichedEvent.messages, runFirstCallVerdict);
|
|
@@ -1125,11 +1125,12 @@ export class WorkspaceArtifactProvider implements ArtifactProvider {
|
|
|
1125
1125
|
{
|
|
1126
1126
|
id: `workspace:${path}`,
|
|
1127
1127
|
category: this.category,
|
|
1128
|
-
title: safeTitle(`${
|
|
1128
|
+
title: safeTitle(`${basename(path)} · ${relative(workspace, path)} · ${artifact.tool}${kind}`, basename(path)),
|
|
1129
1129
|
timestamp: parseTime(artifact.timestamp),
|
|
1130
1130
|
sizeBytes: maybeSizeBytes(path),
|
|
1131
1131
|
path,
|
|
1132
|
-
description: `${artifact.tool}${kind} · ${overwriteLabel}`,
|
|
1132
|
+
description: `${artifact.tool}${kind} · ${overwriteLabel} · Workspace: ${workspace} · Turn: ${artifact.turnId}`,
|
|
1133
|
+
...(this.deps.sessionMeta ? { sessionId: this.deps.sessionMeta.id } : {}),
|
|
1133
1134
|
toolName: artifact.tool,
|
|
1134
1135
|
searchText: [
|
|
1135
1136
|
artifact.path,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { sanitizeCallTargetText } from "../../domains/safety/call-target.js";
|
|
1
2
|
import {
|
|
2
3
|
type Component,
|
|
3
|
-
fuzzyFilter,
|
|
4
4
|
Input,
|
|
5
5
|
Markdown,
|
|
6
6
|
matchesKey,
|
|
@@ -168,10 +168,6 @@ function isNonEmptySearchValue(value: string | undefined): value is string {
|
|
|
168
168
|
return typeof value === "string" && value.trim().length > 0;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
function broadFilterText(artifact: ViewArtifact): string {
|
|
172
|
-
return `${artifact.id} ${artifact.category} ${artifact.title}`;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
171
|
function artifactSearchValues(artifact: ViewArtifact): string[] {
|
|
176
172
|
return [
|
|
177
173
|
artifact.id,
|
|
@@ -188,8 +184,12 @@ function artifactSearchValues(artifact: ViewArtifact): string[] {
|
|
|
188
184
|
].filter(isNonEmptySearchValue);
|
|
189
185
|
}
|
|
190
186
|
|
|
191
|
-
function
|
|
192
|
-
|
|
187
|
+
function matchesFilterText(artifact: ViewArtifact, query: string): boolean {
|
|
188
|
+
const values = artifactSearchValues(artifact).map((value) => value.toLocaleLowerCase());
|
|
189
|
+
return query
|
|
190
|
+
.toLocaleLowerCase()
|
|
191
|
+
.split(/\s+/u)
|
|
192
|
+
.every((token) => values.some((value) => value.includes(token)));
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
function matchesExactArtifactValue(artifact: ViewArtifact, value: string): boolean {
|
|
@@ -225,10 +225,10 @@ function filterViewArtifacts(artifacts: ReadonlyArray<ViewArtifact>, query: stri
|
|
|
225
225
|
if (parsed.kind === "category") {
|
|
226
226
|
const categoryArtifacts = artifacts.filter((artifact) => artifact.category === parsed.category);
|
|
227
227
|
if (parsed.value.length === 0) return categoryArtifacts;
|
|
228
|
-
return
|
|
228
|
+
return categoryArtifacts.filter((artifact) => matchesFilterText(artifact, parsed.value));
|
|
229
229
|
}
|
|
230
230
|
if (parsed.text.length === 0) return [...artifacts];
|
|
231
|
-
return
|
|
231
|
+
return artifacts.filter((artifact) => matchesFilterText(artifact, parsed.text));
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
function artifactsInCategoryOrder(artifacts: ReadonlyArray<ViewArtifact>): ViewArtifact[] {
|
|
@@ -418,6 +418,7 @@ function viewFooterHint(focus: ViewPaneFocus, canVerify: boolean, innerWidth?: n
|
|
|
418
418
|
{ key: "PgUp/PgDn", verb: "page" },
|
|
419
419
|
{ key: "g/G", verb: "top/bottom" },
|
|
420
420
|
...(canVerify ? [{ key: "v", verb: "verify" }] : []),
|
|
421
|
+
{ key: "i", verb: "info" },
|
|
421
422
|
{ key: "o", verb: "path" },
|
|
422
423
|
],
|
|
423
424
|
"back",
|
|
@@ -446,31 +447,44 @@ export class ViewOverlayView implements Component {
|
|
|
446
447
|
private artifactError: string | null = null;
|
|
447
448
|
private content: LoadedContent | null = null;
|
|
448
449
|
private loadToken = 0;
|
|
450
|
+
private refreshToken = 0;
|
|
451
|
+
private showProvenance = false;
|
|
449
452
|
private lastContentWidth = 80;
|
|
450
453
|
private lastContentBodyHeight = 1;
|
|
451
454
|
private readonly verifications = new Map<string, ViewVerificationState>();
|
|
452
455
|
|
|
453
456
|
constructor(private readonly options: ViewOverlayOptions) {
|
|
454
457
|
this.filterText = options.initialFilter ?? "";
|
|
455
|
-
this.filterInput.
|
|
458
|
+
this.filterInput.handleInput(`\x1b[200~${this.filterText}\x1b[201~`);
|
|
456
459
|
}
|
|
457
460
|
|
|
458
461
|
refresh(): void {
|
|
462
|
+
const refreshToken = ++this.refreshToken;
|
|
463
|
+
const selected = this.selectedArtifact();
|
|
464
|
+
this.loadToken += 1;
|
|
459
465
|
this.loadingArtifacts = true;
|
|
460
466
|
this.artifactError = null;
|
|
461
467
|
this.options.requestRender?.();
|
|
462
468
|
void (async () => {
|
|
463
469
|
try {
|
|
464
|
-
|
|
465
|
-
|
|
470
|
+
const artifacts = await listViewArtifacts(this.options.providers);
|
|
471
|
+
if (refreshToken !== this.refreshToken) return;
|
|
472
|
+
this.artifacts = artifacts;
|
|
473
|
+
const retainedIndex = selected
|
|
474
|
+
? this.filteredArtifacts().findIndex((artifact) => artifactKey(artifact) === artifactKey(selected))
|
|
475
|
+
: -1;
|
|
476
|
+
this.selectedIndex = retainedIndex >= 0 ? retainedIndex : initialViewSelection(this.artifacts, this.filterText);
|
|
466
477
|
this.contentScrollOffset = 0;
|
|
467
478
|
this.content = null;
|
|
468
479
|
} catch (err) {
|
|
480
|
+
if (refreshToken !== this.refreshToken) return;
|
|
469
481
|
this.artifactError = err instanceof Error ? err.message : String(err);
|
|
470
482
|
this.artifacts = [];
|
|
471
483
|
} finally {
|
|
472
|
-
this.
|
|
473
|
-
|
|
484
|
+
if (refreshToken === this.refreshToken) {
|
|
485
|
+
this.loadingArtifacts = false;
|
|
486
|
+
this.options.requestRender?.();
|
|
487
|
+
}
|
|
474
488
|
}
|
|
475
489
|
})();
|
|
476
490
|
}
|
|
@@ -490,6 +504,8 @@ export class ViewOverlayView implements Component {
|
|
|
490
504
|
}
|
|
491
505
|
|
|
492
506
|
private selectIndex(next: number): void {
|
|
507
|
+
this.loadToken += 1;
|
|
508
|
+
this.showProvenance = false;
|
|
493
509
|
const filtered = this.filteredArtifacts();
|
|
494
510
|
if (filtered.length === 0) {
|
|
495
511
|
this.selectedIndex = 0;
|
|
@@ -513,14 +529,17 @@ export class ViewOverlayView implements Component {
|
|
|
513
529
|
}
|
|
514
530
|
|
|
515
531
|
private ensureContentLoaded(artifact: ViewArtifact | undefined): void {
|
|
516
|
-
if (!artifact)
|
|
532
|
+
if (!artifact) {
|
|
533
|
+
this.content = null;
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
517
536
|
const key = artifactKey(artifact);
|
|
518
537
|
if (this.content?.key === key) return;
|
|
519
538
|
const token = ++this.loadToken;
|
|
520
539
|
this.content = { key, status: "loading", lines: [clioTheme().fg("dim", "loading artifact…")], format: "text" };
|
|
521
540
|
void (async () => {
|
|
522
541
|
try {
|
|
523
|
-
const loaded = await artifact.load();
|
|
542
|
+
const loaded = await Promise.resolve().then(() => artifact.load());
|
|
524
543
|
if (token !== this.loadToken) return;
|
|
525
544
|
this.content = { key, status: "loaded", lines: loaded.lines, format: loaded.format };
|
|
526
545
|
} catch (err) {
|
|
@@ -540,6 +559,20 @@ export class ViewOverlayView implements Component {
|
|
|
540
559
|
}
|
|
541
560
|
|
|
542
561
|
private renderedContentLines(width: number): string[] {
|
|
562
|
+
if (this.showProvenance) {
|
|
563
|
+
const artifact = this.selectedArtifact();
|
|
564
|
+
if (!artifact) return [];
|
|
565
|
+
return [
|
|
566
|
+
`Title: ${artifact.title}`,
|
|
567
|
+
`Category: ${artifact.category}`,
|
|
568
|
+
`ID: ${artifact.id}`,
|
|
569
|
+
`Path: ${artifact.path ?? "No backing path"}`,
|
|
570
|
+
...(artifact.sessionId ? [`Session: ${artifact.sessionId}`] : []),
|
|
571
|
+
...(artifact.runId ? [`Run: ${artifact.runId}`] : []),
|
|
572
|
+
...(artifact.correlationId ? [`Correlation: ${artifact.correlationId}`] : []),
|
|
573
|
+
...(artifact.description ? [`Details: ${artifact.description}`] : []),
|
|
574
|
+
].flatMap((line) => wrapTextWithAnsi(sanitizeCallTargetText(line), Math.max(1, width)));
|
|
575
|
+
}
|
|
543
576
|
const content = this.content;
|
|
544
577
|
if (!content) return [];
|
|
545
578
|
if (content.status === "error") return content.lines.flatMap((line) => wrapTextWithAnsi(line, Math.max(1, width)));
|
|
@@ -572,10 +605,30 @@ export class ViewOverlayView implements Component {
|
|
|
572
605
|
}
|
|
573
606
|
|
|
574
607
|
const filtered = this.filteredArtifacts();
|
|
575
|
-
|
|
608
|
+
lines.push(
|
|
609
|
+
padAnsi(
|
|
610
|
+
theme.fg(
|
|
611
|
+
this.focus === "list" ? "accent" : "dim",
|
|
612
|
+
`List · ${filtered.length}/${this.artifacts.length} · ←→ category`,
|
|
613
|
+
),
|
|
614
|
+
width,
|
|
615
|
+
ELLIPSIS,
|
|
616
|
+
),
|
|
617
|
+
);
|
|
618
|
+
if (filtered.length === 0)
|
|
619
|
+
return this.fixedLines(
|
|
620
|
+
[
|
|
621
|
+
...lines,
|
|
622
|
+
theme.fg("dim", "No matching details."),
|
|
623
|
+
theme.fg("muted", "Ctrl+U clears the filter."),
|
|
624
|
+
theme.fg("dim", "Try workspace: or receipt:"),
|
|
625
|
+
],
|
|
626
|
+
width,
|
|
627
|
+
height,
|
|
628
|
+
);
|
|
576
629
|
const rows = groupedViewRows(filtered);
|
|
577
630
|
const selectedRow = rows.findIndex((row) => row.type === "item" && row.itemIndex === this.selectedIndex);
|
|
578
|
-
const rowHeight = Math.max(1, height -
|
|
631
|
+
const rowHeight = Math.max(1, height - lines.length);
|
|
579
632
|
if (selectedRow >= 0) {
|
|
580
633
|
if (selectedRow < this.listScrollOffset) this.listScrollOffset = selectedRow;
|
|
581
634
|
if (selectedRow >= this.listScrollOffset + rowHeight) this.listScrollOffset = selectedRow - rowHeight + 1;
|
|
@@ -614,7 +667,21 @@ export class ViewOverlayView implements Component {
|
|
|
614
667
|
this.ensureContentLoaded(artifact);
|
|
615
668
|
this.lastContentWidth = width;
|
|
616
669
|
const verification = artifact ? this.verifications.get(artifactKey(artifact)) : undefined;
|
|
617
|
-
const header =
|
|
670
|
+
const header = [
|
|
671
|
+
padAnsi(
|
|
672
|
+
clioTheme().fg(
|
|
673
|
+
this.focus === "content" ? "accent" : "dim",
|
|
674
|
+
this.showProvenance
|
|
675
|
+
? "Provenance · i preview · Esc list"
|
|
676
|
+
: this.focus === "content"
|
|
677
|
+
? "Preview · i info · Esc list"
|
|
678
|
+
: "Preview · Enter/Tab focus",
|
|
679
|
+
),
|
|
680
|
+
width,
|
|
681
|
+
ELLIPSIS,
|
|
682
|
+
),
|
|
683
|
+
...buildArtifactHeaderLines(artifact, verification, width),
|
|
684
|
+
];
|
|
618
685
|
const bodyHeight = Math.max(0, height - header.length);
|
|
619
686
|
this.lastContentBodyHeight = Math.max(1, bodyHeight);
|
|
620
687
|
const body = this.renderedContentLines(width);
|
|
@@ -657,6 +724,7 @@ export class ViewOverlayView implements Component {
|
|
|
657
724
|
matchesKey(data, "shift+tab") ||
|
|
658
725
|
(this.focus === "list" && matchesKey(data, "enter"))
|
|
659
726
|
) {
|
|
727
|
+
if (this.focus === "list" && !this.selectedArtifact()) return;
|
|
660
728
|
this.focus = this.focus === "list" ? "content" : "list";
|
|
661
729
|
this.options.requestRender?.();
|
|
662
730
|
return;
|
|
@@ -669,6 +737,12 @@ export class ViewOverlayView implements Component {
|
|
|
669
737
|
this.selectCategory(1);
|
|
670
738
|
return;
|
|
671
739
|
}
|
|
740
|
+
if (this.focus === "content" && data === "i") {
|
|
741
|
+
this.showProvenance = !this.showProvenance;
|
|
742
|
+
this.contentScrollOffset = 0;
|
|
743
|
+
this.options.requestRender?.();
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
672
746
|
if (this.focus === "content" && data === "v") {
|
|
673
747
|
this.verifySelected();
|
|
674
748
|
return;
|
|
@@ -704,7 +778,9 @@ export class ViewOverlayView implements Component {
|
|
|
704
778
|
return true;
|
|
705
779
|
}
|
|
706
780
|
const previous = this.filterText;
|
|
707
|
-
|
|
781
|
+
if (matchesKey(data, "ctrl+u")) {
|
|
782
|
+
this.filterInput.applyEdit("clear");
|
|
783
|
+
} else this.filterInput.handleInput(data);
|
|
708
784
|
this.filterText = this.filterInput.getValue();
|
|
709
785
|
if (previous !== this.filterText) {
|
|
710
786
|
this.selectInitialFilterMatch();
|
package/src/tools/agent-tools.ts
CHANGED
|
@@ -30,6 +30,7 @@ import type { AgentTool, AgentToolResult, AgentToolUpdateCallback } from "../eng
|
|
|
30
30
|
import { applyToolProfile, type ToolProfileName } from "./profiles.js";
|
|
31
31
|
import type { ToolInvokeOptions, ToolRegistry, ToolResult, ToolSpec } from "./registry.js";
|
|
32
32
|
import { isDispositionedToolResultError, toolResultContextText } from "./result-disposition.js";
|
|
33
|
+
import { toolSpecPlacement, withGatewayForCapabilities } from "./surface.js";
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* Lightweight per-call observability hook. Default no-op so unused
|
|
@@ -308,9 +309,10 @@ function errorMessage(err: unknown): string {
|
|
|
308
309
|
* (`Value.Check` answers identically with and without), so the copy handed
|
|
309
310
|
* to the agent loop drops every `~`-prefixed key. Symbol keys are copied
|
|
310
311
|
* through untouched because pi-ai picks its coercion path by the TypeBox
|
|
311
|
-
* kind symbol on the root schema.
|
|
312
|
+
* kind symbol on the root schema. Exported for the gateway's describe, which
|
|
313
|
+
* hands a capability's schema to the model through a result the same way.
|
|
312
314
|
*/
|
|
313
|
-
function wireParameterSchema<T>(schema: T): T {
|
|
315
|
+
export function wireParameterSchema<T>(schema: T): T {
|
|
314
316
|
if (Array.isArray(schema)) return schema.map((entry) => wireParameterSchema(entry)) as T;
|
|
315
317
|
if (typeof schema !== "object" || schema === null) return schema;
|
|
316
318
|
const source = schema as Record<PropertyKey, unknown>;
|
|
@@ -374,30 +376,41 @@ function toAgentTool(
|
|
|
374
376
|
* 1. tools registered on the supplied registry
|
|
375
377
|
* 2. tools whose id appears in `allowedTools`
|
|
376
378
|
*
|
|
377
|
-
*
|
|
379
|
+
* projected onto the direct surface: a gateway-placed capability on the
|
|
380
|
+
* effective list is reachable through the attached `gateway` tool, never as
|
|
381
|
+
* a schema of its own. When `allowedTools` is undefined, step 2 is skipped.
|
|
378
382
|
*/
|
|
379
383
|
export function resolveAgentTools(input: ResolveAgentToolsInput): AgentTool[] {
|
|
380
384
|
const specs: ToolSpec[] = [];
|
|
381
385
|
for (const name of effectiveToolNames(input)) {
|
|
382
386
|
const spec = input.registry.get(name);
|
|
383
|
-
if (spec) specs.push(spec);
|
|
387
|
+
if (spec && toolSpecPlacement(spec) === "direct") specs.push(spec);
|
|
384
388
|
}
|
|
385
389
|
specs.sort((a, b) => a.name.localeCompare(b.name));
|
|
386
390
|
return specs.map((spec) => toAgentTool(spec, input.registry, input.telemetry, input.invokeOptions));
|
|
387
391
|
}
|
|
388
392
|
|
|
389
393
|
/**
|
|
390
|
-
* The effective
|
|
394
|
+
* The effective capability surface for one run, as names. This is the single
|
|
391
395
|
* narrowing used both to build the executable tool set and to compute the
|
|
392
396
|
* signature the worker attests, so an attested identity can never describe a
|
|
393
397
|
* different surface than the one the agent actually gets.
|
|
398
|
+
*
|
|
399
|
+
* The list names capabilities, whatever their placement: a recipe that admits
|
|
400
|
+
* `git` keeps `git` here, and because `git` sits behind the gateway the list
|
|
401
|
+
* gains `gateway` as well (the same rule dispatch admission applies to the
|
|
402
|
+
* list it approves, so the two signatures agree). `resolveAgentTools` then
|
|
403
|
+
* attaches only the direct-placed names, and the gateway enforces this list
|
|
404
|
+
* on every call it makes on the run's behalf.
|
|
394
405
|
*/
|
|
395
406
|
export function effectiveToolNames(input: Omit<ResolveAgentToolsInput, "telemetry" | "invokeOptions">): ToolName[] {
|
|
396
407
|
const profileContext = {
|
|
397
408
|
...(input.agentId !== undefined ? { agentId: input.agentId } : {}),
|
|
398
409
|
...(input.task !== undefined ? { task: input.task } : {}),
|
|
399
410
|
};
|
|
400
|
-
const
|
|
411
|
+
const gatewayNames = input.registry.listGateway().map((spec) => spec.name);
|
|
412
|
+
const registered = [...input.registry.listRegistered(), ...gatewayNames];
|
|
413
|
+
const toolIds = applyToolProfile(registered, input.toolProfile, profileContext);
|
|
401
414
|
const allowed = input.allowedTools ? new Set<string>(input.allowedTools) : null;
|
|
402
415
|
const includeInteractiveTools = input.includeInteractiveTools !== false;
|
|
403
416
|
const names: ToolName[] = [];
|
|
@@ -408,7 +421,8 @@ export function effectiveToolNames(input: Omit<ResolveAgentToolsInput, "telemetr
|
|
|
408
421
|
if (allowed && !allowed.has(name)) continue;
|
|
409
422
|
names.push(name);
|
|
410
423
|
}
|
|
411
|
-
return names;
|
|
424
|
+
if (input.registry.get(ToolNames.Gateway) === undefined) return names;
|
|
425
|
+
return withGatewayForCapabilities(names);
|
|
412
426
|
}
|
|
413
427
|
|
|
414
428
|
/**
|
package/src/tools/artifact.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
1
|
import path from "node:path";
|
|
3
2
|
import { Type } from "typebox";
|
|
4
3
|
import { artifactDefaultPath, CLIO_ARTIFACT_DIR } from "../core/artifact-paths.js";
|
|
5
4
|
import { ToolNames } from "../core/tool-names.js";
|
|
6
5
|
import { StringEnum } from "../engine/ai.js";
|
|
7
|
-
import { withFileMutationQueue } from "./file-mutation-queue.js";
|
|
6
|
+
import { type AtomicPublishResult, publishFileAtomically, withFileMutationQueue } from "./file-mutation-queue.js";
|
|
8
7
|
import { resolveToCwd } from "./path-utils.js";
|
|
9
8
|
import type { ToolResult, ToolSpec } from "./registry.js";
|
|
10
9
|
|
|
@@ -14,6 +13,12 @@ import type { ToolResult, ToolSpec } from "./registry.js";
|
|
|
14
13
|
* answer, so pi-agent-core skips the follow-up LLM call that would only
|
|
15
14
|
* summarize it.
|
|
16
15
|
*
|
|
16
|
+
* Placement: gateway. The terminal contract survives the indirection because
|
|
17
|
+
* the gateway propagates `terminate`, `details.kind`, and `details.paths`
|
|
18
|
+
* from this result unchanged, so the turn still ends and `/view` still lists
|
|
19
|
+
* the document. The write is an atomic publish (temp file, fsync, rename) so
|
|
20
|
+
* a failed write never leaves a half-written artifact behind.
|
|
21
|
+
*
|
|
17
22
|
* A pathless call lands under `.clio-coder/artifacts/`, not in the repo working
|
|
18
23
|
* tree. A turn nobody asked for a file from used to drop REPORT.md into the
|
|
19
24
|
* project root, which the operator then had to notice and delete; the working
|
|
@@ -58,11 +63,9 @@ async function writeTerminalArtifact(
|
|
|
58
63
|
}
|
|
59
64
|
const title = typeof args.title === "string" ? args.title.trim() : "";
|
|
60
65
|
const body = title.length > 0 && !content.trimStart().startsWith("#") ? `# ${title}\n\n${content}` : content;
|
|
66
|
+
let published: AtomicPublishResult;
|
|
61
67
|
try {
|
|
62
|
-
await withFileMutationQueue(target,
|
|
63
|
-
mkdirSync(path.dirname(target), { recursive: true });
|
|
64
|
-
writeFileSync(target, body, "utf8");
|
|
65
|
-
});
|
|
68
|
+
published = await withFileMutationQueue(target, () => publishFileAtomically(target, body));
|
|
66
69
|
} catch (err) {
|
|
67
70
|
return { kind: "error", message: `artifact: ${err instanceof Error ? err.message : String(err)}` };
|
|
68
71
|
}
|
|
@@ -70,10 +73,15 @@ async function writeTerminalArtifact(
|
|
|
70
73
|
const bytes = Buffer.byteLength(body, "utf8");
|
|
71
74
|
return {
|
|
72
75
|
kind: "ok",
|
|
73
|
-
output: `wrote ${kind} artifact (${bytes}B) to ${rel}`,
|
|
76
|
+
output: `wrote ${kind} artifact (${bytes}B) to ${rel}${published.durabilityWarning ? `\n${published.durabilityWarning}` : ""}`,
|
|
74
77
|
// shownBytes is the artifact's real size; the ledger otherwise measures
|
|
75
78
|
// this confirmation sentence (a 4753B plan rendered as "60B", #76).
|
|
76
|
-
details: {
|
|
79
|
+
details: {
|
|
80
|
+
kind,
|
|
81
|
+
paths: [target],
|
|
82
|
+
observation: { shownBytes: bytes },
|
|
83
|
+
file: { before: published.before, after: published.after },
|
|
84
|
+
},
|
|
77
85
|
// Writing the artifact is the whole turn; terminate skips the follow-up
|
|
78
86
|
// LLM call that would only restate what was just written.
|
|
79
87
|
terminate: true,
|