@thinkingai/ae-cli 1.0.24 → 1.0.28
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 +17 -2
- package/README.zh.md +18 -2
- package/dist/auth-5NSDQFQB.js +454 -0
- package/dist/{auth-4OPL4YWG.js → auth-H2376DEF.js} +2 -2
- package/dist/chunk-AD5V3ZPJ.js +217 -0
- package/dist/chunk-CAQYQA4R.js +399 -0
- package/dist/{chunk-JJCRURTR.js → chunk-CLJF7MQA.js} +1 -1
- package/dist/chunk-GSJGPNKK.js +49 -0
- package/dist/chunk-IMBKVXKY.js +478 -0
- package/dist/chunk-KAEZTSXN.js +99 -0
- package/dist/{chunk-MZW6NOVS.js → chunk-LU7SXK4Q.js} +27 -8
- package/dist/chunk-OJDNO5QY.js +63 -0
- package/dist/{chunk-DC66L5AM.js → chunk-SRJIAOBN.js} +76 -91
- package/dist/{chunk-OVHL4JAC.js → chunk-WCHI7725.js} +44 -47
- package/dist/{client-TDH6MUWM.js → client-FCMK3XEK.js} +5 -3
- package/dist/config-64G36TJL.js +130 -0
- package/dist/index.js +50 -17
- package/dist/model-EZ6K7FXI.js +134 -0
- package/dist/{raw-EM7AP3RT.js → raw-VEF3D6UD.js} +11 -6
- package/dist/sync-NRODEVNH.js +385 -0
- package/dist/te-agent-7U7JLJKU.js +524 -0
- package/dist/{te-analysis-3KFSNUCJ.js → te-analysis-A2OSGHQ4.js} +136 -20
- package/dist/{te-audience-GMYJFCSC.js → te-audience-LI67PPGO.js} +5 -4
- package/dist/{te-common-YLERCMQI.js → te-common-35WVU3C5.js} +19 -8
- package/dist/{te-community-PYDN5A6B.js → te-community-LEAP6PWT.js} +4 -3
- package/dist/{te-dataops-ETWS5O3X.js → te-dataops-N2LGZBOX.js} +4 -3
- package/dist/{te-engage-ROJVZHDA.js → te-engage-H7C72Z46.js} +105 -49
- package/dist/{te-kb-VUNS2CC7.js → te-kb-I2OKTBAI.js} +225 -29
- package/dist/{te-meta-3EFWLM3A.js → te-meta-HBTIEDRO.js} +4 -3
- package/dist/te-team-EM5OWRQL.js +529 -0
- package/package.json +10 -2
- package/skills/ae-agent/SKILL.md +134 -0
- package/skills/ae-analysis/SKILL.md +1 -1
- package/skills/ae-analysis/references/drilldown_user_events.md +1 -1
- package/skills/ae-analysis/references/drilldown_users.md +2 -2
- package/skills/ae-analysis/references/list_clusters.md +4 -2
- package/skills/ae-analysis/references/query_adhoc.md +3 -2
- package/skills/ae-analysis/references/query_entity_details.md +1 -1
- package/skills/ae-analysis-global/SKILL.md +51 -0
- package/skills/ae-analysis-global/references/list_query_clusters.md +67 -0
- package/skills/ae-community/SKILL.md +2 -3
- package/skills/ae-dataops/SKILL.md +1 -2
- package/skills/ae-engage/SKILL.md +26 -2
- package/skills/ae-engage/references/add-approver.md +0 -1
- package/skills/ae-engage/references/add-channel.md +0 -1
- package/skills/ae-engage/references/approver-list.md +0 -1
- package/skills/ae-engage/references/build-task-save-guide.md +283 -0
- package/skills/ae-engage/references/cancel-query-by-request-id.md +0 -1
- package/skills/ae-engage/references/channel-detail.md +0 -1
- package/skills/ae-engage/references/channel-list.md +0 -1
- package/skills/ae-engage/references/config-channel-detail.md +0 -1
- package/skills/ae-engage/references/config-channel-list.md +0 -1
- package/skills/ae-engage/references/config-item-analysis-report.md +0 -1
- package/skills/ae-engage/references/config-item-detail.md +0 -1
- package/skills/ae-engage/references/config-item-list.md +0 -1
- package/skills/ae-engage/references/config-item-strategy-comparison.md +0 -1
- package/skills/ae-engage/references/config-item-trigger-report.md +0 -1
- package/skills/ae-engage/references/copy-config-template.md +0 -1
- package/skills/ae-engage/references/delete-channel.md +0 -1
- package/skills/ae-engage/references/delete-config-channel.md +0 -1
- package/skills/ae-engage/references/delete-config-item.md +0 -1
- package/skills/ae-engage/references/delete-flow.md +0 -1
- package/skills/ae-engage/references/flow-ab-split-node-report.md +0 -1
- package/skills/ae-engage/references/flow-detail.md +0 -1
- package/skills/ae-engage/references/flow-list.md +0 -1
- package/skills/ae-engage/references/flow-node-config-schema.md +0 -1
- package/skills/ae-engage/references/flow-node-detail-report.md +0 -1
- package/skills/ae-engage/references/flow-node-overview-report.md +0 -1
- package/skills/ae-engage/references/flow-process-report.md +0 -1
- package/skills/ae-engage/references/manage-flow.md +0 -1
- package/skills/ae-engage/references/manage-strategy.md +0 -1
- package/skills/ae-engage/references/manage-task.md +0 -1
- package/skills/ae-engage/references/modify-flow-base-info.md +0 -1
- package/skills/ae-engage/references/save-task.md +304 -0
- package/skills/ae-engage/references/strategy-detail.md +0 -1
- package/skills/ae-engage/references/strategy-list.md +0 -1
- package/skills/ae-engage/references/task-data-detail.md +0 -1
- package/skills/ae-engage/references/task-data-overview.md +0 -1
- package/skills/ae-engage/references/task-detail.md +0 -1
- package/skills/ae-engage/references/task-experiment-report.md +0 -1
- package/skills/ae-engage/references/task-list.md +0 -1
- package/skills/ae-engage/references/task-metric-detail.md +0 -1
- package/skills/ae-engage/references/task-stats.md +0 -1
- package/skills/ae-engage/references/update-channel-status.md +0 -1
- package/skills/ae-engage/references/update-config-channel-status.md +0 -1
- package/skills/ae-engage/references/validate-flow-node-config.md +0 -1
- package/skills/ae-engage/references/whitelist-list.md +0 -1
- package/skills/ae-kb/SKILL.md +284 -0
- package/skills/ae-team/SKILL.md +164 -0
- package/skills/ae-team/references/ai-generate.md +39 -0
- package/skills/ae-team/references/create.md +94 -0
- package/skills/ae-team/references/delete.md +39 -0
- package/skills/ae-team/references/list-projects.md +45 -0
- package/skills/ae-team/references/list-templates.md +38 -0
- package/skills/ae-team/references/list.md +39 -0
- package/skills/ae-team/references/run-artifacts.md +51 -0
- package/skills/ae-team/references/run-cancel.md +38 -0
- package/skills/ae-team/references/run-chat.md +57 -0
- package/skills/ae-team/references/run-reply.md +41 -0
- package/skills/ae-team/references/run-result.md +75 -0
- package/skills/ae-team/references/run-start.md +73 -0
- package/skills/ae-team/references/run-watch.md +82 -0
- package/skills/ae-team/references/update.md +47 -0
- package/dist/auth-PBPAZQWP.js +0 -168
- package/dist/chunk-47MTN54I.js +0 -285
- package/dist/config-5ELRYAIH.js +0 -257
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# team +list-templates (List Team Templates)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **Team management / discovery**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Browse built-in team templates provided by the platform.
|
|
9
|
+
- Each template includes a ready-to-use `config` that can be passed directly to `+create --config`.
|
|
10
|
+
- Supports locale-specific template names and descriptions.
|
|
11
|
+
|
|
12
|
+
## Mandatory Rules (MUST)
|
|
13
|
+
- Do not fabricate template names or configs. Always call this command first and present the real list to the user.
|
|
14
|
+
- `--locale` must be one of `zh`, `en`, `ja`, `ko` if provided.
|
|
15
|
+
|
|
16
|
+
## Command
|
|
17
|
+
```bash
|
|
18
|
+
ae-cli team +list-templates
|
|
19
|
+
ae-cli team +list-templates --locale en
|
|
20
|
+
ae-cli team +list-templates --locale zh --format table
|
|
21
|
+
ae-cli team +list-templates --dry-run
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Parameters
|
|
25
|
+
| Parameter | Required | Description |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `--locale` | No | `zh` (default) \| `en` \| `ja` \| `ko` |
|
|
28
|
+
|
|
29
|
+
## Decision Rules
|
|
30
|
+
- When the user says "show me team templates" or "I want to create a team from a template", call this command first.
|
|
31
|
+
- Extract the `config` field from the chosen template and pass it to `+create --config`.
|
|
32
|
+
- If the user asks for templates in a specific language, pass the corresponding `--locale`.
|
|
33
|
+
|
|
34
|
+
## Next Steps on Failure
|
|
35
|
+
- Empty list: the platform may not have templates configured for the current environment.
|
|
36
|
+
|
|
37
|
+
## Recommended Chaining
|
|
38
|
+
- `+list-templates` → user picks template → `+create --name "..." --config '<template.config>'`
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# team +list (List Teams)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **Team discovery**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- List all AI Agent teams visible to the current user.
|
|
9
|
+
- Returns an array of team summaries; key fields include `id`, `name`, `description`, `scope`, `enabled`, `config`.
|
|
10
|
+
- Use this as the first step before any run or update operation to confirm the target `team_id`.
|
|
11
|
+
|
|
12
|
+
## Mandatory Rules (MUST)
|
|
13
|
+
- Do not guess team IDs. Always call `+list` first to discover real team IDs.
|
|
14
|
+
- If the user references a team by name, match the name against the returned list before proceeding.
|
|
15
|
+
|
|
16
|
+
## Command
|
|
17
|
+
```bash
|
|
18
|
+
ae-cli team +list
|
|
19
|
+
ae-cli team +list --format table
|
|
20
|
+
ae-cli team +list --dry-run
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
| Parameter | Required | Description |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| None | — | No parameters required |
|
|
27
|
+
|
|
28
|
+
## Decision Rules
|
|
29
|
+
- When the user says "show me the teams", "what teams do I have", or needs a `team_id` for a subsequent command and none is in context, call this first.
|
|
30
|
+
- If many teams are returned, summarize by `id`, `name`, `scope`, and `enabled` to help the user pick the right one.
|
|
31
|
+
- Once a team is confirmed in the current conversation, reuse its ID without calling `+list` again unless the user switches teams.
|
|
32
|
+
|
|
33
|
+
## Next Steps on Failure
|
|
34
|
+
- Empty result: confirm account permissions and host environment.
|
|
35
|
+
- Auth error: run `ae-cli auth login`.
|
|
36
|
+
|
|
37
|
+
## Recommended Chaining
|
|
38
|
+
- `+list` → user confirms `team_id` → `+run-start` or `+run-chat`
|
|
39
|
+
- `+list` → `+update` or `+delete`
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# team +run-artifacts (List TeamRun Artifacts)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **TeamRun execution / read**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- List all artifacts (output files, reports, documents) produced by a completed TeamRun.
|
|
9
|
+
- By default, returns metadata only (no content). Use `--include-content true` to fetch full artifact content.
|
|
10
|
+
- Supports filtering by artifact type.
|
|
11
|
+
|
|
12
|
+
## Mandatory Rules (MUST)
|
|
13
|
+
- `--id` is required. Obtain the real run ID from a previous `+run-start` or `+run-chat` response — do not guess.
|
|
14
|
+
- Only call this command after `+run-result` confirms `status = completed`. Artifacts may be incomplete for non-terminal runs.
|
|
15
|
+
|
|
16
|
+
## Command
|
|
17
|
+
```bash
|
|
18
|
+
# List artifact metadata (no content)
|
|
19
|
+
ae-cli team +run-artifacts --id <run_id>
|
|
20
|
+
|
|
21
|
+
# Include full content
|
|
22
|
+
ae-cli team +run-artifacts --id <run_id> --include-content true
|
|
23
|
+
|
|
24
|
+
# Filter by type
|
|
25
|
+
ae-cli team +run-artifacts --id <run_id> --artifact-type report
|
|
26
|
+
|
|
27
|
+
# Combine
|
|
28
|
+
ae-cli team +run-artifacts --id <run_id> --artifact-type markdown --include-content true
|
|
29
|
+
|
|
30
|
+
ae-cli team +run-artifacts --dry-run --id <run_id>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Parameters
|
|
34
|
+
| Parameter | Required | Description |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `--id` | Yes | TeamRun ID |
|
|
37
|
+
| `--artifact-type` | No | Filter by artifact type (e.g. `report`, `markdown`, `xlsx`) |
|
|
38
|
+
| `--include-content` | No | `true` to include full artifact content (default: `false`) |
|
|
39
|
+
|
|
40
|
+
## Decision Rules
|
|
41
|
+
- First call without `--include-content` to get the list and sizes. Then decide whether to fetch content.
|
|
42
|
+
- Use `--include-content true` only when the user explicitly wants the artifact body (e.g. to display a report, extract data, or forward the content).
|
|
43
|
+
- If the run has not yet completed, call `+run-result` first and wait for terminal status.
|
|
44
|
+
|
|
45
|
+
## Next Steps on Failure
|
|
46
|
+
- `404`: run ID not found — verify from the original start response.
|
|
47
|
+
- Empty list: the run completed but produced no artifacts; inspect `+run-result` output for any inline results.
|
|
48
|
+
|
|
49
|
+
## Recommended Chaining
|
|
50
|
+
- `+run-result` (confirm `completed`) → `+run-artifacts`
|
|
51
|
+
- `+run-artifacts` → user reviews metadata → `+run-artifacts --include-content true` (fetch content for specific artifact)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# team +run-cancel (Cancel TeamRun)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **TeamRun execution / write**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Cancel a TeamRun that is in `pending`, `running`, or `waiting_user` state.
|
|
9
|
+
- After cancellation, the run transitions to `cancelled` (a terminal status).
|
|
10
|
+
|
|
11
|
+
## Mandatory Rules (MUST)
|
|
12
|
+
- `--id` is required. Obtain the real run ID from a previous `+run-start` or `+run-chat` response — do not guess.
|
|
13
|
+
- Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
|
|
14
|
+
- Cancellation is irreversible. To re-run the same task, call `+run-start` again.
|
|
15
|
+
|
|
16
|
+
## Command
|
|
17
|
+
```bash
|
|
18
|
+
ae-cli team +run-cancel --id <run_id>
|
|
19
|
+
ae-cli team +run-cancel --id <run_id> --yes
|
|
20
|
+
ae-cli team +run-cancel --dry-run --id <run_id>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
| Parameter | Required | Description |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `--id` | Yes | TeamRun ID |
|
|
27
|
+
|
|
28
|
+
## Decision Rules
|
|
29
|
+
- Before cancelling, verify the run status with `+run-result` to confirm it is not already in a terminal state (`completed`, `failed`, `cancelled`).
|
|
30
|
+
- If the user wants to delete a team that has active runs, cancel all active runs first, then call `+delete`.
|
|
31
|
+
|
|
32
|
+
## Next Steps on Failure
|
|
33
|
+
- `404`: run ID not found — verify the run ID from the original start response.
|
|
34
|
+
- Already terminal: the run has already completed, failed, or been cancelled — no action needed.
|
|
35
|
+
|
|
36
|
+
## Recommended Chaining
|
|
37
|
+
- `+run-result` (verify status) → `+run-cancel --yes`
|
|
38
|
+
- `+run-cancel` (clear active runs) → `+delete` (team)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# team +run-chat (Chat with Team)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **TeamRun execution / write**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Send a message to a team in a multi-turn conversational session.
|
|
9
|
+
- If the current session has a run in `waiting_user` state, the platform automatically resumes it.
|
|
10
|
+
- Returns the session object (including `session.id`) and the new run object (including `run.id` and `status`).
|
|
11
|
+
|
|
12
|
+
## Mandatory Rules (MUST)
|
|
13
|
+
- `--team-id` is required. Obtain the real team ID via `+list` — do not guess.
|
|
14
|
+
- `--input` is required. Pass the user's message verbatim.
|
|
15
|
+
- To continue an existing session, pass `--session-id` with the `session.id` from the previous turn.
|
|
16
|
+
- Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
|
|
17
|
+
- After each turn, capture `session.id` and `run.id` for subsequent turns or replies.
|
|
18
|
+
|
|
19
|
+
## Command
|
|
20
|
+
```bash
|
|
21
|
+
# First turn (starts a new session)
|
|
22
|
+
ae-cli team +run-chat --team-id <team_id> --input "帮我分析最近的DAU趋势" --yes
|
|
23
|
+
|
|
24
|
+
# Continue the same session
|
|
25
|
+
ae-cli team +run-chat --team-id <team_id> --session-id <session_id> --input "继续上次的分析" --yes
|
|
26
|
+
|
|
27
|
+
ae-cli team +run-chat --dry-run --team-id <team_id> --input "test"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Parameters
|
|
31
|
+
| Parameter | Required | Description |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `--team-id` | Yes | Team ID |
|
|
34
|
+
| `--input` | Yes | User message |
|
|
35
|
+
| `--session-id` | No | Existing session ID for multi-turn continuation |
|
|
36
|
+
|
|
37
|
+
## Decision Rules
|
|
38
|
+
- Use `+run-chat` when the task requires interactive back-and-forth (e.g. the team may ask clarifying questions).
|
|
39
|
+
- Use `+run-start` instead for fully automated, single-shot tasks.
|
|
40
|
+
- Always persist `session.id` from the response and pass it on subsequent turns with `--session-id`.
|
|
41
|
+
- If a run enters `waiting_user` state, use `+run-reply` (not another `+run-chat`) to respond.
|
|
42
|
+
|
|
43
|
+
## Waiting User Flow
|
|
44
|
+
```
|
|
45
|
+
+run-chat → run.status = waiting_user
|
|
46
|
+
→ +run-reply --id <run_id> --input "..." --yes
|
|
47
|
+
→ poll +run-result until terminal
|
|
48
|
+
→ optionally continue with +run-chat --session-id <session_id>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Next Steps on Failure
|
|
52
|
+
- `404` team not found: re-run `+list` to verify the team ID.
|
|
53
|
+
- Session state confusion: if unsure of current session state, call `+run-result --id <run_id>` to check status.
|
|
54
|
+
|
|
55
|
+
## Recommended Chaining
|
|
56
|
+
- `+list` → `+run-chat` → `+run-reply` (if waiting_user) → `+run-result` → `+run-artifacts`
|
|
57
|
+
- `+run-chat` (turn 1) → capture `session.id` → `+run-chat --session-id ...` (turn 2+)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# team +run-reply (Reply to Waiting TeamRun)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **TeamRun execution / write**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Provide a user reply to a TeamRun that is paused in `waiting_user` state.
|
|
9
|
+
- After reply, the run resumes execution automatically.
|
|
10
|
+
|
|
11
|
+
## Mandatory Rules (MUST)
|
|
12
|
+
- `--id` is required. The run **must be in `waiting_user` state** — sending a reply to a run in any other state will fail.
|
|
13
|
+
- `--input` is required (1–50000 chars). Pass the user's reply verbatim.
|
|
14
|
+
- Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
|
|
15
|
+
- After replying, poll `+run-result` until the run reaches a terminal status.
|
|
16
|
+
|
|
17
|
+
## Command
|
|
18
|
+
```bash
|
|
19
|
+
ae-cli team +run-reply --id <run_id> --input "请继续,使用方案A" --yes
|
|
20
|
+
ae-cli team +run-reply --id <run_id> --input "好的,请重点分析周末下降原因" --yes
|
|
21
|
+
ae-cli team +run-reply --dry-run --id <run_id> --input "test"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Parameters
|
|
25
|
+
| Parameter | Required | Description |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `--id` | Yes | TeamRun ID (must be in `waiting_user` state) |
|
|
28
|
+
| `--input` | Yes | User reply content (1–50000 chars) |
|
|
29
|
+
|
|
30
|
+
## Decision Rules
|
|
31
|
+
- Before calling `+run-reply`, always verify the run is in `waiting_user` state via `+run-result`.
|
|
32
|
+
- If the run is in `running` state (not yet paused), wait and poll again — do not send a reply prematurely.
|
|
33
|
+
- If the run is in a terminal state, it cannot be replied to — start a new run if needed.
|
|
34
|
+
|
|
35
|
+
## Next Steps on Failure
|
|
36
|
+
- `400` / wrong state: check the run status with `+run-result` first.
|
|
37
|
+
- `404`: run ID not found — verify from the original start response.
|
|
38
|
+
|
|
39
|
+
## Recommended Chaining
|
|
40
|
+
- `+run-result` (confirm `waiting_user`) → `+run-reply` → poll `+run-result` → `+run-artifacts`
|
|
41
|
+
- In chat mode: `+run-chat` → status `waiting_user` → `+run-reply` → `+run-chat` (next turn)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# team +run-result (Get TeamRun Result)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **TeamRun execution / read**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Retrieve the full result of a TeamRun, including all steps, events, status, and output.
|
|
9
|
+
- The primary command for polling run progress after `+run-start` or `+run-chat`.
|
|
10
|
+
- Returns the run object with `status`, `output`, `steps`, and `error` (if failed).
|
|
11
|
+
|
|
12
|
+
## Mandatory Rules (MUST)
|
|
13
|
+
- `--id` is required. Obtain the real run ID from a previous `+run-start` or `+run-chat` response — do not guess.
|
|
14
|
+
- Poll this command repeatedly until `status` reaches a terminal value: `completed`, `failed`, or `cancelled`.
|
|
15
|
+
- Do not call `+run-artifacts` until status is `completed`.
|
|
16
|
+
|
|
17
|
+
## Command
|
|
18
|
+
```bash
|
|
19
|
+
ae-cli team +run-result --id <run_id>
|
|
20
|
+
ae-cli team +run-result --id <run_id> --jq '.status'
|
|
21
|
+
ae-cli team +run-result --dry-run --id <run_id>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Parameters
|
|
25
|
+
| Parameter | Required | Description |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `--id` | Yes | TeamRun ID |
|
|
28
|
+
|
|
29
|
+
## Key Response Fields
|
|
30
|
+
|
|
31
|
+
| Field | Type | Description |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `status` | string | Current run status |
|
|
34
|
+
| `output` | string \| null | Final output (populated when `completed`) |
|
|
35
|
+
| `pendingQuestion` | string \| null | The question the team is asking the user; only populated when `status = waiting_user` |
|
|
36
|
+
| `error` | object \| null | Error details when `status = failed` |
|
|
37
|
+
| `steps` | array | All execution steps and events |
|
|
38
|
+
|
|
39
|
+
## Status Transitions
|
|
40
|
+
```
|
|
41
|
+
pending → running → completed
|
|
42
|
+
→ waiting_user → (reply) → running → completed
|
|
43
|
+
→ failed
|
|
44
|
+
→ cancelled
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Terminal statuses (stop polling): `completed`, `failed`, `cancelled`
|
|
48
|
+
|
|
49
|
+
Non-terminal statuses (keep polling): `pending`, `running`, `waiting_approval`, `paused`
|
|
50
|
+
|
|
51
|
+
Interrupt statuses (stop polling, get user input): `waiting_user`
|
|
52
|
+
|
|
53
|
+
## Decision Rules
|
|
54
|
+
- Check `status` field on each poll. Continue until terminal.
|
|
55
|
+
- If `status = waiting_user`: read `pendingQuestion`, present it to the user, collect the answer, then call `+run-reply --id <run_id> --input "<user_answer>"`. Resume polling after reply.
|
|
56
|
+
- If `status = failed`, inspect the `error` field to diagnose the issue.
|
|
57
|
+
- If `status = completed`, proceed to `+run-artifacts` to retrieve produced files/outputs.
|
|
58
|
+
- Use `--jq '{status,pendingQuestion}'` when polling to get both status and the pending question in one call.
|
|
59
|
+
|
|
60
|
+
## Polling Best Practice
|
|
61
|
+
```bash
|
|
62
|
+
# Lightweight status + pendingQuestion check
|
|
63
|
+
ae-cli team +run-result --id <run_id> --jq '{status,pendingQuestion}'
|
|
64
|
+
|
|
65
|
+
# Full result when completed
|
|
66
|
+
ae-cli team +run-result --id <run_id>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Next Steps on Failure
|
|
70
|
+
- `404`: run ID not found — verify from the original start response.
|
|
71
|
+
- `status = failed`: report the `error.message` to the user and ask whether to retry with `+run-start`.
|
|
72
|
+
|
|
73
|
+
## Recommended Chaining
|
|
74
|
+
- `+run-start` or `+run-chat` → poll `+run-result` → terminal → `+run-artifacts`
|
|
75
|
+
- `+run-result` → `waiting_user` → `+run-reply` → continue polling `+run-result`
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# team +run-start (Start TeamRun)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **TeamRun execution / write**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Start a new TeamRun for a given team with a task input.
|
|
9
|
+
- Returns the newly created run object including its `id` and initial `status`.
|
|
10
|
+
- Used for one-shot task execution. For multi-turn interactive sessions, use `+run-chat` instead.
|
|
11
|
+
|
|
12
|
+
## Mandatory Rules (MUST)
|
|
13
|
+
- `--team-id` is required. Obtain the real team ID via `+list` — do not guess.
|
|
14
|
+
- `--input` is required (1–50000 chars). Pass the user's task description verbatim; do not truncate.
|
|
15
|
+
- JSON array flags (`--project-ids`, `--project-names`, `--space-ids`, etc.) must be valid JSON arrays, e.g. `'["id1","id2"]'`.
|
|
16
|
+
- `--notification` must be valid JSON if provided, e.g. `'{"channels":["feishu"],"feishuChatId":"..."}'`.
|
|
17
|
+
- Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
|
|
18
|
+
- After starting, capture the returned `id` (run ID) and use it to poll `+run-result`.
|
|
19
|
+
|
|
20
|
+
## Command
|
|
21
|
+
```bash
|
|
22
|
+
ae-cli team +run-start --team-id <team_id> --input "分析上周用户留存情况,生成报告" --yes
|
|
23
|
+
|
|
24
|
+
ae-cli team +run-start \
|
|
25
|
+
--team-id <team_id> \
|
|
26
|
+
--input "分析本月DAU趋势" \
|
|
27
|
+
--notification '{"channels":["feishu"],"feishuChatId":"oc_xxx"}' \
|
|
28
|
+
--save-to-kb-id <kb_id> \
|
|
29
|
+
--yes
|
|
30
|
+
|
|
31
|
+
ae-cli team +run-start --dry-run --team-id <team_id> --input "test"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Parameters
|
|
35
|
+
| Parameter | Required | Description |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `--team-id` | Yes | Team ID |
|
|
38
|
+
| `--input` | Yes | Task input text (1–50000 chars) |
|
|
39
|
+
| `--conversation-id` | No | Associated conversation ID |
|
|
40
|
+
| `--notification` | No | Notification config JSON `{"channels":["feishu"\|"lark"\|"slack"],...}` |
|
|
41
|
+
| `--save-to-kb-id` | No | Knowledge base ID to save result to on completion |
|
|
42
|
+
| `--project-ids` | No | Associated project ID list JSON, e.g. `["id1"]` |
|
|
43
|
+
| `--project-names` | No | Associated project name list JSON |
|
|
44
|
+
| `--space-ids` | No | Associated space ID list JSON |
|
|
45
|
+
| `--space-names` | No | Associated space name list JSON |
|
|
46
|
+
| `--dw-space-codes` | No | Associated DW space code list JSON |
|
|
47
|
+
| `--dw-space-names` | No | Associated DW space name list JSON |
|
|
48
|
+
|
|
49
|
+
## Decision Rules
|
|
50
|
+
- Use `+run-start` for single-shot automation tasks where no interactive back-and-forth is needed.
|
|
51
|
+
- Use `+run-chat` instead when the user wants multi-turn conversation with the team.
|
|
52
|
+
- After receiving the run `id`, immediately start polling `+run-result` until status is `completed`, `failed`, or `cancelled`.
|
|
53
|
+
- If the run reaches `waiting_user`, use `+run-reply` to continue.
|
|
54
|
+
|
|
55
|
+
## Watching for Completion
|
|
56
|
+
```bash
|
|
57
|
+
# Preferred: stream via SSE (blocks until done, no polling needed)
|
|
58
|
+
ae-cli team +run-watch --id <run_id>
|
|
59
|
+
# exit 0 → completed/partial_success
|
|
60
|
+
# exit 1 → failed/cancelled/stale
|
|
61
|
+
# exit 2 → waiting_user: read pendingQuestion from stdout, reply, re-watch
|
|
62
|
+
ae-cli team +run-reply --id <run_id> --input "<user_answer>" --yes
|
|
63
|
+
ae-cli team +run-watch --id <run_id>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Next Steps on Failure
|
|
67
|
+
- `404` team not found: re-run `+list` to verify the team ID.
|
|
68
|
+
- `400` validation: check `--input` length and JSON flag formats.
|
|
69
|
+
- Run reaches `failed` status: inspect the `error` field in `+run-result` output.
|
|
70
|
+
|
|
71
|
+
## Recommended Chaining
|
|
72
|
+
- `+list` → `+run-start` → poll `+run-result` → `+run-artifacts`
|
|
73
|
+
- `+run-start` → status `waiting_user` → `+run-reply` → poll `+run-result`
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# team +run-watch (Stream TeamRun via SSE)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **TeamRun execution / read**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Stream real-time progress of a TeamRun without polling.
|
|
9
|
+
- Blocks until the run reaches a terminal state or `waiting_user`.
|
|
10
|
+
- Preferred over `+run-result` polling for all automated workflows.
|
|
11
|
+
|
|
12
|
+
## Mandatory Rules (MUST)
|
|
13
|
+
- `--id` is required. Obtain the real run ID from a previous `+run-start` or `+run-chat` response.
|
|
14
|
+
- Check the **exit code** to determine what happened — do not guess from output alone.
|
|
15
|
+
- When exit code is `2` (`waiting_user`): read `pendingQuestion` from stdout, present it to the user, collect their answer, call `+run-reply`, then re-run `+run-watch`.
|
|
16
|
+
- Network drops are handled automatically (up to 10 reconnects with 2s delay). Do NOT retry `+run-watch` on exit 1 unless you have confirmed the run itself failed via `+run-result`.
|
|
17
|
+
|
|
18
|
+
## Command
|
|
19
|
+
```bash
|
|
20
|
+
ae-cli team +run-watch --id <run_id>
|
|
21
|
+
|
|
22
|
+
# Suppress stderr log/status noise (stdout JSON is unaffected)
|
|
23
|
+
ae-cli team +run-watch --id <run_id> --quiet
|
|
24
|
+
|
|
25
|
+
# Reconnect after drop, skip logs already seen
|
|
26
|
+
ae-cli team +run-watch --id <run_id> --after-log <lastTimestamp>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Parameters
|
|
30
|
+
| Parameter | Required | Description |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| `--id` | Yes | TeamRun ID |
|
|
33
|
+
| `--after-log` | No | Reconnect: skip log events at or before this timestamp |
|
|
34
|
+
| `--quiet` | No | Suppress log and status lines on stderr; stdout JSON is always emitted |
|
|
35
|
+
|
|
36
|
+
## Exit Codes
|
|
37
|
+
| Code | Meaning | Action |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| `0` | `completed` or `partial_success` | Proceed to `+run-artifacts` |
|
|
40
|
+
| `1` | `failed`, `cancelled`, `stale`, or connection error | Inspect `errorMessage` in stdout JSON; report to user |
|
|
41
|
+
| `2` | `waiting_user` | Read `pendingQuestion` from stdout JSON, present to user, then `+run-reply` → re-run `+run-watch` |
|
|
42
|
+
|
|
43
|
+
## Output
|
|
44
|
+
stdout always receives the final `TeamRunEntity` as a standard JSON envelope:
|
|
45
|
+
```json
|
|
46
|
+
{ "ok": true, "data": { "id": "...", "status": "...", "pendingQuestion": "...", ... } }
|
|
47
|
+
```
|
|
48
|
+
- Exit 0/1: the entity from the `final` SSE event (terminal state)
|
|
49
|
+
- Exit 2: the entity from the `update` SSE event at the moment `waiting_user` was detected
|
|
50
|
+
|
|
51
|
+
stderr receives real-time log lines and status changes (suppressed with `--quiet`).
|
|
52
|
+
|
|
53
|
+
## Handling waiting_user
|
|
54
|
+
```bash
|
|
55
|
+
# 1. Watch the run
|
|
56
|
+
ae-cli team +run-watch --id <run_id>
|
|
57
|
+
# exit code 2 → waiting_user
|
|
58
|
+
|
|
59
|
+
# 2. Read pendingQuestion from stdout, present to user, collect answer
|
|
60
|
+
# 3. Submit the reply
|
|
61
|
+
ae-cli team +run-reply --id <run_id> --input "<user_answer>" --yes
|
|
62
|
+
|
|
63
|
+
# 4. Resume watching
|
|
64
|
+
ae-cli team +run-watch --id <run_id>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## SSE Events (reference)
|
|
68
|
+
| Event | Frequency | Payload |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| `snapshot` | Once on connect | `TeamRunEntity` |
|
|
71
|
+
| `update` | Every 500ms when changed | `TeamRunEntity` |
|
|
72
|
+
| `final` | On terminal state, then closes | `TeamRunEntity` |
|
|
73
|
+
| `log` | Real-time (with history replay) | `{ timestamp, stepId, type, content }` |
|
|
74
|
+
| `error` | On auth/read failure | `{ error: string }` |
|
|
75
|
+
|
|
76
|
+
## Next Steps on Failure
|
|
77
|
+
- Exit 1 + `status = failed`: read `errorMessage` in the JSON output; ask user whether to retry with `+run-start`.
|
|
78
|
+
- Connection drop before `final`: re-run `+run-watch --id <run_id> --after-log <lastTimestamp>`.
|
|
79
|
+
|
|
80
|
+
## Recommended Chaining
|
|
81
|
+
- `+run-start` → `+run-watch` → exit 0 → `+run-artifacts`
|
|
82
|
+
- `+run-watch` → exit 2 → `+run-reply` → `+run-watch`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# team +update (Update Team)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **Team management / write**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Partially update an existing team (PATCH semantics — only the fields you pass are changed).
|
|
9
|
+
- Common uses: rename a team, update its config, disable/enable it, change scope.
|
|
10
|
+
|
|
11
|
+
## Mandatory Rules (MUST)
|
|
12
|
+
- `--id` is required. Obtain the real team ID via `+list` — do not guess.
|
|
13
|
+
- At least one optional field must be provided in addition to `--id`.
|
|
14
|
+
- `--config` replaces the entire TeamConfig; provide the complete new config, not a partial patch.
|
|
15
|
+
- `--scope` must be `personal` or `company` if provided.
|
|
16
|
+
- Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
|
|
17
|
+
|
|
18
|
+
## Command
|
|
19
|
+
```bash
|
|
20
|
+
ae-cli team +update --id <team_id> --name "新名称"
|
|
21
|
+
ae-cli team +update --id <team_id> --enabled false
|
|
22
|
+
ae-cli team +update --id <team_id> --config '<full_new_config_json>' --yes
|
|
23
|
+
ae-cli team +update --dry-run --id <team_id> --name "Test"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Parameters
|
|
27
|
+
| Parameter | Required | Description |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `--id` | Yes | Team ID |
|
|
30
|
+
| `--name` | No | New team name |
|
|
31
|
+
| `--config` | No | New complete TeamConfig JSON |
|
|
32
|
+
| `--description` | No | New description |
|
|
33
|
+
| `--scope` | No | `personal` \| `company` |
|
|
34
|
+
| `--enabled` | No | `true` \| `false` |
|
|
35
|
+
|
|
36
|
+
## Decision Rules
|
|
37
|
+
- If the user wants to modify only the name or description, pass only those flags — the server keeps all other fields unchanged.
|
|
38
|
+
- If the user wants to update the config, first call `+list` with `--jq` to extract the current config, modify it, then pass the updated config to `+update`.
|
|
39
|
+
- `--enabled false` disables the team without deleting it.
|
|
40
|
+
|
|
41
|
+
## Next Steps on Failure
|
|
42
|
+
- `404`: team ID not found — re-run `+list` to verify.
|
|
43
|
+
- `409`: there may be active runs; wait for them to complete or cancel them with `+run-cancel` first.
|
|
44
|
+
|
|
45
|
+
## Recommended Chaining
|
|
46
|
+
- `+list` → confirm `id` → `+update`
|
|
47
|
+
- `+update --enabled false` → `+delete` (when ready to delete)
|