nolo-cli 0.259.0-alpha.1 → 0.261.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/{_executeModel-MTM4BJK3.js → _executeModel-PODMRXJJ.js} +97 -83
- package/accountResolver-NGICIMEE.js +1 -1
- package/{action-C6IQAKN4.js → action-NJTYNXXR.js} +12 -10
- package/{addContentAction-53364YDW.js → addContentAction-RUPXLROG.js} +14 -13
- package/{addDialogAgentAction-U5DD5EN5.js → addDialogAgentAction-57EJ2UBC.js} +20 -24
- package/{agentDeleteCommand-53NN3VSK.js → agentDeleteCommand-DRFCOTYP.js} +185 -147
- package/{agentEmailCommands-KOGGIT6I.js → agentEmailCommands-FHENHUBF.js} +143 -127
- package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-BMVKNYIY.js} +9 -6
- package/{agentListCommands-62UYUQDI.js → agentListCommands-W66W5K3V.js} +88 -69
- package/{agentMachineCommands-W6TNJXEA.js → agentMachineCommands-C3BUBCXU.js} +69 -60
- package/{agentProviderCommands-QLTABYR7.js → agentProviderCommands-VIWKP7DM.js} +11 -8
- package/{agentPullCommand-2EYJ5ENC.js → agentPullCommand-5SNSXOY7.js} +10 -7
- package/agentRecordCommands-DYMHWTID.js +210 -0
- package/agentRun-QVFG3CI4.js +250 -0
- package/agentRunCommand-YV4V5HSL.js +248 -0
- package/{agentRunControl-LXMADX3N.js → agentRunControl-RGBHKPKJ.js} +19 -12
- package/{agentRuntimeLocal-YGNJMQW3.js → agentRuntimeLocal-LVEMOYS2.js} +62 -49
- package/{agentSlice-3HHYUQLM.js → agentSlice-OJCM7OUX.js} +15 -18
- package/appConfigCommands-ZUXQLE7L.js +417 -0
- package/{appDeleteCommands-5COJ6CSG.js → appDeleteCommands-L5UKUMXY.js} +68 -58
- package/{appDeployCommands-3JPAT3XO.js → appDeployCommands-KX2BRQUW.js} +74 -59
- package/{appDeployStatusCommands-RHZKF3G4.js → appDeployStatusCommands-7LHRSWW7.js} +68 -58
- package/{appGetCommands-73DXOAQW.js → appGetCommands-F7SDFCUK.js} +74 -58
- package/{appListCommands-HD5LOQ3G.js → appListCommands-U4NJKSMZ.js} +74 -58
- package/appMigrateCommands-JAPOLYSW.js +230 -0
- package/appSourceCommands-TLXPWXUH.js +279 -0
- package/authCommand-AU3GZBZ2.js +65 -0
- package/{authCommands-T5FODCEG.js → authCommands-JKBWMUQ4.js} +20 -17
- package/{builtinSkillRegistry-EDHD2UHU.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
- package/{chromeOpsCommands-3SSTDFRF.js → chromeOpsCommands-F47WYQWF.js} +68 -18
- package/{chunk-5YS6QHGT.js → chunk-2FGFY72B.js} +9 -9
- package/{chunk-MJBLXJMP.js → chunk-2I4R6ZRV.js} +12 -9
- package/{chunk-FXEPZKNJ.js → chunk-2MIZHEND.js} +506 -64
- package/{chunk-TLE77UJ5.js → chunk-2OROOEOQ.js} +0 -1
- package/{chunk-6RSNVJGO.js → chunk-2ZBPWX7N.js} +4 -4
- package/chunk-35JIFLIG.js +30 -0
- package/{chunk-7OVOZRZF.js → chunk-3B7OTHDW.js} +23 -379
- package/{chunk-DNNPARJK.js → chunk-3QMN3T6L.js} +50 -37
- package/{chunk-DMPZMYH4.js → chunk-3R4AYHJR.js} +13 -1
- package/{chunk-XNNBXUEM.js → chunk-3TII7WCF.js} +5 -5
- package/{chunk-223KZUJ6.js → chunk-4HZCBA4Q.js} +18 -15
- package/{chunk-C5A54QS7.js → chunk-4INJGWE3.js} +18 -5
- package/chunk-4IVMDQBA.js +261 -0
- package/chunk-4Y6CZ2N4.js +82 -0
- package/{chunk-KZ4A7EIV.js → chunk-56OAS5RZ.js} +1 -1
- package/{chunk-KQHEGELM.js → chunk-63G7JWEA.js} +16 -6
- package/{chunk-4EACJPZI.js → chunk-6BBXJGIQ.js} +51 -42
- package/chunk-72VWN4VK.js +51 -0
- package/chunk-7LR2IFUH.js +100 -0
- package/{chunk-S73EPYNC.js → chunk-7LS5ATRP.js} +20 -6
- package/{chunk-XPETQ4MR.js → chunk-7X4BFUJV.js} +24 -10
- package/{chunk-KHYSFS3W.js → chunk-A454UXB6.js} +148 -73
- package/chunk-A4O76A6V.js +432 -0
- package/chunk-AMNZPQCY.js +635 -0
- package/{chunk-4MXYCQBS.js → chunk-AQNWWJLH.js} +2 -56
- package/{chunk-LHCGKAFO.js → chunk-BKP325XS.js} +184 -112
- package/{chunk-PENRYZ4D.js → chunk-BPB3T5EU.js} +4 -7
- package/{chunk-U6QNVOR5.js → chunk-BUGLH2A7.js} +130 -6
- package/{chunk-2JHGUL5K.js → chunk-BVYHE6QD.js} +2 -2
- package/{chunk-KXOPLLFP.js → chunk-CA7LGAHV.js} +69 -9
- package/{chunk-2FZVXOFX.js → chunk-CEIWXKHP.js} +112 -200
- package/{chunk-Y2TCTNUD.js → chunk-CK2LMTYO.js} +4 -4
- package/{chunk-AIFQKNPP.js → chunk-CL33RFD7.js} +1 -1
- package/{chunk-57V4PADY.js → chunk-CNYPQYXT.js} +781 -449
- package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
- package/chunk-D3ONA3FP.js +762 -0
- package/{chunk-PIVTQRX6.js → chunk-DDKA6V6X.js} +111 -12
- package/chunk-DLXL4NSL.js +1179 -0
- package/{chunk-EJQE5HB7.js → chunk-DSBRIUX5.js} +4 -2
- package/{chunk-XRGBJHZX.js → chunk-E36V7MPY.js} +9 -5
- package/{chunk-4YPH5KRA.js → chunk-EDKMRDET.js} +1 -1
- package/{chunk-DBJODIZ6.js → chunk-EQOWWSNQ.js} +19 -27
- package/chunk-ER6NTALN.js +34 -0
- package/{chunk-L4XST72F.js → chunk-ERCSHBUD.js} +16027 -17392
- package/chunk-EUHMI5KG.js +101 -0
- package/{chunk-YQLAFJRQ.js → chunk-FBNVJ2TO.js} +1 -1
- package/{chunk-Q2EERN52.js → chunk-FF5ZRKW7.js} +12 -7
- package/{chunk-6XIE5ZGI.js → chunk-FGFJUFPS.js} +5 -6
- package/chunk-FI4DPLR7.js +902 -0
- package/{chunk-HDKMVYNJ.js → chunk-FNLT7NKG.js} +7 -11
- package/{chunk-JCQ3WCQ3.js → chunk-FOC4TORM.js} +69 -3
- package/chunk-FP46RAJQ.js +58 -0
- package/{chunk-JPXACKSW.js → chunk-G22P2J7O.js} +30 -81
- package/{chunk-7WHCIA5V.js → chunk-G5IAIGGD.js} +3 -8
- package/{chunk-FZENZCIA.js → chunk-GEC4CHS2.js} +19 -12
- package/chunk-GF4LYNNZ.js +25 -0
- package/{chunk-IYLUK67R.js → chunk-GH6SS2DZ.js} +25 -8
- package/chunk-HAZ6UVH4.js +368 -0
- package/{chunk-OKAXQFON.js → chunk-HB4J5HA6.js} +4 -4
- package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
- package/chunk-HJTI7RZV.js +94 -0
- package/{chunk-HQUGB2HM.js → chunk-HMFKYZKP.js} +62 -50
- package/{chunk-Q2MPKE4B.js → chunk-HVRG27HI.js} +76 -26
- package/{chunk-46FETNLF.js → chunk-IN4B6Z2D.js} +7 -6
- package/chunk-IV6VUVLJ.js +88 -0
- package/{chunk-LLUBUHNT.js → chunk-IWWJSSST.js} +5 -9
- package/{chunk-7BIJFGKS.js → chunk-J22PFCQN.js} +106 -52
- package/chunk-J42X32PV.js +472 -0
- package/{chunk-LCBAMY2M.js → chunk-JKVOKKMQ.js} +0 -7
- package/{chunk-KT7S7ANZ.js → chunk-JPYOHIHX.js} +9 -9
- package/{chunk-R7XWZDOH.js → chunk-JUMQJSQF.js} +1423 -282
- package/{chunk-KVMLM5VD.js → chunk-KAHYBAEN.js} +211 -472
- package/{chunk-KLMBM6P6.js → chunk-KALCFXQO.js} +2454 -1115
- package/chunk-KDDXC2IH.js +148 -0
- package/chunk-KGKTN2NX.js +25 -0
- package/chunk-KGWE224L.js +246 -0
- package/{chunk-OYUMJMC5.js → chunk-KSV6T4AH.js} +6 -1
- package/{chunk-P27E22MA.js → chunk-L43DGEPZ.js} +1 -1
- package/{chunk-5BIDJVNX.js → chunk-L45P4JTE.js} +180 -31
- package/chunk-LHCIIUCX.js +222 -0
- package/{chunk-CBIGMWMI.js → chunk-LHJB4BXJ.js} +1 -1
- package/{chunk-TRRXYFTR.js → chunk-LOFRSJX2.js} +1 -0
- package/{chunk-SQL7YNED.js → chunk-LPXBBC32.js} +71 -5
- package/{chunk-BIDSIRTS.js → chunk-LTCZOOAM.js} +11 -17
- package/chunk-LUTSMSIL.js +425 -0
- package/chunk-LXP53WGF.js +168 -0
- package/{chunk-2CT2J3O6.js → chunk-M7VNNPVX.js} +2493 -4055
- package/chunk-MDAYRIP7.js +1889 -0
- package/{chunk-6B2OBX5B.js → chunk-MMXHIHJZ.js} +15 -47
- package/{chunk-HPDLPEUG.js → chunk-MPWQI36J.js} +267 -234
- package/chunk-MRACVEPZ.js +7 -0
- package/{chunk-ZYPXOQS2.js → chunk-MSFKHPA6.js} +1 -1
- package/chunk-NHLLXINQ.js +8 -0
- package/{chunk-QXTEEEIN.js → chunk-NJCTPWJU.js} +8 -8
- package/chunk-NLS7F5DW.js +1697 -0
- package/{chunk-FP37ELBT.js → chunk-NTBTVKKB.js} +17 -25
- package/{chunk-JLZJL3WC.js → chunk-O77F26YB.js} +370 -39
- package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
- package/{chunk-YN23INFZ.js → chunk-OIOMBPCA.js} +23 -2
- package/{chunk-CJOOF4L5.js → chunk-OSZNERNW.js} +17 -14
- package/{chunk-JZO7KUF3.js → chunk-P4I55ASV.js} +313 -275
- package/{chunk-2C5VN7NH.js → chunk-P4XAHM4B.js} +1 -1
- package/chunk-PL5RKESU.js +40 -0
- package/chunk-Q5FJJ6XI.js +103 -0
- package/{chunk-WS36XPJD.js → chunk-Q5IXZF3S.js} +82 -6
- package/{createAgentAutomationAction-GRZ6XY7Q.js → chunk-QKM55LP2.js} +3 -160
- package/{chunk-WSLL7VV4.js → chunk-QXWXRBOL.js} +9 -9
- package/{chunk-MXA54TQM.js → chunk-QZYQ3Y3G.js} +1 -1
- package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
- package/{chunk-5RGU3J7P.js → chunk-REAE2SZK.js} +0 -1
- package/chunk-RF576RYE.js +117 -0
- package/chunk-RI7SXDJW.js +1317 -0
- package/{chunk-FEIVARWR.js → chunk-RIOAPUGV.js} +238 -25
- package/{chunk-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
- package/{chunk-J7JRCOIW.js → chunk-RWXHGPWJ.js} +1 -1
- package/{chunk-J55F3IEZ.js → chunk-SARJZIGR.js} +1 -1
- package/chunk-SJFL32RD.js +356 -0
- package/{chunk-6SOWMEAY.js → chunk-SR57FDTX.js} +2 -258
- package/{chunk-MPGR4ZNR.js → chunk-SRVLHMES.js} +46 -42
- package/{chunk-CEKRIR22.js → chunk-SU4NCTW4.js} +1 -1
- package/{chunk-RD3QLZQV.js → chunk-SWJRX4M5.js} +324 -2
- package/{chunk-R3TUHCSJ.js → chunk-T3Y2NA4H.js} +8 -3
- package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
- package/{chunk-KWNVPY6M.js → chunk-TJXO66M2.js} +8 -5
- package/{chunk-QIGQFON2.js → chunk-TXMFSGRY.js} +1 -1
- package/{chunk-ADYWV732.js → chunk-U5PSCTMR.js} +264 -177
- package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
- package/{chunk-QGFLVQ6E.js → chunk-UBOTXA3Z.js} +4 -14
- package/{chunk-6YX2RAQN.js → chunk-UEZL3RBG.js} +89 -164
- package/{chunk-NCFKHYDM.js → chunk-UJL23HBL.js} +774 -119
- package/chunk-ULPU4C43.js +1710 -0
- package/{chunk-UA3QTA2S.js → chunk-VC3MAT33.js} +4442 -2570
- package/{chunk-VNHZJEQN.js → chunk-VCESLFF4.js} +3 -3
- package/chunk-VOO3YQQP.js +17157 -0
- package/{chunk-Y2GWUBNS.js → chunk-VZDSNDUD.js} +279 -149
- package/{chunk-6BMTKYAO.js → chunk-W2Z5E2R7.js} +126 -698
- package/{chunk-4ZCTKB27.js → chunk-W5GKF5ZW.js} +1 -0
- package/chunk-WEEB2JKA.js +443 -0
- package/{chunk-NUHQO3RB.js → chunk-WIVVNJUS.js} +1 -1
- package/chunk-WMBJDXMY.js +408 -0
- package/chunk-WSQLCWLQ.js +201 -0
- package/{chunk-OOVOAG4Q.js → chunk-WY6DMHMG.js} +1 -1
- package/{chunk-6K32PBRY.js → chunk-XJW6SLBZ.js} +3 -3
- package/{chunk-MNFUKRRU.js → chunk-XKNDVHF5.js} +7 -7
- package/{chunk-MHKPUGPD.js → chunk-XREMPMNK.js} +20 -4
- package/chunk-XT6C2QZW.js +46 -0
- package/chunk-XUDXQT7R.js +790 -0
- package/{chunk-ZEZC7IIM.js → chunk-YFSM2366.js} +35 -35
- package/{chunk-RIWKZT7E.js → chunk-YRPIUIEQ.js} +11 -9
- package/{chunk-U35UUM5K.js → chunk-YVOUSIIA.js} +1 -1
- package/{chunk-6VEO7Z3Y.js → chunk-Z27AH6A5.js} +6 -6
- package/chunk-Z3KTXWWB.js +76 -0
- package/{chunk-UWWOWTW2.js → chunk-Z7EP5HDL.js} +1 -1
- package/{chunk-YFEK7ACQ.js → chunk-ZB2E724W.js} +4 -4
- package/{chunk-YLAHYLDQ.js → chunk-ZC3CMUKU.js} +2 -89
- package/{chunk-5P3PPQVP.js → chunk-ZQAADXSF.js} +1 -1
- package/{cliAgentConfigHelpers-BXHQ3PXP.js → cliAgentConfigHelpers-BJJEXHSZ.js} +20 -14
- package/{cliAuthorityBrokerClient-TFNXJLXL.js → cliAuthorityBrokerClient-3SKOA7OZ.js} +3 -1
- package/cliAuthorityBrokerProcess-VIJEKQSX.js +34 -0
- package/{cliEnvHelpers-CNMP3RDX.js → cliEnvHelpers-NDMKN4X2.js} +6 -3
- package/{cliExecutor-K6FDZTQ2.js → cliExecutor-Z62UBJ5S.js} +12 -6
- package/cliLocalAgentRecordReader-KCZS2MZU.js +113 -0
- package/cloudAutomationCommands-2WQUGQSW.js +310 -0
- package/{commandRegistry-IFYQLPGM.js → commandRegistry-C64JBZJ3.js} +288 -121
- package/{contentThunks-QCFCD2X3.js → contentThunks-G3HEIRXC.js} +45 -43
- package/{cooldownCommands-WDOI5VD7.js → cooldownCommands-FPAFS7XG.js} +1 -1
- package/createAgentAutomationAction-DSBL3X3A.js +172 -0
- package/createDialogAction-OHFUHC53.js +86 -0
- package/{createPageAction-QCVBMP4C.js → createPageAction-E6JZSZLU.js} +49 -45
- package/{db-VR74ADGC.js → db-KTQ3LL2Q.js} +3 -3
- package/{dbSlice-RWPSVHBC.js → dbSlice-U3GPLEL3.js} +21 -16
- package/deleteDbKey-DRXKWJX5.js +86 -0
- package/{dialogCommands-4IEQUALS.js → dialogCommands-4EX2OTIC.js} +80 -66
- package/{dialogMessageRecord-OAV77LT7.js → dialogMessageRecord-2HJTEXQX.js} +1 -1
- package/dialogNotifyCommand-4SCE2Z2R.js +44 -0
- package/dialogPortabilityCommands-ZSFFHRX4.js +3036 -0
- package/{dialogSlice-XFYID6KE.js → dialogSlice-PRZCIJCH.js} +43 -42
- package/{dialogTraceCommand-Y67NRFCV.js → dialogTraceCommand-RKB76OVX.js} +84 -70
- package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-BP7HMRYP.js} +7 -4
- package/{docCreateCommands-QLRIWRQE.js → docCreateCommands-JGPNGIZ7.js} +68 -59
- package/{docDeleteCommands-XPRYA532.js → docDeleteCommands-XRJTNRDH.js} +68 -59
- package/{docReadCommands-EXQI7ETH.js → docReadCommands-6GFO4ARS.js} +67 -58
- package/{docStore-MWFUKZL2.js → docStore-QRLIWFTU.js} +16 -17
- package/{docUpdateCommands-EFBFQV77.js → docUpdateCommands-W2GXMUXW.js} +68 -59
- package/{ebookDownloaderAgentCommand-DYSKF5ZY.js → ebookDownloaderAgentCommand-2DHPGEOQ.js} +14 -17
- package/{fetchMessages-TQEUZD7H.js → fetchMessages-RGPIYEPZ.js} +2 -2
- package/{getPricing-5BLZRPTM.js → getPricing-BK6CUBAE.js} +8 -4
- package/{handleSendMessageAction-GG3TR62X.js → handleSendMessageAction-DHGWURJZ.js} +265 -119
- package/{hostCredentialCreate-26S6DDJ5.js → hostCredentialCreate-FPUZ7RMI.js} +138 -122
- package/index.js +36 -22
- package/{keys-RWF7UCB4.js → keys-FXEGMKSG.js} +2 -2
- package/localAutomationCommands-ZMU22RQJ.js +198 -0
- package/localAutomationRuntime-MU5FGJ3V.js +60 -0
- package/{localDialogRead-BJJT3TF5.js → localDialogRead-W2EVXISA.js} +2 -2
- package/{localRuntimeAdapter-VREWZWPC.js → localRuntimeAdapter-YBXQBV4G.js} +136 -119
- package/localRuntimeAuthority-LDXMEDO5.js +44 -0
- package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-6TQZDLNU.js} +1 -1
- package/{machineCommands-CL5XK5UC.js → machineCommands-57RTUYRV.js} +251 -357
- package/{machineInfo-LWHTEBHJ.js → machineInfo-BJIU3WQ5.js} +4 -2
- package/machineWsRunDispatch-VBKV3FFE.js +227 -0
- package/{mcpLocalAuthorizeCommand-RBXJDE6J.js → mcpLocalAuthorizeCommand-J76SOJVZ.js} +40 -22
- package/mcpLocalManageCommands-USETIMHB.js +212 -0
- package/{memberThunks-43B7UYC5.js → memberThunks-7UERUEMI.js} +102 -22
- package/{memoryCommands-BC6REPQB.js → memoryCommands-N7NHEE55.js} +25 -34
- package/{models-ZX2BYIMB.js → models-TOXYINNM.js} +3 -2
- package/{offlineMarxistsAgentCommand-XVXUE6G5.js → offlineMarxistsAgentCommand-WZBJBCPZ.js} +16 -22
- package/package.json +3 -3
- package/parityCommands-LYDLWSLK.js +613 -0
- package/{projectArchive-OC63TWTD.js → projectArchive-KCNQDVWJ.js} +49 -45
- package/{providerPresetApply-NTJUINI6.js → providerPresetApply-IRJ56XIZ.js} +12 -16
- package/{providerRegistry-W45SLUV6.js → providerRegistry-26PAUYH2.js} +3 -13
- package/{read-KG6INYUT.js → read-SPSQ6NLR.js} +11 -10
- package/{readDocTool-N3GA52JR.js → readDocTool-ENUL2GNL.js} +5 -1
- package/{readlineWorkspace-2NO6D6IZ.js → readlineWorkspace-MKS7TAEF.js} +927 -573
- package/{rememberExplicit-CPAPONSI.js → rememberExplicit-7KX4HXQC.js} +4 -4
- package/remove-TNNDO635.js +32 -0
- package/{removeDialogAgentAction-EEVSOQOJ.js → removeDialogAgentAction-POPUZ3WU.js} +22 -26
- package/{runAgentClientLoop-U7V32UTD.js → runAgentClientLoop-KVILXQNI.js} +117 -82
- package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-4J2DP4LZ.js} +23 -16
- package/{secretCommands-KVVZS7A6.js → secretCommands-CSTQYB6T.js} +2 -2
- package/{setDialogExtraReferencesAction-DNO5POHA.js → setDialogExtraReferencesAction-35THMVBP.js} +16 -17
- package/{setPrimaryDialogAgentAction-QABBEO4C.js → setPrimaryDialogAgentAction-WLXBNIG7.js} +23 -27
- package/{settingThunks-DVKG4X4S.js → settingThunks-6Y5U5M5N.js} +170 -497
- package/{skillDiscovery-5GEGWJ6N.js → skillDiscovery-IUEZZG2B.js} +3 -3
- package/{spaceCommands-7QKXKBDQ.js → spaceCommands-LXNJBO2U.js} +293 -58
- package/spacePruneCommand-2ITUFYBM.js +233 -0
- package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
- package/{streamAgentChatTurn-UAGFOXNJ.js → streamAgentChatTurn-EY6MFKCA.js} +225 -137
- package/{switchDialogAgentAction-KYWJSGOO.js → switchDialogAgentAction-TG6BQRDA.js} +19 -23
- package/{tableCommands-EFA754RE.js → tableCommands-35G34R4B.js} +28 -49
- package/{toolApiClient-N5PYW2R3.js → toolApiClient-MPQIFYXP.js} +15 -4
- package/{tools-2Q2LBDUC.js → tools-CSLTRRUR.js} +73 -63
- package/{tuiRestart-4QDWLHYZ.js → tuiRestart-ALR4Q3JM.js} +20 -13
- package/tuiSummaryLlmCaller-3Y3JEXJK.js +52 -0
- package/{updateCommands-GJGRS6JK.js → updateCommands-GHQVP6Z5.js} +13 -8
- package/{updateDialogTitleAction-GGNTTI5L.js → updateDialogTitleAction-LFAWF5EW.js} +57 -58
- package/{usageCommand-WI6SQOPB.js → usageCommand-5VKW6T4C.js} +6 -8
- package/{usageRebuildCommand-WQRLLZAT.js → usageRebuildCommand-VUQETFMW.js} +11 -15
- package/{windowsSelfUpdate-C7LGVWYX.js → windowsSelfUpdate-SXSVXK4X.js} +2 -2
- package/workContext-ZAW6VXT7.js +18 -0
- package/workContextQueryProjection-CACY5VFE.js +23 -0
- package/{workloadLifecycle-DYX5ZMAT.js → workloadLifecycle-P2SJVV3S.js} +1 -1
- package/agentFavoriteCommands-7LOP3HUD.js +0 -186
- package/agentRecordCommands-TPE7NSZ6.js +0 -194
- package/agentRunCommand-DMVGBPLI.js +0 -232
- package/authCommand-V6EOMZX6.js +0 -79
- package/chunk-2MBTWINN.js +0 -89
- package/chunk-523DITKR.js +0 -32
- package/chunk-BUDVRYES.js +0 -2213
- package/chunk-BZMDWGQQ.js +0 -47
- package/chunk-GAHJLSDO.js +0 -107
- package/chunk-GYX6XTAI.js +0 -84
- package/chunk-HNUWUO75.js +0 -93
- package/chunk-HSBHS6KT.js +0 -33401
- package/chunk-KG27JIG4.js +0 -136
- package/chunk-OB4FBZXJ.js +0 -364
- package/chunk-OKH74FML.js +0 -3746
- package/chunk-OLZBQWZU.js +0 -6
- package/chunk-OOV5JN25.js +0 -1317
- package/chunk-OQFOE4SJ.js +0 -405
- package/chunk-PXYBUFDB.js +0 -53
- package/chunk-R3FZHW4Q.js +0 -103
- package/chunk-R3MV2GII.js +0 -106
- package/chunk-SCAC3NM5.js +0 -11751
- package/chunk-SR4FE5VD.js +0 -9
- package/chunk-SYTHYBMI.js +0 -3558
- package/chunk-UKZX3NHN.js +0 -48
- package/chunk-UVLYNWIE.js +0 -74
- package/chunk-VQX5JJNI.js +0 -861
- package/chunk-X4O7FJF5.js +0 -160
- package/chunk-YJPK35HB.js +0 -175
- package/chunk-YNIYE47Z.js +0 -105
- package/chunk-Z4PCXPUE.js +0 -127
- package/chunk-ZR5IVL4N.js +0 -862
- package/chunk-ZTHAJU3O.js +0 -2537
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +0 -22
- package/cliLocalAgentRecordReader-34UKRBLY.js +0 -104
- package/createDialogAction-ZAJERW62.js +0 -82
- package/deleteFile-ECU6FU5C.js +0 -55
- package/dialogNotifyCommand-IASQGEMW.js +0 -36
- package/localRuntimeAuthority-UF2DAQ3F.js +0 -28
- package/machineWsRunDispatch-TBVOYOAH.js +0 -209
- package/markdownToSlate-PXYAIBVL.js +0 -8
- package/tuiSummaryLlmCaller-HROLGN4F.js +0 -45
- package/webapi-QVV65DQF.js +0 -2487
- package/workContext-Y3ADAPZU.js +0 -14
- package/{chunk-USGHJSGO.js → chunk-GX2MFKF3.js} +3 -3
- package/{chunk-PHREU2KZ.js → chunk-WX266G2C.js} +0 -0
- package/{chunk-DXWGFL2Z.js → chunk-YY7IGJMN.js} +3 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
2
|
+
TOOL_DISCOVERY_CALL_NAME,
|
|
3
|
+
TOOL_DISCOVERY_ID_PREFIX,
|
|
4
|
+
createToolLoadingState,
|
|
5
|
+
filterToolDiscoveryHistory,
|
|
6
|
+
isToolDiscoveryCall,
|
|
7
|
+
mcpDiscoveryEntry,
|
|
8
|
+
readToolLoadingReferences,
|
|
9
|
+
toolDiscoveryReference
|
|
10
|
+
} from "./chunk-4IVMDQBA.js";
|
|
11
11
|
import {
|
|
12
12
|
getModelContextWindow
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CEIWXKHP.js";
|
|
14
14
|
import {
|
|
15
15
|
isRecord
|
|
16
16
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -21,11 +21,421 @@ import {
|
|
|
21
21
|
isFireworksKimiModel,
|
|
22
22
|
isNoloHostedProvider,
|
|
23
23
|
resolvePlatformEffectiveModel
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-G22P2J7O.js";
|
|
25
25
|
import {
|
|
26
26
|
asTrimmedLowercaseString
|
|
27
27
|
} from "./chunk-QSJ3HFEF.js";
|
|
28
28
|
|
|
29
|
+
// packages/integrations/openai/responsesToolDiscovery.ts
|
|
30
|
+
var searchTool = {
|
|
31
|
+
type: "tool_search",
|
|
32
|
+
execution: "client",
|
|
33
|
+
description: "Find tools by name, keywords, category, or capability pack. Pass capabilityPackId to activate an entire authorized pack.",
|
|
34
|
+
parameters: {
|
|
35
|
+
type: "object",
|
|
36
|
+
properties: { query: { type: "string" }, capabilityPackId: { type: "string" } },
|
|
37
|
+
required: ["query"]
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var eagerNames = /* @__PURE__ */ new Set(["loadSkill", "ask_user"]);
|
|
41
|
+
function hasDeferrableResponsesTools(tools) {
|
|
42
|
+
return !!tools?.length && tools.every((tool) => tool.type === "function") && tools.some((tool) => !!tool.function?.name && tool.function.name !== TOOL_DISCOVERY_CALL_NAME && !eagerNames.has(tool.function.name));
|
|
43
|
+
}
|
|
44
|
+
var hostedPrefix = `${TOOL_DISCOVERY_ID_PREFIX}openai-hosted:`;
|
|
45
|
+
function parseJson(value) {
|
|
46
|
+
if (typeof value !== "string") return value;
|
|
47
|
+
try {
|
|
48
|
+
return JSON.parse(value);
|
|
49
|
+
} catch {
|
|
50
|
+
return void 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function readSearchItem(item) {
|
|
54
|
+
if (!isRecord(item) || item.type !== "tool_search_call" || item.execution !== "client" || typeof item.call_id !== "string" || !item.call_id || item.status !== void 0 && item.status !== "completed") return void 0;
|
|
55
|
+
const args = parseJson(item.arguments);
|
|
56
|
+
if (!isRecord(args) || typeof args.query !== "string") return void 0;
|
|
57
|
+
return {
|
|
58
|
+
type: "tool_search_call",
|
|
59
|
+
call_id: item.call_id,
|
|
60
|
+
execution: "client",
|
|
61
|
+
arguments: { ...args, query: args.query },
|
|
62
|
+
...typeof item.id === "string" ? { id: item.id } : {},
|
|
63
|
+
...typeof item.status === "string" ? { status: item.status } : {}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function bridgeResponsesToolSearch(item) {
|
|
67
|
+
const search = readSearchItem(item);
|
|
68
|
+
if (!search) throw new Error("Responses returned an invalid client tool_search_call.");
|
|
69
|
+
return {
|
|
70
|
+
id: TOOL_DISCOVERY_ID_PREFIX + search.call_id,
|
|
71
|
+
type: "function",
|
|
72
|
+
function: { name: TOOL_DISCOVERY_CALL_NAME, arguments: JSON.stringify(search) }
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
var isMcpEntry = (entry) => "mcp" in entry;
|
|
76
|
+
function isFunctionTool(tool) {
|
|
77
|
+
return isRecord(tool) && tool.type === "function" && typeof tool.name === "string" && (tool.description === void 0 || typeof tool.description === "string");
|
|
78
|
+
}
|
|
79
|
+
function readHostedPaths(raw) {
|
|
80
|
+
if (!isRecord(raw) || !Array.isArray(raw.paths) || !raw.paths.every((path) => typeof path === "string")) return;
|
|
81
|
+
return raw.paths;
|
|
82
|
+
}
|
|
83
|
+
function finishResponsesToolDiscovery(calls, plan, output) {
|
|
84
|
+
if (plan?.protocol === "openai-hosted") {
|
|
85
|
+
const next = [];
|
|
86
|
+
const results2 = [];
|
|
87
|
+
const ordinary = new Map(calls.map((call) => [call.id, call]));
|
|
88
|
+
const visible = new Set(plan.visible);
|
|
89
|
+
let paths;
|
|
90
|
+
for (const item of Array.isArray(output) ? output : []) {
|
|
91
|
+
if (item?.type === "tool_search_call") {
|
|
92
|
+
if (item.execution !== "server") throw new Error("OpenAI returned client search in hosted mode.");
|
|
93
|
+
paths = item.call_id === null && item.status === "completed" ? readHostedPaths(item.arguments) : void 0;
|
|
94
|
+
} else if (item?.type === "tool_search_output" && item.execution === "server" && item.call_id === null && item.status === "completed" && paths && Array.isArray(item.tools)) {
|
|
95
|
+
const idBase = hostedPrefix + (typeof item.id === "string" && item.id ? item.id : `round-${plan.replayedCalls.size}`);
|
|
96
|
+
let id = idBase;
|
|
97
|
+
for (let index = 1; plan.replayedCalls.has(id) || next.some((call) => call.id === id); index++) id = `${idBase}-${index}`;
|
|
98
|
+
const names = /* @__PURE__ */ new Set();
|
|
99
|
+
for (const tool of item.tools) {
|
|
100
|
+
if (isFunctionTool(tool) && !visible.has(tool.name)) names.add(tool.name);
|
|
101
|
+
}
|
|
102
|
+
const loaded = [...names].flatMap((name) => {
|
|
103
|
+
const current = plan.state.authorized.get(name);
|
|
104
|
+
if (!current || isMcpEntry(current)) return [];
|
|
105
|
+
visible.add(name);
|
|
106
|
+
return [toolDiscoveryReference(current)];
|
|
107
|
+
});
|
|
108
|
+
next.push({ id, type: "function", function: { name: TOOL_DISCOVERY_CALL_NAME, arguments: JSON.stringify({ paths }) } });
|
|
109
|
+
results2.push({ callId: id, content: JSON.stringify({ loaded }) });
|
|
110
|
+
paths = void 0;
|
|
111
|
+
} else if (item?.type === "function_call") {
|
|
112
|
+
const call = ordinary.get(item.call_id);
|
|
113
|
+
if (!call) continue;
|
|
114
|
+
if (!visible.has(call.function.name) || plan.replayedCalls.has(call.id)) {
|
|
115
|
+
throw new Error("OpenAI Responses called a tool outside its authorized visible catalog.");
|
|
116
|
+
}
|
|
117
|
+
ordinary.delete(call.id);
|
|
118
|
+
next.push(call);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return { calls: next, results: results2 };
|
|
122
|
+
}
|
|
123
|
+
const results = resolveResponsesToolDiscovery(calls, plan);
|
|
124
|
+
const tagged = plan?.protocol === "openai-client" ? calls.map((call) => isToolDiscoveryCall(call) ? { ...call, function: { ...call.function, arguments: JSON.stringify({ ...parseJson(call.function.arguments), protocol: plan.protocol }) } } : call) : calls;
|
|
125
|
+
return { calls: tagged, results };
|
|
126
|
+
}
|
|
127
|
+
function prepareResponsesToolDiscovery(body, compacted, mcpTools, protocol = "deepseek-client") {
|
|
128
|
+
if (!Array.isArray(body.tools) || !Array.isArray(body.input) || !body.tools.length || !body.tools.every(isFunctionTool)) return void 0;
|
|
129
|
+
const functions = body.tools.filter((tool) => tool.name !== TOOL_DISCOVERY_CALL_NAME);
|
|
130
|
+
const mcpEntries = functions.some((tool) => tool.name === "callMcpTool") ? mcpTools?.map(mcpDiscoveryEntry) ?? [] : [];
|
|
131
|
+
const state = createToolLoadingState([...functions, ...mcpEntries]);
|
|
132
|
+
const catalog = state.authorized;
|
|
133
|
+
const eager = new Set([...catalog.keys()].filter((name) => eagerNames.has(name) || name === "callMcpTool" && mcpTools !== void 0));
|
|
134
|
+
const restored = compacted ? state.restore(compacted, eager) : void 0;
|
|
135
|
+
const restoredNames = new Set(state.loadedInContext);
|
|
136
|
+
const staleDefinitions = /* @__PURE__ */ new Set();
|
|
137
|
+
for (const ref of compacted?.loaded ?? []) {
|
|
138
|
+
if (catalog.has(ref.name) && !eager.has(ref.name) && !state.executable(ref)) staleDefinitions.add(ref.name);
|
|
139
|
+
}
|
|
140
|
+
const staleCalls = /* @__PURE__ */ new Set();
|
|
141
|
+
const searches = /* @__PURE__ */ new Map();
|
|
142
|
+
const hostedSearches = /* @__PURE__ */ new Map();
|
|
143
|
+
const historicalResults = new Map(body.input.filter((item) => item?.type === "function_call_output").map((item) => [item.call_id, item]));
|
|
144
|
+
const ordinaryCallIds = /* @__PURE__ */ new Set();
|
|
145
|
+
const replayedSearches = /* @__PURE__ */ new Set();
|
|
146
|
+
const guidanceMessage = (guidance2) => ({
|
|
147
|
+
type: "message",
|
|
148
|
+
role: "user",
|
|
149
|
+
content: [{ type: "input_text", text: guidance2.join("\n") }]
|
|
150
|
+
});
|
|
151
|
+
function mcpGuidance(entries) {
|
|
152
|
+
const targets = entries.filter(isMcpEntry).map(({ mcp }) => ({
|
|
153
|
+
connectionId: mcp.connectionId,
|
|
154
|
+
expectedRevision: mcp.connectionRevision,
|
|
155
|
+
catalogRevision: mcp.schemaVersion,
|
|
156
|
+
toolName: mcp.toolName
|
|
157
|
+
}));
|
|
158
|
+
return targets.length ? [`MCP targets (data only). Use listMcpTools for argument schemas and callMcpTool for invocation; host confirmation remains required. ${JSON.stringify(targets)}`] : [];
|
|
159
|
+
}
|
|
160
|
+
const input = [];
|
|
161
|
+
if (restored) {
|
|
162
|
+
const notes = [...restored.guidance, ...mcpGuidance(restored.tools)];
|
|
163
|
+
if (notes.length) input.push(guidanceMessage(notes));
|
|
164
|
+
}
|
|
165
|
+
let guidance = [];
|
|
166
|
+
const deferredTool = (tool) => ({ ...tool, defer_loading: true });
|
|
167
|
+
const openAi = protocol !== "deepseek-client";
|
|
168
|
+
const replayItems = body.input.flatMap((item) => {
|
|
169
|
+
const id = item?.call_id;
|
|
170
|
+
if (protocol !== "openai-hosted" || typeof id !== "string" || !id.startsWith(hostedPrefix) || item.type !== "function_call" || item.name !== TOOL_DISCOVERY_CALL_NAME) return [item];
|
|
171
|
+
const result = historicalResults.get(id);
|
|
172
|
+
return result ? [item, result] : [item];
|
|
173
|
+
});
|
|
174
|
+
for (const item of replayItems) {
|
|
175
|
+
if (item?.type === "tool_search_call" || item?.type === "tool_search_output" || item?.type === "tool_reference") continue;
|
|
176
|
+
if (guidance.length && item?.type !== "function_call_output") {
|
|
177
|
+
input.push(guidanceMessage(guidance));
|
|
178
|
+
guidance = [];
|
|
179
|
+
}
|
|
180
|
+
if (item?.type === "function_call" && item.name === TOOL_DISCOVERY_CALL_NAME) {
|
|
181
|
+
const raw = parseJson(item.arguments);
|
|
182
|
+
if (protocol === "openai-hosted" && typeof item.call_id === "string" && item.call_id.startsWith(hostedPrefix) && historicalResults.has(item.call_id) && !hostedSearches.has(item.call_id)) {
|
|
183
|
+
const paths = readHostedPaths(raw);
|
|
184
|
+
if (paths) {
|
|
185
|
+
hostedSearches.set(item.call_id, { paths });
|
|
186
|
+
input.push({ type: "tool_search_call", execution: "server", call_id: null, status: "completed", arguments: { paths } });
|
|
187
|
+
}
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
const search = readSearchItem(raw);
|
|
191
|
+
const source = isRecord(raw) ? raw.protocol ?? "deepseek-client" : void 0;
|
|
192
|
+
if (protocol !== "openai-hosted" && source === protocol && search && item.call_id === TOOL_DISCOVERY_ID_PREFIX + search.call_id && historicalResults.has(item.call_id) && !searches.has(item.call_id)) {
|
|
193
|
+
searches.set(item.call_id, search);
|
|
194
|
+
input.push({
|
|
195
|
+
type: search.type,
|
|
196
|
+
call_id: search.call_id,
|
|
197
|
+
execution: search.execution,
|
|
198
|
+
arguments: search.arguments,
|
|
199
|
+
...openAi ? { status: "completed" } : {}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
if (item?.type === "function_call_output" && typeof item.call_id === "string" && item.call_id.startsWith(TOOL_DISCOVERY_ID_PREFIX)) {
|
|
205
|
+
const search = searches.get(item.call_id);
|
|
206
|
+
const hosted = hostedSearches.has(item.call_id);
|
|
207
|
+
if (!search && !hosted) {
|
|
208
|
+
if (ordinaryCallIds.has(item.call_id) && !staleCalls.delete(item.call_id)) input.push(item);
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
if (replayedSearches.has(item.call_id)) continue;
|
|
212
|
+
replayedSearches.add(item.call_id);
|
|
213
|
+
const refs = readToolLoadingReferences(item.output);
|
|
214
|
+
for (const ref of refs.loaded) {
|
|
215
|
+
if (catalog.has(ref.name) && !state.loadedInContext.has(ref.name) && !eager.has(ref.name) && !state.executable(ref)) {
|
|
216
|
+
staleDefinitions.add(ref.name);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
const projected = state.restore(refs, eager);
|
|
220
|
+
for (const tool of projected.tools) staleDefinitions.delete(tool.name);
|
|
221
|
+
guidance.push(...projected.guidance, ...mcpGuidance(projected.tools));
|
|
222
|
+
input.push({
|
|
223
|
+
type: "tool_search_output",
|
|
224
|
+
call_id: search?.call_id ?? null,
|
|
225
|
+
execution: hosted ? "server" : "client",
|
|
226
|
+
...openAi ? { status: "completed" } : {},
|
|
227
|
+
tools: projected.tools.filter((tool) => !isMcpEntry(tool)).map((tool) => openAi ? deferredTool(tool) : tool)
|
|
228
|
+
});
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
if (item?.type === "function_call") ordinaryCallIds.add(item.call_id);
|
|
232
|
+
if (item?.type === "function_call" && (staleDefinitions.has(item.name) || openAi && (!catalog.has(item.name) || isMcpEntry(catalog.get(item.name))))) {
|
|
233
|
+
staleCalls.add(item.call_id);
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
if (item?.type === "function_call_output" && staleCalls.delete(item.call_id)) continue;
|
|
237
|
+
if (item?.type === "function_call" && catalog.has(item.name) && !state.loadedInContext.has(item.name)) {
|
|
238
|
+
eager.add(item.name);
|
|
239
|
+
}
|
|
240
|
+
input.push(item);
|
|
241
|
+
}
|
|
242
|
+
if (guidance.length) input.push(guidanceMessage(guidance));
|
|
243
|
+
const visible = /* @__PURE__ */ new Set([...eager, ...[...state.loadedInContext].filter((name) => {
|
|
244
|
+
const entry = catalog.get(name);
|
|
245
|
+
return entry && !isMcpEntry(entry);
|
|
246
|
+
})]);
|
|
247
|
+
body.input = input;
|
|
248
|
+
if (eager.size === catalog.size && replayedSearches.size === 0) return void 0;
|
|
249
|
+
const localTools = [...catalog.values()].filter((tool) => !isMcpEntry(tool));
|
|
250
|
+
body.tools = protocol === "openai-hosted" ? localTools.map((tool) => eager.has(tool.name) || restoredNames.has(tool.name) ? tool : deferredTool(tool)) : localTools.filter((tool) => eager.has(tool.name) || restoredNames.has(tool.name));
|
|
251
|
+
body.tools.push(protocol === "openai-hosted" ? { type: "tool_search" } : protocol === "openai-client" ? {
|
|
252
|
+
...searchTool,
|
|
253
|
+
parameters: { ...searchTool.parameters, additionalProperties: false }
|
|
254
|
+
} : searchTool);
|
|
255
|
+
if (openAi) body.parallel_tool_calls = false;
|
|
256
|
+
return {
|
|
257
|
+
state,
|
|
258
|
+
protocol,
|
|
259
|
+
visible,
|
|
260
|
+
replayedCalls: /* @__PURE__ */ new Set([
|
|
261
|
+
...ordinaryCallIds,
|
|
262
|
+
...hostedSearches.keys(),
|
|
263
|
+
...replayedSearches,
|
|
264
|
+
...[...replayedSearches].map((id) => id.slice(TOOL_DISCOVERY_ID_PREFIX.length))
|
|
265
|
+
])
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
function resolveResponsesToolDiscovery(calls, plan) {
|
|
269
|
+
const results = [];
|
|
270
|
+
const seen = new Set(plan?.replayedCalls);
|
|
271
|
+
const visible = /* @__PURE__ */ new Set([...plan?.visible ?? [], ...plan?.state.loadedInContext ?? []]);
|
|
272
|
+
for (const call of calls) {
|
|
273
|
+
const discovery = isToolDiscoveryCall(call);
|
|
274
|
+
const wireCallId = discovery ? call.id.slice(TOOL_DISCOVERY_ID_PREFIX.length) : call.id;
|
|
275
|
+
if (plan && (seen.has(wireCallId) || seen.has(call.id))) {
|
|
276
|
+
throw new Error("Responses returned a duplicate tool call ID.");
|
|
277
|
+
}
|
|
278
|
+
seen.add(wireCallId);
|
|
279
|
+
seen.add(call.id);
|
|
280
|
+
if (!discovery) {
|
|
281
|
+
if (plan && !plan.visible.has(call.function.name)) {
|
|
282
|
+
throw new Error("Responses requested a function before its definition was loaded.");
|
|
283
|
+
}
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
if (!plan) throw new Error("Responses requested tool discovery on a route without client discovery.");
|
|
287
|
+
const search = readSearchItem(parseJson(call.function.arguments));
|
|
288
|
+
if (!search || call.id !== TOOL_DISCOVERY_ID_PREFIX + search.call_id) {
|
|
289
|
+
throw new Error("Responses returned an invalid tool discovery ID.");
|
|
290
|
+
}
|
|
291
|
+
const packId = search.arguments.capabilityPackId;
|
|
292
|
+
const pack = typeof packId === "string" ? plan.state.activatePack(packId) : { loaded: [] };
|
|
293
|
+
const excluded = /* @__PURE__ */ new Set([...visible, ...pack.loaded.map(({ name }) => name)]);
|
|
294
|
+
const refs = { ...pack, loaded: [...pack.loaded, ...plan.state.search(search.arguments.query, excluded).map(toolDiscoveryReference)] };
|
|
295
|
+
for (const ref of refs.loaded) visible.add(ref.name);
|
|
296
|
+
results.push({ callId: call.id, content: JSON.stringify(refs) });
|
|
297
|
+
}
|
|
298
|
+
return results;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// packages/agent-runtime/toolImages.ts
|
|
302
|
+
var EMPTY_TOOL_RESULT_TEXT = "[Tool completed without output]";
|
|
303
|
+
var TOOL_HAD_IMAGES = "toolHadImages";
|
|
304
|
+
function hadToolImages(message) {
|
|
305
|
+
return message.tool_result_metadata?.[TOOL_HAD_IMAGES] === true || toolImages(message).length > 0;
|
|
306
|
+
}
|
|
307
|
+
var TOOL_IMAGES = Symbol("runtime-only-tool-images");
|
|
308
|
+
function toolImages(message) {
|
|
309
|
+
return message[TOOL_IMAGES] ?? [];
|
|
310
|
+
}
|
|
311
|
+
function withoutToolImages(message) {
|
|
312
|
+
if (!(TOOL_IMAGES in message)) return message;
|
|
313
|
+
const { [TOOL_IMAGES]: _images, ...textOnly } = message;
|
|
314
|
+
return _images?.length ? {
|
|
315
|
+
...textOnly,
|
|
316
|
+
tool_result_metadata: {
|
|
317
|
+
...message.tool_result_metadata,
|
|
318
|
+
[TOOL_HAD_IMAGES]: true
|
|
319
|
+
}
|
|
320
|
+
} : textOnly;
|
|
321
|
+
}
|
|
322
|
+
var TOOL_IMAGE_NOTICES = Symbol("runtime-only-tool-image-notices");
|
|
323
|
+
function createToolImageNotices() {
|
|
324
|
+
return { text: [], seen: /* @__PURE__ */ new WeakSet() };
|
|
325
|
+
}
|
|
326
|
+
function toolImageNotices(message) {
|
|
327
|
+
const holder = message;
|
|
328
|
+
return holder[TOOL_IMAGE_NOTICES] ??= createToolImageNotices();
|
|
329
|
+
}
|
|
330
|
+
var delivery = /* @__PURE__ */ new WeakMap();
|
|
331
|
+
function resetToolImageDelivery(images) {
|
|
332
|
+
for (const image of images) delivery.delete(image);
|
|
333
|
+
}
|
|
334
|
+
function toolImageDelivery(image) {
|
|
335
|
+
return delivery.get(image);
|
|
336
|
+
}
|
|
337
|
+
var MAX_TOOL_IMAGES_PER_REQUEST = 4;
|
|
338
|
+
var MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST = 8 * 1024 * 1024;
|
|
339
|
+
var formatToolImageBudgetNote = (omittedCount) => `Note: ${omittedCount} image(s) omitted (request budget: ${MAX_TOOL_IMAGES_PER_REQUEST} images / 8 MiB base64) \u2014 they were NOT delivered, do not guess their content.`;
|
|
340
|
+
function createToolImageBudget(maxImagesPerRequest = MAX_TOOL_IMAGES_PER_REQUEST) {
|
|
341
|
+
const limit = Math.min(MAX_TOOL_IMAGES_PER_REQUEST, maxImagesPerRequest);
|
|
342
|
+
let count = 0;
|
|
343
|
+
let bytes = 0;
|
|
344
|
+
const seen = /* @__PURE__ */ new Set();
|
|
345
|
+
return (image) => {
|
|
346
|
+
const key = `${image.mimeType}\0${image.dataBase64}`;
|
|
347
|
+
if (seen.has(key)) return "duplicate";
|
|
348
|
+
seen.add(key);
|
|
349
|
+
const size = Buffer.byteLength(image.dataBase64, "utf8");
|
|
350
|
+
if (size > MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST) {
|
|
351
|
+
delivery.set(image, "impossible");
|
|
352
|
+
return "impossible";
|
|
353
|
+
}
|
|
354
|
+
if (count >= limit || bytes + size > MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST) return "pending";
|
|
355
|
+
count += 1;
|
|
356
|
+
bytes += size;
|
|
357
|
+
delivery.set(image, "delivered");
|
|
358
|
+
return "delivered";
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
function toolImageSource(message, imageIndex = 0) {
|
|
362
|
+
const path = typeof message.content === "string" ? (Array.from(message.content.matchAll(/→ ([^\s\x00-\x1f\x7f]+)/gu))[imageIndex]?.[1] ?? message.content.match(/→ ([^\s\x00-\x1f\x7f]+)/u)?.[1])?.replace(/\]$/, "") : void 0;
|
|
363
|
+
return `${(message.tool_call_id ?? "unknown").replace(/[\x00-\x1f\x7f]/g, "")}${path ? ` (${path})` : ""}`;
|
|
364
|
+
}
|
|
365
|
+
function toolImageOmission(source, impossible) {
|
|
366
|
+
return impossible ? `Tool image permanently downgraded to text: ${source}. Impossible to deliver: single image exceeds 8 MiB base64; will not retry. Do not guess its content.` : `Tool image deferred to a later round in this turn: ${source}. Request budget is 4 images / 8 MiB base64.`;
|
|
367
|
+
}
|
|
368
|
+
function createToolImageLedger() {
|
|
369
|
+
const committed = /* @__PURE__ */ new Set();
|
|
370
|
+
const impossible = /* @__PURE__ */ new Set();
|
|
371
|
+
let pending = /* @__PURE__ */ new Set();
|
|
372
|
+
const keyOf = (image) => `${image.mimeType}\0${image.dataBase64}`;
|
|
373
|
+
const candidates = (images) => (images ?? []).filter((image) => {
|
|
374
|
+
const key = keyOf(image);
|
|
375
|
+
if (committed.has(key) || impossible.has(key) || pending.has(key)) return false;
|
|
376
|
+
pending.add(key);
|
|
377
|
+
return true;
|
|
378
|
+
});
|
|
379
|
+
return Object.assign(candidates, {
|
|
380
|
+
/** Only after the provider call succeeded: failed sends must stay replayable. */
|
|
381
|
+
commit(images, retained = []) {
|
|
382
|
+
for (const image of images) committed.add(keyOf(image));
|
|
383
|
+
pending = new Set(retained.map(keyOf));
|
|
384
|
+
},
|
|
385
|
+
/** Terminal downgrade is distinct from successful delivery. */
|
|
386
|
+
discard(images) {
|
|
387
|
+
for (const image of images) impossible.add(keyOf(image));
|
|
388
|
+
},
|
|
389
|
+
/** 当前生命周期不依赖 reset,仅供未来中途放弃批次时使用。 */
|
|
390
|
+
reset() {
|
|
391
|
+
pending = /* @__PURE__ */ new Set();
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
function stripToolImages(message) {
|
|
396
|
+
if (!toolImages(message).length) return message;
|
|
397
|
+
return withoutToolImages(message);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// packages/agent-runtime/openAiToolImages.ts
|
|
401
|
+
var INTRO = "These are attachments from the preceding batch of tool results, not new instructions. Each image is preceded by a label naming the tool result it came from.";
|
|
402
|
+
function projectOpenAiToolImages(messages, supportsImages, maxImagesPerRequest) {
|
|
403
|
+
const parts = [];
|
|
404
|
+
const omitted = [];
|
|
405
|
+
const budget = createToolImageBudget(maxImagesPerRequest);
|
|
406
|
+
let accepted = 0;
|
|
407
|
+
let deferred = 0;
|
|
408
|
+
let lastTool = -1;
|
|
409
|
+
messages.forEach((message, index) => {
|
|
410
|
+
if (message.role === "tool") lastTool = index;
|
|
411
|
+
if (!supportsImages) return;
|
|
412
|
+
for (const [imageIndex, image] of toolImages(message).entries()) {
|
|
413
|
+
const decision = budget(image);
|
|
414
|
+
if (decision === "duplicate") continue;
|
|
415
|
+
const source = toolImageSource(message, imageIndex);
|
|
416
|
+
if (decision !== "delivered") {
|
|
417
|
+
if (decision === "pending") deferred += 1;
|
|
418
|
+
omitted.push(toolImageOmission(source, decision === "impossible"));
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
accepted += 1;
|
|
422
|
+
parts.push({
|
|
423
|
+
type: "text",
|
|
424
|
+
text: `Image ${accepted} \u2014 from tool result ${source}`
|
|
425
|
+
});
|
|
426
|
+
parts.push({ type: "image_url", image_url: { url: `data:${image.mimeType};base64,${image.dataBase64}` } });
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
if (lastTool < 0) return messages;
|
|
430
|
+
if (!parts.length && !omitted.length) return messages;
|
|
431
|
+
const note = omitted.length ? ` Note: ${omitted.length} image(s) omitted. ${omitted.join(" ")}` : "";
|
|
432
|
+
const attachment = {
|
|
433
|
+
role: "user",
|
|
434
|
+
content: [{ type: "text", text: `${INTRO}${deferred ? ` \u672C\u6B21\u6295\u9012 ${accepted} \u5F20\uFF0C\u53E6\u6709 ${deferred} \u5F20\u672A\u6295\u9012\uFF08${deferred} \u5F20 deferred to a later round\uFF09\u3002` : ""}${note}` }, ...parts]
|
|
435
|
+
};
|
|
436
|
+
return [...messages.slice(0, lastTool + 1), attachment, ...messages.slice(lastTool + 1)];
|
|
437
|
+
}
|
|
438
|
+
|
|
29
439
|
// packages/integrations/openai/responsesHelpers.ts
|
|
30
440
|
var RESPONSES_TOP_LEVEL_SCHEMA_KEYS = ["anyOf", "oneOf", "allOf", "enum", "not"];
|
|
31
441
|
var sanitizeResponsesParameters = (parameters) => {
|
|
@@ -270,34 +680,59 @@ var extractImagePartsFromResponseOutput = (response) => {
|
|
|
270
680
|
}
|
|
271
681
|
return images;
|
|
272
682
|
};
|
|
273
|
-
var extractToolCallsFromResponseOutput = (response) => {
|
|
683
|
+
var extractToolCallsFromResponseOutput = (response, options) => {
|
|
274
684
|
const calls = [];
|
|
685
|
+
const wireCalls = /* @__PURE__ */ new Map();
|
|
686
|
+
const projectedIds = /* @__PURE__ */ new Set();
|
|
275
687
|
for (const item of response?.output ?? []) {
|
|
276
|
-
|
|
277
|
-
if (!item
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
688
|
+
const isSearch = item?.type === "tool_search_call" && item.execution === "client";
|
|
689
|
+
if (!isSearch && item?.type !== "function_call") continue;
|
|
690
|
+
if (options?.strictSnapshot && (!asOptionalTrimmedString(item.call_id) || !isSearch && !asOptionalTrimmedString(item.name))) {
|
|
691
|
+
throw new Error(`Responses completed snapshot contains a ${item.type} without a valid call_id or name.`);
|
|
692
|
+
}
|
|
693
|
+
let call;
|
|
694
|
+
if (isSearch) {
|
|
695
|
+
call = bridgeResponsesToolSearch(item);
|
|
696
|
+
} else {
|
|
697
|
+
if (!item.call_id || !item.name) continue;
|
|
698
|
+
if (item.name === TOOL_DISCOVERY_CALL_NAME) {
|
|
699
|
+
throw new Error("Responses used a reserved tool discovery name for a function call.");
|
|
700
|
+
}
|
|
701
|
+
call = {
|
|
702
|
+
id: item.call_id,
|
|
703
|
+
type: "function",
|
|
704
|
+
function: {
|
|
705
|
+
name: item.name,
|
|
706
|
+
arguments: typeof item.arguments === "string" ? item.arguments : JSON.stringify(item.arguments ?? {})
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
if (options?.strictSnapshot) {
|
|
711
|
+
const previous = wireCalls.get(item.call_id);
|
|
712
|
+
if (previous) {
|
|
713
|
+
if (previous.function.name === call.function.name && previous.function.arguments === call.function.arguments) continue;
|
|
714
|
+
throw new Error("Responses returned a conflicting duplicate wire tool call ID.");
|
|
715
|
+
}
|
|
716
|
+
if (projectedIds.has(call.id)) throw new Error("Responses returned a conflicting duplicate projected tool call ID.");
|
|
717
|
+
wireCalls.set(item.call_id, call);
|
|
718
|
+
projectedIds.add(call.id);
|
|
719
|
+
}
|
|
720
|
+
calls.push(call);
|
|
721
|
+
}
|
|
722
|
+
if (!options?.strictSnapshot && calls.some((call) => call.function.name === TOOL_DISCOVERY_CALL_NAME)) {
|
|
723
|
+
const firstById = /* @__PURE__ */ new Map();
|
|
724
|
+
for (const call of calls) {
|
|
725
|
+
const first = firstById.get(call.id);
|
|
726
|
+
if (!first) firstById.set(call.id, call);
|
|
727
|
+
else if (first.function.name !== call.function.name || first.function.arguments !== call.function.arguments) {
|
|
728
|
+
throw new Error("Responses returned a conflicting duplicate tool call ID.");
|
|
284
729
|
}
|
|
285
|
-
}
|
|
730
|
+
}
|
|
731
|
+
return [...firstById.values()];
|
|
286
732
|
}
|
|
287
733
|
return calls;
|
|
288
734
|
};
|
|
289
735
|
|
|
290
|
-
// packages/agent-runtime/declaredToolNames.ts
|
|
291
|
-
function extractDeclaredToolNames(tools) {
|
|
292
|
-
if (!Array.isArray(tools)) return void 0;
|
|
293
|
-
const names = /* @__PURE__ */ new Set();
|
|
294
|
-
for (const t of tools) {
|
|
295
|
-
const fn = t?.function;
|
|
296
|
-
if (fn && typeof fn.name === "string" && fn.name) names.add(fn.name);
|
|
297
|
-
}
|
|
298
|
-
return names;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
736
|
// packages/agent-runtime/toolArgsShape.ts
|
|
302
737
|
function scanRawToolArgs(input) {
|
|
303
738
|
const stack = [];
|
|
@@ -364,6 +799,17 @@ function classifyUnparsableToolArgs(raw) {
|
|
|
364
799
|
return scan.mismatched || scan.unclosed ? "truncated" : "malformed";
|
|
365
800
|
}
|
|
366
801
|
|
|
802
|
+
// packages/agent-runtime/declaredToolNames.ts
|
|
803
|
+
function extractDeclaredToolNames(tools) {
|
|
804
|
+
if (!Array.isArray(tools)) return void 0;
|
|
805
|
+
const names = /* @__PURE__ */ new Set();
|
|
806
|
+
for (const t of tools) {
|
|
807
|
+
const fn = t?.function;
|
|
808
|
+
if (fn && typeof fn.name === "string" && fn.name) names.add(fn.name);
|
|
809
|
+
}
|
|
810
|
+
return names;
|
|
811
|
+
}
|
|
812
|
+
|
|
367
813
|
// packages/agent-runtime/outboundHistorySanitize.ts
|
|
368
814
|
var DOWNGRADED_TOOL_TURN_ORIGIN = Symbol(
|
|
369
815
|
"nolo.downgradedToolTurnOrigin"
|
|
@@ -392,9 +838,10 @@ function emptyToolArgsProjectionStats() {
|
|
|
392
838
|
rewrittenToolMessages: 0
|
|
393
839
|
};
|
|
394
840
|
}
|
|
395
|
-
function sanitizeForOutbound(messages, tools) {
|
|
841
|
+
function sanitizeForOutbound(messages, tools, options) {
|
|
396
842
|
return sanitizeOutboundHistory(messages, {
|
|
397
|
-
declaredToolNames: extractDeclaredToolNames(tools)
|
|
843
|
+
declaredToolNames: extractDeclaredToolNames(tools),
|
|
844
|
+
...options
|
|
398
845
|
});
|
|
399
846
|
}
|
|
400
847
|
function stableToolCallId(assistantIndex, callIndex) {
|
|
@@ -466,7 +913,8 @@ function classifyAssistantCalls(toolCalls, assistantIndex) {
|
|
|
466
913
|
}
|
|
467
914
|
function sanitizeOutboundHistory(messages, options) {
|
|
468
915
|
if (!Array.isArray(messages) || messages.length === 0) return messages;
|
|
469
|
-
|
|
916
|
+
messages = filterToolDiscoveryHistory(messages, options?.retainToolDiscovery);
|
|
917
|
+
const declared = options?.retainToolDiscovery && options.declaredToolNames ? /* @__PURE__ */ new Set([...options.declaredToolNames, TOOL_DISCOVERY_CALL_NAME]) : options?.declaredToolNames;
|
|
470
918
|
const keptCallIndicesPerAssistant = /* @__PURE__ */ new Map();
|
|
471
919
|
const keptToolIndices = /* @__PURE__ */ new Set();
|
|
472
920
|
let i = 0;
|
|
@@ -1136,33 +1584,6 @@ function resolveReasoningReplayOptions(provider, model, stripReasoningContent) {
|
|
|
1136
1584
|
return shouldReplayReasoningContentForOutbound(provider, model) ? { replayReasoningPlaceholder: REASONING_REPLAY_PLACEHOLDER } : {};
|
|
1137
1585
|
}
|
|
1138
1586
|
|
|
1139
|
-
// packages/agent-runtime/promptCacheKey.ts
|
|
1140
|
-
function collectStablePromptPrefix(messages, fallbackPrompt) {
|
|
1141
|
-
const systemTexts = [];
|
|
1142
|
-
if (fallbackPrompt?.trim()) systemTexts.push(fallbackPrompt.trim());
|
|
1143
|
-
for (const raw of messages) {
|
|
1144
|
-
if (!raw || typeof raw !== "object") continue;
|
|
1145
|
-
const message = raw;
|
|
1146
|
-
const role = String(message.role ?? "");
|
|
1147
|
-
if (role !== "system" && role !== "developer") continue;
|
|
1148
|
-
if (typeof message.content === "string") {
|
|
1149
|
-
const boundary = Number(message.stable_prefix_chars);
|
|
1150
|
-
const text = Number.isFinite(boundary) && boundary > 0 ? message.content.slice(0, boundary) : message.content;
|
|
1151
|
-
if (text.trim()) systemTexts.push(text.trim());
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
return systemTexts.join("\n\n");
|
|
1155
|
-
}
|
|
1156
|
-
function stablePromptCacheKey(parts, namespace) {
|
|
1157
|
-
const value = JSON.stringify(parts);
|
|
1158
|
-
let hash = 2166136261;
|
|
1159
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
1160
|
-
hash ^= value.charCodeAt(index);
|
|
1161
|
-
hash = Math.imul(hash, 16777619) >>> 0;
|
|
1162
|
-
}
|
|
1163
|
-
return `${namespace}-${hash.toString(16).padStart(8, "0")}`;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
1587
|
// packages/integrations/openai/providerBodyCompatibility.ts
|
|
1167
1588
|
var MOONSHOT_KIMI_K3_MODEL = "kimi-k3";
|
|
1168
1589
|
var MOONSHOT_KIMI_K31_PRO_MODEL = "kimi-k3.1-pro";
|
|
@@ -1254,11 +1675,30 @@ var normalizeChatCompletionsBodyForProvider = ({
|
|
|
1254
1675
|
};
|
|
1255
1676
|
|
|
1256
1677
|
export {
|
|
1678
|
+
EMPTY_TOOL_RESULT_TEXT,
|
|
1679
|
+
TOOL_HAD_IMAGES,
|
|
1680
|
+
hadToolImages,
|
|
1681
|
+
TOOL_IMAGES,
|
|
1682
|
+
toolImages,
|
|
1683
|
+
withoutToolImages,
|
|
1684
|
+
TOOL_IMAGE_NOTICES,
|
|
1685
|
+
createToolImageNotices,
|
|
1686
|
+
toolImageNotices,
|
|
1687
|
+
resetToolImageDelivery,
|
|
1688
|
+
toolImageDelivery,
|
|
1689
|
+
MAX_TOOL_IMAGES_PER_REQUEST,
|
|
1690
|
+
MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST,
|
|
1691
|
+
createToolImageBudget,
|
|
1692
|
+
toolImageSource,
|
|
1693
|
+
toolImageOmission,
|
|
1694
|
+
createToolImageLedger,
|
|
1695
|
+
stripToolImages,
|
|
1257
1696
|
scanTruncation,
|
|
1258
1697
|
classifyUnparsableToolArgs,
|
|
1259
1698
|
markDowngradedToolTurnOrigin,
|
|
1260
1699
|
transferDowngradedToolTurnOrigin,
|
|
1261
1700
|
sanitizeForOutbound,
|
|
1701
|
+
renderToolResultAsText,
|
|
1262
1702
|
hasParsableObjectArguments,
|
|
1263
1703
|
repairTruncatedToolArguments,
|
|
1264
1704
|
downgradeUnparsableToolCalls,
|
|
@@ -1266,13 +1706,15 @@ export {
|
|
|
1266
1706
|
hasImageParts,
|
|
1267
1707
|
requiresBareImageUrl,
|
|
1268
1708
|
toBareImageUrlMessages,
|
|
1709
|
+
projectOpenAiToolImages,
|
|
1269
1710
|
preserveAgentStateFields,
|
|
1270
1711
|
findAgentStatePairingIssues,
|
|
1271
1712
|
toOpenAiCompatibleMessages,
|
|
1272
1713
|
shouldStripReasoningContentForOutbound,
|
|
1273
1714
|
resolveReasoningReplayOptions,
|
|
1274
|
-
|
|
1275
|
-
|
|
1715
|
+
hasDeferrableResponsesTools,
|
|
1716
|
+
finishResponsesToolDiscovery,
|
|
1717
|
+
prepareResponsesToolDiscovery,
|
|
1276
1718
|
toResponsesTools,
|
|
1277
1719
|
convertMessagesToResponsesInput,
|
|
1278
1720
|
extractTextFromResponseOutput,
|