@thinkingai/ae-cli 6.0.63 → 6.0.65

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 (82) hide show
  1. package/README.md +8 -3
  2. package/README.zh.md +8 -3
  3. package/dist/{ai-monitor-X5GL44JT.js → ai-monitor-ABPXAOYL.js} +5 -5
  4. package/dist/ai-monitor.js +6 -6
  5. package/dist/{auth-SPQ46XQ3.js → auth-EV4FSIFI.js} +3 -3
  6. package/dist/{capability-JZP4KXZC.js → capability-B35ZQSSB.js} +3 -3
  7. package/dist/{chunk-E457FREE.js → chunk-434DSEOC.js} +6 -5
  8. package/dist/{chunk-F7TCQPQX.js → chunk-4COJB2CS.js} +1 -1
  9. package/dist/{chunk-YJYC5PLL.js → chunk-4CRZ2YUC.js} +2 -1
  10. package/dist/{chunk-RYY5NJK3.js → chunk-66F7SOGR.js} +2 -2
  11. package/dist/{chunk-PRCHMOWT.js → chunk-7AQ5Y6F2.js} +1 -1
  12. package/dist/{chunk-FGGEF7MI.js → chunk-7TENODN4.js} +2 -2
  13. package/dist/{chunk-VR2D54AA.js → chunk-7XTWP3NB.js} +1 -1
  14. package/dist/{chunk-6HOM2FOJ.js → chunk-A3PREN6Q.js} +4 -14
  15. package/dist/{chunk-2VKMHNUU.js → chunk-KVTFUP5T.js} +3 -3
  16. package/dist/{compat-check-JD5D77ET.js → compat-check-V3NGDQA5.js} +1 -1
  17. package/dist/{config-IIMRATTP.js → config-7OPBS5RW.js} +3 -3
  18. package/dist/context-WAR22IGB.js +349 -0
  19. package/dist/index.js +22 -22
  20. package/dist/{metadata-ZVPG2MIA.js → metadata-OROUBOO5.js} +5 -5
  21. package/dist/{personal-semantic-preference-YNCV4QG3.js → personal-semantic-preference-UQXUQJO3.js} +40 -15
  22. package/dist/{project-semantic-E7ZAQL5S.js → project-semantic-LEU2SN6J.js} +262 -14
  23. package/dist/{sync-Y4OZRQAY.js → sync-JXJUSBN3.js} +2 -2
  24. package/dist/{te-agent-RKAUTYJZ.js → te-agent-W67K6QTR.js} +1 -1
  25. package/dist/{te-analysis-7N5VC4JB.js → te-analysis-TJ7XHW6J.js} +306 -49
  26. package/dist/{te-community-SIA2UHTS.js → te-community-YNFYG42J.js} +4 -4
  27. package/dist/{te-dataops-5MJQCODU.js → te-dataops-GASA7SEG.js} +721 -217
  28. package/dist/{te-engage-ZTLOMKO3.js → te-engage-4CGFYLP6.js} +4 -4
  29. package/dist/{te-kb-LDL3MF2Y.js → te-kb-2ZYZKMDW.js} +27 -7
  30. package/dist/{te-team-JOWHCMZA.js → te-team-ZFQANIPN.js} +4 -4
  31. package/dist/{things-DOQ2L3O2.js → things-AYKSVWGZ.js} +1 -1
  32. package/dist/{update-KUS6TCPB.js → update-EDWNZQ6B.js} +2 -2
  33. package/package.json +4 -3
  34. package/skills/ae-analysis/SKILL.md +41 -16
  35. package/skills/ae-analysis/references/adhoc_export.md +1 -1
  36. package/skills/ae-analysis/references/adhoc_run.md +8 -2
  37. package/skills/ae-analysis/references/analysis_drilldown_contract.md +1 -1
  38. package/skills/ae-analysis/references/audience_scheduling.md +30 -0
  39. package/skills/ae-analysis/references/business_semantics_workspace.md +57 -0
  40. package/skills/ae-analysis/references/command_index.md +18 -13
  41. package/skills/ae-analysis/references/context_prepare.md +49 -0
  42. package/skills/ae-analysis/references/drilldown_entities_export.md +1 -1
  43. package/skills/ae-analysis/references/drilldown_entities_run.md +1 -1
  44. package/skills/ae-analysis/references/drilldown_user_events_export.md +3 -1
  45. package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -1
  46. package/skills/ae-analysis/references/governance_recommendation_export.md +1 -1
  47. package/skills/ae-analysis/references/personal_semantic_preference_add.md +5 -1
  48. package/skills/ae-analysis/references/personal_semantic_preference_get.md +4 -2
  49. package/skills/ae-analysis/references/personal_semantic_preference_list.md +7 -6
  50. package/skills/ae-analysis/references/personal_semantic_preference_submit.md +1 -1
  51. package/skills/ae-analysis/references/personal_semantic_preference_update.md +5 -1
  52. package/skills/ae-analysis/references/project_info_get.md +4 -0
  53. package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +1 -1
  54. package/skills/ae-analysis/references/project_semantic_setup.md +60 -0
  55. package/skills/ae-analysis/references/report_get.md +2 -0
  56. package/skills/ae-analysis/references/report_presentation.md +55 -0
  57. package/skills/ae-analysis/references/report_update.md +4 -2
  58. package/skills/ae-analysis/references/system_openapi_token_batch_generate.md +20 -0
  59. package/skills/ae-analysis/references/system_openapi_token_get.md +14 -0
  60. package/skills/ae-analysis/references/user_cluster_create.md +3 -1
  61. package/skills/ae-analysis/references/user_cluster_models.md +2 -0
  62. package/skills/ae-analysis/references/user_cluster_update.md +5 -3
  63. package/skills/ae-analysis/references/user_tag_create.md +4 -22
  64. package/skills/ae-analysis/references/user_tag_models.md +8 -0
  65. package/skills/ae-analysis/references/user_tag_update.md +6 -14
  66. package/skills/ae-analysis/scripts/read-semantic-catalog.mjs +40 -0
  67. package/skills/ae-analysis-global/SKILL.md +2 -2
  68. package/skills/ae-community/SKILL.md +1 -1
  69. package/skills/ae-data-integration/SKILL.md +1 -1
  70. package/skills/ae-data-integration-helper/SKILL.md +1 -1
  71. package/skills/ae-dataops/SKILL.md +9 -6
  72. package/skills/ae-dataops/references/dataops-flow-create.md +64 -47
  73. package/skills/ae-dataops/references/dataops-flow-monitor.md +4 -2
  74. package/skills/ae-dataops/references/dataops-flow-python.md +109 -0
  75. package/skills/ae-generate-tracking-code/SKILL.md +1 -1
  76. package/skills/ae-generate-tracking-plan/SKILL.md +2 -2
  77. package/skills/ae-kb/SKILL.md +10 -5
  78. package/skills/ae-kb/references/analysis-workflow.md +19 -10
  79. package/skills/ae-kb/references/query-workflow.md +34 -17
  80. package/skills/ae-kb-discovery/SKILL.md +4 -3
  81. package/skills/ae-migrate-tracking-code/SKILL.md +2 -2
  82. package/dist/context-BXHIPIIX.js +0 -138
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: ae-kb-discovery
3
- version: 1.0.0
3
+ version: 1.0.1
4
4
  description: >
5
- Discover which AE (Agentic Engine) knowledge bases accessible to the current user are worth searching, and decide whether to search at all, through read-only operations. Use when the user explicitly asks to search knowledge bases, internal documentation, or company materials. Also use when a task requires internal facts or business context, or when ae-analysis sees an enabled KB auto-discovery company switch before choosing its query route. Use internal context to explain data analysis results, anomalies, or trends and form evidence-backed conclusions. Do not use if the user explicitly asks not to access knowledge bases. This skill covers discovery and candidate selection; run the actual `+index` / `+grep` / `+read` / `+ask` retrieval with the `ae-kb` skill.
5
+ Discover which AE (Agentic Engine) knowledge bases accessible to the current user are worth searching, and decide whether to search at all, through read-only operations. Use when the user explicitly asks to search knowledge bases, internal documentation, or company materials, or when a task calls for internal facts or business context. For automatic project semantic knowledge-base consumption during data analysis, follow the project gate and exact target in ae-analysis. Do not use if the user explicitly asks not to access knowledge bases. This skill covers discovery and candidate selection; run the actual `+index` / `+grep` / `+read` / `+ask` retrieval with the `ae-kb` skill.
6
6
  ---
7
7
 
8
8
  # Knowledge Base Discovery
@@ -23,7 +23,8 @@ Use this skill when:
23
23
  - The task requires organization-specific facts or context, such as product design and rules, events, campaign or operations calendars, release and iteration records, workflows, policies, or terminology.
24
24
  - Internal context is needed to explain data analysis results, anomalies, or trends and form evidence-backed conclusions.
25
25
  - The knowledge base context currently available does not cover the question, and discovering other accessible sources has clear value.
26
- - `ae-analysis` read `data.routing.knowledge_base: auto` from `ae-cli config show` before selecting the project-scoped query route, and a knowledge base could materially improve the answer or asset selection.
26
+
27
+ For automatic project semantic KB consumption, `ae-analysis` uses its dual-switch policy and the exact project target. Do not discover other KBs when that lookup is disabled, unavailable or insufficient. Explicit requests for general KB discovery retain the workflow below.
27
28
 
28
29
  Do not use this skill when:
29
30
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ae-migrate-tracking-code
3
- version: 1.0.1
4
- description: "Migrate existing third-party SDK tracking code (Firebase, Amplitude, Sensors Data, Mixpanel, GA4) to the AE SDK (数数 / ThinkingAI / Agentic Engine / AE SDK) — switch (replace) or add alongside existing tracking (dual-write). Trigger words: 埋点迁移、埋点切换、第三方埋点迁移、第三方埋点切换、迁移埋点到数数、把 xx SDK 切换到数数、把已有埋点用数数实现一遍、用数数替换 xx SDK、集成数数并参考已有 xx SDK 埋点、Firebase 迁移、Amplitude 迁移、Mixpanel 迁移、神策迁移、Sensors Data 迁移、GA4 迁移、gtag 迁移、双写、tracking migration、migrate Firebase/Amplitude/Mixpanel/Sensors Data/GA4 to AE、switch xx SDK to ThinkingAI、replace xx SDK with AE、replace logEvent with track、re-implement existing tracking with ThinkingAI、add AE tracking alongside existing analytics、dual-write. Provider-agnostic core with per-provider adapters; reuses ae-generate-tracking-plan and ae-generate-tracking-code."
3
+ version: 1.0.2
4
+ description: "Migrate existing tracking from Firebase, Amplitude, Sensors Data, Mixpanel, GA4, gtag, or another analytics SDK to the ThinkingAI AE SDK. Use when replacing a provider, converting calls such as logEvent to track, reimplementing existing tracking in AE, or dual-writing alongside the source SDK. Uses provider-specific adapters and reuses ae-generate-tracking-plan and ae-generate-tracking-code."
5
5
  ---
6
6
 
7
7
  # ae-migrate-tracking-code
@@ -1,138 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
- import {
3
- TeAgentApiError,
4
- getFromMainApp
5
- } from "./chunk-ETQXIZFP.js";
6
- import {
7
- internalCallSourceHeaders
8
- } from "./chunk-PLNS5J33.js";
9
- import {
10
- safeJsonParse
11
- } from "./chunk-AMURHMS3.js";
12
- import {
13
- CliValidationError
14
- } from "./chunk-R2SVAO4G.js";
15
-
16
- // src/core/current-page-context-client.ts
17
- async function readCurrentPageContext(path) {
18
- const url = process.env.TE_AGENT_PAGE_CONTEXT_MCP_URL;
19
- const grant = process.env.TE_AGENT_PAGE_CONTEXT_TOKEN;
20
- if (url === void 0 && grant === void 0) return getFromMainApp(path);
21
- let endpoint;
22
- try {
23
- endpoint = new URL(url ?? "");
24
- if (!grant || !["http:", "https:"].includes(endpoint.protocol) || endpoint.username || endpoint.password || endpoint.search || endpoint.hash || !endpoint.pathname.endsWith("/api/internal/dashboard-context/mcp")) throw new Error();
25
- } catch {
26
- throw new TeAgentApiError("Current page context Run binding is invalid.", 0, "CURRENT_PAGE_CONTEXT_BINDING_INVALID");
27
- }
28
- let response;
29
- try {
30
- response = await fetch(endpoint.toString(), {
31
- method: "POST",
32
- redirect: "error",
33
- signal: AbortSignal.timeout(3e4),
34
- headers: {
35
- "Content-Type": "application/json",
36
- Accept: "application/json, text/event-stream",
37
- "MCP-Protocol-Version": "2025-03-26",
38
- "X-TE-Page-Context-Token": grant,
39
- ...internalCallSourceHeaders()
40
- },
41
- body: JSON.stringify({
42
- jsonrpc: "2.0",
43
- id: 1,
44
- method: "tools/call",
45
- params: { name: "read_current_page_context", arguments: {} }
46
- })
47
- });
48
- } catch {
49
- throw new TeAgentApiError("Current page context MCP request failed.", 0, "CURRENT_PAGE_CONTEXT_NETWORK_ERROR");
50
- }
51
- if (!response.ok) {
52
- await response.body?.cancel();
53
- throw new TeAgentApiError(
54
- `Current page context authorization/request failed (HTTP ${response.status}).`,
55
- response.status,
56
- "CURRENT_PAGE_CONTEXT_UNAVAILABLE",
57
- void 0,
58
- response.status === 403 ? "permission" : response.status === 401 ? "auth" : "api"
59
- );
60
- }
61
- const reader = response.body?.getReader();
62
- if (!reader) throw invalidResponse();
63
- const chunks = [];
64
- let size = 0;
65
- try {
66
- while (true) {
67
- const { value, done } = await reader.read();
68
- if (done) break;
69
- size += value.byteLength;
70
- if (size > 4 * 1024 * 1024) throw invalidResponse();
71
- chunks.push(value);
72
- }
73
- } catch {
74
- await reader.cancel().catch(() => void 0);
75
- throw invalidResponse();
76
- } finally {
77
- reader.releaseLock();
78
- }
79
- let envelope;
80
- try {
81
- envelope = safeJsonParse(Buffer.concat(chunks).toString("utf8"));
82
- } catch {
83
- throw invalidResponse();
84
- }
85
- if (envelope?.error || envelope?.result?.isError) {
86
- throw new TeAgentApiError(
87
- "Current page context is unavailable for this Run; authorization may have expired or been revoked.",
88
- 403,
89
- "CURRENT_PAGE_CONTEXT_UNAVAILABLE"
90
- );
91
- }
92
- const content = envelope?.result?.content;
93
- if (envelope?.jsonrpc !== "2.0" || envelope.id !== 1 || !Array.isArray(content) || content.length !== 1 || content[0]?.type !== "text") throw invalidResponse();
94
- try {
95
- return safeJsonParse(content[0].text);
96
- } catch {
97
- throw invalidResponse();
98
- }
99
- }
100
- function invalidResponse() {
101
- return new TeAgentApiError("Invalid current page context MCP response.", 0, "CURRENT_PAGE_CONTEXT_RESPONSE_INVALID");
102
- }
103
-
104
- // src/commands/context/current.ts
105
- var CURRENT_PAGE_CONTEXT_PATH = "/api/sandbox/agent/context/current";
106
- function createCurrentPageContextCommand(read = readCurrentPageContext, readConversationId = () => process.env.TE_AGENT_CONVERSATION_ID) {
107
- return {
108
- service: "context",
109
- command: "+current",
110
- description: "Read the current page context bound to the active Agent Run",
111
- flags: [],
112
- risk: "read",
113
- usesAeHost: false,
114
- execute: async () => {
115
- const conversationId = readConversationId()?.trim();
116
- if (!conversationId) {
117
- throw new CliValidationError(
118
- "Current page context is available only inside an active Agent Run.",
119
- {
120
- code: "CURRENT_PAGE_CONTEXT_RUN_REQUIRED",
121
- hint: "Open AE Agent from a supported product page and ask about the current page."
122
- }
123
- );
124
- }
125
- const query = new URLSearchParams({ conversationId });
126
- return read(`${CURRENT_PAGE_CONTEXT_PATH}?${query.toString()}`);
127
- }
128
- };
129
- }
130
- var currentPageContext = createCurrentPageContextCommand();
131
-
132
- // src/commands/context/index.ts
133
- var commands = [currentPageContext];
134
- var context_default = commands;
135
- export {
136
- currentPageContext,
137
- context_default as default
138
- };