nolo-cli 0.149.0-alpha.1 → 0.151.0-alpha.2
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/{_executeModel-OW3H7ICR.js → _executeModel-XHAFJ2MM.js} +134 -91
- package/accountResolver-7RYB4D2P.js +300 -0
- package/action-SXJD5N5R.js +23 -0
- package/{addContentAction-B2DRF7P6.js → addContentAction-ZV774PHH.js} +20 -14
- package/{addDialogAgentAction-2P2FLTLD.js → addDialogAgentAction-A6SMKAGH.js} +26 -22
- package/{agentDeleteCommand-7IDWF6E3.js → agentDeleteCommand-DPUUS56Z.js} +181 -93
- package/{agentEmailCommands-A6XBQZBN.js → agentEmailCommands-V4P5EFLP.js} +132 -112
- package/{agentGrantCommands-M3XFO6EN.js → agentGrantCommands-HOJ3JBBQ.js} +3 -3
- package/agentListCommands-TWFLUYIZ.js +802 -0
- package/{agentMachineCommands-DQPUIMAC.js → agentMachineCommands-MELPAZZI.js} +58 -62
- package/{agentProviderCommands-YK2BIIXZ.js → agentProviderCommands-HL6MBLCL.js} +149 -2
- package/{agentPullCommand-HF4A42D4.js → agentPullCommand-FA43RBRU.js} +7 -7
- package/agentRecordCommands-FSWSSQIO.js +154 -0
- package/agentRunCommand-GDBJVOAT.js +183 -0
- package/{agentRunControl-2SKCR4SB.js → agentRunControl-IFM7IGMG.js} +10 -2
- package/{agentRuntimeLocal-AK2QVJHY.js → agentRuntimeLocal-KKSQJMTE.js} +47 -50
- package/{agentSlice-O4RUQUMT.js → agentSlice-YO2ZLJMD.js} +23 -16
- package/{appDeleteCommands-N3XEVVYC.js → appDeleteCommands-4PL4KYRN.js} +58 -59
- package/{appDeployCommands-AWFIXYVW.js → appDeployCommands-EEEXCEB6.js} +67 -63
- package/{appDeployStatusCommands-CZRON2FO.js → appDeployStatusCommands-35ZX7T66.js} +56 -56
- package/{appGetCommands-XQIUY4TD.js → appGetCommands-WFCHXJWF.js} +56 -56
- package/{appListCommands-NNG4H36Y.js → appListCommands-XY2U6DPF.js} +57 -59
- package/{authCommand-UBJ4EWYZ.js → authCommand-QYN47CQD.js} +371 -68
- package/{authCommands-H6WKKCRW.js → authCommands-77CHYBGF.js} +12 -9
- package/{builtinSkillRegistry-ZMF6YGNO.js → builtinSkillRegistry-TDQ6JB2E.js} +13 -11
- package/{chromeCommands-2N6MEWRU.js → chromeCommands-OBBNJCLS.js} +314 -13
- package/chromeOpsCommands-3Z34RKSE.js +472 -0
- package/{chunk-ALXHV7NK.js → chunk-2GGXHQIW.js} +43 -4
- package/{localRuntimeAuthority-5W6IJRAD.js → chunk-2IXDJNZI.js} +154 -75
- package/{chunk-IVZJWTDI.js → chunk-36OMEXXR.js} +89 -21
- package/{chunk-H6A6X4EK.js → chunk-3MZAGMYY.js} +16 -0
- package/chunk-3PVYUPXK.js +40 -0
- package/chunk-3SZA4U64.js +1192 -0
- package/{chunk-GNMAFAIS.js → chunk-44WXLHFI.js} +1 -1
- package/{chunk-AGGIDPCZ.js → chunk-4JH2UMJR.js} +6 -0
- package/chunk-4LCOCOR5.js +50 -0
- package/chunk-4YRTZIVN.js +871 -0
- package/chunk-556RW72X.js +14110 -0
- package/{chunk-N7J63Q6C.js → chunk-56GBUMO5.js} +10 -1
- package/{chunk-W7XHHYWM.js → chunk-5BHQICF2.js} +5 -1
- package/{chunk-XUWRURDF.js → chunk-5EBLANFT.js} +1 -1
- package/{chunk-3AH7LNUB.js → chunk-5EMSBTQ6.js} +33 -14
- package/{chunk-YRRASA5Q.js → chunk-5MM7NNO6.js} +113 -52
- package/chunk-5MMAK75Q.js +15 -0
- package/{chunk-M5PVFLD4.js → chunk-64K7WX26.js} +90 -21
- package/{chunk-AKG5W4LG.js → chunk-6CCFTVBP.js} +76 -221
- package/chunk-6MJNEXUU.js +614 -0
- package/{chunk-62IL3KQV.js → chunk-6MXDOUMH.js} +15 -3
- package/{chunk-QOKAKDPE.js → chunk-6Q7UTJKR.js} +6 -94
- package/chunk-6QDYSCPW.js +223 -0
- package/{chunk-HYZIYH2H.js → chunk-74RAWNQN.js} +56 -63
- package/chunk-7DPNBQSV.js +9 -0
- package/chunk-7MOXKPHC.js +119 -0
- package/{chunk-ZUEK6A6C.js → chunk-7XKL25PW.js} +1973 -754
- package/{chunk-IAESIMK7.js → chunk-A4MW3YZL.js} +10 -14
- package/chunk-AGIM7IMJ.js +147 -0
- package/{chunk-7CHC4W22.js → chunk-AIZE5TDM.js} +3 -3
- package/{chunk-YAQJJDC2.js → chunk-AOCM7HPT.js} +214 -51
- package/{chunk-5GVBDNTO.js → chunk-AU7AXHUL.js} +1 -1
- package/{chunk-4H22P2JV.js → chunk-AUIJZACN.js} +2073 -1275
- package/{chunk-CIF4X6ZM.js → chunk-AWVFQMOV.js} +25 -3
- package/{chunk-RYZINGPM.js → chunk-BPMPOFWP.js} +347 -235
- package/{chunk-YUNJN43V.js → chunk-BU2YQBV4.js} +215 -28
- package/{chunk-XPRWFQQK.js → chunk-CBHGZRCE.js} +38 -12
- package/{chunk-Y3PMXGLH.js → chunk-CHCS6XPJ.js} +365 -144
- package/chunk-CHOZJMJS.js +78 -0
- package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
- package/{chunk-3SV7RM24.js → chunk-D2QN6CTI.js} +117 -72
- package/{chunk-5TEEECZM.js → chunk-E2AKSW7L.js} +10 -7
- package/{chunk-RSEEDUMS.js → chunk-EDX5XSJM.js} +2 -2
- package/{chunk-ATLTFRYJ.js → chunk-ES633ZS5.js} +280 -98
- package/{chunk-QDSINZM3.js → chunk-EUGTFFO6.js} +2 -23
- package/{chunk-UNYJU5L6.js → chunk-EYLGAEB4.js} +5 -1
- package/{chunk-CU3QB4HW.js → chunk-EYWJT7A2.js} +12 -12
- package/{chunk-BNGW5ASC.js → chunk-EZVK3N5L.js} +66 -18
- package/{chunk-6FGTMQCL.js → chunk-F32Z66T4.js} +6 -10
- package/chunk-FJMRBOPO.js +11507 -0
- package/{chunk-ZOVKKMF6.js → chunk-FY4SDK2E.js} +1 -1
- package/chunk-G6OOUQWJ.js +417 -0
- package/{chunk-PQWU42UQ.js → chunk-GCKHQECX.js} +6 -6
- package/chunk-GKXCHNTE.js +15 -0
- package/{chunk-TXH4IWJL.js → chunk-GQN2WLAI.js} +20 -11
- package/{chunk-P6GMCCAT.js → chunk-GQV5KHJU.js} +78 -12
- package/{chunk-B2XUQXQX.js → chunk-HIQ4GF53.js} +191 -68
- package/{chunk-MST6R3E4.js → chunk-HKX3ULQB.js} +34 -22
- package/{chunk-GMZLP5DV.js → chunk-HNUWUO75.js} +30 -19
- package/{chunk-5UTFL4QJ.js → chunk-I2ZMGXXF.js} +10 -5
- package/chunk-I42VC5KR.js +15 -0
- package/{chunk-3BXNTXYI.js → chunk-I4SN4NUQ.js} +1199 -56
- package/chunk-IA7TRNNR.js +11 -0
- package/{chunk-WIWM4FE3.js → chunk-IJERIUXS.js} +55 -748
- package/{chunk-CPUFH46E.js → chunk-ILU2NPWY.js} +10 -10
- package/{chunk-SLLGJZDT.js → chunk-ISQL4V7C.js} +4 -4
- package/chunk-IT3ZZRJE.js +12 -0
- package/{chunk-TZZ2WRBL.js → chunk-IZ7OJB6K.js} +20 -16
- package/{chunk-DY7ANLKG.js → chunk-JKMLSTZK.js} +43 -12
- package/{chunk-6TPOEJMQ.js → chunk-JZX2XLKC.js} +64 -23
- package/{chunk-27ONFIEY.js → chunk-K2AER7RX.js} +19 -12
- package/{chunk-O2OWEFII.js → chunk-KFHQQ3NO.js} +1 -1
- package/{chunk-QXGPFY6J.js → chunk-LGN377P3.js} +27 -17
- package/{chunk-L36OWPP3.js → chunk-LIQJTQRN.js} +118 -139
- package/{chunk-UASIEDKM.js → chunk-LTRUTOHX.js} +36 -31
- package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
- package/{chunk-5J3PYNUP.js → chunk-NYYFIKHI.js} +17 -3
- package/{chunk-6O4IK4V2.js → chunk-OFFL4DCR.js} +1 -1
- package/{chunk-B6SAMB33.js → chunk-OWYYDMGJ.js} +209 -9
- package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
- package/{chunk-CTUQJVQM.js → chunk-P5QACQDK.js} +1 -1
- package/{chunk-DXHL7G2L.js → chunk-PCKVQXYV.js} +274 -93
- package/{chunk-4JMDLJAD.js → chunk-PJNFNEJE.js} +114 -37
- package/{chunk-Z4CSIXYP.js → chunk-PLSVXHSA.js} +3 -3
- package/{chunk-BIDGLJQ3.js → chunk-PLXDDGBK.js} +45 -8
- package/chunk-PWTNI4N7.js +47 -0
- package/chunk-QFEW2ULV.js +42 -0
- package/{chunk-RGNEEJ3Y.js → chunk-QLQ573SU.js} +35 -9
- package/chunk-QQ56R7KS.js +88 -0
- package/chunk-QYPE3TS3.js +43 -0
- package/{chunk-4DPP773Q.js → chunk-RSHPU4PD.js} +59 -11
- package/chunk-RVWMAFIT.js +134 -0
- package/{chunk-ESHYE7WU.js → chunk-S73EPYNC.js} +10 -7
- package/{chunk-UQNS32WZ.js → chunk-SCMHQUMK.js} +1 -1
- package/{chunk-HTVYCXBP.js → chunk-SMENBO3M.js} +354 -120
- package/{chunk-OMRJYNCI.js → chunk-SSFDFOVT.js} +26 -31
- package/chunk-SW4S4XYB.js +1794 -0
- package/{chunk-TB3MIBRC.js → chunk-T6X3D7NB.js} +572 -430
- package/chunk-TY3TIUJK.js +89 -0
- package/{chunk-X2QRZXZH.js → chunk-TYJ5XFEA.js} +4 -4
- package/{chunk-ALFH24P3.js → chunk-TYYRSFBG.js} +197 -155
- package/{chunk-7KVZ5LDQ.js → chunk-UBUH2TCC.js} +18 -4
- package/chunk-UEILX4EV.js +15 -0
- package/chunk-UHTDNB5Y.js +140 -0
- package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
- package/{chunk-OHOVNO7I.js → chunk-UOKFKFPO.js} +6 -3
- package/{chunk-XISEYOGH.js → chunk-USHQX6VT.js} +5 -5
- package/chunk-UUPR3TD7.js +53 -0
- package/{chunk-HDLLCBRF.js → chunk-VEA7H5FG.js} +2 -2
- package/chunk-VHGD6FHV.js +116 -0
- package/chunk-VIWDGTDA.js +8 -0
- package/{chunk-GOH6RW6F.js → chunk-VJXHL6MH.js} +34 -11
- package/{chunk-4XEYAFLY.js → chunk-VL5KOY2C.js} +623 -94
- package/{chunk-EADNWBAZ.js → chunk-VP3BINY7.js} +13 -0
- package/{chunk-EOARMOVD.js → chunk-W4S6OTSC.js} +6 -3
- package/chunk-WD4XYDYC.js +567 -0
- package/chunk-WJZOQR2J.js +151 -0
- package/{chunk-AUDNYVRC.js → chunk-XETG4RIX.js} +5 -5
- package/{chunk-MX574M24.js → chunk-XI7DGLUK.js} +4 -4
- package/{chunk-3L2WKC3W.js → chunk-XPWGOTBQ.js} +8 -1
- package/chunk-XRUSXPCQ.js +514 -0
- package/{chunk-I4OPU5TK.js → chunk-XS47QOFV.js} +273 -11
- package/{chunk-S5XGT6GB.js → chunk-XZNCX52W.js} +30 -9
- package/{chunk-ID7LNBWR.js → chunk-Y2DXOPSO.js} +1920 -644
- package/{chunk-5OA5HMTL.js → chunk-YLMMECCH.js} +1 -1
- package/{chunk-CFT5HBGW.js → chunk-YVLQXTUB.js} +448 -12
- package/chunk-YVPQATSC.js +709 -0
- package/{chunk-3DAVPNFT.js → chunk-Z7OJUX6S.js} +122 -107
- package/chunk-ZEZC7IIM.js +126 -0
- package/{chunk-ALGORS6Y.js → chunk-ZF6526IQ.js} +43 -8
- package/chunk-ZIWPQEFU.js +165 -0
- package/chunk-ZKZ5X2HS.js +7012 -0
- package/chunk-ZRAU6T47.js +56 -0
- package/{cliExecutor-AWYR3T33.js → cliExecutor-BWBF2MTI.js} +4 -3
- package/{clipboardy-BX4NMYHE.js → clipboardy-GCO3GT3I.js} +3 -8
- package/{commandRegistry-2KBOXZQC.js → commandRegistry-XN7C5GHO.js} +183 -107
- package/contentThunks-5L7YQI3S.js +84 -0
- package/{cooldownCommands-ZLEPIB4A.js → cooldownCommands-JFKTYS2D.js} +2 -2
- package/{createAgentAutomationAction-5UGTB26P.js → createAgentAutomationAction-QOPOLCRK.js} +53 -44
- package/createDialogAction-MZ66VY5Q.js +76 -0
- package/{createPageAction-CDLDKPRM.js → createPageAction-VQDJIXMY.js} +65 -54
- package/cursorProvider-YGGNMVWX.js +6123 -0
- package/{db-VQSAOWAO.js → db-2QOTXYGH.js} +11 -5
- package/{dbSlice-DQ32LYTJ.js → dbSlice-J37OGIXH.js} +19 -13
- package/{deleteFile-NX6QHCWZ.js → deleteFile-6JWDDRVP.js} +10 -6
- package/dialogCommands-YZLSJB6X.js +113 -0
- package/{dialogSlice-N3YB65G5.js → dialogSlice-6RODVYCK.js} +53 -39
- package/{docCreateCommands-ZSLGVBZT.js → docCreateCommands-JB2RRMRJ.js} +54 -57
- package/{docDeleteCommands-5N4GVZBG.js → docDeleteCommands-AQENULNM.js} +56 -58
- package/{docReadCommands-YJSAA7AV.js → docReadCommands-DYD25YLQ.js} +53 -56
- package/{docStore-E3CEOV5Q.js → docStore-ZZA3OPM5.js} +25 -16
- package/{docUpdateCommands-WEMLSW6W.js → docUpdateCommands-3GVS23QL.js} +54 -57
- package/{fetchMessages-67MEFPZR.js → fetchMessages-IIJWQ3HR.js} +5 -4
- package/{getPricing-NMMFT3YI.js → getPricing-FKK3F5EJ.js} +11 -9
- package/{handleSendMessageAction-DQAD5ERJ.js → handleSendMessageAction-DVG5U26T.js} +422 -118
- package/index.js +11 -7
- package/{lib-FRRS27KN.js → lib-4YTWAGY7.js} +581 -248
- package/{localDialogRead-EBRS242U.js → localDialogRead-FSOMOPDZ.js} +2 -2
- package/localRuntimeAdapter-HXRHFKRC.js +244 -0
- package/localRuntimeAuthority-JDAD7CB6.js +16 -0
- package/{localRuntimeDb-3LRMNLCM.js → localRuntimeDb-CVC62PM5.js} +1 -1
- package/{machineCommands-HAP75VSG.js → machineCommands-5KBF4RCC.js} +503 -161
- package/{machineInfo-66ZFUMLE.js → machineInfo-UKPTZO5Y.js} +2 -2
- package/machineWsRunDispatch-4OQDEDOR.js +169 -0
- package/{memberThunks-5ZXPR63F.js → memberThunks-66DH6ABQ.js} +25 -18
- package/{models-ZPU5EDF4.js → models-LAS4B2B5.js} +2 -2
- package/package.json +1 -1
- package/{providerPresetApply-DD6NGWW6.js → providerPresetApply-MY66I6NT.js} +10 -10
- package/{providerRegistry-XDRLMYGJ.js → providerRegistry-QOE2FT57.js} +13 -9
- package/{read-EPTJRAEF.js → read-DC4NUGN6.js} +12 -8
- package/{readDocTool-W4NDXNEX.js → readDocTool-NCJ5NT25.js} +1 -1
- package/{readlineWorkspace-7BC66QSX.js → readlineWorkspace-RIE62QVZ.js} +5022 -921
- package/{removeDialogAgentAction-OSYNZRX7.js → removeDialogAgentAction-E2H3OZU6.js} +29 -28
- package/{runAgentClientLoop-6E6UC3CE.js → runAgentClientLoop-KLUUXBZS.js} +154 -97
- package/{runtimeDoctorCommands-ID23PNNZ.js → runtimeDoctorCommands-GIOGC5SC.js} +17 -17
- package/secretCommands-ZXZRLR3R.js +700 -0
- package/setDialogExtraReferencesAction-SITRPMYU.js +37 -0
- package/{setPrimaryDialogAgentAction-WZ7KI3YA.js → setPrimaryDialogAgentAction-U7N45TGC.js} +30 -29
- package/{chunk-SONWNI3L.js → settingThunks-Y7SVJOMZ.js} +223 -928
- package/{skillDiscovery-ZBU76COE.js → skillDiscovery-QC35EQY4.js} +2 -2
- package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
- package/{spaceCommands-UJOVU4XI.js → spaceCommands-ZR5BR3GX.js} +59 -59
- package/{streamAgentChatTurn-3UXPYFNX.js → streamAgentChatTurn-MN2SSPGA.js} +309 -165
- package/{switchDialogAgentAction-GMR7WN3P.js → switchDialogAgentAction-OMGBD3N2.js} +26 -22
- package/{tableCommands-G7RV3RU3.js → tableCommands-U3QDY4L6.js} +19 -17
- package/{toolApiClient-CVGWM4PN.js → toolApiClient-7WSJJJBV.js} +6 -5
- package/tools-W2MOLERY.js +124 -0
- package/tuiSummaryLlmCaller-BM3VSTBU.js +130 -0
- package/{updateCommands-4EHDLF5J.js → updateCommands-NQXAGFM7.js} +3 -3
- package/{updateDialogTitleAction-UPFV7TDT.js → updateDialogTitleAction-Z4JX6REN.js} +102 -57
- package/workloadLifecycle-36DXRZKU.js +320 -0
- package/action-GI44T4DR.js +0 -31
- package/agentListCommands-IW3GQVUP.js +0 -427
- package/agentRecordCommands-VCA76W6B.js +0 -134
- package/agentRunCommand-YNLDKVR7.js +0 -161
- package/browser-image-compression-MFDTD7K6.js +0 -1763
- package/chatQueueReduxAdapter-TJRMXMYA.js +0 -186
- package/chromeOpsCommands-IXRLN57H.js +0 -289
- package/chunk-36KZDDO5.js +0 -2415
- package/chunk-ACQD6YI2.js +0 -25363
- package/chunk-CQ3WA2NE.js +0 -299
- package/chunk-CYSYR67N.js +0 -93
- package/chunk-JBTJAPUF.js +0 -35
- package/chunk-K2CSUCHJ.js +0 -620
- package/chunk-LTRXGFMS.js +0 -83
- package/chunk-M76ECQRD.js +0 -13658
- package/chunk-MEYIRKDN.js +0 -8967
- package/chunk-OCZKATRC.js +0 -129
- package/chunk-OTGFTBLI.js +0 -13
- package/chunk-PUOC4YRO.js +0 -394
- package/chunk-PZZTFEKK.js +0 -34
- package/chunk-URMS4XY2.js +0 -10
- package/chunk-UV6VISQJ.js +0 -20
- package/chunk-VJVNU77E.js +0 -83
- package/chunk-XYJSY4KG.js +0 -13807
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YPREESF4.js +0 -225
- package/contentThunks-BDIQRZR6.js +0 -73
- package/createDialogAction-B7VGVEVU.js +0 -66
- package/dialogCommands-G7YBVAMC.js +0 -102
- package/levelLazyShim-GZBKODGI.js +0 -7
- package/machineWsRunDispatch-L32G7C4P.js +0 -149
- package/serverStoreFactory-YMXDF4NI.js +0 -20
- package/setDialogExtraReferencesAction-M32UYNCG.js +0 -30
- package/settingSlice-Q6EKL7EQ.js +0 -204
- package/syncMapping-N6RGXGBW.js +0 -437
- package/tools-MKYDMWA4.js +0 -111
- package/tuiSummaryLlmCaller-3YFNHCTW.js +0 -128
- package/{chunk-SV5IJK6K.js → chunk-NBTY7YJF.js} +3 -3
- package/{chunk-2SYTUTLI.js → chunk-YBNHPX4S.js} +3 -3
- package/{offlineMarxistsAgentCommand-HGXZV4XJ.js → offlineMarxistsAgentCommand-2QTHJCHV.js} +4 -4
|
@@ -7,20 +7,22 @@ import {
|
|
|
7
7
|
scheduleExistingRecordReplication,
|
|
8
8
|
shouldReplaceLocalWithRemoteRecord,
|
|
9
9
|
shouldReplicateLocalRecord
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4YRTZIVN.js";
|
|
11
11
|
import {
|
|
12
12
|
fetchFromClientDb,
|
|
13
13
|
fetchFromServer,
|
|
14
|
-
isAbortError,
|
|
15
14
|
isReadTimeoutError,
|
|
16
15
|
logger
|
|
17
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6Q7UTJKR.js";
|
|
18
17
|
import {
|
|
19
18
|
shouldReplaceWithNextRecord
|
|
20
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-D2MDMY2M.js";
|
|
21
20
|
import {
|
|
22
|
-
|
|
23
|
-
} from "./chunk-
|
|
21
|
+
isAbortError
|
|
22
|
+
} from "./chunk-7DPNBQSV.js";
|
|
23
|
+
import {
|
|
24
|
+
isBuiltinPlatformAgentKey
|
|
25
|
+
} from "./chunk-EZVK3N5L.js";
|
|
24
26
|
import {
|
|
25
27
|
NOLO_CLUSTER_SERVERS,
|
|
26
28
|
normalizeKnownServerOrigin
|
|
@@ -30,20 +32,14 @@ import {
|
|
|
30
32
|
} from "./chunk-CF7PE763.js";
|
|
31
33
|
|
|
32
34
|
// packages/database/actions/agentReadResolution.ts
|
|
33
|
-
var BUILTIN_PLATFORM_AGENT_KEYS2 = [
|
|
34
|
-
...BUILTIN_PLATFORM_AGENT_KEYS
|
|
35
|
-
];
|
|
36
|
-
var BUILTIN_PLATFORM_AGENT_KEY_SET = new Set(
|
|
37
|
-
BUILTIN_PLATFORM_AGENT_KEYS2
|
|
38
|
-
);
|
|
39
35
|
var normalizeServer = (server) => normalizeKnownServerOrigin(server) ?? normalizeServerOrigin(server);
|
|
40
|
-
var
|
|
36
|
+
var isBuiltinPlatformAgentKey2 = (dbKey) => isBuiltinPlatformAgentKey(dbKey);
|
|
41
37
|
var resolveAgentReadServers = ({
|
|
42
38
|
dbKey,
|
|
43
39
|
configuredServers
|
|
44
40
|
}) => {
|
|
45
41
|
const normalized = configuredServers.map(normalizeServer);
|
|
46
|
-
if (!
|
|
42
|
+
if (!isBuiltinPlatformAgentKey2(dbKey)) {
|
|
47
43
|
return Array.from(new Set(normalized));
|
|
48
44
|
}
|
|
49
45
|
return Array.from(/* @__PURE__ */ new Set([...normalized, ...NOLO_CLUSTER_SERVERS]));
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// packages/create/editor/utils/slateUtils.ts
|
|
2
|
+
var slateNodeToString = (node) => {
|
|
3
|
+
if (typeof node?.text === "string") return node.text;
|
|
4
|
+
const children = Array.isArray(node?.children) ? node.children : [];
|
|
5
|
+
return children.map(slateNodeToString).join("");
|
|
6
|
+
};
|
|
7
|
+
var createEmptyParagraph = () => ({
|
|
8
|
+
type: "paragraph",
|
|
9
|
+
children: [{ text: "" }]
|
|
10
|
+
});
|
|
11
|
+
var ensureEditorContent = (slateData) => Array.isArray(slateData) && slateData.length > 0 ? slateData : [createEmptyParagraph()];
|
|
12
|
+
var deepEqual = (a, b) => {
|
|
13
|
+
if (a === b) return true;
|
|
14
|
+
if (a == null || b == null) return false;
|
|
15
|
+
if (typeof a !== "object" || typeof b !== "object") return false;
|
|
16
|
+
const isArrayA = Array.isArray(a);
|
|
17
|
+
const isArrayB = Array.isArray(b);
|
|
18
|
+
if (isArrayA || isArrayB) {
|
|
19
|
+
if (!isArrayA || !isArrayB) return false;
|
|
20
|
+
if (a.length !== b.length) return false;
|
|
21
|
+
for (let i = 0; i < a.length; i++) {
|
|
22
|
+
if (!deepEqual(a[i], b[i])) return false;
|
|
23
|
+
}
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
const keysA = Object.keys(a);
|
|
27
|
+
const keysB = Object.keys(b);
|
|
28
|
+
if (keysA.length !== keysB.length) return false;
|
|
29
|
+
for (const key of keysA) {
|
|
30
|
+
if (!Object.prototype.hasOwnProperty.call(b, key)) return false;
|
|
31
|
+
if (!deepEqual(a[key], b[key])) return false;
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
};
|
|
35
|
+
var compareSlateContent = (newContent, oldContent) => {
|
|
36
|
+
if (newContent === oldContent) return false;
|
|
37
|
+
if (!newContent || !oldContent) return true;
|
|
38
|
+
if (newContent.length !== oldContent.length) return true;
|
|
39
|
+
return !deepEqual(newContent, oldContent);
|
|
40
|
+
};
|
|
41
|
+
var extractTitleFromSlate = (slateData) => {
|
|
42
|
+
if (!Array.isArray(slateData) || slateData.length === 0) return "\u65B0\u9875\u9762";
|
|
43
|
+
const titleNode = slateData.find((node) => node.type === "heading-one");
|
|
44
|
+
if (titleNode) {
|
|
45
|
+
const text = slateNodeToString(titleNode).trim();
|
|
46
|
+
if (text) {
|
|
47
|
+
return text;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
for (const node of slateData) {
|
|
51
|
+
const text = slateNodeToString(node).trim();
|
|
52
|
+
if (text) {
|
|
53
|
+
return text.length > 30 ? `${text.substring(0, 30)}...` : text;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return "\u65B0\u9875\u9762";
|
|
57
|
+
};
|
|
58
|
+
var splitSlateTitleAndBody = (slateData, explicitTitle) => {
|
|
59
|
+
const content = ensureEditorContent(slateData);
|
|
60
|
+
const firstNode = content[0];
|
|
61
|
+
const hasExplicitTitle = explicitTitle !== void 0 && explicitTitle !== null;
|
|
62
|
+
const normalizedExplicitTitle = hasExplicitTitle ? explicitTitle.trim() : null;
|
|
63
|
+
const firstNonEmptyText = content.map((node) => slateNodeToString(node).trim()).find(Boolean);
|
|
64
|
+
if (firstNode?.type === "heading-one") {
|
|
65
|
+
const firstText = slateNodeToString(firstNode).trim();
|
|
66
|
+
const shouldTreatAsTitle = !!firstText && (normalizedExplicitTitle == null || normalizedExplicitTitle === firstText);
|
|
67
|
+
if (shouldTreatAsTitle) {
|
|
68
|
+
const body = content.slice(1);
|
|
69
|
+
return {
|
|
70
|
+
title: firstText,
|
|
71
|
+
body: ensureEditorContent(body)
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
title: normalizedExplicitTitle ?? (firstNonEmptyText || ""),
|
|
77
|
+
body: content
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
var extractMentionsFromSlate = (slateData) => {
|
|
81
|
+
const tools = /* @__PURE__ */ new Set();
|
|
82
|
+
const traverse = (nodes) => {
|
|
83
|
+
for (const node of nodes) {
|
|
84
|
+
if (node.type === "mention" && node.resourceId) {
|
|
85
|
+
if (node.resourceType === "tool") {
|
|
86
|
+
tools.add(node.resourceId);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (node.children && Array.isArray(node.children)) {
|
|
90
|
+
traverse(node.children);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
if (Array.isArray(slateData)) {
|
|
95
|
+
traverse(slateData);
|
|
96
|
+
}
|
|
97
|
+
return Array.from(tools);
|
|
98
|
+
};
|
|
99
|
+
var extractCategorizedMentions = (slateData) => {
|
|
100
|
+
const result = {
|
|
101
|
+
tools: [],
|
|
102
|
+
pages: [],
|
|
103
|
+
agents: [],
|
|
104
|
+
spaces: []
|
|
105
|
+
};
|
|
106
|
+
const traverse = (nodes) => {
|
|
107
|
+
for (const node of nodes) {
|
|
108
|
+
if (node.type === "mention" && node.resourceId && node.resourceType) {
|
|
109
|
+
switch (node.resourceType) {
|
|
110
|
+
case "tool":
|
|
111
|
+
result.tools.push(node.resourceId);
|
|
112
|
+
break;
|
|
113
|
+
case "page":
|
|
114
|
+
result.pages.push(node.resourceId);
|
|
115
|
+
break;
|
|
116
|
+
case "agent":
|
|
117
|
+
result.agents.push(node.resourceId);
|
|
118
|
+
break;
|
|
119
|
+
case "space":
|
|
120
|
+
result.spaces.push(node.resourceId);
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (node.children && Array.isArray(node.children)) {
|
|
125
|
+
traverse(node.children);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
if (Array.isArray(slateData)) {
|
|
130
|
+
traverse(slateData);
|
|
131
|
+
}
|
|
132
|
+
result.tools = [...new Set(result.tools)];
|
|
133
|
+
result.pages = [...new Set(result.pages)];
|
|
134
|
+
result.agents = [...new Set(result.agents)];
|
|
135
|
+
result.spaces = [...new Set(result.spaces)];
|
|
136
|
+
return result;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export {
|
|
140
|
+
createEmptyParagraph,
|
|
141
|
+
ensureEditorContent,
|
|
142
|
+
compareSlateContent,
|
|
143
|
+
extractTitleFromSlate,
|
|
144
|
+
splitSlateTitleAndBody,
|
|
145
|
+
extractMentionsFromSlate,
|
|
146
|
+
extractCategorizedMentions
|
|
147
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getRuntimeServerContext,
|
|
3
3
|
scheduleDeleteReplication
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4YRTZIVN.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchFromClientDb
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6Q7UTJKR.js";
|
|
8
8
|
import {
|
|
9
9
|
selectIdentityToken
|
|
10
10
|
} from "./chunk-SEJ5OS6F.js";
|
|
11
11
|
import {
|
|
12
12
|
buildTombstoneRecord
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-D2MDMY2M.js";
|
|
14
14
|
|
|
15
15
|
// packages/database/fileStorage.ts
|
|
16
16
|
var DB_NAME = "nolo-file-storage";
|
|
@@ -1,82 +1,74 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildResponseGuidelines
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W4S6OTSC.js";
|
|
4
4
|
import {
|
|
5
5
|
getLocalProviderSecret
|
|
6
6
|
} from "./chunk-HS7MLR74.js";
|
|
7
7
|
import {
|
|
8
8
|
performServerProxyFetchWithRetry
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SMENBO3M.js";
|
|
10
10
|
import {
|
|
11
11
|
shouldUseServerProxy
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UKZX3NHN.js";
|
|
13
13
|
import {
|
|
14
14
|
fetchServerSyncedCredential
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IZ7OJB6K.js";
|
|
16
16
|
import {
|
|
17
17
|
buildSkillGuidancePromptBlock
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HIQ4GF53.js";
|
|
19
19
|
import {
|
|
20
20
|
DELETE_SAFETY_RED_LINE,
|
|
21
|
+
PARALLEL_DISPATCH_DEFAULT_RULE,
|
|
22
|
+
PLATFORM_RISK_CONTROL_RULE,
|
|
21
23
|
buildIdentityBlock,
|
|
22
24
|
buildRuntimeGuidanceBlocks,
|
|
23
25
|
compileContextLayers,
|
|
24
26
|
detectDispatchIntentFromMessages,
|
|
25
|
-
normalizeChatCompletionsBodyForProvider,
|
|
26
27
|
resolveToolGuidedSections
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-WD4XYDYC.js";
|
|
28
29
|
import {
|
|
29
30
|
convertMessagesToResponsesInput,
|
|
30
31
|
getUsageRequestOptions,
|
|
32
|
+
normalizeChatCompletionsBodyForProvider,
|
|
31
33
|
preserveAgentStateFields,
|
|
34
|
+
resolveReasoningReplayOptions,
|
|
35
|
+
shouldStripReasoningContentForOutbound,
|
|
32
36
|
stablePromptCacheKey
|
|
33
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-3SZA4U64.js";
|
|
38
|
+
import {
|
|
39
|
+
createFileCredentialBroker
|
|
40
|
+
} from "./chunk-UHTDNB5Y.js";
|
|
41
|
+
import {
|
|
42
|
+
canonicalizeToolNames
|
|
43
|
+
} from "./chunk-5EBLANFT.js";
|
|
34
44
|
import {
|
|
35
45
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
46
|
+
isAntigravityCloudCodeBaseUrl,
|
|
36
47
|
isAntigravityOAuthAgent
|
|
37
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-XZNCX52W.js";
|
|
38
49
|
import {
|
|
39
50
|
buildProviderAuthHeaders
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import {
|
|
42
|
-
createFileCredentialBroker
|
|
43
|
-
} from "./chunk-L36OWPP3.js";
|
|
51
|
+
} from "./chunk-K2AER7RX.js";
|
|
44
52
|
import {
|
|
45
53
|
isOpenAiResponsesModel,
|
|
46
54
|
resolvePlatformChatCompletionsEndpoint,
|
|
47
55
|
resolvePlatformResponsesEndpoint
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import {
|
|
50
|
-
toErrorMessage
|
|
51
|
-
} from "./chunk-HNMXYYJR.js";
|
|
56
|
+
} from "./chunk-UBUH2TCC.js";
|
|
52
57
|
import {
|
|
53
58
|
clampReasoningEffort,
|
|
59
|
+
findModelConfig,
|
|
54
60
|
getModelConfig,
|
|
55
61
|
isModelSupportReasoningEffort
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import {
|
|
58
|
-
MEMORY_USE_GUIDANCE,
|
|
59
|
-
buildUserResponseLanguageContext,
|
|
60
|
-
wrapHistoricalSummaryWithReplayGuard
|
|
61
|
-
} from "./chunk-4VJAC32I.js";
|
|
62
|
-
import {
|
|
63
|
-
canonicalizeToolNames
|
|
64
|
-
} from "./chunk-XUWRURDF.js";
|
|
65
|
-
import {
|
|
66
|
-
isDeepInfraKimiModel,
|
|
67
|
-
isFireworksKimiModel,
|
|
68
|
-
isPlatformMimoProviderModel,
|
|
69
|
-
resolveFireworksKimiModel
|
|
70
|
-
} from "./chunk-Y3PMXGLH.js";
|
|
71
|
-
import {
|
|
72
|
-
asTrimmedLowercaseString
|
|
73
|
-
} from "./chunk-QSJ3HFEF.js";
|
|
62
|
+
} from "./chunk-I4SN4NUQ.js";
|
|
74
63
|
import {
|
|
75
64
|
isRecord
|
|
76
65
|
} from "./chunk-KUG52IAP.js";
|
|
77
66
|
import {
|
|
78
67
|
asTrimmedString
|
|
79
68
|
} from "./chunk-3EUW3WEO.js";
|
|
69
|
+
import {
|
|
70
|
+
toErrorMessage
|
|
71
|
+
} from "./chunk-HNMXYYJR.js";
|
|
80
72
|
import {
|
|
81
73
|
API_ENDPOINTS
|
|
82
74
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -86,6 +78,20 @@ import {
|
|
|
86
78
|
import {
|
|
87
79
|
asOptionalTrimmedString
|
|
88
80
|
} from "./chunk-G3SUCT4W.js";
|
|
81
|
+
import {
|
|
82
|
+
isDeepInfraKimiModel,
|
|
83
|
+
isFireworksKimiModel,
|
|
84
|
+
isPlatformMimoProviderModel,
|
|
85
|
+
resolveFireworksKimiModel
|
|
86
|
+
} from "./chunk-CHCS6XPJ.js";
|
|
87
|
+
import {
|
|
88
|
+
asTrimmedLowercaseString
|
|
89
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
90
|
+
import {
|
|
91
|
+
MEMORY_USE_GUIDANCE,
|
|
92
|
+
buildUserResponseLanguageContext,
|
|
93
|
+
wrapHistoricalSummaryWithReplayGuard
|
|
94
|
+
} from "./chunk-4VJAC32I.js";
|
|
89
95
|
|
|
90
96
|
// packages/agent-runtime/responsesConversationState.ts
|
|
91
97
|
function supportsResponsesConversationState(agent) {
|
|
@@ -135,6 +141,9 @@ function resolveClientWire(plan) {
|
|
|
135
141
|
if (plan.upstreamWire === "anthropic-messages") return "chat.completions";
|
|
136
142
|
if (plan.upstreamWire === "cursor-connect") return "chat.completions";
|
|
137
143
|
if (plan.upstreamWire === "devin-connect") return "chat.completions";
|
|
144
|
+
if (plan.upstreamWire === "custom-gemini") return "chat.completions";
|
|
145
|
+
if (plan.upstreamWire === "custom-openai-responses") return "chat.completions";
|
|
146
|
+
if (plan.upstreamWire === "custom-anthropic-messages") return "chat.completions";
|
|
138
147
|
if (plan.upstreamWire === "responses" && plan.authMethod.kind === "oauth" && plan.authMethod.ref === "chatgpt") {
|
|
139
148
|
return "chat.completions";
|
|
140
149
|
}
|
|
@@ -155,12 +164,28 @@ var ANTIGRAVITY_REQUIRED_HEADERS = [
|
|
|
155
164
|
function agentShouldUseServerProxy(agentConfig) {
|
|
156
165
|
return shouldUseServerProxy(agentConfig);
|
|
157
166
|
}
|
|
167
|
+
function resolveCustomUpstreamWire(endpoint, nativeProtocol) {
|
|
168
|
+
const responsesEndpoint = endpoint.includes("/responses");
|
|
169
|
+
if (nativeProtocol === "openai-responses" && responsesEndpoint) return "responses";
|
|
170
|
+
if (nativeProtocol === "gemini") return "custom-gemini";
|
|
171
|
+
if (nativeProtocol === "openai-responses") return "custom-openai-responses";
|
|
172
|
+
if (nativeProtocol === "anthropic-messages") return "custom-anthropic-messages";
|
|
173
|
+
return responsesEndpoint ? "responses" : "chat.completions";
|
|
174
|
+
}
|
|
175
|
+
function hasOwnCustomProviderKey(agentConfig) {
|
|
176
|
+
const endpoint = asOptionalTrimmedString(agentConfig.customProviderUrl);
|
|
177
|
+
if (!endpoint) return false;
|
|
178
|
+
if (isAntigravityCloudCodeBaseUrl(endpoint)) return false;
|
|
179
|
+
return Boolean(asOptionalTrimmedString(agentConfig.apiKey));
|
|
180
|
+
}
|
|
158
181
|
function resolveAgentCallPlan(agentConfig, _env) {
|
|
159
182
|
const apiKeyRef = asTrimmedLowercaseString(agentConfig.apiKeyRef);
|
|
160
183
|
const provider = asTrimmedLowercaseString(
|
|
161
184
|
agentConfig.provider ?? agentConfig.apiSource
|
|
162
185
|
);
|
|
163
|
-
|
|
186
|
+
const ownCustomKeyWins = hasOwnCustomProviderKey(agentConfig);
|
|
187
|
+
const oauthApiKeyRef = ownCustomKeyWins ? "" : apiKeyRef;
|
|
188
|
+
if (!ownCustomKeyWins && isAntigravityOAuthAgent(agentConfig)) {
|
|
164
189
|
return {
|
|
165
190
|
authMethod: { kind: "oauth", ref: "antigravity" },
|
|
166
191
|
transport: "server-proxy",
|
|
@@ -170,7 +195,7 @@ function resolveAgentCallPlan(agentConfig, _env) {
|
|
|
170
195
|
vendor: provider || "google-antigravity"
|
|
171
196
|
};
|
|
172
197
|
}
|
|
173
|
-
if (
|
|
198
|
+
if (oauthApiKeyRef === "chatgpt") {
|
|
174
199
|
return {
|
|
175
200
|
authMethod: { kind: "oauth", ref: "chatgpt" },
|
|
176
201
|
transport: "server-proxy",
|
|
@@ -180,7 +205,7 @@ function resolveAgentCallPlan(agentConfig, _env) {
|
|
|
180
205
|
vendor: provider || "openai"
|
|
181
206
|
};
|
|
182
207
|
}
|
|
183
|
-
if (
|
|
208
|
+
if (oauthApiKeyRef === "claude") {
|
|
184
209
|
return {
|
|
185
210
|
authMethod: { kind: "oauth", ref: "claude" },
|
|
186
211
|
transport: "server-proxy",
|
|
@@ -190,7 +215,17 @@ function resolveAgentCallPlan(agentConfig, _env) {
|
|
|
190
215
|
vendor: provider || "anthropic"
|
|
191
216
|
};
|
|
192
217
|
}
|
|
193
|
-
if (
|
|
218
|
+
if (oauthApiKeyRef === "workbuddy" || oauthApiKeyRef === "workbuddy-ai") {
|
|
219
|
+
return {
|
|
220
|
+
authMethod: { kind: "oauth", ref: oauthApiKeyRef },
|
|
221
|
+
transport: "server-proxy",
|
|
222
|
+
upstreamWire: "chat.completions",
|
|
223
|
+
endpoint: oauthApiKeyRef === "workbuddy" ? "https://copilot.tencent.com/v2/chat/completions" : "https://www.workbuddy.ai/v2/chat/completions",
|
|
224
|
+
requiredHeaders: [],
|
|
225
|
+
vendor: oauthApiKeyRef
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
if (oauthApiKeyRef === "xai") {
|
|
194
229
|
return {
|
|
195
230
|
authMethod: { kind: "oauth", ref: "xai" },
|
|
196
231
|
transport: "server-proxy",
|
|
@@ -200,7 +235,7 @@ function resolveAgentCallPlan(agentConfig, _env) {
|
|
|
200
235
|
vendor: provider || "xai"
|
|
201
236
|
};
|
|
202
237
|
}
|
|
203
|
-
if (
|
|
238
|
+
if (oauthApiKeyRef === "cursor") {
|
|
204
239
|
return {
|
|
205
240
|
authMethod: { kind: "oauth", ref: "cursor" },
|
|
206
241
|
transport: "server-proxy",
|
|
@@ -214,7 +249,7 @@ function resolveAgentCallPlan(agentConfig, _env) {
|
|
|
214
249
|
vendor: provider || "cursor"
|
|
215
250
|
};
|
|
216
251
|
}
|
|
217
|
-
if (
|
|
252
|
+
if (oauthApiKeyRef === "devin" || !ownCustomKeyWins && provider === "devin") {
|
|
218
253
|
return {
|
|
219
254
|
authMethod: { kind: "oauth", ref: "devin" },
|
|
220
255
|
transport: "server-proxy",
|
|
@@ -237,7 +272,10 @@ function resolveAgentCallPlan(agentConfig, _env) {
|
|
|
237
272
|
if (agentConfig.customProviderUrl || agentConfig.apiSource === "custom") {
|
|
238
273
|
const transport2 = agentShouldUseServerProxy(agentConfig) ? "server-proxy" : "direct";
|
|
239
274
|
const endpoint2 = asOptionalTrimmedString(agentConfig.customProviderUrl) ?? "";
|
|
240
|
-
const upstreamWire2 =
|
|
275
|
+
const upstreamWire2 = resolveCustomUpstreamWire(
|
|
276
|
+
endpoint2,
|
|
277
|
+
findModelConfig(provider, agentConfig.model ?? "")?.nativeProtocol
|
|
278
|
+
);
|
|
241
279
|
return {
|
|
242
280
|
authMethod: { kind: "custom-key" },
|
|
243
281
|
transport: transport2,
|
|
@@ -416,6 +454,20 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
|
|
|
416
454
|
cacheScope: "static",
|
|
417
455
|
content: DELETE_SAFETY_RED_LINE
|
|
418
456
|
},
|
|
457
|
+
// 并行是默认:系统层固定块,紧随红线(同为无条件前缀,不随工具/轮次变化)。
|
|
458
|
+
{
|
|
459
|
+
id: "parallel-dispatch-default",
|
|
460
|
+
owner: "platform",
|
|
461
|
+
cacheScope: "static",
|
|
462
|
+
content: PARALLEL_DISPATCH_DEFAULT_RULE
|
|
463
|
+
},
|
|
464
|
+
// 平台风控纪律:无条件静态前缀,紧随并行派发块。
|
|
465
|
+
{
|
|
466
|
+
id: "platform-risk-control",
|
|
467
|
+
owner: "platform",
|
|
468
|
+
cacheScope: "static",
|
|
469
|
+
content: PLATFORM_RISK_CONTROL_RULE
|
|
470
|
+
},
|
|
419
471
|
{ id: "identity", owner: "platform", cacheScope: "session", content: identitySection },
|
|
420
472
|
{ id: "user-response-language", owner: "platform", cacheScope: "session", content: buildUserResponseLanguageContext({ language: safeLanguage }) },
|
|
421
473
|
{ id: "startup-protocol", owner: "platform", cacheScope: "static", content: startupProtocol },
|
|
@@ -423,11 +475,11 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
|
|
|
423
475
|
{ id: "tool-round-economy", owner: "platform", cacheScope: "session", content: toolSections.toolRoundEconomy },
|
|
424
476
|
{ id: "tool-use-guidance", owner: "platform", cacheScope: "session", content: toolSections.toolUseGuidance },
|
|
425
477
|
{ id: "privilege-escalation", owner: "platform", cacheScope: "session", content: toolSections.privilegeEscalation },
|
|
426
|
-
{ id: "shell-task-lifecycle", owner: "platform", cacheScope: "session", content: toolSections.shellTaskLifecycle },
|
|
427
478
|
{ id: "agent-orchestration", owner: "platform", cacheScope: "session", content: toolSections.agentOrchestration },
|
|
428
479
|
{ id: "agent-collaboration", owner: "platform", cacheScope: "session", content: toolSections.agentCollaboration },
|
|
429
480
|
{ id: "web-access", owner: "platform", cacheScope: "session", content: toolSections.webAccess },
|
|
430
481
|
{ id: "menu-usage", owner: "platform", cacheScope: "session", content: toolSections.menuUsage },
|
|
482
|
+
{ id: "show-interaction", owner: "platform", cacheScope: "session", content: toolSections.showInteraction },
|
|
431
483
|
{ id: "clarification-mode", owner: "platform", cacheScope: "session", content: clarifyingSection },
|
|
432
484
|
{ id: "knowledge-management", owner: "platform", cacheScope: "session", content: toolSections.knowledgeManagement },
|
|
433
485
|
{ id: "memory-capture", owner: "platform", cacheScope: "session", content: toolSections.memoryCapture },
|
|
@@ -510,14 +562,28 @@ var normalizeChatCompletionsContent = (content) => {
|
|
|
510
562
|
if (content == null) return null;
|
|
511
563
|
return JSON.stringify(content);
|
|
512
564
|
};
|
|
513
|
-
var sanitizeChatCompletionsMessage = (message) => {
|
|
565
|
+
var sanitizeChatCompletionsMessage = (message, options) => {
|
|
514
566
|
const sanitized = {
|
|
515
567
|
role: message.role,
|
|
516
568
|
content: normalizeChatCompletionsContent(message.content)
|
|
517
569
|
};
|
|
518
570
|
const name = asOptionalTrimmedString(message.name);
|
|
519
571
|
if (name) sanitized.name = name;
|
|
520
|
-
|
|
572
|
+
const shouldStripReasoning = shouldStripReasoningContentForOutbound(
|
|
573
|
+
options?.provider,
|
|
574
|
+
options?.model
|
|
575
|
+
);
|
|
576
|
+
return preserveAgentStateFields(message, sanitized, {
|
|
577
|
+
targetProvider: options?.provider,
|
|
578
|
+
targetModel: options?.model,
|
|
579
|
+
stripReasoningContent: shouldStripReasoning,
|
|
580
|
+
...options?.shapingCounts ? { shapingCounts: options.shapingCounts } : {},
|
|
581
|
+
...resolveReasoningReplayOptions(
|
|
582
|
+
options?.provider,
|
|
583
|
+
options?.model,
|
|
584
|
+
shouldStripReasoning
|
|
585
|
+
)
|
|
586
|
+
});
|
|
521
587
|
};
|
|
522
588
|
var buildRequestBody = (options) => {
|
|
523
589
|
const {
|
|
@@ -530,10 +596,15 @@ var buildRequestBody = (options) => {
|
|
|
530
596
|
frequency_penalty,
|
|
531
597
|
presence_penalty,
|
|
532
598
|
max_tokens,
|
|
533
|
-
reasoning_effort
|
|
599
|
+
reasoning_effort,
|
|
600
|
+
shapingCounts
|
|
534
601
|
} = options;
|
|
535
602
|
const cleanedMessages = messages.map(
|
|
536
|
-
(message) => sanitizeChatCompletionsMessage(message
|
|
603
|
+
(message) => sanitizeChatCompletionsMessage(message, {
|
|
604
|
+
provider: providerName,
|
|
605
|
+
model,
|
|
606
|
+
...shapingCounts ? { shapingCounts } : {}
|
|
607
|
+
})
|
|
537
608
|
);
|
|
538
609
|
const bodyData = {
|
|
539
610
|
model,
|
|
@@ -565,7 +636,7 @@ var buildRequestBody = (options) => {
|
|
|
565
636
|
if (typeof max_tokens === "number") bodyData.max_tokens = max_tokens;
|
|
566
637
|
return bodyData;
|
|
567
638
|
};
|
|
568
|
-
var generateOpenAIRequestBody = (agentConfig, providerName, messages, contexts, stableMessages = [], prependSystemPrompt = true) => {
|
|
639
|
+
var generateOpenAIRequestBody = (agentConfig, providerName, messages, contexts, stableMessages = [], prependSystemPrompt = true, shapingCounts) => {
|
|
569
640
|
const resolvedModel = providerName === "fireworks" ? resolveFireworksKimiModel(agentConfig.model) : agentConfig.model ?? "";
|
|
570
641
|
let processedStable = [...stableMessages];
|
|
571
642
|
if (isClaudeModel(resolvedModel) && processedStable.length > 0) {
|
|
@@ -609,7 +680,8 @@ var generateOpenAIRequestBody = (agentConfig, providerName, messages, contexts,
|
|
|
609
680
|
frequency_penalty: agentConfig.frequency_penalty,
|
|
610
681
|
presence_penalty: agentConfig.presence_penalty,
|
|
611
682
|
max_tokens: agentConfig.max_tokens,
|
|
612
|
-
reasoning_effort: agentConfig.reasoning_effort
|
|
683
|
+
reasoning_effort: agentConfig.reasoning_effort,
|
|
684
|
+
...shapingCounts ? { shapingCounts } : {}
|
|
613
685
|
});
|
|
614
686
|
if (shouldInjectLlamaCppThinkingToggle(agentConfig)) {
|
|
615
687
|
requestBody.chat_template_kwargs = {
|
|
@@ -785,13 +857,57 @@ var applyImageConfigIfNeeded = (body, agentConfig, provider) => {
|
|
|
785
857
|
};
|
|
786
858
|
return body;
|
|
787
859
|
};
|
|
860
|
+
function canonicalizeJsonValue(val) {
|
|
861
|
+
if (val === null || typeof val !== "object") {
|
|
862
|
+
return typeof val === "function" ? void 0 : val;
|
|
863
|
+
}
|
|
864
|
+
if (Array.isArray(val)) {
|
|
865
|
+
return val.map(canonicalizeJsonValue);
|
|
866
|
+
}
|
|
867
|
+
const obj = val;
|
|
868
|
+
const sortedKeys = Object.keys(obj).sort();
|
|
869
|
+
const res = {};
|
|
870
|
+
for (const k of sortedKeys) {
|
|
871
|
+
const v = canonicalizeJsonValue(obj[k]);
|
|
872
|
+
if (v !== void 0) {
|
|
873
|
+
res[k] = v;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
return res;
|
|
877
|
+
}
|
|
878
|
+
function serializeToolsForCacheKey(tools) {
|
|
879
|
+
if (!Array.isArray(tools) || tools.length === 0) {
|
|
880
|
+
return "";
|
|
881
|
+
}
|
|
882
|
+
const items = [];
|
|
883
|
+
for (const tool of tools) {
|
|
884
|
+
if (!tool || typeof tool !== "object") continue;
|
|
885
|
+
const t = tool;
|
|
886
|
+
const fn = typeof t.function === "object" && t.function !== null ? t.function : void 0;
|
|
887
|
+
const name = fn?.name ?? t.name ?? (t.type ? String(t.type) : "");
|
|
888
|
+
const description = fn?.description ?? t.description ?? "";
|
|
889
|
+
const rawParams = fn?.parameters !== void 0 ? fn.parameters : t.parameters;
|
|
890
|
+
const parameters = rawParams !== void 0 ? canonicalizeJsonValue(rawParams) ?? null : null;
|
|
891
|
+
items.push(
|
|
892
|
+
JSON.stringify({
|
|
893
|
+
description: typeof description === "string" ? description : String(description),
|
|
894
|
+
name: typeof name === "string" ? name : String(name),
|
|
895
|
+
parameters
|
|
896
|
+
})
|
|
897
|
+
);
|
|
898
|
+
}
|
|
899
|
+
if (items.length === 0) return "";
|
|
900
|
+
items.sort();
|
|
901
|
+
return items.join(";");
|
|
902
|
+
}
|
|
788
903
|
var generateRequestBody = ({
|
|
789
904
|
agentConfig,
|
|
790
905
|
messages,
|
|
791
906
|
contexts,
|
|
792
907
|
stableMessages,
|
|
793
908
|
prependSystemPrompt = true,
|
|
794
|
-
responsesState
|
|
909
|
+
responsesState,
|
|
910
|
+
tools
|
|
795
911
|
}) => {
|
|
796
912
|
const provider = (agentConfig.provider || "").toLowerCase();
|
|
797
913
|
const imageSettings = getImageOutputSettings(agentConfig, provider);
|
|
@@ -810,11 +926,13 @@ var generateRequestBody = ({
|
|
|
810
926
|
prependSystemPrompt,
|
|
811
927
|
responsesState
|
|
812
928
|
);
|
|
929
|
+
const serializedTools = serializeToolsForCacheKey(tools);
|
|
813
930
|
body.prompt_cache_key ??= stablePromptCacheKey(
|
|
814
931
|
[
|
|
815
932
|
agentConfigForRequest.model,
|
|
816
933
|
agentConfigForRequest.dbKey ?? "",
|
|
817
|
-
agentConfigForRequest.prompt ?? ""
|
|
934
|
+
agentConfigForRequest.prompt ?? "",
|
|
935
|
+
serializedTools
|
|
818
936
|
],
|
|
819
937
|
"nolo-openai"
|
|
820
938
|
);
|
|
@@ -1230,6 +1348,49 @@ function sanitizeOutboundBody(body) {
|
|
|
1230
1348
|
return next;
|
|
1231
1349
|
}
|
|
1232
1350
|
|
|
1351
|
+
// packages/ai/tools/stripModelConfirmationFlags.ts
|
|
1352
|
+
var CONFIRMATION_INPUT_KEYS = {
|
|
1353
|
+
self_evolution_requires_confirmation: "__confirmedSelfEvolution",
|
|
1354
|
+
agent_update_requires_confirmation: "__confirmedSelfEvolution",
|
|
1355
|
+
media_job_start_requires_confirmation: "__confirmedMediaJobStart"
|
|
1356
|
+
};
|
|
1357
|
+
function stripModelConfirmationFlags(value) {
|
|
1358
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
1359
|
+
return Object.fromEntries(
|
|
1360
|
+
Object.entries(value).filter(
|
|
1361
|
+
([key]) => !key.startsWith("__confirmed")
|
|
1362
|
+
)
|
|
1363
|
+
);
|
|
1364
|
+
}
|
|
1365
|
+
var MODEL_DIALOG_BINDING_STRIPPED_TOOLS = /* @__PURE__ */ new Set([
|
|
1366
|
+
"mediaJobTool",
|
|
1367
|
+
"transcribe",
|
|
1368
|
+
"translate",
|
|
1369
|
+
"exportDocument",
|
|
1370
|
+
"readArtifact"
|
|
1371
|
+
]);
|
|
1372
|
+
var TRUSTED_ONLY_MODEL_INPUT_KEYS = /* @__PURE__ */ new Set(["confirmationToken", "expectedExecutionRevision"]);
|
|
1373
|
+
function stripModelToolArgs(canonicalToolName, value) {
|
|
1374
|
+
const base = stripModelConfirmationFlags(value);
|
|
1375
|
+
if (!base || typeof base !== "object" || Array.isArray(base)) return base;
|
|
1376
|
+
const withoutTrustedOnlyKeys = Object.fromEntries(
|
|
1377
|
+
Object.entries(base).filter(
|
|
1378
|
+
([key]) => !TRUSTED_ONLY_MODEL_INPUT_KEYS.has(key)
|
|
1379
|
+
)
|
|
1380
|
+
);
|
|
1381
|
+
if (!MODEL_DIALOG_BINDING_STRIPPED_TOOLS.has(canonicalToolName)) {
|
|
1382
|
+
return withoutTrustedOnlyKeys;
|
|
1383
|
+
}
|
|
1384
|
+
if (!withoutTrustedOnlyKeys || typeof withoutTrustedOnlyKeys !== "object" || Array.isArray(withoutTrustedOnlyKeys)) {
|
|
1385
|
+
return withoutTrustedOnlyKeys;
|
|
1386
|
+
}
|
|
1387
|
+
return Object.fromEntries(
|
|
1388
|
+
Object.entries(withoutTrustedOnlyKeys).filter(
|
|
1389
|
+
([key]) => key !== "dialogId" && key !== "autoApproveCredits"
|
|
1390
|
+
)
|
|
1391
|
+
);
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1233
1394
|
export {
|
|
1234
1395
|
selectResponsesConversationState,
|
|
1235
1396
|
updateResponsesConversationState,
|
|
@@ -1237,6 +1398,8 @@ export {
|
|
|
1237
1398
|
resolveClientWire,
|
|
1238
1399
|
resolveAgentCallPlan,
|
|
1239
1400
|
generateRequestBody,
|
|
1401
|
+
CONFIRMATION_INPUT_KEYS,
|
|
1402
|
+
stripModelToolArgs,
|
|
1240
1403
|
performFetchRequest,
|
|
1241
1404
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
1242
1405
|
parseToolCallArguments,
|