nolo-cli 0.227.0-alpha.1 → 0.227.1

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/README.md +3 -5
  2. package/{_executeModel-JKQGZ3HU.js → _executeModel-CXOFYVHC.js} +93 -87
  3. package/{action-CK64LS6S.js → action-R2EIXR7I.js} +11 -8
  4. package/{addContentAction-CARFID6E.js → addContentAction-W6JVLQ6H.js} +17 -16
  5. package/{addDialogAgentAction-APLZLFW5.js → addDialogAgentAction-LVNKMXKZ.js} +20 -19
  6. package/{agentDeleteCommand-NVR2V2HH.js → agentDeleteCommand-VFSZPEQ5.js} +145 -137
  7. package/{agentEmailCommands-UCVOWD3S.js → agentEmailCommands-KRUIF4EH.js} +149 -137
  8. package/{agentFavoriteCommands-4PDOP3GW.js → agentFavoriteCommands-7LOP3HUD.js} +6 -6
  9. package/{agentGrantCommands-FLCEXLUH.js → agentGrantCommands-L6O2HVJI.js} +7 -7
  10. package/agentListCommands-TDFOLWN3.js +644 -0
  11. package/{agentMachineCommands-V3DGEJU4.js → agentMachineCommands-PSH7Q5PF.js} +76 -67
  12. package/{agentProviderCommands-7QBFRFRK.js → agentProviderCommands-C5T7C5KZ.js} +7 -7
  13. package/{agentPullCommand-E6JBGBVG.js → agentPullCommand-QQQZSC6S.js} +7 -7
  14. package/agentRecordCommands-KCKCW2QU.js +188 -0
  15. package/agentRunCommand-EF2T2QWD.js +223 -0
  16. package/{agentRunControl-SNZZ5XP4.js → agentRunControl-CSMSJFFB.js} +25 -17
  17. package/{agentRuntimeLocal-GOX2DIY7.js → agentRuntimeLocal-6QXQS3TS.js} +64 -50
  18. package/{agentSlice-N7H2FRJA.js → agentSlice-IZ5ANAF7.js} +19 -18
  19. package/{appDeleteCommands-LZDN26FU.js → appDeleteCommands-4M7ETEEG.js} +68 -59
  20. package/{appDeployCommands-6IO6TTZH.js → appDeployCommands-2VJ2NDW5.js} +68 -59
  21. package/{appDeployStatusCommands-FG3LX24J.js → appDeployStatusCommands-LDFSWOPQ.js} +68 -59
  22. package/{appGetCommands-NAKVDVD4.js → appGetCommands-RHVNOPT4.js} +68 -59
  23. package/{appListCommands-KL56RN73.js → appListCommands-U3XEVTL4.js} +68 -59
  24. package/{authCommand-AUN5MXV2.js → authCommand-PVZ45QRO.js} +36 -31
  25. package/{authCommands-D2IPS6ES.js → authCommands-6AUYO65N.js} +18 -13
  26. package/{builtinSkillRegistry-UQGLKRYP.js → builtinSkillRegistry-LRVAQCPW.js} +6 -6
  27. package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
  28. package/{chromeOpsCommands-UJWN5HWH.js → chromeOpsCommands-TBPM6MR4.js} +8 -8
  29. package/{chunk-ABGULE7H.js → chunk-22YUCKMK.js} +16 -16
  30. package/{chunk-P2ZLUIW2.js → chunk-2BSLGODA.js} +350 -25
  31. package/{chunk-GOLPOTG5.js → chunk-2COM7SAH.js} +4 -4
  32. package/{chunk-ULAQPRHX.js → chunk-2FK2KZSL.js} +1 -1
  33. package/{chunk-PLPLH2XZ.js → chunk-2IPR4PBB.js} +2 -2
  34. package/chunk-2SXN7LAY.js +15 -0
  35. package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
  36. package/{chunk-7Z3WUZ4Q.js → chunk-3YYFU6H7.js} +74 -46
  37. package/{chunk-C2B7M567.js → chunk-4OXPN3WC.js} +17 -6
  38. package/chunk-4TVOZGOS.js +62 -0
  39. package/chunk-4ZCTKB27.js +31 -0
  40. package/chunk-53AEDFBL.js +33394 -0
  41. package/chunk-53W5BXLN.js +340 -0
  42. package/{chunk-OXA5GWHU.js → chunk-56O2J2Y4.js} +3 -3
  43. package/{chunk-IAJJYHIB.js → chunk-56PB7FEN.js} +8 -8
  44. package/{chunk-JWXITTQB.js → chunk-5HUO7SEX.js} +9 -107
  45. package/{chunk-AGP3YSEC.js → chunk-5PASH2MB.js} +46 -1
  46. package/{chunk-PHOSZT3E.js → chunk-5UAKGCQG.js} +1 -1
  47. package/{chunk-5RKRXQ2H.js → chunk-5VVP7DW3.js} +20 -13
  48. package/chunk-6ASGEP5D.js +21 -0
  49. package/chunk-6PXFEPHL.js +103 -0
  50. package/chunk-6RSNVJGO.js +279 -0
  51. package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
  52. package/{chunk-KMRKZNGT.js → chunk-6YYTTLJV.js} +14 -13
  53. package/{chunk-VREDDN25.js → chunk-76HAJUOJ.js} +14 -9
  54. package/{chunk-FKEZOMIF.js → chunk-7DXFOL5B.js} +1410 -768
  55. package/{chunk-LA7JYAKF.js → chunk-AKPKOI5Z.js} +6 -6
  56. package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
  57. package/{chunk-F5AY2UZL.js → chunk-AO6T7U62.js} +592 -68
  58. package/{chunk-LJSNEV7M.js → chunk-AS6L5KSD.js} +8 -8
  59. package/{chunk-GOQ6ZVTN.js → chunk-AVSZ6PBM.js} +5 -5
  60. package/chunk-BIDSIRTS.js +307 -0
  61. package/chunk-C5A54QS7.js +108 -0
  62. package/{chunk-KYH7XW3K.js → chunk-CD2DK5JA.js} +135 -14
  63. package/{chunk-G6HJUMST.js → chunk-CJQBWHNM.js} +2 -2
  64. package/{chunk-EVGU5P4U.js → chunk-CO6E7YK6.js} +1 -1
  65. package/{chunk-ZYA2YDB6.js → chunk-CT5JXREL.js} +17 -17
  66. package/{chunk-VPAZ6BEN.js → chunk-CTWCZKNS.js} +42 -17
  67. package/{chunk-4OKTPFNX.js → chunk-CX2LYFZQ.js} +107 -66
  68. package/{chunk-YFLVRVYK.js → chunk-DLT2DN4M.js} +1 -1
  69. package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
  70. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  71. package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
  72. package/{chunk-IX2BXN2K.js → chunk-EDT65EUE.js} +6 -6
  73. package/{chunk-VP3BINY7.js → chunk-EQZZASCD.js} +31 -1
  74. package/{chunk-45LZIYXB.js → chunk-ESN4WNWU.js} +3 -2
  75. package/{chunk-M3JEW6N6.js → chunk-F26GAEH3.js} +10 -0
  76. package/{chunk-CVERLOJM.js → chunk-F4XIS5DL.js} +1215 -1431
  77. package/chunk-FDZ2GBWO.js +166 -0
  78. package/chunk-FGHEF6WI.js +34 -0
  79. package/{chunk-CSW7IPVD.js → chunk-FMYNIAI6.js} +61 -24
  80. package/{chunk-VIHDJ3FK.js → chunk-FNT5VENS.js} +15 -15
  81. package/{chunk-PMDVQBGA.js → chunk-GAHJLSDO.js} +14 -7
  82. package/{chunk-GRXSJR2Z.js → chunk-GVTFSLNI.js} +112 -109
  83. package/{chunk-UN7HIYMH.js → chunk-GX6DITLQ.js} +1 -1
  84. package/{chunk-3VFYQH3I.js → chunk-HIDVLMZC.js} +203 -156
  85. package/{chunk-5LQDHFBN.js → chunk-IDFGIROZ.js} +20 -17
  86. package/{chunk-UCFPVYP7.js → chunk-IFWXH7LH.js} +1 -1
  87. package/{chunk-LXTC53TN.js → chunk-J45ACAOQ.js} +815 -361
  88. package/{chunk-S6K5F3KP.js → chunk-JP2BH4NC.js} +1 -1
  89. package/{chunk-X2KRQP7V.js → chunk-JV5FHHF7.js} +1 -1
  90. package/{chunk-6EDAMVG6.js → chunk-K26XPZRB.js} +11 -11
  91. package/{chunk-RU6DULV4.js → chunk-KB5RQRSJ.js} +1 -1
  92. package/{chunk-T43K75CK.js → chunk-KC2QVCI7.js} +24 -178
  93. package/chunk-KK3FCYZM.js +647 -0
  94. package/{chunk-XZODOEKU.js → chunk-KMDHRVS7.js} +29 -5
  95. package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
  96. package/{chunk-UAPNPNSG.js → chunk-KW72WVHO.js} +2085 -1046
  97. package/{chunk-ILHQ2AXT.js → chunk-KZAT2M2V.js} +14 -8
  98. package/{chunk-L42CBKBZ.js → chunk-KZKMH374.js} +3 -3
  99. package/{chunk-ZI5SZ3MV.js → chunk-L6BLA6BT.js} +40 -31
  100. package/{chunk-AK5O76CC.js → chunk-LC5CVWP2.js} +3 -3
  101. package/{chunk-N5Z2V73W.js → chunk-LELADM5Q.js} +1 -1
  102. package/chunk-LHCGKAFO.js +739 -0
  103. package/{chunk-YOT437BH.js → chunk-LOF2EFUE.js} +203 -123
  104. package/{chunk-YQETUZ5V.js → chunk-LTVEOOZL.js} +29 -16
  105. package/{chunk-T2BEPTAG.js → chunk-MAA42MMV.js} +272 -26
  106. package/{chunk-NAOO4PVX.js → chunk-MECW2HJG.js} +16 -16
  107. package/{chunk-5HL4KC4A.js → chunk-MEDPR36J.js} +62 -87
  108. package/chunk-MVOZ22RZ.js +26 -0
  109. package/{chunk-YPPKC6FL.js → chunk-MYYNZG2M.js} +140 -40
  110. package/{chunk-UVUVQVZ6.js → chunk-MZVCFV3T.js} +19 -15
  111. package/{chunk-CQVGR3MX.js → chunk-N7MXFYLU.js} +7 -7
  112. package/{chunk-IC2I373Q.js → chunk-NEG5LYK5.js} +4 -4
  113. package/chunk-NJJK3PDA.js +133 -0
  114. package/{chunk-OB6DVWPF.js → chunk-OGZE6BZG.js} +331 -99
  115. package/{chunk-M3Y4IBIR.js → chunk-OHUYN3YU.js} +6 -6
  116. package/chunk-P27E22MA.js +203 -0
  117. package/{chunk-SFTTXGPM.js → chunk-PDAXMBLW.js} +35 -28
  118. package/{chunk-OBSEKCVK.js → chunk-PQ63BDV3.js} +210 -51
  119. package/{chunk-EUCFKKDM.js → chunk-PVFYPUIM.js} +40 -10
  120. package/{chunk-SRG5CNLC.js → chunk-QIVE5WJE.js} +8 -8
  121. package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
  122. package/{chunk-5RKUPJYL.js → chunk-QLUYDJST.js} +11 -3
  123. package/{chunk-7Z6EW7AH.js → chunk-QOURTDZL.js} +97 -11
  124. package/{chunk-VZW34YUL.js → chunk-QWSH3UAQ.js} +8 -5
  125. package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
  126. package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
  127. package/{chunk-SW6OD4KE.js → chunk-RDPAIR67.js} +351 -18
  128. package/{chunk-NO3VBWTL.js → chunk-RXTZB2DH.js} +4 -4
  129. package/{chunk-AXYH4734.js → chunk-S25VJYXV.js} +21 -15
  130. package/{chunk-MWHOH4RJ.js → chunk-SESKIWB4.js} +6 -6
  131. package/{chunk-GUVXQSFZ.js → chunk-SF4GMDZO.js} +18 -108
  132. package/{chunk-TINJKQSO.js → chunk-SQRKAYQW.js} +25 -25
  133. package/chunk-SR4FE5VD.js +9 -0
  134. package/{chunk-3HTP4WZQ.js → chunk-SX6AWTNK.js} +46 -8
  135. package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
  136. package/{chunk-CLCXHIBS.js → chunk-T4QY3HZ5.js} +1 -1
  137. package/{chunk-HVUDBOQG.js → chunk-TB5KTLNB.js} +9 -6
  138. package/{chunk-KRRE4A7D.js → chunk-TKE4OJ4B.js} +280 -56
  139. package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
  140. package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
  141. package/{chunk-CKT6QUE2.js → chunk-UHW6SCVK.js} +1 -1
  142. package/{chunk-T5N6NHAT.js → chunk-UPOW5HTG.js} +6 -6
  143. package/{chunk-WJP4TH6U.js → chunk-VEVLLBFK.js} +2 -2
  144. package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
  145. package/{chunk-KJAAPGBE.js → chunk-VUHKG4KS.js} +6 -6
  146. package/{chunk-TOKPHZ55.js → chunk-W3HSD32M.js} +17 -10
  147. package/{chunk-2SKTCNWO.js → chunk-W5OJBZLZ.js} +4 -4
  148. package/chunk-WBSJAIZP.js +170 -0
  149. package/chunk-WDWZPASX.js +29 -0
  150. package/chunk-WFGNWWJI.js +326 -0
  151. package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
  152. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  153. package/{chunk-HYKGIXNO.js → chunk-XGWRH3OF.js} +114 -29
  154. package/{chunk-XIEYGCN6.js → chunk-XKV53E4E.js} +460 -117
  155. package/{chunk-JHF6VLVL.js → chunk-XYRTC2Y3.js} +155 -170
  156. package/{chunk-L5I543VB.js → chunk-YGDYYFRX.js} +20 -24
  157. package/{chunk-ZADGPNTV.js → chunk-YHWMKGOX.js} +77 -103
  158. package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
  159. package/chunk-Z6YTCDU4.js +24 -0
  160. package/{chunk-PVAWNHP5.js → chunk-ZP26NIZE.js} +647 -387
  161. package/{chunk-2G3YSVO6.js → chunk-ZQ6K57FJ.js} +3 -3
  162. package/{cliAgentConfigHelpers-QVSQYTKC.js → cliAgentConfigHelpers-37ZNEY5Y.js} +16 -16
  163. package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
  164. package/{cliEnvHelpers-D6HMC46Z.js → cliEnvHelpers-CNMP3RDX.js} +2 -2
  165. package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
  166. package/cliLocalAgentRecordReader-53773JID.js +102 -0
  167. package/{commandRegistry-TKR6OWXP.js → commandRegistry-RJUO2VOD.js} +113 -101
  168. package/{contentThunks-BQWRPCTM.js → contentThunks-4EFHLUTB.js} +44 -41
  169. package/{cooldownCommands-FZYQOWI5.js → cooldownCommands-QL6DWGVU.js} +3 -3
  170. package/{createAgentAutomationAction-GFI6SJZV.js → createAgentAutomationAction-ZFFGJ7CZ.js} +44 -41
  171. package/{createDialogAction-MMBIHFFU.js → createDialogAction-SDUGVTPS.js} +45 -43
  172. package/{createPageAction-EEYUE5FB.js → createPageAction-NNM3OFLY.js} +49 -46
  173. package/{db-CS4ZJQKV.js → db-6NRZLEW2.js} +10 -7
  174. package/{dbSlice-X4Z4E4QU.js → dbSlice-5MQ3ELID.js} +16 -15
  175. package/{deleteFile-QOOP2UK7.js → deleteFile-VCCHS72Y.js} +12 -9
  176. package/{dialogCommands-OXBQ73DD.js → dialogCommands-SJK5KWXU.js} +73 -66
  177. package/dialogMessageRecord-OAV77LT7.js +7 -0
  178. package/{dialogNotifyCommand-VWS5G4OO.js → dialogNotifyCommand-PST75COP.js} +19 -19
  179. package/{dialogSlice-KGYIABDY.js → dialogSlice-2KLMHECR.js} +44 -41
  180. package/{dialogUsageCommand-FEWCN7IA.js → dialogUsageCommand-BZPKR3DW.js} +8 -8
  181. package/{docCreateCommands-LS32VKY3.js → docCreateCommands-K7CDL2HY.js} +66 -57
  182. package/{docDeleteCommands-JTYR5RPH.js → docDeleteCommands-ZEY5YCSP.js} +69 -60
  183. package/{docReadCommands-E5LTVKWN.js → docReadCommands-A4ROLIQG.js} +66 -57
  184. package/{docStore-TVS2FNER.js → docStore-A4O6YJAM.js} +19 -18
  185. package/{docUpdateCommands-I3J3JDZ2.js → docUpdateCommands-6HTFQY4O.js} +66 -57
  186. package/{fetchMessages-Q3INLN5F.js → fetchMessages-TQEUZD7H.js} +3 -3
  187. package/{getPricing-VNGFM4PN.js → getPricing-FCHYVRJU.js} +6 -6
  188. package/{handleSendMessageAction-SSON36TJ.js → handleSendMessageAction-6WEFYBUC.js} +87 -82
  189. package/{hostCredentialCreate-WTW4THJF.js → hostCredentialCreate-WOWCNOYM.js} +136 -123
  190. package/index.js +54 -16
  191. package/keys-RWF7UCB4.js +1 -1
  192. package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
  193. package/{localDialogRead-V36DX2Q2.js → localDialogRead-3T2KMCRC.js} +2 -2
  194. package/{localRuntimeAdapter-MI2JGXSF.js → localRuntimeAdapter-7EDBDRYW.js} +147 -133
  195. package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-7DKIT7UH.js} +4 -2
  196. package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
  197. package/{machineCommands-3LROJZDK.js → machineCommands-XRPC67LL.js} +290 -354
  198. package/machineWsRunDispatch-SOGFW472.js +203 -0
  199. package/markdownToSlate-KIYM7B3P.js +8 -0
  200. package/mcpLocalAuthorizeCommand-VOJARP3M.js +106 -0
  201. package/{memberThunks-CFEPHAND.js → memberThunks-KC3WJGL3.js} +26 -21
  202. package/{memoryCommands-JQMEJO7J.js → memoryCommands-BC6REPQB.js} +6 -6
  203. package/{models-H5NNZRLH.js → models-EP7VG6N2.js} +2 -2
  204. package/{overlay-THLKYIWY.js → overlay-JA3SPVUS.js} +7 -3
  205. package/package.json +1 -1
  206. package/{projectArchive-3X54XFVN.js → projectArchive-GDVPIZX2.js} +50 -47
  207. package/{providerPresetApply-FO36N5TX.js → providerPresetApply-4H7YP5D7.js} +9 -9
  208. package/{providerRegistry-U2BSFE6K.js → providerRegistry-F3UPOTIY.js} +9 -9
  209. package/{read-KA3L2V7O.js → read-T7VU2IMO.js} +11 -10
  210. package/{readDocTool-AMAZAPAW.js → readDocTool-BPQ3QJSD.js} +1 -1
  211. package/{readlineWorkspace-Z3YUH4SX.js → readlineWorkspace-OWQIIUGH.js} +9406 -6791
  212. package/rememberExplicit-CPAPONSI.js +15 -0
  213. package/{removeDialogAgentAction-JQOJSUM7.js → removeDialogAgentAction-FEUUVMYC.js} +23 -22
  214. package/{runAgentClientLoop-4FCFLMDJ.js → runAgentClientLoop-SJREK2B7.js} +107 -86
  215. package/{runtimeDoctorCommands-CXOCVDPU.js → runtimeDoctorCommands-XQD4MN4I.js} +19 -19
  216. package/{secretCommands-GGUAWAE7.js → secretCommands-LH7QTJO2.js} +3 -3
  217. package/{setDialogExtraReferencesAction-YXQTGXIN.js → setDialogExtraReferencesAction-JSTQJPXL.js} +19 -18
  218. package/{setPrimaryDialogAgentAction-YNLB66WE.js → setPrimaryDialogAgentAction-Z2BQE3IY.js} +23 -22
  219. package/{settingThunks-E6N7RSSS.js → settingThunks-C2YWCNYI.js} +186 -67
  220. package/{skillDiscovery-B5V23AXP.js → skillDiscovery-MDDKPTW3.js} +4 -3
  221. package/{spaceCommands-DB5DKC2J.js → spaceCommands-YRBQ52PG.js} +71 -62
  222. package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
  223. package/{streamAgentChatTurn-FCBGMD4D.js → streamAgentChatTurn-NCA4BKDZ.js} +244 -185
  224. package/{switchDialogAgentAction-LAHLUECU.js → switchDialogAgentAction-G7XVAOGH.js} +20 -19
  225. package/{tableCommands-VNSXHAMG.js → tableCommands-UHEA5QNL.js} +14 -11
  226. package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
  227. package/{tools-6JD36D6K.js → tools-6WQVUGKV.js} +74 -70
  228. package/tuiRestart-3J7LRMPR.js +41 -0
  229. package/{tuiSummaryLlmCaller-UHZIPGAX.js → tuiSummaryLlmCaller-2J6NG53N.js} +24 -23
  230. package/{updateCommands-KZ54HCU5.js → updateCommands-5OYND6EF.js} +8 -6
  231. package/{updateDialogTitleAction-RV3EUEN3.js → updateDialogTitleAction-QCSN3RYO.js} +46 -43
  232. package/{usageCommand-KFVV6UL3.js → usageCommand-SK7JTEPC.js} +3 -3
  233. package/{usageRebuildCommand-HHFSNK46.js → usageRebuildCommand-DF3HUP6F.js} +4 -4
  234. package/webapi-QVV65DQF.js +2487 -0
  235. package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-HIYNL3VR.js} +2 -2
  236. package/workContext-Y3ADAPZU.js +14 -0
  237. package/workContextAccess-UZHDLBUR.js +11 -0
  238. package/workContextWriteNotice-YCSSMHN4.js +7 -0
  239. package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-ZCSQCHG3.js} +9 -9
  240. package/agentListCommands-C65UESYM.js +0 -1004
  241. package/agentRecordCommands-6RCJS2EY.js +0 -176
  242. package/agentRunCommand-P3GRKXKS.js +0 -208
  243. package/chunk-2WZXXAQD.js +0 -57
  244. package/chunk-5ZMIIR23.js +0 -265
  245. package/chunk-62HXNQVV.js +0 -134
  246. package/chunk-BJF2MHJ3.js +0 -118
  247. package/chunk-KEPOVMF4.js +0 -91
  248. package/chunk-PXKF5CV4.js +0 -357
  249. package/chunk-WACI5I6V.js +0 -147
  250. package/chunk-YGILMZ7N.js +0 -81
  251. package/cliLocalAgentRecordReader-SPKAJYME.js +0 -90
  252. package/machineWsRunDispatch-BUUJRUUB.js +0 -191
  253. package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +4 -4
  254. package/{chunk-VXL2FZTP.js → chunk-HXER7YJF.js} +3 -3
  255. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  256. package/{chunk-SSGTV4FC.js → chunk-USGHJSGO.js} +5 -5
  257. package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
  258. package/{offlineMarxistsAgentCommand-AGA2X5E4.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +5 -5
@@ -5,27 +5,42 @@ import {
5
5
  applyTokenUsageToDayStats,
6
6
  require_format
7
7
  } from "./chunk-BUDVRYES.js";
8
- import {
9
- buildDialogAttachmentPlan,
10
- extractFileContentIds
11
- } from "./chunk-KEPOVMF4.js";
12
8
  import {
13
9
  BUILTIN_SUMMARY_LLM_CONFIG
14
10
  } from "./chunk-523DITKR.js";
15
11
  import {
16
12
  runLlm
17
- } from "./chunk-ABGULE7H.js";
18
- import {
19
- isMediaToolConfirmation
20
- } from "./chunk-QYPE3TS3.js";
13
+ } from "./chunk-22YUCKMK.js";
21
14
  import {
22
15
  cleanupCliSessionForDialog
23
- } from "./chunk-GOQ6ZVTN.js";
16
+ } from "./chunk-AVSZ6PBM.js";
24
17
  import {
25
18
  getActiveDialogAgentId,
26
19
  getDialogAgentIds,
27
20
  getPrimaryDialogAgentId
28
21
  } from "./chunk-5RGU3J7P.js";
22
+ import {
23
+ addContentAction
24
+ } from "./chunk-CJQBWHNM.js";
25
+ import {
26
+ patch,
27
+ read,
28
+ remove,
29
+ selectById,
30
+ upload,
31
+ write
32
+ } from "./chunk-PDAXMBLW.js";
33
+ import {
34
+ fetchMessages
35
+ } from "./chunk-HXER7YJF.js";
36
+ import {
37
+ buildDialogAttachmentPlan,
38
+ extractFileContentIds,
39
+ fetchWithTransientRetry
40
+ } from "./chunk-DXWGFL2Z.js";
41
+ import {
42
+ isMediaToolConfirmation
43
+ } from "./chunk-QYPE3TS3.js";
29
44
  import {
30
45
  abortActiveControllers,
31
46
  addPageReferenceToRuntime,
@@ -41,41 +56,29 @@ import {
41
56
  setActiveDialogKey,
42
57
  setDialogConfigError,
43
58
  setMediaJobRuntimeActor
44
- } from "./chunk-S2NTVGA2.js";
59
+ } from "./chunk-U35UUM5K.js";
45
60
  import {
46
61
  require_react
47
- } from "./chunk-5FUN7EG4.js";
48
- import {
49
- fetchMessages
50
- } from "./chunk-VXL2FZTP.js";
51
- import {
52
- addContentAction
53
- } from "./chunk-G6HJUMST.js";
54
- import {
55
- patch,
56
- read,
57
- remove,
58
- selectById,
59
- upload,
60
- write
61
- } from "./chunk-SFTTXGPM.js";
62
+ } from "./chunk-RD3QLZQV.js";
62
63
  import {
63
64
  getRuntimeServerContext,
64
65
  parseOwnerUserIdFromDbKey,
65
66
  resolveUserAuthorityServer,
66
67
  scheduleDeleteReplication,
67
68
  waitForWriteAck
68
- } from "./chunk-CSW7IPVD.js";
69
+ } from "./chunk-FMYNIAI6.js";
69
70
  import {
70
71
  asyncThunkCreator,
71
72
  buildCreateSlice,
72
73
  createAsyncThunk,
73
74
  createEntityAdapter,
74
75
  createSelector
75
- } from "./chunk-7Z6EW7AH.js";
76
+ } from "./chunk-QOURTDZL.js";
76
77
  import {
78
+ googleSessionRequestToken,
79
+ isGoogleAuthoritySession,
77
80
  normalizeTimeFields
78
- } from "./chunk-AGP3YSEC.js";
81
+ } from "./chunk-5PASH2MB.js";
79
82
  import {
80
83
  createClientLogger
81
84
  } from "./chunk-QQ56R7KS.js";
@@ -84,19 +87,10 @@ import {
84
87
  selectIdentityUser,
85
88
  selectIdentityUserId
86
89
  } from "./chunk-PXYBUFDB.js";
87
- import {
88
- getRecordTimestamp,
89
- getTombstoneTimestamp,
90
- isTombstoneRecord,
91
- shouldReplaceWithNextRecord
92
- } from "./chunk-BV3FLP2L.js";
93
90
  import {
94
91
  applyBuiltinAgentRuntimeOverride,
95
92
  resolveBuiltinPlatformAgentRecord
96
- } from "./chunk-S6K5F3KP.js";
97
- import {
98
- getApproxPricePerImage
99
- } from "./chunk-4JH2UMJR.js";
93
+ } from "./chunk-JP2BH4NC.js";
100
94
  import {
101
95
  DEFAULT_AUTO_EXECUTION_PROFILE,
102
96
  EMPTY_ASSISTANT_FALLBACK_MESSAGE,
@@ -111,15 +105,15 @@ import {
111
105
  isCodexOAuthAgent,
112
106
  normalizeAttachmentPart,
113
107
  resolveAutoExecutionProfile
114
- } from "./chunk-YQETUZ5V.js";
108
+ } from "./chunk-LTVEOOZL.js";
115
109
  import {
116
110
  isDevinOAuthAgent
117
111
  } from "./chunk-5ZUL4CUO.js";
118
112
  import {
119
113
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
120
114
  DEFAULT_CONTEXT_WINDOW,
121
- buildBoundedCompactionRequest,
122
115
  buildCompactionMetricsFromPlan,
116
+ buildHistoricalCompactionRequest,
123
117
  classifySummaryError,
124
118
  computeSummarySourceMetadata,
125
119
  createSummaryBudget,
@@ -131,7 +125,7 @@ import {
131
125
  runSummaryWithContract,
132
126
  selectSummaryRoute,
133
127
  serializeMessageContent
134
- } from "./chunk-T2BEPTAG.js";
128
+ } from "./chunk-MAA42MMV.js";
135
129
  import {
136
130
  isOAuthApiKeyRef
137
131
  } from "./chunk-UKZX3NHN.js";
@@ -145,25 +139,59 @@ import {
145
139
  isAbortError
146
140
  } from "./chunk-7DPNBQSV.js";
147
141
  import {
148
- toErrorMessage
149
- } from "./chunk-HNMXYYJR.js";
142
+ getRecordTimestamp,
143
+ getTombstoneTimestamp,
144
+ isTombstoneRecord,
145
+ shouldReplaceWithNextRecord
146
+ } from "./chunk-BV3FLP2L.js";
150
147
  import {
151
148
  nolotusId
152
- } from "./chunk-EVGU5P4U.js";
149
+ } from "./chunk-CO6E7YK6.js";
150
+ import {
151
+ buildDialogAgentListIndexDeleteOps,
152
+ createKey,
153
+ createTokenKey,
154
+ createTokenStatsKey
155
+ } from "./chunk-SYTHYBMI.js";
156
+ import {
157
+ createDialogMessageKeyAndId,
158
+ dialogMessageKey
159
+ } from "./chunk-OJKUU3LP.js";
153
160
  import {
154
161
  isBuiltinPlatformAgentKey
155
- } from "./chunk-ILHQ2AXT.js";
162
+ } from "./chunk-KZAT2M2V.js";
156
163
  import {
157
164
  extractCustomId,
158
165
  extractUserId
159
166
  } from "./chunk-M2EJHDJP.js";
167
+ import {
168
+ getApproxPricePerImage
169
+ } from "./chunk-4JH2UMJR.js";
170
+ import {
171
+ API_ENDPOINTS
172
+ } from "./chunk-LCBAMY2M.js";
173
+ import {
174
+ toErrorMessage
175
+ } from "./chunk-HNMXYYJR.js";
176
+ import {
177
+ asTrimmedString
178
+ } from "./chunk-3EUW3WEO.js";
179
+ import {
180
+ asOptionalFiniteNumber
181
+ } from "./chunk-WWC7I6TA.js";
160
182
  import {
161
183
  findModelConfig,
162
184
  getModelConfig
163
- } from "./chunk-KYH7XW3K.js";
185
+ } from "./chunk-CD2DK5JA.js";
164
186
  import {
165
187
  isRecord
166
188
  } from "./chunk-KUG52IAP.js";
189
+ import {
190
+ asOptionalTrimmedString
191
+ } from "./chunk-G3SUCT4W.js";
192
+ import {
193
+ normalizeServerOrigin
194
+ } from "./chunk-CF7PE763.js";
167
195
  import {
168
196
  PLATFORM_HOSTED_CLAUDE_FABLE_5_MODEL,
169
197
  PLATFORM_HOSTED_CLAUDE_FABLE_5_PRICE,
@@ -175,41 +203,17 @@ import {
175
203
  PLATFORM_HOSTED_DEEPSEEK_PRO_MODEL,
176
204
  PLATFORM_HOSTED_GLM_53_FLASH_BASETEN_PRICE,
177
205
  getPlatformHostedDeepSeekV4Price,
206
+ isGeminiNeonModel,
178
207
  isPlatformHostedDeepSeekV4Model,
179
208
  isPlatformHostedImageModel,
180
209
  isPlatformHostedOpenAIImageModel,
181
210
  isPlatformManagedProvider,
182
211
  resolvePlatformEffectiveModel,
183
212
  resolvePlatformHostedRouting
184
- } from "./chunk-OBSEKCVK.js";
213
+ } from "./chunk-PQ63BDV3.js";
185
214
  import {
186
215
  asTrimmedLowercaseString
187
216
  } from "./chunk-QSJ3HFEF.js";
188
- import {
189
- API_ENDPOINTS
190
- } from "./chunk-LCBAMY2M.js";
191
- import {
192
- normalizeServerOrigin
193
- } from "./chunk-CF7PE763.js";
194
- import {
195
- buildDialogAgentListIndexDeleteOps,
196
- createKey,
197
- createTokenKey,
198
- createTokenStatsKey
199
- } from "./chunk-SYTHYBMI.js";
200
- import {
201
- createDialogMessageKeyAndId,
202
- dialogMessageKey
203
- } from "./chunk-OJKUU3LP.js";
204
- import {
205
- asTrimmedString
206
- } from "./chunk-3EUW3WEO.js";
207
- import {
208
- asOptionalFiniteNumber
209
- } from "./chunk-WWC7I6TA.js";
210
- import {
211
- asOptionalTrimmedString
212
- } from "./chunk-G3SUCT4W.js";
213
217
  import {
214
218
  __toESM
215
219
  } from "./chunk-U67V476Y.js";
@@ -265,7 +269,7 @@ function assertUserBatchInput(expected, actual, ids) {
265
269
  function createUserBatchExecution(signal, owns) {
266
270
  let grant;
267
271
  let closed = false;
268
- let inFlight = false;
272
+ let inFlight2 = false;
269
273
  const dispose = () => {
270
274
  closed = true;
271
275
  grant = void 0;
@@ -290,16 +294,16 @@ function createUserBatchExecution(signal, owns) {
290
294
  return valid() && same(key, receipt);
291
295
  },
292
296
  authorize(key, receipt, input) {
293
- if (!valid() || inFlight) throw new Error("User batch execution ownership lost; blocked");
297
+ if (!valid() || inFlight2) throw new Error("User batch execution ownership lost; blocked");
294
298
  orderedUserBatchInput(input, receipt.messageIds);
295
299
  grant = { dialogKey: key, receipt: { ...receipt, messageIds: [...receipt.messageIds] }, input: structuredClone(input) };
296
300
  },
297
301
  async start(key, receipt, input, invoke) {
298
- if (!valid() || !same(key, receipt) || inFlight) {
302
+ if (!valid() || !same(key, receipt) || inFlight2) {
299
303
  dispose();
300
304
  throw new Error("User batch execution permission expired or mismatched; blocked");
301
305
  }
302
- inFlight = true;
306
+ inFlight2 = true;
303
307
  try {
304
308
  assertUserBatchInput(grant.input, input, receipt.messageIds);
305
309
  return await invoke();
@@ -307,7 +311,7 @@ function createUserBatchExecution(signal, owns) {
307
311
  dispose();
308
312
  throw error;
309
313
  } finally {
310
- inFlight = false;
314
+ inFlight2 = false;
311
315
  }
312
316
  }
313
317
  };
@@ -401,6 +405,7 @@ function normalizeRunCompletionShape(record) {
401
405
  ...typeof record.parentDialogId === "string" ? { parentDialogId: record.parentDialogId } : {},
402
406
  ...typeof record.dialogId === "string" ? { dialogId: record.dialogId } : {},
403
407
  ...typeof record.resultFile === "string" ? { resultFile: record.resultFile } : {},
408
+ ...typeof record.continuedFrom === "string" ? { continuedFrom: record.continuedFrom } : {},
404
409
  ...typeof record.ephemeral === "boolean" ? { ephemeral: record.ephemeral } : {},
405
410
  ...record.startedAt !== void 0 ? { startedAt: record.startedAt } : {},
406
411
  ...record.endedAt !== void 0 ? { endedAt: record.endedAt } : {},
@@ -982,6 +987,7 @@ var fetchConvMsgs = async (server, token, {
982
987
  limit,
983
988
  beforeKey
984
989
  }, options = {}) => {
990
+ googleSessionRequestToken(token, server);
985
991
  const { signal: externalSignal } = options;
986
992
  const controller = new AbortController();
987
993
  const startedAt = now();
@@ -1026,6 +1032,7 @@ var fetchConvMsgs = async (server, token, {
1026
1032
  try {
1027
1033
  const response = await fetch(`${server}/rpc/getConvMsgs`, {
1028
1034
  method: "POST",
1035
+ ...isGoogleAuthoritySession(token) ? { redirect: "error", credentials: "omit" } : {},
1029
1036
  headers: {
1030
1037
  Authorization: `Bearer ${token}`,
1031
1038
  "Content-Type": "application/json"
@@ -6204,6 +6211,64 @@ var ai_locale_default = {
6204
6211
  }
6205
6212
  };
6206
6213
 
6214
+ // packages/chat/dialog/childRunObserverLabels.ts
6215
+ var childRunObserverLabels = {
6216
+ "en": {
6217
+ "openChildPage": "Open child dialog",
6218
+ "savedActiveGroup": "Last saved active \xB7 not live",
6219
+ "historyGroup": "Other tasks",
6220
+ "viewDetails": "View details",
6221
+ "persistedRuns": "Persisted subagent runs",
6222
+ "persistedSnapshot": "Saved status \xB7 not live",
6223
+ "inProgressGroup": "In progress"
6224
+ },
6225
+ "zh-CN": {
6226
+ "openChildPage": "\u6253\u5F00\u5B50\u5BF9\u8BDD",
6227
+ "savedActiveGroup": "\u4E0A\u6B21\u4FDD\u5B58\u4E3A\u6D3B\u8DC3 \xB7 \u975E\u5B9E\u65F6",
6228
+ "historyGroup": "\u5176\u4ED6\u4EFB\u52A1",
6229
+ "viewDetails": "\u67E5\u770B\u8BE6\u60C5",
6230
+ "persistedRuns": "\u5DF2\u540C\u6B65\u7684\u5B50\u4EFB\u52A1",
6231
+ "persistedSnapshot": "\u5DF2\u4FDD\u5B58\u72B6\u6001 \xB7 \u975E\u5B9E\u65F6",
6232
+ "inProgressGroup": "\u8FDB\u884C\u4E2D"
6233
+ },
6234
+ "zh-Hant": {
6235
+ "openChildPage": "\u958B\u555F\u5B50\u5C0D\u8A71",
6236
+ "savedActiveGroup": "\u4E0A\u6B21\u5132\u5B58\u70BA\u6D3B\u8E8D \xB7 \u975E\u5373\u6642",
6237
+ "historyGroup": "\u5176\u4ED6\u4EFB\u52D9",
6238
+ "viewDetails": "\u67E5\u770B\u8A73\u60C5",
6239
+ "persistedRuns": "\u5DF2\u540C\u6B65\u7684\u5B50\u4EFB\u52D9",
6240
+ "persistedSnapshot": "\u5DF2\u5132\u5B58\u72C0\u614B \xB7 \u975E\u5373\u6642",
6241
+ "inProgressGroup": "\u9032\u884C\u4E2D"
6242
+ },
6243
+ "ja": {
6244
+ "openChildPage": "\u5B50\u4F1A\u8A71\u3092\u958B\u304F",
6245
+ "savedActiveGroup": "\u6700\u7D42\u4FDD\u5B58\u6642\u306F\u5B9F\u884C\u4E2D\u30FB\u975E\u30EA\u30A2\u30EB\u30BF\u30A4\u30E0",
6246
+ "historyGroup": "\u305D\u306E\u4ED6\u306E\u30BF\u30B9\u30AF",
6247
+ "viewDetails": "\u8A73\u7D30\u3092\u898B\u308B",
6248
+ "persistedRuns": "\u4FDD\u5B58\u6E08\u307F\u30B5\u30D6\u30BF\u30B9\u30AF",
6249
+ "persistedSnapshot": "\u4FDD\u5B58\u6E08\u307F\u72B6\u614B\u30FB\u30EA\u30A2\u30EB\u30BF\u30A4\u30E0\u3067\u306F\u3042\u308A\u307E\u305B\u3093",
6250
+ "inProgressGroup": "\u9032\u884C\u4E2D"
6251
+ },
6252
+ "de": {
6253
+ "openChildPage": "Unterdialog \xF6ffnen",
6254
+ "savedActiveGroup": "Zuletzt aktiv gespeichert \xB7 nicht live",
6255
+ "historyGroup": "Weitere Aufgaben",
6256
+ "viewDetails": "Details ansehen",
6257
+ "persistedRuns": "Gespeicherte Unteraufgaben",
6258
+ "persistedSnapshot": "Gespeicherter Status \xB7 nicht live",
6259
+ "inProgressGroup": "In Bearbeitung"
6260
+ },
6261
+ "es": {
6262
+ "openChildPage": "Abrir di\xE1logo secundario",
6263
+ "savedActiveGroup": "Activo al guardar \xB7 no en vivo",
6264
+ "historyGroup": "Otras tareas",
6265
+ "viewDetails": "Ver detalles",
6266
+ "persistedRuns": "Subtareas guardadas",
6267
+ "persistedSnapshot": "Estado guardado \xB7 no en vivo",
6268
+ "inProgressGroup": "En curso"
6269
+ }
6270
+ };
6271
+
6207
6272
  // packages/chat/chat.locale.ts
6208
6273
  var chat_locale_default = {
6209
6274
  en: {
@@ -6556,6 +6621,15 @@ var chat_locale_default = {
6556
6621
  ask_user: "Ask",
6557
6622
  runStreamingAgent: "Handoff"
6558
6623
  },
6624
+ toolActivity: {
6625
+ unknown: "Unknown",
6626
+ attention: {
6627
+ failure: "Failed",
6628
+ blocked: "Blocked",
6629
+ permission: "Requires authorization",
6630
+ "delete-confirmation": "Awaiting delete confirmation"
6631
+ }
6632
+ },
6559
6633
  controlActions: {
6560
6634
  status: "Status check",
6561
6635
  stop: "Stop task",
@@ -6604,6 +6678,13 @@ var chat_locale_default = {
6604
6678
  DialogSettings: "Dialog Settings",
6605
6679
  collaborativeConversation: "Collaborative conversation",
6606
6680
  childRunObserver: {
6681
+ ...childRunObserverLabels["en"],
6682
+ workingGroup: "Working",
6683
+ mainAgent: "Main agent",
6684
+ modelUnknown: "Model unknown",
6685
+ reasoningConfigured: "Reasoning effort (configured): {{effort}}",
6686
+ reasoningUnspecified: "Reasoning effort: not specified",
6687
+ reasoningUnsupported: "Configured reasoning effort is not supported by this model/provider",
6607
6688
  panelAriaLabel: "Child runs",
6608
6689
  title: "Child runs",
6609
6690
  subtitleLoading: "Loading child runs\u2026",
@@ -7100,6 +7181,15 @@ var chat_locale_default = {
7100
7181
  ask_user: "\u63D0\u95EE",
7101
7182
  runStreamingAgent: "\u8F6C\u4EA4"
7102
7183
  },
7184
+ toolActivity: {
7185
+ unknown: "\u72B6\u6001\u672A\u77E5",
7186
+ attention: {
7187
+ failure: "\u5931\u8D25",
7188
+ blocked: "\u5DF2\u963B\u585E",
7189
+ permission: "\u9700\u8981\u6388\u6743",
7190
+ "delete-confirmation": "\u7B49\u5F85\u5220\u9664\u786E\u8BA4"
7191
+ }
7192
+ },
7103
7193
  controlActions: {
7104
7194
  status: "\u72B6\u6001\u8BCA\u65AD",
7105
7195
  stop: "\u505C\u6B62\u4EFB\u52A1",
@@ -7148,6 +7238,13 @@ var chat_locale_default = {
7148
7238
  DialogSettings: "\u4F1A\u8BDD\u8BBE\u7F6E",
7149
7239
  collaborativeConversation: "\u534F\u4F5C\u4F1A\u8BDD",
7150
7240
  childRunObserver: {
7241
+ ...childRunObserverLabels["zh-CN"],
7242
+ workingGroup: "\u6B63\u5728\u6267\u884C",
7243
+ mainAgent: "\u4E3B Agent",
7244
+ modelUnknown: "\u6A21\u578B\u672A\u77E5",
7245
+ reasoningConfigured: "\u63A8\u7406\u5F3A\u5EA6\uFF08\u914D\u7F6E\uFF09\uFF1A{{effort}}",
7246
+ reasoningUnspecified: "\u63A8\u7406\u5F3A\u5EA6\uFF1A\u672A\u6307\u5B9A",
7247
+ reasoningUnsupported: "\u5DF2\u914D\u7F6E\u63A8\u7406\u5F3A\u5EA6\uFF0C\u4F46\u6B64\u6A21\u578B\u6216\u63D0\u4F9B\u65B9\u4E0D\u652F\u6301\u6B64\u53C2\u6570",
7151
7248
  panelAriaLabel: "\u5B50\u4EFB\u52A1\u8FD0\u884C",
7152
7249
  title: "\u5B50\u4EFB\u52A1",
7153
7250
  subtitleLoading: "\u52A0\u8F7D\u5B50\u8FD0\u884C\u2026",
@@ -7644,6 +7741,15 @@ var chat_locale_default = {
7644
7741
  ask_user: "\u63D0\u554F",
7645
7742
  runStreamingAgent: "\u8F49\u4EA4"
7646
7743
  },
7744
+ toolActivity: {
7745
+ unknown: "\u72C0\u614B\u672A\u77E5",
7746
+ attention: {
7747
+ failure: "\u5931\u6557",
7748
+ blocked: "\u5DF2\u963B\u585E",
7749
+ permission: "\u9700\u8981\u6388\u6B0A",
7750
+ "delete-confirmation": "\u7B49\u5F85\u522A\u9664\u78BA\u8A8D"
7751
+ }
7752
+ },
7647
7753
  controlActions: {
7648
7754
  status: "\u72C0\u614B\u8A3A\u65B7",
7649
7755
  stop: "\u505C\u6B62\u4EFB\u52D9",
@@ -7692,6 +7798,13 @@ var chat_locale_default = {
7692
7798
  DialogSettings: "\u6703\u8A71\u8A2D\u5B9A",
7693
7799
  collaborativeConversation: "\u5354\u4F5C\u6703\u8A71",
7694
7800
  childRunObserver: {
7801
+ ...childRunObserverLabels["zh-Hant"],
7802
+ workingGroup: "\u6B63\u5728\u57F7\u884C",
7803
+ mainAgent: "\u4E3B Agent",
7804
+ modelUnknown: "\u6A21\u578B\u672A\u77E5",
7805
+ reasoningConfigured: "\u63A8\u7406\u5F37\u5EA6\uFF08\u8A2D\u5B9A\uFF09\uFF1A{{effort}}",
7806
+ reasoningUnspecified: "\u63A8\u7406\u5F37\u5EA6\uFF1A\u672A\u6307\u5B9A",
7807
+ reasoningUnsupported: "\u5DF2\u8A2D\u5B9A\u63A8\u7406\u5F37\u5EA6\uFF0C\u4F46\u6B64\u6A21\u578B\u6216\u4F9B\u61C9\u5546\u4E0D\u652F\u63F4\u6B64\u53C3\u6578",
7695
7808
  panelAriaLabel: "\u5B50\u4EFB\u52D9\u904B\u884C",
7696
7809
  title: "\u5B50\u4EFB\u52D9",
7697
7810
  subtitleLoading: "\u8F09\u5165\u5B50\u904B\u884C\u2026",
@@ -8194,6 +8307,15 @@ var chat_locale_default = {
8194
8307
  ask_user: "\u8CEA\u554F",
8195
8308
  runStreamingAgent: "\u5F15\u304D\u7D99\u304E"
8196
8309
  },
8310
+ toolActivity: {
8311
+ unknown: "\u72B6\u614B\u4E0D\u660E",
8312
+ attention: {
8313
+ failure: "\u5931\u6557",
8314
+ blocked: "\u30D6\u30ED\u30C3\u30AF\u4E2D",
8315
+ permission: "\u6A29\u9650\u304C\u5FC5\u8981",
8316
+ "delete-confirmation": "\u524A\u9664\u78BA\u8A8D\u5F85\u3061"
8317
+ }
8318
+ },
8197
8319
  controlActions: {
8198
8320
  status: "\u30B9\u30C6\u30FC\u30BF\u30B9\u78BA\u8A8D",
8199
8321
  stop: "\u30BF\u30B9\u30AF\u505C\u6B62",
@@ -8242,6 +8364,13 @@ var chat_locale_default = {
8242
8364
  DialogSettings: "\u5BFE\u8A71\u8A2D\u5B9A",
8243
8365
  collaborativeConversation: "\u5354\u8ABF\u4F1A\u8A71",
8244
8366
  childRunObserver: {
8367
+ ...childRunObserverLabels["ja"],
8368
+ workingGroup: "\u5B9F\u884C\u4E2D",
8369
+ mainAgent: "\u30E1\u30A4\u30F3 Agent",
8370
+ modelUnknown: "\u30E2\u30C7\u30EB\u4E0D\u660E",
8371
+ reasoningConfigured: "\u63A8\u8AD6\u5F37\u5EA6\uFF08\u8A2D\u5B9A\uFF09\uFF1A{{effort}}",
8372
+ reasoningUnspecified: "\u63A8\u8AD6\u5F37\u5EA6\uFF1A\u672A\u6307\u5B9A",
8373
+ reasoningUnsupported: "\u8A2D\u5B9A\u3055\u308C\u305F\u63A8\u8AD6\u5F37\u5EA6\u306F\u3053\u306E\u30E2\u30C7\u30EB\u307E\u305F\u306F\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u3067\u306F\u975E\u5BFE\u5FDC\u3067\u3059",
8245
8374
  panelAriaLabel: "\u5B50\u30BF\u30B9\u30AF\u5B9F\u884C",
8246
8375
  title: "\u5B50\u30BF\u30B9\u30AF",
8247
8376
  subtitleLoading: "\u5B50\u5B9F\u884C\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",
@@ -8745,6 +8874,15 @@ var chat_locale_default = {
8745
8874
  ask_user: "Fragen",
8746
8875
  runStreamingAgent: "\xDCbergeben"
8747
8876
  },
8877
+ toolActivity: {
8878
+ unknown: "Unbekannt",
8879
+ attention: {
8880
+ failure: "Fehlgeschlagen",
8881
+ blocked: "Blockiert",
8882
+ permission: "Autorisierung erforderlich",
8883
+ "delete-confirmation": "Wartet auf L\xF6schbest\xE4tigung"
8884
+ }
8885
+ },
8748
8886
  controlActions: {
8749
8887
  status: "Statuspr\xFCfung",
8750
8888
  stop: "Aufgabe anhalten",
@@ -8793,6 +8931,13 @@ var chat_locale_default = {
8793
8931
  DialogSettings: "Dialog-Einstellungen",
8794
8932
  collaborativeConversation: "Kollaborative Unterhaltung",
8795
8933
  childRunObserver: {
8934
+ ...childRunObserverLabels["de"],
8935
+ workingGroup: "In Bearbeitung",
8936
+ mainAgent: "Haupt-Agent",
8937
+ modelUnknown: "Modell unbekannt",
8938
+ reasoningConfigured: "Denkaufwand (konfiguriert): {{effort}}",
8939
+ reasoningUnspecified: "Denkaufwand: nicht angegeben",
8940
+ reasoningUnsupported: "Der konfigurierte Denkaufwand wird von diesem Modell/Anbieter nicht unterst\xFCtzt",
8796
8941
  panelAriaLabel: "Hintergrund-Subtasks",
8797
8942
  title: "Hintergrund-Subtasks",
8798
8943
  subtitleLoading: "Subtasks werden geladen\u2026",
@@ -9296,6 +9441,15 @@ var chat_locale_default = {
9296
9441
  ask_user: "Preguntar",
9297
9442
  runStreamingAgent: "Transferir"
9298
9443
  },
9444
+ toolActivity: {
9445
+ unknown: "Desconocido",
9446
+ attention: {
9447
+ failure: "Fallido",
9448
+ blocked: "Bloqueado",
9449
+ permission: "Requiere autorizaci\xF3n",
9450
+ "delete-confirmation": "Esperando confirmaci\xF3n de eliminaci\xF3n"
9451
+ }
9452
+ },
9299
9453
  controlActions: {
9300
9454
  status: "Diagn\xF3stico de estado",
9301
9455
  stop: "Detener tarea",
@@ -9344,6 +9498,13 @@ var chat_locale_default = {
9344
9498
  DialogSettings: "Ajustes del di\xE1logo",
9345
9499
  collaborativeConversation: "Conversaci\xF3n colaborativa",
9346
9500
  childRunObserver: {
9501
+ ...childRunObserverLabels["es"],
9502
+ workingGroup: "En ejecuci\xF3n",
9503
+ mainAgent: "Agente principal",
9504
+ modelUnknown: "Modelo desconocido",
9505
+ reasoningConfigured: "Esfuerzo de razonamiento (configurado): {{effort}}",
9506
+ reasoningUnspecified: "Esfuerzo de razonamiento: sin especificar",
9507
+ reasoningUnsupported: "El esfuerzo configurado no es compatible con este modelo/proveedor",
9347
9508
  panelAriaLabel: "Subtareas en segundo plano",
9348
9509
  title: "Subtareas en segundo plano",
9349
9510
  subtitleLoading: "Cargando subtareas\u2026",
@@ -9521,6 +9682,10 @@ var space_locale_default = {
9521
9682
  workspace_other: "Other spaces",
9522
9683
  workspace_unassociated: "Unassociated space",
9523
9684
  workspace_unassociated_empty: "No content outside spaces yet",
9685
+ workspace_create_space: "New Space",
9686
+ workspace_start_chat: "Start chat in this space",
9687
+ workspace_more: "More space actions: {{name}}",
9688
+ workspace_more_menu: "Space actions",
9524
9689
  // === 基础操作 ===
9525
9690
  create: "Create Space",
9526
9691
  name: "Space Name",
@@ -9855,6 +10020,10 @@ var space_locale_default = {
9855
10020
  workspace_other: "\u5176\u4ED6\u7A7A\u95F4",
9856
10021
  workspace_unassociated: "\u7A7A\u95F4\u5916",
9857
10022
  workspace_unassociated_empty: "\u7A7A\u95F4\u5916\u8FD8\u6CA1\u6709\u5185\u5BB9",
10023
+ workspace_create_space: "\u65B0\u5EFA\u7A7A\u95F4",
10024
+ workspace_start_chat: "\u5728\u6B64\u7A7A\u95F4\u53D1\u8D77\u5BF9\u8BDD",
10025
+ workspace_more: "\u7A7A\u95F4\u66F4\u591A\u64CD\u4F5C\uFF1A{{name}}",
10026
+ workspace_more_menu: "\u7A7A\u95F4\u64CD\u4F5C",
9858
10027
  // === 基础操作 ===
9859
10028
  create: "\u521B\u5EFA\u7A7A\u95F4",
9860
10029
  name: "\u7A7A\u95F4\u540D\u79F0",
@@ -10189,6 +10358,10 @@ var space_locale_default = {
10189
10358
  workspace_other: "\u5176\u4ED6\u7A7A\u9593",
10190
10359
  workspace_unassociated: "\u7A7A\u9593\u5916",
10191
10360
  workspace_unassociated_empty: "\u7A7A\u9593\u5916\u9084\u6C92\u6709\u5167\u5BB9",
10361
+ workspace_create_space: "\u65B0\u589E\u7A7A\u9593",
10362
+ workspace_start_chat: "\u5728\u6B64\u7A7A\u9593\u767C\u8D77\u5C0D\u8A71",
10363
+ workspace_more: "\u7A7A\u9593\u66F4\u591A\u64CD\u4F5C\uFF1A{{name}}",
10364
+ workspace_more_menu: "\u7A7A\u9593\u64CD\u4F5C",
10192
10365
  // === 基础操作 ===
10193
10366
  create: "\u5275\u5EFA\u7A7A\u9593",
10194
10367
  name: "\u7A7A\u9593\u540D\u7A31",
@@ -10522,6 +10695,10 @@ var space_locale_default = {
10522
10695
  workspace_other: "\u305D\u306E\u4ED6\u306E\u30B9\u30DA\u30FC\u30B9",
10523
10696
  workspace_unassociated: "\u672A\u95A2\u9023\u306E\u30B9\u30DA\u30FC\u30B9",
10524
10697
  workspace_unassociated_empty: "\u30B9\u30DA\u30FC\u30B9\u5916\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093",
10698
+ workspace_create_space: "\u65B0\u3057\u3044\u30B9\u30DA\u30FC\u30B9",
10699
+ workspace_start_chat: "\u3053\u306E\u30B9\u30DA\u30FC\u30B9\u3067\u5BFE\u8A71\u3092\u958B\u59CB",
10700
+ workspace_more: "\u30B9\u30DA\u30FC\u30B9\u306E\u305D\u306E\u4ED6\u306E\u64CD\u4F5C\uFF1A{{name}}",
10701
+ workspace_more_menu: "\u30B9\u30DA\u30FC\u30B9\u64CD\u4F5C",
10525
10702
  // === 基本操作 ===
10526
10703
  create: "\u30B9\u30DA\u30FC\u30B9\u3092\u4F5C\u6210",
10527
10704
  name: "\u30B9\u30DA\u30FC\u30B9\u540D",
@@ -10857,6 +11034,10 @@ var space_locale_default = {
10857
11034
  workspace_other: "Andere Spaces",
10858
11035
  workspace_unassociated: "Nicht zugeordneter Space",
10859
11036
  workspace_unassociated_empty: "Noch keine Inhalte au\xDFerhalb von Spaces",
11037
+ workspace_create_space: "Neuer Space",
11038
+ workspace_start_chat: "Dialog in diesem Space starten",
11039
+ workspace_more: "Weitere Space-Aktionen: {{name}}",
11040
+ workspace_more_menu: "Space-Aktionen",
10860
11041
  create: "Space erstellen",
10861
11042
  name: "Space-Name",
10862
11043
  description: "Beschreibung",
@@ -11173,6 +11354,10 @@ var space_locale_default = {
11173
11354
  workspace_other: "Otros espacios",
11174
11355
  workspace_unassociated: "Espacio no asociado",
11175
11356
  workspace_unassociated_empty: "A\xFAn no hay contenido fuera de los espacios",
11357
+ workspace_create_space: "Nuevo espacio",
11358
+ workspace_start_chat: "Iniciar di\xE1logo en este espacio",
11359
+ workspace_more: "M\xE1s acciones del espacio: {{name}}",
11360
+ workspace_more_menu: "Acciones del espacio",
11176
11361
  create: "Crear espacio",
11177
11362
  name: "Nombre del espacio",
11178
11363
  description: "Descripci\xF3n",
@@ -11532,6 +11717,13 @@ var getMessagesForDialogFromState = (state, dialogId) => {
11532
11717
  });
11533
11718
  };
11534
11719
  var identityCanonicalName = (name) => name;
11720
+ var toCompactionRequestMessage = (msg) => {
11721
+ if (msg.role !== "tool" || typeof msg.toolCallId !== "string" || !msg.toolCallId) {
11722
+ return msg;
11723
+ }
11724
+ const { toolCallId, ...rest } = msg;
11725
+ return { ...rest, tool_call_id: toolCallId };
11726
+ };
11535
11727
  var summarizingDialogs = /* @__PURE__ */ new Set();
11536
11728
  var BudgetRescueError = class extends Error {
11537
11729
  constructor(code, detail) {
@@ -11611,8 +11803,10 @@ var updateDialogSummaryAction = async (args, thunkApi) => {
11611
11803
  route.kind === "platform" ? resolveAgentContextWindow({ model: route.model, provider: "nolo" }) ?? 32768 : Infinity,
11612
11804
  currentAvailable ? resolveAgentContextWindow(currentAgent) ?? 32768 : route.kind === "platform" ? Infinity : 32768
11613
11805
  );
11614
- const request = buildBoundedCompactionRequest({
11615
- msgsToCompress: plan.msgsToCompress,
11806
+ const request = buildHistoricalCompactionRequest({
11807
+ // 存储形态(toolCallId)先归一到运行时契约(tool_call_id),否则历史里
11808
+ // 半批工具调用的声明与结果无法配对,整段摘要请求会被严格阻塞。
11809
+ msgsToCompress: plan.msgsToCompress.map(toCompactionRequestMessage),
11616
11810
  previousSummary,
11617
11811
  contextWindow: summaryWindow,
11618
11812
  canonicalizeToolName: identityCanonicalName
@@ -11622,7 +11816,8 @@ var updateDialogSummaryAction = async (args, thunkApi) => {
11622
11816
  if (args.reason === "budget_rescue") throw new BudgetRescueError("no-summary-input", `bounded summary request blocked: ${request.reason}`);
11623
11817
  return;
11624
11818
  }
11625
- const { coveredMessages, summarizedBeforeId: newSummarizedBeforeId, promptContent, outputTokenBudget } = request;
11819
+ const coveredMessages = plan.msgsToCompress.slice(0, request.coveredMessages.length);
11820
+ const { summarizedBeforeId: newSummarizedBeforeId, promptContent, outputTokenBudget } = request;
11626
11821
  const extractedKeys = new Set(dialogConfig.referenceKeys || []);
11627
11822
  for (const msg of coveredMessages) {
11628
11823
  for (const key of extractReferenceKeysFromMessage(msg)) extractedKeys.add(key);
@@ -12037,256 +12232,6 @@ ${failureText}`;
12037
12232
  return failureText;
12038
12233
  }
12039
12234
 
12040
- // packages/create/space/contentKeyUtils.ts
12041
- var isAppContentKey = (contentKey) => typeof contentKey === "string" && contentKey.startsWith("app-");
12042
- var normalizeAppRouteId = (contentKey) => isAppContentKey(contentKey) ? contentKey : `app-${contentKey}`;
12043
-
12044
- // packages/ai/tools/uiAskChoiceTool.ts
12045
- var uiAskChoiceFunctionSchema = {
12046
- name: "ask_user",
12047
- description: "\u8BA9\u7528\u6237\u5728\u4E00\u7EC4\u9009\u9879\u4E4B\u95F4\u505A\u9009\u62E9\uFF08\u5355\u9009\u6216\u591A\u9009\uFF09\u7684\u901A\u7528\u201C\u51FA\u9009\u9879\u201D\u5DE5\u5177\uFF08\u9700\u6C42\u6A21\u7CCA\u3001\u5206\u652F\u51B3\u7B56\u3001\u95EE\u5377\u7B49\uFF09\u3002\u672C\u5DE5\u5177\u7528\u4E8E\u7EAF\u63D0\u95EE\u3001\u7B49\u5F85\u7528\u6237\u56DE\u7B54\u7684\u573A\u666F\uFF08blocking:false \u65F6\u4E0D\u6682\u505C\u7B49\u5F85\uFF09\uFF1B\u82E5\u9700\u8981\u540C\u65F6\u5C55\u793A\u7ED3\u6784\u5316\u5BF9\u6BD4/\u6307\u6807\u5E76\u8BA9\u7528\u6237\u5728\u540C\u4E00\u5757\u91CC\u9009\u62E9\uFF0C\u8D70 show_interaction\u3002\u8C03\u7528\u524D\u987B\u5148\u5728\u666E\u901A\u56DE\u590D\u6587\u672C\u91CC\u89E3\u91CA\u80CC\u666F\u4E0E\u6743\u8861\uFF08\u5148\u89E3\u91CA\uFF0C\u518D\u8C03\u7528\uFF09\u3002\u591A\u95EE\u9898\u4F20 questions\uFF0C\u5355\u95EE\u9898\u4F20 question+choices\u3002\u754C\u9762\u9ED8\u8BA4\u63D0\u4F9B\u201C\u5176\u4ED6\u201D\u81EA\u7531\u8F93\u5165\u884C\uFF08\u53EF\u7528 allowOther:false \u5173\u95ED\uFF09\uFF0C\u7528\u6237\u8F93\u5165\u7684\u6587\u5B57\u4F1A\u968F\u7B54\u6848\u56DE\u4F20\uFF1B\u4E0D\u8981\u81EA\u5EFA\u201C\u5176\u4ED6/\u81EA\u5DF1\u5199\u201D\u4E4B\u7C7B\u7684\u9009\u9879\u2014\u2014\u70B9\u51FB\u666E\u901A\u9009\u9879\u53EA\u56DE\u4F20\u8BE5\u9009\u9879\u6587\u6848\uFF0C\u7528\u6237\u65E0\u5904\u586B\u5199\u3002",
12048
- parameters: {
12049
- type: "object",
12050
- properties: {
12051
- question: {
12052
- type: "string",
12053
- description: "\u5C55\u793A\u7ED9\u7528\u6237\u7684\u95EE\u9898\u6587\u6848\uFF08\u5355\u95EE\u9898\u6A21\u5F0F\uFF09\u3002\u4E0E questions \u4E8C\u9009\u4E00\u3002"
12054
- },
12055
- choices: {
12056
- type: "array",
12057
- description: "\u5907\u9009\u9879\u5217\u8868\uFF0C\u6E32\u67D3\u4E3A\u6309\u94AE\u4F9B\u7528\u6237\u70B9\u51FB\u3002",
12058
- items: {
12059
- type: "object",
12060
- properties: {
12061
- id: {
12062
- type: "string",
12063
- description: "\u9009\u9879\u6807\u8BC6\u3002"
12064
- },
12065
- label: {
12066
- type: "string",
12067
- description: "\u6309\u94AE\u6587\u5B57\uFF0C\u5982\u201C\u751F\u6210\u672C\u5468\u5468\u62A5\u201D\u3002"
12068
- },
12069
- detail: {
12070
- type: "string",
12071
- description: "\u7B80\u77ED\u8865\u5145\uFF08\u5EFA\u8BAE\u4E00\u53E5\u8BDD\uFF09\uFF0C\u957F\u89E3\u91CA\u5199\u8FDB\u8C03\u7528\u524D\u7684\u56DE\u590D\u6587\u672C\u3002"
12072
- },
12073
- userMessage: {
12074
- type: "string",
12075
- description: "\u70B9\u51FB\u540E\u4F5C\u4E3A\u4E0B\u4E00\u6761 user \u6D88\u606F\u53D1\u9001\u7684\u6587\u6848\uFF08\u7559\u7A7A\u9ED8\u8BA4\u7528 label\uFF09\u3002"
12076
- }
12077
- },
12078
- required: ["id", "label"]
12079
- }
12080
- },
12081
- questions: {
12082
- type: "array",
12083
- description: "\u591A\u95EE\u9898\u6A21\u5F0F\uFF08\u591A tab \u6E32\u67D3\uFF0C\u4E0E question+choices \u4E8C\u9009\u4E00\uFF09\u3002",
12084
- items: {
12085
- type: "object",
12086
- properties: {
12087
- id: {
12088
- type: "string",
12089
- description: "\u95EE\u9898\u6807\u8BC6\u3002"
12090
- },
12091
- header: {
12092
- type: "string",
12093
- description: "\u591A\u95EE\u9898 tab \u680F\u663E\u793A\u7684\u77ED\u6807\u7B7E\uFF08\u226412 \u5B57\u7B26\uFF0C\u5982\u201C\u683C\u5F0F/\u8BED\u8A00/\u8303\u56F4\u201D\uFF09\uFF0C\u7F3A\u7701\u7528 Qn\u3002"
12094
- },
12095
- question: {
12096
- type: "string",
12097
- description: "\u95EE\u9898\u6587\u6848\u3002"
12098
- },
12099
- choices: {
12100
- type: "array",
12101
- description: "\u8BE5\u95EE\u9898\u7684\u5907\u9009\u9879\u3002",
12102
- items: {
12103
- type: "object",
12104
- properties: {
12105
- id: { type: "string" },
12106
- label: { type: "string" },
12107
- detail: {
12108
- type: "string",
12109
- description: "\u7B80\u77ED\u8865\u5145\uFF08\u5EFA\u8BAE\u4E00\u53E5\u8BDD\uFF09\uFF0C\u957F\u89E3\u91CA\u5199\u8FDB\u8C03\u7528\u524D\u7684\u56DE\u590D\u6587\u672C\u3002"
12110
- },
12111
- userMessage: { type: "string" }
12112
- },
12113
- required: ["id", "label"]
12114
- }
12115
- },
12116
- multiSelect: {
12117
- type: "boolean",
12118
- description: "\u5141\u8BB8\u591A\u9009\uFF0C\u9ED8\u8BA4 false\u3002"
12119
- },
12120
- allowOther: {
12121
- type: "boolean",
12122
- description: "\u663E\u793A\u201C\u5176\u4ED6\u201D\u81EA\u7531\u8F93\u5165\u884C\uFF0C\u9ED8\u8BA4 true\u3002"
12123
- },
12124
- required: {
12125
- type: "boolean",
12126
- description: "\u662F\u5426\u5FC5\u987B\u56DE\u7B54\u624D\u80FD\u63D0\u4EA4\uFF0C\u9ED8\u8BA4 true\u3002"
12127
- }
12128
- },
12129
- required: ["id", "question", "choices"]
12130
- }
12131
- },
12132
- blocking: {
12133
- type: "boolean",
12134
- description: "\u662F\u5426\u7B49\u5F85\u7528\u6237\u9009\u62E9\u540E\u518D\u7EE7\u7EED\u6D41\u7A0B\uFF0C\u9ED8\u8BA4 true\u3002"
12135
- }
12136
- },
12137
- required: []
12138
- }
12139
- };
12140
- function validateChoiceList(choices, scopeLabel) {
12141
- const seenChoiceIds = /* @__PURE__ */ new Set();
12142
- for (let index = 0; index < choices.length; index += 1) {
12143
- const entry = choices[index];
12144
- if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
12145
- return `${scopeLabel}.choices[${index}] \u5FC5\u987B\u662F\u5BF9\u8C61\u3002`;
12146
- }
12147
- const choice = entry;
12148
- if (typeof choice.label !== "string" || !choice.label.trim()) {
12149
- return `${scopeLabel}.choices[${index}].label \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32\u3002`;
12150
- }
12151
- if (choice.id !== void 0 && typeof choice.id !== "string") {
12152
- return `${scopeLabel}.choices[${index}].id \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002`;
12153
- }
12154
- const choiceId = typeof choice.id === "string" ? choice.id.trim() : "";
12155
- if (choiceId && seenChoiceIds.has(choiceId)) {
12156
- return `${scopeLabel} \u5185\u7684\u9009\u9879 id "${choiceId}" \u91CD\u590D\u3002`;
12157
- }
12158
- if (choiceId) seenChoiceIds.add(choiceId);
12159
- }
12160
- return null;
12161
- }
12162
- function validateAskChoiceInput(raw) {
12163
- if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
12164
- return "ask_user \u9700\u8981\u4E00\u4E2A\u5BF9\u8C61\u53C2\u6570\u3002";
12165
- }
12166
- const args = raw;
12167
- if (args.blocking !== void 0 && typeof args.blocking !== "boolean") {
12168
- return "ask_user \u7684 blocking \u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002";
12169
- }
12170
- const rawQuestions = args.questions;
12171
- if (rawQuestions !== void 0 && !Array.isArray(rawQuestions)) {
12172
- return "ask_user \u7684 questions \u5FC5\u987B\u662F\u6570\u7EC4\u3002";
12173
- }
12174
- const questions = rawQuestions;
12175
- if (questions && questions.length > 0) {
12176
- const seenQuestionIds = /* @__PURE__ */ new Set();
12177
- for (let index = 0; index < questions.length; index += 1) {
12178
- const entry = questions[index];
12179
- if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
12180
- return `questions[${index}] \u5FC5\u987B\u662F\u5BF9\u8C61\u3002`;
12181
- }
12182
- const question = entry;
12183
- if (question.id !== void 0 && typeof question.id !== "string") {
12184
- return `questions[${index}].id \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002`;
12185
- }
12186
- const questionId = typeof question.id === "string" ? question.id.trim() : "";
12187
- if (questionId && seenQuestionIds.has(questionId)) {
12188
- return `\u95EE\u9898 id "${questionId}" \u91CD\u590D\u3002`;
12189
- }
12190
- if (questionId) seenQuestionIds.add(questionId);
12191
- if (typeof question.question !== "string" || !question.question.trim()) {
12192
- return `questions[${index}].question \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32\u3002`;
12193
- }
12194
- for (const flag of ["multiSelect", "allowOther", "required"]) {
12195
- if (question[flag] !== void 0 && typeof question[flag] !== "boolean") {
12196
- return `questions[${index}].${flag} \u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002`;
12197
- }
12198
- }
12199
- const choices = question.choices;
12200
- if (!Array.isArray(choices)) {
12201
- return `questions[${index}].choices \u5FC5\u987B\u662F\u6570\u7EC4\u3002`;
12202
- }
12203
- const choiceError = validateChoiceList(choices, `questions[${index}]`);
12204
- if (choiceError) return choiceError;
12205
- if (choices.length === 0 && question.allowOther === false) {
12206
- return `questions[${index}] \u6CA1\u6709\u4EFB\u4F55\u9009\u9879\u4E14 allowOther \u4E3A false\uFF0C\u7528\u6237\u65E0\u6CD5\u4F5C\u7B54\u3002`;
12207
- }
12208
- }
12209
- return null;
12210
- }
12211
- if (typeof args.question !== "string" || !args.question.trim()) {
12212
- return "ask_user \u9700\u8981 question\uFF08\u975E\u7A7A\u5B57\u7B26\u4E32\uFF09\u4E0E choices\u3002";
12213
- }
12214
- if (!Array.isArray(args.choices) || args.choices.length === 0) {
12215
- return "ask_user \u9700\u8981 question\uFF08\u975E\u7A7A\u5B57\u7B26\u4E32\uFF09\u4E0E choices\u3002";
12216
- }
12217
- return validateChoiceList(args.choices, "ask_user");
12218
- }
12219
- async function uiAskChoiceFunc(args, _thunkApi) {
12220
- const invalid = validateAskChoiceInput(args);
12221
- if (invalid) throw new Error(invalid);
12222
- const blocking = args?.blocking !== false;
12223
- if (Array.isArray(args?.questions) && args.questions.length > 0) {
12224
- const firstQ = args.questions[0];
12225
- return {
12226
- rawData: {
12227
- type: "ask_user",
12228
- question: firstQ?.question ?? "",
12229
- choices: firstQ?.choices ?? [],
12230
- blocking,
12231
- questions: args.questions
12232
- },
12233
- displayData: args.questions.map((q) => q.question).join(" / ")
12234
- };
12235
- }
12236
- const question = String(args?.question ?? "").trim();
12237
- const choices = Array.isArray(args?.choices) ? args.choices : [];
12238
- if (!question || choices.length === 0) {
12239
- throw new Error("ask_user \u9700\u8981 question+choices \u6216 questions\u3002");
12240
- }
12241
- return {
12242
- rawData: {
12243
- type: "ask_user",
12244
- question,
12245
- choices,
12246
- blocking
12247
- },
12248
- displayData: question
12249
- };
12250
- }
12251
- function parseUiAskChoiceContent(rawContent) {
12252
- const parsed = typeof rawContent === "string" ? (() => {
12253
- try {
12254
- return JSON.parse(rawContent);
12255
- } catch {
12256
- return null;
12257
- }
12258
- })() : rawContent;
12259
- if (!parsed || typeof parsed !== "object") return null;
12260
- if (parsed.type !== "ask_user") return null;
12261
- return parsed;
12262
- }
12263
-
12264
- // packages/ai/policy/personalizationDialog.ts
12265
- var PERSONALIZATION_DIALOG_CATEGORY = "user-overlay-profile";
12266
- var PERSONALIZATION_DIALOG_EXTRA_TOOLS = [
12267
- "ask_user",
12268
- "updateUserPreferenceProfile"
12269
- ];
12270
- var buildPersonalizationRuntimeOptions = (runtimeOptions) => ({
12271
- ...runtimeOptions,
12272
- extraTools: Array.from(
12273
- /* @__PURE__ */ new Set([
12274
- ...runtimeOptions?.extraTools ?? [],
12275
- ...PERSONALIZATION_DIALOG_EXTRA_TOOLS
12276
- ])
12277
- )
12278
- });
12279
- var buildPersonalizationDialogPolicyContext = () => [
12280
- "\u5F53\u524D\u5BF9\u8BDD\u662F\u201C\u7528\u6237\u4E2A\u6027\u5316\u8BBE\u7F6E\u201D\u6A21\u5F0F\uFF0C\u4E0D\u662F\u666E\u901A\u95F2\u804A\u3002",
12281
- "\u4F60\u7684\u76EE\u6807\u662F\u7528\u7B80\u77ED\u5BF9\u8BDD\u5E2E\u52A9\u7528\u6237\u786E\u8BA4 tone\u3001knowledge_capture\u3001space_context \u8FD9\u4E09\u9879\u504F\u597D\u3002",
12282
- "\u5982\u679C\u7528\u6237\u5148\u4ECB\u7ECD\u81EA\u5DF1\u3001\u5DE5\u4F5C\u65B9\u5F0F\u6216\u957F\u671F\u6C9F\u901A\u504F\u597D\uFF0C\u8BF7\u628A\u8FD9\u4E9B\u53EF\u590D\u7528\u4FE1\u606F\u6574\u7406\u6210\u7B80\u6D01\u7684 globalPrompt \u8349\u6848\uFF0C\u5E76\u5728\u7528\u6237\u786E\u8BA4\u540E\u901A\u8FC7 updateUserPreferenceProfile \u4FDD\u5B58\u3002",
12283
- "\u4F18\u5148\u4E00\u6B21\u53EA\u95EE\u4E00\u4E2A\u95EE\u9898\uFF1B\u5F53\u5B58\u5728\u6E05\u6670\u4E92\u65A5\u9009\u9879\u65F6\uFF0C\u4F18\u5148\u8C03\u7528 ask_user\u3002",
12284
- "\u6536\u96C6\u5230\u8DB3\u591F\u4FE1\u606F\u540E\uFF0C\u8C03\u7528 updateUserPreferenceProfile \u4FDD\u5B58\u7ED3\u679C\uFF0C\u7136\u540E\u7528\u81EA\u7136\u8BED\u8A00\u603B\u7ED3\u5DF2\u4FDD\u5B58\u7684\u8BBE\u7F6E\u3002",
12285
- "\u4FDD\u5B58\u5B8C\u6210\u540E\uFF0C\u8981\u63D0\u9192\u7528\u6237\uFF1A\u4EE5\u540E\u4E5F\u53EF\u4EE5\u5728\u8BBE\u7F6E\u91CC\u4FEE\u6539 globalPrompt \u548C\u8FD9\u4E9B\u504F\u597D\uFF0C\u6216\u8005\u518D\u6B21\u6253\u5F00\u8FD9\u4E2A\u5165\u53E3\u7EE7\u7EED\u8C03\u6574\u3002",
12286
- "\u4E2A\u6027\u5316\u8BBE\u7F6E\u5B8C\u6210\u540E\uFF0C\u53EF\u987A\u624B\u5F15\u5BFC\u7528\u6237\u5C1D\u8BD5 1 \u5230 2 \u4E2A\u76F8\u5173\u529F\u80FD\uFF0C\u4F8B\u5982\u9996\u9875\u5FEB\u6377\u5BF9\u8BDD\u3001\u521B\u5EFA\u7B14\u8BB0\u3001\u521B\u5EFA AI\uFF0C\u4F46\u4E0D\u8981\u4E00\u6B21\u63A8\u8350\u592A\u591A\u3002",
12287
- "\u9664\u975E\u7528\u6237\u660E\u786E\u8981\u6C42\uFF0C\u5426\u5219\u4E0D\u8981\u521B\u5EFA\u6587\u6863\uFF0C\u4E0D\u8981\u521B\u5EFA\u6216\u4FEE\u6539\u4EFB\u4F55 agent\u3002"
12288
- ].join("\n");
12289
-
12290
12235
  // packages/chat/dialog/dialogAgentPolicy.ts
12291
12236
  var resolveDialogAgentMode = (dialog) => {
12292
12237
  if (dialog?.agentMode === "auto") return "auto";
@@ -12322,7 +12267,7 @@ function resolveHandleSendMessageContext(input) {
12322
12267
  return {
12323
12268
  agentKeyToUse: resolveDialogRuntimeAgentKey(dialogConfig, targetAgentKey),
12324
12269
  agentConfigToUse: resolveDialogRuntimeAgentConfig(dialogConfig, targetAgentKey) ?? void 0,
12325
- effectiveRuntimeOptions: dialogConfig.category === PERSONALIZATION_DIALOG_CATEGORY ? buildPersonalizationRuntimeOptions(runtimeOptions ?? {}) : runtimeOptions
12270
+ effectiveRuntimeOptions: runtimeOptions
12326
12271
  };
12327
12272
  }
12328
12273
 
@@ -12501,6 +12446,60 @@ function resolveStreamEndBillingUsages(input) {
12501
12446
  }
12502
12447
 
12503
12448
  // packages/chat/messages/web/toolDisplayName.ts
12449
+ var TOOL_DISPLAY_NAME_DEFAULTS = {
12450
+ tool: "\u5DE5\u5177",
12451
+ globFiles: "\u67E5\u627E\u6587\u4EF6",
12452
+ glob_files: "\u67E5\u627E\u6587\u4EF6",
12453
+ codeSearch: "\u4EE3\u7801\u641C\u7D22",
12454
+ code_search: "\u4EE3\u7801\u641C\u7D22",
12455
+ readFile: "\u8BFB\u53D6\u6587\u4EF6",
12456
+ read_file: "\u8BFB\u53D6\u6587\u4EF6",
12457
+ writeFile: "\u5199\u5165\u6587\u4EF6",
12458
+ write_file: "\u5199\u5165\u6587\u4EF6",
12459
+ editFile: "\u4FEE\u6539\u6587\u4EF6",
12460
+ edit_file: "\u4FEE\u6539\u6587\u4EF6",
12461
+ execShell: "\u8FD0\u884C\u547D\u4EE4",
12462
+ exec_shell: "\u8FD0\u884C\u547D\u4EE4",
12463
+ shell: "\u8FD0\u884C\u547D\u4EE4",
12464
+ searchWorkspace: "\u641C\u7D22\u5DE5\u4F5C\u533A",
12465
+ readWorkspaceFile: "\u8BFB\u53D6\u6587\u4EF6",
12466
+ writeWorkspaceFile: "\u5199\u5165\u6587\u4EF6",
12467
+ replaceWorkspaceText: "\u66FF\u6362\u6587\u672C",
12468
+ listAgents: "\u5217\u51FA\u52A9\u624B",
12469
+ readAgent: "\u8BFB\u53D6\u52A9\u624B",
12470
+ startAgentRun: "\u542F\u52A8\u5B50\u4EFB\u52A1",
12471
+ controlAgentRun: "\u63A7\u5236\u5B50\u4EFB\u52A1",
12472
+ createAgent: "\u521B\u5EFA\u52A9\u624B",
12473
+ updateAgent: "\u66F4\u65B0\u52A9\u624B",
12474
+ prepareAgentDraft: "\u6574\u7406\u52A9\u624B\u8349\u7A3F",
12475
+ createSkillAgent: "\u521B\u5EFA\u6280\u80FD\u52A9\u624B",
12476
+ queryDialogsBySubjectRef: "\u68C0\u7D22\u5BF9\u8BDD\u8BB0\u5F55",
12477
+ deleteDialogs: "\u5220\u9664\u5BF9\u8BDD\u8BB0\u5F55",
12478
+ readDialog: "\u8BFB\u53D6\u5BF9\u8BDD",
12479
+ listDialogs: "\u5217\u51FA\u5BF9\u8BDD",
12480
+ exa_search: "\u641C\u7D22",
12481
+ firecrawl_scrape: "\u7F51\u9875\u6293\u53D6",
12482
+ firecrawl_search: "\u7F51\u9875\u641C\u7D22",
12483
+ startPreview: "\u542F\u52A8\u9884\u89C8",
12484
+ getPreviewStatus: "\u9884\u89C8\u72B6\u6001",
12485
+ stopPreview: "\u505C\u6B62\u9884\u89C8",
12486
+ releasePreview: "\u91CA\u653E\u9884\u89C8",
12487
+ captureVisualState: "\u622A\u56FE\u68C0\u67E5",
12488
+ fetchWebpage: "\u6293\u53D6\u7F51\u9875",
12489
+ fetch_webpage: "\u6293\u53D6\u7F51\u9875",
12490
+ loadSkill: "\u52A0\u8F7D\u6280\u80FD"
12491
+ };
12492
+ function normalizeToolNameKey(toolName) {
12493
+ let normalized = asTrimmedString(toolName);
12494
+ if (!normalized) return "";
12495
+ normalized = normalized.replace(/^functions\./, "").replace(/^tools\./, "");
12496
+ if (TOOL_DISPLAY_NAME_DEFAULTS[normalized]) return normalized;
12497
+ if (normalized.includes("_")) {
12498
+ const camel = normalized.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
12499
+ if (TOOL_DISPLAY_NAME_DEFAULTS[camel]) return camel;
12500
+ }
12501
+ return normalized;
12502
+ }
12504
12503
  var LEGACY_VERSION_ACTIVITY_TITLES = {
12505
12504
  \u7528\u7248\u672C\u7BA1\u7406\u68C0\u67E5\u6539\u52A8: "\u68C0\u67E5\u6539\u52A8",
12506
12505
  \u7528\u7248\u672C\u7BA1\u7406\u67E5\u770B\u6539\u52A8: "\u67E5\u770B\u6539\u52A8",
@@ -12830,7 +12829,9 @@ function formatActivityAction(activity) {
12830
12829
  }
12831
12830
  function getMessageStatus(msg) {
12832
12831
  const rawData = typeof msg?.content === "string" ? asOptionalJsonRecord(msg.content) : msg?.content;
12833
- const isError = msg?.toolPayload?.status === "failed" || !!msg?.toolPayload?.error || !!rawData?.error;
12832
+ const name = normalizeToolNameKey(msg?.toolName);
12833
+ const isReadFile = ["readFile", "read_file", "readWorkspaceFile"].includes(name);
12834
+ const isError = msg?.toolPayload?.status === "failed" || !!msg?.toolPayload?.error || !!msg?.metadata?.error || !isReadFile && (!!rawData?.error || rawData?.ok === false);
12834
12835
  if (msg?.isStreaming || msg?.toolPayload?.status === "running") return "running";
12835
12836
  if (isError) return "failed";
12836
12837
  if (msg?.toolPayload?.status === "pending") return "pending";
@@ -13168,15 +13169,6 @@ function prepareStreamEndPersistInputs(input) {
13168
13169
  }
13169
13170
 
13170
13171
  // packages/chat/messages/messageUnderstandingCapture.ts
13171
- function getLatestUserInputFromMessages(messages) {
13172
- for (let index = messages.length - 1; index >= 0; index -= 1) {
13173
- const message = messages[index];
13174
- if (!message || message.role !== "user") continue;
13175
- const serialized = serializeMessageContent(message.content, "[\u56FE\u7247]")?.trim();
13176
- if (serialized) return serialized;
13177
- }
13178
- return null;
13179
- }
13180
13172
  function getDialogSpaceIdFromState(state, dialogKey) {
13181
13173
  if (!dialogKey) return void 0;
13182
13174
  const dialog = selectById(state, dialogKey);
@@ -13190,32 +13182,117 @@ function resolveMemoryCaptureBaseUrl(state) {
13190
13182
  return currentServer.replace(/\/+$/, "");
13191
13183
  }
13192
13184
  async function captureUnderstandingFromCompletedUiTurn(input) {
13193
- if (input.assistantText.trim() === "") return;
13194
- if (input.toolCalls && input.toolCalls.length > 0) return;
13195
- if (!input.agentKey) return;
13196
- const latestUserInput = getLatestUserInputFromMessages(input.messages);
13197
- if (!latestUserInput) return;
13185
+ if (!input.assistantText.trim() || input.toolCalls?.length || !input.agentKey) {
13186
+ return { status: "skipped", reason: "incomplete_turn" };
13187
+ }
13188
+ const source = input.messages.findLast((message) => message?.role === "user");
13189
+ if (!source || !/^[A-Za-z0-9_-]{1,128}$/.test(source.id ?? "") || source.dbKey !== dialogMessageKey(input.dialogId, source.id)) {
13190
+ return { status: "skipped", reason: "missing_persisted_user" };
13191
+ }
13198
13192
  const state = input.state;
13193
+ const persisted = state?.db ? selectById(state, source.dbKey) : void 0;
13194
+ if (!persisted || persisted.id !== source.id || persisted.dbKey !== source.dbKey || persisted.role !== "user" || persisted.metadata?.queueState === "pending" || persisted.deleted || persisted.isDeleted || typeof persisted.content !== "string" || !persisted.content.trim() || persisted.content !== source.content) {
13195
+ return { status: "skipped", reason: "missing_persisted_user" };
13196
+ }
13199
13197
  const token = selectIdentityToken(state) ?? null;
13200
13198
  const baseUrl = resolveMemoryCaptureBaseUrl(state);
13201
- if (!token || !baseUrl) return;
13202
- const dialog = input.dialogKey ? selectById(state, input.dialogKey) : void 0;
13199
+ if (!token || !baseUrl) return { status: "skipped", reason: "unavailable" };
13200
+ const body = JSON.stringify({
13201
+ agentKey: input.agentKey,
13202
+ dialogId: input.dialogId,
13203
+ userMessageId: persisted.id,
13204
+ userInput: persisted.content,
13205
+ assistantText: input.assistantText,
13206
+ spaceId: input.spaceId ?? getDialogSpaceIdFromState(state, input.dialogKey)
13207
+ });
13208
+ const key = JSON.stringify([baseUrl, token, body]);
13209
+ const existing = inFlight.get(key);
13210
+ if (existing && existing.signal === input.signal) return existing.promise;
13211
+ const promise = runCapture(input, persisted.dbKey, baseUrl, token, body);
13212
+ const entry = { signal: input.signal, promise };
13213
+ inFlight.set(key, entry);
13203
13214
  try {
13204
- await fetch(`${baseUrl}/api/memory/capture-turn`, {
13205
- method: "POST",
13206
- headers: {
13207
- "Content-Type": "application/json",
13208
- Authorization: `Bearer ${token}`
13215
+ return await promise;
13216
+ } finally {
13217
+ if (inFlight.get(key) === entry) inFlight.delete(key);
13218
+ }
13219
+ }
13220
+ var inFlight = /* @__PURE__ */ new Map();
13221
+ async function runCapture(input, sourceKey, baseUrl, token, body) {
13222
+ const controller = new AbortController();
13223
+ const cancel = () => controller.abort();
13224
+ input.signal?.addEventListener("abort", cancel, { once: true });
13225
+ if (input.signal?.aborted) cancel();
13226
+ const requestedTimeout = input.timeoutMs ?? 8e3;
13227
+ const timeoutMs = Number.isFinite(requestedTimeout) ? Math.max(1, Math.min(8e3, requestedTimeout)) : 8e3;
13228
+ const timer = setTimeout(cancel, timeoutMs);
13229
+ const signal = controller.signal;
13230
+ const bounded = (operation) => new Promise((resolve, reject) => {
13231
+ const abort = () => reject(new Error("capture aborted"));
13232
+ if (signal.aborted) {
13233
+ reject(new Error("capture aborted"));
13234
+ return;
13235
+ }
13236
+ signal.addEventListener("abort", abort, { once: true });
13237
+ operation.then(resolve, reject).finally(() => signal.removeEventListener("abort", abort));
13238
+ });
13239
+ try {
13240
+ if (signal.aborted) return { status: "failed", reason: "cancelled" };
13241
+ const ack = await bounded(waitForWriteAck(sourceKey, { targetServer: baseUrl, timeoutMs }));
13242
+ if (ack.timedOut) return { status: "failed", reason: "replication_timeout" };
13243
+ if (!["acked", "unknown"].includes(ack.outcome.status) || ack.waitTarget === "primary-fallback") {
13244
+ return { status: "failed", reason: "replication_failed" };
13245
+ }
13246
+ const response = await bounded(fetchWithTransientRetry(
13247
+ async (url, init2) => {
13248
+ if (signal.aborted) throw new Error("capture aborted");
13249
+ return bounded(fetch(url, init2));
13250
+ },
13251
+ `${baseUrl}/api/memory/capture-turn`,
13252
+ {
13253
+ method: "POST",
13254
+ headers: {
13255
+ "Content-Type": "application/json",
13256
+ Authorization: `Bearer ${token}`
13257
+ },
13258
+ body,
13259
+ signal
13209
13260
  },
13210
- body: JSON.stringify({
13211
- agentKey: input.agentKey,
13212
- dialogId: input.dialogId,
13213
- userInput: latestUserInput,
13214
- assistantText: input.assistantText,
13215
- spaceId: input.spaceId ?? getDialogSpaceIdFromState(state, input.dialogKey)
13216
- })
13217
- });
13261
+ {
13262
+ maxAttempts: 3,
13263
+ coreDrainingMaxAttempts: 3,
13264
+ // Never replay an ambiguous application-level 422 or permanent 401/403.
13265
+ retryableStatuses: /* @__PURE__ */ new Set([429, 502, 503, 504]),
13266
+ sleep: (ms) => bounded(new Promise((resolve) => {
13267
+ const timer2 = setTimeout(done, Math.min(ms, 2e3));
13268
+ function done() {
13269
+ clearTimeout(timer2);
13270
+ signal.removeEventListener("abort", done);
13271
+ resolve();
13272
+ }
13273
+ signal.addEventListener("abort", done, { once: true });
13274
+ }))
13275
+ }
13276
+ ));
13277
+ if (!response.ok) return { status: "failed", reason: "http", httpStatus: response.status };
13278
+ let responseBody;
13279
+ try {
13280
+ responseBody = await bounded(response.json());
13281
+ } catch {
13282
+ if (signal.aborted) throw new Error("capture aborted");
13283
+ return { status: "failed", reason: "invalid_response" };
13284
+ }
13285
+ const native = responseBody?.nativeCapture;
13286
+ if (native && ["captured", "skipped", "failed"].includes(native.capture) && ["applied", "no_op", "deferred", "failed"].includes(native.formation)) {
13287
+ return { status: "native", capture: native.capture, formation: native.formation };
13288
+ }
13289
+ if (!native && responseBody?.success === true) return { status: "legacy_acknowledged" };
13290
+ return { status: "failed", reason: "invalid_response" };
13218
13291
  } catch {
13292
+ return { status: "failed", reason: signal.aborted ? input.signal?.aborted ? "cancelled" : "timeout" : "network" };
13293
+ } finally {
13294
+ clearTimeout(timer);
13295
+ input.signal?.removeEventListener("abort", cancel);
13219
13296
  }
13220
13297
  }
13221
13298
 
@@ -13360,6 +13437,128 @@ function clearForegroundTurnSettledVisible(dialogId) {
13360
13437
  notify();
13361
13438
  }
13362
13439
 
13440
+ // packages/chat/messages/messageBucketLru.ts
13441
+ var MAX_CACHED_INACTIVE_DIALOG_BUCKETS = 10;
13442
+ var SAVE_FAILED_MARKER = "[Failed to save message]";
13443
+ function isSaveFailedMessageContent(content) {
13444
+ if (typeof content === "string") {
13445
+ return content.includes(SAVE_FAILED_MARKER);
13446
+ }
13447
+ if (Array.isArray(content)) {
13448
+ return content.some(
13449
+ (part) => Boolean(part) && part.type === "text" && typeof part.text === "string" && part.text.includes(SAVE_FAILED_MARKER)
13450
+ );
13451
+ }
13452
+ return false;
13453
+ }
13454
+ function hasProtectedMessageInBucket(messages) {
13455
+ const validMessages = [];
13456
+ for (const msg of messages) {
13457
+ if (!msg) continue;
13458
+ validMessages.push(msg);
13459
+ if (msg.isStreaming === true) return true;
13460
+ if (msg.imageGenerationState != null) return true;
13461
+ const metadata = msg.metadata;
13462
+ const queueState = metadata?.queueState;
13463
+ if (queueState === "pending" || queueState === "queued" || queueState === "accepted") {
13464
+ return true;
13465
+ }
13466
+ const userBatchPhase = metadata?.userBatchPhase;
13467
+ if (userBatchPhase === "admitted" || userBatchPhase === "requested") {
13468
+ return true;
13469
+ }
13470
+ const rawMsg = msg;
13471
+ if (metadata?.saveFailed === true || metadata?.draft === true || metadata?.isDraft === true || metadata?.persisted === false || metadata?.unsaved === true || rawMsg.saveFailed === true || rawMsg.isDraft === true || rawMsg.persisted === false) {
13472
+ return true;
13473
+ }
13474
+ if (isSaveFailedMessageContent(msg.content)) {
13475
+ return true;
13476
+ }
13477
+ }
13478
+ return selectPendingUserMessages(validMessages).length > 0;
13479
+ }
13480
+ function touchDialogBucketLru(lruOrder, dialogId, dialogStateById) {
13481
+ if (!dialogId || dialogId === GLOBAL_MESSAGE_DIALOG_ID) {
13482
+ return lruOrder ? [...lruOrder] : [];
13483
+ }
13484
+ if (lruOrder && lruOrder.length > 0 && lruOrder[lruOrder.length - 1] === dialogId) {
13485
+ return lruOrder;
13486
+ }
13487
+ const seen = /* @__PURE__ */ new Set();
13488
+ const next = [];
13489
+ if (!lruOrder && dialogStateById) {
13490
+ for (const existingId of Object.keys(dialogStateById)) {
13491
+ if (existingId !== GLOBAL_MESSAGE_DIALOG_ID && existingId !== dialogId && !seen.has(existingId)) {
13492
+ seen.add(existingId);
13493
+ next.push(existingId);
13494
+ }
13495
+ }
13496
+ }
13497
+ if (lruOrder) {
13498
+ for (const existingId of lruOrder) {
13499
+ if (existingId !== GLOBAL_MESSAGE_DIALOG_ID && existingId !== dialogId && !seen.has(existingId) && (!dialogStateById || existingId in dialogStateById)) {
13500
+ seen.add(existingId);
13501
+ next.push(existingId);
13502
+ }
13503
+ }
13504
+ }
13505
+ next.push(dialogId);
13506
+ return next;
13507
+ }
13508
+ function planColdMessageBucketEviction(input) {
13509
+ const {
13510
+ dialogStateById,
13511
+ lruOrder = [],
13512
+ activeDialogId: activeDialogId2,
13513
+ protectedDialogIds = [],
13514
+ maxCachedInactiveBuckets = MAX_CACHED_INACTIVE_DIALOG_BUCKETS,
13515
+ isDialogProtected
13516
+ } = input;
13517
+ const cap = Math.max(0, Math.floor(maxCachedInactiveBuckets));
13518
+ const protectedSet = /* @__PURE__ */ new Set([GLOBAL_MESSAGE_DIALOG_ID]);
13519
+ if (typeof activeDialogId2 === "string" && activeDialogId2.length > 0) {
13520
+ protectedSet.add(activeDialogId2);
13521
+ }
13522
+ for (const id of protectedDialogIds) {
13523
+ if (typeof id === "string" && id.length > 0) {
13524
+ protectedSet.add(id);
13525
+ }
13526
+ }
13527
+ const trackedSet = /* @__PURE__ */ new Set();
13528
+ const trackedOrdered = [];
13529
+ for (const id of lruOrder) {
13530
+ if (id !== GLOBAL_MESSAGE_DIALOG_ID && id in dialogStateById && !trackedSet.has(id)) {
13531
+ trackedSet.add(id);
13532
+ trackedOrdered.push(id);
13533
+ }
13534
+ }
13535
+ const orderedIds = [];
13536
+ for (const id of Object.keys(dialogStateById)) {
13537
+ if (id !== GLOBAL_MESSAGE_DIALOG_ID && !trackedSet.has(id)) {
13538
+ orderedIds.push(id);
13539
+ }
13540
+ }
13541
+ orderedIds.push(...trackedOrdered);
13542
+ const evictableIds = [];
13543
+ for (const dialogId of orderedIds) {
13544
+ if (protectedSet.has(dialogId)) continue;
13545
+ const bucket = dialogStateById[dialogId];
13546
+ if (!bucket) continue;
13547
+ const entities = bucket.msgs?.entities ?? {};
13548
+ const messages = Object.values(entities).filter(
13549
+ (msg) => Boolean(msg)
13550
+ );
13551
+ if (hasProtectedMessageInBucket(messages)) continue;
13552
+ if (isDialogProtected?.(dialogId, messages)) continue;
13553
+ evictableIds.push(dialogId);
13554
+ }
13555
+ const overflow = evictableIds.length - cap;
13556
+ if (overflow <= 0) {
13557
+ return [];
13558
+ }
13559
+ return evictableIds.slice(0, overflow);
13560
+ }
13561
+
13363
13562
  // packages/chat/messages/messageSlice.ts
13364
13563
  var OLDER_LOAD_LIMIT = 30;
13365
13564
  var createSliceWithThunks = buildCreateSlice({
@@ -13375,7 +13574,8 @@ var createEmptyMessageDialogState = () => ({
13375
13574
  var initialState = {
13376
13575
  dialogStateById: {
13377
13576
  [GLOBAL_MESSAGE_DIALOG_ID]: createEmptyMessageDialogState()
13378
- }
13577
+ },
13578
+ lruOrder: []
13379
13579
  };
13380
13580
  var captureUnderstandingFromCompletedUiTurn2 = async (input) => captureUnderstandingFromCompletedUiTurn({
13381
13581
  ...input,
@@ -13392,8 +13592,38 @@ var ensureMessageDialogState = (state, dialogId, dialogKey) => {
13392
13592
  if (!state.dialogStateById[resolvedDialogId]) {
13393
13593
  state.dialogStateById[resolvedDialogId] = createEmptyMessageDialogState();
13394
13594
  }
13595
+ state.lruOrder = touchDialogBucketLru(
13596
+ state.lruOrder,
13597
+ resolvedDialogId,
13598
+ state.dialogStateById
13599
+ );
13395
13600
  return state.dialogStateById[resolvedDialogId];
13396
13601
  };
13602
+ var evictColdBucketsIfNeeded = (state, protectedDialogId) => {
13603
+ if (!state.dialogStateById) return;
13604
+ const evictedIds = planColdMessageBucketEviction({
13605
+ dialogStateById: state.dialogStateById,
13606
+ lruOrder: state.lruOrder,
13607
+ activeDialogId: getActiveMessageDialogId(),
13608
+ protectedDialogIds: protectedDialogId ? [protectedDialogId] : void 0,
13609
+ maxCachedInactiveBuckets: MAX_CACHED_INACTIVE_DIALOG_BUCKETS,
13610
+ isDialogProtected: (dialogId) => {
13611
+ if (getHasStreamingMessage(dialogId)) return true;
13612
+ if (getCanonicalHandoffTransientId(dialogId) !== null) return true;
13613
+ const session = getMessageSession(dialogId);
13614
+ return session.isLoadingInitial || session.isLoadingOlder;
13615
+ }
13616
+ });
13617
+ if (evictedIds.length === 0) return;
13618
+ const evictedSet = new Set(evictedIds);
13619
+ for (const evictedId of evictedIds) {
13620
+ delete state.dialogStateById[evictedId];
13621
+ deleteMessageSession(evictedId);
13622
+ }
13623
+ if (state.lruOrder) {
13624
+ state.lruOrder = state.lruOrder.filter((id) => !evictedSet.has(id));
13625
+ }
13626
+ };
13397
13627
  var getMessageDialogState = (state, dialogId, dialogKey) => {
13398
13628
  const dialogStateById = state.dialogStateById ?? {};
13399
13629
  const resolvedDialogId = resolveMessageDialogId(state, dialogId, dialogKey);
@@ -13500,6 +13730,7 @@ var messageSlice = createSliceWithThunks({
13500
13730
  state.dialogStateById = {
13501
13731
  [GLOBAL_MESSAGE_DIALOG_ID]: createEmptyMessageDialogState()
13502
13732
  };
13733
+ state.lruOrder = [];
13503
13734
  resetAllMessageSessions();
13504
13735
  return;
13505
13736
  }
@@ -13509,6 +13740,9 @@ var messageSlice = createSliceWithThunks({
13509
13740
  action2.payload?.dialogKey
13510
13741
  );
13511
13742
  delete state.dialogStateById[dialogId];
13743
+ if (state.lruOrder) {
13744
+ state.lruOrder = state.lruOrder.filter((id) => id !== dialogId);
13745
+ }
13512
13746
  deleteMessageSession(dialogId);
13513
13747
  if (dialogId === getActiveMessageDialogId()) {
13514
13748
  setActiveMessageDialogId(null);
@@ -13726,7 +13960,14 @@ var messageSlice = createSliceWithThunks({
13726
13960
  async (args, { dispatch, getState, extra }) => {
13727
13961
  const dialogId = extractCustomId(args.dialogKey);
13728
13962
  const db = extra.db;
13729
- const valid = () => !args.signal?.aborted && (args.owns?.() ?? true) && (args.execution?.valid() ?? true);
13963
+ const valid = () => {
13964
+ if (args.signal?.aborted) return false;
13965
+ if (!(args.owns?.() ?? true) || !(args.execution?.valid() ?? true)) {
13966
+ args.execution?.dispose();
13967
+ throw new Error("User batch execution ownership lost; blocked");
13968
+ }
13969
+ return true;
13970
+ };
13730
13971
  const assertInput = (expected, actual, ids) => {
13731
13972
  try {
13732
13973
  assertUserBatchInput(expected, actual, ids);
@@ -13737,7 +13978,6 @@ var messageSlice = createSliceWithThunks({
13737
13978
  };
13738
13979
  if (!isLocalUserBatch(args.dialogKey)) {
13739
13980
  if (!Array.isArray(args.requestUserInput)) throw new Error("Missing controlled user batch request input; blocked");
13740
- if (args.execution && !args.execution.valid()) throw new Error("User batch execution expired; blocked");
13741
13981
  if (!valid()) return void 0;
13742
13982
  const control = userBatchControl(getState(), args.dialogKey);
13743
13983
  const history = selectAllMsgs(getState(), dialogId).filter((message) => message.role === "user");
@@ -13838,7 +14078,14 @@ var messageSlice = createSliceWithThunks({
13838
14078
  };
13839
14079
  if (!valid()) return void 0;
13840
14080
  if (rows.length) await persist("requested");
13841
- if (!valid()) {
14081
+ let canStart;
14082
+ try {
14083
+ canStart = valid();
14084
+ } catch (error) {
14085
+ if (rows.length) await persist("admitted");
14086
+ throw error;
14087
+ }
14088
+ if (!canStart) {
13842
14089
  if (rows.length) await persist("admitted");
13843
14090
  return void 0;
13844
14091
  }
@@ -14017,6 +14264,7 @@ var messageSlice = createSliceWithThunks({
14017
14264
  } else {
14018
14265
  setAllMessages(dialogState, action2.payload);
14019
14266
  }
14267
+ evictColdBucketsIfNeeded(state, dialogId);
14020
14268
  },
14021
14269
  rejected: (state, action2) => {
14022
14270
  const dialogId = action2.meta.arg.dialogId;
@@ -14267,12 +14515,17 @@ var messageSlice = createSliceWithThunks({
14267
14515
  }
14268
14516
  captureUnderstandingFromCompletedUiTurn2({
14269
14517
  state: getState(),
14518
+ signal,
14270
14519
  agentKey: agentConfig?.dbKey,
14271
14520
  dialogId,
14272
14521
  dialogKey,
14273
14522
  spaceId: payload.spaceId,
14274
14523
  assistantText: textContent,
14275
14524
  toolCalls
14525
+ }).then((result) => {
14526
+ if (result.status === "failed" || result.status === "native" && (result.capture === "failed" || result.formation === "failed" || result.formation === "deferred")) {
14527
+ console.warn("Understanding memory capture incomplete:", result);
14528
+ }
14276
14529
  }).catch(
14277
14530
  (err) => console.error("Understanding memory capture failed:", err)
14278
14531
  );
@@ -14304,6 +14557,7 @@ var messageSlice = createSliceWithThunks({
14304
14557
  imageGenerationState: void 0
14305
14558
  });
14306
14559
  setStreamingMessageId(payload.dialogId, null);
14560
+ evictColdBucketsIfNeeded(state, payload.dialogId);
14307
14561
  },
14308
14562
  rejected: (state, action2) => {
14309
14563
  const arg = action2.meta?.arg;
@@ -14426,7 +14680,7 @@ var messageSlice = createSliceWithThunks({
14426
14680
  runtimeOptions: args.runtimeOptions
14427
14681
  });
14428
14682
  if (agentKeyToUse) {
14429
- const { streamAgentChatTurn } = await import("./agentSlice-N7H2FRJA.js");
14683
+ const { streamAgentChatTurn } = await import("./agentSlice-IZ5ANAF7.js");
14430
14684
  await dispatch(
14431
14685
  streamAgentChatTurn({
14432
14686
  agentKey: agentKeyToUse,
@@ -14558,6 +14812,10 @@ var scaleModelServiceTierPrice = (price, inputOutputMultiplier, cacheMultiplier)
14558
14812
  ...price,
14559
14813
  input: price.input * inputOutputMultiplier,
14560
14814
  output: price.output * inputOutputMultiplier,
14815
+ // 缓存命中单价有两个历史字段(见 resolveModelPrice 的归一说明):只缩放
14816
+ // cachingWrite/cachingRead 会漏掉已归一出来的 inputCacheHit,使缓存命中仍按
14817
+ // Standard 价收(Gemini 4 Neon Flex 1M 命中应为 0.6,漏缩放则变回 1.2)。
14818
+ ...typeof cacheMultiplier === "number" && typeof price.inputCacheHit === "number" ? { inputCacheHit: price.inputCacheHit * cacheMultiplier } : {},
14561
14819
  ...typeof cacheMultiplier === "number" && typeof price.cachingWrite === "number" ? { cachingWrite: price.cachingWrite * cacheMultiplier } : {},
14562
14820
  ...typeof cacheMultiplier === "number" && typeof price.cachingRead === "number" ? { cachingRead: price.cachingRead * cacheMultiplier } : {}
14563
14821
  });
@@ -14573,6 +14831,9 @@ var resolveGoogleServiceTierPrice = (model, price, billingServiceTier) => {
14573
14831
  serviceTierMultiplier.cache
14574
14832
  );
14575
14833
  }
14834
+ if (model.serviceTierPriceMultipliers) {
14835
+ return priceWithImageOutput;
14836
+ }
14576
14837
  if (normalizedTier === "flex" || normalizedTier === "batch") {
14577
14838
  return scaleModelInputOutputPrice(priceWithImageOutput, 0.5);
14578
14839
  }
@@ -14595,6 +14856,9 @@ var resolveEffectiveModelPrice = ({
14595
14856
  if (provider === "google") {
14596
14857
  return resolveGoogleServiceTierPrice(model, resolvedPrice, billingServiceTier);
14597
14858
  }
14859
+ if (provider === "nolo" && model.serviceTierPriceMultipliers && resolvePlatformHostedRouting(model.name)?.usageProvider === "google") {
14860
+ return resolveGoogleServiceTierPrice(model, resolvedPrice, billingServiceTier);
14861
+ }
14598
14862
  if (provider === "runinfra" || provider === "baseten") {
14599
14863
  return resolvedPrice;
14600
14864
  }
@@ -14802,6 +15066,9 @@ var calculateBasicCost = (model, usage, provider, externalPrice, billingServiceT
14802
15066
  if (model.name.includes("gemini-3")) {
14803
15067
  return calculateAnthropicCost(resolvedPrice, usage, externalPrice);
14804
15068
  }
15069
+ if (typeof resolvedPrice.inputCacheHit === "number" && isGeminiNeonModel(model.name)) {
15070
+ return calculateCacheBasedCost(resolvedPrice, usage, externalPrice);
15071
+ }
14805
15072
  return calculateSimpleCost(resolvedPrice, usage, externalPrice);
14806
15073
  case "openrouter": {
14807
15074
  const reported = calculateApiReportedCost(usage);
@@ -15497,7 +15764,7 @@ var deleteOwnedDialogAttachments = async (args) => {
15497
15764
  metadataReadFailures
15498
15765
  });
15499
15766
  if (!plan.deleteCandidates.length) return plan;
15500
- const { deleteFileAction } = await import("./deleteFile-QOOP2UK7.js");
15767
+ const { deleteFileAction } = await import("./deleteFile-VCCHS72Y.js");
15501
15768
  for (const candidate of plan.deleteCandidates) {
15502
15769
  if (candidate.fileDbKey) {
15503
15770
  await deleteFileAction(candidate.fileDbKey, args.thunkApi);
@@ -15559,7 +15826,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
15559
15826
  }
15560
15827
  if (isCurrentDialog) {
15561
15828
  await thunkApi.dispatch(resetMsgs());
15562
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-KGYIABDY.js");
15829
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-2KLMHECR.js");
15563
15830
  dispatch(clearPendingAttachments2());
15564
15831
  }
15565
15832
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -15567,39 +15834,39 @@ var deleteDialogThunk = async (payload, thunkApi) => {
15567
15834
 
15568
15835
  // packages/chat/dialog/dialogSlice.ts
15569
15836
  var runCreateDialogAction = async (args, thunkApi) => {
15570
- const { createDialogAction } = await import("./createDialogAction-MMBIHFFU.js");
15837
+ const { createDialogAction } = await import("./createDialogAction-SDUGVTPS.js");
15571
15838
  return createDialogAction(args, thunkApi);
15572
15839
  };
15573
15840
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
15574
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-GFI6SJZV.js");
15841
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-ZFFGJ7CZ.js");
15575
15842
  return createAgentAutomationAction(args, thunkApi);
15576
15843
  };
15577
15844
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
15578
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-RV3EUEN3.js");
15845
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-QCSN3RYO.js");
15579
15846
  return updateDialogTitleAction(args, thunkApi);
15580
15847
  };
15581
15848
  var runAddDialogAgentAction = async (args, thunkApi) => {
15582
- const { addDialogAgentAction } = await import("./addDialogAgentAction-APLZLFW5.js");
15849
+ const { addDialogAgentAction } = await import("./addDialogAgentAction-LVNKMXKZ.js");
15583
15850
  return addDialogAgentAction(args, thunkApi);
15584
15851
  };
15585
15852
  var runRemoveDialogAgentAction = async (args, thunkApi) => {
15586
- const { removeDialogAgentAction } = await import("./removeDialogAgentAction-JQOJSUM7.js");
15853
+ const { removeDialogAgentAction } = await import("./removeDialogAgentAction-FEUUVMYC.js");
15587
15854
  return removeDialogAgentAction(args, thunkApi);
15588
15855
  };
15589
15856
  var runSetPrimaryDialogAgentAction = async (args, thunkApi) => {
15590
- const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-YNLB66WE.js");
15857
+ const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-Z2BQE3IY.js");
15591
15858
  return setPrimaryDialogAgentAction(args, thunkApi);
15592
15859
  };
15593
15860
  var runSwitchDialogAgentAction = async (args, thunkApi) => {
15594
- const { switchDialogAgentAction } = await import("./switchDialogAgentAction-LAHLUECU.js");
15861
+ const { switchDialogAgentAction } = await import("./switchDialogAgentAction-G7XVAOGH.js");
15595
15862
  return switchDialogAgentAction(args, thunkApi);
15596
15863
  };
15597
15864
  var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
15598
- const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-YXQTGXIN.js");
15865
+ const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-JSTQJPXL.js");
15599
15866
  return setDialogExtraReferencesAction(args, thunkApi);
15600
15867
  };
15601
15868
  var runHandleSendMessageAction = async (args, thunkApi) => {
15602
- const { handleSendMessageAction } = await import("./handleSendMessageAction-SSON36TJ.js");
15869
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-6WEFYBUC.js");
15603
15870
  return handleSendMessageAction(args, thunkApi);
15604
15871
  };
15605
15872
  function clearDialogState() {
@@ -15612,7 +15879,7 @@ var createPageAndAddReference = createAsyncThunk(
15612
15879
  async (payload, { dispatch, getState, rejectWithValue }) => {
15613
15880
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
15614
15881
  try {
15615
- const { createDocState } = await import("./docStore-TVS2FNER.js");
15882
+ const { createDocState } = await import("./docStore-A4O6YJAM.js");
15616
15883
  const pageKey = await createDocState(
15617
15884
  { slateData, title },
15618
15885
  { dispatch, getState }
@@ -15777,18 +16044,14 @@ var selectCurrentDialogTokens = createSelector(
15777
16044
  var selectTotalDialogTokens = selectCurrentDialogTokens;
15778
16045
 
15779
16046
  export {
15780
- isAgentRunStatusNormal,
15781
- isAgentRunStartFailureStatus,
15782
- uiAskChoiceFunctionSchema,
15783
- validateAskChoiceInput,
15784
- uiAskChoiceFunc,
15785
- parseUiAskChoiceContent,
15786
16047
  API_REPORTED_COST_MULTIPLIER,
15787
16048
  estimateMessagesTokens,
15788
16049
  historyTokensBeforeLatestAssistant,
15789
16050
  resolveOccupancy,
15790
16051
  resolveOccupancyWindow,
15791
16052
  resolveAgentContextWindow,
16053
+ isAgentRunStatusNormal,
16054
+ isAgentRunStartFailureStatus,
15792
16055
  normalizeRunCompletionShape,
15793
16056
  createTurnRequest,
15794
16057
  runtime_default,
@@ -15804,9 +16067,6 @@ export {
15804
16067
  toast,
15805
16068
  updateDialogSummaryAction,
15806
16069
  buildDatabaseFileContentUrl,
15807
- normalizeAppRouteId,
15808
- PERSONALIZATION_DIALOG_CATEGORY,
15809
- buildPersonalizationDialogPolicyContext,
15810
16070
  resolveDialogRuntimeAgentKey,
15811
16071
  resolveHandleSendMessageContext,
15812
16072
  estimateMissingUsage,