nolo-cli 0.107.0-alpha.3 → 0.107.0

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 (209) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-UDCSOTD2.js → _executeModel-C4EH5TZG.js} +77 -69
  3. package/action-GVA5ARSJ.js +20 -0
  4. package/{addContentAction-MB2HHMDZ.js → addContentAction-M2WOWZCL.js} +13 -12
  5. package/{addDialogAgentAction-MCEABSBA.js → addDialogAgentAction-QMAQ5Z6N.js} +19 -20
  6. package/{agentDeleteCommand-OWYHN6D6.js → agentDeleteCommand-D3RICSHX.js} +118 -43
  7. package/{agentEmailCommands-BQFXQIHF.js → agentEmailCommands-YC2A4USQ.js} +99 -89
  8. package/agentListCommands-UDJELMYP.js +741 -0
  9. package/{agentMachineCommands-6DTI7YSG.js → agentMachineCommands-XH4IBGTO.js} +48 -44
  10. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-CMVTBY5X.js} +97 -2
  11. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
  12. package/agentRecordCommands-3EOC2QMN.js +138 -0
  13. package/agentRunCommand-BTHYOVVS.js +167 -0
  14. package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
  15. package/{agentRuntimeLocal-KCMC2TBD.js → agentRuntimeLocal-N4YGKL7M.js} +44 -40
  16. package/{agentSlice-R7PR6KYM.js → agentSlice-NIN4T6CF.js} +15 -14
  17. package/{appDeleteCommands-JEPA3EWE.js → appDeleteCommands-7DAF33AM.js} +46 -42
  18. package/{appDeployCommands-UTB76XFM.js → appDeployCommands-ZPZSMFGZ.js} +46 -42
  19. package/{appDeployStatusCommands-LGHF2SBD.js → appDeployStatusCommands-FWBDSSS5.js} +46 -42
  20. package/{appGetCommands-PX2BFHOB.js → appGetCommands-SZZOHGEP.js} +46 -42
  21. package/{appListCommands-BSMPTWKC.js → appListCommands-FPMUBDPM.js} +46 -42
  22. package/{authCommand-YW42YZA4.js → authCommand-VL3G26NQ.js} +119 -25
  23. package/{authCommands-RGOGCPP6.js → authCommands-5RTUDYZW.js} +7 -5
  24. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-ZK4K67Y5.js} +11 -9
  25. package/{chromeCommands-FZYAU75D.js → chromeCommands-AU5ZJXBG.js} +289 -37
  26. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-ZYTCMNHG.js} +156 -22
  27. package/{chunk-JDPFV2JV.js → chunk-2NNRWRM5.js} +20 -11
  28. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  29. package/{chunk-HVURBGF3.js → chunk-2U3NHADM.js} +6 -6
  30. package/{chunk-AVTT555J.js → chunk-2ZHBFX5R.js} +29 -9
  31. package/{chunk-QTGQ2LTL.js → chunk-3DQY5IFB.js} +6 -10
  32. package/chunk-4LCOCOR5.js +50 -0
  33. package/{chunk-JPGCXHNM.js → chunk-4LKMZ3RR.js} +1 -1
  34. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  35. package/{chunk-6D6VBVEW.js → chunk-4W24JM32.js} +80 -14
  36. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  37. package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
  38. package/chunk-5MMAK75Q.js +15 -0
  39. package/{chunk-7S4YWN7P.js → chunk-5UUIGN6I.js} +4 -4
  40. package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
  41. package/{chunk-C63CN6KA.js → chunk-6IJDSYUA.js} +849 -279
  42. package/{chunk-4MK3I7Y4.js → chunk-6MAW4XOF.js} +5 -5
  43. package/chunk-76HO2DP6.js +15 -0
  44. package/chunk-7AY2H3GA.js +13692 -0
  45. package/{chunk-4CR5I7BD.js → chunk-7HYOPBUW.js} +47 -67
  46. package/{chunk-VLTIYV3X.js → chunk-7I25CBT5.js} +34 -8
  47. package/chunk-AGIM7IMJ.js +147 -0
  48. package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
  49. package/{chunk-6OZ36FXI.js → chunk-BIPGGSJS.js} +22 -4
  50. package/{chunk-EYAQT56M.js → chunk-BNQMNUKZ.js} +9 -6
  51. package/{chunk-62CATUYY.js → chunk-CBUMFIFE.js} +834 -962
  52. package/{chunk-OIVSQH2O.js → chunk-CDEEFJXN.js} +308 -11
  53. package/chunk-CHOZJMJS.js +78 -0
  54. package/{chunk-ETI2NYVF.js → chunk-CIP3AAMT.js} +4 -4
  55. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  56. package/{chunk-IBOZNTG2.js → chunk-DGEUP3DK.js} +23 -28
  57. package/{chunk-Q554LLSI.js → chunk-DMXLXZKL.js} +1 -1
  58. package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
  59. package/{chunk-HKNXJGEC.js → chunk-ECFHBYUW.js} +85 -50
  60. package/{chunk-ACTMNVHM.js → chunk-EHSYSKXV.js} +1 -1
  61. package/{chunk-WV42OMV7.js → chunk-ELUDRSRD.js} +8 -8
  62. package/{chunk-ABQYVJBJ.js → chunk-EV235ILT.js} +5 -5
  63. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  64. package/{chunk-BFDFRLLQ.js → chunk-EZ4VZHAG.js} +5 -5
  65. package/{chunk-GO3Z72MT.js → chunk-FHLMQIU7.js} +65 -95
  66. package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
  67. package/{chunk-SH43IESU.js → chunk-GGC55Q32.js} +199 -29
  68. package/chunk-GMZLP5DV.js +82 -0
  69. package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
  70. package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
  71. package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
  72. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  73. package/{chunk-BNGW5ASC.js → chunk-I2RGRVQ7.js} +22 -2
  74. package/{chunk-O6OSWFZQ.js → chunk-IHPDK6UD.js} +6 -0
  75. package/{chunk-QDSINZM3.js → chunk-IXH3HKY2.js} +1 -22
  76. package/{chunk-GQBOR3G6.js → chunk-JBKHQOYK.js} +8 -4
  77. package/{chunk-XD2MJFUG.js → chunk-JEFXP73H.js} +1 -1
  78. package/{chunk-PBA4UJBK.js → chunk-JIXGJTBU.js} +4 -4
  79. package/{chunk-AEOE4Z6Q.js → chunk-K6L5PNXK.js} +39 -15
  80. package/{chunk-Z77CRGTW.js → chunk-KA5O5KQL.js} +1 -1
  81. package/{chunk-GPCZ7UXG.js → chunk-KD6D6BLA.js} +1 -1
  82. package/{chunk-UZGQNTVW.js → chunk-KHKTDMYG.js} +8 -6
  83. package/{chunk-MRIHM22T.js → chunk-LBFL6RZG.js} +58 -9
  84. package/{chunk-C3M4465B.js → chunk-LKIVH2I2.js} +403 -658
  85. package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
  86. package/{chunk-DHDMC6FO.js → chunk-LUBFABMJ.js} +15 -14
  87. package/{chunk-NA35QHCF.js → chunk-LVBFKW65.js} +1 -1
  88. package/chunk-LWLNLZC5.js +265 -0
  89. package/{chunk-EEGDMATE.js → chunk-M3NMHYRB.js} +86 -81
  90. package/chunk-N4NGJDT6.js +929 -0
  91. package/{chunk-GL3EHUR4.js → chunk-N7NLLRQQ.js} +68 -46
  92. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  93. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  94. package/chunk-NWENLDMM.js +42 -0
  95. package/chunk-O7SVKKLY.js +875 -0
  96. package/chunk-OCZKATRC.js +129 -0
  97. package/{chunk-6Z7MY3V7.js → chunk-OEJLGVBL.js} +5 -5
  98. package/{chunk-VMFTFOWF.js → chunk-OKGVNZTL.js} +35 -8
  99. package/{chunk-GEPUP7OO.js → chunk-OR2UWD6X.js} +3 -3
  100. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  101. package/{chunk-J4MOO56S.js → chunk-PNXHPLRU.js} +10 -2
  102. package/{chunk-3BMYXEUW.js → chunk-R5AJODNI.js} +1 -1
  103. package/{chunk-P5EVSOPA.js → chunk-R6EBQEQE.js} +22 -29
  104. package/{chunk-NOF3HDSN.js → chunk-RLSF5CSE.js} +11 -9
  105. package/chunk-RQ6CTX2E.js +164 -0
  106. package/{chunk-3UZPUAES.js → chunk-RSB4PWX4.js} +1 -1
  107. package/{chunk-KQ4ONNQD.js → chunk-RXA3HAVW.js} +190 -8
  108. package/{chunk-IIVGDG4I.js → chunk-SJKULPGX.js} +13 -7
  109. package/chunk-SQHMSDDU.js +8004 -0
  110. package/{chunk-Q67DOFOO.js → chunk-SZC4REES.js} +212 -105
  111. package/{chunk-JRQFUXY7.js → chunk-TBAXFWOS.js} +99 -22
  112. package/{chunk-PQFHGD77.js → chunk-TBM2RS3U.js} +161 -14
  113. package/{chunk-XT35TTFG.js → chunk-TCYU7L6V.js} +18 -20
  114. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  115. package/chunk-TY3TIUJK.js +89 -0
  116. package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
  117. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  118. package/chunk-UM7TA3K4.js +1008 -0
  119. package/{chunk-6YTOJY35.js → chunk-VBG7GWWR.js} +253 -8
  120. package/chunk-VIWDGTDA.js +8 -0
  121. package/chunk-VJVNU77E.js +83 -0
  122. package/{chunk-W7HLWAQ7.js → chunk-VPLUU4IX.js} +118 -90
  123. package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
  124. package/chunk-VZLO4XJD.js +17 -0
  125. package/{chunk-AHAHBQMU.js → chunk-WDLSZMTA.js} +2 -2
  126. package/{chunk-53HEEOTT.js → chunk-WF5X57VW.js} +83 -16
  127. package/{chunk-VRTTFDBM.js → chunk-WPHY3VPF.js} +35 -22
  128. package/{chunk-ASIFZ2WY.js → chunk-YKZLFY5J.js} +66 -54
  129. package/chunk-YV25TM3R.js +780 -0
  130. package/{chunk-B2C6QTY4.js → chunk-YXKNBVYW.js} +19 -17
  131. package/chunk-ZRAU6T47.js +56 -0
  132. package/commandRegistry-UU6IOTHI.js +833 -0
  133. package/{contentThunks-IV2T3EJC.js → contentThunks-ARD56LKI.js} +39 -36
  134. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  135. package/{createAgentAutomationAction-JCOIEYY4.js → createAgentAutomationAction-HWJLU6DD.js} +40 -37
  136. package/createDialogAction-CHYA6PZE.js +70 -0
  137. package/{createPageAction-D2VOOLP3.js → createPageAction-TSCYNFX7.js} +47 -43
  138. package/{chunk-VFEJQMH4.js → cursorProvider-YGGNMVWX.js} +2751 -10172
  139. package/{dbSlice-A6C6H32X.js → dbSlice-TG4MZ5EB.js} +12 -11
  140. package/{deleteFile-YG6QMJLU.js → deleteFile-KESP65GC.js} +7 -6
  141. package/{dialogCommands-H7FPUYUQ.js → dialogCommands-IJYQAQMB.js} +49 -46
  142. package/{dialogSlice-6JZOOTDS.js → dialogSlice-H476I77R.js} +57 -37
  143. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  144. package/{docCreateCommands-WRG2JLGM.js → docCreateCommands-AZSK4NAG.js} +48 -44
  145. package/{docDeleteCommands-SHWJIBJS.js → docDeleteCommands-DDJMSMFZ.js} +49 -45
  146. package/{docReadCommands-WJN3WT6O.js → docReadCommands-5F5Q6EBZ.js} +47 -43
  147. package/{docStore-HUPQ2FSS.js → docStore-HW2RDZDM.js} +17 -13
  148. package/{docUpdateCommands-IE32IL6O.js → docUpdateCommands-XPNPVZOC.js} +48 -44
  149. package/{fetchMessages-EIU7UFFK.js → fetchMessages-3PXAHKCR.js} +5 -5
  150. package/{getPricing-LUSEABA6.js → getPricing-DOBBZLOK.js} +4 -4
  151. package/{handleSendMessageAction-DFPMQ7YM.js → handleSendMessageAction-IOXE7ILC.js} +109 -42
  152. package/index.js +87 -884
  153. package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
  154. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-UYCKO7YZ.js} +2 -2
  155. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
  156. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
  157. package/{machineCommands-OL4NLMXG.js → machineCommands-Q7TDGM6P.js} +96 -86
  158. package/machineWsRunDispatch-T5VFOQ3R.js +154 -0
  159. package/{memberThunks-P2ECUJ56.js → memberThunks-5S5D3N4U.js} +20 -18
  160. package/{models-T3SG6MJ5.js → models-PQU25T6Q.js} +2 -2
  161. package/oauthTokenStore-ITEB663N.js +23 -0
  162. package/package.json +1 -1
  163. package/processSpawn-SOAV3FEV.js +11 -0
  164. package/profileConfig-ZGOFORWV.js +43 -0
  165. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-HAQWVAQX.js} +7 -7
  166. package/{providerRegistry-757OWH3O.js → providerRegistry-5FGWB3X5.js} +11 -7
  167. package/{read-COE3ZYR6.js → read-LSYFLSIM.js} +8 -7
  168. package/{readDocTool-5USN4A6V.js → readDocTool-XWRXV3DR.js} +5 -3
  169. package/{readlineWorkspace-BOENUIW2.js → readlineWorkspace-25U6P3DG.js} +2595 -2031
  170. package/{removeDialogAgentAction-J6X5QMTA.js → removeDialogAgentAction-4TEFC3VL.js} +22 -26
  171. package/{runAgentClientLoop-5ZA62FBA.js → runAgentClientLoop-CZOYWHDN.js} +78 -71
  172. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
  173. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  174. package/{setDialogExtraReferencesAction-WX5VTY6O.js → setDialogExtraReferencesAction-LSEN44OY.js} +16 -14
  175. package/{setPrimaryDialogAgentAction-FN22THHT.js → setPrimaryDialogAgentAction-SR366X5A.js} +23 -27
  176. package/{chunk-GP5LKBUZ.js → settingThunks-CTVPPGIN.js} +226 -940
  177. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
  178. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  179. package/{spaceCommands-5GLCWZPO.js → spaceCommands-3UK63WPE.js} +51 -47
  180. package/{streamAgentChatTurn-6UZJMYRB.js → streamAgentChatTurn-LV6ZWUD4.js} +214 -114
  181. package/{switchDialogAgentAction-LVTEV3FR.js → switchDialogAgentAction-M6NAFOOU.js} +19 -20
  182. package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
  183. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-AD7CXTA4.js} +4 -3
  184. package/tools-UJOV6CQZ.js +117 -0
  185. package/{tuiSummaryLlmCaller-OHHFTHMG.js → tuiSummaryLlmCaller-DEH7ZEM6.js} +25 -23
  186. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  187. package/{updateDialogTitleAction-QTKNIURB.js → updateDialogTitleAction-JYXKIBNJ.js} +84 -45
  188. package/action-P4TNFGAD.js +0 -31
  189. package/agentListCommands-B2V4YAC4.js +0 -410
  190. package/agentRecordCommands-UTHKMMJY.js +0 -128
  191. package/agentRunCommand-D4OBAOVW.js +0 -156
  192. package/browser-image-compression-MFDTD7K6.js +0 -1763
  193. package/chatQueueReduxAdapter-2P6NFX64.js +0 -186
  194. package/chunk-CQ3WA2NE.js +0 -299
  195. package/chunk-M76ECQRD.js +0 -13658
  196. package/chunk-MEYIRKDN.js +0 -8967
  197. package/chunk-PUOC4YRO.js +0 -394
  198. package/chunk-Q5FJJ6XI.js +0 -103
  199. package/chunk-S7Z2HMCN.js +0 -25
  200. package/chunk-T75QD6AB.js +0 -20923
  201. package/chunk-Y5GCAMGP.js +0 -9
  202. package/chunk-YPREESF4.js +0 -225
  203. package/createDialogAction-NGG7YVNU.js +0 -65
  204. package/machineWsRunDispatch-64SG2RUI.js +0 -144
  205. package/settingSlice-P4ZW7K5X.js +0 -204
  206. package/syncMapping-N6RGXGBW.js +0 -437
  207. package/tools-KMGFWO43.js +0 -110
  208. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  209. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -5,14 +5,14 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-ASIFZ2WY.js";
8
+ } from "./chunk-YKZLFY5J.js";
9
9
  import {
10
10
  INVALID_TOOL_ARGS_REPLACEMENT,
11
11
  buildInvalidToolCallSelfHealResult,
12
12
  parseToolCallArguments,
13
13
  performFetchRequest,
14
14
  sanitizeOutboundMessages
15
- } from "./chunk-GL3EHUR4.js";
15
+ } from "./chunk-N7NLLRQQ.js";
16
16
  import {
17
17
  createSSEParser,
18
18
  createToolRunId,
@@ -23,10 +23,13 @@ import {
23
23
  toolRunSetPending,
24
24
  toolRunStarted,
25
25
  toolRunSucceeded
26
- } from "./chunk-C3M4465B.js";
26
+ } from "./chunk-LKIVH2I2.js";
27
27
  import {
28
28
  getPublicImageAgentMode
29
29
  } from "./chunk-VIDPVFP3.js";
30
+ import {
31
+ parseApiError
32
+ } from "./chunk-OCZKATRC.js";
30
33
  import {
31
34
  getCurrentSpaceId
32
35
  } from "./chunk-ZJ7UHBJS.js";
@@ -34,16 +37,17 @@ import {
34
37
  addToolMessage,
35
38
  messageStreamEnd,
36
39
  messageStreaming,
40
+ toolResultNeedsUserConfirmation,
37
41
  updateToolMessage
38
- } from "./chunk-T75QD6AB.js";
42
+ } from "./chunk-7AY2H3GA.js";
39
43
  import {
40
44
  streamAgentChatTurn
41
- } from "./chunk-NOF3HDSN.js";
45
+ } from "./chunk-RLSF5CSE.js";
42
46
  import {
43
47
  addActiveController,
44
48
  removeActiveController,
45
49
  tokenUsageLiveUpdate
46
- } from "./chunk-6YTOJY35.js";
50
+ } from "./chunk-VBG7GWWR.js";
47
51
  import {
48
52
  accumulateToolCallDelta,
49
53
  createThinkParserState,
@@ -56,39 +60,39 @@ import {
56
60
  import {
57
61
  EMPTY_ASSISTANT_REPAIR_PROMPT,
58
62
  getModelInfo
59
- } from "./chunk-HKNXJGEC.js";
63
+ } from "./chunk-ECFHBYUW.js";
64
+ import {
65
+ write
66
+ } from "./chunk-WPHY3VPF.js";
60
67
  import {
61
68
  getApiEndpoint
62
- } from "./chunk-OIVSQH2O.js";
69
+ } from "./chunk-CDEEFJXN.js";
63
70
  import {
64
71
  toErrorMessage
65
72
  } from "./chunk-HNMXYYJR.js";
66
73
  import {
67
- selectCurrentServer
68
- } from "./chunk-GP5LKBUZ.js";
74
+ extractCustomId
75
+ } from "./chunk-M2EJHDJP.js";
69
76
  import {
70
- write
71
- } from "./chunk-VRTTFDBM.js";
77
+ isRecord
78
+ } from "./chunk-KUG52IAP.js";
79
+ import {
80
+ selectCurrentServer
81
+ } from "./chunk-NWENLDMM.js";
72
82
  import {
73
83
  createDialogMessageKeyAndId,
74
84
  dialogMessageKey,
75
85
  toTrimmedString
76
- } from "./chunk-VMFTFOWF.js";
77
- import {
78
- extractCustomId
79
- } from "./chunk-M2EJHDJP.js";
86
+ } from "./chunk-OKGVNZTL.js";
80
87
  import {
81
88
  createAsyncThunk
82
- } from "./chunk-UKWGR5SS.js";
89
+ } from "./chunk-VY6VFGKR.js";
83
90
  import {
84
91
  isAbortError
85
- } from "./chunk-QOKAKDPE.js";
92
+ } from "./chunk-HIM3FCLF.js";
86
93
  import {
87
94
  selectIdentityToken
88
95
  } from "./chunk-SEJ5OS6F.js";
89
- import {
90
- isRecord
91
- } from "./chunk-KUG52IAP.js";
92
96
  import {
93
97
  asTrimmedString
94
98
  } from "./chunk-3EUW3WEO.js";
@@ -275,7 +279,7 @@ async function persistToolMessage(dispatch, message, options = {}) {
275
279
  }
276
280
  throw err;
277
281
  }
278
- const { controller: _controller, ...rest } = message;
282
+ const { controller: _controller, dialogId: _dialogId, ...rest } = message;
279
283
  const isStreaming = options.isStreaming !== void 0 ? options.isStreaming : Boolean(rest.isStreaming);
280
284
  try {
281
285
  const writeRequest = dispatch(
@@ -391,6 +395,49 @@ function applyResponsesUsageFields(target, chunk) {
391
395
  }
392
396
  }
393
397
 
398
+ // packages/ai/tools/stripModelConfirmationFlags.ts
399
+ var CONFIRMATION_INPUT_KEYS = {
400
+ self_evolution_requires_confirmation: "__confirmedSelfEvolution",
401
+ agent_update_requires_confirmation: "__confirmedSelfEvolution",
402
+ media_job_start_requires_confirmation: "__confirmedMediaJobStart"
403
+ };
404
+ function stripModelConfirmationFlags(value) {
405
+ if (!value || typeof value !== "object" || Array.isArray(value)) return value;
406
+ return Object.fromEntries(
407
+ Object.entries(value).filter(
408
+ ([key]) => !key.startsWith("__confirmed")
409
+ )
410
+ );
411
+ }
412
+ var MODEL_DIALOG_BINDING_STRIPPED_TOOLS = /* @__PURE__ */ new Set([
413
+ "mediaJobTool",
414
+ "transcribe",
415
+ "translate",
416
+ "exportDocument",
417
+ "readArtifact"
418
+ ]);
419
+ var TRUSTED_ONLY_MODEL_INPUT_KEYS = /* @__PURE__ */ new Set(["confirmationToken", "expectedExecutionRevision"]);
420
+ function stripModelToolArgs(canonicalToolName, value) {
421
+ const base = stripModelConfirmationFlags(value);
422
+ if (!base || typeof base !== "object" || Array.isArray(base)) return base;
423
+ const withoutTrustedOnlyKeys = Object.fromEntries(
424
+ Object.entries(base).filter(
425
+ ([key]) => !TRUSTED_ONLY_MODEL_INPUT_KEYS.has(key)
426
+ )
427
+ );
428
+ if (!MODEL_DIALOG_BINDING_STRIPPED_TOOLS.has(canonicalToolName)) {
429
+ return withoutTrustedOnlyKeys;
430
+ }
431
+ if (!withoutTrustedOnlyKeys || typeof withoutTrustedOnlyKeys !== "object" || Array.isArray(withoutTrustedOnlyKeys)) {
432
+ return withoutTrustedOnlyKeys;
433
+ }
434
+ return Object.fromEntries(
435
+ Object.entries(withoutTrustedOnlyKeys).filter(
436
+ ([key]) => key !== "dialogId" && key !== "autoApproveCredits"
437
+ )
438
+ );
439
+ }
440
+
394
441
  // packages/chat/messages/toolThunks.ts
395
442
  var TOOL_ARGS_SENTINELS = [
396
443
  "<|tool_calls_section_end|>",
@@ -414,6 +461,23 @@ var defaultSummary = (toolName, status) => {
414
461
  if (status === "failed") return `\u274C ${toolName} \u6267\u884C\u5931\u8D25`;
415
462
  return `\u2705 ${toolName} \u6267\u884C\u5B8C\u6210`;
416
463
  };
464
+ var RAW_DATA_FALLBACK_MAX_TOTAL_BYTES = 4e3;
465
+ var RAW_DATA_FALLBACK_MAX_HEAD_BYTES = 1e3;
466
+ var RAW_DATA_FALLBACK_MAX_TAIL_BYTES = 2500;
467
+ var buildRawDataLlmContextFallback = (rawData, toolCallId) => {
468
+ const serialized = typeof rawData === "string" ? rawData.trim() : rawData === void 0 ? "" : JSON.stringify(rawData);
469
+ if (!serialized) return void 0;
470
+ const clipped = clipHeadAndTail(serialized, {
471
+ maxHeadBytes: RAW_DATA_FALLBACK_MAX_HEAD_BYTES,
472
+ maxTailBytes: RAW_DATA_FALLBACK_MAX_TAIL_BYTES,
473
+ maxTotalBytes: RAW_DATA_FALLBACK_MAX_TOTAL_BYTES,
474
+ // 完整 rawData 已随 tool message content 原样落盘,无需另写临时日志;
475
+ // 浏览器 stub 本就忽略该选项。
476
+ saveTempLog: false,
477
+ ...toolCallId ? { toolCallId } : {}
478
+ });
479
+ return asOptionalTrimmedString(clipped.content);
480
+ };
417
481
  var processToolData = createAsyncThunk(
418
482
  "message/processToolData",
419
483
  async (args, thunkApi) => {
@@ -446,7 +510,8 @@ var processToolData = createAsyncThunk(
446
510
  }
447
511
  }
448
512
  const activity = isRecord(toolArgs) && isRecord(toolArgs._activity) ? toolArgs._activity : void 0;
449
- const executionToolArgs = isRecord(toolArgs) && Object.prototype.hasOwnProperty.call(toolArgs, "_activity") ? (({ _activity: _ignored, ...rest }) => rest)(toolArgs) : toolArgs;
513
+ const withoutActivity = isRecord(toolArgs) && Object.prototype.hasOwnProperty.call(toolArgs, "_activity") ? (({ _activity: _ignored, ...rest }) => rest)(toolArgs) : toolArgs;
514
+ const executionToolArgs = stripModelToolArgs(canonicalName, withoutActivity);
450
515
  const inputSummary = JSON.stringify(executionToolArgs).slice(0, 400);
451
516
  toolRunStarted({
452
517
  id: toolRunId,
@@ -473,6 +538,7 @@ var processToolData = createAsyncThunk(
473
538
  const toolPayload = {
474
539
  toolName: canonicalName,
475
540
  status: "pending",
541
+ interaction,
476
542
  input: executionToolArgs,
477
543
  rawToolCall: toolCall,
478
544
  toolRunId,
@@ -534,19 +600,28 @@ var processToolData = createAsyncThunk(
534
600
  });
535
601
  const rawData = toolResult?.rawData ?? toolResult;
536
602
  const llmContext = asOptionalTrimmedString(toolResult?.llmContext);
537
- const summary = asOptionalTrimmedString(toolResult?.displayData) || defaultSummary(canonicalName, "succeeded");
538
- toolRunSucceeded({
539
- id: toolRunId,
540
- outputSummary: summary
541
- });
603
+ const displayData = asOptionalTrimmedString(toolResult?.displayData);
604
+ const awaitingUserConfirmation = toolResultNeedsUserConfirmation(canonicalName, rawData);
605
+ const summary = displayData || defaultSummary(canonicalName, awaitingUserConfirmation ? "pending" : "succeeded");
606
+ const llmContextFallback = llmContext || displayData || awaitingUserConfirmation ? void 0 : buildRawDataLlmContextFallback(rawData, toolCallId);
607
+ const effectiveLlmContext = llmContext ?? llmContextFallback;
608
+ if (!awaitingUserConfirmation) {
609
+ toolRunSucceeded({
610
+ id: toolRunId,
611
+ outputSummary: summary
612
+ });
613
+ } else {
614
+ toolRunSetPending({ id: toolRunId });
615
+ }
542
616
  const toolPayload = {
543
617
  toolName: canonicalName,
544
- status: "succeeded",
618
+ status: awaitingUserConfirmation ? "pending" : "succeeded",
619
+ interaction,
545
620
  input: executionToolArgs,
546
621
  rawToolCall: toolCall,
547
622
  toolRunId,
548
623
  summary,
549
- ...llmContext ? { llmContext } : {},
624
+ ...effectiveLlmContext ? { llmContext: effectiveLlmContext } : {},
550
625
  ...activity ? { activity } : {}
551
626
  };
552
627
  const isUiAskChoice = canonicalName === "ask_user";
@@ -564,11 +639,11 @@ var processToolData = createAsyncThunk(
564
639
  } catch (e) {
565
640
  const errorMessage = toErrorMessage(e);
566
641
  const structured = getToolResultErrorData(e);
567
- const requiresConfirmation = structured?.code === "self_evolution_requires_confirmation" || structured?.code === "agent_update_requires_confirmation";
568
- if (requiresConfirmation) {
642
+ const confirmationKey = structured?.code ? CONFIRMATION_INPUT_KEYS[structured.code] : void 0;
643
+ if (confirmationKey) {
569
644
  const confirmedInput = {
570
645
  ...executionToolArgs ?? {},
571
- __confirmedSelfEvolution: true
646
+ [confirmationKey]: true
572
647
  };
573
648
  const summary2 = typeof structured?.displayData === "string" && structured.displayData.trim() || `\u26A0\uFE0F ${canonicalName} \u9700\u8981\u786E\u8BA4\u540E\u6267\u884C`;
574
649
  toolRunStarted({
@@ -584,6 +659,7 @@ var processToolData = createAsyncThunk(
584
659
  const toolPayload2 = {
585
660
  toolName: canonicalName,
586
661
  status: "pending",
662
+ interaction: "confirm",
587
663
  input: confirmedInput,
588
664
  rawToolCall: toolCall,
589
665
  toolRunId,
@@ -592,7 +668,11 @@ var processToolData = createAsyncThunk(
592
668
  };
593
669
  return {
594
670
  toolCallId,
595
- rawResult: structured?.rawData !== void 0 ? structured.rawData : { error: "self_evolution_requires_confirmation" },
671
+ rawResult: structured?.rawData !== void 0 ? structured.rawData : (
672
+ // 按实际确认码回填(此分支内 code 必在 CONFIRMATION_INPUT_KEYS 中),
673
+ // 不再对所有工具写死 self_evolution 文案。
674
+ { error: structured?.code }
675
+ ),
596
676
  summary: summary2,
597
677
  toolName: canonicalName,
598
678
  toolRunId,
@@ -661,6 +741,9 @@ var handleToolCalls = createAsyncThunk(
661
741
  const runningToolMessage = {
662
742
  id: runningToolMessageId,
663
743
  dbKey: runningToolDbKey,
744
+ // Explicit identity: tool results belong to the run's dialog, and the
745
+ // message-key parse is ambiguous once a message id contains "-msg-".
746
+ dialogId,
664
747
  role: "tool",
665
748
  content: JSON.stringify({ pending: true }),
666
749
  toolCallId,
@@ -794,61 +877,6 @@ var handleToolCalls = createAsyncThunk(
794
877
  }
795
878
  );
796
879
 
797
- // packages/ai/chat/parseApiError.ts
798
- async function parseApiError(response) {
799
- const errorBody = await response.text();
800
- const truncateErrorMessage = (message, maxChars = 320) => message.length <= maxChars ? message : `${message.slice(0, maxChars)}\u2026`;
801
- const isContextOverflow = (message) => /maximum context length|context length|context_length_exceeded|requested about .*tokens|too many tokens/i.test(message);
802
- let defaultMessage = `\u72B6\u6001\u7801 ${response.status} ${response.statusText}`;
803
- let errorMessage = defaultMessage;
804
- let errorCode = `E${response.status}`;
805
- try {
806
- const errorJson = JSON.parse(errorBody);
807
- errorMessage = errorJson?.error?.message || errorJson?.message || errorJson?.msg || errorBody || defaultMessage;
808
- errorCode = errorJson?.error?.code || errorJson?.code || errorCode;
809
- } catch (_e) {
810
- if (errorBody) {
811
- errorMessage = errorBody;
812
- }
813
- }
814
- switch (response.status) {
815
- case 400:
816
- if (isContextOverflow(errorMessage) || isContextOverflow(errorBody) || errorCode === "UPSTREAM_400") {
817
- return "\u4E0A\u4E0B\u6587\u8FC7\u957F\uFF1A\u672C\u8F6E\u6D88\u606F\u6216\u5DE5\u5177\u7ED3\u679C\u592A\u5927\u3002\u8BF7\u7F29\u5C0F\u8303\u56F4\uFF0C\u6216\u5148\u8BFB\u53D6\u66F4\u5C0F\u7247\u6BB5\u540E\u518D\u7EE7\u7EED\u3002";
818
- }
819
- if (errorCode === "MISSING_PROVIDER_API_KEY") {
820
- return truncateErrorMessage(errorMessage);
821
- }
822
- if (errorMessage && errorMessage !== defaultMessage) {
823
- return `\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF: ${truncateErrorMessage(errorMessage)}`;
824
- }
825
- return "\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u8F93\u5165";
826
- case 413:
827
- return "\u8BF7\u6C42\u5185\u5BB9\u8FC7\u5927\uFF1A\u8BF7\u51CF\u5C11\u4E00\u6B21\u53D1\u9001\u7684\u6D88\u606F\u3001\u6587\u4EF6\u6216\u5DE5\u5177\u7ED3\u679C\u3002";
828
- case 401:
829
- switch (errorCode) {
830
- case "AUTH_TOKEN_EXPIRED":
831
- return "\u767B\u5F55\u72B6\u6001\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55";
832
- case "AUTH_ACCOUNT_INVALID":
833
- return "\u8D26\u6237\u65E0\u6548\u6216\u5DF2\u88AB\u505C\u7528\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458";
834
- case "AUTH_NO_TOKEN":
835
- return "\u672A\u68C0\u6D4B\u5230\u767B\u5F55\u72B6\u6001\uFF0C\u8BF7\u5148\u767B\u5F55";
836
- case "AUTH_INVALID_TOKEN":
837
- return "\u767B\u5F55\u51ED\u8BC1\u65E0\u6548\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55";
838
- case "AUTH_TOKEN_NOT_ACTIVE":
839
- return "\u4EE4\u724C\u5C1A\u672A\u751F\u6548\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5";
840
- default:
841
- return errorMessage && errorMessage !== `\u72B6\u6001\u7801 401 Unauthorized` ? `\u8BA4\u8BC1\u9519\u8BEF: ${truncateErrorMessage(errorMessage)}` : "\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55";
842
- }
843
- case 503:
844
- return errorMessage && errorMessage !== `\u72B6\u6001\u7801 503 Service Unavailable` ? truncateErrorMessage(errorMessage) : "\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5";
845
- case 504:
846
- return "\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5";
847
- default:
848
- return `API\u8BF7\u6C42\u5931\u8D25: ${truncateErrorMessage(errorMessage)}`;
849
- }
850
- }
851
-
852
880
  // packages/ai/chat/accumulateToolCallChunks.ts
853
881
  function accumulateToolCallChunks(currentAccumulatedCalls, toolCallChunks) {
854
882
  const accumulator = {
@@ -1348,6 +1376,7 @@ async function persistInvalidToolCallResults(invalidCalls, ctx, startIndex) {
1348
1376
  const toolMessage = {
1349
1377
  id: runningToolMessageId,
1350
1378
  dbKey: runningToolDbKey,
1379
+ dialogId: ctx.dialogId,
1351
1380
  role: "tool",
1352
1381
  content: selfHealContent,
1353
1382
  toolCallId: callId,
@@ -1839,7 +1868,6 @@ export {
1839
1868
  filterAndCleanMessages,
1840
1869
  persistToolMessages,
1841
1870
  handleToolCalls,
1842
- parseApiError,
1843
1871
  updateTotalUsage,
1844
1872
  readStreamChunk,
1845
1873
  sendOpenAICompletionsRequest