nolo-cli 0.259.0-alpha.1 → 0.260.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.
- package/README.md +1 -1
- package/{_executeModel-MTM4BJK3.js → _executeModel-EO6JFCOF.js} +97 -83
- package/accountResolver-NGICIMEE.js +1 -1
- package/{action-C6IQAKN4.js → action-WIA56QT4.js} +12 -10
- package/{addContentAction-53364YDW.js → addContentAction-OCMWZLYG.js} +14 -13
- package/{addDialogAgentAction-U5DD5EN5.js → addDialogAgentAction-ER2NZ7BC.js} +20 -24
- package/{agentDeleteCommand-53NN3VSK.js → agentDeleteCommand-KSXSNPAU.js} +184 -146
- package/{agentEmailCommands-KOGGIT6I.js → agentEmailCommands-NXRWS7NS.js} +142 -126
- package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-D2S7LCTU.js} +8 -5
- package/{agentListCommands-62UYUQDI.js → agentListCommands-PFXGZZ3Y.js} +87 -68
- package/{agentMachineCommands-W6TNJXEA.js → agentMachineCommands-2Q55CSL4.js} +68 -59
- package/{agentProviderCommands-QLTABYR7.js → agentProviderCommands-EUNS7Y2Z.js} +10 -7
- package/{agentPullCommand-2EYJ5ENC.js → agentPullCommand-S2VMPSWL.js} +9 -6
- package/agentRecordCommands-FUFI526H.js +210 -0
- package/agentRun-ZNMUPDHF.js +250 -0
- package/agentRunCommand-ISVQ2UYC.js +248 -0
- package/{agentRunControl-LXMADX3N.js → agentRunControl-NEK44LDM.js} +19 -12
- package/{agentRuntimeLocal-YGNJMQW3.js → agentRuntimeLocal-SST4EPLT.js} +62 -49
- package/{agentSlice-3HHYUQLM.js → agentSlice-4ZJJJN4M.js} +15 -18
- package/appConfigCommands-MPHS6FHD.js +417 -0
- package/{appDeleteCommands-5COJ6CSG.js → appDeleteCommands-W26WGENW.js} +68 -58
- package/{appDeployCommands-3JPAT3XO.js → appDeployCommands-ER7IOF5E.js} +74 -59
- package/{appDeployStatusCommands-RHZKF3G4.js → appDeployStatusCommands-VKLL3A77.js} +68 -58
- package/{appGetCommands-73DXOAQW.js → appGetCommands-P6GXJNUD.js} +74 -58
- package/{appListCommands-HD5LOQ3G.js → appListCommands-ACA2IZZM.js} +74 -58
- package/appMigrateCommands-OGF4E2W6.js +230 -0
- package/appSourceCommands-GAHVBRUM.js +279 -0
- package/{authCommand-V6EOMZX6.js → authCommand-PXE7NZTQ.js} +26 -40
- package/{authCommands-T5FODCEG.js → authCommands-AZPYXTUB.js} +20 -17
- package/{builtinSkillRegistry-EDHD2UHU.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
- package/{chromeOpsCommands-3SSTDFRF.js → chromeOpsCommands-7UKKUOBU.js} +68 -18
- package/{chunk-KLMBM6P6.js → chunk-2CKFROQS.js} +2454 -1115
- package/{chunk-MJBLXJMP.js → chunk-2I4R6ZRV.js} +12 -9
- package/{chunk-FXEPZKNJ.js → chunk-2MIZHEND.js} +506 -64
- package/{chunk-TLE77UJ5.js → chunk-2OROOEOQ.js} +0 -1
- package/{chunk-6RSNVJGO.js → chunk-2ZBPWX7N.js} +4 -4
- package/chunk-35JIFLIG.js +30 -0
- package/{chunk-ZYPXOQS2.js → chunk-3EPED3UO.js} +1 -1
- package/{chunk-DNNPARJK.js → chunk-3QMN3T6L.js} +50 -37
- package/{chunk-DMPZMYH4.js → chunk-3R4AYHJR.js} +13 -1
- package/{chunk-HPDLPEUG.js → chunk-42JZNSAY.js} +267 -234
- package/{chunk-223KZUJ6.js → chunk-4HZCBA4Q.js} +18 -15
- package/{chunk-C5A54QS7.js → chunk-4INJGWE3.js} +18 -5
- package/chunk-4IVMDQBA.js +261 -0
- package/chunk-4Y6CZ2N4.js +82 -0
- package/{chunk-OKAXQFON.js → chunk-52BNL6GP.js} +4 -4
- package/{chunk-KZ4A7EIV.js → chunk-56OAS5RZ.js} +1 -1
- package/{chunk-QGFLVQ6E.js → chunk-6KUTNAPU.js} +4 -14
- package/{chunk-MNFUKRRU.js → chunk-6XAAKRJB.js} +7 -7
- package/{chunk-P27E22MA.js → chunk-6Z6DGDPI.js} +1 -1
- package/chunk-72VWN4VK.js +51 -0
- package/{chunk-L4XST72F.js → chunk-75FZ2Z7C.js} +16027 -17392
- package/{chunk-ADYWV732.js → chunk-76B6YUQS.js} +264 -177
- package/{chunk-MXA54TQM.js → chunk-76K4GTY5.js} +1 -1
- package/{chunk-VNHZJEQN.js → chunk-7HUCUD2I.js} +3 -3
- package/chunk-7LR2IFUH.js +100 -0
- package/{chunk-S73EPYNC.js → chunk-7LS5ATRP.js} +20 -6
- package/{chunk-Y2TCTNUD.js → chunk-7QO6YSA4.js} +4 -4
- package/{chunk-DBJODIZ6.js → chunk-7RYH7YIY.js} +19 -27
- package/{chunk-KHYSFS3W.js → chunk-A454UXB6.js} +148 -73
- package/chunk-AMNZPQCY.js +635 -0
- package/chunk-AMTF6FJD.js +356 -0
- package/{chunk-4MXYCQBS.js → chunk-AQNWWJLH.js} +2 -56
- package/{chunk-WSLL7VV4.js → chunk-B4NA5UJR.js} +9 -9
- package/{chunk-LHCGKAFO.js → chunk-BKP325XS.js} +184 -112
- package/{chunk-PENRYZ4D.js → chunk-BPB3T5EU.js} +4 -7
- package/{chunk-46FETNLF.js → chunk-BTIFQBYW.js} +7 -6
- package/{chunk-2JHGUL5K.js → chunk-BVYHE6QD.js} +2 -2
- package/{chunk-KXOPLLFP.js → chunk-CA7LGAHV.js} +69 -9
- package/{chunk-2FZVXOFX.js → chunk-CEIWXKHP.js} +112 -200
- package/{chunk-AIFQKNPP.js → chunk-CL33RFD7.js} +1 -1
- package/{chunk-MPGR4ZNR.js → chunk-CRGPRAJ4.js} +46 -42
- package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
- package/{chunk-R3TUHCSJ.js → chunk-CZHIOBBK.js} +8 -3
- package/chunk-D3ONA3FP.js +762 -0
- package/chunk-D3SAQ6T7.js +1697 -0
- package/{chunk-PIVTQRX6.js → chunk-DDKA6V6X.js} +111 -12
- package/{chunk-KQHEGELM.js → chunk-DEAII55O.js} +16 -6
- package/{chunk-J55F3IEZ.js → chunk-DKJQEFNG.js} +1 -1
- package/chunk-DLXL4NSL.js +1179 -0
- package/{chunk-EJQE5HB7.js → chunk-DSBRIUX5.js} +4 -2
- package/{chunk-XRGBJHZX.js → chunk-E36V7MPY.js} +9 -5
- package/{chunk-4YPH5KRA.js → chunk-EDKMRDET.js} +1 -1
- package/chunk-EJHLDJWZ.js +58 -0
- package/{chunk-6B2OBX5B.js → chunk-EMFZXJTN.js} +15 -47
- package/chunk-ER6NTALN.js +34 -0
- package/chunk-EUHMI5KG.js +101 -0
- package/{chunk-YQLAFJRQ.js → chunk-FBNVJ2TO.js} +1 -1
- package/{chunk-Q2EERN52.js → chunk-FF5ZRKW7.js} +12 -7
- package/{chunk-YFEK7ACQ.js → chunk-FGD4NMTP.js} +4 -4
- package/{chunk-6XIE5ZGI.js → chunk-FGFJUFPS.js} +5 -6
- package/chunk-FI4DPLR7.js +902 -0
- package/chunk-FKVLQNGJ.js +25 -0
- package/{chunk-JCQ3WCQ3.js → chunk-FOC4TORM.js} +69 -3
- package/{chunk-JPXACKSW.js → chunk-G22P2J7O.js} +30 -81
- package/{chunk-7WHCIA5V.js → chunk-G5IAIGGD.js} +3 -8
- package/{chunk-5BIDJVNX.js → chunk-G5JGA5YM.js} +180 -31
- package/{chunk-57V4PADY.js → chunk-GMBWWBSJ.js} +781 -449
- package/{chunk-WS36XPJD.js → chunk-GYFKKTDI.js} +82 -6
- package/{chunk-KT7S7ANZ.js → chunk-GZ4I5EMM.js} +9 -9
- package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
- package/chunk-HJTI7RZV.js +94 -0
- package/{chunk-QXTEEEIN.js → chunk-HPIY372N.js} +7 -7
- package/{chunk-Q2MPKE4B.js → chunk-HVRG27HI.js} +76 -26
- package/{chunk-HDKMVYNJ.js → chunk-I3NWAILT.js} +6 -4
- package/{chunk-JZO7KUF3.js → chunk-IM7HCFB4.js} +313 -275
- package/{chunk-UWWOWTW2.js → chunk-INN2PBW7.js} +1 -1
- package/chunk-IV6VUVLJ.js +88 -0
- package/chunk-J42X32PV.js +472 -0
- package/{chunk-UA3QTA2S.js → chunk-JHQNWV2C.js} +4441 -2569
- package/{chunk-R7XWZDOH.js → chunk-JUMQJSQF.js} +1423 -282
- package/{chunk-BIDSIRTS.js → chunk-JUNYPVL6.js} +10 -16
- package/chunk-JVEKCQAP.js +222 -0
- package/{chunk-KVMLM5VD.js → chunk-KAHYBAEN.js} +211 -472
- package/chunk-KDDXC2IH.js +148 -0
- package/chunk-KGKTN2NX.js +25 -0
- package/chunk-KGWE224L.js +246 -0
- package/chunk-L3UFGEDU.js +17157 -0
- package/{chunk-CBIGMWMI.js → chunk-LHJB4BXJ.js} +1 -1
- package/{chunk-7OVOZRZF.js → chunk-LIH7WSX5.js} +23 -379
- package/chunk-LJOPY4TL.js +443 -0
- package/{chunk-TRRXYFTR.js → chunk-LOFRSJX2.js} +1 -0
- package/{chunk-SQL7YNED.js → chunk-LPXBBC32.js} +71 -5
- package/chunk-LXP53WGF.js +168 -0
- package/chunk-MDAYRIP7.js +1889 -0
- package/chunk-MRACVEPZ.js +7 -0
- package/chunk-NHLLXINQ.js +8 -0
- package/{chunk-FP37ELBT.js → chunk-NTBTVKKB.js} +17 -25
- package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
- package/{chunk-2C5VN7NH.js → chunk-P4XAHM4B.js} +1 -1
- package/chunk-PL5RKESU.js +40 -0
- package/{chunk-MHKPUGPD.js → chunk-PQ3QZMJK.js} +20 -4
- package/chunk-Q5FJJ6XI.js +103 -0
- package/{createAgentAutomationAction-GRZ6XY7Q.js → chunk-QKM55LP2.js} +3 -160
- package/{chunk-6YX2RAQN.js → chunk-QZCLCAYC.js} +89 -164
- package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
- package/{chunk-JLZJL3WC.js → chunk-RDZ5OIAT.js} +370 -39
- package/{chunk-5RGU3J7P.js → chunk-REAE2SZK.js} +0 -1
- package/chunk-RF576RYE.js +117 -0
- package/chunk-RI7SXDJW.js +1317 -0
- package/{chunk-FEIVARWR.js → chunk-RIOAPUGV.js} +238 -25
- package/{chunk-2CT2J3O6.js → chunk-RL6H2A2Z.js} +2493 -4055
- package/{chunk-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
- package/{chunk-J7JRCOIW.js → chunk-RWXHGPWJ.js} +1 -1
- package/chunk-S7BF2OGX.js +432 -0
- package/{chunk-6VEO7Z3Y.js → chunk-SD4MBKZ7.js} +6 -6
- package/{chunk-KWNVPY6M.js → chunk-SGEBRBF3.js} +7 -4
- package/{chunk-6SOWMEAY.js → chunk-SR57FDTX.js} +2 -258
- package/{chunk-CEKRIR22.js → chunk-SU4NCTW4.js} +1 -1
- package/{chunk-Y2GWUBNS.js → chunk-SX6PDLBZ.js} +279 -149
- package/{chunk-XNNBXUEM.js → chunk-T4WU747C.js} +5 -5
- package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
- package/{chunk-QIGQFON2.js → chunk-TXMFSGRY.js} +1 -1
- package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
- package/{chunk-NCFKHYDM.js → chunk-UOLGGEEC.js} +774 -119
- package/{chunk-4EACJPZI.js → chunk-USFG4EWQ.js} +51 -42
- package/{chunk-LLUBUHNT.js → chunk-UYZOBSSO.js} +5 -9
- package/{chunk-XPETQ4MR.js → chunk-VDC3BW24.js} +24 -10
- package/chunk-VH356OQ3.js +425 -0
- package/{chunk-U6QNVOR5.js → chunk-VKM7DOYB.js} +130 -6
- package/{chunk-CJOOF4L5.js → chunk-VPAO5WQX.js} +17 -14
- package/{chunk-OYUMJMC5.js → chunk-W2RQYNPI.js} +5 -0
- package/{chunk-6BMTKYAO.js → chunk-W2Z5E2R7.js} +126 -698
- package/{chunk-4ZCTKB27.js → chunk-W5GKF5ZW.js} +1 -0
- package/{chunk-NUHQO3RB.js → chunk-WIVVNJUS.js} +1 -1
- package/chunk-WLJNHFEB.js +1710 -0
- package/chunk-WMBJDXMY.js +408 -0
- package/chunk-WSQLCWLQ.js +201 -0
- package/{chunk-YN23INFZ.js → chunk-WXD6Y7DW.js} +23 -2
- package/{chunk-OOVOAG4Q.js → chunk-WY6DMHMG.js} +1 -1
- package/{chunk-6K32PBRY.js → chunk-XJW6SLBZ.js} +3 -3
- package/{chunk-7BIJFGKS.js → chunk-XQFDCRG3.js} +105 -51
- package/chunk-XT6C2QZW.js +46 -0
- package/{chunk-5YS6QHGT.js → chunk-Y7THFNVJ.js} +9 -9
- package/{chunk-ZEZC7IIM.js → chunk-YFSM2366.js} +35 -35
- package/{chunk-RD3QLZQV.js → chunk-YM5XULB2.js} +324 -2
- package/{chunk-FZENZCIA.js → chunk-YNP3ITPU.js} +19 -12
- package/{chunk-U35UUM5K.js → chunk-YOUSQIIK.js} +1 -1
- package/{chunk-RIWKZT7E.js → chunk-YRPIUIEQ.js} +11 -9
- package/{chunk-IYLUK67R.js → chunk-YU235GGN.js} +25 -8
- package/chunk-YWEZSBLL.js +790 -0
- package/chunk-Z3KTXWWB.js +76 -0
- package/{chunk-YLAHYLDQ.js → chunk-ZC3CMUKU.js} +2 -89
- package/chunk-ZD7OULYZ.js +368 -0
- package/{chunk-5P3PPQVP.js → chunk-ZQAADXSF.js} +1 -1
- package/{chunk-HQUGB2HM.js → chunk-ZTCMXPIS.js} +62 -50
- package/{cliAgentConfigHelpers-BXHQ3PXP.js → cliAgentConfigHelpers-KMXS7JP5.js} +20 -14
- package/{cliAuthorityBrokerClient-TFNXJLXL.js → cliAuthorityBrokerClient-3SKOA7OZ.js} +3 -1
- package/cliAuthorityBrokerProcess-DCCUT4YQ.js +34 -0
- package/{cliEnvHelpers-CNMP3RDX.js → cliEnvHelpers-YDGDHIEE.js} +5 -2
- package/{cliExecutor-K6FDZTQ2.js → cliExecutor-Z62UBJ5S.js} +12 -6
- package/cliLocalAgentRecordReader-X2YHEBWI.js +113 -0
- package/cloudAutomationCommands-C6Q3BFRB.js +310 -0
- package/{commandRegistry-IFYQLPGM.js → commandRegistry-TYYYTW5E.js} +260 -121
- package/{contentThunks-QCFCD2X3.js → contentThunks-E6BJ5YSX.js} +45 -43
- package/{cooldownCommands-WDOI5VD7.js → cooldownCommands-FPAFS7XG.js} +1 -1
- package/createAgentAutomationAction-L3NLCIIW.js +172 -0
- package/{createDialogAction-ZAJERW62.js → createDialogAction-QSWKRPWQ.js} +46 -42
- package/{createPageAction-QCVBMP4C.js → createPageAction-ZVVUT4CZ.js} +49 -45
- package/{db-VR74ADGC.js → db-KTQ3LL2Q.js} +3 -3
- package/{dbSlice-RWPSVHBC.js → dbSlice-SEVKNA7A.js} +21 -16
- package/deleteDbKey-43MTK2DI.js +86 -0
- package/{dialogCommands-4IEQUALS.js → dialogCommands-UVMTIFSA.js} +80 -66
- package/{dialogMessageRecord-OAV77LT7.js → dialogMessageRecord-2HJTEXQX.js} +1 -1
- package/{dialogNotifyCommand-IASQGEMW.js → dialogNotifyCommand-LMWF7EQI.js} +22 -14
- package/dialogPortabilityCommands-PAMLEBST.js +3036 -0
- package/{dialogSlice-XFYID6KE.js → dialogSlice-VHPXENDZ.js} +43 -42
- package/{dialogTraceCommand-Y67NRFCV.js → dialogTraceCommand-SO2WKAXW.js} +83 -69
- package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-EUO6JXTD.js} +6 -3
- package/{docCreateCommands-QLRIWRQE.js → docCreateCommands-H4RLIUNX.js} +68 -59
- package/{docDeleteCommands-XPRYA532.js → docDeleteCommands-OVAKCBMT.js} +68 -59
- package/{docReadCommands-EXQI7ETH.js → docReadCommands-KFISIUVA.js} +67 -58
- package/{docStore-MWFUKZL2.js → docStore-X7BEA735.js} +16 -17
- package/{docUpdateCommands-EFBFQV77.js → docUpdateCommands-VOEER36L.js} +68 -59
- package/{ebookDownloaderAgentCommand-DYSKF5ZY.js → ebookDownloaderAgentCommand-2DHPGEOQ.js} +14 -17
- package/{fetchMessages-TQEUZD7H.js → fetchMessages-RGPIYEPZ.js} +2 -2
- package/{getPricing-5BLZRPTM.js → getPricing-BK6CUBAE.js} +8 -4
- package/{handleSendMessageAction-GG3TR62X.js → handleSendMessageAction-GQ2KKOET.js} +265 -119
- package/{hostCredentialCreate-26S6DDJ5.js → hostCredentialCreate-PJAIKZQP.js} +138 -122
- package/index.js +35 -21
- package/{keys-RWF7UCB4.js → keys-FXEGMKSG.js} +2 -2
- package/localAutomationCommands-UU66LOWB.js +198 -0
- package/localAutomationRuntime-SW4R42SZ.js +60 -0
- package/{localDialogRead-BJJT3TF5.js → localDialogRead-W2EVXISA.js} +2 -2
- package/{localRuntimeAdapter-VREWZWPC.js → localRuntimeAdapter-WRBLXFUZ.js} +136 -119
- package/localRuntimeAuthority-3YDFZD3L.js +44 -0
- package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-CJWJK47G.js} +1 -1
- package/{machineCommands-CL5XK5UC.js → machineCommands-JFYED66N.js} +251 -357
- package/{machineInfo-LWHTEBHJ.js → machineInfo-BJIU3WQ5.js} +4 -2
- package/machineWsRunDispatch-CZUV2FXE.js +227 -0
- package/{mcpLocalAuthorizeCommand-RBXJDE6J.js → mcpLocalAuthorizeCommand-HLU72QME.js} +40 -22
- package/mcpLocalManageCommands-OHHU6F5C.js +212 -0
- package/{memberThunks-43B7UYC5.js → memberThunks-FJW4GPM5.js} +102 -22
- package/{memoryCommands-BC6REPQB.js → memoryCommands-2RLHDMU2.js} +25 -34
- package/{models-ZX2BYIMB.js → models-TOXYINNM.js} +3 -2
- package/{offlineMarxistsAgentCommand-XVXUE6G5.js → offlineMarxistsAgentCommand-WZBJBCPZ.js} +16 -22
- package/package.json +3 -3
- package/parityCommands-7EWR34P3.js +613 -0
- package/{projectArchive-OC63TWTD.js → projectArchive-JIVRMXVV.js} +49 -45
- package/{providerPresetApply-NTJUINI6.js → providerPresetApply-IRJ56XIZ.js} +12 -16
- package/{providerRegistry-W45SLUV6.js → providerRegistry-26PAUYH2.js} +3 -13
- package/{read-KG6INYUT.js → read-6YR57D6V.js} +11 -10
- package/{readDocTool-N3GA52JR.js → readDocTool-NKOGL2MW.js} +5 -1
- package/{readlineWorkspace-2NO6D6IZ.js → readlineWorkspace-V26AN2FL.js} +926 -572
- package/{rememberExplicit-CPAPONSI.js → rememberExplicit-7KX4HXQC.js} +4 -4
- package/remove-BF33RCTH.js +32 -0
- package/{removeDialogAgentAction-EEVSOQOJ.js → removeDialogAgentAction-GWHBWF4W.js} +22 -26
- package/{runAgentClientLoop-U7V32UTD.js → runAgentClientLoop-EKD2EEEA.js} +117 -82
- package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-IALUR5BZ.js} +23 -16
- package/{secretCommands-KVVZS7A6.js → secretCommands-CSTQYB6T.js} +2 -2
- package/{setDialogExtraReferencesAction-DNO5POHA.js → setDialogExtraReferencesAction-RL6FGO7T.js} +16 -17
- package/{setPrimaryDialogAgentAction-QABBEO4C.js → setPrimaryDialogAgentAction-XJASBB3K.js} +23 -27
- package/{settingThunks-DVKG4X4S.js → settingThunks-ZT7ZYXXL.js} +170 -497
- package/{skillDiscovery-5GEGWJ6N.js → skillDiscovery-IUEZZG2B.js} +3 -3
- package/{spaceCommands-7QKXKBDQ.js → spaceCommands-65WQHVOI.js} +68 -57
- package/spacePruneCommand-PTMRUWYJ.js +233 -0
- package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
- package/{streamAgentChatTurn-UAGFOXNJ.js → streamAgentChatTurn-B5NICHZW.js} +225 -137
- package/{switchDialogAgentAction-KYWJSGOO.js → switchDialogAgentAction-X6DFOIAX.js} +19 -23
- package/{tableCommands-EFA754RE.js → tableCommands-6E77VD73.js} +28 -49
- package/{toolApiClient-N5PYW2R3.js → toolApiClient-GTTWEV6P.js} +15 -4
- package/{tools-2Q2LBDUC.js → tools-UMCPIQX6.js} +73 -63
- package/{tuiRestart-4QDWLHYZ.js → tuiRestart-O7UDLNQU.js} +20 -13
- package/tuiSummaryLlmCaller-7APIUIIV.js +52 -0
- package/{updateCommands-GJGRS6JK.js → updateCommands-DXDIAQFS.js} +12 -7
- package/{updateDialogTitleAction-GGNTTI5L.js → updateDialogTitleAction-HZLKWVKM.js} +57 -58
- package/{usageCommand-WI6SQOPB.js → usageCommand-WYLNBDHB.js} +6 -8
- package/{usageRebuildCommand-WQRLLZAT.js → usageRebuildCommand-AEUPY2PE.js} +11 -15
- package/{windowsSelfUpdate-C7LGVWYX.js → windowsSelfUpdate-SXSVXK4X.js} +2 -2
- package/workContext-ZAW6VXT7.js +18 -0
- package/workContextQueryProjection-CACY5VFE.js +23 -0
- package/{workloadLifecycle-DYX5ZMAT.js → workloadLifecycle-P2SJVV3S.js} +1 -1
- package/agentFavoriteCommands-7LOP3HUD.js +0 -186
- package/agentRecordCommands-TPE7NSZ6.js +0 -194
- package/agentRunCommand-DMVGBPLI.js +0 -232
- package/chunk-2MBTWINN.js +0 -89
- package/chunk-523DITKR.js +0 -32
- package/chunk-BUDVRYES.js +0 -2213
- package/chunk-BZMDWGQQ.js +0 -47
- package/chunk-GAHJLSDO.js +0 -107
- package/chunk-GYX6XTAI.js +0 -84
- package/chunk-HNUWUO75.js +0 -93
- package/chunk-HSBHS6KT.js +0 -33401
- package/chunk-KG27JIG4.js +0 -136
- package/chunk-OB4FBZXJ.js +0 -364
- package/chunk-OKH74FML.js +0 -3746
- package/chunk-OLZBQWZU.js +0 -6
- package/chunk-OOV5JN25.js +0 -1317
- package/chunk-OQFOE4SJ.js +0 -405
- package/chunk-PXYBUFDB.js +0 -53
- package/chunk-R3FZHW4Q.js +0 -103
- package/chunk-R3MV2GII.js +0 -106
- package/chunk-SCAC3NM5.js +0 -11751
- package/chunk-SR4FE5VD.js +0 -9
- package/chunk-SYTHYBMI.js +0 -3558
- package/chunk-UKZX3NHN.js +0 -48
- package/chunk-UVLYNWIE.js +0 -74
- package/chunk-VQX5JJNI.js +0 -861
- package/chunk-X4O7FJF5.js +0 -160
- package/chunk-YJPK35HB.js +0 -175
- package/chunk-YNIYE47Z.js +0 -105
- package/chunk-Z4PCXPUE.js +0 -127
- package/chunk-ZR5IVL4N.js +0 -862
- package/chunk-ZTHAJU3O.js +0 -2537
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +0 -22
- package/cliLocalAgentRecordReader-34UKRBLY.js +0 -104
- package/deleteFile-ECU6FU5C.js +0 -55
- package/localRuntimeAuthority-UF2DAQ3F.js +0 -28
- package/machineWsRunDispatch-TBVOYOAH.js +0 -209
- package/markdownToSlate-PXYAIBVL.js +0 -8
- package/tuiSummaryLlmCaller-HROLGN4F.js +0 -45
- package/webapi-QVV65DQF.js +0 -2487
- package/workContext-Y3ADAPZU.js +0 -14
- package/{chunk-USGHJSGO.js → chunk-GX2MFKF3.js} +3 -3
- package/{chunk-PHREU2KZ.js → chunk-WX266G2C.js} +0 -0
- package/{chunk-DXWGFL2Z.js → chunk-YY7IGJMN.js} +3 -3
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// packages/agent-runtime/memoryUseGuidance.ts
|
|
2
|
+
var MEMORY_USE_GUIDANCE = `--- \u8BB0\u5FC6\u4F7F\u7528\u65B9\u5F0F ---
|
|
3
|
+
- \u4F18\u5148\u7EA7\uFF1A\u8BB0\u5FC6\u662F\u4E2A\u6027\u5316\u589E\u5F3A\u5C42\uFF0C\u4F4E\u4E8E\u5F53\u524D\u8F93\u5165/\u5BF9\u8BDD/\u7CFB\u7EDF\u89C4\u5219/prompt/skill/\u5168\u5C40\u504F\u597D\u3002\u5F53\u524D\u8F93\u5165\u7ED9\u51FA\u65B0\u8BED\u8A00\u3001\u6280\u672F\u6808\u3001\u6570\u503C\u3001\u7EA6\u675F\u6216\u660E\u786E\u8986\u76D6\u65E7\u504F\u597D\u65F6\uFF0C\u91C7\u7528\u5F53\u524D\u8F93\u5165\uFF0C\u4E0D\u8981\u628A\u65E7\u8BB0\u5FC6\u5F53\u66F4\u9AD8\u771F\u503C\u3002
|
|
4
|
+
- \u5448\u73B0\u4E0E\u5B9A\u4F4D\uFF1A\u8EAB\u4EFD/\u504F\u597D/\u80CC\u666F\u5728\u76F8\u5173\u5904\u81EA\u7136\u4F53\u73B0\uFF08\u5F00\u573A\u79F0\u547C\u3001\u4E0A\u4E0B\u6587\u786E\u8BA4\u3001\u56DE\u7B54\u7ED3\u6784\u3001\u53D6\u820D\u6807\u51C6\uFF09\uFF0C\u4E0D\u8981\u6BCF\u53E5\u673A\u68B0\u79F0\u547C\u7528\u6237\uFF1B\u201C\u4E0A\u6B21/\u7EE7\u7EED/\u8FD9\u4E2A\u9879\u76EE\u201D\u4F18\u5148\u6309\u5F53\u524D dialog/space/project/agent/sourceDialog \u7B49 KV \u8DEF\u5F84\u548C\u65F6\u95F4\u7EBF\u5B9A\u4F4D\uFF0C\u4E0D\u8981\u53EA\u6309\u8BED\u4E49\u76F8\u4F3C\u5EA6\u635E\u4E00\u6761\u3002
|
|
5
|
+
- \u63A8\u65AD\u4E0E\u504F\u597D\u6F14\u5316\uFF1A\u63A8\u65AD\u578B\u8BB0\u5FC6\uFF08inferred\uFF09\u53EA\u7528\u4E8E\u628A\u63E1\u8BED\u6C14\u3001\u72B6\u6001\u548C\u672A\u5B8C\u6210\u4E8B\u9879\uFF0C\u4E0D\u8981\u8BF4\u6210\u201C\u4F60\u660E\u786E\u544A\u8BC9\u8FC7\u6211\u201D\uFF0C\u51B2\u7A81\u65F6\u8BF4\u660E\u4F9D\u636E\u6216\u786E\u8BA4\uFF1B\u8DE8\u4F1A\u8BDD\u660E\u786E\u504F\u597D\u8BB0 stated\uFF0C\u53CD\u590D\u89C2\u5BDF\u53EF\u8BB0 inferred\uFF0C\u4E00\u6B21\u6027\u63AA\u8F9E\u4E0D\u56FA\u5316\uFF1B\u7B80\u6D01/\u8BED\u6C14\u504F\u597D\u4E0D\u7701\u7565\u5FC5\u8981\u4E8B\u5B9E\u3001\u98CE\u9669\u6216\u6743\u9650\u8FB9\u754C\u3002\u7F6E\u4FE1\u5EA6\uFF08verified/stated/inferred\uFF09\u3001\u53EC\u56DE\u4E0E\u5220\u9664\u8FB9\u754C\u4EE5\u5DE5\u5177 schema \u4E3A\u51C6\u3002
|
|
6
|
+
- \u5DE5\u4F5C\u63A5\u7EED\uFF08\u975E\u957F\u671F\u504F\u597D\uFF0C\u4EA6\u975E\u6267\u884C\u771F\u6E90\uFF09\uFF1A\u662F\u5F85\u6838\u5B9E\u7D22\u5F15\uFF0C\u4E0D\u4E0E\u504F\u597D\u6DF7\u5199\u3002\u72B6\u6001\uFF08active/paused/completed/cancelled\uFF09\u53EA\u662F\u5199\u5165\u65F6\u5224\u65AD\uFF0C\u975E\u6388\u6743\u6216\u9A8C\u6536\uFF1Bcompleted \u53EF\u6838\u5B9E\u56DE\u6539 active\uFF0Cpaused/cancelled \u4E0D\u81EA\u52A8\u6062\u590D\u4E5F\u4E0D\u5F97\u62D2\u7528\u6237\u7EE7\u7EED\uFF0C\u5F53\u524D\u6307\u4EE4\u4F18\u5148\u3002\u4EC5\u5728\u589E\u91CF\u4E8B\u4EF6\uFF08\u4EA4\u529E/\u53D8\u66F4/\u5173\u952E\u7ED3\u679C/\u72B6\u6001\u53D8\u5316\uFF09\u66F4\u65B0\u3001\u91CD\u8BD5\u590D\u7528\u540C\u6761\u4E0D\u9020\u526F\u672C\uFF1B\u884C\u52A8\u524D\u6309\u6765\u6E90\u6838\u5B9E\u73B0\u72B6\uFF0C\u201C\u505A\u5B8C\u4E86\u201D\u987B\u6709\u53EF\u6838\u5B9E\u8303\u56F4\u3002
|
|
7
|
+
- \u5DE5\u5177\u4E0E\u53EF\u9760\u6027\uFF1A\u4E2A\u4EBA\u8868\u8FBE\u3001\u8BED\u6C14\u3001\u56DE\u590D\u7ED3\u6784\u7B49\u957F\u671F\u504F\u597D\u7528\u666E\u901A rememberMemory\uFF08scope=user\uFF0C\u7701\u7565 mode\uFF09\uFF0C\u4E0D\u662F\u5DE5\u4F5C\u63A5\u7EED\u3002\u5DE5\u4F5C\u8BB0\u5FC6\u4EC5\u7528\u4E8E\u5B9E\u9645\u4EA4\u529E\uFF1B\u65B0\u5EFA\u9700\u8981\u771F\u5B9E\u76EE\u6807\uFF0C\u66F4\u65B0\u82E5\u76EE\u6807\u672A\u53D8\u5219\u7701\u7565 goal\u3002\u6821\u9A8C\u5931\u8D25\u53EA\u5728\u6709\u4F9D\u636E\u80FD\u6539\u6B63\u65F6\u518D\u8BD5\uFF1B\u5426\u5219\u5982\u5B9E\u8BF4\u660E\u672A\u5199\u5165\uFF0C\u7EE7\u7EED\u56DE\u590D\u7528\u6237\u3002\u53C2\u6570\u4EE5\u5DE5\u5177 schema \u4E3A\u51C6\uFF1B\u672C\u5730\u4F18\u5148\u4E0D\u627F\u8BFA\u79BB\u7EBF\u8DE8\u7AEF\u540C\u6B65\u3002
|
|
8
|
+
- \u8DE8\u4F1A\u8BDD\u6253\u6270\u504F\u597D\uFF08\u975E\u4E00\u6B21\u6027\u8981\u6C42\uFF09\u7528 rememberMemory \u8BB0\u4E3A\u7528\u6237\u504F\u597D\uFF0C\u6309\u5176\u8C03\u6574 ignore/FYI/important \u8BE6\u7565\uFF0C\u4F46\u7EDD\u4E0D\u9759\u9ED8 decision/blocked/failed\u3002`;
|
|
9
|
+
|
|
10
|
+
// packages/agent-runtime/userResponseLanguage.ts
|
|
11
|
+
var LANGUAGE_NAMES = {
|
|
12
|
+
en: "English",
|
|
13
|
+
"en-US": "English",
|
|
14
|
+
"en-GB": "English",
|
|
15
|
+
zh: "Simplified Chinese",
|
|
16
|
+
"zh-CN": "Simplified Chinese",
|
|
17
|
+
"zh-TW": "Traditional Chinese",
|
|
18
|
+
"zh-HK": "Traditional Chinese",
|
|
19
|
+
ja: "Japanese",
|
|
20
|
+
"ja-JP": "Japanese",
|
|
21
|
+
ko: "Korean",
|
|
22
|
+
"ko-KR": "Korean",
|
|
23
|
+
fr: "French",
|
|
24
|
+
de: "German",
|
|
25
|
+
es: "Spanish",
|
|
26
|
+
pt: "Portuguese",
|
|
27
|
+
ru: "Russian"
|
|
28
|
+
};
|
|
29
|
+
var LANGUAGE_DISPLAY_NAMES = typeof Intl.DisplayNames === "function" ? new Intl.DisplayNames(["en"], { type: "language" }) : void 0;
|
|
30
|
+
var asLocale = (value) => typeof value === "string" ? value.trim().split(".", 1)[0]?.replace(/_/g, "-") ?? "" : "";
|
|
31
|
+
var normalizeLocale = (value) => {
|
|
32
|
+
if (!value) return "en-US";
|
|
33
|
+
let canonical;
|
|
34
|
+
try {
|
|
35
|
+
[canonical] = Intl.getCanonicalLocales(value);
|
|
36
|
+
} catch {
|
|
37
|
+
return "en-US";
|
|
38
|
+
}
|
|
39
|
+
const [language, first, second] = canonical.split("-");
|
|
40
|
+
const script = first?.length === 4 && /^[A-Za-z]+$/.test(first) ? first : void 0;
|
|
41
|
+
const regionPart = script ? second : first;
|
|
42
|
+
const region = regionPart && /^(?:[A-Z]{2}|[0-9]{3})$/.test(regionPart) ? regionPart : void 0;
|
|
43
|
+
if (language === "zh") {
|
|
44
|
+
if (script === "Hant" || region === "TW" || region === "HK" || region === "MO") {
|
|
45
|
+
return "zh-TW";
|
|
46
|
+
}
|
|
47
|
+
return "zh-CN";
|
|
48
|
+
}
|
|
49
|
+
if (language === "en") return region === "GB" ? "en-GB" : "en-US";
|
|
50
|
+
if (region) return `${language}-${region}`;
|
|
51
|
+
return language;
|
|
52
|
+
};
|
|
53
|
+
var resolveUserResponseLanguage = (input = {}) => {
|
|
54
|
+
const raw = asLocale(input.language) || "en-US";
|
|
55
|
+
const locale = normalizeLocale(raw);
|
|
56
|
+
return {
|
|
57
|
+
locale,
|
|
58
|
+
languageName: LANGUAGE_NAMES[locale] ?? LANGUAGE_NAMES[locale.split("-")[0]] ?? LANGUAGE_DISPLAY_NAMES?.of(locale) ?? locale
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
var buildUserResponseLanguageContext = (input = {}) => {
|
|
62
|
+
const { locale, languageName } = resolveUserResponseLanguage(input);
|
|
63
|
+
return [
|
|
64
|
+
"--- \u5E73\u53F0\u56DE\u590D\u8BED\u8A00\u7B56\u7565 ---",
|
|
65
|
+
`\u7528\u6237\u5BA2\u6237\u7AEF\u8BED\u8A00\uFF1A${languageName}\uFF08${locale}\uFF09`,
|
|
66
|
+
"\u9ED8\u8BA4\u4F7F\u7528\u7528\u6237\u5BA2\u6237\u7AEF\u8BED\u8A00\u56DE\u590D\u3002",
|
|
67
|
+
"\u7528\u6237\u5728\u5F53\u524D\u5BF9\u8BDD\u4E2D\u660E\u786E\u8981\u6C42\u4F7F\u7528\u5176\u4ED6\u8BED\u8A00\u65F6\uFF0C\u9075\u5FAA\u7528\u6237\u7684\u660E\u786E\u8981\u6C42\u3002",
|
|
68
|
+
"\u5355\u4E2A\u901A\u7528\u8BCD\u6216\u77ED\u8BED\uFF08\u4F8B\u5982 hi\u3001ok\u3001thanks\uFF09\u4E0D\u6539\u53D8\u5DF2\u7ECF\u5EFA\u7ACB\u7684\u4EA4\u6D41\u8BED\u8A00\u3002",
|
|
69
|
+
"Agent \u7684\u89D2\u8272\u3001skill\u3001model \u4E0D\u5F97\u81EA\u884C\u8986\u76D6\u8FD9\u6761\u5E73\u53F0\u56DE\u590D\u8BED\u8A00\u7B56\u7565\u3002"
|
|
70
|
+
].join("\n");
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
MEMORY_USE_GUIDANCE,
|
|
75
|
+
buildUserResponseLanguageContext
|
|
76
|
+
};
|
|
@@ -311,99 +311,12 @@ async function chromeConnectorUnavailableFunc() {
|
|
|
311
311
|
throw new Error("Browser connector tools are only executable in the Nolo desktop local runtime.");
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
// packages/agent-runtime/toolNameAliases.ts
|
|
315
|
-
var LEGACY_TOOL_NAME_ALIASES = {
|
|
316
|
-
// Nolo Browser Connector: legacy chrome_* → canonical browser_*
|
|
317
|
-
...CHROME_CONNECTOR_LEGACY_TOOL_ALIASES,
|
|
318
|
-
createPage: "createDoc",
|
|
319
|
-
updatePage: "updateDoc",
|
|
320
|
-
update_page: "updateDoc",
|
|
321
|
-
create_page: "createDoc",
|
|
322
|
-
fetchwebpage: "fetchWebpage",
|
|
323
|
-
fetch_webpage: "fetchWebpage",
|
|
324
|
-
"fetch-page": "fetchWebpage",
|
|
325
|
-
exasearch: "exa_search",
|
|
326
|
-
"exa-search": "exa_search",
|
|
327
|
-
exa_search: "exa_search",
|
|
328
|
-
firecrawlscrape: "firecrawl_scrape",
|
|
329
|
-
"firecrawl-scrape": "firecrawl_scrape",
|
|
330
|
-
firecrawl_scrape: "firecrawl_scrape",
|
|
331
|
-
firecrawlsearch: "firecrawl_search",
|
|
332
|
-
"firecrawl-search": "firecrawl_search",
|
|
333
|
-
firecrawl_search: "firecrawl_search",
|
|
334
|
-
readDoc: "readDoc",
|
|
335
|
-
readpage: "readDoc",
|
|
336
|
-
read_page: "readDoc",
|
|
337
|
-
read_doc: "readDoc",
|
|
338
|
-
createdoc: "createDoc",
|
|
339
|
-
updateDocTool: "updateDoc",
|
|
340
|
-
terminalCommand: "execShell",
|
|
341
|
-
terminal_command: "execShell",
|
|
342
|
-
runCommand: "execShell",
|
|
343
|
-
run_command: "execShell",
|
|
344
|
-
runInBash: "execShell",
|
|
345
|
-
run_in_bash: "execShell",
|
|
346
|
-
executeCommand: "execShell",
|
|
347
|
-
execute_command: "execShell",
|
|
348
|
-
// Codex CLI 风格工具名 → nolo 原生工具名
|
|
349
|
-
bash: "execShell",
|
|
350
|
-
shell: "execShell",
|
|
351
|
-
read: "readFile",
|
|
352
|
-
edit: "editFile",
|
|
353
|
-
write: "writeFile",
|
|
354
|
-
glob: "globFiles",
|
|
355
|
-
grep: "searchFiles",
|
|
356
|
-
rg: "searchFiles",
|
|
357
|
-
grepFiles: "searchFiles",
|
|
358
|
-
grep_files: "searchFiles",
|
|
359
|
-
search_files: "searchFiles",
|
|
360
|
-
// 联网搜索别名
|
|
361
|
-
web_search: "exa_search",
|
|
362
|
-
websearch: "exa_search",
|
|
363
|
-
search_web: "exa_search",
|
|
364
|
-
searchweb: "exa_search",
|
|
365
|
-
webfetch: "fetchWebpage",
|
|
366
|
-
web_fetch: "fetchWebpage",
|
|
367
|
-
fetchweb: "fetchWebpage",
|
|
368
|
-
fetch_web: "fetchWebpage",
|
|
369
|
-
// 模型偶尔会把 loadSkill 幻觉成 readSkill(参数风格 name= 一致),
|
|
370
|
-
// 规范化到 loadSkill,避免 localToolPolicy 把这种调用直接拦死。
|
|
371
|
-
readSkill: "loadSkill"
|
|
372
|
-
};
|
|
373
|
-
var normalizeToolName = (name) => name.replace(/[-_]/g, "").toLowerCase();
|
|
374
|
-
var canonicalizeToolName = (rawName) => {
|
|
375
|
-
const trimmedName = rawName.trim();
|
|
376
|
-
if (!trimmedName) return rawName;
|
|
377
|
-
if (LEGACY_TOOL_NAME_ALIASES[trimmedName]) {
|
|
378
|
-
return LEGACY_TOOL_NAME_ALIASES[trimmedName];
|
|
379
|
-
}
|
|
380
|
-
const normalizedRawName = normalizeToolName(trimmedName);
|
|
381
|
-
const matchedAlias = Object.entries(LEGACY_TOOL_NAME_ALIASES).find(
|
|
382
|
-
([alias]) => normalizeToolName(alias) === normalizedRawName
|
|
383
|
-
);
|
|
384
|
-
return matchedAlias?.[1] ?? trimmedName;
|
|
385
|
-
};
|
|
386
|
-
var canonicalizeToolNames = (toolNames) => Array.from(
|
|
387
|
-
new Set(
|
|
388
|
-
toolNames.filter((toolName) => typeof toolName === "string").map(canonicalizeToolName)
|
|
389
|
-
)
|
|
390
|
-
);
|
|
391
|
-
var prioritizeToolNames = (toolNames, preferredToolNames) => {
|
|
392
|
-
const canonicalTools = canonicalizeToolNames(toolNames);
|
|
393
|
-
const preferred = new Set(canonicalizeToolNames(preferredToolNames));
|
|
394
|
-
const prioritized = canonicalTools.filter((toolName) => preferred.has(toolName));
|
|
395
|
-
const remaining = canonicalTools.filter((toolName) => !preferred.has(toolName));
|
|
396
|
-
return [...prioritized, ...remaining];
|
|
397
|
-
};
|
|
398
|
-
|
|
399
314
|
export {
|
|
315
|
+
CHROME_CONNECTOR_LEGACY_TOOL_ALIASES,
|
|
400
316
|
CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES,
|
|
401
317
|
canonicalizeChromeConnectorToolNames,
|
|
402
318
|
getChromeConnectorToolBehavior,
|
|
403
319
|
getChromeConnectorToolDefaultConsent,
|
|
404
320
|
chromeConnectorToolSchemas,
|
|
405
|
-
chromeConnectorUnavailableFunc
|
|
406
|
-
canonicalizeToolName,
|
|
407
|
-
canonicalizeToolNames,
|
|
408
|
-
prioritizeToolNames
|
|
321
|
+
chromeConnectorUnavailableFunc
|
|
409
322
|
};
|
|
@@ -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-DKJQEFNG.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-AEUPY2PE.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-KMXS7JP5.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
|
+
};
|