@thinkingai/ae-cli 1.0.1

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 (172) hide show
  1. package/README.md +229 -0
  2. package/bin/ae-cli.js +2 -0
  3. package/dist/auth-JXELJNDS.js +19 -0
  4. package/dist/auth-L3G3A74I.js +67 -0
  5. package/dist/chunk-3GM5LJZR.js +145 -0
  6. package/dist/chunk-JD5DXMKL.js +172 -0
  7. package/dist/chunk-KM57HI5B.js +107 -0
  8. package/dist/chunk-OVQOK35G.js +108 -0
  9. package/dist/chunk-RJNLN3KQ.js +217 -0
  10. package/dist/client-5QSQBBDB.js +16 -0
  11. package/dist/community-GMALVSRF.js +684 -0
  12. package/dist/config-Q7J3Z7Z2.js +242 -0
  13. package/dist/index.js +277 -0
  14. package/dist/raw-ZNVURYMR.js +59 -0
  15. package/dist/te-analysis-7NN3SY3I.js +871 -0
  16. package/dist/te-audience-P43BWMHM.js +350 -0
  17. package/dist/te-common-H3IPTI2I.js +144 -0
  18. package/dist/te-dataops-WCGDBJLF.js +1853 -0
  19. package/dist/te-engage-UTRVNTGU.js +1470 -0
  20. package/dist/te-meta-HGYNXVGF.js +479 -0
  21. package/package.json +53 -0
  22. package/skills/te-analysis/SKILL.md +107 -0
  23. package/skills/te-analysis/references/build-entity-details-sql.md +58 -0
  24. package/skills/te-analysis/references/build-event-details-sql.md +61 -0
  25. package/skills/te-analysis/references/create-alert.md +47 -0
  26. package/skills/te-analysis/references/create-dashboard.md +49 -0
  27. package/skills/te-analysis/references/create-or-update-dashboard-note.md +39 -0
  28. package/skills/te-analysis/references/create-public-access-link.md +43 -0
  29. package/skills/te-analysis/references/create-report.md +60 -0
  30. package/skills/te-analysis/references/create-result-cluster.md +73 -0
  31. package/skills/te-analysis/references/drilldown-user-events.md +72 -0
  32. package/skills/te-analysis/references/drilldown-users.md +75 -0
  33. package/skills/te-analysis/references/get-alert-definition-schema.md +32 -0
  34. package/skills/te-analysis/references/get-alert.md +31 -0
  35. package/skills/te-analysis/references/get-analysis-query-schema.md +36 -0
  36. package/skills/te-analysis/references/get-filter-schema.md +33 -0
  37. package/skills/te-analysis/references/get-groupby-schema.md +33 -0
  38. package/skills/te-analysis/references/get-report-definition.md +33 -0
  39. package/skills/te-analysis/references/get-table-columns.md +38 -0
  40. package/skills/te-analysis/references/list-alerts.md +33 -0
  41. package/skills/te-analysis/references/list-dashboards.md +33 -0
  42. package/skills/te-analysis/references/list-public-access-links.md +31 -0
  43. package/skills/te-analysis/references/list-reports.md +33 -0
  44. package/skills/te-analysis/references/load-filters.md +44 -0
  45. package/skills/te-analysis/references/query-adhoc.md +71 -0
  46. package/skills/te-analysis/references/query-dashboard-detail.md +35 -0
  47. package/skills/te-analysis/references/query-dashboard-report-data.md +60 -0
  48. package/skills/te-analysis/references/query-entity-details.md +60 -0
  49. package/skills/te-analysis/references/query-event-details.md +63 -0
  50. package/skills/te-analysis/references/query-report-data.md +65 -0
  51. package/skills/te-analysis/references/update-alert.md +49 -0
  52. package/skills/te-analysis/references/update-dashboard.md +45 -0
  53. package/skills/te-analysis/references/update-public-access-link.md +41 -0
  54. package/skills/te-audience/SKILL.md +63 -0
  55. package/skills/te-audience/references/create-cluster.md +65 -0
  56. package/skills/te-audience/references/create-tag.md +60 -0
  57. package/skills/te-audience/references/get-cluster-definition-schema.md +37 -0
  58. package/skills/te-audience/references/get-clusters-by-name.md +32 -0
  59. package/skills/te-audience/references/get-tag-definition-schema.md +32 -0
  60. package/skills/te-audience/references/get-tags-by-name.md +32 -0
  61. package/skills/te-audience/references/list-cluster-members.md +35 -0
  62. package/skills/te-audience/references/list-clusters.md +32 -0
  63. package/skills/te-audience/references/list-tag-members.md +36 -0
  64. package/skills/te-audience/references/list-tags.md +32 -0
  65. package/skills/te-audience/references/refresh-cluster.md +31 -0
  66. package/skills/te-audience/references/refresh-tag.md +31 -0
  67. package/skills/te-audience/references/update-cluster.md +59 -0
  68. package/skills/te-audience/references/update-tag.md +60 -0
  69. package/skills/te-common/SKILL.md +135 -0
  70. package/skills/te-common/references/get-resource-url.md +32 -0
  71. package/skills/te-common/references/list-projects.md +37 -0
  72. package/skills/te-community/SKILL.md +133 -0
  73. package/skills/te-community/references/community-activity-analysis.md +68 -0
  74. package/skills/te-community/references/community-analyzing-official-content.md +72 -0
  75. package/skills/te-community/references/community-analyzing-theme-comment.md +124 -0
  76. package/skills/te-community/references/community-character-analysis.md +71 -0
  77. package/skills/te-community/references/community-daily-report.md +82 -0
  78. package/skills/te-community/references/community-hottopic-insight.md +120 -0
  79. package/skills/te-community/references/community-release-analysis.md +79 -0
  80. package/skills/te-community/references/community-weekly-report.md +84 -0
  81. package/skills/te-community/references/get_channel_info.md +21 -0
  82. package/skills/te-community/references/get_comment_tag_analysis.md +30 -0
  83. package/skills/te-community/references/get_comments_summary.md +33 -0
  84. package/skills/te-community/references/get_corpus_tags.md +21 -0
  85. package/skills/te-community/references/get_daily_summary.md +23 -0
  86. package/skills/te-community/references/get_hot_topics.md +26 -0
  87. package/skills/te-community/references/get_livestream_analysis.md +23 -0
  88. package/skills/te-community/references/get_livestream_detail.md +34 -0
  89. package/skills/te-community/references/get_livestream_list.md +26 -0
  90. package/skills/te-community/references/get_livestream_overview.md +25 -0
  91. package/skills/te-community/references/get_livestream_room_metrics.md +26 -0
  92. package/skills/te-community/references/get_livestream_rooms.md +26 -0
  93. package/skills/te-community/references/get_overview_metrics.md +26 -0
  94. package/skills/te-community/references/get_post_detail.md +38 -0
  95. package/skills/te-community/references/get_risk_content.md +43 -0
  96. package/skills/te-community/references/get_sentiment_overview.md +34 -0
  97. package/skills/te-community/references/get_tag_trends.md +28 -0
  98. package/skills/te-community/references/get_topic_detail.md +27 -0
  99. package/skills/te-community/references/search_posts.md +48 -0
  100. package/skills/te-dataops/SKILL.md +645 -0
  101. package/skills/te-dataops/references/dataops-flow-create.md +163 -0
  102. package/skills/te-dataops/references/dataops-flow-monitor.md +118 -0
  103. package/skills/te-dataops/references/dataops-integration.md +246 -0
  104. package/skills/te-dataops/references/dataops-operations.md +107 -0
  105. package/skills/te-dataops/references/dataops-query.md +111 -0
  106. package/skills/te-dataops/references/dataops-table.md +122 -0
  107. package/skills/te-engage/SKILL.md +211 -0
  108. package/skills/te-engage/references/add-approver.md +24 -0
  109. package/skills/te-engage/references/add-channel.md +74 -0
  110. package/skills/te-engage/references/approver-list.md +19 -0
  111. package/skills/te-engage/references/cancel-query-by-request-id.md +23 -0
  112. package/skills/te-engage/references/channel-detail.md +52 -0
  113. package/skills/te-engage/references/channel-list.md +41 -0
  114. package/skills/te-engage/references/config-channel-detail.md +32 -0
  115. package/skills/te-engage/references/config-channel-list.md +27 -0
  116. package/skills/te-engage/references/config-item-analysis-report.md +34 -0
  117. package/skills/te-engage/references/config-item-detail.md +30 -0
  118. package/skills/te-engage/references/config-item-list.md +19 -0
  119. package/skills/te-engage/references/config-item-strategy-comparison.md +25 -0
  120. package/skills/te-engage/references/config-item-trigger-report.md +42 -0
  121. package/skills/te-engage/references/copy-config-template.md +29 -0
  122. package/skills/te-engage/references/delete-channel.md +24 -0
  123. package/skills/te-engage/references/delete-config-channel.md +24 -0
  124. package/skills/te-engage/references/delete-config-item.md +25 -0
  125. package/skills/te-engage/references/delete-flow.md +24 -0
  126. package/skills/te-engage/references/flow-ab-split-node-report.md +54 -0
  127. package/skills/te-engage/references/flow-detail.md +79 -0
  128. package/skills/te-engage/references/flow-list.md +19 -0
  129. package/skills/te-engage/references/flow-node-config-schema.md +44 -0
  130. package/skills/te-engage/references/flow-node-detail-report.md +55 -0
  131. package/skills/te-engage/references/flow-node-overview-report.md +52 -0
  132. package/skills/te-engage/references/flow-process-report.md +59 -0
  133. package/skills/te-engage/references/manage-flow.md +94 -0
  134. package/skills/te-engage/references/manage-strategy.md +74 -0
  135. package/skills/te-engage/references/manage-task.md +37 -0
  136. package/skills/te-engage/references/modify-flow-base-info.md +27 -0
  137. package/skills/te-engage/references/save-flow.md +870 -0
  138. package/skills/te-engage/references/strategy-detail.md +73 -0
  139. package/skills/te-engage/references/strategy-list.md +21 -0
  140. package/skills/te-engage/references/task-data-detail.md +81 -0
  141. package/skills/te-engage/references/task-data-overview.md +48 -0
  142. package/skills/te-engage/references/task-detail.md +61 -0
  143. package/skills/te-engage/references/task-experiment-report.md +51 -0
  144. package/skills/te-engage/references/task-list.md +91 -0
  145. package/skills/te-engage/references/task-metric-detail.md +56 -0
  146. package/skills/te-engage/references/task-stats.md +89 -0
  147. package/skills/te-engage/references/update-channel-status.md +32 -0
  148. package/skills/te-engage/references/update-config-channel-status.md +32 -0
  149. package/skills/te-engage/references/validate-flow-node-config.md +52 -0
  150. package/skills/te-engage/references/whitelist-list.md +19 -0
  151. package/skills/te-meta/SKILL.md +71 -0
  152. package/skills/te-meta/references/batch-create-metadata.md +37 -0
  153. package/skills/te-meta/references/batch-edit-metadata.md +36 -0
  154. package/skills/te-meta/references/create-metric.md +62 -0
  155. package/skills/te-meta/references/create-project-mark-time.md +38 -0
  156. package/skills/te-meta/references/create-virtual-event.md +64 -0
  157. package/skills/te-meta/references/create-virtual-property.md +69 -0
  158. package/skills/te-meta/references/delete-project-mark-times.md +34 -0
  159. package/skills/te-meta/references/delete-track-items.md +35 -0
  160. package/skills/te-meta/references/get-metric.md +32 -0
  161. package/skills/te-meta/references/get-project-config.md +32 -0
  162. package/skills/te-meta/references/get-track-program.md +31 -0
  163. package/skills/te-meta/references/list-entities.md +34 -0
  164. package/skills/te-meta/references/list-events.md +33 -0
  165. package/skills/te-meta/references/list-metrics.md +33 -0
  166. package/skills/te-meta/references/list-project-mark-times.md +33 -0
  167. package/skills/te-meta/references/list-project-users.md +32 -0
  168. package/skills/te-meta/references/list-properties.md +35 -0
  169. package/skills/te-meta/references/save-track-items.md +34 -0
  170. package/skills/te-meta/references/update-metric.md +61 -0
  171. package/skills/te-meta/references/update-project-mark-time.md +39 -0
  172. package/skills/te-shared/SKILL.md +115 -0
@@ -0,0 +1,33 @@
1
+ # te_meta +list_metrics (Metric Search)
2
+
3
+ > **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
4
+
5
+ Domain: **Metadata Query**
6
+
7
+ ## Use Cases
8
+ - List metric metadata in the project. Supports keyword filtering and returns metric IDs, names, display names, model types, remarks, and related metadata, but not metric calculation results.
9
+ - List metric metadata in the project.
10
+
11
+ ## Command
12
+ ```bash
13
+ ae-cli te_meta +list_metrics --project_id 1
14
+ ae-cli te_meta +list_metrics --project_id 1 --query demo
15
+ ae-cli te_meta +list_metrics --dry-run
16
+ ```
17
+
18
+ ## Parameters
19
+ | Parameter | Required | Description |
20
+ |---|---|---|
21
+ | `--project_id` / `-p` | Yes | Project ID |
22
+ | `--query` / `-q` | No | Optional keyword filter. Performs fuzzy matching against metric names, display names, and remarks; if omitted, all metrics are returned. |
23
+
24
+ ## Decision Rules
25
+ - First run should only pass the required parameter (`--project_id`), and add optional parameters only after the path is confirmed to work.
26
+ - For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
27
+
28
+ ## Next Steps After Failure
29
+ - If the required parameter is missing, fall back to the smallest runnable command and fill it in (focus on `--project_id`).
30
+ - If the result is empty, first confirm the project ID/keyword, then try loosening the filter conditions.
31
+
32
+ ## Recommended Chaining
33
+ - +list_metrics -> +create_metric -> +get_metric
@@ -0,0 +1,33 @@
1
+ # te_meta +list_project_mark_times (List Project Mark Times)
2
+
3
+ > **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
4
+
5
+ Domain: **Project Configuration**
6
+
7
+ ## Use Cases
8
+ - List project date markers. Returns marker IDs, timestamps, content, and visibility status.
9
+ - List project date markers.
10
+
11
+ ## Commands
12
+ ```bash
13
+ te-cli te_meta +list_project_mark_times --project_id 1
14
+ te-cli te_meta +list_project_mark_times --project_id 1 --zone_offset 8
15
+ te-cli te_meta +list_project_mark_times --dry-run
16
+ ```
17
+
18
+ ## Parameters
19
+ | Parameter | Required | Description |
20
+ |---|---|---|
21
+ | `--project_id` / `-p` | Yes | Project ID |
22
+ | `--zone_offset` | No | Marker time zone offset |
23
+
24
+ ## Decision Rules
25
+ - For the first run, pass only the required parameter (`--project_id`) to confirm the path works, then add optional parameters.
26
+ - For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
27
+
28
+ ## Next Steps After Failure
29
+ - If required parameters are missing, fall back to the smallest runnable command and fill them in first (focus on `--project_id`).
30
+ - If the result is empty, first confirm the project ID/keyword, then try loosening the filter conditions.
31
+
32
+ ## Recommended Chaining
33
+ - +get_project_config -> +list_project_mark_times
@@ -0,0 +1,32 @@
1
+ # te_meta +list_project_users (Read Project Member List)
2
+
3
+ > **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
4
+
5
+ Domain: **Project Configuration**
6
+
7
+ ## Use Cases
8
+ - Get all project members. Returns userId, loginName, and userName for each member. Use this to resolve userId when managing dashboard share members.
9
+ - Get all project members.
10
+
11
+ ## Command
12
+ ```bash
13
+ te-cli te_meta +list_project_users --project_id 1
14
+ te-cli te_meta +list_project_users --dry-run
15
+ ```
16
+
17
+ ## Parameters
18
+ | Parameter | Required | Description |
19
+ |---|---|---|
20
+ | `--project_id` / `-p` | Yes | Project ID |
21
+
22
+ ## Decision Rules
23
+ - First run should only pass the required parameter (`--project_id`), and add optional parameters only after the path is confirmed to work.
24
+ - The result can be used for dashboard member configuration, permission mapping, and similar scenarios.
25
+ - For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
26
+
27
+ ## Next Steps After Failure
28
+ - If the required parameter is missing, fall back to the smallest runnable command and fill it in (focus on `--project_id`).
29
+ - If the result is empty, first confirm the project ID/keyword, then try loosening the filter conditions.
30
+
31
+ ## Recommended Chaining
32
+ - +get_project_config -> +list_project_users
@@ -0,0 +1,35 @@
1
+ # te_meta +list_properties (Property Metadata Discovery)
2
+
3
+ > **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
4
+
5
+ Domain: **Metadata Query**
6
+
7
+ ## Use Cases
8
+ - Read-only query for SYSTEM METADATA properties already effective in the project. Supports event/user scope. Do NOT use for tracking-plan metadata (bury/track program); that belongs to BuryProgramTool.
9
+ - Read-only query for SYSTEM METADATA properties already effective in the project.
10
+
11
+ ## Commands
12
+ ```bash
13
+ te-cli te_meta +list_properties --project_id 1
14
+ te-cli te_meta +list_properties --project_id 1 --scope event --event_name purchase --query demo
15
+ te-cli te_meta +list_properties --dry-run
16
+ ```
17
+
18
+ ## Parameters
19
+ | Parameter | Required | Description |
20
+ |---|---|---|
21
+ | `--project_id` / `-p` | Yes | Project ID |
22
+ | `--scope` | No | Optional property scope. event means event properties, user means user properties. If omitted, all scopes are queried. |
23
+ | `--event_name` | No | Optional event name. If provided, only event properties available for that event are returned. |
24
+ | `--query` / `-q` | No | Optional keyword filter. Performs fuzzy matching against property names, descriptions, and AI remarks; if omitted, all matched properties are returned. |
25
+
26
+ ## Decision Rules
27
+ - For the first run, pass only the required parameter (`--project_id`) to confirm the path works, then add optional parameters.
28
+ - For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
29
+
30
+ ## Next Steps After Failure
31
+ - If required parameters are missing, fall back to the smallest runnable command and fill them in first (focus on `--project_id`).
32
+ - If the result is empty, first confirm the project ID/keyword, then try loosening the filter conditions.
33
+
34
+ ## Recommended Chaining
35
+ - +list_properties -> +create_virtual_property
@@ -0,0 +1,34 @@
1
+ # te_meta +save_track_items (Save Track Program Items)
2
+
3
+ > **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
4
+
5
+ Domain: **Project Configuration**
6
+
7
+ ## Use Cases
8
+ - Create/update TRACKING-PLAN metadata only (planned bury items). Do not use this tool to create or edit effective system metadata. If the user intent is production metadata changes, route to MetaPowerTool instead.
9
+ - Create/update TRACKING-PLAN metadata only (planned bury items).
10
+
11
+ ## Command
12
+ ```bash
13
+ te-cli te_meta +save_track_items --project_id 1 --track_data '{}'
14
+ te-cli te_meta +save_track_items --dry-run
15
+ ```
16
+
17
+ ## Parameters
18
+ | Parameter | Required | Description |
19
+ |---|---|---|
20
+ | `--project_id` / `-p` | Yes | Project ID |
21
+ | `--track_data` | Yes | Track program JSON object. Example: {"events":[{"eventName":"purchase","displayName":"Purchase","eventDesc":"User purchases a product","eventTag":"eCommerce","dataOrigin":"APP","props":["item_id","price"]}],"eventProps":[{"name":"price","displayName":"Price","type":"number","desc":"Product price"}],"userProps":[{"name":"vip_level","displayName":"Membership Level","type":"string","updateType":"user_set","propTag":"Membership","desc":"User membership level"}],"commonEventProps":[{"name":"platform","displayName":"Platform","type":"string","desc":"Application platform"}]}. Required fields: eventName/name and type. type values: string, number, datetime, bool, array_string, row, array_row. updateType values: user_setOnce, user_set, user_add, user_append. Constraints: eventName/name max 64 chars (letters, digits, underscore), displayName max 60 chars, desc/eventDesc max 200 chars. |
22
+
23
+ ## Decision Rules
24
+ - First run should only pass the required parameters (`--project_id`, `--track_data`), and add optional parameters only after the path is confirmed to work.
25
+ - Wrap JSON arguments in single quotes (for example `--track_data '{}'`) to avoid shell escaping issues.
26
+ - For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
27
+ - Write operations keep the confirmation prompt by default; re-evaluate whether to use `--yes` in automation scenarios.
28
+
29
+ ## Next Steps After Failure
30
+ - If required parameters are missing, fall back to the smallest runnable command and fill them in (focus on `--project_id` and `--track_data`).
31
+ - If `Invalid JSON` occurs, validate with the smallest JSON structure first (for example `{}` or `[]`), then add fields step by step.
32
+
33
+ ## Recommended Chaining
34
+ - +get_track_program -> +save_track_items -> +get_track_program
@@ -0,0 +1,61 @@
1
+ # te_meta +update_metric (Update Metric)
2
+
3
+ > **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
4
+
5
+ Domain: **Metadata Query**
6
+
7
+ ## Use Cases
8
+ - Before updating `events` / `params`, you must first obtain the corresponding model schema and supplement the project with real event/property metadata.
9
+ - Update a metric definition. Currently only the event and retention models are supported. Returns the updated metric information without executing metric calculation.
10
+ - Update a metric definition.
11
+
12
+ ## MUST Prerequisites
13
+ - Before updating `--events` / `--params`, you must first read and follow these reference documents:
14
+ - [`../../te-analysis/references/get-analysis-query-schema.md`](../../te-analysis/references/get-analysis-query-schema.md)
15
+ - [`./list-events.md`](./list-events.md)
16
+ - [`./list-properties.md`](./list-properties.md)
17
+ - Do not submit new `events` / `params` until the document review and prerequisite command calls above are complete.
18
+
19
+ ## Prerequisite Call Chain (Required for Updating events/params)
20
+ 1. Determine `--model_type` first (`event` / `retention`).
21
+ 2. Read `get-analysis-query-schema.md`, then call `te-cli te_analysis +get_analysis_query_schema --model_type <event|retention>` to get the structure.
22
+ 3. Read `list-events.md`, then call `te-cli te_meta +list_events --project_id 1`.
23
+ 4. Read `list-properties.md`, then call `te-cli te_meta +list_properties --project_id 1`.
24
+ 5. Build the new `events` / `params` from the schema + metadata, then execute `+update_metric`.
25
+
26
+ ## Commands
27
+ ```bash
28
+ te-cli te_meta +update_metric --project_id 1 --metric_id 1 --name demo --display_name demo --model_type event --events '[]'
29
+ te-cli te_meta +update_metric --project_id 1 --metric_id 1 --name demo --display_name demo --remark demo --model_type event --events '[]' --params '{}'
30
+ te-cli te_meta +update_metric --dry-run
31
+ ```
32
+
33
+ ## Parameters
34
+ | Parameter | Required | Description |
35
+ |---|---|---|
36
+ | `--project_id` / `-p` | Yes | Project ID |
37
+ | `--metric_id` / `-m` | Yes | Metric ID |
38
+ | `--name` | Yes | Metric name. Must start with a lowercase letter and contain only lowercase letters, digits, and underscores. Maximum length: 80. |
39
+ | `--display_name` | Yes | Metric display name |
40
+ | `--remark` | No | Optional metric remark |
41
+ | `--model_type` | Yes | Metric model type. Currently supports event and retention. |
42
+ | `--events` | Yes | Metric event JSON. MUST follow `+get_analysis_query_schema` for the selected `model_type`, and use fields validated by `te_meta +list_events` / `te_meta +list_properties` in the same `project_id`. |
43
+ | `--params` | No | Metric params JSON. If provided, MUST follow the schema from `+get_analysis_query_schema` and use project metadata from `te_meta +list_events` / `te_meta +list_properties`. |
44
+
45
+ ## Decision Rules
46
+ - `events` / `params` must not be handwritten by intuition alone: they must satisfy both the schema structure and the project's real metadata constraints.
47
+ - Set `--model_type` first, then use the matching schema; do not mix event/retention structures.
48
+ - Before calling `list_events` / `list_properties`, you must first study the corresponding reference documents.
49
+ - For the first run, pass only the required parameters (`--project_id`, `--metric_id`, `--name`) to confirm the path works, then add optional parameters.
50
+ - Wrap JSON parameters in single quotes (for example `--events '{}'` and `--params '{}'`) to avoid shell escaping issues.
51
+ - For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
52
+ - Write operations keep confirmation prompts by default; evaluate whether to use `--yes` only for automation scenarios.
53
+
54
+ ## Next Steps After Failure
55
+ - If required parameters are missing, fall back to the smallest runnable command and fill them in first (focus on `--project_id`, `--metric_id`, and `--name`).
56
+ - If `Invalid JSON` appears, first check the schema's required fields, then verify whether the event and property names come from metadata query results in the same `project_id`.
57
+ - If the result after writing does not match expectations, immediately reread the corresponding list/get interfaces for before-and-after comparison.
58
+
59
+ ## Recommended Chaining
60
+ - +get_analysis_query_schema -> te_meta +list_events -> te_meta +list_properties -> +update_metric
61
+ - +list_metrics -> +get_metric -> +update_metric
@@ -0,0 +1,39 @@
1
+ # te_meta +update_project_mark_time (Update Project Date Marker)
2
+
3
+ > **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
4
+
5
+ Domain: **Project Configuration**
6
+
7
+ ## Use Cases
8
+ - Update an existing project date marker. Returns the updated marker ID, timestamp, content, and visibility status.
9
+ - Update an existing project date marker.
10
+
11
+ ## Command
12
+ ```bash
13
+ te-cli te_meta +update_project_mark_time --mark_time_id 1 --project_id 1 --marked_at '2026-04-09 10:00' --content demo
14
+ te-cli te_meta +update_project_mark_time --mark_time_id 1 --project_id 1 --marked_at '2026-04-09 10:00' --zone_offset 8 --content demo --is_visible 1
15
+ te-cli te_meta +update_project_mark_time --dry-run
16
+ ```
17
+
18
+ ## Parameters
19
+ | Parameter | Required | Description |
20
+ |---|---|---|
21
+ | `--mark_time_id` | Yes | Marker ID |
22
+ | `--project_id` / `-p` | Yes | Project ID |
23
+ | `--marked_at` | Yes | Marker timestamp. Format: yyyy-MM-dd HH:mm |
24
+ | `--zone_offset` | No | Marker time zone offset |
25
+ | `--content` | Yes | Marker content |
26
+ | `--is_visible` | No | Whether the marker is visible. Default: 1 |
27
+
28
+ ## Decision Rules
29
+ - First run should only pass required parameters (`--mark_time_id`, `--project_id`, `--marked_at`), and add optional parameters only after the path is confirmed to work.
30
+ - For date/time ranges, first validate with a short range, then expand the range step by step.
31
+ - For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
32
+ - Write operations keep the confirmation prompt by default; re-evaluate whether to use `--yes` in automation scenarios.
33
+
34
+ ## Next Steps After Failure
35
+ - If required parameters are missing, fall back to the smallest runnable command and fill them in (focus on `--mark_time_id`, `--project_id`, and `--marked_at`).
36
+ - If the result after writing is not as expected, immediately read back the corresponding list/get interface for a before-and-after comparison.
37
+
38
+ ## Recommended Chaining
39
+ - +list_project_mark_times -> +update_project_mark_time
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: te-shared
3
+ version: 1.0.0
4
+ description: "TE CLI basics: authentication configuration, global parameters, error handling, and security constraints"
5
+ metadata:
6
+ requires:
7
+ bins: ["ae-cli"]
8
+ cliHelp: "ae-cli --help"
9
+ ---
10
+
11
+ # te-shared
12
+
13
+ TE CLI (`ae-cli`) is the command-line tool for the ThinkingEngine data analysis platform, used by AI Agents and human users.
14
+
15
+ ## Authentication
16
+
17
+ You must authenticate before use. Authentication priority:
18
+
19
+ 1. Environment variable `TE_TOKEN` (highest priority, suitable for CI/scripts)
20
+ 2. Cached token (`~/.ae-cli/tokens.json`, valid for 20 hours)
21
+ 3. macOS automatically extracts it from Chrome (macOS only)
22
+
23
+ ### Authentication Commands
24
+
25
+ ```bash
26
+ # Automatic macOS authentication (extract token from Chrome)
27
+ ae-cli auth login
28
+
29
+ # Manually set token
30
+ ae-cli auth set-token <token>
31
+
32
+ # View authentication status
33
+ ae-cli auth status
34
+
35
+ # Log out
36
+ ae-cli auth logout
37
+ ```
38
+
39
+ ### Multi-environment Support
40
+
41
+ ```bash
42
+ # Specify host
43
+ te-cli auth login --host ta-staging.example.com
44
+ te-cli auth set-token <token> --host ta-staging.example.com
45
+
46
+ # Configure default host
47
+ te-cli config set defaultHost ta-staging.example.com
48
+ ```
49
+
50
+ ## Global Parameters
51
+
52
+ All commands support the following global parameters:
53
+
54
+ | Parameter | Description | Default |
55
+ |------|------|--------|
56
+ | `--host <host>` | TE instance address | defaultHost from config or ta.thinkingdata.cn |
57
+ | `--format <json\|table>` | Output format | json |
58
+ | `--jq <expr>` | jq filter expression | - |
59
+ | `--dry-run` | Show the request only, do not execute it | false |
60
+ | `--yes` | Skip confirmation for write operations | false |
61
+
62
+ ## Output Format
63
+
64
+ ### JSON (default)
65
+
66
+ ```json
67
+ {
68
+ "ok": true,
69
+ "data": { ... }
70
+ }
71
+ ```
72
+
73
+ ### Table
74
+
75
+ ```bash
76
+ te-cli te_meta +list_events --project_id <YOUR_PROJECT_ID> --format table
77
+ ```
78
+
79
+ ### jq Filtering
80
+
81
+ ```bash
82
+ te-cli te_meta +list_events --project_id <YOUR_PROJECT_ID> --jq '.'
83
+ ```
84
+
85
+ ## Error Handling
86
+
87
+ Error output goes to stderr, in the following format:
88
+
89
+ ```json
90
+ {
91
+ "ok": false,
92
+ "error": {
93
+ "type": "auth | api | validation | config",
94
+ "message": "...",
95
+ "hint": "..."
96
+ }
97
+ }
98
+ ```
99
+
100
+ Exit code: success `0`, error `1`.
101
+
102
+ ## Security Constraints
103
+
104
+ - Commands with `risk: read` execute directly
105
+ - Commands with `risk: write` require confirmation unless `--yes` is passed
106
+ - Use `--dry-run` to preview the request that will be sent
107
+
108
+ ## Command Structure
109
+
110
+ ```bash
111
+ te-cli <domain> +<command> [flags]
112
+ te-cli api <METHOD> <PATH> [--params] [--data]
113
+ ```
114
+
115
+ Domains: `te_analysis` (analysis), `te_audience` (audience), `te_meta` (metadata), `te_common` (common), `operation` (operations)