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,514 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
gatewaySessionModelLabel
|
|
5
|
+
} from "./chunk-W5AYOICN.js";
|
|
6
|
+
import {
|
|
7
|
+
gatewayDefaultEffort,
|
|
8
|
+
gatewayEffort
|
|
9
|
+
} from "./chunk-QYHI3YET.js";
|
|
10
|
+
import {
|
|
11
|
+
localModelLabel
|
|
12
|
+
} from "./chunk-TQDKJHWX.js";
|
|
13
|
+
import {
|
|
14
|
+
nativeModelLabel
|
|
15
|
+
} from "./chunk-QQRLPY25.js";
|
|
16
|
+
import {
|
|
17
|
+
modelLabel
|
|
18
|
+
} from "./chunk-F252T6Y3.js";
|
|
19
|
+
import {
|
|
20
|
+
compactPath,
|
|
21
|
+
sessionProviderLabel,
|
|
22
|
+
summaryHeadline
|
|
23
|
+
} from "./chunk-WWLJMP6D.js";
|
|
24
|
+
import {
|
|
25
|
+
isClikCodeAgent
|
|
26
|
+
} from "./chunk-CRUVYGO2.js";
|
|
27
|
+
import {
|
|
28
|
+
TERMINAL
|
|
29
|
+
} from "./chunk-DF35KMXM.js";
|
|
30
|
+
import {
|
|
31
|
+
emitResult
|
|
32
|
+
} from "./chunk-JGIWATSG.js";
|
|
33
|
+
import {
|
|
34
|
+
isJsonDefaultMode
|
|
35
|
+
} from "./chunk-5B6TVO4A.js";
|
|
36
|
+
import {
|
|
37
|
+
source_default
|
|
38
|
+
} from "./chunk-LVRRWP4W.js";
|
|
39
|
+
import {
|
|
40
|
+
stripAnsi
|
|
41
|
+
} from "./chunk-G3QP67Z7.js";
|
|
42
|
+
import {
|
|
43
|
+
stateDirectory
|
|
44
|
+
} from "./chunk-MPAJ446F.js";
|
|
45
|
+
|
|
46
|
+
// src/harness/output.ts
|
|
47
|
+
import { stdout as output } from "node:process";
|
|
48
|
+
|
|
49
|
+
// src/agent/sandbox.ts
|
|
50
|
+
import { spawnSync } from "node:child_process";
|
|
51
|
+
import { accessSync, constants, existsSync, realpathSync } from "node:fs";
|
|
52
|
+
import os from "node:os";
|
|
53
|
+
import path from "node:path";
|
|
54
|
+
function sessionSandboxMode(value) {
|
|
55
|
+
return value === "off" ? "off" : "workspace";
|
|
56
|
+
}
|
|
57
|
+
function parseSandboxMode(value) {
|
|
58
|
+
const word = value.trim().toLowerCase();
|
|
59
|
+
if (word === "on" || word === "workspace") return "workspace";
|
|
60
|
+
if (word === "off") return "off";
|
|
61
|
+
return void 0;
|
|
62
|
+
}
|
|
63
|
+
function sandboxModeText(mode) {
|
|
64
|
+
return mode === "workspace" ? "Sandbox on \xB7 shell commands write only the workspace, the temp dir and tool caches; they read everything except ClikCode's stored sign-ins and secrets, and keep the network" : "Sandbox off \xB7 shell commands run with your full permissions";
|
|
65
|
+
}
|
|
66
|
+
var HOME_CACHE_DIRS = [
|
|
67
|
+
".cache",
|
|
68
|
+
".npm",
|
|
69
|
+
".pnpm-store",
|
|
70
|
+
".local/share/pnpm",
|
|
71
|
+
".local/share/uv",
|
|
72
|
+
".local/state",
|
|
73
|
+
".yarn",
|
|
74
|
+
".bun",
|
|
75
|
+
".deno",
|
|
76
|
+
".cargo",
|
|
77
|
+
".rustup",
|
|
78
|
+
"go",
|
|
79
|
+
".gradle",
|
|
80
|
+
".m2",
|
|
81
|
+
".ivy2",
|
|
82
|
+
".sbt",
|
|
83
|
+
".nuget",
|
|
84
|
+
".dotnet",
|
|
85
|
+
".composer",
|
|
86
|
+
".gem",
|
|
87
|
+
".bundle",
|
|
88
|
+
".node-gyp",
|
|
89
|
+
".pub-cache",
|
|
90
|
+
".cabal",
|
|
91
|
+
".stack",
|
|
92
|
+
".docker/buildx",
|
|
93
|
+
"Library/Caches"
|
|
94
|
+
];
|
|
95
|
+
var CACHE_ENV_VARS = [
|
|
96
|
+
"TMPDIR",
|
|
97
|
+
"XDG_CACHE_HOME",
|
|
98
|
+
"npm_config_cache",
|
|
99
|
+
"PNPM_HOME",
|
|
100
|
+
"CARGO_HOME",
|
|
101
|
+
"RUSTUP_HOME",
|
|
102
|
+
"GOPATH",
|
|
103
|
+
"GOMODCACHE",
|
|
104
|
+
"GOCACHE",
|
|
105
|
+
"GRADLE_USER_HOME",
|
|
106
|
+
"PIP_CACHE_DIR",
|
|
107
|
+
"UV_CACHE_DIR",
|
|
108
|
+
"YARN_CACHE_FOLDER",
|
|
109
|
+
"BUN_INSTALL",
|
|
110
|
+
"DENO_DIR"
|
|
111
|
+
];
|
|
112
|
+
function sandboxWritableDirs(input) {
|
|
113
|
+
const dirs = [
|
|
114
|
+
input.cwd,
|
|
115
|
+
...input.addDirs,
|
|
116
|
+
input.tmpDir,
|
|
117
|
+
"/tmp",
|
|
118
|
+
...input.platformDirs ?? [],
|
|
119
|
+
...HOME_CACHE_DIRS.map((dir) => path.join(input.homeDir, dir)),
|
|
120
|
+
...CACHE_ENV_VARS.flatMap((name) => {
|
|
121
|
+
const value = input.env[name];
|
|
122
|
+
return value && path.isAbsolute(value) ? [value] : [];
|
|
123
|
+
})
|
|
124
|
+
];
|
|
125
|
+
return [...new Set(dirs.map((dir) => path.resolve(dir)))];
|
|
126
|
+
}
|
|
127
|
+
function sandboxHiddenPaths(stateDir) {
|
|
128
|
+
return {
|
|
129
|
+
dirs: ["profiles", "computer", "mcp-oauth"].map((name) => path.join(stateDir, name)),
|
|
130
|
+
files: ["api-key", "secrets.json"].map((name) => path.join(stateDir, name))
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
var SSH_CONFIG_DROPINS = "/etc/ssh/ssh_config.d";
|
|
134
|
+
function maskedDirs(request) {
|
|
135
|
+
return request.exists?.(SSH_CONFIG_DROPINS) ? [SSH_CONFIG_DROPINS] : [];
|
|
136
|
+
}
|
|
137
|
+
function bwrapInvocation(command, writable, cwd, masked = [], readOnly = [], hidden = { dirs: [], files: [] }) {
|
|
138
|
+
return {
|
|
139
|
+
file: "bwrap",
|
|
140
|
+
args: [
|
|
141
|
+
"--ro-bind",
|
|
142
|
+
"/",
|
|
143
|
+
"/",
|
|
144
|
+
"--dev",
|
|
145
|
+
"/dev",
|
|
146
|
+
"--proc",
|
|
147
|
+
"/proc",
|
|
148
|
+
...masked.flatMap((dir) => ["--tmpfs", dir]),
|
|
149
|
+
...writable.flatMap((dir) => ["--bind-try", dir, dir]),
|
|
150
|
+
...readOnly.flatMap((entry) => ["--ro-bind-try", entry, entry]),
|
|
151
|
+
// Last, so a writable or read-only bind above can never put a secret back in view.
|
|
152
|
+
...hidden.dirs.flatMap((dir) => ["--tmpfs", dir]),
|
|
153
|
+
...hidden.files.flatMap((file) => ["--ro-bind", "/dev/null", file]),
|
|
154
|
+
"--die-with-parent",
|
|
155
|
+
"--chdir",
|
|
156
|
+
cwd,
|
|
157
|
+
"--",
|
|
158
|
+
command.file,
|
|
159
|
+
...command.args
|
|
160
|
+
]
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function seatbeltProfile(writableCount, hiddenDirs = 0, hiddenFiles = 0) {
|
|
164
|
+
const allowed = Array.from({ length: writableCount }, (_, index) => ` (subpath (param "W${index}"))`).join("");
|
|
165
|
+
const dirs = Array.from({ length: hiddenDirs }, (_, index) => ` (subpath (param "HD${index}"))`).join("");
|
|
166
|
+
const files = Array.from({ length: hiddenFiles }, (_, index) => ` (literal (param "HF${index}"))`).join("");
|
|
167
|
+
const hide = hiddenDirs + hiddenFiles ? `(deny file-read* file-write*${dirs}${files})
|
|
168
|
+
` : "";
|
|
169
|
+
return `(version 1)
|
|
170
|
+
(allow default)
|
|
171
|
+
(deny file-write*)
|
|
172
|
+
(allow file-write* (subpath "/dev")${allowed})
|
|
173
|
+
${hide}`;
|
|
174
|
+
}
|
|
175
|
+
function sandboxExecInvocation(command, writable, hidden = { dirs: [], files: [] }) {
|
|
176
|
+
return {
|
|
177
|
+
file: "/usr/bin/sandbox-exec",
|
|
178
|
+
args: ["-p", seatbeltProfile(writable.length, hidden.dirs.length, hidden.files.length), ...writable.flatMap((dir, index) => ["-D", `W${index}=${dir}`]), ...hidden.dirs.flatMap((dir, index) => ["-D", `HD${index}=${dir}`]), ...hidden.files.flatMap((file, index) => ["-D", `HF${index}=${file}`]), command.file, ...command.args]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function presentHidden(request) {
|
|
182
|
+
const hidden = request.hidden ?? { dirs: [], files: [] };
|
|
183
|
+
const exists = request.exists ?? (() => false);
|
|
184
|
+
return { dirs: hidden.dirs.filter(exists), files: hidden.files.filter(exists) };
|
|
185
|
+
}
|
|
186
|
+
function wrapForSandbox(request) {
|
|
187
|
+
if (request.mode !== "workspace") return { sandboxed: false, invocation: request.command };
|
|
188
|
+
if (request.platform === "linux") {
|
|
189
|
+
return request.available("bwrap") ? { sandboxed: true, invocation: bwrapInvocation(request.command, request.writable, request.cwd, maskedDirs(request), request.readOnly, presentHidden(request)) } : { sandboxed: false, invocation: request.command, missing: "bubblewrap (bwrap)" };
|
|
190
|
+
}
|
|
191
|
+
if (request.platform === "darwin") {
|
|
192
|
+
return request.available("/usr/bin/sandbox-exec") ? { sandboxed: true, invocation: sandboxExecInvocation(request.command, request.writable, presentHidden(request)) } : { sandboxed: false, invocation: request.command, missing: "sandbox-exec" };
|
|
193
|
+
}
|
|
194
|
+
return { sandboxed: false, invocation: request.command, missing: `a sandbox for ${request.platform}` };
|
|
195
|
+
}
|
|
196
|
+
function sandboxMissingNotice(missing) {
|
|
197
|
+
return `[sandbox: ${missing} is not installed or cannot run here, so commands in this session run unsandboxed]`;
|
|
198
|
+
}
|
|
199
|
+
var SANDBOX_DENIAL_HINT = "[sandbox: this looks like the workspace sandbox refusing a write outside the workspace (it may write only the workspace, the temp dir and tool caches). If the command genuinely needs that write, run it again with sandbox: false; the session's permission mode still applies.]";
|
|
200
|
+
var DENIAL = /Read-only file system|EROFS|Operation not permitted|EPERM/;
|
|
201
|
+
var PATHS = /(?:^|[\s'"`‘’:(])(\/[^\s'"`‘’:)]+)/g;
|
|
202
|
+
function inside(candidate, root) {
|
|
203
|
+
const relative = path.relative(root, candidate);
|
|
204
|
+
return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
205
|
+
}
|
|
206
|
+
function sandboxDenialHint(output2, writable) {
|
|
207
|
+
const denied = output2.split("\n").some((line2) => {
|
|
208
|
+
if (!DENIAL.test(line2)) return false;
|
|
209
|
+
const named = [...line2.matchAll(PATHS)].map((match) => match[1]);
|
|
210
|
+
return !named.length || named.some((entry) => !writable.some((root) => inside(entry, root)));
|
|
211
|
+
});
|
|
212
|
+
return denied ? SANDBOX_DENIAL_HINT : void 0;
|
|
213
|
+
}
|
|
214
|
+
function onPath(binary) {
|
|
215
|
+
const candidates = path.isAbsolute(binary) ? [binary] : (process.env.PATH ?? "").split(path.delimiter).filter(Boolean).map((dir) => path.join(dir, binary));
|
|
216
|
+
return candidates.some((candidate) => {
|
|
217
|
+
try {
|
|
218
|
+
accessSync(candidate, constants.X_OK);
|
|
219
|
+
return true;
|
|
220
|
+
} catch {
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
var bwrapRuns;
|
|
226
|
+
function sandboxAvailable(binary) {
|
|
227
|
+
if (!onPath(binary)) return false;
|
|
228
|
+
if (binary !== "bwrap") return true;
|
|
229
|
+
bwrapRuns ??= spawnSync("bwrap", ["--ro-bind", "/", "/", "--dev", "/dev", "--proc", "/proc", "--", "/bin/true"], { stdio: "ignore", timeout: 5e3 }).status === 0;
|
|
230
|
+
return bwrapRuns;
|
|
231
|
+
}
|
|
232
|
+
function realOrSame(dir) {
|
|
233
|
+
const missing = [];
|
|
234
|
+
for (let at = dir; ; at = path.dirname(at)) {
|
|
235
|
+
try {
|
|
236
|
+
return path.join(realpathSync.native(at), ...missing.reverse());
|
|
237
|
+
} catch {
|
|
238
|
+
}
|
|
239
|
+
if (path.dirname(at) === at) return dir;
|
|
240
|
+
missing.push(path.basename(at));
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
var darwinDirs;
|
|
244
|
+
function platformDirs() {
|
|
245
|
+
if (process.platform !== "darwin") return [];
|
|
246
|
+
darwinDirs ??= ["DARWIN_USER_TEMP_DIR", "DARWIN_USER_CACHE_DIR"].flatMap((name) => {
|
|
247
|
+
const result = spawnSync("/usr/bin/getconf", [name], { encoding: "utf8", timeout: 5e3 });
|
|
248
|
+
const dir = result.status === 0 ? result.stdout.trim() : "";
|
|
249
|
+
return dir && path.isAbsolute(dir) ? [dir] : [];
|
|
250
|
+
});
|
|
251
|
+
return darwinDirs;
|
|
252
|
+
}
|
|
253
|
+
function linkedWorktreeGit(cwd) {
|
|
254
|
+
const result = spawnSync("git", ["rev-parse", "--path-format=absolute", "--git-dir", "--git-common-dir"], { cwd, encoding: "utf8", timeout: 5e3 });
|
|
255
|
+
if (result.status !== 0) return { writable: [], readOnly: [] };
|
|
256
|
+
const [gitDir, common] = result.stdout.trim().split("\n");
|
|
257
|
+
if (!gitDir || !common || gitDir === common) return { writable: [], readOnly: [] };
|
|
258
|
+
return { writable: [gitDir, common], readOnly: [path.join(common, "hooks"), path.join(common, "config")] };
|
|
259
|
+
}
|
|
260
|
+
function sandboxCommand(mode, command, scope) {
|
|
261
|
+
const git = mode === "workspace" ? linkedWorktreeGit(scope.cwd) : { writable: [], readOnly: [] };
|
|
262
|
+
const named = sandboxWritableDirs({ ...scope, addDirs: [...scope.addDirs, ...git.writable], tmpDir: os.tmpdir(), env: process.env, platformDirs: platformDirs() });
|
|
263
|
+
const resolved = [...new Set(named.map(realOrSame))];
|
|
264
|
+
return { ...wrapForSandbox({ mode, platform: process.platform, command, writable: resolved, cwd: scope.cwd, available: sandboxAvailable, exists: existsSync, readOnly: git.readOnly.map(realOrSame), hidden: sandboxHiddenPaths(realOrSame(stateDirectory())) }), writable: [.../* @__PURE__ */ new Set([...resolved, ...named])] };
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// src/harness/output.ts
|
|
268
|
+
function line(label, value) {
|
|
269
|
+
return ` ${source_default.dim(label.padEnd(10))}${String(value ?? "\u2014")}`;
|
|
270
|
+
}
|
|
271
|
+
function sessionModelLabel(session, model = session.model) {
|
|
272
|
+
if (session.route === "clikcode-local") return localModelLabel(model);
|
|
273
|
+
if (session.route === "gateway" && session.gatewayAgentId) {
|
|
274
|
+
const agent = session.gatewayAgentName ?? "Agent";
|
|
275
|
+
return model ? `${agent} \xB7 ${model}` : agent;
|
|
276
|
+
}
|
|
277
|
+
if (session.route === "gateway") return session.model ? gatewaySessionModelLabel(model ?? session.model) : "Automatic";
|
|
278
|
+
return nativeModelLabel(session.nativeHarness, model);
|
|
279
|
+
}
|
|
280
|
+
function renderSessionCard(session, account) {
|
|
281
|
+
const shownModel = sessionModelLabel(session);
|
|
282
|
+
return [
|
|
283
|
+
source_default.bold.cyan("ClikCode"),
|
|
284
|
+
...session.name ? [line("chat", session.name)] : [],
|
|
285
|
+
line("project", compactPath(session.workspace ?? process.cwd())),
|
|
286
|
+
line("provider", sessionProviderLabel(session)),
|
|
287
|
+
line("account", account ?? "default"),
|
|
288
|
+
// Omitted when there is no real model, never printed as a placeholder:
|
|
289
|
+
// this card is also the JSON contract, and a fabricated model id there
|
|
290
|
+
// would be consumed as if it were real.
|
|
291
|
+
...shownModel ? [line("model", shownModel)] : [],
|
|
292
|
+
line("effort", session.route === "gateway" ? gatewayEffort(session) ?? (gatewayDefaultEffort(session.model ?? void 0) ? `${gatewayDefaultEffort(session.model ?? void 0)} (default)` : "model default") : session.effort),
|
|
293
|
+
...session.route === "gateway" ? [line("speed", session.speed === "fast" ? "fast (fastest provider)" : "default (cheapest provider)")] : [],
|
|
294
|
+
// The Gateway route's agent runs on this machine and honours the approval setting.
|
|
295
|
+
line("permissions", session.permissionMode ?? "ask"),
|
|
296
|
+
...isClikCodeAgent(session) ? [line("sandbox", sessionSandboxMode(session.sandbox) === "workspace" ? "on (writes the workspace, temp and caches)" : "off")] : [],
|
|
297
|
+
line("session", session.id.slice(0, 8))
|
|
298
|
+
].join("\n");
|
|
299
|
+
}
|
|
300
|
+
var CONFIRMATION_PANELS = /* @__PURE__ */ new Set([
|
|
301
|
+
"session-renamed",
|
|
302
|
+
"session-archived",
|
|
303
|
+
"session-deleted",
|
|
304
|
+
"session-closed",
|
|
305
|
+
"session-forked",
|
|
306
|
+
"settings-updated",
|
|
307
|
+
"conversation-reset",
|
|
308
|
+
"account-removed",
|
|
309
|
+
"add-dir",
|
|
310
|
+
"copied",
|
|
311
|
+
"redo-done"
|
|
312
|
+
]);
|
|
313
|
+
function renderPanelText(payload) {
|
|
314
|
+
if (payload.status === "ready") {
|
|
315
|
+
const session = payload.session;
|
|
316
|
+
const account = typeof payload.account === "string" ? payload.account : void 0;
|
|
317
|
+
return `
|
|
318
|
+
${renderSessionCard(session, account)}
|
|
319
|
+
|
|
320
|
+
${source_default.dim("Type your request, /provider to choose a provider, or /help for commands.")}
|
|
321
|
+
|
|
322
|
+
`;
|
|
323
|
+
}
|
|
324
|
+
if (payload.panel === "provider-selected" && typeof payload.harness === "string") {
|
|
325
|
+
const account = typeof payload.account === "string" ? ` \xB7 ${payload.account}` : "";
|
|
326
|
+
return `
|
|
327
|
+
${source_default.green("\u2713")} ${source_default.bold(payload.harness)} selected${source_default.dim(account)}
|
|
328
|
+
|
|
329
|
+
`;
|
|
330
|
+
}
|
|
331
|
+
if (payload.panel === "error" && typeof payload.message === "string") {
|
|
332
|
+
if (/^(?:All accounts exhausted|Usage Exhausted|Credits Exhausted)\b/.test(payload.message.trim())) {
|
|
333
|
+
return `
|
|
334
|
+
${payload.message}
|
|
335
|
+
|
|
336
|
+
`;
|
|
337
|
+
}
|
|
338
|
+
return `
|
|
339
|
+
${source_default.red("Error:")} ${payload.message}
|
|
340
|
+
|
|
341
|
+
`;
|
|
342
|
+
}
|
|
343
|
+
if (payload.panel === "help" && typeof payload.helpText === "string") {
|
|
344
|
+
return `
|
|
345
|
+
${source_default.bold("Commands")}
|
|
346
|
+
|
|
347
|
+
${payload.helpText}
|
|
348
|
+
|
|
349
|
+
`;
|
|
350
|
+
}
|
|
351
|
+
if ((payload.panel === "settings" || payload.panel === "status") && payload.session) {
|
|
352
|
+
const session = payload.session;
|
|
353
|
+
const account = typeof payload.account === "string" ? payload.account : void 0;
|
|
354
|
+
return `
|
|
355
|
+
${source_default.bold("Current setup")}
|
|
356
|
+
${renderSessionCard(session, account)}
|
|
357
|
+
|
|
358
|
+
${source_default.dim("Change with /model, /effort or /provider.")}
|
|
359
|
+
|
|
360
|
+
`;
|
|
361
|
+
}
|
|
362
|
+
if (payload.panel === "accounts" && Array.isArray(payload.accounts)) {
|
|
363
|
+
const accounts = payload.accounts;
|
|
364
|
+
return `
|
|
365
|
+
${source_default.bold("Accounts")}
|
|
366
|
+
` + (accounts.length ? accounts.map((account) => {
|
|
367
|
+
const selected = payload.session?.accountId === account.id;
|
|
368
|
+
return ` ${selected ? source_default.green("\u25CF") : source_default.dim("\u25CB")} ${account.label} ${source_default.dim(`(${account.provider} \xB7 ${account.status})`)}`;
|
|
369
|
+
}).join("\n") : ` ${source_default.dim("No accounts yet.")}`) + `
|
|
370
|
+
|
|
371
|
+
${source_default.dim("Use /account to choose, or /accounts login <provider> <label>.")}
|
|
372
|
+
|
|
373
|
+
`;
|
|
374
|
+
}
|
|
375
|
+
if (payload.panel === "accounts" && payload.selected && typeof payload.selected === "object") {
|
|
376
|
+
const selected = payload.selected;
|
|
377
|
+
return `
|
|
378
|
+
${source_default.green("\u2713")} Account selected: ${source_default.bold(String(selected.label))} ${source_default.dim(`(${selected.provider})`)}
|
|
379
|
+
|
|
380
|
+
`;
|
|
381
|
+
}
|
|
382
|
+
if (payload.panel === "models" && Array.isArray(payload.models)) {
|
|
383
|
+
const models = payload.models;
|
|
384
|
+
return `
|
|
385
|
+
${source_default.bold("Models")}
|
|
386
|
+
` + (models.length ? models.map((model) => {
|
|
387
|
+
const note = "price" in model ? model.price ? `\xB7 ${model.price}` : "" : `(${model.provider ?? model.account})`;
|
|
388
|
+
const shown = typeof model.label === "string" && !("fits" in model) ? model.label : modelLabel(String(model.model), typeof model.provider === "string" ? model.provider : void 0);
|
|
389
|
+
return ` ${shown}${note ? ` ${source_default.dim(String(note))}` : ""}`;
|
|
390
|
+
}).join("\n") : ` ${source_default.dim("Using the provider default. Set one with /model <name>.")}`) + "\n\n";
|
|
391
|
+
}
|
|
392
|
+
if (payload.panel === "sessions" && Array.isArray(payload.sessions)) {
|
|
393
|
+
const sessions = payload.sessions;
|
|
394
|
+
return `
|
|
395
|
+
${source_default.bold("Sessions")}
|
|
396
|
+
` + (sessions.length ? sessions.map((item) => ` ${String(item.id).slice(0, 8)} ${item.harness ?? item.provider ?? "unselected"} ${source_default.dim(String(item.status))}`).join("\n") : ` ${source_default.dim("No saved sessions.")}`) + "\n\n";
|
|
397
|
+
}
|
|
398
|
+
if (payload.panel === "conversation-reset") {
|
|
399
|
+
return `
|
|
400
|
+
${source_default.green("\u2713")} New conversation started
|
|
401
|
+
|
|
402
|
+
`;
|
|
403
|
+
}
|
|
404
|
+
if (payload.panel === "history" && Array.isArray(payload.messages)) {
|
|
405
|
+
const messages = payload.messages;
|
|
406
|
+
const summary = payload.summary;
|
|
407
|
+
const opening = summary ? `${source_default.dim(`${summaryHeadline(summary).replace(/^f/, "F")} -- what the next provider is given for them:`)}
|
|
408
|
+
${summary.text.trim()}
|
|
409
|
+
|
|
410
|
+
` : "";
|
|
411
|
+
return `
|
|
412
|
+
${source_default.bold("Conversation")}
|
|
413
|
+
|
|
414
|
+
${opening}` + (messages.length ? messages.map((message) => `${message.role === "assistant" ? source_default.cyan("assistant") : source_default.green("you")}
|
|
415
|
+
${message.content}`).join("\n\n") : source_default.dim("No messages yet.")) + "\n\n";
|
|
416
|
+
}
|
|
417
|
+
if (payload.panel === "diff" && typeof payload.diff === "string") {
|
|
418
|
+
return `
|
|
419
|
+
${source_default.bold("Project changes")}
|
|
420
|
+
|
|
421
|
+
${payload.diff || source_default.dim("Working tree is clean.")}
|
|
422
|
+
|
|
423
|
+
`;
|
|
424
|
+
}
|
|
425
|
+
if (payload.panel === "attachments" && Array.isArray(payload.attachments)) {
|
|
426
|
+
const attachments = payload.attachments;
|
|
427
|
+
return `
|
|
428
|
+
${source_default.bold("Next-request attachments")}
|
|
429
|
+
` + (attachments.length ? attachments.map((path2) => ` ${source_default.cyan("\u2022")} ${compactPath(path2)}`).join("\n") : ` ${source_default.dim("None queued.")}`) + "\n\n";
|
|
430
|
+
}
|
|
431
|
+
if (payload.panel === "usage" && typeof payload.text === "string") {
|
|
432
|
+
return `
|
|
433
|
+
${payload.text}
|
|
434
|
+
|
|
435
|
+
`;
|
|
436
|
+
}
|
|
437
|
+
if (payload.panel === "usage" && payload.totals && typeof payload.totals === "object") {
|
|
438
|
+
const totals = payload.totals;
|
|
439
|
+
return `
|
|
440
|
+
${source_default.bold("Usage")}
|
|
441
|
+
${line("calls", totals.calls)}
|
|
442
|
+
${line("input", `${totals.inputTokens ?? 0} tokens`)}
|
|
443
|
+
${line("output", `${totals.outputTokens ?? 0} tokens`)}
|
|
444
|
+
|
|
445
|
+
`;
|
|
446
|
+
}
|
|
447
|
+
if (payload.panel === "session-closed") {
|
|
448
|
+
return `
|
|
449
|
+
${source_default.dim("Session saved. See you next time.")}
|
|
450
|
+
|
|
451
|
+
`;
|
|
452
|
+
}
|
|
453
|
+
if (typeof payload.text === "string") {
|
|
454
|
+
return `
|
|
455
|
+
${payload.text}
|
|
456
|
+
|
|
457
|
+
`;
|
|
458
|
+
}
|
|
459
|
+
if (typeof payload.panel === "string") {
|
|
460
|
+
const controls = Array.isArray(payload.controls) ? payload.controls.join(" \xB7 ") : "";
|
|
461
|
+
const title = payload.panel.replace(/-/g, " ").replace(/^./, (value) => value.toUpperCase());
|
|
462
|
+
return `
|
|
463
|
+
${source_default.bold(title)}${controls ? `
|
|
464
|
+
${source_default.dim(controls)}` : ""}
|
|
465
|
+
|
|
466
|
+
`;
|
|
467
|
+
}
|
|
468
|
+
return void 0;
|
|
469
|
+
}
|
|
470
|
+
function panelParts(text) {
|
|
471
|
+
const [title = "", ...rest] = text.replace(/^\n+|\n+$/g, "").split("\n");
|
|
472
|
+
return { title: stripAnsi(title).trim(), body: rest.join("\n").replace(/^\n+/, "") };
|
|
473
|
+
}
|
|
474
|
+
function drawHarnessOutput(terminal, payload) {
|
|
475
|
+
if (payload.panel === "settings" && payload.session) {
|
|
476
|
+
terminal.render(payload.session, typeof payload.account === "string" ? payload.account : void 0);
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
if (payload.panel === "provider-selected" || payload.panel === "accounts" && payload.selected || payload.status === "connected") return;
|
|
480
|
+
if (typeof payload.panel === "string" && (CONFIRMATION_PANELS.has(payload.panel) || payload.changed === true)) return;
|
|
481
|
+
const text = renderPanelText(payload);
|
|
482
|
+
if (text !== void 0) {
|
|
483
|
+
const { title, body } = panelParts(text);
|
|
484
|
+
terminal.panel(title, body);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
function emitHarnessOutput(payload) {
|
|
488
|
+
if (isJsonDefaultMode()) return emitResult(payload);
|
|
489
|
+
if (TERMINAL.active) {
|
|
490
|
+
drawHarnessOutput(TERMINAL.active, payload);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
const text = renderPanelText(payload);
|
|
494
|
+
if (text !== void 0) {
|
|
495
|
+
output.write(text);
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
emitResult(payload);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export {
|
|
502
|
+
sessionSandboxMode,
|
|
503
|
+
parseSandboxMode,
|
|
504
|
+
sandboxModeText,
|
|
505
|
+
sandboxMissingNotice,
|
|
506
|
+
sandboxDenialHint,
|
|
507
|
+
sandboxCommand,
|
|
508
|
+
sessionModelLabel,
|
|
509
|
+
renderSessionCard,
|
|
510
|
+
renderPanelText,
|
|
511
|
+
panelParts,
|
|
512
|
+
drawHarnessOutput,
|
|
513
|
+
emitHarnessOutput
|
|
514
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
gatewayLogin
|
|
5
|
+
} from "./chunk-DXKNDNFC.js";
|
|
6
|
+
import "./chunk-TQDM7S5N.js";
|
|
7
|
+
import "./chunk-TULAXS77.js";
|
|
8
|
+
import "./chunk-GYMAI5NY.js";
|
|
9
|
+
import "./chunk-YMCH3L2S.js";
|
|
10
|
+
import "./chunk-5B6TVO4A.js";
|
|
11
|
+
import "./chunk-NAOX3JUB.js";
|
|
12
|
+
import "./chunk-RDDWQBEM.js";
|
|
13
|
+
import "./chunk-MPAJ446F.js";
|
|
14
|
+
import "./chunk-CBANJFBO.js";
|
|
15
|
+
import "./chunk-PWXII6HF.js";
|
|
16
|
+
export {
|
|
17
|
+
gatewayLogin
|
|
18
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
COUNTRY_REFUSED,
|
|
5
|
+
STOP_GRACE_MS,
|
|
6
|
+
accountUseTool,
|
|
7
|
+
approvedFile,
|
|
8
|
+
arrangeSnapshot,
|
|
9
|
+
askForFills,
|
|
10
|
+
browserUseTool,
|
|
11
|
+
changedLines,
|
|
12
|
+
collapseOptions,
|
|
13
|
+
computerWebTool,
|
|
14
|
+
displayUrl,
|
|
15
|
+
emailSiteScope,
|
|
16
|
+
fillWhole,
|
|
17
|
+
findInSnapshot,
|
|
18
|
+
helpFor,
|
|
19
|
+
inOrder,
|
|
20
|
+
locate,
|
|
21
|
+
observeComputerPage,
|
|
22
|
+
pageHolds,
|
|
23
|
+
phoneForPage,
|
|
24
|
+
requiredNoValue,
|
|
25
|
+
runSteps,
|
|
26
|
+
signInMethodHint,
|
|
27
|
+
signInProviders,
|
|
28
|
+
splitCodeFields,
|
|
29
|
+
stepList,
|
|
30
|
+
waitAtMost,
|
|
31
|
+
waitForDeskItem,
|
|
32
|
+
withSignInHints
|
|
33
|
+
} from "./chunk-W2NVSDO5.js";
|
|
34
|
+
import "./chunk-EXN4KHLB.js";
|
|
35
|
+
import "./chunk-BNTXAZXW.js";
|
|
36
|
+
import "./chunk-LAVFOA3S.js";
|
|
37
|
+
import {
|
|
38
|
+
VOIP_REFUSED
|
|
39
|
+
} from "./chunk-2GAB36IE.js";
|
|
40
|
+
import "./chunk-WOVTYST3.js";
|
|
41
|
+
import "./chunk-3RXBMYKZ.js";
|
|
42
|
+
import "./chunk-34JQYQCA.js";
|
|
43
|
+
import "./chunk-JYBONKD4.js";
|
|
44
|
+
import "./chunk-MCSDWZET.js";
|
|
45
|
+
import {
|
|
46
|
+
verificationCode
|
|
47
|
+
} from "./chunk-BOQBXGSN.js";
|
|
48
|
+
import "./chunk-KCQ4TBLS.js";
|
|
49
|
+
import "./chunk-FBKXE4EJ.js";
|
|
50
|
+
import "./chunk-DW2BMUKY.js";
|
|
51
|
+
import "./chunk-B4HNJRAH.js";
|
|
52
|
+
import "./chunk-OQ245JLA.js";
|
|
53
|
+
import "./chunk-25T3GVS7.js";
|
|
54
|
+
import "./chunk-4GXAO3UY.js";
|
|
55
|
+
import "./chunk-SNU37TQI.js";
|
|
56
|
+
import "./chunk-XAHGBPWT.js";
|
|
57
|
+
import "./chunk-FT5TX7OX.js";
|
|
58
|
+
import "./chunk-7NMUTGOW.js";
|
|
59
|
+
import "./chunk-FFGU4GCC.js";
|
|
60
|
+
import "./chunk-2BBELGHY.js";
|
|
61
|
+
import "./chunk-IMLTL2MY.js";
|
|
62
|
+
import "./chunk-MP4KZOQC.js";
|
|
63
|
+
import "./chunk-PWBF2X3V.js";
|
|
64
|
+
import "./chunk-HU5SSUFX.js";
|
|
65
|
+
import "./chunk-AKRYTS2D.js";
|
|
66
|
+
import "./chunk-4GVEJ5FK.js";
|
|
67
|
+
import "./chunk-O7BNJIXU.js";
|
|
68
|
+
import "./chunk-MCBRVPA7.js";
|
|
69
|
+
import "./chunk-RJLHVYQY.js";
|
|
70
|
+
import "./chunk-YMCH3L2S.js";
|
|
71
|
+
import "./chunk-I75EDU75.js";
|
|
72
|
+
import "./chunk-5SM5UAWN.js";
|
|
73
|
+
import "./chunk-PAXYQZH7.js";
|
|
74
|
+
import "./chunk-CAADDF6M.js";
|
|
75
|
+
import "./chunk-G3QP67Z7.js";
|
|
76
|
+
import "./chunk-4L2ZZM4Q.js";
|
|
77
|
+
import "./chunk-F6F47QAY.js";
|
|
78
|
+
import "./chunk-RDDWQBEM.js";
|
|
79
|
+
import "./chunk-MPAJ446F.js";
|
|
80
|
+
import "./chunk-CBANJFBO.js";
|
|
81
|
+
import "./chunk-PWXII6HF.js";
|
|
82
|
+
export {
|
|
83
|
+
COUNTRY_REFUSED,
|
|
84
|
+
STOP_GRACE_MS,
|
|
85
|
+
VOIP_REFUSED,
|
|
86
|
+
accountUseTool,
|
|
87
|
+
approvedFile,
|
|
88
|
+
arrangeSnapshot,
|
|
89
|
+
askForFills,
|
|
90
|
+
browserUseTool,
|
|
91
|
+
changedLines,
|
|
92
|
+
collapseOptions,
|
|
93
|
+
computerWebTool,
|
|
94
|
+
displayUrl,
|
|
95
|
+
emailSiteScope,
|
|
96
|
+
fillWhole,
|
|
97
|
+
findInSnapshot,
|
|
98
|
+
helpFor,
|
|
99
|
+
inOrder,
|
|
100
|
+
locate,
|
|
101
|
+
observeComputerPage,
|
|
102
|
+
pageHolds,
|
|
103
|
+
phoneForPage,
|
|
104
|
+
requiredNoValue,
|
|
105
|
+
runSteps,
|
|
106
|
+
signInMethodHint,
|
|
107
|
+
signInProviders,
|
|
108
|
+
splitCodeFields,
|
|
109
|
+
stepList,
|
|
110
|
+
verificationCode,
|
|
111
|
+
waitAtMost,
|
|
112
|
+
waitForDeskItem,
|
|
113
|
+
withSignInHints
|
|
114
|
+
};
|