@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.
- package/README.md +39 -1
- package/README.zh.md +40 -1
- package/dist/{auth-YM7OI23X.js → auth-TXFJHPXU.js} +3 -2
- package/dist/{auth-5S7SPPEJ.js → auth-W2JZ3DKA.js} +11 -4
- package/dist/{chunk-MPFTXJFG.js → chunk-2NGWYMLB.js} +14 -2
- package/dist/chunk-6T7245YE.js +478 -0
- package/dist/{chunk-KM57HI5B.js → chunk-B4UL2VIJ.js} +7 -1
- package/dist/{chunk-TMMUBSKW.js → chunk-BI5ZVD6T.js} +8 -1
- package/dist/chunk-MNHE6SSI.js +79 -0
- package/dist/chunk-MWWYGZ76.js +130 -0
- package/dist/{chunk-24ZKQWG2.js → chunk-SRRUNQIM.js} +51 -4
- package/dist/chunk-TG64AQV4.js +262 -0
- package/dist/{chunk-NBFTPIAH.js → chunk-VT6VC4PA.js} +15 -4
- package/dist/{client-7S23DVHH.js → client-IU2E5IOL.js} +6 -3
- package/dist/{config-RVUESJRF.js → config-WH3R3IRY.js} +3 -2
- package/dist/index.js +195 -20
- package/dist/model-CC7U5XOJ.js +131 -0
- package/dist/{raw-5SYAUCJQ.js → raw-TUHZQ4UB.js} +5 -4
- package/dist/sync-EVEDS7YE.js +383 -0
- package/dist/te-agent-FLTDYV3L.js +522 -0
- package/dist/{te-analysis-RQST6AT3.js → te-analysis-CMXADIJM.js} +101 -12
- package/dist/{te-audience-TJ74UJI3.js → te-audience-LPZFFSXM.js} +4 -3
- package/dist/{te-common-W5URM2SH.js → te-common-BXQFKTB3.js} +4 -3
- package/dist/{te-community-YRV2VAD4.js → te-community-K5S3VOZY.js} +4 -3
- package/dist/{te-dataops-ZPH72BCK.js → te-dataops-567IMCQG.js} +4 -3
- package/dist/{te-engage-57UKFV74.js → te-engage-TBUTGW5F.js} +105 -49
- package/dist/{te-kb-GD7SJRYB.js → te-kb-XHVBWP5E.js} +227 -38
- package/dist/{te-meta-25SLZFXJ.js → te-meta-NQ4U3VJW.js} +25 -4
- package/dist/te-team-556APRIU.js +529 -0
- package/package.json +6 -1
- package/skills/ae-agent/SKILL.md +133 -0
- package/skills/ae-analysis/references/create_entity.md +39 -0
- package/skills/ae-analysis/references/create_space.md +34 -0
- 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/query_adhoc.md +3 -2
- package/skills/ae-analysis/references/query_entity_details.md +1 -1
- package/skills/ae-engage/SKILL.md +25 -2
- package/skills/ae-engage/references/build-task-save-guide.md +283 -0
- package/skills/ae-engage/references/save-task.md +304 -0
- package/skills/ae-kb/SKILL.md +283 -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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# analysis_meta +create_entity (Create Entity)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **Entity Management**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Create a new entity that links an event property or user property as an analysis dimension.
|
|
9
|
+
- Use `+list_entities` first to confirm the entity does not already exist.
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
```bash
|
|
13
|
+
ae-cli analysis_meta +create_entity --project_id <project_id> --entity_name "User Entity" --column_name user_id --table_type 1
|
|
14
|
+
ae-cli analysis_meta +create_entity --project_id <project_id> --entity_name "Event Entity" --column_name event_col --table_type 0
|
|
15
|
+
ae-cli analysis_meta +create_entity --dry-run
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Parameters
|
|
19
|
+
| Parameter | Required | Description |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
22
|
+
| `--entity_name` | Yes | Entity name |
|
|
23
|
+
| `--column_name` | Yes | Property column name to associate with the entity |
|
|
24
|
+
| `--table_type` | Yes | Table type: `0` = event property, `1` = user property |
|
|
25
|
+
|
|
26
|
+
## Decision Rules
|
|
27
|
+
- `--table_type` must be `0` (event property) or `1` (user property); no other values are accepted.
|
|
28
|
+
- Before using `--column_name`, call `analysis_meta +list_properties` to verify it exists. If the same column name appears in **both** event properties and user properties, **stop and ask the user which table type to use** — do not guess `--table_type`. Ask every time this condition is met; never carry over the answer from a previous request.
|
|
29
|
+
- For the first run, pass only the required parameters and confirm before adding others.
|
|
30
|
+
- Write operations keep the confirmation prompt by default; use `--yes` only for automation.
|
|
31
|
+
|
|
32
|
+
## Next Steps After Failure
|
|
33
|
+
- If `PROJECT_ID_REQUIRED` or `ENTITY_NAME_REQUIRED` appears, check that all required parameters are provided.
|
|
34
|
+
- If `INVALID_TABLE_TYPE` appears, verify `--table_type` is exactly `0` or `1`.
|
|
35
|
+
- If the result after writing is not as expected, use `analysis_meta +list_entities` to compare before and after.
|
|
36
|
+
|
|
37
|
+
## Recommended Chaining
|
|
38
|
+
- `analysis_meta +list_entities` → `+create_entity`
|
|
39
|
+
- `analysis_meta +list_properties` → `+create_entity`
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# analysis +create_space (Create Space)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **Space Management**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
- Create a new space in a project to organize dashboards and assets under a named container.
|
|
9
|
+
- Returns basic space information (ID, name, avatar settings).
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
```bash
|
|
13
|
+
ae-cli analysis +create_space --project_id <project_id> --space_name "My Space"
|
|
14
|
+
ae-cli analysis +create_space --project_id <project_id> --space_name "Team Space" --space_desc "Team dashboards"
|
|
15
|
+
ae-cli analysis +create_space --dry-run
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Parameters
|
|
19
|
+
| Parameter | Required | Description |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
22
|
+
| `--space_name` | Yes | Space name (1-64 characters) |
|
|
23
|
+
| `--space_desc` | No | Optional space description (max 200 characters) |
|
|
24
|
+
|
|
25
|
+
## Decision Rules
|
|
26
|
+
- `--space_name` must be between 1 and 64 characters.
|
|
27
|
+
- Write operations keep the confirmation prompt by default; use `--yes` only for automation.
|
|
28
|
+
|
|
29
|
+
## Next Steps After Failure
|
|
30
|
+
- If `SPACE_NAME_TOO_LONG` appears, shorten `--space_name` to 64 characters or fewer.
|
|
31
|
+
- If the result after writing is not as expected, use `analysis +list_dashboards` to inspect the space context.
|
|
32
|
+
|
|
33
|
+
## Recommended Chaining
|
|
34
|
+
- `+create_space` → `+create_dashboard` (create dashboard inside the new space using `--space_id`)
|
|
@@ -55,7 +55,7 @@ ae-cli analysis +drilldown_user_events --dry-run
|
|
|
55
55
|
| `--entity_value` | No | Optional entity value for multi-entity scenarios |
|
|
56
56
|
| `--use_cache` | No | Whether to use cache. Default: true |
|
|
57
57
|
| `--page_num` | No | Start page number, default 1 |
|
|
58
|
-
| `--page_size` | No | Page size
|
|
58
|
+
| `--page_size` | No | Page size. Default: 1000, maximum: 100000 |
|
|
59
59
|
| `--timeout_minutes` | No | Query timeout in minutes |
|
|
60
60
|
|
|
61
61
|
## Decision Rules
|
|
@@ -55,14 +55,14 @@ ae-cli analysis +drilldown_users --dry-run
|
|
|
55
55
|
| `--include_total` | No | Whether to query users from the total row. Default: false |
|
|
56
56
|
| `--relation_val` | No | Relation value used in relation analysis scenarios |
|
|
57
57
|
| `--use_cache` | No | Whether to use cache. Default: true |
|
|
58
|
-
| `--limit` | No | Optional limit. Default:
|
|
58
|
+
| `--limit` | No | Optional limit. Default: 1000, maximum: 100000. |
|
|
59
59
|
| `--offset` | No | Optional offset. Default: 0. |
|
|
60
60
|
| `--timeout_minutes` | No | Query timeout in minutes. If the query exceeds this time, it will be cancelled automatically. |
|
|
61
61
|
|
|
62
62
|
## Decision Rules
|
|
63
63
|
- Drilldown positioning parameters must come from upstream analysis results and must not be fabricated.
|
|
64
64
|
- `qp` must not be rewritten or "simplified"; it should remain consistent with the source analysis.
|
|
65
|
-
- For pagination, use `--limit` and `--offset` together. Default limit is
|
|
65
|
+
- For pagination, use `--limit` and `--offset` together. Default limit is 1000, maximum 100000.
|
|
66
66
|
- For the first run, it is recommended to pass only the required parameters (`--project_id`, `--model_type`, `--qp`) and add optional parameters after confirming the chain works.
|
|
67
67
|
- Wrap JSON parameters in single quotes (for example `--qp '{}'`, `--drilldown_groups '{}'`) to avoid shell escaping issues.
|
|
68
68
|
- When dates/time ranges are involved, validate with a short range first and then expand gradually.
|
|
@@ -95,7 +95,7 @@ ae-cli analysis +query_adhoc --project_id <project_id> --model_type <model_type>
|
|
|
95
95
|
| `--is_sort_by_columns` | No | Whether to sort query results by columns. Default: false |
|
|
96
96
|
| `--resolve_recent_day` | No | Whether to resolve relative time expressions such as "last 7 days". If omitted, service auto-resolves when `qp.eventView.recentDay` exists and `startTime`/`endTime` is incomplete; otherwise defaults to false. |
|
|
97
97
|
| `--fields` | No | Optional fields to return. Must match column names in result. Invalid fields cause INVALID_FIELDS error. |
|
|
98
|
-
| `--limit` | No | Optional limit. Default:
|
|
98
|
+
| `--limit` | No | Optional limit. Default: 1000, maximum: 100000. |
|
|
99
99
|
| `--offset` | No | Optional offset. Default: 0. |
|
|
100
100
|
| `--timeout_minutes` | No | Query timeout in minutes. If the query exceeds this time, it will be cancelled automatically. |
|
|
101
101
|
|
|
@@ -103,7 +103,8 @@ ae-cli analysis +query_adhoc --project_id <project_id> --model_type <model_type>
|
|
|
103
103
|
- On the first run, start with only the required parameters (`--project_id`,`--model_type`,`--qp`), and add optional parameters after confirming the path works.
|
|
104
104
|
- Do not call this command with placeholder QP such as `{}`. For builder-supported models, wait for builder `status=generated`; for non-builder models, build QP from verified schema/metadata first.
|
|
105
105
|
- For builder-supported models, do not run metadata/schema lookup to "help" the builder. The builder is the metadata resolver.
|
|
106
|
-
- For pagination, use `--limit` and `--offset` together. Default limit is
|
|
106
|
+
- For pagination, use `--limit` and `--offset` together. Default limit is 1000, maximum 100000.
|
|
107
|
+
- For `model_type=sql`, use exactly one row limit: either put `LIMIT` in the SQL, or use `--limit`. If both are present they must be equal — `query_adhoc` rejects mismatched values to avoid silently sampled or duplicated results. When the SQL already has a trailing `LIMIT`, you may omit `--limit` and the SQL governs.
|
|
107
108
|
- Use `--fields` to select specific columns for lighter response payloads.
|
|
108
109
|
- `event`, `retention`, `funnel`, and `prop_analysis` must not manually craft QP with schema-first flow; call the builder and use the returned `qp`.
|
|
109
110
|
- For non-builder models, `qp` must satisfy both schema structure and project metadata constraints.
|
|
@@ -39,7 +39,7 @@ ae-cli analysis +query_entity_details --dry-run
|
|
|
39
39
|
| `--properties` | No | Optional display properties JSON, for example `[{"columnName":"#user_id","tableType":"0"},{"columnName":"device_id","tableType":"0"}]`. If provided, property names should come from `analysis_meta +list_properties` in the same `project_id`. |
|
|
40
40
|
| `--sort_by` | No | Optional sort field |
|
|
41
41
|
| `--sort_order` | No | Optional sort order. Supported values: asc and desc |
|
|
42
|
-
| `--limit` | No | Optional result limit. Default:
|
|
42
|
+
| `--limit` | No | Optional result limit. Default: 1000, maximum: 100000 |
|
|
43
43
|
| `--zone_offset` | No | Time zone offset. For example, UTC+8 is 8 |
|
|
44
44
|
| `--use_cache` | No | Whether to use cache. Default: true |
|
|
45
45
|
|
|
@@ -79,6 +79,12 @@ ae-cli engage +config_channel_list --project_id 1
|
|
|
79
79
|
# Query the task list
|
|
80
80
|
ae-cli engage +task_list --project_id 1 --req '{"pageNum":1,"pageSize":20}'
|
|
81
81
|
|
|
82
|
+
# Build a save_task guide before composing the final req
|
|
83
|
+
ae-cli engage +build_task_save_guide --project_id 1 --req '{"context":{"triggerType":2,"channelId":"channel_123"}}'
|
|
84
|
+
|
|
85
|
+
# Save a task draft (create when req.taskId is omitted)
|
|
86
|
+
ae-cli engage +save_task --project_id 1 --req '{"baseInfo":{"taskName":"Demo Task"},"channelConfig":{"channelType":1,"channelId":"channel_123","groupContentList":[{"contentList":[{"pushLanguageCode":"default","content":"[]"}]}]},"targetConfig":{"targetClusterType":3},"triggerConfig":{"triggerType":2},"controlConfig":{"completionIndicatorDef":{"completionIndicators":[]}}}'
|
|
87
|
+
|
|
82
88
|
# Query task details
|
|
83
89
|
ae-cli engage +task_detail --project_id 1 --task_id task_123
|
|
84
90
|
|
|
@@ -182,6 +188,8 @@ For more detailed generation rules, consult these references first:
|
|
|
182
188
|
```bash
|
|
183
189
|
ae-cli --dry-run engage +channel_list --project_id 1
|
|
184
190
|
ae-cli --dry-run engage +task_list --project_id 1 --req '{"pageNum":1,"pageSize":20}'
|
|
191
|
+
ae-cli --dry-run engage +build_task_save_guide --project_id 1 --req '{}'
|
|
192
|
+
ae-cli --dry-run engage +save_task --project_id 1 --req '{"baseInfo":{"taskName":"Demo Task"},"channelConfig":{"channelType":1,"channelId":"channel_123","groupContentList":[{"contentList":[{"pushLanguageCode":"default","content":"[]"}]}]},"targetConfig":{"targetClusterType":3},"triggerConfig":{"triggerType":2},"controlConfig":{"completionIndicatorDef":{"completionIndicators":[]}}}'
|
|
185
193
|
ae-cli --dry-run engage +flow_list --project_id 1
|
|
186
194
|
```
|
|
187
195
|
|
|
@@ -190,6 +198,8 @@ ae-cli --dry-run engage +flow_list --project_id 1
|
|
|
190
198
|
More detailed single-command guidance is available in the business-oriented `references/` directory:
|
|
191
199
|
|
|
192
200
|
- `references/channel-list.md`
|
|
201
|
+
- `references/build-task-save-guide.md`
|
|
202
|
+
- `references/save-task.md`
|
|
193
203
|
- `references/task-list.md`
|
|
194
204
|
- `references/config-item-list.md`
|
|
195
205
|
- `references/flow-list.md`
|
|
@@ -204,7 +214,7 @@ This split documentation structure is easier to extend later, because commands w
|
|
|
204
214
|
|
|
205
215
|
### task
|
|
206
216
|
|
|
207
|
-
`+task_data_overview`, `+task_data_detail`, `+task_metric_detail`, `+task_experiment_report`, `+task_detail`, `+task_list`, `+task_stats`, `+manage_task`
|
|
217
|
+
`+task_data_overview`, `+task_data_detail`, `+task_metric_detail`, `+task_experiment_report`, `+task_detail`, `+task_list`, `+task_stats`, `+build_task_save_guide`, `+save_task`, `+manage_task`
|
|
208
218
|
|
|
209
219
|
### config
|
|
210
220
|
|
|
@@ -225,4 +235,17 @@ The following commands are write operations. Confirm that the user intent is exp
|
|
|
225
235
|
- Channels and config channels: `+add_channel`, `+delete_channel`, `+update_channel_status`, `+delete_config_channel`, `+update_config_channel_status`
|
|
226
236
|
- Strategies and config items: `+delete_config_item`, `+copy_config_template`, `+manage_strategy`
|
|
227
237
|
- Flows: `+save_flow`, `+modify_flow_base_info`, `+manage_flow`, `+delete_flow`
|
|
228
|
-
- Tasks: `+manage_task`
|
|
238
|
+
- Tasks: `+save_task`, `+manage_task`
|
|
239
|
+
|
|
240
|
+
For task draft creation or update, use this workflow:
|
|
241
|
+
|
|
242
|
+
1. `ae-cli engage +channel_list --project_id <projectId>`
|
|
243
|
+
2. `ae-cli engage +build_task_save_guide --project_id <projectId> --req '{...}'`
|
|
244
|
+
3. If the guide says QP-derived fields are needed, call `ae-cli analysis_audience +get_cluster_definition_schema --cluster_type condition`
|
|
245
|
+
4. `ae-cli engage +save_task --project_id <projectId> --req '{...}'`
|
|
246
|
+
|
|
247
|
+
`+build_task_save_guide` is a read-only helper. It returns scenario-specific required fields, channel content schema, unsupported combinations, examples, and a handoff template for `save_task`.
|
|
248
|
+
|
|
249
|
+
`+save_task` only saves a draft. It does not submit approval, does not start sending, and does not trigger task execution. If `req.taskId` is omitted it creates a new draft; if `req.taskId` is present it updates an existing draft. Update mode only supports draft tasks, and omitted fields can inherit from the existing draft before validation.
|
|
250
|
+
|
|
251
|
+
The audience schema query `ae-cli analysis_audience +get_cluster_definition_schema --cluster_type condition` is not a fixed preflight step. Call it only when the guide indicates that you must construct `targetConfig.qp`, `triggerConfig.triggerRule`, `clientConfig.clientQp`, or `completionIndicatorDef.event`.
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# ae-engage `+build_task_save_guide`
|
|
2
|
+
|
|
3
|
+
Build a scenario-specific guide for constructing `save_task.req`.
|
|
4
|
+
|
|
5
|
+
Mapped command: `ae-cli engage +build_task_save_guide`
|
|
6
|
+
|
|
7
|
+
This is a read-only helper. It does not save tasks, submit approvals, or trigger execution. Its job is to tell you how to build a valid `save_task` request for the current scenario.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Recommended Workflow
|
|
12
|
+
|
|
13
|
+
Use this sequence when creating or updating a task draft:
|
|
14
|
+
|
|
15
|
+
1. Query channels with `ae-cli engage +channel_list --project_id <projectId>`.
|
|
16
|
+
2. Call `ae-cli engage +build_task_save_guide --project_id <projectId> --req '{...}'`.
|
|
17
|
+
3. If the guide says QP-derived fields are required, call:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
ae-cli analysis_audience +get_cluster_definition_schema --cluster_type condition
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
4. Build the final grouped `save_task.req`.
|
|
24
|
+
5. Submit with `ae-cli engage +save_task --project_id <projectId> --req '{...}'`.
|
|
25
|
+
|
|
26
|
+
Important:
|
|
27
|
+
|
|
28
|
+
- Do not treat the audience schema query as a fixed preflight step.
|
|
29
|
+
- Call it only when the guide indicates that you need to construct:
|
|
30
|
+
- `targetConfig.qp`
|
|
31
|
+
- `triggerConfig.triggerRule`
|
|
32
|
+
- `clientConfig.clientQp`
|
|
33
|
+
- `completionIndicatorDef.event`
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 2. CLI Shape
|
|
38
|
+
|
|
39
|
+
The CLI call shape is:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
ae-cli engage +build_task_save_guide --project_id <projectId> --req '<req-json>'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
This CLI requires `--req`, but `{}` is valid when you want a generic guide without scenario context.
|
|
46
|
+
|
|
47
|
+
Common request patterns:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
ae-cli engage +build_task_save_guide --project_id 1 --req '{}'
|
|
51
|
+
ae-cli engage +build_task_save_guide --project_id 1 --req '{"context":{"triggerType":2,"channelId":"channel_123"}}'
|
|
52
|
+
ae-cli engage +build_task_save_guide --project_id 1 --req '{"draft":{"baseInfo":{"taskName":"Demo Task"}}}'
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Supported request fields:
|
|
56
|
+
|
|
57
|
+
- `context`
|
|
58
|
+
- a lightweight scenario selector
|
|
59
|
+
- use it when you know key dimensions such as trigger type, audience type, channel, or experiment mode
|
|
60
|
+
- `draft`
|
|
61
|
+
- a partial `save_task` request
|
|
62
|
+
- use it when you already have part of the final payload and want missing fields, examples, or corrections
|
|
63
|
+
- `reqDraft`
|
|
64
|
+
- alias of `draft`
|
|
65
|
+
- `detailLevel`
|
|
66
|
+
- `brief`: core requirements only
|
|
67
|
+
- `full`: includes enums, unsupported cases, examples, and self-check information
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 3. `context` and `draft`
|
|
72
|
+
|
|
73
|
+
### 3.1 `context`
|
|
74
|
+
|
|
75
|
+
Use `context` when you want scenario-specific guidance without writing a partial `save_task.req`.
|
|
76
|
+
|
|
77
|
+
Typical fields:
|
|
78
|
+
|
|
79
|
+
- `triggerType`
|
|
80
|
+
- `targetClusterType`
|
|
81
|
+
- `channelType`
|
|
82
|
+
- `channelId`
|
|
83
|
+
- `channelTemplateId`
|
|
84
|
+
- `enableExp`
|
|
85
|
+
- `expIndicatorBizType`
|
|
86
|
+
|
|
87
|
+
Example:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"context": {
|
|
92
|
+
"triggerType": 2,
|
|
93
|
+
"targetClusterType": 2,
|
|
94
|
+
"channelId": "channel_123"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 3.2 `draft`
|
|
100
|
+
|
|
101
|
+
Use `draft` when you already have a partial `save_task.req` and want the guide to tell you:
|
|
102
|
+
|
|
103
|
+
- what is still missing
|
|
104
|
+
- what is invalid
|
|
105
|
+
- whether the payload is already close to submit-ready
|
|
106
|
+
- what template or schema to use to finish it
|
|
107
|
+
|
|
108
|
+
Example:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"draft": {
|
|
113
|
+
"baseInfo": {
|
|
114
|
+
"taskName": "Demo Task"
|
|
115
|
+
},
|
|
116
|
+
"triggerConfig": {
|
|
117
|
+
"triggerType": 2
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 4. Output Structure
|
|
126
|
+
|
|
127
|
+
The guide returns structured metadata rather than free-form prose. The top-level sections are:
|
|
128
|
+
|
|
129
|
+
- `valid`
|
|
130
|
+
- `errors`
|
|
131
|
+
- `warnings`
|
|
132
|
+
- `missingInputs`
|
|
133
|
+
- `saveTaskContract`
|
|
134
|
+
- `scenario`
|
|
135
|
+
- `requiredInput`
|
|
136
|
+
- `fieldRules`
|
|
137
|
+
- `handoff`
|
|
138
|
+
|
|
139
|
+
### 4.1 `valid`
|
|
140
|
+
|
|
141
|
+
- `true` means the current scenario or draft has no structural blocking errors
|
|
142
|
+
- `false` means you should inspect `errors`, `missingInputs`, and `handoff.blockingPlaceholders`
|
|
143
|
+
|
|
144
|
+
### 4.2 `errors`
|
|
145
|
+
|
|
146
|
+
Use `errors` for hard blockers such as:
|
|
147
|
+
|
|
148
|
+
- invalid enum values
|
|
149
|
+
- unsupported combinations
|
|
150
|
+
- unsupported trigger types
|
|
151
|
+
|
|
152
|
+
The guide may expose invalid values separately so you can correct them instead of silently dropping them.
|
|
153
|
+
|
|
154
|
+
### 4.3 `warnings`
|
|
155
|
+
|
|
156
|
+
Use `warnings` for non-fatal guidance, for example:
|
|
157
|
+
|
|
158
|
+
- channel content schema is unavailable because no `channelId` was provided
|
|
159
|
+
- click-rate experiment setup still needs a channel context
|
|
160
|
+
|
|
161
|
+
### 4.4 `missingInputs`
|
|
162
|
+
|
|
163
|
+
Use `missingInputs` as the to-do list for fields you still need before you can submit `save_task`.
|
|
164
|
+
|
|
165
|
+
Typical examples:
|
|
166
|
+
|
|
167
|
+
- missing `baseInfo.taskName`
|
|
168
|
+
- missing `channelConfig.channelId`
|
|
169
|
+
- missing `channelConfig.groupContentList`
|
|
170
|
+
- missing `triggerConfig.triggerTime` for scheduled single tasks
|
|
171
|
+
|
|
172
|
+
### 4.5 `saveTaskContract`
|
|
173
|
+
|
|
174
|
+
This section describes the high-level contract:
|
|
175
|
+
|
|
176
|
+
- final tool is `save_task`
|
|
177
|
+
- required preflight is `query_channel_list -> build_task_save_guide`
|
|
178
|
+
- QP-derived fields may require `ae-cli analysis_audience +get_cluster_definition_schema --cluster_type condition`
|
|
179
|
+
- `save_task.req` must be a grouped JSON object
|
|
180
|
+
|
|
181
|
+
### 4.6 `scenario`
|
|
182
|
+
|
|
183
|
+
This section shows the resolved scenario, such as:
|
|
184
|
+
|
|
185
|
+
- create vs update draft
|
|
186
|
+
- trigger type
|
|
187
|
+
- audience type
|
|
188
|
+
- channel type / channel id
|
|
189
|
+
- whether the scenario is unsupported
|
|
190
|
+
|
|
191
|
+
### 4.7 `requiredInput`
|
|
192
|
+
|
|
193
|
+
This section tells you which grouped blocks and fields are required in the current scenario.
|
|
194
|
+
|
|
195
|
+
Use it to understand what must appear in:
|
|
196
|
+
|
|
197
|
+
- `baseInfo`
|
|
198
|
+
- `channelConfig`
|
|
199
|
+
- `targetConfig`
|
|
200
|
+
- `triggerConfig`
|
|
201
|
+
- `controlConfig`
|
|
202
|
+
- `expConfig` when experiment mode is enabled
|
|
203
|
+
|
|
204
|
+
### 4.8 `fieldRules`
|
|
205
|
+
|
|
206
|
+
This is the most important construction section.
|
|
207
|
+
|
|
208
|
+
It includes:
|
|
209
|
+
|
|
210
|
+
- grouped block rules
|
|
211
|
+
- structured conditional rules
|
|
212
|
+
- related-parameter rules
|
|
213
|
+
- unsupported fields / values / combinations
|
|
214
|
+
- `channelContentSchema`
|
|
215
|
+
- enum values and wrong examples when `detailLevel=full`
|
|
216
|
+
|
|
217
|
+
#### `fieldRules.channelContentSchema`
|
|
218
|
+
|
|
219
|
+
Treat this as the source of truth for channel content construction.
|
|
220
|
+
|
|
221
|
+
Use it to get:
|
|
222
|
+
|
|
223
|
+
- valid keys
|
|
224
|
+
- expected item shape
|
|
225
|
+
- channel-specific examples
|
|
226
|
+
- params that must be copied exactly, such as `paramType`
|
|
227
|
+
|
|
228
|
+
Do not invent free-form content items such as:
|
|
229
|
+
|
|
230
|
+
```json
|
|
231
|
+
[{"text":"hello"}]
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Instead, use the valid item structure and put message text into `value`.
|
|
235
|
+
|
|
236
|
+
### 4.9 `handoff`
|
|
237
|
+
|
|
238
|
+
This is the final section before `save_task`.
|
|
239
|
+
|
|
240
|
+
Important fields:
|
|
241
|
+
|
|
242
|
+
- `reqTemplate`
|
|
243
|
+
- a scenario-aware grouped request template
|
|
244
|
+
- use it as a starting point, not as unquestioned final truth
|
|
245
|
+
- `readyToSubmit`
|
|
246
|
+
- `true` means the current scenario or draft has no blocking placeholders
|
|
247
|
+
- `blockingPlaceholders`
|
|
248
|
+
- unresolved placeholders that still block submission
|
|
249
|
+
- `selfCheckList`
|
|
250
|
+
- a final checklist before calling `save_task`
|
|
251
|
+
- `successUrlRule`
|
|
252
|
+
- after `save_task` succeeds, build the task detail URL from current page origin plus the relative hash
|
|
253
|
+
- do not hardcode host, IP, or port
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## 5. How to Use the Guide in Practice
|
|
258
|
+
|
|
259
|
+
Recommended usage pattern:
|
|
260
|
+
|
|
261
|
+
1. resolve a real `channelId` with `+channel_list`
|
|
262
|
+
2. call `+build_task_save_guide`
|
|
263
|
+
3. read `fieldRules.channelContentSchema`
|
|
264
|
+
4. read `handoff.reqTemplate`
|
|
265
|
+
5. fix everything in `blockingPlaceholders`
|
|
266
|
+
6. if the guide points to QP-derived fields, call:
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
ae-cli analysis_audience +get_cluster_definition_schema --cluster_type condition
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
7. fill those fields using the real condition schema
|
|
273
|
+
8. call `+save_task`
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## 6. Safety Notes
|
|
278
|
+
|
|
279
|
+
- `+build_task_save_guide` is read-only; it does not save a draft
|
|
280
|
+
- do not skip the guide and build `save_task.req` from memory alone
|
|
281
|
+
- do not treat the audience schema query as mandatory for every task
|
|
282
|
+
- do not invent `channelId`, `clusterKey`, content keys, or QP structures
|
|
283
|
+
- if the guide exposes an unsupported scenario, correct it before calling `save_task`
|