@qwen-code/qwen-code 0.15.12-preview.2 → 0.16.0-nightly.20260522.48b0a8bfc

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 (97) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +69 -71
  2. package/bundled/qc-helper/docs/features/_meta.ts +2 -0
  3. package/bundled/qc-helper/docs/features/approval-mode.md +119 -2
  4. package/bundled/qc-helper/docs/features/auto-mode.md +263 -0
  5. package/bundled/qc-helper/docs/features/commands.md +11 -10
  6. package/bundled/qc-helper/docs/features/lsp.md +87 -10
  7. package/bundled/qc-helper/docs/features/skills.md +3 -0
  8. package/bundled/qc-helper/docs/features/structured-output.md +309 -0
  9. package/bundled/qc-helper/docs/features/sub-agents.md +47 -5
  10. package/bundled/qc-helper/docs/qwen-serve.md +179 -24
  11. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +11 -11
  12. package/bundled/review/SKILL.md +12 -3
  13. package/bundled/stuck/SKILL.md +124 -0
  14. package/chunks/{agent-UQY6A6OS.js → agent-GRCSD6XI.js} +15 -17
  15. package/chunks/{anthropicContentGenerator-4QE6LTVV.js → anthropicContentGenerator-RQJNXJIY.js} +7 -4
  16. package/chunks/{askUserQuestion-QFSCBTUO.js → askUserQuestion-PQPMPNM3.js} +2 -2
  17. package/chunks/{ca-VQSV6JHA.js → ca-UZ7BANMN.js} +29 -3
  18. package/chunks/{chunk-B7ZL7HUA.js → chunk-4AOCVI6J.js} +2 -1
  19. package/chunks/{chunk-PCL3EJGY.js → chunk-4U3O4VDA.js} +4722 -3823
  20. package/chunks/{chunk-AEJ2DKLP.js → chunk-C6WMLUNB.js} +1 -1
  21. package/chunks/{chunk-FSYKVGER.js → chunk-C7PY32RJ.js} +115 -23
  22. package/chunks/{chunk-JMZQICAL.js → chunk-CAVZVZX6.js} +2 -2
  23. package/chunks/{chunk-CAWKL3UC.js → chunk-CSWBPY3P.js} +2 -2
  24. package/chunks/{chunk-G27O2LD2.js → chunk-D5NTAHYL.js} +1 -1
  25. package/chunks/{chunk-BXNCPI75.js → chunk-DMIMF3CG.js} +2 -2
  26. package/chunks/{chunk-OCC4MZRS.js → chunk-F23NCRJ2.js} +1 -1
  27. package/chunks/{chunk-SOIEFHIK.js → chunk-G7YTSRES.js} +1 -100
  28. package/chunks/{chunk-SQNQIOD5.js → chunk-GGNTZ2NH.js} +92 -21
  29. package/chunks/{chunk-FKVKVE6N.js → chunk-KXZ4TJB4.js} +1 -1
  30. package/chunks/{chunk-CBVB66WY.js → chunk-L5E26RN6.js} +2 -2
  31. package/chunks/{chunk-UXW7MYAW.js → chunk-MAY32HXD.js} +376 -1
  32. package/chunks/{chunk-2WFU3IUH.js → chunk-OZO6R4KI.js} +11796 -4086
  33. package/chunks/{chunk-CM2IESUE.js → chunk-PR4T27R7.js} +1 -1
  34. package/chunks/{chunk-FYMSCRHM.js → chunk-PVVL5Q3W.js} +32 -1
  35. package/chunks/{chunk-MXBWOU2L.js → chunk-TM4RMEYN.js} +17 -349
  36. package/chunks/{chunk-YHEAJFCI.js → chunk-USE2VQ5P.js} +3 -0
  37. package/chunks/chunk-UY2AYRZF.js +19126 -0
  38. package/chunks/{chunk-GJXIKCKL.js → chunk-XP27SJMH.js} +76 -5
  39. package/chunks/chunk-XTYIPAUG.js +379 -0
  40. package/chunks/{chunk-TPGOGCWM.js → chunk-YJLGXDQJ.js} +1 -1
  41. package/chunks/{contextCommand-MQRG6RMG.js → contextCommand-O2OLCMOG.js} +17 -19
  42. package/chunks/{cron-create-WUTD5ZTH.js → cron-create-IGYXQVG4.js} +28 -2
  43. package/chunks/{cron-delete-N3UQYCRA.js → cron-delete-ETKIZCWT.js} +2 -2
  44. package/chunks/{cron-list-Z6RJJ4YH.js → cron-list-BVCUSWRU.js} +2 -2
  45. package/chunks/{de-M2IPQRBS.js → de-V4IE2OOZ.js} +29 -3
  46. package/chunks/{dist-RRYNPBOE.js → dist-4L54HRX2.js} +2 -2
  47. package/chunks/{dist-WP4AH3VK.js → dist-BXDUQ2QY.js} +1 -1
  48. package/chunks/{dist-M6GFCZ7S.js → dist-MN2PDDPR.js} +1 -1
  49. package/chunks/{edit-3KCBTA25.js → edit-NRL5ZYWP.js} +32 -18
  50. package/chunks/{en-N5GMPCVT.js → en-HGJ2SPLM.js} +32 -3
  51. package/chunks/{enter-worktree-VWS5QZTU.js → enter-worktree-TLT6EXVN.js} +41 -17
  52. package/chunks/{exit-worktree-RVXFWAPD.js → exit-worktree-PE7RZMLE.js} +41 -17
  53. package/chunks/{exitPlanMode-UL5DILDG.js → exitPlanMode-JYMKAHYD.js} +15 -17
  54. package/chunks/{fr-BTHRYEXO.js → fr-CJULI7ZX.js} +29 -3
  55. package/chunks/{geminiContentGenerator-O2OPGHJG.js → geminiContentGenerator-GYIOVT4A.js} +3 -3
  56. package/chunks/{glob-57BSREPN.js → glob-T7KIVIWT.js} +15 -17
  57. package/chunks/{grep-XO5JOC7T.js → grep-4KI7ZJR5.js} +15 -17
  58. package/chunks/{ja-D63TAEBO.js → ja-L7CHRQEW.js} +29 -3
  59. package/chunks/{keychain-token-storage-DMFP5IJM.js → keychain-token-storage-335UOLJ6.js} +2 -2
  60. package/chunks/{ls-SUILOZZB.js → ls-7HD6XG3V.js} +3 -3
  61. package/chunks/{lsp-6TQBWVMZ.js → lsp-ZZSFCIWD.js} +2 -2
  62. package/chunks/{monitor-BECPGO3K.js → monitor-L5YPPGVO.js} +45 -26
  63. package/chunks/notebook-edit-HYXLIC3D.js +756 -0
  64. package/chunks/{openaiContentGenerator-KEZQHIRM.js → openaiContentGenerator-XRP5JM6P.js} +12 -11
  65. package/chunks/{pt-XUV7FSKC.js → pt-M6JULLEQ.js} +29 -3
  66. package/chunks/{qwenContentGenerator-RPMRXTNH.js → qwenContentGenerator-EOX3HZXX.js} +17 -19
  67. package/chunks/{qwenOAuth2-JSQ7EPR3.js → qwenOAuth2-EEJGROP7.js} +9 -3
  68. package/chunks/{read-file-LGHEIQNH.js → read-file-3XOYPTIB.js} +7 -8
  69. package/chunks/{ripGrep-6SFSXZ2G.js → ripGrep-5QUURWGU.js} +15 -17
  70. package/chunks/{ru-7KHWMN3A.js → ru-QILM4HBC.js} +29 -3
  71. package/chunks/{send-message-Q2JRAC3J.js → send-message-ULK4MQXJ.js} +23 -2
  72. package/chunks/{serve-27O2AFE3.js → serve-AZ44ZNWF.js} +8864 -1351
  73. package/chunks/{shell-J7K5KYCH.js → shell-O6OTTSIP.js} +15 -17
  74. package/chunks/{skill-2R7P4ATS.js → skill-MUGS3H4M.js} +23 -10
  75. package/chunks/{src-CGEDVW67.js → src-YCQBAYCP.js} +292 -28
  76. package/chunks/{syntheticOutput-S4DRGMQM.js → syntheticOutput-IS2X5OZ2.js} +3 -3
  77. package/chunks/{task-stop-7THHVAQS.js → task-stop-7QSJGSSP.js} +2 -2
  78. package/chunks/{todoWrite-WKUGUTPX.js → todoWrite-7CVACFUX.js} +3 -3
  79. package/chunks/{tool-search-XOH3ZWVS.js → tool-search-UFDQJOXT.js} +7 -8
  80. package/chunks/{web-fetch-OZE6ZQUF.js → web-fetch-ENQ2I5JA.js} +7 -4
  81. package/chunks/{write-file-74NQ27Q2.js → write-file-GBLDDYQT.js} +29 -18
  82. package/chunks/{zh-VGHU6XBB.js → zh-PWL2NKY3.js} +32 -3
  83. package/chunks/{zh-TW-O36Q4V7E.js → zh-TW-S3YGWICZ.js} +32 -3
  84. package/cli.js +61338 -76795
  85. package/locales/ca.js +44 -5
  86. package/locales/de.js +44 -5
  87. package/locales/en.js +49 -5
  88. package/locales/fr.js +45 -5
  89. package/locales/ja.js +43 -5
  90. package/locales/pt.js +43 -5
  91. package/locales/ru.js +43 -5
  92. package/locales/zh-TW.js +46 -4
  93. package/locales/zh.js +46 -4
  94. package/package.json +2 -2
  95. package/chunks/chunk-5P5XGNYH.js +0 -93
  96. package/chunks/chunk-SYCJMSIJ.js +0 -82
  97. package/chunks/chunk-Y6Z2O3WR.js +0 -33
@@ -336,8 +336,8 @@ __name(sanitizeCwd, "sanitizeCwd");
336
336
  function isSubpath(parentPath, childPath) {
337
337
  const isWindows = os.platform() === "win32";
338
338
  const pathModule = isWindows ? path.win32 : path;
339
- const relative = pathModule.relative(parentPath, childPath);
340
- return !relative.startsWith(`..${pathModule.sep}`) && relative !== ".." && !pathModule.isAbsolute(relative);
339
+ const relative2 = pathModule.relative(parentPath, childPath);
340
+ return !relative2.startsWith(`..${pathModule.sep}`) && relative2 !== ".." && !pathModule.isAbsolute(relative2);
341
341
  }
342
342
  __name(isSubpath, "isSubpath");
343
343
  function isSubpaths(parentPath, childPath) {
@@ -443,6 +443,17 @@ var Storage = class _Storage {
443
443
  }
444
444
  return resolved;
445
445
  }
446
+ /**
447
+ * Sanitizes a session id for use as a plan filename.
448
+ *
449
+ * Plan files are keyed by session id, but the raw id is public SDK input.
450
+ * Strip directory separators and Windows-invalid filename characters so a
451
+ * hostile value cannot escape the plans directory.
452
+ */
453
+ static sanitizePlanSessionId(sessionId) {
454
+ const safeName = path2.basename(sessionId.replace(/\\/g, "/")).replace(/^\.+/g, "_").replace(/[<>:"|?*\x00-\x1F]/g, "_");
455
+ return safeName || "_";
456
+ }
446
457
  static resolveRuntimeBaseDir(dir, cwd) {
447
458
  if (!dir) {
448
459
  return null;
@@ -531,11 +542,71 @@ var Storage = class _Storage {
531
542
  static getGlobalIdeDir() {
532
543
  return path2.join(_Storage.getGlobalQwenDir(), IDE_DIR_NAME);
533
544
  }
534
- static getPlansDir() {
545
+ /**
546
+ * Resolves pathToResolve by realpathing its deepest existing ancestor and
547
+ * appending the not-yet-created remainder.
548
+ */
549
+ static resolvePathThroughExistingAncestor(pathToResolve) {
550
+ let candidate = pathToResolve;
551
+ while (true) {
552
+ try {
553
+ const realCandidate = fs2.realpathSync(candidate);
554
+ const remainder = path2.relative(candidate, pathToResolve);
555
+ return path2.join(realCandidate, remainder);
556
+ } catch (err) {
557
+ if (err.code !== "ENOENT") {
558
+ throw err;
559
+ }
560
+ const parent = path2.dirname(candidate);
561
+ if (parent === candidate) {
562
+ return pathToResolve;
563
+ }
564
+ candidate = parent;
565
+ }
566
+ }
567
+ }
568
+ /**
569
+ * Checks whether {@link childPath} resides within {@link parentPath},
570
+ * resolving symbolic links to prevent traversal bypass attacks.
571
+ */
572
+ static isPathWithinDirectory(childPath, parentPath) {
573
+ const realParent = _Storage.resolvePathThroughExistingAncestor(parentPath);
574
+ const realChild = _Storage.resolvePathThroughExistingAncestor(childPath);
575
+ const relativePath = path2.relative(realParent, realChild);
576
+ return relativePath === "" || !relativePath.startsWith("..") && !path2.isAbsolute(relativePath);
577
+ }
578
+ static assertPathWithinDirectory(childPath, parentPath, errorMessage) {
579
+ if (!_Storage.isPathWithinDirectory(childPath, parentPath)) {
580
+ throw new FatalConfigError(errorMessage);
581
+ }
582
+ }
583
+ static getPlansDir(projectRoot, plansDirectory) {
584
+ const configuredPlansDirectory = plansDirectory?.trim();
585
+ if (configuredPlansDirectory) {
586
+ if (!projectRoot) {
587
+ throw new FatalConfigError(
588
+ "projectRoot is required when plansDirectory is configured."
589
+ );
590
+ }
591
+ const resolvedProjectRoot = path2.resolve(projectRoot);
592
+ const resolvedPlansDirectory = _Storage.resolvePath(
593
+ configuredPlansDirectory,
594
+ resolvedProjectRoot
595
+ );
596
+ _Storage.assertPathWithinDirectory(
597
+ resolvedPlansDirectory,
598
+ resolvedProjectRoot,
599
+ `plansDirectory must resolve within the project root.`
600
+ );
601
+ return resolvedPlansDirectory;
602
+ }
535
603
  return path2.join(_Storage.getGlobalQwenDir(), PLANS_DIR_NAME);
536
604
  }
537
- static getPlanFilePath(sessionId) {
538
- return path2.join(_Storage.getPlansDir(), `${sessionId}.md`);
605
+ static getPlanFilePath(sessionId, projectRoot, plansDirectory) {
606
+ return path2.join(
607
+ _Storage.getPlansDir(projectRoot, plansDirectory),
608
+ `${_Storage.sanitizePlanSessionId(sessionId)}.md`
609
+ );
539
610
  }
540
611
  static getGlobalBinDir() {
541
612
  return path2.join(_Storage.getGlobalQwenDir(), BIN_DIR_NAME);
@@ -0,0 +1,379 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ resolveBundleDir
5
+ } from "./chunk-OZO6R4KI.js";
6
+ import {
7
+ Storage
8
+ } from "./chunk-XP27SJMH.js";
9
+ import {
10
+ init_esbuild_shims
11
+ } from "./chunk-A4BMJM77.js";
12
+ import {
13
+ __glob,
14
+ __name
15
+ } from "./chunk-J2S4EL5Y.js";
16
+
17
+ // packages/cli/src/utils/stdioHelpers.ts
18
+ init_esbuild_shims();
19
+ var writeStdoutLine = /* @__PURE__ */ __name((message) => {
20
+ process.stdout.write(message.endsWith("\n") ? message : `${message}
21
+ `);
22
+ }, "writeStdoutLine");
23
+ var writeStderrLine = /* @__PURE__ */ __name((message) => {
24
+ process.stderr.write(message.endsWith("\n") ? message : `${message}
25
+ `);
26
+ }, "writeStderrLine");
27
+ var clearScreen = /* @__PURE__ */ __name(() => {
28
+ console.clear();
29
+ }, "clearScreen");
30
+
31
+ // packages/cli/src/i18n/index.ts
32
+ init_esbuild_shims();
33
+ import * as fs from "node:fs";
34
+ import * as path from "node:path";
35
+ import { pathToFileURL } from "node:url";
36
+
37
+ // packages/cli/src/i18n/languages.ts
38
+ init_esbuild_shims();
39
+ var SUPPORTED_LANGUAGES = [
40
+ {
41
+ code: "en",
42
+ id: "en-US",
43
+ fullName: "English",
44
+ nativeName: "English"
45
+ },
46
+ {
47
+ code: "zh-TW",
48
+ id: "zh-TW",
49
+ fullName: "Traditional Chinese",
50
+ nativeName: "\u7E41\u9AD4\u4E2D\u6587",
51
+ strictParity: true
52
+ },
53
+ {
54
+ code: "zh",
55
+ id: "zh-CN",
56
+ fullName: "Chinese",
57
+ nativeName: "\u4E2D\u6587",
58
+ strictParity: true
59
+ },
60
+ {
61
+ code: "ru",
62
+ id: "ru-RU",
63
+ fullName: "Russian",
64
+ nativeName: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439"
65
+ },
66
+ {
67
+ code: "de",
68
+ id: "de-DE",
69
+ fullName: "German",
70
+ nativeName: "Deutsch"
71
+ },
72
+ {
73
+ code: "ja",
74
+ id: "ja-JP",
75
+ fullName: "Japanese",
76
+ nativeName: "\u65E5\u672C\u8A9E"
77
+ },
78
+ {
79
+ code: "pt",
80
+ id: "pt-BR",
81
+ fullName: "Portuguese",
82
+ nativeName: "Portugu\xEAs"
83
+ },
84
+ {
85
+ code: "fr",
86
+ id: "fr-FR",
87
+ fullName: "French",
88
+ nativeName: "Fran\xE7ais"
89
+ },
90
+ {
91
+ code: "ca",
92
+ id: "ca-ES",
93
+ fullName: "Catalan",
94
+ nativeName: "Catal\xE0"
95
+ }
96
+ ];
97
+ function normalizeLanguageCandidate(input) {
98
+ return input.trim().replace(/_/g, "-").toLowerCase();
99
+ }
100
+ __name(normalizeLanguageCandidate, "normalizeLanguageCandidate");
101
+ function matchesLocaleToken(candidate, token) {
102
+ return candidate === token || candidate.startsWith(`${token}-`) || candidate.startsWith(`${token}.`) || candidate.startsWith(`${token}@`);
103
+ }
104
+ __name(matchesLocaleToken, "matchesLocaleToken");
105
+ function getMatchedLocaleTokenLength(candidate, language) {
106
+ const code = language.code.toLowerCase();
107
+ const id = language.id.toLowerCase();
108
+ if (matchesLocaleToken(candidate, id)) {
109
+ return id.length;
110
+ }
111
+ if (matchesLocaleToken(candidate, code)) {
112
+ return code.length;
113
+ }
114
+ return void 0;
115
+ }
116
+ __name(getMatchedLocaleTokenLength, "getMatchedLocaleTokenLength");
117
+ function resolveSupportedLanguage(input) {
118
+ const normalized = normalizeLanguageCandidate(input);
119
+ if (!normalized) {
120
+ return void 0;
121
+ }
122
+ let bestMatch;
123
+ for (const language of SUPPORTED_LANGUAGES) {
124
+ if (normalized === language.fullName.toLowerCase() || language.nativeName && normalized === language.nativeName.toLowerCase()) {
125
+ return language.code;
126
+ }
127
+ const tokenLength = getMatchedLocaleTokenLength(normalized, language);
128
+ if (tokenLength !== void 0 && (!bestMatch || tokenLength > bestMatch.tokenLength)) {
129
+ bestMatch = { code: language.code, tokenLength };
130
+ }
131
+ }
132
+ return bestMatch?.code;
133
+ }
134
+ __name(resolveSupportedLanguage, "resolveSupportedLanguage");
135
+ function getLanguageNameFromLocale(locale) {
136
+ const resolved = resolveSupportedLanguage(locale);
137
+ const lang = resolved ? SUPPORTED_LANGUAGES.find((language) => language.code === resolved) : void 0;
138
+ return lang?.fullName || "English";
139
+ }
140
+ __name(getLanguageNameFromLocale, "getLanguageNameFromLocale");
141
+ function getLanguageSettingsOptions() {
142
+ return [
143
+ { value: "auto", label: "Auto (detect from system)" },
144
+ ...SUPPORTED_LANGUAGES.map((l) => ({
145
+ value: l.code,
146
+ label: l.nativeName ? `${l.nativeName} (${l.fullName})` : `${l.fullName} (${l.id})`
147
+ }))
148
+ ];
149
+ }
150
+ __name(getLanguageSettingsOptions, "getLanguageSettingsOptions");
151
+ function getSupportedLanguageIds(separator = "|") {
152
+ return SUPPORTED_LANGUAGES.map((l) => l.id).join(separator);
153
+ }
154
+ __name(getSupportedLanguageIds, "getSupportedLanguageIds");
155
+
156
+ // packages/cli/src/i18n/translationDict.ts
157
+ init_esbuild_shims();
158
+ function getTranslationModuleExport(module) {
159
+ return Object.prototype.hasOwnProperty.call(module, "default") ? module["default"] : module;
160
+ }
161
+ __name(getTranslationModuleExport, "getTranslationModuleExport");
162
+ function isTranslationDict(value) {
163
+ return value !== null && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length > 0;
164
+ }
165
+ __name(isTranslationDict, "isTranslationDict");
166
+
167
+ // packages/cli/src/i18n/mustTranslateKeys.ts
168
+ init_esbuild_shims();
169
+
170
+ // import("./locales/**/*.js") in packages/cli/src/i18n/index.ts
171
+ var globImport_locales_js = __glob({
172
+ "./locales/ca.js": () => import("./ca-UZ7BANMN.js"),
173
+ "./locales/de.js": () => import("./de-V4IE2OOZ.js"),
174
+ "./locales/en.js": () => import("./en-HGJ2SPLM.js"),
175
+ "./locales/fr.js": () => import("./fr-CJULI7ZX.js"),
176
+ "./locales/ja.js": () => import("./ja-L7CHRQEW.js"),
177
+ "./locales/pt.js": () => import("./pt-M6JULLEQ.js"),
178
+ "./locales/ru.js": () => import("./ru-QILM4HBC.js"),
179
+ "./locales/zh-TW.js": () => import("./zh-TW-S3YGWICZ.js"),
180
+ "./locales/zh.js": () => import("./zh-PWL2NKY3.js")
181
+ });
182
+
183
+ // packages/cli/src/i18n/index.ts
184
+ var currentLanguage = "en";
185
+ var translations = {};
186
+ var translationCache = {};
187
+ var loadingPromises = {};
188
+ var getBuiltinLocalesDir = /* @__PURE__ */ __name(() => path.join(resolveBundleDir(import.meta.url), "locales"), "getBuiltinLocalesDir");
189
+ var getUserLocalesDir = /* @__PURE__ */ __name(() => path.join(Storage.getGlobalQwenDir(), "locales"), "getUserLocalesDir");
190
+ var getLocalePath = /* @__PURE__ */ __name((lang, useUserDir = false) => {
191
+ const baseDir = useUserDir ? getUserLocalesDir() : getBuiltinLocalesDir();
192
+ return path.join(baseDir, `${lang}.js`);
193
+ }, "getLocalePath");
194
+ function detectSystemLanguage() {
195
+ const envLang = process.env["QWEN_CODE_LANG"] || process.env["LANG"];
196
+ if (envLang) {
197
+ const resolved = resolveSupportedLanguage(envLang);
198
+ if (resolved) {
199
+ return resolved;
200
+ }
201
+ }
202
+ try {
203
+ const locale = Intl.DateTimeFormat().resolvedOptions().locale;
204
+ const resolved = resolveSupportedLanguage(locale);
205
+ if (resolved) {
206
+ return resolved;
207
+ }
208
+ } catch {
209
+ }
210
+ return "en";
211
+ }
212
+ __name(detectSystemLanguage, "detectSystemLanguage");
213
+ async function tryImportTranslations(moduleSpecifier) {
214
+ try {
215
+ const module = await import(moduleSpecifier);
216
+ const result = getTranslationModuleExport(module);
217
+ if (isTranslationDict(result)) {
218
+ return { translations: result };
219
+ }
220
+ return {
221
+ error: new Error("Module loaded but result is empty or invalid")
222
+ };
223
+ } catch (error) {
224
+ return {
225
+ error: error instanceof Error ? error : new Error(String(error))
226
+ };
227
+ }
228
+ }
229
+ __name(tryImportTranslations, "tryImportTranslations");
230
+ async function tryImportBundledTranslations(lang) {
231
+ try {
232
+ const module = await globImport_locales_js(`./locales/${lang}.js`);
233
+ const result = getTranslationModuleExport(module);
234
+ if (isTranslationDict(result)) {
235
+ return { translations: result };
236
+ }
237
+ return {
238
+ error: new Error("Module loaded but result is empty or invalid")
239
+ };
240
+ } catch (error) {
241
+ return {
242
+ error: error instanceof Error ? error : new Error(String(error))
243
+ };
244
+ }
245
+ }
246
+ __name(tryImportBundledTranslations, "tryImportBundledTranslations");
247
+ async function loadTranslationsAsync(lang) {
248
+ if (translationCache[lang]) {
249
+ return translationCache[lang];
250
+ }
251
+ const existingPromise = loadingPromises[lang];
252
+ if (existingPromise) {
253
+ return existingPromise;
254
+ }
255
+ const loadPromise = (async () => {
256
+ const userJsPath = getLocalePath(lang, true);
257
+ if (fs.existsSync(getUserLocalesDir()) && fs.existsSync(userJsPath)) {
258
+ const userResult = await tryImportTranslations(
259
+ pathToFileURL(userJsPath).href
260
+ );
261
+ if (userResult.translations) {
262
+ translationCache[lang] = userResult.translations;
263
+ return userResult.translations;
264
+ }
265
+ writeStderrLine(
266
+ `Failed to load translations from user directory for ${lang}: ${userResult.error.message}`
267
+ );
268
+ }
269
+ const builtinJsPath = getLocalePath(lang, false);
270
+ const builtinModuleSpecifiers = [];
271
+ if (fs.existsSync(getBuiltinLocalesDir()) && fs.existsSync(builtinJsPath)) {
272
+ builtinModuleSpecifiers.push(pathToFileURL(builtinJsPath).href);
273
+ }
274
+ let lastBuiltinError;
275
+ for (const moduleSpecifier of builtinModuleSpecifiers) {
276
+ const builtinResult = await tryImportTranslations(moduleSpecifier);
277
+ if (builtinResult.translations) {
278
+ translationCache[lang] = builtinResult.translations;
279
+ return builtinResult.translations;
280
+ }
281
+ lastBuiltinError = builtinResult.error;
282
+ }
283
+ const bundledBuiltinResult = await tryImportBundledTranslations(lang);
284
+ if (bundledBuiltinResult.translations) {
285
+ translationCache[lang] = bundledBuiltinResult.translations;
286
+ return bundledBuiltinResult.translations;
287
+ }
288
+ lastBuiltinError = bundledBuiltinResult.error;
289
+ if (lastBuiltinError) {
290
+ writeStderrLine(
291
+ `Failed to load JS translations for ${lang}: ${lastBuiltinError.message}`
292
+ );
293
+ }
294
+ translationCache[lang] = {};
295
+ return {};
296
+ })();
297
+ loadingPromises[lang] = loadPromise;
298
+ loadPromise.finally(() => {
299
+ delete loadingPromises[lang];
300
+ });
301
+ return loadPromise;
302
+ }
303
+ __name(loadTranslationsAsync, "loadTranslationsAsync");
304
+ function interpolate(template, params) {
305
+ if (!params) return template;
306
+ return template.replace(
307
+ /\{\{(\w+)\}\}/g,
308
+ (match, key) => params[key] ?? match
309
+ );
310
+ }
311
+ __name(interpolate, "interpolate");
312
+ function resolveLanguage(lang) {
313
+ if (lang === "auto") {
314
+ return detectSystemLanguage();
315
+ }
316
+ return resolveSupportedLanguage(lang) ?? lang;
317
+ }
318
+ __name(resolveLanguage, "resolveLanguage");
319
+ async function setLanguageAsync(lang) {
320
+ currentLanguage = resolveLanguage(lang);
321
+ translations = await loadTranslationsAsync(currentLanguage);
322
+ }
323
+ __name(setLanguageAsync, "setLanguageAsync");
324
+ function getCurrentLanguage() {
325
+ return currentLanguage;
326
+ }
327
+ __name(getCurrentLanguage, "getCurrentLanguage");
328
+ function t(key, params) {
329
+ const translation = translations[key] ?? key;
330
+ if (Array.isArray(translation)) {
331
+ return key;
332
+ }
333
+ return interpolate(translation, params);
334
+ }
335
+ __name(t, "t");
336
+ function ta(key) {
337
+ const translation = translations[key];
338
+ if (Array.isArray(translation)) {
339
+ return translation;
340
+ }
341
+ return [];
342
+ }
343
+ __name(ta, "ta");
344
+ async function initializeI18n(lang) {
345
+ await setLanguageAsync(lang ?? "auto");
346
+ }
347
+ __name(initializeI18n, "initializeI18n");
348
+
349
+ export {
350
+ writeStdoutLine,
351
+ writeStderrLine,
352
+ clearScreen,
353
+ SUPPORTED_LANGUAGES,
354
+ resolveSupportedLanguage,
355
+ getLanguageNameFromLocale,
356
+ getLanguageSettingsOptions,
357
+ getSupportedLanguageIds,
358
+ detectSystemLanguage,
359
+ setLanguageAsync,
360
+ getCurrentLanguage,
361
+ t,
362
+ ta,
363
+ initializeI18n
364
+ };
365
+ /**
366
+ * @license
367
+ * Copyright 2025 Qwen Team
368
+ * SPDX-License-Identifier: Apache-2.0
369
+ */
370
+ /**
371
+ * @license
372
+ * Copyright 2025 Qwen team
373
+ * SPDX-License-Identifier: Apache-2.0
374
+ */
375
+ /**
376
+ * @license
377
+ * Copyright 2026 Qwen Team
378
+ * SPDX-License-Identifier: Apache-2.0
379
+ */
@@ -5,7 +5,7 @@ import {
5
5
  BaseToolInvocation,
6
6
  ToolDisplayNames,
7
7
  ToolNames
8
- } from "./chunk-FYMSCRHM.js";
8
+ } from "./chunk-PVVL5Q3W.js";
9
9
  import {
10
10
  init_esbuild_shims
11
11
  } from "./chunk-A4BMJM77.js";
@@ -4,34 +4,32 @@ import {
4
4
  collectContextData,
5
5
  contextCommand,
6
6
  formatContextUsageText
7
- } from "./chunk-MXBWOU2L.js";
8
- import "./chunk-Y6Z2O3WR.js";
9
- import "./chunk-2WFU3IUH.js";
10
- import "./chunk-5P5XGNYH.js";
7
+ } from "./chunk-TM4RMEYN.js";
8
+ import "./chunk-XTYIPAUG.js";
9
+ import "./chunk-OZO6R4KI.js";
11
10
  import "./chunk-K5PGHDBN.js";
12
11
  import "./chunk-O4PICXES.js";
13
12
  import "./chunk-TW522KN6.js";
14
13
  import "./chunk-MLZQVCF3.js";
15
- import "./chunk-JMZQICAL.js";
16
- import "./chunk-SOIEFHIK.js";
17
- import "./chunk-B7ZL7HUA.js";
14
+ import "./chunk-CAVZVZX6.js";
15
+ import "./chunk-G7YTSRES.js";
16
+ import "./chunk-4AOCVI6J.js";
18
17
  import "./chunk-77WXWU44.js";
19
- import "./chunk-OCC4MZRS.js";
20
- import "./chunk-CAWKL3UC.js";
21
- import "./chunk-PCL3EJGY.js";
22
- import "./chunk-SYCJMSIJ.js";
18
+ import "./chunk-F23NCRJ2.js";
19
+ import "./chunk-CSWBPY3P.js";
20
+ import "./chunk-4U3O4VDA.js";
23
21
  import "./chunk-UWCTAVOD.js";
24
22
  import "./chunk-OFEVLU4C.js";
25
- import "./chunk-CM2IESUE.js";
26
- import "./chunk-UXW7MYAW.js";
27
- import "./chunk-G27O2LD2.js";
23
+ import "./chunk-PR4T27R7.js";
24
+ import "./chunk-MAY32HXD.js";
25
+ import "./chunk-D5NTAHYL.js";
28
26
  import "./chunk-T4VD6OJ4.js";
29
27
  import "./chunk-RDYWTWEM.js";
30
- import "./chunk-TPGOGCWM.js";
31
- import "./chunk-FYMSCRHM.js";
32
- import "./chunk-SQNQIOD5.js";
33
- import "./chunk-FKVKVE6N.js";
34
- import "./chunk-GJXIKCKL.js";
28
+ import "./chunk-YJLGXDQJ.js";
29
+ import "./chunk-PVVL5Q3W.js";
30
+ import "./chunk-GGNTZ2NH.js";
31
+ import "./chunk-KXZ4TJB4.js";
32
+ import "./chunk-XP27SJMH.js";
35
33
  import "./chunk-E7E2MFYM.js";
36
34
  import "./chunk-ZERZSAZL.js";
37
35
  import "./chunk-QN5NZ3UQ.js";
@@ -11,8 +11,8 @@ import {
11
11
  BaseToolInvocation,
12
12
  ToolDisplayNames,
13
13
  ToolNames
14
- } from "./chunk-FYMSCRHM.js";
15
- import "./chunk-GJXIKCKL.js";
14
+ } from "./chunk-PVVL5Q3W.js";
15
+ import "./chunk-XP27SJMH.js";
16
16
  import "./chunk-QWSRH265.js";
17
17
  import {
18
18
  init_esbuild_shims
@@ -34,6 +34,17 @@ var CronCreateInvocation = class extends BaseToolInvocation {
34
34
  getDescription() {
35
35
  return `${this.params.cron}: ${this.params.prompt}`;
36
36
  }
37
+ /**
38
+ * The scheduled prompt fires against the agent at cron-trigger time
39
+ * and executes with full tool access. The CronCreateTool's L3 default
40
+ * must NOT be 'allow', because AUTO mode short-circuits at L4 when
41
+ * `finalPermission === 'allow'` — the classifier never runs and an
42
+ * arbitrary scheduled prompt is silently approved. `'ask'` routes
43
+ * the call through the classifier (or manual approval in DEFAULT).
44
+ */
45
+ async getDefaultPermission() {
46
+ return "ask";
47
+ }
37
48
  async execute() {
38
49
  const scheduler = this.config.getCronScheduler();
39
50
  const recurring = this.params.recurring !== false;
@@ -108,6 +119,21 @@ var CronCreateTool = class _CronCreateTool extends BaseDeclarativeTool {
108
119
  createInvocation(params) {
109
120
  return new CronCreateInvocation(this.config, params);
110
121
  }
122
+ /**
123
+ * Forward the prompt and cadence to the classifier. The scheduled
124
+ * prompt will be enqueued and executed against the agent at fire-time,
125
+ * so it must go through the same scrutiny as a direct command. Without
126
+ * this override the default projection returns `''` and the classifier
127
+ * sees `cron_create({})` — blind to what the agent will be asked to
128
+ * do in 8 hours.
129
+ */
130
+ toAutoClassifierInput(params) {
131
+ return {
132
+ cron: params.cron,
133
+ prompt: params.prompt,
134
+ recurring: params.recurring ?? true
135
+ };
136
+ }
111
137
  };
112
138
  export {
113
139
  CronCreateTool
@@ -5,8 +5,8 @@ import {
5
5
  BaseToolInvocation,
6
6
  ToolDisplayNames,
7
7
  ToolNames
8
- } from "./chunk-FYMSCRHM.js";
9
- import "./chunk-GJXIKCKL.js";
8
+ } from "./chunk-PVVL5Q3W.js";
9
+ import "./chunk-XP27SJMH.js";
10
10
  import "./chunk-QWSRH265.js";
11
11
  import {
12
12
  init_esbuild_shims
@@ -8,8 +8,8 @@ import {
8
8
  BaseToolInvocation,
9
9
  ToolDisplayNames,
10
10
  ToolNames
11
- } from "./chunk-FYMSCRHM.js";
12
- import "./chunk-GJXIKCKL.js";
11
+ } from "./chunk-PVVL5Q3W.js";
12
+ import "./chunk-XP27SJMH.js";
13
13
  import "./chunk-QWSRH265.js";
14
14
  import {
15
15
  init_esbuild_shims
@@ -87,6 +87,32 @@ var de_default = {
87
87
  "Generate a one-line session recap now": "Jetzt eine einzeilige Sitzungszusammenfassung erstellen",
88
88
  "Rename the current conversation. --auto lets the fast model pick a title.": "Die aktuelle Unterhaltung umbenennen. Mit --auto l\xE4sst du das schnelle Modell einen Titel w\xE4hlen.",
89
89
  "Rewind conversation to a previous turn": "Die Unterhaltung auf einen fr\xFCheren Gespr\xE4chsschritt zur\xFCcksetzen",
90
+ "Rewind Conversation": "Unterhaltung zur\xFCckspulen",
91
+ "No user turns to rewind to.": "Keine Benutzerrunden zum Zur\xFCckspulen.",
92
+ "Rewind to: ": "Zur\xFCckspulen zu: ",
93
+ "Restore code and conversation": "Code und Unterhaltung wiederherstellen",
94
+ "Restore conversation only": "Nur Unterhaltung wiederherstellen",
95
+ "Restore code only": "Nur Code wiederherstellen",
96
+ "Never mind": "Egal",
97
+ "Computing file changes...": "Datei\xE4nderungen werden berechnet...",
98
+ "Restoring...": "Wiederherstellung l\xE4uft...",
99
+ "Restored {{count}} file(s).": "{{count}} Datei(en) wiederhergestellt.",
100
+ "Failed to restore files: {{error}}": "Fehler beim Wiederherstellen der Dateien: {{error}}",
101
+ "Rewind failed: {{error}}": "Zur\xFCckspulen fehlgeschlagen: {{error}}",
102
+ "Cannot rewind conversation: no active model client.": "Konversation kann nicht zur\xFCckgespult werden: kein aktiver Modell-Client.",
103
+ "Code restored, but conversation could not be rewound (no active client).": "Code wiederhergestellt, aber Konversation konnte nicht zur\xFCckgespult werden (kein aktiver Client).",
104
+ "Conversation rewound. Edit your prompt and press Enter to continue.": "Konversation zur\xFCckgespult. Bearbeite deinen Prompt und dr\xFCcke Enter, um fortzufahren.",
105
+ "Rewinding does not affect files edited manually or via shell commands.": "Das Zur\xFCckspulen wirkt sich nicht auf Dateien aus, die manuell oder per Shell-Befehl ge\xE4ndert wurden.",
106
+ "Cannot rewind to a turn that was compressed. Try a more recent turn.": "Zu einem komprimierten Turn kann nicht zur\xFCckgespult werden. Bitte einen aktuelleren Turn versuchen.",
107
+ "File restore is unavailable for this turn (no captured file changes, or this turn predates the current session).": "Datei-Wiederherstellung ist f\xFCr diesen Turn nicht verf\xFCgbar (keine erfassten Datei\xE4nderungen, oder dieser Turn liegt vor der aktuellen Sitzung).",
108
+ "(+{{insertions}} -{{deletions}} in {{count}} file)": "(+{{insertions}} -{{deletions}} in {{count}} Datei)",
109
+ "(+{{insertions}} -{{deletions}} in {{count}} files)": "(+{{insertions}} -{{deletions}} in {{count}} Dateien)",
110
+ "Failed to restore {{count}} file(s): {{files}}": "{{count}} Datei(en) konnten nicht wiederhergestellt werden: {{files}}",
111
+ "Cannot restore files: this turn was created before file checkpointing was enabled.": "Dateien k\xF6nnen nicht wiederhergestellt werden: Dieser Turn wurde erstellt, bevor Datei-Checkpointing aktiviert war.",
112
+ "No files needed to be restored.": "Keine Dateien mussten wiederhergestellt werden.",
113
+ "\u2191\u2193 to navigate \xB7 Enter to select \xB7 Esc to go back": "\u2191\u2193 navigieren \xB7 Enter ausw\xE4hlen \xB7 Esc zur\xFCck",
114
+ "\u2191\u2193 to navigate \xB7 Enter to select \xB7 Esc to cancel": "\u2191\u2193 navigieren \xB7 Enter ausw\xE4hlen \xB7 Esc abbrechen",
115
+ "Enter/Y to confirm \xB7 Esc/N to go back": "Enter/Y best\xE4tigen \xB7 Esc/N zur\xFCck",
90
116
  "change the theme": "Design \xE4ndern",
91
117
  "Select Theme": "Design ausw\xE4hlen",
92
118
  Preview: "Vorschau",
@@ -99,7 +125,7 @@ var de_default = {
99
125
  "Compresses the context by replacing it with a summary.": "Komprimiert den Kontext durch Ersetzen mit einer Zusammenfassung.",
100
126
  "open full Qwen Code documentation in your browser": "Vollst\xE4ndige Qwen Code Dokumentation im Browser \xF6ffnen",
101
127
  "Configuration not available.": "Konfiguration nicht verf\xFCgbar.",
102
- "Configure authentication information for login": "Authentifizierungsinformationen f\xFCr die Anmeldung konfigurieren",
128
+ "Connect an LLM provider": "LLM-Anbieter verbinden",
103
129
  "Copy the last result or code snippet to clipboard": "Letztes Ergebnis oder Codeausschnitt in die Zwischenablage kopieren",
104
130
  // ============================================================================
105
131
  // Commands - Agents
@@ -756,8 +782,8 @@ var de_default = {
756
782
  "Continue previous conversation": "Vorheriges Gespr\xE4ch fortsetzen",
757
783
  "\u{1F44B} Welcome back! (Last updated: {{timeAgo}})": "\u{1F44B} Willkommen zur\xFCck! (Zuletzt aktualisiert: {{timeAgo}})",
758
784
  "\u{1F3AF} Overall Goal:": "\u{1F3AF} Gesamtziel:",
759
- "Select Authentication Method": "Authentifizierungsmethode ausw\xE4hlen",
760
- "You must select an auth method to proceed. Press Ctrl+C again to exit.": "Sie m\xFCssen eine Authentifizierungsmethode w\xE4hlen, um fortzufahren. Dr\xFCcken Sie erneut Ctrl+C zum Beenden.",
785
+ "Connect a Provider": "Anbieter verbinden",
786
+ "You must connect a provider to proceed. Press Ctrl+C again to exit.": "Sie m\xFCssen einen Anbieter verbinden, um fortzufahren. Dr\xFCcken Sie erneut Ctrl+C zum Beenden.",
761
787
  "Terms of Services and Privacy Notice": "Nutzungsbedingungen und Datenschutzhinweis",
762
788
  "Qwen OAuth": "Qwen OAuth",
763
789
  "Discontinued \u2014 switch to Coding Plan or API Key": "Eingestellt \u2014 wechseln Sie zu Coding Plan oder API Key",