@thinkingai/ae-cli 6.0.33 → 6.0.35

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 (167) hide show
  1. package/README.md +3 -2
  2. package/README.zh.md +3 -2
  3. package/dist/index.js +24 -16
  4. package/dist/{metadata-W2MEOI4Z.js → metadata-ELUAR3EJ.js} +0 -53
  5. package/dist/{metadata-3M5F2AED.js → metadata-P5GIVMZ6.js} +0 -53
  6. package/dist/{te-agent-K2OWMZXT.js → te-agent-BOQ7ZY56.js} +194 -1
  7. package/dist/{te-analysis-Q7AZCDU4.js → te-analysis-HZIP6SYW.js} +446 -562
  8. package/dist/{te-analysis-I73ZS4NK.js → te-analysis-ZT2MYAHL.js} +446 -562
  9. package/dist/{te-dataops-MJV54MNY.js → te-dataops-VYN3IOKO.js} +6 -6
  10. package/dist/{te-dataops-OA7I6HBG.js → te-dataops-Y5QAPPPF.js} +6 -6
  11. package/dist/{te-engage-GJRVQMK3.js → te-engage-2FSDUOIZ.js} +965 -1578
  12. package/dist/{te-engage-JIXX3WBI.js → te-engage-BMJ6UOUU.js} +965 -1578
  13. package/dist/{te-kb-CIZXRWMO.js → te-kb-E7NSCBRB.js} +25 -6
  14. package/dist/te-meta-GBDTMPEL.js +95 -0
  15. package/dist/te-meta-ZTLTSHXC.js +95 -0
  16. package/package.json +5 -4
  17. package/skills/ae-agent/SKILL.md +5 -1
  18. package/skills/ae-agent/references/list-sandbox-tools.md +79 -0
  19. package/skills/ae-analysis/SKILL.md +8 -9
  20. package/skills/ae-analysis/references/adhoc_export.md +8 -0
  21. package/skills/ae-analysis/references/adhoc_run.md +9 -0
  22. package/skills/ae-analysis/references/ai_models.md +3 -1
  23. package/skills/ae-analysis/references/analysis_data_retrieval.md +2 -0
  24. package/skills/ae-analysis/references/analysis_drilldown_contract.md +2 -0
  25. package/skills/ae-analysis/references/analysis_gateway_assets.md +9 -7
  26. package/skills/ae-analysis/references/command_index.md +18 -40
  27. package/skills/ae-analysis/references/dashboard_report_data_export.md +4 -2
  28. package/skills/ae-analysis/references/dashboard_report_data_run.md +5 -3
  29. package/skills/ae-analysis/references/drilldown_entities_export.md +3 -0
  30. package/skills/ae-analysis/references/drilldown_entities_run.md +2 -1
  31. package/skills/ae-analysis/references/drilldown_events_export.md +3 -0
  32. package/skills/ae-analysis/references/drilldown_events_run.md +2 -1
  33. package/skills/ae-analysis/references/drilldown_user_events_export.md +3 -0
  34. package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -0
  35. package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
  36. package/skills/ae-analysis/references/filter_value_list.md +47 -0
  37. package/skills/ae-analysis/references/project_space_get.md +3 -3
  38. package/skills/ae-analysis/references/project_space_list.md +6 -2
  39. package/skills/ae-analysis/references/query_cancel.md +3 -1
  40. package/skills/ae-analysis/references/query_cluster_list.md +34 -0
  41. package/skills/ae-analysis/references/query_create_result_cluster.md +2 -0
  42. package/skills/ae-analysis/references/report_create.md +5 -1
  43. package/skills/ae-analysis/references/report_data_export.md +9 -2
  44. package/skills/ae-analysis/references/report_data_run.md +8 -3
  45. package/skills/ae-analysis/references/report_get.md +3 -1
  46. package/skills/ae-analysis/references/report_update.md +4 -0
  47. package/skills/ae-analysis/references/virtual_event_create.md +7 -6
  48. package/skills/ae-analysis-global/SKILL.md +15 -32
  49. package/skills/ae-community/SKILL.md +1 -1
  50. package/skills/ae-data-integration-helper/SKILL.md +3 -2
  51. package/skills/ae-data-integration-helper/references/sdk_usage_notes.md +1 -1
  52. package/skills/ae-dataops/SKILL.md +2 -1
  53. package/skills/ae-dataops/references/dataops-integration.md +75 -6
  54. package/skills/ae-engage/SKILL.md +127 -104
  55. package/skills/ae-engage/references/activity-activity-type.md +1 -1
  56. package/skills/ae-engage/references/activity-activity.md +1 -1
  57. package/skills/ae-engage/references/activity-approval.md +5 -7
  58. package/skills/ae-engage/references/activity-task.md +12 -18
  59. package/skills/ae-engage/references/activity-topic.md +39 -22
  60. package/skills/ae-engage/references/add-approver.md +4 -4
  61. package/skills/ae-engage/references/add-channel.md +10 -5
  62. package/skills/ae-engage/references/approval-approver-delete.md +1 -1
  63. package/skills/ae-engage/references/approver-list.md +4 -4
  64. package/skills/ae-engage/references/build-task-save-guide.md +13 -13
  65. package/skills/ae-engage/references/cancel-query-by-request-id.md +7 -6
  66. package/skills/ae-engage/references/channel-detail.md +14 -9
  67. package/skills/ae-engage/references/channel-list.md +15 -10
  68. package/skills/ae-engage/references/channel-mgmt.md +109 -0
  69. package/skills/ae-engage/references/channel-test-send.md +1 -1
  70. package/skills/ae-engage/references/channel-update-config.md +1 -1
  71. package/skills/ae-engage/references/channel_touch_limits_list.md +1 -1
  72. package/skills/ae-engage/references/client-param.md +34 -16
  73. package/skills/ae-engage/references/common-metric.md +85 -18
  74. package/skills/ae-engage/references/config-item-analysis-report.md +8 -27
  75. package/skills/ae-engage/references/config-item-strategy-comparison.md +7 -18
  76. package/skills/ae-engage/references/config-item-trigger-report.md +8 -35
  77. package/skills/ae-engage/references/delete-channel.md +5 -5
  78. package/skills/ae-engage/references/delete-flow.md +5 -5
  79. package/skills/ae-engage/references/flow-ab-split-node-report.md +11 -45
  80. package/skills/ae-engage/references/flow-detail.md +15 -10
  81. package/skills/ae-engage/references/flow-list.md +9 -4
  82. package/skills/ae-engage/references/flow-node-config-schema.md +9 -8
  83. package/skills/ae-engage/references/flow-node-detail-report.md +11 -46
  84. package/skills/ae-engage/references/flow-node-overview-report.md +11 -43
  85. package/skills/ae-engage/references/flow-process-report.md +12 -50
  86. package/skills/ae-engage/references/flow-update-remark.md +19 -0
  87. package/skills/ae-engage/references/manage-flow.md +19 -19
  88. package/skills/ae-engage/references/manage-task.md +5 -5
  89. package/skills/ae-engage/references/modify-flow-base-info.md +8 -8
  90. package/skills/ae-engage/references/preset-event.md +1 -1
  91. package/skills/ae-engage/references/push-language.md +1 -1
  92. package/skills/ae-engage/references/save-flow.md +54 -52
  93. package/skills/ae-engage/references/save-task.md +23 -17
  94. package/skills/ae-engage/references/scene-config-channel.md +90 -10
  95. package/skills/ae-engage/references/scene-config-group.md +1 -1
  96. package/skills/ae-engage/references/scene-config-item.md +27 -4
  97. package/skills/ae-engage/references/scene-config-metric.md +1 -1
  98. package/skills/ae-engage/references/scene-config-param.md +2 -2
  99. package/skills/ae-engage/references/scene-preset-metric.md +1 -1
  100. package/skills/ae-engage/references/scene-strategy.md +19 -3
  101. package/skills/ae-engage/references/scene-template.md +10 -4
  102. package/skills/ae-engage/references/task-data-detail.md +5 -67
  103. package/skills/ae-engage/references/task-data-overview.md +5 -35
  104. package/skills/ae-engage/references/task-detail.md +5 -5
  105. package/skills/ae-engage/references/task-experiment-report.md +5 -38
  106. package/skills/ae-engage/references/task-list.md +4 -4
  107. package/skills/ae-engage/references/task-metric-detail.md +5 -43
  108. package/skills/ae-engage/references/task-stats.md +5 -5
  109. package/skills/ae-engage/references/update-channel-status.md +6 -6
  110. package/skills/ae-engage/references/validate-flow-node-config.md +12 -11
  111. package/skills/ae-engage/references/whitelist-list.md +4 -4
  112. package/skills/ae-engage/references/whitelist.md +1 -1
  113. package/skills/ae-engage/references/workbench-workbench.md +1 -1
  114. package/skills/ae-generate-tracking-code/SKILL.md +4 -3
  115. package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +1 -1
  116. package/skills/ae-generate-tracking-code/references/server-sdk-insert.md +1 -1
  117. package/skills/ae-generate-tracking-code/references/snippet-delivery.md +1 -1
  118. package/skills/ae-generate-tracking-plan/SKILL.md +6 -2
  119. package/skills/ae-kb/SKILL.md +9 -5
  120. package/skills/ae-metadata/SKILL.md +8 -15
  121. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
  122. package/dist/te-common-ST3QPSXJ.js +0 -61
  123. package/dist/te-common-WSLIKKPC.js +0 -61
  124. package/dist/te-meta-Q4L6EE3Q.js +0 -363
  125. package/dist/te-meta-VHCN4Q62.js +0 -363
  126. package/skills/ae-analysis/references/batch_create_metadata.md +0 -41
  127. package/skills/ae-analysis/references/batch_edit_metadata.md +0 -39
  128. package/skills/ae-analysis/references/cancel_query.md +0 -38
  129. package/skills/ae-analysis/references/create_alert.md +0 -47
  130. package/skills/ae-analysis/references/create_entity.md +0 -39
  131. package/skills/ae-analysis/references/create_project_mark_time.md +0 -39
  132. package/skills/ae-analysis/references/delete_alert.md +0 -32
  133. package/skills/ae-analysis/references/delete_project_mark_times.md +0 -36
  134. package/skills/ae-analysis/references/delete_track_items.md +0 -36
  135. package/skills/ae-analysis/references/generate_track_program.md +0 -52
  136. package/skills/ae-analysis/references/generate_track_sdk_sample.md +0 -44
  137. package/skills/ae-analysis/references/get_alert.md +0 -35
  138. package/skills/ae-analysis/references/get_alert_definition_schema.md +0 -33
  139. package/skills/ae-analysis/references/get_project_config.md +0 -33
  140. package/skills/ae-analysis/references/get_track_program.md +0 -34
  141. package/skills/ae-analysis/references/list_alerts.md +0 -41
  142. package/skills/ae-analysis/references/list_entities.md +0 -42
  143. package/skills/ae-analysis/references/list_project_mark_times.md +0 -43
  144. package/skills/ae-analysis/references/list_project_users.md +0 -33
  145. package/skills/ae-analysis/references/list_projects.md +0 -39
  146. package/skills/ae-analysis/references/load_filters.md +0 -47
  147. package/skills/ae-analysis/references/save_track_items.md +0 -37
  148. package/skills/ae-analysis/references/update_alert.md +0 -49
  149. package/skills/ae-analysis/references/update_project_mark_time.md +0 -40
  150. package/skills/ae-analysis-global/references/list_query_clusters.md +0 -68
  151. package/skills/ae-engage/references/config-channel-detail.md +0 -31
  152. package/skills/ae-engage/references/config-channel-list.md +0 -26
  153. package/skills/ae-engage/references/config-item-detail.md +0 -29
  154. package/skills/ae-engage/references/config-item-list.md +0 -18
  155. package/skills/ae-engage/references/copy-config-template.md +0 -28
  156. package/skills/ae-engage/references/delete-config-channel.md +0 -23
  157. package/skills/ae-engage/references/delete-config-item.md +0 -24
  158. package/skills/ae-engage/references/engage-scene-config-item.md +0 -69
  159. package/skills/ae-engage/references/manage-strategy.md +0 -73
  160. package/skills/ae-engage/references/strategy-detail.md +0 -72
  161. package/skills/ae-engage/references/strategy-list.md +0 -20
  162. package/skills/ae-engage/references/update-config-channel-status.md +0 -31
  163. package/skills/ae-metadata/references/metadata_event_get.md +0 -52
  164. package/skills/ae-metadata/references/metadata_property_get.md +0 -54
  165. package/dist/{config-RCCGHHYA.js → config-PMPISN5Y.js} +4 -4
  166. package/dist/{te-community-WXGB6IOX.js → te-community-QOYIYEJI.js} +3 -3
  167. package/dist/{te-community-X2AHXGCA.js → te-community-UFKI6ONP.js} +3 -3
@@ -2,7 +2,7 @@
2
2
 
3
3
  Use to cancel an async capability-gateway query or export by `run_id`.
4
4
 
5
- Do not use for MCP query cancellation by `request_id`; use `analysis +cancel_query`.
5
+ This is the only analysis-query cancellation command exposed by ae-cli. Cancellation is bound to the capability-gateway `run_id`; ae-cli does not expose MCP `request_id` cancellation.
6
6
 
7
7
  Command:
8
8
 
@@ -13,3 +13,5 @@ ae-cli analysis query cancel --run-id <run_id> [--reason <reason>]
13
13
  Input sends `run_id` and optional `reason`.
14
14
 
15
15
  Output is the gateway envelope. `data` contains the cancellation result.
16
+
17
+ Typical workflow: submit an async export, preserve its `run_id`, inspect that run, and call this command only when that same run no longer needs to continue. Do not substitute a lifecycle `request_id` for `run_id`.
@@ -0,0 +1,34 @@
1
+ # analysis query-cluster list
2
+
3
+ List physical query-routing clusters accessible to the current account in one project.
4
+
5
+ ## Terminology boundary
6
+
7
+ Both product concepts contain the English word `cluster`, but they are different:
8
+
9
+ - 查询集群 / 数据集群 / 部署集群: physical data-routing locations used by `GLOBAL` and `SLAVE`. This command lists these.
10
+ - 用户分群 / 人群包: saved user-membership assets. Use `analysis user-cluster list` for these.
11
+
12
+ Never use a 用户分群 ID as `--slave-cluster-id`, and never answer a user-segment inventory question with this command.
13
+
14
+ ## Purpose
15
+
16
+ Use this capability before routing a report, dashboard, or ad-hoc query when the request mentions all clusters, a country/region, a game server, shard, site, market, or deployment. Do not call it for ordinary queries with no physical routing intent; omission preserves the query surface's documented default.
17
+
18
+ ## Command
19
+
20
+ ```bash
21
+ ae-cli analysis query-cluster list --project-id <project_id>
22
+ ```
23
+
24
+ The snake_case output contains `current_cluster`, accessible `slave_clusters`, and `permissions.allowed_cluster_query_params`. `permissions.can_query_global` is authoritative for `GLOBAL`; only returned `slave_clusters[].cluster_id` values may be used for `SLAVE`.
25
+
26
+ ## Typical workflow
27
+
28
+ 1. Resolve the project and call `analysis query-cluster list`.
29
+ 2. Match an explicit region/server request only against returned cluster ID, name, and description.
30
+ 3. Use `--cluster-query-scope GLOBAL` only for explicit cross-cluster aggregation, or use `--cluster-query-scope SLAVE --slave-cluster-id <id>` for one matched physical slave cluster.
31
+ 4. Run/export through `report-data`, `dashboard-report-data`, or `adhoc`.
32
+ 5. For synchronous runs, verify `actual_cluster_query_scope`, `actual_slave_cluster_id`, and `cluster_query_scope_source` in the result. For exports, verify the submitted route and successful run before consuming the artifact; report-data artifacts contain report rows rather than route metadata. If permissions reject the route, report `allowed_cluster_query_params`; do not fall back silently.
33
+
34
+ Surface defaults differ: report-data and ad-hoc omit scope to query the current self cluster; dashboard-report-data omits scope to follow the saved dashboard configuration.
@@ -8,6 +8,7 @@ Read [`analysis_drilldown_contract.md`](analysis_drilldown_contract.md) first. T
8
8
 
9
9
  ```bash
10
10
  ae-cli analysis query create-result-cluster \
11
+ --project-id <project_id> \
11
12
  --query-context-id <sync_preview_query_context_id> \
12
13
  [--source '{"report_id":1001}'] \
13
14
  --coordinate '<merged returned row/column/metric coordinate>' \
@@ -19,6 +20,7 @@ ae-cli analysis query create-result-cluster \
19
20
 
20
21
  ## Input rules
21
22
 
23
+ - `--project-id` must be the project used by the synchronous preview and must match the project stored by `query_context_id`.
22
24
  - `--query-context-id`, `--source`, and all coordinate fragments must come from the same synchronous `adhoc run`, `report-data run`, or `dashboard-report-data run` response.
23
25
  - Match the desired visible row and column in `source.drilldown.row_options`/`column_options`, select the correct metric option, and shallow-merge only their `coordinate` fragments.
24
26
  - Never pass `target_id`, raw QP, display-only dates, option presentation fields, or data from an export/download. Exports do not create query contexts.
@@ -16,14 +16,18 @@ Input sends `project_id`, `report_name`, `model_type`, `definition`, optional `r
16
16
 
17
17
  Output is the gateway envelope. `data` contains the created `report_id`, creation status, normalized `model_type`, AI QP `definition`, and optional resolution warnings.
18
18
 
19
+ Report creation and its `--validate` / `--dry-run` paths use the same compiler contract. `AI_QP_COMPILE_FAILED` preserves `meta.compile_status`, full `meta.errors[]` (including `code`, `candidates`, and `suggestions`), `meta.resolved`, and `meta.warnings`. No report is created on this failure; select an exact returned candidate or ask the user before retrying.
20
+
19
21
  ## SQL dynamic parameter shortest path
20
22
 
21
23
  When a SQL report contains a `${...}` placeholder, define its saved default in the same AI-facing `definition`. Example:
22
24
 
23
25
  ```bash
24
- ae-cli analysis report create --project-id <project_id> --report-name "Recent SQL" --model-type sql --definition '{"sql":"select * from events where ${PartDate:ds} limit 100","params":[{"name":"ds","type":"part_date","recent_day":"1-7"}]}'
26
+ ae-cli analysis report create --project-id <project_id> --report-name "Recent SQL" --model-type sql --definition '{"sql":"select * from events where ${PartDate:ds} limit 100","params":[{"name":"ds","type":"part_date","recent_day":"1-7","use_timezone":true}]}'
25
27
  ```
26
28
 
29
+ `use_timezone` is an optional boolean definition field only for `part_date`; it defaults to `false`. `true` makes that parameter use the query's effective timezone. It is a saved definition field, so change it through report create/update `--definition`, never through report-data `--sql-params`.
30
+
27
31
  After creation, keep the `report_id` returned by this exact create response. To verify the report, query the saved default first with `analysis report-data run` and omit `--sql-params`; then make one second query with a value-only `--sql-params` override. Do not rebuild internal `sqlViewParams` or guess an ID.
28
32
 
29
33
  After any successful report create, call `analysis-meta asset url-get` with that returned `report_id` and output its `markdown_link`.
@@ -2,6 +2,8 @@
2
2
 
3
3
  Submit saved report data as a downloadable async artifact. It covers the 12 analysis report models from `ai_models.md` plus tag report data; tags are report-data only and are not ad-hoc `model_type` values.
4
4
 
5
+ Typical closed loop: verify saved report definition -> resolve exact filter values and physical query route when needed -> submit export -> preserve the returned run/artifact pair -> inspect to a successful terminal state -> download and verify artifact content.
6
+
5
7
  Before adding overrides, call `analysis report get` for every report. The model matrix is the same as `report-data run`: SQL accepts only saved `definition.params` names through `--sql-params`; non-SQL analysis models accept filters/group/time overrides; tag executes its saved definition. Never put generic overrides and `--sql-params` in one homogeneous-model request.
6
8
 
7
9
  Routing: read [`analysis_data_retrieval.md`](analysis_data_retrieval.md) before choosing this `export` command instead of `report-data run`.
@@ -16,9 +18,14 @@ ae-cli analysis report-data export --project-id <project_id> --report-ids '[1001
16
18
 
17
19
  # SQL report
18
20
  ae-cli analysis report-data export --project-id <project_id> --report-ids '[2001]' --sql-params '[{"name":"platform","value":"ios"}]' --artifact-format jsonl
21
+
22
+ # Global cross-cluster export for a supported non-SQL report
23
+ ae-cli analysis report-data export --project-id <project_id> --report-ids '[1001]' --cluster-query-scope GLOBAL --artifact-format jsonl
19
24
  ```
20
25
 
21
- Input sends `project_id`, `report_ids`, optional `request_id`, `filters`, `group_by`, `sql_params`, `start_time`, `end_time`, `time_granularity`, `zone_offset`, `use_cache`, artifact `format`, and `timeout_seconds`. Async export has no inline row limit. Runtime defaults to and is capped at 21600 seconds (6 hours); cancel earlier with `analysis query cancel --run-id <run_id>`. The routing rule lives in [`analysis_data_retrieval.md`](analysis_data_retrieval.md).
26
+ Input also accepts optional `cluster_query_scope` and conditional `slave_cluster_id`. Omit both for current-self data. Resolve allowed physical routes with `analysis query-cluster list`; SQL reports reject `GLOBAL`. Async export has no inline row limit. Runtime defaults to and is capped at 21600 seconds (6 hours); cancel earlier with `analysis query cancel --run-id <run_id>`.
27
+
28
+ The downloaded report-data artifact contains report rows and per-report markers, not `actual_cluster_query_scope` metadata. Therefore resolve an allowed route first, keep the submitted scope/ID with the run record, and do not infer route from row contents.
22
29
 
23
30
  Timezone contract is identical to `report-data run`: omit `--zone-offset` to match the current user's report UI timezone (falling back to the project default); use an enabled integer from `-12` through `14` for a fixed UTC offset; use `--zone-offset 99` for local-time mode, where rows are not converted to one fixed UTC offset. `99` is a mode identifier, not `UTC+99`, and the option is not persisted.
24
31
 
@@ -26,7 +33,7 @@ Override model:
26
33
 
27
34
  - `filters`: AI-facing intent object `{relation:"and|or", items:[{field:{name,type?}, operator, values?}]}`. `field.type` supports `event_property`, `user_property`, `cluster`, and `tag`; omit it only when the field name is unambiguous. Use field names from `analysis report get` definition output or metadata commands. Do not pass raw QP fields such as `taFilters`, `junctionKind`, `columnName`, `tableType`, or `selectType`.
28
35
  - `group-by`: AI-facing intent array `[{field:{name,type?}}]`. Use the same field model as report definitions. Do not pass raw `TaGroupByVo`. Time granularity is controlled by `--time-granularity`, not by `--group-by`.
29
- - `sql-params`: SQL report dynamic parameter value overrides. First read `analysis report get`; every name must exist in every target SQL report's `definition.params`. Time fields require a saved `part_date` or time parameter. Send only override values; do not send definition fields.
36
+ - `sql-params`: SQL report dynamic parameter value overrides. First read `analysis report get`; every name must exist in every target SQL report's `definition.params`. Time fields require a saved `part_date` or time parameter. Send only override values; do not send definition fields such as `type`, `options`, or `use_timezone`.
30
37
 
31
38
  Mixed-model export batches are best-effort rather than rejected only for being mixed. Prefer one model per overridden export because artifact formats cannot surface submission-time warnings as prominently as inline `meta.warnings`.
32
39
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  Execute bounded inline data from one or more saved reports.
4
4
 
5
+ Typical closed loop: discover a saved report -> verify its definition -> resolve any unknown exact filter value with `analysis filter-value list` -> optionally resolve a physical route with `analysis query-cluster list` -> run -> inspect actual scope and warnings -> use the returned synchronous query context for drilldown.
6
+
5
7
  Routing: read [`analysis_data_retrieval.md`](analysis_data_retrieval.md) before choosing this `run` command instead of `report-data export`.
6
8
 
7
9
  Do not use this command for full, unknown-size, larger than 1000-row, or long-running report data; use `report-data export`.
@@ -27,9 +29,12 @@ ae-cli analysis report-data run --project-id <project_id> --report-ids '[2001]'
27
29
 
28
30
  # Explicit local-time mode (not UTC+99)
29
31
  ae-cli analysis report-data run --project-id <project_id> --report-ids '[1001]' --zone-offset 99 --limit 20
32
+
33
+ # One physical slave query cluster
34
+ ae-cli analysis report-data run --project-id <project_id> --report-ids '[1001]' --cluster-query-scope SLAVE --slave-cluster-id jp --limit 20
30
35
  ```
31
36
 
32
- Input sends `project_id`, `report_ids`, optional `request_id`, `filters`, `group_by`, `sql_params`, `start_time`, `end_time`, `time_granularity`, `zone_offset`, `use_cache`, `limit`, and `timeout_seconds`. Control defaults: `--limit` default 100 / max 1000, `--timeout-seconds` default 120 / max 180. The routing rule lives in [`analysis_data_retrieval.md`](analysis_data_retrieval.md).
37
+ Input also accepts optional `cluster_query_scope` and conditional `slave_cluster_id`. Omit both for current-self data. Use `GLOBAL` only for explicit cross-cluster aggregation; use `SLAVE` with exactly one ID returned by `analysis query-cluster list`. SQL reports reject `GLOBAL`. Control defaults: `--limit` default 100 / max 1000, `--timeout-seconds` default 120 / max 180.
33
38
 
34
39
  Timezone contract:
35
40
 
@@ -42,7 +47,7 @@ Override model:
42
47
 
43
48
  - `filters`: AI-facing intent object `{relation:"and|or", items:[{field:{name,type?}, operator, values?}]}`. `field.type` supports `event_property`, `user_property`, `cluster`, and `tag`; omit it only when the field name is unambiguous. Use field names from `analysis report get` definition output or metadata commands. Do not pass raw QP fields such as `taFilters`, `junctionKind`, `columnName`, `tableType`, or `selectType`.
44
49
  - `group-by`: AI-facing intent array `[{field:{name,type?}}]`. Use the same field model as report definitions. Do not pass raw `TaGroupByVo`. Time granularity is controlled by `--time-granularity`, not by `--group-by`.
45
- - `sql-params`: SQL report dynamic parameter value overrides. First read `analysis report get`; saved SQL params are exposed as AI-facing `definition.params`. Every name must exist in every target SQL report because one batch shares the override. Send only override values for existing parameter names: `[{"name":"platform","value":"ios"}]`, `[{"name":"server_id","operator":"contains","value":"s1"}]`, `[{"name":"level","operator":"eq","values":["42"]}]`, `[{"name":"amount","operator":"between","values":["10","20"]}]`, `[{"name":"part_date","start_time":"2026-07-01 00:00:00","end_time":"2026-07-09 23:59:59"}]`, or `[{"name":"part_date","recent_day":"1-7"}]`. Time fields require a saved `part_date` or time parameter. Operators `eq`/`in`, `neq`/`not_in`, and `between` use `values`; comparison/like/contains operators use single `value`. Do not send definition fields.
50
+ - `sql-params`: SQL report dynamic parameter value overrides. First read `analysis report get`; saved SQL params are exposed as AI-facing `definition.params`. Every name must exist in every target SQL report because one batch shares the override. Send only override values for existing parameter names: `[{"name":"platform","value":"ios"}]`, `[{"name":"server_id","operator":"contains","value":"s1"}]`, `[{"name":"level","operator":"eq","values":["42"]}]`, `[{"name":"amount","operator":"between","values":["10","20"]}]`, `[{"name":"part_date","start_time":"2026-07-01 00:00:00","end_time":"2026-07-09 23:59:59"}]`, or `[{"name":"part_date","recent_day":"1-7"}]`. Time fields require a saved `part_date` or time parameter. Operators `eq`/`in`, `neq`/`not_in`, and `between` use `values`; comparison/like/contains operators use single `value`. Do not send definition fields such as `type`, `options`, or `use_timezone`; change them through report update.
46
51
 
47
52
  A homogeneous SQL request that includes `filters`, `group_by`, `start_time`, `end_time`, or `time_granularity` fails with `INVALID_OVERRIDE_FOR_MODEL`. A homogeneous non-SQL request with `sql_params` also fails. Mixed-model batches are best-effort: data still returns and `meta.warnings[]` uses `OVERRIDE_IGNORED_FOR_MODEL`, `model_type`, `report_ids`, and `ignored_fields` to identify fields that did not apply. Do not discard these warnings.
48
53
 
@@ -50,6 +55,6 @@ For a newly created or updated dynamic SQL report, omit `--sql-params` to execut
50
55
 
51
56
  Output is the gateway envelope. `data` contains bounded inline report result items plus `query_context_id` and `sources[]`. Each source includes `effective_zone_offset`, the timezone value actually used for that query. When `zone_offset` is omitted, this is the resolved current-user timezone when available, otherwise the project default; when `zone_offset` is explicit, this is its resolved effective value. `sources[].drilldown` is present when the returned preview exposes follow-up actions. Each source is evaluated independently; SQL and other unsupported models have no actions.
52
57
 
53
- An empty batch or report result with no rows is a successful query: it means the requested time range has no data. The command fails only when every returned report entry contains an explicit execution error. Mixed batches keep successful items and return `meta.partial`, counts, and per-report `meta.failures` for partial-result handling.
58
+ `meta.actual_cluster_query_scope`, optional `meta.actual_slave_cluster_id`, and `meta.cluster_query_scope_source` describe the actual physical route. Verify them before comparing or drilling down. An empty batch or report result with no rows is a successful query: it means the requested time range has no data. The command fails only when every returned report entry contains an explicit execution error.
54
59
 
55
60
  Read [`analysis_drilldown_contract.md`](analysis_drilldown_contract.md). Select only returned row/column/metric options and call only the advertised event, entity, or result-cluster action. Do not pass raw QP.
@@ -12,12 +12,14 @@ ae-cli analysis report get --project-id <project_id> --report-id <report_id>
12
12
 
13
13
  Input sends `project_id` and `report_id`.
14
14
 
15
+ This command reads saved definition metadata and deliberately has no `--use-cache` option. Cache selection applies to `report-data run/export`, not to definition reads.
16
+
15
17
  Output is the gateway envelope. `data` contains `version`, `model_type`, `definition`, report metadata, and dashboard membership in snake_case. Use `data.version` as `--report-version` when updating the same report. Raw frontend `events`, `event_view`, `visual_view`, and raw QP are not returned.
16
18
 
17
19
  For a saved non-SQL report with a time granularity, `data.definition` returns the agent-facing `time_particle_size` spelling, such as `day`, `hour`, or `total`; internal `T0` through `T9` codes must never leak. If `time_particle_size` is absent, the saved definition has no readable granularity. Do not infer a granularity from the number of result rows; execute the saved report as-is or use an explicit ad-hoc definition when the user requires a specific granularity.
18
20
 
19
21
  This read is mandatory before applying report-data overrides. Branch on `data.model_type`:
20
22
 
21
- - `sql`: only `--sql-params` is valid. Every override name must already exist in `data.definition.params`; time values may be overridden only through a saved `part_date` or time parameter.
23
+ - `sql`: only `--sql-params` is valid. Every override name must already exist in `data.definition.params`; time values may be overridden only through a saved `part_date` or time parameter. A saved PartDate definition exposes boolean `use_timezone` (default `false`); it is definition metadata and cannot be overridden by report-data.
22
24
  - non-SQL analysis models: use `--filters`, `--group-by`, `--start-time`, `--end-time`, or `--time-granularity`; do not send `--sql-params`.
23
25
  - `tag`: report-data executes the saved tag definition. For a different tag view, use `analysis history-tag-data run/export`.
@@ -17,6 +17,10 @@ Input sends `project_id`, `report_id`, `version` from CLI `--report-version`, an
17
17
 
18
18
  Output is the gateway envelope. `data` contains update status, `report_id`, and the normalized AI QP definition when a definition was updated.
19
19
 
20
+ When a definition is supplied, update and its `--validate` / `--dry-run` paths use the same compiler contract. `AI_QP_COMPILE_FAILED` preserves `meta.compile_status`, full `meta.errors[]` (including `code`, `candidates`, and `suggestions`), `meta.resolved`, and `meta.warnings`. The report is not changed on this failure; resolve the ambiguity before retrying.
21
+
20
22
  For the shortest safe update, read the current `version` exactly once with `analysis report get` immediately before the write; do not reuse a version from an older list or conversation turn. If a SQL dynamic parameter definition changed, query the saved default before applying an override so default persistence and override behavior are verified separately.
21
23
 
24
+ For a SQL `part_date` parameter, `use_timezone` is a boolean saved definition field with default `false`. Change it only by submitting the complete updated `definition`; report-data `--sql-params` is value-only and must not contain `use_timezone`.
25
+
22
26
  After a successful update, call `analysis-meta asset url-get` with the updated `report_id` and output its `markdown_link`.
@@ -9,9 +9,9 @@ Before constructing `--events` / `--filter`, validate the available events and p
9
9
  Command:
10
10
 
11
11
  ```bash
12
- ae-cli analysis-meta virtual-event create --project-id <project_id> --event-name ta@demo --event-desc demo --events '[{"eventName":"purchase"}]'
13
- ae-cli analysis-meta virtual-event create --project-id <project_id> --event-name ta@demo2 --event-desc demo --remark demo --events '[{"eventName":"add_to_cart"}]' --filter '{}' --override true
14
- ae-cli analysis-meta virtual-event create --project-id <project_id> --override false --payload '{"event_name":"qualified_purchase","event_desc":"Qualified purchase","rule":{"events":[...],"filter":{...}}}'
12
+ ae-cli analysis-meta virtual-event create --project-id <project_id> --event-name ta@demo --event-desc demo --events '[{"event_name":"purchase"}]'
13
+ ae-cli analysis-meta virtual-event create --project-id <project_id> --event-name ta@demo2 --event-desc demo --remark demo --events '[{"event_name":"add_to_cart","filter":{"relation":"and","items":[{"field":{"name":"country","type":"user_property"},"operator":"eq","values":["US"]}]}}]' --override true
14
+ ae-cli analysis-meta virtual-event create --project-id <project_id> --override false --payload '{"event_name":"ta@qualified_purchase","event_desc":"Qualified purchase","rule":{"events":[...],"filter":{...}}}'
15
15
  ae-cli analysis-meta virtual-event create --dry-run
16
16
  ```
17
17
 
@@ -19,7 +19,7 @@ Capability id: `metadata.virtual_event.create`.
19
19
 
20
20
  Input sends `project_id`, `override`, and `payload`. When typed flags are used, ae-cli builds `payload` from `event_name`, `event_desc`, `remark`, and `rule.events/filter`.
21
21
 
22
- Output is a successful gateway envelope with no business data. Read back with `virtual-event get` when the created event ID is known.
22
+ Output data contains `v_event_id` and `event_name`. Use the returned `v_event_id` for `virtual-event get` or `virtual-event delete`.
23
23
 
24
24
  ## Parameters
25
25
  | Parameter | Required | Description |
@@ -30,11 +30,12 @@ Output is a successful gateway envelope with no business data. Read back with `v
30
30
  | `--event-name` | No | Virtual event name. Must start with `ta@`. Required when `--payload` is omitted. |
31
31
  | `--event-desc` | No | Virtual event display name. Required when `--payload` is omitted. |
32
32
  | `--remark` | No | Optional virtual event remark. |
33
- | `--events` | No | JSON array of events to combine. Required when `--payload` is omitted. |
34
- | `--filter` | No | Optional global filter JSON. Referenced properties must come from `analysis-meta property list`. |
33
+ | `--events` | No | JSON array of `{event_name,event_desc?,filter?}`. Each filter uses `{relation:'and|or',items:[{field:{name,type?},operator,values?}]}`. Required when `--payload` is omitted. |
34
+ | `--filter` | No | Optional global AI-facing filter with the same `relation/items` shape. Raw `taFilters`, `junctionKind`, and `calcuSymbol` are rejected. Referenced properties must come from `analysis-meta property list`. |
35
35
 
36
36
  ## Decision Rules
37
37
  - `events` / `filter` must not be handwritten by intuition alone; they must match real metadata in the same project.
38
+ - Use snake_case `event_name`; do not pass the legacy `eventName` spelling.
38
39
  - Before calling `event list` / `property list`, read the corresponding reference documents.
39
40
  - For first validation, pass only required typed parameters: `--project-id`, `--event-name`, `--event-desc`, and `--events`.
40
41
  - Use `--payload` only when an exact virtual-event rule DTO is already available.
@@ -1,53 +1,36 @@
1
1
  ---
2
2
  name: ae-analysis-global
3
3
  version: 1.0.0
4
- description: "Use when AE/TE analysis requests mention query/current/service/deployment clusters, current cluster (当前集群), cluster info (集群信息/有哪些集群), global or multi-cluster data, all clusters/all servers, GLOBAL/SLAVE, list_query_clusters, cluster_query_scope, slave_cluster_id, country/region/server/shard/site/market routing, sw_cfg_enable_global_query, or when cluster may mean query cluster rather than audience/user segment."
4
+ description: "Use when AE/TE analysis requests mention query/current/service/deployment clusters, current cluster (当前集群), cluster info (集群信息/有哪些集群), global or multi-cluster data, all clusters/all servers, GLOBAL/SLAVE, query-cluster, cluster_query_scope, slave_cluster_id, country/region/server/shard/site/market routing, or when cluster may mean query cluster rather than audience/user segment."
5
5
  ---
6
6
 
7
7
  # ae-analysis-global
8
8
 
9
9
 
10
- Load this skill based on user intent first. After loading, run `ae-cli config cluster-mode status`; the status gates whether these overlay rules apply, not whether this skill should be loaded.
10
+ This is a terminology and routing overlay for `ae-analysis`. Read the base command reference [`../ae-analysis/references/query_cluster_list.md`](../ae-analysis/references/query_cluster_list.md) before composing the inventory command. Server output, not a local CLI feature switch, is authoritative for whether global query is enabled and which routes the account may use.
11
11
 
12
- This is an overlay for `ae-analysis`. First use the normal `ae-analysis` rules and matching command references. Apply the rules below only when local multi-cluster mode is enabled (`ae-cli config cluster-mode status`):
13
-
14
- ```bash
15
- ae-cli config cluster-mode status
16
- ```
17
-
18
- The result must contain:
19
-
20
- ```json
21
- {"sw_cfg_enable_global_query": true}
22
- ```
23
-
24
- If the mode is not enabled, do not use this overlay.
25
-
26
- For commands added only by this overlay, read this skill's matching reference file before composing commands. Example: `+list_query_clusters` -> `references/list_query_clusters.md`.
27
-
28
- Every command accepts `--host <url>` to override the active AE host, and it may be placed after the subcommand (e.g. `ae-cli analysis +list_query_clusters --project_id <id> --host <url>`). Host selection is independent of `--cluster_query_scope`: `--host` chooses which AE instance to call, while `--cluster_query_scope` / `--slave_cluster_id` choose which cluster within global mode.
12
+ Every command accepts `--host <url>` to override the active AE host. Host selection is independent of `--cluster-query-scope`: `--host` chooses the AE instance, while `--cluster-query-scope` / `--slave-cluster-id` choose a physical query route inside that instance.
29
13
 
30
14
  **CRITICAL — Host compat (do this first):** After each `ae-cli` run, check stderr and `_notice.host_compat`. If either is present, open the user reply with a short ⚠️ version warning and **quote the `npm i -g` / `npx skills add` (or update-cluster) lines verbatim**, then present the business result. Soft tip; `ok: true` can still carry the notice. (Also covered by `ae-analysis` Global Rules when both skills are loaded.)
31
15
 
32
16
  ## Routing Rules
33
17
 
34
- - In this overlay, **query cluster / service cluster / deployment cluster** means multi-cluster routing for analysis queries. **audience/user segment cluster** means user membership assets under `analysis user-cluster`.
35
- - If the user asks for cluster inventory or cluster info, call `ae-cli analysis +list_query_clusters --project_id <project_id>`. Localized examples include "集群信息" and "有哪些集群".
18
+ - In this overlay, **查询集群 / 数据集群 / 部署集群** means physical multi-cluster routing for analysis queries. **用户分群 / 人群包** means user-membership assets under `analysis user-cluster`.
19
+ - If the user asks for query-cluster inventory or cluster info, call `ae-cli analysis query-cluster list --project-id <project_id>`. Localized examples include "查询集群信息" and "有哪些数据集群".
36
20
  - Do not answer query-cluster inventory questions with `ae-cli analysis user-cluster list` unless the user explicitly asks for audience clusters, cohorts, segments, user membership, or cluster definitions.
37
- - If the user mentions country, region, server, shard, site, market, or deployment area semantics, call `ae-cli analysis +list_query_clusters --project_id <project_id>` before choosing query scope.
38
- - Match slave cluster intent only against `slaveClusters[].clusterId`, `slaveClusters[].clusterName`, and `slaveClusters[].clusterDesc` returned by `+list_query_clusters`.
39
- - Unified ad-hoc gateway commands (`analysis adhoc run/export`) do not expose `cluster_query_scope`. If the user explicitly needs global/slave ad-hoc analysis, state that the new ad-hoc gateway contract does not support cluster routing yet and stop instead of adding hidden flags or removed ad-hoc commands.
40
- - Report/dashboard data gateway commands (`analysis report-data run/export`, `analysis dashboard-report-data run/export`) also do not expose `cluster_query_scope`; do not add hidden cluster flags to them.
41
- - Use `--cluster_query_scope GLOBAL` only when the user clearly asks for global, all clusters, all servers, or cross-cluster aggregated data, and `permissions.canQueryGlobal=true`.
42
- - If the user does not express global or slave-cluster intent, omit `--cluster_query_scope`.
43
- - If requested global/slave scope is not allowed, explain `permissions.allowedClusterQueryParams` instead of guessing forbidden parameters.
44
- - For SQL model analysis, never pass `cluster_query_scope`; SQL model analysis only supports the current self cluster in the current gateway contract.
21
+ - If the user mentions country, region, server, shard, site, market, or deployment area semantics, call `analysis query-cluster list` before choosing query scope.
22
+ - Match slave intent only against returned `slave_clusters[].cluster_id`, `cluster_name`, and `cluster_desc`.
23
+ - Report-data, dashboard-report-data, and ad-hoc run/export expose `--cluster-query-scope GLOBAL|SLAVE`; `SLAVE` requires `--slave-cluster-id`.
24
+ - Use `GLOBAL` only when the user clearly asks for all clusters/servers or cross-cluster aggregation and `permissions.can_query_global=true`.
25
+ - If the user does not express global or slave-cluster intent, omit the flag. Report/ad-hoc then use current self; dashboard follows its saved configuration.
26
+ - If a requested route is not allowed, explain `permissions.allowed_cluster_query_params` instead of silently falling back.
27
+ - SQL and attribution ad-hoc analysis do not support `GLOBAL`; SQL report/dashboard data also reject effective `GLOBAL`. Use an allowed `SLAVE` or current-self route.
45
28
 
46
29
  ## Response Wording
47
30
 
48
- - For `+list_query_clusters`, call the result "query clusters" and summarize `currentCluster`, `slaveClusters`, and `permissions.allowedClusterQueryParams`.
31
+ - For `analysis query-cluster list`, call the result "查询集群" or "query clusters" and summarize `current_cluster`, `slave_clusters`, and `permissions.allowed_cluster_query_params`.
49
32
  - For `analysis user-cluster list`, call the result "audience clusters" or "user segments"; do not call those results query clusters.
50
33
 
51
- ## Commands Added By Multi-Cluster Mode
34
+ ## Query-cluster command
52
35
 
53
- - `ae-cli analysis +list_query_clusters --project_id <project_id>`
36
+ - `ae-cli analysis query-cluster list --project-id <project_id>`
@@ -42,7 +42,7 @@ Safety constraints:
42
42
  - Never invent command names, flags, JSON payloads, `project_id`, resource IDs, field names, event names, property names, metric definitions, or date formats. Read the matching command reference and discover real project metadata first.
43
43
  - **NEVER fabricate or guess resource names** (reports, dashboards, events, properties, metrics, clusters, tags, alerts). Always use list commands to discover real resources first. If a resource is not found after fuzzy search and full list fallback, explicitly tell the user "resource not found" and stop - do not proceed with fabricated names.
44
44
 
45
- **Community** commands use the domain `community` (this skill). Other AE domains include: `analysis` (analysis and audience), `analysis_meta` (metadata), `analysis_common` (common), `operation` (operations).
45
+ **Community** commands use the domain `community` (this skill). Other AE domains include: `analysis` (analysis and audience), `analysis_meta` (metadata), and `operation` (operations).
46
46
 
47
47
  ---
48
48
 
@@ -25,7 +25,7 @@ description: "Answers questions about ThinkingData SDK integration and usage, in
25
25
  | 事件格式 | Event Format | Event name + properties structure |
26
26
  | 属性类型 | Property Type | String / Number / Boolean / Date / Array |
27
27
  | 数据校验 | Data Validation | Verify event format & property types |
28
- | 公共服务端属性 | Super Property | Properties attached to all events |
28
+ | 公共事件属性 | Super Property | Properties attached to all events. ⚠️ The correct Chinese AE term is "公共事件属性" or "公共属性". Never translate "Super Property" as "超级属性" — that is NOT a valid AE term. |
29
29
  | 可更新事件 | Updatable Event | Event whose properties can be updated after creation |
30
30
  | 首次事件校验 | First Event Check | Validate an event's first occurrence |
31
31
  | 自动采集 | Auto-track | Auto-collected events (app install, start, page view, etc.) |
@@ -151,8 +151,9 @@ After reading relevant documentation, output in the following format:
151
151
  (If no sourceUrl, provide local .md file path)
152
152
  ```
153
153
 
154
- **⚠️ Information Accuracy Rules**:
154
+ **⚠️ Terminology Rules**:
155
155
  - **Only output what is in the documentation**. Do NOT speculate, imagine, or fill in defaults.
156
+ - **Never translate "Super Property" as "超级属性"** — the correct AE Chinese term is "公共事件属性" or "公共属性". This applies to all user-facing output: headings, step descriptions, code comments, examples, etc.
156
157
  - For uncertain information (e.g., data delay times, specific limit values), **do NOT fabricate**.
157
158
  - If the document has no direct answer but allows inference: mark under "Source Document" as "Synthesized inference; recommend verification".
158
159
  - If the documentation truly does not cover the question, fall back to Step 4. Do NOT force an answer.
@@ -1,6 +1,6 @@
1
1
  # SDK Usage Notes
2
2
 
3
- > **Terminology**: 上报模式 = upload mode | 缓存上报 = batch/buffered upload | 批量上报策略 = batch upload strategy | 上报失败处理 = upload failure handling | 属性类型 = property type | 预置属性 = preset property (`#` prefix) | 自定义属性 = custom property | 时间校准 = time calibration | 自动采集事件 = auto-track event | 数据加密 = data encryption | LoggerConsumer = writes events to local log files (recommended for production) | BatchConsumer = uploads events in batches with retry | DebugConsumer = debug-only consumer (NOT for production) | 公共属性 = super property | 动态公共属性 = dynamic super property | 多端上报 = multi-platform tracking | 用户割裂 = user fragmentation | 时区偏移 = timezone offset (`#zone_offset`)
3
+ > **Terminology**: 上报模式 = upload mode | 缓存上报 = batch/buffered upload | 批量上报策略 = batch upload strategy | 上报失败处理 = upload failure handling | 属性类型 = property type | 预置属性 = preset property (`#` prefix) | 自定义属性 = custom property | 时间校准 = time calibration | 自动采集事件 = auto-track event | 数据加密 = data encryption | LoggerConsumer = writes events to local log files (recommended for production) | BatchConsumer = uploads events in batches with retry | DebugConsumer = debug-only consumer (NOT for production) | 公共属性 = super property (公共事件属性; never "超级属性") | 动态公共属性 = dynamic super property | 多端上报 = multi-platform tracking | 用户割裂 = user fragmentation | 时区偏移 = timezone offset (`#zone_offset`)
4
4
 
5
5
  # 一、客户端 SDK
6
6
 
@@ -182,7 +182,8 @@ Detailed datasource, metadata browsing, sync solution, execution, and monitoring
182
182
 
183
183
  Key constraints:
184
184
  - Generate `sourceConfig`, `sinkConfig`, `channelConfig`, and `fieldsMapping` from the reference templates; do not invent keys.
185
- - `+save_sync_solution` is not a partial patch: call `+get_sync_detail --withParams true` first, then submit complete configs.
185
+ - MySQL Source read partitioning uses `sourceConfig.splitColumn`; `fieldsMapping.shardingKey` is column metadata and must not be used for it.
186
+ - `+save_sync_solution` is not a partial patch: call `+get_sync_detail --withParams true` first, then submit complete configs. `syncName` is accepted for compatibility but ignored.
186
187
  - Preset repository sync uses `te_etl@TASK_ENGINE_TRINO` and requires gateway configuration.
187
188
  - Use `+list_sync_runs` to get `taskId` before stopping a running sync.
188
189
 
@@ -88,7 +88,7 @@ ae-cli dataops_integration +add_sync_solution --spaceCode "${spaceCode}" \
88
88
  --syncName "MySQL to Preset Repository Sync" \
89
89
  --srcComponent "MySQL" --srcDatasourceId "${mysqlDatasourceId}" \
90
90
  --sinkComponent "te_etl" --sinkDatasourceId "te_etl@TASK_ENGINE_TRINO" \
91
- --sourceConfig '{"component":"MySQL","datasourceId":"xxx","database":"test","tablePath":"users"}' \
91
+ --sourceConfig '{"component":"MySQL","datasourceId":"xxx","database":"test","tablePath":"users","batchSize":1000}' \
92
92
  --sinkConfig '{"component":"te_etl","datasourceId":"te_etl@TASK_ENGINE_TRINO","database":"","tablePath":"ods_users_mysql","tableType":"PHYSICAL_TABLE","bizClassify":"CURRENT","dbBizType":"TASK_ENV_DB","authedSpace":"","partitionKeys":[],"dataSaveMode":1,"batchSize":20000}' \
93
93
  --channelConfig '{"limitType":"0","gatewayConfig":{"engineFlag":"TASK_ENGINE_TRINO","companyId":1,"appDefinition":"APP_GAIA","bizFlag":"BIZ_GAIA_TASK_RELEASE","repoCode":"te_etl","spaceCode":"default"}}' \
94
94
  --fieldsMapping '{"mapping":[{"source":{"name":"id","type":"int","manual":false,"partitionKey":false,"primaryKey":false,"shardingKey":false,"sortingKey":false,"upsertKey":false},"target":{"name":"id","type":"int","manual":false,"partitionKey":false,"primaryKey":false,"shardingKey":false,"sortingKey":false,"upsertKey":false}}]}'
@@ -148,17 +148,86 @@ ae-cli dataops_integration +stop_sync_solution --spaceCode "${spaceCode}" \
148
148
  }
149
149
  ```
150
150
 
151
- ### Non-Preset Repository (e.g., MySQL)
151
+ ### MySQL table source without filter
152
152
 
153
153
  ```json
154
154
  {
155
155
  "component": "MySQL",
156
- "datasourceId": "ds-uuid-xxx",
157
- "database": "test",
158
- "tablePath": "users"
156
+ "datasourceId": "ds-id",
157
+ "database": "demo",
158
+ "tablePath": "orders",
159
+ "batchSize": 1000
159
160
  }
160
161
  ```
161
162
 
163
+ ### MySQL table source with splitColumn
164
+
165
+ ```json
166
+ {
167
+ "component": "MySQL",
168
+ "datasourceId": "ds-id",
169
+ "database": "demo",
170
+ "tablePath": "orders",
171
+ "splitColumn": "id",
172
+ "batchSize": 1000
173
+ }
174
+ ```
175
+
176
+ ### MySQL table source with whereCondition
177
+
178
+ ```json
179
+ {
180
+ "component": "MySQL",
181
+ "datasourceId": "ds-id",
182
+ "database": "demo",
183
+ "tablePath": "orders",
184
+ "whereCondition": "WHERE created_at >= '2026-07-01'",
185
+ "batchSize": 1000
186
+ }
187
+ ```
188
+
189
+ ### MySQL custom query source
190
+
191
+ ```json
192
+ {
193
+ "component": "MySQL",
194
+ "datasourceId": "ds-id",
195
+ "query": "SELECT id, amount FROM orders",
196
+ "batchSize": 1000
197
+ }
198
+ ```
199
+
200
+ Use exactly one mode. Table mode requires `database` and `tablePath` and may include
201
+ non-empty `splitColumn` and `whereCondition`. Query mode requires non-empty `query`
202
+ and must not include table-only fields. `batchSize` must be an integer from `1000` to
203
+ `10000`; omit it to use the backend default `1000`.
204
+
205
+ The GUI may send `readType` (`1=table`, `2=query`) and `hasCondition` (`0=off`, `1=on`).
206
+ They are optional for CLI calls. Prefer the canonical templates above. In table mode,
207
+ `hasCondition=1` requires a non-empty `whereCondition`.
208
+
209
+ MySQL Source read partitioning uses `sourceConfig.splitColumn`;
210
+ `fieldsMapping.shardingKey` is column metadata and must not be used for it.
211
+
212
+ ### MySQL sink target
213
+
214
+ ```json
215
+ {
216
+ "component": "MySQL",
217
+ "datasourceId": "ds-id",
218
+ "database": "demo",
219
+ "tablePath": "orders",
220
+ "dataSaveMode": 2,
221
+ "batchSize": 1000
222
+ }
223
+ ```
224
+
225
+ MySQL Sink requires non-empty `database` and `tablePath` and must not contain a
226
+ `query` key. `dataSaveMode` must be a JSON integer: `1=append`, `2=overwrite`,
227
+ `3=upsert`; omit it to use default `2`. `batchSize` must be a JSON integer from
228
+ `1000` to `10000`; omit it to use default `1000`. Strings, enum names, decimals,
229
+ booleans, `null`, and out-of-range values are rejected.
230
+
162
231
  ### channelConfig (must include gatewayConfig when source or target involves preset repository)
163
232
 
164
233
  ```json
@@ -246,7 +315,7 @@ ae-cli dataops_integration +stop_sync_solution --spaceCode "${spaceCode}" \
246
315
  - **Datasource table structure**: `+get_table_structure` requires `--spaceCode`, `--datasourceId`, `--database`, and `--tablePath`; `--catalog` and `--env` are optional, and `--env` defaults to `DEV`. It returns `columns` and `partitionColumns`.
247
316
  - **Sync solution list**: `+list_sync_solutions` requires only `--spaceCode`. It returns sync metadata including `syncId`, `syncName`, source/sink datasource and table fields, last execution/schedule status codes, owner, remark, and timestamps.
248
317
  - **Sync detail**: `+get_sync_detail` requires `--spaceCode` and `--syncId`; `--withParams` is optional and defaults to `false`. It returns source, sink, field mapping, last execution/schedule status, owner, and `nextAction`; `withParams=true` also returns `usedParams`.
249
- - **Sync update**: `+save_sync_solution` requires `--spaceCode`, `--syncId`, `--sourceConfig`, and `--sinkConfig`; `--syncName`, `--channelConfig`, `--fieldsMapping`, and `--remark` are optional. Passing `--syncName` renames the sync solution; omit it to keep the current name. `sourceConfig` and `sinkConfig` must be complete JSON strings from `+get_sync_detail --withParams true`; pass complete `channelConfig` and `fieldsMapping` when keeping or updating them.
318
+ - **Sync update**: `+save_sync_solution` requires `--spaceCode`, `--syncId`, `--sourceConfig`, and `--sinkConfig`; `--syncName`, `--channelConfig`, `--fieldsMapping`, and `--remark` are optional. `syncName` is accepted for compatibility but ignored; the current name is preserved. `sourceConfig` and `sinkConfig` must be complete JSON strings from `+get_sync_detail --withParams true`; pass complete `channelConfig` and `fieldsMapping` when keeping or updating them.
250
319
  - **Sync runs**: `+list_sync_runs` requires `--spaceCode` and `--syncId`; `--limit` is optional and defaults to `20`. It returns `runs`, `returnedCount`, `limit`, and `nextAction`; each run includes `taskId`, `execType`, `status`, `execTime`, `channelMode`, and `submitter`.
251
320
  - **Stop sync run**: `+stop_sync_solution` requires `--spaceCode`, `--syncId`, and `--taskId`. Use `taskId` from `+list_sync_runs` for an active run. It returns `action`, `result` with `execStatus`, `syncId`, and `taskId`, and top-level `status`.
252
321