nolo-cli 0.228.0-alpha.2 → 0.228.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/{_executeModel-VYCHHZVT.js → _executeModel-GIFVXKDT.js} +88 -83
- package/{accountResolver-QETKNC7T.js → accountResolver-NGICIMEE.js} +1 -1
- package/{action-GDZDXPMB.js → action-WZTKEF5H.js} +9 -6
- package/{addContentAction-7RO4AMRI.js → addContentAction-MLI6GOBV.js} +14 -13
- package/{addDialogAgentAction-EVYBGTXB.js → addDialogAgentAction-ARGQM22H.js} +17 -16
- package/{agentDeleteCommand-QWQKT54A.js → agentDeleteCommand-UF7XVELS.js} +118 -111
- package/{agentEmailCommands-EISMBIRE.js → agentEmailCommands-SFHRPQYC.js} +118 -107
- package/{agentListCommands-4WLG32IW.js → agentListCommands-IXKBP3W5.js} +208 -177
- package/{agentMachineCommands-DC6NKWTU.js → agentMachineCommands-7NX6PWQ6.js} +55 -48
- package/{agentProviderCommands-STI3DQ6A.js → agentProviderCommands-C5T7C5KZ.js} +2 -2
- package/{agentPullCommand-KHV4EELF.js → agentPullCommand-4EQZYHU4.js} +1 -1
- package/agentRecordCommands-IUNX6XD6.js +188 -0
- package/{agentRunCommand-QM7ETUTX.js → agentRunCommand-LCR4XADM.js} +125 -111
- package/{agentRunControl-MBG4U6SL.js → agentRunControl-RN2P6AOD.js} +11 -9
- package/{agentRuntimeLocal-HOXKWCYO.js → agentRuntimeLocal-LVXPQ7QA.js} +56 -43
- package/{agentSlice-UG76KEBH.js → agentSlice-ZGMOH6TE.js} +15 -14
- package/{appDeleteCommands-WWCC6WA5.js → appDeleteCommands-BESCJOQM.js} +55 -48
- package/{appDeployCommands-AU4IUN33.js → appDeployCommands-LPTR6IOX.js} +55 -48
- package/{appDeployStatusCommands-STUW7WXL.js → appDeployStatusCommands-BZ7KZ5RD.js} +55 -48
- package/{appGetCommands-BGTLIQ4K.js → appGetCommands-EDWGJV4S.js} +55 -48
- package/{appListCommands-CUCPRUXW.js → appListCommands-OPRWYPM6.js} +55 -48
- package/{authCommand-OZ2KTP4Z.js → authCommand-3C3RN4OU.js} +25 -19
- package/{authCommands-55OGQGCR.js → authCommands-ZMVEDCQD.js} +12 -6
- package/{builtinSkillRegistry-BAE2LDXF.js → builtinSkillRegistry-VRCMQ77Q.js} +7 -7
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-O4IIKTBD.js} +384 -7
- package/{chromeOpsCommands-WAA45NCS.js → chromeOpsCommands-NZITLHWO.js} +3 -3
- package/{chunk-VQ5N5GSV.js → chunk-2BKNICGK.js} +4 -4
- package/{chunk-QYB23WUH.js → chunk-2FK2KZSL.js} +1 -1
- package/chunk-2SXN7LAY.js +15 -0
- package/{chunk-3VZLEKV2.js → chunk-3DJJ4CFG.js} +11 -11
- package/{chunk-TSPMLCWI.js → chunk-4IQN6FWY.js} +5 -5
- package/{chunk-XAG3FWBE.js → chunk-4OXPN3WC.js} +6 -6
- package/chunk-4ZCTKB27.js +31 -0
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-42OKN2LI.js → chunk-5HUO7SEX.js} +9 -107
- package/chunk-6ASGEP5D.js +21 -0
- package/{chunk-MJI3UAXN.js → chunk-6CXQ3YNJ.js} +40 -36
- package/{chunk-G7IUT2V3.js → chunk-6MTVACLN.js} +365 -64
- package/{chunk-ZOHO6MOF.js → chunk-6RSNVJGO.js} +2 -99
- package/{chunk-XSW4EXQV.js → chunk-6TVYUQRM.js} +55 -18
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-7Z6EW7AH.js → chunk-6XVPMGXK.js} +97 -11
- package/{chunk-ALAES342.js → chunk-73PZD7JZ.js} +9 -5
- package/{chunk-TCZ2VJZQ.js → chunk-7UVVLYKC.js} +9 -9
- package/{chunk-S6FDXXZV.js → chunk-ADOOL3PG.js} +2 -2
- package/{chunk-OWKNSIXL.js → chunk-AEZBAFC6.js} +334 -77
- package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
- package/{chunk-RG2DGNL6.js → chunk-ARFCL53U.js} +5 -5
- package/{chunk-SRCCSTIM.js → chunk-AS6L5KSD.js} +4 -4
- package/{chunk-WFDNADFX.js → chunk-BAH3BAUZ.js} +8 -8
- package/{chunk-N5Z2V73W.js → chunk-BFKJ2RS3.js} +1 -1
- package/{chunk-F6Z6ZCUV.js → chunk-BVEDT6DM.js} +3 -3
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-CD3RU7XL.js → chunk-CD2DK5JA.js} +120 -14
- package/{chunk-BP5ZJ6B4.js → chunk-CD64YXRB.js} +1 -1
- package/{chunk-VP3BINY7.js → chunk-CIGCTSBF.js} +31 -1
- package/{chunk-TQEKUOTI.js → chunk-CIUZXD5D.js} +12 -12
- package/{chunk-EVGU5P4U.js → chunk-CO6E7YK6.js} +1 -1
- package/{chunk-VMJVAJ6W.js → chunk-CTIEJRTP.js} +28 -4
- package/{chunk-7JGMNKKG.js → chunk-CTWCZKNS.js} +29 -8
- package/{chunk-YFLVRVYK.js → chunk-D25ONVOH.js} +1 -1
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-262R3XNN.js → chunk-E5RYFR7E.js} +334 -103
- package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
- package/{chunk-HSSBDZLD.js → chunk-EDT65EUE.js} +6 -6
- package/{chunk-YVFH2MFB.js → chunk-EQZQUQ33.js} +7 -7
- package/{chunk-HBRDSQ3M.js → chunk-ESN4WNWU.js} +3 -2
- package/{chunk-2YGBI2XB.js → chunk-FE7G6DSP.js} +11 -1
- package/{chunk-547ENH5T.js → chunk-FFFKAOJN.js} +4 -4
- package/{chunk-5ZUOVCKT.js → chunk-FGHEF6WI.js} +3 -1
- package/{chunk-GAYNXB6T.js → chunk-FTWAOKFU.js} +756 -333
- package/chunk-GAHJLSDO.js +107 -0
- package/{chunk-2X7WFDT6.js → chunk-GX6DITLQ.js} +1 -1
- package/{chunk-HXB4VDGK.js → chunk-HCCQEMTK.js} +28 -28
- package/{chunk-CMMI3DAT.js → chunk-HZDK56EK.js} +33 -26
- package/{chunk-OTKSESZR.js → chunk-IIOSZAJX.js} +4 -4
- package/chunk-IIRJ4P4I.js +24 -0
- package/{chunk-OJ45MEEI.js → chunk-IJZC2KIJ.js} +1 -1
- package/{chunk-MNEZUL5S.js → chunk-ITBX27W6.js} +92 -31
- package/{chunk-LYD6C7OU.js → chunk-J2VIGDJN.js} +6 -6
- package/{chunk-M3OZRQNH.js → chunk-JEWMQR6J.js} +1 -1
- package/{chunk-6QHKRARD.js → chunk-JFRJEPFI.js} +29 -5
- package/{chunk-S6K5F3KP.js → chunk-JP2BH4NC.js} +1 -1
- package/{chunk-EGHP7KOY.js → chunk-JU7VN4LF.js} +38 -29
- package/{chunk-RTHFJZ6M.js → chunk-K26XPZRB.js} +2 -2
- package/{chunk-ZYKJBRZ3.js → chunk-K7VIXYTZ.js} +1 -3
- package/chunk-KK3FCYZM.js +647 -0
- package/chunk-KLAMJNKQ.js +33394 -0
- package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
- package/chunk-KXOPLLFP.js +190 -0
- package/{chunk-MZG5CETE.js → chunk-KZ5OD2MO.js} +4 -4
- package/{chunk-ILHQ2AXT.js → chunk-KZAT2M2V.js} +14 -8
- package/chunk-LHCGKAFO.js +739 -0
- package/{chunk-HF7BLF3F.js → chunk-LMGFVH65.js} +107 -104
- package/{chunk-QRGDJA4B.js → chunk-LTVEOOZL.js} +19 -6
- package/{chunk-L32W3PRP.js → chunk-MAA42MMV.js} +233 -17
- package/{chunk-ATEKLSLR.js → chunk-MTM4LRVG.js} +14 -9
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-U2HBB7RS.js → chunk-MYYNZG2M.js} +132 -32
- package/{chunk-DBUR22G5.js → chunk-MZVCFV3T.js} +19 -15
- package/{chunk-WCFFRBL5.js → chunk-N74XL3NI.js} +9 -9
- package/{chunk-VS276URX.js → chunk-NEG5LYK5.js} +1 -1
- package/{chunk-RBPUNSG5.js → chunk-OAZP4TSA.js} +18 -108
- package/{chunk-4QYJPWHH.js → chunk-ODBYGVO2.js} +232 -10
- package/{chunk-M4SFKP5L.js → chunk-OHUYN3YU.js} +3 -3
- package/{chunk-HYLRQDEE.js → chunk-OLGFIQN2.js} +6 -6
- package/{chunk-M3JEW6N6.js → chunk-OYUMJMC5.js} +15 -0
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-BIWI5M4E.js → chunk-PBPXXMWZ.js} +1 -1
- package/{chunk-OBSEKCVK.js → chunk-PQ63BDV3.js} +210 -51
- package/{chunk-4I2MXV5Q.js → chunk-PVFYPUIM.js} +2 -0
- package/{chunk-XFXFPUO7.js → chunk-QMNVV3YM.js} +10 -37
- package/{chunk-CNMY2XM6.js → chunk-R5NRFXGD.js} +5 -5
- package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
- package/{chunk-4WVJLODK.js → chunk-RHBD22LV.js} +9 -4
- package/{chunk-45CAVC35.js → chunk-RMWDKLBE.js} +1489 -286
- package/{chunk-ZEVQHCLM.js → chunk-RR3MB26M.js} +2 -2
- package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
- package/{chunk-DLXMMTGM.js → chunk-SCMYAGQE.js} +1067 -705
- package/{chunk-YKY4OVOX.js → chunk-SPU3L3OR.js} +17 -170
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-DUUDXSLX.js → chunk-SX6AWTNK.js} +28 -4
- package/{chunk-ZH3KXFHS.js → chunk-TMRJGSK2.js} +1 -1
- package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
- package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
- package/{chunk-UAIHKQIA.js → chunk-U6RD332P.js} +18 -2
- package/{chunk-3U44JB3O.js → chunk-UF6J7NXV.js} +1 -1
- package/{chunk-5YMA6DDZ.js → chunk-UHW6SCVK.js} +1 -1
- package/chunk-UOUMPHS5.js +103 -0
- package/{chunk-HHFGE2WF.js → chunk-UPOW5HTG.js} +5 -5
- package/{chunk-DEA37IUY.js → chunk-V4IYI3SB.js} +2 -2
- package/{chunk-XTJKU3Z4.js → chunk-VKCPKCSS.js} +66 -92
- package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
- package/{chunk-OBIC6EG7.js → chunk-VUHKG4KS.js} +3 -3
- package/{chunk-EEOOBRA7.js → chunk-W3HSD32M.js} +13 -6
- package/{chunk-P2ZLUIW2.js → chunk-W6T4FNZP.js} +351 -26
- package/chunk-WDWZPASX.js +29 -0
- package/{chunk-R6Z5S5GA.js → chunk-WQDTSK5U.js} +51 -14
- package/{chunk-X3E6EHJW.js → chunk-X22AUZKL.js} +149 -165
- package/{chunk-4ZGPHFLE.js → chunk-X3OZ655T.js} +2 -2
- package/{chunk-RRDRQOEC.js → chunk-XCA4WHX5.js} +95 -77
- package/{chunk-TI2EPRHE.js → chunk-XJSEST7D.js} +3 -3
- package/{chunk-3QIYD3VM.js → chunk-XNTZD4AE.js} +870 -1068
- package/chunk-XSRSAU3O.js +133 -0
- package/{chunk-7FEP5USX.js → chunk-Y4NPF2UN.js} +3 -3
- package/{chunk-FJSNBZXR.js → chunk-YDRRGVT5.js} +1 -1
- package/{chunk-7BCG67EI.js → chunk-YFW4H6DL.js} +405 -338
- package/{chunk-JQZRSXS5.js → chunk-YGDYYFRX.js} +9 -13
- package/{chunk-4N6G2CKP.js → chunk-YHNUDTU4.js} +49 -3
- package/chunk-YJPK35HB.js +175 -0
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-FPBJM2BW.js → chunk-Z7KE4K3H.js} +195 -126
- package/{chunk-DGYCDA6W.js → chunk-ZM5AZTQG.js} +20 -13
- package/{chunk-CBUZ6DKA.js → chunk-ZQ6K57FJ.js} +1 -1
- package/{cliAgentConfigHelpers-BTRHMPW2.js → cliAgentConfigHelpers-37ZNEY5Y.js} +9 -9
- package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
- package/{cliLocalAgentRecordReader-H3HYQRRR.js → cliLocalAgentRecordReader-MCQVRWBR.js} +58 -47
- package/{commandRegistry-FVYPE2IN.js → commandRegistry-NTH5IAN5.js} +104 -92
- package/{contentThunks-GNFPG32S.js → contentThunks-SPXTX5U2.js} +38 -36
- package/{cooldownCommands-YB5H5BBK.js → cooldownCommands-TIFCHCUN.js} +1 -1
- package/{createAgentAutomationAction-PB4QIFQ4.js → createAgentAutomationAction-KUQKCOXB.js} +38 -36
- package/{createDialogAction-EVTOPY7A.js → createDialogAction-HJN5U3XS.js} +39 -37
- package/{createPageAction-2UYF2IDZ.js → createPageAction-ZAHRDOAU.js} +43 -41
- package/{db-M7FU2GNK.js → db-CMUTP3W5.js} +2 -2
- package/{dbSlice-XRUZOGSU.js → dbSlice-656PMWR2.js} +13 -12
- package/{deleteFile-6URDHYRB.js → deleteFile-ZCQESEEQ.js} +10 -7
- package/{dialogCommands-6SZD4TYP.js → dialogCommands-KZTZLWPZ.js} +60 -54
- package/dialogMessageRecord-OAV77LT7.js +7 -0
- package/{dialogNotifyCommand-SHGPCU22.js → dialogNotifyCommand-PST75COP.js} +11 -11
- package/{dialogSlice-5EQ2A6LY.js → dialogSlice-BXIERQHO.js} +39 -37
- package/{dialogUsageCommand-W2WCSGKF.js → dialogUsageCommand-6RW2FY6K.js} +5 -5
- package/{docCreateCommands-25E6PGN3.js → docCreateCommands-26HJ5NAY.js} +54 -47
- package/{docDeleteCommands-F7ZVGEHW.js → docDeleteCommands-UAOHH5XK.js} +56 -49
- package/{docReadCommands-JY2E5XEN.js → docReadCommands-4ADG7YE6.js} +54 -47
- package/{docStore-OKKIKLT3.js → docStore-FZ75HWP2.js} +15 -14
- package/{docUpdateCommands-OZ4CUSIQ.js → docUpdateCommands-OGFJZENF.js} +54 -47
- package/fetchMessages-TQEUZD7H.js +1 -1
- package/{getPricing-LF5C4XSI.js → getPricing-FCHYVRJU.js} +4 -4
- package/{handleSendMessageAction-LNT7SZND.js → handleSendMessageAction-KP6GGBFY.js} +82 -78
- package/{hostCredentialCreate-XUU2CSHI.js → hostCredentialCreate-23TX56G7.js} +117 -105
- package/index.js +8 -8
- package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
- package/{localDialogRead-CCOCVGAP.js → localDialogRead-CIOTQM5T.js} +1 -1
- package/{localRuntimeAdapter-IBSTMSX7.js → localRuntimeAdapter-MTUWOYPN.js} +124 -111
- package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-TYHQCTZN.js} +5 -3
- package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-BO7IVWAZ.js} +1 -1
- package/{machineCommands-HSQHDHOT.js → machineCommands-4WJUJQHW.js} +241 -321
- package/{machineWsRunDispatch-L6H7J66T.js → machineWsRunDispatch-V3U4JM67.js} +113 -102
- package/markdownToSlate-KIYM7B3P.js +8 -0
- package/mcpLocalAuthorizeCommand-TI656UWC.js +106 -0
- package/{memberThunks-7Y3OYSJQ.js → memberThunks-JFYC4Z5L.js} +20 -15
- package/{models-H5NNZRLH.js → models-EP7VG6N2.js} +2 -2
- package/{overlay-BBQZXGYI.js → overlay-JA3SPVUS.js} +5 -3
- package/package.json +1 -1
- package/{projectArchive-FQO654Z3.js → projectArchive-NU2Z5HOR.js} +45 -43
- package/{providerPresetApply-WHAMP2D5.js → providerPresetApply-4H7YP5D7.js} +6 -6
- package/{providerRegistry-ZI2KORJ7.js → providerRegistry-F3UPOTIY.js} +6 -6
- package/{read-TYMBGEXO.js → read-BRZHXUJ6.js} +9 -8
- package/{readDocTool-SKQVHBLO.js → readDocTool-N7RVFQEE.js} +1 -1
- package/{readlineWorkspace-7U272DSA.js → readlineWorkspace-T56MRMS5.js} +6423 -3669
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-F5QE2O2B.js → removeDialogAgentAction-J7XU7OUX.js} +19 -18
- package/{runAgentClientLoop-AF4JQIJ7.js → runAgentClientLoop-O2GRCGRZ.js} +96 -76
- package/{runtimeDoctorCommands-RRKPBGVO.js → runtimeDoctorCommands-RDRJXMXC.js} +8 -8
- package/{secretCommands-KZWBZIYS.js → secretCommands-2FEMRUFM.js} +3 -3
- package/{setDialogExtraReferencesAction-72L27ERM.js → setDialogExtraReferencesAction-Q4V2ZZW2.js} +16 -15
- package/{setPrimaryDialogAgentAction-GJJDUSGJ.js → setPrimaryDialogAgentAction-742H5S6T.js} +19 -18
- package/{settingThunks-ZRGWVGZD.js → settingThunks-T4FXSV6M.js} +185 -66
- package/{skillDiscovery-BHHPCUHZ.js → skillDiscovery-MDDKPTW3.js} +4 -3
- package/{spaceCommands-5VNWMDBE.js → spaceCommands-W5TAVFDT.js} +58 -51
- package/{streamAgentChatTurn-YSPEFY4K.js → streamAgentChatTurn-OWDJMU5E.js} +234 -177
- package/{switchDialogAgentAction-IIJBPND3.js → switchDialogAgentAction-HLDLHRRA.js} +17 -16
- package/{tableCommands-FTAOCBTX.js → tableCommands-44GC4N6J.js} +8 -5
- package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
- package/{tools-M35PTIFB.js → tools-O7SGGVA3.js} +65 -62
- package/{tuiRestart-2IL37YIB.js → tuiRestart-EOGC2BYY.js} +10 -10
- package/{tuiSummaryLlmCaller-W2QN4VAC.js → tuiSummaryLlmCaller-TM5BU73J.js} +16 -15
- package/{updateCommands-CPATDG6J.js → updateCommands-FBYA5WVG.js} +3 -3
- package/{updateDialogTitleAction-IMIRJRQQ.js → updateDialogTitleAction-EXSZGTLL.js} +40 -38
- package/{usageCommand-2BF74MKF.js → usageCommand-L4OFWXEU.js} +2 -2
- package/{usageRebuildCommand-UHB55BQM.js → usageRebuildCommand-7JR33UHS.js} +3 -3
- package/webapi-QVV65DQF.js +2487 -0
- package/{windowsSelfUpdate-ZFD6J5HF.js → windowsSelfUpdate-M4V77OUB.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-ZCSQCHG3.js} +2 -2
- package/agentRecordCommands-IZYUVHME.js +0 -177
- package/chunk-5ZMIIR23.js +0 -265
- package/chunk-62HXNQVV.js +0 -134
- package/chunk-TUSTONB3.js +0 -81
- package/chunk-ZXF6D3I6.js +0 -359
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
- /package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
|
@@ -3,26 +3,19 @@ import {
|
|
|
3
3
|
} from "./chunk-HS7MLR74.js";
|
|
4
4
|
import {
|
|
5
5
|
performServerProxyFetchWithRetry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JU7VN4LF.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchServerSyncedCredential
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-N74XL3NI.js";
|
|
10
10
|
import {
|
|
11
|
-
CREDENTIAL_HYGIENE_RULE,
|
|
12
|
-
DELETE_SAFETY_RED_LINE,
|
|
13
|
-
DISPATCH_BACKEND_POLICY,
|
|
14
|
-
DISPATCH_CANDIDATE_POLICY,
|
|
15
|
-
PARALLEL_DISPATCH_DEFAULT_RULE,
|
|
16
|
-
PLATFORM_RISK_CONTROL_RULE,
|
|
17
|
-
VERIFY_BEFORE_CONCLUDING_RULE,
|
|
18
|
-
buildConsultationModeBlock,
|
|
19
11
|
buildIdentityBlock,
|
|
12
|
+
buildPlatformStaticContextLayers,
|
|
20
13
|
buildResponseGuidelines,
|
|
21
14
|
buildRuntimeGuidanceBlocks,
|
|
22
15
|
compileContextLayers,
|
|
23
16
|
detectDispatchIntentFromMessages,
|
|
24
17
|
resolveToolGuidedSections
|
|
25
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-Z7KE4K3H.js";
|
|
26
19
|
import {
|
|
27
20
|
convertMessagesToResponsesInput,
|
|
28
21
|
getUsageRequestOptions,
|
|
@@ -31,35 +24,39 @@ import {
|
|
|
31
24
|
resolveReasoningReplayOptions,
|
|
32
25
|
shouldStripReasoningContentForOutbound,
|
|
33
26
|
stablePromptCacheKey
|
|
34
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-W3HSD32M.js";
|
|
35
28
|
import {
|
|
36
29
|
resolveAgentCallPlan,
|
|
37
30
|
resolveClientWire
|
|
38
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-VUHKG4KS.js";
|
|
39
32
|
import {
|
|
40
33
|
createFileCredentialBroker
|
|
41
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-E6A5NHDH.js";
|
|
35
|
+
import {
|
|
36
|
+
MEMORY_USE_GUIDANCE,
|
|
37
|
+
buildUserResponseLanguageContext
|
|
38
|
+
} from "./chunk-YGDYYFRX.js";
|
|
39
|
+
import {
|
|
40
|
+
wrapHistoricalSummaryWithReplayGuard
|
|
41
|
+
} from "./chunk-2SXN7LAY.js";
|
|
42
42
|
import {
|
|
43
|
-
WORKTREE_ISOLATION_PRELUDE,
|
|
44
43
|
buildSkillGuidancePromptBlock
|
|
45
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-6MTVACLN.js";
|
|
46
45
|
import {
|
|
47
46
|
canonicalizeToolNames
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import {
|
|
50
|
-
MEMORY_USE_GUIDANCE,
|
|
51
|
-
buildUserResponseLanguageContext,
|
|
52
|
-
wrapHistoricalSummaryWithReplayGuard
|
|
53
|
-
} from "./chunk-JQZRSXS5.js";
|
|
47
|
+
} from "./chunk-YLAHYLDQ.js";
|
|
54
48
|
import {
|
|
55
49
|
API_ENDPOINTS
|
|
56
50
|
} from "./chunk-LCBAMY2M.js";
|
|
57
|
-
import {
|
|
58
|
-
buildProviderAuthHeaders
|
|
59
|
-
} from "./chunk-RTHFJZ6M.js";
|
|
60
51
|
import {
|
|
61
52
|
toErrorMessage
|
|
62
53
|
} from "./chunk-HNMXYYJR.js";
|
|
54
|
+
import {
|
|
55
|
+
buildProviderAuthHeaders
|
|
56
|
+
} from "./chunk-K26XPZRB.js";
|
|
57
|
+
import {
|
|
58
|
+
OPENAI_RESPONSES_ENDPOINT
|
|
59
|
+
} from "./chunk-ESN4WNWU.js";
|
|
63
60
|
import {
|
|
64
61
|
asTrimmedString
|
|
65
62
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -67,7 +64,7 @@ import {
|
|
|
67
64
|
clampReasoningEffort,
|
|
68
65
|
getModelConfig,
|
|
69
66
|
isModelSupportReasoningEffort
|
|
70
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-CD2DK5JA.js";
|
|
71
68
|
import {
|
|
72
69
|
isRecord
|
|
73
70
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -81,8 +78,12 @@ import {
|
|
|
81
78
|
isDeepInfraKimiModel,
|
|
82
79
|
isFireworksKimiModel,
|
|
83
80
|
isPlatformMimoProviderModel,
|
|
84
|
-
resolveFireworksKimiModel
|
|
85
|
-
|
|
81
|
+
resolveFireworksKimiModel,
|
|
82
|
+
resolvePlatformHostedRouting
|
|
83
|
+
} from "./chunk-PQ63BDV3.js";
|
|
84
|
+
import {
|
|
85
|
+
asTrimmedLowercaseString
|
|
86
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
86
87
|
|
|
87
88
|
// packages/agent-runtime/responsesConversationState.ts
|
|
88
89
|
function supportsResponsesConversationState(agent) {
|
|
@@ -247,8 +248,7 @@ ${mainPrompt}` : "";
|
|
|
247
248
|
emailRegistrationWorkflow
|
|
248
249
|
} = buildRuntimeGuidanceBlocks(agentTools);
|
|
249
250
|
const clarifyingSection = !mainPrompt || hasAskTool ? CLARIFICATION_MODE_INSTRUCTIONS : "";
|
|
250
|
-
const userGlobalPromptSection =
|
|
251
|
-
${contexts.userGlobalPrompt.trim()} ` : "";
|
|
251
|
+
const userGlobalPromptSection = "";
|
|
252
252
|
const effectiveViewport = viewport ?? contexts.viewport;
|
|
253
253
|
const isMobile = effectiveViewport !== void 0 ? effectiveViewport.width < mobileBreakpoint : typeof contexts.isMobile === "boolean" ? contexts.isMobile : isBrowser && typeof window !== "undefined" ? window.innerWidth < mobileBreakpoint : false;
|
|
254
254
|
const responseGuidelinesSection = buildResponseGuidelines(isMobile);
|
|
@@ -267,65 +267,8 @@ ${contexts.userGlobalPrompt.trim()} ` : "";
|
|
|
267
267
|
const dialogSummarySection = contexts.dialogSummary?.trim() ? `--- \u5386\u53F2\u5BF9\u8BDD\u6458\u8981 ---
|
|
268
268
|
${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
|
|
269
269
|
return compileContextLayers([
|
|
270
|
-
//
|
|
271
|
-
|
|
272
|
-
{
|
|
273
|
-
id: "delete-safety-red-line",
|
|
274
|
-
owner: "platform",
|
|
275
|
-
cacheScope: "static",
|
|
276
|
-
content: DELETE_SAFETY_RED_LINE
|
|
277
|
-
},
|
|
278
|
-
// 凭据纪律:与红线同为无条件系统层块,四条装配线同源。
|
|
279
|
-
{
|
|
280
|
-
id: "credential-hygiene",
|
|
281
|
-
owner: "platform",
|
|
282
|
-
cacheScope: "static",
|
|
283
|
-
content: CREDENTIAL_HYGIENE_RULE
|
|
284
|
-
},
|
|
285
|
-
// 先验证再下结论:一切动作的前提,紧随凭据纪律、先于并行/派发/发布规则。
|
|
286
|
-
{
|
|
287
|
-
id: "verify-before-concluding",
|
|
288
|
-
owner: "platform",
|
|
289
|
-
cacheScope: "static",
|
|
290
|
-
content: VERIFY_BEFORE_CONCLUDING_RULE
|
|
291
|
-
},
|
|
292
|
-
// 并行是默认:系统层固定块,紧随红线(同为无条件前缀,不随工具/轮次变化)。
|
|
293
|
-
{
|
|
294
|
-
id: "parallel-dispatch-default",
|
|
295
|
-
owner: "platform",
|
|
296
|
-
cacheScope: "static",
|
|
297
|
-
content: PARALLEL_DISPATCH_DEFAULT_RULE
|
|
298
|
-
},
|
|
299
|
-
// 派发落点:并行派发纪律的下一层(派到哪个执行后端),紧随并行块。
|
|
300
|
-
{
|
|
301
|
-
id: "dispatch-backend-policy",
|
|
302
|
-
owner: "platform",
|
|
303
|
-
cacheScope: "static",
|
|
304
|
-
content: DISPATCH_BACKEND_POLICY
|
|
305
|
-
},
|
|
306
|
-
// 派发选人:可用性重扫与速度口径(与后端块同级,紧随其后)。
|
|
307
|
-
{
|
|
308
|
-
id: "dispatch-candidate-policy",
|
|
309
|
-
owner: "platform",
|
|
310
|
-
cacheScope: "static",
|
|
311
|
-
content: DISPATCH_CANDIDATE_POLICY
|
|
312
|
-
},
|
|
313
|
-
// 平台风控纪律:无条件静态前缀,紧随并行派发块。
|
|
314
|
-
{
|
|
315
|
-
id: "platform-risk-control",
|
|
316
|
-
owner: "platform",
|
|
317
|
-
cacheScope: "static",
|
|
318
|
-
content: PLATFORM_RISK_CONTROL_RULE
|
|
319
|
-
},
|
|
320
|
-
{ id: "consultation-mode", owner: "platform", cacheScope: "static", content: buildConsultationModeBlock() },
|
|
321
|
-
// Git 任务隔离:仓库改动前置,系统层固定块(原 worktree-isolation skill 上移,
|
|
322
|
-
// 不受 skill 配置 disabled 影响)。排在既有平台块之后,不扰动其顺序契约。
|
|
323
|
-
{
|
|
324
|
-
id: "worktree-isolation-prelude",
|
|
325
|
-
owner: "platform",
|
|
326
|
-
cacheScope: "static",
|
|
327
|
-
content: WORKTREE_ISOLATION_PRELUDE
|
|
328
|
-
},
|
|
270
|
+
// 顶部固定平台层(唯一真源见 agent-runtime/platformStaticPromptLayers.ts)。
|
|
271
|
+
...buildPlatformStaticContextLayers(),
|
|
329
272
|
{ id: "identity", owner: "platform", cacheScope: "session", content: identitySection },
|
|
330
273
|
{ id: "user-response-language", owner: "platform", cacheScope: "session", content: buildUserResponseLanguageContext({ language: safeLanguage }) },
|
|
331
274
|
{ id: "startup-protocol", owner: "platform", cacheScope: "static", content: startupProtocol },
|
|
@@ -571,6 +514,21 @@ var generateOpenAIRequestBody = (agentConfig, providerName, messages, contexts,
|
|
|
571
514
|
|
|
572
515
|
// packages/integrations/openai/generateResponseRequestBody.ts
|
|
573
516
|
var DEFAULT_RESPONSES_COMPACTION_THRESHOLD = 2e5;
|
|
517
|
+
function usesGpt62DeveloperPrefix(agentConfig) {
|
|
518
|
+
const provider = asTrimmedLowercaseString(agentConfig.provider);
|
|
519
|
+
if (agentConfig.customProviderUrl || agentConfig.apiSource === "custom") return false;
|
|
520
|
+
let model = asTrimmedLowercaseString(agentConfig.model).replace(/^openai\//, "");
|
|
521
|
+
if (provider === "nolo") {
|
|
522
|
+
const route = resolvePlatformHostedRouting(agentConfig.model);
|
|
523
|
+
if (route?.wire !== "responses" || route.endpoint !== OPENAI_RESPONSES_ENDPOINT) {
|
|
524
|
+
return false;
|
|
525
|
+
}
|
|
526
|
+
model = route.upstreamModelId ?? model;
|
|
527
|
+
} else if (provider !== "openai") {
|
|
528
|
+
return false;
|
|
529
|
+
}
|
|
530
|
+
return /^gpt-6\.2-(astra|sol)$/.test(model);
|
|
531
|
+
}
|
|
574
532
|
function resolveResponsesCompactionThreshold(agentConfig) {
|
|
575
533
|
const configured = Number(
|
|
576
534
|
agentConfig.responsesCompactionThreshold ?? agentConfig.responses_compaction_threshold
|
|
@@ -590,7 +548,10 @@ function selectResponsesContinuationMessages(msgs) {
|
|
|
590
548
|
}
|
|
591
549
|
function generateResponseRequestBody(agentConfig, msgs, contexts, prependSystemPrompt = true, responsesState) {
|
|
592
550
|
const language = typeof navigator !== "undefined" && navigator.language ? navigator.language : "zh-CN";
|
|
593
|
-
const state =
|
|
551
|
+
const state = selectResponsesConversationState(
|
|
552
|
+
responsesState === void 0 ? agentConfig.responsesState : responsesState,
|
|
553
|
+
agentConfig
|
|
554
|
+
);
|
|
594
555
|
const supportsServerState = supportsResponsesConversationState(agentConfig);
|
|
595
556
|
const stateful = supportsServerState && state && agentConfig.store !== false ? state : null;
|
|
596
557
|
const input = convertMessagesToResponsesInput(
|
|
@@ -603,14 +564,26 @@ function generateResponseRequestBody(agentConfig, msgs, contexts, prependSystemP
|
|
|
603
564
|
...getUsageRequestOptions(agentConfig.provider, { api: "responses" })
|
|
604
565
|
};
|
|
605
566
|
if (prependSystemPrompt) {
|
|
606
|
-
const
|
|
567
|
+
const compiled = buildSystemPromptContext({
|
|
607
568
|
agentConfig,
|
|
608
569
|
language,
|
|
609
570
|
contexts,
|
|
610
571
|
// 按当前用户输入检测派发意图:无意图只注入最小派发协议(安全硬门常在)。
|
|
611
572
|
dispatchIntent: detectDispatchIntentFromMessages(msgs)
|
|
612
573
|
});
|
|
613
|
-
|
|
574
|
+
const legacyContinuation = supportsServerState && responsesState === void 0 && agentConfig.previous_response_id !== void 0;
|
|
575
|
+
if (!stateful && !legacyContinuation && usesGpt62DeveloperPrefix(agentConfig)) {
|
|
576
|
+
if (compiled.stablePrefixContent) {
|
|
577
|
+
input.unshift({
|
|
578
|
+
type: "message",
|
|
579
|
+
role: "developer",
|
|
580
|
+
content: [{ type: "input_text", text: compiled.stablePrefixContent }]
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
if (compiled.dynamicContent) body.instructions = compiled.dynamicContent;
|
|
584
|
+
} else {
|
|
585
|
+
body.instructions = compiled.content;
|
|
586
|
+
}
|
|
614
587
|
}
|
|
615
588
|
if (agentConfig.temperature !== void 0) {
|
|
616
589
|
body.temperature = agentConfig.temperature;
|
|
@@ -1234,6 +1207,7 @@ function sanitizeOutboundBody(body) {
|
|
|
1234
1207
|
|
|
1235
1208
|
// packages/ai/tools/stripModelConfirmationFlags.ts
|
|
1236
1209
|
var CONFIRMATION_INPUT_KEYS = {
|
|
1210
|
+
knowledge_capture_requires_confirmation: "__confirmedKnowledgeCapture",
|
|
1237
1211
|
self_evolution_requires_confirmation: "__confirmedSelfEvolution",
|
|
1238
1212
|
agent_update_requires_confirmation: "__confirmedSelfEvolution",
|
|
1239
1213
|
media_job_start_requires_confirmation: "__confirmedMediaJobStart"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ALWAYS_EXCLUDED_GLOBS,
|
|
2
3
|
buildExecutionTicket
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ANUP75N2.js";
|
|
4
5
|
|
|
5
6
|
// packages/agent-runtime/docker/executionTicket.ts
|
|
6
7
|
function buildPrimaryExecutionTicket(runGrant, executionClass = "session") {
|
|
@@ -35,6 +36,126 @@ 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
|
+
"Bearer ",
|
|
90
|
+
"bearer ",
|
|
91
|
+
"PASSWORD",
|
|
92
|
+
"password",
|
|
93
|
+
"PASSWD",
|
|
94
|
+
"SECRET_KEY"
|
|
95
|
+
];
|
|
96
|
+
var UNPREFIXED_PROBE_REGEX = /\\b[0-9a-fA-F]{32}\\.[A-Za-z0-9]{16}\\b/;
|
|
97
|
+
function hasPotentialSecrets(text) {
|
|
98
|
+
if (typeof text !== "string" || text.length === 0)
|
|
99
|
+
return false;
|
|
100
|
+
if (QUICK_PROBE_SUBSTRINGS.some((probe) => text.includes(probe)))
|
|
101
|
+
return true;
|
|
102
|
+
return UNPREFIXED_PROBE_REGEX.test(text);
|
|
103
|
+
}
|
|
104
|
+
function scrubSecrets(text) {
|
|
105
|
+
if (typeof text !== "string" || text.length === 0) {
|
|
106
|
+
return { cleaned: text, redactedCount: 0, matchedKinds: [] };
|
|
107
|
+
}
|
|
108
|
+
if (!hasPotentialSecrets(text)) {
|
|
109
|
+
return { cleaned: text, redactedCount: 0, matchedKinds: [] };
|
|
110
|
+
}
|
|
111
|
+
let cleaned = text;
|
|
112
|
+
let redactedCount = 0;
|
|
113
|
+
const matchedKinds = [];
|
|
114
|
+
for (const pattern of SECRET_PATTERNS) {
|
|
115
|
+
pattern.regex.lastIndex = 0;
|
|
116
|
+
const matches = cleaned.match(pattern.regex);
|
|
117
|
+
if (matches && matches.length > 0) {
|
|
118
|
+
redactedCount += matches.length;
|
|
119
|
+
if (!matchedKinds.includes(pattern.kind)) {
|
|
120
|
+
matchedKinds.push(pattern.kind);
|
|
121
|
+
}
|
|
122
|
+
cleaned = cleaned.replace(pattern.regex, pattern.placeholder);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return { cleaned, redactedCount, matchedKinds };
|
|
126
|
+
}
|
|
127
|
+
function scrubObjectSecrets(val) {
|
|
128
|
+
if (val === null || val === undefined)
|
|
129
|
+
return val;
|
|
130
|
+
if (typeof val === "string") {
|
|
131
|
+
return scrubSecrets(val).cleaned;
|
|
132
|
+
}
|
|
133
|
+
if (Array.isArray(val)) {
|
|
134
|
+
return val.map((item) => scrubObjectSecrets(item));
|
|
135
|
+
}
|
|
136
|
+
if (typeof val === "object") {
|
|
137
|
+
if (val instanceof Date || val instanceof RegExp)
|
|
138
|
+
return val;
|
|
139
|
+
const result = {};
|
|
140
|
+
for (const [k, v] of Object.entries(val)) {
|
|
141
|
+
result[k] = scrubObjectSecrets(v);
|
|
142
|
+
}
|
|
143
|
+
return result;
|
|
144
|
+
}
|
|
145
|
+
return val;
|
|
146
|
+
}
|
|
147
|
+
export {
|
|
148
|
+
SECRET_PATTERNS,
|
|
149
|
+
hasPotentialSecrets,
|
|
150
|
+
scrubObjectSecrets,
|
|
151
|
+
scrubSecrets
|
|
152
|
+
};
|
|
153
|
+
`;
|
|
154
|
+
|
|
155
|
+
// packages/agent-runtime/docker/sandboxWorkspaceHelper.ts
|
|
156
|
+
function toJavascriptDataUrl(jsSource) {
|
|
157
|
+
return "data:text/javascript;base64," + Buffer.from(jsSource, "utf8").toString("base64");
|
|
158
|
+
}
|
|
38
159
|
var SANDBOX_WORKSPACE_ROOT = "/home/bun/app";
|
|
39
160
|
var SANDBOX_HELPER_PATH = "/tmp/nolo-tools/workspace-tool.mjs";
|
|
40
161
|
function posixQuote(value) {
|
|
@@ -98,6 +219,9 @@ function buildWorkspaceHelperSource() {
|
|
|
98
219
|
import path from "node:path";
|
|
99
220
|
|
|
100
221
|
const ROOT = "${SANDBOX_WORKSPACE_ROOT}";
|
|
222
|
+
const SEARCH_EXCLUDES = ${JSON.stringify(ALWAYS_EXCLUDED_GLOBS)};
|
|
223
|
+
const SEARCH_KERNEL_URL = ${JSON.stringify(toJavascriptDataUrl(SANDBOX_SEARCH_KERNEL_JS))};
|
|
224
|
+
const SCRUBBER_URL = ${JSON.stringify(toJavascriptDataUrl(SANDBOX_SCRUBBER_JS))};
|
|
101
225
|
const MAX_SERIALIZED_CHARS = ${SANDBOX_OUTPUT_LIMITS.maxSerializedChars};
|
|
102
226
|
const READ_HEAD_CHARS = ${SANDBOX_OUTPUT_LIMITS.readHeadChars};
|
|
103
227
|
const READ_TAIL_CHARS = ${SANDBOX_OUTPUT_LIMITS.readTailChars};
|
|
@@ -325,6 +449,31 @@ async function main() {
|
|
|
325
449
|
return emitValue(withMarker(capped.items, capped.omitted));
|
|
326
450
|
}
|
|
327
451
|
|
|
452
|
+
case "searchFiles": {
|
|
453
|
+
const p = resolvePath(args.path || ROOT);
|
|
454
|
+
if (!p.ok) return console.log(JSON.stringify({ ok: false, error: p.error }));
|
|
455
|
+
const { searchFileTextMatches } = await import(SEARCH_KERNEL_URL);
|
|
456
|
+
const { scrubSecrets } = await import(SCRUBBER_URL);
|
|
457
|
+
const query = args.query === undefined ? args.pattern : args.query;
|
|
458
|
+
if (typeof query !== "string" || !query.length) throw new Error("missing_query");
|
|
459
|
+
const result = await searchFileTextMatches({ root: ROOT, target: p.path, query,
|
|
460
|
+
regex: args.regex === true, caseSensitive: args.caseSensitive !== false,
|
|
461
|
+
include: typeof args.include === "string" ? args.include : undefined,
|
|
462
|
+
exclude: [...SEARCH_EXCLUDES, ...(Array.isArray(args.exclude) ? args.exclude.filter((x) => typeof x === "string") : [])],
|
|
463
|
+
contextLines: Number.isInteger(args.contextLines) && args.contextLines >= 0 && args.contextLines <= 5 ? args.contextLines : 0,
|
|
464
|
+
maxResults: Number.isInteger(args.maxResults) && args.maxResults >= 1 && args.maxResults <= 1000 ? args.maxResults : 100,
|
|
465
|
+
includeIgnored: args.includeIgnored === true });
|
|
466
|
+
const lines = result.matches.flatMap((m) => [
|
|
467
|
+
...m.before.map((text, i) => m.path + ":" + (m.line - m.before.length + i) + "-" + text),
|
|
468
|
+
m.path + ":" + m.line + ":" + m.text,
|
|
469
|
+
...m.after.map((text, i) => m.path + ":" + (m.line + i + 1) + "-" + text),
|
|
470
|
+
]);
|
|
471
|
+
const raw = scrubSecrets(lines.join(NL)).cleaned;
|
|
472
|
+
const content = raw.slice(0, ARRAY_CHAR_BUDGET);
|
|
473
|
+
return emitValue({ content, metadata: { searchEngine: result.engine, count: lines.length,
|
|
474
|
+
totalMatches: result.totalMatches, matchCount: result.totalMatches,
|
|
475
|
+
truncated: result.truncated || content.length !== raw.length, limitedByMaxResults: result.truncated } });
|
|
476
|
+
}
|
|
328
477
|
case "mkdir": {
|
|
329
478
|
const p = resolvePath(args.path);
|
|
330
479
|
if (!p.ok) return console.log(JSON.stringify({ ok: false, error: p.error }));
|
|
@@ -414,6 +563,32 @@ function buildToolInvocation(toolName, args) {
|
|
|
414
563
|
}
|
|
415
564
|
break;
|
|
416
565
|
}
|
|
566
|
+
case "searchFiles": {
|
|
567
|
+
const query = args.query === void 0 ? args.pattern : args.query;
|
|
568
|
+
if (typeof query !== "string" || !query.length) return { ok: false, error: "missing_query" };
|
|
569
|
+
const res = resolveSandboxPath(typeof args.path === "string" ? args.path : ".");
|
|
570
|
+
if (!res.ok) return { ok: false, error: res.error };
|
|
571
|
+
for (const key of ["regex", "caseSensitive", "includeIgnored"]) {
|
|
572
|
+
if (args[key] !== void 0 && typeof args[key] !== "boolean") return { ok: false, error: "invalid_" + key };
|
|
573
|
+
}
|
|
574
|
+
if (args.path !== void 0 && typeof args.path !== "string") return { ok: false, error: "invalid_path" };
|
|
575
|
+
if (args.include !== void 0 && typeof args.include !== "string") return { ok: false, error: "invalid_include" };
|
|
576
|
+
if (args.exclude !== void 0 && (!Array.isArray(args.exclude) || !args.exclude.every((x) => typeof x === "string"))) return { ok: false, error: "invalid_exclude" };
|
|
577
|
+
for (const [key, min, max] of [["contextLines", 0, 5], ["maxResults", 1, 1e3]]) {
|
|
578
|
+
if (args[key] !== void 0 && (!Number.isInteger(args[key]) || Number(args[key]) < min || Number(args[key]) > max)) return { ok: false, error: "invalid_" + key };
|
|
579
|
+
}
|
|
580
|
+
op = "searchFiles";
|
|
581
|
+
validatedArgs.path = res.path;
|
|
582
|
+
validatedArgs.query = query;
|
|
583
|
+
validatedArgs.regex = args.regex === true;
|
|
584
|
+
validatedArgs.caseSensitive = args.caseSensitive !== false;
|
|
585
|
+
validatedArgs.include = args.include;
|
|
586
|
+
validatedArgs.exclude = args.exclude;
|
|
587
|
+
validatedArgs.contextLines = args.contextLines;
|
|
588
|
+
validatedArgs.maxResults = args.maxResults ?? 100;
|
|
589
|
+
validatedArgs.includeIgnored = args.includeIgnored === true;
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
417
592
|
case "grep":
|
|
418
593
|
case "grepFiles": {
|
|
419
594
|
if (typeof args.pattern !== "string" || !args.pattern.trim()) {
|
|
@@ -510,6 +685,7 @@ var dockerExecutionToolNames = [
|
|
|
510
685
|
"writeFile",
|
|
511
686
|
"editFile",
|
|
512
687
|
"globFiles",
|
|
688
|
+
"searchFiles",
|
|
513
689
|
"grepFiles"
|
|
514
690
|
];
|
|
515
691
|
var deny = (error) => JSON.stringify({ ok: false, error, workloadLocation: "docker" });
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
6
6
|
isAntigravityCloudCodeBaseUrl,
|
|
7
7
|
isAntigravityOAuthAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CTWCZKNS.js";
|
|
9
9
|
import {
|
|
10
10
|
isOpenAiResponsesModel,
|
|
11
11
|
resolvePlatformChatCompletionsEndpoint,
|
|
12
12
|
resolvePlatformResponsesEndpoint
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ESN4WNWU.js";
|
|
14
14
|
import {
|
|
15
15
|
findModelConfig
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CD2DK5JA.js";
|
|
17
17
|
import {
|
|
18
18
|
asOptionalTrimmedString
|
|
19
19
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-X4O7FJF5.js";
|
|
11
11
|
import {
|
|
12
12
|
getModelContextWindow
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MAA42MMV.js";
|
|
14
14
|
import {
|
|
15
15
|
isRecord
|
|
16
16
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
asOptionalTrimmedString
|
|
19
19
|
} from "./chunk-G3SUCT4W.js";
|
|
20
20
|
import {
|
|
21
|
-
PLATFORM_HOSTED_KIMI_K3_MODEL,
|
|
22
21
|
isFireworksKimiModel,
|
|
23
|
-
isNoloHostedProvider
|
|
24
|
-
|
|
22
|
+
isNoloHostedProvider,
|
|
23
|
+
resolvePlatformEffectiveModel
|
|
24
|
+
} from "./chunk-PQ63BDV3.js";
|
|
25
25
|
import {
|
|
26
26
|
asTrimmedLowercaseString
|
|
27
27
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -1165,12 +1165,19 @@ function stablePromptCacheKey(parts, namespace) {
|
|
|
1165
1165
|
|
|
1166
1166
|
// packages/integrations/openai/providerBodyCompatibility.ts
|
|
1167
1167
|
var MOONSHOT_KIMI_K3_MODEL = "kimi-k3";
|
|
1168
|
+
var MOONSHOT_KIMI_K31_PRO_MODEL = "kimi-k3.1-pro";
|
|
1168
1169
|
var isKimiK3ProviderModel = (provider, model) => {
|
|
1169
1170
|
const normalizedModel = asTrimmedLowercaseString(model);
|
|
1171
|
+
const isFamilyId = (id) => id === MOONSHOT_KIMI_K3_MODEL || id === MOONSHOT_KIMI_K31_PRO_MODEL;
|
|
1170
1172
|
if (asTrimmedLowercaseString(provider) === "moonshot") {
|
|
1171
|
-
return normalizedModel
|
|
1173
|
+
return isFamilyId(normalizedModel);
|
|
1172
1174
|
}
|
|
1173
|
-
|
|
1175
|
+
if (!isNoloHostedProvider(provider)) return false;
|
|
1176
|
+
if (isFamilyId(normalizedModel)) return true;
|
|
1177
|
+
const effectiveModel = asTrimmedLowercaseString(
|
|
1178
|
+
resolvePlatformEffectiveModel(model) ?? model
|
|
1179
|
+
);
|
|
1180
|
+
return isFamilyId(effectiveModel);
|
|
1174
1181
|
};
|
|
1175
1182
|
var isOllamaProviderOrEndpoint = (provider, endpoint) => {
|
|
1176
1183
|
const p = asTrimmedLowercaseString(provider);
|