@thinkingai/ae-cli 1.0.3 → 1.0.18

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 (198) hide show
  1. package/README.md +42 -72
  2. package/README.zh.md +202 -0
  3. package/dist/auth-2UTBG5U3.js +144 -0
  4. package/dist/{auth-BQC5DBE7.js → auth-ECD46NBA.js} +6 -4
  5. package/dist/{chunk-3CDLNXTD.js → chunk-4KQ7H7DY.js} +15 -3
  6. package/dist/{chunk-53FNNCZW.js → chunk-7QBNU44L.js} +101 -3
  7. package/dist/{chunk-ZYXIGPG7.js → chunk-LAAS6ITR.js} +3 -3
  8. package/dist/{chunk-EBFUVWIZ.js → chunk-MR57UIKC.js} +42 -0
  9. package/dist/{client-5QSQBBDB.js → client-O56G2SNJ.js} +3 -3
  10. package/dist/{config-Q7J3Z7Z2.js → config-BU5FHGGE.js} +23 -8
  11. package/dist/index.js +15 -15
  12. package/dist/{raw-G3GKHAPZ.js → raw-A3VN2B6I.js} +4 -4
  13. package/dist/{te-analysis-CHFTDN55.js → te-analysis-UGKESPBE.js} +62 -24
  14. package/dist/{te-audience-M6LQY6M7.js → te-audience-THZNVHYB.js} +61 -21
  15. package/dist/{te-common-BLQ7DVGC.js → te-common-QZOUME3S.js} +6 -33
  16. package/dist/{community-FVDAWGS4.js → te-community-AZVW3NFX.js} +59 -59
  17. package/dist/{te-dataops-V4OTKY35.js → te-dataops-OE5PX2K6.js} +3 -28
  18. package/dist/{te-engage-DXE4R5EW.js → te-engage-RYGEQTYK.js} +4 -22
  19. package/dist/{te-meta-FMM7KCVI.js → te-meta-MGO5BCMG.js} +88 -18
  20. package/package.json +3 -3
  21. package/skills/ae-analysis/SKILL.md +287 -0
  22. package/skills/{te-meta/references/batch-create-metadata.md → ae-analysis/references/batch_create_metadata.md} +3 -3
  23. package/skills/{te-meta/references/batch-edit-metadata.md → ae-analysis/references/batch_edit_metadata.md} +2 -2
  24. package/skills/{te-analysis/references/build-entity-details-sql.md → ae-analysis/references/build_entity_details_sql.md} +9 -9
  25. package/skills/{te-analysis/references/build-event-details-sql.md → ae-analysis/references/build_event_details_sql.md} +9 -9
  26. package/skills/{te-analysis/references/create-alert.md → ae-analysis/references/create_alert.md} +4 -4
  27. package/skills/{te-audience/references/create-cluster.md → ae-analysis/references/create_cluster.md} +23 -19
  28. package/skills/{te-analysis/references/create-dashboard.md → ae-analysis/references/create_dashboard.md} +4 -4
  29. package/skills/{te-meta/references/create-metric.md → ae-analysis/references/create_metric.md} +10 -10
  30. package/skills/{te-analysis/references/create-or-update-dashboard-note.md → ae-analysis/references/create_or_update_dashboard_note.md} +3 -3
  31. package/skills/{te-meta/references/create-project-mark-time.md → ae-analysis/references/create_project_mark_time.md} +3 -3
  32. package/skills/{te-analysis/references/create-public-access-link.md → ae-analysis/references/create_public_access_link.md} +3 -3
  33. package/skills/{te-analysis/references/create-report.md → ae-analysis/references/create_report.md} +9 -9
  34. package/skills/{te-analysis/references/create-result-cluster.md → ae-analysis/references/create_result_cluster.md} +6 -6
  35. package/skills/{te-audience/references/create-tag.md → ae-analysis/references/create_tag.md} +16 -15
  36. package/skills/{te-meta/references/create-virtual-event.md → ae-analysis/references/create_virtual_event.md} +9 -9
  37. package/skills/{te-meta/references/create-virtual-property.md → ae-analysis/references/create_virtual_property.md} +7 -7
  38. package/skills/{te-meta/references/delete-project-mark-times.md → ae-analysis/references/delete_project_mark_times.md} +2 -2
  39. package/skills/{te-meta/references/delete-track-items.md → ae-analysis/references/delete_track_items.md} +2 -2
  40. package/skills/{te-analysis/references/drilldown-user-events.md → ae-analysis/references/drilldown_user_events.md} +8 -8
  41. package/skills/{te-analysis/references/drilldown-users.md → ae-analysis/references/drilldown_users.md} +10 -7
  42. package/skills/ae-analysis/references/generate_track_program.md +51 -0
  43. package/skills/ae-analysis/references/generate_track_sdk_sample.md +43 -0
  44. package/skills/{te-analysis/references/get-alert.md → ae-analysis/references/get_alert.md} +2 -2
  45. package/skills/{te-analysis/references/get-alert-definition-schema.md → ae-analysis/references/get_alert_definition_schema.md} +1 -1
  46. package/skills/ae-analysis/references/get_analysis_query_schema.md +61 -0
  47. package/skills/ae-analysis/references/get_cluster_definition_schema.md +53 -0
  48. package/skills/ae-analysis/references/get_clusters_by_name.md +69 -0
  49. package/skills/{te-analysis/references/get-filter-schema.md → ae-analysis/references/get_filter_schema.md} +1 -1
  50. package/skills/{te-analysis/references/get-groupby-schema.md → ae-analysis/references/get_groupby_schema.md} +1 -1
  51. package/skills/{te-meta/references/get-metric.md → ae-analysis/references/get_metric.md} +2 -2
  52. package/skills/{te-meta/references/get-project-config.md → ae-analysis/references/get_project_config.md} +2 -2
  53. package/skills/{te-analysis/references/get-report-definition.md → ae-analysis/references/get_report_definition.md} +2 -2
  54. package/skills/{te-common/references/get-resource-url.md → ae-analysis/references/get_resource_url.md} +4 -4
  55. package/skills/{te-analysis/references/get-table-columns.md → ae-analysis/references/get_table_columns.md} +2 -2
  56. package/skills/ae-analysis/references/get_tag_definition_schema.md +49 -0
  57. package/skills/ae-analysis/references/get_tags_by_name.md +69 -0
  58. package/skills/{te-meta/references/get-track-program.md → ae-analysis/references/get_track_program.md} +2 -2
  59. package/skills/{te-analysis/references/list-alerts.md → ae-analysis/references/list_alerts.md} +10 -3
  60. package/skills/{te-audience/references/list-cluster-members.md → ae-analysis/references/list_cluster_members.md} +11 -4
  61. package/skills/{te-audience/references/list-clusters.md → ae-analysis/references/list_clusters.md} +14 -4
  62. package/skills/{te-analysis/references/list-dashboards.md → ae-analysis/references/list_dashboards.md} +12 -4
  63. package/skills/{te-meta/references/list-entities.md → ae-analysis/references/list_entities.md} +10 -3
  64. package/skills/{te-meta/references/list-events.md → ae-analysis/references/list_events.md} +12 -5
  65. package/skills/ae-analysis/references/list_metrics.md +45 -0
  66. package/skills/ae-analysis/references/list_project_mark_times.md +42 -0
  67. package/skills/{te-meta/references/list-project-users.md → ae-analysis/references/list_project_users.md} +2 -2
  68. package/skills/{te-common/references/list-projects.md → ae-analysis/references/list_projects.md} +6 -4
  69. package/skills/{te-meta/references/list-properties.md → ae-analysis/references/list_properties.md} +9 -4
  70. package/skills/ae-analysis/references/list_public_access_links.md +41 -0
  71. package/skills/{te-analysis/references/list-reports.md → ae-analysis/references/list_reports.md} +12 -4
  72. package/skills/{te-audience/references/list-tag-members.md → ae-analysis/references/list_tag_members.md} +11 -4
  73. package/skills/{te-audience/references/list-tags.md → ae-analysis/references/list_tags.md} +14 -4
  74. package/skills/{te-analysis/references/load-filters.md → ae-analysis/references/load_filters.md} +3 -3
  75. package/skills/{te-analysis/references/query-adhoc.md → ae-analysis/references/query_adhoc.md} +24 -9
  76. package/skills/{te-analysis/references/query-dashboard-detail.md → ae-analysis/references/query_dashboard_detail.md} +2 -2
  77. package/skills/{te-analysis/references/query-dashboard-report-data.md → ae-analysis/references/query_dashboard_report_data.md} +9 -9
  78. package/skills/{te-analysis/references/query-entity-details.md → ae-analysis/references/query_entity_details.md} +10 -10
  79. package/skills/{te-analysis/references/query-event-details.md → ae-analysis/references/query_event_details.md} +12 -12
  80. package/skills/{te-analysis/references/query-report-data.md → ae-analysis/references/query_report_data.md} +11 -11
  81. package/skills/{te-audience/references/refresh-cluster.md → ae-analysis/references/refresh_cluster.md} +2 -2
  82. package/skills/{te-audience/references/refresh-tag.md → ae-analysis/references/refresh_tag.md} +2 -2
  83. package/skills/{te-meta/references/save-track-items.md → ae-analysis/references/save_track_items.md} +2 -2
  84. package/skills/{te-analysis/references/update-alert.md → ae-analysis/references/update_alert.md} +4 -4
  85. package/skills/{te-audience/references/update-cluster.md → ae-analysis/references/update_cluster.md} +15 -13
  86. package/skills/{te-analysis/references/update-dashboard.md → ae-analysis/references/update_dashboard.md} +3 -3
  87. package/skills/{te-meta/references/update-metric.md → ae-analysis/references/update_metric.md} +9 -9
  88. package/skills/{te-meta/references/update-project-mark-time.md → ae-analysis/references/update_project_mark_time.md} +3 -3
  89. package/skills/{te-analysis/references/update-public-access-link.md → ae-analysis/references/update_public_access_link.md} +3 -3
  90. package/skills/{te-audience/references/update-tag.md → ae-analysis/references/update_tag.md} +15 -14
  91. package/skills/ae-community/SKILL.md +305 -0
  92. package/skills/{te-community → ae-community}/references/community-activity-analysis.md +6 -7
  93. package/skills/{te-community → ae-community}/references/community-analyzing-official-content.md +3 -4
  94. package/skills/{te-community → ae-community}/references/community-analyzing-theme-comment.md +5 -6
  95. package/skills/{te-community → ae-community}/references/community-character-analysis.md +5 -6
  96. package/skills/{te-community → ae-community}/references/community-daily-report.md +7 -8
  97. package/skills/{te-community → ae-community}/references/community-hottopic-insight.md +4 -5
  98. package/skills/{te-community → ae-community}/references/community-weekly-report.md +7 -8
  99. package/skills/{te-community → ae-community}/references/get_channel_info.md +4 -5
  100. package/skills/{te-community → ae-community}/references/get_comment_tag_analysis.md +3 -4
  101. package/skills/{te-community → ae-community}/references/get_comments_summary.md +4 -5
  102. package/skills/{te-community → ae-community}/references/get_corpus_tags.md +3 -4
  103. package/skills/{te-community → ae-community}/references/get_daily_summary.md +3 -4
  104. package/skills/{te-community → ae-community}/references/get_hot_topics.md +3 -4
  105. package/skills/{te-community → ae-community}/references/get_livestream_analysis.md +3 -4
  106. package/skills/{te-community → ae-community}/references/get_livestream_detail.md +4 -5
  107. package/skills/{te-community → ae-community}/references/get_livestream_list.md +3 -4
  108. package/skills/{te-community → ae-community}/references/get_livestream_overview.md +3 -4
  109. package/skills/{te-community → ae-community}/references/get_livestream_room_metrics.md +3 -4
  110. package/skills/{te-community → ae-community}/references/get_livestream_rooms.md +3 -4
  111. package/skills/{te-community → ae-community}/references/get_overview_metrics.md +3 -4
  112. package/skills/{te-community → ae-community}/references/get_post_detail.md +4 -5
  113. package/skills/{te-community → ae-community}/references/get_risk_content.md +5 -6
  114. package/skills/{te-community → ae-community}/references/get_sentiment_overview.md +4 -5
  115. package/skills/{te-community → ae-community}/references/get_tag_trends.md +3 -4
  116. package/skills/{te-community → ae-community}/references/get_topic_detail.md +3 -4
  117. package/skills/{te-community → ae-community}/references/search_posts.md +5 -6
  118. package/skills/{te-dataops → ae-dataops}/SKILL.md +73 -10
  119. package/skills/{te-dataops → ae-dataops}/references/dataops-flow-create.md +1 -1
  120. package/skills/{te-dataops → ae-dataops}/references/dataops-flow-monitor.md +1 -1
  121. package/skills/{te-dataops → ae-dataops}/references/dataops-integration.md +1 -1
  122. package/skills/{te-dataops → ae-dataops}/references/dataops-query.md +1 -1
  123. package/skills/{te-dataops → ae-dataops}/references/dataops-table.md +1 -1
  124. package/skills/{te-engage → ae-engage}/SKILL.md +106 -6
  125. package/skills/{te-engage → ae-engage}/references/add-approver.md +2 -2
  126. package/skills/{te-engage → ae-engage}/references/add-channel.md +2 -2
  127. package/skills/{te-engage → ae-engage}/references/approver-list.md +2 -2
  128. package/skills/{te-engage → ae-engage}/references/cancel-query-by-request-id.md +2 -2
  129. package/skills/{te-engage → ae-engage}/references/channel-detail.md +2 -2
  130. package/skills/{te-engage → ae-engage}/references/channel-list.md +2 -2
  131. package/skills/{te-engage → ae-engage}/references/config-channel-detail.md +2 -2
  132. package/skills/{te-engage → ae-engage}/references/config-channel-list.md +2 -2
  133. package/skills/{te-engage → ae-engage}/references/config-item-analysis-report.md +2 -2
  134. package/skills/{te-engage → ae-engage}/references/config-item-detail.md +2 -2
  135. package/skills/{te-engage → ae-engage}/references/config-item-list.md +2 -2
  136. package/skills/{te-engage → ae-engage}/references/config-item-strategy-comparison.md +2 -2
  137. package/skills/{te-engage → ae-engage}/references/config-item-trigger-report.md +2 -2
  138. package/skills/{te-engage → ae-engage}/references/copy-config-template.md +2 -2
  139. package/skills/{te-engage → ae-engage}/references/delete-channel.md +2 -2
  140. package/skills/{te-engage → ae-engage}/references/delete-config-channel.md +2 -2
  141. package/skills/{te-engage → ae-engage}/references/delete-config-item.md +2 -2
  142. package/skills/{te-engage → ae-engage}/references/delete-flow.md +2 -2
  143. package/skills/{te-engage → ae-engage}/references/flow-ab-split-node-report.md +2 -2
  144. package/skills/{te-engage → ae-engage}/references/flow-detail.md +2 -2
  145. package/skills/{te-engage → ae-engage}/references/flow-list.md +2 -2
  146. package/skills/{te-engage → ae-engage}/references/flow-node-config-schema.md +2 -2
  147. package/skills/{te-engage → ae-engage}/references/flow-node-detail-report.md +2 -2
  148. package/skills/{te-engage → ae-engage}/references/flow-node-overview-report.md +2 -2
  149. package/skills/{te-engage → ae-engage}/references/flow-process-report.md +2 -2
  150. package/skills/{te-engage → ae-engage}/references/manage-flow.md +2 -2
  151. package/skills/{te-engage → ae-engage}/references/manage-strategy.md +2 -2
  152. package/skills/{te-engage → ae-engage}/references/manage-task.md +2 -2
  153. package/skills/{te-engage → ae-engage}/references/modify-flow-base-info.md +2 -2
  154. package/skills/{te-engage → ae-engage}/references/save-flow.md +3 -3
  155. package/skills/{te-engage → ae-engage}/references/strategy-detail.md +2 -2
  156. package/skills/{te-engage → ae-engage}/references/strategy-list.md +2 -2
  157. package/skills/{te-engage → ae-engage}/references/task-data-detail.md +3 -10
  158. package/skills/{te-engage → ae-engage}/references/task-data-overview.md +3 -9
  159. package/skills/{te-engage → ae-engage}/references/task-detail.md +2 -2
  160. package/skills/{te-engage → ae-engage}/references/task-experiment-report.md +3 -9
  161. package/skills/{te-engage → ae-engage}/references/task-list.md +2 -2
  162. package/skills/{te-engage → ae-engage}/references/task-metric-detail.md +3 -9
  163. package/skills/{te-engage → ae-engage}/references/task-stats.md +2 -2
  164. package/skills/{te-engage → ae-engage}/references/update-channel-status.md +2 -2
  165. package/skills/{te-engage → ae-engage}/references/update-config-channel-status.md +2 -2
  166. package/skills/{te-engage → ae-engage}/references/validate-flow-node-config.md +2 -2
  167. package/skills/{te-engage → ae-engage}/references/whitelist-list.md +2 -2
  168. package/dist/auth-DXKYLMO7.js +0 -81
  169. package/dist/auth-JXELJNDS.js +0 -19
  170. package/dist/auth-L3G3A74I.js +0 -67
  171. package/dist/chunk-3GM5LJZR.js +0 -145
  172. package/dist/chunk-JD5DXMKL.js +0 -172
  173. package/dist/chunk-OVQOK35G.js +0 -108
  174. package/dist/chunk-RJNLN3KQ.js +0 -217
  175. package/dist/client-T4VODLA6.js +0 -16
  176. package/dist/community-GMALVSRF.js +0 -684
  177. package/dist/config-V7AXKDMB.js +0 -242
  178. package/dist/raw-ZNVURYMR.js +0 -59
  179. package/dist/te-analysis-7NN3SY3I.js +0 -871
  180. package/dist/te-audience-P43BWMHM.js +0 -350
  181. package/dist/te-common-H3IPTI2I.js +0 -144
  182. package/dist/te-dataops-WCGDBJLF.js +0 -1853
  183. package/dist/te-engage-UTRVNTGU.js +0 -1470
  184. package/dist/te-meta-HGYNXVGF.js +0 -479
  185. package/skills/te-analysis/SKILL.md +0 -107
  186. package/skills/te-analysis/references/get-analysis-query-schema.md +0 -36
  187. package/skills/te-analysis/references/list-public-access-links.md +0 -31
  188. package/skills/te-audience/SKILL.md +0 -63
  189. package/skills/te-audience/references/get-cluster-definition-schema.md +0 -37
  190. package/skills/te-audience/references/get-clusters-by-name.md +0 -32
  191. package/skills/te-audience/references/get-tag-definition-schema.md +0 -32
  192. package/skills/te-audience/references/get-tags-by-name.md +0 -32
  193. package/skills/te-common/SKILL.md +0 -135
  194. package/skills/te-community/SKILL.md +0 -125
  195. package/skills/te-meta/SKILL.md +0 -71
  196. package/skills/te-meta/references/list-metrics.md +0 -33
  197. package/skills/te-meta/references/list-project-mark-times.md +0 -33
  198. package/skills/te-shared/SKILL.md +0 -115
package/README.md CHANGED
@@ -1,3 +1,6 @@
1
+
2
+ [中文版](./README.zh.md) | [English](./README.md)
3
+
1
4
  # ae-cli
2
5
 
3
6
  CLI tool for ThinkingAI AgenticEngine (AE) platform. Designed for both AI Agent and human use.
@@ -16,7 +19,7 @@ npm install -g @thinkingai/ae-cli
16
19
  npx skills add ThinkingAIAgenticEngine/ae-cli -g -y
17
20
  ```
18
21
 
19
- This installs 8 skill packages into your AI coding agent (Claude Code, Trae, Cursor, etc.), enabling the agent to understand and call ae-cli commands.
22
+ This installs 4 skill packages into your AI coding agent (Claude Code, Trae, Cursor, etc.), enabling the agent to understand and call ae-cli commands.
20
23
 
21
24
  To update:
22
25
 
@@ -33,11 +36,11 @@ ae-cli config
33
36
  ```
34
37
 
35
38
  The `config` command opens an interactive terminal UI:
36
- - First run: prompts you to add a TE host URL and label, then auto-authenticates
39
+ - First run: prompts you to add a AE host URL and label, then auto-authenticates
37
40
  - Subsequent runs: shows all configured hosts, lets you switch, edit, delete, or add new ones
38
41
 
39
42
  ```
40
- TE Host Manager (↑↓ select · Enter switch · e edit label · d delete · a add · q quit)
43
+ AE Host Manager (↑↓ select · Enter switch · e edit label · d delete · a add · q quit)
41
44
 
42
45
  ❯ ● Production https://ta.thinkingdata.cn ✓
43
46
  ○ Staging https://ta-staging.example.com:8080 ✗
@@ -49,7 +52,7 @@ After selecting a host, ae-cli automatically checks if the token is valid. If no
49
52
  ## Usage
50
53
 
51
54
  ```bash
52
- # TE meta domain (metadata and governance)
55
+ # AE meta domain (metadata and governance)
53
56
  ae-cli analysis_meta +list_events --project_id 1
54
57
 
55
58
  # Table output
@@ -61,7 +64,7 @@ ae-cli api GET /v1/ta/event/catalog/listEvent --params '{"projectId": 1}'
61
64
 
62
65
  ## Authentication
63
66
 
64
- Authentication is handled per-host. Each TE host URL maintains its own token.
67
+ Authentication is handled per-host. Each AE host URL maintains its own token.
65
68
 
66
69
  ```bash
67
70
  # Auto-login for active host (macOS, extracts token from Chrome)
@@ -83,20 +86,24 @@ ae-cli auth logout
83
86
 
84
87
  | Domain | Commands | Description |
85
88
  |--------|----------|-------------|
86
- | `analysis` | 31 | Analysis workflows: alerts, reports, dashboards, ad-hoc/drilldown, clusters/tags, metadata/metrics, project tools, entity details, analysis schema |
87
- | `analysis_audience` | 14 | Audience operations: clusters, tags, and cluster/tag definition schema |
88
- | `analysis_meta` | 20 | Metadata governance: events/properties, metrics, virtual metadata, project config, tracking plan, mark times, resource links |
89
+ | `analysis` | 30+ | Analysis workflows: alerts, reports, dashboards, ad-hoc/drilldown, entity/event details, analysis schema |
90
+ | `analysis_audience` | 10+ | Audience operations: clusters, tags, and cluster/tag definition schema |
91
+ | `analysis_meta` | 20+ | Metadata governance: events/properties, metrics, virtual metadata, project config, tracking plan, mark times, entity catalog |
89
92
  | `engage` | 40+ | Hermes Engage MCP: channels, tasks, configs, flows, strategies |
90
- | `te_dataops` | 50+ | Data warehouse management: repos, datatables, flows, IDE queries, integration, operations |
91
- | `te_community` | 30+ | Community analysis: posts search, sentiment analysis, topic trends, livestream data |
93
+ | `dataops_repo` | 8 | Data warehouse repos: spaces, catalogs, schemas, members |
94
+ | `dataops_datatable` | 10+ | Data tables: table creation, views, batch operations, data dictionary |
95
+ | `dataops_flow` | 20+ | Task flows: flow creation, task nodes, scheduling, execution, monitoring |
96
+ | `dataops_ide` | 10+ | IDE queries: metadata browsing, SQL execution, query management |
97
+ | `dataops_integration` | 20+ | Data integration: datasource management, sync solutions, data synchronization |
98
+ | `community` | 10+ | Community analysis: posts search, sentiment analysis, topic trends, livestream data |
92
99
  | `analysis_common` | 2 | Cross-module common constraints: resource link completion, project ID gate |
93
- | `operation` | 11 | Tasks, flows, channels, space navigation |
100
+ | `auth` / `config` | 2 | Authentication and host configuration |
94
101
 
95
102
  ### Global Options
96
103
 
97
104
  | Option | Description | Default |
98
105
  |--------|-------------|---------|
99
- | `--host <url>` | Override active TE host URL | from config |
106
+ | `--host <url>` | Override active AE host URL | from config |
100
107
  | `--format <json\|table>` | Output format | json |
101
108
  | `--jq <expr>` | Filter expression | - |
102
109
  | `--dry-run` | Preview request | false |
@@ -104,93 +111,56 @@ ae-cli auth logout
104
111
 
105
112
  ## Skills
106
113
 
107
- 8 AI Agent skill packages are included in the `skills/` directory:
114
+ 5 AI Agent skill packages are included in the `skills/` directory:
108
115
 
109
116
  | Skill | Description |
110
117
  |-------|-------------|
111
- | `te-shared` | Authentication, configuration, global options |
112
- | `te-analysis` | Alerts, reports, dashboards, ad-hoc/drilldown, entity details, analysis schema |
113
- | `te-audience` | Cluster and tag lifecycle management |
114
- | `te-meta` | Metadata governance, project config, tracking plan, and resource link operations |
115
- | `te-engage` | Hermes Engage MCP: channels, tasks, configs, flows, strategies |
116
- | `te-dataops` | Data warehouse management, task flows, IDE queries, integration, operations |
117
- | `te-community` | Community analysis: posts, comments, topics, livestreams |
118
- | `te-common` | Cross-module constraints: project ID gate, resource link completion |
118
+ | `ae-analysis` | Unified analysis skill: analysis + audience + metadata + common constraints (project gate/resource links) |
119
+ | `ae-engage` | Hermes Engage MCP: channels, tasks, configs, flows, strategies |
120
+ | `ae-dataops` | Data warehouse management, task flows, IDE queries, integration, operations |
121
+ | `ae-community` | Community analysis: posts, comments, topics, livestreams |
119
122
 
120
123
  Install them with:
121
124
 
122
125
  ```bash
123
- npx skills add http://10.27.249.150:8888/te-ai/te-cli.git#release/6.0 te-ai/ae-cli -g -y
126
+ npx skills add ThinkingAIAgenticEngine/ae-cli -g -y
124
127
  ```
125
128
 
126
129
  ## Skill Details
127
130
 
128
- ### te-analysis (31 tools)
129
-
130
- Analysis query and visualization capabilities:
131
- - **Alerts**: view, create, update alert definitions
132
- - **Reports & Dashboards**: create, query, update reports and dashboards
133
- - **Model Analysis**: event analysis, retention analysis, funnel analysis, SQL analysis, user property analysis, distribution analysis, interval analysis, path analysis, attribution analysis
134
- - **Entity/Event Details**: query details, generate analysis SQL
135
- - **Schema Helpers**: analysis query schema, filter schema, groupby schema
136
-
137
- ### te-audience (14 tools)
138
-
139
- Audience operations and targeting:
140
- - **Clusters**: create, update, query, member inspection, recomputation
141
- - **Tags**: create, update, query, member inspection, recomputation
142
- - **Schema Definitions**: cluster/tag definition schemas
143
-
144
- ### te-meta (20 tools)
131
+ ### ae-analysis
145
132
 
146
- Metadata and tracking-plan governance:
147
- - **Metadata Governance**: events/properties, metrics, virtual metadata
148
- - **Project Configuration**: project config, project users
149
- - **Tracking Plans**: track program management
150
- - **Mark Times**: date markers management
151
- - **Entity Catalog**: entity listing
133
+ Unified AE analysis capabilities:
134
+ - **Analysis**: alerts, reports, dashboards, ad-hoc/drilldown, entity/event details, analysis schema
135
+ - **Audience**: cluster and tag lifecycle management, plus definition schema tools
136
+ - **Metadata**: events/properties, metrics, virtual metadata, project config, tracking plans, mark times
137
+ - **Common**: mandatory project ID gate and post-write resource-link completion
152
138
 
153
- ### engage (40+ tools)
139
+ ### engage
154
140
 
155
141
  Hermes Engage MCP capabilities:
156
- - **Channels**: channel management, config channels, approval management
157
- - **Tasks**: task list, task details, task data/metrics overview, experiment reports
158
- - **Configs**: config items, strategies, strategy comparison, trigger/analysis reports
159
- - **Flows**: flow creation, node config, flow reports, flow validation
142
+ - **Channels**: channel management, config channels, approval, whitelist
143
+ - **Tasks**: task list, details, data/metrics overview, experiment reports
144
+ - **Configs**: config items, strategies, comparison, trigger/analysis reports
145
+ - **Flows**: flow creation, node config, reports, validation
160
146
 
161
- ### te-dataops (50+ tools)
147
+ ### ae-dataops
162
148
 
163
149
  Data warehouse management:
164
150
  - **Repo Management**: spaces, catalogs, schemas, members
165
151
  - **Data Tables**: table creation, views, batch operations, data dictionary
166
152
  - **Task Flows**: flow creation, task nodes, scheduling, execution, monitoring
167
153
  - **IDE Queries**: metadata browsing, SQL execution, query management
168
- - **Integration**: datasource management, sync solutions, data synchronization
169
- - **Operations**: flow instances, task instances, backfill jobs
154
+ - **Data Integration**: datasource management, sync solutions, data synchronization
170
155
 
171
- ### te-community (30+ tools)
156
+ ### ae-community
172
157
 
173
158
  Community social media analysis:
174
159
  - **Posts**: search, detail, corpus tags
175
160
  - **Comments**: sentiment analysis, tag analysis, summary
176
161
  - **Topics**: hot topics, trends, daily summaries
177
162
  - **Livestreams**: rooms, sessions, analysis, metrics
178
- - **Advanced Analysis**: activity analysis, character analysis, weekly reports, release analysis
179
-
180
- ### te-common (2 tools)
181
-
182
- Cross-module common constraints:
183
- - **Project ID Gate**: mandatory project verification before execution
184
- - **Resource Link Completion**: post-write link generation for dashboards, reports, metrics, alerts, clusters, tags
185
-
186
- ## Development
187
-
188
- ```bash
189
- git clone https://github.com/ThinkingAIAgenticEngine/ae-cli.git
190
- cd ae-cli
191
- npm install
192
- npx tsx src/index.ts --help
193
- ```
163
+ - **Channel Info**: channel overview metrics
194
164
 
195
165
  ## Architecture
196
166
 
@@ -214,7 +184,7 @@ src/
214
184
  ├── te-meta/
215
185
  ├── te-engage/
216
186
  ├── te-dataops/
217
- ├── community/
187
+ ├── te-community/
218
188
  └── te-common/
219
189
  ```
220
190
 
@@ -229,4 +199,4 @@ npm run verify:analysis-common-tools
229
199
 
230
200
  ## License
231
201
 
232
- MIT
202
+ MIT
package/README.zh.md ADDED
@@ -0,0 +1,202 @@
1
+
2
+ [中文版](./README.zh.md) | [English](./README.md)
3
+
4
+ # ae-cli
5
+
6
+ ThinkingAI AgenticEngine (AE) 平台的 CLI 工具。专为 AI Agent 和人类用户设计。
7
+
8
+ ## 安装
9
+
10
+ **第一步:安装 ae-cli**
11
+
12
+ ```bash
13
+ npm install -g @thinkingai/ae-cli
14
+ ```
15
+
16
+ **第二步:安装 AI Agent Skills**
17
+
18
+ ```bash
19
+ npx skills add ThinkingAIAgenticEngine/ae-cli -g -y
20
+ ```
21
+
22
+ 这将安装 4 个技能包到您的 AI 编程助手(Claude Code、Trae、Cursor 等)中,使助手能够理解并调用 ae-cli 命令。
23
+
24
+ 更新方式:
25
+
26
+ ```bash
27
+ npm cache clean --force && npm install -g @thinkingai/ae-cli
28
+ npx skills add ThinkingAIAgenticEngine/ae-cli -g -y
29
+ ```
30
+
31
+ ## 快速开始
32
+
33
+ ```bash
34
+ # 首次运行 — 交互式主机配置 + 自动登录
35
+ ae-cli config
36
+ ```
37
+
38
+ `config` 命令会打开一个交互式终端界面:
39
+ - 首次运行:提示您添加 AE 主机 URL 和标签,然后自动进行身份验证
40
+ - 后续运行:显示所有已配置的主机,可以切换、编辑、删除或添加新主机
41
+
42
+ ```
43
+ AE Host Manager (↑↓ 选择 · Enter 切换 · e 编辑标签 · d 删除 · a 添加 · q 退出)
44
+
45
+ ❯ ● Production https://ta.thinkingdata.cn ✓
46
+ ○ Staging https://ta-staging.example.com:8080 ✗
47
+ + Add new host...
48
+ ```
49
+
50
+ 选择主机后,ae-cli 会自动检查 token 是否有效。如果无效,会自动触发 `auth login`。
51
+
52
+ ## 使用方法
53
+
54
+ ```bash
55
+ # AE 元数据域(元数据和治理)
56
+ ae-cli analysis_meta +list_events --project_id 1
57
+
58
+ # 表格输出
59
+ ae-cli analysis_meta +list_events --project_id 1 --format table
60
+
61
+ # 原始 API 调用
62
+ ae-cli api GET /v1/ta/event/catalog/listEvent --params '{"projectId": 1}'
63
+ ```
64
+
65
+ ## 身份验证
66
+
67
+ 每个 AE 主机 URL 维护独立的身份验证 token。
68
+
69
+ ```bash
70
+ # 自动登录当前主机(macOS,从 Chrome 提取 token)
71
+ ae-cli auth login
72
+
73
+ # 手动设置 token
74
+ ae-cli auth set-token <your-token>
75
+
76
+ # 检查状态
77
+ ae-cli auth status
78
+
79
+ # 登出
80
+ ae-cli auth logout
81
+ ```
82
+
83
+ ## 命令
84
+
85
+ ### 域
86
+
87
+ | 域 | 命令数 | 描述 |
88
+ |---|---|---|
89
+ | `analysis` | 30+ | 分析工作流:告警、报表、仪表板、即时分析/下钻、实体/事件详情、分析模型 |
90
+ | `analysis_audience` | 10+ | 受众运营:分群、标签及其定义模型 |
91
+ | `analysis_meta` | 20+ | 元数据治理:事件/属性、指标、虚拟元数据、项目配置、埋点方案、标记时间、实体目录 |
92
+ | `engage` | 40+ | Hermes Engage MCP:渠道、任务、配置、流程、策略 |
93
+ | `dataops_repo` | 8 | 数仓仓库:空间、目录、模式、成员 |
94
+ | `dataops_datatable` | 10+ | 数据表:表创建、视图、批量操作、数据字典 |
95
+ | `dataops_flow` | 20+ | 任务流:流程创建、任务节点、调度、执行、监控 |
96
+ | `dataops_ide` | 10+ | IDE 查询:元数据浏览、SQL 执行、查询管理 |
97
+ | `dataops_integration` | 20+ | 数据集成:数据源管理、同步方案、数据同步 |
98
+ | `community` | 10+ | 社区分析:帖子搜索、情感分析、话题趋势、直播数据 |
99
+ | `analysis_common` | 2 | 跨模块通用约束:资源链接补全、项目 ID 门控 |
100
+ | `auth` / `config` | 2 | 身份验证和主机配置 |
101
+
102
+ ### 全局选项
103
+
104
+ | 选项 | 描述 | 默认值 |
105
+ |---|---|---|
106
+ | `--host <url>` | 覆盖当前 AE 主机 URL | 从配置读取 |
107
+ | `--format <json\|table>` | 输出格式 | json |
108
+ | `--jq <expr>` | 过滤表达式 | - |
109
+ | `--dry-run` | 预览请求 | false |
110
+ | `--yes` | 跳过确认 | false |
111
+
112
+ ## Skills
113
+
114
+ `skills/` 目录包含 4 个 AI Agent 技能包:
115
+
116
+ | Skill | 描述 |
117
+ |---|---|
118
+ | `ae-analysis` | 统一分析技能:analysis + audience + metadata + 通用约束(项目门控/资源链接) |
119
+ | `ae-engage` | Hermes Engage MCP:渠道、任务、配置、流程、策略 |
120
+ | `ae-dataops` | 数仓管理、任务流、IDE 查询、数据集成、运维管理 |
121
+ | `ae-community` | 社区分析:帖子、评论、话题、直播 |
122
+
123
+ 安装方式:
124
+
125
+ ```bash
126
+ npx skills add ThinkingAIAgenticEngine/ae-cli -g -y
127
+ ```
128
+
129
+ ## Skill 详情
130
+
131
+ ### ae-analysis
132
+
133
+ 统一的 AE 分析能力:
134
+ - **分析**:告警、报表、仪表板、即时分析/下钻、实体/事件详情、分析模型
135
+ - **受众**:分群和标签生命周期管理,以及定义模型工具
136
+ - **元数据**:事件/属性、指标、虚拟元数据、项目配置、埋点方案、标记时间
137
+ - **通用约束**:强制的项目 ID 门控和写入后资源链接补全
138
+
139
+ ### engage
140
+
141
+ Hermes Engage MCP 能力:
142
+ - **渠道**:渠道管理、配置渠道、审批、白名单
143
+ - **任务**:任务列表、详情、数据/指标概览、实验报告
144
+ - **配置**:配置项、策略、对比、触发/分析报告
145
+ - **流程**:流程创建、节点配置、报告、验证
146
+
147
+ ### ae-dataops
148
+
149
+ 数仓管理:
150
+ - **仓库管理**:空间、目录、模式、成员
151
+ - **数据表**:表创建、视图、批量操作、数据字典
152
+ - **任务流**:流程创建、任务节点、调度、执行、监控
153
+ - **IDE 查询**:元数据浏览、SQL 执行、查询管理
154
+ - **数据集成**:数据源管理、同步方案、数据同步
155
+
156
+ ### ae-community
157
+
158
+ 社区社媒分析:
159
+ - **帖子**:搜索、详情、语料标签
160
+ - **评论**:情感分析、标签分析、摘要
161
+ - **话题**:热门话题、趋势、每日摘要
162
+ - **直播**:直播间、场次、分析、指标
163
+ - **渠道信息**:渠道概览指标
164
+
165
+ ## 架构
166
+
167
+ ae-cli 基于:
168
+ - **TypeScript**(约 8000 行代码)
169
+ - **Commander.js** 作为 CLI 框架
170
+ - **WebSocket** 用于 MCP 服务器集成
171
+ - **Node.js** 运行时(v18+)
172
+
173
+ 项目结构:
174
+ ```
175
+ src/
176
+ ├── core/ # 核心模块:auth, config, client, mcp
177
+ ├── framework/ # 框架:types, register, runner, output
178
+ ├── api/ # 原始 API 访问
179
+ └── commands/ # 领域特定命令
180
+ ├── auth.ts
181
+ ├── config.ts
182
+ ├── te-analysis/
183
+ ├── te-audience/
184
+ ├── te-meta/
185
+ ├── te-engage/
186
+ ├── te-dataops/
187
+ ├── te-community/
188
+ └── te-common/
189
+ ```
190
+
191
+ ## 验证脚本
192
+
193
+ ```bash
194
+ npm run verify:analysis-tools
195
+ npm run verify:analysis-audience-tools
196
+ npm run verify:analysis-meta-tools
197
+ npm run verify:analysis-common-tools
198
+ ```
199
+
200
+ ## 许可证
201
+
202
+ MIT
@@ -0,0 +1,144 @@
1
+ import {
2
+ printError,
3
+ printOutput
4
+ } from "./chunk-KM57HI5B.js";
5
+ import {
6
+ clearMcpToken,
7
+ setMcpTokenManual,
8
+ validateMcpToken
9
+ } from "./chunk-7QBNU44L.js";
10
+ import {
11
+ clearToken,
12
+ getAuthStatus,
13
+ getToken,
14
+ resolveHost,
15
+ setTokenManual,
16
+ validateToken
17
+ } from "./chunk-4KQ7H7DY.js";
18
+ import {
19
+ loadConfig,
20
+ saveConfig
21
+ } from "./chunk-MR57UIKC.js";
22
+
23
+ // src/commands/auth.ts
24
+ function registerAuth(program) {
25
+ const auth = program.command("auth").description("Authentication management");
26
+ auth.command("login").description("Login to AE (auto-extract token from Chrome on macOS)").action(async () => {
27
+ const host = resolveHost(program.opts().host);
28
+ if (!host) {
29
+ printError("config", "No AE host configured.", "Run: ae-cli config set-host");
30
+ process.exit(1);
31
+ }
32
+ try {
33
+ const token = await getToken(host);
34
+ process.stderr.write(`[ae-cli] Authenticated to ${host}
35
+ `);
36
+ printOutput({ authenticated: true, host, token: token.slice(0, 8) + "..." }, program.opts().format || "json");
37
+ } catch (err) {
38
+ printError("auth", err.message);
39
+ process.exit(1);
40
+ }
41
+ });
42
+ auth.command("set-token <token>").description("Manually set authentication token for active host").action(async (token) => {
43
+ const host = resolveHost(program.opts().host);
44
+ if (!host) {
45
+ printError("config", "No AE host configured.", "Run: ae-cli config set-host");
46
+ process.exit(1);
47
+ }
48
+ const config = loadConfig();
49
+ if (!config.hosts[host]) {
50
+ config.hosts[host] = { label: host };
51
+ if (!config.activeHost) {
52
+ config.activeHost = host;
53
+ }
54
+ saveConfig(config);
55
+ process.stderr.write(`[ae-cli] Config saved for ${host}
56
+ `);
57
+ printOutput({ saved: true, config }, program.opts().format || "json");
58
+ }
59
+ process.stderr.write(`[ae-cli] Validating token...
60
+ `);
61
+ const isValid = await validateToken(token, host);
62
+ if (!isValid) {
63
+ process.stderr.write(`[ae-cli] Token validation failed
64
+ `);
65
+ printError("auth", "Invalid token", "Please check your token and try again");
66
+ process.exit(1);
67
+ }
68
+ setTokenManual(token, host);
69
+ process.stderr.write(`[ae-cli] Token verified and saved for ${host}
70
+ `);
71
+ printOutput({ saved: true, host, verified: true }, program.opts().format || "json");
72
+ });
73
+ auth.command("status").description("Show current authentication status").action(() => {
74
+ const host = resolveHost(program.opts().host);
75
+ if (!host) {
76
+ printOutput({ authenticated: false, host: "(none)", hint: "Run: ae-cli config set-host" }, program.opts().format || "json");
77
+ return;
78
+ }
79
+ const status = getAuthStatus(host);
80
+ printOutput(status, program.opts().format || "json");
81
+ });
82
+ auth.command("logout").description("Clear stored token for active host").action(() => {
83
+ const host = resolveHost(program.opts().host);
84
+ if (!host) {
85
+ printError("config", "No AE host configured.", "Run: ae-cli config set-host");
86
+ process.exit(1);
87
+ }
88
+ clearToken(host);
89
+ process.stderr.write(`[ae-cli] Token cleared for ${host}
90
+ `);
91
+ printOutput({ cleared: true, host }, program.opts().format || "json");
92
+ });
93
+ auth.command("set-mcp-token <token>").description("Manually set MCP token for a host").option("--host <host>", "Target host URL (defaults to active host)").action(async (token, opts) => {
94
+ const host = opts.host || resolveHost(program.opts().host);
95
+ if (!host) {
96
+ printError("config", "No AE host configured.", "Use --host <url> or run: ae-cli config set-host");
97
+ process.exit(1);
98
+ }
99
+ const config = loadConfig();
100
+ if (!config.hosts[host]) {
101
+ config.hosts[host] = { label: host };
102
+ if (!config.activeHost) {
103
+ config.activeHost = host;
104
+ }
105
+ saveConfig(config);
106
+ process.stderr.write(`[ae-cli] Host config saved for ${host}
107
+ `);
108
+ }
109
+ process.stderr.write(`[ae-cli] Validating MCP token...
110
+ `);
111
+ const isValid = await validateMcpToken(token, host);
112
+ if (!isValid) {
113
+ process.stderr.write(`[ae-cli] MCP token validation failed
114
+ `);
115
+ printError("auth", "Invalid MCP token", "Please check your MCP token and try again");
116
+ process.exit(1);
117
+ }
118
+ setMcpTokenManual(token, host);
119
+ process.stderr.write(`[ae-cli] MCP token verified and saved for ${host}
120
+ `);
121
+ printOutput({ saved: true, host, verified: true, type: "mcp-token" }, program.opts().format || "json");
122
+ });
123
+ auth.command("clear-mcp-token").description("Clear stored MCP token for a host").option("--host <host>", "Target host URL (defaults to active host)").option("--all", "Clear MCP tokens for all hosts").action((opts) => {
124
+ if (opts.all) {
125
+ clearMcpToken();
126
+ process.stderr.write(`[ae-cli] All MCP tokens cleared
127
+ `);
128
+ printOutput({ cleared: true, type: "all-mcp-tokens" }, program.opts().format || "json");
129
+ return;
130
+ }
131
+ const host = opts.host || resolveHost(program.opts().host);
132
+ if (!host) {
133
+ printError("config", "No AE host configured.", "Use --host <url> or run: ae-cli config set-host");
134
+ process.exit(1);
135
+ }
136
+ clearMcpToken(host);
137
+ process.stderr.write(`[ae-cli] MCP token cleared for ${host}
138
+ `);
139
+ printOutput({ cleared: true, host }, program.opts().format || "json");
140
+ });
141
+ }
142
+ export {
143
+ registerAuth
144
+ };
@@ -5,9 +5,10 @@ import {
5
5
  loadToken,
6
6
  resolveHost,
7
7
  saveToken,
8
- setTokenManual
9
- } from "./chunk-3CDLNXTD.js";
10
- import "./chunk-EBFUVWIZ.js";
8
+ setTokenManual,
9
+ validateToken
10
+ } from "./chunk-4KQ7H7DY.js";
11
+ import "./chunk-MR57UIKC.js";
11
12
  export {
12
13
  clearToken,
13
14
  getAuthStatus,
@@ -15,5 +16,6 @@ export {
15
16
  loadToken,
16
17
  resolveHost,
17
18
  saveToken,
18
- setTokenManual
19
+ setTokenManual,
20
+ validateToken
19
21
  };
@@ -2,8 +2,9 @@ import {
2
2
  extractHostname,
3
3
  getActiveHost,
4
4
  getConfigDir,
5
+ safeJsonParse,
5
6
  safeReadJsonFile
6
- } from "./chunk-EBFUVWIZ.js";
7
+ } from "./chunk-MR57UIKC.js";
7
8
 
8
9
  // src/core/auth.ts
9
10
  import fs from "fs";
@@ -22,6 +23,16 @@ function resolveHost(hostOverride) {
22
23
  if (hostOverride) return hostOverride;
23
24
  return getActiveHost();
24
25
  }
26
+ async function validateToken(token, hostUrl) {
27
+ const url = `${hostUrl}/v1/oauth/checkToken?accessToken=${token}`;
28
+ try {
29
+ const resp = await fetch(url, { method: "POST" });
30
+ const respJson = safeJsonParse(await resp.text());
31
+ return respJson?.return_code === 0;
32
+ } catch {
33
+ return false;
34
+ }
35
+ }
25
36
  function loadAllTokens() {
26
37
  try {
27
38
  const legacyTokens = path.join(LEGACY_DIR, "tokens.json");
@@ -130,7 +141,7 @@ function extractTokenViaOsascript(hostUrl) {
130
141
  }
131
142
  }
132
143
  async function requestTokenViaOsascript(hostUrl) {
133
- process.stderr.write(`[ae-cli] No TE tab found in Chrome. Opening ${hostUrl} ...
144
+ process.stderr.write(`[ae-cli] No AE tab found in Chrome. Opening ${hostUrl} ...
134
145
  `);
135
146
  process.stderr.write(`[ae-cli] Please login, then your token will be captured automatically.
136
147
  `);
@@ -168,7 +179,7 @@ async function requestTokenViaOsascript(hostUrl) {
168
179
  async function getToken(hostUrl) {
169
180
  if (!hostUrl) {
170
181
  throw new Error(
171
- `No TE host configured.
182
+ `No AE host configured.
172
183
  Run: ae-cli config set-host`
173
184
  );
174
185
  }
@@ -209,6 +220,7 @@ Options:
209
220
 
210
221
  export {
211
222
  resolveHost,
223
+ validateToken,
212
224
  loadToken,
213
225
  saveToken,
214
226
  clearToken,