nolo-cli 0.90.0-alpha.1 → 0.91.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-W26HVI75.js → _executeModel-H35GQ2XO.js} +61 -60
- package/{action-6DXQGJMX.js → action-3ZOODRBC.js} +11 -11
- package/{addContentAction-I7VX5SAC.js → addContentAction-IJHG2ZV7.js} +9 -9
- package/{addDialogAgentAction-OJSFV7DZ.js → addDialogAgentAction-IGFS2UBX.js} +11 -11
- package/{agentDeleteCommand-XNFWCKBH.js → agentDeleteCommand-XOFMXMHW.js} +43 -42
- package/{agentEmailCommands-W3X3EJ3V.js → agentEmailCommands-H2SEP6ZQ.js} +82 -78
- package/{agentGrantCommands-YW6PQAQ2.js → agentGrantCommands-M3XFO6EN.js} +2 -2
- package/{agentListCommands-DFWFU6XO.js → agentListCommands-RYGH6NUL.js} +72 -80
- package/{agentMachineCommands-LMFOAEL4.js → agentMachineCommands-XELOBZIP.js} +37 -36
- package/{agentProviderCommands-ZBYHGTGY.js → agentProviderCommands-JCRK6ST2.js} +1 -1
- package/{agentPullCommand-GLOOXJ2E.js → agentPullCommand-HF4A42D4.js} +3 -3
- package/agentRecordCommands-43HAXAZO.js +130 -0
- package/{agentRunCommand-HTBVIBGV.js → agentRunCommand-GIPN6DBO.js} +80 -75
- package/{agentRunControl-XLGD3UZ5.js → agentRunControl-AVJR4JW4.js} +2 -2
- package/{agentRuntimeLocal-2JFG4HDU.js → agentRuntimeLocal-SDOSSCLU.js} +38 -33
- package/{agentSlice-ZNLGFUB5.js → agentSlice-B2DLZMAC.js} +11 -11
- package/{appDeleteCommands-2UN4N2NR.js → appDeleteCommands-7OR5MAOR.js} +37 -36
- package/{appDeployCommands-37D74KRR.js → appDeployCommands-5GNI723H.js} +37 -36
- package/{appDeployStatusCommands-QBLWL2IA.js → appDeployStatusCommands-WL2NG3SG.js} +37 -36
- package/{appGetCommands-6KXIDF2T.js → appGetCommands-7BVKQS44.js} +37 -36
- package/{appListCommands-G2WFGEWQ.js → appListCommands-5VXFJOBU.js} +37 -36
- package/{authCommand-V2DJ7DB7.js → authCommand-N4Q6463J.js} +115 -23
- package/{authCommands-RGOGCPP6.js → authCommands-GBIFZWD3.js} +5 -5
- package/{builtinSkillRegistry-WBGYKIAZ.js → builtinSkillRegistry-JPY2DKRF.js} +7 -7
- package/{chatQueueReduxAdapter-XCJHIY3R.js → chatQueueReduxAdapter-3KDRKXTT.js} +29 -29
- package/{chromeCommands-VOIRNJBL.js → chromeCommands-NKU3OWKH.js} +36 -11
- package/{chromeOpsCommands-M7DPCX2T.js → chromeOpsCommands-OQDJGD4Y.js} +31 -1
- package/{chunk-4BYPU626.js → chunk-232453C2.js} +994 -1036
- package/{chunk-SMZSWB44.js → chunk-25GAGMRK.js} +6 -83
- package/{chunk-PH5J5VUY.js → chunk-3IYMTWYZ.js} +22 -22
- package/{chunk-NTW5GWDM.js → chunk-3VNWWVKB.js} +2 -0
- package/{chunk-TVNI5FLG.js → chunk-46CRK7XP.js} +7 -7
- package/{chunk-2ADBVBEM.js → chunk-55VQ4OPL.js} +4 -4
- package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
- package/{chunk-DWUCB2A3.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-3R5PH4IP.js → chunk-64TIEZHF.js} +1 -1
- package/{chunk-6YTOJY35.js → chunk-6D2JFXLY.js} +35 -0
- package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
- package/{chunk-WXPVOQD7.js → chunk-6PELJ3DS.js} +533 -236
- package/{chunk-NFMHIUY3.js → chunk-7EMJBGCA.js} +966 -218
- package/{chunk-HYZHJ5GW.js → chunk-7YMUSSHQ.js} +93 -93
- package/chunk-ACTMNVHM.js +93 -0
- package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
- package/{chunk-UKWGR5SS.js → chunk-AUXHZ2M5.js} +186 -397
- package/{chunk-7MYYE7WX.js → chunk-B4PW6UAI.js} +61 -34
- package/{chunk-4DRWWIOL.js → chunk-B7ANJQWZ.js} +2 -2
- package/{chunk-XKQJJK4F.js → chunk-BAAKVSMZ.js} +4 -4
- package/{chunk-FQYMLZ6C.js → chunk-BFCXG6AJ.js} +16 -16
- package/{chunk-ZBT3WNBK.js → chunk-BJUDYFV5.js} +10 -2
- package/chunk-BMQ2MJUK.js +153 -0
- package/{chunk-TL6L5XUT.js → chunk-BNGW5ASC.js} +94 -16
- package/{chunk-JTK3TJYV.js → chunk-BTSYHR7J.js} +4 -4
- package/{chunk-LS2ZANRJ.js → chunk-CTUQJVQM.js} +1 -1
- package/{chunk-JEDZAO7L.js → chunk-D2W6WRHT.js} +13 -8
- package/{chunk-6BEA566T.js → chunk-D76D3RTR.js} +2 -2
- package/{chunk-HQCSU3DI.js → chunk-DCLMZ5TX.js} +4 -4
- package/{chunk-L2ICPOAL.js → chunk-EFZKILX6.js} +4 -4
- package/{chunk-JBBZ5KUM.js → chunk-EHO5EGU4.js} +23 -76
- 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-VHJLQHPQ.js → chunk-F64B2W3R.js} +110 -34
- package/{chunk-AQZRTHDZ.js → chunk-G4EMOUX3.js} +886 -154
- package/{chunk-XTUY5EL4.js → chunk-GJUKGFHG.js} +74 -16
- package/{chunk-XMGHGEN6.js → chunk-GMVELWJG.js} +3 -3
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-CJCJF5XB.js → chunk-H6A6X4EK.js} +36 -3
- package/{chunk-N3OAPEZE.js → chunk-HBTA2SGQ.js} +97 -21
- package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
- package/{chunk-3CR2LC6X.js → chunk-HNRASX3X.js} +8 -8
- package/{chunk-CPH3W5A7.js → chunk-I3TQJXQ7.js} +94 -3
- package/{chunk-GRYGRGPS.js → chunk-IS5VEM2G.js} +140 -15
- package/{chunk-MJHQ3NRV.js → chunk-ISHYYQJC.js} +5 -3
- package/{chunk-ZAB3A45K.js → chunk-K7M4I3PF.js} +30 -7
- package/{chunk-2AYMFHUG.js → chunk-KQOD3G2X.js} +165 -15
- package/{chunk-YOXYA2GU.js → chunk-LNPYTNMG.js} +10 -5
- package/{chunk-F2CGG72C.js → chunk-LS2MI3B4.js} +45 -45
- package/{chunk-GII32WZW.js → chunk-M2EJHDJP.js} +3 -0
- package/{chunk-7S4YWN7P.js → chunk-MX574M24.js} +1 -1
- package/{chunk-DNQPPRHY.js → chunk-N3XA2O6O.js} +1 -1
- package/{chunk-5DFFKASO.js → chunk-NILSKYOE.js} +3 -3
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-K7M3MWCE.js → chunk-OOSVFT6S.js} +2 -2
- package/{chunk-QCZX4FTW.js → chunk-OY5IJI2N.js} +194 -21
- package/{chunk-HMEMJ7GH.js → chunk-PAYUVQ6P.js} +7749 -1320
- package/{chunk-ASGDO77C.js → chunk-Q67DOFOO.js} +92 -4
- package/{chunk-UA5S3LQQ.js → chunk-QALRKMHF.js} +11 -10
- package/{chunk-RZANZZL2.js → chunk-QDSINZM3.js} +1 -1
- package/{chunk-DPQ2WVBY.js → chunk-QJLEMM2V.js} +1 -1
- package/{chunk-IIKPWSPX.js → chunk-R4SQ3LGW.js} +1 -1
- package/{chunk-UTCCPWB2.js → chunk-RZ6CQZB2.js} +34 -20
- package/{chunk-SAFZABH7.js → chunk-SV5IJK6K.js} +1 -1
- package/{chunk-576IMUGH.js → chunk-T5V7HA3K.js} +1 -1
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/chunk-UNYJU5L6.js +780 -0
- package/{chunk-QFMFJZLO.js → chunk-V7E4PXQD.js} +1 -1
- package/{chunk-QHETQ3KI.js → chunk-VBSVA6CB.js} +2 -2
- package/{chunk-A2C4AKKM.js → chunk-VETFWL5K.js} +1 -1
- package/chunk-VJVNU77E.js +83 -0
- package/{chunk-6D6VBVEW.js → chunk-VPFEPRME.js} +9 -9
- package/{chunk-3CMTBX3X.js → chunk-W2P25VGS.js} +25 -6
- package/{chunk-CLI4LFSM.js → chunk-WC6A2Q7S.js} +5 -3
- package/{chunk-Z33ARZCP.js → chunk-WT2IAJAJ.js} +4 -4
- package/chunk-X6YIXGPT.js +870 -0
- package/{chunk-5V4NJHRM.js → chunk-YMPTI7RZ.js} +9 -9
- package/{chunk-5NMZNPTN.js → chunk-YRIFJ6XQ.js} +13 -13
- package/{chunk-FZGV4FGK.js → chunk-YRRASA5Q.js} +268 -143
- package/{chunk-2F4VYGFW.js → chunk-Z5W7UMQV.js} +4 -3
- package/{chunk-ND2J3NRB.js → chunk-ZGJLSHER.js} +2 -2
- package/{chunk-VRLI2WNW.js → chunk-ZI2MEZMT.js} +314 -142
- package/{chunk-2F7RJC6L.js → chunk-ZOVKKMF6.js} +1 -1
- package/commandRegistry-BP5JLW24.js +822 -0
- package/{contentThunks-VURN3DFW.js → contentThunks-2HYFUXUM.js} +29 -29
- package/{cooldownCommands-BSCH2W7P.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-QZAAY77R.js → createAgentAutomationAction-DCKUSJH7.js} +29 -29
- package/{createDialogAction-CHGXVTAC.js → createDialogAction-NRIAEH2A.js} +32 -32
- package/{createPageAction-IOGAFIN7.js → createPageAction-AUJHHXGG.js} +35 -35
- package/{dbSlice-YXQ6RYIH.js → dbSlice-HFPIJT5P.js} +8 -8
- package/{deleteFile-YG6QMJLU.js → deleteFile-UEAD5A5Z.js} +3 -3
- package/{dialogCommands-XREAP6WQ.js → dialogCommands-UJRGCRN6.js} +42 -39
- package/{dialogSlice-DOPGWGS4.js → dialogSlice-AHU4XXIW.js} +35 -29
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-3PYZGSCL.js → docCreateCommands-ZOV3ZBLW.js} +39 -38
- package/{docDeleteCommands-3Y6MU44Q.js → docDeleteCommands-G4KAXJYQ.js} +39 -38
- package/{docReadCommands-UBANMAFR.js → docReadCommands-B2MM3JIT.js} +38 -37
- package/{docStore-SYYFBENY.js → docStore-SITH63V3.js} +9 -9
- package/{docUpdateCommands-4GK2X6BN.js → docUpdateCommands-2QNF5CYN.js} +39 -38
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-67MEFPZR.js} +2 -2
- package/{getPricing-F2C65RIX.js → getPricing-OX7B4R6B.js} +3 -3
- package/{handleSendMessageAction-NPVTY2GE.js → handleSendMessageAction-7ZMJMWLC.js} +72 -80
- package/index.js +74 -877
- 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-I66X2XB7.js → machineCommands-YCTD5KOL.js} +75 -71
- package/{machineWsRunDispatch-W4FVBOUM.js → machineWsRunDispatch-JFMD4ZAW.js} +73 -69
- package/{memberThunks-5T4J6KXQ.js → memberThunks-SKFZ37VS.js} +9 -9
- package/{models-WW7VFNXB.js → models-T3SG6MJ5.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-OCWWKBSD.js → providerPresetApply-2QTBYN36.js} +7 -7
- package/{providerRegistry-ZJQU7AJ7.js → providerRegistry-SVXE4G4T.js} +7 -7
- package/{read-M2Q6WEKB.js → read-IEJLLUXY.js} +5 -5
- package/{readDocTool-T37P3YPB.js → readDocTool-4SPYCP2Y.js} +5 -3
- package/{readlineWorkspace-VY5AMOGR.js → readlineWorkspace-M3PLTBLD.js} +2396 -2018
- package/{removeDialogAgentAction-HB3JBVAI.js → removeDialogAgentAction-LILXTOQY.js} +14 -14
- package/{runAgentClientLoop-3NDADLVE.js → runAgentClientLoop-QMCXBOBH.js} +55 -55
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-3USD722U.js} +3 -3
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/{setDialogExtraReferencesAction-4XLHRV37.js → setDialogExtraReferencesAction-LVNHLNT5.js} +10 -10
- package/{setPrimaryDialogAgentAction-C3JOFC4W.js → setPrimaryDialogAgentAction-DCKO5NTW.js} +14 -14
- package/{settingSlice-CZRURSTH.js → settingSlice-CNE75ISY.js} +10 -10
- package/{spaceCommands-ENYCUUZH.js → spaceCommands-3U6OHM6O.js} +39 -38
- package/{streamAgentChatTurn-634OFUSR.js → streamAgentChatTurn-JPMJQSEE.js} +144 -84
- package/{switchDialogAgentAction-C6KVUKJP.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-ILBLCF7D.js → tools-XQ5GIH6P.js} +49 -49
- package/{tuiSummaryLlmCaller-LFUBZKXK.js → tuiSummaryLlmCaller-L63PDJUD.js} +16 -15
- package/{updateCommands-2M74UL7P.js → updateCommands-ECWKIWLQ.js} +3 -3
- package/{updateDialogTitleAction-RKFET73N.js → updateDialogTitleAction-EGAZMLUB.js} +32 -32
- package/agentRecordCommands-FVVVCQFM.js +0 -126
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-S7Z2HMCN.js +0 -25
- package/chunk-WS22FPWT.js +0 -79
- 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-WT2IAJAJ.js";
|
|
11
8
|
import {
|
|
12
9
|
createChromeConnectorClient,
|
|
13
10
|
createVerifiedChromeConnectorClient,
|
|
14
11
|
executeChromeConnectorTool
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OY5IJI2N.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,38 +46,24 @@ 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-7YMUSSHQ.js";
|
|
64
67
|
import {
|
|
65
68
|
getServerProviderSecret
|
|
66
69
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -69,6 +72,7 @@ import {
|
|
|
69
72
|
CONTROL_AGENT_RUN_ACTIONS,
|
|
70
73
|
buildControlAgentRunFunctionSchema,
|
|
71
74
|
buildStartAgentRunFunctionSchema,
|
|
75
|
+
checkCredentialFanout,
|
|
72
76
|
deleteMemoryFunctionSchema,
|
|
73
77
|
queryMemoryFunctionSchema,
|
|
74
78
|
readXPostFunc,
|
|
@@ -78,7 +82,11 @@ import {
|
|
|
78
82
|
rememberMemoryFunctionSchema,
|
|
79
83
|
resolveAgentRequiredPackIds,
|
|
80
84
|
setTodoListFunc
|
|
81
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-6PELJ3DS.js";
|
|
86
|
+
import {
|
|
87
|
+
deriveCredentialGroup,
|
|
88
|
+
deriveCustomProviderCredentialGroup
|
|
89
|
+
} from "./chunk-KQOD3G2X.js";
|
|
82
90
|
import {
|
|
83
91
|
fetchWithTransientRetry,
|
|
84
92
|
isTransientFetchError
|
|
@@ -94,27 +102,27 @@ import {
|
|
|
94
102
|
isAgentRunTerminalStatus,
|
|
95
103
|
resolveRunLabel,
|
|
96
104
|
shortRunId
|
|
97
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-3VNWWVKB.js";
|
|
98
106
|
import {
|
|
99
107
|
applyBuiltinAgentRuntimeOverride,
|
|
100
108
|
applyTokenUsageToDayStats,
|
|
101
109
|
prepareTokenUsageData,
|
|
102
110
|
resolveBuiltinPlatformAgentConfig,
|
|
103
111
|
runKeyed
|
|
104
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-PAYUVQ6P.js";
|
|
105
113
|
import {
|
|
106
114
|
BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
|
|
107
115
|
BUILTIN_TITLE_LLM_CONFIG
|
|
108
116
|
} from "./chunk-MC4XLIJ7.js";
|
|
109
117
|
import {
|
|
110
118
|
fetchServerSyncedCredential
|
|
111
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-46CRK7XP.js";
|
|
112
120
|
import {
|
|
113
121
|
require_date_fns
|
|
114
122
|
} from "./chunk-M76ECQRD.js";
|
|
115
123
|
import {
|
|
116
|
-
|
|
117
|
-
} from "./chunk-
|
|
124
|
+
getModelPricing
|
|
125
|
+
} from "./chunk-Z5W7UMQV.js";
|
|
118
126
|
import {
|
|
119
127
|
FORCED_TOOLS,
|
|
120
128
|
addDefaultLightWebToolsForConfiguredAgents,
|
|
@@ -124,16 +132,14 @@ import {
|
|
|
124
132
|
applySystemBuiltinSkillFilter,
|
|
125
133
|
expandEnabledPacks,
|
|
126
134
|
resolveEffectiveEnabledPacks
|
|
127
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-WC6A2Q7S.js";
|
|
128
136
|
import {
|
|
129
137
|
DEFAULT_HYBRID_READ_TIMEOUT_MS,
|
|
130
138
|
Duration_exports,
|
|
131
139
|
Effect_exports,
|
|
132
140
|
Exit_exports,
|
|
133
141
|
Option_exports,
|
|
134
|
-
accumulateGeminiChunks,
|
|
135
142
|
aggregateResponsesStream,
|
|
136
|
-
buildGeminiGenerateContentRequest,
|
|
137
143
|
buildLoadSkillExecutor,
|
|
138
144
|
buildLocalDialogWritePlan,
|
|
139
145
|
buildLocalWorkspaceOpenAiTools,
|
|
@@ -146,22 +152,28 @@ import {
|
|
|
146
152
|
evaluateFileWritePolicy,
|
|
147
153
|
executeLocalToolWithPolicy,
|
|
148
154
|
executeOpenAiCompatibleChatCompletion,
|
|
149
|
-
fetchAntigravityCloudCodeCompletion,
|
|
150
155
|
filterRetainedLedgerRecords,
|
|
156
|
+
getAgentRuntimeToolParametersIndex,
|
|
151
157
|
internalListWorkspaceEntries,
|
|
152
158
|
internalSearchWorkspace,
|
|
153
|
-
isGemini3Model,
|
|
154
159
|
isLineRangeCovered,
|
|
155
160
|
localDialogMessageRecordToRuntimeMessage,
|
|
161
|
+
parseSyncServersEnv,
|
|
162
|
+
readDevinUpstreamFailure,
|
|
163
|
+
resolveOpenAiCompatibleProviderConfig,
|
|
164
|
+
summarizeToolArguments
|
|
165
|
+
} from "./chunk-232453C2.js";
|
|
166
|
+
import {
|
|
167
|
+
accumulateGeminiChunks,
|
|
168
|
+
buildGeminiGenerateContentRequest,
|
|
169
|
+
fetchAntigravityCloudCodeCompletion,
|
|
170
|
+
isGemini3Model,
|
|
156
171
|
parseSseDataLineJson,
|
|
157
172
|
parseSseDataLineObject,
|
|
158
|
-
parseSyncServersEnv,
|
|
159
173
|
parseUpstreamErrorBody,
|
|
160
174
|
resolveAntigravityFinishReason,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
summarizeToolArguments
|
|
164
|
-
} from "./chunk-4BYPU626.js";
|
|
175
|
+
shouldUseGeminiNativeToolRoute
|
|
176
|
+
} from "./chunk-X6YIXGPT.js";
|
|
165
177
|
import {
|
|
166
178
|
PlatformStreamInterruptedError,
|
|
167
179
|
buildPlatformChatCompletionRequest,
|
|
@@ -170,17 +182,23 @@ import {
|
|
|
170
182
|
parsePlatformChatCompletionData,
|
|
171
183
|
parsePlatformChatCompletionResponse,
|
|
172
184
|
readPlatformChatSseCompletion,
|
|
173
|
-
readSseDataValues,
|
|
174
185
|
resolvePlatformChatProviderConfig,
|
|
175
186
|
shouldUsePlatformChatProvider
|
|
176
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-25GAGMRK.js";
|
|
188
|
+
import {
|
|
189
|
+
readSseDataValues
|
|
190
|
+
} from "./chunk-GMZLP5DV.js";
|
|
177
191
|
import {
|
|
178
192
|
resolveAgentRuntimeConfigFromRecord,
|
|
179
193
|
resolveHistoricalToolContentCap
|
|
180
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-VBSVA6CB.js";
|
|
181
195
|
import {
|
|
182
196
|
isDevinOAuthAgent
|
|
183
197
|
} from "./chunk-5ZUL4CUO.js";
|
|
198
|
+
import {
|
|
199
|
+
buildDialogFallbackTitleFromUserInput,
|
|
200
|
+
normalizeDialogTitle
|
|
201
|
+
} from "./chunk-2MBTWINN.js";
|
|
184
202
|
import {
|
|
185
203
|
collectStablePromptPrefix,
|
|
186
204
|
convertMessagesToResponsesInput,
|
|
@@ -191,59 +209,60 @@ import {
|
|
|
191
209
|
buildNoloWorkspaceOpenAiTools,
|
|
192
210
|
parseNoloWorkspaceToolArguments,
|
|
193
211
|
resolveRuntimeToolSurfaceForAgent
|
|
194
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-LNPYTNMG.js";
|
|
195
213
|
import {
|
|
196
214
|
mergeAvailabilityDeadline,
|
|
197
215
|
resolveAvailabilityAction,
|
|
198
|
-
resolveCooldownGate
|
|
199
|
-
|
|
216
|
+
resolveCooldownGate,
|
|
217
|
+
resolveCredentialKeyWithFallback
|
|
218
|
+
} from "./chunk-H6A6X4EK.js";
|
|
200
219
|
import {
|
|
201
220
|
isAntigravityOAuthAgent
|
|
202
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-ISHYYQJC.js";
|
|
203
222
|
import {
|
|
204
223
|
resolvePlatformAuthToken
|
|
205
|
-
} from "./chunk-
|
|
206
|
-
import {
|
|
207
|
-
buildDialogFallbackTitleFromUserInput,
|
|
208
|
-
normalizeDialogTitle
|
|
209
|
-
} from "./chunk-2MBTWINN.js";
|
|
224
|
+
} from "./chunk-OOSVFT6S.js";
|
|
210
225
|
import {
|
|
211
226
|
normalizeUsage
|
|
212
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-LS2MI3B4.js";
|
|
213
228
|
import {
|
|
214
229
|
clipCompactText,
|
|
215
230
|
createProviderCallTimingTracker,
|
|
216
231
|
finalizeProviderCallTiming,
|
|
217
232
|
observeMeaningfulProviderResponseAt,
|
|
218
233
|
withProviderCallTimingFields
|
|
219
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-F64B2W3R.js";
|
|
220
235
|
import {
|
|
221
236
|
estimateTokenCount
|
|
222
237
|
} from "./chunk-PSCNXBYA.js";
|
|
223
|
-
import {
|
|
224
|
-
isAdaptiveThinkingModelId
|
|
225
|
-
} from "./chunk-VRLI2WNW.js";
|
|
226
|
-
import {
|
|
227
|
-
compactWhitespace
|
|
228
|
-
} from "./chunk-DWLEOOGR.js";
|
|
229
238
|
import {
|
|
230
239
|
createFileCredentialBroker,
|
|
231
240
|
resolveCurrentRunRuntimeToolPolicy,
|
|
232
241
|
resolveLocalWorkspaceExecutorOptionsFromPolicy,
|
|
233
242
|
resolveRequestedRuntimeToolNames
|
|
234
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-ESRMFY7G.js";
|
|
244
|
+
import {
|
|
245
|
+
compactWhitespace
|
|
246
|
+
} from "./chunk-DWLEOOGR.js";
|
|
247
|
+
import {
|
|
248
|
+
toErrorMessage
|
|
249
|
+
} from "./chunk-HNMXYYJR.js";
|
|
250
|
+
import {
|
|
251
|
+
getModelConfig,
|
|
252
|
+
isAdaptiveThinkingModelId
|
|
253
|
+
} from "./chunk-ZI2MEZMT.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
262
|
} from "./chunk-O6OSWFZQ.js";
|
|
263
|
+
import {
|
|
264
|
+
getLogger
|
|
265
|
+
} from "./chunk-UNYJU5L6.js";
|
|
247
266
|
import {
|
|
248
267
|
isCompiledBinary,
|
|
249
268
|
parseUserIdFromAuthToken
|
|
@@ -251,21 +270,39 @@ import {
|
|
|
251
270
|
import {
|
|
252
271
|
DEFAULT_NOLO_SERVER_URL
|
|
253
272
|
} from "./chunk-OLZBQWZU.js";
|
|
273
|
+
import {
|
|
274
|
+
isNoloHostedProvider,
|
|
275
|
+
isPlatformHostedImageModel
|
|
276
|
+
} from "./chunk-Q67DOFOO.js";
|
|
254
277
|
import {
|
|
255
278
|
createTokenKey,
|
|
256
279
|
createTokenStatsKey,
|
|
257
280
|
createUserKey,
|
|
258
281
|
dialogMessageRange
|
|
259
|
-
} from "./chunk-
|
|
282
|
+
} from "./chunk-3AH7LNUB.js";
|
|
260
283
|
import {
|
|
261
284
|
asTrimmedLowercaseString
|
|
262
285
|
} from "./chunk-QSJ3HFEF.js";
|
|
263
|
-
import {
|
|
264
|
-
isSystemBuiltinTrustedAgentKey
|
|
265
|
-
} from "./chunk-TL6L5XUT.js";
|
|
266
286
|
import {
|
|
267
287
|
isRecord
|
|
268
288
|
} from "./chunk-KUG52IAP.js";
|
|
289
|
+
import {
|
|
290
|
+
PUBLIC_DEEPSEEK_V4_FLASH_AGENT_ID,
|
|
291
|
+
PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID,
|
|
292
|
+
PUBLIC_GLM_53_FLASH_AGENT_ID,
|
|
293
|
+
PUBLIC_GPT_IMAGE_2_CONTINUOUS_AGENT_ID,
|
|
294
|
+
PUBLIC_GPT_IMAGE_2_EDITOR_AGENT_ID,
|
|
295
|
+
PUBLIC_GPT_IMAGE_2_GENERATOR_AGENT_ID,
|
|
296
|
+
PUBLIC_NANO_BANANA_2_LITE_AGENT_ID,
|
|
297
|
+
builtinAgentCatalogEntryById,
|
|
298
|
+
isRetiredCatalogEntry,
|
|
299
|
+
isSystemBuiltinTrustedAgentKey
|
|
300
|
+
} from "./chunk-BNGW5ASC.js";
|
|
301
|
+
import {
|
|
302
|
+
parsePublicAgentId,
|
|
303
|
+
parseSystemAgentId,
|
|
304
|
+
publicAgentKey
|
|
305
|
+
} from "./chunk-M2EJHDJP.js";
|
|
269
306
|
import {
|
|
270
307
|
asTrimmedString
|
|
271
308
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -285,75 +322,6 @@ import {
|
|
|
285
322
|
__toESM
|
|
286
323
|
} from "./chunk-4VNS5WPM.js";
|
|
287
324
|
|
|
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
325
|
// packages/cli/tui/i18n.ts
|
|
358
326
|
var ZH_PATTERNS = /^zh/i;
|
|
359
327
|
function parseCliLocale(raw) {
|
|
@@ -532,24 +500,24 @@ var STRINGS = {
|
|
|
532
500
|
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
501
|
},
|
|
534
502
|
quotaExhaustedHint: {
|
|
535
|
-
en: "
|
|
536
|
-
zh: "
|
|
503
|
+
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.",
|
|
504
|
+
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
505
|
},
|
|
538
506
|
balanceExhaustedHint: {
|
|
539
|
-
en: '
|
|
540
|
-
zh: "
|
|
507
|
+
en: 'Your message is saved in this dialog \u2014 top up, then send again or say "continue" to pick up where you left off.',
|
|
508
|
+
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
509
|
},
|
|
542
510
|
balanceInsufficientReason: {
|
|
543
511
|
en: "Insufficient balance: requires > {required}, current balance {current}.",
|
|
544
512
|
zh: "\u4F59\u989D\u4E0D\u8DB3\uFF1A\u9700\u8981\u4F59\u989D > {required}\uFF0C\u5F53\u524D {current}\u3002"
|
|
545
513
|
},
|
|
546
514
|
dialogPreservedHint: {
|
|
547
|
-
en: '
|
|
548
|
-
zh: "
|
|
515
|
+
en: 'This turn failed, but the dialog is kept. Send another message (or say "continue") to keep going in the same conversation.',
|
|
516
|
+
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
517
|
},
|
|
550
518
|
dialogNotSavedHint: {
|
|
551
|
-
en: "
|
|
552
|
-
zh: "
|
|
519
|
+
en: "This turn did not create a dialog. Your next message will start a new conversation \u2014 restate what you need.",
|
|
520
|
+
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
521
|
},
|
|
554
522
|
copiedLastReply: {
|
|
555
523
|
en: "Copied the last reply to the clipboard.",
|
|
@@ -671,6 +639,15 @@ var STRINGS = {
|
|
|
671
639
|
// --- Tool trace copy ------------------------------------------------------
|
|
672
640
|
// The compact trace shows only status, never timing or output size: a line
|
|
673
641
|
// count told the user nothing actionable and the ms figure read as noise.
|
|
642
|
+
workingFallback: {
|
|
643
|
+
en: "Working\u2026",
|
|
644
|
+
zh: "\u5904\u7406\u4E2D\u2026"
|
|
645
|
+
},
|
|
646
|
+
// 回合结束的淡色收尾行:耗时 · 输出 token · 积分(后两段可缺省)。
|
|
647
|
+
turnSummaryOutput: {
|
|
648
|
+
en: "{0} out",
|
|
649
|
+
zh: "\u8F93\u51FA {0}"
|
|
650
|
+
},
|
|
674
651
|
thinkingActive: {
|
|
675
652
|
en: "Thinking\u2026",
|
|
676
653
|
zh: "\u601D\u8003\u4E2D\u2026"
|
|
@@ -679,6 +656,35 @@ var STRINGS = {
|
|
|
679
656
|
en: "Thinking: {0}",
|
|
680
657
|
zh: "\u601D\u8003\u4E2D\uFF1A{0}"
|
|
681
658
|
},
|
|
659
|
+
// --- Pre-delta turn phase labels (ctx-overflow-feedback batch 3) ----------
|
|
660
|
+
// Rendered on the spinner / activity line while the local runtime checks the
|
|
661
|
+
// context window, compacts history, or waits for the first model delta —
|
|
662
|
+
// the previously silent pre-delta window (batch 1/2a 修好 runtime 与 SSE,
|
|
663
|
+
// 这里补齐 CLI/TUI 的状态行投影)。compacting 行附带可取消提示:Esc /
|
|
664
|
+
// Ctrl+C 即 abort,语义与 localLoop 的 abortSignal 一致。
|
|
665
|
+
contextChecking: {
|
|
666
|
+
en: "Checking this model's context window\u2026",
|
|
667
|
+
zh: "\u6B63\u5728\u68C0\u67E5\u5F53\u524D\u6A21\u578B\u7684\u4E0A\u4E0B\u6587\u7A97\u53E3\u2026"
|
|
668
|
+
},
|
|
669
|
+
contextCompacting: {
|
|
670
|
+
en: "Compacting history\u2026 (Esc/Ctrl+C to cancel)",
|
|
671
|
+
zh: "\u6B63\u5728\u538B\u7F29\u5386\u53F2\u8BB0\u5F55\u2026\uFF08Esc/Ctrl+C \u53D6\u6D88\uFF09"
|
|
672
|
+
},
|
|
673
|
+
waitingForModel: {
|
|
674
|
+
en: "Waiting for the model\u2026",
|
|
675
|
+
zh: "\u6B63\u5728\u7B49\u5F85\u6A21\u578B\u54CD\u5E94\u2026"
|
|
676
|
+
},
|
|
677
|
+
// --- Local turn deadline failure (single actionable line) -----------------
|
|
678
|
+
// localLoop 主请求 idle deadline(DEFAULT_LLM_REQUEST_TIMEOUT_MS 兜底或调用方
|
|
679
|
+
// timeoutMs)到达后抛 code=LLM_REQUEST_TIMEOUT;generic 分支的「修本地
|
|
680
|
+
// 凭据」文案在这里是错误指引(请求已发出,问题在上游无响应)。
|
|
681
|
+
// 语义是 idle(静默窗):{0} 内没有任何新输出才放弃,不是说模型「完全没
|
|
682
|
+
// 响应」——文案必须与这个语义一致,否则会把正在生成的用户推向重复发送
|
|
683
|
+
// (2026-10 ctx-overflow-feedback review 修复 1)。
|
|
684
|
+
llmRequestTimedOut: {
|
|
685
|
+
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.",
|
|
686
|
+
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"
|
|
687
|
+
},
|
|
682
688
|
thinkingTraceLine: {
|
|
683
689
|
en: "\u273B Thought for {0}",
|
|
684
690
|
zh: "\u273B \u601D\u8003 {0}"
|
|
@@ -935,8 +941,8 @@ var STRINGS = {
|
|
|
935
941
|
zh: "\u5DF2\u4ECE\u526A\u8D34\u677F\u7C98\u8D34 {0} \u4E2A\u5B57\u7B26\u5230\u8349\u7A3F\u3002"
|
|
936
942
|
},
|
|
937
943
|
pasteStaleDropped: {
|
|
938
|
-
en: "
|
|
939
|
-
zh: "
|
|
944
|
+
en: "Discarded a clipboard read that finished after the draft changed.",
|
|
945
|
+
zh: "\u526A\u8D34\u677F\u8BFB\u53D6\u5B8C\u6210\u65F6\u8349\u7A3F\u5DF2\u53D8\u5316\uFF0C\u7ED3\u679C\u5DF2\u4E22\u5F03\u3002"
|
|
940
946
|
},
|
|
941
947
|
pasteFilePathHint: {
|
|
942
948
|
en: "file reference (path only, content not read): {0}",
|
|
@@ -984,6 +990,7 @@ var STRINGS = {
|
|
|
984
990
|
" /profile Show active profile",
|
|
985
991
|
" /update Update the nolo CLI install",
|
|
986
992
|
" /version Show version/update hint",
|
|
993
|
+
" /logs Show recent diagnostics and the log file path",
|
|
987
994
|
" /exit Leave the workspace",
|
|
988
995
|
"",
|
|
989
996
|
"You can also type normally. nolo routes simple read/status requests to CLI commands and sends the rest to the current agent."
|
|
@@ -1025,6 +1032,7 @@ var STRINGS = {
|
|
|
1025
1032
|
" /profile \u67E5\u770B\u5F53\u524D\u914D\u7F6E\u73AF\u5883",
|
|
1026
1033
|
" /update \u66F4\u65B0 nolo CLI",
|
|
1027
1034
|
" /version \u67E5\u770B\u7248\u672C\u4E0E\u66F4\u65B0\u63D0\u793A",
|
|
1035
|
+
" /logs \u67E5\u770B\u6700\u8FD1\u8BCA\u65AD\u8BB0\u5F55\u4E0E\u65E5\u5FD7\u6587\u4EF6\u4F4D\u7F6E",
|
|
1028
1036
|
" /exit \u9000\u51FA\u5DE5\u4F5C\u533A",
|
|
1029
1037
|
"",
|
|
1030
1038
|
"\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 +1045,27 @@ var STRINGS = {
|
|
|
1037
1045
|
en: "Unknown command: {0}\n\n",
|
|
1038
1046
|
zh: "\u672A\u77E5\u547D\u4EE4\uFF1A{0}\n\n"
|
|
1039
1047
|
},
|
|
1048
|
+
noConversationLinks: {
|
|
1049
|
+
en: "No links in this conversation yet.",
|
|
1050
|
+
zh: "\u672C\u4F1A\u8BDD\u8FD8\u6CA1\u6709\u51FA\u73B0\u94FE\u63A5\u3002"
|
|
1051
|
+
},
|
|
1052
|
+
conversationLinksCopyHint: {
|
|
1053
|
+
en: "Open one by copying its URL (Cmd/Ctrl + click, or select and copy).",
|
|
1054
|
+
zh: "\u590D\u5236\u5BF9\u5E94 URL \u5373\u53EF\u6253\u5F00\uFF08Cmd/Ctrl + \u70B9\u51FB\uFF0C\u6216\u9009\u4E2D\u590D\u5236\uFF09\u3002"
|
|
1055
|
+
},
|
|
1056
|
+
conversationLinksShowing: {
|
|
1057
|
+
en: "Links in this conversation (showing first {0} of {1}):",
|
|
1058
|
+
zh: "\u672C\u4F1A\u8BDD\u51FA\u73B0\u7684\u94FE\u63A5\uFF08\u663E\u793A\u524D {0} \u4E2A\uFF0C\u5171 {1} \u4E2A\uFF09\uFF1A"
|
|
1059
|
+
},
|
|
1040
1060
|
runtimeUsage: { en: "Usage: /runtime <auto|local|server>", zh: "\u7528\u6CD5\uFF1A/runtime <auto|local|server>" },
|
|
1041
1061
|
runtimeSet: { en: "Runtime: {0}", zh: "\u8FD0\u884C\u6A21\u5F0F\uFF1A{0}" },
|
|
1042
|
-
|
|
1043
|
-
en: "
|
|
1044
|
-
zh: "
|
|
1062
|
+
logsEmpty: {
|
|
1063
|
+
en: "No diagnostics recorded in this session.",
|
|
1064
|
+
zh: "\u672C\u6B21\u4F1A\u8BDD\u8FD8\u6CA1\u6709\u8BCA\u65AD\u8BB0\u5F55\u3002"
|
|
1065
|
+
},
|
|
1066
|
+
logsHeader: {
|
|
1067
|
+
en: "Recent diagnostics ({0} of {1}) \xB7 full log: {2}",
|
|
1068
|
+
zh: "\u6700\u8FD1\u8BCA\u65AD\uFF08{0}/{1} \u6761\uFF09\xB7 \u5B8C\u6574\u65E5\u5FD7\uFF1A{2}"
|
|
1045
1069
|
},
|
|
1046
1070
|
tasksRunning: { en: "Running processes ({0}):", zh: "\u8FD0\u884C\u4E2D\u7684\u8FDB\u7A0B\uFF08{0}\uFF09\uFF1A" },
|
|
1047
1071
|
tasksStopped: { en: "Stopped/exited ({0}):", zh: "\u5DF2\u505C\u6B62/\u5DF2\u9000\u51FA\uFF08{0}\uFF09\uFF1A" },
|
|
@@ -1203,12 +1227,12 @@ Use /switch, /switch list, /switch minimax-m3, or a full agent key.`,
|
|
|
1203
1227
|
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
1228
|
},
|
|
1205
1229
|
loginWaiting: {
|
|
1206
|
-
en: "
|
|
1207
|
-
zh: "
|
|
1230
|
+
en: "Waiting for browser authorization ({0} remaining)... (Ctrl+C to cancel)",
|
|
1231
|
+
zh: "\u7B49\u5F85\u6D4F\u89C8\u5668\u6388\u6743\uFF08\u5269\u4F59 {0}\uFF09\u2026\u2026\u6309 Ctrl+C \u53D6\u6D88"
|
|
1208
1232
|
},
|
|
1209
1233
|
loginStillWaiting: {
|
|
1210
|
-
en: "
|
|
1211
|
-
zh: "
|
|
1234
|
+
en: "Still waiting... ({0} remaining)",
|
|
1235
|
+
zh: "\u4ECD\u5728\u7B49\u5F85\u2026\u2026\uFF08\u5269\u4F59 {0}\uFF09"
|
|
1212
1236
|
},
|
|
1213
1237
|
loginSuccess: {
|
|
1214
1238
|
en: "Logged in. Token saved to profile; this session now uses it immediately.",
|
|
@@ -1343,6 +1367,11 @@ var TOOL_LABELS = {
|
|
|
1343
1367
|
function toolLabel(name) {
|
|
1344
1368
|
return TOOL_LABELS[name]?.[currentLocale] ?? name;
|
|
1345
1369
|
}
|
|
1370
|
+
function toolLabelVariants(name) {
|
|
1371
|
+
const entry = TOOL_LABELS[name];
|
|
1372
|
+
if (!entry) return [name];
|
|
1373
|
+
return [...new Set(Object.values(entry))];
|
|
1374
|
+
}
|
|
1346
1375
|
function agentRunCardLabels() {
|
|
1347
1376
|
return {
|
|
1348
1377
|
runStatus: t("runStatusLabel"),
|
|
@@ -1354,12 +1383,92 @@ function agentRunCardLabels() {
|
|
|
1354
1383
|
};
|
|
1355
1384
|
}
|
|
1356
1385
|
|
|
1386
|
+
// packages/agent-runtime/agentRunIsolation.ts
|
|
1387
|
+
var ORCHESTRATION_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1388
|
+
"startAgentRun",
|
|
1389
|
+
"controlAgentRun",
|
|
1390
|
+
"listAgents",
|
|
1391
|
+
"readAgent",
|
|
1392
|
+
"runStreamingAgent"
|
|
1393
|
+
]);
|
|
1394
|
+
var INTERACTION_REQUIRED_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1395
|
+
"ask_user"
|
|
1396
|
+
]);
|
|
1397
|
+
var SUBTASK_REMOVED_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1398
|
+
...ORCHESTRATION_TOOL_NAMES,
|
|
1399
|
+
...INTERACTION_REQUIRED_TOOL_NAMES
|
|
1400
|
+
]);
|
|
1401
|
+
function isSubtaskRun(env) {
|
|
1402
|
+
if (!env) return false;
|
|
1403
|
+
const value = env.NOLO_AGENT_RUN_CHILD;
|
|
1404
|
+
return typeof value === "string" && value.length > 0 && value !== "0";
|
|
1405
|
+
}
|
|
1406
|
+
var RUN_WAKE_CHANNEL_ENV = "NOLO_RUN_WAKE";
|
|
1407
|
+
function hasRunWakeChannel(env) {
|
|
1408
|
+
if (!env) return false;
|
|
1409
|
+
const value = env[RUN_WAKE_CHANNEL_ENV];
|
|
1410
|
+
return typeof value === "string" && value.length > 0 && value !== "0";
|
|
1411
|
+
}
|
|
1412
|
+
function filterToolNamesForRunKind(toolNames, isSubtask) {
|
|
1413
|
+
if (!isSubtask) return [...toolNames];
|
|
1414
|
+
return toolNames.filter((name) => !SUBTASK_REMOVED_TOOL_NAMES.has(name));
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
// packages/cli/client/localRuntimeDiagnostics.ts
|
|
1418
|
+
import { ulid } from "ulid";
|
|
1419
|
+
var preparedAgentRuntimeCache = /* @__PURE__ */ new Map();
|
|
1420
|
+
var hybridStoreCache = /* @__PURE__ */ new Map();
|
|
1421
|
+
function normalizeRuntimeCacheCwd(cwd) {
|
|
1422
|
+
return (cwd?.trim() || process.cwd()).replace(/\/+$/, "") || ".";
|
|
1423
|
+
}
|
|
1424
|
+
function buildPreparedAgentCacheKey(args) {
|
|
1425
|
+
const systemBuiltinSkillsKey = args.systemBuiltinSkills ? JSON.stringify(
|
|
1426
|
+
Object.keys(args.systemBuiltinSkills).sort().map((key) => [key, args.systemBuiltinSkills?.[key]])
|
|
1427
|
+
) : "default";
|
|
1428
|
+
return `${args.userId}\0${args.agentRef}\0${args.cwd}\0${systemBuiltinSkillsKey}`;
|
|
1429
|
+
}
|
|
1430
|
+
function clearCliLocalRuntimePreparedAgentCache() {
|
|
1431
|
+
preparedAgentRuntimeCache.clear();
|
|
1432
|
+
hybridStoreCache.clear();
|
|
1433
|
+
}
|
|
1434
|
+
async function defaultLocalRuntimeDb() {
|
|
1435
|
+
return getDefaultCliLocalRuntimeDb();
|
|
1436
|
+
}
|
|
1437
|
+
function createFallbackId() {
|
|
1438
|
+
return ulid();
|
|
1439
|
+
}
|
|
1440
|
+
function logLocalRuntimeDiagnostic(event, fields) {
|
|
1441
|
+
if (process.env.NOLO_LOCAL_RUNTIME_DEBUG !== "1" && process.env.NOLO_DEBUG !== "1") {
|
|
1442
|
+
return;
|
|
1443
|
+
}
|
|
1444
|
+
console.error(`[nolo-local-runtime] ${event} ${JSON.stringify(fields)}`);
|
|
1445
|
+
}
|
|
1446
|
+
function summarizeOpenAiToolNames(tools) {
|
|
1447
|
+
return tools.reduce((acc, tool) => {
|
|
1448
|
+
const fn = tool.function;
|
|
1449
|
+
const name = fn && typeof fn === "object" && "name" in fn && typeof fn.name === "string" ? fn.name : null;
|
|
1450
|
+
if (name) acc.push(name);
|
|
1451
|
+
return acc;
|
|
1452
|
+
}, []);
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1357
1455
|
// packages/agent-runtime/anthropicMessagesProvider.ts
|
|
1358
1456
|
import { randomUUID } from "node:crypto";
|
|
1359
1457
|
var ANTHROPIC_MESSAGES_URL = "https://api.anthropic.com/v1/messages";
|
|
1360
1458
|
var ANTHROPIC_API_VERSION = "2023-06-01";
|
|
1361
1459
|
var ANTHROPIC_OAUTH_BETA = "oauth-2025-04-20";
|
|
1362
|
-
|
|
1460
|
+
function resolveClaudeCodeVersion(rawEnv) {
|
|
1461
|
+
const DEFAULT_VERSION = "2.1.290";
|
|
1462
|
+
if (!rawEnv) return DEFAULT_VERSION;
|
|
1463
|
+
const trimmed = rawEnv.trim();
|
|
1464
|
+
if (/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(trimmed)) {
|
|
1465
|
+
return trimmed;
|
|
1466
|
+
}
|
|
1467
|
+
return DEFAULT_VERSION;
|
|
1468
|
+
}
|
|
1469
|
+
var CLAUDE_CODE_VERSION = resolveClaudeCodeVersion(
|
|
1470
|
+
process.env.NOLO_CLAUDE_CODE_VERSION || process.env.CLAUDE_CODE_VERSION
|
|
1471
|
+
);
|
|
1363
1472
|
var CLAUDE_CODE_USER_AGENT = `claude-cli/${CLAUDE_CODE_VERSION} (external, local-agent, agent-sdk/0.1.0)`;
|
|
1364
1473
|
var ANTHROPIC_OAUTH_BETA_HEADER = `claude-code-20250219,${ANTHROPIC_OAUTH_BETA}`;
|
|
1365
1474
|
var CLAUDE_CODE_SYSTEM_INSTRUCTION = "You are a Claude agent, built on Anthropic's Claude Agent SDK.";
|
|
@@ -1462,11 +1571,23 @@ function pushMessage(messages, role, content) {
|
|
|
1462
1571
|
if (content.length === 0) return;
|
|
1463
1572
|
const previous = messages.at(-1);
|
|
1464
1573
|
if (previous?.role === role && Array.isArray(previous.content)) {
|
|
1465
|
-
previous.content
|
|
1574
|
+
const previousBlocks = previous.content;
|
|
1575
|
+
if (role === "user" && foldIntoTrailingToolResult(previousBlocks, content)) return;
|
|
1576
|
+
previousBlocks.push(...content);
|
|
1466
1577
|
return;
|
|
1467
1578
|
}
|
|
1468
1579
|
messages.push({ role, content });
|
|
1469
1580
|
}
|
|
1581
|
+
function foldIntoTrailingToolResult(blocks, extra) {
|
|
1582
|
+
const last = blocks.at(-1);
|
|
1583
|
+
if (!last || last.type !== "tool_result") return false;
|
|
1584
|
+
if (!extra.every((block) => block.type === "text" || block.type === "image")) {
|
|
1585
|
+
return false;
|
|
1586
|
+
}
|
|
1587
|
+
const existing = typeof last.content === "string" ? last.content.length > 0 ? [{ type: "text", text: last.content }] : [] : Array.isArray(last.content) ? last.content : [];
|
|
1588
|
+
last.content = [...existing, ...extra];
|
|
1589
|
+
return true;
|
|
1590
|
+
}
|
|
1470
1591
|
function hasClaudeCodeIdentity(system) {
|
|
1471
1592
|
return system.some((block) => {
|
|
1472
1593
|
if (!block || typeof block !== "object") return false;
|
|
@@ -1476,6 +1597,11 @@ function hasClaudeCodeIdentity(system) {
|
|
|
1476
1597
|
);
|
|
1477
1598
|
});
|
|
1478
1599
|
}
|
|
1600
|
+
function normalizeAnthropicWireModel(model) {
|
|
1601
|
+
if (model === "claude-opus-5.5") return "claude-opus-5-5";
|
|
1602
|
+
if (model === "claude-sonnet-5.5") return "claude-sonnet-5-5";
|
|
1603
|
+
return model;
|
|
1604
|
+
}
|
|
1479
1605
|
function buildAnthropicMessagesBody(args) {
|
|
1480
1606
|
const rawMessages = Array.isArray(args.openAiBody.messages) ? args.openAiBody.messages : [];
|
|
1481
1607
|
const system = [];
|
|
@@ -1582,7 +1708,7 @@ function buildAnthropicMessagesBody(args) {
|
|
|
1582
1708
|
}
|
|
1583
1709
|
}
|
|
1584
1710
|
return {
|
|
1585
|
-
model,
|
|
1711
|
+
model: normalizeAnthropicWireModel(model),
|
|
1586
1712
|
messages,
|
|
1587
1713
|
max_tokens: finalMaxTokens,
|
|
1588
1714
|
stream: false,
|
|
@@ -1594,6 +1720,12 @@ function buildAnthropicMessagesBody(args) {
|
|
|
1594
1720
|
...typeof args.openAiBody.top_p === "number" ? { top_p: args.openAiBody.top_p } : {}
|
|
1595
1721
|
};
|
|
1596
1722
|
}
|
|
1723
|
+
function mapAnthropicStopReason(stopReason, hasToolCalls) {
|
|
1724
|
+
if (hasToolCalls || stopReason === "tool_use") return "tool_calls";
|
|
1725
|
+
if (stopReason === "max_tokens" || stopReason === "model_context_window_exceeded") return "length";
|
|
1726
|
+
if (stopReason === "refusal") return "content_filter";
|
|
1727
|
+
return "stop";
|
|
1728
|
+
}
|
|
1597
1729
|
function mapAnthropicMessageToOpenAi(payload) {
|
|
1598
1730
|
const content = Array.isArray(payload.content) ? payload.content : [];
|
|
1599
1731
|
let text = "";
|
|
@@ -1617,10 +1749,13 @@ function mapAnthropicMessageToOpenAi(payload) {
|
|
|
1617
1749
|
const cacheCreationInputTokens = typeof usage.cache_creation_input_tokens === "number" ? usage.cache_creation_input_tokens : 0;
|
|
1618
1750
|
const cacheReadInputTokens = typeof usage.cache_read_input_tokens === "number" ? usage.cache_read_input_tokens : 0;
|
|
1619
1751
|
const outputTokens = typeof usage.output_tokens === "number" ? usage.output_tokens : 0;
|
|
1620
|
-
const stopReason =
|
|
1752
|
+
const stopReason = stringValue(payload.stop_reason) ?? "";
|
|
1621
1753
|
const message = { role: "assistant", content: text || null };
|
|
1622
1754
|
if (reasoning) message.reasoning_content = reasoning;
|
|
1623
1755
|
if (toolCalls.length > 0) message.tool_calls = toolCalls;
|
|
1756
|
+
const contentBlockTypes = content.flatMap(
|
|
1757
|
+
(raw) => raw && typeof raw === "object" && typeof raw.type === "string" ? [String(raw.type)] : []
|
|
1758
|
+
);
|
|
1624
1759
|
return {
|
|
1625
1760
|
id: stringValue(payload.id) ?? `chatcmpl_${randomUUID()}`,
|
|
1626
1761
|
object: "chat.completion",
|
|
@@ -1628,7 +1763,11 @@ function mapAnthropicMessageToOpenAi(payload) {
|
|
|
1628
1763
|
choices: [{
|
|
1629
1764
|
index: 0,
|
|
1630
1765
|
message,
|
|
1631
|
-
finish_reason: toolCalls.length > 0
|
|
1766
|
+
finish_reason: mapAnthropicStopReason(stopReason, toolCalls.length > 0),
|
|
1767
|
+
// 原始 Anthropic 终止原因与内容块类型,仅供诊断空回复/异常终止;
|
|
1768
|
+
// 不进入模型可见内容。
|
|
1769
|
+
anthropic_stop_reason: stopReason || null,
|
|
1770
|
+
anthropic_content_block_types: contentBlockTypes
|
|
1632
1771
|
}],
|
|
1633
1772
|
usage: {
|
|
1634
1773
|
// prompt_tokens/input_tokens are total input, including cache read/write.
|
|
@@ -2011,13 +2150,19 @@ var resolveAnthropicOAuthTransport = async (ctx) => {
|
|
|
2011
2150
|
const content = typeof message.content === "string" ? message.content : "";
|
|
2012
2151
|
const tool_calls = Array.isArray(message.tool_calls) ? message.tool_calls : void 0;
|
|
2013
2152
|
if (content && options?.onTextDelta) options.onTextDelta(content);
|
|
2153
|
+
const rawChoice = choice ?? {};
|
|
2154
|
+
const usage = result.body?.usage;
|
|
2014
2155
|
logLocalRuntimeDiagnostic("provider.request.result", {
|
|
2015
2156
|
agentKey: agentConfig.key,
|
|
2016
2157
|
transport: "anthropic-messages",
|
|
2017
2158
|
ok: true,
|
|
2018
2159
|
contentChars: content.length,
|
|
2019
2160
|
toolCallCount: tool_calls?.length ?? 0,
|
|
2020
|
-
requestedToolNames
|
|
2161
|
+
requestedToolNames,
|
|
2162
|
+
stopReason: rawChoice.anthropic_stop_reason ?? null,
|
|
2163
|
+
contentBlockTypes: rawChoice.anthropic_content_block_types ?? [],
|
|
2164
|
+
outputTokens: typeof usage?.output_tokens === "number" ? usage.output_tokens : null,
|
|
2165
|
+
...result.body?.id ? { messageId: result.body.id } : {}
|
|
2021
2166
|
});
|
|
2022
2167
|
return {
|
|
2023
2168
|
content,
|
|
@@ -2428,14 +2573,19 @@ var resolveAntigravityTransport = async (ctx) => {
|
|
|
2428
2573
|
requestedToolNames,
|
|
2429
2574
|
openAiToolNames: summarizeOpenAiToolNames(tools)
|
|
2430
2575
|
});
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2576
|
+
let lastUsedCredential = initialCredential;
|
|
2577
|
+
const resolveLocalCredential = async ({ forceRefresh }) => {
|
|
2578
|
+
const resolved = await resolveLocalAntigravityCredential({
|
|
2579
|
+
credentialOwnerUserId,
|
|
2580
|
+
apiKeyRefResolver,
|
|
2581
|
+
apiKeyRef: agentConfig.apiKeyRef,
|
|
2582
|
+
readCredential: () => readOAuthCredential("antigravity", void 0, legacyCredentialMigration),
|
|
2583
|
+
migration: legacyCredentialMigration,
|
|
2584
|
+
forceRefresh
|
|
2585
|
+
});
|
|
2586
|
+
lastUsedCredential = resolved;
|
|
2587
|
+
return resolved;
|
|
2588
|
+
};
|
|
2439
2589
|
let result;
|
|
2440
2590
|
try {
|
|
2441
2591
|
result = await invokeAntigravity({
|
|
@@ -2489,10 +2639,27 @@ var resolveAntigravityTransport = async (ctx) => {
|
|
|
2489
2639
|
};
|
|
2490
2640
|
}
|
|
2491
2641
|
if (result.status < 200 || result.status >= 300) {
|
|
2492
|
-
const
|
|
2493
|
-
|
|
2642
|
+
const upstreamError = result.body && typeof result.body === "object" && result.body.error && typeof result.body.error === "object" ? result.body.error : void 0;
|
|
2643
|
+
const errMsg = (
|
|
2644
|
+
// Google Cloud Code Assist gates calls behind a one-time account
|
|
2645
|
+
// verification and answers HTTP 403 with the validation link in
|
|
2646
|
+
// `error.details[].metadata.validation_url` — NOT in
|
|
2647
|
+
// `error.message`. Extracting only `error.message` here drops the
|
|
2648
|
+
// link before agentRun's extractGoogleValidationLink can recover
|
|
2649
|
+
// it, so when details are present we append them after the clean
|
|
2650
|
+
// message; the extractor scans raw text for validation_url so a
|
|
2651
|
+
// `details=[...]` suffix is enough, and the Detail line keeps its
|
|
2652
|
+
// readable `HTTP 403 <message>` headline. Plain-message errors
|
|
2653
|
+
// keep the old shape so existing output stays unchanged.
|
|
2654
|
+
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)
|
|
2655
|
+
);
|
|
2656
|
+
const failure = new Error(
|
|
2494
2657
|
`local antigravity provider failed: HTTP ${result.status} ${errMsg}`
|
|
2495
2658
|
);
|
|
2659
|
+
if (lastUsedCredential?.accountId) {
|
|
2660
|
+
failure.credentialAccountId = lastUsedCredential.accountId;
|
|
2661
|
+
}
|
|
2662
|
+
throw failure;
|
|
2496
2663
|
}
|
|
2497
2664
|
const choice = Array.isArray(result.body?.choices) ? result.body.choices[0] : void 0;
|
|
2498
2665
|
const message = choice?.message ?? {};
|
|
@@ -2811,7 +2978,7 @@ var resolveCliProviderTransport = async (ctx) => {
|
|
|
2811
2978
|
// packages/agent-runtime/codexResponsesProvider.ts
|
|
2812
2979
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
2813
2980
|
var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
|
|
2814
|
-
var CODEX_CLIENT_VERSION = "0.
|
|
2981
|
+
var CODEX_CLIENT_VERSION = "0.159.2";
|
|
2815
2982
|
var CODEX_ORIGINATOR = "codex_cli_rs";
|
|
2816
2983
|
var CODEX_OPENAI_BETA = "responses=experimental";
|
|
2817
2984
|
var OPENAI_AUTH_CLAIM = "https://api.openai.com/auth";
|
|
@@ -7659,7 +7826,7 @@ var WriteRejectedSchema = /* @__PURE__ */ messageDesc(file_agent, 455);
|
|
|
7659
7826
|
|
|
7660
7827
|
// packages/agent-runtime/cursor/cursorProvider.ts
|
|
7661
7828
|
var CURSOR_API_URL = "https://api2.cursor.sh";
|
|
7662
|
-
var CURSOR_CLIENT_VERSION = "cli-2026.
|
|
7829
|
+
var CURSOR_CLIENT_VERSION = "cli-2026.09.18-9a7762b";
|
|
7663
7830
|
var CURSOR_REQUEST_PATH = "/agent.v1.AgentService/Run";
|
|
7664
7831
|
var CONNECT_END_STREAM_FLAG = 2;
|
|
7665
7832
|
var HEARTBEAT_INTERVAL_MS = 5e3;
|
|
@@ -8057,6 +8224,37 @@ function processCursorServerMessage(msg, state, onTextDelta, onReasoningDelta) {
|
|
|
8057
8224
|
state.outputTokens += tokens;
|
|
8058
8225
|
}
|
|
8059
8226
|
}
|
|
8227
|
+
function attachCursorUpstreamFailure(error, failure) {
|
|
8228
|
+
if (failure) {
|
|
8229
|
+
error.cursorUpstreamFailure = failure;
|
|
8230
|
+
}
|
|
8231
|
+
return error;
|
|
8232
|
+
}
|
|
8233
|
+
function readCursorUpstreamFailure(error) {
|
|
8234
|
+
if (!error || typeof error !== "object") return void 0;
|
|
8235
|
+
const failure = error.cursorUpstreamFailure;
|
|
8236
|
+
if (!failure || typeof failure !== "object") return void 0;
|
|
8237
|
+
if (typeof failure.status !== "number" || !Number.isFinite(failure.status)) {
|
|
8238
|
+
return void 0;
|
|
8239
|
+
}
|
|
8240
|
+
return failure;
|
|
8241
|
+
}
|
|
8242
|
+
function buildCursorGrpcTrailerError(trailers) {
|
|
8243
|
+
const status = trailers["grpc-status"];
|
|
8244
|
+
if (!status || String(status) === "0") return null;
|
|
8245
|
+
const rawMessage = String(trailers["grpc-message"] || "");
|
|
8246
|
+
let message;
|
|
8247
|
+
try {
|
|
8248
|
+
message = decodeURIComponent(rawMessage);
|
|
8249
|
+
} catch {
|
|
8250
|
+
message = rawMessage;
|
|
8251
|
+
}
|
|
8252
|
+
const statusText = String(status);
|
|
8253
|
+
return attachCursorUpstreamFailure(
|
|
8254
|
+
new Error(`Cursor gRPC error ${statusText}: ${message}`),
|
|
8255
|
+
statusText === "8" || statusText.toLowerCase() === "resource_exhausted" ? { status: 429, body: { code: "resource_exhausted", message } } : void 0
|
|
8256
|
+
);
|
|
8257
|
+
}
|
|
8060
8258
|
async function streamCursorChat(messages, options) {
|
|
8061
8259
|
const baseUrl = options.baseUrl || CURSOR_API_URL;
|
|
8062
8260
|
const clientVersion = options.clientVersion || CURSOR_CLIENT_VERSION;
|
|
@@ -8154,14 +8352,9 @@ async function streamCursorChat(messages, options) {
|
|
|
8154
8352
|
}
|
|
8155
8353
|
});
|
|
8156
8354
|
h2Request.on("trailers", (trailers) => {
|
|
8157
|
-
const
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
h2Completion.reject(
|
|
8161
|
-
new Error(
|
|
8162
|
-
`Cursor gRPC error ${status}: ${decodeURIComponent(String(msg || ""))}`
|
|
8163
|
-
)
|
|
8164
|
-
);
|
|
8355
|
+
const error = buildCursorGrpcTrailerError(trailers);
|
|
8356
|
+
if (error) {
|
|
8357
|
+
h2Completion.reject(error);
|
|
8165
8358
|
}
|
|
8166
8359
|
});
|
|
8167
8360
|
h2Request.on("end", () => {
|
|
@@ -9182,6 +9375,7 @@ function createCursorProvider(config) {
|
|
|
9182
9375
|
...config.executeTool ? { executeTool: config.executeTool } : {},
|
|
9183
9376
|
...config.searchWorkspace ? { searchWorkspace: config.searchWorkspace } : {},
|
|
9184
9377
|
...config.listWorkspaceEntries ? { listWorkspaceEntries: config.listWorkspaceEntries } : {},
|
|
9378
|
+
...options?.signal ? { signal: options.signal } : {},
|
|
9185
9379
|
...options?.onTextDelta ? { onTextDelta: options.onTextDelta } : {},
|
|
9186
9380
|
...options?.onReasoningDelta ? { onReasoningDelta: options.onReasoningDelta } : {},
|
|
9187
9381
|
...options?.onToolEvent ? { onToolEvent: options.onToolEvent } : {},
|
|
@@ -9232,7 +9426,7 @@ function assertWithinLocalToolBudget(args) {
|
|
|
9232
9426
|
|
|
9233
9427
|
// packages/cli/client/providerResolution/cursorTransport.ts
|
|
9234
9428
|
var resolveCursorTransport = async (ctx) => {
|
|
9235
|
-
const { agentConfig, deps, workspaceRoot, additionalToolNames, buildProviderOpenAiTools, apiKeyRefResolver, activeAgentToolNames, localToolExecutors } = ctx;
|
|
9429
|
+
const { agentConfig, deps, workspaceRoot, additionalToolNames, buildProviderOpenAiTools, apiKeyRefResolver, activeAgentToolNames, localToolExecutors, recordLocalAvailability } = ctx;
|
|
9236
9430
|
if (isCursorOAuthAgent(agentConfig)) {
|
|
9237
9431
|
const accessToken = await apiKeyRefResolver("cursor");
|
|
9238
9432
|
if (!accessToken) {
|
|
@@ -9259,6 +9453,8 @@ var resolveCursorTransport = async (ctx) => {
|
|
|
9259
9453
|
agentToolNames: activeAgentToolNames,
|
|
9260
9454
|
call,
|
|
9261
9455
|
executors: localToolExecutors,
|
|
9456
|
+
// 分发前参数闸门:与 host adapter 的 executeTool 同口径。
|
|
9457
|
+
toolParametersIndex: getAgentRuntimeToolParametersIndex(),
|
|
9262
9458
|
detachMs: resolveExecShellDetachMs(deps.env),
|
|
9263
9459
|
...deps.confirmDestructiveAction ? { confirmDestructiveAction: deps.confirmDestructiveAction } : {}
|
|
9264
9460
|
});
|
|
@@ -9308,15 +9504,24 @@ var resolveCursorTransport = async (ctx) => {
|
|
|
9308
9504
|
toolCount: tools.length,
|
|
9309
9505
|
requestedToolNames
|
|
9310
9506
|
});
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9507
|
+
try {
|
|
9508
|
+
const result = await cursorProvider.complete(messages, options);
|
|
9509
|
+
await recordLocalAvailability(200);
|
|
9510
|
+
logLocalRuntimeDiagnostic("provider.request.result", {
|
|
9511
|
+
agentKey: agentConfig.key,
|
|
9512
|
+
transport: "cursor-connect",
|
|
9513
|
+
ok: true,
|
|
9514
|
+
contentChars: (result.content ?? "").length,
|
|
9515
|
+
toolCallCount: result.tool_calls?.length ?? 0
|
|
9516
|
+
});
|
|
9517
|
+
return result;
|
|
9518
|
+
} catch (error) {
|
|
9519
|
+
const failure = readCursorUpstreamFailure(error);
|
|
9520
|
+
if (failure) {
|
|
9521
|
+
await recordLocalAvailability(failure.status, failure.body);
|
|
9522
|
+
}
|
|
9523
|
+
throw error;
|
|
9524
|
+
}
|
|
9320
9525
|
}
|
|
9321
9526
|
};
|
|
9322
9527
|
}
|
|
@@ -9330,7 +9535,8 @@ var resolveDevinTransport = async (ctx) => {
|
|
|
9330
9535
|
apiKeyRefResolver,
|
|
9331
9536
|
deps,
|
|
9332
9537
|
buildProviderOpenAiTools,
|
|
9333
|
-
additionalToolNames
|
|
9538
|
+
additionalToolNames,
|
|
9539
|
+
recordLocalAvailability
|
|
9334
9540
|
} = ctx;
|
|
9335
9541
|
if (isDevinOAuthAgent(agentConfig)) {
|
|
9336
9542
|
const accessToken = await apiKeyRefResolver("devin");
|
|
@@ -9369,7 +9575,17 @@ var resolveDevinTransport = async (ctx) => {
|
|
|
9369
9575
|
return {
|
|
9370
9576
|
model,
|
|
9371
9577
|
complete: async (messages, options) => {
|
|
9372
|
-
|
|
9578
|
+
try {
|
|
9579
|
+
const result = await devinProvider.complete(messages, options);
|
|
9580
|
+
await recordLocalAvailability(200);
|
|
9581
|
+
return result;
|
|
9582
|
+
} catch (error) {
|
|
9583
|
+
const failure = readDevinUpstreamFailure(error);
|
|
9584
|
+
if (failure) {
|
|
9585
|
+
await recordLocalAvailability(failure.status, failure.body);
|
|
9586
|
+
}
|
|
9587
|
+
throw error;
|
|
9588
|
+
}
|
|
9373
9589
|
}
|
|
9374
9590
|
};
|
|
9375
9591
|
}
|
|
@@ -9476,7 +9692,7 @@ var resolveDirectOpenAiCompatibleTransport = async (ctx) => {
|
|
|
9476
9692
|
|
|
9477
9693
|
// packages/cli/client/providerResolution/geminiNativeToolTransport.ts
|
|
9478
9694
|
var resolveGeminiNativeToolTransport = async (ctx) => {
|
|
9479
|
-
const { agentConfig, deps, fetchImpl, additionalToolNames, buildProviderOpenAiTools, apiKeyRefResolver, credentialBroker, syncFetcher } = ctx;
|
|
9695
|
+
const { agentConfig, deps, fetchImpl, additionalToolNames, buildProviderOpenAiTools, apiKeyRefResolver, credentialBroker, syncFetcher, recordLocalAvailability } = ctx;
|
|
9480
9696
|
if (shouldUsePlatformChatProvider(deps.env, agentConfig) && isGemini3Model(agentConfig.model ?? "") && agentConfig.provider === "google") {
|
|
9481
9697
|
const providerConfig = await resolvePlatformChatProviderConfig({
|
|
9482
9698
|
agentConfig,
|
|
@@ -9543,6 +9759,7 @@ var resolveGeminiNativeToolTransport = async (ctx) => {
|
|
|
9543
9759
|
status: res.status,
|
|
9544
9760
|
error: errText.slice(0, 200)
|
|
9545
9761
|
});
|
|
9762
|
+
await recordLocalAvailability(res.status, errText);
|
|
9546
9763
|
throw new Error(
|
|
9547
9764
|
`gemini native tool provider failed: HTTP ${res.status} ${errText.slice(0, 500)}`
|
|
9548
9765
|
);
|
|
@@ -9568,6 +9785,7 @@ var resolveGeminiNativeToolTransport = async (ctx) => {
|
|
|
9568
9785
|
contentChars: text.length,
|
|
9569
9786
|
toolCallCount: toolCalls.length
|
|
9570
9787
|
});
|
|
9788
|
+
await recordLocalAvailability(200);
|
|
9571
9789
|
return result;
|
|
9572
9790
|
}
|
|
9573
9791
|
};
|
|
@@ -10119,6 +10337,446 @@ async function syncLocalDialogEvidenceToRemote(args) {
|
|
|
10119
10337
|
return { attempted: true };
|
|
10120
10338
|
}
|
|
10121
10339
|
|
|
10340
|
+
// packages/core/publicAgentSeeds.ts
|
|
10341
|
+
var AGENT_SEED_DEFAULTS = {
|
|
10342
|
+
isPublic: true,
|
|
10343
|
+
allowFork: true,
|
|
10344
|
+
hasVision: false,
|
|
10345
|
+
tools: []
|
|
10346
|
+
};
|
|
10347
|
+
function deterministicId(prefix, seed) {
|
|
10348
|
+
let h = 2166136261;
|
|
10349
|
+
for (let i = 0; i < seed.length; i++) {
|
|
10350
|
+
h ^= seed.charCodeAt(i);
|
|
10351
|
+
h = h * 16777619 >>> 0;
|
|
10352
|
+
}
|
|
10353
|
+
const suffix = h.toString(36).toUpperCase().padStart(14, "0");
|
|
10354
|
+
return (prefix + suffix).slice(0, 26);
|
|
10355
|
+
}
|
|
10356
|
+
function defineAgentSeed(input) {
|
|
10357
|
+
const providerForLookup = isPlatformHostedImageModel(input.model) ? "nolo" : input.provider || "nolo";
|
|
10358
|
+
const tools = input.tools ? [...input.tools] : [...AGENT_SEED_DEFAULTS.tools];
|
|
10359
|
+
const isPublic = input.isPublic ?? AGENT_SEED_DEFAULTS.isPublic;
|
|
10360
|
+
const allowFork = input.allowFork ?? AGENT_SEED_DEFAULTS.allowFork;
|
|
10361
|
+
const tags = input.tags ? [...input.tags] : [];
|
|
10362
|
+
const isPlatformHosted = isNoloHostedProvider(input.provider);
|
|
10363
|
+
const isPlatformPriced = !isPlatformHostedImageModel(input.model) && (isPlatformHosted || input.apiSource === "platform" || input.isPublic === true && !input.apiSource);
|
|
10364
|
+
let inputPrice = isPlatformPriced ? void 0 : input.inputPrice;
|
|
10365
|
+
let outputPrice = isPlatformPriced ? void 0 : input.outputPrice;
|
|
10366
|
+
let hasVision = input.hasVision;
|
|
10367
|
+
const pricesProvided = input.inputPrice !== void 0 || input.outputPrice !== void 0;
|
|
10368
|
+
if (!isPlatformPriced && (inputPrice === void 0 || outputPrice === void 0)) {
|
|
10369
|
+
const pricing = getModelPricing(providerForLookup, input.model);
|
|
10370
|
+
if (!pricing) {
|
|
10371
|
+
throw new Error(`\u672A\u627E\u5230\u6A21\u578B\u4EF7\u683C\u5143\u6570\u636E: ${providerForLookup}/${input.model}`);
|
|
10372
|
+
}
|
|
10373
|
+
if (inputPrice === void 0) inputPrice = pricing.inputPrice;
|
|
10374
|
+
if (outputPrice === void 0) outputPrice = pricing.outputPrice;
|
|
10375
|
+
}
|
|
10376
|
+
if (hasVision === void 0) {
|
|
10377
|
+
if (pricesProvided) {
|
|
10378
|
+
hasVision = AGENT_SEED_DEFAULTS.hasVision;
|
|
10379
|
+
} else {
|
|
10380
|
+
const modelConfig = getModelConfig(providerForLookup, input.model);
|
|
10381
|
+
hasVision = !!modelConfig.hasVision;
|
|
10382
|
+
}
|
|
10383
|
+
}
|
|
10384
|
+
const userVisibleTexts = [
|
|
10385
|
+
["name", input.name],
|
|
10386
|
+
["introduction", input.introduction],
|
|
10387
|
+
[
|
|
10388
|
+
"greeting",
|
|
10389
|
+
typeof input.greeting === "string" ? input.greeting : input.greeting?.text
|
|
10390
|
+
],
|
|
10391
|
+
["prompt", input.prompt],
|
|
10392
|
+
...(input.tags ?? []).map((tag) => ["tags", tag])
|
|
10393
|
+
];
|
|
10394
|
+
for (const [fieldName, text] of userVisibleTexts) {
|
|
10395
|
+
if (!text) continue;
|
|
10396
|
+
const hit = text.match(/平台托管|runinfra|openrouter|ollama/i);
|
|
10397
|
+
if (hit) {
|
|
10398
|
+
throw new Error(
|
|
10399
|
+
`\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`
|
|
10400
|
+
);
|
|
10401
|
+
}
|
|
10402
|
+
}
|
|
10403
|
+
const { inputPrice: _strippedInputPrice, outputPrice: _strippedOutputPrice, ...inputRest } = input;
|
|
10404
|
+
const record = {
|
|
10405
|
+
...inputRest,
|
|
10406
|
+
tools,
|
|
10407
|
+
isPublic,
|
|
10408
|
+
allowFork,
|
|
10409
|
+
tags,
|
|
10410
|
+
hasVision
|
|
10411
|
+
};
|
|
10412
|
+
if (!isPlatformPriced) {
|
|
10413
|
+
record.inputPrice = inputPrice;
|
|
10414
|
+
record.outputPrice = outputPrice;
|
|
10415
|
+
}
|
|
10416
|
+
return record;
|
|
10417
|
+
}
|
|
10418
|
+
var GPT_6_LUNA_DEF = defineAgentSeed({
|
|
10419
|
+
// salt 冻结为历史值 "shared-space-openai-gpt-5-6-luna":deterministicId 由
|
|
10420
|
+
// prefix+salt 哈希得出,改 salt 会换 ID——2026-09-23 Luna 原地换代
|
|
10421
|
+
// (GPT-5.6 Luna → GPT-6 Luna)必须保留稳定 ID,用户收藏/别名/Space
|
|
10422
|
+
// 内容键才不失效。
|
|
10423
|
+
id: deterministicId("01GPT56LUNPB", "shared-space-openai-gpt-5-6-luna"),
|
|
10424
|
+
presetKey: "gpt-6-luna",
|
|
10425
|
+
name: "GPT-6 Luna",
|
|
10426
|
+
// provider 用平台托管命名空间 "nolo"(平台 agent 统一收敛方向):平台价只注册在
|
|
10427
|
+
// nolo 下,agent-run 的托管路由门也只认 nolo。写上游名 "openai" 会让计费落零价
|
|
10428
|
+
// 虚拟模型并绕过 hosted routing(2026-09-24 review CRITICAL)。
|
|
10429
|
+
provider: "nolo",
|
|
10430
|
+
model: "gpt-6-luna",
|
|
10431
|
+
isPublic: true,
|
|
10432
|
+
platformAudit: true,
|
|
10433
|
+
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",
|
|
10434
|
+
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",
|
|
10435
|
+
prompt: "\u4F18\u5148\u5FEB\u901F\u5B8C\u6210\u4EFB\u52A1\uFF1B\u4FDD\u6301\u56DE\u7B54\u76F4\u63A5\u3001\u7ED3\u8BBA\u660E\u786E\u3002",
|
|
10436
|
+
tools: [],
|
|
10437
|
+
tags: ["openai"]
|
|
10438
|
+
});
|
|
10439
|
+
var DEEPSEEK_V4_FLASH_DEF = defineAgentSeed({
|
|
10440
|
+
id: PUBLIC_DEEPSEEK_V4_FLASH_AGENT_ID,
|
|
10441
|
+
presetKey: "deepseek-v4-flash",
|
|
10442
|
+
name: "DeepSeek Flash",
|
|
10443
|
+
provider: "nolo",
|
|
10444
|
+
model: "deepseek-flash",
|
|
10445
|
+
isPublic: true,
|
|
10446
|
+
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",
|
|
10447
|
+
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",
|
|
10448
|
+
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",
|
|
10449
|
+
tools: [],
|
|
10450
|
+
tags: ["nolo", "deepseek"]
|
|
10451
|
+
});
|
|
10452
|
+
var DEEPSEEK_V4_PRO_DEF = defineAgentSeed({
|
|
10453
|
+
id: PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID,
|
|
10454
|
+
presetKey: "deepseek-v4-pro",
|
|
10455
|
+
name: "DeepSeek V4 Pro",
|
|
10456
|
+
provider: "nolo",
|
|
10457
|
+
model: "deepseek-v4-pro",
|
|
10458
|
+
hasVision: false,
|
|
10459
|
+
isPublic: true,
|
|
10460
|
+
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",
|
|
10461
|
+
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",
|
|
10462
|
+
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",
|
|
10463
|
+
tools: [],
|
|
10464
|
+
tags: ["nolo", "deepseek"]
|
|
10465
|
+
});
|
|
10466
|
+
var GLM_5_3_DEF = defineAgentSeed({
|
|
10467
|
+
id: "01GLM52DIPB00000000I3E2MY",
|
|
10468
|
+
presetKey: "glm-5.3",
|
|
10469
|
+
name: "GLM 5.3",
|
|
10470
|
+
provider: "nolo",
|
|
10471
|
+
model: "glm-5.3",
|
|
10472
|
+
isPublic: true,
|
|
10473
|
+
hasVision: true,
|
|
10474
|
+
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",
|
|
10475
|
+
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",
|
|
10476
|
+
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",
|
|
10477
|
+
tools: [],
|
|
10478
|
+
tags: ["nolo", "glm"]
|
|
10479
|
+
});
|
|
10480
|
+
var GLM_5_3_FLASH_DEF = defineAgentSeed({
|
|
10481
|
+
id: PUBLIC_GLM_53_FLASH_AGENT_ID,
|
|
10482
|
+
presetKey: "glm-5-3-flash",
|
|
10483
|
+
name: "GLM 5.3 Flash",
|
|
10484
|
+
provider: "nolo",
|
|
10485
|
+
model: "glm-5-3-flash",
|
|
10486
|
+
isPublic: true,
|
|
10487
|
+
hasVision: true,
|
|
10488
|
+
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",
|
|
10489
|
+
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",
|
|
10490
|
+
prompt: "\u76F4\u63A5\u3001\u7B80\u6D01\u5730\u5B8C\u6210\u4EFB\u52A1\uFF1B\u56DE\u7B54\u4FDD\u6301\u7B80\u77ED\uFF0C\u5148\u7ED9\u7ED3\u8BBA\u3002",
|
|
10491
|
+
// 关掉思考:该模型默认档的 reasoning token 计入输出计费,而实测 low 档
|
|
10492
|
+
// reasoning 输出为 0(10/10 样本),单轮问答输出 token 降到约 1/5、多轮工具
|
|
10493
|
+
// 循环降约 4 成,可见回复长度、工具调用正确性与循环完成度均不变。
|
|
10494
|
+
// medium 档只省约 29% token 且延迟不改善,故直接用 low。
|
|
10495
|
+
reasoning_effort: "low",
|
|
10496
|
+
tools: [],
|
|
10497
|
+
tags: ["nolo", "glm", "flash"]
|
|
10498
|
+
});
|
|
10499
|
+
var CLAUDE_FABLE_5_1_DEF = defineAgentSeed({
|
|
10500
|
+
id: deterministicId("01CLDFBL51PB", "shared-space-anthropic-claude-fable-5-1"),
|
|
10501
|
+
presetKey: "claude-fable-5-1",
|
|
10502
|
+
name: "Claude Fable 5.1",
|
|
10503
|
+
provider: "nolo",
|
|
10504
|
+
model: "anthropic/claude-fable-5-1",
|
|
10505
|
+
isPublic: true,
|
|
10506
|
+
hasVision: true,
|
|
10507
|
+
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",
|
|
10508
|
+
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",
|
|
10509
|
+
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",
|
|
10510
|
+
tools: [],
|
|
10511
|
+
tags: ["anthropic", "claude", "fable"]
|
|
10512
|
+
});
|
|
10513
|
+
var CLAUDE_OPUS_5_5_DEF = defineAgentSeed({
|
|
10514
|
+
id: deterministicId("01CLDOPU55PB", "shared-space-anthropic-claude-opus-5-5"),
|
|
10515
|
+
presetKey: "claude-opus-5-5",
|
|
10516
|
+
name: "Claude Opus 5.5",
|
|
10517
|
+
provider: "nolo",
|
|
10518
|
+
model: "anthropic/claude-opus-5-5",
|
|
10519
|
+
isPublic: true,
|
|
10520
|
+
hasVision: true,
|
|
10521
|
+
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",
|
|
10522
|
+
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",
|
|
10523
|
+
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",
|
|
10524
|
+
tools: [],
|
|
10525
|
+
tags: ["anthropic", "claude", "opus"]
|
|
10526
|
+
});
|
|
10527
|
+
var GROK_4_6_DEF = defineAgentSeed({
|
|
10528
|
+
id: deterministicId("01GROK46PLAZ", "shared-space-xai-grok-4-6"),
|
|
10529
|
+
presetKey: "grok-4.6",
|
|
10530
|
+
name: "Grok 4.6",
|
|
10531
|
+
provider: "xai",
|
|
10532
|
+
model: "grok-4.6",
|
|
10533
|
+
isPublic: true,
|
|
10534
|
+
hasVision: true,
|
|
10535
|
+
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",
|
|
10536
|
+
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",
|
|
10537
|
+
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",
|
|
10538
|
+
tools: [],
|
|
10539
|
+
tags: ["xai", "grok"]
|
|
10540
|
+
});
|
|
10541
|
+
var GEMINI_3_8_FLASH_DEF = defineAgentSeed({
|
|
10542
|
+
// 种子串冻结以维持确定性 ID 稳定,勿随版本改名。
|
|
10543
|
+
id: deterministicId("01GEM37FLPB", "shared-space-google-gemini-3-7-flash"),
|
|
10544
|
+
presetKey: "gemini-3.8-flash",
|
|
10545
|
+
name: "Gemini 3.8 Flash",
|
|
10546
|
+
provider: "nolo",
|
|
10547
|
+
model: "gemini-3.8-flash",
|
|
10548
|
+
isPublic: true,
|
|
10549
|
+
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",
|
|
10550
|
+
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",
|
|
10551
|
+
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",
|
|
10552
|
+
tools: [],
|
|
10553
|
+
tags: ["google", "gemini"]
|
|
10554
|
+
});
|
|
10555
|
+
var GPT_IMAGE_2_GENERATOR_DEF = defineAgentSeed({
|
|
10556
|
+
id: PUBLIC_GPT_IMAGE_2_GENERATOR_AGENT_ID,
|
|
10557
|
+
presetKey: "gpt-image-2-generator",
|
|
10558
|
+
name: "GPT Image 2 \u56FE\u7247\u751F\u6210\u5668",
|
|
10559
|
+
provider: "nolo",
|
|
10560
|
+
model: "gpt-6-luna",
|
|
10561
|
+
imageModel: "gpt-image-2",
|
|
10562
|
+
isPublic: true,
|
|
10563
|
+
hasImageOutput: true,
|
|
10564
|
+
imageWorkflow: "generate",
|
|
10565
|
+
imageConfig: { enabled: true },
|
|
10566
|
+
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",
|
|
10567
|
+
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",
|
|
10568
|
+
prompt: [
|
|
10569
|
+
"\u5B9A\u4F4D\uFF1A",
|
|
10570
|
+
"- \u4F60\u7684\u4E3B\u4EFB\u52A1\u662F\u6587\u672C\u751F\u6210\u65B0\u56FE\u7247\u3002",
|
|
10571
|
+
"- \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",
|
|
10572
|
+
"- \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",
|
|
10573
|
+
"",
|
|
10574
|
+
"\u5DE5\u4F5C\u65B9\u5F0F\uFF1A",
|
|
10575
|
+
"- \u7528\u6237\u7ED9\u51FA\u6E05\u6670\u9700\u6C42\u540E\uFF0C\u76F4\u63A5\u751F\u6210\uFF0C\u4E0D\u5148\u5199\u957F\u7BC7\u89E3\u91CA\u3002",
|
|
10576
|
+
"- 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",
|
|
10577
|
+
"- \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",
|
|
10578
|
+
"- \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",
|
|
10579
|
+
"",
|
|
10580
|
+
"\u56DE\u590D\u65B9\u5F0F\uFF1A",
|
|
10581
|
+
"- \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"
|
|
10582
|
+
].join("\n"),
|
|
10583
|
+
tools: ["openAIGptImageGenerate"],
|
|
10584
|
+
tags: ["image", "openai", "gpt-image-2", "generate"]
|
|
10585
|
+
});
|
|
10586
|
+
var GPT_IMAGE_2_EDITOR_DEF = defineAgentSeed({
|
|
10587
|
+
id: PUBLIC_GPT_IMAGE_2_EDITOR_AGENT_ID,
|
|
10588
|
+
presetKey: "gpt-image-2-editor",
|
|
10589
|
+
name: "GPT Image 2 \u56FE\u7247\u7F16\u8F91\u5668",
|
|
10590
|
+
provider: "nolo",
|
|
10591
|
+
model: "gpt-6-luna",
|
|
10592
|
+
imageModel: "gpt-image-2",
|
|
10593
|
+
isPublic: true,
|
|
10594
|
+
hasImageOutput: true,
|
|
10595
|
+
imageWorkflow: "edit",
|
|
10596
|
+
imageConfig: { enabled: true },
|
|
10597
|
+
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",
|
|
10598
|
+
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",
|
|
10599
|
+
prompt: [
|
|
10600
|
+
"\u5B9A\u4F4D\uFF1A",
|
|
10601
|
+
"- \u4F60\u7684\u4E3B\u4EFB\u52A1\u662F\u5355\u6B21\u8BF7\u6C42\u6539\u56FE\uFF0C\u4E0D\u662F\u957F\u5BF9\u8BDD\u966A\u4F34\u5F0F\u521B\u4F5C\u3002",
|
|
10602
|
+
"- \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",
|
|
10603
|
+
"- \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",
|
|
10604
|
+
"",
|
|
10605
|
+
"\u5DE5\u4F5C\u65B9\u5F0F\uFF1A",
|
|
10606
|
+
"- \u6536\u5230\u56FE\u7247\u540E\uFF0C\u4F18\u5148\u6309\u5355\u6B21\u8BF7\u6C42\u6539\u56FE\u5B8C\u6210\u5F53\u524D\u76EE\u6807\u3002",
|
|
10607
|
+
"- \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",
|
|
10608
|
+
"- \u5982\u679C\u7528\u6237\u63D0\u4F9B\u4E86 mask\uFF0C\u5C31\u628A mask \u89C6\u4E3A\u5FC5\u987B\u9075\u5B88\u7684\u7F16\u8F91\u8303\u56F4\u3002",
|
|
10609
|
+
"- \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",
|
|
10610
|
+
"- \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",
|
|
10611
|
+
"- \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",
|
|
10612
|
+
"- \u5982\u679C outputFormat \u662F png\uFF08\u6216\u6CA1\u6709\u663E\u5F0F\u6539\u6210 jpeg/webp\uFF09\uFF0C\u4E0D\u8981\u4F20 outputCompression\u3002",
|
|
10613
|
+
"",
|
|
10614
|
+
"\u56DE\u590D\u65B9\u5F0F\uFF1A",
|
|
10615
|
+
"- \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"
|
|
10616
|
+
].join("\n"),
|
|
10617
|
+
tools: ["openAIGptImageEdit"],
|
|
10618
|
+
tags: ["image", "openai", "gpt-image-2", "edit"]
|
|
10619
|
+
});
|
|
10620
|
+
var GPT_IMAGE_2_CONTINUOUS_DEF = defineAgentSeed({
|
|
10621
|
+
id: PUBLIC_GPT_IMAGE_2_CONTINUOUS_AGENT_ID,
|
|
10622
|
+
presetKey: "gpt-image-2-continuous",
|
|
10623
|
+
name: "GPT Image 2 \u8FDE\u7EED\u521B\u4F5C\u52A9\u624B",
|
|
10624
|
+
provider: "nolo",
|
|
10625
|
+
model: "gpt-6-luna",
|
|
10626
|
+
imageModel: "gpt-image-2",
|
|
10627
|
+
isPublic: true,
|
|
10628
|
+
hasImageOutput: true,
|
|
10629
|
+
imageWorkflow: "continuous",
|
|
10630
|
+
imageConfig: { enabled: true },
|
|
10631
|
+
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",
|
|
10632
|
+
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",
|
|
10633
|
+
prompt: [
|
|
10634
|
+
"\u5B9A\u4F4D\uFF1A",
|
|
10635
|
+
"- \u4F60\u7684\u4E3B\u4EFB\u52A1\u662F\u591A\u8F6E\u8FDE\u7EED\u521B\u4F5C\u3002",
|
|
10636
|
+
"- \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",
|
|
10637
|
+
"- \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",
|
|
10638
|
+
"",
|
|
10639
|
+
"\u5DE5\u4F5C\u65B9\u5F0F\uFF1A",
|
|
10640
|
+
"- \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",
|
|
10641
|
+
"- \u5982\u679C\u5F53\u524D\u8F6E\u7528\u6237\u4E0A\u4F20\u4E86\u65B0\u56FE\uFF0C\u4F18\u5148\u57FA\u4E8E\u65B0\u56FE\u7EE7\u7EED\u521B\u4F5C\u3002",
|
|
10642
|
+
"- \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",
|
|
10643
|
+
"- \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",
|
|
10644
|
+
"- \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",
|
|
10645
|
+
"- \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",
|
|
10646
|
+
"- \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",
|
|
10647
|
+
"- \u5982\u679C outputFormat \u662F png\uFF08\u6216\u6CA1\u6709\u663E\u5F0F\u6539\u6210 jpeg/webp\uFF09\uFF0C\u4E0D\u8981\u4F20 outputCompression\u3002",
|
|
10648
|
+
"",
|
|
10649
|
+
"\u56DE\u590D\u65B9\u5F0F\uFF1A",
|
|
10650
|
+
"- \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"
|
|
10651
|
+
].join("\n"),
|
|
10652
|
+
tools: ["openAIGptImageGenerate", "openAIGptImageEdit"],
|
|
10653
|
+
tags: ["image", "openai", "gpt-image-2", "continuous"]
|
|
10654
|
+
});
|
|
10655
|
+
var NANO_BANANA_2_LITE_GENERATOR_DEF = defineAgentSeed({
|
|
10656
|
+
id: PUBLIC_NANO_BANANA_2_LITE_AGENT_ID,
|
|
10657
|
+
presetKey: "nano-banana-2-lite-generator",
|
|
10658
|
+
name: "Nano Banana 2 Lite \u6587\u751F\u56FE",
|
|
10659
|
+
provider: "nolo",
|
|
10660
|
+
model: "gemini-3.1-flash-lite-image",
|
|
10661
|
+
isPublic: true,
|
|
10662
|
+
hasImageOutput: true,
|
|
10663
|
+
imageWorkflow: "generate",
|
|
10664
|
+
imageConfig: { enabled: true },
|
|
10665
|
+
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",
|
|
10666
|
+
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",
|
|
10667
|
+
prompt: [
|
|
10668
|
+
"\u5B9A\u4F4D\uFF1A",
|
|
10669
|
+
"- \u4F60\u7684\u4E3B\u4EFB\u52A1\u662F\u5FEB\u901F\u751F\u6210\u65B0\u56FE\u7247\u3002",
|
|
10670
|
+
"- \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",
|
|
10671
|
+
"",
|
|
10672
|
+
"\u5DE5\u4F5C\u65B9\u5F0F\uFF1A",
|
|
10673
|
+
"- \u7528\u6237\u7ED9\u51FA\u6E05\u6670\u9700\u6C42\u540E\uFF0C\u76F4\u63A5\u7528\u5F53\u524D\u6A21\u578B\u751F\u6210\u56FE\u7247\u3002",
|
|
10674
|
+
"- \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",
|
|
10675
|
+
"- prompt \u8981\u660E\u786E\u4E3B\u4F53\u3001\u573A\u666F\u3001\u98CE\u683C\u3001\u5149\u7EBF\u3001\u6C1B\u56F4\u3002",
|
|
10676
|
+
"- \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",
|
|
10677
|
+
"- \u5982\u679C\u7528\u6237\u4E0A\u4F20\u4E86\u53C2\u8003\u56FE\uFF0C\u8BA9\u6A21\u578B\u53C2\u8003\u6784\u56FE\u6216\u98CE\u683C\u3002",
|
|
10678
|
+
"- \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",
|
|
10679
|
+
"",
|
|
10680
|
+
"\u56DE\u590D\u65B9\u5F0F\uFF1A",
|
|
10681
|
+
"- \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"
|
|
10682
|
+
].join("\n"),
|
|
10683
|
+
tools: [],
|
|
10684
|
+
tags: ["image", "google", "gemini", "nano-banana", "fast", "generate"]
|
|
10685
|
+
});
|
|
10686
|
+
var PUBLIC_AGENT_DEFS = [
|
|
10687
|
+
GPT_6_LUNA_DEF,
|
|
10688
|
+
DEEPSEEK_V4_FLASH_DEF,
|
|
10689
|
+
DEEPSEEK_V4_PRO_DEF,
|
|
10690
|
+
GLM_5_3_DEF,
|
|
10691
|
+
GLM_5_3_FLASH_DEF,
|
|
10692
|
+
CLAUDE_FABLE_5_1_DEF,
|
|
10693
|
+
CLAUDE_OPUS_5_5_DEF,
|
|
10694
|
+
GROK_4_6_DEF,
|
|
10695
|
+
GEMINI_3_8_FLASH_DEF,
|
|
10696
|
+
GPT_IMAGE_2_GENERATOR_DEF,
|
|
10697
|
+
GPT_IMAGE_2_EDITOR_DEF,
|
|
10698
|
+
GPT_IMAGE_2_CONTINUOUS_DEF,
|
|
10699
|
+
NANO_BANANA_2_LITE_GENERATOR_DEF
|
|
10700
|
+
];
|
|
10701
|
+
var PLATFORM_AUDITED_AGENT_SPECS = PUBLIC_AGENT_DEFS.filter((def) => def.platformAudit).map((def) => ({
|
|
10702
|
+
name: def.name,
|
|
10703
|
+
key: publicAgentKey(def.id)
|
|
10704
|
+
}));
|
|
10705
|
+
|
|
10706
|
+
// packages/agent-runtime/publicAgentCatalogOverride.ts
|
|
10707
|
+
var SEED_BY_ID = new Map(
|
|
10708
|
+
PUBLIC_AGENT_DEFS.map((seed) => [seed.id, seed])
|
|
10709
|
+
);
|
|
10710
|
+
function toPlatformOwnedCatalogId(value) {
|
|
10711
|
+
if (typeof value !== "string") return null;
|
|
10712
|
+
const trimmed = value.trim();
|
|
10713
|
+
if (!trimmed) return null;
|
|
10714
|
+
const parsed = parsePublicAgentId(trimmed);
|
|
10715
|
+
if (parsed) return parsed;
|
|
10716
|
+
const systemId = parseSystemAgentId(trimmed);
|
|
10717
|
+
if (systemId) return systemId;
|
|
10718
|
+
return null;
|
|
10719
|
+
}
|
|
10720
|
+
function readPlatformOwnedKey(record) {
|
|
10721
|
+
const fields = record;
|
|
10722
|
+
for (const value of [fields.dbKey, fields.id]) {
|
|
10723
|
+
if (typeof value !== "string") continue;
|
|
10724
|
+
if (toPlatformOwnedCatalogId(value) === null) continue;
|
|
10725
|
+
return value;
|
|
10726
|
+
}
|
|
10727
|
+
return null;
|
|
10728
|
+
}
|
|
10729
|
+
function resolvePublicAgentCatalogOverride(agentKey) {
|
|
10730
|
+
const id = toPlatformOwnedCatalogId(agentKey);
|
|
10731
|
+
if (!id) return null;
|
|
10732
|
+
const entry = builtinAgentCatalogEntryById(id);
|
|
10733
|
+
if (!entry) return null;
|
|
10734
|
+
if (entry.group !== "public" || isRetiredCatalogEntry(entry)) return null;
|
|
10735
|
+
const seed = SEED_BY_ID.get(entry.id);
|
|
10736
|
+
if (!seed) return null;
|
|
10737
|
+
return {
|
|
10738
|
+
name: entry.name,
|
|
10739
|
+
provider: entry.provider,
|
|
10740
|
+
model: entry.model,
|
|
10741
|
+
introduction: seed.introduction,
|
|
10742
|
+
greeting: seed.greeting,
|
|
10743
|
+
prompt: seed.prompt,
|
|
10744
|
+
tools: [...seed.tools],
|
|
10745
|
+
tags: [...seed.tags]
|
|
10746
|
+
};
|
|
10747
|
+
}
|
|
10748
|
+
function overlayGreeting(recordGreeting, seedGreeting) {
|
|
10749
|
+
const seedText = typeof seedGreeting === "string" ? seedGreeting : isRecord(seedGreeting) ? seedGreeting.text : void 0;
|
|
10750
|
+
if (typeof seedText !== "string" || !seedText) return recordGreeting;
|
|
10751
|
+
if (isRecord(recordGreeting)) {
|
|
10752
|
+
return { ...recordGreeting, text: seedText };
|
|
10753
|
+
}
|
|
10754
|
+
if (recordGreeting === void 0 || recordGreeting === null) {
|
|
10755
|
+
return seedGreeting;
|
|
10756
|
+
}
|
|
10757
|
+
if (typeof recordGreeting === "string") {
|
|
10758
|
+
return seedText;
|
|
10759
|
+
}
|
|
10760
|
+
return recordGreeting;
|
|
10761
|
+
}
|
|
10762
|
+
function applyPublicAgentCatalogOverride(record, agentKey) {
|
|
10763
|
+
const override = resolvePublicAgentCatalogOverride(agentKey) ?? resolvePublicAgentCatalogOverride(readPlatformOwnedKey(record));
|
|
10764
|
+
if (!override) return record;
|
|
10765
|
+
const current = record;
|
|
10766
|
+
const greeting = overlayGreeting(current.greeting, override.greeting);
|
|
10767
|
+
return {
|
|
10768
|
+
...record,
|
|
10769
|
+
name: override.name,
|
|
10770
|
+
provider: override.provider,
|
|
10771
|
+
model: override.model,
|
|
10772
|
+
introduction: override.introduction,
|
|
10773
|
+
prompt: override.prompt,
|
|
10774
|
+
tools: [...override.tools],
|
|
10775
|
+
tags: [...override.tags],
|
|
10776
|
+
...greeting !== void 0 ? { greeting } : {}
|
|
10777
|
+
};
|
|
10778
|
+
}
|
|
10779
|
+
|
|
10122
10780
|
// packages/cli/client/cliLocalAgentRecordReader.ts
|
|
10123
10781
|
function resolveBuiltinLocalCliAgentConfig(agentRef, userId) {
|
|
10124
10782
|
const normalized = agentRef.trim();
|
|
@@ -10151,7 +10809,10 @@ async function readAgentFromStore(args) {
|
|
|
10151
10809
|
if (!record || typeof record !== "object") continue;
|
|
10152
10810
|
return applyBuiltinAgentRuntimeOverride(
|
|
10153
10811
|
args.agentRef,
|
|
10154
|
-
resolveAgentRuntimeConfigFromRecord(
|
|
10812
|
+
resolveAgentRuntimeConfigFromRecord(
|
|
10813
|
+
key,
|
|
10814
|
+
applyPublicAgentCatalogOverride(record)
|
|
10815
|
+
)
|
|
10155
10816
|
);
|
|
10156
10817
|
}
|
|
10157
10818
|
return resolveBuiltinPlatformAgentConfig(args.agentRef);
|
|
@@ -10520,6 +11181,9 @@ function waitForRunTerminal(args) {
|
|
|
10520
11181
|
};
|
|
10521
11182
|
const loop = Effect_exports.gen(function* () {
|
|
10522
11183
|
token = args.claim?.acquire() ?? null;
|
|
11184
|
+
const deadline = Date.now() + args.timeoutMs;
|
|
11185
|
+
const maxIterations = Math.ceil(args.timeoutMs / Math.max(1, args.pollIntervalMs)) + 1;
|
|
11186
|
+
let iterations = 0;
|
|
10523
11187
|
while (true) {
|
|
10524
11188
|
const state = yield* readEffect(args.read);
|
|
10525
11189
|
lastState = state;
|
|
@@ -10530,6 +11194,10 @@ function waitForRunTerminal(args) {
|
|
|
10530
11194
|
}
|
|
10531
11195
|
return { kind: "terminal", state };
|
|
10532
11196
|
}
|
|
11197
|
+
iterations += 1;
|
|
11198
|
+
if (Date.now() >= deadline || iterations >= maxIterations) {
|
|
11199
|
+
return { kind: "timeout", waitedMs: args.timeoutMs, lastState };
|
|
11200
|
+
}
|
|
10533
11201
|
const slept = yield* sleep(args.pollIntervalMs);
|
|
10534
11202
|
if (slept === "aborted") return { kind: "aborted" };
|
|
10535
11203
|
}
|
|
@@ -10954,6 +11622,12 @@ function buildRunStatusPayload(reconciled, deps, opts = {}) {
|
|
|
10954
11622
|
endedAt: reconciled.endedAt ?? null,
|
|
10955
11623
|
exitCode: reconciled.exitCode ?? null,
|
|
10956
11624
|
...reconciled.failureReason ? { failureReason: reconciled.failureReason } : {},
|
|
11625
|
+
// 结构化失败分类 + 可重试性:编排者据此决策,不再肉读 logTail。
|
|
11626
|
+
...reconciled.failureClass ? { failureClass: reconciled.failureClass } : {},
|
|
11627
|
+
...typeof reconciled.retryable === "boolean" ? { retryable: reconciled.retryable } : {},
|
|
11628
|
+
// 日志落盘路径始终暴露:stalled/failed 且 dialogId 缺失(如 ephemeral)
|
|
11629
|
+
// 时 logTail 只能靠它读,不能只留在进程内存。
|
|
11630
|
+
...reconciled.logPath ? { logPath: reconciled.logPath } : {},
|
|
10957
11631
|
...typeof reconciled.toolCallCount === "number" ? { toolCallCount: reconciled.toolCallCount } : {},
|
|
10958
11632
|
...reconciled.lastAssistantText ? { lastAssistantText: reconciled.lastAssistantText } : {},
|
|
10959
11633
|
// Non-ephemeral runs expose dialogId so the caller can read the
|
|
@@ -10988,6 +11662,40 @@ function buildRunStatusPayload(reconciled, deps, opts = {}) {
|
|
|
10988
11662
|
}
|
|
10989
11663
|
};
|
|
10990
11664
|
}
|
|
11665
|
+
async function assertCredentialFanoutAllowed(deps, args) {
|
|
11666
|
+
let candidateGroup;
|
|
11667
|
+
if (deps.resolveAgentCredentialGroup) {
|
|
11668
|
+
try {
|
|
11669
|
+
candidateGroup = await deps.resolveAgentCredentialGroup(args.agentKey);
|
|
11670
|
+
} catch {
|
|
11671
|
+
candidateGroup = void 0;
|
|
11672
|
+
}
|
|
11673
|
+
}
|
|
11674
|
+
if (!candidateGroup && typeof args.credentialGroup === "string" && args.credentialGroup.trim()) {
|
|
11675
|
+
candidateGroup = args.credentialGroup.trim();
|
|
11676
|
+
}
|
|
11677
|
+
const { batchId, parentDialogId } = args;
|
|
11678
|
+
if (!batchId && !parentDialogId) return candidateGroup;
|
|
11679
|
+
const active = queryRunRecords({ limit: 500 }, deps).runs.filter((record) => {
|
|
11680
|
+
if (isRunTerminalStatus(record.status)) return false;
|
|
11681
|
+
if (batchId && record.batchId === batchId) return true;
|
|
11682
|
+
if (parentDialogId && record.parentDialogId === parentDialogId) return true;
|
|
11683
|
+
return false;
|
|
11684
|
+
}).map((record) => ({
|
|
11685
|
+
runId: record.runId,
|
|
11686
|
+
agentKey: record.agentKey,
|
|
11687
|
+
credentialGroup: record.credentialGroup
|
|
11688
|
+
}));
|
|
11689
|
+
if (active.length === 0) return candidateGroup;
|
|
11690
|
+
const verdict = checkCredentialFanout({
|
|
11691
|
+
active,
|
|
11692
|
+
candidate: { agentKey: args.agentKey, credentialGroup: candidateGroup },
|
|
11693
|
+
allowUnknownCredential: args.allowUnknownCredential === true,
|
|
11694
|
+
allowCredentialConcurrency: args.allowCredentialConcurrency === true
|
|
11695
|
+
});
|
|
11696
|
+
if (!verdict.allowed) throw new Error(verdict.message);
|
|
11697
|
+
return candidateGroup;
|
|
11698
|
+
}
|
|
10991
11699
|
function createCliStartAgentRunExecutor(deps = {}) {
|
|
10992
11700
|
return async (call) => {
|
|
10993
11701
|
const args = parseCallArgs(call);
|
|
@@ -11010,6 +11718,14 @@ function createCliStartAgentRunExecutor(deps = {}) {
|
|
|
11010
11718
|
];
|
|
11011
11719
|
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
11720
|
const batchId = typeof args.batchId === "string" && args.batchId.trim() ? args.batchId.trim() : void 0;
|
|
11721
|
+
const parentDialogId = typeof args.parentDialogId === "string" && args.parentDialogId.trim() ? args.parentDialogId.trim() : void 0;
|
|
11722
|
+
const credentialGroup = await assertCredentialFanoutAllowed(deps, {
|
|
11723
|
+
agentKey,
|
|
11724
|
+
...batchId ? { batchId } : {},
|
|
11725
|
+
...parentDialogId ? { parentDialogId } : {},
|
|
11726
|
+
...typeof args.credentialGroup === "string" && args.credentialGroup.trim() ? { credentialGroup: args.credentialGroup.trim() } : {},
|
|
11727
|
+
allowUnknownCredential: args.allowUnknownCredential === true
|
|
11728
|
+
});
|
|
11013
11729
|
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
11730
|
const { runId, batchId: resolvedBatchId } = await spawnLocalBackgroundRun(
|
|
11015
11731
|
{
|
|
@@ -11019,7 +11735,8 @@ function createCliStartAgentRunExecutor(deps = {}) {
|
|
|
11019
11735
|
agentKey,
|
|
11020
11736
|
...agentName ? { agentName } : {},
|
|
11021
11737
|
...batchId ? { batchId } : {},
|
|
11022
|
-
...
|
|
11738
|
+
...credentialGroup ? { credentialGroup } : {},
|
|
11739
|
+
...parentDialogId ? { parentDialogId } : {},
|
|
11023
11740
|
...dodCommands && dodCommands.length > 0 ? { dodCommands } : {},
|
|
11024
11741
|
cwd: deps.cwd ?? process.cwd(),
|
|
11025
11742
|
message,
|
|
@@ -11105,6 +11822,8 @@ async function spawnContinuationRun(reconciled, userInput, deps) {
|
|
|
11105
11822
|
...agentName ? { agentName } : {},
|
|
11106
11823
|
...reconciled.batchId ? { batchId: reconciled.batchId } : {},
|
|
11107
11824
|
...reconciled.parentDialogId ? { parentDialogId: reconciled.parentDialogId } : {},
|
|
11825
|
+
// 续跑继承原 run 的凭证组(同一 agent),供并发扇出守卫判定。
|
|
11826
|
+
...reconciled.credentialGroup ? { credentialGroup: reconciled.credentialGroup } : {},
|
|
11108
11827
|
cwd: reconciled.cwd ?? deps.cwd ?? process.cwd(),
|
|
11109
11828
|
message: userInput,
|
|
11110
11829
|
...reconciled.ephemeral ? { ephemeral: true } : {},
|
|
@@ -11703,7 +12422,8 @@ function buildLocalToolExecutors(args) {
|
|
|
11703
12422
|
startAgentRun: createCliStartAgentRunExecutor({
|
|
11704
12423
|
env: args.env,
|
|
11705
12424
|
cliEntrypoint: args.cliEntrypoint,
|
|
11706
|
-
cwd: args.workspaceRoot
|
|
12425
|
+
cwd: args.workspaceRoot,
|
|
12426
|
+
...args.resolveAgentCredentialGroup ? { resolveAgentCredentialGroup: args.resolveAgentCredentialGroup } : {}
|
|
11707
12427
|
}),
|
|
11708
12428
|
controlAgentRun: createCliControlAgentRunExecutor({
|
|
11709
12429
|
env: args.env
|
|
@@ -12040,6 +12760,10 @@ var import_date_fns = __toESM(require_date_fns(), 1);
|
|
|
12040
12760
|
import { appendFileSync, mkdirSync as mkdirSync2 } from "fs";
|
|
12041
12761
|
import { homedir } from "os";
|
|
12042
12762
|
import { join as join2 } from "path";
|
|
12763
|
+
var diagLog = {
|
|
12764
|
+
warn: (msg) => getLogger("cli.localRuntimeDialog").warn(msg),
|
|
12765
|
+
info: (msg) => getLogger("cli.localRuntimeDialog").info(msg)
|
|
12766
|
+
};
|
|
12043
12767
|
var RAW_USAGE_SCALARS = [
|
|
12044
12768
|
"prompt_tokens",
|
|
12045
12769
|
"completion_tokens",
|
|
@@ -12169,7 +12893,7 @@ function createLocalDialogTitleGenerator(deps, ctx) {
|
|
|
12169
12893
|
const now = Date.now();
|
|
12170
12894
|
if (now - lastTitleWarnAtMs >= TITLE_WARN_THROTTLE_MS) {
|
|
12171
12895
|
lastTitleWarnAtMs = now;
|
|
12172
|
-
|
|
12896
|
+
diagLog.warn("Dialog title LLM unavailable; using fallback title.");
|
|
12173
12897
|
}
|
|
12174
12898
|
return null;
|
|
12175
12899
|
}
|
|
@@ -12278,8 +13002,7 @@ async function writeDialog(args) {
|
|
|
12278
13002
|
}
|
|
12279
13003
|
if (__perfEnabled) {
|
|
12280
13004
|
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
12281
|
-
|
|
12282
|
-
`);
|
|
13005
|
+
diagLog.info(`perf writeDialog A:read-dialog: ${ms}ms`);
|
|
12283
13006
|
}
|
|
12284
13007
|
const nowMs = args.now();
|
|
12285
13008
|
const existingTitle = typeof existingDialog?.title === "string" ? existingDialog.title.trim() : "";
|
|
@@ -12329,8 +13052,7 @@ async function writeDialog(args) {
|
|
|
12329
13052
|
await args.store.batch(plan.ops);
|
|
12330
13053
|
if (__perfEnabled) {
|
|
12331
13054
|
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
12332
|
-
|
|
12333
|
-
`);
|
|
13055
|
+
diagLog.info(`perf writeDialog C:store-batch (cumulative): ${ms}ms`);
|
|
12334
13056
|
}
|
|
12335
13057
|
let tokenOps = [];
|
|
12336
13058
|
try {
|
|
@@ -12351,8 +13073,7 @@ async function writeDialog(args) {
|
|
|
12351
13073
|
}
|
|
12352
13074
|
if (__perfEnabled) {
|
|
12353
13075
|
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
12354
|
-
|
|
12355
|
-
`);
|
|
13076
|
+
diagLog.info(`perf writeDialog D:token-record (cumulative): ${ms}ms`);
|
|
12356
13077
|
}
|
|
12357
13078
|
const hasSubjectRefs = localTurnHasSubjectRefs(args.input);
|
|
12358
13079
|
const isLocalUser = args.userId === "local";
|
|
@@ -12416,8 +13137,7 @@ async function writeDialog(args) {
|
|
|
12416
13137
|
}
|
|
12417
13138
|
if (__perfEnabled) {
|
|
12418
13139
|
const ms = (performance.now() - __perfT0).toFixed(1);
|
|
12419
|
-
|
|
12420
|
-
`);
|
|
13140
|
+
diagLog.info(`perf writeDialog total (blocking): ${ms}ms`);
|
|
12421
13141
|
}
|
|
12422
13142
|
return { dialogId: plan.dialogId, title: plan.title, titlePatchPromise, remoteSyncPromise };
|
|
12423
13143
|
}
|
|
@@ -12564,6 +13284,26 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12564
13284
|
const localToolUsage = /* @__PURE__ */ new Map();
|
|
12565
13285
|
const buildProviderOpenAiTools = deps.buildProviderOpenAiTools ?? buildOpenAiTools;
|
|
12566
13286
|
const additionalToolNames = deps.pastedTextStore ? ["readPastedText"] : [];
|
|
13287
|
+
const resolveAgentCredentialGroup = async (agentRef) => {
|
|
13288
|
+
try {
|
|
13289
|
+
const record = await readAgentFromStore({
|
|
13290
|
+
agentRef,
|
|
13291
|
+
store: await getOrCreateSharedStore(deps),
|
|
13292
|
+
userId
|
|
13293
|
+
});
|
|
13294
|
+
if (!record || typeof record !== "object") return void 0;
|
|
13295
|
+
const rec = record;
|
|
13296
|
+
const existing = typeof rec.credentialGroup === "string" && rec.credentialGroup.trim() ? rec.credentialGroup.trim() : void 0;
|
|
13297
|
+
if (existing) return existing;
|
|
13298
|
+
const ref = typeof rec.apiKeyRef === "string" && rec.apiKeyRef.trim() ? rec.apiKeyRef : typeof rec.credentialRef === "string" && rec.credentialRef.trim() ? rec.credentialRef : void 0;
|
|
13299
|
+
const viaRef = deriveCredentialGroup(ref)?.credentialGroup;
|
|
13300
|
+
if (viaRef) return viaRef;
|
|
13301
|
+
const customUrl = typeof rec.customProviderUrl === "string" ? rec.customProviderUrl : void 0;
|
|
13302
|
+
return deriveCustomProviderCredentialGroup(userId, customUrl)?.credentialGroup;
|
|
13303
|
+
} catch {
|
|
13304
|
+
return void 0;
|
|
13305
|
+
}
|
|
13306
|
+
};
|
|
12567
13307
|
let activeAgentToolNames = [];
|
|
12568
13308
|
const workspaceRoot = deps.cwd ?? process.cwd();
|
|
12569
13309
|
let runtimeToolExecutionLimits = {};
|
|
@@ -12576,6 +13316,7 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12576
13316
|
readXPost: deps.readXPost,
|
|
12577
13317
|
readXhsProfile: deps.readXhsProfile,
|
|
12578
13318
|
cliEntrypoint: CLI_ENTRYPOINT,
|
|
13319
|
+
resolveAgentCredentialGroup,
|
|
12579
13320
|
...deps.confirmDestructiveAction ? { confirmDestructiveAction: deps.confirmDestructiveAction } : {},
|
|
12580
13321
|
...deps.requestUserChoice ? { requestUserChoice: deps.requestUserChoice } : {},
|
|
12581
13322
|
...deps.pastedTextStore ? { pastedTextStore: deps.pastedTextStore } : {},
|
|
@@ -12653,6 +13394,7 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12653
13394
|
readXPost: deps.readXPost,
|
|
12654
13395
|
readXhsProfile: deps.readXhsProfile,
|
|
12655
13396
|
cliEntrypoint: CLI_ENTRYPOINT,
|
|
13397
|
+
resolveAgentCredentialGroup,
|
|
12656
13398
|
...deps.confirmDestructiveAction ? { confirmDestructiveAction: deps.confirmDestructiveAction } : {},
|
|
12657
13399
|
...deps.requestUserChoice ? { requestUserChoice: deps.requestUserChoice } : {},
|
|
12658
13400
|
...deps.pastedTextStore ? { pastedTextStore: deps.pastedTextStore } : {},
|
|
@@ -12852,6 +13594,11 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12852
13594
|
runToolNames: activeAgentToolNames,
|
|
12853
13595
|
call: injectedCall,
|
|
12854
13596
|
executors: localToolExecutors,
|
|
13597
|
+
// 分发前参数闸门:只覆盖 agent-runtime 工具族(workspace + nolo
|
|
13598
|
+
// workspace)。ai/tools registry 的工具不接——它们有各自的前置 policy
|
|
13599
|
+
// guard 与结构化结果契约(例:createTable 的 capture 确认守卫),
|
|
13600
|
+
// 闸门抢先拦截会覆盖这些语义(见 toolArgumentGate.ts 的范围说明)。
|
|
13601
|
+
toolParametersIndex: getAgentRuntimeToolParametersIndex(),
|
|
12855
13602
|
abortSignal: opts?.abortSignal,
|
|
12856
13603
|
detachMs: resolveExecShellDetachMs(deps.env),
|
|
12857
13604
|
...deps.confirmDestructiveAction ? { confirmDestructiveAction: deps.confirmDestructiveAction } : {}
|
|
@@ -12901,9 +13648,21 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12901
13648
|
}
|
|
12902
13649
|
|
|
12903
13650
|
export {
|
|
12904
|
-
|
|
13651
|
+
parseCliLocale,
|
|
13652
|
+
getCliLocale,
|
|
13653
|
+
setCliLocale,
|
|
13654
|
+
initCliLocale,
|
|
13655
|
+
dailyWelcomeTip,
|
|
13656
|
+
t,
|
|
13657
|
+
toolLabel,
|
|
13658
|
+
toolLabelVariants,
|
|
13659
|
+
agentRunCardLabels,
|
|
13660
|
+
readTimestamp,
|
|
13661
|
+
parseAgentRunEvent,
|
|
13662
|
+
isLiveAgentRunObservation,
|
|
12905
13663
|
isSubtaskRun,
|
|
12906
13664
|
RUN_WAKE_CHANNEL_ENV,
|
|
13665
|
+
clearCliLocalRuntimePreparedAgentCache,
|
|
12907
13666
|
summarizeEndpoint,
|
|
12908
13667
|
resolveLocalUserId,
|
|
12909
13668
|
isBuiltinNoloAgentRef,
|
|
@@ -12913,16 +13672,5 @@ export {
|
|
|
12913
13672
|
resolveBoundMachineId,
|
|
12914
13673
|
isCliProviderAgentConfig,
|
|
12915
13674
|
detectCurrentMachineId,
|
|
12916
|
-
readTimestamp,
|
|
12917
|
-
parseAgentRunEvent,
|
|
12918
|
-
isLiveAgentRunObservation,
|
|
12919
|
-
parseCliLocale,
|
|
12920
|
-
getCliLocale,
|
|
12921
|
-
setCliLocale,
|
|
12922
|
-
initCliLocale,
|
|
12923
|
-
dailyWelcomeTip,
|
|
12924
|
-
t,
|
|
12925
|
-
toolLabel,
|
|
12926
|
-
agentRunCardLabels,
|
|
12927
13675
|
createCliLocalRuntimeAdapter
|
|
12928
13676
|
};
|