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
|
@@ -3,10 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-5ZUL4CUO.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelContextWindow
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
BUILTIN_NOLO_AGENT_KEY
|
|
9
|
-
} from "./chunk-ILHQ2AXT.js";
|
|
6
|
+
} from "./chunk-2FZVXOFX.js";
|
|
10
7
|
import {
|
|
11
8
|
isPageKey,
|
|
12
9
|
isTableMetaKey
|
|
@@ -14,6 +11,9 @@ import {
|
|
|
14
11
|
import {
|
|
15
12
|
isDialogRecordKey
|
|
16
13
|
} from "./chunk-OJKUU3LP.js";
|
|
14
|
+
import {
|
|
15
|
+
BUILTIN_NOLO_AGENT_KEY
|
|
16
|
+
} from "./chunk-RIWKZT7E.js";
|
|
17
17
|
import {
|
|
18
18
|
asTrimmedString
|
|
19
19
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -23,13 +23,24 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
asOptionalTrimmedString
|
|
25
25
|
} from "./chunk-G3SUCT4W.js";
|
|
26
|
+
import {
|
|
27
|
+
asTrimmedLowercaseString
|
|
28
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
29
|
+
|
|
30
|
+
// packages/integrations/openai/responsesPromptLayout.ts
|
|
31
|
+
function isGpt62DeveloperPrefixModel(model) {
|
|
32
|
+
return /^gpt-6\.2-(astra|sol)$/.test(model);
|
|
33
|
+
}
|
|
26
34
|
|
|
27
35
|
// packages/agent-runtime/codexOAuthPure.ts
|
|
28
36
|
function isCodexOAuthAgent(agent) {
|
|
29
37
|
if (!agent) return false;
|
|
30
|
-
const ref = agent.apiKeyRef
|
|
38
|
+
const ref = asTrimmedLowercaseString(agent.apiKeyRef);
|
|
31
39
|
return ref === "chatgpt";
|
|
32
40
|
}
|
|
41
|
+
function usesCodexDeveloperPrefix(agent, model) {
|
|
42
|
+
return !agent.customProviderUrl && isGpt62DeveloperPrefixModel(asTrimmedLowercaseString(model).replace(/^openai\//, ""));
|
|
43
|
+
}
|
|
33
44
|
|
|
34
45
|
// packages/agent-runtime/codexOAuthModelAliases.ts
|
|
35
46
|
var CODEX_OAUTH_MODEL_ALIASES = {
|
|
@@ -453,11 +464,24 @@ function resolveEmptyAssistantFallbackMessage(reason) {
|
|
|
453
464
|
if (reason === "stagnant_tool_calls") return STAGNANT_TOOL_CALLS_FALLBACK_MESSAGE;
|
|
454
465
|
return EMPTY_ASSISTANT_FALLBACK_MESSAGE;
|
|
455
466
|
}
|
|
467
|
+
var DEGENERATE_CLOSING_BRACKET_FRAGMENT_RE = /^[}\])]+$/;
|
|
468
|
+
var MAX_DEGENERATE_FRAGMENT_CHARS = 4;
|
|
469
|
+
function isDegenerateClosingBracketFragment(text) {
|
|
470
|
+
if (typeof text !== "string") return false;
|
|
471
|
+
const compact = text.replace(/\s+/g, "");
|
|
472
|
+
return compact.length >= 1 && compact.length <= MAX_DEGENERATE_FRAGMENT_CHARS && DEGENERATE_CLOSING_BRACKET_FRAGMENT_RE.test(compact);
|
|
473
|
+
}
|
|
456
474
|
function hasAssistantVisibleOutput(content) {
|
|
457
|
-
if (typeof content === "string")
|
|
475
|
+
if (typeof content === "string") {
|
|
476
|
+
const trimmed = content.trim();
|
|
477
|
+
return trimmed.length > 0 && !isDegenerateClosingBracketFragment(trimmed);
|
|
478
|
+
}
|
|
458
479
|
if (!Array.isArray(content)) return false;
|
|
459
480
|
return content.some((part) => {
|
|
460
|
-
if (part?.type === "text"
|
|
481
|
+
if (part?.type === "text") {
|
|
482
|
+
const text = String(part.text ?? "").trim();
|
|
483
|
+
return text.length > 0 && !isDegenerateClosingBracketFragment(text);
|
|
484
|
+
}
|
|
461
485
|
if (part?.type === "image_url") {
|
|
462
486
|
const url = part?.image_url?.url;
|
|
463
487
|
return typeof url === "string" && url.trim().length > 0;
|
|
@@ -493,7 +517,9 @@ function resolveTruncatedReasoningTailLog(reason, reasoning_content) {
|
|
|
493
517
|
}
|
|
494
518
|
|
|
495
519
|
export {
|
|
520
|
+
isGpt62DeveloperPrefixModel,
|
|
496
521
|
isCodexOAuthAgent,
|
|
522
|
+
usesCodexDeveloperPrefix,
|
|
497
523
|
resolveCodexOAuthEffectiveModel,
|
|
498
524
|
CODEX_OAUTH_CATALOG_TTL_MS,
|
|
499
525
|
CODEX_OAUTH_CATALOG_RETRY_FLOOR_MS,
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
isMediaFile,
|
|
3
3
|
resolveFileCategory
|
|
4
4
|
} from "./chunk-3PVYUPXK.js";
|
|
5
|
-
import {
|
|
6
|
-
readAction,
|
|
7
|
-
readRequestManager,
|
|
8
|
-
resolveAgentReadServers
|
|
9
|
-
} from "./chunk-DGYCDA6W.js";
|
|
10
5
|
import {
|
|
11
6
|
loadFileFromIndexedDb,
|
|
12
7
|
removeAction,
|
|
13
8
|
saveFileToIndexedDb
|
|
14
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WS36XPJD.js";
|
|
10
|
+
import {
|
|
11
|
+
readAction,
|
|
12
|
+
readRequestManager,
|
|
13
|
+
resolveAgentReadServers
|
|
14
|
+
} from "./chunk-7BIJFGKS.js";
|
|
15
15
|
import {
|
|
16
16
|
beginWriteAck,
|
|
17
17
|
compareRemoteRecordsByComparableTime,
|
|
@@ -29,19 +29,22 @@ import {
|
|
|
29
29
|
shouldReplaceLocalWithRemoteRecord,
|
|
30
30
|
shouldReplicateLocalRecord,
|
|
31
31
|
uploadToCurrentServer
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-HPDLPEUG.js";
|
|
33
33
|
import {
|
|
34
34
|
asyncThunkCreator,
|
|
35
35
|
buildCreateSlice,
|
|
36
36
|
createEntityAdapter,
|
|
37
37
|
noloDeleteRequest
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-ZTHAJU3O.js";
|
|
39
39
|
import {
|
|
40
40
|
fetchFromClientDb,
|
|
41
41
|
fetchFromServer,
|
|
42
|
+
googleSessionRequestToken,
|
|
43
|
+
googleSessionServer,
|
|
42
44
|
logger,
|
|
43
|
-
normalizeTimeFields
|
|
44
|
-
|
|
45
|
+
normalizeTimeFields,
|
|
46
|
+
scopeGoogleSessionServers
|
|
47
|
+
} from "./chunk-HDKMVYNJ.js";
|
|
45
48
|
import {
|
|
46
49
|
isTombstoneRecord
|
|
47
50
|
} from "./chunk-BV3FLP2L.js";
|
|
@@ -52,6 +55,9 @@ import {
|
|
|
52
55
|
import {
|
|
53
56
|
ulid
|
|
54
57
|
} from "./chunk-OJKUU3LP.js";
|
|
58
|
+
import {
|
|
59
|
+
isPublicBuiltinPlatformAgentKey
|
|
60
|
+
} from "./chunk-RIWKZT7E.js";
|
|
55
61
|
import {
|
|
56
62
|
API_ENDPOINTS
|
|
57
63
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -643,14 +649,14 @@ async function getPageReadBaseline(db, actorId, dbKey) {
|
|
|
643
649
|
async function readProtectedPage(options) {
|
|
644
650
|
const { db, actorId, dbKey } = options;
|
|
645
651
|
const assertAccess = (origin) => {
|
|
646
|
-
const
|
|
647
|
-
if (
|
|
652
|
+
const access2 = options.getCurrentAccess?.() ?? options;
|
|
653
|
+
if (access2.actorId !== actorId || !access2.token?.trim()) {
|
|
648
654
|
throw Error("\u6587\u6863\u8BFB\u53D6\u8EAB\u4EFD\u5DF2\u53D8\u5316\u6216\u8BA4\u8BC1\u5DF2\u64A4\u9500\uFF0C\u5DF2\u505C\u6B62\u8BFB\u53D6");
|
|
649
655
|
}
|
|
650
|
-
if (origin && !
|
|
656
|
+
if (origin && !access2.servers.some((server) => originOf(server) === origin)) {
|
|
651
657
|
throw Error("\u6587\u6863\u5F52\u5C5E\u670D\u52A1\u5668\u4E0D\u5728\u5DF2\u914D\u7F6E\u670D\u52A1\u5668\u4E2D\u6216\u5DF2\u79FB\u9664\uFF0C\u672A\u53D1\u9001\u8BA4\u8BC1\u4FE1\u606F\uFF0C\u672A\u8F6C\u53D1\u8BA4\u8BC1\u4FE1\u606F");
|
|
652
658
|
}
|
|
653
|
-
return
|
|
659
|
+
return origin ? googleSessionRequestToken(access2.token, origin) : access2.token;
|
|
654
660
|
};
|
|
655
661
|
assertAccess();
|
|
656
662
|
const sync = options.sync ?? createProtectedRecordSync({ db });
|
|
@@ -664,13 +670,10 @@ async function readProtectedPage(options) {
|
|
|
664
670
|
sync,
|
|
665
671
|
fetch: options.fetch,
|
|
666
672
|
isAuthorityAllowed: (origin) => {
|
|
667
|
-
const
|
|
668
|
-
return
|
|
673
|
+
const access2 = options.getCurrentAccess();
|
|
674
|
+
return access2.actorId === actorId && access2.servers.some((server) => originOf(server) === origin);
|
|
669
675
|
},
|
|
670
|
-
getToken: async () =>
|
|
671
|
-
const access = options.getCurrentAccess();
|
|
672
|
-
return access.actorId === actorId ? access.token ?? null : null;
|
|
673
|
-
}
|
|
676
|
+
getToken: async ({ authorityServer }) => assertAccess(authorityServer)
|
|
674
677
|
});
|
|
675
678
|
for (let count = 0; count < state.outbox.length; count++) {
|
|
676
679
|
if ((await transport.sendNext({ actorId, dbKey })).outcome !== "acked") break;
|
|
@@ -683,7 +686,9 @@ async function readProtectedPage(options) {
|
|
|
683
686
|
return state.workingCopy.data;
|
|
684
687
|
}
|
|
685
688
|
}
|
|
686
|
-
const
|
|
689
|
+
const access = options.getCurrentAccess?.() ?? options;
|
|
690
|
+
const googleAuthority = googleSessionServer(access.token);
|
|
691
|
+
const servers = saved ? [saved.authorityServer] : options.servers.filter((server) => access.servers.some((candidate) => originOf(candidate) === originOf(server)) && (!googleAuthority || originOf(server) === googleAuthority));
|
|
687
692
|
for (const server of servers) {
|
|
688
693
|
const origin = originOf(server);
|
|
689
694
|
if (!origin) continue;
|
|
@@ -832,6 +837,7 @@ var readAndWaitAction = async (payload, thunkApi) => {
|
|
|
832
837
|
userAuthorityRegistry
|
|
833
838
|
} = getRuntimeServerContext(state, preferredServerOrigin);
|
|
834
839
|
const allServers = resolveAgentReadServers({ dbKey, configuredServers });
|
|
840
|
+
const fetchScopedFromServer = (server, key, token, signal) => signal === void 0 ? fetchFromServer(server, key, googleSessionRequestToken(token, server, isPublicBuiltinPlatformAgentKey(key))) : fetchFromServer(server, key, googleSessionRequestToken(token, server, isPublicBuiltinPlatformAgentKey(key)), signal);
|
|
835
841
|
const isLoggedIn = !!currentToken;
|
|
836
842
|
const executeReadAndWait = async () => {
|
|
837
843
|
if (dbKey.startsWith("page-") && currentUserId && currentToken && typeof db.batch === "function") {
|
|
@@ -857,11 +863,12 @@ var readAndWaitAction = async (payload, thunkApi) => {
|
|
|
857
863
|
currentServer,
|
|
858
864
|
userAuthorityRegistry
|
|
859
865
|
});
|
|
860
|
-
|
|
866
|
+
let readServers = planAuthorityReadServers({
|
|
861
867
|
allServers,
|
|
862
868
|
authorityServer: preferredServerOrigin ?? authority.authorityServer,
|
|
863
869
|
serverOrigin: authority.serverOrigin
|
|
864
870
|
});
|
|
871
|
+
if (!isPublicBuiltinPlatformAgentKey(dbKey)) readServers = scopeGoogleSessionServers(currentToken, currentServer, readServers);
|
|
865
872
|
const hasPreferredAuthorityServer = !!preferredServerOrigin || !!authority.authorityServer;
|
|
866
873
|
const preferredAuthorityServer = hasPreferredAuthorityServer ? readServers[0] : null;
|
|
867
874
|
if (readServers.length === 0) {
|
|
@@ -874,7 +881,7 @@ var readAndWaitAction = async (payload, thunkApi) => {
|
|
|
874
881
|
}
|
|
875
882
|
if (preferredAuthorityServer) {
|
|
876
883
|
try {
|
|
877
|
-
const preferredRemoteData = await
|
|
884
|
+
const preferredRemoteData = await fetchScopedFromServer(
|
|
878
885
|
preferredAuthorityServer,
|
|
879
886
|
dbKey,
|
|
880
887
|
isLoggedIn ? currentToken : void 0
|
|
@@ -888,7 +895,7 @@ var readAndWaitAction = async (payload, thunkApi) => {
|
|
|
888
895
|
}
|
|
889
896
|
const remainingReadServers = preferredAuthorityServer ? readServers.filter((server) => server !== preferredAuthorityServer) : readServers;
|
|
890
897
|
const remotePromises = remainingReadServers.map(
|
|
891
|
-
(server) =>
|
|
898
|
+
(server) => fetchScopedFromServer(server, dbKey, isLoggedIn ? currentToken : void 0)
|
|
892
899
|
);
|
|
893
900
|
const chosenData = await processRemoteData(
|
|
894
901
|
db,
|
|
@@ -1258,6 +1265,15 @@ var upsertAction = async (upsertConfig, thunkApi) => {
|
|
|
1258
1265
|
}
|
|
1259
1266
|
};
|
|
1260
1267
|
|
|
1268
|
+
// packages/database/spaceUploadFileMapping.ts
|
|
1269
|
+
function mappings(db) {
|
|
1270
|
+
return db?.sublevel?.("web-space-upload-file-ids", { valueEncoding: "utf8" });
|
|
1271
|
+
}
|
|
1272
|
+
var mappingKey = (userId, pageKey) => JSON.stringify([userId, pageKey]);
|
|
1273
|
+
async function recordWebSpaceUploadFileId(db, userId, pageKey, fileId) {
|
|
1274
|
+
await mappings(db)?.put(mappingKey(userId, pageKey), fileId);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1261
1277
|
// packages/database/actions/upload.ts
|
|
1262
1278
|
var saveToClientDb2 = async (clientDb, dbKey, metadata) => {
|
|
1263
1279
|
if (!clientDb) {
|
|
@@ -1282,7 +1298,7 @@ var uploadFileAction = async (uploadConfig, thunkApi) => {
|
|
|
1282
1298
|
const { db: clientDb } = thunkApi.extra;
|
|
1283
1299
|
const state = thunkApi.getState();
|
|
1284
1300
|
const { currentServer, syncServers, currentUserId } = getRuntimeServerContext(state);
|
|
1285
|
-
const { file, customKey, onProgress, signal } = uploadConfig;
|
|
1301
|
+
const { file, customKey, onProgress, signal, ownerType, spaceId } = uploadConfig;
|
|
1286
1302
|
const userId = uploadConfig.userId || currentUserId;
|
|
1287
1303
|
if (!file) {
|
|
1288
1304
|
const errorMsg = "Invalid arguments for uploadFileAction: file is required.";
|
|
@@ -1337,7 +1353,11 @@ var uploadFileAction = async (uploadConfig, thunkApi) => {
|
|
|
1337
1353
|
file,
|
|
1338
1354
|
metadata: fileMetadata,
|
|
1339
1355
|
customKey: finalDbKey,
|
|
1340
|
-
userId
|
|
1356
|
+
userId,
|
|
1357
|
+
// 归属声明一律由调用方显式给出(例如 Space 上传传 ownerType:"space");
|
|
1358
|
+
// 服务端 uploadOwnership.ts 会重新校验,声明本身不构成授权。
|
|
1359
|
+
...ownerType ? { ownerType } : {},
|
|
1360
|
+
...spaceId ? { spaceId } : {}
|
|
1341
1361
|
};
|
|
1342
1362
|
const uploadServers = resolveUploadReplicationServers({
|
|
1343
1363
|
currentServer,
|
|
@@ -1358,8 +1378,16 @@ var uploadFileAction = async (uploadConfig, thunkApi) => {
|
|
|
1358
1378
|
await localCachePromise;
|
|
1359
1379
|
}
|
|
1360
1380
|
if (primaryUploadServer && !primaryUploadSucceeded) {
|
|
1381
|
+
if (ownerType === "space") {
|
|
1382
|
+
throw new Error(
|
|
1383
|
+
`Upload into Space "${spaceId}" failed on ${primaryUploadServer}: the Space may not be synced to that server, or you are not allowed to upload into it there. Sync the Space to ${primaryUploadServer} (or use another upload server) and retry. Ownership is server-decided and is never downgraded to a personal file.`
|
|
1384
|
+
);
|
|
1385
|
+
}
|
|
1361
1386
|
throw new Error(`Primary upload failed on authority server ${primaryUploadServer}`);
|
|
1362
1387
|
}
|
|
1388
|
+
if (ownerType === "space" && userId && finalDbKey === customKey) {
|
|
1389
|
+
await recordWebSpaceUploadFileId(clientDb, userId, finalDbKey, fileId);
|
|
1390
|
+
}
|
|
1363
1391
|
const serversToUse = scheduleUploadReplication({
|
|
1364
1392
|
currentServer,
|
|
1365
1393
|
syncServers,
|
|
@@ -1396,12 +1424,13 @@ var resolveLocalFileId = (fileId) => {
|
|
|
1396
1424
|
};
|
|
1397
1425
|
var readFileContentAction = async ({
|
|
1398
1426
|
fileId,
|
|
1399
|
-
useServerFallback = true
|
|
1427
|
+
useServerFallback = true,
|
|
1428
|
+
localFileId
|
|
1400
1429
|
}, thunkApi) => {
|
|
1401
1430
|
if (!fileId || typeof fileId !== "string") {
|
|
1402
1431
|
throw new Error("readFileContentAction requires a valid fileId string.");
|
|
1403
1432
|
}
|
|
1404
|
-
const localId = resolveLocalFileId(fileId);
|
|
1433
|
+
const localId = localFileId || resolveLocalFileId(fileId);
|
|
1405
1434
|
const localRecord = await loadFileFromIndexedDb(localId);
|
|
1406
1435
|
if (localRecord) {
|
|
1407
1436
|
return {
|
|
@@ -1487,7 +1516,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
1487
1516
|
// 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
|
|
1488
1517
|
read: create.asyncThunk(
|
|
1489
1518
|
async (payload, thunkApi) => {
|
|
1490
|
-
const { readAction: readAction2 } = await import("./read-
|
|
1519
|
+
const { readAction: readAction2 } = await import("./read-KG6INYUT.js");
|
|
1491
1520
|
return readAction2(payload, thunkApi);
|
|
1492
1521
|
},
|
|
1493
1522
|
{
|
|
@@ -1561,7 +1590,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
1561
1590
|
// 这里改成动态 import,运行期才解析,彻底断开这条边。
|
|
1562
1591
|
share: create.asyncThunk(
|
|
1563
1592
|
async (config, thunkApi) => {
|
|
1564
|
-
const { shareResourceAction } = await import("./action-
|
|
1593
|
+
const { shareResourceAction } = await import("./action-C6IQAKN4.js");
|
|
1565
1594
|
return shareResourceAction(config, thunkApi);
|
|
1566
1595
|
}
|
|
1567
1596
|
),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ALWAYS_EXCLUDED_GLOBS,
|
|
2
3
|
buildExecutionTicket
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2E4BYAUE.js";
|
|
4
5
|
|
|
5
6
|
// packages/agent-runtime/docker/executionTicket.ts
|
|
6
7
|
function buildPrimaryExecutionTicket(runGrant, executionClass = "session") {
|
|
@@ -35,6 +36,123 @@ var isDestructiveShellCommand = (params) => {
|
|
|
35
36
|
|
|
36
37
|
// packages/agent-runtime/docker/sandboxWorkspaceHelper.ts
|
|
37
38
|
import * as path from "node:path";
|
|
39
|
+
|
|
40
|
+
// packages/agent-runtime/docker/sandboxSearchKernel.generated.ts
|
|
41
|
+
var SANDBOX_SEARCH_KERNEL_JS = '// packages/agent-runtime/fileTextSearch.ts\nimport { readdir, readFile as readFile2, stat as stat2 } from "node:fs/promises";\nimport { basename, relative, resolve as resolve2 } from "node:path";\nimport { spawn as spawnChildProcess } from "node:child_process";\n\n// packages/agent-runtime/runtimeCompat.ts\nimport { existsSync, readdirSync, statSync } from "node:fs";\nimport { join } from "node:path";\nvar IS_WINDOWS = process.platform === "win32";\nfunction isExecutableFile(candidate) {\n if (!existsSync(candidate))\n return false;\n try {\n return statSync(candidate).isFile();\n } catch {\n return false;\n }\n}\nfunction resolveExecutableOnPath(name) {\n if (IS_WINDOWS && !/\\.[a-z]+$/i.test(name)) {\n const exts = (process.env.PATHEXT || ".EXE;.CMD;.BAT").split(";").filter(Boolean);\n for (const ext of exts) {\n const found = resolveExecutableOnPath(name + ext);\n if (found)\n return found;\n }\n return null;\n }\n const pathEnv = process.env.PATH ?? "";\n const sep = pathEnv.includes(";") && IS_WINDOWS ? ";" : ":";\n const pathDirs = pathEnv.split(sep).filter(Boolean);\n const fallbackDirs = IS_WINDOWS ? [] : [\n "/opt/homebrew/bin",\n "/usr/local/bin",\n "/usr/bin",\n "/bin",\n `${process.env.HOME ?? ""}/.local/bin`\n ].filter(Boolean);\n for (const dir of [...pathDirs, ...fallbackDirs]) {\n const candidate = join(dir, name);\n if (isExecutableFile(candidate))\n return candidate;\n }\n return null;\n}\n\n// packages/agent-runtime/gitignore.ts\nimport { readFile, stat } from "node:fs/promises";\nimport { resolve } from "node:path";\nfunction isIgnorableFsError(err) {\n if (err && typeof err === "object" && "code" in err) {\n const code = err.code;\n return code === "ENOENT" || code === "ENOTDIR";\n }\n return false;\n}\nasync function readRootGitignorePatterns(workspaceRoot) {\n let content;\n try {\n content = await readFile(resolve(workspaceRoot, ".gitignore"), "utf8");\n } catch (err) {\n if (isIgnorableFsError(err))\n return [];\n throw err;\n }\n return content.split(/\\r?\\n/).map((line) => line.trim()).filter((line) => line && !line.startsWith("#") && !line.startsWith("!")).flatMap((line) => {\n const unanchored = line.replace(/^\\//, "");\n if (unanchored.endsWith("/"))\n return [`${unanchored}**`];\n if (unanchored.includes("**"))\n return [unanchored];\n return [unanchored, `${unanchored}/**`];\n });\n}\n\n// packages/agent-runtime/fileTextSearch.ts\nvar normalizePath = (value) => value.replaceAll("\\\\", "/");\nvar pathFor = (root, file, absolute = false) => absolute ? normalizePath(file) : normalizePath(relative(root, file) || basename(file));\nvar COMMAND_LIMIT_HEADROOM = 1;\nvar MAX_SEARCH_FILE_BYTES = 8 * 1024 * 1024;\nvar MAX_SEARCH_LINE_CHARS = 2000;\nasync function runCommand(binary, args, cwd, maxResults) {\n const recordLimit = maxResults === undefined ? 0 : Math.max(0, maxResults) + COMMAND_LIMIT_HEADROOM;\n return await new Promise((done) => {\n let stdout = "", stderr = "", recordCount = 0, stopped = false;\n try {\n const child = spawnChildProcess(binary, args, { cwd, stdio: ["ignore", "pipe", "pipe"], windowsHide: true });\n child.stdout.on("data", (chunk) => {\n const room = MAX_SEARCH_FILE_BYTES - stdout.length;\n stdout += chunk.toString().slice(0, Math.max(0, room));\n if (stdout.length >= MAX_SEARCH_FILE_BYTES && !stopped) {\n stopped = true;\n child.kill();\n }\n recordCount = parseMatches(cwd, stdout).length;\n if (recordLimit > 0 && recordCount >= recordLimit && !stopped) {\n stopped = true;\n child.kill();\n }\n });\n child.stderr.on("data", (chunk) => {\n stderr += chunk.toString();\n });\n child.on("error", () => done({ stdout, stderr, outcome: { kind: "spawn-failed" } }));\n child.on("close", (exitCode) => done({ stdout, stderr, outcome: stopped ? { kind: "stopped-by-limit" } : { kind: "completed", exitCode } }));\n } catch {\n done({ stdout, stderr, outcome: { kind: "spawn-failed" } });\n }\n });\n}\nfunction extractGrepExcludeDir(pattern) {\n const p = pattern.replaceAll("\\\\", "/");\n if (!p)\n return null;\n if (!/\\/(\\*{1,2})?$/.test(p))\n return null;\n const clean = p.replace(/\\/(\\*{1,2})?$/, "");\n if (!clean || clean.includes("/") || /[*?{}[\\]]/.test(clean))\n return null;\n return clean;\n}\nfunction isGrepExpressibleExclude(pattern) {\n return extractGrepExcludeDir(pattern) !== null;\n}\nfunction commandArgs(o, binary, target) {\n const args = binary === "rg" ? ["--line-number", "--no-heading", "--color", "never", "--null"] : ["-RIn", "--binary-files=without-match", "--null"];\n if (binary === "rg")\n args.push("--no-require-git", "--max-columns", String(MAX_SEARCH_LINE_CHARS), "--max-columns-preview");\n if (o.regex !== true)\n args.push(binary === "rg" ? "--fixed-strings" : "-F");\n else if (binary === "grep")\n args.push("-E");\n if (o.caseSensitive === false)\n args.push("-i");\n if (binary === "rg") {\n if (o.includeIgnored)\n args.push("--no-ignore");\n for (const x of o.exclude ?? [])\n args.push("--glob", `!${x}`);\n if (o.include)\n args.push("--type-add", `noloSearch:${o.include}`, "--type", "noloSearch");\n } else {\n for (const x of o.exclude ?? []) {\n const clean = extractGrepExcludeDir(x);\n if (clean)\n args.push("--exclude-dir", clean);\n }\n if (o.include)\n args.push("--include", o.include);\n }\n args.push("--", o.query, target);\n return args;\n}\nfunction parseMatches(root, output) {\n const records = [];\n const pattern = /(?:^|\\n)([^\\0\\n]+)\\0(\\d+):(.*?)(?=\\n[^\\0\\n]+\\0|$)/gs;\n for (const match of output.matchAll(pattern)) {\n records.push({ file: resolve2(root, match[1] ?? ""), line: Number(match[2]), text: (match[3] ?? "").replace(/\\n$/, "") });\n }\n return records;\n}\nasync function decorate(root, raw, context, absolute = false) {\n const out = [];\n for (const x of raw) {\n let lines = [];\n if (context > 0) {\n try {\n if ((await stat2(x.file)).size <= MAX_SEARCH_FILE_BYTES) {\n lines = (await readFile2(x.file, "utf8")).split(/\\r\\n|\\r|\\n/);\n }\n } catch {}\n }\n const i = x.line - 1;\n out.push({\n path: pathFor(root, x.file, absolute),\n line: x.line,\n text: (lines[i] ?? x.text).slice(0, MAX_SEARCH_LINE_CHARS),\n before: lines.slice(Math.max(0, i - context), i).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS)),\n after: lines.slice(i + 1, i + context + 1).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS))\n });\n }\n return out;\n}\nfunction globMatch(pattern, value) {\n const p = normalizePath(pattern).replace(/^!/, "");\n const brace = /\\{([^{}]+)\\}/.exec(p);\n if (brace)\n return brace[1].split(",").some((part) => globMatch(p.slice(0, brace.index) + part + p.slice(brace.index + brace[0].length), value));\n let source = "";\n for (let i = 0;i < p.length; i++) {\n const c = p[i];\n if (c === "*" && p[i + 1] === "*") {\n i++;\n if (p[i + 1] === "/") {\n i++;\n source += "(?:.*/)?";\n } else\n source += ".*";\n } else if (c === "*")\n source += "[^/]*";\n else if (c === "?")\n source += "[^/]";\n else\n source += c.replace(/[.+^${}()|[\\]\\\\]/g, "\\\\$&");\n }\n const r = new RegExp(`^${source}$`);\n return r.test(value) || r.test(basename(value));\n}\nvar defaultReadTextFile = (filePath) => readFile2(filePath, "utf8").catch(() => "");\nasync function jsSearch(o, targetPath) {\n const max = o.maxResults ?? Number.MAX_SAFE_INTEGER;\n const excludes = o.exclude ?? [];\n const readText = o.readTextFile ?? defaultReadTextFile;\n const files = [];\n const targetStat = await stat2(targetPath).catch(() => null);\n if (!targetStat)\n return { matches: [], totalMatches: 0, truncated: false, engine: "js" };\n const ignorePatterns = o.includeIgnored ? [] : await readRootGitignorePatterns(o.root);\n const isIgnored = (rel) => ignorePatterns.some((pattern) => globMatch(pattern, rel));\n const isSearchableFile = (filePath) => {\n const rel = pathFor(o.root, filePath);\n return !excludes.some((pattern) => globMatch(pattern, rel)) && !isIgnored(rel) && (!o.include || globMatch(o.include, rel));\n };\n if (targetStat.isFile()) {\n if (isSearchableFile(targetPath))\n files.push(targetPath);\n } else {\n const walk = async (dir) => {\n for (const e of await readdir(dir, { withFileTypes: true })) {\n const f = resolve2(dir, e.name), rel = pathFor(o.root, f);\n if (e.isDirectory()) {\n if (!excludes.some((p) => globMatch(p, rel)))\n await walk(f);\n } else if (e.isFile() && !excludes.some((p) => globMatch(p, rel)) && !isIgnored(rel) && (!o.include || globMatch(o.include, rel))) {\n files.push(f);\n }\n }\n };\n await walk(targetPath);\n }\n const matcher = o.regex ? new RegExp(o.query, o.caseSensitive === false ? "i" : "") : null;\n const needle = o.caseSensitive === false ? o.query.toLowerCase() : o.query;\n const out = [], context = o.contextLines ?? 0;\n for (const file of files) {\n const info = await stat2(file).catch(() => null);\n if (!info || info.size > MAX_SEARCH_FILE_BYTES)\n continue;\n const text = await readText(file);\n if (!text || text.includes("\\x00"))\n continue;\n const lines = text.split(/\\r\\n|\\r|\\n/);\n for (let i = 0;i < lines.length; i++) {\n const line = lines[i] ?? "";\n const hit = matcher ? matcher.test(line) : o.caseSensitive === false ? line.toLowerCase().includes(needle) : line.includes(needle);\n if (!hit)\n continue;\n if (out.length >= max)\n return { matches: out, totalMatches: max, truncated: true, engine: "js" };\n out.push({ path: pathFor(o.root, file, o.absolutePaths === true), line: i + 1, text: line.slice(0, MAX_SEARCH_LINE_CHARS), before: lines.slice(Math.max(0, i - context), i).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS)), after: lines.slice(i + 1, i + context + 1).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS)) });\n }\n }\n return { matches: out, totalMatches: out.length, truncated: false, engine: "js" };\n}\nasync function canGrepFulfillOptions(o) {\n if (!o.includeIgnored) {\n const gitignorePatterns = await readRootGitignorePatterns(o.root);\n if (gitignorePatterns.length > 0)\n return false;\n }\n if (o.include) {\n if (o.include.includes("/") || o.include.includes("\\\\") || o.include.includes("**") || /[{}[\\]]/.test(o.include)) {\n return false;\n }\n }\n if (o.exclude && o.exclude.length > 0) {\n for (const pattern of o.exclude) {\n if (!isGrepExpressibleExclude(pattern))\n return false;\n }\n }\n return true;\n}\nvar COMMAND_ENGINES = [\n { engine: "ripgrep", binaryOption: "resolveRipgrepBinary", binaryName: "rg", argsKey: "rg" },\n { engine: "grep", binaryOption: "resolveGrepBinary", binaryName: "grep", argsKey: "grep" }\n];\nasync function searchFileTextMatches(o) {\n const targetPath = resolve2(o.root, o.target || ".");\n const targetStat = await stat2(targetPath).catch(() => null);\n if (!targetStat)\n return { matches: [], totalMatches: 0, truncated: false, engine: "js" };\n if (targetStat.isFile())\n return jsSearch(o, targetPath);\n const run = o.runCommand ?? runCommand, max = o.maxResults;\n for (const entry of COMMAND_ENGINES) {\n if (entry.engine === "ripgrep" && o.include && /[/\\\\]/.test(o.include))\n continue;\n if (entry.engine === "grep" && !await canGrepFulfillOptions(o))\n continue;\n const injectedResolver = o[entry.binaryOption];\n const binary = injectedResolver ? injectedResolver() : resolveExecutableOnPath(entry.binaryName);\n if (!binary)\n continue;\n const result = await run(binary, commandArgs(o, entry.argsKey, o.target || "."), o.root, max);\n const raw = parseMatches(o.root, result.stdout);\n const hardFailed = result.outcome.kind === "spawn-failed" || result.outcome.kind === "completed" && result.outcome.exitCode !== 0 && result.outcome.exitCode !== 1;\n if (hardFailed)\n continue;\n const truncated = raw.length > (max ?? Number.MAX_SAFE_INTEGER);\n const matches = await decorate(o.root, raw.slice(0, max), o.contextLines ?? 0, o.absolutePaths === true);\n return {\n matches,\n totalMatches: truncated ? matches.length : raw.length,\n truncated,\n engine: entry.engine\n };\n }\n return jsSearch(o, targetPath);\n}\nexport {\n canGrepFulfillOptions,\n extractGrepExcludeDir,\n isGrepExpressibleExclude,\n searchFileTextMatches\n};\n';
|
|
42
|
+
var SANDBOX_SCRUBBER_JS = `// packages/agent-runtime/secretScrubber.ts
|
|
43
|
+
var SECRET_PATTERNS = [
|
|
44
|
+
{
|
|
45
|
+
kind: "PRIVATE_KEY",
|
|
46
|
+
placeholder: "[REDACTED:PRIVATE_KEY]",
|
|
47
|
+
regex: /-----BEGIN (?:[A-Z0-9 ]+)?PRIVATE KEY-----[\\s\\S]+?-----END (?:[A-Z0-9 ]+)?PRIVATE KEY-----/g
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
kind: "ANTHROPIC_KEY",
|
|
51
|
+
placeholder: "[REDACTED:ANTHROPIC_KEY]",
|
|
52
|
+
regex: /\\bsk-ant-[a-zA-Z0-9_\\-]{20,}\\b/g
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
kind: "API_KEY",
|
|
56
|
+
placeholder: "[REDACTED:API_KEY]",
|
|
57
|
+
regex: /\\bsk-[a-zA-Z0-9_\\-]{24,}\\b/g
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
kind: "BIGMODEL_KEY",
|
|
61
|
+
placeholder: "[REDACTED:BIGMODEL_KEY]",
|
|
62
|
+
regex: /\\b[0-9a-fA-F]{32}\\.[A-Za-z0-9]{16}\\b/g
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
kind: "GITHUB_TOKEN",
|
|
66
|
+
placeholder: "[REDACTED:GITHUB_TOKEN]",
|
|
67
|
+
regex: /\\b(?:gh[pousr]_[a-zA-Z0-9]{30,}|github_pat_[a-zA-Z0-9_]{40,})\\b/g
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
kind: "BEARER_TOKEN",
|
|
71
|
+
placeholder: "Bearer [REDACTED:BEARER_TOKEN]",
|
|
72
|
+
regex: /\\bBearer\\s+[a-zA-Z0-9_\\-\\.]{25,}\\b/gi
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: "PASSWORD",
|
|
76
|
+
placeholder: "$1=[REDACTED:PASSWORD]",
|
|
77
|
+
regex: /\\b((?:DB_|DATABASE_|ADMIN_|ROOT_|MYSQL_|POSTGRES_)?(?:PASSWORD|PASSWD|SECRET_KEY))\\s*=\\s*['"]?([^\\s'"]{4,})['"]?/gi
|
|
78
|
+
}
|
|
79
|
+
];
|
|
80
|
+
var QUICK_PROBE_SUBSTRINGS = [
|
|
81
|
+
"sk-",
|
|
82
|
+
"ghp_",
|
|
83
|
+
"gho_",
|
|
84
|
+
"ghu_",
|
|
85
|
+
"ghs_",
|
|
86
|
+
"ghr_",
|
|
87
|
+
"github_pat_",
|
|
88
|
+
"PRIVATE KEY"
|
|
89
|
+
];
|
|
90
|
+
var CASE_INSENSITIVE_PROBE_REGEX = /bearer|password|passwd|secret_key/i;
|
|
91
|
+
var UNPREFIXED_PROBE_REGEX = /\\b[0-9a-fA-F]{32}\\.[A-Za-z0-9]{16}\\b/;
|
|
92
|
+
function hasPotentialSecrets(text) {
|
|
93
|
+
if (typeof text !== "string" || text.length === 0)
|
|
94
|
+
return false;
|
|
95
|
+
if (QUICK_PROBE_SUBSTRINGS.some((probe) => text.includes(probe)))
|
|
96
|
+
return true;
|
|
97
|
+
if (CASE_INSENSITIVE_PROBE_REGEX.test(text))
|
|
98
|
+
return true;
|
|
99
|
+
return UNPREFIXED_PROBE_REGEX.test(text);
|
|
100
|
+
}
|
|
101
|
+
function scrubSecrets(text) {
|
|
102
|
+
if (typeof text !== "string" || text.length === 0) {
|
|
103
|
+
return { cleaned: text, redactedCount: 0, matchedKinds: [] };
|
|
104
|
+
}
|
|
105
|
+
if (!hasPotentialSecrets(text)) {
|
|
106
|
+
return { cleaned: text, redactedCount: 0, matchedKinds: [] };
|
|
107
|
+
}
|
|
108
|
+
let cleaned = text;
|
|
109
|
+
let redactedCount = 0;
|
|
110
|
+
const matchedKinds = [];
|
|
111
|
+
for (const pattern of SECRET_PATTERNS) {
|
|
112
|
+
pattern.regex.lastIndex = 0;
|
|
113
|
+
const matches = cleaned.match(pattern.regex);
|
|
114
|
+
if (matches && matches.length > 0) {
|
|
115
|
+
redactedCount += matches.length;
|
|
116
|
+
if (!matchedKinds.includes(pattern.kind)) {
|
|
117
|
+
matchedKinds.push(pattern.kind);
|
|
118
|
+
}
|
|
119
|
+
cleaned = cleaned.replace(pattern.regex, pattern.placeholder);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return { cleaned, redactedCount, matchedKinds };
|
|
123
|
+
}
|
|
124
|
+
function scrubObjectSecrets(val) {
|
|
125
|
+
if (val === null || val === undefined)
|
|
126
|
+
return val;
|
|
127
|
+
if (typeof val === "string") {
|
|
128
|
+
return scrubSecrets(val).cleaned;
|
|
129
|
+
}
|
|
130
|
+
if (Array.isArray(val)) {
|
|
131
|
+
return val.map((item) => scrubObjectSecrets(item));
|
|
132
|
+
}
|
|
133
|
+
if (typeof val === "object") {
|
|
134
|
+
if (val instanceof Date || val instanceof RegExp)
|
|
135
|
+
return val;
|
|
136
|
+
const result = {};
|
|
137
|
+
for (const [k, v] of Object.entries(val)) {
|
|
138
|
+
result[k] = scrubObjectSecrets(v);
|
|
139
|
+
}
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
return val;
|
|
143
|
+
}
|
|
144
|
+
export {
|
|
145
|
+
SECRET_PATTERNS,
|
|
146
|
+
hasPotentialSecrets,
|
|
147
|
+
scrubObjectSecrets,
|
|
148
|
+
scrubSecrets
|
|
149
|
+
};
|
|
150
|
+
`;
|
|
151
|
+
|
|
152
|
+
// packages/agent-runtime/docker/sandboxWorkspaceHelper.ts
|
|
153
|
+
function toJavascriptDataUrl(jsSource) {
|
|
154
|
+
return "data:text/javascript;base64," + Buffer.from(jsSource, "utf8").toString("base64");
|
|
155
|
+
}
|
|
38
156
|
var SANDBOX_WORKSPACE_ROOT = "/home/bun/app";
|
|
39
157
|
var SANDBOX_HELPER_PATH = "/tmp/nolo-tools/workspace-tool.mjs";
|
|
40
158
|
function posixQuote(value) {
|
|
@@ -98,6 +216,9 @@ function buildWorkspaceHelperSource() {
|
|
|
98
216
|
import path from "node:path";
|
|
99
217
|
|
|
100
218
|
const ROOT = "${SANDBOX_WORKSPACE_ROOT}";
|
|
219
|
+
const SEARCH_EXCLUDES = ${JSON.stringify(ALWAYS_EXCLUDED_GLOBS)};
|
|
220
|
+
const SEARCH_KERNEL_URL = ${JSON.stringify(toJavascriptDataUrl(SANDBOX_SEARCH_KERNEL_JS))};
|
|
221
|
+
const SCRUBBER_URL = ${JSON.stringify(toJavascriptDataUrl(SANDBOX_SCRUBBER_JS))};
|
|
101
222
|
const MAX_SERIALIZED_CHARS = ${SANDBOX_OUTPUT_LIMITS.maxSerializedChars};
|
|
102
223
|
const READ_HEAD_CHARS = ${SANDBOX_OUTPUT_LIMITS.readHeadChars};
|
|
103
224
|
const READ_TAIL_CHARS = ${SANDBOX_OUTPUT_LIMITS.readTailChars};
|
|
@@ -325,6 +446,31 @@ async function main() {
|
|
|
325
446
|
return emitValue(withMarker(capped.items, capped.omitted));
|
|
326
447
|
}
|
|
327
448
|
|
|
449
|
+
case "searchFiles": {
|
|
450
|
+
const p = resolvePath(args.path || ROOT);
|
|
451
|
+
if (!p.ok) return console.log(JSON.stringify({ ok: false, error: p.error }));
|
|
452
|
+
const { searchFileTextMatches } = await import(SEARCH_KERNEL_URL);
|
|
453
|
+
const { scrubSecrets } = await import(SCRUBBER_URL);
|
|
454
|
+
const query = args.query === undefined ? args.pattern : args.query;
|
|
455
|
+
if (typeof query !== "string" || !query.length) throw new Error("missing_query");
|
|
456
|
+
const result = await searchFileTextMatches({ root: ROOT, target: p.path, query,
|
|
457
|
+
regex: args.regex === true, caseSensitive: args.caseSensitive !== false,
|
|
458
|
+
include: typeof args.include === "string" ? args.include : undefined,
|
|
459
|
+
exclude: [...SEARCH_EXCLUDES, ...(Array.isArray(args.exclude) ? args.exclude.filter((x) => typeof x === "string") : [])],
|
|
460
|
+
contextLines: Number.isInteger(args.contextLines) && args.contextLines >= 0 && args.contextLines <= 5 ? args.contextLines : 0,
|
|
461
|
+
maxResults: Number.isInteger(args.maxResults) && args.maxResults >= 1 && args.maxResults <= 1000 ? args.maxResults : 100,
|
|
462
|
+
includeIgnored: args.includeIgnored === true });
|
|
463
|
+
const lines = result.matches.flatMap((m) => [
|
|
464
|
+
...m.before.map((text, i) => m.path + ":" + (m.line - m.before.length + i) + "-" + text),
|
|
465
|
+
m.path + ":" + m.line + ":" + m.text,
|
|
466
|
+
...m.after.map((text, i) => m.path + ":" + (m.line + i + 1) + "-" + text),
|
|
467
|
+
]);
|
|
468
|
+
const raw = scrubSecrets(lines.join(NL)).cleaned;
|
|
469
|
+
const content = raw.slice(0, ARRAY_CHAR_BUDGET);
|
|
470
|
+
return emitValue({ content, metadata: { searchEngine: result.engine, count: lines.length,
|
|
471
|
+
totalMatches: result.totalMatches, matchCount: result.totalMatches,
|
|
472
|
+
truncated: result.truncated || content.length !== raw.length, limitedByMaxResults: result.truncated } });
|
|
473
|
+
}
|
|
328
474
|
case "mkdir": {
|
|
329
475
|
const p = resolvePath(args.path);
|
|
330
476
|
if (!p.ok) return console.log(JSON.stringify({ ok: false, error: p.error }));
|
|
@@ -414,6 +560,32 @@ function buildToolInvocation(toolName, args) {
|
|
|
414
560
|
}
|
|
415
561
|
break;
|
|
416
562
|
}
|
|
563
|
+
case "searchFiles": {
|
|
564
|
+
const query = args.query === void 0 ? args.pattern : args.query;
|
|
565
|
+
if (typeof query !== "string" || !query.length) return { ok: false, error: "missing_query" };
|
|
566
|
+
const res = resolveSandboxPath(typeof args.path === "string" ? args.path : ".");
|
|
567
|
+
if (!res.ok) return { ok: false, error: res.error };
|
|
568
|
+
for (const key of ["regex", "caseSensitive", "includeIgnored"]) {
|
|
569
|
+
if (args[key] !== void 0 && typeof args[key] !== "boolean") return { ok: false, error: "invalid_" + key };
|
|
570
|
+
}
|
|
571
|
+
if (args.path !== void 0 && typeof args.path !== "string") return { ok: false, error: "invalid_path" };
|
|
572
|
+
if (args.include !== void 0 && typeof args.include !== "string") return { ok: false, error: "invalid_include" };
|
|
573
|
+
if (args.exclude !== void 0 && (!Array.isArray(args.exclude) || !args.exclude.every((x) => typeof x === "string"))) return { ok: false, error: "invalid_exclude" };
|
|
574
|
+
for (const [key, min, max] of [["contextLines", 0, 5], ["maxResults", 1, 1e3]]) {
|
|
575
|
+
if (args[key] !== void 0 && (!Number.isInteger(args[key]) || Number(args[key]) < min || Number(args[key]) > max)) return { ok: false, error: "invalid_" + key };
|
|
576
|
+
}
|
|
577
|
+
op = "searchFiles";
|
|
578
|
+
validatedArgs.path = res.path;
|
|
579
|
+
validatedArgs.query = query;
|
|
580
|
+
validatedArgs.regex = args.regex === true;
|
|
581
|
+
validatedArgs.caseSensitive = args.caseSensitive !== false;
|
|
582
|
+
validatedArgs.include = args.include;
|
|
583
|
+
validatedArgs.exclude = args.exclude;
|
|
584
|
+
validatedArgs.contextLines = args.contextLines;
|
|
585
|
+
validatedArgs.maxResults = args.maxResults ?? 100;
|
|
586
|
+
validatedArgs.includeIgnored = args.includeIgnored === true;
|
|
587
|
+
break;
|
|
588
|
+
}
|
|
417
589
|
case "grep":
|
|
418
590
|
case "grepFiles": {
|
|
419
591
|
if (typeof args.pattern !== "string" || !args.pattern.trim()) {
|
|
@@ -510,6 +682,7 @@ var dockerExecutionToolNames = [
|
|
|
510
682
|
"writeFile",
|
|
511
683
|
"editFile",
|
|
512
684
|
"globFiles",
|
|
685
|
+
"searchFiles",
|
|
513
686
|
"grepFiles"
|
|
514
687
|
];
|
|
515
688
|
var deny = (error) => JSON.stringify({ ok: false, error, workloadLocation: "docker" });
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveAgentCallPlan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DNNPARJK.js";
|
|
4
4
|
import {
|
|
5
|
+
CUSTOM_API_KEY_TEMPLATES,
|
|
5
6
|
SUBSCRIPTION_OAUTH_PROVIDERS
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6SOWMEAY.js";
|
|
7
8
|
import {
|
|
8
9
|
findModelConfig,
|
|
9
10
|
getProviderByModelName
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OKH74FML.js";
|
|
11
12
|
import {
|
|
12
13
|
asOptionalTrimmedString
|
|
13
14
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -67,6 +68,29 @@ var lookupKnownModelVision = (provider, model) => {
|
|
|
67
68
|
}
|
|
68
69
|
return void 0;
|
|
69
70
|
};
|
|
71
|
+
var endpointHost = (value) => {
|
|
72
|
+
const raw = asOptionalTrimmedString(value);
|
|
73
|
+
if (!raw) return void 0;
|
|
74
|
+
try {
|
|
75
|
+
return new URL(raw).host || void 0;
|
|
76
|
+
} catch {
|
|
77
|
+
return void 0;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
var lookupPresetModelVision = (provider, model, customProviderUrl) => {
|
|
81
|
+
if (!model) return void 0;
|
|
82
|
+
const host = endpointHost(customProviderUrl);
|
|
83
|
+
if (!host) return void 0;
|
|
84
|
+
const candidates = [model, stripEffortSuffix(model), stripPreviewSuffix(model)];
|
|
85
|
+
for (const template of CUSTOM_API_KEY_TEMPLATES) {
|
|
86
|
+
if (endpointHost(template.baseUrl) !== host) continue;
|
|
87
|
+
const templateProvider = asTrimmedLowercaseString(template.provider);
|
|
88
|
+
if (provider && provider !== "custom" && templateProvider !== provider) continue;
|
|
89
|
+
const declared = (template.modelOptions ?? []).find((option) => candidates.includes(option.id))?.hasVision;
|
|
90
|
+
if (typeof declared === "boolean") return declared;
|
|
91
|
+
}
|
|
92
|
+
return void 0;
|
|
93
|
+
};
|
|
70
94
|
var resolveCatalogImageSupport = (agent) => {
|
|
71
95
|
const provider = asTrimmedLowercaseString(agent.provider) || asTrimmedLowercaseString(agent.apiSource) || null;
|
|
72
96
|
const model = asOptionalTrimmedString(agent.model) ?? "";
|
|
@@ -83,7 +107,7 @@ var resolveCatalogImageSupport = (agent) => {
|
|
|
83
107
|
});
|
|
84
108
|
const catalogHasVision = authMethod.kind === "oauth" ? SUBSCRIPTION_OAUTH_PROVIDERS.find((entry) => entry.apiKeyRef === authMethod.ref)?.modelOptions.find(
|
|
85
109
|
(entry) => [model, stripEffortSuffix(model), stripPreviewSuffix(model)].includes(entry.id)
|
|
86
|
-
)?.hasVision : lookupKnownModelVision(provider, model);
|
|
110
|
+
)?.hasVision : lookupKnownModelVision(provider, model) ?? (authMethod.kind === "custom-key" ? lookupPresetModelVision(provider, model, agent.customProviderUrl) : void 0);
|
|
87
111
|
return catalogHasVision;
|
|
88
112
|
};
|
|
89
113
|
var liveImageSupport = Symbol("liveImageSupport");
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSelector
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZTHAJU3O.js";
|
|
4
4
|
import {
|
|
5
5
|
getAllServers,
|
|
6
|
-
getIsDesktopApp
|
|
7
|
-
|
|
6
|
+
getIsDesktopApp,
|
|
7
|
+
googleSessionServer,
|
|
8
|
+
scopeGoogleSessionServers
|
|
9
|
+
} from "./chunk-HDKMVYNJ.js";
|
|
10
|
+
import {
|
|
11
|
+
selectIdentityToken
|
|
12
|
+
} from "./chunk-PXYBUFDB.js";
|
|
8
13
|
import {
|
|
9
14
|
SERVERS
|
|
10
15
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -19,20 +24,20 @@ var resolveDesktopSafeServer = (value) => {
|
|
|
19
24
|
};
|
|
20
25
|
var selectSettings = (state) => state.settings;
|
|
21
26
|
var selectCurrentServer = createSelector(
|
|
22
|
-
[selectSettings],
|
|
23
|
-
(settings) => resolveDesktopSafeServer(settings.currentServer)
|
|
27
|
+
[selectSettings, selectIdentityToken],
|
|
28
|
+
(settings, token) => googleSessionServer(token, settings.currentServer) ?? resolveDesktopSafeServer(settings.currentServer)
|
|
24
29
|
);
|
|
25
30
|
var selectSyncServers = createSelector(
|
|
26
|
-
[selectSettings],
|
|
27
|
-
(settings) => (settings.syncServers || []).filter(
|
|
31
|
+
[selectSettings, selectIdentityToken],
|
|
32
|
+
(settings, token) => googleSessionServer(token, settings.currentServer) !== void 0 ? [] : (settings.syncServers || []).filter(
|
|
28
33
|
(server) => !getIsDesktopApp() || !isLocalServerUrl(server)
|
|
29
34
|
)
|
|
30
35
|
);
|
|
31
36
|
var selectRemoteServer = selectCurrentServer;
|
|
32
37
|
var selectRemoteSyncServers = selectSyncServers;
|
|
33
38
|
var selectRemoteServers = createSelector(
|
|
34
|
-
[selectRemoteServer, selectRemoteSyncServers],
|
|
35
|
-
(currentServer, syncServers) => getAllServers(currentServer, syncServers)
|
|
39
|
+
[selectRemoteServer, selectRemoteSyncServers, selectIdentityToken],
|
|
40
|
+
(currentServer, syncServers, token) => scopeGoogleSessionServers(token, currentServer, getAllServers(currentServer, syncServers))
|
|
36
41
|
);
|
|
37
42
|
|
|
38
43
|
export {
|