@thinkingai/ae-cli 6.1.10 → 6.1.11
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 +25 -3
- package/README.zh.md +25 -3
- package/dist/{auth-56Z45UVR.js → auth-GDV3H5I4.js} +18 -8
- package/dist/{auth-ENM3FE6L.js → auth-NN55553T.js} +3 -3
- package/dist/{capability-2H6PAOA3.js → capability-TPORIKRQ.js} +19 -15
- package/dist/{capability-YPOQX6PL.js → capability-VQNC5CF7.js} +19 -15
- package/dist/chunk-4NN5IWVN.js +26 -0
- package/dist/{chunk-DB4Q3ANU.js → chunk-6A2FUCIS.js} +3 -3
- package/dist/{chunk-PVBYJWC2.js → chunk-7KQWSBSL.js} +4 -4
- package/dist/{chunk-24BAVOX3.js → chunk-AXDXJTPC.js} +3 -1
- package/dist/{chunk-CPVTECJ3.js → chunk-DT6Y3TD7.js} +5 -5
- package/dist/{chunk-EGEIXA2Z.js → chunk-DWO43OIB.js} +0 -248
- package/dist/{chunk-V6FR6WTW.js → chunk-GJJA4CQZ.js} +34 -2
- package/dist/{chunk-RGXCNC4N.js → chunk-GS2P7LFD.js} +50 -17
- package/dist/{chunk-LYVNONC4.js → chunk-JHENBQ5B.js} +35 -0
- package/dist/{chunk-3P3562ZX.js → chunk-MVDZ7DBQ.js} +5 -5
- package/dist/{chunk-LCXU3AAT.js → chunk-NBPKWKRA.js} +2 -2
- package/dist/{chunk-HQ2A7ITL.js → chunk-RBNKI5ZW.js} +50 -17
- package/dist/{chunk-LHVM35J4.js → chunk-TS6BUGUY.js} +4 -4
- package/dist/chunk-TUKQZTMI.js +250 -0
- package/dist/{chunk-J7MZHDHQ.js → chunk-VKD5WQKN.js} +5 -5
- package/dist/{chunk-3KI3RRXX.js → chunk-VTXHDCBW.js} +3 -3
- package/dist/{chunk-KTYR3U6D.js → chunk-YTG6Q75E.js} +10 -6
- package/dist/{chunk-IR4ZLVPW.js → chunk-YV52FB5G.js} +25 -3
- package/dist/{chunk-E7UXXHO3.js → chunk-Z3OXWCIA.js} +3 -3
- package/dist/{cli-token-4SBMXAUK.js → cli-token-GL5MS5FK.js} +4 -4
- package/dist/{client-PP5FETMW.js → client-DAIPF7XN.js} +4 -4
- package/dist/{community-report-client-KK2QBANO.js → community-report-client-M2RW4MXD.js} +2 -2
- package/dist/config-4VZNLBKF.js +489 -0
- package/dist/index.js +94 -35
- package/dist/memory-RWJW4XFO.js +892 -0
- package/dist/memory-VO2ZJCRT.js +892 -0
- package/dist/{metadata-JIQ77HFY.js → metadata-YGTHR2XJ.js} +8 -8
- package/dist/{metadata-AN3YFZEV.js → metadata-ZRN2GHPN.js} +8 -8
- package/dist/{model-JASQVOFD.js → model-CLUIK3K5.js} +7 -5
- package/dist/{raw-XJCAT3HX.js → raw-52B4UKO4.js} +8 -7
- package/dist/sync-3REDHGY6.js +10259 -0
- package/dist/{te-agent-JHUG6DVV.js → te-agent-XNPELAKX.js} +580 -84
- package/dist/{te-analysis-ITKTO6JS.js → te-analysis-GJI5FZUL.js} +1152 -13
- package/dist/{te-analysis-RAC67YYD.js → te-analysis-N2BRDJZ5.js} +1152 -13
- package/dist/{te-community-QOYIYEJI.js → te-community-SQXKE5OO.js} +7 -7
- package/dist/{te-community-UFKI6ONP.js → te-community-TYSNU3NQ.js} +7 -7
- package/dist/{te-dataops-PZQ5NQLY.js → te-dataops-5TM7WZDI.js} +370 -189
- package/dist/{te-dataops-XTWVTJCA.js → te-dataops-OWIADNSM.js} +370 -189
- package/dist/{te-engage-NLZUPSBK.js → te-engage-F7V55KVW.js} +333 -105
- package/dist/{te-engage-E7F4HTXU.js → te-engage-FMYAYCNV.js} +333 -105
- package/dist/{te-experiment-N63WF7XA.js → te-experiment-JWXOYJ3W.js} +83 -10
- package/dist/{te-experiment-D32TB6ZB.js → te-experiment-UPDMHCAJ.js} +83 -10
- package/dist/{te-kb-E7NSCBRB.js → te-kb-VRMEY3D4.js} +6 -6
- package/dist/{te-meta-GBDTMPEL.js → te-meta-53BVXPFI.js} +7 -7
- package/dist/{te-meta-ZTLTSHXC.js → te-meta-TOCBPBXI.js} +7 -7
- package/dist/{te-system-AH7DMCAQ.js → te-system-XGS5EQIQ.js} +4 -4
- package/dist/{te-team-BQ3SKSZV.js → te-team-BZRDV2CM.js} +7 -7
- package/dist/{update-DKG6UXEM.js → update-HEDXGOJH.js} +8 -6
- package/package.json +4 -1
- package/skills/ae-agent/SKILL.md +178 -16
- package/skills/ae-agent/references/add-skill.md +22 -10
- package/skills/ae-agent/references/edit-skill.md +24 -14
- package/skills/ae-agent/references/find-archived-conversations.md +82 -0
- package/skills/ae-agent/references/restore-conversation.md +54 -0
- package/skills/ae-agent/references/upload-skill.md +24 -14
- package/skills/ae-analysis/SKILL.md +1 -1
- package/skills/ae-analysis/references/command_index.md +104 -42
- package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
- package/skills/ae-analysis/references/project_access_detail_get.md +3 -3
- package/skills/ae-analysis/references/project_data_power_delete.md +3 -3
- package/skills/ae-analysis/references/project_data_power_get.md +3 -3
- package/skills/ae-analysis/references/project_data_power_list.md +3 -3
- package/skills/ae-analysis/references/project_data_power_upsert.md +3 -3
- package/skills/ae-analysis/references/project_entity_create.md +3 -3
- package/skills/ae-analysis/references/project_entity_delete.md +3 -3
- package/skills/ae-analysis/references/project_entity_event_list.md +3 -3
- package/skills/ae-analysis/references/project_entity_get.md +3 -3
- package/skills/ae-analysis/references/project_entity_list.md +3 -3
- package/skills/ae-analysis/references/project_entity_update.md +3 -3
- package/skills/ae-analysis/references/project_function_list.md +3 -3
- package/skills/ae-analysis/references/project_info_create.md +25 -0
- package/skills/ae-analysis/references/project_info_delete.md +24 -0
- package/skills/ae-analysis/references/project_info_get.md +3 -3
- package/skills/ae-analysis/references/project_info_list.md +3 -3
- package/skills/ae-analysis/references/project_info_update.md +3 -3
- package/skills/ae-analysis/references/project_mark_time_create.md +3 -3
- package/skills/ae-analysis/references/project_mark_time_delete.md +3 -3
- package/skills/ae-analysis/references/project_mark_time_list.md +3 -3
- package/skills/ae-analysis/references/project_mark_time_update.md +3 -3
- package/skills/ae-analysis/references/project_member_add.md +3 -3
- package/skills/ae-analysis/references/project_member_batch_update.md +3 -3
- package/skills/ae-analysis/references/project_member_candidate_list.md +3 -3
- package/skills/ae-analysis/references/project_member_handover_export.md +3 -3
- package/skills/ae-analysis/references/project_member_handover_run.md +3 -3
- package/skills/ae-analysis/references/project_member_import.md +3 -3
- package/skills/ae-analysis/references/project_member_list.md +3 -3
- package/skills/ae-analysis/references/project_member_receiver_list.md +3 -3
- package/skills/ae-analysis/references/project_member_remove.md +3 -3
- package/skills/ae-analysis/references/project_member_update.md +3 -3
- package/skills/ae-analysis/references/project_owner_update.md +3 -3
- package/skills/ae-analysis/references/project_permission_binding_list.md +3 -3
- package/skills/ae-analysis/references/project_receive_status_update.md +3 -3
- package/skills/ae-analysis/references/project_role_delete.md +3 -3
- package/skills/ae-analysis/references/project_role_function_list.md +3 -3
- package/skills/ae-analysis/references/project_role_get.md +3 -3
- package/skills/ae-analysis/references/project_role_list.md +3 -3
- package/skills/ae-analysis/references/project_role_upsert.md +3 -3
- package/skills/ae-analysis/references/project_role_user_list.md +3 -3
- package/skills/ae-analysis/references/project_space_list.md +1 -1
- package/skills/ae-analysis/references/project_timezone_get.md +3 -3
- package/skills/ae-analysis/references/project_timezone_overview.md +3 -3
- package/skills/ae-analysis/references/project_timezone_update.md +3 -3
- package/skills/ae-analysis/references/project_user_id_items_update.md +3 -3
- package/skills/ae-analysis/references/system_admin_function_list.md +22 -0
- package/skills/ae-analysis/references/system_admin_function_update.md +26 -0
- package/skills/ae-analysis/references/system_admin_list.md +21 -0
- package/skills/ae-analysis/references/system_admin_remove.md +25 -0
- package/skills/ae-analysis/references/system_admin_upsert.md +25 -0
- package/skills/ae-analysis/references/system_function_list.md +21 -0
- package/skills/ae-analysis/references/system_member_add.md +25 -0
- package/skills/ae-analysis/references/system_member_candidate_list.md +22 -0
- package/skills/ae-analysis/references/system_member_delete.md +25 -0
- package/skills/ae-analysis/references/system_member_list.md +24 -0
- package/skills/ae-analysis/references/system_member_mfa_unbind.md +25 -0
- package/skills/ae-analysis/references/system_member_password_reset.md +32 -0
- package/skills/ae-analysis/references/system_member_project_batch_update.md +27 -0
- package/skills/ae-analysis/references/system_member_status_update.md +26 -0
- package/skills/ae-analysis/references/system_member_update.md +23 -0
- package/skills/ae-analysis/references/system_mfa_get.md +21 -0
- package/skills/ae-analysis/references/system_mfa_update.md +25 -0
- package/skills/ae-analysis/references/system_node_monitor_list.md +24 -0
- package/skills/ae-analysis/references/system_oauth2_update.md +22 -0
- package/skills/ae-analysis/references/system_ops_alert_contact_delete.md +25 -0
- package/skills/ae-analysis/references/system_ops_alert_contact_list.md +23 -0
- package/skills/ae-analysis/references/system_ops_alert_contact_test.md +29 -0
- package/skills/ae-analysis/references/system_ops_alert_contact_upsert.md +39 -0
- package/skills/ae-analysis/references/system_preference_get.md +21 -0
- package/skills/ae-analysis/references/system_preference_update.md +22 -0
- package/skills/ae-analysis/references/system_project_usage_list.md +28 -0
- package/skills/ae-analysis/references/system_query_alert_rule_list.md +21 -0
- package/skills/ae-analysis/references/system_query_alert_rule_update.md +26 -0
- package/skills/ae-analysis/references/system_query_monitor_overview.md +26 -0
- package/skills/ae-analysis/references/system_query_task_cancel.md +25 -0
- package/skills/ae-analysis/references/system_query_task_export.md +49 -0
- package/skills/ae-analysis/references/system_query_task_get.md +23 -0
- package/skills/ae-analysis/references/system_query_task_list.md +35 -0
- package/skills/ae-analysis/references/system_query_task_options.md +27 -0
- package/skills/ae-analysis/references/system_receiver_address_delete.md +26 -0
- package/skills/ae-analysis/references/system_receiver_address_overview.md +21 -0
- package/skills/ae-analysis/references/system_receiver_address_project_list.md +21 -0
- package/skills/ae-analysis/references/system_receiver_address_promote.md +24 -0
- package/skills/ae-analysis/references/system_receiver_address_upsert.md +27 -0
- package/skills/ae-analysis/references/system_receiver_detection_get.md +22 -0
- package/skills/ae-analysis/references/system_receiver_detection_run.md +22 -0
- package/skills/ae-analysis/references/system_receiver_detection_update.md +25 -0
- package/skills/ae-analysis/references/system_role_delete.md +26 -0
- package/skills/ae-analysis/references/system_role_function_list.md +22 -0
- package/skills/ae-analysis/references/system_role_get.md +22 -0
- package/skills/ae-analysis/references/system_role_list.md +24 -0
- package/skills/ae-analysis/references/system_role_upsert.md +27 -0
- package/skills/ae-analysis/references/system_role_user_list.md +22 -0
- package/skills/ae-analysis/references/system_seat_list.md +25 -0
- package/skills/ae-analysis/references/system_seat_update.md +26 -0
- package/skills/ae-analysis/references/system_smtp_delete.md +24 -0
- package/skills/ae-analysis/references/system_smtp_get.md +21 -0
- package/skills/ae-analysis/references/system_smtp_test.md +22 -0
- package/skills/ae-analysis/references/system_smtp_upsert.md +31 -0
- package/skills/ae-analysis/references/system_third_party_login_disable.md +25 -0
- package/skills/ae-analysis/references/system_third_party_login_list.md +21 -0
- package/skills/ae-analysis/references/system_third_party_login_upsert.md +33 -0
- package/skills/ae-analysis/references/system_usage_overview.md +21 -0
- package/skills/ae-analysis/references/system_usage_trend_export.md +44 -0
- package/skills/ae-analysis/references/system_usage_trend_query.md +28 -0
- package/skills/ae-dataops/SKILL.md +1 -1
- package/skills/ae-dataops/references/dataops-flow-create.md +51 -16
- package/skills/ae-engage/SKILL.md +56 -26
- package/skills/ae-engage/references/activity-activity.md +3 -0
- package/skills/ae-engage/references/activity-approval.md +12 -4
- package/skills/ae-engage/references/activity-task.md +21 -6
- package/skills/ae-engage/references/activity-topic.md +31 -13
- package/skills/ae-engage/references/add-channel.md +170 -41
- package/skills/ae-engage/references/build-task-save-guide.md +40 -27
- package/skills/ae-engage/references/channel-update-config.md +3 -2
- package/skills/ae-engage/references/common-metric.md +48 -120
- package/skills/ae-engage/references/flow-detail.md +13 -0
- package/skills/ae-engage/references/preset-event.md +12 -32
- package/skills/ae-engage/references/save-flow.md +127 -64
- package/skills/ae-engage/references/save-task.md +197 -59
- package/skills/ae-engage/references/scene-config-metric.md +3 -0
- package/skills/ae-engage/references/scene-preset-metric.md +8 -37
- package/skills/ae-engage/references/scene-strategy-audience.md +51 -643
- package/skills/ae-engage/references/scene-strategy.md +6 -6
- package/skills/ae-engage/references/task-detail.md +10 -0
- package/skills/ae-engage/references/task-submit-approval.md +45 -0
- package/skills/ae-engage/references/validate-flow-node-config.md +1 -1
- package/skills/ae-experiment/SKILL.md +21 -1
- package/skills/ae-experiment/references/check_experiment_ready.md +2 -0
- package/skills/ae-experiment/references/query_experiment_detail.md +6 -0
- package/skills/ae-experiment/references/query_experiment_list.md +4 -0
- package/skills/ae-experiment/references/query_experiment_list_archived.md +3 -0
- package/skills/ae-experiment/references/query_metric_detail.md +5 -0
- package/skills/ae-experiment/references/query_metric_list.md +3 -0
- package/skills/ae-experiment/references/save_experiment.md +46 -3
- package/skills/ae-experiment/references/save_metric.md +62 -0
- package/skills/ae-experiment/references/save_submit_experiment.md +3 -0
- package/skills/ae-experiment-design/SKILL.md +149 -0
- package/skills/ae-experiment-design/agents/openai.yaml +4 -0
- package/skills/ae-experiment-design/references/client-experiment-sdk.md +147 -0
- package/skills/ae-experiment-design/references/experiment-creation.md +108 -0
- package/skills/ae-experiment-design/references/experiment-sdk-contract.md +100 -0
- package/skills/ae-experiment-design/references/exposure-contract.md +91 -0
- package/skills/ae-experiment-design/references/hybrid-experiment-sdk.md +74 -0
- package/skills/ae-experiment-design/references/metric-readiness.md +143 -0
- package/skills/ae-experiment-design/references/platform-operations.md +99 -0
- package/skills/ae-experiment-design/references/sdk-index.md +76 -0
- package/skills/ae-experiment-design/references/sdk-integration.md +114 -0
- package/skills/ae-experiment-design/references/sdk-troubleshooting.md +139 -0
- package/skills/ae-experiment-design/references/server-experiment-sdk.md +78 -0
- package/skills/ae-experiment-design/scripts/calculate_experiment_plan.py +450 -0
- package/skills/ae-experiment-insight/SKILL.md +149 -0
- package/skills/ae-experiment-insight/agents/openai.yaml +4 -0
- package/skills/ae-experiment-insight/references/decision-framework.md +69 -0
- package/skills/ae-experiment-insight/references/diagnostic-playbook.md +225 -0
- package/skills/ae-experiment-insight/references/platform-operations.md +76 -0
- package/skills/ae-experiment-insight/scripts/analyze_experiment.py +478 -0
- package/skills/ae-generate-tracking-code/SKILL.md +2 -2
- package/skills/ae-metadata/SKILL.md +1 -1
- package/dist/config-BSSALXEN.js +0 -128
- package/dist/sync-QFP4XFN3.js +0 -485
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
# engage-activity approval
|
|
2
2
|
|
|
3
|
-
> Capability ids: `engage-activity.approval.{approve,reject,cancel}` · Domain: `engage`.
|
|
4
|
-
>
|
|
5
|
-
> **Temporarily disabled:** `engage-activity.approval.submit` — do not call until re-enabled.
|
|
3
|
+
> Capability ids: `engage-activity.approval.{submit,approve,reject,cancel}` · Domain: `engage`.
|
|
6
4
|
|
|
7
5
|
Campaign activities — activity approval workflow. Current actions target an activity (`ApprovalActivityIdDealDTO`: `projectId` + `activityId` + `reason`); each is a state-changing `write` and does not support dry-run. `reject` requires `reason`; other actions treat `reason` as optional.
|
|
8
6
|
|
|
9
7
|
## Commands
|
|
10
8
|
|
|
11
9
|
```bash
|
|
10
|
+
# Submit an activity for approval
|
|
11
|
+
ae-cli engage-activity approval submit --project-id <project_id> --activity-id <activity_id> [--reason <reason>]
|
|
12
|
+
|
|
12
13
|
# Approve an activity
|
|
13
14
|
ae-cli engage-activity approval approve --project-id <project_id> --activity-id <activity_id>
|
|
14
15
|
|
|
@@ -23,6 +24,7 @@ ae-cli engage-activity approval cancel --project-id <project_id> --activity-id <
|
|
|
23
24
|
|
|
24
25
|
| Command | Required flags | Notes |
|
|
25
26
|
|---|---|---|
|
|
27
|
+
| submit | `--project-id`, `--activity-id` | `--reason` optional. Activity must have draft/pending standalone or topic tasks. |
|
|
26
28
|
| approve | `--project-id`, `--activity-id` | `--reason` optional. |
|
|
27
29
|
| reject | `--project-id`, `--activity-id`, `--reason` | `--reason` required, max 72 characters. |
|
|
28
30
|
| cancel | `--project-id`, `--activity-id` | `--reason` optional. |
|
|
@@ -35,13 +37,19 @@ ae-cli engage-activity approval cancel --project-id <project_id> --activity-id <
|
|
|
35
37
|
|
|
36
38
|
- All approval actions are `write` (real state changes) and do not support dry-run; they do not require `--yes` (only `high-risk-write` does).
|
|
37
39
|
- Approve/reject require the caller to be a valid approver of the activity (enforced server-side).
|
|
38
|
-
-
|
|
40
|
+
- Submit requires at least one standalone or topic task under the activity that can enter approval.
|
|
41
|
+
- Submit and approve load complete task details and scan both standalone tasks and topic tasks before invoking the product approval service.
|
|
42
|
+
- Approval does not repair or normalize unsupported activity task configurations.
|
|
43
|
+
- If preflight returns `ACTIVITY_TASK_COMPATIBILITY_VIOLATION`, inspect `error.meta.violations`, withdraw/cancel approval when necessary, and update or recreate each reported task as scheduled, fixed-timezone, and non-experiment before resubmitting.
|
|
39
44
|
|
|
40
45
|
## Common Errors
|
|
41
46
|
|
|
42
47
|
| code | when |
|
|
43
48
|
|---|---|
|
|
44
49
|
| `ACTIVITY_NOT_FOUND` | activity id missing in project |
|
|
50
|
+
| `ACTIVITY_NO_APPROVAL_TASK` | activity has no standalone/topic tasks to submit |
|
|
51
|
+
| `ACTIVITY_TASK_COMPATIBILITY_VIOLATION` | one or more persisted activity tasks use unsupported trigger, timezone, experiment, or content-group configuration; details are in `error.meta.violations` |
|
|
52
|
+
| `ACTIVITY_TRIGGER_TYPE_REQUIRED` | a persisted activity task is missing its trigger type; reported inside the compatibility violation list |
|
|
45
53
|
| `ACTIVITY_STATUS_INVALID` | activity not in draft/pending |
|
|
46
54
|
| `APPROVAL_NOT_PENDING` | no under-approval record |
|
|
47
55
|
| `NOT_APPROVER` | caller is not a project approver |
|
|
@@ -26,9 +26,9 @@ ae-cli engage-activity task copy --project-id <project_id> --task-id <task_id> [
|
|
|
26
26
|
|
|
27
27
|
| Command | Required flags | Notes |
|
|
28
28
|
|---|---|---|
|
|
29
|
-
| get | `--project-id`, `--task-id` |
|
|
30
|
-
| create | `--project-id`, `--payload` | payload = `OperationTaskOpDTO`; set `activityId`, leave `topicId` empty.
|
|
31
|
-
| update | `--project-id`, `--payload` | payload = `OperationTaskOpDTO` including `taskId`. Prefer get detail as base.
|
|
29
|
+
| get | `--project-id`, `--task-id` | Only standalone tasks with an `activityId`; ordinary tasks use `engage-task task get`. |
|
|
30
|
+
| create | `--project-id`, `--payload` | payload = `OperationTaskOpDTO`; set `activityId`, leave `topicId` empty. Only scheduled `triggerType` `0/1` is supported. |
|
|
31
|
+
| update | `--project-id`, `--payload` | payload = `OperationTaskOpDTO` including `taskId`. Prefer get detail as base. Only scheduled `triggerType` `0/1` is supported. |
|
|
32
32
|
| copy | `--project-id`, `--task-id` | `--new-name` optional (default source name + `_copy`). |
|
|
33
33
|
|
|
34
34
|
## Output
|
|
@@ -47,20 +47,28 @@ ae-cli engage-activity task copy --project-id <project_id> --task-id <task_id> [
|
|
|
47
47
|
- **TEXT (rich text) params** must include both `value` and `config` (Slate.js JSON **string**). If `config` is missing, Hermes copy auto-fills
|
|
48
48
|
`config = [{"type":"paragraph","children":[{"text":"<value>"}]}]` as a JSON string.
|
|
49
49
|
- Missing `expConfig` on create/update is auto-filled as `{"enableExp":false}` (same shape as task `get`).
|
|
50
|
+
- A/B and horse-race experiments are not supported. Do not pass experiment fields or multiple content groups.
|
|
51
|
+
- `groupContentList` must contain exactly one non-experiment group. Put language variants in that group's `contentList`.
|
|
50
52
|
|
|
51
53
|
### Audience (`targetClusterType`)
|
|
52
54
|
|
|
53
55
|
| Value | Required | Notes |
|
|
54
56
|
|---|---|---|
|
|
55
57
|
| `2` (existed) | `clusterKey` | From `analysis user-cluster list/get`. |
|
|
56
|
-
| `1` (custom) | `
|
|
57
|
-
| `3` (all) | — | Do not pass `clusterKey` or `
|
|
58
|
+
| `1` (custom) | `definitionRequest` | Analysis-compatible semantic condition object. |
|
|
59
|
+
| `3` (all) | — | Do not pass `clusterKey` or `definitionRequest`. |
|
|
60
|
+
|
|
61
|
+
`get` returns `definition_request`, `definition_status`, and optional `definition_unavailable_reason`, while hiding the stored execution QP. Reuse `definition_request` as payload `definitionRequest` for an update. `copy` converts the source internally and does not require an audience field from the caller.
|
|
58
62
|
|
|
59
63
|
## Decision Rules
|
|
60
64
|
|
|
65
|
+
- `triggerType` must be `0` (schedule single) or `1` (schedule repeat). Manual (`2`) and triggered (`3`-`6`) tasks belong under `engage-task`, not `engage-activity`.
|
|
66
|
+
- Set `triggerTimeStrategy` to `fixed_time_zone` and `tzOffset` to the parent activity timezone. User timezone and user active time are not supported.
|
|
67
|
+
- Keep `triggerTime`, or repeat `startDate`/`endDate`, inside the parent activity period.
|
|
68
|
+
- Create/update/copy is limited to editable parent activity states: draft (`0`), paused (`2`), or denied (`5`). Project-configured count and language limits remain authoritative.
|
|
61
69
|
- Discover a real `task_id` via `get`/activity `info-list` first; never invent IDs.
|
|
62
70
|
- `copy` duplicates the editable task config (not runtime/trigger state).
|
|
63
|
-
- `copy` saves via **draft** add (`draft=true`), so a past schedule-single `triggerTime` is allowed; output may include `trigger_time_stale=true`. Update the time before submitting for approval
|
|
71
|
+
- `copy` saves via **draft** add (`draft=true`), so a past schedule-single `triggerTime` is allowed; output may include `trigger_time_stale=true`. Update the time before submitting for approval.
|
|
64
72
|
- Standalone tasks must **not** include `topicId`; topic tasks use `engage-activity topic create` / `topic copy`.
|
|
65
73
|
|
|
66
74
|
## Copy errors
|
|
@@ -73,6 +81,13 @@ ae-cli engage-activity task copy --project-id <project_id> --task-id <task_id> [
|
|
|
73
81
|
| `TASK_PROJECT_MISMATCH` | task exists but not in `--project-id` |
|
|
74
82
|
| `TOPIC_TASK_FORBIDDEN` | source has `topicId` (use `topic copy`) |
|
|
75
83
|
| `ACTIVITY_ID_REQUIRED` | source has no `activityId` (not a standalone activity task) |
|
|
84
|
+
| `ACTIVITY_TRIGGER_TYPE_UNSUPPORTED` | task uses manual or a triggered task type |
|
|
85
|
+
| `ACTIVITY_TRIGGER_TIME_STRATEGY_UNSUPPORTED` | task does not use `fixed_time_zone` |
|
|
86
|
+
| `ACTIVITY_TIMEZONE_REQUIRED` | standalone task omits `tzOffset` |
|
|
87
|
+
| `ACTIVITY_EXPERIMENT_UNSUPPORTED` | task enables or configures an experiment |
|
|
88
|
+
| `ACTIVITY_CONTENT_GROUPS_UNSUPPORTED` | task has more than one experiment-style content group |
|
|
89
|
+
| `ACTIVITY_TIMEZONE_MISMATCH` | task timezone differs from the parent activity |
|
|
90
|
+
| `ACTIVITY_SCHEDULE_OUT_OF_RANGE` | task schedule is outside the activity period |
|
|
76
91
|
| `TRIGGER_TIME_REQUIRED` | schedule-single missing `triggerTime` |
|
|
77
92
|
| `CHANNEL_NOT_FOUND` | source channel missing / type mismatch |
|
|
78
93
|
| `TASK_COUNT_LIMIT` | project task count limit exceeded |
|
|
@@ -30,7 +30,7 @@ ae-cli engage-activity topic copy --project-id <project_id> --topic-id <topic_id
|
|
|
30
30
|
|
|
31
31
|
| Command | Required flags | Notes |
|
|
32
32
|
|---|---|---|
|
|
33
|
-
| create | `--project-id`, `--payload` | payload = `TopicAddDTO` (camelCase).
|
|
33
|
+
| create | `--project-id`, `--payload` | payload = `TopicAddDTO` (camelCase). `triggerType` must be `0` (schedule single) or `1` (schedule repeat). |
|
|
34
34
|
| update | `--project-id`, `--payload` | payload = `TopicModifyReq` (`topicId` + fields + task lists). |
|
|
35
35
|
| remove-task | `--project-id`, `--task-id` | high-risk; requires `--yes`; no dry-run. Only tasks with a non-empty `topicId`. |
|
|
36
36
|
| delete | `--project-id`, `--topic-id` | high-risk; requires `--yes`; no dry-run. |
|
|
@@ -42,19 +42,19 @@ ae-cli engage-activity topic copy --project-id <project_id> --topic-id <topic_id
|
|
|
42
42
|
TEXT (rich text) params inside `groupContentList[].contentList[].content` need both `value` and Slate `config` (JSON string). If `config` is omitted, Hermes copy/create auto-fills
|
|
43
43
|
`[{"type":"paragraph","children":[{"text":"<value>"}]}]`. See `activity-task.md` Channel content.
|
|
44
44
|
|
|
45
|
-
Topic-level audience uses `topicClusterKey` / `
|
|
45
|
+
Topic-level audience uses `topicClusterKey` / `topicDefinitionRequest`; do **not** pass task-level `clusterKey` at topic root.
|
|
46
46
|
|
|
47
47
|
### Audience (`targetClusterType`)
|
|
48
48
|
|
|
49
49
|
| Value | Required | Notes |
|
|
50
50
|
|---|---|---|
|
|
51
|
-
| `1` (custom) | `
|
|
51
|
+
| `1` (custom) | `topicDefinitionRequest` | Analysis-compatible semantic condition object. |
|
|
52
52
|
| `2` (existed) | `topicClusterKey` | From an existing user cluster. |
|
|
53
53
|
| `3` (all) | — | **Not supported for activity topics** → `TOPIC_TARGET_CLUSTER_TYPE_UNSUPPORTED`. Use standalone `engage-activity task create` for all-users. |
|
|
54
54
|
|
|
55
|
-
**`triggerMixQpVersion`:**
|
|
55
|
+
**`triggerMixQpVersion`:** Capability create/update/copy defaults a blank value to `"4.4"` while compiling the semantic definition.
|
|
56
56
|
|
|
57
|
-
Task-level extra conditions go in `
|
|
57
|
+
Task-level extra conditions go in each task's inclusion-only `definitionRequest`. Keep shared conditions in `topicDefinitionRequest`; Hermes performs the topic-to-task merge through the existing domain service. Topic tasks do not have an independent audience mode. `topic get` returns the canonical task marker `targetClusterType=1`; it may be retained when mapping `taskList` into `modifyTaskList`, but no other value is accepted. Do not pass task-level `clusterKey`, all-users selection, or exclusion filters.
|
|
58
58
|
|
|
59
59
|
### Trigger (`triggerType`)
|
|
60
60
|
|
|
@@ -62,7 +62,16 @@ Task-level extra conditions go in `taskQp` as mix QP under **`totalCFilter` only
|
|
|
62
62
|
|---|---|---|
|
|
63
63
|
| `0` (schedule single) | `triggerTime` (`yyyy-MM-dd HH:mm`, future) | Preferred for CLI create. |
|
|
64
64
|
| `1` (schedule repeat) | `startDate`, `endDate`, `triggerCrontab` | |
|
|
65
|
-
|
|
65
|
+
|
|
66
|
+
Manual (`2`) and every triggered type (`3`-`6`) are rejected with `ACTIVITY_TRIGGER_TYPE_UNSUPPORTED`.
|
|
67
|
+
|
|
68
|
+
### Shared topic configuration
|
|
69
|
+
|
|
70
|
+
- A/B and horse-race experiments are not supported. Omit `expConfig` and use exactly one content group per topic task.
|
|
71
|
+
- The topic owns schedule, activity timezone, channel, frequency limits, channel touch limits, and whitelist.
|
|
72
|
+
- A topic task only owns its name, optional inclusion-only custom audience refinement, one content group, completion indicators, metrics, and description.
|
|
73
|
+
- Do not put schedule, trigger rules, channel, frequency, whitelist, experiment, or `clusterKey` on a topic task. The only accepted task-level `targetClusterType` is the canonical get response value `1`.
|
|
74
|
+
- Keep the topic schedule inside the parent activity period. Create/update/copy requires parent activity `mappingStatus` `0`, `2`, or `5`.
|
|
66
75
|
|
|
67
76
|
## Create Topic Orchestration
|
|
68
77
|
|
|
@@ -72,11 +81,11 @@ Use this workflow when a topic has a shared audience plus one or more task-level
|
|
|
72
81
|
2. **Resolve the parent activity.** Use `activity list|get` to verify the exact `activityId`, editable status, activity dates, and timezone. For a repeated topic, keep `startDate` and `endDate` inside the activity period and interpret the cron in the activity timezone.
|
|
73
82
|
3. **Resolve a real channel.** Query `engage-setting channel list`, then inspect the selected channel before composing content. If several enabled channels match and the user has not specified a provider or an already-confirmed project default, ask which one to use instead of choosing an arbitrary ID.
|
|
74
83
|
4. **Read the channel content contract.** Call `engage-task task build-save-guide` with the known trigger, audience, channel type, and `channelId`. Build every `groupContentList[].contentList[].content` item from `fieldRules.channelContentSchema`; do not infer App Push keys or parameter types from memory.
|
|
75
|
-
5. **Prepare audience and completion inputs.** Resolve real event/property metadata and categorical values through the applicable Analysis workflow. Put the shared condition in `
|
|
76
|
-
6. **Build one native `TopicAddDTO`.** Keep nested payload keys in camelCase. Ensure `tasks` is non-empty,
|
|
84
|
+
5. **Prepare audience and completion inputs.** Resolve real event/property metadata and categorical values through the applicable Analysis workflow. Put the shared condition in `topicDefinitionRequest` or `topicClusterKey`, and only task-specific conditions in each task's `definitionRequest`. For a rolling condition such as "recent N days" that must be evaluated for future repeated sends, prefer a semantic custom definition; use an existing cluster only after confirming that its refresh semantics match the send cadence. Build the completion goal separately in `completionIndicatorDef`.
|
|
85
|
+
6. **Build one native `TopicAddDTO`.** Keep nested payload keys in camelCase. Ensure `tasks` is non-empty, each semantic definition is a JSON object, each task has channel content, and Android/iOS or other variants map to the correct task audience and message.
|
|
77
86
|
7. **Validate the complex payload.** Run `topic create ... --validate` while correcting the nested payload. Inspect `normalized_input` and confirm that the schedule, audience boundaries, message variants, and completion window retain the intended semantics. After `valid=true`, execute the same payload directly; do not add a redundant dry-run by default.
|
|
78
87
|
8. **Create exactly once.** Run `topic create` with the validated payload. A successful response only reports `data.success`; it does not provide enough evidence to declare the whole orchestration complete.
|
|
79
|
-
9. **Resolve IDs and verify the saved topic.** Call `activity info-list` for the parent activity, match the new topic and tasks by their names, then call `topic get` with the returned `topicId`. Verify the channel, dates, cron, topic audience, each task audience, content, completion goal, and draft status.
|
|
88
|
+
9. **Resolve IDs and verify the saved topic.** Call `activity info-list` for the parent activity, match the new topic and tasks by their names, then call `topic get` with the returned `topicId`. Verify the channel, dates, cron, semantic topic audience, each semantic task audience, content, completion goal, and draft status.
|
|
80
89
|
10. **Verify generated audiences before reporting completion.** Read the generated topic/task cluster keys with the applicable cluster query and wait for terminal computation state. Require `refresh_status=success`, `progress=100`, `real_available=1`, and `cluster_valid=1`. A zero-user result may be valid, but reconcile it with the discovered categorical values and business expectation. If computation fails, correct only the verified cause and re-check; do not retry an unchanged request or report the topic as fully ready.
|
|
81
90
|
|
|
82
91
|
Recommended command order:
|
|
@@ -95,7 +104,7 @@ activity list/get
|
|
|
95
104
|
|
|
96
105
|
## Output
|
|
97
106
|
|
|
98
|
-
- `get`: `data.topic` (includes `topicClusterKey` for
|
|
107
|
+
- `get`: `data.topic` (includes `topicClusterKey` for an existing audience or `topic_definition_request` plus conversion status for a custom audience).
|
|
99
108
|
- `create` / `update` / `remove-task` / `delete` / `copy`: `data.success`.
|
|
100
109
|
- `copy` may include `data.trigger_time_stale=true` when source schedule-single time is already past.
|
|
101
110
|
|
|
@@ -104,7 +113,7 @@ activity list/get
|
|
|
104
113
|
- `remove-task` and `delete` are `high-risk-write` — require `--yes`, no dry-run.
|
|
105
114
|
- `remove-task` only deletes **topic tasks** (`topicId` present). Standalone tasks → use `engage-task task delete`.
|
|
106
115
|
- `copy` duplicates the editable topic config and its tasks (not runtime/approval state).
|
|
107
|
-
- `copy` saves via **draft** add (`isDraft=true`), so a past schedule-single `triggerTime` is allowed; output may include `trigger_time_stale=true`. Update the time before submitting for approval
|
|
116
|
+
- `copy` saves via **draft** add (`isDraft=true`), so a past schedule-single `triggerTime` is allowed; output may include `trigger_time_stale=true`. Update the time before submitting for approval.
|
|
108
117
|
- Prefer `topic get` as a template when inspecting channel/content fields.
|
|
109
118
|
|
|
110
119
|
## Create / update audience errors
|
|
@@ -113,9 +122,16 @@ activity list/get
|
|
|
113
122
|
|---|---|
|
|
114
123
|
| `TOPIC_TARGET_CLUSTER_TYPE_UNSUPPORTED` | `targetClusterType=3` (all); topics only allow 1/2 |
|
|
115
124
|
| `TOPIC_CLUSTER_KEY_REQUIRED` | `targetClusterType=2` missing `topicClusterKey`, or topic-root `clusterKey` alias |
|
|
116
|
-
| `
|
|
117
|
-
| `
|
|
125
|
+
| `TOPIC_DEFINITION_REQUIRED` | `targetClusterType=1` missing `topicDefinitionRequest` |
|
|
126
|
+
| `TOPIC_DEFINITION_INVALID` | `topicDefinitionRequest` is not a semantic condition object |
|
|
118
127
|
| `TARGET_CLUSTER_TYPE_INVALID` | `targetClusterType` not a known enum value |
|
|
128
|
+
| `ACTIVITY_TRIGGER_TYPE_UNSUPPORTED` | topic uses manual or a triggered task type |
|
|
129
|
+
| `ACTIVITY_EXPERIMENT_UNSUPPORTED` | topic or a topic task configures an experiment |
|
|
130
|
+
| `ACTIVITY_CONTENT_GROUPS_UNSUPPORTED` | a topic task has multiple experiment-style content groups |
|
|
131
|
+
| `TOPIC_TASK_OVERRIDE_UNSUPPORTED` | a topic task overrides shared topic settings or selects an independent cluster |
|
|
132
|
+
| `TOPIC_TASK_AUDIENCE_EXCLUSION_UNSUPPORTED` | a topic task definition contains exclusion filters |
|
|
133
|
+
| `ACTIVITY_STATUS_INVALID` | parent activity is not editable |
|
|
134
|
+
| `ACTIVITY_SCHEDULE_OUT_OF_RANGE` | topic schedule is outside the parent activity period |
|
|
119
135
|
|
|
120
136
|
## Copy errors
|
|
121
137
|
|
|
@@ -129,6 +145,8 @@ activity list/get
|
|
|
129
145
|
| `ACTIVITY_NOT_FOUND` | parent activity missing / deleted / wrong project |
|
|
130
146
|
| `TOPIC_TASKS_REQUIRED` | source topic has no tasks |
|
|
131
147
|
| `ACTIVITY_STATUS_INVALID` | parent activity is approving/working/complete |
|
|
148
|
+
| `ACTIVITY_SCHEDULE_OUT_OF_RANGE` | source topic schedule is outside the parent activity period |
|
|
149
|
+
| `ACTIVITY_CONTENT_GROUPS_UNSUPPORTED` | a source topic task has multiple content groups |
|
|
132
150
|
| `TOPIC_COUNT_LIMIT` | activity topic count limit exceeded |
|
|
133
151
|
| `CHANNEL_NOT_FOUND` | source channel missing / type mismatch |
|
|
134
152
|
| `TASK_COUNT_LIMIT` | project task count limit exceeded |
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# ae-engage engage-setting channel create
|
|
2
2
|
|
|
3
|
-
> Trigger keywords: push channel · Mapped command: `ae-cli engage-setting channel create`
|
|
3
|
+
> Trigger keywords: push channel · Mapped command: `ae-cli engage-setting channel create` · Capability id: `engage-setting.channel.create`
|
|
4
4
|
|
|
5
|
-
Create a new Engage push channel.
|
|
5
|
+
Create a new Engage **运营设置** push channel (not config-center channels; those use `engage-scene config-channel`).
|
|
6
|
+
|
|
7
|
+
**First decide channel kind:** Webhook (`channelType=1`) and Client (`channelType=3`) share the same CLI command and outer `--req` fields, but **`config` / `pushIdType` / custom-param prefixes differ**. Do not reuse a webhook payload for client (or the reverse).
|
|
6
8
|
|
|
7
9
|
## Flags
|
|
8
10
|
|
|
@@ -11,67 +13,194 @@ Create a new Engage push channel.
|
|
|
11
13
|
| `--project-id` / `-p` | number | Yes | Project ID |
|
|
12
14
|
| `--req` | json | Yes | Channel creation request JSON object |
|
|
13
15
|
|
|
14
|
-
## `--req` Object Fields
|
|
16
|
+
## `--req` Object Fields (common)
|
|
15
17
|
|
|
16
18
|
| Field | Type | Required | Description |
|
|
17
19
|
|------|------|------|------|
|
|
18
|
-
| `channelType` | number | Yes |
|
|
19
|
-
| `channelSubBizType` | string | Yes |
|
|
20
|
+
| `channelType` | number | Yes | `1` webhook · `3` client (see below) |
|
|
21
|
+
| `channelSubBizType` | string | Yes | must match type: `webhook` or `client` |
|
|
20
22
|
| `channelName` | string | Yes | channel name |
|
|
21
|
-
| `pushIdType` | string | Yes |
|
|
22
|
-
| `config` | string | Yes | channel config JSON string |
|
|
23
|
-
| `enableTouchEvent` | number | Yes |
|
|
24
|
-
| `eventClickName` | string | Yes | click event
|
|
25
|
-
| `eventDeliveryName` | string | Yes | delivery event
|
|
26
|
-
| `touchEventSource` | string | Yes |
|
|
23
|
+
| `pushIdType` | string | Yes | prefixed property code — **rules differ by channel kind** |
|
|
24
|
+
| `config` | string | Yes | channel config JSON **string** — **shape differs by channel kind** |
|
|
25
|
+
| `enableTouchEvent` | number | Yes | reach funnel: `0` off · `1` on |
|
|
26
|
+
| `eventClickName` | string | Yes when funnel on | click event (e.g. `ops_click`) |
|
|
27
|
+
| `eventDeliveryName` | string | Yes when funnel on | delivery event (e.g. `ops_view`) |
|
|
28
|
+
| `touchEventSource` | string | Yes | usually `custom` for custom event names |
|
|
27
29
|
|
|
28
|
-
The outer Capability input uses `project_id` and `req`; fields inside `req` keep the native camelCase DTO shape
|
|
30
|
+
The outer Capability input uses `project_id` and `req`; fields inside `req` keep the native camelCase DTO shape. The Hermes Capability handler assigns the outer `--project-id` to `req.projectId`.
|
|
29
31
|
|
|
30
32
|
## Response shape
|
|
31
33
|
|
|
32
|
-
The created channel is under `data.item`;
|
|
33
|
-
`channel_id`, `channel_status`, and `channel_type`.
|
|
34
|
+
The created channel is under `data.item`; response keys recursively use snake_case (`channel_id`, `channel_status`, `channel_type`).
|
|
34
35
|
|
|
35
|
-
##
|
|
36
|
+
## Webhook vs Client (read this first)
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
| | **Webhook** | **Client** |
|
|
39
|
+
|--|-------------|------------|
|
|
40
|
+
| `channelType` | `1` | `3` |
|
|
41
|
+
| `channelSubBizType` | `webhook` | `client` |
|
|
42
|
+
| `config.url` | **HTTP(S) callback URL** (server endpoint that receives the push) | **Client config key / scene id** (e.g. `popup`, `abtest`, `difficulty_ratio`) — **not** an `http://` URL |
|
|
43
|
+
| `pushIdType` | Prefer **`user:`** user properties (e.g. `user:#account_id`) | **`user:`** or **`client:`** (e.g. `user:#account_id`, `client:#distinct_id`) |
|
|
44
|
+
| `config.userParamsList[].columnName` | Prefer **`user:`** only (validated against user dispatch props) | **`user:`** and/or **`client:`** (validated against user props + client-param list) |
|
|
45
|
+
| `config.authConfig` | Optional HTTP auth (`enable` / `secretKey` / `secretType`) | Usually omit / unused |
|
|
46
|
+
| `config.paramsList` | Content template — same type enum for both | Same |
|
|
47
|
+
| Reach funnel | Same outer fields | Same |
|
|
38
48
|
|
|
39
|
-
|
|
40
|
-
- `2`: `APP_PUSH`
|
|
41
|
-
- `3`: `CLIENT_PUSH`
|
|
42
|
-
- `4`: `WECHAT`
|
|
43
|
-
- `5`: `DOU_YIN`
|
|
49
|
+
Prefix convention (aligned with 配置中心通道管理):
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
- User property → `user:<prop_name>` (e.g. `user:#account_id`, `user:city`)
|
|
52
|
+
- Client parameter → `client:<column_name>` (e.g. `client:#os`, `client:#distinct_id`)
|
|
53
|
+
- Never pass bare `#account_id` / `city` for `pushIdType` or `columnName`
|
|
46
54
|
|
|
47
|
-
|
|
55
|
+
## Preflight
|
|
48
56
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
- `apns`: App Push, Apple Push Notification Service
|
|
53
|
-
- `client`: Client Push
|
|
54
|
-
- `wechat_mini_game`: WeChat mini game
|
|
55
|
-
- `dou_yin_recommended_game_card`: Douyin recommended game card
|
|
57
|
+
```bash
|
|
58
|
+
# User properties (both kinds; required for webhook custom params)
|
|
59
|
+
ae-cli analysis-meta property list --project-id <id> --scope user --query <kw> --limit 50
|
|
56
60
|
|
|
57
|
-
|
|
61
|
+
# Client parameters (client channel pushId / custom params)
|
|
62
|
+
ae-cli engage-setting client-param list --project-id <id>
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
-
|
|
64
|
+
# Optional: copy a real config shape
|
|
65
|
+
ae-cli engage-setting channel list --project-id <id>
|
|
66
|
+
ae-cli engage-setting channel get --project-id <id> --channel-id <id>
|
|
67
|
+
```
|
|
61
68
|
|
|
62
|
-
|
|
69
|
+
If a property / client-param is not found after list/get, stop — do not invent codes.
|
|
63
70
|
|
|
64
|
-
|
|
65
|
-
- `req.channelSubBizType` should match the actual channel capability; for example, when `channelType=1`, `webhook` is usually used.
|
|
66
|
-
- If delivery or click callbacks are required, also check that `eventDeliveryName`, `eventClickName`, and `touchEventSource` are complete.
|
|
71
|
+
---
|
|
67
72
|
|
|
68
|
-
##
|
|
73
|
+
## A. Webhook channel
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
channelType=1, channelSubBizType=webhook
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Webhook `config` JSON (stringified into `req.config`)
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"url": "https://example.com/hook",
|
|
84
|
+
"paramsList": [
|
|
85
|
+
{ "key": "title", "keyName": "标题", "type": "STRING", "required": 0 },
|
|
86
|
+
{ "key": "body", "keyName": "动态正文", "type": "TEXT", "required": 0, "tips": "$[user:city]" }
|
|
87
|
+
],
|
|
88
|
+
"userParamsList": [
|
|
89
|
+
{
|
|
90
|
+
"key": "uid",
|
|
91
|
+
"columnName": "user:#account_id",
|
|
92
|
+
"defaultValue": "-",
|
|
93
|
+
"columnDesc": "账号 ID"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"authConfig": { "enable": false }
|
|
97
|
+
}
|
|
98
|
+
```
|
|
69
99
|
|
|
70
|
-
|
|
100
|
+
| Field | Required | Notes |
|
|
101
|
+
|-------|----------|-------|
|
|
102
|
+
| `url` | Yes | Real HTTP(S) webhook endpoint |
|
|
103
|
+
| `paramsList` | No | Content template definitions |
|
|
104
|
+
| `userParamsList` | No | Custom params; `columnName` = `user:…`; `defaultValue` must be non-blank |
|
|
105
|
+
| `authConfig` | No | When `enable=true`, `secretKey` required |
|
|
71
106
|
|
|
72
|
-
|
|
107
|
+
Do **not** put `client:…` in webhook `userParamsList` unless you have confirmed the environment accepts it — create validation uses **user** dispatch props.
|
|
108
|
+
|
|
109
|
+
### Webhook example
|
|
73
110
|
|
|
74
111
|
```bash
|
|
75
112
|
ae-cli engage-setting channel create --project-id 1 \
|
|
76
|
-
--req '{"channelType":1,"channelSubBizType":"webhook","channelName":"
|
|
113
|
+
--req '{"channelType":1,"channelSubBizType":"webhook","channelName":"demo_webhook","pushIdType":"user:#account_id","config":"{\"url\":\"https://example.com/hook\",\"paramsList\":[{\"key\":\"title\",\"keyName\":\"标题\",\"type\":\"STRING\",\"required\":0}],\"userParamsList\":[{\"key\":\"city\",\"columnName\":\"user:city\",\"defaultValue\":\"-\"}],\"authConfig\":{\"enable\":false}}","enableTouchEvent":1,"eventDeliveryName":"ops_view","eventClickName":"ops_click","touchEventSource":"custom"}'
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## B. Client channel
|
|
119
|
+
|
|
120
|
+
```text
|
|
121
|
+
channelType=3, channelSubBizType=client
|
|
77
122
|
```
|
|
123
|
+
|
|
124
|
+
### Client `config` JSON (stringified into `req.config`)
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"url": "popup",
|
|
129
|
+
"paramsList": [
|
|
130
|
+
{ "key": "messageType", "keyName": "消息类型", "type": "NUM", "required": 0 },
|
|
131
|
+
{
|
|
132
|
+
"key": "gifts",
|
|
133
|
+
"keyName": "礼包",
|
|
134
|
+
"type": "OBJ_ARRAY",
|
|
135
|
+
"required": 0,
|
|
136
|
+
"objArray": [
|
|
137
|
+
{ "key": "gift_name", "keyName": "道具名", "type": "STRING", "required": 0 },
|
|
138
|
+
{ "key": "count", "keyName": "数量", "type": "NUM", "required": 0 }
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"userParamsList": [
|
|
143
|
+
{
|
|
144
|
+
"key": "os",
|
|
145
|
+
"columnName": "client:#os",
|
|
146
|
+
"defaultValue": "-",
|
|
147
|
+
"columnDesc": "操作系统"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"key": "city",
|
|
151
|
+
"columnName": "user:city",
|
|
152
|
+
"defaultValue": "-",
|
|
153
|
+
"columnDesc": "城市"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
| Field | Required | Notes |
|
|
160
|
+
|-------|----------|-------|
|
|
161
|
+
| `url` | Yes | **Client scene / config key** (string id like `popup`, `abtest`) — not an HTTP URL |
|
|
162
|
+
| `paramsList` | No | Content template (same type enum as webhook) |
|
|
163
|
+
| `userParamsList` | No | `columnName` may be `user:…` **or** `client:…`; `defaultValue` non-blank |
|
|
164
|
+
| `authConfig` | No | Usually omit |
|
|
165
|
+
|
|
166
|
+
`pushIdType` examples: `user:#account_id`, `client:#distinct_id` (discover client codes via `client-param list`).
|
|
167
|
+
|
|
168
|
+
### Client example
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
ae-cli engage-setting channel create --project-id 1 \
|
|
172
|
+
--req '{"channelType":3,"channelSubBizType":"client","channelName":"demo_client","pushIdType":"client:#distinct_id","config":"{\"url\":\"popup\",\"paramsList\":[{\"key\":\"type\",\"keyName\":\"场景\",\"type\":\"STRING\",\"required\":0}],\"userParamsList\":[{\"key\":\"os\",\"columnName\":\"client:#os\",\"defaultValue\":\"-\"}]}","enableTouchEvent":0,"eventClickName":"","eventDeliveryName":"","touchEventSource":"custom"}'
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Content template types (`paramsList[].type`) — both kinds
|
|
178
|
+
|
|
179
|
+
| type | Meaning |
|
|
180
|
+
|------|---------|
|
|
181
|
+
| `STRING` | 文本 |
|
|
182
|
+
| `TEXT` | 动态文本 (`$[user:…]` / `$[client:…]` placeholders) |
|
|
183
|
+
| `NUM` | 数值 |
|
|
184
|
+
| `OBJ_ARRAY` | 对象组 (`objArray` children required) |
|
|
185
|
+
| `DATE` | 日期 |
|
|
186
|
+
| `DATE_TIME` | 时间 |
|
|
187
|
+
| `ARRAY` | 列表 |
|
|
188
|
+
| `SINGLE_SELECT` | 单选下拉 (**requires** existing config-table `tableId`) |
|
|
189
|
+
| `RADIO` | 单选 |
|
|
190
|
+
|
|
191
|
+
`required`: `0` optional · `1` required. `OBJ_ARRAY` children: `STRING` / `NUM` / `DATE` / `DATE_TIME` / `TEXT` / `SINGLE_SELECT` only.
|
|
192
|
+
|
|
193
|
+
## Other channel types
|
|
194
|
+
|
|
195
|
+
`channelType` also supports `2` APP_PUSH (`fcm` / `aurora` / `apns`), `4` WECHAT, `5` DOU_YIN — each has its own `config` DTO. Discover with `channel get` on an existing channel of that subtype before creating; do not invent FCM/APNs secrets.
|
|
196
|
+
|
|
197
|
+
## Additional Constraints
|
|
198
|
+
|
|
199
|
+
- `req.config` must be a **JSON string**, not a nested object in the CLI flag.
|
|
200
|
+
- Match `channelSubBizType` to `channelType` (`1`↔`webhook`, `3`↔`client`).
|
|
201
|
+
- When `enableTouchEvent=1`, set `touchEventSource` plus delivery/click event names.
|
|
202
|
+
- For webhook tests, prefer a known mock URL from `channel get` rather than inventing production endpoints.
|
|
203
|
+
|
|
204
|
+
## Safety Constraints
|
|
205
|
+
|
|
206
|
+
This command is a **write operation**. Verify `--req` completeness and the correct webhook vs client rules before executing.
|
|
@@ -14,20 +14,16 @@ Use this sequence when creating or updating a task draft:
|
|
|
14
14
|
|
|
15
15
|
1. Query channels with `ae-cli engage-setting channel list --project-id <projectId>`.
|
|
16
16
|
2. Call `ae-cli engage-task task build-save-guide --project-id <projectId> --req '{...}'`.
|
|
17
|
-
3.
|
|
17
|
+
3. Use semantic definitions for audience, trigger, and completion fields:
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
ae-cli engage-setting query cluster-qp-skill --project-id <projectId> --response-mode full --condition-subtype all
|
|
23
|
-
```
|
|
19
|
+
- `targetConfig.definitionRequest`
|
|
20
|
+
- `triggerConfig.triggerDefinition` (required for `triggerType=3/4/5`)
|
|
21
|
+
- `completionIndicatorDef.completionIndicators[].eventDefinition`
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- `clientConfig.clientQp`
|
|
30
|
-
- `completionIndicatorDef.event`
|
|
23
|
+
Build event primitives from `ae-analysis` user-cluster / audience models. Hermes wraps those
|
|
24
|
+
primitives in the task-specific envelope selected by `channelType`, `triggerType`, and
|
|
25
|
+
`eventTriggerType`, then validates the final persisted QP before save. Never construct persisted
|
|
26
|
+
execution QP.
|
|
31
27
|
|
|
32
28
|
For existing-cluster audiences (`targetClusterType=2`), you may copy server-authored definitions via:
|
|
33
29
|
|
|
@@ -41,11 +37,8 @@ ae-cli analysis user-cluster get --project-id <projectId> --cluster-names '["<cl
|
|
|
41
37
|
Important:
|
|
42
38
|
|
|
43
39
|
- Do not treat audience creation as a fixed preflight step.
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
- `triggerConfig.triggerRule`
|
|
47
|
-
- `clientConfig.clientQp`
|
|
48
|
-
- `completionIndicatorDef.event`
|
|
40
|
+
- Discover event/property metadata when semantic definitions reference those fields.
|
|
41
|
+
- Omit the server-authored `clientConfig.clientQp`; partial updates preserve it.
|
|
49
42
|
|
|
50
43
|
---
|
|
51
44
|
|
|
@@ -64,6 +57,7 @@ Common request patterns:
|
|
|
64
57
|
```bash
|
|
65
58
|
ae-cli engage-task task build-save-guide --project-id 1 --req '{}'
|
|
66
59
|
ae-cli engage-task task build-save-guide --project-id 1 --req '{"context":{"triggerType":2,"channelId":"channel_123"}}'
|
|
60
|
+
ae-cli engage-task task build-save-guide --project-id 1 --req '{"context":{"channelType":2,"triggerType":3,"eventTriggerType":2}}'
|
|
67
61
|
ae-cli engage-task task build-save-guide --project-id 1 --req '{"draft":{"baseInfo":{"taskName":"Demo Task"}}}'
|
|
68
62
|
```
|
|
69
63
|
|
|
@@ -92,6 +86,7 @@ Use `context` when you want scenario-specific guidance without writing a partial
|
|
|
92
86
|
Typical fields:
|
|
93
87
|
|
|
94
88
|
- `triggerType`
|
|
89
|
+
- `eventTriggerType`
|
|
95
90
|
- `targetClusterType`
|
|
96
91
|
- `channelType`
|
|
97
92
|
- `channelId`
|
|
@@ -104,7 +99,9 @@ Example:
|
|
|
104
99
|
```json
|
|
105
100
|
{
|
|
106
101
|
"context": {
|
|
107
|
-
"
|
|
102
|
+
"channelType": 2,
|
|
103
|
+
"triggerType": 3,
|
|
104
|
+
"eventTriggerType": 2,
|
|
108
105
|
"targetClusterType": 2,
|
|
109
106
|
"channelId": "channel_123"
|
|
110
107
|
}
|
|
@@ -190,7 +187,7 @@ This section describes the high-level contract:
|
|
|
190
187
|
|
|
191
188
|
- final tool is `save_task`
|
|
192
189
|
- required preflight is `query_channel_list -> build_task_save_guide`
|
|
193
|
-
-
|
|
190
|
+
- audience, trigger, and completion conditions use semantic definitions
|
|
194
191
|
- `save_task.req` must be a grouped JSON object
|
|
195
192
|
|
|
196
193
|
### 4.6 `scenario`
|
|
@@ -224,6 +221,8 @@ It includes:
|
|
|
224
221
|
|
|
225
222
|
- grouped block rules
|
|
226
223
|
- structured conditional rules
|
|
224
|
+
- the server/client × `triggerType` × `eventTriggerType` combination matrix
|
|
225
|
+
- type-specific aggregate, continuous, ordered, and every-completion event shapes
|
|
227
226
|
- related-parameter rules
|
|
228
227
|
- unsupported fields / values / combinations
|
|
229
228
|
- `channelContentSchema`
|
|
@@ -248,6 +247,25 @@ Do not invent free-form content items such as:
|
|
|
248
247
|
|
|
249
248
|
Instead, use the valid item structure and put message text into `value`.
|
|
250
249
|
|
|
250
|
+
#### `fieldRules.blocks.triggerConfig.triggerDefinitionSchema`
|
|
251
|
+
|
|
252
|
+
For event-triggered tasks, read all of these fields before constructing `triggerDefinition`:
|
|
253
|
+
|
|
254
|
+
- `combinationMatrix`
|
|
255
|
+
- `ruleFields`
|
|
256
|
+
- `eventShapes`
|
|
257
|
+
- `examples`
|
|
258
|
+
|
|
259
|
+
The guide treats the A rule as a discriminated envelope:
|
|
260
|
+
|
|
261
|
+
- `eventTriggerType=0`: aggregate events
|
|
262
|
+
- `eventTriggerType=1`: exactly one count/eq event with value at least 2, plus optional blacklist
|
|
263
|
+
- `eventTriggerType=2`: at least two ordered steps with `eventDefinition` and `hasDone`
|
|
264
|
+
- `eventTriggerType=3`: client-side count/eq/1 events with `eventTriggerCaliberType`
|
|
265
|
+
|
|
266
|
+
Do not copy the accumulated example and only change `eventTriggerType`. Hermes rejects a final QP
|
|
267
|
+
whose event structure does not match its envelope.
|
|
268
|
+
|
|
251
269
|
### 4.9 `handoff`
|
|
252
270
|
|
|
253
271
|
This is the final section before `save_task`.
|
|
@@ -278,14 +296,9 @@ Recommended usage pattern:
|
|
|
278
296
|
3. read `fieldRules.channelContentSchema`
|
|
279
297
|
4. read `handoff.reqTemplate`
|
|
280
298
|
5. fix everything in `blockingPlaceholders`
|
|
281
|
-
6. if the guide points to an audience or
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
ae-cli analysis user-cluster create --project-id <projectId> --cluster-name <condition_cluster_name> --display-name <display_name> --definition-request '<semantic-definition-json>'
|
|
285
|
-
ae-cli analysis user-cluster get --project-id <projectId> --cluster-names '["<condition_cluster_name>"]'
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
7. prefer the created cluster reference; only copy server-authored fields from `user-cluster get` when the guide explicitly requires QP-derived fields
|
|
299
|
+
6. if the guide points to an audience, trigger, or completion condition, add the semantic
|
|
300
|
+
definition directly
|
|
301
|
+
7. omit `clientConfig.clientQp`; partial updates preserve the server-authored value
|
|
289
302
|
8. call `engage-task task save`
|
|
290
303
|
|
|
291
304
|
---
|
|
@@ -19,8 +19,8 @@ ae-cli engage-setting channel update-config \
|
|
|
19
19
|
| `--channel-id` | Yes | Channel ID to update. |
|
|
20
20
|
| `--enable-touch-event` | Yes | Reach funnel toggle: `1` enabled, `0` disabled. |
|
|
21
21
|
| `--channel-name` | No | New channel name. |
|
|
22
|
-
| `--push-id-type` | No |
|
|
23
|
-
| `--config` | No | Channel
|
|
22
|
+
| `--push-id-type` | No | Prefixed push ID: webhook prefers `user:…`; client allows `user:…` or `client:…` (see `add-channel.md`). |
|
|
23
|
+
| `--config` | No | Channel JSON string. Webhook `url` = HTTP(S); client `url` = scene key. Custom `columnName` prefixes differ — see `add-channel.md`. |
|
|
24
24
|
| `--touch-event-source` | No | Reach event source. |
|
|
25
25
|
| `--event-delivery-name` | No | Actual delivery event name. |
|
|
26
26
|
| `--event-click-name` | No | Click event name. |
|
|
@@ -33,4 +33,5 @@ ae-cli engage-setting channel update-config \
|
|
|
33
33
|
|
|
34
34
|
- Use this command when the user asks to edit/update an existing channel's name, config, push-id type, or reach-funnel settings.
|
|
35
35
|
- `--config` is the channel-specific JSON config; discover the existing config with `ae-cli engage-setting channel get` first rather than inventing it.
|
|
36
|
+
- Keep webhook vs client rules from `add-channel.md` when editing `url` / `pushIdType` / `userParamsList`.
|
|
36
37
|
- Risk is `write`; ordinary update, no confirmation gate.
|