@qwen-code/qwen-code 0.19.0 → 0.19.1-nightly.20260624.a234860a4

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 (141) hide show
  1. package/bundled/qc-helper/SKILL.md +13 -5
  2. package/bundled/qc-helper/docs/configuration/_meta.ts +1 -0
  3. package/bundled/qc-helper/docs/configuration/auth.md +68 -48
  4. package/bundled/qc-helper/docs/configuration/model-providers.md +217 -195
  5. package/bundled/qc-helper/docs/configuration/settings.md +30 -14
  6. package/bundled/qc-helper/docs/configuration/themes.md +7 -4
  7. package/bundled/qc-helper/docs/extension/extension-releasing.md +1 -1
  8. package/bundled/qc-helper/docs/extension/introduction.md +3 -15
  9. package/bundled/qc-helper/docs/features/arena.md +3 -3
  10. package/bundled/qc-helper/docs/features/channels/overview.md +1 -1
  11. package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
  12. package/bundled/qc-helper/docs/features/commands.md +6 -1
  13. package/bundled/qc-helper/docs/features/headless.md +1 -1
  14. package/bundled/qc-helper/docs/features/mcp.md +24 -8
  15. package/bundled/qc-helper/docs/features/sandbox.md +2 -2
  16. package/bundled/qc-helper/docs/features/tool-use-summaries.md +1 -1
  17. package/bundled/qc-helper/docs/integration-github-action.md +2 -2
  18. package/bundled/qc-helper/docs/overview.md +1 -1
  19. package/bundled/qc-helper/docs/quickstart.md +9 -5
  20. package/bundled/qc-helper/docs/qwen-serve.md +15 -3
  21. package/bundled/qc-helper/docs/support/tos-privacy.md +1 -1
  22. package/chunks/{agent-IPSDEZNB.js → agent-6KV474S5.js} +7 -7
  23. package/chunks/{agent-headless-ZMTUWMZJ.js → agent-headless-XO7MM6JT.js} +7 -7
  24. package/chunks/{anthropicContentGenerator-6MCH4X6S.js → anthropicContentGenerator-7352A7I5.js} +2 -2
  25. package/chunks/{artifact-tool-PBX64YTT.js → artifact-tool-5J4HUZAV.js} +1 -1
  26. package/chunks/{askUserQuestion-5ZQOWSRT.js → askUserQuestion-HF7HCWDD.js} +1 -1
  27. package/chunks/{chunk-PO5LVPK3.js → chunk-2QDQTWCI.js} +1 -1
  28. package/chunks/{chunk-255L5QYW.js → chunk-3BR4OIOE.js} +1 -1
  29. package/chunks/{chunk-KFR4QTV3.js → chunk-54J4JDWT.js} +123 -174
  30. package/chunks/{chunk-S7ILEIB4.js → chunk-76BDT2HH.js} +4 -5
  31. package/chunks/{chunk-YF3ORUIU.js → chunk-7QBKO4A6.js} +2348 -1817
  32. package/chunks/{chunk-GAAALA2X.js → chunk-C4JC2FL3.js} +7 -6
  33. package/chunks/{chunk-CICUTYTF.js → chunk-HNYTRFAM.js} +52 -45
  34. package/chunks/{chunk-JRVB4QUY.js → chunk-KBXLIVWQ.js} +1 -1
  35. package/chunks/{chunk-QKUAGMGE.js → chunk-NKJ6LRCR.js} +1 -1
  36. package/chunks/{chunk-57XRIZVC.js → chunk-NWLUISRA.js} +1 -1
  37. package/chunks/{chunk-VRIVIYRL.js → chunk-TKXRLRTF.js} +4 -4
  38. package/chunks/{computer-use-YYK42DD5.js → computer-use-WOKHYISX.js} +7 -7
  39. package/chunks/{contextCommand-BO45MUAA.js → contextCommand-JSYQAO3O.js} +9 -9
  40. package/chunks/{cron-create-DXKAP5KN.js → cron-create-A5637KCI.js} +9 -6
  41. package/chunks/{cron-delete-WGO4PZTF.js → cron-delete-AADOSEOZ.js} +1 -1
  42. package/chunks/{cron-list-EY7D3ZUC.js → cron-list-OFCPTT2Y.js} +1 -1
  43. package/chunks/{edit-QERNJN7K.js → edit-6EN6NO6G.js} +7 -7
  44. package/chunks/{en-UTXMGXIR.js → en-7OGNWWME.js} +1 -0
  45. package/chunks/{enter-worktree-6ZKH5IL3.js → enter-worktree-XJ4S74CL.js} +7 -7
  46. package/chunks/{enterPlanMode-B2PBF4MA.js → enterPlanMode-GQNQIH2V.js} +7 -7
  47. package/chunks/{exit-worktree-EOCMQO4I.js → exit-worktree-6MKLATVB.js} +7 -7
  48. package/chunks/{exitPlanMode-WSRXCBRZ.js → exitPlanMode-YACWA5GO.js} +7 -7
  49. package/chunks/{geminiContentGenerator-NTR4LTKS.js → geminiContentGenerator-OLJGOIWO.js} +1 -1
  50. package/chunks/{glob-IWDJQI2V.js → glob-YHSIN2LG.js} +7 -7
  51. package/chunks/{grep-2DV5BXMH.js → grep-5EMEAJBO.js} +7 -7
  52. package/chunks/{loop-wakeup-XVSDE7QR.js → loop-wakeup-DGSMT4N6.js} +2 -2
  53. package/chunks/{ls-LPY3ATQQ.js → ls-UGRZ4ZOM.js} +1 -1
  54. package/chunks/{lsp-ZT3AAXIF.js → lsp-72IJURW3.js} +1 -1
  55. package/chunks/{monitor-6HBDS2RS.js → monitor-ZGXTGINM.js} +7 -7
  56. package/chunks/{notebook-edit-J5AY5BRY.js → notebook-edit-O7WO3APR.js} +7 -7
  57. package/chunks/{openaiContentGenerator-ENABCJDM.js → openaiContentGenerator-N4FCEGU2.js} +6 -6
  58. package/chunks/{qwenContentGenerator-ISW42U7C.js → qwenContentGenerator-BOAZ7MMG.js} +9 -9
  59. package/chunks/{read-file-NRX2FSSQ.js → read-file-RB35MI5I.js} +3 -3
  60. package/chunks/{ripGrep-WF5CKHR5.js → ripGrep-CWJOA6JG.js} +7 -7
  61. package/chunks/{scheduler-PNPG5WJ3.js → scheduler-XUBHNI2Z.js} +7 -7
  62. package/chunks/{send-message-447W6NH6.js → send-message-URUZ7PLA.js} +1 -1
  63. package/chunks/{serve-ZBRCIIHW.js → serve-P356SCA2.js} +197 -31
  64. package/chunks/{shell-DLIL6MLU.js → shell-5TRHTPML.js} +7 -7
  65. package/chunks/{skill-32TXHY4A.js → skill-RW6N7GHL.js} +3 -3
  66. package/chunks/{src-PDDLF5BB.js → src-SPEHQKTK.js} +35 -9
  67. package/chunks/{syntheticOutput-GQRDRLGR.js → syntheticOutput-65FRJGWM.js} +2 -2
  68. package/chunks/{task-create-66DDSTVI.js → task-create-IH45HOFT.js} +2 -2
  69. package/chunks/{task-list-GOPXRSHG.js → task-list-FUB6JWSX.js} +1 -1
  70. package/chunks/{task-stop-M7NKGFX2.js → task-stop-P6IOHQM3.js} +1 -1
  71. package/chunks/{task-update-M5TBHLZV.js → task-update-RTUT7LJV.js} +2 -2
  72. package/chunks/{team-create-EHLDSJGI.js → team-create-D6GSPXCO.js} +7 -7
  73. package/chunks/{team-delete-DKKDS65W.js → team-delete-RXGYRMHC.js} +1 -1
  74. package/chunks/{todoWrite-4VX7X44D.js → todoWrite-O6JK24G6.js} +1 -1
  75. package/chunks/{tool-search-FU7IZAOO.js → tool-search-6YIMUUVD.js} +3 -3
  76. package/chunks/{web-fetch-YPP3V4FJ.js → web-fetch-KUMBROUI.js} +2 -2
  77. package/chunks/{workflow-WUDNBCGX.js → workflow-ML3XFTCN.js} +23 -15
  78. package/chunks/{write-file-NVFPX6CH.js → write-file-VLT6ODLK.js} +7 -7
  79. package/chunks/{zh-YOXVTJU5.js → zh-3RMSEO5M.js} +1 -0
  80. package/chunks/{zh-TW-J2TTW67R.js → zh-TW-R7WRLTJS.js} +1 -0
  81. package/cli.js +778 -382
  82. package/locales/en.js +1 -0
  83. package/locales/zh-TW.js +1 -0
  84. package/locales/zh.js +1 -0
  85. package/package.json +3 -3
  86. package/web-shell/assets/{arc-pxOt9B72.js → arc-DHUeMnnj.js} +1 -1
  87. package/web-shell/assets/{architectureDiagram-3BPJPVTR-B9XuYYOT.js → architectureDiagram-3BPJPVTR-DlX12yyj.js} +1 -1
  88. package/web-shell/assets/{blockDiagram-GPEHLZMM-5yK68iu4.js → blockDiagram-GPEHLZMM-DTFUXMUT.js} +1 -1
  89. package/web-shell/assets/{c4Diagram-AAUBKEIU-B1LY-qNI.js → c4Diagram-AAUBKEIU-CWdB54fk.js} +1 -1
  90. package/web-shell/assets/channel-C3WhMjjP.js +1 -0
  91. package/web-shell/assets/{chunk-2J33WTMH-DkgXg7cM.js → chunk-2J33WTMH-CF5C5jNR.js} +1 -1
  92. package/web-shell/assets/{chunk-4BX2VUAB-DdM45KFM.js → chunk-4BX2VUAB-Cw7Ydfji.js} +1 -1
  93. package/web-shell/assets/{chunk-55IACEB6-CmdsDjD4.js → chunk-55IACEB6-CnbI1ZCw.js} +1 -1
  94. package/web-shell/assets/{chunk-727SXJPM-CQ4pJ5GH.js → chunk-727SXJPM-DmSy00Pe.js} +1 -1
  95. package/web-shell/assets/{chunk-AQP2D5EJ-Dy6UWz37.js → chunk-AQP2D5EJ-DgNgXqBu.js} +1 -1
  96. package/web-shell/assets/{chunk-FMBD7UC4-CC8nFqap.js → chunk-FMBD7UC4-tz2IvOXv.js} +1 -1
  97. package/web-shell/assets/{chunk-ND2GUHAM-CkmS7lx7.js → chunk-ND2GUHAM-DaBLEBPa.js} +1 -1
  98. package/web-shell/assets/{chunk-QZHKN3VN-DynyqleZ.js → chunk-QZHKN3VN-DVCQST3O.js} +1 -1
  99. package/web-shell/assets/classDiagram-4FO5ZUOK-CQ6TXPif.js +1 -0
  100. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CQ6TXPif.js +1 -0
  101. package/web-shell/assets/{cose-bilkent-S5V4N54A-DA0fzCsY.js → cose-bilkent-S5V4N54A-CAKTcdCQ.js} +1 -1
  102. package/web-shell/assets/{dagre-BM42HDAG-DHYXRqCo.js → dagre-BM42HDAG-BdkBwlKg.js} +1 -1
  103. package/web-shell/assets/{diagram-2AECGRRQ-DWD6BcPs.js → diagram-2AECGRRQ-DYt3G65F.js} +1 -1
  104. package/web-shell/assets/{diagram-5GNKFQAL-CX9wnqVc.js → diagram-5GNKFQAL-BWvROWjY.js} +1 -1
  105. package/web-shell/assets/{diagram-KO2AKTUF-BpE8Kbt8.js → diagram-KO2AKTUF-BvvgwIaQ.js} +1 -1
  106. package/web-shell/assets/{diagram-LMA3HP47-DLPcrP0C.js → diagram-LMA3HP47-E7NLSNKg.js} +1 -1
  107. package/web-shell/assets/{diagram-OG6HWLK6-CSUCBsCe.js → diagram-OG6HWLK6-CYmUBgpE.js} +1 -1
  108. package/web-shell/assets/{erDiagram-TEJ5UH35-d3Z0uMXS.js → erDiagram-TEJ5UH35-BU5gY30h.js} +1 -1
  109. package/web-shell/assets/{flowDiagram-I6XJVG4X-C7vj5FX3.js → flowDiagram-I6XJVG4X-V_ZssSZ9.js} +1 -1
  110. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BV9UvDV_.js → ganttDiagram-6RSMTGT7-QIShlsdI.js} +1 -1
  111. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CoWp0mW4.js → gitGraphDiagram-PVQCEYII-DJxdu2YS.js} +1 -1
  112. package/web-shell/assets/index-BPnhI7gl.css +1 -0
  113. package/web-shell/assets/index-De4rqTsW.js +706 -0
  114. package/web-shell/assets/{infoDiagram-5YYISTIA-DUswfJHA.js → infoDiagram-5YYISTIA-BqjdrFeO.js} +1 -1
  115. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-WidEKukx.js → ishikawaDiagram-YF4QCWOH-BP_a2YZ2.js} +1 -1
  116. package/web-shell/assets/{journeyDiagram-JHISSGLW-D7IRK3VN.js → journeyDiagram-JHISSGLW-BXg-S3Lk.js} +1 -1
  117. package/web-shell/assets/{kanban-definition-UN3LZRKU-CwFJ6Cja.js → kanban-definition-UN3LZRKU-BksAkdEJ.js} +1 -1
  118. package/web-shell/assets/{linear-BQ8GvDRY.js → linear-D2m9-ODE.js} +1 -1
  119. package/web-shell/assets/{mermaid.core-CwF8A_xO.js → mermaid.core-dTtkZp2F.js} +5 -5
  120. package/web-shell/assets/{mindmap-definition-RKZ34NQL-TR1s0iZi.js → mindmap-definition-RKZ34NQL-Bft9my8O.js} +1 -1
  121. package/web-shell/assets/{pieDiagram-4H26LBE5-Cd91pMl9.js → pieDiagram-4H26LBE5-Cw8S-alZ.js} +1 -1
  122. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BGxGDNMl.js → quadrantDiagram-W4KKPZXB-DaDoTMts.js} +1 -1
  123. package/web-shell/assets/{requirementDiagram-4Y6WPE33-Cq3fWmYz.js → requirementDiagram-4Y6WPE33-Cp5kSpwj.js} +1 -1
  124. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-ChLyGdq0.js → sankeyDiagram-5OEKKPKP-CW8RsJJZ.js} +1 -1
  125. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-tazy79aB.js → sequenceDiagram-3UESZ5HK-DTfpIiJK.js} +1 -1
  126. package/web-shell/assets/{stateDiagram-AJRCARHV-dIYLUNSf.js → stateDiagram-AJRCARHV-DixFVzEs.js} +1 -1
  127. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DZgE04s3.js +1 -0
  128. package/web-shell/assets/{timeline-definition-PNZ67QCA-BuENhrC2.js → timeline-definition-PNZ67QCA-DYsbXn5l.js} +1 -1
  129. package/web-shell/assets/{vennDiagram-CIIHVFJN-DLtum9dF.js → vennDiagram-CIIHVFJN-HUpRpuUp.js} +1 -1
  130. package/web-shell/assets/{wardley-L42UT6IY-Bf7OSF3y.js → wardley-L42UT6IY-cT3nQH_T.js} +1 -1
  131. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-slMw3OB3.js → wardleyDiagram-YWT4CUSO-Dmm7J6Qc.js} +1 -1
  132. package/web-shell/assets/{xychartDiagram-2RQKCTM6-CdxOm8oC.js → xychartDiagram-2RQKCTM6-CX0L5p9C.js} +1 -1
  133. package/web-shell/index.html +3 -3
  134. package/web-shell/assets/channel-Cx7egbSX.js +0 -1
  135. package/web-shell/assets/classDiagram-4FO5ZUOK-CwH_F8cH.js +0 -1
  136. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwH_F8cH.js +0 -1
  137. package/web-shell/assets/index-BDZiTAkl.css +0 -1
  138. package/web-shell/assets/index-CjTH6cLP.js +0 -516
  139. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-luL7KTiX.js +0 -1
  140. package/chunks/{chunk-JDV3VBPY.js → chunk-F6XNTYNE.js} +202 -202
  141. package/chunks/{chunk-PLY4F7QW.js → chunk-L7U2RI5O.js} +54 -54
@@ -72,12 +72,12 @@ import {
72
72
  reloadEnvironment,
73
73
  resolveCliGenerationConfig,
74
74
  sanitizeProviderBaseUrl
75
- } from "./chunk-KFR4QTV3.js";
75
+ } from "./chunk-54J4JDWT.js";
76
76
  import {
77
77
  SUPPORTED_LANGUAGES,
78
78
  writeStderrLine,
79
79
  writeStdoutLine
80
- } from "./chunk-VRIVIYRL.js";
80
+ } from "./chunk-TKXRLRTF.js";
81
81
  import {
82
82
  ClientSideConnection,
83
83
  PROTOCOL_VERSION,
@@ -120,13 +120,13 @@ import {
120
120
  resolveBundleDir,
121
121
  shouldShowStep,
122
122
  writeWorkspaceContextFile
123
- } from "./chunk-YF3ORUIU.js";
123
+ } from "./chunk-7QBKO4A6.js";
124
124
  import "./chunk-K5PGHDBN.js";
125
125
  import "./chunk-TXVGVZYR.js";
126
126
  import "./chunk-XU5P23GN.js";
127
127
  import "./chunk-2BIF2NVV.js";
128
- import "./chunk-57XRIZVC.js";
129
- import "./chunk-255L5QYW.js";
128
+ import "./chunk-NWLUISRA.js";
129
+ import "./chunk-3BR4OIOE.js";
130
130
  import "./chunk-2MPVVENX.js";
131
131
  import "./chunk-ZTQ26VBE.js";
132
132
  import "./chunk-GZCJS5WH.js";
@@ -165,15 +165,15 @@ import {
165
165
  resolveTelemetrySettings,
166
166
  shutdownTelemetry,
167
167
  withDaemonRequestSpan
168
- } from "./chunk-CICUTYTF.js";
168
+ } from "./chunk-HNYTRFAM.js";
169
169
  import "./chunk-3PJXIDKI.js";
170
170
  import "./chunk-UWCTAVOD.js";
171
171
  import "./chunk-OFEVLU4C.js";
172
172
  import "./chunk-OMX7CUOE.js";
173
173
  import "./chunk-BNXANYLH.js";
174
174
  import "./chunk-T2VDEFUU.js";
175
- import "./chunk-PO5LVPK3.js";
176
- import "./chunk-PLY4F7QW.js";
175
+ import "./chunk-2QDQTWCI.js";
176
+ import "./chunk-L7U2RI5O.js";
177
177
  import {
178
178
  QwenOAuth2Client,
179
179
  QwenOAuthPollError,
@@ -191,7 +191,7 @@ import {
191
191
  detectRuntime,
192
192
  redactProxyCredentials,
193
193
  tokenLimit
194
- } from "./chunk-JDV3VBPY.js";
194
+ } from "./chunk-F6XNTYNE.js";
195
195
  import "./chunk-CGEGHF2C.js";
196
196
  import {
197
197
  require_safer
@@ -17224,7 +17224,13 @@ function createSpawnChannelFactory(options = {}) {
17224
17224
  );
17225
17225
  const child = spawn(
17226
17226
  process.execPath,
17227
- [...execArgs, ...memoryArgs, cliEntry, "--acp"],
17227
+ [
17228
+ ...execArgs,
17229
+ ...memoryArgs,
17230
+ cliEntry,
17231
+ "--acp",
17232
+ ...options.extraArgs ?? []
17233
+ ],
17228
17234
  {
17229
17235
  cwd: workspaceCwd,
17230
17236
  stdio: ["pipe", "pipe", "pipe"],
@@ -20445,6 +20451,12 @@ function createAcpSessionBridge(opts) {
20445
20451
  SERVE_STATUS_EXT_METHODS.sessionTasks
20446
20452
  );
20447
20453
  },
20454
+ async getSessionLspStatus(sessionId) {
20455
+ return requestSessionStatus(
20456
+ sessionId,
20457
+ SERVE_STATUS_EXT_METHODS.sessionLspStatus
20458
+ );
20459
+ },
20448
20460
  async cancelSessionTask(sessionId, taskId, taskKind) {
20449
20461
  return requestSessionStatus(
20450
20462
  sessionId,
@@ -21039,7 +21051,11 @@ function createAcpSessionBridge(opts) {
21039
21051
  withTimeout(
21040
21052
  entry.connection.extMethod(
21041
21053
  SERVE_CONTROL_EXT_METHODS.sessionRewind,
21042
- { sessionId, promptId: req.promptId, rewindFiles: true }
21054
+ {
21055
+ sessionId,
21056
+ promptId: req.promptId,
21057
+ rewindFiles: req.rewindFiles !== false
21058
+ }
21043
21059
  ),
21044
21060
  initTimeoutMs,
21045
21061
  SERVE_CONTROL_EXT_METHODS.sessionRewind
@@ -22771,6 +22787,12 @@ var WorkspaceFileSystemImpl = class {
22771
22787
  const start = performance.now();
22772
22788
  try {
22773
22789
  assertTrustedForIntent(this.deps.trusted, "list");
22790
+ if (opts.maxEntries !== void 0 && (!Number.isSafeInteger(opts.maxEntries) || opts.maxEntries < 1)) {
22791
+ throw new FsError(
22792
+ "parse_error",
22793
+ `maxEntries must be a positive integer, got ${opts.maxEntries}`
22794
+ );
22795
+ }
22774
22796
  const entries = [];
22775
22797
  const dir = await fsp2.opendir(p);
22776
22798
  for await (const d of dir) {
@@ -25080,6 +25102,7 @@ var ALL_QWEN_VENDOR_METHODS = [
25080
25102
  `${QWEN_METHOD_NS}session/detach`,
25081
25103
  `${QWEN_METHOD_NS}session/context_usage`,
25082
25104
  `${QWEN_METHOD_NS}session/tasks`,
25105
+ `${QWEN_METHOD_NS}session/lsp`,
25083
25106
  // Wave 1: memory
25084
25107
  `${QWEN_METHOD_NS}workspace/memory`,
25085
25108
  `${QWEN_METHOD_NS}workspace/memory/write`,
@@ -26135,6 +26158,13 @@ var AcpDispatcher = class {
26135
26158
  this.replyConn(conn, id, result);
26136
26159
  return;
26137
26160
  }
26161
+ case `${QWEN_METHOD_NS}session/lsp`: {
26162
+ const sessionId = String(params["sessionId"] ?? "");
26163
+ if (!this.requireOwned(conn, sessionId, id)) return;
26164
+ const result = await this.bridge.getSessionLspStatus(sessionId);
26165
+ this.replyConn(conn, id, result);
26166
+ return;
26167
+ }
26138
26168
  case `${QWEN_METHOD_NS}workspace/memory`: {
26139
26169
  const result = await collectWorkspaceMemoryStatus(
26140
26170
  this.boundWorkspace
@@ -27793,6 +27823,7 @@ var WS_READ_METHODS = /* @__PURE__ */ new Set([
27793
27823
  "_qwen/session/supported_commands",
27794
27824
  "_qwen/session/context_usage",
27795
27825
  "_qwen/session/tasks",
27826
+ "_qwen/session/lsp",
27796
27827
  "_qwen/workspace/mcp",
27797
27828
  "_qwen/workspace/skills",
27798
27829
  "_qwen/workspace/providers",
@@ -28816,6 +28847,7 @@ var SERVE_CAPABILITY_REGISTRY = {
28816
28847
  session_supported_commands: { since: "v1" },
28817
28848
  session_tasks: { since: "v1" },
28818
28849
  session_stats: { since: "v1" },
28850
+ session_lsp: { since: "v1" },
28819
28851
  session_close: { since: "v1" },
28820
28852
  session_metadata: { since: "v1" },
28821
28853
  // Daemon supports the MCP client guardrail surface: an in-process
@@ -31013,7 +31045,16 @@ var A2UI_MIME = "application/a2ui+json";
31013
31045
  var ACTION_TOOL = "action";
31014
31046
  var CALL_TIMEOUT_MS = 15e3;
31015
31047
  function usableServerConfig(cfg) {
31016
- return !!cfg && (typeof cfg.command === "string" || typeof cfg.httpUrl === "string");
31048
+ if (!cfg) return false;
31049
+ if (typeof cfg.httpUrl === "string") {
31050
+ try {
31051
+ const parsed = new URL(cfg.httpUrl);
31052
+ return parsed.protocol === "http:" || parsed.protocol === "https:";
31053
+ } catch {
31054
+ return false;
31055
+ }
31056
+ }
31057
+ return typeof cfg.command === "string" && cfg.command.trim().length > 0;
31017
31058
  }
31018
31059
  __name(usableServerConfig, "usableServerConfig");
31019
31060
  async function findFromSettingsFile(workspaceCwd) {
@@ -31415,17 +31456,23 @@ var InvalidCursorError = class extends Error {
31415
31456
  this.name = "InvalidCursorError";
31416
31457
  }
31417
31458
  };
31459
+ function parseSessionCursor(cursor) {
31460
+ if (cursor === "") return void 0;
31461
+ const trimmed = cursor.trim();
31462
+ const parsed = Number(trimmed);
31463
+ if (trimmed === "" || !Number.isFinite(parsed) || parsed < 0 || parsed > Number.MAX_SAFE_INTEGER) {
31464
+ throw new InvalidCursorError(cursor);
31465
+ }
31466
+ return parsed;
31467
+ }
31468
+ __name(parseSessionCursor, "parseSessionCursor");
31418
31469
  async function listWorkspaceSessionsForResponse(bridge, workspaceCwd, options) {
31419
31470
  const rawSize = options?.size;
31420
31471
  const requestedSize = typeof rawSize === "number" && Number.isSafeInteger(rawSize) ? rawSize : DEFAULT_SESSION_PAGE_SIZE;
31421
31472
  const pageSize = Math.min(Math.max(requestedSize, 1), MAX_SESSION_PAGE_SIZE);
31422
31473
  let numericCursor;
31423
- if (options?.cursor) {
31424
- const parsed = Number(options.cursor);
31425
- if (!Number.isFinite(parsed)) {
31426
- throw new InvalidCursorError(options.cursor);
31427
- }
31428
- numericCursor = parsed;
31474
+ if (options?.cursor != null) {
31475
+ numericCursor = parseSessionCursor(options.cursor);
31429
31476
  }
31430
31477
  const isFirstPage = numericCursor === void 0;
31431
31478
  const sessionService = new SessionService(workspaceCwd);
@@ -32026,7 +32073,7 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
32026
32073
  extensionInstallQueue = next.catch(() => void 0);
32027
32074
  return next;
32028
32075
  }, "enqueueExtensionInstall");
32029
- const EXTENSION_MUTATION_TIMEOUT_MS = 12e4;
32076
+ const EXTENSION_MUTATION_TIMEOUT_MS = 10 * 6e4;
32030
32077
  const EXTENSION_REFRESH_TIMEOUT_MS = 3e4;
32031
32078
  const isExtensionQueueFullError = /* @__PURE__ */ __name((err) => err instanceof Error && err.message === "Extension operation queue is full", "isExtensionQueueFullError");
32032
32079
  const sendExtensionQueueFull = /* @__PURE__ */ __name((res) => {
@@ -32160,14 +32207,56 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
32160
32207
  (extension) => extension.installMetadata?.source?.toLowerCase() === requested
32161
32208
  );
32162
32209
  }, "findLoadedExtension");
32210
+ const extensionOperations = /* @__PURE__ */ new Map();
32211
+ const MAX_EXTENSION_OPERATION_HISTORY = 100;
32212
+ const isTerminalExtensionOperation = /* @__PURE__ */ __name((operation) => operation.status !== "queued" && operation.status !== "running", "isTerminalExtensionOperation");
32213
+ const redactExtensionOperationResult = /* @__PURE__ */ __name((event) => ({
32214
+ ...event,
32215
+ ...event.source ? { source: redactUrlCredentials(event.source) } : {}
32216
+ }), "redactExtensionOperationResult");
32217
+ const rememberExtensionOperation = /* @__PURE__ */ __name((operation) => {
32218
+ extensionOperations.set(operation.operationId, operation);
32219
+ while (extensionOperations.size > MAX_EXTENSION_OPERATION_HISTORY) {
32220
+ let evicted = false;
32221
+ for (const [id, storedOperation] of extensionOperations) {
32222
+ if (!isTerminalExtensionOperation(storedOperation)) continue;
32223
+ extensionOperations.delete(id);
32224
+ evicted = true;
32225
+ break;
32226
+ }
32227
+ if (!evicted) break;
32228
+ }
32229
+ }, "rememberExtensionOperation");
32230
+ const updateExtensionOperation = /* @__PURE__ */ __name((operationId, patch) => {
32231
+ const current = extensionOperations.get(operationId);
32232
+ if (!current) return;
32233
+ extensionOperations.set(operationId, {
32234
+ ...current,
32235
+ ...patch,
32236
+ updatedAt: Date.now()
32237
+ });
32238
+ }, "updateExtensionOperation");
32163
32239
  const runQueuedExtensionMutation = /* @__PURE__ */ __name((operation, failureContext, res, run) => {
32164
32240
  if (extensionInstallQueueDepth >= MAX_EXTENSION_INSTALL_QUEUE_DEPTH) {
32165
32241
  sendExtensionQueueFull(res);
32166
32242
  return;
32167
32243
  }
32168
- res.status(202).json({ accepted: true });
32244
+ const operationId = crypto.randomUUID();
32245
+ const now = Date.now();
32246
+ rememberExtensionOperation({
32247
+ v: 1,
32248
+ operationId,
32249
+ operation,
32250
+ status: "queued",
32251
+ createdAt: now,
32252
+ updatedAt: now,
32253
+ ...failureContext.source ? { source: redactUrlCredentials(failureContext.source) } : {},
32254
+ ...failureContext.name ? { name: failureContext.name } : {}
32255
+ });
32256
+ res.status(202).json({ accepted: true, operationId });
32169
32257
  void enqueueExtensionInstall(async () => {
32170
32258
  try {
32259
+ updateExtensionOperation(operationId, { status: "running" });
32171
32260
  const extensionManager = createExtensionManager();
32172
32261
  await extensionManager.refreshCache();
32173
32262
  const event = await withExtensionTimeout(
@@ -32178,6 +32267,14 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
32178
32267
  extensionsStatusCache = void 0;
32179
32268
  try {
32180
32269
  const result = await bridge.refreshExtensionsForAllSessions(event);
32270
+ updateExtensionOperation(operationId, {
32271
+ status: "succeeded",
32272
+ result: {
32273
+ ...redactExtensionOperationResult(event),
32274
+ refreshed: result.refreshed,
32275
+ failed: result.failed
32276
+ }
32277
+ });
32181
32278
  writeStderrLine(
32182
32279
  `qwen serve: extensions ${operation}: refreshed ${result.refreshed} session(s), ${result.failed} failed`
32183
32280
  );
@@ -32185,6 +32282,15 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
32185
32282
  const message = redactUrlCredentials(
32186
32283
  refreshErr instanceof Error ? refreshErr.message : String(refreshErr)
32187
32284
  );
32285
+ updateExtensionOperation(operationId, {
32286
+ status: "succeeded_with_refresh_error",
32287
+ result: {
32288
+ ...redactExtensionOperationResult(event),
32289
+ refreshed: 0,
32290
+ failed: 1,
32291
+ error: message.slice(0, 500)
32292
+ }
32293
+ });
32188
32294
  try {
32189
32295
  bridge.broadcastExtensionsChanged({
32190
32296
  ...event,
@@ -32205,6 +32311,10 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
32205
32311
  const message = redactUrlCredentials(
32206
32312
  err instanceof Error ? err.message : String(err)
32207
32313
  );
32314
+ updateExtensionOperation(operationId, {
32315
+ status: "failed",
32316
+ error: message.slice(0, 500)
32317
+ });
32208
32318
  try {
32209
32319
  bridge.broadcastExtensionsChanged({
32210
32320
  status: "failed",
@@ -32227,9 +32337,16 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
32227
32337
  }
32228
32338
  }
32229
32339
  }).catch((err) => {
32340
+ const message = redactUrlCredentials(
32341
+ err instanceof Error ? err.message : String(err)
32342
+ );
32343
+ updateExtensionOperation(operationId, {
32344
+ status: "failed",
32345
+ error: message.slice(0, 500)
32346
+ });
32230
32347
  try {
32231
32348
  writeStderrLine(
32232
- `qwen serve: extensions ${operation}: queued task failed: ${err instanceof Error ? err.message : String(err)}`
32349
+ `qwen serve: extensions ${operation}: queued task failed: ${message}`
32233
32350
  );
32234
32351
  } catch {
32235
32352
  }
@@ -32623,6 +32740,32 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
32623
32740
  sendBridgeError(res, err, { route: "GET /workspace/extensions" });
32624
32741
  }
32625
32742
  });
32743
+ app.get("/workspace/extensions/operations/:operationId", async (req, res) => {
32744
+ try {
32745
+ buildWorkspaceCtx(
32746
+ req,
32747
+ "GET /workspace/extensions/operations/:operationId"
32748
+ );
32749
+ const operationId = req.params["operationId"];
32750
+ if (!operationId) {
32751
+ res.status(400).json({ error: "Missing extension operation id" });
32752
+ return;
32753
+ }
32754
+ const operation = extensionOperations.get(operationId);
32755
+ if (!operation) {
32756
+ res.status(404).json({
32757
+ error: `Extension operation "${operationId}" not found`,
32758
+ code: "extension_operation_not_found"
32759
+ });
32760
+ return;
32761
+ }
32762
+ res.status(200).json(operation);
32763
+ } catch (err) {
32764
+ sendBridgeError(res, err, {
32765
+ route: "GET /workspace/extensions/operations/:operationId"
32766
+ });
32767
+ }
32768
+ });
32626
32769
  app.post(
32627
32770
  "/workspace/extensions/install",
32628
32771
  mutate({ strict: true }),
@@ -32666,7 +32809,12 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
32666
32809
  res.status(400).json({ error: "`registry` must be a string" });
32667
32810
  return;
32668
32811
  }
32669
- const registryUrl = registry !== void 0 ? parseExtensionRegistryUrl(registry, res) : void 0;
32812
+ const sourceValue = source;
32813
+ const refValue = typeof ref === "string" ? ref : void 0;
32814
+ const autoUpdateValue = typeof autoUpdate === "boolean" ? autoUpdate : void 0;
32815
+ const allowPreReleaseValue = typeof allowPreRelease === "boolean" ? allowPreRelease : void 0;
32816
+ const registryValue = typeof registry === "string" ? registry : void 0;
32817
+ const registryUrl = registryValue !== void 0 ? parseExtensionRegistryUrl(registryValue, res) : void 0;
32670
32818
  if (registryUrl === null) return;
32671
32819
  if (consent !== true) {
32672
32820
  res.status(400).json({
@@ -32674,24 +32822,24 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
32674
32822
  });
32675
32823
  return;
32676
32824
  }
32677
- if (!validateExtensionSourceHost(source, res)) {
32825
+ if (!validateExtensionSourceHost(sourceValue, res)) {
32678
32826
  return;
32679
32827
  }
32680
32828
  runQueuedExtensionMutation(
32681
32829
  "install",
32682
- { source },
32830
+ { source: sourceValue },
32683
32831
  res,
32684
32832
  async (extensionManager) => {
32685
- const installMetadata = await parseInstallSource(source);
32833
+ const installMetadata = await parseInstallSource(sourceValue);
32686
32834
  if (installMetadata.type !== "git" && installMetadata.type !== "github-release" && installMetadata.type !== "npm") {
32687
32835
  throw new Error(
32688
32836
  "Only GitHub, Git, and npm extension installs are supported over the daemon endpoint."
32689
32837
  );
32690
32838
  }
32691
- if (installMetadata.type === "npm" && ref) {
32839
+ if (installMetadata.type === "npm" && refValue) {
32692
32840
  throw new Error("--ref is not applicable for npm extensions.");
32693
32841
  }
32694
- if (installMetadata.type !== "npm" && registry) {
32842
+ if (installMetadata.type !== "npm" && registryValue) {
32695
32843
  throw new Error(
32696
32844
  "--registry is only applicable for npm extensions."
32697
32845
  );
@@ -32703,12 +32851,17 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
32703
32851
  installMetadata.registryUrl = registryUrl;
32704
32852
  }
32705
32853
  const extension = await extensionManager.installExtension(
32706
- { ...installMetadata, ref, autoUpdate, allowPreRelease },
32854
+ {
32855
+ ...installMetadata,
32856
+ ref: refValue,
32857
+ autoUpdate: autoUpdateValue,
32858
+ allowPreRelease: allowPreReleaseValue
32859
+ },
32707
32860
  () => Promise.resolve()
32708
32861
  );
32709
32862
  return {
32710
32863
  status: "installed",
32711
- source,
32864
+ source: sourceValue,
32712
32865
  name: extension.name,
32713
32866
  version: extension.config.version
32714
32867
  };
@@ -33442,6 +33595,18 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
33442
33595
  });
33443
33596
  }
33444
33597
  });
33598
+ app.get("/session/:id/lsp", async (req, res) => {
33599
+ const sessionId = requireSessionId(req, res);
33600
+ if (sessionId === null) return;
33601
+ try {
33602
+ res.status(200).json(await bridge.getSessionLspStatus(sessionId));
33603
+ } catch (err) {
33604
+ sendBridgeError(res, err, {
33605
+ route: "GET /session/:id/lsp",
33606
+ sessionId
33607
+ });
33608
+ }
33609
+ });
33445
33610
  app.get("/session/:id/hooks", async (req, res) => {
33446
33611
  const sessionId = requireSessionId(req, res);
33447
33612
  if (sessionId === null) return;
@@ -34064,7 +34229,7 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
34064
34229
  try {
34065
34230
  const response = await bridge.rewindSession(
34066
34231
  sessionId,
34067
- { promptId },
34232
+ { promptId, rewindFiles: body["rewindFiles"] !== false },
34068
34233
  clientId !== void 0 ? { clientId } : void 0
34069
34234
  );
34070
34235
  res.status(200).json(response);
@@ -35978,7 +36143,8 @@ async function runQwenServe(optsIn, deps = {}) {
35978
36143
  });
35979
36144
  const diagnosticSink = /* @__PURE__ */ __name((line, level) => daemonLog.raw(line, level), "diagnosticSink");
35980
36145
  const channelFactory = createSpawnChannelFactory({
35981
- onDiagnosticLine: diagnosticSink
36146
+ onDiagnosticLine: diagnosticSink,
36147
+ ...opts.experimentalLsp === true ? { extraArgs: ["--experimental-lsp"] } : {}
35982
36148
  });
35983
36149
  const persistDisabledToolsFn = /* @__PURE__ */ __name((workspace, toolName, enabled) => withSettingsLock(workspace, async () => {
35984
36150
  const fresh = loadSettings(workspace);
@@ -7,13 +7,13 @@ import {
7
7
  buildLongRunningForegroundHint,
8
8
  detectBlockedSleepPattern,
9
9
  parseNumstat
10
- } from "./chunk-YF3ORUIU.js";
10
+ } from "./chunk-7QBKO4A6.js";
11
11
  import "./chunk-K5PGHDBN.js";
12
12
  import "./chunk-TXVGVZYR.js";
13
13
  import "./chunk-XU5P23GN.js";
14
14
  import "./chunk-2BIF2NVV.js";
15
- import "./chunk-57XRIZVC.js";
16
- import "./chunk-255L5QYW.js";
15
+ import "./chunk-NWLUISRA.js";
16
+ import "./chunk-3BR4OIOE.js";
17
17
  import "./chunk-2MPVVENX.js";
18
18
  import "./chunk-ZTQ26VBE.js";
19
19
  import "./chunk-GZCJS5WH.js";
@@ -23,21 +23,21 @@ 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-HNYTRFAM.js";
27
27
  import "./chunk-3PJXIDKI.js";
28
28
  import "./chunk-UWCTAVOD.js";
29
29
  import "./chunk-OFEVLU4C.js";
30
30
  import "./chunk-OMX7CUOE.js";
31
31
  import "./chunk-BNXANYLH.js";
32
32
  import "./chunk-T2VDEFUU.js";
33
- import "./chunk-PO5LVPK3.js";
34
- import "./chunk-PLY4F7QW.js";
33
+ import "./chunk-2QDQTWCI.js";
34
+ import "./chunk-L7U2RI5O.js";
35
35
  import "./chunk-BGUDAULQ.js";
36
36
  import "./chunk-EW6C27XX.js";
37
37
  import "./chunk-22IFUCVR.js";
38
38
  import "./chunk-64WXLC72.js";
39
39
  import "./chunk-3UALQ56H.js";
40
- import "./chunk-JDV3VBPY.js";
40
+ import "./chunk-F6XNTYNE.js";
41
41
  import "./chunk-CGEGHF2C.js";
42
42
  import "./chunk-EJYJYJZ2.js";
43
43
  import "./chunk-55ZMG67I.js";
@@ -10,20 +10,20 @@ import "./chunk-HGNSRCRB.js";
10
10
  import {
11
11
  SkillLaunchEvent,
12
12
  logSkillLaunch
13
- } from "./chunk-CICUTYTF.js";
13
+ } from "./chunk-HNYTRFAM.js";
14
14
  import "./chunk-3PJXIDKI.js";
15
15
  import "./chunk-UWCTAVOD.js";
16
16
  import "./chunk-OFEVLU4C.js";
17
17
  import "./chunk-OMX7CUOE.js";
18
18
  import "./chunk-BNXANYLH.js";
19
19
  import "./chunk-T2VDEFUU.js";
20
- import "./chunk-PO5LVPK3.js";
20
+ import "./chunk-2QDQTWCI.js";
21
21
  import {
22
22
  BaseDeclarativeTool,
23
23
  BaseToolInvocation,
24
24
  ToolDisplayNames,
25
25
  ToolNames
26
- } from "./chunk-PLY4F7QW.js";
26
+ } from "./chunk-L7U2RI5O.js";
27
27
  import "./chunk-3UALQ56H.js";
28
28
  import "./chunk-CGEGHF2C.js";
29
29
  import "./chunk-EJYJYJZ2.js";