@qwen-code/qwen-code 0.18.0-preview.1 → 0.18.0-preview.2

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 (107) hide show
  1. package/bundled/qc-helper/SKILL.md +1 -2
  2. package/bundled/qc-helper/docs/configuration/settings.md +17 -19
  3. package/bundled/qc-helper/docs/features/_meta.ts +0 -3
  4. package/bundled/qc-helper/docs/features/commands.md +14 -12
  5. package/bundled/qc-helper/docs/features/scheduled-tasks.md +1 -1
  6. package/bundled/qc-helper/docs/features/sub-agents.md +39 -0
  7. package/chunks/{agent-SXS4NQWS.js → agent-QB7TZ4HW.js} +22 -16
  8. package/chunks/agent-headless-APVHH7QM.js +50 -0
  9. package/chunks/{anthropicContentGenerator-4QBVSFSJ.js → anthropicContentGenerator-M45EVVRM.js} +4 -4
  10. package/chunks/{askUserQuestion-NOOLRWCJ.js → askUserQuestion-WM2KHM3K.js} +2 -2
  11. package/chunks/{ca-WRHFBIDH.js → ca-BARBRL6N.js} +48 -1
  12. package/chunks/{chunk-G763GDO6.js → chunk-2ZTWI7KH.js} +15 -3
  13. package/chunks/chunk-64WXLC72.js +98 -0
  14. package/chunks/{chunk-NQZ33PWX.js → chunk-7YKXFA3D.js} +11 -11
  15. package/chunks/chunk-AJIR24J2.js +59 -0
  16. package/chunks/{chunk-ERREX2ES.js → chunk-AVW55ZCO.js} +61 -23
  17. package/chunks/{chunk-SHUT5MQY.js → chunk-CNHFPN7T.js} +1 -1
  18. package/chunks/{chunk-5RNZ2QKF.js → chunk-CNSMKPK6.js} +1 -1
  19. package/chunks/{chunk-BBTV54KB.js → chunk-CWV3SJZS.js} +2 -2
  20. package/chunks/{chunk-GBEPNWYB.js → chunk-GX7VH5JQ.js} +1 -1
  21. package/chunks/chunk-HGJPQK33.js +2231 -0
  22. package/chunks/chunk-HV3ZZ7G4.js +159 -0
  23. package/chunks/{chunk-ZW7GBCRE.js → chunk-HXJE7VOG.js} +20 -31
  24. package/chunks/{chunk-PLYZAP4W.js → chunk-ICOI4E4S.js} +1 -1
  25. package/chunks/{chunk-6VFG3EUJ.js → chunk-JUGRPQAB.js} +1 -1
  26. package/chunks/{chunk-AVLOK27J.js → chunk-JVQOQ3OU.js} +1 -1
  27. package/chunks/{chunk-R5PDRHEF.js → chunk-JXAZUMDW.js} +67 -45
  28. package/chunks/{chunk-UABFCMPA.js → chunk-KC6ZMJ5X.js} +3 -1
  29. package/chunks/chunk-LD2XBG6Z.js +102 -0
  30. package/chunks/{chunk-MVX64PNU.js → chunk-LR62TEET.js} +1 -1
  31. package/chunks/{chunk-JMLIPZUU.js → chunk-MVIVIPCU.js} +3 -3
  32. package/chunks/{chunk-KOA52UTF.js → chunk-NW5QBUYO.js} +6 -6
  33. package/chunks/{chunk-JSYEZAYV.js → chunk-P4J26VDS.js} +2 -2
  34. package/chunks/{chunk-SCHRFI7O.js → chunk-PAEBHDIO.js} +1 -1
  35. package/chunks/{chunk-6KH2Q7XN.js → chunk-QCG6KPNM.js} +3685 -1897
  36. package/chunks/chunk-SKBPNJEW.js +45 -0
  37. package/chunks/{chunk-F5ORN4YO.js → chunk-UAMOBVVW.js} +1 -1
  38. package/chunks/chunk-XBFVXFB2.js +216 -0
  39. package/chunks/{chunk-D46KOV3C.js → chunk-Y7R6H6FT.js} +1 -1
  40. package/chunks/{chunk-F6FLCHCS.js → chunk-ZK4AMNIU.js} +39 -12
  41. package/chunks/{computer-use-CT6MU6P3.js → computer-use-B7VIUI7F.js} +22 -16
  42. package/chunks/contextCommand-63RZ3O5R.js +52 -0
  43. package/chunks/{cron-create-PIPMXQN4.js → cron-create-FI5LJVUS.js} +2 -2
  44. package/chunks/{cron-delete-6Y5XIDMS.js → cron-delete-ZGUXWBTG.js} +2 -2
  45. package/chunks/{cron-list-A4WNRUWZ.js → cron-list-QNNZGMN3.js} +2 -2
  46. package/chunks/{de-M5RPB2NB.js → de-YGKK2BC4.js} +48 -1
  47. package/chunks/{edit-A4YK7AIB.js → edit-6UBTS2J5.js} +23 -17
  48. package/chunks/{en-UMYKQAZE.js → en-HSQQNQUB.js} +73 -2
  49. package/chunks/{enter-worktree-VNEQINLC.js → enter-worktree-NN7LIXCM.js} +22 -16
  50. package/chunks/{exit-worktree-AVSMXC33.js → exit-worktree-GGSS5KIE.js} +22 -16
  51. package/chunks/{exitPlanMode-5SQYVROD.js → exitPlanMode-H323NHB2.js} +22 -16
  52. package/chunks/{fr-MPYXXXPW.js → fr-JXBKPJKQ.js} +48 -1
  53. package/chunks/{geminiContentGenerator-CR2WGARL.js → geminiContentGenerator-I4H2NLJG.js} +4 -4
  54. package/chunks/{glob-5V32KOG5.js → glob-OLCX57MD.js} +22 -16
  55. package/chunks/{grep-PUTEPBR4.js → grep-7HXIMDOW.js} +22 -16
  56. package/chunks/{ja-NFZ32AB3.js → ja-TGPZSP2B.js} +48 -1
  57. package/chunks/{keychain-token-storage-UHGOCDD6.js → keychain-token-storage-LB46DAEK.js} +2 -2
  58. package/chunks/{ls-34DLNYCD.js → ls-6PEZUK6O.js} +3 -3
  59. package/chunks/{lsp-NCDEHH3V.js → lsp-JZSJOVT7.js} +2 -2
  60. package/chunks/{monitor-EJBR5VCR.js → monitor-SQO7MVAV.js} +22 -16
  61. package/chunks/{notebook-edit-DZHGPP2L.js → notebook-edit-72L3EBAL.js} +23 -17
  62. package/chunks/{openaiContentGenerator-4QNV3CHM.js → openaiContentGenerator-FTR7CDWF.js} +12 -11
  63. package/chunks/{pt-BR43FRBA.js → pt-TIBG6BIO.js} +48 -1
  64. package/chunks/{qwenContentGenerator-3XOCEMQO.js → qwenContentGenerator-U5UFQ566.js} +24 -18
  65. package/chunks/{qwenOAuth2-KRJT35QH.js → qwenOAuth2-EFSECGHF.js} +4 -4
  66. package/chunks/{read-file-VZ2SQQIX.js → read-file-UA64EEQC.js} +8 -8
  67. package/chunks/{ripGrep-SBIZCPOL.js → ripGrep-WSYCWZVK.js} +22 -16
  68. package/chunks/{ru-DQCW2KHD.js → ru-JBCHCK4L.js} +48 -1
  69. package/chunks/{scheduler-H32DZVDV.js → scheduler-VBASHOCA.js} +22 -16
  70. package/chunks/send-message-OYJZ5TPG.js +244 -0
  71. package/chunks/{serve-56G4B5W6.js → serve-A7E2OJDR.js} +45 -36
  72. package/chunks/{shell-Q77KNP4N.js → shell-3NFOT6F5.js} +22 -16
  73. package/chunks/{skill-CLWFJYBG.js → skill-RA5YUREY.js} +10 -10
  74. package/chunks/{src-47L2LUOU.js → src-NFCMARMT.js} +182 -23
  75. package/chunks/{syntheticOutput-T5SWX3YF.js → syntheticOutput-DETQ2YM6.js} +3 -3
  76. package/chunks/task-create-Y3ZKTJIG.js +19 -0
  77. package/chunks/task-list-ONXJ3I3A.js +151 -0
  78. package/chunks/{task-stop-3VHAQMYM.js → task-stop-UHDC4N5B.js} +2 -2
  79. package/chunks/task-update-TCNOU3P5.js +397 -0
  80. package/chunks/team-create-6SR4OVRG.js +313 -0
  81. package/chunks/team-delete-EJ4U4DDP.js +114 -0
  82. package/chunks/{todoWrite-EAGJGKO5.js → todoWrite-TEYDRS5L.js} +4 -4
  83. package/chunks/{tool-search-Q75AYDTP.js → tool-search-OD435A3X.js} +8 -8
  84. package/chunks/{web-fetch-SS6IKK6N.js → web-fetch-6W67H5PO.js} +4 -4
  85. package/chunks/workflow-62DHH4EO.js +708 -0
  86. package/chunks/{write-file-RENGC25N.js → write-file-475L5OPP.js} +23 -17
  87. package/chunks/{zh-TW-IQZ4AD5M.js → zh-TW-G3HFHVVT.js} +74 -6
  88. package/chunks/{zh-6VFXOAR5.js → zh-VCLWO26Y.js} +77 -6
  89. package/cli.js +6417 -3115
  90. package/examples/agent/qwen-extension.json +1 -0
  91. package/examples/commands/qwen-extension.json +1 -0
  92. package/examples/context/qwen-extension.json +1 -0
  93. package/examples/mcp-server/qwen-extension.json +1 -0
  94. package/examples/skills/qwen-extension.json +1 -0
  95. package/locales/ca.js +51 -0
  96. package/locales/de.js +51 -0
  97. package/locales/en.js +83 -2
  98. package/locales/fr.js +53 -2
  99. package/locales/ja.js +52 -2
  100. package/locales/pt.js +52 -2
  101. package/locales/ru.js +53 -2
  102. package/locales/zh-TW.js +85 -11
  103. package/locales/zh.js +89 -11
  104. package/package.json +2 -2
  105. package/bundled/qc-helper/docs/features/checkpointing.md +0 -77
  106. package/chunks/contextCommand-YODJQYIV.js +0 -46
  107. package/chunks/send-message-YYF56TS7.js +0 -151
@@ -0,0 +1,244 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ LEADER_NAME,
5
+ getAgentName,
6
+ isTeammate
7
+ } from "./chunk-LD2XBG6Z.js";
8
+ import {
9
+ BaseDeclarativeTool,
10
+ BaseToolInvocation,
11
+ ToolDisplayNames,
12
+ ToolNames
13
+ } from "./chunk-2ZTWI7KH.js";
14
+ import "./chunk-JXAZUMDW.js";
15
+ import "./chunk-WFVXF3OM.js";
16
+ import {
17
+ init_esbuild_shims
18
+ } from "./chunk-A4BMJM77.js";
19
+ import {
20
+ __name
21
+ } from "./chunk-J2S4EL5Y.js";
22
+
23
+ // packages/core/src/tools/send-message.ts
24
+ init_esbuild_shims();
25
+ var SendMessageInvocation = class extends BaseToolInvocation {
26
+ constructor(config, params) {
27
+ super(params);
28
+ this.config = config;
29
+ }
30
+ static {
31
+ __name(this, "SendMessageInvocation");
32
+ }
33
+ getDescription() {
34
+ if (this.params.task_id) {
35
+ return `Send message to task ${this.params.task_id}`;
36
+ }
37
+ const preview = this.params.summary ?? this.params.message.slice(0, 50);
38
+ return `Send to ${this.params.to}: ${preview}`;
39
+ }
40
+ /**
41
+ * Send-message routes free-form text into a running background task or a
42
+ * teammate, which will then execute it as a new instruction with full
43
+ * tool access. Treat it as a privileged sink — the L4 default must not be
44
+ * 'allow', because that would let the scheduler auto-approve in
45
+ * AUTO mode (where 'allow' short-circuits the classifier). 'ask' lets
46
+ * AUTO route through the classifier so the destination and message text
47
+ * can be inspected.
48
+ */
49
+ async getDefaultPermission() {
50
+ return "ask";
51
+ }
52
+ async execute(_signal) {
53
+ if (this.params.task_id) {
54
+ const registry = this.config.getBackgroundTaskRegistry();
55
+ const entry = registry.get(this.params.task_id);
56
+ if (!entry) {
57
+ return {
58
+ llmContent: `Error: No background task found with ID "${this.params.task_id}".`,
59
+ returnDisplay: "Task not found.",
60
+ error: {
61
+ message: `Task not found: ${this.params.task_id}`,
62
+ type: "send_message_not_found" /* SEND_MESSAGE_NOT_FOUND */
63
+ }
64
+ };
65
+ }
66
+ if (entry.status === "paused") {
67
+ const resumed = await this.config.resumeBackgroundAgent(
68
+ this.params.task_id,
69
+ this.params.message
70
+ );
71
+ if (!resumed) {
72
+ return {
73
+ llmContent: `Error: Background task "${this.params.task_id}" could not be resumed.`,
74
+ returnDisplay: "Task could not be resumed.",
75
+ error: {
76
+ message: `Task could not be resumed: ${this.params.task_id}`,
77
+ type: "send_message_not_running" /* SEND_MESSAGE_NOT_RUNNING */
78
+ }
79
+ };
80
+ }
81
+ return {
82
+ llmContent: `Background task "${this.params.task_id}" resumed with your message as the first continuation instruction.`,
83
+ returnDisplay: `Resumed ${entry.description}`
84
+ };
85
+ }
86
+ if (entry.status !== "running") {
87
+ return {
88
+ llmContent: `Error: Background task "${this.params.task_id}" is not running (status: ${entry.status}). Cannot send messages to stopped tasks.`,
89
+ returnDisplay: `Task not running (${entry.status}).`,
90
+ error: {
91
+ message: `Task is ${entry.status}: ${this.params.task_id}`,
92
+ type: "send_message_not_running" /* SEND_MESSAGE_NOT_RUNNING */
93
+ }
94
+ };
95
+ }
96
+ registry.queueMessage(this.params.task_id, this.params.message);
97
+ return {
98
+ llmContent: `Message queued for delivery to background task "${this.params.task_id}". The task will receive it at the next tool-round boundary.`,
99
+ returnDisplay: `Message queued for ${entry.description}`
100
+ };
101
+ }
102
+ const teamManager = this.config.getTeamManager();
103
+ if (!teamManager) {
104
+ const msg = "No active team and no task_id provided. Either create a team first, or pass `task_id` to message a background task.";
105
+ return {
106
+ llmContent: msg,
107
+ returnDisplay: msg,
108
+ error: { message: msg }
109
+ };
110
+ }
111
+ const to = this.params.to;
112
+ if (!to) {
113
+ const msg = 'Recipient "to" is required.';
114
+ return {
115
+ llmContent: msg,
116
+ returnDisplay: msg,
117
+ error: { message: msg }
118
+ };
119
+ }
120
+ try {
121
+ if (this.params.type === "shutdown_request") {
122
+ if (isTeammate()) {
123
+ const msg3 = "Only the team leader can request shutdowns.";
124
+ return {
125
+ llmContent: msg3,
126
+ returnDisplay: msg3,
127
+ error: { message: msg3 }
128
+ };
129
+ }
130
+ await teamManager.requestShutdown(to);
131
+ const msg2 = `Shutdown requested for "${to}".`;
132
+ return { llmContent: msg2, returnDisplay: msg2 };
133
+ }
134
+ if (to === "*") {
135
+ const sender = getAgentName() ?? LEADER_NAME;
136
+ await teamManager.broadcast(this.params.message, sender);
137
+ const msg2 = "Message broadcast to all teammates.";
138
+ return { llmContent: msg2, returnDisplay: msg2 };
139
+ }
140
+ await teamManager.sendMessage(
141
+ to,
142
+ this.params.message,
143
+ getAgentName() ?? LEADER_NAME,
144
+ this.params.summary
145
+ );
146
+ const msg = `Message sent to "${to}".`;
147
+ return { llmContent: msg, returnDisplay: msg };
148
+ } catch (error) {
149
+ const errMsg = error instanceof Error ? error.message : String(error);
150
+ return {
151
+ llmContent: `Failed to send message: ${errMsg}`,
152
+ returnDisplay: `Failed to send message: ${errMsg}`,
153
+ error: { message: errMsg }
154
+ };
155
+ }
156
+ }
157
+ };
158
+ var SendMessageTool = class _SendMessageTool extends BaseDeclarativeTool {
159
+ constructor(config) {
160
+ super(
161
+ _SendMessageTool.Name,
162
+ ToolDisplayNames.SEND_MESSAGE,
163
+ 'Send a message to a teammate (use "to") or to a running background task (use "task_id"). For teams, set "to" to a bare teammate name (no @) or "*" to broadcast. For background tasks, set "task_id" to the id from the launch response or a recovered paused task. Running tasks receive it at the next tool-round boundary; paused recovered tasks are resumed with the message as their first continuation instruction. Your text output is NOT visible to other agents \u2014 use this tool to communicate.',
164
+ "other" /* Other */,
165
+ {
166
+ type: "object",
167
+ properties: {
168
+ to: {
169
+ type: "string",
170
+ description: 'Recipient teammate name, or "*" for broadcast.'
171
+ },
172
+ task_id: {
173
+ type: "string",
174
+ description: "The ID of the background task (from the launch response or a recovered paused task)."
175
+ },
176
+ message: {
177
+ type: "string",
178
+ description: "Message text to send.",
179
+ // Cap message size so a teammate can't grow the
180
+ // recipient's inbox file unboundedly with a single send.
181
+ maxLength: 65536
182
+ },
183
+ summary: {
184
+ type: "string",
185
+ description: "Optional 5-10 word summary for UI display."
186
+ },
187
+ type: {
188
+ type: "string",
189
+ enum: ["shutdown_request"],
190
+ description: "Structured message type for control flow. When set, routes through the mailbox instead of plain text delivery."
191
+ }
192
+ },
193
+ required: ["message"],
194
+ // Either a teammate recipient (`to`) or a background-task
195
+ // (`task_id`) must be specified — they correspond to the
196
+ // two routing modes. Letting the model send `{message}`
197
+ // alone wastes a round-trip on the runtime "Recipient is
198
+ // required" error.
199
+ oneOf: [{ required: ["to"] }, { required: ["task_id"] }],
200
+ additionalProperties: false
201
+ },
202
+ true,
203
+ // isOutputMarkdown
204
+ false,
205
+ // canUpdateOutput
206
+ true,
207
+ // shouldDefer — sending messages is infrequent
208
+ false,
209
+ // alwaysLoad
210
+ "send message task teammate team communicate notify"
211
+ );
212
+ this.config = config;
213
+ }
214
+ static {
215
+ __name(this, "SendMessageTool");
216
+ }
217
+ static Name = ToolNames.SEND_MESSAGE;
218
+ createInvocation(params) {
219
+ return new SendMessageInvocation(this.config, params);
220
+ }
221
+ /**
222
+ * Forward the routing fields and the message verbatim to the classifier —
223
+ * `to`/`task_id` identify the privileged sink and the `message` itself is
224
+ * the new instruction the recipient will execute, so the classifier needs
225
+ * the full text to evaluate the action's safety. `type` surfaces control
226
+ * messages (e.g. shutdown_request).
227
+ */
228
+ toAutoClassifierInput(params) {
229
+ return {
230
+ to: params.to,
231
+ task_id: params.task_id,
232
+ message: params.message,
233
+ type: params.type
234
+ };
235
+ }
236
+ };
237
+ export {
238
+ SendMessageTool
239
+ };
240
+ /**
241
+ * @license
242
+ * Copyright 2025 Qwen
243
+ * SPDX-License-Identifier: Apache-2.0
244
+ */
@@ -29,16 +29,16 @@ import {
29
29
  getNpmVersion,
30
30
  loadSettings,
31
31
  mapDomainErrorToErrorKind
32
- } from "./chunk-ZW7GBCRE.js";
32
+ } from "./chunk-HXJE7VOG.js";
33
+ import {
34
+ writeStderrLine,
35
+ writeStdoutLine
36
+ } from "./chunk-7YKXFA3D.js";
33
37
  import {
34
38
  ClientSideConnection,
35
39
  PROTOCOL_VERSION,
36
40
  ndJsonStream
37
41
  } from "./chunk-UFC57OYT.js";
38
- import {
39
- writeStderrLine,
40
- writeStdoutLine
41
- } from "./chunk-NQZ33PWX.js";
42
42
  import {
43
43
  APPROVAL_MODES,
44
44
  BuiltinAgentRegistry,
@@ -56,16 +56,22 @@ import {
56
56
  loadIgnoreRules,
57
57
  require_once,
58
58
  writeWorkspaceContextFile
59
- } from "./chunk-6KH2Q7XN.js";
59
+ } from "./chunk-QCG6KPNM.js";
60
60
  import "./chunk-K5PGHDBN.js";
61
+ import "./chunk-SKBPNJEW.js";
61
62
  import "./chunk-O4PICXES.js";
62
63
  import "./chunk-TW522KN6.js";
64
+ import "./chunk-AJIR24J2.js";
65
+ import "./chunk-HGJPQK33.js";
66
+ import "./chunk-XBFVXFB2.js";
63
67
  import "./chunk-MLZQVCF3.js";
64
- import "./chunk-SCHRFI7O.js";
65
- import "./chunk-PLYZAP4W.js";
66
- import "./chunk-UABFCMPA.js";
68
+ import "./chunk-PAEBHDIO.js";
69
+ import "./chunk-LD2XBG6Z.js";
70
+ import "./chunk-ICOI4E4S.js";
71
+ import "./chunk-KC6ZMJ5X.js";
67
72
  import "./chunk-77WXWU44.js";
68
- import "./chunk-6VFG3EUJ.js";
73
+ import "./chunk-JUGRPQAB.js";
74
+ import "./chunk-64WXLC72.js";
69
75
  import {
70
76
  decodeBufferWithEncodingInfo,
71
77
  getAllGeminiMdFilenames,
@@ -73,14 +79,14 @@ import {
73
79
  isBinaryFile,
74
80
  isWithinRoot,
75
81
  require_safer
76
- } from "./chunk-F6FLCHCS.js";
82
+ } from "./chunk-ZK4AMNIU.js";
77
83
  import "./chunk-3PJXIDKI.js";
78
84
  import "./chunk-UWCTAVOD.js";
79
85
  import "./chunk-OFEVLU4C.js";
80
- import "./chunk-AVLOK27J.js";
81
- import "./chunk-JSYEZAYV.js";
82
- import "./chunk-5RNZ2QKF.js";
83
- import "./chunk-G763GDO6.js";
86
+ import "./chunk-JVQOQ3OU.js";
87
+ import "./chunk-P4J26VDS.js";
88
+ import "./chunk-CNSMKPK6.js";
89
+ import "./chunk-2ZTWI7KH.js";
84
90
  import {
85
91
  QwenOAuth2Client,
86
92
  QwenOAuthPollError,
@@ -89,20 +95,20 @@ import {
89
95
  isDeviceAuthorizationSuccess,
90
96
  isDeviceTokenPending,
91
97
  isDeviceTokenSuccess
92
- } from "./chunk-JMLIPZUU.js";
93
- import "./chunk-GBEPNWYB.js";
94
- import "./chunk-F5ORN4YO.js";
98
+ } from "./chunk-MVIVIPCU.js";
99
+ import "./chunk-GX7VH5JQ.js";
100
+ import "./chunk-UAMOBVVW.js";
95
101
  import {
96
102
  detectRuntime,
97
103
  redactProxyCredentials
98
- } from "./chunk-MVX64PNU.js";
99
- import "./chunk-D46KOV3C.js";
104
+ } from "./chunk-LR62TEET.js";
105
+ import "./chunk-Y7R6H6FT.js";
100
106
  import "./chunk-BNESGOSJ.js";
101
107
  import "./chunk-SZOEIL6S.js";
102
108
  import "./chunk-5IFG2VC4.js";
103
109
  import {
104
110
  Storage
105
- } from "./chunk-R5PDRHEF.js";
111
+ } from "./chunk-JXAZUMDW.js";
106
112
  import "./chunk-ZERZSAZL.js";
107
113
  import {
108
114
  require_src
@@ -17463,24 +17469,24 @@ var BridgeClient = class {
17463
17469
  */
17464
17470
  inFlightRestoreIds = /* @__PURE__ */ new Set();
17465
17471
  /**
17466
- * PR 14b: handle child→bridge ACP `extNotification` calls. Only one
17467
- * method is recognized today — `qwen/notify/session/mcp-budget-event`
17468
- * — translating the McpClientManager's budget-event payload into a
17469
- * session-scoped SSE frame. Unknown methods, unknown event kinds,
17470
- * and missing sessionIds are dropped silently for forward-compat
17471
- * (a future child can add new notification methods without breaking
17472
- * this handler; an older daemon can ignore them cleanly).
17473
- *
17474
- * Codex review fix #1: when the sessionId IS present but the
17475
- * `byId`-resolvable entry is not yet registered (the child fired
17476
- * the event during its own `newSession` handler, before
17477
- * `connection.newSession` returned to `doSpawn`), buffer the frame
17478
- * and replay it on `drainEarlyEvents`.
17472
+ * Handle child→bridge ACP `extNotification` calls and translate them into
17473
+ * session-scoped SSE frames.
17479
17474
  */
17480
17475
  async extNotification(method, params) {
17481
- if (method !== "qwen/notify/session/mcp-budget-event") return;
17482
17476
  const sessionId = params["sessionId"];
17483
17477
  if (typeof sessionId !== "string") return;
17478
+ if (method === "qwen/notify/session/terminal-sequence") {
17479
+ const { v: _v2, sessionId: _sid2, ...tsRest } = params;
17480
+ void _v2;
17481
+ void _sid2;
17482
+ const terminalSequence = tsRest["terminalSequence"];
17483
+ if (typeof terminalSequence !== "string" || terminalSequence.length === 0) {
17484
+ return;
17485
+ }
17486
+ this.publishExtNotification(sessionId, "terminal_sequence", tsRest);
17487
+ return;
17488
+ }
17489
+ if (method !== "qwen/notify/session/mcp-budget-event") return;
17484
17490
  const kind = params["kind"];
17485
17491
  const type = kind === "budget_warning" ? "mcp_budget_warning" : kind === "refused_batch" ? "mcp_child_refused_batch" : void 0;
17486
17492
  if (!type) return;
@@ -17488,10 +17494,13 @@ var BridgeClient = class {
17488
17494
  void _v;
17489
17495
  void _sid;
17490
17496
  void _kind;
17497
+ this.publishExtNotification(sessionId, type, rest);
17498
+ }
17499
+ publishExtNotification(sessionId, type, data) {
17491
17500
  const entry = this.resolveEntry(sessionId);
17492
17501
  const frame = {
17493
17502
  type,
17494
- data: rest,
17503
+ data,
17495
17504
  ...entry?.activePromptOriginatorClientId ? { originatorClientId: entry.activePromptOriginatorClientId } : {}
17496
17505
  };
17497
17506
  if (entry) {
@@ -7,33 +7,39 @@ import {
7
7
  buildLongRunningForegroundHint,
8
8
  detectBlockedSleepPattern,
9
9
  parseNumstat
10
- } from "./chunk-6KH2Q7XN.js";
10
+ } from "./chunk-QCG6KPNM.js";
11
11
  import "./chunk-K5PGHDBN.js";
12
+ import "./chunk-SKBPNJEW.js";
12
13
  import "./chunk-O4PICXES.js";
13
14
  import "./chunk-TW522KN6.js";
15
+ import "./chunk-AJIR24J2.js";
16
+ import "./chunk-HGJPQK33.js";
17
+ import "./chunk-XBFVXFB2.js";
14
18
  import "./chunk-MLZQVCF3.js";
15
- import "./chunk-SCHRFI7O.js";
16
- import "./chunk-PLYZAP4W.js";
17
- import "./chunk-UABFCMPA.js";
19
+ import "./chunk-PAEBHDIO.js";
20
+ import "./chunk-LD2XBG6Z.js";
21
+ import "./chunk-ICOI4E4S.js";
22
+ import "./chunk-KC6ZMJ5X.js";
18
23
  import "./chunk-77WXWU44.js";
19
- import "./chunk-6VFG3EUJ.js";
20
- import "./chunk-F6FLCHCS.js";
24
+ import "./chunk-JUGRPQAB.js";
25
+ import "./chunk-64WXLC72.js";
26
+ import "./chunk-ZK4AMNIU.js";
21
27
  import "./chunk-3PJXIDKI.js";
22
28
  import "./chunk-UWCTAVOD.js";
23
29
  import "./chunk-OFEVLU4C.js";
24
- import "./chunk-AVLOK27J.js";
25
- import "./chunk-JSYEZAYV.js";
26
- import "./chunk-5RNZ2QKF.js";
27
- import "./chunk-G763GDO6.js";
28
- import "./chunk-JMLIPZUU.js";
29
- import "./chunk-GBEPNWYB.js";
30
- import "./chunk-F5ORN4YO.js";
31
- import "./chunk-MVX64PNU.js";
32
- import "./chunk-D46KOV3C.js";
30
+ import "./chunk-JVQOQ3OU.js";
31
+ import "./chunk-P4J26VDS.js";
32
+ import "./chunk-CNSMKPK6.js";
33
+ import "./chunk-2ZTWI7KH.js";
34
+ import "./chunk-MVIVIPCU.js";
35
+ import "./chunk-GX7VH5JQ.js";
36
+ import "./chunk-UAMOBVVW.js";
37
+ import "./chunk-LR62TEET.js";
38
+ import "./chunk-Y7R6H6FT.js";
33
39
  import "./chunk-BNESGOSJ.js";
34
40
  import "./chunk-SZOEIL6S.js";
35
41
  import "./chunk-5IFG2VC4.js";
36
- import "./chunk-R5PDRHEF.js";
42
+ import "./chunk-JXAZUMDW.js";
37
43
  import "./chunk-ZERZSAZL.js";
38
44
  import "./chunk-QN5NZ3UQ.js";
39
45
  import "./chunk-BR4QREVK.js";
@@ -5,32 +5,32 @@ import {
5
5
  buildSkillLlmContent,
6
6
  escapeXml,
7
7
  registerSkillHooks
8
- } from "./chunk-PLYZAP4W.js";
9
- import "./chunk-UABFCMPA.js";
8
+ } from "./chunk-ICOI4E4S.js";
9
+ import "./chunk-KC6ZMJ5X.js";
10
10
  import {
11
11
  SkillLaunchEvent,
12
12
  logSkillLaunch
13
- } from "./chunk-F6FLCHCS.js";
13
+ } from "./chunk-ZK4AMNIU.js";
14
14
  import "./chunk-3PJXIDKI.js";
15
15
  import "./chunk-UWCTAVOD.js";
16
16
  import "./chunk-OFEVLU4C.js";
17
- import "./chunk-AVLOK27J.js";
18
- import "./chunk-JSYEZAYV.js";
19
- import "./chunk-5RNZ2QKF.js";
17
+ import "./chunk-JVQOQ3OU.js";
18
+ import "./chunk-P4J26VDS.js";
19
+ import "./chunk-CNSMKPK6.js";
20
20
  import {
21
21
  BaseDeclarativeTool,
22
22
  BaseToolInvocation,
23
23
  ToolDisplayNames,
24
24
  ToolNames
25
- } from "./chunk-G763GDO6.js";
26
- import "./chunk-F5ORN4YO.js";
27
- import "./chunk-D46KOV3C.js";
25
+ } from "./chunk-2ZTWI7KH.js";
26
+ import "./chunk-UAMOBVVW.js";
27
+ import "./chunk-Y7R6H6FT.js";
28
28
  import "./chunk-BNESGOSJ.js";
29
29
  import "./chunk-SZOEIL6S.js";
30
30
  import "./chunk-5IFG2VC4.js";
31
31
  import {
32
32
  createDebugLogger
33
- } from "./chunk-R5PDRHEF.js";
33
+ } from "./chunk-JXAZUMDW.js";
34
34
  import "./chunk-ZERZSAZL.js";
35
35
  import "./chunk-QN5NZ3UQ.js";
36
36
  import "./chunk-BR4QREVK.js";