nolo-cli 0.250.0-alpha.1 → 0.252.0-alpha.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/{_executeModel-F4MT6OPO.js → _executeModel-D6G3B45S.js} +51 -51
- package/{action-WZTKEF5H.js → action-QQOQ2LP3.js} +3 -3
- package/{addContentAction-MLI6GOBV.js → addContentAction-MB22YIDV.js} +6 -6
- package/{addDialogAgentAction-ARGQM22H.js → addDialogAgentAction-KNTBVVGY.js} +5 -5
- package/{agentDeleteCommand-DBCRHB4S.js → agentDeleteCommand-YCWDGJSF.js} +87 -82
- package/{agentEmailCommands-T4PAJ4KG.js → agentEmailCommands-DTWD5FWC.js} +87 -82
- package/{agentListCommands-5ULWKQ3E.js → agentListCommands-JTOONLYL.js} +233 -46
- package/{agentMachineCommands-65QUOCEY.js → agentMachineCommands-25X7OTLQ.js} +38 -36
- package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
- package/{agentPullCommand-4EQZYHU4.js → agentPullCommand-6OCNLVGC.js} +1 -1
- package/{agentRecordCommands-EKANS3A5.js → agentRecordCommands-SXE3WV2X.js} +86 -81
- package/{agentRunCommand-336PXBRJ.js → agentRunCommand-QSIED54S.js} +87 -82
- package/{agentRunControl-QMWTWV7C.js → agentRunControl-KNNDEEDI.js} +8 -6
- package/{agentRuntimeLocal-KKXJOBD3.js → agentRuntimeLocal-HVJJMB4W.js} +32 -31
- package/{agentSlice-FWYXP332.js → agentSlice-NBUJJVRI.js} +7 -7
- package/{appDeleteCommands-ERJK367V.js → appDeleteCommands-YU6TT6VN.js} +39 -37
- package/{appDeployCommands-LUV6QKQJ.js → appDeployCommands-4DEIX7YP.js} +39 -37
- package/{appDeployStatusCommands-WW7IYQD4.js → appDeployStatusCommands-3VKS6GBQ.js} +39 -37
- package/{appGetCommands-G7XYYSFO.js → appGetCommands-22FNNROT.js} +39 -37
- package/{appListCommands-4RXCIDNI.js → appListCommands-FVGMLHVU.js} +39 -37
- package/{authCommand-3C3RN4OU.js → authCommand-5DC3ES4Q.js} +15 -15
- package/{authCommands-ZMVEDCQD.js → authCommands-BLXNAUF4.js} +2 -2
- package/{chromeOpsCommands-NZITLHWO.js → chromeOpsCommands-AA555ANS.js} +1 -1
- package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
- package/chunk-2GAUJDA5.js +594 -0
- package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
- package/{chunk-222CJNC2.js → chunk-2LANL4B5.js} +3 -3
- package/{chunk-W4G25PVP.js → chunk-2PB653F5.js} +196 -253
- package/{chunk-UF6J7NXV.js → chunk-3272HU62.js} +1 -1
- package/chunk-3A5NNQCN.js +64 -0
- package/{chunk-7IQA2VJF.js → chunk-3N3JPQBQ.js} +210 -56
- package/{chunk-LXKK7QFI.js → chunk-4HAOOY6G.js} +53 -23
- package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
- package/{chunk-ADOOL3PG.js → chunk-52M4RYVP.js} +1 -1
- package/{chunk-U7OMQLRE.js → chunk-5IN2NBDX.js} +9 -9
- package/{chunk-BAH3BAUZ.js → chunk-5QEOTC35.js} +5 -5
- package/{chunk-E5RYFR7E.js → chunk-5UYDG6HP.js} +19 -0
- package/{chunk-Z7A2ZQ5X.js → chunk-64ACTEAE.js} +1 -1
- package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
- package/{chunk-BFKJ2RS3.js → chunk-7RYODZDD.js} +1 -1
- package/{chunk-YWNCRUBZ.js → chunk-7XO73H5X.js} +116 -6
- package/{chunk-SMEX763N.js → chunk-7ZOVFB2H.js} +100 -43
- package/{chunk-UR4ZMRV3.js → chunk-A5F6DYP2.js} +1 -1
- package/{chunk-ZKMS73DK.js → chunk-A6VIMCWI.js} +3 -3
- package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
- package/{chunk-LTVEOOZL.js → chunk-CIAV4WK2.js} +14 -1
- package/{chunk-HZDK56EK.js → chunk-CO2NXG2J.js} +32 -10
- package/{chunk-OHUYN3YU.js → chunk-CYGFNMCH.js} +1 -1
- package/{chunk-MZVCFV3T.js → chunk-D3WOFN6N.js} +3 -3
- package/{chunk-VUHKG4KS.js → chunk-DNNPARJK.js} +9 -5
- package/{chunk-VV5IS3ES.js → chunk-DU3DJYVA.js} +5 -5
- package/{chunk-SPU3L3OR.js → chunk-EFM2IPZR.js} +3 -3
- package/{chunk-73PZD7JZ.js → chunk-EG3JTV7H.js} +2 -2
- package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
- package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
- package/{chunk-CD64YXRB.js → chunk-F6Q64KRV.js} +1 -1
- package/{chunk-TMRJGSK2.js → chunk-FRC2DNTN.js} +1 -1
- package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
- package/{chunk-I3J7HO3U.js → chunk-FZI2P64R.js} +137 -53
- package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
- package/{chunk-XHG7QROB.js → chunk-GO7UC5VH.js} +5 -5
- package/{chunk-RDBDHGU7.js → chunk-GVH2IP2M.js} +5 -5
- package/{chunk-AXZ5DDLB.js → chunk-GWS2X7TX.js} +235 -120
- package/{chunk-KHVTT4WW.js → chunk-HF4C5WIU.js} +81 -542
- package/{chunk-ATRU65OK.js → chunk-HMREADP6.js} +21 -19
- package/chunk-HZD5HXUO.js +405 -0
- package/{chunk-VHMPJGT4.js → chunk-ITCOQAHS.js} +3 -3
- package/{chunk-BQ4CZEVZ.js → chunk-ITMBFT35.js} +1 -1
- package/chunk-IVK2KT3H.js +209 -0
- package/{chunk-FFFKAOJN.js → chunk-JAYPSNGR.js} +1 -1
- package/{chunk-NEG5LYK5.js → chunk-JCQ3WCQ3.js} +3 -1
- package/{chunk-3IVFGQIM.js → chunk-JF5QT3YY.js} +2 -2
- package/{chunk-V4IYI3SB.js → chunk-JKALGWDL.js} +2 -2
- package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
- package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
- package/{chunk-HEIIOJGN.js → chunk-LAQC5FAP.js} +4 -4
- package/{chunk-I3OW5RAX.js → chunk-LNIA5JVX.js} +8 -8
- package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
- package/{chunk-W6T4FNZP.js → chunk-LUPZLKXL.js} +192 -352
- package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
- package/{chunk-SHDJLJWV.js → chunk-N2ZAY2DK.js} +1 -1
- package/{chunk-WEZ27JA7.js → chunk-NMXGIRSG.js} +1 -1
- package/{chunk-MTM4LRVG.js → chunk-NNUIVAC2.js} +1 -1
- package/{chunk-ARFCL53U.js → chunk-NPUHKEOB.js} +4 -4
- package/{chunk-32WTED6G.js → chunk-O6LPLIRS.js} +94 -83
- package/{chunk-4IQN6FWY.js → chunk-OB4FBZXJ.js} +4 -4
- package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
- package/{chunk-UPOW5HTG.js → chunk-OMIXG25B.js} +2 -2
- package/{chunk-MYYNZG2M.js → chunk-OOV5JN25.js} +4 -4
- package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
- package/{chunk-OKKA4BCM.js → chunk-P6HMEKLL.js} +114 -56
- package/{chunk-VTHWBTRE.js → chunk-PENRYZ4D.js} +1 -1
- package/{chunk-VIYVRPMJ.js → chunk-PHREU2KZ.js} +5 -3
- package/{chunk-EDT65EUE.js → chunk-PIVTQRX6.js} +45 -15
- package/{chunk-KJDN2YRH.js → chunk-QMKWSKWA.js} +4 -4
- package/{chunk-6TVYUQRM.js → chunk-QV32GSVO.js} +2 -2
- package/{chunk-K7VIXYTZ.js → chunk-R3MV2GII.js} +1 -45
- package/{chunk-XJSEST7D.js → chunk-SMCKJJXI.js} +2 -2
- package/{chunk-JFRJEPFI.js → chunk-SMZFWEMX.js} +1 -1
- package/{chunk-KK3FCYZM.js → chunk-SQL7YNED.js} +7 -4
- package/{chunk-D25ONVOH.js → chunk-SSZHE2RK.js} +1 -1
- package/{chunk-OLGFIQN2.js → chunk-T4VVQHSE.js} +1 -1
- package/{chunk-6QL3SUEK.js → chunk-TDI7ARZO.js} +3 -3
- package/{chunk-X6LYQDN5.js → chunk-TDLZA6LJ.js} +13 -10
- package/chunk-TRRXYFTR.js +46 -0
- package/{chunk-WMKA2DPK.js → chunk-TTUIM3PJ.js} +4 -4
- package/{chunk-RHBD22LV.js → chunk-TTWNTFTO.js} +39 -4
- package/{chunk-ZM5AZTQG.js → chunk-U7BP25PE.js} +18 -6
- package/{chunk-X3OZ655T.js → chunk-UI3Z3HDK.js} +1 -1
- package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
- package/{chunk-BVEDT6DM.js → chunk-VH7AQEEF.js} +3 -3
- package/{chunk-PGDM7AM2.js → chunk-WAOHK3NJ.js} +9 -9
- package/{chunk-2FK2KZSL.js → chunk-WLHUANWZ.js} +1 -1
- package/{chunk-ZTWDSOXD.js → chunk-WNIBQBOR.js} +1 -1
- package/{chunk-SLUZ6FBJ.js → chunk-XBCADGK2.js} +1 -1
- package/chunk-XRGBJHZX.js +136 -0
- package/{chunk-6XVPMGXK.js → chunk-YB5D2GK4.js} +9 -3
- package/{chunk-AKWA6PCE.js → chunk-YQYYYATY.js} +45 -27
- package/{chunk-WQDTSK5U.js → chunk-ZMFA2TLE.js} +1 -1
- package/{chunk-CFDOIIOZ.js → chunk-ZMXO5G3E.js} +29 -23
- package/{chunk-YQO5UKHP.js → chunk-ZNOXY73P.js} +632 -124
- package/{cliAgentConfigHelpers-37ZNEY5Y.js → cliAgentConfigHelpers-FKBPFPKR.js} +7 -7
- package/{cliAuthorityBrokerClient-SFPC3WVK.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
- package/cliAuthorityBrokerProcess-IUCB4XA6.js +22 -0
- package/{cliLocalAgentRecordReader-R4CLUHYO.js → cliLocalAgentRecordReader-DWU3LBO2.js} +36 -35
- package/{commandRegistry-UIZRI4JV.js → commandRegistry-7FVATZS2.js} +74 -74
- package/{contentThunks-ZQSZA4GH.js → contentThunks-25XCB7VY.js} +20 -20
- package/{cooldownCommands-TIFCHCUN.js → cooldownCommands-PT5L4LNB.js} +3 -3
- package/{createAgentAutomationAction-RQE4F6PR.js → createAgentAutomationAction-FC5RI2LW.js} +20 -20
- package/{createDialogAction-JDSMQ34U.js → createDialogAction-IL3ISSQQ.js} +21 -21
- package/{createPageAction-VLF6XCYO.js → createPageAction-RVYBEYZV.js} +23 -23
- package/{db-CMUTP3W5.js → db-JMGVD4TB.js} +4 -2
- package/{dbSlice-656PMWR2.js → dbSlice-WG3ZG6PZ.js} +5 -5
- package/{deleteFile-ZCQESEEQ.js → deleteFile-4TIG54YN.js} +3 -3
- package/{dialogCommands-PLM7ZFWH.js → dialogCommands-VUJISJZF.js} +48 -42
- package/{dialogNotifyCommand-PST75COP.js → dialogNotifyCommand-JKYVSR6K.js} +8 -8
- package/{dialogSlice-63DD2ER2.js → dialogSlice-UMP55UAW.js} +18 -18
- package/{dialogUsageCommand-6RW2FY6K.js → dialogUsageCommand-IHAXS7DW.js} +5 -5
- package/{docCreateCommands-BST5DO7L.js → docCreateCommands-S46F6GKP.js} +38 -36
- package/{docDeleteCommands-YE6G2SO4.js → docDeleteCommands-LJG4NK6J.js} +39 -37
- package/{docReadCommands-M6T35U3G.js → docReadCommands-YPAYGHNM.js} +38 -36
- package/{docStore-7QNJWRJ2.js → docStore-VK3MVJ5Q.js} +6 -6
- package/{docUpdateCommands-6DFWGPVG.js → docUpdateCommands-MPTM6267.js} +38 -36
- package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
- package/{handleSendMessageAction-FCEFFAV4.js → handleSendMessageAction-VPKVNKBU.js} +83 -41
- package/{hostCredentialCreate-YEWCAMZN.js → hostCredentialCreate-K56HWPNY.js} +86 -81
- package/index.js +23 -11
- package/{localDialogRead-CIOTQM5T.js → localDialogRead-NXILOV3T.js} +1 -1
- package/{localRuntimeAdapter-Z22ZOZRY.js → localRuntimeAdapter-KVU72FWT.js} +84 -79
- package/{localRuntimeAuthority-TYHQCTZN.js → localRuntimeAuthority-QKWTPBQQ.js} +13 -3
- package/{localRuntimeDb-BO7IVWAZ.js → localRuntimeDb-3CIC4SKC.js} +1 -1
- package/{machineCommands-PT5OJ36V.js → machineCommands-C3O5RKNJ.js} +85 -80
- package/{machineWsRunDispatch-DQVNBSVE.js → machineWsRunDispatch-ZLART7ZA.js} +85 -80
- package/{markdownToSlate-KIYM7B3P.js → markdownToSlate-PXYAIBVL.js} +1 -1
- package/{mcpLocalAuthorizeCommand-GO6AYT63.js → mcpLocalAuthorizeCommand-LO7E4VQ5.js} +15 -11
- package/{memberThunks-JFYC4Z5L.js → memberThunks-7DNR6DRD.js} +7 -7
- package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
- package/package.json +2 -1
- package/{projectArchive-4XUC5SLF.js → projectArchive-UBJFYRL7.js} +23 -23
- package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
- package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
- package/{read-BRZHXUJ6.js → read-Z2JOK6F6.js} +3 -3
- package/{readDocTool-N7RVFQEE.js → readDocTool-3QYSVWBT.js} +1 -1
- package/{readlineWorkspace-7U5QM3OM.js → readlineWorkspace-TSIYF7C6.js} +655 -248
- package/{removeDialogAgentAction-J7XU7OUX.js → removeDialogAgentAction-LRKDU4RI.js} +7 -7
- package/{runAgentClientLoop-7D7UCAS2.js → runAgentClientLoop-YAHGOWXN.js} +48 -48
- package/{runtimeDoctorCommands-RDRJXMXC.js → runtimeDoctorCommands-QGZSKNSE.js} +14 -11
- package/{secretCommands-2FEMRUFM.js → secretCommands-BXAQEOES.js} +2 -2
- package/{setDialogExtraReferencesAction-Q4V2ZZW2.js → setDialogExtraReferencesAction-KIITOCFP.js} +6 -6
- package/{setPrimaryDialogAgentAction-742H5S6T.js → setPrimaryDialogAgentAction-Y36PKFFB.js} +7 -7
- package/{settingThunks-IHXUF276.js → settingThunks-YQNG5L6K.js} +5 -5
- package/{spaceCommands-WCLD36WH.js → spaceCommands-P644AAZZ.js} +37 -35
- package/{streamAgentChatTurn-DVTOINT3.js → streamAgentChatTurn-5CSYAUAY.js} +81 -77
- package/{switchDialogAgentAction-HLDLHRRA.js → switchDialogAgentAction-U2VLPPVO.js} +5 -5
- package/{tools-BOPINT5S.js → tools-UZ3CDIR2.js} +38 -38
- package/{tuiRestart-5F2APN66.js → tuiRestart-GF4DGAAN.js} +7 -7
- package/{tuiSummaryLlmCaller-TM5BU73J.js → tuiSummaryLlmCaller-HROLGN4F.js} +13 -13
- package/{updateCommands-FBYA5WVG.js → updateCommands-BZ4YDHNM.js} +3 -3
- package/{updateDialogTitleAction-S76PUCLQ.js → updateDialogTitleAction-53XCCDK2.js} +20 -20
- package/{usageCommand-L4OFWXEU.js → usageCommand-XVJ7ZUTM.js} +2 -2
- package/{usageRebuildCommand-7JR33UHS.js → usageRebuildCommand-NK6S3D4J.js} +3 -3
- package/{windowsSelfUpdate-M4V77OUB.js → windowsSelfUpdate-4BAXX7C3.js} +2 -2
- package/{workloadLifecycle-ZCSQCHG3.js → workloadLifecycle-DYX5ZMAT.js} +2 -2
- package/chunk-FGHEF6WI.js +0 -34
- package/{chunk-ANUP75N2.js → chunk-2E4BYAUE.js} +0 -0
- package/{chunk-CDIRKCPD.js → chunk-6HL6E7ZD.js} +152 -152
|
@@ -2384,7 +2384,7 @@ var xhrUploadRequest = (url, formData, state, onProgress, signal) => new Promise
|
|
|
2384
2384
|
xhr.send(formData);
|
|
2385
2385
|
});
|
|
2386
2386
|
var noloUploadRequest = async (server, uploadConfig, state, signal, onProgress) => {
|
|
2387
|
-
const { file, metadata, customKey, userId } = uploadConfig;
|
|
2387
|
+
const { file, metadata, customKey, userId, ownerType, spaceId } = uploadConfig;
|
|
2388
2388
|
const googleSession = isGoogleAuthoritySession(selectIdentityToken(state));
|
|
2389
2389
|
try {
|
|
2390
2390
|
googleSessionRequestToken(selectIdentityToken(state) ?? void 0, server);
|
|
@@ -2413,6 +2413,12 @@ var noloUploadRequest = async (server, uploadConfig, state, signal, onProgress)
|
|
|
2413
2413
|
if (userId) {
|
|
2414
2414
|
formData.append("userId", userId);
|
|
2415
2415
|
}
|
|
2416
|
+
if (ownerType) {
|
|
2417
|
+
formData.append("ownerType", ownerType);
|
|
2418
|
+
}
|
|
2419
|
+
if (spaceId) {
|
|
2420
|
+
formData.append("spaceId", spaceId);
|
|
2421
|
+
}
|
|
2416
2422
|
if (onProgress && !googleSession && typeof XMLHttpRequest !== "undefined") {
|
|
2417
2423
|
const result = await xhrUploadRequest(
|
|
2418
2424
|
server + `${API_ENDPOINTS.DATABASE}/upload`,
|
|
@@ -2423,7 +2429,7 @@ var noloUploadRequest = async (server, uploadConfig, state, signal, onProgress)
|
|
|
2423
2429
|
);
|
|
2424
2430
|
if (!result.ok) {
|
|
2425
2431
|
console.error(
|
|
2426
|
-
`Upload request failed for ${customKey} on ${server}: HTTP ${result.status}`
|
|
2432
|
+
`Upload request failed for ${customKey} on ${server}: HTTP ${result.status}` + (ownerType === "space" ? " (space ownership claim rejected: the Space may not be synced to this server, or you are not a member there)" : "")
|
|
2427
2433
|
);
|
|
2428
2434
|
}
|
|
2429
2435
|
return result.ok;
|
|
@@ -2443,7 +2449,7 @@ var noloUploadRequest = async (server, uploadConfig, state, signal, onProgress)
|
|
|
2443
2449
|
);
|
|
2444
2450
|
if (!response.ok) {
|
|
2445
2451
|
console.error(
|
|
2446
|
-
`Upload request failed for ${customKey} on ${server}: HTTP ${response.status}`
|
|
2452
|
+
`Upload request failed for ${customKey} on ${server}: HTTP ${response.status}` + (ownerType === "space" ? " (space ownership claim rejected: the Space may not be synced to this server, or you are not a member there)" : "")
|
|
2447
2453
|
);
|
|
2448
2454
|
}
|
|
2449
2455
|
if (response.ok && googleSession && onProgress) onProgress(file.size, file.size);
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
upsertSSREntity,
|
|
3
3
|
write
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CO2NXG2J.js";
|
|
5
5
|
import {
|
|
6
6
|
getRuntimeServerContext,
|
|
7
7
|
resolveRecordAuthority
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZMFA2TLE.js";
|
|
9
9
|
import {
|
|
10
10
|
TIMEOUT,
|
|
11
11
|
asyncThunkCreator,
|
|
12
12
|
buildCreateSlice,
|
|
13
13
|
noloRequest
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YB5D2GK4.js";
|
|
15
15
|
import {
|
|
16
16
|
applyAgentSecretMigrationUpdates,
|
|
17
|
+
buildAgentApiKeyCredentialRef,
|
|
17
18
|
migrateAgentSecrets,
|
|
18
19
|
normalizeAgentRuntimeToolPolicy
|
|
19
20
|
} from "./chunk-USGHJSGO.js";
|
|
20
|
-
import {
|
|
21
|
-
createFileCredentialBroker
|
|
22
|
-
} from "./chunk-E6A5NHDH.js";
|
|
23
21
|
import {
|
|
24
22
|
asRecordOrEmpty
|
|
25
23
|
} from "./chunk-KX6YBIHG.js";
|
|
24
|
+
import {
|
|
25
|
+
createFileCredentialBroker
|
|
26
|
+
} from "./chunk-E6A5NHDH.js";
|
|
26
27
|
import {
|
|
27
28
|
isLevelNotFoundError
|
|
28
29
|
} from "./chunk-OW765XBU.js";
|
|
@@ -104,6 +105,13 @@ async function agentRequest(server, state, path, method, body) {
|
|
|
104
105
|
clearTimeout(timeout);
|
|
105
106
|
}
|
|
106
107
|
}
|
|
108
|
+
var AGENT_CHANNEL_FIELDS = ["provider", "apiSource", "apiKeyRef", "customProviderUrl"];
|
|
109
|
+
function clearQuotaOnAgentChannelChange(previous, saved) {
|
|
110
|
+
if (!AGENT_CHANNEL_FIELDS.some((field) => (previous[field] ?? void 0) !== (saved[field] ?? void 0))) return;
|
|
111
|
+
delete saved.quota;
|
|
112
|
+
delete saved.quotaExhaustion;
|
|
113
|
+
delete saved.nextAvailableAt;
|
|
114
|
+
}
|
|
107
115
|
async function updateAgentRecord(options) {
|
|
108
116
|
const { server, state, dbKey, changes } = options;
|
|
109
117
|
if (dbKey.startsWith("agent-local-")) {
|
|
@@ -129,6 +137,7 @@ async function updateAgentRecord(options) {
|
|
|
129
137
|
return result2;
|
|
130
138
|
};
|
|
131
139
|
const saved = merge(previous, { ...changes, isPublic: false, userId: "local" });
|
|
140
|
+
clearQuotaOnAgentChannelChange(previous, saved);
|
|
132
141
|
saved.updatedAt = Date.now();
|
|
133
142
|
try {
|
|
134
143
|
await options.localDb.put(dbKey, saved);
|
|
@@ -261,6 +270,7 @@ var migrateRawApiKeyForAgent = async (args) => {
|
|
|
261
270
|
var createSliceWithThunks = buildCreateSlice({
|
|
262
271
|
creators: { asyncThunk: asyncThunkCreator }
|
|
263
272
|
});
|
|
273
|
+
var pendingCreateIds = /* @__PURE__ */ new WeakMap();
|
|
264
274
|
var initialState = {};
|
|
265
275
|
var normalizeAgentReferences = (references) => {
|
|
266
276
|
if (!Array.isArray(references)) return [];
|
|
@@ -342,6 +352,9 @@ var processAgentUpdateChanges = (data, userId, previousAgent) => {
|
|
|
342
352
|
if ("apiKey" in data) {
|
|
343
353
|
changes.apiKey = (data.apiKey ?? "").trim();
|
|
344
354
|
}
|
|
355
|
+
if (data.enableThinking !== void 0) {
|
|
356
|
+
changes.enableThinking = data.enableThinking;
|
|
357
|
+
}
|
|
345
358
|
if ("hasVision" in data && data.hasVision !== void 0) {
|
|
346
359
|
changes.hasVision = !!data.hasVision;
|
|
347
360
|
}
|
|
@@ -458,7 +471,7 @@ var slice = createSliceWithThunks({
|
|
|
458
471
|
const overrides = {};
|
|
459
472
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
460
473
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
461
|
-
const { _executeModel } = await import("./_executeModel-
|
|
474
|
+
const { _executeModel } = await import("./_executeModel-D6G3B45S.js");
|
|
462
475
|
return _executeModel(
|
|
463
476
|
{
|
|
464
477
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -479,7 +492,7 @@ var slice = createSliceWithThunks({
|
|
|
479
492
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
480
493
|
*/
|
|
481
494
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
482
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
495
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-YAHGOWXN.js");
|
|
483
496
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
484
497
|
{
|
|
485
498
|
agentKey: args.agentKey,
|
|
@@ -495,7 +508,7 @@ var slice = createSliceWithThunks({
|
|
|
495
508
|
* 聊天轮次流式 Agent 调用
|
|
496
509
|
*/
|
|
497
510
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
498
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
511
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-5CSYAUAY.js");
|
|
499
512
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
500
513
|
}),
|
|
501
514
|
/**
|
|
@@ -505,11 +518,19 @@ var slice = createSliceWithThunks({
|
|
|
505
518
|
* - 返回完整 Agent 对象(包含 id / meta 字段)
|
|
506
519
|
*/
|
|
507
520
|
createAgent: create.asyncThunk(
|
|
508
|
-
async ({ userId, formData, spaceId }, thunkApi) => {
|
|
521
|
+
async ({ userId, formData, spaceId, createAttempt }, thunkApi) => {
|
|
509
522
|
const effectiveUserId = asOptionalTrimmedString(userId) ?? "local";
|
|
510
523
|
const processed = processAgentCreateForm(formData, effectiveUserId);
|
|
511
524
|
const now = Date.now();
|
|
512
|
-
const
|
|
525
|
+
const previous = createAttempt && pendingCreateIds.get(createAttempt);
|
|
526
|
+
const pending = previous?.owner === effectiveUserId ? previous : {
|
|
527
|
+
owner: effectiveUserId,
|
|
528
|
+
id: ulid(),
|
|
529
|
+
usesPerAgentRef: false
|
|
530
|
+
};
|
|
531
|
+
pending.usesPerAgentRef ||= formData.credentialSynced === true;
|
|
532
|
+
if (createAttempt) pendingCreateIds.set(createAttempt, pending);
|
|
533
|
+
const { id } = pending;
|
|
513
534
|
const privateKey = createAgentKey.private(effectiveUserId, id);
|
|
514
535
|
const publicKey = createAgentKey.public(id);
|
|
515
536
|
let agent = {
|
|
@@ -544,9 +565,20 @@ var slice = createSliceWithThunks({
|
|
|
544
565
|
agentKey: privateKey,
|
|
545
566
|
apiKey: createRawApiKey,
|
|
546
567
|
apiKeyRef: agent.apiKeyRef,
|
|
547
|
-
credentialRef: agent.credentialRef
|
|
568
|
+
credentialRef: pending.usesPerAgentRef ? buildAgentApiKeyCredentialRef(privateKey) : agent.credentialRef
|
|
548
569
|
});
|
|
549
570
|
}
|
|
571
|
+
if (agent.credentialSynced === true) {
|
|
572
|
+
const ctx = getRuntimeServerContext(thunkApi.getState());
|
|
573
|
+
const ref = agent.credentialRef;
|
|
574
|
+
if (!createRawApiKey || !ctx.currentServer || !ctx.currentToken || !ref?.startsWith("api-key:") || !await pushServerSyncedCredential(
|
|
575
|
+
{ currentServer: ctx.currentServer, authToken: ctx.currentToken },
|
|
576
|
+
ref,
|
|
577
|
+
createRawApiKey
|
|
578
|
+
)) {
|
|
579
|
+
throw new Error("agent_credential_sync_failed");
|
|
580
|
+
}
|
|
581
|
+
}
|
|
550
582
|
await thunkApi.dispatch(
|
|
551
583
|
write({
|
|
552
584
|
data: agent,
|
|
@@ -567,21 +599,6 @@ var slice = createSliceWithThunks({
|
|
|
567
599
|
})
|
|
568
600
|
).unwrap();
|
|
569
601
|
}
|
|
570
|
-
if (agent.credentialSynced && createRawApiKey) {
|
|
571
|
-
const ctx = getRuntimeServerContext(thunkApi.getState());
|
|
572
|
-
const credentialRef = agent.credentialRef;
|
|
573
|
-
if (ctx.currentToken && credentialRef) {
|
|
574
|
-
try {
|
|
575
|
-
await pushServerSyncedCredential(
|
|
576
|
-
{ currentServer: ctx.currentServer ?? "", authToken: ctx.currentToken },
|
|
577
|
-
credentialRef,
|
|
578
|
-
createRawApiKey
|
|
579
|
-
);
|
|
580
|
-
} catch (error) {
|
|
581
|
-
console.error("[agent-credential-sync] push failed", error instanceof Error ? error.message : "unknown error");
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
602
|
try {
|
|
586
603
|
const { localFirstLog } = await import("./localFirstLog-OIETGK66.js");
|
|
587
604
|
localFirstLog("agent.create.done", {
|
|
@@ -595,6 +612,7 @@ var slice = createSliceWithThunks({
|
|
|
595
612
|
});
|
|
596
613
|
} catch {
|
|
597
614
|
}
|
|
615
|
+
if (createAttempt) pendingCreateIds.delete(createAttempt);
|
|
598
616
|
return agent;
|
|
599
617
|
}
|
|
600
618
|
),
|
|
@@ -582,42 +582,41 @@ function shouldFetchAgentRuntimeRecordRemotely(dbKey) {
|
|
|
582
582
|
}
|
|
583
583
|
|
|
584
584
|
// packages/ai/agent/dispatchSelectionPolicy.ts
|
|
585
|
+
var DISPATCH_TIER_RANK = { easy: 0, normal: 1, complex: 2, extreme: 3 };
|
|
585
586
|
var MODEL_TIERS = [
|
|
586
587
|
{
|
|
587
588
|
tier: "extreme",
|
|
588
|
-
models: ["
|
|
589
|
-
pattern: /^(?:gpt-6(?:[.-]2)?-astra|claude-opus-5[.-]5|gemini-4-neon)(?:$|[-@])/
|
|
589
|
+
models: ["Claude Fable 5.1/5.2\u3001Opus 5.5", "GPT-6/6.2 Astra", "Gemini 4 Neon/Carbon"],
|
|
590
|
+
pattern: /^(?:gpt-6(?:[.-]2)?-astra|claude-(?:fable-5[.-][12]|opus-5[.-]5)|gemini-4-(?:neon|carbon))(?:$|[-@])/
|
|
590
591
|
},
|
|
591
592
|
{
|
|
592
593
|
tier: "complex",
|
|
593
594
|
models: [
|
|
594
|
-
"GPT-6.2 Sol",
|
|
595
|
-
"GPT-6.1 Sol",
|
|
596
|
-
"Gemini 4 Carbon",
|
|
597
|
-
"Gemini 4 Argon",
|
|
598
|
-
"Claude Fable 5.1",
|
|
595
|
+
"GPT-5.6/6/6.1/6.2 Sol\u30015.6/6.1 Terra",
|
|
599
596
|
"Claude Sonnet 5.5",
|
|
600
|
-
"
|
|
601
|
-
"Kimi K3",
|
|
602
|
-
"
|
|
597
|
+
"Gemini 4 Hydrogen/Argon\u30012.5 Pro",
|
|
598
|
+
"Kimi K3/K3.1 Pro",
|
|
599
|
+
"DeepSeek V4 Pro"
|
|
603
600
|
],
|
|
604
|
-
pattern: /^(?:gpt-6[.-](?:
|
|
601
|
+
pattern: /^(?:gpt-(?:(?:5[.-]6|6(?:[.-][12])?)-sol|(?:5[.-]6|6[.-]1)-terra)|gemini-(?:4-(?:hydrogen|argon)|2[.-]5-pro)|claude-sonnet-5[.-]5|kimi-k3(?:[.-]1-pro)?|k3(?:-256k)?|deepseek-v4-pro)(?:$|[-@])/
|
|
605
602
|
},
|
|
606
603
|
{
|
|
607
604
|
tier: "normal",
|
|
608
605
|
models: [
|
|
609
|
-
"
|
|
606
|
+
"Claude Haiku 4.5/5.5",
|
|
610
607
|
"DeepSeek Flash\uFF08\u5404\u4EE3\uFF09",
|
|
611
|
-
"
|
|
612
|
-
"
|
|
613
|
-
"
|
|
608
|
+
"GLM 5.3/Flash",
|
|
609
|
+
"MiMo V2.6 Pro",
|
|
610
|
+
"Grok 4.6/4.7",
|
|
611
|
+
"Gemini 3.6-3.8 Flash",
|
|
612
|
+
"LongCat 2.5"
|
|
614
613
|
],
|
|
615
|
-
pattern: /^(?:
|
|
614
|
+
pattern: /^(?:claude-haiku-[45][.-]5|deepseek-(?:[a-z0-9.-]+-)?flash|glm-5[.-]3|mimo-v2[.-]6-pro|grok-4[.-][67]|gemini-3[.-][678]-flash|longcat-2[.-]5)(?:$|[-@])/
|
|
616
615
|
},
|
|
617
616
|
{
|
|
618
617
|
tier: "easy",
|
|
619
|
-
models: ["MiniMax M3.1 Flash", "GPT-6 Luna"],
|
|
620
|
-
pattern: /^(?:
|
|
618
|
+
models: ["MiniMax M3.1 Flash", "GPT-5.6/6 Luna"],
|
|
619
|
+
pattern: /^(?:minimax-m3[.-]1-flash|gpt-(?:5[.-]6|6)-luna)(?:$|[-@])/
|
|
621
620
|
}
|
|
622
621
|
];
|
|
623
622
|
var MODEL_TIER_GUIDANCE = MODEL_TIERS.map(
|
|
@@ -628,6 +627,7 @@ var DIFFICULTY_GRADING_TIERS = ` - \u56DB\u6863\uFF1Aeasy\uFF1D\u6839\u56E0\u
|
|
|
628
627
|
function resolveModelTier(model) {
|
|
629
628
|
if (typeof model !== "string") return "unknown";
|
|
630
629
|
const id = model.trim().toLowerCase().split("/").at(-1).replace(/\s+/g, "-");
|
|
630
|
+
if (id.includes("-image") || id.startsWith("nano-banana")) return "unknown";
|
|
631
631
|
return MODEL_TIERS.find(({ pattern }) => pattern.test(id))?.tier ?? "unknown";
|
|
632
632
|
}
|
|
633
633
|
function normalizeDispatchDifficulty(value) {
|
|
@@ -642,13 +642,16 @@ function normalizeSelectionReason(value) {
|
|
|
642
642
|
const trimmed = value.trim();
|
|
643
643
|
return trimmed.length > 0 ? trimmed : void 0;
|
|
644
644
|
}
|
|
645
|
+
function requiresSelectionReason(difficulty, modelTier) {
|
|
646
|
+
return modelTier !== "unknown" && DISPATCH_TIER_RANK[modelTier] - DISPATCH_TIER_RANK[difficulty] >= 2;
|
|
647
|
+
}
|
|
645
648
|
function checkDispatchSelection(input) {
|
|
646
649
|
const dimension = input.dimension === "design_frontend" || input.dimension === "writing" ? input.dimension : "general";
|
|
647
650
|
const difficulty = normalizeDispatchDifficulty(input.difficulty);
|
|
648
651
|
const modelTier = resolveModelTier(input.model);
|
|
649
652
|
const status = modelTier === "unknown" ? "unknown" : modelTier === difficulty ? "matched" : "mismatch";
|
|
650
653
|
const selectionReason = normalizeSelectionReason(input.selectionReason);
|
|
651
|
-
const message = status === "matched" ? void 0 : status === "unknown" ? "\u6A21\u578B\u6863\u4F4D\u672A\u77E5\uFF1B\u6309\u9886\u57DF\u4E0E\u53EF\u7528\u6027\u5224\u65AD\uFF0C\u4E0D\u963B\u65AD\uFF0C\u5DF2\u542F\u52A8\u52FF\u81EA\u52A8\u91CD\u6D3E\u3002" : selectionReason ? "\u6863\u4F4D\u4E0E\u96BE\u5EA6\u4E0D\u4E00\u81F4\uFF1B\u5DF2\u7ED9\u51FA\u8DE8\u6863\u7406\u7531\uFF0C\u4E0D\u963B\u65AD\uFF0C\u5DF2\u542F\u52A8\u52FF\u81EA\u52A8\u91CD\u6D3E\u3002" : "\
|
|
654
|
+
const message = status === "matched" ? void 0 : status === "unknown" ? "\u6A21\u578B\u6863\u4F4D\u672A\u77E5\uFF1B\u6309\u9886\u57DF\u4E0E\u53EF\u7528\u6027\u5224\u65AD\uFF0C\u4E0D\u963B\u65AD\uFF0C\u5DF2\u542F\u52A8\u52FF\u81EA\u52A8\u91CD\u6D3E\u3002" : selectionReason ? "\u6863\u4F4D\u4E0E\u96BE\u5EA6\u4E0D\u4E00\u81F4\uFF1B\u5DF2\u7ED9\u51FA\u8DE8\u6863\u7406\u7531\uFF0C\u4E0D\u963B\u65AD\uFF0C\u5DF2\u542F\u52A8\u52FF\u81EA\u52A8\u91CD\u6D3E\u3002" : requiresSelectionReason(difficulty, modelTier) ? "\u6A21\u578B\u9AD8\u51FA\u4EFB\u52A1\u96BE\u5EA6\u81F3\u5C11\u4E24\u6863\uFF1B\u542F\u52A8\u524D\u9700\u5728 selectionReason \u8BF4\u660E\u7406\u7531\u3002" : "\u6863\u4F4D\u4E0E\u96BE\u5EA6\u4E0D\u4E00\u81F4\uFF1B\u4E0D\u963B\u65AD\uFF0C\u5DF2\u542F\u52A8\u52FF\u81EA\u52A8\u91CD\u6D3E\u3002";
|
|
652
655
|
return {
|
|
653
656
|
dimension,
|
|
654
657
|
difficulty,
|
|
@@ -660,11 +663,11 @@ function checkDispatchSelection(input) {
|
|
|
660
663
|
}
|
|
661
664
|
function checkDispatchSelectionAdmission(input) {
|
|
662
665
|
const check = checkDispatchSelection(input);
|
|
663
|
-
if (check.
|
|
666
|
+
if (!requiresSelectionReason(check.difficulty, check.modelTier) || check.selectionReason)
|
|
664
667
|
return { ok: true, check };
|
|
665
668
|
const error = {
|
|
666
669
|
code: "selection_reason_required",
|
|
667
|
-
message: `\u8DE8\u6863\u9009\u62E9\u7F3A\u5C11 selectionReason\uFF1A\u6863\u4F4D ${check.modelTier} \
|
|
670
|
+
message: `\u8DE8\u6863\u9009\u62E9\u7F3A\u5C11 selectionReason\uFF1A\u6A21\u578B\u6863\u4F4D ${check.modelTier} \u9AD8\u51FA\u4EFB\u52A1\u96BE\u5EA6 ${check.difficulty} \u81F3\u5C11\u4E24\u6863\uFF0C\u8BF7\u8865\u5145\u672C\u6B21\u8DE8\u6863\u7684\u5177\u4F53\u7406\u7531\u540E\u518D\u542F\u52A8\u3002`,
|
|
668
671
|
hint: "\u8865\u4E00\u53E5\u672C\u6B21\u4E3A\u4EC0\u4E48\u8FD9\u6837\u8DE8\u6863\uFF08\u5982\u9886\u57DF\u4F18\u52BF\u3001\u7528\u6237\u660E\u786E\u6307\u5B9A\uFF09\u5373\u53EF\uFF1B\u53EA\u6821\u9A8C\u7406\u7531\u662F\u5426\u5B58\u5728\uFF0C\u4E0D\u4EE3\u8868\u5DF2\u6838\u5B9E\u7528\u6237\u6388\u6743\u3001\u989D\u5EA6/\u8D39\u7528\u6743\u9650\u6216\u7F51\u7EDC\u53EF\u7528\u6027\u3002"
|
|
669
672
|
};
|
|
670
673
|
return { ok: false, check, error };
|
|
@@ -726,7 +729,7 @@ ${AGENT_SELECTION_PRIORITY_GROUPS.map((group, index) => ` (${index + 1})
|
|
|
726
729
|
\u6B64\u6392\u5E8F\u662F\u5019\u9009\u4F18\u5148\u7EA7\u5206\u7EC4\uFF08\u4E0D\u662F\u6A21\u578B\u80FD\u529B tier\uFF09\uFF0C\u4E0D\u4EE3\u8868\u300C\u6392\u7B2C\u4E00\u7684\u5C31\u8BE5\u9009\u300D\uFF1B\u7ED3\u5408\u4E0B\u8FF0\u9886\u57DF\u5339\u914D\u3001\u6863\u4F4D\u53C2\u8003\u4E0E\u5F53\u6B21\u53EF\u7528\u6027\u6311\u9009\uFF08reviewer \u89C1\u300Creviewer \u9009\u4EBA\u300D\uFF09\u3002
|
|
727
730
|
- \u6536\u85CF\u4F18\u5148\u786C\u95E8\uFF08\u8986\u76D6\u9AD8\u590D\u6742\u5EA6\u6863\u6210\u672C\u95E8\uFF09\uFF1A\u5B58\u5728\u53EF\u7528\u4E14\u9002\u5408\u4EFB\u52A1\u3001requiresPaidApproval=false \u7684\u6536\u85CF\u5019\u9009\u65F6\uFF0C\u4E0D\u6539\u6D3E\u9700\u5E73\u53F0\u8D39\u7528\u786E\u8BA4\u7684\u5019\u9009\uFF1B\u53EA\u6709\u6536\u85CF Agent \u786E\u8BA4\u4E0D\u53EF\u7528\u540E\u624D\u5141\u8BB8\u6D3E\u5E73\u53F0 Agent\uFF0C\u4E14\u5F53\u6B21\u8BF4\u660E\u5E76\u83B7\u8D39\u7528\u6388\u6743\u3002favorite + platform_credits \u53EA\u8868\u793A\u504F\u597D\uFF0C\u4E0D\u4EE3\u8868\u514D\u8D39\u6216\u5DF2\u6388\u6743\uFF1B\u8D39\u7528\u5224\u636E\u89C1\u4E0A\u3002\u6BCF\u6B21 startAgentRun \u90FD\u521B\u5EFA\u72EC\u7ACB\u7684 run/dialog\uFF0C\u5E76\u884C\u7528\u5404\u81EA runId\u3001\u540C\u4E00 batchId\u3002
|
|
728
731
|
- \u5339\u914D\u53C2\u8003\uFF1A\u6309\u4EFB\u52A1\u6240\u9700\u80FD\u529B\u7B5B tools \u5B57\u6BB5\uFF1B\u540C\u6863\u5019\u9009\u4F18\u5148\u6210\u672C\u4F4E\uFF08\u4F4E inputPrice\uFF09\u6216\u8D70\u7528\u6237\u79C1\u6709\u51ED\u636E\u7684\u901A\u9053\u3002tools \u5B57\u6BB5\u53EA\u53CD\u6620\u989D\u5916\u80FD\u529B\uFF0C\u4E0D\u53CD\u6620 coding \u80FD\u529B\u2014\u2014\u4EE3\u7801\u5DE5\u5177\u7531 host \u81EA\u52A8\u6CE8\u5165\uFF0Ctools=[] \u4E0D\u4EE3\u8868\u4E0D\u80FD\u5199\u4EE3\u7801\uFF0C\u4E0D\u8981\u636E\u6B64\u6392\u9664\u5019\u9009\u3002
|
|
729
|
-
- reset-aware economics\
|
|
732
|
+
- reset-aware economics\uFF1A\u4F18\u5148\u53C2\u8003 listAgents \u6309\u8BA2\u9605\u91CD\u7F6E\u7A97\u53E3\u6216\u6309\u91CF\u5355\u4EF7\u8BA1\u7B97\u7684 tierHints\uFF0C\u4EC5\u4F5C\u540C\u6863\u3001\u53EF\u7528\u4E14\u65E0\u9700\u6263\u8D39\u786E\u8BA4\u7684\u7ECF\u6D4E\u504F\u597D\uFF1B\u4E0D\u8986\u76D6\u6536\u85CF\u786C\u95E8\u3001\u9886\u57DF\u80DC\u4EFB\u6216\u6263\u8D39\u6388\u6743\u3002
|
|
730
733
|
- isOwned=true\u3001isOAuth=true \u6216 apiSource="custom" \u4E0D\u8BC1\u660E\u8D39\u7528\u6388\u6743\u3002
|
|
731
734
|
- \u514D\u8BE2\u95EE\u8FB9\u754C\uFF08\u6307\u9488\uFF09\uFF1A\u6392\u5E8F\u540E\u4E0D\u4E3A\u300C\u9009\u8C01\u300D\u518D\u95EE\u7528\u6237\uFF1B\u4EC5\u5728 requiresPaidApproval=false \u7684\u5019\u9009\u95F4\u9759\u9ED8\u6362\u4EE3\uFF08\u4E0D\u5F97\u56E0\u6B64\u9759\u9ED8\u6539\u6D3E platform_credits \u5F52\u5C5E\u4E14\u9700\u786E\u8BA4\u7684\u901A\u9053\uFF09\u3002\u5E73\u53F0\u8D39\u7528\u6388\u6743\u3001429 \u6539\u6D3E\u544A\u77E5\u4E0E\u672A\u77E5\u8D39\u7528\u5148\u95EE\u7167\u65E7\uFF0C\u89C1\u540C\u6CE8\u5165\u5B89\u5168\u95E8\u3002
|
|
732
735
|
- \u89C4\u5212\u5373\u9009\u4EBA\uFF1A\u8DE8\u6863\u5199\u5177\u4F53 selectionReason\uFF08\u7528\u6237\u6307\u5B9A/\u9886\u57DF\u4F18\u52BF/\u771F\u5B9E\u901A\u9053\u5931\u8D25/\u65E0\u5408\u9002\u5019\u9009\u7B49\uFF09\uFF0C\u4FDD\u7559\u771F\u5B9E\u96BE\u5EA6\u3001\u4E0D\u6539\u5199 difficulty \u53BB\u8FC1\u5C31\u73B0\u6210\u901A\u9053\uFF1B\u53EA\u6821\u9A8C\u7406\u7531\u5B58\u5728\u3001\u4E0D\u4F2A\u79F0\u5DF2\u6838\u5B9E\u4E8B\u5B9E\uFF0C\u4E0D\u987B\u5148\u5236\u9020\u4F4E\u6863\u5931\u8D25\uFF0C\u4E5F\u4E0D\u4F5C\u4E3A\u963B\u65AD\u6216\u81EA\u52A8\u53D6\u6D88\u6D3E\u53D1\u7684\u6761\u4EF6\u3002
|
|
@@ -737,8 +740,9 @@ ${MODEL_TIER_GUIDANCE}
|
|
|
737
740
|
\u56FE\u50CF\u6A21\u578B\u53EA\u7528\u4E8E\u56FE\u50CF\u4EFB\u52A1\uFF0C\u4E0D\u7528\u4E8E\u4EE3\u7801 / \u6587\u672C\u4EFB\u52A1\u3002
|
|
738
741
|
\u6A21\u578B\u6863\u4F4D\u53EA\u53D6\u5171\u4EAB\u4EBA\u5DE5\u6620\u5C04\uFF1B\u672A\u77E5\u6A21\u578B\u4FDD\u6301 unknown \u4E14\u4ECD\u53EF\u7528\uFF0C\u4E0D\u7531 LLM \u81EA\u5C01\u6863\u4F4D\uFF0C\u4E0D\u9ED8\u8BA4\u9876\u6863\u3001\u4E0D\u5411\u7528\u6237\u7D22\u8981\u5B9A\u6863\u3002
|
|
739
742
|
\u9886\u57DF\u5177\u4F53\u504F\u597D\u4EC5\u9002\u7528\u4E8E\u5BF9\u5E94 dimension\uFF1Adesign_frontend\uFF08\u8BBE\u8BA1 / \u524D\u7AEF\uFF09\u9886\u57DF\u5185\u9ED8\u8BA4\u6A21\u578B\u5BB6\u65CF\u504F\u597D\u4E3A Claude \u2192 Gemini \u2192 GPT\uFF1B\u6309\u4EFB\u52A1 difficulty \u4E0E\u5171\u4EAB\u4EBA\u5DE5\u6A21\u578B\u6863\u4F4D\u6620\u5C04\uFF0C\u5728\u504F\u597D\u5BB6\u65CF\u4E2D\u9009\u80DC\u4EFB\u7684\u5408\u9002\u6863\u4F4D\uFF0C\u5BB6\u65CF\u987A\u5E8F\u4E0D\u4EE3\u8868\u667A\u80FD\u6863\u4F4D\u6392\u540D\u3002general\uFF08\u901A\u7528\uFF09\u4E0D\u9002\u7528\u6B64\u5BB6\u65CF\u987A\u5E8F\uFF1Bwriting\uFF08\u5199\u4F5C\uFF09\u4ECD\u4E3A Gemini \u4F18\u5148\u4E8E\u5176\u4ED6\u6A21\u578B\u3002\u672A\u77E5\u6863\u4F4D\u4FDD\u6301 unknown\uFF0C\u4E0D\u63A8\u5B9A\u5BB6\u65CF\u5185\u80FD\u529B\u6392\u540D\u3002\u5176\u4F59\u6A21\u578B\u5728\u5BF9\u5E94\u7EF4\u5EA6\u672A\u77E5\uFF0C\u4E0D\u63A8\u5B9A\u5B8C\u6574\u6392\u540D\u3002
|
|
743
|
+
\u540C\u6863\u53EF\u7528\u4E14\u65E0\u9700\u5E73\u53F0\u6263\u8D39\u65F6\uFF1A\u72EC\u7ACB\u5BA1\u67E5/\u5B89\u5168\u5951\u7EA6\u6311\u523A\u504F\u4E25\u82DB GPT\uFF1B\u524D\u7AEF\u8BBE\u8BA1/\u7CBE\u7EC6\u91CD\u6784\u504F Claude\uFF1B\u5168\u5C40\u7EDF\u7B79/\u957F\u4E0A\u4E0B\u6587\u4E32\u8054\u504F Gemini\u3002
|
|
740
744
|
\u9886\u57DF\u504F\u597D\u53EF\u4F5C\u4E3A\u8DE8\u6863\u9009\u62E9\u7406\u7531\uFF0C\u4E0D\u8868\u793A\u4E0D\u80FD\u6362\u6863\uFF1B\u504F\u597D\u4E0D\u8986\u76D6\u771F\u5B9E\u80FD\u529B\u9650\u5236\u3001\u8D39\u7528\u6388\u6743\u3001\u4F5C\u8005\u56DE\u907F\u4E0E\u5F53\u6B21\u53EF\u7528\u6027\uFF0C\u4E0D\u5F97\u56E0\u4E3A\u300C\u8BBE\u8BA1\u4EFB\u52A1\u504F\u597D Opus\u300D\u5C31\u81EA\u52A8\u6D88\u8017\u5E73\u53F0\u79EF\u5206\u3002
|
|
741
|
-
\u5DE5\u5177\u4EC5\
|
|
745
|
+
\u5DE5\u5177\u4EC5\u5347 \u22652 \u6863\u987B\u5148\u6709 selectionReason\uFF0C\u5176\u4F59\u4E0D\u7B26\u53EA\u63D0\u9192\u3001\u7167\u5E38\u542F\u52A8\uFF0C\u4E0D\u5F3A\u5236\u9009\u4EBA\u3001\u4E0D\u81EA\u52A8\u53D6\u6D88\u91CD\u6D3E\uFF1B\u6D3E\u53D1 Agent \u81EA\u884C\u7ED3\u5408\u9886\u57DF\u4F18\u52BF\u3001\u771F\u5B9E\u989D\u5EA6/\u7F51\u7EDC\u4E0E\u5019\u9009\u53EF\u7528\u6027\u3001\u7528\u6237\u6307\u5B9A\u4F5C\u5224\u65AD\u3002\u901F\u5EA6\u89C4\u5219\u7EDF\u4E00\u89C1\u5E38\u9A7B\u300C\u6D3E\u53D1\u9009\u4EBA \xB7 \u53EF\u7528\u6027\u4E0E\u901F\u5EA6\u300D\uFF0C\u4E0D\u5F97\u636E\u901F\u5EA6\u63A8\u5BFC\u6A21\u578B\u6863\u4F4D\u3002
|
|
742
746
|
- \u53EF\u7528\u6027\u8BC1\u636E\uFF1A\u533A\u5206\u5F53\u6B21\u771F\u5B9E\u5931\u8D25\u3001\u9002\u7528\u4E14\u4ECD\u6709\u6548\u7684 quota\u3001\u8FC7\u671F\u53C2\u8003\u548C\u672A\u77E5\u3002\u89C4\u5212\u5217\u8868\u4E0E\u63A8\u8350\u4E0D\u6309\u51B7\u5374\u786C\u8FC7\u6EE4\uFF1B\u901A\u7528\u6267\u884C\u53EF\u7528\u4E0A\u9762\u7684\u6709\u6548 quota \u89C4\u5219\uFF1Breview \u81EA\u8EAB\u515C\u5E95\u4ECD\u987B\u5176\u4ED6\u5408\u89C4\u5019\u9009\u7684\u5F53\u6B21\u9519\u8BEF\u8BC1\u636E\uFF0C\u4E0D\u7528 quota \u6807\u6CE8\u66FF\u4EE3\u3002
|
|
743
747
|
- 429 \u9650\u6D41\u4E0E\u77E5\u60C5\u6743\u5951\u7EA6\uFF1A\u4EFB\u4F55\u7528\u6237\u79C1\u6709\u51ED\u636E\u4E0E\u81EA\u5EFA Agent\uFF08billingSource \u4E3A user_subscription / owner_subscription / user_api / local\uFF0C\u6216 isOwned=true\uFF09\u5728 listAgents \u7684 agents[].availabilityStatus \u4E3A rate_limited \u6216 quota_exhausted \u65F6\uFF0C\u7981\u6B62\u9759\u9ED8\u8DF3\u8FC7\uFF1B\u6539\u6D3E\u5E73\u53F0 Agent\uFF08\u6D88\u8017\u5E73\u53F0\u79EF\u5206\uFF09\u524D\u5FC5\u987B\u5728\u56DE\u590D\u4E2D\u544A\u77E5\u7528\u6237\uFF1A\u54EA\u4E2A\u8BA2\u9605/\u81EA\u5EFA agent \u9650\u6D41\u3001\u9884\u8BA1\u4F55\u65F6\u6062\u590D\uFF08nextAvailableAt\uFF09\u3001\u672C\u6B21\u5C06\u6263\u5E73\u53F0\u79EF\u5206\uFF1BavailabilityStatus \u4E0E nextAvailableAt \u4EC5\u662F\u53C2\u8003\u4FE1\u606F\uFF0C\u4E0D\u62E6\u6D3E\u53D1\uFF0C\u4E0D\u5F97\u4EC5\u51ED\u51B7\u5374\u6807\u6CE8\u6392\u9664\u5019\u9009\uFF1B\u7528\u6237\u4ECD\u53EF\u7167\u5E38\u6D3E\u53D1\u5E76\u83B7\u5F97\u4E0A\u6E38\u771F\u5B9E\u7ED3\u679C\u3002`;
|
|
744
748
|
|
|
@@ -1347,10 +1351,12 @@ var AGENT_THREAD_ACTIVE_STATUSES = ["pending", "running"];
|
|
|
1347
1351
|
var AGENT_THREAD_TERMINAL_STATUSES = ["done", "failed", "cancelled", "orphaned"];
|
|
1348
1352
|
|
|
1349
1353
|
export {
|
|
1354
|
+
DISPATCH_TIER_RANK,
|
|
1350
1355
|
DIFFICULTY_GRADING_ORDER,
|
|
1351
1356
|
DIFFICULTY_GRADING_TIERS,
|
|
1352
1357
|
resolveModelTier,
|
|
1353
1358
|
assertDispatchSelectionAdmission,
|
|
1359
|
+
resolveAgentSelectionPriority,
|
|
1354
1360
|
compareAgentSelection,
|
|
1355
1361
|
AGENT_SELECTION_PRIORITY_INSTRUCTIONS,
|
|
1356
1362
|
DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS,
|