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.
- package/README.md +3 -5
- package/{_executeModel-VYCHHZVT.js → _executeModel-AKCTHGMP.js} +89 -83
- package/{accountResolver-QETKNC7T.js → accountResolver-NGICIMEE.js} +1 -1
- package/{action-GDZDXPMB.js → action-C6IQAKN4.js} +8 -5
- package/{addContentAction-7RO4AMRI.js → addContentAction-53364YDW.js} +13 -12
- package/{addDialogAgentAction-EVYBGTXB.js → addDialogAgentAction-U5DD5EN5.js} +16 -15
- package/{agentDeleteCommand-QWQKT54A.js → agentDeleteCommand-2E5FAGUO.js} +128 -115
- package/{agentEmailCommands-EISMBIRE.js → agentEmailCommands-UGZZAH7E.js} +128 -111
- package/{agentListCommands-4WLG32IW.js → agentListCommands-JCTW3J2K.js} +398 -179
- package/{agentMachineCommands-DC6NKWTU.js → agentMachineCommands-QPG5ZXF4.js} +58 -47
- package/{agentProviderCommands-STI3DQ6A.js → agentProviderCommands-QLTABYR7.js} +2 -2
- package/{agentPullCommand-KHV4EELF.js → agentPullCommand-2EYJ5ENC.js} +1 -1
- package/agentRecordCommands-4NTVR6MZ.js +194 -0
- package/agentRunCommand-VHF34PYC.js +232 -0
- package/{agentRunControl-MBG4U6SL.js → agentRunControl-QYTXUQGY.js} +14 -9
- package/{agentRuntimeLocal-HOXKWCYO.js → agentRuntimeLocal-U54AKHXH.js} +58 -43
- package/{agentSlice-UG76KEBH.js → agentSlice-4JGDEXWK.js} +14 -13
- package/{appDeleteCommands-WWCC6WA5.js → appDeleteCommands-XBE5QJ6P.js} +58 -47
- package/{appDeployCommands-AU4IUN33.js → appDeployCommands-QIYLXXGA.js} +58 -47
- package/{appDeployStatusCommands-STUW7WXL.js → appDeployStatusCommands-JXS6ZQZZ.js} +58 -47
- package/{appGetCommands-BGTLIQ4K.js → appGetCommands-SZS7SJPK.js} +58 -47
- package/{appListCommands-CUCPRUXW.js → appListCommands-B3GBJSNV.js} +58 -47
- package/{authCommand-OZ2KTP4Z.js → authCommand-V6EOMZX6.js} +25 -19
- package/{authCommands-55OGQGCR.js → authCommands-T5FODCEG.js} +12 -6
- package/{builtinSkillRegistry-BAE2LDXF.js → builtinSkillRegistry-ZQC3IIO2.js} +8 -7
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-O4IIKTBD.js} +384 -7
- package/{chromeOpsCommands-WAA45NCS.js → chromeOpsCommands-OFX7ZGKP.js} +3 -3
- package/{chunk-DBUR22G5.js → chunk-223KZUJ6.js} +19 -15
- package/{chunk-3U44JB3O.js → chunk-2C5VN7NH.js} +1 -1
- package/{chunk-PWTNI4N7.js → chunk-2E4BYAUE.js} +22 -0
- package/{chunk-L32W3PRP.js → chunk-2FZVXOFX.js} +234 -18
- package/{chunk-HBRDSQ3M.js → chunk-2JHGUL5K.js} +3 -2
- package/chunk-2SXN7LAY.js +15 -0
- package/chunk-3A5NNQCN.js +64 -0
- package/chunk-3F2FRLIO.js +372 -0
- package/{chunk-DEA37IUY.js → chunk-46FETNLF.js} +2 -2
- package/{chunk-ZEVQHCLM.js → chunk-4GYVS4PM.js} +8 -6
- package/{chunk-CBUZ6DKA.js → chunk-4YPH5KRA.js} +1 -1
- package/chunk-4ZCTKB27.js +31 -0
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-7FEP5USX.js → chunk-5AYP5QBB.js} +5 -5
- package/{chunk-XAG3FWBE.js → chunk-5ISNPTQH.js} +5 -5
- package/{chunk-EVGU5P4U.js → chunk-5P3PPQVP.js} +1 -1
- package/{chunk-XSW4EXQV.js → chunk-6BMTKYAO.js} +55 -18
- package/chunk-6PAHSSD2.js +33401 -0
- package/{chunk-ZOHO6MOF.js → chunk-6RSNVJGO.js} +2 -99
- package/{chunk-7JGMNKKG.js → chunk-6SOWMEAY.js} +30 -9
- package/{chunk-RG2DGNL6.js → chunk-6VEO7Z3Y.js} +3 -3
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-DGYCDA6W.js → chunk-7BIJFGKS.js} +36 -17
- package/{chunk-WFDNADFX.js → chunk-7OVOZRZF.js} +8 -8
- package/{chunk-WCFFRBL5.js → chunk-7PON4LBY.js} +45 -27
- package/{chunk-QRGDJA4B.js → chunk-7WHCIA5V.js} +33 -7
- package/{chunk-CMMI3DAT.js → chunk-ADYWV732.js} +59 -30
- package/{chunk-QYB23WUH.js → chunk-AIFQKNPP.js} +1 -1
- package/{chunk-HGDKT2D6.js → chunk-BPB3T5EU.js} +174 -1
- package/{chunk-DUUDXSLX.js → chunk-BZLGPM5B.js} +28 -4
- package/{chunk-ATEKLSLR.js → chunk-BZMDWGQQ.js} +14 -9
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-S6K5F3KP.js → chunk-CEKRIR22.js} +1 -1
- package/{chunk-42OKN2LI.js → chunk-D634SL2Y.js} +9 -107
- package/{chunk-DLXMMTGM.js → chunk-DHRPLRIR.js} +1283 -786
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-OBIC6EG7.js → chunk-DNNPARJK.js} +9 -5
- package/{chunk-X3E6EHJW.js → chunk-E3LSO6EI.js} +292 -207
- package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
- package/chunk-EHFBP6IK.js +791 -0
- package/chunk-EJQE5HB7.js +21 -0
- package/{chunk-VQ5N5GSV.js → chunk-EL5NRJHI.js} +4 -4
- package/chunk-EUGTFFO6.js +42 -0
- package/{chunk-7BCG67EI.js → chunk-EVHTYVD2.js} +1199 -442
- package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
- package/{chunk-262R3XNN.js → chunk-FEIVARWR.js} +377 -112
- package/{chunk-3VZLEKV2.js → chunk-FLBJ7IJI.js} +14 -14
- package/{chunk-EEOOBRA7.js → chunk-FXEPZKNJ.js} +13 -6
- package/{chunk-XTJKU3Z4.js → chunk-FYAMUU55.js} +677 -140
- package/{chunk-M3OZRQNH.js → chunk-FZANZZ63.js} +1 -1
- package/chunk-GAHJLSDO.js +107 -0
- package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
- package/{chunk-4N6G2CKP.js → chunk-HDKMVYNJ.js} +47 -1
- package/chunk-HEVRQGGH.js +106 -0
- package/{chunk-BIWI5M4E.js → chunk-HFHJPHFK.js} +1 -1
- package/{chunk-R6Z5S5GA.js → chunk-HPDLPEUG.js} +60 -17
- package/{chunk-YKY4OVOX.js → chunk-HQUGB2HM.js} +17 -170
- package/chunk-IIRJ4P4I.js +24 -0
- package/chunk-IVK2KT3H.js +209 -0
- package/{chunk-ALAES342.js → chunk-IYLUK67R.js} +9 -5
- package/{chunk-N5Z2V73W.js → chunk-J55F3IEZ.js} +1 -1
- package/{chunk-S6FDXXZV.js → chunk-J7JRCOIW.js} +2 -2
- package/{chunk-OWKNSIXL.js → chunk-JAKRY74O.js} +470 -83
- package/{chunk-VS276URX.js → chunk-JCQ3WCQ3.js} +4 -2
- package/chunk-JLZJL3WC.js +988 -0
- package/{chunk-OBSEKCVK.js → chunk-JPXACKSW.js} +219 -52
- package/{chunk-OTKSESZR.js → chunk-KDBDOXOM.js} +138 -54
- package/{chunk-VP3BINY7.js → chunk-KDDHQMSH.js} +31 -1
- package/{chunk-RBPUNSG5.js → chunk-KG27JIG4.js} +18 -108
- package/{chunk-4WVJLODK.js → chunk-KHYSFS3W.js} +88 -7
- package/{chunk-TCZ2VJZQ.js → chunk-KKIQAVDR.js} +9 -9
- package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
- package/chunk-KXOPLLFP.js +190 -0
- package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
- package/{chunk-HYLRQDEE.js → chunk-LLUBUHNT.js} +6 -6
- package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
- package/{chunk-RTHFJZ6M.js → chunk-LVZVSLKO.js} +29 -9
- package/{chunk-TI2EPRHE.js → chunk-MNFUKRRU.js} +3 -3
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-CNMY2XM6.js → chunk-O3A2CHAL.js} +6 -6
- package/{chunk-TSPMLCWI.js → chunk-OB4FBZXJ.js} +5 -5
- package/{chunk-LYD6C7OU.js → chunk-OJSJJKHF.js} +6 -6
- package/{chunk-M4SFKP5L.js → chunk-OKAXQFON.js} +3 -3
- package/{chunk-CD3RU7XL.js → chunk-OKH74FML.js} +121 -14
- package/{chunk-U2HBB7RS.js → chunk-OOV5JN25.js} +130 -30
- package/{chunk-ZH3KXFHS.js → chunk-OOVOAG4Q.js} +1 -1
- package/chunk-OQFOE4SJ.js +405 -0
- package/{chunk-M3JEW6N6.js → chunk-OYUMJMC5.js} +15 -0
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-SRCCSTIM.js → chunk-P4R5KXU7.js} +4 -4
- package/{chunk-FJ23FZXF.js → chunk-PHREU2KZ.js} +5 -3
- package/{chunk-HSSBDZLD.js → chunk-PIVTQRX6.js} +43 -13
- package/{chunk-XFXFPUO7.js → chunk-PJL7OJRC.js} +13 -39
- package/{chunk-RRDRQOEC.js → chunk-PNLDLUMO.js} +276 -303
- package/{chunk-4I2MXV5Q.js → chunk-PVFYPUIM.js} +2 -0
- package/{chunk-HHFGE2WF.js → chunk-QGFLVQ6E.js} +5 -5
- package/{chunk-EGHP7KOY.js → chunk-QONAOHVW.js} +38 -29
- package/chunk-R3FZHW4Q.js +103 -0
- package/{chunk-ZYKJBRZ3.js → chunk-R3MV2GII.js} +1 -47
- package/chunk-R72QWIFO.js +50 -0
- package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
- package/{chunk-ILHQ2AXT.js → chunk-RIWKZT7E.js} +36 -8
- package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
- package/{chunk-45CAVC35.js → chunk-S7H4KTMB.js} +2568 -337
- package/{chunk-OJ45MEEI.js → chunk-SA356NGW.js} +1 -1
- package/{chunk-F6Z6ZCUV.js → chunk-SCAC3NM5.js} +3 -3
- package/{chunk-YVFH2MFB.js → chunk-SLUN7W6S.js} +7 -7
- package/chunk-SQL7YNED.js +650 -0
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-HF7BLF3F.js → chunk-SSOR2EDT.js} +107 -104
- package/chunk-TRRXYFTR.js +46 -0
- package/{chunk-3QIYD3VM.js → chunk-TUOHSUK5.js} +20068 -18402
- package/chunk-TYJCIA2O.js +835 -0
- package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
- package/{chunk-GAYNXB6T.js → chunk-U3BUWDUP.js} +1031 -2155
- package/{chunk-BP5ZJ6B4.js → chunk-U6QNVOR5.js} +1 -1
- package/{chunk-UAIHKQIA.js → chunk-U6RD332P.js} +18 -2
- package/chunk-UAF5VQCE.js +77 -0
- package/{chunk-TQEKUOTI.js → chunk-UFGUJ2IH.js} +12 -12
- package/{chunk-VMJVAJ6W.js → chunk-UP7KBWLE.js} +109 -33
- package/{chunk-2X7WFDT6.js → chunk-UUCYUN6Y.js} +1 -1
- package/{chunk-5YMA6DDZ.js → chunk-UZKBVQUX.js} +1 -1
- package/chunk-V5TI7HJH.js +133 -0
- package/{chunk-WFGNWWJI.js → chunk-VH7UO6E5.js} +252 -114
- package/{chunk-MNEZUL5S.js → chunk-VJFDG3ZG.js} +63 -94
- package/{chunk-G7IUT2V3.js → chunk-WC3J5SL2.js} +635 -350
- package/{chunk-HXB4VDGK.js → chunk-WD5547ZF.js} +33 -30
- package/chunk-WDWZPASX.js +29 -0
- package/{chunk-4ZGPHFLE.js → chunk-WS36XPJD.js} +2 -2
- package/{chunk-6QHKRARD.js → chunk-WSLL7VV4.js} +29 -5
- package/chunk-XRGBJHZX.js +136 -0
- package/{chunk-MZG5CETE.js → chunk-Y2KWJTOZ.js} +4 -4
- package/{dialogUsageCommand-W2WCSGKF.js → chunk-Y2TCTNUD.js} +27 -20
- package/chunk-YJPK35HB.js +175 -0
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-547ENH5T.js → chunk-YN23INFZ.js} +4 -4
- package/{chunk-4QYJPWHH.js → chunk-YXK3GJF5.js} +232 -10
- package/{chunk-MJI3UAXN.js → chunk-Z2OWAYMI.js} +77 -51
- package/{chunk-7Z6EW7AH.js → chunk-ZTHAJU3O.js} +106 -14
- package/{chunk-YFLVRVYK.js → chunk-ZYPXOQS2.js} +1 -1
- package/{cliAgentConfigHelpers-BTRHMPW2.js → cliAgentConfigHelpers-BXHQ3PXP.js} +9 -9
- package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +22 -0
- package/cliLocalAgentRecordReader-47PXMHPH.js +104 -0
- package/{commandRegistry-FVYPE2IN.js → commandRegistry-CTMPAQH2.js} +111 -162
- package/{contentThunks-GNFPG32S.js → contentThunks-CAHIIZO5.js} +38 -36
- package/{cooldownCommands-YB5H5BBK.js → cooldownCommands-WDOI5VD7.js} +3 -3
- package/{createAgentAutomationAction-PB4QIFQ4.js → createAgentAutomationAction-M25XZSPD.js} +38 -36
- package/{createDialogAction-EVTOPY7A.js → createDialogAction-4SN7FKI7.js} +39 -37
- package/{createPageAction-2UYF2IDZ.js → createPageAction-N7QPDN3M.js} +43 -41
- package/{db-M7FU2GNK.js → db-VR74ADGC.js} +7 -2
- package/{dbSlice-XRUZOGSU.js → dbSlice-RWPSVHBC.js} +12 -11
- package/{deleteFile-6URDHYRB.js → deleteFile-ECU6FU5C.js} +15 -7
- package/{dialogCommands-6SZD4TYP.js → dialogCommands-BBHWCKDP.js} +69 -53
- package/dialogMessageRecord-OAV77LT7.js +7 -0
- package/{dialogNotifyCommand-SHGPCU22.js → dialogNotifyCommand-IASQGEMW.js} +11 -11
- package/{dialogSlice-5EQ2A6LY.js → dialogSlice-JI3J22RV.js} +39 -37
- package/dialogTraceCommand-EW2KK6A4.js +961 -0
- package/dialogUsageCommand-WJ3U6KZU.js +27 -0
- package/{docCreateCommands-25E6PGN3.js → docCreateCommands-QSX3X5U4.js} +57 -46
- package/{docDeleteCommands-F7ZVGEHW.js → docDeleteCommands-63JBG2HQ.js} +59 -48
- package/{docReadCommands-JY2E5XEN.js → docReadCommands-CQFKRQUI.js} +57 -46
- package/{docStore-OKKIKLT3.js → docStore-XLBKGGNM.js} +14 -13
- package/{docUpdateCommands-OZ4CUSIQ.js → docUpdateCommands-534LUK25.js} +57 -46
- package/ebookDownloaderAgentCommand-DYSKF5ZY.js +677 -0
- package/fetchMessages-TQEUZD7H.js +1 -1
- package/{getPricing-LF5C4XSI.js → getPricing-5BLZRPTM.js} +4 -4
- package/{handleSendMessageAction-LNT7SZND.js → handleSendMessageAction-Q2VMEVOR.js} +127 -81
- package/{hostCredentialCreate-XUU2CSHI.js → hostCredentialCreate-C57T7YPE.js} +127 -109
- package/index.js +23 -11
- package/{localDialogRead-CCOCVGAP.js → localDialogRead-BJJT3TF5.js} +1 -1
- package/{localRuntimeAdapter-IBSTMSX7.js → localRuntimeAdapter-OALZPFZU.js} +134 -115
- package/localRuntimeAuthority-UF2DAQ3F.js +28 -0
- package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-ZJFGNHML.js} +1 -1
- package/{machineCommands-HSQHDHOT.js → machineCommands-N6IVWRZT.js} +262 -325
- package/machineWsRunDispatch-PDWYB33B.js +209 -0
- package/markdownToSlate-PXYAIBVL.js +8 -0
- package/mcpLocalAuthorizeCommand-KYI4EGF5.js +110 -0
- package/{memberThunks-7Y3OYSJQ.js → memberThunks-43B7UYC5.js} +21 -16
- package/{models-H5NNZRLH.js → models-ZX2BYIMB.js} +2 -2
- package/{overlay-BBQZXGYI.js → overlay-JA3SPVUS.js} +5 -3
- package/package.json +2 -1
- package/{projectArchive-FQO654Z3.js → projectArchive-TJNW5DLM.js} +46 -44
- package/{providerPresetApply-WHAMP2D5.js → providerPresetApply-NTJUINI6.js} +36 -17
- package/{providerRegistry-ZI2KORJ7.js → providerRegistry-W45SLUV6.js} +6 -6
- package/{read-TYMBGEXO.js → read-KG6INYUT.js} +13 -7
- package/{readDocTool-SKQVHBLO.js → readDocTool-N3GA52JR.js} +1 -1
- package/{readlineWorkspace-7U272DSA.js → readlineWorkspace-PJZJVGA5.js} +7486 -4492
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-F5QE2O2B.js → removeDialogAgentAction-EEVSOQOJ.js} +18 -17
- package/{runAgentClientLoop-AF4JQIJ7.js → runAgentClientLoop-3VC5TCDW.js} +107 -76
- package/{runtimeDoctorCommands-RRKPBGVO.js → runtimeDoctorCommands-V3M3JTUV.js} +14 -11
- package/{secretCommands-KZWBZIYS.js → secretCommands-KVVZS7A6.js} +3 -3
- package/{setDialogExtraReferencesAction-72L27ERM.js → setDialogExtraReferencesAction-DNO5POHA.js} +15 -14
- package/{setPrimaryDialogAgentAction-GJJDUSGJ.js → setPrimaryDialogAgentAction-QABBEO4C.js} +18 -17
- package/{settingThunks-ZRGWVGZD.js → settingThunks-DVKG4X4S.js} +181 -66
- package/{skillDiscovery-BHHPCUHZ.js → skillDiscovery-ZMJH36AK.js} +4 -3
- package/{spaceCommands-5VNWMDBE.js → spaceCommands-AGGZXPY3.js} +235 -87
- package/{streamAgentChatTurn-YSPEFY4K.js → streamAgentChatTurn-4GTLL2OF.js} +242 -169
- package/{switchDialogAgentAction-IIJBPND3.js → switchDialogAgentAction-KYWJSGOO.js} +16 -15
- package/{tableCommands-FTAOCBTX.js → tableCommands-EFA754RE.js} +7 -4
- package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
- package/{tools-M35PTIFB.js → tools-5AGPOPLW.js} +69 -65
- package/{tuiRestart-2IL37YIB.js → tuiRestart-77E7PL4R.js} +11 -10
- package/{tuiSummaryLlmCaller-W2QN4VAC.js → tuiSummaryLlmCaller-HROLGN4F.js} +16 -15
- package/{updateCommands-CPATDG6J.js → updateCommands-GJGRS6JK.js} +3 -3
- package/{updateDialogTitleAction-IMIRJRQQ.js → updateDialogTitleAction-5OSEDGRK.js} +40 -38
- package/{usageCommand-2BF74MKF.js → usageCommand-WI6SQOPB.js} +2 -2
- package/{usageRebuildCommand-UHB55BQM.js → usageRebuildCommand-WQRLLZAT.js} +3 -3
- package/webapi-QVV65DQF.js +2487 -0
- package/{windowsSelfUpdate-ZFD6J5HF.js → windowsSelfUpdate-C7LGVWYX.js} +2 -2
- package/workContext-Y3ADAPZU.js +14 -0
- package/workContextAccess-VU5I4LKZ.js +11 -0
- package/workContextWriteNotice-YCSSMHN4.js +7 -0
- package/{workloadLifecycle-HFJIN5IZ.js → workloadLifecycle-P2SJVV3S.js} +2 -2
- package/agentRecordCommands-IZYUVHME.js +0 -177
- package/agentRunCommand-QM7ETUTX.js +0 -209
- package/chunk-2YGBI2XB.js +0 -30
- package/chunk-5ZMIIR23.js +0 -265
- package/chunk-5ZUOVCKT.js +0 -32
- package/chunk-62HXNQVV.js +0 -134
- package/chunk-FJSNBZXR.js +0 -142
- package/chunk-FPBJM2BW.js +0 -689
- package/chunk-JQZRSXS5.js +0 -90
- package/chunk-P2ZLUIW2.js +0 -795
- package/chunk-PPJYZRSQ.js +0 -160
- package/chunk-TUSTONB3.js +0 -81
- package/chunk-ZXF6D3I6.js +0 -359
- package/cliLocalAgentRecordReader-H3HYQRRR.js +0 -91
- package/lib-OT5OTXRU.js +0 -21046
- package/localRuntimeAuthority-IBJAT62G.js +0 -16
- package/machineWsRunDispatch-L6H7J66T.js +0 -192
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
|
@@ -7,68 +7,70 @@ import {
|
|
|
7
7
|
listRemotePublicAgents,
|
|
8
8
|
normalizeListedAgent,
|
|
9
9
|
parseAgentListArgs
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5AYP5QBB.js";
|
|
11
11
|
import {
|
|
12
12
|
refreshSubscriptionQuotas
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-P27E22MA.js";
|
|
14
14
|
import {
|
|
15
15
|
getReadableCliDb
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZYPXOQS2.js";
|
|
17
17
|
import {
|
|
18
18
|
applyCredentialAvailability,
|
|
19
19
|
clearCredentialAvailabilityIfMarkedAt,
|
|
20
20
|
readCredentialAvailability,
|
|
21
21
|
readEffectiveCredentialEntry
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GIXWVN2W.js";
|
|
23
23
|
import {
|
|
24
24
|
buildAgentDiscoveryResult,
|
|
25
|
-
|
|
25
|
+
isLocalDispatchSpeedSource,
|
|
26
|
+
isServerDispatchSpeedSource,
|
|
26
27
|
matchesAgentQuery,
|
|
27
28
|
resolvePaginationArgs,
|
|
28
|
-
summarizeCredentialGroups,
|
|
29
29
|
toDiscoverySafeAgentSummary
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-AMWMV56B.js";
|
|
30
|
+
} from "./chunk-3F2FRLIO.js";
|
|
32
31
|
import {
|
|
33
32
|
buildSpaceLookup,
|
|
34
33
|
getSpaceContentKeys
|
|
35
34
|
} from "./chunk-ID4G2MAR.js";
|
|
36
35
|
import {
|
|
37
36
|
readLiveDbRecordAfterTombstoneMerge
|
|
38
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-FZANZZ63.js";
|
|
39
38
|
import {
|
|
40
39
|
queryUserRecords,
|
|
41
40
|
readDbRecord
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import
|
|
41
|
+
} from "./chunk-UFGUJ2IH.js";
|
|
42
|
+
import {
|
|
43
|
+
injectSpeedContextIntoListAgentsResult,
|
|
44
|
+
summarizeCredentialGroups
|
|
45
|
+
} from "./chunk-PNLDLUMO.js";
|
|
46
|
+
import "./chunk-AMWMV56B.js";
|
|
47
|
+
import {
|
|
48
|
+
listRecentRunRecords,
|
|
49
|
+
resolveRunsDir
|
|
50
|
+
} from "./chunk-JAKRY74O.js";
|
|
51
|
+
import {
|
|
52
|
+
isAgentRunTerminalStatus
|
|
53
|
+
} from "./chunk-S25VJYXV.js";
|
|
44
54
|
import "./chunk-UEILX4EV.js";
|
|
45
55
|
import "./chunk-GBWGPTA7.js";
|
|
46
|
-
import
|
|
47
|
-
|
|
48
|
-
} from "./chunk-OWKNSIXL.js";
|
|
49
|
-
import "./chunk-2X7WFDT6.js";
|
|
50
|
-
import "./chunk-OOJNQK6V.js";
|
|
51
|
-
import "./chunk-BV3FLP2L.js";
|
|
52
|
-
import "./chunk-OJ45MEEI.js";
|
|
53
|
-
import "./chunk-BR3GT6MR.js";
|
|
54
|
-
import "./chunk-3QIYD3VM.js";
|
|
56
|
+
import "./chunk-SA356NGW.js";
|
|
57
|
+
import "./chunk-TUOHSUK5.js";
|
|
55
58
|
import "./chunk-ZNFJWEN4.js";
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-EHFBP6IK.js";
|
|
60
|
+
import "./chunk-OOV5JN25.js";
|
|
61
|
+
import "./chunk-2E4BYAUE.js";
|
|
58
62
|
import "./chunk-AL3TYDIF.js";
|
|
59
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-PIVTQRX6.js";
|
|
60
64
|
import "./chunk-HNUWUO75.js";
|
|
61
65
|
import "./chunk-CHOZJMJS.js";
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-DMPZMYH4.js";
|
|
67
|
+
import "./chunk-5ISNPTQH.js";
|
|
64
68
|
import "./chunk-BYXBJQAS.js";
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
69
|
+
import "./chunk-BZLGPM5B.js";
|
|
70
|
+
import "./chunk-AIFQKNPP.js";
|
|
67
71
|
import "./chunk-56GBUMO5.js";
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-X4O7FJF5.js";
|
|
71
|
-
import "./chunk-MNEZUL5S.js";
|
|
72
|
+
import "./chunk-TYJCIA2O.js";
|
|
73
|
+
import "./chunk-VJFDG3ZG.js";
|
|
72
74
|
import {
|
|
73
75
|
DEFAULT_PROVIDER_RETRY_MS,
|
|
74
76
|
formatQuotaSummary,
|
|
@@ -77,44 +79,56 @@ import {
|
|
|
77
79
|
resolveCredentialCandidateKeys,
|
|
78
80
|
resolveCredentialKeyWithFallback,
|
|
79
81
|
shouldClearCooldownFromQuota
|
|
80
|
-
} from "./chunk-
|
|
81
|
-
import "./chunk-
|
|
82
|
+
} from "./chunk-LS5KAVFQ.js";
|
|
83
|
+
import "./chunk-FXEPZKNJ.js";
|
|
84
|
+
import "./chunk-X4O7FJF5.js";
|
|
82
85
|
import "./chunk-TLE77UJ5.js";
|
|
83
|
-
import "./chunk-
|
|
84
|
-
import "./chunk-
|
|
85
|
-
import "./chunk-
|
|
86
|
+
import "./chunk-VH7UO6E5.js";
|
|
87
|
+
import "./chunk-KXOPLLFP.js";
|
|
88
|
+
import "./chunk-DNNPARJK.js";
|
|
86
89
|
import "./chunk-2MBTWINN.js";
|
|
87
|
-
import "./chunk-
|
|
90
|
+
import "./chunk-7WHCIA5V.js";
|
|
88
91
|
import "./chunk-5ZUL4CUO.js";
|
|
89
|
-
import "./chunk-
|
|
92
|
+
import "./chunk-2FZVXOFX.js";
|
|
90
93
|
import "./chunk-H57T64RA.js";
|
|
91
94
|
import "./chunk-UKZX3NHN.js";
|
|
95
|
+
import "./chunk-SR4FE5VD.js";
|
|
92
96
|
import "./chunk-5MMAK75Q.js";
|
|
93
97
|
import "./chunk-USGHJSGO.js";
|
|
98
|
+
import "./chunk-E6A5NHDH.js";
|
|
94
99
|
import "./chunk-KX6YBIHG.js";
|
|
95
|
-
import "./chunk-
|
|
100
|
+
import "./chunk-UP7KBWLE.js";
|
|
101
|
+
import "./chunk-HEVRQGGH.js";
|
|
102
|
+
import "./chunk-EWQ3HGNZ.js";
|
|
103
|
+
import "./chunk-PSCNXBYA.js";
|
|
104
|
+
import "./chunk-IVK2KT3H.js";
|
|
96
105
|
import "./chunk-DWLEOOGR.js";
|
|
97
106
|
import "./chunk-7DPNBQSV.js";
|
|
98
107
|
import "./chunk-OW765XBU.js";
|
|
99
|
-
import "./chunk-
|
|
100
|
-
import "./chunk-
|
|
101
|
-
import "./chunk-
|
|
108
|
+
import "./chunk-D634SL2Y.js";
|
|
109
|
+
import "./chunk-UAF5VQCE.js";
|
|
110
|
+
import "./chunk-2SXN7LAY.js";
|
|
102
111
|
import "./chunk-G7Y4GXTY.js";
|
|
103
112
|
import "./chunk-6UBGXX2W.js";
|
|
104
|
-
import "./chunk-
|
|
105
|
-
import "./chunk-
|
|
106
|
-
import "./chunk-
|
|
107
|
-
import "./chunk-
|
|
108
|
-
import "./chunk-
|
|
109
|
-
import "./chunk-
|
|
113
|
+
import "./chunk-BV3FLP2L.js";
|
|
114
|
+
import "./chunk-4ZCTKB27.js";
|
|
115
|
+
import "./chunk-WC3J5SL2.js";
|
|
116
|
+
import "./chunk-EUGTFFO6.js";
|
|
117
|
+
import "./chunk-AETZ7AD6.js";
|
|
118
|
+
import "./chunk-5P3PPQVP.js";
|
|
119
|
+
import "./chunk-KHCLMKZZ.js";
|
|
110
120
|
import "./chunk-SYTHYBMI.js";
|
|
111
121
|
import "./chunk-OJKUU3LP.js";
|
|
112
122
|
import "./chunk-YZMNK53S.js";
|
|
123
|
+
import "./chunk-QGFLVQ6E.js";
|
|
124
|
+
import "./chunk-BR3GT6MR.js";
|
|
125
|
+
import "./chunk-JCQ3WCQ3.js";
|
|
126
|
+
import "./chunk-UUCYUN6Y.js";
|
|
127
|
+
import "./chunk-YLAHYLDQ.js";
|
|
128
|
+
import "./chunk-RIWKZT7E.js";
|
|
129
|
+
import "./chunk-M2EJHDJP.js";
|
|
113
130
|
import "./chunk-I42VC5KR.js";
|
|
114
131
|
import "./chunk-U6VC4MU4.js";
|
|
115
|
-
import "./chunk-42OKN2LI.js";
|
|
116
|
-
import "./chunk-JQZRSXS5.js";
|
|
117
|
-
import "./chunk-KHCLMKZZ.js";
|
|
118
132
|
import {
|
|
119
133
|
parseUserIdFromAuthToken,
|
|
120
134
|
readOption,
|
|
@@ -127,37 +141,197 @@ import "./chunk-LCBAMY2M.js";
|
|
|
127
141
|
import "./chunk-4O22PGNQ.js";
|
|
128
142
|
import {
|
|
129
143
|
t
|
|
130
|
-
} from "./chunk-
|
|
131
|
-
import "./chunk-
|
|
132
|
-
import "./chunk-
|
|
133
|
-
import "./chunk-RTHFJZ6M.js";
|
|
134
|
-
import "./chunk-HBRDSQ3M.js";
|
|
144
|
+
} from "./chunk-FEIVARWR.js";
|
|
145
|
+
import "./chunk-EJQE5HB7.js";
|
|
146
|
+
import "./chunk-6SOWMEAY.js";
|
|
135
147
|
import {
|
|
136
148
|
toErrorMessage
|
|
137
149
|
} from "./chunk-HNMXYYJR.js";
|
|
150
|
+
import "./chunk-LVZVSLKO.js";
|
|
151
|
+
import "./chunk-2JHGUL5K.js";
|
|
138
152
|
import "./chunk-3EUW3WEO.js";
|
|
139
|
-
import "./chunk-
|
|
153
|
+
import "./chunk-WWC7I6TA.js";
|
|
154
|
+
import "./chunk-OKH74FML.js";
|
|
140
155
|
import "./chunk-JRTNUU5Z.js";
|
|
141
156
|
import "./chunk-KUG52IAP.js";
|
|
142
|
-
import "./chunk-WWC7I6TA.js";
|
|
143
157
|
import "./chunk-G3SUCT4W.js";
|
|
144
158
|
import "./chunk-4SN6J65J.js";
|
|
145
159
|
import "./chunk-CF7PE763.js";
|
|
146
|
-
import "./chunk-
|
|
160
|
+
import "./chunk-JPXACKSW.js";
|
|
147
161
|
import "./chunk-QSJ3HFEF.js";
|
|
148
162
|
import "./chunk-U67V476Y.js";
|
|
149
163
|
|
|
150
|
-
// packages/
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
164
|
+
// packages/cli/recentRunHealthScan.ts
|
|
165
|
+
import { readdirSync, readFileSync, statSync } from "node:fs";
|
|
166
|
+
import { join } from "node:path";
|
|
167
|
+
|
|
168
|
+
// packages/ai/agent/recentRunHealth.ts
|
|
169
|
+
var RECENT_RUN_HEALTH_WINDOW_HOURS = 24;
|
|
170
|
+
var FAST_FAIL_MAX_DURATION_MS = 15e3;
|
|
171
|
+
var FAST_FAIL_MIN_TOTAL_RUNS = 3;
|
|
172
|
+
var FAST_FAIL_MIN_RATIO = 0.6;
|
|
173
|
+
var FAST_FAIL_STATUS = "failed";
|
|
174
|
+
function toMillis(value) {
|
|
175
|
+
if (value instanceof Date) {
|
|
176
|
+
const ms = value.getTime();
|
|
177
|
+
return Number.isFinite(ms) ? ms : void 0;
|
|
178
|
+
}
|
|
179
|
+
if (typeof value === "number") return Number.isFinite(value) ? value : void 0;
|
|
180
|
+
if (typeof value === "string" && value.trim()) {
|
|
181
|
+
const ms = Date.parse(value);
|
|
182
|
+
return Number.isFinite(ms) ? ms : void 0;
|
|
183
|
+
}
|
|
184
|
+
return void 0;
|
|
156
185
|
}
|
|
157
|
-
function
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
186
|
+
function normalizeAgentKey(value) {
|
|
187
|
+
return typeof value === "string" ? value.replace(/[\u0000-\u001f\u007f]+/g, " ").trim() : "";
|
|
188
|
+
}
|
|
189
|
+
function resolveWindowHours(value) {
|
|
190
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : RECENT_RUN_HEALTH_WINDOW_HOURS;
|
|
191
|
+
}
|
|
192
|
+
function isFastFailRunSample(sample) {
|
|
193
|
+
if (sample.status !== FAST_FAIL_STATUS) return false;
|
|
194
|
+
if ((sample.toolCallCount ?? 0) !== 0) return false;
|
|
195
|
+
const startedMs = toMillis(sample.startedAt);
|
|
196
|
+
const endedMs = toMillis(sample.endedAt);
|
|
197
|
+
if (startedMs === void 0 || endedMs === void 0) return false;
|
|
198
|
+
const durationMs = endedMs - startedMs;
|
|
199
|
+
return durationMs >= 0 && durationMs < FAST_FAIL_MAX_DURATION_MS;
|
|
200
|
+
}
|
|
201
|
+
function aggregateRecentRunHealth(samples, options = {}) {
|
|
202
|
+
if (!samples || samples.length === 0) return [];
|
|
203
|
+
const windowHours = resolveWindowHours(options.windowHours);
|
|
204
|
+
const nowMs = toMillis(options.now) ?? Date.now();
|
|
205
|
+
const sinceMs = nowMs - windowHours * 36e5;
|
|
206
|
+
const totals = /* @__PURE__ */ new Map();
|
|
207
|
+
for (const sample of samples) {
|
|
208
|
+
if (!sample || typeof sample.status !== "string") continue;
|
|
209
|
+
if (!isAgentRunTerminalStatus(sample.status)) continue;
|
|
210
|
+
const startedMs = toMillis(sample.startedAt);
|
|
211
|
+
if (startedMs === void 0 || startedMs < sinceMs) continue;
|
|
212
|
+
const agentKey = normalizeAgentKey(sample.agentKey);
|
|
213
|
+
if (!agentKey) continue;
|
|
214
|
+
const bucket = totals.get(agentKey) ?? { totalCount: 0, fastFailCount: 0 };
|
|
215
|
+
bucket.totalCount += 1;
|
|
216
|
+
if (isFastFailRunSample(sample)) bucket.fastFailCount += 1;
|
|
217
|
+
totals.set(agentKey, bucket);
|
|
218
|
+
}
|
|
219
|
+
const alerts = [];
|
|
220
|
+
for (const [agentKey, { totalCount, fastFailCount }] of totals) {
|
|
221
|
+
if (fastFailCount === 0 || totalCount < FAST_FAIL_MIN_TOTAL_RUNS) continue;
|
|
222
|
+
if (fastFailCount / totalCount < FAST_FAIL_MIN_RATIO) continue;
|
|
223
|
+
alerts.push({ agentKey, fastFailCount, totalCount, windowHours });
|
|
224
|
+
}
|
|
225
|
+
alerts.sort(
|
|
226
|
+
(a, b) => b.fastFailCount - a.fastFailCount || b.fastFailCount / b.totalCount - a.fastFailCount / a.totalCount || (a.agentKey < b.agentKey ? -1 : a.agentKey > b.agentKey ? 1 : 0)
|
|
227
|
+
);
|
|
228
|
+
return alerts;
|
|
229
|
+
}
|
|
230
|
+
function formatRecentRunHealthContext(alerts) {
|
|
231
|
+
const lines = [];
|
|
232
|
+
let windowHours = RECENT_RUN_HEALTH_WINDOW_HOURS;
|
|
233
|
+
for (const alert of alerts ?? []) {
|
|
234
|
+
if (!alert || !(alert.fastFailCount > 0) || !(alert.totalCount > 0)) continue;
|
|
235
|
+
const agentKey = normalizeAgentKey(alert.agentKey);
|
|
236
|
+
if (!agentKey) continue;
|
|
237
|
+
if (lines.length === 0) windowHours = resolveWindowHours(alert.windowHours);
|
|
238
|
+
lines.push(` ${agentKey}: ${alert.fastFailCount}/${alert.totalCount} failed`);
|
|
239
|
+
}
|
|
240
|
+
if (lines.length === 0) return void 0;
|
|
241
|
+
return [`recentFastFail (${windowHours}h, <15s & 0 toolCalls, advisory only):`, ...lines].join("\n");
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// packages/cli/recentRunHealthScan.ts
|
|
245
|
+
var RECENT_RUN_HEALTH_MAX_FILES = 200;
|
|
246
|
+
var RECENT_RUN_HEALTH_MAX_STAT_ENTRIES = 1e3;
|
|
247
|
+
var RECENT_RUN_HEALTH_SCAN_BUDGET_MS = 50;
|
|
248
|
+
var COMPANION_SUFFIXES = [".isolation.json", ".dialog.json"];
|
|
249
|
+
var COMPANION_INFIXES = [".result."];
|
|
250
|
+
var ACK_PREFIXES = ["acked-", "busy-ack-"];
|
|
251
|
+
function isRunRecordFileName(entry) {
|
|
252
|
+
if (!entry.endsWith(".json")) return false;
|
|
253
|
+
if (COMPANION_SUFFIXES.some((suffix) => entry.endsWith(suffix))) return false;
|
|
254
|
+
if (COMPANION_INFIXES.some((infix) => entry.includes(infix))) return false;
|
|
255
|
+
if (ACK_PREFIXES.some((prefix) => entry.startsWith(prefix))) return false;
|
|
256
|
+
return true;
|
|
257
|
+
}
|
|
258
|
+
function positiveInt(value, fallback) {
|
|
259
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.floor(value) : fallback;
|
|
260
|
+
}
|
|
261
|
+
function scanRecentRunHealthSamples(options = {}) {
|
|
262
|
+
const clock = options.clock ?? Date.now;
|
|
263
|
+
const agentKeys = new Set(
|
|
264
|
+
(options.agentKeys ?? []).map((key) => typeof key === "string" ? key.trim() : "").filter((key) => key.length > 0)
|
|
265
|
+
);
|
|
266
|
+
if (agentKeys.size === 0) return [];
|
|
267
|
+
const nowMs = typeof options.now === "number" && Number.isFinite(options.now) ? options.now : clock();
|
|
268
|
+
const sinceMs = nowMs - RECENT_RUN_HEALTH_WINDOW_HOURS * 36e5;
|
|
269
|
+
const maxFiles = positiveInt(options.maxFiles, RECENT_RUN_HEALTH_MAX_FILES);
|
|
270
|
+
const maxStatEntries = positiveInt(options.maxStatEntries, RECENT_RUN_HEALTH_MAX_STAT_ENTRIES);
|
|
271
|
+
const budgetMs = positiveInt(options.budgetMs, RECENT_RUN_HEALTH_SCAN_BUDGET_MS);
|
|
272
|
+
const deadline = clock() + budgetMs;
|
|
273
|
+
let runsDir;
|
|
274
|
+
try {
|
|
275
|
+
runsDir = options.runsDir ?? resolveRunsDir(options.env);
|
|
276
|
+
} catch {
|
|
277
|
+
return [];
|
|
278
|
+
}
|
|
279
|
+
let entries;
|
|
280
|
+
try {
|
|
281
|
+
entries = readdirSync(runsDir);
|
|
282
|
+
} catch {
|
|
283
|
+
return [];
|
|
284
|
+
}
|
|
285
|
+
const recentFiles = [];
|
|
286
|
+
const candidates = entries.filter(isRunRecordFileName).sort((a, b) => a < b ? 1 : a > b ? -1 : 0);
|
|
287
|
+
for (const entry of candidates.slice(0, maxStatEntries)) {
|
|
288
|
+
const path = join(runsDir, entry);
|
|
289
|
+
try {
|
|
290
|
+
const stat = statSync(path);
|
|
291
|
+
if (!stat.isFile() || stat.mtimeMs < sinceMs) continue;
|
|
292
|
+
recentFiles.push({ path, mtimeMs: stat.mtimeMs });
|
|
293
|
+
} catch {
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
if (recentFiles.length === 0) return [];
|
|
298
|
+
recentFiles.sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
299
|
+
const samples = [];
|
|
300
|
+
for (const file of recentFiles.slice(0, maxFiles)) {
|
|
301
|
+
if (clock() > deadline) break;
|
|
302
|
+
try {
|
|
303
|
+
const parsed = JSON.parse(readFileSync(file.path, "utf8"));
|
|
304
|
+
if (!parsed || typeof parsed !== "object") continue;
|
|
305
|
+
const agentKey = typeof parsed.agentKey === "string" ? parsed.agentKey : "";
|
|
306
|
+
if (!agentKeys.has(agentKey)) continue;
|
|
307
|
+
if (typeof parsed.status !== "string" || typeof parsed.startedAt !== "string") continue;
|
|
308
|
+
samples.push({
|
|
309
|
+
agentKey,
|
|
310
|
+
status: parsed.status,
|
|
311
|
+
startedAt: parsed.startedAt,
|
|
312
|
+
endedAt: typeof parsed.endedAt === "string" ? parsed.endedAt : void 0,
|
|
313
|
+
toolCallCount: typeof parsed.toolCallCount === "number" ? parsed.toolCallCount : void 0
|
|
314
|
+
});
|
|
315
|
+
} catch {
|
|
316
|
+
continue;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return samples;
|
|
320
|
+
}
|
|
321
|
+
function scanRecentRunHealthAlerts(options = {}) {
|
|
322
|
+
try {
|
|
323
|
+
const now = typeof options.now === "number" && Number.isFinite(options.now) ? options.now : (options.clock ?? Date.now)();
|
|
324
|
+
return aggregateRecentRunHealth(scanRecentRunHealthSamples(options), { now });
|
|
325
|
+
} catch {
|
|
326
|
+
return [];
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
function resolveRecentRunHealthContext(options = {}) {
|
|
330
|
+
try {
|
|
331
|
+
return formatRecentRunHealthContext(scanRecentRunHealthAlerts(options));
|
|
332
|
+
} catch {
|
|
333
|
+
return void 0;
|
|
334
|
+
}
|
|
161
335
|
}
|
|
162
336
|
|
|
163
337
|
// packages/cli/agentListCommands.ts
|
|
@@ -167,7 +341,7 @@ var createCliDispatchSampleDb = (db, userId, env) => {
|
|
|
167
341
|
iterator: (options) => db.iterator(options),
|
|
168
342
|
isDispatchRun: async (dialogId, entryPath) => {
|
|
169
343
|
if (entryPath === "cli-local") {
|
|
170
|
-
localDialogs ??= new Set(
|
|
344
|
+
localDialogs ??= new Set(listRecentRunRecords({ env, limit: 400 }).filter(
|
|
171
345
|
(run) => typeof run.dialogId === "string" && isLocalDispatchSpeedSource(run, run.dialogId, userId)
|
|
172
346
|
).map((run) => run.dialogId));
|
|
173
347
|
return localDialogs.has(dialogId);
|
|
@@ -219,43 +393,12 @@ async function runAgentListCommand(args, deps = {}) {
|
|
|
219
393
|
output.write("[nolo] agent list could not read userId from AUTH_TOKEN.\n");
|
|
220
394
|
return 1;
|
|
221
395
|
}
|
|
396
|
+
const forceQuotaRefresh = args.includes("--refresh-quota");
|
|
222
397
|
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
223
398
|
const fallbackFetchImpl = deps.fallbackFetchImpl;
|
|
224
399
|
const serverUrl = resolveServerUrl(args, env);
|
|
225
400
|
const serverUrls = resolveServerCandidates(args, env, serverUrl);
|
|
226
401
|
try {
|
|
227
|
-
let agents;
|
|
228
|
-
let source;
|
|
229
|
-
let serverFailures = [];
|
|
230
|
-
try {
|
|
231
|
-
const remoteResult = await listRemoteAgentsAcrossServers({
|
|
232
|
-
authToken,
|
|
233
|
-
fallbackFetchImpl,
|
|
234
|
-
fetchImpl,
|
|
235
|
-
serverUrls,
|
|
236
|
-
userId
|
|
237
|
-
});
|
|
238
|
-
agents = remoteResult.agents;
|
|
239
|
-
serverFailures = remoteResult.failures;
|
|
240
|
-
source = "global-cache";
|
|
241
|
-
} catch {
|
|
242
|
-
try {
|
|
243
|
-
const db = deps.db ?? await getReadableCliDb(output);
|
|
244
|
-
agents = await listLocalCachedAgents({ db, userId });
|
|
245
|
-
source = "local-cache";
|
|
246
|
-
} catch {
|
|
247
|
-
agents = await listRemoteAgents({
|
|
248
|
-
authToken,
|
|
249
|
-
fallbackFetchImpl,
|
|
250
|
-
fetchImpl,
|
|
251
|
-
serverUrl,
|
|
252
|
-
userId,
|
|
253
|
-
queryUserRecords,
|
|
254
|
-
readDbRecord
|
|
255
|
-
});
|
|
256
|
-
source = "remote-cache";
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
402
|
const pagination = resolvePaginationArgs({ limit, offset });
|
|
260
403
|
const hasQuery = Boolean(query && typeof query === "string" && query.trim());
|
|
261
404
|
const MAX_UPSTREAM_CEILING = 2e3;
|
|
@@ -263,16 +406,75 @@ async function runAgentListCommand(args, deps = {}) {
|
|
|
263
406
|
MAX_UPSTREAM_CEILING,
|
|
264
407
|
hasQuery ? MAX_UPSTREAM_CEILING : Math.max(500, (pagination.offset ?? 0) + (pagination.limit ?? 100))
|
|
265
408
|
);
|
|
409
|
+
const ownAgentsPromise = (async () => {
|
|
410
|
+
try {
|
|
411
|
+
const remoteResult = await listRemoteAgentsAcrossServers({
|
|
412
|
+
authToken,
|
|
413
|
+
fallbackFetchImpl,
|
|
414
|
+
fetchImpl,
|
|
415
|
+
serverUrls,
|
|
416
|
+
userId
|
|
417
|
+
});
|
|
418
|
+
return {
|
|
419
|
+
agents: remoteResult.agents,
|
|
420
|
+
serverFailures: remoteResult.failures,
|
|
421
|
+
source: "global-cache"
|
|
422
|
+
};
|
|
423
|
+
} catch {
|
|
424
|
+
try {
|
|
425
|
+
const db = deps.db ?? await getReadableCliDb(output);
|
|
426
|
+
return {
|
|
427
|
+
agents: await listLocalCachedAgents({ db, userId }),
|
|
428
|
+
serverFailures: [],
|
|
429
|
+
source: "local-cache"
|
|
430
|
+
};
|
|
431
|
+
} catch {
|
|
432
|
+
return {
|
|
433
|
+
agents: await listRemoteAgents({
|
|
434
|
+
authToken,
|
|
435
|
+
fallbackFetchImpl,
|
|
436
|
+
fetchImpl,
|
|
437
|
+
serverUrl,
|
|
438
|
+
userId,
|
|
439
|
+
queryUserRecords,
|
|
440
|
+
readDbRecord
|
|
441
|
+
}),
|
|
442
|
+
serverFailures: [],
|
|
443
|
+
source: "remote-cache"
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
})();
|
|
448
|
+
const publicResultsPromise = scope !== "preferred" ? Promise.all(serverUrls.map((url) => listRemotePublicAgents({
|
|
449
|
+
authToken,
|
|
450
|
+
fetchImpl,
|
|
451
|
+
serverUrl: url,
|
|
452
|
+
limit: upstreamLimit,
|
|
453
|
+
query: hasQuery ? query : void 0
|
|
454
|
+
}))) : void 0;
|
|
455
|
+
const spaceLookup = spaceInput ? buildSpaceLookup(spaceInput) : null;
|
|
456
|
+
const spaceReadPromise = spaceLookup ? readLiveDbRecordAfterTombstoneMerge({
|
|
457
|
+
authToken,
|
|
458
|
+
dbKey: spaceLookup.spaceKey,
|
|
459
|
+
fallbackFetchImpl,
|
|
460
|
+
fetchImpl,
|
|
461
|
+
serverUrls
|
|
462
|
+
}) : void 0;
|
|
463
|
+
const favoritesPromise = wantSafe && !idsOnly ? listFavoriteAgentIdsAcrossServers({
|
|
464
|
+
authToken,
|
|
465
|
+
fetchImpl,
|
|
466
|
+
serverUrls
|
|
467
|
+
}).catch(() => ({})) : void 0;
|
|
468
|
+
const [ownResult, publicResults, spaceRead] = await Promise.all([
|
|
469
|
+
ownAgentsPromise,
|
|
470
|
+
publicResultsPromise ?? Promise.resolve(void 0),
|
|
471
|
+
spaceReadPromise ?? Promise.resolve(void 0)
|
|
472
|
+
]);
|
|
473
|
+
let { agents, source, serverFailures } = ownResult;
|
|
266
474
|
let cliUpstreamTruncated = false;
|
|
267
475
|
let cliUpstreamTotal;
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
authToken,
|
|
271
|
-
fetchImpl,
|
|
272
|
-
serverUrl: url,
|
|
273
|
-
limit: upstreamLimit,
|
|
274
|
-
query: hasQuery ? query : void 0
|
|
275
|
-
})));
|
|
476
|
+
const publicCatalogAgents = /* @__PURE__ */ new Set();
|
|
477
|
+
if (publicResults) {
|
|
276
478
|
const publicAgents = publicResults.flatMap((r) => r.agents);
|
|
277
479
|
for (const r of publicResults) {
|
|
278
480
|
if (r.truncated) cliUpstreamTruncated = true;
|
|
@@ -285,32 +487,24 @@ async function runAgentListCommand(args, deps = {}) {
|
|
|
285
487
|
for (const agent of agents) {
|
|
286
488
|
if (agent.publicKey) seenPublicKeys.add(agent.publicKey);
|
|
287
489
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
];
|
|
490
|
+
const addedPublicAgents = publicAgents.filter((agent) => {
|
|
491
|
+
if (!agent.publicKey) return true;
|
|
492
|
+
if (seenPublicKeys.has(agent.publicKey)) return false;
|
|
493
|
+
seenPublicKeys.add(agent.publicKey);
|
|
494
|
+
return true;
|
|
495
|
+
});
|
|
496
|
+
for (const agent of addedPublicAgents) publicCatalogAgents.add(agent);
|
|
497
|
+
agents = [...agents, ...addedPublicAgents];
|
|
297
498
|
} else {
|
|
499
|
+
for (const agent of publicAgents) publicCatalogAgents.add(agent);
|
|
298
500
|
agents = publicAgents;
|
|
299
501
|
}
|
|
300
502
|
}
|
|
301
503
|
agents = agents.filter((agent) => agent.privateKey.startsWith("agent-"));
|
|
302
504
|
let resolvedSpaceId = null;
|
|
303
505
|
let spaceContentKeys = null;
|
|
304
|
-
if (
|
|
305
|
-
|
|
306
|
-
resolvedSpaceId = spaceId;
|
|
307
|
-
const spaceRead = await readLiveDbRecordAfterTombstoneMerge({
|
|
308
|
-
authToken,
|
|
309
|
-
dbKey: spaceKey,
|
|
310
|
-
fallbackFetchImpl,
|
|
311
|
-
fetchImpl,
|
|
312
|
-
serverUrls
|
|
313
|
-
});
|
|
506
|
+
if (spaceLookup && spaceRead) {
|
|
507
|
+
resolvedSpaceId = spaceLookup.spaceId;
|
|
314
508
|
serverFailures = [...serverFailures, ...spaceRead.failures];
|
|
315
509
|
const spaceRecord = spaceRead.record;
|
|
316
510
|
const currentSpaceContentKeys = getSpaceContentKeys(spaceRecord);
|
|
@@ -319,9 +513,10 @@ async function runAgentListCommand(args, deps = {}) {
|
|
|
319
513
|
(agent) => currentSpaceContentKeys.has(agent.privateKey) || currentSpaceContentKeys.has(agent.publicKey) || currentSpaceContentKeys.has(agent.id)
|
|
320
514
|
);
|
|
321
515
|
}
|
|
322
|
-
|
|
516
|
+
const decorateTargets = source === "global-cache" ? agents.filter((agent) => !publicCatalogAgents.has(agent)) : [];
|
|
517
|
+
if (publicOnly && decorateTargets.length > 0) {
|
|
323
518
|
await decorateAgentsWithPublicStatusAcrossServers({
|
|
324
|
-
agents,
|
|
519
|
+
agents: decorateTargets,
|
|
325
520
|
authToken,
|
|
326
521
|
fallbackFetchImpl,
|
|
327
522
|
fetchImpl,
|
|
@@ -344,17 +539,28 @@ async function runAgentListCommand(args, deps = {}) {
|
|
|
344
539
|
const refreshCandidates = !idsOnly ? [.../* @__PURE__ */ new Set([...agentsForOutput, ...agents.filter(
|
|
345
540
|
(agent) => !agentsForOutput.includes(agent) && isAgentUnavailableNow(agent) && agent.credentialConfigured === true && (!query || !String(query).trim() || matchesAgentQuery(agent, query))
|
|
346
541
|
)])] : agentsForOutput;
|
|
542
|
+
const decoratePromise = !publicOnly && decorateTargets.length > 0 ? decorateAgentsWithPublicStatusAcrossServers({
|
|
543
|
+
agents: decorateTargets,
|
|
544
|
+
authToken,
|
|
545
|
+
fallbackFetchImpl,
|
|
546
|
+
fetchImpl,
|
|
547
|
+
serverUrls
|
|
548
|
+
}) : Promise.resolve();
|
|
347
549
|
if (!idsOnly) {
|
|
348
|
-
const fresh = await
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
550
|
+
const [, fresh] = await Promise.all([
|
|
551
|
+
decoratePromise,
|
|
552
|
+
refreshSubscriptionQuotas({
|
|
553
|
+
entries: refreshCandidates.map((agent) => ({
|
|
554
|
+
key: agent.privateKey,
|
|
555
|
+
...agent.quota ? { quota: agent.quota } : {},
|
|
556
|
+
probeable: agent.credentialConfigured === true
|
|
557
|
+
})),
|
|
558
|
+
forceRefresh: forceQuotaRefresh,
|
|
559
|
+
env,
|
|
560
|
+
cliArgs: args,
|
|
561
|
+
fetchImpl
|
|
562
|
+
})
|
|
563
|
+
]);
|
|
358
564
|
const now = Date.now();
|
|
359
565
|
for (const agent of refreshCandidates) {
|
|
360
566
|
const quota = fresh[agent.privateKey];
|
|
@@ -396,6 +602,8 @@ async function runAgentListCommand(args, deps = {}) {
|
|
|
396
602
|
}
|
|
397
603
|
}
|
|
398
604
|
unavailableCount = agents.filter((agent) => isAgentUnavailableNow(agent)).length;
|
|
605
|
+
} else {
|
|
606
|
+
await decoratePromise;
|
|
399
607
|
}
|
|
400
608
|
const totalCount = agentsForOutput.length;
|
|
401
609
|
const pagedAgents = typeof pagination.limit === "number" || typeof pagination.offset === "number" ? agentsForOutput.slice(
|
|
@@ -408,11 +616,7 @@ async function runAgentListCommand(args, deps = {}) {
|
|
|
408
616
|
return 0;
|
|
409
617
|
}
|
|
410
618
|
if (wantSafe) {
|
|
411
|
-
const favoritesMap = await
|
|
412
|
-
authToken,
|
|
413
|
-
fetchImpl,
|
|
414
|
-
serverUrls
|
|
415
|
-
}).catch(() => ({}));
|
|
619
|
+
const favoritesMap = await (favoritesPromise ?? Promise.resolve({}));
|
|
416
620
|
const existingKeys = /* @__PURE__ */ new Set();
|
|
417
621
|
for (const agent of agents) {
|
|
418
622
|
existingKeys.add(agent.privateKey);
|
|
@@ -421,40 +625,46 @@ async function runAgentListCommand(args, deps = {}) {
|
|
|
421
625
|
}
|
|
422
626
|
const extraFavoriteRecords = [];
|
|
423
627
|
const hydratedFavoriteAgents = [];
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
if (spaceContentKeys && !candidateKeys.some((key) => spaceContentKeys?.has(key))) {
|
|
439
|
-
continue;
|
|
628
|
+
const missingFavKeys = Object.keys(favoritesMap).filter((favKey) => !existingKeys.has(favKey));
|
|
629
|
+
const favReads = await Promise.all(
|
|
630
|
+
missingFavKeys.map(async (favKey) => {
|
|
631
|
+
try {
|
|
632
|
+
const favRead = await readLiveDbRecordAfterTombstoneMerge({
|
|
633
|
+
authToken,
|
|
634
|
+
dbKey: favKey,
|
|
635
|
+
fallbackFetchImpl,
|
|
636
|
+
fetchImpl,
|
|
637
|
+
serverUrls
|
|
638
|
+
});
|
|
639
|
+
return { favKey, record: favRead.record };
|
|
640
|
+
} catch {
|
|
641
|
+
return { favKey, record: null };
|
|
440
642
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
643
|
+
})
|
|
644
|
+
);
|
|
645
|
+
for (const { favKey, record } of favReads) {
|
|
646
|
+
if (existingKeys.has(favKey)) continue;
|
|
647
|
+
if (!record || record.type && record.type !== "agent") continue;
|
|
648
|
+
const norm = normalizeListedAgent(record);
|
|
649
|
+
const candidateKeys = [record.dbKey, record.publicKey, record.id].filter((key) => typeof key === "string" && key.length > 0);
|
|
650
|
+
if (spaceContentKeys && !candidateKeys.some((key) => spaceContentKeys?.has(key))) {
|
|
651
|
+
continue;
|
|
652
|
+
}
|
|
653
|
+
if (norm) {
|
|
654
|
+
if (!favKey.startsWith("agent-pub-")) {
|
|
655
|
+
norm.verifiedAgentKey = favKey;
|
|
656
|
+
if (typeof record.userId === "string" && record.userId) {
|
|
657
|
+
norm.ownerId = record.userId;
|
|
447
658
|
}
|
|
448
|
-
agents.push(norm);
|
|
449
|
-
hydratedFavoriteAgents.push(norm);
|
|
450
|
-
existingKeys.add(norm.privateKey);
|
|
451
|
-
existingKeys.add(norm.publicKey);
|
|
452
|
-
existingKeys.add(norm.id);
|
|
453
|
-
} else {
|
|
454
|
-
extraFavoriteRecords.push(record2);
|
|
455
|
-
for (const key of candidateKeys) existingKeys.add(key);
|
|
456
659
|
}
|
|
457
|
-
|
|
660
|
+
agents.push(norm);
|
|
661
|
+
hydratedFavoriteAgents.push(norm);
|
|
662
|
+
existingKeys.add(norm.privateKey);
|
|
663
|
+
existingKeys.add(norm.publicKey);
|
|
664
|
+
existingKeys.add(norm.id);
|
|
665
|
+
} else {
|
|
666
|
+
extraFavoriteRecords.push(record);
|
|
667
|
+
for (const key of candidateKeys) existingKeys.add(key);
|
|
458
668
|
}
|
|
459
669
|
}
|
|
460
670
|
if (source === "global-cache" && hydratedFavoriteAgents.length > 0) {
|
|
@@ -466,7 +676,7 @@ async function runAgentListCommand(args, deps = {}) {
|
|
|
466
676
|
serverUrls
|
|
467
677
|
});
|
|
468
678
|
}
|
|
469
|
-
const safeRecords = [...agents, ...extraFavoriteRecords].map((
|
|
679
|
+
const safeRecords = [...agents, ...extraFavoriteRecords].map((record) => toDiscoverySafeAgentSummary(record, { favoritesMap, userId })).filter((agent) => publicOnly ? agent.isPublic === true : true);
|
|
470
680
|
const discovery = buildAgentDiscoveryResult({
|
|
471
681
|
agents: safeRecords,
|
|
472
682
|
caller: planningCaller,
|
|
@@ -481,17 +691,26 @@ async function runAgentListCommand(args, deps = {}) {
|
|
|
481
691
|
upstreamTruncated: cliUpstreamTruncated,
|
|
482
692
|
upstreamTotal: cliUpstreamTotal
|
|
483
693
|
});
|
|
694
|
+
const compactPage = compact === true && verbose !== true;
|
|
695
|
+
const healthContext = compactPage ? void 0 : resolveRecentRunHealthContext({
|
|
696
|
+
agentKeys: discovery.agents.map((agent) => agent.agentKey).filter((key) => typeof key === "string"),
|
|
697
|
+
env
|
|
698
|
+
});
|
|
484
699
|
const listResult = JSON.stringify({
|
|
485
700
|
success: true,
|
|
486
701
|
userId,
|
|
487
702
|
...resolvedSpaceId ? { spaceId: resolvedSpaceId } : {},
|
|
488
703
|
planningRecommendation: discovery.planningRecommendation,
|
|
704
|
+
// tierHints 是 discovery 给的档位候选提示:原样透传,非空时才出现。
|
|
705
|
+
...discovery.tierHints && Object.keys(discovery.tierHints).length > 0 ? { tierHints: discovery.tierHints } : {},
|
|
489
706
|
total: discovery.total,
|
|
490
707
|
...typeof discovery.offset === "number" ? { offset: discovery.offset } : {},
|
|
491
708
|
...typeof discovery.limit === "number" ? { limit: discovery.limit } : {},
|
|
492
709
|
...discovery.truncated ? { truncated: true } : {},
|
|
493
710
|
unavailableCount: discovery.unavailableCount,
|
|
494
711
|
availableCount: discovery.availableCount,
|
|
712
|
+
// 近期快败通道的参考标注(advisory only):无异常时整段省略。
|
|
713
|
+
...healthContext ? { healthContext } : {},
|
|
495
714
|
// agents 在最前:host 截断长输出时保头保尾,派发所需的 agentKey
|
|
496
715
|
// 必须落在头部;凭证分组是说明性大块,放最后。
|
|
497
716
|
// 限流 agent 已合入 agents(带 availabilityStatus / nextAvailableAt
|
|
@@ -501,7 +720,7 @@ async function runAgentListCommand(args, deps = {}) {
|
|
|
501
720
|
}, null, 2);
|
|
502
721
|
const cliNoloHome = env.NOLO_HOME?.trim() || (env.HOME?.trim() ? `${env.HOME.trim()}/.nolo` : "");
|
|
503
722
|
const speedAwareListResult = await injectSpeedContextIntoListAgentsResult(listResult, {
|
|
504
|
-
compactPage
|
|
723
|
+
compactPage,
|
|
505
724
|
fragmentOffset,
|
|
506
725
|
fragmentAgentKey,
|
|
507
726
|
fragmentDigest,
|