clikcode 1.0.4 → 1.0.5
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/README.md +25 -14
- package/dist/chunk-23TDEBGZ.js +71 -0
- package/dist/chunk-25T3GVS7.js +425 -0
- package/dist/chunk-2BBELGHY.js +11 -0
- package/dist/chunk-2EOL5PZL.js +208 -0
- package/dist/chunk-2GAB36IE.js +26 -0
- package/dist/chunk-2OLS7V66.js +2440 -0
- package/dist/chunk-2QFO2URB.js +179 -0
- package/dist/chunk-2QWPQRSU.js +254 -0
- package/dist/chunk-2YPAPAR3.js +184 -0
- package/dist/chunk-2ZAG5372.js +33 -0
- package/dist/chunk-32IKAIZC.js +12507 -0
- package/dist/chunk-34AZEGYW.js +95 -0
- package/dist/chunk-34JQYQCA.js +175 -0
- package/dist/chunk-34ZISPAO.js +67 -0
- package/dist/chunk-3AAAARE6.js +46 -0
- package/dist/chunk-3AJ6Q3OY.js +510 -0
- package/dist/chunk-3B2CHX7M.js +884 -0
- package/dist/chunk-3BUFORRX.js +59 -0
- package/dist/chunk-3QLHYYFK.js +30 -0
- package/dist/chunk-3RXBMYKZ.js +140 -0
- package/dist/chunk-3TFNIJWS.js +52 -0
- package/dist/chunk-3W3IPDFP.js +119 -0
- package/dist/chunk-3WMS7SEE.js +417 -0
- package/dist/chunk-435ZNSZ3.js +23 -0
- package/dist/chunk-4AQ5NINV.js +39 -0
- package/dist/chunk-4GVEJ5FK.js +168 -0
- package/dist/chunk-4GXAO3UY.js +262 -0
- package/dist/chunk-4L2ZZM4Q.js +332 -0
- package/dist/chunk-4LPDG57B.js +17 -0
- package/dist/chunk-4NN3XQQT.js +223 -0
- package/dist/chunk-4QZEZME7.js +54 -0
- package/dist/chunk-4R6CSC3S.js +38 -0
- package/dist/chunk-4RHXTL3W.js +514 -0
- package/dist/chunk-4SJMPTVQ.js +18 -0
- package/dist/chunk-4VY7G6TX.js +114 -0
- package/dist/chunk-5642PBF7.js +124 -0
- package/dist/chunk-5B6TVO4A.js +33 -0
- package/dist/chunk-5BJLDUPL.js +62 -0
- package/dist/chunk-5HMFFJWU.js +19 -0
- package/dist/chunk-5IKLK33T.js +69 -0
- package/dist/chunk-5NQ5FFMX.js +44 -0
- package/dist/chunk-5QNNW5L6.js +176 -0
- package/dist/chunk-5SM5UAWN.js +239 -0
- package/dist/chunk-5WYJTA6O.js +74 -0
- package/dist/chunk-5ZSR2Y5T.js +227 -0
- package/dist/chunk-5ZWUM5GH.js +39 -0
- package/dist/chunk-64E7D4HY.js +364 -0
- package/dist/chunk-6CK466BC.js +99 -0
- package/dist/chunk-6ES45HHO.js +138 -0
- package/dist/chunk-6HYEZFGL.js +277 -0
- package/dist/chunk-6Y7HLXGW.js +29 -0
- package/dist/chunk-6YKK4FYR.js +258 -0
- package/dist/chunk-74WNMLMS.js +117 -0
- package/dist/chunk-7AULZ7OD.js +55 -0
- package/dist/chunk-7DOKGSUN.js +101 -0
- package/dist/chunk-7IH5LTIZ.js +195 -0
- package/dist/chunk-7ISTS5NS.js +21 -0
- package/dist/chunk-7NMUTGOW.js +527 -0
- package/dist/chunk-7PNHUZEL.js +153 -0
- package/dist/chunk-7TSQLONI.js +88 -0
- package/dist/chunk-AE7TOLD5.js +30 -0
- package/dist/chunk-AEMHSXKA.js +130 -0
- package/dist/chunk-AKRYTS2D.js +211 -0
- package/dist/chunk-AMNSE36L.js +59 -0
- package/dist/chunk-AZVD74ZV.js +23 -0
- package/dist/chunk-B35DVOTK.js +1981 -0
- package/dist/chunk-B4HNJRAH.js +626 -0
- package/dist/chunk-B5WYPPHS.js +13 -0
- package/dist/chunk-BBOVDXQM.js +59 -0
- package/dist/chunk-BD3ECZLK.js +62 -0
- package/dist/chunk-BDGSOT74.js +4578 -0
- package/dist/chunk-BF5VEOPK.js +31 -0
- package/dist/chunk-BFFRW4XH.js +47 -0
- package/dist/chunk-BFPC6PEW.js +208 -0
- package/dist/chunk-BGEMY2JJ.js +376 -0
- package/dist/chunk-BISGNHKD.js +35 -0
- package/dist/chunk-BMRAEBRY.js +21 -0
- package/dist/chunk-BNTXAZXW.js +127 -0
- package/dist/chunk-BOQBXGSN.js +75 -0
- package/dist/chunk-BTJDSTQP.js +213 -0
- package/dist/chunk-BUOPJQP5.js +218 -0
- package/dist/chunk-BXFJS65Q.js +52 -0
- package/dist/chunk-BXPQFSX5.js +59 -0
- package/dist/chunk-C57LIWNY.js +1269 -0
- package/dist/chunk-C6YVCCWR.js +74 -0
- package/dist/chunk-CAADDF6M.js +167 -0
- package/dist/chunk-CBANJFBO.js +69 -0
- package/dist/chunk-CERF3RIB.js +597 -0
- package/dist/chunk-COAS5ETR.js +46 -0
- package/dist/chunk-CQ7J6UQ7.js +78 -0
- package/dist/chunk-CRUVYGO2.js +26 -0
- package/dist/chunk-CVFVFRGN.js +58 -0
- package/dist/chunk-D2UK66HM.js +37 -0
- package/dist/chunk-D2W7SA4R.js +18 -0
- package/dist/chunk-DA44ZENT.js +501 -0
- package/dist/chunk-DAJ76TOC.js +99 -0
- package/dist/chunk-DCZ6CIUM.js +147 -0
- package/dist/chunk-DF35KMXM.js +1314 -0
- package/dist/chunk-DGASQT26.js +151 -0
- package/dist/chunk-DJT57C5P.js +55 -0
- package/dist/chunk-DKDPZTD3.js +44 -0
- package/dist/chunk-DQYVQ2N7.js +77 -0
- package/dist/chunk-DRTP2RTY.js +266 -0
- package/dist/chunk-DW2BMUKY.js +61 -0
- package/dist/chunk-DW5T5ZVU.js +307 -0
- package/dist/chunk-DXKNDNFC.js +164 -0
- package/dist/chunk-DZEQ7UYR.js +291 -0
- package/dist/chunk-E4F4OUAC.js +463 -0
- package/dist/chunk-EE4B6A7W.js +69 -0
- package/dist/chunk-EISKIYWG.js +23 -0
- package/dist/chunk-EKAQK7UQ.js +235 -0
- package/dist/chunk-EOBTJV32.js +123 -0
- package/dist/chunk-ESF3DIZY.js +325 -0
- package/dist/chunk-EVOHOZ4U.js +45 -0
- package/dist/chunk-EXN4KHLB.js +110 -0
- package/dist/chunk-F252T6Y3.js +78 -0
- package/dist/chunk-F3DP4ZA2.js +40 -0
- package/dist/chunk-F6F47QAY.js +58 -0
- package/dist/chunk-FA3Y23ZW.js +57 -0
- package/dist/chunk-FBKXE4EJ.js +640 -0
- package/dist/chunk-FCGEB3H6.js +23 -0
- package/dist/chunk-FF7ZVYJF.js +3732 -0
- package/dist/chunk-FFGKN6L3.js +39 -0
- package/dist/chunk-FFGU4GCC.js +94 -0
- package/dist/chunk-FSFDAOVP.js +74 -0
- package/dist/chunk-FT5TX7OX.js +1573 -0
- package/dist/chunk-G3QP67Z7.js +232 -0
- package/dist/chunk-G5ORJKV2.js +179 -0
- package/dist/chunk-GFNC62PE.js +111 -0
- package/dist/chunk-GGK43Q3N.js +67 -0
- package/dist/chunk-GGYKY4GF.js +11537 -0
- package/dist/chunk-GGYNHGNJ.js +55 -0
- package/dist/chunk-GLY7RM3C.js +354 -0
- package/dist/chunk-GQBZU6EO.js +20 -0
- package/dist/chunk-GSXENUZL.js +9 -0
- package/dist/chunk-GTOAT5D3.js +40 -0
- package/dist/chunk-GWCMDPQU.js +1007 -0
- package/dist/chunk-GXYSMYHJ.js +152 -0
- package/dist/chunk-GYMAI5NY.js +14 -0
- package/dist/chunk-H2VZMKPE.js +30 -0
- package/dist/chunk-H4THUNBM.js +2091 -0
- package/dist/chunk-HGRVSNUZ.js +361 -0
- package/dist/chunk-HI4VY473.js +27 -0
- package/dist/chunk-HOJRSD3Q.js +447 -0
- package/dist/chunk-HRX25W35.js +82 -0
- package/dist/chunk-HSE4AQYV.js +55 -0
- package/dist/chunk-HU5SSUFX.js +383 -0
- package/dist/chunk-I3GDBJLH.js +196 -0
- package/dist/chunk-I75EDU75.js +684 -0
- package/dist/chunk-IBA7DMIO.js +20 -0
- package/dist/chunk-IC6N4NZA.js +231 -0
- package/dist/chunk-IF43HIGV.js +284 -0
- package/dist/chunk-IGZ6C2MC.js +439 -0
- package/dist/chunk-IMLTL2MY.js +192 -0
- package/dist/chunk-IMZL6SGR.js +33 -0
- package/dist/chunk-IS4USJPY.js +516 -0
- package/dist/chunk-ISFSPN2F.js +82 -0
- package/dist/chunk-IXE7GTFI.js +55 -0
- package/dist/chunk-IZ77QJQG.js +36 -0
- package/dist/chunk-J2PACWRQ.js +34 -0
- package/dist/chunk-J6EGFVQX.js +180 -0
- package/dist/chunk-JEKOD43D.js +22 -0
- package/dist/chunk-JGIWATSG.js +30 -0
- package/dist/chunk-JYBONKD4.js +43 -0
- package/dist/chunk-K2NLG2HK.js +454 -0
- package/dist/chunk-KCQ4TBLS.js +164 -0
- package/dist/chunk-KD5KIVMS.js +176 -0
- package/dist/chunk-KHW6TX6I.js +63 -0
- package/dist/chunk-KI5GZFCE.js +520 -0
- package/dist/chunk-KN34B7NO.js +105 -0
- package/dist/chunk-KYUHIFP3.js +136 -0
- package/dist/chunk-KZL5VS4B.js +300 -0
- package/dist/chunk-L3VW3QIH.js +48 -0
- package/dist/chunk-LA6MG4ET.js +2110 -0
- package/dist/chunk-LAVFOA3S.js +66 -0
- package/dist/chunk-LB4OA77N.js +13 -0
- package/dist/chunk-LBFRF2K4.js +196 -0
- package/dist/chunk-LM6EIA4B.js +93 -0
- package/dist/chunk-LPCNRGJ7.js +692 -0
- package/dist/chunk-LSLNL5T3.js +168 -0
- package/dist/chunk-LVRRWP4W.js +568 -0
- package/dist/chunk-LWCFBRHL.js +33 -0
- package/dist/chunk-LXFTMGZZ.js +166 -0
- package/dist/chunk-M33LVA4M.js +151 -0
- package/dist/chunk-M3FO5UMK.js +4944 -0
- package/dist/chunk-M5QNDBAY.js +66 -0
- package/dist/chunk-M6ND6KBE.js +1291 -0
- package/dist/chunk-M7H3WQTE.js +76 -0
- package/dist/chunk-MCBRVPA7.js +191 -0
- package/dist/chunk-MCSDWZET.js +91 -0
- package/dist/chunk-MDT5XDXL.js +289 -0
- package/dist/chunk-MJG3IQY4.js +91 -0
- package/dist/chunk-MOU3N2UL.js +44 -0
- package/dist/chunk-MP4KZOQC.js +3451 -0
- package/dist/chunk-MPAJ446F.js +66 -0
- package/dist/chunk-MVJZZ6AL.js +16 -0
- package/dist/chunk-MXS6S2PY.js +253 -0
- package/dist/chunk-N3SFDYM7.js +291 -0
- package/dist/chunk-NAOX3JUB.js +13 -0
- package/dist/chunk-NEKKIBCX.js +283 -0
- package/dist/chunk-NKDATMEM.js +133 -0
- package/dist/chunk-NR4FMC4K.js +395 -0
- package/dist/chunk-NSOHOJBR.js +221 -0
- package/dist/chunk-NTDB6QKF.js +29 -0
- package/dist/chunk-NWEYRBWK.js +25 -0
- package/dist/chunk-O2YSNYWD.js +23 -0
- package/dist/chunk-O3EW7LAY.js +54 -0
- package/dist/chunk-O7BNJIXU.js +366 -0
- package/dist/chunk-OARL2NXZ.js +116 -0
- package/dist/chunk-OHKZUEJW.js +351 -0
- package/dist/chunk-OKU45BXA.js +647 -0
- package/dist/chunk-OL4JBD3J.js +59 -0
- package/dist/chunk-OLUO5DDR.js +192 -0
- package/dist/chunk-OQ245JLA.js +196 -0
- package/dist/chunk-P72UZAQI.js +289 -0
- package/dist/chunk-PAL2ENB6.js +20 -0
- package/dist/chunk-PAXYQZH7.js +53 -0
- package/dist/chunk-PDPEM5VW.js +51 -0
- package/dist/chunk-PEWCDI2C.js +668 -0
- package/dist/chunk-PGZ54EDX.js +27 -0
- package/dist/chunk-PRWVLDZF.js +73 -0
- package/dist/chunk-PSQQ75VJ.js +52 -0
- package/dist/chunk-PUOVIFHW.js +118 -0
- package/dist/chunk-PWBF2X3V.js +107 -0
- package/dist/chunk-PWXII6HF.js +43 -0
- package/dist/chunk-Q35VLJRT.js +80 -0
- package/dist/chunk-QJP7EYGL.js +128 -0
- package/dist/chunk-QPQKX2MK.js +8836 -0
- package/dist/chunk-QQRLPY25.js +1053 -0
- package/dist/chunk-QUS4ER2W.js +407 -0
- package/dist/chunk-QYHI3YET.js +29 -0
- package/dist/chunk-QYRU2UQI.js +32 -0
- package/dist/chunk-R6XVVQGC.js +13 -0
- package/dist/chunk-R7QN6ONS.js +483 -0
- package/dist/chunk-RD23MPGC.js +221 -0
- package/dist/chunk-RDDWQBEM.js +185 -0
- package/dist/chunk-RDLLDYFO.js +104 -0
- package/dist/chunk-RE4TGORR.js +84 -0
- package/dist/chunk-RJLHVYQY.js +217 -0
- package/dist/chunk-RJLPTWHW.js +905 -0
- package/dist/chunk-RKUVLRZI.js +295 -0
- package/dist/chunk-ROGXPGYR.js +37 -0
- package/dist/chunk-RSZGEL5U.js +163 -0
- package/dist/chunk-RVUOIJXN.js +909 -0
- package/dist/chunk-RW7F4JRP.js +11 -0
- package/dist/chunk-S4UO3AO3.js +53 -0
- package/dist/chunk-S5JAAF6S.js +585 -0
- package/dist/chunk-SNU37TQI.js +56 -0
- package/dist/chunk-SQVUDO2O.js +31 -0
- package/dist/chunk-SYVHIYQT.js +66 -0
- package/dist/chunk-SZBQMTG2.js +85 -0
- package/dist/chunk-T5VCXA3J.js +25 -0
- package/dist/chunk-TK6NSP56.js +30 -0
- package/dist/chunk-TKWVMA6L.js +22 -0
- package/dist/chunk-TQDKJHWX.js +59 -0
- package/dist/chunk-TQDM7S5N.js +127 -0
- package/dist/chunk-TULAXS77.js +23 -0
- package/dist/chunk-TVT45XNH.js +4625 -0
- package/dist/chunk-TWCVV2JO.js +467 -0
- package/dist/chunk-U4DKAD6S.js +47 -0
- package/dist/chunk-UA5K2BTI.js +564 -0
- package/dist/chunk-UAMKCMOK.js +40 -0
- package/dist/chunk-UBMVADBF.js +51 -0
- package/dist/chunk-UFQ5A5PW.js +645 -0
- package/dist/chunk-UOD2SOLL.js +1301 -0
- package/dist/chunk-UTSB4LOW.js +156 -0
- package/dist/chunk-UVXNIUTN.js +412 -0
- package/dist/chunk-UXVPXYPE.js +90 -0
- package/dist/chunk-UYEEMIWR.js +374 -0
- package/dist/chunk-VBGM5ZBW.js +54 -0
- package/dist/chunk-VEWPCZPG.js +762 -0
- package/dist/chunk-VIRDLZ5E.js +108 -0
- package/dist/chunk-VMPO7WKN.js +52 -0
- package/dist/chunk-W2NVSDO5.js +5122 -0
- package/dist/chunk-W3YYPBEA.js +176 -0
- package/dist/chunk-W5AYOICN.js +280 -0
- package/dist/chunk-W5GZOIUF.js +27 -0
- package/dist/chunk-WHKNLZ3C.js +76 -0
- package/dist/chunk-WKBEPPQ5.js +1409 -0
- package/dist/chunk-WM3Z6QKQ.js +151 -0
- package/dist/chunk-WMI2TPMA.js +31 -0
- package/dist/chunk-WNX5VD7S.js +150 -0
- package/dist/chunk-WOVTYST3.js +60 -0
- package/dist/chunk-WPB5WEZJ.js +546 -0
- package/dist/chunk-WUO5EOAT.js +44 -0
- package/dist/chunk-WWLJMP6D.js +133 -0
- package/dist/chunk-WZMLH3XP.js +58 -0
- package/dist/chunk-WZYVLUVQ.js +79 -0
- package/dist/chunk-X2OCPVU5.js +135 -0
- package/dist/chunk-X3CL6DTR.js +95 -0
- package/dist/chunk-X6WF7JEV.js +354 -0
- package/dist/chunk-XAHGBPWT.js +44 -0
- package/dist/chunk-XCKQ5BM2.js +228 -0
- package/dist/chunk-XIBYREEY.js +106 -0
- package/dist/chunk-XKW5NDMR.js +378 -0
- package/dist/chunk-XRDALAO3.js +100 -0
- package/dist/chunk-XUP22EAS.js +41 -0
- package/dist/chunk-XWAC3MKW.js +243 -0
- package/dist/chunk-Y3R7JMXB.js +59 -0
- package/dist/chunk-Y54LTP4W.js +82 -0
- package/dist/chunk-Y7UECI4M.js +99 -0
- package/dist/chunk-YACGDFHC.js +47 -0
- package/dist/chunk-YHNIQPKY.js +71 -0
- package/dist/chunk-YMBR6HYP.js +111 -0
- package/dist/chunk-YMCH3L2S.js +26 -0
- package/dist/chunk-Z4ZU6T7V.js +99 -0
- package/dist/chunk-ZDPF67ZZ.js +173 -0
- package/dist/chunk-ZFC2Q67K.js +101 -0
- package/dist/chunk-ZGHNNSCT.js +114 -0
- package/dist/chunk-ZGX3ERAT.js +173 -0
- package/dist/chunk-ZI3YHEBY.js +37 -0
- package/dist/chunk-ZN7G6JLS.js +639 -0
- package/dist/chunk-ZNPFQMXT.js +47 -0
- package/dist/chunk-ZOU3LV4U.js +63 -0
- package/dist/chunk-ZT7B4H2V.js +117 -0
- package/dist/chunk-ZZCBDNZI.js +58 -0
- package/dist/cli.js +494 -112923
- package/dist/computer-tools.js +36642 -21259
- package/dist/harness-catalog.cjs +88 -43
- package/dist/index.js +1 -1
- package/dist/local-model-supervisor.cjs +555 -0
- package/package.json +3 -4
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
conversationState,
|
|
5
|
+
turnFacts
|
|
6
|
+
} from "./chunk-PDPEM5VW.js";
|
|
7
|
+
import {
|
|
8
|
+
listedSummary,
|
|
9
|
+
readsVendorCompaction,
|
|
10
|
+
sessionProviderLabel,
|
|
11
|
+
summaryHeadline
|
|
12
|
+
} from "./chunk-WWLJMP6D.js";
|
|
13
|
+
import {
|
|
14
|
+
isClikCodeAgent
|
|
15
|
+
} from "./chunk-CRUVYGO2.js";
|
|
16
|
+
import {
|
|
17
|
+
messageOrigin,
|
|
18
|
+
sessionTranscriptMessages
|
|
19
|
+
} from "./chunk-FF7ZVYJF.js";
|
|
20
|
+
import {
|
|
21
|
+
isConversationChat
|
|
22
|
+
} from "./chunk-BUOPJQP5.js";
|
|
23
|
+
import {
|
|
24
|
+
harnessIntegrationLevel,
|
|
25
|
+
harnessSupportsEffort,
|
|
26
|
+
harnessSupportsPermissionMode,
|
|
27
|
+
harnessTierRank,
|
|
28
|
+
localHarnessCapabilityManifest
|
|
29
|
+
} from "./chunk-KYUHIFP3.js";
|
|
30
|
+
import {
|
|
31
|
+
relativeTime
|
|
32
|
+
} from "./chunk-EE4B6A7W.js";
|
|
33
|
+
import {
|
|
34
|
+
hidden
|
|
35
|
+
} from "./chunk-KHW6TX6I.js";
|
|
36
|
+
|
|
37
|
+
// src/session/clikcode-notice.ts
|
|
38
|
+
var CLIKCODE_NOTICE_TAG = "[ClikCode] ";
|
|
39
|
+
var SHELL_NOTICE = /^\[(?:background (?:shell|command|agent) \S+ (?:exited|was stopped|output|finished|was interrupted|was cut off)|scheduled wakeup \S+\])/;
|
|
40
|
+
var COMPACTION_SUMMARY = /^This session is being continued from a previous conversation that ran out of context\./;
|
|
41
|
+
function isClikCodeNotice(text) {
|
|
42
|
+
return text.startsWith(CLIKCODE_NOTICE_TAG) || SHELL_NOTICE.test(text) || COMPACTION_SUMMARY.test(text);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// src/session/list-facts.ts
|
|
46
|
+
var TRANSCRIPT_LOADED = /* @__PURE__ */ Symbol("clikcode.transcriptLoaded");
|
|
47
|
+
var FROM_INDEX = /* @__PURE__ */ Symbol("clikcode.fromIndex");
|
|
48
|
+
function markTranscriptLoaded(session) {
|
|
49
|
+
hidden(session, TRANSCRIPT_LOADED, true);
|
|
50
|
+
}
|
|
51
|
+
function transcriptWasLoaded(session) {
|
|
52
|
+
return Boolean(session[TRANSCRIPT_LOADED]);
|
|
53
|
+
}
|
|
54
|
+
function markFromIndex(session) {
|
|
55
|
+
hidden(session, FROM_INDEX, true);
|
|
56
|
+
}
|
|
57
|
+
function sessionFromIndex(session) {
|
|
58
|
+
return Boolean(session[FROM_INDEX]);
|
|
59
|
+
}
|
|
60
|
+
function previewFromTranscript(session, limit = 48) {
|
|
61
|
+
const messages = session.messages ?? [];
|
|
62
|
+
let text;
|
|
63
|
+
for (let index = messages.length - 1; index >= 0; index -= 1) {
|
|
64
|
+
const message = messages[index];
|
|
65
|
+
if (message?.role === "user" && message.content.trim() && !message.automatic && !isClikCodeNotice(message.content)) {
|
|
66
|
+
text = message.content;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const pending = session.pendingTurn?.automatic ? void 0 : session.pendingTurn?.prompt;
|
|
71
|
+
if (pending && !isClikCodeNotice(pending)) text ??= pending;
|
|
72
|
+
if (!text?.trim()) return void 0;
|
|
73
|
+
const line = text.replace(/\s+/g, " ").trim();
|
|
74
|
+
return line.length > limit ? `${line.slice(0, limit - 1)}\u2026` : line;
|
|
75
|
+
}
|
|
76
|
+
function conversationPreview(session, limit = 48) {
|
|
77
|
+
if (!transcriptWasLoaded(session) && session.messages === void 0 && session.pendingTurn === void 0) return session.listPreview;
|
|
78
|
+
return previewFromTranscript(session, limit);
|
|
79
|
+
}
|
|
80
|
+
function stampListFacts(session) {
|
|
81
|
+
if (!transcriptWasLoaded(session) && (sessionFromIndex(session) || session.messages === void 0)) return false;
|
|
82
|
+
const preview = previewFromTranscript(session);
|
|
83
|
+
const count = session.messages?.length ?? 0;
|
|
84
|
+
let changed = false;
|
|
85
|
+
if (session.listPreview !== preview) {
|
|
86
|
+
if (preview) session.listPreview = preview;
|
|
87
|
+
else delete session.listPreview;
|
|
88
|
+
changed = true;
|
|
89
|
+
}
|
|
90
|
+
const legacy = session;
|
|
91
|
+
if (legacy.listTurn !== void 0) {
|
|
92
|
+
delete legacy.listTurn;
|
|
93
|
+
changed = true;
|
|
94
|
+
}
|
|
95
|
+
if (session.listMessageCount !== count) {
|
|
96
|
+
session.listMessageCount = count;
|
|
97
|
+
changed = true;
|
|
98
|
+
}
|
|
99
|
+
if (!session.listChecked) {
|
|
100
|
+
session.listChecked = true;
|
|
101
|
+
changed = true;
|
|
102
|
+
}
|
|
103
|
+
return changed;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// src/harness/options.ts
|
|
107
|
+
var common = (control, note) => ({ kind: "common", control, note });
|
|
108
|
+
var shared = (note) => ({ kind: "shared", note });
|
|
109
|
+
var vendor = (note) => ({ kind: "vendor", note });
|
|
110
|
+
var OPTION_NORMALIZATION = {
|
|
111
|
+
// --- owned by a ClikCode command -----------------------------------------
|
|
112
|
+
model: common("/model", "nineteen harnesses, six flag spellings, one selector."),
|
|
113
|
+
permissions: common("/permissions", "mapped to ask/bypass/auto per harness by permissionArgv."),
|
|
114
|
+
effort: common("/effort", "passed through to whatever the vendor calls its reasoning level."),
|
|
115
|
+
workspace: common("/cwd", "--cd, --dir, -C, --cwd, --workspace and --in are one concept."),
|
|
116
|
+
"add-dir": common("/add-dir", "additional roots the agent may reach."),
|
|
117
|
+
"include-directories": common("/add-dir", "Gemini and Qwen spell --add-dir this way; same concept, same control."),
|
|
118
|
+
// --- already uniform, no dedicated command needed -------------------------
|
|
119
|
+
worktree: shared("--worktree on all nine, same meaning: run in an isolated managed worktree."),
|
|
120
|
+
"safe-mode": shared("--safe-mode on all four: disable customizations, plugins and MCP."),
|
|
121
|
+
ephemeral: shared("--ephemeral or --no-session: do not persist the native session."),
|
|
122
|
+
plan: shared("--plan on all three: start in read-only planning mode."),
|
|
123
|
+
sandbox: shared("restrict shell execution; the mechanism is the vendor's, the switch is not."),
|
|
124
|
+
trust: shared("skip the workspace trust prompt."),
|
|
125
|
+
tools: shared("choose the built-in tools available to the session."),
|
|
126
|
+
"allowed-tools": shared("tool patterns allowed without prompting."),
|
|
127
|
+
"mcp-config": shared("MCP configuration files or inline JSON."),
|
|
128
|
+
"plugin-dir": shared("plugin folders or archives loaded for the session."),
|
|
129
|
+
"disable-skills": shared("disable skill slash commands."),
|
|
130
|
+
"ignore-user-config": shared("do not load the user-level config file."),
|
|
131
|
+
"ignore-rules": shared("do not load user or project rules."),
|
|
132
|
+
title: shared("title assigned to a new native session."),
|
|
133
|
+
pure: shared("run without external plugins."),
|
|
134
|
+
"thinking-output": shared("include provider thinking blocks in event output."),
|
|
135
|
+
"fork-native-session": shared("fork before continuing the selected session."),
|
|
136
|
+
share: shared("publish the native session through the vendor."),
|
|
137
|
+
"max-turns": shared("maximum autonomous turns without user input."),
|
|
138
|
+
timeout: shared("maximum run time for one turn, in seconds."),
|
|
139
|
+
"data-dir": shared("isolated vendor state directory."),
|
|
140
|
+
"disallowed-tools": shared("tool patterns that must not run; the deny spelling differs per vendor."),
|
|
141
|
+
"disabled-tools": shared("disable selected tool ids or name patterns outright."),
|
|
142
|
+
allow: shared("tools or permission rules allowed without extra approval."),
|
|
143
|
+
rules: shared("extra rule or instruction entries the agent loads into context."),
|
|
144
|
+
verbose: shared("verbose logging emitted by the harness CLI itself."),
|
|
145
|
+
"json-schema": shared("a JSON schema constraining the final response."),
|
|
146
|
+
file: shared("files loaded into the run, as editable context or a seed file."),
|
|
147
|
+
"system-prompt": shared("override the default system prompt; the flag spelling differs."),
|
|
148
|
+
// --- the id coincides; the meaning does not --------------------------------
|
|
149
|
+
provider: vendor("an inference provider INSIDE a harness (Goose, Pi, Cline), not ClikCode's provider. Promoting it would collide with /provider and mean something else."),
|
|
150
|
+
agent: vendor('every vendor has "agents" and none of them are the same thing; the value space is vendor-bound even though the flag name is not.'),
|
|
151
|
+
mode: vendor("Antigravity means edit-accepting versus planning; Cursor means plan versus question. Shared name, different enums."),
|
|
152
|
+
ask: vendor("Auggie's --ask is read-only retrieval mode; Continue's --ask names tools the model must ask about. Same flag, opposite shapes.")
|
|
153
|
+
};
|
|
154
|
+
function commonControlFor(id) {
|
|
155
|
+
const entry = OPTION_NORMALIZATION[id];
|
|
156
|
+
return entry?.kind === "common" ? entry.control : void 0;
|
|
157
|
+
}
|
|
158
|
+
function optionIdsForControl(control) {
|
|
159
|
+
return Object.entries(OPTION_NORMALIZATION).filter(([, entry]) => entry.kind === "common" && entry.control === control).map(([id]) => id);
|
|
160
|
+
}
|
|
161
|
+
function vendorFacingOptions(options, harness) {
|
|
162
|
+
const planSwitch = harness?.planMode?.value === true ? harness.planMode.option : void 0;
|
|
163
|
+
return options.filter((option) => !commonControlFor(option.id) && option.id !== planSwitch);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// src/session/native-thread.ts
|
|
167
|
+
import { createHash } from "node:crypto";
|
|
168
|
+
function forgetNativeThread(session) {
|
|
169
|
+
const thread = session.nativeSessionId && session.nativeHarness ? `${session.nativeHarness}:${session.nativeSessionId}` : void 0;
|
|
170
|
+
if (thread && !session.ownedThreads?.includes(thread)) session.ownedThreads = [...session.ownedThreads ?? [], thread];
|
|
171
|
+
if (session.nativeHarness && session.nativeThreads) delete session.nativeThreads[session.nativeHarness];
|
|
172
|
+
clearActiveNativeThread(session);
|
|
173
|
+
}
|
|
174
|
+
function clearActiveNativeThread(session) {
|
|
175
|
+
session.nativeSessionId = void 0;
|
|
176
|
+
delete session.nativeThreadAccountId;
|
|
177
|
+
delete session.nativeTransport;
|
|
178
|
+
session.nativeStartedAt = void 0;
|
|
179
|
+
delete session.nativeSessionPreallocated;
|
|
180
|
+
}
|
|
181
|
+
function transcriptAnchor(messages, through) {
|
|
182
|
+
const hash = createHash("sha256");
|
|
183
|
+
for (let index = 0; index < through; index += 1) hash.update(JSON.stringify(messages[index]));
|
|
184
|
+
return hash.digest("hex");
|
|
185
|
+
}
|
|
186
|
+
function parkNativeThread(session) {
|
|
187
|
+
const harness = session.nativeHarness;
|
|
188
|
+
const id = session.nativeSessionId;
|
|
189
|
+
if (harness && id && !session.nativeSessionPreallocated) {
|
|
190
|
+
const messages = session.messages ?? [];
|
|
191
|
+
session.nativeThreads = {
|
|
192
|
+
...session.nativeThreads,
|
|
193
|
+
[harness]: {
|
|
194
|
+
id,
|
|
195
|
+
...session.nativeThreadAccountId ? { accountId: session.nativeThreadAccountId } : {},
|
|
196
|
+
...session.nativeTransport ? { transport: session.nativeTransport } : {},
|
|
197
|
+
...session.workspace ? { workspace: session.workspace } : {},
|
|
198
|
+
through: messages.length,
|
|
199
|
+
anchor: transcriptAnchor(messages, messages.length)
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
const owned = `${harness}:${id}`;
|
|
203
|
+
if (!session.ownedThreads?.includes(owned)) session.ownedThreads = [...session.ownedThreads ?? [], owned];
|
|
204
|
+
}
|
|
205
|
+
clearActiveNativeThread(session);
|
|
206
|
+
}
|
|
207
|
+
function restoreNativeThread(session, harness) {
|
|
208
|
+
if (session.nativeSessionId) return void 0;
|
|
209
|
+
const slot = session.nativeThreads?.[harness];
|
|
210
|
+
if (!slot) return void 0;
|
|
211
|
+
const messages = session.messages ?? [];
|
|
212
|
+
if (slot.workspace !== session.workspace || slot.through > messages.length || slot.anchor !== transcriptAnchor(messages, slot.through)) {
|
|
213
|
+
delete session.nativeThreads[harness];
|
|
214
|
+
return void 0;
|
|
215
|
+
}
|
|
216
|
+
delete session.nativeThreads[harness];
|
|
217
|
+
session.nativeSessionId = slot.id;
|
|
218
|
+
session.nativeThreadAccountId = slot.accountId;
|
|
219
|
+
session.nativeTransport = slot.transport;
|
|
220
|
+
return slot.through;
|
|
221
|
+
}
|
|
222
|
+
function leaveProvider(session) {
|
|
223
|
+
const origin = messageOrigin(session);
|
|
224
|
+
session.messages = sessionTranscriptMessages(session).map((message) => message.origin ? message : { ...message, origin });
|
|
225
|
+
delete session.pendingTurn;
|
|
226
|
+
if (session.nativeHarness && session.nativeSessionId && readsVendorCompaction(session.nativeHarness)) {
|
|
227
|
+
const accountId = session.nativeThreadAccountId ?? session.accountId ?? void 0;
|
|
228
|
+
session.previousNativeThread = {
|
|
229
|
+
harness: session.nativeHarness,
|
|
230
|
+
id: session.nativeSessionId,
|
|
231
|
+
...accountId ? { accountId } : {},
|
|
232
|
+
...session.workspace ? { workspace: session.workspace } : {}
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
parkNativeThread(session);
|
|
236
|
+
for (const key of ["reported", "lastUsage", "resumeAt", "harnessOptions", "gatewayConfirmed"]) delete session[key];
|
|
237
|
+
session.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// src/turn/send-mode.ts
|
|
241
|
+
var SEND_MODES = ["steer", "queue"];
|
|
242
|
+
var SEND_MODE_DETAIL = {
|
|
243
|
+
steer: "into the running turn at its next pause; queued where the agent takes none",
|
|
244
|
+
queue: "wait for the turn to end, then go as the next turn"
|
|
245
|
+
};
|
|
246
|
+
function sendModeOf(settings) {
|
|
247
|
+
return settings?.sendMode === "queue" ? "queue" : "steer";
|
|
248
|
+
}
|
|
249
|
+
function parseSendMode(word) {
|
|
250
|
+
const value = word.trim().toLowerCase();
|
|
251
|
+
if (value === "steer" || value === "queue") return value;
|
|
252
|
+
throw new Error("usage: /send [steer|queue]");
|
|
253
|
+
}
|
|
254
|
+
function typedSettings(mode, machine) {
|
|
255
|
+
return mode ? { sendMode: mode } : machine;
|
|
256
|
+
}
|
|
257
|
+
function deliverTyped(broker, text, id, settings) {
|
|
258
|
+
return broker.submit(text, id, { steer: sendModeOf(settings) === "steer" });
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// src/session/options.ts
|
|
262
|
+
var VALID_EFFORTS = ["off", "none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"];
|
|
263
|
+
var VALID_PERMISSION_MODES = ["ask", "bypass", "auto"];
|
|
264
|
+
function sessionPermissionModes(session, harness) {
|
|
265
|
+
if (isClikCodeAgent(session)) return VALID_PERMISSION_MODES;
|
|
266
|
+
return harness ? VALID_PERMISSION_MODES.filter((mode) => harnessSupportsPermissionMode(harness, mode)) : [];
|
|
267
|
+
}
|
|
268
|
+
function hasConversationContent(session) {
|
|
269
|
+
return Boolean(session.nativeSessionId || session.pendingTurn || (session.messages ?? []).length > 0);
|
|
270
|
+
}
|
|
271
|
+
function isBlankConversation(session) {
|
|
272
|
+
if (!transcriptWasLoaded(session) && session.messages === void 0 && session.pendingTurn === void 0) {
|
|
273
|
+
if (session.listChecked) {
|
|
274
|
+
return !(session.listMessageCount || session.listPreview || session.nativeSessionId || session.queuedTurns?.length || session.attachments?.length || session.shellNotes?.length || session.nameSource === "user");
|
|
275
|
+
}
|
|
276
|
+
if (sessionFromIndex(session)) return false;
|
|
277
|
+
}
|
|
278
|
+
return !hasConversationContent(session) && !session.queuedTurns?.length && !session.attachments?.length && !session.shellNotes?.length && session.nameSource !== "user";
|
|
279
|
+
}
|
|
280
|
+
function chatNamed(sessions, typed, currentId) {
|
|
281
|
+
const query = typed.trim().toLowerCase();
|
|
282
|
+
if (!query) return void 0;
|
|
283
|
+
const chats = sessions.filter((session) => session.id !== currentId && isConversationChat(session) && !isBlankConversation(session));
|
|
284
|
+
const latest = (list) => [...list].sort((left, right) => right.updatedAt.localeCompare(left.updatedAt))[0].id;
|
|
285
|
+
if (query === "last" && chats.length) return latest(chats);
|
|
286
|
+
const byId = query.length >= 4 ? sessions.filter((session) => session.id !== currentId && !session.foldedInto && !isBlankConversation(session) && session.id.toLowerCase().startsWith(query)) : [];
|
|
287
|
+
if (byId.length === 1) return byId[0].id;
|
|
288
|
+
const named = chats.filter((session) => session.name);
|
|
289
|
+
const exact = named.filter((session) => session.name.toLowerCase() === query);
|
|
290
|
+
if (exact.length) return latest(exact);
|
|
291
|
+
const partial = named.filter((session) => session.name.toLowerCase().includes(query));
|
|
292
|
+
return partial.length === 1 ? partial[0].id : void 0;
|
|
293
|
+
}
|
|
294
|
+
function latestChat(sessions, workspace) {
|
|
295
|
+
const chats = sessions.filter((session) => isConversationChat(session) && !isBlankConversation(session)).sort((left, right) => right.updatedAt.localeCompare(left.updatedAt));
|
|
296
|
+
return chats.find((session) => session.workspace === workspace) ?? chats[0];
|
|
297
|
+
}
|
|
298
|
+
function conversationOption(row, providerLabel = sessionProviderLabel, now = Date.now()) {
|
|
299
|
+
const labelFor = providerLabel ?? sessionProviderLabel;
|
|
300
|
+
const timestamp = (session) => {
|
|
301
|
+
const value = Date.parse(session.updatedAt);
|
|
302
|
+
return Number.isNaN(value) ? -Infinity : value;
|
|
303
|
+
};
|
|
304
|
+
const createdTimestamp = (session) => {
|
|
305
|
+
const value = Date.parse(session.createdAt);
|
|
306
|
+
return Number.isNaN(value) ? timestamp(session) : value;
|
|
307
|
+
};
|
|
308
|
+
const history = [...row.chats].sort((left, right) => createdTimestamp(left) - createdTimestamp(right));
|
|
309
|
+
const byId = new Map(history.map((session) => [session.id, session]));
|
|
310
|
+
const depthFor = (session) => {
|
|
311
|
+
let depth = 0;
|
|
312
|
+
let parentId = session.parentSessionId;
|
|
313
|
+
const seen = /* @__PURE__ */ new Set();
|
|
314
|
+
while (parentId && byId.has(parentId) && !seen.has(parentId)) {
|
|
315
|
+
seen.add(parentId);
|
|
316
|
+
depth += 1;
|
|
317
|
+
parentId = byId.get(parentId)?.parentSessionId;
|
|
318
|
+
}
|
|
319
|
+
return depth;
|
|
320
|
+
};
|
|
321
|
+
const latest = row.latest;
|
|
322
|
+
const title = latest.name?.replace(/\s+\(from [^)]+\)$/i, "").trim() || "Untitled chat";
|
|
323
|
+
const preview = conversationPreview(latest);
|
|
324
|
+
const summarized = listedSummary(latest);
|
|
325
|
+
const state = conversationState({
|
|
326
|
+
updatedAt: latest.updatedAt,
|
|
327
|
+
...row.activity === "working" && row.pending ? { turn: turnFacts(row.pending) } : {},
|
|
328
|
+
...row.needsYou ? { needsYou: true } : {},
|
|
329
|
+
...latest.resumeAt ? { resumeAt: latest.resumeAt.at } : {}
|
|
330
|
+
}, now);
|
|
331
|
+
const activity = state.kind === "working" || state.kind === "needs-you" ? state.kind : void 0;
|
|
332
|
+
const stateText = state.text;
|
|
333
|
+
return {
|
|
334
|
+
label: title,
|
|
335
|
+
detail: [`\xB7 ${stateText}`, preview, summarized && summaryHeadline(summarized)].filter(Boolean).join(" \xB7 "),
|
|
336
|
+
...activity ? { activity } : {},
|
|
337
|
+
value: latest.id,
|
|
338
|
+
alternates: history.length > 1 ? history.map((session) => ({
|
|
339
|
+
label: `${" ".repeat(depthFor(session))}${labelFor(session)} \xB7 ${session.fork ? "fork" : "original"}${session.id === latest.id ? " \xB7 latest" : ""} \xB7 ${relativeTime(session.updatedAt, now)}`,
|
|
340
|
+
value: session.id
|
|
341
|
+
})) : void 0
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
function optionForHarness(harness, id) {
|
|
345
|
+
const options = localHarnessCapabilityManifest(harness).options;
|
|
346
|
+
const exact = options.find((option) => option.id === id);
|
|
347
|
+
if (exact) return exact;
|
|
348
|
+
const control = commonControlFor(id);
|
|
349
|
+
if (!control) return void 0;
|
|
350
|
+
const ids = optionIdsForControl(control);
|
|
351
|
+
return options.find((option) => ids.includes(option.id));
|
|
352
|
+
}
|
|
353
|
+
function optionForControl(harness, control) {
|
|
354
|
+
const ids = optionIdsForControl(control);
|
|
355
|
+
return localHarnessCapabilityManifest(harness).options.find((option) => ids.includes(option.id));
|
|
356
|
+
}
|
|
357
|
+
function parseHarnessOption(option, raw) {
|
|
358
|
+
const value = raw.trim();
|
|
359
|
+
if (option.kind === "boolean") {
|
|
360
|
+
if (["true", "on", "yes", "1", "enabled"].includes(value.toLowerCase())) return true;
|
|
361
|
+
if (["false", "off", "no", "0", "disabled"].includes(value.toLowerCase())) return false;
|
|
362
|
+
throw new Error(`${option.label} must be on or off`);
|
|
363
|
+
}
|
|
364
|
+
if (option.kind === "number") {
|
|
365
|
+
const parsed = Number(value);
|
|
366
|
+
if (!Number.isFinite(parsed) || parsed < 0) throw new Error(`${option.label} must be a non-negative number`);
|
|
367
|
+
return parsed;
|
|
368
|
+
}
|
|
369
|
+
if (option.kind === "string-list" || option.kind === "path-list") {
|
|
370
|
+
const values = value.split(",").map((item) => item.trim()).filter(Boolean);
|
|
371
|
+
if (!values.length) throw new Error(`${option.label} requires at least one value`);
|
|
372
|
+
return values;
|
|
373
|
+
}
|
|
374
|
+
if (option.values?.length && !option.values.includes(value)) throw new Error(`${option.label} must be one of ${option.values.join(", ")}`);
|
|
375
|
+
if (!value) throw new Error(`${option.label} cannot be empty`);
|
|
376
|
+
return value;
|
|
377
|
+
}
|
|
378
|
+
function setSessionHarnessOption(session, harness, id, raw, choices) {
|
|
379
|
+
const declared = optionForHarness(harness, id);
|
|
380
|
+
if (!declared) throw new Error(`${harness.displayName} does not support option "${id}"`);
|
|
381
|
+
const option = choices?.length && declared.kind === "enum" ? { ...declared, values: [...choices] } : declared;
|
|
382
|
+
const parsed = parseHarnessOption(option, raw);
|
|
383
|
+
if (option.id === "model") session.model = String(parsed);
|
|
384
|
+
else if (option.id === "effort") session.effort = String(parsed);
|
|
385
|
+
else if (option.id === "workspace") session.workspace = String(parsed);
|
|
386
|
+
else if (option.id === "permissions") session.permissionMode = String(parsed);
|
|
387
|
+
else session.harnessOptions = { ...session.harnessOptions ?? {}, [option.id]: parsed };
|
|
388
|
+
if (option.requiresNewSession) {
|
|
389
|
+
forgetNativeThread(session);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
function normalizeModelWord(value) {
|
|
393
|
+
return value === "auto" || value === "default" ? null : value;
|
|
394
|
+
}
|
|
395
|
+
function applyDefaultSetting(target, key, value, harness) {
|
|
396
|
+
const normalizedKey = key.toLowerCase();
|
|
397
|
+
if (normalizedKey === "effort") {
|
|
398
|
+
if (harness && !harnessSupportsEffort(harness)) throw new Error(`${harness.displayName} does not publish a configurable reasoning-effort flag; setting one here would silently do nothing.`);
|
|
399
|
+
if (!harness && !VALID_EFFORTS.includes(value)) throw new Error(`effort must be one of ${VALID_EFFORTS.join(", ")}`);
|
|
400
|
+
target.effort = value;
|
|
401
|
+
} else if (normalizedKey === "permissions" || normalizedKey === "permissionmode") {
|
|
402
|
+
if (!VALID_PERMISSION_MODES.includes(value)) throw new Error("permissions must be ask, bypass, or auto");
|
|
403
|
+
if (harness && !harnessSupportsPermissionMode(harness, value)) throw new Error(`${harness.displayName} does not map ClikCode's permission modes to a real flag; setting one here would silently do nothing.`);
|
|
404
|
+
target.permissionMode = value;
|
|
405
|
+
} else if (normalizedKey === "send" && !("model" in target) && !harness) {
|
|
406
|
+
target.sendMode = parseSendMode(value);
|
|
407
|
+
} else if (normalizedKey === "model" && "model" in target) {
|
|
408
|
+
target.model = normalizeModelWord(value) ?? void 0;
|
|
409
|
+
} else {
|
|
410
|
+
throw new Error(`unknown setting "${key}"; choose ${"model" in target ? "model, effort, or permissions" : "effort, permissions, or send"}`);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
function integrationLabel(harness) {
|
|
414
|
+
return {
|
|
415
|
+
native: "full integration",
|
|
416
|
+
structured: "structured integration",
|
|
417
|
+
compatibility: "basic compatibility"
|
|
418
|
+
}[harnessIntegrationLevel(harness)];
|
|
419
|
+
}
|
|
420
|
+
var PROVIDER_ORDER = ["claude", "codex", "grok", "cursor", "cline", "kiro", "copilot", "antigravity", "opencode", "hermes", "openclaw"];
|
|
421
|
+
function compareProviders(left, right) {
|
|
422
|
+
const rank = (harness) => {
|
|
423
|
+
const at = PROVIDER_ORDER.indexOf(harness.command);
|
|
424
|
+
return at < 0 ? PROVIDER_ORDER.length : at;
|
|
425
|
+
};
|
|
426
|
+
return rank(left.harness) - rank(right.harness) || Number(Boolean(right.installed)) - Number(Boolean(left.installed)) || harnessTierRank(left.harness) - harnessTierRank(right.harness);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export {
|
|
430
|
+
isClikCodeNotice,
|
|
431
|
+
markTranscriptLoaded,
|
|
432
|
+
transcriptWasLoaded,
|
|
433
|
+
markFromIndex,
|
|
434
|
+
sessionFromIndex,
|
|
435
|
+
conversationPreview,
|
|
436
|
+
stampListFacts,
|
|
437
|
+
commonControlFor,
|
|
438
|
+
optionIdsForControl,
|
|
439
|
+
vendorFacingOptions,
|
|
440
|
+
forgetNativeThread,
|
|
441
|
+
parkNativeThread,
|
|
442
|
+
restoreNativeThread,
|
|
443
|
+
leaveProvider,
|
|
444
|
+
SEND_MODES,
|
|
445
|
+
SEND_MODE_DETAIL,
|
|
446
|
+
sendModeOf,
|
|
447
|
+
parseSendMode,
|
|
448
|
+
typedSettings,
|
|
449
|
+
deliverTyped,
|
|
450
|
+
VALID_EFFORTS,
|
|
451
|
+
VALID_PERMISSION_MODES,
|
|
452
|
+
sessionPermissionModes,
|
|
453
|
+
hasConversationContent,
|
|
454
|
+
isBlankConversation,
|
|
455
|
+
chatNamed,
|
|
456
|
+
latestChat,
|
|
457
|
+
conversationOption,
|
|
458
|
+
optionForHarness,
|
|
459
|
+
optionForControl,
|
|
460
|
+
parseHarnessOption,
|
|
461
|
+
setSessionHarnessOption,
|
|
462
|
+
normalizeModelWord,
|
|
463
|
+
applyDefaultSetting,
|
|
464
|
+
integrationLabel,
|
|
465
|
+
PROVIDER_ORDER,
|
|
466
|
+
compareProviders
|
|
467
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
indexWriteIsCache,
|
|
5
|
+
writeState,
|
|
6
|
+
writeTranscriptCheckpoint
|
|
7
|
+
} from "./chunk-RKUVLRZI.js";
|
|
8
|
+
import "./chunk-BGEMY2JJ.js";
|
|
9
|
+
import "./chunk-XCKQ5BM2.js";
|
|
10
|
+
import "./chunk-NWEYRBWK.js";
|
|
11
|
+
import "./chunk-TWCVV2JO.js";
|
|
12
|
+
import "./chunk-PDPEM5VW.js";
|
|
13
|
+
import "./chunk-WWLJMP6D.js";
|
|
14
|
+
import "./chunk-CRUVYGO2.js";
|
|
15
|
+
import "./chunk-FF7ZVYJF.js";
|
|
16
|
+
import "./chunk-IMLTL2MY.js";
|
|
17
|
+
import "./chunk-BUOPJQP5.js";
|
|
18
|
+
import "./chunk-3B2CHX7M.js";
|
|
19
|
+
import "./chunk-RVUOIJXN.js";
|
|
20
|
+
import "./chunk-QUS4ER2W.js";
|
|
21
|
+
import "./chunk-DQYVQ2N7.js";
|
|
22
|
+
import "./chunk-KYUHIFP3.js";
|
|
23
|
+
import "./chunk-RSZGEL5U.js";
|
|
24
|
+
import "./chunk-NKDATMEM.js";
|
|
25
|
+
import "./chunk-CQ7J6UQ7.js";
|
|
26
|
+
import "./chunk-XKW5NDMR.js";
|
|
27
|
+
import "./chunk-W3YYPBEA.js";
|
|
28
|
+
import "./chunk-XIBYREEY.js";
|
|
29
|
+
import "./chunk-EE4B6A7W.js";
|
|
30
|
+
import "./chunk-WZYVLUVQ.js";
|
|
31
|
+
import "./chunk-O3EW7LAY.js";
|
|
32
|
+
import "./chunk-KHW6TX6I.js";
|
|
33
|
+
import "./chunk-YMCH3L2S.js";
|
|
34
|
+
import "./chunk-4QZEZME7.js";
|
|
35
|
+
import "./chunk-LVRRWP4W.js";
|
|
36
|
+
import "./chunk-G3QP67Z7.js";
|
|
37
|
+
import "./chunk-4L2ZZM4Q.js";
|
|
38
|
+
import "./chunk-F6F47QAY.js";
|
|
39
|
+
import "./chunk-RDDWQBEM.js";
|
|
40
|
+
import "./chunk-MPAJ446F.js";
|
|
41
|
+
import "./chunk-CBANJFBO.js";
|
|
42
|
+
import "./chunk-PWXII6HF.js";
|
|
43
|
+
export {
|
|
44
|
+
indexWriteIsCache,
|
|
45
|
+
writeState,
|
|
46
|
+
writeTranscriptCheckpoint
|
|
47
|
+
};
|