将 test/pre-mcp-discovery 分支上多位同学的能力改动整体合入 main, 服务发现端点保持生产 https://mcp.dingtalk.com,未携带分支上的预发改动。 主要内容: - 修雨域(chat / report / todo / contact / mail)对齐 wukong 基线 (#355) - DWS 内容生产能力增强 (#387)、文档导出与 OA 对齐 (#362 #388 #390) - envelope 注册 cli.Aliases 为 cobra aliases、命令结构与 JSON 解析优化 - skills 多包同步 wukong 对齐内容(attendance/calendar/minutes/oa/sheet 等) - product/oa 进一步对齐 wukong 排除项:未携带 566b4e1(test: point service discovery to pre-mcp.dingtalk.com); 以下 4 个常量保持生产:skill_command.go / auth/endpoints.go / cli/loader.go / market/registry.go。 Co-authored-by: john <32427341+wqyenjoy@users.noreply.github.com> Co-authored-by: wxianfeng <wang.fl1429@gmail.com>
2.7 KiB
2.7 KiB
DING 消息 (ding) 命令参考
命令总览
发送 DING 消息
Usage:
dws ding message send [flags]
Example:
dws ding message send --robot-code <ROBOT_CODE> --users <USER_ID_1>,<USER_ID_2> --content "请查看"
Flags:
--content string 消息内容 (必填)
--robot-code string 机器人 ID (必填, 可从 应用管理→机器人 获取, 或设 DINGTALK_DING_ROBOT_CODE)
--users string 接收人 userId 列表 (必填)
--type string 提醒类型: app/sms/call (默认 app)
撤回 DING 消息
Usage:
dws ding message recall [flags]
Example:
dws ding message recall --robot-code <ROBOT_CODE> --id <OPEN_DING_ID>
Flags:
--id string DING 消息 ID (必填)
--robot-code string 机器人 ID (必填, 或设 DINGTALK_DING_ROBOT_CODE)
查询 DING 消息历史
Usage:
dws ding message list [flags]
Example:
dws ding message list
dws ding message list --type UNREAD
dws ding message list --type SEND --cursor 10
Flags:
--cursor int 分页游标 (首次传 0, 翻页传返回的 nextCursor)
--type string 消息类型: ALL / UNREAD / SEND / NEW_COMMENT / DELETED (可选, 不传返回全部)
查看 DING 接收状态
Usage:
dws ding message receiver-status [flags]
Example:
dws ding message receiver-status --ding-id <OPEN_DING_ID>
# 查询 dingId: dws ding message list
Flags:
--ding-id string DING 消息 openDingId (必填)
意图判断
用户说"DING 一下/紧急通知/电话提醒" → message send
用户说"撤回 DING" → message recall
用户说"DING 消息/查 DING/DING 历史/我的 DING" → message list
用户说"DING 接收状态/谁收到了 DING/DING 已读" → message receiver-status
关键区分:
- ding(紧急提醒, 支持电话/短信) vs bot(常规群/单聊消息)
- sms/call 类型有通信费用
核心工作流
# 应用内 DING (免费)
dws ding message send --robot-code <ROBOT_CODE> --type app --users userId1,userId2 --content "请查看" --format json
# 电话 DING (紧急, 有成本!)
dws ding message send --robot-code <ROBOT_CODE> --type call --users userId1 --content "紧急告警" --format json
# 撤回
dws ding message recall --robot-code <ROBOT_CODE> --id <OPEN_DING_ID> --format json
上下文传递表
| 操作 | 提取 | 用于 |
|---|---|---|
message send |
openDingId |
message recall 的 --id |
message list |
openDingId |
message receiver-status 的 --ding-id |
注意事项
--robot-code从钉钉开放平台 应用管理 → 机器人 中获取,也可设环境变量DINGTALK_DING_ROBOT_CODE- sms/call 类型有通信费用,使用前需和用户确认
- 默认
--type app(应用内 DING,免费)