@dingtalk-real-ai/dingtalk-connector 0.8.21 → 0.8.22

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/bin/dingtalk-connector.js +20 -3
  3. package/dist/entry-bundled.mjs +1 -1
  4. package/dist/{gateway-methods-BNuB2wXl.mjs → gateway-methods-C3nEHxL4.mjs} +2 -2
  5. package/dist/gateway-methods-COXVcCFs.mjs +2 -0
  6. package/dist/index.mjs +2 -2
  7. package/dist/{media-BRqGsKUB.mjs → media-BViJQGgb.mjs} +8 -8
  8. package/dist/{media-DD7Rlljd.mjs → media-CIO05hZn.mjs} +1 -1
  9. package/dist/{message-handler-CPGT1bgU.mjs → message-handler-0NLKAqHU.mjs} +7 -7
  10. package/dist/{messaging-DQwrrd68.mjs → messaging-C2zJ8O-o.mjs} +5 -5
  11. package/dist/{runtime-BphH7_vR.mjs → runtime-BCFW2-1B.mjs} +4 -4
  12. package/dist/{utils-QEvgZ2uM.mjs → utils-DgNm1Ek_.mjs} +7 -5
  13. package/dist/{utils-BqUoUOwd.mjs → utils-TpPdfqWr.mjs} +1 -1
  14. package/docs/RELEASE_NOTES_V0.8.22-beta.0.md +107 -0
  15. package/docs/RELEASE_NOTES_V0.8.22.md +95 -0
  16. package/openclaw.plugin.json +1 -1
  17. package/package.json +1 -1
  18. package/src/core/message-handler.ts +2 -1
  19. package/src/reply-dispatcher.ts +3 -2
  20. package/src/utils/empty-reply.ts +7 -5
  21. package/dist/gateway-methods-B0_tBGPn.mjs +0 -2
  22. package/skills/dingtalk-channel-rules/SKILL.md +0 -91
  23. package/skills/dingtalk-troubleshoot/SKILL.md +0 -93
  24. package/skills/dws-cli/SKILL.md +0 -129
  25. package/skills/dws-cli/references/error-codes.md +0 -95
  26. package/skills/dws-cli/references/field-rules.md +0 -105
  27. package/skills/dws-cli/references/global-reference.md +0 -104
  28. package/skills/dws-cli/references/intent-guide.md +0 -114
  29. package/skills/dws-cli/references/products/aitable.md +0 -452
  30. package/skills/dws-cli/references/products/attendance.md +0 -93
  31. package/skills/dws-cli/references/products/calendar.md +0 -217
  32. package/skills/dws-cli/references/products/chat.md +0 -292
  33. package/skills/dws-cli/references/products/contact.md +0 -108
  34. package/skills/dws-cli/references/products/ding.md +0 -57
  35. package/skills/dws-cli/references/products/report.md +0 -162
  36. package/skills/dws-cli/references/products/simple.md +0 -128
  37. package/skills/dws-cli/references/products/todo.md +0 -138
  38. package/skills/dws-cli/references/products/workbench.md +0 -39
  39. package/skills/dws-cli/references/recovery-guide.md +0 -94
@@ -1,162 +0,0 @@
1
- # 日志 (report) 命令参考
2
-
3
- ## 命令总览
4
-
5
- ### 获取日志模版列表
6
- ```
7
- Usage:
8
- dws report template list [flags]
9
- Example:
10
- dws report template list
11
- ```
12
-
13
- ### 获取日志模版详情
14
- ```
15
- Usage:
16
- dws report template detail [flags]
17
- Example:
18
- dws report template detail --name <templateName>
19
- Flags:
20
- --name string 模版名称 (必填)
21
- ```
22
-
23
- ### 创建日志
24
- ```
25
- Usage:
26
- dws report create [flags]
27
- Example:
28
- dws report create --template-id <templateId> \
29
- --contents '[{"key":"今日完成","sort":"0","content":"完成了需求评审","contentType":"markdown","type":"1"}]' \
30
- --format json
31
- dws report create --template-id <templateId> \
32
- --contents '[{"key":"今日完成","sort":"0","content":"内容","contentType":"markdown","type":"1"}]' \
33
- --dd-from "script" --to-chat --to-user-ids "userId1,userId2" --format json
34
- Flags:
35
- --template-id string 日志模版 ID (必填),从 template list 返回中取
36
- --contents string 日志内容 JSON 数组 (必填),每项须含 key/sort/content/contentType/type
37
- --dd-from string 创建来源标识 (默认 dws)
38
- --to-chat string 是否发送到日志接收人单聊 (传 "true" 发送)
39
- --to-user-ids string 接收人 userId,逗号分隔 (可选)
40
- ```
41
-
42
- **`contents` 数组元素**(与 MCP `create_report` 一致):
43
-
44
- | 字段 | 说明 |
45
- |------|------|
46
- | `key` | 控件标题,与 template detail 一致 |
47
- | `sort` | 控件排序,与 template detail 一致 |
48
- | `content` | 填写值;文本类可写 Markdown |
49
- | `contentType` | `type` 为文本 (`1`) 时用 `markdown`,其余类型用 `origin` |
50
- | `type` | `1` 文本、`2` 数字、`3` 单选、`5` 日期、`7` 多选 |
51
-
52
- shell 中传 `--contents` 时外层建议用**单引号**包住整段 JSON。
53
-
54
- ### 获取日志详情
55
- ```
56
- Usage:
57
- dws report detail [flags]
58
- Example:
59
- dws report detail --report-id <reportId>
60
- Flags:
61
- --report-id string 日志 ID (必填)
62
- ```
63
-
64
- ### 日志收件箱列表
65
- ```
66
- Usage:
67
- dws report list [flags]
68
- Example:
69
- dws report list --start "2026-03-10T00:00:00+08:00" --end "2026-03-10T23:59:59+08:00" --cursor 0 --size 20
70
- Flags:
71
- --cursor string 分页游标 (必填)
72
- --end string 结束时间 ISO-8601 (如 2026-03-10T23:59:59+08:00) (必填)
73
- --size string 每页大小 (必填)
74
- --start string 开始时间 ISO-8601 (如 2026-03-10T00:00:00+08:00) (必填)
75
- ```
76
-
77
- ### 获取日志统计数据
78
- ```
79
- Usage:
80
- dws report stats [flags]
81
- Example:
82
- dws report stats --report-id <reportId>
83
- Flags:
84
- --report-id string 日志 ID (必填)
85
- ```
86
-
87
- ### 查询当前人创建的日志列表
88
- ```
89
- Usage:
90
- dws report sent [flags]
91
- Example:
92
- dws report sent --cursor 0 --size 20
93
- dws report sent --cursor 0 --size 20 --start "2026-03-10T00:00:00+08:00" --end "2026-03-10T23:59:59+08:00"
94
- dws report sent --cursor 0 --size 20 --template-name "日报"
95
- Flags:
96
- --cursor string 分页游标,首次传 0 (默认 0)
97
- --size string 每页条数,最大 20 (默认 20)
98
- --start string 创建开始时间 ISO-8601 (默认最近 30 天)
99
- --end string 创建结束时间 ISO-8601 (默认最近 30 天)
100
- --modified-start string 修改开始时间 ISO-8601 (可选)
101
- --modified-end string 修改结束时间 ISO-8601 (可选)
102
- --template-name string 日志模版名称 (可选,不传查全部)
103
- ```
104
-
105
- ## 意图判断
106
-
107
- 用户说"查日志/看日报" → `list` 获取列表,再 `detail`
108
- 用户说"写日报/提交周报/发日志/填日志" → 先 `template list` / `template detail` 取 `templateId` 与各控件 `key`/`sort`/类型,拼 `--contents` JSON,再 `create`
109
- 用户说"日志统计/已读统计" → `stats`
110
- 用户说"有什么日志模版" → `template list` 或 `template detail`
111
- 用户说"我发过的日志/我创建的日志" → `sent`
112
-
113
- 关键区分: report(钉钉日志模版汇报,含创建) vs doc(文档编辑) vs todo(待办任务)
114
-
115
- ## 核心工作流
116
-
117
- ```bash
118
- # 1. 获取当前用户可用的日志模版
119
- dws report template list --format json
120
-
121
- # 2. 按名称查看模版详情(含字段定义)
122
- dws report template detail --name "日报" --format json
123
-
124
- # 2b. 创建日志(从步骤 1/2 取 templateId 与 contents 字段)
125
- dws report create --template-id <templateId> \
126
- --contents '[{"key":"今日完成","sort":"0","content":"完成了需求评审","contentType":"markdown","type":"1"}]' \
127
- --format json
128
-
129
- # 3. 查看收件箱日志列表 — 提取 reportId
130
- dws report list --start "2026-03-10T00:00:00+08:00" --end "2026-03-10T23:59:59+08:00" \
131
- --cursor 0 --size 20 --format json
132
-
133
- # 4. 查看日志详情
134
- dws report detail --report-id <reportId> --format json
135
-
136
- # 5. 查看日志统计(已读/未读)
137
- dws report stats --report-id <reportId> --format json
138
-
139
- # 6. 查看当前人创建的日志列表
140
- dws report sent --cursor 0 --size 20 --format json
141
- ```
142
-
143
- ## 上下文传递表
144
-
145
- | 操作 | 从返回中提取 | 用于 |
146
- |------|-------------|------|
147
- | `template list` | template 名称 | template detail 的 --name |
148
- | `template list` | `templateId`(或等价字段) | `create` 的 --template-id |
149
- | `template detail` | 各控件 `key`、`sort`、类型 | 拼 `create` 的 --contents JSON(含 contentType/type) |
150
- | `list` | `reportId` | detail / stats 的 --report-id |
151
-
152
- ## 注意事项
153
-
154
- - `--start` / `--end` 使用 ISO-8601 格式(如 `2026-03-10T00:00:00+08:00`)
155
- - `template list` 不需要参数,直接返回当前用户可用的所有日志模版
156
- - `create` 前必须先查模版,勿猜测 `templateId` 或 `contents` 中的 `key`/`sort`;多控件时数组须覆盖模版必填项
157
-
158
- ## 自动化脚本
159
-
160
- | 脚本 | 场景 | 用法 |
161
- |------|------|------|
162
- | [report_inbox_today.py](../../scripts/report_inbox_today.py) | 查看今天收到的日志列表及详情 | `python report_inbox_today.py` |
@@ -1,128 +0,0 @@
1
- # 单命令产品合集
2
-
3
- 以下产品命令较少,合并参考。
4
-
5
- ---
6
-
7
- ## devdoc — 开放平台文档
8
-
9
- ### 搜索开放平台文档
10
- ```
11
- Usage:
12
- dws devdoc article search [flags]
13
- Example:
14
- dws devdoc article search --keyword "OAuth2 接入" --page 1 --size 10
15
- Flags:
16
- --keyword string 搜索关键词 (必填)
17
- --page string 页码 (默认 1)
18
- --size string 每页数量 (默认 10)
19
- ```
20
-
21
- ### 搜索错误码
22
- ```
23
- Usage:
24
- dws devdoc article search-error [flags]
25
- Example:
26
- dws devdoc article search-error --keyword "403" --format json
27
- Flags:
28
- --keyword string 错误码或关键词 (必填)
29
- ```
30
-
31
- ---
32
-
33
- ## oa — 审批
34
-
35
- ### 查询可见审批流程
36
- ```
37
- Usage:
38
- dws oa approval list-forms [flags]
39
- Example:
40
- dws oa approval list-forms --format json
41
- ```
42
-
43
- ### 查询审批实例详情
44
- ```
45
- Usage:
46
- dws oa approval detail --instance-id <ID> [flags]
47
- Example:
48
- dws oa approval detail --instance-id <ID> --format json
49
- ```
50
-
51
- ### 查询审批记录
52
- ```
53
- Usage:
54
- dws oa approval records --instance-id <ID> [flags]
55
- Example:
56
- dws oa approval records --instance-id <ID> --format json
57
- ```
58
-
59
- ### 查询待我审批的任务
60
- ```
61
- Usage:
62
- dws oa approval tasks [flags]
63
- Example:
64
- dws oa approval tasks --format json
65
- ```
66
-
67
- ### 查询待我处理的审批
68
- ```
69
- Usage:
70
- dws oa approval pending [flags]
71
- Example:
72
- dws oa approval pending --format json
73
- ```
74
-
75
- ### 查询我发起的审批
76
- ```
77
- Usage:
78
- dws oa approval initiated [flags]
79
- Example:
80
- dws oa approval initiated --format json
81
- ```
82
-
83
- ### 同意审批
84
- ```
85
- Usage:
86
- dws oa approval approve --instance-id <ID> --task-id <TASK_ID> [flags]
87
- Example:
88
- dws oa approval approve --instance-id <ID> --task-id <TASK_ID> --format json
89
- ```
90
-
91
- ### 拒绝审批
92
- ```
93
- Usage:
94
- dws oa approval reject --instance-id <ID> --task-id <TASK_ID> [flags]
95
- Example:
96
- dws oa approval reject --instance-id <ID> --task-id <TASK_ID> --remark "不符合要求" --format json
97
- ```
98
-
99
- ### 撤销审批
100
- ```
101
- Usage:
102
- dws oa approval revoke --instance-id <ID> [flags]
103
- Example:
104
- dws oa approval revoke --instance-id <ID> --format json
105
- ```
106
-
107
- ---
108
-
109
- ## 意图判断
110
-
111
- - 用户说"开发文档/API 文档/接口文档" → `devdoc article search`
112
- - 用户说"API 报错/错误码" → `devdoc article search-error`
113
- - 用户说"审批/请假/报销/出差" → `oa approval`
114
- - 用户说"同意审批/批准" → `oa approval approve`
115
- - 用户说"拒绝审批/驳回" → `oa approval reject`
116
- - 用户说"撤销审批/撤回" → `oa approval revoke`
117
- - 用户说"待我审批/我要审批的" → `oa approval pending` 或 `oa approval tasks`
118
- - 用户说"我发起的审批" → `oa approval initiated`
119
-
120
- ## 上下文传递表
121
-
122
- | 操作 | 从返回中提取 | 用于 |
123
- |------|-------------|------|
124
- | `devdoc article search` | 文档链接 | 直接展示给用户 |
125
- | `oa approval list-forms` | processCode | detail / records 等 |
126
- | `oa approval tasks` | taskId, instanceId | approve / reject |
127
- | `oa approval pending` | instanceId | detail / approve / reject |
128
- | `oa approval initiated` | instanceId | detail / revoke |
@@ -1,138 +0,0 @@
1
- # 待办 (todo) 命令参考
2
-
3
- ## 命令总览
4
-
5
- ### 创建待办
6
- ```
7
- Usage:
8
- dws todo task create [flags]
9
- Example:
10
- dws todo task create --title "修复线上Bug" --executors <USER_ID_1>,<USER_ID_2> --priority 40
11
- dws todo task create --title "提交报告" --executors <USER_ID> --due "2026-03-20T10:00:00+08:00"
12
- Flags:
13
- --due string 截止时间 ISO-8601 (如 2026-03-10T18:00:00+08:00)
14
- --executors string 执行者 userId 列表 (必填)
15
- --priority string 优先级: 10低/20普通/30较高/40紧急
16
- --title string 待办标题 (必填)
17
- ```
18
-
19
- ### 查询待办列表
20
- ```
21
- Usage:
22
- dws todo task list [flags]
23
- Example:
24
- dws todo task list --page 1 --size 20 --status false
25
- Flags:
26
- --page string 页码 (默认 1)
27
- --size string 每页数量 (默认 20)
28
- --status string true=已完成, false=未完成
29
- ```
30
-
31
- ### 修改待办任务
32
- ```
33
- Usage:
34
- dws todo task update [flags]
35
- Example:
36
- dws todo task update --task-id <taskId> --title "新标题"
37
- dws todo task update --task-id <taskId> --priority 40 --due "2026-03-10T18:00:00+08:00"
38
- dws todo task update --task-id <taskId> --done true
39
- Flags:
40
- --done string 完成状态: true/false
41
- --due string 截止时间 ISO-8601 (如 2026-03-10T18:00:00+08:00)
42
- --priority string 优先级: 10低/20普通/30较高/40紧急
43
- --task-id string 待办任务 ID (必填)
44
- --title string 新标题
45
- ```
46
-
47
- ### 修改执行者的待办完成状态
48
- ```
49
- Usage:
50
- dws todo task done [flags]
51
- Example:
52
- dws todo task done --task-id <taskId> --status true
53
- dws todo task done --task-id <taskId> --status false
54
- Flags:
55
- --status string 完成状态: true=已完成, false=未完成 (必填)
56
- --task-id string 待办任务 ID (必填)
57
- ```
58
-
59
- ### 待办详情
60
- ```
61
- Usage:
62
- dws todo task get [flags]
63
- Example:
64
- dws todo task get --task-id <taskId>
65
- Flags:
66
- --task-id string 待办任务 ID (必填)
67
- ```
68
-
69
- ### 删除待办
70
- ```
71
- Usage:
72
- dws todo task delete [flags]
73
- Example:
74
- dws todo task delete --task-id <taskId>
75
- dws todo task delete --task-id <taskId> --yes
76
- Flags:
77
- --task-id string 待办任务 ID (必填)
78
- ```
79
-
80
- ## 意图判断
81
-
82
- 用户说"加个待办/记一下/TODO" → `task create`
83
- 用户说"看看待办/我有啥要做" → `task list`
84
- 用户说"改个待办/修改待办标题/改优先级" → `task update`
85
- 用户说"做完了/完成待办/标记完成" → `task done`
86
- 用户说"看看待办详情" → `task get`
87
- 用户说"删除待办/取消待办" → `task delete`
88
-
89
- 关键区分: todo(个人待办)
90
-
91
- ## 核心工作流
92
-
93
- ```bash
94
- # 1. 创建待办 — 提取 todoTaskId
95
- dws todo task create --title "修复线上Bug" --executors userId1,userId2 \
96
- --priority 40 --due "2026-03-10T18:00:00+08:00" --format json
97
-
98
- # 2. 查看未完成待办
99
- dws todo task list --page 1 --size 20 --status false --format json
100
-
101
- # 3. 查看待办详情
102
- dws todo task get --task-id <taskId> --format json
103
-
104
- # 4. 修改待办信息
105
- dws todo task update --task-id <taskId> --title "新标题" --priority 40 --format json
106
-
107
- # 5. 标记待办完成
108
- dws todo task done --task-id <taskId> --status true --format json
109
-
110
- # 6. 删除待办
111
- dws todo task delete --task-id <taskId> --yes --format json
112
- ```
113
-
114
- ## 上下文传递表
115
-
116
- | 操作 | 从返回中提取 | 用于 |
117
- |------|-------------|------|
118
- | `task create` | `todoTaskId` | update/done/get/delete 的 --task-id |
119
- | `task list` | `result[].id` | update/done/get/delete 的 --task-id |
120
-
121
- ## 注意事项
122
-
123
- - 优先级值: 10=低, 20=普通, 30=较高, 40=紧急
124
- - `--due` 截止时间使用 ISO-8601 格式(如 2026-03-10T18:00:00+08:00)
125
- - `task list` 的 `--status` 对应 MCP `get_user_todos_in_current_org` 的 `todoStatus` 参数
126
- - todo 是个人待办管理产品
127
- - `task update` 可同时修改标题/优先级/截止时间/完成状态
128
- - `task done` 专用于修改执行者的完成状态,与 `task update --done` 作用不同
129
- - `task delete` 为不可逆操作,建议加 `--yes` 并与用户确认
130
-
131
- ## 自动化脚本
132
-
133
- | 脚本 | 场景 | 用法 |
134
- |------|------|------|
135
- | [todo_daily_summary.py](../../scripts/todo_daily_summary.py) | 查看今天/明天/本周未完成待办汇总 | `python todo_daily_summary.py today` |
136
- | [todo_batch_create.py](../../scripts/todo_batch_create.py) | 从 JSON 文件批量创建待办 | `python todo_batch_create.py todos.json` |
137
- | [todo_overdue_check.py](../../scripts/todo_overdue_check.py) | 扫描逾期待办输出逾期清单 | `python todo_overdue_check.py` |
138
-
@@ -1,39 +0,0 @@
1
- # 工作台 (workbench) 命令参考
2
-
3
- ## 命令总览
4
-
5
- ### 查看所有工作台应用
6
- ```
7
- Usage:
8
- dws workbench app list [flags]
9
- Example:
10
- dws workbench app list
11
- ```
12
- ### 批量获取应用详情
13
- ```
14
- Usage:
15
- dws workbench app get [flags]
16
- Example:
17
- dws workbench app get --ids <APP_ID_1>,<APP_ID_2>
18
- Flags:
19
- --ids string 应用 ID 列表 (必填)
20
- ```
21
-
22
- ## 意图判断
23
-
24
- 用户说"工作台有什么应用/看看应用" → `app list`
25
- 用户说"应用详情" → `app get` (需 appId)
26
-
27
- ## 核心工作流
28
-
29
- ```bash
30
- # 查看所有应用 — 提取 appId
31
- dws workbench app list --format json
32
-
33
- # 获取应用详情
34
- dws workbench app get --ids app1,app2 --format json
35
- ```
36
- ## 上下文传递表
37
- | 操作 | 提取 | 用于 |
38
- |------|------|------|
39
- | `app list` | `appId` | app get 的 --ids |
@@ -1,94 +0,0 @@
1
- # Recovery Guide
2
-
3
- `dws` 的 recovery 闭环以 `dws recovery execute` 为正式入口。主入口仍是 [SKILL.md](../SKILL.md),错误分类与排查细节可结合 [error-codes.md](./error-codes.md) 和 [global-reference.md](./global-reference.md) 一起使用。
4
-
5
- ## 标准流程
6
-
7
- 1. 原始 `dws` 命令失败后,从 stderr 提取 `RECOVERY_EVENT_ID=<event_id>`
8
- 2. 执行 `dws recovery execute --event-id <event_id> --format json`
9
- 3. 读取返回的 `RecoveryBundle`
10
- 4. 先查看 `plan.decision_owner`
11
- 5. 当 `decision_owner == "agent"` 时,把完整 `RecoveryBundle` 视为事实包,由 Agent 基于事实包、对应产品文档和 `dws` skill 做整体判断,再决定是否组织下一次 grounded 的 `dws` 恢复尝试
12
- 6. 恢复尝试结束后,执行 `dws recovery finalize --event-id <event_id> --outcome recovered|failed|handoff --execution-file <file.json> --format json`
13
-
14
- CLI 会把 recovery 过程文件保存在 `DWS_CONFIG_DIR/recovery/` 下,并自动清理 30 天前的旧文件与旧事件记录。
15
-
16
- ## 如何阅读 `RecoveryBundle`
17
-
18
- `RecoveryBundle` 重点字段:
19
-
20
- - `status`:`needs_agent_action` 或 `analysis_failed`
21
- - `context`:原始失败上下文
22
- - `replay`:可重放的脱敏命令信息和工具参数
23
- - `plan`:规则分类、`decision_owner`、`agent_route`、`doc_search`、`kb_hits`、`doc_actions`、`human_actions`
24
- - `doc_search.request`:CLI 实际发起的开放平台文档检索请求参数
25
- - `doc_search.response`:CLI 收到的原始文档检索返回内容块
26
- - `probe_results`:CLI 已完成的只读探测和上下文审计结果
27
- - `agent_task`:给 Agent 的明确工作单
28
- - `finalize_hint`:最终必须回写的 `finalize` 命令模板和 `execution-file` 要求
29
-
30
- 当 `status == "analysis_failed"` 时,不要假设 CLI 已经修复问题;应先读取 `analysis_error`、`doc_search`、`probe_results`,再判断是否还能继续 grounded 尝试。
31
-
32
- 当 `plan.decision_owner == "agent"` 时:
33
-
34
- - 必须把 CLI 返回内容视为事实包,而不是已定案的恢复结论
35
- - 优先基于完整 `RecoveryBundle` 做判断;若只能读取 `agent_route.payload`,也必须使用其中的 `context`、`replay`、`doc_search`、`kb_hits`、`doc_actions`、`probe_results`
36
- - unknown 场景里,不要把 `should_retry`、`should_stop`、`human_actions` 当作 CLI 已经替 Agent 作出的最终决定
37
-
38
- ## Agent 允许做什么
39
-
40
- - 读取 [global-reference.md](./global-reference.md)、[error-codes.md](./error-codes.md) 和对应产品文档
41
- - 基于完整 `RecoveryBundle`,尤其是 `doc_actions`、`kb_hits`、`probe_results`、`context`、`replay` 做整体判断
42
- - 仅在依据明确时重新发起新的 `dws` 命令
43
- - 将真实尝试过程记录进 `execution-file`,再调用 `finalize`
44
-
45
- ## Agent 禁止做什么
46
-
47
- - 编造 taskId、recordId、threadId、UUID、token、URL 或其他业务参数
48
- - 绕过 `dws` 改用 curl、HTTP API、浏览器或其他未授权手段
49
- - 未确认前把失败命令替换成另一套业务流程
50
- - 因为 `human_actions` 里提到用户步骤,就跳过 bundle 里的其余分析信息
51
-
52
- ## `execution-file` 最小要求
53
-
54
- `execution-file` 必须至少包含:
55
-
56
- - `actions`
57
- - `attempts`
58
- - `result`
59
- - `error_summary`
60
-
61
- `attempts` 是数组,每次尝试至少记录:
62
-
63
- - `command_summary`
64
- - `result`
65
- - `error_summary`
66
- - `source`
67
-
68
- 兼容旧格式:
69
-
70
- - `action` 会被归一化成单元素 `actions`
71
- - 数值型 `attempts` 会被展开为 `legacy_execution_file` 来源的 attempts 记录
72
- - `error` 会被归一化到 `error_summary`
73
-
74
- ## unknown 参数错误处理
75
-
76
- 如果 `execute` 进入 unknown 场景,且 `probe_results` 已给出 CLI 检查过的上下文来源,Agent 应:
77
-
78
- - 先检查上一步输出、已有上下文、产品文档或 `probe_results` 里是否存在真实参数来源
79
- - 若没有可靠来源,就回写 `handoff`
80
- - 不要盲猜新的 ID、UUID、URL、token 或其他业务参数
81
-
82
- 对应标准闭环:
83
-
84
- ```bash
85
- dws recovery execute --event-id <event_id> --format json
86
- dws recovery finalize --event-id <event_id> --outcome handoff --execution-file execution.json --format json
87
- ```
88
-
89
- ## 必读参考
90
-
91
- - [error-codes.md](./error-codes.md)
92
- - [global-reference.md](./global-reference.md)
93
- - [intent-guide.md](./intent-guide.md)
94
- - [products/](./products/)