@thinkingai/ae-cli 6.1.12 → 6.1.14

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 (154) hide show
  1. package/README.md +0 -2
  2. package/README.zh.md +0 -2
  3. package/dist/{auth-NN55553T.js → auth-GBMV6TEJ.js} +2 -2
  4. package/dist/{auth-GDV3H5I4.js → auth-NDSXE54J.js} +4 -4
  5. package/dist/{capability-DRLGDVS4.js → capability-TAMDRZYV.js} +18 -8
  6. package/dist/{capability-P6GK3AQH.js → capability-U7TDEEEG.js} +18 -8
  7. package/dist/{chunk-GJJA4CQZ.js → chunk-3FY3RJ26.js} +0 -4
  8. package/dist/{chunk-GS2P7LFD.js → chunk-5XUSIK27.js} +2 -2
  9. package/dist/{chunk-7KQWSBSL.js → chunk-753BUTNZ.js} +3 -3
  10. package/dist/{chunk-VTXHDCBW.js → chunk-AFXA7BRK.js} +2 -2
  11. package/dist/chunk-IBH3LDAH.js +556 -0
  12. package/dist/{chunk-RBNKI5ZW.js → chunk-JUW4AJXN.js} +2 -2
  13. package/dist/{chunk-TS6BUGUY.js → chunk-QATA32VR.js} +3 -3
  14. package/dist/{chunk-Z3OXWCIA.js → chunk-S5NTSDBS.js} +2 -2
  15. package/dist/chunk-UIHQJK5E.js +556 -0
  16. package/dist/{chunk-VKD5WQKN.js → chunk-VLWOLBGZ.js} +142 -24
  17. package/dist/{chunk-YTG6Q75E.js → chunk-WZRX4KOH.js} +25 -3
  18. package/dist/{chunk-YV52FB5G.js → chunk-ZQKDZXDO.js} +1 -1
  19. package/dist/{cli-token-GL5MS5FK.js → cli-token-4UPER74P.js} +3 -3
  20. package/dist/{chunk-6A2FUCIS.js → client-L2YDMHQ6.js} +5 -6
  21. package/dist/{config-4VZNLBKF.js → config-OL2LWGBV.js} +4 -33
  22. package/dist/index.js +25 -38
  23. package/dist/{memory-RWJW4XFO.js → memory-MUP7PPL7.js} +4 -4
  24. package/dist/{memory-VO2ZJCRT.js → memory-U4O5PMXH.js} +4 -4
  25. package/dist/{metadata-ZRN2GHPN.js → metadata-5MIMNIMT.js} +33 -20
  26. package/dist/{metadata-YGTHR2XJ.js → metadata-LERKDJN6.js} +33 -20
  27. package/dist/{model-CLUIK3K5.js → model-JTUEO5M4.js} +2 -2
  28. package/dist/{sync-3REDHGY6.js → sync-MOSFNBVR.js} +5 -5
  29. package/dist/{te-agent-XNPELAKX.js → te-agent-IFKZDHZI.js} +25 -18
  30. package/dist/{te-analysis-GJI5FZUL.js → te-analysis-FCHRTNIY.js} +1267 -492
  31. package/dist/{te-analysis-N2BRDJZ5.js → te-analysis-QG7UKGDA.js} +1267 -492
  32. package/dist/{te-community-SQXKE5OO.js → te-community-HNKVTERD.js} +207 -12
  33. package/dist/{te-community-TYSNU3NQ.js → te-community-IWE5B7W6.js} +208 -12
  34. package/dist/{te-dataops-OWIADNSM.js → te-dataops-KQPYNAE3.js} +262 -145
  35. package/dist/{te-dataops-5TM7WZDI.js → te-dataops-KXCEB4CS.js} +262 -145
  36. package/dist/{te-engage-L72HWRGO.js → te-engage-D6EG3NOR.js} +951 -17
  37. package/dist/{te-engage-QWM4GFS7.js → te-engage-ZSMIJLUW.js} +951 -17
  38. package/dist/{te-experiment-2T2HEZML.js → te-experiment-K5US7RMG.js} +6 -6
  39. package/dist/{te-experiment-PVEY7AEZ.js → te-experiment-WA7TFMEL.js} +6 -6
  40. package/dist/{te-kb-VRMEY3D4.js → te-kb-OIH3T6CS.js} +4 -4
  41. package/dist/{te-system-XGS5EQIQ.js → te-system-AZ3URMUO.js} +515 -11
  42. package/dist/{te-team-BZRDV2CM.js → te-team-GZPU6UWA.js} +5 -5
  43. package/dist/{update-HEDXGOJH.js → update-TOBFXF2V.js} +4 -4
  44. package/package.json +5 -5
  45. package/skills/ae-agent/SKILL.md +3 -3
  46. package/skills/ae-agent/references/list-skill-references.md +4 -4
  47. package/skills/ae-agent/references/read-skill-reference.md +10 -7
  48. package/skills/ae-agent/references/upload-skill-reference.md +11 -9
  49. package/skills/ae-analysis/SKILL.md +15 -12
  50. package/skills/ae-analysis/metadata_resolution.md +150 -0
  51. package/skills/ae-analysis/references/adhoc_export.md +17 -2
  52. package/skills/ae-analysis/references/adhoc_run.md +12 -8
  53. package/skills/ae-analysis/references/ai_models.md +35 -6
  54. package/skills/ae-analysis/references/alert_list.md +2 -3
  55. package/skills/ae-analysis/references/analysis_data_retrieval.md +104 -16
  56. package/skills/ae-analysis/references/analysis_drilldown_contract.md +4 -4
  57. package/skills/ae-analysis/references/analysis_gateway_assets.md +17 -15
  58. package/skills/ae-analysis/references/artifact_download.md +4 -3
  59. package/skills/ae-analysis/references/asset_abnormal_list.md +5 -3
  60. package/skills/ae-analysis/references/asset_authentication_list.md +5 -3
  61. package/skills/ae-analysis/references/asset_search.md +5 -3
  62. package/skills/ae-analysis/references/bi_panel_list.md +2 -2
  63. package/skills/ae-analysis/references/bi_panel_page_data_export.md +1 -1
  64. package/skills/ae-analysis/references/bi_panel_page_data_run.md +4 -4
  65. package/skills/ae-analysis/references/catalog_export.md +28 -0
  66. package/skills/ae-analysis/references/catalog_list.md +44 -0
  67. package/skills/ae-analysis/references/command_index.md +78 -69
  68. package/skills/ae-analysis/references/dashboard_list.md +2 -2
  69. package/skills/ae-analysis/references/dashboard_report_data_run.md +11 -4
  70. package/skills/ae-analysis/references/datatable_version_list.md +5 -3
  71. package/skills/ae-analysis/references/drilldown_entities_run.md +4 -4
  72. package/skills/ae-analysis/references/drilldown_events_run.md +2 -2
  73. package/skills/ae-analysis/references/drilldown_user_events_export.md +1 -1
  74. package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -2
  75. package/skills/ae-analysis/references/entity_detail_run.md +4 -4
  76. package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
  77. package/skills/ae-analysis/references/event_detail_run.md +4 -4
  78. package/skills/ae-analysis/references/event_export.md +21 -0
  79. package/skills/ae-analysis/references/event_list.md +7 -6
  80. package/skills/ae-analysis/references/exchange_rule_list.md +5 -3
  81. package/skills/ae-analysis/references/favorite_add.md +2 -2
  82. package/skills/ae-analysis/references/favorite_remove.md +2 -2
  83. package/skills/ae-analysis/references/history_tag_data_drilldown_export.md +4 -2
  84. package/skills/ae-analysis/references/history_tag_data_drilldown_run.md +2 -2
  85. package/skills/ae-analysis/references/history_tag_data_run.md +2 -2
  86. package/skills/ae-analysis/references/metric_create.md +7 -8
  87. package/skills/ae-analysis/references/metric_export.md +21 -0
  88. package/skills/ae-analysis/references/metric_list.md +8 -7
  89. package/skills/ae-analysis/references/project_space_list.md +2 -2
  90. package/skills/ae-analysis/references/property_export.md +21 -0
  91. package/skills/ae-analysis/references/property_list.md +9 -8
  92. package/skills/ae-analysis/references/public_link_list.md +2 -2
  93. package/skills/ae-analysis/references/query_context_get.md +20 -0
  94. package/skills/ae-analysis/references/query_create_result_cluster.md +1 -1
  95. package/skills/ae-analysis/references/report_change_log_list.md +1 -1
  96. package/skills/ae-analysis/references/report_create.md +3 -3
  97. package/skills/ae-analysis/references/report_data_run.md +8 -8
  98. package/skills/ae-analysis/references/report_list.md +3 -3
  99. package/skills/ae-analysis/references/report_list_export.md +2 -2
  100. package/skills/ae-analysis/references/report_update.md +3 -3
  101. package/skills/ae-analysis/references/report_version_rollback.md +1 -1
  102. package/skills/ae-analysis/references/rule_list.md +6 -4
  103. package/skills/ae-analysis/references/run_inspect.md +8 -5
  104. package/skills/ae-analysis/references/run_wait.md +37 -0
  105. package/skills/ae-analysis/references/sql_table_list.md +3 -2
  106. package/skills/ae-analysis/references/user_cluster_export.md +13 -0
  107. package/skills/ae-analysis/references/user_cluster_list.md +6 -2
  108. package/skills/ae-analysis/references/user_cluster_member_export.md +5 -3
  109. package/skills/ae-analysis/references/user_cluster_member_list.md +4 -4
  110. package/skills/ae-analysis/references/user_cluster_update.md +4 -2
  111. package/skills/ae-analysis/references/user_tag_export.md +13 -0
  112. package/skills/ae-analysis/references/user_tag_list.md +6 -2
  113. package/skills/ae-analysis/references/user_tag_member_export.md +5 -3
  114. package/skills/ae-analysis/references/user_tag_member_list.md +4 -4
  115. package/skills/ae-analysis/references/user_tag_update.md +4 -2
  116. package/skills/ae-analysis/references/virtual_property_create.md +2 -2
  117. package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +3 -3
  118. package/skills/ae-community/SKILL.md +2 -2
  119. package/skills/ae-dataops/SKILL.md +4 -3
  120. package/skills/ae-dataops/references/dataops-flow-create.md +47 -3
  121. package/skills/ae-engage/SKILL.md +55 -7
  122. package/skills/ae-engage/references/build-task-save-guide.md +12 -0
  123. package/skills/ae-engage/references/cancel-query-run.md +31 -0
  124. package/skills/ae-engage/references/config-item-analysis-report.md +14 -1
  125. package/skills/ae-engage/references/config-item-strategy-comparison.md +11 -1
  126. package/skills/ae-engage/references/config-item-trigger-report.md +15 -1
  127. package/skills/ae-engage/references/flow-metric-detail-report.md +134 -0
  128. package/skills/ae-engage/references/flow-metric-update.md +77 -0
  129. package/skills/ae-engage/references/flow-metric-user.md +119 -0
  130. package/skills/ae-engage/references/flow-node-metric-user.md +123 -0
  131. package/skills/ae-engage/references/flow-node-user.md +123 -0
  132. package/skills/ae-engage/references/push-record-query.md +32 -1
  133. package/skills/ae-engage/references/save-task.md +9 -0
  134. package/skills/ae-engage/references/task-data-detail.md +9 -2
  135. package/skills/ae-engage/references/task-indicator-user.md +104 -0
  136. package/skills/ae-engage/references/task-metric-detail.md +9 -2
  137. package/skills/ae-engage/references/task-submit-approval.md +3 -0
  138. package/skills/ae-engage/references/task-user-detail-export.md +31 -0
  139. package/skills/ae-experiment/references/save_experiment.md +4 -0
  140. package/skills/ae-experiment-design/SKILL.md +1 -1
  141. package/skills/ae-experiment-design/references/platform-operations.md +1 -1
  142. package/skills/ae-experiment-insight/references/platform-operations.md +1 -1
  143. package/skills/ae-metadata/SKILL.md +2 -1
  144. package/skills/ae-metadata/references/metadata_data_table_download.md +10 -2
  145. package/skills/ae-metadata/references/metadata_data_table_list.md +5 -2
  146. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
  147. package/skills/ae-system/SKILL.md +66 -3
  148. package/dist/chunk-DT6Y3TD7.js +0 -232
  149. package/dist/chunk-MVDZ7DBQ.js +0 -231
  150. package/dist/chunk-NBPKWKRA.js +0 -51
  151. package/dist/client-DAIPF7XN.js +0 -23
  152. package/dist/raw-52B4UKO4.js +0 -71
  153. package/dist/te-meta-53BVXPFI.js +0 -95
  154. package/dist/te-meta-TOCBPBXI.js +0 -95
@@ -17,7 +17,7 @@ The AE Data Development and Operations domain provides capabilities for data war
17
17
  |------------|----------------|------------------------------|
18
18
  | `dataops_repo` | Space discovery | — |
19
19
  | `dataops_datatable` | Data table and view management | `dataops-table` |
20
- | `dataops_flow` | Flow creation and orchestration | `dataops-flow-create` |
20
+ | `dataops_flow` | Flow creation, node deletion, and orchestration | `dataops-flow-create` |
21
21
  | `dataops_flow` | Flow execution and monitoring | `dataops-flow-monitor` |
22
22
  | `dataops_operations` | Operations instance search, details, and task logs | `dataops-flow-monitor` |
23
23
  | `dataops_ide` | Data exploration and SQL queries | `dataops-query` |
@@ -89,7 +89,7 @@ You must understand the following key concepts before use, otherwise errors are
89
89
  ### Flow Lifecycle
90
90
 
91
91
  ```
92
- Create DEV Flow → Create/Update DEV SQL, Integration, or Workflow Instance Check Tasks → Configure Dependencies/Schedule → Preview Release → Release to PROD → PROD Manual Execution / Operations Troubleshooting
92
+ Create DEV Flow → Create/Update DEV SQL, Integration, Workflow Instance Check, or Task Instance Check Tasks → Configure Dependencies/Schedule → Preview Release → Release to PROD → PROD Manual Execution / Operations Troubleshooting
93
93
  ```
94
94
 
95
95
  ### CRON Format (6 fields)
@@ -112,7 +112,7 @@ Choose the appropriate scenario skill based on user intent to get complete step-
112
112
 
113
113
  | User Intent | Trigger Skill | Keywords |
114
114
  |-------------|---------------|----------|
115
- | Create flow, add nodes, configure schedule, release | `dataops-flow-create` | create flow, new workflow, configure schedule, add task node, release, cron, scheduled execution |
115
+ | Create flow, add or delete nodes, configure schedule, release | `dataops-flow-create` | create flow, new workflow, configure schedule, add task node, delete task node, release, cron, scheduled execution |
116
116
  | View execution status, troubleshoot failures, view logs | `dataops-flow-monitor` | execute flow, running instance, monitor, logs, stop, DAG, troubleshoot |
117
117
  | Search operation instances across a space | `dataops-flow-monitor` | operations instance, flow instance search, status statistics, owner statistics |
118
118
  | Create datasource, configure sync solution, execute sync | `dataops-integration` | datasource, sync, integration, field mapping, data ingestion, MySQL, ClickHouse, DatabricksJdbc |
@@ -159,6 +159,7 @@ Detailed creation/configuration commands live in [`references/dataops-flow-creat
159
159
 
160
160
  Key constraints:
161
161
  - Create and update tasks in DEV, preview/release before PROD execution.
162
+ - Treat `+delete_task` as high-risk: verify the target with `+get_flow_overview`, preview with `--dry-run`, and use `--yes` only after explicit user confirmation. Deletion affects DEV; release the flow to apply it to PROD.
162
163
  - `+execute_flow` always runs PROD; it returns `executeId` for early stop.
163
164
  - Prefer `flowInstanceId` from operations search for stable inspection and troubleshooting.
164
165
  - Reference workspace parameters in task SQL as `${paramKey}`.
@@ -63,7 +63,9 @@ ae-cli dataops_flow +update_integration_task --spaceCode "${spaceCode}" \
63
63
 
64
64
  Use `dataops_integration +list_sync_solutions` or `+get_sync_detail` to find the `syncId` first. These commands expose workflow `OFFLINE_SYNC` tasks only; app sync tasks are not part of this flow.
65
65
 
66
- ### Step 4: Create or Modify Workflow Instance Check Task
66
+ ### Step 4: Create or Modify Instance Check Tasks
67
+
68
+ #### Workflow instance check
67
69
 
68
70
  `checkItems` is a flat JSON array. Every item contains only `flowCode`, `left`, `right`, and `checkTimeUnit` (`DAY`, `HOUR`, or `MINUTE`). One `AND` or `OR` relation applies to the entire array; nested groups are not supported. For the current workflow, `left` and `right` are at least `1`; for another workflow they may be `0`; `right` must not exceed `left`.
69
71
 
@@ -80,6 +82,23 @@ ae-cli dataops_flow +update_workflow_instance_check_task --spaceCode "${spaceCod
80
82
 
81
83
  Create defaults are `relation=AND`, `checkInterval=5`, `checkTime=3`, `failRetryTimes=3`, `failRetryInterval=5`, and `failRetryUnit=MINUTE`. On update, omitted check scalars, dependencies, and retry fields keep their current values.
82
84
 
85
+ #### Task instance check
86
+
87
+ Each task instance `checkItems` entry contains only `flowCode`, `taskCode`, `left`, `right`, and `checkTimeUnit`. The nested `checkItems[].taskCode` identifies a target task inside that item's `flowCode`. On update, the top-level `--taskCode` identifies the TASK_CHECK node to update; it is not a target task code. Use `+get_flow_overview` to discover target task codes. Checking the TASK_CHECK node itself is supported.
88
+
89
+ ```bash
90
+ ae-cli dataops_flow +create_task_instance_check_task --spaceCode "${spaceCode}" \
91
+ --flowCode ${flowCode} --taskName "Wait for target tasks" \
92
+ --checkItems '[{"flowCode":10037355068544,"taskCode":10380350567040,"left":1,"right":1,"checkTimeUnit":"DAY"},{"flowCode":10037355068545,"taskCode":10380350567041,"left":0,"right":0,"checkTimeUnit":"HOUR"}]' \
93
+ --relation OR
94
+
95
+ ae-cli dataops_flow +update_task_instance_check_task --spaceCode "${spaceCode}" \
96
+ --flowCode ${flowCode} --taskCode ${taskCheckNodeCode} \
97
+ --checkItems '[{"flowCode":10037355068544,"taskCode":10380350567040,"left":1,"right":1,"checkTimeUnit":"DAY"}]'
98
+ ```
99
+
100
+ Task instance check create defaults are `relation=AND`, `checkInterval=10`, and `checkTime=3`; retry defaults are `3`, `5`, and `MINUTE`. `checkItems` is required and replaces the complete target list. On update, omitted check scalars, dependencies, and retry fields keep their current values.
101
+
83
102
  ### Step 5: Modify SQL Task Content
84
103
 
85
104
  ```bash
@@ -89,6 +108,24 @@ ae-cli dataops_flow +update_sql_task --spaceCode "${spaceCode}" \
89
108
  --sql "SELECT * FROM dwd_user"
90
109
  ```
91
110
 
111
+ ### Delete a Task Node
112
+
113
+ Verify the target with `+get_flow_overview` before any deletion. Preview the request first, then execute it only after explicit user confirmation:
114
+
115
+ ```bash
116
+ ae-cli dataops_flow +get_flow_overview --spaceCode "${spaceCode}" \
117
+ --flowCode ${flowCode}
118
+
119
+ ae-cli dataops_flow +delete_task --spaceCode "${spaceCode}" \
120
+ --flowCode ${flowCode} --taskCode ${taskCode} --dry-run
121
+
122
+ # Run only after explicit user confirmation
123
+ ae-cli dataops_flow +delete_task --spaceCode "${spaceCode}" \
124
+ --flowCode ${flowCode} --taskCode ${taskCode} --yes
125
+ ```
126
+
127
+ `+delete_task` deletes exactly one non-placeholder task node in DEV. It removes attached DAG edges but does not reconnect upstream and downstream nodes. It may terminate running DEV debug executions that include the node and does not repair cross-flow `TASK_CHECK` references. A published PROD node remains until the flow is released again. Repeated deletion, a task from another flow, or an internal placeholder returns an error.
128
+
92
129
  ### Step 6: Add Task Dependencies (DAG connections)
93
130
 
94
131
  ```bash
@@ -153,6 +190,9 @@ ae-cli dataops_operations +get_task_instance_detail --spaceCode "${spaceCode}" \
153
190
  | `+update_integration_task` | Rebind DEV integration sync task to a sync solution | `--spaceCode` `--flowCode` `--taskCode` `--syncId` `[--preTasks]` `[--failRetryTimes]` `[--failRetryInterval]` `[--failRetryUnit]` |
154
191
  | `+create_workflow_instance_check_task` | Create DEV workflow instance check task | `--spaceCode` `--flowCode` `--taskName` `--checkItems` `[--relation]` `[--checkInterval]` `[--checkTime]` `[--preTasks]` `[retry flags]` `[--remark]` |
155
192
  | `+update_workflow_instance_check_task` | Update DEV workflow instance check task | `--spaceCode` `--flowCode` `--taskCode` `--checkItems` `[--relation]` `[--checkInterval]` `[--checkTime]` `[--preTasks]` `[retry flags]` |
193
+ | `+create_task_instance_check_task` | Create DEV task instance check task | `--spaceCode` `--flowCode` `--taskName` `--checkItems` `[--relation]` `[--checkInterval]` `[--checkTime]` `[--preTasks]` `[retry flags]` `[--remark]` |
194
+ | `+update_task_instance_check_task` | Update DEV task instance check task | `--spaceCode` `--flowCode` `--taskCode` `--checkItems` `[--relation]` `[--checkInterval]` `[--checkTime]` `[--preTasks]` `[retry flags]` |
195
+ | `+delete_task` | Delete one DEV task node after confirmation | `--spaceCode` `--flowCode` `--taskCode` `--yes` |
156
196
  | `+add_task_relation` | Add DEV dependency | `--spaceCode` `--flowCode` `--preTaskCode` `--taskCode` |
157
197
  | `+save_schedule_config` | Save DEV schedule config | `--spaceCode` `--flowCode` `--enabled` `[--cron]` |
158
198
  | `+get_task_params` | View DEV task parameter list | `--spaceCode` `--flowCode` `--taskCode` |
@@ -169,14 +209,16 @@ ae-cli dataops_operations +get_task_instance_detail --spaceCode "${spaceCode}" \
169
209
  - **Schedule config**: `+save_schedule_config` requires `--spaceCode`, `--flowCode`, and `--enabled`. `--cron` is required only when `--enabled true`; omit it when disabling scheduling. It returns `action/result/status`; `result` includes `enabled`, `flow`, `message`, and `cron` only when enabled.
170
210
  - **Release preview**: `+preview_release_flow` requires `--spaceCode` and `--flowCode`; it has no optional flags. It returns `flowCode`, `releaseStatus`, `message`, and `changes`. Each change may include `scheduleConfigChange` and `tasks`; task entries may include `changed`, `contentCompare`, and `targetTable`.
171
211
  - **Release**: `+release_flow` requires `--spaceCode` and `--flowCode`; it has no optional flags. It returns `action/result/status`; `result` includes `flowCode`, `releaseStatus`, `message`, optional `packageCode`, and optional `changes`. Each change may include `scheduleConfigChange` and `tasks`; task entries include `changed`.
172
- - **Task dependencies**: `--preTasks` is a JSON array of upstream task codes on SQL, integration, and workflow instance check create/update commands. Omit `--preTasks` on update to preserve existing dependencies; pass `--preTasks '[]'` to clear them; pass a non-empty array to replace them.
173
- - **Retry policy**: The three task types accept `--failRetryTimes`, `--failRetryInterval`, and `--failRetryUnit`. Create defaults to `3`, `5`, and `MINUTE`. Update preserves every omitted retry field. `MINUTE` is the only supported unit.
212
+ - **Task dependencies**: `--preTasks` is a JSON array of upstream task codes on SQL, integration, workflow instance check, and task instance check create/update commands. Omit `--preTasks` on update to preserve existing dependencies; pass `--preTasks '[]'` to clear them; pass a non-empty array to replace them.
213
+ - **Retry policy**: All four task types accept `--failRetryTimes`, `--failRetryInterval`, and `--failRetryUnit`. Create defaults to `3`, `5`, and `MINUTE`. Update preserves every omitted retry field. `MINUTE` is the only supported unit.
174
214
  - **SQL task creation**: `+create_sql_task` requires `--spaceCode`, `--flowCode`, `--taskName`, and `--sql`; SQL hooks, dependencies, retry policy, and remark are optional. It returns `action/result/status`; `result` includes `flowCode`, `taskCode`, `taskName`, `taskType=TRINO_SQL`, and `sqlSaved=true`.
175
215
  - **SQL task update**: `+update_sql_task` requires `--spaceCode`, `--flowCode`, `--taskCode`, and `--sql`; omitted SQL hooks, dependencies, and retry fields keep existing values. It returns `action/result/status`; `result` includes `sqlSaved`, `flowCode`, `taskCode`, `taskType=TRINO_SQL`, and `task`.
176
216
  - **Task dependency**: `+add_task_relation` requires `--spaceCode`, `--flowCode`, `--preTaskCode`, and `--taskCode`. `preTaskCode` is upstream and `taskCode` is downstream. It returns `action/result/status`; `result` includes `status`, `flowCode`, `preTaskCode`, `taskCode`, and `message`.
177
217
  - **Task parameters**: `+get_task_params` requires `--spaceCode`, `--flowCode`, and `--taskCode`; it has no optional flags. It queries DEV and returns `data` as an array. Items include fields such as `paramKey`, `paramType`, `paramDataType`, `paramFrom`, and built-in flags like `isBd`.
178
218
  - **Integration task creation**: `+create_integration_task` requires `--spaceCode`, `--flowCode`, `--taskName`, and `--syncId`; dependencies, retry policy, and remark are optional. It returns `action/result/status`; `result` includes `syncTaskSaved`, `flowCode`, `taskCode`, `taskName`, `taskType=OFFLINE_SYNC`, `syncId`, and `nextAction`.
179
219
  - **Workflow instance check tasks**: `checkItems` is required and replaces the complete check item list. Create defaults `relation/checkInterval/checkTime` to `AND/5/3`; update preserves omitted scalar values. This command creates `FLOW_CHECK`, not task-instance `TASK_CHECK`.
220
+ - **Task instance check tasks**: `checkItems` is required and replaces the complete check item list. Each item identifies a target using `flowCode` and `taskCode`. Create defaults `relation/checkInterval/checkTime` to `AND/10/3`; update preserves omitted scalar values. This command creates `TASK_CHECK`.
221
+ - **Task deletion**: `+delete_task` requires `--spaceCode`, `--flowCode`, and `--taskCode`. It is a `high-risk-write`: inspect the node with `+get_flow_overview`, run `--dry-run`, obtain explicit confirmation, and then pass `--yes`. It changes DEV only; release the flow to apply deletion to PROD.
180
222
 
181
223
  ## Transport Status
182
224
 
@@ -186,6 +228,8 @@ Owning module: gaia-mcp workflow
186
228
 
187
229
  Current transport: DataOps CLI REST
188
230
 
231
+ Covered workflow tools: `flow_create_workflow_instance_check_task`, `flow_update_workflow_instance_check_task`, `flow_create_task_instance_check_task`, `flow_update_task_instance_check_task`, and `flow_delete_task`
232
+
189
233
  Gateway target: TBD after DataOps workflow Gateway schema review
190
234
 
191
235
  Review after: 2026-10-27
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ae-engage
3
3
  version: 1.0.0
4
- description: "AE Engage capability gateway: config center, flows, push/config channels, strategies, templates, task management, and operation activities. Trigger words: config center, scene config, push channel, config channel, operation strategy, operation task, operation activity, template, config item, Engage, Hermes, engage-scene, engage-setting, engage-flow, engage-task, engage-activity."
4
+ description: "AE Engage capability gateway: config center, flows, push/config channels, strategies, templates, task management, operation activities, and query lifecycle. Trigger words: config center, scene config, push channel, config channel, operation strategy, operation task, operation activity, query lifecycle, template, config item, Engage, Hermes, engage-scene, engage-setting, engage-flow, engage-task, engage-activity, engage-query."
5
5
  ---
6
6
 
7
7
  # ae-engage
@@ -33,7 +33,7 @@ Safety constraints:
33
33
 
34
34
  ## Overview
35
35
 
36
- The `ae-engage` package provides Hermes Engage capabilities across config items, flows, channel settings, and task data. Use capability-gateway commands through `ae-cli engage-flow|engage-task|engage-setting|engage-scene <resource> <action>`; low-frequency reports use the L3 references below.
36
+ The `ae-engage` package provides Hermes Engage capabilities across config items, flows, channel settings, task data, and query lifecycle. Use capability-gateway commands through `ae-cli engage-flow|engage-task|engage-setting|engage-scene|engage-query <resource> <action>`; low-frequency reports use the L3 references below.
37
37
 
38
38
  Typical use cases include:
39
39
 
@@ -55,7 +55,7 @@ When the user mentions a product term below (including common Chinese UI labels)
55
55
  | **Push channel** | Project-level message push channels (Webhook, FCM, APNS, etc.) | `engage-setting` | `references/channel-list.md` | `channel-detail.md`, `add-channel.md` (**Webhook vs Client differ**: `url` = HTTP vs scene key; custom params `user:` vs `user:`/`client:`), `update-channel-status.md`, `delete-channel.md`, `channel-update-config.md`, `channel-test-send.md`, `channel_touch_limits_list.md` |
56
56
  | **Config channel** | Config-center Webhook/client config channels (not the same as push channels) | `engage-scene` | `references/scene-config-channel.md` | `channel-mgmt.md` (create/enable-disable/copy/delete workflows). User params in `config.customsParamList` require `columnName` with `user:` prefix (e.g. `user:#account_id`); preflight names with ae-analysis `analysis-meta property list/get`. |
57
57
  | **Operation strategy** | Ops/delivery strategies under a config item | `engage-scene` | `references/scene-strategy.md` | Custom audience: [`scene-strategy-audience.md`](references/scene-strategy-audience.md) — semantic `definitionRequest` (Analysis condition shape); do not pass `targetClusterQp`/`qp`; preflight props (stop + list if missing); template: `scene-template.md` |
58
- | **Operation task** | Hermes push/engagement tasks (list, save, lifecycle, reports) | `engage-task` | `references/task-list.md` | `task-detail.md` (get), `save-task.md`, `build-task-save-guide.md`, `task-stats.md`, `task-delete.md`, `push-record-query.md`, `task-data-overview.md`, `task-data-detail.md`, `task-metric-detail.md`, `task-experiment-report.md` |
58
+ | **Operation task** | Hermes push/engagement tasks (list, save, lifecycle, reports) | `engage-task` | `references/task-list.md` | `task-detail.md` (get), `save-task.md`, `build-task-save-guide.md`, `task-stats.md`, `task-delete.md`, `push-record-query.md`, `task-user-detail-export.md`, `task-indicator-user.md`, `task-data-overview.md`, `task-data-detail.md`, `task-metric-detail.md`, `task-experiment-report.md` |
59
59
  | **Operation activity** | Campaign activity management and delivery trends by activity, topic, or standalone task | `engage-activity` | `references/activity-activity.md` | `activity-data-detail.md`, `activity-topic.md`, `activity-task.md`, `activity-approval.md` |
60
60
  | **Template** | Strategy templates under a config item | `engage-scene` | `references/scene-template.md` | `scene-config-param.md` (template fields reference `paramId`); enable via `template update` then `template update-status` before strategy create |
61
61
 
@@ -175,10 +175,19 @@ ae-cli engage-task task get --project-id 1 --task-id task_123
175
175
  # Submit a saved draft task for approval
176
176
  ae-cli engage-task task submit-approval --project-id 1 --task-id task_123
177
177
 
178
+ # Query task reports through the Hermes inline task-data capabilities
179
+ ae-cli engage-task effect query --project-id 1 --task-id task_123 --start-time 2026-04-01 --end-time 2026-04-07 --metric-id-list '["metric_1"]'
180
+ ae-cli engage-task data-detail query --project-id 1 --task-id task_123 --detail-type time --start-time 2026-04-01 --end-time 2026-04-07
181
+ ae-cli engage-task indicator-user sql --project-id 1 --task-id task_123 --indicator main --start-time 2026-04-01 --end-time 2026-04-07
182
+ ae-cli engage-task indicator-user run --project-id 1 --task-id task_123 --indicator secondary --secondary-index 1 --start-time 2026-04-01 --end-time 2026-04-07 --limit 100
183
+ ae-cli engage-task indicator-user export --project-id 1 --task-id task_123 --indicator metric --metric-id metric_1 --source metric --start-time 2026-04-01 --end-time 2026-04-07 --artifact-format csv
184
+
178
185
  ```
179
186
 
180
187
  For L3 task reports, read `references/task-data-overview.md`, `references/task-data-detail.md`,
181
188
  `references/task-metric-detail.md`, or `references/task-experiment-report.md` before invocation.
189
+ Before using `engage-task indicator-user`, read `references/task-indicator-user.md`; its grouping,
190
+ indicator, summary/detail, metric, experiment, and timezone flags have conditional compatibility rules.
182
191
 
183
192
  ### 3. config
184
193
 
@@ -210,6 +219,7 @@ ae-cli engage-flow version list --project-id 1 --flow-id flow_id_123
210
219
  ae-cli engage-flow flow update-remark --project-id 1 --flow-uuid flow_uuid_123 --flow-version-desc "Second version"
211
220
  ae-cli engage-task operation-log query --project-id 1 --task-id task_id_123
212
221
  ae-cli engage-task push-record query --project-id 1 --task-id task_id_123 --page-num 1 --page-size 20
222
+ ae-cli engage-task user-detail export --project-id 1 --task-id task_id_123 --task-instance-id instance_123 --user-status fail --artifact-format csv
213
223
  ae-cli engage-task segment-list query --project-id 1 --task-id task_id_123
214
224
  ae-cli engage-task group list --project-id 1
215
225
  ae-cli engage-task metric list --project-id 1 --task-id task_id_123
@@ -219,8 +229,29 @@ ae-cli engage-task task submit-approval --project-id 1 --task-id task_id_123
219
229
 
220
230
  # Query the node schema
221
231
  ae-cli engage-flow node-config schema --project-id 1 --node-type message_push
232
+ ae-cli engage-flow metric update --project-id 1 --flow-id flow_id_123 --metric-map '<metric_map_json>'
233
+
234
+ # Query or export newly exposed flow report surfaces
235
+ ae-cli engage-flow report metric-detail run --project-id 1 --flow-id flow_id_123 --node-uuid node_uuid_123 --start-time 2026-04-01 --end-time 2026-04-07 --limit 100 --timeout-seconds 120
236
+ ae-cli engage-flow report metric-detail export --project-id 1 --flow-id flow_id_123 --node-uuid node_uuid_123 --start-time 2026-04-01 --end-time 2026-04-07 --artifact-format csv --timeout-seconds 21600
237
+ ae-cli engage-flow metric-user run --project-id 1 --flow-id flow_id_123 --indicator-name entry --start-time 2026-04-01 --end-time 2026-04-07 --limit 100 --timeout-seconds 120
238
+ ae-cli engage-flow metric-user export --project-id 1 --flow-id flow_id_123 --indicator-name entry --start-time 2026-04-01 --end-time 2026-04-07 --artifact-format csv --timeout-seconds 21600
239
+ ae-cli engage-flow node-user run --project-id 1 --flow-id flow_id_123 --node-uuid node_uuid_123 --indicator-name entry --start-time 2026-04-01 --end-time 2026-04-07 --limit 100 --timeout-seconds 120
240
+ ae-cli engage-flow node-user export --project-id 1 --flow-id flow_id_123 --node-uuid node_uuid_123 --indicator-name entry --start-time 2026-04-01 --end-time 2026-04-07 --artifact-format csv --timeout-seconds 21600
241
+ ae-cli engage-flow node-metric-user run --project-id 1 --flow-id flow_id_123 --node-uuid node_uuid_123 --indicator-name metric_setting_id_123 --start-time 2026-04-01 --end-time 2026-04-07 --limit 100 --timeout-seconds 120
242
+ ae-cli engage-flow node-metric-user export --project-id 1 --flow-id flow_id_123 --node-uuid node_uuid_123 --indicator-name metric_setting_id_123 --start-time 2026-04-01 --end-time 2026-04-07 --artifact-format csv --timeout-seconds 21600
222
243
  ```
223
244
 
245
+ User-detail `run` commands are for bounded inline rows and accept `--request-id`, `--limit`, and `--timeout-seconds`; metric-detail `run` returns the report object. Export commands accept `--request-id`, `--artifact-format csv|jsonl` (default `jsonl`), and `--timeout-seconds`, then return `run_id` and `artifact_id`; poll with `ae-cli engage-query run inspect --run-id RUN_ID`, then download with `ae-cli engage-query artifact download --run-id RUN_ID --artifact-id ARTIFACT_ID --output ./artifact.jsonl.gz`. Cancel running async work with `ae-cli engage-query query cancel --run-id RUN_ID`.
246
+
247
+ For flow report/user-detail commands, read the matching reference before composing non-trivial input:
248
+
249
+ - Flow canvas custom metric configuration: `references/flow-metric-update.md`
250
+ - Metric-detail report object or flattened report export: `references/flow-metric-detail-report.md`
251
+ - Users behind a process-level metric segment: `references/flow-metric-user.md`
252
+ - Users behind a node-level data segment: `references/flow-node-user.md`
253
+ - Users behind a node-level metric segment: `references/flow-node-metric-user.md`
254
+
224
255
  ### 5. scene (scene management / config center)
225
256
 
226
257
  New capability-gateway command group `engage-scene` covers the config center: config items, params, groups, preset/related metrics, config channels, strategies, and templates. Complex DTOs are passed with `--payload` (native camelCase JSON).
@@ -442,6 +473,7 @@ More detailed single-command guidance is available in the business-oriented `ref
442
473
  - `references/add-approver.md` / `references/approver-list.md` (`engage-setting.approval-approver.{add,list}`)
443
474
  - `references/whitelist-list.md` / `references/whitelist.md` (`engage-setting.whitelist.{list,add,update,delete,verify}`)
444
475
  - `references/cancel-query-by-request-id.md` (`engage-setting.query.cancel`, L3)
476
+ - `references/cancel-query-run.md` (`engage-query.query.cancel`)
445
477
  - `references/push-language.md` (`engage-setting.push-language.{get,set}`)
446
478
  - `references/client-param.md` (`engage-setting.client-param.{create,update,delete,list}`)
447
479
  - `references/config-table.md` (`engage-setting.config-table.{upload,save,list,query-data,update-data,delete}`)
@@ -476,10 +508,15 @@ More detailed single-command guidance is available in the business-oriented `ref
476
508
  - `references/version-list.md` (`engage-flow.version.list`)
477
509
  - `references/flow-update-remark.md` (`ae-cli engage-flow flow update-remark`; capability `engage-flow.version.update-remark`)
478
510
  - `references/push-record-query.md` (`engage-task.push-record.query`)
511
+ - `references/task-user-detail-export.md` (`engage-task user-detail export`; capability `engage-task.user-detail.export`)
512
+ - `references/task-indicator-user.md` (`engage-task indicator-user {sql,run,export}`; capabilities `engage-task.indicator-user.{sql,run,export}`)
479
513
  - `references/segment-list-query.md` (`engage-task.segment-list.query`)
480
514
  - `references/group-list.md` (`engage-task.group.list`)
481
515
  - `references/task-delete.md` (`engage-task.task.delete`)
482
516
  - `references/task-submit-approval.md` (`engage-task.task.submit-approval`)
517
+ - `references/task-data-detail.md` (`engage-task data-detail query`; capability `engage-task.task-data.detail`)
518
+ - `references/task-metric-detail.md` (`engage-task effect query`; capability `engage-task.task-data.metric-detail`)
519
+ - `references/flow-metric-update.md` (`engage-flow metric update`; capability `engage-flow.metric.update`)
483
520
 
484
521
  This split documentation structure is easier to extend later, because commands with more complex object inputs can stay centralized in the `references/` root directory.
485
522
 
@@ -491,7 +528,11 @@ This split documentation structure is easier to extend later, because commands w
491
528
 
492
529
  ### task
493
530
 
494
- `operation-log query` / `push-record query` / `segment-list *` / `ops *` / `metric *` / `race release` / `channel-ref stats` / `group *` / `task delete` / `task modify-group` / `task submit-approval` / `task get` / `task list` / `task stats` / `task build-save-guide` / `task save` / `task manage` (via `engage-task`), plus L3 capabilities `engage-task.task-data.{overview,detail,metric-detail,experiment-report}`
531
+ `operation-log query` / `push-record query` / `user-detail export` / `indicator-user sql` / `indicator-user run` / `indicator-user export` / `segment-list *` / `ops *` / `metric *` / `race release` / `channel-ref stats` / `group *` / `task delete` / `task modify-group` / `task submit-approval` / `task get` / `task list` / `task stats` / `task build-save-guide` / `task save` / `task manage` / `effect query` / `data-detail query` (via `engage-task`), plus L3 capabilities `engage-task.task-data.{overview,detail,metric-detail,experiment-report}`
532
+
533
+ ### query
534
+
535
+ `run inspect` / `artifact download` / `query cancel` (via `engage-query`), capability ID `engage-query.query.cancel`
495
536
 
496
537
  ### config
497
538
 
@@ -511,7 +552,7 @@ Legacy config MCP commands are migrated into the `scene` L2 group and the three
511
552
 
512
553
  ### flow
513
554
 
514
- `operation-log query` / `version list` / `flow update-remark` / `flow save` / `node-config schema` / `flow get` / `flow list` / `flow manage` / `node-config validate` / `flow delete` / `flow modify-base-info` (via `engage-flow`), plus L3 capabilities `engage-flow.report.{node-overview,process,node-detail,ab-split-node}`
555
+ `operation-log query` / `version list` / `flow update-remark` / `flow save` / `node-config schema` / `flow get` / `flow list` / `flow manage` / `node-config validate` / `flow delete` / `flow modify-base-info` / `metric update` / `report metric-detail run` / `report metric-detail export` / `metric-user run` / `metric-user export` / `node-user run` / `node-user export` / `node-metric-user run` / `node-metric-user export` (via `engage-flow`), plus L3 capabilities `engage-flow.report.{node-overview,process,node-detail,ab-split-node}`
515
556
 
516
557
  ## Date Format
517
558
 
@@ -532,8 +573,10 @@ For task draft creation or update, use this workflow:
532
573
  1. `ae-cli engage-setting channel list --project-id <projectId>`
533
574
  2. `ae-cli engage-task task build-save-guide --project-id <projectId> --req '{...}'`
534
575
  3. For a custom audience, pass the Analysis semantic contract as
535
- `targetConfig.definitionRequest`. Use semantic `triggerConfig.triggerDefinition` and
536
- `completionIndicatorDef.completionIndicators[].eventDefinition`. Build shapes from
576
+ `targetConfig.definitionRequest`. For an event-triggered task, use semantic
577
+ `triggerConfig.triggerDefinition` and
578
+ always include `periodTimeSymbol` (`TS01`, `TS02`, `TS03`, or `TS04`) on its primary A rule.
579
+ Use semantic `completionIndicatorDef.completionIndicators[].eventDefinition`. Build shapes from
537
580
  `ae-analysis` user-cluster / audience models. For existing-cluster audiences
538
581
  (`targetClusterType=2`), use `analysis user-cluster get`. For event-triggered tasks, pass
539
582
  `channelType`, `triggerType`, and `eventTriggerType` to `build-save-guide`, then use its
@@ -546,6 +589,11 @@ For task draft creation or update, use this workflow:
546
589
  5. `ae-cli engage-task task submit-approval --project-id <projectId> --task-id <taskId>`
547
590
 
548
591
  `engage-task task build-save-guide` is a read-only helper. It returns scenario-specific required fields, channel content schema, unsupported combinations, examples, and a handoff template for `save_task`.
592
+ When `enableExp=true`, capability `engage-task.task.build-save-guide` enriches the handoff so
593
+ `groupContentList` association fields
594
+ (`expGroupName`/`expGroupType`/`percentageInExperiment`/`order`) stay aligned with
595
+ `expConfig.expGroupList`; only replace `contentList[].content`. Capability `engage-task.task.save`
596
+ rejects misaligned experiment content with `TASK_EXPERIMENT_GROUP_CONTENT_INVALID`.
549
597
 
550
598
  `engage-task task save` creates or updates a task configuration. It does not submit approval, does not start sending, and does not trigger task execution. If `req.taskId` is omitted it creates a new draft; if `req.taskId` is present it updates an existing **draft or paused** task. Update mode rejects running/ended tasks with `invalid_status`. Omitted fields inherit from the existing task before validation (partial rename/update is supported).
551
599
 
@@ -224,6 +224,12 @@ Use it to understand what must appear in:
224
224
  - `controlConfig`
225
225
  - `expConfig` when experiment mode is enabled
226
226
 
227
+ When experiment mode is enabled (`context.enableExp=true` or draft `expConfig.enableExp=true`):
228
+
229
+ - capability `engage-task.task.build-save-guide` enriches `handoff.reqTemplate.channelConfig.groupContentList`
230
+ so each entry carries `expGroupName`, `expGroupType`, `percentageInExperiment`, `order`, and `contentList`
231
+ - do not drop those association fields when filling content; they must stay aligned with `expConfig.expGroupList`
232
+
227
233
  ### 4.8 `fieldRules`
228
234
 
229
235
  This is the most important construction section.
@@ -274,6 +280,10 @@ The guide treats the A rule as a discriminated envelope:
274
280
  - `eventTriggerType=2`: at least two ordered steps with `eventDefinition` and `hasDone`
275
281
  - `eventTriggerType=3`: client-side count/eq/1 events with `eventTriggerCaliberType`
276
282
 
283
+ Every event-triggered task A rule must include `periodTimeSymbol`. Use `TS01` for daily,
284
+ `TS02` for the complete configured period, `TS03` for weekly, or `TS04` for monthly.
285
+ Do not omit this field even when `periodStart` and `periodEnd` are present.
286
+
277
287
  Do not copy the accumulated example and only change `eventTriggerType`. Hermes rejects a final QP
278
288
  whose event structure does not match its envelope.
279
289
 
@@ -299,6 +309,8 @@ Important fields:
299
309
  - `reqTemplate`
300
310
  - a scenario-aware grouped request template
301
311
  - use it as a starting point, not as unquestioned final truth
312
+ - for experiment tasks, keep `groupContentList` association fields from the template;
313
+ only replace `contentList[].content` with real channel content
302
314
  - `readyToSubmit`
303
315
  - `true` means the current scenario or draft has no blocking placeholders
304
316
  - `blockingPlaceholders`
@@ -0,0 +1,31 @@
1
+ # Cancel a running Engage query or export
2
+
3
+ Cancel asynchronous Engage work by the Capability Gateway run ID.
4
+
5
+ Mapped command:
6
+
7
+ ```bash
8
+ ae-cli engage-query query cancel --run-id <run_id>
9
+ ```
10
+
11
+ Mapped capability: `engage-query.query.cancel`
12
+
13
+ ## Input
14
+
15
+ | Field | Type | Required | Description |
16
+ |------|------|------|------|
17
+ | `run_id` | string | Yes | Run ID returned by an asynchronous query or export capability |
18
+ | `reason` | string | No | Optional cancellation reason |
19
+
20
+ ## Safety Constraints
21
+
22
+ This command is a **write operation**. Use only the `run_id` returned by the asynchronous
23
+ query/export lifecycle; a report `request_id` is not accepted.
24
+
25
+ ## Example
26
+
27
+ ```bash
28
+ ae-cli engage-query query cancel \
29
+ --run-id run_123 \
30
+ --reason "No longer needed"
31
+ ```
@@ -8,7 +8,20 @@ Required input: `project_id`, `config_id`, `start_time`, `end_time`. Optional in
8
8
  `template_id_list`, `strategy_id_list`, `show_time_zone`. `template_id_list` and `strategy_id_list`
9
9
  are mutually exclusive.
10
10
 
11
+ ## Input contract
12
+
13
+ | Field | JSON type | Required | Rules |
14
+ | --- | --- | --- | --- |
15
+ | `project_id` | integer | Yes | Positive project ID. |
16
+ | `config_id` | string | Yes | Config item ID. |
17
+ | `start_time` | string | Yes | Date in `yyyy-MM-dd` format. |
18
+ | `end_time` | string | Yes | Date in `yyyy-MM-dd` format; must not be earlier than `start_time`. |
19
+ | `request_id` | string | No | Request identifier for continuation or cancellation. |
20
+ | `template_id_list` | array of strings | No | Cannot be used together with `strategy_id_list`. |
21
+ | `strategy_id_list` | array of strings | No | Cannot be used together with `template_id_list`. |
22
+ | `show_time_zone` | number | No | Hour offset from `-12.0` through `14.0`; use `8`, not the string `"8"`. |
23
+
11
24
  ```bash
12
25
  ae-cli capability run engage-scene.report.config-item-analysis \
13
- --input '{"project_id":1,"config_id":"cfg_123","start_time":"2026-04-01","end_time":"2026-04-07"}'
26
+ --input '{"project_id":1,"config_id":"cfg_123","start_time":"2026-04-01","end_time":"2026-04-07","show_time_zone":8}'
14
27
  ```
@@ -7,7 +7,17 @@ Mapped command: `ae-cli capability run engage-scene.report.strategy-comparison -
7
7
  Required input: `project_id`, `config_id`, `strategy_id_list` with at least two IDs. Optional input:
8
8
  `request_id`, `show_time_zone`.
9
9
 
10
+ ## Input contract
11
+
12
+ | Field | JSON type | Required | Rules |
13
+ | --- | --- | --- | --- |
14
+ | `project_id` | integer | Yes | Positive project ID. |
15
+ | `config_id` | string | Yes | Config item ID. |
16
+ | `strategy_id_list` | array of strings | Yes | Must contain at least two strategy IDs. |
17
+ | `request_id` | string | No | Request identifier for continuation or cancellation. |
18
+ | `show_time_zone` | number | No | Hour offset from `-12.0` through `14.0`; use `8`, not the string `"8"`. |
19
+
10
20
  ```bash
11
21
  ae-cli capability run engage-scene.report.strategy-comparison \
12
- --input '{"project_id":1,"config_id":"cfg_123","strategy_id_list":["strategy_a","strategy_b"]}'
22
+ --input '{"project_id":1,"config_id":"cfg_123","strategy_id_list":["strategy_a","strategy_b"],"show_time_zone":8}'
13
23
  ```
@@ -8,7 +8,21 @@ Required input: `project_id`, `config_id`, `start_time`, `end_time`. Optional in
8
8
  `template_id_list`, `strategy_id_list`, `show_time_zone`, `analyze_report_internal_query`.
9
9
  `template_id_list` and `strategy_id_list` are mutually exclusive.
10
10
 
11
+ ## Input contract
12
+
13
+ | Field | JSON type | Required | Rules |
14
+ | --- | --- | --- | --- |
15
+ | `project_id` | integer | Yes | Positive project ID. |
16
+ | `config_id` | string | Yes | Config item ID. |
17
+ | `start_time` | string | Yes | Date in `yyyy-MM-dd` format. |
18
+ | `end_time` | string | Yes | Date in `yyyy-MM-dd` format; must not be earlier than `start_time`. |
19
+ | `request_id` | string | No | Request identifier for continuation or cancellation. |
20
+ | `template_id_list` | array of strings | No | Cannot be used together with `strategy_id_list`. |
21
+ | `strategy_id_list` | array of strings | No | Cannot be used together with `template_id_list`. |
22
+ | `show_time_zone` | number | No | Hour offset from `-12.0` through `14.0`; use `8`, not the string `"8"`. |
23
+ | `analyze_report_internal_query` | boolean | No | Use `true` or `false`, not a quoted string. |
24
+
11
25
  ```bash
12
26
  ae-cli capability run engage-scene.report.config-item-trigger \
13
- --input '{"project_id":1,"config_id":"cfg_123","start_time":"2026-04-01","end_time":"2026-04-07"}'
27
+ --input '{"project_id":1,"config_id":"cfg_123","start_time":"2026-04-01","end_time":"2026-04-07","show_time_zone":8}'
14
28
  ```
@@ -0,0 +1,134 @@
1
+ # Flow metric-detail report
2
+
3
+ Use this reference when the user asks for a flow node metric-detail report, or wants to export the detailed metric table behind a node on the flow canvas.
4
+
5
+ Mapped CLI commands:
6
+
7
+ - `ae-cli engage-flow report metric-detail run`
8
+ - `ae-cli engage-flow report metric-detail export`
9
+
10
+ Mapped capabilities:
11
+
12
+ - `engage-flow.report.metric-detail.run`
13
+ - `engage-flow.report.metric-detail.export`
14
+
15
+ ## Choose the command
16
+
17
+ - Use `run` for quick inline inspection. It returns the original Hermes report object under `report`.
18
+ - Use `export` when the user needs a downloadable, flattened artifact.
19
+ - Use `--report-mode node` or omit it for normal nodes.
20
+ - Use `--report-mode ab` for AB split node metric details.
21
+
22
+ Do not use the older generic capability form unless the structured command is unavailable.
23
+
24
+ ## Required input
25
+
26
+ - `--project-id`
27
+ - one of `--flow-id` or `--flow-uuid`
28
+ - `--node-uuid`
29
+ - `--start-time yyyy-MM-dd`
30
+ - `--end-time yyyy-MM-dd`
31
+
32
+ ## Optional input
33
+
34
+ - `--report-mode node|ab` (default: `node`)
35
+ - `--branch-id`
36
+ - `--indicator-name` for normal node metric selection
37
+ - `--indicators-uuid` for AB metric selection
38
+ - `--data-dim-type uv|pv`
39
+ - `--push-language-code`
40
+ - `--show-time-zone`
41
+ - `--request-id`
42
+ - `--timeout-seconds`
43
+ - `run` only: `--limit` is accepted for command consistency, but metric-detail reports are not row-limited by Hermes
44
+ - `export` only: `--artifact-format csv|jsonl` (default: `jsonl`)
45
+
46
+ ## Parameter guidance
47
+
48
+ - Prefer `flow_uuid` when the user is talking about a specific flow version; prefer `flow_id` when they mean the current logical flow.
49
+ - `node_uuid` must be the canvas node UUID, not the node type.
50
+ - Dates are inclusive report dates and must be in `yyyy-MM-dd`.
51
+ - For AB mode, pass the AB node UUID and usually `--indicators-uuid`; `--branch-id` is optional and only use it when the selected report cell is branch-specific.
52
+ - If both `flow-id` and `flow-uuid` are supplied, Hermes checks they match.
53
+
54
+ ## Examples
55
+
56
+ Inline normal node metric detail:
57
+
58
+ ```bash
59
+ ae-cli engage-flow report metric-detail run \
60
+ --project-id 1 \
61
+ --flow-id flow_id_123 \
62
+ --node-uuid node_uuid_123 \
63
+ --start-time 2026-04-01 \
64
+ --end-time 2026-04-07 \
65
+ --timeout-seconds 120
66
+ ```
67
+
68
+ Export normal node metric detail as CSV:
69
+
70
+ ```bash
71
+ ae-cli engage-flow report metric-detail export \
72
+ --project-id 1 \
73
+ --flow-id flow_id_123 \
74
+ --node-uuid node_uuid_123 \
75
+ --start-time 2026-04-01 \
76
+ --end-time 2026-04-07 \
77
+ --artifact-format csv \
78
+ --timeout-seconds 21600
79
+ ```
80
+
81
+ Inline AB node metric detail:
82
+
83
+ ```bash
84
+ ae-cli engage-flow report metric-detail run \
85
+ --project-id 1 \
86
+ --flow-id flow_id_123 \
87
+ --node-uuid ab_node_uuid_123 \
88
+ --report-mode ab \
89
+ --indicators-uuid indicator_uuid_123 \
90
+ --start-time 2026-04-01 \
91
+ --end-time 2026-04-07
92
+ ```
93
+
94
+ ## Export lifecycle
95
+
96
+ `export` returns `run_id` and `artifact_id`. Poll and download with:
97
+
98
+ ```bash
99
+ ae-cli engage-query run inspect --run-id <run_id>
100
+ ae-cli engage-query artifact download \
101
+ --run-id <run_id> \
102
+ --artifact-id <artifact_id> \
103
+ --output ./flow-metric-detail.csv.gz
104
+ ```
105
+
106
+ Downloaded artifacts are gzip-compressed; keep the `.gz` suffix. Cancel running async work with:
107
+
108
+ ```bash
109
+ ae-cli engage-query query cancel --run-id <run_id>
110
+ ```
111
+
112
+ ## Output rows
113
+
114
+ Normal node export rows:
115
+
116
+ - `time`
117
+ - `indicator`
118
+ - `value_index`
119
+ - `value`
120
+
121
+ AB node export rows:
122
+
123
+ - `time`
124
+ - `branch_id`
125
+ - `branch_name`
126
+ - `indicator`
127
+ - `value`
128
+ - `total`
129
+
130
+ ## Common mistakes
131
+
132
+ - Do not pass `report-mode ab` for a normal node; Hermes will call the AB report backend.
133
+ - Do not use `indicator_name` and `indicators_uuid` interchangeably: normal node uses `indicator_name`, AB mode usually uses `indicators_uuid`.
134
+ - Do not save a gzip artifact as `.csv` or `.jsonl`; use `.csv.gz` or `.jsonl.gz`.
@@ -0,0 +1,77 @@
1
+ # Flow metric update
2
+
3
+ Use this reference when the user asks to configure, replace, or save effect metric settings for a flow canvas.
4
+
5
+ Mapped CLI command:
6
+
7
+ - `ae-cli engage-flow metric update`
8
+
9
+ Mapped capability:
10
+
11
+ - `engage-flow.metric.update`
12
+
13
+ ## Safety
14
+
15
+ This is a write command. Only run it when the user explicitly asks to change a flow's metric configuration. Use `--dry-run` first when the final `metric_map` was assembled by an agent.
16
+
17
+ The backend uses a clean-and-insert update model: omitted existing metric settings may be deleted. Treat `metric_map` as the complete desired metric configuration for the flow, not a partial patch.
18
+
19
+ ## Required input
20
+
21
+ - `--project-id`
22
+ - `--flow-id`
23
+ - `--metric-map '<metric_map_json>'`
24
+
25
+ ## Parameter guidance
26
+
27
+ - `flow_id` is the logical flow ID used by the flow canvas APIs.
28
+ - `metric_map` is a JSON object keyed by metric target-user group. Valid first-level keys are exactly:
29
+ - `trigger`
30
+ - `view`
31
+ - `click`
32
+ - `ab_test`
33
+ - Preserve first-level group keys exactly. Do not convert `ab_test` to `abTest`.
34
+ - Each group value is an array of Hermes metric DTO objects.
35
+ - Use DTO field names from `HermesMetricReqDTO`: `metricSettingId`, `metricType`, `metricName`, `metricQp`, `metricWindowNum`, `metricWindowTimeUnit`, `displayName`, `orderId`, `note`, and `metricParams`.
36
+ - The CLI boundary accepts snake_case nested DTO fields too, but prefer the native camelCase names above in examples and generated payloads.
37
+ - For existing bindings, include `metricSettingId` so Hermes updates that binding instead of treating it as a new binding.
38
+ - For preset metrics, use `metricType: 1` and a real `metricName` discovered from `engage-setting common-metric list/get`.
39
+ - For custom metrics, use `metricType: 2` plus a complete `metricQp`, `metricWindowNum`, `metricWindowTimeUnit`, and `displayName`; Hermes creates the custom metric name.
40
+ - Do not invent metric names, event names, property names, QP structures, or metric-setting IDs. Read the existing flow detail and available metric definitions first, then update the complete desired metric map.
41
+
42
+ ## Examples
43
+
44
+ Dry-run updating an existing binding:
45
+
46
+ ```bash
47
+ ae-cli --dry-run engage-flow metric update \
48
+ --project-id 1 \
49
+ --flow-id flow_id_123 \
50
+ --metric-map '{"trigger":[{"metricSettingId":"setting_1","metricType":1,"metricName":"purchase_count","displayName":"Purchase count","orderId":1}]}'
51
+ ```
52
+
53
+ Apply the same update:
54
+
55
+ ```bash
56
+ ae-cli engage-flow metric update \
57
+ --project-id 1 \
58
+ --flow-id flow_id_123 \
59
+ --metric-map '{"trigger":[{"metricSettingId":"setting_1","metricType":1,"metricName":"purchase_count","displayName":"Purchase count","orderId":1}]}'
60
+ ```
61
+
62
+ Add a custom metric to the `view` group:
63
+
64
+ ```bash
65
+ ae-cli engage-flow metric update \
66
+ --project-id 1 \
67
+ --flow-id flow_id_123 \
68
+ --metric-map '{"view":[{"metricType":2,"metricQp":"{\"type\":0,\"eventName\":\"purchase\",\"analysis\":\"A100\",\"filts\":[]}","metricWindowNum":1,"metricWindowTimeUnit":"day","displayName":"Purchase after view","orderId":1}]}'
69
+ ```
70
+
71
+ ## Common mistakes
72
+
73
+ - Do not pass `flow_uuid`; this command requires `flow_id`.
74
+ - Do not pass `metricId`; `HermesMetricReqDTO` has no `metricId` field. Use `metricSettingId` for an existing binding or `metricName` for a preset metric.
75
+ - Do not use arbitrary first-level keys such as `custom`, `ACTION`, or `channel`; use only `trigger`, `view`, `click`, or `ab_test`.
76
+ - Do not submit only the group you want to change unless deleting omitted groups is intended.
77
+ - Do not use this command to query report data. For report metric details, use `references/flow-metric-detail-report.md`.