@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.
Files changed (100) hide show
  1. package/bundled/qc-helper/docs/configuration/auth.md +7 -6
  2. package/bundled/qc-helper/docs/configuration/model-providers.md +16 -2
  3. package/bundled/qc-helper/docs/configuration/settings.md +26 -26
  4. package/bundled/qc-helper/docs/features/approval-mode.md +2 -0
  5. package/bundled/qc-helper/docs/features/mcp.md +49 -0
  6. package/chunks/{agent-LYTC56HT.js → agent-WFLPE5MW.js} +21 -21
  7. package/chunks/{agent-headless-FPUP5WHP.js → agent-headless-Q27MG73I.js} +21 -21
  8. package/chunks/{anthropicContentGenerator-OLOGBVLP.js → anthropicContentGenerator-5S4OMMNL.js} +9 -7
  9. package/chunks/{askUserQuestion-ANRVSBIJ.js → askUserQuestion-WHVYL2S2.js} +2 -2
  10. package/chunks/{ca-K6MD665I.js → ca-7WC7ELX6.js} +1 -0
  11. package/chunks/{chunk-M5VYHAHT.js → chunk-26ZYKTYZ.js} +2 -2
  12. package/chunks/{chunk-7OCZ77KA.js → chunk-2O3NAOJG.js} +1 -1
  13. package/chunks/{chunk-HU3RKEK2.js → chunk-42HGOMED.js} +1 -1
  14. package/chunks/{chunk-GBTJHKQ6.js → chunk-7Z2O7IBO.js} +7 -7
  15. package/chunks/{chunk-WWU2KUSR.js → chunk-AE6RQU6F.js} +1 -1
  16. package/chunks/{chunk-F6FP3URI.js → chunk-ATLUHLZE.js} +1 -1
  17. package/chunks/{chunk-4HMWGHPP.js → chunk-C6MI2ASN.js} +2 -2
  18. package/chunks/{chunk-VWPDSQZY.js → chunk-CTHZVIMD.js} +2 -2
  19. package/chunks/{chunk-IUEQOXOI.js → chunk-CX3SGIPK.js} +2 -2
  20. package/chunks/{chunk-32SSXBMG.js → chunk-CXZV4Q4J.js} +3202 -2678
  21. package/chunks/{chunk-SZWDOOGV.js → chunk-EJ6NFQ2L.js} +11 -11
  22. package/chunks/{chunk-FPZF3BNV.js → chunk-FH4P6RQA.js} +1 -1
  23. package/chunks/{chunk-PTGKSUUJ.js → chunk-G4BUMVEY.js} +11 -1
  24. package/chunks/{chunk-JN6FVOPP.js → chunk-GBN55AWZ.js} +2 -2
  25. package/chunks/{chunk-6Z2MVJIJ.js → chunk-GM3LTU6K.js} +15 -15
  26. package/chunks/{chunk-JJHY7NAD.js → chunk-GOMVJKBL.js} +1 -1
  27. package/chunks/{chunk-JIJBNW4A.js → chunk-ID533GA3.js} +1 -1
  28. package/chunks/{chunk-E5SRTXRG.js → chunk-KGV3F6UF.js} +1 -1
  29. package/chunks/{chunk-4TW2JM5Q.js → chunk-LF6BKGZT.js} +3 -3
  30. package/chunks/{chunk-N5QHMPZU.js → chunk-LTN3VYMZ.js} +1 -1
  31. package/chunks/{chunk-DZCZZPCY.js → chunk-MSJ2MXJ6.js} +3 -3
  32. package/chunks/{chunk-5RVEAAD2.js → chunk-QBUR6J4B.js} +6 -6
  33. package/chunks/{chunk-LXUQBWQA.js → chunk-SWGPABMH.js} +62 -11
  34. package/chunks/{chunk-AQDPHFDZ.js → chunk-VKILGMZQ.js} +1 -1
  35. package/chunks/{chunk-IKOWINH4.js → chunk-WE6TNQJU.js} +6 -2
  36. package/chunks/{chunk-2ES3D3TW.js → chunk-XGU3ETVO.js} +3 -3
  37. package/chunks/{chunk-7GX7XYZU.js → chunk-XU7BKR3B.js} +3 -3
  38. package/chunks/{computer-use-P4WQBATW.js → computer-use-F5O56FVW.js} +23 -22
  39. package/chunks/{contextCommand-POQ6GYN3.js → contextCommand-WBVNKL2C.js} +23 -23
  40. package/chunks/{cron-create-OKGQO6GX.js → cron-create-THNDTYXU.js} +4 -4
  41. package/chunks/{cron-delete-DTJP7L6O.js → cron-delete-BS5H6TFJ.js} +4 -4
  42. package/chunks/{cron-list-VKZUASFG.js → cron-list-7OBVHT7K.js} +4 -4
  43. package/chunks/{de-K2F3T3TR.js → de-ACHALDED.js} +1 -0
  44. package/chunks/{dist-OLC6NBSB.js → dist-DZ6AJDX4.js} +1 -1
  45. package/chunks/{dist-QUSDBLAK.js → dist-GKRNVFBH.js} +4 -0
  46. package/chunks/{edit-CS7DSS4Z.js → edit-UV7MBOJU.js} +21 -21
  47. package/chunks/{en-KGSAKBJP.js → en-S3OQBISC.js} +1 -0
  48. package/chunks/{enter-worktree-PA4HPHJK.js → enter-worktree-TSCHZMJ3.js} +21 -21
  49. package/chunks/{enterPlanMode-SFE5AFKZ.js → enterPlanMode-LKS7VIUG.js} +26 -26
  50. package/chunks/{exit-worktree-FR3AZTC6.js → exit-worktree-Q6EWFLZU.js} +21 -21
  51. package/chunks/{exitPlanMode-AHOUO44D.js → exitPlanMode-HS6I4D2O.js} +21 -21
  52. package/chunks/{fr-2CAQEOK6.js → fr-GVKZ27MF.js} +1 -0
  53. package/chunks/{geminiContentGenerator-AXCVDKGI.js → geminiContentGenerator-GEZ63VSW.js} +4 -4
  54. package/chunks/{glob-BQPAW3IW.js → glob-ZN5LKB7E.js} +21 -21
  55. package/chunks/{grep-2F7BL5TQ.js → grep-NIKBBYBU.js} +21 -21
  56. package/chunks/{ja-QWL7V6OJ.js → ja-FKZ2WZ4D.js} +1 -0
  57. package/chunks/{keychain-token-storage-ALKQXYJQ.js → keychain-token-storage-YHXIWXIB.js} +2 -2
  58. package/chunks/{loop-wakeup-RX6YIUSG.js → loop-wakeup-SSBWZ64K.js} +5 -5
  59. package/chunks/{ls-6PLNWHMU.js → ls-YPFUHZRQ.js} +3 -3
  60. package/chunks/{lsp-3HFQU4OF.js → lsp-FD6DNVAF.js} +2 -2
  61. package/chunks/{monitor-YTTMDFW2.js → monitor-A25XKPU5.js} +21 -21
  62. package/chunks/{notebook-edit-7TNZMTBR.js → notebook-edit-E72AIOUS.js} +21 -21
  63. package/chunks/{openaiContentGenerator-JA6YXXPI.js → openaiContentGenerator-ZDLZDXLU.js} +13 -11
  64. package/chunks/{pt-2SPOLMAY.js → pt-SY5NCFGR.js} +1 -0
  65. package/chunks/{qwenContentGenerator-NBOVGW7B.js → qwenContentGenerator-HVJPPMTT.js} +24 -24
  66. package/chunks/{qwenOAuth2-XWC5SU63.js → qwenOAuth2-WZ54YZ4J.js} +4 -4
  67. package/chunks/{read-file-RUBU3KUA.js → read-file-L6FM3KUX.js} +8 -8
  68. package/chunks/{ripGrep-TPFC7KZF.js → ripGrep-YRJCUISE.js} +21 -21
  69. package/chunks/{ru-35IVJTEH.js → ru-FWNXJG4F.js} +1 -0
  70. package/chunks/{scheduler-NTVF45LR.js → scheduler-M3742P2I.js} +21 -21
  71. package/chunks/{send-message-IIT3SHA7.js → send-message-FWFTX62Q.js} +2 -2
  72. package/chunks/{serve-J6VG37OX.js → serve-ZIP2GDFY.js} +6942 -6809
  73. package/chunks/{shell-EQQEHEFI.js → shell-T5VSPJLU.js} +21 -21
  74. package/chunks/{skill-QWRWJCQJ.js → skill-ETTFYDOV.js} +10 -10
  75. package/chunks/{src-LNADIG5P.js → src-UKOPSYDK.js} +47 -21
  76. package/chunks/{syntheticOutput-H67FYXU7.js → syntheticOutput-JY5NEDTV.js} +3 -3
  77. package/chunks/{task-create-OVXHSHAI.js → task-create-IGILDV25.js} +6 -6
  78. package/chunks/{task-list-QUUCQJ3U.js → task-list-KBEJVAAG.js} +5 -5
  79. package/chunks/{task-stop-WA5DMTKK.js → task-stop-WFTMQ6AC.js} +2 -2
  80. package/chunks/{task-update-PC5427TI.js → task-update-UIVX7ZEV.js} +6 -6
  81. package/chunks/{team-create-TXWQL777.js → team-create-DRKUVGBN.js} +21 -21
  82. package/chunks/{team-delete-ZTEMYRJ3.js → team-delete-LPOXDPVB.js} +5 -5
  83. package/chunks/{todoWrite-J6L6ELD6.js → todoWrite-R4RIJKOD.js} +4 -4
  84. package/chunks/{tool-search-JAVM7ABF.js → tool-search-EIIK27ON.js} +8 -8
  85. package/chunks/{web-fetch-6XLPPTP7.js → web-fetch-JU7SS6KE.js} +4 -4
  86. package/chunks/{workflow-7LN3L6KK.js → workflow-4RGAYFSJ.js} +22 -22
  87. package/chunks/{write-file-DAKE7YKB.js → write-file-GLQYJFEZ.js} +21 -21
  88. package/chunks/{zh-X4KM6MTW.js → zh-QXLZV2PX.js} +1 -0
  89. package/chunks/{zh-TW-BSG6BUWK.js → zh-TW-3OKU7LDA.js} +1 -0
  90. package/cli.js +1054 -657
  91. package/locales/ca.js +2 -1
  92. package/locales/de.js +1 -0
  93. package/locales/en.js +1 -0
  94. package/locales/fr.js +1 -0
  95. package/locales/ja.js +1 -0
  96. package/locales/pt.js +1 -0
  97. package/locales/ru.js +1 -0
  98. package/locales/zh-TW.js +1 -0
  99. package/locales/zh.js +1 -0
  100. package/package.json +2 -2
@@ -2,10 +2,10 @@
2
2
  "use strict";
3
3
  import {
4
4
  resolveBundleDir
5
- } from "./chunk-32SSXBMG.js";
5
+ } from "./chunk-CXZV4Q4J.js";
6
6
  import {
7
7
  Storage
8
- } from "./chunk-IKOWINH4.js";
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-K6MD665I.js"),
173
- "./locales/de.js": () => import("./de-K2F3T3TR.js"),
174
- "./locales/en.js": () => import("./en-KGSAKBJP.js"),
175
- "./locales/fr.js": () => import("./fr-2CAQEOK6.js"),
176
- "./locales/ja.js": () => import("./ja-QWL7V6OJ.js"),
177
- "./locales/pt.js": () => import("./pt-2SPOLMAY.js"),
178
- "./locales/ru.js": () => import("./ru-35IVJTEH.js"),
179
- "./locales/zh-TW.js": () => import("./zh-TW-BSG6BUWK.js"),
180
- "./locales/zh.js": () => import("./zh-X4KM6MTW.js")
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
@@ -5,7 +5,7 @@ import {
5
5
  Storage,
6
6
  resolvePath,
7
7
  sanitizeCwd
8
- } from "./chunk-IKOWINH4.js";
8
+ } from "./chunk-WE6TNQJU.js";
9
9
  import {
10
10
  init_esbuild_shims
11
11
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-IKOWINH4.js";
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-7GX7XYZU.js";
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-JJHY7NAD.js";
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-FPZF3BNV.js";
26
+ } from "./chunk-FH4P6RQA.js";
27
27
  import {
28
28
  InstallationManager
29
- } from "./chunk-VWPDSQZY.js";
29
+ } from "./chunk-CTHZVIMD.js";
30
30
  import {
31
31
  STRUCTURED_OUTPUT_REDACTED_ARGS
32
- } from "./chunk-AQDPHFDZ.js";
32
+ } from "./chunk-VKILGMZQ.js";
33
33
  import {
34
34
  BaseDeclarativeTool,
35
35
  BaseToolInvocation,
36
36
  ToolDisplayNames,
37
37
  ToolNames
38
- } from "./chunk-JJHY7NAD.js";
38
+ } from "./chunk-GOMVJKBL.js";
39
39
  import {
40
40
  atomicWriteFile,
41
41
  atomicWriteFileSync
42
- } from "./chunk-N5QHMPZU.js";
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-PTGKSUUJ.js";
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-IKOWINH4.js";
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) : logFiles;
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\.5/, { image: true, video: true }],
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-JA6YXXPI.js");
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-XWC5SU63.js");
72107
- const { QwenContentGenerator } = await import("./qwenContentGenerator-NBOVGW7B.js");
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-OLOGBVLP.js");
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-AXCVDKGI.js");
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 (proxyUrl.startsWith("http")) {
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");
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-IKOWINH4.js";
5
+ } from "./chunk-WE6TNQJU.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-IKOWINH4.js";
5
+ } from "./chunk-WE6TNQJU.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-IKOWINH4.js";
5
+ } from "./chunk-WE6TNQJU.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -3,17 +3,17 @@
3
3
  import {
4
4
  getInboxesDir,
5
5
  require_proper_lockfile
6
- } from "./chunk-M5VYHAHT.js";
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-N5QHMPZU.js";
12
+ } from "./chunk-LTN3VYMZ.js";
13
13
  import {
14
14
  createDebugLogger,
15
15
  isNodeError
16
- } from "./chunk-IKOWINH4.js";
16
+ } from "./chunk-WE6TNQJU.js";
17
17
  import {
18
18
  init_esbuild_shims
19
19
  } from "./chunk-A4BMJM77.js";
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  createDebugLogger,
5
5
  isNodeError
6
- } from "./chunk-IKOWINH4.js";
6
+ } from "./chunk-WE6TNQJU.js";
7
7
  import {
8
8
  init_esbuild_shims
9
9
  } from "./chunk-A4BMJM77.js";
@@ -2,17 +2,17 @@
2
2
  "use strict";
3
3
  import {
4
4
  formatFetchErrorForUser
5
- } from "./chunk-F6FP3URI.js";
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-N5QHMPZU.js";
11
+ } from "./chunk-LTN3VYMZ.js";
12
12
  import {
13
13
  Storage,
14
14
  createDebugLogger
15
- } from "./chunk-IKOWINH4.js";
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-SZWDOOGV.js";
5
+ } from "./chunk-EJ6NFQ2L.js";
6
6
  import {
7
7
  computeThresholds,
8
8
  getCoreSystemPrompt
9
- } from "./chunk-32SSXBMG.js";
9
+ } from "./chunk-CXZV4Q4J.js";
10
10
  import {
11
11
  buildSkillLlmContent
12
- } from "./chunk-JIJBNW4A.js";
12
+ } from "./chunk-ID533GA3.js";
13
13
  import {
14
14
  DiscoveredMCPTool,
15
15
  uiTelemetryService
16
- } from "./chunk-6Z2MVJIJ.js";
16
+ } from "./chunk-GM3LTU6K.js";
17
17
  import {
18
18
  ToolNames
19
- } from "./chunk-JJHY7NAD.js";
19
+ } from "./chunk-GOMVJKBL.js";
20
20
  import {
21
21
  DEFAULT_TOKEN_LIMIT
22
- } from "./chunk-PTGKSUUJ.js";
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-IUEQOXOI.js";
5
+ } from "./chunk-CX3SGIPK.js";
6
6
  import {
7
7
  OpenAIContentConverter,
8
8
  TaggedThinkingParser,
9
9
  openaiRequestCaptureContext
10
- } from "./chunk-6Z2MVJIJ.js";
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-HU3RKEK2.js";
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-PTGKSUUJ.js";
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-IKOWINH4.js";
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 envVal = process.env["QWEN_CODE_MAX_OUTPUT_TOKENS"];
7029
- const envMaxTokens = envVal ? parseInt(envVal, 10) : NaN;
7030
- if (!isNaN(envMaxTokens) && envMaxTokens > 0) {
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
- return !!config.baseUrl?.includes("modelscope");
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
- return baseURL.includes("openrouter.ai");
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,
@@ -5,7 +5,7 @@ import {
5
5
  BaseToolInvocation,
6
6
  ToolDisplayNames,
7
7
  ToolNames
8
- } from "./chunk-JJHY7NAD.js";
8
+ } from "./chunk-GOMVJKBL.js";
9
9
  import {
10
10
  init_esbuild_shims
11
11
  } from "./chunk-A4BMJM77.js";
@@ -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
- const relativePath = path2.relative(realParent, realChild);
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-4HMWGHPP.js";
18
+ } from "./chunk-C6MI2ASN.js";
19
19
  import {
20
20
  ToolNames
21
- } from "./chunk-JJHY7NAD.js";
21
+ } from "./chunk-GOMVJKBL.js";
22
22
  import {
23
23
  Storage,
24
24
  createDebugLogger,
25
25
  getProjectHash
26
- } from "./chunk-IKOWINH4.js";
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-M5VYHAHT.js";
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-N5QHMPZU.js";
12
+ } from "./chunk-LTN3VYMZ.js";
13
13
  import {
14
14
  createDebugLogger,
15
15
  isNodeError
16
- } from "./chunk-IKOWINH4.js";
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-32SSXBMG.js";
7
+ } from "./chunk-CXZV4Q4J.js";
8
8
  import "./chunk-K5PGHDBN.js";
9
- import "./chunk-7GX7XYZU.js";
10
- import "./chunk-7OCZ77KA.js";
11
- import "./chunk-2ES3D3TW.js";
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-4HMWGHPP.js";
15
- import "./chunk-4TW2JM5Q.js";
16
- import "./chunk-M5VYHAHT.js";
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-JIJBNW4A.js";
20
- import "./chunk-E5SRTXRG.js";
19
+ import "./chunk-ID533GA3.js";
20
+ import "./chunk-KGV3F6UF.js";
21
21
  import "./chunk-77WXWU44.js";
22
- import "./chunk-WWU2KUSR.js";
22
+ import "./chunk-AE6RQU6F.js";
23
23
  import {
24
24
  safeJsonStringify
25
- } from "./chunk-6Z2MVJIJ.js";
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-FPZF3BNV.js";
31
- import "./chunk-VWPDSQZY.js";
32
- import "./chunk-AQDPHFDZ.js";
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-JJHY7NAD.js";
37
- import "./chunk-DZCZZPCY.js";
38
- import "./chunk-F6FP3URI.js";
36
+ } from "./chunk-GOMVJKBL.js";
37
+ import "./chunk-MSJ2MXJ6.js";
38
+ import "./chunk-ATLUHLZE.js";
39
39
  import "./chunk-64WXLC72.js";
40
- import "./chunk-N5QHMPZU.js";
41
- import "./chunk-HU3RKEK2.js";
42
- import "./chunk-PTGKSUUJ.js";
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-IKOWINH4.js";
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
- if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
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;