@thinkingai/ae-cli 6.0.35 → 6.0.37
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 +216 -150
- package/README.zh.md +224 -159
- package/dist/{auth-UPGUOKTW.js → auth-56Z45UVR.js} +1 -1
- package/dist/{capability-TQ5KU5Q6.js → capability-2H6PAOA3.js} +1 -1
- package/dist/{capability-AJC5CBRT.js → capability-YPOQX6PL.js} +1 -1
- package/dist/{chunk-4Q5TNP4Q.js → chunk-J7MZHDHQ.js} +48 -24
- package/dist/chunk-KTYR3U6D.js +1012 -0
- package/dist/{chunk-6CHYBI64.js → chunk-LHVM35J4.js} +1 -1
- package/dist/{chunk-ISY6HMHM.js → chunk-PVBYJWC2.js} +1 -1
- package/dist/{config-PMPISN5Y.js → config-BSSALXEN.js} +1 -1
- package/dist/index.js +75 -18
- package/dist/{metadata-P5GIVMZ6.js → metadata-AN3YFZEV.js} +2 -2
- package/dist/{metadata-ELUAR3EJ.js → metadata-JIQ77HFY.js} +2 -2
- package/dist/{model-OYQLXCQY.js → model-JASQVOFD.js} +1 -1
- package/dist/{raw-TPB7KSZO.js → raw-XJCAT3HX.js} +1 -1
- package/dist/{sync-EFJKFZK2.js → sync-QFP4XFN3.js} +2 -2
- package/dist/{te-agent-BOQ7ZY56.js → te-agent-JHUG6DVV.js} +28 -1
- package/dist/{te-analysis-HZIP6SYW.js → te-analysis-IWQZO423.js} +213 -129
- package/dist/{te-analysis-ZT2MYAHL.js → te-analysis-X222IRYR.js} +213 -129
- package/dist/{te-dataops-VYN3IOKO.js → te-dataops-PZQ5NQLY.js} +1 -1
- package/dist/{te-dataops-Y5QAPPPF.js → te-dataops-XTWVTJCA.js} +1 -1
- package/dist/{te-engage-2FSDUOIZ.js → te-engage-E7F4HTXU.js} +87 -4
- package/dist/{te-engage-BMJ6UOUU.js → te-engage-NLZUPSBK.js} +87 -4
- package/dist/te-system-AH7DMCAQ.js +1706 -0
- package/dist/{te-team-PDKKW7Q5.js → te-team-BQ3SKSZV.js} +1 -1
- package/dist/update-DKG6UXEM.js +123 -0
- package/package.json +8 -3
- package/skills/ae-agent/SKILL.md +2 -2
- package/skills/ae-agent/references/create-automation.md +12 -0
- package/skills/ae-agent/references/update-automation.md +11 -3
- package/skills/ae-analysis/SKILL.md +1 -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_gateway_assets.md +6 -4
- 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 +10 -7
- 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/drilldown_user_events_export.md +5 -0
- package/skills/ae-analysis/references/drilldown_user_events_run.md +6 -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-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 +5 -5
- package/skills/ae-generate-tracking-code/references/autotrack-enum.md +4 -4
- package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +1 -1
- package/skills/ae-generate-tracking-code/references/debug-script.md +2 -2
- package/skills/ae-generate-tracking-code/references/logbus-config.md +1 -1
- package/skills/ae-generate-tracking-code/references/restful-call.md +1 -1
- package/skills/ae-generate-tracking-code/references/sdk-index.md +36 -36
- package/skills/ae-system/SKILL.md +357 -0
- package/dist/chunk-IMMGMU54.js +0 -674
- package/skills/ae-analysis/references/alert_definition_schema_get.md +0 -24
|
@@ -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.
|