@thinkingai/ae-cli 1.0.15 → 1.0.20

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 (43) hide show
  1. package/README.md +23 -24
  2. package/README.zh.md +21 -22
  3. package/dist/auth-A4NV2VHD.js +153 -0
  4. package/dist/{auth-4GAHTBVH.js → auth-T3ILGJKW.js} +6 -4
  5. package/dist/{chunk-TJIMDNAU.js → chunk-5CCFSPAF.js} +79 -3
  6. package/dist/{chunk-UK6HO5O5.js → chunk-OVMQFFC2.js} +13 -1
  7. package/dist/{chunk-EBFUVWIZ.js → chunk-TMMUBSKW.js} +52 -0
  8. package/dist/{chunk-OQ4XEG77.js → chunk-TOXRLDUP.js} +2 -2
  9. package/dist/{client-HU63573O.js → client-FPA76DGY.js} +3 -3
  10. package/dist/{config-OLF7RBPM.js → config-QZIEYXQZ.js} +20 -5
  11. package/dist/index.js +18 -13
  12. package/dist/{raw-GDO4IWNW.js → raw-MZIKHQH4.js} +3 -3
  13. package/dist/{te-analysis-ZDJXMWZY.js → te-analysis-CFQBXUCO.js} +93 -7
  14. package/dist/{te-audience-T5B52EEB.js → te-audience-WPBBWADL.js} +3 -3
  15. package/dist/{te-common-BPTXXTHQ.js → te-common-GL3KBZPD.js} +3 -3
  16. package/dist/{te-community-FPB5LH56.js → te-community-3XEJNSQL.js} +3 -3
  17. package/dist/{te-dataops-2NUJVG47.js → te-dataops-H4WSMCG5.js} +3 -3
  18. package/dist/{te-engage-K3EANZ5P.js → te-engage-2VFM37ZM.js} +3 -3
  19. package/dist/te-kb-U6SQUJVC.js +41 -0
  20. package/dist/{te-meta-JJMV75KB.js → te-meta-BO45GW32.js} +10 -8
  21. package/package.json +2 -1
  22. package/skills/ae-analysis/SKILL.md +119 -29
  23. package/skills/ae-analysis/references/build_event_analysis_qp.md +132 -0
  24. package/skills/ae-analysis/references/build_funnel_analysis_qp.md +143 -0
  25. package/skills/ae-analysis/references/build_prop_analysis_qp.md +122 -0
  26. package/skills/ae-analysis/references/build_retention_analysis_qp.md +141 -0
  27. package/skills/ae-analysis/references/generate_track_program.md +8 -8
  28. package/skills/ae-analysis/references/get_analysis_query_schema.md +22 -11
  29. package/skills/ae-analysis/references/get_metric.md +7 -1
  30. package/skills/ae-analysis/references/get_report_definition.md +4 -0
  31. package/skills/ae-analysis/references/list_alerts.md +4 -0
  32. package/skills/ae-analysis/references/list_clusters.md +4 -0
  33. package/skills/ae-analysis/references/list_dashboards.md +6 -0
  34. package/skills/ae-analysis/references/list_events.md +8 -1
  35. package/skills/ae-analysis/references/list_metrics.md +9 -0
  36. package/skills/ae-analysis/references/list_properties.md +6 -1
  37. package/skills/ae-analysis/references/list_reports.md +6 -0
  38. package/skills/ae-analysis/references/list_tags.md +4 -0
  39. package/skills/ae-analysis/references/query_adhoc.md +80 -30
  40. package/skills/ae-community/SKILL.md +14 -101
  41. package/skills/ae-dataops/SKILL.md +13 -58
  42. package/skills/ae-engage/SKILL.md +15 -98
  43. package/dist/auth-U2GHFMFY.js +0 -81
@@ -2,10 +2,6 @@
2
2
  name: ae-community
3
3
  version: 2.0.0
4
4
  description: "AE community analysis: post search, comment sentiment, topic trends, risky content, livestream data. Includes AE CLI authentication, global parameters, and safety rules (self-contained)."
5
- metadata:
6
- requires:
7
- bins: ["ae-cli"]
8
- cliHelp: "ae-cli community --help"
9
5
  ---
10
6
 
11
7
  # ae-community
@@ -24,107 +20,24 @@ The AE Community domain provides social data analysis: post/video search, commen
24
20
 
25
21
  ## Global AE CLI Rules
26
22
 
27
- AE CLI (`ae-cli`) is the command-line tool for the ThinkingEngine data analysis platform, used by AI Agents and human users. For community-side requests, prefer `ae-cli` and this skill’s reference docs over model memory.
23
+ AE CLI (`ae-cli`) is the command-line tool for the AE / TE / ThinkingEngine analysis platform. For AE analysis-side requests, prefer `ae-cli` and this skill's reference docs over model memory.
28
24
 
29
- ### Authentication
25
+ Global parameters:
30
26
 
31
- You must authenticate before use. Authentication priority:
27
+ | Parameter | Description |
28
+ |---|---|
29
+ | `--format <json\|table>` | Output format. Default is JSON. |
30
+ | `--jq <expr>` | jq filter expression for JSON output. |
32
31
 
33
- 1. Environment variable `TE_TOKEN` (highest priority, suitable for CI/scripts)
34
- 2. Cached token (`~/.ae-cli/tokens.json`, valid for 20 hours)
35
- 3. macOS automatically extracts it from Chrome (macOS only)
32
+ Output and errors:
33
+ - Successful commands return machine-readable JSON by default.
34
+ - Failed commands return `{ "ok": false, "error": { "type": "...", "message": "...", "hint": "..." } }` and exit non-zero.
36
35
 
37
- **Authentication commands**
38
-
39
- ```bash
40
- # Automatic macOS authentication (extract token from Chrome)
41
- ae-cli auth login
42
-
43
- # Manually set token
44
- ae-cli auth set-token <token>
45
-
46
- # View authentication status
47
- ae-cli auth status
48
-
49
- # Log out
50
- ae-cli auth logout
51
- ```
52
-
53
- **Multi-environment support**
54
-
55
- ```bash
56
- # Specify host
57
- ae-cli auth login --host ta-staging.example.com
58
- ae-cli auth set-token <token> --host ta-staging.example.com
59
-
60
- # Configure default host
61
- ae-cli config set defaultHost ta-staging.example.com
62
- ```
63
-
64
- ### Global parameters
65
-
66
- All commands support the following global parameters:
67
-
68
- | Parameter | Description | Default |
69
- |------|------|--------|
70
- | `--host <host>` | AE instance address | defaultHost from config or ta.thinkingdata.cn |
71
- | `--format <json\|table>` | Output format | json |
72
- | `--jq <expr>` | jq filter expression | - |
73
- | `--dry-run` | Show the request only, do not execute it | false |
74
- | `--yes` | Skip confirmation for write operations | false |
75
-
76
- ### Output format
77
-
78
- **JSON (default)**
79
-
80
- ```json
81
- {
82
- "ok": true,
83
- "data": { ... }
84
- }
85
- ```
86
-
87
- **Table**
88
-
89
- ```bash
90
- ae-cli analysis_meta +list_events --project_id <YOUR_PROJECT_ID> --format table
91
- ```
92
-
93
- **jq filtering**
94
-
95
- ```bash
96
- ae-cli analysis_meta +list_events --project_id <YOUR_PROJECT_ID> --jq '.'
97
- ```
98
-
99
- ### Error handling
100
-
101
- Error output goes to stderr, in the following format:
102
-
103
- ```json
104
- {
105
- "ok": false,
106
- "error": {
107
- "type": "auth | api | validation | config",
108
- "message": "...",
109
- "hint": "..."
110
- }
111
- }
112
- ```
113
-
114
- Exit code: success `0`, error `1`.
115
-
116
- ### Security constraints
117
-
118
- - Commands with `risk: read` execute directly
119
- - Commands with `risk: write` require confirmation unless `--yes` is passed
120
- - Use `--dry-run` to preview the request that will be sent
121
-
122
- ### Command structure
123
-
124
- ```bash
125
- ae-cli <domain> +<command> [flags]
126
- ae-cli api <METHOD> <PATH> [--params] [--data]
127
- ```
36
+ Safety constraints:
37
+ - Read commands can execute directly after required IDs and references are verified.
38
+ - Write commands require explicit user intent and normally keep the confirmation prompt.
39
+ - Never invent command names, flags, JSON payloads, `project_id`, resource IDs, field names, event names, property names, metric definitions, or date formats. Read the matching command reference and discover real project metadata first.
40
+ - **NEVER fabricate or guess resource names** (reports, dashboards, events, properties, metrics, clusters, tags, alerts). Always use list commands to discover real resources first. If a resource is not found after fuzzy search and full list fallback, explicitly tell the user "resource not found" and stop - do not proceed with fabricated names.
128
41
 
129
42
  **Community** commands use the domain `community` (this skill). Other AE domains include: `analysis` (analysis), `analysis_audience` (audience), `analysis_meta` (metadata), `analysis_common` (common), `operation` (operations).
130
43
 
@@ -2,10 +2,6 @@
2
2
  name: ae-dataops
3
3
  version: 2.0.0
4
4
  description: "AE Data Development and Operations: Data warehouse management, flow orchestration, IDE queries, data integration, operations and backfill management"
5
- metadata:
6
- requires:
7
- bins: ["ae-cli"]
8
- cliHelp: "ae-cli dataops_repo --help, ae-cli dataops_datatable --help, ae-cli dataops_flow --help, ae-cli dataops_ide --help, ae-cli dataops_integration --help, ae-cli dataops_operations --help"
9
5
  ---
10
6
 
11
7
  # ae-dataops
@@ -26,68 +22,27 @@ The AE Data Development and Operations domain provides capabilities for data war
26
22
 
27
23
  ---
28
24
 
29
- ## Global AE CLI Rules
30
-
31
- AE CLI (`ae-cli`) is the command-line tool for the AE data development and operations platform. For DataOps-side requests, prefer `ae-cli` and this skill's reference docs over model memory.
32
-
33
- Authentication priority:
34
- 1. `TE_TOKEN` environment variable.
35
- 2. Cached token in `~/.ae-cli/tokens.json`, usually valid for 20 hours.
36
- 3. macOS Chrome token extraction via `ae-cli auth login`.
37
-
38
- Useful authentication commands:
39
-
40
- ```bash
41
- ae-cli auth login
42
- ae-cli auth set-token <token>
43
- ae-cli auth status
44
- ae-cli auth logout
45
- ```
46
25
 
47
- Multi-environment support:
26
+ ## Global AE CLI Rules
48
27
 
49
- ```bash
50
- # Specify host
51
- ae-cli auth login --host ta-staging.example.com
52
- ae-cli auth set-token <token> --host ta-staging.example.com
53
-
54
- # Configure default host
55
- ae-cli config set defaultHost ta-staging.example.com
56
- ```
28
+ AE CLI (`ae-cli`) is the command-line tool for the AE / TE / ThinkingEngine analysis platform. For AE analysis-side requests, prefer `ae-cli` and this skill's reference docs over model memory.
57
29
 
58
30
  Global parameters:
59
31
 
60
- | Parameter | Description | Default |
61
- |---|---|---|
62
- | `--host <host>` | Target AE instance address | defaultHost from config or ta.thinkingdata.cn |
63
- | `--format <json|table>` | Output format | json |
64
- | `--jq <expr>` | jq filter expression for JSON output | - |
65
- | `--dry-run` | Preview the request without executing it | false |
66
- | `--yes` | Skip confirmation for write operations | false |
67
-
68
- Output format:
69
-
70
- - JSON (default): `{ "ok": true, "data": { ... } }`
71
- - Table: `ae-cli dataops_flow +list_flows --spaceCode xxx --format table`
72
- - jq filtering: `ae-cli dataops_flow +list_flows --spaceCode xxx --jq '.'`
32
+ | Parameter | Description |
33
+ |---|---|
34
+ | `--format <json\|table>` | Output format. Default is JSON. |
35
+ | `--jq <expr>` | jq filter expression for JSON output. |
73
36
 
74
- Error handling:
75
-
76
- - Failed commands return `{ "ok": false, "error": { "type": "auth|api|validation|config", "message": "...", "hint": "..." } }` to stderr.
77
- - Exit code: success `0`, error `1`.
37
+ Output and errors:
38
+ - Successful commands return machine-readable JSON by default.
39
+ - Failed commands return `{ "ok": false, "error": { "type": "...", "message": "...", "hint": "..." } }` and exit non-zero.
78
40
 
79
41
  Safety constraints:
80
-
81
- - Commands with `risk: read` execute directly.
82
- - Commands with `risk: write` require confirmation unless `--yes` is passed.
83
- - Use `--dry-run` to preview the request that will be sent.
84
-
85
- Command structure:
86
-
87
- ```bash
88
- ae-cli <domain> +<command> [flags]
89
- ae-cli api <METHOD> <PATH> [--params] [--data]
90
- ```
42
+ - Read commands can execute directly after required IDs and references are verified.
43
+ - Write commands require explicit user intent and normally keep the confirmation prompt.
44
+ - Never invent command names, flags, JSON payloads, `project_id`, resource IDs, field names, event names, property names, metric definitions, or date formats. Read the matching command reference and discover real project metadata first.
45
+ - **NEVER fabricate or guess resource names** (reports, dashboards, events, properties, metrics, clusters, tags, alerts). Always use list commands to discover real resources first. If a resource is not found after fuzzy search and full list fallback, explicitly tell the user "resource not found" and stop - do not proceed with fabricated names.
91
46
 
92
47
  Domains for DataOps: `dataops_repo`, `dataops_datatable`, `dataops_flow`, `dataops_ide`, `dataops_integration`, `dataops_operations`
93
48
 
@@ -2,115 +2,32 @@
2
2
  name: ae-engage
3
3
  version: 1.0.0
4
4
  description: "AE Engage MCP: config items, flows, channel settings, task data query, and management"
5
- metadata:
6
- requires:
7
- bins: ["ae-cli"]
8
- cliHelp: "ae-cli engage --help"
9
5
  ---
10
6
 
11
7
  # ae-engage
12
8
 
13
9
  AE CLI (`ae-cli`) is the command-line tool for the ThinkingEngine data analysis platform, used by AI Agents and human users.
14
10
 
15
- ## Authentication
11
+ ## Global AE CLI Rules
16
12
 
17
- You must authenticate before use. Authentication priority:
13
+ AE CLI (`ae-cli`) is the command-line tool for the AE / TE / ThinkingEngine analysis platform. For AE analysis-side requests, prefer `ae-cli` and this skill's reference docs over model memory.
18
14
 
19
- 1. Environment variable `TE_TOKEN` (highest priority, suitable for CI/scripts)
20
- 2. Cached token (`~/.ae-cli/tokens.json`, valid for 20 hours)
21
- 3. macOS automatically extracts it from Chrome (macOS only)
15
+ Global parameters:
22
16
 
23
- ### Authentication Commands
17
+ | Parameter | Description |
18
+ |---|---|
19
+ | `--format <json\|table>` | Output format. Default is JSON. |
20
+ | `--jq <expr>` | jq filter expression for JSON output. |
24
21
 
25
- ```bash
26
- # Automatic macOS authentication (extract token from Chrome)
27
- ae-cli auth login
28
-
29
- # Manually set token
30
- ae-cli auth set-token <token>
31
-
32
- # View authentication status
33
- ae-cli auth status
34
-
35
- # Log out
36
- ae-cli auth logout
37
- ```
38
-
39
- ### Multi-environment Support
40
-
41
- ```bash
42
- # Specify host
43
- ae-cli auth login --host ta-staging.example.com
44
- ae-cli auth set-token <token> --host ta-staging.example.com
45
-
46
- # Configure default host
47
- ae-cli config set defaultHost ta-staging.example.com
48
- ```
49
-
50
- ## Global Parameters
51
-
52
- All commands support the following global parameters:
53
-
54
- | Parameter | Description | Default |
55
- |------|------|--------|
56
- | `--host <host>` | AE instance address | defaultHost from config or ta.thinkingdata.cn |
57
- | `--format <json\|table>` | Output format | json |
58
- | `--jq <expr>` | jq filter expression | - |
59
- | `--dry-run` | Show the request only, do not execute it | false |
60
- | `--yes` | Skip confirmation for write operations | false |
61
-
62
- ## Output Format
63
-
64
- ### JSON (default)
65
-
66
- ```json
67
- {
68
- "ok": true,
69
- "data": { ... }
70
- }
71
- ```
72
-
73
- ### Table
22
+ Output and errors:
23
+ - Successful commands return machine-readable JSON by default.
24
+ - Failed commands return `{ "ok": false, "error": { "type": "...", "message": "...", "hint": "..." } }` and exit non-zero.
74
25
 
75
- ```bash
76
- ae-cli engage +channel_list --project_id <YOUR_PROJECT_ID> --format table
77
- ```
78
-
79
- ### jq Filtering
80
-
81
- ```bash
82
- ae-cli engage +channel_list --project_id <YOUR_PROJECT_ID> --jq '.'
83
- ```
84
-
85
- ## Error Handling
86
-
87
- Error output goes to stderr, in the following format:
88
-
89
- ```json
90
- {
91
- "ok": false,
92
- "error": {
93
- "type": "auth | api | validation | config",
94
- "message": "...",
95
- "hint": "..."
96
- }
97
- }
98
- ```
99
-
100
- Exit code: success `0`, error `1`.
101
-
102
- ## Security Constraints
103
-
104
- - Commands with `risk: read` execute directly
105
- - Commands with `risk: write` require confirmation unless `--yes` is passed
106
- - Use `--dry-run` to preview the request that will be sent
107
-
108
- ## Command Structure
109
-
110
- ```bash
111
- ae-cli <domain> +<command> [flags]
112
- ae-cli api <METHOD> <PATH> [--params] [--data]
113
- ```
26
+ Safety constraints:
27
+ - Read commands can execute directly after required IDs and references are verified.
28
+ - Write commands require explicit user intent and normally keep the confirmation prompt.
29
+ - Never invent command names, flags, JSON payloads, `project_id`, resource IDs, field names, event names, property names, metric definitions, or date formats. Read the matching command reference and discover real project metadata first.
30
+ - **NEVER fabricate or guess resource names** (reports, dashboards, events, properties, metrics, clusters, tags, alerts). Always use list commands to discover real resources first. If a resource is not found after fuzzy search and full list fallback, explicitly tell the user "resource not found" and stop - do not proceed with fabricated names.
114
31
 
115
32
  ## Overview
116
33
 
@@ -1,81 +0,0 @@
1
- import {
2
- printError,
3
- printOutput
4
- } from "./chunk-KM57HI5B.js";
5
- import {
6
- clearToken,
7
- getAuthStatus,
8
- getToken,
9
- resolveHost,
10
- setTokenManual
11
- } from "./chunk-UK6HO5O5.js";
12
- import {
13
- loadConfig,
14
- saveConfig
15
- } from "./chunk-EBFUVWIZ.js";
16
-
17
- // src/commands/auth.ts
18
- function registerAuth(program) {
19
- const auth = program.command("auth").description("Authentication management");
20
- auth.command("login").description("Login to AE (auto-extract token from Chrome on macOS)").action(async () => {
21
- const host = resolveHost(program.opts().host);
22
- if (!host) {
23
- printError("config", "No AE host configured.", "Run: ae-cli config set-host");
24
- process.exit(1);
25
- }
26
- try {
27
- const token = await getToken(host);
28
- process.stderr.write(`[ae-cli] Authenticated to ${host}
29
- `);
30
- printOutput({ authenticated: true, host, token: token.slice(0, 8) + "..." }, program.opts().format || "json");
31
- } catch (err) {
32
- printError("auth", err.message);
33
- process.exit(1);
34
- }
35
- });
36
- auth.command("set-token <token>").description("Manually set authentication token for active host").action((token) => {
37
- const host = resolveHost(program.opts().host);
38
- if (!host) {
39
- printError("config", "No AE host configured.", "Run: ae-cli config set-host");
40
- process.exit(1);
41
- }
42
- const config = loadConfig();
43
- if (!config.hosts[host]) {
44
- config.hosts[host] = { label: host };
45
- if (!config.activeHost) {
46
- config.activeHost = host;
47
- }
48
- saveConfig(config);
49
- process.stderr.write(`[ae-cli] Config saved for ${host}
50
- `);
51
- printOutput({ saved: true, config }, program.opts().format || "json");
52
- }
53
- setTokenManual(token, host);
54
- process.stderr.write(`[ae-cli] Token saved for ${host}
55
- `);
56
- printOutput({ saved: true, host }, program.opts().format || "json");
57
- });
58
- auth.command("status").description("Show current authentication status").action(() => {
59
- const host = resolveHost(program.opts().host);
60
- if (!host) {
61
- printOutput({ authenticated: false, host: "(none)", hint: "Run: ae-cli config set-host" }, program.opts().format || "json");
62
- return;
63
- }
64
- const status = getAuthStatus(host);
65
- printOutput(status, program.opts().format || "json");
66
- });
67
- auth.command("logout").description("Clear stored token for active host").action(() => {
68
- const host = resolveHost(program.opts().host);
69
- if (!host) {
70
- printError("config", "No AE host configured.", "Run: ae-cli config set-host");
71
- process.exit(1);
72
- }
73
- clearToken(host);
74
- process.stderr.write(`[ae-cli] Token cleared for ${host}
75
- `);
76
- printOutput({ cleared: true, host }, program.opts().format || "json");
77
- });
78
- }
79
- export {
80
- registerAuth
81
- };