nolo-cli 0.228.0-alpha.2 → 0.228.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 (260) hide show
  1. package/README.md +3 -5
  2. package/{_executeModel-VYCHHZVT.js → _executeModel-AKCTHGMP.js} +89 -83
  3. package/{accountResolver-QETKNC7T.js → accountResolver-NGICIMEE.js} +1 -1
  4. package/{action-GDZDXPMB.js → action-C6IQAKN4.js} +8 -5
  5. package/{addContentAction-7RO4AMRI.js → addContentAction-53364YDW.js} +13 -12
  6. package/{addDialogAgentAction-EVYBGTXB.js → addDialogAgentAction-U5DD5EN5.js} +16 -15
  7. package/{agentDeleteCommand-QWQKT54A.js → agentDeleteCommand-2E5FAGUO.js} +128 -115
  8. package/{agentEmailCommands-EISMBIRE.js → agentEmailCommands-UGZZAH7E.js} +128 -111
  9. package/{agentListCommands-4WLG32IW.js → agentListCommands-JCTW3J2K.js} +398 -179
  10. package/{agentMachineCommands-DC6NKWTU.js → agentMachineCommands-QPG5ZXF4.js} +58 -47
  11. package/{agentProviderCommands-STI3DQ6A.js → agentProviderCommands-QLTABYR7.js} +2 -2
  12. package/{agentPullCommand-KHV4EELF.js → agentPullCommand-2EYJ5ENC.js} +1 -1
  13. package/agentRecordCommands-4NTVR6MZ.js +194 -0
  14. package/agentRunCommand-VHF34PYC.js +232 -0
  15. package/{agentRunControl-MBG4U6SL.js → agentRunControl-QYTXUQGY.js} +14 -9
  16. package/{agentRuntimeLocal-HOXKWCYO.js → agentRuntimeLocal-U54AKHXH.js} +58 -43
  17. package/{agentSlice-UG76KEBH.js → agentSlice-4JGDEXWK.js} +14 -13
  18. package/{appDeleteCommands-WWCC6WA5.js → appDeleteCommands-XBE5QJ6P.js} +58 -47
  19. package/{appDeployCommands-AU4IUN33.js → appDeployCommands-QIYLXXGA.js} +58 -47
  20. package/{appDeployStatusCommands-STUW7WXL.js → appDeployStatusCommands-JXS6ZQZZ.js} +58 -47
  21. package/{appGetCommands-BGTLIQ4K.js → appGetCommands-SZS7SJPK.js} +58 -47
  22. package/{appListCommands-CUCPRUXW.js → appListCommands-B3GBJSNV.js} +58 -47
  23. package/{authCommand-OZ2KTP4Z.js → authCommand-V6EOMZX6.js} +25 -19
  24. package/{authCommands-55OGQGCR.js → authCommands-T5FODCEG.js} +12 -6
  25. package/{builtinSkillRegistry-BAE2LDXF.js → builtinSkillRegistry-ZQC3IIO2.js} +8 -7
  26. package/{chromeCommands-G5UDKVSV.js → chromeCommands-O4IIKTBD.js} +384 -7
  27. package/{chromeOpsCommands-WAA45NCS.js → chromeOpsCommands-OFX7ZGKP.js} +3 -3
  28. package/{chunk-DBUR22G5.js → chunk-223KZUJ6.js} +19 -15
  29. package/{chunk-3U44JB3O.js → chunk-2C5VN7NH.js} +1 -1
  30. package/{chunk-PWTNI4N7.js → chunk-2E4BYAUE.js} +22 -0
  31. package/{chunk-L32W3PRP.js → chunk-2FZVXOFX.js} +234 -18
  32. package/{chunk-HBRDSQ3M.js → chunk-2JHGUL5K.js} +3 -2
  33. package/chunk-2SXN7LAY.js +15 -0
  34. package/chunk-3A5NNQCN.js +64 -0
  35. package/chunk-3F2FRLIO.js +372 -0
  36. package/{chunk-DEA37IUY.js → chunk-46FETNLF.js} +2 -2
  37. package/{chunk-ZEVQHCLM.js → chunk-4GYVS4PM.js} +8 -6
  38. package/{chunk-CBUZ6DKA.js → chunk-4YPH5KRA.js} +1 -1
  39. package/chunk-4ZCTKB27.js +31 -0
  40. package/chunk-53W5BXLN.js +340 -0
  41. package/{chunk-7FEP5USX.js → chunk-5AYP5QBB.js} +5 -5
  42. package/{chunk-XAG3FWBE.js → chunk-5ISNPTQH.js} +5 -5
  43. package/{chunk-EVGU5P4U.js → chunk-5P3PPQVP.js} +1 -1
  44. package/{chunk-XSW4EXQV.js → chunk-6BMTKYAO.js} +55 -18
  45. package/chunk-6PAHSSD2.js +33401 -0
  46. package/{chunk-ZOHO6MOF.js → chunk-6RSNVJGO.js} +2 -99
  47. package/{chunk-7JGMNKKG.js → chunk-6SOWMEAY.js} +30 -9
  48. package/{chunk-RG2DGNL6.js → chunk-6VEO7Z3Y.js} +3 -3
  49. package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
  50. package/{chunk-DGYCDA6W.js → chunk-7BIJFGKS.js} +36 -17
  51. package/{chunk-WFDNADFX.js → chunk-7OVOZRZF.js} +8 -8
  52. package/{chunk-WCFFRBL5.js → chunk-7PON4LBY.js} +45 -27
  53. package/{chunk-QRGDJA4B.js → chunk-7WHCIA5V.js} +33 -7
  54. package/{chunk-CMMI3DAT.js → chunk-ADYWV732.js} +59 -30
  55. package/{chunk-QYB23WUH.js → chunk-AIFQKNPP.js} +1 -1
  56. package/{chunk-HGDKT2D6.js → chunk-BPB3T5EU.js} +174 -1
  57. package/{chunk-DUUDXSLX.js → chunk-BZLGPM5B.js} +28 -4
  58. package/{chunk-ATEKLSLR.js → chunk-BZMDWGQQ.js} +14 -9
  59. package/chunk-C5A54QS7.js +108 -0
  60. package/{chunk-S6K5F3KP.js → chunk-CEKRIR22.js} +1 -1
  61. package/{chunk-42OKN2LI.js → chunk-D634SL2Y.js} +9 -107
  62. package/{chunk-DLXMMTGM.js → chunk-DHRPLRIR.js} +1283 -786
  63. package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
  64. package/{chunk-OBIC6EG7.js → chunk-DNNPARJK.js} +9 -5
  65. package/{chunk-X3E6EHJW.js → chunk-E3LSO6EI.js} +292 -207
  66. package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
  67. package/chunk-EHFBP6IK.js +791 -0
  68. package/chunk-EJQE5HB7.js +21 -0
  69. package/{chunk-VQ5N5GSV.js → chunk-EL5NRJHI.js} +4 -4
  70. package/chunk-EUGTFFO6.js +42 -0
  71. package/{chunk-7BCG67EI.js → chunk-EVHTYVD2.js} +1199 -442
  72. package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
  73. package/{chunk-262R3XNN.js → chunk-FEIVARWR.js} +377 -112
  74. package/{chunk-3VZLEKV2.js → chunk-FLBJ7IJI.js} +14 -14
  75. package/{chunk-EEOOBRA7.js → chunk-FXEPZKNJ.js} +13 -6
  76. package/{chunk-XTJKU3Z4.js → chunk-FYAMUU55.js} +677 -140
  77. package/{chunk-M3OZRQNH.js → chunk-FZANZZ63.js} +1 -1
  78. package/chunk-GAHJLSDO.js +107 -0
  79. package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
  80. package/{chunk-4N6G2CKP.js → chunk-HDKMVYNJ.js} +47 -1
  81. package/chunk-HEVRQGGH.js +106 -0
  82. package/{chunk-BIWI5M4E.js → chunk-HFHJPHFK.js} +1 -1
  83. package/{chunk-R6Z5S5GA.js → chunk-HPDLPEUG.js} +60 -17
  84. package/{chunk-YKY4OVOX.js → chunk-HQUGB2HM.js} +17 -170
  85. package/chunk-IIRJ4P4I.js +24 -0
  86. package/chunk-IVK2KT3H.js +209 -0
  87. package/{chunk-ALAES342.js → chunk-IYLUK67R.js} +9 -5
  88. package/{chunk-N5Z2V73W.js → chunk-J55F3IEZ.js} +1 -1
  89. package/{chunk-S6FDXXZV.js → chunk-J7JRCOIW.js} +2 -2
  90. package/{chunk-OWKNSIXL.js → chunk-JAKRY74O.js} +470 -83
  91. package/{chunk-VS276URX.js → chunk-JCQ3WCQ3.js} +4 -2
  92. package/chunk-JLZJL3WC.js +988 -0
  93. package/{chunk-OBSEKCVK.js → chunk-JPXACKSW.js} +219 -52
  94. package/{chunk-OTKSESZR.js → chunk-KDBDOXOM.js} +138 -54
  95. package/{chunk-VP3BINY7.js → chunk-KDDHQMSH.js} +31 -1
  96. package/{chunk-RBPUNSG5.js → chunk-KG27JIG4.js} +18 -108
  97. package/{chunk-4WVJLODK.js → chunk-KHYSFS3W.js} +88 -7
  98. package/{chunk-TCZ2VJZQ.js → chunk-KKIQAVDR.js} +9 -9
  99. package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
  100. package/chunk-KXOPLLFP.js +190 -0
  101. package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
  102. package/{chunk-HYLRQDEE.js → chunk-LLUBUHNT.js} +6 -6
  103. package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
  104. package/{chunk-RTHFJZ6M.js → chunk-LVZVSLKO.js} +29 -9
  105. package/{chunk-TI2EPRHE.js → chunk-MNFUKRRU.js} +3 -3
  106. package/chunk-MVOZ22RZ.js +26 -0
  107. package/{chunk-CNMY2XM6.js → chunk-O3A2CHAL.js} +6 -6
  108. package/{chunk-TSPMLCWI.js → chunk-OB4FBZXJ.js} +5 -5
  109. package/{chunk-LYD6C7OU.js → chunk-OJSJJKHF.js} +6 -6
  110. package/{chunk-M4SFKP5L.js → chunk-OKAXQFON.js} +3 -3
  111. package/{chunk-CD3RU7XL.js → chunk-OKH74FML.js} +121 -14
  112. package/{chunk-U2HBB7RS.js → chunk-OOV5JN25.js} +130 -30
  113. package/{chunk-ZH3KXFHS.js → chunk-OOVOAG4Q.js} +1 -1
  114. package/chunk-OQFOE4SJ.js +405 -0
  115. package/{chunk-M3JEW6N6.js → chunk-OYUMJMC5.js} +15 -0
  116. package/chunk-P27E22MA.js +203 -0
  117. package/{chunk-SRCCSTIM.js → chunk-P4R5KXU7.js} +4 -4
  118. package/{chunk-FJ23FZXF.js → chunk-PHREU2KZ.js} +5 -3
  119. package/{chunk-HSSBDZLD.js → chunk-PIVTQRX6.js} +43 -13
  120. package/{chunk-XFXFPUO7.js → chunk-PJL7OJRC.js} +13 -39
  121. package/{chunk-RRDRQOEC.js → chunk-PNLDLUMO.js} +276 -303
  122. package/{chunk-4I2MXV5Q.js → chunk-PVFYPUIM.js} +2 -0
  123. package/{chunk-HHFGE2WF.js → chunk-QGFLVQ6E.js} +5 -5
  124. package/{chunk-EGHP7KOY.js → chunk-QONAOHVW.js} +38 -29
  125. package/chunk-R3FZHW4Q.js +103 -0
  126. package/{chunk-ZYKJBRZ3.js → chunk-R3MV2GII.js} +1 -47
  127. package/chunk-R72QWIFO.js +50 -0
  128. package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
  129. package/{chunk-ILHQ2AXT.js → chunk-RIWKZT7E.js} +36 -8
  130. package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
  131. package/{chunk-45CAVC35.js → chunk-S7H4KTMB.js} +2568 -337
  132. package/{chunk-OJ45MEEI.js → chunk-SA356NGW.js} +1 -1
  133. package/{chunk-F6Z6ZCUV.js → chunk-SCAC3NM5.js} +3 -3
  134. package/{chunk-YVFH2MFB.js → chunk-SLUN7W6S.js} +7 -7
  135. package/chunk-SQL7YNED.js +650 -0
  136. package/chunk-SR4FE5VD.js +9 -0
  137. package/{chunk-HF7BLF3F.js → chunk-SSOR2EDT.js} +107 -104
  138. package/chunk-TRRXYFTR.js +46 -0
  139. package/{chunk-3QIYD3VM.js → chunk-TUOHSUK5.js} +20068 -18402
  140. package/chunk-TYJCIA2O.js +835 -0
  141. package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
  142. package/{chunk-GAYNXB6T.js → chunk-U3BUWDUP.js} +1031 -2155
  143. package/{chunk-BP5ZJ6B4.js → chunk-U6QNVOR5.js} +1 -1
  144. package/{chunk-UAIHKQIA.js → chunk-U6RD332P.js} +18 -2
  145. package/chunk-UAF5VQCE.js +77 -0
  146. package/{chunk-TQEKUOTI.js → chunk-UFGUJ2IH.js} +12 -12
  147. package/{chunk-VMJVAJ6W.js → chunk-UP7KBWLE.js} +109 -33
  148. package/{chunk-2X7WFDT6.js → chunk-UUCYUN6Y.js} +1 -1
  149. package/{chunk-5YMA6DDZ.js → chunk-UZKBVQUX.js} +1 -1
  150. package/chunk-V5TI7HJH.js +133 -0
  151. package/{chunk-WFGNWWJI.js → chunk-VH7UO6E5.js} +252 -114
  152. package/{chunk-MNEZUL5S.js → chunk-VJFDG3ZG.js} +63 -94
  153. package/{chunk-G7IUT2V3.js → chunk-WC3J5SL2.js} +635 -350
  154. package/{chunk-HXB4VDGK.js → chunk-WD5547ZF.js} +33 -30
  155. package/chunk-WDWZPASX.js +29 -0
  156. package/{chunk-4ZGPHFLE.js → chunk-WS36XPJD.js} +2 -2
  157. package/{chunk-6QHKRARD.js → chunk-WSLL7VV4.js} +29 -5
  158. package/chunk-XRGBJHZX.js +136 -0
  159. package/{chunk-MZG5CETE.js → chunk-Y2KWJTOZ.js} +4 -4
  160. package/{dialogUsageCommand-W2WCSGKF.js → chunk-Y2TCTNUD.js} +27 -20
  161. package/chunk-YJPK35HB.js +175 -0
  162. package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
  163. package/{chunk-547ENH5T.js → chunk-YN23INFZ.js} +4 -4
  164. package/{chunk-4QYJPWHH.js → chunk-YXK3GJF5.js} +232 -10
  165. package/{chunk-MJI3UAXN.js → chunk-Z2OWAYMI.js} +77 -51
  166. package/{chunk-7Z6EW7AH.js → chunk-ZTHAJU3O.js} +106 -14
  167. package/{chunk-YFLVRVYK.js → chunk-ZYPXOQS2.js} +1 -1
  168. package/{cliAgentConfigHelpers-BTRHMPW2.js → cliAgentConfigHelpers-BXHQ3PXP.js} +9 -9
  169. package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
  170. package/cliAuthorityBrokerProcess-5ZFBTHLB.js +22 -0
  171. package/cliLocalAgentRecordReader-47PXMHPH.js +104 -0
  172. package/{commandRegistry-FVYPE2IN.js → commandRegistry-CTMPAQH2.js} +111 -162
  173. package/{contentThunks-GNFPG32S.js → contentThunks-CAHIIZO5.js} +38 -36
  174. package/{cooldownCommands-YB5H5BBK.js → cooldownCommands-WDOI5VD7.js} +3 -3
  175. package/{createAgentAutomationAction-PB4QIFQ4.js → createAgentAutomationAction-M25XZSPD.js} +38 -36
  176. package/{createDialogAction-EVTOPY7A.js → createDialogAction-4SN7FKI7.js} +39 -37
  177. package/{createPageAction-2UYF2IDZ.js → createPageAction-N7QPDN3M.js} +43 -41
  178. package/{db-M7FU2GNK.js → db-VR74ADGC.js} +7 -2
  179. package/{dbSlice-XRUZOGSU.js → dbSlice-RWPSVHBC.js} +12 -11
  180. package/{deleteFile-6URDHYRB.js → deleteFile-ECU6FU5C.js} +15 -7
  181. package/{dialogCommands-6SZD4TYP.js → dialogCommands-BBHWCKDP.js} +69 -53
  182. package/dialogMessageRecord-OAV77LT7.js +7 -0
  183. package/{dialogNotifyCommand-SHGPCU22.js → dialogNotifyCommand-IASQGEMW.js} +11 -11
  184. package/{dialogSlice-5EQ2A6LY.js → dialogSlice-JI3J22RV.js} +39 -37
  185. package/dialogTraceCommand-EW2KK6A4.js +961 -0
  186. package/dialogUsageCommand-WJ3U6KZU.js +27 -0
  187. package/{docCreateCommands-25E6PGN3.js → docCreateCommands-QSX3X5U4.js} +57 -46
  188. package/{docDeleteCommands-F7ZVGEHW.js → docDeleteCommands-63JBG2HQ.js} +59 -48
  189. package/{docReadCommands-JY2E5XEN.js → docReadCommands-CQFKRQUI.js} +57 -46
  190. package/{docStore-OKKIKLT3.js → docStore-XLBKGGNM.js} +14 -13
  191. package/{docUpdateCommands-OZ4CUSIQ.js → docUpdateCommands-534LUK25.js} +57 -46
  192. package/ebookDownloaderAgentCommand-DYSKF5ZY.js +677 -0
  193. package/fetchMessages-TQEUZD7H.js +1 -1
  194. package/{getPricing-LF5C4XSI.js → getPricing-5BLZRPTM.js} +4 -4
  195. package/{handleSendMessageAction-LNT7SZND.js → handleSendMessageAction-Q2VMEVOR.js} +127 -81
  196. package/{hostCredentialCreate-XUU2CSHI.js → hostCredentialCreate-C57T7YPE.js} +127 -109
  197. package/index.js +23 -11
  198. package/{localDialogRead-CCOCVGAP.js → localDialogRead-BJJT3TF5.js} +1 -1
  199. package/{localRuntimeAdapter-IBSTMSX7.js → localRuntimeAdapter-OALZPFZU.js} +134 -115
  200. package/localRuntimeAuthority-UF2DAQ3F.js +28 -0
  201. package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-ZJFGNHML.js} +1 -1
  202. package/{machineCommands-HSQHDHOT.js → machineCommands-N6IVWRZT.js} +262 -325
  203. package/machineWsRunDispatch-PDWYB33B.js +209 -0
  204. package/markdownToSlate-PXYAIBVL.js +8 -0
  205. package/mcpLocalAuthorizeCommand-KYI4EGF5.js +110 -0
  206. package/{memberThunks-7Y3OYSJQ.js → memberThunks-43B7UYC5.js} +21 -16
  207. package/{models-H5NNZRLH.js → models-ZX2BYIMB.js} +2 -2
  208. package/{overlay-BBQZXGYI.js → overlay-JA3SPVUS.js} +5 -3
  209. package/package.json +2 -1
  210. package/{projectArchive-FQO654Z3.js → projectArchive-TJNW5DLM.js} +46 -44
  211. package/{providerPresetApply-WHAMP2D5.js → providerPresetApply-NTJUINI6.js} +36 -17
  212. package/{providerRegistry-ZI2KORJ7.js → providerRegistry-W45SLUV6.js} +6 -6
  213. package/{read-TYMBGEXO.js → read-KG6INYUT.js} +13 -7
  214. package/{readDocTool-SKQVHBLO.js → readDocTool-N3GA52JR.js} +1 -1
  215. package/{readlineWorkspace-7U272DSA.js → readlineWorkspace-PJZJVGA5.js} +7486 -4492
  216. package/rememberExplicit-CPAPONSI.js +15 -0
  217. package/{removeDialogAgentAction-F5QE2O2B.js → removeDialogAgentAction-EEVSOQOJ.js} +18 -17
  218. package/{runAgentClientLoop-AF4JQIJ7.js → runAgentClientLoop-3VC5TCDW.js} +107 -76
  219. package/{runtimeDoctorCommands-RRKPBGVO.js → runtimeDoctorCommands-V3M3JTUV.js} +14 -11
  220. package/{secretCommands-KZWBZIYS.js → secretCommands-KVVZS7A6.js} +3 -3
  221. package/{setDialogExtraReferencesAction-72L27ERM.js → setDialogExtraReferencesAction-DNO5POHA.js} +15 -14
  222. package/{setPrimaryDialogAgentAction-GJJDUSGJ.js → setPrimaryDialogAgentAction-QABBEO4C.js} +18 -17
  223. package/{settingThunks-ZRGWVGZD.js → settingThunks-DVKG4X4S.js} +181 -66
  224. package/{skillDiscovery-BHHPCUHZ.js → skillDiscovery-ZMJH36AK.js} +4 -3
  225. package/{spaceCommands-5VNWMDBE.js → spaceCommands-AGGZXPY3.js} +235 -87
  226. package/{streamAgentChatTurn-YSPEFY4K.js → streamAgentChatTurn-4GTLL2OF.js} +242 -169
  227. package/{switchDialogAgentAction-IIJBPND3.js → switchDialogAgentAction-KYWJSGOO.js} +16 -15
  228. package/{tableCommands-FTAOCBTX.js → tableCommands-EFA754RE.js} +7 -4
  229. package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
  230. package/{tools-M35PTIFB.js → tools-5AGPOPLW.js} +69 -65
  231. package/{tuiRestart-2IL37YIB.js → tuiRestart-77E7PL4R.js} +11 -10
  232. package/{tuiSummaryLlmCaller-W2QN4VAC.js → tuiSummaryLlmCaller-HROLGN4F.js} +16 -15
  233. package/{updateCommands-CPATDG6J.js → updateCommands-GJGRS6JK.js} +3 -3
  234. package/{updateDialogTitleAction-IMIRJRQQ.js → updateDialogTitleAction-5OSEDGRK.js} +40 -38
  235. package/{usageCommand-2BF74MKF.js → usageCommand-WI6SQOPB.js} +2 -2
  236. package/{usageRebuildCommand-UHB55BQM.js → usageRebuildCommand-WQRLLZAT.js} +3 -3
  237. package/webapi-QVV65DQF.js +2487 -0
  238. package/{windowsSelfUpdate-ZFD6J5HF.js → windowsSelfUpdate-C7LGVWYX.js} +2 -2
  239. package/workContext-Y3ADAPZU.js +14 -0
  240. package/workContextAccess-VU5I4LKZ.js +11 -0
  241. package/workContextWriteNotice-YCSSMHN4.js +7 -0
  242. package/{workloadLifecycle-HFJIN5IZ.js → workloadLifecycle-P2SJVV3S.js} +2 -2
  243. package/agentRecordCommands-IZYUVHME.js +0 -177
  244. package/agentRunCommand-QM7ETUTX.js +0 -209
  245. package/chunk-2YGBI2XB.js +0 -30
  246. package/chunk-5ZMIIR23.js +0 -265
  247. package/chunk-5ZUOVCKT.js +0 -32
  248. package/chunk-62HXNQVV.js +0 -134
  249. package/chunk-FJSNBZXR.js +0 -142
  250. package/chunk-FPBJM2BW.js +0 -689
  251. package/chunk-JQZRSXS5.js +0 -90
  252. package/chunk-P2ZLUIW2.js +0 -795
  253. package/chunk-PPJYZRSQ.js +0 -160
  254. package/chunk-TUSTONB3.js +0 -81
  255. package/chunk-ZXF6D3I6.js +0 -359
  256. package/cliLocalAgentRecordReader-H3HYQRRR.js +0 -91
  257. package/lib-OT5OTXRU.js +0 -21046
  258. package/localRuntimeAuthority-IBJAT62G.js +0 -16
  259. package/machineWsRunDispatch-L6H7J66T.js +0 -192
  260. package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
@@ -1,20 +1,17 @@
1
+ import {
2
+ deleteDialog,
3
+ runtime_default,
4
+ toast
5
+ } from "./chunk-EVHTYVD2.js";
1
6
  import {
2
7
  getAllMemberSpaces,
3
8
  getCurrentSpaceId,
4
9
  getCurrentSpaceIdRaw,
5
10
  updateCurrentSpaceIfMatch
6
- } from "./chunk-547ENH5T.js";
7
- import {
8
- deleteDialog,
9
- runtime_default,
10
- toast
11
- } from "./chunk-7BCG67EI.js";
11
+ } from "./chunk-YN23INFZ.js";
12
12
  import {
13
13
  require_formatISO
14
14
  } from "./chunk-UVLYNWIE.js";
15
- import {
16
- require_react
17
- } from "./chunk-5FUN7EG4.js";
18
15
  import {
19
16
  UNCATEGORIZED_ID,
20
17
  addContentAction,
@@ -26,7 +23,7 @@ import {
26
23
  patchIndividualContentRecord,
27
24
  readContentRecordForSpaceSync,
28
25
  syncContentRecordSpaceId
29
- } from "./chunk-DEA37IUY.js";
26
+ } from "./chunk-46FETNLF.js";
30
27
  import {
31
28
  createSpaceKey,
32
29
  normalizeSpaceId
@@ -39,10 +36,13 @@ import {
39
36
  uploadFileAction,
40
37
  upsertSSREntity,
41
38
  write
42
- } from "./chunk-CMMI3DAT.js";
39
+ } from "./chunk-ADYWV732.js";
43
40
  import {
44
41
  resolveFileCategory
45
42
  } from "./chunk-3PVYUPXK.js";
43
+ import {
44
+ require_react
45
+ } from "./chunk-RD3QLZQV.js";
46
46
  import {
47
47
  DEVICE_LOCAL_OWNER_ID,
48
48
  getRuntimeServerContext,
@@ -50,22 +50,19 @@ import {
50
50
  resolveReplicationServers,
51
51
  scheduleDeleteReplication,
52
52
  scheduleWriteReplication
53
- } from "./chunk-R6Z5S5GA.js";
53
+ } from "./chunk-HPDLPEUG.js";
54
54
  import {
55
55
  createAsyncThunk
56
- } from "./chunk-7Z6EW7AH.js";
56
+ } from "./chunk-ZTHAJU3O.js";
57
57
  import {
58
58
  getIsDesktopApp
59
- } from "./chunk-4N6G2CKP.js";
60
- import {
61
- selectIdentityUserId
62
- } from "./chunk-PXYBUFDB.js";
59
+ } from "./chunk-HDKMVYNJ.js";
63
60
  import {
64
61
  createClientLogger
65
62
  } from "./chunk-QQ56R7KS.js";
66
63
  import {
67
- buildTombstoneRecord
68
- } from "./chunk-BV3FLP2L.js";
64
+ selectIdentityUserId
65
+ } from "./chunk-PXYBUFDB.js";
69
66
  import {
70
67
  asRecordOrEmpty
71
68
  } from "./chunk-KX6YBIHG.js";
@@ -73,11 +70,11 @@ import {
73
70
  isAbortError
74
71
  } from "./chunk-7DPNBQSV.js";
75
72
  import {
76
- isSystemAdmin
77
- } from "./chunk-EVGU5P4U.js";
73
+ buildTombstoneRecord
74
+ } from "./chunk-BV3FLP2L.js";
78
75
  import {
79
- extractUserId
80
- } from "./chunk-M2EJHDJP.js";
76
+ isSystemAdmin
77
+ } from "./chunk-5P3PPQVP.js";
81
78
  import {
82
79
  SEPARATOR,
83
80
  createKey,
@@ -91,6 +88,9 @@ import {
91
88
  import {
92
89
  ulid
93
90
  } from "./chunk-OJKUU3LP.js";
91
+ import {
92
+ extractUserId
93
+ } from "./chunk-M2EJHDJP.js";
94
94
  import {
95
95
  asTrimmedNonEmptyStringArray
96
96
  } from "./chunk-I42VC5KR.js";
@@ -100,12 +100,12 @@ import {
100
100
  import {
101
101
  asTrimmedString
102
102
  } from "./chunk-3EUW3WEO.js";
103
- import {
104
- isRecord
105
- } from "./chunk-KUG52IAP.js";
106
103
  import {
107
104
  asOptionalFiniteNumber
108
105
  } from "./chunk-WWC7I6TA.js";
106
+ import {
107
+ isRecord
108
+ } from "./chunk-KUG52IAP.js";
109
109
  import {
110
110
  asOptionalTrimmedString
111
111
  } from "./chunk-G3SUCT4W.js";
@@ -1513,11 +1513,11 @@ var ENTITY_DELETE_STRATEGIES = {
1513
1513
  await dispatch(deleteTable({ dbKey: key })).unwrap();
1514
1514
  },
1515
1515
  file: async (key, { thunkAPI }) => {
1516
- const { deleteFileAction } = await import("./deleteFile-6URDHYRB.js");
1516
+ const { deleteFileAction } = await import("./deleteFile-ECU6FU5C.js");
1517
1517
  await deleteFileAction(key, thunkAPI);
1518
1518
  },
1519
1519
  image: async (key, { thunkAPI }) => {
1520
- const { deleteFileAction } = await import("./deleteFile-6URDHYRB.js");
1520
+ const { deleteFileAction } = await import("./deleteFile-ECU6FU5C.js");
1521
1521
  await deleteFileAction(key, thunkAPI);
1522
1522
  },
1523
1523
  agent: async (key, { dispatch, userId, sourceServerOrigin }) => {
@@ -2439,7 +2439,11 @@ var uploadOnce = async (payload, thunkAPI, userId) => {
2439
2439
  fileName: file.name
2440
2440
  });
2441
2441
  const fileMetadata = await uploadFileAction(
2442
- { file, customKey: dbKey, userId },
2442
+ // 这是「上传为 Space 资产」,不是「把个人文件收录进 Space」:
2443
+ // 明确声明 Space 归属,服务端校验成员身份后落库
2444
+ // `ownerType:"space"` + `ownerId:<spaceId>`,其他成员据此可读原件。
2445
+ // 声明只是请求,服务端(uploadOwnership.ts)才是归属权威。
2446
+ { file, customKey: dbKey, userId, ownerType: "space", spaceId },
2443
2447
  thunkAPI
2444
2448
  );
2445
2449
  if (!fileMetadata) {
@@ -2476,7 +2480,6 @@ var uploadOnce = async (payload, thunkAPI, userId) => {
2476
2480
  title,
2477
2481
  spaceId,
2478
2482
  fileCategory,
2479
- mimeType: file.type || void 0,
2480
2483
  fileSize,
2481
2484
  originalName: file.name
2482
2485
  }
@@ -0,0 +1,29 @@
1
+ // packages/ai/memory/vnext/workContextWriteNotice.ts
2
+ var text = (value) => typeof value === "string" && value.trim() ? value.trim() : "\u672A\u77E5";
3
+ var revision = (value) => typeof value === "number" && Number.isFinite(value) ? String(value) : "\u672A\u77E5";
4
+ function formatWorkContextWriteNotice(result, options) {
5
+ const activityId = text(result?.activityId);
6
+ const rev = revision(result?.revision);
7
+ const outcome = result?.outcome;
8
+ const storage = options?.storage;
9
+ const storageArg = storage ? `, storage="${storage}"` : "";
10
+ if (outcome === "created" || outcome === "updated") {
11
+ const verb = outcome === "created" ? "\u65B0\u5EFA" : "\u66F4\u65B0";
12
+ return `\u5DF2\u5199\u5165\u5DE5\u4F5C\u8BB0\u5FC6\uFF08${verb}\uFF09\uFF1AactivityId=${activityId}\uFF0Crevision ${rev}\u3002`;
13
+ }
14
+ if (outcome === "unchanged") {
15
+ return `\u5DE5\u4F5C\u8BB0\u5FC6\u5185\u5BB9\u4E0E\u5DF2\u6709\u7248\u672C\u5B8C\u5168\u4E00\u81F4\uFF0C\u672A\u4EA7\u751F\u65B0\u7248\u672C\uFF1AactivityId=${activityId}\uFF0Crevision \u4ECD\u4E3A ${rev}\u3002`;
16
+ }
17
+ if (outcome === "conflict") {
18
+ return [
19
+ `\u672A\u5199\u5165\u5DE5\u4F5C\u8BB0\u5FC6\uFF1A\u672C\u6B21\u4FEE\u6539\u88AB\u62D2\u7EDD\uFF08outcome=conflict\uFF09\uFF0CactivityId=${activityId}\uFF0C\u5F53\u524D revision=${rev}\u3002`,
20
+ "\u5E38\u89C1\u539F\u56E0\uFF1AexpectedRevision \u5DF2\u8FC7\u671F\uFF08\u522B\u4EBA\u5148\u5199\u4E86\uFF09\uFF1B\u6539\u4E86\u5185\u5BB9\u5374\u590D\u7528\u4E86\u65E7 changeId\uFF1B\u6216\u8BE5 activityId \u5C5E\u4E8E\u522B\u7684\u7A7A\u95F4\u3002",
21
+ `\u4E0B\u4E00\u6B65\uFF1A\u8C03\u7528 queryMemory\uFF08mode="work", activityId="${activityId}"${storageArg}\uFF09\u8BFB\u53D6\u6700\u65B0 revision \u4E0E\u5185\u5BB9\uFF0C\u518D\u7528\u8BE5 revision \u4F5C\u4E3A expectedRevision\u3001\u5E76\u6362\u4E00\u4E2A\u65B0\u7684 changeId \u91CD\u5199${storage ? `\uFF08\u91CD\u5199\u65F6\u540C\u6837\u5E26\u4E0A storage="${storage}"\uFF09` : ""}\uFF1B\u82E5\u8FD9\u6761\u4E0D\u8BE5\u6539\uFF0C\u6539\u7528\u65B0\u7684 itemKey \u53E6\u5EFA\u4E00\u6761\u3002`
22
+ ].join("\n");
23
+ }
24
+ return `\u672A\u786E\u8BA4\u5DE5\u4F5C\u8BB0\u5FC6\u662F\u5426\u5199\u5165\uFF1A\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684 outcome=${text(outcome)}\uFF0CactivityId=${activityId}\u3002\u4E0B\u4E00\u6B65\uFF1A\u8C03\u7528 queryMemory\uFF08mode="work", activityId="${activityId}"${storageArg}\uFF09\u786E\u8BA4\u5F53\u524D revision \u540E\u518D\u51B3\u5B9A\u662F\u5426\u91CD\u5199\u3002`;
25
+ }
26
+
27
+ export {
28
+ formatWorkContextWriteNotice
29
+ };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getRuntimeServerContext,
3
3
  scheduleDeleteReplication
4
- } from "./chunk-R6Z5S5GA.js";
4
+ } from "./chunk-HPDLPEUG.js";
5
5
  import {
6
6
  fetchFromClientDb
7
- } from "./chunk-4N6G2CKP.js";
7
+ } from "./chunk-HDKMVYNJ.js";
8
8
  import {
9
9
  selectIdentityToken
10
10
  } from "./chunk-PXYBUFDB.js";
@@ -2,15 +2,18 @@ import {
2
2
  getCurrentSpaceIdRaw,
3
3
  setCurrentSpaceBoth,
4
4
  setSpaceInitialized
5
- } from "./chunk-547ENH5T.js";
5
+ } from "./chunk-YN23INFZ.js";
6
6
  import {
7
7
  createSpaceKey,
8
8
  normalizeSpaceId
9
9
  } from "./chunk-UAD2WT54.js";
10
10
  import {
11
11
  fetchFromServer,
12
- getAllServers
13
- } from "./chunk-4N6G2CKP.js";
12
+ getAllServers,
13
+ googleSessionRequestToken,
14
+ isGoogleAuthoritySession,
15
+ scopeGoogleSessionServers
16
+ } from "./chunk-HDKMVYNJ.js";
14
17
  import {
15
18
  selectIdentityToken,
16
19
  selectIdentityUserId
@@ -23,7 +26,7 @@ import {
23
26
  var resolveSpaceRemoteServers = (state) => {
24
27
  const currentServer = typeof state?.settings?.currentServer === "string" ? state.settings.currentServer : void 0;
25
28
  const syncServers = Array.isArray(state?.settings?.syncServers) ? state.settings.syncServers : void 0;
26
- return getAllServers(currentServer, syncServers);
29
+ return scopeGoogleSessionServers(selectIdentityToken(state), currentServer, getAllServers(currentServer, syncServers));
27
30
  };
28
31
  var selectSpaceRemoteAuth = (state) => ({
29
32
  token: selectIdentityToken(state) ?? null,
@@ -38,18 +41,36 @@ var spaceListsUser = (spaceData, userId) => {
38
41
  var membershipBelongsToUser = (membership, userId) => !membership.userId || membership.userId === userId;
39
42
  var membershipFetchCache = /* @__PURE__ */ new Map();
40
43
  var MEMBERSHIP_FETCH_CACHE_TTL_MS = 3e4;
44
+ var resolveDesktopShellRuntime = () => {
45
+ if (typeof window === "undefined") return { isEmbeddedRuntime: false };
46
+ const shellWindow = window;
47
+ return {
48
+ isEmbeddedRuntime: shellWindow.__NOLO_EMBEDDED_RUNTIME__ === true,
49
+ runtimeOrigin: shellWindow.location?.origin
50
+ };
51
+ };
52
+ var isEmbeddedRuntimeServer = (server, runtime = resolveDesktopShellRuntime()) => {
53
+ if (!runtime.isEmbeddedRuntime || !runtime.runtimeOrigin) return false;
54
+ try {
55
+ return new URL(server).origin === runtime.runtimeOrigin;
56
+ } catch {
57
+ return false;
58
+ }
59
+ };
41
60
  async function fetchMembershipsFromServer(server, token, userId, timeoutMs) {
42
61
  if (!token) return { ok: false, memberships: [] };
62
+ googleSessionRequestToken(token, server);
43
63
  const controller = new AbortController();
44
64
  const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
45
65
  try {
46
66
  const response = await fetch(`${server}/rpc/getUserSpaceMemberships`, {
47
67
  method: "POST",
68
+ ...isGoogleAuthoritySession(token) ? { redirect: "error", credentials: "omit" } : {},
48
69
  headers: {
49
70
  Authorization: `Bearer ${token}`,
50
71
  "Content-Type": "application/json"
51
72
  },
52
- body: JSON.stringify({ userId }),
73
+ body: JSON.stringify({ userId, pureRead: true }),
53
74
  signal: controller.signal
54
75
  });
55
76
  clearTimeout(timeoutId);
@@ -72,6 +93,9 @@ async function fetchMembershipsFromServer(server, token, userId, timeoutMs) {
72
93
  }
73
94
  }
74
95
  var fetchRemoteUserSpaceMemberships = (server, token, userId, timeoutMs = 5e3) => {
96
+ if (isEmbeddedRuntimeServer(server)) {
97
+ return Promise.resolve({ ok: false, memberships: [] });
98
+ }
75
99
  const cacheKey = `${server}|${userId}`;
76
100
  const cached = membershipFetchCache.get(cacheKey);
77
101
  if (cached) return cached;
@@ -0,0 +1,136 @@
1
+ // packages/cli/client/cliExitSync.ts
2
+ import { AsyncLocalStorage } from "node:async_hooks";
3
+ var scopes = new AsyncLocalStorage();
4
+ var KNOWN_SYNC_FAILURE_CODES = /* @__PURE__ */ new Set([
5
+ "owner_mismatch",
6
+ "owner_origin_mismatch",
7
+ "owner_grant_revoked",
8
+ "owner_oauth_unavailable",
9
+ "invalid_grant",
10
+ "auth_no_token",
11
+ "token_expired",
12
+ "user_batch_authority_controlled",
13
+ "tombstone_conflict"
14
+ ]);
15
+ var SYNC_FAILURE_CODE_RE = /"(?:code|error|reason)"\s*:\s*"([A-Za-z0-9_.:-]{1,48})"/;
16
+ function classifyDialogSyncFailure(error) {
17
+ if (error instanceof Error && error.name === "AbortError") return "aborted";
18
+ if (error instanceof Error && error.name === "TimeoutError") return "timeout";
19
+ const match = error instanceof Error ? /^remote dialog evidence write failed: HTTP (\d{3})\b([\s\S]*)$/.exec(error.message) : null;
20
+ if (!match) return "transport_or_sync";
21
+ const candidate = SYNC_FAILURE_CODE_RE.exec(match[2] ?? "")?.[1]?.toLowerCase();
22
+ const code = candidate && KNOWN_SYNC_FAILURE_CODES.has(candidate) ? candidate : void 0;
23
+ return code ? `http_${match[1]}(${code})` : `http_${match[1]}`;
24
+ }
25
+ function startOwnedDialogSync(fetchImpl, start) {
26
+ const scope = scopes.getStore();
27
+ if (!scope) return start(fetchImpl);
28
+ if (scope.closed) return Promise.reject(new Error("dialog_sync_scope_closed"));
29
+ const entry = { watermark: scope.entries.length + 1, httpOkRecords: 0, controller: new AbortController(), state: "pending", done: Promise.resolve() };
30
+ scope.entries.push(entry);
31
+ const trackedFetch = async (url, init) => {
32
+ entry.controller.signal.throwIfAborted();
33
+ const signal = init?.signal ? AbortSignal.any([init.signal, entry.controller.signal]) : entry.controller.signal;
34
+ const response = await fetchImpl(url, { ...init, signal });
35
+ signal.throwIfAborted();
36
+ if (response.ok && String(url).includes("/api/v1/db/write/")) entry.httpOkRecords++;
37
+ return response;
38
+ };
39
+ entry.done = Promise.resolve().then(() => start(trackedFetch)).then((result) => {
40
+ if (entry.state === "pending") entry.state = "completed";
41
+ return result;
42
+ }, (error) => {
43
+ if (entry.state === "pending") {
44
+ entry.state = "failed";
45
+ entry.failureClass = classifyDialogSyncFailure(error);
46
+ }
47
+ throw error;
48
+ });
49
+ void entry.done.catch(() => {
50
+ });
51
+ return entry.done;
52
+ }
53
+ function drain(scope, unsafeRunner = false) {
54
+ if (scope.drain) return scope.drain;
55
+ scope.closed = true;
56
+ scope.drain = (async () => {
57
+ const entries = scope.entries.slice();
58
+ let timer;
59
+ const abortPending = (classification) => {
60
+ for (const entry of entries) if (entry.state === "pending") {
61
+ entry.state = "timeout";
62
+ entry.failureClass = classification;
63
+ entry.controller.abort(new Error("dialog_sync_drain_stopped"));
64
+ }
65
+ };
66
+ try {
67
+ if (unsafeRunner) abortPending("runner_not_stopped");
68
+ else if (entries.length) await Promise.race([
69
+ Promise.allSettled(entries.map((entry) => entry.done)),
70
+ new Promise((resolve) => {
71
+ timer = setTimeout(() => {
72
+ abortPending("timeout");
73
+ resolve();
74
+ }, scope.timeoutMs);
75
+ })
76
+ ]);
77
+ } finally {
78
+ if (timer) clearTimeout(timer);
79
+ }
80
+ const failed = entries.filter((entry) => entry.state !== "completed");
81
+ for (const entry of failed) scope.output.write(`[nolo] dialog_sync ${entry.state}: watermark=${entry.watermark} httpOkRecords=${entry.httpOkRecords} class=${entry.failureClass ?? entry.state}; local history retained; remote sync incomplete.
82
+ `);
83
+ return failed.length === 0;
84
+ })();
85
+ return scope.drain;
86
+ }
87
+ function exitCliFromWatchdog(code, exit, stopRunner) {
88
+ const scope = scopes.getStore();
89
+ if (!scope) {
90
+ exit(code);
91
+ return Promise.resolve();
92
+ }
93
+ if (scope.watchdogExit) return scope.watchdogExit;
94
+ scope.closed = true;
95
+ scope.watchdogExit = (async () => {
96
+ let stopped = false;
97
+ try {
98
+ stopped = await stopRunner();
99
+ } catch {
100
+ }
101
+ if (!stopped) scope.output.write("[nolo] dialog_sync failed: class=runner_not_stopped; cancelling pending sync before hard exit.\n");
102
+ const complete = await drain(scope, !stopped);
103
+ exit(code === 0 || !complete ? 1 : code);
104
+ })();
105
+ return scope.watchdogExit;
106
+ }
107
+ async function runCliCommandWithSyncDrain(command, options) {
108
+ const timeoutMs = Number.isFinite(options.timeoutMs) && (options.timeoutMs ?? 0) > 0 ? options.timeoutMs : 15e3;
109
+ await scopes.run({ entries: [], closed: false, output: options.output, timeoutMs }, async () => {
110
+ const scope = scopes.getStore();
111
+ let code = 70;
112
+ let commandError;
113
+ let commandThrew = false;
114
+ try {
115
+ code = await command();
116
+ } catch (error) {
117
+ commandThrew = true;
118
+ commandError = error;
119
+ }
120
+ if (scope.watchdogExit) {
121
+ await scope.watchdogExit;
122
+ if (commandThrew) throw commandError;
123
+ return;
124
+ }
125
+ const complete = await drain(scope);
126
+ if (commandThrew) throw commandError;
127
+ await options.exit(code === 0 && !complete ? 1 : code);
128
+ });
129
+ }
130
+
131
+ export {
132
+ classifyDialogSyncFailure,
133
+ startOwnedDialogSync,
134
+ exitCliFromWatchdog,
135
+ runCliCommandWithSyncDrain
136
+ };
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-EGHP7KOY.js";
4
+ } from "./chunk-QONAOHVW.js";
5
5
  import {
6
6
  updateTokensAction
7
- } from "./chunk-7BCG67EI.js";
7
+ } from "./chunk-EVHTYVD2.js";
8
8
  import {
9
9
  applyUpdateTokensFulfilled
10
- } from "./chunk-S2NTVGA2.js";
10
+ } from "./chunk-U35UUM5K.js";
11
11
  import {
12
12
  extractReasoningFromResponseOutput,
13
13
  extractTextFromResponseOutput,
14
14
  extractToolCallsFromResponseOutput
15
- } from "./chunk-EEOOBRA7.js";
15
+ } from "./chunk-FXEPZKNJ.js";
16
16
  import {
17
17
  isRecord
18
18
  } from "./chunk-KUG52IAP.js";
@@ -1,30 +1,23 @@
1
- import {
2
- resolveObservedSpeed
3
- } from "./chunk-AMWMV56B.js";
4
1
  import {
5
2
  ALL_MODELS
6
3
  } from "./chunk-TZXPT53C.js";
4
+ import {
5
+ resolveObservedSpeed
6
+ } from "./chunk-AMWMV56B.js";
7
7
  import {
8
8
  normalizeTimingMs
9
9
  } from "./chunk-H57T64RA.js";
10
- import {
11
- extractCustomId
12
- } from "./chunk-M2EJHDJP.js";
13
10
  import {
14
11
  parseDialogKey
15
12
  } from "./chunk-OJKUU3LP.js";
16
- import "./chunk-YZMNK53S.js";
13
+ import {
14
+ extractCustomId
15
+ } from "./chunk-M2EJHDJP.js";
17
16
  import {
18
17
  parseUserIdFromAuthToken,
19
18
  resolveAuthToken,
20
19
  resolveServerUrl
21
20
  } from "./chunk-BIDSIRTS.js";
22
- import "./chunk-OLZBQWZU.js";
23
- import "./chunk-LCBAMY2M.js";
24
- import "./chunk-G3SUCT4W.js";
25
- import "./chunk-4SN6J65J.js";
26
- import "./chunk-CF7PE763.js";
27
- import "./chunk-U67V476Y.js";
28
21
 
29
22
  // packages/cli/dialogUsageCommand.ts
30
23
  import { readFileSync } from "node:fs";
@@ -134,9 +127,9 @@ function readLiveBrokerEndpoint(metadataPath) {
134
127
  }
135
128
  async function openLocalTokenScanClient(env) {
136
129
  const [{ getDefaultCliLocalRuntimeAuthority }, driver, broker] = await Promise.all([
137
- import("./localRuntimeAuthority-IBJAT62G.js"),
130
+ import("./localRuntimeAuthority-UF2DAQ3F.js"),
138
131
  import("./cliAuthorityStoreDriver-6FE3BJNB.js"),
139
- import("./cliAuthorityBrokerClient-XHH7MH2P.js")
132
+ import("./cliAuthorityBrokerClient-TFNXJLXL.js")
140
133
  ]);
141
134
  await getDefaultCliLocalRuntimeAuthority({ env });
142
135
  const metadataPath = driver.resolveCliAuthorityBrokerMetadataPath({ transport: "tcp", env });
@@ -246,7 +239,21 @@ async function runDialogUsageCommand(args, deps = {}) {
246
239
  return 1;
247
240
  }
248
241
  const dialogId = dialogKey.startsWith("dialog-") ? extractCustomId(dialogKey) : dialogKey;
249
- const api = { server: resolveServerUrl(args, env), token };
242
+ const collected = await collectDialogUsageRecords(args, deps, { dialogKey, dialogId });
243
+ collected.records.sort((a, b) => b.createdAt - a.createdAt);
244
+ output.write(formatDialogUsage(collected.dialogKey, collected.records, collected.source));
245
+ return 0;
246
+ }
247
+ async function collectDialogUsageRecords(args, deps, target, serverBase) {
248
+ const env = deps.env ?? process.env;
249
+ const token = resolveAuthToken(args, env);
250
+ if (!token) throw new Error("dialog usage requires login. Run `nolo login`.");
251
+ const { dialogKey, dialogId } = target;
252
+ const resolvedServerBase = serverBase?.trim();
253
+ const api = {
254
+ server: resolvedServerBase || resolveServerUrl(args, env),
255
+ token
256
+ };
250
257
  const fetchPage = deps.fetchPage ?? fetchUsageRecordsPage;
251
258
  const records = [];
252
259
  const endTime = Date.now();
@@ -288,13 +295,13 @@ async function runDialogUsageCommand(args, deps = {}) {
288
295
  }
289
296
  }
290
297
  if (records.length === 0 && remoteError) throw remoteError;
291
- records.sort((a, b) => b.createdAt - a.createdAt);
292
- output.write(formatDialogUsage(dialogKey, records, source));
293
- return 0;
298
+ return { dialogKey, dialogId, records, source };
294
299
  }
300
+
295
301
  export {
296
302
  formatDialogUsage,
297
303
  openLocalTokenScanClient,
298
304
  readLocalDialogTokenRecords,
299
- runDialogUsageCommand
305
+ runDialogUsageCommand,
306
+ collectDialogUsageRecords
300
307
  };