@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,4 +1,16 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_KEEP_RECENT_TOKENS,
|
|
4
|
+
DEFAULT_RESERVE_TOKENS,
|
|
5
|
+
buildEvictionFields,
|
|
6
|
+
calculateContextTokens,
|
|
7
|
+
estimateTokens,
|
|
8
|
+
findCutPoint,
|
|
9
|
+
getLastAssistantUsage,
|
|
10
|
+
planEviction,
|
|
11
|
+
projectWorkingSet,
|
|
12
|
+
resolveWorkingSetPolicy
|
|
13
|
+
} from "./chunk-VWFCAK34.js";
|
|
2
14
|
import {
|
|
3
15
|
assistantSessionPayload,
|
|
4
16
|
attachedToolSchemasFromState,
|
|
@@ -33,144 +45,67 @@ import {
|
|
|
33
45
|
toolNamesFromAgentState,
|
|
34
46
|
toolResultSummary,
|
|
35
47
|
toolSignatureFromState
|
|
36
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-BBA2TAWV.js";
|
|
37
49
|
import {
|
|
38
50
|
ShareDomainModule
|
|
39
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-YPQOPFP7.js";
|
|
40
52
|
import {
|
|
41
53
|
bootstrapInputFromInitOptions,
|
|
42
54
|
modelBootstrapGenerate,
|
|
43
55
|
resolveBootstrapRoute
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import {
|
|
46
|
-
DEFAULT_KEEP_RECENT_TOKENS,
|
|
47
|
-
DEFAULT_RESERVE_TOKENS,
|
|
48
|
-
buildEvictionFields,
|
|
49
|
-
calculateContextTokens,
|
|
50
|
-
estimateTokens,
|
|
51
|
-
findCutPoint,
|
|
52
|
-
getLastAssistantUsage,
|
|
53
|
-
planEviction,
|
|
54
|
-
projectWorkingSet,
|
|
55
|
-
resolveWorkingSetPolicy
|
|
56
|
-
} from "./chunk-GEYX2NZ5.js";
|
|
56
|
+
} from "./chunk-H7TXJR23.js";
|
|
57
57
|
import {
|
|
58
58
|
SchedulingDomainModule,
|
|
59
59
|
createPromptsDomainModule,
|
|
60
60
|
renderAgentCatalogSectionsFromSpecs
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-NYDG4QP4.js";
|
|
62
62
|
import {
|
|
63
63
|
PROMPT_MANIFEST_VERSION,
|
|
64
64
|
appendPromptCompileRecord,
|
|
65
65
|
getPromptManifestFilePath,
|
|
66
66
|
readPromptCompileManifest,
|
|
67
67
|
readPromptCompileRecords
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-SJETVJHX.js";
|
|
69
69
|
import {
|
|
70
70
|
recordFailedCompactionCalls
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import {
|
|
73
|
-
OperatorExtensionRuntime
|
|
74
|
-
} from "./chunk-O3HSB2YL.js";
|
|
75
|
-
import {
|
|
76
|
-
flushRawStdout,
|
|
77
|
-
writeRawStdout
|
|
78
|
-
} from "./chunk-7WLRF2U5.js";
|
|
71
|
+
} from "./chunk-3U4BL2EV.js";
|
|
79
72
|
import {
|
|
80
73
|
capturedHookSourcesFor
|
|
81
74
|
} from "./chunk-IFDRAD6F.js";
|
|
82
|
-
import {
|
|
83
|
-
ExtensionsDomainModule
|
|
84
|
-
} from "./chunk-ZST3FRCV.js";
|
|
85
|
-
import {
|
|
86
|
-
EXTENSION_SNAPSHOT_DIAGNOSTIC_MESSAGE_CAP
|
|
87
|
-
} from "./chunk-MZKYVIWW.js";
|
|
88
75
|
import {
|
|
89
76
|
LifecycleDomainModule,
|
|
90
77
|
describeUpgradeNotice
|
|
91
|
-
} from "./chunk-
|
|
92
|
-
import "./chunk-
|
|
93
|
-
import "./chunk-
|
|
78
|
+
} from "./chunk-RDKX2PME.js";
|
|
79
|
+
import "./chunk-LWJYOHT3.js";
|
|
80
|
+
import "./chunk-XRECG65F.js";
|
|
94
81
|
import {
|
|
95
82
|
ConfigDomainModule,
|
|
96
83
|
createConfigDomainModule,
|
|
97
84
|
loadDomains
|
|
98
|
-
} from "./chunk-
|
|
99
|
-
import
|
|
100
|
-
|
|
101
|
-
recallErrorMessage,
|
|
102
|
-
recallParentTurnId,
|
|
103
|
-
recallableRefListing,
|
|
104
|
-
resolveRecall
|
|
105
|
-
} from "./chunk-QGIC5SX5.js";
|
|
106
|
-
import {
|
|
107
|
-
compactionCut,
|
|
108
|
-
foldWorkingSet,
|
|
109
|
-
isTurnStart,
|
|
110
|
-
selectVisibleEntries
|
|
111
|
-
} from "./chunk-DBREN25X.js";
|
|
112
|
-
import {
|
|
113
|
-
compileScoutTransition
|
|
114
|
-
} from "./chunk-TEHVMHOK.js";
|
|
115
|
-
import {
|
|
116
|
-
monitorToolSurface
|
|
117
|
-
} from "./chunk-RRZFRIJP.js";
|
|
118
|
-
import {
|
|
119
|
-
ObservabilityDomainModule,
|
|
120
|
-
recordBackgroundMemoryStep
|
|
121
|
-
} from "./chunk-XTLJDC2X.js";
|
|
122
|
-
import {
|
|
123
|
-
appendOutOfTurnUsageRow,
|
|
124
|
-
readAccountabilitySummary
|
|
125
|
-
} from "./chunk-W7KNI3F5.js";
|
|
126
|
-
import {
|
|
127
|
-
steerToolSurface
|
|
128
|
-
} from "./chunk-5HULHKT2.js";
|
|
129
|
-
import {
|
|
130
|
-
panesToolSurface
|
|
131
|
-
} from "./chunk-K5UJD6MM.js";
|
|
132
|
-
import {
|
|
133
|
-
describePanesLeftBehind,
|
|
134
|
-
paneWatchDecision
|
|
135
|
-
} from "./chunk-A46ILRS2.js";
|
|
136
|
-
import {
|
|
137
|
-
BUILTIN_SLASH_COMMANDS,
|
|
138
|
-
COMPLETION_SLOT_NAMES,
|
|
139
|
-
COUNCIL_SYNTHESIS_LABEL,
|
|
140
|
-
SETTINGS_AREA_IDS,
|
|
141
|
-
SLASH_COMMAND_GROUPS,
|
|
142
|
-
commandReference,
|
|
143
|
-
completeArgs,
|
|
144
|
-
createWorkerStream,
|
|
145
|
-
dispatchSlashCommand,
|
|
146
|
-
isWorkerShareNote,
|
|
147
|
-
parseSlashCommand,
|
|
148
|
-
renderArgsSpec,
|
|
149
|
-
workerAskedByModel,
|
|
150
|
-
workerReceiptSummary,
|
|
151
|
-
workerTargetLabel
|
|
152
|
-
} from "./chunk-EPYATQMG.js";
|
|
153
|
-
import {
|
|
154
|
-
resolveExtensionCommands
|
|
155
|
-
} from "./chunk-RFCKPS2V.js";
|
|
156
|
-
import {
|
|
157
|
-
boundSettledText
|
|
158
|
-
} from "./chunk-K3W6BF5C.js";
|
|
159
|
-
import "./chunk-QUIJZSDW.js";
|
|
85
|
+
} from "./chunk-XJZEDCNT.js";
|
|
86
|
+
import "./chunk-BMNVVKEW.js";
|
|
87
|
+
import "./chunk-2DRRZ57Q.js";
|
|
160
88
|
import {
|
|
161
|
-
|
|
162
|
-
|
|
89
|
+
ensureClioState,
|
|
90
|
+
takeUpgradeNotice
|
|
91
|
+
} from "./chunk-EHZRAB4U.js";
|
|
163
92
|
import {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
retryLibraryRefresh
|
|
169
|
-
} from "./chunk-JCVIL6TY.js";
|
|
93
|
+
editTextExternally,
|
|
94
|
+
resolveExternalEditor
|
|
95
|
+
} from "./chunk-R2CT5YDO.js";
|
|
96
|
+
import "./chunk-QJMRYTCX.js";
|
|
170
97
|
import {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
98
|
+
INHERITED_PROJECT_CONTEXT,
|
|
99
|
+
InteropDomainModule,
|
|
100
|
+
applyInteropAdoption,
|
|
101
|
+
applyLibraryImport,
|
|
102
|
+
delegationEntryForKind,
|
|
103
|
+
detectInteropAgents,
|
|
104
|
+
planInteropAdoption,
|
|
105
|
+
planLibraryImport,
|
|
106
|
+
releaseLibraryImport,
|
|
107
|
+
renderProposalEntry
|
|
108
|
+
} from "./chunk-AM6CEP2K.js";
|
|
174
109
|
import {
|
|
175
110
|
CLIO_APP_KEYBINDING_IDS,
|
|
176
111
|
ClioEditor,
|
|
@@ -202,6 +137,7 @@ import {
|
|
|
202
137
|
editorTheme,
|
|
203
138
|
fgSequence,
|
|
204
139
|
fitHintEntries,
|
|
140
|
+
fitIdentityLabel,
|
|
205
141
|
fitUnits,
|
|
206
142
|
focusedComponent,
|
|
207
143
|
formatCompactMs,
|
|
@@ -233,11 +169,220 @@ import {
|
|
|
233
169
|
unguardPastedEditorOperator,
|
|
234
170
|
validateKeybindings,
|
|
235
171
|
writeInputWedgeDump
|
|
236
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-M6YLF66Z.js";
|
|
237
173
|
import {
|
|
238
174
|
getTerminationCoordinator,
|
|
239
175
|
resolveShutdownHookBudgetMs
|
|
240
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-PJI57EC6.js";
|
|
177
|
+
import {
|
|
178
|
+
OperatorExtensionRuntime
|
|
179
|
+
} from "./chunk-JKU34ACI.js";
|
|
180
|
+
import {
|
|
181
|
+
ExtensionsDomainModule
|
|
182
|
+
} from "./chunk-ZST3FRCV.js";
|
|
183
|
+
import {
|
|
184
|
+
EXTENSION_SNAPSHOT_DIAGNOSTIC_MESSAGE_CAP
|
|
185
|
+
} from "./chunk-MZKYVIWW.js";
|
|
186
|
+
import {
|
|
187
|
+
flushRawStdout,
|
|
188
|
+
writeRawStdout
|
|
189
|
+
} from "./chunk-7WLRF2U5.js";
|
|
190
|
+
import "./chunk-OA2GDACN.js";
|
|
191
|
+
import {
|
|
192
|
+
buildRecallFields,
|
|
193
|
+
recallErrorMessage,
|
|
194
|
+
recallParentTurnId,
|
|
195
|
+
recallableRefListing,
|
|
196
|
+
resolveRecall
|
|
197
|
+
} from "./chunk-4DNL43EZ.js";
|
|
198
|
+
import {
|
|
199
|
+
compactionCut,
|
|
200
|
+
foldWorkingSet,
|
|
201
|
+
isTurnStart,
|
|
202
|
+
selectVisibleEntries
|
|
203
|
+
} from "./chunk-IPTPMLA6.js";
|
|
204
|
+
import {
|
|
205
|
+
compileScoutTransition
|
|
206
|
+
} from "./chunk-S34A7BSP.js";
|
|
207
|
+
import {
|
|
208
|
+
monitorToolSurface
|
|
209
|
+
} from "./chunk-TIWPKCVO.js";
|
|
210
|
+
import {
|
|
211
|
+
ObservabilityDomainModule,
|
|
212
|
+
recordBackgroundMemoryStep
|
|
213
|
+
} from "./chunk-2X2R3UTH.js";
|
|
214
|
+
import {
|
|
215
|
+
appendOutOfTurnUsageRow,
|
|
216
|
+
readAccountabilitySummary
|
|
217
|
+
} from "./chunk-3AND2EFU.js";
|
|
218
|
+
import {
|
|
219
|
+
steerToolSurface
|
|
220
|
+
} from "./chunk-37LW32LZ.js";
|
|
221
|
+
import {
|
|
222
|
+
panesToolSurface
|
|
223
|
+
} from "./chunk-NSYGPIVW.js";
|
|
224
|
+
import {
|
|
225
|
+
describePanesLeftBehind,
|
|
226
|
+
paneWatchDecision
|
|
227
|
+
} from "./chunk-L3NBWLSN.js";
|
|
228
|
+
import "./chunk-JU6MAMRJ.js";
|
|
229
|
+
import {
|
|
230
|
+
BUILTIN_SLASH_COMMANDS,
|
|
231
|
+
COMPLETION_SLOT_NAMES,
|
|
232
|
+
COUNCIL_SYNTHESIS_LABEL,
|
|
233
|
+
SETTINGS_AREA_IDS,
|
|
234
|
+
SLASH_COMMAND_GROUPS,
|
|
235
|
+
commandReference,
|
|
236
|
+
completeArgs,
|
|
237
|
+
createWorkerStream,
|
|
238
|
+
dispatchSlashCommand,
|
|
239
|
+
isWorkerShareNote,
|
|
240
|
+
parseSlashCommand,
|
|
241
|
+
renderArgsSpec,
|
|
242
|
+
workerAskedByModel,
|
|
243
|
+
workerReceiptSummary,
|
|
244
|
+
workerTargetLabel
|
|
245
|
+
} from "./chunk-SQAZN2V3.js";
|
|
246
|
+
import {
|
|
247
|
+
AgentsDomainModule
|
|
248
|
+
} from "./chunk-5RTEFNBP.js";
|
|
249
|
+
import {
|
|
250
|
+
resolveExtensionCommands
|
|
251
|
+
} from "./chunk-RFCKPS2V.js";
|
|
252
|
+
import {
|
|
253
|
+
boundSettledText
|
|
254
|
+
} from "./chunk-7JSOSVLP.js";
|
|
255
|
+
import "./chunk-QUIJZSDW.js";
|
|
256
|
+
import "./chunk-Y3JU5RPK.js";
|
|
257
|
+
import {
|
|
258
|
+
CombinedAutocompleteProvider,
|
|
259
|
+
Container,
|
|
260
|
+
Editor,
|
|
261
|
+
Input,
|
|
262
|
+
Markdown,
|
|
263
|
+
ScrollView,
|
|
264
|
+
Text,
|
|
265
|
+
TuiAltScreen,
|
|
266
|
+
VStack,
|
|
267
|
+
decodePrintableKey,
|
|
268
|
+
fuzzyFilter,
|
|
269
|
+
getKeybindings,
|
|
270
|
+
isKeyRelease,
|
|
271
|
+
isKeyRepeat,
|
|
272
|
+
matchesKey,
|
|
273
|
+
q,
|
|
274
|
+
stripTerminalSequences,
|
|
275
|
+
truncateToWidth,
|
|
276
|
+
visibleWidth,
|
|
277
|
+
wrapTextWithAnsi
|
|
278
|
+
} from "./chunk-434LRQ6Z.js";
|
|
279
|
+
import {
|
|
280
|
+
createResourcesDomainModule
|
|
281
|
+
} from "./chunk-MTOZEQHL.js";
|
|
282
|
+
import {
|
|
283
|
+
applyLibraryLifecycle,
|
|
284
|
+
libraryImportOutcome,
|
|
285
|
+
planLibraryLifecycle,
|
|
286
|
+
releaseLibraryLifecycle,
|
|
287
|
+
retryLibraryRefresh
|
|
288
|
+
} from "./chunk-ETF4ROKH.js";
|
|
289
|
+
import {
|
|
290
|
+
inspectLibraryCopy,
|
|
291
|
+
readLibraryInventory
|
|
292
|
+
} from "./chunk-XLLEL3K7.js";
|
|
293
|
+
import "./chunk-WGRDABW7.js";
|
|
294
|
+
import "./chunk-Y3M2T5RO.js";
|
|
295
|
+
import {
|
|
296
|
+
discoverMarketplaceSkills,
|
|
297
|
+
installSkill,
|
|
298
|
+
modelVisibleSkills
|
|
299
|
+
} from "./chunk-7FBCRWVT.js";
|
|
300
|
+
import "./chunk-DNCE23JJ.js";
|
|
301
|
+
import "./chunk-YJCCMYYT.js";
|
|
302
|
+
import "./chunk-QKHZZFKH.js";
|
|
303
|
+
import "./chunk-IALGWTLO.js";
|
|
304
|
+
import {
|
|
305
|
+
createUserTasksStore,
|
|
306
|
+
formatUserTaskHandoff
|
|
307
|
+
} from "./chunk-3TQN67I2.js";
|
|
308
|
+
import {
|
|
309
|
+
formatBootTrace,
|
|
310
|
+
traceBoot
|
|
311
|
+
} from "./chunk-FXFVDPWY.js";
|
|
312
|
+
import {
|
|
313
|
+
source_default
|
|
314
|
+
} from "./chunk-KIVFXGBM.js";
|
|
315
|
+
import "./chunk-G5R53COU.js";
|
|
316
|
+
import "./chunk-GM4TY6VN.js";
|
|
317
|
+
import {
|
|
318
|
+
ToolchainDomainModule
|
|
319
|
+
} from "./chunk-32KJPXAM.js";
|
|
320
|
+
import "./chunk-5GZICIYO.js";
|
|
321
|
+
import {
|
|
322
|
+
INTERACTIVE_LOOP_BLOCK_BUDGET,
|
|
323
|
+
applyEditsToNormalizedContent,
|
|
324
|
+
assertRegisteredBuiltinTools,
|
|
325
|
+
createEngineAgent,
|
|
326
|
+
createLoopGuardRegistration,
|
|
327
|
+
createMcpCapabilitySource,
|
|
328
|
+
createProtectedArtifactsRegistration,
|
|
329
|
+
diffWords,
|
|
330
|
+
generateDiffString,
|
|
331
|
+
lazyTool,
|
|
332
|
+
normalizeToLF,
|
|
333
|
+
patchProviderThinkingPayload,
|
|
334
|
+
patchResponseSchemaPayloadForDialect,
|
|
335
|
+
patchToolChoiceNamedPayload,
|
|
336
|
+
patchToolChoiceNonePayload,
|
|
337
|
+
readOrchTurnToolCallBudget,
|
|
338
|
+
registerCoreTools,
|
|
339
|
+
registerHarnessExtensionTools,
|
|
340
|
+
resolveSessionTools,
|
|
341
|
+
sanitizeLockedSynthesisMessage,
|
|
342
|
+
stripBom
|
|
343
|
+
} from "./chunk-ZF6CV4WZ.js";
|
|
344
|
+
import {
|
|
345
|
+
MIDDLEWARE_HOOK_TEXT_MAX_CHARS,
|
|
346
|
+
MiddlewareDomainModule,
|
|
347
|
+
WATCHDOG_TASK,
|
|
348
|
+
announceMemoryStepEndpoint,
|
|
349
|
+
buildUserHookRegistrations,
|
|
350
|
+
createDetachedDispatchNudgeRegistration,
|
|
351
|
+
createHookReceiptLog,
|
|
352
|
+
createMarketplaceOfferRegistration,
|
|
353
|
+
createMemoryInterventionRegistration,
|
|
354
|
+
createMiddlewareToolChoiceControl,
|
|
355
|
+
createReadOnlyExplorationNudgeRegistration,
|
|
356
|
+
createSkillsReminderRegistration,
|
|
357
|
+
createTaskBoardReminderRegistration,
|
|
358
|
+
createTaskNudgeRegistration,
|
|
359
|
+
createUnbackedWorkerClaimRegistration,
|
|
360
|
+
createWatchdogRegistration,
|
|
361
|
+
formatRegistrationConflict,
|
|
362
|
+
openDetachedBatchViews,
|
|
363
|
+
watchdogBriefing,
|
|
364
|
+
writeMiddlewareDiagnosticToStderr
|
|
365
|
+
} from "./chunk-VPWGADBG.js";
|
|
366
|
+
import "./chunk-W72LLZAV.js";
|
|
367
|
+
import "./chunk-ACCECAH4.js";
|
|
368
|
+
import "./chunk-HBJQQTKM.js";
|
|
369
|
+
import {
|
|
370
|
+
resolveFdBinary
|
|
371
|
+
} from "./chunk-JABWPKFY.js";
|
|
372
|
+
import "./chunk-HCVKSGNZ.js";
|
|
373
|
+
import "./chunk-PNJE7JPS.js";
|
|
374
|
+
import "./chunk-L4RUTLRL.js";
|
|
375
|
+
import "./chunk-PPIFDSBK.js";
|
|
376
|
+
import "./chunk-TCUOGIL2.js";
|
|
377
|
+
import {
|
|
378
|
+
DEFAULT_KILL_GRACE_MS,
|
|
379
|
+
DEFAULT_TEARDOWN_BOUND_MS
|
|
380
|
+
} from "./chunk-PP23PZEV.js";
|
|
381
|
+
import {
|
|
382
|
+
incompleteInstallationAdvice
|
|
383
|
+
} from "./chunk-3A3CUMKA.js";
|
|
384
|
+
import "./chunk-XCUDZQLX.js";
|
|
385
|
+
import "./chunk-K2BLQC5E.js";
|
|
241
386
|
import {
|
|
242
387
|
ACP_AGENT_META_KEY,
|
|
243
388
|
ACP_MAX_CHUNK_BYTES,
|
|
@@ -280,34 +425,23 @@ import {
|
|
|
280
425
|
taskMemoryBankSize,
|
|
281
426
|
taskMemoryHandoffSeedOffer,
|
|
282
427
|
taskMemoryTracePath
|
|
283
|
-
} from "./chunk-
|
|
428
|
+
} from "./chunk-F2YM3JY4.js";
|
|
284
429
|
import "./chunk-PECBKCDK.js";
|
|
285
|
-
import {
|
|
286
|
-
describeWriteBoundaryAttributionDowngrade,
|
|
287
|
-
gitCheckoutRoot,
|
|
288
|
-
isGitRepository,
|
|
289
|
-
preflightWriteBoundaries,
|
|
290
|
-
recoverCleanupReadyCompeteGroups
|
|
291
|
-
} from "./chunk-K53E2PTW.js";
|
|
292
|
-
import {
|
|
293
|
-
bindExecutionPlanEndpoints,
|
|
294
|
-
compileFleetExecutionPlan,
|
|
295
|
-
requireAgentSteps
|
|
296
|
-
} from "./chunk-L75H5B3B.js";
|
|
297
430
|
import {
|
|
298
431
|
readGateDecisionArtifacts,
|
|
299
432
|
readPendingGateDecisions
|
|
300
|
-
} from "./chunk-
|
|
433
|
+
} from "./chunk-NMBEW4PP.js";
|
|
301
434
|
import {
|
|
302
435
|
TRUST_STATUS_AXES,
|
|
303
436
|
formatTrustSummaryLine,
|
|
304
437
|
inspectRunReceiptTrustStatus,
|
|
305
438
|
isReceiptIntegrity,
|
|
439
|
+
retiredIntegrityVersionOf,
|
|
306
440
|
retiredReceiptIntegrity,
|
|
307
441
|
retiredReceiptIntegrityReason,
|
|
308
442
|
trustStateWord,
|
|
309
443
|
verifyReceiptIntegrity
|
|
310
|
-
} from "./chunk-
|
|
444
|
+
} from "./chunk-IALZJE37.js";
|
|
311
445
|
import {
|
|
312
446
|
SessionDomainModule,
|
|
313
447
|
addResponseModelIdObservationCount,
|
|
@@ -320,111 +454,49 @@ import {
|
|
|
320
454
|
readAuditRows,
|
|
321
455
|
responseModelIdObservationCountsLabel,
|
|
322
456
|
responseModelIdObservationFromRecord
|
|
323
|
-
} from "./chunk-
|
|
457
|
+
} from "./chunk-3SUDBGEI.js";
|
|
458
|
+
import "./chunk-LGTVWPRN.js";
|
|
459
|
+
import {
|
|
460
|
+
describeWriteBoundaryAttributionDowngrade,
|
|
461
|
+
gitCheckoutRoot,
|
|
462
|
+
isGitRepository,
|
|
463
|
+
preflightWriteBoundaries,
|
|
464
|
+
recoverCleanupReadyCompeteGroups
|
|
465
|
+
} from "./chunk-KRJQG47M.js";
|
|
466
|
+
import {
|
|
467
|
+
bindExecutionPlanEndpoints,
|
|
468
|
+
compileFleetExecutionPlan,
|
|
469
|
+
requireAgentSteps
|
|
470
|
+
} from "./chunk-DIAJYJYG.js";
|
|
324
471
|
import "./chunk-U44YYLVV.js";
|
|
325
|
-
import
|
|
472
|
+
import {
|
|
473
|
+
foldPromptCacheTelemetry,
|
|
474
|
+
hasPromptCacheTelemetry,
|
|
475
|
+
uncachedPrefillTokens
|
|
476
|
+
} from "./chunk-QH3ZTUOA.js";
|
|
477
|
+
import {
|
|
478
|
+
SafetyDomainModule,
|
|
479
|
+
parseRigorOverride,
|
|
480
|
+
resolveRigor
|
|
481
|
+
} from "./chunk-GREYLTZ5.js";
|
|
482
|
+
import "./chunk-PTFISXQO.js";
|
|
326
483
|
import {
|
|
327
484
|
filterEntriesToActivePath
|
|
328
485
|
} from "./chunk-O5F25NIE.js";
|
|
329
486
|
import {
|
|
330
487
|
configureRunEventJournal
|
|
331
488
|
} from "./chunk-UQIVHSE4.js";
|
|
489
|
+
import "./chunk-LQTKDAUO.js";
|
|
332
490
|
import {
|
|
333
491
|
activeDecisionRefs,
|
|
334
492
|
createDecisionBoardStore,
|
|
335
493
|
decisionRationale,
|
|
336
494
|
foldDecisionBoard
|
|
337
|
-
} from "./chunk-
|
|
338
|
-
import {
|
|
339
|
-
discoverDeclaredChecks
|
|
340
|
-
} from "./chunk-RKFNU5UA.js";
|
|
495
|
+
} from "./chunk-K3XN4LZ4.js";
|
|
341
496
|
import "./chunk-YQ3GFEUY.js";
|
|
342
|
-
import "./chunk-BHJMMCXS.js";
|
|
343
497
|
import "./chunk-WTQGRBHV.js";
|
|
344
498
|
import "./chunk-WWRV5RJI.js";
|
|
345
|
-
import
|
|
346
|
-
emptyWorkspaceSnapshot,
|
|
347
|
-
probeGitStatusAsync,
|
|
348
|
-
probeWorkspaceAsync
|
|
349
|
-
} from "./chunk-DNHVRBH4.js";
|
|
350
|
-
import "./chunk-Y3JU5RPK.js";
|
|
351
|
-
import {
|
|
352
|
-
CombinedAutocompleteProvider,
|
|
353
|
-
Container,
|
|
354
|
-
Editor,
|
|
355
|
-
Input,
|
|
356
|
-
Markdown,
|
|
357
|
-
ScrollView,
|
|
358
|
-
Text,
|
|
359
|
-
TuiAltScreen,
|
|
360
|
-
VStack,
|
|
361
|
-
decodePrintableKey,
|
|
362
|
-
fuzzyFilter,
|
|
363
|
-
getKeybindings,
|
|
364
|
-
isKeyRelease,
|
|
365
|
-
isKeyRepeat,
|
|
366
|
-
matchesKey,
|
|
367
|
-
q,
|
|
368
|
-
stripTerminalSequences,
|
|
369
|
-
truncateToWidth,
|
|
370
|
-
visibleWidth,
|
|
371
|
-
wrapTextWithAnsi
|
|
372
|
-
} from "./chunk-V4ZKOKRB.js";
|
|
373
|
-
import {
|
|
374
|
-
inspectLibraryCopy,
|
|
375
|
-
readLibraryInventory
|
|
376
|
-
} from "./chunk-UB33F3YW.js";
|
|
377
|
-
import "./chunk-JRA6OBHY.js";
|
|
378
|
-
import "./chunk-PMUUAABD.js";
|
|
379
|
-
import "./chunk-JLBVCROW.js";
|
|
380
|
-
import {
|
|
381
|
-
ensureClioState,
|
|
382
|
-
takeUpgradeNotice
|
|
383
|
-
} from "./chunk-JIMWEYWO.js";
|
|
384
|
-
import "./chunk-O2QJDRWP.js";
|
|
385
|
-
import {
|
|
386
|
-
foldPromptCacheTelemetry,
|
|
387
|
-
hasPromptCacheTelemetry,
|
|
388
|
-
uncachedPrefillTokens
|
|
389
|
-
} from "./chunk-QH3ZTUOA.js";
|
|
390
|
-
import "./chunk-LQTKDAUO.js";
|
|
391
|
-
import {
|
|
392
|
-
editTextExternally,
|
|
393
|
-
resolveExternalEditor
|
|
394
|
-
} from "./chunk-R2CT5YDO.js";
|
|
395
|
-
import {
|
|
396
|
-
SafetyDomainModule,
|
|
397
|
-
parseRigorOverride,
|
|
398
|
-
resolveRigor
|
|
399
|
-
} from "./chunk-2ZWLMA3T.js";
|
|
400
|
-
import "./chunk-SD7SHNDW.js";
|
|
401
|
-
import "./chunk-QJMRYTCX.js";
|
|
402
|
-
import {
|
|
403
|
-
INHERITED_PROJECT_CONTEXT,
|
|
404
|
-
InteropDomainModule,
|
|
405
|
-
applyInteropAdoption,
|
|
406
|
-
applyLibraryImport,
|
|
407
|
-
delegationEntryForKind,
|
|
408
|
-
detectInteropAgents,
|
|
409
|
-
planInteropAdoption,
|
|
410
|
-
planLibraryImport,
|
|
411
|
-
releaseLibraryImport,
|
|
412
|
-
renderProposalEntry
|
|
413
|
-
} from "./chunk-GJBJHJNY.js";
|
|
414
|
-
import "./chunk-PFZJMXIY.js";
|
|
415
|
-
import {
|
|
416
|
-
AgentsDomainModule
|
|
417
|
-
} from "./chunk-LZDLYSUN.js";
|
|
418
|
-
import "./chunk-RFULVPBX.js";
|
|
419
|
-
import "./chunk-ORRNGQDV.js";
|
|
420
|
-
import "./chunk-OEMFEL26.js";
|
|
421
|
-
import {
|
|
422
|
-
discoverMarketplaceSkills,
|
|
423
|
-
installSkill,
|
|
424
|
-
modelVisibleSkills
|
|
425
|
-
} from "./chunk-EXKUF426.js";
|
|
426
|
-
import "./chunk-DNCE23JJ.js";
|
|
427
|
-
import "./chunk-YJCCMYYT.js";
|
|
499
|
+
import "./chunk-BHJMMCXS.js";
|
|
428
500
|
import {
|
|
429
501
|
FLEET_COMMANDS_REMEDY,
|
|
430
502
|
FleetCommandRegistryMissingError,
|
|
@@ -441,80 +513,25 @@ import {
|
|
|
441
513
|
reloadPluginResources
|
|
442
514
|
} from "./chunk-6UJ7RDI7.js";
|
|
443
515
|
import {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
516
|
+
discoverDeclaredChecks
|
|
517
|
+
} from "./chunk-QI72X67S.js";
|
|
518
|
+
import "./chunk-A6DULIMH.js";
|
|
519
|
+
import "./chunk-SD7SHNDW.js";
|
|
447
520
|
import {
|
|
448
|
-
|
|
449
|
-
|
|
521
|
+
emptyWorkspaceSnapshot,
|
|
522
|
+
probeGitStatusAsync,
|
|
523
|
+
probeWorkspaceAsync
|
|
524
|
+
} from "./chunk-DNHVRBH4.js";
|
|
450
525
|
import {
|
|
451
526
|
ACP_TURN_FAILED_MESSAGE,
|
|
452
527
|
AcpRequestError,
|
|
453
528
|
AcpTimeoutError,
|
|
454
529
|
acpErrorMessage,
|
|
455
530
|
createStdioServerTransport
|
|
456
|
-
} from "./chunk-
|
|
457
|
-
import "./chunk-XC5POIL4.js";
|
|
531
|
+
} from "./chunk-XNZWWDC3.js";
|
|
458
532
|
import {
|
|
459
533
|
collectSessionEntries
|
|
460
|
-
} from "./chunk-
|
|
461
|
-
import "./chunk-GM4TY6VN.js";
|
|
462
|
-
import {
|
|
463
|
-
ToolchainDomainModule
|
|
464
|
-
} from "./chunk-32KJPXAM.js";
|
|
465
|
-
import "./chunk-5GZICIYO.js";
|
|
466
|
-
import {
|
|
467
|
-
INTERACTIVE_LOOP_BLOCK_BUDGET,
|
|
468
|
-
applyEditsToNormalizedContent,
|
|
469
|
-
assertRegisteredBuiltinTools,
|
|
470
|
-
createEngineAgent,
|
|
471
|
-
createLoopGuardRegistration,
|
|
472
|
-
createProtectedArtifactsRegistration,
|
|
473
|
-
diffWords,
|
|
474
|
-
generateDiffString,
|
|
475
|
-
lazyTool,
|
|
476
|
-
normalizeToLF,
|
|
477
|
-
patchProviderThinkingPayload,
|
|
478
|
-
patchResponseSchemaPayloadForDialect,
|
|
479
|
-
patchToolChoiceNamedPayload,
|
|
480
|
-
patchToolChoiceNonePayload,
|
|
481
|
-
readOrchTurnToolCallBudget,
|
|
482
|
-
registerCoreTools,
|
|
483
|
-
registerHarnessExtensionTools,
|
|
484
|
-
resolveSessionTools,
|
|
485
|
-
sanitizeLockedSynthesisMessage,
|
|
486
|
-
stripBom
|
|
487
|
-
} from "./chunk-RXI7K4J5.js";
|
|
488
|
-
import {
|
|
489
|
-
MIDDLEWARE_HOOK_TEXT_MAX_CHARS,
|
|
490
|
-
MiddlewareDomainModule,
|
|
491
|
-
WATCHDOG_TASK,
|
|
492
|
-
announceMemoryStepEndpoint,
|
|
493
|
-
buildUserHookRegistrations,
|
|
494
|
-
createDetachedDispatchNudgeRegistration,
|
|
495
|
-
createHookReceiptLog,
|
|
496
|
-
createMarketplaceOfferRegistration,
|
|
497
|
-
createMemoryInterventionRegistration,
|
|
498
|
-
createMiddlewareToolChoiceControl,
|
|
499
|
-
createReadOnlyExplorationNudgeRegistration,
|
|
500
|
-
createSkillsReminderRegistration,
|
|
501
|
-
createTaskBoardReminderRegistration,
|
|
502
|
-
createTaskNudgeRegistration,
|
|
503
|
-
createUnbackedWorkerClaimRegistration,
|
|
504
|
-
createWatchdogRegistration,
|
|
505
|
-
formatRegistrationConflict,
|
|
506
|
-
openDetachedBatchViews,
|
|
507
|
-
watchdogBriefing,
|
|
508
|
-
writeMiddlewareDiagnosticToStderr
|
|
509
|
-
} from "./chunk-PJ5H5B7A.js";
|
|
510
|
-
import "./chunk-44U2OUSM.js";
|
|
511
|
-
import "./chunk-LZCCBLRC.js";
|
|
512
|
-
import {
|
|
513
|
-
resolveFdBinary
|
|
514
|
-
} from "./chunk-JABWPKFY.js";
|
|
515
|
-
import "./chunk-ICYIUNO4.js";
|
|
516
|
-
import "./chunk-2U2U5POA.js";
|
|
517
|
-
import "./chunk-WTZVSMQZ.js";
|
|
534
|
+
} from "./chunk-2VBWFXYE.js";
|
|
518
535
|
import {
|
|
519
536
|
COUNCIL_JUDGE_PROMPT,
|
|
520
537
|
COUNCIL_MAX_MEMBERS,
|
|
@@ -561,71 +578,46 @@ import {
|
|
|
561
578
|
timeoutMsArg,
|
|
562
579
|
toolPresentationPolicy,
|
|
563
580
|
withResolvedDispatchPlan
|
|
564
|
-
} from "./chunk-
|
|
581
|
+
} from "./chunk-4ATBOFRP.js";
|
|
565
582
|
import {
|
|
566
583
|
defaultRoutingIntent
|
|
567
|
-
} from "./chunk-
|
|
584
|
+
} from "./chunk-MO65K5CH.js";
|
|
568
585
|
import {
|
|
569
586
|
createTaskBoardStore,
|
|
570
587
|
foldSessionTaskHistory,
|
|
571
588
|
foldTaskBoard,
|
|
572
589
|
taskBoardCounts
|
|
573
|
-
} from "./chunk-
|
|
590
|
+
} from "./chunk-KOAHT3N2.js";
|
|
591
|
+
import {
|
|
592
|
+
DEFAULT_RECENT_ENTRY_LIMIT,
|
|
593
|
+
assessFinishContract,
|
|
594
|
+
recentEntries
|
|
595
|
+
} from "./chunk-AY4XE6GN.js";
|
|
596
|
+
import {
|
|
597
|
+
combineBashOutput,
|
|
598
|
+
runBashCommand
|
|
599
|
+
} from "./chunk-555E2WVV.js";
|
|
574
600
|
import "./chunk-OH3YYA3B.js";
|
|
575
601
|
import {
|
|
576
602
|
extensionPanelText
|
|
577
603
|
} from "./chunk-6TKOFFGE.js";
|
|
604
|
+
import {
|
|
605
|
+
effectiveToolCall
|
|
606
|
+
} from "./chunk-2JBZYUPY.js";
|
|
578
607
|
import {
|
|
579
608
|
describeCallTarget,
|
|
580
609
|
sanitizeCallTargetText,
|
|
581
610
|
sanitizeMultilineDisplayText
|
|
582
|
-
} from "./chunk-
|
|
611
|
+
} from "./chunk-XNIZBOFV.js";
|
|
583
612
|
import {
|
|
584
613
|
TOOL_PROFILE_NAMES
|
|
585
|
-
} from "./chunk-
|
|
614
|
+
} from "./chunk-XZWSP67B.js";
|
|
586
615
|
import {
|
|
587
616
|
agentRoleFactsResolver,
|
|
588
617
|
gateDeciderAgentId,
|
|
589
618
|
requestExecutionRole,
|
|
590
619
|
withAttemptRole
|
|
591
|
-
} from "./chunk-
|
|
592
|
-
import {
|
|
593
|
-
narrowDispatchIntentToReadOnly,
|
|
594
|
-
normalizeDispatchIntent
|
|
595
|
-
} from "./chunk-L4N3DWNW.js";
|
|
596
|
-
import "./chunk-SL2RDHKO.js";
|
|
597
|
-
import {
|
|
598
|
-
expandInlineFileReferencesAsync
|
|
599
|
-
} from "./chunk-YGDMBK7O.js";
|
|
600
|
-
import "./chunk-MEHBW2SP.js";
|
|
601
|
-
import {
|
|
602
|
-
sweepExpiredToolOffloads,
|
|
603
|
-
toolResultPresentationPolicy,
|
|
604
|
-
toolResultPresentationText
|
|
605
|
-
} from "./chunk-526ABLHD.js";
|
|
606
|
-
import {
|
|
607
|
-
formatSize
|
|
608
|
-
} from "./chunk-KECNXMDE.js";
|
|
609
|
-
import "./chunk-WXA2CFJO.js";
|
|
610
|
-
import {
|
|
611
|
-
escapeRegExp,
|
|
612
|
-
resolveToCwd
|
|
613
|
-
} from "./chunk-V552WL53.js";
|
|
614
|
-
import {
|
|
615
|
-
combineBashOutput,
|
|
616
|
-
runBashCommand
|
|
617
|
-
} from "./chunk-5A6XR3RJ.js";
|
|
618
|
-
import {
|
|
619
|
-
redactSecretString,
|
|
620
|
-
redactToolArgs
|
|
621
|
-
} from "./chunk-EFSEIZE6.js";
|
|
622
|
-
import "./chunk-VQD7NH7Z.js";
|
|
623
|
-
import "./chunk-CKK25WN3.js";
|
|
624
|
-
import {
|
|
625
|
-
DEFAULT_RECENT_ENTRY_LIMIT,
|
|
626
|
-
assessFinishContract,
|
|
627
|
-
recentEntries
|
|
628
|
-
} from "./chunk-MUXNDNMZ.js";
|
|
620
|
+
} from "./chunk-H6IUCY6Q.js";
|
|
629
621
|
import {
|
|
630
622
|
ProvidersDomainModule,
|
|
631
623
|
applyModelCapabilityPatch,
|
|
@@ -646,6 +638,7 @@ import {
|
|
|
646
638
|
modelResidencyForStatus,
|
|
647
639
|
normalizeCostProvenance,
|
|
648
640
|
observeCacheDeployment,
|
|
641
|
+
probeCapabilitiesForModel,
|
|
649
642
|
refineRuntimeTargetWithModelHints,
|
|
650
643
|
registerForegroundStream,
|
|
651
644
|
residencyTargetKey,
|
|
@@ -662,8 +655,12 @@ import {
|
|
|
662
655
|
thinkingLevelChoiceLabel,
|
|
663
656
|
thinkingLevelFromChoiceLabel,
|
|
664
657
|
withRunOverrides
|
|
665
|
-
} from "./chunk-
|
|
658
|
+
} from "./chunk-4HFJKRGZ.js";
|
|
666
659
|
import "./chunk-MCJKEGHO.js";
|
|
660
|
+
import "./chunk-CTGZCEI6.js";
|
|
661
|
+
import {
|
|
662
|
+
getSharedBus
|
|
663
|
+
} from "./chunk-RL7LJYN4.js";
|
|
667
664
|
import {
|
|
668
665
|
AutoCompactionTrigger,
|
|
669
666
|
DEFAULT_COMPACTION_THRESHOLD,
|
|
@@ -683,56 +680,48 @@ import {
|
|
|
683
680
|
reconcileSnapshot,
|
|
684
681
|
shouldCompact,
|
|
685
682
|
snapshotInputTokens
|
|
686
|
-
} from "./chunk-
|
|
687
|
-
import "./chunk-RAUOKUZV.js";
|
|
683
|
+
} from "./chunk-SJMNU4ZS.js";
|
|
688
684
|
import {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
} from "./chunk-
|
|
692
|
-
import "./chunk-5C2OQHLR.js";
|
|
685
|
+
BusChannels,
|
|
686
|
+
isRunAbortedPayload
|
|
687
|
+
} from "./chunk-W5RM7YAH.js";
|
|
693
688
|
import {
|
|
694
|
-
|
|
695
|
-
|
|
689
|
+
redactSecretString,
|
|
690
|
+
redactToolArgs
|
|
691
|
+
} from "./chunk-EFSEIZE6.js";
|
|
692
|
+
import "./chunk-SL2RDHKO.js";
|
|
696
693
|
import {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
} from "./chunk-QWUSS2QP.js";
|
|
694
|
+
expandInlineFileReferencesAsync
|
|
695
|
+
} from "./chunk-YGDMBK7O.js";
|
|
696
|
+
import "./chunk-JURMQWVJ.js";
|
|
701
697
|
import {
|
|
702
|
-
|
|
703
|
-
} from "./chunk-
|
|
698
|
+
escapeRegExp
|
|
699
|
+
} from "./chunk-IZZI3SKQ.js";
|
|
704
700
|
import {
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
701
|
+
sweepExpiredToolOffloads,
|
|
702
|
+
toolResultPresentationPolicy,
|
|
703
|
+
toolResultPresentationText
|
|
704
|
+
} from "./chunk-ZKQ63XZ5.js";
|
|
705
|
+
import "./chunk-IC7JXLOM.js";
|
|
708
706
|
import {
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
stream,
|
|
714
|
-
streamSimple
|
|
715
|
-
} from "./chunk-QLAGXTTV.js";
|
|
716
|
-
import "./chunk-TOPICHGR.js";
|
|
717
|
-
import "./chunk-B6UM3OZC.js";
|
|
718
|
-
import "./chunk-MYI32N4R.js";
|
|
707
|
+
captureProjectSurface,
|
|
708
|
+
projectSurfaceTrustNotice
|
|
709
|
+
} from "./chunk-X6FLVUM5.js";
|
|
710
|
+
import "./chunk-GHXGMFQ5.js";
|
|
719
711
|
import {
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
712
|
+
formatSize
|
|
713
|
+
} from "./chunk-KECNXMDE.js";
|
|
714
|
+
import "./chunk-WXA2CFJO.js";
|
|
723
715
|
import {
|
|
724
|
-
|
|
725
|
-
} from "./chunk-
|
|
726
|
-
import "./chunk-VNBICSS2.js";
|
|
727
|
-
import "./chunk-DXVMLM3Z.js";
|
|
716
|
+
resolveToCwd
|
|
717
|
+
} from "./chunk-KP5BPXR3.js";
|
|
728
718
|
import {
|
|
729
719
|
RESULT_SUMMARY_MAX_BYTES_CEILING,
|
|
730
720
|
isUserVisibleAgent,
|
|
731
|
-
parseJsonObjectPayload,
|
|
732
721
|
parseScoutResult,
|
|
733
722
|
parseVerifierResult,
|
|
734
723
|
resultContractSourceId
|
|
735
|
-
} from "./chunk-
|
|
724
|
+
} from "./chunk-I47EJPYL.js";
|
|
736
725
|
import "./chunk-XW2UZICE.js";
|
|
737
726
|
import {
|
|
738
727
|
SETTINGS_V1_PATH_MOVES,
|
|
@@ -743,26 +732,39 @@ import {
|
|
|
743
732
|
setFleetProfileInSettings,
|
|
744
733
|
updateSettings,
|
|
745
734
|
useTargetInSettings
|
|
746
|
-
} from "./chunk-
|
|
735
|
+
} from "./chunk-FPS4R2RN.js";
|
|
747
736
|
import "./chunk-DVNAPPXU.js";
|
|
748
737
|
import {
|
|
749
738
|
interopAgentKind
|
|
750
739
|
} from "./chunk-5EQO5NWP.js";
|
|
751
|
-
import "./chunk-
|
|
740
|
+
import "./chunk-H2WSCZZT.js";
|
|
752
741
|
import {
|
|
753
742
|
toolMutationPaths
|
|
754
|
-
} from "./chunk-
|
|
755
|
-
import "./chunk-R2P2U3ZS.js";
|
|
756
|
-
import "./chunk-NTTS3O53.js";
|
|
743
|
+
} from "./chunk-SQBT46OF.js";
|
|
757
744
|
import {
|
|
758
745
|
canonicalizeExistingPath
|
|
759
746
|
} from "./chunk-KQ6IDQIB.js";
|
|
747
|
+
import {
|
|
748
|
+
narrowDispatchIntentToReadOnly,
|
|
749
|
+
normalizeDispatchIntent
|
|
750
|
+
} from "./chunk-L4N3DWNW.js";
|
|
751
|
+
import "./chunk-YQYINEJI.js";
|
|
752
|
+
import "./chunk-H72DCH3E.js";
|
|
753
|
+
import "./chunk-2KUBKL63.js";
|
|
754
|
+
import "./chunk-MYI32N4R.js";
|
|
755
|
+
import "./chunk-R2P2U3ZS.js";
|
|
756
|
+
import "./chunk-NTTS3O53.js";
|
|
760
757
|
import {
|
|
761
758
|
VERIFICATION_SCRIPT_FAMILY_HINT
|
|
762
759
|
} from "./chunk-M4KFUXS7.js";
|
|
763
760
|
import {
|
|
764
761
|
ToolNames
|
|
765
|
-
} from "./chunk-
|
|
762
|
+
} from "./chunk-V4XJWDHR.js";
|
|
763
|
+
import {
|
|
764
|
+
VALID_THINKING_LEVELS,
|
|
765
|
+
formatContextWindowSlots,
|
|
766
|
+
registerBuiltinRuntimes
|
|
767
|
+
} from "./chunk-NPLLK3HO.js";
|
|
766
768
|
import {
|
|
767
769
|
ACTIVE_ROUTING_POSTURES,
|
|
768
770
|
ACTIVE_ROUTING_ROLES,
|
|
@@ -770,17 +772,39 @@ import {
|
|
|
770
772
|
DEFAULT_SETTINGS,
|
|
771
773
|
THINKING_LEVELS,
|
|
772
774
|
nextOutputStyle
|
|
773
|
-
} from "./chunk-
|
|
775
|
+
} from "./chunk-ZKJU55MX.js";
|
|
774
776
|
import "./chunk-U2MSJ57E.js";
|
|
775
777
|
import {
|
|
776
778
|
configureGuardrails,
|
|
777
779
|
guardrailValuesFromSettings
|
|
778
780
|
} from "./chunk-C27U2TYG.js";
|
|
781
|
+
import {
|
|
782
|
+
resolveProviderReference
|
|
783
|
+
} from "./chunk-EM2DIQAJ.js";
|
|
784
|
+
import {
|
|
785
|
+
targetRequiresAuth
|
|
786
|
+
} from "./chunk-ZKVMDNAN.js";
|
|
787
|
+
import "./chunk-VNBICSS2.js";
|
|
779
788
|
import "./chunk-B5GGDIHT.js";
|
|
780
789
|
import {
|
|
781
|
-
|
|
782
|
-
} from "./chunk-
|
|
783
|
-
import
|
|
790
|
+
getRuntimeRegistry
|
|
791
|
+
} from "./chunk-SRCEQKQS.js";
|
|
792
|
+
import {
|
|
793
|
+
AGENT_ROLE_TOOLS_REQUIRED_REASON,
|
|
794
|
+
supportsAgentRoleTools
|
|
795
|
+
} from "./chunk-JIYWMQZ5.js";
|
|
796
|
+
import {
|
|
797
|
+
StringEnum,
|
|
798
|
+
cleanupEngineSessionResources,
|
|
799
|
+
completeEngineText,
|
|
800
|
+
isEngineRetryableAssistantError,
|
|
801
|
+
stream,
|
|
802
|
+
streamSimple
|
|
803
|
+
} from "./chunk-UIU7MGZ3.js";
|
|
804
|
+
import "./chunk-DXVMLM3Z.js";
|
|
805
|
+
import "./chunk-VQD7NH7Z.js";
|
|
806
|
+
import "./chunk-CKK25WN3.js";
|
|
807
|
+
import "./chunk-XTQ7MEJG.js";
|
|
784
808
|
import {
|
|
785
809
|
setCommitDecisionRefsProvider,
|
|
786
810
|
setGitCommitAttributionEnabled
|
|
@@ -804,12 +828,15 @@ import {
|
|
|
804
828
|
skillSurfaceNames,
|
|
805
829
|
verifiedSkillContextCheckpoint,
|
|
806
830
|
withModelSkillActivation
|
|
807
|
-
} from "./chunk-
|
|
808
|
-
import "./chunk-O3VV6IVK.js";
|
|
831
|
+
} from "./chunk-NBPA5QM6.js";
|
|
809
832
|
import {
|
|
810
833
|
DEFAULT_AUTONOMY_LEVEL,
|
|
811
834
|
modelMayActivateSkills
|
|
812
835
|
} from "./chunk-EM2WNQS2.js";
|
|
836
|
+
import {
|
|
837
|
+
redactSecretsText
|
|
838
|
+
} from "./chunk-O3VV6IVK.js";
|
|
839
|
+
import "./chunk-DVJL77SO.js";
|
|
813
840
|
import {
|
|
814
841
|
atomicWrite,
|
|
815
842
|
cwdHash,
|
|
@@ -817,17 +844,14 @@ import {
|
|
|
817
844
|
readSessionTailTurns,
|
|
818
845
|
sessionCurrentPath,
|
|
819
846
|
sessionPaths
|
|
820
|
-
} from "./chunk-
|
|
847
|
+
} from "./chunk-3RDHGNU7.js";
|
|
821
848
|
import "./chunk-UHW5V7HC.js";
|
|
822
|
-
import "./chunk-DVJL77SO.js";
|
|
823
849
|
import "./chunk-KMF54VH3.js";
|
|
824
850
|
import "./chunk-SER7RRAE.js";
|
|
825
851
|
import {
|
|
826
852
|
typebox_exports
|
|
827
853
|
} from "./chunk-GH5ZR6JP.js";
|
|
828
854
|
import "./chunk-TK2BMCBZ.js";
|
|
829
|
-
import "./chunk-XCUDZQLX.js";
|
|
830
|
-
import "./chunk-K2BLQC5E.js";
|
|
831
855
|
import {
|
|
832
856
|
clioConfigDir,
|
|
833
857
|
clioDataDir,
|
|
@@ -852,9 +876,6 @@ import {
|
|
|
852
876
|
readClioVersion,
|
|
853
877
|
readPiMonoVersion
|
|
854
878
|
} from "./chunk-E3LEPLQ2.js";
|
|
855
|
-
import {
|
|
856
|
-
getRuntimeRegistry
|
|
857
|
-
} from "./chunk-SRCEQKQS.js";
|
|
858
879
|
import {
|
|
859
880
|
init_esm_shims
|
|
860
881
|
} from "./chunk-ECBHH7LU.js";
|
|
@@ -2014,6 +2035,17 @@ function findTurnStartForProtection(entries, entryIndex, startIndex) {
|
|
|
2014
2035
|
}
|
|
2015
2036
|
return -1;
|
|
2016
2037
|
}
|
|
2038
|
+
function resultFollowsCallInBatch(turn, resultEntry, call) {
|
|
2039
|
+
let parent = resultEntry.parentTurnId;
|
|
2040
|
+
for (let hops = 0; hops < turn.length && parent; hops++) {
|
|
2041
|
+
if (parent === call.turnId) return true;
|
|
2042
|
+
const link = turn.find((candidate) => candidate.turnId === parent);
|
|
2043
|
+
if (!link) return false;
|
|
2044
|
+
if (link.kind === "message" && link.role !== "tool_call" && link.role !== "tool_result") return false;
|
|
2045
|
+
parent = link.parentTurnId;
|
|
2046
|
+
}
|
|
2047
|
+
return false;
|
|
2048
|
+
}
|
|
2017
2049
|
function captureSkillContext(entries, selection) {
|
|
2018
2050
|
if (!selection || selection.unknown) return void 0;
|
|
2019
2051
|
const newestSelected = Math.max(
|
|
@@ -2062,7 +2094,7 @@ function captureSkillContext(entries, selection) {
|
|
|
2062
2094
|
(candidate) => candidate.kind === "message" && candidate.role === "tool_result" && payloadObject2(candidate.payload)?.toolCallId === callId
|
|
2063
2095
|
);
|
|
2064
2096
|
const resultEntry = results[0];
|
|
2065
|
-
if (results.length !== 1 || resultEntry?.kind !== "message" || !turn.includes(resultEntry) || resultEntry
|
|
2097
|
+
if (results.length !== 1 || resultEntry?.kind !== "message" || !turn.includes(resultEntry) || !resultFollowsCallInBatch(turn, resultEntry, call) || entry.parentTurnId !== request.turnId)
|
|
2066
2098
|
return void 0;
|
|
2067
2099
|
const payload = payloadObject2(resultEntry.payload);
|
|
2068
2100
|
const result = payloadObject2(payload?.result);
|
|
@@ -4488,7 +4520,7 @@ async function serveClioAcpAgent(options) {
|
|
|
4488
4520
|
}
|
|
4489
4521
|
return promptResponse(active.stopReason, active);
|
|
4490
4522
|
});
|
|
4491
|
-
return await new Promise((
|
|
4523
|
+
return await new Promise((resolve11) => {
|
|
4492
4524
|
options.transport.onClose(() => {
|
|
4493
4525
|
permission.unregister();
|
|
4494
4526
|
unsubscribeEventStream();
|
|
@@ -4496,14 +4528,14 @@ async function serveClioAcpAgent(options) {
|
|
|
4496
4528
|
for (const session of sessions.values()) cancelSession(session, "ACP transport closed");
|
|
4497
4529
|
const inFlight = promptSettled;
|
|
4498
4530
|
if (inFlight === null) {
|
|
4499
|
-
|
|
4531
|
+
resolve11(0);
|
|
4500
4532
|
return;
|
|
4501
4533
|
}
|
|
4502
|
-
const timer = setTimeout(() =>
|
|
4534
|
+
const timer = setTimeout(() => resolve11(0), ACP_PROMPT_SETTLE_BOUND_MS);
|
|
4503
4535
|
timer.unref?.();
|
|
4504
4536
|
void inFlight.then(() => {
|
|
4505
4537
|
clearTimeout(timer);
|
|
4506
|
-
|
|
4538
|
+
resolve11(0);
|
|
4507
4539
|
});
|
|
4508
4540
|
});
|
|
4509
4541
|
});
|
|
@@ -4537,7 +4569,8 @@ var DEFAULT_RETRY_SETTINGS = {
|
|
|
4537
4569
|
maxRetries: 3,
|
|
4538
4570
|
baseDelayMs: 2e3,
|
|
4539
4571
|
maxDelayMs: 6e4,
|
|
4540
|
-
streamStallMs: 18e4
|
|
4572
|
+
streamStallMs: 18e4,
|
|
4573
|
+
firstTokenStallMs: 6e5
|
|
4541
4574
|
};
|
|
4542
4575
|
var MODEL_LOADING_PATTERN = /model is unloaded|model is (?:still )?loading|model not loaded|no model (?:is )?loaded|loading model|model_?load(?:ing)?_?in_?progress|is not loaded/i;
|
|
4543
4576
|
var MODEL_LOADING_MIN_DELAY_MS = 15e3;
|
|
@@ -4620,7 +4653,8 @@ function normalizeRetrySettings(raw) {
|
|
|
4620
4653
|
maxRetries: normalizeNonNegativeInteger(raw?.maxRetries, DEFAULT_RETRY_SETTINGS.maxRetries),
|
|
4621
4654
|
baseDelayMs: normalizeNonNegativeInteger(raw?.baseDelayMs, DEFAULT_RETRY_SETTINGS.baseDelayMs),
|
|
4622
4655
|
maxDelayMs: normalizeNonNegativeInteger(raw?.maxDelayMs, DEFAULT_RETRY_SETTINGS.maxDelayMs),
|
|
4623
|
-
streamStallMs: normalizeNonNegativeInteger(raw?.streamStallMs, DEFAULT_RETRY_SETTINGS.streamStallMs)
|
|
4656
|
+
streamStallMs: normalizeNonNegativeInteger(raw?.streamStallMs, DEFAULT_RETRY_SETTINGS.streamStallMs),
|
|
4657
|
+
firstTokenStallMs: normalizeNonNegativeInteger(raw?.firstTokenStallMs, DEFAULT_RETRY_SETTINGS.firstTokenStallMs)
|
|
4624
4658
|
};
|
|
4625
4659
|
}
|
|
4626
4660
|
|
|
@@ -4839,7 +4873,8 @@ function stringField(record2, ...keys) {
|
|
|
4839
4873
|
}
|
|
4840
4874
|
return null;
|
|
4841
4875
|
}
|
|
4842
|
-
function pathFromCall(
|
|
4876
|
+
function pathFromCall(recordedTool, recordedArgs, cwd, into) {
|
|
4877
|
+
const { toolName, args } = effectiveToolCall(recordedTool, recordedArgs);
|
|
4843
4878
|
if (!READ_LEDGER_TOOLS.has(toolName)) return;
|
|
4844
4879
|
const record2 = isRecord3(args) ? args : null;
|
|
4845
4880
|
const named = stringField(record2, "path", "file_path", "filePath");
|
|
@@ -5433,29 +5468,166 @@ function styleTaggedNotice(line) {
|
|
|
5433
5468
|
|
|
5434
5469
|
// src/interactive/renderers/retry-status.ts
|
|
5435
5470
|
init_esm_shims();
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
if (
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5471
|
+
|
|
5472
|
+
// src/interactive/renderers/preview.ts
|
|
5473
|
+
init_esm_shims();
|
|
5474
|
+
function previewRows(rows, limit, width, tail = false) {
|
|
5475
|
+
if (rows.length <= limit) return [...rows];
|
|
5476
|
+
if (limit <= 0) return [];
|
|
5477
|
+
const count2 = Math.max(0, limit - 1);
|
|
5478
|
+
const hint = clioTheme().fg("dim", truncateToWidth(`\u2026 ${rows.length - count2} rows \xB7 /view`, Math.max(1, width)));
|
|
5479
|
+
return tail ? [hint, ...rows.slice(rows.length - count2)] : [...rows.slice(0, count2), hint];
|
|
5480
|
+
}
|
|
5481
|
+
function previewBudget(limit, terminalRows = 40) {
|
|
5482
|
+
return Math.min(limit, Math.max(2, Math.floor((terminalRows - 8) / 2)));
|
|
5483
|
+
}
|
|
5484
|
+
|
|
5485
|
+
// src/interactive/renderers/provider-error.ts
|
|
5486
|
+
init_esm_shims();
|
|
5487
|
+
import { stripVTControlCharacters } from "node:util";
|
|
5488
|
+
var SCAN_LIMIT = 8192;
|
|
5489
|
+
var DISPLAY_LIMIT = 600;
|
|
5490
|
+
var ROUTE_ADVICE_TAIL = 1024;
|
|
5491
|
+
function terminalSafePrefix(value, limit) {
|
|
5492
|
+
const end = Math.min(value.length, limit);
|
|
5493
|
+
const parts = [];
|
|
5494
|
+
let start = 0;
|
|
5495
|
+
let i = 0;
|
|
5496
|
+
while (i < end) {
|
|
5497
|
+
const code = value.charCodeAt(i);
|
|
5498
|
+
if (code !== 27 && !(code >= 128 && code <= 159)) {
|
|
5499
|
+
i++;
|
|
5500
|
+
continue;
|
|
5501
|
+
}
|
|
5502
|
+
parts.push(value.slice(start, i));
|
|
5503
|
+
const introducer = code === 27 ? value.charCodeAt(++i) : code;
|
|
5504
|
+
i++;
|
|
5505
|
+
if (introducer === 91 || introducer === 155) {
|
|
5506
|
+
while (i < end) {
|
|
5507
|
+
const next = value.charCodeAt(i++);
|
|
5508
|
+
if (next >= 64 && next <= 126) break;
|
|
5509
|
+
}
|
|
5510
|
+
} else if ([93, 80, 88, 94, 95, 157, 144, 152, 158, 159].includes(introducer)) {
|
|
5511
|
+
while (i < end) {
|
|
5512
|
+
const next = value.charCodeAt(i++);
|
|
5513
|
+
if (next === 7 || next === 156) break;
|
|
5514
|
+
if (next === 27 && i < end && value.charCodeAt(i) === 92) {
|
|
5515
|
+
i++;
|
|
5516
|
+
break;
|
|
5517
|
+
}
|
|
5518
|
+
}
|
|
5519
|
+
}
|
|
5520
|
+
start = i;
|
|
5521
|
+
}
|
|
5522
|
+
parts.push(value.slice(start, end));
|
|
5523
|
+
return stripVTControlCharacters(parts.join(""));
|
|
5524
|
+
}
|
|
5525
|
+
function providerErrorEvidence(value, scanLimit = value.length) {
|
|
5526
|
+
return redactSecretsText(
|
|
5527
|
+
redactSecretString(terminalSafePrefix(value, scanLimit)).replace(
|
|
5528
|
+
/(\b(?:authorization["']?\s*[:=]\s*["']?\s*)?(?:Bearer|Basic)\s+)[^\s"'<>]+/gi,
|
|
5529
|
+
"$1[redacted]"
|
|
5530
|
+
),
|
|
5531
|
+
{ count: 0 }
|
|
5532
|
+
).replace(/[\p{Cc}\p{Cf}]/gu, (char) => char === "\n" || char === " " ? char : " ");
|
|
5533
|
+
}
|
|
5534
|
+
function presentProviderError(value) {
|
|
5535
|
+
const available = providerErrorEvidence(value, SCAN_LIMIT);
|
|
5536
|
+
const beyondScan = value.length > SCAN_LIMIT;
|
|
5537
|
+
const routeParts = (beyondScan ? providerErrorEvidence(value.slice(-ROUTE_ADVICE_TAIL)) : available).match(
|
|
5538
|
+
/\n\n((LiteLLM route [^\n]+ failed\.) (Clio did not retry or substitute another model); (select a different route with \/model, then resend\.))$/
|
|
5539
|
+
);
|
|
5540
|
+
const routeAdvice = routeParts?.[1];
|
|
5541
|
+
const sample = routeAdvice && !beyondScan ? available.slice(0, available.length - routeAdvice.length).trimEnd() : available;
|
|
5542
|
+
let summary = sample;
|
|
5543
|
+
const jsonStart = sample.indexOf("{");
|
|
5544
|
+
const html = /<!doctype\s+html|<html\b/i.test(sample);
|
|
5545
|
+
if (html) {
|
|
5546
|
+
const title = sample.match(/<title[^>]*>([^<]*)<\/title>/i)?.[1];
|
|
5547
|
+
const prefix = sample.slice(0, sample.indexOf("<")).trim();
|
|
5548
|
+
summary = [
|
|
5549
|
+
prefix,
|
|
5550
|
+
title,
|
|
5551
|
+
routeAdvice ? "" : "Provider returned an HTML error page. Check the provider or gateway endpoint."
|
|
5552
|
+
].filter(Boolean).join("; ");
|
|
5553
|
+
} else if (jsonStart >= 0) {
|
|
5554
|
+
const fields = [...sample.matchAll(/"(?:message|detail|type|code)"\s*:\s*"((?:[^"\\]|\\.)*)/g)].map((match) => {
|
|
5555
|
+
const quoted = match[1];
|
|
5556
|
+
if (quoted === void 0) return "";
|
|
5557
|
+
try {
|
|
5558
|
+
const decoded = JSON.parse(`"${quoted}"`);
|
|
5559
|
+
return typeof decoded === "string" ? providerErrorEvidence(decoded) : "";
|
|
5560
|
+
} catch {
|
|
5561
|
+
return "";
|
|
5562
|
+
}
|
|
5563
|
+
});
|
|
5564
|
+
if (fields.some(Boolean))
|
|
5565
|
+
summary = [sample.slice(0, jsonStart).trim(), ...new Set(fields)].filter(Boolean).join("; ");
|
|
5566
|
+
}
|
|
5567
|
+
const status = sample.match(/\b(?:HTTP(?:\/\d(?:\.\d)?)?\s*|status(?:_code)?["']?\s*[:=]\s*)([45]\d\d)\b/i)?.[1] ?? sample.match(/"(?:status|status_?code)"\s*:\s*([45]\d{2})(?=\s*[,}])/i)?.[1] ?? sample.match(/"error"\s*:\s*\{[^{}]*?"code"\s*:\s*([45]\d{2})(?=\s*[,}])/i)?.[1];
|
|
5568
|
+
if (status && !summary.includes(status)) summary = `HTTP ${status}; ${summary}`;
|
|
5569
|
+
summary = summary.replace(/\s+/g, " ").trim();
|
|
5570
|
+
if (routeAdvice) {
|
|
5571
|
+
const prefix = summary.slice(0, 60);
|
|
5572
|
+
const identity = routeParts?.[2];
|
|
5573
|
+
const policy = routeParts?.[3];
|
|
5574
|
+
const remedy = routeParts?.[4];
|
|
5575
|
+
const advice = identity && policy && remedy ? `${remedy} ${policy}. ${identity}` : routeAdvice;
|
|
5576
|
+
summary = `${prefix}${summary.length > 60 ? " ..." : ""}; ${advice}`;
|
|
5577
|
+
}
|
|
5578
|
+
const shortened = summary.length > DISPLAY_LIMIT || value.length > SCAN_LIMIT || summary !== sample.trim();
|
|
5579
|
+
return `${summary.slice(0, DISPLAY_LIMIT)}${shortened ? " ... [available diagnostic: /view transcript]" : ""}`;
|
|
5580
|
+
}
|
|
5581
|
+
|
|
5582
|
+
// src/interactive/renderers/retry-status.ts
|
|
5583
|
+
function rawRetryStatus(status, unbounded) {
|
|
5584
|
+
const showError = unbounded || status.phase !== "waiting" && status.phase !== "retrying";
|
|
5585
|
+
const suffix = showError && status.errorMessage ? `: ${unbounded ? providerErrorEvidence(status.errorMessage) : presentProviderError(status.errorMessage)}` : "";
|
|
5445
5586
|
if (status.phase === "waiting") {
|
|
5446
|
-
return `[retry]
|
|
5587
|
+
return `[retry] provider retry ${status.attempt}/${status.maxAttempts} in ${status.seconds ?? 0}s${suffix}`;
|
|
5447
5588
|
}
|
|
5448
5589
|
if (status.phase === "scheduled") {
|
|
5449
5590
|
const seconds = Math.ceil((status.delayMs ?? 0) / 1e3);
|
|
5450
|
-
return `[retry]
|
|
5591
|
+
return `[retry] provider retry ${status.attempt}/${status.maxAttempts} scheduled in ${seconds}s${suffix}`;
|
|
5592
|
+
}
|
|
5593
|
+
if (status.phase === "retrying")
|
|
5594
|
+
return `[retry] provider retry ${status.attempt}/${status.maxAttempts} running${suffix}`;
|
|
5595
|
+
if (status.phase === "cancelled")
|
|
5596
|
+
return `[retry] provider retry cancelled (${status.attempt}/${status.maxAttempts})${suffix}`;
|
|
5597
|
+
if (status.phase === "exhausted") return `[retry] provider retry exhausted (${status.attempt})${suffix}`;
|
|
5598
|
+
return `[retry] provider retry recovered after ${status.attempt} attempt(s)`;
|
|
5599
|
+
}
|
|
5600
|
+
function formatRetryStatus(status, unbounded = false) {
|
|
5601
|
+
return styleTaggedNotice(rawRetryStatus(status, unbounded));
|
|
5602
|
+
}
|
|
5603
|
+
function renderRetryStatus(status, width, detail, unbounded = false, terminalRows = 40) {
|
|
5604
|
+
if (unbounded) return wrapTextWithAnsi(formatRetryStatus(status, true), width);
|
|
5605
|
+
const limit = previewBudget(detail.errorRows, terminalRows);
|
|
5606
|
+
const { errorMessage, ...heading } = status;
|
|
5607
|
+
if (!errorMessage || status.phase === "waiting" || status.phase === "retrying" || status.phase === "recovered") {
|
|
5608
|
+
return previewRows(wrapTextWithAnsi(formatRetryStatus(heading), width), limit, width);
|
|
5609
|
+
}
|
|
5610
|
+
const headingRow = truncateToWidth(formatRetryStatus(heading), width);
|
|
5611
|
+
const diagnosis = presentProviderError(errorMessage);
|
|
5612
|
+
const rows = wrapTextWithAnsi(diagnosis, width);
|
|
5613
|
+
if (limit === 2 && rows.length > 1) {
|
|
5614
|
+
const hint = " /view";
|
|
5615
|
+
return [
|
|
5616
|
+
headingRow,
|
|
5617
|
+
clioTheme().fg(
|
|
5618
|
+
"muted",
|
|
5619
|
+
truncateToWidth(`${truncateToWidth(diagnosis, Math.max(1, width - hint.length))}${hint}`, width)
|
|
5620
|
+
)
|
|
5621
|
+
];
|
|
5451
5622
|
}
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5623
|
+
return [
|
|
5624
|
+
headingRow,
|
|
5625
|
+
...previewRows(
|
|
5626
|
+
rows.map((row2) => clioTheme().fg("muted", row2)),
|
|
5627
|
+
limit - 1,
|
|
5628
|
+
width
|
|
5629
|
+
)
|
|
5630
|
+
];
|
|
5459
5631
|
}
|
|
5460
5632
|
|
|
5461
5633
|
// src/interactive/renderers/tool-execution.ts
|
|
@@ -5505,19 +5677,6 @@ function transcriptDetail(style = "standard") {
|
|
|
5505
5677
|
return POLICIES[style];
|
|
5506
5678
|
}
|
|
5507
5679
|
|
|
5508
|
-
// src/interactive/renderers/preview.ts
|
|
5509
|
-
init_esm_shims();
|
|
5510
|
-
function previewRows(rows, limit, width, tail = false) {
|
|
5511
|
-
if (rows.length <= limit) return [...rows];
|
|
5512
|
-
if (limit <= 0) return [];
|
|
5513
|
-
const count2 = Math.max(0, limit - 1);
|
|
5514
|
-
const hint = clioTheme().fg("dim", truncateToWidth(`\u2026 ${rows.length - count2} rows \xB7 /view`, Math.max(1, width)));
|
|
5515
|
-
return tail ? [hint, ...rows.slice(rows.length - count2)] : [...rows.slice(0, count2), hint];
|
|
5516
|
-
}
|
|
5517
|
-
function previewBudget(limit, terminalRows = 40) {
|
|
5518
|
-
return Math.min(limit, Math.max(2, Math.floor((terminalRows - 8) / 2)));
|
|
5519
|
-
}
|
|
5520
|
-
|
|
5521
5680
|
// src/interactive/mutation-preview.ts
|
|
5522
5681
|
init_esm_shims();
|
|
5523
5682
|
import { createHash as createHash2 } from "node:crypto";
|
|
@@ -5939,11 +6098,16 @@ var PRIMARY_ARG_FIELD = {
|
|
|
5939
6098
|
bash: "command",
|
|
5940
6099
|
grep: "pattern",
|
|
5941
6100
|
find: "pattern",
|
|
6101
|
+
web_read: "url",
|
|
5942
6102
|
web_fetch: "url",
|
|
5943
6103
|
git: "op",
|
|
5944
6104
|
verify: "check",
|
|
6105
|
+
run_script: "script",
|
|
5945
6106
|
code_nav: "query",
|
|
5946
6107
|
context: "scope",
|
|
6108
|
+
clio_docs: "query",
|
|
6109
|
+
clio_library: "query",
|
|
6110
|
+
data: "path",
|
|
5947
6111
|
artifact: "kind",
|
|
5948
6112
|
monitor: "run_id",
|
|
5949
6113
|
steer: "run_id",
|
|
@@ -5962,10 +6126,25 @@ function summarizeWebFetchArgs(args) {
|
|
|
5962
6126
|
}
|
|
5963
6127
|
return truncate2(jsonStringifySafe(Object.keys(compact2).length > 0 ? compact2 : args), WEB_FETCH_ARG_PREVIEW_LIMIT);
|
|
5964
6128
|
}
|
|
6129
|
+
function summarizeGatewayArgs(args) {
|
|
6130
|
+
if (!isPlainObject(args)) return truncate2(jsonStringifySafe(redactToolArgs(args)), ARG_PREVIEW_LIMIT);
|
|
6131
|
+
const op = typeof args.op === "string" ? args.op : "";
|
|
6132
|
+
if (op === "find") {
|
|
6133
|
+
const query = readStringField(args, "query");
|
|
6134
|
+
return truncate2(query === null || query.length === 0 ? "find" : `find ${query}`, ARG_PREVIEW_LIMIT);
|
|
6135
|
+
}
|
|
6136
|
+
const capability = readStringField(args, "capability") ?? "";
|
|
6137
|
+
if (op === "describe") return truncate2(`describe ${capability}`.trim(), ARG_PREVIEW_LIMIT);
|
|
6138
|
+
const effective = effectiveToolCall("gateway", args);
|
|
6139
|
+
if (!effective.viaGateway) return truncate2(jsonStringifySafe(redactToolArgs(args)), ARG_PREVIEW_LIMIT);
|
|
6140
|
+
const inner = summarizeArgs(effective.toolName, effective.args);
|
|
6141
|
+
return truncate2(inner.length > 0 ? `${effective.toolName} ${inner}` : effective.toolName, ARG_PREVIEW_LIMIT);
|
|
6142
|
+
}
|
|
5965
6143
|
function summarizeArgs(toolName, args) {
|
|
5966
6144
|
if (isEmptyArgs(args)) return "";
|
|
5967
6145
|
const safeArgs = redactToolArgs(args);
|
|
5968
|
-
if (toolName === "web_fetch") return summarizeWebFetchArgs(safeArgs);
|
|
6146
|
+
if (toolName === "web_fetch" || toolName === "web_read") return summarizeWebFetchArgs(safeArgs);
|
|
6147
|
+
if (toolName === "gateway") return summarizeGatewayArgs(args);
|
|
5969
6148
|
const primary = capturedPrimaryArg(toolName, args);
|
|
5970
6149
|
if (primary !== null) return truncate2(displayArg(toolName, primary), ARG_PREVIEW_LIMIT);
|
|
5971
6150
|
return truncate2(jsonStringifySafe(safeArgs), ARG_PREVIEW_LIMIT);
|
|
@@ -6207,7 +6386,10 @@ function buildGenericToolBody(toolName, args) {
|
|
|
6207
6386
|
function buildFieldSublineBody(args, key, lead, options = {}) {
|
|
6208
6387
|
const value = readStringField(args, key);
|
|
6209
6388
|
if (value === null) return null;
|
|
6210
|
-
const preview = truncate2(
|
|
6389
|
+
const preview = truncate2(
|
|
6390
|
+
sanitizeCallTargetText(key === "command" ? stripShellWrapperForDisplay(value) : value),
|
|
6391
|
+
ARG_PREVIEW_LIMIT
|
|
6392
|
+
);
|
|
6211
6393
|
if (options.wrapInBackticks) return `${lead}\`${preview}\``;
|
|
6212
6394
|
return `${lead}${preview}`;
|
|
6213
6395
|
}
|
|
@@ -6244,9 +6426,32 @@ var SUBLINE_BODY_BUILDERS = {
|
|
|
6244
6426
|
bash: (args) => buildFieldSublineBody(args, "command", "running ", { wrapInBackticks: true }),
|
|
6245
6427
|
grep: (args) => buildFieldSublineBody(args, "pattern", "searching for ", { wrapInBackticks: true }),
|
|
6246
6428
|
find: (args) => buildFieldSublineBody(args, "pattern", "finding ", { wrapInBackticks: true }),
|
|
6429
|
+
web_read: (args) => buildFieldSublineBody(args, "url", "reading "),
|
|
6247
6430
|
web_fetch: (args) => buildFieldSublineBody(args, "url", "fetching "),
|
|
6248
6431
|
git: (args) => buildFieldSublineBody(args, "op", "git "),
|
|
6249
6432
|
verify: (args) => buildFieldSublineBody(args, "check", "verifying "),
|
|
6433
|
+
run_script: (args) => buildFieldSublineBody(args, "script", "running ", { wrapInBackticks: true }),
|
|
6434
|
+
data: (args) => {
|
|
6435
|
+
const op = readStringField(args, "op") ?? "inspecting";
|
|
6436
|
+
const path2 = readStringField(args, "path");
|
|
6437
|
+
return path2 === null ? op : `${op} ${path2}`;
|
|
6438
|
+
},
|
|
6439
|
+
gateway: (args) => {
|
|
6440
|
+
if (!isPlainObject(args)) return null;
|
|
6441
|
+
const op = typeof args.op === "string" ? args.op : "";
|
|
6442
|
+
if (op === "find") {
|
|
6443
|
+
const query = readStringField(args, "query");
|
|
6444
|
+
return query === null || query.length === 0 ? "finding capabilities" : `finding capabilities \`${query}\``;
|
|
6445
|
+
}
|
|
6446
|
+
if (op === "describe") {
|
|
6447
|
+
const capability = readStringField(args, "capability");
|
|
6448
|
+
return capability === null ? "describing a capability" : `describing ${capability}`;
|
|
6449
|
+
}
|
|
6450
|
+
const effective = effectiveToolCall("gateway", args);
|
|
6451
|
+
if (!effective.viaGateway) return null;
|
|
6452
|
+
const inner = SUBLINE_BODY_BUILDERS[effective.toolName]?.(effective.args);
|
|
6453
|
+
return inner !== null && inner !== void 0 ? `${inner} (via gateway)` : `calling ${effective.toolName}`;
|
|
6454
|
+
},
|
|
6250
6455
|
code_nav: (args) => {
|
|
6251
6456
|
const mode = readStringField(args, "mode");
|
|
6252
6457
|
const query = readStringField(args, "query")?.trim() ?? "";
|
|
@@ -6300,9 +6505,9 @@ function buildSublineBody(toolName, args, status, result, outcome) {
|
|
|
6300
6505
|
}
|
|
6301
6506
|
return SUBLINE_BODY_BUILDERS[toolName]?.(args) ?? buildGenericToolBody(toolName, args);
|
|
6302
6507
|
}
|
|
6303
|
-
if (toolName === "web_fetch") {
|
|
6508
|
+
if (toolName === "web_fetch" || toolName === "web_read") {
|
|
6304
6509
|
const meta = status === void 0 ? null : webFetchMeta(result);
|
|
6305
|
-
const body2 = SUBLINE_BODY_BUILDERS
|
|
6510
|
+
const body2 = SUBLINE_BODY_BUILDERS[toolName]?.(args) ?? buildGenericToolBody(toolName, args);
|
|
6306
6511
|
return `${body2}${meta ? dim(` \xB7 ${meta}`) : ""}`;
|
|
6307
6512
|
}
|
|
6308
6513
|
if (toolName === "bash") {
|
|
@@ -6430,8 +6635,8 @@ function isEmptyResult(result) {
|
|
|
6430
6635
|
return false;
|
|
6431
6636
|
}
|
|
6432
6637
|
function resultText2(result, limit = FULL_RESULT_PREVIEW_LIMIT) {
|
|
6433
|
-
|
|
6434
|
-
return truncate2(
|
|
6638
|
+
const text = typeof result === "string" ? result : jsonStringifySafe(result);
|
|
6639
|
+
return truncate2(sanitizeMultilineDisplayText(text).text, limit);
|
|
6435
6640
|
}
|
|
6436
6641
|
function truncateRowsMiddle(rows, rowLimit, isError) {
|
|
6437
6642
|
if (rows.length <= rowLimit) return [...rows];
|
|
@@ -7128,15 +7333,18 @@ function foldSessionArtifacts(entries, options = {}) {
|
|
|
7128
7333
|
if (!isRecord5(raw) || raw.kind !== "message" || raw.role !== "tool_result") continue;
|
|
7129
7334
|
if (typeof raw.turnId !== "string" || typeof raw.timestamp !== "string") continue;
|
|
7130
7335
|
const payload = raw.payload;
|
|
7131
|
-
if (!isRecord5(payload) ||
|
|
7336
|
+
if (!isRecord5(payload) || typeof payload.toolName !== "string") continue;
|
|
7337
|
+
const result = payload.result;
|
|
7338
|
+
const details = isRecord5(result) && isRecord5(result.details) ? result.details : null;
|
|
7339
|
+
const toolName = effectiveToolCall(payload.toolName, void 0, details ?? void 0).toolName;
|
|
7340
|
+
if (!isSessionArtifactTool(toolName)) continue;
|
|
7132
7341
|
if (payload.isError === true || payload.outcome === "error" || payload.outcome === "blocked" || payload.outcome === "aborted" || payload.outcome === "orphaned") {
|
|
7133
7342
|
continue;
|
|
7134
7343
|
}
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
const artifactKind = payload.toolName === "artifact" && isSessionArtifactKind(result.details.kind) ? result.details.kind : void 0;
|
|
7344
|
+
if (!isRecord5(result) || details === null || !Array.isArray(details.paths)) continue;
|
|
7345
|
+
const artifactKind = toolName === "artifact" && isSessionArtifactKind(details.kind) ? details.kind : void 0;
|
|
7138
7346
|
const pathsSeenInResult = /* @__PURE__ */ new Set();
|
|
7139
|
-
for (const recordedPath of
|
|
7347
|
+
for (const recordedPath of details.paths) {
|
|
7140
7348
|
if (typeof recordedPath !== "string" || recordedPath.trim().length === 0) continue;
|
|
7141
7349
|
const normalized = normalizedWorkspacePath(recordedPath, workspace);
|
|
7142
7350
|
if (normalized === null || pathsSeenInResult.has(normalized)) continue;
|
|
@@ -7146,7 +7354,7 @@ function foldSessionArtifacts(entries, options = {}) {
|
|
|
7146
7354
|
writeIndex += 1;
|
|
7147
7355
|
lastByPath.set(normalized, {
|
|
7148
7356
|
path: recordedPath,
|
|
7149
|
-
tool:
|
|
7357
|
+
tool: toolName,
|
|
7150
7358
|
...artifactKind ? { artifactKind } : {},
|
|
7151
7359
|
turnId: raw.turnId,
|
|
7152
7360
|
timestamp: raw.timestamp,
|
|
@@ -7582,6 +7790,161 @@ function buildSegmentedContextBar(theme6, barWidth, contextWindow, breakdown) {
|
|
|
7582
7790
|
return `${systemPart}${toolPart}${conversationPart}${freePart}${contextPercentLabel(percent)}`;
|
|
7583
7791
|
}
|
|
7584
7792
|
|
|
7793
|
+
// src/interactive/renderers/worker-answer.ts
|
|
7794
|
+
init_esm_shims();
|
|
7795
|
+
function safeWorkerAnswerText(text) {
|
|
7796
|
+
const normalized = text.replaceAll(String.fromCharCode(157), "\x1B]").replaceAll(String.fromCharCode(155), "\x1B[").replaceAll(String.fromCharCode(156), "\x1B\\");
|
|
7797
|
+
return redactSecretString(sanitizeMultilineDisplayText(normalized).text).replace(/[\p{Cf}\u0080-\u009f]/gu, "");
|
|
7798
|
+
}
|
|
7799
|
+
var isStringArray = (value) => Array.isArray(value) && value.every((entry) => typeof entry === "string");
|
|
7800
|
+
function reportString(value) {
|
|
7801
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
|
7802
|
+
}
|
|
7803
|
+
function debuggerReport(value) {
|
|
7804
|
+
const diagnosis = reportString(value.diagnosis);
|
|
7805
|
+
const reproduction = value.reproduction;
|
|
7806
|
+
if (diagnosis === null || reproduction !== "reproduced" && reproduction !== "not-reproduced" && reproduction !== "unknown" || !isStringArray(value.evidence)) {
|
|
7807
|
+
return null;
|
|
7808
|
+
}
|
|
7809
|
+
return {
|
|
7810
|
+
lines: [
|
|
7811
|
+
diagnosis,
|
|
7812
|
+
...value.evidence.length === 0 ? ["Evidence: none"] : ["Evidence:", ...value.evidence.map((item) => `- ${item}`)]
|
|
7813
|
+
],
|
|
7814
|
+
footer: `reproduction ${reproduction}`
|
|
7815
|
+
};
|
|
7816
|
+
}
|
|
7817
|
+
function verifierReport(value) {
|
|
7818
|
+
if (value.verdict !== "pass" && value.verdict !== "fail" || !Array.isArray(value.checks)) return null;
|
|
7819
|
+
const lines = [];
|
|
7820
|
+
for (const raw of value.checks) {
|
|
7821
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
7822
|
+
const check = raw;
|
|
7823
|
+
const name = reportString(check.name);
|
|
7824
|
+
const evidence = reportString(check.evidence);
|
|
7825
|
+
if (name === null || evidence === null || typeof check.passed !== "boolean") return null;
|
|
7826
|
+
lines.push(`${check.passed ? GLYPH.ok : GLYPH.error} ${name}: ${evidence}`);
|
|
7827
|
+
}
|
|
7828
|
+
return { lines: lines.length === 0 ? ["No checks reported."] : lines, footer: `verdict ${value.verdict}` };
|
|
7829
|
+
}
|
|
7830
|
+
function researchReport(value) {
|
|
7831
|
+
if (value.source !== "local" && value.source !== "external" || !Array.isArray(value.findings)) return null;
|
|
7832
|
+
const lines = [];
|
|
7833
|
+
for (const raw of value.findings) {
|
|
7834
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
7835
|
+
const finding = raw;
|
|
7836
|
+
const claim = reportString(finding.claim);
|
|
7837
|
+
const evidence = reportString(finding.evidence);
|
|
7838
|
+
if (claim === null || evidence === null) return null;
|
|
7839
|
+
lines.push(`- ${claim}`, ` citation: ${evidence}`);
|
|
7840
|
+
}
|
|
7841
|
+
return { lines: lines.length === 0 ? ["No findings reported."] : lines, footer: `source ${value.source}` };
|
|
7842
|
+
}
|
|
7843
|
+
function worldKnowledgeReport(value) {
|
|
7844
|
+
if (value.discovery !== "performed" && value.discovery !== "caller-supplied-only" && value.discovery !== "unavailable" || !Array.isArray(value.facts) || !isStringArray(value.synthesis) || !isStringArray(value.uncertainties) || !isStringArray(value.followUpVerification)) {
|
|
7845
|
+
return null;
|
|
7846
|
+
}
|
|
7847
|
+
const lines = [];
|
|
7848
|
+
for (const raw of value.facts) {
|
|
7849
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
7850
|
+
const fact = raw;
|
|
7851
|
+
const claim = reportString(fact.claim);
|
|
7852
|
+
const evidence = reportString(fact.evidence);
|
|
7853
|
+
if (claim === null || evidence === null || !isStringArray(fact.sources)) return null;
|
|
7854
|
+
lines.push(`- ${claim}`, ` support: ${evidence}`);
|
|
7855
|
+
if (fact.sources.length > 0) lines.push(` sources: ${fact.sources.join(", ")}`);
|
|
7856
|
+
}
|
|
7857
|
+
if (value.synthesis.length > 0) lines.push("Synthesis:", ...value.synthesis.map((item) => `- ${item}`));
|
|
7858
|
+
if (value.uncertainties.length > 0) lines.push("Uncertainties:", ...value.uncertainties.map((item) => `- ${item}`));
|
|
7859
|
+
if (value.followUpVerification.length > 0) {
|
|
7860
|
+
lines.push("Verify next:", ...value.followUpVerification.map((item) => `- ${item}`));
|
|
7861
|
+
}
|
|
7862
|
+
return {
|
|
7863
|
+
lines: lines.length === 0 ? ["No findings reported."] : lines,
|
|
7864
|
+
footer: `discovery ${value.discovery}; uncertainties ${value.uncertainties.length}; follow-up ${value.followUpVerification.length}`
|
|
7865
|
+
};
|
|
7866
|
+
}
|
|
7867
|
+
function scoutReport(value) {
|
|
7868
|
+
if (!Array.isArray(value.findings) || typeof value.needsSplit !== "boolean") return null;
|
|
7869
|
+
const lines = [];
|
|
7870
|
+
for (const raw of value.findings) {
|
|
7871
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
7872
|
+
const finding = raw;
|
|
7873
|
+
const claim = reportString(finding.claim);
|
|
7874
|
+
if (claim === null) return null;
|
|
7875
|
+
const path2 = reportString(finding.path);
|
|
7876
|
+
const line = typeof finding.line === "number" && Number.isSafeInteger(finding.line) ? finding.line : null;
|
|
7877
|
+
lines.push(path2 !== null && line !== null ? `- ${claim} \u2014 ${path2}:${line}` : `- ${claim} (ungrounded lead)`);
|
|
7878
|
+
}
|
|
7879
|
+
if (value.needsSplit) {
|
|
7880
|
+
if (!Array.isArray(value.proposedSubtasks)) return null;
|
|
7881
|
+
lines.push("Split recommended:");
|
|
7882
|
+
for (const raw of value.proposedSubtasks) {
|
|
7883
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
7884
|
+
const subtask = raw;
|
|
7885
|
+
const task = reportString(subtask.task);
|
|
7886
|
+
const id = reportString(subtask.id);
|
|
7887
|
+
if (task === null || id === null) return null;
|
|
7888
|
+
lines.push(`- ${id}: ${task}`);
|
|
7889
|
+
}
|
|
7890
|
+
}
|
|
7891
|
+
return {
|
|
7892
|
+
lines: lines.length === 0 ? ["No findings reported."] : lines,
|
|
7893
|
+
footer: value.needsSplit ? "split needed" : "no split needed"
|
|
7894
|
+
};
|
|
7895
|
+
}
|
|
7896
|
+
function isObject(value) {
|
|
7897
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7898
|
+
}
|
|
7899
|
+
function exactWorkerAnswerObject(text) {
|
|
7900
|
+
const trimmed = text.trim();
|
|
7901
|
+
const fenced = /^```[A-Za-z0-9_-]*[^\S\r\n]*\r?\n([\s\S]*?)\r?\n```$/u.exec(trimmed);
|
|
7902
|
+
const source = fenced?.[1] ?? trimmed;
|
|
7903
|
+
try {
|
|
7904
|
+
const value = JSON.parse(source);
|
|
7905
|
+
return isObject(value) ? value : null;
|
|
7906
|
+
} catch {
|
|
7907
|
+
return null;
|
|
7908
|
+
}
|
|
7909
|
+
}
|
|
7910
|
+
function presentWorkerContractAnswer(text, contract, complete, settled) {
|
|
7911
|
+
if (!settled || !complete || contract?.conformance !== "pass") return null;
|
|
7912
|
+
const value = exactWorkerAnswerObject(text);
|
|
7913
|
+
if (value === null) return null;
|
|
7914
|
+
if (contract.kind === "scout-report") {
|
|
7915
|
+
for (const match of text.matchAll(/"(?:[^"\\]|\\[\s\S])*"|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/gu)) {
|
|
7916
|
+
const token = match[0];
|
|
7917
|
+
if (token.startsWith('"')) continue;
|
|
7918
|
+
if (!Number.isSafeInteger(Number(token)) || String(Number(token)) !== token) return null;
|
|
7919
|
+
}
|
|
7920
|
+
}
|
|
7921
|
+
let answer;
|
|
7922
|
+
switch (contract.kind) {
|
|
7923
|
+
case "debugger-report":
|
|
7924
|
+
answer = debuggerReport(value);
|
|
7925
|
+
break;
|
|
7926
|
+
case "verifier-report":
|
|
7927
|
+
answer = verifierReport(value);
|
|
7928
|
+
break;
|
|
7929
|
+
case "research-report":
|
|
7930
|
+
answer = researchReport(value);
|
|
7931
|
+
break;
|
|
7932
|
+
case "world-knowledge-report":
|
|
7933
|
+
answer = worldKnowledgeReport(value);
|
|
7934
|
+
break;
|
|
7935
|
+
case "scout-report":
|
|
7936
|
+
answer = scoutReport(value);
|
|
7937
|
+
break;
|
|
7938
|
+
default:
|
|
7939
|
+
return null;
|
|
7940
|
+
}
|
|
7941
|
+
if (answer === null) return null;
|
|
7942
|
+
return {
|
|
7943
|
+
lines: answer.lines.map(safeWorkerAnswerText),
|
|
7944
|
+
...answer.footer ? { footer: safeWorkerAnswerText(answer.footer) } : {}
|
|
7945
|
+
};
|
|
7946
|
+
}
|
|
7947
|
+
|
|
7585
7948
|
// src/interactive/dispatch-board.ts
|
|
7586
7949
|
function formatDispatchPhaseCell(phase, width = PHASE_COLUMN_WIDTH) {
|
|
7587
7950
|
if (phase === void 0) return null;
|
|
@@ -7747,41 +8110,50 @@ function progressActionLine(theme6, progress, contentWidth) {
|
|
|
7747
8110
|
const current = progress.currentAction;
|
|
7748
8111
|
const recent = progress.recentActions[0];
|
|
7749
8112
|
const units = [];
|
|
7750
|
-
if (phase !== null) units.push(phase);
|
|
7751
|
-
if (current !== null) units.push(theme6.fg("muted", actionPhrase(current)));
|
|
8113
|
+
if (phase !== null && current === null) units.push(phase);
|
|
8114
|
+
if (current !== null) units.push(theme6.fg("muted", `now ${actionPhrase(current)}`));
|
|
7752
8115
|
else if (recent !== void 0) units.push(theme6.fg("dim", `last ${actionPhrase(recent)}`));
|
|
7753
8116
|
if (units.length === 0) return null;
|
|
7754
8117
|
return cardUnitsLine(theme6, "doing", units, contentWidth);
|
|
7755
8118
|
}
|
|
7756
|
-
function progressAnswerLines(theme6, progress, runId, contentWidth) {
|
|
8119
|
+
function progressAnswerLines(theme6, progress, runId, contentWidth, contract) {
|
|
7757
8120
|
if (progress.tailText.length === 0) return [];
|
|
7758
8121
|
const gutter = CARD_KV_KEY_WIDTH + 1;
|
|
7759
8122
|
const railWidth = Math.max(1, contentWidth - gutter - 2);
|
|
8123
|
+
const presented = presentWorkerContractAnswer(
|
|
8124
|
+
progress.tailText,
|
|
8125
|
+
contract,
|
|
8126
|
+
progress.droppedLines === 0 && progress.droppedBytes === 0,
|
|
8127
|
+
progress.settled
|
|
8128
|
+
);
|
|
8129
|
+
const source = presented ? [...presented.footer ? [presented.footer] : [], ...presented.lines] : safeWorkerAnswerText(progress.tailText).split("\n");
|
|
7760
8130
|
const wrapped = [];
|
|
7761
|
-
for (const line of
|
|
8131
|
+
for (const line of source) {
|
|
7762
8132
|
for (const row2 of wrapTextWithAnsi(sanitizeCallTargetText(line), railWidth)) wrapped.push(row2);
|
|
7763
8133
|
}
|
|
7764
|
-
const shown = wrapped.slice(Math.max(0, wrapped.length - WORKER_PROGRESS_CARD_ROWS));
|
|
8134
|
+
const shown = progress.settled ? wrapped.slice(0, WORKER_PROGRESS_CARD_ROWS) : wrapped.slice(Math.max(0, wrapped.length - WORKER_PROGRESS_CARD_ROWS));
|
|
7765
8135
|
const hiddenRows = wrapped.length - shown.length;
|
|
7766
8136
|
const rail = theme6.fg("dim", `${GLYPH.rail} `);
|
|
7767
8137
|
const body = shown.map((row2) => `${rail}${theme6.fg("muted", row2)}`);
|
|
7768
8138
|
const hiddenLines = progress.droppedLines + hiddenRows;
|
|
7769
8139
|
if (hiddenLines > 0 || progress.droppedBytes > 0) {
|
|
7770
8140
|
const facts = [
|
|
8141
|
+
`/view dispatch:${runId}`,
|
|
7771
8142
|
...hiddenLines > 0 ? [`${hiddenLines} more line${hiddenLines === 1 ? "" : "s"}`] : [],
|
|
7772
|
-
...progress.droppedBytes > 0 ? [`${progress.droppedBytes} bytes outran the view`] : []
|
|
7773
|
-
`/view dispatch:${runId}`
|
|
8143
|
+
...progress.droppedBytes > 0 ? [`${progress.droppedBytes} bytes outran the view`] : []
|
|
7774
8144
|
];
|
|
7775
8145
|
body.push(`${rail}${theme6.fg("dim", truncateToWidth(facts.join(" \xB7 "), railWidth, "\u2026", false))}`);
|
|
7776
8146
|
}
|
|
7777
8147
|
return body.map((row2, index) => `${index === 0 ? cardKvKey(theme6, "answer") : " ".repeat(gutter)}${row2}`);
|
|
7778
8148
|
}
|
|
7779
|
-
function trustCardLines(theme6, row2, contentWidth) {
|
|
8149
|
+
function trustCardLines(theme6, row2, contentWidth, expanded) {
|
|
7780
8150
|
const gutter = CARD_KV_KEY_WIDTH + 1;
|
|
7781
8151
|
const valueWidth = Math.max(1, contentWidth - gutter);
|
|
8152
|
+
const axes = row2.trust?.axes;
|
|
8153
|
+
const compact2 = !expanded && row2.status === "completed" && row2.trust?.verdict === "unverified" && axes?.artifactIntegrity === "verified" && axes.validationGrounding === "absent" && axes.independentReview === "absent" && axes.autonomyEnforcement === "enforced" && axes.contextProvenance === "recorded" && axes.completionEvidence === "absent";
|
|
7782
8154
|
const trust = row2.trust === void 0 ? theme6.fg("dim", isTerminalStatus(row2.status) ? "receipt not read back" : "not sealed yet") : theme6.fg(
|
|
7783
8155
|
trustVerdictToken(row2.trust.verdict),
|
|
7784
|
-
`${trustVerdictGlyph(row2.trust.verdict)} ${row2.trust.verdict}; ${row2.trust.text}`
|
|
8156
|
+
`${trustVerdictGlyph(row2.trust.verdict)} ${row2.trust.verdict}; ${compact2 ? trustStateWord("validationGrounding", "absent") : row2.trust.text}`
|
|
7785
8157
|
);
|
|
7786
8158
|
const host = row2.hostVerification === void 0 ? "" : ` \xB7 ${theme6.fg("muted", `host checks ${row2.hostVerification}`)}`;
|
|
7787
8159
|
return wrapTextWithAnsi(`${trust}${host}`, valueWidth).map(
|
|
@@ -7800,7 +8172,6 @@ function renderDispatchCard(row2, width, evidence, options = {}) {
|
|
|
7800
8172
|
});
|
|
7801
8173
|
const statusStr = theme6.fg(presentation.token, `${presentation.glyph} ${presentation.label}`);
|
|
7802
8174
|
const ttft = row2.ttftMs !== null ? `${row2.ttftMs}ms` : row2.status === "running" ? `waiting${GLYPH.ellipsis}` : "n/a";
|
|
7803
|
-
const target = `${theme6.fg("muted", `${row2.runtimeKind}:${row2.targetId}`)} ${theme6.fg("dim", "\u25B8")} ${theme6.fg("muted", row2.wireModelId)}`;
|
|
7804
8175
|
const selectionWidth = options.selected === true ? visibleWidth(GLYPH.cursor) + 1 : 0;
|
|
7805
8176
|
const rowPrefix = dispatchRowPrefix(theme6, row2);
|
|
7806
8177
|
const labelBudget = Math.max(1, width - visibleWidth(elapsed) - 10 - selectionWidth - rowPrefix.width);
|
|
@@ -7815,7 +8186,8 @@ function renderDispatchCard(row2, width, evidence, options = {}) {
|
|
|
7815
8186
|
`${GLYPH.down} ${formatFooterTokens(row2.outputTokens)}${showRate ? ` (${tokensPerSec}/s)` : ""}`
|
|
7816
8187
|
);
|
|
7817
8188
|
const total = theme6.fg("muted", `total ${formatFooterTokens(row2.tokenCount)}`);
|
|
7818
|
-
const
|
|
8189
|
+
const targetKey = cardKvKey(theme6, "target");
|
|
8190
|
+
const targetLine = `${targetKey}${theme6.fg("muted", fitIdentityLabel(sanitizeCallTargetText(`${row2.runtimeKind}:${row2.targetId} \u25B8 ${row2.wireModelId}`), Math.max(1, contentWidth - visibleWidth(targetKey))))}`;
|
|
7819
8191
|
const statusUnits = [
|
|
7820
8192
|
statusStr,
|
|
7821
8193
|
theme6.fg("muted", `node ${row2.node ?? "local"}`),
|
|
@@ -7833,19 +8205,21 @@ function renderDispatchCard(row2, width, evidence, options = {}) {
|
|
|
7833
8205
|
];
|
|
7834
8206
|
const contextUnit = formatWorkerContextMeter(row2.lastContextTokens ?? 0, row2.contextWindow, theme6);
|
|
7835
8207
|
const phaseCell = formatDispatchPhaseCell(row2.phase, contentWidth);
|
|
8208
|
+
const fullTask = row2.taskSummary ? cardWrappedValueLines(theme6, "task", theme6.fg("muted", row2.taskSummary), contentWidth) : [];
|
|
8209
|
+
const taskLines = options.expanded === true || fullTask.length <= 3 ? fullTask : [...fullTask.slice(0, 2), theme6.fg("dim", "\u2026 Enter detail for full task")];
|
|
7836
8210
|
const bodyLines2 = [
|
|
7837
8211
|
cardUnitsLine(theme6, "run", [theme6.fg("dim", row2.runId)], contentWidth),
|
|
7838
|
-
cardUnitsLine(
|
|
8212
|
+
...phaseCell === null ? [] : [cardUnitsLine(theme6, "phase", [theme6.fg("info", phaseCell)], contentWidth)],
|
|
8213
|
+
...options.expanded === true ? cardWrappedValueLines(
|
|
7839
8214
|
theme6,
|
|
7840
|
-
"
|
|
7841
|
-
|
|
8215
|
+
"target",
|
|
8216
|
+
theme6.fg("muted", sanitizeCallTargetText(`${row2.runtimeKind}:${row2.targetId} \u25B8 ${row2.wireModelId}`)),
|
|
7842
8217
|
contentWidth
|
|
7843
|
-
),
|
|
7844
|
-
|
|
7845
|
-
...row2.taskSummary ? cardWrappedValueLines(theme6, "task", theme6.fg("muted", row2.taskSummary), contentWidth) : [],
|
|
8218
|
+
) : [targetLine],
|
|
8219
|
+
...taskLines,
|
|
7846
8220
|
cardUnitsLine(theme6, "status", statusUnits, contentWidth),
|
|
7847
|
-
...trustCardLines(theme6, row2, contentWidth),
|
|
7848
|
-
...row2.budget !== void 0 ? [
|
|
8221
|
+
...trustCardLines(theme6, row2, contentWidth, options.expanded === true),
|
|
8222
|
+
...options.expanded === true && row2.budget !== void 0 ? [
|
|
7849
8223
|
...cardWrappedValueLines(
|
|
7850
8224
|
theme6,
|
|
7851
8225
|
"policy",
|
|
@@ -7877,17 +8251,18 @@ function renderDispatchCard(row2, width, evidence, options = {}) {
|
|
|
7877
8251
|
}
|
|
7878
8252
|
const currentTool = row2.currentTool ?? null;
|
|
7879
8253
|
const recentTools = row2.recentTools ?? [];
|
|
7880
|
-
if (currentTool !== null || recentTools.length > 0) {
|
|
8254
|
+
if (!row2.progress && (currentTool !== null || recentTools.length > 0)) {
|
|
7881
8255
|
const toolUnits = [
|
|
7882
8256
|
currentTool !== null ? theme6.fg("action", `${currentTool} running`) : theme6.fg("dim", "idle"),
|
|
7883
8257
|
...recentTools.length > 0 ? [theme6.fg("muted", `recent ${recentTools.join(" ")}`)] : []
|
|
7884
8258
|
];
|
|
7885
8259
|
bodyLines2.push(cardUnitsLine(theme6, "tools", toolUnits, contentWidth));
|
|
7886
8260
|
}
|
|
7887
|
-
if (
|
|
8261
|
+
if (row2.progress) {
|
|
7888
8262
|
const doing = progressActionLine(theme6, row2.progress, contentWidth);
|
|
7889
8263
|
if (doing !== null) bodyLines2.push(doing);
|
|
7890
|
-
|
|
8264
|
+
if (options.expanded === true)
|
|
8265
|
+
bodyLines2.push(...progressAnswerLines(theme6, row2.progress, row2.runId, contentWidth, row2.resultContract));
|
|
7891
8266
|
}
|
|
7892
8267
|
if (row2.steerAcknowledgement) {
|
|
7893
8268
|
bodyLines2.push(
|
|
@@ -8050,8 +8425,8 @@ function renderCouncilCard(group, width) {
|
|
|
8050
8425
|
function formatDispatchBoardLines(rows, width = 76, observability, selectedRunId, detailExpanded = false) {
|
|
8051
8426
|
if (rows.length === 0) {
|
|
8052
8427
|
const theme6 = clioTheme();
|
|
8053
|
-
const lines = ["", "No fleet runs yet", "
|
|
8054
|
-
return lines.map((line) => {
|
|
8428
|
+
const lines = ["", "No fleet runs yet", "Use /run or /delegate to start a run.", ""];
|
|
8429
|
+
return lines.flatMap((line) => wrapTextWithAnsi(line, Math.max(1, width))).map((line) => {
|
|
8055
8430
|
const padding = Math.max(0, Math.floor((width - visibleWidth(line)) / 2));
|
|
8056
8431
|
return theme6.fg("dim", " ".repeat(padding) + line);
|
|
8057
8432
|
});
|
|
@@ -8199,6 +8574,7 @@ function toRow(entry, now) {
|
|
|
8199
8574
|
const progress = entry.progress;
|
|
8200
8575
|
return {
|
|
8201
8576
|
...progress !== void 0 ? { progress } : {},
|
|
8577
|
+
...entry.resultContract !== void 0 ? { resultContract: entry.resultContract } : {},
|
|
8202
8578
|
runId: entry.runId,
|
|
8203
8579
|
agentId: entry.agentId,
|
|
8204
8580
|
...entry.agentAudience !== void 0 ? { agentAudience: entry.agentAudience } : {},
|
|
@@ -9196,17 +9572,18 @@ function compactPrimaryLine(workspace, _session, width, theme6 = clioTheme(), st
|
|
|
9196
9572
|
const safeWidth = Math.max(1, Math.floor(width));
|
|
9197
9573
|
let git = safeWidth >= COMPACT_GIT_MIN_WIDTH ? gitChip(theme6, workspace.branch, workspace.dirty) : null;
|
|
9198
9574
|
let right = buildHarnessStatePill(theme6, status, toolCounts, dispatchRows, tick, now, safeWidth, true);
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
right = buildHarnessStatePill(theme6, status, toolCounts, dispatchRows, tick, now, safeWidth, false);
|
|
9202
|
-
}
|
|
9575
|
+
const cwd = fitIdentityLabel(workspace.cwd, Math.max(8, safeWidth - visibleWidth(right) - 1));
|
|
9576
|
+
let left = joinSections(theme6, [theme6.fg("muted", cwd), git]);
|
|
9203
9577
|
if (git && visibleWidth(left) + 1 + visibleWidth(right) > safeWidth) {
|
|
9204
9578
|
git = null;
|
|
9205
|
-
left = theme6.fg("muted",
|
|
9579
|
+
left = theme6.fg("muted", cwd);
|
|
9580
|
+
}
|
|
9581
|
+
if (visibleWidth(left) + 1 + visibleWidth(right) > safeWidth) {
|
|
9582
|
+
right = buildHarnessStatePill(theme6, status, toolCounts, dispatchRows, tick, now, safeWidth, false);
|
|
9206
9583
|
}
|
|
9207
9584
|
if (visibleWidth(left) + 1 + visibleWidth(right) > safeWidth) {
|
|
9208
9585
|
const maxCwdWidth = Math.max(1, safeWidth - visibleWidth(right) - 1);
|
|
9209
|
-
left = theme6.fg("muted",
|
|
9586
|
+
left = theme6.fg("muted", fitIdentityLabel(workspace.cwd, maxCwdWidth));
|
|
9210
9587
|
}
|
|
9211
9588
|
return joinColumns(left, right, safeWidth);
|
|
9212
9589
|
}
|
|
@@ -9790,7 +10167,7 @@ function outputStyleLabel(verbosity) {
|
|
|
9790
10167
|
}
|
|
9791
10168
|
function buildHarnessStatePill(theme6, status, toolCounts, dispatchRows, tick, now, width, showBadge = true, fleetSummaryIsAction = false) {
|
|
9792
10169
|
const safeWidth = Math.max(1, Math.floor(width));
|
|
9793
|
-
const badge = showBadge
|
|
10170
|
+
const badge = showBadge ? harnessBadge(theme6, status, toolCounts, dispatchRows, fleetSummaryIsAction) : "";
|
|
9794
10171
|
if (status.phase === "idle") return badge;
|
|
9795
10172
|
const phase = harnessPhasePresentation(status, safeWidth, now);
|
|
9796
10173
|
const lead = phase.live ? spinnerFrame2(tick) : phase.glyph;
|
|
@@ -10799,11 +11176,12 @@ var WorkspaceArtifactProvider = class {
|
|
|
10799
11176
|
{
|
|
10800
11177
|
id: `workspace:${path2}`,
|
|
10801
11178
|
category: this.category,
|
|
10802
|
-
title: safeTitle(`${
|
|
11179
|
+
title: safeTitle(`${basename(path2)} \xB7 ${relative4(workspace, path2)} \xB7 ${artifact.tool}${kind}`, basename(path2)),
|
|
10803
11180
|
timestamp: parseTime(artifact.timestamp),
|
|
10804
11181
|
sizeBytes: maybeSizeBytes(path2),
|
|
10805
11182
|
path: path2,
|
|
10806
|
-
description: `${artifact.tool}${kind} \xB7 ${overwriteLabel}`,
|
|
11183
|
+
description: `${artifact.tool}${kind} \xB7 ${overwriteLabel} \xB7 Workspace: ${workspace} \xB7 Turn: ${artifact.turnId}`,
|
|
11184
|
+
...this.deps.sessionMeta ? { sessionId: this.deps.sessionMeta.id } : {},
|
|
10807
11185
|
toolName: artifact.tool,
|
|
10808
11186
|
searchText: [
|
|
10809
11187
|
artifact.path,
|
|
@@ -11818,6 +12196,7 @@ function chatMessageText(entry) {
|
|
|
11818
12196
|
var LEADING_SYSTEM_REMINDER = /^\s*<system-reminder>[\s\S]*?<\/system-reminder>\s*/u;
|
|
11819
12197
|
function replayedUserText(entry) {
|
|
11820
12198
|
const obj = payloadObject3(entry.payload);
|
|
12199
|
+
if (typeof obj?.displayText === "string" && obj.displayText.length > 0) return obj.displayText;
|
|
11821
12200
|
if (typeof obj?.operatorText === "string") return obj.operatorText;
|
|
11822
12201
|
let text = extractTurnText(entry.payload);
|
|
11823
12202
|
for (; ; ) {
|
|
@@ -11922,7 +12301,7 @@ function renderBashExecutionEntry(entry, width, detail, unbounded) {
|
|
|
11922
12301
|
{ unbounded, diffStyle: "plain", detail }
|
|
11923
12302
|
);
|
|
11924
12303
|
}
|
|
11925
|
-
function renderRetryStatusEntry(entry, width) {
|
|
12304
|
+
function renderRetryStatusEntry(entry, width, detail, unbounded, terminalRows) {
|
|
11926
12305
|
const data = payloadObject3(entry.data);
|
|
11927
12306
|
if (!data) return wrapTextWithAnsi(styleTaggedNotice("[retry] status"), width);
|
|
11928
12307
|
const rawPhase = data.phase;
|
|
@@ -11940,7 +12319,7 @@ function renderRetryStatusEntry(entry, width) {
|
|
|
11940
12319
|
...typeof data.delayMs === "number" ? { delayMs: data.delayMs } : {},
|
|
11941
12320
|
...typeof data.seconds === "number" ? { seconds: data.seconds } : {}
|
|
11942
12321
|
};
|
|
11943
|
-
return
|
|
12322
|
+
return renderRetryStatus(status, width, detail, unbounded, terminalRows);
|
|
11944
12323
|
}
|
|
11945
12324
|
function rendersCustomEntry(entry) {
|
|
11946
12325
|
if (entry.display === false) return false;
|
|
@@ -11949,8 +12328,8 @@ function rendersCustomEntry(entry) {
|
|
|
11949
12328
|
if (entry.customType === HANDOFF_SEED_CUSTOM_TYPE || entry.customType === HANDOFF_NOTE_CUSTOM_TYPE) return true;
|
|
11950
12329
|
return entry.display === true;
|
|
11951
12330
|
}
|
|
11952
|
-
function renderCustomEntry(entry, width) {
|
|
11953
|
-
if (entry.customType === "retryStatus") return renderRetryStatusEntry(entry, width);
|
|
12331
|
+
function renderCustomEntry(entry, width, detail, unbounded, terminalRows) {
|
|
12332
|
+
if (entry.customType === "retryStatus") return renderRetryStatusEntry(entry, width, detail, unbounded, terminalRows);
|
|
11954
12333
|
if (entry.customType === HANDOFF_SEED_CUSTOM_TYPE && isHandoffSeedData(entry.data)) {
|
|
11955
12334
|
return wrapTextWithAnsi(styleTaggedNotice(`[handoff] carried from session ${entry.data.fromSessionId}`), width);
|
|
11956
12335
|
}
|
|
@@ -12243,9 +12622,13 @@ function rehydrateChatPanelFromTurns(chatPanel, turns, options = {}) {
|
|
|
12243
12622
|
message.stopReason = failure2.stopReason;
|
|
12244
12623
|
message.errorMessage = failure2.errorMessage;
|
|
12245
12624
|
}
|
|
12625
|
+
const stopReason = message.stopReason;
|
|
12626
|
+
const terminalFailure = stopReason === "error" || stopReason === "aborted" || stopReason === "length";
|
|
12627
|
+
const continues = !terminalFailure && (stopReason === "toolUse" || hasStructuredToolCall(message));
|
|
12628
|
+
if (continues) chatPanel.applyEvent({ type: "message_start", message });
|
|
12246
12629
|
chatPanel.applyEvent({ type: "message_end", message });
|
|
12247
12630
|
runAssistantMessages.push(message);
|
|
12248
|
-
chatPanel.applyEvent({ type: "agent_end", messages: runAssistantMessages });
|
|
12631
|
+
if (!continues) chatPanel.applyEvent({ type: "agent_end", messages: runAssistantMessages });
|
|
12249
12632
|
}
|
|
12250
12633
|
break;
|
|
12251
12634
|
}
|
|
@@ -12321,7 +12704,10 @@ function rehydrateChatPanelFromTurns(chatPanel, turns, options = {}) {
|
|
|
12321
12704
|
break;
|
|
12322
12705
|
}
|
|
12323
12706
|
case "custom":
|
|
12324
|
-
if (rendersCustomEntry(entry))
|
|
12707
|
+
if (rendersCustomEntry(entry))
|
|
12708
|
+
chatPanel.appendReplayBlock(
|
|
12709
|
+
(width, detail, unbounded, terminalRows = 40) => renderCustomEntry(entry, width, detail, unbounded === true || options.unboundedToolBodies === true, terminalRows)
|
|
12710
|
+
);
|
|
12325
12711
|
break;
|
|
12326
12712
|
case "modelChange":
|
|
12327
12713
|
chatPanel.appendReplayBlock((width) => renderModelChangeEntry(entry, width));
|
|
@@ -13797,7 +14183,7 @@ function createTurnPersistence(deps) {
|
|
|
13797
14183
|
});
|
|
13798
14184
|
finishTracedTurn("success", null);
|
|
13799
14185
|
},
|
|
13800
|
-
appendSubmittedUserTurn(agentRuntime, text, images, synthetic, operatorText) {
|
|
14186
|
+
appendSubmittedUserTurn(agentRuntime, text, images, synthetic, operatorText, displayText) {
|
|
13801
14187
|
if (!deps.session) return null;
|
|
13802
14188
|
if (!deps.session.current()) {
|
|
13803
14189
|
deps.session.create({
|
|
@@ -13808,6 +14194,7 @@ function createTurnPersistence(deps) {
|
|
|
13808
14194
|
}
|
|
13809
14195
|
const payload = images ? { content: [{ type: "text", text }, ...images] } : { text };
|
|
13810
14196
|
if (operatorText !== void 0 && operatorText !== text) payload.operatorText = operatorText;
|
|
14197
|
+
if (displayText !== void 0 && displayText !== (operatorText ?? text)) payload.displayText = displayText;
|
|
13811
14198
|
if (synthetic) {
|
|
13812
14199
|
payload.synthetic = true;
|
|
13813
14200
|
payload.source = "middleware_request_continuation";
|
|
@@ -14199,7 +14586,7 @@ function createTurnPrewarm(deps) {
|
|
|
14199
14586
|
async settled() {
|
|
14200
14587
|
let outcome;
|
|
14201
14588
|
do {
|
|
14202
|
-
await new Promise((
|
|
14589
|
+
await new Promise((resolve11) => setTimeout(resolve11, 0));
|
|
14203
14590
|
outcome = await inFlight;
|
|
14204
14591
|
} while (timer !== null || running !== null || pendingTrigger !== null);
|
|
14205
14592
|
return outcome;
|
|
@@ -14362,7 +14749,7 @@ function createTurnRecovery(deps) {
|
|
|
14362
14749
|
deps.emitFailureMessage(message);
|
|
14363
14750
|
};
|
|
14364
14751
|
const waitForRetryCountdown = async (status) => {
|
|
14365
|
-
return new Promise((
|
|
14752
|
+
return new Promise((resolve11) => {
|
|
14366
14753
|
let settled = false;
|
|
14367
14754
|
let currentHandle = null;
|
|
14368
14755
|
const handle = createRetryCountdown({
|
|
@@ -14379,12 +14766,12 @@ function createTurnRecovery(deps) {
|
|
|
14379
14766
|
onDone: () => {
|
|
14380
14767
|
settled = true;
|
|
14381
14768
|
if (retryCountdown2 === currentHandle) retryCountdown2 = null;
|
|
14382
|
-
|
|
14769
|
+
resolve11("done");
|
|
14383
14770
|
},
|
|
14384
14771
|
onCancel: () => {
|
|
14385
14772
|
settled = true;
|
|
14386
14773
|
if (retryCountdown2 === currentHandle) retryCountdown2 = null;
|
|
14387
|
-
|
|
14774
|
+
resolve11("cancelled");
|
|
14388
14775
|
}
|
|
14389
14776
|
});
|
|
14390
14777
|
currentHandle = handle;
|
|
@@ -14470,7 +14857,6 @@ function createTurnRecovery(deps) {
|
|
|
14470
14857
|
maxAttempts: settings.maxRetries,
|
|
14471
14858
|
errorMessage: message
|
|
14472
14859
|
});
|
|
14473
|
-
deps.emitNotice(message);
|
|
14474
14860
|
pruneFailedAssistantFromContext(agentRuntime.agent);
|
|
14475
14861
|
return true;
|
|
14476
14862
|
}
|
|
@@ -14893,18 +15279,24 @@ function createTurnRuntime(deps) {
|
|
|
14893
15279
|
stallTimer = setTimeout(
|
|
14894
15280
|
() => {
|
|
14895
15281
|
stallTimer = null;
|
|
14896
|
-
const
|
|
14897
|
-
if (
|
|
15282
|
+
const retry = deps.retrySettings();
|
|
15283
|
+
if (retry.streamStallMs <= 0) return;
|
|
14898
15284
|
if (stallSuspendDepth > 0 || toolsInFlight > 0) {
|
|
14899
|
-
armStallTimer(
|
|
15285
|
+
armStallTimer(retry.streamStallMs);
|
|
15286
|
+
return;
|
|
15287
|
+
}
|
|
15288
|
+
const awaitingFirstToken = apiCallStartedAt !== null && apiCallFirstDeltaAt === null;
|
|
15289
|
+
if (awaitingFirstToken && retry.firstTokenStallMs <= 0) {
|
|
15290
|
+
armStallTimer(retry.streamStallMs);
|
|
14900
15291
|
return;
|
|
14901
15292
|
}
|
|
15293
|
+
const stallMs = awaitingFirstToken ? Math.max(retry.firstTokenStallMs, retry.streamStallMs) : retry.streamStallMs;
|
|
14902
15294
|
const idleMs = performance3.now() - lastActivityAt;
|
|
14903
15295
|
if (idleMs < stallMs) {
|
|
14904
15296
|
armStallTimer(stallMs - idleMs);
|
|
14905
15297
|
return;
|
|
14906
15298
|
}
|
|
14907
|
-
state.streamStallReason = `stream stalled: no output from ${localRuntime.targetId} for ${Math.round(idleMs / 1e3)}s, aborting (stream timeout)`;
|
|
15299
|
+
state.streamStallReason = `stream stalled: no ${awaitingFirstToken ? "first token" : "output"} from ${localRuntime.targetId} for ${Math.round(idleMs / 1e3)}s, aborting (stream timeout)`;
|
|
14908
15300
|
localRuntime.agent.abort();
|
|
14909
15301
|
},
|
|
14910
15302
|
Math.max(1, delayMs)
|
|
@@ -15013,7 +15405,12 @@ function createTurnRuntime(deps) {
|
|
|
15013
15405
|
const assistantEvent = publicEvent.assistantMessageEvent;
|
|
15014
15406
|
const hasDelta = assistantEvent.type === "toolcall_start" || (assistantEvent.type === "text_delta" || assistantEvent.type === "thinking_delta" || assistantEvent.type === "toolcall_delta") && typeof assistantEvent.delta === "string" && assistantEvent.delta.length > 0;
|
|
15015
15407
|
if (hasDelta && firstAssistantDeltaAt === null) firstAssistantDeltaAt = eventClock;
|
|
15016
|
-
if (hasDelta && apiCallFirstDeltaAt === null)
|
|
15408
|
+
if (hasDelta && apiCallFirstDeltaAt === null) {
|
|
15409
|
+
apiCallFirstDeltaAt = eventClock;
|
|
15410
|
+
const stallMs = deps.retrySettings().streamStallMs;
|
|
15411
|
+
clearStallTimer();
|
|
15412
|
+
if (stallMs > 0) armStallTimer(stallMs);
|
|
15413
|
+
}
|
|
15017
15414
|
}
|
|
15018
15415
|
if (enrichedEvent.type === "agent_end") {
|
|
15019
15416
|
context.noteRunCacheSummary(enrichedEvent.messages, runFirstCallVerdict);
|
|
@@ -15253,7 +15650,7 @@ function createChatLoop(deps) {
|
|
|
15253
15650
|
const current = skillSurfaceNames(next).join(", ");
|
|
15254
15651
|
if (deps.session?.current() && (explicitOff || previous.length > 0 || (policy?.loadedSkillNames.size ?? 0) > 0 || (policy?.requests.length ?? 0) > 0)) {
|
|
15255
15652
|
const entries = filterEntriesToActivePath(deps.readSessionEntries?.() ?? [], state.lastTurnId ?? void 0);
|
|
15256
|
-
const selection = next ? mainSkillContextState(entries, next) :
|
|
15653
|
+
const selection = next ? mainSkillContextState(entries, next) : policy !== void 0 && policy.loadedSkillNames.size > 0 ? mainSkillContextState(entries, policy) : { version: 1, activationRefs: [] };
|
|
15257
15654
|
const data = selection ?? { version: 1, activationRefs: [], unknown: true };
|
|
15258
15655
|
if (JSON.stringify(data) !== JSON.stringify(latestSkillContextState(entries))) {
|
|
15259
15656
|
deps.session.appendEntry({ kind: "custom", customType: SKILL_CONTEXT_STATE, parentTurnId: state.lastTurnId, data });
|
|
@@ -15677,7 +16074,8 @@ function createChatLoop(deps) {
|
|
|
15677
16074
|
submittedText,
|
|
15678
16075
|
images,
|
|
15679
16076
|
options.requestContinuation === true,
|
|
15680
|
-
text
|
|
16077
|
+
text,
|
|
16078
|
+
options.display?.text
|
|
15681
16079
|
);
|
|
15682
16080
|
if (interrupted)
|
|
15683
16081
|
emit({
|
|
@@ -16028,8 +16426,8 @@ function createChatLoop(deps) {
|
|
|
16028
16426
|
const previous = admissionTail;
|
|
16029
16427
|
let release = () => {
|
|
16030
16428
|
};
|
|
16031
|
-
const ticket = new Promise((
|
|
16032
|
-
release =
|
|
16429
|
+
const ticket = new Promise((resolve11) => {
|
|
16430
|
+
release = resolve11;
|
|
16033
16431
|
});
|
|
16034
16432
|
admissionTail = ticket;
|
|
16035
16433
|
const releaseTicket = () => {
|
|
@@ -16280,9 +16678,6 @@ function parseViewFilterQuery(query) {
|
|
|
16280
16678
|
function isNonEmptySearchValue(value) {
|
|
16281
16679
|
return typeof value === "string" && value.trim().length > 0;
|
|
16282
16680
|
}
|
|
16283
|
-
function broadFilterText(artifact) {
|
|
16284
|
-
return `${artifact.id} ${artifact.category} ${artifact.title}`;
|
|
16285
|
-
}
|
|
16286
16681
|
function artifactSearchValues(artifact) {
|
|
16287
16682
|
return [
|
|
16288
16683
|
artifact.id,
|
|
@@ -16298,8 +16693,9 @@ function artifactSearchValues(artifact) {
|
|
|
16298
16693
|
...artifact.searchText ?? []
|
|
16299
16694
|
].filter(isNonEmptySearchValue);
|
|
16300
16695
|
}
|
|
16301
|
-
function
|
|
16302
|
-
|
|
16696
|
+
function matchesFilterText(artifact, query) {
|
|
16697
|
+
const values = artifactSearchValues(artifact).map((value) => value.toLocaleLowerCase());
|
|
16698
|
+
return query.toLocaleLowerCase().split(/\s+/u).every((token) => values.some((value) => value.includes(token)));
|
|
16303
16699
|
}
|
|
16304
16700
|
function matchesExactArtifactValue(artifact, value) {
|
|
16305
16701
|
const exact = value.trim();
|
|
@@ -16330,10 +16726,10 @@ function filterViewArtifacts(artifacts, query) {
|
|
|
16330
16726
|
if (parsed.kind === "category") {
|
|
16331
16727
|
const categoryArtifacts = artifacts.filter((artifact) => artifact.category === parsed.category);
|
|
16332
16728
|
if (parsed.value.length === 0) return categoryArtifacts;
|
|
16333
|
-
return
|
|
16729
|
+
return categoryArtifacts.filter((artifact) => matchesFilterText(artifact, parsed.value));
|
|
16334
16730
|
}
|
|
16335
16731
|
if (parsed.text.length === 0) return [...artifacts];
|
|
16336
|
-
return
|
|
16732
|
+
return artifacts.filter((artifact) => matchesFilterText(artifact, parsed.text));
|
|
16337
16733
|
}
|
|
16338
16734
|
function artifactsInCategoryOrder(artifacts) {
|
|
16339
16735
|
return VIEW_ARTIFACT_CATEGORIES.flatMap((category) => artifacts.filter((artifact) => artifact.category === category));
|
|
@@ -16475,6 +16871,7 @@ function viewFooterHint(focus, canVerify, innerWidth) {
|
|
|
16475
16871
|
{ key: "PgUp/PgDn", verb: "page" },
|
|
16476
16872
|
{ key: "g/G", verb: "top/bottom" },
|
|
16477
16873
|
...canVerify ? [{ key: "v", verb: "verify" }] : [],
|
|
16874
|
+
{ key: "i", verb: "info" },
|
|
16478
16875
|
{ key: "o", verb: "path" }
|
|
16479
16876
|
],
|
|
16480
16877
|
"back"
|
|
@@ -16484,7 +16881,7 @@ var ViewOverlayView = class {
|
|
|
16484
16881
|
constructor(options) {
|
|
16485
16882
|
this.options = options;
|
|
16486
16883
|
this.filterText = options.initialFilter ?? "";
|
|
16487
|
-
this.filterInput.
|
|
16884
|
+
this.filterInput.handleInput(`\x1B[200~${this.filterText}\x1B[201~`);
|
|
16488
16885
|
}
|
|
16489
16886
|
options;
|
|
16490
16887
|
artifacts = [];
|
|
@@ -16508,25 +16905,36 @@ var ViewOverlayView = class {
|
|
|
16508
16905
|
artifactError = null;
|
|
16509
16906
|
content = null;
|
|
16510
16907
|
loadToken = 0;
|
|
16908
|
+
refreshToken = 0;
|
|
16909
|
+
showProvenance = false;
|
|
16511
16910
|
lastContentWidth = 80;
|
|
16512
16911
|
lastContentBodyHeight = 1;
|
|
16513
16912
|
verifications = /* @__PURE__ */ new Map();
|
|
16514
16913
|
refresh() {
|
|
16914
|
+
const refreshToken = ++this.refreshToken;
|
|
16915
|
+
const selected = this.selectedArtifact();
|
|
16916
|
+
this.loadToken += 1;
|
|
16515
16917
|
this.loadingArtifacts = true;
|
|
16516
16918
|
this.artifactError = null;
|
|
16517
16919
|
this.options.requestRender?.();
|
|
16518
16920
|
void (async () => {
|
|
16519
16921
|
try {
|
|
16520
|
-
|
|
16521
|
-
|
|
16922
|
+
const artifacts = await listViewArtifacts(this.options.providers);
|
|
16923
|
+
if (refreshToken !== this.refreshToken) return;
|
|
16924
|
+
this.artifacts = artifacts;
|
|
16925
|
+
const retainedIndex = selected ? this.filteredArtifacts().findIndex((artifact) => artifactKey(artifact) === artifactKey(selected)) : -1;
|
|
16926
|
+
this.selectedIndex = retainedIndex >= 0 ? retainedIndex : initialViewSelection(this.artifacts, this.filterText);
|
|
16522
16927
|
this.contentScrollOffset = 0;
|
|
16523
16928
|
this.content = null;
|
|
16524
16929
|
} catch (err) {
|
|
16930
|
+
if (refreshToken !== this.refreshToken) return;
|
|
16525
16931
|
this.artifactError = err instanceof Error ? err.message : String(err);
|
|
16526
16932
|
this.artifacts = [];
|
|
16527
16933
|
} finally {
|
|
16528
|
-
this.
|
|
16529
|
-
|
|
16934
|
+
if (refreshToken === this.refreshToken) {
|
|
16935
|
+
this.loadingArtifacts = false;
|
|
16936
|
+
this.options.requestRender?.();
|
|
16937
|
+
}
|
|
16530
16938
|
}
|
|
16531
16939
|
})();
|
|
16532
16940
|
}
|
|
@@ -16542,6 +16950,8 @@ var ViewOverlayView = class {
|
|
|
16542
16950
|
return filtered[this.selectedIndex];
|
|
16543
16951
|
}
|
|
16544
16952
|
selectIndex(next) {
|
|
16953
|
+
this.loadToken += 1;
|
|
16954
|
+
this.showProvenance = false;
|
|
16545
16955
|
const filtered = this.filteredArtifacts();
|
|
16546
16956
|
if (filtered.length === 0) {
|
|
16547
16957
|
this.selectedIndex = 0;
|
|
@@ -16562,14 +16972,17 @@ var ViewOverlayView = class {
|
|
|
16562
16972
|
this.selectIndex(initialViewSelection(this.artifacts, this.filterText));
|
|
16563
16973
|
}
|
|
16564
16974
|
ensureContentLoaded(artifact) {
|
|
16565
|
-
if (!artifact)
|
|
16975
|
+
if (!artifact) {
|
|
16976
|
+
this.content = null;
|
|
16977
|
+
return;
|
|
16978
|
+
}
|
|
16566
16979
|
const key = artifactKey(artifact);
|
|
16567
16980
|
if (this.content?.key === key) return;
|
|
16568
16981
|
const token = ++this.loadToken;
|
|
16569
16982
|
this.content = { key, status: "loading", lines: [clioTheme().fg("dim", "loading artifact\u2026")], format: "text" };
|
|
16570
16983
|
void (async () => {
|
|
16571
16984
|
try {
|
|
16572
|
-
const loaded = await artifact.load();
|
|
16985
|
+
const loaded = await Promise.resolve().then(() => artifact.load());
|
|
16573
16986
|
if (token !== this.loadToken) return;
|
|
16574
16987
|
this.content = { key, status: "loaded", lines: loaded.lines, format: loaded.format };
|
|
16575
16988
|
} catch (err) {
|
|
@@ -16588,6 +17001,20 @@ var ViewOverlayView = class {
|
|
|
16588
17001
|
})();
|
|
16589
17002
|
}
|
|
16590
17003
|
renderedContentLines(width) {
|
|
17004
|
+
if (this.showProvenance) {
|
|
17005
|
+
const artifact = this.selectedArtifact();
|
|
17006
|
+
if (!artifact) return [];
|
|
17007
|
+
return [
|
|
17008
|
+
`Title: ${artifact.title}`,
|
|
17009
|
+
`Category: ${artifact.category}`,
|
|
17010
|
+
`ID: ${artifact.id}`,
|
|
17011
|
+
`Path: ${artifact.path ?? "No backing path"}`,
|
|
17012
|
+
...artifact.sessionId ? [`Session: ${artifact.sessionId}`] : [],
|
|
17013
|
+
...artifact.runId ? [`Run: ${artifact.runId}`] : [],
|
|
17014
|
+
...artifact.correlationId ? [`Correlation: ${artifact.correlationId}`] : [],
|
|
17015
|
+
...artifact.description ? [`Details: ${artifact.description}`] : []
|
|
17016
|
+
].flatMap((line) => wrapTextWithAnsi(sanitizeCallTargetText(line), Math.max(1, width)));
|
|
17017
|
+
}
|
|
16591
17018
|
const content = this.content;
|
|
16592
17019
|
if (!content) return [];
|
|
16593
17020
|
if (content.status === "error") return content.lines.flatMap((line) => wrapTextWithAnsi(line, Math.max(1, width)));
|
|
@@ -16614,10 +17041,30 @@ var ViewOverlayView = class {
|
|
|
16614
17041
|
return this.fixedLines(lines, width, height);
|
|
16615
17042
|
}
|
|
16616
17043
|
const filtered = this.filteredArtifacts();
|
|
16617
|
-
|
|
17044
|
+
lines.push(
|
|
17045
|
+
padAnsi(
|
|
17046
|
+
theme6.fg(
|
|
17047
|
+
this.focus === "list" ? "accent" : "dim",
|
|
17048
|
+
`List \xB7 ${filtered.length}/${this.artifacts.length} \xB7 \u2190\u2192 category`
|
|
17049
|
+
),
|
|
17050
|
+
width,
|
|
17051
|
+
ELLIPSIS
|
|
17052
|
+
)
|
|
17053
|
+
);
|
|
17054
|
+
if (filtered.length === 0)
|
|
17055
|
+
return this.fixedLines(
|
|
17056
|
+
[
|
|
17057
|
+
...lines,
|
|
17058
|
+
theme6.fg("dim", "No matching details."),
|
|
17059
|
+
theme6.fg("muted", "Ctrl+U clears the filter."),
|
|
17060
|
+
theme6.fg("dim", "Try workspace: or receipt:")
|
|
17061
|
+
],
|
|
17062
|
+
width,
|
|
17063
|
+
height
|
|
17064
|
+
);
|
|
16618
17065
|
const rows = groupedViewRows(filtered);
|
|
16619
17066
|
const selectedRow = rows.findIndex((row2) => row2.type === "item" && row2.itemIndex === this.selectedIndex);
|
|
16620
|
-
const rowHeight = Math.max(1, height -
|
|
17067
|
+
const rowHeight = Math.max(1, height - lines.length);
|
|
16621
17068
|
if (selectedRow >= 0) {
|
|
16622
17069
|
if (selectedRow < this.listScrollOffset) this.listScrollOffset = selectedRow;
|
|
16623
17070
|
if (selectedRow >= this.listScrollOffset + rowHeight) this.listScrollOffset = selectedRow - rowHeight + 1;
|
|
@@ -16653,7 +17100,17 @@ var ViewOverlayView = class {
|
|
|
16653
17100
|
this.ensureContentLoaded(artifact);
|
|
16654
17101
|
this.lastContentWidth = width;
|
|
16655
17102
|
const verification = artifact ? this.verifications.get(artifactKey(artifact)) : void 0;
|
|
16656
|
-
const header =
|
|
17103
|
+
const header = [
|
|
17104
|
+
padAnsi(
|
|
17105
|
+
clioTheme().fg(
|
|
17106
|
+
this.focus === "content" ? "accent" : "dim",
|
|
17107
|
+
this.showProvenance ? "Provenance \xB7 i preview \xB7 Esc list" : this.focus === "content" ? "Preview \xB7 i info \xB7 Esc list" : "Preview \xB7 Enter/Tab focus"
|
|
17108
|
+
),
|
|
17109
|
+
width,
|
|
17110
|
+
ELLIPSIS
|
|
17111
|
+
),
|
|
17112
|
+
...buildArtifactHeaderLines(artifact, verification, width)
|
|
17113
|
+
];
|
|
16657
17114
|
const bodyHeight = Math.max(0, height - header.length);
|
|
16658
17115
|
this.lastContentBodyHeight = Math.max(1, bodyHeight);
|
|
16659
17116
|
const body = this.renderedContentLines(width);
|
|
@@ -16687,6 +17144,7 @@ var ViewOverlayView = class {
|
|
|
16687
17144
|
handleInput(data) {
|
|
16688
17145
|
data = localKey(data);
|
|
16689
17146
|
if (matchesKey(data, "tab") || matchesKey(data, "shift+tab") || this.focus === "list" && matchesKey(data, "enter")) {
|
|
17147
|
+
if (this.focus === "list" && !this.selectedArtifact()) return;
|
|
16690
17148
|
this.focus = this.focus === "list" ? "content" : "list";
|
|
16691
17149
|
this.options.requestRender?.();
|
|
16692
17150
|
return;
|
|
@@ -16699,6 +17157,12 @@ var ViewOverlayView = class {
|
|
|
16699
17157
|
this.selectCategory(1);
|
|
16700
17158
|
return;
|
|
16701
17159
|
}
|
|
17160
|
+
if (this.focus === "content" && data === "i") {
|
|
17161
|
+
this.showProvenance = !this.showProvenance;
|
|
17162
|
+
this.contentScrollOffset = 0;
|
|
17163
|
+
this.options.requestRender?.();
|
|
17164
|
+
return;
|
|
17165
|
+
}
|
|
16702
17166
|
if (this.focus === "content" && data === "v") {
|
|
16703
17167
|
this.verifySelected();
|
|
16704
17168
|
return;
|
|
@@ -16733,7 +17197,9 @@ var ViewOverlayView = class {
|
|
|
16733
17197
|
return true;
|
|
16734
17198
|
}
|
|
16735
17199
|
const previous = this.filterText;
|
|
16736
|
-
|
|
17200
|
+
if (matchesKey(data, "ctrl+u")) {
|
|
17201
|
+
this.filterInput.applyEdit("clear");
|
|
17202
|
+
} else this.filterInput.handleInput(data);
|
|
16737
17203
|
this.filterText = this.filterInput.getValue();
|
|
16738
17204
|
if (previous !== this.filterText) {
|
|
16739
17205
|
this.selectInitialFilterMatch();
|
|
@@ -17118,8 +17584,8 @@ var AskUserOverlayView = class {
|
|
|
17118
17584
|
this.resetQuestionScroll();
|
|
17119
17585
|
this.rebuildControl();
|
|
17120
17586
|
this.deps.requestRender();
|
|
17121
|
-
return new Promise((
|
|
17122
|
-
this.resolveCurrent =
|
|
17587
|
+
return new Promise((resolve11) => {
|
|
17588
|
+
this.resolveCurrent = resolve11;
|
|
17123
17589
|
});
|
|
17124
17590
|
}
|
|
17125
17591
|
cancel() {
|
|
@@ -17327,7 +17793,7 @@ var AskUserOverlayView = class {
|
|
|
17327
17793
|
return lines;
|
|
17328
17794
|
}
|
|
17329
17795
|
finish(result) {
|
|
17330
|
-
const
|
|
17796
|
+
const resolve11 = this.resolveCurrent;
|
|
17331
17797
|
this.resolveCurrent = null;
|
|
17332
17798
|
this.list = null;
|
|
17333
17799
|
this.text = null;
|
|
@@ -17338,7 +17804,7 @@ var AskUserOverlayView = class {
|
|
|
17338
17804
|
}
|
|
17339
17805
|
if (this.phase !== "closed") this.phase = "waiting";
|
|
17340
17806
|
this.deps.requestRender();
|
|
17341
|
-
|
|
17807
|
+
resolve11?.(result);
|
|
17342
17808
|
}
|
|
17343
17809
|
renderWaiting(width, maxRows) {
|
|
17344
17810
|
const theme6 = clioTheme();
|
|
@@ -18004,14 +18470,14 @@ function createAuthDialogController(title, onCancel) {
|
|
|
18004
18470
|
});
|
|
18005
18471
|
input.onSubmit = () => {
|
|
18006
18472
|
if (!resolver) return;
|
|
18007
|
-
const
|
|
18473
|
+
const resolve11 = resolver;
|
|
18008
18474
|
resolver = void 0;
|
|
18009
18475
|
rejecter = void 0;
|
|
18010
18476
|
const value = input.getValue();
|
|
18011
18477
|
promptLabel = null;
|
|
18012
18478
|
input.setValue("");
|
|
18013
18479
|
rebuild();
|
|
18014
|
-
|
|
18480
|
+
resolve11(value);
|
|
18015
18481
|
};
|
|
18016
18482
|
input.onEscape = () => {
|
|
18017
18483
|
cancel();
|
|
@@ -18065,8 +18531,8 @@ function createAuthDialogController(title, onCancel) {
|
|
|
18065
18531
|
promptLabel = label;
|
|
18066
18532
|
input.setValue("");
|
|
18067
18533
|
rebuild();
|
|
18068
|
-
return new Promise((
|
|
18069
|
-
resolver =
|
|
18534
|
+
return new Promise((resolve11, reject) => {
|
|
18535
|
+
resolver = resolve11;
|
|
18070
18536
|
rejecter = reject;
|
|
18071
18537
|
});
|
|
18072
18538
|
}
|
|
@@ -18290,10 +18756,10 @@ function createOverlayAuthLifecycle(deps) {
|
|
|
18290
18756
|
},
|
|
18291
18757
|
onPrompt: async (prompt) => (await dialog.controller.prompt(prompt.message)).trim(),
|
|
18292
18758
|
onSelect: (prompt) => selectOAuthOption(prompt, [`Target: ${targetId}`, `Runtime: ${runtime.id}`]),
|
|
18293
|
-
onManualCodeInput: async () => await new Promise((
|
|
18759
|
+
onManualCodeInput: async () => await new Promise((resolve11, reject) => {
|
|
18294
18760
|
manualCodeTimer = setTimeout(() => {
|
|
18295
18761
|
manualCodeTimer = null;
|
|
18296
|
-
dialog.controller.prompt("Verification code").then((value) =>
|
|
18762
|
+
dialog.controller.prompt("Verification code").then((value) => resolve11(value.trim())).catch(reject);
|
|
18297
18763
|
}, 1e4);
|
|
18298
18764
|
manualCodeTimer.unref?.();
|
|
18299
18765
|
}),
|
|
@@ -19281,7 +19747,8 @@ var ListOverlayView = class {
|
|
|
19281
19747
|
const tab = this.activeTab();
|
|
19282
19748
|
if (tab === void 0) return null;
|
|
19283
19749
|
const count2 = this.tabCounts.get(tab.id) ?? this.items.length;
|
|
19284
|
-
|
|
19750
|
+
const countLabel = tab.countLabel?.(count2) ?? `${count2} ${tab.label.toLowerCase()}`;
|
|
19751
|
+
return { key: "\u2190\u2192", verb: `tab \xB7 ${countLabel}`, short: "tab", critical: true };
|
|
19285
19752
|
}
|
|
19286
19753
|
getHint() {
|
|
19287
19754
|
if (this.options.explicitSearch && this.isFilterFocused) {
|
|
@@ -21158,13 +21625,20 @@ function createOverlayGeneralOpeners(deps) {
|
|
|
21158
21625
|
deps.startDispatchBoardTicker();
|
|
21159
21626
|
deps.requestRender();
|
|
21160
21627
|
};
|
|
21161
|
-
const dispatchBoardHint = () => {
|
|
21628
|
+
const dispatchBoardHint = (innerWidth) => {
|
|
21162
21629
|
const row2 = deps.dispatchBoard.selectedRow();
|
|
21163
|
-
const entries = [
|
|
21164
|
-
if (row2)
|
|
21165
|
-
|
|
21166
|
-
|
|
21167
|
-
|
|
21630
|
+
const entries = [];
|
|
21631
|
+
if (row2) {
|
|
21632
|
+
entries.push({ key: "\u2191\u2193", verb: "select" });
|
|
21633
|
+
entries.push({
|
|
21634
|
+
key: "Enter",
|
|
21635
|
+
verb: deps.dispatchBoard.detailExpanded() ? "hide detail" : "detail",
|
|
21636
|
+
critical: false
|
|
21637
|
+
});
|
|
21638
|
+
}
|
|
21639
|
+
if (row2 && isDispatchBoardRowSteerable(row2)) entries.push({ key: "s", verb: "steer", critical: true });
|
|
21640
|
+
if (row2 && isDispatchBoardRowCancellable(row2)) entries.push({ key: "x", verb: "cancel", critical: true });
|
|
21641
|
+
return buildResponsiveHint(entries)(innerWidth);
|
|
21168
21642
|
};
|
|
21169
21643
|
const openSideQuestion = (question) => {
|
|
21170
21644
|
if (deps.transitions.state !== "closed") return;
|
|
@@ -22315,6 +22789,7 @@ var SETTINGS_LABELS_BY_ID = {
|
|
|
22315
22789
|
"retry.baseDelayMs": "Base delay (ms)",
|
|
22316
22790
|
"retry.maxDelayMs": "Max delay (ms)",
|
|
22317
22791
|
"retry.streamStallMs": "Stream stall timeout (ms)",
|
|
22792
|
+
"retry.firstTokenStallMs": "First token timeout (ms)",
|
|
22318
22793
|
"terminal.showTerminalProgress": "Terminal progress badges",
|
|
22319
22794
|
"terminal.outputVerbosity": "Output style",
|
|
22320
22795
|
"terminal.tuiMode": "TUI mode",
|
|
@@ -22405,7 +22880,14 @@ var SETTINGS_SECTION_ROWS = {
|
|
|
22405
22880
|
"context.workingSet.protectLastTurns",
|
|
22406
22881
|
"context.workingSet.minEvictableTokens"
|
|
22407
22882
|
],
|
|
22408
|
-
retry: [
|
|
22883
|
+
retry: [
|
|
22884
|
+
"retry.enabled",
|
|
22885
|
+
"retry.maxRetries",
|
|
22886
|
+
"retry.baseDelayMs",
|
|
22887
|
+
"retry.maxDelayMs",
|
|
22888
|
+
"retry.streamStallMs",
|
|
22889
|
+
"retry.firstTokenStallMs"
|
|
22890
|
+
],
|
|
22409
22891
|
terminal: [
|
|
22410
22892
|
"terminal.showTerminalProgress",
|
|
22411
22893
|
"terminal.outputVerbosity",
|
|
@@ -22502,6 +22984,7 @@ var SETTINGS_DESCRIPTIONS_BY_ID = {
|
|
|
22502
22984
|
"retry.baseDelayMs": "Initial retry delay in milliseconds.",
|
|
22503
22985
|
"retry.maxDelayMs": "Maximum retry delay in milliseconds.",
|
|
22504
22986
|
"retry.streamStallMs": "Silence on an in-flight stream past this long is treated as a wedged backend.",
|
|
22987
|
+
"retry.firstTokenStallMs": "Silence allowed before a call's first token, for backends that load the model on demand.",
|
|
22505
22988
|
"terminal.showTerminalProgress": "Emit OSC 9;4 progress badges during agent turns.",
|
|
22506
22989
|
"terminal.outputVerbosity": "How much reasoning, tool input, and live tool output appears in the transcript.",
|
|
22507
22990
|
"terminal.tuiMode": "Use regular terminal scrollback or a fullscreen transcript with a sticky composer and footer.",
|
|
@@ -22542,6 +23025,7 @@ var SETTINGS_HELP_BY_ID = {
|
|
|
22542
23025
|
"guardrails.observationTurnBudgetBytes": "One pool shared by every observation-producing tool in a turn, so a single verbose tool cannot starve the rest. Whole number of bytes, at least 1 \xB7 default: 196608 (192KB).",
|
|
22543
23026
|
"guardrails.internalDispatchTimeoutMs": "Covers the wiki documenter and the bootstrap scout. Continuous output satisfies the heartbeat watchdog and a run mid-generation spends no tool calls, so this is the only guard that ends a degenerate generator. Healthy runs finish in minutes. Whole milliseconds of at least 1 \xB7 default: 900000 (15 minutes).",
|
|
22544
23027
|
"retry.streamStallMs": "Measured from the last token received, not from the request, so a slow-but-alive stream is never aborted. The retry then follows the same enabled/maxRetries/delay settings above. Whole milliseconds \xB7 default: 180000 (three minutes).",
|
|
23028
|
+
"retry.firstTokenStallMs": "Measured from the request until the first token. A local server that slept reloads the model and prefills cold first, so this window is longer than the stream stall timeout; the larger of the two applies. 0 never aborts a call that has not started streaming. Whole milliseconds \xB7 default: 600000 (ten minutes).",
|
|
22545
23029
|
"library.catalog": "Absolute path, or blank for the catalog in your config directory. The catalog is the index `clio-coder library` reads; installed resources land in the usual skill and resource roots either way. Default: blank.",
|
|
22546
23030
|
"library.remote": "A Git remote URL, or blank to keep the library local. Setting it is not enough to sync: the remote must also be confirmed, and library.sync must be true. Default: blank.",
|
|
22547
23031
|
"library.confirmedRemote": "Written by the confirm flow, not by hand, because confirming a remote here would be the record confirming itself. Sync refuses with library_remote_unconfirmed until this equals library.remote. Default: blank.",
|
|
@@ -23607,6 +24091,9 @@ function buildSettingItems(settings, options) {
|
|
|
23607
24091
|
settingItem("retry.streamStallMs", String(retry.streamStallMs), {
|
|
23608
24092
|
values: ["60000", "120000", "180000", "300000", "600000"]
|
|
23609
24093
|
}),
|
|
24094
|
+
settingItem("retry.firstTokenStallMs", String(retry.firstTokenStallMs), {
|
|
24095
|
+
values: ["180000", "300000", "600000", "900000", "1800000"]
|
|
24096
|
+
}),
|
|
23610
24097
|
settingItem("terminal.showTerminalProgress", String(terminal.terminalProgress), {
|
|
23611
24098
|
values: ["false", "true"]
|
|
23612
24099
|
}),
|
|
@@ -24357,6 +24844,11 @@ function applySettingChange(settings, id, value) {
|
|
|
24357
24844
|
settings.chat.retry.streamStallMs = next;
|
|
24358
24845
|
});
|
|
24359
24846
|
return;
|
|
24847
|
+
case "retry.firstTokenStallMs":
|
|
24848
|
+
applyNonNegativeInteger(value, (next) => {
|
|
24849
|
+
settings.chat.retry.firstTokenStallMs = next;
|
|
24850
|
+
});
|
|
24851
|
+
return;
|
|
24360
24852
|
case "library.catalog":
|
|
24361
24853
|
case "library.remote": {
|
|
24362
24854
|
const key = id.slice("library.".length);
|
|
@@ -27000,13 +27492,16 @@ function libraryStatusLine(view, counts, width) {
|
|
|
27000
27492
|
const theme6 = clioTheme();
|
|
27001
27493
|
const mode = view.mode === "browse" ? "Browse" : "Installed";
|
|
27002
27494
|
const scope = view.scope === "user" ? "User" : "Project";
|
|
27003
|
-
const
|
|
27004
|
-
|
|
27005
|
-
const
|
|
27006
|
-
if (
|
|
27007
|
-
|
|
27008
|
-
if (counts.notices > 0)
|
|
27495
|
+
const unit = view.member ? "member" : view.mode === "browse" ? "package" : "entry";
|
|
27496
|
+
const plural = unit === "entry" ? "entries" : `${unit}s`;
|
|
27497
|
+
const total = `${counts.rows} ${counts.rows === 1 ? unit : plural}`;
|
|
27498
|
+
if (width < 34) return theme6.fg("accent", `${mode}\xB7Actions:${scope}`);
|
|
27499
|
+
const parts = width < 72 ? [theme6.fg("accent", width >= 48 ? `${mode} ${total}` : total), theme6.fg("dim", `s:${scope}`)] : [theme6.fg("accent", `${mode} \xB7 Actions: ${scope}`), theme6.fg("dim", total)];
|
|
27500
|
+
if (counts.notices > 0)
|
|
27501
|
+
parts.push(theme6.fg("warning", `n:${counts.notices} ${counts.notices === 1 ? "notice" : "notices"}`));
|
|
27502
|
+
else if (width < 72) parts.push(theme6.fg("dim", "n notices"));
|
|
27009
27503
|
if (counts.truncated) parts.push(theme6.fg("warning", "incomplete results"));
|
|
27504
|
+
if (view.member && width >= 72) parts.push(theme6.fg("dim", `members of ${sanitizeCallTargetText(view.member.ref)}`));
|
|
27010
27505
|
return parts.join(theme6.fg("frame", " \u2502 "));
|
|
27011
27506
|
}
|
|
27012
27507
|
function libraryUseInvocation(kind, name) {
|
|
@@ -27040,7 +27535,7 @@ function libraryRowActions(subject, view) {
|
|
|
27040
27535
|
enable: !!here,
|
|
27041
27536
|
update: !!here,
|
|
27042
27537
|
use: false,
|
|
27043
|
-
open:
|
|
27538
|
+
open: subject.record.copies.length > 0,
|
|
27044
27539
|
reasons: reasons2
|
|
27045
27540
|
};
|
|
27046
27541
|
}
|
|
@@ -27106,7 +27601,7 @@ function libraryRowActions(subject, view) {
|
|
|
27106
27601
|
enable: !!owner && selected,
|
|
27107
27602
|
update: !!owner && selected,
|
|
27108
27603
|
use: usable,
|
|
27109
|
-
open:
|
|
27604
|
+
open: false,
|
|
27110
27605
|
reasons
|
|
27111
27606
|
};
|
|
27112
27607
|
}
|
|
@@ -27115,20 +27610,32 @@ function copyStateWord(copy) {
|
|
|
27115
27610
|
if (copy.state === "loadable") return theme6.fg("success", "loadable");
|
|
27116
27611
|
if (copy.state === "disabled") return theme6.fg("warning", "disabled");
|
|
27117
27612
|
if (copy.state === "shadowed") return theme6.fg("dim", "shadowed");
|
|
27118
|
-
return theme6.fg("error", copy.state);
|
|
27613
|
+
return theme6.fg("error", sanitizeCallTargetText(copy.state));
|
|
27119
27614
|
}
|
|
27120
27615
|
function availabilityWord(resource) {
|
|
27121
27616
|
const theme6 = clioTheme();
|
|
27122
27617
|
if (resource.availability === "available") return theme6.fg("success", "available");
|
|
27123
27618
|
if (resource.availability === "untrusted") return theme6.fg("warning", "untrusted");
|
|
27124
27619
|
if (resource.availability === "shadowed") return theme6.fg("dim", "shadowed");
|
|
27125
|
-
return theme6.fg("error", resource.availability);
|
|
27620
|
+
return theme6.fg("error", sanitizeCallTargetText(resource.availability));
|
|
27126
27621
|
}
|
|
27127
27622
|
function metaOf(parts) {
|
|
27128
|
-
return parts.
|
|
27623
|
+
return parts.map((part) => typeof part === "function" ? part() : part === void 0 ? "" : sanitizeCallTargetText(part)).filter(Boolean).join(" \xB7 ");
|
|
27129
27624
|
}
|
|
27130
27625
|
function packageDetail(record2, view, actions) {
|
|
27131
|
-
const
|
|
27626
|
+
const provider = record2.kind !== view.category;
|
|
27627
|
+
const hints = (record2.provides ?? []).filter((hint) => view.category === "plugin" || hint.kind === view.category);
|
|
27628
|
+
const lines = [
|
|
27629
|
+
`# ${record2.name}`,
|
|
27630
|
+
`**Kind:** ${record2.kind}${provider ? ` provider package for ${view.category} recipes` : " package"}`,
|
|
27631
|
+
`**Actions (${view.scope}):** ${libraryActionSummary(actions)}`,
|
|
27632
|
+
"b shows loaded recipes in Installed. Tab toggles detail; PgUp/PgDn scroll.",
|
|
27633
|
+
...provider ? ["Catalog hints describe potential recipes, not loaded resources."] : [],
|
|
27634
|
+
...hints.length ? [
|
|
27635
|
+
`**Catalog hints (${view.category === "plugin" ? "all kinds" : view.category}):** ${hints.map((hint) => `${hint.kind}:${hint.name}`).join(", ")}`
|
|
27636
|
+
] : [],
|
|
27637
|
+
`**Origin:** ${libraryOriginLabel(record2.origin)}`
|
|
27638
|
+
];
|
|
27132
27639
|
const detail = libraryOriginDetail(record2.origin);
|
|
27133
27640
|
if (detail) lines.push(`**Source:** \`${detail}\``);
|
|
27134
27641
|
lines.push(`**Format:** ${libraryFormatLabel(record2.format)}`);
|
|
@@ -27139,8 +27646,8 @@ function packageDetail(record2, view, actions) {
|
|
|
27139
27646
|
);
|
|
27140
27647
|
lines.push(`**Selected scope:** ${view.scope}`);
|
|
27141
27648
|
if (record2.requires?.length) lines.push(`**Requires:** ${record2.requires.join(", ")}`);
|
|
27142
|
-
if (record2.provides?.length)
|
|
27143
|
-
lines.push(
|
|
27649
|
+
if (view.category !== "plugin" && (record2.provides?.length ?? 0) > hints.length)
|
|
27650
|
+
lines.push("Other recipe kinds are listed in the Plugins category.");
|
|
27144
27651
|
if (record2.provides === void 0 && record2.copies.length === 0)
|
|
27145
27652
|
lines.push("**Contents:** unknown until this package is inspected or installed.");
|
|
27146
27653
|
for (const reason of actions.reasons) lines.push(`**Note:** ${reason}`);
|
|
@@ -27213,9 +27720,37 @@ function memberDetail(subject, actions) {
|
|
|
27213
27720
|
if (subject.member.description) lines.push("", "---", "", subject.member.description);
|
|
27214
27721
|
return lines;
|
|
27215
27722
|
}
|
|
27216
|
-
function
|
|
27723
|
+
function libraryActionSummary(actions) {
|
|
27724
|
+
return [
|
|
27725
|
+
actions.use ? "v use" : void 0,
|
|
27726
|
+
actions.open ? "Enter members" : "Enter detail",
|
|
27727
|
+
actions.install ? "i review install" : void 0,
|
|
27728
|
+
actions.enable ? "e review enable/disable" : void 0,
|
|
27729
|
+
actions.update ? "u review update" : void 0,
|
|
27730
|
+
actions.remove ? "r review remove" : void 0
|
|
27731
|
+
].filter(Boolean).join(" \xB7 ");
|
|
27732
|
+
}
|
|
27733
|
+
function push(set, view, id, subject, item) {
|
|
27217
27734
|
set.subjects.set(id, subject);
|
|
27218
|
-
|
|
27735
|
+
const detail = item.detail;
|
|
27736
|
+
set.items.push({
|
|
27737
|
+
id,
|
|
27738
|
+
...item,
|
|
27739
|
+
label: subject.kind === "notice" ? clioTheme().fg("warning", sanitizeCallTargetText(item.label)) : sanitizeCallTargetText(item.label),
|
|
27740
|
+
...detail ? {
|
|
27741
|
+
detail: (width) => {
|
|
27742
|
+
const lines = detail(width).map((line) => sanitizeMultilineDisplayText(line).text);
|
|
27743
|
+
if (subject.kind !== "package" && subject.kind !== "notice")
|
|
27744
|
+
lines.splice(
|
|
27745
|
+
1,
|
|
27746
|
+
0,
|
|
27747
|
+
`**Actions:** ${libraryActionSummary(libraryRowActions(subject, view))}`,
|
|
27748
|
+
"Tab toggles detail. PgUp/PgDn scroll."
|
|
27749
|
+
);
|
|
27750
|
+
return lines;
|
|
27751
|
+
}
|
|
27752
|
+
} : {}
|
|
27753
|
+
});
|
|
27219
27754
|
}
|
|
27220
27755
|
function libraryTruncationNotice(inventory) {
|
|
27221
27756
|
const capped = [
|
|
@@ -27261,11 +27796,11 @@ function buildLibraryRows(options) {
|
|
|
27261
27796
|
for (const member of options.inspection.resources) {
|
|
27262
27797
|
const subject = { kind: "member", owner, member };
|
|
27263
27798
|
const actions = libraryRowActions(subject, view);
|
|
27264
|
-
push(set, `mem:${owner.ref}@${owner.scope}#${member.kind}:${member.name}`, subject, {
|
|
27799
|
+
push(set, view, `mem:${owner.ref}@${owner.scope}#${member.kind}:${member.name}`, subject, {
|
|
27265
27800
|
label: member.name,
|
|
27266
27801
|
meta: metaOf([
|
|
27267
27802
|
member.kind,
|
|
27268
|
-
member.valid ? theme6.fg("success", "valid") : theme6.fg("error", "invalid"),
|
|
27803
|
+
() => member.valid ? theme6.fg("success", "valid") : theme6.fg("error", "invalid"),
|
|
27269
27804
|
member.componentId ? `component ${member.componentId}` : void 0
|
|
27270
27805
|
]),
|
|
27271
27806
|
group: LIBRARY_GROUP_MEMBERS,
|
|
@@ -27277,7 +27812,7 @@ function buildLibraryRows(options) {
|
|
|
27277
27812
|
kind: "notice",
|
|
27278
27813
|
message: `${item.kind} ${item.id} is declared package metadata, not a recipe. It runs only on an explicit request.`
|
|
27279
27814
|
};
|
|
27280
|
-
push(set, `note:ancillary:${item.kind}:${item.id}`, subject, {
|
|
27815
|
+
push(set, view, `note:ancillary:${item.kind}:${item.id}`, subject, {
|
|
27281
27816
|
label: `${item.kind}: ${item.id}`,
|
|
27282
27817
|
meta: theme6.fg("dim", "companion file"),
|
|
27283
27818
|
group: LIBRARY_GROUP_NOTICES,
|
|
@@ -27287,7 +27822,7 @@ function buildLibraryRows(options) {
|
|
|
27287
27822
|
}
|
|
27288
27823
|
for (const diagnostic of options.inspection.diagnostics) {
|
|
27289
27824
|
const subject = { kind: "notice", message: diagnostic };
|
|
27290
|
-
push(set, `note:member-diag:${set.notices}`, subject, {
|
|
27825
|
+
push(set, view, `note:member-diag:${set.notices}`, subject, {
|
|
27291
27826
|
label: `${theme6.fg("warning", GLYPH.warnInline)} ${diagnostic}`,
|
|
27292
27827
|
meta: theme6.fg("dim", "inspection"),
|
|
27293
27828
|
group: LIBRARY_GROUP_NOTICES,
|
|
@@ -27301,15 +27836,15 @@ function buildLibraryRows(options) {
|
|
|
27301
27836
|
const actions = libraryRowActions(subject, view);
|
|
27302
27837
|
const here = record2.copies.find((copy) => copy.scope === view.scope);
|
|
27303
27838
|
const hints = (record2.provides ?? []).filter((hint) => view.category === "plugin" || hint.kind === view.category);
|
|
27304
|
-
push(set, `pkg:${record2.ref}`, subject, {
|
|
27305
|
-
label: record2.name,
|
|
27839
|
+
push(set, view, `pkg:${record2.ref}`, subject, {
|
|
27840
|
+
label: record2.kind !== view.category ? `${record2.name} [${record2.kind}]` : record2.name,
|
|
27306
27841
|
meta: metaOf([
|
|
27842
|
+
here ? `${here.scope} ${here.state}` : `not installed (${view.scope})`,
|
|
27843
|
+
hints.length > 0 ? `${hints.length} ${view.category === "plugin" ? "recipe" : view.category} hints` : void 0,
|
|
27307
27844
|
libraryOriginLabel(record2.origin),
|
|
27308
|
-
record2.version ? `v${record2.version}` : void 0
|
|
27309
|
-
here ? theme6.fg("success", `${here.scope} ${here.state}`) : theme6.fg("dim", "not in this scope"),
|
|
27310
|
-
hints.length > 0 ? `${hints.length} hinted` : void 0
|
|
27845
|
+
record2.version ? `v${record2.version}` : void 0
|
|
27311
27846
|
]),
|
|
27312
|
-
group: record2.copies.length > 0 ? LIBRARY_GROUP_INSTALLED : LIBRARY_GROUP_AVAILABLE,
|
|
27847
|
+
group: record2.kind !== view.category ? "Provider packages" : record2.copies.length > 0 ? LIBRARY_GROUP_INSTALLED : LIBRARY_GROUP_AVAILABLE,
|
|
27313
27848
|
detail: () => packageDetail(record2, view, actions)
|
|
27314
27849
|
});
|
|
27315
27850
|
}
|
|
@@ -27317,13 +27852,13 @@ function buildLibraryRows(options) {
|
|
|
27317
27852
|
for (const copy of inventory.copies) {
|
|
27318
27853
|
const subject = { kind: "copy", copy };
|
|
27319
27854
|
const actions = libraryRowActions(subject, view);
|
|
27320
|
-
push(set, `copy:${copy.ref}@${copy.scope}`, subject, {
|
|
27855
|
+
push(set, view, `copy:${copy.ref}@${copy.scope}`, subject, {
|
|
27321
27856
|
label: copy.name,
|
|
27322
27857
|
meta: metaOf([
|
|
27323
|
-
libraryOriginLabel(copy.origin),
|
|
27324
27858
|
copy.scope,
|
|
27325
|
-
copyStateWord(copy),
|
|
27326
|
-
copy.
|
|
27859
|
+
() => copyStateWord(copy),
|
|
27860
|
+
libraryOriginLabel(copy.origin),
|
|
27861
|
+
copy.trust === "foreign" ? () => theme6.fg("warning", "foreign") : void 0
|
|
27327
27862
|
]),
|
|
27328
27863
|
group: LIBRARY_GROUP_INSTALLED,
|
|
27329
27864
|
detail: () => copyDetail(copy, view, actions)
|
|
@@ -27332,12 +27867,12 @@ function buildLibraryRows(options) {
|
|
|
27332
27867
|
for (const resource of inventory.resources) {
|
|
27333
27868
|
const subject = { kind: "recipe", resource };
|
|
27334
27869
|
const actions = libraryRowActions(subject, view);
|
|
27335
|
-
push(set, `res:${resource.key}`, subject, {
|
|
27870
|
+
push(set, view, `res:${resource.key}`, subject, {
|
|
27336
27871
|
label: resource.name,
|
|
27337
27872
|
meta: metaOf([
|
|
27338
|
-
|
|
27873
|
+
() => availabilityWord(resource),
|
|
27339
27874
|
resource.owner ? resource.owner.ref : resource.source.class,
|
|
27340
|
-
|
|
27875
|
+
libraryOriginLabel(resource.origin)
|
|
27341
27876
|
]),
|
|
27342
27877
|
group: resource.owner ? LIBRARY_GROUP_INSTALLED : LIBRARY_GROUP_UNMANAGED,
|
|
27343
27878
|
detail: () => resourceDetail(resource, actions)
|
|
@@ -27350,11 +27885,18 @@ function buildLibraryRows(options) {
|
|
|
27350
27885
|
(entry) => entry !== void 0
|
|
27351
27886
|
)) {
|
|
27352
27887
|
const subject = { kind: "notice", message };
|
|
27353
|
-
push(set, `note:${set.notices}`, subject, {
|
|
27888
|
+
push(set, view, `note:${set.notices}`, subject, {
|
|
27354
27889
|
label: `${theme6.fg("warning", GLYPH.warnInline)} ${message}`,
|
|
27355
27890
|
meta: theme6.fg("dim", "library"),
|
|
27356
27891
|
group: LIBRARY_GROUP_NOTICES,
|
|
27357
|
-
detail: () => [
|
|
27892
|
+
detail: () => [
|
|
27893
|
+
"# Library notice",
|
|
27894
|
+
"",
|
|
27895
|
+
"Discovery notices cover all categories.",
|
|
27896
|
+
"From browse focus, n returns to resources. Esc clears a filter or leaves search focus before returning to the parent browser.",
|
|
27897
|
+
"",
|
|
27898
|
+
message
|
|
27899
|
+
]
|
|
27358
27900
|
});
|
|
27359
27901
|
set.notices += 1;
|
|
27360
27902
|
}
|
|
@@ -27771,8 +28313,8 @@ function isLibraryTab(value) {
|
|
|
27771
28313
|
|
|
27772
28314
|
// src/interactive/overlays/library.ts
|
|
27773
28315
|
var LIBRARY_TITLE = "Library";
|
|
27774
|
-
var LIBRARY_EMPTY_BROWSE = "No packages of this kind in the index. Register one with clio-coder library register <path>, or press o to import from another local agent.";
|
|
27775
|
-
var LIBRARY_EMPTY_INSTALLED = "
|
|
28316
|
+
var LIBRARY_EMPTY_BROWSE = "No packages of this kind in the index. Browse counts packages, not runnable recipes. Press b for loaded recipes in Installed. Register one with clio-coder library register <path>, or press o to import from another local agent.";
|
|
28317
|
+
var LIBRARY_EMPTY_INSTALLED = "No entries of this kind are listed by the Library inventory. Action scope selects a package destination, not which recipes can run. Press b for installable packages.";
|
|
27776
28318
|
function requestRefFor(subject) {
|
|
27777
28319
|
if (subject.kind === "package" || subject.kind === "hint") return { ref: subject.record.ref };
|
|
27778
28320
|
if (subject.kind === "copy") return { ref: subject.copy.ref };
|
|
@@ -27852,12 +28394,16 @@ function openLibraryOverlay(tui, deps) {
|
|
|
27852
28394
|
...failure2 ? { failure: failure2 } : {}
|
|
27853
28395
|
});
|
|
27854
28396
|
if (category === view.category) rowSet = set;
|
|
27855
|
-
return set.items;
|
|
28397
|
+
return set.items.filter((item) => set.subjects.get(item.id)?.kind !== "notice");
|
|
27856
28398
|
};
|
|
27857
28399
|
const tabs = LIBRARY_TABS.map((tab) => ({
|
|
27858
28400
|
id: tab.id,
|
|
27859
28401
|
label: tab.label,
|
|
27860
|
-
items: () => rowsFor(tab.id)
|
|
28402
|
+
items: () => rowsFor(tab.id),
|
|
28403
|
+
countLabel: (count2) => {
|
|
28404
|
+
const unit = view.member && tab.id === view.category ? "member" : view.mode === "browse" ? "package" : "entry";
|
|
28405
|
+
return `${count2} ${count2 === 1 ? unit : unit === "entry" ? "entries" : `${unit}s`}`;
|
|
28406
|
+
}
|
|
27861
28407
|
}));
|
|
27862
28408
|
let handle;
|
|
27863
28409
|
const selected = (item) => item ? rowSet.subjects.get(item.id) : void 0;
|
|
@@ -28043,14 +28589,49 @@ function openLibraryOverlay(tui, deps) {
|
|
|
28043
28589
|
inspectionCache = null;
|
|
28044
28590
|
handle.refreshTabs();
|
|
28045
28591
|
};
|
|
28046
|
-
const
|
|
28592
|
+
const openNotices = () => {
|
|
28593
|
+
if (busy) return;
|
|
28594
|
+
busy = true;
|
|
28595
|
+
const items = rowSet.items.filter((item) => rowSet.subjects.get(item.id)?.kind === "notice");
|
|
28596
|
+
const close = () => {
|
|
28597
|
+
child = null;
|
|
28598
|
+
busy = false;
|
|
28599
|
+
notices.hide();
|
|
28600
|
+
if (closed) return;
|
|
28601
|
+
handle.setHidden(false);
|
|
28602
|
+
handle.focus();
|
|
28603
|
+
};
|
|
28604
|
+
handle.setHidden(true);
|
|
28605
|
+
const notices = (deps.openList ?? openListOverlay)(tui, {
|
|
28606
|
+
markerId: "library",
|
|
28607
|
+
title: "Library notices",
|
|
28608
|
+
items,
|
|
28609
|
+
filterable: true,
|
|
28610
|
+
explicitSearch: true,
|
|
28611
|
+
fullScreen: true,
|
|
28612
|
+
layout: "split",
|
|
28613
|
+
status: () => `${items.length} ${items.length === 1 ? "notice" : "notices"} \xB7 browse focus: n back`,
|
|
28614
|
+
emptyMessage: "No notices in this view. From browse focus, n returns to resources. Esc clears a filter or leaves search focus before returning to the parent browser.",
|
|
28615
|
+
globalHints: [{ key: "n", verb: "resources", critical: true }],
|
|
28616
|
+
globalActions: { n: close },
|
|
28617
|
+
onClose: close
|
|
28618
|
+
});
|
|
28619
|
+
child = { hide: () => notices.hide(), release: () => {
|
|
28620
|
+
} };
|
|
28621
|
+
notices.toggleDetail();
|
|
28622
|
+
};
|
|
28623
|
+
const status = (width) => libraryStatusLine(
|
|
28624
|
+
view,
|
|
28625
|
+
{ rows: rowSet.items.length - rowSet.notices, notices: rowSet.notices, truncated: rowSet.truncated },
|
|
28626
|
+
width
|
|
28627
|
+
);
|
|
28047
28628
|
const hints = (selected2) => {
|
|
28048
28629
|
const subject = selected2 ? rowSet.subjects.get(selected2.id) : void 0;
|
|
28049
28630
|
if (!subject || subject.kind === "notice") return [];
|
|
28050
28631
|
const actions = libraryRowActions(subject, view);
|
|
28051
28632
|
const entries = [];
|
|
28052
28633
|
if (actions.use) entries.push({ key: "v", verb: "use" });
|
|
28053
|
-
|
|
28634
|
+
entries.push({ key: "Enter", verb: actions.open ? "members" : "detail" });
|
|
28054
28635
|
if (actions.install) entries.push({ key: "i", verb: "install" });
|
|
28055
28636
|
if (actions.enable)
|
|
28056
28637
|
entries.push({
|
|
@@ -28094,10 +28675,12 @@ function openLibraryOverlay(tui, deps) {
|
|
|
28094
28675
|
globalHints: [
|
|
28095
28676
|
{ key: "b", verb: "browse/installed", short: "view", critical: true },
|
|
28096
28677
|
{ key: "s", verb: "user/project", short: "scope", critical: true },
|
|
28678
|
+
{ key: "n", verb: "notices", critical: true },
|
|
28097
28679
|
{ key: "o", verb: "import" },
|
|
28098
28680
|
{ key: "R", verb: "refresh" }
|
|
28099
28681
|
],
|
|
28100
28682
|
globalActions: {
|
|
28683
|
+
n: openNotices,
|
|
28101
28684
|
b: () => {
|
|
28102
28685
|
view.mode = view.mode === "browse" ? "installed" : "browse";
|
|
28103
28686
|
view.member = void 0;
|
|
@@ -28136,6 +28719,7 @@ function openLibraryOverlay(tui, deps) {
|
|
|
28136
28719
|
},
|
|
28137
28720
|
onClose: deps.onClose
|
|
28138
28721
|
});
|
|
28722
|
+
handle.toggleDetail();
|
|
28139
28723
|
const start = () => {
|
|
28140
28724
|
if (closed) return;
|
|
28141
28725
|
if (deps.importSource) {
|
|
@@ -28682,26 +29266,27 @@ var VISIBLE_ROWS3 = 12;
|
|
|
28682
29266
|
var SESSION_ESCAPE_GRACE_MS = 75;
|
|
28683
29267
|
var ESC2 = String.fromCharCode(27);
|
|
28684
29268
|
var SESSION_LAYOUT = {
|
|
28685
|
-
minPrimaryColumnWidth:
|
|
28686
|
-
maxPrimaryColumnWidth:
|
|
29269
|
+
minPrimaryColumnWidth: 32,
|
|
29270
|
+
maxPrimaryColumnWidth: 52
|
|
28687
29271
|
};
|
|
28688
29272
|
function formatRelativeTime2(iso, now = Date.now()) {
|
|
28689
29273
|
return iso ? relative3(iso, now) : "\u2014";
|
|
28690
29274
|
}
|
|
28691
29275
|
function shortTarget(meta) {
|
|
28692
|
-
const target = meta.target
|
|
28693
|
-
const model = meta.model
|
|
29276
|
+
const target = sanitizeCallTargetText(meta.target ?? "");
|
|
29277
|
+
const model = sanitizeCallTargetText(meta.model ?? "");
|
|
28694
29278
|
if (!target && !model) return "no target";
|
|
28695
29279
|
if (target && model) return `${target}/${model}`;
|
|
28696
|
-
return target
|
|
29280
|
+
return target || model || "no target";
|
|
28697
29281
|
}
|
|
28698
29282
|
function previewLine(meta) {
|
|
28699
|
-
const explicit = meta.firstMessagePreview
|
|
29283
|
+
const explicit = sanitizeCallTargetText(meta.firstMessagePreview ?? "");
|
|
28700
29284
|
if (explicit) return explicit;
|
|
28701
|
-
const name = meta.name
|
|
29285
|
+
const name = sanitizeCallTargetText(meta.name ?? "");
|
|
28702
29286
|
if (name) return `(${name})`;
|
|
28703
|
-
const cwdLeaf = meta.cwd ? basename2(meta.cwd) : "";
|
|
28704
|
-
|
|
29287
|
+
const cwdLeaf = sanitizeCallTargetText(meta.cwd ? basename2(meta.cwd) : "");
|
|
29288
|
+
const id = sanitizeCallTargetText(meta.id) || "Unnamed session";
|
|
29289
|
+
return `${id} \xB7 ${cwdLeaf || "no preview"}`;
|
|
28705
29290
|
}
|
|
28706
29291
|
function metaStrip(meta, now) {
|
|
28707
29292
|
const status = meta.endedAt ? GLYPH.ok : GLYPH.running;
|
|
@@ -28712,11 +29297,12 @@ function metaStrip(meta, now) {
|
|
|
28712
29297
|
}
|
|
28713
29298
|
function buildSessionItems(sessions, now = Date.now()) {
|
|
28714
29299
|
return sessions.map((meta) => {
|
|
28715
|
-
const labels = meta.labels
|
|
29300
|
+
const labels = meta.labels?.map(sanitizeCallTargetText).filter(Boolean).join(", ");
|
|
29301
|
+
const details = [metaStrip(meta, now), labels ? `labels: ${labels}` : ""].filter(Boolean);
|
|
28716
29302
|
return {
|
|
28717
29303
|
value: meta.id,
|
|
28718
|
-
label:
|
|
28719
|
-
description:
|
|
29304
|
+
label: previewLine(meta),
|
|
29305
|
+
description: details.join(" \xB7 ")
|
|
28720
29306
|
};
|
|
28721
29307
|
});
|
|
28722
29308
|
}
|
|
@@ -28743,6 +29329,7 @@ function createSessionOverlayBox(sessions, onSelect, onClose, options = {}) {
|
|
|
28743
29329
|
const allSessions = [...sessions];
|
|
28744
29330
|
let filtered = [...sessions];
|
|
28745
29331
|
let lastQuery = "";
|
|
29332
|
+
let selectedSessionId;
|
|
28746
29333
|
let list = buildList(filtered);
|
|
28747
29334
|
let pendingEscape = "";
|
|
28748
29335
|
let pendingEscapeTimer = null;
|
|
@@ -28785,14 +29372,18 @@ function createSessionOverlayBox(sessions, onSelect, onClose, options = {}) {
|
|
|
28785
29372
|
box.invalidate();
|
|
28786
29373
|
}
|
|
28787
29374
|
function applyFilter() {
|
|
29375
|
+
selectedSessionId = list.getSelectedItem()?.value ?? selectedSessionId;
|
|
28788
29376
|
filtered = filterSessions(allSessions, lastQuery);
|
|
28789
29377
|
list = buildList(filtered);
|
|
29378
|
+
const selectedIndex = filtered.findIndex((session) => session.id === selectedSessionId);
|
|
29379
|
+
if (selectedIndex >= 0) list.setSelectedIndex(selectedIndex);
|
|
29380
|
+
selectedSessionId = list.getSelectedItem()?.value ?? selectedSessionId;
|
|
28790
29381
|
rebuildChildren();
|
|
28791
29382
|
}
|
|
28792
29383
|
function commitSelection() {
|
|
28793
|
-
const
|
|
28794
|
-
if (!
|
|
28795
|
-
onSelect(
|
|
29384
|
+
const selected = list.getSelectedItem();
|
|
29385
|
+
if (!selected) return;
|
|
29386
|
+
onSelect(selected.value);
|
|
28796
29387
|
closeOverlay();
|
|
28797
29388
|
}
|
|
28798
29389
|
function moveSelectionByPage(direction) {
|
|
@@ -28896,6 +29487,7 @@ function openSessionOverlay(tui, deps) {
|
|
|
28896
29487
|
|
|
28897
29488
|
// src/interactive/overlays/tree-selector.ts
|
|
28898
29489
|
init_esm_shims();
|
|
29490
|
+
import { resolve as resolve5 } from "node:path";
|
|
28899
29491
|
var TREE_OVERLAY_WIDTH = 88;
|
|
28900
29492
|
var VISIBLE_ROWS4 = 16;
|
|
28901
29493
|
function shortTurnId2(id) {
|
|
@@ -28995,7 +29587,8 @@ var TreeOverlayView = class {
|
|
|
28995
29587
|
constructor(deps, initial) {
|
|
28996
29588
|
this.deps = deps;
|
|
28997
29589
|
this.snapshot = initial;
|
|
28998
|
-
this.rows =
|
|
29590
|
+
this.rows = [];
|
|
29591
|
+
this.rebuildRows();
|
|
28999
29592
|
}
|
|
29000
29593
|
deps;
|
|
29001
29594
|
snapshot;
|
|
@@ -29003,6 +29596,8 @@ var TreeOverlayView = class {
|
|
|
29003
29596
|
highlight = 0;
|
|
29004
29597
|
scrollTop = 0;
|
|
29005
29598
|
showTimestamps = false;
|
|
29599
|
+
currentCwdOnly = false;
|
|
29600
|
+
sortOrder = "tree";
|
|
29006
29601
|
submode = "browse";
|
|
29007
29602
|
labelBuffer = "";
|
|
29008
29603
|
labelInput = new Input();
|
|
@@ -29030,15 +29625,26 @@ var TreeOverlayView = class {
|
|
|
29030
29625
|
currentRow() {
|
|
29031
29626
|
return this.rows[this.highlight] ?? null;
|
|
29032
29627
|
}
|
|
29628
|
+
rebuildRows() {
|
|
29629
|
+
const selectedId = this.currentRow()?.node.id;
|
|
29630
|
+
const snapshot = this.snapshot;
|
|
29631
|
+
const matchesCwd = snapshot?.meta.cwd && resolve5(snapshot.meta.cwd) === resolve5(this.deps.cwd ?? process.cwd());
|
|
29632
|
+
this.rows = snapshot && (!this.currentCwdOnly || matchesCwd) ? flattenTreeSnapshot(snapshot) : [];
|
|
29633
|
+
if (this.sortOrder === "recent") {
|
|
29634
|
+
this.rows.sort((a, b) => Date.parse(b.node.at) - Date.parse(a.node.at));
|
|
29635
|
+
this.rows = this.rows.map((row2) => ({ ...row2, depth: 0 }));
|
|
29636
|
+
}
|
|
29637
|
+
const selectedIndex = this.rows.findIndex((row2) => row2.node.id === selectedId);
|
|
29638
|
+
this.highlight = selectedIndex < 0 ? 0 : selectedIndex;
|
|
29639
|
+
this.invalidateLayout();
|
|
29640
|
+
}
|
|
29033
29641
|
refresh() {
|
|
29034
29642
|
try {
|
|
29035
29643
|
this.snapshot = this.deps.session.tree();
|
|
29036
|
-
this.rows = flattenTreeSnapshot(this.snapshot);
|
|
29037
29644
|
} catch {
|
|
29038
29645
|
this.snapshot = null;
|
|
29039
|
-
this.rows = [];
|
|
29040
29646
|
}
|
|
29041
|
-
this.
|
|
29647
|
+
this.rebuildRows();
|
|
29042
29648
|
}
|
|
29043
29649
|
render(width) {
|
|
29044
29650
|
const contentWidth = Math.max(1, width);
|
|
@@ -29047,7 +29653,12 @@ var TreeOverlayView = class {
|
|
|
29047
29653
|
const lineage = this.snapshot ? forkParentLine(this.snapshot, theme6) : null;
|
|
29048
29654
|
if (lineage !== null) lines.push(truncateToWidth(lineage, contentWidth, "", true));
|
|
29049
29655
|
if (this.rows.length === 0) {
|
|
29050
|
-
lines.push(
|
|
29656
|
+
lines.push(
|
|
29657
|
+
theme6.fg(
|
|
29658
|
+
"muted",
|
|
29659
|
+
this.currentCwdOnly && this.snapshot && Object.keys(this.snapshot.nodesById).length > 0 ? "(no turns match the current cwd; press p to show all)" : "(no turns in this session yet)"
|
|
29660
|
+
)
|
|
29661
|
+
);
|
|
29051
29662
|
} else {
|
|
29052
29663
|
const end = Math.min(this.rows.length, this.scrollTop + VISIBLE_ROWS4);
|
|
29053
29664
|
for (let i = this.scrollTop; i < end; i++) {
|
|
@@ -29084,6 +29695,8 @@ var TreeOverlayView = class {
|
|
|
29084
29695
|
{ key: "\u2191\u2193", verb: "move" },
|
|
29085
29696
|
{ key: "Enter", verb: "switch" },
|
|
29086
29697
|
{ key: "e", verb: "label" },
|
|
29698
|
+
{ key: "p", verb: `cwd:${this.currentCwdOnly ? "current" : "all"}` },
|
|
29699
|
+
{ key: "s", verb: this.sortOrder },
|
|
29087
29700
|
{ key: "Shift+T", verb: `ts:${tsLabel}` }
|
|
29088
29701
|
]);
|
|
29089
29702
|
}
|
|
@@ -29105,6 +29718,16 @@ var TreeOverlayView = class {
|
|
|
29105
29718
|
this.deps.onClose();
|
|
29106
29719
|
return;
|
|
29107
29720
|
}
|
|
29721
|
+
if (data === "p") {
|
|
29722
|
+
this.currentCwdOnly = !this.currentCwdOnly;
|
|
29723
|
+
this.rebuildRows();
|
|
29724
|
+
return;
|
|
29725
|
+
}
|
|
29726
|
+
if (data === "s") {
|
|
29727
|
+
this.sortOrder = this.sortOrder === "tree" ? "recent" : "tree";
|
|
29728
|
+
this.rebuildRows();
|
|
29729
|
+
return;
|
|
29730
|
+
}
|
|
29108
29731
|
if (this.rows.length === 0) return;
|
|
29109
29732
|
if (matchesKey(data, "up")) {
|
|
29110
29733
|
this.moveHighlight(-1);
|
|
@@ -29691,9 +30314,9 @@ function createOverlaySessionLifecycle(deps) {
|
|
|
29691
30314
|
openHandoffReview(session, fromSessionId, goal, document);
|
|
29692
30315
|
}
|
|
29693
30316
|
function editHandoffDocument(current) {
|
|
29694
|
-
const
|
|
30317
|
+
const resolve11 = deps.resolveEditor ?? resolveExternalEditor;
|
|
29695
30318
|
const edit = deps.editExternally ?? editTextExternally;
|
|
29696
|
-
const command =
|
|
30319
|
+
const command = resolve11();
|
|
29697
30320
|
if (!command) {
|
|
29698
30321
|
deps.notify("warning", "handoff: no external editor configured; set VISUAL or EDITOR", "handoff:no-editor");
|
|
29699
30322
|
return null;
|
|
@@ -30396,8 +31019,8 @@ function resolveApplicationCtrlCAction(state) {
|
|
|
30396
31019
|
function createApplicationController(deps) {
|
|
30397
31020
|
let resolveRun = () => {
|
|
30398
31021
|
};
|
|
30399
|
-
const run = new Promise((
|
|
30400
|
-
resolveRun =
|
|
31022
|
+
const run = new Promise((resolve11) => {
|
|
31023
|
+
resolveRun = resolve11;
|
|
30401
31024
|
});
|
|
30402
31025
|
const keepAlive = deps.intervals.setInterval(() => {
|
|
30403
31026
|
}, 1 << 30);
|
|
@@ -30855,10 +31478,15 @@ function createEditorSubmitController(deps) {
|
|
|
30855
31478
|
let running = [];
|
|
30856
31479
|
try {
|
|
30857
31480
|
running = deps.dispatch.snapshot().running.map((run) => ({ runId: run.runId, agentId: run.agentId }));
|
|
30858
|
-
} catch {
|
|
30859
|
-
|
|
31481
|
+
} catch (err) {
|
|
31482
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
31483
|
+
deps.notify(
|
|
31484
|
+
"error",
|
|
31485
|
+
`cannot resolve steer to @${mention.target}: ${msg}; retry when Fleet Runs is available`,
|
|
31486
|
+
`steer:${mention.target}`
|
|
31487
|
+
);
|
|
31488
|
+
return "rejected";
|
|
30860
31489
|
}
|
|
30861
|
-
if (running.length === 0) return "unhandled";
|
|
30862
31490
|
const resolution = resolveSteerTarget(mention.target, running);
|
|
30863
31491
|
if (resolution.kind === "match") {
|
|
30864
31492
|
try {
|
|
@@ -30885,12 +31513,15 @@ function createEditorSubmitController(deps) {
|
|
|
30885
31513
|
}
|
|
30886
31514
|
deps.notify(
|
|
30887
31515
|
"warning",
|
|
30888
|
-
`no running dispatch matches @${mention.target}; running: ${formatSteerCandidates(running)}`,
|
|
31516
|
+
`no running dispatch matches @${mention.target}; running: ${formatSteerCandidates(running) || "none"}; choose an active target in Fleet Runs or remove the @target to send to the main agent`,
|
|
30889
31517
|
`steer:${mention.target}`
|
|
30890
31518
|
);
|
|
30891
31519
|
return "rejected";
|
|
30892
31520
|
};
|
|
30893
|
-
const handleEditorSteerMention = (mention) =>
|
|
31521
|
+
const handleEditorSteerMention = (mention) => {
|
|
31522
|
+
submitEditorSteerMention(mention);
|
|
31523
|
+
return true;
|
|
31524
|
+
};
|
|
30894
31525
|
const submitEditorText = (text) => {
|
|
30895
31526
|
const literalText = unguardPastedEditorOperator(text);
|
|
30896
31527
|
const trimmed = literalText.trim();
|
|
@@ -30909,16 +31540,14 @@ function createEditorSubmitController(deps) {
|
|
|
30909
31540
|
const steerMention = parseEditorSteerMention(trimmed);
|
|
30910
31541
|
if (steerMention) {
|
|
30911
31542
|
const submission = submitEditorSteerMention(steerMention);
|
|
30912
|
-
if (submission
|
|
30913
|
-
|
|
30914
|
-
|
|
30915
|
-
|
|
30916
|
-
|
|
30917
|
-
deps.editor.setText(literalText);
|
|
30918
|
-
}
|
|
30919
|
-
deps.ui.requestRender();
|
|
30920
|
-
return;
|
|
31543
|
+
if (submission === "accepted") {
|
|
31544
|
+
deps.editor.addToHistory(literalText);
|
|
31545
|
+
deps.editor.setText("");
|
|
31546
|
+
} else {
|
|
31547
|
+
deps.editor.setText(literalText);
|
|
30921
31548
|
}
|
|
31549
|
+
deps.ui.requestRender();
|
|
31550
|
+
return;
|
|
30922
31551
|
}
|
|
30923
31552
|
const command = parseSlashCommand(trimmed);
|
|
30924
31553
|
if (command.kind === "editor" || command.kind === "interrupt") {
|
|
@@ -30979,14 +31608,12 @@ function createEditorSubmitController(deps) {
|
|
|
30979
31608
|
const steerMention = parseEditorSteerMention(trimmed);
|
|
30980
31609
|
if (steerMention) {
|
|
30981
31610
|
const submission = submitEditorSteerMention(steerMention);
|
|
30982
|
-
if (submission
|
|
30983
|
-
|
|
30984
|
-
throw new Error("queued boot steer was not admitted; preserving it for recovery");
|
|
30985
|
-
}
|
|
30986
|
-
deps.editor.addToHistory(literalText);
|
|
30987
|
-
deps.ui.requestRender();
|
|
30988
|
-
return;
|
|
31611
|
+
if (submission === "rejected") {
|
|
31612
|
+
throw new Error("queued boot steer was not admitted; preserving it for recovery");
|
|
30989
31613
|
}
|
|
31614
|
+
deps.editor.addToHistory(literalText);
|
|
31615
|
+
deps.ui.requestRender();
|
|
31616
|
+
return;
|
|
30990
31617
|
}
|
|
30991
31618
|
const command = parseSlashCommand(trimmed);
|
|
30992
31619
|
if (isRejectedCommand(command)) {
|
|
@@ -32571,7 +33198,7 @@ function outcomeUnit(receipt, word) {
|
|
|
32571
33198
|
var CHECKPOINT_PREFIX = /^\s*(?:needs_input\b|task_blocked\b|##\s*CHECKPOINT REACHED\b|##\s*BLOCKED\b)/iu;
|
|
32572
33199
|
var CHECKPOINT_PREVIEW_ROWS = 16;
|
|
32573
33200
|
function workerNeedsInput(entry) {
|
|
32574
|
-
return entry.receipt !== void 0 && entry.receipt.stillRunning !== true && CHECKPOINT_PREFIX.test(entry.text);
|
|
33201
|
+
return entry.receipt !== void 0 && entry.receipt.stillRunning !== true && CHECKPOINT_PREFIX.test(entry.text.trim().replace(/^```[A-Za-z0-9_-]*[^\S\r\n]*\r?\n/u, ""));
|
|
32575
33202
|
}
|
|
32576
33203
|
function needsInputUnit() {
|
|
32577
33204
|
return theme5.fg("warning", `${GLYPH.phaseBlocked} needs input`);
|
|
@@ -32608,126 +33235,20 @@ function railLines(text, token, width) {
|
|
|
32608
33235
|
const contentWidth = Math.max(1, width - RAIL_WIDTH);
|
|
32609
33236
|
return wrapTextWithAnsi(text, contentWidth).map((row2) => `${dim3(RAIL)}${theme5.fg(token, row2)}`);
|
|
32610
33237
|
}
|
|
32611
|
-
function structuredAnswer(text) {
|
|
32612
|
-
const parsed = parseJsonObjectPayload(text);
|
|
32613
|
-
return parsed.ok ? parsed.value : null;
|
|
32614
|
-
}
|
|
32615
|
-
var isStringArray = (value) => Array.isArray(value) && value.every((entry) => typeof entry === "string");
|
|
32616
|
-
function reportString(value) {
|
|
32617
|
-
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
|
32618
|
-
}
|
|
32619
|
-
function debuggerReport(value) {
|
|
32620
|
-
const diagnosis = reportString(value.diagnosis);
|
|
32621
|
-
const reproduction = value.reproduction;
|
|
32622
|
-
if (diagnosis === null || reproduction !== "reproduced" && reproduction !== "not-reproduced" && reproduction !== "unknown" || !isStringArray(value.evidence)) {
|
|
32623
|
-
return null;
|
|
32624
|
-
}
|
|
32625
|
-
return {
|
|
32626
|
-
lines: [
|
|
32627
|
-
diagnosis,
|
|
32628
|
-
...value.evidence.length === 0 ? ["Evidence: none"] : ["Evidence:", ...value.evidence.map((item) => `- ${item}`)]
|
|
32629
|
-
],
|
|
32630
|
-
footer: `reproduction ${reproduction}`
|
|
32631
|
-
};
|
|
32632
|
-
}
|
|
32633
|
-
function verifierReport(value) {
|
|
32634
|
-
if (value.verdict !== "pass" && value.verdict !== "fail" || !Array.isArray(value.checks)) return null;
|
|
32635
|
-
const lines = [];
|
|
32636
|
-
for (const raw of value.checks) {
|
|
32637
|
-
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
32638
|
-
const check = raw;
|
|
32639
|
-
const name = reportString(check.name);
|
|
32640
|
-
const evidence = reportString(check.evidence);
|
|
32641
|
-
if (name === null || evidence === null || typeof check.passed !== "boolean") return null;
|
|
32642
|
-
lines.push(`${check.passed ? GLYPH.ok : GLYPH.error} ${name}: ${evidence}`);
|
|
32643
|
-
}
|
|
32644
|
-
return { lines: lines.length === 0 ? ["No checks reported."] : lines, footer: `verdict ${value.verdict}` };
|
|
32645
|
-
}
|
|
32646
|
-
function researchReport(value) {
|
|
32647
|
-
if (value.source !== "local" && value.source !== "external" || !Array.isArray(value.findings)) return null;
|
|
32648
|
-
const lines = [];
|
|
32649
|
-
for (const raw of value.findings) {
|
|
32650
|
-
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
32651
|
-
const finding = raw;
|
|
32652
|
-
const claim = reportString(finding.claim);
|
|
32653
|
-
const evidence = reportString(finding.evidence);
|
|
32654
|
-
if (claim === null || evidence === null) return null;
|
|
32655
|
-
lines.push(`- ${claim}`, ` citation: ${evidence}`);
|
|
32656
|
-
}
|
|
32657
|
-
return { lines: lines.length === 0 ? ["No findings reported."] : lines, footer: `source ${value.source}` };
|
|
32658
|
-
}
|
|
32659
|
-
function worldKnowledgeReport(value) {
|
|
32660
|
-
if (value.discovery !== "performed" && value.discovery !== "caller-supplied-only" && value.discovery !== "unavailable" || !Array.isArray(value.facts) || !isStringArray(value.synthesis) || !isStringArray(value.uncertainties) || !isStringArray(value.followUpVerification)) {
|
|
32661
|
-
return null;
|
|
32662
|
-
}
|
|
32663
|
-
const lines = [];
|
|
32664
|
-
for (const raw of value.facts) {
|
|
32665
|
-
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
32666
|
-
const fact = raw;
|
|
32667
|
-
const claim = reportString(fact.claim);
|
|
32668
|
-
const evidence = reportString(fact.evidence);
|
|
32669
|
-
if (claim === null || evidence === null || !isStringArray(fact.sources)) return null;
|
|
32670
|
-
lines.push(`- ${claim}`, ` support: ${evidence}`);
|
|
32671
|
-
if (fact.sources.length > 0) lines.push(` sources: ${fact.sources.join(", ")}`);
|
|
32672
|
-
}
|
|
32673
|
-
if (value.synthesis.length > 0) lines.push("Synthesis:", ...value.synthesis.map((item) => `- ${item}`));
|
|
32674
|
-
if (value.uncertainties.length > 0) lines.push("Uncertainties:", ...value.uncertainties.map((item) => `- ${item}`));
|
|
32675
|
-
if (value.followUpVerification.length > 0) {
|
|
32676
|
-
lines.push("Verify next:", ...value.followUpVerification.map((item) => `- ${item}`));
|
|
32677
|
-
}
|
|
32678
|
-
return { lines: lines.length === 0 ? ["No findings reported."] : lines, footer: `discovery ${value.discovery}` };
|
|
32679
|
-
}
|
|
32680
|
-
function scoutReport(value) {
|
|
32681
|
-
if (!Array.isArray(value.findings) || typeof value.needsSplit !== "boolean") return null;
|
|
32682
|
-
const lines = [];
|
|
32683
|
-
for (const raw of value.findings) {
|
|
32684
|
-
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
32685
|
-
const finding = raw;
|
|
32686
|
-
const claim = reportString(finding.claim);
|
|
32687
|
-
if (claim === null) return null;
|
|
32688
|
-
const path2 = reportString(finding.path);
|
|
32689
|
-
const line = typeof finding.line === "number" && Number.isSafeInteger(finding.line) ? finding.line : null;
|
|
32690
|
-
lines.push(path2 !== null && line !== null ? `- ${claim} \u2014 ${path2}:${line}` : `- ${claim} (ungrounded lead)`);
|
|
32691
|
-
}
|
|
32692
|
-
if (value.needsSplit) {
|
|
32693
|
-
if (!Array.isArray(value.proposedSubtasks)) return null;
|
|
32694
|
-
lines.push("Split recommended:");
|
|
32695
|
-
for (const raw of value.proposedSubtasks) {
|
|
32696
|
-
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
32697
|
-
const subtask = raw;
|
|
32698
|
-
const task = reportString(subtask.task);
|
|
32699
|
-
const id = reportString(subtask.id);
|
|
32700
|
-
if (task === null || id === null) return null;
|
|
32701
|
-
lines.push(`- ${id}: ${task}`);
|
|
32702
|
-
}
|
|
32703
|
-
}
|
|
32704
|
-
return {
|
|
32705
|
-
lines: lines.length === 0 ? ["No findings reported."] : lines,
|
|
32706
|
-
footer: value.needsSplit ? "split needed" : "no split needed"
|
|
32707
|
-
};
|
|
32708
|
-
}
|
|
32709
33238
|
function presentedContractAnswer(entry) {
|
|
32710
|
-
if (entry.receipt?.
|
|
32711
|
-
|
|
32712
|
-
|
|
32713
|
-
|
|
32714
|
-
|
|
32715
|
-
|
|
32716
|
-
|
|
32717
|
-
|
|
32718
|
-
|
|
32719
|
-
case "verifier-report":
|
|
32720
|
-
return verifierReport(value);
|
|
32721
|
-
case "research-report":
|
|
32722
|
-
return researchReport(value);
|
|
32723
|
-
case "world-knowledge-report":
|
|
32724
|
-
return worldKnowledgeReport(value);
|
|
32725
|
-
case "scout-report":
|
|
32726
|
-
return scoutReport(value);
|
|
32727
|
-
}
|
|
33239
|
+
if (entry.receipt?.trust?.artifactIntegrity.state !== "verified") return null;
|
|
33240
|
+
const kind = entry.receipt?.contractKind;
|
|
33241
|
+
const conformance = entry.receipt?.contract;
|
|
33242
|
+
return presentWorkerContractAnswer(
|
|
33243
|
+
entry.text,
|
|
33244
|
+
kind && conformance ? { kind, conformance } : void 0,
|
|
33245
|
+
entry.droppedLines === 0 && (entry.progress?.droppedBytes ?? 0) === 0,
|
|
33246
|
+
!entry.pending && !isPending(entry)
|
|
33247
|
+
);
|
|
32728
33248
|
}
|
|
33249
|
+
var isStringArray2 = (value) => Array.isArray(value) && value.every((entry) => typeof entry === "string");
|
|
32729
33250
|
function mutationReportLines(value) {
|
|
32730
|
-
if (!
|
|
33251
|
+
if (!isStringArray2(value.mutatedPaths) || !Array.isArray(value.validations)) return null;
|
|
32731
33252
|
const lines = [];
|
|
32732
33253
|
lines.push(value.mutatedPaths.length === 0 ? "changed nothing" : `changed ${value.mutatedPaths.join(", ")}`);
|
|
32733
33254
|
for (const validation of value.validations) {
|
|
@@ -32745,16 +33266,18 @@ function mutationReportLines(value) {
|
|
|
32745
33266
|
return lines;
|
|
32746
33267
|
}
|
|
32747
33268
|
function bodySourceLines(entry) {
|
|
32748
|
-
|
|
32749
|
-
|
|
33269
|
+
if (entry.pending || entry.receipt?.trust?.artifactIntegrity.state !== "verified" || entry.droppedLines !== 0 || (entry.progress?.droppedBytes ?? 0) !== 0)
|
|
33270
|
+
return safeWorkerAnswerText(entry.text).split("\n");
|
|
33271
|
+
const structured = entry.droppedLines === 0 ? exactWorkerAnswerObject(entry.text) : null;
|
|
33272
|
+
if (structured === null) return safeWorkerAnswerText(entry.text).split("\n");
|
|
32750
33273
|
const presented = presentedContractAnswer(entry);
|
|
32751
33274
|
if (presented !== null) return presented.lines;
|
|
32752
|
-
return mutationReportLines(structured) ??
|
|
33275
|
+
return mutationReportLines(structured)?.map(safeWorkerAnswerText) ?? safeWorkerAnswerText(entry.text).split("\n");
|
|
32753
33276
|
}
|
|
32754
33277
|
function bodyLines(entry, width, unbounded) {
|
|
32755
33278
|
if (entry.text.length === 0) return [];
|
|
32756
33279
|
const contentWidth = Math.max(1, width - RAIL_WIDTH);
|
|
32757
|
-
const source = bodySourceLines(entry);
|
|
33280
|
+
const source = unbounded ? safeWorkerAnswerText(entry.text).split("\n") : bodySourceLines(entry);
|
|
32758
33281
|
const capped = unbounded || source.length <= BODY_LINE_LIMIT ? source : source.slice(0, BODY_LINE_LIMIT);
|
|
32759
33282
|
const hiddenLines = entry.droppedLines + (source.length - capped.length);
|
|
32760
33283
|
const out = [];
|
|
@@ -32799,6 +33322,12 @@ function actionLine(entry, width) {
|
|
|
32799
33322
|
}
|
|
32800
33323
|
function renderWorkerEntryLines(entry, width, options) {
|
|
32801
33324
|
const safeWidth = Math.max(1, Math.floor(width));
|
|
33325
|
+
const integrity = entry.receipt?.trust;
|
|
33326
|
+
const provenance = isPending(entry) || integrity?.artifactIntegrity.state === "verified" ? [] : railLines(
|
|
33327
|
+
`receipt: ${integrity ? retiredIntegrityVersionOf(integrity.artifactIntegrity) !== null ? "seal retired" : trustStateWord("artifactIntegrity", integrity.artifactIntegrity.state) : "integrity unavailable"}; raw output, not admitted as evidence`,
|
|
33328
|
+
"warning",
|
|
33329
|
+
safeWidth
|
|
33330
|
+
);
|
|
32802
33331
|
const quality = isPending(entry) ? [] : railLines(
|
|
32803
33332
|
`quality: ${trustStateWord("validationGrounding", entry.receipt?.trust?.validationGrounding.state ?? "unknown")}`,
|
|
32804
33333
|
"muted",
|
|
@@ -32814,6 +33343,7 @@ function renderWorkerEntryLines(entry, width, options) {
|
|
|
32814
33343
|
...tools2 ? [tools2] : [],
|
|
32815
33344
|
...failureLines(entry, safeWidth),
|
|
32816
33345
|
footerLine(entry, safeWidth),
|
|
33346
|
+
...provenance,
|
|
32817
33347
|
...quality
|
|
32818
33348
|
].map(redactSecretString);
|
|
32819
33349
|
}
|
|
@@ -32823,10 +33353,14 @@ function renderWorkerEntryLines(entry, width, options) {
|
|
|
32823
33353
|
const summary = bodySourceLines(entry).flatMap(
|
|
32824
33354
|
(line) => railLines(redactSecretString(line), needsInput ? "warning" : "muted", safeWidth)
|
|
32825
33355
|
);
|
|
32826
|
-
const
|
|
33356
|
+
const current = isPending(entry) ? entry.progress?.currentAction : null;
|
|
33357
|
+
const actions = [
|
|
33358
|
+
...current ? [{ action: current, label: "now" }] : [],
|
|
33359
|
+
...(entry.progress?.recentActions ?? []).map((action) => ({ action, label: "last" }))
|
|
33360
|
+
];
|
|
32827
33361
|
const trail = actions.flatMap(
|
|
32828
|
-
(action) => railLines(
|
|
32829
|
-
`${GLYPH.phaseTool} ${action.descriptor ? `${action.descriptor.verb} ${action.descriptor.object}` : action.tool}`,
|
|
33362
|
+
({ action, label }) => railLines(
|
|
33363
|
+
`${GLYPH.phaseTool} ${label}: ${action.descriptor ? `${action.descriptor.verb} ${action.descriptor.object}` : action.tool}`,
|
|
32830
33364
|
"muted",
|
|
32831
33365
|
safeWidth
|
|
32832
33366
|
)
|
|
@@ -32839,7 +33373,7 @@ function renderWorkerEntryLines(entry, width, options) {
|
|
|
32839
33373
|
...detail.workerRows > 0 || needsInput ? previewRows(summary, summaryRows, safeWidth, entry.pending) : [],
|
|
32840
33374
|
...previewRows(attemptLines(entry, safeWidth), budget(detail.errorRows), safeWidth, true),
|
|
32841
33375
|
...tools ? [tools] : [],
|
|
32842
|
-
...detail.workerActivity ? previewRows(trail, budget(4), safeWidth
|
|
33376
|
+
...detail.workerActivity ? previewRows(trail, budget(4), safeWidth) : [],
|
|
32843
33377
|
...failure2,
|
|
32844
33378
|
...presented ? railLines(presented, "muted", safeWidth) : [],
|
|
32845
33379
|
...entry.receipt?.abandonedDetail ? railLines(entry.receipt.abandonedDetail, "warning", safeWidth) : [],
|
|
@@ -32849,6 +33383,7 @@ function renderWorkerEntryLines(entry, width, options) {
|
|
|
32849
33383
|
"muted",
|
|
32850
33384
|
safeWidth
|
|
32851
33385
|
) : [],
|
|
33386
|
+
...provenance,
|
|
32852
33387
|
...quality
|
|
32853
33388
|
].map(redactSecretString);
|
|
32854
33389
|
}
|
|
@@ -32956,7 +33491,7 @@ function scopeTerminalErrorAfterSuccessfulTool(entry, terminalError) {
|
|
|
32956
33491
|
if (successfulTools.length === 0) return terminalError;
|
|
32957
33492
|
const reason = terminalError.slice("[error] ".length);
|
|
32958
33493
|
const timedOut = /\b(?:timed?\s*out|timeout)\b/i.test(reason);
|
|
32959
|
-
const modelFailure = timedOut ?
|
|
33494
|
+
const modelFailure = timedOut ? `main model response timed out after successful tool result: ${reason}` : `main model response failed after successful tool result: ${reason}`;
|
|
32960
33495
|
const detachedDispatchSucceeded = successfulTools.some(
|
|
32961
33496
|
(segment) => segment.name === "dispatch" && segment.args !== null && typeof segment.args === "object" && segment.args.detach === true
|
|
32962
33497
|
);
|
|
@@ -33042,9 +33577,9 @@ function renderTextSegmentLines(seg, width) {
|
|
|
33042
33577
|
}
|
|
33043
33578
|
return seg.md.render(width).map((line) => line.replace(/ +$/, ""));
|
|
33044
33579
|
}
|
|
33045
|
-
function renderErrorSegmentLines(seg, width) {
|
|
33580
|
+
function renderErrorSegmentLines(seg, width, unbounded) {
|
|
33046
33581
|
const out = [];
|
|
33047
|
-
for (const line of seg.text.split("\n")) {
|
|
33582
|
+
for (const line of (unbounded ? providerErrorEvidence(seg.text) : presentProviderError(seg.text)).split("\n")) {
|
|
33048
33583
|
for (const wrapped of wrapTextWithAnsi(line, width)) {
|
|
33049
33584
|
out.push(`${RED_CRIT}${wrapped}${RESET}`);
|
|
33050
33585
|
}
|
|
@@ -33151,7 +33686,7 @@ function observation(seg) {
|
|
|
33151
33686
|
}
|
|
33152
33687
|
function renderEntryLines(entry, width, nowMs, unboundedToolBodies, detail, terminalRows) {
|
|
33153
33688
|
if (entry.role === "replayBlock") {
|
|
33154
|
-
return entry.renderBlock(width, detail);
|
|
33689
|
+
return entry.renderBlock(width, detail, unboundedToolBodies, terminalRows);
|
|
33155
33690
|
}
|
|
33156
33691
|
if (entry.role === "user") {
|
|
33157
33692
|
const contentWidth = Math.max(1, width - PROSE_GUTTER_WIDTH);
|
|
@@ -33165,7 +33700,7 @@ function renderEntryLines(entry, width, nowMs, unboundedToolBodies, detail, term
|
|
|
33165
33700
|
return rendered;
|
|
33166
33701
|
}
|
|
33167
33702
|
if (entry.role === "retryStatus") {
|
|
33168
|
-
return
|
|
33703
|
+
return renderRetryStatus(entry.status, width, detail, unboundedToolBodies, terminalRows);
|
|
33169
33704
|
}
|
|
33170
33705
|
if (entry.role === "worker") {
|
|
33171
33706
|
return renderWorkerEntryLines(entry.state, width, { detail, terminalRows, unbounded: unboundedToolBodies });
|
|
@@ -33215,7 +33750,10 @@ function renderEntryLines(entry, width, nowMs, unboundedToolBodies, detail, term
|
|
|
33215
33750
|
labeled = true;
|
|
33216
33751
|
continue;
|
|
33217
33752
|
}
|
|
33218
|
-
|
|
33753
|
+
let rendered = seg.kind === "text" ? renderTextSegmentLines(seg, proseWidth) : renderErrorSegmentLines(seg, proseWidth, unboundedToolBodies);
|
|
33754
|
+
if (seg.kind === "error" && !unboundedToolBodies) {
|
|
33755
|
+
rendered = previewRows(rendered, previewBudget(detail.errorRows, terminalRows), proseWidth);
|
|
33756
|
+
}
|
|
33219
33757
|
if (rendered.length === 0) continue;
|
|
33220
33758
|
const isSkillSuggestion = seg.kind === "text" && findSkillSuggestionLine(seg) !== null;
|
|
33221
33759
|
if (!labeled && !isSkillSuggestion) {
|
|
@@ -33496,6 +34034,7 @@ function createChatPanel(options = {}) {
|
|
|
33496
34034
|
for (const entry of transcript) {
|
|
33497
34035
|
if (entry.role === "assistant") {
|
|
33498
34036
|
for (const seg of entry.segments) {
|
|
34037
|
+
if (seg.kind === "error") add("Provider or terminal error", () => providerErrorEvidence(seg.text).split("\n"));
|
|
33499
34038
|
if (seg.kind === "thinking" && seg.text) add("Thinking \xB7 supplied reasoning", () => seg.text.split("\n"));
|
|
33500
34039
|
if (seg.kind === "tool")
|
|
33501
34040
|
add(
|
|
@@ -33516,6 +34055,8 @@ function createChatPanel(options = {}) {
|
|
|
33516
34055
|
)
|
|
33517
34056
|
);
|
|
33518
34057
|
}
|
|
34058
|
+
} else if (entry.role === "retryStatus" && entry.status.errorMessage) {
|
|
34059
|
+
add("Provider retry diagnostic", () => providerErrorEvidence(entry.status.errorMessage ?? "").split("\n"));
|
|
33519
34060
|
} else if (entry.role === "worker") {
|
|
33520
34061
|
add(
|
|
33521
34062
|
`${entry.state.agentId} \xB7 worker ${entry.state.runId}`,
|
|
@@ -34440,7 +34981,7 @@ init_esm_shims();
|
|
|
34440
34981
|
import { execFile as execFile2 } from "node:child_process";
|
|
34441
34982
|
import { open, readdir, stat as stat2 } from "node:fs/promises";
|
|
34442
34983
|
import { homedir as homedir2 } from "node:os";
|
|
34443
|
-
import { basename as basename3, dirname, join as join5, relative as relative7, resolve as
|
|
34984
|
+
import { basename as basename3, dirname, join as join5, relative as relative7, resolve as resolve6, sep as sep2 } from "node:path";
|
|
34444
34985
|
var MAX_COMPLETION_ROWS = 40;
|
|
34445
34986
|
var PREVIEW_BYTES = 2048;
|
|
34446
34987
|
var PREVIEW_CHARS = 120;
|
|
@@ -34563,9 +35104,9 @@ function explicitPathQuery(query) {
|
|
|
34563
35104
|
return query.startsWith("../") || query.startsWith("~/") || query.startsWith("/");
|
|
34564
35105
|
}
|
|
34565
35106
|
function resolveDisplayBase(basePath, displayBase) {
|
|
34566
|
-
if (displayBase.startsWith("~/")) return
|
|
34567
|
-
if (displayBase.startsWith("/")) return
|
|
34568
|
-
return
|
|
35107
|
+
if (displayBase.startsWith("~/")) return resolve6(homedir2(), displayBase.slice(2));
|
|
35108
|
+
if (displayBase.startsWith("/")) return resolve6(displayBase);
|
|
35109
|
+
return resolve6(basePath, displayBase);
|
|
34569
35110
|
}
|
|
34570
35111
|
function workspaceRelative(basePath, absolutePath) {
|
|
34571
35112
|
const candidate = posixPath(relative7(basePath, absolutePath));
|
|
@@ -34656,7 +35197,7 @@ function completionId(candidate) {
|
|
|
34656
35197
|
return `file-reference:${candidate.isDirectory ? "directory" : "file"}:${candidate.absolutePath}`;
|
|
34657
35198
|
}
|
|
34658
35199
|
function createFileReferenceCompletionSource(options) {
|
|
34659
|
-
const basePath =
|
|
35200
|
+
const basePath = resolve6(options.basePath);
|
|
34660
35201
|
const listWorkspaceFiles = options.listWorkspaceFiles ?? ((cwd) => enumerateWorkspaceFilesAsync(cwd));
|
|
34661
35202
|
const listTrackedFiles = options.listTrackedFiles ?? gitTrackedFiles;
|
|
34662
35203
|
const cacheTtlMs = options.cacheTtlMs ?? SNAPSHOT_TTL_MS;
|
|
@@ -35780,7 +36321,7 @@ function createInteractivePresentation(deps) {
|
|
|
35780
36321
|
const editorChrome = {
|
|
35781
36322
|
getModelLabel: () => {
|
|
35782
36323
|
const current = deps.getSettings?.();
|
|
35783
|
-
return
|
|
36324
|
+
return { targetId: current?.chat?.target, modelId: current?.chat?.model };
|
|
35784
36325
|
},
|
|
35785
36326
|
getThinkingLabel: () => {
|
|
35786
36327
|
const current = deps.getSettings?.();
|
|
@@ -36015,7 +36556,7 @@ function createInteractivePresentation(deps) {
|
|
|
36015
36556
|
// src/interactive/interactive-slash-runtime.ts
|
|
36016
36557
|
init_esm_shims();
|
|
36017
36558
|
import { mkdirSync as mkdirSync2, writeFileSync } from "node:fs";
|
|
36018
|
-
import { join as join6, resolve as
|
|
36559
|
+
import { join as join6, resolve as resolve7 } from "node:path";
|
|
36019
36560
|
|
|
36020
36561
|
// src/interactive/context-recall-command.ts
|
|
36021
36562
|
init_esm_shims();
|
|
@@ -36370,8 +36911,8 @@ function createInteractiveSlashRuntime(deps) {
|
|
|
36370
36911
|
deps.requestRender();
|
|
36371
36912
|
let acknowledgeAdmission = () => {
|
|
36372
36913
|
};
|
|
36373
|
-
const admitted = new Promise((
|
|
36374
|
-
acknowledgeAdmission =
|
|
36914
|
+
const admitted = new Promise((resolve11) => {
|
|
36915
|
+
acknowledgeAdmission = resolve11;
|
|
36375
36916
|
});
|
|
36376
36917
|
const turn = deps.chat.submit(sub.text, {
|
|
36377
36918
|
...sub.display ? { display: sub.display } : {},
|
|
@@ -36514,7 +37055,7 @@ function createInteractiveSlashRuntime(deps) {
|
|
|
36514
37055
|
listDelegationAgents: () => deps.getSettings?.().integrations.externalAgents.entries ?? [],
|
|
36515
37056
|
exportShareArchive: (outPath) => {
|
|
36516
37057
|
if (!deps.share) throw new Error("share domain is not loaded");
|
|
36517
|
-
const path2 =
|
|
37058
|
+
const path2 = resolve7(outPath);
|
|
36518
37059
|
const archive = deps.share.writeArchive(path2, { scope: "project" });
|
|
36519
37060
|
return { fileCount: archive.files.length, path: path2 };
|
|
36520
37061
|
},
|
|
@@ -36530,7 +37071,7 @@ function createInteractiveSlashRuntime(deps) {
|
|
|
36530
37071
|
...options.dryRun ? { dryRun: true } : {},
|
|
36531
37072
|
...options.force ? { force: true } : {}
|
|
36532
37073
|
};
|
|
36533
|
-
return options.dryRun ? deps.share.planImport(
|
|
37074
|
+
return options.dryRun ? deps.share.planImport(resolve7(archivePath), importOptions) : deps.share.importArchive(resolve7(archivePath), importOptions);
|
|
36534
37075
|
},
|
|
36535
37076
|
openCost: deps.openCost,
|
|
36536
37077
|
openSideQuestion: deps.openSideQuestion,
|
|
@@ -36660,10 +37201,10 @@ function createInteractiveSlashRuntime(deps) {
|
|
|
36660
37201
|
const date = dateLocal(exportedAt);
|
|
36661
37202
|
const requestedPath = pathArg?.trim() ?? "";
|
|
36662
37203
|
const markdown = requestedPath.toLowerCase().endsWith(".md");
|
|
36663
|
-
const target =
|
|
37204
|
+
const target = resolve7(
|
|
36664
37205
|
requestedPath.length > 0 ? requestedPath : join6(".clio-coder", "exports", `${sessionId}-${date}.html`)
|
|
36665
37206
|
);
|
|
36666
|
-
mkdirSync2(
|
|
37207
|
+
mkdirSync2(resolve7(target, ".."), { recursive: true });
|
|
36667
37208
|
if (markdown) {
|
|
36668
37209
|
const lines = ansiLines.map(stripTerminalSequences);
|
|
36669
37210
|
const header = [`# Clio session ${sessionId}`, "", `Exported ${exportedAt.toISOString()}`, "", "```text"];
|
|
@@ -37964,7 +38505,7 @@ async function prepareBackgroundModelMetadata(providers, targetId, signal) {
|
|
|
37964
38505
|
init_esm_shims();
|
|
37965
38506
|
import { constants } from "node:fs";
|
|
37966
38507
|
import { open as open2 } from "node:fs/promises";
|
|
37967
|
-
import { resolve as
|
|
38508
|
+
import { resolve as resolve8 } from "node:path";
|
|
37968
38509
|
var MAX_PROMPT_BYTES = 64 * 1024;
|
|
37969
38510
|
async function readCompactionSystemPrompt(path2, workspace) {
|
|
37970
38511
|
if (path2 === void 0 || path2 === null) return void 0;
|
|
@@ -37979,7 +38520,7 @@ async function readCompactionSystemPrompt(path2, workspace) {
|
|
|
37979
38520
|
if (!path2.trim()) throw failure2("path is empty");
|
|
37980
38521
|
let file;
|
|
37981
38522
|
try {
|
|
37982
|
-
file = await open2(
|
|
38523
|
+
file = await open2(resolve8(workspace, path2), constants.O_RDONLY | constants.O_NONBLOCK);
|
|
37983
38524
|
} catch {
|
|
37984
38525
|
throw failure2("cannot be opened");
|
|
37985
38526
|
}
|
|
@@ -38332,11 +38873,11 @@ init_esm_shims();
|
|
|
38332
38873
|
|
|
38333
38874
|
// src/tools/dispatch-admission.ts
|
|
38334
38875
|
init_esm_shims();
|
|
38335
|
-
import { isAbsolute as isAbsolute7, relative as relative9, resolve as
|
|
38876
|
+
import { isAbsolute as isAbsolute7, relative as relative9, resolve as resolve10 } from "node:path";
|
|
38336
38877
|
|
|
38337
38878
|
// src/domains/dispatch/parallel-writers.ts
|
|
38338
38879
|
init_esm_shims();
|
|
38339
|
-
import { isAbsolute as isAbsolute6, relative as relative8, resolve as
|
|
38880
|
+
import { isAbsolute as isAbsolute6, relative as relative8, resolve as resolve9, sep as sep3 } from "node:path";
|
|
38340
38881
|
function parallelWriterConflict(requests, specs) {
|
|
38341
38882
|
const classes = new Map(specs.map((spec) => [spec.id, spec.capabilityClass]));
|
|
38342
38883
|
const writers = requests.filter(
|
|
@@ -38344,7 +38885,7 @@ function parallelWriterConflict(requests, specs) {
|
|
|
38344
38885
|
);
|
|
38345
38886
|
const roots = writers.map(
|
|
38346
38887
|
(request) => (request.writeRoots ?? request.intent?.writeRoots ?? []).map(
|
|
38347
|
-
(root) => canonicalizeExistingPath(
|
|
38888
|
+
(root) => canonicalizeExistingPath(resolve9(request.cwd ?? process.cwd(), root))
|
|
38348
38889
|
)
|
|
38349
38890
|
);
|
|
38350
38891
|
const contains = (parent, child) => {
|
|
@@ -38710,7 +39251,7 @@ function createDispatchAdmissionController(deps) {
|
|
|
38710
39251
|
return {
|
|
38711
39252
|
check: entry.check,
|
|
38712
39253
|
argv: [...check.command],
|
|
38713
|
-
cwd:
|
|
39254
|
+
cwd: resolve10(process.cwd(), check.cwd),
|
|
38714
39255
|
timeoutMs: entry.timeoutMs,
|
|
38715
39256
|
// A judged check seals its kind and absolute file paths here, so
|
|
38716
39257
|
// host verification judges against what the catalog declared at
|
|
@@ -38718,14 +39259,14 @@ function createDispatchAdmissionController(deps) {
|
|
|
38718
39259
|
...check.kind !== "command" ? { kind: check.kind } : {},
|
|
38719
39260
|
...check.numeric !== void 0 ? {
|
|
38720
39261
|
numeric: {
|
|
38721
|
-
reference:
|
|
39262
|
+
reference: resolve10(process.cwd(), check.numeric.reference),
|
|
38722
39263
|
tolerance: { ...check.numeric.tolerance }
|
|
38723
39264
|
}
|
|
38724
39265
|
} : {},
|
|
38725
39266
|
...check.perf !== void 0 ? {
|
|
38726
39267
|
perf: {
|
|
38727
39268
|
...check.perf.budget !== void 0 ? { budget: structuredClone(check.perf.budget) } : {},
|
|
38728
|
-
...check.perf.baseline !== void 0 ? { baseline:
|
|
39269
|
+
...check.perf.baseline !== void 0 ? { baseline: resolve10(process.cwd(), check.perf.baseline) } : {},
|
|
38729
39270
|
...check.perf.tolerance !== void 0 ? { tolerance: { ...check.perf.tolerance } } : {}
|
|
38730
39271
|
}
|
|
38731
39272
|
} : {}
|
|
@@ -38792,7 +39333,7 @@ function createDispatchAdmissionController(deps) {
|
|
|
38792
39333
|
...request.worktree === true ? {
|
|
38793
39334
|
worktree: true,
|
|
38794
39335
|
apply: request.apply ?? "merge",
|
|
38795
|
-
...gitCheckoutRoot(
|
|
39336
|
+
...gitCheckoutRoot(resolve10(request.cwd ?? process.cwd())) === null ? {} : { worktreeDestination: gitCheckoutRoot(resolve10(request.cwd ?? process.cwd())) }
|
|
38796
39337
|
} : {},
|
|
38797
39338
|
target: resolution.targetId,
|
|
38798
39339
|
model: resolution.wireModelId,
|
|
@@ -38919,7 +39460,7 @@ function createDispatchAdmissionController(deps) {
|
|
|
38919
39460
|
return shapeRejection(args, "dispatch: apply_winner.branch must be a clio-coder/compete/<group>/<n> branch");
|
|
38920
39461
|
}
|
|
38921
39462
|
try {
|
|
38922
|
-
const cwd =
|
|
39463
|
+
const cwd = resolve10(stringArg(args.apply_winner, "cwd") ?? process.cwd());
|
|
38923
39464
|
return trustExecution(
|
|
38924
39465
|
markPrepared(
|
|
38925
39466
|
withResolvedDispatchPlan(args, {
|
|
@@ -38985,7 +39526,7 @@ function createDispatchAdmissionController(deps) {
|
|
|
38985
39526
|
const spec = deps.getAgentSpecs().find((candidate) => candidate.id === request.agentId);
|
|
38986
39527
|
if (spec?.capabilityClass === "read-only") return shapeRejection(args, "worktree_read_only_agent");
|
|
38987
39528
|
if (request.cwd !== void 0) {
|
|
38988
|
-
const requested =
|
|
39529
|
+
const requested = resolve10(request.cwd);
|
|
38989
39530
|
const rel = relative9(parentCheckout, requested);
|
|
38990
39531
|
if (rel === ".." || rel.startsWith("../") || isAbsolute7(rel)) {
|
|
38991
39532
|
return shapeRejection(args, "worktree_cwd_outside_checkout");
|
|
@@ -39541,7 +40082,7 @@ function createDispatchTool(inputDeps, surfaceOptions = {}) {
|
|
|
39541
40082
|
const admission = createDispatchAdmissionController(deps);
|
|
39542
40083
|
let runnerPromise = null;
|
|
39543
40084
|
const loadRunner = () => {
|
|
39544
|
-
runnerPromise ??= (surfaceOptions.loadRunner ?? (() => import("./dispatch-runner-
|
|
40085
|
+
runnerPromise ??= (surfaceOptions.loadRunner ?? (() => import("./dispatch-runner-TR3LBP5P.js")))();
|
|
39545
40086
|
return runnerPromise;
|
|
39546
40087
|
};
|
|
39547
40088
|
return {
|
|
@@ -39580,7 +40121,13 @@ function createDispatchTool(inputDeps, surfaceOptions = {}) {
|
|
|
39580
40121
|
|
|
39581
40122
|
// src/tools/bootstrap.ts
|
|
39582
40123
|
function registerAllTools(registry, deps = {}) {
|
|
39583
|
-
const
|
|
40124
|
+
const cwd = deps.session?.current()?.cwd ?? process.cwd();
|
|
40125
|
+
const { mcpCapabilities: requestedMcp, ...coreDeps } = deps;
|
|
40126
|
+
const mcpCapabilities = requestedMcp === false ? null : requestedMcp ?? createMcpCapabilitySource({ cwd, registry });
|
|
40127
|
+
const registration = registerCoreTools(registry, {
|
|
40128
|
+
...coreDeps,
|
|
40129
|
+
...mcpCapabilities ? { mcpCapabilities } : {}
|
|
40130
|
+
});
|
|
39584
40131
|
if (deps.dispatch) {
|
|
39585
40132
|
const dispatch = deps.dispatch;
|
|
39586
40133
|
const dispatchRunEvents = createDispatchRunEventRegistry({ journal: null });
|
|
@@ -39610,7 +40157,7 @@ function registerAllTools(registry, deps = {}) {
|
|
|
39610
40157
|
...builtin(
|
|
39611
40158
|
lazyTool(
|
|
39612
40159
|
monitorToolSurface,
|
|
39613
|
-
async () => (await import("./monitor-
|
|
40160
|
+
async () => (await import("./monitor-XX6ZD6KC.js")).createMonitorTool({ dispatch, runEvents: dispatchRunEvents })
|
|
39614
40161
|
),
|
|
39615
40162
|
{
|
|
39616
40163
|
path: "src/tools/monitor.ts",
|
|
@@ -39620,7 +40167,7 @@ function registerAllTools(registry, deps = {}) {
|
|
|
39620
40167
|
});
|
|
39621
40168
|
registry.register({
|
|
39622
40169
|
...builtin(
|
|
39623
|
-
lazyTool(steerToolSurface, async () => (await import("./steer-
|
|
40170
|
+
lazyTool(steerToolSurface, async () => (await import("./steer-XCD6V3EW.js")).createSteerTool({ dispatch })),
|
|
39624
40171
|
{
|
|
39625
40172
|
path: "src/tools/steer.ts",
|
|
39626
40173
|
scope: "core"
|
|
@@ -39632,15 +40179,28 @@ function registerAllTools(registry, deps = {}) {
|
|
|
39632
40179
|
const panes = deps.panes;
|
|
39633
40180
|
registry.register({
|
|
39634
40181
|
...builtin(
|
|
39635
|
-
lazyTool(panesToolSurface, async () => (await import("./panes-
|
|
40182
|
+
lazyTool(panesToolSurface, async () => (await import("./panes-LXZIWNOZ.js")).createPanesTool({ panes })),
|
|
39636
40183
|
{ path: "src/tools/panes.ts", scope: "core" }
|
|
39637
40184
|
)
|
|
39638
40185
|
});
|
|
39639
40186
|
}
|
|
39640
40187
|
assertRegisteredBuiltinTools(registry, registration, Boolean(deps.dispatch), Boolean(deps.panes));
|
|
39641
|
-
for (const diagnostic of registerHarnessExtensionTools(registry,
|
|
40188
|
+
for (const diagnostic of registerHarnessExtensionTools(registry, cwd)) {
|
|
39642
40189
|
deps.bus?.emit(BusChannels.ExtensionsLoadIssue, { message: diagnostic.message });
|
|
39643
40190
|
}
|
|
40191
|
+
let closePromise;
|
|
40192
|
+
const close = () => {
|
|
40193
|
+
closePromise ??= Promise.resolve(mcpCapabilities?.close()).then(() => void 0);
|
|
40194
|
+
return closePromise;
|
|
40195
|
+
};
|
|
40196
|
+
if (mcpCapabilities) {
|
|
40197
|
+
deps.termination?.onTerminate(close, { timeoutMs: DEFAULT_KILL_GRACE_MS + DEFAULT_TEARDOWN_BOUND_MS + 1e3 });
|
|
40198
|
+
}
|
|
40199
|
+
if (mcpCapabilities && deps.bus) {
|
|
40200
|
+
deps.bus.on(BusChannels.SessionEnd, () => void close());
|
|
40201
|
+
deps.bus.on(BusChannels.ShutdownRequested, () => void close());
|
|
40202
|
+
}
|
|
40203
|
+
return { mcpCapabilities, close };
|
|
39644
40204
|
}
|
|
39645
40205
|
|
|
39646
40206
|
// src/tools/dispatch-background.ts
|
|
@@ -39966,6 +40526,9 @@ function agentRoleToolWarnings(providers, settings) {
|
|
|
39966
40526
|
if (!status) continue;
|
|
39967
40527
|
const capabilities = resolveModelCapabilities(status, wireModelId, providers.knowledgeBase);
|
|
39968
40528
|
if (supportsAgentRoleTools(capabilities)) continue;
|
|
40529
|
+
const declared = status.target.capabilities?.tools ?? providers.knowledgeBase?.lookup(wireModelId)?.entry.capabilities?.tools;
|
|
40530
|
+
if (declared === void 0 && status.health.lastCheckAt === null && probeCapabilitiesForModel(status, wireModelId) === null)
|
|
40531
|
+
continue;
|
|
39969
40532
|
warnings.push(
|
|
39970
40533
|
`${role.label} model '${wireModelId}' on target '${targetId}' ${AGENT_ROLE_TOOLS_REQUIRED_REASON}. Pick another model, or state the correction in a model-catalog.d entry if the provider's flag is wrong.`
|
|
39971
40534
|
);
|
|
@@ -40348,7 +40911,7 @@ async function bootOrchestrator(options = {}) {
|
|
|
40348
40911
|
let protectedArtifactStateForDispatch = null;
|
|
40349
40912
|
const muxInteractive = !options.headless && options.acp === void 0 && process.env.CLIO_CODER_INTERACTIVE === "1";
|
|
40350
40913
|
const muxEnablement = resolvePanesEnablement(options.panes, options.startupSettings?.interface.panes.enabled);
|
|
40351
|
-
const withPanes = muxInteractive && muxEnablement !== "off" ? await import("./with-panes-
|
|
40914
|
+
const withPanes = muxInteractive && muxEnablement !== "off" ? await import("./with-panes-Z6BTEHMZ.js") : null;
|
|
40352
40915
|
const result = await loadDomains(
|
|
40353
40916
|
[
|
|
40354
40917
|
options.startupSettings ? createConfigDomainModule(options.startupSettings) : ConfigDomainModule,
|
|
@@ -40390,7 +40953,7 @@ async function bootOrchestrator(options = {}) {
|
|
|
40390
40953
|
createDispatchDomainModule({
|
|
40391
40954
|
getSettings: () => effectiveSettingsForDispatch?.(),
|
|
40392
40955
|
getProtectedArtifactState: () => protectedArtifactStateForDispatch?.() ?? { artifacts: [] },
|
|
40393
|
-
autonomyOverride: options.headless?.autonomy !== void 0,
|
|
40956
|
+
autonomyOverride: (options.headless?.autonomy ?? options.autonomy) !== void 0,
|
|
40394
40957
|
// The domain owns the durable journal here, not the dispatch
|
|
40395
40958
|
// tool's event registry: `/run`, a watchdog run, and a model
|
|
40396
40959
|
// dispatch all have to leave the same transcript behind, and only
|
|
@@ -40686,7 +41249,7 @@ async function bootOrchestrator(options = {}) {
|
|
|
40686
41249
|
bootHookNotices = false;
|
|
40687
41250
|
termination.onDrain(() => hookReceiptLog.flush());
|
|
40688
41251
|
let activeAcpSessionAutonomy = null;
|
|
40689
|
-
const resolveBaselineAutonomy = () => effectiveSettingsForDispatch?.().safety.autonomy ?? options.headless?.autonomy ?? (config?.get() ?? readSettings()).safety.autonomy ?? "auto-edit";
|
|
41252
|
+
const resolveBaselineAutonomy = () => effectiveSettingsForDispatch?.().safety.autonomy ?? options.headless?.autonomy ?? options.autonomy ?? (config?.get() ?? readSettings()).safety.autonomy ?? "auto-edit";
|
|
40690
41253
|
const resolveEffectiveAutonomy = () => activeAcpSessionAutonomy ?? resolveBaselineAutonomy();
|
|
40691
41254
|
if (resources) {
|
|
40692
41255
|
middleware.registerHook(
|
|
@@ -40797,6 +41360,7 @@ async function bootOrchestrator(options = {}) {
|
|
|
40797
41360
|
getCwd: () => process.cwd()
|
|
40798
41361
|
}) : null;
|
|
40799
41362
|
registerAllTools(toolRegistry, {
|
|
41363
|
+
termination,
|
|
40800
41364
|
captureWorkerContext: () => chat.captureWorkerContext?.() ?? null,
|
|
40801
41365
|
...session ? {
|
|
40802
41366
|
session,
|
|
@@ -40837,8 +41401,9 @@ async function bootOrchestrator(options = {}) {
|
|
|
40837
41401
|
const sessionRouting = seedSessionRouting(
|
|
40838
41402
|
applyHeadlessSettingsOverlay(config?.get() ?? readSettings(), options.headless)
|
|
40839
41403
|
);
|
|
41404
|
+
const startupAutonomy = options.headless?.autonomy ?? options.autonomy;
|
|
40840
41405
|
const sessionOverrides = new Map(
|
|
40841
|
-
|
|
41406
|
+
startupAutonomy === void 0 ? [] : [["safety.autonomy", startupAutonomy]]
|
|
40842
41407
|
);
|
|
40843
41408
|
let sessionStateGeneration = 0;
|
|
40844
41409
|
let cachedSettingsBase = null;
|
|
@@ -41499,4 +42064,4 @@ export {
|
|
|
41499
42064
|
createBackgroundMemoryRouting,
|
|
41500
42065
|
createProductionAutoCompact
|
|
41501
42066
|
};
|
|
41502
|
-
//# sourceMappingURL=orchestrator-
|
|
42067
|
+
//# sourceMappingURL=orchestrator-SK6HDAOP.js.map
|