@thinkingai/ae-cli 6.1.6 → 6.1.8
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/dist/{auth-UPGUOKTW.js → auth-B2BRSYMS.js} +1 -1
- package/dist/{capability-TQ5KU5Q6.js → capability-6KPXYNO7.js} +1 -1
- package/dist/{capability-AJC5CBRT.js → capability-ROKYESAP.js} +1 -1
- package/dist/{chunk-6CHYBI64.js → chunk-EBPXT3TN.js} +1 -1
- package/dist/{chunk-4Q5TNP4Q.js → chunk-J7MZHDHQ.js} +48 -24
- package/dist/{chunk-IMMGMU54.js → chunk-JTKMDN4A.js} +64 -166
- package/dist/{chunk-ISY6HMHM.js → chunk-RRFK2W7I.js} +1 -1
- package/dist/{config-RCCGHHYA.js → config-DDYJPJX3.js} +4 -4
- package/dist/index.js +63 -28
- package/dist/{metadata-3M5F2AED.js → metadata-2ZFRMVOL.js} +2 -55
- package/dist/{metadata-W2MEOI4Z.js → metadata-ABQCKU5P.js} +2 -55
- package/dist/{model-OYQLXCQY.js → model-JASQVOFD.js} +1 -1
- package/dist/{raw-TPB7KSZO.js → raw-6HXFFHLV.js} +1 -1
- package/dist/{sync-EFJKFZK2.js → sync-BF3IWYFC.js} +2 -2
- package/dist/{te-agent-K2OWMZXT.js → te-agent-3GJ5H2XF.js} +195 -2
- package/dist/{te-analysis-I73ZS4NK.js → te-analysis-DJ6KELTU.js} +636 -668
- package/dist/{te-analysis-Q7AZCDU4.js → te-analysis-PCGESPLW.js} +636 -668
- package/dist/{te-dataops-OA7I6HBG.js → te-dataops-LXL5YULV.js} +7 -7
- package/dist/{te-dataops-MJV54MNY.js → te-dataops-ROHUJOX5.js} +7 -7
- package/dist/{te-engage-2FSDUOIZ.js → te-engage-2YDCA552.js} +87 -4
- package/dist/{te-engage-BMJ6UOUU.js → te-engage-VW6NJZ5V.js} +87 -4
- package/dist/{te-experiment-4JC7WUKW.js → te-experiment-7JGJNDXO.js} +2 -2
- package/dist/{te-experiment-KYRWAUZY.js → te-experiment-OYK54B72.js} +2 -2
- package/dist/te-meta-GBDTMPEL.js +95 -0
- package/dist/te-meta-ZTLTSHXC.js +95 -0
- package/dist/te-system-AH7DMCAQ.js +1706 -0
- package/dist/{te-team-PDKKW7Q5.js → te-team-RRZI4WRI.js} +1 -1
- package/dist/update-ER7VFU55.js +101 -0
- package/package.json +9 -4
- package/skills/ae-agent/SKILL.md +5 -1
- package/skills/ae-agent/references/create-automation.md +1 -0
- package/skills/ae-agent/references/list-sandbox-tools.md +79 -0
- package/skills/ae-analysis/SKILL.md +8 -9
- package/skills/ae-analysis/references/adhoc_export.md +8 -0
- package/skills/ae-analysis/references/adhoc_run.md +9 -0
- package/skills/ae-analysis/references/ai_models.md +3 -1
- package/skills/ae-analysis/references/alert_create.md +2 -3
- package/skills/ae-analysis/references/alert_update.md +2 -3
- package/skills/ae-analysis/references/analysis_data_retrieval.md +2 -0
- package/skills/ae-analysis/references/analysis_drilldown_contract.md +2 -0
- package/skills/ae-analysis/references/analysis_gateway_assets.md +15 -11
- package/skills/ae-analysis/references/bi_panel_create.md +12 -4
- package/skills/ae-analysis/references/bi_panel_update.md +11 -8
- package/skills/ae-analysis/references/bi_panel_version_publish.md +3 -1
- package/skills/ae-analysis/references/command_index.md +28 -47
- package/skills/ae-analysis/references/dashboard_daily_report_get.md +18 -0
- package/skills/ae-analysis/references/dashboard_daily_report_send.md +12 -9
- package/skills/ae-analysis/references/dashboard_daily_report_send_status.md +22 -0
- package/skills/ae-analysis/references/dashboard_daily_report_update.md +13 -6
- package/skills/ae-analysis/references/dashboard_report_data_export.md +4 -2
- package/skills/ae-analysis/references/dashboard_report_data_run.md +5 -3
- package/skills/ae-analysis/references/drilldown_entities_export.md +3 -0
- package/skills/ae-analysis/references/drilldown_entities_run.md +2 -1
- package/skills/ae-analysis/references/drilldown_events_export.md +3 -0
- package/skills/ae-analysis/references/drilldown_events_run.md +2 -1
- package/skills/ae-analysis/references/drilldown_user_events_export.md +8 -0
- package/skills/ae-analysis/references/drilldown_user_events_run.md +8 -0
- package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
- package/skills/ae-analysis/references/filter_value_list.md +47 -0
- package/skills/ae-analysis/references/project_space_get.md +3 -3
- package/skills/ae-analysis/references/project_space_list.md +6 -2
- package/skills/ae-analysis/references/query_cancel.md +3 -1
- package/skills/ae-analysis/references/query_cluster_list.md +34 -0
- package/skills/ae-analysis/references/query_create_result_cluster.md +2 -0
- package/skills/ae-analysis/references/report_create.md +5 -1
- package/skills/ae-analysis/references/report_data_export.md +9 -2
- package/skills/ae-analysis/references/report_data_run.md +8 -3
- package/skills/ae-analysis/references/report_get.md +3 -1
- package/skills/ae-analysis/references/report_update.md +4 -0
- package/skills/ae-analysis/references/super_metadata_batch_create.md +29 -0
- package/skills/ae-analysis/references/super_metadata_batch_edit.md +24 -0
- package/skills/ae-analysis/references/virtual_event_create.md +7 -6
- package/skills/ae-analysis-global/SKILL.md +15 -32
- package/skills/ae-community/SKILL.md +1 -1
- package/skills/ae-data-integration-helper/SKILL.md +3 -2
- package/skills/ae-data-integration-helper/references/sdk_usage_notes.md +1 -1
- package/skills/ae-dataops/SKILL.md +2 -1
- package/skills/ae-dataops/references/dataops-integration.md +75 -6
- package/skills/ae-engage/SKILL.md +32 -5
- package/skills/ae-engage/references/activity-topic.md +34 -1
- package/skills/ae-engage/references/add-channel.md +2 -3
- package/skills/ae-engage/references/build-task-save-guide.md +17 -3
- package/skills/ae-engage/references/channel-detail.md +2 -3
- package/skills/ae-engage/references/channel-list.md +2 -5
- package/skills/ae-engage/references/channel-mgmt.md +17 -2
- package/skills/ae-engage/references/channel-test-send.md +1 -1
- package/skills/ae-engage/references/channel-update-config.md +1 -1
- package/skills/ae-engage/references/delete-channel.md +2 -3
- package/skills/ae-engage/references/save-flow.md +6 -3
- package/skills/ae-engage/references/save-task.md +12 -15
- package/skills/ae-engage/references/scene-config-channel.md +28 -4
- package/skills/ae-engage/references/scene-config-group.md +1 -1
- package/skills/ae-engage/references/scene-config-item.md +1 -1
- package/skills/ae-engage/references/scene-config-metric.md +1 -1
- package/skills/ae-engage/references/scene-config-param.md +1 -1
- package/skills/ae-engage/references/scene-preset-metric.md +1 -1
- package/skills/ae-engage/references/scene-strategy-audience.md +680 -0
- package/skills/ae-engage/references/scene-strategy.md +16 -1
- package/skills/ae-engage/references/scene-template.md +1 -1
- package/skills/ae-engage/references/update-channel-status.md +2 -3
- package/skills/ae-generate-tracking-code/SKILL.md +4 -3
- package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +1 -1
- package/skills/ae-generate-tracking-code/references/server-sdk-insert.md +1 -1
- package/skills/ae-generate-tracking-code/references/snippet-delivery.md +1 -1
- package/skills/ae-generate-tracking-plan/SKILL.md +6 -2
- package/skills/ae-metadata/SKILL.md +8 -15
- package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
- package/skills/ae-system/SKILL.md +357 -0
- package/dist/te-common-ST3QPSXJ.js +0 -61
- package/dist/te-common-WSLIKKPC.js +0 -61
- package/dist/te-meta-Q4L6EE3Q.js +0 -363
- package/dist/te-meta-VHCN4Q62.js +0 -363
- package/skills/ae-analysis/references/alert_definition_schema_get.md +0 -24
- package/skills/ae-analysis/references/batch_create_metadata.md +0 -41
- package/skills/ae-analysis/references/batch_edit_metadata.md +0 -39
- package/skills/ae-analysis/references/cancel_query.md +0 -38
- package/skills/ae-analysis/references/create_alert.md +0 -47
- package/skills/ae-analysis/references/create_entity.md +0 -39
- package/skills/ae-analysis/references/create_project_mark_time.md +0 -39
- package/skills/ae-analysis/references/delete_alert.md +0 -32
- package/skills/ae-analysis/references/delete_project_mark_times.md +0 -36
- package/skills/ae-analysis/references/delete_track_items.md +0 -36
- package/skills/ae-analysis/references/generate_track_program.md +0 -52
- package/skills/ae-analysis/references/generate_track_sdk_sample.md +0 -44
- package/skills/ae-analysis/references/get_alert.md +0 -35
- package/skills/ae-analysis/references/get_alert_definition_schema.md +0 -33
- package/skills/ae-analysis/references/get_project_config.md +0 -33
- package/skills/ae-analysis/references/get_track_program.md +0 -34
- package/skills/ae-analysis/references/list_alerts.md +0 -41
- package/skills/ae-analysis/references/list_entities.md +0 -42
- package/skills/ae-analysis/references/list_project_mark_times.md +0 -43
- package/skills/ae-analysis/references/list_project_users.md +0 -33
- package/skills/ae-analysis/references/list_projects.md +0 -39
- package/skills/ae-analysis/references/load_filters.md +0 -47
- package/skills/ae-analysis/references/save_track_items.md +0 -37
- package/skills/ae-analysis/references/update_alert.md +0 -49
- package/skills/ae-analysis/references/update_project_mark_time.md +0 -40
- package/skills/ae-analysis-global/references/list_query_clusters.md +0 -68
- package/skills/ae-metadata/references/metadata_event_get.md +0 -52
- package/skills/ae-metadata/references/metadata_property_get.md +0 -54
- package/dist/{te-community-WXGB6IOX.js → te-community-QOYIYEJI.js} +3 -3
- package/dist/{te-community-X2AHXGCA.js → te-community-UFKI6ONP.js} +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# engage-scene strategy
|
|
2
2
|
|
|
3
|
-
> Capability ids: `engage-scene.strategy.{list,get,create,update,log,batch-copy,manage}` · Domain: `engage`.
|
|
3
|
+
> Trigger keywords: config center, scene config, operation strategy · Capability ids: `engage-scene.strategy.{list,get,create,update,log,predict,batch-copy,manage}` · Domain: `engage`.
|
|
4
4
|
|
|
5
5
|
Scene management / config center — config item strategy management. `create`/`update` pass backend DTOs via `--payload` (native camelCase structure); `project_id` is injected into the payload.
|
|
6
6
|
|
|
@@ -24,6 +24,12 @@ ae-cli engage-scene strategy update --project-id <project_id> \
|
|
|
24
24
|
# Query a strategy's log
|
|
25
25
|
ae-cli engage-scene strategy log --project-id <project_id> --strategy-uuid <uuid>
|
|
26
26
|
|
|
27
|
+
# Predict custom-audience size (mix QP)
|
|
28
|
+
ae-cli engage-scene strategy predict --project-id <project_id> \
|
|
29
|
+
--qp '<targetClusterQp JSON string>' \
|
|
30
|
+
--zone-offset 8 \
|
|
31
|
+
[--strategy-uuid <uuid>]
|
|
32
|
+
|
|
27
33
|
# Batch-copy strategies
|
|
28
34
|
ae-cli engage-scene strategy batch-copy --project-id <project_id> --config-id <config_id> \
|
|
29
35
|
--strategy-ids '["s1","s2"]' [--op-mode batch]
|
|
@@ -42,6 +48,7 @@ ae-cli engage-scene strategy manage --project-id <project_id> --config-id <confi
|
|
|
42
48
|
| create | `--project-id`, `--payload` | payload = `ConfigStrategyAddDTO`. |
|
|
43
49
|
| update | `--project-id`, `--payload` | payload = `ConfigStrategyModifyDTO` (`strategyUuid` + fields). |
|
|
44
50
|
| log | `--project-id`, `--strategy-uuid` | read. |
|
|
51
|
+
| predict | `--project-id`, `--qp`, `--zone-offset` | Optional `--strategy-uuid`, `--request-id`. read. |
|
|
45
52
|
| batch-copy | `--project-id`, `--config-id`, `--strategy-ids` | `--op-mode` optional (default `batch`). |
|
|
46
53
|
| manage | `--project-id`, `--config-id`, `--action` | Lifecycle actions require `--strategy-uuid-list`; review actions require `--strategy-list`; write. |
|
|
47
54
|
|
|
@@ -51,13 +58,21 @@ ae-cli engage-scene strategy manage --project-id <project_id> --config-id <confi
|
|
|
51
58
|
- `create`: `data.strategy_uuid`.
|
|
52
59
|
- `update`: `data.success`.
|
|
53
60
|
- `log`: `data.log`.
|
|
61
|
+
- `predict`: `data.entity_num`, `data.real_available`, `data.predict_num_list`, `data.refresh_time`.
|
|
54
62
|
- `batch-copy`: `data.result`.
|
|
55
63
|
- `manage`: `data.item`.
|
|
56
64
|
|
|
57
65
|
## Decision Rules
|
|
58
66
|
|
|
59
67
|
- Discover real strategy UUIDs / config IDs first; never invent IDs.
|
|
68
|
+
- **Custom audience (`targetClusterType=1`)** — follow [`scene-strategy-audience.md`](scene-strategy-audience.md) end-to-end:
|
|
69
|
+
1. Preflight every **用户满足** user property and **用户行为** event via `analysis-meta property get` / `event get`; if missing, **stop** and list available properties — never invent or drop.
|
|
70
|
+
2. Assemble mix QP with **two-block layout**: `totalCFilter.filts[0]` = 用户满足, `totalCFilter.filts[1]` = 用户行为; `totalCFilter.relation` = 且/或 between them. **Never** nest `event` inside user-side `COMPOUND`.
|
|
71
|
+
3. `JSON.stringify` → `targetClusterQp`; then `strategy create|update`.
|
|
72
|
+
4. **Do not** call `analysis user-cluster create` unless the user explicitly asks for an existing/named cluster.
|
|
73
|
+
- Full QP spec + examples A/B/C: [`scene-strategy-audience.md`](scene-strategy-audience.md).
|
|
60
74
|
- **`create` requires an enabled template** on the same config item. Enable workflow: `config-param batch-add` → `template create` → `template update` (non-empty `config[]` with real `paramId`) → `template update-status --status 1`. Otherwise `create` returns `TEMPLATE_ENABLE`.
|
|
61
75
|
- `create` output field is `data.strategy_uuid` (not `strategy_id`).
|
|
62
76
|
- `manage` supports `online`, `offline`, `suspend`, `delete`, `approve`, `deny`, and `cancel`; it is a write operation.
|
|
63
77
|
- Save-and-submit and strategy test-send are separate high-impact operations and remain unexposed; use the product UI.
|
|
78
|
+
- **Audience estimate (预估人数):** `ae-cli engage-scene strategy predict` — see [`scene-strategy-audience.md`](scene-strategy-audience.md) § Audience size estimate.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# engage-scene template
|
|
2
2
|
|
|
3
|
-
> Capability ids: `engage-scene.template.{list,get,copy,create,update,update-status,delete}` · Domain: `engage`.
|
|
3
|
+
> Trigger keywords: config center, scene config, template · Capability ids: `engage-scene.template.{list,get,copy,create,update,update-status,delete}` · Domain: `engage`.
|
|
4
4
|
|
|
5
5
|
Scene management / config center — config item template management. `create`/`update` pass backend DTOs via `--payload` (native camelCase structure); `project_id` is injected into the payload.
|
|
6
6
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# ae-engage engage-setting channel update-status
|
|
2
2
|
|
|
3
|
+
> Trigger keywords: push channel · Mapped command: `ae-cli engage-setting channel update-status`
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Mapped command: `ae-cli engage-setting channel update-status`
|
|
5
|
+
Enable or disable an Engage push channel.
|
|
7
6
|
|
|
8
7
|
## Flags
|
|
9
8
|
|
|
@@ -34,7 +34,7 @@ description: "Interactive generation of AE tracking code, LogBus2 configuration,
|
|
|
34
34
|
| LogBus2 配置 | LogBus2 Configuration | `daemon.json` for LogBus2 log sync tool |
|
|
35
35
|
| LoggerConsumer | LoggerConsumer | Server SDK consumer that writes events to local log files |
|
|
36
36
|
| BatchConsumer | BatchConsumer | Server SDK consumer that uploads events in batches |
|
|
37
|
-
| 公共属性 | Super Property | Properties attached to all events automatically |
|
|
37
|
+
| 公共属性 | Super Property | Properties attached to all events automatically. ⚠️ The correct Chinese AE term is "公共属性" or "公共事件属性". Never translate "Super Property" as "超级属性" — that is NOT a valid AE term. |
|
|
38
38
|
| 预置属性 | Preset Property | System properties prefixed with `#` (e.g. `#device_id`, `#time`) |
|
|
39
39
|
| 事件属性 | Event Property | Custom properties on specific events |
|
|
40
40
|
| 用户属性 | User Property | Properties set on the user profile |
|
|
@@ -91,12 +91,12 @@ First, check if `.ae-cli/draft.json` exists and read existing configuration:
|
|
|
91
91
|
**⚠️ Key: SERVER_URL and APP_ID are independent config items. Even if draft.json has project_id and host, you MUST resolve and confirm them. `project_id` ≠ `APP_ID`, `host` ≠ `SERVER_URL`.**
|
|
92
92
|
|
|
93
93
|
1. **APP_ID** — Prefer automatic lookup before asking:
|
|
94
|
-
- If `meta.project_id` is known, run `ae-cli
|
|
94
|
+
- If `meta.project_id` is known, run `ae-cli analysis project info list` once for the current host.
|
|
95
95
|
- Find the project whose `projectId` matches `meta.project_id`.
|
|
96
96
|
- If the matched project has `appId`, ask: **"I found APP_ID `<appId>` for project `<projectId>`. Use it? yes / enter new value"**
|
|
97
97
|
- If the project is missing, ambiguous, or has no `appId`, ask the user to copy APP_ID from AE Admin → "Project Settings" → "Integration Config".
|
|
98
98
|
2. **SERVER_URL** — Data ingestion endpoint (**different from web URL**; go to AE Admin → "Project Settings" → "Integration Config" → fill in "Public URL")
|
|
99
|
-
- If `meta.project_id` is known, you may try `ae-cli
|
|
99
|
+
- If `meta.project_id` is known, you may try `ae-cli analysis project info get --project-id <project_id>` once.
|
|
100
100
|
- Use the returned value only if the response explicitly contains a receiver URL field such as `serverUrl`, `pushUrl`, `push_url`, `receiverUrl`, `publicUrl`, `publicReceiverAddress`, `privateReceiverAddress`, or equivalent ingestion endpoint field.
|
|
101
101
|
- If both `publicReceiverAddress` and `privateReceiverAddress` are present, prefer `publicReceiverAddress` as `SERVER_URL` for generated snippets unless the user explicitly needs an internal/private-network receiver.
|
|
102
102
|
- If a value is found, ask: **"I found SERVER_URL `<url>` for project `<projectId>`. Use it? yes / enter new value"**
|
|
@@ -646,6 +646,7 @@ Validation steps:
|
|
|
646
646
|
- Including `platform === "server"` exclusive events in client code
|
|
647
647
|
- Including `platform === "client"` exclusive events in server code (unless `platform === "both"`)
|
|
648
648
|
- **Skipping SDK main doc read and guessing integration method** — each SDK has different integration approaches; must read wiki main doc's "Integrate SDK" section first, and choose the correct method based on project characteristics (with/without build tools)
|
|
649
|
+
- **Translating "Super Property" as "超级属性" in any user-facing output (code comments, interaction prompts, markdown) — the correct AE Chinese term is "公共事件属性" or "公共属性"**
|
|
649
650
|
- **Entering Phase 1 before Phase 0.5 is complete** — SDK integration must be confirmed before inserting code, otherwise generated track() calls won't work
|
|
650
651
|
|
|
651
652
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Mode A — Client SDK Code Insertion
|
|
2
2
|
|
|
3
|
-
> **Terminology**: 客户端 SDK = client SDK | 代码插入 = code insertion/injection | 前置检查 = pre-check | 集成方式 = integration method | 埋点 = tracking/event tracking | 业务触发点 = business trigger point | 公共属性 = super property | 用户属性 = user property | 自动采集事件 = auto-track event | 插入位置预览 = insertion site preview | 语言风格校验 = language style check
|
|
3
|
+
> **Terminology**: 客户端 SDK = client SDK | 代码插入 = code insertion/injection | 前置检查 = pre-check | 集成方式 = integration method | 埋点 = tracking/event tracking | 业务触发点 = business trigger point | 公共属性 = super property (公共事件属性; never "超级属性") | 用户属性 = user property | 自动采集事件 = auto-track event | 插入位置预览 = insertion site preview | 语言风格校验 = language style check
|
|
4
4
|
|
|
5
5
|
## ⚠️ Mandatory Pre-checks (do not skip)
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Server-side Code Insertion (LoggerConsumer + LogBus2)
|
|
2
2
|
|
|
3
|
-
> **Terminology**: 服务端 SDK = server-side SDK | 代码插入 = code insertion/injection | LoggerConsumer = writes events to local log files (recommended for production) | LogBus2 = log sync tool that reads local logs and uploads to TE | 架构 = architecture | 异步上报 = async upload | 批量上传 = batch upload | 重试策略 = retry strategy | 公共属性 = super property | 用户属性 = user property | 依赖管理 = dependency management
|
|
3
|
+
> **Terminology**: 服务端 SDK = server-side SDK | 代码插入 = code insertion/injection | LoggerConsumer = writes events to local log files (recommended for production) | LogBus2 = log sync tool that reads local logs and uploads to TE | 架构 = architecture | 异步上报 = async upload | 批量上传 = batch upload | 重试策略 = retry strategy | 公共属性 = super property (公共事件属性; never "超级属性") | 用户属性 = user property | 依赖管理 = dependency management
|
|
4
4
|
|
|
5
5
|
## Architecture
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Snippet Output Mode
|
|
2
2
|
|
|
3
|
-
> **Terminology**: 片段/代码片段 = snippet/code snippet | 产物 = deliverable/output | markdown 响应 = markdown response | 初始化 = initialization | 公共属性 = super property | 用户属性 = user property | 事件组 = event group | 触发时机 = trigger timing | 验证步骤 = verification steps | 设备绑定 = device binding | 自动采集事件 = auto-track event | 占位值 = placeholder value | 属性类型 = property type
|
|
3
|
+
> **Terminology**: 片段/代码片段 = snippet/code snippet | 产物 = deliverable/output | markdown 响应 = markdown response | 初始化 = initialization | 公共属性 = super property (公共事件属性; never "超级属性") | 用户属性 = user property | 事件组 = event group | 触发时机 = trigger timing | 验证步骤 = verification steps | 设备绑定 = device binding | 自动采集事件 = auto-track event | 占位值 = placeholder value | 属性类型 = property type
|
|
4
4
|
|
|
5
5
|
## Deliverables
|
|
6
6
|
|
|
@@ -29,7 +29,7 @@ description: "Interactive generation of an AE tracking plan and upload. Trigger
|
|
|
29
29
|
| 货币体系 | Currency System | Hard currency (diamonds), soft currency (gold), etc. |
|
|
30
30
|
| 事件 | Event | Named user action or system occurrence (`event_name`) |
|
|
31
31
|
| 事件属性 | Event Property | Data attached to an event (`prop_names`) |
|
|
32
|
-
| 公共事件属性 | Common/Super Property | Property attached to every event automatically |
|
|
32
|
+
| 公共事件属性 | Common/Super Property | Property attached to every event automatically. ⚠️ The correct Chinese AE term is "公共事件属性" or "公共属性". Never translate "Super Property" as "超级属性" — that is NOT a valid AE term. |
|
|
33
33
|
| 用户属性 | User Property | Property on the user profile (persistent state) |
|
|
34
34
|
| 预置属性 | Preset Property | System property prefixed with `#` (`#device_id`, `#time`, etc.) |
|
|
35
35
|
| 自动采集事件 | Auto-track Event | SDK auto-collected events (`ta_app_start`, `ta_page_show`, etc.) |
|
|
@@ -700,7 +700,10 @@ Based on SDK integration mode collected in Phase 0, decide whether to inject aut
|
|
|
700
700
|
3. Auto-track event `event_tag` set to `"System Event"`
|
|
701
701
|
4. Auto-track events only carry preset properties (`prop_names` is empty or contains only preset property names)
|
|
702
702
|
5. Preset properties prefixed with `#` are not added to `event_properties` pool (auto-collected by SDK)
|
|
703
|
-
6. **Deduplication**:
|
|
703
|
+
6. **Cleanup + Deduplication**: The CLI will:
|
|
704
|
+
- **Remove** auto-track events inherited from templates or existing plans that don't match the user's selected SDKs. For example: if a template built for Android/iOS contains `ta_app_install`, `ta_app_start`, `ta_app_end` but the user selects JavaScript SDK, those `ta_app_*` events will be automatically removed since JavaScript SDK does not support them.
|
|
705
|
+
- **Inject** the correct auto-track events for the user's selected SDKs.
|
|
706
|
+
- **Deduplicate** by event name globally — won't inject events that already exist in the draft (correct auto-track events inherited from templates are kept).
|
|
704
707
|
|
|
705
708
|
**SDK type → Recommended events** (see `references/autotrack-events.md` for details):
|
|
706
709
|
|
|
@@ -1300,6 +1303,7 @@ The tracking plan has been uploaded successfully. Would you like to generate tra
|
|
|
1300
1303
|
- Asking all anchor questions at once
|
|
1301
1304
|
- Skipping Phase 3 and uploading directly
|
|
1302
1305
|
- Manually assembling xlsx bypassing `.ae-cli/draft.json`
|
|
1306
|
+
- Translating "Super Property" as "超级属性" in any user-facing output (interaction prompts, plan summaries, event/property descriptions) — the correct AE Chinese term is "公共事件属性" or "公共属性"
|
|
1303
1307
|
- Calling `fetch` AE API directly within the skill — all AE communication must go through project scripts / CLI
|
|
1304
1308
|
|
|
1305
1309
|
---
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ae-metadata
|
|
3
3
|
version: 1.0.0
|
|
4
|
-
description: "AE/TE metadata capability-gateway CLI: metadata
|
|
4
|
+
description: "AE/TE metadata capability-gateway CLI: metadata data-table management and property dimension-table binding. Metadata CLI routes through the analysis gateway. Input-file upload and event/property detail belong to ae-analysis."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# ae-metadata
|
|
8
8
|
|
|
9
9
|
CLI domain **`metadata`** routes to the analysis capability gateway (`/api/cli/analysis/v1/...`), using auth header **`cli-token`**.
|
|
10
10
|
|
|
11
|
-
Parallel to **`ae-analysis
|
|
11
|
+
Parallel to **`ae-analysis`**. Use **this skill** for gateway-backed metadata detail and data-table/dimension-table operations; use **`ae-analysis`** for metadata list/search, metrics, virtual create, and batch edit.
|
|
12
12
|
|
|
13
13
|
## Global AE CLI Rules
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ Parallel to **`ae-analysis`** (MCP `analysis_meta` for metadata lists/governance
|
|
|
16
16
|
|---|---|
|
|
17
17
|
| `--format <json\|table>` | Output format. Default JSON. |
|
|
18
18
|
| `--jq <expr>` | jq filter on JSON output. |
|
|
19
|
-
| `--host <url>` | Override active AE host, e.g. `ae-cli metadata
|
|
19
|
+
| `--host <url>` | Override active AE host, e.g. `ae-cli metadata data-table list --host <url> ...`. |
|
|
20
20
|
| `--validate` | Optional: fix params only (`/validate`). Alone while iterating complex `qp` / payload — then run. Do not stack with `--dry-run`. |
|
|
21
21
|
| `--dry-run` | Optional: confirm ready to run (`/dry-run`). Alone for risk/output preview. Do not stack with `--validate`. |
|
|
22
22
|
|
|
@@ -28,20 +28,18 @@ Output and errors:
|
|
|
28
28
|
Safety:
|
|
29
29
|
- Read-only commands can run directly after IDs/names are verified.
|
|
30
30
|
- Ordinary writes (`data-table *-write`, `property-bindings-update`, dimension-table bind/create) execute without `--yes`. Delete commands are `high-risk-write`: dry-run first, summarize impact, wait for explicit confirmation, then execute with `--yes`.
|
|
31
|
-
- **Before any command**, read the matching `references/<name>.md` (filename = command with spaces → underscores, e.g. `metadata
|
|
31
|
+
- **Before any command**, read the matching `references/<name>.md` (filename = command with spaces → underscores, e.g. `metadata data-table list` → `metadata_data_table_list.md`).
|
|
32
32
|
- Never invent `project_id`, event/property names, `input_file_id`, or `data_table_id`. Discover names via `ae-analysis` and data table IDs via `metadata data-table list`.
|
|
33
33
|
|
|
34
34
|
## When to Use
|
|
35
35
|
|
|
36
36
|
Switch to **`ae-metadata`** when the user needs:
|
|
37
37
|
|
|
38
|
-
- Full detail for **one** super-event (incl. virtual event `definition`)
|
|
39
|
-
- Full detail for **one** super-property (incl. virtual property `definition`)
|
|
40
38
|
- Metadata data-table list/get/create/update/delete/download
|
|
41
39
|
- For local uploads, switch to `ae-analysis` and use `analysis input-file upload` with a discovered purpose.
|
|
42
40
|
- Bind an existing data table to a property, or create a CSV dimension table and bind it
|
|
43
41
|
|
|
44
|
-
Stay on **`ae-analysis`** for: metadata event/property/metric list/search, metric CRUD, batch metadata, virtual create, project config, tracking plans.
|
|
42
|
+
Stay on **`ae-analysis`** for: metadata event/property detail, metadata event/property/metric list/search, metric CRUD, batch metadata, virtual create, project config, tracking plans.
|
|
45
43
|
|
|
46
44
|
## Command Format
|
|
47
45
|
|
|
@@ -55,14 +53,12 @@ ae-cli metadata property <dimension-table-action> [options]
|
|
|
55
53
|
|
|
56
54
|
## PROJECT_ID_GATE
|
|
57
55
|
|
|
58
|
-
Same rules as `ae-analysis`: reuse verified project context in one conversation; otherwise `ae-cli
|
|
56
|
+
Same rules as `ae-analysis`: reuse verified project context in one conversation; otherwise `ae-cli analysis project info list` (or `ae-analysis` skill) to resolve `project_id`.
|
|
59
57
|
|
|
60
|
-
## Commands (
|
|
58
|
+
## Commands (10)
|
|
61
59
|
|
|
62
60
|
| User command | Capability id | Reference |
|
|
63
61
|
|---|---|---|
|
|
64
|
-
| `metadata event get` | `metadata.event.get` | [metadata_event_get.md](references/metadata_event_get.md) |
|
|
65
|
-
| `metadata property get` | `metadata.property.get` | [metadata_property_get.md](references/metadata_property_get.md) |
|
|
66
62
|
| `metadata data-table list` | `metadata.data_table.list` | [metadata_data_table_list.md](references/metadata_data_table_list.md) |
|
|
67
63
|
| `metadata data-table get` | `metadata.data_table.get` | [metadata_data_table_get.md](references/metadata_data_table_get.md) |
|
|
68
64
|
| `metadata data-table csv-write` | `metadata.data_table.csv_write` | [metadata_data_table_csv_write.md](references/metadata_data_table_csv_write.md) |
|
|
@@ -78,15 +74,12 @@ Same rules as `ae-analysis`: reuse verified project context in one conversation;
|
|
|
78
74
|
|
|
79
75
|
```bash
|
|
80
76
|
ae-cli metadata --help
|
|
81
|
-
ae-cli metadata event get --help
|
|
82
|
-
ae-cli metadata property get --help
|
|
83
77
|
ae-cli metadata data-table list --help
|
|
84
|
-
ae-cli metadata event get --project-id 1 --event-name <name> --dry-run
|
|
85
78
|
ae-cli metadata data-table list --project-id 1 --dry-run
|
|
86
79
|
ae-cli analysis input-file purpose list --project-id 1
|
|
87
80
|
```
|
|
88
81
|
|
|
89
82
|
## Related Skills
|
|
90
83
|
|
|
91
|
-
- **`ae-analysis`**: `analysis-meta event list` / `analysis-meta property list` to discover names
|
|
84
|
+
- **`ae-analysis`**: `analysis-meta event get` / `analysis-meta property get` for detail, and `analysis-meta event list` / `analysis-meta property list` to discover names.
|
|
92
85
|
- **Dev workflow**: `.cursor/skills/te-cli-capability-gateway` — inspect gateway schema when adding new metadata capabilities.
|
|
@@ -22,6 +22,6 @@ ae-cli metadata property bind-existing-dimension-table --project-id <project_id>
|
|
|
22
22
|
|
|
23
23
|
## Decision Rules
|
|
24
24
|
|
|
25
|
-
- Confirm the property with `
|
|
25
|
+
- Confirm the property with `analysis-meta property get` or `analysis-meta property list`.
|
|
26
26
|
- Confirm the data table with `metadata data-table get`.
|
|
27
27
|
- This is an ordinary `write` command and does not require CLI confirmation.
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ae-system
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: "AE Agent system administration CLI for root and agent administrators. Use when the user asks to manage Agent members, sandboxes, company model visibility/defaults, usage statistics, cost quotas, balance alerts, or IM channels. Must use ae-cli system commands, discover real IDs before writes, and never attempt to bypass a permission denial."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ae-system
|
|
8
|
+
|
|
9
|
+
Use the `system` domain for Agent system administration:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
ae-cli system +<command> [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Mandatory Rules
|
|
16
|
+
|
|
17
|
+
- These commands are only for users whose Agent role is `root` or `agent_admin`.
|
|
18
|
+
- The te-agent `/api/admin/**` endpoint is the final authorization boundary. A member receives a permission error (HTTP 403). Do not retry login or attempt a different endpoint after a 403.
|
|
19
|
+
- Run `ae-cli auth login --host <host>` before using this domain. System administration requires a user access-token session; sandbox identity headers are not an authorization substitute.
|
|
20
|
+
- `+npm-install` is the exception that must also run inside a Linux te-agent sandbox because it packages the installed Linux files. It still requires the logged-in user to be `root` or `agent_admin`.
|
|
21
|
+
- Discover real IDs with a list command before any update or delete. Never guess a user, sandbox, model, quota rule, or channel ID.
|
|
22
|
+
- Read and ordinary write commands run without confirmation. Commands marked `high-risk-write` require confirmation unless the user explicitly authorizes `--yes`.
|
|
23
|
+
- Use `--dry-run` to inspect method, path, query, and redacted body without executing.
|
|
24
|
+
- JSON inputs accept inline JSON, `@file`, or `-` for stdin. Prefer `@file` for channel credentials and other sensitive values.
|
|
25
|
+
- Successful output is JSON by default. Use `--format table` only when a human-readable table is more useful.
|
|
26
|
+
- After each command, check stderr and `_notice.host_compat`. If present, show the version warning and its update commands before the business result.
|
|
27
|
+
|
|
28
|
+
## Command Groups
|
|
29
|
+
|
|
30
|
+
### Members
|
|
31
|
+
|
|
32
|
+
| Command | Risk | Purpose |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `+list-member-candidates` | read | List TE company users that can be added. |
|
|
35
|
+
| `+list-members` | read | List Agent members in the current company. |
|
|
36
|
+
| `+add-members` | write | Add one or more TE users, optionally binding a quota rule or creating sandboxes. |
|
|
37
|
+
| `+set-member-status` | write | Enable or disable a member. |
|
|
38
|
+
| `+set-member-role` | write | Change a non-root member between `agent_admin` and `member`. |
|
|
39
|
+
| `+remove-member` | high-risk-write | Remove a non-root member. |
|
|
40
|
+
|
|
41
|
+
Examples:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
ae-cli system +list-members --status enabled --page 1 --page-size 20
|
|
45
|
+
|
|
46
|
+
ae-cli system +add-members \
|
|
47
|
+
--members '[{"openId":"ou_x","loginName":"alice","displayName":"Alice"}]' \
|
|
48
|
+
--create-sandbox true
|
|
49
|
+
|
|
50
|
+
ae-cli system +set-member-role --user-id <user-id> --role agent_admin
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`+list-members` filters:
|
|
54
|
+
|
|
55
|
+
- `--q`: login/display name search.
|
|
56
|
+
- `--status`: `all | enabled | disabled`.
|
|
57
|
+
- `--page`, `--page-size`: page size is 1-100.
|
|
58
|
+
- `--all`: return all matches.
|
|
59
|
+
- `--sort-field periodUsedAmount`, `--sort-dir asc|desc`: central usage sort.
|
|
60
|
+
|
|
61
|
+
`+add-members --members` schema:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
[
|
|
65
|
+
{
|
|
66
|
+
"openId": "required",
|
|
67
|
+
"loginName": "optional",
|
|
68
|
+
"displayName": "optional"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Optional flags are `--rule-id` and `--create-sandbox true|false`.
|
|
74
|
+
|
|
75
|
+
### Sandboxes
|
|
76
|
+
|
|
77
|
+
| Command | Risk | Purpose |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| `+list-sandboxes` | read | List company sandboxes. |
|
|
80
|
+
| `+batch-create-sandboxes` | write | Create personal sandboxes for 1-100 users. |
|
|
81
|
+
| `+update-sandbox` | write | Update a sandbox description. |
|
|
82
|
+
| `+set-sandbox-enabled` | write | Enable or disable a sandbox. |
|
|
83
|
+
| `+start-sandbox` | write | Start a sandbox container. |
|
|
84
|
+
| `+stop-sandbox` | write | Stop a sandbox container. |
|
|
85
|
+
| `+list-sandbox-users` | read | List users bound to a sandbox. |
|
|
86
|
+
| `+bind-sandbox-user` | write | Bind a member to a sandbox. |
|
|
87
|
+
| `+unbind-sandbox-user` | high-risk-write | Remove a sandbox user binding. |
|
|
88
|
+
| `+remove-sandbox` | high-risk-write | Delete a sandbox and its bindings. |
|
|
89
|
+
|
|
90
|
+
Examples:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
ae-cli system +batch-create-sandboxes \
|
|
94
|
+
--user-ids '["<user-id-1>","<user-id-2>"]' \
|
|
95
|
+
--description "Data team"
|
|
96
|
+
|
|
97
|
+
ae-cli system +set-sandbox-enabled --id <sandbox-id> --enabled true
|
|
98
|
+
ae-cli system +bind-sandbox-user --id <sandbox-id> --user-id <user-id>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use Agent database user IDs from `+list-members`, not TE openIds, for sandbox commands.
|
|
102
|
+
|
|
103
|
+
### Shared Sandbox Tools
|
|
104
|
+
|
|
105
|
+
| Command | Risk | Purpose |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| `+upload-sandbox-tool` | write | Validate, ZIP, and upload an existing tool directory. |
|
|
108
|
+
| `+npm-install` | write | Install one exact npm CLI version in a temporary sandbox directory, generate `tool.json`, and upload it. |
|
|
109
|
+
|
|
110
|
+
Uploaded tools are registered for the current company with `enabled=false`. Upload does not activate the tool in any running sandbox. Review and enable/activate it through sandbox tool management after upload.
|
|
111
|
+
|
|
112
|
+
#### Preferred npm Flow
|
|
113
|
+
|
|
114
|
+
Run this inside the target Linux te-agent sandbox:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
ae-cli auth login --host <host>
|
|
118
|
+
ae-cli system +npm-install --package eslint@9.32.0
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
For a scoped package or a custom shared-tool identifier:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
ae-cli system +npm-install \
|
|
125
|
+
--package @scope/example-cli@1.2.3 \
|
|
126
|
+
--name example-cli
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Requirements and behavior:
|
|
130
|
+
|
|
131
|
+
- `--package` must be an exact registry package version. Tags, ranges, URLs, Git sources, npm aliases, and local paths are rejected.
|
|
132
|
+
- The installed package must expose at least one `package.json` `bin` entry. Each bin becomes one tool command.
|
|
133
|
+
- The default tool name is the unscoped package name. Use `--name` only when a different valid lowercase tool identifier is required.
|
|
134
|
+
- npm lifecycle scripts are disabled with `--ignore-scripts` by default. Use `--allow-scripts true` only after reviewing and trusting the package and all transitive dependencies.
|
|
135
|
+
- The command calls the admin upload-policy endpoint before starting npm. A disabled feature, expired session, or non-admin role fails before installation.
|
|
136
|
+
- Installation uses a temporary prefix with development dependencies omitted. Temporary installation and ZIP files are removed whether upload succeeds or fails.
|
|
137
|
+
- npm-created `node_modules/.bin` symlinks are converted to regular executable wrappers in the ZIP. All other symlinks, special files, and links resolving outside the package root are rejected.
|
|
138
|
+
- Pure JavaScript Node.js CLIs are the supported baseline. Packages that require native addons, downloaded platform binaries, build tools, system libraries, or lifecycle setup may fail when scripts are disabled or when activated in a different runtime image.
|
|
139
|
+
- If lifecycle scripts are necessary, install and upload from the same Linux sandbox image family that will execute the tool. Upload never makes an incompatible native artifact portable.
|
|
140
|
+
|
|
141
|
+
#### Existing Directory Flow
|
|
142
|
+
|
|
143
|
+
Use the low-level command when the tool is already installed or assembled:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
ae-cli system +upload-sandbox-tool --path /absolute/path/to/tool-root
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The directory root must contain exactly one `tool.json`. An external manifest is allowed only when the root has no `tool.json`:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
ae-cli system +upload-sandbox-tool \
|
|
153
|
+
--path /absolute/path/to/tool-root \
|
|
154
|
+
--manifest /absolute/path/to/tool.json
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Minimal manifest:
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"schemaVersion": 1,
|
|
162
|
+
"name": "example-cli",
|
|
163
|
+
"displayName": "Example CLI",
|
|
164
|
+
"description": "Optional description",
|
|
165
|
+
"version": "1.2.3",
|
|
166
|
+
"commands": [
|
|
167
|
+
{
|
|
168
|
+
"name": "example",
|
|
169
|
+
"entry": "node_modules/example-cli/bin/example.js",
|
|
170
|
+
"runtime": "node"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Upload contract:
|
|
177
|
+
|
|
178
|
+
- `name` and command names must start with a lowercase letter and contain only lowercase letters, numbers, `.`, `_`, or `-`, with a maximum length of 64.
|
|
179
|
+
- Command names must not replace reserved runtime commands such as `node`, `npm`, `npx`, `bash`, `python`, `git`, `curl`, or `sudo`.
|
|
180
|
+
- Every command `entry` must be a regular file under the upload root. Use `runtime: "node"` for JavaScript entry files and `runtime: "native"` only for an executable compatible with the sandbox Linux image.
|
|
181
|
+
- Paths must be relative and normalized. Absolute paths, `..`, backslashes, control characters, empty segments, and a `current` path segment are rejected.
|
|
182
|
+
- ZIP limits are 50 MB compressed, 500 MB unpacked, 50 MB per file, and 10,000 files. The server publishes only after independently validating the same boundaries.
|
|
183
|
+
- Do not pre-create or write `/data/app/te_agent_ta/share/tools` from a sandbox. Sandboxes are read-only for that directory; the authenticated te-agent upload endpoint owns the final write and registration.
|
|
184
|
+
- A tool name can be registered only once per company in this first static-version flow. Choose the final name and version before upload.
|
|
185
|
+
|
|
186
|
+
### Models
|
|
187
|
+
|
|
188
|
+
| Command | Risk | Purpose |
|
|
189
|
+
| --- | --- | --- |
|
|
190
|
+
| `+list-system-models` | read | List system models and company visibility. |
|
|
191
|
+
| `+set-system-model-enabled` | write | Toggle a system model for the current company. |
|
|
192
|
+
| `+list-company-models` | read | List company models, including disabled models. |
|
|
193
|
+
| `+set-company-model-enabled` | write | Toggle a company model for all company users. |
|
|
194
|
+
| `+get-default-models` | read | Read the `AE_AGENT` and `AI_QA` default slots. |
|
|
195
|
+
| `+set-default-model` | write | Set one default model slot. |
|
|
196
|
+
| `+clear-default-model` | high-risk-write | Clear one default model slot. |
|
|
197
|
+
|
|
198
|
+
Examples:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
ae-cli system +list-system-models
|
|
202
|
+
ae-cli system +set-system-model-enabled --model-id <model-id> --enabled false
|
|
203
|
+
ae-cli system +set-default-model --model-id <model-id> --biz-type AE_AGENT
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
`--biz-type` is `AE_AGENT | AI_QA` and defaults to `AE_AGENT`. Use the database `id` returned by a model list, not the provider model name.
|
|
207
|
+
|
|
208
|
+
### Usage
|
|
209
|
+
|
|
210
|
+
| Command | Risk | Purpose |
|
|
211
|
+
| --- | --- | --- |
|
|
212
|
+
| `+get-usage-summary` | read | Get token/cost summary for a relative or absolute range. |
|
|
213
|
+
| `+get-usage-details` | read | Get paginated usage grouped by user, model, date, or application type. |
|
|
214
|
+
|
|
215
|
+
Examples:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
ae-cli system +get-usage-summary --days 30
|
|
219
|
+
|
|
220
|
+
ae-cli system +get-usage-details \
|
|
221
|
+
--start-date 2026-07-01 \
|
|
222
|
+
--end-date 2026-07-24 \
|
|
223
|
+
--group-by user \
|
|
224
|
+
--page 1 \
|
|
225
|
+
--page-size 20
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Summary range:
|
|
229
|
+
|
|
230
|
+
- Use `--days 1..365`, or provide both `--start-date` and `--end-date`.
|
|
231
|
+
- Dates use `YYYY-MM-DD`.
|
|
232
|
+
|
|
233
|
+
Details flags:
|
|
234
|
+
|
|
235
|
+
- `--start-date` and `--end-date` are required.
|
|
236
|
+
- `--group-by`: `user | model | date | app_type`.
|
|
237
|
+
- Optional filters: `--search`, `--open-id`, `--model-id`, `--model-scope`, `--app-type`.
|
|
238
|
+
- `--model-scope` requires `--model-id`.
|
|
239
|
+
- `--sort-by`: `totalTokens | cost | share | requestCount`.
|
|
240
|
+
- `--sort-dir`: `asc | desc`.
|
|
241
|
+
|
|
242
|
+
### Cost Control
|
|
243
|
+
|
|
244
|
+
| Command | Risk | Purpose |
|
|
245
|
+
| --- | --- | --- |
|
|
246
|
+
| `+get-cost-summary` | read | Get company cost, quota, and usage summary. |
|
|
247
|
+
| `+get-balance-alert` | read | Get balance alert config and current status. |
|
|
248
|
+
| `+set-balance-alert` | write | Enable, update, or disable the balance alert. |
|
|
249
|
+
| `+list-quota-rules` | read | List cost/token quota rules. |
|
|
250
|
+
| `+create-quota-rule` | write | Create a company or user quota rule. |
|
|
251
|
+
| `+update-quota-rule` | write | Update a quota rule. |
|
|
252
|
+
| `+remove-quota-rule` | high-risk-write | Delete a quota rule. |
|
|
253
|
+
| `+bind-quota-rule-user` | write | Bind a quota rule to a TE user openId. |
|
|
254
|
+
|
|
255
|
+
Examples:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
ae-cli system +set-balance-alert --enabled true --threshold 100
|
|
259
|
+
|
|
260
|
+
ae-cli system +create-quota-rule --rule @quota-rule.json
|
|
261
|
+
ae-cli system +bind-quota-rule-user --id <rule-id> --open-id <open-id>
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Quota rule JSON:
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"name": "Daily user quota",
|
|
269
|
+
"subjectType": "USER",
|
|
270
|
+
"periodType": "DAY",
|
|
271
|
+
"quotaType": "TOKEN",
|
|
272
|
+
"totalTokens": "10",
|
|
273
|
+
"allowedModels": ["<model-id>"],
|
|
274
|
+
"modelLimits": [
|
|
275
|
+
{
|
|
276
|
+
"modelId": "<model-id>",
|
|
277
|
+
"limitTokens": "5"
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
"openIds": ["<open-id>"]
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Rules:
|
|
285
|
+
|
|
286
|
+
- `subjectType`: `USER | COMPANY`.
|
|
287
|
+
- `periodType`: `DAY | WEEK | MONTH`.
|
|
288
|
+
- `quotaType`: `COST | TOKEN`.
|
|
289
|
+
- COST uses `budgetAmount`; TOKEN uses `totalTokens`. Token values are expressed in millions.
|
|
290
|
+
- `allowedModels` and `modelLimits` are optional according to the server rule type.
|
|
291
|
+
- Update accepts a partial rule object.
|
|
292
|
+
|
|
293
|
+
### Channels
|
|
294
|
+
|
|
295
|
+
| Command | Risk | Purpose |
|
|
296
|
+
| --- | --- | --- |
|
|
297
|
+
| `+list-channels` | read | List Feishu, Lark, and Slack channels. |
|
|
298
|
+
| `+create-channel` | write | Create one channel. |
|
|
299
|
+
| `+update-channel` | write | Update channel settings, credentials, model, prompt, or enabled state. |
|
|
300
|
+
| `+remove-channel` | high-risk-write | Delete a channel, unbind users, and stop its connection. |
|
|
301
|
+
|
|
302
|
+
Always use `@file` for channel payloads when they contain credentials:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
ae-cli system +create-channel --channel @channel.json
|
|
306
|
+
ae-cli system +update-channel --id <channel-id> --channel @channel-update.json
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Create schema:
|
|
310
|
+
|
|
311
|
+
```json
|
|
312
|
+
{
|
|
313
|
+
"name": "Required display name",
|
|
314
|
+
"type": "feishu",
|
|
315
|
+
"config": {
|
|
316
|
+
"appId": "Feishu/Lark",
|
|
317
|
+
"appSecret": "Feishu/Lark",
|
|
318
|
+
"botToken": "Slack",
|
|
319
|
+
"appToken": "Slack",
|
|
320
|
+
"clientId": "optional",
|
|
321
|
+
"clientSecret": "optional"
|
|
322
|
+
},
|
|
323
|
+
"model": "optional Model.id or modelId::scope",
|
|
324
|
+
"systemPrompt": "optional"
|
|
325
|
+
}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Update accepts a partial object with `name`, `config`, `model`, `systemPrompt`, `enabled`, or `unbindUsers`. Channel type is immutable after creation. Dry-run replaces secret values with `***`.
|
|
329
|
+
|
|
330
|
+
## Permission Errors
|
|
331
|
+
|
|
332
|
+
A permission response looks like:
|
|
333
|
+
|
|
334
|
+
```json
|
|
335
|
+
{
|
|
336
|
+
"ok": false,
|
|
337
|
+
"error": {
|
|
338
|
+
"type": "permission",
|
|
339
|
+
"message": "..."
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
On this response:
|
|
345
|
+
|
|
346
|
+
1. Do not retry with another admin path.
|
|
347
|
+
2. Do not recommend re-login unless the server returned 401 instead.
|
|
348
|
+
3. Tell the user that `root` or `agent_admin` is required.
|
|
349
|
+
|
|
350
|
+
## Transport Status
|
|
351
|
+
|
|
352
|
+
This is a Transitional L2 domain backed by te-agent `/api/admin/**`.
|
|
353
|
+
|
|
354
|
+
- Maintainer: te-agent admin routes and `src/commands/te-system/**`.
|
|
355
|
+
- Migration target: system Capability Gateway.
|
|
356
|
+
- Review date: 2026-10-24.
|
|
357
|
+
- Exit condition: migrate after equivalent gateway schema, auth, risk, dry-run, and output contracts are stable.
|