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,21 +1,121 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-2JMMBU6V.js";
3
+ } from "./chunk-Y2DXOPSO.js";
4
4
  import {
5
- i18n_default
6
- } from "./chunk-42Z3EMC4.js";
5
+ runtime_default
6
+ } from "./chunk-556RW72X.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
- } from "./chunk-XUWRURDF.js";
9
+ } from "./chunk-5EBLANFT.js";
10
+ import {
11
+ isRecord
12
+ } from "./chunk-KUG52IAP.js";
10
13
  import {
11
14
  isNoloHostedProvider
12
- } from "./chunk-Y3PMXGLH.js";
15
+ } from "./chunk-CHCS6XPJ.js";
13
16
  import {
14
17
  asTrimmedLowercaseString
15
18
  } from "./chunk-QSJ3HFEF.js";
16
- import {
17
- isRecord
18
- } from "./chunk-KUG52IAP.js";
19
+
20
+ // packages/ai/chat/inlineImageUrlsForCustomProvider.ts
21
+ var INLINE_IMAGE_MAX_BYTES = 5 * 1024 * 1024;
22
+ var INLINE_IMAGE_TOTAL_MAX_BYTES = 20 * 1024 * 1024;
23
+ var FILE_CONTENT_PATH = "/api/v1/db/file/content/";
24
+ var shouldInlineImageUrlsForAgent = (agentConfig) => {
25
+ const apiSource = agentConfig?.apiSource?.toLowerCase();
26
+ const provider = agentConfig?.provider?.toLowerCase();
27
+ const model = agentConfig?.model?.toLowerCase();
28
+ if (apiSource === "custom" || provider === "custom") return true;
29
+ if (isNoloHostedProvider(provider)) return true;
30
+ return provider === "openrouter" && model === "minimax/minimax-m3";
31
+ };
32
+ var isInlineCandidate = (url) => /^https?:\/\//i.test(url) && url.includes(FILE_CONTENT_PATH);
33
+ var bytesToBase64 = (bytes) => {
34
+ const chunks = [];
35
+ for (let offset = 0; offset < bytes.length; offset += 32768) {
36
+ chunks.push(String.fromCharCode.apply(null, Array.from(bytes.subarray(offset, offset + 32768))));
37
+ }
38
+ return btoa(chunks.join(""));
39
+ };
40
+ var defaultFetchImage = async (url, signal, _maxBytes) => {
41
+ const response = await fetch(url, { signal });
42
+ if (!response.ok) {
43
+ return {
44
+ ok: false,
45
+ error: `HTTP ${response.status}`
46
+ };
47
+ }
48
+ const bytes = new Uint8Array(await response.arrayBuffer());
49
+ return {
50
+ ok: true,
51
+ mimeType: response.headers.get("content-type") ?? "application/octet-stream",
52
+ bytes
53
+ };
54
+ };
55
+ var cloneImagePartWithDataUrl = async (part, fetchImage, options, usedBytes) => {
56
+ const url = part?.image_url?.url;
57
+ if (typeof url !== "string" || !isInlineCandidate(url) || options.isAllowedImageUrl && !options.isAllowedImageUrl(url)) return part;
58
+ if (options.signal?.aborted) throw new DOMException("The operation was aborted", "AbortError");
59
+ const remaining = options.maxTotalBytes === void 0 ? void 0 : options.maxTotalBytes - usedBytes.value;
60
+ const fetchLimit = options.maxBytes === void 0 ? remaining : remaining === void 0 ? options.maxBytes : Math.min(options.maxBytes, remaining);
61
+ const result = await fetchImage(url, options.signal, fetchLimit);
62
+ if (options.signal?.aborted) throw new DOMException("The operation was aborted", "AbortError");
63
+ if (result.skippedSize !== void 0) {
64
+ const reason = options.maxBytes !== void 0 && result.skippedSize > options.maxBytes ? "per-image" : "total-budget";
65
+ options.onSkipTooLarge?.(url, result.skippedSize, reason);
66
+ return part;
67
+ }
68
+ if (!result.ok || !result.bytes) return part;
69
+ if (options.maxBytes !== void 0 && result.bytes.byteLength > options.maxBytes) {
70
+ options.onSkipTooLarge?.(url, result.bytes.byteLength, "per-image");
71
+ return part;
72
+ }
73
+ if (options.maxTotalBytes !== void 0 && usedBytes.value + result.bytes.byteLength > options.maxTotalBytes) {
74
+ options.onSkipTooLarge?.(url, result.bytes.byteLength, "total-budget");
75
+ return part;
76
+ }
77
+ usedBytes.value += result.bytes.byteLength;
78
+ const mimeType = (result.mimeType || "application/octet-stream").split(";")[0].trim() || "application/octet-stream";
79
+ return { ...part, image_url: { ...part.image_url, url: `data:${mimeType};base64,${bytesToBase64(result.bytes)}` } };
80
+ };
81
+ var inlineImageUrlsForCustomProvider = async (bodyData, options) => {
82
+ if (!options.shouldInline) return bodyData;
83
+ const body = bodyData;
84
+ if (!Array.isArray(body?.messages)) return bodyData;
85
+ const fetchImage = options.fetchImage ?? defaultFetchImage;
86
+ const fetched = /* @__PURE__ */ new Map();
87
+ const fetchOnce = (url, signal, maxBytes) => {
88
+ let result = fetched.get(url);
89
+ if (!result) {
90
+ result = fetchImage(url, signal, maxBytes);
91
+ fetched.set(url, result);
92
+ }
93
+ return result;
94
+ };
95
+ const usedBytes = { value: 0 };
96
+ let changed = false;
97
+ const messages = [...body.messages];
98
+ for (let mi = messages.length - 1; mi >= 0; mi--) {
99
+ const message = messages[mi];
100
+ if (!Array.isArray(message?.content)) continue;
101
+ const content = [...message.content];
102
+ for (let pi = content.length - 1; pi >= 0; pi--) {
103
+ const part = content[pi];
104
+ if (part?.type !== "image_url") continue;
105
+ if (options.maxTotalBytes !== void 0 && usedBytes.value >= options.maxTotalBytes) {
106
+ if (typeof part?.image_url?.url === "string" && isInlineCandidate(part.image_url.url)) options.onSkipTooLarge?.(part.image_url.url, void 0, "total-budget");
107
+ continue;
108
+ }
109
+ const cloned = await cloneImagePartWithDataUrl(part, fetchOnce, options, usedBytes);
110
+ if (cloned !== part) {
111
+ content[pi] = cloned;
112
+ changed = true;
113
+ }
114
+ }
115
+ if (content.some((part, index) => part !== message.content[index])) messages[mi] = { ...message, content };
116
+ }
117
+ return changed ? { ...body, messages } : bodyData;
118
+ };
19
119
 
20
120
  // packages/ai/tools/toolSchemaCompatibility.ts
21
121
  var COMPOSITION_KEYS = ["anyOf", "oneOf", "allOf"];
@@ -63,12 +163,12 @@ var PREPARE_TOOLS_CACHE_LIMIT = 128;
63
163
  var warnedUnknownToolNames = /* @__PURE__ */ new Set();
64
164
  function getTranslation(keys, defaultVal) {
65
165
  for (const key of keys) {
66
- if (i18n_default.exists(key)) {
67
- return i18n_default.t(key);
166
+ if (runtime_default.exists(key)) {
167
+ return runtime_default.t(key);
68
168
  }
69
169
  const aiKey = key.startsWith("ai:") ? key : `ai:${key}`;
70
- if (i18n_default.exists(aiKey)) {
71
- return i18n_default.t(aiKey);
170
+ if (runtime_default.exists(aiKey)) {
171
+ return runtime_default.t(aiKey);
72
172
  }
73
173
  }
74
174
  return defaultVal;
@@ -115,7 +215,7 @@ function translateSchema(schema) {
115
215
  return nextSchema;
116
216
  }
117
217
  function currentI18nLanguage() {
118
- return typeof i18n_default.language === "string" ? i18n_default.language : "";
218
+ return typeof runtime_default.language === "string" ? runtime_default.language : "";
119
219
  }
120
220
  function translateSchemaCached(schema) {
121
221
  if (!schema || typeof schema !== "object") return schema;
@@ -128,10 +228,11 @@ function translateSchemaCached(schema) {
128
228
  translatedFunctionCache.set(cacheKey, translated);
129
229
  return translated;
130
230
  }
131
- function buildPrepareToolsCacheKey(toolNames, disabledToolNames, provider) {
231
+ function buildPrepareToolsCacheKey(toolNames, disabledToolNames, provider, selectableRuntimeCount) {
132
232
  return [
133
233
  currentI18nLanguage(),
134
234
  provider ?? "",
235
+ selectableRuntimeCount !== void 0 ? String(selectableRuntimeCount) : "",
135
236
  disabledToolNames.join(""),
136
237
  toolNames.join("")
137
238
  ].join("\0");
@@ -148,13 +249,15 @@ function rememberPrepareToolsResult(key, value) {
148
249
  var prepareTools = (toolNames, options) => {
149
250
  const disabledList = canonicalizeToolNames(options?.disabledToolNames ?? []);
150
251
  const disabledToolNames = new Set(disabledList);
151
- const canonicalNames = canonicalizeToolNames(toolNames).filter(
152
- (toolName) => !disabledToolNames.has(toolName)
252
+ const selectableCount = typeof options?.selectableRuntimeCount === "number" ? options.selectableRuntimeCount : typeof options?.runtimeCatalog?.selectableCount === "number" ? options.runtimeCatalog.selectableCount : void 0;
253
+ const canonicalNames = canonicalizeToolNames(toolNames).filter((toolName) => !disabledToolNames.has(toolName)).filter(
254
+ (toolName) => !(selectableCount !== void 0 && selectableCount <= 1 && toolName === "listRuntimes")
153
255
  );
154
256
  const cacheKey = buildPrepareToolsCacheKey(
155
257
  canonicalNames,
156
258
  disabledList,
157
- options?.provider
259
+ options?.provider,
260
+ selectableCount
158
261
  );
159
262
  const cached = prepareToolsResultCache.get(cacheKey);
160
263
  if (cached) {
@@ -180,96 +283,8 @@ var prepareTools = (toolNames, options) => {
180
283
  return prepared.slice();
181
284
  };
182
285
 
183
- // packages/ai/chat/inlineImageUrlsForCustomProvider.ts
184
- var FILE_CONTENT_PATH = "/api/v1/db/file/content/";
185
- var shouldInlineImageUrlsForAgent = (agentConfig) => {
186
- const apiSource = agentConfig?.apiSource?.toLowerCase();
187
- const provider = agentConfig?.provider?.toLowerCase();
188
- const model = agentConfig?.model?.toLowerCase();
189
- if (apiSource === "custom" || provider === "custom") return true;
190
- if (isNoloHostedProvider(provider)) return true;
191
- return provider === "openrouter" && model === "minimax/minimax-m3";
192
- };
193
- var isInlineCandidate = (url) => /^https?:\/\//i.test(url) && url.includes(FILE_CONTENT_PATH);
194
- var bytesToBase64 = (bytes) => {
195
- let binary = "";
196
- for (const byte of bytes) {
197
- binary += String.fromCharCode(byte);
198
- }
199
- return btoa(binary);
200
- };
201
- var defaultFetchImage = async (url) => {
202
- const response = await fetch(url);
203
- if (!response.ok) {
204
- return {
205
- ok: false,
206
- error: `HTTP ${response.status}`
207
- };
208
- }
209
- const bytes = new Uint8Array(await response.arrayBuffer());
210
- return {
211
- ok: true,
212
- mimeType: response.headers.get("content-type") ?? "application/octet-stream",
213
- bytes
214
- };
215
- };
216
- var cloneImagePartWithDataUrl = async (part, fetchImage, isAllowedImageUrl) => {
217
- const url = part?.image_url?.url;
218
- if (typeof url !== "string" || !isInlineCandidate(url) || isAllowedImageUrl && !isAllowedImageUrl(url)) {
219
- return part;
220
- }
221
- const result = await fetchImage(url);
222
- if (!result.ok || !result.bytes) return part;
223
- const mimeType = result.mimeType || "application/octet-stream";
224
- return {
225
- ...part,
226
- image_url: {
227
- ...part.image_url,
228
- url: `data:${mimeType};base64,${bytesToBase64(result.bytes)}`
229
- }
230
- };
231
- };
232
- var inlineImageUrlsForCustomProvider = async (bodyData, options) => {
233
- if (!options.shouldInline) return bodyData;
234
- const body = bodyData;
235
- if (!Array.isArray(body?.messages)) return bodyData;
236
- const fetchImage = options.fetchImage ?? defaultFetchImage;
237
- let changed = false;
238
- const messages = [];
239
- for (const message of body.messages) {
240
- if (!Array.isArray(message?.content)) {
241
- messages.push(message);
242
- continue;
243
- }
244
- const content = await Promise.all(
245
- message.content.map(async (part) => {
246
- if (part?.type !== "image_url") return part;
247
- return cloneImagePartWithDataUrl(
248
- part,
249
- fetchImage,
250
- options.isAllowedImageUrl
251
- );
252
- })
253
- );
254
- let messageChanged = false;
255
- for (let i = 0; i < content.length; i++) {
256
- if (content[i] !== message.content[i]) {
257
- changed = true;
258
- messageChanged = true;
259
- break;
260
- }
261
- }
262
- messages.push(messageChanged ? { ...message, content } : message);
263
- }
264
- if (!changed) return bodyData;
265
- return {
266
- ...body,
267
- messages
268
- };
269
- };
270
-
271
286
  export {
272
- prepareTools,
273
287
  shouldInlineImageUrlsForAgent,
274
- inlineImageUrlsForCustomProvider
288
+ inlineImageUrlsForCustomProvider,
289
+ prepareTools
275
290
  };
@@ -0,0 +1,126 @@
1
+ // packages/connector-experimental/codexBinary.ts
2
+ import { copyFileSync, existsSync, mkdirSync } from "node:fs";
3
+ import { homedir } from "node:os";
4
+ import { dirname, join } from "node:path";
5
+ var WINDOWS_APPS_CODEX_PATTERN = /\\WindowsApps\\OpenAI\.Codex_[^\\]+\\app\\resources$/i;
6
+ function pathEntries(env) {
7
+ return (env.PATH ?? process.env.PATH ?? "").split(process.platform === "win32" ? ";" : ":");
8
+ }
9
+ function findWindowsAppsCodex(env) {
10
+ if (process.platform !== "win32") return "";
11
+ for (const entry of pathEntries(env)) {
12
+ if (!WINDOWS_APPS_CODEX_PATTERN.test(entry)) continue;
13
+ const candidate = join(entry, "codex.exe");
14
+ if (existsSync(candidate)) return candidate;
15
+ }
16
+ return "";
17
+ }
18
+ function copyCodexToUserBin(source, env) {
19
+ const target = env.NOLO_CODEX_SHIM_PATH ?? join(homedir(), ".nolo", "bin", "codex.exe");
20
+ if (existsSync(target)) return target;
21
+ mkdirSync(dirname(target), { recursive: true });
22
+ copyFileSync(source, target);
23
+ return target;
24
+ }
25
+ function resolveLaunchableCodexCommand(env = process.env) {
26
+ const explicit = env.NOLO_CODEX_BIN?.trim();
27
+ if (explicit) return explicit;
28
+ const windowsAppsCodex = findWindowsAppsCodex(env);
29
+ if (windowsAppsCodex) return copyCodexToUserBin(windowsAppsCodex, env);
30
+ return "codex";
31
+ }
32
+
33
+ // packages/connector-experimental/cliProcessEnv.ts
34
+ import { execSync } from "child_process";
35
+ function readMacSystemProxyEnv() {
36
+ if (process.platform !== "darwin") return {};
37
+ try {
38
+ const raw = String(execSync("scutil --proxy", { encoding: "utf8" }) || "");
39
+ const values = /* @__PURE__ */ new Map();
40
+ for (const line of raw.split("\n")) {
41
+ const match = line.match(/^\s*([A-Za-z0-9_]+)\s*:\s*(.+?)\s*$/);
42
+ if (!match) continue;
43
+ values.set(match[1], match[2].replace(/^"|"$/g, ""));
44
+ }
45
+ const httpEnabled = values.get("HTTPEnable") === "1";
46
+ const httpsEnabled = values.get("HTTPSEnable") === "1";
47
+ const httpHost = values.get("HTTPProxy")?.trim();
48
+ const httpsHost = values.get("HTTPSProxy")?.trim();
49
+ const httpPort = values.get("HTTPPort")?.trim();
50
+ const httpsPort = values.get("HTTPSPort")?.trim();
51
+ const noProxy = values.get("ExceptionsList")?.trim();
52
+ const httpProxy = httpEnabled && httpHost && httpPort ? `http://${httpHost}:${httpPort}` : "";
53
+ const httpsProxy = httpsEnabled && httpsHost && httpsPort ? `http://${httpsHost}:${httpsPort}` : "";
54
+ const allProxy = httpsProxy || httpProxy;
55
+ return {
56
+ ...httpProxy ? { HTTP_PROXY: httpProxy, http_proxy: httpProxy } : {},
57
+ ...httpsProxy ? { HTTPS_PROXY: httpsProxy, https_proxy: httpsProxy } : {},
58
+ ...allProxy ? { ALL_PROXY: allProxy, all_proxy: allProxy } : {},
59
+ ...noProxy ? { NO_PROXY: noProxy, no_proxy: noProxy } : {}
60
+ };
61
+ } catch {
62
+ return {};
63
+ }
64
+ }
65
+ function normalizeProxyEnv(env) {
66
+ const explicitHttp = env.HTTP_PROXY?.trim() || env.http_proxy?.trim() || "";
67
+ const explicitHttps = env.HTTPS_PROXY?.trim() || env.https_proxy?.trim() || "";
68
+ const explicitAll = env.ALL_PROXY?.trim() || env.all_proxy?.trim() || "";
69
+ const explicitNoProxy = env.NO_PROXY?.trim() || env.no_proxy?.trim() || "";
70
+ const fallback = explicitHttp || explicitHttps || explicitAll ? {} : readMacSystemProxyEnv();
71
+ const httpProxy = explicitHttp || fallback.HTTP_PROXY || fallback.http_proxy || "";
72
+ const httpsProxy = explicitHttps || fallback.HTTPS_PROXY || fallback.https_proxy || httpProxy;
73
+ const allProxy = explicitAll || fallback.ALL_PROXY || fallback.all_proxy || httpsProxy || httpProxy;
74
+ const noProxy = explicitNoProxy || fallback.NO_PROXY || fallback.no_proxy || "";
75
+ return {
76
+ ...env,
77
+ ...httpProxy ? { HTTP_PROXY: httpProxy, http_proxy: httpProxy } : {},
78
+ ...httpsProxy ? { HTTPS_PROXY: httpsProxy, https_proxy: httpsProxy } : {},
79
+ ...allProxy ? { ALL_PROXY: allProxy, all_proxy: allProxy } : {},
80
+ ...noProxy ? { NO_PROXY: noProxy, no_proxy: noProxy } : {}
81
+ };
82
+ }
83
+ function buildCliProcessEnv(extraEnv) {
84
+ const baseEnv = {
85
+ ...process.env,
86
+ ...extraEnv,
87
+ NO_COLOR: "1"
88
+ };
89
+ if (process.platform === "darwin") {
90
+ const defaultMacPaths = [
91
+ `${process.env.HOME || ""}/.local/bin`,
92
+ "/opt/homebrew/bin",
93
+ "/opt/homebrew/sbin",
94
+ "/usr/local/bin",
95
+ "/usr/local/sbin",
96
+ `${process.env.HOME || ""}/.bun/bin`,
97
+ `${process.env.HOME || ""}/Library/pnpm`,
98
+ `${process.env.HOME || ""}/.npm-global/bin`,
99
+ `${process.env.HOME || ""}/bin`
100
+ ];
101
+ const existingPath = baseEnv.PATH || "/usr/bin:/bin:/usr/sbin:/sbin";
102
+ const paths = existingPath.split(":");
103
+ for (const p of defaultMacPaths) {
104
+ if (p && !paths.includes(p)) {
105
+ paths.unshift(p);
106
+ }
107
+ }
108
+ baseEnv.PATH = paths.join(":");
109
+ }
110
+ if (baseEnv.HOME) {
111
+ const delimiter = process.platform === "win32" ? ";" : ":";
112
+ const openCodeBin = `${baseEnv.HOME}/.opencode/bin`;
113
+ const paths = (baseEnv.PATH || "").split(delimiter);
114
+ if (!paths.includes(openCodeBin)) baseEnv.PATH = [...paths, openCodeBin].filter(Boolean).join(delimiter);
115
+ }
116
+ return Object.fromEntries(
117
+ Object.entries(normalizeProxyEnv(baseEnv)).filter(
118
+ (entry) => typeof entry[1] === "string"
119
+ )
120
+ );
121
+ }
122
+
123
+ export {
124
+ resolveLaunchableCodexCommand,
125
+ buildCliProcessEnv
126
+ };
@@ -1,10 +1,15 @@
1
1
  import {
2
2
  buildLocalAgentLookupKeys,
3
+ classifyAgentApiKeyRef,
4
+ formatUnsupportedAgentApiKeyRefMessage,
3
5
  shouldReadAgentKeyRemotely
4
- } from "./chunk-OTGFTBLI.js";
6
+ } from "./chunk-UUPR3TD7.js";
5
7
  import {
6
8
  resolveCliAgentKeyInput
7
- } from "./chunk-SV5IJK6K.js";
9
+ } from "./chunk-NBTY7YJF.js";
10
+ import {
11
+ createAgentKey
12
+ } from "./chunk-5EMSBTQ6.js";
8
13
  import {
9
14
  toErrorMessage
10
15
  } from "./chunk-HNMXYYJR.js";
@@ -19,9 +24,6 @@ import {
19
24
  readPipeText,
20
25
  spawnProcess
21
26
  } from "./chunk-Y6ROFCZO.js";
22
- import {
23
- createAgentKey
24
- } from "./chunk-3AH7LNUB.js";
25
27
 
26
28
  // packages/cli/agentRecordHelpers.ts
27
29
  import { readFileSync } from "node:fs";
@@ -231,7 +233,14 @@ async function deleteDbRecord(args) {
231
233
  }
232
234
  return data;
233
235
  }
236
+ function assertSupportedAgentApiKeyRef(record) {
237
+ const verdict = classifyAgentApiKeyRef(record?.apiKeyRef);
238
+ if (!verdict.ok) {
239
+ throw new Error(formatUnsupportedAgentApiKeyRefMessage(verdict.ref));
240
+ }
241
+ }
234
242
  async function writeAgentRecord(args) {
243
+ assertSupportedAgentApiKeyRef(args.record);
235
244
  const res = await fetchWithTransportFallback(`${args.serverUrl}/api/v1/db/write/`, {
236
245
  method: "POST",
237
246
  headers: {
@@ -252,6 +261,30 @@ async function writeAgentRecord(args) {
252
261
  throw new Error(`write failed: HTTP ${res.status} ${JSON.stringify(data)}`);
253
262
  }
254
263
  }
264
+ async function invalidateAgentRecordCache(args) {
265
+ const invalidated = [];
266
+ for (const key of new Set(args.keys.filter((k) => typeof k === "string" && k))) {
267
+ try {
268
+ await args.db.del(key);
269
+ invalidated.push(key);
270
+ } catch {
271
+ }
272
+ }
273
+ return invalidated;
274
+ }
275
+ async function refreshAgentRecordCache(args) {
276
+ try {
277
+ await args.db.put(args.agentKey, {
278
+ ...args.record,
279
+ dbKey: args.agentKey,
280
+ key: args.record?.key || args.agentKey,
281
+ serverOrigin: args.serverOrigin,
282
+ cachedAt: Date.now()
283
+ });
284
+ } catch {
285
+ await invalidateAgentRecordCache({ db: args.db, keys: [args.agentKey] });
286
+ }
287
+ }
255
288
  async function resolveAgentRecordFromHybridStore(args) {
256
289
  const agentKey = resolveCliAgentKeyInput(args.agentInput);
257
290
  const authToken = args.cliArgs ? resolveAuthToken(args.cliArgs, args.env) : resolveAuthToken(args.env);
@@ -484,7 +517,7 @@ function parseAgentUpdateArgs(args) {
484
517
  );
485
518
  const expiresAt = parseIsoTimestampOption(readOption(args, "--expires-at"), "--expires-at");
486
519
  const handle = readOption(args, "--handle")?.trim();
487
- const promptSources = [prompt, promptFile, promptDoc].filter(Boolean);
520
+ const promptSources = [prompt, promptFile, promptDoc].filter((value) => value !== void 0);
488
521
  if (promptSources.length > 1) {
489
522
  throw new Error("--prompt / --prompt-file / --prompt-doc are mutually exclusive.");
490
523
  }
@@ -492,7 +525,7 @@ function parseAgentUpdateArgs(args) {
492
525
  if (cliProvider) updates.cliProvider = cliProvider;
493
526
  if (apiSource) updates.apiSource = apiSource;
494
527
  if (provider) updates.provider = provider;
495
- if (prompt) updates.prompt = prompt;
528
+ if (prompt !== void 0) updates.prompt = prompt;
496
529
  if (promptFile) updates.prompt = readFileSync(promptFile, "utf8");
497
530
  if (tools) updates.tools = parseJsonishValue(tools);
498
531
  if (name) updates.name = name;
@@ -523,7 +556,7 @@ async function buildCreatedAgentRecord(args) {
523
556
  const resolvedAgentInput = resolveCliAgentKeyInput(args.parsed.agentInput);
524
557
  const agentKey = resolvedAgentInput.startsWith("agent-") ? resolvedAgentInput : createAgentKey.private(userId || "local", resolvedAgentInput);
525
558
  if (args.parsed.presetId) {
526
- const { resolveProviderPresetFields } = await import("./providerPresetApply-DD6NGWW6.js");
559
+ const { resolveProviderPresetFields } = await import("./providerPresetApply-MY66I6NT.js");
527
560
  const fields = resolveProviderPresetFields(args.parsed.presetId);
528
561
  if (fields.kind === "manual") {
529
562
  throw new Error(
@@ -668,6 +701,8 @@ export {
668
701
  queryUserRecords,
669
702
  deleteDbRecord,
670
703
  writeAgentRecord,
704
+ invalidateAgentRecordCache,
705
+ refreshAgentRecordCache,
671
706
  resolveAgentRecordFromHybridStore,
672
707
  agentRecordHasConfiguredCredential,
673
708
  sanitizeAgentRecordForCliOutput,
@@ -0,0 +1,165 @@
1
+ import {
2
+ noloAgentId
3
+ } from "./chunk-GKXCHNTE.js";
4
+ import {
5
+ normalizeServerOrigin
6
+ } from "./chunk-CF7PE763.js";
7
+ import {
8
+ asTrimmedLowercaseString
9
+ } from "./chunk-QSJ3HFEF.js";
10
+
11
+ // packages/app/theme/fontPreference.ts
12
+ var FONT_PRESET_ALIASES = {
13
+ system: "system",
14
+ default: "system",
15
+ hei: "hei",
16
+ heiti: "hei",
17
+ sans: "hei",
18
+ song: "song",
19
+ songti: "song",
20
+ serif: "song",
21
+ kai: "kai",
22
+ kaiti: "kai",
23
+ "kai-ti": "kai",
24
+ "fang-song": "fang-song",
25
+ fangsong: "fang-song",
26
+ "fang song": "fang-song"
27
+ };
28
+ var normalizeFontPreset = (value) => {
29
+ const normalized = asTrimmedLowercaseString(value);
30
+ if (!Object.hasOwn(FONT_PRESET_ALIASES, normalized)) return void 0;
31
+ return FONT_PRESET_ALIASES[normalized];
32
+ };
33
+
34
+ // packages/ai/policy/types.ts
35
+ var DEFAULT_AGENT_BASE_POLICY = {
36
+ version: 1,
37
+ tone: {
38
+ preset: "default",
39
+ resolutionMode: "blend"
40
+ },
41
+ knowledgeCaptureMaxLevel: 4,
42
+ spaceContextMaxLevel: 4,
43
+ selfEvolutionMode: "knowledge_only"
44
+ };
45
+ var DEFAULT_USER_PREFERENCE_PROFILE = {
46
+ version: 1,
47
+ tone: {
48
+ preset: "default"
49
+ },
50
+ knowledgeCaptureLevel: 2,
51
+ spaceContextLevel: 3
52
+ };
53
+
54
+ // packages/app/settings/settingTypes.ts
55
+ var SYSTEM_DEFAULT_AGENT_ID = "system-default";
56
+
57
+ // packages/app/settings/settingNormalizers.ts
58
+ var hasOwn = (target, key) => Object.prototype.hasOwnProperty.call(target, key);
59
+ var normalizeDefaultAgentIdSetting = (value) => {
60
+ if (typeof value !== "string" || value.trim() === "") {
61
+ return void 0;
62
+ }
63
+ return value === noloAgentId || value === SYSTEM_DEFAULT_AGENT_ID ? SYSTEM_DEFAULT_AGENT_ID : value;
64
+ };
65
+ var normalizeAuthorityHomeServerSetting = (value) => {
66
+ const normalized = normalizeServerOrigin(value);
67
+ return /^https?:\/\//i.test(normalized) ? normalized : null;
68
+ };
69
+ var normalizeTonePresetSetting = (value) => {
70
+ switch (value) {
71
+ case "professional":
72
+ case "friendly":
73
+ case "direct":
74
+ case "pragmatic":
75
+ case "default":
76
+ return value;
77
+ default:
78
+ return DEFAULT_USER_PREFERENCE_PROFILE.tone?.preset ?? "default";
79
+ }
80
+ };
81
+ var normalizePolicyLevelSetting = (value, fallback) => {
82
+ const n = Number(value);
83
+ if (n === 1 || n === 2 || n === 3 || n === 4) {
84
+ return n;
85
+ }
86
+ return fallback;
87
+ };
88
+ var resolveDefaultAgentIdSetting = (value) => normalizeDefaultAgentIdSetting(value) ?? SYSTEM_DEFAULT_AGENT_ID;
89
+ var omitKeys = (record, keys) => {
90
+ const next = { ...record };
91
+ keys.forEach((key) => {
92
+ delete next[key];
93
+ });
94
+ return next;
95
+ };
96
+ var isRecordLike = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
97
+ var normalizeSystemBuiltinSkills = (value, defaults) => {
98
+ const base = isRecordLike(value) ? value : {};
99
+ const result = { ...defaults };
100
+ for (const key of Object.keys(base)) {
101
+ result[key] = Boolean(base[key]);
102
+ }
103
+ return result;
104
+ };
105
+
106
+ // packages/ai/policy/selfUpdateFields.ts
107
+ var AGENT_UPDATE_FIELD_NAMES = [
108
+ "name",
109
+ "handle",
110
+ "model",
111
+ "provider",
112
+ "prompt",
113
+ "introduction",
114
+ "greeting",
115
+ "isPublic",
116
+ "tags",
117
+ "tools",
118
+ "references",
119
+ "temperature",
120
+ "top_p",
121
+ "frequency_penalty",
122
+ "presence_penalty",
123
+ "max_tokens",
124
+ "reasoning_effort"
125
+ ];
126
+ var PRIMARY_AUTO_APPROVE_SELF_UPDATE_FIELDS = [
127
+ "greeting",
128
+ "introduction",
129
+ "tags"
130
+ ];
131
+ var DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS = [
132
+ ...PRIMARY_AUTO_APPROVE_SELF_UPDATE_FIELDS
133
+ ];
134
+ var VALID_AGENT_UPDATE_FIELDS = new Set(AGENT_UPDATE_FIELD_NAMES);
135
+ var normalizeAgentUpdateFieldList = (value, fallback = DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS) => {
136
+ if (!Array.isArray(value)) {
137
+ return [...fallback];
138
+ }
139
+ const normalized = Array.from(
140
+ new Set(
141
+ value.filter(
142
+ (item) => typeof item === "string" && VALID_AGENT_UPDATE_FIELDS.has(item)
143
+ )
144
+ )
145
+ );
146
+ return normalized;
147
+ };
148
+
149
+ export {
150
+ normalizeFontPreset,
151
+ DEFAULT_AGENT_BASE_POLICY,
152
+ DEFAULT_USER_PREFERENCE_PROFILE,
153
+ AGENT_UPDATE_FIELD_NAMES,
154
+ DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS,
155
+ normalizeAgentUpdateFieldList,
156
+ SYSTEM_DEFAULT_AGENT_ID,
157
+ hasOwn,
158
+ normalizeDefaultAgentIdSetting,
159
+ normalizeAuthorityHomeServerSetting,
160
+ normalizeTonePresetSetting,
161
+ normalizePolicyLevelSetting,
162
+ resolveDefaultAgentIdSetting,
163
+ omitKeys,
164
+ normalizeSystemBuiltinSkills
165
+ };