nolo-cli 0.148.0-alpha.1 → 0.151.0-alpha.2

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 (258) hide show
  1. package/{_executeModel-NFJAMAGJ.js → _executeModel-XHAFJ2MM.js} +134 -91
  2. package/accountResolver-7RYB4D2P.js +300 -0
  3. package/action-SXJD5N5R.js +23 -0
  4. package/{addContentAction-B2DRF7P6.js → addContentAction-ZV774PHH.js} +20 -14
  5. package/{addDialogAgentAction-2P2FLTLD.js → addDialogAgentAction-A6SMKAGH.js} +26 -22
  6. package/{agentDeleteCommand-7IDWF6E3.js → agentDeleteCommand-DPUUS56Z.js} +181 -93
  7. package/{agentEmailCommands-4KW33JII.js → agentEmailCommands-V4P5EFLP.js} +132 -112
  8. package/{agentGrantCommands-M3XFO6EN.js → agentGrantCommands-HOJ3JBBQ.js} +3 -3
  9. package/agentListCommands-TWFLUYIZ.js +802 -0
  10. package/{agentMachineCommands-CMQR4RQ4.js → agentMachineCommands-MELPAZZI.js} +58 -62
  11. package/{agentProviderCommands-YK2BIIXZ.js → agentProviderCommands-HL6MBLCL.js} +149 -2
  12. package/{agentPullCommand-HF4A42D4.js → agentPullCommand-FA43RBRU.js} +7 -7
  13. package/agentRecordCommands-FSWSSQIO.js +154 -0
  14. package/agentRunCommand-GDBJVOAT.js +183 -0
  15. package/{agentRunControl-2SKCR4SB.js → agentRunControl-IFM7IGMG.js} +10 -2
  16. package/{agentRuntimeLocal-AK2QVJHY.js → agentRuntimeLocal-KKSQJMTE.js} +47 -50
  17. package/{agentSlice-OZ33K224.js → agentSlice-YO2ZLJMD.js} +23 -16
  18. package/{appDeleteCommands-N3XEVVYC.js → appDeleteCommands-4PL4KYRN.js} +58 -59
  19. package/{appDeployCommands-AWFIXYVW.js → appDeployCommands-EEEXCEB6.js} +67 -63
  20. package/{appDeployStatusCommands-CZRON2FO.js → appDeployStatusCommands-35ZX7T66.js} +56 -56
  21. package/{appGetCommands-XQIUY4TD.js → appGetCommands-WFCHXJWF.js} +56 -56
  22. package/{appListCommands-NNG4H36Y.js → appListCommands-XY2U6DPF.js} +57 -59
  23. package/{authCommand-UBJ4EWYZ.js → authCommand-QYN47CQD.js} +371 -68
  24. package/{authCommands-H6WKKCRW.js → authCommands-77CHYBGF.js} +12 -9
  25. package/{builtinSkillRegistry-ZMF6YGNO.js → builtinSkillRegistry-TDQ6JB2E.js} +13 -11
  26. package/{chromeCommands-2N6MEWRU.js → chromeCommands-OBBNJCLS.js} +314 -13
  27. package/chromeOpsCommands-3Z34RKSE.js +472 -0
  28. package/{chunk-ALXHV7NK.js → chunk-2GGXHQIW.js} +43 -4
  29. package/{localRuntimeAuthority-5W6IJRAD.js → chunk-2IXDJNZI.js} +154 -75
  30. package/{chunk-IVZJWTDI.js → chunk-36OMEXXR.js} +89 -21
  31. package/{chunk-H6A6X4EK.js → chunk-3MZAGMYY.js} +16 -0
  32. package/chunk-3PVYUPXK.js +40 -0
  33. package/chunk-3SZA4U64.js +1192 -0
  34. package/{chunk-GNMAFAIS.js → chunk-44WXLHFI.js} +1 -1
  35. package/{chunk-AGGIDPCZ.js → chunk-4JH2UMJR.js} +6 -0
  36. package/chunk-4LCOCOR5.js +50 -0
  37. package/chunk-4YRTZIVN.js +871 -0
  38. package/chunk-556RW72X.js +14110 -0
  39. package/{chunk-N7J63Q6C.js → chunk-56GBUMO5.js} +10 -1
  40. package/{chunk-W7XHHYWM.js → chunk-5BHQICF2.js} +5 -1
  41. package/{chunk-XUWRURDF.js → chunk-5EBLANFT.js} +1 -1
  42. package/{chunk-3AH7LNUB.js → chunk-5EMSBTQ6.js} +33 -14
  43. package/{chunk-YRRASA5Q.js → chunk-5MM7NNO6.js} +113 -52
  44. package/chunk-5MMAK75Q.js +15 -0
  45. package/{chunk-M5PVFLD4.js → chunk-64K7WX26.js} +90 -21
  46. package/{chunk-AKG5W4LG.js → chunk-6CCFTVBP.js} +76 -221
  47. package/chunk-6MJNEXUU.js +614 -0
  48. package/{chunk-62IL3KQV.js → chunk-6MXDOUMH.js} +15 -3
  49. package/{chunk-QOKAKDPE.js → chunk-6Q7UTJKR.js} +6 -94
  50. package/chunk-6QDYSCPW.js +223 -0
  51. package/{chunk-HYZIYH2H.js → chunk-74RAWNQN.js} +56 -63
  52. package/chunk-7DPNBQSV.js +9 -0
  53. package/chunk-7MOXKPHC.js +119 -0
  54. package/{chunk-523WHFSL.js → chunk-7XKL25PW.js} +1973 -754
  55. package/{chunk-IAESIMK7.js → chunk-A4MW3YZL.js} +10 -14
  56. package/chunk-AGIM7IMJ.js +147 -0
  57. package/{chunk-7CHC4W22.js → chunk-AIZE5TDM.js} +3 -3
  58. package/{chunk-P4BX6FFU.js → chunk-AOCM7HPT.js} +214 -51
  59. package/{chunk-5GVBDNTO.js → chunk-AU7AXHUL.js} +1 -1
  60. package/{chunk-4H22P2JV.js → chunk-AUIJZACN.js} +2073 -1275
  61. package/{chunk-CIF4X6ZM.js → chunk-AWVFQMOV.js} +25 -3
  62. package/{chunk-RYZINGPM.js → chunk-BPMPOFWP.js} +347 -235
  63. package/{chunk-YUNJN43V.js → chunk-BU2YQBV4.js} +215 -28
  64. package/{chunk-XPRWFQQK.js → chunk-CBHGZRCE.js} +38 -12
  65. package/{chunk-Y3PMXGLH.js → chunk-CHCS6XPJ.js} +365 -144
  66. package/chunk-CHOZJMJS.js +78 -0
  67. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  68. package/{chunk-3SV7RM24.js → chunk-D2QN6CTI.js} +117 -72
  69. package/{chunk-5TEEECZM.js → chunk-E2AKSW7L.js} +10 -7
  70. package/{chunk-RSEEDUMS.js → chunk-EDX5XSJM.js} +2 -2
  71. package/{chunk-BKWMNZ2X.js → chunk-ES633ZS5.js} +280 -98
  72. package/{chunk-QDSINZM3.js → chunk-EUGTFFO6.js} +2 -23
  73. package/{chunk-UNYJU5L6.js → chunk-EYLGAEB4.js} +5 -1
  74. package/{chunk-CU3QB4HW.js → chunk-EYWJT7A2.js} +12 -12
  75. package/{chunk-BNGW5ASC.js → chunk-EZVK3N5L.js} +66 -18
  76. package/{chunk-6FGTMQCL.js → chunk-F32Z66T4.js} +6 -10
  77. package/chunk-FJMRBOPO.js +11507 -0
  78. package/{chunk-ZOVKKMF6.js → chunk-FY4SDK2E.js} +1 -1
  79. package/chunk-G6OOUQWJ.js +417 -0
  80. package/{chunk-PQWU42UQ.js → chunk-GCKHQECX.js} +6 -6
  81. package/chunk-GKXCHNTE.js +15 -0
  82. package/{chunk-T7F46O36.js → chunk-GQN2WLAI.js} +20 -11
  83. package/{chunk-P6GMCCAT.js → chunk-GQV5KHJU.js} +78 -12
  84. package/{chunk-B2XUQXQX.js → chunk-HIQ4GF53.js} +191 -68
  85. package/{chunk-YUWMM4US.js → chunk-HKX3ULQB.js} +34 -22
  86. package/{chunk-GMZLP5DV.js → chunk-HNUWUO75.js} +30 -19
  87. package/{chunk-5UTFL4QJ.js → chunk-I2ZMGXXF.js} +10 -5
  88. package/chunk-I42VC5KR.js +15 -0
  89. package/{chunk-3BXNTXYI.js → chunk-I4SN4NUQ.js} +1199 -56
  90. package/chunk-IA7TRNNR.js +11 -0
  91. package/{chunk-WIWM4FE3.js → chunk-IJERIUXS.js} +55 -748
  92. package/{chunk-CPUFH46E.js → chunk-ILU2NPWY.js} +10 -10
  93. package/{chunk-SLLGJZDT.js → chunk-ISQL4V7C.js} +4 -4
  94. package/chunk-IT3ZZRJE.js +12 -0
  95. package/{chunk-LPVCRQMM.js → chunk-IZ7OJB6K.js} +20 -16
  96. package/{chunk-DY7ANLKG.js → chunk-JKMLSTZK.js} +43 -12
  97. package/{chunk-6TPOEJMQ.js → chunk-JZX2XLKC.js} +64 -23
  98. package/{chunk-27ONFIEY.js → chunk-K2AER7RX.js} +19 -12
  99. package/{chunk-O2OWEFII.js → chunk-KFHQQ3NO.js} +1 -1
  100. package/{chunk-QXGPFY6J.js → chunk-LGN377P3.js} +27 -17
  101. package/{chunk-L36OWPP3.js → chunk-LIQJTQRN.js} +118 -139
  102. package/{chunk-FWQEKRTD.js → chunk-LTRUTOHX.js} +36 -31
  103. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  104. package/{chunk-5J3PYNUP.js → chunk-NYYFIKHI.js} +17 -3
  105. package/{chunk-6O4IK4V2.js → chunk-OFFL4DCR.js} +1 -1
  106. package/{chunk-B6SAMB33.js → chunk-OWYYDMGJ.js} +209 -9
  107. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  108. package/{chunk-CTUQJVQM.js → chunk-P5QACQDK.js} +1 -1
  109. package/{chunk-DIXLJWCD.js → chunk-PCKVQXYV.js} +274 -93
  110. package/{chunk-4JMDLJAD.js → chunk-PJNFNEJE.js} +114 -37
  111. package/{chunk-Z4CSIXYP.js → chunk-PLSVXHSA.js} +3 -3
  112. package/{chunk-BIDGLJQ3.js → chunk-PLXDDGBK.js} +45 -8
  113. package/chunk-PWTNI4N7.js +47 -0
  114. package/chunk-QFEW2ULV.js +42 -0
  115. package/{chunk-RGNEEJ3Y.js → chunk-QLQ573SU.js} +35 -9
  116. package/chunk-QQ56R7KS.js +88 -0
  117. package/chunk-QYPE3TS3.js +43 -0
  118. package/{chunk-4DPP773Q.js → chunk-RSHPU4PD.js} +59 -11
  119. package/chunk-RVWMAFIT.js +134 -0
  120. package/{chunk-ESHYE7WU.js → chunk-S73EPYNC.js} +10 -7
  121. package/{chunk-UQNS32WZ.js → chunk-SCMHQUMK.js} +1 -1
  122. package/{chunk-T767MPHB.js → chunk-SMENBO3M.js} +354 -120
  123. package/{chunk-PCVVZ2MH.js → chunk-SSFDFOVT.js} +26 -31
  124. package/chunk-SW4S4XYB.js +1794 -0
  125. package/{chunk-HUFPWXFW.js → chunk-T6X3D7NB.js} +572 -430
  126. package/chunk-TY3TIUJK.js +89 -0
  127. package/{chunk-X2QRZXZH.js → chunk-TYJ5XFEA.js} +4 -4
  128. package/{chunk-ALFH24P3.js → chunk-TYYRSFBG.js} +197 -155
  129. package/{chunk-7KVZ5LDQ.js → chunk-UBUH2TCC.js} +18 -4
  130. package/chunk-UEILX4EV.js +15 -0
  131. package/chunk-UHTDNB5Y.js +140 -0
  132. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  133. package/{chunk-OHOVNO7I.js → chunk-UOKFKFPO.js} +6 -3
  134. package/{chunk-XISEYOGH.js → chunk-USHQX6VT.js} +5 -5
  135. package/chunk-UUPR3TD7.js +53 -0
  136. package/{chunk-HDLLCBRF.js → chunk-VEA7H5FG.js} +2 -2
  137. package/chunk-VHGD6FHV.js +116 -0
  138. package/chunk-VIWDGTDA.js +8 -0
  139. package/{chunk-GOH6RW6F.js → chunk-VJXHL6MH.js} +34 -11
  140. package/{chunk-4XEYAFLY.js → chunk-VL5KOY2C.js} +623 -94
  141. package/{chunk-EADNWBAZ.js → chunk-VP3BINY7.js} +13 -0
  142. package/{chunk-EOARMOVD.js → chunk-W4S6OTSC.js} +6 -3
  143. package/chunk-WD4XYDYC.js +567 -0
  144. package/chunk-WJZOQR2J.js +151 -0
  145. package/{chunk-AUDNYVRC.js → chunk-XETG4RIX.js} +5 -5
  146. package/{chunk-MX574M24.js → chunk-XI7DGLUK.js} +4 -4
  147. package/{chunk-3L2WKC3W.js → chunk-XPWGOTBQ.js} +8 -1
  148. package/chunk-XRUSXPCQ.js +514 -0
  149. package/{chunk-I4OPU5TK.js → chunk-XS47QOFV.js} +273 -11
  150. package/{chunk-S5XGT6GB.js → chunk-XZNCX52W.js} +30 -9
  151. package/{chunk-2JMMBU6V.js → chunk-Y2DXOPSO.js} +1920 -644
  152. package/{chunk-5OA5HMTL.js → chunk-YLMMECCH.js} +1 -1
  153. package/{chunk-CFT5HBGW.js → chunk-YVLQXTUB.js} +448 -12
  154. package/chunk-YVPQATSC.js +709 -0
  155. package/{chunk-DCFPQW22.js → chunk-Z7OJUX6S.js} +122 -107
  156. package/chunk-ZEZC7IIM.js +126 -0
  157. package/{chunk-ALGORS6Y.js → chunk-ZF6526IQ.js} +43 -8
  158. package/chunk-ZIWPQEFU.js +165 -0
  159. package/chunk-ZKZ5X2HS.js +7012 -0
  160. package/chunk-ZRAU6T47.js +56 -0
  161. package/{cliExecutor-AWYR3T33.js → cliExecutor-BWBF2MTI.js} +4 -3
  162. package/{clipboardy-BX4NMYHE.js → clipboardy-GCO3GT3I.js} +3 -8
  163. package/{commandRegistry-YOEQUA7T.js → commandRegistry-XN7C5GHO.js} +183 -107
  164. package/contentThunks-5L7YQI3S.js +84 -0
  165. package/{cooldownCommands-ZLEPIB4A.js → cooldownCommands-JFKTYS2D.js} +2 -2
  166. package/{createAgentAutomationAction-5EJL6ROU.js → createAgentAutomationAction-QOPOLCRK.js} +53 -44
  167. package/createDialogAction-MZ66VY5Q.js +76 -0
  168. package/{createPageAction-75ELC64R.js → createPageAction-VQDJIXMY.js} +65 -54
  169. package/cursorProvider-YGGNMVWX.js +6123 -0
  170. package/{db-VQSAOWAO.js → db-2QOTXYGH.js} +11 -5
  171. package/{dbSlice-DQ32LYTJ.js → dbSlice-J37OGIXH.js} +19 -13
  172. package/{deleteFile-NX6QHCWZ.js → deleteFile-6JWDDRVP.js} +10 -6
  173. package/dialogCommands-YZLSJB6X.js +113 -0
  174. package/{dialogSlice-KSXPGJB2.js → dialogSlice-6RODVYCK.js} +53 -39
  175. package/{docCreateCommands-ZSLGVBZT.js → docCreateCommands-JB2RRMRJ.js} +54 -57
  176. package/{docDeleteCommands-5N4GVZBG.js → docDeleteCommands-AQENULNM.js} +56 -58
  177. package/{docReadCommands-YJSAA7AV.js → docReadCommands-DYD25YLQ.js} +53 -56
  178. package/{docStore-AROBVRCR.js → docStore-ZZA3OPM5.js} +25 -16
  179. package/{docUpdateCommands-WEMLSW6W.js → docUpdateCommands-3GVS23QL.js} +54 -57
  180. package/{fetchMessages-67MEFPZR.js → fetchMessages-IIJWQ3HR.js} +5 -4
  181. package/{getPricing-NMMFT3YI.js → getPricing-FKK3F5EJ.js} +11 -9
  182. package/{handleSendMessageAction-EGNWHAUB.js → handleSendMessageAction-DVG5U26T.js} +619 -165
  183. package/index.js +11 -7
  184. package/{lib-FRRS27KN.js → lib-4YTWAGY7.js} +581 -248
  185. package/{localDialogRead-EBRS242U.js → localDialogRead-FSOMOPDZ.js} +2 -2
  186. package/localRuntimeAdapter-HXRHFKRC.js +244 -0
  187. package/localRuntimeAuthority-JDAD7CB6.js +16 -0
  188. package/{localRuntimeDb-3LRMNLCM.js → localRuntimeDb-CVC62PM5.js} +1 -1
  189. package/{machineCommands-ARZYKGGE.js → machineCommands-5KBF4RCC.js} +503 -161
  190. package/{machineInfo-66ZFUMLE.js → machineInfo-UKPTZO5Y.js} +2 -2
  191. package/machineWsRunDispatch-4OQDEDOR.js +169 -0
  192. package/{memberThunks-5ZXPR63F.js → memberThunks-66DH6ABQ.js} +25 -18
  193. package/{models-ZPU5EDF4.js → models-LAS4B2B5.js} +2 -2
  194. package/package.json +1 -1
  195. package/{providerPresetApply-DD6NGWW6.js → providerPresetApply-MY66I6NT.js} +10 -10
  196. package/{providerRegistry-XDRLMYGJ.js → providerRegistry-QOE2FT57.js} +13 -9
  197. package/{read-EPTJRAEF.js → read-DC4NUGN6.js} +12 -8
  198. package/{readDocTool-W4NDXNEX.js → readDocTool-NCJ5NT25.js} +1 -1
  199. package/{readlineWorkspace-3XOFVARF.js → readlineWorkspace-RIE62QVZ.js} +5022 -921
  200. package/{removeDialogAgentAction-OSYNZRX7.js → removeDialogAgentAction-E2H3OZU6.js} +29 -28
  201. package/{runAgentClientLoop-UMF7VZYZ.js → runAgentClientLoop-KLUUXBZS.js} +154 -97
  202. package/{runtimeDoctorCommands-ID23PNNZ.js → runtimeDoctorCommands-GIOGC5SC.js} +17 -17
  203. package/secretCommands-ZXZRLR3R.js +700 -0
  204. package/setDialogExtraReferencesAction-SITRPMYU.js +37 -0
  205. package/{setPrimaryDialogAgentAction-WZ7KI3YA.js → setPrimaryDialogAgentAction-U7N45TGC.js} +30 -29
  206. package/{chunk-SONWNI3L.js → settingThunks-Y7SVJOMZ.js} +223 -928
  207. package/{skillDiscovery-ZBU76COE.js → skillDiscovery-QC35EQY4.js} +2 -2
  208. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  209. package/{spaceCommands-UJOVU4XI.js → spaceCommands-ZR5BR3GX.js} +59 -59
  210. package/{streamAgentChatTurn-GYGMYOSM.js → streamAgentChatTurn-MN2SSPGA.js} +309 -165
  211. package/{switchDialogAgentAction-GMR7WN3P.js → switchDialogAgentAction-OMGBD3N2.js} +26 -22
  212. package/{tableCommands-G7RV3RU3.js → tableCommands-U3QDY4L6.js} +19 -17
  213. package/{toolApiClient-CVGWM4PN.js → toolApiClient-7WSJJJBV.js} +6 -5
  214. package/tools-W2MOLERY.js +124 -0
  215. package/tuiSummaryLlmCaller-BM3VSTBU.js +130 -0
  216. package/{updateCommands-4EHDLF5J.js → updateCommands-NQXAGFM7.js} +3 -3
  217. package/{updateDialogTitleAction-4U5W4AMH.js → updateDialogTitleAction-Z4JX6REN.js} +102 -57
  218. package/workloadLifecycle-36DXRZKU.js +320 -0
  219. package/action-GI44T4DR.js +0 -31
  220. package/agentListCommands-IW3GQVUP.js +0 -427
  221. package/agentRecordCommands-4YBSYPIY.js +0 -134
  222. package/agentRunCommand-5MU5X5OT.js +0 -161
  223. package/browser-image-compression-MFDTD7K6.js +0 -1763
  224. package/chatQueueReduxAdapter-HVHA2HPM.js +0 -186
  225. package/chromeOpsCommands-IXRLN57H.js +0 -289
  226. package/chunk-42Z3EMC4.js +0 -25363
  227. package/chunk-CQ3WA2NE.js +0 -299
  228. package/chunk-CYSYR67N.js +0 -93
  229. package/chunk-IAG4FHOJ.js +0 -34
  230. package/chunk-JBTJAPUF.js +0 -35
  231. package/chunk-K2CSUCHJ.js +0 -620
  232. package/chunk-LTRXGFMS.js +0 -83
  233. package/chunk-M76ECQRD.js +0 -13658
  234. package/chunk-MEYIRKDN.js +0 -8967
  235. package/chunk-OCZKATRC.js +0 -129
  236. package/chunk-OTGFTBLI.js +0 -13
  237. package/chunk-PUOC4YRO.js +0 -394
  238. package/chunk-QU5A4LYX.js +0 -2415
  239. package/chunk-URMS4XY2.js +0 -10
  240. package/chunk-UV6VISQJ.js +0 -20
  241. package/chunk-VJVNU77E.js +0 -83
  242. package/chunk-WRMKCKZ3.js +0 -13807
  243. package/chunk-Y5GCAMGP.js +0 -9
  244. package/chunk-YPREESF4.js +0 -225
  245. package/contentThunks-AK2F3KNC.js +0 -73
  246. package/createDialogAction-F5WEWA47.js +0 -66
  247. package/dialogCommands-G7YBVAMC.js +0 -102
  248. package/levelLazyShim-GZBKODGI.js +0 -7
  249. package/machineWsRunDispatch-I7F4L532.js +0 -149
  250. package/serverStoreFactory-YMXDF4NI.js +0 -20
  251. package/setDialogExtraReferencesAction-M32UYNCG.js +0 -30
  252. package/settingSlice-Q6EKL7EQ.js +0 -204
  253. package/syncMapping-N6RGXGBW.js +0 -437
  254. package/tools-DU4JXVAV.js +0 -111
  255. package/tuiSummaryLlmCaller-3YFNHCTW.js +0 -128
  256. package/{chunk-SV5IJK6K.js → chunk-NBTY7YJF.js} +3 -3
  257. package/{chunk-2SYTUTLI.js → chunk-YBNHPX4S.js} +3 -3
  258. package/{offlineMarxistsAgentCommand-HGXZV4XJ.js → offlineMarxistsAgentCommand-2QTHJCHV.js} +4 -4
@@ -1,17 +1,14 @@
1
- import {
2
- toErrorMessage
3
- } from "./chunk-HNMXYYJR.js";
4
1
  import {
5
2
  isRecord
6
3
  } from "./chunk-KUG52IAP.js";
7
-
8
- // packages/desktop-chrome-connector/chromeConnector.ts
9
- import { existsSync as existsSync2, readFileSync } from "node:fs";
10
- import { resolve as resolve2 } from "node:path";
4
+ import {
5
+ toErrorMessage
6
+ } from "./chunk-HNMXYYJR.js";
11
7
 
12
8
  // packages/desktop-chrome-connector/uploadSecurity.mjs
13
- import { existsSync, realpathSync, statSync } from "node:fs";
14
- import { isAbsolute, relative, resolve } from "node:path";
9
+ import { existsSync, lstatSync, mkdirSync, realpathSync, statSync } from "node:fs";
10
+ import { homedir } from "node:os";
11
+ import { isAbsolute, join, relative, resolve } from "node:path";
15
12
  var DEFAULT_MAX_FILE_BYTES = 25 * 1024 * 1024;
16
13
  var DEFAULT_MAX_FILES = 10;
17
14
  var UploadSecurityError = class extends Error {
@@ -28,22 +25,106 @@ function isSubpath(parent, child) {
28
25
  const rel = relative(parent, child);
29
26
  return !rel.startsWith("..") && !isAbsolute(rel);
30
27
  }
31
- function parseAllowedRoots(env = process.env) {
32
- const raw = env?.NOLO_CHROME_UPLOAD_ROOTS;
33
- if (!raw || typeof raw !== "string") {
34
- return [];
28
+ var DEFAULT_UPLOAD_ROOT_SUFFIX = join(".nolo", "uploads");
29
+ function resolveDefaultUploadRoot(env = process.env) {
30
+ let home;
31
+ try {
32
+ home = env?.HOME || homedir();
33
+ } catch (err) {
34
+ throw createUploadSecurityError(
35
+ "path_not_allowed",
36
+ `Could not determine the home directory for the default upload root: ${err instanceof Error ? err.message : String(err)}`
37
+ );
35
38
  }
36
- return raw.split(",").map((entry) => entry.trim()).filter(Boolean).filter((entry) => isAbsolute(entry)).map((entry) => {
37
- const resolved = resolve(entry);
38
- if (existsSync(resolved)) {
39
+ if (typeof home !== "string" || !isAbsolute(home)) {
40
+ throw createUploadSecurityError(
41
+ "path_not_allowed",
42
+ `Home directory '${String(home)}' must be an absolute path to derive the default upload root '${DEFAULT_UPLOAD_ROOT_SUFFIX}'.`
43
+ );
44
+ }
45
+ return resolve(join(home, DEFAULT_UPLOAD_ROOT_SUFFIX));
46
+ }
47
+ function splitConfiguredRoots(raw) {
48
+ const entries = typeof raw === "string" ? raw.split(",").map((entry) => entry.trim()).filter(Boolean) : [];
49
+ const absolute = [];
50
+ const dropped = [];
51
+ for (const entry of entries) {
52
+ (isAbsolute(entry) ? absolute : dropped).push(entry);
53
+ }
54
+ return { absolute, dropped };
55
+ }
56
+ function resolveUploadRoots(env = process.env) {
57
+ const raw = env?.NOLO_CHROME_UPLOAD_ROOTS;
58
+ if (raw !== void 0) {
59
+ const { absolute, dropped } = splitConfiguredRoots(raw);
60
+ const roots = absolute.map((entry) => {
61
+ const resolved = resolve(entry);
62
+ if (!existsSync(resolved)) {
63
+ return resolved;
64
+ }
39
65
  try {
40
66
  return realpathSync(resolved);
41
67
  } catch {
42
68
  return resolved;
43
69
  }
70
+ });
71
+ return { configured: true, isDefault: false, roots, dropped };
72
+ }
73
+ const defaultDir = resolveDefaultUploadRoot(env);
74
+ return {
75
+ configured: false,
76
+ isDefault: true,
77
+ roots: [existsSync(defaultDir) ? inspectDefaultUploadRoot(defaultDir) : defaultDir],
78
+ dropped: []
79
+ };
80
+ }
81
+ function ensureDefaultUploadRoot(env = process.env) {
82
+ if (env?.NOLO_CHROME_UPLOAD_ROOTS !== void 0) {
83
+ return resolveUploadRoots(env);
84
+ }
85
+ const defaultDir = resolveDefaultUploadRoot(env);
86
+ if (!existsSync(defaultDir)) {
87
+ try {
88
+ mkdirSync(defaultDir, { recursive: true, mode: 448 });
89
+ } catch (err) {
90
+ throw createUploadSecurityError(
91
+ "path_not_allowed",
92
+ `Default upload root '${defaultDir}' could not be created: ${err instanceof Error ? err.message : String(err)}`
93
+ );
44
94
  }
45
- return resolved;
46
- });
95
+ }
96
+ return { configured: false, isDefault: true, roots: [inspectDefaultUploadRoot(defaultDir)], dropped: [] };
97
+ }
98
+ function inspectDefaultUploadRoot(defaultDir) {
99
+ let lst;
100
+ try {
101
+ lst = lstatSync(defaultDir);
102
+ } catch (err) {
103
+ throw createUploadSecurityError(
104
+ "path_not_allowed",
105
+ `Default upload root '${defaultDir}' could not be inspected: ${err instanceof Error ? err.message : String(err)}`
106
+ );
107
+ }
108
+ if (lst.isSymbolicLink()) {
109
+ throw createUploadSecurityError(
110
+ "path_not_allowed",
111
+ `Default upload root '${defaultDir}' is a symbolic link, which is not permitted. Set NOLO_CHROME_UPLOAD_ROOTS to the real directory if you need a custom location.`
112
+ );
113
+ }
114
+ if (!lst.isDirectory()) {
115
+ throw createUploadSecurityError(
116
+ "path_not_allowed",
117
+ `Default upload root '${defaultDir}' is not a directory.`
118
+ );
119
+ }
120
+ try {
121
+ return realpathSync(defaultDir);
122
+ } catch (err) {
123
+ throw createUploadSecurityError(
124
+ "path_not_allowed",
125
+ `Default upload root '${defaultDir}' canonical path could not be resolved: ${err instanceof Error ? err.message : String(err)}`
126
+ );
127
+ }
47
128
  }
48
129
  function validateUploadFiles(options = {}) {
49
130
  const {
@@ -61,11 +142,14 @@ function validateUploadFiles(options = {}) {
61
142
  `Too many files: ${files.length} provided, maximum allowed is ${maxFiles}.`
62
143
  );
63
144
  }
64
- const allowedRoots = parseAllowedRoots(env);
145
+ const rootsInfo = ensureDefaultUploadRoot(env);
146
+ const allowedRoots = rootsInfo.roots;
65
147
  if (allowedRoots.length === 0) {
148
+ const dropped = rootsInfo.dropped ?? [];
149
+ const droppedHint = dropped.length ? ` Ignored entries: ${dropped.map((entry) => `'${entry}'`).join(", ")} (only absolute paths are accepted; '~' and relative paths are never expanded).` : "";
66
150
  throw createUploadSecurityError(
67
151
  "path_not_allowed",
68
- "Upload roots not configured in NOLO_CHROME_UPLOAD_ROOTS; all uploads are refused."
152
+ `NOLO_CHROME_UPLOAD_ROOTS is set but contains no usable absolute path; all uploads are refused.${droppedHint}`
69
153
  );
70
154
  }
71
155
  const fileStats = [];
@@ -135,6 +219,8 @@ function logUploadAudit(entry, logFn = console.warn) {
135
219
  }
136
220
 
137
221
  // packages/desktop-chrome-connector/chromeConnector.ts
222
+ import { existsSync as existsSync2, readFileSync } from "node:fs";
223
+ import { resolve as resolve2 } from "node:path";
138
224
  var NOLO_CHROME_CONNECTOR_EXTENSION_ID = "ahpdoopadkamnglhlacfjdfnonpjdplg";
139
225
  var NOLO_FIREFOX_CONNECTOR_EXTENSION_ID = "nolo-browser-connector@nolo.chat";
140
226
  var NOLO_CONNECTOR_EXTENSION_IDS = [
@@ -142,6 +228,20 @@ var NOLO_CONNECTOR_EXTENSION_IDS = [
142
228
  NOLO_FIREFOX_CONNECTOR_EXTENSION_ID
143
229
  ];
144
230
  var NOLO_CHROME_CONNECTOR_PROTOCOL_VERSION = "2";
231
+ var NOLO_CHROME_CONNECTOR_DEFAULT_PORTS = {
232
+ chrome: 38947,
233
+ firefox: 38948
234
+ };
235
+ var CONNECTOR_BROWSER_EXTENSION_IDS = {
236
+ chrome: NOLO_CHROME_CONNECTOR_EXTENSION_ID,
237
+ firefox: NOLO_FIREFOX_CONNECTOR_EXTENSION_ID
238
+ };
239
+ function connectorEndpointForBrowser(browser, env = process.env) {
240
+ const explicitUrl = env.NOLO_CHROME_CONNECTOR_RPC_URL;
241
+ if (explicitUrl) return explicitUrl;
242
+ const port = browser === "firefox" ? env.NOLO_FIREFOX_CONNECTOR_PORT : env.NOLO_CHROME_CONNECTOR_PORT;
243
+ return `http://127.0.0.1:${port || NOLO_CHROME_CONNECTOR_DEFAULT_PORTS[browser]}/rpc`;
244
+ }
145
245
  function defaultTokenPath() {
146
246
  return resolve2(
147
247
  process.env.HOME || "",
@@ -217,7 +317,8 @@ function errorPayload(error) {
217
317
  };
218
318
  }
219
319
  var TARGET_REQUIRED_ACTIONS = /* @__PURE__ */ new Set(["click", "type", "set_files"]);
220
- var TAB_ID_REQUIRED_ACTIONS = /* @__PURE__ */ new Set(["close_tab", "detach", "set_files"]);
320
+ var TAB_ID_REQUIRED_ACTIONS = /* @__PURE__ */ new Set(["close_tab", "detach", "set_files", "prepare_browser_action"]);
321
+ var ALLOWED_PREPARE_SUB_ACTIONS = /* @__PURE__ */ new Set(["click", "type", "press"]);
221
322
  function validateChromeConnectorPayload(action, payload) {
222
323
  if (TAB_ID_REQUIRED_ACTIONS.has(action)) {
223
324
  const raw = payload.tabId;
@@ -228,7 +329,56 @@ function validateChromeConnectorPayload(action, payload) {
228
329
  `Provide the tabId from browser_list_tabs before calling ${action}.`
229
330
  );
230
331
  }
231
- if (!TARGET_REQUIRED_ACTIONS.has(action)) return;
332
+ }
333
+ for (const credentialKey of ["challengeId", "prepareId", "preparedActionId", "grantTicket"]) {
334
+ if (payload[credentialKey] !== void 0) {
335
+ const val = payload[credentialKey];
336
+ if (typeof val !== "string" || !val.trim()) {
337
+ throw createConnectorError(
338
+ "INVALID_ARGUMENTS",
339
+ `Consent credential ${credentialKey} must be a non-empty string.`
340
+ );
341
+ }
342
+ }
343
+ }
344
+ if (action === "prepare_browser_action") {
345
+ const rawAction = typeof payload.action === "string" ? payload.action.trim().toLowerCase() : "";
346
+ if (!ALLOWED_PREPARE_SUB_ACTIONS.has(rawAction)) {
347
+ throw createConnectorError(
348
+ "UNSUPPORTED_ACTION",
349
+ `Action '${rawAction || "empty"}' is not supported for preparation; must be click, type, or press.`
350
+ );
351
+ }
352
+ if (payload.ref !== void 0 || payload.elementRef !== void 0) {
353
+ throw createConnectorError(
354
+ "UNSUPPORTED_TARGET_KIND",
355
+ "elementRef targeting is not supported for action preparation; use selector or active."
356
+ );
357
+ }
358
+ const hasActive = payload.active === true;
359
+ const hasSelector = typeof payload.selector === "string" && payload.selector.trim().length > 0;
360
+ if (!hasActive && !hasSelector && rawAction !== "press") {
361
+ throw createConnectorError(
362
+ "MISSING_TARGET_SELECTOR",
363
+ "Target selector or active flag is required for action preparation."
364
+ );
365
+ }
366
+ if (rawAction === "type") {
367
+ if (typeof payload.text !== "string") {
368
+ throw createConnectorError(
369
+ "INVALID_ARGUMENTS",
370
+ "Provide --text for type action preparation."
371
+ );
372
+ }
373
+ } else if (rawAction === "press") {
374
+ if (typeof payload.key !== "string" || !payload.key.trim()) {
375
+ throw createConnectorError(
376
+ "INVALID_ARGUMENTS",
377
+ "Provide --key for press action preparation."
378
+ );
379
+ }
380
+ }
381
+ return;
232
382
  }
233
383
  if (!TARGET_REQUIRED_ACTIONS.has(action)) return;
234
384
  const rawRef = typeof payload.elementRef === "string" ? payload.elementRef : typeof payload.ref === "string" ? payload.ref : "";
@@ -267,8 +417,8 @@ function validateChromeConnectorPayload(action, payload) {
267
417
  }
268
418
  function createChromeConnectorClient(args) {
269
419
  if (args?.request) return { request: args.request };
270
- const defaultPort = process.env.NOLO_CHROME_CONNECTOR_PORT || "38947";
271
- const endpoint = args?.endpoint ?? process.env.NOLO_CHROME_CONNECTOR_RPC_URL ?? `http://127.0.0.1:${defaultPort}/rpc`;
420
+ const browser = args?.browser ?? "chrome";
421
+ const endpoint = args?.endpoint ?? connectorEndpointForBrowser(browser);
272
422
  const fetchImpl = args?.fetchImpl ?? fetch;
273
423
  const token = args?.token ?? readConnectorToken(args?.tokenPath);
274
424
  return {
@@ -319,15 +469,37 @@ var REQUIRED_CHROME_CONNECTOR_FEATURES = {
319
469
  read_console: ["browser_debug"],
320
470
  read_network: ["browser_debug"],
321
471
  detach: ["browser_debug"],
322
- set_files: ["compact_observation_v2", "file_upload"]
472
+ set_files: ["compact_observation_v2", "file_upload"],
473
+ prepare_browser_action: ["prepare_browser_action"]
323
474
  };
324
475
  function requiredFeaturesForConnectorAction(action) {
325
476
  return [...REQUIRED_CHROME_CONNECTOR_FEATURES[action] ?? []];
326
477
  }
478
+ function createChromeConnectorClientResolver(args) {
479
+ const cache = /* @__PURE__ */ new Map();
480
+ const overrides = args?.clients;
481
+ const resolve3 = (selector) => {
482
+ const existing = cache.get(selector);
483
+ if (existing) return existing;
484
+ let client;
485
+ if (selector === "chrome" || selector === "firefox") {
486
+ const inner = overrides?.[selector] ?? createChromeConnectorClient({ browser: selector });
487
+ client = createVerifiedChromeConnectorClient({
488
+ client: inner,
489
+ expectedBrowser: selector
490
+ });
491
+ } else {
492
+ client = overrides?.default ?? createVerifiedChromeConnectorClient({ client: createChromeConnectorClient() });
493
+ }
494
+ cache.set(selector, client);
495
+ return client;
496
+ };
497
+ return resolve3;
498
+ }
327
499
  function createVerifiedChromeConnectorClient(args) {
328
500
  const client = args?.client ?? createChromeConnectorClient();
329
501
  const expectedExtensionIds = new Set(
330
- args?.expectedExtensionIds ?? (args?.expectedExtensionId ? [args.expectedExtensionId] : NOLO_CONNECTOR_EXTENSION_IDS)
502
+ args?.expectedExtensionIds ?? (args?.expectedBrowser ? [CONNECTOR_BROWSER_EXTENSION_IDS[args.expectedBrowser]] : args?.expectedExtensionId ? [args.expectedExtensionId] : NOLO_CONNECTOR_EXTENSION_IDS)
331
503
  );
332
504
  let verified = null;
333
505
  let negotiatedFeatures = [];
@@ -399,9 +571,21 @@ async function executeChromeConnectorTool(args) {
399
571
  };
400
572
  }
401
573
  try {
402
- const { target: _ignoredTarget, ...payload } = parseArguments(args.call.arguments);
574
+ const { target: rawTarget, ...payload } = parseArguments(args.call.arguments);
575
+ const target = typeof rawTarget === "string" && rawTarget.trim().length > 0 ? rawTarget.trim().toLowerCase() : void 0;
576
+ if (target !== void 0 && target !== "chrome" && target !== "firefox") {
577
+ throw createConnectorError(
578
+ "INVALID_BROWSER_TARGET",
579
+ `browser target must be "chrome" or "firefox", received "${rawTarget}".`,
580
+ { receivedTarget: rawTarget }
581
+ );
582
+ }
403
583
  validateChromeConnectorPayload(action, payload);
404
- const result = await (args.client ?? createChromeConnectorClient()).request(action, payload);
584
+ const client = args.clientForTarget?.(target) ?? (target ? createVerifiedChromeConnectorClient({
585
+ client: createChromeConnectorClient({ browser: target }),
586
+ expectedBrowser: target
587
+ }) : args.client ?? createVerifiedChromeConnectorClient({ client: createChromeConnectorClient() }));
588
+ const result = await client.request(action, payload);
405
589
  return {
406
590
  content: JSON.stringify({ ok: true, result }),
407
591
  metadata: {
@@ -424,12 +608,15 @@ async function executeChromeConnectorTool(args) {
424
608
  var CHROME_CONNECTOR_TOOL_ACTIONS = { ...CHROME_TOOL_ACTIONS };
425
609
 
426
610
  export {
611
+ resolveUploadRoots,
427
612
  NOLO_CHROME_CONNECTOR_EXTENSION_ID,
428
613
  NOLO_FIREFOX_CONNECTOR_EXTENSION_ID,
429
614
  NOLO_CONNECTOR_EXTENSION_IDS,
430
615
  NOLO_CHROME_CONNECTOR_PROTOCOL_VERSION,
616
+ NOLO_CHROME_CONNECTOR_DEFAULT_PORTS,
431
617
  createChromeConnectorClient,
432
618
  REQUIRED_CHROME_CONNECTOR_FEATURES,
619
+ createChromeConnectorClientResolver,
433
620
  createVerifiedChromeConnectorClient,
434
621
  executeChromeConnectorTool
435
622
  };
@@ -1,21 +1,24 @@
1
+ import {
2
+ normalizeMediaConfirmExecutionRevision
3
+ } from "./chunk-QYPE3TS3.js";
1
4
  import {
2
5
  getActiveDialogKey
3
- } from "./chunk-B6SAMB33.js";
6
+ } from "./chunk-OWYYDMGJ.js";
7
+ import {
8
+ selectIdentityToken
9
+ } from "./chunk-SEJ5OS6F.js";
4
10
  import {
5
11
  compactWhitespace
6
12
  } from "./chunk-DWLEOOGR.js";
7
13
  import {
8
- asTrimmedLowercaseString
9
- } from "./chunk-QSJ3HFEF.js";
10
- import {
11
- selectIdentityToken
12
- } from "./chunk-SEJ5OS6F.js";
14
+ extractCustomId
15
+ } from "./chunk-M2EJHDJP.js";
13
16
  import {
14
17
  isRecord
15
18
  } from "./chunk-KUG52IAP.js";
16
19
  import {
17
- extractCustomId
18
- } from "./chunk-M2EJHDJP.js";
20
+ asTrimmedLowercaseString
21
+ } from "./chunk-QSJ3HFEF.js";
19
22
 
20
23
  // packages/ai/tools/toolApiClient.ts
21
24
  var MAIN_SERVER = "https://nolo.chat";
@@ -115,18 +118,31 @@ var ToolApiError = class extends Error {
115
118
  status;
116
119
  code;
117
120
  details;
121
+ upperCredits;
122
+ /**
123
+ * 服务端在本次 409 里下发的执行代次(扁平 error.executionRevision,旧形状兼容
124
+ * error.details.executionRevision)。只转述服务端本次的值,绝不另行 GET 补齐。
125
+ * 真值判据复用 normalizeMediaConfirmExecutionRevision(缺失/非法一律缺席,不造值)。
126
+ */
127
+ executionRevision;
118
128
  constructor(message, options) {
119
129
  super(message);
120
130
  this.name = "ToolApiError";
121
131
  this.status = options?.status;
122
132
  this.code = options?.code;
123
133
  this.details = options?.details;
134
+ this.upperCredits = options?.upperCredits;
135
+ this.executionRevision = normalizeMediaConfirmExecutionRevision(
136
+ options?.executionRevision
137
+ );
124
138
  }
125
139
  };
126
140
  var buildToolRequestHeaders = (thunkApi, options = {}) => {
127
141
  const { withAuth = false, agentKey } = options;
128
142
  const { token } = getRequestConfig(thunkApi);
129
- const headers = { "Content-Type": "application/json" };
143
+ const headers = {
144
+ "Content-Type": "application/json"
145
+ };
130
146
  if (withAuth && token) {
131
147
  headers["Authorization"] = `Bearer ${token}`;
132
148
  }
@@ -150,10 +166,12 @@ async function callToolApi(thunkApi, path, body, options = {}) {
150
166
  if (!baseUrl) throw new Error("\u65E0\u6CD5\u83B7\u53D6\u5DE5\u5177\u670D\u52A1\u5668\u5730\u5740\u3002");
151
167
  const url = `${baseUrl}${path}`;
152
168
  const headers = buildToolRequestHeaders(thunkApi, options);
169
+ const method = options.method ?? "POST";
153
170
  const response = await fetch(url, {
154
- method: "POST",
171
+ method,
155
172
  headers,
156
- body: JSON.stringify(maybeAttachDialogId(thunkApi, body))
173
+ ...options.signal ? { signal: options.signal } : {},
174
+ ...method === "GET" ? {} : { body: JSON.stringify(maybeAttachDialogId(thunkApi, body)) }
157
175
  });
158
176
  const contentType = response.headers.get("content-type");
159
177
  const responseText = await response.text();
@@ -161,6 +179,8 @@ async function callToolApi(thunkApi, path, body, options = {}) {
161
179
  let errorMessage = `API \u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${response.status}`;
162
180
  let errorCode;
163
181
  let errorDetails;
182
+ let upperCredits;
183
+ let errorExecutionRevision;
164
184
  try {
165
185
  const errorData = JSON.parse(responseText);
166
186
  const err = errorData?.error;
@@ -168,6 +188,10 @@ async function callToolApi(thunkApi, path, body, options = {}) {
168
188
  errorMessage += `: ${err.message ?? JSON.stringify(err)}`;
169
189
  errorCode = typeof err.code === "string" ? err.code : void 0;
170
190
  errorDetails = err.details;
191
+ if (typeof err.upperCredits === "number") {
192
+ upperCredits = err.upperCredits;
193
+ }
194
+ errorExecutionRevision = err.executionRevision ?? err.details?.executionRevision;
171
195
  }
172
196
  } catch {
173
197
  errorCode = looksLikeHtmlResponse(responseText, contentType) ? "HTML_ERROR_RESPONSE" : "NON_JSON_ERROR_RESPONSE";
@@ -182,7 +206,9 @@ async function callToolApi(thunkApi, path, body, options = {}) {
182
206
  throw new ToolApiError(errorMessage, {
183
207
  status: response.status,
184
208
  code: errorCode,
185
- details: errorDetails
209
+ details: errorDetails,
210
+ upperCredits,
211
+ executionRevision: errorExecutionRevision
186
212
  });
187
213
  }
188
214
  try {