@thinkingai/ae-cli 1.0.22 → 1.0.27

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 (56) hide show
  1. package/README.md +39 -1
  2. package/README.zh.md +40 -1
  3. package/dist/{auth-YM7OI23X.js → auth-TXFJHPXU.js} +3 -2
  4. package/dist/{auth-5S7SPPEJ.js → auth-W2JZ3DKA.js} +11 -4
  5. package/dist/{chunk-MPFTXJFG.js → chunk-2NGWYMLB.js} +14 -2
  6. package/dist/chunk-6T7245YE.js +478 -0
  7. package/dist/{chunk-KM57HI5B.js → chunk-B4UL2VIJ.js} +7 -1
  8. package/dist/{chunk-TMMUBSKW.js → chunk-BI5ZVD6T.js} +8 -1
  9. package/dist/chunk-MNHE6SSI.js +79 -0
  10. package/dist/chunk-MWWYGZ76.js +130 -0
  11. package/dist/{chunk-24ZKQWG2.js → chunk-SRRUNQIM.js} +51 -4
  12. package/dist/chunk-TG64AQV4.js +262 -0
  13. package/dist/{chunk-NBFTPIAH.js → chunk-VT6VC4PA.js} +15 -4
  14. package/dist/{client-7S23DVHH.js → client-IU2E5IOL.js} +6 -3
  15. package/dist/{config-RVUESJRF.js → config-WH3R3IRY.js} +3 -2
  16. package/dist/index.js +195 -20
  17. package/dist/model-CC7U5XOJ.js +131 -0
  18. package/dist/{raw-5SYAUCJQ.js → raw-TUHZQ4UB.js} +5 -4
  19. package/dist/sync-EVEDS7YE.js +383 -0
  20. package/dist/te-agent-FLTDYV3L.js +522 -0
  21. package/dist/{te-analysis-RQST6AT3.js → te-analysis-CMXADIJM.js} +101 -12
  22. package/dist/{te-audience-TJ74UJI3.js → te-audience-LPZFFSXM.js} +4 -3
  23. package/dist/{te-common-W5URM2SH.js → te-common-BXQFKTB3.js} +4 -3
  24. package/dist/{te-community-YRV2VAD4.js → te-community-K5S3VOZY.js} +4 -3
  25. package/dist/{te-dataops-ZPH72BCK.js → te-dataops-567IMCQG.js} +4 -3
  26. package/dist/{te-engage-57UKFV74.js → te-engage-TBUTGW5F.js} +105 -49
  27. package/dist/{te-kb-GD7SJRYB.js → te-kb-XHVBWP5E.js} +227 -38
  28. package/dist/{te-meta-25SLZFXJ.js → te-meta-NQ4U3VJW.js} +25 -4
  29. package/dist/te-team-556APRIU.js +529 -0
  30. package/package.json +6 -1
  31. package/skills/ae-agent/SKILL.md +133 -0
  32. package/skills/ae-analysis/references/create_entity.md +39 -0
  33. package/skills/ae-analysis/references/create_space.md +34 -0
  34. package/skills/ae-analysis/references/drilldown_user_events.md +1 -1
  35. package/skills/ae-analysis/references/drilldown_users.md +2 -2
  36. package/skills/ae-analysis/references/query_adhoc.md +3 -2
  37. package/skills/ae-analysis/references/query_entity_details.md +1 -1
  38. package/skills/ae-engage/SKILL.md +25 -2
  39. package/skills/ae-engage/references/build-task-save-guide.md +283 -0
  40. package/skills/ae-engage/references/save-task.md +304 -0
  41. package/skills/ae-kb/SKILL.md +283 -0
  42. package/skills/ae-team/SKILL.md +164 -0
  43. package/skills/ae-team/references/ai-generate.md +39 -0
  44. package/skills/ae-team/references/create.md +94 -0
  45. package/skills/ae-team/references/delete.md +39 -0
  46. package/skills/ae-team/references/list-projects.md +45 -0
  47. package/skills/ae-team/references/list-templates.md +38 -0
  48. package/skills/ae-team/references/list.md +39 -0
  49. package/skills/ae-team/references/run-artifacts.md +51 -0
  50. package/skills/ae-team/references/run-cancel.md +38 -0
  51. package/skills/ae-team/references/run-chat.md +57 -0
  52. package/skills/ae-team/references/run-reply.md +41 -0
  53. package/skills/ae-team/references/run-result.md +75 -0
  54. package/skills/ae-team/references/run-start.md +73 -0
  55. package/skills/ae-team/references/run-watch.md +82 -0
  56. package/skills/ae-team/references/update.md +47 -0
@@ -0,0 +1,164 @@
1
+ ---
2
+ name: ae-team
3
+ version: 1.0.0
4
+ description: "AE/TE/ThinkingEngine/ThinkingAI ae-cli manual for AI Agent Team tasks: managing teams (list, create, update, delete, AI-generate, templates) and executing TeamRuns (start, chat, cancel, reply, result, artifacts). Use when the user asks to find a team, run a team task, check run status, retrieve results or artifacts, or set up multi-agent workflows. Must use ae-cli, read the matching references/<command>.md before composing commands, and never guess team IDs, run IDs, config structures, or parameter formats."
5
+ ---
6
+
7
+ # ae-team
8
+
9
+ > **CRITICAL — Before running any `+<command>` command, you MUST first read the corresponding `references/<command>.md`.** The reference filename equals the command name without the leading `+`, for example `+run-start` → `references/run-start.md`.
10
+ > **CRITICAL — Never guess team IDs, run IDs, or config JSON structures.** Always use `+list` or `+list-templates` to discover real resources first.
11
+ > **CRITICAL — For the core Agent workflow (find → start → poll → artifacts), follow Workflow A in the Typical Workflows section below.**
12
+
13
+ ## Global AE CLI Rules
14
+
15
+ AE CLI (`ae-cli`) is the command-line tool for the AE / TE / ThinkingEngine analysis platform.
16
+
17
+ Global parameters:
18
+
19
+ | Parameter | Description |
20
+ |---|---|
21
+ | `--format <json\|table>` | Output format. Default is JSON. |
22
+ | `--jq <expr>` | jq filter expression for JSON output. |
23
+ | `--host <url>` | Override active AE host URL. |
24
+ | `--yes` | Skip confirmation for write operations. |
25
+ | `--dry-run` | Show request details without executing. |
26
+
27
+ Output and errors:
28
+ - Successful commands return machine-readable JSON by default.
29
+ - Failed commands return `{ "ok": false, "error": { "type": "...", "message": "...", "hint": "..." } }` and exit non-zero.
30
+
31
+ Safety constraints:
32
+ - Read commands (`+list`, `+list-templates`, `+list-projects`, `+run-result`, `+run-artifacts`, `+ai-generate`) can execute directly once required IDs are known.
33
+ - Write commands require explicit user intent and keep the confirmation prompt by default. Pass `--yes` only in fully automated pipelines.
34
+ - Never invent team IDs, run IDs, `agentId` values, `mcpServerIds`, `skillIds`, `knowledgeBaseIds`, project IDs, or any resource identifiers. Discover them with list commands or accept them from the user.
35
+
36
+ ## When to Use
37
+
38
+ Use `ae-team` for all AI Agent Team work:
39
+
40
+ - **Team management**: list available teams, create/update/delete a team, generate a team config draft with AI, browse templates.
41
+ - **TeamRun execution**: start a run, interact in chat mode, cancel a run, reply to a waiting run, poll result until completion, retrieve artifacts.
42
+
43
+ If the user's intent is data analysis, audience management, metadata governance, or DataOps, switch to `ae-analysis` / `ae-dataops` / `ae-engage`.
44
+
45
+ ## Command Format
46
+
47
+ ```bash
48
+ ae-cli team +<command> [options]
49
+ ```
50
+
51
+ All commands live under the `team` service. Quick help:
52
+
53
+ ```bash
54
+ ae-cli team --help
55
+ ae-cli team +list --help
56
+ ae-cli team +run-start --help
57
+ ```
58
+
59
+ ## Tool Groups (13)
60
+
61
+ ### Team Management (7)
62
+
63
+ - `+list` ([doc](references/list.md)) — list all visible teams
64
+ - `+create` ([doc](references/create.md)) — create a new team with a TeamConfig
65
+ - `+update` ([doc](references/update.md)) — patch one or more fields of an existing team
66
+ - `+delete` ([doc](references/delete.md)) — delete a team (409 if runs are active)
67
+ - `+ai-generate` ([doc](references/ai-generate.md)) — AI-generate a team config draft from a goal description
68
+ - `+list-templates` ([doc](references/list-templates.md)) — browse built-in team templates
69
+ - `+list-projects` ([doc](references/list-projects.md)) — list projects available to the current user
70
+
71
+ ### TeamRun Execution (7)
72
+
73
+ - `+run-start` ([doc](references/run-start.md)) — start a new TeamRun
74
+ - `+run-watch` ([doc](references/run-watch.md)) — stream a TeamRun via SSE (preferred over polling)
75
+ - `+run-chat` ([doc](references/run-chat.md)) — chat with a team (multi-turn, auto-resume)
76
+ - `+run-cancel` ([doc](references/run-cancel.md)) — cancel a running TeamRun
77
+ - `+run-reply` ([doc](references/run-reply.md)) — reply to a run in `waiting_user` state
78
+ - `+run-result` ([doc](references/run-result.md)) — get the full result of a TeamRun (fallback polling)
79
+ - `+run-artifacts` ([doc](references/run-artifacts.md)) — list artifacts produced by a TeamRun
80
+
81
+ ## TeamRun Status Reference
82
+
83
+ | Status | Description |
84
+ |---|---|
85
+ | `pending` | Queued, waiting to start |
86
+ | `running` | Actively executing |
87
+ | `waiting_user` | Paused — `+run-watch` exits with code 2; read `pendingQuestion` from stdout, present to user, then call `+run-reply` |
88
+ | `waiting_approval` | Paused — waiting for approval |
89
+ | `paused` | Manually paused |
90
+ | `completed` | Finished successfully |
91
+ | `failed` | Execution failed |
92
+ | `cancelled` | Cancelled by user |
93
+
94
+ Terminal statuses: `completed`, `failed`, `cancelled`. Poll `+run-result` until one of these is reached.
95
+
96
+ ## Typical Workflows
97
+
98
+ ### Workflow A — Start an existing team and wait for results
99
+
100
+ ```bash
101
+ # 1. Discover available teams
102
+ ae-cli team +list
103
+
104
+ # 2. (Optional) Discover project IDs if needed
105
+ ae-cli team +list-projects
106
+
107
+ # 3. Start a run
108
+ ae-cli team +run-start --team-id <team_id> --input "分析上周用户留存数据" --yes
109
+
110
+ # 4. Stream until done (blocks; no polling needed)
111
+ ae-cli team +run-watch --id <run_id>
112
+ # exit 0 → completed/partial_success → go to step 5
113
+ # exit 1 → failed/cancelled → inspect errorMessage in output, report to user
114
+ # exit 2 → waiting_user → go to step 4a
115
+
116
+ # 4a. Handle waiting_user: read pendingQuestion from stdout, get user's answer, reply, re-watch
117
+ ae-cli team +run-reply --id <run_id> --input "<user_answer>" --yes
118
+ ae-cli team +run-watch --id <run_id> # repeat until exit 0 or 1
119
+
120
+ # 5. Retrieve artifacts
121
+ ae-cli team +run-artifacts --id <run_id> --include-content true
122
+ ```
123
+
124
+ ### Workflow B — AI-generate a config, then create and run
125
+
126
+ ```bash
127
+ # 1. Generate a draft config
128
+ ae-cli team +ai-generate --prompt "需要一个分析用户行为并自动生成留存报告的团队"
129
+
130
+ # 2. Create the team (paste / adjust the returned config)
131
+ ae-cli team +create --name "留存分析团队" --config '<config_json>' --yes
132
+
133
+ # 3. Start a run
134
+ ae-cli team +run-start --team-id <new_team_id> --input "分析本月留存" --yes
135
+ ```
136
+
137
+ ### Workflow C — Multi-turn chat
138
+
139
+ ```bash
140
+ # First turn
141
+ ae-cli team +run-chat --team-id <team_id> --input "帮我分析DAU趋势" --yes
142
+
143
+ # If run status is waiting_user, reply:
144
+ ae-cli team +run-reply --id <run_id> --input "请重点分析周末下降原因" --yes
145
+
146
+ # Continue same session
147
+ ae-cli team +run-chat --team-id <team_id> --session-id <session_id> --input "给出优化建议" --yes
148
+ ```
149
+
150
+ ### Workflow D — Use a template to create a team
151
+
152
+ ```bash
153
+ # 1. Browse templates
154
+ ae-cli team +list-templates --locale zh
155
+
156
+ # 2. Create from a template's config
157
+ ae-cli team +create --name "我的分析团队" --config '<template_config>' --yes
158
+ ```
159
+
160
+ ## Quick Verification
161
+
162
+ ```bash
163
+ ae-cli team --help
164
+ ```
@@ -0,0 +1,39 @@
1
+ # team +ai-generate (AI-Generate Team Config Draft)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Team management / config generation**
6
+
7
+ ## Use Cases
8
+ - Given a plain-language description of a team's goal, generate a draft `{ name, description, members[] }` that can be reviewed and passed to `+create --config`.
9
+ - Useful when the user has a goal but does not know how to write a TeamConfig manually.
10
+
11
+ ## Mandatory Rules (MUST)
12
+ - `--prompt` is required (1–2000 chars). Pass the user's goal description as-is; do not pad it with generic boilerplate.
13
+ - The returned draft is a **suggestion only** — always show it to the user for review before calling `+create`. Do not auto-create without user confirmation.
14
+ - Do not fabricate `agentId` values; if the draft contains placeholder IDs, the user must replace them with real agent IDs before creating the team.
15
+
16
+ ## Command
17
+ ```bash
18
+ ae-cli team +ai-generate --prompt "需要一个能分析用户留存并生成周报的团队"
19
+ ae-cli team +ai-generate --prompt "A team that monitors DAU trends and sends alerts" --model <model_id>
20
+ ae-cli team +ai-generate --dry-run --prompt "test"
21
+ ```
22
+
23
+ ## Parameters
24
+ | Parameter | Required | Description |
25
+ |---|---|---|
26
+ | `--prompt` | Yes | Team goal description (1–2000 chars) |
27
+ | `--model` | No | Model ID to use for generation |
28
+
29
+ ## Decision Rules
30
+ - If the user says "help me create a team" or "generate a team for [goal]", call this command first rather than jumping to `+create`.
31
+ - Present the returned `name`, `description`, and `members` to the user. Ask them to confirm or adjust before proceeding.
32
+ - If the user already has a config in mind, skip this command and go directly to `+create`.
33
+
34
+ ## Next Steps on Failure
35
+ - Empty or low-quality result: ask the user to refine the prompt with more specific goals, roles, or steps.
36
+ - Model error: try omitting `--model` to use the default.
37
+
38
+ ## Recommended Chaining
39
+ - `+ai-generate` → user reviews and adjusts draft → `+create`
@@ -0,0 +1,94 @@
1
+ # team +create (Create 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
+ - Create a new AI Agent team with a given name and TeamConfig.
9
+ - Returns the newly created team object including its `id`.
10
+
11
+ ## Mandatory Rules (MUST)
12
+ - `--config` must be a valid TeamConfig JSON (see structure below). Do not invent `agentId`, `mcpServerIds`, `skillIds`, or `knowledgeBaseIds` — obtain real IDs from the user or the appropriate resource discovery commands.
13
+ - `--name` must be 1–100 characters.
14
+ - `--description` must be ≤2000 characters if provided.
15
+ - `--scope` must be `personal` or `company` if provided; defaults to `personal` on the server.
16
+ - Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
17
+
18
+ ## TeamConfig Structure
19
+
20
+ ```json
21
+ {
22
+ "version": 1,
23
+ "mode": "serial | parallel | leader",
24
+ "steps": [
25
+ {
26
+ "id": "s1",
27
+ "name": "Step name",
28
+ "agentId": "<real agent ID>",
29
+ "prompt": "Step instructions (≤50000 chars)",
30
+ "role": "agent | leader | reviewer",
31
+ "retryLimit": 2,
32
+ "dependencies": [],
33
+ "resourceOverride": {
34
+ "mcpServerIds": [],
35
+ "skillIds": [],
36
+ "knowledgeBaseIds": [],
37
+ "model": null
38
+ }
39
+ }
40
+ ],
41
+ "maxConcurrency": 5,
42
+ "output": {
43
+ "format": "markdown | json | xlsx | pptx | pdf | docx"
44
+ }
45
+ }
46
+ ```
47
+
48
+ **Mode constraints:**
49
+ - `serial` / `parallel`: `steps` ≥ 1
50
+ - `leader`: `steps` ≥ 2 (all `role: "agent"`), requires `leaderConfig`
51
+
52
+ **leaderConfig** (required when `mode: "leader"`):
53
+ ```json
54
+ "leaderConfig": {
55
+ "agentId": "<leader agent ID>",
56
+ "maxIterations": 10,
57
+ "availableAgents": [
58
+ { "id": "a1", "agentId": "...", "name": "...", "description": "...", "capabilities": "..." }
59
+ ]
60
+ }
61
+ ```
62
+
63
+ ## Command
64
+ ```bash
65
+ ae-cli team +create \
66
+ --name "日报分析团队" \
67
+ --config '{"version":1,"mode":"serial","steps":[{"id":"s1","name":"分析师","agentId":"xxx","prompt":"分析数据","role":"agent"}]}'
68
+
69
+ ae-cli team +create --name "My Team" --config '...' --scope company --yes
70
+ ae-cli team +create --dry-run --name "Test" --config '{}'
71
+ ```
72
+
73
+ ## Parameters
74
+ | Parameter | Required | Description |
75
+ |---|---|---|
76
+ | `--name` | Yes | Team name (1–100 chars) |
77
+ | `--config` | Yes | TeamConfig JSON object |
78
+ | `--description` | No | Description (≤2000 chars) |
79
+ | `--scope` | No | `personal` (default) \| `company` |
80
+ | `--enabled` | No | `true` (default) \| `false` |
81
+
82
+ ## Decision Rules
83
+ - If the user provides a goal description instead of a config, call `+ai-generate` first to get a draft, then ask the user to review before calling `+create`.
84
+ - If the user wants to base a team on a template, call `+list-templates` first to get the template config.
85
+ - Always use `--dry-run` first when building a complex config to verify the request shape before executing.
86
+
87
+ ## Next Steps on Failure
88
+ - `Invalid JSON`: check TeamConfig structure, especially `version`, `mode`, `steps[].id`, `steps[].agentId`.
89
+ - `400 / validation error`: verify that `mode` constraints are satisfied (e.g. `leader` requires `leaderConfig`).
90
+ - After success, capture the returned `id` for subsequent `+run-start` calls.
91
+
92
+ ## Recommended Chaining
93
+ - `+ai-generate` → review draft → `+create` → `+run-start`
94
+ - `+list-templates` → pick template config → `+create` → `+run-start`
@@ -0,0 +1,39 @@
1
+ # team +delete (Delete 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
+ - Permanently delete a team by ID.
9
+ - Returns `{ "ok": true }` on success.
10
+
11
+ ## Mandatory Rules (MUST)
12
+ - `--id` is required. Obtain the real team ID via `+list` — do not guess.
13
+ - If the team has running tasks, the server returns **409**. Cancel or wait for active runs before retrying.
14
+ - This is an irreversible operation — confirm with the user before executing.
15
+
16
+ ## Command
17
+ ```bash
18
+ ae-cli team +delete --id <team_id>
19
+ ae-cli team +delete --id <team_id> --yes
20
+ ae-cli team +delete --dry-run --id <team_id>
21
+ ```
22
+
23
+ ## Parameters
24
+ | Parameter | Required | Description |
25
+ |---|---|---|
26
+ | `--id` | Yes | Team ID |
27
+
28
+ ## Decision Rules
29
+ - Always call `+list` first to confirm the `id` and that the user is targeting the correct team.
30
+ - If the server returns 409, call `+run-result` on active runs to check their status, then use `+run-cancel` to cancel any `running` or `waiting_user` runs.
31
+ - Do not retry delete until all active runs have reached a terminal status.
32
+
33
+ ## Next Steps on Failure
34
+ - `409 Conflict`: cancel active runs first (`+run-cancel --id <run_id> --yes`), then retry.
35
+ - `404`: team already deleted or wrong ID — re-run `+list` to verify.
36
+
37
+ ## Recommended Chaining
38
+ - `+list` → confirm target → `+delete`
39
+ - `+run-cancel` (clear active runs) → `+delete`
@@ -0,0 +1,45 @@
1
+ # team +list-projects (List Available Projects)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Project discovery**
6
+
7
+ ## Use Cases
8
+ - List all projects the current user has access to, sourced from the authentication endpoint.
9
+ - Returns an array of `{ projectId, projectName }` objects.
10
+ - Use this before `+run-start` when you need to populate `--project-ids` or `--project-names` but don't know the available project IDs.
11
+
12
+ ## Mandatory Rules (MUST)
13
+ - Do not guess project IDs or project names. Call `+list-projects` first to discover real values.
14
+ - If the user references a project by name, match it against the returned list before passing it to `+run-start`.
15
+
16
+ ## Command
17
+ ```bash
18
+ ae-cli team +list-projects
19
+ ae-cli team +list-projects --format table
20
+ ae-cli team +list-projects --dry-run
21
+ ```
22
+
23
+ ## Parameters
24
+ | Parameter | Required | Description |
25
+ |---|---|---|
26
+ | None | — | No parameters required |
27
+
28
+ ## Response Shape
29
+ ```json
30
+ [
31
+ { "projectId": 1, "projectName": "项目A" },
32
+ { "projectId": 2, "projectName": "项目B" }
33
+ ]
34
+ ```
35
+
36
+ ## Decision Rules
37
+ - When the user wants to start a run and mentions a project by name or says "关联项目", call `+list-projects` first to resolve the correct `projectId`.
38
+ - Once project IDs are confirmed in the current conversation, reuse them without calling `+list-projects` again unless the user switches projects.
39
+
40
+ ## Next Steps on Failure
41
+ - Empty result: the current account may have no associated projects; confirm account permissions with the administrator.
42
+ - Auth error: run `ae-cli auth login`.
43
+
44
+ ## Recommended Chaining
45
+ - `+list-projects` → user confirms `projectId` → `+run-start --project-ids '[<id>]'`
@@ -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)