@thinkingai/ae-cli 6.1.11 → 6.1.12

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 (27) hide show
  1. package/dist/{capability-TPORIKRQ.js → capability-DRLGDVS4.js} +5 -2
  2. package/dist/{capability-VQNC5CF7.js → capability-P6GK3AQH.js} +5 -2
  3. package/dist/index.js +3 -3
  4. package/dist/{te-engage-FMYAYCNV.js → te-engage-L72HWRGO.js} +396 -26
  5. package/dist/{te-engage-F7V55KVW.js → te-engage-QWM4GFS7.js} +396 -26
  6. package/dist/{te-experiment-UPDMHCAJ.js → te-experiment-2T2HEZML.js} +109 -3
  7. package/dist/{te-experiment-JWXOYJ3W.js → te-experiment-PVEY7AEZ.js} +109 -3
  8. package/package.json +2 -2
  9. package/skills/ae-engage/SKILL.md +12 -2
  10. package/skills/ae-engage/references/activity-data-detail.md +61 -0
  11. package/skills/ae-engage/references/build-task-save-guide.md +25 -1
  12. package/skills/ae-engage/references/common-metric.md +45 -0
  13. package/skills/ae-engage/references/preset-event.md +2 -0
  14. package/skills/ae-engage/references/save-flow.md +14 -0
  15. package/skills/ae-engage/references/save-task.md +35 -0
  16. package/skills/ae-engage/references/scene-strategy-audience.md +12 -7
  17. package/skills/ae-experiment/SKILL.md +17 -4
  18. package/skills/ae-experiment/references/delete_metric.md +2 -0
  19. package/skills/ae-experiment/references/query_experiment_metric_trend.md +5 -5
  20. package/skills/ae-experiment/references/query_experiment_report_summary.md +4 -3
  21. package/skills/ae-experiment/references/query_experiment_sample_size_report.md +6 -5
  22. package/skills/ae-experiment/references/save_build_guide.md +39 -0
  23. package/skills/ae-experiment/references/save_experiment.md +7 -0
  24. package/skills/ae-experiment/references/save_metric.md +5 -1
  25. package/skills/ae-experiment/references/save_validate.md +33 -0
  26. package/skills/ae-experiment-design/references/platform-operations.md +9 -3
  27. package/skills/ae-experiment-insight/references/platform-operations.md +9 -3
@@ -1,12 +1,13 @@
1
- # capability run experiment.report.sample-size
1
+ # experiment report sample-size
2
2
 
3
3
  Query experiment sample-size report.
4
4
 
5
5
  ```bash
6
- ae-cli capability run experiment.report.sample-size --input '{"project_id":1,"exp_id":"exp_123","start_time":"2026-07-01","end_time":"2026-07-07","by_hour":false}'
6
+ ae-cli experiment report sample-size --project-id 1 --exp-id exp_123 --start-time 2026-07-01 --end-time 2026-07-07
7
+ ae-cli experiment report sample-size --project-id 1 --exp-id exp_123 --start-time 2026-07-01 --end-time 2026-07-07 --by-hour true
7
8
  ```
8
9
 
9
- Required input: `project_id`, `exp_id`, `start_time`, `end_time`.
10
- Optional input: `request_id`, `force_refresh`, `by_hour`.
10
+ Required flags: `--project-id`, `--exp-id`, `--start-time`, `--end-time`.
11
+ Optional: `--request-id`, `--force-refresh`, `--by-hour`.
11
12
 
12
- Response shape: `data.report`, with recursively snake_case keys. Preserve `request_id` for cancellation.
13
+ Response shape: `data.report`, with recursively snake_case keys. Preserve `request_id` for cancellation via `capability run experiment.query.cancel`.
@@ -0,0 +1,39 @@
1
+ # experiment save build-guide
2
+
3
+ Build a read-only save guide for feature, traffic layer, experiment, or metric saves.
4
+
5
+ ```bash
6
+ ae-cli experiment save build-guide --project-id <id> --operation-mode save_experiment
7
+ ```
8
+
9
+ Flags:
10
+ - `--project-id`, `-p`: Project ID.
11
+ - `--operation-mode`: `save_feature`, `save_traffic_layer`, `save_experiment`, or `save_metric`.
12
+
13
+ ## CRITICAL — do not copy `example_args.req` keys verbatim
14
+
15
+ Guide responses are recursively snake_cased for display. That wrongly rewrites nested DTO
16
+ placeholders inside `data.guide.example_args.req` (for example `expName` → `exp_name`,
17
+ `metricId` → `metric_id`).
18
+
19
+ Those snake_case keys are **not** valid `--req` fields for the final save commands.
20
+
21
+ Authoritative field names:
22
+
23
+ | Mode | Inspect / final save | Nested `--req` style |
24
+ | --- | --- | --- |
25
+ | `save_experiment` | `experiment.experiment.save` | camelCase (`expName`, `trafficLayerId`, …) |
26
+ | `save_metric` | `experiment.metric.save` | camelCase (`metricId`, `metricDefinition`, …) |
27
+ | `save_feature` | `experiment.feature.save` | camelCase (`featureKey`, `targetPlatform`, …) |
28
+ | `save_traffic_layer` | `experiment.traffic-layer.save` | camelCase (`bucketId`, `layerName`, …) |
29
+
30
+ Before composing `--req`:
31
+
32
+ 1. Read `data.guide.required_fields` / `mode_rules` for **what** is required (names there may
33
+ already be camelCase).
34
+ 2. Treat `example_args.req` as structure-only placeholders; **rename keys to camelCase**.
35
+ 3. Prefer `ae-cli capability inspect <final-save-capability-id>` `input_schema.properties.req`
36
+ when unsure.
37
+ 4. Then run `experiment save validate` and the final `experiment … save`.
38
+
39
+ Response shape: `data.guide`.
@@ -16,6 +16,12 @@ Flags:
16
16
  - Capability input uses outer `project_id`; nested `req` fields remain native camelCase. Hermes overwrites `req.projectId` with the outer project ID.
17
17
  - Never call this with `req=null`, `req={}`, or a modify payload containing only `expId`; those are terminal validation failures.
18
18
  - On `valid=false`, do not retry the same payload. Fix the reported field(s) or ask the user for missing input.
19
+ - **Do not** paste `save build-guide` / `save validate` `example_args.req` keys into `--req`.
20
+ Those responses snake_case nested placeholders (`exp_name`). Final save requires camelCase
21
+ (`expName`, `expSupposition`, `trafficLayerId`, `featureKeyList`, `metrics[].metricId`, …).
22
+ If unsure, run `ae-cli capability inspect experiment.experiment.save` and copy
23
+ `input_schema.properties.req` field names. `save validate` may return `valid: true` for
24
+ snake_case `req` and still fail here with `unknown field …`.
19
25
 
20
26
  Response shape is `data.result`. Object keys inside the result are recursively snake_case. A create commonly returns the new experiment ID as `data.result`; a patch commonly returns `true`.
21
27
 
@@ -36,6 +42,7 @@ Nested payload fields must match the server DTO types, not just the visible CLI
36
42
  - `groups[].allocation` rule: each value must be an **integer**, and the **sum of all group allocations must equal `100` exactly** (for example `34 + 33 + 33 = 100`, not `33 + 33 + 33 = 99` and not decimal thirds).
37
43
  - `groups[].expGroupValue` is a JSON-encoded string of a string array. Pass a string whose content is a JSON array, not a native JSON array.
38
44
  - `metrics` is an array of metric binding objects. Each object contains `metricId` and `metricRole`.
45
+ - Every `metricId` must come from `experiment metric list` for the same project. If save returns `error_code: METRIC_NOT_FOUND`, create the metric with `experiment metric save`, verify it, and then retry the experiment save.
39
46
 
40
47
  ## Modes
41
48
 
@@ -8,10 +8,14 @@ ae-cli experiment metric save --project-id <id> --req '<json>'
8
8
 
9
9
  Flags:
10
10
  - `--project-id`, `-p`: Project ID.
11
- - `--req`: Metric save request JSON object.
11
+ - `--req`: Metric save request JSON object (**camelCase** keys such as `metricId`, `metricDefinition`).
12
12
 
13
13
  Create mode requires metric identifiers and metric configuration. Modify mode uses `update=true`.
14
14
 
15
+ Do not paste `save build-guide` / `save validate` `example_args.req` keys (`metric_id`, …) into
16
+ `--req`. Those responses snake_case nested placeholders; final save requires camelCase.
17
+ See [`save_build_guide.md`](save_build_guide.md) / [`save_validate.md`](save_validate.md).
18
+
15
19
  ## Semantic Metric Contract
16
20
 
17
21
  - Supply metric QP as `req.metricDefinition`.
@@ -0,0 +1,33 @@
1
+ # experiment save validate
2
+
3
+ Dry-run helper for save payloads. Does **not** persist data.
4
+
5
+ ```bash
6
+ ae-cli experiment save validate --project-id <id> --operation-mode save_experiment --req '{"expName":"Demo"}'
7
+ ```
8
+
9
+ Flags:
10
+ - `--project-id`, `-p`: Project ID.
11
+ - `--operation-mode`: `save_feature`, `save_traffic_layer`, `save_experiment`, or `save_metric`.
12
+ - `--req`: Candidate save request object. **Must use native camelCase DTO keys.**
13
+
14
+ ## CRITICAL — `valid: true` is not a save schema pass
15
+
16
+ `experiment.save.validate` checks operation-mode / outer helper contract. It does **not**
17
+ fully enforce the final save capability `input_schema`.
18
+
19
+ Consequences:
20
+
21
+ - `--req '{"exp_name":"Demo"}'` can return `valid: true`.
22
+ - The same payload fails on `experiment experiment save` with `unknown field exp_name`.
23
+
24
+ Rules:
25
+
26
+ 1. Never submit snake_case DTO keys in `--req` (`exp_name`, `metric_id`, `feature_key`, …).
27
+ 2. Do not trust `data.validation.example_args.req` key casing; rebuild with camelCase.
28
+ 3. After `valid: true`, still use camelCase and prefer
29
+ `ae-cli … save --dry-run` / `capability inspect` before a real write.
30
+ 4. On final save `INVALID_CAPABILITY_INPUT` / `unknown field`, fix casing — do not widen
31
+ the payload with more snake_case keys.
32
+
33
+ Response shape: `data.validation`.
@@ -9,7 +9,7 @@ All platform operations must use `ae-cli`. Do not call raw APIs, use browser aut
9
9
  Use curated commands when their contract is known. Use the Capability Gateway for experiment capabilities that do not yet have a curated command:
10
10
 
11
11
  ```bash
12
- ae-cli capability search "<terms>" [--project-id <id>]
12
+ ae-cli capability search "<terms>" --domain <domain> [--project-id <id>]
13
13
  ae-cli capability inspect <capability-id> --project-id <id>
14
14
  ae-cli capability validate <capability-id> --input '<json-object>'
15
15
  ae-cli capability dry-run <capability-id> --input '<json-object>'
@@ -30,10 +30,16 @@ After every `ae-cli` invocation, inspect stderr and `_notice.host_compat`. If a
30
30
 
31
31
  ## Project gate
32
32
 
33
- Resolve an unverified project through:
33
+ When the user supplies a project ID, resolve it directly:
34
34
 
35
35
  ```bash
36
- ae-cli analysis project info list --query "<project name>" --fields '["project_id","project_name"]' --limit 20 --offset 0
36
+ ae-cli project info get --project-id <id>
37
+ ```
38
+
39
+ When the user supplies only a project name, search and disambiguate:
40
+
41
+ ```bash
42
+ ae-cli project info list --query "<project name>" --fields '["project_id","project_name"]' --limit 20 --offset 0
37
43
  ```
38
44
 
39
45
  Reuse a project only when its ID and host were verified in the same continuous conversation. If multiple projects match, stop and ask the user to choose.
@@ -9,7 +9,7 @@ All platform discovery and reads must use `ae-cli`. Do not call raw APIs, use br
9
9
  Use the Capability Gateway when no curated experiment command exists:
10
10
 
11
11
  ```bash
12
- ae-cli capability search "<terms>" [--project-id <id>]
12
+ ae-cli capability search "<terms>" --domain <domain> [--project-id <id>]
13
13
  ae-cli capability inspect <capability-id> --project-id <id>
14
14
  ae-cli capability run <capability-id> --input '<json-object>'
15
15
  ```
@@ -22,10 +22,16 @@ After every `ae-cli` invocation, inspect stderr and `_notice.host_compat`. If pr
22
22
 
23
23
  ## Resolution gates
24
24
 
25
- Resolve the project first:
25
+ When the user supplies a project ID, resolve it directly:
26
26
 
27
27
  ```bash
28
- ae-cli analysis project info list --query "<project name>" --fields '["project_id","project_name"]' --limit 20 --offset 0
28
+ ae-cli project info get --project-id <id>
29
+ ```
30
+
31
+ When the user supplies only a project name, search and disambiguate:
32
+
33
+ ```bash
34
+ ae-cli project info list --query "<project name>" --fields '["project_id","project_name"]' --limit 20 --offset 0
29
35
  ```
30
36
 
31
37
  Then discover experiment list/get capabilities and resolve the exact experiment by verified ID or exact-match name. If multiple candidates remain, ask the user.