@qwen-code/qwen-code 0.19.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/bundled/qc-helper/docs/features/mcp.md +6 -2
  2. package/bundled/qc-helper/docs/qwen-serve.md +1 -1
  3. package/chunks/{agent-IPSDEZNB.js → agent-7CZOLKXM.js} +2 -2
  4. package/chunks/{agent-headless-ZMTUWMZJ.js → agent-headless-K37PBQK5.js} +2 -2
  5. package/chunks/{chunk-YF3ORUIU.js → chunk-2X2WXY6L.js} +309 -352
  6. package/chunks/{chunk-GAAALA2X.js → chunk-FXT37TZS.js} +3 -3
  7. package/chunks/{chunk-VRIVIYRL.js → chunk-NQDRRVJD.js} +4 -4
  8. package/chunks/{chunk-KFR4QTV3.js → chunk-OJMCOR55.js} +64 -57
  9. package/chunks/{chunk-S7ILEIB4.js → chunk-PNT7QCLK.js} +2 -3
  10. package/chunks/{chunk-CICUTYTF.js → chunk-YMBWB67C.js} +24 -31
  11. package/chunks/{computer-use-YYK42DD5.js → computer-use-AY6HODX4.js} +2 -2
  12. package/chunks/{contextCommand-BO45MUAA.js → contextCommand-KVKJ63NZ.js} +4 -4
  13. package/chunks/{cron-create-DXKAP5KN.js → cron-create-NHRAAWT5.js} +8 -5
  14. package/chunks/{edit-QERNJN7K.js → edit-OXD4P5YK.js} +2 -2
  15. package/chunks/{en-UTXMGXIR.js → en-7OGNWWME.js} +1 -0
  16. package/chunks/{enter-worktree-6ZKH5IL3.js → enter-worktree-NKNFTLNO.js} +2 -2
  17. package/chunks/{enterPlanMode-B2PBF4MA.js → enterPlanMode-7W2FCILY.js} +2 -2
  18. package/chunks/{exit-worktree-EOCMQO4I.js → exit-worktree-NCRZ52XD.js} +2 -2
  19. package/chunks/{exitPlanMode-WSRXCBRZ.js → exitPlanMode-AZIUQQHA.js} +2 -2
  20. package/chunks/{geminiContentGenerator-NTR4LTKS.js → geminiContentGenerator-5HKVP4JF.js} +1 -1
  21. package/chunks/{glob-IWDJQI2V.js → glob-VCPO3AQO.js} +2 -2
  22. package/chunks/{grep-2DV5BXMH.js → grep-R3W7SG6T.js} +2 -2
  23. package/chunks/{monitor-6HBDS2RS.js → monitor-TQCZALTB.js} +2 -2
  24. package/chunks/{notebook-edit-J5AY5BRY.js → notebook-edit-RYYGIJTA.js} +2 -2
  25. package/chunks/{openaiContentGenerator-ENABCJDM.js → openaiContentGenerator-2AUZ47JU.js} +2 -2
  26. package/chunks/{qwenContentGenerator-ISW42U7C.js → qwenContentGenerator-QM6ENWSO.js} +3 -3
  27. package/chunks/{read-file-NRX2FSSQ.js → read-file-ZSIMNYPB.js} +1 -1
  28. package/chunks/{ripGrep-WF5CKHR5.js → ripGrep-LONCTNP3.js} +2 -2
  29. package/chunks/{scheduler-PNPG5WJ3.js → scheduler-FMNCHQQH.js} +2 -2
  30. package/chunks/{serve-ZBRCIIHW.js → serve-XLPTFQOQ.js} +32 -11
  31. package/chunks/{shell-DLIL6MLU.js → shell-G2CEO7D7.js} +2 -2
  32. package/chunks/{skill-32TXHY4A.js → skill-E5YLTHY3.js} +1 -1
  33. package/chunks/{src-PDDLF5BB.js → src-GCZS2DES.js} +2 -4
  34. package/chunks/{team-create-EHLDSJGI.js → team-create-RQCITTFK.js} +2 -2
  35. package/chunks/{tool-search-FU7IZAOO.js → tool-search-2COFGD5N.js} +1 -1
  36. package/chunks/{workflow-WUDNBCGX.js → workflow-A5VAXYUS.js} +18 -10
  37. package/chunks/{write-file-NVFPX6CH.js → write-file-P2RNFLJR.js} +2 -2
  38. package/chunks/{zh-YOXVTJU5.js → zh-3RMSEO5M.js} +1 -0
  39. package/chunks/{zh-TW-J2TTW67R.js → zh-TW-R7WRLTJS.js} +1 -0
  40. package/cli.js +358 -202
  41. package/locales/en.js +1 -0
  42. package/locales/zh-TW.js +1 -0
  43. package/locales/zh.js +1 -0
  44. package/package.json +3 -3
@@ -2,18 +2,18 @@
2
2
  "use strict";
3
3
  import {
4
4
  t
5
- } from "./chunk-VRIVIYRL.js";
5
+ } from "./chunk-NQDRRVJD.js";
6
6
  import {
7
7
  computeThresholds,
8
8
  getCoreSystemPrompt
9
- } from "./chunk-YF3ORUIU.js";
9
+ } from "./chunk-2X2WXY6L.js";
10
10
  import {
11
11
  buildSkillLlmContent
12
12
  } from "./chunk-OTBK43JR.js";
13
13
  import {
14
14
  DiscoveredMCPTool,
15
15
  uiTelemetryService
16
- } from "./chunk-CICUTYTF.js";
16
+ } from "./chunk-YMBWB67C.js";
17
17
  import {
18
18
  ToolNames
19
19
  } from "./chunk-PLY4F7QW.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  resolveBundleDir
5
- } from "./chunk-YF3ORUIU.js";
5
+ } from "./chunk-2X2WXY6L.js";
6
6
  import {
7
7
  Storage
8
8
  } from "./chunk-C4K3FEQ2.js";
@@ -171,13 +171,13 @@ init_esbuild_shims();
171
171
  var globImport_locales_js = __glob({
172
172
  "./locales/ca.js": () => import("./ca-7WC7ELX6.js"),
173
173
  "./locales/de.js": () => import("./de-ACHALDED.js"),
174
- "./locales/en.js": () => import("./en-UTXMGXIR.js"),
174
+ "./locales/en.js": () => import("./en-7OGNWWME.js"),
175
175
  "./locales/fr.js": () => import("./fr-GVKZ27MF.js"),
176
176
  "./locales/ja.js": () => import("./ja-FKZ2WZ4D.js"),
177
177
  "./locales/pt.js": () => import("./pt-SY5NCFGR.js"),
178
178
  "./locales/ru.js": () => import("./ru-FWNXJG4F.js"),
179
- "./locales/zh-TW.js": () => import("./zh-TW-J2TTW67R.js"),
180
- "./locales/zh.js": () => import("./zh-YOXVTJU5.js")
179
+ "./locales/zh-TW.js": () => import("./zh-TW-R7WRLTJS.js"),
180
+ "./locales/zh.js": () => import("./zh-3RMSEO5M.js")
181
181
  });
182
182
 
183
183
  // packages/cli/src/i18n/index.ts
@@ -7,7 +7,7 @@ import {
7
7
  getLanguageSettingsOptions,
8
8
  t,
9
9
  writeStderrLine
10
- } from "./chunk-VRIVIYRL.js";
10
+ } from "./chunk-NQDRRVJD.js";
11
11
  import {
12
12
  DEFAULT_STOP_HOOK_BLOCK_CAP,
13
13
  DEFAULT_TOOL_OUTPUT_BATCH_BUDGET,
@@ -20,7 +20,10 @@ import {
20
20
  require_main,
21
21
  resolveModelConfig,
22
22
  stripRuntimeSnapshotPrefix
23
- } from "./chunk-YF3ORUIU.js";
23
+ } from "./chunk-2X2WXY6L.js";
24
+ import {
25
+ external_exports
26
+ } from "./chunk-K5PGHDBN.js";
24
27
  import {
25
28
  DEFAULT_QWEN_CUSTOM_IGNORE_FILE_NAMES
26
29
  } from "./chunk-EEEZIVFJ.js";
@@ -28,7 +31,7 @@ import {
28
31
  AuthType,
29
32
  MODEL_GENERATION_CONFIG_FIELDS,
30
33
  isWithinRoot
31
- } from "./chunk-CICUTYTF.js";
34
+ } from "./chunk-YMBWB67C.js";
32
35
  import {
33
36
  atomicWriteFileSync
34
37
  } from "./chunk-3UALQ56H.js";
@@ -15658,7 +15661,7 @@ var SETTINGS_SCHEMA = {
15658
15661
  category: "Model",
15659
15662
  requiresRestart: false,
15660
15663
  default: {},
15661
- description: "Model providers configuration grouped by authType. Each authType maps to a ProviderConfig object with protocol and models fields.",
15664
+ description: "Model providers configuration grouped by authType. Each authType contains an array of model configurations.",
15662
15665
  showInDialog: false,
15663
15666
  mergeStrategy: "replace" /* REPLACE */
15664
15667
  },
@@ -19099,7 +19102,7 @@ var V3ToV4Migration = class {
19099
19102
  };
19100
19103
  var v3ToV4Migration = new V3ToV4Migration();
19101
19104
 
19102
- // packages/cli/src/config/migration/versions/v4-to-v5.ts
19105
+ // packages/cli/src/config/migration/versions/v5-to-v4.ts
19103
19106
  init_esbuild_shims();
19104
19107
  var PROVIDER_KEY_TO_PROTOCOL = {
19105
19108
  openai: "openai",
@@ -19108,28 +19111,34 @@ var PROVIDER_KEY_TO_PROTOCOL = {
19108
19111
  "vertex-ai": "gemini",
19109
19112
  anthropic: "anthropic"
19110
19113
  };
19111
- var V4ToV5Migration = class {
19114
+ function isWrappedProviderConfig(value) {
19115
+ return typeof value === "object" && value !== null && !Array.isArray(value);
19116
+ }
19117
+ __name(isWrappedProviderConfig, "isWrappedProviderConfig");
19118
+ var V5ToV4Migration = class {
19112
19119
  static {
19113
- __name(this, "V4ToV5Migration");
19120
+ __name(this, "V5ToV4Migration");
19114
19121
  }
19115
- fromVersion = 4;
19116
- toVersion = 5;
19122
+ fromVersion = 5;
19123
+ toVersion = 4;
19117
19124
  shouldMigrate(settings) {
19118
19125
  if (typeof settings !== "object" || settings === null) {
19119
19126
  return false;
19120
19127
  }
19121
19128
  const s = settings;
19122
- if (s["$version"] !== 4 && s["$version"] !== void 0) {
19123
- return false;
19124
- }
19125
- if (s["$version"] === 4) {
19129
+ if (s["$version"] === 5) {
19126
19130
  return true;
19127
19131
  }
19132
+ if (s["$version"] !== void 0) {
19133
+ return false;
19134
+ }
19128
19135
  const modelProviders = s["modelProviders"];
19129
19136
  if (typeof modelProviders !== "object" || modelProviders === null) {
19130
19137
  return false;
19131
19138
  }
19132
- return Object.values(modelProviders).some((v) => Array.isArray(v));
19139
+ return Object.values(modelProviders).some(
19140
+ (v) => isWrappedProviderConfig(v)
19141
+ );
19133
19142
  }
19134
19143
  migrate(settings, _scope) {
19135
19144
  if (typeof settings !== "object" || settings === null) {
@@ -19141,35 +19150,40 @@ var V4ToV5Migration = class {
19141
19150
  if (typeof modelProviders === "object" && modelProviders !== null) {
19142
19151
  const providers = modelProviders;
19143
19152
  for (const [key, value] of Object.entries(providers)) {
19144
- if (!Array.isArray(value)) {
19153
+ if (Array.isArray(value)) {
19145
19154
  continue;
19146
19155
  }
19147
- if (!Object.hasOwn(PROVIDER_KEY_TO_PROTOCOL, key)) {
19156
+ if (!isWrappedProviderConfig(value)) {
19157
+ continue;
19158
+ }
19159
+ const derivedProtocol = Object.hasOwn(PROVIDER_KEY_TO_PROTOCOL, key) ? PROVIDER_KEY_TO_PROTOCOL[key] : void 0;
19160
+ if (typeof value.protocol === "string" && derivedProtocol !== void 0 && value.protocol !== derivedProtocol) {
19148
19161
  warnings.push(
19149
- `Unknown provider key "${key}", defaulting protocol to "openai". If this provider uses a different protocol (anthropic, gemini), edit settings.json to set "protocol" explicitly.`
19162
+ `Provider "${key}" declared protocol "${value.protocol}", but V4 derives protocol "${derivedProtocol}" from the provider key. The explicit protocol has been dropped.`
19150
19163
  );
19151
19164
  }
19152
- providers[key] = {
19153
- protocol: Object.hasOwn(PROVIDER_KEY_TO_PROTOCOL, key) ? PROVIDER_KEY_TO_PROTOCOL[key] : "openai",
19154
- models: value
19155
- };
19165
+ providers[key] = Array.isArray(value.models) ? value.models : [];
19156
19166
  }
19157
19167
  }
19158
- result["$version"] = 5;
19168
+ result["$version"] = 4;
19159
19169
  return { settings: result, warnings };
19160
19170
  }
19161
19171
  };
19162
- var v4ToV5Migration = new V4ToV5Migration();
19172
+ var v5ToV4Migration = new V5ToV4Migration();
19163
19173
 
19164
19174
  // packages/cli/src/config/migration/index.ts
19165
19175
  var ALL_MIGRATIONS = [
19166
19176
  v1ToV2Migration,
19167
19177
  v2ToV3Migration,
19168
- v3ToV4Migration,
19169
- v4ToV5Migration
19178
+ v3ToV4Migration
19179
+ ];
19180
+ var DOWNGRADE_MIGRATIONS = [v5ToV4Migration];
19181
+ var CONVERGENCE_MIGRATIONS = [
19182
+ ...ALL_MIGRATIONS,
19183
+ ...DOWNGRADE_MIGRATIONS
19170
19184
  ];
19171
19185
  function runMigrations(settings, scope) {
19172
- const scheduler = new MigrationScheduler([...ALL_MIGRATIONS], scope);
19186
+ const scheduler = new MigrationScheduler([...CONVERGENCE_MIGRATIONS], scope);
19173
19187
  return scheduler.migrate(settings);
19174
19188
  }
19175
19189
  __name(runMigrations, "runMigrations");
@@ -19179,11 +19193,11 @@ function needsMigration(settings) {
19179
19193
  }
19180
19194
  const s = settings;
19181
19195
  const version = s["$version"];
19182
- const hasApplicableMigration = ALL_MIGRATIONS.some(
19196
+ const hasApplicableMigration = CONVERGENCE_MIGRATIONS.some(
19183
19197
  (migration) => migration.shouldMigrate(settings)
19184
19198
  );
19185
19199
  if (typeof version === "number") {
19186
- if (version >= SETTINGS_VERSION) {
19200
+ if (version === SETTINGS_VERSION) {
19187
19201
  return false;
19188
19202
  }
19189
19203
  return hasApplicableMigration;
@@ -19250,7 +19264,7 @@ var dotEnvSourcedKeys = /* @__PURE__ */ new Set();
19250
19264
  var settingsEnvSourcedKeys = /* @__PURE__ */ new Set();
19251
19265
  var lastReloadSnapshot = /* @__PURE__ */ new Map();
19252
19266
  var lastReloadSnapshotSeeded = false;
19253
- var SETTINGS_VERSION = 5;
19267
+ var SETTINGS_VERSION = 4;
19254
19268
  var SETTINGS_VERSION_KEY = "$version";
19255
19269
  function getSystemSettingsPath() {
19256
19270
  if (process2.env["QWEN_CODE_SYSTEM_SETTINGS_PATH"]) {
@@ -19331,16 +19345,9 @@ function hasAnyProviderEntries(modelProviders) {
19331
19345
  if (!isPlainObject2(modelProviders)) {
19332
19346
  return false;
19333
19347
  }
19334
- return Object.values(modelProviders).some((providerModels) => {
19335
- if (Array.isArray(providerModels)) {
19336
- return providerModels.length > 0;
19337
- }
19338
- if (isPlainObject2(providerModels)) {
19339
- const models = providerModels["models"];
19340
- return Array.isArray(models) && models.length > 0;
19341
- }
19342
- return false;
19343
- });
19348
+ return Object.values(modelProviders).some(
19349
+ (providerModels) => Array.isArray(providerModels) && providerModels.length > 0
19350
+ );
19344
19351
  }
19345
19352
  __name(hasAnyProviderEntries, "hasAnyProviderEntries");
19346
19353
  function getModelProvidersOverrideWarnings(loadedSettings) {
@@ -20370,7 +20377,7 @@ __name(getPackageJson, "getPackageJson");
20370
20377
  // packages/cli/src/utils/version.ts
20371
20378
  async function getCliVersion() {
20372
20379
  const pkgJson = await getPackageJson();
20373
- return "0.19.0";
20380
+ return "0.19.1";
20374
20381
  }
20375
20382
  __name(getCliVersion, "getCliVersion");
20376
20383
 
@@ -20591,8 +20598,9 @@ function parseAcpModelOption(input) {
20591
20598
  if (openIdx >= 0 && closeIdx === trimmed.length - 1 && openIdx < closeIdx) {
20592
20599
  const maybeModelId = trimmed.slice(0, openIdx);
20593
20600
  const maybeAuthType = trimmed.slice(openIdx + 1, closeIdx);
20594
- if (maybeAuthType) {
20595
- return { modelId: maybeModelId, authType: maybeAuthType };
20601
+ const parsedAuthType = external_exports.nativeEnum(AuthType).safeParse(maybeAuthType);
20602
+ if (parsedAuthType.success) {
20603
+ return { modelId: maybeModelId, authType: parsedAuthType.data };
20596
20604
  }
20597
20605
  }
20598
20606
  return { modelId: trimmed };
@@ -20602,11 +20610,11 @@ __name(parseAcpModelOption, "parseAcpModelOption");
20602
20610
  // packages/cli/src/utils/modelConfigUtils.ts
20603
20611
  init_esbuild_shims();
20604
20612
  var AUTH_ENV_MODEL_VARS = {
20605
- [AuthType.USE_OPENAI]: ["OPENAI_MODEL", "QWEN_MODEL"],
20606
- [AuthType.USE_GEMINI]: ["GEMINI_MODEL"],
20607
- [AuthType.USE_VERTEX_AI]: ["GOOGLE_MODEL"],
20608
- [AuthType.USE_ANTHROPIC]: ["ANTHROPIC_MODEL"],
20609
- [AuthType.QWEN_OAUTH]: []
20613
+ ["openai" /* USE_OPENAI */]: ["OPENAI_MODEL", "QWEN_MODEL"],
20614
+ ["gemini" /* USE_GEMINI */]: ["GEMINI_MODEL"],
20615
+ ["vertex-ai" /* USE_VERTEX_AI */]: ["GOOGLE_MODEL"],
20616
+ ["anthropic" /* USE_ANTHROPIC */]: ["ANTHROPIC_MODEL"],
20617
+ ["qwen-oauth" /* QWEN_OAUTH */]: []
20610
20618
  };
20611
20619
  function getIgnoredTopLevelGenerationConfigFields(settingsGenerationConfig, modelProvider) {
20612
20620
  if (!settingsGenerationConfig || !modelProvider) {
@@ -20632,19 +20640,19 @@ function buildIgnoredTopLevelGenerationConfigWarning(authType, modelProvider, ig
20632
20640
  __name(buildIgnoredTopLevelGenerationConfigWarning, "buildIgnoredTopLevelGenerationConfigWarning");
20633
20641
  function getAuthTypeFromEnv() {
20634
20642
  if (process.env["QWEN_OAUTH"]) {
20635
- return AuthType.QWEN_OAUTH;
20643
+ return "qwen-oauth" /* QWEN_OAUTH */;
20636
20644
  }
20637
20645
  if (process.env["OPENAI_API_KEY"] && (process.env["OPENAI_MODEL"] || process.env["QWEN_MODEL"]) && process.env["OPENAI_BASE_URL"]) {
20638
- return AuthType.USE_OPENAI;
20646
+ return "openai" /* USE_OPENAI */;
20639
20647
  }
20640
20648
  if (process.env["GEMINI_API_KEY"] && process.env["GEMINI_MODEL"]) {
20641
- return AuthType.USE_GEMINI;
20649
+ return "gemini" /* USE_GEMINI */;
20642
20650
  }
20643
20651
  if (process.env["GOOGLE_API_KEY"] && process.env["GOOGLE_MODEL"]) {
20644
- return AuthType.USE_VERTEX_AI;
20652
+ return "vertex-ai" /* USE_VERTEX_AI */;
20645
20653
  }
20646
20654
  if (process.env["ANTHROPIC_API_KEY"] && process.env["ANTHROPIC_MODEL"] && process.env["ANTHROPIC_BASE_URL"]) {
20647
- return AuthType.USE_ANTHROPIC;
20655
+ return "anthropic" /* USE_ANTHROPIC */;
20648
20656
  }
20649
20657
  return void 0;
20650
20658
  }
@@ -20673,9 +20681,8 @@ function resolveCliGenerationConfig(inputs) {
20673
20681
  let modelProvider;
20674
20682
  let disambiguationWarning;
20675
20683
  if (resolvedModel && authType && settings.modelProviders) {
20676
- const providerConfig = settings.modelProviders[authType];
20677
- if (providerConfig && providerConfig.models) {
20678
- const providers = providerConfig.models;
20684
+ const providers = settings.modelProviders[authType];
20685
+ if (providers && Array.isArray(providers)) {
20679
20686
  const persistedBaseUrl = settings.model?.baseUrl;
20680
20687
  if (resolvedFromSettings && persistedBaseUrl) {
20681
20688
  const exactMatch = providers.find(
@@ -20763,7 +20770,7 @@ import { execFile } from "node:child_process";
20763
20770
 
20764
20771
  // packages/cli/src/generated/git-commit.ts
20765
20772
  init_esbuild_shims();
20766
- var GIT_COMMIT_INFO = "fc883d958";
20773
+ var GIT_COMMIT_INFO = "cf34fccc5";
20767
20774
 
20768
20775
  // packages/cli/src/utils/systemInfo.ts
20769
20776
  var debugLogger4 = createDebugLogger("STATUS");
@@ -20853,7 +20860,7 @@ async function getExtendedSystemInfo(context) {
20853
20860
  const baseInfo = await getSystemInfo(context);
20854
20861
  const memoryUsage = formatMemoryUsage(process4.memoryUsage().rss);
20855
20862
  const sandboxEnv = getSandboxEnv(true);
20856
- const contentGeneratorConfig = baseInfo.selectedAuthType === AuthType.USE_OPENAI || baseInfo.selectedAuthType === AuthType.USE_ANTHROPIC ? context.services.config?.getContentGeneratorConfig() : void 0;
20863
+ const contentGeneratorConfig = baseInfo.selectedAuthType === "openai" /* USE_OPENAI */ || baseInfo.selectedAuthType === "anthropic" /* USE_ANTHROPIC */ ? context.services.config?.getContentGeneratorConfig() : void 0;
20857
20864
  const baseUrl = contentGeneratorConfig?.baseUrl;
20858
20865
  const apiKeyEnvKey = contentGeneratorConfig?.apiKeyEnvKey;
20859
20866
  const gitCommit = GIT_COMMIT_INFO && !["N/A"].includes(GIT_COMMIT_INFO) ? GIT_COMMIT_INFO : void 0;
@@ -4,11 +4,10 @@ import {
4
4
  RequestTokenizer
5
5
  } from "./chunk-JRVB4QUY.js";
6
6
  import {
7
- AuthType,
8
7
  OpenAIContentConverter,
9
8
  TaggedThinkingParser,
10
9
  openaiRequestCaptureContext
11
- } from "./chunk-CICUTYTF.js";
10
+ } from "./chunk-YMBWB67C.js";
12
11
  import {
13
12
  createChildAbortController
14
13
  } from "./chunk-64WXLC72.js";
@@ -7097,7 +7096,7 @@ var DashScopeOpenAICompatibleProvider = class _DashScopeOpenAICompatibleProvider
7097
7096
  */
7098
7097
  static isDashScopeProvider(contentGeneratorConfig) {
7099
7098
  const { authType, baseUrl } = contentGeneratorConfig;
7100
- if (authType === AuthType.QWEN_OAUTH) return true;
7099
+ if (authType === "qwen-oauth" /* QWEN_OAUTH */) return true;
7101
7100
  if (!baseUrl) return true;
7102
7101
  const normalizedBaseUrl = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
7103
7102
  let hostname = null;
@@ -67082,20 +67082,14 @@ var QWEN_OAUTH_ALLOWED_MODELS = QWEN_OAUTH_MODELS.map(
67082
67082
  );
67083
67083
 
67084
67084
  // packages/core/src/core/contentGenerator.ts
67085
- var AuthType = {
67086
- USE_OPENAI: "openai",
67087
- QWEN_OAUTH: "qwen-oauth",
67088
- USE_GEMINI: "gemini",
67089
- USE_VERTEX_AI: "vertex-ai",
67090
- USE_ANTHROPIC: "anthropic"
67091
- };
67092
- var Protocol = /* @__PURE__ */ ((Protocol2) => {
67093
- Protocol2["OPENAI"] = "openai";
67094
- Protocol2["QWEN_OAUTH"] = "qwen-oauth";
67095
- Protocol2["GEMINI"] = "gemini";
67096
- Protocol2["ANTHROPIC"] = "anthropic";
67097
- return Protocol2;
67098
- })(Protocol || {});
67085
+ var AuthType = /* @__PURE__ */ ((AuthType2) => {
67086
+ AuthType2["USE_OPENAI"] = "openai";
67087
+ AuthType2["QWEN_OAUTH"] = "qwen-oauth";
67088
+ AuthType2["USE_GEMINI"] = "gemini";
67089
+ AuthType2["USE_VERTEX_AI"] = "vertex-ai";
67090
+ AuthType2["USE_ANTHROPIC"] = "anthropic";
67091
+ return AuthType2;
67092
+ })(AuthType || {});
67099
67093
  function setSource(sources, path11, source) {
67100
67094
  sources[path11] = source;
67101
67095
  }
@@ -67143,7 +67137,7 @@ function resolveContentGeneratorConfigWithSources(config, authType, generationCo
67143
67137
  __name(resolveContentGeneratorConfigWithSources, "resolveContentGeneratorConfigWithSources");
67144
67138
  function validateModelConfig(config, isStrictModelProvider = false) {
67145
67139
  const errors = [];
67146
- if (config.authType === AuthType.QWEN_OAUTH) {
67140
+ if (config.authType === "qwen-oauth" /* QWEN_OAUTH */) {
67147
67141
  return { valid: true, errors: [] };
67148
67142
  }
67149
67143
  if (!config.apiKey) {
@@ -67175,7 +67169,7 @@ function validateModelConfig(config, isStrictModelProvider = false) {
67175
67169
  errors.push(new MissingModelError({ authType: config.authType, envKey }));
67176
67170
  }
67177
67171
  }
67178
- if (config.authType === AuthType.USE_ANTHROPIC && !config.baseUrl) {
67172
+ if (config.authType === "anthropic" /* USE_ANTHROPIC */ && !config.baseUrl) {
67179
67173
  if (isStrictModelProvider) {
67180
67174
  errors.push(
67181
67175
  new MissingBaseUrlError({
@@ -67183,7 +67177,7 @@ function validateModelConfig(config, isStrictModelProvider = false) {
67183
67177
  model: config.model
67184
67178
  })
67185
67179
  );
67186
- } else if (config.authType === AuthType.USE_ANTHROPIC) {
67180
+ } else if (config.authType === "anthropic" /* USE_ANTHROPIC */) {
67187
67181
  errors.push(new MissingAnthropicBaseUrlEnvError());
67188
67182
  }
67189
67183
  }
@@ -67214,18 +67208,18 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
67214
67208
  if (!validation.valid) {
67215
67209
  throw new Error(validation.errors.map((e) => e.message).join("\n"));
67216
67210
  }
67217
- const protocol = generatorConfig.protocol;
67218
- if (!protocol) {
67219
- throw new Error("ContentGeneratorConfig must have a protocol");
67211
+ const authType = generatorConfig.authType;
67212
+ if (!authType) {
67213
+ throw new Error("ContentGeneratorConfig must have an authType");
67220
67214
  }
67221
67215
  let baseGenerator;
67222
67216
  try {
67223
- if (protocol === "openai" /* OPENAI */) {
67224
- const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-ENABCJDM.js");
67217
+ if (authType === "openai" /* USE_OPENAI */) {
67218
+ const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-2AUZ47JU.js");
67225
67219
  baseGenerator = createOpenAIContentGenerator(generatorConfig, config);
67226
- } else if (protocol === "qwen-oauth" /* QWEN_OAUTH */) {
67220
+ } else if (authType === "qwen-oauth" /* QWEN_OAUTH */) {
67227
67221
  const { getQwenOAuthClient: getQwenOauthClient } = await import("./qwenOAuth2-K4AASPCV.js");
67228
- const { QwenContentGenerator } = await import("./qwenContentGenerator-ISW42U7C.js");
67222
+ const { QwenContentGenerator } = await import("./qwenContentGenerator-QM6ENWSO.js");
67229
67223
  try {
67230
67224
  const qwenClient = await getQwenOauthClient(
67231
67225
  config,
@@ -67242,15 +67236,15 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
67242
67236
  }
67243
67237
  throw new Error(error instanceof Error ? error.message : String(error));
67244
67238
  }
67245
- } else if (protocol === "anthropic" /* ANTHROPIC */) {
67239
+ } else if (authType === "anthropic" /* USE_ANTHROPIC */) {
67246
67240
  const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-6MCH4X6S.js");
67247
67241
  baseGenerator = createAnthropicContentGenerator(generatorConfig, config);
67248
- } else if (protocol === "gemini" /* GEMINI */) {
67249
- const { createGeminiContentGenerator } = await import("./geminiContentGenerator-NTR4LTKS.js");
67242
+ } else if (authType === "gemini" /* USE_GEMINI */ || authType === "vertex-ai" /* USE_VERTEX_AI */) {
67243
+ const { createGeminiContentGenerator } = await import("./geminiContentGenerator-5HKVP4JF.js");
67250
67244
  baseGenerator = createGeminiContentGenerator(generatorConfig, config);
67251
67245
  } else {
67252
67246
  throw new Error(
67253
- `Error creating contentGenerator: Unknown protocol: ${protocol}`
67247
+ `Error creating contentGenerator: Unsupported authType: ${authType}`
67254
67248
  );
67255
67249
  }
67256
67250
  } catch (error) {
@@ -67258,7 +67252,7 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
67258
67252
  if (moduleNotFoundError) {
67259
67253
  throw new Error(
67260
67254
  `Qwen Code was updated in the background and needs to be restarted.
67261
- Please exit and restart Qwen Code to use the '${protocol}' provider.`,
67255
+ Please exit and restart Qwen Code to use the '${authType}' provider.`,
67262
67256
  { cause: moduleNotFoundError }
67263
67257
  );
67264
67258
  }
@@ -67404,7 +67398,7 @@ var QwenLogger = class _QwenLogger {
67404
67398
  properties: {
67405
67399
  auth_type: authType,
67406
67400
  model: this.config?.getModel(),
67407
- base_url: authType === AuthType.USE_OPENAI ? this.config?.getContentGeneratorConfig().baseUrl || "" : "",
67401
+ base_url: authType === "openai" /* USE_OPENAI */ ? this.config?.getContentGeneratorConfig().baseUrl || "" : "",
67408
67402
  ...this.config?.getChannel?.() ? { channel: this.config.getChannel() } : {}
67409
67403
  },
67410
67404
  _v: `qwen-code@${version}`
@@ -70278,7 +70272,6 @@ export {
70278
70272
  QWEN_OAUTH_MODELS,
70279
70273
  QWEN_OAUTH_ALLOWED_MODELS,
70280
70274
  AuthType,
70281
- Protocol,
70282
70275
  resolveContentGeneratorConfigWithSources,
70283
70276
  validateModelConfig,
70284
70277
  createContentGeneratorConfig,
@@ -4,7 +4,7 @@ import {
4
4
  Client,
5
5
  StdioClientTransport,
6
6
  extract
7
- } from "./chunk-YF3ORUIU.js";
7
+ } from "./chunk-2X2WXY6L.js";
8
8
  import "./chunk-K5PGHDBN.js";
9
9
  import "./chunk-TXVGVZYR.js";
10
10
  import "./chunk-XU5P23GN.js";
@@ -22,7 +22,7 @@ import "./chunk-EEEZIVFJ.js";
22
22
  import "./chunk-PRYMDRBV.js";
23
23
  import {
24
24
  safeJsonStringify
25
- } from "./chunk-CICUTYTF.js";
25
+ } from "./chunk-YMBWB67C.js";
26
26
  import "./chunk-3PJXIDKI.js";
27
27
  import "./chunk-UWCTAVOD.js";
28
28
  import "./chunk-OFEVLU4C.js";
@@ -4,9 +4,9 @@ import {
4
4
  collectContextData,
5
5
  contextCommand,
6
6
  formatContextUsageText
7
- } from "./chunk-GAAALA2X.js";
8
- import "./chunk-VRIVIYRL.js";
9
- import "./chunk-YF3ORUIU.js";
7
+ } from "./chunk-FXT37TZS.js";
8
+ import "./chunk-NQDRRVJD.js";
9
+ import "./chunk-2X2WXY6L.js";
10
10
  import "./chunk-K5PGHDBN.js";
11
11
  import "./chunk-TXVGVZYR.js";
12
12
  import "./chunk-XU5P23GN.js";
@@ -22,7 +22,7 @@ import "./chunk-OTBK43JR.js";
22
22
  import "./chunk-HGNSRCRB.js";
23
23
  import "./chunk-EEEZIVFJ.js";
24
24
  import "./chunk-PRYMDRBV.js";
25
- import "./chunk-CICUTYTF.js";
25
+ import "./chunk-YMBWB67C.js";
26
26
  import "./chunk-3PJXIDKI.js";
27
27
  import "./chunk-UWCTAVOD.js";
28
28
  import "./chunk-OFEVLU4C.js";
@@ -55,14 +55,11 @@ var CronCreateInvocation = class extends BaseToolInvocation {
55
55
  const scheduler = this.config.getCronScheduler();
56
56
  const recurring = this.params.recurring !== false;
57
57
  const durable = this.params.durable === true;
58
+ const prompt = this.params.prompt.trim();
58
59
  try {
59
60
  parseCron(this.params.cron);
60
61
  nextFireTime(this.params.cron, /* @__PURE__ */ new Date());
61
- const job = durable ? await scheduler.createDurable(
62
- this.params.cron,
63
- this.params.prompt,
64
- recurring
65
- ) : scheduler.create(this.params.cron, this.params.prompt, recurring);
62
+ const job = durable ? await scheduler.createDurable(this.params.cron, prompt, recurring) : scheduler.create(this.params.cron, prompt, recurring);
66
63
  const display = humanReadableCron(job.cronExpr);
67
64
  const returnDisplay = `Scheduled ${job.id} (${display})${durable ? " [durable]" : ""}`;
68
65
  const where = durable ? `Persisted to ${CRON_TASKS_DISPLAY_PATH}` : "Session-only (not written to disk, dies when Qwen Code exits)";
@@ -162,6 +159,12 @@ Returns a job ID you can pass to CronDelete.`,
162
159
  createInvocation(params) {
163
160
  return new CronCreateInvocation(this.config, params);
164
161
  }
162
+ validateToolParamValues(params) {
163
+ if (!params.prompt || params.prompt.trim() === "") {
164
+ return 'Parameter "prompt" must be a non-empty string.';
165
+ }
166
+ return null;
167
+ }
165
168
  /**
166
169
  * Forward the prompt and cadence to the classifier. The scheduled
167
170
  * prompt will be enqueued and executed against the agent at fire-time,
@@ -11,7 +11,7 @@ import {
11
11
  getDiffStat,
12
12
  needsUtf8Bom,
13
13
  safeLiteralReplace
14
- } from "./chunk-YF3ORUIU.js";
14
+ } from "./chunk-2X2WXY6L.js";
15
15
  import "./chunk-K5PGHDBN.js";
16
16
  import "./chunk-TXVGVZYR.js";
17
17
  import "./chunk-XU5P23GN.js";
@@ -34,7 +34,7 @@ import {
34
34
  getLanguageFromFilePath,
35
35
  getSpecificMimeType,
36
36
  logFileOperation
37
- } from "./chunk-CICUTYTF.js";
37
+ } from "./chunk-YMBWB67C.js";
38
38
  import "./chunk-3PJXIDKI.js";
39
39
  import "./chunk-UWCTAVOD.js";
40
40
  import "./chunk-OFEVLU4C.js";
@@ -1052,6 +1052,7 @@ var en_default = {
1052
1052
  "Size:": "Size:",
1053
1053
  "{{count}} bytes": "{{count}} bytes",
1054
1054
  "Reference in chat": "Reference in chat",
1055
+ "MCP resource server": "MCP resource server",
1055
1056
  // Invalid tool related translations
1056
1057
  "{{count}} invalid tools": "{{count}} invalid tools",
1057
1058
  invalid: "invalid",
@@ -4,7 +4,7 @@ import {
4
4
  GitWorktreeService,
5
5
  writeWorktreeSession,
6
6
  writeWorktreeSessionMarker
7
- } from "./chunk-YF3ORUIU.js";
7
+ } from "./chunk-2X2WXY6L.js";
8
8
  import "./chunk-K5PGHDBN.js";
9
9
  import "./chunk-TXVGVZYR.js";
10
10
  import "./chunk-XU5P23GN.js";
@@ -20,7 +20,7 @@ import "./chunk-OTBK43JR.js";
20
20
  import "./chunk-HGNSRCRB.js";
21
21
  import "./chunk-EEEZIVFJ.js";
22
22
  import "./chunk-PRYMDRBV.js";
23
- import "./chunk-CICUTYTF.js";
23
+ import "./chunk-YMBWB67C.js";
24
24
  import "./chunk-3PJXIDKI.js";
25
25
  import "./chunk-UWCTAVOD.js";
26
26
  import "./chunk-OFEVLU4C.js";
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import "./chunk-YF3ORUIU.js";
3
+ import "./chunk-2X2WXY6L.js";
4
4
  import "./chunk-K5PGHDBN.js";
5
5
  import "./chunk-TXVGVZYR.js";
6
6
  import "./chunk-XU5P23GN.js";
@@ -16,7 +16,7 @@ import "./chunk-OTBK43JR.js";
16
16
  import "./chunk-HGNSRCRB.js";
17
17
  import "./chunk-EEEZIVFJ.js";
18
18
  import "./chunk-PRYMDRBV.js";
19
- import "./chunk-CICUTYTF.js";
19
+ import "./chunk-YMBWB67C.js";
20
20
  import "./chunk-3PJXIDKI.js";
21
21
  import "./chunk-UWCTAVOD.js";
22
22
  import "./chunk-OFEVLU4C.js";
@@ -7,7 +7,7 @@ import {
7
7
  readWorktreeSession,
8
8
  readWorktreeSessionMarker,
9
9
  worktreeBranchForSlug
10
- } from "./chunk-YF3ORUIU.js";
10
+ } from "./chunk-2X2WXY6L.js";
11
11
  import "./chunk-K5PGHDBN.js";
12
12
  import "./chunk-TXVGVZYR.js";
13
13
  import "./chunk-XU5P23GN.js";
@@ -23,7 +23,7 @@ import "./chunk-OTBK43JR.js";
23
23
  import "./chunk-HGNSRCRB.js";
24
24
  import "./chunk-EEEZIVFJ.js";
25
25
  import "./chunk-PRYMDRBV.js";
26
- import "./chunk-CICUTYTF.js";
26
+ import "./chunk-YMBWB67C.js";
27
27
  import "./chunk-3PJXIDKI.js";
28
28
  import "./chunk-UWCTAVOD.js";
29
29
  import "./chunk-OFEVLU4C.js";
@@ -10,7 +10,7 @@ import {
10
10
  createApprovalModeOverride,
11
11
  delay,
12
12
  isAutonomousPrePlanMode
13
- } from "./chunk-YF3ORUIU.js";
13
+ } from "./chunk-2X2WXY6L.js";
14
14
  import "./chunk-K5PGHDBN.js";
15
15
  import "./chunk-TXVGVZYR.js";
16
16
  import "./chunk-XU5P23GN.js";
@@ -26,7 +26,7 @@ import "./chunk-OTBK43JR.js";
26
26
  import "./chunk-HGNSRCRB.js";
27
27
  import "./chunk-EEEZIVFJ.js";
28
28
  import "./chunk-PRYMDRBV.js";
29
- import "./chunk-CICUTYTF.js";
29
+ import "./chunk-YMBWB67C.js";
30
30
  import "./chunk-3PJXIDKI.js";
31
31
  import "./chunk-UWCTAVOD.js";
32
32
  import "./chunk-OFEVLU4C.js";