Repository navigation
Conversation
E2E test reportEnvironment: macOS, Node.js 22+, DWS CLI 1.0.57, local
Automated checks on the rebased commit: DWS 81/81, CLI registry 44/44, Web Shell 2/2, full build, typecheck, lint, Prettier, bundle, and npm pack dry-run. |
Superseded by a later commit; current head requires re-review.
The DWS channel was already added to `PUBLISHED_PACKAGES` and to the release.yml publish allowlist, but the test that pins the full set was not updated, so it asserted 10 packages against the 11 now shipped and failed the Test job. Co-Authored-By: Claude Opus 5 <[email protected]>
|
@qwen-code /review |
|
Qwen Code review request accepted. Review is queued in workflow run. |
|
Superseded by #9394. Rebased onto current The rebuild also fixes one real gap this PR carried: 本 PR 已由 #9394 取代:基于最新 |
What this PR does
Adds a built-in DingTalk Workspace channel that uses an existing authenticated DWS CLI profile. It supports direct messages, @mentions and configured ambient groups, DingTalk document-mention notifications, native todo changes, source-scoped sessions, final replies to the originating message, document comment, or todo, and a temporary
暗中观察reaction while accepted message tasks run.The channel reuses the shared sender and group policy model, defaults managed instances to pairing, pins one DWS profile for the channel lifetime, filters the DWS subprocess environment, persists delivery targets, processed-message cursors, and todo fingerprints, suppresses outbound echoes and duplicate pairing notifications, and exposes the channel through CLI, daemon/Web Shell management, build, release, and documentation paths. Native todo watching is opt-in, baselines existing pending todos, polls executor assignments every 30 seconds, and writes the final response back as a todo comment without reacting to its own comment metadata.
Why it's needed
The existing DingTalk channel is intentionally a dedicated application-bot adapter. Users who already authenticate DWS need a separate account-backed channel, analogous to the GitHub channel, so Qwen Code can receive workspace events and respond using the existing DWS login without requiring a bot application.
Reviewer Test Plan
How to verify
type: "dws"channel with pairing policies, and start it withqwen channel start <name>.暗中观察while the task runs and get one final reply."*"withrequireMention: falseand verify ordinary group messages obey both group and sender policy gates.watchTodos: true, start the channel once to establish a baseline, then assign a new native todo to the authenticated account. Confirm it runs once and the final response appears as a todo comment; changing only comments or modification timestamps must not start another task.Evidence (Before & After)
Before: Qwen Code had no built-in channel for an existing DWS login; only the dedicated DingTalk bot adapter was available.
After: A locally authenticated DWS profile can start the channel, receive direct/group/document notifications, poll opted-in native todo changes, show a working reaction for messages, and route the final response back to the originating surface. Live validation also confirmed that repeated automated messages produce one pairing notification per pending request instead of an outbound loop.
Tested on
Environment (optional)
macOS, Node.js 22+, DWS CLI 1.0.57, local TypeScript development checkout.
Risk & Scope
dingtalkchannel remains separate and unchanged.Linked Issues
N/A
中文说明
本 PR 做了什么
新增内置钉钉工作空间 Channel,复用已经登录的 DWS CLI profile。它支持单聊、@ 消息、按配置接收的普通群消息、钉钉文档 @ 通知、原生待办变化、按来源隔离会话,并把最终回复写回原始消息、文档评论或待办;消息任务执行期间还会添加
暗中观察表情。该 Channel 复用统一的发送者和群聊策略,管理界面中新建实例默认使用 pairing;启动时固定唯一 DWS profile;限制 DWS 子进程可继承的环境变量;持久化投递目标、已处理游标和待办指纹;抑制自身回显和重复配对通知;并完成 CLI、daemon/Web Shell、构建、发布和文档接线。原生待办监听默认关闭;开启后会先为已有未完成待办建立基线,每 30 秒轮询一次执行者待办,并把最终回复写入待办评论,同时忽略自身评论产生的元数据变化。
为什么需要
现有钉钉 Channel 专门服务于独立应用机器人。已经使用 DWS 登录的用户需要一个独立的账号型 Channel,像 GitHub Channel 一样,让 Qwen Code 无需新建机器人应用即可接收工作空间事件,并通过现有 DWS 登录回复。
Reviewer 测试计划
如何验证
type: "dws"且策略为 pairing,然后运行qwen channel start <name>。暗中观察,并只收到一次最终回复。"*"配置requireMention: false,确认普通群消息同时遵守群策略和发送者策略。watchTodos: true,首次启动建立基线后,再把一个新的原生待办指派给已登录账号。确认待办只执行一次,最终回复出现在待办评论中;仅评论或更新时间变化时不应再次触发。前后对比证据
Before:Qwen Code 没有复用现有 DWS 登录的内置 Channel,只支持独立钉钉机器人适配器。
After:本机已登录的 DWS profile 可以启动 Channel,接收单聊、群聊和文档通知,按配置轮询原生待办变化,为消息任务显示接手表情,并把最终回复路由回原始入口。现场验证还确认,自动账号连续发消息时,每个待批准请求只发送一次配对提示,不再形成出站回环。
验证平台
环境
macOS、Node.js 22+、DWS CLI 1.0.57、本地 TypeScript 开发工作区。
风险与范围
dingtalkChannel 保持独立且不变。关联 Issue
无