@thinkingai/ae-cli 6.1.42 → 6.1.44
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 +14 -4
- package/README.zh.md +14 -4
- package/bin/ae-cli.js +3 -0
- package/bin/heari/commander-LICENSE +22 -0
- package/bin/heari/engine.mjs +6136 -0
- package/bin/heari/package.json +6 -0
- package/bin/heari.mjs +29 -0
- package/cli-installation-guide.md +3 -5
- package/dist/{ai-monitor-E62FT3TT.js → ai-monitor-4VPHXQTL.js} +7 -6
- package/dist/ai-monitor.js +10 -9
- package/dist/{auth-SDK5OAGP.js → auth-RDSS2LUT.js} +18 -16
- package/dist/{automation-IMDCJUML.js → automation-VLIWG2XY.js} +5 -4
- package/dist/{capability-F6YWGPZZ.js → capability-CUOEIB5F.js} +5 -4
- package/dist/{chunk-KE5WGBXS.js → chunk-3DTMWDJX.js} +1 -1
- package/dist/{chunk-KAZ5FWPB.js → chunk-3FSYICDW.js} +6 -5
- package/dist/{chunk-ZK6KEGUR.js → chunk-3TV24AVQ.js} +10 -10
- package/dist/{chunk-DTODOQ6T.js → chunk-3U75VLCP.js} +1 -1
- package/dist/{chunk-N2QILIGH.js → chunk-4MOCV6HU.js} +1 -1
- package/dist/{chunk-M2OCZRVX.js → chunk-6VLHJKDD.js} +2 -2
- package/dist/{chunk-WG27BD67.js → chunk-7KBENPQF.js} +8 -16
- package/dist/{chunk-CDBW5RE6.js → chunk-BFSWGXM2.js} +3 -3
- package/dist/{chunk-UK7HQ4IL.js → chunk-CBNE2S44.js} +2 -2
- package/dist/{chunk-UWQXGF44.js → chunk-FEYZBUFQ.js} +4 -353
- package/dist/chunk-FKTVD63C.js +369 -0
- package/dist/{chunk-2H3SFJE3.js → chunk-FKVG7LOP.js} +5 -3
- package/dist/{chunk-GTENC5CO.js → chunk-IAZ4AMVY.js} +6 -4
- package/dist/{chunk-ZSKLELL7.js → chunk-LSELMDKQ.js} +2 -2
- package/dist/{chunk-2RORKIF6.js → chunk-NJGB4YOH.js} +2 -2
- package/dist/{chunk-L7MT53VM.js → chunk-PWG5IGCP.js} +1 -1
- package/dist/{chunk-DIYDOOBL.js → chunk-TFEGYB4X.js} +2 -2
- package/dist/{chunk-DZRQGI2Z.js → chunk-ZPAOEDK7.js} +5 -3
- package/dist/{compat-check-J5K3NO5G.js → compat-check-L3C7HCVG.js} +4 -3
- package/dist/{config-O3W6XLHO.js → config-LAF5MMYK.js} +6 -5
- package/dist/context-E4YKECC4.js +350 -0
- package/dist/{evaluation-OZM54MES.js → evaluation-I4IJ25CY.js} +4 -3
- package/dist/heari-cli-login.js +83 -0
- package/dist/index.js +42 -34
- package/dist/{memory-VPOPSU52.js → memory-Y7LPCRP4.js} +5 -4
- package/dist/{metadata-3GA2N27I.js → metadata-T6HYAU7E.js} +7 -6
- package/dist/{model-2F2354QP.js → model-2BNN72MN.js} +7 -6
- package/dist/{personal-semantic-preference-T2HFF2V4.js → personal-semantic-preference-WCZBOA7V.js} +42 -16
- package/dist/{project-semantic-WJOP2HGJ.js → project-semantic-WW5AZST3.js} +266 -17
- package/dist/{sync-K65X7ODO.js → sync-6PL25V42.js} +13 -12
- package/dist/{te-agent-QWZC36YS.js → te-agent-KXLDW4NE.js} +6 -5
- package/dist/{te-analysis-7E2GVKOR.js → te-analysis-KKRECQ7F.js} +311 -52
- package/dist/{te-community-NQNSLNON.js → te-community-6RGX7IWH.js} +8 -6
- package/dist/{te-dataops-PMI7UX36.js → te-dataops-RSPBC6WJ.js} +726 -220
- package/dist/{te-engage-EZBV5IPQ.js → te-engage-FIPP5L2Z.js} +6 -5
- package/dist/{te-experiment-RDB3TYBG.js → te-experiment-KQ5CBYKI.js} +86 -10
- package/dist/{te-kb-OWPJB243.js → te-kb-XYSDXZUG.js} +32 -11
- package/dist/{te-system-Z4VEB6PL.js → te-system-QSOHAP7M.js} +7 -6
- package/dist/{te-team-NCMN34IL.js → te-team-R6MZ4RK2.js} +6 -5
- package/dist/{things-UBMLTY3S.js → things-DEONFUGS.js} +6 -5
- package/dist/{update-LYVYF3KJ.js → update-C6G4P3C7.js} +5 -4
- package/dist/{web-runtime-XJWDFVP3.js → web-runtime-UGKPTBOK.js} +12 -10
- package/dist/{workspace-W5ZPVWJS.js → workspace-OBIIE5FN.js} +5 -4
- package/package.json +7 -5
- package/skills/ae-analysis/SKILL.md +41 -16
- package/skills/ae-analysis/references/adhoc_export.md +1 -1
- package/skills/ae-analysis/references/adhoc_run.md +8 -2
- package/skills/ae-analysis/references/analysis_drilldown_contract.md +1 -1
- package/skills/ae-analysis/references/audience_scheduling.md +30 -0
- package/skills/ae-analysis/references/business_semantics_workspace.md +57 -0
- package/skills/ae-analysis/references/command_index.md +18 -13
- package/skills/ae-analysis/references/context_prepare.md +49 -0
- package/skills/ae-analysis/references/drilldown_entities_export.md +1 -1
- package/skills/ae-analysis/references/drilldown_entities_run.md +1 -1
- package/skills/ae-analysis/references/drilldown_user_events_export.md +3 -1
- package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -1
- package/skills/ae-analysis/references/governance_recommendation_export.md +1 -1
- package/skills/ae-analysis/references/personal_semantic_preference_add.md +5 -1
- package/skills/ae-analysis/references/personal_semantic_preference_get.md +4 -2
- package/skills/ae-analysis/references/personal_semantic_preference_list.md +7 -6
- package/skills/ae-analysis/references/personal_semantic_preference_submit.md +1 -1
- package/skills/ae-analysis/references/personal_semantic_preference_update.md +5 -1
- package/skills/ae-analysis/references/project_info_get.md +4 -0
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +1 -1
- package/skills/ae-analysis/references/project_semantic_setup.md +60 -0
- package/skills/ae-analysis/references/report_get.md +2 -0
- package/skills/ae-analysis/references/report_presentation.md +55 -0
- package/skills/ae-analysis/references/report_update.md +4 -2
- package/skills/ae-analysis/references/system_openapi_token_batch_generate.md +20 -0
- package/skills/ae-analysis/references/system_openapi_token_get.md +14 -0
- package/skills/ae-analysis/references/user_cluster_create.md +3 -1
- package/skills/ae-analysis/references/user_cluster_models.md +2 -0
- package/skills/ae-analysis/references/user_cluster_update.md +5 -3
- package/skills/ae-analysis/references/user_tag_create.md +4 -22
- package/skills/ae-analysis/references/user_tag_models.md +8 -0
- package/skills/ae-analysis/references/user_tag_update.md +6 -14
- package/skills/ae-analysis/scripts/read-semantic-catalog.mjs +40 -0
- package/skills/ae-analysis-global/SKILL.md +2 -2
- package/skills/ae-capability/SKILL.md +5 -1
- package/skills/ae-community/SKILL.md +1 -1
- package/skills/ae-data-integration/SKILL.md +1 -1
- package/skills/ae-data-integration-helper/SKILL.md +1 -1
- package/skills/ae-dataops/SKILL.md +9 -6
- package/skills/ae-dataops/references/dataops-flow-create.md +64 -47
- package/skills/ae-dataops/references/dataops-flow-monitor.md +4 -2
- package/skills/ae-dataops/references/dataops-flow-python.md +109 -0
- package/skills/ae-experiment/SKILL.md +9 -1
- package/skills/ae-experiment/references/manage_feature_fixed_value.md +73 -0
- package/skills/ae-experiment/references/save_feature.md +14 -1
- package/skills/ae-generate-tracking-code/SKILL.md +1 -1
- package/skills/ae-generate-tracking-plan/SKILL.md +2 -2
- package/skills/ae-heari-research/SKILL.md +40 -0
- package/skills/ae-heari-research/references/design.md +35 -0
- package/skills/ae-heari-research/references/examples.md +46 -0
- package/skills/ae-heari-research/references/platform-auth.md +35 -0
- package/skills/ae-heari-research/references/platform-research.md +74 -0
- package/skills/ae-heari-research/references/platform-results.md +73 -0
- package/skills/ae-heari-research/references/platform.md +34 -0
- package/skills/ae-heari-research/references/probing-screening.md +31 -0
- package/skills/ae-heari-research/references/quality.md +44 -0
- package/skills/ae-kb/SKILL.md +10 -5
- package/skills/ae-kb/references/analysis-workflow.md +19 -10
- package/skills/ae-kb/references/query-workflow.md +34 -17
- package/skills/ae-kb-discovery/SKILL.md +4 -3
- package/skills/ae-migrate-tracking-code/SKILL.md +2 -2
- package/skills/ae-onboarding/SKILL.md +3 -3
- package/dist/context-WJQGJD6F.js +0 -139
- package/dist/{data-integration-KMJWYAKK.js → data-integration-SCYYZLWI.js} +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ae-migrate-tracking-code
|
|
3
|
-
version: 1.0.
|
|
4
|
-
description: "Migrate existing
|
|
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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ae-onboarding
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.57
|
|
4
4
|
description: "Guide Demo growth analysis, business diagnosis, and A/B draft review in AE onboarding, and route business data integration in a local agent."
|
|
5
5
|
metadata:
|
|
6
6
|
internal: true
|
|
@@ -55,7 +55,7 @@ Follow the [local Demo journey](references/demo-journey.md) for project overview
|
|
|
55
55
|
For a versioned onboarding entry, follow [shared progress](references/onboarding_run.md#shared-progress) before starting or resuming the first Demo. After verifying its A/B replay, record completion using the same run ID. Web uses the platform identity for the same commands.
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
Use the server-selected recommendation when there is no confirmed sample selection. Keep the selected sample through the verified experiment. Offer a sample picker after a verified report. Pass `run --sample <sample-id>` once after the user selects a sample for the next round. If the response says `poll_demo`, wait for `poll_after_ms` and resume `run`. Report a preparation error with its retry action.
|
|
58
|
+
Use the server-selected recommendation when there is no confirmed sample selection. Keep the selected sample through the verified experiment. Offer a sample picker after a verified report. Pass `run --sample <sample-id>` once after the user selects a sample for the next round. Before the first `run` that enters a sample in this conversation, tell the user in one line that the Demo data is being prepared. If the response says `poll_demo`, wait for `poll_after_ms` and resume `run`. Report a preparation error with its retry action.
|
|
59
59
|
|
|
60
60
|
On Web, show the [project overview](references/onboarding_growth.md#demo-overview) before using the existing growth picker. On a local agent, use the [local Demo overview](references/demo-journey.md#project-overview) and its two analysis routes. A direct scenario uses [growth results](references/onboarding_growth.md).
|
|
61
61
|
|
|
@@ -75,7 +75,7 @@ On `phase=ready`, retain `run_id` and display the [A/B comparison table](referen
|
|
|
75
75
|
|
|
76
76
|
### Confirm and start the A/B experiment
|
|
77
77
|
|
|
78
|
-
When the customer chooses **审核通过并启动** or explicitly confirms the displayed runnable plan, call [experiment-launch](references/onboarding_experiment_launch.md) with its saved `run_id` and `--wait-report`. This starts the experiment, immediately replays the synthetic events and waits for exposure data. **Required for every onboarding Demo approval:** only `ae-cli analysis onboarding experiment-launch` may submit or approve the draft, including on retries and resumes. If a resumed run returns `upload_experiment_replay`, proceed with `--wait-report` immediately. After the Receiver accepts the replay, [verify the persisted events](references/demo-operations.md#report-verified-results) in the same turn. Once they match the replay receipt, present the Demo report in the conversation, even if the platform summary is pending or differs. Follow the [completion format](references/demo-operations.md#choose-the-next-step) for the report link, welcome message and next choices.
|
|
78
|
+
When the customer chooses **审核通过并启动** or explicitly confirms the displayed runnable plan, tell the user in one line that the experiment is starting and synthetic events are being replayed, then call [experiment-launch](references/onboarding_experiment_launch.md) with its saved `run_id` and `--wait-report`. This starts the experiment, immediately replays the synthetic events and waits for exposure data. **Required for every onboarding Demo approval:** only `ae-cli analysis onboarding experiment-launch` may submit or approve the draft, including on retries and resumes. If a resumed run returns `upload_experiment_replay`, proceed with `--wait-report` immediately. After the Receiver accepts the replay, [verify the persisted events](references/demo-operations.md#report-verified-results) in the same turn. Once they match the replay receipt, present the Demo report in the conversation, even if the platform summary is pending or differs. Follow the [completion format](references/demo-operations.md#choose-the-next-step) for the report link, welcome message and next choices.
|
|
79
79
|
|
|
80
80
|
For an explicit request to launch a Demo experiment, use the requested or previously selected scenario. If neither is available, use the default. Obtain a `run_id` and launch using the existing authorization. For a local review draft request, use `experiment-plan --draft-only`. For requests that explicitly ask to create an AE platform draft, follow [draft-only creation](references/demo-operations.md#draft-only-creation). After the Demo, route **Connect my data** through [business data integration](references/business-data.md).
|
|
81
81
|
|
package/dist/context-WJQGJD6F.js
DELETED
|
@@ -1,139 +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-KE5WGBXS.js";
|
|
6
|
-
import {
|
|
7
|
-
internalCallSourceHeaders
|
|
8
|
-
} from "./chunk-UWQXGF44.js";
|
|
9
|
-
import {
|
|
10
|
-
safeJsonParse
|
|
11
|
-
} from "./chunk-IGU3R2JD.js";
|
|
12
|
-
import "./chunk-MTK4ZE7W.js";
|
|
13
|
-
import {
|
|
14
|
-
CliValidationError
|
|
15
|
-
} from "./chunk-3ZQY7SLZ.js";
|
|
16
|
-
|
|
17
|
-
// src/core/current-page-context-client.ts
|
|
18
|
-
async function readCurrentPageContext(path) {
|
|
19
|
-
const url = process.env.TE_AGENT_PAGE_CONTEXT_MCP_URL;
|
|
20
|
-
const grant = process.env.TE_AGENT_PAGE_CONTEXT_TOKEN;
|
|
21
|
-
if (url === void 0 && grant === void 0) return getFromMainApp(path);
|
|
22
|
-
let endpoint;
|
|
23
|
-
try {
|
|
24
|
-
endpoint = new URL(url ?? "");
|
|
25
|
-
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();
|
|
26
|
-
} catch {
|
|
27
|
-
throw new TeAgentApiError("Current page context Run binding is invalid.", 0, "CURRENT_PAGE_CONTEXT_BINDING_INVALID");
|
|
28
|
-
}
|
|
29
|
-
let response;
|
|
30
|
-
try {
|
|
31
|
-
response = await fetch(endpoint.toString(), {
|
|
32
|
-
method: "POST",
|
|
33
|
-
redirect: "error",
|
|
34
|
-
signal: AbortSignal.timeout(3e4),
|
|
35
|
-
headers: {
|
|
36
|
-
"Content-Type": "application/json",
|
|
37
|
-
Accept: "application/json, text/event-stream",
|
|
38
|
-
"MCP-Protocol-Version": "2025-03-26",
|
|
39
|
-
"X-TE-Page-Context-Token": grant,
|
|
40
|
-
...internalCallSourceHeaders()
|
|
41
|
-
},
|
|
42
|
-
body: JSON.stringify({
|
|
43
|
-
jsonrpc: "2.0",
|
|
44
|
-
id: 1,
|
|
45
|
-
method: "tools/call",
|
|
46
|
-
params: { name: "read_current_page_context", arguments: {} }
|
|
47
|
-
})
|
|
48
|
-
});
|
|
49
|
-
} catch {
|
|
50
|
-
throw new TeAgentApiError("Current page context MCP request failed.", 0, "CURRENT_PAGE_CONTEXT_NETWORK_ERROR");
|
|
51
|
-
}
|
|
52
|
-
if (!response.ok) {
|
|
53
|
-
await response.body?.cancel();
|
|
54
|
-
throw new TeAgentApiError(
|
|
55
|
-
`Current page context authorization/request failed (HTTP ${response.status}).`,
|
|
56
|
-
response.status,
|
|
57
|
-
"CURRENT_PAGE_CONTEXT_UNAVAILABLE",
|
|
58
|
-
void 0,
|
|
59
|
-
response.status === 403 ? "permission" : response.status === 401 ? "auth" : "api"
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
const reader = response.body?.getReader();
|
|
63
|
-
if (!reader) throw invalidResponse();
|
|
64
|
-
const chunks = [];
|
|
65
|
-
let size = 0;
|
|
66
|
-
try {
|
|
67
|
-
while (true) {
|
|
68
|
-
const { value, done } = await reader.read();
|
|
69
|
-
if (done) break;
|
|
70
|
-
size += value.byteLength;
|
|
71
|
-
if (size > 4 * 1024 * 1024) throw invalidResponse();
|
|
72
|
-
chunks.push(value);
|
|
73
|
-
}
|
|
74
|
-
} catch {
|
|
75
|
-
await reader.cancel().catch(() => void 0);
|
|
76
|
-
throw invalidResponse();
|
|
77
|
-
} finally {
|
|
78
|
-
reader.releaseLock();
|
|
79
|
-
}
|
|
80
|
-
let envelope;
|
|
81
|
-
try {
|
|
82
|
-
envelope = safeJsonParse(Buffer.concat(chunks).toString("utf8"));
|
|
83
|
-
} catch {
|
|
84
|
-
throw invalidResponse();
|
|
85
|
-
}
|
|
86
|
-
if (envelope?.error || envelope?.result?.isError) {
|
|
87
|
-
throw new TeAgentApiError(
|
|
88
|
-
"Current page context is unavailable for this Run; authorization may have expired or been revoked.",
|
|
89
|
-
403,
|
|
90
|
-
"CURRENT_PAGE_CONTEXT_UNAVAILABLE"
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
const content = envelope?.result?.content;
|
|
94
|
-
if (envelope?.jsonrpc !== "2.0" || envelope.id !== 1 || !Array.isArray(content) || content.length !== 1 || content[0]?.type !== "text") throw invalidResponse();
|
|
95
|
-
try {
|
|
96
|
-
return safeJsonParse(content[0].text);
|
|
97
|
-
} catch {
|
|
98
|
-
throw invalidResponse();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
function invalidResponse() {
|
|
102
|
-
return new TeAgentApiError("Invalid current page context MCP response.", 0, "CURRENT_PAGE_CONTEXT_RESPONSE_INVALID");
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// src/commands/context/current.ts
|
|
106
|
-
var CURRENT_PAGE_CONTEXT_PATH = "/api/sandbox/agent/context/current";
|
|
107
|
-
function createCurrentPageContextCommand(read = readCurrentPageContext, readConversationId = () => process.env.TE_AGENT_CONVERSATION_ID) {
|
|
108
|
-
return {
|
|
109
|
-
service: "context",
|
|
110
|
-
command: "+current",
|
|
111
|
-
description: "Read the current page context bound to the active Agent Run",
|
|
112
|
-
flags: [],
|
|
113
|
-
risk: "read",
|
|
114
|
-
usesAeHost: false,
|
|
115
|
-
execute: async () => {
|
|
116
|
-
const conversationId = readConversationId()?.trim();
|
|
117
|
-
if (!conversationId) {
|
|
118
|
-
throw new CliValidationError(
|
|
119
|
-
"Current page context is available only inside an active Agent Run.",
|
|
120
|
-
{
|
|
121
|
-
code: "CURRENT_PAGE_CONTEXT_RUN_REQUIRED",
|
|
122
|
-
hint: "Open AE Agent from a supported product page and ask about the current page."
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
const query = new URLSearchParams({ conversationId });
|
|
127
|
-
return read(`${CURRENT_PAGE_CONTEXT_PATH}?${query.toString()}`);
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
var currentPageContext = createCurrentPageContextCommand();
|
|
132
|
-
|
|
133
|
-
// src/commands/context/index.ts
|
|
134
|
-
var commands = [currentPageContext];
|
|
135
|
-
var context_default = commands;
|
|
136
|
-
export {
|
|
137
|
-
currentPageContext,
|
|
138
|
-
context_default as default
|
|
139
|
-
};
|
|
@@ -4,6 +4,10 @@ import {
|
|
|
4
4
|
validateDraft
|
|
5
5
|
} from "./chunk-6NJZSWUT.js";
|
|
6
6
|
import "./chunk-N2MAYIRU.js";
|
|
7
|
+
import {
|
|
8
|
+
assembleSyncJsonBody,
|
|
9
|
+
resolveSyncJsonEndpoint
|
|
10
|
+
} from "./chunk-6IUTXRAD.js";
|
|
7
11
|
import {
|
|
8
12
|
MAPPING_VERSION,
|
|
9
13
|
assessFileSize,
|
|
@@ -31,10 +35,6 @@ import {
|
|
|
31
35
|
require_archiver
|
|
32
36
|
} from "./chunk-GD5JSAGV.js";
|
|
33
37
|
import "./chunk-NPH5J65M.js";
|
|
34
|
-
import {
|
|
35
|
-
assembleSyncJsonBody,
|
|
36
|
-
resolveSyncJsonEndpoint
|
|
37
|
-
} from "./chunk-6IUTXRAD.js";
|
|
38
38
|
import {
|
|
39
39
|
getConfigDir
|
|
40
40
|
} from "./chunk-IGU3R2JD.js";
|