nolo-cli 0.107.0-alpha.3 → 0.107.0
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-UDCSOTD2.js → _executeModel-C4EH5TZG.js} +77 -69
- package/action-GVA5ARSJ.js +20 -0
- package/{addContentAction-MB2HHMDZ.js → addContentAction-M2WOWZCL.js} +13 -12
- package/{addDialogAgentAction-MCEABSBA.js → addDialogAgentAction-QMAQ5Z6N.js} +19 -20
- package/{agentDeleteCommand-OWYHN6D6.js → agentDeleteCommand-D3RICSHX.js} +118 -43
- package/{agentEmailCommands-BQFXQIHF.js → agentEmailCommands-YC2A4USQ.js} +99 -89
- package/agentListCommands-UDJELMYP.js +741 -0
- package/{agentMachineCommands-6DTI7YSG.js → agentMachineCommands-XH4IBGTO.js} +48 -44
- package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-CMVTBY5X.js} +97 -2
- package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
- package/agentRecordCommands-3EOC2QMN.js +138 -0
- package/agentRunCommand-BTHYOVVS.js +167 -0
- package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
- package/{agentRuntimeLocal-KCMC2TBD.js → agentRuntimeLocal-N4YGKL7M.js} +44 -40
- package/{agentSlice-R7PR6KYM.js → agentSlice-NIN4T6CF.js} +15 -14
- package/{appDeleteCommands-JEPA3EWE.js → appDeleteCommands-7DAF33AM.js} +46 -42
- package/{appDeployCommands-UTB76XFM.js → appDeployCommands-ZPZSMFGZ.js} +46 -42
- package/{appDeployStatusCommands-LGHF2SBD.js → appDeployStatusCommands-FWBDSSS5.js} +46 -42
- package/{appGetCommands-PX2BFHOB.js → appGetCommands-SZZOHGEP.js} +46 -42
- package/{appListCommands-BSMPTWKC.js → appListCommands-FPMUBDPM.js} +46 -42
- package/{authCommand-YW42YZA4.js → authCommand-VL3G26NQ.js} +119 -25
- package/{authCommands-RGOGCPP6.js → authCommands-5RTUDYZW.js} +7 -5
- package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-ZK4K67Y5.js} +11 -9
- package/{chromeCommands-FZYAU75D.js → chromeCommands-AU5ZJXBG.js} +289 -37
- package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-ZYTCMNHG.js} +156 -22
- package/{chunk-JDPFV2JV.js → chunk-2NNRWRM5.js} +20 -11
- package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
- package/{chunk-HVURBGF3.js → chunk-2U3NHADM.js} +6 -6
- package/{chunk-AVTT555J.js → chunk-2ZHBFX5R.js} +29 -9
- package/{chunk-QTGQ2LTL.js → chunk-3DQY5IFB.js} +6 -10
- package/chunk-4LCOCOR5.js +50 -0
- package/{chunk-JPGCXHNM.js → chunk-4LKMZ3RR.js} +1 -1
- package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
- package/{chunk-6D6VBVEW.js → chunk-4W24JM32.js} +80 -14
- package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
- package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
- package/chunk-5MMAK75Q.js +15 -0
- package/{chunk-7S4YWN7P.js → chunk-5UUIGN6I.js} +4 -4
- package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-C63CN6KA.js → chunk-6IJDSYUA.js} +849 -279
- package/{chunk-4MK3I7Y4.js → chunk-6MAW4XOF.js} +5 -5
- package/chunk-76HO2DP6.js +15 -0
- package/chunk-7AY2H3GA.js +13692 -0
- package/{chunk-4CR5I7BD.js → chunk-7HYOPBUW.js} +47 -67
- package/{chunk-VLTIYV3X.js → chunk-7I25CBT5.js} +34 -8
- package/chunk-AGIM7IMJ.js +147 -0
- package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
- package/{chunk-6OZ36FXI.js → chunk-BIPGGSJS.js} +22 -4
- package/{chunk-EYAQT56M.js → chunk-BNQMNUKZ.js} +9 -6
- package/{chunk-62CATUYY.js → chunk-CBUMFIFE.js} +834 -962
- package/{chunk-OIVSQH2O.js → chunk-CDEEFJXN.js} +308 -11
- package/chunk-CHOZJMJS.js +78 -0
- package/{chunk-ETI2NYVF.js → chunk-CIP3AAMT.js} +4 -4
- package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
- package/{chunk-IBOZNTG2.js → chunk-DGEUP3DK.js} +23 -28
- package/{chunk-Q554LLSI.js → chunk-DMXLXZKL.js} +1 -1
- package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
- package/{chunk-HKNXJGEC.js → chunk-ECFHBYUW.js} +85 -50
- package/{chunk-ACTMNVHM.js → chunk-EHSYSKXV.js} +1 -1
- package/{chunk-WV42OMV7.js → chunk-ELUDRSRD.js} +8 -8
- package/{chunk-ABQYVJBJ.js → chunk-EV235ILT.js} +5 -5
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/{chunk-BFDFRLLQ.js → chunk-EZ4VZHAG.js} +5 -5
- package/{chunk-GO3Z72MT.js → chunk-FHLMQIU7.js} +65 -95
- package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
- package/{chunk-SH43IESU.js → chunk-GGC55Q32.js} +199 -29
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
- package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
- package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
- package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
- package/{chunk-BNGW5ASC.js → chunk-I2RGRVQ7.js} +22 -2
- package/{chunk-O6OSWFZQ.js → chunk-IHPDK6UD.js} +6 -0
- package/{chunk-QDSINZM3.js → chunk-IXH3HKY2.js} +1 -22
- package/{chunk-GQBOR3G6.js → chunk-JBKHQOYK.js} +8 -4
- package/{chunk-XD2MJFUG.js → chunk-JEFXP73H.js} +1 -1
- package/{chunk-PBA4UJBK.js → chunk-JIXGJTBU.js} +4 -4
- package/{chunk-AEOE4Z6Q.js → chunk-K6L5PNXK.js} +39 -15
- package/{chunk-Z77CRGTW.js → chunk-KA5O5KQL.js} +1 -1
- package/{chunk-GPCZ7UXG.js → chunk-KD6D6BLA.js} +1 -1
- package/{chunk-UZGQNTVW.js → chunk-KHKTDMYG.js} +8 -6
- package/{chunk-MRIHM22T.js → chunk-LBFL6RZG.js} +58 -9
- package/{chunk-C3M4465B.js → chunk-LKIVH2I2.js} +403 -658
- package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
- package/{chunk-DHDMC6FO.js → chunk-LUBFABMJ.js} +15 -14
- package/{chunk-NA35QHCF.js → chunk-LVBFKW65.js} +1 -1
- package/chunk-LWLNLZC5.js +265 -0
- package/{chunk-EEGDMATE.js → chunk-M3NMHYRB.js} +86 -81
- package/chunk-N4NGJDT6.js +929 -0
- package/{chunk-GL3EHUR4.js → chunk-N7NLLRQQ.js} +68 -46
- package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
- package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
- package/chunk-NWENLDMM.js +42 -0
- package/chunk-O7SVKKLY.js +875 -0
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-6Z7MY3V7.js → chunk-OEJLGVBL.js} +5 -5
- package/{chunk-VMFTFOWF.js → chunk-OKGVNZTL.js} +35 -8
- package/{chunk-GEPUP7OO.js → chunk-OR2UWD6X.js} +3 -3
- package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
- package/{chunk-J4MOO56S.js → chunk-PNXHPLRU.js} +10 -2
- package/{chunk-3BMYXEUW.js → chunk-R5AJODNI.js} +1 -1
- package/{chunk-P5EVSOPA.js → chunk-R6EBQEQE.js} +22 -29
- package/{chunk-NOF3HDSN.js → chunk-RLSF5CSE.js} +11 -9
- package/chunk-RQ6CTX2E.js +164 -0
- package/{chunk-3UZPUAES.js → chunk-RSB4PWX4.js} +1 -1
- package/{chunk-KQ4ONNQD.js → chunk-RXA3HAVW.js} +190 -8
- package/{chunk-IIVGDG4I.js → chunk-SJKULPGX.js} +13 -7
- package/chunk-SQHMSDDU.js +8004 -0
- package/{chunk-Q67DOFOO.js → chunk-SZC4REES.js} +212 -105
- package/{chunk-JRQFUXY7.js → chunk-TBAXFWOS.js} +99 -22
- package/{chunk-PQFHGD77.js → chunk-TBM2RS3U.js} +161 -14
- package/{chunk-XT35TTFG.js → chunk-TCYU7L6V.js} +18 -20
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/chunk-TY3TIUJK.js +89 -0
- package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
- package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
- package/chunk-UM7TA3K4.js +1008 -0
- package/{chunk-6YTOJY35.js → chunk-VBG7GWWR.js} +253 -8
- package/chunk-VIWDGTDA.js +8 -0
- package/chunk-VJVNU77E.js +83 -0
- package/{chunk-W7HLWAQ7.js → chunk-VPLUU4IX.js} +118 -90
- package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
- package/chunk-VZLO4XJD.js +17 -0
- package/{chunk-AHAHBQMU.js → chunk-WDLSZMTA.js} +2 -2
- package/{chunk-53HEEOTT.js → chunk-WF5X57VW.js} +83 -16
- package/{chunk-VRTTFDBM.js → chunk-WPHY3VPF.js} +35 -22
- package/{chunk-ASIFZ2WY.js → chunk-YKZLFY5J.js} +66 -54
- package/chunk-YV25TM3R.js +780 -0
- package/{chunk-B2C6QTY4.js → chunk-YXKNBVYW.js} +19 -17
- package/chunk-ZRAU6T47.js +56 -0
- package/commandRegistry-UU6IOTHI.js +833 -0
- package/{contentThunks-IV2T3EJC.js → contentThunks-ARD56LKI.js} +39 -36
- package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-JCOIEYY4.js → createAgentAutomationAction-HWJLU6DD.js} +40 -37
- package/createDialogAction-CHYA6PZE.js +70 -0
- package/{createPageAction-D2VOOLP3.js → createPageAction-TSCYNFX7.js} +47 -43
- package/{chunk-VFEJQMH4.js → cursorProvider-YGGNMVWX.js} +2751 -10172
- package/{dbSlice-A6C6H32X.js → dbSlice-TG4MZ5EB.js} +12 -11
- package/{deleteFile-YG6QMJLU.js → deleteFile-KESP65GC.js} +7 -6
- package/{dialogCommands-H7FPUYUQ.js → dialogCommands-IJYQAQMB.js} +49 -46
- package/{dialogSlice-6JZOOTDS.js → dialogSlice-H476I77R.js} +57 -37
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-WRG2JLGM.js → docCreateCommands-AZSK4NAG.js} +48 -44
- package/{docDeleteCommands-SHWJIBJS.js → docDeleteCommands-DDJMSMFZ.js} +49 -45
- package/{docReadCommands-WJN3WT6O.js → docReadCommands-5F5Q6EBZ.js} +47 -43
- package/{docStore-HUPQ2FSS.js → docStore-HW2RDZDM.js} +17 -13
- package/{docUpdateCommands-IE32IL6O.js → docUpdateCommands-XPNPVZOC.js} +48 -44
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-3PXAHKCR.js} +5 -5
- package/{getPricing-LUSEABA6.js → getPricing-DOBBZLOK.js} +4 -4
- package/{handleSendMessageAction-DFPMQ7YM.js → handleSendMessageAction-IOXE7ILC.js} +109 -42
- package/index.js +87 -884
- package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
- package/{localDialogRead-BTFJ4V2I.js → localDialogRead-UYCKO7YZ.js} +2 -2
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
- package/{machineCommands-OL4NLMXG.js → machineCommands-Q7TDGM6P.js} +96 -86
- package/machineWsRunDispatch-T5VFOQ3R.js +154 -0
- package/{memberThunks-P2ECUJ56.js → memberThunks-5S5D3N4U.js} +20 -18
- package/{models-T3SG6MJ5.js → models-PQU25T6Q.js} +2 -2
- package/oauthTokenStore-ITEB663N.js +23 -0
- package/package.json +1 -1
- package/processSpawn-SOAV3FEV.js +11 -0
- package/profileConfig-ZGOFORWV.js +43 -0
- package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-HAQWVAQX.js} +7 -7
- package/{providerRegistry-757OWH3O.js → providerRegistry-5FGWB3X5.js} +11 -7
- package/{read-COE3ZYR6.js → read-LSYFLSIM.js} +8 -7
- package/{readDocTool-5USN4A6V.js → readDocTool-XWRXV3DR.js} +5 -3
- package/{readlineWorkspace-BOENUIW2.js → readlineWorkspace-25U6P3DG.js} +2595 -2031
- package/{removeDialogAgentAction-J6X5QMTA.js → removeDialogAgentAction-4TEFC3VL.js} +22 -26
- package/{runAgentClientLoop-5ZA62FBA.js → runAgentClientLoop-CZOYWHDN.js} +78 -71
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/{setDialogExtraReferencesAction-WX5VTY6O.js → setDialogExtraReferencesAction-LSEN44OY.js} +16 -14
- package/{setPrimaryDialogAgentAction-FN22THHT.js → setPrimaryDialogAgentAction-SR366X5A.js} +23 -27
- package/{chunk-GP5LKBUZ.js → settingThunks-CTVPPGIN.js} +226 -940
- package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
- package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
- package/{spaceCommands-5GLCWZPO.js → spaceCommands-3UK63WPE.js} +51 -47
- package/{streamAgentChatTurn-6UZJMYRB.js → streamAgentChatTurn-LV6ZWUD4.js} +214 -114
- package/{switchDialogAgentAction-LVTEV3FR.js → switchDialogAgentAction-M6NAFOOU.js} +19 -20
- package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
- package/{toolApiClient-QVJ6HDNN.js → toolApiClient-AD7CXTA4.js} +4 -3
- package/tools-UJOV6CQZ.js +117 -0
- package/{tuiSummaryLlmCaller-OHHFTHMG.js → tuiSummaryLlmCaller-DEH7ZEM6.js} +25 -23
- package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
- package/{updateDialogTitleAction-QTKNIURB.js → updateDialogTitleAction-JYXKIBNJ.js} +84 -45
- package/action-P4TNFGAD.js +0 -31
- package/agentListCommands-B2V4YAC4.js +0 -410
- package/agentRecordCommands-UTHKMMJY.js +0 -128
- package/agentRunCommand-D4OBAOVW.js +0 -156
- package/browser-image-compression-MFDTD7K6.js +0 -1763
- package/chatQueueReduxAdapter-2P6NFX64.js +0 -186
- package/chunk-CQ3WA2NE.js +0 -299
- package/chunk-M76ECQRD.js +0 -13658
- package/chunk-MEYIRKDN.js +0 -8967
- package/chunk-PUOC4YRO.js +0 -394
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-S7Z2HMCN.js +0 -25
- package/chunk-T75QD6AB.js +0 -20923
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YPREESF4.js +0 -225
- package/createDialogAction-NGG7YVNU.js +0 -65
- package/machineWsRunDispatch-64SG2RUI.js +0 -144
- package/settingSlice-P4ZW7K5X.js +0 -204
- package/syncMapping-N6RGXGBW.js +0 -437
- package/tools-KMGFWO43.js +0 -110
- package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
- package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
platformHostedModels,
|
|
10
10
|
toCnyCredits,
|
|
11
11
|
zaiModels
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SZC4REES.js";
|
|
13
13
|
|
|
14
14
|
// packages/integrations/qwen/models.ts
|
|
15
15
|
var qwenModels = [
|
|
@@ -1188,8 +1188,18 @@ function pipe(...pipe$1) {
|
|
|
1188
1188
|
|
|
1189
1189
|
// packages/ai/agent/createAgentSchema.ts
|
|
1190
1190
|
var DEFAULT_REASONING_EFFORT = "medium";
|
|
1191
|
+
var REASONING_EFFORT_OPTIONS = [
|
|
1192
|
+
"none",
|
|
1193
|
+
"minimal",
|
|
1194
|
+
"low",
|
|
1195
|
+
"medium",
|
|
1196
|
+
"high",
|
|
1197
|
+
"xhigh",
|
|
1198
|
+
"max"
|
|
1199
|
+
];
|
|
1191
1200
|
var PROVIDER_REASONING_EFFORT_VALUES = {
|
|
1192
1201
|
openai: ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
|
|
1202
|
+
openrouter: ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
|
|
1193
1203
|
deepseek: ["low", "high", "max"],
|
|
1194
1204
|
// nolo (Ollama Cloud) 支持 DeepSeek/Kimi/GLM 等 thinking 模型,
|
|
1195
1205
|
// reasoning_effort 通过 OpenAI 兼容端点透传到 Ollama Cloud。
|
|
@@ -1310,7 +1320,12 @@ var oauthModel = ({ name, displayName, contextWindow, thinkingMode, maxOutputTok
|
|
|
1310
1320
|
price: { input: 0, output: 0 }
|
|
1311
1321
|
});
|
|
1312
1322
|
var anthropicOAuthModels = [
|
|
1313
|
-
// 5 代(1M + Adaptive thinking always-on;官方 max output 128k)
|
|
1323
|
+
// 5 代与 5.5 代(1M + Adaptive thinking always-on;官方 max output 128k)
|
|
1324
|
+
oauthModel({ name: "claude-opus-5-5", displayName: "Claude Opus 5.5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
1325
|
+
// Claude Sonnet 5.5(2026-09-28 发布):官方规格 1M + Adaptive thinking + max output 128k。
|
|
1326
|
+
// 注意该模型对非默认 temperature/top_p/top_k 直接 400——nolo 的 anthropicAdapter
|
|
1327
|
+
// 不传采样参数,不受影响。
|
|
1328
|
+
oauthModel({ name: "claude-sonnet-5-5", displayName: "Claude Sonnet 5.5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
1314
1329
|
oauthModel({ name: "claude-fable-5", displayName: "Claude Fable 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
1315
1330
|
oauthModel({ name: "claude-opus-5", displayName: "Claude Opus 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
1316
1331
|
oauthModel({ name: "claude-sonnet-5", displayName: "Claude Sonnet 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
@@ -1325,6 +1340,11 @@ var anthropicOAuthModels = [
|
|
|
1325
1340
|
// haiku-4-5(官方明确 context=200k + Extended thinking)
|
|
1326
1341
|
oauthModel({ name: "claude-haiku-4-5-20251001", displayName: "Claude Haiku 4.5", contextWindow: 2e5, thinkingMode: "extended" })
|
|
1327
1342
|
];
|
|
1343
|
+
function anthropicOAuthModelMaxOutputTokens(model) {
|
|
1344
|
+
if (!model) return void 0;
|
|
1345
|
+
const found = anthropicOAuthModels.find((m) => m.name === model);
|
|
1346
|
+
return typeof found?.maxOutputTokens === "number" ? found.maxOutputTokens : void 0;
|
|
1347
|
+
}
|
|
1328
1348
|
var OAUTH_MODEL_THINKING_MODE = new Map(
|
|
1329
1349
|
anthropicOAuthModels.map((m) => [m.name, m.thinkingMode])
|
|
1330
1350
|
);
|
|
@@ -1438,21 +1458,23 @@ var googleModels = [
|
|
|
1438
1458
|
}
|
|
1439
1459
|
},
|
|
1440
1460
|
{
|
|
1441
|
-
name: "gemini-
|
|
1442
|
-
displayName: "Gemini
|
|
1461
|
+
name: "gemini-4-argon",
|
|
1462
|
+
displayName: "Gemini 4 Argon",
|
|
1443
1463
|
provider: "google",
|
|
1444
|
-
description: "Gemini
|
|
1464
|
+
description: "Gemini 4 Argon flagship reasoning, coding, and multimodal model.",
|
|
1445
1465
|
hasVision: true,
|
|
1446
1466
|
hasAudio: true,
|
|
1467
|
+
// TODO(model-spec): 上下文/最大输出沿用 Gemini 3.x 的 1M/64K 占位,待官方模型页确认后更新。
|
|
1447
1468
|
contextWindow: 1048576,
|
|
1448
1469
|
maxOutputTokens: 65536,
|
|
1449
1470
|
supportsTool: true,
|
|
1450
1471
|
supportsReasoningEffort: true,
|
|
1472
|
+
// thinking; implicit caching only, so cachingWrite mirrors cachingRead).
|
|
1451
1473
|
price: {
|
|
1452
1474
|
input: 16,
|
|
1453
|
-
output:
|
|
1454
|
-
cachingWrite:
|
|
1455
|
-
cachingRead:
|
|
1475
|
+
output: 80,
|
|
1476
|
+
cachingWrite: 0.8,
|
|
1477
|
+
cachingRead: 0.8
|
|
1456
1478
|
}
|
|
1457
1479
|
}
|
|
1458
1480
|
];
|
|
@@ -1758,6 +1780,259 @@ var fireworksModels = [
|
|
|
1758
1780
|
}
|
|
1759
1781
|
];
|
|
1760
1782
|
|
|
1783
|
+
// packages/ai/agent/openrouterModelCapability.ts
|
|
1784
|
+
var VALID_EFFORTS_SET = new Set(REASONING_EFFORT_OPTIONS);
|
|
1785
|
+
function extractOpenRouterReasoningCapability(rawModel) {
|
|
1786
|
+
if (!rawModel) {
|
|
1787
|
+
return {
|
|
1788
|
+
found: false,
|
|
1789
|
+
supportsReasoning: false,
|
|
1790
|
+
supportedEfforts: []
|
|
1791
|
+
};
|
|
1792
|
+
}
|
|
1793
|
+
const supportedParams = rawModel.supported_parameters ?? [];
|
|
1794
|
+
const reasoning = rawModel.reasoning;
|
|
1795
|
+
const hasReasoningSupport = Boolean(reasoning) || supportedParams.includes("reasoning") || supportedParams.includes("reasoning_effort") || supportedParams.includes("include_reasoning");
|
|
1796
|
+
if (!hasReasoningSupport) {
|
|
1797
|
+
return {
|
|
1798
|
+
found: true,
|
|
1799
|
+
supportsReasoning: false,
|
|
1800
|
+
supportedEfforts: []
|
|
1801
|
+
};
|
|
1802
|
+
}
|
|
1803
|
+
const rawEfforts = reasoning?.supported_efforts ?? [];
|
|
1804
|
+
const supportedEfforts = rawEfforts.filter(
|
|
1805
|
+
(e) => VALID_EFFORTS_SET.has(e)
|
|
1806
|
+
);
|
|
1807
|
+
let defaultEffort;
|
|
1808
|
+
if (reasoning?.default_effort && VALID_EFFORTS_SET.has(reasoning.default_effort) && supportedEfforts.includes(reasoning.default_effort)) {
|
|
1809
|
+
defaultEffort = reasoning.default_effort;
|
|
1810
|
+
} else if (supportedEfforts.length > 0) {
|
|
1811
|
+
defaultEffort = supportedEfforts.includes("medium") ? "medium" : supportedEfforts[0];
|
|
1812
|
+
}
|
|
1813
|
+
return {
|
|
1814
|
+
found: true,
|
|
1815
|
+
supportsReasoning: true,
|
|
1816
|
+
mandatory: reasoning?.mandatory,
|
|
1817
|
+
supportedEfforts,
|
|
1818
|
+
defaultEffort
|
|
1819
|
+
};
|
|
1820
|
+
}
|
|
1821
|
+
var cachedModels = null;
|
|
1822
|
+
var CACHE_TTL_MS = 10 * 60 * 1e3;
|
|
1823
|
+
function getCachedOpenRouterModelReasoning(modelId) {
|
|
1824
|
+
const trimmed = modelId.trim().toLowerCase();
|
|
1825
|
+
if (!trimmed) return null;
|
|
1826
|
+
if (!cachedModels || Date.now() - cachedModels.timestamp >= CACHE_TTL_MS) {
|
|
1827
|
+
return null;
|
|
1828
|
+
}
|
|
1829
|
+
const rawModel = cachedModels.data.get(trimmed);
|
|
1830
|
+
if (!rawModel) return null;
|
|
1831
|
+
return extractOpenRouterReasoningCapability(rawModel);
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
// packages/ai/agent/modelReasoningCapability.ts
|
|
1835
|
+
var GATEWAY_PROVIDERS = /* @__PURE__ */ new Set(["openrouter", "nolo"]);
|
|
1836
|
+
var THINKING_MECHANISM_PROVIDERS = /* @__PURE__ */ new Set(["anthropic", "google"]);
|
|
1837
|
+
var MODEL_REASONING_OVERRIDES = [
|
|
1838
|
+
// ---- OpenAI ----
|
|
1839
|
+
{
|
|
1840
|
+
providers: ["openai"],
|
|
1841
|
+
prefix: "gpt-5",
|
|
1842
|
+
includes: "-pro",
|
|
1843
|
+
efforts: ["high"],
|
|
1844
|
+
note: "gpt-5-pro \u7CFB\u5217\u53EA\u66B4\u9732 high \u6863\uFF08OpenAI \u6587\u6863\uFF1Apro \u53D8\u4F53\u4E0D\u53EF\u8C03\u4F4E\uFF09"
|
|
1845
|
+
},
|
|
1846
|
+
{
|
|
1847
|
+
providers: ["openai"],
|
|
1848
|
+
prefix: "o1-preview",
|
|
1849
|
+
supportsReasoning: false,
|
|
1850
|
+
note: "o1-preview \u4E0D\u63A5\u53D7 reasoning_effort \u53C2\u6570"
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
providers: ["openai"],
|
|
1854
|
+
prefix: "o1-mini",
|
|
1855
|
+
supportsReasoning: false,
|
|
1856
|
+
note: "o1-mini \u4E0D\u63A5\u53D7 reasoning_effort \u53C2\u6570"
|
|
1857
|
+
},
|
|
1858
|
+
{
|
|
1859
|
+
providers: ["openai"],
|
|
1860
|
+
prefix: "o1",
|
|
1861
|
+
efforts: ["low", "medium", "high"],
|
|
1862
|
+
note: "o1 \u652F\u6301 low/medium/high\uFF0C\u65E0 none/minimal/xhigh/max"
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
providers: ["openai"],
|
|
1866
|
+
prefix: "o3",
|
|
1867
|
+
efforts: ["low", "medium", "high"],
|
|
1868
|
+
note: "o3 / o3-mini \u652F\u6301 low/medium/high"
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
providers: ["openai"],
|
|
1872
|
+
prefix: "o4-mini",
|
|
1873
|
+
efforts: ["low", "medium", "high"],
|
|
1874
|
+
note: "o4-mini \u652F\u6301 low/medium/high"
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
providers: ["openai"],
|
|
1878
|
+
prefix: "gpt-4o",
|
|
1879
|
+
supportsReasoning: false,
|
|
1880
|
+
note: "gpt-4o \u7CFB\u5217\u975E\u63A8\u7406\u6A21\u578B"
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
providers: ["openai"],
|
|
1884
|
+
prefix: "gpt-4.1",
|
|
1885
|
+
supportsReasoning: false,
|
|
1886
|
+
note: "gpt-4.1 \u7CFB\u5217\u975E\u63A8\u7406\u6A21\u578B"
|
|
1887
|
+
},
|
|
1888
|
+
{
|
|
1889
|
+
providers: ["openai"],
|
|
1890
|
+
prefix: "chatgpt-4o",
|
|
1891
|
+
supportsReasoning: false,
|
|
1892
|
+
note: "chatgpt-4o \u975E\u63A8\u7406\u6A21\u578B"
|
|
1893
|
+
},
|
|
1894
|
+
// ---- xAI / Grok ----
|
|
1895
|
+
{
|
|
1896
|
+
providers: ["xai", "grok"],
|
|
1897
|
+
prefix: "grok-3-mini",
|
|
1898
|
+
efforts: ["low", "high"],
|
|
1899
|
+
note: "grok-3-mini \u4EC5 low/high\uFF0C\u65E0 medium\uFF08xAI \u6587\u6863\uFF09"
|
|
1900
|
+
},
|
|
1901
|
+
{
|
|
1902
|
+
providers: ["xai", "grok"],
|
|
1903
|
+
prefix: "grok-3",
|
|
1904
|
+
exact: true,
|
|
1905
|
+
// 只匹配 grok-3 本体;grok-3-fast 等变体不被误伤
|
|
1906
|
+
supportsReasoning: false,
|
|
1907
|
+
note: "grok-3\uFF08\u975E mini\uFF09\u4E0D\u652F\u6301 reasoning_effort"
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
providers: ["xai", "grok"],
|
|
1911
|
+
prefix: "grok-2",
|
|
1912
|
+
supportsReasoning: false,
|
|
1913
|
+
note: "grok-2 \u7CFB\u5217\u975E\u63A8\u7406\u6A21\u578B"
|
|
1914
|
+
},
|
|
1915
|
+
// ---- DeepSeek ----
|
|
1916
|
+
{
|
|
1917
|
+
providers: ["deepseek"],
|
|
1918
|
+
prefix: "deepseek-chat",
|
|
1919
|
+
exact: true,
|
|
1920
|
+
// 只匹配 deepseek-chat 本体;deepseek-chat-v3.1 是混合推理模型
|
|
1921
|
+
supportsReasoning: false,
|
|
1922
|
+
note: "deepseek-chat\uFF08V3 \u975E\u63A8\u7406\u7EBF\uFF09\u65E0\u63A8\u7406\u5F3A\u5EA6"
|
|
1923
|
+
},
|
|
1924
|
+
// ---- Kimi / Moonshot ----
|
|
1925
|
+
{
|
|
1926
|
+
providers: ["kimi", "moonshot"],
|
|
1927
|
+
prefix: "moonshot-v1",
|
|
1928
|
+
supportsReasoning: false,
|
|
1929
|
+
note: "moonshot-v1 \u7CFB\u5217\u975E\u63A8\u7406\u6A21\u578B"
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
providers: ["kimi", "moonshot"],
|
|
1933
|
+
prefix: "kimi-k2-instruct",
|
|
1934
|
+
supportsReasoning: false,
|
|
1935
|
+
note: "kimi-k2-instruct \u975E thinking \u53D8\u4F53"
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
providers: ["kimi", "moonshot"],
|
|
1939
|
+
prefix: "kimi-latest",
|
|
1940
|
+
supportsReasoning: false,
|
|
1941
|
+
note: "kimi-latest \u6307\u5411\u975E\u63A8\u7406\u5FEB\u7167"
|
|
1942
|
+
}
|
|
1943
|
+
];
|
|
1944
|
+
function modelBasename(model) {
|
|
1945
|
+
const idx = model.lastIndexOf("/");
|
|
1946
|
+
return idx === -1 ? model : model.slice(idx + 1);
|
|
1947
|
+
}
|
|
1948
|
+
function matchOverride(provider, model) {
|
|
1949
|
+
const m = model.toLowerCase();
|
|
1950
|
+
const base = modelBasename(m);
|
|
1951
|
+
const isGateway = GATEWAY_PROVIDERS.has(provider);
|
|
1952
|
+
let best = null;
|
|
1953
|
+
let bestPrefixLen = -1;
|
|
1954
|
+
for (const o of MODEL_REASONING_OVERRIDES) {
|
|
1955
|
+
if (!isGateway && !o.providers.includes(provider)) continue;
|
|
1956
|
+
const hit = o.exact ? m === o.prefix || base === o.prefix : m.startsWith(o.prefix) || base.startsWith(o.prefix);
|
|
1957
|
+
if (!hit) continue;
|
|
1958
|
+
if (o.includes && !m.includes(o.includes) && !base.includes(o.includes)) {
|
|
1959
|
+
continue;
|
|
1960
|
+
}
|
|
1961
|
+
if (o.prefix.length > bestPrefixLen) {
|
|
1962
|
+
best = o;
|
|
1963
|
+
bestPrefixLen = o.prefix.length;
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
return best;
|
|
1967
|
+
}
|
|
1968
|
+
function capabilityFromOpenRouterLive(live) {
|
|
1969
|
+
return {
|
|
1970
|
+
found: true,
|
|
1971
|
+
supportsReasoning: live.supportsReasoning,
|
|
1972
|
+
efforts: live.supportedEfforts,
|
|
1973
|
+
defaultEffort: live.defaultEffort,
|
|
1974
|
+
mandatory: live.mandatory,
|
|
1975
|
+
source: "openrouter-live"
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
function resolveModelReasoningCapability(provider, model) {
|
|
1979
|
+
const p = (provider ?? "").toLowerCase();
|
|
1980
|
+
const m = (model ?? "").trim();
|
|
1981
|
+
if (THINKING_MECHANISM_PROVIDERS.has(p)) {
|
|
1982
|
+
return {
|
|
1983
|
+
found: false,
|
|
1984
|
+
supportsReasoning: true,
|
|
1985
|
+
// 有推理能力,只是走 Thinking 机制而非 effort
|
|
1986
|
+
efforts: [],
|
|
1987
|
+
source: "provider-map"
|
|
1988
|
+
};
|
|
1989
|
+
}
|
|
1990
|
+
if (m) {
|
|
1991
|
+
const override = matchOverride(p, m);
|
|
1992
|
+
if (override) {
|
|
1993
|
+
const supportsReasoning = override.supportsReasoning ?? true;
|
|
1994
|
+
const efforts = supportsReasoning === false ? [] : override.efforts ?? PROVIDER_REASONING_EFFORT_VALUES[p] ?? [
|
|
1995
|
+
"low",
|
|
1996
|
+
"medium",
|
|
1997
|
+
"high"
|
|
1998
|
+
];
|
|
1999
|
+
return {
|
|
2000
|
+
found: true,
|
|
2001
|
+
supportsReasoning,
|
|
2002
|
+
efforts,
|
|
2003
|
+
defaultEffort: efforts.includes("medium") ? "medium" : efforts[0],
|
|
2004
|
+
source: "model-override"
|
|
2005
|
+
};
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
const providerEfforts = PROVIDER_REASONING_EFFORT_VALUES[p];
|
|
2009
|
+
if (providerEfforts) {
|
|
2010
|
+
return {
|
|
2011
|
+
found: false,
|
|
2012
|
+
supportsReasoning: providerEfforts.length > 0,
|
|
2013
|
+
efforts: providerEfforts,
|
|
2014
|
+
source: "provider-map"
|
|
2015
|
+
};
|
|
2016
|
+
}
|
|
2017
|
+
return {
|
|
2018
|
+
found: false,
|
|
2019
|
+
supportsReasoning: true,
|
|
2020
|
+
efforts: ["low", "medium", "high"],
|
|
2021
|
+
source: "provider-fallback"
|
|
2022
|
+
};
|
|
2023
|
+
}
|
|
2024
|
+
function resolveModelReasoningCapabilityWithCache(provider, model) {
|
|
2025
|
+
const p = (provider ?? "").toLowerCase();
|
|
2026
|
+
const m = (model ?? "").trim();
|
|
2027
|
+
if (p === "openrouter" && m) {
|
|
2028
|
+
const live = getCachedOpenRouterModelReasoning(m);
|
|
2029
|
+
if (live?.found) {
|
|
2030
|
+
return capabilityFromOpenRouterLive(live);
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
return resolveModelReasoningCapability(provider, model);
|
|
2034
|
+
}
|
|
2035
|
+
|
|
1761
2036
|
// packages/ai/llm/reasoningModels.ts
|
|
1762
2037
|
var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
|
|
1763
2038
|
"deepseek-flash",
|
|
@@ -1772,6 +2047,8 @@ var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
|
|
|
1772
2047
|
"gemini-3.1-pro-preview",
|
|
1773
2048
|
"gpt-5.5-pro",
|
|
1774
2049
|
"gpt-6-astra",
|
|
2050
|
+
"gpt-6.1-sol",
|
|
2051
|
+
"gpt-6-sol",
|
|
1775
2052
|
"gpt-6-luna",
|
|
1776
2053
|
"gpt-5.6-sol",
|
|
1777
2054
|
"gpt-5.6-terra",
|
|
@@ -1792,7 +2069,12 @@ var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
|
|
|
1792
2069
|
"accounts/fireworks/models/glm-5p2",
|
|
1793
2070
|
"zai-org/GLM-5.2-FP8"
|
|
1794
2071
|
]);
|
|
1795
|
-
var isModelSupportReasoningEffort = (model) =>
|
|
2072
|
+
var isModelSupportReasoningEffort = (model, provider) => {
|
|
2073
|
+
if (provider && provider.toLowerCase() === "openrouter") {
|
|
2074
|
+
return true;
|
|
2075
|
+
}
|
|
2076
|
+
return REASONING_MODEL_NAMES.has(model);
|
|
2077
|
+
};
|
|
1796
2078
|
var supportedReasoningModels = Array.from(REASONING_MODEL_NAMES);
|
|
1797
2079
|
var EFFORT_ORDER = [
|
|
1798
2080
|
"none",
|
|
@@ -1819,13 +2101,23 @@ function nearestSupportedEffort(effort, supported) {
|
|
|
1819
2101
|
}
|
|
1820
2102
|
return EFFORT_ORDER[best];
|
|
1821
2103
|
}
|
|
1822
|
-
function clampReasoningEffort(effort, provider) {
|
|
2104
|
+
function clampReasoningEffort(effort, provider, model) {
|
|
1823
2105
|
if (!effort) return void 0;
|
|
1824
2106
|
const normalized = effort === "off" ? "none" : effort;
|
|
1825
2107
|
const providerLower = (provider ?? "").toLowerCase();
|
|
1826
|
-
if (providerLower
|
|
2108
|
+
if (THINKING_MECHANISM_PROVIDERS.has(providerLower)) {
|
|
1827
2109
|
return void 0;
|
|
1828
2110
|
}
|
|
2111
|
+
if (model) {
|
|
2112
|
+
const cap = resolveModelReasoningCapabilityWithCache(provider, model);
|
|
2113
|
+
if (cap.found) {
|
|
2114
|
+
if (!cap.supportsReasoning || cap.efforts.length === 0) {
|
|
2115
|
+
return void 0;
|
|
2116
|
+
}
|
|
2117
|
+
if (cap.efforts.includes(normalized)) return normalized;
|
|
2118
|
+
return nearestSupportedEffort(normalized, cap.efforts);
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
1829
2121
|
const supported = PROVIDER_REASONING_EFFORT_VALUES[providerLower];
|
|
1830
2122
|
if (!supported || supported.length === 0) {
|
|
1831
2123
|
if (normalized === "low" || normalized === "medium" || normalized === "high") {
|
|
@@ -1883,6 +2175,9 @@ var MODEL_LOOKUP_MAP = {
|
|
|
1883
2175
|
...MODEL_MAP
|
|
1884
2176
|
};
|
|
1885
2177
|
var ANTHROPIC_MODEL_ALIASES = {
|
|
2178
|
+
"claude-opus-5.5": "claude-opus-5-5",
|
|
2179
|
+
"claude-sonnet-5.5": "claude-sonnet-5-5",
|
|
2180
|
+
"claude-haiku-5.5": "claude-haiku-5-5",
|
|
1886
2181
|
"claude-sonnet-4.6": "claude-3-7-sonnet-latest",
|
|
1887
2182
|
"claude-sonnet-4.5": "claude-3-5-sonnet-latest"
|
|
1888
2183
|
};
|
|
@@ -2097,6 +2392,7 @@ function getApiEndpoint(agent) {
|
|
|
2097
2392
|
}
|
|
2098
2393
|
|
|
2099
2394
|
export {
|
|
2395
|
+
anthropicOAuthModelMaxOutputTokens,
|
|
2100
2396
|
isAdaptiveThinkingModelId,
|
|
2101
2397
|
qwenModels,
|
|
2102
2398
|
qwenTokenPlanModels,
|
|
@@ -2106,6 +2402,7 @@ export {
|
|
|
2106
2402
|
stepfunStepPlanModels,
|
|
2107
2403
|
opencodeGoModels,
|
|
2108
2404
|
DEFAULT_REASONING_EFFORT,
|
|
2405
|
+
resolveModelReasoningCapabilityWithCache,
|
|
2109
2406
|
isModelSupportReasoningEffort,
|
|
2110
2407
|
clampReasoningEffort,
|
|
2111
2408
|
MODEL_LOOKUP_MAP,
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {
|
|
2
|
+
clipCompactText
|
|
3
|
+
} from "./chunk-5MMAK75Q.js";
|
|
4
|
+
import {
|
|
5
|
+
asRecordOrEmpty
|
|
6
|
+
} from "./chunk-KX6YBIHG.js";
|
|
7
|
+
import {
|
|
8
|
+
asOptionalTrimmedString
|
|
9
|
+
} from "./chunk-G3SUCT4W.js";
|
|
10
|
+
|
|
11
|
+
// packages/agent-runtime/fileWritePolicy.ts
|
|
12
|
+
function evaluateFileWritePolicy(args) {
|
|
13
|
+
if (args.sessionApproved) return { permissionDecision: "allow" };
|
|
14
|
+
return {
|
|
15
|
+
permissionDecision: "ask",
|
|
16
|
+
permissionRequest: {
|
|
17
|
+
id: "permission-file-write-session",
|
|
18
|
+
tool: args.tool,
|
|
19
|
+
action: "file_write",
|
|
20
|
+
title: "\u786E\u8BA4\u5199\u5165\u6587\u4EF6",
|
|
21
|
+
body: `\u672C\u4F1A\u8BDD\u9996\u6B21\u5199\u5165\u6587\u4EF6\uFF1A${args.path}\u3002\u6279\u51C6\u540E\u672C\u4F1A\u8BDD\u540E\u7EED\u5199\u5165\u4E0D\u518D\u9010\u6B21\u786E\u8BA4\u3002`,
|
|
22
|
+
command: args.path,
|
|
23
|
+
suggestedRule: {
|
|
24
|
+
scope: "session",
|
|
25
|
+
pattern: { capability: "file_write", target: "session" }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// packages/agent-runtime/parseToolArguments.ts
|
|
32
|
+
function parseToolArgumentsJson(raw) {
|
|
33
|
+
if (!raw?.trim()) return {};
|
|
34
|
+
try {
|
|
35
|
+
return asRecordOrEmpty(JSON.parse(raw));
|
|
36
|
+
} catch {
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// packages/agent-runtime/summarizeToolArguments.ts
|
|
42
|
+
function clip(value, max = 240) {
|
|
43
|
+
return clipCompactText(value, max);
|
|
44
|
+
}
|
|
45
|
+
function summarizeToolArguments(toolName, rawArgs) {
|
|
46
|
+
const args = parseToolArgumentsJson(rawArgs);
|
|
47
|
+
const pick = (...keys2) => {
|
|
48
|
+
for (const key of keys2) {
|
|
49
|
+
const value = asOptionalTrimmedString(args[key]);
|
|
50
|
+
if (value) return value;
|
|
51
|
+
}
|
|
52
|
+
return "";
|
|
53
|
+
};
|
|
54
|
+
const command = pick("command", "cmd", "runCommand", "executeCommand", "bash");
|
|
55
|
+
if (command) return clip(command);
|
|
56
|
+
const query = pick("query", "pattern", "search", "q");
|
|
57
|
+
if (query) return clip(query);
|
|
58
|
+
const filePath = pick("filePath", "file_path", "path", "filename", "file");
|
|
59
|
+
if (filePath) return clip(filePath);
|
|
60
|
+
const keys = Object.keys(args);
|
|
61
|
+
if (keys.length === 0) return "";
|
|
62
|
+
return clip(
|
|
63
|
+
keys.slice(0, 6).map((key) => {
|
|
64
|
+
const value = args[key];
|
|
65
|
+
if (typeof value === "string") return `${key}=${clip(value, 80)}`;
|
|
66
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
67
|
+
return `${key}=${String(value)}`;
|
|
68
|
+
}
|
|
69
|
+
if (Array.isArray(value)) return `${key}[${value.length}]`;
|
|
70
|
+
return `${key}=${value === null ? "null" : typeof value}`;
|
|
71
|
+
}).join(" ")
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export {
|
|
76
|
+
evaluateFileWritePolicy,
|
|
77
|
+
summarizeToolArguments
|
|
78
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readDbRecord,
|
|
3
3
|
writeAgentRecord
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-K6L5PNXK.js";
|
|
5
5
|
import {
|
|
6
6
|
buildSkillSummaryMarker
|
|
7
7
|
} from "./chunk-VF4K2QE6.js";
|
|
8
|
+
import {
|
|
9
|
+
createSpaceKey
|
|
10
|
+
} from "./chunk-UAD2WT54.js";
|
|
8
11
|
import {
|
|
9
12
|
parseUserIdFromAuthToken,
|
|
10
13
|
readOption,
|
|
11
14
|
resolveAuthToken,
|
|
12
15
|
resolveServerUrl
|
|
13
16
|
} from "./chunk-A7GB5UGH.js";
|
|
14
|
-
import {
|
|
15
|
-
createSpaceKey
|
|
16
|
-
} from "./chunk-UAD2WT54.js";
|
|
17
17
|
import {
|
|
18
18
|
asTrimmedLowercaseString
|
|
19
19
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7HYOPBUW.js";
|
|
4
4
|
import {
|
|
5
|
+
format,
|
|
5
6
|
prepareAndPersistMessage,
|
|
6
7
|
uiAskChoiceFunc,
|
|
7
8
|
uiAskChoiceFunctionSchema
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7AY2H3GA.js";
|
|
9
10
|
import {
|
|
10
|
-
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
formatISO
|
|
12
|
+
} from "./chunk-ZRAU6T47.js";
|
|
12
13
|
import {
|
|
13
14
|
buildBuiltinObjectSkillReference
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
|
|
17
|
-
PLATFORM_HOSTED_KIMI_PROVIDER
|
|
18
|
-
} from "./chunk-Q67DOFOO.js";
|
|
15
|
+
} from "./chunk-LUBFABMJ.js";
|
|
19
16
|
import {
|
|
20
17
|
read,
|
|
21
18
|
readAndWait,
|
|
22
19
|
removeCachedEntity,
|
|
23
20
|
upsertSSREntity,
|
|
24
21
|
write
|
|
25
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WPHY3VPF.js";
|
|
23
|
+
import {
|
|
24
|
+
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
|
|
25
|
+
PLATFORM_HOSTED_KIMI_PROVIDER
|
|
26
|
+
} from "./chunk-SZC4REES.js";
|
|
27
|
+
import {
|
|
28
|
+
extractCustomId
|
|
29
|
+
} from "./chunk-M2EJHDJP.js";
|
|
30
|
+
import {
|
|
31
|
+
isRecord
|
|
32
|
+
} from "./chunk-KUG52IAP.js";
|
|
26
33
|
import {
|
|
27
34
|
createAgentKey,
|
|
28
35
|
createDialogKey,
|
|
@@ -30,34 +37,22 @@ import {
|
|
|
30
37
|
dialogMessageRange,
|
|
31
38
|
memoryOwnerRange,
|
|
32
39
|
memorySubjectKindRange
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import {
|
|
35
|
-
extractCustomId
|
|
36
|
-
} from "./chunk-M2EJHDJP.js";
|
|
40
|
+
} from "./chunk-OKGVNZTL.js";
|
|
37
41
|
import {
|
|
38
42
|
isDevelopment
|
|
39
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-HIM3FCLF.js";
|
|
40
44
|
import {
|
|
41
45
|
selectIdentityUserId
|
|
42
46
|
} from "./chunk-SEJ5OS6F.js";
|
|
43
47
|
import {
|
|
44
|
-
|
|
45
|
-
} from "./chunk-
|
|
48
|
+
asOptionalPositiveFiniteNumber
|
|
49
|
+
} from "./chunk-U6VC4MU4.js";
|
|
46
50
|
import {
|
|
47
51
|
asTrimmedString
|
|
48
52
|
} from "./chunk-3EUW3WEO.js";
|
|
49
|
-
import {
|
|
50
|
-
asOptionalPositiveFiniteNumber
|
|
51
|
-
} from "./chunk-U6VC4MU4.js";
|
|
52
53
|
import {
|
|
53
54
|
asOptionalTrimmedString
|
|
54
55
|
} from "./chunk-G3SUCT4W.js";
|
|
55
|
-
import {
|
|
56
|
-
__toESM
|
|
57
|
-
} from "./chunk-4VNS5WPM.js";
|
|
58
|
-
|
|
59
|
-
// packages/chat/dialog/actions/createDialogAction.ts
|
|
60
|
-
var import_date_fns = __toESM(require_date_fns());
|
|
61
56
|
|
|
62
57
|
// packages/chat/dialog/objectAssistantRegistry.ts
|
|
63
58
|
var OBJECT_ASSISTANT_TO_SKILL = {
|
|
@@ -811,7 +806,7 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
811
806
|
preview: recentRelationshipRecapResolution.recap ?? null
|
|
812
807
|
});
|
|
813
808
|
}
|
|
814
|
-
const time =
|
|
809
|
+
const time = format(/* @__PURE__ */ new Date(), "MM-dd HH:mm");
|
|
815
810
|
const title = titleOverride || (agentMode === "auto" ? "\u65B0\u5BF9\u8BDD" : agentConfig?.name || "Agent") + " " + time;
|
|
816
811
|
const spaceId = explicitSpaceId;
|
|
817
812
|
const dialogPath = createDialogKey(userId);
|
|
@@ -853,7 +848,7 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
853
848
|
...agentMode === "auto" && autoRoute ? { autoRoute } : {},
|
|
854
849
|
title,
|
|
855
850
|
type: "dialog" /* DIALOG */,
|
|
856
|
-
createdAt:
|
|
851
|
+
createdAt: formatISO(/* @__PURE__ */ new Date()),
|
|
857
852
|
...spaceId && { spaceId },
|
|
858
853
|
category,
|
|
859
854
|
referenceKeys,
|