@thinkingai/ae-cli 6.0.36 → 6.0.38

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 (41) hide show
  1. package/README.md +216 -150
  2. package/README.zh.md +224 -159
  3. package/dist/{auth-B2BRSYMS.js → auth-56Z45UVR.js} +1 -1
  4. package/dist/{capability-6KPXYNO7.js → capability-2H6PAOA3.js} +1 -1
  5. package/dist/{capability-ROKYESAP.js → capability-YPOQX6PL.js} +1 -1
  6. package/dist/{chunk-JTKMDN4A.js → chunk-KTYR3U6D.js} +471 -31
  7. package/dist/{chunk-EBPXT3TN.js → chunk-LHVM35J4.js} +1 -1
  8. package/dist/{chunk-RRFK2W7I.js → chunk-PVBYJWC2.js} +1 -1
  9. package/dist/{config-DDYJPJX3.js → config-BSSALXEN.js} +1 -1
  10. package/dist/index.js +44 -14
  11. package/dist/{metadata-2ZFRMVOL.js → metadata-AN3YFZEV.js} +2 -2
  12. package/dist/{metadata-ABQCKU5P.js → metadata-JIQ77HFY.js} +2 -2
  13. package/dist/{raw-6HXFFHLV.js → raw-XJCAT3HX.js} +1 -1
  14. package/dist/{sync-BF3IWYFC.js → sync-QFP4XFN3.js} +1 -1
  15. package/dist/{te-agent-3GJ5H2XF.js → te-agent-JHUG6DVV.js} +27 -0
  16. package/dist/{te-analysis-DJ6KELTU.js → te-analysis-ITKTO6JS.js} +463 -16
  17. package/dist/{te-analysis-PCGESPLW.js → te-analysis-RAC67YYD.js} +463 -16
  18. package/dist/{te-dataops-ROHUJOX5.js → te-dataops-PZQ5NQLY.js} +1 -1
  19. package/dist/{te-dataops-LXL5YULV.js → te-dataops-XTWVTJCA.js} +1 -1
  20. package/dist/{te-engage-2YDCA552.js → te-engage-E7F4HTXU.js} +2 -2
  21. package/dist/{te-engage-VW6NJZ5V.js → te-engage-NLZUPSBK.js} +2 -2
  22. package/dist/{te-team-RRZI4WRI.js → te-team-BQ3SKSZV.js} +1 -1
  23. package/dist/{update-ER7VFU55.js → update-DKG6UXEM.js} +44 -22
  24. package/package.json +5 -4
  25. package/skills/ae-agent/SKILL.md +2 -2
  26. package/skills/ae-agent/references/create-automation.md +11 -0
  27. package/skills/ae-agent/references/update-automation.md +11 -3
  28. package/skills/ae-analysis/references/command_index.md +5 -0
  29. package/skills/ae-analysis/references/debug_data_list.md +28 -0
  30. package/skills/ae-analysis/references/debug_device_add.md +23 -0
  31. package/skills/ae-analysis/references/debug_device_list.md +19 -0
  32. package/skills/ae-analysis/references/debug_device_select.md +22 -0
  33. package/skills/ae-analysis/references/plan_sync_display_names.md +28 -0
  34. package/skills/ae-generate-tracking-code/SKILL.md +27 -11
  35. package/skills/ae-generate-tracking-code/references/autotrack-enum.md +4 -4
  36. package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +1 -1
  37. package/skills/ae-generate-tracking-code/references/debug-script.md +48 -39
  38. package/skills/ae-generate-tracking-code/references/logbus-config.md +1 -1
  39. package/skills/ae-generate-tracking-code/references/restful-call.md +1 -1
  40. package/skills/ae-generate-tracking-code/references/sdk-index.md +36 -36
  41. package/skills/ae-generate-tracking-plan/SKILL.md +26 -1
@@ -1,11 +1,13 @@
1
1
  import {
2
- AE_CLI_SKILLS_REPO,
3
- OPEN_SOURCE_AE_CLI_PACKAGE,
2
+ buildVersionInstallPlan,
4
3
  fetchCliConfig,
4
+ friendlyVersionSyncFailure,
5
5
  getCachedCompatForHost,
6
+ installVersion,
6
7
  printError,
7
- printOutput
8
- } from "./chunk-JTKMDN4A.js";
8
+ printOutput,
9
+ recordVersionSyncResult
10
+ } from "./chunk-KTYR3U6D.js";
9
11
  import {
10
12
  peekCliToken
11
13
  } from "./chunk-E7UXXHO3.js";
@@ -17,7 +19,6 @@ import {
17
19
  import "./chunk-LYVNONC4.js";
18
20
 
19
21
  // src/commands/update.ts
20
- import { spawnSync } from "child_process";
21
22
  var HOST_OPTION_DESC = "Override active AE host URL (e.g., https://ta.thinkingdata.cn)";
22
23
  var SEMVER_RE = /^\d+\.\d+\.\d+(?:[-+].*)?$/;
23
24
  function registerUpdate(program) {
@@ -30,9 +31,40 @@ function registerUpdate(program) {
30
31
  await printOutput({ action: "update", dryRun: true, ...plan }, program.opts().format || "json", program.opts().jq);
31
32
  return;
32
33
  }
33
- runCommand("npm", ["i", "-g", `${OPEN_SOURCE_AE_CLI_PACKAGE}@${target}`]);
34
- runCommand("npx", ["skills", "add", `${AE_CLI_SKILLS_REPO}#v${target}`, "-g", "-y"]);
35
- await printOutput({ action: "update", dryRun: false, ...plan }, program.opts().format || "json", program.opts().jq);
34
+ const result = installVersion(target, {
35
+ progress: (message) => process.stderr.write(`${message}
36
+ `)
37
+ });
38
+ if (host) {
39
+ recordVersionSyncResult(host, target, result);
40
+ }
41
+ if (!result.ok) {
42
+ const message = result.skillsPending ? `ae-cli ${target} was installed, but Skills synchronization failed.` : `Could not install ae-cli ${target}.`;
43
+ printError(
44
+ "config",
45
+ message,
46
+ `${friendlyVersionSyncFailure(result)} Check access and run: ae-cli update`,
47
+ "AE_CLI_UPDATE_FAILED",
48
+ {
49
+ target,
50
+ stage: result.stage,
51
+ cause: result.cause,
52
+ skillsPending: result.skillsPending
53
+ }
54
+ );
55
+ process.exitCode = 1;
56
+ return;
57
+ }
58
+ await printOutput(
59
+ {
60
+ action: "update",
61
+ dryRun: false,
62
+ ...plan,
63
+ skillsSource: result.skillsSource
64
+ },
65
+ program.opts().format || "json",
66
+ program.opts().jq
67
+ );
36
68
  });
37
69
  }
38
70
  async function resolveTargetVersion(program, opts) {
@@ -74,24 +106,14 @@ function resolveUpdateHost(program, opts) {
74
106
  return raw ? normalizeUrl(raw) : void 0;
75
107
  }
76
108
  function buildUpdatePlan(target, host) {
109
+ const installPlan = buildVersionInstallPlan(target);
77
110
  return {
78
- target,
111
+ target: installPlan.target,
79
112
  ...host ? { host } : {},
80
- commands: [
81
- `npm i -g ${OPEN_SOURCE_AE_CLI_PACKAGE}@${target}`,
82
- `npx skills add ${AE_CLI_SKILLS_REPO}#v${target} -g -y`
83
- ]
113
+ commands: installPlan.commands,
114
+ skillsSources: installPlan.skillsSources
84
115
  };
85
116
  }
86
- function runCommand(command, args) {
87
- const result = spawnSync(command, args, { stdio: "inherit" });
88
- if (result.error) {
89
- throw result.error;
90
- }
91
- if (result.status !== 0) {
92
- process.exit(result.status ?? 1);
93
- }
94
- }
95
117
  function failUpdate(message, hint) {
96
118
  printError("config", message, hint);
97
119
  process.exitCode = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkingai/ae-cli",
3
- "version": "6.0.36",
3
+ "version": "6.0.38",
4
4
  "description": "CLI tool for ThinkingAI (AE) analytics platform",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,13 +41,15 @@
41
41
  "verify:agent-tools": "node scripts/verify-agent-tools.mjs && npm run verify:sandbox-tools",
42
42
  "verify:system-tools": "node scripts/verify-system-tools.mjs && npx tsx tests/system-domain.test.ts && npx tsx tests/sandbox-tool-package.test.ts",
43
43
  "verify:sandbox-tools": "tsx test/sandbox-tools.test.ts",
44
- "verify:tracking-tools": "node test/tracking-client.test.mjs && node test/tracking-skill-flow.test.mjs && node test/tracking-commands.test.mjs",
44
+ "verify:tracking-tools": "tsx test/tracking-client.test.mjs && tsx test/tracking-skill-flow.test.mjs && node test/tracking-commands.test.mjs && tsx tests/tracking-display-name-sync.test.ts",
45
45
  "verify:self-check-overlay": "node test/self-check-overlay.test.mjs",
46
46
  "verify:update-check": "npx tsx test/update-check.test.mjs",
47
+ "verify:version-sync": "npx tsx tests/version-sync.test.ts",
47
48
  "qa-changed": "node scripts/qa-changed.mjs",
48
49
  "self-check": "node self-check/scan.mjs",
49
50
  "check:release": "node self-check/release-gate.mjs",
50
- "sync:skills-to-db": "node scripts/sync-skills-to-db.mjs",
51
+ "sync:skills-to-system": "node scripts/sync-skills-to-system.mjs",
52
+ "verify:system-skills-sync": "node --test test/sync-system-skills.test.mjs",
51
53
  "check:agents-docs": "node scripts/check-agents-docs-sync.mjs",
52
54
  "prepublishOnly": "npm run check:release && npm run build",
53
55
  "start": "node dist/index.js",
@@ -86,7 +88,6 @@
86
88
  "@types/turndown": "^5.0.6",
87
89
  "@types/ws": "^8.5.0",
88
90
  "jszip": "^3.10.1",
89
- "mysql2": "^3.22.6",
90
91
  "tsup": "^8.0.0",
91
92
  "tsx": "^4.0.0",
92
93
  "typescript": "^5.5.0"
@@ -76,8 +76,8 @@ If the user's intent is data analysis, audience management, metadata governance,
76
76
  ### Automations (3)
77
77
 
78
78
  - `+list-automations` ([doc](references/list-automations.md)) — list current user's Agent automation tasks
79
- - `+create-automation` ([doc](references/create-automation.md)) — create an Agent automation task (hourly/daily/weekly/monthly or cron)
80
- - `+update-automation` ([doc](references/update-automation.md)) — update an automation's name, instruction, schedule, or enabled state
79
+ - `+create-automation` ([doc](references/create-automation.md)) — create an Agent automation task (hourly/daily/weekly/monthly or cron; optional continuous conversation)
80
+ - `+update-automation` ([doc](references/update-automation.md)) — update an automation's name, instruction, schedule, enabled state, or conversation mode
81
81
 
82
82
  ### Models (6)
83
83
 
@@ -8,6 +8,7 @@ Domain: **Automations / write**
8
8
  - Create an Agent automation task that runs on a schedule (hourly / daily / weekly / monthly or cron).
9
9
  - Returns the newly created automation object including its `id` and initial `status`.
10
10
  - Automations are **enabled by default**; pass `--enabled false` only when the user explicitly asks to create the task without enabling it.
11
+ - Automations create a new conversation for every run by default. Pass `--reuse-conversation true` only when the user explicitly wants future runs to continue in one conversation.
11
12
 
12
13
  ## Mandatory Rules (MUST)
13
14
  - `--name` and `--message` are required.
@@ -43,6 +44,14 @@ ae-cli agent +create-automation \
43
44
  --message "Summarize yesterday's AI news" \
44
45
  --enabled false
45
46
 
47
+ # Keep future runs in one visible conversation
48
+ ae-cli agent +create-automation \
49
+ --name "Daily AI Brief" \
50
+ --schedule-kind daily \
51
+ --time 09:00 \
52
+ --message "Summarize yesterday's AI news" \
53
+ --reuse-conversation true
54
+
46
55
  # Weekly schedule on Sunday
47
56
  ae-cli agent +create-automation \
48
57
  --name "Weekly Report" \
@@ -76,6 +85,7 @@ ae-cli agent +create-automation --dry-run --name "Test" --message "x" --schedule
76
85
  | `--agent-name` | No | Agent name; use only after `+list-agents` discovery |
77
86
  | `--model` | No | Model record ID; defaults to current selected model |
78
87
  | `--enabled` | No | `true` (default) \| `false` |
88
+ | `--reuse-conversation` | No | `true` to continue in one conversation; `false` (default) to create one per run |
79
89
  | `--conversation-id` | No | Conversation ID fallback for resolving current Agent |
80
90
 
81
91
  \* One of `--cron` or `--schedule-kind` is required.
@@ -84,6 +94,7 @@ ae-cli agent +create-automation --dry-run --name "Test" --message "x" --schedule
84
94
  - If the user provides a natural-language schedule ("every day at 9am"), translate it to `--schedule-kind daily --time 09:00`.
85
95
  - If the user wants a cron-only schedule not covered by the kinds, use `--cron`.
86
96
  - If no Agent is specified, the automation targets the current conversation's Agent; verify with `+list-agents` when in doubt.
97
+ - Set `--reuse-conversation true` only when the user explicitly requests continuity across runs. The platform may rotate the underlying provider session while retaining the visible conversation history.
87
98
  - Use `--dry-run` first to verify the request shape before executing.
88
99
 
89
100
  ## Next Steps on Failure
@@ -5,13 +5,13 @@
5
5
  Domain: **Automations / write**
6
6
 
7
7
  ## Use Cases
8
- - Update an existing Agent automation task's name, instruction, schedule, or enabled state.
8
+ - Update an existing Agent automation task's name, instruction, schedule, enabled state, or conversation mode.
9
9
  - Used to pause (`--enabled false`) or resume (`--enabled true`) an automation, or to change its schedule/message.
10
10
  - Obtain the automation `id` via `+list-automations` — never guess.
11
11
 
12
12
  ## Mandatory Rules (MUST)
13
13
  - `--id` is required. Obtain the real ID via `+list-automations` — do not guess.
14
- - At least one update field must be provided (`--name`, `--message`, `--enabled`, `--cron`, or a `--schedule-kind` with its time/day fields).
14
+ - At least one update field must be provided (`--name`, `--message`, `--enabled`, `--reuse-conversation`, `--cron`, or a `--schedule-kind` with its time/day fields).
15
15
  - `--cron` and `--schedule-kind` are mutually exclusive.
16
16
  - This is an ordinary `write` operation and does not require CLI confirmation.
17
17
  - Do not surface raw automation IDs, raw JSON, or concrete detail paths in user-facing replies.
@@ -32,6 +32,12 @@ ae-cli agent +update-automation --id <automation-id> --enabled false
32
32
  # Resume an automation
33
33
  ae-cli agent +update-automation --id <automation-id> --enabled true
34
34
 
35
+ # Reuse the most recent valid conversation on future runs
36
+ ae-cli agent +update-automation --id <automation-id> --reuse-conversation true
37
+
38
+ # Return to creating a new conversation for every run
39
+ ae-cli agent +update-automation --id <automation-id> --reuse-conversation false
40
+
35
41
  # Rename and change the instruction
36
42
  ae-cli agent +update-automation \
37
43
  --id <automation-id> \
@@ -59,6 +65,7 @@ ae-cli agent +update-automation --dry-run --id <automation-id> --enabled false
59
65
  | `--name` | No | New automation task name |
60
66
  | `--message` | No | New instruction sent to the Agent |
61
67
  | `--enabled` | No | `true` to enable, `false` to pause |
68
+ | `--reuse-conversation` | No | `true` to reuse one conversation, `false` to create one per run; omit to keep unchanged |
62
69
  | `--cron` | No | Cron expression (mutually exclusive with `--schedule-kind`) |
63
70
  | `--schedule-kind` | No | `hourly` \| `daily` \| `weekly` \| `monthly` |
64
71
  | `--time` | No | Time in `HH:mm` for daily/weekly/monthly |
@@ -68,12 +75,13 @@ ae-cli agent +update-automation --dry-run --id <automation-id> --enabled false
68
75
 
69
76
  ## Decision Rules
70
77
  - If the user wants to pause/resume, use `--enabled false` / `--enabled true` (no other fields needed).
78
+ - If the user wants future runs to share one conversation, use `--reuse-conversation true`; use `false` to restore one conversation per run.
71
79
  - If the user wants to change the schedule, provide `--schedule-kind` with its required time/day fields, or `--cron`.
72
80
  - At least one update field is required; a bare `--id` is rejected.
73
81
  - Use `--dry-run` first to verify the request shape before executing.
74
82
 
75
83
  ## Next Steps on Failure
76
- - `至少提供一个更新字段`: add at least one of `--name` / `--message` / `--enabled` / `--cron` / `--schedule-kind`.
84
+ - `至少提供一个更新字段`: add at least one of `--name` / `--message` / `--enabled` / `--reuse-conversation` / `--cron` / `--schedule-kind`.
77
85
  - `必须提供 --cron 或 --schedule-kind`: if schedule detail flags (`--time` / `--minute` / `--weekday` / `--day-of-month`) are present, a `--schedule-kind` (or `--cron`) must accompany them.
78
86
  - `--time 格式必须是 HH:mm`: use 24-hour `HH:mm` (e.g. `09:00`).
79
87
 
@@ -239,6 +239,10 @@ This is the exhaustive command and flag inventory for the analysis skill. Read t
239
239
  | `ae-cli tracking check list` | tracking.check.list | read | `--project-id` (number; required) — Numeric project ID. | [check_list.md](check_list.md) |
240
240
  | `ae-cli tracking check retry` | tracking.check.retry | write | `--project-id` (number; required) — Numeric project ID.<br>`--uuid` (string; required) — Tracking check task UUID.<br>`--request-id` (string; optional) — Optional caller-supplied cli_<32 lowercase hex> lifecycle ID. ae-cli generates and prints one before dispatch when omitted.<br>`--timeout-seconds` (number; optional) — Optional capability execution timeout in seconds. | [check_retry.md](check_retry.md) |
241
241
  | `ae-cli tracking check run` | tracking.check.run | write | `--project-id` (number; required) — Numeric project ID.<br>`--check-scope` (json; required) — Tracking check scope JSON object.<br>`--result-scope` (json; optional) — Optional tracking check result scope JSON object. | [check_run.md](check_run.md) |
242
+ | `ae-cli tracking debug-data list` | tracking.debug_data.list | read | `--project-id` (number; required) — Numeric project ID.<br>`--device-id` (string; required) — Debug device ID reported by the SDK as #device_id.<br>`--start-time` (string; optional) — Query start time in YYYY-MM-DD HH:mm:ss local time. Defaults to one hour ago.<br>`--event-name` (string; optional) — Optional event name filter. | [debug_data_list.md](debug_data_list.md) |
243
+ | `ae-cli tracking debug-device add` | tracking.debug_device.add | write | `--project-id` (number; required) — Numeric project ID.<br>`--device-id` (string; required) — Debug device ID reported by the SDK as #device_id.<br>`--device-name` (string; required) — Human-readable name for the Debug device. | [debug_device_add.md](debug_device_add.md) |
244
+ | `ae-cli tracking debug-device list` | tracking.debug_device.list | read | `--project-id` (number; required) — Numeric project ID. | [debug_device_list.md](debug_device_list.md) |
245
+ | `ae-cli tracking debug-device select` | tracking.debug_device.select | write | `--project-id` (number; required) — Numeric project ID.<br>`--device-id` (string; required) — Debug device ID reported by the SDK as #device_id. | [debug_device_select.md](debug_device_select.md) |
242
246
  | `ae-cli tracking event-blacklist add` | tracking.event_blacklist.add | write | `--project-id` (number; required) — Numeric project ID.<br>`--event-names` (json; required) — JSON array of event names. | [event_blacklist_add.md](event_blacklist_add.md) |
243
247
  | `ae-cli tracking event-blacklist list` | tracking.event_blacklist.list | read | `--project-id` (number; required) — Numeric project ID. | [event_blacklist_list.md](event_blacklist_list.md) |
244
248
  | `ae-cli tracking event-blacklist update` | tracking.event_blacklist.update | write | `--project-id` (number; required) — Numeric project ID.<br>`--event-names` (json; required) — JSON array of event names.<br>`--type` (number; required) — Blacklist event config type: 0 or 1. | [event_blacklist_update.md](event_blacklist_update.md) |
@@ -252,6 +256,7 @@ This is the exhaustive command and flag inventory for the analysis skill. Read t
252
256
  | `ae-cli tracking plan get` | tracking.plan.get | read | `--project-id` (number; required) — Numeric project ID. | [plan_get.md](plan_get.md) |
253
257
  | `ae-cli tracking plan import-excel` | tracking.plan.import_excel | write | `--project-id` (number; required) — Numeric project ID.<br>`--input-file` (string; optional) — Local tracking-plan XLSX path. The CLI uploads it with purpose track.program.xlsx before import.<br>`--input-file-id` (string; optional) — Existing input_file_id returned by `analysis input-file upload --purpose track.program.xlsx`.<br>`--lang` (string; optional) — Excel language: zh, en, ja, ko, zh_CN, en_US, ja_JP, or ko_KR. | [plan_import_excel.md](plan_import_excel.md) |
254
258
  | `ae-cli tracking plan save-items` | tracking.plan.save_items | write | `--project-id` (number; required) — Numeric project ID.<br>`--events` (json; optional) — Optional JSON array of tracking events.<br>`--event-props` (json; optional) — Optional JSON array of tracking event properties.<br>`--user-props` (json; optional) — Optional JSON array of tracking user properties.<br>`--common-event-props` (json; optional) — Optional JSON array of common tracking event properties. | [plan_save_items.md](plan_save_items.md) |
259
+ | `ae-cli tracking plan sync-display-names` | gateway lifecycle | write | `--project-id` (number; required) — Numeric project ID.<br>`--draft` (string; required) — Local tracking-plan draft.json containing event/property display_name values. | [plan_sync_display_names.md](plan_sync_display_names.md) |
255
260
  | `ae-cli tracking plan sync-from-meta` | tracking.plan.sync_from_meta | write | `--project-id` (number; required) — Numeric project ID. | [plan_sync_from_meta.md](plan_sync_from_meta.md) |
256
261
  | `ae-cli tracking plan-change-log export` | tracking.plan_change_log.export | read | `--project-id` (number; required) — Numeric project ID.<br>`--log-id` (number; required) — Tracking plan change log ID.<br>`--request-id` (string; optional) — Optional caller-supplied cli_<32 lowercase hex> lifecycle ID. ae-cli generates and prints one before dispatch when omitted.<br>`--timeout-seconds` (number; optional, min=1, max=21600) — Async runtime in seconds. Default and max: 21600 (6 hours); cancel earlier with analysis query cancel --run-id <run_id>. | [plan_change_log_export.md](plan_change_log_export.md) |
257
262
  | `ae-cli tracking plan-change-log list` | tracking.plan_change_log.list | read | `--project-id` (number; required) — Numeric project ID. | [plan_change_log_list.md](plan_change_log_list.md) |
@@ -0,0 +1,28 @@
1
+ # tracking debug-data list
2
+
3
+ Use this command to query Debug data received from one device and verify an SDK reporting flow.
4
+
5
+ Command:
6
+
7
+ ```bash
8
+ ae-cli tracking debug-data list \
9
+ --project-id <project_id> \
10
+ --device-id <device_id> \
11
+ --start-time "YYYY-MM-DD HH:mm:ss" \
12
+ [--event-name <event_name>]
13
+ ```
14
+
15
+ Capability id: `tracking.debug_data.list`.
16
+
17
+ Input sends `project_id`, `device_id`, `start_time`, and optional `event_name`. When omitted, `start_time` defaults to one hour ago in local time.
18
+
19
+ The normalized result includes `has_data`, `event_count`, `data_count`, `event_list`, and `device_data_list`. Treat validation as successful only when `has_data` is true and the returned event names, property structures, and error fields are correct.
20
+
21
+ ## Parameters
22
+
23
+ | Parameter | Required | Description |
24
+ | -------------- | -------- | -------------------------------------------------------------------------- |
25
+ | `--project-id` | Yes | Numeric AE project ID. |
26
+ | `--device-id` | Yes | Debug device ID used by the reporting client. |
27
+ | `--start-time` | No | Query start time in local `YYYY-MM-DD HH:mm:ss`; defaults to one hour ago. |
28
+ | `--event-name` | No | Exact event name filter. |
@@ -0,0 +1,23 @@
1
+ # tracking debug-device add
2
+
3
+ Use this command to create or update a Debug device for one AE project.
4
+ Do not use it to select the active device or query Debug data; use `debug-device select` and `debug-data list` for those actions.
5
+
6
+ Command:
7
+
8
+ ```bash
9
+ ae-cli tracking debug-device add --project-id <project_id> --device-id <device_id> --device-name <device_name>
10
+ ```
11
+
12
+ Capability id: `tracking.debug_device.add`.
13
+
14
+ Input sends `project_id`, `device_id`, and `device_name`. Prefer a stable device ID that the validation script can reuse. After creation, select the same device with `tracking debug-device select`.
15
+ The result confirms that the device was created or updated; use `debug-device list` to verify the saved device before selecting it.
16
+
17
+ ## Parameters
18
+
19
+ | Parameter | Required | Description |
20
+ | --------------- | -------- | ---------------------------------------------------- |
21
+ | `--project-id` | Yes | Numeric AE project ID. |
22
+ | `--device-id` | Yes | Stable Debug device ID used by the reporting client. |
23
+ | `--device-name` | Yes | Human-readable Debug device name. |
@@ -0,0 +1,19 @@
1
+ # tracking debug-device list
2
+
3
+ Use this command to list Debug devices for one AE project and identify the device selected by the current CLI user.
4
+
5
+ Command:
6
+
7
+ ```bash
8
+ ae-cli tracking debug-device list --project-id <project_id>
9
+ ```
10
+
11
+ Capability id: `tracking.debug_device.list`.
12
+
13
+ Input sends `project_id`. The result contains the available Debug devices and current selection. Use the returned device IDs for `debug-device select` and `debug-data list`; do not invent an ID.
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Required | Description |
18
+ | -------------- | -------- | ---------------------- |
19
+ | `--project-id` | Yes | Numeric AE project ID. |
@@ -0,0 +1,22 @@
1
+ # tracking debug-device select
2
+
3
+ Use this command to select the active Debug device for the current CLI user.
4
+ Do not use it to create a missing device or retrieve Debug events.
5
+
6
+ Command:
7
+
8
+ ```bash
9
+ ae-cli tracking debug-device select --project-id <project_id> --device-id <device_id>
10
+ ```
11
+
12
+ Capability id: `tracking.debug_device.select`.
13
+
14
+ Input sends `project_id` and `device_id`. The device must come from `tracking debug-device list` or a successful `tracking debug-device add`.
15
+ The result confirms the selected device; follow it with `debug-data list` only after the reporting client has sent Debug data with the same ID.
16
+
17
+ ## Parameters
18
+
19
+ | Parameter | Required | Description |
20
+ | -------------- | -------- | ----------------------------------- |
21
+ | `--project-id` | Yes | Numeric AE project ID. |
22
+ | `--device-id` | Yes | Existing Debug device ID to select. |
@@ -0,0 +1,28 @@
1
+ # tracking plan sync-display-names
2
+
3
+ Use this local orchestration command after uploading a tracking plan, and rerun it after the first Debug or production data arrives.
4
+ Do not use it to rename metadata that already has a display name, create missing metadata, or replace the tracking-plan upload flow.
5
+
6
+ Command:
7
+
8
+ ```bash
9
+ ae-cli tracking plan sync-display-names \
10
+ --project-id <project_id> \
11
+ --draft <draft.json>
12
+ ```
13
+
14
+ The command reads localized `display_name` values from the local tracking-plan draft, lists the project's event, event-property, and user-property metadata, then calls `metadata.super_metadata.batch_edit` in bounded batches.
15
+
16
+ Safety and result rules:
17
+
18
+ - Only blank metadata display names are filled.
19
+ - Existing non-empty AE display names are never overwritten.
20
+ - `missing_in_metadata` means an event/property has not appeared in project metadata yet; rerun after data arrives.
21
+ - `missing_display_name_in_draft` means the draft is incomplete; add the localized display name, regenerate and validate the xlsx, then retry.
22
+
23
+ ## Parameters
24
+
25
+ | Parameter | Required | Description |
26
+ | -------------- | -------- | --------------------------------------------------------------------------------- |
27
+ | `--project-id` | Yes | Numeric AE project ID. |
28
+ | `--draft` | Yes | Local tracking-plan `draft.json` containing event/property `display_name` values. |
@@ -105,7 +105,9 @@ First, check if `.ae-cli/draft.json` exists and read existing configuration:
105
105
 
106
106
  **host handling** (optional):
107
107
  - If you need to fetch plan from AE (no local draft.json) → ask for host
108
- - If local draft.json exists → host is not required; only hint user to open AE Debug page during validation phase
108
+ - If local draft.json exists → host is not required for code generation
109
+ - Before Debug validation, run `ae-cli config current` and confirm the active host matches the target AE environment; if it does not, run `ae-cli config set-host <AE_HOST>`
110
+ - Complete Debug validation with `ae-cli tracking debug-device` and `ae-cli tracking debug-data` by default; only hint the user to open the AE Debug page when those CLI capabilities are unavailable
109
111
 
110
112
  ### If only xlsx file exists (no draft.json)
111
113
 
@@ -256,7 +258,7 @@ Without `.ae-cli/draft.json` or `.ae-cli/remote-plan.json`:
256
258
  **SDK document paths**:
257
259
  - Do not use hard-coded wiki paths from this section.
258
260
  - Always read `references/sdk-index.md` first and use the path listed there for the selected SDK.
259
- - If the path from `references/sdk-index.md` does not exist in the local wiki mirror, search under `~/.ae-cli/wiki/te-docs/raw/` with SDK-specific keywords and use the best matching latest main document.
261
+ - If the path from `references/sdk-index.md` does not exist in the local wiki mirror, search under `~/.ae-cli/wiki/raw/` with SDK-specific keywords and use the best matching latest main document.
260
262
 
261
263
  ---
262
264
 
@@ -605,16 +607,30 @@ Provide validation guidance based on selected platforms:
605
607
 
606
608
  ```
607
609
  Validation steps:
608
- 1. Run validation script:
610
+ 1. Confirm the active AE environment:
611
+ ae-cli config current
612
+
613
+ 2. List existing Debug devices:
614
+ ae-cli tracking debug-device list --project-id <project_id>
615
+
616
+ 3. Create the script's stable device ID if it is missing, then select it:
617
+ ae-cli tracking debug-device add --project-id <project_id> --device-id <device_id> --device-name <name>
618
+ ae-cli tracking debug-device select --project-id <project_id> --device-id <device_id>
619
+
620
+ 4. Run validation script:
609
621
  - Client: run .ae-cli/output/te-debug-client.<ext>
610
622
  - Server: run .ae-cli/output/te-debug-server.<ext>
611
623
 
612
- 2. Open AE Debug page:
613
- https://<host>/#/data/debug
624
+ 5. Query the most recent hour of Debug data:
625
+ ae-cli tracking debug-data list --project-id <project_id> --device-id <device_id>
626
+
627
+ 6. Confirm has_data=true, then inspect event names, property structures, and error fields.
628
+ If needed, add --event-name <event_name> or --start-time "YYYY-MM-DD HH:mm:ss".
614
629
 
615
- 3. Filter by distinct_id=claude-test to view uploaded data
630
+ 7. Only if the CLI capability is unavailable, open the AE Debug page:
631
+ https://<host>/#/data/debug
616
632
 
617
- 4. For LogBus2:
633
+ 8. For LogBus2:
618
634
  - Copy daemon.json to LogBus2 conf/ directory
619
635
  - Start: ./logbus start
620
636
  - Official docs: https://docs-v2.thinkingdata.cn/?version=latest&code=logbus2_installation&lan=en-US
@@ -669,14 +685,14 @@ All output mode rules are in `references/*.md`. This SKILL.md only handles phase
669
685
  - User guide: https://docs-v2.thinkingdata.cn/?version=latest&code=logbus2_installation&lan=en-US
670
686
  - Download link is in the official doc's "二、Download LogBus2" section
671
687
 
672
- **Wiki directory structure** (see `~/.ae-cli/wiki/te-docs/schema.md`):
673
- - `~/.ae-cli/wiki/te-docs/raw/` — AE official documentation mirror (read-only, maintained by crawler)
674
- - `~/.ae-cli/wiki/te-docs/synthesis/` — LLM-synthesized overview documents
688
+ **Wiki directory structure** (see `~/.ae-cli/wiki/schema.md`):
689
+ - `~/.ae-cli/wiki/raw/` — AE official documentation mirror (read-only, maintained by crawler)
690
+ - `~/.ae-cli/wiki/synthesis/` — LLM-synthesized overview documents
675
691
 
676
692
  **Document reading order during code generation**:
677
693
  1. Read `references/sdk-index.md` to find the selected SDK's main document and advanced guide paths.
678
694
  2. Verify the main document path exists in the local wiki mirror before reading it.
679
- 3. If the indexed path is missing, search under `~/.ae-cli/wiki/te-docs/raw/` with SDK-specific keywords such as SDK name, platform name, language name, and `main doc`; choose the latest main document, not historical/versioned documents.
695
+ 3. If the indexed path is missing, search under `~/.ae-cli/wiki/raw/` with SDK-specific keywords such as SDK name, platform name, language name, and `main doc`; choose the latest main document, not historical/versioned documents.
680
696
  4. Read the wiki main doc first (initialization, imports, package names, basic API).
681
697
  5. Read the advanced guide only after the main doc (LoggerConsumer, user properties, auto-track, preset properties, etc.).
682
698
  6. Check advanced guide sub-documents if needed.
@@ -177,7 +177,7 @@ TDAnalytics.enableAutoTrack(context,
177
177
  ## Cocos2d-x / CocosCreator / LayaAir / Unreal
178
178
 
179
179
  游戏引擎 SDK 的自动采集枚举值请直接读取对应 wiki 文档:
180
- - `~/.ae-cli/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocos2d-x/cocos2d-x-advanced/automatic-event-tracking.md`
181
- - `~/.ae-cli/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocoscreator/cocoscreator-advance/automatic-event-tracking.md`
182
- - `~/.ae-cli/wiki/te-docs/raw/客户端-sdk/游戏引擎/layaair/进阶指南/自动采集.md`
183
- - `~/.ae-cli/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unreal/unreal-advanced/automatic-event-tracking.md`
180
+ - `~/.ae-cli/wiki/raw/data-ingestion-guide/client-sdk/game-engine/cocos2d-x/cocos2d-x-advanced/automatic-event-tracking.md`
181
+ - `~/.ae-cli/wiki/raw/data-ingestion-guide/client-sdk/game-engine/cocoscreator/cocoscreator-advance/automatic-event-tracking.md`
182
+ - `~/.ae-cli/wiki/raw/客户端-sdk/游戏引擎/layaair/进阶指南/自动采集.md`
183
+ - `~/.ae-cli/wiki/raw/data-ingestion-guide/client-sdk/game-engine/unreal/unreal-advanced/automatic-event-tracking.md`
@@ -16,7 +16,7 @@
16
16
  3. Choose integration method based on project characteristics:
17
17
  - Has `package.json` + build tool → npm integration
18
18
  - Plain HTML / no build tool → CDN method
19
- 4. Read `~/.ae-cli/wiki/te-docs/synthesis/sdk-selection.md` to confirm appType's npm package name and init signature
19
+ 4. Read `~/.ae-cli/wiki/synthesis/sdk-selection.md` to confirm appType's npm package name and init signature
20
20
  5. Read the corresponding cheatsheet (e.g. `js-sdk-cheatsheet.md`) for additional details
21
21
 
22
22
  **⚠️ Prohibited**: Skipping Stage 0 and writing code directly, guessing integration methods, using unverified CDN URLs