@qwen-code/qwen-code 0.18.4 → 0.18.5-nightly.20260622.6bc3f853e
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/bundled/qc-helper/docs/configuration/auth.md +7 -6
- package/bundled/qc-helper/docs/configuration/model-providers.md +16 -2
- package/bundled/qc-helper/docs/configuration/settings.md +26 -26
- package/bundled/qc-helper/docs/features/approval-mode.md +2 -0
- package/bundled/qc-helper/docs/features/mcp.md +49 -0
- package/chunks/{agent-LYTC56HT.js → agent-WFLPE5MW.js} +21 -21
- package/chunks/{agent-headless-FPUP5WHP.js → agent-headless-Q27MG73I.js} +21 -21
- package/chunks/{anthropicContentGenerator-OLOGBVLP.js → anthropicContentGenerator-5S4OMMNL.js} +9 -7
- package/chunks/{askUserQuestion-ANRVSBIJ.js → askUserQuestion-WHVYL2S2.js} +2 -2
- package/chunks/{ca-K6MD665I.js → ca-7WC7ELX6.js} +1 -0
- package/chunks/{chunk-M5VYHAHT.js → chunk-26ZYKTYZ.js} +2 -2
- package/chunks/{chunk-7OCZ77KA.js → chunk-2O3NAOJG.js} +1 -1
- package/chunks/{chunk-HU3RKEK2.js → chunk-42HGOMED.js} +1 -1
- package/chunks/{chunk-GBTJHKQ6.js → chunk-7Z2O7IBO.js} +7 -7
- package/chunks/{chunk-WWU2KUSR.js → chunk-AE6RQU6F.js} +1 -1
- package/chunks/{chunk-F6FP3URI.js → chunk-ATLUHLZE.js} +1 -1
- package/chunks/{chunk-4HMWGHPP.js → chunk-C6MI2ASN.js} +2 -2
- package/chunks/{chunk-VWPDSQZY.js → chunk-CTHZVIMD.js} +2 -2
- package/chunks/{chunk-IUEQOXOI.js → chunk-CX3SGIPK.js} +2 -2
- package/chunks/{chunk-32SSXBMG.js → chunk-CXZV4Q4J.js} +3202 -2678
- package/chunks/{chunk-SZWDOOGV.js → chunk-EJ6NFQ2L.js} +11 -11
- package/chunks/{chunk-FPZF3BNV.js → chunk-FH4P6RQA.js} +1 -1
- package/chunks/{chunk-PTGKSUUJ.js → chunk-G4BUMVEY.js} +11 -1
- package/chunks/{chunk-JN6FVOPP.js → chunk-GBN55AWZ.js} +2 -2
- package/chunks/{chunk-6Z2MVJIJ.js → chunk-GM3LTU6K.js} +15 -15
- package/chunks/{chunk-JJHY7NAD.js → chunk-GOMVJKBL.js} +1 -1
- package/chunks/{chunk-JIJBNW4A.js → chunk-ID533GA3.js} +1 -1
- package/chunks/{chunk-E5SRTXRG.js → chunk-KGV3F6UF.js} +1 -1
- package/chunks/{chunk-4TW2JM5Q.js → chunk-LF6BKGZT.js} +3 -3
- package/chunks/{chunk-N5QHMPZU.js → chunk-LTN3VYMZ.js} +1 -1
- package/chunks/{chunk-DZCZZPCY.js → chunk-MSJ2MXJ6.js} +3 -3
- package/chunks/{chunk-5RVEAAD2.js → chunk-QBUR6J4B.js} +6 -6
- package/chunks/{chunk-LXUQBWQA.js → chunk-SWGPABMH.js} +62 -11
- package/chunks/{chunk-AQDPHFDZ.js → chunk-VKILGMZQ.js} +1 -1
- package/chunks/{chunk-IKOWINH4.js → chunk-WE6TNQJU.js} +6 -2
- package/chunks/{chunk-2ES3D3TW.js → chunk-XGU3ETVO.js} +3 -3
- package/chunks/{chunk-7GX7XYZU.js → chunk-XU7BKR3B.js} +3 -3
- package/chunks/{computer-use-P4WQBATW.js → computer-use-F5O56FVW.js} +23 -22
- package/chunks/{contextCommand-POQ6GYN3.js → contextCommand-WBVNKL2C.js} +23 -23
- package/chunks/{cron-create-OKGQO6GX.js → cron-create-THNDTYXU.js} +4 -4
- package/chunks/{cron-delete-DTJP7L6O.js → cron-delete-BS5H6TFJ.js} +4 -4
- package/chunks/{cron-list-VKZUASFG.js → cron-list-7OBVHT7K.js} +4 -4
- package/chunks/{de-K2F3T3TR.js → de-ACHALDED.js} +1 -0
- package/chunks/{dist-OLC6NBSB.js → dist-DZ6AJDX4.js} +1 -1
- package/chunks/{dist-QUSDBLAK.js → dist-GKRNVFBH.js} +4 -0
- package/chunks/{edit-CS7DSS4Z.js → edit-UV7MBOJU.js} +21 -21
- package/chunks/{en-KGSAKBJP.js → en-S3OQBISC.js} +1 -0
- package/chunks/{enter-worktree-PA4HPHJK.js → enter-worktree-TSCHZMJ3.js} +21 -21
- package/chunks/{enterPlanMode-SFE5AFKZ.js → enterPlanMode-LKS7VIUG.js} +26 -26
- package/chunks/{exit-worktree-FR3AZTC6.js → exit-worktree-Q6EWFLZU.js} +21 -21
- package/chunks/{exitPlanMode-AHOUO44D.js → exitPlanMode-HS6I4D2O.js} +21 -21
- package/chunks/{fr-2CAQEOK6.js → fr-GVKZ27MF.js} +1 -0
- package/chunks/{geminiContentGenerator-AXCVDKGI.js → geminiContentGenerator-GEZ63VSW.js} +4 -4
- package/chunks/{glob-BQPAW3IW.js → glob-ZN5LKB7E.js} +21 -21
- package/chunks/{grep-2F7BL5TQ.js → grep-NIKBBYBU.js} +21 -21
- package/chunks/{ja-QWL7V6OJ.js → ja-FKZ2WZ4D.js} +1 -0
- package/chunks/{keychain-token-storage-ALKQXYJQ.js → keychain-token-storage-YHXIWXIB.js} +2 -2
- package/chunks/{loop-wakeup-RX6YIUSG.js → loop-wakeup-SSBWZ64K.js} +5 -5
- package/chunks/{ls-6PLNWHMU.js → ls-YPFUHZRQ.js} +3 -3
- package/chunks/{lsp-3HFQU4OF.js → lsp-FD6DNVAF.js} +2 -2
- package/chunks/{monitor-YTTMDFW2.js → monitor-A25XKPU5.js} +21 -21
- package/chunks/{notebook-edit-7TNZMTBR.js → notebook-edit-E72AIOUS.js} +21 -21
- package/chunks/{openaiContentGenerator-JA6YXXPI.js → openaiContentGenerator-ZDLZDXLU.js} +13 -11
- package/chunks/{pt-2SPOLMAY.js → pt-SY5NCFGR.js} +1 -0
- package/chunks/{qwenContentGenerator-NBOVGW7B.js → qwenContentGenerator-HVJPPMTT.js} +24 -24
- package/chunks/{qwenOAuth2-XWC5SU63.js → qwenOAuth2-WZ54YZ4J.js} +4 -4
- package/chunks/{read-file-RUBU3KUA.js → read-file-L6FM3KUX.js} +8 -8
- package/chunks/{ripGrep-TPFC7KZF.js → ripGrep-YRJCUISE.js} +21 -21
- package/chunks/{ru-35IVJTEH.js → ru-FWNXJG4F.js} +1 -0
- package/chunks/{scheduler-NTVF45LR.js → scheduler-M3742P2I.js} +21 -21
- package/chunks/{send-message-IIT3SHA7.js → send-message-FWFTX62Q.js} +2 -2
- package/chunks/{serve-J6VG37OX.js → serve-ZIP2GDFY.js} +6942 -6809
- package/chunks/{shell-EQQEHEFI.js → shell-T5VSPJLU.js} +21 -21
- package/chunks/{skill-QWRWJCQJ.js → skill-ETTFYDOV.js} +10 -10
- package/chunks/{src-LNADIG5P.js → src-UKOPSYDK.js} +47 -21
- package/chunks/{syntheticOutput-H67FYXU7.js → syntheticOutput-JY5NEDTV.js} +3 -3
- package/chunks/{task-create-OVXHSHAI.js → task-create-IGILDV25.js} +6 -6
- package/chunks/{task-list-QUUCQJ3U.js → task-list-KBEJVAAG.js} +5 -5
- package/chunks/{task-stop-WA5DMTKK.js → task-stop-WFTMQ6AC.js} +2 -2
- package/chunks/{task-update-PC5427TI.js → task-update-UIVX7ZEV.js} +6 -6
- package/chunks/{team-create-TXWQL777.js → team-create-DRKUVGBN.js} +21 -21
- package/chunks/{team-delete-ZTEMYRJ3.js → team-delete-LPOXDPVB.js} +5 -5
- package/chunks/{todoWrite-J6L6ELD6.js → todoWrite-R4RIJKOD.js} +4 -4
- package/chunks/{tool-search-JAVM7ABF.js → tool-search-EIIK27ON.js} +8 -8
- package/chunks/{web-fetch-6XLPPTP7.js → web-fetch-JU7SS6KE.js} +4 -4
- package/chunks/{workflow-7LN3L6KK.js → workflow-4RGAYFSJ.js} +22 -22
- package/chunks/{write-file-DAKE7YKB.js → write-file-GLQYJFEZ.js} +21 -21
- package/chunks/{zh-X4KM6MTW.js → zh-QXLZV2PX.js} +1 -0
- package/chunks/{zh-TW-BSG6BUWK.js → zh-TW-3OKU7LDA.js} +1 -0
- package/cli.js +1054 -657
- package/locales/ca.js +2 -1
- package/locales/de.js +1 -0
- package/locales/en.js +1 -0
- package/locales/fr.js +1 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +1 -0
- package/locales/ru.js +1 -0
- package/locales/zh-TW.js +1 -0
- package/locales/zh.js +1 -0
- package/package.json +2 -2
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
resolveBundleDir
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CXZV4Q4J.js";
|
|
6
6
|
import {
|
|
7
7
|
Storage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WE6TNQJU.js";
|
|
9
9
|
import {
|
|
10
10
|
init_esbuild_shims
|
|
11
11
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -169,15 +169,15 @@ init_esbuild_shims();
|
|
|
169
169
|
|
|
170
170
|
// import("./locales/**/*.js") in packages/cli/src/i18n/index.ts
|
|
171
171
|
var globImport_locales_js = __glob({
|
|
172
|
-
"./locales/ca.js": () => import("./ca-
|
|
173
|
-
"./locales/de.js": () => import("./de-
|
|
174
|
-
"./locales/en.js": () => import("./en-
|
|
175
|
-
"./locales/fr.js": () => import("./fr-
|
|
176
|
-
"./locales/ja.js": () => import("./ja-
|
|
177
|
-
"./locales/pt.js": () => import("./pt-
|
|
178
|
-
"./locales/ru.js": () => import("./ru-
|
|
179
|
-
"./locales/zh-TW.js": () => import("./zh-TW-
|
|
180
|
-
"./locales/zh.js": () => import("./zh-
|
|
172
|
+
"./locales/ca.js": () => import("./ca-7WC7ELX6.js"),
|
|
173
|
+
"./locales/de.js": () => import("./de-ACHALDED.js"),
|
|
174
|
+
"./locales/en.js": () => import("./en-S3OQBISC.js"),
|
|
175
|
+
"./locales/fr.js": () => import("./fr-GVKZ27MF.js"),
|
|
176
|
+
"./locales/ja.js": () => import("./ja-FKZ2WZ4D.js"),
|
|
177
|
+
"./locales/pt.js": () => import("./pt-SY5NCFGR.js"),
|
|
178
|
+
"./locales/ru.js": () => import("./ru-FWNXJG4F.js"),
|
|
179
|
+
"./locales/zh-TW.js": () => import("./zh-TW-3OKU7LDA.js"),
|
|
180
|
+
"./locales/zh.js": () => import("./zh-QXLZV2PX.js")
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
// packages/cli/src/i18n/index.ts
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
createDebugLogger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WE6TNQJU.js";
|
|
6
6
|
import {
|
|
7
7
|
init_esbuild_shims
|
|
8
8
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -381,6 +381,15 @@ var DEFAULT_TOKEN_LIMIT = 131072;
|
|
|
381
381
|
var DEFAULT_OUTPUT_TOKEN_LIMIT = 32e3;
|
|
382
382
|
var CAPPED_DEFAULT_MAX_TOKENS = 8e3;
|
|
383
383
|
var ESCALATED_MAX_TOKENS = 64e3;
|
|
384
|
+
function parsePositiveIntegerEnvValue(raw) {
|
|
385
|
+
if (raw === void 0) return void 0;
|
|
386
|
+
const trimmed = raw.trim();
|
|
387
|
+
if (!/^\d+$/.test(trimmed)) return void 0;
|
|
388
|
+
const parsed = Number(trimmed);
|
|
389
|
+
if (!Number.isSafeInteger(parsed) || parsed <= 0) return void 0;
|
|
390
|
+
return parsed;
|
|
391
|
+
}
|
|
392
|
+
__name(parsePositiveIntegerEnvValue, "parsePositiveIntegerEnvValue");
|
|
384
393
|
var LIMITS = {
|
|
385
394
|
"32k": 32768,
|
|
386
395
|
"64k": 65536,
|
|
@@ -1393,6 +1402,7 @@ export {
|
|
|
1393
1402
|
DEFAULT_OUTPUT_TOKEN_LIMIT,
|
|
1394
1403
|
CAPPED_DEFAULT_MAX_TOKENS,
|
|
1395
1404
|
ESCALATED_MAX_TOKENS,
|
|
1405
|
+
parsePositiveIntegerEnvValue,
|
|
1396
1406
|
normalize,
|
|
1397
1407
|
hasExplicitOutputLimit,
|
|
1398
1408
|
knownTokenLimit,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
createTask
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XU7BKR3B.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveActiveTeamName
|
|
8
8
|
} from "./chunk-LD2XBG6Z.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
BaseToolInvocation,
|
|
12
12
|
ToolDisplayNames,
|
|
13
13
|
ToolNames
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GOMVJKBL.js";
|
|
15
15
|
import {
|
|
16
16
|
init_esbuild_shims
|
|
17
17
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -23,23 +23,23 @@ import {
|
|
|
23
23
|
} from "./chunk-OMX7CUOE.js";
|
|
24
24
|
import {
|
|
25
25
|
isAnyAutoMemPath
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FH4P6RQA.js";
|
|
27
27
|
import {
|
|
28
28
|
InstallationManager
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-CTHZVIMD.js";
|
|
30
30
|
import {
|
|
31
31
|
STRUCTURED_OUTPUT_REDACTED_ARGS
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-VKILGMZQ.js";
|
|
33
33
|
import {
|
|
34
34
|
BaseDeclarativeTool,
|
|
35
35
|
BaseToolInvocation,
|
|
36
36
|
ToolDisplayNames,
|
|
37
37
|
ToolNames
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-GOMVJKBL.js";
|
|
39
39
|
import {
|
|
40
40
|
atomicWriteFile,
|
|
41
41
|
atomicWriteFileSync
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-LTN3VYMZ.js";
|
|
43
43
|
import {
|
|
44
44
|
DEFAULT_OPENAI_BASE_URL,
|
|
45
45
|
convertSchema,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
runtimeDiagnostics,
|
|
48
48
|
safeJsonParse,
|
|
49
49
|
tokenLimit
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-G4BUMVEY.js";
|
|
51
51
|
import {
|
|
52
52
|
FinishReason,
|
|
53
53
|
GenerateContentResponse
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
setShellTracePropagation,
|
|
71
71
|
shortenPath,
|
|
72
72
|
unescapePath
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-WE6TNQJU.js";
|
|
74
74
|
import {
|
|
75
75
|
require_dist
|
|
76
76
|
} from "./chunk-ZERZSAZL.js";
|
|
@@ -66985,7 +66985,7 @@ var OpenAILogger = class {
|
|
|
66985
66985
|
try {
|
|
66986
66986
|
const files = await fs4.readdir(this.logDir);
|
|
66987
66987
|
const logFiles = files.filter((file) => file.startsWith("openai-") && file.endsWith(".json")).map((file) => path5.join(this.logDir, file)).sort().reverse();
|
|
66988
|
-
return limit ? logFiles.slice(0, limit)
|
|
66988
|
+
return limit === void 0 ? logFiles : logFiles.slice(0, limit);
|
|
66989
66989
|
} catch (error) {
|
|
66990
66990
|
if (error.code === "ENOENT") {
|
|
66991
66991
|
return [];
|
|
@@ -70725,7 +70725,7 @@ var MODALITY_PATTERNS = [
|
|
|
70725
70725
|
// -------------------
|
|
70726
70726
|
// Moonshot / Kimi
|
|
70727
70727
|
// -------------------
|
|
70728
|
-
[/^kimi-k2
|
|
70728
|
+
[/^kimi-k2\./, { image: true, video: true }],
|
|
70729
70729
|
[/^kimi-/, {}],
|
|
70730
70730
|
// -------------------
|
|
70731
70731
|
// ByteDance Doubao — Seed-series and *-vision / *-vl models accept image
|
|
@@ -72100,11 +72100,11 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
|
|
|
72100
72100
|
let baseGenerator;
|
|
72101
72101
|
try {
|
|
72102
72102
|
if (authType === "openai" /* USE_OPENAI */) {
|
|
72103
|
-
const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-
|
|
72103
|
+
const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-ZDLZDXLU.js");
|
|
72104
72104
|
baseGenerator = createOpenAIContentGenerator(generatorConfig, config);
|
|
72105
72105
|
} else if (authType === "qwen-oauth" /* QWEN_OAUTH */) {
|
|
72106
|
-
const { getQwenOAuthClient: getQwenOauthClient } = await import("./qwenOAuth2-
|
|
72107
|
-
const { QwenContentGenerator } = await import("./qwenContentGenerator-
|
|
72106
|
+
const { getQwenOAuthClient: getQwenOauthClient } = await import("./qwenOAuth2-WZ54YZ4J.js");
|
|
72107
|
+
const { QwenContentGenerator } = await import("./qwenContentGenerator-HVJPPMTT.js");
|
|
72108
72108
|
try {
|
|
72109
72109
|
const qwenClient = await getQwenOauthClient(
|
|
72110
72110
|
config,
|
|
@@ -72122,10 +72122,10 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
|
|
|
72122
72122
|
throw new Error(error instanceof Error ? error.message : String(error));
|
|
72123
72123
|
}
|
|
72124
72124
|
} else if (authType === "anthropic" /* USE_ANTHROPIC */) {
|
|
72125
|
-
const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-
|
|
72125
|
+
const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-5S4OMMNL.js");
|
|
72126
72126
|
baseGenerator = createAnthropicContentGenerator(generatorConfig, config);
|
|
72127
72127
|
} else if (authType === "gemini" /* USE_GEMINI */ || authType === "vertex-ai" /* USE_VERTEX_AI */) {
|
|
72128
|
-
const { createGeminiContentGenerator } = await import("./geminiContentGenerator-
|
|
72128
|
+
const { createGeminiContentGenerator } = await import("./geminiContentGenerator-GEZ63VSW.js");
|
|
72129
72129
|
baseGenerator = createGeminiContentGenerator(generatorConfig, config);
|
|
72130
72130
|
} else {
|
|
72131
72131
|
throw new Error(
|
|
@@ -72933,7 +72933,7 @@ var QwenLogger = class _QwenLogger {
|
|
|
72933
72933
|
getProxyAgent() {
|
|
72934
72934
|
const proxyUrl = this.config?.getProxy();
|
|
72935
72935
|
if (!proxyUrl) return void 0;
|
|
72936
|
-
if (
|
|
72936
|
+
if (/^https?:\/\//i.test(proxyUrl)) {
|
|
72937
72937
|
return new import_https_proxy_agent.HttpsProxyAgent(proxyUrl);
|
|
72938
72938
|
} else {
|
|
72939
72939
|
throw new Error("Unsupported proxy type");
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import {
|
|
4
4
|
getInboxesDir,
|
|
5
5
|
require_proper_lockfile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-26ZYKTYZ.js";
|
|
7
7
|
import {
|
|
8
8
|
Mutex
|
|
9
9
|
} from "./chunk-OMX7CUOE.js";
|
|
10
10
|
import {
|
|
11
11
|
atomicWriteJSON
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LTN3VYMZ.js";
|
|
13
13
|
import {
|
|
14
14
|
createDebugLogger,
|
|
15
15
|
isNodeError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WE6TNQJU.js";
|
|
17
17
|
import {
|
|
18
18
|
init_esbuild_shims
|
|
19
19
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
formatFetchErrorForUser
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ATLUHLZE.js";
|
|
6
6
|
import {
|
|
7
7
|
combineAbortSignals
|
|
8
8
|
} from "./chunk-64WXLC72.js";
|
|
9
9
|
import {
|
|
10
10
|
atomicWriteFile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LTN3VYMZ.js";
|
|
12
12
|
import {
|
|
13
13
|
Storage,
|
|
14
14
|
createDebugLogger
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WE6TNQJU.js";
|
|
16
16
|
import {
|
|
17
17
|
init_esbuild_shims
|
|
18
18
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
t
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EJ6NFQ2L.js";
|
|
6
6
|
import {
|
|
7
7
|
computeThresholds,
|
|
8
8
|
getCoreSystemPrompt
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CXZV4Q4J.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSkillLlmContent
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ID533GA3.js";
|
|
13
13
|
import {
|
|
14
14
|
DiscoveredMCPTool,
|
|
15
15
|
uiTelemetryService
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GM3LTU6K.js";
|
|
17
17
|
import {
|
|
18
18
|
ToolNames
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GOMVJKBL.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_TOKEN_LIMIT
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-G4BUMVEY.js";
|
|
23
23
|
import {
|
|
24
24
|
init_esbuild_shims
|
|
25
25
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
RequestTokenizer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CX3SGIPK.js";
|
|
6
6
|
import {
|
|
7
7
|
OpenAIContentConverter,
|
|
8
8
|
TaggedThinkingParser,
|
|
9
9
|
openaiRequestCaptureContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GM3LTU6K.js";
|
|
11
11
|
import {
|
|
12
12
|
createChildAbortController
|
|
13
13
|
} from "./chunk-64WXLC72.js";
|
|
14
14
|
import {
|
|
15
15
|
buildRuntimeFetchOptions,
|
|
16
16
|
redactProxyError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-42HGOMED.js";
|
|
18
18
|
import {
|
|
19
19
|
CAPPED_DEFAULT_MAX_TOKENS,
|
|
20
20
|
DASHSCOPE_PROXY_BASE_URL,
|
|
@@ -22,17 +22,18 @@ import {
|
|
|
22
22
|
DEFAULT_MAX_RETRIES,
|
|
23
23
|
DEFAULT_TIMEOUT,
|
|
24
24
|
hasExplicitOutputLimit,
|
|
25
|
+
parsePositiveIntegerEnvValue,
|
|
25
26
|
runtimeDiagnostics,
|
|
26
27
|
safeJsonParse,
|
|
27
28
|
tokenLimit
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-G4BUMVEY.js";
|
|
29
30
|
import {
|
|
30
31
|
GenerateContentResponse
|
|
31
32
|
} from "./chunk-55ZMG67I.js";
|
|
32
33
|
import {
|
|
33
34
|
createDebugLogger,
|
|
34
35
|
isAbortError
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-WE6TNQJU.js";
|
|
36
37
|
import {
|
|
37
38
|
init_esbuild_shims
|
|
38
39
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -7025,9 +7026,10 @@ var DefaultOpenAICompatibleProvider = class {
|
|
|
7025
7026
|
effectiveMaxTokens = userMaxTokens;
|
|
7026
7027
|
}
|
|
7027
7028
|
} else {
|
|
7028
|
-
const
|
|
7029
|
-
|
|
7030
|
-
|
|
7029
|
+
const envMaxTokens = parsePositiveIntegerEnvValue(
|
|
7030
|
+
process.env["QWEN_CODE_MAX_OUTPUT_TOKENS"]
|
|
7031
|
+
);
|
|
7032
|
+
if (envMaxTokens !== void 0) {
|
|
7031
7033
|
effectiveMaxTokens = isKnownModel ? Math.min(envMaxTokens, modelLimit) : envMaxTokens;
|
|
7032
7034
|
} else {
|
|
7033
7035
|
effectiveMaxTokens = Math.min(modelLimit, CAPPED_DEFAULT_MAX_TOKENS);
|
|
@@ -7049,7 +7051,14 @@ var ModelScopeOpenAICompatibleProvider = class extends DefaultOpenAICompatiblePr
|
|
|
7049
7051
|
* Checks if the configuration is for ModelScope.
|
|
7050
7052
|
*/
|
|
7051
7053
|
static isModelScopeProvider(config) {
|
|
7052
|
-
|
|
7054
|
+
const baseUrl = config.baseUrl ?? "";
|
|
7055
|
+
if (!baseUrl) return false;
|
|
7056
|
+
try {
|
|
7057
|
+
const hostname = new URL(baseUrl).hostname.toLowerCase();
|
|
7058
|
+
return hostname === "modelscope.cn" || hostname.endsWith(".modelscope.cn");
|
|
7059
|
+
} catch {
|
|
7060
|
+
return false;
|
|
7061
|
+
}
|
|
7053
7062
|
}
|
|
7054
7063
|
/**
|
|
7055
7064
|
* ModelScope does not support `stream_options` when `stream` is false.
|
|
@@ -7469,8 +7478,14 @@ var OpenRouterOpenAICompatibleProvider = class extends DefaultOpenAICompatiblePr
|
|
|
7469
7478
|
super(contentGeneratorConfig, cliConfig);
|
|
7470
7479
|
}
|
|
7471
7480
|
static isOpenRouterProvider(contentGeneratorConfig) {
|
|
7472
|
-
const baseURL = contentGeneratorConfig.baseUrl
|
|
7473
|
-
|
|
7481
|
+
const baseURL = contentGeneratorConfig.baseUrl ?? "";
|
|
7482
|
+
if (!baseURL) return false;
|
|
7483
|
+
try {
|
|
7484
|
+
const hostname = new URL(baseURL).hostname.toLowerCase();
|
|
7485
|
+
return hostname === "openrouter.ai" || hostname.endsWith(".openrouter.ai");
|
|
7486
|
+
} catch {
|
|
7487
|
+
return false;
|
|
7488
|
+
}
|
|
7474
7489
|
}
|
|
7475
7490
|
buildHeaders() {
|
|
7476
7491
|
const baseHeaders = super.buildHeaders();
|
|
@@ -7482,6 +7497,35 @@ var OpenRouterOpenAICompatibleProvider = class extends DefaultOpenAICompatiblePr
|
|
|
7482
7497
|
}
|
|
7483
7498
|
};
|
|
7484
7499
|
|
|
7500
|
+
// packages/core/src/core/openaiContentGenerator/provider/requesty.ts
|
|
7501
|
+
init_esbuild_shims();
|
|
7502
|
+
var RequestyOpenAICompatibleProvider = class extends DefaultOpenAICompatibleProvider {
|
|
7503
|
+
static {
|
|
7504
|
+
__name(this, "RequestyOpenAICompatibleProvider");
|
|
7505
|
+
}
|
|
7506
|
+
constructor(contentGeneratorConfig, cliConfig) {
|
|
7507
|
+
super(contentGeneratorConfig, cliConfig);
|
|
7508
|
+
}
|
|
7509
|
+
static isRequestyProvider(contentGeneratorConfig) {
|
|
7510
|
+
const baseURL = contentGeneratorConfig.baseUrl || "";
|
|
7511
|
+
if (!baseURL) return false;
|
|
7512
|
+
try {
|
|
7513
|
+
const host = new URL(baseURL).hostname.toLowerCase();
|
|
7514
|
+
return host === "router.requesty.ai" || host.endsWith(".requesty.ai");
|
|
7515
|
+
} catch {
|
|
7516
|
+
return false;
|
|
7517
|
+
}
|
|
7518
|
+
}
|
|
7519
|
+
buildHeaders() {
|
|
7520
|
+
const baseHeaders = super.buildHeaders();
|
|
7521
|
+
return {
|
|
7522
|
+
...baseHeaders,
|
|
7523
|
+
"HTTP-Referer": "https://github.com/QwenLM/qwen-code.git",
|
|
7524
|
+
"X-Title": "Qwen Code"
|
|
7525
|
+
};
|
|
7526
|
+
}
|
|
7527
|
+
};
|
|
7528
|
+
|
|
7485
7529
|
// packages/core/src/core/openaiContentGenerator/provider/minimax.ts
|
|
7486
7530
|
init_esbuild_shims();
|
|
7487
7531
|
var MINIMAX_KNOWN_HOSTS = ["api.minimaxi.com", "api.minimax.io"];
|
|
@@ -8480,6 +8524,12 @@ function determineProvider(contentGeneratorConfig, cliConfig) {
|
|
|
8480
8524
|
cliConfig
|
|
8481
8525
|
);
|
|
8482
8526
|
}
|
|
8527
|
+
if (RequestyOpenAICompatibleProvider.isRequestyProvider(config)) {
|
|
8528
|
+
return new RequestyOpenAICompatibleProvider(
|
|
8529
|
+
contentGeneratorConfig,
|
|
8530
|
+
cliConfig
|
|
8531
|
+
);
|
|
8532
|
+
}
|
|
8483
8533
|
if (ModelScopeOpenAICompatibleProvider.isModelScopeProvider(config)) {
|
|
8484
8534
|
return new ModelScopeOpenAICompatibleProvider(
|
|
8485
8535
|
contentGeneratorConfig,
|
|
@@ -8506,6 +8556,7 @@ export {
|
|
|
8506
8556
|
DashScopeOpenAICompatibleProvider,
|
|
8507
8557
|
DeepSeekOpenAICompatibleProvider,
|
|
8508
8558
|
OpenRouterOpenAICompatibleProvider,
|
|
8559
|
+
RequestyOpenAICompatibleProvider,
|
|
8509
8560
|
MiniMaxOpenAICompatibleProvider,
|
|
8510
8561
|
MistralOpenAICompatibleProvider,
|
|
8511
8562
|
MiMoOpenAICompatibleProvider,
|
|
@@ -427,6 +427,11 @@ var IDE_DIR_NAME = "ide";
|
|
|
427
427
|
var PLANS_DIR_NAME = "plans";
|
|
428
428
|
var DEBUG_DIR_NAME = "debug";
|
|
429
429
|
var ARENA_DIR_NAME = "arena";
|
|
430
|
+
function isResolvedPathWithinDirectory(childPath, parentPath) {
|
|
431
|
+
const relativePath = path2.relative(parentPath, childPath);
|
|
432
|
+
return relativePath === "" || !relativePath.startsWith(`..${path2.sep}`) && relativePath !== ".." && !path2.isAbsolute(relativePath);
|
|
433
|
+
}
|
|
434
|
+
__name(isResolvedPathWithinDirectory, "isResolvedPathWithinDirectory");
|
|
430
435
|
var Storage = class _Storage {
|
|
431
436
|
static {
|
|
432
437
|
__name(this, "Storage");
|
|
@@ -584,8 +589,7 @@ var Storage = class _Storage {
|
|
|
584
589
|
static isPathWithinDirectory(childPath, parentPath) {
|
|
585
590
|
const realParent = _Storage.resolvePathThroughExistingAncestor(parentPath);
|
|
586
591
|
const realChild = _Storage.resolvePathThroughExistingAncestor(childPath);
|
|
587
|
-
|
|
588
|
-
return relativePath === "" || !relativePath.startsWith("..") && !path2.isAbsolute(relativePath);
|
|
592
|
+
return isResolvedPathWithinDirectory(realChild, realParent);
|
|
589
593
|
}
|
|
590
594
|
static assertPathWithinDirectory(childPath, parentPath, errorMessage) {
|
|
591
595
|
if (!_Storage.isPathWithinDirectory(childPath, parentPath)) {
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
readCronTasks,
|
|
16
16
|
removeCronTasks,
|
|
17
17
|
updateCronTasks
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-C6MI2ASN.js";
|
|
19
19
|
import {
|
|
20
20
|
ToolNames
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GOMVJKBL.js";
|
|
22
22
|
import {
|
|
23
23
|
Storage,
|
|
24
24
|
createDebugLogger,
|
|
25
25
|
getProjectHash
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-WE6TNQJU.js";
|
|
27
27
|
import {
|
|
28
28
|
init_esbuild_shims
|
|
29
29
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import {
|
|
4
4
|
getTasksDir,
|
|
5
5
|
require_proper_lockfile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-26ZYKTYZ.js";
|
|
7
7
|
import {
|
|
8
8
|
Mutex
|
|
9
9
|
} from "./chunk-OMX7CUOE.js";
|
|
10
10
|
import {
|
|
11
11
|
atomicWriteJSON
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LTN3VYMZ.js";
|
|
13
13
|
import {
|
|
14
14
|
createDebugLogger,
|
|
15
15
|
isNodeError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WE6TNQJU.js";
|
|
17
17
|
import {
|
|
18
18
|
init_esbuild_shims
|
|
19
19
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -4,46 +4,46 @@ import {
|
|
|
4
4
|
Client,
|
|
5
5
|
StdioClientTransport,
|
|
6
6
|
extract
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CXZV4Q4J.js";
|
|
8
8
|
import "./chunk-K5PGHDBN.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-XU7BKR3B.js";
|
|
10
|
+
import "./chunk-2O3NAOJG.js";
|
|
11
|
+
import "./chunk-XGU3ETVO.js";
|
|
12
12
|
import "./chunk-2MPVVENX.js";
|
|
13
13
|
import "./chunk-ZTQ26VBE.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-C6MI2ASN.js";
|
|
15
|
+
import "./chunk-LF6BKGZT.js";
|
|
16
|
+
import "./chunk-26ZYKTYZ.js";
|
|
17
17
|
import "./chunk-MLZQVCF3.js";
|
|
18
18
|
import "./chunk-LD2XBG6Z.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-ID533GA3.js";
|
|
20
|
+
import "./chunk-KGV3F6UF.js";
|
|
21
21
|
import "./chunk-77WXWU44.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-AE6RQU6F.js";
|
|
23
23
|
import {
|
|
24
24
|
safeJsonStringify
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-GM3LTU6K.js";
|
|
26
26
|
import "./chunk-3PJXIDKI.js";
|
|
27
27
|
import "./chunk-UWCTAVOD.js";
|
|
28
28
|
import "./chunk-OFEVLU4C.js";
|
|
29
29
|
import "./chunk-OMX7CUOE.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-FH4P6RQA.js";
|
|
31
|
+
import "./chunk-CTHZVIMD.js";
|
|
32
|
+
import "./chunk-VKILGMZQ.js";
|
|
33
33
|
import {
|
|
34
34
|
BaseDeclarativeTool,
|
|
35
35
|
BaseToolInvocation
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-GOMVJKBL.js";
|
|
37
|
+
import "./chunk-MSJ2MXJ6.js";
|
|
38
|
+
import "./chunk-ATLUHLZE.js";
|
|
39
39
|
import "./chunk-64WXLC72.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-LTN3VYMZ.js";
|
|
41
|
+
import "./chunk-42HGOMED.js";
|
|
42
|
+
import "./chunk-G4BUMVEY.js";
|
|
43
43
|
import "./chunk-55ZMG67I.js";
|
|
44
44
|
import "./chunk-H6BD2ELD.js";
|
|
45
45
|
import "./chunk-5IFG2VC4.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-WE6TNQJU.js";
|
|
47
47
|
import "./chunk-ZERZSAZL.js";
|
|
48
48
|
import "./chunk-QN5NZ3UQ.js";
|
|
49
49
|
import "./chunk-BR4QREVK.js";
|
|
@@ -1970,7 +1970,8 @@ function coerceTypes(params, schema) {
|
|
|
1970
1970
|
const fieldType = properties[key]?.type;
|
|
1971
1971
|
if ((fieldType === "integer" || fieldType === "number") && typeof value === "string") {
|
|
1972
1972
|
const trimmed = value.trim();
|
|
1973
|
-
|
|
1973
|
+
const matchesType = fieldType === "integer" ? /^-?\d+$/.test(trimmed) : /^-?\d+(\.\d+)?$/.test(trimmed);
|
|
1974
|
+
if (matchesType) {
|
|
1974
1975
|
const parsed = fieldType === "integer" ? parseInt(trimmed, 10) : parseFloat(trimmed);
|
|
1975
1976
|
if (Number.isFinite(parsed)) {
|
|
1976
1977
|
result[key] = parsed;
|