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
|
@@ -2,15 +2,6 @@ import {
|
|
|
2
2
|
estimateTokenCount
|
|
3
3
|
} from "./chunk-PSCNXBYA.js";
|
|
4
4
|
|
|
5
|
-
// packages/ai/tools/agent/runTitle.ts
|
|
6
|
-
var RUN_TITLE_MAX = 60;
|
|
7
|
-
function normalizeRunTitle(value) {
|
|
8
|
-
if (typeof value !== "string") return void 0;
|
|
9
|
-
const cleaned = value.replace(/[\u0000-\u001f\u007f-\u009f]+/g, " ").replace(/\s+/g, " ").trim();
|
|
10
|
-
if (!cleaned) return void 0;
|
|
11
|
-
return cleaned.length > RUN_TITLE_MAX ? `${cleaned.slice(0, RUN_TITLE_MAX - 1)}\u2026` : cleaned;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
5
|
// packages/ai/tools/agent/agentRunDisplayHelpers.ts
|
|
15
6
|
function buildDelegatedTaskContent(task, input) {
|
|
16
7
|
if (input === void 0 || input === null) {
|
|
@@ -109,7 +100,18 @@ var DEFAULT_LABELS = {
|
|
|
109
100
|
runStopped: "Run stopped",
|
|
110
101
|
runFinished: "Run finished",
|
|
111
102
|
logTail: "Log tail:",
|
|
112
|
-
runs: (count) => `Runs (${count})
|
|
103
|
+
runs: (count) => `Runs (${count})`,
|
|
104
|
+
toolCount: (count) => `${count} tools`,
|
|
105
|
+
statusWord: (status) => status,
|
|
106
|
+
unnamedAgent: "agent",
|
|
107
|
+
rows: {
|
|
108
|
+
agent: "agent ",
|
|
109
|
+
status: "status ",
|
|
110
|
+
tools: "tools ",
|
|
111
|
+
note: "note ",
|
|
112
|
+
error: "error ",
|
|
113
|
+
task: "task "
|
|
114
|
+
}
|
|
113
115
|
};
|
|
114
116
|
function resolveLabels(labels) {
|
|
115
117
|
return {
|
|
@@ -118,7 +120,11 @@ function resolveLabels(labels) {
|
|
|
118
120
|
runStopped: labels?.runStopped ?? DEFAULT_LABELS.runStopped,
|
|
119
121
|
runFinished: labels?.runFinished ?? DEFAULT_LABELS.runFinished,
|
|
120
122
|
logTail: labels?.logTail ?? DEFAULT_LABELS.logTail,
|
|
121
|
-
runs: labels?.runs ?? DEFAULT_LABELS.runs
|
|
123
|
+
runs: labels?.runs ?? DEFAULT_LABELS.runs,
|
|
124
|
+
toolCount: labels?.toolCount ?? DEFAULT_LABELS.toolCount,
|
|
125
|
+
statusWord: labels?.statusWord ?? DEFAULT_LABELS.statusWord,
|
|
126
|
+
unnamedAgent: labels?.unnamedAgent ?? DEFAULT_LABELS.unnamedAgent,
|
|
127
|
+
rows: { ...DEFAULT_LABELS.rows, ...labels?.rows ?? {} }
|
|
122
128
|
};
|
|
123
129
|
}
|
|
124
130
|
function shortRunId(runId) {
|
|
@@ -149,10 +155,39 @@ function formatRunAge(timing, now = Date.now()) {
|
|
|
149
155
|
const end = typeof timing?.finishedAt === "number" && Number.isFinite(timing.finishedAt) && timing.finishedAt > 0 ? timing.finishedAt : now;
|
|
150
156
|
return formatDuration(end - startedAt);
|
|
151
157
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
158
|
+
var AGENT_KEY_NAME_PATTERNS = [
|
|
159
|
+
/^agent-[0-9a-f]{6,}-[a-z0-9]/i,
|
|
160
|
+
/^agent-pub-[a-z0-9]+/i,
|
|
161
|
+
/^agent-system-[a-z0-9]+/i,
|
|
162
|
+
/^run-\d{4}-\d{2}-\d{2}T[\d-]+Z-[a-z0-9]+$/i
|
|
163
|
+
];
|
|
164
|
+
function isAgentKeyShapedName(agentName) {
|
|
165
|
+
const trimmed = agentName.trim();
|
|
166
|
+
return AGENT_KEY_NAME_PATTERNS.some((pattern) => pattern.test(trimmed));
|
|
167
|
+
}
|
|
168
|
+
function formatIdentityRow(agentName, runId, opts) {
|
|
169
|
+
const trimmed = typeof agentName === "string" ? agentName.trim() : "";
|
|
170
|
+
const title = opts?.title?.trim();
|
|
171
|
+
let displayName = "";
|
|
172
|
+
if (!isAgentNameFallback(trimmed)) {
|
|
173
|
+
if (isAgentKeyShapedName(trimmed)) {
|
|
174
|
+
displayName = opts?.unnamedAgent?.trim() ?? "";
|
|
175
|
+
} else {
|
|
176
|
+
displayName = trimmed;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (displayName === title) displayName = "";
|
|
155
180
|
const short = shortRunId(runId);
|
|
181
|
+
const idSuffix = short ? ` #${short}` : "";
|
|
182
|
+
if (title) {
|
|
183
|
+
if (opts?.titleOnOwnLine) {
|
|
184
|
+
return displayName ? `${displayName}${idSuffix}` : short ? `#${short}` : "";
|
|
185
|
+
}
|
|
186
|
+
if (displayName) return `${title} \xB7 ${displayName}${idSuffix}`;
|
|
187
|
+
return `${title}${idSuffix}`;
|
|
188
|
+
}
|
|
189
|
+
const parts = [];
|
|
190
|
+
if (displayName) parts.push(displayName);
|
|
156
191
|
if (short) parts.push(`#${short}`);
|
|
157
192
|
return parts.join(" ");
|
|
158
193
|
}
|
|
@@ -161,7 +196,7 @@ function isAgentNameFallback(agentName) {
|
|
|
161
196
|
return !trimmed || trimmed === "agent";
|
|
162
197
|
}
|
|
163
198
|
function resolveRunLabel(run) {
|
|
164
|
-
for (const candidate of [run.agentName, run.name, run.agentKey, run.runId]) {
|
|
199
|
+
for (const candidate of [run.agentName, run.name, run.title, run.agentKey, run.runId]) {
|
|
165
200
|
if (typeof candidate === "string" && !isAgentNameFallback(candidate)) {
|
|
166
201
|
return candidate.trim();
|
|
167
202
|
}
|
|
@@ -172,23 +207,31 @@ function formatStartRunCard(agentName, status = "running", opts) {
|
|
|
172
207
|
const L = resolveLabels(opts?.labels);
|
|
173
208
|
const icon = getAgentRunStatusIcon(status);
|
|
174
209
|
const lines = [L.runStarted];
|
|
175
|
-
const
|
|
210
|
+
const title = opts?.title?.trim();
|
|
211
|
+
if (title) {
|
|
212
|
+
lines.push(` ${title}`);
|
|
213
|
+
}
|
|
214
|
+
const identity = formatIdentityRow(agentName, opts?.runId, {
|
|
215
|
+
title,
|
|
216
|
+
titleOnOwnLine: true,
|
|
217
|
+
unnamedAgent: L.unnamedAgent
|
|
218
|
+
});
|
|
176
219
|
if (identity) {
|
|
177
|
-
lines.push(` agent
|
|
220
|
+
lines.push(` ${L.rows.agent}${identity}`);
|
|
178
221
|
}
|
|
179
|
-
lines.push(` status
|
|
222
|
+
lines.push(` ${L.rows.status}${icon} ${L.statusWord(status)}`);
|
|
180
223
|
const task = opts?.task?.trim();
|
|
181
|
-
if (task) {
|
|
182
|
-
lines.push(` task
|
|
224
|
+
if (task && !title) {
|
|
225
|
+
lines.push(` ${L.rows.task}${clipText(task, TASK_PREVIEW_MAX)}`);
|
|
183
226
|
}
|
|
184
227
|
return lines.join("\n");
|
|
185
228
|
}
|
|
186
229
|
var TASK_PREVIEW_MAX = 72;
|
|
187
230
|
var NOTE_PREVIEW_MAX = 72;
|
|
188
|
-
function formatProgressRow(toolCallCount, lastToolNames) {
|
|
231
|
+
function formatProgressRow(toolCallCount, lastToolNames, labels = DEFAULT_LABELS) {
|
|
189
232
|
const parts = [];
|
|
190
233
|
if (typeof toolCallCount === "number" && Number.isFinite(toolCallCount)) {
|
|
191
|
-
parts.push(
|
|
234
|
+
parts.push(labels.toolCount(toolCallCount));
|
|
192
235
|
}
|
|
193
236
|
if (lastToolNames && lastToolNames.length > 0) {
|
|
194
237
|
parts.push(lastToolNames.join(", "));
|
|
@@ -199,21 +242,24 @@ function formatStatusRunCard(agentName, status = "running", opts) {
|
|
|
199
242
|
const L = resolveLabels(opts?.labels);
|
|
200
243
|
const icon = getAgentRunStatusIcon(status);
|
|
201
244
|
const age = formatRunAge(opts?.timing, opts?.now);
|
|
202
|
-
const lines = [L.runStatus, ` ${icon} ${status}${age ? ` ${age}` : ""}`];
|
|
203
|
-
const identity = formatIdentityRow(agentName, opts?.runId
|
|
245
|
+
const lines = [L.runStatus, ` ${icon} ${L.statusWord(status)}${age ? ` ${age}` : ""}`];
|
|
246
|
+
const identity = formatIdentityRow(agentName, opts?.runId, {
|
|
247
|
+
title: opts?.title,
|
|
248
|
+
unnamedAgent: L.unnamedAgent
|
|
249
|
+
});
|
|
204
250
|
if (identity) {
|
|
205
|
-
lines.push(` agent
|
|
251
|
+
lines.push(` ${L.rows.agent}${identity}`);
|
|
206
252
|
}
|
|
207
|
-
const progress = formatProgressRow(opts?.toolCallCount, opts?.lastToolNames);
|
|
253
|
+
const progress = formatProgressRow(opts?.toolCallCount, opts?.lastToolNames, L);
|
|
208
254
|
if (progress) {
|
|
209
|
-
lines.push(` tools
|
|
255
|
+
lines.push(` ${L.rows.tools}${progress}`);
|
|
210
256
|
}
|
|
211
257
|
const note = opts?.lastAssistantText?.trim();
|
|
212
258
|
if (note) {
|
|
213
|
-
lines.push(` note
|
|
259
|
+
lines.push(` ${L.rows.note}${clipText(note, NOTE_PREVIEW_MAX)}`);
|
|
214
260
|
}
|
|
215
261
|
if (opts?.errorMessage?.trim()) {
|
|
216
|
-
lines.push(` error
|
|
262
|
+
lines.push(` ${L.rows.error}${opts.errorMessage.trim()}`);
|
|
217
263
|
}
|
|
218
264
|
if (shouldShowLogTail(status, opts?.includeLogTail, opts?.logLines)) {
|
|
219
265
|
lines.push("", L.logTail, ...opts.logLines.map((l) => ` ${l}`));
|
|
@@ -232,11 +278,14 @@ function formatFinishedRunCard(agentName, status, opts) {
|
|
|
232
278
|
const L = resolveLabels(opts?.labels);
|
|
233
279
|
const icon = getAgentRunStatusIcon(status);
|
|
234
280
|
const age = formatRunAge(opts?.timing, opts?.now);
|
|
235
|
-
const summary = [status, age, formatProgressRow(opts?.toolCallCount, opts?.lastToolNames)].filter(Boolean).join(" \xB7 ");
|
|
281
|
+
const summary = [L.statusWord(status), age, formatProgressRow(opts?.toolCallCount, opts?.lastToolNames, L)].filter(Boolean).join(" \xB7 ");
|
|
236
282
|
const lines = [L.runFinished, ` ${icon} ${summary}`];
|
|
237
|
-
const identity = formatIdentityRow(agentName, opts?.runId
|
|
283
|
+
const identity = formatIdentityRow(agentName, opts?.runId, {
|
|
284
|
+
title: opts?.title,
|
|
285
|
+
unnamedAgent: L.unnamedAgent
|
|
286
|
+
});
|
|
238
287
|
if (identity) {
|
|
239
|
-
lines.push(` agent
|
|
288
|
+
lines.push(` ${L.rows.agent}${identity}`);
|
|
240
289
|
}
|
|
241
290
|
const note = opts?.lastAssistantText?.trim();
|
|
242
291
|
if (note) {
|
|
@@ -254,7 +303,7 @@ function formatStopRunCard(status = "killed", labels) {
|
|
|
254
303
|
const L = resolveLabels(labels);
|
|
255
304
|
const icon = getAgentRunStatusIcon(status);
|
|
256
305
|
return `${L.runStopped}
|
|
257
|
-
${icon} ${status}`;
|
|
306
|
+
${icon} ${L.statusWord(status)}`;
|
|
258
307
|
}
|
|
259
308
|
function formatListRunsCard(runs, labels) {
|
|
260
309
|
const L = resolveLabels(labels);
|
|
@@ -269,7 +318,7 @@ function formatListRunsCard(runs, labels) {
|
|
|
269
318
|
function formatNotFoundRunCard(labels) {
|
|
270
319
|
const L = resolveLabels(labels);
|
|
271
320
|
return `${L.runStatus}
|
|
272
|
-
? not_found`;
|
|
321
|
+
? ${L.statusWord("not_found")}`;
|
|
273
322
|
}
|
|
274
323
|
var AGENT_RUN_TERMINAL_STATUSES = /* @__PURE__ */ new Set([
|
|
275
324
|
"done",
|
|
@@ -285,10 +334,35 @@ var AGENT_RUN_TERMINAL_STATUSES = /* @__PURE__ */ new Set([
|
|
|
285
334
|
function isAgentRunTerminalStatus(status) {
|
|
286
335
|
return typeof status === "string" && AGENT_RUN_TERMINAL_STATUSES.has(status);
|
|
287
336
|
}
|
|
337
|
+
function formatAgentListCard(agents, maxDisplay = 8) {
|
|
338
|
+
const total = agents.length;
|
|
339
|
+
const lines = [`Agents (${total})`];
|
|
340
|
+
const visible = agents.slice(0, maxDisplay);
|
|
341
|
+
for (const agent of visible) {
|
|
342
|
+
const star = agent.isFavorite ? "\u2605" : " ";
|
|
343
|
+
const own = agent.isOwned ? "\u25CE" : " ";
|
|
344
|
+
const name = agent.name || "(unnamed)";
|
|
345
|
+
const model = agent.model || "\u2014";
|
|
346
|
+
const source = agent.apiSource || agent.provider || agent.cliProvider || "\u2014";
|
|
347
|
+
const key = agent.agentKey || "(agentKey unavailable)";
|
|
348
|
+
lines.push(`${star}${own} ${name} ${model} ${source} ${key}`);
|
|
349
|
+
}
|
|
350
|
+
if (total > maxDisplay) {
|
|
351
|
+
lines.push(`\u2026 +${total - maxDisplay} more`);
|
|
352
|
+
}
|
|
353
|
+
return lines.join("\n");
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// packages/ai/tools/agent/runTitle.ts
|
|
357
|
+
var RUN_TITLE_MAX = 60;
|
|
358
|
+
function normalizeRunTitle(value) {
|
|
359
|
+
if (typeof value !== "string") return void 0;
|
|
360
|
+
const cleaned = value.replace(/[\u0000-\u001f\u007f-\u009f]+/g, " ").replace(/\s+/g, " ").trim();
|
|
361
|
+
if (!cleaned) return void 0;
|
|
362
|
+
return cleaned.length > RUN_TITLE_MAX ? `${cleaned.slice(0, RUN_TITLE_MAX - 1)}\u2026` : cleaned;
|
|
363
|
+
}
|
|
288
364
|
|
|
289
365
|
export {
|
|
290
|
-
RUN_TITLE_MAX,
|
|
291
|
-
normalizeRunTitle,
|
|
292
366
|
buildDelegatedTaskContent,
|
|
293
367
|
calculateDelegatedPayloadMetrics,
|
|
294
368
|
shortRunId,
|
|
@@ -304,5 +378,8 @@ export {
|
|
|
304
378
|
formatStopRunCard,
|
|
305
379
|
formatListRunsCard,
|
|
306
380
|
formatNotFoundRunCard,
|
|
307
|
-
isAgentRunTerminalStatus
|
|
381
|
+
isAgentRunTerminalStatus,
|
|
382
|
+
formatAgentListCard,
|
|
383
|
+
RUN_TITLE_MAX,
|
|
384
|
+
normalizeRunTitle
|
|
308
385
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectCurrentServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QFEW2ULV.js";
|
|
4
4
|
import {
|
|
5
5
|
patch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-74RAWNQN.js";
|
|
7
7
|
import {
|
|
8
8
|
getIsDesktopApp
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6Q7UTJKR.js";
|
|
10
10
|
import {
|
|
11
11
|
selectIdentityToken
|
|
12
12
|
} from "./chunk-SEJ5OS6F.js";
|
|
@@ -2,19 +2,22 @@ import {
|
|
|
2
2
|
LOCAL_CODEX_AGENT_KEY,
|
|
3
3
|
isLocalCliAgentKey,
|
|
4
4
|
resolveCliAgentKeyInput
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NBTY7YJF.js";
|
|
6
|
+
import {
|
|
7
|
+
resolveCliLocalRuntimeKeyCapability
|
|
8
|
+
} from "./chunk-Y2DXOPSO.js";
|
|
6
9
|
import {
|
|
7
10
|
HIGH_RISK_MUTATION_TOOL_NAMES
|
|
8
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QLQ573SU.js";
|
|
9
12
|
import {
|
|
10
13
|
DEFAULT_NOLO_SERVER_URL
|
|
11
14
|
} from "./chunk-OLZBQWZU.js";
|
|
12
|
-
import {
|
|
13
|
-
asTrimmedLowercaseString
|
|
14
|
-
} from "./chunk-QSJ3HFEF.js";
|
|
15
15
|
import {
|
|
16
16
|
normalizeServerOrigin
|
|
17
17
|
} from "./chunk-CF7PE763.js";
|
|
18
|
+
import {
|
|
19
|
+
asTrimmedLowercaseString
|
|
20
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
18
21
|
|
|
19
22
|
// packages/cli/agentRunArgs.ts
|
|
20
23
|
import { readFileSync } from "node:fs";
|
|
@@ -69,11 +72,13 @@ var VALUELESS_FLAGS = {
|
|
|
69
72
|
"--dangerously-allow-shell": true,
|
|
70
73
|
"--trace-tools": true,
|
|
71
74
|
"--bg": true,
|
|
75
|
+
"--strict-continue-history": true,
|
|
72
76
|
"--no-stream": true,
|
|
73
77
|
"--debug": true,
|
|
74
78
|
"--ephemeral": true,
|
|
75
79
|
"--memory-only": true,
|
|
76
|
-
"--read-only": true
|
|
80
|
+
"--read-only": true,
|
|
81
|
+
"--machine-shell": true
|
|
77
82
|
};
|
|
78
83
|
function isValuelessFlag(arg) {
|
|
79
84
|
return Object.prototype.hasOwnProperty.call(VALUELESS_FLAGS, arg);
|
|
@@ -127,6 +132,9 @@ function buildLocalRunEnv(args) {
|
|
|
127
132
|
...args.env
|
|
128
133
|
};
|
|
129
134
|
}
|
|
135
|
+
function isValidRuntimeKey(key) {
|
|
136
|
+
return resolveCliLocalRuntimeKeyCapability(key.trim()).acceptedByCliArgs;
|
|
137
|
+
}
|
|
130
138
|
function writeUsage(output, commandPath) {
|
|
131
139
|
const commandName = commandPath?.join(" ");
|
|
132
140
|
if (commandName === "run") {
|
|
@@ -142,7 +150,7 @@ function writeUsage(output, commandPath) {
|
|
|
142
150
|
return;
|
|
143
151
|
}
|
|
144
152
|
output.write(
|
|
145
|
-
"Usage: nolo agent run <agent> <message> [--local|--server|--auto] [--ephemeral|--memory-only] [--continue <dialogId>] [--cwd <path>]\n nolo agent run --agent <agent> (--msg <message>|--msg-file <path>) [--image <url-or-path>] [--space <spaceId>] [--category <name>] [--inherit-from-dialog <dialog>] [--parent-dialog <dialog>] [--subject-dialog <dialog>] [--subject-ref <kind:id[:role]>] [--task-row-dbkey <key>] [--fallback-agent <agent>] (suggestions for agent to decide on quota) [--allowed-tool <tool>] [--blocked-tool <tool>] [--read-only] [--dod <cmd>] [--bg] [--timeout-ms <n>] [--events jsonl] [--no-stream] [--skill <dbKey-or-md-path>]\n"
|
|
153
|
+
"Usage: nolo agent run <agent> <message> [--local|--server|--auto] [--runtime-key <key>] [--ephemeral|--memory-only] [--continue <dialogId>] [--cwd <path>]\n nolo agent run --agent <agent> (--msg <message>|--msg-file <path>) [--image <url-or-path>] [--space <spaceId>] [--category <name>] [--inherit-from-dialog <dialog>] [--parent-dialog <dialog>] [--subject-dialog <dialog>] [--subject-ref <kind:id[:role]>] [--task-row-dbkey <key>] [--fallback-agent <agent>] (suggestions for agent to decide on quota) [--allowed-tool <tool>] [--blocked-tool <tool>] [--read-only] [--runtime-key <key>] [--machine-shell] [--dod <cmd>] [--bg] [--timeout-ms <n>] [--events jsonl] [--no-stream] [--skill <dbKey-or-md-path>]\n"
|
|
146
154
|
);
|
|
147
155
|
}
|
|
148
156
|
function parseAgentRunArgs(args, options = {}) {
|
|
@@ -156,6 +164,32 @@ function parseAgentRunArgs(args, options = {}) {
|
|
|
156
164
|
const rawMessage = explicitMsg ?? fileMessage ?? positional.slice(isNoLoginRunShorthand ? 0 : 1).join(" ");
|
|
157
165
|
if (!agentKey || !rawMessage.trim()) return null;
|
|
158
166
|
const message = rawMessage.trim();
|
|
167
|
+
const rawRuntimeKey = readFlagValue(args, "--runtime-key");
|
|
168
|
+
const runtimeKey = rawRuntimeKey?.trim();
|
|
169
|
+
if (args.includes("--runtime-key") && !runtimeKey) {
|
|
170
|
+
throw new Error(
|
|
171
|
+
"runtimeKey \u5FC5\u987B\u662F\u975E\u7A7A\u7684 listRuntimes key\uFF08local | server | machine:<machineId> | docker | docker:<runtimeId> | instabox | gcp\uFF09"
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
const hasModeFlag = args.includes("--local") || args.includes("--server") || args.includes("--auto");
|
|
175
|
+
const dockerRuntimeLocalKey = runtimeKey !== void 0 && /^docker(:.+)?$/.test(runtimeKey);
|
|
176
|
+
const instaboxRuntimeLocalKey = runtimeKey === "instabox";
|
|
177
|
+
const localSandboxCombination = (dockerRuntimeLocalKey || instaboxRuntimeLocalKey) && args.includes("--local");
|
|
178
|
+
if (runtimeKey && hasModeFlag && !localSandboxCombination) {
|
|
179
|
+
throw new Error(
|
|
180
|
+
"\u4E0D\u80FD\u540C\u65F6\u6307\u5B9A --local/--server/--auto \u4E0E --runtime-key\uFF08\u4F4D\u7F6E\u6B67\u4E49\uFF09\uFF1A--runtime-key \u5DF2\u76F4\u63A5\u6307\u5B9A\u6267\u884C\u540E\u7AEF\uFF08\u5982 gcp\u3001machine:<id>\uFF09\uFF0C\u8BF7\u79FB\u9664 --local/--server/--auto\uFF08\u4F8B\u5916\uFF1A--local + docker / instabox \u662F\u5408\u6CD5\u7EC4\u5408\uFF0C\u8868\u793A\u300C\u672C\u673A\u6C99\u76D2\u5185\u6267\u884C\u300D\uFF09"
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
if (runtimeKey && !isValidRuntimeKey(runtimeKey)) {
|
|
184
|
+
throw new Error(
|
|
185
|
+
`\u672A\u77E5\u6216\u65E0\u6548\u7684 runtimeKey "${runtimeKey}"\u3002\u53EF\u9009\u503C\uFF1Alocal | server | machine:<machineId> | docker | docker:<runtimeId> | instabox | gcp`
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
if (runtimeKey && args.includes("--machine-shell")) {
|
|
189
|
+
throw new Error(
|
|
190
|
+
"\u4E0D\u80FD\u540C\u65F6\u6307\u5B9A --machine-shell \u4E0E --runtime-key\uFF1A--machine-shell \u5DF2\u628A\u6D3E\u53D1\u9501\u5230\u7ED1\u5B9A\u673A\u5668\u7684 server \u901A\u9053\uFF0CruntimeKey \u4F1A\u5931\u6548\uFF0C\u8BF7\u53EA\u4FDD\u7559\u5176\u4E2D\u4E00\u4E2A"
|
|
191
|
+
);
|
|
192
|
+
}
|
|
159
193
|
const runtimeMode = runtimeModeFromArgs(args);
|
|
160
194
|
const continueDialogId = readFlagValue(args, "--continue") ?? readFlagValue(args, "--dialog");
|
|
161
195
|
const spaceId = readFlagValue(args, "--space");
|
|
@@ -208,10 +242,13 @@ function parseAgentRunArgs(args, options = {}) {
|
|
|
208
242
|
...artifactIds?.length ? { artifactIds } : {}
|
|
209
243
|
}
|
|
210
244
|
} : {},
|
|
211
|
-
...runtimeMode ? { runtimeMode } : fullstackLocalWorkspaceDefault || explicitLocalCliAgentDefault || args.includes("--dangerously-allow-shell") ? { runtimeMode: "local" } : {},
|
|
245
|
+
...runtimeMode ? { runtimeMode } : !runtimeKey && (fullstackLocalWorkspaceDefault || explicitLocalCliAgentDefault || args.includes("--dangerously-allow-shell")) ? { runtimeMode: "local" } : {},
|
|
246
|
+
...runtimeKey ? { runtimeKey } : {},
|
|
212
247
|
background: args.includes("--bg"),
|
|
213
248
|
noStream: args.includes("--no-stream"),
|
|
249
|
+
machineShell: args.includes("--machine-shell"),
|
|
214
250
|
...continueDialogId ? { continueDialogId } : {},
|
|
251
|
+
...args.includes("--strict-continue-history") ? { strictContinueHistory: true } : {},
|
|
215
252
|
...!continueDialogId && spaceId ? { spaceId } : {},
|
|
216
253
|
...category ? { category } : {},
|
|
217
254
|
...inheritedRef?.dialogKey ? { inheritedFromDialogKey: inheritedRef.dialogKey } : {},
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// packages/agent-runtime/executionBackend.ts
|
|
2
|
+
var EXECUTION_BACKEND_KINDS = [
|
|
3
|
+
"full-host",
|
|
4
|
+
"hosted-workspace",
|
|
5
|
+
"machine-connector",
|
|
6
|
+
"local-sandbox",
|
|
7
|
+
"remote-executor",
|
|
8
|
+
"cloud"
|
|
9
|
+
];
|
|
10
|
+
function unique(values) {
|
|
11
|
+
return [...new Set(values)];
|
|
12
|
+
}
|
|
13
|
+
function buildExecutionTicket(args) {
|
|
14
|
+
const { runGrant } = args;
|
|
15
|
+
const target = runGrant.target.kind === "machine" ? {
|
|
16
|
+
kind: "machine",
|
|
17
|
+
machineId: runGrant.target.machineId,
|
|
18
|
+
...runGrant.target.connectorSurface ? { connectorSurface: runGrant.target.connectorSurface } : {}
|
|
19
|
+
} : { kind: "server" };
|
|
20
|
+
const shellAllowed = runGrant.toolSurface.finalToolNames.includes("execShell") && runGrant.workspace.readScope !== "none" && runGrant.workspace.writeScope !== "none" && (runGrant.target.kind !== "machine" || runGrant.machine?.permissionPolicy.allowShell === true);
|
|
21
|
+
const maxRunSeconds = runGrant.runtimeToolPolicy?.budget?.maxRunSeconds;
|
|
22
|
+
return {
|
|
23
|
+
version: 1,
|
|
24
|
+
ticketId: args.ticketId,
|
|
25
|
+
grantId: runGrant.grantId,
|
|
26
|
+
issuedAt: runGrant.issuedAt,
|
|
27
|
+
agentKey: runGrant.agentKey,
|
|
28
|
+
...runGrant.callerUserId ? { callerUserId: runGrant.callerUserId } : {},
|
|
29
|
+
executionClass: args.executionClass ?? "session",
|
|
30
|
+
target,
|
|
31
|
+
toolNames: unique(runGrant.toolSurface.finalToolNames),
|
|
32
|
+
filesystem: {
|
|
33
|
+
readScope: runGrant.workspace.readScope,
|
|
34
|
+
readableRoots: [...runGrant.workspace.readableRoots],
|
|
35
|
+
writeScope: runGrant.workspace.writeScope,
|
|
36
|
+
writableRoots: [...runGrant.workspace.writableRoots]
|
|
37
|
+
},
|
|
38
|
+
shellAllowed,
|
|
39
|
+
requestedIsolation: runGrant.runtimeToolPolicy?.isolation?.mode ?? "none",
|
|
40
|
+
...typeof maxRunSeconds === "number" && Number.isFinite(maxRunSeconds) && maxRunSeconds > 0 ? { maxRunSeconds } : {}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export {
|
|
45
|
+
EXECUTION_BACKEND_KINDS,
|
|
46
|
+
buildExecutionTicket
|
|
47
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createSelector
|
|
3
|
+
} from "./chunk-IJERIUXS.js";
|
|
4
|
+
import {
|
|
5
|
+
getAllServers,
|
|
6
|
+
getIsDesktopApp
|
|
7
|
+
} from "./chunk-6Q7UTJKR.js";
|
|
8
|
+
import {
|
|
9
|
+
SERVERS
|
|
10
|
+
} from "./chunk-LCBAMY2M.js";
|
|
11
|
+
import {
|
|
12
|
+
isLocalServerUrl
|
|
13
|
+
} from "./chunk-4SN6J65J.js";
|
|
14
|
+
|
|
15
|
+
// packages/app/settings/serverSelectors.ts
|
|
16
|
+
var resolveDesktopSafeServer = (value) => {
|
|
17
|
+
if (!getIsDesktopApp()) return value || SERVERS.MAIN;
|
|
18
|
+
return isLocalServerUrl(value) ? SERVERS.MAIN : value || SERVERS.MAIN;
|
|
19
|
+
};
|
|
20
|
+
var selectSettings = (state) => state.settings;
|
|
21
|
+
var selectCurrentServer = createSelector(
|
|
22
|
+
[selectSettings],
|
|
23
|
+
(settings) => resolveDesktopSafeServer(settings.currentServer)
|
|
24
|
+
);
|
|
25
|
+
var selectSyncServers = createSelector(
|
|
26
|
+
[selectSettings],
|
|
27
|
+
(settings) => (settings.syncServers || []).filter(
|
|
28
|
+
(server) => !getIsDesktopApp() || !isLocalServerUrl(server)
|
|
29
|
+
)
|
|
30
|
+
);
|
|
31
|
+
var selectRemoteServer = selectCurrentServer;
|
|
32
|
+
var selectRemoteSyncServers = selectSyncServers;
|
|
33
|
+
var selectRemoteServers = createSelector(
|
|
34
|
+
[selectRemoteServer, selectRemoteSyncServers],
|
|
35
|
+
(currentServer, syncServers) => getAllServers(currentServer, syncServers)
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
selectCurrentServer,
|
|
40
|
+
selectSyncServers,
|
|
41
|
+
selectRemoteServers
|
|
42
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
asRecordOrEmpty
|
|
3
3
|
} from "./chunk-KX6YBIHG.js";
|
|
4
|
+
import {
|
|
5
|
+
isOwnedAgentKey,
|
|
6
|
+
ownedAgentKey,
|
|
7
|
+
publicAgentKey
|
|
8
|
+
} from "./chunk-M2EJHDJP.js";
|
|
4
9
|
import {
|
|
5
10
|
asNonEmptyStringArray,
|
|
6
11
|
asTrimmedNonEmptyStringArray
|
|
7
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-I42VC5KR.js";
|
|
8
13
|
import {
|
|
9
14
|
asOptionalFiniteNumber
|
|
10
15
|
} from "./chunk-WWC7I6TA.js";
|
|
11
16
|
import {
|
|
12
17
|
isRecord
|
|
13
18
|
} from "./chunk-KUG52IAP.js";
|
|
14
|
-
import {
|
|
15
|
-
isOwnedAgentKey,
|
|
16
|
-
ownedAgentKey,
|
|
17
|
-
publicAgentKey
|
|
18
|
-
} from "./chunk-M2EJHDJP.js";
|
|
19
19
|
import {
|
|
20
20
|
asOptionalTrimmedString
|
|
21
21
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -49,7 +49,30 @@ var HIGH_RISK_MUTATION_TOOL_NAMES = [
|
|
|
49
49
|
"editFile",
|
|
50
50
|
"deleteDialogs",
|
|
51
51
|
"deleteMemory",
|
|
52
|
-
"taskStop"
|
|
52
|
+
"taskStop",
|
|
53
|
+
// 能力包(loadSkill 授予)里的写/删/部署/记忆写入/进程启动类工具:
|
|
54
|
+
// 只读 run 的授予通道会过同一份 blockedToolNames,名单缺项即可被绕过。
|
|
55
|
+
// 契约测试(runtimeToolSurface.test.ts)按名字关键字钉住 CAPABILITY_PACKS 的分类。
|
|
56
|
+
"applyEdit",
|
|
57
|
+
"applyLineEdits",
|
|
58
|
+
"launchProcess",
|
|
59
|
+
"rememberMemory",
|
|
60
|
+
"appFileWrite",
|
|
61
|
+
"appFileReplace",
|
|
62
|
+
"appDeploy",
|
|
63
|
+
"appDelete",
|
|
64
|
+
"createTable",
|
|
65
|
+
"addTableRow",
|
|
66
|
+
"addTableRows",
|
|
67
|
+
"updateTableRow",
|
|
68
|
+
"deleteTableRow",
|
|
69
|
+
// 媒体任务译文写回:改写 job 的 translate 产物(服务端零计费、无外部副作用),
|
|
70
|
+
// 但仍是「写」,只读 run 不该拿到写回能力;契约测试按名字关键字钉住这份分类。
|
|
71
|
+
"writeTranslations",
|
|
72
|
+
// 编排副作用:startAgentRun 会另起一次 run(子 run 的只读与否由调用方参数决定),
|
|
73
|
+
// controlAgentRun 能追加指令/停止它;只读 run 不应拿到这两个(review A-1)。
|
|
74
|
+
"startAgentRun",
|
|
75
|
+
"controlAgentRun"
|
|
53
76
|
];
|
|
54
77
|
function resolveReadOnlyToolConstraints(additionalBlockedTools) {
|
|
55
78
|
return {
|
|
@@ -1261,16 +1284,19 @@ var AGENT_SELECTION_PRIORITY_INSTRUCTIONS = ` - \u4F18\u5148\u7EA7\u5951\u7EA6
|
|
|
1261
1284
|
(4) \u5176\u4ED6\u81EA\u5EFA Agent\uFF08isOwned=true\uFF09
|
|
1262
1285
|
(5) \u516C\u5F00 / \u5E73\u53F0 Agent\uFF08billingSource="platform_credits" \u6216\u793E\u533A\u516C\u5F00\uFF09
|
|
1263
1286
|
\u540C\u6863\u4F4D\u4E0B\u6536\u85CF\u9879\u6309\u6700\u8FD1\u6536\u85CF\uFF08favoritedAt\uFF09\u4F18\u5148\uFF0C\u5176\u4F59\u6309\u6700\u8FD1\u66F4\u65B0\uFF08updatedAt\uFF09\u4F18\u5148\u3002
|
|
1287
|
+
\u6B64\u6392\u5E8F\u662F\u5019\u9009\u4F18\u5148\u7EA7\u5206\u7EC4\uFF08\u4E0D\u662F\u6A21\u578B\u80FD\u529B tier\uFF09\uFF0C\u53EA\u51B3\u5B9A\u5019\u9009\u8D44\u683C\u4E0E\u5206\u7EC4\u5148\u540E\uFF0C\u4E0D\u4EE3\u8868\u300C\u6392\u7B2C\u4E00\u7684\u5C31\u8BE5\u9009\u300D\uFF1A\u7EC4\u5185\u6309\u300C\u9009\u4EBA\u300D\u56DB\u6B65\uFF08\u9886\u57DF\u80DC\u4EFB\u5148\u884C\u3001tier \u5F31\u5148\u9A8C\uFF09\u4E0E\u5F53\u6B21\u53EF\u7528\u6027\u6311\u9009\uFF08reviewer \u89C1\u300Creviewer \u9009\u4EBA\u300D\uFF09\u3002
|
|
1264
1288
|
4. \u516C\u5F00 Agent \u53D1\u73B0\uFF1A\u4EC5\u5F53 preferred \u5217\u8868\u4E2D\u6CA1\u6709\u9002\u5408\u4E14\u53EF\u7528\u7684\u5019\u9009\uFF0C\u6216\u7528\u6237\u660E\u786E\u8981\u6C42\u63A2\u7D22\u516C\u5F00 Agent \u65F6\uFF0C\u624D\u663E\u5F0F\u8C03\u7528 listAgents({ scope: "public" })\u3002\u516C\u5F00 Agent \u53EF\u80FD\u6D88\u8017 platform_credits\uFF0C\u5FC5\u987B\u5728\u83B7\u5F97\u7528\u6237\u660E\u786E\u6263\u8D39\u6388\u6743\u540E\u624D\u80FD\u8C03\u7528\u3002
|
|
1265
|
-
- \u6536\u85CF\u4F18\u5148\u786C\u95E8\uFF08\
|
|
1289
|
+
- \u6536\u85CF\u4F18\u5148\u786C\u95E8\uFF08\u8986\u76D6\u9876\u6863\u6210\u672C\u95E8\uFF09\uFF1A\u5F53\u5B58\u5728\u53EF\u7528\u4E14\u9002\u5408\u4EFB\u52A1\u7684\u6536\u85CF user_subscription / user_api / local Agent \u65F6\uFF0C\u7981\u6B62\u6539\u6D3E platform_credits\u3002favorite + platform_credits \u53EA\u8868\u793A\u7528\u6237\u8868\u8FBE\u8FC7\u504F\u597D\u5E76\u56E0\u6B64\u8FDB\u5165 preferred discovery\uFF0C\u4E0D\u4EE3\u8868\u514D\u8D39\u6216\u514D\u6388\u6743\uFF1B\u4F7F\u7528\u5B83\u4ECD\u987B\u9075\u5B88\u5E73\u53F0\u79EF\u5206\u6263\u8D39\u544A\u77E5/\u6388\u6743\u89C4\u5219\u3002\u4F46\u6CE8\u610F\u533A\u5206\uFF1AbillingSource="owner_subscription" \u7684\u6536\u85CF Agent\uFF08\u975E\u81EA\u6709\u3001\u8DD1 owner \u7684\u8BA2\u9605\u901A\u9053\uFF09\u4E0D\u5C5E\u4E8E\u6B64\u5217\u2014\u2014\u5B83\u662F\u53EF\u76F4\u63A5\u4F7F\u7528\u7684\uFF0C\u4E0D\u4EA7\u751F\u4EFB\u4F55\u6263\u8D39\uFF0C\u4E0D\u8981\u5BF9\u5B83\u7D22\u53D6\u6263\u8D39\u6388\u6743\u3001\u4E5F\u4E0D\u8981\u56E0\u6B64\u6539\u6D3E\u5E73\u53F0 Agent\u3002\u6BCF\u6B21 startAgentRun \u90FD\u521B\u5EFA\u72EC\u7ACB\u7684 run/dialog\uFF1B\u5E76\u884C\u6D3E\u53D1\u65F6\u5FC5\u987B\u7528\u5404\u81EA\u7684 runId\uFF0C\u5E76\u7528 batchId \u7BA1\u7406\u6279\u6B21\uFF0C\u907F\u514D\u7F16\u6392\u5C42\u6DF7\u6DC6\u7ED3\u679C\u3002\u4EC5\u5F53\u6536\u85CF Agent \u786E\u8BA4\u4E0D\u53EF\u7528\u540E\u624D\u5141\u8BB8\u6D3E\u5E73\u53F0 Agent\uFF0C\u4E14\u5FC5\u987B\u5F53\u6B21\u544A\u77E5\u7528\u6237\u5C06\u6D88\u8017\u5E73\u53F0\u79EF\u5206\u3002
|
|
1266
1290
|
- \u5339\u914D\u53C2\u8003\uFF1A\u6309\u4EFB\u52A1\u6240\u9700\u80FD\u529B\u7B5B tools \u5B57\u6BB5\uFF1B\u540C\u6863\u5019\u9009\u4F18\u5148\u6210\u672C\u4F4E\uFF08\u4F4E inputPrice\uFF09\u6216\u8D70\u7528\u6237\u79C1\u6709\u51ED\u636E\u7684\u901A\u9053\u3002tools \u5B57\u6BB5\u53EA\u53CD\u6620\u989D\u5916\u80FD\u529B\uFF0C\u4E0D\u53CD\u6620 coding \u80FD\u529B\u2014\u2014\u4EE3\u7801\u5DE5\u5177\u7531 host \u81EA\u52A8\u6CE8\u5165\uFF0Ctools=[] \u4E0D\u4EE3\u8868\u4E0D\u80FD\u5199\u4EE3\u7801\uFF0C\u4E0D\u8981\u636E\u6B64\u6392\u9664\u5019\u9009\u3002
|
|
1267
1291
|
- reset-aware economics\uFF08\u53EA\u4F5C\u540C\u6863\u3001\u9002\u5408\u3001\u5F53\u524D\u53EF\u7528\u5019\u9009\u4E4B\u95F4\u7684\u7ECF\u6D4E\u504F\u597D\uFF0C\u4E0D\u8986\u76D6\u6536\u85CF\u786C\u95E8\u3001\u80FD\u529B\u5339\u914D\u6216\u53EF\u7528\u6027\uFF09\uFF1AlistAgents \u5DF2\u66B4\u9732 economics\uFF08\u5B98\u65B9\u5CF0\u8C37\u4EF7\u683C/\u914D\u989D\u500D\u7387\uFF09\u548C quota\uFF08\u4E0A\u6E38\u771F\u5B9E remaining/limit/utilization/resetAt \u7A97\u53E3\uFF09\u3002\u5BF9\u4E8E billingSource="user_subscription"\uFF0C\u82E5 quota \u7A97\u53E3\u540C\u65F6\u7ED9\u51FA\u672A\u7528\u989D\u5EA6\u4FE1\u53F7\uFF08remaining/limit \u6216 utilization\uFF09\u4E14 resetAt \u5728\u672A\u6765\uFF0C\u4E14\u8BE5\u7A97\u53E3\u4EE3\u8868\u8BA2\u9605\u989D\u5EA6\u672C\u8EAB\uFF08\u5982 Claude \u8BA2\u9605\u7684 5h/7d \u914D\u989D\u7A97\u53E3\u8FD9\u7C7B\u4E0D\u7528\u5C31\u4F5C\u5E9F\u7684\u5DF2\u4ED8\u989D\u5EA6\uFF09\uFF0C\u800C\u4E0D\u662F\u7EAF\u541E\u5410\u5BB9\u91CF\uFF0C\u5219\u8FD9\u90E8\u5206\u5DF2\u4ED8\u989D\u5EA6\u4F1A\u5728 reset \u540E\u5931\u6548\uFF1B\u5728\u8D28\u91CF/\u80FD\u529B\u90FD\u8DB3\u591F\u65F6\uFF0Creset \u8D8A\u8FD1\u4E14\u672A\u7528\u989D\u5EA6\u8D8A\u591A\uFF0C\u8D8A\u5E94\u4F18\u5148\u6D88\u8017\uFF0C\u907F\u514D\u628A\u5DF2\u4ED8\u6B3E\u989D\u5EA6\u767D\u767D\u8FC7\u671F\u540E\u518D\u53BB\u4EA7\u751F PAYG / platform \u6210\u672C\u3002\u4E0D\u8981\u56E0\u4E3A\u53EA\u6709 resetAt \u5C31\u63A8\u65AD\u201C\u8FD8\u6709\u53EF\u7528\u989D\u5EA6\u201D\uFF0C\u4E5F\u4E0D\u8981\u628A billingSource="user_api" \u7684 requests/tokens rate-limit reset\u3001nextAvailableAt\uFF08429 \u51B7\u5374\u6062\u590D\uFF09\u8BEF\u5F53\u6210\u201C\u5DF2\u4ED8\u989D\u5EA6\u8FC7\u671F\u201D\uFF1B\u5B83\u4EEC\u662F\u5BB9\u91CF/\u53EF\u7528\u6027\u4FE1\u53F7\uFF0C\u4E0D\u662F\u7ECF\u6D4E\u4F18\u60E0\u3002\u901A\u7528 requests/tokens rate-limit \u5BB9\u91CF\u7A97\u53E3\u5373\u4F7F\u51FA\u73B0\u5728 billingSource="user_subscription" \u901A\u9053\u4E0A\uFF0C\u4E5F\u53EA\u662F\u901F\u7387\u5BB9\u91CF\u800C\u975E\u4F1A\u8FC7\u671F\u7684\u5DF2\u4ED8\u8D44\u4EA7\uFF0C\u4E0D\u5F97\u89E6\u53D1\u8BE5\u504F\u597D\uFF1B\u5206\u4E0D\u6E05\u7A97\u53E3\u8BED\u4E49\u65F6\u6309\u5BB9\u91CF\u5904\u7406\uFF0C\u4E0D\u6309\u7ECF\u6D4E\u8D44\u4EA7\u5904\u7406\u3002owner_subscription \u4E0D\u5360\u5F53\u524D\u7528\u6237\u989D\u5EA6\uFF0C\u4ECD\u6309\u201C\u8C03\u7528\u8005\u4E0E\u5E73\u53F0\u96F6\u65B0\u589E\u6210\u672C\u201D\u7406\u89E3\uFF0C\u4F46\u4E0D\u8981\u628A owner \u7684 quota \u5F53\u6210\u5F53\u524D\u7528\u6237\u9700\u8981\u4E3B\u52A8\u70E7\u5B8C\u7684\u8D44\u4EA7\u3002\u82E5 economics \u663E\u793A\u5373\u5C06\u8DE8 peak/off_peak \u6216 quotaMultiplier/priceMultiplier \u5C06\u53D8\u5316\uFF0C\u628A changesAt \u4E0E\u4EFB\u52A1\u9884\u8BA1\u65F6\u957F\u4E00\u8D77\u8003\u8651\uFF1B\u8BC1\u636E\u4E0D\u8DB3\u65F6\u4FDD\u6301 neutral\uFF0C\u4E0D\u731C\u3002
|
|
1268
1292
|
- isOwned=true\u3001isOAuth=true \u6216 apiSource="custom" \u7684\u5019\u9009\u6309\u4F18\u5148\u7EA7\u5951\u7EA6\u5904\u7406\u3002
|
|
1269
|
-
- qualityContext \u662F task-domain-specific
|
|
1293
|
+
- qualityContext \u662F task-domain-specific evidence\uFF0C\u5206\u4E24\u79CD\u7528\u9014\uFF1A\u2460 \u80DC\u4EFB\u6027\u7B5B\u9009\u2014\u2014\u5339\u914D\u9886\u57DF\u5185\u6709\u660E\u786E\u4E0D\u9002\u914D\u8BC1\u636E\u7684\u5019\u9009\u53EF\u76F4\u63A5\u6392\u9664\uFF08\u300C\u9009\u4EBA\u300D\u7B2C 1 \u6B65\uFF09\uFF0C\u5148\u4E8E\u4F18\u5148\u7EA7\u5206\u7EC4\u4E0E\u6210\u672C\u89C4\u5219\uFF1B\u2461 \u80DC\u4EFB\u5019\u9009\u4E4B\u95F4\u7684\u6BD4\u8F83\u2014\u2014\u8FD9\u65F6\u624D\u6392\u5728\u73B0\u6709\u4F18\u5148\u7EA7 / \u6210\u672C / \u53EF\u7528\u6027\u89C4\u5219\u4E4B\u540E\u53C2\u8003\u3002
|
|
1270
1294
|
\u6BCF\u884C\u5F62\u5982 \`dimension [direction] (benchmark version): model=score\`\u3002\u6BCF\u4E2A dimension\uFF08preference / rubric / slop / repetition / length / task_success \u7B49\uFF09\u90FD\u662F\u4E00\u6761\u72EC\u7ACB evidence\uFF0C\u4E0D\u662F\u603B\u5206\u7684\u4E00\u90E8\u5206\u3002
|
|
1271
1295
|
direction \u53EA\u662F\u6307\u6807\u65B9\u5411\uFF1Ahigher_better \u8D8A\u9AD8\u8D8A\u597D\uFF0Clower_better \u8D8A\u4F4E\u8D8A\u597D\uFF0Cneutral \u53EA\u63CF\u8FF0\u884C\u4E3A\u7279\u5F81\uFF08\u5982\u8F93\u51FA\u957F\u5EA6\uFF09\uFF0C\u4E0D\u4EE3\u8868\u4F18\u52A3\u3002
|
|
1272
1296
|
\u7981\u6B62\u628A\u4E0D\u540C dimension \u76F8\u52A0 / \u5E73\u5747 / \u5F52\u4E00\u5316\uFF0C\u6216\u751F\u6210 overall score / winner / rank\uFF1B\u7981\u6B62\u8DE8 benchmark identity \u6BD4\u8F83 raw score\uFF1B\u540C\u4E00 dimension \u5185\u53EA\u6BD4\u8F83\u540C\u4E00\u884C\u7684\u540C\u7C7B benchmark evidence\u3002
|
|
1273
1297
|
\u672A\u5217\u51FA\u7684 model \u6216 dimension \u8868\u793A\u6CA1\u6709 curated evidence\uFF1A\u4E0D\u662F 0\uFF0C\u4E5F\u4E0D\u662F\u8F83\u5F31\u3002\u54EA\u4E9B dimension \u66F4\u91CD\u8981\u7531\u5F53\u524D\u4EFB\u52A1\u51B3\u5B9A\uFF0C\u4E0D\u8981\u5199\u6B7B\u6743\u91CD\u3002
|
|
1298
|
+
- speedContext \u901F\u5EA6\u89C4\u5219\uFF1A\u4E0A\u4E0B\u6587\u660E\u786E\u7684\u6267\u884C\u578B\u4EFB\u52A1\uFF08\u76EE\u6807/\u6587\u4EF6/\u9A8C\u6536\u5DF2\u8BB2\u6E05\uFF0C\u53EA\u9700\u7167\u505A\uFF09\u4E2D\uFF0C\u514D\u8D39\u79C1\u6709\u901A\u9053\uFF08billingSource \u4E3A user_subscription / owner_subscription / user_api / local\uFF09\u4E4B\u95F4\u901F\u5EA6\u4F18\u5148\uFF1A\u5148\u770B firstOutput\uFF08\u9996\u4E2A\u8F93\u51FA\u8017\u65F6\uFF0C\u8D8A\u77ED\u8D8A\u597D\uFF09\uFF0C\u518D\u770B tps\uFF08\u8D8A\u9AD8\u8D8A\u597D\uFF09\u3002\u901F\u5EA6\u6392\u5E8F\u53EA\u5728\u540C\u4E3A observed \u7684\u884C\u4E4B\u95F4\u8FDB\u884C\uFF1Baa \u884C\u4EC5\u4F5C\u5F31\u53C2\u8003\uFF0C\u4E0D\u4F5C\u901F\u5EA6\u4E3B\u4F9D\u636E\u3002\u672C\u6761\u5728\u514D\u8D39\u79C1\u6709\u901A\u9053\u5185\u90E8\u8986\u76D6\u4E0A\u9762\u7684\u4F18\u5148\u7EA7\u5206\u7EC4 (1)~(4) \u6392\u5E8F\uFF0C\u4F46\u53EA\u5728\u300C\u9009\u4EBA\u300D\u7B5B\u51FA\u7684\u80DC\u4EFB\u5019\u9009\u4E4B\u95F4\u6BD4\u8F83\u901F\u5EA6\uFF1A\u4E0D\u80FD\u56E0\u66F4\u5FEB\u628A\u4E0D\u80DC\u4EFB\u7684\u5019\u9009\u6392\u4E0A\u6765\uFF1B\u6536\u85CF\u4E0D\u4F5C\u5206\u7EC4\u95E8\u69DB\uFF0C\u53EA\u5728\u901F\u5EA6\u76F8\u8FD1\u65F6\u4F5C\u6B21\u7EA7\u6392\u5E8F\uFF1B\u6536\u85CF\u4F18\u5148\u786C\u95E8\u4ECD\u53EA\u7EA6\u675F\u4E0D\u5F97\u6539\u6D3E platform_credits\u3002\u63A2\u7D22\u578B\u4EFB\u52A1\u548C\u6DF1\u5EA6 review \u4ECD\u4EE5\u80FD\u529B\u4F18\u5148\uFF0C\u901F\u5EA6\u4E0D\u4F5C\u4E3B\u4F9D\u636E\u3002\u901F\u5EA6\u53EA\u5728\u514D\u8D39\u79C1\u6709\u901A\u9053\u4E4B\u95F4\u6BD4\u8F83\uFF0C\u4E0D\u8986\u76D6\u5E73\u53F0\u79EF\u5206\u6388\u6743\u4E0E 429 \u544A\u77E5\u5951\u7EA6\uFF0C\u4E0D\u80FD\u56E0\u4E3A\u5E73\u53F0 Agent \u66F4\u5FEB\u5C31\u6539\u6D3E\u5E73\u53F0\u3002
|
|
1299
|
+
\u6BCF\u884C\u6807\u6570\u636E\u6765\u6E90\uFF1Aobserved=\u672C\u7528\u6237\u6700\u8FD1\u771F\u5B9E\u8C03\u7528\uFF08n=\u6837\u672C\u6570\uFF0C\u6837\u672C\u5C11\u65F6\u53EF\u4FE1\u5EA6\u4F4E\uFF09\uFF0Caa=Artificial Analysis \u5FEB\u7167\uFF08\u542B\u601D\u8003\u65F6\u95F4\uFF0C\u4E0E observed \u4E0D\u53EF\u76F4\u63A5\u6BD4\u8F83\uFF09\uFF1Btps=n/a \u8868\u793A\u65E0\u53EF\u4FE1\u541E\u5410\u6837\u672C\uFF0C\u4E0D\u4EE3\u8868\u6162\u3002\u672A\u5217\u51FA\u7684 model \u8868\u793A\u6CA1\u6709\u901F\u5EA6\u6570\u636E\uFF0C\u4E0D\u662F\u6162\u3002\u7981\u6B62\u628A\u901F\u5EA6\u4E0E qualityContext \u5408\u6210\u603B\u5206\u3002
|
|
1274
1300
|
- 429 \u9650\u6D41\u4E0E\u77E5\u60C5\u6743\u5951\u7EA6\uFF1A\u4EFB\u4F55\u7528\u6237\u79C1\u6709\u51ED\u636E\u4E0E\u81EA\u5EFA Agent\uFF08billingSource \u4E3A user_subscription / owner_subscription / user_api / local\uFF0C\u6216 isOwned=true\uFF09\u51FA\u73B0\u5728 listAgents \u7684 unavailableAgents\uFF08429 \u51B7\u5374\u671F\uFF09\u4E2D\u65F6\uFF0C\u7981\u6B62\u9759\u9ED8\u8DF3\u8FC7\uFF1B\u6539\u6D3E\u5E73\u53F0 Agent\uFF08\u6D88\u8017\u5E73\u53F0\u79EF\u5206\uFF09\u524D\u5FC5\u987B\u5728\u56DE\u590D\u4E2D\u544A\u77E5\u7528\u6237\uFF1A\u54EA\u4E2A\u8BA2\u9605/\u81EA\u5EFA agent \u9650\u6D41\u3001\u9884\u8BA1\u4F55\u65F6\u6062\u590D\uFF08nextAvailableAt\uFF09\u3001\u672C\u6B21\u5C06\u6263\u5E73\u53F0\u79EF\u5206\uFF1B\u4EFB\u52A1\u4E0D\u7D27\u6025\u5EFA\u8BAE\u7B49\u6062\u590D\u6216\u8BE2\u95EE\u7528\u6237\u3002`;
|
|
1275
1301
|
|
|
1276
1302
|
export {
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// packages/core/clientLogger.ts
|
|
2
|
+
var LOG_LEVELS = {
|
|
3
|
+
debug: 10,
|
|
4
|
+
info: 20,
|
|
5
|
+
warn: 30,
|
|
6
|
+
error: 40
|
|
7
|
+
};
|
|
8
|
+
var serializeValue = (value, seen = /* @__PURE__ */ new WeakSet()) => {
|
|
9
|
+
if (value instanceof Error) {
|
|
10
|
+
return {
|
|
11
|
+
name: value.name,
|
|
12
|
+
message: value.message,
|
|
13
|
+
...value.stack ? { stack: value.stack } : {}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (typeof value !== "object" || value === null) {
|
|
17
|
+
if (typeof value === "bigint") {
|
|
18
|
+
return value.toString();
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
if (seen.has(value)) {
|
|
23
|
+
return "[Circular]";
|
|
24
|
+
}
|
|
25
|
+
seen.add(value);
|
|
26
|
+
try {
|
|
27
|
+
if (Array.isArray(value)) {
|
|
28
|
+
return value.map((item) => serializeValue(item, seen));
|
|
29
|
+
}
|
|
30
|
+
return Object.fromEntries(
|
|
31
|
+
Object.entries(value).map(([key, item]) => [key, serializeValue(item, seen)])
|
|
32
|
+
);
|
|
33
|
+
} finally {
|
|
34
|
+
seen.delete(value);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var getLogLevel = () => {
|
|
38
|
+
const configured = typeof process !== "undefined" && typeof process.env?.NOLO_LOG_LEVEL === "string" ? process.env.NOLO_LOG_LEVEL : "info";
|
|
39
|
+
return LOG_LEVELS[configured] ?? LOG_LEVELS.info;
|
|
40
|
+
};
|
|
41
|
+
var writeLog = (level, name, fields, message) => {
|
|
42
|
+
if (LOG_LEVELS[level] < getLogLevel()) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const serializedFields = serializeValue(fields);
|
|
46
|
+
const payload = {
|
|
47
|
+
level,
|
|
48
|
+
...name ? { name } : {},
|
|
49
|
+
...serializedFields,
|
|
50
|
+
...message ? { msg: message } : {}
|
|
51
|
+
};
|
|
52
|
+
const output = JSON.stringify(payload);
|
|
53
|
+
const isNodeRuntime = typeof process !== "undefined" && typeof process.stderr?.write === "function";
|
|
54
|
+
if (isNodeRuntime) {
|
|
55
|
+
process.stderr.write(`${output}
|
|
56
|
+
`);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const consoleMethod = console[level] ?? console.log;
|
|
60
|
+
if (Object.keys(fields).length === 0 && message) {
|
|
61
|
+
consoleMethod(`[${name}] ${message}`);
|
|
62
|
+
} else {
|
|
63
|
+
consoleMethod(output);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var parseArgs = (first, second) => {
|
|
67
|
+
if (typeof first === "string") {
|
|
68
|
+
return { fields: {}, message: first };
|
|
69
|
+
}
|
|
70
|
+
return { fields: first ?? {}, message: second };
|
|
71
|
+
};
|
|
72
|
+
var createClientLogger = (name, parentFields = {}) => {
|
|
73
|
+
const log = (level, first, second) => {
|
|
74
|
+
const { fields, message } = parseArgs(first, second);
|
|
75
|
+
writeLog(level, name, { ...parentFields, ...fields }, message);
|
|
76
|
+
};
|
|
77
|
+
return {
|
|
78
|
+
debug: (first, second) => log("debug", first, second),
|
|
79
|
+
info: (first, second) => log("info", first, second),
|
|
80
|
+
warn: (first, second) => log("warn", first, second),
|
|
81
|
+
error: (first, second) => log("error", first, second),
|
|
82
|
+
child: (fields) => createClientLogger(name, { ...parentFields, ...fields })
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
createClientLogger
|
|
88
|
+
};
|