clikcode 1.0.3 → 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 +498 -112593
- package/dist/computer-tools.js +36642 -21258
- 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,351 @@
|
|
|
1
|
+
import { createRequire as __clikcodeCreateRequire } from 'node:module';
|
|
2
|
+
const require = __clikcodeCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
McpClient
|
|
5
|
+
} from "./chunk-74WNMLMS.js";
|
|
6
|
+
import {
|
|
7
|
+
hideKeyLikeText
|
|
8
|
+
} from "./chunk-MCBRVPA7.js";
|
|
9
|
+
import {
|
|
10
|
+
sleep
|
|
11
|
+
} from "./chunk-YMCH3L2S.js";
|
|
12
|
+
import {
|
|
13
|
+
redactForLog
|
|
14
|
+
} from "./chunk-RDDWQBEM.js";
|
|
15
|
+
import {
|
|
16
|
+
sharedState
|
|
17
|
+
} from "./chunk-CBANJFBO.js";
|
|
18
|
+
|
|
19
|
+
// src/agent/computer/driver.ts
|
|
20
|
+
import { execFile as execFile2 } from "node:child_process";
|
|
21
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
22
|
+
import { homedir as homedir2 } from "node:os";
|
|
23
|
+
import { delimiter, join as join2 } from "node:path";
|
|
24
|
+
|
|
25
|
+
// src/agent/computer/driver-results.ts
|
|
26
|
+
var RUNNING_LIMIT = 60;
|
|
27
|
+
var INSTALLED_LIMIT = 40;
|
|
28
|
+
var visibleWindows = (app) => (app.windows ?? []).filter((window) => Number(window.width) > 0 && Number(window.height) > 0);
|
|
29
|
+
function summarizeApps(result, query) {
|
|
30
|
+
const structured = result.structuredContent;
|
|
31
|
+
if (!structured || !Array.isArray(structured.apps)) return void 0;
|
|
32
|
+
const apps = structured.apps.filter((app) => app && typeof app === "object" && typeof app.name === "string");
|
|
33
|
+
const needle = query?.trim().toLowerCase();
|
|
34
|
+
const matches = (app) => !needle || [app.name, app.bundle_id, ...(app.windows ?? []).map((window) => window.title)].some((part) => typeof part === "string" && part.toLowerCase().includes(needle));
|
|
35
|
+
const seen = /* @__PURE__ */ new Set();
|
|
36
|
+
const windowless = (app) => app.windows === void 0 && Boolean(app.kind);
|
|
37
|
+
const running = apps.filter((app) => app.running === true && (visibleWindows(app).length > 0 || windowless(app)) && matches(app) && (app.pid === void 0 || !seen.has(app.pid) && seen.add(app.pid)));
|
|
38
|
+
const installed = apps.filter((app) => app.running !== true && Boolean(app.kind) && Boolean(needle) && matches(app));
|
|
39
|
+
const hiddenInstalled = apps.filter((app) => app.running !== true && Boolean(app.kind)).length;
|
|
40
|
+
const lines = [];
|
|
41
|
+
for (const app of running.slice(0, RUNNING_LIMIT)) {
|
|
42
|
+
const windows = windowless(app) ? "use the windows action for its window ids" : visibleWindows(app).slice(0, 4).map((window) => `window ${String(window.window_id)} ${JSON.stringify(String(window.title ?? "").slice(0, 80))}`).join(", ");
|
|
43
|
+
lines.push(`- ${String(app.name)} (pid ${String(app.pid)})${app.bundle_id ? ` [${String(app.bundle_id)}]` : ""}: ${windows}`);
|
|
44
|
+
}
|
|
45
|
+
if (running.length > RUNNING_LIMIT) lines.push(`... and ${running.length - RUNNING_LIMIT} more running apps; narrow with query.`);
|
|
46
|
+
const installedLines = installed.slice(0, INSTALLED_LIMIT).map((app) => `- ${String(app.name)}${app.bundle_id ? ` [${String(app.bundle_id)}]` : ""} (installed, not running)`);
|
|
47
|
+
const head = `${running.length} running app(s) with a window${needle ? ` matching "${query}"` : ""}.`;
|
|
48
|
+
const tail = !needle && hiddenInstalled ? `${hiddenInstalled} installed apps are not listed; pass query to search them and launch one with launch_app.` : installedLines.length ? "Installed apps (launch with launch_app, app = the name):" : "";
|
|
49
|
+
return [head, ...lines, ...installedLines.length ? [tail, ...installedLines] : tail ? [tail] : []].join("\n");
|
|
50
|
+
}
|
|
51
|
+
var CLIPBOARD_CAP = 8e3;
|
|
52
|
+
var CLIPBOARD_NOTE = "Clipboard text was read on request; anything shaped like a password, key or token is hidden.";
|
|
53
|
+
function scrubClipboard(output) {
|
|
54
|
+
const hidden = hideKeyLikeText(redactForLog(output)).text;
|
|
55
|
+
const clipped = hidden.length > CLIPBOARD_CAP ? `${hidden.slice(0, CLIPBOARD_CAP)}
|
|
56
|
+
... (clipboard text cut at ${CLIPBOARD_CAP} characters)` : hidden;
|
|
57
|
+
return `${clipped}
|
|
58
|
+
|
|
59
|
+
${CLIPBOARD_NOTE}`;
|
|
60
|
+
}
|
|
61
|
+
function clipboardReply(result, summary) {
|
|
62
|
+
const text = result.structuredContent?.text;
|
|
63
|
+
const body = typeof text === "string" ? text.length ? `Clipboard text:
|
|
64
|
+
${text}` : "The clipboard holds no text." : "The clipboard holds no text.";
|
|
65
|
+
return scrubClipboard(`${summary}
|
|
66
|
+
${body}`);
|
|
67
|
+
}
|
|
68
|
+
var BACKGROUND_UNAVAILABLE = /Background delivery is not available|background_unavailable/i;
|
|
69
|
+
var FOREGROUND_UNAVAILABLE = /foreground[^.\n]*(not available|unavailable|refused|disabled)|(not available|unavailable|refused|disabled)[^.\n]*foreground|activation[^.\n]*(unavailable|not available)/i;
|
|
70
|
+
var backgroundOnlyNotice = 'This desktop cannot send that key, hotkey, scroll or click to a window without bringing the window to the front. Either act on elements (observe, then click the button the key would press, or type into the field by its element_token), or retry the same action with delivery "foreground", which briefly takes focus from whatever the user is doing and puts it back; use that only when the user can spare the focus.';
|
|
71
|
+
var foregroundUnavailableNotice = "Foreground delivery is not available on this desktop (on GNOME 50 and newer Wayland, Cua cannot activate other windows). Act on elements instead: observe, then click the button the key would press, or type into the field by its element_token.";
|
|
72
|
+
var brief = (text) => text.replace(/\s+/g, " ").trim().slice(0, 240);
|
|
73
|
+
function backgroundOnly(result, askedForeground = false) {
|
|
74
|
+
if (!result.isError) return result;
|
|
75
|
+
if (FOREGROUND_UNAVAILABLE.test(result.output) && !/Retry this action with delivery_mode/i.test(result.output)) return { ...result, output: `${foregroundUnavailableNotice}
|
|
76
|
+
(Cua said: ${brief(result.output)})` };
|
|
77
|
+
if (BACKGROUND_UNAVAILABLE.test(result.output)) return { ...result, output: askedForeground ? foregroundUnavailableNotice : backgroundOnlyNotice };
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
var macosAccessibilityNotice = "cua-driver does not have the macOS Accessibility permission, so it can neither read nor control any window. Open System Settings > Privacy & Security > Accessibility and turn on CuaDriver (run `cua-driver permissions grant` to be prompted), then try again.";
|
|
81
|
+
var macosScreenRecordingNotice = "cua-driver does not have the macOS Screen Recording permission, so screenshots and pixel clicks are unavailable (the accessibility tree still works: use element_token actions). Open System Settings > Privacy & Security > Screen & System Audio Recording and turn on CuaDriver (run `cua-driver permissions grant`), then try again.";
|
|
82
|
+
var macosPermissionsPendingNotice = "cua-driver has not been given its macOS permissions yet (Accessibility and Screen Recording), so it sees no windows. Run `cua-driver permissions grant` and turn on CuaDriver in the System Settings pages it opens, then try again.";
|
|
83
|
+
var noWindowFrameNotice = "x and y in a window need a screenshot of it first: observe that window (pid and window_id) again and take x, y from its picture. When this model cannot see images, act on an element_token instead (click, double_click, right_click and type take one); drag has only a pixel form.";
|
|
84
|
+
var windowsElevatedNotice = 'Windows refused the input: the target window most likely runs as administrator (elevated), and a program that is not elevated, as ClikCode is, cannot drive it. Ask the user to close it and open it again without "Run as administrator", or to start ClikCode elevated.';
|
|
85
|
+
var windowsSessionNotice = "cua-driver is running in Windows session 0 (a service or SSH session) where there is no desktop to read. Start it from the user's signed-in desktop session (`schtasks /Run /TN cua-driver-serve`), then try again.";
|
|
86
|
+
var noObservationNotice = "There is no current observation of this window to take that element from. Observe it first (action observe with this pid and window_id), then pass an element_token from that output.";
|
|
87
|
+
var staleTokenNotice = "That element_token is from an older observation of this window. Observe the window again (action observe with this pid and window_id) and use an element_token from the new output.";
|
|
88
|
+
function observedSnapshot(result) {
|
|
89
|
+
const structured = result.structuredContent?.snapshot_id;
|
|
90
|
+
if (typeof structured === "string" && SNAPSHOT_ID.test(structured)) return structured;
|
|
91
|
+
const text = (result.content ?? []).find((part) => part.type === "text" && typeof part.text === "string")?.text ?? "";
|
|
92
|
+
const printed = /^[^\n]*\bsnapshot_id=(\S+)/.exec(text)?.[1];
|
|
93
|
+
return printed && SNAPSHOT_ID.test(printed) ? printed : void 0;
|
|
94
|
+
}
|
|
95
|
+
var SNAPSHOT_ID = /^s[0-9a-f]{8}$/;
|
|
96
|
+
function unaddressableObservation(result) {
|
|
97
|
+
const structured = result.structuredContent;
|
|
98
|
+
return structured?.degraded === true && /identity_unproven|application-scoped/i.test(String(structured.degraded_reason ?? "")) && !observedSnapshot(result);
|
|
99
|
+
}
|
|
100
|
+
var noElementTokensNotice = "No element_token works in this window right now: Cua could not tell its elements from those of the app's other windows (on Wayland this happens while the app has more than one window open), so it read the whole app and the rows are numbered for reading only. To act here, observe with no pid for a screenshot of the whole desktop and click, type or scroll by its x and y with no pid (that needs a model that sees images, and the window on screen). The rows become usable again once the app has a single window: observe the window again then.";
|
|
101
|
+
function driverElementToken(token, snapshot) {
|
|
102
|
+
const row = /^\s*\[?(\d+)\]?\s*$/.exec(token)?.[1];
|
|
103
|
+
return row !== void 0 && snapshot ? `${snapshot}:${row}` : token;
|
|
104
|
+
}
|
|
105
|
+
function withTokenLine(output, snapshot) {
|
|
106
|
+
if (!snapshot || output.includes(`${snapshot}:`)) return output;
|
|
107
|
+
const [head, ...rest] = output.split("\n");
|
|
108
|
+
return [head, `element_token for row [N] = ${snapshot}:N (row [1] is "${snapshot}:1")`, ...rest].join("\n");
|
|
109
|
+
}
|
|
110
|
+
var DRIVER_WORDS = [
|
|
111
|
+
[/Tree truncated at max_elements=\d+/g, "Tree truncated"],
|
|
112
|
+
[/Pass a larger `?max_elements`?,? or (narrow with )?`?query`? ?\/ ?`?max_depth`?( to reach the rest)?/gi, "Observe again with a query that matches what you need"],
|
|
113
|
+
[/re-read with a larger max_elements \(or a query that matches the target\)/gi, "observe again with a query that matches the target"],
|
|
114
|
+
[/\bget_window_state\(([^)]*)\)/g, "observe with $1"],
|
|
115
|
+
[/\bcall get_window_state again\b/gi, "observe the window again"],
|
|
116
|
+
[/\bget_window_state\b/g, "observe (with pid and window_id)"],
|
|
117
|
+
[/\bget_desktop_state\b/g, "observe (with no pid)"],
|
|
118
|
+
[/\bclick\/type_text\b/g, "click and type"],
|
|
119
|
+
[/\btype_text(_chars)?\b/g, "type"],
|
|
120
|
+
[/\bpress_key\b/g, "key"],
|
|
121
|
+
[/\blist_windows\b/g, "windows"],
|
|
122
|
+
[/\blist_apps\b/g, "apps"],
|
|
123
|
+
[/\bget_screen_size\b/g, "screen_size"],
|
|
124
|
+
[/\bdelivery_mode\b/g, "delivery"]
|
|
125
|
+
];
|
|
126
|
+
function inToolWords(output) {
|
|
127
|
+
return output.split("\n").map((line) => /^\s*(- |window_id=\d)/.test(line) ? line : DRIVER_WORDS.reduce((text, [from, to]) => text.replace(from, to), line)).join("\n");
|
|
128
|
+
}
|
|
129
|
+
function friendlyDriverError(result, platform = process.platform) {
|
|
130
|
+
if (!result.isError) return result;
|
|
131
|
+
const said = result.output;
|
|
132
|
+
const withCause = (notice2) => ({ ...result, output: `${notice2}
|
|
133
|
+
(Cua said: ${brief(said)})` });
|
|
134
|
+
if (platform === "darwin") {
|
|
135
|
+
if (/Accessibility permission (is )?not granted|accessibility[^.\n]*not (been )?(granted|trusted|enabled)/i.test(said)) return withCause(macosAccessibilityNotice);
|
|
136
|
+
if (/Screen Recording permission (is )?not granted|screen recording[^.\n]*not (been )?(granted|enabled)/i.test(said)) return withCause(macosScreenRecordingNotice);
|
|
137
|
+
if (/permissions_pending|permission[^.\n]*still pending/i.test(said)) return withCause(macosPermissionsPendingNotice);
|
|
138
|
+
}
|
|
139
|
+
if (/No screenshot frame for window/i.test(said)) return { ...result, output: noWindowFrameNotice };
|
|
140
|
+
if (/is a row number, (and pid \d+ has no current snapshot|not a token)/i.test(said)) return { ...result, output: noObservationNotice };
|
|
141
|
+
if (/stale_element_token|element_token is stale/i.test(said)) return { ...result, output: staleTokenNotice };
|
|
142
|
+
const beyond = /element_token \S*?(\d+) is out of range: snapshot \S+ has rows \[0\] to \[(\d+)\]/i.exec(said);
|
|
143
|
+
if (beyond) return { ...result, output: `Row ${beyond[1]} is not in the latest observation of this window, which printed rows [0] to [${beyond[2]}]. Use a row it printed, or observe the window again with a query that matches the target.` };
|
|
144
|
+
if (platform === "win32") {
|
|
145
|
+
if (/session ?0|SessionId[: ]+0/i.test(said)) return withCause(windowsSessionNotice);
|
|
146
|
+
if (/access is denied|UIPI|elevated|integrity level|0x80070005/i.test(said)) return withCause(windowsElevatedNotice);
|
|
147
|
+
}
|
|
148
|
+
return result;
|
|
149
|
+
}
|
|
150
|
+
function permissionsNotice(statusJson, platform = process.platform) {
|
|
151
|
+
if (platform !== "darwin") return void 0;
|
|
152
|
+
let status;
|
|
153
|
+
try {
|
|
154
|
+
status = JSON.parse(statusJson);
|
|
155
|
+
} catch {
|
|
156
|
+
return void 0;
|
|
157
|
+
}
|
|
158
|
+
if (status.status === "unknown" && status.accessibility === void 0) return macosPermissionsPendingNotice;
|
|
159
|
+
if (status.accessibility === false) return macosAccessibilityNotice;
|
|
160
|
+
if (status.screen_recording === false) return macosScreenRecordingNotice;
|
|
161
|
+
return void 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// src/agent/computer/driver-macos-session.ts
|
|
165
|
+
import { execFile } from "node:child_process";
|
|
166
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
167
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
168
|
+
import { homedir } from "node:os";
|
|
169
|
+
import { dirname, join } from "node:path";
|
|
170
|
+
var DESKTOP_SERVICE_LABEL = "com.clikcode.cua-driver";
|
|
171
|
+
var run = (command, args, timeoutMs = 1e4) => new Promise((resolve) => execFile(command, args, { timeout: timeoutMs }, (error, stdout) => resolve({ ok: !error, stdout: String(stdout ?? "") })));
|
|
172
|
+
function desktopServiceStep(state2) {
|
|
173
|
+
if (state2.platform !== "darwin" || state2.session === "Aqua" || !state2.desktopDomain) return "none";
|
|
174
|
+
if (state2.running) return "none";
|
|
175
|
+
return state2.loaded ? "kickstart" : "bootstrap";
|
|
176
|
+
}
|
|
177
|
+
var xml = (text) => text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
178
|
+
function desktopServicePlist(binary) {
|
|
179
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
180
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
181
|
+
<plist version="1.0"><dict>
|
|
182
|
+
<key>Label</key><string>${DESKTOP_SERVICE_LABEL}</string>
|
|
183
|
+
<key>ProgramArguments</key><array><string>${xml(binary)}</string><string>serve</string></array>
|
|
184
|
+
<key>LimitLoadToSessionType</key><string>Aqua</string>
|
|
185
|
+
<key>ProcessType</key><string>Interactive</string>
|
|
186
|
+
<key>RunAtLoad</key><true/>
|
|
187
|
+
</dict></plist>
|
|
188
|
+
`;
|
|
189
|
+
}
|
|
190
|
+
var daemonSocket = () => join(homedir(), "Library", "Caches", "cua-driver", "cua-driver.sock");
|
|
191
|
+
async function ensureDesktopDriverService(binary, platform = process.platform) {
|
|
192
|
+
if (platform !== "darwin" || !binary.startsWith("/")) return;
|
|
193
|
+
try {
|
|
194
|
+
const session = (await run("launchctl", ["managername"])).stdout.trim();
|
|
195
|
+
if (session === "Aqua") return;
|
|
196
|
+
const uid = process.getuid?.();
|
|
197
|
+
if (uid === void 0) return;
|
|
198
|
+
const domain = `gui/${uid}`;
|
|
199
|
+
const desktopDomain = (await run("launchctl", ["print", domain])).ok;
|
|
200
|
+
const job = await run("launchctl", ["print", `${domain}/${DESKTOP_SERVICE_LABEL}`]);
|
|
201
|
+
const step = desktopServiceStep({ platform, session, desktopDomain, loaded: job.ok, running: /\bstate = running\b/.test(job.stdout) });
|
|
202
|
+
if (step === "none") return;
|
|
203
|
+
const program = realpathSync(binary);
|
|
204
|
+
await run(program, ["stop"], 15e3);
|
|
205
|
+
if (step === "kickstart") await run("launchctl", ["kickstart", `${domain}/${DESKTOP_SERVICE_LABEL}`]);
|
|
206
|
+
else {
|
|
207
|
+
const plist = join(homedir(), ".clikcode", "computer", `${DESKTOP_SERVICE_LABEL}.plist`);
|
|
208
|
+
await mkdir(dirname(plist), { recursive: true, mode: 448 });
|
|
209
|
+
await writeFile(plist, desktopServicePlist(program), { mode: 384 });
|
|
210
|
+
await run("launchctl", ["bootstrap", domain, plist]);
|
|
211
|
+
}
|
|
212
|
+
for (let waited = 0; waited < 8e3 && !existsSync(daemonSocket()); waited += 250) await sleep(250);
|
|
213
|
+
} catch {
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// src/agent/computer/driver.ts
|
|
218
|
+
var state = sharedState("computer-driver", () => ({
|
|
219
|
+
pending: void 0,
|
|
220
|
+
connected: void 0,
|
|
221
|
+
fields: void 0,
|
|
222
|
+
/** What the latest observe of each window gave, by `pid:window_id`: its snapshot, or none when Cua issued no tokens
|
|
223
|
+
* for it. It dies with the driver process. */
|
|
224
|
+
observed: /* @__PURE__ */ new Map(),
|
|
225
|
+
/** One process-exit hook kills whichever driver is connected then: one per restart piled up listeners (and held old clients). */
|
|
226
|
+
exitHook: false
|
|
227
|
+
}));
|
|
228
|
+
function driverHome(env = process.env, home = homedir2()) {
|
|
229
|
+
return env.CUA_DRIVER_RS_HOME?.trim() || join2(home, ".cua-driver");
|
|
230
|
+
}
|
|
231
|
+
function findDriverBinary(env = process.env, platform = process.platform, exists = existsSync2) {
|
|
232
|
+
const exe = platform === "win32" ? "cua-driver.exe" : "cua-driver";
|
|
233
|
+
for (const dir of (env.PATH ?? env.Path ?? "").split(platform === "win32" ? ";" : delimiter)) {
|
|
234
|
+
if (dir && exists(join2(dir, exe))) return join2(dir, exe);
|
|
235
|
+
}
|
|
236
|
+
const candidates = [join2(driverHome(env), "packages", "current", exe)];
|
|
237
|
+
if (platform === "darwin") candidates.push("/Applications/CuaDriver.app/Contents/MacOS/cua-driver");
|
|
238
|
+
return candidates.find((path) => exists(path));
|
|
239
|
+
}
|
|
240
|
+
var driverCommand = () => findDriverBinary() ?? "cua-driver";
|
|
241
|
+
function driverMcpArgs(platform = process.platform) {
|
|
242
|
+
return platform === "darwin" ? ["mcp"] : ["mcp", "--direct"];
|
|
243
|
+
}
|
|
244
|
+
function start() {
|
|
245
|
+
if (state.connected && !state.connected.closed) return Promise.resolve(state.connected);
|
|
246
|
+
if (state.pending) return state.pending;
|
|
247
|
+
const command = driverCommand();
|
|
248
|
+
state.pending = ensureDesktopDriverService(command).then(() => McpClient.connect(
|
|
249
|
+
{ name: "clikcode-computer", transport: "stdio", command, args: driverMcpArgs(), env: driverEnv() },
|
|
250
|
+
{ timeoutMs: 15e3 }
|
|
251
|
+
)).then((client) => {
|
|
252
|
+
state.connected = client;
|
|
253
|
+
state.fields = void 0;
|
|
254
|
+
state.observed.clear();
|
|
255
|
+
if (!state.exitHook) {
|
|
256
|
+
state.exitHook = true;
|
|
257
|
+
process.once("exit", () => state.connected?.killNow());
|
|
258
|
+
}
|
|
259
|
+
return client;
|
|
260
|
+
}).finally(() => {
|
|
261
|
+
state.pending = void 0;
|
|
262
|
+
});
|
|
263
|
+
return state.pending;
|
|
264
|
+
}
|
|
265
|
+
var windowKey = (pid, windowId) => `${pid}:${windowId}`;
|
|
266
|
+
function rememberObservation(pid, windowId, observation) {
|
|
267
|
+
state.observed.set(windowKey(pid, windowId), observation);
|
|
268
|
+
}
|
|
269
|
+
function latestObservation(pid, windowId) {
|
|
270
|
+
return state.connected && !state.connected.closed ? state.observed.get(windowKey(pid, windowId)) : void 0;
|
|
271
|
+
}
|
|
272
|
+
function waylandSession(env = process.env, platform = process.platform) {
|
|
273
|
+
return platform === "linux" && (env.XDG_SESSION_TYPE === "wayland" || Boolean(env.WAYLAND_DISPLAY));
|
|
274
|
+
}
|
|
275
|
+
function driverEnv(env = process.env, platform = process.platform) {
|
|
276
|
+
return waylandSession(env, platform) ? { CUA_DRIVER_RS_ENABLE_WAYLAND: "1" } : {};
|
|
277
|
+
}
|
|
278
|
+
var WAYLAND_DRIVER_VERSION = "0.38.0";
|
|
279
|
+
var newer = (version, floor) => {
|
|
280
|
+
const a = version.split(".").map(Number), b = floor.split(".").map(Number);
|
|
281
|
+
for (let i = 0; i < 3; i++) if ((a[i] ?? 0) !== (b[i] ?? 0)) return (a[i] ?? 0) > (b[i] ?? 0);
|
|
282
|
+
return true;
|
|
283
|
+
};
|
|
284
|
+
function driverVersionNotice(versionOutput, wayland = waylandSession()) {
|
|
285
|
+
const version = versionOutput.match(/(\d+\.\d+\.\d+)/)?.[1];
|
|
286
|
+
if (!wayland || !version || newer(version, WAYLAND_DRIVER_VERSION)) return void 0;
|
|
287
|
+
return `cua-driver ${version} cannot see native Wayland windows; ${WAYLAND_DRIVER_VERSION} or newer can. Update it with: clikcode computer driver update`;
|
|
288
|
+
}
|
|
289
|
+
var notice;
|
|
290
|
+
function driverNotice() {
|
|
291
|
+
notice ??= new Promise((resolve) => execFile2(driverCommand(), ["--version"], { timeout: 1e4 }, (error, stdout) => resolve(error ? void 0 : driverVersionNotice(stdout))));
|
|
292
|
+
return notice;
|
|
293
|
+
}
|
|
294
|
+
var permissions;
|
|
295
|
+
function driverPermissionNotice() {
|
|
296
|
+
if (process.platform !== "darwin") return Promise.resolve(void 0);
|
|
297
|
+
if (!permissions || Date.now() - permissions.at > 6e4) {
|
|
298
|
+
permissions = { at: Date.now(), notice: new Promise((resolve) => execFile2(driverCommand(), ["permissions", "status", "--json"], { timeout: 1e4 }, (_error, stdout) => resolve(permissionsNotice(stdout)))) };
|
|
299
|
+
}
|
|
300
|
+
return permissions.notice;
|
|
301
|
+
}
|
|
302
|
+
var DRIVER_MISSING = "Desktop control needs cua-driver, which is not installed on this computer. Install it with this one command: clikcode computer driver install (browser pages work without it through browser_use).";
|
|
303
|
+
async function callComputerDriver(tool, args, signal) {
|
|
304
|
+
let client;
|
|
305
|
+
try {
|
|
306
|
+
client = await start();
|
|
307
|
+
} catch (error) {
|
|
308
|
+
if (error?.code === "ENOENT" || /ENOENT|not found/i.test(error instanceof Error ? error.message : "")) throw new Error(DRIVER_MISSING);
|
|
309
|
+
throw error;
|
|
310
|
+
}
|
|
311
|
+
return client.callTool(tool, args, { timeoutMs: 45e3, signal });
|
|
312
|
+
}
|
|
313
|
+
async function driverSupports(tool, field) {
|
|
314
|
+
try {
|
|
315
|
+
const client = await start();
|
|
316
|
+
if (!state.fields) {
|
|
317
|
+
const tools = await client.listTools(15e3);
|
|
318
|
+
state.fields = new Map(tools.map((info) => {
|
|
319
|
+
const properties = info.inputSchema?.properties;
|
|
320
|
+
return [info.name, new Set(Object.keys(properties ?? {}))];
|
|
321
|
+
}));
|
|
322
|
+
}
|
|
323
|
+
return state.fields.get(tool)?.has(field) === true;
|
|
324
|
+
} catch {
|
|
325
|
+
return false;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export {
|
|
330
|
+
summarizeApps,
|
|
331
|
+
clipboardReply,
|
|
332
|
+
backgroundOnly,
|
|
333
|
+
observedSnapshot,
|
|
334
|
+
unaddressableObservation,
|
|
335
|
+
noElementTokensNotice,
|
|
336
|
+
driverElementToken,
|
|
337
|
+
withTokenLine,
|
|
338
|
+
inToolWords,
|
|
339
|
+
friendlyDriverError,
|
|
340
|
+
driverHome,
|
|
341
|
+
findDriverBinary,
|
|
342
|
+
rememberObservation,
|
|
343
|
+
latestObservation,
|
|
344
|
+
waylandSession,
|
|
345
|
+
WAYLAND_DRIVER_VERSION,
|
|
346
|
+
driverVersionNotice,
|
|
347
|
+
driverNotice,
|
|
348
|
+
driverPermissionNotice,
|
|
349
|
+
callComputerDriver,
|
|
350
|
+
driverSupports
|
|
351
|
+
};
|