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
|
@@ -5,39 +5,40 @@ import {
|
|
|
5
5
|
fnv1a32Hex
|
|
6
6
|
} from "./chunk-UEILX4EV.js";
|
|
7
7
|
import {
|
|
8
|
-
compareAgentSelection
|
|
9
|
-
|
|
10
|
-
} from "./chunk-MNEZUL5S.js";
|
|
8
|
+
compareAgentSelection
|
|
9
|
+
} from "./chunk-VJFDG3ZG.js";
|
|
11
10
|
import {
|
|
12
|
-
DEFAULT_PROVIDER_RETRY_MS,
|
|
13
|
-
isAgentUnavailableNow,
|
|
14
11
|
resolveAgentAvailability
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LS5KAVFQ.js";
|
|
16
13
|
import {
|
|
17
14
|
LIST_AGENTS_PAGE_BUDGET,
|
|
18
15
|
sanitizeToolOutputText,
|
|
19
16
|
scrubSecrets
|
|
20
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VH7UO6E5.js";
|
|
21
18
|
import {
|
|
22
19
|
isOAuthApiKeyRef
|
|
23
20
|
} from "./chunk-UKZX3NHN.js";
|
|
24
21
|
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
publicAgentKey
|
|
28
|
-
} from "./chunk-M2EJHDJP.js";
|
|
22
|
+
resolveModelTier
|
|
23
|
+
} from "./chunk-HEVRQGGH.js";
|
|
29
24
|
import {
|
|
30
25
|
createKey,
|
|
31
26
|
createTokenKey
|
|
32
27
|
} from "./chunk-SYTHYBMI.js";
|
|
33
28
|
import {
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
isOwnedAgentKey,
|
|
30
|
+
ownedAgentKey,
|
|
31
|
+
publicAgentKey
|
|
32
|
+
} from "./chunk-M2EJHDJP.js";
|
|
36
33
|
import {
|
|
37
34
|
isAntigravityOAuthAgent,
|
|
38
35
|
isSubscriptionEndpoint,
|
|
39
36
|
isSubscriptionOAuthCredential
|
|
40
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-6SOWMEAY.js";
|
|
38
|
+
import {
|
|
39
|
+
REASONING_EFFORT_OPTIONS,
|
|
40
|
+
resolveModelReasoningCapability
|
|
41
|
+
} from "./chunk-OKH74FML.js";
|
|
41
42
|
import {
|
|
42
43
|
asTrimmedLowercaseString
|
|
43
44
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -55,7 +56,15 @@ var GPT_SOL_RE = /^(?:openai\/)?gpt-\d+(?:\.\d+)*-sol(?:-[a-z0-9]+(?:[.-][a-z0-9
|
|
|
55
56
|
var GPT_ASTRA_RE = /^(?:openai\/)?gpt-\d+(?:\.\d+)*-astra(?:-[a-z0-9]+(?:[.-][a-z0-9]+)*)?$/i;
|
|
56
57
|
var KIMI_K3_MODELS = /* @__PURE__ */ new Set([
|
|
57
58
|
"kimi-k3",
|
|
58
|
-
"moonshotai/kimi-k3"
|
|
59
|
+
"moonshotai/kimi-k3",
|
|
60
|
+
// 2026-11-18:K3 由 K3.1 Pro 接替(目录换成 kimi-k3.1-pro),旗舰档门槛保持一致 —
|
|
61
|
+
// 不因换代把 199 档位约束漏掉。
|
|
62
|
+
"kimi-k3.1-pro",
|
|
63
|
+
"moonshotai/kimi-k3.1-pro",
|
|
64
|
+
// 旧 K2.6 经 PLATFORM_MODEL_ALIASES 执行同一 K3.1 Pro 上游与计费:档位判定按
|
|
65
|
+
// 请求 id 直查,不带这一条就会出现「换个旧 id 绕过 premium 门槛」。
|
|
66
|
+
"kimi-k2.6",
|
|
67
|
+
"moonshotai/kimi-k2.6"
|
|
59
68
|
]);
|
|
60
69
|
function classifyPremiumModel(model) {
|
|
61
70
|
const normalizedModel = asTrimmedLowercaseString(model);
|
|
@@ -85,7 +94,7 @@ function isGptProModel(provider, model) {
|
|
|
85
94
|
}
|
|
86
95
|
return classifyPremiumModel(model) !== void 0;
|
|
87
96
|
}
|
|
88
|
-
var GPT_PRO_BLOCKED_MESSAGE = `GPT Pro / Kimi K3 \u7B49\u9AD8\u7EA7\u6A21\u578B\u9700\u8981\u5148\u5F00\u901A ${GPT_PRO_REQUIRED_RECHARGE_AMOUNT} \u79EF\u5206\u6863\u4F4D\u3002`;
|
|
97
|
+
var GPT_PRO_BLOCKED_MESSAGE = `GPT Pro / Kimi K3.1 Pro \u7B49\u9AD8\u7EA7\u6A21\u578B\u9700\u8981\u5148\u5F00\u901A ${GPT_PRO_REQUIRED_RECHARGE_AMOUNT} \u79EF\u5206\u6863\u4F4D\u3002`;
|
|
89
98
|
function shouldBlockForGptPro(input) {
|
|
90
99
|
if (input?.premium !== true || input?.platformPaid !== true) {
|
|
91
100
|
return { blocked: false };
|
|
@@ -426,6 +435,15 @@ function isOwnedAgentRecord(record, userId) {
|
|
|
426
435
|
(key) => isOwnedAgentKey(key, userId)
|
|
427
436
|
);
|
|
428
437
|
}
|
|
438
|
+
function subscriptionQuotaChannel(source) {
|
|
439
|
+
if (typeof source !== "string") return void 0;
|
|
440
|
+
const id = source.toLowerCase();
|
|
441
|
+
if (id.includes("fetchavailablemodels:pool:")) return "antigravity";
|
|
442
|
+
const probe = id.match(/(?:^|[^a-z0-9-])(antigravity|codex|anthropic|claude|cursor|devin|xai)-oauth(?=$|[^a-z0-9-])/)?.[1];
|
|
443
|
+
if (probe === "codex") return "chatgpt";
|
|
444
|
+
if (probe === "anthropic") return "claude";
|
|
445
|
+
return probe;
|
|
446
|
+
}
|
|
429
447
|
function toSafeAgentSummary(record, options) {
|
|
430
448
|
const rawId = parseAgentRecordId(
|
|
431
449
|
typeof record?.privateKey === "string" ? record.privateKey : record?.dbKey,
|
|
@@ -443,6 +461,9 @@ function toSafeAgentSummary(record, options) {
|
|
|
443
461
|
const name = typeof record?.name === "string" && record.name ? record.name : "(unnamed)";
|
|
444
462
|
const handle = typeof record?.handle === "string" && record.handle ? record.handle : null;
|
|
445
463
|
const introduction = typeof record?.introduction === "string" && record.introduction ? record.introduction : typeof record?.description === "string" && record.description ? record.description : null;
|
|
464
|
+
const roleText = typeof record?.introduction === "string" ? record.introduction.trim().replace(/\s+/g, " ") : "";
|
|
465
|
+
const roleChars = Array.from(roleText);
|
|
466
|
+
const roleHint = roleChars.length > 60 ? `${roleChars.slice(0, 59).join("")}\u2026` : roleText;
|
|
446
467
|
const model = typeof record?.model === "string" && record.model ? record.model : null;
|
|
447
468
|
const provider = typeof record?.provider === "string" && record.provider ? record.provider : typeof record?.apiSource === "string" && record.apiSource ? record.apiSource : null;
|
|
448
469
|
const apiSource = typeof record?.apiSource === "string" && record.apiSource ? record.apiSource : null;
|
|
@@ -450,14 +471,10 @@ function toSafeAgentSummary(record, options) {
|
|
|
450
471
|
const tools = Array.isArray(record?.tools) ? record.tools.filter((t) => typeof t === "string") : [];
|
|
451
472
|
const inputPrice = typeof record?.inputPrice === "number" && Number.isFinite(record.inputPrice) ? record.inputPrice : null;
|
|
452
473
|
const outputPrice = typeof record?.outputPrice === "number" && Number.isFinite(record.outputPrice) ? record.outputPrice : null;
|
|
453
|
-
const modelAbility = model ? getModelAbility(model) ?? null : null;
|
|
454
474
|
const favStatus = resolveFavoriteStatus(record, options);
|
|
455
475
|
const isPublic = record?.isPublic === true || record?.isPublicFlag === true || record?.publicRecordExists === true;
|
|
456
476
|
const updatedAt = safeTimestamp(record?.updatedAt ?? record?.createdAt ?? record?.created);
|
|
457
477
|
const nextAvailableAt = typeof record?.nextAvailableAt === "number" && Number.isFinite(record.nextAvailableAt) ? record.nextAvailableAt : void 0;
|
|
458
|
-
const quotaExhaustion = record?.quotaExhaustion && typeof record.quotaExhaustion.observedAt === "number" && Number.isFinite(record.quotaExhaustion.observedAt) ? { observedAt: record.quotaExhaustion.observedAt } : void 0;
|
|
459
|
-
const rawQuota = record?.quota;
|
|
460
|
-
const quota = rawQuota && typeof rawQuota === "object" && Array.isArray(rawQuota.windows) && typeof rawQuota.observedAt === "number" && Number.isFinite(rawQuota.observedAt) ? rawQuota : void 0;
|
|
461
478
|
const currentUserId = options?.userId;
|
|
462
479
|
const ownedKey = currentUserId ? [record?.dbKey, record?.privateKey].find(
|
|
463
480
|
(key) => isOwnedAgentKey(key, currentUserId)
|
|
@@ -496,8 +513,24 @@ function toSafeAgentSummary(record, options) {
|
|
|
496
513
|
const credInfo = deriveCredentialGroup(record?.credentialGroup ?? rawCredRef);
|
|
497
514
|
const credentialGroup = record?.credentialGroup ?? credInfo?.credentialGroup;
|
|
498
515
|
const credentialKind = record?.credentialKind ?? credInfo?.credentialKind;
|
|
516
|
+
const rawQuota = record?.quota;
|
|
517
|
+
const snapshot = rawQuota && Array.isArray(rawQuota.windows) && Number.isFinite(rawQuota.observedAt) ? rawQuota : void 0;
|
|
518
|
+
const ref = typeof rawCredRef === "string" ? rawCredRef.trim().toLowerCase() : void 0;
|
|
519
|
+
const group = typeof credentialGroup === "string" ? credentialGroup.trim().toLowerCase() : void 0;
|
|
520
|
+
const oauthChannel = isOAuthApiKeyRef(ref) ? ref : isOAuthApiKeyRef(group) ? group : void 0;
|
|
521
|
+
const providerId = provider?.trim().toLowerCase();
|
|
522
|
+
const channel = oauthChannel ?? (providerId === "google-antigravity" ? "antigravity" : providerId);
|
|
523
|
+
const platformChannel = apiSource === "platform" || providerId === "nolo" && !oauthChannel && apiSource !== "custom";
|
|
524
|
+
const windows = snapshot?.windows.filter((window) => {
|
|
525
|
+
const origin = subscriptionQuotaChannel(window?.source);
|
|
526
|
+
return !origin || !platformChannel && (!channel || origin === channel);
|
|
527
|
+
});
|
|
528
|
+
const foreignOnly = Boolean(snapshot?.windows.length && windows?.length === 0);
|
|
529
|
+
const quota = snapshot && windows && !foreignOnly ? { ...snapshot, windows } : void 0;
|
|
530
|
+
const observedAt = record?.quotaExhaustion?.observedAt;
|
|
531
|
+
const quotaExhaustion = !foreignOnly && typeof observedAt === "number" && Number.isFinite(observedAt) ? { observedAt } : void 0;
|
|
499
532
|
const availability = resolveAgentAvailability(
|
|
500
|
-
{ nextAvailableAt, quota, quotaExhaustion },
|
|
533
|
+
{ nextAvailableAt, quota, quotaExhaustion, model },
|
|
501
534
|
options?.now ?? Date.now()
|
|
502
535
|
);
|
|
503
536
|
return {
|
|
@@ -507,6 +540,7 @@ function toSafeAgentSummary(record, options) {
|
|
|
507
540
|
name,
|
|
508
541
|
handle,
|
|
509
542
|
introduction,
|
|
543
|
+
...roleHint ? { roleHint } : {},
|
|
510
544
|
model,
|
|
511
545
|
modelTier: resolveModelTier(model),
|
|
512
546
|
provider,
|
|
@@ -516,7 +550,6 @@ function toSafeAgentSummary(record, options) {
|
|
|
516
550
|
tools,
|
|
517
551
|
inputPrice,
|
|
518
552
|
outputPrice,
|
|
519
|
-
modelAbility,
|
|
520
553
|
isFavorite: favStatus.isFavorite,
|
|
521
554
|
favoritedAt: favStatus.favoritedAt,
|
|
522
555
|
isPublic,
|
|
@@ -547,7 +580,7 @@ function toSafeAgentSummary(record, options) {
|
|
|
547
580
|
function sortSafeAgentSummaries(agents) {
|
|
548
581
|
return [...agents].sort(compareAgentSelection);
|
|
549
582
|
}
|
|
550
|
-
var
|
|
583
|
+
var AGENT_SUMMARY_FIELDS = [
|
|
551
584
|
// —— 派发决策必需(短字段,必须排最前)——
|
|
552
585
|
// agentKey 是唯一不可推导、必须逐字复制的字段;截断时它首先被保住。
|
|
553
586
|
"agentKey",
|
|
@@ -557,7 +590,6 @@ var COMPACT_AGENT_SUMMARY_FIELDS = [
|
|
|
557
590
|
"billingSource",
|
|
558
591
|
// 扣费授权判据:listAgents 默认走 compact 投影,缺了它模型在默认派发
|
|
559
592
|
// 流程里读不到「派它之前要先问用户」(2026-11-15 事故成因)。
|
|
560
|
-
// 与 ULTRA_COMPACT 白名单必须同时保留——两处任何一处缺失都等于该字段不存在。
|
|
561
593
|
"requiresPaidApproval",
|
|
562
594
|
"availabilityStatus",
|
|
563
595
|
"credentialGroup",
|
|
@@ -578,11 +610,18 @@ var COMPACT_AGENT_SUMMARY_FIELDS = [
|
|
|
578
610
|
// —— 体积大的说明性字段(排在每条记录最后,截断时先牺牲它们)——
|
|
579
611
|
// Phase 2A economics 快照(period/multipliers/changesAt 等小对象)。
|
|
580
612
|
// 只对 DeepSeek API / BigModel GLM Coding Plan 存在;不含完整 policy/windows。
|
|
581
|
-
"economics"
|
|
613
|
+
"economics"
|
|
614
|
+
];
|
|
615
|
+
var AGENT_SUMMARY_TRAILING_FIELDS = [
|
|
582
616
|
"tools",
|
|
583
617
|
// 额度快照(windows 数组,体积最大):只有上游真上报过窗口的 agent 才带。
|
|
584
618
|
"quota"
|
|
585
619
|
];
|
|
620
|
+
var COMPACT_AGENT_SUMMARY_FIELDS = [
|
|
621
|
+
...AGENT_SUMMARY_FIELDS,
|
|
622
|
+
"roleHint",
|
|
623
|
+
...AGENT_SUMMARY_TRAILING_FIELDS
|
|
624
|
+
];
|
|
586
625
|
function omitNullishAgentSummaryFields(summary) {
|
|
587
626
|
const result = {};
|
|
588
627
|
for (const [key, value] of Object.entries(summary)) {
|
|
@@ -592,6 +631,105 @@ function omitNullishAgentSummaryFields(summary) {
|
|
|
592
631
|
}
|
|
593
632
|
return result;
|
|
594
633
|
}
|
|
634
|
+
function finiteOptionalNumber(value) {
|
|
635
|
+
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
636
|
+
}
|
|
637
|
+
function compactQuotaForSummary(quota) {
|
|
638
|
+
if (!quota || !Array.isArray(quota.windows)) return void 0;
|
|
639
|
+
const observedAt = finiteOptionalNumber(quota.observedAt);
|
|
640
|
+
if (observedAt === void 0) return void 0;
|
|
641
|
+
const windows = [];
|
|
642
|
+
for (const window of quota.windows) {
|
|
643
|
+
if (!window || typeof window.scope !== "string" || !window.scope) continue;
|
|
644
|
+
const utilization = finiteOptionalNumber(window.utilization);
|
|
645
|
+
const remaining = finiteOptionalNumber(window.remaining);
|
|
646
|
+
const limit = finiteOptionalNumber(window.limit);
|
|
647
|
+
const resetAt = finiteOptionalNumber(window.resetAt);
|
|
648
|
+
const unit = typeof window.unit === "string" && window.unit ? window.unit : void 0;
|
|
649
|
+
windows.push({
|
|
650
|
+
scope: window.scope,
|
|
651
|
+
...utilization !== void 0 ? { utilization } : {},
|
|
652
|
+
...remaining !== void 0 ? { remaining } : {},
|
|
653
|
+
...limit !== void 0 ? { limit } : {},
|
|
654
|
+
...unit !== void 0 ? { unit } : {},
|
|
655
|
+
...resetAt !== void 0 ? { resetAt } : {}
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
const rawPlan = quota.plan;
|
|
659
|
+
const planName = rawPlan && typeof rawPlan.name === "string" && rawPlan.name ? rawPlan.name : void 0;
|
|
660
|
+
const monthlyCreditsUsd = finiteOptionalNumber(rawPlan?.monthlyCreditsUsd);
|
|
661
|
+
const plan = planName ? { name: planName, ...monthlyCreditsUsd !== void 0 ? { monthlyCreditsUsd } : {} } : void 0;
|
|
662
|
+
return {
|
|
663
|
+
observedAt,
|
|
664
|
+
windows,
|
|
665
|
+
...plan ? { plan } : {}
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
function promoteSharedCredentialGroupQuota(agents, groups) {
|
|
669
|
+
if (!agents.length || !groups.length) return { agents, groups };
|
|
670
|
+
const groupByName = new Map(groups.map((group) => [group.credentialGroup, group]));
|
|
671
|
+
const restored = agents.map((agent) => {
|
|
672
|
+
const ref = agent.quotaRef;
|
|
673
|
+
if (typeof ref !== "string") return agent;
|
|
674
|
+
const fromGroup = groupByName.get(ref)?.quota;
|
|
675
|
+
const rest = { ...agent };
|
|
676
|
+
delete rest.quotaRef;
|
|
677
|
+
if (fromGroup) rest.quota = fromGroup;
|
|
678
|
+
return rest;
|
|
679
|
+
});
|
|
680
|
+
const bareGroups = groups.map(({ quota: _dropped, ...rest }) => rest);
|
|
681
|
+
const slimQuota = restored.map((agent) => compactQuotaForSummary(agent.quota));
|
|
682
|
+
const byGroup = /* @__PURE__ */ new Map();
|
|
683
|
+
slimQuota.forEach((quota, index) => {
|
|
684
|
+
const agent = restored[index];
|
|
685
|
+
const groupKey = agent.credentialGroup;
|
|
686
|
+
if (!quota || quota.windows.length === 0) return;
|
|
687
|
+
if (agent.isOwned !== true) return;
|
|
688
|
+
if (typeof groupKey !== "string" || !groupKey) return;
|
|
689
|
+
if (!groupByName.has(groupKey)) return;
|
|
690
|
+
const clusters = byGroup.get(groupKey) ?? /* @__PURE__ */ new Map();
|
|
691
|
+
const signature = JSON.stringify([
|
|
692
|
+
quota.windows,
|
|
693
|
+
quota.plan ?? null,
|
|
694
|
+
quota.observedAt ?? null
|
|
695
|
+
]);
|
|
696
|
+
const indices = clusters.get(signature) ?? [];
|
|
697
|
+
indices.push(index);
|
|
698
|
+
clusters.set(signature, indices);
|
|
699
|
+
byGroup.set(groupKey, clusters);
|
|
700
|
+
});
|
|
701
|
+
const promoted = /* @__PURE__ */ new Map();
|
|
702
|
+
const refFor = /* @__PURE__ */ new Map();
|
|
703
|
+
for (const [groupKey, clusters] of byGroup) {
|
|
704
|
+
let best;
|
|
705
|
+
for (const indices of clusters.values()) {
|
|
706
|
+
if (indices.length < 2) continue;
|
|
707
|
+
if (!best || indices.length > best.length) best = indices;
|
|
708
|
+
}
|
|
709
|
+
if (!best) continue;
|
|
710
|
+
const observedAt = slimQuota[best[0]].observedAt;
|
|
711
|
+
const { plan } = slimQuota[best[0]];
|
|
712
|
+
promoted.set(groupKey, {
|
|
713
|
+
observedAt,
|
|
714
|
+
windows: slimQuota[best[0]].windows,
|
|
715
|
+
...plan ? { plan } : {}
|
|
716
|
+
});
|
|
717
|
+
for (const index of best) refFor.set(index, groupKey);
|
|
718
|
+
}
|
|
719
|
+
const nextAgents = restored.map((agent, index) => {
|
|
720
|
+
const ref = refFor.get(index);
|
|
721
|
+
if (!ref) return agent;
|
|
722
|
+
const rest = { ...agent };
|
|
723
|
+
delete rest.quota;
|
|
724
|
+
rest.quotaRef = ref;
|
|
725
|
+
return rest;
|
|
726
|
+
});
|
|
727
|
+
const nextGroups = bareGroups.map((group) => {
|
|
728
|
+
const quota = promoted.get(group.credentialGroup);
|
|
729
|
+
return quota ? { ...group, quota } : group;
|
|
730
|
+
});
|
|
731
|
+
return { agents: nextAgents, groups: nextGroups };
|
|
732
|
+
}
|
|
595
733
|
function toCompactAgentSummary(summary) {
|
|
596
734
|
const compact = {};
|
|
597
735
|
for (const field of COMPACT_AGENT_SUMMARY_FIELDS) {
|
|
@@ -603,30 +741,8 @@ function toCompactAgentSummary(summary) {
|
|
|
603
741
|
return compact;
|
|
604
742
|
}
|
|
605
743
|
var ULTRA_COMPACT_AGENT_SUMMARY_FIELDS = [
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
"name",
|
|
609
|
-
"model",
|
|
610
|
-
"modelTier",
|
|
611
|
-
"billingSource",
|
|
612
|
-
// 扣费授权判据必须随投影一起走:精简投影里没有它,模型就看不到
|
|
613
|
-
// 「派它之前要先问用户」,等于该字段不存在(2026-11-15 事故的直接成因)。
|
|
614
|
-
"requiresPaidApproval",
|
|
615
|
-
"availabilityStatus",
|
|
616
|
-
"credentialGroup",
|
|
617
|
-
"isFavorite",
|
|
618
|
-
"isOAuth",
|
|
619
|
-
"isOwned",
|
|
620
|
-
"isPublic",
|
|
621
|
-
"provider",
|
|
622
|
-
"apiSource",
|
|
623
|
-
"credentialKind",
|
|
624
|
-
"credentialed",
|
|
625
|
-
"nextAvailableAt",
|
|
626
|
-
"availabilityReason",
|
|
627
|
-
"economics",
|
|
628
|
-
"tools",
|
|
629
|
-
"quota"
|
|
744
|
+
...AGENT_SUMMARY_FIELDS,
|
|
745
|
+
...AGENT_SUMMARY_TRAILING_FIELDS
|
|
630
746
|
];
|
|
631
747
|
function toUltraCompactAgentSummary(summary) {
|
|
632
748
|
const compact = {};
|
|
@@ -636,6 +752,14 @@ function toUltraCompactAgentSummary(summary) {
|
|
|
636
752
|
compact[field] = value;
|
|
637
753
|
}
|
|
638
754
|
}
|
|
755
|
+
if (compact.quota !== void 0) {
|
|
756
|
+
const quota = compactQuotaForSummary(compact.quota);
|
|
757
|
+
if (quota) {
|
|
758
|
+
compact.quota = quota;
|
|
759
|
+
} else {
|
|
760
|
+
delete compact.quota;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
639
763
|
return compact;
|
|
640
764
|
}
|
|
641
765
|
|
|
@@ -672,249 +796,6 @@ function isPlatformPaidAgentCall(probe) {
|
|
|
672
796
|
}) === "platform_credits";
|
|
673
797
|
}
|
|
674
798
|
|
|
675
|
-
// packages/ai/agent/agentDiscovery.ts
|
|
676
|
-
function isPreferredAgent(agent) {
|
|
677
|
-
return agent.isFavorite === true || agent.isOwned === true || agent.isOAuth === true || agent.billingSource === "user_subscription" || agent.billingSource === "user_api" || agent.billingSource === "local";
|
|
678
|
-
}
|
|
679
|
-
function isPublicDiscoveryAgent(agent) {
|
|
680
|
-
return agent.isPublic === true && !isPreferredAgent(agent);
|
|
681
|
-
}
|
|
682
|
-
function resolveDiscoveryScope(args) {
|
|
683
|
-
const rawScope = typeof args?.scope === "string" ? args.scope.trim().toLowerCase() : void 0;
|
|
684
|
-
const hasScope = rawScope !== void 0 && rawScope !== "";
|
|
685
|
-
const hasPublicOnly = typeof args?.publicOnly === "boolean";
|
|
686
|
-
const publicOnly = args?.publicOnly === true;
|
|
687
|
-
if (hasScope) {
|
|
688
|
-
if (rawScope !== "preferred" && rawScope !== "public" && rawScope !== "all") {
|
|
689
|
-
throw new Error(`Invalid scope '${args?.scope}': must be 'preferred', 'public', or 'all'.`);
|
|
690
|
-
}
|
|
691
|
-
const scope = rawScope;
|
|
692
|
-
if (hasPublicOnly) {
|
|
693
|
-
if (publicOnly && scope !== "public") {
|
|
694
|
-
throw new Error(
|
|
695
|
-
`Conflicting arguments: scope='${args?.scope}' conflicts with publicOnly=true.`
|
|
696
|
-
);
|
|
697
|
-
}
|
|
698
|
-
if (!publicOnly && scope === "public") {
|
|
699
|
-
throw new Error(
|
|
700
|
-
`Conflicting arguments: scope='${args?.scope}' conflicts with publicOnly=false.`
|
|
701
|
-
);
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
return scope;
|
|
705
|
-
}
|
|
706
|
-
if (hasPublicOnly && publicOnly) {
|
|
707
|
-
return "public";
|
|
708
|
-
}
|
|
709
|
-
return "all";
|
|
710
|
-
}
|
|
711
|
-
function agentIdentityKeys(agent) {
|
|
712
|
-
return [agent.agentKey, agent.publicKey, agent.id].filter(
|
|
713
|
-
(key) => typeof key === "string" && key.length > 0
|
|
714
|
-
);
|
|
715
|
-
}
|
|
716
|
-
function deduplicateAgentSummaries(agents) {
|
|
717
|
-
const byIdentity = /* @__PURE__ */ new Map();
|
|
718
|
-
for (const agent of agents) {
|
|
719
|
-
const keys = agentIdentityKeys(agent);
|
|
720
|
-
const existing = keys.map((key) => byIdentity.get(key)).find(Boolean);
|
|
721
|
-
if (!existing) {
|
|
722
|
-
for (const key of keys) byIdentity.set(key, agent);
|
|
723
|
-
continue;
|
|
724
|
-
}
|
|
725
|
-
const winner = isPreferredAgent(agent) && !isPreferredAgent(existing) ? agent : existing;
|
|
726
|
-
for (const key of /* @__PURE__ */ new Set([...agentIdentityKeys(existing), ...keys])) byIdentity.set(key, winner);
|
|
727
|
-
}
|
|
728
|
-
return [...new Set(byIdentity.values())];
|
|
729
|
-
}
|
|
730
|
-
function filterAgentsByScope(agents, scope) {
|
|
731
|
-
const unique = deduplicateAgentSummaries(agents);
|
|
732
|
-
if (scope === "preferred") return unique.filter((agent) => isPreferredAgent(agent));
|
|
733
|
-
if (scope === "public") return unique.filter((agent) => isPublicDiscoveryAgent(agent));
|
|
734
|
-
return unique.filter((agent) => isPreferredAgent(agent) || agent.isPublic === true);
|
|
735
|
-
}
|
|
736
|
-
function recommendPlanning(agents, caller, poolComplete) {
|
|
737
|
-
const callerKey = typeof caller?.agentKey === "string" && caller.agentKey.trim() ? caller.agentKey : void 0;
|
|
738
|
-
const current = callerKey ? agents.find((a) => a.agentKey === callerKey) : void 0;
|
|
739
|
-
const currentTier = callerKey ? resolveModelTier(caller?.effectiveModel ?? current?.model) : "unknown";
|
|
740
|
-
const base = {
|
|
741
|
-
condition: "when_planning_needed_and_candidate_suitable",
|
|
742
|
-
action: "self",
|
|
743
|
-
currentTier,
|
|
744
|
-
poolComplete,
|
|
745
|
-
requiresPaidApproval: false
|
|
746
|
-
};
|
|
747
|
-
if (caller?.runKind === "subtask") return { ...base, reason: "bounded_subtask" };
|
|
748
|
-
if (!callerKey) return { ...base, reason: "caller_unknown" };
|
|
749
|
-
if (currentTier === "unknown") return { ...base, reason: "caller_tier_unknown" };
|
|
750
|
-
if (!poolComplete) return { ...base, reason: "pool_incomplete" };
|
|
751
|
-
const ranks = { easy: 0, normal: 1, complex: 2, extreme: 3 };
|
|
752
|
-
const higher = agents.filter((a) => a.agentKey && a.agentKey !== callerKey && a.modelTier !== "unknown" && ranks[a.modelTier] > ranks[currentTier]);
|
|
753
|
-
const free = higher.filter((a) => a.requiresPaidApproval === false);
|
|
754
|
-
free.sort((a, b) => ranks[b.modelTier] - ranks[a.modelTier]);
|
|
755
|
-
const best = free[0];
|
|
756
|
-
if (best) return {
|
|
757
|
-
...base,
|
|
758
|
-
action: "delegate",
|
|
759
|
-
reason: "higher_suitable_agent",
|
|
760
|
-
agentKey: best.agentKey,
|
|
761
|
-
recommendedTier: best.modelTier
|
|
762
|
-
};
|
|
763
|
-
if (higher.length) return { ...base, reason: "paid_approval_required", requiresPaidApproval: true };
|
|
764
|
-
return { ...base, reason: "no_higher_suitable_agent" };
|
|
765
|
-
}
|
|
766
|
-
function resolvePaginationArgs(args) {
|
|
767
|
-
let limit;
|
|
768
|
-
let offset;
|
|
769
|
-
if (args?.limit !== void 0 && args?.limit !== null) {
|
|
770
|
-
const raw = args.limit;
|
|
771
|
-
if (typeof raw === "boolean") {
|
|
772
|
-
throw new Error(`Invalid limit '${raw}': must be a positive integer.`);
|
|
773
|
-
}
|
|
774
|
-
if (typeof raw === "number") {
|
|
775
|
-
if (!Number.isInteger(raw) || raw <= 0) {
|
|
776
|
-
throw new Error(`Invalid limit '${raw}': must be a positive integer.`);
|
|
777
|
-
}
|
|
778
|
-
limit = Math.min(raw, 500);
|
|
779
|
-
} else if (typeof raw === "string") {
|
|
780
|
-
if (raw.trim() !== "") {
|
|
781
|
-
if (!/^\d+$/.test(raw.trim())) {
|
|
782
|
-
throw new Error(`Invalid limit '${raw}': must be a positive integer.`);
|
|
783
|
-
}
|
|
784
|
-
const parsed = Number(raw.trim());
|
|
785
|
-
if (!Number.isInteger(parsed) || parsed <= 0) {
|
|
786
|
-
throw new Error(`Invalid limit '${raw}': must be a positive integer.`);
|
|
787
|
-
}
|
|
788
|
-
limit = Math.min(parsed, 500);
|
|
789
|
-
}
|
|
790
|
-
} else {
|
|
791
|
-
throw new Error(`Invalid limit '${String(raw)}': must be a positive integer.`);
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
if (args?.offset !== void 0 && args?.offset !== null) {
|
|
795
|
-
const raw = args.offset;
|
|
796
|
-
if (typeof raw === "boolean") {
|
|
797
|
-
throw new Error(`Invalid offset '${raw}': must be a non-negative integer.`);
|
|
798
|
-
}
|
|
799
|
-
if (typeof raw === "number") {
|
|
800
|
-
if (!Number.isInteger(raw) || raw < 0) {
|
|
801
|
-
throw new Error(`Invalid offset '${raw}': must be a non-negative integer.`);
|
|
802
|
-
}
|
|
803
|
-
offset = raw;
|
|
804
|
-
} else if (typeof raw === "string") {
|
|
805
|
-
if (raw.trim() !== "") {
|
|
806
|
-
if (!/^\d+$/.test(raw.trim())) {
|
|
807
|
-
throw new Error(`Invalid offset '${raw}': must be a non-negative integer.`);
|
|
808
|
-
}
|
|
809
|
-
const parsed = Number(raw.trim());
|
|
810
|
-
if (!Number.isInteger(parsed) || parsed < 0) {
|
|
811
|
-
throw new Error(`Invalid offset '${raw}': must be a non-negative integer.`);
|
|
812
|
-
}
|
|
813
|
-
offset = parsed;
|
|
814
|
-
}
|
|
815
|
-
} else {
|
|
816
|
-
throw new Error(`Invalid offset '${String(raw)}': must be a non-negative integer.`);
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
return { limit, offset };
|
|
820
|
-
}
|
|
821
|
-
function matchesAgentQuery(agent, query) {
|
|
822
|
-
if (!query || typeof query !== "string") return true;
|
|
823
|
-
const q = query.trim().toLowerCase();
|
|
824
|
-
if (!q) return true;
|
|
825
|
-
const candidates = [
|
|
826
|
-
agent.name,
|
|
827
|
-
agent.model,
|
|
828
|
-
agent.provider,
|
|
829
|
-
agent.handle,
|
|
830
|
-
agent.agentKey,
|
|
831
|
-
agent.publicKey,
|
|
832
|
-
agent.id
|
|
833
|
-
];
|
|
834
|
-
return candidates.some((text) => typeof text === "string" && text.toLowerCase().includes(q));
|
|
835
|
-
}
|
|
836
|
-
function buildAgentDiscoveryResult(options) {
|
|
837
|
-
const scope = resolveDiscoveryScope({
|
|
838
|
-
scope: options.scope,
|
|
839
|
-
publicOnly: options.publicOnly
|
|
840
|
-
});
|
|
841
|
-
const now = options.now ?? Date.now();
|
|
842
|
-
let scopedAgents = filterAgentsByScope(options.agents, scope);
|
|
843
|
-
if (options.query && typeof options.query === "string" && options.query.trim()) {
|
|
844
|
-
scopedAgents = scopedAgents.filter((a) => matchesAgentQuery(a, options.query));
|
|
845
|
-
}
|
|
846
|
-
scopedAgents = scopedAgents.map((agent) => {
|
|
847
|
-
const decision = resolveAgentAvailability(agent, now);
|
|
848
|
-
if (decision.status === "quota_exhausted") {
|
|
849
|
-
const resetAt = decision.resetAt ?? now + DEFAULT_PROVIDER_RETRY_MS;
|
|
850
|
-
const nextAvailableAt = typeof agent.nextAvailableAt === "number" && agent.nextAvailableAt > resetAt ? agent.nextAvailableAt : resetAt;
|
|
851
|
-
return {
|
|
852
|
-
...agent,
|
|
853
|
-
nextAvailableAt,
|
|
854
|
-
availableAt: nextAvailableAt,
|
|
855
|
-
availabilityStatus: decision.status,
|
|
856
|
-
availabilityReason: decision.reason
|
|
857
|
-
};
|
|
858
|
-
}
|
|
859
|
-
return {
|
|
860
|
-
...agent,
|
|
861
|
-
availabilityStatus: decision.status,
|
|
862
|
-
availabilityReason: decision.reason
|
|
863
|
-
};
|
|
864
|
-
});
|
|
865
|
-
const unavailableCount = scopedAgents.filter((a) => isAgentUnavailableNow(a, now)).length;
|
|
866
|
-
const credentialGroups = summarizeCredentialGroups(scopedAgents, now);
|
|
867
|
-
const pagination = resolvePaginationArgs({
|
|
868
|
-
limit: options.limit,
|
|
869
|
-
offset: options.offset
|
|
870
|
-
});
|
|
871
|
-
const offset = pagination.offset;
|
|
872
|
-
const limit = pagination.limit;
|
|
873
|
-
const sortedAgents = sortSafeAgentSummaries(scopedAgents);
|
|
874
|
-
const hasQuery = Boolean(options.query && typeof options.query === "string" && options.query.trim());
|
|
875
|
-
const hasFilteredCandidates = sortedAgents.length < options.agents.length;
|
|
876
|
-
let total;
|
|
877
|
-
if (hasQuery) {
|
|
878
|
-
total = sortedAgents.length;
|
|
879
|
-
} else if (hasFilteredCandidates) {
|
|
880
|
-
total = sortedAgents.length;
|
|
881
|
-
} else if (scope === "public") {
|
|
882
|
-
total = typeof options.upstreamTotal === "number" && options.upstreamTotal > sortedAgents.length ? options.upstreamTotal : sortedAgents.length;
|
|
883
|
-
} else if (scope === "all") {
|
|
884
|
-
const privateOnlyCount = scopedAgents.filter((a) => isPreferredAgent(a) && a.isPublic !== true).length;
|
|
885
|
-
const publicPulledCount = scopedAgents.filter((a) => a.isPublic === true).length;
|
|
886
|
-
const effectivePublicTotal = typeof options.upstreamTotal === "number" && options.upstreamTotal > publicPulledCount ? options.upstreamTotal : publicPulledCount;
|
|
887
|
-
total = options.upstreamTruncated === true ? privateOnlyCount + effectivePublicTotal : sortedAgents.length;
|
|
888
|
-
} else {
|
|
889
|
-
total = typeof options.upstreamTotal === "number" && options.upstreamTotal > sortedAgents.length ? options.upstreamTotal : sortedAgents.length;
|
|
890
|
-
}
|
|
891
|
-
const isTruncated = options.upstreamTruncated === true || !hasQuery && !hasFilteredCandidates && typeof options.upstreamTotal === "number" && options.upstreamTotal > sortedAgents.length;
|
|
892
|
-
const pagedAgents = typeof limit === "number" || typeof offset === "number" ? sortedAgents.slice(
|
|
893
|
-
offset ?? 0,
|
|
894
|
-
(offset ?? 0) + (limit ?? sortedAgents.length)
|
|
895
|
-
) : sortedAgents;
|
|
896
|
-
const projectedAgents = options.verbose === true ? pagedAgents.map(omitNullishAgentSummaryFields) : options.compact === true ? pagedAgents.map(toUltraCompactAgentSummary) : pagedAgents.map(toCompactAgentSummary);
|
|
897
|
-
return {
|
|
898
|
-
total,
|
|
899
|
-
...typeof offset === "number" ? { offset } : {},
|
|
900
|
-
...typeof limit === "number" ? { limit } : {},
|
|
901
|
-
...isTruncated ? { truncated: true } : {},
|
|
902
|
-
unavailableCount,
|
|
903
|
-
availableCount: sortedAgents.length,
|
|
904
|
-
agents: projectedAgents,
|
|
905
|
-
planningRecommendation: recommendPlanning(
|
|
906
|
-
sortedAgents,
|
|
907
|
-
options.caller,
|
|
908
|
-
!isTruncated && scope === "all" && !hasQuery && !options.poolRestricted
|
|
909
|
-
),
|
|
910
|
-
credentialGroups
|
|
911
|
-
};
|
|
912
|
-
}
|
|
913
|
-
function toDiscoverySafeAgentSummary(record, options) {
|
|
914
|
-
const mergedOptions = record?.publicRecordExists === true ? { ...options, publicRecordExists: true } : options;
|
|
915
|
-
return toSafeAgentSummary(record, mergedOptions);
|
|
916
|
-
}
|
|
917
|
-
|
|
918
799
|
// packages/ai/agent/speedSampleCache.ts
|
|
919
800
|
var SPEED_SAMPLE_DISK_CACHE_TTL_MS = 10 * 6e4;
|
|
920
801
|
var SPEED_SAMPLE_SCAN_BUDGET_MS = 2500;
|
|
@@ -1327,7 +1208,11 @@ async function serializeCompactAgentPage(parsed, samples, snapshotAgeMs, options
|
|
|
1327
1208
|
}
|
|
1328
1209
|
const agent = candidates[0];
|
|
1329
1210
|
const speedContext = buildCandidateSpeedContext(typeof agent.model === "string" ? [agent.model] : [], samples, { snapshotAgeMs });
|
|
1330
|
-
const
|
|
1211
|
+
const singleScoped = promoteSharedCredentialGroupQuota(
|
|
1212
|
+
[agent],
|
|
1213
|
+
groups.filter((group) => group.credentialGroup === agent.credentialGroup)
|
|
1214
|
+
);
|
|
1215
|
+
const payload = { agent: singleScoped.agents[0], credentialGroups: singleScoped.groups };
|
|
1331
1216
|
let keyCollision = false;
|
|
1332
1217
|
const cleanText = (value) => scrubSecrets(sanitizeToolOutputText(value)).cleaned;
|
|
1333
1218
|
const sanitize = (value) => {
|
|
@@ -1360,12 +1245,17 @@ async function serializeCompactAgentPage(parsed, samples, snapshotAgeMs, options
|
|
|
1360
1245
|
let end = Math.min(serialized.length, fragmentOffset + 3e3);
|
|
1361
1246
|
if (end < serialized.length && /[\uD800-\uDBFF]/.test(serialized[end - 1]) && /[\uDC00-\uDFFF]/.test(serialized[end])) end--;
|
|
1362
1247
|
const fragment = serialized.slice(fragmentOffset, end);
|
|
1363
|
-
const result = JSON.stringify({ success: true, agentKey: agentKey2, offset, digest, fragment, fragmentOffset, nextFragmentOffset: end, hasMoreFragments: end < serialized.length, nextOffset: offset + 1 });
|
|
1248
|
+
const result = JSON.stringify({ success: true, agentKey: agentKey2, offset, digest, fragment, fragmentOffset, nextFragmentOffset: end, hasMoreFragments: end < serialized.length, nextOffset: offset + 1, ...speedContext ? { speedContext: cleanText(speedContext) } : {} });
|
|
1364
1249
|
return fits(result) ? result : JSON.stringify({ success: false, error: "LIST_AGENTS_FRAGMENT_METADATA_TOO_LARGE", offset });
|
|
1365
1250
|
}
|
|
1366
1251
|
const makePage = (count) => {
|
|
1367
|
-
const
|
|
1368
|
-
const groupKeys = new Set(
|
|
1252
|
+
const scoped = candidates.slice(0, count);
|
|
1253
|
+
const groupKeys = new Set(scoped.map((agent) => agent.credentialGroup).filter(Boolean));
|
|
1254
|
+
const promoted = promoteSharedCredentialGroupQuota(
|
|
1255
|
+
scoped,
|
|
1256
|
+
groups.filter((group) => groupKeys.has(group.credentialGroup))
|
|
1257
|
+
);
|
|
1258
|
+
const agents = promoted.agents;
|
|
1369
1259
|
const speedContext = buildCandidateSpeedContext(agents.map((agent) => agent.model).filter((model) => typeof model === "string"), samples, { snapshotAgeMs });
|
|
1370
1260
|
const nextOffset = offset + count;
|
|
1371
1261
|
const hasMore = nextOffset < availableCount;
|
|
@@ -1373,7 +1263,7 @@ async function serializeCompactAgentPage(parsed, samples, snapshotAgeMs, options
|
|
|
1373
1263
|
...parsed,
|
|
1374
1264
|
offset,
|
|
1375
1265
|
agents,
|
|
1376
|
-
credentialGroups: groups
|
|
1266
|
+
credentialGroups: promoted.groups,
|
|
1377
1267
|
hasMore,
|
|
1378
1268
|
...hasMore ? { nextOffset } : {},
|
|
1379
1269
|
...speedContext ? { speedContext } : {}
|
|
@@ -1407,6 +1297,84 @@ async function serializeCompactAgentPage(parsed, samples, snapshotAgeMs, options
|
|
|
1407
1297
|
return fits(encoded) ? encoded : JSON.stringify({ success: false, error: "LIST_AGENTS_RECOVERY_ID_TOO_LARGE", offset });
|
|
1408
1298
|
}
|
|
1409
1299
|
|
|
1300
|
+
// packages/ai/agent/defaultReasoningEffort.ts
|
|
1301
|
+
var defaults = {
|
|
1302
|
+
"gpt-6.2-sol": "medium",
|
|
1303
|
+
"gpt-6.2-astra": "high",
|
|
1304
|
+
"gpt-6.1-sol": "medium",
|
|
1305
|
+
"gpt-6.1-terra": "medium",
|
|
1306
|
+
"gpt-6-luna": "medium",
|
|
1307
|
+
"gpt-6-astra": "high",
|
|
1308
|
+
"claude-opus-5-5": "medium",
|
|
1309
|
+
"claude-sonnet-5-5": "high",
|
|
1310
|
+
"deepseek-flash": "high",
|
|
1311
|
+
"deepseek-v4-flash": "high",
|
|
1312
|
+
"deepseek-v4.1-flash": "high"
|
|
1313
|
+
};
|
|
1314
|
+
var deepseekChannels = /* @__PURE__ */ new Set(["opendesign", "ollama-cloud", "lithosai"]);
|
|
1315
|
+
var providers = /* @__PURE__ */ new Set(["nolo", "openai", "openrouter", "anthropic", "deepseek", "commandcode", "opencode-go", "stepfun"]);
|
|
1316
|
+
function resolveDefaultReasoningEffort(input) {
|
|
1317
|
+
const provider = (input.provider ?? "").toLowerCase();
|
|
1318
|
+
const model = (input.model ?? "").toLowerCase().split("/").pop() ?? "";
|
|
1319
|
+
const isDeepseekFlash = ["deepseek-flash", "deepseek-v4-flash", "deepseek-v4.1-flash"].includes(model);
|
|
1320
|
+
const effort = providers.has(provider) || deepseekChannels.has(provider) && isDeepseekFlash ? defaults[model] : void 0;
|
|
1321
|
+
if (!effort) return input.fallback;
|
|
1322
|
+
if (provider === "nolo" && model.startsWith("claude-") && input.model?.startsWith("anthropic/")) return effort;
|
|
1323
|
+
if (provider === "anthropic" && model.startsWith("claude-")) return effort;
|
|
1324
|
+
return resolveModelReasoningCapability(provider, input.model).efforts.includes(effort) ? effort : input.fallback;
|
|
1325
|
+
}
|
|
1326
|
+
function confirmedReasoningEfforts(provider, model) {
|
|
1327
|
+
const capability = resolveModelReasoningCapability(provider, model);
|
|
1328
|
+
if (capability.source === "provider-fallback") return void 0;
|
|
1329
|
+
if (capability.efforts.length === 0) return void 0;
|
|
1330
|
+
return capability.efforts;
|
|
1331
|
+
}
|
|
1332
|
+
var DISPATCH_EFFORT_PREFERENCES = {
|
|
1333
|
+
easy: ["low", "minimal", "medium"],
|
|
1334
|
+
normal: ["medium", "low", "high"],
|
|
1335
|
+
complex: ["high", "medium"],
|
|
1336
|
+
extreme: ["xhigh", "max", "high"]
|
|
1337
|
+
};
|
|
1338
|
+
var DISPATCH_DIFFICULTIES = /* @__PURE__ */ new Set(["easy", "normal", "complex", "extreme"]);
|
|
1339
|
+
function normalizeDifficulty(difficulty) {
|
|
1340
|
+
const normalized = (difficulty ?? "").trim().toLowerCase();
|
|
1341
|
+
return DISPATCH_DIFFICULTIES.has(normalized) ? normalized : "normal";
|
|
1342
|
+
}
|
|
1343
|
+
function asValidAgentEffort(raw) {
|
|
1344
|
+
const normalized = (raw ?? "").trim().toLowerCase();
|
|
1345
|
+
return REASONING_EFFORT_OPTIONS.includes(normalized) ? normalized : void 0;
|
|
1346
|
+
}
|
|
1347
|
+
function hasReasoningEffortSuffix(model) {
|
|
1348
|
+
const normalized = (model ?? "").trim().toLowerCase().split("/").pop() ?? "";
|
|
1349
|
+
return REASONING_EFFORT_SUFFIXES.some((suffix) => normalized.endsWith(`-${suffix}`));
|
|
1350
|
+
}
|
|
1351
|
+
function resolveDispatchReasoningEffort(input) {
|
|
1352
|
+
if (asValidAgentEffort(input.agentReasoningEffort)) return void 0;
|
|
1353
|
+
if (hasReasoningEffortSuffix(input.model)) return void 0;
|
|
1354
|
+
if (!(input.provider ?? "").trim() || !(input.model ?? "").trim()) return void 0;
|
|
1355
|
+
const efforts = confirmedReasoningEfforts(input.provider, input.model);
|
|
1356
|
+
if (!efforts) return void 0;
|
|
1357
|
+
const preferences = DISPATCH_EFFORT_PREFERENCES[normalizeDifficulty(input.difficulty)];
|
|
1358
|
+
return preferences.find((effort) => efforts.includes(effort));
|
|
1359
|
+
}
|
|
1360
|
+
function resolveEffectiveReasoningEffortOverride(input) {
|
|
1361
|
+
const override = asValidAgentEffort(input.override);
|
|
1362
|
+
if (!override) return void 0;
|
|
1363
|
+
if (asValidAgentEffort(input.recordReasoningEffort)) return void 0;
|
|
1364
|
+
if (hasReasoningEffortSuffix(input.model)) return void 0;
|
|
1365
|
+
if (!(input.provider ?? "").trim() || !(input.model ?? "").trim()) return void 0;
|
|
1366
|
+
const efforts = confirmedReasoningEfforts(input.provider, input.model);
|
|
1367
|
+
return efforts?.includes(override) ? override : void 0;
|
|
1368
|
+
}
|
|
1369
|
+
function withReasoningEffortOverride(config, effort) {
|
|
1370
|
+
if (!effort) return config;
|
|
1371
|
+
return {
|
|
1372
|
+
...config,
|
|
1373
|
+
reasoning_effort: effort,
|
|
1374
|
+
...config.rawRecord ? { rawRecord: { ...config.rawRecord, reasoning_effort: effort } } : {}
|
|
1375
|
+
};
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1410
1378
|
export {
|
|
1411
1379
|
isGptProModel,
|
|
1412
1380
|
shouldBlockForGptPro,
|
|
@@ -1414,10 +1382,15 @@ export {
|
|
|
1414
1382
|
deriveCredentialGroup,
|
|
1415
1383
|
deriveCustomProviderCredentialGroup,
|
|
1416
1384
|
summarizeCredentialGroups,
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1385
|
+
toSafeAgentSummary,
|
|
1386
|
+
sortSafeAgentSummaries,
|
|
1387
|
+
omitNullishAgentSummaryFields,
|
|
1388
|
+
promoteSharedCredentialGroupQuota,
|
|
1389
|
+
toCompactAgentSummary,
|
|
1390
|
+
toUltraCompactAgentSummary,
|
|
1391
|
+
injectSpeedContextIntoListAgentsResult,
|
|
1392
|
+
resolveDefaultReasoningEffort,
|
|
1393
|
+
resolveDispatchReasoningEffort,
|
|
1394
|
+
resolveEffectiveReasoningEffortOverride,
|
|
1395
|
+
withReasoningEffortOverride
|
|
1423
1396
|
};
|