@thinkingai/ae-cli 6.0.33 → 6.0.35
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 +3 -2
- package/README.zh.md +3 -2
- package/dist/index.js +24 -16
- package/dist/{metadata-W2MEOI4Z.js → metadata-ELUAR3EJ.js} +0 -53
- package/dist/{metadata-3M5F2AED.js → metadata-P5GIVMZ6.js} +0 -53
- package/dist/{te-agent-K2OWMZXT.js → te-agent-BOQ7ZY56.js} +194 -1
- package/dist/{te-analysis-Q7AZCDU4.js → te-analysis-HZIP6SYW.js} +446 -562
- package/dist/{te-analysis-I73ZS4NK.js → te-analysis-ZT2MYAHL.js} +446 -562
- package/dist/{te-dataops-MJV54MNY.js → te-dataops-VYN3IOKO.js} +6 -6
- package/dist/{te-dataops-OA7I6HBG.js → te-dataops-Y5QAPPPF.js} +6 -6
- package/dist/{te-engage-GJRVQMK3.js → te-engage-2FSDUOIZ.js} +965 -1578
- package/dist/{te-engage-JIXX3WBI.js → te-engage-BMJ6UOUU.js} +965 -1578
- package/dist/{te-kb-CIZXRWMO.js → te-kb-E7NSCBRB.js} +25 -6
- package/dist/te-meta-GBDTMPEL.js +95 -0
- package/dist/te-meta-ZTLTSHXC.js +95 -0
- package/package.json +5 -4
- package/skills/ae-agent/SKILL.md +5 -1
- package/skills/ae-agent/references/list-sandbox-tools.md +79 -0
- package/skills/ae-analysis/SKILL.md +8 -9
- package/skills/ae-analysis/references/adhoc_export.md +8 -0
- package/skills/ae-analysis/references/adhoc_run.md +9 -0
- package/skills/ae-analysis/references/ai_models.md +3 -1
- package/skills/ae-analysis/references/analysis_data_retrieval.md +2 -0
- package/skills/ae-analysis/references/analysis_drilldown_contract.md +2 -0
- package/skills/ae-analysis/references/analysis_gateway_assets.md +9 -7
- package/skills/ae-analysis/references/command_index.md +18 -40
- package/skills/ae-analysis/references/dashboard_report_data_export.md +4 -2
- package/skills/ae-analysis/references/dashboard_report_data_run.md +5 -3
- package/skills/ae-analysis/references/drilldown_entities_export.md +3 -0
- package/skills/ae-analysis/references/drilldown_entities_run.md +2 -1
- package/skills/ae-analysis/references/drilldown_events_export.md +3 -0
- package/skills/ae-analysis/references/drilldown_events_run.md +2 -1
- package/skills/ae-analysis/references/drilldown_user_events_export.md +3 -0
- package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -0
- package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
- package/skills/ae-analysis/references/filter_value_list.md +47 -0
- package/skills/ae-analysis/references/project_space_get.md +3 -3
- package/skills/ae-analysis/references/project_space_list.md +6 -2
- package/skills/ae-analysis/references/query_cancel.md +3 -1
- package/skills/ae-analysis/references/query_cluster_list.md +34 -0
- package/skills/ae-analysis/references/query_create_result_cluster.md +2 -0
- package/skills/ae-analysis/references/report_create.md +5 -1
- package/skills/ae-analysis/references/report_data_export.md +9 -2
- package/skills/ae-analysis/references/report_data_run.md +8 -3
- package/skills/ae-analysis/references/report_get.md +3 -1
- package/skills/ae-analysis/references/report_update.md +4 -0
- package/skills/ae-analysis/references/virtual_event_create.md +7 -6
- package/skills/ae-analysis-global/SKILL.md +15 -32
- package/skills/ae-community/SKILL.md +1 -1
- package/skills/ae-data-integration-helper/SKILL.md +3 -2
- package/skills/ae-data-integration-helper/references/sdk_usage_notes.md +1 -1
- package/skills/ae-dataops/SKILL.md +2 -1
- package/skills/ae-dataops/references/dataops-integration.md +75 -6
- package/skills/ae-engage/SKILL.md +127 -104
- package/skills/ae-engage/references/activity-activity-type.md +1 -1
- package/skills/ae-engage/references/activity-activity.md +1 -1
- package/skills/ae-engage/references/activity-approval.md +5 -7
- package/skills/ae-engage/references/activity-task.md +12 -18
- package/skills/ae-engage/references/activity-topic.md +39 -22
- package/skills/ae-engage/references/add-approver.md +4 -4
- package/skills/ae-engage/references/add-channel.md +10 -5
- package/skills/ae-engage/references/approval-approver-delete.md +1 -1
- package/skills/ae-engage/references/approver-list.md +4 -4
- package/skills/ae-engage/references/build-task-save-guide.md +13 -13
- package/skills/ae-engage/references/cancel-query-by-request-id.md +7 -6
- package/skills/ae-engage/references/channel-detail.md +14 -9
- package/skills/ae-engage/references/channel-list.md +15 -10
- package/skills/ae-engage/references/channel-mgmt.md +109 -0
- package/skills/ae-engage/references/channel-test-send.md +1 -1
- package/skills/ae-engage/references/channel-update-config.md +1 -1
- package/skills/ae-engage/references/channel_touch_limits_list.md +1 -1
- package/skills/ae-engage/references/client-param.md +34 -16
- package/skills/ae-engage/references/common-metric.md +85 -18
- package/skills/ae-engage/references/config-item-analysis-report.md +8 -27
- package/skills/ae-engage/references/config-item-strategy-comparison.md +7 -18
- package/skills/ae-engage/references/config-item-trigger-report.md +8 -35
- package/skills/ae-engage/references/delete-channel.md +5 -5
- package/skills/ae-engage/references/delete-flow.md +5 -5
- package/skills/ae-engage/references/flow-ab-split-node-report.md +11 -45
- package/skills/ae-engage/references/flow-detail.md +15 -10
- package/skills/ae-engage/references/flow-list.md +9 -4
- package/skills/ae-engage/references/flow-node-config-schema.md +9 -8
- package/skills/ae-engage/references/flow-node-detail-report.md +11 -46
- package/skills/ae-engage/references/flow-node-overview-report.md +11 -43
- package/skills/ae-engage/references/flow-process-report.md +12 -50
- package/skills/ae-engage/references/flow-update-remark.md +19 -0
- package/skills/ae-engage/references/manage-flow.md +19 -19
- package/skills/ae-engage/references/manage-task.md +5 -5
- package/skills/ae-engage/references/modify-flow-base-info.md +8 -8
- package/skills/ae-engage/references/preset-event.md +1 -1
- package/skills/ae-engage/references/push-language.md +1 -1
- package/skills/ae-engage/references/save-flow.md +54 -52
- package/skills/ae-engage/references/save-task.md +23 -17
- package/skills/ae-engage/references/scene-config-channel.md +90 -10
- package/skills/ae-engage/references/scene-config-group.md +1 -1
- package/skills/ae-engage/references/scene-config-item.md +27 -4
- package/skills/ae-engage/references/scene-config-metric.md +1 -1
- package/skills/ae-engage/references/scene-config-param.md +2 -2
- package/skills/ae-engage/references/scene-preset-metric.md +1 -1
- package/skills/ae-engage/references/scene-strategy.md +19 -3
- package/skills/ae-engage/references/scene-template.md +10 -4
- package/skills/ae-engage/references/task-data-detail.md +5 -67
- package/skills/ae-engage/references/task-data-overview.md +5 -35
- package/skills/ae-engage/references/task-detail.md +5 -5
- package/skills/ae-engage/references/task-experiment-report.md +5 -38
- package/skills/ae-engage/references/task-list.md +4 -4
- package/skills/ae-engage/references/task-metric-detail.md +5 -43
- package/skills/ae-engage/references/task-stats.md +5 -5
- package/skills/ae-engage/references/update-channel-status.md +6 -6
- package/skills/ae-engage/references/validate-flow-node-config.md +12 -11
- package/skills/ae-engage/references/whitelist-list.md +4 -4
- package/skills/ae-engage/references/whitelist.md +1 -1
- package/skills/ae-engage/references/workbench-workbench.md +1 -1
- package/skills/ae-generate-tracking-code/SKILL.md +4 -3
- package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +1 -1
- package/skills/ae-generate-tracking-code/references/server-sdk-insert.md +1 -1
- package/skills/ae-generate-tracking-code/references/snippet-delivery.md +1 -1
- package/skills/ae-generate-tracking-plan/SKILL.md +6 -2
- package/skills/ae-kb/SKILL.md +9 -5
- package/skills/ae-metadata/SKILL.md +8 -15
- package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
- package/dist/te-common-ST3QPSXJ.js +0 -61
- package/dist/te-common-WSLIKKPC.js +0 -61
- package/dist/te-meta-Q4L6EE3Q.js +0 -363
- package/dist/te-meta-VHCN4Q62.js +0 -363
- package/skills/ae-analysis/references/batch_create_metadata.md +0 -41
- package/skills/ae-analysis/references/batch_edit_metadata.md +0 -39
- package/skills/ae-analysis/references/cancel_query.md +0 -38
- package/skills/ae-analysis/references/create_alert.md +0 -47
- package/skills/ae-analysis/references/create_entity.md +0 -39
- package/skills/ae-analysis/references/create_project_mark_time.md +0 -39
- package/skills/ae-analysis/references/delete_alert.md +0 -32
- package/skills/ae-analysis/references/delete_project_mark_times.md +0 -36
- package/skills/ae-analysis/references/delete_track_items.md +0 -36
- package/skills/ae-analysis/references/generate_track_program.md +0 -52
- package/skills/ae-analysis/references/generate_track_sdk_sample.md +0 -44
- package/skills/ae-analysis/references/get_alert.md +0 -35
- package/skills/ae-analysis/references/get_alert_definition_schema.md +0 -33
- package/skills/ae-analysis/references/get_project_config.md +0 -33
- package/skills/ae-analysis/references/get_track_program.md +0 -34
- package/skills/ae-analysis/references/list_alerts.md +0 -41
- package/skills/ae-analysis/references/list_entities.md +0 -42
- package/skills/ae-analysis/references/list_project_mark_times.md +0 -43
- package/skills/ae-analysis/references/list_project_users.md +0 -33
- package/skills/ae-analysis/references/list_projects.md +0 -39
- package/skills/ae-analysis/references/load_filters.md +0 -47
- package/skills/ae-analysis/references/save_track_items.md +0 -37
- package/skills/ae-analysis/references/update_alert.md +0 -49
- package/skills/ae-analysis/references/update_project_mark_time.md +0 -40
- package/skills/ae-analysis-global/references/list_query_clusters.md +0 -68
- package/skills/ae-engage/references/config-channel-detail.md +0 -31
- package/skills/ae-engage/references/config-channel-list.md +0 -26
- package/skills/ae-engage/references/config-item-detail.md +0 -29
- package/skills/ae-engage/references/config-item-list.md +0 -18
- package/skills/ae-engage/references/copy-config-template.md +0 -28
- package/skills/ae-engage/references/delete-config-channel.md +0 -23
- package/skills/ae-engage/references/delete-config-item.md +0 -24
- package/skills/ae-engage/references/engage-scene-config-item.md +0 -69
- package/skills/ae-engage/references/manage-strategy.md +0 -73
- package/skills/ae-engage/references/strategy-detail.md +0 -72
- package/skills/ae-engage/references/strategy-list.md +0 -20
- package/skills/ae-engage/references/update-config-channel-status.md +0 -31
- package/skills/ae-metadata/references/metadata_event_get.md +0 -52
- package/skills/ae-metadata/references/metadata_property_get.md +0 -54
- package/dist/{config-RCCGHHYA.js → config-PMPISN5Y.js} +4 -4
- package/dist/{te-community-WXGB6IOX.js → te-community-QOYIYEJI.js} +3 -3
- package/dist/{te-community-X2AHXGCA.js → te-community-UFKI6ONP.js} +3 -3
|
@@ -11,18 +11,37 @@ import "./chunk-LYVNONC4.js";
|
|
|
11
11
|
// src/commands/te-kb/query.ts
|
|
12
12
|
var API_PATH = "/agent/api/external/knowledge-bases/query";
|
|
13
13
|
function buildBody(ctx) {
|
|
14
|
-
|
|
15
|
-
query: ctx.str("query")
|
|
16
|
-
sources: ctx.json("sources")
|
|
14
|
+
const body = {
|
|
15
|
+
query: ctx.str("query")
|
|
17
16
|
};
|
|
17
|
+
const sources = ctx.json("sources");
|
|
18
|
+
if (sources) body.sources = sources;
|
|
19
|
+
const topK = ctx.num("top-k");
|
|
20
|
+
if (topK) body.topK = topK;
|
|
21
|
+
const locale = ctx.str("locale");
|
|
22
|
+
if (locale) body.locale = locale;
|
|
23
|
+
return body;
|
|
18
24
|
}
|
|
19
25
|
var query = {
|
|
20
26
|
service: "kb",
|
|
21
27
|
command: "+query",
|
|
22
|
-
description: "Query knowledge.",
|
|
28
|
+
description: "Query knowledge bases via POST /agent/api/external/knowledge-bases/query. Returns ranked passages for a natural-language question.",
|
|
23
29
|
flags: [
|
|
24
|
-
{
|
|
25
|
-
|
|
30
|
+
{
|
|
31
|
+
name: "query",
|
|
32
|
+
type: "string",
|
|
33
|
+
required: true,
|
|
34
|
+
alias: "q",
|
|
35
|
+
desc: "Natural language question to query against the knowledge bases"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "sources",
|
|
39
|
+
type: "json",
|
|
40
|
+
required: false,
|
|
41
|
+
desc: 'Optional JSON array of knowledge base refs to scope the query, e.g. [{"scope":"company","name":"engineering-handbook"}]. Omit to search all accessible knowledge bases.'
|
|
42
|
+
},
|
|
43
|
+
{ name: "top-k", type: "number", required: false, desc: "Max number of hits to return (1-10000, default 10)" },
|
|
44
|
+
{ name: "locale", type: "string", required: false, desc: "Optional locale: zh | en | ja | ko" }
|
|
26
45
|
],
|
|
27
46
|
risk: "read",
|
|
28
47
|
dryRun: (ctx) => ({
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
callMcpTool,
|
|
3
|
+
parseMcpResult,
|
|
4
|
+
resolveMcpUrl
|
|
5
|
+
} from "./chunk-CPVTECJ3.js";
|
|
6
|
+
import "./chunk-LCXU3AAT.js";
|
|
7
|
+
import "./chunk-E7UXXHO3.js";
|
|
8
|
+
import "./chunk-IR4ZLVPW.js";
|
|
9
|
+
import "./chunk-V6FR6WTW.js";
|
|
10
|
+
import "./chunk-24BAVOX3.js";
|
|
11
|
+
import "./chunk-LYVNONC4.js";
|
|
12
|
+
|
|
13
|
+
// src/commands/te-meta/shared.ts
|
|
14
|
+
function createMcpCommand(config) {
|
|
15
|
+
const toolName = config.command.slice(1);
|
|
16
|
+
const mcpService = config.mcpService || "analysis";
|
|
17
|
+
return {
|
|
18
|
+
service: "analysis_meta",
|
|
19
|
+
command: config.command,
|
|
20
|
+
description: config.description,
|
|
21
|
+
flags: config.flags,
|
|
22
|
+
risk: config.risk,
|
|
23
|
+
dryRun: (ctx) => ({
|
|
24
|
+
method: "tools/call",
|
|
25
|
+
url: resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService),
|
|
26
|
+
body: {
|
|
27
|
+
name: toolName,
|
|
28
|
+
arguments: config.buildArgs(ctx)
|
|
29
|
+
}
|
|
30
|
+
}),
|
|
31
|
+
execute: async (ctx) => {
|
|
32
|
+
const url = resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService);
|
|
33
|
+
const result = await callMcpTool(url, toolName, config.buildArgs(ctx), ctx.host());
|
|
34
|
+
return parseMcpResult(result);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function optionalJson(ctx, name) {
|
|
39
|
+
const value = ctx.str(name);
|
|
40
|
+
return value === "" ? void 0 : ctx.json(name);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// src/commands/te-meta/meta/batch-edit-metadata.ts
|
|
44
|
+
var batchEditMetadata = createMcpCommand({
|
|
45
|
+
command: "+batch_edit_metadata",
|
|
46
|
+
description: "Batch edit effective system metadata only",
|
|
47
|
+
flags: [
|
|
48
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
49
|
+
{ name: "type", type: "string", required: true, desc: "Metadata type: event, event_property, or user_property" },
|
|
50
|
+
{ name: "items", type: "json", required: true, desc: "Batch edit item list JSON array" }
|
|
51
|
+
],
|
|
52
|
+
risk: "write",
|
|
53
|
+
mcpService: "te_analysis_extend",
|
|
54
|
+
buildArgs: (ctx) => ({
|
|
55
|
+
projectId: ctx.num("project_id"),
|
|
56
|
+
type: ctx.str("type"),
|
|
57
|
+
items: ctx.json("items")
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// src/commands/te-meta/meta/batch-create-metadata.ts
|
|
62
|
+
var batchCreateMetadata = createMcpCommand({
|
|
63
|
+
command: "+batch_create_metadata",
|
|
64
|
+
description: "Batch create effective system metadata only",
|
|
65
|
+
flags: [
|
|
66
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
67
|
+
{ name: "events", type: "json", required: false, desc: "Event creation list JSON array" },
|
|
68
|
+
{ name: "event_properties", type: "json", required: false, desc: "Event property creation list JSON array" },
|
|
69
|
+
{ name: "user_properties", type: "json", required: false, desc: "User property creation list JSON array" }
|
|
70
|
+
],
|
|
71
|
+
risk: "write",
|
|
72
|
+
mcpService: "te_analysis_extend",
|
|
73
|
+
buildArgs: (ctx) => ({
|
|
74
|
+
projectId: ctx.num("project_id"),
|
|
75
|
+
events: optionalJson(ctx, "events"),
|
|
76
|
+
eventProperties: optionalJson(ctx, "event_properties"),
|
|
77
|
+
userProperties: optionalJson(ctx, "user_properties")
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// src/commands/te-meta/meta/index.ts
|
|
82
|
+
var commands = [
|
|
83
|
+
batchEditMetadata,
|
|
84
|
+
batchCreateMetadata
|
|
85
|
+
];
|
|
86
|
+
var meta_default = commands;
|
|
87
|
+
|
|
88
|
+
// src/commands/te-meta/index.ts
|
|
89
|
+
var commands2 = [
|
|
90
|
+
...meta_default
|
|
91
|
+
];
|
|
92
|
+
var te_meta_default = commands2;
|
|
93
|
+
export {
|
|
94
|
+
te_meta_default as default
|
|
95
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
callMcpTool,
|
|
3
|
+
parseMcpResult,
|
|
4
|
+
resolveMcpUrl
|
|
5
|
+
} from "./chunk-3P3562ZX.js";
|
|
6
|
+
import "./chunk-LCXU3AAT.js";
|
|
7
|
+
import "./chunk-E7UXXHO3.js";
|
|
8
|
+
import "./chunk-IR4ZLVPW.js";
|
|
9
|
+
import "./chunk-V6FR6WTW.js";
|
|
10
|
+
import "./chunk-24BAVOX3.js";
|
|
11
|
+
import "./chunk-LYVNONC4.js";
|
|
12
|
+
|
|
13
|
+
// src/commands/te-meta/shared.ts
|
|
14
|
+
function createMcpCommand(config) {
|
|
15
|
+
const toolName = config.command.slice(1);
|
|
16
|
+
const mcpService = config.mcpService || "analysis";
|
|
17
|
+
return {
|
|
18
|
+
service: "analysis_meta",
|
|
19
|
+
command: config.command,
|
|
20
|
+
description: config.description,
|
|
21
|
+
flags: config.flags,
|
|
22
|
+
risk: config.risk,
|
|
23
|
+
dryRun: (ctx) => ({
|
|
24
|
+
method: "tools/call",
|
|
25
|
+
url: resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService),
|
|
26
|
+
body: {
|
|
27
|
+
name: toolName,
|
|
28
|
+
arguments: config.buildArgs(ctx)
|
|
29
|
+
}
|
|
30
|
+
}),
|
|
31
|
+
execute: async (ctx) => {
|
|
32
|
+
const url = resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService);
|
|
33
|
+
const result = await callMcpTool(url, toolName, config.buildArgs(ctx), ctx.host());
|
|
34
|
+
return parseMcpResult(result);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function optionalJson(ctx, name) {
|
|
39
|
+
const value = ctx.str(name);
|
|
40
|
+
return value === "" ? void 0 : ctx.json(name);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// src/commands/te-meta/meta/batch-edit-metadata.ts
|
|
44
|
+
var batchEditMetadata = createMcpCommand({
|
|
45
|
+
command: "+batch_edit_metadata",
|
|
46
|
+
description: "Batch edit effective system metadata only",
|
|
47
|
+
flags: [
|
|
48
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
49
|
+
{ name: "type", type: "string", required: true, desc: "Metadata type: event, event_property, or user_property" },
|
|
50
|
+
{ name: "items", type: "json", required: true, desc: "Batch edit item list JSON array" }
|
|
51
|
+
],
|
|
52
|
+
risk: "write",
|
|
53
|
+
mcpService: "te_analysis_extend",
|
|
54
|
+
buildArgs: (ctx) => ({
|
|
55
|
+
projectId: ctx.num("project_id"),
|
|
56
|
+
type: ctx.str("type"),
|
|
57
|
+
items: ctx.json("items")
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// src/commands/te-meta/meta/batch-create-metadata.ts
|
|
62
|
+
var batchCreateMetadata = createMcpCommand({
|
|
63
|
+
command: "+batch_create_metadata",
|
|
64
|
+
description: "Batch create effective system metadata only",
|
|
65
|
+
flags: [
|
|
66
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
67
|
+
{ name: "events", type: "json", required: false, desc: "Event creation list JSON array" },
|
|
68
|
+
{ name: "event_properties", type: "json", required: false, desc: "Event property creation list JSON array" },
|
|
69
|
+
{ name: "user_properties", type: "json", required: false, desc: "User property creation list JSON array" }
|
|
70
|
+
],
|
|
71
|
+
risk: "write",
|
|
72
|
+
mcpService: "te_analysis_extend",
|
|
73
|
+
buildArgs: (ctx) => ({
|
|
74
|
+
projectId: ctx.num("project_id"),
|
|
75
|
+
events: optionalJson(ctx, "events"),
|
|
76
|
+
eventProperties: optionalJson(ctx, "event_properties"),
|
|
77
|
+
userProperties: optionalJson(ctx, "user_properties")
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// src/commands/te-meta/meta/index.ts
|
|
82
|
+
var commands = [
|
|
83
|
+
batchEditMetadata,
|
|
84
|
+
batchCreateMetadata
|
|
85
|
+
];
|
|
86
|
+
var meta_default = commands;
|
|
87
|
+
|
|
88
|
+
// src/commands/te-meta/index.ts
|
|
89
|
+
var commands2 = [
|
|
90
|
+
...meta_default
|
|
91
|
+
];
|
|
92
|
+
var te_meta_default = commands2;
|
|
93
|
+
export {
|
|
94
|
+
te_meta_default as default
|
|
95
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thinkingai/ae-cli",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.35",
|
|
4
4
|
"description": "CLI tool for ThinkingAI (AE) analytics platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,8 +38,9 @@
|
|
|
38
38
|
"verify:analysis-meta-tools": "node scripts/verify-te-meta-tools.mjs",
|
|
39
39
|
"verify:analysis-common-tools": "node scripts/verify-te-common-tools.mjs",
|
|
40
40
|
"verify:team-tools": "node scripts/verify-te-team-tools.mjs",
|
|
41
|
-
"verify:agent-tools": "node scripts/verify-agent-tools.mjs",
|
|
42
|
-
"verify:
|
|
41
|
+
"verify:agent-tools": "node scripts/verify-agent-tools.mjs && npm run verify:sandbox-tools",
|
|
42
|
+
"verify:sandbox-tools": "tsx test/sandbox-tools.test.ts",
|
|
43
|
+
"verify:tracking-tools": "node test/tracking-client.test.mjs && node test/tracking-skill-flow.test.mjs && node test/tracking-commands.test.mjs",
|
|
43
44
|
"verify:self-check-overlay": "node test/self-check-overlay.test.mjs",
|
|
44
45
|
"verify:update-check": "npx tsx test/update-check.test.mjs",
|
|
45
46
|
"qa-changed": "node scripts/qa-changed.mjs",
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
"check:agents-docs": "node scripts/check-agents-docs-sync.mjs",
|
|
50
51
|
"prepublishOnly": "npm run check:release && npm run build",
|
|
51
52
|
"start": "node dist/index.js",
|
|
52
|
-
"test": "npx tsx src/index.ts --help"
|
|
53
|
+
"test": "npx tsx src/index.ts --help && npm run verify:sandbox-tools"
|
|
53
54
|
},
|
|
54
55
|
"repository": {
|
|
55
56
|
"type": "git",
|
package/skills/ae-agent/SKILL.md
CHANGED
|
@@ -63,7 +63,7 @@ Use `ae-agent` for all Agent platform resource work:
|
|
|
63
63
|
|
|
64
64
|
If the user's intent is data analysis, audience management, metadata governance, TeamRuns, or knowledge bases, switch to `ae-analysis` / `ae-engage` / `ae-dataops` / `ae-team` / `ae-kb`.
|
|
65
65
|
|
|
66
|
-
## Tool Groups (
|
|
66
|
+
## Tool Groups (67 commands)
|
|
67
67
|
|
|
68
68
|
### Agents (5)
|
|
69
69
|
|
|
@@ -167,6 +167,10 @@ If the user's intent is data analysis, audience management, metadata governance,
|
|
|
167
167
|
- `+del-attachment` ([doc](references/del-attachment.md)) — soft-delete an attachment
|
|
168
168
|
- `+attachment-stats` ([doc](references/attachment-stats.md)) — attachment library stats (total count/size, image/document breakdown)
|
|
169
169
|
|
|
170
|
+
### Sandbox tools (1)
|
|
171
|
+
|
|
172
|
+
- `+list-sandbox-tools` ([doc](references/list-sandbox-tools.md)) — list tools activated in the current sandbox (scan /home/ta/.local/bin managed shims; report active/broken; local scan, no remote API)
|
|
173
|
+
|
|
170
174
|
## Cross-Command Notes
|
|
171
175
|
|
|
172
176
|
- **Automation IDs**: use `+list-automations` to find the target ID internally, but do not surface raw automation IDs, raw JSON, or concrete detail paths in user-facing replies.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# agent +list-sandbox-tools (List Sandbox Tools)
|
|
2
|
+
|
|
3
|
+
> **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
|
|
4
|
+
|
|
5
|
+
Domain: **Sandbox tools / read**
|
|
6
|
+
|
|
7
|
+
## Use Cases
|
|
8
|
+
|
|
9
|
+
- List tools activated in the current sandbox by scanning `/home/ta/.local/bin` for managed shims.
|
|
10
|
+
- Each managed shim carries a `managed-by: te-agent-sandbox-tools` marker plus tool, version, command, target, and runtime fields. The command verifies the real target path, share-root containment, file type, and runtime-specific permissions.
|
|
11
|
+
- This is a **local filesystem scan** — it does NOT call any remote API and does not require `--host` or a token.
|
|
12
|
+
|
|
13
|
+
## Mandatory Rules (MUST)
|
|
14
|
+
|
|
15
|
+
- Only entries with the `managed-by: te-agent-sandbox-tools` marker are reported; non-managed files in `/home/ta/.local/bin` are ignored (deactivate on the admin side only removes managed entries).
|
|
16
|
+
- The command runs inside the sandbox; ensure `/home/ta/.local/bin` is readable.
|
|
17
|
+
- Managed shim symlinks, oversized shims, malformed or duplicate marker fields, and targets outside `${SANDBOX_SYSTEM_SHARE_ROOT:-/data/app/te_agent_ta/share}/tools` are never treated as active.
|
|
18
|
+
|
|
19
|
+
## Command
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
ae-cli agent +list-sandbox-tools
|
|
23
|
+
|
|
24
|
+
# Filter to only broken entries
|
|
25
|
+
ae-cli agent +list-sandbox-tools --status broken
|
|
26
|
+
|
|
27
|
+
# Dry-run to inspect the scan target (no disk read)
|
|
28
|
+
ae-cli agent +list-sandbox-tools --dry-run
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Parameters
|
|
32
|
+
|
|
33
|
+
| Parameter | Required | Description |
|
|
34
|
+
| ---------- | -------- | -------------------------------------- |
|
|
35
|
+
| `--status` | No | Filter by status: `active` \| `broken` |
|
|
36
|
+
|
|
37
|
+
## Decision Rules
|
|
38
|
+
|
|
39
|
+
- Use this to inspect which managed sandbox tools are currently usable in this sandbox.
|
|
40
|
+
- `active` = the real target stays inside the configured tools root, is a regular file, and is readable for `node` or executable for `native`.
|
|
41
|
+
- `broken` = the managed shim or target fails marker, containment, file-type, or permission checks. Re-activate via the admin console to repair.
|
|
42
|
+
- Legacy shims without version/runtime remain readable: both fields are reported as `unknown`, and the target must at least be readable.
|
|
43
|
+
- `summary` counts reflect the full scan (before `--status` filtering); `tools` respects the `--status` filter.
|
|
44
|
+
|
|
45
|
+
## Response Shape
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"tools": [
|
|
50
|
+
{
|
|
51
|
+
"tool": "ae-cli",
|
|
52
|
+
"version": "1.0.32",
|
|
53
|
+
"command": "ae-cli",
|
|
54
|
+
"runtime": "node",
|
|
55
|
+
"target": "/data/app/te_agent_ta/share/tools/ae-cli/1.0.32/bin/ae-cli.js",
|
|
56
|
+
"status": "active"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"tool": "gstack",
|
|
60
|
+
"version": "0.1.0",
|
|
61
|
+
"command": "gstack",
|
|
62
|
+
"runtime": "native",
|
|
63
|
+
"target": "/data/app/te_agent_ta/share/tools/gstack/0.1.0/bin/gstack",
|
|
64
|
+
"status": "broken",
|
|
65
|
+
"reason": "target missing"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"summary": { "total": 2, "active": 1, "broken": 1 }
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Next Steps on Failure
|
|
73
|
+
|
|
74
|
+
- Empty `tools` with `summary.total=0`: no managed shims in this sandbox; activate tools from the admin console (system management → sandbox management → sandbox tools) first.
|
|
75
|
+
- `broken` entries: the shared tool package may have been removed or the version path changed; re-activate the tool from the admin console.
|
|
76
|
+
|
|
77
|
+
## Recommended Chaining
|
|
78
|
+
|
|
79
|
+
- `+list-sandbox-tools` → spot `broken` → ask the admin to re-activate via the sandbox tools admin page.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ae-analysis
|
|
3
|
-
version: 4.0.
|
|
3
|
+
version: 4.0.4
|
|
4
4
|
description: "Use ae-cli for AE/TE analysis-side data questions, asset operations, and asset governance: reports, analysis boards, BI dashboards, ad-hoc models, drilldown, detail data, alerts, clusters, tags, metrics, metadata, project configuration, tracking plans, governance asset lists/rules/lineage/impact/dependency, batch asset operations, projects, and resource links. Use when the user asks to query data, explain a change, export evidence, or inspect/create/update/govern analysis assets."
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -28,9 +28,8 @@ Use this skill for these CLI services:
|
|
|
28
28
|
- `analysis`: reports, dashboards, BI panels, ad-hoc analysis, drilldown, detail data, alerts, clusters, tags, and async runs/artifacts.
|
|
29
29
|
- `analysis-meta`: gateway metadata assets, events, properties, virtual metadata, metrics, data tables, exchange rules, and super metadata.
|
|
30
30
|
- `analysis-governance`: gateway asset governance operations, including governed asset lists/exports, lineage, dependency, impact, query history, rule schema/list/create/update/delete, batch asset actions, and operation records. Use this service for asset governance workflows, not for metadata event/property/metric CRUD.
|
|
31
|
-
- `tracking`: gateway tracking plan, checking, ingest, live-data, and event blacklist operations.
|
|
32
|
-
- `analysis_meta`:
|
|
33
|
-
- `analysis_common`: project discovery.
|
|
31
|
+
- `tracking`: gateway tracking plan, checking, ingest, live-data, and event blacklist operations.
|
|
32
|
+
- `analysis_meta`: legacy metadata batch operations not yet covered by gateway commands.
|
|
34
33
|
|
|
35
34
|
For metadata gateway detail outside the commands in the generated index, use the metadata skill. For Engage, DataOps, or Community work, use the corresponding skill.
|
|
36
35
|
|
|
@@ -45,7 +44,6 @@ Command forms:
|
|
|
45
44
|
```bash
|
|
46
45
|
ae-cli analysis +<command> [options]
|
|
47
46
|
ae-cli analysis_meta +<command> [options]
|
|
48
|
-
ae-cli analysis_common +<command> [options]
|
|
49
47
|
ae-cli analysis <resource> <action> [options]
|
|
50
48
|
ae-cli analysis-meta <resource> <action> [options]
|
|
51
49
|
ae-cli analysis-governance <resource> <action> [options]
|
|
@@ -96,7 +94,7 @@ For every gateway command that exposes `--request-id`, ae-cli generates a `reque
|
|
|
96
94
|
Before a project-scoped command:
|
|
97
95
|
|
|
98
96
|
1. Reuse a project only when its ID and host/environment were already verified in the same continuous conversation.
|
|
99
|
-
2. Otherwise call `
|
|
97
|
+
2. Otherwise call `analysis project info list` and resolve the supplied ID/name.
|
|
100
98
|
3. If there are multiple plausible projects, the host is unclear, or no project matches, show the candidates and ask; never guess.
|
|
101
99
|
4. Re-verify after the user changes project, host, or environment.
|
|
102
100
|
|
|
@@ -123,9 +121,10 @@ Do not call removed QP builders or schema helpers for ad-hoc analysis. `--defini
|
|
|
123
121
|
- Metric value, trend, comparison, or anomaly -> saved report/dashboard first, then ad-hoc data.
|
|
124
122
|
- Metric definition search/create/update -> metadata commands.
|
|
125
123
|
- Event/entity rows -> `event-detail run|export` or `entity-detail run|export`.
|
|
126
|
-
- Events/entities from a query result -> follow the returned synchronous `query_context_id` and `sources[].drilldown`; never reconstruct raw QP or use export rows as coordinates.
|
|
124
|
+
- Events/entities from a query result -> pass the original `--project-id`, then follow the returned synchronous `query_context_id` and `sources[].drilldown`; never reconstruct raw QP or use export rows as coordinates.
|
|
127
125
|
- Cluster/tag definition -> matching gateway cluster/tag commands and matching model reference.
|
|
128
|
-
-
|
|
126
|
+
- Tag/cluster candidate values, including requests phrased as "latest version" or "latest result" -> resolve the exact asset, then use `analysis filter-value list` with `cluster_date_policy=LATEST`. This means the latest computed data snapshot, never a definition or configuration release; do not invent version lists, version IDs, draft states, or publish states.
|
|
127
|
+
- Alert/configuration/tracking-plan requests -> the dedicated gateway command reference from the index.
|
|
129
128
|
|
|
130
129
|
### Run, export, and follow-up
|
|
131
130
|
|
|
@@ -133,7 +132,7 @@ Do not call removed QP builders or schema helpers for ad-hoc analysis. `--defini
|
|
|
133
132
|
- `export` is for complete, unknown-size, over-limit, or long-running results. It returns `run_id` and `artifact_id`.
|
|
134
133
|
- Drilldown event/entity/user-event exports are `csv.gz` full-download streams bounded by `model_full_download_limit`; never pass or simulate `limit`, `offset`, `page_num`, or `page_size`.
|
|
135
134
|
- Inspect with `analysis run inspect`, download with `analysis artifact download`, and cancel with `analysis query cancel`. Do not call raw lifecycle URLs.
|
|
136
|
-
- Drilldown requires a synchronous preview context and the selected source's returned row/column/metric coordinate options. If
|
|
135
|
+
- Drilldown requires the original `--project-id`, a synchronous preview context, and the selected source's returned row/column/metric coordinate options. Common rejects a project ID that does not match the stored context. If the context/options are absent or the action is not advertised, report that drilldown/result-cluster creation is unavailable.
|
|
137
136
|
|
|
138
137
|
### Writes and destructive operations
|
|
139
138
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Submit one unified ad-hoc analysis export from an AI-facing model definition.
|
|
4
4
|
|
|
5
|
+
Typical closed loop: define and validate the analysis -> resolve an authorized physical query route if needed -> submit once -> keep the returned run/artifact pair -> inspect -> download -> analyze the complete artifact. Use a separate synchronous run when interactive drilldown is required.
|
|
6
|
+
|
|
5
7
|
Routing: read [`analysis_data_retrieval.md`](analysis_data_retrieval.md) before choosing this `export` command instead of `adhoc run`.
|
|
6
8
|
|
|
7
9
|
## Command
|
|
@@ -15,6 +17,8 @@ ae-cli analysis adhoc export \
|
|
|
15
17
|
[--use-cache true|false] \
|
|
16
18
|
[--zone-offset <hours>] \
|
|
17
19
|
[--fields '["列名"]'] \
|
|
20
|
+
[--cluster-query-scope GLOBAL|SLAVE] \
|
|
21
|
+
[--slave-cluster-id <id>] \
|
|
18
22
|
[--artifact-format jsonl|csv] \
|
|
19
23
|
[--timeout-seconds <n>]
|
|
20
24
|
```
|
|
@@ -44,6 +48,8 @@ Do not use raw QP, `events`, `event_view`, `visual_view`, removed ad-hoc QP buil
|
|
|
44
48
|
|
|
45
49
|
Timezone contract: fixed `--zone-offset` values are integers from `-12` through `14`. Use `--zone-offset 99` for local-time mode, which analyzes timestamps as stored local time without applying a fixed UTC offset conversion; it does not mean UTC+99. Omit the flag to use the project's analysis default.
|
|
46
50
|
|
|
51
|
+
Cluster routing is identical to `adhoc run`: omit for current self; discover permissions and physical IDs with `analysis query-cluster list`; `SLAVE` requires an ID. SQL, attribution, and default-interval distribution reject unsupported `GLOBAL` rather than silently changing scope.
|
|
52
|
+
|
|
47
53
|
## Output
|
|
48
54
|
|
|
49
55
|
The response is an async artifact descriptor:
|
|
@@ -57,6 +63,8 @@ The response is an async artifact descriptor:
|
|
|
57
63
|
|
|
58
64
|
Preserve the `run_id` and `artifact_id` from this exact submit response as one pair. Do not infer either ID from a path or reuse an ID from another export.
|
|
59
65
|
|
|
66
|
+
Export submission compiles the definition before creating an artifact or run. The execute, `--validate`, and `--dry-run` paths return `AI_QP_COMPILE_FAILED` immediately when clarification is required, with `meta.compile_status`, full `meta.errors[]` (including `candidates` and `suggestions`), `meta.resolved`, and `meta.warnings`. A compile failure has no `run_id` or `artifact_id`; resolve the ambiguity and submit a new request.
|
|
67
|
+
|
|
60
68
|
Use:
|
|
61
69
|
|
|
62
70
|
```bash
|
|
@@ -4,6 +4,8 @@ Run one unified ad-hoc analysis inline query from an AI-facing model definition.
|
|
|
4
4
|
|
|
5
5
|
Use this command for AI-facing ad-hoc model analysis. Do not use removed ad-hoc QP builder or schema helper commands.
|
|
6
6
|
|
|
7
|
+
Typical closed loop: express the business question as an AI-facing definition -> let the compiler resolve metadata -> use `analysis filter-value list` only when an exact stored value remains unknown -> optionally resolve a physical route -> run -> verify `resolved`, warnings, and actual scope -> drill down only through the returned query context.
|
|
8
|
+
|
|
7
9
|
Routing: read [`analysis_data_retrieval.md`](analysis_data_retrieval.md) before choosing this `run` command instead of `adhoc export`.
|
|
8
10
|
|
|
9
11
|
## Command
|
|
@@ -17,6 +19,8 @@ ae-cli analysis adhoc run \
|
|
|
17
19
|
[--use-cache true|false] \
|
|
18
20
|
[--zone-offset <hours>] \
|
|
19
21
|
[--fields '["列名"]'] \
|
|
22
|
+
[--cluster-query-scope GLOBAL|SLAVE] \
|
|
23
|
+
[--slave-cluster-id <id>] \
|
|
20
24
|
[--limit <n>] \
|
|
21
25
|
[--timeout-seconds <n>]
|
|
22
26
|
```
|
|
@@ -41,6 +45,8 @@ Do not use raw QP, `events`, `event_view`, `visual_view`, removed ad-hoc QP buil
|
|
|
41
45
|
|
|
42
46
|
Timezone contract: fixed `--zone-offset` values are integers from `-12` through `14`. Use `--zone-offset 99` for local-time mode, which analyzes timestamps as stored local time without applying a fixed UTC offset conversion; it does not mean UTC+99. Omit the flag to use the project's analysis default.
|
|
43
47
|
|
|
48
|
+
Cluster routing: omit both routing flags for current-self data. Before `GLOBAL` or `SLAVE`, call `analysis query-cluster list`; `SLAVE` requires exactly one returned physical cluster ID. SQL and attribution do not support `GLOBAL`; distribution with default intervals also rejects `GLOBAL`. These 查询集群 options are unrelated to 用户分群 definitions.
|
|
49
|
+
|
|
44
50
|
## Output
|
|
45
51
|
|
|
46
52
|
The response may include:
|
|
@@ -50,7 +56,10 @@ The response may include:
|
|
|
50
56
|
- `title` / `rows` / `total` / `returned_rows` / `truncated`: tabular preview fields. When truncated, use `adhoc export`; there is no next-page request.
|
|
51
57
|
- `result`: direct result for non-tabular models.
|
|
52
58
|
- `request_id`: lifecycle request id.
|
|
59
|
+
- `actual_cluster_query_scope`, optional `actual_slave_cluster_id`, and `cluster_query_scope_source`: actual physical data route. Verify these before comparing results or following the query context.
|
|
53
60
|
|
|
54
61
|
Execution failures are returned as command failures with `request_id`; only the explicit project-no-data condition is a successful empty result. Do not interpret an empty object as evidence that a failed query succeeded.
|
|
55
62
|
|
|
63
|
+
The execute, `--validate`, and `--dry-run` paths all compile the AI-facing definition. If metadata resolution needs clarification, the command fails with `AI_QP_COMPILE_FAILED`; inspect `meta.compile_status`, `meta.errors[]`, `meta.resolved`, and `meta.warnings`. Each error retains `path`, `message`, `code`, `candidates`, and `suggestions`. Select an exact candidate from this response or ask the user; do not guess from display text.
|
|
64
|
+
|
|
56
65
|
Read [`analysis_drilldown_contract.md`](analysis_drilldown_contract.md). Use the context only with an action advertised by the selected source/metric, and assemble the coordinate only from returned option fragments. Do not pass raw QP or infer a coordinate from display text.
|
|
@@ -376,7 +376,7 @@ Time placeholder:
|
|
|
376
376
|
{
|
|
377
377
|
"sql": "select * from events where ${PartDate:ds}",
|
|
378
378
|
"params": [
|
|
379
|
-
{"name": "ds", "type": "part_date", "recent_day": "1-7"}
|
|
379
|
+
{"name": "ds", "type": "part_date", "recent_day": "1-7", "use_timezone": true}
|
|
380
380
|
]
|
|
381
381
|
}
|
|
382
382
|
```
|
|
@@ -386,11 +386,13 @@ Rules:
|
|
|
386
386
|
- If SQL has no `${...}` placeholder, omit `params`.
|
|
387
387
|
- If SQL has placeholders, every placeholder must have one matching item in `params`.
|
|
388
388
|
- Raw variables use `${name}`, not `${Variable:name}`. A selector's `value` must equal one of its `options[].value` values. `${PartDate:name}` expands to a complete predicate, so place it directly after `WHERE`/`AND` rather than after a column name.
|
|
389
|
+
- `use_timezone` is an optional boolean definition field that is only valid for `part_date`. It defaults to `false`. When `true`, that PartDate parameter uses the query's effective timezone selected by `zone_offset` or the current user/project default; when `false`, it follows the non-timezone-aware PartDate path. This is distinct from the command-level `zone_offset`.
|
|
389
390
|
- Do not pass SQL-IDE internals such as `sqlVoParams`, `sqlViewParams`, `paramType`, `paramName`, `paramExpress`, `commonFilter`, or `requiredEvents`.
|
|
390
391
|
- Delimit any Trino identifier containing `#`, `$`, `@`, spaces, or punctuation with double quotes, for example `"#user_id"` and `"$part_event"`. Single quotes create string literals, not identifiers. Escape a literal double quote inside an identifier by doubling it. The CLI preserves the submitted SQL and does not rewrite identifiers.
|
|
391
392
|
- For an event table, include a date-partition predicate on the discovered `"$part_date"` column, for example `WHERE "$part_date" BETWEEN '2026-07-01' AND '2026-07-07'`. The backend rejects event-table SQL without this condition.
|
|
392
393
|
- Do not invent table or column names. If the user already provides a concrete table reference, use `analysis-meta datatable columns-get --project-id <project_id> --table-ref <table_ref>` to inspect columns before writing SQL. If the table itself is unknown, call `analysis sql-table list --project-id <project_id>` when available and select an exact returned `table_ref`; otherwise stop and ask for the table/data source. Ask the user only when multiple authorized tables remain semantically plausible after discovery.
|
|
393
394
|
- For a saved dynamic SQL report, put the default values in `analysis report create/update --definition`. Verify the default once with `analysis report-data run` without `--sql-params`, then verify a changed value with one value-only `--sql-params` override.
|
|
395
|
+
- `use_timezone` belongs to the saved parameter definition. To change it, update the report `definition`; never pass it through report-data `--sql-params`, which changes values only.
|
|
394
396
|
- SQL tags and SQL clusters do not use this general parameter contract. They accept only `${PartDate:name}` with `type=part_date`, and their tables must be discovered with `analysis sql-table list/columns --usage tag_cluster`; see `user_tag_models.md` and `user_cluster_models.md`.
|
|
395
397
|
|
|
396
398
|
### `heat_map`
|
|
@@ -80,6 +80,8 @@ Only synchronous `adhoc run`, `report-data run`, and `dashboard-report-data run`
|
|
|
80
80
|
|
|
81
81
|
Follow-up commands are allowed only when the selected source/metric advertises the exact action. Read [`analysis_drilldown_contract.md`](analysis_drilldown_contract.md), select only returned row/column/metric options, and never infer source IDs, dates, groups, model fields, or analysis angles from display text.
|
|
82
82
|
|
|
83
|
+
Pass the original `--project-id` with every query-context or drilldown-context follow-up. Gateway uses it for project authorization, and Common rejects it if it does not match the project stored by the context ID.
|
|
84
|
+
|
|
83
85
|
When present, compare `effective_time_range` with `data_time_range`. `effective_time_range` is the resolved query scope, while `data_time_range` is the observed returned-row range. `clipping_reasons=[]` means the gateway applied no silent range cap; a narrower `data_time_range` then reflects available/returned data rather than a gateway range clamp.
|
|
84
86
|
|
|
85
87
|
Use that synchronous `query_context_id` for the advertised action only:
|
|
@@ -6,6 +6,8 @@ This contract controls every follow-up from an analysis result. Read it before c
|
|
|
6
6
|
|
|
7
7
|
Only a synchronous `adhoc run`, `report-data run`, or `dashboard-report-data run` preview can create `query_context_id` and selectable drilldown coordinates. The selectable population is exactly the returned preview, after its `--limit` is applied. If `--limit 10` returns ten rows, only coordinates represented by those ten rows may be selected.
|
|
8
8
|
|
|
9
|
+
Every query-context or drilldown-context follow-up must also pass the original `--project-id`. Gateway uses it for project authorization, then Common verifies that it matches the project stored by the context ID. Never substitute a different project ID.
|
|
10
|
+
|
|
9
11
|
Exports never create a query context. A downloaded file, export submit response, or export artifact must never be used to invent or extend drilldown coordinates. To drill into a large result, first run a bounded synchronous preview containing the desired row; do not raise the limit merely to manufacture a complete target catalog.
|
|
10
12
|
|
|
11
13
|
SQL, `heat_map`, `rank_list`, `revenue`, and scenario models do not support this analysis drilldown contract. Stop when `source.drilldown.actions` is empty or `unavailable_reason` is present.
|
|
@@ -73,19 +73,21 @@ Prefer the run/artifact commands over hand-written HTTP, Python, or curl. Analys
|
|
|
73
73
|
|
|
74
74
|
| Command | Capability ID | Use for | Key input | Output |
|
|
75
75
|
| --- | --- | --- | --- | --- |
|
|
76
|
-
| `
|
|
76
|
+
| `filter-value list` | `analysis.filter_value.list` | Resolve exact stored values for one known event/user property before building a filter; not property discovery or aggregation | `--property-name`, `--table-type`, optional event/prefix/snapshot inputs | Candidate values in `items` |
|
|
77
|
+
| `query-cluster list` | `analysis.query_cluster.list` | List physical 查询集群/data-routing options; not 用户分群/audience assets | `--project-id` | Current/accessible slave clusters and allowed routing parameters |
|
|
78
|
+
| `adhoc run` | `analysis.adhoc.run` | Unified ad-hoc inline query for 12 AI models: 9 common + 3 scenario models | `--project-id`, `--model-type`, AI-facing `--definition`, optional physical cluster route | Inline data plus actual route and optional `query_context_id` |
|
|
77
79
|
| `adhoc export` | `analysis.adhoc.export` | Unified ad-hoc async export for 12 AI models: 9 common + 3 scenario models | same as run, plus optional `--artifact-format`; no inline `--limit` | Async artifact descriptor; no drilldown context |
|
|
78
|
-
| `drilldown-events run/export` | `analysis.query.drilldown_events` / `analysis.query.drilldown_events_export` | Preview or full-stream events for an advertised `EVENT_LIST` cell | `--query-context-id`, optional `--source`, `--coordinate` | Bounded event rows or `csv.gz` artifact |
|
|
79
|
-
| `drilldown-entities run/export` | `analysis.query.drilldown_entities` / `analysis.query.drilldown_entities_export` | Preview/export users or custom entities for an advertised entity cell | `--query-context-id`, optional `--source`, `--coordinate` | Subject plus entity rows/artifact |
|
|
80
|
-
| `query drilldown-user-events` | `analysis.query.drilldown_user_events` | Query one drilldown user's event sequence | `--drilldown-context-id`, `--user-id` | Event sequence rows |
|
|
81
|
-
| `query create-result-cluster` | `analysis.query.create_result_cluster` | Save the advertised user/custom-entity cell population as its result cluster | `--query-context-id`, optional `--source`, `--coordinate`, `--cluster-name` | Result cluster creation result |
|
|
80
|
+
| `drilldown-events run/export` | `analysis.query.drilldown_events` / `analysis.query.drilldown_events_export` | Preview or full-stream events for an advertised `EVENT_LIST` cell | `--project-id`, `--query-context-id`, optional `--source`, `--coordinate` | Bounded event rows or `csv.gz` artifact |
|
|
81
|
+
| `drilldown-entities run/export` | `analysis.query.drilldown_entities` / `analysis.query.drilldown_entities_export` | Preview/export users or custom entities for an advertised entity cell | `--project-id`, `--query-context-id`, optional `--source`, `--coordinate` | Subject plus entity rows/artifact |
|
|
82
|
+
| `query drilldown-user-events` | `analysis.query.drilldown_user_events` | Query one drilldown user's event sequence | `--project-id`, `--drilldown-context-id`, `--user-id` | Event sequence rows |
|
|
83
|
+
| `query create-result-cluster` | `analysis.query.create_result_cluster` | Save the advertised user/custom-entity cell population as its result cluster | `--project-id`, `--query-context-id`, optional `--source`, `--coordinate`, `--cluster-name` | Result cluster creation result |
|
|
82
84
|
| `report list` | `analysis.report.list` | Find accessible reports | `--project-id`, optional `--query`, `--fields`, `--limit`, `--offset` | Paginated report summaries |
|
|
83
85
|
| `report list-export` | `analysis.report.list_export` | Export report catalog | same as list, plus optional `--artifact-format`, `--request-id` | Async artifact descriptor |
|
|
84
86
|
| `report get` | `analysis.report.get` | Inspect current report definition as AI QP | `--project-id`, `--report-id` | Report metadata plus `model_type` and `definition` |
|
|
85
87
|
| `report create` | `analysis.report.create` | Create a report from AI QP definition | `--report-name`, `--model-type`, `--definition` | Created report ID and normalized definition |
|
|
86
88
|
| `report update` | `analysis.report.update` | Update metadata or AI QP definition | `--report-id`, `--report-version`, update fields | Update result |
|
|
87
89
|
| `report delete` | `analysis.report.delete` | Delete reports | `--report-ids '[...]'` | Delete result |
|
|
88
|
-
| `report-data run` | `analysis.report_data.run` | Bounded inline report data | `--report-ids`, optional
|
|
90
|
+
| `report-data run` | `analysis.report_data.run` | Bounded inline report data | `--report-ids`, optional overrides, `--cluster-query-scope`, conditional `--slave-cluster-id`, time/limit | Inline data plus actual route and optional `query_context_id` |
|
|
89
91
|
| `report-data export` | `analysis.report_data.export` | Large/long report data | same as run, plus optional `--artifact-format` | Async artifact descriptor; no drilldown context |
|
|
90
92
|
| `query cancel` | `analysis.query.cancel` | Cancel any async analysis export | `--run-id`, optional `--reason` | Cancellation result |
|
|
91
93
|
| `report-change-log list` | `analysis.report_change_log.list` | List one report's change logs | `--report-id` | Change log summaries |
|
|
@@ -105,7 +107,7 @@ Prefer the run/artifact commands over hand-written HTTP, Python, or curl. Analys
|
|
|
105
107
|
| `dashboard freeze` | `analysis.dashboard.freeze` | Freeze/unfreeze dashboards | `--dashboard-ids`, optional `--freeze false` | Freeze status |
|
|
106
108
|
| `dashboard abnormal-get` | `analysis.dashboard.abnormal_get` | Inspect abnormal dependencies | `--dashboard-id` | Abnormal info |
|
|
107
109
|
| `dashboard task-status` | `analysis.dashboard.task_status` | Inspect scheduled task status | `--dashboard-id` | Task status |
|
|
108
|
-
| `dashboard-report-data run` | `analysis.dashboard_report_data.run` | Bounded inline dashboard report data;
|
|
110
|
+
| `dashboard-report-data run` | `analysis.dashboard_report_data.run` | Bounded inline dashboard report data; omitted route follows saved dashboard configuration | `--dashboard-id`, optional reports/filters/time and physical cluster route | Inline data plus actual route and optional `query_context_id` |
|
|
109
111
|
| `dashboard-report-data export` | `analysis.dashboard_report_data.export` | Large/long dashboard report data | same as run, plus optional `--artifact-format jsonl` | Async artifact descriptor; no drilldown context |
|
|
110
112
|
| `run inspect` | `analysis.run.inspect` | Poll async export status | `--run-id` | Run and artifact status |
|
|
111
113
|
| `artifact download` | `analysis.artifact.download` | Download run-bound export artifact | `--run-id`, `--artifact-id`, `--output` | Local output file info |
|