@qwen-code/channel-qqbot 0.28.0 → 0.28.1-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,425 @@
1
+ /**
2
+ * QQ outbound media tools exposed to the agent as client MCP tools.
3
+ *
4
+ * The model calls one with a local path; the adapter owns the chat binding, the
5
+ * credentials and the platform upload. This module owns the schemas, the
6
+ * workspace path boundary, the format and size validation, and the text the
7
+ * model sees.
8
+ *
9
+ * The boundary is deliberately narrow: a path is only readable when it is an
10
+ * absolute path that resolves inside the session's workspace or the system
11
+ * temporary directory. Sending media is an outbound action with the bot's own
12
+ * identity, so it stays opt-in and its failures are reported, never silently
13
+ * downgraded to a text message or to a different message kind.
14
+ *
15
+ * @see https://bot.q.qq.com/wiki/develop/api-v2/server-inter/message/rich-media.html
16
+ */
17
+ import { closeSync, constants, existsSync, fstatSync, lstatSync, openSync, readlinkSync, readSync, realpathSync, } from 'node:fs';
18
+ import { tmpdir } from 'node:os';
19
+ import { basename, isAbsolute, sep } from 'node:path';
20
+ /** Platform hard limit is 200 MB; the repository's outbound-file convention is
21
+ * 20 MiB, which keeps the file in memory and the exposure bounded. */
22
+ export const QQ_OUTBOUND_FILE_MAX_BYTES = 20 * 1024 * 1024;
23
+ /** The media caps are the platform's decimal soft limits: a larger image, video,
24
+ * or voice upload is quietly downgraded by the platform to a file card, so the
25
+ * tool refuses it locally instead of reporting a different visible outcome. */
26
+ export const QQ_OUTBOUND_IMAGE_MAX_BYTES = 20_000_000;
27
+ export const QQ_OUTBOUND_VIDEO_MAX_BYTES = 30_000_000;
28
+ export const QQ_OUTBOUND_VOICE_MAX_BYTES = 20_000_000;
29
+ const MAX_FILE_NAME_CHARS = 100;
30
+ /** Sent when a name has nothing left after sanitization. */
31
+ const FALLBACK_FILE_DISPLAY_NAME = 'file';
32
+ /** Tool names, also used by the adapter to prefix failures. */
33
+ export const QQ_MEDIA_TOOL_NAMES = {
34
+ file: 'qq_send_file',
35
+ image: 'qq_send_image',
36
+ video: 'qq_send_video',
37
+ voice: 'qq_send_voice',
38
+ };
39
+ const OUTBOUND_MAX_BYTES = {
40
+ file: QQ_OUTBOUND_FILE_MAX_BYTES,
41
+ image: QQ_OUTBOUND_IMAGE_MAX_BYTES,
42
+ video: QQ_OUTBOUND_VIDEO_MAX_BYTES,
43
+ voice: QQ_OUTBOUND_VOICE_MAX_BYTES,
44
+ };
45
+ /** A rejected path or file; the message is safe to show the model. */
46
+ export class QQOutboundFileError extends Error {
47
+ }
48
+ const PATH_PROPERTY = {
49
+ type: 'string',
50
+ description: 'Absolute path of the local file to send, inside the session workspace or the system temporary directory.',
51
+ };
52
+ const FILE_NAME_PROPERTY = {
53
+ type: 'string',
54
+ description: "Display name for the file. Defaults to the file's own name.",
55
+ };
56
+ const MEDIA_SPECS = [
57
+ {
58
+ kind: 'file',
59
+ noun: 'File',
60
+ description: `Send a local file to the current QQ chat, where it arrives as a file card the user can download. Use it when the user asks for a document, archive, spreadsheet or any other generated artifact, or when a file cannot be sent as an image, video or voice message. The path must be absolute and inside the session workspace or the system temporary directory; the file must be non-empty and at most ${QQ_OUTBOUND_FILE_MAX_BYTES / (1024 * 1024)} MiB.`,
61
+ },
62
+ {
63
+ kind: 'image',
64
+ noun: 'Image',
65
+ description: `Send a local PNG or JPEG image to the current QQ chat, where it is rendered as an image. Use it when the user asks for a picture, chart, screenshot or photo. The path must be absolute and inside the session workspace or the system temporary directory; the file must be a non-empty PNG or JPEG of at most ${QQ_OUTBOUND_IMAGE_MAX_BYTES / 1_000_000} MB. Use qq_send_file for an image in any other format, so it arrives as a downloadable file card.`,
66
+ },
67
+ {
68
+ kind: 'video',
69
+ noun: 'Video',
70
+ description: `Send a local MP4 video to the current QQ chat, where it is rendered as a playable video. The path must be absolute and inside the session workspace or the system temporary directory; the file must be a non-empty MP4 of at most ${QQ_OUTBOUND_VIDEO_MAX_BYTES / 1_000_000} MB. Use qq_send_file for a video in any other format, so it arrives as a downloadable file card.`,
71
+ },
72
+ {
73
+ kind: 'voice',
74
+ noun: 'Voice',
75
+ description: `Send a local voice message to the current QQ chat, where it is rendered as a voice bar. The path must be absolute and inside the session workspace or the system temporary directory; the file must be a non-empty SILK, MP3, WAV or OGG recording of at most ${QQ_OUTBOUND_VOICE_MAX_BYTES / 1_000_000} MB. Use qq_send_file for audio in any other format, so it arrives as a downloadable file card.`,
76
+ },
77
+ ];
78
+ export function buildFileTools(deps) {
79
+ return MEDIA_SPECS.map((spec) => ({
80
+ name: QQ_MEDIA_TOOL_NAMES[spec.kind],
81
+ description: spec.description,
82
+ inputSchema: {
83
+ type: 'object',
84
+ properties: {
85
+ path: PATH_PROPERTY,
86
+ ...(spec.kind === 'file' ? { file_name: FILE_NAME_PROPERTY } : {}),
87
+ },
88
+ required: ['path'],
89
+ },
90
+ handler: makeHandler(deps, spec),
91
+ }));
92
+ }
93
+ function makeHandler(deps, spec) {
94
+ const toolName = QQ_MEDIA_TOOL_NAMES[spec.kind];
95
+ return async function handler(args, context) {
96
+ const fail = (text) => ({
97
+ text,
98
+ isError: true,
99
+ });
100
+ const chat = deps.resolveChat(context.sessionId);
101
+ if (!chat) {
102
+ return fail(`No QQ chat is bound to this session yet, so no ${spec.noun.toLowerCase()} can be sent.`);
103
+ }
104
+ let file;
105
+ try {
106
+ const requested = args['path'];
107
+ if (typeof requested !== 'string' || requested.trim() === '') {
108
+ throw new QQOutboundFileError('path is required.');
109
+ }
110
+ file = readOutboundFile(requested.trim(), deps.sessionCwd(context.sessionId), spec.kind);
111
+ }
112
+ catch (error) {
113
+ if (error instanceof QQOutboundFileError) {
114
+ return fail(`${toolName}: ${error.message}`);
115
+ }
116
+ throw error;
117
+ }
118
+ const requestedName = args['file_name'];
119
+ // The on-disk basename reaches the platform card and the tool result
120
+ // verbatim, so it is sanitized too — a file named with a bidi override
121
+ // spoofs the name the user reads exactly as an explicit `file_name` would.
122
+ // A name that sanitizes to nothing falls back to the sanitized basename and
123
+ // then to a fixed placeholder: falling back to the raw name would hand the
124
+ // platform the one string this function exists to reject.
125
+ const requestedDisplayName = spec.kind === 'file' &&
126
+ typeof requestedName === 'string' &&
127
+ requestedName.trim() !== ''
128
+ ? safeFileName(requestedName)
129
+ : '';
130
+ const fileName = requestedDisplayName ||
131
+ safeFileName(file.fileName) ||
132
+ FALLBACK_FILE_DISPLAY_NAME;
133
+ const result = await deps.sendMedia({
134
+ sessionId: context.sessionId,
135
+ chatId: chat.chatId,
136
+ kind: spec.kind,
137
+ fileName,
138
+ bytes: file.bytes,
139
+ });
140
+ if (!result.ok) {
141
+ deps.log(`${toolName} failed: ${result.message}`);
142
+ return fail(result.message);
143
+ }
144
+ deps.log(`${toolName} ok (${file.bytes.length} bytes)`);
145
+ return `${spec.noun} sent (${fileName}).`;
146
+ };
147
+ }
148
+ /**
149
+ * Read a file the model asked to send, refusing anything outside the session
150
+ * workspace or the temporary directory.
151
+ *
152
+ * `realpathSync` resolves symlinks before the root check, so a link inside the
153
+ * workspace cannot smuggle an outside file. The read-only open refuses a final
154
+ * component swapped to a symlink: `O_NOFOLLOW` where the platform exposes it,
155
+ * plus the `lstat` → `open` → `fstat` identity proof wherever no post-open
156
+ * descriptor path is available (macOS, Windows) — the same compensation
157
+ * `packages/core/src/utils/no-follow-open.ts` applies. Two further guards close
158
+ * the ways a path check alone is blind: a file with more than one hard link is
159
+ * refused (a hard link has no target to resolve, so the check would otherwise
160
+ * read the linked contents), and where the platform exposes `/proc/self/fd`
161
+ * (Linux) the path the kernel records for the descriptor is compared after
162
+ * opening, which catches a directory component swapped between the check and
163
+ * the open; a descriptor whose path cannot be read there is refused rather than
164
+ * trusted. Without procfs the requested path is resolved again after the open
165
+ * and re-checked against the roots, which narrows the same window. The identity
166
+ * proof and that re-resolution are best-effort against a same-user racer: a
167
+ * swap landing before the identity probe cannot be fully excluded with the
168
+ * primitives Node exposes (there is no `openat`-style descriptor-relative
169
+ * walk). The read is re-checked against `fstat` so a file rewritten mid-read is
170
+ * reported instead of sent truncated.
171
+ *
172
+ * `kind` picks the byte cap and the format the bytes must match. The sniff runs
173
+ * on the same descriptor that was already validated, so the bytes that were
174
+ * checked are the bytes that are uploaded.
175
+ */
176
+ export function readOutboundFile(filePath, workspaceDir, kind = 'file') {
177
+ if (!isAbsolute(filePath)) {
178
+ throw new QQOutboundFileError('path must be absolute.');
179
+ }
180
+ let resolved;
181
+ try {
182
+ resolved = realpathSync(filePath);
183
+ }
184
+ catch {
185
+ throw new QQOutboundFileError('the file does not exist.');
186
+ }
187
+ const roots = [];
188
+ for (const root of [workspaceDir, tmpdir()]) {
189
+ if (!root)
190
+ continue;
191
+ try {
192
+ roots.push(realpathSync(root));
193
+ }
194
+ catch {
195
+ // A missing workspace root simply contributes no allowed root.
196
+ }
197
+ }
198
+ if (!insideRoots(resolved, roots)) {
199
+ throw new QQOutboundFileError('the file is outside the session workspace and the temporary directory.');
200
+ }
201
+ const fd = openReadOnlyNoFollow(resolved);
202
+ try {
203
+ const before = fstatSync(fd);
204
+ if (!before.isFile()) {
205
+ throw new QQOutboundFileError('the path is not a regular file.');
206
+ }
207
+ if (before.nlink > 1) {
208
+ throw new QQOutboundFileError('the file has more than one hard link, so its contents are not tied to the workspace.');
209
+ }
210
+ const openedPath = descriptorPath(fd);
211
+ if (openedPath === 'unavailable') {
212
+ // No descriptor path to compare on this platform: resolve the requested
213
+ // name again after the open, so a component swapped in between lands
214
+ // outside the roots and is refused.
215
+ let reopened;
216
+ try {
217
+ reopened = realpathSync(filePath);
218
+ }
219
+ catch {
220
+ throw new QQOutboundFileError('the file could not be identified after opening.');
221
+ }
222
+ if (!insideRoots(reopened, roots)) {
223
+ throw new QQOutboundFileError('the file is outside the session workspace and the temporary directory.');
224
+ }
225
+ }
226
+ else if (!insideRoots(openedPath, roots)) {
227
+ throw new QQOutboundFileError('the file is outside the session workspace and the temporary directory.');
228
+ }
229
+ if (before.size === 0) {
230
+ throw new QQOutboundFileError('the file is empty.');
231
+ }
232
+ const maxBytes = OUTBOUND_MAX_BYTES[kind];
233
+ if (before.size > maxBytes) {
234
+ throw new QQOutboundFileError(`the file is larger than ${formatCap(kind, maxBytes)}.`);
235
+ }
236
+ const bytes = Buffer.alloc(before.size);
237
+ let read = 0;
238
+ while (read < bytes.length) {
239
+ const chunk = readSync(fd, bytes, read, bytes.length - read, read);
240
+ if (chunk === 0)
241
+ break;
242
+ read += chunk;
243
+ }
244
+ if (read !== bytes.length) {
245
+ throw new QQOutboundFileError('the file could not be read completely.');
246
+ }
247
+ const after = fstatSync(fd);
248
+ if (after.size !== before.size || after.mtimeMs !== before.mtimeMs) {
249
+ throw new QQOutboundFileError('the file changed while it was being read; try again.');
250
+ }
251
+ if (!matchesKind(kind, bytes)) {
252
+ throw new QQOutboundFileError(`the file is not ${FORMAT_TEXT[kind]}; use qq_send_file to send it as a file card.`);
253
+ }
254
+ return { bytes, fileName: basename(resolved) };
255
+ }
256
+ finally {
257
+ closeSync(fd);
258
+ }
259
+ }
260
+ const FORMAT_TEXT = {
261
+ file: 'a file',
262
+ image: 'a PNG or JPEG image',
263
+ video: 'an MP4 video',
264
+ voice: 'SILK, MP3, WAV or OGG audio',
265
+ };
266
+ function formatCap(kind, maxBytes) {
267
+ return kind === 'file'
268
+ ? `${maxBytes / (1024 * 1024)} MiB`
269
+ : `${maxBytes / 1_000_000} MB`;
270
+ }
271
+ /** Magic-byte check; the file name is model-supplied and decides nothing. */
272
+ function matchesKind(kind, bytes) {
273
+ switch (kind) {
274
+ case 'file':
275
+ return true;
276
+ case 'image':
277
+ return isPng(bytes) || isJpeg(bytes);
278
+ case 'video':
279
+ return isMp4(bytes);
280
+ case 'voice':
281
+ return isSilk(bytes) || isMp3(bytes) || isWav(bytes) || isOgg(bytes);
282
+ default:
283
+ return false;
284
+ }
285
+ }
286
+ function hasAscii(bytes, offset, text) {
287
+ return (bytes.length >= offset + text.length &&
288
+ bytes.toString('latin1', offset, offset + text.length) === text);
289
+ }
290
+ function isPng(bytes) {
291
+ return bytes.length >= 8 && bytes[0] === 0x89 && hasAscii(bytes, 1, 'PNG');
292
+ }
293
+ function isJpeg(bytes) {
294
+ return (bytes.length >= 3 &&
295
+ bytes[0] === 0xff &&
296
+ bytes[1] === 0xd8 &&
297
+ bytes[2] === 0xff);
298
+ }
299
+ function isMp4(bytes) {
300
+ return hasAscii(bytes, 4, 'ftyp');
301
+ }
302
+ /** SILK v3 starts with `#!SILK_V3`, with a leading format byte in some files. */
303
+ function isSilk(bytes) {
304
+ return hasAscii(bytes, 0, '#!SILK_V3') || hasAscii(bytes, 1, '#!SILK_V3');
305
+ }
306
+ function isMp3(bytes) {
307
+ return (hasAscii(bytes, 0, 'ID3') ||
308
+ (bytes.length >= 2 && bytes[0] === 0xff && (bytes[1] & 0xe0) === 0xe0));
309
+ }
310
+ function isWav(bytes) {
311
+ return hasAscii(bytes, 0, 'RIFF') && hasAscii(bytes, 8, 'WAVE');
312
+ }
313
+ function isOgg(bytes) {
314
+ return hasAscii(bytes, 0, 'OggS');
315
+ }
316
+ /** Whether a resolved path is one of the allowed roots or below one. */
317
+ function insideRoots(path, roots) {
318
+ return roots.some((root) => path === root || path.startsWith(root.endsWith(sep) ? root : root + sep));
319
+ }
320
+ /**
321
+ * The path a descriptor actually points at, when the platform exposes one.
322
+ * `/proc/self/fd` is the Linux answer; elsewhere there is nothing to ask, so
323
+ * `'unavailable'` tells the caller to fall back to resolving the requested path
324
+ * again after the open.
325
+ *
326
+ * `readlinkSync` rather than `realpathSync` on purpose: `realpathSync` throws
327
+ * `ENOENT` once the opened name is unlinked (the kernel appends ` (deleted)` to
328
+ * the link target), which would turn the containment re-check into no check at
329
+ * the exact moment it matters. The recorded path is compared as the kernel
330
+ * reports it: `insideRoots` already accepts a descendant by prefix, so the
331
+ * suffix is harmless for a file under a root — while trimming it would collapse
332
+ * a sibling literally named `<root> (deleted)` onto the root and accept an
333
+ * outside file through the equality arm.
334
+ *
335
+ * Where procfs exists but the link cannot be read, the descriptor cannot be
336
+ * identified at all; that is a refusal, not a fallback to the weaker guard.
337
+ */
338
+ function descriptorPath(fd) {
339
+ try {
340
+ return readlinkSync(`/proc/self/fd/${fd}`);
341
+ }
342
+ catch {
343
+ if (!existsSync('/proc/self/fd'))
344
+ return 'unavailable';
345
+ throw new QQOutboundFileError('the file could not be identified after opening.');
346
+ }
347
+ }
348
+ /**
349
+ * Open a file read-only without following a symlink in the final component.
350
+ *
351
+ * `O_NOFOLLOW` carries that guarantee for the final component on POSIX, but it
352
+ * cannot see a directory component swapped for a symlink, so the flag is only
353
+ * trusted where the descriptor path is checked after the open (`/proc/self/fd`
354
+ * on Linux). Elsewhere — macOS, which has the flag but no procfs, and Windows,
355
+ * which has neither flag — the open is compensated by the identity proof
356
+ * `packages/core/src/utils/no-follow-open.ts` applies: refuse a symlink up
357
+ * front, then prove the opened handle still refers to the file that was checked
358
+ * (inode 0 means it never can be proven, so it is refused). The flag is still
359
+ * set where it exists, so a final-component swap is refused at the open itself
360
+ * too. The core helper is not a dependency of the channel packages, so this
361
+ * keeps the same posture locally.
362
+ *
363
+ * The proof is best-effort against a same-user racer: a swap that lands before
364
+ * the `lstat` makes both sides agree, and Node exposes no `openat`-style
365
+ * descriptor-relative walk to close that window completely.
366
+ */
367
+ function openReadOnlyNoFollow(filePath) {
368
+ const noFollow = constants.O_NOFOLLOW;
369
+ // The fast path is only sound when the descriptor path is checked after the
370
+ // open: `O_NOFOLLOW` guards the final component alone, so without that check
371
+ // a swapped directory component would go unseen.
372
+ const procfsAvailable = existsSync('/proc/self/fd');
373
+ if (typeof noFollow === 'number' && procfsAvailable) {
374
+ return openSync(filePath, constants.O_RDONLY | (constants.O_NONBLOCK ?? 0) | noFollow);
375
+ }
376
+ const flags = [
377
+ constants.O_RDONLY,
378
+ typeof noFollow === 'number' ? noFollow : undefined,
379
+ typeof constants.O_NONBLOCK === 'number' ? constants.O_NONBLOCK : undefined,
380
+ ].reduce((all, flag) => (flag === undefined ? all : all | flag), 0);
381
+ const before = lstatSync(filePath, { bigint: true });
382
+ if (before.isSymbolicLink()) {
383
+ throw new QQOutboundFileError('the file was replaced by a symlink before it was opened.');
384
+ }
385
+ if (before.ino === 0n) {
386
+ throw new QQOutboundFileError('the file identity cannot be verified on this filesystem.');
387
+ }
388
+ const fd = openSync(filePath, flags);
389
+ try {
390
+ const after = fstatSync(fd, { bigint: true });
391
+ if (before.dev !== after.dev || before.ino !== after.ino) {
392
+ throw new QQOutboundFileError('the file changed between the check and the open; try again.');
393
+ }
394
+ }
395
+ catch (error) {
396
+ closeSync(fd);
397
+ throw error;
398
+ }
399
+ return fd;
400
+ }
401
+ /**
402
+ * Characters that must not survive into a display name: format characters
403
+ * (`Cf`, which includes the bidi controls and the zero-width/soft-hyphen/tag
404
+ * set) make two byte-distinct names render identically or not at all, C0/C1
405
+ * controls and the line/paragraph separators are unprintable, a lone surrogate
406
+ * cannot be encoded, and the listed blank-rendering code points are invisible
407
+ * while belonging to other categories. Enumerated ranges miss code points
408
+ * (U+061C was one), so this names the properties instead. `Default_Ignorable`
409
+ * is deliberately not used: it includes VS16, which changes emoji rendering.
410
+ */
411
+ const UNSAFE_FILE_NAME_CHAR = /[\p{Cf}\p{Cc}\p{Zl}\p{Zp}\p{Cs}\u115F\u1160\u3164\uFFA0\u2800]/u;
412
+ /** The platform file name is model-supplied, so drop separators and controls. */
413
+ function safeFileName(name) {
414
+ let cleaned = '';
415
+ for (const char of name) {
416
+ if (char === '/' || char === '\\')
417
+ continue;
418
+ if (UNSAFE_FILE_NAME_CHAR.test(char))
419
+ continue;
420
+ cleaned += char;
421
+ }
422
+ // Slice by code point: a UTF-16 slice can cut a surrogate pair in half.
423
+ return [...cleaned.trim()].slice(0, MAX_FILE_NAME_CHARS).join('');
424
+ }
425
+ //# sourceMappingURL=file-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-tools.js","sourceRoot":"","sources":["../src/file-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,SAAS,EACT,S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;IAChC,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;QACxB,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,IAAI;YAAE,SAAS;QAC5C,IAAI,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,SAAS;QAC/C,OAAO,IAAI,IAAI,CAAC;IAClB,CAAC;IACD,wEAAwE;IACxE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,kBAAkB,QAAkB,CAAC;AAClD,eAAO,MAAM,kBAAkB,QAAmB,CAAC;AACnD,eAAO,MAAM,iBAAiB,QAAmB,CAAC;AAClD,eAAO,MAAM,kBAAkB,QAAmB,CAAC;AACnD,eAAO,MAAM,kBAAkB,IAAI,CAAC;AASpC,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpE,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,gBAAgB,GAAG,SAAS,CAe9B;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,mBAAmB,CAAC,EAAE,MAAM,GAC3B,OAAO,CAAC,sBAAsB,CAAC,CA+CjC"}
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,kBAAkB,QAAkB,CAAC;AAClD,eAAO,MAAM,kBAAkB,QAAmB,CAAC;AACnD,eAAO,MAAM,iBAAiB,QAAmB,CAAC;AAClD,eAAO,MAAM,kBAAkB,QAAmB,CAAC;AACnD,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAYpC,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpE,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,gBAAgB,GAAG,SAAS,CAe9B;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,mBAAmB,CAAC,EAAE,MAAM,GAC3B,OAAO,CAAC,sBAAsB,CAAC,CAkDjC"}
package/dist/media.js CHANGED
@@ -13,8 +13,11 @@ export const QQ_MAX_ATTACHMENTS = 5;
13
13
  * Hosts QQ serves attachments from. The allowlist is the SSRF guard, so an
14
14
  * unknown host is rejected rather than fetched. `qq.com.cn` is included
15
15
  * because the platform serves attachments from `multimedia.nt.qq.com.cn`.
16
+ * Converted voice WAVs come from the exact host `qqbot.ugcimg.cn`; other
17
+ * `ugcimg.cn` names stay rejected.
16
18
  */
17
19
  const ALLOWED_HOST_SUFFIXES = ['.qq.com', '.qq.com.cn'];
20
+ const ALLOWED_EXACT_HOSTS = ['qqbot.ugcimg.cn'];
18
21
  export function classifyQQAttachment(contentType) {
19
22
  switch (contentType) {
20
23
  case 'image/jpeg':
@@ -43,7 +46,9 @@ export async function downloadQQAttachment(url, maxBytes, declaredContentType) {
43
46
  throw new Error(`attachment URL must use https: ${parsed.protocol}`);
44
47
  }
45
48
  const host = parsed.hostname.toLowerCase();
46
- if (!ALLOWED_HOST_SUFFIXES.some((suffix) => host.endsWith(suffix))) {
49
+ const hostAllowed = ALLOWED_EXACT_HOSTS.includes(host) ||
50
+ ALLOWED_HOST_SUFFIXES.some((suffix) => host.endsWith(suffix));
51
+ if (!hostAllowed) {
47
52
  throw new Error(`attachment host not allowed: ${host}`);
48
53
  }
49
54
  const response = await fetch(url, {
package/dist/media.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"media.js","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAClD,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAClD,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAEpC;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AASxD,MAAM,UAAU,oBAAoB,CAClC,WAA+B;IAE/B,QAAQ,WAAW,EAAE,CAAC;QACpB,KAAK,YAAY,CAAC;QAClB,KAAK,WAAW,CAAC;QACjB,KAAK,WAAW;YACd,OAAO,OAAO,CAAC;QACjB,KAAK,WAAW;YACd,OAAO,OAAO,CAAC;QACjB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,GAAW,EACX,QAAgB,EAChB,mBAA4B;IAE5B,IAAI,MAAW,CAAC;IAChB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAAC,MAA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AM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC;IAC5B,MAAM,QAAQ,GAAG,mBAAmB,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC1E,IAAI,QAAQ,IAAI,CAAC,QAAQ,KAAK,WAAW,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;QAC5E,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,0BAA0B,CAAC;AACpC,CAAC;AAED,SAAS,cAAc,CAAC,IAAY;IAClC,IACE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;QAChB,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;QAChB,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;QAChB,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAChB,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC7D,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC7D,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/dist/types.d.ts CHANGED
@@ -122,6 +122,14 @@ export interface QQChannelConfig {
122
122
  * A non-integer or a value below -1 warns on stderr and falls back to `-1`.
123
123
  */
124
124
  moderationRecallWindowMs?: number;
125
+ /**
126
+ * Expose the outbound file tool (`qq_send_file`) to the agent in this
127
+ * channel's sessions. Default false: the tool lets the model hand a local
128
+ * file to QQ under the bot's own identity, so it stays off until the channel
129
+ * opts in. Only files inside the session workspace or the system temporary
130
+ * directory, non-empty and at most 20 MB, can be sent.
131
+ */
132
+ fileTools?: boolean;
125
133
  /** Max buffer chars before forcing an immediate flush (stream+cron). Default 4096. */
126
134
  bufferFlushLength?: number;
127
135
  /** Max reconnect attempts before giving up. Default 20. 0 = unlimited. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,MAAM;;;;;;;;;CAST,CAAC;AAEX,gCAAgC;AAChC,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAEX,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE;QACN,kEAAkE;QAClE,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,4DAA4D;QAC5D,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,0BAA0B;QAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,0CAA0C;QAC1C,GAAG,CAAC,EAAE,OAAO,CAAC;QACd,4DAA4D;QAC5D,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,4DAA4D;QAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACrC;AAED,yDAAy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G;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,sFAAsF;IACtF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,8BAA8B;AAC9B,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,kCAAkC;AAClC,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wCAAwC;AACxC,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/channel-qqbot",
3
- "version": "0.28.0",
3
+ "version": "0.28.1-preview.1",
4
4
  "description": "QQ Bot (QQ机器人) channel adapter for Qwen Code",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "dist"
21
21
  ],
22
22
  "dependencies": {
23
- "@qwen-code/channel-base": "0.28.0",
23
+ "@qwen-code/channel-base": "0.28.1-preview.1",
24
24
  "@tencent-connect/qqbot-connector": "^1.1.0",
25
25
  "ws": "^8.18.0"
26
26
  },