Commit graph

18 commits

Author SHA1 Message Date
github-actions[bot]
f96d089727 chore(release): v0.14.4-preview.1 2026-04-15 00:28:59 +00:00
tanzhenxin
8d34d33246
chore: bump version to 0.14.4 (#3209)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-13 18:15:54 +08:00
易良
55bcec70d0
chore: bump version to 0.14.3 (#3112)
Some checks are pending
Qwen Code CI / Lint (push) Waiting to run
Qwen Code CI / Test (push) Blocked by required conditions
Qwen Code CI / Test-1 (push) Blocked by required conditions
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
Qwen Code CI / Test-4 (push) Blocked by required conditions
Qwen Code CI / Test-5 (push) Blocked by required conditions
Qwen Code CI / Test-6 (push) Blocked by required conditions
Qwen Code CI / Test-7 (push) Blocked by required conditions
Qwen Code CI / Test-8 (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
Qwen Code CI / CodeQL (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
2026-04-10 21:08:34 +08:00
易良
f296eb1a6d
fix(release): run release:version 0.14.2 to sync all package versions (#3026)
The previous version bump commit (bb4376c) only updated the root
package.json but did not run `npm run release:version` to propagate
the version and sandboxImageUri to all workspace packages.

This caused Docker sandbox integration tests to fail in CI with
"manifest unknown" because build_sandbox.js built image 0.14.1
(from packages/cli/package.json) while sandboxConfig.ts expected
image 0.14.2 (from root package.json).

Fixes: https://github.com/QwenLM/qwen-code/actions/runs/24135197272/job/70424966323
2026-04-08 21:33:40 +08:00
tanzhenxin
47fac88695 chore: bump version to 0.14.1
Bump version across all packages from 0.14.0 to 0.14.1.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-03 16:17:10 +08:00
tanzhenxin
555f92ff21 chore(release): bump version to 0.14.0
- Update all packages from 0.13.x to 0.14.0
- Update sandbox image URI to 0.14.0

This prepares the 0.14.0 release with updated version numbers
across all workspace packages.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-01 19:23:49 +08:00
tanzhenxin
7bbd5e6471 fix(channels): address PR review — security, bugs, and reliability
- fix: sanitize remote filenames with basename() and isolate uploads
  in UUID subdirs to prevent path traversal and collision (#2-4, #27)
- fix: use crypto.randomInt() for pairing codes instead of Math.random() (#5)
- fix: pass config.sessionScope instead of hardcoded 'user' (#6);
  add per-channel scope overrides via setChannelScope() for startAll (#7)
- fix: removeSession now returns removed session IDs and persists
  when chatId is provided (#8)
- fix: /clear only removes the cleared session from instructedSessions,
  not all sessions (#9)
- fix: DingTalk @mention stripping now removes only the first mention
  instead of all mentions (#10)
- fix: remove dead TELEGRAF_COMMANDS Set and its guard (#13)
- fix: WeChat cursor saved after message processing, not before (#14)
- fix: crash recovery uses time-window counting instead of resettable
  counter to prevent infinite restart loops (#17)
- fix: call channel.disconnect() before exit on crash exhaustion (#18)
2026-03-31 00:57:59 +00:00
tanzhenxin
7251da0152 feat(channels): add dispatch modes and prompt lifecycle hooks
Add three dispatch modes for handling concurrent messages:
- steer (default): cancel current prompt and start new one
- collect: buffer messages and coalesce into follow-up prompt
- followup: queue messages for sequential processing

Introduce onPromptStart/onPromptEnd lifecycle hooks for working
indicators. These fire only when a prompt actually begins processing,
not for buffered (collect mode) or gated/blocked messages.

Refactor Telegram, WeChat, and DingTalk adapters to use the new hooks
instead of overriding handleInbound, simplifying the working indicator
pattern and ensuring correct behavior with dispatch modes.

This enables better UX for async workflows and prevents indicator
leaks when messages are buffered or cancelled.
2026-03-28 06:19:02 +00:00
tanzhenxin
d84675e86f test(channels): add comprehensive test suites for channel adapters
- Add ChannelBase, GroupGate, SenderGate, SessionRouter tests
- Add DingTalk markdown utility tests
- Add Weixin media and send helper tests
- Add CLI channel config-utils and pidfile tests
- Configure vitest for all channel packages
- Exclude test files from TypeScript build

Tests cover attachment handling, block streaming, gating policies,
session routing, markdown conversion, config parsing, and service management.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 15:26:39 +00:00
tanzhenxin
3e0f213ea3 feat(channels): add structured attachment support for file handling
- Add Attachment interface with type, data, filePath, mimeType, fileName
- Resolve attachments in ChannelBase before prompting bridge
- Update DingTalk, Telegram, Weixin adapters to use structured attachments
- Clean up placeholder text when files are received
- Export Attachment type from base package index

This enables proper handling of images and files across all channels,
separating attachment metadata from message text.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 14:50:24 +00:00
tanzhenxin
dea144918b feat(channels): configure channel adapters for compiled distribution
- Update package.json exports to point to dist directory
- Add TypeScript build scripts to each channel adapter
- Include channel adapters in build order

This enables proper TypeScript compilation and distribution of channel
adapter packages.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 08:46:54 +00:00
tanzhenxin
a700ce8186 chore(release): add channel packages to release workflow
- Bump channel package versions to 0.13.0
- Add publish steps for @qwen-code/channel-base and @qwen-code/channel-plugin-example
- Update version script to convert file: references to semver for published packages

This enables proper npm publishing of channel packages during the release process.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 06:16:22 +00:00
tanzhenxin
8a6ed128ea feat(channels): add ChannelPlugin interface and registry-based factory
Refactor channel system to use a formal plugin interface:

- Add ChannelPlugin interface to @qwen-code/channel-base (channelType,
  displayName, requiredConfigFields, createChannel factory)
- Each built-in adapter (Telegram, WeChat, DingTalk) exports a plugin object
- Replace hardcoded if/else factory with a Map-based channel registry
- Config validation now uses plugin's requiredConfigFields dynamically
- ChannelType changed from fixed union to string for extensibility
- Multi-channel mode now picks model from first channel config

This is the foundation for external plugin support — built-in channels
go through the exact same code path that third-party plugins will use.
2026-03-26 12:34:31 +00:00
tanzhenxin
9f4dd53198 feat(channels): add DingTalk reply/quote message context support
- Add interfaces for DingTalkRepliedMsg and DingTalkRichTextPart types
- Support both newer text.repliedMsg and legacy quoteMessage formats
- Extract quoted message context with isReplyToBot detection
- Summarize replied content (text, richText, media placeholders)

This enables the bot to understand when users are replying to specific
messages and provides context about what message is being referenced.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-26 09:08:36 +00:00
tanzhenxin
a61189b232 feat(channels): add DingTalk media download support
- Handle richText, picture, file, audio, video message types
- Download media via DingTalk API two-step flow
- Attach images as base64, save other files to temp dir
- Add DingTalkMessageData interface for richer payloads

This enables the DingTalk channel to process media attachments
in incoming messages.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-26 08:49:56 +00:00
tanzhenxin
6c6057cf9c feat(channels): add DingTalk markdown normalization
- Convert tables to pipe-separated plain text (DingTalk doesn't render tables)
- Split long messages into chunks respecting ~3800 char limit
- Handle code fences across chunk boundaries
- Extract title from first markdown line for webhook payload

This ensures markdown content renders correctly in DingTalk's limited renderer.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-26 08:34:34 +00:00
tanzhenxin
217964b849 feat(channels): add reaction feedback and webhook caching for DingTalk
- Cache sessionWebhook by conversationId for reliable message routing
- Show 👀 reaction while processing messages, then recall it
- Use conversationId as chatId instead of webhook URL
- Fix rawData parsing for already-parsed message data

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-26 08:29:27 +00:00
tanzhenxin
92c54ff309 feat(channels): add DingTalk channel adapter
- Add @qwen-code/channel-dingtalk package with stream-based bot integration
- Support clientId/clientSecret authentication for DingTalk
- Add message deduplication and group chat mention handling
- Update ChannelConfig type to include dingtalk channel type

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-26 08:03:43 +00:00