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,6 +1,9 @@
1
1
  import {
2
- applyModelLayerOverride
3
- } from "./chunk-LTRXGFMS.js";
2
+ applyPublicAgentCatalogOverride
3
+ } from "./chunk-XRUSXPCQ.js";
4
+ import {
5
+ buildCliPrompt
6
+ } from "./chunk-ATNTHIZI.js";
4
7
  import {
5
8
  applyImageConfigRuntimeOverride,
6
9
  buildDynamicContexts,
@@ -15,11 +18,8 @@ import {
15
18
  resolveTurnToolContext,
16
19
  trimMessagesWithSummary,
17
20
  validateAccessAndBalance
18
- } from "./chunk-HUFPWXFW.js";
19
- import "./chunk-O2OWEFII.js";
20
- import {
21
- buildCliPrompt
22
- } from "./chunk-ATNTHIZI.js";
21
+ } from "./chunk-T6X3D7NB.js";
22
+ import "./chunk-KFHQQ3NO.js";
23
23
  import {
24
24
  filterAndCleanMessages,
25
25
  handleToolCalls,
@@ -27,15 +27,11 @@ import {
27
27
  readStreamChunk,
28
28
  sendOpenAICompletionsRequest,
29
29
  updateTotalUsage
30
- } from "./chunk-DIXLJWCD.js";
30
+ } from "./chunk-PCKVQXYV.js";
31
31
  import "./chunk-JEXVIMYZ.js";
32
32
  import {
33
33
  prepareTools
34
- } from "./chunk-DCFPQW22.js";
35
- import {
36
- isContextOverflowText,
37
- parseApiError
38
- } from "./chunk-OCZKATRC.js";
34
+ } from "./chunk-Z7OJUX6S.js";
39
35
  import {
40
36
  INVALID_TOOL_ARGS_REPLACEMENT,
41
37
  buildInvalidToolCallSelfHealResult,
@@ -48,40 +44,51 @@ import {
48
44
  sanitizeOutboundResponsesInput,
49
45
  selectResponsesConversationState,
50
46
  updateResponsesConversationState
51
- } from "./chunk-P4BX6FFU.js";
52
- import "./chunk-EOARMOVD.js";
47
+ } from "./chunk-AOCM7HPT.js";
48
+ import "./chunk-W4S6OTSC.js";
53
49
  import "./chunk-HS7MLR74.js";
50
+ import "./chunk-Y2DXOPSO.js";
51
+ import {
52
+ isOwnedAgentRecord,
53
+ resolveBillingSource
54
+ } from "./chunk-JKMLSTZK.js";
55
+ import "./chunk-I2ZMGXXF.js";
56
+ import "./chunk-OXME3PEE.js";
54
57
  import {
58
+ isContextOverflowText,
59
+ parseApiError,
55
60
  performServerProxyFetchWithRetry
56
- } from "./chunk-T767MPHB.js";
57
- import "./chunk-2JMMBU6V.js";
58
- import "./chunk-DY7ANLKG.js";
59
- import "./chunk-5UTFL4QJ.js";
60
- import "./chunk-KQHGZWSV.js";
61
+ } from "./chunk-SMENBO3M.js";
61
62
  import {
62
63
  createSSEParser,
64
+ selectMaxExecutionTime,
63
65
  waitForAbortableDelay
64
- } from "./chunk-BKWMNZ2X.js";
66
+ } from "./chunk-ES633ZS5.js";
65
67
  import "./chunk-NF64D32W.js";
66
- import "./chunk-3L2WKC3W.js";
67
- import "./chunk-4JMDLJAD.js";
68
- import "./chunk-PCVVZ2MH.js";
69
- import "./chunk-CPUFH46E.js";
70
- import "./chunk-YRRASA5Q.js";
68
+ import "./chunk-XPWGOTBQ.js";
69
+ import "./chunk-ZIWPQEFU.js";
70
+ import "./chunk-CBHGZRCE.js";
71
+ import "./chunk-SCMHQUMK.js";
72
+ import "./chunk-RSHPU4PD.js";
73
+ import {
74
+ getPublicImageAgentDefaultProfile,
75
+ getPublicImageAgentMode
76
+ } from "./chunk-VIDPVFP3.js";
77
+ import "./chunk-5MM7NNO6.js";
78
+ import "./chunk-IA7TRNNR.js";
79
+ import "./chunk-AGIM7IMJ.js";
71
80
  import "./chunk-63W5N6P3.js";
72
81
  import "./chunk-VF4K2QE6.js";
73
- import "./chunk-T7F46O36.js";
74
- import "./chunk-6FGTMQCL.js";
75
- import "./chunk-XPRWFQQK.js";
76
- import "./chunk-UQNS32WZ.js";
77
- import "./chunk-MEYIRKDN.js";
78
- import "./chunk-QU5A4LYX.js";
79
- import {
80
- getCurrentSpaceId
81
- } from "./chunk-ZJ7UHBJS.js";
82
+ import "./chunk-GQN2WLAI.js";
83
+ import "./chunk-ILU2NPWY.js";
84
+ import "./chunk-SSFDFOVT.js";
85
+ import "./chunk-F32Z66T4.js";
86
+ import "./chunk-EYWJT7A2.js";
87
+ import "./chunk-ZKZ5X2HS.js";
82
88
  import {
83
89
  addToolMessage,
84
90
  addUserMessage,
91
+ applyBuiltinAgentRuntimeOverride,
85
92
  estimateMissingUsage,
86
93
  finalizeTransientMessageOnError,
87
94
  messageStreamEnd,
@@ -92,21 +99,27 @@ import {
92
99
  selectAllMsgs,
93
100
  selectCurrentDialogConfig,
94
101
  selectDialogConfigByKey,
95
- shouldBlockForGptPro,
96
102
  updateTokens,
97
103
  updateToolMessage
98
- } from "./chunk-42Z3EMC4.js";
104
+ } from "./chunk-556RW72X.js";
99
105
  import "./chunk-523DITKR.js";
100
- import "./chunk-YYLHWIW6.js";
101
- import "./chunk-6O4IK4V2.js";
102
- import "./chunk-LPVCRQMM.js";
106
+ import {
107
+ isOAuthApiKeyRef
108
+ } from "./chunk-UKZX3NHN.js";
109
+ import "./chunk-OFFL4DCR.js";
110
+ import "./chunk-QYPE3TS3.js";
111
+ import "./chunk-IZ7OJB6K.js";
112
+ import "./chunk-4JH2UMJR.js";
113
+ import {
114
+ getCurrentSpaceId
115
+ } from "./chunk-ZJ7UHBJS.js";
116
+ import "./chunk-BYXBJQAS.js";
103
117
  import {
104
118
  createCliChatTurnStream,
105
119
  getCliChatSession,
106
120
  startCliChatSession
107
- } from "./chunk-Z4CSIXYP.js";
121
+ } from "./chunk-PLSVXHSA.js";
108
122
  import "./chunk-5RGU3J7P.js";
109
- import "./chunk-M76ECQRD.js";
110
123
  import {
111
124
  addActiveController,
112
125
  claimDialogTurnPhase,
@@ -118,128 +131,139 @@ import {
118
131
  selectPendingUserInputQueue,
119
132
  setDialogTurnPhase,
120
133
  tokenUsageLiveUpdate
121
- } from "./chunk-B6SAMB33.js";
134
+ } from "./chunk-OWYYDMGJ.js";
135
+ import "./chunk-ZRAU6T47.js";
136
+ import "./chunk-4LCOCOR5.js";
122
137
  import "./chunk-YDH3FDFQ.js";
123
- import "./chunk-MX574M24.js";
124
- import "./chunk-4DPP773Q.js";
125
138
  import {
126
- getPublicImageAgentDefaultProfile,
127
- getPublicImageAgentMode
128
- } from "./chunk-VIDPVFP3.js";
129
- import "./chunk-AGGIDPCZ.js";
130
- import "./chunk-CU3QB4HW.js";
131
- import "./chunk-B2XUQXQX.js";
132
- import "./chunk-6TPOEJMQ.js";
133
- import "./chunk-AUDNYVRC.js";
134
- import "./chunk-KHCLMKZZ.js";
139
+ selectCurrentServer
140
+ } from "./chunk-QFEW2ULV.js";
141
+ import "./chunk-XI7DGLUK.js";
142
+ import "./chunk-EDX5XSJM.js";
143
+ import "./chunk-UAD2WT54.js";
144
+ import {
145
+ patch,
146
+ read,
147
+ selectById,
148
+ write
149
+ } from "./chunk-74RAWNQN.js";
150
+ import "./chunk-3PVYUPXK.js";
151
+ import "./chunk-A4MW3YZL.js";
152
+ import "./chunk-AIZE5TDM.js";
153
+ import {
154
+ selectRuntimeCurrentServer
155
+ } from "./chunk-4YRTZIVN.js";
156
+ import "./chunk-UEILX4EV.js";
157
+ import "./chunk-IJERIUXS.js";
158
+ import {
159
+ getIsDesktopApp
160
+ } from "./chunk-6Q7UTJKR.js";
161
+ import "./chunk-QQ56R7KS.js";
162
+ import "./chunk-OW765XBU.js";
163
+ import {
164
+ selectIdentityToken,
165
+ selectIdentityUser,
166
+ selectIdentityUserId
167
+ } from "./chunk-SEJ5OS6F.js";
168
+ import "./chunk-D2MDMY2M.js";
169
+ import "./chunk-HIQ4GF53.js";
170
+ import "./chunk-JZX2XLKC.js";
171
+ import "./chunk-EUGTFFO6.js";
172
+ import "./chunk-XETG4RIX.js";
173
+ import "./chunk-GKXCHNTE.js";
135
174
  import {
136
175
  assertDesktopAgentRuntimeTurnBodyHasNoRawSecrets,
137
176
  buildDesktopAgentRuntimeAgentConfigSnapshot,
138
177
  buildDesktopAgentRuntimeDialogHistorySnapshot,
139
178
  resolveAgentContextWindow,
140
179
  stripImagePartsForTextOnlyAgent
141
- } from "./chunk-OHOVNO7I.js";
180
+ } from "./chunk-UOKFKFPO.js";
142
181
  import "./chunk-5ZUL4CUO.js";
143
- import "./chunk-CQ3WA2NE.js";
144
- import "./chunk-PQWU42UQ.js";
145
- import "./chunk-N7J63Q6C.js";
146
- import "./chunk-K2CSUCHJ.js";
182
+ import "./chunk-GCKHQECX.js";
183
+ import {
184
+ projectUserPartForModel
185
+ } from "./chunk-G6OOUQWJ.js";
186
+ import "./chunk-56GBUMO5.js";
187
+ import "./chunk-WJZOQR2J.js";
188
+ import "./chunk-WD4XYDYC.js";
147
189
  import {
148
190
  extractImagePartsFromResponseOutput,
149
191
  extractTextFromResponseOutput,
150
192
  toResponsesTools
151
- } from "./chunk-PUOC4YRO.js";
193
+ } from "./chunk-3SZA4U64.js";
152
194
  import {
153
195
  resolveRuntimeToolSurfaceForAgent
154
- } from "./chunk-RGNEEJ3Y.js";
155
- import "./chunk-H6A6X4EK.js";
156
- import "./chunk-S5XGT6GB.js";
157
- import "./chunk-27ONFIEY.js";
196
+ } from "./chunk-QLQ573SU.js";
197
+ import "./chunk-3MZAGMYY.js";
198
+ import "./chunk-6CCFTVBP.js";
158
199
  import {
159
200
  getModelInfo
160
- } from "./chunk-AKG5W4LG.js";
161
- import "./chunk-RYZINGPM.js";
162
- import {
163
- estimateTokenCount
164
- } from "./chunk-PSCNXBYA.js";
165
- import "./chunk-L36OWPP3.js";
166
- import "./chunk-BYXBJQAS.js";
201
+ } from "./chunk-BPMPOFWP.js";
202
+ import "./chunk-5MMAK75Q.js";
167
203
  import "./chunk-DWLEOOGR.js";
168
- import {
169
- isOpenAiResponsesModel
170
- } from "./chunk-7KVZ5LDQ.js";
171
- import {
172
- toErrorMessage
173
- } from "./chunk-HNMXYYJR.js";
174
- import {
175
- getApiEndpoint
176
- } from "./chunk-3BXNTXYI.js";
177
- import "./chunk-W7XHHYWM.js";
178
- import "./chunk-RSEEDUMS.js";
179
- import "./chunk-UAD2WT54.js";
180
- import "./chunk-ZWQUWF6W.js";
181
- import "./chunk-HDLLCBRF.js";
182
- import "./chunk-4VJAC32I.js";
183
- import "./chunk-XUWRURDF.js";
184
- import "./chunk-5J3PYNUP.js";
185
- import "./chunk-CYSYR67N.js";
186
- import "./chunk-Y3PMXGLH.js";
187
- import {
188
- selectCurrentServer,
189
- selectMaxExecutionTime
190
- } from "./chunk-SONWNI3L.js";
191
- import "./chunk-Y5GCAMGP.js";
192
- import "./chunk-QDSINZM3.js";
204
+ import "./chunk-LIQJTQRN.js";
205
+ import "./chunk-UHTDNB5Y.js";
193
206
  import {
194
207
  asRecordOrEmpty
195
208
  } from "./chunk-KX6YBIHG.js";
196
209
  import {
197
- patch,
198
- read,
199
- selectById,
200
- write
201
- } from "./chunk-HYZIYH2H.js";
202
- import "./chunk-7CHC4W22.js";
210
+ isAbortError
211
+ } from "./chunk-7DPNBQSV.js";
212
+ import "./chunk-5EBLANFT.js";
213
+ import "./chunk-NYYFIKHI.js";
214
+ import {
215
+ isSystemBuiltinTrustedAgentKey
216
+ } from "./chunk-EZVK3N5L.js";
217
+ import {
218
+ extractCustomId
219
+ } from "./chunk-M2EJHDJP.js";
203
220
  import {
204
221
  createDialogMessageKeyAndId,
205
222
  dialogMessageKey
206
- } from "./chunk-3AH7LNUB.js";
223
+ } from "./chunk-5EMSBTQ6.js";
224
+ import "./chunk-I42VC5KR.js";
225
+ import "./chunk-U6VC4MU4.js";
226
+ import "./chunk-TYYRSFBG.js";
227
+ import {
228
+ isAntigravityOAuthAgent
229
+ } from "./chunk-XZNCX52W.js";
207
230
  import "./chunk-WWC7I6TA.js";
208
- import "./chunk-QSJ3HFEF.js";
209
- import "./chunk-IAESIMK7.js";
231
+ import "./chunk-PJNFNEJE.js";
210
232
  import {
211
- selectRuntimeCurrentServer
212
- } from "./chunk-WIWM4FE3.js";
233
+ estimateTokenCount
234
+ } from "./chunk-PSCNXBYA.js";
235
+ import "./chunk-K2AER7RX.js";
213
236
  import {
214
- getIsDesktopApp,
215
- isAbortError
216
- } from "./chunk-QOKAKDPE.js";
237
+ isOpenAiResponsesModel
238
+ } from "./chunk-UBUH2TCC.js";
217
239
  import {
218
- selectIdentityToken,
219
- selectIdentityUser,
220
- selectIdentityUserId
221
- } from "./chunk-SEJ5OS6F.js";
222
- import "./chunk-OW765XBU.js";
223
- import "./chunk-GBRG75BQ.js";
240
+ getApiEndpoint
241
+ } from "./chunk-I4SN4NUQ.js";
242
+ import "./chunk-5BHQICF2.js";
224
243
  import {
225
244
  isRecord
226
245
  } from "./chunk-KUG52IAP.js";
227
- import {
228
- isSystemBuiltinTrustedAgentKey
229
- } from "./chunk-BNGW5ASC.js";
230
- import {
231
- extractCustomId
232
- } from "./chunk-M2EJHDJP.js";
233
246
  import {
234
247
  asTrimmedString
235
248
  } from "./chunk-3EUW3WEO.js";
236
- import "./chunk-U6VC4MU4.js";
249
+ import {
250
+ toErrorMessage
251
+ } from "./chunk-HNMXYYJR.js";
237
252
  import "./chunk-LCBAMY2M.js";
238
253
  import "./chunk-4SN6J65J.js";
239
254
  import "./chunk-CF7PE763.js";
240
255
  import {
241
256
  asOptionalTrimmedString
242
257
  } from "./chunk-G3SUCT4W.js";
258
+ import "./chunk-RVWMAFIT.js";
259
+ import "./chunk-CHCS6XPJ.js";
260
+ import {
261
+ asTrimmedLowercaseString
262
+ } from "./chunk-QSJ3HFEF.js";
263
+ import "./chunk-ZWQUWF6W.js";
264
+ import "./chunk-KHCLMKZZ.js";
265
+ import "./chunk-VEA7H5FG.js";
266
+ import "./chunk-4VJAC32I.js";
243
267
  import "./chunk-4VNS5WPM.js";
244
268
 
245
269
  // packages/ai/agent/isVoiceModel.ts
@@ -320,6 +344,15 @@ function runChatQueueTurnEnd(payload) {
320
344
  };
321
345
  }
322
346
 
347
+ // packages/agent-runtime/platformAgentCatalogOverrides.ts
348
+ function applyPlatformAgentOverrides(record, agentKey) {
349
+ if (!record || typeof record !== "object") return record;
350
+ const raw = record;
351
+ const effectiveKey = agentKey ?? (typeof raw.dbKey === "string" ? raw.dbKey : void 0) ?? (typeof raw.key === "string" ? raw.key : void 0) ?? (typeof raw.id === "string" ? raw.id : void 0);
352
+ const builtinApplied = effectiveKey ? applyBuiltinAgentRuntimeOverride(effectiveKey, record) : record;
353
+ return applyPublicAgentCatalogOverride(builtinApplied, effectiveKey);
354
+ }
355
+
323
356
  // packages/ai/chat/streamRetry.ts
324
357
  var MAX_INITIAL_STREAM_RETRIES = 3;
325
358
  var DEFAULT_INITIAL_STREAM_RETRY_AFTER_MS = 1500;
@@ -616,6 +649,7 @@ var sendOpenAIResponseRequest = async ({
616
649
  const toolMessage = {
617
650
  id: runningToolMessageId,
618
651
  dbKey: runningToolDbKey,
652
+ dialogId,
619
653
  role: "tool",
620
654
  content: selfHealContent,
621
655
  toolCallId: callId,
@@ -698,13 +732,22 @@ var sendOpenAIResponseRequest = async ({
698
732
  const functionTools = getModelInfo(agentConfig.model)?.hasImageOutput ? [] : prepareTools(agentConfig.tools ?? [], { provider: agentConfig.provider });
699
733
  const imageMode = getPublicImageAgentMode(agentConfig);
700
734
  const imageProfile = imageMode === "continuous" ? getPublicImageAgentDefaultProfile("continuous") : null;
735
+ const imageGenerationModel = asOptionalTrimmedString(
736
+ agentConfig?.imageModel
737
+ );
701
738
  const tools = [
702
739
  ...toResponsesTools(functionTools) ?? [],
703
- ...shouldEnableBuiltInImageGeneration(agentConfig) ? [{ type: "image_generation" }] : [],
740
+ ...shouldEnableBuiltInImageGeneration(agentConfig) ? [
741
+ {
742
+ type: "image_generation",
743
+ ...imageGenerationModel ? { model: imageGenerationModel } : {}
744
+ }
745
+ ] : [],
704
746
  ...imageMode === "continuous" ? [
705
747
  {
706
748
  type: "image_generation",
707
749
  action: "auto",
750
+ ...imageGenerationModel ? { model: imageGenerationModel } : {},
708
751
  quality: imageProfile?.quality,
709
752
  output_format: imageProfile?.outputFormat
710
753
  }
@@ -1088,18 +1131,93 @@ var buildAgentViewMessages = (allMessages, currentAgentKey) => {
1088
1131
  return result;
1089
1132
  };
1090
1133
 
1091
- // packages/ai/agent/quickChatModelOverride.ts
1092
- function applyQuickChatModelOverride(base, override) {
1093
- return applyModelLayerOverride(
1094
- base,
1095
- override
1096
- );
1134
+ // packages/core/gptProTier.ts
1135
+ var GPT_PRO_REQUIRED_RECHARGE_AMOUNT = 199;
1136
+ var SUPPORTED_TIER_PROVIDERS = /* @__PURE__ */ new Set([
1137
+ "nolo",
1138
+ "openai",
1139
+ "deepinfra"
1140
+ ]);
1141
+ var CLAUDE_PREMIUM_RE = /^(?:anthropic\/)?claude-(opus|fable)(?:-\d+(?:[.-]\d+)*(?:-[a-z0-9]+)*)?$/i;
1142
+ var GPT_PRO_RE = /^(?:openai\/)?gpt-[a-z0-9.-]+-pro(?:-[a-z0-9]+(?:[.-][a-z0-9]+)*)?$/i;
1143
+ var GPT_SOL_RE = /^(?:openai\/)?gpt-\d+(?:\.\d+)*-sol(?:-[a-z0-9]+(?:[.-][a-z0-9]+)*)?$/i;
1144
+ var KIMI_K3_MODELS = /* @__PURE__ */ new Set([
1145
+ "kimi-k3",
1146
+ "moonshotai/kimi-k3"
1147
+ ]);
1148
+ function classifyPremiumModel(model) {
1149
+ const normalizedModel = asTrimmedLowercaseString(model);
1150
+ if (!normalizedModel) return void 0;
1151
+ const claudeMatch = CLAUDE_PREMIUM_RE.exec(normalizedModel);
1152
+ if (claudeMatch) {
1153
+ return claudeMatch[1].toLowerCase() === "opus" ? "claude-opus" : "claude-fable";
1154
+ }
1155
+ if (GPT_PRO_RE.test(normalizedModel)) {
1156
+ return "gpt-pro";
1157
+ }
1158
+ if (GPT_SOL_RE.test(normalizedModel)) {
1159
+ return "gpt-sol";
1160
+ }
1161
+ if (KIMI_K3_MODELS.has(normalizedModel)) {
1162
+ return "kimi-k3";
1163
+ }
1164
+ return void 0;
1165
+ }
1166
+ function isGptProModel(provider, model) {
1167
+ const normalizedProvider = asTrimmedLowercaseString(provider);
1168
+ if (!SUPPORTED_TIER_PROVIDERS.has(normalizedProvider)) {
1169
+ return false;
1170
+ }
1171
+ return classifyPremiumModel(model) !== void 0;
1172
+ }
1173
+ var GPT_PRO_BLOCKED_MESSAGE = `GPT Pro / Kimi K3 \u7B49\u9AD8\u7EA7\u6A21\u578B\u9700\u8981\u5148\u5F00\u901A ${GPT_PRO_REQUIRED_RECHARGE_AMOUNT} \u79EF\u5206\u6863\u4F4D\u3002`;
1174
+ function shouldBlockForGptPro(input) {
1175
+ if (input?.premium !== true || input?.platformPaid !== true) {
1176
+ return { blocked: false };
1177
+ }
1178
+ if (asTrimmedLowercaseString(input.gptProStatus) === "active") {
1179
+ return { blocked: false };
1180
+ }
1181
+ return { blocked: true, message: GPT_PRO_BLOCKED_MESSAGE };
1182
+ }
1183
+
1184
+ // packages/ai/agent/platformPaidCall.ts
1185
+ var asTrimmed = (value) => typeof value === "string" ? value.trim() : "";
1186
+ var hasOAuthCredentialShape = (agentConfig) => isOAuthApiKeyRef(agentConfig?.apiKeyRef) || isAntigravityOAuthAgent({
1187
+ key: "platform-paid-call-probe",
1188
+ apiKeyRef: agentConfig?.apiKeyRef ?? void 0,
1189
+ provider: agentConfig?.provider ?? void 0,
1190
+ customProviderUrl: agentConfig?.customProviderUrl ?? void 0
1191
+ });
1192
+ function isPlatformPaidAgentCall(probe) {
1193
+ const agentConfig = probe?.agentConfig ?? {};
1194
+ const authKind = asTrimmed(probe?.authKind);
1195
+ if (authKind) return authKind === "platform-key";
1196
+ if (asTrimmed(agentConfig.apiSource) === "cli") return false;
1197
+ return resolveBillingSource({
1198
+ local: agentConfig.local,
1199
+ isLocal: agentConfig.isLocal,
1200
+ cliProvider: agentConfig.cliProvider,
1201
+ apiSource: agentConfig.apiSource,
1202
+ provider: agentConfig.provider,
1203
+ billingSource: agentConfig.billingSource,
1204
+ // 形态证明而非记录自声明(见文件头):自声明 isOAuth 不足以证明 OAuth 通道归属。
1205
+ isOAuth: hasOAuthCredentialShape(agentConfig),
1206
+ apiKeyRef: agentConfig.apiKeyRef,
1207
+ customProviderUrl: agentConfig.customProviderUrl,
1208
+ isOwned: isOwnedAgentRecord(
1209
+ agentConfig,
1210
+ asTrimmed(probe?.callerUserId) || void 0
1211
+ ),
1212
+ userId: agentConfig.userId,
1213
+ ownerId: agentConfig.ownerId
1214
+ }) === "platform_credits";
1097
1215
  }
1098
1216
 
1099
1217
  // packages/ai/agent/persistMessageWithFixedId.ts
1100
1218
  async function persistMessageWithFixedId(dispatch, message) {
1101
1219
  dispatch(addUserMessage(message));
1102
- const { controller, ...messageToWrite } = message;
1220
+ const { controller, dialogId: _dialogId, ...messageToWrite } = message;
1103
1221
  try {
1104
1222
  const writeRequest = dispatch(
1105
1223
  write({
@@ -1363,7 +1481,8 @@ var toolMessageWillPersist = (toolMsg) => {
1363
1481
  if (typeof content === "string") return content.trim().length > 0;
1364
1482
  return Array.isArray(content) && content.length > 0;
1365
1483
  };
1366
- var shouldUseDesktopLocalRuntime = (agentConfig) => {
1484
+ var shouldUseDesktopLocalRuntime = (agentConfig, explicitTarget) => {
1485
+ if (explicitTarget?.kind === "machine") return false;
1367
1486
  if (!getIsDesktopApp()) return false;
1368
1487
  return agentConfig?.apiSource !== "cli";
1369
1488
  };
@@ -1604,11 +1723,7 @@ var finalizeQuickChatAgentTurnFailure = async (dispatch, dialogKey, agentKey, er
1604
1723
  var normalizeAgentRunUserInput = (userInput) => {
1605
1724
  if (typeof userInput === "string") return userInput;
1606
1725
  if (!Array.isArray(userInput)) return "";
1607
- return userInput.filter((part) => {
1608
- if (!part || typeof part !== "object") return false;
1609
- if (part.type === "text") return typeof part.text === "string";
1610
- return part.type === "image_url" && typeof part.image_url?.url === "string" && !!part.image_url.url.trim();
1611
- });
1726
+ return userInput.flatMap((part) => projectUserPartForModel(part));
1612
1727
  };
1613
1728
  var isSimpleTextInput = (userInput) => {
1614
1729
  if (typeof userInput === "string") return true;
@@ -1794,6 +1909,9 @@ function createRemoteToolEventHandlers(opts) {
1794
1909
  isStreaming: false,
1795
1910
  content: projectedContent,
1796
1911
  toolName,
1912
+ // F1: keep server-projected metadata (incl. executionLocation)
1913
+ // on the message so tool rows can render the actual host.
1914
+ ...mergedMeta ? { metadata: mergedMeta } : {},
1797
1915
  toolPayload: {
1798
1916
  ...existing.toolPayload ?? {},
1799
1917
  toolName,
@@ -1813,6 +1931,9 @@ function createRemoteToolEventHandlers(opts) {
1813
1931
  isStreaming: false,
1814
1932
  toolName,
1815
1933
  toolCallId: callId,
1934
+ // F1: surface executionLocation (and any other server metadata)
1935
+ // even on the no-prior-call fallback path.
1936
+ ...mergedMeta ? { metadata: mergedMeta } : {},
1816
1937
  toolPayload: {
1817
1938
  toolName,
1818
1939
  status: resultStatus,
@@ -1910,7 +2031,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
1910
2031
  rawAgentConfig = providedAgentConfig;
1911
2032
  agentConfigSource = "provided";
1912
2033
  } else if (isUsableAgentConfig(cachedAgentConfig)) {
1913
- rawAgentConfig = cachedAgentConfig;
2034
+ rawAgentConfig = applyPlatformAgentOverrides(cachedAgentConfig, agentKey);
1914
2035
  agentConfigSource = "cache";
1915
2036
  } else {
1916
2037
  const builtinFallback = resolveBuiltinPlatformAgentRecord(
@@ -1923,10 +2044,10 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
1923
2044
  quickChatPerfStartedAt
1924
2045
  );
1925
2046
  if (isUsableAgentConfig(readConfig)) {
1926
- rawAgentConfig = readConfig;
2047
+ rawAgentConfig = applyPlatformAgentOverrides(readConfig, agentKey);
1927
2048
  agentConfigSource = "read";
1928
2049
  } else {
1929
- rawAgentConfig = builtinFallback ?? readConfig ?? null;
2050
+ rawAgentConfig = builtinFallback ?? (readConfig ? applyPlatformAgentOverrides(readConfig, agentKey) : null);
1930
2051
  agentConfigSource = builtinFallback ? "builtin-unusable-record" : "read";
1931
2052
  }
1932
2053
  } catch (error) {
@@ -1944,18 +2065,6 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
1944
2065
  `Agent config not found for ID: ${agentKey}`
1945
2066
  );
1946
2067
  }
1947
- if (runtimeOptions?.quickChatModelOverride) {
1948
- rawAgentConfig = applyQuickChatModelOverride(
1949
- rawAgentConfig,
1950
- runtimeOptions.quickChatModelOverride
1951
- );
1952
- }
1953
- if (runtimeOptions?.quickChatReasoningEffort && (rawAgentConfig.model === "deepseek-flash" || rawAgentConfig.model === "deepseek-v4-flash" || rawAgentConfig.model === "deepseek-v4-flash-vision-exp" || rawAgentConfig.model === "deepseek-v4-pro")) {
1954
- rawAgentConfig = {
1955
- ...rawAgentConfig,
1956
- reasoning_effort: runtimeOptions.quickChatReasoningEffort
1957
- };
1958
- }
1959
2068
  if (isLiveAudioOnlyAgent(rawAgentConfig)) {
1960
2069
  return rejectWithValue(
1961
2070
  "\u6B64 Agent \u4EC5\u652F\u6301\u5B9E\u65F6\u8BED\u97F3\u6A21\u5F0F\uFF0C\u8BF7\u4F7F\u7528\u8BED\u97F3\u9762\u677F\u8FDB\u884C\u5BF9\u8BDD\u3002"
@@ -1972,18 +2081,29 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
1972
2081
  apiSource: agentConfig.apiSource,
1973
2082
  source: agentConfigSource
1974
2083
  });
1975
- const gptProCheck = shouldBlockForGptPro(
1976
- agentConfig,
1977
- selectIdentityUser(getState())?.gptProAccess?.status
1978
- );
2084
+ const identityState = getState();
2085
+ const gptProCheck = shouldBlockForGptPro({
2086
+ premium: isGptProModel(agentConfig.provider, agentConfig.model),
2087
+ platformPaid: isPlatformPaidAgentCall({
2088
+ agentConfig,
2089
+ callerUserId: selectIdentityUserId(identityState)
2090
+ }),
2091
+ gptProStatus: selectIdentityUser(identityState)?.gptProAccess?.status
2092
+ });
1979
2093
  if (gptProCheck.blocked) {
1980
2094
  return rejectWithValue(gptProCheck.message);
1981
2095
  }
1982
2096
  const configuredBoundMachineId = asTrimmedString(
1983
2097
  agentConfig.runtimeBinding?.machineId
1984
2098
  );
1985
- const boundMachineId = resolveRemoteBoundMachineId(configuredBoundMachineId);
1986
- if (agentConfig.apiSource === "cli" || boundMachineId && !getIsDesktopApp()) {
2099
+ const currentDialog = selectDialogConfigByKey(state, explicitDialogKey) ?? selectCurrentDialogConfig(state);
2100
+ const explicitTarget = runtimeOptions?.runtimeTarget ?? (currentDialog?.runtimeBinding?.target?.kind === "server" || currentDialog?.runtimeBinding?.target?.kind === "machine" ? currentDialog.runtimeBinding.target : void 0);
2101
+ const boundMachineId = explicitTarget ? explicitTarget.kind === "machine" ? asTrimmedString(explicitTarget.machineId) : null : resolveRemoteBoundMachineId(configuredBoundMachineId);
2102
+ const hasExplicitMachineTarget = explicitTarget?.kind === "machine";
2103
+ if (hasExplicitMachineTarget && !boundMachineId) {
2104
+ return rejectWithValue("\u663E\u5F0F\u9009\u62E9\u7684\u7535\u8111\u76EE\u6807\u7F3A\u5C11 machineId\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6267\u884C\u7535\u8111\u3002");
2105
+ }
2106
+ if (hasExplicitMachineTarget || agentConfig.apiSource === "cli" && !explicitTarget || boundMachineId && !getIsDesktopApp()) {
1987
2107
  console.info("[streamAgentChatTurn] Triggered CLI/machine route. apiSource:", agentConfig.apiSource, "boundMachineId:", boundMachineId, "agentKey:", agentKey);
1988
2108
  const currentState = getState();
1989
2109
  const w2 = typeof globalThis !== "undefined" && globalThis.window ? globalThis.window : null;
@@ -2018,6 +2138,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2018
2138
  let accumulated2 = "";
2019
2139
  let totalTurnUsage2 = void 0;
2020
2140
  const buildMachineAssistantMessage = () => ({
2141
+ dialogId: dialogId2,
2021
2142
  id: messageId,
2022
2143
  dbKey: msgKey,
2023
2144
  role: "assistant",
@@ -2067,6 +2188,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2067
2188
  stream: true,
2068
2189
  persistDialog: false,
2069
2190
  clientDialogId: dialogId2,
2191
+ ...explicitTarget ? { runtimeTarget: explicitTarget } : {},
2070
2192
  runtimeContext: {
2071
2193
  surface: "web",
2072
2194
  host: "browser",
@@ -2292,6 +2414,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2292
2414
  let cliTurnUsage = null;
2293
2415
  const decoder = new TextDecoder();
2294
2416
  const buildCliAssistantMessage = () => ({
2417
+ dialogId: dialogId2,
2295
2418
  id: messageId,
2296
2419
  dbKey: msgKey,
2297
2420
  role: "assistant",
@@ -2399,6 +2522,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2399
2522
  dialogId: dialogId2,
2400
2523
  dialogKey: dialogKey2,
2401
2524
  usage: cliUsage,
2525
+ contextUsageAuthoritative: !isCliEstimated,
2402
2526
  agentConfig: isCliEstimated ? { ...agentConfig, apiSource: "cli" } : agentConfig
2403
2527
  })).unwrap();
2404
2528
  } catch (err) {
@@ -2414,7 +2538,6 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2414
2538
  }
2415
2539
  return;
2416
2540
  }
2417
- const currentDialog = selectDialogConfigByKey(state, explicitDialogKey) ?? selectCurrentDialogConfig(state);
2418
2541
  const activeDialogKey = currentDialog?.dbKey;
2419
2542
  const dialogKey = explicitDialogKey || activeDialogKey;
2420
2543
  if (!dialogKey) {
@@ -2426,7 +2549,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2426
2549
  dialogKey,
2427
2550
  dialogId
2428
2551
  });
2429
- if (shouldUseDesktopLocalRuntime(agentConfig)) {
2552
+ if (shouldUseDesktopLocalRuntime(agentConfig, explicitTarget)) {
2430
2553
  const desktopMessageMetadata = buildMessageMetadata(agentConfig);
2431
2554
  const w2 = typeof globalThis !== "undefined" && globalThis.window ? globalThis.window : null;
2432
2555
  loopKey = `loop:${dialogId}`;
@@ -2440,6 +2563,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2440
2563
  let streamError = null;
2441
2564
  let reasoningBuffer = "";
2442
2565
  const activeToolMessages = /* @__PURE__ */ new Map();
2566
+ let desktopToolExecutionLocation = void 0;
2443
2567
  const ensureAssistantMessageKeys = () => {
2444
2568
  if (!assistantMessageKeys) {
2445
2569
  assistantMessageKeys = createDialogMessageKeyAndId(dialogId);
@@ -2547,15 +2671,22 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2547
2671
  isStreaming: true,
2548
2672
  toolName: toolEvent.toolName,
2549
2673
  toolCallId: callId,
2674
+ // F2: 实际执行位置(服务端/runtime 投影)挂到 tool
2675
+ // 卡片 metadata。优先事件自带 metadata(runtime
2676
+ // 投影层直接注入的同名字段),兜底用 turn 级
2677
+ // execution_location 帧。缺失/不合法时渲染层
2678
+ // projectToolExecutionLocation 收敛为 unknown。
2679
+ metadata: {
2680
+ ...isRecord(toolEvent.metadata) ? toolEvent.metadata : {},
2681
+ ...desktopToolExecutionLocation !== void 0 && !(isRecord(toolEvent.metadata) && toolEvent.metadata.executionLocation !== void 0) ? { executionLocation: desktopToolExecutionLocation } : {},
2682
+ ...toolEvent.argumentsPreview ? { argumentsPreview: toolEvent.argumentsPreview } : {}
2683
+ },
2550
2684
  ...toolEvent.argumentsPreview ? {
2551
2685
  toolPayload: {
2552
2686
  input: {
2553
2687
  command: toolEvent.argumentsPreview,
2554
2688
  cmd: toolEvent.argumentsPreview
2555
2689
  }
2556
- },
2557
- metadata: {
2558
- argumentsPreview: toolEvent.argumentsPreview
2559
2690
  }
2560
2691
  } : {}
2561
2692
  };
@@ -2570,7 +2701,13 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2570
2701
  const mergedMeta = {
2571
2702
  ...existingMeta,
2572
2703
  ...toolEvent.metadata,
2573
- ...isError ? { error: true, message: toolEvent.message } : {}
2704
+ ...isError ? { error: true, message: toolEvent.message } : {},
2705
+ // 服务端/runtime 已在事件 metadata 带
2706
+ // executionLocation 时尊重之;tool-call 阶段
2707
+ // 已写入的值由 existingMeta 保留;仅当两边都
2708
+ // 没有且 turn 级 execution_location 帧存在时
2709
+ // 兜底补上,绝不覆盖已有值。
2710
+ ...existingMeta.executionLocation === void 0 && (!isRecord(toolEvent.metadata) || toolEvent.metadata.executionLocation === void 0) && desktopToolExecutionLocation !== void 0 ? { executionLocation: desktopToolExecutionLocation } : {}
2574
2711
  };
2575
2712
  const toolResultMsg = {
2576
2713
  ...existing,
@@ -2592,6 +2729,8 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2592
2729
  } else if (event.type === "status") {
2593
2730
  const phase = event.phase === "validating-context" ? "validating" : event.phase;
2594
2731
  setDialogTurnPhase({ phase, dialogKey, turnId: turnPhaseTurnId ?? void 0 });
2732
+ } else if (event.type === "execution_location") {
2733
+ desktopToolExecutionLocation = event.location;
2595
2734
  } else if (event.type === "done") {
2596
2735
  streamResult = event.result;
2597
2736
  } else if (event.type === "error") {
@@ -2632,6 +2771,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2632
2771
  stopToolNameById
2633
2772
  );
2634
2773
  await persistMessageWithFixedId(dispatch, {
2774
+ dialogId,
2635
2775
  id: segment2.messageId,
2636
2776
  dbKey: segment2.key,
2637
2777
  role: "assistant",
@@ -2682,6 +2822,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2682
2822
  errorToolNameById
2683
2823
  );
2684
2824
  await persistMessageWithFixedId(dispatch, {
2825
+ dialogId,
2685
2826
  id: segment2.messageId,
2686
2827
  dbKey: segment2.key,
2687
2828
  role: "assistant",
@@ -2858,6 +2999,7 @@ ${info.actionHint}` : streamError;
2858
2999
  let accumulated = "";
2859
3000
  let totalTurnUsage2 = void 0;
2860
3001
  const buildRemoteAssistantMessage = () => ({
3002
+ dialogId,
2861
3003
  id: messageId,
2862
3004
  dbKey: msgKey,
2863
3005
  role: "assistant",
@@ -2902,6 +3044,7 @@ ${info.actionHint}` : streamError;
2902
3044
  stream: true,
2903
3045
  persistDialog: false,
2904
3046
  clientDialogId: dialogId,
3047
+ ...explicitTarget ? { runtimeTarget: explicitTarget } : {},
2905
3048
  runtimeContext: {
2906
3049
  surface: "web",
2907
3050
  host: "browser",
@@ -3066,6 +3209,7 @@ ${info.actionHint}` : streamError;
3066
3209
  const normalizedReferences = turnToolContext.resolvedReferences ?? [];
3067
3210
  const referenceTools = turnToolContext.referencedTools ?? [];
3068
3211
  const contextTools = turnToolContext.contextTools ?? [];
3212
+ const attachmentTools = turnToolContext.attachmentToolNames ?? [];
3069
3213
  const mergedContentCache = turnToolContext.mergedContentCache ?? /* @__PURE__ */ new Map();
3070
3214
  logQuickChatPerfStage2(quickChatPerfStartedAt, "stream-agent-references-resolved", {
3071
3215
  referenceCount: normalizedReferences.length,
@@ -3083,7 +3227,7 @@ ${info.actionHint}` : streamError;
3083
3227
  const initialHistoryIds = new Set(initialRawMsgs.map((m) => m.id));
3084
3228
  const agentConfigWithTools = mergeAgentToolsWithRuntime(
3085
3229
  agentConfigWithReferences,
3086
- contextTools,
3230
+ [...contextTools, ...attachmentTools],
3087
3231
  mentionedTools,
3088
3232
  runtimeOptions,
3089
3233
  state