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.
Files changed (323) hide show
  1. package/README.md +25 -14
  2. package/dist/chunk-23TDEBGZ.js +71 -0
  3. package/dist/chunk-25T3GVS7.js +425 -0
  4. package/dist/chunk-2BBELGHY.js +11 -0
  5. package/dist/chunk-2EOL5PZL.js +208 -0
  6. package/dist/chunk-2GAB36IE.js +26 -0
  7. package/dist/chunk-2OLS7V66.js +2440 -0
  8. package/dist/chunk-2QFO2URB.js +179 -0
  9. package/dist/chunk-2QWPQRSU.js +254 -0
  10. package/dist/chunk-2YPAPAR3.js +184 -0
  11. package/dist/chunk-2ZAG5372.js +33 -0
  12. package/dist/chunk-32IKAIZC.js +12507 -0
  13. package/dist/chunk-34AZEGYW.js +95 -0
  14. package/dist/chunk-34JQYQCA.js +175 -0
  15. package/dist/chunk-34ZISPAO.js +67 -0
  16. package/dist/chunk-3AAAARE6.js +46 -0
  17. package/dist/chunk-3AJ6Q3OY.js +510 -0
  18. package/dist/chunk-3B2CHX7M.js +884 -0
  19. package/dist/chunk-3BUFORRX.js +59 -0
  20. package/dist/chunk-3QLHYYFK.js +30 -0
  21. package/dist/chunk-3RXBMYKZ.js +140 -0
  22. package/dist/chunk-3TFNIJWS.js +52 -0
  23. package/dist/chunk-3W3IPDFP.js +119 -0
  24. package/dist/chunk-3WMS7SEE.js +417 -0
  25. package/dist/chunk-435ZNSZ3.js +23 -0
  26. package/dist/chunk-4AQ5NINV.js +39 -0
  27. package/dist/chunk-4GVEJ5FK.js +168 -0
  28. package/dist/chunk-4GXAO3UY.js +262 -0
  29. package/dist/chunk-4L2ZZM4Q.js +332 -0
  30. package/dist/chunk-4LPDG57B.js +17 -0
  31. package/dist/chunk-4NN3XQQT.js +223 -0
  32. package/dist/chunk-4QZEZME7.js +54 -0
  33. package/dist/chunk-4R6CSC3S.js +38 -0
  34. package/dist/chunk-4RHXTL3W.js +514 -0
  35. package/dist/chunk-4SJMPTVQ.js +18 -0
  36. package/dist/chunk-4VY7G6TX.js +114 -0
  37. package/dist/chunk-5642PBF7.js +124 -0
  38. package/dist/chunk-5B6TVO4A.js +33 -0
  39. package/dist/chunk-5BJLDUPL.js +62 -0
  40. package/dist/chunk-5HMFFJWU.js +19 -0
  41. package/dist/chunk-5IKLK33T.js +69 -0
  42. package/dist/chunk-5NQ5FFMX.js +44 -0
  43. package/dist/chunk-5QNNW5L6.js +176 -0
  44. package/dist/chunk-5SM5UAWN.js +239 -0
  45. package/dist/chunk-5WYJTA6O.js +74 -0
  46. package/dist/chunk-5ZSR2Y5T.js +227 -0
  47. package/dist/chunk-5ZWUM5GH.js +39 -0
  48. package/dist/chunk-64E7D4HY.js +364 -0
  49. package/dist/chunk-6CK466BC.js +99 -0
  50. package/dist/chunk-6ES45HHO.js +138 -0
  51. package/dist/chunk-6HYEZFGL.js +277 -0
  52. package/dist/chunk-6Y7HLXGW.js +29 -0
  53. package/dist/chunk-6YKK4FYR.js +258 -0
  54. package/dist/chunk-74WNMLMS.js +117 -0
  55. package/dist/chunk-7AULZ7OD.js +55 -0
  56. package/dist/chunk-7DOKGSUN.js +101 -0
  57. package/dist/chunk-7IH5LTIZ.js +195 -0
  58. package/dist/chunk-7ISTS5NS.js +21 -0
  59. package/dist/chunk-7NMUTGOW.js +527 -0
  60. package/dist/chunk-7PNHUZEL.js +153 -0
  61. package/dist/chunk-7TSQLONI.js +88 -0
  62. package/dist/chunk-AE7TOLD5.js +30 -0
  63. package/dist/chunk-AEMHSXKA.js +130 -0
  64. package/dist/chunk-AKRYTS2D.js +211 -0
  65. package/dist/chunk-AMNSE36L.js +59 -0
  66. package/dist/chunk-AZVD74ZV.js +23 -0
  67. package/dist/chunk-B35DVOTK.js +1981 -0
  68. package/dist/chunk-B4HNJRAH.js +626 -0
  69. package/dist/chunk-B5WYPPHS.js +13 -0
  70. package/dist/chunk-BBOVDXQM.js +59 -0
  71. package/dist/chunk-BD3ECZLK.js +62 -0
  72. package/dist/chunk-BDGSOT74.js +4578 -0
  73. package/dist/chunk-BF5VEOPK.js +31 -0
  74. package/dist/chunk-BFFRW4XH.js +47 -0
  75. package/dist/chunk-BFPC6PEW.js +208 -0
  76. package/dist/chunk-BGEMY2JJ.js +376 -0
  77. package/dist/chunk-BISGNHKD.js +35 -0
  78. package/dist/chunk-BMRAEBRY.js +21 -0
  79. package/dist/chunk-BNTXAZXW.js +127 -0
  80. package/dist/chunk-BOQBXGSN.js +75 -0
  81. package/dist/chunk-BTJDSTQP.js +213 -0
  82. package/dist/chunk-BUOPJQP5.js +218 -0
  83. package/dist/chunk-BXFJS65Q.js +52 -0
  84. package/dist/chunk-BXPQFSX5.js +59 -0
  85. package/dist/chunk-C57LIWNY.js +1269 -0
  86. package/dist/chunk-C6YVCCWR.js +74 -0
  87. package/dist/chunk-CAADDF6M.js +167 -0
  88. package/dist/chunk-CBANJFBO.js +69 -0
  89. package/dist/chunk-CERF3RIB.js +597 -0
  90. package/dist/chunk-COAS5ETR.js +46 -0
  91. package/dist/chunk-CQ7J6UQ7.js +78 -0
  92. package/dist/chunk-CRUVYGO2.js +26 -0
  93. package/dist/chunk-CVFVFRGN.js +58 -0
  94. package/dist/chunk-D2UK66HM.js +37 -0
  95. package/dist/chunk-D2W7SA4R.js +18 -0
  96. package/dist/chunk-DA44ZENT.js +501 -0
  97. package/dist/chunk-DAJ76TOC.js +99 -0
  98. package/dist/chunk-DCZ6CIUM.js +147 -0
  99. package/dist/chunk-DF35KMXM.js +1314 -0
  100. package/dist/chunk-DGASQT26.js +151 -0
  101. package/dist/chunk-DJT57C5P.js +55 -0
  102. package/dist/chunk-DKDPZTD3.js +44 -0
  103. package/dist/chunk-DQYVQ2N7.js +77 -0
  104. package/dist/chunk-DRTP2RTY.js +266 -0
  105. package/dist/chunk-DW2BMUKY.js +61 -0
  106. package/dist/chunk-DW5T5ZVU.js +307 -0
  107. package/dist/chunk-DXKNDNFC.js +164 -0
  108. package/dist/chunk-DZEQ7UYR.js +291 -0
  109. package/dist/chunk-E4F4OUAC.js +463 -0
  110. package/dist/chunk-EE4B6A7W.js +69 -0
  111. package/dist/chunk-EISKIYWG.js +23 -0
  112. package/dist/chunk-EKAQK7UQ.js +235 -0
  113. package/dist/chunk-EOBTJV32.js +123 -0
  114. package/dist/chunk-ESF3DIZY.js +325 -0
  115. package/dist/chunk-EVOHOZ4U.js +45 -0
  116. package/dist/chunk-EXN4KHLB.js +110 -0
  117. package/dist/chunk-F252T6Y3.js +78 -0
  118. package/dist/chunk-F3DP4ZA2.js +40 -0
  119. package/dist/chunk-F6F47QAY.js +58 -0
  120. package/dist/chunk-FA3Y23ZW.js +57 -0
  121. package/dist/chunk-FBKXE4EJ.js +640 -0
  122. package/dist/chunk-FCGEB3H6.js +23 -0
  123. package/dist/chunk-FF7ZVYJF.js +3732 -0
  124. package/dist/chunk-FFGKN6L3.js +39 -0
  125. package/dist/chunk-FFGU4GCC.js +94 -0
  126. package/dist/chunk-FSFDAOVP.js +74 -0
  127. package/dist/chunk-FT5TX7OX.js +1573 -0
  128. package/dist/chunk-G3QP67Z7.js +232 -0
  129. package/dist/chunk-G5ORJKV2.js +179 -0
  130. package/dist/chunk-GFNC62PE.js +111 -0
  131. package/dist/chunk-GGK43Q3N.js +67 -0
  132. package/dist/chunk-GGYKY4GF.js +11537 -0
  133. package/dist/chunk-GGYNHGNJ.js +55 -0
  134. package/dist/chunk-GLY7RM3C.js +354 -0
  135. package/dist/chunk-GQBZU6EO.js +20 -0
  136. package/dist/chunk-GSXENUZL.js +9 -0
  137. package/dist/chunk-GTOAT5D3.js +40 -0
  138. package/dist/chunk-GWCMDPQU.js +1007 -0
  139. package/dist/chunk-GXYSMYHJ.js +152 -0
  140. package/dist/chunk-GYMAI5NY.js +14 -0
  141. package/dist/chunk-H2VZMKPE.js +30 -0
  142. package/dist/chunk-H4THUNBM.js +2091 -0
  143. package/dist/chunk-HGRVSNUZ.js +361 -0
  144. package/dist/chunk-HI4VY473.js +27 -0
  145. package/dist/chunk-HOJRSD3Q.js +447 -0
  146. package/dist/chunk-HRX25W35.js +82 -0
  147. package/dist/chunk-HSE4AQYV.js +55 -0
  148. package/dist/chunk-HU5SSUFX.js +383 -0
  149. package/dist/chunk-I3GDBJLH.js +196 -0
  150. package/dist/chunk-I75EDU75.js +684 -0
  151. package/dist/chunk-IBA7DMIO.js +20 -0
  152. package/dist/chunk-IC6N4NZA.js +231 -0
  153. package/dist/chunk-IF43HIGV.js +284 -0
  154. package/dist/chunk-IGZ6C2MC.js +439 -0
  155. package/dist/chunk-IMLTL2MY.js +192 -0
  156. package/dist/chunk-IMZL6SGR.js +33 -0
  157. package/dist/chunk-IS4USJPY.js +516 -0
  158. package/dist/chunk-ISFSPN2F.js +82 -0
  159. package/dist/chunk-IXE7GTFI.js +55 -0
  160. package/dist/chunk-IZ77QJQG.js +36 -0
  161. package/dist/chunk-J2PACWRQ.js +34 -0
  162. package/dist/chunk-J6EGFVQX.js +180 -0
  163. package/dist/chunk-JEKOD43D.js +22 -0
  164. package/dist/chunk-JGIWATSG.js +30 -0
  165. package/dist/chunk-JYBONKD4.js +43 -0
  166. package/dist/chunk-K2NLG2HK.js +454 -0
  167. package/dist/chunk-KCQ4TBLS.js +164 -0
  168. package/dist/chunk-KD5KIVMS.js +176 -0
  169. package/dist/chunk-KHW6TX6I.js +63 -0
  170. package/dist/chunk-KI5GZFCE.js +520 -0
  171. package/dist/chunk-KN34B7NO.js +105 -0
  172. package/dist/chunk-KYUHIFP3.js +136 -0
  173. package/dist/chunk-KZL5VS4B.js +300 -0
  174. package/dist/chunk-L3VW3QIH.js +48 -0
  175. package/dist/chunk-LA6MG4ET.js +2110 -0
  176. package/dist/chunk-LAVFOA3S.js +66 -0
  177. package/dist/chunk-LB4OA77N.js +13 -0
  178. package/dist/chunk-LBFRF2K4.js +196 -0
  179. package/dist/chunk-LM6EIA4B.js +93 -0
  180. package/dist/chunk-LPCNRGJ7.js +692 -0
  181. package/dist/chunk-LSLNL5T3.js +168 -0
  182. package/dist/chunk-LVRRWP4W.js +568 -0
  183. package/dist/chunk-LWCFBRHL.js +33 -0
  184. package/dist/chunk-LXFTMGZZ.js +166 -0
  185. package/dist/chunk-M33LVA4M.js +151 -0
  186. package/dist/chunk-M3FO5UMK.js +4944 -0
  187. package/dist/chunk-M5QNDBAY.js +66 -0
  188. package/dist/chunk-M6ND6KBE.js +1291 -0
  189. package/dist/chunk-M7H3WQTE.js +76 -0
  190. package/dist/chunk-MCBRVPA7.js +191 -0
  191. package/dist/chunk-MCSDWZET.js +91 -0
  192. package/dist/chunk-MDT5XDXL.js +289 -0
  193. package/dist/chunk-MJG3IQY4.js +91 -0
  194. package/dist/chunk-MOU3N2UL.js +44 -0
  195. package/dist/chunk-MP4KZOQC.js +3451 -0
  196. package/dist/chunk-MPAJ446F.js +66 -0
  197. package/dist/chunk-MVJZZ6AL.js +16 -0
  198. package/dist/chunk-MXS6S2PY.js +253 -0
  199. package/dist/chunk-N3SFDYM7.js +291 -0
  200. package/dist/chunk-NAOX3JUB.js +13 -0
  201. package/dist/chunk-NEKKIBCX.js +283 -0
  202. package/dist/chunk-NKDATMEM.js +133 -0
  203. package/dist/chunk-NR4FMC4K.js +395 -0
  204. package/dist/chunk-NSOHOJBR.js +221 -0
  205. package/dist/chunk-NTDB6QKF.js +29 -0
  206. package/dist/chunk-NWEYRBWK.js +25 -0
  207. package/dist/chunk-O2YSNYWD.js +23 -0
  208. package/dist/chunk-O3EW7LAY.js +54 -0
  209. package/dist/chunk-O7BNJIXU.js +366 -0
  210. package/dist/chunk-OARL2NXZ.js +116 -0
  211. package/dist/chunk-OHKZUEJW.js +351 -0
  212. package/dist/chunk-OKU45BXA.js +647 -0
  213. package/dist/chunk-OL4JBD3J.js +59 -0
  214. package/dist/chunk-OLUO5DDR.js +192 -0
  215. package/dist/chunk-OQ245JLA.js +196 -0
  216. package/dist/chunk-P72UZAQI.js +289 -0
  217. package/dist/chunk-PAL2ENB6.js +20 -0
  218. package/dist/chunk-PAXYQZH7.js +53 -0
  219. package/dist/chunk-PDPEM5VW.js +51 -0
  220. package/dist/chunk-PEWCDI2C.js +668 -0
  221. package/dist/chunk-PGZ54EDX.js +27 -0
  222. package/dist/chunk-PRWVLDZF.js +73 -0
  223. package/dist/chunk-PSQQ75VJ.js +52 -0
  224. package/dist/chunk-PUOVIFHW.js +118 -0
  225. package/dist/chunk-PWBF2X3V.js +107 -0
  226. package/dist/chunk-PWXII6HF.js +43 -0
  227. package/dist/chunk-Q35VLJRT.js +80 -0
  228. package/dist/chunk-QJP7EYGL.js +128 -0
  229. package/dist/chunk-QPQKX2MK.js +8836 -0
  230. package/dist/chunk-QQRLPY25.js +1053 -0
  231. package/dist/chunk-QUS4ER2W.js +407 -0
  232. package/dist/chunk-QYHI3YET.js +29 -0
  233. package/dist/chunk-QYRU2UQI.js +32 -0
  234. package/dist/chunk-R6XVVQGC.js +13 -0
  235. package/dist/chunk-R7QN6ONS.js +483 -0
  236. package/dist/chunk-RD23MPGC.js +221 -0
  237. package/dist/chunk-RDDWQBEM.js +185 -0
  238. package/dist/chunk-RDLLDYFO.js +104 -0
  239. package/dist/chunk-RE4TGORR.js +84 -0
  240. package/dist/chunk-RJLHVYQY.js +217 -0
  241. package/dist/chunk-RJLPTWHW.js +905 -0
  242. package/dist/chunk-RKUVLRZI.js +295 -0
  243. package/dist/chunk-ROGXPGYR.js +37 -0
  244. package/dist/chunk-RSZGEL5U.js +163 -0
  245. package/dist/chunk-RVUOIJXN.js +909 -0
  246. package/dist/chunk-RW7F4JRP.js +11 -0
  247. package/dist/chunk-S4UO3AO3.js +53 -0
  248. package/dist/chunk-S5JAAF6S.js +585 -0
  249. package/dist/chunk-SNU37TQI.js +56 -0
  250. package/dist/chunk-SQVUDO2O.js +31 -0
  251. package/dist/chunk-SYVHIYQT.js +66 -0
  252. package/dist/chunk-SZBQMTG2.js +85 -0
  253. package/dist/chunk-T5VCXA3J.js +25 -0
  254. package/dist/chunk-TK6NSP56.js +30 -0
  255. package/dist/chunk-TKWVMA6L.js +22 -0
  256. package/dist/chunk-TQDKJHWX.js +59 -0
  257. package/dist/chunk-TQDM7S5N.js +127 -0
  258. package/dist/chunk-TULAXS77.js +23 -0
  259. package/dist/chunk-TVT45XNH.js +4625 -0
  260. package/dist/chunk-TWCVV2JO.js +467 -0
  261. package/dist/chunk-U4DKAD6S.js +47 -0
  262. package/dist/chunk-UA5K2BTI.js +564 -0
  263. package/dist/chunk-UAMKCMOK.js +40 -0
  264. package/dist/chunk-UBMVADBF.js +51 -0
  265. package/dist/chunk-UFQ5A5PW.js +645 -0
  266. package/dist/chunk-UOD2SOLL.js +1301 -0
  267. package/dist/chunk-UTSB4LOW.js +156 -0
  268. package/dist/chunk-UVXNIUTN.js +412 -0
  269. package/dist/chunk-UXVPXYPE.js +90 -0
  270. package/dist/chunk-UYEEMIWR.js +374 -0
  271. package/dist/chunk-VBGM5ZBW.js +54 -0
  272. package/dist/chunk-VEWPCZPG.js +762 -0
  273. package/dist/chunk-VIRDLZ5E.js +108 -0
  274. package/dist/chunk-VMPO7WKN.js +52 -0
  275. package/dist/chunk-W2NVSDO5.js +5122 -0
  276. package/dist/chunk-W3YYPBEA.js +176 -0
  277. package/dist/chunk-W5AYOICN.js +280 -0
  278. package/dist/chunk-W5GZOIUF.js +27 -0
  279. package/dist/chunk-WHKNLZ3C.js +76 -0
  280. package/dist/chunk-WKBEPPQ5.js +1409 -0
  281. package/dist/chunk-WM3Z6QKQ.js +151 -0
  282. package/dist/chunk-WMI2TPMA.js +31 -0
  283. package/dist/chunk-WNX5VD7S.js +150 -0
  284. package/dist/chunk-WOVTYST3.js +60 -0
  285. package/dist/chunk-WPB5WEZJ.js +546 -0
  286. package/dist/chunk-WUO5EOAT.js +44 -0
  287. package/dist/chunk-WWLJMP6D.js +133 -0
  288. package/dist/chunk-WZMLH3XP.js +58 -0
  289. package/dist/chunk-WZYVLUVQ.js +79 -0
  290. package/dist/chunk-X2OCPVU5.js +135 -0
  291. package/dist/chunk-X3CL6DTR.js +95 -0
  292. package/dist/chunk-X6WF7JEV.js +354 -0
  293. package/dist/chunk-XAHGBPWT.js +44 -0
  294. package/dist/chunk-XCKQ5BM2.js +228 -0
  295. package/dist/chunk-XIBYREEY.js +106 -0
  296. package/dist/chunk-XKW5NDMR.js +378 -0
  297. package/dist/chunk-XRDALAO3.js +100 -0
  298. package/dist/chunk-XUP22EAS.js +41 -0
  299. package/dist/chunk-XWAC3MKW.js +243 -0
  300. package/dist/chunk-Y3R7JMXB.js +59 -0
  301. package/dist/chunk-Y54LTP4W.js +82 -0
  302. package/dist/chunk-Y7UECI4M.js +99 -0
  303. package/dist/chunk-YACGDFHC.js +47 -0
  304. package/dist/chunk-YHNIQPKY.js +71 -0
  305. package/dist/chunk-YMBR6HYP.js +111 -0
  306. package/dist/chunk-YMCH3L2S.js +26 -0
  307. package/dist/chunk-Z4ZU6T7V.js +99 -0
  308. package/dist/chunk-ZDPF67ZZ.js +173 -0
  309. package/dist/chunk-ZFC2Q67K.js +101 -0
  310. package/dist/chunk-ZGHNNSCT.js +114 -0
  311. package/dist/chunk-ZGX3ERAT.js +173 -0
  312. package/dist/chunk-ZI3YHEBY.js +37 -0
  313. package/dist/chunk-ZN7G6JLS.js +639 -0
  314. package/dist/chunk-ZNPFQMXT.js +47 -0
  315. package/dist/chunk-ZOU3LV4U.js +63 -0
  316. package/dist/chunk-ZT7B4H2V.js +117 -0
  317. package/dist/chunk-ZZCBDNZI.js +58 -0
  318. package/dist/cli.js +498 -112593
  319. package/dist/computer-tools.js +36642 -21258
  320. package/dist/harness-catalog.cjs +88 -43
  321. package/dist/index.js +1 -1
  322. package/dist/local-model-supervisor.cjs +555 -0
  323. package/package.json +3 -4
@@ -0,0 +1,35 @@
1
+ import { createRequire as __clikcodeCreateRequire } from 'node:module';
2
+ const require = __clikcodeCreateRequire(import.meta.url);
3
+
4
+ // src/session/state/settings.ts
5
+ var HARNESS_DEFAULT_SETTINGS = { effort: "medium", permissionMode: "ask" };
6
+ function normalizedPermissionMode(value) {
7
+ if (value === "auto" || value === "bypass" || value === "ask") return value;
8
+ if (value === "read-only" || value === "workspace-write") return "ask";
9
+ return HARNESS_DEFAULT_SETTINGS.permissionMode;
10
+ }
11
+ function normalizedSessionPermission(session) {
12
+ return { permissionMode: normalizedPermissionMode(session.permissionMode) };
13
+ }
14
+ function normalizedStatus(session) {
15
+ return { status: session.status === "closed" || session.status === "archived" ? session.status : "active" };
16
+ }
17
+ function normalizedConversation(session) {
18
+ return { conversationId: session.conversationId || session.id };
19
+ }
20
+ function resolveDefaultSettings(state, provider) {
21
+ const overrides = provider ? state.providerSettings[provider] : void 0;
22
+ return {
23
+ effort: overrides?.effort ?? state.globalSettings.effort,
24
+ permissionMode: overrides?.permissionMode ?? state.globalSettings.permissionMode
25
+ };
26
+ }
27
+
28
+ export {
29
+ HARNESS_DEFAULT_SETTINGS,
30
+ normalizedPermissionMode,
31
+ normalizedSessionPermission,
32
+ normalizedStatus,
33
+ normalizedConversation,
34
+ resolveDefaultSettings
35
+ };
@@ -0,0 +1,21 @@
1
+ import { createRequire as __clikcodeCreateRequire } from 'node:module';
2
+ const require = __clikcodeCreateRequire(import.meta.url);
3
+ import {
4
+ forgetSecrets,
5
+ isSecretRef,
6
+ registerSecret,
7
+ resolveSecretRef,
8
+ scrubSecrets,
9
+ secretRef,
10
+ showsSecret
11
+ } from "./chunk-CBANJFBO.js";
12
+ import "./chunk-PWXII6HF.js";
13
+ export {
14
+ forgetSecrets,
15
+ isSecretRef,
16
+ registerSecret,
17
+ resolveSecretRef,
18
+ scrubSecrets,
19
+ secretRef,
20
+ showsSecret
21
+ };
@@ -0,0 +1,127 @@
1
+ import { createRequire as __clikcodeCreateRequire } from 'node:module';
2
+ const require = __clikcodeCreateRequire(import.meta.url);
3
+
4
+ // src/agent/computer/login-error.ts
5
+ var LoginError = class extends Error {
6
+ };
7
+
8
+ // src/agent/computer/login-fields.ts
9
+ async function loginScope(page) {
10
+ try {
11
+ if (await page.locator("input:visible").count()) return page;
12
+ for (const frame of page.frames()) {
13
+ if (frame === page.mainFrame() || frame.isDetached()) continue;
14
+ if (await frame.locator("input:visible").count()) return frame;
15
+ }
16
+ } catch {
17
+ }
18
+ return page;
19
+ }
20
+ var ACCOUNT_SCOPE = /account[ _-]?(?:id|alias|number)|tenant|workspace|organi[sz]ation|subdomain|company[ _-]?id/i;
21
+ function safeLabel(value) {
22
+ return value.replace(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi, "[account]").replace(/\b[A-Za-z0-9_-]{24,}\b/g, "[redacted]").slice(0, 80);
23
+ }
24
+ async function loginFields(page) {
25
+ const raw = await (await loginScope(page)).locator("input:visible").evaluateAll((inputs) => inputs.map((node, index) => {
26
+ const input = node;
27
+ const doc = globalThis.document;
28
+ const labelled = input.getAttribute("aria-labelledby")?.split(/\s+/).map((id) => doc.getElementById(id)?.textContent?.trim()).filter(Boolean).join(" ");
29
+ return {
30
+ index,
31
+ type: input.type.toLowerCase(),
32
+ autocomplete: input.autocomplete.toLowerCase(),
33
+ name: input.name,
34
+ id: input.id,
35
+ required: input.required,
36
+ label: input.getAttribute("aria-label") || labelled || [...input.labels ?? []].map((label) => label.textContent?.trim()).filter(Boolean).join(" ") || input.placeholder || ""
37
+ };
38
+ }));
39
+ const keys = /* @__PURE__ */ new Map();
40
+ return raw.slice(0, 30).flatMap((field) => {
41
+ if (!["text", "email", "password", "tel", "number"].includes(field.type)) return [];
42
+ const hint = `${field.label} ${field.name} ${field.id} ${field.autocomplete}`.toLowerCase();
43
+ if (/captcha|search|coupon|promo|referral|invite|discount|zip|postal|country|area code/.test(hint)) return [];
44
+ if (/new-password/.test(field.autocomplete)) return [];
45
+ const password = field.type === "password" || /current-password|password/.test(hint);
46
+ const code = !password && (/one-time-code/.test(field.autocomplete) || /one.?time|\botp\b|\btotp\b|verification|security code|passcode|authenticator|\b2fa\b|\bmfa\b|\bcode\b|(?:auth|login|signin|verify|mfa|otp|totp|security|access|sms|email|factor)[ _-]?code\b/.test(hint));
47
+ const key = code ? "code" : password ? "password" : ACCOUNT_SCOPE.test(hint) ? "accountId" : field.type === "email" || /\bemail\b/.test(field.autocomplete) ? "email" : /username|identifier|email|phone|login/.test(hint) ? "username" : `field_${field.index + 1}`;
48
+ const count = keys.get(key) ?? 0;
49
+ keys.set(key, count + 1);
50
+ const finalKey = count ? `${key}_${count + 1}` : key;
51
+ const label = safeLabel(field.label || (key === "code" ? "Verification code" : key === "password" ? "Password" : key === "accountId" ? "Account ID" : key === "email" ? "Email" : key === "username" ? "Email or username" : field.name || field.id || "Login field"));
52
+ return [{ index: field.index, key: finalKey, label, kind: password ? "password" : "text", required: field.required, ...code ? { transient: true } : {} }];
53
+ });
54
+ }
55
+ var isEmail = (value) => !!value && value.includes("@");
56
+ function savedLoginValues(fields, saved) {
57
+ const boxes = fields.filter((field) => field.kind === "text" && !field.transient);
58
+ const holds = [saved.accountId && "an account ID", (saved.email || isEmail(saved.username)) && "an email", saved.username && !isEmail(saved.username) && "a username"].filter((kind) => !!kind);
59
+ if (!holds.length) return {};
60
+ const values = {};
61
+ const missing = [];
62
+ for (const box of boxes) {
63
+ const value = saved[box.key] ?? (box.key === "email" && isEmail(saved.username) ? saved.username : void 0) ?? (box.key === "username" && boxes.length === 1 ? saved.email : void 0);
64
+ if (value === void 0 || Object.values(values).includes(value)) missing.push(box);
65
+ else values[box.key] = value;
66
+ }
67
+ if (missing.length) {
68
+ throw new LoginError(`Nothing was typed or pressed. This page asks for ${missing.map((field) => `"${field.label}"`).join(" and ")}, and the saved login holds only ${holds.join(" and ")} (with its password): this is a different kind of sign-in than the saved login. Observe the page and press its own switch to the kind the saved login is for (for example "Sign in using root user email"), or call login with new_account true to enter and save a login that has these fields.`);
69
+ }
70
+ return values;
71
+ }
72
+ async function pageControls(page) {
73
+ let names;
74
+ try {
75
+ names = await page.locator('a:visible, button:visible, [role="button"]:visible, [role="link"]:visible').evaluateAll(
76
+ (nodes) => nodes.map((node) => {
77
+ const element = node;
78
+ return (element.innerText || element.getAttribute("aria-label") || element.getAttribute("title") || "").replace(/\s+/g, " ").trim();
79
+ })
80
+ );
81
+ } catch {
82
+ return [];
83
+ }
84
+ const seen = /* @__PURE__ */ new Set();
85
+ const controls = [];
86
+ for (const name of names) {
87
+ const key = name.toLowerCase();
88
+ if (!name || name.length > 50 || /@/.test(name) || seen.has(key)) continue;
89
+ seen.add(key);
90
+ controls.push(name);
91
+ if (controls.length === 30) break;
92
+ }
93
+ return controls;
94
+ }
95
+ function loginFieldSummary(site, fields, controls = []) {
96
+ const shown = fields.length ? fields.map((field) => `- ${field.label} (${field.kind})`).join("\n") : "- No credential field is visible. Use handoff for verification or CAPTCHA.";
97
+ const pressable = controls.length ? `
98
+
99
+ Buttons and links on the page (names only):
100
+ ${controls.map((name) => `- ${name}`).join("\n")}
101
+ Press one with click, using its role and name. If a sign-in page offers different ways in (for example root or IAM user, or another account), ask the user which with ask_user before clicking.` : "";
102
+ return `Page: ${site}
103
+
104
+ Sign-in fields:
105
+ ${shown}${pressable}
106
+
107
+ Use login to ask for the visible fields privately; if several accounts are saved for this site the user picks one, and a single saved account is used without asking. Values are never shown here.`;
108
+ }
109
+ function uniqueLabels(labels) {
110
+ const seen = /* @__PURE__ */ new Map();
111
+ return labels.map((label) => {
112
+ const count = (seen.get(label) ?? 0) + 1;
113
+ seen.set(label, count);
114
+ return count === 1 ? label : `${label} (${count})`;
115
+ });
116
+ }
117
+
118
+ export {
119
+ LoginError,
120
+ loginScope,
121
+ ACCOUNT_SCOPE,
122
+ loginFields,
123
+ savedLoginValues,
124
+ pageControls,
125
+ loginFieldSummary,
126
+ uniqueLabels
127
+ };
@@ -0,0 +1,75 @@
1
+ import { createRequire as __clikcodeCreateRequire } from 'node:module';
2
+ const require = __clikcodeCreateRequire(import.meta.url);
3
+ import {
4
+ EmailAmbiguous,
5
+ MARKETING,
6
+ Parked,
7
+ emailConnected,
8
+ findEmail,
9
+ loginAddresses,
10
+ vendorOf
11
+ } from "./chunk-25T3GVS7.js";
12
+ import {
13
+ saveTask
14
+ } from "./chunk-SNU37TQI.js";
15
+
16
+ // src/agent/computer/email-code.ts
17
+ function verificationCode(text) {
18
+ const flat = text.replace(/\s+/g, " ");
19
+ const patterns = [
20
+ /\b(?:verification|security|confirmation|activation|login|sign[- ]?in|one[- ]time|access)?\s*code\b[^A-Za-z0-9]{0,20}([A-Z0-9]{4,8})\b/gi,
21
+ /\b(?:verification|security|confirmation|activation|login|sign[- ]?in|one[- ]time|access|otp)?\s*(?:code|otp|passcode|pin)\b[^.\d]{0,40}?[:\s](\d{4,8})\b/gi,
22
+ /\b([A-Z0-9]{4,8})\b[^.]{0,30}\bis your (?:\w+ ){0,3}code\b/gi
23
+ ];
24
+ for (const pattern of patterns) for (const match of flat.matchAll(pattern)) if (/\d/.test(match[1])) return match[1];
25
+ const sixes = [...new Set(flat.match(/(?<![\w.-])\d{6}(?![\w-])/g) ?? [])];
26
+ return sixes.length === 1 ? sixes[0] : void 0;
27
+ }
28
+ function emailVerificationCode(mail) {
29
+ const body = verificationCode(mail.text), subject = verificationCode(mail.subject);
30
+ return body && subject && body !== subject ? void 0 : body ?? subject;
31
+ }
32
+ var CODE_WORDS = /\b(?:code|otp|passcode|pin|verify|verification|confirm(?:ation)?|one[- ]time|sign[- ]?in|log[- ]?in|security alert)\b/i;
33
+ var LINK_WORDS = /\b(?:verify|verification|confirm(?:ation)?|activate|activation|sign[- ]?in|log[- ]?in|magic|reset|set (?:your )?password|welcome|complete (?:your )?(?:sign|regist))/i;
34
+ function looksLikeCodeEmail(mail) {
35
+ if (MARKETING.test(mail.subject) || MARKETING.test(mail.text.slice(0, 200))) return false;
36
+ return emailVerificationCode(mail) !== void 0 && CODE_WORDS.test(`${mail.subject} ${mail.text.slice(0, 300)}`);
37
+ }
38
+ function looksLikeLinkEmail(mail) {
39
+ if (MARKETING.test(mail.subject) || MARKETING.test(mail.text.slice(0, 200))) return false;
40
+ return mail.links.length > 0 && LINK_WORDS.test(`${mail.subject} ${mail.text.slice(0, 300)}`);
41
+ }
42
+ async function emailedCode(stateDir, options) {
43
+ const passes = options.passes ?? 3, passMs = options.passMs ?? 3e4;
44
+ const hints = await loginAddresses(stateDir, options.site);
45
+ for (let pass = 0; pass < passes; pass++) {
46
+ try {
47
+ const mail = await findEmail(stateDir, { hints, site: options.site, since: options.since, timeoutMs: passMs, pollMs: options.pollMs, spam: pass > 0, consume: true, accept: looksLikeCodeEmail, signal: options.signal, endpoints: options.endpoints });
48
+ return { code: emailVerificationCode(mail) };
49
+ } catch (error) {
50
+ if (error instanceof EmailAmbiguous) return { hold: error.message };
51
+ if (options.signal?.aborted) throw error;
52
+ if (!/^No email matched/.test(error.message)) return { hold: error.message };
53
+ }
54
+ }
55
+ return { hold: `no email with a code for ${vendorOf(options.site)} arrived in ${Math.round(passes * passMs / 1e3)} seconds (inbox, then spam, ${passes} passes)` };
56
+ }
57
+ async function holdForEmail(stateDir, site, why) {
58
+ const vendor = vendorOf(site);
59
+ await saveTask(stateDir, { vendor, kind: "other", status: "needs-human", reason: "email", note: `verification email: ${why}`.slice(0, 300) });
60
+ throw new Parked(`On hold: ${vendor} verification email did not come (${why}). It is recorded in the queue as needs-human (email). Do not ask the user; go on to the next vendor.`);
61
+ }
62
+ async function codeFromMailbox(stateDir, site, since, signal) {
63
+ if (!await emailConnected(stateDir)) return void 0;
64
+ const found = await emailedCode(stateDir, { site, since, signal });
65
+ if ("code" in found) return found.code;
66
+ return holdForEmail(stateDir, site, found.hold);
67
+ }
68
+
69
+ export {
70
+ verificationCode,
71
+ emailVerificationCode,
72
+ looksLikeCodeEmail,
73
+ looksLikeLinkEmail,
74
+ codeFromMailbox
75
+ };
@@ -0,0 +1,213 @@
1
+ import { createRequire as __clikcodeCreateRequire } from 'node:module';
2
+ const require = __clikcodeCreateRequire(import.meta.url);
3
+ import {
4
+ activityResult,
5
+ tensedLabel
6
+ } from "./chunk-FF7ZVYJF.js";
7
+ import {
8
+ EDIT_FILES_SHOWN,
9
+ SHIMMER_STRIDE,
10
+ SHIMMER_WIDTH,
11
+ SPIN_MS,
12
+ SPIN_PHASES,
13
+ activityOutcome,
14
+ callFailed,
15
+ diffPreview,
16
+ diffTotals,
17
+ failedOutputTail,
18
+ outputPreview,
19
+ waitingSpinnerGlyph
20
+ } from "./chunk-XKW5NDMR.js";
21
+ import {
22
+ asRecord,
23
+ claudeShaped,
24
+ opencodeShaped
25
+ } from "./chunk-XIBYREEY.js";
26
+ import {
27
+ source_default
28
+ } from "./chunk-LVRRWP4W.js";
29
+
30
+ // src/harness/protocol/look.ts
31
+ function xtermRgb(index) {
32
+ if (index < 16) {
33
+ const base = [
34
+ [0, 0, 0],
35
+ [128, 0, 0],
36
+ [0, 128, 0],
37
+ [128, 128, 0],
38
+ [0, 0, 128],
39
+ [128, 0, 128],
40
+ [0, 128, 128],
41
+ [192, 192, 192],
42
+ [128, 128, 128],
43
+ [255, 0, 0],
44
+ [0, 255, 0],
45
+ [255, 255, 0],
46
+ [0, 0, 255],
47
+ [255, 0, 255],
48
+ [0, 255, 255],
49
+ [255, 255, 255]
50
+ ];
51
+ return base[index];
52
+ }
53
+ if (index >= 232) {
54
+ const level = 8 + (index - 232) * 10;
55
+ return [level, level, level];
56
+ }
57
+ const cube = index - 16;
58
+ const step = (value) => value === 0 ? 0 : 55 + value * 40;
59
+ return [step(Math.floor(cube / 36)), step(Math.floor(cube / 6) % 6), step(cube % 6)];
60
+ }
61
+ function xtermHex(index) {
62
+ return `#${xtermRgb(index).map((value) => value.toString(16).padStart(2, "0")).join("")}`;
63
+ }
64
+ var LOOK = {
65
+ glyph: {
66
+ /** Every tool row, whatever the call and whoever made it. */
67
+ tool: "\u2023",
68
+ /** A settled thought. */
69
+ thought: "\u273B",
70
+ /** A call its turn was stopped under. */
71
+ stopped: "\u25A0",
72
+ /** A settled success, a failure. */
73
+ ok: "\u2713",
74
+ failed: "\u2717"
75
+ },
76
+ roles: {
77
+ /** The tool glyph. */
78
+ toolGlyph: { ansi: 68 },
79
+ /** The words of a tool row. */
80
+ toolText: { ansi: 110 },
81
+ /** A run group's summary row (its counts), the same blue as a tool row's words. */
82
+ summary: { ansi: 110 },
83
+ /** What is running: the spinner of the turn and of a running row. */
84
+ accent: { ansi: 75 },
85
+ failed: { ansi: 203 },
86
+ stopped: { ansi: 179 },
87
+ success: { ansi: 114 },
88
+ /** A thought, and everything that is only context (output, hints). */
89
+ thought: { dim: true, italic: true },
90
+ neutral: { dim: true }
91
+ },
92
+ /** Between the parts of a summary row (`Ran 4 commands · 2 thoughts`). */
93
+ separator: " \xB7 ",
94
+ spinner: { stepMs: SPIN_MS, phases: SPIN_PHASES, glyph: waitingSpinnerGlyph },
95
+ shimmer: { stride: SHIMMER_STRIDE, width: SHIMMER_WIDTH, lift: 0.65 }
96
+ };
97
+ var LOOK_HEX = Object.fromEntries(
98
+ Object.entries(LOOK.roles).flatMap(([name, role]) => role.ansi === void 0 ? [] : [[name, xtermHex(role.ansi)]])
99
+ );
100
+
101
+ // src/harness/protocol/tool-category-style.ts
102
+ function painterFor(role) {
103
+ return (text) => {
104
+ let style = role.ansi === void 0 ? source_default : source_default.ansi256(role.ansi);
105
+ if (role.dim) style = style.dim;
106
+ if (role.italic) style = style.italic;
107
+ return style(text);
108
+ };
109
+ }
110
+ var look = {
111
+ paint: Object.fromEntries(Object.entries(LOOK.roles).map(([name, role]) => [name, painterFor(role)]))
112
+ };
113
+ var toolGlyph = () => look.paint.toolGlyph(LOOK.glyph.tool);
114
+ var TOOL_ROW_TEXT = (text) => look.paint.toolText(text);
115
+ var thoughtLine = (text) => look.paint.thought(`${LOOK.glyph.thought} ${text}`);
116
+
117
+ // src/harness/protocol/activity-line.ts
118
+ function renderActivityLine(event) {
119
+ if (event.kind === "thinking") return [` ${look.paint.thought(`${LOOK.glyph.thought} ${event.label}`)}`];
120
+ const mark = `${toolGlyph()} `;
121
+ const plainMark = `${LOOK.glyph.tool} `;
122
+ const outcome = outcomeSuffix(event);
123
+ const result = activityResult(event);
124
+ const summary = ` ${event.stopped ? `${look.paint.stopped(LOOK.glyph.stopped)} ${look.paint.neutral(event.label)} ${look.paint.stopped("stopped")}` : event.kind === "tool-error" ? `${look.paint.failed(`${plainMark}${event.label}`)} ${look.paint.failed("failed")}` : `${mark}${TOOL_ROW_TEXT(`${tensedLabel(event.label, event.kind === "tool-start")}${result ? ` \xB7 ${result}` : ""}`)}`}${outcome ? ` ${source_default.dim(outcome)}` : ""}`;
125
+ if (!event.diff?.length) {
126
+ return callFailed(event) ? [summary, ...failedOutputRows(event)] : [summary];
127
+ }
128
+ if (event.diff.length === 1) return [summaryWithCounts(summary, event.diff)];
129
+ const shown = event.diff.slice(0, EDIT_FILES_SHOWN).map((file) => {
130
+ const verb = file.change === "add" ? "Created" : file.change === "delete" ? "Deleted" : "Edited";
131
+ const counts = changeCounts(file.additions, file.removals);
132
+ return ` ${mark}${TOOL_ROW_TEXT(`${verb} ${file.path ?? "file"}`)}${counts ? ` ${counts}` : ""}`;
133
+ });
134
+ const more = event.diff.length - EDIT_FILES_SHOWN;
135
+ return more > 0 ? [...shown, ` ${source_default.dim(`+${more} more file${more === 1 ? "" : "s"}`)}`] : shown;
136
+ }
137
+ function failedOutputRows(event) {
138
+ return failedOutputTail(event.output?.join("\n")).map((line) => ` ${source_default.dim(line)}`);
139
+ }
140
+ function changeCounts(additions, removals) {
141
+ return [additions ? look.paint.success(`+${additions}`) : "", removals ? look.paint.failed(`-${removals}`) : ""].filter(Boolean).join(" ");
142
+ }
143
+ function summaryWithCounts(summary, files) {
144
+ const totals = diffTotals(files);
145
+ const counts = changeCounts(totals.additions, totals.removals);
146
+ return counts ? `${summary} ${counts}` : summary;
147
+ }
148
+ function fileDiffRows(files, budget) {
149
+ const preview = diffPreview(files, budget);
150
+ const gutter = preview.gutter;
151
+ const rows = [];
152
+ for (const { file, lines } of preview.files) {
153
+ if (files.length > 1) {
154
+ const what = file.change === "add" ? " (new)" : file.change === "delete" ? " (deleted)" : "";
155
+ rows.push(` ${source_default.dim(`${file.path ?? "file"}${what}`)} ${changeCounts(file.additions, file.removals)}`.trimEnd());
156
+ }
157
+ for (const line of lines) {
158
+ const number = gutter ? `${line.line === void 0 ? "".padStart(gutter) : String(line.line).padStart(gutter)} ` : "";
159
+ if (line.kind === "gap") rows.push(` ${source_default.dim(`${"".padStart(gutter)}${gutter ? " " : ""}\u22EE`)}`);
160
+ else if (line.kind === "removed") rows.push(` ${source_default.dim(number)}${look.paint.failed(`- ${line.text}`)}`);
161
+ else if (line.kind === "added") rows.push(` ${source_default.dim(number)}${look.paint.success(`+ ${line.text}`)}`);
162
+ else rows.push(` ${source_default.dim(`${number} ${line.text}`)}`);
163
+ }
164
+ }
165
+ const notes = [
166
+ ...preview.hiddenLines > 0 ? [`${preview.hiddenLines} more line${preview.hiddenLines === 1 ? "" : "s"}`] : [],
167
+ ...preview.moreFiles > 0 ? [`${preview.moreFiles} more file${preview.moreFiles === 1 ? "" : "s"}`] : []
168
+ ];
169
+ return notes.length ? [...rows, ` ${source_default.dim(`\u2026 ${notes.join(", ")}`)}`] : rows;
170
+ }
171
+ function outputPreviewRows(event, budget) {
172
+ const { lines, hidden, fromEnd } = outputPreview(event, budget);
173
+ if (!lines.length) return [];
174
+ const note = hidden > 0 ? [` ${source_default.dim(`\u2026 ${hidden} ${fromEnd ? "earlier" : "more"} line${hidden === 1 ? "" : "s"}`)}`] : [];
175
+ const rows = lines.map((line) => ` ${source_default.dim(line)}`);
176
+ return fromEnd ? [...note, ...rows] : [...rows, ...note];
177
+ }
178
+ function outcomeSuffix(event) {
179
+ const outcome = activityOutcome(event);
180
+ return outcome ? `(${outcome.parts.join(" \xB7 ")})` : void 0;
181
+ }
182
+ function nativeActivityPhaseFromValue(harness, parsed) {
183
+ const value = asRecord(parsed);
184
+ if (!value) return void 0;
185
+ const type = String(value.type ?? "");
186
+ const itemType = String(asRecord(value.item)?.type ?? "");
187
+ if (harness.parser === "antigravity" && value.event === "step_update") {
188
+ const step = asRecord(value.step_update);
189
+ if (step?.step_type === "agent_response" && typeof step.text_delta === "string") return "generating response";
190
+ }
191
+ if (/assistant|agent_message/.test(itemType) && /started|delta|completed/.test(type)) return "generating response";
192
+ if (type === "assistant") {
193
+ if (!claudeShaped(harness)) return "generating response";
194
+ if (typeof value.parent_tool_use_id === "string" && value.parent_tool_use_id) return void 0;
195
+ const content = asRecord(value.message)?.content;
196
+ return !Array.isArray(content) || content.some((part) => asRecord(part)?.type === "text") ? "generating response" : void 0;
197
+ }
198
+ if (opencodeShaped(harness) && type === "text") return "generating response";
199
+ return void 0;
200
+ }
201
+
202
+ export {
203
+ xtermRgb,
204
+ LOOK,
205
+ look,
206
+ toolGlyph,
207
+ TOOL_ROW_TEXT,
208
+ thoughtLine,
209
+ renderActivityLine,
210
+ fileDiffRows,
211
+ outputPreviewRows,
212
+ nativeActivityPhaseFromValue
213
+ };