@qwen-code/qwen-code 0.7.0-nightly.20260111.bde31d12 → 0.7.0-nightly.20260113.09196c6e

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 (2) hide show
  1. package/cli.js +269 -116
  2. package/package.json +2 -2
package/cli.js CHANGED
@@ -33912,7 +33912,7 @@ var require_src5 = __commonJS({
33912
33912
  };
33913
33913
  }
33914
33914
  __name(_asyncToGenerator, "_asyncToGenerator");
33915
- var readFile12 = fs100.readFile ? (0, _util.promisify)(fs100.readFile) : /* @__PURE__ */ _asyncToGenerator(/* @__PURE__ */ _regenerator().m(/* @__PURE__ */ __name(function _callee() {
33915
+ var readFile11 = fs100.readFile ? (0, _util.promisify)(fs100.readFile) : /* @__PURE__ */ _asyncToGenerator(/* @__PURE__ */ _regenerator().m(/* @__PURE__ */ __name(function _callee() {
33916
33916
  return _regenerator().w(function(_context) {
33917
33917
  while (1) switch (_context.n) {
33918
33918
  case 0:
@@ -34054,7 +34054,7 @@ var require_src5 = __commonJS({
34054
34054
  break;
34055
34055
  case 1:
34056
34056
  _context2.n = 2;
34057
- return readFile12(keyFile, "utf8");
34057
+ return readFile11(keyFile, "utf8");
34058
34058
  case 2:
34059
34059
  key = _context2.v;
34060
34060
  body = JSON.parse(key);
@@ -34072,7 +34072,7 @@ var require_src5 = __commonJS({
34072
34072
  });
34073
34073
  case 4:
34074
34074
  _context2.n = 5;
34075
- return readFile12(keyFile, "utf8");
34075
+ return readFile11(keyFile, "utf8");
34076
34076
  case 5:
34077
34077
  _privateKey = _context2.v;
34078
34078
  return _context2.a(2, {
@@ -35710,7 +35710,7 @@ var require_filesubjecttokensupplier = __commonJS({
35710
35710
  exports2.FileSubjectTokenSupplier = void 0;
35711
35711
  var util_1 = __require("util");
35712
35712
  var fs100 = __require("fs");
35713
- var readFile12 = (0, util_1.promisify)(fs100.readFile ?? (() => {
35713
+ var readFile11 = (0, util_1.promisify)(fs100.readFile ?? (() => {
35714
35714
  }));
35715
35715
  var realpath2 = (0, util_1.promisify)(fs100.realpath ?? (() => {
35716
35716
  }));
@@ -35753,7 +35753,7 @@ var require_filesubjecttokensupplier = __commonJS({
35753
35753
  throw err;
35754
35754
  }
35755
35755
  let subjectToken;
35756
- const rawText = await readFile12(parsedFilePath, { encoding: "utf8" });
35756
+ const rawText = await readFile11(parsedFilePath, { encoding: "utf8" });
35757
35757
  if (this.formatType === "text") {
35758
35758
  subjectToken = rawText;
35759
35759
  } else if (this.formatType === "json" && this.subjectTokenFieldName) {
@@ -81203,7 +81203,7 @@ var require_error = __commonJS({
81203
81203
  init_esbuild_shims();
81204
81204
  Object.defineProperty(exports2, "__esModule", { value: true });
81205
81205
  exports2.getErrorMessage = getErrorMessage4;
81206
- exports2.getErrorCode = getErrorCode;
81206
+ exports2.getErrorCode = getErrorCode2;
81207
81207
  function getErrorMessage4(error2) {
81208
81208
  if (error2 instanceof Error) {
81209
81209
  return error2.message;
@@ -81212,14 +81212,14 @@ var require_error = __commonJS({
81212
81212
  }
81213
81213
  }
81214
81214
  __name(getErrorMessage4, "getErrorMessage");
81215
- function getErrorCode(error2) {
81215
+ function getErrorCode2(error2) {
81216
81216
  if (typeof error2 === "object" && error2 !== null && "code" in error2 && typeof error2.code === "number") {
81217
81217
  return error2.code;
81218
81218
  } else {
81219
81219
  return null;
81220
81220
  }
81221
81221
  }
81222
- __name(getErrorCode, "getErrorCode");
81222
+ __name(getErrorCode2, "getErrorCode");
81223
81223
  }
81224
81224
  });
81225
81225
 
@@ -123464,8 +123464,8 @@ var require_async = __commonJS({
123464
123464
  cb(null, x3);
123465
123465
  }
123466
123466
  }, "maybeRealpath");
123467
- var defaultReadPackage = /* @__PURE__ */ __name(function defaultReadPackage2(readFile12, pkgfile, cb) {
123468
- readFile12(pkgfile, function(readFileErr, body) {
123467
+ var defaultReadPackage = /* @__PURE__ */ __name(function defaultReadPackage2(readFile11, pkgfile, cb) {
123468
+ readFile11(pkgfile, function(readFileErr, body) {
123469
123469
  if (readFileErr) cb(readFileErr);
123470
123470
  else {
123471
123471
  try {
@@ -123500,7 +123500,7 @@ var require_async = __commonJS({
123500
123500
  opts = normalizeOptions(x3, opts);
123501
123501
  var isFile3 = opts.isFile || defaultIsFile;
123502
123502
  var isDirectory = opts.isDirectory || defaultIsDir;
123503
- var readFile12 = opts.readFile || fs100.readFile;
123503
+ var readFile11 = opts.readFile || fs100.readFile;
123504
123504
  var realpath2 = opts.realpath || defaultRealpath;
123505
123505
  var readPackage2 = opts.readPackage || defaultReadPackage;
123506
123506
  if (opts.readFile && opts.readPackage) {
@@ -123626,7 +123626,7 @@ var require_async = __commonJS({
123626
123626
  var pkgfile = path111.join(pkgdir, "package.json");
123627
123627
  isFile3(pkgfile, function(err2, ex) {
123628
123628
  if (!ex) return loadpkg(path111.dirname(dir), cb2);
123629
- readPackage2(readFile12, pkgfile, function(err3, pkgParam) {
123629
+ readPackage2(readFile11, pkgfile, function(err3, pkgParam) {
123630
123630
  if (err3) cb2(err3);
123631
123631
  var pkg2 = pkgParam;
123632
123632
  if (pkg2 && opts.packageFilter) {
@@ -123651,7 +123651,7 @@ var require_async = __commonJS({
123651
123651
  isFile3(pkgfile, function(err2, ex) {
123652
123652
  if (err2) return cb2(err2);
123653
123653
  if (!ex) return loadAsFile(path111.join(x4, "index"), fpkg, cb2);
123654
- readPackage2(readFile12, pkgfile, function(err3, pkgParam) {
123654
+ readPackage2(readFile11, pkgfile, function(err3, pkgParam) {
123655
123655
  if (err3) return cb2(err3);
123656
123656
  var pkg2 = pkgParam;
123657
123657
  if (pkg2 && opts.packageFilter) {
@@ -142694,6 +142694,154 @@ var init_open = __esm({
142694
142694
  }
142695
142695
  });
142696
142696
 
142697
+ // packages/core/dist/src/utils/fetch.js
142698
+ import { URL as URL2 } from "node:url";
142699
+ function isPrivateIp(url2) {
142700
+ try {
142701
+ const hostname4 = new URL2(url2).hostname;
142702
+ return PRIVATE_IP_RANGES.some((range) => range.test(hostname4));
142703
+ } catch (_e2) {
142704
+ return false;
142705
+ }
142706
+ }
142707
+ async function fetchWithTimeout(url2, timeout2) {
142708
+ const controller = new AbortController();
142709
+ const timeoutId = setTimeout(() => controller.abort(), timeout2);
142710
+ try {
142711
+ const response = await fetch(url2, { signal: controller.signal });
142712
+ return response;
142713
+ } catch (error2) {
142714
+ if (isNodeError(error2) && error2.code === "ABORT_ERR") {
142715
+ throw new FetchError2(`Request timed out after ${timeout2}ms`, "ETIMEDOUT");
142716
+ }
142717
+ throw new FetchError2(getErrorMessage(error2));
142718
+ } finally {
142719
+ clearTimeout(timeoutId);
142720
+ }
142721
+ }
142722
+ function getErrorCode(error2) {
142723
+ if (!error2 || typeof error2 !== "object") {
142724
+ return void 0;
142725
+ }
142726
+ if ("code" in error2 && typeof error2["code"] === "string") {
142727
+ return error2["code"];
142728
+ }
142729
+ return void 0;
142730
+ }
142731
+ function formatUnknownErrorMessage(error2) {
142732
+ if (typeof error2 === "string") {
142733
+ return error2;
142734
+ }
142735
+ if (typeof error2 === "number" || typeof error2 === "boolean" || typeof error2 === "bigint") {
142736
+ return String(error2);
142737
+ }
142738
+ if (error2 instanceof Error) {
142739
+ return error2.message;
142740
+ }
142741
+ if (!error2 || typeof error2 !== "object") {
142742
+ return void 0;
142743
+ }
142744
+ const message = error2["message"];
142745
+ if (typeof message === "string") {
142746
+ return message;
142747
+ }
142748
+ return void 0;
142749
+ }
142750
+ function formatErrorCause(error2) {
142751
+ if (!(error2 instanceof Error)) {
142752
+ return void 0;
142753
+ }
142754
+ const cause = error2.cause;
142755
+ if (!cause) {
142756
+ return void 0;
142757
+ }
142758
+ const causeCode = getErrorCode(cause);
142759
+ const causeMessage = formatUnknownErrorMessage(cause);
142760
+ if (!causeCode && !causeMessage) {
142761
+ return void 0;
142762
+ }
142763
+ if (causeCode && causeMessage && !causeMessage.includes(causeCode)) {
142764
+ return `${causeCode}: ${causeMessage}`;
142765
+ }
142766
+ return causeMessage ?? causeCode;
142767
+ }
142768
+ function formatFetchErrorForUser(error2, options2 = {}) {
142769
+ const errorMessage = getErrorMessage(error2);
142770
+ const code2 = error2 instanceof Error ? getErrorCode(error2.cause) ?? getErrorCode(error2) : getErrorCode(error2);
142771
+ const cause = formatErrorCause(error2);
142772
+ const fullErrorMessage = [
142773
+ errorMessage,
142774
+ cause ? `(cause: ${cause})` : void 0
142775
+ ].filter(Boolean).join(" ");
142776
+ const shouldShowFetchHints = errorMessage.toLowerCase().includes("fetch failed") || code2 != null && FETCH_TROUBLESHOOTING_ERROR_CODES.has(code2);
142777
+ const shouldShowTlsHint = code2 != null && TLS_ERROR_CODES.has(code2);
142778
+ if (!shouldShowFetchHints) {
142779
+ return fullErrorMessage;
142780
+ }
142781
+ const hintLines = [
142782
+ "",
142783
+ "Troubleshooting:",
142784
+ ...options2.url ? [`- Confirm you can reach ${options2.url} from this machine.`] : [],
142785
+ "- If you are behind a proxy, pass `--proxy <url>` (or set `proxy` in settings).",
142786
+ ...shouldShowTlsHint ? [
142787
+ "- If your network uses a corporate TLS inspection CA, set `NODE_EXTRA_CA_CERTS` to your CA bundle."
142788
+ ] : []
142789
+ ];
142790
+ return `${fullErrorMessage}${hintLines.join("\n")}`;
142791
+ }
142792
+ var PRIVATE_IP_RANGES, TLS_ERROR_CODES, FETCH_TROUBLESHOOTING_ERROR_CODES, FetchError2;
142793
+ var init_fetch = __esm({
142794
+ "packages/core/dist/src/utils/fetch.js"() {
142795
+ "use strict";
142796
+ init_esbuild_shims();
142797
+ init_errors();
142798
+ PRIVATE_IP_RANGES = [
142799
+ /^10\./,
142800
+ /^127\./,
142801
+ /^172\.(1[6-9]|2[0-9]|3[0-1])\./,
142802
+ /^192\.168\./,
142803
+ /^::1$/,
142804
+ /^fc00:/,
142805
+ /^fe80:/
142806
+ ];
142807
+ TLS_ERROR_CODES = /* @__PURE__ */ new Set([
142808
+ "UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
142809
+ "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
142810
+ "SELF_SIGNED_CERT_IN_CHAIN",
142811
+ "DEPTH_ZERO_SELF_SIGNED_CERT",
142812
+ "CERT_HAS_EXPIRED",
142813
+ "ERR_TLS_CERT_ALTNAME_INVALID"
142814
+ ]);
142815
+ FETCH_TROUBLESHOOTING_ERROR_CODES = /* @__PURE__ */ new Set([
142816
+ ...TLS_ERROR_CODES,
142817
+ "ECONNRESET",
142818
+ "ETIMEDOUT",
142819
+ "ECONNREFUSED",
142820
+ "ENOTFOUND",
142821
+ "EAI_AGAIN",
142822
+ "EHOSTUNREACH",
142823
+ "ENETUNREACH"
142824
+ ]);
142825
+ FetchError2 = class extends Error {
142826
+ static {
142827
+ __name(this, "FetchError");
142828
+ }
142829
+ code;
142830
+ constructor(message, code2) {
142831
+ super(message);
142832
+ this.code = code2;
142833
+ this.name = "FetchError";
142834
+ }
142835
+ };
142836
+ __name(isPrivateIp, "isPrivateIp");
142837
+ __name(fetchWithTimeout, "fetchWithTimeout");
142838
+ __name(getErrorCode, "getErrorCode");
142839
+ __name(formatUnknownErrorMessage, "formatUnknownErrorMessage");
142840
+ __name(formatErrorCause, "formatErrorCause");
142841
+ __name(formatFetchErrorForUser, "formatFetchErrorForUser");
142842
+ }
142843
+ });
142844
+
142697
142845
  // packages/core/dist/src/qwen/sharedTokenManager.js
142698
142846
  import path8 from "node:path";
142699
142847
  import { promises as fs12, unlinkSync } from "node:fs";
@@ -143480,8 +143628,11 @@ Server requested to slow down, increasing poll interval to ${pollInterval}ms'`);
143480
143628
  console.error("\n" + timeoutMessage);
143481
143629
  return { success: false, reason: "timeout", message: timeoutMessage };
143482
143630
  } catch (error2) {
143483
- const errorMessage = error2 instanceof Error ? error2.message : String(error2);
143484
- const message = `Device authorization flow failed: ${errorMessage}`;
143631
+ const fullErrorMessage = formatFetchErrorForUser(error2, {
143632
+ url: QWEN_OAUTH_BASE_URL
143633
+ });
143634
+ const message = `Device authorization flow failed: ${fullErrorMessage}`;
143635
+ qwenOAuth2Events.emit(QwenOAuth2Event.AuthProgress, "error", message);
143485
143636
  console.error(message);
143486
143637
  return { success: false, reason: "error", message };
143487
143638
  } finally {
@@ -143529,6 +143680,7 @@ var init_qwenOAuth2 = __esm({
143529
143680
  "use strict";
143530
143681
  init_esbuild_shims();
143531
143682
  init_open();
143683
+ init_fetch();
143532
143684
  init_sharedTokenManager();
143533
143685
  QWEN_OAUTH_BASE_URL = "https://chat.qwen.ai";
143534
143686
  QWEN_OAUTH_DEVICE_CODE_ENDPOINT = `${QWEN_OAUTH_BASE_URL}/api/v1/oauth2/device/code`;
@@ -155198,7 +155350,7 @@ __export(geminiContentGenerator_exports, {
155198
155350
  createGeminiContentGenerator: () => createGeminiContentGenerator
155199
155351
  });
155200
155352
  function createGeminiContentGenerator(config2, gcConfig) {
155201
- const version2 = "0.7.0-nightly.20260111.bde31d12";
155353
+ const version2 = "0.7.0-nightly.20260113.09196c6e";
155202
155354
  const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
155203
155355
  const baseHeaders = {
155204
155356
  "User-Agent": userAgent2
@@ -170155,7 +170307,8 @@ var init_shellExecutionService = __esm({
170155
170307
  stdio: ["ignore", "pipe", "pipe"],
170156
170308
  windowsVerbatimArguments: true,
170157
170309
  shell: isWindows8 ? true : "bash",
170158
- detached: true,
170310
+ detached: !isWindows8,
170311
+ windowsHide: isWindows8,
170159
170312
  env: {
170160
170313
  ...process.env,
170161
170314
  QWEN_CODE: "1",
@@ -188646,7 +188799,7 @@ function gitInstanceFactory(baseDir, options2) {
188646
188799
  customBinaryPlugin(plugins, config2.binary, config2.unsafe?.allowUnsafeCustomBinary);
188647
188800
  return new Git(config2, plugins);
188648
188801
  }
188649
- var import_file_exists, import_debug, import_promise_deferred, import_promise_deferred2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __esm2, __commonJS2, __export2, __copyProps2, __toCommonJS2, cache, init_pathspec, GitError, init_git_error, GitResponseError, init_git_response_error, TaskConfigurationError, init_task_configuration_error, NULL2, NOOP, objectToString, init_util3, filterArray, filterString, filterStringArray, filterStringOrStringArray, filterHasLength, init_argument_filters, ExitCodes, init_exit_codes, GitOutputStreams, init_git_output_streams, LineParser, RemoteLineParser, init_line_parser, defaultOptions2, init_simple_git_options, init_task_options, init_task_parser, utils_exports, init_utils6, check_is_repo_exports, CheckRepoActions, onError, parser, init_check_is_repo, CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp, init_CleanSummary, task_exports, EMPTY_COMMANDS, init_task2, clean_exports, CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues, init_clean, ConfigList, init_ConfigList, GitConfigScope, init_config2, DiffNameStatus, diffNameStatus, init_diff_name_status, disallowedOptions, Query, _a4, GrepQuery, init_grep, reset_exports, ResetMode, ResetModes, init_reset, init_git_logger, TasksPendingQueue, init_tasks_pending_queue, GitExecutorChain, init_git_executor_chain, git_executor_exports, GitExecutor, init_git_executor, init_task_callback, init_change_working_directory, init_checkout, parser2, init_count_objects, parsers, init_parse_commit, init_commit, init_first_commit, init_hash_object, InitSummary, initResponseRegex, reInitResponseRegex, init_InitSummary, bareCommand, init_init, logFormatRegex, init_log_format, DiffSummary, init_DiffSummary, statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers, init_parse_diff_summary, START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames, init_parse_list_log_summary, diff_exports, init_diff, excludeOptions, init_log2, MergeSummaryConflict, MergeSummaryDetail, init_MergeSummary, PullSummary, PullFailedSummary, init_PullSummary, remoteMessagesObjectParsers, init_parse_remote_objects, parsers2, RemoteMessageSummary, init_parse_remote_messages, FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult, init_parse_pull, parsers4, parseMergeResult, parseMergeDetail, init_parse_merge, init_merge, parsers5, parsePushResult, parsePushDetail, init_parse_push, push_exports, init_push, init_show, fromPathRegex, FileStatusSummary, init_FileStatusSummary, StatusSummary, parsers6, parseStatusSummary, init_StatusSummary, ignoredOptions, init_status2, NOT_INSTALLED, parsers7, init_version4, simple_git_api_exports, SimpleGitApi, init_simple_git_api, scheduler_exports, createScheduledTask, Scheduler, init_scheduler, apply_patch_exports, init_apply_patch, BranchDeletionBatch, init_BranchDeleteSummary, deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions, init_parse_branch_delete, BranchSummaryResult, init_BranchSummary, parsers9, init_parse_branch, branch_exports, init_branch, parseCheckIgnore, init_CheckIgnore, check_ignore_exports, init_check_ignore, clone_exports, init_clone, parsers10, init_parse_fetch, fetch_exports, init_fetch, parsers11, init_parse_move, move_exports, init_move, pull_exports, init_pull, init_GetRemoteSummary, remote_exports, init_remote, stash_list_exports, init_stash_list, sub_module_exports, init_sub_module, TagList, parseTagList, init_TagList, tag_exports, init_tag, require_git, GitConstructError, GitPluginError, never, WRONG_NUMBER_ERR, WRONG_CHARS_ERR, PluginStore, Git, simpleGit;
188802
+ var import_file_exists, import_debug, import_promise_deferred, import_promise_deferred2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __esm2, __commonJS2, __export2, __copyProps2, __toCommonJS2, cache, init_pathspec, GitError, init_git_error, GitResponseError, init_git_response_error, TaskConfigurationError, init_task_configuration_error, NULL2, NOOP, objectToString, init_util3, filterArray, filterString, filterStringArray, filterStringOrStringArray, filterHasLength, init_argument_filters, ExitCodes, init_exit_codes, GitOutputStreams, init_git_output_streams, LineParser, RemoteLineParser, init_line_parser, defaultOptions2, init_simple_git_options, init_task_options, init_task_parser, utils_exports, init_utils6, check_is_repo_exports, CheckRepoActions, onError, parser, init_check_is_repo, CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp, init_CleanSummary, task_exports, EMPTY_COMMANDS, init_task2, clean_exports, CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues, init_clean, ConfigList, init_ConfigList, GitConfigScope, init_config2, DiffNameStatus, diffNameStatus, init_diff_name_status, disallowedOptions, Query, _a4, GrepQuery, init_grep, reset_exports, ResetMode, ResetModes, init_reset, init_git_logger, TasksPendingQueue, init_tasks_pending_queue, GitExecutorChain, init_git_executor_chain, git_executor_exports, GitExecutor, init_git_executor, init_task_callback, init_change_working_directory, init_checkout, parser2, init_count_objects, parsers, init_parse_commit, init_commit, init_first_commit, init_hash_object, InitSummary, initResponseRegex, reInitResponseRegex, init_InitSummary, bareCommand, init_init, logFormatRegex, init_log_format, DiffSummary, init_DiffSummary, statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers, init_parse_diff_summary, START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames, init_parse_list_log_summary, diff_exports, init_diff, excludeOptions, init_log2, MergeSummaryConflict, MergeSummaryDetail, init_MergeSummary, PullSummary, PullFailedSummary, init_PullSummary, remoteMessagesObjectParsers, init_parse_remote_objects, parsers2, RemoteMessageSummary, init_parse_remote_messages, FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult, init_parse_pull, parsers4, parseMergeResult, parseMergeDetail, init_parse_merge, init_merge, parsers5, parsePushResult, parsePushDetail, init_parse_push, push_exports, init_push, init_show, fromPathRegex, FileStatusSummary, init_FileStatusSummary, StatusSummary, parsers6, parseStatusSummary, init_StatusSummary, ignoredOptions, init_status2, NOT_INSTALLED, parsers7, init_version4, simple_git_api_exports, SimpleGitApi, init_simple_git_api, scheduler_exports, createScheduledTask, Scheduler, init_scheduler, apply_patch_exports, init_apply_patch, BranchDeletionBatch, init_BranchDeleteSummary, deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions, init_parse_branch_delete, BranchSummaryResult, init_BranchSummary, parsers9, init_parse_branch, branch_exports, init_branch, parseCheckIgnore, init_CheckIgnore, check_ignore_exports, init_check_ignore, clone_exports, init_clone, parsers10, init_parse_fetch, fetch_exports, init_fetch2, parsers11, init_parse_move, move_exports, init_move, pull_exports, init_pull, init_GetRemoteSummary, remote_exports, init_remote, stash_list_exports, init_stash_list, sub_module_exports, init_sub_module, TagList, parseTagList, init_TagList, tag_exports, init_tag, require_git, GitConstructError, GitPluginError, never, WRONG_NUMBER_ERR, WRONG_CHARS_ERR, PluginStore, Git, simpleGit;
188650
188803
  var init_esm12 = __esm({
188651
188804
  "node_modules/simple-git/dist/esm/index.js"() {
188652
188805
  init_esbuild_shims();
@@ -190860,7 +191013,7 @@ var init_esm12 = __esm({
190860
191013
  });
190861
191014
  __name(disallowedCommand2, "disallowedCommand2");
190862
191015
  __name(fetchTask, "fetchTask");
190863
- init_fetch = __esm2({
191016
+ init_fetch2 = __esm2({
190864
191017
  "src/lib/tasks/fetch.ts"() {
190865
191018
  "use strict";
190866
191019
  init_parse_fetch();
@@ -191048,7 +191201,7 @@ var init_esm12 = __esm({
191048
191201
  var { cloneTask: cloneTask2, cloneMirrorTask: cloneMirrorTask2 } = (init_clone(), __toCommonJS2(clone_exports));
191049
191202
  var { cleanWithOptionsTask: cleanWithOptionsTask2, isCleanOptionsArray: isCleanOptionsArray2 } = (init_clean(), __toCommonJS2(clean_exports));
191050
191203
  var { diffSummaryTask: diffSummaryTask2 } = (init_diff(), __toCommonJS2(diff_exports));
191051
- var { fetchTask: fetchTask2 } = (init_fetch(), __toCommonJS2(fetch_exports));
191204
+ var { fetchTask: fetchTask2 } = (init_fetch2(), __toCommonJS2(fetch_exports));
191052
191205
  var { moveTask: moveTask2 } = (init_move(), __toCommonJS2(move_exports));
191053
191206
  var { pullTask: pullTask2 } = (init_pull(), __toCommonJS2(pull_exports));
191054
191207
  var { pushTagsTask: pushTagsTask2 } = (init_push(), __toCommonJS2(push_exports));
@@ -208642,11 +208795,11 @@ var init_sdk_control_client_transport = __esm({
208642
208795
  import { execFile as execFile9 } from "node:child_process";
208643
208796
  import { promisify as promisify7 } from "node:util";
208644
208797
  import { platform as platform4 } from "node:os";
208645
- import { URL as URL2 } from "node:url";
208798
+ import { URL as URL3 } from "node:url";
208646
208799
  function validateUrl(url2) {
208647
208800
  let parsedUrl;
208648
208801
  try {
208649
- parsedUrl = new URL2(url2);
208802
+ parsedUrl = new URL3(url2);
208650
208803
  } catch (_error) {
208651
208804
  throw new Error(`Invalid URL: ${url2}`);
208652
208805
  }
@@ -209608,7 +209761,7 @@ var init_oauth_utils = __esm({
209608
209761
  // packages/core/dist/src/mcp/oauth-provider.js
209609
209762
  import * as http4 from "node:http";
209610
209763
  import * as crypto11 from "node:crypto";
209611
- import { URL as URL3 } from "node:url";
209764
+ import { URL as URL4 } from "node:url";
209612
209765
  var OAUTH_DISPLAY_MESSAGE_EVENT, HTTP_OK, MCPOAuthProvider;
209613
209766
  var init_oauth_provider = __esm({
209614
209767
  "packages/core/dist/src/mcp/oauth-provider.js"() {
@@ -209691,7 +209844,7 @@ var init_oauth_provider = __esm({
209691
209844
  return new Promise((resolve25, reject) => {
209692
209845
  const server = http4.createServer(async (req, res) => {
209693
209846
  try {
209694
- const url2 = new URL3(req.url, `http://localhost:${OAUTH_REDIRECT_PORT}`);
209847
+ const url2 = new URL4(req.url, `http://localhost:${OAUTH_REDIRECT_PORT}`);
209695
209848
  if (url2.pathname !== OAUTH_REDIRECT_PATH) {
209696
209849
  res.writeHead(404);
209697
209850
  res.end("Not found");
@@ -209786,7 +209939,7 @@ var init_oauth_provider = __esm({
209786
209939
  console.warn(`Could not add resource parameter: ${getErrorMessage(error2)}`);
209787
209940
  }
209788
209941
  }
209789
- const url2 = new URL3(config2.authorizationUrl);
209942
+ const url2 = new URL4(config2.authorizationUrl);
209790
209943
  params.forEach((value, key) => {
209791
209944
  url2.searchParams.append(key, value);
209792
209945
  });
@@ -210023,7 +210176,7 @@ var init_oauth_provider = __esm({
210023
210176
  if (!config2.authorizationUrl) {
210024
210177
  throw new Error("Cannot perform dynamic registration without authorization URL");
210025
210178
  }
210026
- const authUrl2 = new URL3(config2.authorizationUrl);
210179
+ const authUrl2 = new URL4(config2.authorizationUrl);
210027
210180
  const serverUrl = `${authUrl2.protocol}//${authUrl2.host}`;
210028
210181
  console.debug("\u2192 Attempting dynamic client registration...");
210029
210182
  const authServerMetadata = await OAuthUtils.discoverAuthorizationServerMetadata(serverUrl);
@@ -216854,62 +217007,6 @@ var init_html_to_text = __esm({
216854
217007
  }
216855
217008
  });
216856
217009
 
216857
- // packages/core/dist/src/utils/fetch.js
216858
- import { URL as URL4 } from "node:url";
216859
- function isPrivateIp(url2) {
216860
- try {
216861
- const hostname4 = new URL4(url2).hostname;
216862
- return PRIVATE_IP_RANGES.some((range) => range.test(hostname4));
216863
- } catch (_e2) {
216864
- return false;
216865
- }
216866
- }
216867
- async function fetchWithTimeout(url2, timeout2) {
216868
- const controller = new AbortController();
216869
- const timeoutId = setTimeout(() => controller.abort(), timeout2);
216870
- try {
216871
- const response = await fetch(url2, { signal: controller.signal });
216872
- return response;
216873
- } catch (error2) {
216874
- if (isNodeError(error2) && error2.code === "ABORT_ERR") {
216875
- throw new FetchError2(`Request timed out after ${timeout2}ms`, "ETIMEDOUT");
216876
- }
216877
- throw new FetchError2(getErrorMessage(error2));
216878
- } finally {
216879
- clearTimeout(timeoutId);
216880
- }
216881
- }
216882
- var PRIVATE_IP_RANGES, FetchError2;
216883
- var init_fetch2 = __esm({
216884
- "packages/core/dist/src/utils/fetch.js"() {
216885
- "use strict";
216886
- init_esbuild_shims();
216887
- init_errors();
216888
- PRIVATE_IP_RANGES = [
216889
- /^10\./,
216890
- /^127\./,
216891
- /^172\.(1[6-9]|2[0-9]|3[0-1])\./,
216892
- /^192\.168\./,
216893
- /^::1$/,
216894
- /^fc00:/,
216895
- /^fe80:/
216896
- ];
216897
- FetchError2 = class extends Error {
216898
- static {
216899
- __name(this, "FetchError");
216900
- }
216901
- code;
216902
- constructor(message, code2) {
216903
- super(message);
216904
- this.code = code2;
216905
- this.name = "FetchError";
216906
- }
216907
- };
216908
- __name(isPrivateIp, "isPrivateIp");
216909
- __name(fetchWithTimeout, "fetchWithTimeout");
216910
- }
216911
- });
216912
-
216913
217010
  // packages/core/dist/src/tools/web-fetch.js
216914
217011
  var import_undici2, URL_FETCH_TIMEOUT_MS, MAX_CONTENT_LENGTH, WebFetchToolInvocation, WebFetchTool;
216915
217012
  var init_web_fetch = __esm({
@@ -216919,7 +217016,7 @@ var init_web_fetch = __esm({
216919
217016
  init_html_to_text();
216920
217017
  import_undici2 = __toESM(require_undici(), 1);
216921
217018
  init_config3();
216922
- init_fetch2();
217019
+ init_fetch();
216923
217020
  init_partUtils();
216924
217021
  init_tool_error();
216925
217022
  init_tools();
@@ -325371,7 +325468,7 @@ var require_src42 = __commonJS({
325371
325468
  };
325372
325469
  }
325373
325470
  __name(_asyncToGenerator, "_asyncToGenerator");
325374
- var readFile12 = fs100.readFile ? (0, _util.promisify)(fs100.readFile) : /* @__PURE__ */ _asyncToGenerator(/* @__PURE__ */ _regenerator().m(/* @__PURE__ */ __name(function _callee() {
325471
+ var readFile11 = fs100.readFile ? (0, _util.promisify)(fs100.readFile) : /* @__PURE__ */ _asyncToGenerator(/* @__PURE__ */ _regenerator().m(/* @__PURE__ */ __name(function _callee() {
325375
325472
  return _regenerator().w(function(_context) {
325376
325473
  while (1) switch (_context.n) {
325377
325474
  case 0:
@@ -325513,7 +325610,7 @@ var require_src42 = __commonJS({
325513
325610
  break;
325514
325611
  case 1:
325515
325612
  _context2.n = 2;
325516
- return readFile12(keyFile, "utf8");
325613
+ return readFile11(keyFile, "utf8");
325517
325614
  case 2:
325518
325615
  key = _context2.v;
325519
325616
  body = JSON.parse(key);
@@ -325531,7 +325628,7 @@ var require_src42 = __commonJS({
325531
325628
  });
325532
325629
  case 4:
325533
325630
  _context2.n = 5;
325534
- return readFile12(keyFile, "utf8");
325631
+ return readFile11(keyFile, "utf8");
325535
325632
  case 5:
325536
325633
  _privateKey = _context2.v;
325537
325634
  return _context2.a(2, {
@@ -327169,7 +327266,7 @@ var require_filesubjecttokensupplier2 = __commonJS({
327169
327266
  exports2.FileSubjectTokenSupplier = void 0;
327170
327267
  var util_1 = __require("util");
327171
327268
  var fs100 = __require("fs");
327172
- var readFile12 = (0, util_1.promisify)(fs100.readFile ?? (() => {
327269
+ var readFile11 = (0, util_1.promisify)(fs100.readFile ?? (() => {
327173
327270
  }));
327174
327271
  var realpath2 = (0, util_1.promisify)(fs100.realpath ?? (() => {
327175
327272
  }));
@@ -327212,7 +327309,7 @@ var require_filesubjecttokensupplier2 = __commonJS({
327212
327309
  throw err;
327213
327310
  }
327214
327311
  let subjectToken;
327215
- const rawText = await readFile12(parsedFilePath, { encoding: "utf8" });
327312
+ const rawText = await readFile11(parsedFilePath, { encoding: "utf8" });
327216
327313
  if (this.formatType === "text") {
327217
327314
  subjectToken = rawText;
327218
327315
  } else if (this.formatType === "json" && this.subjectTokenFieldName) {
@@ -330416,8 +330513,8 @@ var require_graceful_fs = __commonJS({
330416
330513
  fs101.createReadStream = createReadStream3;
330417
330514
  fs101.createWriteStream = createWriteStream5;
330418
330515
  var fs$readFile = fs101.readFile;
330419
- fs101.readFile = readFile12;
330420
- function readFile12(path111, options2, cb) {
330516
+ fs101.readFile = readFile11;
330517
+ function readFile11(path111, options2, cb) {
330421
330518
  if (typeof options2 === "function")
330422
330519
  cb = options2, options2 = null;
330423
330520
  return go$readFile(path111, options2, cb);
@@ -330433,7 +330530,7 @@ var require_graceful_fs = __commonJS({
330433
330530
  }
330434
330531
  __name(go$readFile, "go$readFile");
330435
330532
  }
330436
- __name(readFile12, "readFile");
330533
+ __name(readFile11, "readFile");
330437
330534
  var fs$writeFile = fs101.writeFile;
330438
330535
  fs101.writeFile = writeFile11;
330439
330536
  function writeFile11(path111, data, options2, cb) {
@@ -331992,8 +332089,8 @@ var require_graceful_fs2 = __commonJS({
331992
332089
  fs101.createReadStream = createReadStream3;
331993
332090
  fs101.createWriteStream = createWriteStream5;
331994
332091
  var fs$readFile = fs101.readFile;
331995
- fs101.readFile = readFile12;
331996
- function readFile12(path111, options2, cb) {
332092
+ fs101.readFile = readFile11;
332093
+ function readFile11(path111, options2, cb) {
331997
332094
  if (typeof options2 === "function")
331998
332095
  cb = options2, options2 = null;
331999
332096
  return go$readFile(path111, options2, cb);
@@ -332009,7 +332106,7 @@ var require_graceful_fs2 = __commonJS({
332009
332106
  }
332010
332107
  __name(go$readFile, "go$readFile");
332011
332108
  }
332012
- __name(readFile12, "readFile");
332109
+ __name(readFile11, "readFile");
332013
332110
  var fs$writeFile = fs101.writeFile;
332014
332111
  fs101.writeFile = writeFile11;
332015
332112
  function writeFile11(path111, data, options2, cb) {
@@ -351138,6 +351235,65 @@ var REVERSE_MIGRATION_MAP = Object.fromEntries(
351138
351235
  var KNOWN_V2_CONTAINERS = new Set(
351139
351236
  Object.values(MIGRATION_MAP).map((path111) => path111.split(".")[0])
351140
351237
  );
351238
+ function getSettingsFileKeyWarnings(settings, settingsFilePath) {
351239
+ const version2 = settings[SETTINGS_VERSION_KEY];
351240
+ if (typeof version2 !== "number" || version2 < SETTINGS_VERSION) {
351241
+ return [];
351242
+ }
351243
+ const warnings = [];
351244
+ const ignoredLegacyKeys = /* @__PURE__ */ new Set();
351245
+ for (const [oldKey, newPath] of Object.entries(MIGRATION_MAP)) {
351246
+ if (oldKey === newPath) {
351247
+ continue;
351248
+ }
351249
+ if (!(oldKey in settings)) {
351250
+ continue;
351251
+ }
351252
+ const oldValue = settings[oldKey];
351253
+ if (KNOWN_V2_CONTAINERS.has(oldKey) && typeof oldValue === "object" && oldValue !== null && !Array.isArray(oldValue)) {
351254
+ continue;
351255
+ }
351256
+ ignoredLegacyKeys.add(oldKey);
351257
+ warnings.push(
351258
+ `\u26A0\uFE0F Legacy setting '${oldKey}' will be ignored in ${settingsFilePath}. Please use '${newPath}' instead.`
351259
+ );
351260
+ }
351261
+ const schemaKeys = new Set(Object.keys(getSettingsSchema()));
351262
+ for (const key of Object.keys(settings)) {
351263
+ if (key === SETTINGS_VERSION_KEY) {
351264
+ continue;
351265
+ }
351266
+ if (ignoredLegacyKeys.has(key)) {
351267
+ continue;
351268
+ }
351269
+ if (schemaKeys.has(key)) {
351270
+ continue;
351271
+ }
351272
+ warnings.push(
351273
+ `\u26A0\uFE0F Unknown setting '${key}' will be ignored in ${settingsFilePath}.`
351274
+ );
351275
+ }
351276
+ return warnings;
351277
+ }
351278
+ __name(getSettingsFileKeyWarnings, "getSettingsFileKeyWarnings");
351279
+ function getSettingsWarnings(loadedSettings) {
351280
+ const warningSet = /* @__PURE__ */ new Set();
351281
+ for (const scope of ["User" /* User */, "Workspace" /* Workspace */]) {
351282
+ const settingsFile = loadedSettings.forScope(scope);
351283
+ if (settingsFile.rawJson === void 0) {
351284
+ continue;
351285
+ }
351286
+ const settingsObject = settingsFile.originalSettings;
351287
+ for (const warning of getSettingsFileKeyWarnings(
351288
+ settingsObject,
351289
+ settingsFile.path
351290
+ )) {
351291
+ warningSet.add(warning);
351292
+ }
351293
+ }
351294
+ return [...warningSet];
351295
+ }
351296
+ __name(getSettingsWarnings, "getSettingsWarnings");
351141
351297
  function migrateSettingsToV1(v2Settings) {
351142
351298
  const v1Settings = {};
351143
351299
  const v2Keys = new Set(Object.keys(v2Settings));
@@ -357823,7 +357979,7 @@ __name(getPackageJson, "getPackageJson");
357823
357979
  // packages/cli/src/utils/version.ts
357824
357980
  async function getCliVersion() {
357825
357981
  const pkgJson = await getPackageJson();
357826
- return "0.7.0-nightly.20260111.bde31d12";
357982
+ return "0.7.0-nightly.20260113.09196c6e";
357827
357983
  }
357828
357984
  __name(getCliVersion, "getCliVersion");
357829
357985
 
@@ -365720,7 +365876,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
365720
365876
 
365721
365877
  // packages/cli/src/generated/git-commit.ts
365722
365878
  init_esbuild_shims();
365723
- var GIT_COMMIT_INFO2 = "5a2ac91b";
365879
+ var GIT_COMMIT_INFO2 = "11601933";
365724
365880
 
365725
365881
  // packages/cli/src/utils/systemInfo.ts
365726
365882
  async function getNpmVersion() {
@@ -413755,7 +413911,6 @@ import { exec as exec4, execSync as execSync8, spawn as spawn10 } from "node:chi
413755
413911
  import os39 from "node:os";
413756
413912
  import path108 from "node:path";
413757
413913
  import fs96 from "node:fs";
413758
- import { readFile as readFile11 } from "node:fs/promises";
413759
413914
  import { fileURLToPath as fileURLToPath14 } from "node:url";
413760
413915
  import { promisify as promisify11 } from "node:util";
413761
413916
  import { randomBytes as randomBytes5 } from "node:crypto";
@@ -413792,20 +413947,15 @@ async function shouldUseCurrentUserInSandbox() {
413792
413947
  return false;
413793
413948
  }
413794
413949
  if (os39.platform() === "linux") {
413795
- try {
413796
- const osReleaseContent = await readFile11("/etc/os-release", "utf8");
413797
- if (osReleaseContent.includes("ID=debian") || osReleaseContent.includes("ID=ubuntu") || osReleaseContent.match(/^ID_LIKE=.*debian.*/m) || // Covers derivatives
413798
- osReleaseContent.match(/^ID_LIKE=.*ubuntu.*/m)) {
413799
- console.error(
413800
- "INFO: Defaulting to use current user UID/GID for Debian/Ubuntu-based Linux."
413801
- );
413802
- return true;
413803
- }
413804
- } catch (_err) {
413805
- console.warn(
413806
- "Warning: Could not read /etc/os-release to auto-detect Debian/Ubuntu for UID/GID default."
413950
+ const debugEnv = [process.env["DEBUG"], process.env["DEBUG_MODE"]].some(
413951
+ (v2) => v2 === "true" || v2 === "1"
413952
+ );
413953
+ if (debugEnv) {
413954
+ console.error(
413955
+ "INFO: Using current user UID/GID in Linux sandbox. Set SANDBOX_SET_UID_GID=false to disable."
413807
413956
  );
413808
413957
  }
413958
+ return true;
413809
413959
  }
413810
413960
  return false;
413811
413961
  }
@@ -417027,7 +417177,7 @@ var GeminiAgent = class {
417027
417177
  name: APPROVAL_MODE_INFO[mode].name,
417028
417178
  description: APPROVAL_MODE_INFO[mode].description
417029
417179
  }));
417030
- const version2 = "0.7.0-nightly.20260111.bde31d12";
417180
+ const version2 = "0.7.0-nightly.20260113.09196c6e";
417031
417181
  return {
417032
417182
  protocolVersion: PROTOCOL_VERSION,
417033
417183
  agentInfo: {
@@ -417487,12 +417637,15 @@ ${finalArgs[promptIndex + 1]}`;
417487
417637
  }
417488
417638
  let input = config2.getQuestion();
417489
417639
  const startupWarnings = [
417490
- ...await getStartupWarnings(),
417491
- ...await getUserStartupWarnings({
417492
- workspaceRoot: process.cwd(),
417493
- useRipgrep: settings.merged.tools?.useRipgrep ?? true,
417494
- useBuiltinRipgrep: settings.merged.tools?.useBuiltinRipgrep ?? true
417495
- })
417640
+ .../* @__PURE__ */ new Set([
417641
+ ...await getStartupWarnings(),
417642
+ ...await getUserStartupWarnings({
417643
+ workspaceRoot: process.cwd(),
417644
+ useRipgrep: settings.merged.tools?.useRipgrep ?? true,
417645
+ useBuiltinRipgrep: settings.merged.tools?.useBuiltinRipgrep ?? true
417646
+ }),
417647
+ ...getSettingsWarnings(settings)
417648
+ ])
417496
417649
  ];
417497
417650
  if (config2.isInteractive()) {
417498
417651
  await kittyProtocolDetectionComplete;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/qwen-code",
3
- "version": "0.7.0-nightly.20260111.bde31d12",
3
+ "version": "0.7.0-nightly.20260113.09196c6e",
4
4
  "description": "Qwen Code - AI-powered coding assistant",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "locales"
21
21
  ],
22
22
  "config": {
23
- "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.7.0-nightly.20260111.bde31d12"
23
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.7.0-nightly.20260113.09196c6e"
24
24
  },
25
25
  "dependencies": {
26
26
  "tiktoken": "^1.0.21"