- Updated AuthDialog to handle multiple model IDs, allowing users to input and submit a comma-separated list.
- Adjusted related functions to process and validate multiple model IDs.
- Enhanced user feedback messages to reflect the changes in model ID handling.
Refactor subagent model configuration from nested modelConfig object to a simple model string field for better UX and clarity.
Changes:
- Replace modelConfig object with model string in SubagentConfig interface
- Add model-selection.ts utility for parsing and validating model selectors
- Support 'inherit' keyword and bare model IDs (e.g., 'glm-5', 'claude-sonnet-4-6')
- Maintain backward compatibility by parsing legacy modelConfig frontmatter
- Update validation to reject cross-provider authType-prefixed selectors
- Update SDK types (TypeScript and Java) to reflect new schema
- Add comprehensive tests for model selection and validation
- Update documentation with model selection examples
Breaking changes:
- modelConfig.frontmatter field deprecated in favor of model field
- Cross-provider model selectors (e.g., 'openai:gpt-4') not supported for subagents
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
When building diff content for edit-type permission requests, use
confirmation.filePath (full path) when available, falling back to
confirmation.fileName. This aligns with the test expectation and
ensures SubAgentTracker sends the correct file path in ACP permission
dialogs.
Verify that when PermissionManager.isToolEnabled resolves to false the
tool is never executed and no permission dialog is opened. This guards
against the async-await regression fixed in the previous commit.
PermissionManager.isToolEnabled was changed to async in this PR but the
call site in Session.runTool was not updated, causing the Promise to be
evaluated as a truthy value and the L1 tool-enablement check to always
pass — effectively disabling permission denial in the ACP session path.
- Add ExtensionChannelConfig interface for declaring channels in extension manifests
- Add loadChannelsFromExtensions() to discover and register channel plugins from active extensions
- Integrate extension channel loading into channel start commands
This enables extensions to contribute new channel types (e.g., Telegram, Slack) without modifying core code.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
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.
- 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>
- Add `qwen channel status` to check running service info
- Add `qwen channel stop` to gracefully stop the service
- Add PID file tracking to prevent duplicate service instances
- Update documentation with new commands and usage
This enables users to manage the channel service from another terminal
without needing to use Ctrl+C on the foreground process.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add session persistence to SessionRouter for crash recovery
- Add loadSession method to AcpBridge for restoring sessions
- Add ChannelBaseOptions to support external router injection
- Refactor start.ts to support both standalone and gateway modes
- Extract config utilities into separate module
This enables channels to recover sessions after bridge crashes and
supports running multiple channels under a gateway process.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
PR #2472 added SIGTERM/SIGINT handlers in runAcpAgent() that destroy
stdin/stdout streams, allowing the ACP connection to close. However,
it did not call runExitCleanup() to terminate child processes (MCP
servers, etc.) spawned by the CLI. This caused orphan subprocesses
to persist after the IDE disconnects, especially noticeable in VSCode
with multiple tabs.
Changes:
- acpAgent.ts: Call runExitCleanup() in the shutdown signal handler
before process.exit(0), ensuring MCP server subprocesses are killed
- gemini.tsx: Call runExitCleanup() + process.exit(0) after
runAcpAgent() returns normally, matching the cleanup pattern used
by other non-interactive exit paths
- Add 4 unit tests covering SIGTERM cleanup, SIGINT cleanup,
idempotent shutdown, and cleanup-failure resilience
Closes#1884
- Add model configuration option for channel-specific model selection
- Support base64-encoded images in prompts via AcpBridge
- Add media utilities for WeChat/Weixin channel
- Update settings schema for model configuration
Enables channels to process images and use custom models.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Make hook events fire-and-forget in clearCommand to avoid blocking UI
- Move context.ui.clear() before resetChat for immediate responsiveness
- Add hasHooksForEvent() fast-path check to HookSystem and Config
- Skip MessageBus round-trips in client.ts when no hooks are registered
- Add comprehensive unit tests for all changes
Fixes#2651
- Add GroupGate class for group access control with three policies:
disabled (default), allowlist, and open
- Implement mention gating: bot only responds when @mentioned or replied to
in groups (configurable per-group)
- Extend Envelope type with isGroup, isMentioned, isReplyToBot fields
- Update TelegramAdapter to detect group context and mentions
- Add comprehensive documentation for group chat setup and troubleshooting
This enables using Qwen Code bots in Telegram groups with fine-grained
access control and mention-based activation to prevent noise.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add buildHumanReadableRuleLabel() to convert raw permission rules into
natural-language descriptions for the 'Always Allow' UI options
- Add PermissionManager.findMatchingDenyRule() to surface which deny rule
caused a tool to be blocked, improving error messages in coreToolScheduler
- Update ToolConfirmationMessage to use friendly labels with i18n support
- Add comprehensive tests for new permission features and multi-directory
search in glob, grep, and ripGrep tools
- Fix integration test for tool-control allowedTools configuration
- Add PairingStore for managing pending requests and approved users
- Update SenderGate to support pairing policy with code generation
- Add CLI commands: `qwen channel pairing list/approve`
- Document pairing flow with rules and usage examples
This allows unknown senders to request access via a pairing code
that the bot operator approves through the CLI.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Validate required fields (type, token) with clear error messages
- Prepend channel instructions to first prompt of each session
- SessionRouter respects sessionScope (user/thread/single) for routing keys