@thinkingai/ae-cli 1.0.1 → 1.0.3

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 (170) hide show
  1. package/README.md +16 -13
  2. package/dist/auth-BQC5DBE7.js +19 -0
  3. package/dist/auth-DXKYLMO7.js +81 -0
  4. package/dist/chunk-3CDLNXTD.js +218 -0
  5. package/dist/chunk-53FNNCZW.js +174 -0
  6. package/dist/chunk-EBFUVWIZ.js +127 -0
  7. package/dist/chunk-ZYXIGPG7.js +148 -0
  8. package/dist/client-T4VODLA6.js +16 -0
  9. package/dist/community-FVDAWGS4.js +684 -0
  10. package/dist/config-V7AXKDMB.js +242 -0
  11. package/dist/index.js +16 -15
  12. package/dist/raw-G3GKHAPZ.js +61 -0
  13. package/dist/te-analysis-CHFTDN55.js +871 -0
  14. package/dist/te-audience-M6LQY6M7.js +350 -0
  15. package/dist/te-common-BLQ7DVGC.js +144 -0
  16. package/dist/te-dataops-V4OTKY35.js +1853 -0
  17. package/dist/te-engage-DXE4R5EW.js +1470 -0
  18. package/dist/te-meta-FMM7KCVI.js +479 -0
  19. package/package.json +7 -5
  20. package/skills/te-analysis/SKILL.md +10 -10
  21. package/skills/te-analysis/references/build-entity-details-sql.md +10 -10
  22. package/skills/te-analysis/references/build-event-details-sql.md +10 -10
  23. package/skills/te-analysis/references/create-alert.md +4 -4
  24. package/skills/te-analysis/references/create-dashboard.md +4 -4
  25. package/skills/te-analysis/references/create-or-update-dashboard-note.md +4 -4
  26. package/skills/te-analysis/references/create-public-access-link.md +4 -4
  27. package/skills/te-analysis/references/create-report.md +10 -10
  28. package/skills/te-analysis/references/create-result-cluster.md +4 -4
  29. package/skills/te-analysis/references/drilldown-user-events.md +6 -6
  30. package/skills/te-analysis/references/drilldown-users.md +4 -4
  31. package/skills/te-analysis/references/get-alert-definition-schema.md +3 -3
  32. package/skills/te-analysis/references/get-alert.md +3 -3
  33. package/skills/te-analysis/references/get-analysis-query-schema.md +4 -4
  34. package/skills/te-analysis/references/get-filter-schema.md +3 -3
  35. package/skills/te-analysis/references/get-groupby-schema.md +3 -3
  36. package/skills/te-analysis/references/get-report-definition.md +3 -3
  37. package/skills/te-analysis/references/get-table-columns.md +3 -3
  38. package/skills/te-analysis/references/list-alerts.md +4 -4
  39. package/skills/te-analysis/references/list-dashboards.md +4 -4
  40. package/skills/te-analysis/references/list-public-access-links.md +3 -3
  41. package/skills/te-analysis/references/list-reports.md +4 -4
  42. package/skills/te-analysis/references/load-filters.md +4 -4
  43. package/skills/te-analysis/references/query-adhoc.md +10 -10
  44. package/skills/te-analysis/references/query-dashboard-detail.md +3 -3
  45. package/skills/te-analysis/references/query-dashboard-report-data.md +9 -9
  46. package/skills/te-analysis/references/query-entity-details.md +10 -10
  47. package/skills/te-analysis/references/query-event-details.md +10 -10
  48. package/skills/te-analysis/references/query-report-data.md +11 -11
  49. package/skills/te-analysis/references/update-alert.md +4 -4
  50. package/skills/te-analysis/references/update-dashboard.md +4 -4
  51. package/skills/te-analysis/references/update-public-access-link.md +4 -4
  52. package/skills/te-audience/SKILL.md +5 -5
  53. package/skills/te-audience/references/create-cluster.md +10 -10
  54. package/skills/te-audience/references/create-tag.md +10 -10
  55. package/skills/te-audience/references/get-cluster-definition-schema.md +9 -9
  56. package/skills/te-audience/references/get-clusters-by-name.md +3 -3
  57. package/skills/te-audience/references/get-tag-definition-schema.md +3 -3
  58. package/skills/te-audience/references/get-tags-by-name.md +3 -3
  59. package/skills/te-audience/references/list-cluster-members.md +4 -4
  60. package/skills/te-audience/references/list-clusters.md +4 -4
  61. package/skills/te-audience/references/list-tag-members.md +4 -4
  62. package/skills/te-audience/references/list-tags.md +4 -4
  63. package/skills/te-audience/references/refresh-cluster.md +3 -3
  64. package/skills/te-audience/references/refresh-tag.md +3 -3
  65. package/skills/te-audience/references/update-cluster.md +9 -9
  66. package/skills/te-audience/references/update-tag.md +10 -10
  67. package/skills/te-common/SKILL.md +2 -2
  68. package/skills/te-common/references/get-resource-url.md +5 -5
  69. package/skills/te-common/references/list-projects.md +3 -3
  70. package/skills/te-community/SKILL.md +61 -69
  71. package/skills/te-community/references/community-activity-analysis.md +43 -43
  72. package/skills/te-community/references/community-analyzing-official-content.md +47 -47
  73. package/skills/te-community/references/community-analyzing-theme-comment.md +87 -87
  74. package/skills/te-community/references/community-character-analysis.md +44 -44
  75. package/skills/te-community/references/community-daily-report.md +56 -53
  76. package/skills/te-community/references/community-hottopic-insight.md +81 -87
  77. package/skills/te-community/references/community-weekly-report.md +54 -53
  78. package/skills/te-community/references/get_channel_info.md +9 -9
  79. package/skills/te-community/references/get_comment_tag_analysis.md +15 -15
  80. package/skills/te-community/references/get_comments_summary.md +15 -15
  81. package/skills/te-community/references/get_corpus_tags.md +9 -9
  82. package/skills/te-community/references/get_daily_summary.md +10 -10
  83. package/skills/te-community/references/get_hot_topics.md +12 -12
  84. package/skills/te-community/references/get_livestream_analysis.md +9 -9
  85. package/skills/te-community/references/get_livestream_detail.md +19 -19
  86. package/skills/te-community/references/get_livestream_list.md +13 -13
  87. package/skills/te-community/references/get_livestream_overview.md +11 -11
  88. package/skills/te-community/references/get_livestream_room_metrics.md +12 -12
  89. package/skills/te-community/references/get_livestream_rooms.md +12 -12
  90. package/skills/te-community/references/get_overview_metrics.md +12 -12
  91. package/skills/te-community/references/get_post_detail.md +21 -21
  92. package/skills/te-community/references/get_risk_content.md +23 -23
  93. package/skills/te-community/references/get_sentiment_overview.md +16 -16
  94. package/skills/te-community/references/get_tag_trends.md +13 -13
  95. package/skills/te-community/references/get_topic_detail.md +12 -12
  96. package/skills/te-community/references/search_posts.md +26 -26
  97. package/skills/te-dataops/SKILL.md +390 -392
  98. package/skills/te-dataops/references/dataops-flow-create.md +87 -87
  99. package/skills/te-dataops/references/dataops-flow-monitor.md +65 -65
  100. package/skills/te-dataops/references/dataops-integration.md +90 -85
  101. package/skills/te-dataops/references/dataops-query.md +58 -58
  102. package/skills/te-dataops/references/dataops-table.md +63 -63
  103. package/skills/te-engage/SKILL.md +103 -103
  104. package/skills/te-engage/references/add-approver.md +11 -11
  105. package/skills/te-engage/references/add-channel.md +34 -34
  106. package/skills/te-engage/references/approver-list.md +8 -8
  107. package/skills/te-engage/references/cancel-query-by-request-id.md +10 -10
  108. package/skills/te-engage/references/channel-detail.md +13 -13
  109. package/skills/te-engage/references/channel-list.md +15 -15
  110. package/skills/te-engage/references/config-channel-detail.md +10 -10
  111. package/skills/te-engage/references/config-channel-list.md +11 -11
  112. package/skills/te-engage/references/config-item-analysis-report.md +21 -21
  113. package/skills/te-engage/references/config-item-detail.md +10 -10
  114. package/skills/te-engage/references/config-item-list.md +8 -8
  115. package/skills/te-engage/references/config-item-strategy-comparison.md +14 -14
  116. package/skills/te-engage/references/config-item-trigger-report.md +26 -26
  117. package/skills/te-engage/references/copy-config-template.md +16 -16
  118. package/skills/te-engage/references/delete-channel.md +11 -11
  119. package/skills/te-engage/references/delete-config-channel.md +11 -11
  120. package/skills/te-engage/references/delete-config-item.md +12 -12
  121. package/skills/te-engage/references/delete-flow.md +11 -11
  122. package/skills/te-engage/references/flow-ab-split-node-report.md +29 -29
  123. package/skills/te-engage/references/flow-detail.md +19 -19
  124. package/skills/te-engage/references/flow-list.md +8 -8
  125. package/skills/te-engage/references/flow-node-config-schema.md +11 -11
  126. package/skills/te-engage/references/flow-node-detail-report.md +30 -30
  127. package/skills/te-engage/references/flow-node-overview-report.md +27 -27
  128. package/skills/te-engage/references/flow-process-report.md +32 -32
  129. package/skills/te-engage/references/manage-flow.md +44 -44
  130. package/skills/te-engage/references/manage-strategy.md +37 -37
  131. package/skills/te-engage/references/manage-task.md +20 -20
  132. package/skills/te-engage/references/modify-flow-base-info.md +14 -14
  133. package/skills/te-engage/references/save-flow.md +264 -263
  134. package/skills/te-engage/references/strategy-detail.md +16 -16
  135. package/skills/te-engage/references/strategy-list.md +10 -10
  136. package/skills/te-engage/references/task-data-detail.md +47 -47
  137. package/skills/te-engage/references/task-data-overview.md +23 -23
  138. package/skills/te-engage/references/task-detail.md +18 -18
  139. package/skills/te-engage/references/task-experiment-report.md +26 -26
  140. package/skills/te-engage/references/task-list.md +35 -35
  141. package/skills/te-engage/references/task-metric-detail.md +31 -31
  142. package/skills/te-engage/references/task-stats.md +31 -31
  143. package/skills/te-engage/references/update-channel-status.md +13 -13
  144. package/skills/te-engage/references/update-config-channel-status.md +14 -14
  145. package/skills/te-engage/references/validate-flow-node-config.md +15 -15
  146. package/skills/te-engage/references/whitelist-list.md +8 -8
  147. package/skills/te-meta/SKILL.md +5 -5
  148. package/skills/te-meta/references/batch-create-metadata.md +4 -4
  149. package/skills/te-meta/references/batch-edit-metadata.md +3 -3
  150. package/skills/te-meta/references/create-metric.md +12 -12
  151. package/skills/te-meta/references/create-project-mark-time.md +4 -4
  152. package/skills/te-meta/references/create-virtual-event.md +10 -10
  153. package/skills/te-meta/references/create-virtual-property.md +8 -8
  154. package/skills/te-meta/references/delete-project-mark-times.md +3 -3
  155. package/skills/te-meta/references/delete-track-items.md +3 -3
  156. package/skills/te-meta/references/get-metric.md +3 -3
  157. package/skills/te-meta/references/get-project-config.md +3 -3
  158. package/skills/te-meta/references/get-track-program.md +3 -3
  159. package/skills/te-meta/references/list-entities.md +4 -4
  160. package/skills/te-meta/references/list-events.md +4 -4
  161. package/skills/te-meta/references/list-metrics.md +4 -4
  162. package/skills/te-meta/references/list-project-mark-times.md +4 -4
  163. package/skills/te-meta/references/list-project-users.md +3 -3
  164. package/skills/te-meta/references/list-properties.md +4 -4
  165. package/skills/te-meta/references/save-track-items.md +3 -3
  166. package/skills/te-meta/references/update-metric.md +10 -10
  167. package/skills/te-meta/references/update-project-mark-time.md +4 -4
  168. package/skills/te-shared/SKILL.md +8 -8
  169. package/skills/te-community/references/community-release-analysis.md +0 -79
  170. package/skills/te-dataops/references/dataops-operations.md +0 -107
@@ -1,67 +1,67 @@
1
- # te-engage `+save-flow`
1
+ # te-engage `+save_flow`
2
2
 
3
- 创建或更新流程画布草稿。
3
+ Create or update a flow canvas draft.
4
4
 
5
- 映射命令:`te-cli te-engage +save-flow`
5
+ Mapped command: `ae-cli engage +save_flow`
6
6
 
7
- 这份文档目标不是只解释 `save_flow` 接口本身,而是提供一条**从用户需求到 CLI 入参**的完整路径:
7
+ This document is not only meant to explain the `save_flow` interface itself. It provides a complete path **from user requirements to CLI arguments**:
8
8
 
9
- 1. 先做意图识别
10
- 2. 再把意图映射成流程画布 `req`
11
- 3. 最后调用 CLI 提交
9
+ 1. Identify intent first
10
+ 2. Then map the intent to the flow canvas `req`
11
+ 3. Finally submit through the CLI
12
12
 
13
13
  ---
14
14
 
15
- ## 1. 总原则
15
+ ## 1. General Principles
16
16
 
17
- `+save-flow` 直接接收的不是自然语言,也不是模糊业务描述,而是**最终可提交的流程画布请求体**。
17
+ `+save_flow` does not accept natural language or vague business descriptions directly. It accepts the **final flow canvas request payload that is ready to submit**.
18
18
 
19
- 因此,必须先把用户需求整理成一个统一的中间意图结构,再根据映射规则生成:
19
+ Therefore, you must first organize user requirements into a unified intermediate intent structure, and then generate the payload according to the mapping rules:
20
20
 
21
21
  - `flowName`
22
22
  - `flowDesc`
23
23
  - `nodeList`
24
24
  - `edgeList`
25
- - 以及可选的 `groupId`、`tzOffset`、`flowUuid`、`parentFlowUuid`、`versionType`
25
+ - and optional `groupId`、`tzOffset`、`flowUuid`、`parentFlowUuid`、`versionType`
26
26
 
27
- 最终再用 CLI 调用:
27
+ Then call the CLI:
28
28
 
29
29
  ```bash
30
- te-cli te-engage +save-flow --project-id <projectId> --req '<req-json>'
30
+ ae-cli engage +save_flow --project_id <projectId> --req '<req-json>'
31
31
  ```
32
32
 
33
33
  ---
34
34
 
35
- ## 2. 工作流
35
+ ## 2. Workflow
36
36
 
37
- 推荐按下面 5 步执行:
37
+ Use the following five-step workflow:
38
38
 
39
- 1. 从用户输入中识别流程意图,生成统一的意图 JSON。
40
- 2. 调用 `te-cli te_audience +get_cluster_definition_schema --cluster_type condition`,拿到 condition cluster definition schema,用于后续拼装条件相关字段。
41
- 3. 调用 `te-cli te-engage +channel-list --project-id <projectId>`,拿到项目下可用通道,为触达节点匹配真实 `channelId`。
42
- 4. 将意图 JSON 映射成最终 `req`:`flowName`、`flowDesc`、`nodeList`、`edgeList`。
43
- 5. 调用 `te-cli te-engage +save-flow --project-id <projectId> --req '<req-json>'` 提交。
39
+ 1. Identify the flow intent from the user input and produce a unified intent JSON.
40
+ 2. Run `ae-cli te_audience +get_cluster_definition_schema --cluster_type condition` to obtain the condition cluster definition schema for assembling condition-related fields later.
41
+ 3. Run `ae-cli engage +channel_list --project_id <projectId>` to get the available channels in the project and match real `channelId` values for touchpoint nodes.
42
+ 4. Map the intent JSON to the final `req`: `flowName`, `flowDesc`, `nodeList`, and `edgeList`.
43
+ 5. Run `ae-cli engage +save_flow --project_id <projectId> --req '<req-json>'` to submit.
44
44
 
45
45
  ---
46
46
 
47
- ## 3. 第一步:意图识别
47
+ ## 3. Step One: Intent Identification
48
48
 
49
- ### 3.1 必须先确认的信息
49
+ ### 3.1 Information That Must Be Confirmed First
50
50
 
51
- 在生成任何 `req` 之前,至少要确认这 4 类信息:
51
+ Before generating any `req`, confirm at least these four categories of information:
52
52
 
53
- | 信息 | 说明 |
53
+ | Item | Description |
54
54
  |---|---|
55
- | 业务场景 | 这是一个什么流程,比如新用户激活、流失召回、付费转化 |
56
- | 目标用户 | 谁能进入流程,比如最近 14 天未登录用户、今日注册用户 |
57
- | 触达方式 | 用什么渠道触达,比如 Push、微信订阅、Webhook |
58
- | 分流条件 | 是否需要分组处理;如果需要,要知道按什么条件分组 |
55
+ | business scenario | What kind of flow this is, for example new-user activation, churn win-back, or paid conversion |
56
+ | target users | Who can enter the flow, for example users inactive for the last 14 days or users registered today |
57
+ | touchpoint method | Which channel will be used for outreach, for example Push, WeChat subscription, or Webhook |
58
+ | branching conditions | Whether grouped handling is needed; if so, which conditions define the groups |
59
59
 
60
- 如果这 4 类信息有缺失,不要直接构建 `req`。
60
+ If any of these four categories is missing, do not build `req` directly.
61
61
 
62
- ### 3.2 意图识别输出格式
62
+ ### 3.2 Intent Output Format
63
63
 
64
- 先把用户需求整理成如下意图 JSON。这个 JSON 是中间表示,不是最终 `save_flow.req`。
64
+ First organize the user requirement into the following intent JSON. This JSON is an intermediate representation, not the final `save_flow.req`.
65
65
 
66
66
  ```json
67
67
  {
@@ -86,7 +86,7 @@ te-cli te-engage +save-flow --project-id <projectId> --req '<req-json>'
86
86
  {
87
87
  "nid": "n1",
88
88
  "node_type": "<split|judge|action|wait|end>",
89
- "type": "<具体节点语义类型>",
89
+ "type": "<specific semantic node type>",
90
90
  "name": "<string|null>",
91
91
  "content": "<string|null>",
92
92
  "channel_name": "<string|null>",
@@ -117,64 +117,64 @@ te-cli te-engage +save-flow --project-id <projectId> --req '<req-json>'
117
117
  }
118
118
  ```
119
119
 
120
- ### 3.3 字段含义
120
+ ### 3.3 Field Meaning
121
121
 
122
122
  - `entry`
123
- 描述用户如何进入流程。
123
+ Describes how users enter the flow.
124
124
  - `nodes`
125
- 描述业务语义节点,还不是最终画布节点。
125
+ Describes business-semantic nodes; they are not yet final canvas nodes.
126
126
  - `edges`
127
- 描述业务语义上的连接关系。
127
+ Describes the connection relationships at the business-semantics level.
128
128
  - `channel_name`
129
- 先保留为语义字段,后面再去项目通道列表里匹配真实 `channelId`。
129
+ Keep it as a semantic field first, then match a real `channelId` from the project channel list later.
130
130
  - `branches`
131
- 只描述分支语义;后面落地到 `node.config.branchList` 和 `edge.sourceBranchId`。
131
+ Only describes branch semantics; later it will be materialized into `node.config.branchList` and `edge.sourceBranchId`.
132
132
 
133
133
  ---
134
134
 
135
- ## 4. 第二步:前置 CLI 查询
135
+ ## 4. Step Two: Required CLI Queries
136
136
 
137
- ### 4.1 查询 cluster definition schema
137
+ ### 4.1 Query the Cluster Definition Schema
138
138
 
139
- 调用:
139
+ Run:
140
140
 
141
141
  ```bash
142
- te-cli te_audience +get_cluster_definition_schema --cluster_type condition
142
+ ae-cli te_audience +get_cluster_definition_schema --cluster_type condition
143
143
  ```
144
144
 
145
- 作用:
146
- - 为条件节点、分群节点、入口节点准备 QP 构造依据
147
- - 帮助生成 `targetClusterQp`
148
- - 帮助生成 `triggerRule.events`
145
+ Purpose:
146
+ - Prepare the basis for building QP for condition nodes, audience nodes, and entry nodes
147
+ - Help generate `targetClusterQp`
148
+ - Help generate `triggerRule.events`
149
149
 
150
- 这一步不是直接返回最终节点,而是提供“怎样把条件表达成 QP / 事件条件”的规则基础。
150
+ This step does not return final nodes directly. It provides the rule foundation for expressing conditions as QP or event conditions.
151
151
 
152
- ### 4.2 查询项目通道
152
+ ### 4.2 Query Project Channels
153
153
 
154
- 调用:
154
+ Run:
155
155
 
156
156
  ```bash
157
- te-cli te-engage +channel-list --project-id <projectId>
157
+ ae-cli engage +channel_list --project_id <projectId>
158
158
  ```
159
159
 
160
- 作用:
161
- - 获取项目下可用通道
162
- - 根据意图中的 `channel_name` 为触达节点匹配真实 `channelId`
163
- - 根据通道类型判断是 `message_push`、`wechat_push` 还是 `webhook_push`
160
+ Purpose:
161
+ - Get the available channels in the project
162
+ - Match a real `channelId` for touchpoint nodes based on `channel_name` in the intent
163
+ - Determine whether the node should be `message_push`, `wechat_push`, or `webhook_push` based on the channel type
164
164
 
165
- 如果 `channel_name` 没有精确匹配,应优先:
165
+ If `channel_name` does not have an exact match, use this priority:
166
166
 
167
- 1. 名称精确匹配
168
- 2. 名称关键词匹配
169
- 3. 按节点类型兜底匹配通道类型
167
+ 1. exact name match
168
+ 2. name keyword match
169
+ 3. fallback match by node type and channel type
170
170
 
171
171
  ---
172
172
 
173
- ## 5. 第三步:把意图映射成 `req`
173
+ ## 5. Step Three: Map the Intent to `req`
174
174
 
175
- ### 5.1 `req` 顶层结构
175
+ ### 5.1 Top-Level `req` Structure
176
176
 
177
- 最终传给 `--req` 的对象结构如下:
177
+ The object passed to `--req` should have the following structure:
178
178
 
179
179
  ```json
180
180
  {
@@ -190,104 +190,104 @@ te-cli te-engage +channel-list --project-id <projectId>
190
190
  }
191
191
  ```
192
192
 
193
- 说明:
194
- - `projectId` 不需要手写进 `--req`,CLI 会从 `--project-id` 自动注入
195
- - `flowUuid` 和 `parentFlowUuid` 互斥
196
- - 创建新草稿时,这两个字段都不传
193
+ Notes:
194
+ - `projectId` does not need to be written into `--req` manually; the CLI injects it from `--project_id`
195
+ - `flowUuid` and `parentFlowUuid` are mutually exclusive
196
+ - When creating a new draft, neither of these fields should be provided
197
197
 
198
- ### 5.2 顶层字段来源
198
+ ### 5.2 Sources of Top-Level Fields
199
199
 
200
- | `req` 字段 | 来源 |
200
+ | `req` Field | Source |
201
201
  |---|---|
202
- | `flowName` | 意图 `flow_name` |
203
- | `flowDesc` | 意图 `flow_desc`,没有就给空串或简短描述 |
204
- | `groupId` | 默认 `0`,除非业务要求指定分组 |
205
- | `tzOffset` | 用户时区或项目默认时区,常见为 `8` |
206
- | `nodeList` | 由意图 `entry` + `nodes` 映射生成 |
207
- | `edgeList` | 由意图 `edges` 和分支结构生成 |
202
+ | `flowName` | Intent field `flow_name` |
203
+ | `flowDesc` | Intent field `flow_desc`; use an empty string or a short description if absent |
204
+ | `groupId` | Default `0`, unless the business requirement specifies a group |
205
+ | `tzOffset` | User timezone or project default timezone; a common value is `8` |
206
+ | `nodeList` | Generated from intent `entry` plus `nodes` |
207
+ | `edgeList` | Generated from intent `edges` and branch structure |
208
208
 
209
209
  ---
210
210
 
211
- ## 6. 第四步:意图节点到画布节点的映射
211
+ ## 6. Step Four: Map Intent Nodes to Canvas Nodes
212
212
 
213
- ### 6.1 入口节点映射
213
+ ### 6.1 Entry Node Mapping
214
214
 
215
- | 意图 `entry.type` | 画布节点 `type` |
215
+ | Intent `entry.type` | Canvas node `type` |
216
216
  |---|---|
217
217
  | `single_trigger` | `single_trigger` |
218
218
  | `repeat_trigger` | `repeat_trigger` |
219
219
  | `event_trigger` | `event_trigger` |
220
220
 
221
- 入口节点始终要成为 `nodeList` 中唯一的入口节点。
221
+ The entry node must always be the only entry node in `nodeList`.
222
222
 
223
- ### 6.2 业务节点映射
223
+ ### 6.2 Business Node Mapping
224
224
 
225
- | 意图节点语义 | 画布节点 `type` |
225
+ | Intent-node semantic meaning | Canvas node `type` |
226
226
  |---|---|
227
- | 行为分流 | `event_split_flow` |
228
- | 特征分流 | `feature_split_flow` |
229
- | A/B 分流 | `ab_split_flow` |
230
- | 行为判断 | `event_judge` |
231
- | 特征判断 | `feature_judge` |
232
- | Push 触达 | `message_push` |
233
- | 微信触达 | `wechat_push` |
234
- | Webhook / 其他外部触达 | `webhook_push` |
235
- | 等待 | `time_control` |
236
- | 结束 | `exit_flow` |
237
-
238
- ### 6.3 条件字段映射
239
-
240
- 条件类语义不能直接原样放进 `req`,要按下面方式落地:
241
-
242
- | 语义类型 | 目标字段 |
227
+ | Behavioral split | `event_split_flow` |
228
+ | Feature split | `feature_split_flow` |
229
+ | A/B split | `ab_split_flow` |
230
+ | Behavioral judgment | `event_judge` |
231
+ | Feature judgment | `feature_judge` |
232
+ | Push touchpoint | `message_push` |
233
+ | WeChat touchpoint | `wechat_push` |
234
+ | Webhook / other external touchpoint | `webhook_push` |
235
+ | Wait | `time_control` |
236
+ | End | `exit_flow` |
237
+
238
+ ### 6.3 Condition Field Mapping
239
+
240
+ Condition-related semantics cannot be copied into `req` as-is. They must be materialized in the following way:
241
+
242
+ | Semantic type | Target field |
243
243
  |---|---|
244
- | 受众分群条件 | `targetClusterQp` |
245
- | 特征判断条件 | `targetClusterQp` |
246
- | 特征分流分支条件 | `targetClusterQp` |
247
- | 事件触发条件 | `triggerRule[].events[]` |
248
- | 行为判断条件 | `triggerRule[].events[]` |
249
- | 行为分流分支条件 | `triggerRule[].events[]` |
244
+ | Audience segmentation condition | `targetClusterQp` |
245
+ | Feature judgment condition | `targetClusterQp` |
246
+ | Feature split branch condition | `targetClusterQp` |
247
+ | Event trigger condition | `triggerRule[].events[]` |
248
+ | Behavioral judgment condition | `triggerRule[].events[]` |
249
+ | Behavioral split branch condition | `triggerRule[].events[]` |
250
250
 
251
- 简单理解:
252
- - “按人群 / 属性判断”的,多数落到 `targetClusterQp`
253
- - “按事件是否发生 / 发生几次判断”的,多数落到 `triggerRule.events`
251
+ In short:
252
+ - Conditions that judge by audience or property usually map to `targetClusterQp`
253
+ - Conditions that judge whether an event happened, or how many times it happened, usually map to `triggerRule.events`
254
254
 
255
- ### 6.4 触达节点映射
255
+ ### 6.4 Touchpoint Node Mapping
256
256
 
257
- 动作语义节点里的这些字段:
257
+ These fields inside action-semantic nodes:
258
258
 
259
259
  - `channel_name`
260
260
  - `content`
261
261
  - `languages`
262
262
 
263
- 需要落地到 push 节点 `config`:
263
+ need to be materialized into the push-node `config`:
264
264
 
265
- - `channel_name` -> 匹配成真实 `channelId`
266
- - `content` -> 放进 `contentList`
267
- - `languages` -> 决定是否生成多语言 `contentList`
265
+ - `channel_name` -> match to a real `channelId`
266
+ - `content` -> place into `contentList`
267
+ - `languages` -> determine whether multilingual `contentList` entries should be generated
268
268
 
269
269
  ---
270
270
 
271
- ## 7. 第五步:`nodeList` 怎么写
271
+ ## 7. Step Five: How to Build `nodeList`
272
272
 
273
- `nodeList` 中每一项结构如下:
273
+ Each item in `nodeList` has the following structure:
274
274
 
275
- | 字段 | 类型 | 必填 | 说明 |
275
+ | Field | Type | Required | Description |
276
276
  |---|---|---|---|
277
- | `id` | string | 是 | 请求内唯一节点 ID |
278
- | `name` | string | 是 | 节点显示名 |
279
- | `type` | string | 是 | 节点类型 |
280
- | `config` | string | 是 | **JSON 字符串**,顶层必须是 JSON 对象 |
281
- | `desc` | string | 否 | 节点描述 |
277
+ | `id` | string | Yes | Unique node ID within the request |
278
+ | `name` | string | Yes | Display name of the node |
279
+ | `type` | string | Yes | Node type |
280
+ | `config` | string | Yes | **JSON string** whose top level must be a JSON object |
281
+ | `desc` | string | No | Node description |
282
282
 
283
- ### 7.1 最关键的规则
283
+ ### 7.1 Most Important Rules
284
284
 
285
- 1. `config` 必须是字符串,不是对象。
286
- 2. `node.id` 必须唯一。
287
- 3. 分支节点、判断节点里会被 `edge.sourceBranchId` 用到的 branchId,必须先定义在 `config` 里。
288
- 4. 所有路径最终都要落到 `exit_flow`。
285
+ 1. `config` must be a string, not an object.
286
+ 2. `node.id` must be unique.
287
+ 3. Any `branchId` later referenced by `edge.sourceBranchId` in split or judgment nodes must be defined in `config` first.
288
+ 4. Every path must eventually end at `exit_flow`.
289
289
 
290
- ### 7.2 常见节点类型
290
+ ### 7.2 Common Node Types
291
291
 
292
292
  - `single_trigger`
293
293
  - `repeat_trigger`
@@ -303,12 +303,12 @@ te-cli te-engage +channel-list --project-id <projectId>
303
303
  - `time_control`
304
304
  - `exit_flow`
305
305
 
306
- ### 7.3 示例:最简单节点
306
+ ### 7.3 Example: Simplest Node
307
307
 
308
308
  ```json
309
309
  {
310
310
  "id": "node_1",
311
- "name": "定时单次进入",
311
+ "name": "One-Time Scheduled Entry",
312
312
  "type": "single_trigger",
313
313
  "config": {
314
314
  "triggerTime": "2026-04-10 06:35",
@@ -317,9 +317,9 @@ te-cli te-engage +channel-list --project-id <projectId>
317
317
  }
318
318
  ```
319
319
 
320
- ### 7.4 常用 `config` 模板
320
+ ### 7.4 Common `config` Templates
321
321
 
322
- 下面这些模板是“直接拼 `req`”时最该优先参考的部分。使用时先按对象构造,再整体 `JSON.stringify` 放进 `nodeList[].config`。
322
+ The templates below are the most important references when you assemble `req` directly. Build them as objects first, then wrap them with `JSON.stringify` before placing them into `nodeList[].config`.
323
323
 
324
324
  #### `repeat_trigger`
325
325
 
@@ -341,10 +341,10 @@ te-cli te-engage +channel-list --project-id <projectId>
341
341
  }
342
342
  ```
343
343
 
344
- 规则:
344
+ Rules:
345
345
  - `entry.segment` -> `targetClusterQp`
346
346
  - `entry.schedule` -> `crontab`
347
- - 常见默认值可用 `0 00 09 * * ?`
347
+ - Common default value: `0 00 09 * * ?`
348
348
 
349
349
  #### `event_trigger`
350
350
 
@@ -376,14 +376,14 @@ te-cli te-engage +channel-list --project-id <projectId>
376
376
  "enableMultEntry": false,
377
377
  "disableConcurrentEntry": false
378
378
  },
379
- "targetClusterQp": "<JSON.stringify(qp) 或 null>"
379
+ "targetClusterQp": "<JSON.stringify(qp) or null>"
380
380
  }
381
381
  ```
382
382
 
383
- 规则:
383
+ Rules:
384
384
  - `entry.trigger_event` -> `triggerRule[0].events`
385
- - `entry.segment` 存在时再生成 `targetClusterQp`
386
- - 没有 `segment` 时,`targetClusterQp` 可为 `null`
385
+ - Generate `targetClusterQp` only when `entry.segment` exists
386
+ - When `segment` is absent, `targetClusterQp` may be `null`
387
387
 
388
388
  #### `event_split_flow`
389
389
 
@@ -399,7 +399,7 @@ te-cli te-engage +channel-list --project-id <projectId>
399
399
  {
400
400
  "delayTimeSymbol": "<minute|hour|day>",
401
401
  "delayTime": "<number>",
402
- "eventTriggerType": "<0 或 -1>",
402
+ "eventTriggerType": "<0 or -1>",
403
403
  "zoneoffset": 8,
404
404
  "events": []
405
405
  }
@@ -409,11 +409,11 @@ te-cli te-engage +channel-list --project-id <projectId>
409
409
  }
410
410
  ```
411
411
 
412
- 规则:
413
- - `branch.condition` 是行为条件时,落到 `triggerRule[].events[]`
412
+ Rules:
413
+ - When `branch.condition` is an event condition, map it to `triggerRule[].events[]`
414
414
  - `time_limit` -> `delayTimeSymbol` + `delayTime`
415
- - “发生”用 `0`,“未发生”用 `-1`
416
- - 兜底分支只保留:
415
+ - Use `0` for happened and `-1` for not happened
416
+ - For the fallback branch, keep only:
417
417
 
418
418
  ```json
419
419
  {
@@ -442,9 +442,9 @@ te-cli te-engage +channel-list --project-id <projectId>
442
442
  }
443
443
  ```
444
444
 
445
- 规则:
446
- - 属性 / 标签条件 -> `targetClusterQp`
447
- - 兜底分支同样只保留 `branchId` + `branchType: 2`
445
+ Rules:
446
+ - Property or tag condition -> `targetClusterQp`
447
+ - For the fallback branch, also keep only `branchId` plus `branchType: 2`
448
448
 
449
449
  #### `ab_split_flow`
450
450
 
@@ -453,14 +453,14 @@ te-cli te-engage +channel-list --project-id <projectId>
453
453
  "branchList": [
454
454
  {
455
455
  "branchId": "<branchId>",
456
- "branchName": "对照组",
456
+ "branchName": "Control Group",
457
457
  "branchType": 1,
458
458
  "order": 1,
459
459
  "percentageInExperiment": 34
460
460
  },
461
461
  {
462
462
  "branchId": "<branchId>",
463
- "branchName": "实验组 A",
463
+ "branchName": "Experiment Group A",
464
464
  "branchType": 2,
465
465
  "order": 2,
466
466
  "percentageInExperiment": 33
@@ -471,9 +471,9 @@ te-cli te-engage +channel-list --project-id <projectId>
471
471
  }
472
472
  ```
473
473
 
474
- 规则:
475
- - 用户没给比例时可均分
476
- - 3 组时可用 `34/33/33`
474
+ Rules:
475
+ - If the user does not provide percentages, you may split them evenly
476
+ - For three groups, you can use `34/33/33`
477
477
 
478
478
  #### `event_judge`
479
479
 
@@ -494,10 +494,10 @@ te-cli te-engage +channel-list --project-id <projectId>
494
494
  }
495
495
  ```
496
496
 
497
- 规则:
497
+ Rules:
498
498
  - `node.event` -> `triggerRule[].events[]`
499
499
  - `wait_time` -> `delayTimeSymbol` + `delayTime`
500
- - 未指定等待时长时,可默认 `30 minute`
500
+ - If no wait duration is specified, you may default to `30 minute`
501
501
 
502
502
  #### `feature_judge`
503
503
 
@@ -530,21 +530,21 @@ te-cli te-engage +channel-list --project-id <projectId>
530
530
  }
531
531
  ```
532
532
 
533
- 规则:
534
- - `channel_name` -> 匹配真实 `channelId`
535
- - `content` -> 优先填入最像“正文 / 内容 / 消息”的参数
536
- - 当参数 `type = TEXT` 时,额外补:
533
+ Rules:
534
+ - `channel_name` -> match a real `channelId`
535
+ - `content` -> fill the parameter that best matches body text, content, or message
536
+ - When the parameter `type = TEXT`, also add:
537
537
 
538
538
  ```json
539
539
  {
540
- "config": "[{\"type\":\"paragraph\",\"children\":[{\"text\":\"<与 value 相同>\"}]}]"
540
+ "config": "[{\"type\":\"paragraph\",\"children\":[{\"text\":\"<same as value>\"}]}]"
541
541
  }
542
542
  ```
543
543
 
544
- 多语言规则:
545
- - 第一条始终是 `"pushLanguageCode": "default"`
546
- - 后续按 `languages` 生成其他语言版本
547
- - 每种语言的 `content[]` 结构相同,只替换 `value`
544
+ Multilingual Rules:
545
+ - The first entry must always use `"pushLanguageCode": "default"`
546
+ - Generate additional language versions according to `languages`
547
+ - Each language uses the same `content[]` structure; only `value` changes
548
548
 
549
549
  #### `wechat_push`
550
550
 
@@ -562,7 +562,7 @@ te-cli te-engage +channel-list --project-id <projectId>
562
562
  "type": "STRING",
563
563
  "required": true,
564
564
  "paramType": 2,
565
- "name": "语言",
565
+ "name": "Language",
566
566
  "value": "default"
567
567
  },
568
568
  {
@@ -570,7 +570,7 @@ te-cli te-engage +channel-list --project-id <projectId>
570
570
  "type": "STRING",
571
571
  "required": true,
572
572
  "paramType": 2,
573
- "name": "跳转页面",
573
+ "name": "Destination Page",
574
574
  "value": ""
575
575
  },
576
576
  {
@@ -578,7 +578,7 @@ te-cli te-engage +channel-list --project-id <projectId>
578
578
  "type": "STRING",
579
579
  "required": true,
580
580
  "paramType": 2,
581
- "name": "版本",
581
+ "name": "Version",
582
582
  "value": ""
583
583
  }
584
584
  ]
@@ -598,14 +598,14 @@ te-cli te-engage +channel-list --project-id <projectId>
598
598
  }
599
599
  ```
600
600
 
601
- 常见解析:
602
- - `30分钟` -> `minute` + `30`
603
- - `2小时` -> `hour` + `2`
604
- - `1天` -> `day` + `1`
601
+ Common parsing examples:
602
+ - `30 minutes` -> `minute` + `30`
603
+ - `2 hours` -> `hour` + `2`
604
+ - `1 day` -> `day` + `1`
605
605
 
606
606
  #### `exit_flow`
607
607
 
608
- 最小可用 `config`:
608
+ Minimum usable `config`:
609
609
 
610
610
  ```json
611
611
  {}
@@ -613,19 +613,19 @@ te-cli te-engage +channel-list --project-id <projectId>
613
613
 
614
614
  ---
615
615
 
616
- ## 8. 第六步:`edgeList` 怎么写
616
+ ## 8. Step Six: How to Build `edgeList`
617
617
 
618
- `edgeList` 中每一项结构如下:
618
+ Each item in `edgeList` has the following structure:
619
619
 
620
- | 字段 | 类型 | 必填 | 说明 |
620
+ | Field | Type | Required | Description |
621
621
  |---|---|---|---|
622
- | `source` | string | 是 | 上游节点 ID |
623
- | `target` | string | 是 | 下游节点 ID |
624
- | `edgeId` | string | 否 | 连线 ID |
625
- | `sourceBranchId` | string | 否 | 分支/判断节点出边时使用 |
626
- | `config` | string | 否 | JSON 字符串 |
622
+ | `source` | string | Yes | upstream node ID |
623
+ | `target` | string | Yes | downstream node ID |
624
+ | `edgeId` | string | No | edge ID |
625
+ | `sourceBranchId` | string | No | used for edges leaving split or judgment nodes |
626
+ | `config` | string | No | JSON string |
627
627
 
628
- ### 8.1 普通连线
628
+ ### 8.1 Regular Edges
629
629
 
630
630
  ```json
631
631
  {
@@ -634,7 +634,7 @@ te-cli te-engage +channel-list --project-id <projectId>
634
634
  }
635
635
  ```
636
636
 
637
- ### 8.2 分支连线
637
+ ### 8.2 Branch Edges
638
638
 
639
639
  ```json
640
640
  {
@@ -644,55 +644,55 @@ te-cli te-engage +channel-list --project-id <projectId>
644
644
  }
645
645
  ```
646
646
 
647
- ### 8.3 最关键的规则
647
+ ### 8.3 Most Important Rules
648
648
 
649
- 1. `source` 和 `target` 必须引用真实存在的 `node.id`
650
- 2. 只有分支节点 / 判断节点的出边才需要 `sourceBranchId`
651
- 3. 图必须是 DAG,不能有环
652
- 4. 分支节点的 `sourceBranchId` 必须来自对应节点 `config` 里已经声明过的 branchId
649
+ 1. `source` and `target` must reference existing `node.id` values
650
+ 2. Only edges leaving split or judgment nodes need `sourceBranchId`
651
+ 3. The graph must be a DAG and cannot contain cycles
652
+ 4. For split nodes, `sourceBranchId` must come from a branchId already declared in the corresponding node `config`
653
653
 
654
- ### 8.4 标准出边规则
654
+ ### 8.4 Standard Outgoing-Edge Rules
655
655
 
656
- | 节点类型 | 出边数 | `sourceBranchId` 规则 |
656
+ | node type | Number of outgoing edges | `sourceBranchId` rule |
657
657
  |---|---|---|
658
- | `single_trigger` / `repeat_trigger` / `event_trigger` | 1 | 不传 |
659
- | `event_split_flow` / `feature_split_flow` / `ab_split_flow` | 每分支 1 条 | 对应 `branchList[].branchId` |
660
- | `event_judge` / `feature_judge` | 2 | 分别使用 `meetBranchId` / `notMeetBranchId` |
661
- | `message_push` / `wechat_push` / `webhook_push` / `time_control` | 1 | 不传 |
662
- | `exit_flow` | 0 | 不传 |
658
+ | `single_trigger` / `repeat_trigger` / `event_trigger` | 1 | do not provide |
659
+ | `event_split_flow` / `feature_split_flow` / `ab_split_flow` | one per branch | use the corresponding `branchList[].branchId` |
660
+ | `event_judge` / `feature_judge` | 2 | use `meetBranchId` and `notMeetBranchId` respectively |
661
+ | `message_push` / `wechat_push` / `webhook_push` / `time_control` | 1 | do not provide |
662
+ | `exit_flow` | 0 | do not provide |
663
663
 
664
664
  ---
665
665
 
666
- ## 9. 第七步:图约束检查
666
+ ## 9. Step Seven: Graph Constraint Checks
667
667
 
668
- 在提交前必须自检:
668
+ Before submitting, you must self-check:
669
669
 
670
- 1. `nodeList` 非空
671
- 2. 入口节点必须且只能有一个
672
- 3. 至少有一个 `exit_flow`
673
- 4. 每个 `exit_flow` 恰好一条入边,且没有出边
674
- 5. 每个 `node.id` 唯一
675
- 6. 每条边引用的节点都存在
676
- 7. 整张图无环
670
+ 1. `nodeList` is not empty
671
+ 2. There must be exactly one entry node
672
+ 3. There must be at least one `exit_flow`
673
+ 4. Each `exit_flow` must have exactly one incoming edge and no outgoing edges
674
+ 5. Each `node.id` must be unique
675
+ 6. Every edge must reference existing nodes
676
+ 7. The entire graph must be acyclic
677
677
 
678
- 如果分流节点使用 `splitFlowType = 2`,还要额外保证:
679
- - 不同分支后续路径不要再次汇合到同一个节点
680
- - 每条分支应独立走到自己的 `exit_flow`
678
+ If a split node uses `splitFlowType = 2`, also ensure:
679
+ - Paths from different branches must not converge again into the same node
680
+ - Each branch should independently lead to its own `exit_flow`
681
681
 
682
682
  ---
683
683
 
684
- ## 10. 第八步:CLI 提交
684
+ ## 10. Step Eight: CLI Submission
685
685
 
686
- ### 10.1 顶层 flags
686
+ ### 10.1 Top-Level Flags
687
687
 
688
- | Flag | 类型 | 必填 | 说明 |
688
+ | Flag | Type | Required | Description |
689
689
  |---|---|---|---|
690
- | `--project-id` / `-p` | number | 是 | 项目 ID |
691
- | `--req` | json | 是 | 最终请求体对象 |
690
+ | `--project_id` / `-p` | number | Yes | Project ID |
691
+ | `--req` | json | Yes | final request-body object |
692
692
 
693
- ### 10.2 CLI 实际提交结构
693
+ ### 10.2 Actual CLI Submission Structure
694
694
 
695
- CLI 会把输入整理成:
695
+ The CLI will organize the input as:
696
696
 
697
697
  ```json
698
698
  {
@@ -704,15 +704,15 @@ CLI 会把输入整理成:
704
704
  }
705
705
  ```
706
706
 
707
- 也就是说:
708
- - 顶层 `projectId` 来自 `--project-id`
709
- - `req.projectId` 也会由 CLI 自动注入
707
+ In other words:
708
+ - The top-level `projectId` comes from `--project_id`
709
+ - `req.projectId` is also injected automatically by the CLI
710
710
 
711
- ### 10.3 最小可用示例
711
+ ### 10.3 Minimum Working Example
712
712
 
713
713
  ```bash
714
- te-cli te-engage +save-flow \
715
- --project-id 1 \
714
+ ae-cli engage +save_flow \
715
+ --project_id 1 \
716
716
  --req '{
717
717
  "flowName": "Welcome Flow",
718
718
  "flowDesc": "New user welcome flow",
@@ -721,13 +721,13 @@ te-cli te-engage +save-flow \
721
721
  "nodeList": [
722
722
  {
723
723
  "id": "node_1",
724
- "name": "进入流程",
724
+ "name": "Enter Flow",
725
725
  "type": "single_trigger",
726
726
  "config": "{}"
727
727
  },
728
728
  {
729
729
  "id": "node_2",
730
- "name": "结束",
730
+ "name": "End",
731
731
  "type": "exit_flow",
732
732
  "config": "{}"
733
733
  }
@@ -741,57 +741,58 @@ te-cli te-engage +save-flow \
741
741
  }'
742
742
  ```
743
743
 
744
- ### 10.4 创建成功后的输出要求
744
+ ### 10.4 Output Requirements After Successful Creation
745
745
 
746
- 前置条件:
747
- - 创建流程画布成功,返回了新创建的流程画布 `flowUuid`
746
+ Prerequisite:
747
+ - The flow canvas was created successfully and returned the new canvas `flowUuid`
748
748
 
749
- 成功时必须:
750
- - 向用户展示创建结果,至少包含画布名称等关键信息
751
- - 必须输出一个**可点击的 Markdown 链接**
749
+ On success, you must:
750
+ - Show the creation result to the user, including at least key information such as the canvas name
751
+ - Output a **clickable Markdown link**
752
752
 
753
- 链接生成规则:
754
- - 使用标准 Markdown 链接语法,禁止放在代码块中
755
- - URL 必须以 `/#/` 开头,禁止添加域名或任何域名占位符
756
- - 将 `save_flow` 返回的 `flowUuid` 和本次创建使用的 `projectId` 替换到 URL 中
753
+ Link-generation Rules:
754
+ - Use standard Markdown link syntax and do not place it inside a code block
755
+ - The URL must start with `/#/`
756
+ - Do not add a domain name or any domain placeholder
757
+ - Replace the `flowUuid` returned by `save_flow` and the `projectId` used for this creation into the URL
757
758
 
758
- 输出模板:
759
+ Output template:
759
760
 
760
- [点击查看画布](/#/hermes/flow/detail?flowUuid=<替换为实际flowUuid>&currentProjectId=<替换为实际projectId>)
761
+ [Open Canvas](/#/hermes/flow/detail?flowUuid=<replace-with-actual-flowUuid>&currentProjectId=<replace-with-actual-projectId>)
761
762
 
762
- 正确示例:
763
+ Correct example:
763
764
 
764
- [点击查看画布](/#/hermes/flow/detail?flowUuid=0006_831135755&currentProjectId=1)
765
+ [Open Canvas](/#/hermes/flow/detail?flowUuid=0006_831135755&currentProjectId=1)
765
766
 
766
- 常见错误:
767
- - `❌ {域名}/#/hermes/flow/...`:不要加域名占位符
768
- - `❌` 把链接放在代码块 ````` 中:代码块内的链接不可点击
769
- - `❌ /#/hermes/flow/detail?flowUuid=...`:不要输出纯文本 URL,必须使用 `[文字](URL)` 格式
767
+ Common mistakes:
768
+ - `❌ {domain}/#/hermes/flow/...`: do not add a domain placeholder
769
+ - `❌` putting the link inside a code block ````` : links inside code blocks are not clickable
770
+ - `❌ /#/hermes/flow/detail?flowUuid=...`: do not output a plain-text URL; you must use the `[text](URL)` format
770
771
 
771
- ### 10.5 创建失败后的输出要求
772
+ ### 10.5 Output Requirements After Failed Creation
772
773
 
773
- 失败时必须:
774
- - 输出完整请求体 JSON,供用户调试
775
- - 明确说明失败原因
774
+ On failure, you must:
775
+ - Output the complete request-body JSON for debugging
776
+ - Clearly describe the failure reason
776
777
 
777
- 建议输出结构:
778
+ Suggested output structure:
778
779
 
779
780
  ```json
780
781
  {
781
- "projectId": "<实际 projectId>",
782
+ "projectId": "<actual projectId>",
782
783
  "req": {
783
- "...": "完整 save_flow 请求体"
784
+ "...": "complete save_flow request body"
784
785
  }
785
786
  }
786
787
  ```
787
788
 
788
789
  ---
789
790
 
790
- ## 11. 最容易写错的地方
791
+ ## 11. Most Common Mistakes
791
792
 
792
- ### 11.1 `--req` 是对象,但 `node.config` / `edge.config` 是字符串
793
+ ### 11.1 `--req` Is an Object, but `node.config` / `edge.config` Are Strings
793
794
 
794
- 正确:
795
+ Correct:
795
796
 
796
797
  ```json
797
798
  {
@@ -802,7 +803,7 @@ te-cli te-engage +save-flow \
802
803
  }
803
804
  ```
804
805
 
805
- 错误:
806
+ Incorrect:
806
807
 
807
808
  ```json
808
809
  {
@@ -813,9 +814,9 @@ te-cli te-engage +save-flow \
813
814
  }
814
815
  ```
815
816
 
816
- ### 11.2 时间单位必须小写
817
+ ### 11.2 Time Units Must Be Lowercase
817
818
 
818
- 像 `time_control` 里,应使用:
819
+ Inside `time_control`, use:
819
820
 
820
821
  - `day`
821
822
  - `hour`
@@ -823,48 +824,48 @@ te-cli te-engage +save-flow \
823
824
  - `week`
824
825
  - `month`
825
826
 
826
- 不要写成 `DAY`、`HOUR`、`MINUTE`。
827
+ Do not write `DAY`, `HOUR`, or `MINUTE`.
827
828
 
828
- ### 11.3 不要凭空写 `channelId`
829
+ ### 11.3 Do Not Invent `channelId`
829
830
 
830
- `message_push`、`wechat_push`、`webhook_push` 这类节点的 `channelId`,必须来自:
831
+ For node types such as `message_push`, `wechat_push`, and `webhook_push`, `channelId` must come from:
831
832
 
832
833
  ```bash
833
- te-cli te-engage +channel-list --project-id <projectId>
834
+ ae-cli engage +channel_list --project_id <projectId>
834
835
  ```
835
836
 
836
- ### 11.4 分支 ID 必须先定义再引用
837
+ ### 11.4 Define branch IDs Before Referencing Them
837
838
 
838
- 如果某条边用了:
839
+ If an edge uses:
839
840
 
840
841
  ```json
841
842
  { "sourceBranchId": "branch_a" }
842
843
  ```
843
844
 
844
- 那么 `"branch_a"` 必须已经存在于对应上游节点的 `config` 中。
845
+ then `"branch_a"` must already exist in the corresponding upstream node `config`.
845
846
 
846
- ### 11.5 `targetClusterQp` 本身通常也是字符串
847
+ ### 11.5 `targetClusterQp` Is Usually Also a String
847
848
 
848
- 虽然 `targetClusterQp` 出现在节点 `config` 的 JSON 对象里,但它的值通常也不是原始对象,而是 QP 对象再做一次 `JSON.stringify` 后的字符串。
849
+ Although `targetClusterQp` appears inside the JSON object of node `config`, its value is usually not a raw object. It is typically the QP object converted into a string with `JSON.stringify`.
849
850
 
850
- 示意:
851
+ Illustration:
851
852
 
852
853
  ```json
853
854
  { "targetClusterQp": "{\"totalCFilter\":{\"relation\":\"1\",\"filts\":[]}}" }
854
855
  ```
855
856
 
856
- ### 11.6 `TEXT` 参数的富文本 `config` 也必须是字符串
857
+ ### 11.6 Rich-Text `config` for `TEXT` Parameters Must Also Be a String
857
858
 
858
- push 参数如果是 `TEXT`,它内部那个富文本 `config` 不是对象,而是字符串化 JSON。这个点很容易漏。
859
+ If a push parameter uses `TEXT`, the inner rich-text `config` must not be an object. It must be stringified JSON. This is easy to miss.
859
860
 
860
- ### 11.7 `splitFlowType = 2` 时不要让分支重新汇合
861
+ ### 11.7 Do Not Merge Branches Again When `splitFlowType = 2`
861
862
 
862
- “满足条件即进入”表示用户可能同时进入多个分支,这时后续路径不要共用同一个节点,否则语义容易冲突。
863
+ "Enter whenever conditions are met" means users may enter multiple branches at the same time. In that case, later paths should not share the same downstream node, otherwise the semantics easily conflict.
863
864
 
864
865
  ---
865
866
 
866
- ## 12. 一句话总结
867
+ ## 12. One-Sentence Summary
867
868
 
868
- 要稳定构建 `+save-flow` 的入参,不能直接从自然语言跳到 `req`,而应该遵循这条链路:
869
+ To build `+save_flow` input parameters reliably, do not jump directly from natural language to `req`. Follow this path instead:
869
870
 
870
- **用户需求 -> 意图 JSON -> schema / 通道补全 -> `nodeList` / `edgeList` -> `te-cli te-engage +save-flow`。**
871
+ **User requirement -> intent JSON -> schema and channel completion -> `nodeList` / `edgeList` -> `ae-cli engage +save_flow`.**