nolo-cli 0.88.0-alpha.2 → 0.90.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/README.md +2 -2
- package/{_executeModel-S7KQX4XS.js → _executeModel-W26HVI75.js} +38 -38
- package/{action-JZ62BXLX.js → action-6DXQGJMX.js} +7 -7
- package/{addContentAction-2ETXWERA.js → addContentAction-I7VX5SAC.js} +5 -5
- package/{addDialogAgentAction-COSPGJ4K.js → addDialogAgentAction-OJSFV7DZ.js} +4 -4
- package/{agentDeleteCommand-J6Y2C5X2.js → agentDeleteCommand-XNFWCKBH.js} +25 -24
- package/{agentEmailCommands-TGZ5DJAB.js → agentEmailCommands-W3X3EJ3V.js} +53 -52
- package/{agentGrantCommands-R3VQEZJR.js → agentGrantCommands-YW6PQAQ2.js} +2 -2
- package/{agentListCommands-UIDWO3EG.js → agentListCommands-DFWFU6XO.js} +33 -26
- package/{agentMachineCommands-FPSZ6FJ4.js → agentMachineCommands-LMFOAEL4.js} +25 -24
- package/{agentProviderCommands-65ZC2WB4.js → agentProviderCommands-ZBYHGTGY.js} +87 -0
- package/{agentPullCommand-N7L2CT7L.js → agentPullCommand-GLOOXJ2E.js} +3 -3
- package/{agentRecordCommands-6SCONH5I.js → agentRecordCommands-FVVVCQFM.js} +51 -50
- package/{agentRunCommand-2IXI6Z2U.js → agentRunCommand-HTBVIBGV.js} +52 -51
- package/{agentRunControl-T44MESII.js → agentRunControl-XLGD3UZ5.js} +1 -1
- package/{agentRuntimeLocal-UYU2POZ7.js → agentRuntimeLocal-2JFG4HDU.js} +21 -20
- package/{agentSlice-J5XXG3H7.js → agentSlice-ZNLGFUB5.js} +5 -5
- package/{appDeleteCommands-BVSKDJNM.js → appDeleteCommands-2UN4N2NR.js} +25 -24
- package/{appDeployCommands-UTPULKP3.js → appDeployCommands-37D74KRR.js} +25 -24
- package/{appDeployStatusCommands-DKDE2ECO.js → appDeployStatusCommands-QBLWL2IA.js} +25 -24
- package/{appGetCommands-KT7A7JJQ.js → appGetCommands-6KXIDF2T.js} +25 -24
- package/{appListCommands-MTHRLBXS.js → appListCommands-G2WFGEWQ.js} +25 -24
- package/{authCommand-NNFLRLGJ.js → authCommand-V2DJ7DB7.js} +85 -19
- package/{authCommands-364ESL7K.js → authCommands-RGOGCPP6.js} +3 -3
- package/{builtinSkillRegistry-VXSNE7LM.js → builtinSkillRegistry-WBGYKIAZ.js} +5 -5
- package/{chatQueueReduxAdapter-6I4F5TQW.js → chatQueueReduxAdapter-XCJHIY3R.js} +17 -17
- package/{chunk-BXLB7DXE.js → chunk-2ADBVBEM.js} +98 -2
- package/{chunk-WKJC6UOK.js → chunk-2AYMFHUG.js} +4 -4
- package/{chunk-CADAR6QU.js → chunk-2F4VYGFW.js} +2 -2
- package/{chunk-C3FZR5EC.js → chunk-2F7RJC6L.js} +1 -1
- package/{chunk-IBT5GKZM.js → chunk-3CMTBX3X.js} +6 -6
- package/{chunk-T2EUOLNJ.js → chunk-3CR2LC6X.js} +1 -1
- package/{chunk-UMYXJWI3.js → chunk-3R5PH4IP.js} +1 -1
- package/{chunk-EVCXTAOR.js → chunk-4BYPU626.js} +294 -203
- package/{chunk-M67M3AK5.js → chunk-4DRWWIOL.js} +1 -1
- package/{chunk-KR3MGGC7.js → chunk-576IMUGH.js} +1 -1
- package/{chunk-MGRRXGZD.js → chunk-5DFFKASO.js} +3 -3
- package/{chunk-SENTM5XJ.js → chunk-5NMZNPTN.js} +5 -5
- package/{chunk-5XTOKQLW.js → chunk-5UTFL4QJ.js} +6 -2
- package/{chunk-5CEIOSBX.js → chunk-5V4NJHRM.js} +6 -6
- package/chunk-5ZUL4CUO.js +10 -0
- package/{chunk-XPMTSMUR.js → chunk-6BEA566T.js} +2 -2
- package/{chunk-KIAHQ37Z.js → chunk-6D6VBVEW.js} +2 -2
- package/{chunk-PP3LAL6G.js → chunk-7MYYE7WX.js} +23 -19
- package/{chunk-BQKN5ZHZ.js → chunk-A2C4AKKM.js} +1 -1
- package/{chunk-PBMUDRON.js → chunk-AQZRTHDZ.js} +1192 -44
- package/{chunk-AJHEFRGJ.js → chunk-ASGDO77C.js} +122 -1
- package/{chunk-2KDR4CWE.js → chunk-BYMV6QZG.js} +24 -1
- package/{chunk-WVXCW7DR.js → chunk-CLI4LFSM.js} +9 -4
- package/{chunk-HH65VA5U.js → chunk-CPH3W5A7.js} +15 -3
- package/{chunk-A3GDWRW6.js → chunk-DNQPPRHY.js} +1 -1
- package/{chunk-SR2I44ML.js → chunk-DPQ2WVBY.js} +1 -1
- package/{chunk-IZWQKAGJ.js → chunk-F2CGG72C.js} +40 -40
- package/{chunk-QDOYVIIL.js → chunk-FQYMLZ6C.js} +5 -5
- package/{chunk-BJIRLHJR.js → chunk-GII32WZW.js} +1 -0
- package/{chunk-TR54UTFI.js → chunk-GRYGRGPS.js} +4 -4
- package/{chunk-QIU65GHY.js → chunk-HMEMJ7GH.js} +364 -24
- package/{chunk-OZX2IPKM.js → chunk-HQCSU3DI.js} +1 -1
- package/{chunk-KMIMGCZT.js → chunk-HYZHJ5GW.js} +3 -3
- package/{chunk-OAJRZ35U.js → chunk-IIKPWSPX.js} +1 -1
- package/{chunk-EFWQMKEG.js → chunk-JBBZ5KUM.js} +10 -10
- package/{chunk-KC5FAHVS.js → chunk-JEDZAO7L.js} +1 -1
- package/{chunk-4YIWJYIX.js → chunk-JTK3TJYV.js} +1 -1
- package/{chunk-TMPLPCVX.js → chunk-K7M3MWCE.js} +2 -2
- package/{chunk-OHUU52T3.js → chunk-L2ICPOAL.js} +1 -1
- package/{chunk-RXX4GDIH.js → chunk-LS2ZANRJ.js} +1 -1
- package/{chunk-EVBFYPDC.js → chunk-MC4XLIJ7.js} +6 -2
- package/{chunk-LHDV2QUI.js → chunk-MJHQ3NRV.js} +1 -1
- package/{chunk-WHYTL6XG.js → chunk-N3OAPEZE.js} +28 -9
- package/{chunk-PZCTYKGU.js → chunk-ND2J3NRB.js} +2 -2
- package/{chunk-M2ZBPSGH.js → chunk-NFMHIUY3.js} +65 -50
- package/{chunk-S6FCVZ4I.js → chunk-PH5J5VUY.js} +2 -2
- package/{chunk-FMODTASJ.js → chunk-Q5FJJ6XI.js} +1 -7
- package/{chunk-JYYZCK2Z.js → chunk-QFMFJZLO.js} +1 -1
- package/{chunk-5XV64MAU.js → chunk-QHETQ3KI.js} +35 -1
- package/{chunk-BEQGQMYW.js → chunk-RZANZZL2.js} +2 -2
- package/{chunk-SPAQ4PVV.js → chunk-SAFZABH7.js} +1 -1
- package/{chunk-6LUUGZTS.js → chunk-SMZSWB44.js} +10 -5
- package/{chunk-HJKGQPYF.js → chunk-TL6L5XUT.js} +1 -1
- package/{chunk-M5K26BH3.js → chunk-TVNI5FLG.js} +4 -4
- package/{chunk-X7WAX4JU.js → chunk-UA5S3LQQ.js} +3 -3
- package/{chunk-2LX7X7HX.js → chunk-UTCCPWB2.js} +31 -3
- package/{chunk-DJM4BCSB.js → chunk-VHJLQHPQ.js} +2 -2
- package/{chunk-MXUSPS2N.js → chunk-VRLI2WNW.js} +1563 -1529
- package/{chunk-NG4UT4K4.js → chunk-WS22FPWT.js} +1 -1
- package/{chunk-NJBLAV2R.js → chunk-WXPVOQD7.js} +35 -33
- package/{chunk-5HKWE6OQ.js → chunk-XKQJJK4F.js} +1 -1
- package/{chunk-N4X2KIYL.js → chunk-XMGHGEN6.js} +1 -1
- package/{chunk-6IHWRTUK.js → chunk-XTUY5EL4.js} +16 -12
- package/{chunk-OKCTLCKS.js → chunk-YOXYA2GU.js} +1 -1
- package/{chunk-EDZAJS6E.js → chunk-Z33ARZCP.js} +1 -1
- package/chunk-ZAB3A45K.js +677 -0
- package/{chunk-YZHP76TR.js → chunk-ZBT3WNBK.js} +1 -1
- package/{contentThunks-2N2J3EGF.js → contentThunks-VURN3DFW.js} +18 -18
- package/{createAgentAutomationAction-7QO4ZVVP.js → createAgentAutomationAction-QZAAY77R.js} +18 -18
- package/{createDialogAction-PC2IQ4T7.js → createDialogAction-CHGXVTAC.js} +20 -20
- package/{createPageAction-EFL5EC22.js → createPageAction-IOGAFIN7.js} +18 -18
- package/{dbSlice-JNK4XZ27.js → dbSlice-YXQ6RYIH.js} +4 -4
- package/{dialogCommands-BSOWO6CA.js → dialogCommands-XREAP6WQ.js} +26 -25
- package/{dialogSlice-W6X5G2KS.js → dialogSlice-DOPGWGS4.js} +17 -17
- package/{docCreateCommands-LWZU23FP.js → docCreateCommands-3PYZGSCL.js} +24 -23
- package/{docDeleteCommands-RR6GKDDF.js → docDeleteCommands-3Y6MU44Q.js} +25 -24
- package/{docReadCommands-JP77ZTCY.js → docReadCommands-UBANMAFR.js} +24 -23
- package/{docStore-DMNGPTL4.js → docStore-SYYFBENY.js} +5 -5
- package/{docUpdateCommands-T4OACV4V.js → docUpdateCommands-4GK2X6BN.js} +24 -23
- package/{getPricing-QVTUQQTM.js → getPricing-F2C65RIX.js} +3 -3
- package/{handleSendMessageAction-RJEXW5VS.js → handleSendMessageAction-NPVTY2GE.js} +17 -17
- package/index.js +85 -81
- package/{localDialogRead-GKTRZFAP.js → localDialogRead-BTFJ4V2I.js} +1 -1
- package/{localRuntimeDb-P37ZTX55.js → localRuntimeDb-SYQGUF4U.js} +1 -1
- package/{machineCommands-K3VQUSAX.js → machineCommands-I66X2XB7.js} +49 -48
- package/{machineWsRunDispatch-P7RNOLMU.js → machineWsRunDispatch-W4FVBOUM.js} +49 -48
- package/{memberThunks-A6OAY77F.js → memberThunks-5T4J6KXQ.js} +5 -5
- package/{models-GS72DVJS.js → models-WW7VFNXB.js} +2 -2
- package/{offlineMarxistsAgentCommand-GEH6SNNA.js → offlineMarxistsAgentCommand-JEWCIAWM.js} +1 -1
- package/package.json +1 -1
- package/providerPresetApply-OCWWKBSD.js +214 -0
- package/providerRegistry-ZJQU7AJ7.js +31 -0
- package/{read-2PV4PN2E.js → read-M2Q6WEKB.js} +3 -3
- package/{readDocTool-FGK5XGAW.js → readDocTool-T37P3YPB.js} +1 -1
- package/{readlineWorkspace-FGQLVWLE.js → readlineWorkspace-VY5AMOGR.js} +127 -95
- package/{removeDialogAgentAction-6SGBZWSW.js → removeDialogAgentAction-HB3JBVAI.js} +7 -7
- package/{runAgentClientLoop-75TQMT2H.js → runAgentClientLoop-3NDADLVE.js} +36 -36
- package/{runtimeDoctorCommands-CROTMULY.js → runtimeDoctorCommands-X6WDBEQX.js} +2 -2
- package/{setDialogExtraReferencesAction-LC3SOVJO.js → setDialogExtraReferencesAction-4XLHRV37.js} +5 -5
- package/{setPrimaryDialogAgentAction-XE2HIEVY.js → setPrimaryDialogAgentAction-C3JOFC4W.js} +7 -7
- package/{settingSlice-GJYAXZZ6.js → settingSlice-CZRURSTH.js} +6 -6
- package/{spaceCommands-7GMVZQYI.js → spaceCommands-ENYCUUZH.js} +24 -23
- package/{streamAgentChatTurn-JYKKAOEU.js → streamAgentChatTurn-634OFUSR.js} +46 -44
- package/{switchDialogAgentAction-EDYI5RLR.js → switchDialogAgentAction-C6KVUKJP.js} +4 -4
- package/{tableCommands-SUNTHAYX.js → tableCommands-O6NWHFKV.js} +1 -1
- package/{toolApiClient-VGYUB4P5.js → toolApiClient-7PSIFQPJ.js} +2 -2
- package/{tools-PCY3TDNR.js → tools-ILBLCF7D.js} +33 -33
- package/tuiSummaryLlmCaller-LFUBZKXK.js +127 -0
- package/{updateCommands-Y363MC3L.js → updateCommands-2M74UL7P.js} +2 -2
- package/{updateDialogTitleAction-36NOSXEX.js → updateDialogTitleAction-RKFET73N.js} +38 -21
- package/tuiSummaryLlmCaller-CCYGQDGB.js +0 -116
- package/{db-VQSAOWAO.js → db-WK5MDZVN.js} +1 -1
- package/{localRuntimeAuthority-R5UBODT3.js → localRuntimeAuthority-6IR6BBXE.js} +3 -3
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isDevinOAuthAgent
|
|
3
|
+
} from "./chunk-5ZUL4CUO.js";
|
|
4
|
+
import {
|
|
5
|
+
getModelContextWindow
|
|
6
|
+
} from "./chunk-F2CGG72C.js";
|
|
1
7
|
import {
|
|
2
8
|
findModelConfig,
|
|
3
9
|
getProviderByModelName
|
|
4
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VRLI2WNW.js";
|
|
5
11
|
import {
|
|
6
12
|
asOptionalFiniteNumber
|
|
7
13
|
} from "./chunk-WWC7I6TA.js";
|
|
@@ -120,6 +126,33 @@ async function stripImagePartsForTextOnlyAgent(messages, agentConfig) {
|
|
|
120
126
|
return { messages: !supportsVision && hasImages ? stripImagePartsFromMessages(messages) : messages };
|
|
121
127
|
}
|
|
122
128
|
|
|
129
|
+
// packages/agent-runtime/devin/devinChannelWindows.ts
|
|
130
|
+
var DEVIN_CHANNEL_CONTEXT_WINDOWS = {
|
|
131
|
+
// SWE-2 家族(catalog 无裸 swe-2 selector;旧点号/裸写法如 swe-2、
|
|
132
|
+
// swe-1.7 实测均 permission_denied,已不是可用 selector)。
|
|
133
|
+
"swe-2-max": 262e3,
|
|
134
|
+
"swe-2-high": 262e3,
|
|
135
|
+
"swe-2-medium": 262e3,
|
|
136
|
+
// SWE-1.7 家族。
|
|
137
|
+
"swe-1-7": 262e3,
|
|
138
|
+
"swe-1-7-medium": 262e3,
|
|
139
|
+
"swe-1-7-lightning": 202752,
|
|
140
|
+
// SWE-1.6 家族(免费档默认)。
|
|
141
|
+
"swe-1-6": 2e5,
|
|
142
|
+
"swe-1-6-fast": 2e5,
|
|
143
|
+
// 经 devin 通道转售、且与厂商原生窗口不同的模型(catalog 枚举型 selector)。
|
|
144
|
+
"MODEL_GPT_5_2_LOW": 384e3,
|
|
145
|
+
"MODEL_GPT_5_2_MEDIUM": 384e3,
|
|
146
|
+
"MODEL_GPT_5_2_HIGH": 384e3,
|
|
147
|
+
"MODEL_GPT_5_2_XHIGH": 384e3
|
|
148
|
+
};
|
|
149
|
+
var devinChannelContextWindow = (model) => {
|
|
150
|
+
const raw = model?.trim();
|
|
151
|
+
if (!raw) return void 0;
|
|
152
|
+
return DEVIN_CHANNEL_CONTEXT_WINDOWS[raw];
|
|
153
|
+
};
|
|
154
|
+
var resolveAgentContextWindow = (agent) => (isDevinOAuthAgent(agent) ? devinChannelContextWindow(agent.model) : void 0) ?? getModelContextWindow(agent.model ?? "");
|
|
155
|
+
|
|
123
156
|
// packages/agent-runtime/agentRecordConfig.ts
|
|
124
157
|
function stringField(record, key) {
|
|
125
158
|
const value = record[key];
|
|
@@ -540,6 +573,7 @@ export {
|
|
|
540
573
|
resolveHistoricalToolContentCap,
|
|
541
574
|
projectToolMessageContent,
|
|
542
575
|
clipToolText,
|
|
576
|
+
resolveAgentContextWindow,
|
|
543
577
|
resolveAgentRuntimeConfigFromRecord,
|
|
544
578
|
buildDesktopAgentRuntimeAgentConfigSnapshot,
|
|
545
579
|
buildDesktopAgentRuntimeDialogHistorySnapshot,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BUILTIN_NOLO_AGENT_KEY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TL6L5XUT.js";
|
|
4
4
|
|
|
5
5
|
// packages/ai/tools/agentCapabilities.ts
|
|
6
6
|
var SYSTEM_AGENT_CAPABILITIES = [
|
|
@@ -17,7 +17,7 @@ var SYSTEM_AGENT_CAPABILITIES = [
|
|
|
17
17
|
label: "\u6DF1\u5EA6\u7F51\u9875\u6293\u53D6",
|
|
18
18
|
description: "\u5728\u666E\u901A\u8054\u7F51\u641C\u7D22\u4E4B\u5916\uFF0C\u7528 Firecrawl \u505A\u7ED3\u6784\u5316\u641C\u7D22\u4E0E\u6574\u9875\u6293\u53D6\uFF0C\u9002\u5408\u9700\u8981\u5B8C\u6574\u6B63\u6587\u3001\u6587\u6863\u7AD9\u70B9\u6216\u7AD9\u5185\u68C0\u7D22\u7684\u573A\u666F\u3002",
|
|
19
19
|
tools: ["firecrawl_search", "firecrawl_scrape"],
|
|
20
|
-
defaultEnabled:
|
|
20
|
+
defaultEnabled: false,
|
|
21
21
|
icon: "\u{1F578}\uFE0F"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
@@ -35,15 +35,16 @@ import {
|
|
|
35
35
|
resolvePlatformAuthToken,
|
|
36
36
|
resolvePlatformServerUrl,
|
|
37
37
|
resolveProviderTransportDecision
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-K7M3MWCE.js";
|
|
39
39
|
import {
|
|
40
40
|
clipCompactText,
|
|
41
41
|
isMeaningfulChatCompletionOutput,
|
|
42
42
|
isMeaningfulResponsesOutput
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-VHJLQHPQ.js";
|
|
44
44
|
import {
|
|
45
|
-
NOLO_CLIENT_VERSION_HEADER
|
|
46
|
-
|
|
45
|
+
NOLO_CLIENT_VERSION_HEADER,
|
|
46
|
+
isPlatformMimoProviderModel
|
|
47
|
+
} from "./chunk-ASGDO77C.js";
|
|
47
48
|
import {
|
|
48
49
|
isRecord
|
|
49
50
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -465,7 +466,11 @@ function isAbortOrTimeoutError(error) {
|
|
|
465
466
|
}
|
|
466
467
|
var CHAT_PROXY_PATH = "/api/v1/chat";
|
|
467
468
|
function shouldDisableThinking(providerConfig) {
|
|
468
|
-
return providerConfig.provider.toLowerCase() === "mimo" || /xiaomimimo\.com/i.test(providerConfig.endpoint)
|
|
469
|
+
return providerConfig.provider.toLowerCase() === "mimo" || /xiaomimimo\.com/i.test(providerConfig.endpoint) || // 平台托管 MiMo(provider=nolo + mimo-v2.6-*):endpoint 通常已解析成
|
|
470
|
+
// api.xiaomimimo.com/...(上面的正则已命中),但 transport=direct 时
|
|
471
|
+
// endpoint 是 nolo 服务器地址——模型 id 判据保证两跳都关掉 thinking
|
|
472
|
+
// (上游 thinking 默认 enabled)。
|
|
473
|
+
isPlatformMimoProviderModel(providerConfig.provider, providerConfig.model);
|
|
469
474
|
}
|
|
470
475
|
function isResponsesEndpoint(endpoint) {
|
|
471
476
|
return /\/responses$/i.test(endpoint.trim());
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
patch,
|
|
12
12
|
remove,
|
|
13
13
|
write
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UA5S3LQQ.js";
|
|
15
15
|
import {
|
|
16
16
|
createAgentKey,
|
|
17
17
|
toTrimmedString
|
|
@@ -304,7 +304,7 @@ var slice = createSliceWithThunks({
|
|
|
304
304
|
const overrides = {};
|
|
305
305
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
306
306
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
307
|
-
const { _executeModel } = await import("./_executeModel-
|
|
307
|
+
const { _executeModel } = await import("./_executeModel-W26HVI75.js");
|
|
308
308
|
return _executeModel(
|
|
309
309
|
{
|
|
310
310
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -325,7 +325,7 @@ var slice = createSliceWithThunks({
|
|
|
325
325
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
326
326
|
*/
|
|
327
327
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
328
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
328
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-3NDADLVE.js");
|
|
329
329
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
330
330
|
{
|
|
331
331
|
agentKey: args.agentKey,
|
|
@@ -341,7 +341,7 @@ var slice = createSliceWithThunks({
|
|
|
341
341
|
* 聊天轮次流式 Agent 调用
|
|
342
342
|
*/
|
|
343
343
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
344
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
344
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-634OFUSR.js");
|
|
345
345
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
346
346
|
}),
|
|
347
347
|
/**
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
readAction,
|
|
13
13
|
readRequestManager,
|
|
14
14
|
resolveAgentReadServers
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-L2ICPOAL.js";
|
|
16
16
|
import {
|
|
17
17
|
asyncThunkCreator,
|
|
18
18
|
buildCreateSlice,
|
|
@@ -712,7 +712,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
712
712
|
// 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
|
|
713
713
|
read: create.asyncThunk(
|
|
714
714
|
async (payload, thunkApi) => {
|
|
715
|
-
const { readAction: readAction2 } = await import("./read-
|
|
715
|
+
const { readAction: readAction2 } = await import("./read-M2Q6WEKB.js");
|
|
716
716
|
return readAction2(payload, thunkApi);
|
|
717
717
|
},
|
|
718
718
|
{
|
|
@@ -786,7 +786,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
786
786
|
// 这里改成动态 import,运行期才解析,彻底断开这条边。
|
|
787
787
|
share: create.asyncThunk(
|
|
788
788
|
async (config, thunkApi) => {
|
|
789
|
-
const { shareResourceAction } = await import("./action-
|
|
789
|
+
const { shareResourceAction } = await import("./action-6DXQGJMX.js");
|
|
790
790
|
return shareResourceAction(config, thunkApi);
|
|
791
791
|
}
|
|
792
792
|
),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildLocalAgentLookupKeys,
|
|
3
3
|
shouldReadAgentKeyRemotely
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IIKPWSPX.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveCliAgentKeyInput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SAFZABH7.js";
|
|
8
8
|
import {
|
|
9
9
|
toErrorMessage
|
|
10
10
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -459,6 +459,7 @@ function parseAgentUpdateArgs(args) {
|
|
|
459
459
|
const name = readOption(args, "--name");
|
|
460
460
|
const customProviderUrl = readOption(args, "--custom-provider-url");
|
|
461
461
|
const apiKey = readOption(args, "--api-key") ?? readOption(args, "--provider-api-key");
|
|
462
|
+
const presetId = readOption(args, "--preset") ?? readOption(args, "--provider-preset");
|
|
462
463
|
const verify = args.includes("--verify");
|
|
463
464
|
const verifyPrompt = readOption(args, "--verify-prompt");
|
|
464
465
|
const maxConcurrent = parsePositiveIntegerOption(
|
|
@@ -498,13 +499,40 @@ function parseAgentUpdateArgs(args) {
|
|
|
498
499
|
throw new Error("No updates provided. Use --model / --cli-provider / --api-source / --field key=value.");
|
|
499
500
|
}
|
|
500
501
|
}
|
|
501
|
-
return { agentInput, updates, promptDoc, copyProviderFrom, verify, verifyPrompt };
|
|
502
|
+
return { agentInput, updates, promptDoc, copyProviderFrom, verify, verifyPrompt, presetId };
|
|
502
503
|
}
|
|
503
504
|
async function buildCreatedAgentRecord(args) {
|
|
504
505
|
const serverUrl = args.cliArgs ? resolveServerUrl(args.cliArgs, args.env) : resolveServerUrl(args.env);
|
|
505
506
|
const userId = parseUserIdFromAuthToken(args.authToken);
|
|
506
507
|
const resolvedAgentInput = resolveCliAgentKeyInput(args.parsed.agentInput);
|
|
507
508
|
const agentKey = resolvedAgentInput.startsWith("agent-") ? resolvedAgentInput : createAgentKey.private(userId || "local", resolvedAgentInput);
|
|
509
|
+
if (args.parsed.presetId) {
|
|
510
|
+
const { resolveProviderPresetFields } = await import("./providerPresetApply-OCWWKBSD.js");
|
|
511
|
+
const fields = resolveProviderPresetFields(args.parsed.presetId);
|
|
512
|
+
if (fields.kind === "manual") {
|
|
513
|
+
throw new Error(
|
|
514
|
+
`unknown --preset "${args.parsed.presetId}". Run \`nolo agent providers\` to list preset ids.`
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
if (fields.kind === "oauth" || fields.requiresDesktopOAuth) {
|
|
518
|
+
throw new Error(
|
|
519
|
+
`--preset "${args.parsed.presetId}" is an OAuth subscription; create it in Nolo Desktop (OAuth login required).`
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
const u = args.parsed.updates;
|
|
523
|
+
u.apiSource = "custom";
|
|
524
|
+
u.provider = u.provider ?? fields.provider;
|
|
525
|
+
if (fields.customProviderUrl && !u.customProviderUrl) {
|
|
526
|
+
u.customProviderUrl = fields.customProviderUrl;
|
|
527
|
+
}
|
|
528
|
+
if (fields.apiKeyHeader && !u.apiKeyHeader) {
|
|
529
|
+
u.apiKeyHeader = fields.apiKeyHeader;
|
|
530
|
+
}
|
|
531
|
+
if (!u.model && fields.model) u.model = fields.model;
|
|
532
|
+
if (fields.defaultReasoningEffort && u.reasoning_effort == null) {
|
|
533
|
+
u.reasoning_effort = fields.defaultReasoningEffort;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
508
536
|
if (args.parsed.copyProviderFrom) {
|
|
509
537
|
const providerSource = await resolveAgentRecordFromHybridStore({
|
|
510
538
|
agentInput: args.parsed.copyProviderFrom,
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-DWLEOOGR.js";
|
|
7
7
|
import {
|
|
8
8
|
addContentAction
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4DRWWIOL.js";
|
|
10
10
|
import {
|
|
11
11
|
upload
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UA5S3LQQ.js";
|
|
13
13
|
import {
|
|
14
14
|
getRuntimeServerContext
|
|
15
15
|
} from "./chunk-UKWGR5SS.js";
|