@thinkingai/ae-cli 6.0.35 → 6.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/{auth-UPGUOKTW.js → auth-B2BRSYMS.js} +1 -1
  2. package/dist/{capability-TQ5KU5Q6.js → capability-6KPXYNO7.js} +1 -1
  3. package/dist/{capability-AJC5CBRT.js → capability-ROKYESAP.js} +1 -1
  4. package/dist/{chunk-6CHYBI64.js → chunk-EBPXT3TN.js} +1 -1
  5. package/dist/{chunk-4Q5TNP4Q.js → chunk-J7MZHDHQ.js} +48 -24
  6. package/dist/{chunk-IMMGMU54.js → chunk-JTKMDN4A.js} +64 -166
  7. package/dist/{chunk-ISY6HMHM.js → chunk-RRFK2W7I.js} +1 -1
  8. package/dist/{config-PMPISN5Y.js → config-DDYJPJX3.js} +1 -1
  9. package/dist/index.js +45 -18
  10. package/dist/{metadata-P5GIVMZ6.js → metadata-2ZFRMVOL.js} +2 -2
  11. package/dist/{metadata-ELUAR3EJ.js → metadata-ABQCKU5P.js} +2 -2
  12. package/dist/{model-OYQLXCQY.js → model-JASQVOFD.js} +1 -1
  13. package/dist/{raw-TPB7KSZO.js → raw-6HXFFHLV.js} +1 -1
  14. package/dist/{sync-EFJKFZK2.js → sync-BF3IWYFC.js} +2 -2
  15. package/dist/{te-agent-BOQ7ZY56.js → te-agent-3GJ5H2XF.js} +1 -1
  16. package/dist/{te-analysis-ZT2MYAHL.js → te-analysis-DJ6KELTU.js} +213 -129
  17. package/dist/{te-analysis-HZIP6SYW.js → te-analysis-PCGESPLW.js} +213 -129
  18. package/dist/{te-dataops-Y5QAPPPF.js → te-dataops-LXL5YULV.js} +1 -1
  19. package/dist/{te-dataops-VYN3IOKO.js → te-dataops-ROHUJOX5.js} +1 -1
  20. package/dist/{te-engage-2FSDUOIZ.js → te-engage-2YDCA552.js} +87 -4
  21. package/dist/{te-engage-BMJ6UOUU.js → te-engage-VW6NJZ5V.js} +87 -4
  22. package/dist/te-system-AH7DMCAQ.js +1706 -0
  23. package/dist/{te-team-PDKKW7Q5.js → te-team-RRZI4WRI.js} +1 -1
  24. package/dist/update-ER7VFU55.js +101 -0
  25. package/package.json +5 -1
  26. package/skills/ae-agent/references/create-automation.md +1 -0
  27. package/skills/ae-analysis/SKILL.md +1 -1
  28. package/skills/ae-analysis/references/alert_create.md +2 -3
  29. package/skills/ae-analysis/references/alert_update.md +2 -3
  30. package/skills/ae-analysis/references/analysis_gateway_assets.md +6 -4
  31. package/skills/ae-analysis/references/bi_panel_create.md +12 -4
  32. package/skills/ae-analysis/references/bi_panel_update.md +11 -8
  33. package/skills/ae-analysis/references/bi_panel_version_publish.md +3 -1
  34. package/skills/ae-analysis/references/command_index.md +10 -7
  35. package/skills/ae-analysis/references/dashboard_daily_report_get.md +18 -0
  36. package/skills/ae-analysis/references/dashboard_daily_report_send.md +12 -9
  37. package/skills/ae-analysis/references/dashboard_daily_report_send_status.md +22 -0
  38. package/skills/ae-analysis/references/dashboard_daily_report_update.md +13 -6
  39. package/skills/ae-analysis/references/drilldown_user_events_export.md +5 -0
  40. package/skills/ae-analysis/references/drilldown_user_events_run.md +6 -0
  41. package/skills/ae-analysis/references/super_metadata_batch_create.md +29 -0
  42. package/skills/ae-analysis/references/super_metadata_batch_edit.md +24 -0
  43. package/skills/ae-engage/SKILL.md +32 -5
  44. package/skills/ae-engage/references/activity-topic.md +34 -1
  45. package/skills/ae-engage/references/add-channel.md +2 -3
  46. package/skills/ae-engage/references/build-task-save-guide.md +17 -3
  47. package/skills/ae-engage/references/channel-detail.md +2 -3
  48. package/skills/ae-engage/references/channel-list.md +2 -5
  49. package/skills/ae-engage/references/channel-mgmt.md +17 -2
  50. package/skills/ae-engage/references/channel-test-send.md +1 -1
  51. package/skills/ae-engage/references/channel-update-config.md +1 -1
  52. package/skills/ae-engage/references/delete-channel.md +2 -3
  53. package/skills/ae-engage/references/save-flow.md +6 -3
  54. package/skills/ae-engage/references/save-task.md +12 -15
  55. package/skills/ae-engage/references/scene-config-channel.md +28 -4
  56. package/skills/ae-engage/references/scene-config-group.md +1 -1
  57. package/skills/ae-engage/references/scene-config-item.md +1 -1
  58. package/skills/ae-engage/references/scene-config-metric.md +1 -1
  59. package/skills/ae-engage/references/scene-config-param.md +1 -1
  60. package/skills/ae-engage/references/scene-preset-metric.md +1 -1
  61. package/skills/ae-engage/references/scene-strategy-audience.md +680 -0
  62. package/skills/ae-engage/references/scene-strategy.md +16 -1
  63. package/skills/ae-engage/references/scene-template.md +1 -1
  64. package/skills/ae-engage/references/update-channel-status.md +2 -3
  65. package/skills/ae-system/SKILL.md +357 -0
  66. package/skills/ae-analysis/references/alert_definition_schema_get.md +0 -24
@@ -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
- Update the status of an Engage channel.
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
 
@@ -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.
@@ -1,24 +0,0 @@
1
- # analysis alert-definition-schema get
2
-
3
- Use when get the alert definition schema.
4
-
5
- Do not use for commands listed under the sheet's non-CLI section or for unrelated metadata/report operations. If the command needs a complex JSON object, read the backend schema or existing asset first and send snake_case fields only.
6
-
7
- Command:
8
-
9
- ```bash
10
- ae-cli analysis alert-definition-schema get
11
- ```
12
-
13
- Capability id: `analysis.alert_definition_schema.get`
14
-
15
- Input sends No input. Do not send camelCase aliases.
16
-
17
- Output is the capability gateway envelope: success is `ok=true,data,meta`; failure is `ok=false,error`. Export commands return lifecycle data such as `run_id` and `artifact_id` for inspect/download.
18
-
19
- Parameters:
20
-
21
- | Parameter | Description | Required |
22
- | --- | --- | --- |
23
- | None | - | - |
24
-