nolo-cli 0.149.0-alpha.1 → 0.151.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/{_executeModel-OW3H7ICR.js → _executeModel-T7ANHTUW.js} +134 -91
  2. package/accountResolver-7RYB4D2P.js +300 -0
  3. package/action-SXJD5N5R.js +23 -0
  4. package/{addContentAction-B2DRF7P6.js → addContentAction-ZV774PHH.js} +20 -14
  5. package/{addDialogAgentAction-2P2FLTLD.js → addDialogAgentAction-A6SMKAGH.js} +26 -22
  6. package/{agentDeleteCommand-7IDWF6E3.js → agentDeleteCommand-4L5KCKFY.js} +181 -93
  7. package/{agentEmailCommands-A6XBQZBN.js → agentEmailCommands-2IMMIRO2.js} +132 -112
  8. package/{agentGrantCommands-M3XFO6EN.js → agentGrantCommands-HOJ3JBBQ.js} +3 -3
  9. package/agentListCommands-TWFLUYIZ.js +802 -0
  10. package/{agentMachineCommands-DQPUIMAC.js → agentMachineCommands-KIWXWT6L.js} +58 -62
  11. package/{agentProviderCommands-YK2BIIXZ.js → agentProviderCommands-HL6MBLCL.js} +149 -2
  12. package/{agentPullCommand-HF4A42D4.js → agentPullCommand-FA43RBRU.js} +7 -7
  13. package/agentRecordCommands-727NPCRW.js +154 -0
  14. package/agentRunCommand-JASIG3FZ.js +183 -0
  15. package/{agentRunControl-2SKCR4SB.js → agentRunControl-IFM7IGMG.js} +10 -2
  16. package/{agentRuntimeLocal-AK2QVJHY.js → agentRuntimeLocal-KKSQJMTE.js} +47 -50
  17. package/{agentSlice-O4RUQUMT.js → agentSlice-SLV57QGU.js} +23 -16
  18. package/{appDeleteCommands-N3XEVVYC.js → appDeleteCommands-4PL4KYRN.js} +58 -59
  19. package/{appDeployCommands-AWFIXYVW.js → appDeployCommands-EEEXCEB6.js} +67 -63
  20. package/{appDeployStatusCommands-CZRON2FO.js → appDeployStatusCommands-35ZX7T66.js} +56 -56
  21. package/{appGetCommands-XQIUY4TD.js → appGetCommands-WFCHXJWF.js} +56 -56
  22. package/{appListCommands-NNG4H36Y.js → appListCommands-XY2U6DPF.js} +57 -59
  23. package/{authCommand-UBJ4EWYZ.js → authCommand-QYN47CQD.js} +371 -68
  24. package/{authCommands-H6WKKCRW.js → authCommands-77CHYBGF.js} +12 -9
  25. package/{builtinSkillRegistry-ZMF6YGNO.js → builtinSkillRegistry-TDQ6JB2E.js} +13 -11
  26. package/{chromeCommands-2N6MEWRU.js → chromeCommands-OBBNJCLS.js} +314 -13
  27. package/chromeOpsCommands-3Z34RKSE.js +472 -0
  28. package/{chunk-ALXHV7NK.js → chunk-2GGXHQIW.js} +43 -4
  29. package/{localRuntimeAuthority-5W6IJRAD.js → chunk-2IXDJNZI.js} +154 -75
  30. package/{chunk-IVZJWTDI.js → chunk-36OMEXXR.js} +89 -21
  31. package/{chunk-H6A6X4EK.js → chunk-3MZAGMYY.js} +16 -0
  32. package/chunk-3PVYUPXK.js +40 -0
  33. package/chunk-3SZA4U64.js +1192 -0
  34. package/{chunk-ID7LNBWR.js → chunk-3T4ZG6AC.js} +1920 -644
  35. package/{chunk-GNMAFAIS.js → chunk-44WXLHFI.js} +1 -1
  36. package/{chunk-AGGIDPCZ.js → chunk-4JH2UMJR.js} +6 -0
  37. package/chunk-4LCOCOR5.js +50 -0
  38. package/chunk-4YRTZIVN.js +871 -0
  39. package/{chunk-N7J63Q6C.js → chunk-56GBUMO5.js} +10 -1
  40. package/{chunk-W7XHHYWM.js → chunk-5BHQICF2.js} +5 -1
  41. package/{chunk-XUWRURDF.js → chunk-5EBLANFT.js} +1 -1
  42. package/{chunk-3AH7LNUB.js → chunk-5EMSBTQ6.js} +33 -14
  43. package/{chunk-YRRASA5Q.js → chunk-5MM7NNO6.js} +113 -52
  44. package/chunk-5MMAK75Q.js +15 -0
  45. package/{chunk-TXH4IWJL.js → chunk-626KHJNX.js} +20 -11
  46. package/{chunk-M5PVFLD4.js → chunk-64K7WX26.js} +90 -21
  47. package/{chunk-AKG5W4LG.js → chunk-6CCFTVBP.js} +76 -221
  48. package/chunk-6MJNEXUU.js +614 -0
  49. package/{chunk-62IL3KQV.js → chunk-6MXDOUMH.js} +15 -3
  50. package/{chunk-QOKAKDPE.js → chunk-6Q7UTJKR.js} +6 -94
  51. package/chunk-6QDYSCPW.js +223 -0
  52. package/{chunk-HYZIYH2H.js → chunk-74RAWNQN.js} +56 -63
  53. package/chunk-7DPNBQSV.js +9 -0
  54. package/{chunk-IAESIMK7.js → chunk-A4MW3YZL.js} +10 -14
  55. package/{chunk-OMRJYNCI.js → chunk-AG7MCDLR.js} +26 -31
  56. package/chunk-AGIM7IMJ.js +147 -0
  57. package/{chunk-7CHC4W22.js → chunk-AIZE5TDM.js} +3 -3
  58. package/chunk-AJ3G7X2K.js +7012 -0
  59. package/{chunk-5GVBDNTO.js → chunk-AU7AXHUL.js} +1 -1
  60. package/{chunk-4H22P2JV.js → chunk-AUIJZACN.js} +2073 -1275
  61. package/{chunk-CIF4X6ZM.js → chunk-AWVFQMOV.js} +25 -3
  62. package/{chunk-YAQJJDC2.js → chunk-BJEZC5RA.js} +214 -51
  63. package/{chunk-RYZINGPM.js → chunk-BPMPOFWP.js} +347 -235
  64. package/{chunk-YUNJN43V.js → chunk-BU2YQBV4.js} +215 -28
  65. package/{chunk-XPRWFQQK.js → chunk-CBHGZRCE.js} +38 -12
  66. package/{chunk-Y3PMXGLH.js → chunk-CHCS6XPJ.js} +365 -144
  67. package/chunk-CHOZJMJS.js +78 -0
  68. package/chunk-CYJWI3NH.js +119 -0
  69. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  70. package/{chunk-3SV7RM24.js → chunk-D2QN6CTI.js} +117 -72
  71. package/{chunk-TZZ2WRBL.js → chunk-DFDXM2Y4.js} +20 -16
  72. package/{chunk-5TEEECZM.js → chunk-E2AKSW7L.js} +10 -7
  73. package/{chunk-RSEEDUMS.js → chunk-EDX5XSJM.js} +2 -2
  74. package/{chunk-QDSINZM3.js → chunk-EUGTFFO6.js} +2 -23
  75. package/{chunk-UNYJU5L6.js → chunk-EYLGAEB4.js} +5 -1
  76. package/{chunk-CU3QB4HW.js → chunk-EYWJT7A2.js} +12 -12
  77. package/{chunk-BNGW5ASC.js → chunk-EZVK3N5L.js} +66 -18
  78. package/{chunk-6FGTMQCL.js → chunk-F32Z66T4.js} +6 -10
  79. package/{chunk-ZOVKKMF6.js → chunk-FY4SDK2E.js} +1 -1
  80. package/chunk-G6OOUQWJ.js +417 -0
  81. package/{chunk-PQWU42UQ.js → chunk-GCKHQECX.js} +6 -6
  82. package/chunk-GKXCHNTE.js +15 -0
  83. package/{chunk-P6GMCCAT.js → chunk-GQV5KHJU.js} +78 -12
  84. package/{chunk-B2XUQXQX.js → chunk-HIQ4GF53.js} +191 -68
  85. package/{chunk-GMZLP5DV.js → chunk-HNUWUO75.js} +30 -19
  86. package/{chunk-UASIEDKM.js → chunk-I2XLRXVX.js} +36 -31
  87. package/{chunk-5UTFL4QJ.js → chunk-I2ZMGXXF.js} +10 -5
  88. package/chunk-I42VC5KR.js +15 -0
  89. package/{chunk-3BXNTXYI.js → chunk-I4SN4NUQ.js} +1199 -56
  90. package/chunk-IA7TRNNR.js +11 -0
  91. package/{chunk-WIWM4FE3.js → chunk-IJERIUXS.js} +55 -748
  92. package/{chunk-BIDGLJQ3.js → chunk-IK2TSJQA.js} +45 -8
  93. package/{chunk-CPUFH46E.js → chunk-ILU2NPWY.js} +10 -10
  94. package/{chunk-SLLGJZDT.js → chunk-ISQL4V7C.js} +4 -4
  95. package/chunk-IT3ZZRJE.js +12 -0
  96. package/{chunk-DY7ANLKG.js → chunk-JKMLSTZK.js} +43 -12
  97. package/{chunk-6TPOEJMQ.js → chunk-JZX2XLKC.js} +64 -23
  98. package/{chunk-27ONFIEY.js → chunk-K2AER7RX.js} +19 -12
  99. package/{chunk-O2OWEFII.js → chunk-KFHQQ3NO.js} +1 -1
  100. package/{chunk-QXGPFY6J.js → chunk-LGN377P3.js} +27 -17
  101. package/{chunk-L36OWPP3.js → chunk-LIQJTQRN.js} +118 -139
  102. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  103. package/{chunk-5J3PYNUP.js → chunk-NYYFIKHI.js} +17 -3
  104. package/{chunk-6O4IK4V2.js → chunk-OFFL4DCR.js} +1 -1
  105. package/{chunk-B6SAMB33.js → chunk-OWYYDMGJ.js} +209 -9
  106. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  107. package/{chunk-CTUQJVQM.js → chunk-P5QACQDK.js} +1 -1
  108. package/{chunk-TB3MIBRC.js → chunk-PIDUNDFS.js} +572 -430
  109. package/{chunk-4JMDLJAD.js → chunk-PJNFNEJE.js} +114 -37
  110. package/chunk-PKZKOVA5.js +11507 -0
  111. package/{chunk-Z4CSIXYP.js → chunk-PLSVXHSA.js} +3 -3
  112. package/chunk-PWTNI4N7.js +47 -0
  113. package/chunk-QFEW2ULV.js +42 -0
  114. package/{chunk-RGNEEJ3Y.js → chunk-QLQ573SU.js} +35 -9
  115. package/chunk-QQ56R7KS.js +88 -0
  116. package/chunk-QYPE3TS3.js +43 -0
  117. package/{chunk-HTVYCXBP.js → chunk-RN2GPWN6.js} +354 -120
  118. package/{chunk-ATLTFRYJ.js → chunk-ROCUB2H2.js} +280 -98
  119. package/{chunk-4DPP773Q.js → chunk-RSHPU4PD.js} +59 -11
  120. package/chunk-RVWMAFIT.js +134 -0
  121. package/{chunk-ESHYE7WU.js → chunk-S73EPYNC.js} +10 -7
  122. package/{chunk-UQNS32WZ.js → chunk-SCMHQUMK.js} +1 -1
  123. package/chunk-SW4S4XYB.js +1794 -0
  124. package/{chunk-ZUEK6A6C.js → chunk-TTH4HOJD.js} +1973 -754
  125. package/chunk-TY3TIUJK.js +89 -0
  126. package/{chunk-X2QRZXZH.js → chunk-TYJ5XFEA.js} +4 -4
  127. package/{chunk-ALFH24P3.js → chunk-TYYRSFBG.js} +197 -155
  128. package/{chunk-MST6R3E4.js → chunk-U5GPBQDG.js} +34 -22
  129. package/chunk-U5ICMAFV.js +14110 -0
  130. package/{chunk-7KVZ5LDQ.js → chunk-UBUH2TCC.js} +18 -4
  131. package/chunk-UEILX4EV.js +15 -0
  132. package/chunk-UHTDNB5Y.js +140 -0
  133. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  134. package/{chunk-OHOVNO7I.js → chunk-UOKFKFPO.js} +6 -3
  135. package/{chunk-XISEYOGH.js → chunk-USHQX6VT.js} +5 -5
  136. package/chunk-UUPR3TD7.js +53 -0
  137. package/{chunk-3DAVPNFT.js → chunk-V4EE3D54.js} +122 -107
  138. package/{chunk-HDLLCBRF.js → chunk-VEA7H5FG.js} +2 -2
  139. package/chunk-VHGD6FHV.js +116 -0
  140. package/chunk-VIWDGTDA.js +8 -0
  141. package/{chunk-GOH6RW6F.js → chunk-VJXHL6MH.js} +34 -11
  142. package/{chunk-4XEYAFLY.js → chunk-VL5KOY2C.js} +623 -94
  143. package/{chunk-EADNWBAZ.js → chunk-VP3BINY7.js} +13 -0
  144. package/{chunk-DXHL7G2L.js → chunk-VWW6O2TL.js} +274 -93
  145. package/{chunk-EOARMOVD.js → chunk-W4S6OTSC.js} +6 -3
  146. package/chunk-WD4XYDYC.js +567 -0
  147. package/chunk-WJZOQR2J.js +151 -0
  148. package/{chunk-AUDNYVRC.js → chunk-XETG4RIX.js} +5 -5
  149. package/{chunk-MX574M24.js → chunk-XI7DGLUK.js} +4 -4
  150. package/{chunk-3L2WKC3W.js → chunk-XPWGOTBQ.js} +8 -1
  151. package/chunk-XRUSXPCQ.js +514 -0
  152. package/{chunk-I4OPU5TK.js → chunk-XS47QOFV.js} +273 -11
  153. package/{chunk-S5XGT6GB.js → chunk-XZNCX52W.js} +30 -9
  154. package/{chunk-5OA5HMTL.js → chunk-YLMMECCH.js} +1 -1
  155. package/{chunk-CFT5HBGW.js → chunk-YVLQXTUB.js} +448 -12
  156. package/chunk-YVPQATSC.js +709 -0
  157. package/chunk-ZEZC7IIM.js +126 -0
  158. package/{chunk-ALGORS6Y.js → chunk-ZF6526IQ.js} +43 -8
  159. package/chunk-ZIWPQEFU.js +165 -0
  160. package/chunk-ZRAU6T47.js +56 -0
  161. package/{cliExecutor-AWYR3T33.js → cliExecutor-BWBF2MTI.js} +4 -3
  162. package/{clipboardy-BX4NMYHE.js → clipboardy-GCO3GT3I.js} +3 -8
  163. package/{commandRegistry-2KBOXZQC.js → commandRegistry-NBLZEMCW.js} +183 -107
  164. package/contentThunks-6AIWNSGO.js +84 -0
  165. package/{cooldownCommands-ZLEPIB4A.js → cooldownCommands-JFKTYS2D.js} +2 -2
  166. package/{createAgentAutomationAction-5UGTB26P.js → createAgentAutomationAction-4BUS65DZ.js} +53 -44
  167. package/createDialogAction-QAIKSCG4.js +76 -0
  168. package/{createPageAction-CDLDKPRM.js → createPageAction-DXCZ334C.js} +65 -54
  169. package/cursorProvider-YGGNMVWX.js +6123 -0
  170. package/{db-VQSAOWAO.js → db-2QOTXYGH.js} +11 -5
  171. package/{dbSlice-DQ32LYTJ.js → dbSlice-J37OGIXH.js} +19 -13
  172. package/{deleteFile-NX6QHCWZ.js → deleteFile-6JWDDRVP.js} +10 -6
  173. package/dialogCommands-YZLSJB6X.js +113 -0
  174. package/{dialogSlice-N3YB65G5.js → dialogSlice-PVUSMKFW.js} +53 -39
  175. package/{docCreateCommands-ZSLGVBZT.js → docCreateCommands-JB2RRMRJ.js} +54 -57
  176. package/{docDeleteCommands-5N4GVZBG.js → docDeleteCommands-AQENULNM.js} +56 -58
  177. package/{docReadCommands-YJSAA7AV.js → docReadCommands-DYD25YLQ.js} +53 -56
  178. package/{docStore-E3CEOV5Q.js → docStore-CSEBEMKP.js} +25 -16
  179. package/{docUpdateCommands-WEMLSW6W.js → docUpdateCommands-3GVS23QL.js} +54 -57
  180. package/{fetchMessages-67MEFPZR.js → fetchMessages-IIJWQ3HR.js} +5 -4
  181. package/{getPricing-NMMFT3YI.js → getPricing-FKK3F5EJ.js} +11 -9
  182. package/{handleSendMessageAction-DQAD5ERJ.js → handleSendMessageAction-G2TLYGC4.js} +422 -118
  183. package/index.js +11 -7
  184. package/{lib-FRRS27KN.js → lib-4YTWAGY7.js} +581 -248
  185. package/{localDialogRead-EBRS242U.js → localDialogRead-FSOMOPDZ.js} +2 -2
  186. package/localRuntimeAdapter-B4TAYYA7.js +244 -0
  187. package/localRuntimeAuthority-JDAD7CB6.js +16 -0
  188. package/{localRuntimeDb-3LRMNLCM.js → localRuntimeDb-CVC62PM5.js} +1 -1
  189. package/{machineCommands-HAP75VSG.js → machineCommands-6OBFD3XF.js} +503 -161
  190. package/{machineInfo-66ZFUMLE.js → machineInfo-UKPTZO5Y.js} +2 -2
  191. package/machineWsRunDispatch-OO7N3O3Y.js +169 -0
  192. package/{memberThunks-5ZXPR63F.js → memberThunks-66DH6ABQ.js} +25 -18
  193. package/{models-ZPU5EDF4.js → models-LAS4B2B5.js} +2 -2
  194. package/package.json +1 -1
  195. package/{providerPresetApply-DD6NGWW6.js → providerPresetApply-MY66I6NT.js} +10 -10
  196. package/{providerRegistry-XDRLMYGJ.js → providerRegistry-QOE2FT57.js} +13 -9
  197. package/{read-EPTJRAEF.js → read-DC4NUGN6.js} +12 -8
  198. package/{readDocTool-W4NDXNEX.js → readDocTool-NCJ5NT25.js} +1 -1
  199. package/{readlineWorkspace-7BC66QSX.js → readlineWorkspace-UIQN7JUR.js} +5017 -915
  200. package/{removeDialogAgentAction-OSYNZRX7.js → removeDialogAgentAction-E2H3OZU6.js} +29 -28
  201. package/{runAgentClientLoop-6E6UC3CE.js → runAgentClientLoop-GS3SGG37.js} +154 -97
  202. package/{runtimeDoctorCommands-ID23PNNZ.js → runtimeDoctorCommands-GIOGC5SC.js} +17 -17
  203. package/secretCommands-ZXZRLR3R.js +700 -0
  204. package/setDialogExtraReferencesAction-SITRPMYU.js +37 -0
  205. package/{setPrimaryDialogAgentAction-WZ7KI3YA.js → setPrimaryDialogAgentAction-U7N45TGC.js} +30 -29
  206. package/{chunk-SONWNI3L.js → settingThunks-Y7SVJOMZ.js} +223 -928
  207. package/{skillDiscovery-ZBU76COE.js → skillDiscovery-QC35EQY4.js} +2 -2
  208. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  209. package/{spaceCommands-UJOVU4XI.js → spaceCommands-ZR5BR3GX.js} +59 -59
  210. package/{streamAgentChatTurn-3UXPYFNX.js → streamAgentChatTurn-4XYC33KE.js} +309 -165
  211. package/{switchDialogAgentAction-GMR7WN3P.js → switchDialogAgentAction-OMGBD3N2.js} +26 -22
  212. package/{tableCommands-G7RV3RU3.js → tableCommands-U3QDY4L6.js} +19 -17
  213. package/{toolApiClient-CVGWM4PN.js → toolApiClient-7WSJJJBV.js} +6 -5
  214. package/tools-P77EE7Q4.js +124 -0
  215. package/tuiSummaryLlmCaller-BM3VSTBU.js +130 -0
  216. package/{updateCommands-4EHDLF5J.js → updateCommands-NQXAGFM7.js} +3 -3
  217. package/{updateDialogTitleAction-UPFV7TDT.js → updateDialogTitleAction-CIANVPZC.js} +102 -57
  218. package/workloadLifecycle-36DXRZKU.js +320 -0
  219. package/action-GI44T4DR.js +0 -31
  220. package/agentListCommands-IW3GQVUP.js +0 -427
  221. package/agentRecordCommands-VCA76W6B.js +0 -134
  222. package/agentRunCommand-YNLDKVR7.js +0 -161
  223. package/browser-image-compression-MFDTD7K6.js +0 -1763
  224. package/chatQueueReduxAdapter-TJRMXMYA.js +0 -186
  225. package/chromeOpsCommands-IXRLN57H.js +0 -289
  226. package/chunk-36KZDDO5.js +0 -2415
  227. package/chunk-ACQD6YI2.js +0 -25363
  228. package/chunk-CQ3WA2NE.js +0 -299
  229. package/chunk-CYSYR67N.js +0 -93
  230. package/chunk-JBTJAPUF.js +0 -35
  231. package/chunk-K2CSUCHJ.js +0 -620
  232. package/chunk-LTRXGFMS.js +0 -83
  233. package/chunk-M76ECQRD.js +0 -13658
  234. package/chunk-MEYIRKDN.js +0 -8967
  235. package/chunk-OCZKATRC.js +0 -129
  236. package/chunk-OTGFTBLI.js +0 -13
  237. package/chunk-PUOC4YRO.js +0 -394
  238. package/chunk-PZZTFEKK.js +0 -34
  239. package/chunk-URMS4XY2.js +0 -10
  240. package/chunk-UV6VISQJ.js +0 -20
  241. package/chunk-VJVNU77E.js +0 -83
  242. package/chunk-XYJSY4KG.js +0 -13807
  243. package/chunk-Y5GCAMGP.js +0 -9
  244. package/chunk-YPREESF4.js +0 -225
  245. package/contentThunks-BDIQRZR6.js +0 -73
  246. package/createDialogAction-B7VGVEVU.js +0 -66
  247. package/dialogCommands-G7YBVAMC.js +0 -102
  248. package/levelLazyShim-GZBKODGI.js +0 -7
  249. package/machineWsRunDispatch-L32G7C4P.js +0 -149
  250. package/serverStoreFactory-YMXDF4NI.js +0 -20
  251. package/setDialogExtraReferencesAction-M32UYNCG.js +0 -30
  252. package/settingSlice-Q6EKL7EQ.js +0 -204
  253. package/syncMapping-N6RGXGBW.js +0 -437
  254. package/tools-MKYDMWA4.js +0 -111
  255. package/tuiSummaryLlmCaller-3YFNHCTW.js +0 -128
  256. package/{chunk-SV5IJK6K.js → chunk-NBTY7YJF.js} +3 -3
  257. package/{chunk-2SYTUTLI.js → chunk-YBNHPX4S.js} +3 -3
  258. package/{offlineMarxistsAgentCommand-HGXZV4XJ.js → offlineMarxistsAgentCommand-2QTHJCHV.js} +4 -4
@@ -203,6 +203,13 @@ function accumulateToolCallDelta(accumulator, deltas) {
203
203
  const deltaId = typeof delta.id === "string" && delta.id ? delta.id : "";
204
204
  const wireIndex = typeof delta.index === "number" ? delta.index : void 0;
205
205
  const current = accumulator.slots[resolveSlot(accumulator, deltaId, wireIndex)];
206
+ if (typeof delta.thought_signature === "string") {
207
+ current.thought_signature = delta.thought_signature;
208
+ }
209
+ const signature = delta.extra_content?.google?.thought_signature;
210
+ if (typeof signature === "string") {
211
+ current.extra_content = { google: { thought_signature: signature } };
212
+ }
206
213
  const fn = delta.function;
207
214
  if (fn && typeof fn === "object") {
208
215
  const functionDelta = fn;
@@ -220,7 +227,9 @@ function accumulateToolCallDelta(accumulator, deltas) {
220
227
  }
221
228
  }
222
229
  function finalizeAccumulatedToolCalls(accumulator) {
223
- return accumulator.slots.filter((slot) => slot.function.name).map(({ id, type, function: fn }) => ({
230
+ return accumulator.slots.filter((slot) => slot.function.name).map(({ id, type, function: fn, thought_signature, extra_content }) => ({
231
+ ...thought_signature !== void 0 ? { thought_signature } : {},
232
+ ...extra_content ? { extra_content } : {},
224
233
  id,
225
234
  type,
226
235
  function: {
@@ -10,6 +10,9 @@ var CLI_PROVIDER_VALUES = [
10
10
  "grok",
11
11
  "kimi"
12
12
  ];
13
+ function isCliProvider(value) {
14
+ return typeof value === "string" && CLI_PROVIDER_VALUES.includes(value);
15
+ }
13
16
  var CLI_PROVIDER_DISPLAY_LABELS = {
14
17
  copilot: "GitHub Copilot CLI\uFF08gh copilot\uFF09",
15
18
  gemini: "Gemini CLI\uFF08gemini\uFF09",
@@ -27,5 +30,6 @@ var CLI_PROVIDER_OPTIONS = CLI_PROVIDER_VALUES.map((value) => ({
27
30
  }));
28
31
 
29
32
  export {
30
- CLI_PROVIDER_VALUES
33
+ CLI_PROVIDER_VALUES,
34
+ isCliProvider
31
35
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CHROME_CONNECTOR_LEGACY_TOOL_ALIASES
3
- } from "./chunk-5J3PYNUP.js";
3
+ } from "./chunk-NYYFIKHI.js";
4
4
 
5
5
  // packages/agent-runtime/toolNameAliases.ts
6
6
  var LEGACY_TOOL_NAME_ALIASES = {
@@ -1,3 +1,6 @@
1
+ import {
2
+ asNonEmptyStringArray
3
+ } from "./chunk-I42VC5KR.js";
1
4
  import {
2
5
  asOptionalFiniteNumber
3
6
  } from "./chunk-WWC7I6TA.js";
@@ -2395,17 +2398,6 @@ function toTrimmedString(value) {
2395
2398
  return typeof value === "string" ? value.trim() : value == null ? "" : String(value).trim();
2396
2399
  }
2397
2400
 
2398
- // packages/core/stringArray.ts
2399
- function asNonEmptyStringArray(value) {
2400
- if (!Array.isArray(value)) return [];
2401
- return value.filter(
2402
- (item) => typeof item === "string" && !!item.trim()
2403
- );
2404
- }
2405
- function asTrimmedNonEmptyStringArray(value) {
2406
- return asNonEmptyStringArray(value).map((item) => item.trim());
2407
- }
2408
-
2409
2401
  // packages/database/utils/ulid.ts
2410
2402
  import { monotonicFactory } from "ulid";
2411
2403
  var prng = () => Math.random();
@@ -2617,6 +2609,7 @@ var createDialogMessageKeyAndId = (dialogId, ulidFn = ulid) => {
2617
2609
  const messageId = ulidFn();
2618
2610
  return { key: dialogMessageKey(dialogId, messageId), messageId };
2619
2611
  };
2612
+ var dialogMessagePrefix = (dialogId) => createKey2("dialog" /* DIALOG */, dialogId, "msg");
2620
2613
  var dialogMessageRange = (dialogId) => ({
2621
2614
  start: createKey2("dialog" /* DIALOG */, dialogId, "msg", ""),
2622
2615
  end: createKey2("dialog" /* DIALOG */, dialogId, "msg", "\uFFFF")
@@ -2717,8 +2710,9 @@ var metaKey = Object.assign(
2717
2710
  var DB_PREFIX = {
2718
2711
  USER: "user:"
2719
2712
  };
2713
+ var USER_SETTINGS_KEY_SUFFIX = `${SEPARATOR2}settings`;
2720
2714
  var createUserKey = {
2721
- settings: (userId) => createKey(userId, "settings"),
2715
+ settings: (userId) => `${userId}${USER_SETTINGS_KEY_SUFFIX}`,
2722
2716
  profile: (userId) => createKey(userId, "profile")
2723
2717
  };
2724
2718
  var createUserPreferenceKey = {
@@ -2763,6 +2757,22 @@ var createTokenKey = {
2763
2757
  record: (0, import_rambda.curry)(
2764
2758
  (userId, timestamp) => createKey("token", userId, timestamp.toString())
2765
2759
  ),
2760
+ /**
2761
+ * 单次计费记录:`token/<user>/<timestamp>/<chargeId>`。
2762
+ *
2763
+ * 与 `record` 的唯一区别是把「本次计费自己的唯一 id」作为额外一段拼在末尾
2764
+ * —— 同一用户同一毫秒内的两笔合法计费因此各占一个 key,不再互相覆盖,
2765
+ * 也不会共用同一个账本 txId / 幂等键(`token-<tokenKey>` / `token:<tokenKey>`)
2766
+ * 而被账本判为 duplicate 静默漏扣。
2767
+ *
2768
+ * 兼容性:timestamp 仍是第二段且保持首位排序,因此
2769
+ * - `rangeOfUser(userId)`(usage/统计等读取路径用的全前缀范围)照常覆盖;
2770
+ * - `range(userId, ts)` 的 `token/<user>/<ts>` … `token/<user>/<ts+1d>`
2771
+ * 区间同样覆盖新 key(`<ts>-xxx` > `<ts>` 且 < `<ts+1>`),历史数据
2772
+ * 与新数据可以在同一区间里混扫。
2773
+ * 幂等键的稳定性由调用方决定:需要「重试同一笔」时传稳定的 chargeId。
2774
+ */
2775
+ recordForCharge: (userId, timestamp, chargeId) => createKey("token", userId, timestamp.toString(), encodeURIComponent(chargeId)),
2766
2776
  /** Server provider-call record: retry-stable even when the retry clock changes. */
2767
2777
  recordForStableCall: (userId, callId) => createKey("token", userId, "call", encodeURIComponent(callId)),
2768
2778
  /** Server provider-call failure audit record: preserved separately from retry success in a collision-free namespace. */
@@ -2787,6 +2797,16 @@ var createTokenStatsKey = Object.assign(
2787
2797
  })
2788
2798
  }
2789
2799
  );
2800
+ var createTokenStatsAppliedKey = Object.assign(
2801
+ (userId, chargeKey) => createKey("token", "charge-stats", userId, encodeURIComponent(chargeKey)),
2802
+ {
2803
+ /** 某个用户的全部计费幂等标记范围:token-charge-stats-<userId>-* */
2804
+ rangeOfUser: (userId) => ({
2805
+ start: createKey("token", "charge-stats", userId, ""),
2806
+ end: createKey("token", "charge-stats", userId, "\uFFFF")
2807
+ })
2808
+ }
2809
+ );
2790
2810
  var DIALOG_AGENT_LIST_INDEX_PREFIX = "dialogidx";
2791
2811
  var DIALOG_LIST_TIMESTAMP_MAX = 9999999999999;
2792
2812
  function parseDialogUpdatedAtMs(value) {
@@ -3179,8 +3199,6 @@ var sanitizeShareData = (data) => {
3179
3199
  export {
3180
3200
  ulid,
3181
3201
  toTrimmedString,
3182
- asNonEmptyStringArray,
3183
- asTrimmedNonEmptyStringArray,
3184
3202
  toNonEmptyString,
3185
3203
  extractAgentInfo,
3186
3204
  extractCoverImage,
@@ -3192,6 +3210,7 @@ export {
3192
3210
  createDialogKey,
3193
3211
  dialogMessageKey,
3194
3212
  createDialogMessageKeyAndId,
3213
+ dialogMessagePrefix,
3195
3214
  dialogMessageRange,
3196
3215
  SEPARATOR2 as SEPARATOR,
3197
3216
  createKey,
@@ -1,3 +1,6 @@
1
+ import {
2
+ escapeStringRegexp
3
+ } from "./chunk-IA7TRNNR.js";
1
4
  import {
2
5
  asTrimmedString
3
6
  } from "./chunk-3EUW3WEO.js";
@@ -6360,6 +6363,8 @@ function fromMarkdown(value, encoding, options) {
6360
6363
  }
6361
6364
  function compiler(options) {
6362
6365
  const config = {
6366
+ afterExit: [],
6367
+ beforeEnter: [],
6363
6368
  transforms: [],
6364
6369
  canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
6365
6370
  enter: {
@@ -6463,7 +6468,8 @@ function compiler(options) {
6463
6468
  function compile(events) {
6464
6469
  let tree = {
6465
6470
  type: "root",
6466
- children: []
6471
+ children: [],
6472
+ position: void 0
6467
6473
  };
6468
6474
  const context = {
6469
6475
  stack: [tree],
@@ -6476,24 +6482,40 @@ function compiler(options) {
6476
6482
  data
6477
6483
  };
6478
6484
  const listStack = [];
6485
+ const prepared = [];
6479
6486
  let index2 = -1;
6480
6487
  while (++index2 < events.length) {
6488
+ prepared.push(events[index2]);
6481
6489
  if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") {
6482
6490
  if (events[index2][0] === "enter") {
6483
- listStack.push(index2);
6491
+ listStack.push(prepared.length - 1);
6484
6492
  } else {
6485
6493
  const tail = listStack.pop();
6486
- index2 = prepareList(events, tail, index2);
6494
+ prepareList(prepared, tail);
6487
6495
  }
6488
6496
  }
6489
6497
  }
6498
+ events = prepared;
6490
6499
  index2 = -1;
6491
6500
  while (++index2 < events.length) {
6492
6501
  const handler = config[events[index2][0]];
6502
+ if (events[index2][0] === "enter" && config.beforeEnter.length > 0) {
6503
+ callListeners(config.beforeEnter, {
6504
+ ...context,
6505
+ sliceSerialize: events[index2][2].sliceSerialize
6506
+ }, events[index2][1]);
6507
+ }
6493
6508
  if (own2.call(handler, events[index2][1].type)) {
6494
- handler[events[index2][1].type].call(Object.assign({
6509
+ handler[events[index2][1].type].call({
6510
+ ...context,
6511
+ sliceSerialize: events[index2][2].sliceSerialize
6512
+ }, events[index2][1]);
6513
+ }
6514
+ if (events[index2][0] === "exit" && config.afterExit.length > 0) {
6515
+ callListeners(config.afterExit, {
6516
+ ...context,
6495
6517
  sliceSerialize: events[index2][2].sliceSerialize
6496
- }, context), events[index2][1]);
6518
+ }, events[index2][1]);
6497
6519
  }
6498
6520
  }
6499
6521
  if (context.tokenStack.length > 0) {
@@ -6519,7 +6541,14 @@ function compiler(options) {
6519
6541
  }
6520
6542
  return tree;
6521
6543
  }
6522
- function prepareList(events, start, length) {
6544
+ function callListeners(listeners, context, token) {
6545
+ let index2 = -1;
6546
+ while (++index2 < listeners.length) {
6547
+ listeners[index2].call(context, token);
6548
+ }
6549
+ }
6550
+ function prepareList(events, start) {
6551
+ const end = events.length - 1;
6523
6552
  let index2 = start - 1;
6524
6553
  let containerBalance = -1;
6525
6554
  let listSpread = false;
@@ -6527,7 +6556,8 @@ function compiler(options) {
6527
6556
  let lineIndex;
6528
6557
  let firstBlankLineIndex;
6529
6558
  let atMarker;
6530
- while (++index2 <= length) {
6559
+ const insertions = [];
6560
+ while (++index2 <= end) {
6531
6561
  const event = events[index2];
6532
6562
  switch (event[1].type) {
6533
6563
  case "listUnordered":
@@ -6584,9 +6614,10 @@ function compiler(options) {
6584
6614
  listItem2._spread = true;
6585
6615
  }
6586
6616
  listItem2.end = Object.assign({}, lineIndex ? events[lineIndex][1].start : event[1].end);
6587
- events.splice(lineIndex || index2, 0, ["exit", listItem2, event[2]]);
6588
- index2++;
6589
- length++;
6617
+ insertions.push({
6618
+ at: lineIndex || index2,
6619
+ event: ["exit", listItem2, event[2]]
6620
+ });
6590
6621
  }
6591
6622
  if (event[1].type === "listItemPrefix") {
6592
6623
  const item = {
@@ -6597,16 +6628,25 @@ function compiler(options) {
6597
6628
  end: void 0
6598
6629
  };
6599
6630
  listItem2 = item;
6600
- events.splice(index2, 0, ["enter", item, event[2]]);
6601
- index2++;
6602
- length++;
6631
+ insertions.push({
6632
+ at: index2,
6633
+ event: ["enter", item, event[2]]
6634
+ });
6603
6635
  firstBlankLineIndex = void 0;
6604
6636
  atMarker = true;
6605
6637
  }
6606
6638
  }
6607
6639
  }
6640
+ const listEvents = events.splice(start);
6641
+ let insertion = 0;
6642
+ index2 = -1;
6643
+ while (++index2 < listEvents.length) {
6644
+ while (insertion < insertions.length && insertions[insertion].at === start + index2) {
6645
+ events.push(insertions[insertion++].event);
6646
+ }
6647
+ events.push(listEvents[index2]);
6648
+ }
6608
6649
  events[start][1]._spread = listSpread;
6609
- return length;
6610
6650
  }
6611
6651
  function opener(create, and) {
6612
6652
  return open;
@@ -6648,7 +6688,8 @@ function compiler(options) {
6648
6688
  start: token.start,
6649
6689
  end: token.end
6650
6690
  }) + "): it\u2019s not open");
6651
- } else if (open[0].type !== token.type) {
6691
+ }
6692
+ if (open[0].type !== token.type) {
6652
6693
  if (onExitError) {
6653
6694
  onExitError.call(this, token, open[0]);
6654
6695
  } else {
@@ -6884,7 +6925,8 @@ function compiler(options) {
6884
6925
  function blockQuote2() {
6885
6926
  return {
6886
6927
  type: "blockquote",
6887
- children: []
6928
+ children: [],
6929
+ position: void 0
6888
6930
  };
6889
6931
  }
6890
6932
  function codeFlow() {
@@ -6892,13 +6934,15 @@ function compiler(options) {
6892
6934
  type: "code",
6893
6935
  lang: null,
6894
6936
  meta: null,
6895
- value: ""
6937
+ value: "",
6938
+ position: void 0
6896
6939
  };
6897
6940
  }
6898
6941
  function codeText2() {
6899
6942
  return {
6900
6943
  type: "inlineCode",
6901
- value: ""
6944
+ value: "",
6945
+ position: void 0
6902
6946
  };
6903
6947
  }
6904
6948
  function definition2() {
@@ -6907,13 +6951,15 @@ function compiler(options) {
6907
6951
  identifier: "",
6908
6952
  label: null,
6909
6953
  title: null,
6910
- url: ""
6954
+ url: "",
6955
+ position: void 0
6911
6956
  };
6912
6957
  }
6913
6958
  function emphasis() {
6914
6959
  return {
6915
6960
  type: "emphasis",
6916
- children: []
6961
+ children: [],
6962
+ position: void 0
6917
6963
  };
6918
6964
  }
6919
6965
  function heading() {
@@ -6921,18 +6967,21 @@ function compiler(options) {
6921
6967
  type: "heading",
6922
6968
  // @ts-expect-error `depth` will be set later.
6923
6969
  depth: 0,
6924
- children: []
6970
+ children: [],
6971
+ position: void 0
6925
6972
  };
6926
6973
  }
6927
6974
  function hardBreak() {
6928
6975
  return {
6929
- type: "break"
6976
+ type: "break",
6977
+ position: void 0
6930
6978
  };
6931
6979
  }
6932
6980
  function html() {
6933
6981
  return {
6934
6982
  type: "html",
6935
- value: ""
6983
+ value: "",
6984
+ position: void 0
6936
6985
  };
6937
6986
  }
6938
6987
  function image() {
@@ -6940,7 +6989,8 @@ function compiler(options) {
6940
6989
  type: "image",
6941
6990
  title: null,
6942
6991
  url: "",
6943
- alt: null
6992
+ alt: null,
6993
+ position: void 0
6944
6994
  };
6945
6995
  }
6946
6996
  function link() {
@@ -6948,7 +6998,8 @@ function compiler(options) {
6948
6998
  type: "link",
6949
6999
  title: null,
6950
7000
  url: "",
6951
- children: []
7001
+ children: [],
7002
+ position: void 0
6952
7003
  };
6953
7004
  }
6954
7005
  function list2(token) {
@@ -6957,7 +7008,8 @@ function compiler(options) {
6957
7008
  ordered: token.type === "listOrdered",
6958
7009
  start: null,
6959
7010
  spread: token._spread,
6960
- children: []
7011
+ children: [],
7012
+ position: void 0
6961
7013
  };
6962
7014
  }
6963
7015
  function listItem(token) {
@@ -6965,30 +7017,35 @@ function compiler(options) {
6965
7017
  type: "listItem",
6966
7018
  spread: token._spread,
6967
7019
  checked: null,
6968
- children: []
7020
+ children: [],
7021
+ position: void 0
6969
7022
  };
6970
7023
  }
6971
7024
  function paragraph() {
6972
7025
  return {
6973
7026
  type: "paragraph",
6974
- children: []
7027
+ children: [],
7028
+ position: void 0
6975
7029
  };
6976
7030
  }
6977
7031
  function strong() {
6978
7032
  return {
6979
7033
  type: "strong",
6980
- children: []
7034
+ children: [],
7035
+ position: void 0
6981
7036
  };
6982
7037
  }
6983
7038
  function text4() {
6984
7039
  return {
6985
7040
  type: "text",
6986
- value: ""
7041
+ value: "",
7042
+ position: void 0
6987
7043
  };
6988
7044
  }
6989
7045
  function thematicBreak2() {
6990
7046
  return {
6991
- type: "thematicBreak"
7047
+ type: "thematicBreak",
7048
+ position: void 0
6992
7049
  };
6993
7050
  }
6994
7051
  }
@@ -7029,6 +7086,14 @@ function extension(combined, extension2) {
7029
7086
  }
7030
7087
  break;
7031
7088
  }
7089
+ case "afterExit":
7090
+ case "beforeEnter": {
7091
+ const right = extension2[key];
7092
+ if (right) {
7093
+ combined[key].push(right);
7094
+ }
7095
+ break;
7096
+ }
7032
7097
  case "enter":
7033
7098
  case "exit": {
7034
7099
  const right = extension2[key];
@@ -7050,12 +7115,11 @@ function defaultOnError(left, right) {
7050
7115
  start: right.start,
7051
7116
  end: right.end
7052
7117
  }) + ") is open");
7053
- } else {
7054
- throw new Error("Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
7055
- start: right.start,
7056
- end: right.end
7057
- }) + ") is still open");
7058
7118
  }
7119
+ throw new Error("Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
7120
+ start: right.start,
7121
+ end: right.end
7122
+ }) + ") is still open");
7059
7123
  }
7060
7124
 
7061
7125
  // node_modules/ccount/index.js
@@ -7077,14 +7141,6 @@ function ccount(value, character) {
7077
7141
  function ok() {
7078
7142
  }
7079
7143
 
7080
- // node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js
7081
- function escapeStringRegexp(string3) {
7082
- if (typeof string3 !== "string") {
7083
- throw new TypeError("Expected a string");
7084
- }
7085
- return string3.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
7086
- }
7087
-
7088
7144
  // node_modules/unist-util-is/lib/index.js
7089
7145
  var convert = (
7090
7146
  // Note: overloads in JSDoc can’t yet use different `@template`s.
@@ -7320,15 +7376,12 @@ function findAndReplace(tree, list2, options) {
7320
7376
  find.lastIndex = position2 + 1;
7321
7377
  } else {
7322
7378
  if (start !== position2) {
7323
- nodes.push({
7324
- type: "text",
7325
- value: node2.value.slice(start, position2)
7326
- });
7379
+ add({ type: "text", value: node2.value.slice(start, position2) });
7327
7380
  }
7328
7381
  if (Array.isArray(value)) {
7329
- nodes.push(...value);
7382
+ for (const child of value) add(child);
7330
7383
  } else if (value) {
7331
- nodes.push(value);
7384
+ add(value);
7332
7385
  }
7333
7386
  start = position2 + match[0].length;
7334
7387
  change = true;
@@ -7340,20 +7393,28 @@ function findAndReplace(tree, list2, options) {
7340
7393
  }
7341
7394
  if (change) {
7342
7395
  if (start < node2.value.length) {
7343
- nodes.push({ type: "text", value: node2.value.slice(start) });
7396
+ add({ type: "text", value: node2.value.slice(start) });
7344
7397
  }
7345
7398
  parent.children.splice(index2, 1, ...nodes);
7346
7399
  } else {
7347
7400
  nodes = [node2];
7348
7401
  }
7349
7402
  return index2 + nodes.length;
7403
+ function add(child) {
7404
+ const previous3 = nodes[nodes.length - 1];
7405
+ if (previous3 && previous3.type === "text" && child.type === "text") {
7406
+ previous3.value += child.value;
7407
+ } else {
7408
+ nodes.push(child);
7409
+ }
7410
+ }
7350
7411
  }
7351
7412
  }
7352
7413
  function toPairs(tupleOrList) {
7353
- const result = [];
7354
7414
  if (!Array.isArray(tupleOrList)) {
7355
7415
  throw new TypeError("Expected find and replace tuple or list of tuples");
7356
7416
  }
7417
+ const result = [];
7357
7418
  const list2 = !tupleOrList[0] || Array.isArray(tupleOrList[0]) ? tupleOrList : [tupleOrList];
7358
7419
  let index2 = -1;
7359
7420
  while (++index2 < list2.length) {
@@ -0,0 +1,15 @@
1
+ import {
2
+ compactWhitespace
3
+ } from "./chunk-DWLEOOGR.js";
4
+
5
+ // packages/core/clipCompactText.ts
6
+ function clipCompactText(value, max, ellipsis = "...") {
7
+ const compact = compactWhitespace(value);
8
+ if (compact.length <= max) return compact;
9
+ if (max <= ellipsis.length) return compact.slice(0, max);
10
+ return `${compact.slice(0, max - ellipsis.length)}${ellipsis}`;
11
+ }
12
+
13
+ export {
14
+ clipCompactText
15
+ };
@@ -1,16 +1,16 @@
1
1
  import {
2
- require_date_fns
3
- } from "./chunk-M76ECQRD.js";
2
+ formatISO
3
+ } from "./chunk-ZRAU6T47.js";
4
4
  import {
5
5
  require_react
6
6
  } from "./chunk-YDH3FDFQ.js";
7
- import {
8
- toErrorMessage
9
- } from "./chunk-HNMXYYJR.js";
10
7
  import {
11
8
  patch,
12
9
  readAndWait
13
- } from "./chunk-HYZIYH2H.js";
10
+ } from "./chunk-74RAWNQN.js";
11
+ import {
12
+ toErrorMessage
13
+ } from "./chunk-HNMXYYJR.js";
14
14
  import {
15
15
  asOptionalTrimmedString
16
16
  } from "./chunk-G3SUCT4W.js";
@@ -20,7 +20,6 @@ import {
20
20
 
21
21
  // packages/render/page/docStore.ts
22
22
  var import_react = __toESM(require_react(), 1);
23
- var import_date_fns = __toESM(require_date_fns(), 1);
24
23
  var createInitialState = () => ({
25
24
  content: null,
26
25
  slateData: null,
@@ -52,6 +51,7 @@ var createInitialState = () => ({
52
51
  var listeners = /* @__PURE__ */ new Set();
53
52
  var version = 0;
54
53
  var state = createInitialState();
54
+ var latestInitRequestKey = null;
55
55
  var notify = () => {
56
56
  for (const listener of listeners) {
57
57
  try {
@@ -102,6 +102,9 @@ function getDocField(selector) {
102
102
  function getDocPageKey() {
103
103
  return state.pageKey;
104
104
  }
105
+ function isDocStateForPage(state2, pageKey) {
106
+ return Boolean(pageKey) && state2.pageKey === pageKey;
107
+ }
105
108
  function getDocIsInitialized() {
106
109
  return state.isInitialized;
107
110
  }
@@ -143,6 +146,7 @@ function updateDocTags(tags) {
143
146
  setState((prev) => ({ ...prev, tags }));
144
147
  }
145
148
  function resetDocState() {
149
+ latestInitRequestKey = null;
146
150
  setState(createInitialState());
147
151
  }
148
152
  function previewDocState(payload) {
@@ -190,6 +194,7 @@ function applyExternalDocUpdate(payload) {
190
194
  }
191
195
  async function initDocState(args, { dispatch }) {
192
196
  const { pageKey, isReadOnly } = args;
197
+ latestInitRequestKey = pageKey;
193
198
  setState((prev) => ({
194
199
  ...createInitialState(),
195
200
  isLoading: true,
@@ -198,6 +203,7 @@ async function initDocState(args, { dispatch }) {
198
203
  }));
199
204
  try {
200
205
  const readAction = await dispatch(readAndWait(pageKey));
206
+ if (latestInitRequestKey !== pageKey) return;
201
207
  if (readAndWait.fulfilled.match(readAction) && readAction.payload) {
202
208
  const data = readAction.payload;
203
209
  if (data.type !== "page" /* DOC */) {
@@ -247,6 +253,7 @@ async function initDocState(args, { dispatch }) {
247
253
  }));
248
254
  }
249
255
  } catch (e) {
256
+ if (latestInitRequestKey !== pageKey) return;
250
257
  setState((prev) => ({
251
258
  ...prev,
252
259
  isLoading: false,
@@ -300,7 +307,7 @@ async function saveDocState(arg, { dispatch, getState }) {
300
307
  { slateToRenderMarkdown },
301
308
  { buildSkillSummaryMarker }
302
309
  ] = await Promise.all([
303
- import("./slateUtils-RIZES3PV.js"),
310
+ import("./slateUtils-NGV2NMKM.js"),
304
311
  import("./slateToRenderMarkdown-Y5IYN73U.js"),
305
312
  import("./skillSummaryMarker-42HKSXYY.js")
306
313
  ]);
@@ -309,7 +316,7 @@ async function saveDocState(arg, { dispatch, getState }) {
309
316
  const skillSummary = buildSkillSummaryMarker(meta);
310
317
  const content = slateToRenderMarkdown(slateData);
311
318
  const now = /* @__PURE__ */ new Date();
312
- const updatedAt = (0, import_date_fns.formatISO)(now);
319
+ const updatedAt = formatISO(now);
313
320
  await dispatch(
314
321
  patch({
315
322
  dbKey: pageKey,
@@ -326,7 +333,7 @@ async function saveDocState(arg, { dispatch, getState }) {
326
333
  ).unwrap();
327
334
  if (dbSpaceId) {
328
335
  try {
329
- const { updateContentTitle } = await import("./contentThunks-BDIQRZR6.js");
336
+ const { updateContentTitle } = await import("./contentThunks-6AIWNSGO.js");
330
337
  await dispatch(
331
338
  updateContentTitle({
332
339
  spaceId: dbSpaceId,
@@ -365,7 +372,7 @@ async function saveDocState(arg, { dispatch, getState }) {
365
372
  }
366
373
  }
367
374
  async function createDocState(args, thunkApi) {
368
- const { createPageAction } = await import("./createPageAction-CDLDKPRM.js");
375
+ const { createPageAction } = await import("./createPageAction-DXCZ334C.js");
369
376
  return createPageAction(args, thunkApi);
370
377
  }
371
378
  function subscribe(listener) {
@@ -387,6 +394,7 @@ function useDocField(selector) {
387
394
  }
388
395
  function resetDocStoreForTests() {
389
396
  state = createInitialState();
397
+ latestInitRequestKey = null;
390
398
  bump();
391
399
  }
392
400
 
@@ -394,6 +402,7 @@ export {
394
402
  getDocState,
395
403
  getDocField,
396
404
  getDocPageKey,
405
+ isDocStateForPage,
397
406
  getDocIsInitialized,
398
407
  getDocIsReadOnly,
399
408
  getDocHasPendingChanges,