nolo-cli 0.92.0-alpha.1 → 0.92.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/{_executeModel-SKXPDRHT.js → _executeModel-SCZL7EYW.js} +63 -61
- package/{action-5DATYWOM.js → action-3ZOODRBC.js} +11 -11
- package/{addContentAction-5OLTVWIE.js → addContentAction-IJHG2ZV7.js} +9 -9
- package/{addDialogAgentAction-BRGMORV4.js → addDialogAgentAction-IGFS2UBX.js} +11 -11
- package/{agentDeleteCommand-KIJCEDIQ.js → agentDeleteCommand-CTZYXUBY.js} +45 -43
- package/{agentEmailCommands-KVJQBG6I.js → agentEmailCommands-M4RKRMV5.js} +84 -79
- package/{agentGrantCommands-YW6PQAQ2.js → agentGrantCommands-M3XFO6EN.js} +2 -2
- package/{agentListCommands-S2WK34WE.js → agentListCommands-QWBMMYNO.js} +74 -81
- package/{agentMachineCommands-ESEVMWBG.js → agentMachineCommands-CFGNRGKC.js} +39 -37
- package/{agentProviderCommands-I26OTLEQ.js → agentProviderCommands-TWB6E5WD.js} +1 -1
- package/{agentPullCommand-GLOOXJ2E.js → agentPullCommand-HF4A42D4.js} +3 -3
- package/agentRecordCommands-ZTUVMJOZ.js +131 -0
- package/{agentRunCommand-PQ2D3MTU.js → agentRunCommand-NARA7GSD.js} +82 -76
- package/{agentRunControl-XLGD3UZ5.js → agentRunControl-AVJR4JW4.js} +2 -2
- package/{agentRuntimeLocal-ZLZCZO3C.js → agentRuntimeLocal-OKYH7XBH.js} +40 -34
- package/{agentSlice-JF7MQKXG.js → agentSlice-L6BEWT2Q.js} +11 -11
- package/{appDeleteCommands-KHSC6H42.js → appDeleteCommands-2D2R56YU.js} +39 -37
- package/{appDeployCommands-KCCU76AG.js → appDeployCommands-R5PAA5YI.js} +39 -37
- package/{appDeployStatusCommands-UBGX7463.js → appDeployStatusCommands-VHTBTS3W.js} +39 -37
- package/{appGetCommands-CGVGNM5J.js → appGetCommands-G35QG2QG.js} +39 -37
- package/{appListCommands-JUVQUOGH.js → appListCommands-YQ2PKESX.js} +39 -37
- package/{authCommand-ETL233F2.js → authCommand-W6I6GD3F.js} +115 -23
- package/{authCommands-RGOGCPP6.js → authCommands-GBIFZWD3.js} +5 -5
- package/{builtinSkillRegistry-PJU2R6ST.js → builtinSkillRegistry-XG6RUDWO.js} +9 -8
- package/{chatQueueReduxAdapter-NIJ6XFDN.js → chatQueueReduxAdapter-OINFB5SN.js} +29 -29
- package/{chromeCommands-FZYAU75D.js → chromeCommands-K27J4OVZ.js} +124 -28
- package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-IXRLN57H.js} +4 -3
- package/{chunk-UYJKSCJ4.js → chunk-27ONFIEY.js} +22 -4
- package/{chunk-2HBFQM4C.js → chunk-2QX2MTNK.js} +25 -6
- package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
- package/{chunk-QTV7ZYBE.js → chunk-3BXNTXYI.js} +310 -136
- package/{chunk-6R425QS6.js → chunk-3IYMTWYZ.js} +22 -22
- package/{chunk-NTW5GWDM.js → chunk-3VNWWVKB.js} +2 -0
- package/{chunk-PNBZBDRM.js → chunk-4DPP773Q.js} +2 -2
- package/chunk-5J3PYNUP.js +255 -0
- package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
- package/{chunk-CDS4FQMP.js → chunk-5RUECWE2.js} +165 -15
- package/{chunk-DWUCB2A3.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-ZIK2FIX4.js → chunk-66MWFK6R.js} +9 -9
- package/{chunk-6YTOJY35.js → chunk-6D2JFXLY.js} +35 -0
- package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
- package/{chunk-NNJ4EAEH.js → chunk-6PPDYAMH.js} +7517 -1091
- package/{chunk-I2MX6JST.js → chunk-7KVZ5LDQ.js} +2 -2
- package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
- package/{chunk-UKWGR5SS.js → chunk-AUXHZ2M5.js} +186 -397
- package/{chunk-TLPTMSX3.js → chunk-AVKLJP6J.js} +94 -94
- package/{chunk-5NHGLCPL.js → chunk-AZRHIN5B.js} +1 -1
- package/{chunk-5LRIZC2W.js → chunk-B7ANJQWZ.js} +2 -2
- package/{chunk-3QC3NGWZ.js → chunk-BDHW7EBD.js} +4 -4
- package/{chunk-HNUNYXYB.js → chunk-BJUDYFV5.js} +10 -2
- package/chunk-BMQ2MJUK.js +153 -0
- package/{chunk-3JIXYIXV.js → chunk-BNGW5ASC.js} +12 -2
- package/{chunk-2D6QK26I.js → chunk-BPCPBG2O.js} +16 -16
- package/{chunk-SATOEEL6.js → chunk-BTSYHR7J.js} +4 -4
- package/{chunk-4B3TDK3S.js → chunk-CCOXTK3I.js} +30 -7
- package/{chunk-LS2ZANRJ.js → chunk-CTUQJVQM.js} +1 -1
- package/{chunk-43WRG6QQ.js → chunk-CUBJUVQS.js} +13 -13
- package/chunk-CYSYR67N.js +93 -0
- package/{chunk-PIOIPOSY.js → chunk-D76D3RTR.js} +2 -2
- package/{chunk-HQCSU3DI.js → chunk-DCLMZ5TX.js} +4 -4
- package/{chunk-UT5NALV3.js → chunk-EFZKILX6.js} +4 -4
- package/{chunk-2L3O7RDP.js → chunk-EMBK4B7D.js} +9 -4
- package/{chunk-HVURBGF3.js → chunk-ESRMFY7G.js} +2 -2
- package/{chunk-ABQYVJBJ.js → chunk-ETZWFV6M.js} +1 -1
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/{chunk-RAYTIPJ5.js → chunk-F64B2W3R.js} +110 -34
- package/{chunk-S6SP3GWJ.js → chunk-FIZ5TAVE.js} +1 -1
- package/{chunk-MOH3ETXO.js → chunk-GA77XY7N.js} +542 -447
- package/{chunk-2WHQZTB7.js → chunk-GMVELWJG.js} +3 -3
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-CJCJF5XB.js → chunk-H6A6X4EK.js} +36 -3
- package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
- package/{chunk-46TSVHGZ.js → chunk-HNRASX3X.js} +8 -8
- package/{chunk-CPH3W5A7.js → chunk-I3TQJXQ7.js} +94 -3
- package/{chunk-TZB6Y4OD.js → chunk-IBQ6NJI4.js} +34 -20
- package/{chunk-IP2RNQU3.js → chunk-LNPYTNMG.js} +9 -5
- package/{chunk-TLO2X5C6.js → chunk-LNUOUGIY.js} +1 -1
- package/{chunk-GII32WZW.js → chunk-M2EJHDJP.js} +3 -0
- package/{chunk-G3V74DVM.js → chunk-MV26343G.js} +75 -18
- package/{chunk-7S4YWN7P.js → chunk-MX574M24.js} +1 -1
- package/{chunk-U7HSBX3I.js → chunk-O26PCYLS.js} +80 -13
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-YNI45YOE.js → chunk-P4U2QMT5.js} +65 -37
- package/chunk-P6GMCCAT.js +870 -0
- package/{chunk-YQPWX5EE.js → chunk-PEXU23PJ.js} +23 -76
- package/{chunk-7GDFU22A.js → chunk-PHINMJJZ.js} +983 -226
- package/{chunk-YC2MP5NP.js → chunk-Q3SKC2TQ.js} +7 -7
- package/{chunk-NU2SOATM.js → chunk-Q7JFHTQT.js} +3 -3
- package/{chunk-YNNVVLMV.js → chunk-QALRKMHF.js} +11 -10
- package/{chunk-T67757YH.js → chunk-QDSINZM3.js} +1 -1
- package/{chunk-TUEPUNFO.js → chunk-QJLEMM2V.js} +1 -1
- package/{chunk-FEAPBZQW.js → chunk-QL32RJFG.js} +98 -22
- package/{chunk-EONDQISD.js → chunk-QMQBSKUP.js} +886 -154
- package/{chunk-BJ7HBUL2.js → chunk-QZYL5UNG.js} +1003 -1041
- package/{chunk-YDEMAQEY.js → chunk-R4SQ3LGW.js} +1 -1
- package/{chunk-TSD5BVVP.js → chunk-RESDFLXS.js} +13 -13
- package/{chunk-ZKYHTHNE.js → chunk-S5XGT6GB.js} +5 -3
- package/{chunk-SAFZABH7.js → chunk-SV5IJK6K.js} +1 -1
- package/{chunk-W6MEYAGX.js → chunk-TC6TTNZW.js} +45 -45
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/{chunk-S46FYEWL.js → chunk-U7ZDIW37.js} +1 -1
- package/chunk-UNYJU5L6.js +780 -0
- package/{chunk-VUHXTHIK.js → chunk-V2AB7ULS.js} +5 -5
- package/{chunk-QFMFJZLO.js → chunk-V7E4PXQD.js} +1 -1
- package/chunk-VJVNU77E.js +83 -0
- package/{chunk-6D6VBVEW.js → chunk-VPFEPRME.js} +9 -9
- package/{chunk-EKXNV6EM.js → chunk-X5VY2LEV.js} +2 -2
- package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
- package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
- package/{chunk-IMCXPAQV.js → chunk-YFIUVDQY.js} +6 -83
- package/{chunk-FZGV4FGK.js → chunk-YRRASA5Q.js} +268 -143
- package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
- package/{chunk-2F7RJC6L.js → chunk-ZOVKKMF6.js} +1 -1
- package/commandRegistry-T4PY3XBY.js +833 -0
- package/{contentThunks-N7MGBLZJ.js → contentThunks-7SBK3Y7B.js} +29 -29
- package/{cooldownCommands-BSCH2W7P.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-DNOR2HPB.js → createAgentAutomationAction-NPD23L7Y.js} +29 -29
- package/{createDialogAction-Y5CTGDHJ.js → createDialogAction-2JVPW2WV.js} +33 -32
- package/{createPageAction-HIQCWUNG.js → createPageAction-UUIPRGHK.js} +35 -35
- package/{dbSlice-NP52Y5TF.js → dbSlice-HFPIJT5P.js} +8 -8
- package/{deleteFile-YG6QMJLU.js → deleteFile-UEAD5A5Z.js} +3 -3
- package/{dialogCommands-RDCQ2IFS.js → dialogCommands-7JXIBGPD.js} +42 -40
- package/{dialogSlice-CCADNU4F.js → dialogSlice-Q2QUTMHK.js} +35 -29
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-7BQO7QFJ.js → docCreateCommands-2JDSCRGB.js} +41 -39
- package/{docDeleteCommands-AXWDDTVX.js → docDeleteCommands-Y4XRBWKE.js} +41 -39
- package/{docReadCommands-NMDWZKZW.js → docReadCommands-35FY3PYU.js} +40 -38
- package/{docStore-RSIMI5PS.js → docStore-FWQIXF33.js} +9 -9
- package/{docUpdateCommands-KFIRA6WM.js → docUpdateCommands-MT7YKSP7.js} +41 -39
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-67MEFPZR.js} +2 -2
- package/{getPricing-SLZYHJXY.js → getPricing-NMMFT3YI.js} +3 -3
- package/{handleSendMessageAction-ZIABBL3A.js → handleSendMessageAction-W33QLNXQ.js} +85 -82
- package/index.js +87 -884
- package/{localDialogRead-BTFJ4V2I.js → localDialogRead-EBRS242U.js} +2 -2
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-5W6IJRAD.js} +6 -6
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-3LRMNLCM.js} +1 -1
- package/{machineCommands-H6TGKZYD.js → machineCommands-HLEUUEKS.js} +77 -72
- package/{machineWsRunDispatch-YU4MGUB5.js → machineWsRunDispatch-DWBXW7XY.js} +75 -70
- package/{memberThunks-XJFHFZ5M.js → memberThunks-SKFZ37VS.js} +9 -9
- package/{models-WYXEJZAX.js → models-ZPU5EDF4.js} +2 -2
- package/oauthTokenStore-ITEB663N.js +23 -0
- package/{offlineMarxistsAgentCommand-JEWCIAWM.js → offlineMarxistsAgentCommand-HGXZV4XJ.js} +1 -1
- package/package.json +1 -1
- package/pdf-U6KSUEZZ.js +26435 -0
- package/processSpawn-SOAV3FEV.js +11 -0
- package/profileConfig-ZGOFORWV.js +43 -0
- package/{providerPresetApply-RWISXOW7.js → providerPresetApply-XTEXOH7X.js} +7 -7
- package/{providerRegistry-5KY7YV6K.js → providerRegistry-ADYDSLKR.js} +7 -7
- package/{read-KFAALANF.js → read-IEJLLUXY.js} +5 -5
- package/{readDocTool-XNMCT64I.js → readDocTool-4SPYCP2Y.js} +5 -3
- package/{readlineWorkspace-JTU5LTZI.js → readlineWorkspace-32ILQXZJ.js} +2398 -2019
- package/{removeDialogAgentAction-X3IS7JNU.js → removeDialogAgentAction-LILXTOQY.js} +14 -14
- package/{runAgentClientLoop-5TPQBYB6.js → runAgentClientLoop-MSCR5Y3E.js} +57 -56
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-3USD722U.js} +3 -3
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/{setDialogExtraReferencesAction-QTV3ZJNH.js → setDialogExtraReferencesAction-LVNHLNT5.js} +10 -10
- package/{setPrimaryDialogAgentAction-EUUISNQ2.js → setPrimaryDialogAgentAction-DCKO5NTW.js} +14 -14
- package/{settingSlice-UMATY3PD.js → settingSlice-CNE75ISY.js} +10 -10
- package/{spaceCommands-PR6QHSEG.js → spaceCommands-UYWX63IP.js} +41 -39
- package/{streamAgentChatTurn-TXMNTXML.js → streamAgentChatTurn-73OAEDOJ.js} +146 -85
- package/{switchDialogAgentAction-HWFDQNY5.js → switchDialogAgentAction-JSYUQ5CG.js} +11 -11
- package/{tableCommands-O6NWHFKV.js → tableCommands-G7RV3RU3.js} +4 -4
- package/{toolApiClient-7PSIFQPJ.js → toolApiClient-INIQCPGY.js} +3 -3
- package/{tools-GEVUKUVY.js → tools-6IUC3EFI.js} +51 -50
- package/{tuiSummaryLlmCaller-PKZYGY3B.js → tuiSummaryLlmCaller-RVWN63CP.js} +16 -15
- package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
- package/{updateDialogTitleAction-MFR3UGL5.js → updateDialogTitleAction-KCAY2OZF.js} +32 -32
- package/agentRecordCommands-TTYG2GYM.js +0 -126
- package/chunk-DMFLXNFM.js +0 -79
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-S7Z2HMCN.js +0 -25
- package/{chunk-VMFTFOWF.js → chunk-3AH7LNUB.js} +7 -7
- package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
- package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
|
@@ -4,15 +4,31 @@ import {
|
|
|
4
4
|
refreshAntigravityOAuthToken,
|
|
5
5
|
refreshOpenAiCodexToken,
|
|
6
6
|
xaiRefresh
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
defaultLoopbackRequest
|
|
10
|
-
} from "./chunk-EADNWBAZ.js";
|
|
7
|
+
} from "./chunk-O26PCYLS.js";
|
|
11
8
|
import {
|
|
12
9
|
createChromeConnectorClient,
|
|
13
10
|
createVerifiedChromeConnectorClient,
|
|
14
11
|
executeChromeConnectorTool
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YUNJN43V.js";
|
|
13
|
+
import {
|
|
14
|
+
clearCredentialAvailability,
|
|
15
|
+
markCredentialUnavailable,
|
|
16
|
+
readCredentialAvailability,
|
|
17
|
+
readCredentialEntry,
|
|
18
|
+
recordCredentialProbe
|
|
19
|
+
} from "./chunk-62IL3KQV.js";
|
|
20
|
+
import {
|
|
21
|
+
defaultLoopbackRequest
|
|
22
|
+
} from "./chunk-EADNWBAZ.js";
|
|
23
|
+
import {
|
|
24
|
+
buildLocalAgentLookupKeys
|
|
25
|
+
} from "./chunk-R4SQ3LGW.js";
|
|
26
|
+
import {
|
|
27
|
+
LOCAL_CODEX_AGENT_ID,
|
|
28
|
+
LOCAL_CODEX_AGENT_KEY,
|
|
29
|
+
NOLO_DEFAULT_AGENT_ID,
|
|
30
|
+
NOLO_DEFAULT_AGENT_KEY
|
|
31
|
+
} from "./chunk-SV5IJK6K.js";
|
|
16
32
|
import {
|
|
17
33
|
ackRunRecord,
|
|
18
34
|
appendRunQueue,
|
|
@@ -21,6 +37,7 @@ import {
|
|
|
21
37
|
commitRunRecordClaim,
|
|
22
38
|
findRunRecord,
|
|
23
39
|
gcRunRecords,
|
|
40
|
+
isRunTerminalStatus,
|
|
24
41
|
popAllQueueEntries,
|
|
25
42
|
queryRunRecords,
|
|
26
43
|
releaseRunRecordAck,
|
|
@@ -29,46 +46,32 @@ import {
|
|
|
29
46
|
terminateRunProcess,
|
|
30
47
|
transitionRunToTerminal,
|
|
31
48
|
withQueueLock
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import {
|
|
34
|
-
clearCredentialAvailability,
|
|
35
|
-
markCredentialUnavailable,
|
|
36
|
-
readCredentialAvailability,
|
|
37
|
-
readCredentialEntry,
|
|
38
|
-
recordCredentialProbe,
|
|
39
|
-
resolveCredentialKeyWithFallback
|
|
40
|
-
} from "./chunk-DWUCB2A3.js";
|
|
49
|
+
} from "./chunk-I3TQJXQ7.js";
|
|
41
50
|
import {
|
|
42
|
-
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import {
|
|
45
|
-
LOCAL_CODEX_AGENT_ID,
|
|
46
|
-
LOCAL_CODEX_AGENT_KEY,
|
|
47
|
-
NOLO_DEFAULT_AGENT_ID,
|
|
48
|
-
NOLO_DEFAULT_AGENT_KEY
|
|
49
|
-
} from "./chunk-SAFZABH7.js";
|
|
51
|
+
getDefaultCliLocalRuntimeDb
|
|
52
|
+
} from "./chunk-ZOVKKMF6.js";
|
|
50
53
|
import {
|
|
51
54
|
CliProviderQuotaError,
|
|
52
55
|
executeCli
|
|
53
56
|
} from "./chunk-MP64VFGD.js";
|
|
54
57
|
import {
|
|
55
58
|
inferCaptureIntent
|
|
56
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-QJLEMM2V.js";
|
|
57
60
|
import {
|
|
58
61
|
buildCliPrompt
|
|
59
62
|
} from "./chunk-ATNTHIZI.js";
|
|
60
63
|
import {
|
|
61
64
|
inlineImageUrlsForCustomProvider,
|
|
62
65
|
prepareTools
|
|
63
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-AVKLJP6J.js";
|
|
64
67
|
import {
|
|
65
68
|
getServerProviderSecret
|
|
66
69
|
} from "./chunk-HS7MLR74.js";
|
|
67
70
|
import {
|
|
68
|
-
CHROME_CONNECTOR_TOOL_NAMES,
|
|
69
71
|
CONTROL_AGENT_RUN_ACTIONS,
|
|
70
72
|
buildControlAgentRunFunctionSchema,
|
|
71
73
|
buildStartAgentRunFunctionSchema,
|
|
74
|
+
checkCredentialFanout,
|
|
72
75
|
deleteMemoryFunctionSchema,
|
|
73
76
|
queryMemoryFunctionSchema,
|
|
74
77
|
readXPostFunc,
|
|
@@ -78,7 +81,11 @@ import {
|
|
|
78
81
|
rememberMemoryFunctionSchema,
|
|
79
82
|
resolveAgentRequiredPackIds,
|
|
80
83
|
setTodoListFunc
|
|
81
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-GA77XY7N.js";
|
|
85
|
+
import {
|
|
86
|
+
deriveCredentialGroup,
|
|
87
|
+
deriveCustomProviderCredentialGroup
|
|
88
|
+
} from "./chunk-5RUECWE2.js";
|
|
82
89
|
import {
|
|
83
90
|
fetchWithTransientRetry,
|
|
84
91
|
isTransientFetchError
|
|
@@ -94,27 +101,27 @@ import {
|
|
|
94
101
|
isAgentRunTerminalStatus,
|
|
95
102
|
resolveRunLabel,
|
|
96
103
|
shortRunId
|
|
97
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-3VNWWVKB.js";
|
|
98
105
|
import {
|
|
99
106
|
applyBuiltinAgentRuntimeOverride,
|
|
100
107
|
applyTokenUsageToDayStats,
|
|
101
108
|
prepareTokenUsageData,
|
|
102
109
|
resolveBuiltinPlatformAgentConfig,
|
|
103
110
|
runKeyed
|
|
104
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-6PPDYAMH.js";
|
|
105
112
|
import {
|
|
106
113
|
BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
|
|
107
114
|
BUILTIN_TITLE_LLM_CONFIG
|
|
108
115
|
} from "./chunk-MC4XLIJ7.js";
|
|
109
116
|
import {
|
|
110
117
|
fetchServerSyncedCredential
|
|
111
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-Q3SKC2TQ.js";
|
|
112
119
|
import {
|
|
113
120
|
require_date_fns
|
|
114
121
|
} from "./chunk-M76ECQRD.js";
|
|
115
122
|
import {
|
|
116
|
-
|
|
117
|
-
} from "./chunk-
|
|
123
|
+
getModelPricing
|
|
124
|
+
} from "./chunk-4DPP773Q.js";
|
|
118
125
|
import {
|
|
119
126
|
FORCED_TOOLS,
|
|
120
127
|
addDefaultLightWebToolsForConfiguredAgents,
|
|
@@ -124,16 +131,14 @@ import {
|
|
|
124
131
|
applySystemBuiltinSkillFilter,
|
|
125
132
|
expandEnabledPacks,
|
|
126
133
|
resolveEffectiveEnabledPacks
|
|
127
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-EMBK4B7D.js";
|
|
128
135
|
import {
|
|
129
136
|
DEFAULT_HYBRID_READ_TIMEOUT_MS,
|
|
130
137
|
Duration_exports,
|
|
131
138
|
Effect_exports,
|
|
132
139
|
Exit_exports,
|
|
133
140
|
Option_exports,
|
|
134
|
-
accumulateGeminiChunks,
|
|
135
141
|
aggregateResponsesStream,
|
|
136
|
-
buildGeminiGenerateContentRequest,
|
|
137
142
|
buildLoadSkillExecutor,
|
|
138
143
|
buildLocalDialogWritePlan,
|
|
139
144
|
buildLocalWorkspaceOpenAiTools,
|
|
@@ -146,22 +151,28 @@ import {
|
|
|
146
151
|
evaluateFileWritePolicy,
|
|
147
152
|
executeLocalToolWithPolicy,
|
|
148
153
|
executeOpenAiCompatibleChatCompletion,
|
|
149
|
-
fetchAntigravityCloudCodeCompletion,
|
|
150
154
|
filterRetainedLedgerRecords,
|
|
155
|
+
getAgentRuntimeToolParametersIndex,
|
|
151
156
|
internalListWorkspaceEntries,
|
|
152
157
|
internalSearchWorkspace,
|
|
153
|
-
isGemini3Model,
|
|
154
158
|
isLineRangeCovered,
|
|
155
159
|
localDialogMessageRecordToRuntimeMessage,
|
|
160
|
+
parseSyncServersEnv,
|
|
161
|
+
readDevinUpstreamFailure,
|
|
162
|
+
resolveOpenAiCompatibleProviderConfig,
|
|
163
|
+
summarizeToolArguments
|
|
164
|
+
} from "./chunk-QZYL5UNG.js";
|
|
165
|
+
import {
|
|
166
|
+
accumulateGeminiChunks,
|
|
167
|
+
buildGeminiGenerateContentRequest,
|
|
168
|
+
fetchAntigravityCloudCodeCompletion,
|
|
169
|
+
isGemini3Model,
|
|
156
170
|
parseSseDataLineJson,
|
|
157
171
|
parseSseDataLineObject,
|
|
158
|
-
parseSyncServersEnv,
|
|
159
172
|
parseUpstreamErrorBody,
|
|
160
173
|
resolveAntigravityFinishReason,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
summarizeToolArguments
|
|
164
|
-
} from "./chunk-BJ7HBUL2.js";
|
|
174
|
+
shouldUseGeminiNativeToolRoute
|
|
175
|
+
} from "./chunk-P6GMCCAT.js";
|
|
165
176
|
import {
|
|
166
177
|
PlatformStreamInterruptedError,
|
|
167
178
|
buildPlatformChatCompletionRequest,
|
|
@@ -170,17 +181,23 @@ import {
|
|
|
170
181
|
parsePlatformChatCompletionData,
|
|
171
182
|
parsePlatformChatCompletionResponse,
|
|
172
183
|
readPlatformChatSseCompletion,
|
|
173
|
-
readSseDataValues,
|
|
174
184
|
resolvePlatformChatProviderConfig,
|
|
175
185
|
shouldUsePlatformChatProvider
|
|
176
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-YFIUVDQY.js";
|
|
187
|
+
import {
|
|
188
|
+
readSseDataValues
|
|
189
|
+
} from "./chunk-GMZLP5DV.js";
|
|
177
190
|
import {
|
|
178
191
|
resolveAgentRuntimeConfigFromRecord,
|
|
179
192
|
resolveHistoricalToolContentCap
|
|
180
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-X5VY2LEV.js";
|
|
181
194
|
import {
|
|
182
195
|
isDevinOAuthAgent
|
|
183
196
|
} from "./chunk-5ZUL4CUO.js";
|
|
197
|
+
import {
|
|
198
|
+
buildDialogFallbackTitleFromUserInput,
|
|
199
|
+
normalizeDialogTitle
|
|
200
|
+
} from "./chunk-2MBTWINN.js";
|
|
184
201
|
import {
|
|
185
202
|
collectStablePromptPrefix,
|
|
186
203
|
convertMessagesToResponsesInput,
|
|
@@ -191,59 +208,65 @@ import {
|
|
|
191
208
|
buildNoloWorkspaceOpenAiTools,
|
|
192
209
|
parseNoloWorkspaceToolArguments,
|
|
193
210
|
resolveRuntimeToolSurfaceForAgent
|
|
194
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-LNPYTNMG.js";
|
|
195
212
|
import {
|
|
196
213
|
mergeAvailabilityDeadline,
|
|
197
214
|
resolveAvailabilityAction,
|
|
198
|
-
resolveCooldownGate
|
|
199
|
-
|
|
215
|
+
resolveCooldownGate,
|
|
216
|
+
resolveCredentialKeyWithFallback
|
|
217
|
+
} from "./chunk-H6A6X4EK.js";
|
|
200
218
|
import {
|
|
201
219
|
isAntigravityOAuthAgent
|
|
202
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-S5XGT6GB.js";
|
|
203
221
|
import {
|
|
204
222
|
resolvePlatformAuthToken
|
|
205
|
-
} from "./chunk-
|
|
206
|
-
import {
|
|
207
|
-
buildDialogFallbackTitleFromUserInput,
|
|
208
|
-
normalizeDialogTitle
|
|
209
|
-
} from "./chunk-2MBTWINN.js";
|
|
223
|
+
} from "./chunk-27ONFIEY.js";
|
|
210
224
|
import {
|
|
211
225
|
normalizeUsage
|
|
212
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-TC6TTNZW.js";
|
|
213
227
|
import {
|
|
214
228
|
clipCompactText,
|
|
215
229
|
createProviderCallTimingTracker,
|
|
216
230
|
finalizeProviderCallTiming,
|
|
217
231
|
observeMeaningfulProviderResponseAt,
|
|
218
232
|
withProviderCallTimingFields
|
|
219
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-F64B2W3R.js";
|
|
220
234
|
import {
|
|
221
235
|
estimateTokenCount
|
|
222
236
|
} from "./chunk-PSCNXBYA.js";
|
|
223
|
-
import {
|
|
224
|
-
isAdaptiveThinkingModelId
|
|
225
|
-
} from "./chunk-QTV7ZYBE.js";
|
|
226
|
-
import {
|
|
227
|
-
compactWhitespace
|
|
228
|
-
} from "./chunk-DWLEOOGR.js";
|
|
229
237
|
import {
|
|
230
238
|
createFileCredentialBroker,
|
|
231
239
|
resolveCurrentRunRuntimeToolPolicy,
|
|
232
240
|
resolveLocalWorkspaceExecutorOptionsFromPolicy,
|
|
233
241
|
resolveRequestedRuntimeToolNames
|
|
234
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-ESRMFY7G.js";
|
|
243
|
+
import {
|
|
244
|
+
compactWhitespace
|
|
245
|
+
} from "./chunk-DWLEOOGR.js";
|
|
246
|
+
import {
|
|
247
|
+
toErrorMessage
|
|
248
|
+
} from "./chunk-HNMXYYJR.js";
|
|
249
|
+
import {
|
|
250
|
+
anthropicOAuthModelMaxOutputTokens,
|
|
251
|
+
getModelConfig,
|
|
252
|
+
isAdaptiveThinkingModelId
|
|
253
|
+
} from "./chunk-3BXNTXYI.js";
|
|
235
254
|
import {
|
|
236
255
|
createOAuthTokenStore,
|
|
237
256
|
isTokenExpired,
|
|
238
257
|
readOAuthCredential,
|
|
239
258
|
resolveFreshAccessToken
|
|
240
|
-
} from "./chunk-
|
|
241
|
-
import {
|
|
242
|
-
toErrorMessage
|
|
243
|
-
} from "./chunk-HNMXYYJR.js";
|
|
259
|
+
} from "./chunk-HNGRBWYF.js";
|
|
244
260
|
import {
|
|
245
261
|
canonicalizeToolNames
|
|
246
|
-
} from "./chunk-
|
|
262
|
+
} from "./chunk-XUWRURDF.js";
|
|
263
|
+
import {
|
|
264
|
+
CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES,
|
|
265
|
+
canonicalizeChromeConnectorToolNames
|
|
266
|
+
} from "./chunk-5J3PYNUP.js";
|
|
267
|
+
import {
|
|
268
|
+
getLogger
|
|
269
|
+
} from "./chunk-UNYJU5L6.js";
|
|
247
270
|
import {
|
|
248
271
|
isCompiledBinary,
|
|
249
272
|
parseUserIdFromAuthToken
|
|
@@ -251,21 +274,39 @@ import {
|
|
|
251
274
|
import {
|
|
252
275
|
DEFAULT_NOLO_SERVER_URL
|
|
253
276
|
} from "./chunk-OLZBQWZU.js";
|
|
277
|
+
import {
|
|
278
|
+
isNoloHostedProvider,
|
|
279
|
+
isPlatformHostedImageModel
|
|
280
|
+
} from "./chunk-Y3PMXGLH.js";
|
|
254
281
|
import {
|
|
255
282
|
createTokenKey,
|
|
256
283
|
createTokenStatsKey,
|
|
257
284
|
createUserKey,
|
|
258
285
|
dialogMessageRange
|
|
259
|
-
} from "./chunk-
|
|
286
|
+
} from "./chunk-3AH7LNUB.js";
|
|
260
287
|
import {
|
|
261
288
|
asTrimmedLowercaseString
|
|
262
289
|
} from "./chunk-QSJ3HFEF.js";
|
|
263
|
-
import {
|
|
264
|
-
isSystemBuiltinTrustedAgentKey
|
|
265
|
-
} from "./chunk-3JIXYIXV.js";
|
|
266
290
|
import {
|
|
267
291
|
isRecord
|
|
268
292
|
} from "./chunk-KUG52IAP.js";
|
|
293
|
+
import {
|
|
294
|
+
PUBLIC_DEEPSEEK_V4_FLASH_AGENT_ID,
|
|
295
|
+
PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID,
|
|
296
|
+
PUBLIC_GLM_53_FLASH_AGENT_ID,
|
|
297
|
+
PUBLIC_GPT_IMAGE_2_CONTINUOUS_AGENT_ID,
|
|
298
|
+
PUBLIC_GPT_IMAGE_2_EDITOR_AGENT_ID,
|
|
299
|
+
PUBLIC_GPT_IMAGE_2_GENERATOR_AGENT_ID,
|
|
300
|
+
PUBLIC_NANO_BANANA_2_LITE_AGENT_ID,
|
|
301
|
+
builtinAgentCatalogEntryById,
|
|
302
|
+
isRetiredCatalogEntry,
|
|
303
|
+
isSystemBuiltinTrustedAgentKey
|
|
304
|
+
} from "./chunk-BNGW5ASC.js";
|
|
305
|
+
import {
|
|
306
|
+
parsePublicAgentId,
|
|
307
|
+
parseSystemAgentId,
|
|
308
|
+
publicAgentKey
|
|
309
|
+
} from "./chunk-M2EJHDJP.js";
|
|
269
310
|
import {
|
|
270
311
|
asTrimmedString
|
|
271
312
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -285,75 +326,6 @@ import {
|
|
|
285
326
|
__toESM
|
|
286
327
|
} from "./chunk-4VNS5WPM.js";
|
|
287
328
|
|
|
288
|
-
// packages/cli/client/localRuntimeDiagnostics.ts
|
|
289
|
-
import { ulid } from "ulid";
|
|
290
|
-
var preparedAgentRuntimeCache = /* @__PURE__ */ new Map();
|
|
291
|
-
var hybridStoreCache = /* @__PURE__ */ new Map();
|
|
292
|
-
function normalizeRuntimeCacheCwd(cwd) {
|
|
293
|
-
return (cwd?.trim() || process.cwd()).replace(/\/+$/, "") || ".";
|
|
294
|
-
}
|
|
295
|
-
function buildPreparedAgentCacheKey(args) {
|
|
296
|
-
const systemBuiltinSkillsKey = args.systemBuiltinSkills ? JSON.stringify(
|
|
297
|
-
Object.keys(args.systemBuiltinSkills).sort().map((key) => [key, args.systemBuiltinSkills?.[key]])
|
|
298
|
-
) : "default";
|
|
299
|
-
return `${args.userId}\0${args.agentRef}\0${args.cwd}\0${systemBuiltinSkillsKey}`;
|
|
300
|
-
}
|
|
301
|
-
function clearCliLocalRuntimePreparedAgentCache() {
|
|
302
|
-
preparedAgentRuntimeCache.clear();
|
|
303
|
-
hybridStoreCache.clear();
|
|
304
|
-
}
|
|
305
|
-
async function defaultLocalRuntimeDb() {
|
|
306
|
-
return getDefaultCliLocalRuntimeDb();
|
|
307
|
-
}
|
|
308
|
-
function createFallbackId() {
|
|
309
|
-
return ulid();
|
|
310
|
-
}
|
|
311
|
-
function logLocalRuntimeDiagnostic(event, fields) {
|
|
312
|
-
if (process.env.NOLO_LOCAL_RUNTIME_DEBUG !== "1" && process.env.NOLO_DEBUG !== "1") {
|
|
313
|
-
return;
|
|
314
|
-
}
|
|
315
|
-
console.error(`[nolo-local-runtime] ${event} ${JSON.stringify(fields)}`);
|
|
316
|
-
}
|
|
317
|
-
function summarizeOpenAiToolNames(tools) {
|
|
318
|
-
return tools.reduce((acc, tool) => {
|
|
319
|
-
const fn = tool.function;
|
|
320
|
-
const name = fn && typeof fn === "object" && "name" in fn && typeof fn.name === "string" ? fn.name : null;
|
|
321
|
-
if (name) acc.push(name);
|
|
322
|
-
return acc;
|
|
323
|
-
}, []);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
// packages/agent-runtime/agentRunIsolation.ts
|
|
327
|
-
var ORCHESTRATION_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
328
|
-
"startAgentRun",
|
|
329
|
-
"controlAgentRun",
|
|
330
|
-
"listAgents",
|
|
331
|
-
"readAgent",
|
|
332
|
-
"runStreamingAgent"
|
|
333
|
-
]);
|
|
334
|
-
var INTERACTION_REQUIRED_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
335
|
-
"ask_user"
|
|
336
|
-
]);
|
|
337
|
-
var SUBTASK_REMOVED_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
338
|
-
...ORCHESTRATION_TOOL_NAMES,
|
|
339
|
-
...INTERACTION_REQUIRED_TOOL_NAMES
|
|
340
|
-
]);
|
|
341
|
-
function isSubtaskRun(env) {
|
|
342
|
-
if (!env) return false;
|
|
343
|
-
const value = env.NOLO_AGENT_RUN_CHILD;
|
|
344
|
-
return typeof value === "string" && value.length > 0 && value !== "0";
|
|
345
|
-
}
|
|
346
|
-
var RUN_WAKE_CHANNEL_ENV = "NOLO_RUN_WAKE";
|
|
347
|
-
function hasRunWakeChannel(env) {
|
|
348
|
-
if (!env) return false;
|
|
349
|
-
const value = env[RUN_WAKE_CHANNEL_ENV];
|
|
350
|
-
return typeof value === "string" && value.length > 0 && value !== "0";
|
|
351
|
-
}
|
|
352
|
-
function filterToolNamesForRunKind(toolNames, isSubtask) {
|
|
353
|
-
if (!isSubtask) return [...toolNames];
|
|
354
|
-
return toolNames.filter((name) => !SUBTASK_REMOVED_TOOL_NAMES.has(name));
|
|
355
|
-
}
|
|
356
|
-
|
|
357
329
|
// packages/cli/tui/i18n.ts
|
|
358
330
|
var ZH_PATTERNS = /^zh/i;
|
|
359
331
|
function parseCliLocale(raw) {
|
|
@@ -532,24 +504,24 @@ var STRINGS = {
|
|
|
532
504
|
zh: "\u672C\u6B21\u56DE\u590D\u51FA\u9519\u3002\u5DF2\u6392\u961F\u7684\u6D88\u606F\u4ECD\u4FDD\u7559\uFF0C\u6309 Enter \u53EF\u91CD\u65B0\u53D1\u9001\u3002"
|
|
533
505
|
},
|
|
534
506
|
quotaExhaustedHint: {
|
|
535
|
-
en: "
|
|
536
|
-
zh: "
|
|
507
|
+
en: "This agent seems to have hit a quota/rate limit (HTTP 429).\nUse /agent to switch to another agent and keep going \u2014 the dialog context is preserved.",
|
|
508
|
+
zh: "\u5F53\u524D agent \u4F3C\u4E4E\u989D\u5EA6/\u901F\u7387\u53D7\u9650\uFF08429\uFF09\u3002\n\u53EF\u4EE5\u7528 /agent \u5207\u6362\u5230\u5176\u4ED6 agent \u540E\u7EE7\u7EED\uFF0C\u540C\u4E00\u5BF9\u8BDD\u4F1A\u4FDD\u7559\u4E0A\u4E0B\u6587\u3002"
|
|
537
509
|
},
|
|
538
510
|
balanceExhaustedHint: {
|
|
539
|
-
en: '
|
|
540
|
-
zh: "
|
|
511
|
+
en: 'Your message is saved in this dialog \u2014 top up, then send again or say "continue" to pick up where you left off.',
|
|
512
|
+
zh: "\u4F60\u521A\u53D1\u7684\u8BDD\u5DF2\u4FDD\u5B58\u5728\u5F53\u524D\u5BF9\u8BDD\u91CC\u2014\u2014\u5145\u503C\u540E\u76F4\u63A5\u518D\u8BF4\u4E00\u53E5\u6216\u8BF4\u300C\u7EE7\u7EED\u300D\u5373\u53EF\u63A5\u7740\u804A\uFF0C\u4E0D\u4F1A\u4E22\u4E0A\u4E0B\u6587\u3002"
|
|
541
513
|
},
|
|
542
514
|
balanceInsufficientReason: {
|
|
543
515
|
en: "Insufficient balance: requires > {required}, current balance {current}.",
|
|
544
516
|
zh: "\u4F59\u989D\u4E0D\u8DB3\uFF1A\u9700\u8981\u4F59\u989D > {required}\uFF0C\u5F53\u524D {current}\u3002"
|
|
545
517
|
},
|
|
546
518
|
dialogPreservedHint: {
|
|
547
|
-
en: '
|
|
548
|
-
zh: "
|
|
519
|
+
en: 'This turn failed, but the dialog is kept. Send another message (or say "continue") to keep going in the same conversation.',
|
|
520
|
+
zh: "\u672C\u8F6E\u5931\u8D25\u4E86\uFF0C\u4F46\u5BF9\u8BDD\u5DF2\u4FDD\u7559\u3002\u76F4\u63A5\u518D\u8BF4\u4E00\u53E5\uFF08\u6216\u8BF4\u300C\u7EE7\u7EED\u300D\uFF09\u5373\u53EF\u5728\u540C\u4E00\u5BF9\u8BDD\u91CC\u63A5\u7740\u804A\u3002"
|
|
549
521
|
},
|
|
550
522
|
dialogNotSavedHint: {
|
|
551
|
-
en: "
|
|
552
|
-
zh: "
|
|
523
|
+
en: "This turn did not create a dialog. Your next message will start a new conversation \u2014 restate what you need.",
|
|
524
|
+
zh: "\u672C\u8F6E\u6CA1\u6709\u5EFA\u6210\u5BF9\u8BDD\u3002\u4E0B\u4E00\u53E5\u4F1A\u662F\u65B0\u5BF9\u8BDD\u2014\u2014\u8BF7\u628A\u4F60\u60F3\u505A\u7684\u4E8B\u518D\u8BF4\u4E00\u904D\u3002"
|
|
553
525
|
},
|
|
554
526
|
copiedLastReply: {
|
|
555
527
|
en: "Copied the last reply to the clipboard.",
|
|
@@ -671,6 +643,15 @@ var STRINGS = {
|
|
|
671
643
|
// --- Tool trace copy ------------------------------------------------------
|
|
672
644
|
// The compact trace shows only status, never timing or output size: a line
|
|
673
645
|
// count told the user nothing actionable and the ms figure read as noise.
|
|
646
|
+
workingFallback: {
|
|
647
|
+
en: "Working\u2026",
|
|
648
|
+
zh: "\u5904\u7406\u4E2D\u2026"
|
|
649
|
+
},
|
|
650
|
+
// 回合结束的淡色收尾行:耗时 · 输出 token · 积分(后两段可缺省)。
|
|
651
|
+
turnSummaryOutput: {
|
|
652
|
+
en: "{0} out",
|
|
653
|
+
zh: "\u8F93\u51FA {0}"
|
|
654
|
+
},
|
|
674
655
|
thinkingActive: {
|
|
675
656
|
en: "Thinking\u2026",
|
|
676
657
|
zh: "\u601D\u8003\u4E2D\u2026"
|
|
@@ -679,6 +660,35 @@ var STRINGS = {
|
|
|
679
660
|
en: "Thinking: {0}",
|
|
680
661
|
zh: "\u601D\u8003\u4E2D\uFF1A{0}"
|
|
681
662
|
},
|
|
663
|
+
// --- Pre-delta turn phase labels (ctx-overflow-feedback batch 3) ----------
|
|
664
|
+
// Rendered on the spinner / activity line while the local runtime checks the
|
|
665
|
+
// context window, compacts history, or waits for the first model delta —
|
|
666
|
+
// the previously silent pre-delta window (batch 1/2a 修好 runtime 与 SSE,
|
|
667
|
+
// 这里补齐 CLI/TUI 的状态行投影)。compacting 行附带可取消提示:Esc /
|
|
668
|
+
// Ctrl+C 即 abort,语义与 localLoop 的 abortSignal 一致。
|
|
669
|
+
contextChecking: {
|
|
670
|
+
en: "Checking this model's context window\u2026",
|
|
671
|
+
zh: "\u6B63\u5728\u68C0\u67E5\u5F53\u524D\u6A21\u578B\u7684\u4E0A\u4E0B\u6587\u7A97\u53E3\u2026"
|
|
672
|
+
},
|
|
673
|
+
contextCompacting: {
|
|
674
|
+
en: "Compacting history\u2026 (Esc/Ctrl+C to cancel)",
|
|
675
|
+
zh: "\u6B63\u5728\u538B\u7F29\u5386\u53F2\u8BB0\u5F55\u2026\uFF08Esc/Ctrl+C \u53D6\u6D88\uFF09"
|
|
676
|
+
},
|
|
677
|
+
waitingForModel: {
|
|
678
|
+
en: "Waiting for the model\u2026",
|
|
679
|
+
zh: "\u6B63\u5728\u7B49\u5F85\u6A21\u578B\u54CD\u5E94\u2026"
|
|
680
|
+
},
|
|
681
|
+
// --- Local turn deadline failure (single actionable line) -----------------
|
|
682
|
+
// localLoop 主请求 idle deadline(DEFAULT_LLM_REQUEST_TIMEOUT_MS 兜底或调用方
|
|
683
|
+
// timeoutMs)到达后抛 code=LLM_REQUEST_TIMEOUT;generic 分支的「修本地
|
|
684
|
+
// 凭据」文案在这里是错误指引(请求已发出,问题在上游无响应)。
|
|
685
|
+
// 语义是 idle(静默窗):{0} 内没有任何新输出才放弃,不是说模型「完全没
|
|
686
|
+
// 响应」——文案必须与这个语义一致,否则会把正在生成的用户推向重复发送
|
|
687
|
+
// (2026-10 ctx-overflow-feedback review 修复 1)。
|
|
688
|
+
llmRequestTimedOut: {
|
|
689
|
+
en: "No new model output for {0}, so this turn was stopped. Your message was kept. Retry in this conversation, switch to another model, or run /compact first.",
|
|
690
|
+
zh: "\u6A21\u578B\u5DF2 {0} \u6CA1\u6709\u65B0\u8F93\u51FA\uFF0C\u672C\u8F6E\u5DF2\u505C\u6B62\u7B49\u5F85\uFF08\u53EF\u80FD\u4ECD\u5728\u751F\u6210\uFF09\u3002\u4F60\u7684\u6D88\u606F\u5DF2\u4FDD\u7559\u3002\u53EF\u5728\u672C\u5BF9\u8BDD\u91CD\u8BD5\u3001\u5207\u6362\u5230\u5176\u4ED6\u6A21\u578B\uFF0C\u6216\u5148 /compact \u538B\u7F29\u5BF9\u8BDD\u3002"
|
|
691
|
+
},
|
|
682
692
|
thinkingTraceLine: {
|
|
683
693
|
en: "\u273B Thought for {0}",
|
|
684
694
|
zh: "\u273B \u601D\u8003 {0}"
|
|
@@ -935,8 +945,8 @@ var STRINGS = {
|
|
|
935
945
|
zh: "\u5DF2\u4ECE\u526A\u8D34\u677F\u7C98\u8D34 {0} \u4E2A\u5B57\u7B26\u5230\u8349\u7A3F\u3002"
|
|
936
946
|
},
|
|
937
947
|
pasteStaleDropped: {
|
|
938
|
-
en: "
|
|
939
|
-
zh: "
|
|
948
|
+
en: "Discarded a clipboard read that finished after the draft changed.",
|
|
949
|
+
zh: "\u526A\u8D34\u677F\u8BFB\u53D6\u5B8C\u6210\u65F6\u8349\u7A3F\u5DF2\u53D8\u5316\uFF0C\u7ED3\u679C\u5DF2\u4E22\u5F03\u3002"
|
|
940
950
|
},
|
|
941
951
|
pasteFilePathHint: {
|
|
942
952
|
en: "file reference (path only, content not read): {0}",
|
|
@@ -984,6 +994,7 @@ var STRINGS = {
|
|
|
984
994
|
" /profile Show active profile",
|
|
985
995
|
" /update Update the nolo CLI install",
|
|
986
996
|
" /version Show version/update hint",
|
|
997
|
+
" /logs Show recent diagnostics and the log file path",
|
|
987
998
|
" /exit Leave the workspace",
|
|
988
999
|
"",
|
|
989
1000
|
"You can also type normally. nolo routes simple read/status requests to CLI commands and sends the rest to the current agent."
|
|
@@ -1025,6 +1036,7 @@ var STRINGS = {
|
|
|
1025
1036
|
" /profile \u67E5\u770B\u5F53\u524D\u914D\u7F6E\u73AF\u5883",
|
|
1026
1037
|
" /update \u66F4\u65B0 nolo CLI",
|
|
1027
1038
|
" /version \u67E5\u770B\u7248\u672C\u4E0E\u66F4\u65B0\u63D0\u793A",
|
|
1039
|
+
" /logs \u67E5\u770B\u6700\u8FD1\u8BCA\u65AD\u8BB0\u5F55\u4E0E\u65E5\u5FD7\u6587\u4EF6\u4F4D\u7F6E",
|
|
1028
1040
|
" /exit \u9000\u51FA\u5DE5\u4F5C\u533A",
|
|
1029
1041
|
"",
|
|
1030
1042
|
"\u4E5F\u53EF\u4EE5\u76F4\u63A5\u8F93\u5165\u81EA\u7136\u8BED\u8A00\u3002\u7B80\u5355\u7684\u8BFB\u53D6/\u72B6\u6001\u8BF7\u6C42\u4F1A\u8D70 CLI \u547D\u4EE4\uFF0C\u5176\u4F59\u4EA4\u7ED9\u5F53\u524D agent\u3002"
|
|
@@ -1037,11 +1049,27 @@ var STRINGS = {
|
|
|
1037
1049
|
en: "Unknown command: {0}\n\n",
|
|
1038
1050
|
zh: "\u672A\u77E5\u547D\u4EE4\uFF1A{0}\n\n"
|
|
1039
1051
|
},
|
|
1052
|
+
noConversationLinks: {
|
|
1053
|
+
en: "No links in this conversation yet.",
|
|
1054
|
+
zh: "\u672C\u4F1A\u8BDD\u8FD8\u6CA1\u6709\u51FA\u73B0\u94FE\u63A5\u3002"
|
|
1055
|
+
},
|
|
1056
|
+
conversationLinksCopyHint: {
|
|
1057
|
+
en: "Open one by copying its URL (Cmd/Ctrl + click, or select and copy).",
|
|
1058
|
+
zh: "\u590D\u5236\u5BF9\u5E94 URL \u5373\u53EF\u6253\u5F00\uFF08Cmd/Ctrl + \u70B9\u51FB\uFF0C\u6216\u9009\u4E2D\u590D\u5236\uFF09\u3002"
|
|
1059
|
+
},
|
|
1060
|
+
conversationLinksShowing: {
|
|
1061
|
+
en: "Links in this conversation (showing first {0} of {1}):",
|
|
1062
|
+
zh: "\u672C\u4F1A\u8BDD\u51FA\u73B0\u7684\u94FE\u63A5\uFF08\u663E\u793A\u524D {0} \u4E2A\uFF0C\u5171 {1} \u4E2A\uFF09\uFF1A"
|
|
1063
|
+
},
|
|
1040
1064
|
runtimeUsage: { en: "Usage: /runtime <auto|local|server>", zh: "\u7528\u6CD5\uFF1A/runtime <auto|local|server>" },
|
|
1041
1065
|
runtimeSet: { en: "Runtime: {0}", zh: "\u8FD0\u884C\u6A21\u5F0F\uFF1A{0}" },
|
|
1042
|
-
|
|
1043
|
-
en: "
|
|
1044
|
-
zh: "
|
|
1066
|
+
logsEmpty: {
|
|
1067
|
+
en: "No diagnostics recorded in this session.",
|
|
1068
|
+
zh: "\u672C\u6B21\u4F1A\u8BDD\u8FD8\u6CA1\u6709\u8BCA\u65AD\u8BB0\u5F55\u3002"
|
|
1069
|
+
},
|
|
1070
|
+
logsHeader: {
|
|
1071
|
+
en: "Recent diagnostics ({0} of {1}) \xB7 full log: {2}",
|
|
1072
|
+
zh: "\u6700\u8FD1\u8BCA\u65AD\uFF08{0}/{1} \u6761\uFF09\xB7 \u5B8C\u6574\u65E5\u5FD7\uFF1A{2}"
|
|
1045
1073
|
},
|
|
1046
1074
|
tasksRunning: { en: "Running processes ({0}):", zh: "\u8FD0\u884C\u4E2D\u7684\u8FDB\u7A0B\uFF08{0}\uFF09\uFF1A" },
|
|
1047
1075
|
tasksStopped: { en: "Stopped/exited ({0}):", zh: "\u5DF2\u505C\u6B62/\u5DF2\u9000\u51FA\uFF08{0}\uFF09\uFF1A" },
|
|
@@ -1203,12 +1231,12 @@ Use /switch, /switch list, /switch minimax-m3, or a full agent key.`,
|
|
|
1203
1231
|
zh: "\u65E0\u6CD5\u81EA\u52A8\u6253\u5F00\u6D4F\u89C8\u5668\uFF0C\u8BF7\u628A\u4E0A\u9762\u7684\u94FE\u63A5\u7C98\u8D34\u5230\u6D4F\u89C8\u5668\u91CC\u3002"
|
|
1204
1232
|
},
|
|
1205
1233
|
loginWaiting: {
|
|
1206
|
-
en: "
|
|
1207
|
-
zh: "
|
|
1234
|
+
en: "Waiting for browser authorization ({0} remaining)... (Ctrl+C to cancel)",
|
|
1235
|
+
zh: "\u7B49\u5F85\u6D4F\u89C8\u5668\u6388\u6743\uFF08\u5269\u4F59 {0}\uFF09\u2026\u2026\u6309 Ctrl+C \u53D6\u6D88"
|
|
1208
1236
|
},
|
|
1209
1237
|
loginStillWaiting: {
|
|
1210
|
-
en: "
|
|
1211
|
-
zh: "
|
|
1238
|
+
en: "Still waiting... ({0} remaining)",
|
|
1239
|
+
zh: "\u4ECD\u5728\u7B49\u5F85\u2026\u2026\uFF08\u5269\u4F59 {0}\uFF09"
|
|
1212
1240
|
},
|
|
1213
1241
|
loginSuccess: {
|
|
1214
1242
|
en: "Logged in. Token saved to profile; this session now uses it immediately.",
|
|
@@ -1343,6 +1371,11 @@ var TOOL_LABELS = {
|
|
|
1343
1371
|
function toolLabel(name) {
|
|
1344
1372
|
return TOOL_LABELS[name]?.[currentLocale] ?? name;
|
|
1345
1373
|
}
|
|
1374
|
+
function toolLabelVariants(name) {
|
|
1375
|
+
const entry = TOOL_LABELS[name];
|
|
1376
|
+
if (!entry) return [name];
|
|
1377
|
+
return [...new Set(Object.values(entry))];
|
|
1378
|
+
}
|
|
1346
1379
|
function agentRunCardLabels() {
|
|
1347
1380
|
return {
|
|
1348
1381
|
runStatus: t("runStatusLabel"),
|
|
@@ -1354,12 +1387,92 @@ function agentRunCardLabels() {
|
|
|
1354
1387
|
};
|
|
1355
1388
|
}
|
|
1356
1389
|
|
|
1390
|
+
// packages/agent-runtime/agentRunIsolation.ts
|
|
1391
|
+
var ORCHESTRATION_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1392
|
+
"startAgentRun",
|
|
1393
|
+
"controlAgentRun",
|
|
1394
|
+
"listAgents",
|
|
1395
|
+
"readAgent",
|
|
1396
|
+
"runStreamingAgent"
|
|
1397
|
+
]);
|
|
1398
|
+
var INTERACTION_REQUIRED_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1399
|
+
"ask_user"
|
|
1400
|
+
]);
|
|
1401
|
+
var SUBTASK_REMOVED_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1402
|
+
...ORCHESTRATION_TOOL_NAMES,
|
|
1403
|
+
...INTERACTION_REQUIRED_TOOL_NAMES
|
|
1404
|
+
]);
|
|
1405
|
+
function isSubtaskRun(env) {
|
|
1406
|
+
if (!env) return false;
|
|
1407
|
+
const value = env.NOLO_AGENT_RUN_CHILD;
|
|
1408
|
+
return typeof value === "string" && value.length > 0 && value !== "0";
|
|
1409
|
+
}
|
|
1410
|
+
var RUN_WAKE_CHANNEL_ENV = "NOLO_RUN_WAKE";
|
|
1411
|
+
function hasRunWakeChannel(env) {
|
|
1412
|
+
if (!env) return false;
|
|
1413
|
+
const value = env[RUN_WAKE_CHANNEL_ENV];
|
|
1414
|
+
return typeof value === "string" && value.length > 0 && value !== "0";
|
|
1415
|
+
}
|
|
1416
|
+
function filterToolNamesForRunKind(toolNames, isSubtask) {
|
|
1417
|
+
if (!isSubtask) return [...toolNames];
|
|
1418
|
+
return toolNames.filter((name) => !SUBTASK_REMOVED_TOOL_NAMES.has(name));
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
// packages/cli/client/localRuntimeDiagnostics.ts
|
|
1422
|
+
import { ulid } from "ulid";
|
|
1423
|
+
var preparedAgentRuntimeCache = /* @__PURE__ */ new Map();
|
|
1424
|
+
var hybridStoreCache = /* @__PURE__ */ new Map();
|
|
1425
|
+
function normalizeRuntimeCacheCwd(cwd) {
|
|
1426
|
+
return (cwd?.trim() || process.cwd()).replace(/\/+$/, "") || ".";
|
|
1427
|
+
}
|
|
1428
|
+
function buildPreparedAgentCacheKey(args) {
|
|
1429
|
+
const systemBuiltinSkillsKey = args.systemBuiltinSkills ? JSON.stringify(
|
|
1430
|
+
Object.keys(args.systemBuiltinSkills).sort().map((key) => [key, args.systemBuiltinSkills?.[key]])
|
|
1431
|
+
) : "default";
|
|
1432
|
+
return `${args.userId}\0${args.agentRef}\0${args.cwd}\0${systemBuiltinSkillsKey}`;
|
|
1433
|
+
}
|
|
1434
|
+
function clearCliLocalRuntimePreparedAgentCache() {
|
|
1435
|
+
preparedAgentRuntimeCache.clear();
|
|
1436
|
+
hybridStoreCache.clear();
|
|
1437
|
+
}
|
|
1438
|
+
async function defaultLocalRuntimeDb() {
|
|
1439
|
+
return getDefaultCliLocalRuntimeDb();
|
|
1440
|
+
}
|
|
1441
|
+
function createFallbackId() {
|
|
1442
|
+
return ulid();
|
|
1443
|
+
}
|
|
1444
|
+
function logLocalRuntimeDiagnostic(event, fields) {
|
|
1445
|
+
if (process.env.NOLO_LOCAL_RUNTIME_DEBUG !== "1" && process.env.NOLO_DEBUG !== "1") {
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1448
|
+
console.error(`[nolo-local-runtime] ${event} ${JSON.stringify(fields)}`);
|
|
1449
|
+
}
|
|
1450
|
+
function summarizeOpenAiToolNames(tools) {
|
|
1451
|
+
return tools.reduce((acc, tool) => {
|
|
1452
|
+
const fn = tool.function;
|
|
1453
|
+
const name = fn && typeof fn === "object" && "name" in fn && typeof fn.name === "string" ? fn.name : null;
|
|
1454
|
+
if (name) acc.push(name);
|
|
1455
|
+
return acc;
|
|
1456
|
+
}, []);
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1357
1459
|
// packages/agent-runtime/anthropicMessagesProvider.ts
|
|
1358
1460
|
import { randomUUID } from "node:crypto";
|
|
1359
1461
|
var ANTHROPIC_MESSAGES_URL = "https://api.anthropic.com/v1/messages";
|
|
1360
1462
|
var ANTHROPIC_API_VERSION = "2023-06-01";
|
|
1361
1463
|
var ANTHROPIC_OAUTH_BETA = "oauth-2025-04-20";
|
|
1362
|
-
|
|
1464
|
+
function resolveClaudeCodeVersion(rawEnv) {
|
|
1465
|
+
const DEFAULT_VERSION = "2.1.290";
|
|
1466
|
+
if (!rawEnv) return DEFAULT_VERSION;
|
|
1467
|
+
const trimmed = rawEnv.trim();
|
|
1468
|
+
if (/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(trimmed)) {
|
|
1469
|
+
return trimmed;
|
|
1470
|
+
}
|
|
1471
|
+
return DEFAULT_VERSION;
|
|
1472
|
+
}
|
|
1473
|
+
var CLAUDE_CODE_VERSION = resolveClaudeCodeVersion(
|
|
1474
|
+
process.env.NOLO_CLAUDE_CODE_VERSION || process.env.CLAUDE_CODE_VERSION
|
|
1475
|
+
);
|
|
1363
1476
|
var CLAUDE_CODE_USER_AGENT = `claude-cli/${CLAUDE_CODE_VERSION} (external, local-agent, agent-sdk/0.1.0)`;
|
|
1364
1477
|
var ANTHROPIC_OAUTH_BETA_HEADER = `claude-code-20250219,${ANTHROPIC_OAUTH_BETA}`;
|
|
1365
1478
|
var CLAUDE_CODE_SYSTEM_INSTRUCTION = "You are a Claude agent, built on Anthropic's Claude Agent SDK.";
|
|
@@ -1383,6 +1496,8 @@ function resolveThinkingBudget(effort) {
|
|
|
1383
1496
|
}
|
|
1384
1497
|
var DEFAULT_THINKING_EFFORT = "medium";
|
|
1385
1498
|
var DEFAULT_ENABLED_BUDGET = 8192;
|
|
1499
|
+
var DEFAULT_MAX_TOKENS = 8192;
|
|
1500
|
+
var NON_STREAMING_MAX_TOKENS = 21333;
|
|
1386
1501
|
var DEFAULT_ENABLE_THINKING_BUDGET = 8e3;
|
|
1387
1502
|
var ANTHROPIC_EFFORT_ALIASES = { minimal: "low" };
|
|
1388
1503
|
function resolveThinkingSpec(input) {
|
|
@@ -1462,11 +1577,23 @@ function pushMessage(messages, role, content) {
|
|
|
1462
1577
|
if (content.length === 0) return;
|
|
1463
1578
|
const previous = messages.at(-1);
|
|
1464
1579
|
if (previous?.role === role && Array.isArray(previous.content)) {
|
|
1465
|
-
previous.content
|
|
1580
|
+
const previousBlocks = previous.content;
|
|
1581
|
+
if (role === "user" && foldIntoTrailingToolResult(previousBlocks, content)) return;
|
|
1582
|
+
previousBlocks.push(...content);
|
|
1466
1583
|
return;
|
|
1467
1584
|
}
|
|
1468
1585
|
messages.push({ role, content });
|
|
1469
1586
|
}
|
|
1587
|
+
function foldIntoTrailingToolResult(blocks, extra) {
|
|
1588
|
+
const last = blocks.at(-1);
|
|
1589
|
+
if (!last || last.type !== "tool_result") return false;
|
|
1590
|
+
if (!extra.every((block) => block.type === "text" || block.type === "image")) {
|
|
1591
|
+
return false;
|
|
1592
|
+
}
|
|
1593
|
+
const existing = typeof last.content === "string" ? last.content.length > 0 ? [{ type: "text", text: last.content }] : [] : Array.isArray(last.content) ? last.content : [];
|
|
1594
|
+
last.content = [...existing, ...extra];
|
|
1595
|
+
return true;
|
|
1596
|
+
}
|
|
1470
1597
|
function hasClaudeCodeIdentity(system) {
|
|
1471
1598
|
return system.some((block) => {
|
|
1472
1599
|
if (!block || typeof block !== "object") return false;
|
|
@@ -1476,6 +1603,11 @@ function hasClaudeCodeIdentity(system) {
|
|
|
1476
1603
|
);
|
|
1477
1604
|
});
|
|
1478
1605
|
}
|
|
1606
|
+
function normalizeAnthropicWireModel(model) {
|
|
1607
|
+
if (model === "claude-opus-5.5") return "claude-opus-5-5";
|
|
1608
|
+
if (model === "claude-sonnet-5.5") return "claude-sonnet-5-5";
|
|
1609
|
+
return model;
|
|
1610
|
+
}
|
|
1479
1611
|
function buildAnthropicMessagesBody(args) {
|
|
1480
1612
|
const rawMessages = Array.isArray(args.openAiBody.messages) ? args.openAiBody.messages : [];
|
|
1481
1613
|
const system = [];
|
|
@@ -1557,7 +1689,10 @@ function buildAnthropicMessagesBody(args) {
|
|
|
1557
1689
|
}
|
|
1558
1690
|
const model = stringValue(args.openAiBody.model) ?? args.agentConfig.model ?? "claude-sonnet-5";
|
|
1559
1691
|
const maxTokensRaw = args.openAiBody.max_completion_tokens ?? args.openAiBody.max_tokens ?? args.agentConfig.max_tokens;
|
|
1560
|
-
const maxTokens = typeof maxTokensRaw === "number" && Number.isFinite(maxTokensRaw) ? Math.max(1, Math.floor(maxTokensRaw)) :
|
|
1692
|
+
const maxTokens = typeof maxTokensRaw === "number" && Number.isFinite(maxTokensRaw) ? Math.max(1, Math.floor(maxTokensRaw)) : Math.min(
|
|
1693
|
+
anthropicOAuthModelMaxOutputTokens(model) ?? DEFAULT_MAX_TOKENS,
|
|
1694
|
+
NON_STREAMING_MAX_TOKENS
|
|
1695
|
+
);
|
|
1561
1696
|
const reasoningEffort = stringValue(args.openAiBody.reasoning_effort) ?? stringValue(args.agentConfig.reasoning_effort);
|
|
1562
1697
|
const spec = resolveThinkingSpec({
|
|
1563
1698
|
model,
|
|
@@ -1582,7 +1717,7 @@ function buildAnthropicMessagesBody(args) {
|
|
|
1582
1717
|
}
|
|
1583
1718
|
}
|
|
1584
1719
|
return {
|
|
1585
|
-
model,
|
|
1720
|
+
model: normalizeAnthropicWireModel(model),
|
|
1586
1721
|
messages,
|
|
1587
1722
|
max_tokens: finalMaxTokens,
|
|
1588
1723
|
stream: false,
|
|
@@ -1594,6 +1729,12 @@ function buildAnthropicMessagesBody(args) {
|
|
|
1594
1729
|
...typeof args.openAiBody.top_p === "number" ? { top_p: args.openAiBody.top_p } : {}
|
|
1595
1730
|
};
|
|
1596
1731
|
}
|
|
1732
|
+
function mapAnthropicStopReason(stopReason, hasToolCalls) {
|
|
1733
|
+
if (hasToolCalls || stopReason === "tool_use") return "tool_calls";
|
|
1734
|
+
if (stopReason === "max_tokens" || stopReason === "model_context_window_exceeded") return "length";
|
|
1735
|
+
if (stopReason === "refusal") return "content_filter";
|
|
1736
|
+
return "stop";
|
|
1737
|
+
}
|
|
1597
1738
|
function mapAnthropicMessageToOpenAi(payload) {
|
|
1598
1739
|
const content = Array.isArray(payload.content) ? payload.content : [];
|
|
1599
1740
|
let text = "";
|
|
@@ -1617,10 +1758,13 @@ function mapAnthropicMessageToOpenAi(payload) {
|
|
|
1617
1758
|
const cacheCreationInputTokens = typeof usage.cache_creation_input_tokens === "number" ? usage.cache_creation_input_tokens : 0;
|
|
1618
1759
|
const cacheReadInputTokens = typeof usage.cache_read_input_tokens === "number" ? usage.cache_read_input_tokens : 0;
|
|
1619
1760
|
const outputTokens = typeof usage.output_tokens === "number" ? usage.output_tokens : 0;
|
|
1620
|
-
const stopReason =
|
|
1761
|
+
const stopReason = stringValue(payload.stop_reason) ?? "";
|
|
1621
1762
|
const message = { role: "assistant", content: text || null };
|
|
1622
1763
|
if (reasoning) message.reasoning_content = reasoning;
|
|
1623
1764
|
if (toolCalls.length > 0) message.tool_calls = toolCalls;
|
|
1765
|
+
const contentBlockTypes = content.flatMap(
|
|
1766
|
+
(raw) => raw && typeof raw === "object" && typeof raw.type === "string" ? [String(raw.type)] : []
|
|
1767
|
+
);
|
|
1624
1768
|
return {
|
|
1625
1769
|
id: stringValue(payload.id) ?? `chatcmpl_${randomUUID()}`,
|
|
1626
1770
|
object: "chat.completion",
|
|
@@ -1628,7 +1772,11 @@ function mapAnthropicMessageToOpenAi(payload) {
|
|
|
1628
1772
|
choices: [{
|
|
1629
1773
|
index: 0,
|
|
1630
1774
|
message,
|
|
1631
|
-
finish_reason: toolCalls.length > 0
|
|
1775
|
+
finish_reason: mapAnthropicStopReason(stopReason, toolCalls.length > 0),
|
|
1776
|
+
// 原始 Anthropic 终止原因与内容块类型,仅供诊断空回复/异常终止;
|
|
1777
|
+
// 不进入模型可见内容。
|
|
1778
|
+
anthropic_stop_reason: stopReason || null,
|
|
1779
|
+
anthropic_content_block_types: contentBlockTypes
|
|
1632
1780
|
}],
|
|
1633
1781
|
usage: {
|
|
1634
1782
|
// prompt_tokens/input_tokens are total input, including cache read/write.
|
|
@@ -1711,12 +1859,10 @@ var LOCAL_SERVER_MEMORY_TOOL_NAME_SET = new Set(
|
|
|
1711
1859
|
|
|
1712
1860
|
// packages/cli/client/localRuntimeTools.ts
|
|
1713
1861
|
var CLI_CHROME_CONNECTOR_TOOL_NAME_SET = new Set(
|
|
1714
|
-
|
|
1862
|
+
CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES
|
|
1715
1863
|
);
|
|
1716
1864
|
function filterCliChromeConnectorToolNames(toolNames) {
|
|
1717
|
-
return (toolNames
|
|
1718
|
-
(name) => CLI_CHROME_CONNECTOR_TOOL_NAME_SET.has(name)
|
|
1719
|
-
);
|
|
1865
|
+
return canonicalizeChromeConnectorToolNames(toolNames);
|
|
1720
1866
|
}
|
|
1721
1867
|
function buildCliChromeConnectorOpenAiTools(args) {
|
|
1722
1868
|
return prepareTools(filterCliChromeConnectorToolNames(args.toolNames));
|
|
@@ -2011,13 +2157,19 @@ var resolveAnthropicOAuthTransport = async (ctx) => {
|
|
|
2011
2157
|
const content = typeof message.content === "string" ? message.content : "";
|
|
2012
2158
|
const tool_calls = Array.isArray(message.tool_calls) ? message.tool_calls : void 0;
|
|
2013
2159
|
if (content && options?.onTextDelta) options.onTextDelta(content);
|
|
2160
|
+
const rawChoice = choice ?? {};
|
|
2161
|
+
const usage = result.body?.usage;
|
|
2014
2162
|
logLocalRuntimeDiagnostic("provider.request.result", {
|
|
2015
2163
|
agentKey: agentConfig.key,
|
|
2016
2164
|
transport: "anthropic-messages",
|
|
2017
2165
|
ok: true,
|
|
2018
2166
|
contentChars: content.length,
|
|
2019
2167
|
toolCallCount: tool_calls?.length ?? 0,
|
|
2020
|
-
requestedToolNames
|
|
2168
|
+
requestedToolNames,
|
|
2169
|
+
stopReason: rawChoice.anthropic_stop_reason ?? null,
|
|
2170
|
+
contentBlockTypes: rawChoice.anthropic_content_block_types ?? [],
|
|
2171
|
+
outputTokens: typeof usage?.output_tokens === "number" ? usage.output_tokens : null,
|
|
2172
|
+
...result.body?.id ? { messageId: result.body.id } : {}
|
|
2021
2173
|
});
|
|
2022
2174
|
return {
|
|
2023
2175
|
content,
|
|
@@ -2428,14 +2580,19 @@ var resolveAntigravityTransport = async (ctx) => {
|
|
|
2428
2580
|
requestedToolNames,
|
|
2429
2581
|
openAiToolNames: summarizeOpenAiToolNames(tools)
|
|
2430
2582
|
});
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2583
|
+
let lastUsedCredential = initialCredential;
|
|
2584
|
+
const resolveLocalCredential = async ({ forceRefresh }) => {
|
|
2585
|
+
const resolved = await resolveLocalAntigravityCredential({
|
|
2586
|
+
credentialOwnerUserId,
|
|
2587
|
+
apiKeyRefResolver,
|
|
2588
|
+
apiKeyRef: agentConfig.apiKeyRef,
|
|
2589
|
+
readCredential: () => readOAuthCredential("antigravity", void 0, legacyCredentialMigration),
|
|
2590
|
+
migration: legacyCredentialMigration,
|
|
2591
|
+
forceRefresh
|
|
2592
|
+
});
|
|
2593
|
+
lastUsedCredential = resolved;
|
|
2594
|
+
return resolved;
|
|
2595
|
+
};
|
|
2439
2596
|
let result;
|
|
2440
2597
|
try {
|
|
2441
2598
|
result = await invokeAntigravity({
|
|
@@ -2489,10 +2646,27 @@ var resolveAntigravityTransport = async (ctx) => {
|
|
|
2489
2646
|
};
|
|
2490
2647
|
}
|
|
2491
2648
|
if (result.status < 200 || result.status >= 300) {
|
|
2492
|
-
const
|
|
2493
|
-
|
|
2649
|
+
const upstreamError = result.body && typeof result.body === "object" && result.body.error && typeof result.body.error === "object" ? result.body.error : void 0;
|
|
2650
|
+
const errMsg = (
|
|
2651
|
+
// Google Cloud Code Assist gates calls behind a one-time account
|
|
2652
|
+
// verification and answers HTTP 403 with the validation link in
|
|
2653
|
+
// `error.details[].metadata.validation_url` — NOT in
|
|
2654
|
+
// `error.message`. Extracting only `error.message` here drops the
|
|
2655
|
+
// link before agentRun's extractGoogleValidationLink can recover
|
|
2656
|
+
// it, so when details are present we append them after the clean
|
|
2657
|
+
// message; the extractor scans raw text for validation_url so a
|
|
2658
|
+
// `details=[...]` suffix is enough, and the Detail line keeps its
|
|
2659
|
+
// readable `HTTP 403 <message>` headline. Plain-message errors
|
|
2660
|
+
// keep the old shape so existing output stays unchanged.
|
|
2661
|
+
upstreamError && Array.isArray(upstreamError.details) ? `${typeof upstreamError.message === "string" ? upstreamError.message : ""} details=${JSON.stringify(upstreamError.details)}`.trim() : typeof upstreamError?.message === "string" ? upstreamError.message : JSON.stringify(result.body)
|
|
2662
|
+
);
|
|
2663
|
+
const failure = new Error(
|
|
2494
2664
|
`local antigravity provider failed: HTTP ${result.status} ${errMsg}`
|
|
2495
2665
|
);
|
|
2666
|
+
if (lastUsedCredential?.accountId) {
|
|
2667
|
+
failure.credentialAccountId = lastUsedCredential.accountId;
|
|
2668
|
+
}
|
|
2669
|
+
throw failure;
|
|
2496
2670
|
}
|
|
2497
2671
|
const choice = Array.isArray(result.body?.choices) ? result.body.choices[0] : void 0;
|
|
2498
2672
|
const message = choice?.message ?? {};
|
|
@@ -2811,7 +2985,7 @@ var resolveCliProviderTransport = async (ctx) => {
|
|
|
2811
2985
|
// packages/agent-runtime/codexResponsesProvider.ts
|
|
2812
2986
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
2813
2987
|
var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
|
|
2814
|
-
var CODEX_CLIENT_VERSION = "0.
|
|
2988
|
+
var CODEX_CLIENT_VERSION = "0.159.2";
|
|
2815
2989
|
var CODEX_ORIGINATOR = "codex_cli_rs";
|
|
2816
2990
|
var CODEX_OPENAI_BETA = "responses=experimental";
|
|
2817
2991
|
var OPENAI_AUTH_CLAIM = "https://api.openai.com/auth";
|
|
@@ -7659,7 +7833,7 @@ var WriteRejectedSchema = /* @__PURE__ */ messageDesc(file_agent, 455);
|
|
|
7659
7833
|
|
|
7660
7834
|
// packages/agent-runtime/cursor/cursorProvider.ts
|
|
7661
7835
|
var CURSOR_API_URL = "https://api2.cursor.sh";
|
|
7662
|
-
var CURSOR_CLIENT_VERSION = "cli-2026.
|
|
7836
|
+
var CURSOR_CLIENT_VERSION = "cli-2026.09.18-9a7762b";
|
|
7663
7837
|
var CURSOR_REQUEST_PATH = "/agent.v1.AgentService/Run";
|
|
7664
7838
|
var CONNECT_END_STREAM_FLAG = 2;
|
|
7665
7839
|
var HEARTBEAT_INTERVAL_MS = 5e3;
|
|
@@ -8057,6 +8231,37 @@ function processCursorServerMessage(msg, state, onTextDelta, onReasoningDelta) {
|
|
|
8057
8231
|
state.outputTokens += tokens;
|
|
8058
8232
|
}
|
|
8059
8233
|
}
|
|
8234
|
+
function attachCursorUpstreamFailure(error, failure) {
|
|
8235
|
+
if (failure) {
|
|
8236
|
+
error.cursorUpstreamFailure = failure;
|
|
8237
|
+
}
|
|
8238
|
+
return error;
|
|
8239
|
+
}
|
|
8240
|
+
function readCursorUpstreamFailure(error) {
|
|
8241
|
+
if (!error || typeof error !== "object") return void 0;
|
|
8242
|
+
const failure = error.cursorUpstreamFailure;
|
|
8243
|
+
if (!failure || typeof failure !== "object") return void 0;
|
|
8244
|
+
if (typeof failure.status !== "number" || !Number.isFinite(failure.status)) {
|
|
8245
|
+
return void 0;
|
|
8246
|
+
}
|
|
8247
|
+
return failure;
|
|
8248
|
+
}
|
|
8249
|
+
function buildCursorGrpcTrailerError(trailers) {
|
|
8250
|
+
const status = trailers["grpc-status"];
|
|
8251
|
+
if (!status || String(status) === "0") return null;
|
|
8252
|
+
const rawMessage = String(trailers["grpc-message"] || "");
|
|
8253
|
+
let message;
|
|
8254
|
+
try {
|
|
8255
|
+
message = decodeURIComponent(rawMessage);
|
|
8256
|
+
} catch {
|
|
8257
|
+
message = rawMessage;
|
|
8258
|
+
}
|
|
8259
|
+
const statusText = String(status);
|
|
8260
|
+
return attachCursorUpstreamFailure(
|
|
8261
|
+
new Error(`Cursor gRPC error ${statusText}: ${message}`),
|
|
8262
|
+
statusText === "8" || statusText.toLowerCase() === "resource_exhausted" ? { status: 429, body: { code: "resource_exhausted", message } } : void 0
|
|
8263
|
+
);
|
|
8264
|
+
}
|
|
8060
8265
|
async function streamCursorChat(messages, options) {
|
|
8061
8266
|
const baseUrl = options.baseUrl || CURSOR_API_URL;
|
|
8062
8267
|
const clientVersion = options.clientVersion || CURSOR_CLIENT_VERSION;
|
|
@@ -8154,14 +8359,9 @@ async function streamCursorChat(messages, options) {
|
|
|
8154
8359
|
}
|
|
8155
8360
|
});
|
|
8156
8361
|
h2Request.on("trailers", (trailers) => {
|
|
8157
|
-
const
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
h2Completion.reject(
|
|
8161
|
-
new Error(
|
|
8162
|
-
`Cursor gRPC error ${status}: ${decodeURIComponent(String(msg || ""))}`
|
|
8163
|
-
)
|
|
8164
|
-
);
|
|
8362
|
+
const error = buildCursorGrpcTrailerError(trailers);
|
|
8363
|
+
if (error) {
|
|
8364
|
+
h2Completion.reject(error);
|
|
8165
8365
|
}
|
|
8166
8366
|
});
|
|
8167
8367
|
h2Request.on("end", () => {
|
|
@@ -9182,6 +9382,7 @@ function createCursorProvider(config) {
|
|
|
9182
9382
|
...config.executeTool ? { executeTool: config.executeTool } : {},
|
|
9183
9383
|
...config.searchWorkspace ? { searchWorkspace: config.searchWorkspace } : {},
|
|
9184
9384
|
...config.listWorkspaceEntries ? { listWorkspaceEntries: config.listWorkspaceEntries } : {},
|
|
9385
|
+
...options?.signal ? { signal: options.signal } : {},
|
|
9185
9386
|
...options?.onTextDelta ? { onTextDelta: options.onTextDelta } : {},
|
|
9186
9387
|
...options?.onReasoningDelta ? { onReasoningDelta: options.onReasoningDelta } : {},
|
|
9187
9388
|
...options?.onToolEvent ? { onToolEvent: options.onToolEvent } : {},
|
|
@@ -9232,7 +9433,7 @@ function assertWithinLocalToolBudget(args) {
|
|
|
9232
9433
|
|
|
9233
9434
|
// packages/cli/client/providerResolution/cursorTransport.ts
|
|
9234
9435
|
var resolveCursorTransport = async (ctx) => {
|
|
9235
|
-
const { agentConfig, deps, workspaceRoot, additionalToolNames, buildProviderOpenAiTools, apiKeyRefResolver, activeAgentToolNames, localToolExecutors } = ctx;
|
|
9436
|
+
const { agentConfig, deps, workspaceRoot, additionalToolNames, buildProviderOpenAiTools, apiKeyRefResolver, activeAgentToolNames, localToolExecutors, recordLocalAvailability } = ctx;
|
|
9236
9437
|
if (isCursorOAuthAgent(agentConfig)) {
|
|
9237
9438
|
const accessToken = await apiKeyRefResolver("cursor");
|
|
9238
9439
|
if (!accessToken) {
|
|
@@ -9259,6 +9460,8 @@ var resolveCursorTransport = async (ctx) => {
|
|
|
9259
9460
|
agentToolNames: activeAgentToolNames,
|
|
9260
9461
|
call,
|
|
9261
9462
|
executors: localToolExecutors,
|
|
9463
|
+
// 分发前参数闸门:与 host adapter 的 executeTool 同口径。
|
|
9464
|
+
toolParametersIndex: getAgentRuntimeToolParametersIndex(),
|
|
9262
9465
|
detachMs: resolveExecShellDetachMs(deps.env),
|
|
9263
9466
|
...deps.confirmDestructiveAction ? { confirmDestructiveAction: deps.confirmDestructiveAction } : {}
|
|
9264
9467
|
});
|
|
@@ -9308,15 +9511,24 @@ var resolveCursorTransport = async (ctx) => {
|
|
|
9308
9511
|
toolCount: tools.length,
|
|
9309
9512
|
requestedToolNames
|
|
9310
9513
|
});
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9514
|
+
try {
|
|
9515
|
+
const result = await cursorProvider.complete(messages, options);
|
|
9516
|
+
await recordLocalAvailability(200);
|
|
9517
|
+
logLocalRuntimeDiagnostic("provider.request.result", {
|
|
9518
|
+
agentKey: agentConfig.key,
|
|
9519
|
+
transport: "cursor-connect",
|
|
9520
|
+
ok: true,
|
|
9521
|
+
contentChars: (result.content ?? "").length,
|
|
9522
|
+
toolCallCount: result.tool_calls?.length ?? 0
|
|
9523
|
+
});
|
|
9524
|
+
return result;
|
|
9525
|
+
} catch (error) {
|
|
9526
|
+
const failure = readCursorUpstreamFailure(error);
|
|
9527
|
+
if (failure) {
|
|
9528
|
+
await recordLocalAvailability(failure.status, failure.body);
|
|
9529
|
+
}
|
|
9530
|
+
throw error;
|
|
9531
|
+
}
|
|
9320
9532
|
}
|
|
9321
9533
|
};
|
|
9322
9534
|
}
|
|
@@ -9330,7 +9542,8 @@ var resolveDevinTransport = async (ctx) => {
|
|
|
9330
9542
|
apiKeyRefResolver,
|
|
9331
9543
|
deps,
|
|
9332
9544
|
buildProviderOpenAiTools,
|
|
9333
|
-
additionalToolNames
|
|
9545
|
+
additionalToolNames,
|
|
9546
|
+
recordLocalAvailability
|
|
9334
9547
|
} = ctx;
|
|
9335
9548
|
if (isDevinOAuthAgent(agentConfig)) {
|
|
9336
9549
|
const accessToken = await apiKeyRefResolver("devin");
|
|
@@ -9369,7 +9582,17 @@ var resolveDevinTransport = async (ctx) => {
|
|
|
9369
9582
|
return {
|
|
9370
9583
|
model,
|
|
9371
9584
|
complete: async (messages, options) => {
|
|
9372
|
-
|
|
9585
|
+
try {
|
|
9586
|
+
const result = await devinProvider.complete(messages, options);
|
|
9587
|
+
await recordLocalAvailability(200);
|
|
9588
|
+
return result;
|
|
9589
|
+
} catch (error) {
|
|
9590
|
+
const failure = readDevinUpstreamFailure(error);
|
|
9591
|
+
if (failure) {
|
|
9592
|
+
await recordLocalAvailability(failure.status, failure.body);
|
|
9593
|
+
}
|
|
9594
|
+
throw error;
|
|
9595
|
+
}
|
|
9373
9596
|
}
|
|
9374
9597
|
};
|
|
9375
9598
|
}
|
|
@@ -9456,6 +9679,7 @@ var resolveDirectOpenAiCompatibleTransport = async (ctx) => {
|
|
|
9456
9679
|
loopbackRequest
|
|
9457
9680
|
}),
|
|
9458
9681
|
stream,
|
|
9682
|
+
sessionId: asOptionalTrimmedString(options?.dialogId) ?? asOptionalTrimmedString(agentConfig.key),
|
|
9459
9683
|
onTextDelta: options?.onTextDelta,
|
|
9460
9684
|
onReasoningDelta: options?.onReasoningDelta,
|
|
9461
9685
|
onHttpResult: ({ status, body }) => recordLocalAvailability(status, body),
|
|
@@ -9476,7 +9700,7 @@ var resolveDirectOpenAiCompatibleTransport = async (ctx) => {
|
|
|
9476
9700
|
|
|
9477
9701
|
// packages/cli/client/providerResolution/geminiNativeToolTransport.ts
|
|
9478
9702
|
var resolveGeminiNativeToolTransport = async (ctx) => {
|
|
9479
|
-
const { agentConfig, deps, fetchImpl, additionalToolNames, buildProviderOpenAiTools, apiKeyRefResolver, credentialBroker, syncFetcher } = ctx;
|
|
9703
|
+
const { agentConfig, deps, fetchImpl, additionalToolNames, buildProviderOpenAiTools, apiKeyRefResolver, credentialBroker, syncFetcher, recordLocalAvailability } = ctx;
|
|
9480
9704
|
if (shouldUsePlatformChatProvider(deps.env, agentConfig) && isGemini3Model(agentConfig.model ?? "") && agentConfig.provider === "google") {
|
|
9481
9705
|
const providerConfig = await resolvePlatformChatProviderConfig({
|
|
9482
9706
|
agentConfig,
|
|
@@ -9543,6 +9767,7 @@ var resolveGeminiNativeToolTransport = async (ctx) => {
|
|
|
9543
9767
|
status: res.status,
|
|
9544
9768
|
error: errText.slice(0, 200)
|
|
9545
9769
|
});
|
|
9770
|
+
await recordLocalAvailability(res.status, errText);
|
|
9546
9771
|
throw new Error(
|
|
9547
9772
|
`gemini native tool provider failed: HTTP ${res.status} ${errText.slice(0, 500)}`
|
|
9548
9773
|
);
|
|
@@ -9568,6 +9793,7 @@ var resolveGeminiNativeToolTransport = async (ctx) => {
|
|
|
9568
9793
|
contentChars: text.length,
|
|
9569
9794
|
toolCallCount: toolCalls.length
|
|
9570
9795
|
});
|
|
9796
|
+
await recordLocalAvailability(200);
|
|
9571
9797
|
return result;
|
|
9572
9798
|
}
|
|
9573
9799
|
};
|
|
@@ -10119,6 +10345,446 @@ async function syncLocalDialogEvidenceToRemote(args) {
|
|
|
10119
10345
|
return { attempted: true };
|
|
10120
10346
|
}
|
|
10121
10347
|
|
|
10348
|
+
// packages/core/publicAgentSeeds.ts
|
|
10349
|
+
var AGENT_SEED_DEFAULTS = {
|
|
10350
|
+
isPublic: true,
|
|
10351
|
+
allowFork: true,
|
|
10352
|
+
hasVision: false,
|
|
10353
|
+
tools: []
|
|
10354
|
+
};
|
|
10355
|
+
function deterministicId(prefix, seed) {
|
|
10356
|
+
let h = 2166136261;
|
|
10357
|
+
for (let i = 0; i < seed.length; i++) {
|
|
10358
|
+
h ^= seed.charCodeAt(i);
|
|
10359
|
+
h = h * 16777619 >>> 0;
|
|
10360
|
+
}
|
|
10361
|
+
const suffix = h.toString(36).toUpperCase().padStart(14, "0");
|
|
10362
|
+
return (prefix + suffix).slice(0, 26);
|
|
10363
|
+
}
|
|
10364
|
+
function defineAgentSeed(input) {
|
|
10365
|
+
const providerForLookup = isPlatformHostedImageModel(input.model) ? "nolo" : input.provider || "nolo";
|
|
10366
|
+
const tools = input.tools ? [...input.tools] : [...AGENT_SEED_DEFAULTS.tools];
|
|
10367
|
+
const isPublic = input.isPublic ?? AGENT_SEED_DEFAULTS.isPublic;
|
|
10368
|
+
const allowFork = input.allowFork ?? AGENT_SEED_DEFAULTS.allowFork;
|
|
10369
|
+
const tags = input.tags ? [...input.tags] : [];
|
|
10370
|
+
const isPlatformHosted = isNoloHostedProvider(input.provider);
|
|
10371
|
+
const isPlatformPriced = !isPlatformHostedImageModel(input.model) && (isPlatformHosted || input.apiSource === "platform" || input.isPublic === true && !input.apiSource);
|
|
10372
|
+
let inputPrice = isPlatformPriced ? void 0 : input.inputPrice;
|
|
10373
|
+
let outputPrice = isPlatformPriced ? void 0 : input.outputPrice;
|
|
10374
|
+
let hasVision = input.hasVision;
|
|
10375
|
+
const pricesProvided = input.inputPrice !== void 0 || input.outputPrice !== void 0;
|
|
10376
|
+
if (!isPlatformPriced && (inputPrice === void 0 || outputPrice === void 0)) {
|
|
10377
|
+
const pricing = getModelPricing(providerForLookup, input.model);
|
|
10378
|
+
if (!pricing) {
|
|
10379
|
+
throw new Error(`\u672A\u627E\u5230\u6A21\u578B\u4EF7\u683C\u5143\u6570\u636E: ${providerForLookup}/${input.model}`);
|
|
10380
|
+
}
|
|
10381
|
+
if (inputPrice === void 0) inputPrice = pricing.inputPrice;
|
|
10382
|
+
if (outputPrice === void 0) outputPrice = pricing.outputPrice;
|
|
10383
|
+
}
|
|
10384
|
+
if (hasVision === void 0) {
|
|
10385
|
+
if (pricesProvided) {
|
|
10386
|
+
hasVision = AGENT_SEED_DEFAULTS.hasVision;
|
|
10387
|
+
} else {
|
|
10388
|
+
const modelConfig = getModelConfig(providerForLookup, input.model);
|
|
10389
|
+
hasVision = !!modelConfig.hasVision;
|
|
10390
|
+
}
|
|
10391
|
+
}
|
|
10392
|
+
const userVisibleTexts = [
|
|
10393
|
+
["name", input.name],
|
|
10394
|
+
["introduction", input.introduction],
|
|
10395
|
+
[
|
|
10396
|
+
"greeting",
|
|
10397
|
+
typeof input.greeting === "string" ? input.greeting : input.greeting?.text
|
|
10398
|
+
],
|
|
10399
|
+
["prompt", input.prompt],
|
|
10400
|
+
...(input.tags ?? []).map((tag) => ["tags", tag])
|
|
10401
|
+
];
|
|
10402
|
+
for (const [fieldName, text] of userVisibleTexts) {
|
|
10403
|
+
if (!text) continue;
|
|
10404
|
+
const hit = text.match(/平台托管|runinfra|openrouter|ollama/i);
|
|
10405
|
+
if (hit) {
|
|
10406
|
+
throw new Error(
|
|
10407
|
+
`\u516C\u5F00 agent seed\u300C${input.name}\u300D\u7684\u7528\u6237\u53EF\u89C1\u5B57\u6BB5 ${fieldName} \u542B\u4E0A\u6E38\u8DEF\u7531/\u6258\u7BA1\u6E20\u9053\u8BCD\u300C${hit[0]}\u300D\uFF0C\u7981\u6B62\u5199\u5165\uFF08\u6362\u4F9B\u5E94\u5546\u4E0D\u5E94\u7275\u52A8\u7528\u6237\u6587\u6848\uFF1B\u6A21\u578B\u5382\u5546\u540D\u4E0D\u5728\u6B64\u9650\uFF09`
|
|
10408
|
+
);
|
|
10409
|
+
}
|
|
10410
|
+
}
|
|
10411
|
+
const { inputPrice: _strippedInputPrice, outputPrice: _strippedOutputPrice, ...inputRest } = input;
|
|
10412
|
+
const record = {
|
|
10413
|
+
...inputRest,
|
|
10414
|
+
tools,
|
|
10415
|
+
isPublic,
|
|
10416
|
+
allowFork,
|
|
10417
|
+
tags,
|
|
10418
|
+
hasVision
|
|
10419
|
+
};
|
|
10420
|
+
if (!isPlatformPriced) {
|
|
10421
|
+
record.inputPrice = inputPrice;
|
|
10422
|
+
record.outputPrice = outputPrice;
|
|
10423
|
+
}
|
|
10424
|
+
return record;
|
|
10425
|
+
}
|
|
10426
|
+
var GPT_6_LUNA_DEF = defineAgentSeed({
|
|
10427
|
+
// salt 冻结为历史值 "shared-space-openai-gpt-5-6-luna":deterministicId 由
|
|
10428
|
+
// prefix+salt 哈希得出,改 salt 会换 ID——2026-09-23 Luna 原地换代
|
|
10429
|
+
// (GPT-5.6 Luna → GPT-6 Luna)必须保留稳定 ID,用户收藏/别名/Space
|
|
10430
|
+
// 内容键才不失效。
|
|
10431
|
+
id: deterministicId("01GPT56LUNPB", "shared-space-openai-gpt-5-6-luna"),
|
|
10432
|
+
presetKey: "gpt-6-luna",
|
|
10433
|
+
name: "GPT-6 Luna",
|
|
10434
|
+
// provider 用平台托管命名空间 "nolo"(平台 agent 统一收敛方向):平台价只注册在
|
|
10435
|
+
// nolo 下,agent-run 的托管路由门也只认 nolo。写上游名 "openai" 会让计费落零价
|
|
10436
|
+
// 虚拟模型并绕过 hosted routing(2026-09-24 review CRITICAL)。
|
|
10437
|
+
provider: "nolo",
|
|
10438
|
+
model: "gpt-6-luna",
|
|
10439
|
+
isPublic: true,
|
|
10440
|
+
platformAudit: true,
|
|
10441
|
+
introduction: "OpenAI GPT-6 Luna \u516C\u5F00\u52A9\u624B\uFF08\u8F7B\u91CF\u6863\uFF09\uFF0C\u9002\u5408\u9AD8\u541E\u5410\u3001\u4F4E\u6210\u672C\u3001\u901F\u5EA6\u654F\u611F\u4EFB\u52A1\u3002",
|
|
10442
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F GPT-6 Luna\u3002\u8F7B\u91CF\u6863\u4F4D\uFF0C\u9002\u5408\u5FEB\u901F\u3001\u4F4E\u6210\u672C\u4EFB\u52A1\u3002",
|
|
10443
|
+
prompt: "\u4F18\u5148\u5FEB\u901F\u5B8C\u6210\u4EFB\u52A1\uFF1B\u4FDD\u6301\u56DE\u7B54\u76F4\u63A5\u3001\u7ED3\u8BBA\u660E\u786E\u3002",
|
|
10444
|
+
tools: [],
|
|
10445
|
+
tags: ["openai"]
|
|
10446
|
+
});
|
|
10447
|
+
var DEEPSEEK_V4_FLASH_DEF = defineAgentSeed({
|
|
10448
|
+
id: PUBLIC_DEEPSEEK_V4_FLASH_AGENT_ID,
|
|
10449
|
+
presetKey: "deepseek-v4-flash",
|
|
10450
|
+
name: "DeepSeek Flash",
|
|
10451
|
+
provider: "nolo",
|
|
10452
|
+
model: "deepseek-flash",
|
|
10453
|
+
isPublic: true,
|
|
10454
|
+
introduction: "DeepSeek Flash \u516C\u5F00\u52A9\u624B\uFF0C\u9002\u5408\u9AD8\u6027\u4EF7\u6BD4\u901A\u7528\u95EE\u7B54\u3001\u4EE3\u7801\u4E0E\u957F\u4E0A\u4E0B\u6587\u4EFB\u52A1\u3002",
|
|
10455
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F DeepSeek Flash\u3002\u9002\u5408\u5FEB\u901F\u5904\u7406\u901A\u7528\u95EE\u9898\u3001\u4EE3\u7801\u548C\u957F\u4E0A\u4E0B\u6587\u4EFB\u52A1\u3002",
|
|
10456
|
+
prompt: "\u4F18\u5148\u5FEB\u901F\u3001\u76F4\u63A5\u3001\u7A33\u5B9A\u5730\u5B8C\u6210\u4EFB\u52A1\uFF1B\u9700\u8981\u63A8\u7406\u65F6\u4FDD\u6301\u6B65\u9AA4\u6E05\u6670\u3002",
|
|
10457
|
+
tools: [],
|
|
10458
|
+
tags: ["nolo", "deepseek"]
|
|
10459
|
+
});
|
|
10460
|
+
var DEEPSEEK_V4_PRO_DEF = defineAgentSeed({
|
|
10461
|
+
id: PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID,
|
|
10462
|
+
presetKey: "deepseek-v4-pro",
|
|
10463
|
+
name: "DeepSeek V4 Pro",
|
|
10464
|
+
provider: "nolo",
|
|
10465
|
+
model: "deepseek-v4-pro",
|
|
10466
|
+
hasVision: false,
|
|
10467
|
+
isPublic: true,
|
|
10468
|
+
introduction: "DeepSeek V4 Pro \u516C\u5F00\u52A9\u624B\uFF0C\u9002\u5408\u590D\u6742\u63A8\u7406\u3001\u4EE3\u7801\u3001agentic \u5DE5\u4F5C\u6D41\u4E0E\u957F\u4E0A\u4E0B\u6587\u4EFB\u52A1\u3002",
|
|
10469
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F DeepSeek V4 Pro\u3002\u9002\u5408\u590D\u6742\u63A8\u7406\u3001\u4EE3\u7801\u5206\u6790\u548C\u957F\u4E0A\u4E0B\u6587\u4EFB\u52A1\u3002",
|
|
10470
|
+
prompt: "\u9762\u5BF9\u590D\u6742\u4EFB\u52A1\u4F18\u5148\u62C6\u6E05\u76EE\u6807\u3001\u8BC1\u636E\u548C\u6267\u884C\u8DEF\u5F84\uFF0C\u518D\u7ED9\u51FA\u53EF\u9760\u7ED3\u8BBA\u3002",
|
|
10471
|
+
tools: [],
|
|
10472
|
+
tags: ["nolo", "deepseek"]
|
|
10473
|
+
});
|
|
10474
|
+
var GLM_5_3_DEF = defineAgentSeed({
|
|
10475
|
+
id: "01GLM52DIPB00000000I3E2MY",
|
|
10476
|
+
presetKey: "glm-5.3",
|
|
10477
|
+
name: "GLM 5.3",
|
|
10478
|
+
provider: "nolo",
|
|
10479
|
+
model: "glm-5.3",
|
|
10480
|
+
isPublic: true,
|
|
10481
|
+
hasVision: true,
|
|
10482
|
+
introduction: "GLM 5.3 \u516C\u5F00\u52A9\u624B\uFF0C\u9002\u5408\u590D\u6742\u63A8\u7406\u3001\u957F\u4E0A\u4E0B\u6587\u3001\u4E2D\u6587\u7406\u89E3\u4E0E\u4EE3\u7801\u5206\u6790\u3002",
|
|
10483
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F GLM 5.3\u3002\u9002\u5408\u5904\u7406\u590D\u6742\u5206\u6790\u3001\u9AD8\u8D28\u91CF\u4E2D\u6587\u95EE\u7B54\u4E0E\u4EE3\u7801\u63A8\u7406\u4EFB\u52A1\u3002",
|
|
10484
|
+
prompt: "\u4F18\u5148\u7ED9\u51FA\u76F4\u63A5\u3001\u51C6\u786E\u3001\u53EF\u6267\u884C\u7684\u56DE\u7B54\uFF1B\u590D\u6742\u95EE\u9898\u5148\u7406\u6E05\u76EE\u6807\u548C\u7EA6\u675F\u518D\u63A8\u7406\uFF0C\u4FDD\u6301\u7ED3\u6784\u6E05\u6670\u3001\u4F9D\u636E\u660E\u786E\u3002",
|
|
10485
|
+
tools: [],
|
|
10486
|
+
tags: ["nolo", "glm"]
|
|
10487
|
+
});
|
|
10488
|
+
var GLM_5_3_FLASH_DEF = defineAgentSeed({
|
|
10489
|
+
id: PUBLIC_GLM_53_FLASH_AGENT_ID,
|
|
10490
|
+
presetKey: "glm-5-3-flash",
|
|
10491
|
+
name: "GLM 5.3 Flash",
|
|
10492
|
+
provider: "nolo",
|
|
10493
|
+
model: "glm-5-3-flash",
|
|
10494
|
+
isPublic: true,
|
|
10495
|
+
hasVision: true,
|
|
10496
|
+
introduction: "GLM 5.3 Flash \u516C\u5F00\u52A9\u624B\uFF0C\u5EC9\u4EF7\u5FEB\u6863\uFF0C\u9002\u5408\u9AD8\u9891\u8F7B\u91CF\u95EE\u7B54\u4E0E\u6279\u91CF\u4EFB\u52A1\u3002\u6CE8\u610F\uFF1A\u8BE5\u6A21\u578B\u9ED8\u8BA4\u6DF1\u5EA6\u601D\u8003\uFF0C\u601D\u8003\u8FC7\u7A0B token \u8BA1\u5165\u8F93\u51FA\u8BA1\u8D39\uFF08\u8F93\u51FA 3.2 \u79EF\u5206/\u767E\u4E07 token\uFF09\uFF0C\u5B9E\u9645\u6D88\u8017\u9AD8\u4E8E\u540C\u957F\u5EA6\u53EF\u89C1\u56DE\u590D\uFF1B\u628A agent \u7684 reasoning_effort \u8BBE\u4E3A low \u53EF\u5173\u95ED\u601D\u8003\u2014\u2014\u5355\u8F6E\u95EE\u7B54\u5B9E\u6D4B\u8F93\u51FA token \u964D\u5230\u7EA6 1/5\uFF0C\u591A\u8F6E\u5DE5\u5177\u5FAA\u73AF\u91CC\u7EA6\u964D 4 \u6210\uFF08\u5DE5\u5177\u8F6E\u672C\u8EAB\u601D\u8003\u5C31\u5C11\uFF09\uFF0C\u53EF\u89C1\u56DE\u590D\u957F\u5EA6\u4E0E\u5DE5\u5177\u8C03\u7528\u6B63\u786E\u6027\u5747\u4E0D\u53D8\uFF1Bmedium \u6863 token \u7565\u964D\u4F46\u5EF6\u8FDF\u4E0D\u6539\u5584\u3002",
|
|
10497
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F GLM 5.3 Flash\u3002\u8F7B\u91CF\u5FEB\u901F\u3001\u4EF7\u683C\u4F4E\uFF0C\u9002\u5408\u65E5\u5E38\u95EE\u7B54\u4E0E\u6279\u91CF\u8F7B\u91CF\u4EFB\u52A1\u3002",
|
|
10498
|
+
prompt: "\u76F4\u63A5\u3001\u7B80\u6D01\u5730\u5B8C\u6210\u4EFB\u52A1\uFF1B\u56DE\u7B54\u4FDD\u6301\u7B80\u77ED\uFF0C\u5148\u7ED9\u7ED3\u8BBA\u3002",
|
|
10499
|
+
// 关掉思考:该模型默认档的 reasoning token 计入输出计费,而实测 low 档
|
|
10500
|
+
// reasoning 输出为 0(10/10 样本),单轮问答输出 token 降到约 1/5、多轮工具
|
|
10501
|
+
// 循环降约 4 成,可见回复长度、工具调用正确性与循环完成度均不变。
|
|
10502
|
+
// medium 档只省约 29% token 且延迟不改善,故直接用 low。
|
|
10503
|
+
reasoning_effort: "low",
|
|
10504
|
+
tools: [],
|
|
10505
|
+
tags: ["nolo", "glm", "flash"]
|
|
10506
|
+
});
|
|
10507
|
+
var CLAUDE_FABLE_5_1_DEF = defineAgentSeed({
|
|
10508
|
+
id: deterministicId("01CLDFBL51PB", "shared-space-anthropic-claude-fable-5-1"),
|
|
10509
|
+
presetKey: "claude-fable-5-1",
|
|
10510
|
+
name: "Claude Fable 5.1",
|
|
10511
|
+
provider: "nolo",
|
|
10512
|
+
model: "anthropic/claude-fable-5-1",
|
|
10513
|
+
isPublic: true,
|
|
10514
|
+
hasVision: true,
|
|
10515
|
+
introduction: "Claude Fable 5.1 \u516C\u5F00\u52A9\u624B\uFF0C\u9002\u5408\u590D\u6742\u95EE\u7B54\u3001\u957F\u6587\u5206\u6790\u3001\u4EE3\u7801\u548C\u56FE\u7247\u7406\u89E3\u3002",
|
|
10516
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F Claude Fable 5.1\u3002\u9002\u5408\u590D\u6742\u95EE\u9898\u3001\u957F\u6587\u5206\u6790\u3001\u4EE3\u7801\u548C\u56FE\u7247\u7406\u89E3\u3002",
|
|
10517
|
+
prompt: "\u9762\u5BF9\u590D\u6742\u4EFB\u52A1\u5148\u5398\u6E05\u76EE\u6807\u548C\u7EA6\u675F\uFF0C\u518D\u7ED9\u51FA\u53EF\u9760\u3001\u53EF\u6267\u884C\u3001\u53EF\u590D\u6838\u7684\u7ED3\u679C\u3002",
|
|
10518
|
+
tools: [],
|
|
10519
|
+
tags: ["anthropic", "claude", "fable"]
|
|
10520
|
+
});
|
|
10521
|
+
var CLAUDE_OPUS_5_5_DEF = defineAgentSeed({
|
|
10522
|
+
id: deterministicId("01CLDOPU55PB", "shared-space-anthropic-claude-opus-5-5"),
|
|
10523
|
+
presetKey: "claude-opus-5-5",
|
|
10524
|
+
name: "Claude Opus 5.5",
|
|
10525
|
+
provider: "nolo",
|
|
10526
|
+
model: "anthropic/claude-opus-5-5",
|
|
10527
|
+
isPublic: true,
|
|
10528
|
+
hasVision: true,
|
|
10529
|
+
introduction: "Claude Opus 5.5 \u516C\u5F00\u52A9\u624B\uFF0C\u9002\u5408\u9AD8\u96BE\u63A8\u7406\u3001\u957F\u94FE\u8DEF\u5206\u6790\u548C\u56FE\u7247\u7406\u89E3\u3002",
|
|
10530
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F Claude Opus 5.5\u3002\u9002\u5408\u9AD8\u96BE\u63A8\u7406\u3001\u590D\u6742\u5206\u6790\u548C\u56FE\u7247\u7406\u89E3\u3002",
|
|
10531
|
+
prompt: "\u5148\u786E\u8BA4\u95EE\u9898\u76EE\u6807\u3001\u8BC1\u636E\u548C\u98CE\u9669\uFF0C\u518D\u7ED9\u51FA\u7ED3\u6784\u6E05\u695A\u3001\u7ED3\u8BBA\u660E\u786E\u7684\u56DE\u7B54\u3002",
|
|
10532
|
+
tools: [],
|
|
10533
|
+
tags: ["anthropic", "claude", "opus"]
|
|
10534
|
+
});
|
|
10535
|
+
var GROK_4_6_DEF = defineAgentSeed({
|
|
10536
|
+
id: deterministicId("01GROK46PLAZ", "shared-space-xai-grok-4-6"),
|
|
10537
|
+
presetKey: "grok-4.6",
|
|
10538
|
+
name: "Grok 4.6",
|
|
10539
|
+
provider: "xai",
|
|
10540
|
+
model: "grok-4.6",
|
|
10541
|
+
isPublic: true,
|
|
10542
|
+
hasVision: true,
|
|
10543
|
+
introduction: "xAI Grok 4.6 \u516C\u5F00\u52A9\u624B\uFF0C\u9002\u5408\u5B9E\u65F6\u4FE1\u606F\u5206\u6790\u3001\u590D\u6742\u63A8\u7406\u3001\u4EE3\u7801\u548C\u591A\u6A21\u6001\u4EFB\u52A1\u3002",
|
|
10544
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F Grok 4.6\u3002\u53EF\u4EE5\u5E2E\u4F60\u5206\u6790\u95EE\u9898\u3001\u7F16\u5199\u4EE3\u7801\u3001\u7406\u89E3\u56FE\u7247\u5E76\u5904\u7406\u590D\u6742\u4EFB\u52A1\u3002",
|
|
10545
|
+
prompt: "\u4F18\u5148\u7ED9\u51FA\u76F4\u63A5\u3001\u51C6\u786E\u3001\u53EF\u6267\u884C\u7684\u56DE\u7B54\uFF1B\u9762\u5BF9\u590D\u6742\u95EE\u9898\u5148\u68B3\u7406\u76EE\u6807\u548C\u7EA6\u675F\uFF0C\u518D\u8FDB\u884C\u53EF\u9760\u63A8\u7406\u3002\u5BF9\u4E0D\u786E\u5B9A\u7684\u5185\u5BB9\u660E\u786E\u8BF4\u660E\u4F9D\u636E\u4E0E\u65F6\u6548\u6027\uFF0C\u4E0D\u7F16\u9020\u3002",
|
|
10546
|
+
tools: [],
|
|
10547
|
+
tags: ["xai", "grok"]
|
|
10548
|
+
});
|
|
10549
|
+
var GEMINI_3_8_FLASH_DEF = defineAgentSeed({
|
|
10550
|
+
// 种子串冻结以维持确定性 ID 稳定,勿随版本改名。
|
|
10551
|
+
id: deterministicId("01GEM37FLPB", "shared-space-google-gemini-3-7-flash"),
|
|
10552
|
+
presetKey: "gemini-3.8-flash",
|
|
10553
|
+
name: "Gemini 3.8 Flash",
|
|
10554
|
+
provider: "nolo",
|
|
10555
|
+
model: "gemini-3.8-flash",
|
|
10556
|
+
isPublic: true,
|
|
10557
|
+
introduction: "Gemini 3.8 Flash \u516C\u5F00\u52A9\u624B\uFF0C\u9002\u5408\u5FEB\u901F\u524D\u6CBF\u95EE\u7B54\u3001\u4EE3\u7801\u3001\u591A\u6A21\u6001\u548C\u957F\u4E0A\u4E0B\u6587\u4EFB\u52A1\u3002",
|
|
10558
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F Gemini 3.8 Flash\u3002\u9002\u5408\u5FEB\u901F\u5904\u7406\u957F\u4E0A\u4E0B\u6587\u3001\u591A\u6A21\u6001\u548C\u4EE3\u7801\u4EFB\u52A1\u3002",
|
|
10559
|
+
prompt: "\u4F18\u5148\u76F4\u63A5\u5B8C\u6210\u4EFB\u52A1\uFF1B\u9700\u8981\u63A8\u7406\u6216\u5199\u4EE3\u7801\u65F6\u4FDD\u6301\u6B65\u9AA4\u6E05\u6670\u3001\u7ED3\u8BBA\u53EF\u9760\u3002",
|
|
10560
|
+
tools: [],
|
|
10561
|
+
tags: ["google", "gemini"]
|
|
10562
|
+
});
|
|
10563
|
+
var GPT_IMAGE_2_GENERATOR_DEF = defineAgentSeed({
|
|
10564
|
+
id: PUBLIC_GPT_IMAGE_2_GENERATOR_AGENT_ID,
|
|
10565
|
+
presetKey: "gpt-image-2-generator",
|
|
10566
|
+
name: "GPT Image 2 \u56FE\u7247\u751F\u6210\u5668",
|
|
10567
|
+
provider: "nolo",
|
|
10568
|
+
model: "gpt-6-luna",
|
|
10569
|
+
imageModel: "gpt-image-2",
|
|
10570
|
+
isPublic: true,
|
|
10571
|
+
hasImageOutput: true,
|
|
10572
|
+
imageWorkflow: "generate",
|
|
10573
|
+
imageConfig: { enabled: true },
|
|
10574
|
+
introduction: "\u4E13\u95E8\u8D1F\u8D23 GPT Image 2 \u65B0\u56FE\u751F\u6210\uFF1A\u6587\u672C\u751F\u6210\u65B0\u56FE\u7247\uFF0C\u4E5F\u53EF\u628A\u4E0A\u4F20\u56FE\u7247\u5F53\u4F5C\u53C2\u8003\u56FE\u6765\u751F\u6210\u65B0\u7684\u753B\u9762\u3002",
|
|
10575
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F GPT Image 2 \u56FE\u7247\u751F\u6210\u5668\u3002\u76F4\u63A5\u544A\u8BC9\u6211\u4F60\u60F3\u753B\u4EC0\u4E48\uFF1B\u5982\u679C\u4F60\u4E0A\u4F20\u53C2\u8003\u56FE\uFF0C\u6211\u4F1A\u628A\u5B83\u4EEC\u5F53\u4F5C\u7075\u611F\u53C2\u8003\u6765\u751F\u6210\u4E00\u5F20\u65B0\u7684\u56FE\u7247\u3002",
|
|
10576
|
+
prompt: [
|
|
10577
|
+
"\u5B9A\u4F4D\uFF1A",
|
|
10578
|
+
"- \u4F60\u7684\u4E3B\u4EFB\u52A1\u662F\u6587\u672C\u751F\u6210\u65B0\u56FE\u7247\u3002",
|
|
10579
|
+
"- \u5982\u679C\u7528\u6237\u4E0A\u4F20\u4E86\u53C2\u8003\u56FE\uFF0C\u5B83\u4EEC\u53EA\u7528\u4E8E\u53C2\u8003\u56FE\u5F71\u54CD\u65B0\u56FE\u6784\u56FE\u3001\u98CE\u683C\u3001\u89D2\u8272\u5173\u7CFB\u548C\u89C6\u89C9\u65B9\u5411\u3002",
|
|
10580
|
+
"- \u4E0D\u8981\u628A\u8FD9\u7C7B\u8BF7\u6C42\u5904\u7406\u6210\u591A\u8F6E\u8FDE\u7EED\u7F16\u8F91\u4F1A\u8BDD\uFF1B\u9ED8\u8BA4\u6309\u5355\u6B21\u8BF7\u6C42\u5B8C\u6210\u4E00\u7248\u65B0\u56FE\u3002",
|
|
10581
|
+
"",
|
|
10582
|
+
"\u5DE5\u4F5C\u65B9\u5F0F\uFF1A",
|
|
10583
|
+
"- \u7528\u6237\u7ED9\u51FA\u6E05\u6670\u9700\u6C42\u540E\uFF0C\u76F4\u63A5\u751F\u6210\uFF0C\u4E0D\u5148\u5199\u957F\u7BC7\u89E3\u91CA\u3002",
|
|
10584
|
+
"- prompt \u8981\u660E\u786E\u4E3B\u4F53\u3001\u573A\u666F\u3001\u955C\u5934\u3001\u5149\u7EBF\u3001\u6750\u8D28\u3001\u98CE\u683C\u4E0E\u7981\u6B62\u9879\u3002",
|
|
10585
|
+
"- \u5982\u679C\u7528\u6237\u8981\u6C42\u591A\u7248\u672C\uFF0C\u53EF\u4EE5\u4E00\u6B21\u7ED9\u5C11\u91CF\u5019\u9009\uFF1B\u9ED8\u8BA4\u5148\u7ED9 1 \u5F20\u3002",
|
|
10586
|
+
"- \u5982\u679C\u7528\u6237\u5176\u5B9E\u662F\u5728\u8981\u6C42\u7CBE\u786E\u6539\u56FE\u3001\u5C40\u90E8\u66FF\u6362\u3001\u591A\u56FE\u62FC\u5408\u6216 mask \u4FEE\u6539\uFF0C\u63D0\u9192\u66F4\u9002\u5408\u6539\u7528\u201CGPT Image 2 \u56FE\u7247\u7F16\u8F91\u5668\u201D\u3002",
|
|
10587
|
+
"",
|
|
10588
|
+
"\u56DE\u590D\u65B9\u5F0F\uFF1A",
|
|
10589
|
+
"- \u9ED8\u8BA4\u4E2D\u6587\u8F93\u51FA\uFF0C\u7B80\u77ED\u8BF4\u660E\u7ED3\u679C\uFF0C\u5E76\u7ED9 2-4 \u4E2A\u4E0B\u4E00\u6B65\u53EF\u7EE7\u7EED\u5FAE\u8C03\u7684\u65B9\u5411\u3002"
|
|
10590
|
+
].join("\n"),
|
|
10591
|
+
tools: ["openAIGptImageGenerate"],
|
|
10592
|
+
tags: ["image", "openai", "gpt-image-2", "generate"]
|
|
10593
|
+
});
|
|
10594
|
+
var GPT_IMAGE_2_EDITOR_DEF = defineAgentSeed({
|
|
10595
|
+
id: PUBLIC_GPT_IMAGE_2_EDITOR_AGENT_ID,
|
|
10596
|
+
presetKey: "gpt-image-2-editor",
|
|
10597
|
+
name: "GPT Image 2 \u56FE\u7247\u7F16\u8F91\u5668",
|
|
10598
|
+
provider: "nolo",
|
|
10599
|
+
model: "gpt-6-luna",
|
|
10600
|
+
imageModel: "gpt-image-2",
|
|
10601
|
+
isPublic: true,
|
|
10602
|
+
hasImageOutput: true,
|
|
10603
|
+
imageWorkflow: "edit",
|
|
10604
|
+
imageConfig: { enabled: true },
|
|
10605
|
+
introduction: "\u4E13\u95E8\u8D1F\u8D23 GPT Image 2 \u5355\u6B21\u8BF7\u6C42\u6539\u56FE\uFF1A\u652F\u6301\u5355\u56FE\u7F16\u8F91\u3001\u591A\u56FE\u53C2\u8003\u5408\u6210\uFF0C\u4EE5\u53CA\u5E26 mask \u7684\u7CBE\u786E\u4FEE\u6539\u3002",
|
|
10606
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F GPT Image 2 \u56FE\u7247\u7F16\u8F91\u5668\u3002\u628A\u8981\u4FEE\u6539\u7684\u56FE\u7247\u3001\u53C2\u8003\u56FE\u6216 mask \u53D1\u7ED9\u6211\uFF0C\u6211\u4F1A\u6309\u5355\u6B21\u8BF7\u6C42\u6539\u56FE\u7684\u65B9\u5F0F\u7ED9\u4F60\u4E00\u7248\u7ED3\u679C\u3002",
|
|
10607
|
+
prompt: [
|
|
10608
|
+
"\u5B9A\u4F4D\uFF1A",
|
|
10609
|
+
"- \u4F60\u7684\u4E3B\u4EFB\u52A1\u662F\u5355\u6B21\u8BF7\u6C42\u6539\u56FE\uFF0C\u4E0D\u662F\u957F\u5BF9\u8BDD\u966A\u4F34\u5F0F\u521B\u4F5C\u3002",
|
|
10610
|
+
"- \u4F60\u652F\u6301\u5355\u56FE\u7F16\u8F91\u3001\u591A\u56FE\u53C2\u8003\u3001\u62FC\u5408\u6784\u56FE\uFF0C\u4EE5\u53CA\u53EF\u9009\u7684 mask \u5C40\u90E8\u4FEE\u6539\u3002",
|
|
10611
|
+
"- \u5982\u679C\u7528\u6237\u8981\u7684\u662F\u6301\u7EED\u51E0\u8F6E\u201C\u7EE7\u7EED\u6539\u3001\u518D\u6765\u4E00\u7248\u3001\u5EF6\u7EED\u4E0A\u4E00\u8F6E\u201D\u7684\u521B\u4F5C\u8FC7\u7A0B\uFF0C\u63D0\u9192\u66F4\u9002\u5408\u201CGPT Image 2 \u8FDE\u7EED\u521B\u4F5C\u52A9\u624B\u201D\u3002",
|
|
10612
|
+
"",
|
|
10613
|
+
"\u5DE5\u4F5C\u65B9\u5F0F\uFF1A",
|
|
10614
|
+
"- \u6536\u5230\u56FE\u7247\u540E\uFF0C\u4F18\u5148\u6309\u5355\u6B21\u8BF7\u6C42\u6539\u56FE\u5B8C\u6210\u5F53\u524D\u76EE\u6807\u3002",
|
|
10615
|
+
"- \u591A\u56FE\u53C2\u8003\u65F6\uFF0C\u8981\u660E\u786E\u6BCF\u5F20\u56FE\u5206\u522B\u627F\u62C5\u4E3B\u4F53\u3001\u98CE\u683C\u3001\u80CC\u666F\u6216\u6784\u56FE\u53C2\u8003\u3002",
|
|
10616
|
+
"- \u5982\u679C\u7528\u6237\u63D0\u4F9B\u4E86 mask\uFF0C\u5C31\u628A mask \u89C6\u4E3A\u5FC5\u987B\u9075\u5B88\u7684\u7F16\u8F91\u8303\u56F4\u3002",
|
|
10617
|
+
"- \u5982\u679C\u7F3A\u5C11\u5173\u952E\u539F\u56FE\u3001\u53C2\u8003\u56FE\u6216 mask\uFF0C\u5148\u7528\u4E00\u53E5\u8BDD\u6307\u51FA\u7F3A\u53E3\uFF0C\u518D\u7B49\u7528\u6237\u8865\u9F50\u3002",
|
|
10618
|
+
"- \u8C03\u7528 openAIGptImageEdit \u65F6\uFF0C\u4F18\u5148\u590D\u7528\u7528\u6237\u5DF2\u4E0A\u4F20\u7684\u539F\u59CB http(s) \u56FE\u7247 URL\uFF1B\u4E0D\u8981\u81EA\u5DF1\u624B\u5199 data URL \u6216\u91CD\u7F16\u7801\u7F29\u7565\u56FE\u3002",
|
|
10619
|
+
"- \u8C03\u7528 openAIGptImageEdit \u65F6\uFF0C\u4E0D\u8981\u4F20 transparent background\uFF1Bbackground \u4E00\u5F8B\u7528 opaque\uFF0C\u9664\u975E\u5E95\u5C42\u80FD\u529B\u4EE5\u540E\u660E\u786E\u652F\u6301\u518D\u8C03\u6574\u3002",
|
|
10620
|
+
"- \u5982\u679C outputFormat \u662F png\uFF08\u6216\u6CA1\u6709\u663E\u5F0F\u6539\u6210 jpeg/webp\uFF09\uFF0C\u4E0D\u8981\u4F20 outputCompression\u3002",
|
|
10621
|
+
"",
|
|
10622
|
+
"\u56DE\u590D\u65B9\u5F0F\uFF1A",
|
|
10623
|
+
"- \u9ED8\u8BA4\u4E2D\u6587\u8F93\u51FA\uFF0C\u7B80\u77ED\u8BF4\u660E\u8FD9\u6B21\u6539\u52A8\uFF0C\u5E76\u7ED9 2-4 \u4E2A\u53EF\u7EE7\u7EED\u7EC6\u5316\u7684\u65B9\u5411\u3002"
|
|
10624
|
+
].join("\n"),
|
|
10625
|
+
tools: ["openAIGptImageEdit"],
|
|
10626
|
+
tags: ["image", "openai", "gpt-image-2", "edit"]
|
|
10627
|
+
});
|
|
10628
|
+
var GPT_IMAGE_2_CONTINUOUS_DEF = defineAgentSeed({
|
|
10629
|
+
id: PUBLIC_GPT_IMAGE_2_CONTINUOUS_AGENT_ID,
|
|
10630
|
+
presetKey: "gpt-image-2-continuous",
|
|
10631
|
+
name: "GPT Image 2 \u8FDE\u7EED\u521B\u4F5C\u52A9\u624B",
|
|
10632
|
+
provider: "nolo",
|
|
10633
|
+
model: "gpt-6-luna",
|
|
10634
|
+
imageModel: "gpt-image-2",
|
|
10635
|
+
isPublic: true,
|
|
10636
|
+
hasImageOutput: true,
|
|
10637
|
+
imageWorkflow: "continuous",
|
|
10638
|
+
imageConfig: { enabled: true },
|
|
10639
|
+
introduction: "\u4E13\u95E8\u8D1F\u8D23 GPT Image 2 \u591A\u8F6E\u8FDE\u7EED\u521B\u4F5C\uFF1A\u9002\u5408\u5148\u51FA\u4E00\u7248\uFF0C\u518D\u56F4\u7ED5\u4E0A\u4E00\u8F6E\u56FE\u7247\u7EE7\u7EED\u4FEE\u6539\u3001\u7EE7\u7EED\u6269\u5C55\u548C\u7EE7\u7EED\u8FED\u4EE3\u3002",
|
|
10640
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F GPT Image 2 \u8FDE\u7EED\u521B\u4F5C\u52A9\u624B\u3002\u4F60\u53EF\u4EE5\u5148\u8BA9\u6211\u51FA\u4E00\u7248\u56FE\uFF0C\u518D\u56F4\u7ED5\u4E0A\u4E00\u8F6E\u7EE7\u7EED\u4FEE\u6539\u3001\u7EE7\u7EED\u6269\u5C55\u6216\u7EE7\u7EED\u5B9A\u7A3F\u3002",
|
|
10641
|
+
prompt: [
|
|
10642
|
+
"\u5B9A\u4F4D\uFF1A",
|
|
10643
|
+
"- \u4F60\u7684\u4E3B\u4EFB\u52A1\u662F\u591A\u8F6E\u8FDE\u7EED\u521B\u4F5C\u3002",
|
|
10644
|
+
"- \u7528\u6237\u7ECF\u5E38\u4F1A\u57FA\u4E8E\u4E0A\u4E00\u8F6E\u7ED3\u679C\u7EE7\u7EED\u4FEE\u6539\u3001\u7EE7\u7EED\u7EC6\u5316\u3001\u7EE7\u7EED\u6362\u98CE\u683C\u3001\u7EE7\u7EED\u8865\u5143\u7D20\u3002",
|
|
10645
|
+
"- \u4F60\u8981\u628A\u5F53\u524D\u5BF9\u8BDD\u91CC\u7684\u4E0A\u4E00\u8F6E\u56FE\u7247\u89C6\u4F5C\u9ED8\u8BA4\u5EF6\u7EED\u5BF9\u8C61\uFF0C\u800C\u4E0D\u662F\u6BCF\u8F6E\u90FD\u91CD\u65B0\u5F00\u59CB\u3002",
|
|
10646
|
+
"",
|
|
10647
|
+
"\u5DE5\u4F5C\u65B9\u5F0F\uFF1A",
|
|
10648
|
+
"- \u5982\u679C\u5F53\u524D\u8F6E\u7528\u6237\u6CA1\u6709\u4E0A\u4F20\u65B0\u56FE\uFF0C\u4E14\u4E0A\u4E0B\u6587\u91CC\u4E5F\u6CA1\u6709\u4E0A\u4E00\u8F6E\u53EF\u7528\u56FE\u7247\uFF0C\u4F46\u7528\u6237\u662F\u5728\u8981\u6C42\u5148\u51FA\u4E00\u7248\u56FE\uFF0C\u5148\u8C03\u7528 openAIGptImageGenerate \u751F\u6210\u521D\u59CB\u7248\u672C\u3002",
|
|
10649
|
+
"- \u5982\u679C\u5F53\u524D\u8F6E\u7528\u6237\u4E0A\u4F20\u4E86\u65B0\u56FE\uFF0C\u4F18\u5148\u57FA\u4E8E\u65B0\u56FE\u7EE7\u7EED\u521B\u4F5C\u3002",
|
|
10650
|
+
"- \u5982\u679C\u7528\u6237\u6CA1\u6709\u4E0A\u4F20\u65B0\u56FE\uFF0C\u4F46\u4E0A\u4E0B\u6587\u91CC\u5DF2\u6709\u4E0A\u4E00\u8F6E\u53EF\u7528\u56FE\u7247\uFF0C\u9ED8\u8BA4\u6CBF\u7528\u4E0A\u4E00\u8F6E\u7ED3\u679C\u7EE7\u7EED\u4FEE\u6539\u3002",
|
|
10651
|
+
"- \u8C03\u7528 openAIGptImageEdit \u65F6\uFF0C\u4F18\u5148\u590D\u7528\u5F53\u524D\u5BF9\u8BDD\u91CC\u6700\u8FD1\u4E00\u8F6E\u53EF\u7528\u7684\u539F\u59CB http(s) \u56FE\u7247 URL\uFF1B\u4E0D\u8981\u628A\u5DF2\u6709\u56FE\u7247\u91CD\u65B0\u624B\u5199\u6210 data URL \u6216\u4F4E\u4FDD\u771F\u7F29\u7565\u56FE\u3002",
|
|
10652
|
+
"- \u5982\u679C\u7528\u6237\u8BF7\u6C42\u7F16\u8F91\u5374\u6CA1\u6709\u4EFB\u4F55\u53EF\u7528\u56FE\u7247\uFF0C\u5C31\u660E\u786E\u63D0\u793A\u7528\u6237\u5148\u4E0A\u4F20\u4E00\u5F20\u56FE\u7247\u518D\u7EE7\u7EED\u3002",
|
|
10653
|
+
"- \u9ED8\u8BA4\u5148\u7ED9\u5FEB\u901F\u3001\u53EF\u8FED\u4EE3\u7684\u4E00\u7248\uFF1B\u7528\u6237\u660E\u786E\u8BF4\u8981\u6700\u7EC8\u7248\u3001\u9AD8\u6E05\u7248\u65F6\uFF0C\u518D\u63D0\u9AD8\u8D28\u91CF\u3002",
|
|
10654
|
+
"- \u8C03\u7528 openAIGptImageEdit \u65F6\uFF0C\u4E0D\u8981\u4F20 transparent background\uFF1Bbackground \u4E00\u5F8B\u7528 opaque\uFF0C\u9664\u975E\u5E95\u5C42\u80FD\u529B\u4EE5\u540E\u660E\u786E\u652F\u6301\u518D\u8C03\u6574\u3002",
|
|
10655
|
+
"- \u5982\u679C outputFormat \u662F png\uFF08\u6216\u6CA1\u6709\u663E\u5F0F\u6539\u6210 jpeg/webp\uFF09\uFF0C\u4E0D\u8981\u4F20 outputCompression\u3002",
|
|
10656
|
+
"",
|
|
10657
|
+
"\u56DE\u590D\u65B9\u5F0F\uFF1A",
|
|
10658
|
+
"- \u9ED8\u8BA4\u4E2D\u6587\u8F93\u51FA\uFF0C\u4FDD\u6301\u8FDE\u7EED\u534F\u4F5C\u53E3\u543B\uFF0C\u751F\u6210\u540E\u63D0\u793A\u7528\u6237\u53EF\u4EE5\u4ECE\u54EA\u4E9B\u65B9\u5411\u7EE7\u7EED\u7EC6\u5316\u3002"
|
|
10659
|
+
].join("\n"),
|
|
10660
|
+
tools: ["openAIGptImageGenerate", "openAIGptImageEdit"],
|
|
10661
|
+
tags: ["image", "openai", "gpt-image-2", "continuous"]
|
|
10662
|
+
});
|
|
10663
|
+
var NANO_BANANA_2_LITE_GENERATOR_DEF = defineAgentSeed({
|
|
10664
|
+
id: PUBLIC_NANO_BANANA_2_LITE_AGENT_ID,
|
|
10665
|
+
presetKey: "nano-banana-2-lite-generator",
|
|
10666
|
+
name: "Nano Banana 2 Lite \u6587\u751F\u56FE",
|
|
10667
|
+
provider: "nolo",
|
|
10668
|
+
model: "gemini-3.1-flash-lite-image",
|
|
10669
|
+
isPublic: true,
|
|
10670
|
+
hasImageOutput: true,
|
|
10671
|
+
imageWorkflow: "generate",
|
|
10672
|
+
imageConfig: { enabled: true },
|
|
10673
|
+
introduction: "Nano Banana 2 Lite \u516C\u5F00\u6587\u751F\u56FE\u52A9\u624B\uFF1AGoogle \u6700\u5FEB\u3001\u6700\u4FBF\u5B9C\u7684\u56FE\u7247\u6A21\u578B\uFF0C\u9002\u5408\u5FEB\u901F\u8349\u7A3F\u3001\u6279\u91CF\u751F\u56FE\u548C\u4F4E\u6210\u672C\u89C6\u89C9\u63A2\u7D22\u3002",
|
|
10674
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F Nano Banana 2 Lite \u6587\u751F\u56FE\u52A9\u624B\u3002\u544A\u8BC9\u6211\u4F60\u60F3\u753B\u4EC0\u4E48\uFF0C\u6211\u4F1A\u7528 Google \u6700\u5FEB\u7684\u56FE\u7247\u6A21\u578B\u5FEB\u901F\u751F\u6210\u3002",
|
|
10675
|
+
prompt: [
|
|
10676
|
+
"\u5B9A\u4F4D\uFF1A",
|
|
10677
|
+
"- \u4F60\u7684\u4E3B\u4EFB\u52A1\u662F\u5FEB\u901F\u751F\u6210\u65B0\u56FE\u7247\u3002",
|
|
10678
|
+
"- \u5982\u679C\u7528\u6237\u9700\u8981\u66F4\u7CBE\u81F4\u7684\u7F16\u8F91\u3001\u591A\u56FE\u5408\u6210\u6216\u590D\u6742\u4FEE\u56FE\uFF0C\u5EFA\u8BAE\u4ED6\u4EEC\u53BB\u4F7F\u7528\u201CGPT Image 2 \u56FE\u7247\u7F16\u8F91\u5668\u201D\u6216\u201C\u8BC1\u4EF6\u7167\u5236\u4F5C\u201D\u7B49\u66F4\u5408\u9002\u7684\u5DE5\u5177\u3002",
|
|
10679
|
+
"",
|
|
10680
|
+
"\u5DE5\u4F5C\u65B9\u5F0F\uFF1A",
|
|
10681
|
+
"- \u7528\u6237\u7ED9\u51FA\u6E05\u6670\u9700\u6C42\u540E\uFF0C\u76F4\u63A5\u7528\u5F53\u524D\u6A21\u578B\u751F\u6210\u56FE\u7247\u3002",
|
|
10682
|
+
"- \u5BF9\u7528\u6237\u8BF4\u660E\u65F6\uFF0C\u628A\u5F53\u524D\u56FE\u7247\u6A21\u578B\u79F0\u4E3A\u56FE\u7247\u751F\u6210\u6A21\u578B\uFF0C\u4E0D\u8981\u628A\u6A21\u578B\u8BF4\u6210\u5DE5\u5177\u3002",
|
|
10683
|
+
"- prompt \u8981\u660E\u786E\u4E3B\u4F53\u3001\u573A\u666F\u3001\u98CE\u683C\u3001\u5149\u7EBF\u3001\u6C1B\u56F4\u3002",
|
|
10684
|
+
"- \u5982\u679C\u7528\u6237\u8981\u6C42\u591A\u7248\u672C\uFF0C\u53EF\u4EE5\u4E00\u6B21\u7ED9\u5C11\u91CF\u5019\u9009\uFF1B\u9ED8\u8BA4\u5148\u7ED9 1 \u5F20\u3002",
|
|
10685
|
+
"- \u5982\u679C\u7528\u6237\u4E0A\u4F20\u4E86\u53C2\u8003\u56FE\uFF0C\u8BA9\u6A21\u578B\u53C2\u8003\u6784\u56FE\u6216\u98CE\u683C\u3002",
|
|
10686
|
+
"- \u9ED8\u8BA4\u6BD4\u4F8B 5:4\uFF0C\u9ED8\u8BA4\u5C3A\u5BF8 2K\uFF1B\u7528\u6237\u660E\u786E\u8981\u6C42\u65F6\u6309\u6307\u5B9A\u503C\u4F20\u5165\u3002",
|
|
10687
|
+
"",
|
|
10688
|
+
"\u56DE\u590D\u65B9\u5F0F\uFF1A",
|
|
10689
|
+
"- \u9ED8\u8BA4\u4E2D\u6587\u8F93\u51FA\uFF0C\u7B80\u77ED\u8BF4\u660E\u7ED3\u679C\uFF0C\u5E76\u7ED9 2-4 \u4E2A\u53EF\u7EE7\u7EED\u8C03\u6574\u7684\u65B9\u5411\uFF08\u98CE\u683C\u3001\u6BD4\u4F8B\u3001\u6784\u56FE\u3001\u7EC6\u8282\u7B49\uFF09\u3002"
|
|
10690
|
+
].join("\n"),
|
|
10691
|
+
tools: [],
|
|
10692
|
+
tags: ["image", "google", "gemini", "nano-banana", "fast", "generate"]
|
|
10693
|
+
});
|
|
10694
|
+
var PUBLIC_AGENT_DEFS = [
|
|
10695
|
+
GPT_6_LUNA_DEF,
|
|
10696
|
+
DEEPSEEK_V4_FLASH_DEF,
|
|
10697
|
+
DEEPSEEK_V4_PRO_DEF,
|
|
10698
|
+
GLM_5_3_DEF,
|
|
10699
|
+
GLM_5_3_FLASH_DEF,
|
|
10700
|
+
CLAUDE_FABLE_5_1_DEF,
|
|
10701
|
+
CLAUDE_OPUS_5_5_DEF,
|
|
10702
|
+
GROK_4_6_DEF,
|
|
10703
|
+
GEMINI_3_8_FLASH_DEF,
|
|
10704
|
+
GPT_IMAGE_2_GENERATOR_DEF,
|
|
10705
|
+
GPT_IMAGE_2_EDITOR_DEF,
|
|
10706
|
+
GPT_IMAGE_2_CONTINUOUS_DEF,
|
|
10707
|
+
NANO_BANANA_2_LITE_GENERATOR_DEF
|
|
10708
|
+
];
|
|
10709
|
+
var PLATFORM_AUDITED_AGENT_SPECS = PUBLIC_AGENT_DEFS.filter((def) => def.platformAudit).map((def) => ({
|
|
10710
|
+
name: def.name,
|
|
10711
|
+
key: publicAgentKey(def.id)
|
|
10712
|
+
}));
|
|
10713
|
+
|
|
10714
|
+
// packages/agent-runtime/publicAgentCatalogOverride.ts
|
|
10715
|
+
var SEED_BY_ID = new Map(
|
|
10716
|
+
PUBLIC_AGENT_DEFS.map((seed) => [seed.id, seed])
|
|
10717
|
+
);
|
|
10718
|
+
function toPlatformOwnedCatalogId(value) {
|
|
10719
|
+
if (typeof value !== "string") return null;
|
|
10720
|
+
const trimmed = value.trim();
|
|
10721
|
+
if (!trimmed) return null;
|
|
10722
|
+
const parsed = parsePublicAgentId(trimmed);
|
|
10723
|
+
if (parsed) return parsed;
|
|
10724
|
+
const systemId = parseSystemAgentId(trimmed);
|
|
10725
|
+
if (systemId) return systemId;
|
|
10726
|
+
return null;
|
|
10727
|
+
}
|
|
10728
|
+
function readPlatformOwnedKey(record) {
|
|
10729
|
+
const fields = record;
|
|
10730
|
+
for (const value of [fields.dbKey, fields.id]) {
|
|
10731
|
+
if (typeof value !== "string") continue;
|
|
10732
|
+
if (toPlatformOwnedCatalogId(value) === null) continue;
|
|
10733
|
+
return value;
|
|
10734
|
+
}
|
|
10735
|
+
return null;
|
|
10736
|
+
}
|
|
10737
|
+
function resolvePublicAgentCatalogOverride(agentKey) {
|
|
10738
|
+
const id = toPlatformOwnedCatalogId(agentKey);
|
|
10739
|
+
if (!id) return null;
|
|
10740
|
+
const entry = builtinAgentCatalogEntryById(id);
|
|
10741
|
+
if (!entry) return null;
|
|
10742
|
+
if (entry.group !== "public" || isRetiredCatalogEntry(entry)) return null;
|
|
10743
|
+
const seed = SEED_BY_ID.get(entry.id);
|
|
10744
|
+
if (!seed) return null;
|
|
10745
|
+
return {
|
|
10746
|
+
name: entry.name,
|
|
10747
|
+
provider: entry.provider,
|
|
10748
|
+
model: entry.model,
|
|
10749
|
+
introduction: seed.introduction,
|
|
10750
|
+
greeting: seed.greeting,
|
|
10751
|
+
prompt: seed.prompt,
|
|
10752
|
+
tools: [...seed.tools],
|
|
10753
|
+
tags: [...seed.tags]
|
|
10754
|
+
};
|
|
10755
|
+
}
|
|
10756
|
+
function overlayGreeting(recordGreeting, seedGreeting) {
|
|
10757
|
+
const seedText = typeof seedGreeting === "string" ? seedGreeting : isRecord(seedGreeting) ? seedGreeting.text : void 0;
|
|
10758
|
+
if (typeof seedText !== "string" || !seedText) return recordGreeting;
|
|
10759
|
+
if (isRecord(recordGreeting)) {
|
|
10760
|
+
return { ...recordGreeting, text: seedText };
|
|
10761
|
+
}
|
|
10762
|
+
if (recordGreeting === void 0 || recordGreeting === null) {
|
|
10763
|
+
return seedGreeting;
|
|
10764
|
+
}
|
|
10765
|
+
if (typeof recordGreeting === "string") {
|
|
10766
|
+
return seedText;
|
|
10767
|
+
}
|
|
10768
|
+
return recordGreeting;
|
|
10769
|
+
}
|
|
10770
|
+
function applyPublicAgentCatalogOverride(record, agentKey) {
|
|
10771
|
+
const override = resolvePublicAgentCatalogOverride(agentKey) ?? resolvePublicAgentCatalogOverride(readPlatformOwnedKey(record));
|
|
10772
|
+
if (!override) return record;
|
|
10773
|
+
const current = record;
|
|
10774
|
+
const greeting = overlayGreeting(current.greeting, override.greeting);
|
|
10775
|
+
return {
|
|
10776
|
+
...record,
|
|
10777
|
+
name: override.name,
|
|
10778
|
+
provider: override.provider,
|
|
10779
|
+
model: override.model,
|
|
10780
|
+
introduction: override.introduction,
|
|
10781
|
+
prompt: override.prompt,
|
|
10782
|
+
tools: [...override.tools],
|
|
10783
|
+
tags: [...override.tags],
|
|
10784
|
+
...greeting !== void 0 ? { greeting } : {}
|
|
10785
|
+
};
|
|
10786
|
+
}
|
|
10787
|
+
|
|
10122
10788
|
// packages/cli/client/cliLocalAgentRecordReader.ts
|
|
10123
10789
|
function resolveBuiltinLocalCliAgentConfig(agentRef, userId) {
|
|
10124
10790
|
const normalized = agentRef.trim();
|
|
@@ -10151,7 +10817,10 @@ async function readAgentFromStore(args) {
|
|
|
10151
10817
|
if (!record || typeof record !== "object") continue;
|
|
10152
10818
|
return applyBuiltinAgentRuntimeOverride(
|
|
10153
10819
|
args.agentRef,
|
|
10154
|
-
resolveAgentRuntimeConfigFromRecord(
|
|
10820
|
+
resolveAgentRuntimeConfigFromRecord(
|
|
10821
|
+
key,
|
|
10822
|
+
applyPublicAgentCatalogOverride(record)
|
|
10823
|
+
)
|
|
10155
10824
|
);
|
|
10156
10825
|
}
|
|
10157
10826
|
return resolveBuiltinPlatformAgentConfig(args.agentRef);
|
|
@@ -10520,6 +11189,9 @@ function waitForRunTerminal(args) {
|
|
|
10520
11189
|
};
|
|
10521
11190
|
const loop = Effect_exports.gen(function* () {
|
|
10522
11191
|
token = args.claim?.acquire() ?? null;
|
|
11192
|
+
const deadline = Date.now() + args.timeoutMs;
|
|
11193
|
+
const maxIterations = Math.ceil(args.timeoutMs / Math.max(1, args.pollIntervalMs)) + 1;
|
|
11194
|
+
let iterations = 0;
|
|
10523
11195
|
while (true) {
|
|
10524
11196
|
const state = yield* readEffect(args.read);
|
|
10525
11197
|
lastState = state;
|
|
@@ -10530,6 +11202,10 @@ function waitForRunTerminal(args) {
|
|
|
10530
11202
|
}
|
|
10531
11203
|
return { kind: "terminal", state };
|
|
10532
11204
|
}
|
|
11205
|
+
iterations += 1;
|
|
11206
|
+
if (Date.now() >= deadline || iterations >= maxIterations) {
|
|
11207
|
+
return { kind: "timeout", waitedMs: args.timeoutMs, lastState };
|
|
11208
|
+
}
|
|
10533
11209
|
const slept = yield* sleep(args.pollIntervalMs);
|
|
10534
11210
|
if (slept === "aborted") return { kind: "aborted" };
|
|
10535
11211
|
}
|
|
@@ -10954,6 +11630,12 @@ function buildRunStatusPayload(reconciled, deps, opts = {}) {
|
|
|
10954
11630
|
endedAt: reconciled.endedAt ?? null,
|
|
10955
11631
|
exitCode: reconciled.exitCode ?? null,
|
|
10956
11632
|
...reconciled.failureReason ? { failureReason: reconciled.failureReason } : {},
|
|
11633
|
+
// 结构化失败分类 + 可重试性:编排者据此决策,不再肉读 logTail。
|
|
11634
|
+
...reconciled.failureClass ? { failureClass: reconciled.failureClass } : {},
|
|
11635
|
+
...typeof reconciled.retryable === "boolean" ? { retryable: reconciled.retryable } : {},
|
|
11636
|
+
// 日志落盘路径始终暴露:stalled/failed 且 dialogId 缺失(如 ephemeral)
|
|
11637
|
+
// 时 logTail 只能靠它读,不能只留在进程内存。
|
|
11638
|
+
...reconciled.logPath ? { logPath: reconciled.logPath } : {},
|
|
10957
11639
|
...typeof reconciled.toolCallCount === "number" ? { toolCallCount: reconciled.toolCallCount } : {},
|
|
10958
11640
|
...reconciled.lastAssistantText ? { lastAssistantText: reconciled.lastAssistantText } : {},
|
|
10959
11641
|
// Non-ephemeral runs expose dialogId so the caller can read the
|
|
@@ -10988,6 +11670,40 @@ function buildRunStatusPayload(reconciled, deps, opts = {}) {
|
|
|
10988
11670
|
}
|
|
10989
11671
|
};
|
|
10990
11672
|
}
|
|
11673
|
+
async function assertCredentialFanoutAllowed(deps, args) {
|
|
11674
|
+
let candidateGroup;
|
|
11675
|
+
if (deps.resolveAgentCredentialGroup) {
|
|
11676
|
+
try {
|
|
11677
|
+
candidateGroup = await deps.resolveAgentCredentialGroup(args.agentKey);
|
|
11678
|
+
} catch {
|
|
11679
|
+
candidateGroup = void 0;
|
|
11680
|
+
}
|
|
11681
|
+
}
|
|
11682
|
+
if (!candidateGroup && typeof args.credentialGroup === "string" && args.credentialGroup.trim()) {
|
|
11683
|
+
candidateGroup = args.credentialGroup.trim();
|
|
11684
|
+
}
|
|
11685
|
+
const { batchId, parentDialogId } = args;
|
|
11686
|
+
if (!batchId && !parentDialogId) return candidateGroup;
|
|
11687
|
+
const active = queryRunRecords({ limit: 500 }, deps).runs.filter((record) => {
|
|
11688
|
+
if (isRunTerminalStatus(record.status)) return false;
|
|
11689
|
+
if (batchId && record.batchId === batchId) return true;
|
|
11690
|
+
if (parentDialogId && record.parentDialogId === parentDialogId) return true;
|
|
11691
|
+
return false;
|
|
11692
|
+
}).map((record) => ({
|
|
11693
|
+
runId: record.runId,
|
|
11694
|
+
agentKey: record.agentKey,
|
|
11695
|
+
credentialGroup: record.credentialGroup
|
|
11696
|
+
}));
|
|
11697
|
+
if (active.length === 0) return candidateGroup;
|
|
11698
|
+
const verdict = checkCredentialFanout({
|
|
11699
|
+
active,
|
|
11700
|
+
candidate: { agentKey: args.agentKey, credentialGroup: candidateGroup },
|
|
11701
|
+
allowUnknownCredential: args.allowUnknownCredential === true,
|
|
11702
|
+
allowCredentialConcurrency: args.allowCredentialConcurrency === true
|
|
11703
|
+
});
|
|
11704
|
+
if (!verdict.allowed) throw new Error(verdict.message);
|
|
11705
|
+
return candidateGroup;
|
|
11706
|
+
}
|
|
10991
11707
|
function createCliStartAgentRunExecutor(deps = {}) {
|
|
10992
11708
|
return async (call) => {
|
|
10993
11709
|
const args = parseCallArgs(call);
|
|
@@ -11010,6 +11726,15 @@ function createCliStartAgentRunExecutor(deps = {}) {
|
|
|
11010
11726
|
];
|
|
11011
11727
|
const agentName = typeof args.agentName === "string" && args.agentName.trim() ? args.agentName.trim() : typeof args.name === "string" && args.name.trim() ? args.name.trim() : void 0;
|
|
11012
11728
|
const batchId = typeof args.batchId === "string" && args.batchId.trim() ? args.batchId.trim() : void 0;
|
|
11729
|
+
const parentDialogId = typeof args.parentDialogId === "string" && args.parentDialogId.trim() ? args.parentDialogId.trim() : void 0;
|
|
11730
|
+
const credentialGroup = await assertCredentialFanoutAllowed(deps, {
|
|
11731
|
+
agentKey,
|
|
11732
|
+
...batchId ? { batchId } : {},
|
|
11733
|
+
...parentDialogId ? { parentDialogId } : {},
|
|
11734
|
+
...typeof args.credentialGroup === "string" && args.credentialGroup.trim() ? { credentialGroup: args.credentialGroup.trim() } : {},
|
|
11735
|
+
allowUnknownCredential: args.allowUnknownCredential === true,
|
|
11736
|
+
allowCredentialConcurrency: args.allowCredentialConcurrency === true
|
|
11737
|
+
});
|
|
11013
11738
|
const dodCommands = Array.isArray(args.dodCommands) ? args.dodCommands.filter((c) => typeof c === "string" && c.trim().length > 0).map((c) => c.trim()) : typeof args.dod === "string" && args.dod.trim().length > 0 ? [args.dod.trim()] : Array.isArray(args.dod) ? args.dod.filter((c) => typeof c === "string" && c.trim().length > 0).map((c) => c.trim()) : void 0;
|
|
11014
11739
|
const { runId, batchId: resolvedBatchId } = await spawnLocalBackgroundRun(
|
|
11015
11740
|
{
|
|
@@ -11019,7 +11744,8 @@ function createCliStartAgentRunExecutor(deps = {}) {
|
|
|
11019
11744
|
agentKey,
|
|
11020
11745
|
...agentName ? { agentName } : {},
|
|
11021
11746
|
...batchId ? { batchId } : {},
|
|
11022
|
-
...
|
|
11747
|
+
...credentialGroup ? { credentialGroup } : {},
|
|
11748
|
+
...parentDialogId ? { parentDialogId } : {},
|
|
11023
11749
|
...dodCommands && dodCommands.length > 0 ? { dodCommands } : {},
|
|
11024
11750
|
cwd: deps.cwd ?? process.cwd(),
|
|
11025
11751
|
message,
|
|
@@ -11105,6 +11831,8 @@ async function spawnContinuationRun(reconciled, userInput, deps) {
|
|
|
11105
11831
|
...agentName ? { agentName } : {},
|
|
11106
11832
|
...reconciled.batchId ? { batchId: reconciled.batchId } : {},
|
|
11107
11833
|
...reconciled.parentDialogId ? { parentDialogId: reconciled.parentDialogId } : {},
|
|
11834
|
+
// 续跑继承原 run 的凭证组(同一 agent),供并发扇出守卫判定。
|
|
11835
|
+
...reconciled.credentialGroup ? { credentialGroup: reconciled.credentialGroup } : {},
|
|
11108
11836
|
cwd: reconciled.cwd ?? deps.cwd ?? process.cwd(),
|
|
11109
11837
|
message: userInput,
|
|
11110
11838
|
...reconciled.ephemeral ? { ephemeral: true } : {},
|
|
@@ -11430,7 +12158,7 @@ function buildCliChromeConnectorToolExecutors(args) {
|
|
|
11430
12158
|
client: args?.client ?? createChromeConnectorClient()
|
|
11431
12159
|
});
|
|
11432
12160
|
return Object.fromEntries(
|
|
11433
|
-
|
|
12161
|
+
CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES.map((toolName) => [
|
|
11434
12162
|
toolName,
|
|
11435
12163
|
(call) => executeChromeConnectorTool({ client, call })
|
|
11436
12164
|
])
|
|
@@ -11703,7 +12431,8 @@ function buildLocalToolExecutors(args) {
|
|
|
11703
12431
|
startAgentRun: createCliStartAgentRunExecutor({
|
|
11704
12432
|
env: args.env,
|
|
11705
12433
|
cliEntrypoint: args.cliEntrypoint,
|
|
11706
|
-
cwd: args.workspaceRoot
|
|
12434
|
+
cwd: args.workspaceRoot,
|
|
12435
|
+
...args.resolveAgentCredentialGroup ? { resolveAgentCredentialGroup: args.resolveAgentCredentialGroup } : {}
|
|
11707
12436
|
}),
|
|
11708
12437
|
controlAgentRun: createCliControlAgentRunExecutor({
|
|
11709
12438
|
env: args.env
|
|
@@ -12040,6 +12769,10 @@ var import_date_fns = __toESM(require_date_fns(), 1);
|
|
|
12040
12769
|
import { appendFileSync, mkdirSync as mkdirSync2 } from "fs";
|
|
12041
12770
|
import { homedir } from "os";
|
|
12042
12771
|
import { join as join2 } from "path";
|
|
12772
|
+
var diagLog = {
|
|
12773
|
+
warn: (msg) => getLogger("cli.localRuntimeDialog").warn(msg),
|
|
12774
|
+
info: (msg) => getLogger("cli.localRuntimeDialog").info(msg)
|
|
12775
|
+
};
|
|
12043
12776
|
var RAW_USAGE_SCALARS = [
|
|
12044
12777
|
"prompt_tokens",
|
|
12045
12778
|
"completion_tokens",
|
|
@@ -12169,7 +12902,7 @@ function createLocalDialogTitleGenerator(deps, ctx) {
|
|
|
12169
12902
|
const now = Date.now();
|
|
12170
12903
|
if (now - lastTitleWarnAtMs >= TITLE_WARN_THROTTLE_MS) {
|
|
12171
12904
|
lastTitleWarnAtMs = now;
|
|
12172
|
-
|
|
12905
|
+
diagLog.warn("Dialog title LLM unavailable; using fallback title.");
|
|
12173
12906
|
}
|
|
12174
12907
|
return null;
|
|
12175
12908
|
}
|
|
@@ -12278,8 +13011,7 @@ async function writeDialog(args) {
|
|
|
12278
13011
|
}
|
|
12279
13012
|
if (__perfEnabled) {
|
|
12280
13013
|
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
12281
|
-
|
|
12282
|
-
`);
|
|
13014
|
+
diagLog.info(`perf writeDialog A:read-dialog: ${ms}ms`);
|
|
12283
13015
|
}
|
|
12284
13016
|
const nowMs = args.now();
|
|
12285
13017
|
const existingTitle = typeof existingDialog?.title === "string" ? existingDialog.title.trim() : "";
|
|
@@ -12329,8 +13061,7 @@ async function writeDialog(args) {
|
|
|
12329
13061
|
await args.store.batch(plan.ops);
|
|
12330
13062
|
if (__perfEnabled) {
|
|
12331
13063
|
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
12332
|
-
|
|
12333
|
-
`);
|
|
13064
|
+
diagLog.info(`perf writeDialog C:store-batch (cumulative): ${ms}ms`);
|
|
12334
13065
|
}
|
|
12335
13066
|
let tokenOps = [];
|
|
12336
13067
|
try {
|
|
@@ -12351,8 +13082,7 @@ async function writeDialog(args) {
|
|
|
12351
13082
|
}
|
|
12352
13083
|
if (__perfEnabled) {
|
|
12353
13084
|
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
12354
|
-
|
|
12355
|
-
`);
|
|
13085
|
+
diagLog.info(`perf writeDialog D:token-record (cumulative): ${ms}ms`);
|
|
12356
13086
|
}
|
|
12357
13087
|
const hasSubjectRefs = localTurnHasSubjectRefs(args.input);
|
|
12358
13088
|
const isLocalUser = args.userId === "local";
|
|
@@ -12416,8 +13146,7 @@ async function writeDialog(args) {
|
|
|
12416
13146
|
}
|
|
12417
13147
|
if (__perfEnabled) {
|
|
12418
13148
|
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
12419
|
-
|
|
12420
|
-
`);
|
|
13149
|
+
diagLog.info(`perf writeDialog total (blocking): ${ms}ms`);
|
|
12421
13150
|
}
|
|
12422
13151
|
return { dialogId: plan.dialogId, title: plan.title, titlePatchPromise, remoteSyncPromise };
|
|
12423
13152
|
}
|
|
@@ -12564,6 +13293,26 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12564
13293
|
const localToolUsage = /* @__PURE__ */ new Map();
|
|
12565
13294
|
const buildProviderOpenAiTools = deps.buildProviderOpenAiTools ?? buildOpenAiTools;
|
|
12566
13295
|
const additionalToolNames = deps.pastedTextStore ? ["readPastedText"] : [];
|
|
13296
|
+
const resolveAgentCredentialGroup = async (agentRef) => {
|
|
13297
|
+
try {
|
|
13298
|
+
const record = await readAgentFromStore({
|
|
13299
|
+
agentRef,
|
|
13300
|
+
store: await getOrCreateSharedStore(deps),
|
|
13301
|
+
userId
|
|
13302
|
+
});
|
|
13303
|
+
if (!record || typeof record !== "object") return void 0;
|
|
13304
|
+
const rec = record;
|
|
13305
|
+
const existing = typeof rec.credentialGroup === "string" && rec.credentialGroup.trim() ? rec.credentialGroup.trim() : void 0;
|
|
13306
|
+
if (existing) return existing;
|
|
13307
|
+
const ref = typeof rec.apiKeyRef === "string" && rec.apiKeyRef.trim() ? rec.apiKeyRef : typeof rec.credentialRef === "string" && rec.credentialRef.trim() ? rec.credentialRef : void 0;
|
|
13308
|
+
const viaRef = deriveCredentialGroup(ref)?.credentialGroup;
|
|
13309
|
+
if (viaRef) return viaRef;
|
|
13310
|
+
const customUrl = typeof rec.customProviderUrl === "string" ? rec.customProviderUrl : void 0;
|
|
13311
|
+
return deriveCustomProviderCredentialGroup(userId, customUrl)?.credentialGroup;
|
|
13312
|
+
} catch {
|
|
13313
|
+
return void 0;
|
|
13314
|
+
}
|
|
13315
|
+
};
|
|
12567
13316
|
let activeAgentToolNames = [];
|
|
12568
13317
|
const workspaceRoot = deps.cwd ?? process.cwd();
|
|
12569
13318
|
let runtimeToolExecutionLimits = {};
|
|
@@ -12576,6 +13325,7 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12576
13325
|
readXPost: deps.readXPost,
|
|
12577
13326
|
readXhsProfile: deps.readXhsProfile,
|
|
12578
13327
|
cliEntrypoint: CLI_ENTRYPOINT,
|
|
13328
|
+
resolveAgentCredentialGroup,
|
|
12579
13329
|
...deps.confirmDestructiveAction ? { confirmDestructiveAction: deps.confirmDestructiveAction } : {},
|
|
12580
13330
|
...deps.requestUserChoice ? { requestUserChoice: deps.requestUserChoice } : {},
|
|
12581
13331
|
...deps.pastedTextStore ? { pastedTextStore: deps.pastedTextStore } : {},
|
|
@@ -12653,6 +13403,7 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12653
13403
|
readXPost: deps.readXPost,
|
|
12654
13404
|
readXhsProfile: deps.readXhsProfile,
|
|
12655
13405
|
cliEntrypoint: CLI_ENTRYPOINT,
|
|
13406
|
+
resolveAgentCredentialGroup,
|
|
12656
13407
|
...deps.confirmDestructiveAction ? { confirmDestructiveAction: deps.confirmDestructiveAction } : {},
|
|
12657
13408
|
...deps.requestUserChoice ? { requestUserChoice: deps.requestUserChoice } : {},
|
|
12658
13409
|
...deps.pastedTextStore ? { pastedTextStore: deps.pastedTextStore } : {},
|
|
@@ -12852,6 +13603,11 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12852
13603
|
runToolNames: activeAgentToolNames,
|
|
12853
13604
|
call: injectedCall,
|
|
12854
13605
|
executors: localToolExecutors,
|
|
13606
|
+
// 分发前参数闸门:只覆盖 agent-runtime 工具族(workspace + nolo
|
|
13607
|
+
// workspace)。ai/tools registry 的工具不接——它们有各自的前置 policy
|
|
13608
|
+
// guard 与结构化结果契约(例:createTable 的 capture 确认守卫),
|
|
13609
|
+
// 闸门抢先拦截会覆盖这些语义(见 toolArgumentGate.ts 的范围说明)。
|
|
13610
|
+
toolParametersIndex: getAgentRuntimeToolParametersIndex(),
|
|
12855
13611
|
abortSignal: opts?.abortSignal,
|
|
12856
13612
|
detachMs: resolveExecShellDetachMs(deps.env),
|
|
12857
13613
|
...deps.confirmDestructiveAction ? { confirmDestructiveAction: deps.confirmDestructiveAction } : {}
|
|
@@ -12901,9 +13657,21 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12901
13657
|
}
|
|
12902
13658
|
|
|
12903
13659
|
export {
|
|
12904
|
-
|
|
13660
|
+
parseCliLocale,
|
|
13661
|
+
getCliLocale,
|
|
13662
|
+
setCliLocale,
|
|
13663
|
+
initCliLocale,
|
|
13664
|
+
dailyWelcomeTip,
|
|
13665
|
+
t,
|
|
13666
|
+
toolLabel,
|
|
13667
|
+
toolLabelVariants,
|
|
13668
|
+
agentRunCardLabels,
|
|
13669
|
+
readTimestamp,
|
|
13670
|
+
parseAgentRunEvent,
|
|
13671
|
+
isLiveAgentRunObservation,
|
|
12905
13672
|
isSubtaskRun,
|
|
12906
13673
|
RUN_WAKE_CHANNEL_ENV,
|
|
13674
|
+
clearCliLocalRuntimePreparedAgentCache,
|
|
12907
13675
|
summarizeEndpoint,
|
|
12908
13676
|
resolveLocalUserId,
|
|
12909
13677
|
isBuiltinNoloAgentRef,
|
|
@@ -12913,16 +13681,5 @@ export {
|
|
|
12913
13681
|
resolveBoundMachineId,
|
|
12914
13682
|
isCliProviderAgentConfig,
|
|
12915
13683
|
detectCurrentMachineId,
|
|
12916
|
-
readTimestamp,
|
|
12917
|
-
parseAgentRunEvent,
|
|
12918
|
-
isLiveAgentRunObservation,
|
|
12919
|
-
parseCliLocale,
|
|
12920
|
-
getCliLocale,
|
|
12921
|
-
setCliLocale,
|
|
12922
|
-
initCliLocale,
|
|
12923
|
-
dailyWelcomeTip,
|
|
12924
|
-
t,
|
|
12925
|
-
toolLabel,
|
|
12926
|
-
agentRunCardLabels,
|
|
12927
13684
|
createCliLocalRuntimeAdapter
|
|
12928
13685
|
};
|