nolo-cli 0.259.0-alpha.1 → 0.261.0-alpha.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 (320) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-MTM4BJK3.js → _executeModel-PODMRXJJ.js} +97 -83
  3. package/accountResolver-NGICIMEE.js +1 -1
  4. package/{action-C6IQAKN4.js → action-NJTYNXXR.js} +12 -10
  5. package/{addContentAction-53364YDW.js → addContentAction-RUPXLROG.js} +14 -13
  6. package/{addDialogAgentAction-U5DD5EN5.js → addDialogAgentAction-57EJ2UBC.js} +20 -24
  7. package/{agentDeleteCommand-53NN3VSK.js → agentDeleteCommand-DRFCOTYP.js} +185 -147
  8. package/{agentEmailCommands-KOGGIT6I.js → agentEmailCommands-FHENHUBF.js} +143 -127
  9. package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-BMVKNYIY.js} +9 -6
  10. package/{agentListCommands-62UYUQDI.js → agentListCommands-W66W5K3V.js} +88 -69
  11. package/{agentMachineCommands-W6TNJXEA.js → agentMachineCommands-C3BUBCXU.js} +69 -60
  12. package/{agentProviderCommands-QLTABYR7.js → agentProviderCommands-VIWKP7DM.js} +11 -8
  13. package/{agentPullCommand-2EYJ5ENC.js → agentPullCommand-5SNSXOY7.js} +10 -7
  14. package/agentRecordCommands-DYMHWTID.js +210 -0
  15. package/agentRun-QVFG3CI4.js +250 -0
  16. package/agentRunCommand-YV4V5HSL.js +248 -0
  17. package/{agentRunControl-LXMADX3N.js → agentRunControl-RGBHKPKJ.js} +19 -12
  18. package/{agentRuntimeLocal-YGNJMQW3.js → agentRuntimeLocal-LVEMOYS2.js} +62 -49
  19. package/{agentSlice-3HHYUQLM.js → agentSlice-OJCM7OUX.js} +15 -18
  20. package/appConfigCommands-ZUXQLE7L.js +417 -0
  21. package/{appDeleteCommands-5COJ6CSG.js → appDeleteCommands-L5UKUMXY.js} +68 -58
  22. package/{appDeployCommands-3JPAT3XO.js → appDeployCommands-KX2BRQUW.js} +74 -59
  23. package/{appDeployStatusCommands-RHZKF3G4.js → appDeployStatusCommands-7LHRSWW7.js} +68 -58
  24. package/{appGetCommands-73DXOAQW.js → appGetCommands-F7SDFCUK.js} +74 -58
  25. package/{appListCommands-HD5LOQ3G.js → appListCommands-U4NJKSMZ.js} +74 -58
  26. package/appMigrateCommands-JAPOLYSW.js +230 -0
  27. package/appSourceCommands-TLXPWXUH.js +279 -0
  28. package/authCommand-AU3GZBZ2.js +65 -0
  29. package/{authCommands-T5FODCEG.js → authCommands-JKBWMUQ4.js} +20 -17
  30. package/{builtinSkillRegistry-EDHD2UHU.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
  31. package/{chromeOpsCommands-3SSTDFRF.js → chromeOpsCommands-F47WYQWF.js} +68 -18
  32. package/{chunk-5YS6QHGT.js → chunk-2FGFY72B.js} +9 -9
  33. package/{chunk-MJBLXJMP.js → chunk-2I4R6ZRV.js} +12 -9
  34. package/{chunk-FXEPZKNJ.js → chunk-2MIZHEND.js} +506 -64
  35. package/{chunk-TLE77UJ5.js → chunk-2OROOEOQ.js} +0 -1
  36. package/{chunk-6RSNVJGO.js → chunk-2ZBPWX7N.js} +4 -4
  37. package/chunk-35JIFLIG.js +30 -0
  38. package/{chunk-7OVOZRZF.js → chunk-3B7OTHDW.js} +23 -379
  39. package/{chunk-DNNPARJK.js → chunk-3QMN3T6L.js} +50 -37
  40. package/{chunk-DMPZMYH4.js → chunk-3R4AYHJR.js} +13 -1
  41. package/{chunk-XNNBXUEM.js → chunk-3TII7WCF.js} +5 -5
  42. package/{chunk-223KZUJ6.js → chunk-4HZCBA4Q.js} +18 -15
  43. package/{chunk-C5A54QS7.js → chunk-4INJGWE3.js} +18 -5
  44. package/chunk-4IVMDQBA.js +261 -0
  45. package/chunk-4Y6CZ2N4.js +82 -0
  46. package/{chunk-KZ4A7EIV.js → chunk-56OAS5RZ.js} +1 -1
  47. package/{chunk-KQHEGELM.js → chunk-63G7JWEA.js} +16 -6
  48. package/{chunk-4EACJPZI.js → chunk-6BBXJGIQ.js} +51 -42
  49. package/chunk-72VWN4VK.js +51 -0
  50. package/chunk-7LR2IFUH.js +100 -0
  51. package/{chunk-S73EPYNC.js → chunk-7LS5ATRP.js} +20 -6
  52. package/{chunk-XPETQ4MR.js → chunk-7X4BFUJV.js} +24 -10
  53. package/{chunk-KHYSFS3W.js → chunk-A454UXB6.js} +148 -73
  54. package/chunk-A4O76A6V.js +432 -0
  55. package/chunk-AMNZPQCY.js +635 -0
  56. package/{chunk-4MXYCQBS.js → chunk-AQNWWJLH.js} +2 -56
  57. package/{chunk-LHCGKAFO.js → chunk-BKP325XS.js} +184 -112
  58. package/{chunk-PENRYZ4D.js → chunk-BPB3T5EU.js} +4 -7
  59. package/{chunk-U6QNVOR5.js → chunk-BUGLH2A7.js} +130 -6
  60. package/{chunk-2JHGUL5K.js → chunk-BVYHE6QD.js} +2 -2
  61. package/{chunk-KXOPLLFP.js → chunk-CA7LGAHV.js} +69 -9
  62. package/{chunk-2FZVXOFX.js → chunk-CEIWXKHP.js} +112 -200
  63. package/{chunk-Y2TCTNUD.js → chunk-CK2LMTYO.js} +4 -4
  64. package/{chunk-AIFQKNPP.js → chunk-CL33RFD7.js} +1 -1
  65. package/{chunk-57V4PADY.js → chunk-CNYPQYXT.js} +781 -449
  66. package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
  67. package/chunk-D3ONA3FP.js +762 -0
  68. package/{chunk-PIVTQRX6.js → chunk-DDKA6V6X.js} +111 -12
  69. package/chunk-DLXL4NSL.js +1179 -0
  70. package/{chunk-EJQE5HB7.js → chunk-DSBRIUX5.js} +4 -2
  71. package/{chunk-XRGBJHZX.js → chunk-E36V7MPY.js} +9 -5
  72. package/{chunk-4YPH5KRA.js → chunk-EDKMRDET.js} +1 -1
  73. package/{chunk-DBJODIZ6.js → chunk-EQOWWSNQ.js} +19 -27
  74. package/chunk-ER6NTALN.js +34 -0
  75. package/{chunk-L4XST72F.js → chunk-ERCSHBUD.js} +16027 -17392
  76. package/chunk-EUHMI5KG.js +101 -0
  77. package/{chunk-YQLAFJRQ.js → chunk-FBNVJ2TO.js} +1 -1
  78. package/{chunk-Q2EERN52.js → chunk-FF5ZRKW7.js} +12 -7
  79. package/{chunk-6XIE5ZGI.js → chunk-FGFJUFPS.js} +5 -6
  80. package/chunk-FI4DPLR7.js +902 -0
  81. package/{chunk-HDKMVYNJ.js → chunk-FNLT7NKG.js} +7 -11
  82. package/{chunk-JCQ3WCQ3.js → chunk-FOC4TORM.js} +69 -3
  83. package/chunk-FP46RAJQ.js +58 -0
  84. package/{chunk-JPXACKSW.js → chunk-G22P2J7O.js} +30 -81
  85. package/{chunk-7WHCIA5V.js → chunk-G5IAIGGD.js} +3 -8
  86. package/{chunk-FZENZCIA.js → chunk-GEC4CHS2.js} +19 -12
  87. package/chunk-GF4LYNNZ.js +25 -0
  88. package/{chunk-IYLUK67R.js → chunk-GH6SS2DZ.js} +25 -8
  89. package/chunk-HAZ6UVH4.js +368 -0
  90. package/{chunk-OKAXQFON.js → chunk-HB4J5HA6.js} +4 -4
  91. package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
  92. package/chunk-HJTI7RZV.js +94 -0
  93. package/{chunk-HQUGB2HM.js → chunk-HMFKYZKP.js} +62 -50
  94. package/{chunk-Q2MPKE4B.js → chunk-HVRG27HI.js} +76 -26
  95. package/{chunk-46FETNLF.js → chunk-IN4B6Z2D.js} +7 -6
  96. package/chunk-IV6VUVLJ.js +88 -0
  97. package/{chunk-LLUBUHNT.js → chunk-IWWJSSST.js} +5 -9
  98. package/{chunk-7BIJFGKS.js → chunk-J22PFCQN.js} +106 -52
  99. package/chunk-J42X32PV.js +472 -0
  100. package/{chunk-LCBAMY2M.js → chunk-JKVOKKMQ.js} +0 -7
  101. package/{chunk-KT7S7ANZ.js → chunk-JPYOHIHX.js} +9 -9
  102. package/{chunk-R7XWZDOH.js → chunk-JUMQJSQF.js} +1423 -282
  103. package/{chunk-KVMLM5VD.js → chunk-KAHYBAEN.js} +211 -472
  104. package/{chunk-KLMBM6P6.js → chunk-KALCFXQO.js} +2454 -1115
  105. package/chunk-KDDXC2IH.js +148 -0
  106. package/chunk-KGKTN2NX.js +25 -0
  107. package/chunk-KGWE224L.js +246 -0
  108. package/{chunk-OYUMJMC5.js → chunk-KSV6T4AH.js} +6 -1
  109. package/{chunk-P27E22MA.js → chunk-L43DGEPZ.js} +1 -1
  110. package/{chunk-5BIDJVNX.js → chunk-L45P4JTE.js} +180 -31
  111. package/chunk-LHCIIUCX.js +222 -0
  112. package/{chunk-CBIGMWMI.js → chunk-LHJB4BXJ.js} +1 -1
  113. package/{chunk-TRRXYFTR.js → chunk-LOFRSJX2.js} +1 -0
  114. package/{chunk-SQL7YNED.js → chunk-LPXBBC32.js} +71 -5
  115. package/{chunk-BIDSIRTS.js → chunk-LTCZOOAM.js} +11 -17
  116. package/chunk-LUTSMSIL.js +425 -0
  117. package/chunk-LXP53WGF.js +168 -0
  118. package/{chunk-2CT2J3O6.js → chunk-M7VNNPVX.js} +2493 -4055
  119. package/chunk-MDAYRIP7.js +1889 -0
  120. package/{chunk-6B2OBX5B.js → chunk-MMXHIHJZ.js} +15 -47
  121. package/{chunk-HPDLPEUG.js → chunk-MPWQI36J.js} +267 -234
  122. package/chunk-MRACVEPZ.js +7 -0
  123. package/{chunk-ZYPXOQS2.js → chunk-MSFKHPA6.js} +1 -1
  124. package/chunk-NHLLXINQ.js +8 -0
  125. package/{chunk-QXTEEEIN.js → chunk-NJCTPWJU.js} +8 -8
  126. package/chunk-NLS7F5DW.js +1697 -0
  127. package/{chunk-FP37ELBT.js → chunk-NTBTVKKB.js} +17 -25
  128. package/{chunk-JLZJL3WC.js → chunk-O77F26YB.js} +370 -39
  129. package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
  130. package/{chunk-YN23INFZ.js → chunk-OIOMBPCA.js} +23 -2
  131. package/{chunk-CJOOF4L5.js → chunk-OSZNERNW.js} +17 -14
  132. package/{chunk-JZO7KUF3.js → chunk-P4I55ASV.js} +313 -275
  133. package/{chunk-2C5VN7NH.js → chunk-P4XAHM4B.js} +1 -1
  134. package/chunk-PL5RKESU.js +40 -0
  135. package/chunk-Q5FJJ6XI.js +103 -0
  136. package/{chunk-WS36XPJD.js → chunk-Q5IXZF3S.js} +82 -6
  137. package/{createAgentAutomationAction-GRZ6XY7Q.js → chunk-QKM55LP2.js} +3 -160
  138. package/{chunk-WSLL7VV4.js → chunk-QXWXRBOL.js} +9 -9
  139. package/{chunk-MXA54TQM.js → chunk-QZYQ3Y3G.js} +1 -1
  140. package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
  141. package/{chunk-5RGU3J7P.js → chunk-REAE2SZK.js} +0 -1
  142. package/chunk-RF576RYE.js +117 -0
  143. package/chunk-RI7SXDJW.js +1317 -0
  144. package/{chunk-FEIVARWR.js → chunk-RIOAPUGV.js} +238 -25
  145. package/{chunk-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
  146. package/{chunk-J7JRCOIW.js → chunk-RWXHGPWJ.js} +1 -1
  147. package/{chunk-J55F3IEZ.js → chunk-SARJZIGR.js} +1 -1
  148. package/chunk-SJFL32RD.js +356 -0
  149. package/{chunk-6SOWMEAY.js → chunk-SR57FDTX.js} +2 -258
  150. package/{chunk-MPGR4ZNR.js → chunk-SRVLHMES.js} +46 -42
  151. package/{chunk-CEKRIR22.js → chunk-SU4NCTW4.js} +1 -1
  152. package/{chunk-RD3QLZQV.js → chunk-SWJRX4M5.js} +324 -2
  153. package/{chunk-R3TUHCSJ.js → chunk-T3Y2NA4H.js} +8 -3
  154. package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
  155. package/{chunk-KWNVPY6M.js → chunk-TJXO66M2.js} +8 -5
  156. package/{chunk-QIGQFON2.js → chunk-TXMFSGRY.js} +1 -1
  157. package/{chunk-ADYWV732.js → chunk-U5PSCTMR.js} +264 -177
  158. package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
  159. package/{chunk-QGFLVQ6E.js → chunk-UBOTXA3Z.js} +4 -14
  160. package/{chunk-6YX2RAQN.js → chunk-UEZL3RBG.js} +89 -164
  161. package/{chunk-NCFKHYDM.js → chunk-UJL23HBL.js} +774 -119
  162. package/chunk-ULPU4C43.js +1710 -0
  163. package/{chunk-UA3QTA2S.js → chunk-VC3MAT33.js} +4442 -2570
  164. package/{chunk-VNHZJEQN.js → chunk-VCESLFF4.js} +3 -3
  165. package/chunk-VOO3YQQP.js +17157 -0
  166. package/{chunk-Y2GWUBNS.js → chunk-VZDSNDUD.js} +279 -149
  167. package/{chunk-6BMTKYAO.js → chunk-W2Z5E2R7.js} +126 -698
  168. package/{chunk-4ZCTKB27.js → chunk-W5GKF5ZW.js} +1 -0
  169. package/chunk-WEEB2JKA.js +443 -0
  170. package/{chunk-NUHQO3RB.js → chunk-WIVVNJUS.js} +1 -1
  171. package/chunk-WMBJDXMY.js +408 -0
  172. package/chunk-WSQLCWLQ.js +201 -0
  173. package/{chunk-OOVOAG4Q.js → chunk-WY6DMHMG.js} +1 -1
  174. package/{chunk-6K32PBRY.js → chunk-XJW6SLBZ.js} +3 -3
  175. package/{chunk-MNFUKRRU.js → chunk-XKNDVHF5.js} +7 -7
  176. package/{chunk-MHKPUGPD.js → chunk-XREMPMNK.js} +20 -4
  177. package/chunk-XT6C2QZW.js +46 -0
  178. package/chunk-XUDXQT7R.js +790 -0
  179. package/{chunk-ZEZC7IIM.js → chunk-YFSM2366.js} +35 -35
  180. package/{chunk-RIWKZT7E.js → chunk-YRPIUIEQ.js} +11 -9
  181. package/{chunk-U35UUM5K.js → chunk-YVOUSIIA.js} +1 -1
  182. package/{chunk-6VEO7Z3Y.js → chunk-Z27AH6A5.js} +6 -6
  183. package/chunk-Z3KTXWWB.js +76 -0
  184. package/{chunk-UWWOWTW2.js → chunk-Z7EP5HDL.js} +1 -1
  185. package/{chunk-YFEK7ACQ.js → chunk-ZB2E724W.js} +4 -4
  186. package/{chunk-YLAHYLDQ.js → chunk-ZC3CMUKU.js} +2 -89
  187. package/{chunk-5P3PPQVP.js → chunk-ZQAADXSF.js} +1 -1
  188. package/{cliAgentConfigHelpers-BXHQ3PXP.js → cliAgentConfigHelpers-BJJEXHSZ.js} +20 -14
  189. package/{cliAuthorityBrokerClient-TFNXJLXL.js → cliAuthorityBrokerClient-3SKOA7OZ.js} +3 -1
  190. package/cliAuthorityBrokerProcess-VIJEKQSX.js +34 -0
  191. package/{cliEnvHelpers-CNMP3RDX.js → cliEnvHelpers-NDMKN4X2.js} +6 -3
  192. package/{cliExecutor-K6FDZTQ2.js → cliExecutor-Z62UBJ5S.js} +12 -6
  193. package/cliLocalAgentRecordReader-KCZS2MZU.js +113 -0
  194. package/cloudAutomationCommands-2WQUGQSW.js +310 -0
  195. package/{commandRegistry-IFYQLPGM.js → commandRegistry-C64JBZJ3.js} +288 -121
  196. package/{contentThunks-QCFCD2X3.js → contentThunks-G3HEIRXC.js} +45 -43
  197. package/{cooldownCommands-WDOI5VD7.js → cooldownCommands-FPAFS7XG.js} +1 -1
  198. package/createAgentAutomationAction-DSBL3X3A.js +172 -0
  199. package/createDialogAction-OHFUHC53.js +86 -0
  200. package/{createPageAction-QCVBMP4C.js → createPageAction-E6JZSZLU.js} +49 -45
  201. package/{db-VR74ADGC.js → db-KTQ3LL2Q.js} +3 -3
  202. package/{dbSlice-RWPSVHBC.js → dbSlice-U3GPLEL3.js} +21 -16
  203. package/deleteDbKey-DRXKWJX5.js +86 -0
  204. package/{dialogCommands-4IEQUALS.js → dialogCommands-4EX2OTIC.js} +80 -66
  205. package/{dialogMessageRecord-OAV77LT7.js → dialogMessageRecord-2HJTEXQX.js} +1 -1
  206. package/dialogNotifyCommand-4SCE2Z2R.js +44 -0
  207. package/dialogPortabilityCommands-ZSFFHRX4.js +3036 -0
  208. package/{dialogSlice-XFYID6KE.js → dialogSlice-PRZCIJCH.js} +43 -42
  209. package/{dialogTraceCommand-Y67NRFCV.js → dialogTraceCommand-RKB76OVX.js} +84 -70
  210. package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-BP7HMRYP.js} +7 -4
  211. package/{docCreateCommands-QLRIWRQE.js → docCreateCommands-JGPNGIZ7.js} +68 -59
  212. package/{docDeleteCommands-XPRYA532.js → docDeleteCommands-XRJTNRDH.js} +68 -59
  213. package/{docReadCommands-EXQI7ETH.js → docReadCommands-6GFO4ARS.js} +67 -58
  214. package/{docStore-MWFUKZL2.js → docStore-QRLIWFTU.js} +16 -17
  215. package/{docUpdateCommands-EFBFQV77.js → docUpdateCommands-W2GXMUXW.js} +68 -59
  216. package/{ebookDownloaderAgentCommand-DYSKF5ZY.js → ebookDownloaderAgentCommand-2DHPGEOQ.js} +14 -17
  217. package/{fetchMessages-TQEUZD7H.js → fetchMessages-RGPIYEPZ.js} +2 -2
  218. package/{getPricing-5BLZRPTM.js → getPricing-BK6CUBAE.js} +8 -4
  219. package/{handleSendMessageAction-GG3TR62X.js → handleSendMessageAction-DHGWURJZ.js} +265 -119
  220. package/{hostCredentialCreate-26S6DDJ5.js → hostCredentialCreate-FPUZ7RMI.js} +138 -122
  221. package/index.js +36 -22
  222. package/{keys-RWF7UCB4.js → keys-FXEGMKSG.js} +2 -2
  223. package/localAutomationCommands-ZMU22RQJ.js +198 -0
  224. package/localAutomationRuntime-MU5FGJ3V.js +60 -0
  225. package/{localDialogRead-BJJT3TF5.js → localDialogRead-W2EVXISA.js} +2 -2
  226. package/{localRuntimeAdapter-VREWZWPC.js → localRuntimeAdapter-YBXQBV4G.js} +136 -119
  227. package/localRuntimeAuthority-LDXMEDO5.js +44 -0
  228. package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-6TQZDLNU.js} +1 -1
  229. package/{machineCommands-CL5XK5UC.js → machineCommands-57RTUYRV.js} +251 -357
  230. package/{machineInfo-LWHTEBHJ.js → machineInfo-BJIU3WQ5.js} +4 -2
  231. package/machineWsRunDispatch-VBKV3FFE.js +227 -0
  232. package/{mcpLocalAuthorizeCommand-RBXJDE6J.js → mcpLocalAuthorizeCommand-J76SOJVZ.js} +40 -22
  233. package/mcpLocalManageCommands-USETIMHB.js +212 -0
  234. package/{memberThunks-43B7UYC5.js → memberThunks-7UERUEMI.js} +102 -22
  235. package/{memoryCommands-BC6REPQB.js → memoryCommands-N7NHEE55.js} +25 -34
  236. package/{models-ZX2BYIMB.js → models-TOXYINNM.js} +3 -2
  237. package/{offlineMarxistsAgentCommand-XVXUE6G5.js → offlineMarxistsAgentCommand-WZBJBCPZ.js} +16 -22
  238. package/package.json +3 -3
  239. package/parityCommands-LYDLWSLK.js +613 -0
  240. package/{projectArchive-OC63TWTD.js → projectArchive-KCNQDVWJ.js} +49 -45
  241. package/{providerPresetApply-NTJUINI6.js → providerPresetApply-IRJ56XIZ.js} +12 -16
  242. package/{providerRegistry-W45SLUV6.js → providerRegistry-26PAUYH2.js} +3 -13
  243. package/{read-KG6INYUT.js → read-SPSQ6NLR.js} +11 -10
  244. package/{readDocTool-N3GA52JR.js → readDocTool-ENUL2GNL.js} +5 -1
  245. package/{readlineWorkspace-2NO6D6IZ.js → readlineWorkspace-MKS7TAEF.js} +927 -573
  246. package/{rememberExplicit-CPAPONSI.js → rememberExplicit-7KX4HXQC.js} +4 -4
  247. package/remove-TNNDO635.js +32 -0
  248. package/{removeDialogAgentAction-EEVSOQOJ.js → removeDialogAgentAction-POPUZ3WU.js} +22 -26
  249. package/{runAgentClientLoop-U7V32UTD.js → runAgentClientLoop-KVILXQNI.js} +117 -82
  250. package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-4J2DP4LZ.js} +23 -16
  251. package/{secretCommands-KVVZS7A6.js → secretCommands-CSTQYB6T.js} +2 -2
  252. package/{setDialogExtraReferencesAction-DNO5POHA.js → setDialogExtraReferencesAction-35THMVBP.js} +16 -17
  253. package/{setPrimaryDialogAgentAction-QABBEO4C.js → setPrimaryDialogAgentAction-WLXBNIG7.js} +23 -27
  254. package/{settingThunks-DVKG4X4S.js → settingThunks-6Y5U5M5N.js} +170 -497
  255. package/{skillDiscovery-5GEGWJ6N.js → skillDiscovery-IUEZZG2B.js} +3 -3
  256. package/{spaceCommands-7QKXKBDQ.js → spaceCommands-LXNJBO2U.js} +293 -58
  257. package/spacePruneCommand-2ITUFYBM.js +233 -0
  258. package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
  259. package/{streamAgentChatTurn-UAGFOXNJ.js → streamAgentChatTurn-EY6MFKCA.js} +225 -137
  260. package/{switchDialogAgentAction-KYWJSGOO.js → switchDialogAgentAction-TG6BQRDA.js} +19 -23
  261. package/{tableCommands-EFA754RE.js → tableCommands-35G34R4B.js} +28 -49
  262. package/{toolApiClient-N5PYW2R3.js → toolApiClient-MPQIFYXP.js} +15 -4
  263. package/{tools-2Q2LBDUC.js → tools-CSLTRRUR.js} +73 -63
  264. package/{tuiRestart-4QDWLHYZ.js → tuiRestart-ALR4Q3JM.js} +20 -13
  265. package/tuiSummaryLlmCaller-3Y3JEXJK.js +52 -0
  266. package/{updateCommands-GJGRS6JK.js → updateCommands-GHQVP6Z5.js} +13 -8
  267. package/{updateDialogTitleAction-GGNTTI5L.js → updateDialogTitleAction-LFAWF5EW.js} +57 -58
  268. package/{usageCommand-WI6SQOPB.js → usageCommand-5VKW6T4C.js} +6 -8
  269. package/{usageRebuildCommand-WQRLLZAT.js → usageRebuildCommand-VUQETFMW.js} +11 -15
  270. package/{windowsSelfUpdate-C7LGVWYX.js → windowsSelfUpdate-SXSVXK4X.js} +2 -2
  271. package/workContext-ZAW6VXT7.js +18 -0
  272. package/workContextQueryProjection-CACY5VFE.js +23 -0
  273. package/{workloadLifecycle-DYX5ZMAT.js → workloadLifecycle-P2SJVV3S.js} +1 -1
  274. package/agentFavoriteCommands-7LOP3HUD.js +0 -186
  275. package/agentRecordCommands-TPE7NSZ6.js +0 -194
  276. package/agentRunCommand-DMVGBPLI.js +0 -232
  277. package/authCommand-V6EOMZX6.js +0 -79
  278. package/chunk-2MBTWINN.js +0 -89
  279. package/chunk-523DITKR.js +0 -32
  280. package/chunk-BUDVRYES.js +0 -2213
  281. package/chunk-BZMDWGQQ.js +0 -47
  282. package/chunk-GAHJLSDO.js +0 -107
  283. package/chunk-GYX6XTAI.js +0 -84
  284. package/chunk-HNUWUO75.js +0 -93
  285. package/chunk-HSBHS6KT.js +0 -33401
  286. package/chunk-KG27JIG4.js +0 -136
  287. package/chunk-OB4FBZXJ.js +0 -364
  288. package/chunk-OKH74FML.js +0 -3746
  289. package/chunk-OLZBQWZU.js +0 -6
  290. package/chunk-OOV5JN25.js +0 -1317
  291. package/chunk-OQFOE4SJ.js +0 -405
  292. package/chunk-PXYBUFDB.js +0 -53
  293. package/chunk-R3FZHW4Q.js +0 -103
  294. package/chunk-R3MV2GII.js +0 -106
  295. package/chunk-SCAC3NM5.js +0 -11751
  296. package/chunk-SR4FE5VD.js +0 -9
  297. package/chunk-SYTHYBMI.js +0 -3558
  298. package/chunk-UKZX3NHN.js +0 -48
  299. package/chunk-UVLYNWIE.js +0 -74
  300. package/chunk-VQX5JJNI.js +0 -861
  301. package/chunk-X4O7FJF5.js +0 -160
  302. package/chunk-YJPK35HB.js +0 -175
  303. package/chunk-YNIYE47Z.js +0 -105
  304. package/chunk-Z4PCXPUE.js +0 -127
  305. package/chunk-ZR5IVL4N.js +0 -862
  306. package/chunk-ZTHAJU3O.js +0 -2537
  307. package/cliAuthorityBrokerProcess-5ZFBTHLB.js +0 -22
  308. package/cliLocalAgentRecordReader-34UKRBLY.js +0 -104
  309. package/createDialogAction-ZAJERW62.js +0 -82
  310. package/deleteFile-ECU6FU5C.js +0 -55
  311. package/dialogNotifyCommand-IASQGEMW.js +0 -36
  312. package/localRuntimeAuthority-UF2DAQ3F.js +0 -28
  313. package/machineWsRunDispatch-TBVOYOAH.js +0 -209
  314. package/markdownToSlate-PXYAIBVL.js +0 -8
  315. package/tuiSummaryLlmCaller-HROLGN4F.js +0 -45
  316. package/webapi-QVV65DQF.js +0 -2487
  317. package/workContext-Y3ADAPZU.js +0 -14
  318. package/{chunk-USGHJSGO.js → chunk-GX2MFKF3.js} +3 -3
  319. package/{chunk-PHREU2KZ.js → chunk-WX266G2C.js} +0 -0
  320. package/{chunk-DXWGFL2Z.js → chunk-YY7IGJMN.js} +3 -3
@@ -0,0 +1,368 @@
1
+ import {
2
+ normalizeStats
3
+ } from "./chunk-KDDXC2IH.js";
4
+ import {
5
+ formatLocalDate
6
+ } from "./chunk-PL5RKESU.js";
7
+ import {
8
+ getDefaultCliLocalRuntimeDb
9
+ } from "./chunk-SARJZIGR.js";
10
+ import {
11
+ createTokenStatsKey
12
+ } from "./chunk-DLXL4NSL.js";
13
+
14
+ // packages/cli/usageCommand.ts
15
+ var emptyBucket = () => ({
16
+ calls: 0,
17
+ failedCalls: 0,
18
+ input: 0,
19
+ output: 0,
20
+ cacheRead: 0,
21
+ cacheCreation: 0,
22
+ cost: 0
23
+ });
24
+ var addBucket = (target, source) => {
25
+ const s = normalizeStats(source);
26
+ target.calls += s.count;
27
+ target.failedCalls += s.failedCount;
28
+ target.input += s.tokens.input;
29
+ target.output += s.tokens.output;
30
+ target.cacheRead += s.tokens.cacheRead;
31
+ target.cacheCreation += s.tokens.cacheCreation;
32
+ target.cost += s.cost;
33
+ };
34
+ var readOption = (args, flag) => {
35
+ const index = args.indexOf(flag);
36
+ if (index === -1) return void 0;
37
+ return args[index + 1];
38
+ };
39
+ var hasFlag = (args, flag) => args.includes(flag);
40
+ function parseUsageArgs(args) {
41
+ const options = {};
42
+ const daysRaw = readOption(args, "--days");
43
+ if (daysRaw !== void 0) {
44
+ const parsed = Number.parseInt(daysRaw, 10);
45
+ if (!Number.isFinite(parsed) || parsed <= 0) {
46
+ throw new Error(`--days \u5FC5\u987B\u662F\u6B63\u6574\u6570\uFF0C\u6536\u5230 ${JSON.stringify(daysRaw)}`);
47
+ }
48
+ options.days = parsed;
49
+ }
50
+ const from = readOption(args, "--from");
51
+ const to = readOption(args, "--to");
52
+ if (from !== void 0) options.from = normalizeDateArg(from, "--from");
53
+ if (to !== void 0) options.to = normalizeDateArg(to, "--to");
54
+ if (options.from && options.to && options.from > options.to) {
55
+ throw new Error(`--from (${options.from}) \u4E0D\u80FD\u665A\u4E8E --to (${options.to})`);
56
+ }
57
+ const groupRaw = readOption(args, "--by") ?? readOption(args, "--group-by");
58
+ if (groupRaw !== void 0) {
59
+ const normalized = groupRaw.trim().toLowerCase();
60
+ const allowed = ["day", "provider", "model", "agent", "entry"];
61
+ if (!allowed.includes(normalized)) {
62
+ throw new Error(`--by \u53EA\u652F\u6301 ${allowed.join(" / ")}\uFF0C\u6536\u5230 ${JSON.stringify(groupRaw)}`);
63
+ }
64
+ options.groupBy = normalized;
65
+ }
66
+ const agent = readOption(args, "--agent");
67
+ if (agent !== void 0) options.agent = agent.trim();
68
+ const provider = readOption(args, "--provider");
69
+ if (provider !== void 0) options.provider = provider.trim();
70
+ const model = readOption(args, "--model");
71
+ if (model !== void 0) options.model = model.trim();
72
+ for (const [flag, value] of [
73
+ ["--agent", agent],
74
+ ["--provider", provider],
75
+ ["--model", model]
76
+ ]) {
77
+ if (value !== void 0 && !value.trim()) {
78
+ throw new Error(`${flag} \u9700\u8981\u975E\u7A7A\u503C`);
79
+ }
80
+ }
81
+ const filterCount = [
82
+ options.agent !== void 0,
83
+ options.provider !== void 0,
84
+ options.model !== void 0
85
+ ].filter(Boolean).length;
86
+ if (filterCount > 1) {
87
+ throw new Error(
88
+ "--agent / --provider / --model \u53EA\u80FD\u540C\u65F6\u7ED9\u4E00\u4E2A\uFF1A\u65E5\u805A\u5408\u6CA1\u6709\u4EA4\u53C9\u8868\uFF0C\u591A\u4E2A\u8FC7\u6EE4\u9879\u65E0\u6CD5\u6C42\u4EA4\u96C6"
89
+ );
90
+ }
91
+ if (options.days !== void 0 && (options.from !== void 0 || options.to !== void 0)) {
92
+ throw new Error("--days \u4E0E --from/--to \u4E92\u65A5\uFF0C\u53EA\u80FD\u7ED9\u4E00\u79CD");
93
+ }
94
+ options.allUsers = hasFlag(args, "--all-users");
95
+ options.json = hasFlag(args, "--json");
96
+ return options;
97
+ }
98
+ function normalizeDateArg(value, flag) {
99
+ const trimmed = value.trim();
100
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(trimmed)) {
101
+ throw new Error(`${flag} \u9700\u8981 YYYY-MM-DD\uFF0C\u6536\u5230 ${JSON.stringify(value)}`);
102
+ }
103
+ return trimmed;
104
+ }
105
+ function resolveDateWindow(options, now = /* @__PURE__ */ new Date()) {
106
+ const today = formatLocalDate(now, "yyyy-MM-dd");
107
+ const to = options.to ?? today;
108
+ if (options.from) return { from: options.from, to };
109
+ const days = options.days ?? 30;
110
+ const start = new Date(now);
111
+ start.setDate(start.getDate() - (days - 1));
112
+ return { from: formatLocalDate(start, "yyyy-MM-dd"), to };
113
+ }
114
+ var groupKeyFor = (stats, groupBy, dateKey) => {
115
+ switch (groupBy) {
116
+ case "day":
117
+ return { [dateKey]: stats.total };
118
+ case "provider":
119
+ return stats.providers ?? {};
120
+ case "model":
121
+ return stats.models ?? {};
122
+ case "agent":
123
+ return stats.agents ?? {};
124
+ case "entry":
125
+ return stats.entryPaths ?? {};
126
+ }
127
+ };
128
+ function summarizeUsage(records, options) {
129
+ const groupBy = options.groupBy ?? "provider";
130
+ const total = emptyBucket();
131
+ const groups = {};
132
+ const datesWithData = /* @__PURE__ */ new Set();
133
+ const filterDimension = options.agent ? "agent" : options.provider ? "provider" : options.model ? "model" : void 0;
134
+ if (filterDimension) {
135
+ const wanted = (options.agent ?? options.provider ?? options.model ?? "").trim();
136
+ const canBreakdown = groupBy === "day" || groupBy === filterDimension;
137
+ for (const record of records) {
138
+ const buckets = groupKeyFor(record.stats, filterDimension, record.dateKey);
139
+ const matched = buckets[wanted];
140
+ if (!matched) continue;
141
+ datesWithData.add(record.dateKey);
142
+ addBucket(total, matched);
143
+ if (!canBreakdown) continue;
144
+ if (groupBy === "day") {
145
+ addBucket(groups[record.dateKey] ??= emptyBucket(), matched);
146
+ } else {
147
+ addBucket(groups[wanted] ??= emptyBucket(), matched);
148
+ }
149
+ }
150
+ return {
151
+ from: options.from ?? "",
152
+ to: options.to ?? "",
153
+ daysWithData: datesWithData.size,
154
+ total,
155
+ groups,
156
+ breakdownUnavailable: !canBreakdown,
157
+ filterDimension,
158
+ groupBy
159
+ };
160
+ }
161
+ for (const record of records) {
162
+ datesWithData.add(record.dateKey);
163
+ addBucket(total, record.stats.total);
164
+ for (const [name, bucket] of Object.entries(groupKeyFor(record.stats, groupBy, record.dateKey))) {
165
+ addBucket(groups[name] ??= emptyBucket(), bucket);
166
+ }
167
+ }
168
+ return {
169
+ from: options.from ?? "",
170
+ to: options.to ?? "",
171
+ daysWithData: datesWithData.size,
172
+ total,
173
+ groups,
174
+ groupBy
175
+ };
176
+ }
177
+ async function countUserBuckets(args) {
178
+ const users = /* @__PURE__ */ new Set();
179
+ const prefix = "token-stats-day-user-";
180
+ let seen = 0;
181
+ for await (const [key] of args.db.iterator({ gte: prefix, lte: `${prefix}\uFFFF` })) {
182
+ const rest = String(key).slice(prefix.length);
183
+ if (rest.length <= 11) continue;
184
+ users.add(rest.slice(0, rest.length - 11));
185
+ if (++seen >= 5e3) break;
186
+ }
187
+ return users;
188
+ }
189
+ async function readLocalDayStats(args) {
190
+ const out = [];
191
+ const startKey = args.userId ? createTokenStatsKey(args.userId, args.from) : "token-stats-day-user-";
192
+ const endKey = args.userId ? createTokenStatsKey(args.userId, args.to) : "token-stats-day-user-\uFFFF";
193
+ for await (const [key, value] of args.db.iterator({ gte: startKey, lte: endKey })) {
194
+ if (!value || typeof value !== "object") continue;
195
+ if (typeof value.total !== "object") continue;
196
+ const dateKey = String(key).slice(String(key).length - 10);
197
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(dateKey)) continue;
198
+ if (dateKey < args.from || dateKey > args.to) continue;
199
+ out.push({ dateKey, stats: value });
200
+ }
201
+ return out.sort((a, b) => a.dateKey.localeCompare(b.dateKey));
202
+ }
203
+ var formatInt = (value) => value.toLocaleString("en-US");
204
+ function formatUsageSummary(summary, options) {
205
+ const lines = [];
206
+ const groupBy = options.groupBy ?? "provider";
207
+ lines.push(`\u7A97\u53E3: ${summary.from} \u2192 ${summary.to}\uFF08\u6709\u6570\u636E ${summary.daysWithData} \u5929\uFF09`);
208
+ const t = summary.total;
209
+ const cacheRate = t.input > 0 ? (t.cacheRead / t.input * 100).toFixed(1) : "\u2014";
210
+ if (summary.filterDimension) {
211
+ const filters = [options.agent, options.provider, options.model].filter(
212
+ (value) => typeof value === "string" && value.length > 0
213
+ );
214
+ lines.push(`\u8FC7\u6EE4: ${summary.filterDimension} = ${filters[0]}`);
215
+ }
216
+ if (summary.otherUserBuckets && summary.otherUserBuckets > 0) {
217
+ lines.push(`\u53E6\u6709 ${summary.otherUserBuckets} \u4E2A\u8D26\u53F7\u6876\u672A\u8BA1\u5165\uFF08\u7528 --all-users \u5408\u5E76\uFF09`);
218
+ }
219
+ lines.push(
220
+ `\u5408\u8BA1: \u8C03\u7528 ${formatInt(t.calls)} \u6B21` + (t.failedCalls > 0 ? `\uFF08\u5931\u8D25 ${formatInt(t.failedCalls)}\uFF09` : "") + ` / \u8F93\u5165 ${formatInt(t.input)} / \u8F93\u51FA ${formatInt(t.output)}`
221
+ );
222
+ lines.push(
223
+ ` \u7F13\u5B58\u547D\u4E2D ${formatInt(t.cacheRead)}\uFF08${cacheRate}%\uFF09/ \u7F13\u5B58\u5199\u5165 ${formatInt(t.cacheCreation)} / \u8D39\u7528 ${t.cost.toFixed(6)}`
224
+ );
225
+ const entries = Object.entries(summary.groups).sort((a, b) => b[1].input - a[1].input);
226
+ if (entries.length === 0) {
227
+ lines.push("");
228
+ if (summary.breakdownUnavailable) {
229
+ lines.push(
230
+ `\u6309 ${summary.filterDimension} \u8FC7\u6EE4\u3001\u53C8\u8981\u6C42\u6309 ${summary.groupBy} \u5206\u89E3\uFF1A\u65E5\u805A\u5408\u53EA\u6709\u5404\u7EF4\u5EA6\u7684\u72EC\u7ACB\u5408\u8BA1\uFF0C\u6CA1\u6709\u4EA4\u53C9\u8868\uFF0C\u65E0\u6CD5\u7CBE\u786E\u62C6\u5206\u3002`
231
+ );
232
+ lines.push("\u4E0A\u9762\u5408\u8BA1\u662F\u7CBE\u786E\u7684\uFF1B\u8981\u5206\u89E3\u8BF7\u628A --by \u6539\u6210\u4E0E\u8FC7\u6EE4\u7EF4\u5EA6\u4E00\u81F4\uFF08\u6216\u6539\u7528 --by day\uFF09\u3002");
233
+ return lines.join("\n");
234
+ }
235
+ if (t.calls > 0) {
236
+ lines.push(`\u8BE5\u7EF4\u5EA6\u5728\u6240\u9009\u7A97\u53E3\u5185\u6CA1\u6709\u8BB0\u5F55\uFF1A\u5408\u8BA1\u7684 ${formatInt(t.calls)} \u6B21\u8C03\u7528\u6765\u81EA\u672A\u5199\u5165 ${groupBy} \u7EF4\u5EA6\u7684\u65E7\u8BB0\u5F55\u3002`);
237
+ lines.push("\uFF08\u7F13\u5B58\u5B57\u6BB5\u540C\u7406\uFF1A\u5386\u53F2\u65E5\u805A\u5408\u6CA1\u6709 cacheRead/cacheCreation\uFF0C\u65B0\u8BB0\u5F55\u624D\u4F1A\u5E26\u4E0A\u3002\uFF09");
238
+ } else {
239
+ lines.push("\u6240\u9009\u7A97\u53E3\u5185\u65E0\u7528\u91CF\u8BB0\u5F55\u3002");
240
+ }
241
+ return lines.join("\n");
242
+ }
243
+ lines.push("");
244
+ lines.push(`\u6309 ${groupBy} \u5206\u7EC4:`);
245
+ for (const [name, bucket] of entries) {
246
+ const rate = bucket.input > 0 ? (bucket.cacheRead / bucket.input * 100).toFixed(1) : "\u2014";
247
+ lines.push(
248
+ ` ${name} \u8C03\u7528 ${formatInt(bucket.calls)} \u8F93\u5165 ${formatInt(bucket.input)} \u8F93\u51FA ${formatInt(bucket.output)} \u7F13\u5B58 ${formatInt(bucket.cacheRead)}\uFF08${rate}%\uFF09` + (bucket.cost > 0 ? ` \u8D39\u7528 ${bucket.cost.toFixed(6)}` : "")
249
+ );
250
+ }
251
+ return lines.join("\n");
252
+ }
253
+ var USAGE_TEXT = [
254
+ "\u7528\u6CD5: nolo usage [\u9009\u9879]",
255
+ "",
256
+ " \u4ECE\u672C\u5730 LevelDB \u65E5\u805A\u5408\uFF08token-stats-day-user-*\uFF09\u6C47\u603B\u7528\u91CF\u3002",
257
+ " \u8D70 iterator \u8BFB\u53D6\uFF0C\u8986\u76D6\u5DF2 compaction \u8FDB .ldb \u7684\u5386\u53F2\u8BB0\u5F55\u3002",
258
+ "",
259
+ "\u9009\u9879:",
260
+ " --days <n> \u6700\u8FD1 n \u5929\uFF08\u9ED8\u8BA4 30\uFF09",
261
+ " --from <date> \u8D77\u59CB\u65E5\u671F YYYY-MM-DD",
262
+ " --to <date> \u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u542B\uFF09",
263
+ " --by <dim> day | provider | model | agent | entry\uFF08\u9ED8\u8BA4 provider\uFF09",
264
+ " --agent <agentId> \u53EA\u770B\u67D0\u4E2A agent",
265
+ " --provider <name> \u53EA\u770B\u67D0\u4E2A provider",
266
+ " --model <id> \u53EA\u770B\u67D0\u4E2A model",
267
+ " --all-users \u5408\u5E76\u672C\u673A\u6240\u6709\u8D26\u53F7\u7684\u7EDF\u8BA1\uFF08\u9ED8\u8BA4\u53EA\u770B\u5F53\u524D\u767B\u5F55\u8D26\u53F7\uFF09",
268
+ " --json \u8F93\u51FA JSON",
269
+ " -h, --help \u663E\u793A\u672C\u5E2E\u52A9",
270
+ "",
271
+ "\u5B50\u547D\u4EE4:",
272
+ " rebuild \u4ECE\u660E\u7EC6\u91CD\u5EFA\u65E5\u805A\u5408\uFF08\u8865\u56DE cache / agents \u7EF4\u5EA6\uFF0C\u9ED8\u8BA4 dry-run\uFF09",
273
+ " \u89C1 `nolo usage rebuild --help`"
274
+ ].join("\n");
275
+ async function runUsageCommand(args, deps) {
276
+ const output = deps.output ?? process.stdout;
277
+ const errorOutput = deps.errorOutput ?? process.stderr;
278
+ if (args[0] === "rebuild") {
279
+ const { runUsageRebuildCommand } = await import("./usageRebuildCommand-VUQETFMW.js");
280
+ return runUsageRebuildCommand(args.slice(1), deps);
281
+ }
282
+ if (hasFlag(args, "-h") || hasFlag(args, "--help")) {
283
+ output.write(`${USAGE_TEXT}
284
+ `);
285
+ return 0;
286
+ }
287
+ let options;
288
+ const window = { from: "", to: "" };
289
+ try {
290
+ options = parseUsageArgs(args);
291
+ const resolved = resolveDateWindow(options);
292
+ window.from = resolved.from;
293
+ window.to = resolved.to;
294
+ } catch (error) {
295
+ errorOutput.write(`[nolo] ${error instanceof Error ? error.message : String(error)}
296
+ `);
297
+ errorOutput.write(`${USAGE_TEXT}
298
+ `);
299
+ return 1;
300
+ }
301
+ const userId = deps.userId?.trim() || await resolveUsageUserId(deps.env);
302
+ let db;
303
+ let records;
304
+ let otherUserBuckets = 0;
305
+ try {
306
+ db = deps.db ?? await getDefaultCliLocalRuntimeDb();
307
+ records = await readLocalDayStats({
308
+ db,
309
+ // --all-users 时传 undefined:跨账号扫前缀,由日期后缀过滤窗口。
310
+ userId: options.allUsers ? void 0 : userId,
311
+ from: window.from,
312
+ to: window.to
313
+ });
314
+ if (!options.allUsers) {
315
+ try {
316
+ const users = await countUserBuckets({ db });
317
+ otherUserBuckets = Math.max(0, users.size - (users.has(userId) ? 1 : 0));
318
+ } catch {
319
+ otherUserBuckets = 0;
320
+ }
321
+ }
322
+ } catch (error) {
323
+ if (isLocalDbMissingError(error)) {
324
+ records = [];
325
+ } else {
326
+ errorOutput.write(
327
+ `[nolo] \u8BFB\u53D6\u672C\u5730\u7528\u91CF\u7EDF\u8BA1\u5931\u8D25: ${error instanceof Error ? error.message : String(error)}
328
+ `
329
+ );
330
+ return 1;
331
+ }
332
+ }
333
+ const summary = summarizeUsage(records, options);
334
+ summary.from = window.from;
335
+ summary.to = window.to;
336
+ summary.otherUserBuckets = otherUserBuckets;
337
+ if (options.json) {
338
+ output.write(`${JSON.stringify({ userId: options.allUsers ? "all" : userId, ...summary }, null, 2)}
339
+ `);
340
+ return 0;
341
+ }
342
+ if (options.allUsers) {
343
+ output.write("\u8303\u56F4: \u672C\u673A\u6240\u6709\u8D26\u53F7\n");
344
+ }
345
+ output.write(`${formatUsageSummary(summary, options)}
346
+ `);
347
+ return 0;
348
+ }
349
+ async function resolveUsageUserId(env) {
350
+ const { resolveLocalUserId } = await import("./cliAgentConfigHelpers-BJJEXHSZ.js");
351
+ return resolveLocalUserId(env);
352
+ }
353
+ function isLocalDbMissingError(error) {
354
+ const code = error?.code;
355
+ if (code === "LEVEL_NOT_FOUND") return true;
356
+ const message = error instanceof Error ? error.message : String(error);
357
+ return /does not exist|no such file|ENOENT/i.test(message);
358
+ }
359
+
360
+ export {
361
+ parseUsageArgs,
362
+ resolveDateWindow,
363
+ summarizeUsage,
364
+ countUserBuckets,
365
+ readLocalDayStats,
366
+ formatUsageSummary,
367
+ runUsageCommand
368
+ };
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  resolveNoloHome
3
3
  } from "./chunk-GLKOYSRU.js";
4
+ import {
5
+ toErrorMessage
6
+ } from "./chunk-HNMXYYJR.js";
4
7
  import {
5
8
  isSupportedDialogId,
6
9
  splitDialogKeyIdentity
7
10
  } from "./chunk-YZMNK53S.js";
8
11
  import {
9
12
  resolveLocalUserId
10
- } from "./chunk-QGFLVQ6E.js";
11
- import {
12
- toErrorMessage
13
- } from "./chunk-HNMXYYJR.js";
13
+ } from "./chunk-UBOTXA3Z.js";
14
14
 
15
15
  // packages/cli/dialogNotifyCommand.ts
16
16
  import { lstatSync as lstatSync2, readFileSync as readFileSync2 } from "node:fs";
@@ -16,12 +16,15 @@ var relationFromIndexKey = (ownerId, from, relationId) => `mem2-rf-${enc(ownerId
16
16
  var relationToIndexKey = (ownerId, to, relationId) => `mem2-rt-${enc(ownerId)}-${enc(to)}-${enc(relationId)}`;
17
17
  var relationFromIndexPrefix = (ownerId, from) => `mem2-rf-${enc(ownerId)}-${enc(from)}-`;
18
18
  var relationToIndexPrefix = (ownerId, to) => `mem2-rt-${enc(ownerId)}-${enc(to)}-`;
19
- var readIndexed = async (db, prefix) => {
19
+ var readIndexed = async (db, prefix, strict = false) => {
20
20
  const refs = [];
21
21
  for await (const [, value] of db.iterator({ ...rangeOf(prefix), reverse: false })) {
22
22
  if (typeof value?.key === "string") refs.push(value.key);
23
23
  }
24
- const rows = await Promise.all(refs.map((key) => db.get(key).catch(() => null)));
24
+ const rows = await Promise.all(refs.map((key) => db.get(key).catch((error) => {
25
+ if (strict) throw error;
26
+ return null;
27
+ })));
25
28
  return rows.filter((row) => !!row);
26
29
  };
27
30
  var putMemoryEntityVNext = async (db, entity) => {
@@ -69,7 +72,12 @@ var getMemoryStateVNext = async (db, ownerId, stateId) => db.get(stateKey(ownerI
69
72
  if (isLevelNotFoundError(error)) return null;
70
73
  throw error;
71
74
  });
72
- var listMemoryStatesForEntityVNext = (db, ownerId, entityId) => readIndexed(db, stateEntityIndexPrefix(ownerId, entityId));
75
+ var listMemoryStatesForEntityVNext = (db, ownerId, entityId, options) => readIndexed(db, stateEntityIndexPrefix(ownerId, entityId), options?.strict);
76
+ async function* iterateMemoryStatesForOwnerVNext(db, ownerId) {
77
+ for await (const [, state] of db.iterator(rangeOf(`mem2-s-${enc(ownerId)}-`))) {
78
+ if (state?.ownerId === ownerId) yield state;
79
+ }
80
+ }
73
81
  var retireMemoryStateVNext = async (db, ownerId, stateId, retiredAt) => {
74
82
  const existing = await getMemoryStateVNext(db, ownerId, stateId);
75
83
  if (!existing) {
@@ -154,6 +162,7 @@ export {
154
162
  putMemoryStateVNext,
155
163
  getMemoryStateVNext,
156
164
  listMemoryStatesForEntityVNext,
165
+ iterateMemoryStatesForOwnerVNext,
157
166
  retireMemoryStateVNext,
158
167
  putMemoryEvidenceVNext,
159
168
  getMemoryEvidenceVNext,
@@ -0,0 +1,94 @@
1
+ import {
2
+ CHROME_CONNECTOR_LEGACY_TOOL_ALIASES
3
+ } from "./chunk-ZC3CMUKU.js";
4
+
5
+ // packages/agent-runtime/toolNameAliases.ts
6
+ var LEGACY_TOOL_NAME_ALIASES = {
7
+ // Nolo Browser Connector: legacy chrome_* → canonical browser_*
8
+ ...CHROME_CONNECTOR_LEGACY_TOOL_ALIASES,
9
+ createPage: "createDoc",
10
+ updatePage: "updateDoc",
11
+ update_page: "updateDoc",
12
+ create_page: "createDoc",
13
+ fetchwebpage: "fetchWebpage",
14
+ fetch_webpage: "fetchWebpage",
15
+ "fetch-page": "fetchWebpage",
16
+ exasearch: "exa_search",
17
+ "exa-search": "exa_search",
18
+ exa_search: "exa_search",
19
+ firecrawlscrape: "firecrawl_scrape",
20
+ "firecrawl-scrape": "firecrawl_scrape",
21
+ firecrawl_scrape: "firecrawl_scrape",
22
+ firecrawlsearch: "firecrawl_search",
23
+ "firecrawl-search": "firecrawl_search",
24
+ firecrawl_search: "firecrawl_search",
25
+ readDoc: "readDoc",
26
+ readpage: "readDoc",
27
+ read_page: "readDoc",
28
+ read_doc: "readDoc",
29
+ createdoc: "createDoc",
30
+ updateDocTool: "updateDoc",
31
+ terminalCommand: "execShell",
32
+ terminal_command: "execShell",
33
+ runCommand: "execShell",
34
+ run_command: "execShell",
35
+ runInBash: "execShell",
36
+ run_in_bash: "execShell",
37
+ executeCommand: "execShell",
38
+ execute_command: "execShell",
39
+ // Codex CLI 风格工具名 → nolo 原生工具名
40
+ bash: "execShell",
41
+ shell: "execShell",
42
+ read: "readFile",
43
+ edit: "editFile",
44
+ write: "writeFile",
45
+ glob: "globFiles",
46
+ grep: "searchFiles",
47
+ rg: "searchFiles",
48
+ grepFiles: "searchFiles",
49
+ grep_files: "searchFiles",
50
+ search_files: "searchFiles",
51
+ // 联网搜索别名
52
+ web_search: "exa_search",
53
+ websearch: "exa_search",
54
+ search_web: "exa_search",
55
+ searchweb: "exa_search",
56
+ webfetch: "fetchWebpage",
57
+ web_fetch: "fetchWebpage",
58
+ fetchweb: "fetchWebpage",
59
+ fetch_web: "fetchWebpage",
60
+ // 模型偶尔会把 loadSkill 幻觉成 readSkill(参数风格 name= 一致),
61
+ // 规范化到 loadSkill,避免 localToolPolicy 把这种调用直接拦死。
62
+ readSkill: "loadSkill"
63
+ };
64
+ var normalizeToolName = (name) => name.replace(/[-_]/g, "").toLowerCase();
65
+ var canonicalizeToolName = (rawName) => {
66
+ const trimmedName = rawName.trim();
67
+ if (!trimmedName) return rawName;
68
+ if (LEGACY_TOOL_NAME_ALIASES[trimmedName]) {
69
+ return LEGACY_TOOL_NAME_ALIASES[trimmedName];
70
+ }
71
+ const normalizedRawName = normalizeToolName(trimmedName);
72
+ const matchedAlias = Object.entries(LEGACY_TOOL_NAME_ALIASES).find(
73
+ ([alias]) => normalizeToolName(alias) === normalizedRawName
74
+ );
75
+ return matchedAlias?.[1] ?? trimmedName;
76
+ };
77
+ var canonicalizeToolNames = (toolNames) => Array.from(
78
+ new Set(
79
+ toolNames.filter((toolName) => typeof toolName === "string").map(canonicalizeToolName)
80
+ )
81
+ );
82
+ var prioritizeToolNames = (toolNames, preferredToolNames) => {
83
+ const canonicalTools = canonicalizeToolNames(toolNames);
84
+ const preferred = new Set(canonicalizeToolNames(preferredToolNames));
85
+ const prioritized = canonicalTools.filter((toolName) => preferred.has(toolName));
86
+ const remaining = canonicalTools.filter((toolName) => !preferred.has(toolName));
87
+ return [...prioritized, ...remaining];
88
+ };
89
+
90
+ export {
91
+ canonicalizeToolName,
92
+ canonicalizeToolNames,
93
+ prioritizeToolNames
94
+ };