nolo-cli 0.148.0-alpha.1 → 0.151.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/{_executeModel-NFJAMAGJ.js → _executeModel-XHAFJ2MM.js} +134 -91
  2. package/accountResolver-7RYB4D2P.js +300 -0
  3. package/action-SXJD5N5R.js +23 -0
  4. package/{addContentAction-B2DRF7P6.js → addContentAction-ZV774PHH.js} +20 -14
  5. package/{addDialogAgentAction-2P2FLTLD.js → addDialogAgentAction-A6SMKAGH.js} +26 -22
  6. package/{agentDeleteCommand-7IDWF6E3.js → agentDeleteCommand-DPUUS56Z.js} +181 -93
  7. package/{agentEmailCommands-4KW33JII.js → agentEmailCommands-V4P5EFLP.js} +132 -112
  8. package/{agentGrantCommands-M3XFO6EN.js → agentGrantCommands-HOJ3JBBQ.js} +3 -3
  9. package/agentListCommands-TWFLUYIZ.js +802 -0
  10. package/{agentMachineCommands-CMQR4RQ4.js → agentMachineCommands-MELPAZZI.js} +58 -62
  11. package/{agentProviderCommands-YK2BIIXZ.js → agentProviderCommands-HL6MBLCL.js} +149 -2
  12. package/{agentPullCommand-HF4A42D4.js → agentPullCommand-FA43RBRU.js} +7 -7
  13. package/agentRecordCommands-FSWSSQIO.js +154 -0
  14. package/agentRunCommand-GDBJVOAT.js +183 -0
  15. package/{agentRunControl-2SKCR4SB.js → agentRunControl-IFM7IGMG.js} +10 -2
  16. package/{agentRuntimeLocal-AK2QVJHY.js → agentRuntimeLocal-KKSQJMTE.js} +47 -50
  17. package/{agentSlice-OZ33K224.js → agentSlice-YO2ZLJMD.js} +23 -16
  18. package/{appDeleteCommands-N3XEVVYC.js → appDeleteCommands-4PL4KYRN.js} +58 -59
  19. package/{appDeployCommands-AWFIXYVW.js → appDeployCommands-EEEXCEB6.js} +67 -63
  20. package/{appDeployStatusCommands-CZRON2FO.js → appDeployStatusCommands-35ZX7T66.js} +56 -56
  21. package/{appGetCommands-XQIUY4TD.js → appGetCommands-WFCHXJWF.js} +56 -56
  22. package/{appListCommands-NNG4H36Y.js → appListCommands-XY2U6DPF.js} +57 -59
  23. package/{authCommand-UBJ4EWYZ.js → authCommand-QYN47CQD.js} +371 -68
  24. package/{authCommands-H6WKKCRW.js → authCommands-77CHYBGF.js} +12 -9
  25. package/{builtinSkillRegistry-ZMF6YGNO.js → builtinSkillRegistry-TDQ6JB2E.js} +13 -11
  26. package/{chromeCommands-2N6MEWRU.js → chromeCommands-OBBNJCLS.js} +314 -13
  27. package/chromeOpsCommands-3Z34RKSE.js +472 -0
  28. package/{chunk-ALXHV7NK.js → chunk-2GGXHQIW.js} +43 -4
  29. package/{localRuntimeAuthority-5W6IJRAD.js → chunk-2IXDJNZI.js} +154 -75
  30. package/{chunk-IVZJWTDI.js → chunk-36OMEXXR.js} +89 -21
  31. package/{chunk-H6A6X4EK.js → chunk-3MZAGMYY.js} +16 -0
  32. package/chunk-3PVYUPXK.js +40 -0
  33. package/chunk-3SZA4U64.js +1192 -0
  34. package/{chunk-GNMAFAIS.js → chunk-44WXLHFI.js} +1 -1
  35. package/{chunk-AGGIDPCZ.js → chunk-4JH2UMJR.js} +6 -0
  36. package/chunk-4LCOCOR5.js +50 -0
  37. package/chunk-4YRTZIVN.js +871 -0
  38. package/chunk-556RW72X.js +14110 -0
  39. package/{chunk-N7J63Q6C.js → chunk-56GBUMO5.js} +10 -1
  40. package/{chunk-W7XHHYWM.js → chunk-5BHQICF2.js} +5 -1
  41. package/{chunk-XUWRURDF.js → chunk-5EBLANFT.js} +1 -1
  42. package/{chunk-3AH7LNUB.js → chunk-5EMSBTQ6.js} +33 -14
  43. package/{chunk-YRRASA5Q.js → chunk-5MM7NNO6.js} +113 -52
  44. package/chunk-5MMAK75Q.js +15 -0
  45. package/{chunk-M5PVFLD4.js → chunk-64K7WX26.js} +90 -21
  46. package/{chunk-AKG5W4LG.js → chunk-6CCFTVBP.js} +76 -221
  47. package/chunk-6MJNEXUU.js +614 -0
  48. package/{chunk-62IL3KQV.js → chunk-6MXDOUMH.js} +15 -3
  49. package/{chunk-QOKAKDPE.js → chunk-6Q7UTJKR.js} +6 -94
  50. package/chunk-6QDYSCPW.js +223 -0
  51. package/{chunk-HYZIYH2H.js → chunk-74RAWNQN.js} +56 -63
  52. package/chunk-7DPNBQSV.js +9 -0
  53. package/chunk-7MOXKPHC.js +119 -0
  54. package/{chunk-523WHFSL.js → chunk-7XKL25PW.js} +1973 -754
  55. package/{chunk-IAESIMK7.js → chunk-A4MW3YZL.js} +10 -14
  56. package/chunk-AGIM7IMJ.js +147 -0
  57. package/{chunk-7CHC4W22.js → chunk-AIZE5TDM.js} +3 -3
  58. package/{chunk-P4BX6FFU.js → chunk-AOCM7HPT.js} +214 -51
  59. package/{chunk-5GVBDNTO.js → chunk-AU7AXHUL.js} +1 -1
  60. package/{chunk-4H22P2JV.js → chunk-AUIJZACN.js} +2073 -1275
  61. package/{chunk-CIF4X6ZM.js → chunk-AWVFQMOV.js} +25 -3
  62. package/{chunk-RYZINGPM.js → chunk-BPMPOFWP.js} +347 -235
  63. package/{chunk-YUNJN43V.js → chunk-BU2YQBV4.js} +215 -28
  64. package/{chunk-XPRWFQQK.js → chunk-CBHGZRCE.js} +38 -12
  65. package/{chunk-Y3PMXGLH.js → chunk-CHCS6XPJ.js} +365 -144
  66. package/chunk-CHOZJMJS.js +78 -0
  67. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  68. package/{chunk-3SV7RM24.js → chunk-D2QN6CTI.js} +117 -72
  69. package/{chunk-5TEEECZM.js → chunk-E2AKSW7L.js} +10 -7
  70. package/{chunk-RSEEDUMS.js → chunk-EDX5XSJM.js} +2 -2
  71. package/{chunk-BKWMNZ2X.js → chunk-ES633ZS5.js} +280 -98
  72. package/{chunk-QDSINZM3.js → chunk-EUGTFFO6.js} +2 -23
  73. package/{chunk-UNYJU5L6.js → chunk-EYLGAEB4.js} +5 -1
  74. package/{chunk-CU3QB4HW.js → chunk-EYWJT7A2.js} +12 -12
  75. package/{chunk-BNGW5ASC.js → chunk-EZVK3N5L.js} +66 -18
  76. package/{chunk-6FGTMQCL.js → chunk-F32Z66T4.js} +6 -10
  77. package/chunk-FJMRBOPO.js +11507 -0
  78. package/{chunk-ZOVKKMF6.js → chunk-FY4SDK2E.js} +1 -1
  79. package/chunk-G6OOUQWJ.js +417 -0
  80. package/{chunk-PQWU42UQ.js → chunk-GCKHQECX.js} +6 -6
  81. package/chunk-GKXCHNTE.js +15 -0
  82. package/{chunk-T7F46O36.js → chunk-GQN2WLAI.js} +20 -11
  83. package/{chunk-P6GMCCAT.js → chunk-GQV5KHJU.js} +78 -12
  84. package/{chunk-B2XUQXQX.js → chunk-HIQ4GF53.js} +191 -68
  85. package/{chunk-YUWMM4US.js → chunk-HKX3ULQB.js} +34 -22
  86. package/{chunk-GMZLP5DV.js → chunk-HNUWUO75.js} +30 -19
  87. package/{chunk-5UTFL4QJ.js → chunk-I2ZMGXXF.js} +10 -5
  88. package/chunk-I42VC5KR.js +15 -0
  89. package/{chunk-3BXNTXYI.js → chunk-I4SN4NUQ.js} +1199 -56
  90. package/chunk-IA7TRNNR.js +11 -0
  91. package/{chunk-WIWM4FE3.js → chunk-IJERIUXS.js} +55 -748
  92. package/{chunk-CPUFH46E.js → chunk-ILU2NPWY.js} +10 -10
  93. package/{chunk-SLLGJZDT.js → chunk-ISQL4V7C.js} +4 -4
  94. package/chunk-IT3ZZRJE.js +12 -0
  95. package/{chunk-LPVCRQMM.js → chunk-IZ7OJB6K.js} +20 -16
  96. package/{chunk-DY7ANLKG.js → chunk-JKMLSTZK.js} +43 -12
  97. package/{chunk-6TPOEJMQ.js → chunk-JZX2XLKC.js} +64 -23
  98. package/{chunk-27ONFIEY.js → chunk-K2AER7RX.js} +19 -12
  99. package/{chunk-O2OWEFII.js → chunk-KFHQQ3NO.js} +1 -1
  100. package/{chunk-QXGPFY6J.js → chunk-LGN377P3.js} +27 -17
  101. package/{chunk-L36OWPP3.js → chunk-LIQJTQRN.js} +118 -139
  102. package/{chunk-FWQEKRTD.js → chunk-LTRUTOHX.js} +36 -31
  103. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  104. package/{chunk-5J3PYNUP.js → chunk-NYYFIKHI.js} +17 -3
  105. package/{chunk-6O4IK4V2.js → chunk-OFFL4DCR.js} +1 -1
  106. package/{chunk-B6SAMB33.js → chunk-OWYYDMGJ.js} +209 -9
  107. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  108. package/{chunk-CTUQJVQM.js → chunk-P5QACQDK.js} +1 -1
  109. package/{chunk-DIXLJWCD.js → chunk-PCKVQXYV.js} +274 -93
  110. package/{chunk-4JMDLJAD.js → chunk-PJNFNEJE.js} +114 -37
  111. package/{chunk-Z4CSIXYP.js → chunk-PLSVXHSA.js} +3 -3
  112. package/{chunk-BIDGLJQ3.js → chunk-PLXDDGBK.js} +45 -8
  113. package/chunk-PWTNI4N7.js +47 -0
  114. package/chunk-QFEW2ULV.js +42 -0
  115. package/{chunk-RGNEEJ3Y.js → chunk-QLQ573SU.js} +35 -9
  116. package/chunk-QQ56R7KS.js +88 -0
  117. package/chunk-QYPE3TS3.js +43 -0
  118. package/{chunk-4DPP773Q.js → chunk-RSHPU4PD.js} +59 -11
  119. package/chunk-RVWMAFIT.js +134 -0
  120. package/{chunk-ESHYE7WU.js → chunk-S73EPYNC.js} +10 -7
  121. package/{chunk-UQNS32WZ.js → chunk-SCMHQUMK.js} +1 -1
  122. package/{chunk-T767MPHB.js → chunk-SMENBO3M.js} +354 -120
  123. package/{chunk-PCVVZ2MH.js → chunk-SSFDFOVT.js} +26 -31
  124. package/chunk-SW4S4XYB.js +1794 -0
  125. package/{chunk-HUFPWXFW.js → chunk-T6X3D7NB.js} +572 -430
  126. package/chunk-TY3TIUJK.js +89 -0
  127. package/{chunk-X2QRZXZH.js → chunk-TYJ5XFEA.js} +4 -4
  128. package/{chunk-ALFH24P3.js → chunk-TYYRSFBG.js} +197 -155
  129. package/{chunk-7KVZ5LDQ.js → chunk-UBUH2TCC.js} +18 -4
  130. package/chunk-UEILX4EV.js +15 -0
  131. package/chunk-UHTDNB5Y.js +140 -0
  132. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  133. package/{chunk-OHOVNO7I.js → chunk-UOKFKFPO.js} +6 -3
  134. package/{chunk-XISEYOGH.js → chunk-USHQX6VT.js} +5 -5
  135. package/chunk-UUPR3TD7.js +53 -0
  136. package/{chunk-HDLLCBRF.js → chunk-VEA7H5FG.js} +2 -2
  137. package/chunk-VHGD6FHV.js +116 -0
  138. package/chunk-VIWDGTDA.js +8 -0
  139. package/{chunk-GOH6RW6F.js → chunk-VJXHL6MH.js} +34 -11
  140. package/{chunk-4XEYAFLY.js → chunk-VL5KOY2C.js} +623 -94
  141. package/{chunk-EADNWBAZ.js → chunk-VP3BINY7.js} +13 -0
  142. package/{chunk-EOARMOVD.js → chunk-W4S6OTSC.js} +6 -3
  143. package/chunk-WD4XYDYC.js +567 -0
  144. package/chunk-WJZOQR2J.js +151 -0
  145. package/{chunk-AUDNYVRC.js → chunk-XETG4RIX.js} +5 -5
  146. package/{chunk-MX574M24.js → chunk-XI7DGLUK.js} +4 -4
  147. package/{chunk-3L2WKC3W.js → chunk-XPWGOTBQ.js} +8 -1
  148. package/chunk-XRUSXPCQ.js +514 -0
  149. package/{chunk-I4OPU5TK.js → chunk-XS47QOFV.js} +273 -11
  150. package/{chunk-S5XGT6GB.js → chunk-XZNCX52W.js} +30 -9
  151. package/{chunk-2JMMBU6V.js → chunk-Y2DXOPSO.js} +1920 -644
  152. package/{chunk-5OA5HMTL.js → chunk-YLMMECCH.js} +1 -1
  153. package/{chunk-CFT5HBGW.js → chunk-YVLQXTUB.js} +448 -12
  154. package/chunk-YVPQATSC.js +709 -0
  155. package/{chunk-DCFPQW22.js → chunk-Z7OJUX6S.js} +122 -107
  156. package/chunk-ZEZC7IIM.js +126 -0
  157. package/{chunk-ALGORS6Y.js → chunk-ZF6526IQ.js} +43 -8
  158. package/chunk-ZIWPQEFU.js +165 -0
  159. package/chunk-ZKZ5X2HS.js +7012 -0
  160. package/chunk-ZRAU6T47.js +56 -0
  161. package/{cliExecutor-AWYR3T33.js → cliExecutor-BWBF2MTI.js} +4 -3
  162. package/{clipboardy-BX4NMYHE.js → clipboardy-GCO3GT3I.js} +3 -8
  163. package/{commandRegistry-YOEQUA7T.js → commandRegistry-XN7C5GHO.js} +183 -107
  164. package/contentThunks-5L7YQI3S.js +84 -0
  165. package/{cooldownCommands-ZLEPIB4A.js → cooldownCommands-JFKTYS2D.js} +2 -2
  166. package/{createAgentAutomationAction-5EJL6ROU.js → createAgentAutomationAction-QOPOLCRK.js} +53 -44
  167. package/createDialogAction-MZ66VY5Q.js +76 -0
  168. package/{createPageAction-75ELC64R.js → createPageAction-VQDJIXMY.js} +65 -54
  169. package/cursorProvider-YGGNMVWX.js +6123 -0
  170. package/{db-VQSAOWAO.js → db-2QOTXYGH.js} +11 -5
  171. package/{dbSlice-DQ32LYTJ.js → dbSlice-J37OGIXH.js} +19 -13
  172. package/{deleteFile-NX6QHCWZ.js → deleteFile-6JWDDRVP.js} +10 -6
  173. package/dialogCommands-YZLSJB6X.js +113 -0
  174. package/{dialogSlice-KSXPGJB2.js → dialogSlice-6RODVYCK.js} +53 -39
  175. package/{docCreateCommands-ZSLGVBZT.js → docCreateCommands-JB2RRMRJ.js} +54 -57
  176. package/{docDeleteCommands-5N4GVZBG.js → docDeleteCommands-AQENULNM.js} +56 -58
  177. package/{docReadCommands-YJSAA7AV.js → docReadCommands-DYD25YLQ.js} +53 -56
  178. package/{docStore-AROBVRCR.js → docStore-ZZA3OPM5.js} +25 -16
  179. package/{docUpdateCommands-WEMLSW6W.js → docUpdateCommands-3GVS23QL.js} +54 -57
  180. package/{fetchMessages-67MEFPZR.js → fetchMessages-IIJWQ3HR.js} +5 -4
  181. package/{getPricing-NMMFT3YI.js → getPricing-FKK3F5EJ.js} +11 -9
  182. package/{handleSendMessageAction-EGNWHAUB.js → handleSendMessageAction-DVG5U26T.js} +619 -165
  183. package/index.js +11 -7
  184. package/{lib-FRRS27KN.js → lib-4YTWAGY7.js} +581 -248
  185. package/{localDialogRead-EBRS242U.js → localDialogRead-FSOMOPDZ.js} +2 -2
  186. package/localRuntimeAdapter-HXRHFKRC.js +244 -0
  187. package/localRuntimeAuthority-JDAD7CB6.js +16 -0
  188. package/{localRuntimeDb-3LRMNLCM.js → localRuntimeDb-CVC62PM5.js} +1 -1
  189. package/{machineCommands-ARZYKGGE.js → machineCommands-5KBF4RCC.js} +503 -161
  190. package/{machineInfo-66ZFUMLE.js → machineInfo-UKPTZO5Y.js} +2 -2
  191. package/machineWsRunDispatch-4OQDEDOR.js +169 -0
  192. package/{memberThunks-5ZXPR63F.js → memberThunks-66DH6ABQ.js} +25 -18
  193. package/{models-ZPU5EDF4.js → models-LAS4B2B5.js} +2 -2
  194. package/package.json +1 -1
  195. package/{providerPresetApply-DD6NGWW6.js → providerPresetApply-MY66I6NT.js} +10 -10
  196. package/{providerRegistry-XDRLMYGJ.js → providerRegistry-QOE2FT57.js} +13 -9
  197. package/{read-EPTJRAEF.js → read-DC4NUGN6.js} +12 -8
  198. package/{readDocTool-W4NDXNEX.js → readDocTool-NCJ5NT25.js} +1 -1
  199. package/{readlineWorkspace-3XOFVARF.js → readlineWorkspace-RIE62QVZ.js} +5022 -921
  200. package/{removeDialogAgentAction-OSYNZRX7.js → removeDialogAgentAction-E2H3OZU6.js} +29 -28
  201. package/{runAgentClientLoop-UMF7VZYZ.js → runAgentClientLoop-KLUUXBZS.js} +154 -97
  202. package/{runtimeDoctorCommands-ID23PNNZ.js → runtimeDoctorCommands-GIOGC5SC.js} +17 -17
  203. package/secretCommands-ZXZRLR3R.js +700 -0
  204. package/setDialogExtraReferencesAction-SITRPMYU.js +37 -0
  205. package/{setPrimaryDialogAgentAction-WZ7KI3YA.js → setPrimaryDialogAgentAction-U7N45TGC.js} +30 -29
  206. package/{chunk-SONWNI3L.js → settingThunks-Y7SVJOMZ.js} +223 -928
  207. package/{skillDiscovery-ZBU76COE.js → skillDiscovery-QC35EQY4.js} +2 -2
  208. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  209. package/{spaceCommands-UJOVU4XI.js → spaceCommands-ZR5BR3GX.js} +59 -59
  210. package/{streamAgentChatTurn-GYGMYOSM.js → streamAgentChatTurn-MN2SSPGA.js} +309 -165
  211. package/{switchDialogAgentAction-GMR7WN3P.js → switchDialogAgentAction-OMGBD3N2.js} +26 -22
  212. package/{tableCommands-G7RV3RU3.js → tableCommands-U3QDY4L6.js} +19 -17
  213. package/{toolApiClient-CVGWM4PN.js → toolApiClient-7WSJJJBV.js} +6 -5
  214. package/tools-W2MOLERY.js +124 -0
  215. package/tuiSummaryLlmCaller-BM3VSTBU.js +130 -0
  216. package/{updateCommands-4EHDLF5J.js → updateCommands-NQXAGFM7.js} +3 -3
  217. package/{updateDialogTitleAction-4U5W4AMH.js → updateDialogTitleAction-Z4JX6REN.js} +102 -57
  218. package/workloadLifecycle-36DXRZKU.js +320 -0
  219. package/action-GI44T4DR.js +0 -31
  220. package/agentListCommands-IW3GQVUP.js +0 -427
  221. package/agentRecordCommands-4YBSYPIY.js +0 -134
  222. package/agentRunCommand-5MU5X5OT.js +0 -161
  223. package/browser-image-compression-MFDTD7K6.js +0 -1763
  224. package/chatQueueReduxAdapter-HVHA2HPM.js +0 -186
  225. package/chromeOpsCommands-IXRLN57H.js +0 -289
  226. package/chunk-42Z3EMC4.js +0 -25363
  227. package/chunk-CQ3WA2NE.js +0 -299
  228. package/chunk-CYSYR67N.js +0 -93
  229. package/chunk-IAG4FHOJ.js +0 -34
  230. package/chunk-JBTJAPUF.js +0 -35
  231. package/chunk-K2CSUCHJ.js +0 -620
  232. package/chunk-LTRXGFMS.js +0 -83
  233. package/chunk-M76ECQRD.js +0 -13658
  234. package/chunk-MEYIRKDN.js +0 -8967
  235. package/chunk-OCZKATRC.js +0 -129
  236. package/chunk-OTGFTBLI.js +0 -13
  237. package/chunk-PUOC4YRO.js +0 -394
  238. package/chunk-QU5A4LYX.js +0 -2415
  239. package/chunk-URMS4XY2.js +0 -10
  240. package/chunk-UV6VISQJ.js +0 -20
  241. package/chunk-VJVNU77E.js +0 -83
  242. package/chunk-WRMKCKZ3.js +0 -13807
  243. package/chunk-Y5GCAMGP.js +0 -9
  244. package/chunk-YPREESF4.js +0 -225
  245. package/contentThunks-AK2F3KNC.js +0 -73
  246. package/createDialogAction-F5WEWA47.js +0 -66
  247. package/dialogCommands-G7YBVAMC.js +0 -102
  248. package/levelLazyShim-GZBKODGI.js +0 -7
  249. package/machineWsRunDispatch-I7F4L532.js +0 -149
  250. package/serverStoreFactory-YMXDF4NI.js +0 -20
  251. package/setDialogExtraReferencesAction-M32UYNCG.js +0 -30
  252. package/settingSlice-Q6EKL7EQ.js +0 -204
  253. package/syncMapping-N6RGXGBW.js +0 -437
  254. package/tools-DU4JXVAV.js +0 -111
  255. package/tuiSummaryLlmCaller-3YFNHCTW.js +0 -128
  256. package/{chunk-SV5IJK6K.js → chunk-NBTY7YJF.js} +3 -3
  257. package/{chunk-2SYTUTLI.js → chunk-YBNHPX4S.js} +3 -3
  258. package/{offlineMarxistsAgentCommand-HGXZV4XJ.js → offlineMarxistsAgentCommand-2QTHJCHV.js} +4 -4
@@ -10,6 +10,114 @@ var GLOBAL_DIALOG_RUNTIME_KEY = "__global__";
10
10
 
11
11
  // packages/chat/dialog/dialogRuntimeStore.ts
12
12
  var import_react = __toESM(require_react());
13
+
14
+ // packages/app/utils/localStorageState.ts
15
+ function readStorageJSON(key) {
16
+ if (typeof window === "undefined") return null;
17
+ try {
18
+ const raw = window.localStorage.getItem(key);
19
+ if (!raw) return null;
20
+ return JSON.parse(raw);
21
+ } catch {
22
+ return null;
23
+ }
24
+ }
25
+ function writeStorageJSON(key, value) {
26
+ if (typeof window === "undefined") return;
27
+ try {
28
+ window.localStorage.setItem(key, JSON.stringify(value));
29
+ } catch {
30
+ }
31
+ }
32
+
33
+ // packages/chat/dialog/mediaJobPendingPersistence.ts
34
+ var MEDIA_JOB_PENDING_STORAGE_KEY = "nolo:chat:media-job-pending:v1";
35
+ var MEDIA_JOB_PENDING_KEEP_PER_DIALOG = 10;
36
+ var currentActorId = null;
37
+ function setMediaJobPendingActor(actorId) {
38
+ currentActorId = actorId && actorId.length > 0 ? actorId : null;
39
+ }
40
+ function getMediaJobPendingActor() {
41
+ return currentActorId;
42
+ }
43
+ var actorKey = () => `@${currentActorId ?? "anon"}`;
44
+ var bucketKeyOf = (dialogKey) => dialogKey ?? GLOBAL_DIALOG_RUNTIME_KEY;
45
+ var isEntry = (value) => {
46
+ if (!value || typeof value !== "object") return false;
47
+ const entry = value;
48
+ return typeof entry.id === "string" && entry.id.length > 0 && typeof entry.name === "string";
49
+ };
50
+ var readAllActors = () => {
51
+ const raw = readStorageJSON(MEDIA_JOB_PENDING_STORAGE_KEY);
52
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) return {};
53
+ return raw;
54
+ };
55
+ var writeActorMap = (map) => {
56
+ const all = readAllActors();
57
+ all[actorKey()] = map;
58
+ writeStorageJSON(MEDIA_JOB_PENDING_STORAGE_KEY, all);
59
+ };
60
+ function readMediaJobPendingMap() {
61
+ const scoped = readAllActors()[actorKey()];
62
+ if (!scoped || typeof scoped !== "object" || Array.isArray(scoped)) return {};
63
+ const map = {};
64
+ for (const [dialogKey, entries] of Object.entries(scoped)) {
65
+ if (!Array.isArray(entries)) continue;
66
+ const valid = entries.filter(isEntry).map((entry) => ({
67
+ id: entry.id,
68
+ name: entry.name,
69
+ fileKey: typeof entry.fileKey === "string" ? entry.fileKey : void 0,
70
+ mimeType: typeof entry.mimeType === "string" ? entry.mimeType : void 0,
71
+ size: typeof entry.size === "number" ? entry.size : void 0,
72
+ durationSec: typeof entry.durationSec === "number" ? entry.durationSec : void 0,
73
+ savedAt: typeof entry.savedAt === "number" && Number.isFinite(entry.savedAt) ? entry.savedAt : 0
74
+ }));
75
+ if (valid.length) map[dialogKey] = valid;
76
+ }
77
+ return map;
78
+ }
79
+ function upsertMediaJobPendingEntry(entry) {
80
+ const map = readMediaJobPendingMap();
81
+ const dialogKey = bucketKeyOf(entry.dialogKey);
82
+ const kept = (map[dialogKey] ?? []).filter((item) => item.id !== entry.id);
83
+ kept.push({ ...entry, savedAt: Date.now() });
84
+ map[dialogKey] = kept.slice(-MEDIA_JOB_PENDING_KEEP_PER_DIALOG);
85
+ writeActorMap(map);
86
+ }
87
+ function removeMediaJobPendingEntryById(id) {
88
+ const map = readMediaJobPendingMap();
89
+ let changed = false;
90
+ for (const [dialogKey, entries] of Object.entries(map)) {
91
+ const kept = entries.filter((entry) => entry.id !== id);
92
+ if (kept.length !== entries.length) {
93
+ changed = true;
94
+ if (kept.length) map[dialogKey] = kept;
95
+ else delete map[dialogKey];
96
+ }
97
+ }
98
+ if (changed) writeActorMap(map);
99
+ }
100
+ function clearMediaJobPendingEntries(payload) {
101
+ if (payload?.all) {
102
+ writeStorageJSON(MEDIA_JOB_PENDING_STORAGE_KEY, {});
103
+ return;
104
+ }
105
+ const dialogKey = bucketKeyOf(payload?.dialogKey);
106
+ const map = readMediaJobPendingMap();
107
+ if (!(dialogKey in map)) return;
108
+ delete map[dialogKey];
109
+ writeActorMap(map);
110
+ }
111
+ function pruneMediaJobPendingEntries(dialogKey, keep = MEDIA_JOB_PENDING_KEEP_PER_DIALOG) {
112
+ const key = bucketKeyOf(dialogKey);
113
+ const map = readMediaJobPendingMap();
114
+ const entries = map[key];
115
+ if (!entries || entries.length <= keep) return;
116
+ map[key] = entries.slice(-keep);
117
+ writeActorMap(map);
118
+ }
119
+
120
+ // packages/chat/dialog/dialogRuntimeStore.ts
13
121
  var createEmptyTokenStats = () => ({
14
122
  inputTokens: 0,
15
123
  outputTokens: 0,
@@ -17,6 +125,7 @@ var createEmptyTokenStats = () => ({
17
125
  });
18
126
  var createEmptyDialogRuntimeState = () => ({
19
127
  tokens: createEmptyTokenStats(),
128
+ lastProviderInput: null,
20
129
  pendingFiles: [],
21
130
  activeControllers: {},
22
131
  pendingRawData: {},
@@ -79,21 +188,49 @@ function addPendingFile(payload) {
79
188
  const targetRuntimeKey = payload.targetDialogKey ?? payload.runtimeDialogKey ?? (payload.type === "dialog" ? activeDialogKey : payload.dialogKey);
80
189
  const runtime = ensureDialogRuntimeState(targetRuntimeKey);
81
190
  if (!runtime.pendingFiles.some((f) => f.id === payload.id)) {
82
- runtime.pendingFiles.push(payload);
191
+ runtime.pendingFiles = [...runtime.pendingFiles, payload];
192
+ if (payload.type === "media_job") {
193
+ upsertMediaJobPendingEntry({
194
+ id: payload.id,
195
+ name: payload.name,
196
+ fileKey: payload.fileKey,
197
+ mimeType: payload.mimeType,
198
+ size: payload.size,
199
+ durationSec: payload.durationSec,
200
+ // 与写入侧 bucket 推导严格同源:`dialogKey || GLOBAL_DIALOG_RUNTIME_KEY`
201
+ // (useMessageInputFiles 的 effectiveDialogKey 同规则)。不依赖
202
+ // activeDialogKey 隐式回退,保证恢复时读到的就是当初写入的 bucket。
203
+ dialogKey: payload.dialogKey ?? GLOBAL_DIALOG_RUNTIME_KEY
204
+ });
205
+ }
83
206
  notify();
84
207
  }
85
208
  return action("dialogRuntime/addPendingFile", payload);
86
209
  }
87
210
  function removePendingFile(fileId) {
88
211
  const runtime = ensureDialogRuntimeState();
89
- const fileToRemove = runtime.pendingFiles.find((f) => f.id === fileId);
212
+ let fileToRemove = runtime.pendingFiles.find((f) => f.id === fileId);
213
+ let runtimeHoldingFile = runtime;
214
+ if (!fileToRemove) {
215
+ for (const candidate of Object.values(runtimeByKey)) {
216
+ const found = candidate.pendingFiles.find((f) => f.id === fileId);
217
+ if (found) {
218
+ fileToRemove = found;
219
+ runtimeHoldingFile = candidate;
220
+ break;
221
+ }
222
+ }
223
+ }
90
224
  if (fileToRemove) {
91
225
  if (fileToRemove.pageKey) {
92
- delete runtime.pendingRawData[fileToRemove.pageKey];
226
+ delete runtimeHoldingFile.pendingRawData[fileToRemove.pageKey];
93
227
  }
94
- runtime.pendingFiles = runtime.pendingFiles.filter(
228
+ runtimeHoldingFile.pendingFiles = runtimeHoldingFile.pendingFiles.filter(
95
229
  (file) => file.id !== fileId
96
230
  );
231
+ if (fileToRemove.type === "media_job") {
232
+ removeMediaJobPendingEntryById(fileToRemove.id);
233
+ }
97
234
  notify();
98
235
  }
99
236
  return action("dialogRuntime/removePendingFile", fileId);
@@ -104,10 +241,14 @@ function clearPendingAttachments(payload) {
104
241
  runtime2.pendingFiles = [];
105
242
  runtime2.pendingRawData = {};
106
243
  });
244
+ clearMediaJobPendingEntries({ all: true });
107
245
  notify();
108
246
  return action("dialogRuntime/clearPendingAttachments", payload);
109
247
  }
110
248
  const runtime = ensureDialogRuntimeState(payload?.dialogKey);
249
+ runtime.pendingFiles.forEach((file) => {
250
+ if (file.type === "media_job") removeMediaJobPendingEntryById(file.id);
251
+ });
111
252
  runtime.pendingFiles = [];
112
253
  runtime.pendingRawData = {};
113
254
  notify();
@@ -146,10 +287,62 @@ function clearDialogTurnPhase(payload = {}) {
146
287
  return setDialogTurnPhase({ phase: null, dialogKey: payload.dialogKey, turnId: payload.turnId });
147
288
  }
148
289
  function clearDialogRuntimeState(payload) {
290
+ const runtime = runtimeByKey[payload.dialogKey];
291
+ runtime?.pendingFiles.forEach((file) => {
292
+ if (file.type === "media_job") removeMediaJobPendingEntryById(file.id);
293
+ });
149
294
  delete runtimeByKey[payload.dialogKey];
150
295
  notify();
151
296
  return action("dialogRuntime/clearDialogRuntimeState", payload);
152
297
  }
298
+ function restoreMediaJobPendingFiles(dialogKey) {
299
+ const runtimeKey = resolveDialogRuntimeKey(dialogKey);
300
+ const entries = (readMediaJobPendingMap()[runtimeKey] ?? []).slice(-MEDIA_JOB_PENDING_KEEP_PER_DIALOG);
301
+ if (!entries.length) return 0;
302
+ const runtime = ensureDialogRuntimeState(runtimeKey);
303
+ const existingIds = new Set(runtime.pendingFiles.map((file) => file.id));
304
+ let restored = 0;
305
+ for (const entry of entries) {
306
+ if (existingIds.has(entry.id)) continue;
307
+ addPendingFile({
308
+ id: entry.id,
309
+ name: entry.name,
310
+ type: "media_job",
311
+ fileKey: entry.fileKey,
312
+ mimeType: entry.mimeType,
313
+ size: entry.size,
314
+ durationSec: entry.durationSec,
315
+ trackingId: entry.id,
316
+ dialogKey: runtimeKey
317
+ });
318
+ restored += 1;
319
+ }
320
+ pruneMediaJobPendingEntries(runtimeKey);
321
+ return restored;
322
+ }
323
+ var MEDIA_NOTE_PAGE_KEY_PREFIX = "media-note:";
324
+ var isMediaNotePageReference = (pageKey) => typeof pageKey === "string" && pageKey.startsWith(MEDIA_NOTE_PAGE_KEY_PREFIX);
325
+ var getMediaJobRuntimeActor = () => getMediaJobPendingActor();
326
+ function setMediaJobRuntimeActor(actorId) {
327
+ const next = actorId && actorId.length ? actorId : null;
328
+ if (getMediaJobPendingActor() === next) return;
329
+ setMediaJobPendingActor(next);
330
+ for (const key of Object.keys(runtimeByKey)) {
331
+ const runtime = runtimeByKey[key];
332
+ const kept = runtime.pendingFiles.filter(
333
+ (f) => f.type !== "media_job" && !isMediaNotePageReference(f.pageKey)
334
+ );
335
+ if (kept.length !== runtime.pendingFiles.length) {
336
+ runtime.pendingFiles = kept;
337
+ }
338
+ for (const pageKey of Object.keys(runtime.pendingRawData)) {
339
+ if (isMediaNotePageReference(pageKey)) {
340
+ delete runtime.pendingRawData[pageKey];
341
+ }
342
+ }
343
+ }
344
+ notify();
345
+ }
153
346
  function addActiveController(payload) {
154
347
  const runtime = ensureDialogRuntimeState(payload.dialogKey);
155
348
  runtime.activeControllers[payload.messageId] = payload.controller;
@@ -204,6 +397,9 @@ function clearPendingUserInputQueue(payload) {
204
397
  }
205
398
  function tokenUsageLiveUpdate(payload) {
206
399
  const runtime = ensureDialogRuntimeState(payload.dialogKey);
400
+ if (payload.input_tokens > 0) {
401
+ runtime.lastProviderInput = { inputTokens: payload.input_tokens, observedAt: Date.now() };
402
+ }
207
403
  runtime.tokens.inputTokens += payload.input_tokens;
208
404
  runtime.tokens.outputTokens += payload.output_tokens;
209
405
  runtime.tokens.totalCost += payload.cost ?? 0;
@@ -212,15 +408,18 @@ function tokenUsageLiveUpdate(payload) {
212
408
  }
213
409
  function addPageReferenceToRuntime(payload) {
214
410
  const runtime = ensureDialogRuntimeState(payload.dialogKey);
215
- runtime.pendingFiles.push(payload.reference);
411
+ runtime.pendingFiles = [...runtime.pendingFiles, payload.reference];
216
412
  if (payload.rawData?.pageKey) {
217
413
  runtime.pendingRawData[payload.rawData.pageKey] = payload.rawData;
218
414
  }
219
415
  notify();
220
416
  }
221
417
  function applyUpdateTokensFulfilled(payload) {
222
- const runtime = runtimeByKey[payload.dialogKey];
223
- if (!runtime) return;
418
+ const runtime = ensureDialogRuntimeState(payload.dialogKey);
419
+ const observedAt = payload.observedAt ?? Date.now();
420
+ if (payload.authoritative !== false && typeof payload.input_tokens === "number" && payload.input_tokens > 0 && (!runtime.lastProviderInput || observedAt > runtime.lastProviderInput.observedAt)) {
421
+ runtime.lastProviderInput = { inputTokens: payload.input_tokens, observedAt };
422
+ }
224
423
  runtime.tokens.inputTokens = Math.max(
225
424
  0,
226
425
  runtime.tokens.inputTokens - (payload.input_tokens ?? 0)
@@ -366,6 +565,9 @@ export {
366
565
  setDialogTurnPhase,
367
566
  clearDialogTurnPhase,
368
567
  clearDialogRuntimeState,
568
+ restoreMediaJobPendingFiles,
569
+ getMediaJobRuntimeActor,
570
+ setMediaJobRuntimeActor,
369
571
  addActiveController,
370
572
  removeActiveController,
371
573
  clearActiveControllers,
@@ -379,8 +581,6 @@ export {
379
581
  deleteDialogRuntime,
380
582
  abortActiveControllers,
381
583
  getDialogRuntimeTokens,
382
- getPendingUserInputQueue,
383
- getLoopStopReason,
384
584
  getRecoveredForegroundTurn,
385
585
  selectDialogRuntimeByKey,
386
586
  selectPendingFiles,
@@ -2,7 +2,7 @@ import {
2
2
  getRecordTimestamp,
3
3
  isTombstoneRecord,
4
4
  shouldReplaceWithNextRecord
5
- } from "./chunk-GBRG75BQ.js";
5
+ } from "./chunk-D2MDMY2M.js";
6
6
 
7
7
  // packages/database/userDataMerge.ts
8
8
  var getUserDataItemTimestamp = (dataItem) => getRecordTimestamp(dataItem);
@@ -4,7 +4,7 @@ import {
4
4
 
5
5
  // packages/cli/agentCommandSupport.ts
6
6
  async function getDefaultCliDb() {
7
- const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-3LRMNLCM.js");
7
+ const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-CVC62PM5.js");
8
8
  return getDefaultCliLocalRuntimeDb();
9
9
  }
10
10
  function createNullCliDb() {