@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.
- package/README.md +229 -0
- package/bin/ae-cli.js +2 -0
- package/dist/auth-JXELJNDS.js +19 -0
- package/dist/auth-L3G3A74I.js +67 -0
- package/dist/chunk-3GM5LJZR.js +145 -0
- package/dist/chunk-JD5DXMKL.js +172 -0
- package/dist/chunk-KM57HI5B.js +107 -0
- package/dist/chunk-OVQOK35G.js +108 -0
- package/dist/chunk-RJNLN3KQ.js +217 -0
- package/dist/client-5QSQBBDB.js +16 -0
- package/dist/community-GMALVSRF.js +684 -0
- package/dist/config-Q7J3Z7Z2.js +242 -0
- package/dist/index.js +277 -0
- package/dist/raw-ZNVURYMR.js +59 -0
- package/dist/te-analysis-7NN3SY3I.js +871 -0
- package/dist/te-audience-P43BWMHM.js +350 -0
- package/dist/te-common-H3IPTI2I.js +144 -0
- package/dist/te-dataops-WCGDBJLF.js +1853 -0
- package/dist/te-engage-UTRVNTGU.js +1470 -0
- package/dist/te-meta-HGYNXVGF.js +479 -0
- package/package.json +53 -0
- package/skills/te-analysis/SKILL.md +107 -0
- package/skills/te-analysis/references/build-entity-details-sql.md +58 -0
- package/skills/te-analysis/references/build-event-details-sql.md +61 -0
- package/skills/te-analysis/references/create-alert.md +47 -0
- package/skills/te-analysis/references/create-dashboard.md +49 -0
- package/skills/te-analysis/references/create-or-update-dashboard-note.md +39 -0
- package/skills/te-analysis/references/create-public-access-link.md +43 -0
- package/skills/te-analysis/references/create-report.md +60 -0
- package/skills/te-analysis/references/create-result-cluster.md +73 -0
- package/skills/te-analysis/references/drilldown-user-events.md +72 -0
- package/skills/te-analysis/references/drilldown-users.md +75 -0
- package/skills/te-analysis/references/get-alert-definition-schema.md +32 -0
- package/skills/te-analysis/references/get-alert.md +31 -0
- package/skills/te-analysis/references/get-analysis-query-schema.md +36 -0
- package/skills/te-analysis/references/get-filter-schema.md +33 -0
- package/skills/te-analysis/references/get-groupby-schema.md +33 -0
- package/skills/te-analysis/references/get-report-definition.md +33 -0
- package/skills/te-analysis/references/get-table-columns.md +38 -0
- package/skills/te-analysis/references/list-alerts.md +33 -0
- package/skills/te-analysis/references/list-dashboards.md +33 -0
- package/skills/te-analysis/references/list-public-access-links.md +31 -0
- package/skills/te-analysis/references/list-reports.md +33 -0
- package/skills/te-analysis/references/load-filters.md +44 -0
- package/skills/te-analysis/references/query-adhoc.md +71 -0
- package/skills/te-analysis/references/query-dashboard-detail.md +35 -0
- package/skills/te-analysis/references/query-dashboard-report-data.md +60 -0
- package/skills/te-analysis/references/query-entity-details.md +60 -0
- package/skills/te-analysis/references/query-event-details.md +63 -0
- package/skills/te-analysis/references/query-report-data.md +65 -0
- package/skills/te-analysis/references/update-alert.md +49 -0
- package/skills/te-analysis/references/update-dashboard.md +45 -0
- package/skills/te-analysis/references/update-public-access-link.md +41 -0
- package/skills/te-audience/SKILL.md +63 -0
- package/skills/te-audience/references/create-cluster.md +65 -0
- package/skills/te-audience/references/create-tag.md +60 -0
- package/skills/te-audience/references/get-cluster-definition-schema.md +37 -0
- package/skills/te-audience/references/get-clusters-by-name.md +32 -0
- package/skills/te-audience/references/get-tag-definition-schema.md +32 -0
- package/skills/te-audience/references/get-tags-by-name.md +32 -0
- package/skills/te-audience/references/list-cluster-members.md +35 -0
- package/skills/te-audience/references/list-clusters.md +32 -0
- package/skills/te-audience/references/list-tag-members.md +36 -0
- package/skills/te-audience/references/list-tags.md +32 -0
- package/skills/te-audience/references/refresh-cluster.md +31 -0
- package/skills/te-audience/references/refresh-tag.md +31 -0
- package/skills/te-audience/references/update-cluster.md +59 -0
- package/skills/te-audience/references/update-tag.md +60 -0
- package/skills/te-common/SKILL.md +135 -0
- package/skills/te-common/references/get-resource-url.md +32 -0
- package/skills/te-common/references/list-projects.md +37 -0
- package/skills/te-community/SKILL.md +133 -0
- package/skills/te-community/references/community-activity-analysis.md +68 -0
- package/skills/te-community/references/community-analyzing-official-content.md +72 -0
- package/skills/te-community/references/community-analyzing-theme-comment.md +124 -0
- package/skills/te-community/references/community-character-analysis.md +71 -0
- package/skills/te-community/references/community-daily-report.md +82 -0
- package/skills/te-community/references/community-hottopic-insight.md +120 -0
- package/skills/te-community/references/community-release-analysis.md +79 -0
- package/skills/te-community/references/community-weekly-report.md +84 -0
- package/skills/te-community/references/get_channel_info.md +21 -0
- package/skills/te-community/references/get_comment_tag_analysis.md +30 -0
- package/skills/te-community/references/get_comments_summary.md +33 -0
- package/skills/te-community/references/get_corpus_tags.md +21 -0
- package/skills/te-community/references/get_daily_summary.md +23 -0
- package/skills/te-community/references/get_hot_topics.md +26 -0
- package/skills/te-community/references/get_livestream_analysis.md +23 -0
- package/skills/te-community/references/get_livestream_detail.md +34 -0
- package/skills/te-community/references/get_livestream_list.md +26 -0
- package/skills/te-community/references/get_livestream_overview.md +25 -0
- package/skills/te-community/references/get_livestream_room_metrics.md +26 -0
- package/skills/te-community/references/get_livestream_rooms.md +26 -0
- package/skills/te-community/references/get_overview_metrics.md +26 -0
- package/skills/te-community/references/get_post_detail.md +38 -0
- package/skills/te-community/references/get_risk_content.md +43 -0
- package/skills/te-community/references/get_sentiment_overview.md +34 -0
- package/skills/te-community/references/get_tag_trends.md +28 -0
- package/skills/te-community/references/get_topic_detail.md +27 -0
- package/skills/te-community/references/search_posts.md +48 -0
- package/skills/te-dataops/SKILL.md +645 -0
- package/skills/te-dataops/references/dataops-flow-create.md +163 -0
- package/skills/te-dataops/references/dataops-flow-monitor.md +118 -0
- package/skills/te-dataops/references/dataops-integration.md +246 -0
- package/skills/te-dataops/references/dataops-operations.md +107 -0
- package/skills/te-dataops/references/dataops-query.md +111 -0
- package/skills/te-dataops/references/dataops-table.md +122 -0
- package/skills/te-engage/SKILL.md +211 -0
- package/skills/te-engage/references/add-approver.md +24 -0
- package/skills/te-engage/references/add-channel.md +74 -0
- package/skills/te-engage/references/approver-list.md +19 -0
- package/skills/te-engage/references/cancel-query-by-request-id.md +23 -0
- package/skills/te-engage/references/channel-detail.md +52 -0
- package/skills/te-engage/references/channel-list.md +41 -0
- package/skills/te-engage/references/config-channel-detail.md +32 -0
- package/skills/te-engage/references/config-channel-list.md +27 -0
- package/skills/te-engage/references/config-item-analysis-report.md +34 -0
- package/skills/te-engage/references/config-item-detail.md +30 -0
- package/skills/te-engage/references/config-item-list.md +19 -0
- package/skills/te-engage/references/config-item-strategy-comparison.md +25 -0
- package/skills/te-engage/references/config-item-trigger-report.md +42 -0
- package/skills/te-engage/references/copy-config-template.md +29 -0
- package/skills/te-engage/references/delete-channel.md +24 -0
- package/skills/te-engage/references/delete-config-channel.md +24 -0
- package/skills/te-engage/references/delete-config-item.md +25 -0
- package/skills/te-engage/references/delete-flow.md +24 -0
- package/skills/te-engage/references/flow-ab-split-node-report.md +54 -0
- package/skills/te-engage/references/flow-detail.md +79 -0
- package/skills/te-engage/references/flow-list.md +19 -0
- package/skills/te-engage/references/flow-node-config-schema.md +44 -0
- package/skills/te-engage/references/flow-node-detail-report.md +55 -0
- package/skills/te-engage/references/flow-node-overview-report.md +52 -0
- package/skills/te-engage/references/flow-process-report.md +59 -0
- package/skills/te-engage/references/manage-flow.md +94 -0
- package/skills/te-engage/references/manage-strategy.md +74 -0
- package/skills/te-engage/references/manage-task.md +37 -0
- package/skills/te-engage/references/modify-flow-base-info.md +27 -0
- package/skills/te-engage/references/save-flow.md +870 -0
- package/skills/te-engage/references/strategy-detail.md +73 -0
- package/skills/te-engage/references/strategy-list.md +21 -0
- package/skills/te-engage/references/task-data-detail.md +81 -0
- package/skills/te-engage/references/task-data-overview.md +48 -0
- package/skills/te-engage/references/task-detail.md +61 -0
- package/skills/te-engage/references/task-experiment-report.md +51 -0
- package/skills/te-engage/references/task-list.md +91 -0
- package/skills/te-engage/references/task-metric-detail.md +56 -0
- package/skills/te-engage/references/task-stats.md +89 -0
- package/skills/te-engage/references/update-channel-status.md +32 -0
- package/skills/te-engage/references/update-config-channel-status.md +32 -0
- package/skills/te-engage/references/validate-flow-node-config.md +52 -0
- package/skills/te-engage/references/whitelist-list.md +19 -0
- package/skills/te-meta/SKILL.md +71 -0
- package/skills/te-meta/references/batch-create-metadata.md +37 -0
- package/skills/te-meta/references/batch-edit-metadata.md +36 -0
- package/skills/te-meta/references/create-metric.md +62 -0
- package/skills/te-meta/references/create-project-mark-time.md +38 -0
- package/skills/te-meta/references/create-virtual-event.md +64 -0
- package/skills/te-meta/references/create-virtual-property.md +69 -0
- package/skills/te-meta/references/delete-project-mark-times.md +34 -0
- package/skills/te-meta/references/delete-track-items.md +35 -0
- package/skills/te-meta/references/get-metric.md +32 -0
- package/skills/te-meta/references/get-project-config.md +32 -0
- package/skills/te-meta/references/get-track-program.md +31 -0
- package/skills/te-meta/references/list-entities.md +34 -0
- package/skills/te-meta/references/list-events.md +33 -0
- package/skills/te-meta/references/list-metrics.md +33 -0
- package/skills/te-meta/references/list-project-mark-times.md +33 -0
- package/skills/te-meta/references/list-project-users.md +32 -0
- package/skills/te-meta/references/list-properties.md +35 -0
- package/skills/te-meta/references/save-track-items.md +34 -0
- package/skills/te-meta/references/update-metric.md +61 -0
- package/skills/te-meta/references/update-project-mark-time.md +39 -0
- package/skills/te-shared/SKILL.md +115 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# te_analysis +build_entity_details_sql (Generate Entity Details SQL)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
|
|
4
|
+
|
|
5
|
+
Domain: **Entity details SQL queries**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- When constructing `definition`, you must first obtain the cluster schema and fill in the project event/property metadata.
|
|
9
|
+
- Build the SQL for an entity details query. The parameters are the same as `+query_entity_details`, but the tool returns SQL instead of query results.
|
|
10
|
+
- Build the SQL for an entity details query.
|
|
11
|
+
|
|
12
|
+
## Mandatory prerequisites (MUST)
|
|
13
|
+
- Before constructing `--definition` / `--properties`, you must first read and follow these reference documents:
|
|
14
|
+
- [`../../te-audience/references/get-cluster-definition-schema.md`](../../te-audience/references/get-cluster-definition-schema.md)
|
|
15
|
+
- [`../../te-meta/references/list-events.md`](../../te-meta/references/list-events.md)
|
|
16
|
+
- [`../../te-meta/references/list-properties.md`](../../te-meta/references/list-properties.md)
|
|
17
|
+
- Do not generate the final `definition` / `properties` until the documentation review and prerequisite command calls are complete.
|
|
18
|
+
|
|
19
|
+
## Prerequisite call chain (required for constructing definition/properties)
|
|
20
|
+
1. First confirm the cluster type (condition / sql).
|
|
21
|
+
2. Read `get-cluster-definition-schema.md`, then call `te-cli te_audience +get_cluster_definition_schema --cluster_type <condition|sql>` 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 `definition` (and optional `properties`) from the schema + metadata, then call `+build_entity_details_sql`.
|
|
25
|
+
|
|
26
|
+
## Command
|
|
27
|
+
```bash
|
|
28
|
+
te-cli te_analysis +build_entity_details_sql --project_id 1 --definition '{}'
|
|
29
|
+
te-cli te_analysis +build_entity_details_sql --project_id 1 --entity_id 1001 --definition '{}' --properties '{}' --sort_by time --sort_order desc --limit 100 --zone_offset 8
|
|
30
|
+
te-cli te_analysis +build_entity_details_sql --dry-run
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Parameters
|
|
34
|
+
| Parameter | Required | Description |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
37
|
+
| `--entity_id` | No | Optional entity ID used in multi-entity scenarios. If omitted, the default user entity is used. |
|
|
38
|
+
| `--definition` | Yes | Cluster definition JSON. MUST call `+get_cluster_definition_schema` first, then fill valid event/property names from `te_meta +list_events` / `te_meta +list_properties` in the same `project_id`. |
|
|
39
|
+
| `--properties` | No | Optional display properties JSON, for example `[{"columnName":"#user_id","tableType":"0"},{"columnName":"device_id","tableType":"0"}]`. If provided, property names should come from `te_meta +list_properties` in the same `project_id`. |
|
|
40
|
+
| `--sort_by` | No | Optional sort field |
|
|
41
|
+
| `--sort_order` | No | Optional sort order. Supported values: asc and desc |
|
|
42
|
+
| `--limit` | No | Optional result limit. Default: 1000, maximum: 10000 |
|
|
43
|
+
| `--zone_offset` | No | Time zone offset. For example, UTC+8 is 8 |
|
|
44
|
+
|
|
45
|
+
## Decision Rules
|
|
46
|
+
- `definition` / `properties` cannot be written from experience alone: they must satisfy both the schema structure and the project metadata constraints.
|
|
47
|
+
- Before calling `list_events` / `list_properties`, you must first study the corresponding reference documents.
|
|
48
|
+
- On the first run, start with only the required parameters (`--project_id`, `--definition`) and add optional parameters after confirming the path works.
|
|
49
|
+
- Wrap JSON parameters in single quotes (for example `--definition '{}'`, `--properties '{}'`) to avoid shell escaping issues.
|
|
50
|
+
- For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
|
|
51
|
+
|
|
52
|
+
## Next Steps on Failure
|
|
53
|
+
- If required parameters are missing, fall back to the smallest runnable command and fill them in first (focus on `--project_id` and `--definition`).
|
|
54
|
+
- If `Invalid JSON` appears, first check the schema required fields, then verify whether the event/property names come from metadata query results for the same `project_id`.
|
|
55
|
+
|
|
56
|
+
## Recommended chaining
|
|
57
|
+
- +get_cluster_definition_schema -> te_meta +list_events -> te_meta +list_properties -> +build_entity_details_sql
|
|
58
|
+
- +query_entity_details -> +query_event_details -> +build_event_details_sql
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# te_analysis +build_event_details_sql (generate event detail SQL)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
|
|
4
|
+
|
|
5
|
+
Domain: **Event Detail SQL Queries**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- When building `filters` / `properties`, first obtain the filter schema and the project's real event/property metadata.
|
|
9
|
+
- Build the SQL for an event details query. The parameters are the same as `+query_event_details`, but the tool returns SQL instead of query results.
|
|
10
|
+
- Build the SQL for an event details query.
|
|
11
|
+
|
|
12
|
+
## Mandatory Prerequisites (MUST)
|
|
13
|
+
- Before building `--filters` / `--properties`, you must first read and follow the following reference docs:
|
|
14
|
+
- [`./get-filter-schema.md`](./get-filter-schema.md)
|
|
15
|
+
- [`../../te-meta/references/list-events.md`](../../te-meta/references/list-events.md)
|
|
16
|
+
- [`../../te-meta/references/list-properties.md`](../../te-meta/references/list-properties.md)
|
|
17
|
+
- Do not generate final `filters` / `properties` until the above docs have been read and the prerequisite commands have been called.
|
|
18
|
+
|
|
19
|
+
## Prerequisite Call Chain (required for filters/properties)
|
|
20
|
+
1. Read `get-filter-schema.md`, then call `te-cli te_analysis +get_filter_schema` to get the filter structure.
|
|
21
|
+
2. Read `list-events.md`, then call `te-cli te_meta +list_events --project_id 1` to confirm available event names.
|
|
22
|
+
3. Read `list-properties.md`, then call `te-cli te_meta +list_properties --project_id 1` to get available properties.
|
|
23
|
+
4. Build `filters` / `properties` based on the schema and metadata, then call `+build_event_details_sql`.
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
```bash
|
|
27
|
+
te-cli te_analysis +build_event_details_sql --project_id 1 --event_name login --start_time '2026-04-08 00:00:00' --end_time '2026-04-08 23:59:59'
|
|
28
|
+
te-cli te_analysis +build_event_details_sql --project_id 1 --event_name login --relative_date_range 0-7 --filters '{}' --properties '{}' --sort_by time --sort_order desc --limit 100 --zone_offset 8
|
|
29
|
+
te-cli te_analysis +build_event_details_sql --dry-run
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Parameters
|
|
33
|
+
| Parameter | Required | Description |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
36
|
+
| `--event_name` | Yes | Event name |
|
|
37
|
+
| `--start_time` | No | Start time. Format: yyyy-MM-dd HH:mm:ss |
|
|
38
|
+
| `--end_time` | No | End time. Format: yyyy-MM-dd HH:mm:ss |
|
|
39
|
+
| `--relative_date_range` | No | Optional relative date range in m-n format. For example, 0-7 means the most recent 7 days including today. Use either this field or start_time/end_time. |
|
|
40
|
+
| `--filters` | No | Optional filter JSON. If provided, MUST follow `+get_filter_schema`, and referenced fields must come from `te_meta +list_properties` in the same `project_id`. |
|
|
41
|
+
| `--properties` | No | Optional display properties JSON, for example `[{"columnName":"#user_id","tableType":"0"},{"columnName":"device_id","tableType":"0"}]`. If provided, property names should come from `te_meta +list_properties` in the same `project_id`. |
|
|
42
|
+
| `--sort_by` | No | Optional sort field |
|
|
43
|
+
| `--sort_order` | No | Optional sort order. Supported values: asc and desc |
|
|
44
|
+
| `--limit` | No | Optional result limit. Default: 100 |
|
|
45
|
+
| `--zone_offset` | No | Time zone offset. For example, UTC+8 is 8 |
|
|
46
|
+
|
|
47
|
+
## Decision Rules
|
|
48
|
+
- `filters` / `properties` cannot be written by hand based on experience alone: they must satisfy both the schema structure and the project's real metadata.
|
|
49
|
+
- `list_events` / `list_properties` must be learned from the corresponding reference docs before calling them.
|
|
50
|
+
- For the first run, it is recommended to pass only the required parameters (`--project_id`, `--event_name`) and add optional parameters after confirming the chain works.
|
|
51
|
+
- Wrap JSON parameters in single quotes (for example `--filters '{}'`, `--properties '{}'`) to avoid shell escaping issues.
|
|
52
|
+
- When dates/time ranges are involved, validate with a short range first and then expand gradually.
|
|
53
|
+
- For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
|
|
54
|
+
|
|
55
|
+
## Next Step After Failure
|
|
56
|
+
- If required parameters are missing, fall back to the smallest runnable command and fill them in (focus on `--project_id`, `--event_name`).
|
|
57
|
+
- If `Invalid JSON` appears, first check the required filter schema fields, then verify that the event name/property name comes from metadata queried in the same `project_id`.
|
|
58
|
+
|
|
59
|
+
## Recommended Chaining
|
|
60
|
+
- +get_filter_schema -> te_meta +list_events -> te_meta +list_properties -> +build_event_details_sql
|
|
61
|
+
- +query_entity_details -> +query_event_details -> +build_event_details_sql
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# te_analysis +create_alert (Create Alert)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
|
|
4
|
+
|
|
5
|
+
Domain: **Metadata queries**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Precondition helper: call `+get_alert_definition_schema` to get the structure before using this tool.
|
|
9
|
+
- Create a new alert. After creation, use list_alerts or get_alert to retrieve the created alert. See get_alert_definition_schema for the parameter structure.
|
|
10
|
+
- Create a new alert.
|
|
11
|
+
|
|
12
|
+
## Mandatory prerequisites (MUST)
|
|
13
|
+
- Before constructing `--definition`, you must first read and follow:
|
|
14
|
+
- [`./get-alert-definition-schema.md`](./get-alert-definition-schema.md)
|
|
15
|
+
- Do not generate the final `definition` until the documentation review and schema call are complete.
|
|
16
|
+
|
|
17
|
+
## Prerequisite call chain (required for constructing definition)
|
|
18
|
+
1. Read `get-alert-definition-schema.md` to understand the return structure of `+get_alert_definition_schema`.
|
|
19
|
+
2. Call `ae-cli te_analysis +get_alert_definition_schema` to get the schema.
|
|
20
|
+
3. Build `definition` from the schema, then call `+create_alert`.
|
|
21
|
+
|
|
22
|
+
## Command
|
|
23
|
+
```bash
|
|
24
|
+
ae-cli te_analysis +create_alert --project_id 1 --definition '{}'
|
|
25
|
+
ae-cli te_analysis +create_alert --dry-run
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Parameters
|
|
29
|
+
| Parameter | Required | Description |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
32
|
+
| `--definition` | Yes | Alert definition JSON. MUST call `+get_alert_definition_schema` first and strictly follow the returned structure. |
|
|
33
|
+
|
|
34
|
+
## Decision Rules
|
|
35
|
+
- `definition` cannot be written from experience alone: it must satisfy the alert schema structure constraints.
|
|
36
|
+
- On the first run, start with only the required parameters (`--project_id`, `--definition`) and add optional parameters after confirming the path works.
|
|
37
|
+
- Wrap JSON parameters in single quotes (for example `--definition '{}'`) to avoid shell escaping issues.
|
|
38
|
+
- For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
|
|
39
|
+
- Write operations keep the confirmation prompt by default; evaluate whether to use `--yes` for automated scenarios.
|
|
40
|
+
|
|
41
|
+
## Next Steps on Failure
|
|
42
|
+
- If required parameters are missing, fall back to the smallest runnable command and fill them in first (focus on `--project_id` and `--definition`).
|
|
43
|
+
- If `Invalid JSON` appears, first check the schema required fields and enumeration values, then add fields incrementally.
|
|
44
|
+
- If the result after writing does not match expectations, immediately read back the corresponding list/get interface to compare before and after.
|
|
45
|
+
|
|
46
|
+
## Recommended chaining
|
|
47
|
+
- +get_alert_definition_schema -> +create_alert
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# te_analysis +create_dashboard (create dashboard)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
|
|
4
|
+
|
|
5
|
+
Domain: **Dashboard Management**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Create a new dashboard.
|
|
9
|
+
- Can automatically associate an initial report after creation.
|
|
10
|
+
- Can optionally create an initial dashboard note at the same time.
|
|
11
|
+
- Returns basic dashboard information (such as ID and name), not the full dashboard configuration.
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
```bash
|
|
15
|
+
ae-cli te_analysis +create_dashboard --project_id 1 --dashboard_name demo
|
|
16
|
+
ae-cli te_analysis +create_dashboard --project_id 1 --dashboard_name demo --space_id 1 --folder_id 1 --initial_report_id 1 --note_title demo --note_content demo --note_style '{}'
|
|
17
|
+
ae-cli te_analysis +create_dashboard --project_id 1 --dashboard_name demo --dry-run
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Parameters
|
|
21
|
+
| Parameter | Required | Description |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
24
|
+
| `--dashboard_name` | Yes | Dashboard name |
|
|
25
|
+
| `--space_id` | No | Optional space ID. If provided, the dashboard is created in that space. |
|
|
26
|
+
| `--folder_id` | No | Optional folder ID. If provided, the dashboard is created in that folder. |
|
|
27
|
+
| `--initial_report_id` | No | Optional initial report ID. If provided, the report is automatically associated with the new dashboard after creation. |
|
|
28
|
+
| `--note_title` | No | Optional note title for an initial dashboard note. |
|
|
29
|
+
| `--note_content` | No | Optional note content for an initial dashboard note. |
|
|
30
|
+
| `--note_style` | No | Optional note style configuration JSON for an initial dashboard note. |
|
|
31
|
+
|
|
32
|
+
## Decision Rules
|
|
33
|
+
- For the first run, it is recommended to pass only the required parameters (`--project_id`, `--dashboard_name`) and add optional parameters after confirming the chain works.
|
|
34
|
+
- Wrap JSON parameters in single quotes (for example `--note_style '{}'`) to avoid shell escaping issues.
|
|
35
|
+
- Only pass `--space_id` and `--folder_id` when you clearly know the target location; if unsure, create it in the default location first.
|
|
36
|
+
- Dashboard note-related parameters are best passed as a group to avoid incomplete results caused by specifying only the title or only the content.
|
|
37
|
+
- For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
|
|
38
|
+
- Write operations keep the confirmation prompt by default; evaluate whether to use `--yes` only for automation scenarios.
|
|
39
|
+
|
|
40
|
+
## Next Step After Failure
|
|
41
|
+
- If required parameters are missing, fall back to the smallest runnable command and fill them in (focus on `--project_id`, `--dashboard_name`).
|
|
42
|
+
- If `Invalid JSON` appears, first validate with the smallest JSON structure (for example `{}`), then add fields gradually.
|
|
43
|
+
- If the result after writing is not as expected, immediately reread the corresponding list/get interface and compare before and after.
|
|
44
|
+
|
|
45
|
+
## Recommended Chaining
|
|
46
|
+
- +create_dashboard -> +list_dashboards
|
|
47
|
+
- +create_dashboard -> +query_dashboard_detail
|
|
48
|
+
- +create_dashboard -> +update_dashboard
|
|
49
|
+
- +create_dashboard -> +query_adhoc -> +create_report -> +update_dashboard
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# te_analysis +create_or_update_dashboard_note (Maintain Dashboard Note)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
|
|
4
|
+
|
|
5
|
+
Domain: **Dashboard management**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Create a new dashboard note or update an existing one. If noteId is provided, updates the existing note; otherwise creates a new note. Returns the created or updated note information.
|
|
9
|
+
- Create a new dashboard note or update an existing one.
|
|
10
|
+
|
|
11
|
+
## Command
|
|
12
|
+
```bash
|
|
13
|
+
te-cli te_analysis +create_or_update_dashboard_note --project_id 1 --dashboard_id 1 --note_title demo
|
|
14
|
+
te-cli te_analysis +create_or_update_dashboard_note --project_id 1 --dashboard_id 1 --note_id 1 --note_title demo --description demo --ui_config '{}'
|
|
15
|
+
te-cli te_analysis +create_or_update_dashboard_note --dry-run
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Parameters
|
|
19
|
+
| Parameter | Required | Description |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
22
|
+
| `--dashboard_id` / `-d` | Yes | Dashboard ID |
|
|
23
|
+
| `--note_id` | No | Optional note ID. If provided, updates the existing note; otherwise creates a new note. |
|
|
24
|
+
| `--note_title` | Yes | Note title |
|
|
25
|
+
| `--description` | No | Optional note description content. |
|
|
26
|
+
| `--ui_config` | No | Optional UI configuration JSON string for the note style. |
|
|
27
|
+
|
|
28
|
+
## Decision Rules
|
|
29
|
+
- On the first run, start with only the required parameters (`--project_id`, `--dashboard_id`, `--note_title`) and add optional parameters after confirming the path works.
|
|
30
|
+
- Wrap JSON parameters in single quotes (for example `--ui_config '{}'`) to avoid shell escaping issues.
|
|
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; evaluate whether to use `--yes` for automated scenarios.
|
|
33
|
+
|
|
34
|
+
## Next Steps on Failure
|
|
35
|
+
- If required parameters are missing, fall back to the smallest runnable command and fill them in first (focus on `--project_id`, `--dashboard_id`, `--note_title`).
|
|
36
|
+
- If `Invalid JSON` appears, first verify with the smallest JSON structure (for example `{}` or `[]`), then add fields incrementally.
|
|
37
|
+
- If the result after writing does not match expectations, immediately read back the corresponding list/get interface to compare before and after.
|
|
38
|
+
|
|
39
|
+
## Recommended chaining
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# te_analysis +create_public_access_link (create public access link)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
|
|
4
|
+
|
|
5
|
+
Domain: **Dashboard Management**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Create a public access link for the project.
|
|
9
|
+
- Creates a public link that allows unauthenticated users to access a specified dashboard or BI panel.
|
|
10
|
+
- Returns the created link ID and short-link identifier.
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
```bash
|
|
14
|
+
te-cli te_analysis +create_public_access_link --project_id 1 --resource_type dashboard --resource_id 1 --access_controls '{}' --effective_at "2026-04-09 10:00:00" --expires_at "2026-04-10 10:00:00"
|
|
15
|
+
te-cli te_analysis +create_public_access_link --project_id 1 --company_id 1 --resource_type dashboard --resource_id 1 --access_controls '{}' --remark demo --effective_at "2026-04-09 10:00:00" --expires_at "2026-04-10 10:00:00"
|
|
16
|
+
te-cli te_analysis +create_public_access_link --dry-run
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
| Parameter | Required | Description |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
23
|
+
| `--company_id` | No | Optional company ID. If omitted, the company ID of the project is used. |
|
|
24
|
+
| `--resource_type` | Yes | Access target type. Supported values: dashboard (dashboard) and bi_panel (BI panel). |
|
|
25
|
+
| `--resource_id` | Yes | Access target ID. Use a dashboard ID when resourceType is dashboard, and a BI panel ID when resourceType is bi_panel. |
|
|
26
|
+
| `--access_controls` | Yes | Public access control JSON. Effective when resourceType is dashboard. DN controls whether the dashboard title is shown (1: shown, 2: hidden); GF controls whether filters are shown (1: shown and editable, 2: hidden, 3: shown but not editable); UA controls whether refresh is allowed (1: shown, 2: hidden). Pass JSON format. The default for dashboard is {"DN":"1","GF":"3","UA":"2"}; the default for bi_panel is {}. |
|
|
27
|
+
| `--remark` | No | Optional remark. Maximum length: 200 characters. |
|
|
28
|
+
| `--effective_at` | Yes | Effective time. Format: yyyy-MM-dd HH:mm:ss |
|
|
29
|
+
| `--expires_at` | Yes | Expiration time. Format: yyyy-MM-dd HH:mm:ss |
|
|
30
|
+
|
|
31
|
+
## Decision Rules
|
|
32
|
+
- For the first run, it is recommended to pass only the required parameters (`--project_id`, `--resource_type`, `--resource_id`) and add optional parameters after confirming the chain works.
|
|
33
|
+
- Wrap JSON parameters in single quotes (for example `--access_controls '{}'`) to avoid shell escaping issues.
|
|
34
|
+
- When dates/time ranges are involved, validate with a short range first and then expand gradually.
|
|
35
|
+
- For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
|
|
36
|
+
|
|
37
|
+
## Next Step After Failure
|
|
38
|
+
- If required parameters are missing, fall back to the smallest runnable command and fill them in (focus on `--project_id`, `--resource_type`, `--resource_id`).
|
|
39
|
+
- If `Invalid JSON` appears, first validate with the smallest JSON structure (for example `{}` or `[]`), then add fields gradually.
|
|
40
|
+
- If the result after writing is not as expected, immediately reread the corresponding list/get interface and compare before and after.
|
|
41
|
+
|
|
42
|
+
## Recommended Chaining
|
|
43
|
+
- +create_public_access_link -> +list_public_access_links
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# te_analysis +create_report (Create Report)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
|
|
4
|
+
|
|
5
|
+
Domain: **Report management**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Precondition helper: call `+get_analysis_query_schema` to get the structure before using this tool.
|
|
9
|
+
- When constructing a real `analysis_query`, you must supplement it with real project metadata; first call `te_meta +list_events` and `te_meta +list_properties`.
|
|
10
|
+
- Create and persist a new report definition. Returns the new report ID and name without querying data or modifying existing reports.
|
|
11
|
+
|
|
12
|
+
## Mandatory prerequisites (MUST)
|
|
13
|
+
- Before constructing `--analysis_query`, you must first read and follow these reference documents:
|
|
14
|
+
- [`./get-analysis-query-schema.md`](./get-analysis-query-schema.md)
|
|
15
|
+
- [`../../te-meta/references/list-events.md`](../../te-meta/references/list-events.md)
|
|
16
|
+
- [`../../te-meta/references/list-properties.md`](../../te-meta/references/list-properties.md)
|
|
17
|
+
- Do not generate the final `analysis_query` until the documentation review and prerequisite command calls are complete.
|
|
18
|
+
|
|
19
|
+
## Prerequisite call chain (required for constructing analysis_query)
|
|
20
|
+
1. First determine `--model_type`.
|
|
21
|
+
2. Read `get-analysis-query-schema.md`, then call `te-cli te_analysis +get_analysis_query_schema --model_type <model_type>` 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 `analysis_query` from the schema + metadata, then call `+create_report`.
|
|
25
|
+
|
|
26
|
+
## Command
|
|
27
|
+
```bash
|
|
28
|
+
te-cli te_analysis +create_report --project_id 1 --report_name demo --model_type event --analysis_query '{}'
|
|
29
|
+
te-cli te_analysis +create_report --project_id 1 --report_name demo --model_type event --analysis_query '{}' --description demo --cache_seconds 8 --query_duration_ms 8 --dashboard_ids '[]'
|
|
30
|
+
te-cli te_analysis +create_report --dry-run
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Parameters
|
|
34
|
+
| Parameter | Required | Description |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
37
|
+
| `--report_name` | Yes | Report name. Length: 1-80 characters |
|
|
38
|
+
| `--model_type` | Yes | Report model type. Supported values: event, retention, funnel, prop_analysis, path, distribution, sql, interval, attribution |
|
|
39
|
+
| `--analysis_query` | Yes | Report analysis query JSON. MUST call `+get_analysis_query_schema` first, and use event/property metadata from `te_meta +list_events` / `te_meta +list_properties` in the same `project_id`. |
|
|
40
|
+
| `--description` | No | Optional report description |
|
|
41
|
+
| `--cache_seconds` | No | Optional cache duration in seconds |
|
|
42
|
+
| `--query_duration_ms` | No | Optional query duration in milliseconds |
|
|
43
|
+
| `--dashboard_ids` | No | Optional list of dashboard IDs to associate |
|
|
44
|
+
|
|
45
|
+
## Decision Rules
|
|
46
|
+
- `analysis_query` cannot be written from experience alone: it must satisfy both the schema structure and the project metadata constraints.
|
|
47
|
+
- Before calling `list_events` / `list_properties`, you must first study the corresponding reference documents.
|
|
48
|
+
- On the first run, start with only the required parameters (`--project_id`,`--report_name`,`--model_type`), and add optional parameters after confirming the path works.
|
|
49
|
+
- Wrap JSON parameters in single quotes (for example `--analysis_query '{}'`, `--dashboard_ids '{}'`) to avoid shell escaping issues.
|
|
50
|
+
- For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
|
|
51
|
+
- Write operations keep the confirmation prompt by default; evaluate whether to use `--yes` for automated scenarios.
|
|
52
|
+
|
|
53
|
+
## Next Steps on Failure
|
|
54
|
+
- If required parameters are missing, fall back to the smallest runnable command and fill them in first (focus on `--project_id`, `--report_name`, `--model_type`).
|
|
55
|
+
- If `Invalid JSON` appears, first check the schema required fields, then verify whether the event/property names come from metadata query results for the same `project_id`.
|
|
56
|
+
- If the result after writing does not match expectations, immediately read back the corresponding list/get interface to compare before and after.
|
|
57
|
+
|
|
58
|
+
## Recommended chaining
|
|
59
|
+
- +get_analysis_query_schema -> te_meta +list_events -> te_meta +list_properties -> +create_report
|
|
60
|
+
- +list_reports -> +get_report_definition -> +query_report_data
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# te_analysis +create_result_cluster (create result cluster)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
|
|
4
|
+
|
|
5
|
+
Domain: **Model Analysis**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Create a reusable result cluster from users matched by a drilldown condition in an existing analysis result.
|
|
9
|
+
- Use this tool only after query_adhoc, query_report_data, or query_dashboard_report_data.
|
|
10
|
+
- Keep the qp consistent with the source analysis.
|
|
11
|
+
- Drilldown parameters such as drilldownDate, funnelStep, and retentionDays must come from real analysis results.
|
|
12
|
+
- Prerequisite: it is recommended to first run query_adhoc, query_report_data, or query_dashboard_report_data, then call this tool.
|
|
13
|
+
|
|
14
|
+
## Mandatory Prerequisites (MUST)
|
|
15
|
+
- Before building `--qp` and the various drilldown parameters, you must first read and follow the following reference docs:
|
|
16
|
+
- [`./query-adhoc.md`](./query-adhoc.md)
|
|
17
|
+
- [`./query-report-data.md`](./query-report-data.md)
|
|
18
|
+
- [`./query-dashboard-report-data.md`](./query-dashboard-report-data.md)
|
|
19
|
+
- `qp`, `drilldown_date`, `drilldown_groups`, `event_index`, `retention_days`, `funnel_step`, and other parameters must come from real analysis results and must not be guessed.
|
|
20
|
+
- Do not create a result cluster until the upstream query and result reread have been completed.
|
|
21
|
+
|
|
22
|
+
## Prerequisite Call Chain (required for creating a result cluster)
|
|
23
|
+
1. Run the upstream analysis first (`+query_adhoc` / `+query_report_data` / `+query_dashboard_report_data`) and save the result.
|
|
24
|
+
2. Extract `qp` and the drilldown positioning parameters (date, group, step, interval, and so on) from the upstream result.
|
|
25
|
+
3. Verify that `--model_type` matches the upstream analysis model.
|
|
26
|
+
4. Call `+create_result_cluster` to create the cluster.
|
|
27
|
+
|
|
28
|
+
## Commands
|
|
29
|
+
```bash
|
|
30
|
+
te-cli te_analysis +create_result_cluster --project_id 1 --cluster_name demo --model_type event --qp '{}'
|
|
31
|
+
te-cli te_analysis +create_result_cluster --project_id 1 --cluster_name demo --display_name demo --model_type event --qp '{}' --zone_offset 8 --drilldown_date 2026-04-08 --drilldown_groups '[]' --event_index 8 --is_lost true --retention_days 8 --is_churned_user true --funnel_step 8 --interval demo --distribution_bucket 8 --compare_index 8 --include_total true --relation_val demo
|
|
32
|
+
te-cli te_analysis +create_result_cluster --dry-run
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Parameters
|
|
36
|
+
| Parameter | Required | Description |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
39
|
+
| `--cluster_name` | Yes | Cluster name. Must start with a letter and contain only letters, digits, and underscores. It must be unique within the project. |
|
|
40
|
+
| `--display_name` | No | Optional cluster display name. If omitted, clusterName is used. |
|
|
41
|
+
| `--model_type` | Yes | Model type used in the source analysis. Supported values: event, retention, funnel, distribution, attribution, heat_map, interval, path, rank_list, prop_analysis, sql. |
|
|
42
|
+
| `--qp` | Yes | Query parameter JSON. MUST be copied from the source analysis request/result and keep fully consistent with the upstream analysis context. |
|
|
43
|
+
| `--zone_offset` | No | Optional time zone offset. If omitted, the project default time zone is used. |
|
|
44
|
+
| `--drilldown_date` | No | Target drilldown date from the analysis result. Required for event and retention models. Format: yyyy-MM-dd |
|
|
45
|
+
| `--drilldown_groups` | No | Drilldown group values from the analysis result as a JSON array, for example ["ios"]. Defaults to the overall group when omitted. |
|
|
46
|
+
| `--event_index` | No | Event index for event-model drilldown. Use the event position from the analysis result starting from 0. |
|
|
47
|
+
| `--is_lost` | No | For retention analysis, true saves lost users and false saves retained users. Default: false |
|
|
48
|
+
| `--retention_days` | No | Retention interval in days from the analysis result, for example 7 for day-7 retention |
|
|
49
|
+
| `--is_churned_user` | No | For funnel analysis, true saves churned users for the step and false saves converted users. Default: false |
|
|
50
|
+
| `--funnel_step` | No | Funnel step number from the analysis result starting from 1 |
|
|
51
|
+
| `--interval` | No | Interval used for interval analysis |
|
|
52
|
+
| `--distribution_bucket` | No | Distribution bucket index from the analysis result |
|
|
53
|
+
| `--compare_index` | No | Comparison index used in comparison analysis scenarios |
|
|
54
|
+
| `--include_total` | No | Whether to save users from the total row. Default: false |
|
|
55
|
+
| `--relation_val` | No | Relation value used in relation analysis scenarios |
|
|
56
|
+
|
|
57
|
+
## Decision Rules
|
|
58
|
+
- Drilldown positioning parameters must come from upstream analysis results and must not be fabricated.
|
|
59
|
+
- `qp` must not be rewritten or "simplified"; it should remain consistent with the source analysis.
|
|
60
|
+
- For the first run, it is recommended to pass only the required parameters (`--project_id`, `--cluster_name`, `--model_type`, `--qp`) and add optional parameters after confirming the chain works.
|
|
61
|
+
- Wrap JSON parameters in single quotes (for example `--qp '{}'`) to avoid shell escaping issues.
|
|
62
|
+
- When dates/time ranges are involved, validate with a short range first and then expand gradually.
|
|
63
|
+
- For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
|
|
64
|
+
|
|
65
|
+
## Next Step After Failure
|
|
66
|
+
- If required parameters are missing, fall back to the smallest runnable command and fill them in (focus on `--project_id`, `--cluster_name`, `--model_type`, `--qp`).
|
|
67
|
+
- If `Invalid JSON` appears, first check the raw `qp` from the upstream query request, then verify that all necessary drilldown parameters are present.
|
|
68
|
+
- If the result after writing is not as expected, immediately reread the corresponding list/get interface and compare before and after.
|
|
69
|
+
|
|
70
|
+
## Recommended Chaining
|
|
71
|
+
- +query_adhoc -> +create_result_cluster
|
|
72
|
+
- +query_report_data -> +create_result_cluster
|
|
73
|
+
- +query_dashboard_report_data -> +create_result_cluster
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# te_analysis +drilldown_user_events (Single-User Event Sequence Drilldown)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
|
|
4
|
+
|
|
5
|
+
Domain: **Model analysis**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Drill down to detailed event sequences for a specific user on specific dates.
|
|
9
|
+
- This tool is typically used after drilldown_users.
|
|
10
|
+
- Common parameters (focus on these): projectId, userId, eventNames, targetDates.
|
|
11
|
+
- Advanced parameters (for special scenarios): zoneOffset, properties, timeGranularity, firstDayOfWeek, sortOrder, eventNameFilter, timeFilter, timeFilterBeforeNums, timeFilterAfterNums, entityId, entityValue, useCache, pageNum, pageSize.
|
|
12
|
+
- The userId must come from drilldown_users and must not be guessed.
|
|
13
|
+
- targetDates is a list of discrete dates, not a date range.
|
|
14
|
+
- Constraint: drilldown positioning parameters must come from the previous query result and must not be guessed.
|
|
15
|
+
- Constraint: time parameters are passed as an array of discrete time points, not a start/end interval.
|
|
16
|
+
|
|
17
|
+
## Mandatory prerequisites (MUST)
|
|
18
|
+
- Before constructing `--user_id` / `--event_names` / `--target_dates`, you must first read and follow these reference documents:
|
|
19
|
+
- [`./drilldown-users.md`](./drilldown-users.md)
|
|
20
|
+
- [`../../te-meta/references/list-events.md`](../../te-meta/references/list-events.md)
|
|
21
|
+
- [`../../te-meta/references/list-properties.md`](../../te-meta/references/list-properties.md) (only when passing `--properties`)
|
|
22
|
+
- `user_id` must come from the `+drilldown_users` result; `event_names` / `target_dates` must come from the previous drilldown context or the actual result and must not be guessed.
|
|
23
|
+
- Do not execute single-user event sequence drilldown until the upstream drilldown and result readback are complete.
|
|
24
|
+
|
|
25
|
+
## Prerequisite call chain (required for executing single-user event drilldown)
|
|
26
|
+
1. First execute `+drilldown_users` and obtain the target user and drilldown context.
|
|
27
|
+
2. Confirm the `user_id`, candidate events, and target discrete time points from the previous step result.
|
|
28
|
+
3. If additional property display is needed, first call `te_meta +list_properties --project_id 1` to verify property names.
|
|
29
|
+
4. Call `+drilldown_user_events` to query the event sequence.
|
|
30
|
+
|
|
31
|
+
## Command
|
|
32
|
+
```bash
|
|
33
|
+
te-cli te_analysis +drilldown_user_events --project_id 1 --user_id u_123 --event_names '["login"]' --target_dates '["2026-04-08 00:00:00"]'
|
|
34
|
+
te-cli te_analysis +drilldown_user_events --project_id 1 --user_id u_123 --event_names '["login"]' --target_dates '["2026-04-08 00:00:00"]' --zone_offset 8 --use_cache true --page_num 1 --page_size 100
|
|
35
|
+
te-cli te_analysis +drilldown_user_events --dry-run
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Parameters
|
|
39
|
+
| Parameter | Required | Description |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
42
|
+
| `--user_id` | Yes | User ID from drilldown_users. It must come from drilldown_users and must not be guessed. |
|
|
43
|
+
| `--event_names` | Yes | JSON array of event names. Values should come from upstream drilldown context or `te_meta +list_events` in the same `project_id`. |
|
|
44
|
+
| `--target_dates` | Yes | JSON array of discrete target dates from upstream drilldown context. Not a start/end range. |
|
|
45
|
+
| `--zone_offset` | No | Time zone offset. For example, UTC+8 is 8 |
|
|
46
|
+
| `--properties` | No | Optional event properties JSON array |
|
|
47
|
+
| `--time_granularity` | No | Time granularity: T0/T1/T2/T3/T4/T5/T6/T7 |
|
|
48
|
+
| `--first_day_of_week` | No | First day of week: 1-7 |
|
|
49
|
+
| `--sort_order` | No | Sort order: asc or desc |
|
|
50
|
+
| `--event_name_filter` | No | Optional event name filter |
|
|
51
|
+
| `--time_filter` | No | Optional time filter condition |
|
|
52
|
+
| `--time_filter_before_nums` | No | Number of records before the time filter point |
|
|
53
|
+
| `--time_filter_after_nums` | No | Number of records after the time filter point |
|
|
54
|
+
| `--entity_id` | No | Optional entity ID for multi-entity scenarios |
|
|
55
|
+
| `--entity_value` | No | Optional entity value for multi-entity scenarios |
|
|
56
|
+
| `--use_cache` | No | Whether to use cache. Default: true |
|
|
57
|
+
| `--page_num` | No | Start page number, default 1 |
|
|
58
|
+
| `--page_size` | No | Page size, default 100 |
|
|
59
|
+
| `--timeout_minutes` | No | Query timeout in minutes |
|
|
60
|
+
|
|
61
|
+
## Decision Rules
|
|
62
|
+
- `user_id` / `event_names` / `target_dates` must come from the previous step result and must not be constructed out of thin air.
|
|
63
|
+
- On the first run, start with only the required parameters (`--project_id`,`--user_id`,`--event_names`,`--target_dates`), and add optional parameters after confirming the path works.
|
|
64
|
+
- Wrap JSON parameters in single quotes (for example `--event_names '[]'`, `--target_dates '[]'`) to avoid shell escaping issues.
|
|
65
|
+
- For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
|
|
66
|
+
|
|
67
|
+
## Next Steps on Failure
|
|
68
|
+
- If required parameters are missing, fall back to the smallest runnable command and fill them in first (focus on `--project_id`, `--user_id`, `--event_names`, `--target_dates`).
|
|
69
|
+
- If `Invalid JSON` appears, first verify the array structure, then compare it with the previous drilldown result to confirm the values are complete and valid.
|
|
70
|
+
|
|
71
|
+
## Recommended chaining
|
|
72
|
+
- +drilldown_users -> +drilldown_user_events
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# te_analysis +drilldown_users (drill down analysis results to users)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
|
|
4
|
+
|
|
5
|
+
Domain: **Model Analysis**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Prerequisite helper: first call `+get_analysis_query_schema` to get the structure, then call this tool.
|
|
9
|
+
- Drill down to the user list for a specific data point in an existing analysis result.
|
|
10
|
+
- Use this tool only after query_adhoc, query_report_data, or query_dashboard_report_data.
|
|
11
|
+
- The qp must stay the same as the previous analysis.
|
|
12
|
+
- Drilldown parameters such as drilldownDate, drilldownGroups, retentionDays, and funnelStep must come from actual analysis results and must not be guessed.
|
|
13
|
+
- Prerequisite: it is recommended to first run query_adhoc, query_report_data, or query_dashboard_report_data, then call this tool.
|
|
14
|
+
- Constraint: drilldown positioning parameters must come from the previous query result and must not be guessed.
|
|
15
|
+
|
|
16
|
+
## Mandatory Prerequisites (MUST)
|
|
17
|
+
- Before building `--qp` and the drilldown positioning parameters, you must first read and follow the following reference docs:
|
|
18
|
+
- [`./query-adhoc.md`](./query-adhoc.md)
|
|
19
|
+
- [`./query-report-data.md`](./query-report-data.md)
|
|
20
|
+
- [`./query-dashboard-report-data.md`](./query-dashboard-report-data.md)
|
|
21
|
+
- `qp`, `drilldown_date`, `drilldown_groups`, `event_index`, `retention_days`, `funnel_step`, and other parameters must come from real analysis results and must not be guessed.
|
|
22
|
+
- Do not execute user drilldown until the upstream query and result reread have been completed.
|
|
23
|
+
|
|
24
|
+
## Prerequisite Call Chain (required for drilldown)
|
|
25
|
+
1. Run the upstream analysis first (`+query_adhoc` / `+query_report_data` / `+query_dashboard_report_data`) and save the result.
|
|
26
|
+
2. Extract `qp` and the drilldown positioning parameters from the upstream result.
|
|
27
|
+
3. Verify that `--model_type` matches the upstream analysis model.
|
|
28
|
+
4. Call `+drilldown_users` to execute the user drilldown.
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
```bash
|
|
32
|
+
ae-cli te_analysis +drilldown_users --project_id 1 --model_type event --qp '{}'
|
|
33
|
+
ae-cli te_analysis +drilldown_users --project_id 1 --model_type retention --qp '{}' --drilldown_date 2026-04-08 --drilldown_groups '[]' --event_index 8 --is_lost true --retention_days 8 --is_churned_user true --funnel_step 8 --interval demo --distribution_bucket 8 --compare_index 8 --include_total true --relation_val demo
|
|
34
|
+
ae-cli te_analysis +drilldown_users --dry-run
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Parameters
|
|
38
|
+
| Parameter | Required | Description |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
41
|
+
| `--model_type` | Yes | Model type used in the source analysis. Supported values: event, retention, funnel, distribution, attribution, heat_map, interval, path, rank_list, prop_analysis, sql. |
|
|
42
|
+
| `--qp` | Yes | Query parameter JSON used for drilldown. MUST be copied from the source analysis request/result and keep consistent with upstream context. |
|
|
43
|
+
| `--properties` | No | Optional user properties JSON array |
|
|
44
|
+
| `--zone_offset` | No | Time zone offset. For example, UTC+8 is 8 |
|
|
45
|
+
| `--drilldown_date` | No | Target drilldown date from the analysis result. Required for event and retention models. Format: yyyy-MM-dd |
|
|
46
|
+
| `--drilldown_groups` | No | Drilldown group values from the analysis result as a JSON array, for example ["ios"]. Defaults to the overall group when omitted. |
|
|
47
|
+
| `--event_index` | No | Event index for event-model drilldown. Use the event position from the analysis result starting from 0. |
|
|
48
|
+
| `--is_lost` | No | For retention analysis, true queries lost users and false queries retained users. Default: false |
|
|
49
|
+
| `--retention_days` | No | Retention interval in days from the analysis result, for example 7 for day-7 retention. If model_type is 'retention', the retention_days must not be null. |
|
|
50
|
+
| `--is_churned_user` | No | For funnel analysis, true queries churned users for the step and false queries converted users. Default: false |
|
|
51
|
+
| `--funnel_step` | No | Funnel step number from the analysis result starting from 1. If model_type is 'funnel', the funnel_step must not be null. |
|
|
52
|
+
| `--interval` | No | Interval |
|
|
53
|
+
| `--distribution_bucket` | No | Distribution bucket index from the analysis result |
|
|
54
|
+
| `--compare_index` | No | Comparison index used in comparison analysis scenarios |
|
|
55
|
+
| `--include_total` | No | Whether to query users from the total row. Default: false |
|
|
56
|
+
| `--relation_val` | No | Relation value used in relation analysis scenarios |
|
|
57
|
+
| `--use_cache` | No | Whether to use cache. Default: true |
|
|
58
|
+
| `--timeout_minutes` | No | Query timeout in minutes. If the query exceeds this time, it will be cancelled automatically. |
|
|
59
|
+
|
|
60
|
+
## Decision Rules
|
|
61
|
+
- Drilldown positioning parameters must come from upstream analysis results and must not be fabricated.
|
|
62
|
+
- `qp` must not be rewritten or "simplified"; it should remain consistent with the source analysis.
|
|
63
|
+
- For the first run, it is recommended to pass only the required parameters (`--project_id`, `--model_type`, `--qp`) and add optional parameters after confirming the chain works.
|
|
64
|
+
- Wrap JSON parameters in single quotes (for example `--qp '{}'`, `--drilldown_groups '{}'`) to avoid shell escaping issues.
|
|
65
|
+
- When dates/time ranges are involved, validate with a short range first and then expand gradually.
|
|
66
|
+
- For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
|
|
67
|
+
|
|
68
|
+
## Next Step After Failure
|
|
69
|
+
- If required parameters are missing, fall back to the smallest runnable command and fill them in (focus on `--project_id`, `--model_type`, `--qp`).
|
|
70
|
+
- If `Invalid JSON` appears, first check the raw `qp` from the upstream query request, then verify that all necessary drilldown parameters are present.
|
|
71
|
+
|
|
72
|
+
## Recommended Chaining
|
|
73
|
+
- +query_adhoc -> +drilldown_users
|
|
74
|
+
- +query_report_data -> +drilldown_users
|
|
75
|
+
- +query_dashboard_report_data -> +drilldown_users
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# te_analysis +get_alert_definition_schema (Get Alert Definition Schema)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Read [`../te-shared/SKILL.md`](../../te-shared/SKILL.md)
|
|
4
|
+
|
|
5
|
+
Domain: **Metadata queries**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Helper tool positioning: this command provides structural definitions (schema) and should be used as a prerequisite step.
|
|
9
|
+
- Recommended order: first use the current schema tool to get the structure, then call the specific business tool.
|
|
10
|
+
- Typical follow-up tools: `+create_alert`, `+update_alert`
|
|
11
|
+
- Get the alert definition schema. Returns field definitions, enum descriptions, and examples for creating or updating alerts.
|
|
12
|
+
- Use this to understand the alert definition structure before calling create_alert or update_alert.
|
|
13
|
+
|
|
14
|
+
## Command
|
|
15
|
+
```bash
|
|
16
|
+
te-cli te_analysis +get_alert_definition_schema
|
|
17
|
+
te-cli te_analysis +get_alert_definition_schema --dry-run
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Parameters
|
|
21
|
+
| Parameter | Required | Description |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| None | - | This command has no business parameters; call it directly. |
|
|
24
|
+
|
|
25
|
+
## Decision Rules
|
|
26
|
+
- It is recommended to run `--dry-run` first to inspect the request body mapping before making the formal call.
|
|
27
|
+
|
|
28
|
+
## Next Steps on Failure
|
|
29
|
+
- If reading fails, first verify whether the object ID exists and belongs to the current project.
|
|
30
|
+
|
|
31
|
+
## Recommended chaining
|
|
32
|
+
- +get_alert_definition_schema
|