nolo-cli 0.227.0-alpha.1 → 0.227.0
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-JKQGZ3HU.js → _executeModel-CXOFYVHC.js} +93 -87
- package/{action-CK64LS6S.js → action-R2EIXR7I.js} +11 -8
- package/{addContentAction-CARFID6E.js → addContentAction-W6JVLQ6H.js} +17 -16
- package/{addDialogAgentAction-APLZLFW5.js → addDialogAgentAction-LVNKMXKZ.js} +20 -19
- package/{agentDeleteCommand-NVR2V2HH.js → agentDeleteCommand-VFSZPEQ5.js} +145 -137
- package/{agentEmailCommands-UCVOWD3S.js → agentEmailCommands-KRUIF4EH.js} +149 -137
- package/{agentFavoriteCommands-4PDOP3GW.js → agentFavoriteCommands-7LOP3HUD.js} +6 -6
- package/{agentGrantCommands-FLCEXLUH.js → agentGrantCommands-L6O2HVJI.js} +7 -7
- package/agentListCommands-TDFOLWN3.js +644 -0
- package/{agentMachineCommands-V3DGEJU4.js → agentMachineCommands-PSH7Q5PF.js} +76 -67
- package/{agentProviderCommands-7QBFRFRK.js → agentProviderCommands-C5T7C5KZ.js} +7 -7
- package/{agentPullCommand-E6JBGBVG.js → agentPullCommand-QQQZSC6S.js} +7 -7
- package/agentRecordCommands-KCKCW2QU.js +188 -0
- package/agentRunCommand-EF2T2QWD.js +223 -0
- package/{agentRunControl-SNZZ5XP4.js → agentRunControl-CSMSJFFB.js} +25 -17
- package/{agentRuntimeLocal-GOX2DIY7.js → agentRuntimeLocal-6QXQS3TS.js} +64 -50
- package/{agentSlice-N7H2FRJA.js → agentSlice-IZ5ANAF7.js} +19 -18
- package/{appDeleteCommands-LZDN26FU.js → appDeleteCommands-4M7ETEEG.js} +68 -59
- package/{appDeployCommands-6IO6TTZH.js → appDeployCommands-2VJ2NDW5.js} +68 -59
- package/{appDeployStatusCommands-FG3LX24J.js → appDeployStatusCommands-LDFSWOPQ.js} +68 -59
- package/{appGetCommands-NAKVDVD4.js → appGetCommands-RHVNOPT4.js} +68 -59
- package/{appListCommands-KL56RN73.js → appListCommands-U3XEVTL4.js} +68 -59
- package/{authCommand-AUN5MXV2.js → authCommand-PVZ45QRO.js} +36 -31
- package/{authCommands-D2IPS6ES.js → authCommands-6AUYO65N.js} +18 -13
- package/{builtinSkillRegistry-UQGLKRYP.js → builtinSkillRegistry-LRVAQCPW.js} +6 -6
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
- package/{chromeOpsCommands-UJWN5HWH.js → chromeOpsCommands-TBPM6MR4.js} +8 -8
- package/{chunk-ABGULE7H.js → chunk-22YUCKMK.js} +16 -16
- package/{chunk-P2ZLUIW2.js → chunk-2BSLGODA.js} +350 -25
- package/{chunk-GOLPOTG5.js → chunk-2COM7SAH.js} +4 -4
- package/{chunk-ULAQPRHX.js → chunk-2FK2KZSL.js} +1 -1
- package/{chunk-PLPLH2XZ.js → chunk-2IPR4PBB.js} +2 -2
- package/chunk-2SXN7LAY.js +15 -0
- package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
- package/{chunk-7Z3WUZ4Q.js → chunk-3YYFU6H7.js} +74 -46
- package/{chunk-C2B7M567.js → chunk-4OXPN3WC.js} +17 -6
- package/chunk-4TVOZGOS.js +62 -0
- package/chunk-4ZCTKB27.js +31 -0
- package/chunk-53AEDFBL.js +33394 -0
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-OXA5GWHU.js → chunk-56O2J2Y4.js} +3 -3
- package/{chunk-IAJJYHIB.js → chunk-56PB7FEN.js} +8 -8
- package/{chunk-JWXITTQB.js → chunk-5HUO7SEX.js} +9 -107
- package/{chunk-AGP3YSEC.js → chunk-5PASH2MB.js} +46 -1
- package/{chunk-PHOSZT3E.js → chunk-5UAKGCQG.js} +1 -1
- package/{chunk-5RKRXQ2H.js → chunk-5VVP7DW3.js} +20 -13
- package/chunk-6ASGEP5D.js +21 -0
- package/chunk-6PXFEPHL.js +103 -0
- package/chunk-6RSNVJGO.js +279 -0
- package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
- package/{chunk-KMRKZNGT.js → chunk-6YYTTLJV.js} +14 -13
- package/{chunk-VREDDN25.js → chunk-76HAJUOJ.js} +14 -9
- package/{chunk-FKEZOMIF.js → chunk-7DXFOL5B.js} +1410 -768
- package/{chunk-LA7JYAKF.js → chunk-AKPKOI5Z.js} +6 -6
- package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
- package/{chunk-F5AY2UZL.js → chunk-AO6T7U62.js} +592 -68
- package/{chunk-LJSNEV7M.js → chunk-AS6L5KSD.js} +8 -8
- package/{chunk-GOQ6ZVTN.js → chunk-AVSZ6PBM.js} +5 -5
- package/chunk-BIDSIRTS.js +307 -0
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-KYH7XW3K.js → chunk-CD2DK5JA.js} +135 -14
- package/{chunk-G6HJUMST.js → chunk-CJQBWHNM.js} +2 -2
- package/{chunk-EVGU5P4U.js → chunk-CO6E7YK6.js} +1 -1
- package/{chunk-ZYA2YDB6.js → chunk-CT5JXREL.js} +17 -17
- package/{chunk-VPAZ6BEN.js → chunk-CTWCZKNS.js} +42 -17
- package/{chunk-4OKTPFNX.js → chunk-CX2LYFZQ.js} +107 -66
- package/{chunk-YFLVRVYK.js → chunk-DLT2DN4M.js} +1 -1
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
- package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
- package/{chunk-IX2BXN2K.js → chunk-EDT65EUE.js} +6 -6
- package/{chunk-VP3BINY7.js → chunk-EQZZASCD.js} +31 -1
- package/{chunk-45LZIYXB.js → chunk-ESN4WNWU.js} +3 -2
- package/{chunk-M3JEW6N6.js → chunk-F26GAEH3.js} +10 -0
- package/{chunk-CVERLOJM.js → chunk-F4XIS5DL.js} +1215 -1431
- package/chunk-FDZ2GBWO.js +166 -0
- package/chunk-FGHEF6WI.js +34 -0
- package/{chunk-CSW7IPVD.js → chunk-FMYNIAI6.js} +61 -24
- package/{chunk-VIHDJ3FK.js → chunk-FNT5VENS.js} +15 -15
- package/{chunk-PMDVQBGA.js → chunk-GAHJLSDO.js} +14 -7
- package/{chunk-GRXSJR2Z.js → chunk-GVTFSLNI.js} +112 -109
- package/{chunk-UN7HIYMH.js → chunk-GX6DITLQ.js} +1 -1
- package/{chunk-3VFYQH3I.js → chunk-HIDVLMZC.js} +203 -156
- package/{chunk-5LQDHFBN.js → chunk-IDFGIROZ.js} +20 -17
- package/{chunk-UCFPVYP7.js → chunk-IFWXH7LH.js} +1 -1
- package/{chunk-LXTC53TN.js → chunk-J45ACAOQ.js} +815 -361
- package/{chunk-S6K5F3KP.js → chunk-JP2BH4NC.js} +1 -1
- package/{chunk-X2KRQP7V.js → chunk-JV5FHHF7.js} +1 -1
- package/{chunk-6EDAMVG6.js → chunk-K26XPZRB.js} +11 -11
- package/{chunk-RU6DULV4.js → chunk-KB5RQRSJ.js} +1 -1
- package/{chunk-T43K75CK.js → chunk-KC2QVCI7.js} +24 -178
- package/chunk-KK3FCYZM.js +647 -0
- package/{chunk-XZODOEKU.js → chunk-KMDHRVS7.js} +29 -5
- package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
- package/{chunk-UAPNPNSG.js → chunk-KW72WVHO.js} +2085 -1046
- package/{chunk-ILHQ2AXT.js → chunk-KZAT2M2V.js} +14 -8
- package/{chunk-L42CBKBZ.js → chunk-KZKMH374.js} +3 -3
- package/{chunk-ZI5SZ3MV.js → chunk-L6BLA6BT.js} +40 -31
- package/{chunk-AK5O76CC.js → chunk-LC5CVWP2.js} +3 -3
- package/{chunk-N5Z2V73W.js → chunk-LELADM5Q.js} +1 -1
- package/chunk-LHCGKAFO.js +739 -0
- package/{chunk-YOT437BH.js → chunk-LOF2EFUE.js} +203 -123
- package/{chunk-YQETUZ5V.js → chunk-LTVEOOZL.js} +29 -16
- package/{chunk-T2BEPTAG.js → chunk-MAA42MMV.js} +272 -26
- package/{chunk-NAOO4PVX.js → chunk-MECW2HJG.js} +16 -16
- package/{chunk-5HL4KC4A.js → chunk-MEDPR36J.js} +62 -87
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-YPPKC6FL.js → chunk-MYYNZG2M.js} +140 -40
- package/{chunk-UVUVQVZ6.js → chunk-MZVCFV3T.js} +19 -15
- package/{chunk-CQVGR3MX.js → chunk-N7MXFYLU.js} +7 -7
- package/{chunk-IC2I373Q.js → chunk-NEG5LYK5.js} +4 -4
- package/chunk-NJJK3PDA.js +133 -0
- package/{chunk-OB6DVWPF.js → chunk-OGZE6BZG.js} +331 -99
- package/{chunk-M3Y4IBIR.js → chunk-OHUYN3YU.js} +6 -6
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-SFTTXGPM.js → chunk-PDAXMBLW.js} +35 -28
- package/{chunk-OBSEKCVK.js → chunk-PQ63BDV3.js} +210 -51
- package/{chunk-EUCFKKDM.js → chunk-PVFYPUIM.js} +40 -10
- package/{chunk-SRG5CNLC.js → chunk-QIVE5WJE.js} +8 -8
- package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
- package/{chunk-5RKUPJYL.js → chunk-QLUYDJST.js} +11 -3
- package/{chunk-7Z6EW7AH.js → chunk-QOURTDZL.js} +97 -11
- package/{chunk-VZW34YUL.js → chunk-QWSH3UAQ.js} +8 -5
- package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
- package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
- package/{chunk-SW6OD4KE.js → chunk-RDPAIR67.js} +351 -18
- package/{chunk-NO3VBWTL.js → chunk-RXTZB2DH.js} +4 -4
- package/{chunk-AXYH4734.js → chunk-S25VJYXV.js} +21 -15
- package/{chunk-MWHOH4RJ.js → chunk-SESKIWB4.js} +6 -6
- package/{chunk-GUVXQSFZ.js → chunk-SF4GMDZO.js} +18 -108
- package/{chunk-TINJKQSO.js → chunk-SQRKAYQW.js} +25 -25
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-3HTP4WZQ.js → chunk-SX6AWTNK.js} +46 -8
- package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
- package/{chunk-CLCXHIBS.js → chunk-T4QY3HZ5.js} +1 -1
- package/{chunk-HVUDBOQG.js → chunk-TB5KTLNB.js} +9 -6
- package/{chunk-KRRE4A7D.js → chunk-TKE4OJ4B.js} +280 -56
- package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
- package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
- package/{chunk-CKT6QUE2.js → chunk-UHW6SCVK.js} +1 -1
- package/{chunk-T5N6NHAT.js → chunk-UPOW5HTG.js} +6 -6
- package/{chunk-WJP4TH6U.js → chunk-VEVLLBFK.js} +2 -2
- package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
- package/{chunk-KJAAPGBE.js → chunk-VUHKG4KS.js} +6 -6
- package/{chunk-TOKPHZ55.js → chunk-W3HSD32M.js} +17 -10
- package/{chunk-2SKTCNWO.js → chunk-W5OJBZLZ.js} +4 -4
- package/chunk-WBSJAIZP.js +170 -0
- package/chunk-WDWZPASX.js +29 -0
- package/chunk-WFGNWWJI.js +326 -0
- package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
- package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
- package/{chunk-HYKGIXNO.js → chunk-XGWRH3OF.js} +114 -29
- package/{chunk-XIEYGCN6.js → chunk-XKV53E4E.js} +460 -117
- package/{chunk-JHF6VLVL.js → chunk-XYRTC2Y3.js} +155 -170
- package/{chunk-L5I543VB.js → chunk-YGDYYFRX.js} +20 -24
- package/{chunk-ZADGPNTV.js → chunk-YHWMKGOX.js} +77 -103
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/chunk-Z6YTCDU4.js +24 -0
- package/{chunk-PVAWNHP5.js → chunk-ZP26NIZE.js} +647 -387
- package/{chunk-2G3YSVO6.js → chunk-ZQ6K57FJ.js} +3 -3
- package/{cliAgentConfigHelpers-QVSQYTKC.js → cliAgentConfigHelpers-37ZNEY5Y.js} +16 -16
- package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
- package/{cliEnvHelpers-D6HMC46Z.js → cliEnvHelpers-CNMP3RDX.js} +2 -2
- package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
- package/cliLocalAgentRecordReader-53773JID.js +102 -0
- package/{commandRegistry-TKR6OWXP.js → commandRegistry-RJUO2VOD.js} +113 -101
- package/{contentThunks-BQWRPCTM.js → contentThunks-4EFHLUTB.js} +44 -41
- package/{cooldownCommands-FZYQOWI5.js → cooldownCommands-QL6DWGVU.js} +3 -3
- package/{createAgentAutomationAction-GFI6SJZV.js → createAgentAutomationAction-ZFFGJ7CZ.js} +44 -41
- package/{createDialogAction-MMBIHFFU.js → createDialogAction-SDUGVTPS.js} +45 -43
- package/{createPageAction-EEYUE5FB.js → createPageAction-NNM3OFLY.js} +49 -46
- package/{db-CS4ZJQKV.js → db-6NRZLEW2.js} +10 -7
- package/{dbSlice-X4Z4E4QU.js → dbSlice-5MQ3ELID.js} +16 -15
- package/{deleteFile-QOOP2UK7.js → deleteFile-VCCHS72Y.js} +12 -9
- package/{dialogCommands-OXBQ73DD.js → dialogCommands-SJK5KWXU.js} +73 -66
- package/dialogMessageRecord-OAV77LT7.js +7 -0
- package/{dialogNotifyCommand-VWS5G4OO.js → dialogNotifyCommand-PST75COP.js} +19 -19
- package/{dialogSlice-KGYIABDY.js → dialogSlice-2KLMHECR.js} +44 -41
- package/{dialogUsageCommand-FEWCN7IA.js → dialogUsageCommand-BZPKR3DW.js} +8 -8
- package/{docCreateCommands-LS32VKY3.js → docCreateCommands-K7CDL2HY.js} +66 -57
- package/{docDeleteCommands-JTYR5RPH.js → docDeleteCommands-ZEY5YCSP.js} +69 -60
- package/{docReadCommands-E5LTVKWN.js → docReadCommands-A4ROLIQG.js} +66 -57
- package/{docStore-TVS2FNER.js → docStore-A4O6YJAM.js} +19 -18
- package/{docUpdateCommands-I3J3JDZ2.js → docUpdateCommands-6HTFQY4O.js} +66 -57
- package/{fetchMessages-Q3INLN5F.js → fetchMessages-TQEUZD7H.js} +3 -3
- package/{getPricing-VNGFM4PN.js → getPricing-FCHYVRJU.js} +6 -6
- package/{handleSendMessageAction-SSON36TJ.js → handleSendMessageAction-6WEFYBUC.js} +87 -82
- package/{hostCredentialCreate-WTW4THJF.js → hostCredentialCreate-WOWCNOYM.js} +136 -123
- package/index.js +54 -16
- package/keys-RWF7UCB4.js +1 -1
- package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
- package/{localDialogRead-V36DX2Q2.js → localDialogRead-3T2KMCRC.js} +2 -2
- package/{localRuntimeAdapter-MI2JGXSF.js → localRuntimeAdapter-7EDBDRYW.js} +147 -133
- package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-7DKIT7UH.js} +4 -2
- package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
- package/{machineCommands-3LROJZDK.js → machineCommands-XRPC67LL.js} +290 -354
- package/machineWsRunDispatch-SOGFW472.js +203 -0
- package/markdownToSlate-KIYM7B3P.js +8 -0
- package/mcpLocalAuthorizeCommand-VOJARP3M.js +106 -0
- package/{memberThunks-CFEPHAND.js → memberThunks-KC3WJGL3.js} +26 -21
- package/{memoryCommands-JQMEJO7J.js → memoryCommands-BC6REPQB.js} +6 -6
- package/{models-H5NNZRLH.js → models-EP7VG6N2.js} +2 -2
- package/{overlay-THLKYIWY.js → overlay-JA3SPVUS.js} +7 -3
- package/package.json +1 -1
- package/{projectArchive-3X54XFVN.js → projectArchive-GDVPIZX2.js} +50 -47
- package/{providerPresetApply-FO36N5TX.js → providerPresetApply-4H7YP5D7.js} +9 -9
- package/{providerRegistry-U2BSFE6K.js → providerRegistry-F3UPOTIY.js} +9 -9
- package/{read-KA3L2V7O.js → read-T7VU2IMO.js} +11 -10
- package/{readDocTool-AMAZAPAW.js → readDocTool-BPQ3QJSD.js} +1 -1
- package/{readlineWorkspace-Z3YUH4SX.js → readlineWorkspace-OWQIIUGH.js} +9406 -6791
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-JQOJSUM7.js → removeDialogAgentAction-FEUUVMYC.js} +23 -22
- package/{runAgentClientLoop-4FCFLMDJ.js → runAgentClientLoop-SJREK2B7.js} +107 -86
- package/{runtimeDoctorCommands-CXOCVDPU.js → runtimeDoctorCommands-XQD4MN4I.js} +19 -19
- package/{secretCommands-GGUAWAE7.js → secretCommands-LH7QTJO2.js} +3 -3
- package/{setDialogExtraReferencesAction-YXQTGXIN.js → setDialogExtraReferencesAction-JSTQJPXL.js} +19 -18
- package/{setPrimaryDialogAgentAction-YNLB66WE.js → setPrimaryDialogAgentAction-Z2BQE3IY.js} +23 -22
- package/{settingThunks-E6N7RSSS.js → settingThunks-C2YWCNYI.js} +186 -67
- package/{skillDiscovery-B5V23AXP.js → skillDiscovery-MDDKPTW3.js} +4 -3
- package/{spaceCommands-DB5DKC2J.js → spaceCommands-YRBQ52PG.js} +71 -62
- package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
- package/{streamAgentChatTurn-FCBGMD4D.js → streamAgentChatTurn-NCA4BKDZ.js} +244 -185
- package/{switchDialogAgentAction-LAHLUECU.js → switchDialogAgentAction-G7XVAOGH.js} +20 -19
- package/{tableCommands-VNSXHAMG.js → tableCommands-UHEA5QNL.js} +14 -11
- package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
- package/{tools-6JD36D6K.js → tools-6WQVUGKV.js} +74 -70
- package/tuiRestart-3J7LRMPR.js +41 -0
- package/{tuiSummaryLlmCaller-UHZIPGAX.js → tuiSummaryLlmCaller-2J6NG53N.js} +24 -23
- package/{updateCommands-KZ54HCU5.js → updateCommands-5OYND6EF.js} +8 -6
- package/{updateDialogTitleAction-RV3EUEN3.js → updateDialogTitleAction-QCSN3RYO.js} +46 -43
- package/{usageCommand-KFVV6UL3.js → usageCommand-SK7JTEPC.js} +3 -3
- package/{usageRebuildCommand-HHFSNK46.js → usageRebuildCommand-DF3HUP6F.js} +4 -4
- package/webapi-QVV65DQF.js +2487 -0
- package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-HIYNL3VR.js} +2 -2
- package/workContext-Y3ADAPZU.js +14 -0
- package/workContextAccess-UZHDLBUR.js +11 -0
- package/workContextWriteNotice-YCSSMHN4.js +7 -0
- package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-ZCSQCHG3.js} +9 -9
- package/agentListCommands-C65UESYM.js +0 -1004
- package/agentRecordCommands-6RCJS2EY.js +0 -176
- package/agentRunCommand-P3GRKXKS.js +0 -208
- package/chunk-2WZXXAQD.js +0 -57
- package/chunk-5ZMIIR23.js +0 -265
- package/chunk-62HXNQVV.js +0 -134
- package/chunk-BJF2MHJ3.js +0 -118
- package/chunk-KEPOVMF4.js +0 -91
- package/chunk-PXKF5CV4.js +0 -357
- package/chunk-WACI5I6V.js +0 -147
- package/chunk-YGILMZ7N.js +0 -81
- package/cliLocalAgentRecordReader-SPKAJYME.js +0 -90
- package/machineWsRunDispatch-BUUJRUUB.js +0 -191
- package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +4 -4
- package/{chunk-VXL2FZTP.js → chunk-HXER7YJF.js} +3 -3
- package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
- package/{chunk-SSGTV4FC.js → chunk-USGHJSGO.js} +5 -5
- package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
- package/{offlineMarxistsAgentCommand-AGA2X5E4.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +5 -5
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
import {
|
|
2
|
+
decorateAgentsWithPublicStatusAcrossServers,
|
|
3
|
+
listFavoriteAgentIdsAcrossServers,
|
|
4
|
+
listLocalCachedAgents,
|
|
5
|
+
listRemoteAgents,
|
|
6
|
+
listRemoteAgentsAcrossServers,
|
|
7
|
+
listRemotePublicAgents,
|
|
8
|
+
normalizeListedAgent,
|
|
9
|
+
parseAgentListArgs
|
|
10
|
+
} from "./chunk-QWSH3UAQ.js";
|
|
11
|
+
import {
|
|
12
|
+
refreshSubscriptionQuotas
|
|
13
|
+
} from "./chunk-P27E22MA.js";
|
|
14
|
+
import {
|
|
15
|
+
getReadableCliDb
|
|
16
|
+
} from "./chunk-DLT2DN4M.js";
|
|
17
|
+
import {
|
|
18
|
+
applyCredentialAvailability,
|
|
19
|
+
clearCredentialAvailabilityIfMarkedAt,
|
|
20
|
+
readCredentialAvailability,
|
|
21
|
+
readEffectiveCredentialEntry
|
|
22
|
+
} from "./chunk-WWTSEBDF.js";
|
|
23
|
+
import {
|
|
24
|
+
buildAgentDiscoveryResult,
|
|
25
|
+
injectSpeedContextIntoListAgentsResult,
|
|
26
|
+
isLocalDispatchSpeedSource,
|
|
27
|
+
isServerDispatchSpeedSource,
|
|
28
|
+
matchesAgentQuery,
|
|
29
|
+
resolvePaginationArgs,
|
|
30
|
+
summarizeCredentialGroups,
|
|
31
|
+
toDiscoverySafeAgentSummary
|
|
32
|
+
} from "./chunk-AO6T7U62.js";
|
|
33
|
+
import "./chunk-AMWMV56B.js";
|
|
34
|
+
import {
|
|
35
|
+
buildSpaceLookup,
|
|
36
|
+
getSpaceContentKeys
|
|
37
|
+
} from "./chunk-ID4G2MAR.js";
|
|
38
|
+
import {
|
|
39
|
+
readLiveDbRecordAfterTombstoneMerge
|
|
40
|
+
} from "./chunk-5UAKGCQG.js";
|
|
41
|
+
import {
|
|
42
|
+
queryUserRecords,
|
|
43
|
+
readDbRecord
|
|
44
|
+
} from "./chunk-IDFGIROZ.js";
|
|
45
|
+
import "./chunk-FGHEF6WI.js";
|
|
46
|
+
import {
|
|
47
|
+
listRecentRunRecords
|
|
48
|
+
} from "./chunk-XKV53E4E.js";
|
|
49
|
+
import "./chunk-S25VJYXV.js";
|
|
50
|
+
import "./chunk-UEILX4EV.js";
|
|
51
|
+
import "./chunk-GBWGPTA7.js";
|
|
52
|
+
import "./chunk-T4QY3HZ5.js";
|
|
53
|
+
import "./chunk-F4XIS5DL.js";
|
|
54
|
+
import "./chunk-LHCGKAFO.js";
|
|
55
|
+
import "./chunk-ZNFJWEN4.js";
|
|
56
|
+
import "./chunk-MYYNZG2M.js";
|
|
57
|
+
import "./chunk-ANUP75N2.js";
|
|
58
|
+
import "./chunk-AL3TYDIF.js";
|
|
59
|
+
import "./chunk-EDT65EUE.js";
|
|
60
|
+
import "./chunk-HNUWUO75.js";
|
|
61
|
+
import "./chunk-CHOZJMJS.js";
|
|
62
|
+
import "./chunk-4OXPN3WC.js";
|
|
63
|
+
import "./chunk-2FK2KZSL.js";
|
|
64
|
+
import "./chunk-56GBUMO5.js";
|
|
65
|
+
import "./chunk-HIDVLMZC.js";
|
|
66
|
+
import "./chunk-LOF2EFUE.js";
|
|
67
|
+
import "./chunk-FDZ2GBWO.js";
|
|
68
|
+
import {
|
|
69
|
+
DEFAULT_PROVIDER_RETRY_MS,
|
|
70
|
+
formatQuotaSummary,
|
|
71
|
+
isAgentUnavailableNow,
|
|
72
|
+
resolveAgentAvailability,
|
|
73
|
+
resolveCredentialCandidateKeys,
|
|
74
|
+
resolveCredentialKeyWithFallback,
|
|
75
|
+
shouldClearCooldownFromQuota
|
|
76
|
+
} from "./chunk-QJTZ76CP.js";
|
|
77
|
+
import "./chunk-W3HSD32M.js";
|
|
78
|
+
import "./chunk-X4O7FJF5.js";
|
|
79
|
+
import "./chunk-DMPZMYH4.js";
|
|
80
|
+
import "./chunk-BYXBJQAS.js";
|
|
81
|
+
import "./chunk-SX6AWTNK.js";
|
|
82
|
+
import "./chunk-TLE77UJ5.js";
|
|
83
|
+
import "./chunk-WFGNWWJI.js";
|
|
84
|
+
import "./chunk-VUHKG4KS.js";
|
|
85
|
+
import "./chunk-JV5FHHF7.js";
|
|
86
|
+
import "./chunk-2MBTWINN.js";
|
|
87
|
+
import "./chunk-LTVEOOZL.js";
|
|
88
|
+
import "./chunk-5ZUL4CUO.js";
|
|
89
|
+
import "./chunk-MAA42MMV.js";
|
|
90
|
+
import "./chunk-H57T64RA.js";
|
|
91
|
+
import "./chunk-UKZX3NHN.js";
|
|
92
|
+
import "./chunk-SR4FE5VD.js";
|
|
93
|
+
import "./chunk-5MMAK75Q.js";
|
|
94
|
+
import "./chunk-USGHJSGO.js";
|
|
95
|
+
import "./chunk-E6A5NHDH.js";
|
|
96
|
+
import "./chunk-KX6YBIHG.js";
|
|
97
|
+
import "./chunk-TB5KTLNB.js";
|
|
98
|
+
import "./chunk-EWQ3HGNZ.js";
|
|
99
|
+
import "./chunk-PSCNXBYA.js";
|
|
100
|
+
import "./chunk-DWLEOOGR.js";
|
|
101
|
+
import "./chunk-OW765XBU.js";
|
|
102
|
+
import "./chunk-7DPNBQSV.js";
|
|
103
|
+
import "./chunk-5HUO7SEX.js";
|
|
104
|
+
import "./chunk-YGDYYFRX.js";
|
|
105
|
+
import "./chunk-2SXN7LAY.js";
|
|
106
|
+
import "./chunk-G7Y4GXTY.js";
|
|
107
|
+
import "./chunk-6UBGXX2W.js";
|
|
108
|
+
import "./chunk-BV3FLP2L.js";
|
|
109
|
+
import "./chunk-4ZCTKB27.js";
|
|
110
|
+
import "./chunk-TKE4OJ4B.js";
|
|
111
|
+
import "./chunk-AETZ7AD6.js";
|
|
112
|
+
import "./chunk-CO6E7YK6.js";
|
|
113
|
+
import "./chunk-KHCLMKZZ.js";
|
|
114
|
+
import "./chunk-SYTHYBMI.js";
|
|
115
|
+
import "./chunk-OJKUU3LP.js";
|
|
116
|
+
import "./chunk-YZMNK53S.js";
|
|
117
|
+
import "./chunk-UPOW5HTG.js";
|
|
118
|
+
import "./chunk-BR3GT6MR.js";
|
|
119
|
+
import "./chunk-NEG5LYK5.js";
|
|
120
|
+
import "./chunk-GX6DITLQ.js";
|
|
121
|
+
import "./chunk-YLAHYLDQ.js";
|
|
122
|
+
import "./chunk-KZAT2M2V.js";
|
|
123
|
+
import "./chunk-M2EJHDJP.js";
|
|
124
|
+
import "./chunk-I42VC5KR.js";
|
|
125
|
+
import "./chunk-U6VC4MU4.js";
|
|
126
|
+
import {
|
|
127
|
+
parseUserIdFromAuthToken,
|
|
128
|
+
readOption,
|
|
129
|
+
resolveAuthToken,
|
|
130
|
+
resolveServerCandidates,
|
|
131
|
+
resolveServerUrl
|
|
132
|
+
} from "./chunk-BIDSIRTS.js";
|
|
133
|
+
import "./chunk-OLZBQWZU.js";
|
|
134
|
+
import "./chunk-LCBAMY2M.js";
|
|
135
|
+
import "./chunk-4O22PGNQ.js";
|
|
136
|
+
import {
|
|
137
|
+
t
|
|
138
|
+
} from "./chunk-OGZE6BZG.js";
|
|
139
|
+
import "./chunk-6ASGEP5D.js";
|
|
140
|
+
import "./chunk-CTWCZKNS.js";
|
|
141
|
+
import {
|
|
142
|
+
toErrorMessage
|
|
143
|
+
} from "./chunk-HNMXYYJR.js";
|
|
144
|
+
import "./chunk-K26XPZRB.js";
|
|
145
|
+
import "./chunk-ESN4WNWU.js";
|
|
146
|
+
import "./chunk-3EUW3WEO.js";
|
|
147
|
+
import "./chunk-WWC7I6TA.js";
|
|
148
|
+
import "./chunk-CD2DK5JA.js";
|
|
149
|
+
import "./chunk-JRTNUU5Z.js";
|
|
150
|
+
import "./chunk-KUG52IAP.js";
|
|
151
|
+
import "./chunk-G3SUCT4W.js";
|
|
152
|
+
import "./chunk-4SN6J65J.js";
|
|
153
|
+
import "./chunk-CF7PE763.js";
|
|
154
|
+
import "./chunk-PQ63BDV3.js";
|
|
155
|
+
import "./chunk-QSJ3HFEF.js";
|
|
156
|
+
import "./chunk-U67V476Y.js";
|
|
157
|
+
|
|
158
|
+
// packages/cli/agentListCommands.ts
|
|
159
|
+
var createCliDispatchSampleDb = (db, userId, env) => {
|
|
160
|
+
let localDialogs;
|
|
161
|
+
return {
|
|
162
|
+
iterator: (options) => db.iterator(options),
|
|
163
|
+
isDispatchRun: async (dialogId, entryPath) => {
|
|
164
|
+
if (entryPath === "cli-local") {
|
|
165
|
+
localDialogs ??= new Set(listRecentRunRecords({ env, limit: 400 }).filter(
|
|
166
|
+
(run) => typeof run.dialogId === "string" && isLocalDispatchSpeedSource(run, run.dialogId, userId)
|
|
167
|
+
).map((run) => run.dialogId));
|
|
168
|
+
return localDialogs.has(dialogId);
|
|
169
|
+
}
|
|
170
|
+
if (entryPath !== "agent-run") return false;
|
|
171
|
+
try {
|
|
172
|
+
return isServerDispatchSpeedSource(await db.get(`dialog-${userId}-${dialogId}`), dialogId, userId);
|
|
173
|
+
} catch {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
function formatCooldownUntilLocal(at, now = /* @__PURE__ */ new Date()) {
|
|
180
|
+
const pad = (value) => String(value).padStart(2, "0");
|
|
181
|
+
const time = `${pad(at.getHours())}:${pad(at.getMinutes())}`;
|
|
182
|
+
const sameDay = at.getFullYear() === now.getFullYear() && at.getMonth() === now.getMonth() && at.getDate() === now.getDate();
|
|
183
|
+
return sameDay ? time : `${pad(at.getMonth() + 1)}-${pad(at.getDate())} ${time}`;
|
|
184
|
+
}
|
|
185
|
+
async function runAgentListCommand(args, deps = {}) {
|
|
186
|
+
const env = deps.env ?? process.env;
|
|
187
|
+
let planningCaller;
|
|
188
|
+
try {
|
|
189
|
+
const raw = JSON.parse(env.NOLO_PLANNING_CALLER ?? "null");
|
|
190
|
+
if (raw && typeof raw === "object") planningCaller = {
|
|
191
|
+
agentKey: typeof raw.agentKey === "string" ? raw.agentKey : void 0,
|
|
192
|
+
effectiveModel: typeof raw.effectiveModel === "string" ? raw.effectiveModel : void 0,
|
|
193
|
+
runKind: raw.runKind === "subtask" ? "subtask" : "interactive"
|
|
194
|
+
};
|
|
195
|
+
} catch {
|
|
196
|
+
}
|
|
197
|
+
const output = deps.output ?? process.stdout;
|
|
198
|
+
const { wantJson, wantSafe, publicOnly, scope: requestedScope, idsOnly, showUnavailable, verbose, compact, limit, offset, query, fragmentOffset, fragmentAgentKey, fragmentDigest } = parseAgentListArgs(args);
|
|
199
|
+
if (requestedScope && !["preferred", "public", "all"].includes(requestedScope)) {
|
|
200
|
+
throw new Error(`Invalid scope '${requestedScope}'`);
|
|
201
|
+
}
|
|
202
|
+
if (requestedScope && publicOnly && requestedScope !== "public") {
|
|
203
|
+
throw new Error(`Conflicting arguments: scope='${requestedScope}' conflicts with publicOnly=true.`);
|
|
204
|
+
}
|
|
205
|
+
const scope = requestedScope ?? "all";
|
|
206
|
+
const spaceInput = readOption(args, "--space") ?? readOption(args, "--space-id");
|
|
207
|
+
const authToken = resolveAuthToken(args, env);
|
|
208
|
+
if (!authToken) {
|
|
209
|
+
output.write("[nolo] agent list requires an auth token. Run `nolo login` or set AUTH_TOKEN.\n");
|
|
210
|
+
return 1;
|
|
211
|
+
}
|
|
212
|
+
const userId = parseUserIdFromAuthToken(authToken);
|
|
213
|
+
if (!userId) {
|
|
214
|
+
output.write("[nolo] agent list could not read userId from AUTH_TOKEN.\n");
|
|
215
|
+
return 1;
|
|
216
|
+
}
|
|
217
|
+
const forceQuotaRefresh = args.includes("--refresh-quota");
|
|
218
|
+
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
219
|
+
const fallbackFetchImpl = deps.fallbackFetchImpl;
|
|
220
|
+
const serverUrl = resolveServerUrl(args, env);
|
|
221
|
+
const serverUrls = resolveServerCandidates(args, env, serverUrl);
|
|
222
|
+
try {
|
|
223
|
+
const pagination = resolvePaginationArgs({ limit, offset });
|
|
224
|
+
const hasQuery = Boolean(query && typeof query === "string" && query.trim());
|
|
225
|
+
const MAX_UPSTREAM_CEILING = 2e3;
|
|
226
|
+
const upstreamLimit = Math.min(
|
|
227
|
+
MAX_UPSTREAM_CEILING,
|
|
228
|
+
hasQuery ? MAX_UPSTREAM_CEILING : Math.max(500, (pagination.offset ?? 0) + (pagination.limit ?? 100))
|
|
229
|
+
);
|
|
230
|
+
const ownAgentsPromise = (async () => {
|
|
231
|
+
try {
|
|
232
|
+
const remoteResult = await listRemoteAgentsAcrossServers({
|
|
233
|
+
authToken,
|
|
234
|
+
fallbackFetchImpl,
|
|
235
|
+
fetchImpl,
|
|
236
|
+
serverUrls,
|
|
237
|
+
userId
|
|
238
|
+
});
|
|
239
|
+
return {
|
|
240
|
+
agents: remoteResult.agents,
|
|
241
|
+
serverFailures: remoteResult.failures,
|
|
242
|
+
source: "global-cache"
|
|
243
|
+
};
|
|
244
|
+
} catch {
|
|
245
|
+
try {
|
|
246
|
+
const db = deps.db ?? await getReadableCliDb(output);
|
|
247
|
+
return {
|
|
248
|
+
agents: await listLocalCachedAgents({ db, userId }),
|
|
249
|
+
serverFailures: [],
|
|
250
|
+
source: "local-cache"
|
|
251
|
+
};
|
|
252
|
+
} catch {
|
|
253
|
+
return {
|
|
254
|
+
agents: await listRemoteAgents({
|
|
255
|
+
authToken,
|
|
256
|
+
fallbackFetchImpl,
|
|
257
|
+
fetchImpl,
|
|
258
|
+
serverUrl,
|
|
259
|
+
userId,
|
|
260
|
+
queryUserRecords,
|
|
261
|
+
readDbRecord
|
|
262
|
+
}),
|
|
263
|
+
serverFailures: [],
|
|
264
|
+
source: "remote-cache"
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
})();
|
|
269
|
+
const publicResultsPromise = scope !== "preferred" ? Promise.all(serverUrls.map((url) => listRemotePublicAgents({
|
|
270
|
+
authToken,
|
|
271
|
+
fetchImpl,
|
|
272
|
+
serverUrl: url,
|
|
273
|
+
limit: upstreamLimit,
|
|
274
|
+
query: hasQuery ? query : void 0
|
|
275
|
+
}))) : void 0;
|
|
276
|
+
const spaceLookup = spaceInput ? buildSpaceLookup(spaceInput) : null;
|
|
277
|
+
const spaceReadPromise = spaceLookup ? readLiveDbRecordAfterTombstoneMerge({
|
|
278
|
+
authToken,
|
|
279
|
+
dbKey: spaceLookup.spaceKey,
|
|
280
|
+
fallbackFetchImpl,
|
|
281
|
+
fetchImpl,
|
|
282
|
+
serverUrls
|
|
283
|
+
}) : void 0;
|
|
284
|
+
const favoritesPromise = wantSafe && !idsOnly ? listFavoriteAgentIdsAcrossServers({
|
|
285
|
+
authToken,
|
|
286
|
+
fetchImpl,
|
|
287
|
+
serverUrls
|
|
288
|
+
}).catch(() => ({})) : void 0;
|
|
289
|
+
const [ownResult, publicResults, spaceRead] = await Promise.all([
|
|
290
|
+
ownAgentsPromise,
|
|
291
|
+
publicResultsPromise ?? Promise.resolve(void 0),
|
|
292
|
+
spaceReadPromise ?? Promise.resolve(void 0)
|
|
293
|
+
]);
|
|
294
|
+
let { agents, source, serverFailures } = ownResult;
|
|
295
|
+
let cliUpstreamTruncated = false;
|
|
296
|
+
let cliUpstreamTotal;
|
|
297
|
+
const publicCatalogAgents = /* @__PURE__ */ new Set();
|
|
298
|
+
if (publicResults) {
|
|
299
|
+
const publicAgents = publicResults.flatMap((r) => r.agents);
|
|
300
|
+
for (const r of publicResults) {
|
|
301
|
+
if (r.truncated) cliUpstreamTruncated = true;
|
|
302
|
+
if (typeof r.total === "number") {
|
|
303
|
+
cliUpstreamTotal = Math.max(cliUpstreamTotal ?? 0, r.total);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
if (scope === "all") {
|
|
307
|
+
const seenPublicKeys = /* @__PURE__ */ new Set();
|
|
308
|
+
for (const agent of agents) {
|
|
309
|
+
if (agent.publicKey) seenPublicKeys.add(agent.publicKey);
|
|
310
|
+
}
|
|
311
|
+
const addedPublicAgents = publicAgents.filter((agent) => {
|
|
312
|
+
if (!agent.publicKey) return true;
|
|
313
|
+
if (seenPublicKeys.has(agent.publicKey)) return false;
|
|
314
|
+
seenPublicKeys.add(agent.publicKey);
|
|
315
|
+
return true;
|
|
316
|
+
});
|
|
317
|
+
for (const agent of addedPublicAgents) publicCatalogAgents.add(agent);
|
|
318
|
+
agents = [...agents, ...addedPublicAgents];
|
|
319
|
+
} else {
|
|
320
|
+
for (const agent of publicAgents) publicCatalogAgents.add(agent);
|
|
321
|
+
agents = publicAgents;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
agents = agents.filter((agent) => agent.privateKey.startsWith("agent-"));
|
|
325
|
+
let resolvedSpaceId = null;
|
|
326
|
+
let spaceContentKeys = null;
|
|
327
|
+
if (spaceLookup && spaceRead) {
|
|
328
|
+
resolvedSpaceId = spaceLookup.spaceId;
|
|
329
|
+
serverFailures = [...serverFailures, ...spaceRead.failures];
|
|
330
|
+
const spaceRecord = spaceRead.record;
|
|
331
|
+
const currentSpaceContentKeys = getSpaceContentKeys(spaceRecord);
|
|
332
|
+
spaceContentKeys = currentSpaceContentKeys;
|
|
333
|
+
agents = agents.filter(
|
|
334
|
+
(agent) => currentSpaceContentKeys.has(agent.privateKey) || currentSpaceContentKeys.has(agent.publicKey) || currentSpaceContentKeys.has(agent.id)
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
const decorateTargets = source === "global-cache" ? agents.filter((agent) => !publicCatalogAgents.has(agent)) : [];
|
|
338
|
+
if (publicOnly && decorateTargets.length > 0) {
|
|
339
|
+
await decorateAgentsWithPublicStatusAcrossServers({
|
|
340
|
+
agents: decorateTargets,
|
|
341
|
+
authToken,
|
|
342
|
+
fallbackFetchImpl,
|
|
343
|
+
fetchImpl,
|
|
344
|
+
serverUrls
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
if (publicOnly) {
|
|
348
|
+
agents = agents.filter((agent) => agent.publicRecordExists);
|
|
349
|
+
}
|
|
350
|
+
const originalAgentDeadlines = new Map(agents.map((agent) => [agent.privateKey, agent.nextAvailableAt]));
|
|
351
|
+
agents = applyCredentialAvailability(
|
|
352
|
+
agents,
|
|
353
|
+
await readCredentialAvailability(env).catch(() => ({}))
|
|
354
|
+
);
|
|
355
|
+
let unavailableCount = agents.filter((agent) => isAgentUnavailableNow(agent)).length;
|
|
356
|
+
let agentsForOutput = agents;
|
|
357
|
+
if (query && typeof query === "string" && query.trim()) {
|
|
358
|
+
agentsForOutput = agentsForOutput.filter((agent) => matchesAgentQuery(agent, query));
|
|
359
|
+
}
|
|
360
|
+
const refreshCandidates = !idsOnly ? [.../* @__PURE__ */ new Set([...agentsForOutput, ...agents.filter(
|
|
361
|
+
(agent) => !agentsForOutput.includes(agent) && isAgentUnavailableNow(agent) && agent.credentialConfigured === true && (!query || !String(query).trim() || matchesAgentQuery(agent, query))
|
|
362
|
+
)])] : agentsForOutput;
|
|
363
|
+
const decoratePromise = !publicOnly && decorateTargets.length > 0 ? decorateAgentsWithPublicStatusAcrossServers({
|
|
364
|
+
agents: decorateTargets,
|
|
365
|
+
authToken,
|
|
366
|
+
fallbackFetchImpl,
|
|
367
|
+
fetchImpl,
|
|
368
|
+
serverUrls
|
|
369
|
+
}) : Promise.resolve();
|
|
370
|
+
if (!idsOnly) {
|
|
371
|
+
const [, fresh] = await Promise.all([
|
|
372
|
+
decoratePromise,
|
|
373
|
+
refreshSubscriptionQuotas({
|
|
374
|
+
entries: refreshCandidates.map((agent) => ({
|
|
375
|
+
key: agent.privateKey,
|
|
376
|
+
...agent.quota ? { quota: agent.quota } : {},
|
|
377
|
+
probeable: agent.credentialConfigured === true
|
|
378
|
+
})),
|
|
379
|
+
forceRefresh: forceQuotaRefresh,
|
|
380
|
+
env,
|
|
381
|
+
cliArgs: args,
|
|
382
|
+
fetchImpl
|
|
383
|
+
})
|
|
384
|
+
]);
|
|
385
|
+
const now = Date.now();
|
|
386
|
+
for (const agent of refreshCandidates) {
|
|
387
|
+
const quota = fresh[agent.privateKey];
|
|
388
|
+
if (!quota) continue;
|
|
389
|
+
agent.quota = quota;
|
|
390
|
+
try {
|
|
391
|
+
const key = resolveCredentialKeyWithFallback(agent);
|
|
392
|
+
if (!key) continue;
|
|
393
|
+
const entry = await readEffectiveCredentialEntry(key, env);
|
|
394
|
+
if (entry && shouldClearCooldownFromQuota(entry, quota, now, { model: agent.model })) {
|
|
395
|
+
const candidatesToClear = entry.candidates && entry.candidates.length > 0 ? entry.candidates : resolveCredentialCandidateKeys(key).map((candKey) => ({
|
|
396
|
+
key: candKey,
|
|
397
|
+
markedAt: entry.markedAt
|
|
398
|
+
}));
|
|
399
|
+
for (const cand of candidatesToClear) {
|
|
400
|
+
if (typeof cand.markedAt === "number") {
|
|
401
|
+
await clearCredentialAvailabilityIfMarkedAt(cand.key, cand.markedAt, env);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
const remainingAvailability = await readCredentialAvailability(env).catch(() => ({}));
|
|
405
|
+
for (const sibling of agents) {
|
|
406
|
+
if (resolveCredentialKeyWithFallback(sibling) !== key) continue;
|
|
407
|
+
const originalDeadline = originalAgentDeadlines.get(sibling.privateKey);
|
|
408
|
+
if (typeof originalDeadline === "number") sibling.nextAvailableAt = originalDeadline;
|
|
409
|
+
else delete sibling.nextAvailableAt;
|
|
410
|
+
Object.assign(sibling, applyCredentialAvailability([sibling], remainingAvailability)[0]);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
} catch {
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
for (const agent of agents) {
|
|
417
|
+
const decision = resolveAgentAvailability(agent, now);
|
|
418
|
+
if (decision.status === "quota_exhausted") {
|
|
419
|
+
const resetAt = decision.resetAt ?? now + DEFAULT_PROVIDER_RETRY_MS;
|
|
420
|
+
if (typeof agent.nextAvailableAt !== "number" || agent.nextAvailableAt < resetAt) {
|
|
421
|
+
agent.nextAvailableAt = resetAt;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
unavailableCount = agents.filter((agent) => isAgentUnavailableNow(agent)).length;
|
|
426
|
+
} else {
|
|
427
|
+
await decoratePromise;
|
|
428
|
+
}
|
|
429
|
+
const totalCount = agentsForOutput.length;
|
|
430
|
+
const pagedAgents = typeof pagination.limit === "number" || typeof pagination.offset === "number" ? agentsForOutput.slice(
|
|
431
|
+
pagination.offset ?? 0,
|
|
432
|
+
(pagination.offset ?? 0) + (pagination.limit ?? agentsForOutput.length)
|
|
433
|
+
) : agentsForOutput;
|
|
434
|
+
if (idsOnly) {
|
|
435
|
+
output.write(`${pagedAgents.map((agent) => agent.id).join("\n")}
|
|
436
|
+
`);
|
|
437
|
+
return 0;
|
|
438
|
+
}
|
|
439
|
+
if (wantSafe) {
|
|
440
|
+
const favoritesMap = await (favoritesPromise ?? Promise.resolve({}));
|
|
441
|
+
const existingKeys = /* @__PURE__ */ new Set();
|
|
442
|
+
for (const agent of agents) {
|
|
443
|
+
existingKeys.add(agent.privateKey);
|
|
444
|
+
existingKeys.add(agent.publicKey);
|
|
445
|
+
existingKeys.add(agent.id);
|
|
446
|
+
}
|
|
447
|
+
const extraFavoriteRecords = [];
|
|
448
|
+
const hydratedFavoriteAgents = [];
|
|
449
|
+
const missingFavKeys = Object.keys(favoritesMap).filter((favKey) => !existingKeys.has(favKey));
|
|
450
|
+
const favReads = await Promise.all(
|
|
451
|
+
missingFavKeys.map(async (favKey) => {
|
|
452
|
+
try {
|
|
453
|
+
const favRead = await readLiveDbRecordAfterTombstoneMerge({
|
|
454
|
+
authToken,
|
|
455
|
+
dbKey: favKey,
|
|
456
|
+
fallbackFetchImpl,
|
|
457
|
+
fetchImpl,
|
|
458
|
+
serverUrls
|
|
459
|
+
});
|
|
460
|
+
return { favKey, record: favRead.record };
|
|
461
|
+
} catch {
|
|
462
|
+
return { favKey, record: null };
|
|
463
|
+
}
|
|
464
|
+
})
|
|
465
|
+
);
|
|
466
|
+
for (const { favKey, record } of favReads) {
|
|
467
|
+
if (existingKeys.has(favKey)) continue;
|
|
468
|
+
if (!record || record.type && record.type !== "agent") continue;
|
|
469
|
+
const norm = normalizeListedAgent(record);
|
|
470
|
+
const candidateKeys = [record.dbKey, record.publicKey, record.id].filter((key) => typeof key === "string" && key.length > 0);
|
|
471
|
+
if (spaceContentKeys && !candidateKeys.some((key) => spaceContentKeys?.has(key))) {
|
|
472
|
+
continue;
|
|
473
|
+
}
|
|
474
|
+
if (norm) {
|
|
475
|
+
if (!favKey.startsWith("agent-pub-")) {
|
|
476
|
+
norm.verifiedAgentKey = favKey;
|
|
477
|
+
if (typeof record.userId === "string" && record.userId) {
|
|
478
|
+
norm.ownerId = record.userId;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
agents.push(norm);
|
|
482
|
+
hydratedFavoriteAgents.push(norm);
|
|
483
|
+
existingKeys.add(norm.privateKey);
|
|
484
|
+
existingKeys.add(norm.publicKey);
|
|
485
|
+
existingKeys.add(norm.id);
|
|
486
|
+
} else {
|
|
487
|
+
extraFavoriteRecords.push(record);
|
|
488
|
+
for (const key of candidateKeys) existingKeys.add(key);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
if (source === "global-cache" && hydratedFavoriteAgents.length > 0) {
|
|
492
|
+
await decorateAgentsWithPublicStatusAcrossServers({
|
|
493
|
+
agents: hydratedFavoriteAgents,
|
|
494
|
+
authToken,
|
|
495
|
+
fallbackFetchImpl,
|
|
496
|
+
fetchImpl,
|
|
497
|
+
serverUrls
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
const safeRecords = [...agents, ...extraFavoriteRecords].map((record) => toDiscoverySafeAgentSummary(record, { favoritesMap, userId })).filter((agent) => publicOnly ? agent.isPublic === true : true);
|
|
501
|
+
const discovery = buildAgentDiscoveryResult({
|
|
502
|
+
agents: safeRecords,
|
|
503
|
+
caller: planningCaller,
|
|
504
|
+
poolRestricted: Boolean(resolvedSpaceId) || serverFailures.length > 0 || source !== "global-cache",
|
|
505
|
+
scope: requestedScope ?? (publicOnly ? "public" : "all"),
|
|
506
|
+
query,
|
|
507
|
+
showUnavailable,
|
|
508
|
+
verbose,
|
|
509
|
+
compact,
|
|
510
|
+
limit,
|
|
511
|
+
offset,
|
|
512
|
+
upstreamTruncated: cliUpstreamTruncated,
|
|
513
|
+
upstreamTotal: cliUpstreamTotal
|
|
514
|
+
});
|
|
515
|
+
const listResult = JSON.stringify({
|
|
516
|
+
success: true,
|
|
517
|
+
userId,
|
|
518
|
+
...resolvedSpaceId ? { spaceId: resolvedSpaceId } : {},
|
|
519
|
+
planningRecommendation: discovery.planningRecommendation,
|
|
520
|
+
total: discovery.total,
|
|
521
|
+
...typeof discovery.offset === "number" ? { offset: discovery.offset } : {},
|
|
522
|
+
...typeof discovery.limit === "number" ? { limit: discovery.limit } : {},
|
|
523
|
+
...discovery.truncated ? { truncated: true } : {},
|
|
524
|
+
unavailableCount: discovery.unavailableCount,
|
|
525
|
+
availableCount: discovery.availableCount,
|
|
526
|
+
// agents 在最前:host 截断长输出时保头保尾,派发所需的 agentKey
|
|
527
|
+
// 必须落在头部;凭证分组是说明性大块,放最后。
|
|
528
|
+
// 限流 agent 已合入 agents(带 availabilityStatus / nextAvailableAt
|
|
529
|
+
// 参考标注),不再单列 unavailableAgents,避免两套真相。
|
|
530
|
+
agents: discovery.agents,
|
|
531
|
+
credentialGroups: discovery.credentialGroups
|
|
532
|
+
}, null, 2);
|
|
533
|
+
const cliNoloHome = env.NOLO_HOME?.trim() || (env.HOME?.trim() ? `${env.HOME.trim()}/.nolo` : "");
|
|
534
|
+
const speedAwareListResult = await injectSpeedContextIntoListAgentsResult(listResult, {
|
|
535
|
+
compactPage: compact === true && verbose !== true,
|
|
536
|
+
fragmentOffset,
|
|
537
|
+
fragmentAgentKey,
|
|
538
|
+
fragmentDigest,
|
|
539
|
+
db: createCliDispatchSampleDb(deps.db ?? await getReadableCliDb(output), userId, env),
|
|
540
|
+
userId,
|
|
541
|
+
...cliNoloHome ? { diskCache: { cachePath: `${cliNoloHome}/cache/speed-samples-${userId}.json` } } : {}
|
|
542
|
+
});
|
|
543
|
+
output.write(speedAwareListResult);
|
|
544
|
+
output.write("\n");
|
|
545
|
+
return 0;
|
|
546
|
+
}
|
|
547
|
+
if (wantJson) {
|
|
548
|
+
const credentialGroups = summarizeCredentialGroups(pagedAgents);
|
|
549
|
+
output.write(JSON.stringify({
|
|
550
|
+
userId,
|
|
551
|
+
...resolvedSpaceId ? { spaceId: resolvedSpaceId } : {},
|
|
552
|
+
targetServers: serverUrls,
|
|
553
|
+
...serverFailures.length ? { serverFailures } : {},
|
|
554
|
+
total: totalCount,
|
|
555
|
+
...typeof pagination.offset === "number" ? { offset: pagination.offset } : {},
|
|
556
|
+
...typeof pagination.limit === "number" ? { limit: pagination.limit } : {},
|
|
557
|
+
publicCount: agentsForOutput.filter((agent) => agent.publicRecordExists).length,
|
|
558
|
+
unavailableCount,
|
|
559
|
+
agents: pagedAgents,
|
|
560
|
+
source,
|
|
561
|
+
credentialGroups
|
|
562
|
+
}, null, 2));
|
|
563
|
+
output.write("\n");
|
|
564
|
+
return 0;
|
|
565
|
+
}
|
|
566
|
+
output.write(`userId: ${userId}
|
|
567
|
+
`);
|
|
568
|
+
if (resolvedSpaceId) {
|
|
569
|
+
output.write(`spaceId: ${resolvedSpaceId}
|
|
570
|
+
`);
|
|
571
|
+
}
|
|
572
|
+
output.write(`targetServers: ${serverUrls.join(", ")}
|
|
573
|
+
`);
|
|
574
|
+
if (serverFailures.length) {
|
|
575
|
+
output.write(`serverFailures: ${serverFailures.length}
|
|
576
|
+
`);
|
|
577
|
+
}
|
|
578
|
+
output.write(`total agents: ${totalCount}
|
|
579
|
+
`);
|
|
580
|
+
output.write(`public agents: ${agentsForOutput.filter((agent) => agent.publicRecordExists).length}
|
|
581
|
+
`);
|
|
582
|
+
if (unavailableCount > 0) {
|
|
583
|
+
output.write(t("agent.rateLimitedSummary", String(unavailableCount)));
|
|
584
|
+
}
|
|
585
|
+
output.write(`source: ${source}
|
|
586
|
+
`);
|
|
587
|
+
if (pagedAgents.length === 0) {
|
|
588
|
+
output.write("\n(no agents found)\n");
|
|
589
|
+
return 0;
|
|
590
|
+
}
|
|
591
|
+
for (const agent of pagedAgents) {
|
|
592
|
+
const status = agent.publicRecordExists ? "public" : "private";
|
|
593
|
+
const flagMismatch = agent.isPublicFlag !== agent.publicRecordExists ? ` flag=${agent.isPublicFlag}` : "";
|
|
594
|
+
const credentialLine = agent.credentialConfigured ? `credentialConfigured=true${agent.credentialRef ? ` credentialRef=${agent.credentialRef}` : ""}${agent.apiKeyRef ? ` apiKeyRef=${agent.apiKeyRef}` : ""}` : "credentialConfigured=false";
|
|
595
|
+
const availDecision = resolveAgentAvailability(agent);
|
|
596
|
+
const availabilityStatusLine = `availability=${availDecision.status} (${availDecision.reason})`;
|
|
597
|
+
const availabilityLine = typeof agent.nextAvailableAt === "number" && agent.nextAvailableAt > Date.now() ? `nextAvailableAt=${new Date(agent.nextAvailableAt).toISOString()} (reference info, not a dispatch gate)` : "nextAvailableAt=now";
|
|
598
|
+
const quotaSummary = formatQuotaSummary(agent.quota, Date.now(), { model: agent.model });
|
|
599
|
+
const quotaLine = `quota=${quotaSummary ?? "-"}`;
|
|
600
|
+
if (isAgentUnavailableNow(agent)) {
|
|
601
|
+
const recoveryAt = agent.nextAvailableAt;
|
|
602
|
+
output.write(t(
|
|
603
|
+
"agent.rateLimitedRecovery",
|
|
604
|
+
agent.name,
|
|
605
|
+
agent.id,
|
|
606
|
+
String(typeof recoveryAt === "number" ? Math.max(0, Math.ceil((recoveryAt - Date.now()) / 1e3)) : 0),
|
|
607
|
+
quotaSummary ? ` quota=${quotaSummary}` : "",
|
|
608
|
+
typeof recoveryAt === "number" ? formatCooldownUntilLocal(new Date(recoveryAt)) : "-"
|
|
609
|
+
));
|
|
610
|
+
}
|
|
611
|
+
output.write(
|
|
612
|
+
[
|
|
613
|
+
`
|
|
614
|
+
[${status}] ${agent.name}`,
|
|
615
|
+
`id=${agent.id}`,
|
|
616
|
+
`type=${agent.type ?? "-"}`,
|
|
617
|
+
`model=${agent.model}`,
|
|
618
|
+
`updatedAt=${agent.updatedAt ?? "-"}`,
|
|
619
|
+
// 不输出 privateKey(dbKey 属敏感标识,与 web 端 listAgentsFunc 降权
|
|
620
|
+
// 对齐;需要完整记录请用 --json)。
|
|
621
|
+
// 私有 agent(publicRecordExists=false)的公开记录不存在,输出 "-" 而非
|
|
622
|
+
// 一个库里不存在的 agent-pub-<id>,避免误导调用方拿它去 readAgent。
|
|
623
|
+
`publicKey=${agent.publicRecordExists ? agent.publicKey : "-"}${flagMismatch}`,
|
|
624
|
+
`tools=${agent.tools.join(", ") || "-"}`,
|
|
625
|
+
credentialLine,
|
|
626
|
+
availabilityStatusLine,
|
|
627
|
+
availabilityLine,
|
|
628
|
+
quotaLine
|
|
629
|
+
].join("\n")
|
|
630
|
+
);
|
|
631
|
+
output.write("\n");
|
|
632
|
+
}
|
|
633
|
+
return 0;
|
|
634
|
+
} catch (error) {
|
|
635
|
+
output.write(
|
|
636
|
+
`[nolo] agent list failed: ${toErrorMessage(error)}
|
|
637
|
+
`
|
|
638
|
+
);
|
|
639
|
+
return 1;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
export {
|
|
643
|
+
runAgentListCommand
|
|
644
|
+
};
|