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,45 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
addCustomAcpHarness,
|
|
5
|
+
readCustomAcpConfig,
|
|
6
|
+
removeCustomAcpHarness
|
|
7
|
+
} from "./chunk-RSZGEL5U.js";
|
|
8
|
+
import {
|
|
9
|
+
emitResult
|
|
10
|
+
} from "./chunk-JGIWATSG.js";
|
|
11
|
+
import "./chunk-5B6TVO4A.js";
|
|
12
|
+
import "./chunk-F6F47QAY.js";
|
|
13
|
+
import "./chunk-RDDWQBEM.js";
|
|
14
|
+
import "./chunk-MPAJ446F.js";
|
|
15
|
+
import "./chunk-CBANJFBO.js";
|
|
16
|
+
import "./chunk-PWXII6HF.js";
|
|
17
|
+
|
|
18
|
+
// src/commands/acp.ts
|
|
19
|
+
async function acpList() {
|
|
20
|
+
const harnesses = await readCustomAcpConfig();
|
|
21
|
+
emitResult({ harnesses });
|
|
22
|
+
}
|
|
23
|
+
async function acpAdd(command, binary, argv, options) {
|
|
24
|
+
const definition = {
|
|
25
|
+
command,
|
|
26
|
+
binary,
|
|
27
|
+
argv,
|
|
28
|
+
...options.name ? { displayName: options.name } : {},
|
|
29
|
+
...options.provider ? { provider: options.provider } : {}
|
|
30
|
+
};
|
|
31
|
+
const added = await addCustomAcpHarness(definition);
|
|
32
|
+
emitResult({
|
|
33
|
+
added: { command: added.command, binary: added.binary, argv: [...added.acp?.argv ?? []], displayName: added.displayName, provider: added.provider }
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async function acpRemove(command) {
|
|
37
|
+
const removed = await removeCustomAcpHarness(command);
|
|
38
|
+
if (!removed) throw new Error(`no custom ACP harness named "${command}"`);
|
|
39
|
+
emitResult({ removed: command.trim().replace(/^\//, "").toLowerCase() });
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
acpAdd,
|
|
43
|
+
acpList,
|
|
44
|
+
acpRemove
|
|
45
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// src/agent/computer/actions.ts
|
|
5
|
+
var a = (name, kind, group, does, params, example = {}) => ({ name, kind, group, does, params, example: { action: name, ...example } });
|
|
6
|
+
var ACTIONS = [
|
|
7
|
+
// ── browser_use: look ──
|
|
8
|
+
a("observe", "browser", "Look", 'Read the whole page again, why_blank: true when it is stuck on Loading... or blank: reloads once and reports failed, blocked and error-status requests and console errors, so you can record the real cause, with a [ref=\u2026] on every element. find: "words" shows only the lines that mention them (for a long page); full: true adds the header and footer; pages picks pages of a PDF.', ["find", "full", "pages", "why_blank", "seconds"], { find: "pricing" }),
|
|
9
|
+
a("screenshot", "browser", "Look", "A picture of the page (full: true for the whole page, target for one element). Only for models that can see images.", ["full", "target"], { full: true }),
|
|
10
|
+
a("console", "browser", "Look", "The tab's recent console messages and page errors (level, limit, clear).", ["level", "limit", "clear"], { level: "error" }),
|
|
11
|
+
a("network", "browser", "Look", "Do the steps (or just wait seconds) while recording the page's API calls: method, address, status and the shape of each answer (bodies: true adds the bodies). find keeps calls whose address contains the words.", ["steps", "seconds", "find", "bodies"], { steps: [{ do: "click", target: "e5" }], find: "/api/" }),
|
|
12
|
+
a("evaluate", "browser", "Look", 'Run JavaScript in the page and get its JSON result. With target the code is a function that gets that element: "el => el.getBoundingClientRect().width". Password, code and card values read as empty.', ["expression", "target"], { expression: "document.title" }),
|
|
13
|
+
// ── browser_use: go ──
|
|
14
|
+
a("open", "browser", "Go", "Go to a web address and return the page. new_tab: true opens it in another tab of yours; http_auth: true answers a site's own username/password box from the saved login.", ["url", "new_tab", "http_auth"], { url: "https://example.com" }),
|
|
15
|
+
a("back", "browser", "Go", "Go back one page in the tab's history.", []),
|
|
16
|
+
a("forward", "browser", "Go", "Go forward one page in the tab's history.", []),
|
|
17
|
+
a("reload", "browser", "Go", "Reload the page.", []),
|
|
18
|
+
a("tabs", "browser", "Go", "List this chat's tabs, then every tab in the shared browser with its owner, age and idle time. Tabs idle 20 minutes, or whose worker ended, are closed by themselves.", []),
|
|
19
|
+
a("switch", "browser", "Go", "Make another of your tabs the current one: its number from tabs (index), or words of its title or address (text).", ["index", "text"], { index: 1 }),
|
|
20
|
+
a("close", "browser", "Go", `Close this chat's tab, or just one of them with index. With tab: "<name>" it closes the tab of that name whoever opened it (see tabs).`, ["index"]),
|
|
21
|
+
// ── browser_use: act ──
|
|
22
|
+
a("click", "browser", "Act", 'Click an element. button: right or middle; count: 2 double-clicks; modifiers hold keys (["Shift"]); x and y click a point of the visible page (a canvas); accept_dialog: true answers yes to a confirm box the click raises.', ["target", "button", "count", "modifiers", "x", "y", "at", "accept_dialog"], { target: "e12" }),
|
|
23
|
+
a("fill", "browser", "Act", "Put text in a field, rich-text editor, date or time box, or dropdown (target + text). Leave text out for what only the user knows (name, email, phone, a password): it is filled from their saved profile or login, or they are asked privately, and you are not shown it.", ["target", "text"], { target: "e4", text: "My key" }),
|
|
24
|
+
a("choose", "browser", "Act", "Pick an option of a dropdown: target + the option's text.", ["target", "text"], { target: "e7", text: "Pro" }),
|
|
25
|
+
a("press", "browser", "Act", "Press one key or a combination: Enter, Escape, Tab, ArrowDown, a single character (/ or a), or modifiers joined with + (Control+a, Meta+k, Shift+Tab).", ["key"], { key: "Enter" }),
|
|
26
|
+
a("scroll", "browser", "Act", "Scroll the page: direction up, down, left, right, top or bottom (default down), amount in pixels (default 600). With a target and no direction it is scrolled into view; with both, that element scrolls.", ["direction", "amount", "target"], { direction: "down" }),
|
|
27
|
+
a("hover", "browser", "Act", "Move the pointer onto target (or x and y), for menus that open on hover.", ["target", "x", "y"], { target: "e3" }),
|
|
28
|
+
a("drag", "browser", "Act", "Drag target onto to_target (the page's own drag and drop), or from x, y to to_x, to_y.", ["target", "to_target", "x", "y", "to_x", "to_y"], { target: "e3", to_target: "e9" }),
|
|
29
|
+
a("upload", "browser", "Act", "Send a file to a file input (target is the input or its button). text is a file detail saved in the profile (logo_file) or an absolute path inside the workspace or this chat's downloads; nothing else can be sent.", ["target", "text"], { target: "e6", text: "/home/me/project/logo.png" }),
|
|
30
|
+
a("wait", "browser", "Act", "Wait for text to appear (gone: true: to disappear), or until network_idle, visible, hidden, enabled, disabled (target or selector) or url. seconds is the most to wait (default 30, up to 120). It returns what the page shows, not an error, when time runs out.", ["text", "gone", "until", "selector", "url", "target", "seconds"], { text: "Deployed", seconds: 60 }),
|
|
31
|
+
a("steps", "browser", "Act", "Do several of click, fill, choose, press, scroll, wait, upload, hover, drag in order in one call. It stops at the first one that fails and shows the page.", ["steps"], { steps: [{ do: "fill", target: "e4", text: "My key" }, { do: "click", target: "e9" }] }),
|
|
32
|
+
// ── browser_use: the browser itself ──
|
|
33
|
+
a("downloads", "browser", "Browser", "List the files this chat's browser has downloaded. They are kept, and the path is reported as soon as the click that started a download returns.", []),
|
|
34
|
+
a("dialog", "browser", "Browser", "Answer an alert, confirm or prompt box the page is holding: accept_dialog: true to accept, text for a prompt's answer; otherwise it is dismissed.", ["accept_dialog", "text"], { accept_dialog: true }),
|
|
35
|
+
a("viewport", "browser", "Browser", 'Set how the tab presents itself: width and height, scale, mobile, a device by name ("iPhone 15"), geolocation, timezone, locale. reset: true undoes it; with nothing given it says what is set.', ["width", "height", "scale", "mobile", "device", "reset", "geolocation", "timezone", "locale"], { device: "iPhone 15" }),
|
|
36
|
+
a("pdf", "browser", "Browser", "Print the page to a PDF in this chat's downloads (landscape, file_name).", ["landscape", "file_name"]),
|
|
37
|
+
a("cookies", "browser", "Browser", "List the site's cookies by name, domain and expiry (never their values); clear: true removes them. url names another site.", ["url", "clear"]),
|
|
38
|
+
a("permissions", "browser", "Browser", "Let the site use camera, microphone, geolocation, notifications or clipboard (grant), or refuse them (deny). Everything is refused until granted.", ["url", "grant", "deny"], { grant: ["geolocation"] }),
|
|
39
|
+
a("auth", "browser", "Browser", "Answer a site's own username/password box (HTTP Basic or Digest) with the saved login for that origin only: url (default the open page), label to pick a login. clear: true turns it off.", ["url", "label", "clear"]),
|
|
40
|
+
a("cloud", "browser", "Browser", `Move this tab to the managed cloud browser at the same address, for a page that refuses this computer's connection ("unusual traffic", a blocked region). It starts signed out there: local sign-ins are not copied, and it does not answer captchas (human_check does that, in the local browser). clear: true brings the tab back to the local browser. Only when the user has turned it on; if the page is still blocked there, use handoff.`, ["clear"], {}),
|
|
41
|
+
// ── browser_use: people ──
|
|
42
|
+
a("handoff", "browser", "People", "Give the user a link to a live view of this tab for a step only they can do (a CAPTCHA, a code sent to them, a payment). The link is on their Tailscale network, so it opens on their phone or any device on the tailnet. It returns the link at once; call handoff again to wait until they press Done; clear: true takes the tab back. When the user only wants to watch, use show.", ["clear"]),
|
|
43
|
+
a("show", "browser", "People", "Let the person at this computer watch this tab: the browser runs on a hidden display, so this opens a live view of the tab in their own default browser and returns at once. Keep working as usual: the view stays open while this chat has a tab and follows it to another tab, and the user can click and type in it too. Calling it again returns the same view; clear: true closes it. With no desktop to open it on (a server, ssh) it says so and returns the address. The user can instead put the browser window itself on their desktop with: clikcode computer display visible.", ["clear"]),
|
|
44
|
+
a("human_check", "browser", "People", `Get past the human check on the page as a visitor would. Presses an "I'm not a robot" / "Verify you are human" box once; when the check wants more, answers it: picture grids, click and drag puzzles, sliders, press-and-hold buttons, spoken clips and "type the characters" pictures are worked out by the account's own models and played at a visitor's pace (no external solving service). If it still does not clear, use handoff.`, []),
|
|
45
|
+
// ── account_use: sign in ──
|
|
46
|
+
a("login", "account", "Sign in", "Sign in on the open page with the saved login for the site, asking the user privately when there is none. new_account: true asks for a different account.", ["new_account"]),
|
|
47
|
+
a("add_login", "account", "Sign in", "Ask the user for a login in one private form (email and password) and save it for the website in url, so a later login or sign-in uses it. With no url it asks for the website too. label starts the email field; you are never shown the password.", ["url", "label"]),
|
|
48
|
+
a("forget_login", "account", "Sign in", "Forget the saved login(s) for a site: host (default the open page), or label to forget just one.", ["host", "url", "label"]),
|
|
49
|
+
a("profile", "account", "Sign in", "The user's autofill details (name, email, phone, address): list them, save fields, or ask for details a task needs with ask_fields (privately, once). They fill forms for you; you are never shown the private ones.", ["fields", "label", "ask", "ask_fields", "custom"]),
|
|
50
|
+
a("card", "account", "Sign in", "The user's saved payment cards as a wallet shows them (brand, last four, expiry): list them, or ask: true asks the user for one privately. To pay, fill the form's card boxes (number, expiry, security code, name on card) with no text: the user approves the card for that site and it is typed in without being shown to you. Never used unattended. You still press Pay yourself, so say what will be charged first. The user removes a card with: clikcode computer card --delete.", ["ask", "label"], { ask: true }),
|
|
51
|
+
a("oauth_connect", "account", "Sign in", "Connect a ClikDeploy connector's OAuth app by pressing through the provider's consent screens (target = the connector id: slack, github). It stops with a plain reason at a password, a payment or a CAPTCHA.", ["target"], { target: "slack" }),
|
|
52
|
+
// ── account_use: email ──
|
|
53
|
+
a("email_connect", "account", "Email", "One consent in this browser connects the signed-in Gmail (read-only). After that read_email_code and open_email_link read mail through Gmail and wait for it to arrive. address: connect another Google account (it must be signed in here); it adds a mailbox and replaces none.", ["address"]),
|
|
54
|
+
a("read_sms_code", "account", "Email", "Wait for a code texted to the profile phone and return it (from: sender, seconds: default 90).", ["from", "seconds"], {}),
|
|
55
|
+
a("read_email_code", "account", "Email", "Wait for an emailed verification code and return it (from: sender, subject: words from the subject, seconds: how long, default 90; address: which connected mailbox, default the one the page or site login used).", ["from", "subject", "account", "address", "seconds"], { from: "github.com" }),
|
|
56
|
+
a("open_email_link", "account", "Email", "Find the newest email from a sender and open a link in it (link: words or domain of the link), in one call. For verification and sign-in emails.", ["from", "subject", "link", "account", "address", "seconds"], { from: "github.com" }),
|
|
57
|
+
// ── account_use: keys ──
|
|
58
|
+
a("capture_secret", "account", "Keys", "On the page where a key is created or shown: press the Create button (target) and take the key. It checks the key against its service, saves it to the ClikCode Secrets Manager and sends it where send_to says. You never see it. With no target it takes a key the page already shows. A connector that needs a plain value beside the key (Knack app_id, Kommo subdomain): send_to {to:'clikdeploy-connection', with:{integration:'knack'}, values:{app_id:'...'}}; a wrong name answers with the allowed ones.", ["target", "secret_name", "send_to", "vendor", "owner", "env", "paste"], { target: "e14", secret_name: "acme/key", send_to: { to: "clikdeploy-secret", with: { key: "ACME_API_KEY" } } }),
|
|
59
|
+
a("auth_code", "account", "Keys", 'Type the six-digit authenticator code for a sign-in or an authenticator set-up (mfa_account: the vendor account whose seed is stored in ClikDeploy, e.g. "aws/root"; target: the field). ClikDeploy keeps the seed and hands back only the rolling code; the code is typed, never shown. Call it again for the next code when a site asks for two in a row. Store the seed first by capturing it with capture_secret to the clikdeploy-vendor-mfa destination when the site shows it as text.', ["mfa_account", "target"], { mfa_account: "aws/root", target: "e7" }),
|
|
60
|
+
a("send_secret", "account", "Keys", "Send a saved key again, or somewhere else, without seeing it: secret (its name; acme/key and acme/api-key are the same) + to and with, or send_to (a connector value beside the key: send_to {to:'clikdeploy-connection', with:{integration:'kommo'}, values:{subdomain:'acme'}}).", ["secret", "to", "with", "send_to", "values"], { secret: "acme/key", to: "clikdeploy-secret", with: { key: "ACME_API_KEY" } }),
|
|
61
|
+
a("secrets", "account", "Keys", "List the keys saved in the ClikCode Secrets Manager: name, the site it is for and dates, never values; target filters by words. Check here before capturing a key again, and use the name with send_secret.", ["target"], { target: "acme" }),
|
|
62
|
+
a("read_value", "account", "Keys", 'Read a plain value the page labels (label: "Application ID", "Account ID", "Subdomain", "Workspace ID"), without running JavaScript. Refuses anything secret (a label naming a key, secret, token or password; a long opaque string). A short value is returned; an id that looks opaque, or any value when secret_name is given, is saved in the Secrets Manager and returned only as a name, to pass to send_to values as "secret:<name>" so you never see it.', ["label", "secret_name", "vendor", "owner"], { label: "Application ID", secret_name: "knack/app-id" }),
|
|
63
|
+
a("accounts", "account", "Sign in", "List the saved sign-ins: name, base URL, how it signs in (password, or via google/github) and the account, never a password; target filters. To record that a site was signed in to through a provider, give target (the site), method and fields {email}.", ["target", "method", "fields"], { target: "supabase" }),
|
|
64
|
+
// ── account_use: work ──
|
|
65
|
+
a("queue", "account", "Work", "The durable list of vendor tasks: record or update one with task (one per vendor and kind; status needs-human with a reason when only the user can finish it), or list them with tasks: true.", ["task", "tasks", "task_status", "task_reason"], { tasks: true }),
|
|
66
|
+
a("notes", "account", "Work", "Read (host alone) or add (note) what was learned on a site: the address that worked, the order of screens, what was missing. It is shown again whenever a page on that host is opened. Never a key or password.", ["host", "note"], { note: "The key page is under Settings > API." }),
|
|
67
|
+
a("recipe", "account", "Work", "Save the steps of a sign-up or key capture that worked (by control text, never secrets), list them, get one, or run one (replays it and stops for the user at a CAPTCHA, a code, a payment or a review page). recipe_op: save, get, run, list.", ["recipe_op", "host", "login_route", "steps", "key_page", "capture_hint"], { recipe_op: "list" })
|
|
68
|
+
];
|
|
69
|
+
var HELP = "help";
|
|
70
|
+
var actionsOf = (kind) => ACTIONS.filter((spec) => spec.kind === kind);
|
|
71
|
+
var specOf = (name) => ACTIONS.find((spec) => spec.name === name);
|
|
72
|
+
var toolNameOf = (kind) => kind === "browser" ? "browser_use" : "account_use";
|
|
73
|
+
var ALL_ACTION_NAMES = [...ACTIONS.map((spec) => spec.name), HELP];
|
|
74
|
+
function paramsOf(kind) {
|
|
75
|
+
const out = /* @__PURE__ */ new Set(["action", "tab", "topic"]);
|
|
76
|
+
for (const spec of actionsOf(kind)) for (const name of spec.params) out.add(name);
|
|
77
|
+
if (kind === "browser") out.add("with_screenshot");
|
|
78
|
+
return out;
|
|
79
|
+
}
|
|
80
|
+
function listing(kind) {
|
|
81
|
+
const groups = /* @__PURE__ */ new Map();
|
|
82
|
+
for (const spec of actionsOf(kind)) groups.set(spec.group, [...groups.get(spec.group) ?? [], spec.name]);
|
|
83
|
+
return [...groups].map(([group, names]) => `${group.toUpperCase()}: ${names.join(" \xB7 ")}`).join(". ");
|
|
84
|
+
}
|
|
85
|
+
function elsewhere(kind, action) {
|
|
86
|
+
const spec = specOf(action);
|
|
87
|
+
if (!spec || spec.kind === kind) return void 0;
|
|
88
|
+
return `${action} is an action of ${toolNameOf(spec.kind)}, not ${toolNameOf(kind)}. Call ${toolNameOf(spec.kind)} with the same arguments.`;
|
|
89
|
+
}
|
|
90
|
+
function usage(spec, describeParam) {
|
|
91
|
+
const lines = [`${spec.name} (${toolNameOf(spec.kind)}): ${spec.does}`];
|
|
92
|
+
if (spec.params.length) lines.push("Parameters:", ...spec.params.map((name) => ` ${name}: ${describeParam(name) ?? ""}`.trimEnd()));
|
|
93
|
+
lines.push(`Example: ${JSON.stringify(spec.example)}`);
|
|
94
|
+
return lines.join("\n");
|
|
95
|
+
}
|
|
96
|
+
function overview(kind, extra) {
|
|
97
|
+
const lines = actionsOf(kind).map((spec) => `${spec.name}: ${spec.does.split(/(?<=\.)\s/)[0]} e.g. ${JSON.stringify(spec.example)}`);
|
|
98
|
+
return [`${toolNameOf(kind)} actions:`, ...lines, "", "help with topic = an action name gives its parameters in full.", extra].filter((line) => line !== void 0).join("\n");
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export {
|
|
102
|
+
specOf,
|
|
103
|
+
toolNameOf,
|
|
104
|
+
ALL_ACTION_NAMES,
|
|
105
|
+
paramsOf,
|
|
106
|
+
listing,
|
|
107
|
+
elsewhere,
|
|
108
|
+
usage,
|
|
109
|
+
overview
|
|
110
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// src/harness/model-label.ts
|
|
5
|
+
var MODEL_OWNER_NAMES = {
|
|
6
|
+
claude: ["anthropic", "claude-code", "Claude Code"],
|
|
7
|
+
grok: ["xai", "Grok Build"],
|
|
8
|
+
gemini: ["google", "Gemini CLI"],
|
|
9
|
+
codex: ["openai", "Codex"],
|
|
10
|
+
opencode: ["OpenCode"],
|
|
11
|
+
copilot: ["github-copilot", "GitHub Copilot"],
|
|
12
|
+
aider: ["Aider"],
|
|
13
|
+
goose: ["Goose"],
|
|
14
|
+
amp: ["Amp"],
|
|
15
|
+
antigravity: ["agy", "Antigravity CLI"],
|
|
16
|
+
pi: ["Pi Coding Agent"],
|
|
17
|
+
droid: ["factory", "Factory Droid"],
|
|
18
|
+
kiro: ["kiro-cli", "Kiro CLI"],
|
|
19
|
+
qwen: ["Qwen Code"],
|
|
20
|
+
cline: ["Cline CLI"],
|
|
21
|
+
kilo: ["kilo-code", "Kilo Code CLI"],
|
|
22
|
+
cursor: ["cursor-agent", "Cursor Agent"],
|
|
23
|
+
hermes: ["nous", "Hermes"],
|
|
24
|
+
openclaw: ["OpenClaw"],
|
|
25
|
+
command: ["command-code", "cmdc", "Command Code"],
|
|
26
|
+
kimi: ["kimi-code", "Kimi CLI"],
|
|
27
|
+
auggie: ["augment", "Augment Auggie"],
|
|
28
|
+
vibe: ["mistral-vibe", "vibe-acp", "Mistral Vibe"],
|
|
29
|
+
openhands: ["OpenHands CLI"],
|
|
30
|
+
dcode: ["deepagents-code", "Deep Agents Code"],
|
|
31
|
+
devin: ["Devin CLI"],
|
|
32
|
+
junie: ["Junie CLI"],
|
|
33
|
+
mcode: ["minimax-code", "MiniMax Code"],
|
|
34
|
+
"clikcode-local": ["ClikCode Local"],
|
|
35
|
+
gateway: ["clikdeploy", "clikdeploy-gateway", "ClikDeploy Gateway"]
|
|
36
|
+
};
|
|
37
|
+
function bare(value) {
|
|
38
|
+
return value.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
39
|
+
}
|
|
40
|
+
var GROUPS = Object.entries(MODEL_OWNER_NAMES).map(([id, names]) => new Set([id, ...names].map(bare)));
|
|
41
|
+
var ROUTED_HARNESSES = /* @__PURE__ */ new Set(["opencode", "goose", "pi", "hermes", "openclaw", "kilo", "dcode", "mcode"]);
|
|
42
|
+
var ROUTED_NAMES = new Set([...ROUTED_HARNESSES].flatMap((id) => [id, ...MODEL_OWNER_NAMES[id] ?? []].map(bare)));
|
|
43
|
+
function routesModels(owners) {
|
|
44
|
+
return owners.some((owner) => owner && ROUTED_NAMES.has(bare(owner)));
|
|
45
|
+
}
|
|
46
|
+
function ownerNames(owners) {
|
|
47
|
+
const names = /* @__PURE__ */ new Set();
|
|
48
|
+
for (const owner of owners) {
|
|
49
|
+
const key = owner ? bare(owner) : "";
|
|
50
|
+
if (!key) continue;
|
|
51
|
+
names.add(key);
|
|
52
|
+
for (const group of GROUPS) if (group.has(key)) for (const name of group) names.add(name);
|
|
53
|
+
}
|
|
54
|
+
return names;
|
|
55
|
+
}
|
|
56
|
+
var BARE_TAG = /^(?:latest|free|beta|nightly|\d[\w.]*)$/i;
|
|
57
|
+
function modelLabel(model, ...owners) {
|
|
58
|
+
const label = ownerlessLabel(model, owners);
|
|
59
|
+
return label ? withoutFreeTag(label) : label;
|
|
60
|
+
}
|
|
61
|
+
function withoutFreeTag(name) {
|
|
62
|
+
const bare2 = name.replace(/(?:[-:_]free|\s*\(free\))$/i, "");
|
|
63
|
+
return bare2 || name;
|
|
64
|
+
}
|
|
65
|
+
function ownerlessLabel(model, owners) {
|
|
66
|
+
if (!model) return model ?? void 0;
|
|
67
|
+
const match = /^([^\s/:]+)([/:])(.+)$/.exec(model);
|
|
68
|
+
if (!match) return model;
|
|
69
|
+
const [, prefix, separator, rest] = match;
|
|
70
|
+
if (separator === ":" && (!routesModels(owners) || BARE_TAG.test(rest) || rest.startsWith("//"))) return model;
|
|
71
|
+
if (ownerNames(owners).has(bare(prefix))) return rest;
|
|
72
|
+
return separator === ":" ? `${prefix}/${rest}` : model;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export {
|
|
76
|
+
modelLabel,
|
|
77
|
+
withoutFreeTag
|
|
78
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
OutOfTime,
|
|
5
|
+
RECAPTCHA_PICTURE_ROUNDS,
|
|
6
|
+
RECAPTCHA_REFUSED,
|
|
7
|
+
budgetOf,
|
|
8
|
+
detectHumanCheck,
|
|
9
|
+
humanCheckAnswered,
|
|
10
|
+
isOutOfTime,
|
|
11
|
+
passHumanCheck,
|
|
12
|
+
pressHumanCheck,
|
|
13
|
+
settledPast,
|
|
14
|
+
solveHumanCheck
|
|
15
|
+
} from "./chunk-FT5TX7OX.js";
|
|
16
|
+
import "./chunk-7NMUTGOW.js";
|
|
17
|
+
import "./chunk-FFGU4GCC.js";
|
|
18
|
+
import "./chunk-O7BNJIXU.js";
|
|
19
|
+
import "./chunk-YMCH3L2S.js";
|
|
20
|
+
import "./chunk-5SM5UAWN.js";
|
|
21
|
+
import "./chunk-PAXYQZH7.js";
|
|
22
|
+
import "./chunk-4L2ZZM4Q.js";
|
|
23
|
+
import "./chunk-F6F47QAY.js";
|
|
24
|
+
import "./chunk-RDDWQBEM.js";
|
|
25
|
+
import "./chunk-MPAJ446F.js";
|
|
26
|
+
import "./chunk-CBANJFBO.js";
|
|
27
|
+
import "./chunk-PWXII6HF.js";
|
|
28
|
+
export {
|
|
29
|
+
OutOfTime,
|
|
30
|
+
RECAPTCHA_PICTURE_ROUNDS,
|
|
31
|
+
RECAPTCHA_REFUSED,
|
|
32
|
+
budgetOf,
|
|
33
|
+
detectHumanCheck,
|
|
34
|
+
humanCheckAnswered,
|
|
35
|
+
isOutOfTime,
|
|
36
|
+
passHumanCheck,
|
|
37
|
+
pressHumanCheck,
|
|
38
|
+
settledPast,
|
|
39
|
+
solveHumanCheck
|
|
40
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
quiet
|
|
5
|
+
} from "./chunk-RDDWQBEM.js";
|
|
6
|
+
|
|
7
|
+
// src/session/store/files.ts
|
|
8
|
+
import { randomBytes } from "node:crypto";
|
|
9
|
+
import { chmod, mkdir, open, rename, unlink } from "node:fs/promises";
|
|
10
|
+
import { basename, dirname, join } from "node:path";
|
|
11
|
+
var hardenedDirectories = /* @__PURE__ */ new Set();
|
|
12
|
+
async function ensurePrivateDirectory(directory) {
|
|
13
|
+
await mkdir(directory, { recursive: true, mode: 448 });
|
|
14
|
+
if (hardenedDirectories.has(directory)) return;
|
|
15
|
+
await chmod(directory, 448).catch(quiet("session/store/files"));
|
|
16
|
+
hardenedDirectories.add(directory);
|
|
17
|
+
}
|
|
18
|
+
async function atomicWriteFile(path, data, options = {}) {
|
|
19
|
+
const durable = options.durable !== false;
|
|
20
|
+
const kind = options.directory ?? "private";
|
|
21
|
+
const directory = dirname(path);
|
|
22
|
+
if (kind === "private") await ensurePrivateDirectory(directory);
|
|
23
|
+
else await mkdir(directory, { recursive: true, ...kind === "vendor" ? { mode: 448 } : {} });
|
|
24
|
+
const unique = `${process.pid}.${randomBytes(6).toString("hex")}.tmp`;
|
|
25
|
+
const temporary = kind === "private" ? `${path}.${unique}` : join(directory, `.${basename(path)}.${unique}`);
|
|
26
|
+
let renamed = false;
|
|
27
|
+
try {
|
|
28
|
+
const handle = await open(temporary, "wx", options.mode ?? (kind === "user" ? 420 : 384));
|
|
29
|
+
try {
|
|
30
|
+
await handle.writeFile(data);
|
|
31
|
+
if (options.mode !== void 0) await handle.chmod(options.mode);
|
|
32
|
+
if (durable) await handle.sync();
|
|
33
|
+
} finally {
|
|
34
|
+
await handle.close();
|
|
35
|
+
}
|
|
36
|
+
await rename(temporary, path);
|
|
37
|
+
renamed = true;
|
|
38
|
+
} finally {
|
|
39
|
+
if (!renamed) await unlink(temporary).catch(quiet("session/store/files"));
|
|
40
|
+
}
|
|
41
|
+
if (durable) await syncDirectory(directory);
|
|
42
|
+
}
|
|
43
|
+
async function syncDirectory(directory) {
|
|
44
|
+
if (process.platform === "win32") return;
|
|
45
|
+
const handle = await open(directory, "r").catch(quiet("session/store/files"));
|
|
46
|
+
if (!handle) return;
|
|
47
|
+
try {
|
|
48
|
+
await handle.sync();
|
|
49
|
+
} catch {
|
|
50
|
+
} finally {
|
|
51
|
+
await handle.close();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
ensurePrivateDirectory,
|
|
57
|
+
atomicWriteFile
|
|
58
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
carriedHandoffModel,
|
|
5
|
+
carriedHandoffSettings,
|
|
6
|
+
carriedPermissionMode,
|
|
7
|
+
permissionLevel,
|
|
8
|
+
synchronizeNativeTranscript
|
|
9
|
+
} from "./chunk-PUOVIFHW.js";
|
|
10
|
+
import "./chunk-M3FO5UMK.js";
|
|
11
|
+
import "./chunk-CERF3RIB.js";
|
|
12
|
+
import "./chunk-CVFVFRGN.js";
|
|
13
|
+
import "./chunk-ESF3DIZY.js";
|
|
14
|
+
import "./chunk-R7QN6ONS.js";
|
|
15
|
+
import "./chunk-ZGX3ERAT.js";
|
|
16
|
+
import "./chunk-FF7ZVYJF.js";
|
|
17
|
+
import "./chunk-IMLTL2MY.js";
|
|
18
|
+
import "./chunk-BUOPJQP5.js";
|
|
19
|
+
import "./chunk-3B2CHX7M.js";
|
|
20
|
+
import "./chunk-RVUOIJXN.js";
|
|
21
|
+
import "./chunk-QUS4ER2W.js";
|
|
22
|
+
import "./chunk-DQYVQ2N7.js";
|
|
23
|
+
import "./chunk-KYUHIFP3.js";
|
|
24
|
+
import "./chunk-RSZGEL5U.js";
|
|
25
|
+
import "./chunk-DF35KMXM.js";
|
|
26
|
+
import "./chunk-ZT7B4H2V.js";
|
|
27
|
+
import "./chunk-OL4JBD3J.js";
|
|
28
|
+
import "./chunk-IGZ6C2MC.js";
|
|
29
|
+
import "./chunk-4NN3XQQT.js";
|
|
30
|
+
import "./chunk-4AQ5NINV.js";
|
|
31
|
+
import "./chunk-WPB5WEZJ.js";
|
|
32
|
+
import "./chunk-GYMAI5NY.js";
|
|
33
|
+
import "./chunk-CQ7J6UQ7.js";
|
|
34
|
+
import "./chunk-XKW5NDMR.js";
|
|
35
|
+
import "./chunk-W3YYPBEA.js";
|
|
36
|
+
import "./chunk-XIBYREEY.js";
|
|
37
|
+
import "./chunk-EE4B6A7W.js";
|
|
38
|
+
import "./chunk-WZYVLUVQ.js";
|
|
39
|
+
import "./chunk-O3EW7LAY.js";
|
|
40
|
+
import "./chunk-KHW6TX6I.js";
|
|
41
|
+
import "./chunk-YMCH3L2S.js";
|
|
42
|
+
import "./chunk-4QZEZME7.js";
|
|
43
|
+
import "./chunk-LVRRWP4W.js";
|
|
44
|
+
import "./chunk-G3QP67Z7.js";
|
|
45
|
+
import "./chunk-4L2ZZM4Q.js";
|
|
46
|
+
import "./chunk-F6F47QAY.js";
|
|
47
|
+
import "./chunk-RDDWQBEM.js";
|
|
48
|
+
import "./chunk-MPAJ446F.js";
|
|
49
|
+
import "./chunk-CBANJFBO.js";
|
|
50
|
+
import "./chunk-PWXII6HF.js";
|
|
51
|
+
export {
|
|
52
|
+
carriedHandoffModel,
|
|
53
|
+
carriedHandoffSettings,
|
|
54
|
+
carriedPermissionMode,
|
|
55
|
+
permissionLevel,
|
|
56
|
+
synchronizeNativeTranscript
|
|
57
|
+
};
|