@thinkingai/ae-cli 6.1.12 → 6.1.14
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 +0 -2
- package/README.zh.md +0 -2
- package/dist/{auth-NN55553T.js → auth-GBMV6TEJ.js} +2 -2
- package/dist/{auth-GDV3H5I4.js → auth-NDSXE54J.js} +4 -4
- package/dist/{capability-DRLGDVS4.js → capability-TAMDRZYV.js} +18 -8
- package/dist/{capability-P6GK3AQH.js → capability-U7TDEEEG.js} +18 -8
- package/dist/{chunk-GJJA4CQZ.js → chunk-3FY3RJ26.js} +0 -4
- package/dist/{chunk-GS2P7LFD.js → chunk-5XUSIK27.js} +2 -2
- package/dist/{chunk-7KQWSBSL.js → chunk-753BUTNZ.js} +3 -3
- package/dist/{chunk-VTXHDCBW.js → chunk-AFXA7BRK.js} +2 -2
- package/dist/chunk-IBH3LDAH.js +556 -0
- package/dist/{chunk-RBNKI5ZW.js → chunk-JUW4AJXN.js} +2 -2
- package/dist/{chunk-TS6BUGUY.js → chunk-QATA32VR.js} +3 -3
- package/dist/{chunk-Z3OXWCIA.js → chunk-S5NTSDBS.js} +2 -2
- package/dist/chunk-UIHQJK5E.js +556 -0
- package/dist/{chunk-VKD5WQKN.js → chunk-VLWOLBGZ.js} +142 -24
- package/dist/{chunk-YTG6Q75E.js → chunk-WZRX4KOH.js} +25 -3
- package/dist/{chunk-YV52FB5G.js → chunk-ZQKDZXDO.js} +1 -1
- package/dist/{cli-token-GL5MS5FK.js → cli-token-4UPER74P.js} +3 -3
- package/dist/{chunk-6A2FUCIS.js → client-L2YDMHQ6.js} +5 -6
- package/dist/{config-4VZNLBKF.js → config-OL2LWGBV.js} +4 -33
- package/dist/index.js +25 -38
- package/dist/{memory-RWJW4XFO.js → memory-MUP7PPL7.js} +4 -4
- package/dist/{memory-VO2ZJCRT.js → memory-U4O5PMXH.js} +4 -4
- package/dist/{metadata-ZRN2GHPN.js → metadata-5MIMNIMT.js} +33 -20
- package/dist/{metadata-YGTHR2XJ.js → metadata-LERKDJN6.js} +33 -20
- package/dist/{model-CLUIK3K5.js → model-JTUEO5M4.js} +2 -2
- package/dist/{sync-3REDHGY6.js → sync-MOSFNBVR.js} +5 -5
- package/dist/{te-agent-XNPELAKX.js → te-agent-IFKZDHZI.js} +25 -18
- package/dist/{te-analysis-GJI5FZUL.js → te-analysis-FCHRTNIY.js} +1267 -492
- package/dist/{te-analysis-N2BRDJZ5.js → te-analysis-QG7UKGDA.js} +1267 -492
- package/dist/{te-community-SQXKE5OO.js → te-community-HNKVTERD.js} +207 -12
- package/dist/{te-community-TYSNU3NQ.js → te-community-IWE5B7W6.js} +208 -12
- package/dist/{te-dataops-OWIADNSM.js → te-dataops-KQPYNAE3.js} +262 -145
- package/dist/{te-dataops-5TM7WZDI.js → te-dataops-KXCEB4CS.js} +262 -145
- package/dist/{te-engage-L72HWRGO.js → te-engage-D6EG3NOR.js} +951 -17
- package/dist/{te-engage-QWM4GFS7.js → te-engage-ZSMIJLUW.js} +951 -17
- package/dist/{te-experiment-2T2HEZML.js → te-experiment-K5US7RMG.js} +6 -6
- package/dist/{te-experiment-PVEY7AEZ.js → te-experiment-WA7TFMEL.js} +6 -6
- package/dist/{te-kb-VRMEY3D4.js → te-kb-OIH3T6CS.js} +4 -4
- package/dist/{te-system-XGS5EQIQ.js → te-system-AZ3URMUO.js} +515 -11
- package/dist/{te-team-BZRDV2CM.js → te-team-GZPU6UWA.js} +5 -5
- package/dist/{update-HEDXGOJH.js → update-TOBFXF2V.js} +4 -4
- package/package.json +5 -5
- package/skills/ae-agent/SKILL.md +3 -3
- package/skills/ae-agent/references/list-skill-references.md +4 -4
- package/skills/ae-agent/references/read-skill-reference.md +10 -7
- package/skills/ae-agent/references/upload-skill-reference.md +11 -9
- package/skills/ae-analysis/SKILL.md +15 -12
- package/skills/ae-analysis/metadata_resolution.md +150 -0
- package/skills/ae-analysis/references/adhoc_export.md +17 -2
- package/skills/ae-analysis/references/adhoc_run.md +12 -8
- package/skills/ae-analysis/references/ai_models.md +35 -6
- package/skills/ae-analysis/references/alert_list.md +2 -3
- package/skills/ae-analysis/references/analysis_data_retrieval.md +104 -16
- package/skills/ae-analysis/references/analysis_drilldown_contract.md +4 -4
- package/skills/ae-analysis/references/analysis_gateway_assets.md +17 -15
- package/skills/ae-analysis/references/artifact_download.md +4 -3
- package/skills/ae-analysis/references/asset_abnormal_list.md +5 -3
- package/skills/ae-analysis/references/asset_authentication_list.md +5 -3
- package/skills/ae-analysis/references/asset_search.md +5 -3
- package/skills/ae-analysis/references/bi_panel_list.md +2 -2
- package/skills/ae-analysis/references/bi_panel_page_data_export.md +1 -1
- package/skills/ae-analysis/references/bi_panel_page_data_run.md +4 -4
- package/skills/ae-analysis/references/catalog_export.md +28 -0
- package/skills/ae-analysis/references/catalog_list.md +44 -0
- package/skills/ae-analysis/references/command_index.md +78 -69
- package/skills/ae-analysis/references/dashboard_list.md +2 -2
- package/skills/ae-analysis/references/dashboard_report_data_run.md +11 -4
- package/skills/ae-analysis/references/datatable_version_list.md +5 -3
- package/skills/ae-analysis/references/drilldown_entities_run.md +4 -4
- package/skills/ae-analysis/references/drilldown_events_run.md +2 -2
- package/skills/ae-analysis/references/drilldown_user_events_export.md +1 -1
- package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -2
- package/skills/ae-analysis/references/entity_detail_run.md +4 -4
- package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
- package/skills/ae-analysis/references/event_detail_run.md +4 -4
- package/skills/ae-analysis/references/event_export.md +21 -0
- package/skills/ae-analysis/references/event_list.md +7 -6
- package/skills/ae-analysis/references/exchange_rule_list.md +5 -3
- package/skills/ae-analysis/references/favorite_add.md +2 -2
- package/skills/ae-analysis/references/favorite_remove.md +2 -2
- package/skills/ae-analysis/references/history_tag_data_drilldown_export.md +4 -2
- package/skills/ae-analysis/references/history_tag_data_drilldown_run.md +2 -2
- package/skills/ae-analysis/references/history_tag_data_run.md +2 -2
- package/skills/ae-analysis/references/metric_create.md +7 -8
- package/skills/ae-analysis/references/metric_export.md +21 -0
- package/skills/ae-analysis/references/metric_list.md +8 -7
- package/skills/ae-analysis/references/project_space_list.md +2 -2
- package/skills/ae-analysis/references/property_export.md +21 -0
- package/skills/ae-analysis/references/property_list.md +9 -8
- package/skills/ae-analysis/references/public_link_list.md +2 -2
- package/skills/ae-analysis/references/query_context_get.md +20 -0
- package/skills/ae-analysis/references/query_create_result_cluster.md +1 -1
- package/skills/ae-analysis/references/report_change_log_list.md +1 -1
- package/skills/ae-analysis/references/report_create.md +3 -3
- package/skills/ae-analysis/references/report_data_run.md +8 -8
- package/skills/ae-analysis/references/report_list.md +3 -3
- package/skills/ae-analysis/references/report_list_export.md +2 -2
- package/skills/ae-analysis/references/report_update.md +3 -3
- package/skills/ae-analysis/references/report_version_rollback.md +1 -1
- package/skills/ae-analysis/references/rule_list.md +6 -4
- package/skills/ae-analysis/references/run_inspect.md +8 -5
- package/skills/ae-analysis/references/run_wait.md +37 -0
- package/skills/ae-analysis/references/sql_table_list.md +3 -2
- package/skills/ae-analysis/references/user_cluster_export.md +13 -0
- package/skills/ae-analysis/references/user_cluster_list.md +6 -2
- package/skills/ae-analysis/references/user_cluster_member_export.md +5 -3
- package/skills/ae-analysis/references/user_cluster_member_list.md +4 -4
- package/skills/ae-analysis/references/user_cluster_update.md +4 -2
- package/skills/ae-analysis/references/user_tag_export.md +13 -0
- package/skills/ae-analysis/references/user_tag_list.md +6 -2
- package/skills/ae-analysis/references/user_tag_member_export.md +5 -3
- package/skills/ae-analysis/references/user_tag_member_list.md +4 -4
- package/skills/ae-analysis/references/user_tag_update.md +4 -2
- package/skills/ae-analysis/references/virtual_property_create.md +2 -2
- package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +3 -3
- package/skills/ae-community/SKILL.md +2 -2
- package/skills/ae-dataops/SKILL.md +4 -3
- package/skills/ae-dataops/references/dataops-flow-create.md +47 -3
- package/skills/ae-engage/SKILL.md +55 -7
- package/skills/ae-engage/references/build-task-save-guide.md +12 -0
- package/skills/ae-engage/references/cancel-query-run.md +31 -0
- package/skills/ae-engage/references/config-item-analysis-report.md +14 -1
- package/skills/ae-engage/references/config-item-strategy-comparison.md +11 -1
- package/skills/ae-engage/references/config-item-trigger-report.md +15 -1
- package/skills/ae-engage/references/flow-metric-detail-report.md +134 -0
- package/skills/ae-engage/references/flow-metric-update.md +77 -0
- package/skills/ae-engage/references/flow-metric-user.md +119 -0
- package/skills/ae-engage/references/flow-node-metric-user.md +123 -0
- package/skills/ae-engage/references/flow-node-user.md +123 -0
- package/skills/ae-engage/references/push-record-query.md +32 -1
- package/skills/ae-engage/references/save-task.md +9 -0
- package/skills/ae-engage/references/task-data-detail.md +9 -2
- package/skills/ae-engage/references/task-indicator-user.md +104 -0
- package/skills/ae-engage/references/task-metric-detail.md +9 -2
- package/skills/ae-engage/references/task-submit-approval.md +3 -0
- package/skills/ae-engage/references/task-user-detail-export.md +31 -0
- package/skills/ae-experiment/references/save_experiment.md +4 -0
- package/skills/ae-experiment-design/SKILL.md +1 -1
- package/skills/ae-experiment-design/references/platform-operations.md +1 -1
- package/skills/ae-experiment-insight/references/platform-operations.md +1 -1
- package/skills/ae-metadata/SKILL.md +2 -1
- package/skills/ae-metadata/references/metadata_data_table_download.md +10 -2
- package/skills/ae-metadata/references/metadata_data_table_list.md +5 -2
- package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
- package/skills/ae-system/SKILL.md +66 -3
- package/dist/chunk-DT6Y3TD7.js +0 -232
- package/dist/chunk-MVDZ7DBQ.js +0 -231
- package/dist/chunk-NBPKWKRA.js +0 -51
- package/dist/client-DAIPF7XN.js +0 -23
- package/dist/raw-52B4UKO4.js +0 -71
- package/dist/te-meta-53BVXPFI.js +0 -95
- package/dist/te-meta-TOCBPBXI.js +0 -95
|
@@ -1,28 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertOutputPathAvailable,
|
|
3
|
+
clientWaitTimeoutSeconds,
|
|
4
|
+
downloadAnalysisArtifact,
|
|
5
|
+
validateLifecycleFlags,
|
|
6
|
+
waitForAnalysisRun,
|
|
7
|
+
withAsyncArtifactLifecycle,
|
|
8
|
+
withInterruptSignal
|
|
9
|
+
} from "./chunk-UIHQJK5E.js";
|
|
1
10
|
import {
|
|
2
11
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-753BUTNZ.js";
|
|
4
13
|
import {
|
|
5
14
|
registerCapabilityGatewayRoute,
|
|
6
15
|
resolveGatewayDomain
|
|
7
16
|
} from "./chunk-PTE56QPL.js";
|
|
8
17
|
import {
|
|
9
18
|
withOutputMetadata
|
|
10
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WZRX4KOH.js";
|
|
11
20
|
import {
|
|
12
21
|
CapabilityGatewayError,
|
|
13
22
|
buildCapabilityGatewayUrl,
|
|
14
23
|
dryRunCapability,
|
|
15
24
|
executeCapability,
|
|
16
25
|
executeCapabilityWithEnvelope,
|
|
17
|
-
fetchCapabilityGateway,
|
|
18
26
|
requestCapabilityGateway,
|
|
19
27
|
requestCapabilityGatewayWithEnvelope,
|
|
20
28
|
uploadInputFile,
|
|
21
29
|
validateCapability
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
} from "./chunk-5XUSIK27.js";
|
|
31
|
+
import {
|
|
32
|
+
getCliToken
|
|
33
|
+
} from "./chunk-S5NTSDBS.js";
|
|
34
|
+
import "./chunk-ZQKDZXDO.js";
|
|
35
|
+
import "./chunk-3FY3RJ26.js";
|
|
26
36
|
import {
|
|
27
37
|
CliValidationError
|
|
28
38
|
} from "./chunk-AXDXJTPC.js";
|
|
@@ -30,15 +40,17 @@ import "./chunk-JHENBQ5B.js";
|
|
|
30
40
|
|
|
31
41
|
// src/commands/te-analysis/capability-shared.ts
|
|
32
42
|
var ANALYSIS_GATEWAY_CLI_SERVICES = /* @__PURE__ */ new Set(["project", "system"]);
|
|
33
|
-
var analysisDataRunRoutingHelp = "Routing: use
|
|
34
|
-
var analysisDataExportRoutingHelp = "Routing: use export for full, unknown-size,
|
|
43
|
+
var analysisDataRunRoutingHelp = "Routing: --preview-rows bounds returned business rows per result; omit it to use the model current cluster-configured synchronous limit. Agents should normally pass --preview-rows 100. Use export for full, unknown-size, timed-out, or long-running data.";
|
|
44
|
+
var analysisDataExportRoutingHelp = "Routing: use export for full, unknown-size, timed-out, or long-running analysis data. Plain export submits only; --wait waits, --output waits and atomically downloads, and analysis run wait resumes by run_id. Export commands do not accept --preview-rows.";
|
|
35
45
|
function createAnalysisCapabilityCommand(config) {
|
|
36
46
|
const cliPath = resolveAnalysisGatewayCliPath(config);
|
|
37
|
-
|
|
38
|
-
|
|
47
|
+
const { asyncArtifact, ...coreConfig } = config;
|
|
48
|
+
const command = createCapabilityCommand({
|
|
49
|
+
...coreConfig,
|
|
39
50
|
...cliPath,
|
|
40
51
|
gatewayDomain: "analysis"
|
|
41
52
|
});
|
|
53
|
+
return asyncArtifact ? withAsyncArtifactLifecycle(command, typeof asyncArtifact === "object" ? asyncArtifact : void 0) : command;
|
|
42
54
|
}
|
|
43
55
|
function resolveAnalysisGatewayCliPath(config) {
|
|
44
56
|
const [capabilityService, capabilityResource, capabilityAction, ...extraSegments] = config.capabilityId.split(".");
|
|
@@ -65,18 +77,22 @@ function resolveAnalysisGatewayCliPath(config) {
|
|
|
65
77
|
return { cliService: capabilityService, resource, command };
|
|
66
78
|
}
|
|
67
79
|
function createAnalysisMetaCapabilityCommand(config) {
|
|
68
|
-
|
|
69
|
-
|
|
80
|
+
const { asyncArtifact, ...coreConfig } = config;
|
|
81
|
+
const command = createCapabilityCommand({
|
|
82
|
+
...coreConfig,
|
|
70
83
|
cliService: "analysis-meta",
|
|
71
84
|
gatewayDomain: "analysis"
|
|
72
85
|
});
|
|
86
|
+
return asyncArtifact ? withAsyncArtifactLifecycle(command, typeof asyncArtifact === "object" ? asyncArtifact : void 0) : command;
|
|
73
87
|
}
|
|
74
88
|
function createAnalysisGovernanceCapabilityCommand(config) {
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
const { asyncArtifact, ...coreConfig } = config;
|
|
90
|
+
const command = createCapabilityCommand({
|
|
91
|
+
...coreConfig,
|
|
77
92
|
cliService: "analysis-governance",
|
|
78
93
|
gatewayDomain: "analysis"
|
|
79
94
|
});
|
|
95
|
+
return asyncArtifact ? withAsyncArtifactLifecycle(command, typeof asyncArtifact === "object" ? asyncArtifact : void 0) : command;
|
|
80
96
|
}
|
|
81
97
|
var projectIdFlag = {
|
|
82
98
|
name: "project-id",
|
|
@@ -106,20 +122,22 @@ var limitFlag = {
|
|
|
106
122
|
desc: "Optional inline result limit.",
|
|
107
123
|
alias: "l"
|
|
108
124
|
};
|
|
109
|
-
var
|
|
110
|
-
name: "
|
|
125
|
+
var previewRowsFlag = {
|
|
126
|
+
name: "preview-rows",
|
|
111
127
|
type: "number",
|
|
112
128
|
required: false,
|
|
113
|
-
desc: "
|
|
114
|
-
|
|
115
|
-
min: 1,
|
|
116
|
-
max: 200
|
|
129
|
+
desc: "Maximum business rows returned per result. Omit to use the current model/cluster synchronous limit. The runtime maximum varies by model; agents should normally pass 100.",
|
|
130
|
+
min: 1
|
|
117
131
|
};
|
|
118
|
-
var
|
|
132
|
+
var analysisModelPreviewRowsFlag = {
|
|
133
|
+
...previewRowsFlag,
|
|
134
|
+
desc: "Maximum synchronous preview units returned per result. Units are business rows for tabular results. For path results, this limits real nodes per path level before overflow nodes are combined into more. Omit to use the current model/cluster synchronous limit. The runtime maximum varies by model; agents should normally pass 100."
|
|
135
|
+
};
|
|
136
|
+
var directoryLimitFlag = {
|
|
119
137
|
name: "limit",
|
|
120
138
|
type: "number",
|
|
121
139
|
required: false,
|
|
122
|
-
desc: "
|
|
140
|
+
desc: "Directory page size. Default: 50, max: 200. Values outside 1..200 are rejected.",
|
|
123
141
|
alias: "l",
|
|
124
142
|
min: 1,
|
|
125
143
|
max: 200
|
|
@@ -145,24 +163,6 @@ var reportModelTypesFlag = {
|
|
|
145
163
|
required: false,
|
|
146
164
|
desc: 'Optional semantic report model JSON array, for example ["event","sql","tag","revenue"].'
|
|
147
165
|
};
|
|
148
|
-
var syncLimitFlag = {
|
|
149
|
-
name: "limit",
|
|
150
|
-
type: "number",
|
|
151
|
-
required: false,
|
|
152
|
-
desc: "Maximum inline rows for sync query results. Default: 100, max: 1000. Use export for full data.",
|
|
153
|
-
alias: "l",
|
|
154
|
-
min: 1,
|
|
155
|
-
max: 1e3
|
|
156
|
-
};
|
|
157
|
-
var detailPreviewLimitFlag = {
|
|
158
|
-
name: "limit",
|
|
159
|
-
type: "number",
|
|
160
|
-
required: false,
|
|
161
|
-
desc: "Maximum first preview rows. Default: 100, max: 1000. This is not a pagination window; use export for more rows.",
|
|
162
|
-
alias: "l",
|
|
163
|
-
min: 1,
|
|
164
|
-
max: 1e3
|
|
165
|
-
};
|
|
166
166
|
var offsetFlag = {
|
|
167
167
|
name: "offset",
|
|
168
168
|
type: "number",
|
|
@@ -170,6 +170,14 @@ var offsetFlag = {
|
|
|
170
170
|
desc: "Optional zero-based result offset.",
|
|
171
171
|
alias: "o"
|
|
172
172
|
};
|
|
173
|
+
var directoryOffsetFlag = {
|
|
174
|
+
name: "offset",
|
|
175
|
+
type: "number",
|
|
176
|
+
required: false,
|
|
177
|
+
desc: "Zero-based directory page offset. Default: 0. Negative values are rejected.",
|
|
178
|
+
alias: "o",
|
|
179
|
+
min: 0
|
|
180
|
+
};
|
|
173
181
|
var payloadFlag = {
|
|
174
182
|
name: "payload",
|
|
175
183
|
type: "json",
|
|
@@ -250,7 +258,7 @@ function projectInput(ctx) {
|
|
|
250
258
|
function listInput(ctx) {
|
|
251
259
|
return compactInput({
|
|
252
260
|
...projectInput(ctx),
|
|
253
|
-
|
|
261
|
+
queries: optionalJson(ctx, "queries"),
|
|
254
262
|
fields: optionalJson(ctx, "fields"),
|
|
255
263
|
limit: optionalNumber(ctx, "limit"),
|
|
256
264
|
offset: optionalNumber(ctx, "offset")
|
|
@@ -275,8 +283,8 @@ function dashboardReportDataInput(ctx) {
|
|
|
275
283
|
zone_offset: optionalNumber(ctx, "zone-offset"),
|
|
276
284
|
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
277
285
|
request_id: optionalString(ctx, "request-id"),
|
|
286
|
+
preview_rows: optionalNumber(ctx, "preview-rows"),
|
|
278
287
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
|
|
279
|
-
limit: optionalNumber(ctx, "limit"),
|
|
280
288
|
format: optionalString(ctx, "artifact-format")
|
|
281
289
|
});
|
|
282
290
|
}
|
|
@@ -298,14 +306,10 @@ function biPanelPageDataInput(ctx) {
|
|
|
298
306
|
permission_controls: optionalJson(ctx, "permission-controls"),
|
|
299
307
|
chart_filter_controls: optionalJson(ctx, "chart-filter-controls"),
|
|
300
308
|
columns: optionalJson(ctx, "columns"),
|
|
301
|
-
row_limit: optionalNumber(ctx, "row-limit"),
|
|
302
|
-
row_offset: optionalNumber(ctx, "row-offset"),
|
|
303
|
-
block_limit: optionalNumber(ctx, "block-limit"),
|
|
304
|
-
block_offset: optionalNumber(ctx, "block-offset"),
|
|
305
309
|
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
306
310
|
request_id: optionalString(ctx, "request-id"),
|
|
311
|
+
preview_rows: optionalNumber(ctx, "preview-rows"),
|
|
307
312
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
|
|
308
|
-
limit: optionalNumber(ctx, "limit"),
|
|
309
313
|
format: optionalString(ctx, "artifact-format")
|
|
310
314
|
});
|
|
311
315
|
}
|
|
@@ -350,57 +354,280 @@ function compactInput(input) {
|
|
|
350
354
|
}
|
|
351
355
|
return result;
|
|
352
356
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
+
|
|
358
|
+
// src/commands/te-analysis/catalog-list.ts
|
|
359
|
+
import { createHash, randomBytes } from "crypto";
|
|
360
|
+
import { createReadStream } from "fs";
|
|
361
|
+
import { chmod, lstat, mkdir, open, rename, rm } from "fs/promises";
|
|
362
|
+
import { basename, dirname, extname, join, resolve } from "path";
|
|
363
|
+
var queriesFlag = {
|
|
364
|
+
name: "queries",
|
|
365
|
+
type: "json",
|
|
366
|
+
required: false,
|
|
367
|
+
desc: "Optional JSON array of 1 to 20 keyword filters. Results match any keyword."
|
|
368
|
+
};
|
|
369
|
+
var catalogExportOutputFlag = {
|
|
370
|
+
name: "output",
|
|
371
|
+
type: "string",
|
|
372
|
+
required: true,
|
|
373
|
+
desc: "JSONL output file path. Full rows stay in this file; completeness and identity metadata is written to the adjacent .meta.json file."
|
|
374
|
+
};
|
|
375
|
+
function validateCatalogListFlags(ctx) {
|
|
376
|
+
validateQueriesFlag(ctx);
|
|
377
|
+
}
|
|
378
|
+
function validateCatalogExportFlags(ctx) {
|
|
379
|
+
validateQueriesFlag(ctx);
|
|
380
|
+
const output = ctx.str("output");
|
|
381
|
+
if (!output) {
|
|
382
|
+
throw new CliValidationError("--output is required");
|
|
357
383
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
384
|
+
if (extname(output).toLowerCase() !== ".jsonl") {
|
|
385
|
+
throw new CliValidationError("--output must use the .jsonl extension");
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
function catalogArtifactMaterializer(resourceType) {
|
|
389
|
+
return async ({
|
|
390
|
+
ctx,
|
|
391
|
+
runId,
|
|
392
|
+
artifactId,
|
|
393
|
+
output,
|
|
394
|
+
force,
|
|
395
|
+
signal,
|
|
396
|
+
finalDescriptor
|
|
397
|
+
}) => {
|
|
398
|
+
const outputPath = resolve(output);
|
|
399
|
+
const metaPath = join(
|
|
400
|
+
dirname(outputPath),
|
|
401
|
+
`${basename(outputPath, extname(outputPath))}.meta.json`
|
|
402
|
+
);
|
|
403
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
404
|
+
await assertRegularFileOrMissing(outputPath, force);
|
|
405
|
+
await assertRegularFileOrMissing(metaPath, force);
|
|
406
|
+
const suffix = `${process.pid}.${randomBytes(8).toString("hex")}`;
|
|
407
|
+
const partPath = `${outputPath}.part.${suffix}`;
|
|
408
|
+
const metaPartPath = `${metaPath}.part.${suffix}`;
|
|
409
|
+
let handle;
|
|
410
|
+
try {
|
|
411
|
+
const download = await downloadAnalysisArtifact(
|
|
412
|
+
ctx.host(),
|
|
413
|
+
runId,
|
|
414
|
+
artifactId,
|
|
415
|
+
partPath,
|
|
416
|
+
{ force: true, signal, ensureReady: false }
|
|
417
|
+
);
|
|
418
|
+
const hash = createHash("sha256");
|
|
419
|
+
let bytes = 0;
|
|
420
|
+
let rows = 0;
|
|
421
|
+
for await (const chunk of createReadStream(partPath)) {
|
|
422
|
+
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
423
|
+
hash.update(buffer);
|
|
424
|
+
bytes += buffer.length;
|
|
425
|
+
for (const value of buffer) {
|
|
426
|
+
if (value === 10) rows++;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
const contentSha256 = hash.digest("hex");
|
|
430
|
+
const token = await getCliToken(ctx.host());
|
|
431
|
+
const metadata = {
|
|
432
|
+
schema_version: 1,
|
|
433
|
+
resource_type: resourceType,
|
|
434
|
+
host: ctx.host(),
|
|
435
|
+
project_id: ctx.num("project-id"),
|
|
436
|
+
principal_fingerprint: `sha256:${createHash("sha256").update(token).digest("hex")}`,
|
|
437
|
+
generated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
438
|
+
row_count: rows,
|
|
439
|
+
complete: true,
|
|
440
|
+
content_sha256: contentSha256,
|
|
441
|
+
run_id: runId,
|
|
442
|
+
artifact_id: artifactId
|
|
443
|
+
};
|
|
444
|
+
handle = await open(metaPartPath, "w", 384);
|
|
445
|
+
await handle.write(`${JSON.stringify(metadata)}
|
|
446
|
+
`, void 0, "utf8");
|
|
447
|
+
await handle.sync();
|
|
448
|
+
await handle.close();
|
|
449
|
+
handle = void 0;
|
|
450
|
+
await publishCatalogPair(partPath, outputPath, metaPartPath, metaPath, suffix);
|
|
451
|
+
return {
|
|
452
|
+
...finalDescriptor,
|
|
453
|
+
...download,
|
|
454
|
+
output_path: outputPath,
|
|
455
|
+
metadata_path: metaPath,
|
|
456
|
+
format: "jsonl",
|
|
457
|
+
row_count: rows,
|
|
458
|
+
bytes,
|
|
459
|
+
content_sha256: contentSha256,
|
|
460
|
+
complete: true
|
|
461
|
+
};
|
|
462
|
+
} catch (error) {
|
|
463
|
+
await handle?.close().catch(() => void 0);
|
|
464
|
+
await rm(partPath, { force: true }).catch(() => void 0);
|
|
465
|
+
await rm(metaPartPath, { force: true }).catch(() => void 0);
|
|
466
|
+
throw error;
|
|
467
|
+
}
|
|
364
468
|
};
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}
|
|
469
|
+
}
|
|
470
|
+
async function preflightCatalogArtifactOutput({
|
|
471
|
+
output,
|
|
472
|
+
force
|
|
473
|
+
}) {
|
|
474
|
+
const outputPath = resolve(output);
|
|
475
|
+
const metaPath = join(
|
|
476
|
+
dirname(outputPath),
|
|
477
|
+
`${basename(outputPath, extname(outputPath))}.meta.json`
|
|
478
|
+
);
|
|
479
|
+
await assertRegularFileOrMissing(outputPath, force);
|
|
480
|
+
await assertRegularFileOrMissing(metaPath, force);
|
|
481
|
+
}
|
|
482
|
+
function validateQueriesFlag(ctx) {
|
|
483
|
+
const queries = ctx.json("queries");
|
|
484
|
+
if (queries === void 0 || queries === null) return;
|
|
485
|
+
if (!Array.isArray(queries) || queries.length < 1 || queries.length > 20 || queries.some((query) => typeof query !== "string" || query.trim().length === 0)) {
|
|
486
|
+
throw new CliValidationError("--queries must be a JSON array containing 1 to 20 non-empty strings");
|
|
374
487
|
}
|
|
375
|
-
return cloned;
|
|
376
488
|
}
|
|
377
|
-
function
|
|
378
|
-
|
|
379
|
-
return
|
|
489
|
+
function optionalQueries(ctx) {
|
|
490
|
+
const value = ctx.json("queries");
|
|
491
|
+
return value === void 0 || value === null ? void 0 : value;
|
|
492
|
+
}
|
|
493
|
+
function catalogExportPostProcess(resourceType, arrayField) {
|
|
494
|
+
return async (result, input, ctx) => {
|
|
495
|
+
if (typeof result !== "object" || result === null) {
|
|
496
|
+
throw new Error(`Full ${resourceType} catalog returned an invalid response`);
|
|
497
|
+
}
|
|
498
|
+
const data = result;
|
|
499
|
+
const rows = data[arrayField];
|
|
500
|
+
if (!Array.isArray(rows)) {
|
|
501
|
+
throw new Error(`Full ${resourceType} catalog response is missing ${arrayField}`);
|
|
502
|
+
}
|
|
503
|
+
if (data.complete !== true || typeof data.total !== "number" || data.total !== rows.length) {
|
|
504
|
+
throw new Error(
|
|
505
|
+
`Full ${resourceType} catalog is incomplete: total=${String(data.total)}, rows=${rows.length}, complete=${String(data.complete)}`
|
|
506
|
+
);
|
|
507
|
+
}
|
|
508
|
+
const outputPath = resolve(ctx.str("output"));
|
|
509
|
+
const metaPath = join(
|
|
510
|
+
dirname(outputPath),
|
|
511
|
+
`${basename(outputPath, extname(outputPath))}.meta.json`
|
|
512
|
+
);
|
|
513
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
514
|
+
await assertRegularFileOrMissing(outputPath);
|
|
515
|
+
await assertRegularFileOrMissing(metaPath);
|
|
516
|
+
const suffix = `${process.pid}.${randomBytes(8).toString("hex")}`;
|
|
517
|
+
const partPath = `${outputPath}.part.${suffix}`;
|
|
518
|
+
const metaPartPath = `${metaPath}.part.${suffix}`;
|
|
519
|
+
const hash = createHash("sha256");
|
|
520
|
+
let bytes = 0;
|
|
521
|
+
let handle;
|
|
522
|
+
try {
|
|
523
|
+
handle = await open(partPath, "w", 384);
|
|
524
|
+
for (const row of rows) {
|
|
525
|
+
const line = `${JSON.stringify(row)}
|
|
526
|
+
`;
|
|
527
|
+
const buffer = Buffer.from(line, "utf8");
|
|
528
|
+
hash.update(buffer);
|
|
529
|
+
bytes += buffer.length;
|
|
530
|
+
await handle.write(buffer);
|
|
531
|
+
}
|
|
532
|
+
await handle.sync();
|
|
533
|
+
await handle.close();
|
|
534
|
+
handle = void 0;
|
|
535
|
+
const contentSha256 = hash.digest("hex");
|
|
536
|
+
const token = await getCliToken(ctx.host());
|
|
537
|
+
const metadata = {
|
|
538
|
+
schema_version: 1,
|
|
539
|
+
resource_type: resourceType,
|
|
540
|
+
host: ctx.host(),
|
|
541
|
+
project_id: input.project_id,
|
|
542
|
+
principal_fingerprint: `sha256:${createHash("sha256").update(token).digest("hex")}`,
|
|
543
|
+
generated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
544
|
+
row_count: rows.length,
|
|
545
|
+
complete: true,
|
|
546
|
+
content_sha256: contentSha256
|
|
547
|
+
};
|
|
548
|
+
handle = await open(metaPartPath, "w", 384);
|
|
549
|
+
await handle.write(`${JSON.stringify(metadata)}
|
|
550
|
+
`, void 0, "utf8");
|
|
551
|
+
await handle.sync();
|
|
552
|
+
await handle.close();
|
|
553
|
+
handle = void 0;
|
|
554
|
+
await publishCatalogPair(partPath, outputPath, metaPartPath, metaPath, suffix);
|
|
555
|
+
return {
|
|
556
|
+
resource_type: resourceType,
|
|
557
|
+
output_path: outputPath,
|
|
558
|
+
metadata_path: metaPath,
|
|
559
|
+
format: "jsonl",
|
|
560
|
+
row_count: rows.length,
|
|
561
|
+
bytes,
|
|
562
|
+
content_sha256: contentSha256,
|
|
563
|
+
complete: true
|
|
564
|
+
};
|
|
565
|
+
} catch (error) {
|
|
566
|
+
await handle?.close().catch(() => void 0);
|
|
567
|
+
await rm(partPath, { force: true }).catch(() => void 0);
|
|
568
|
+
await rm(metaPartPath, { force: true }).catch(() => void 0);
|
|
569
|
+
throw error;
|
|
570
|
+
}
|
|
571
|
+
};
|
|
380
572
|
}
|
|
381
|
-
function
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
573
|
+
async function assertRegularFileOrMissing(filePath, allowReplace = true) {
|
|
574
|
+
try {
|
|
575
|
+
const value = await lstat(filePath);
|
|
576
|
+
if (!value.isFile()) {
|
|
577
|
+
throw new Error(`Catalog output path must be a regular file: ${filePath}`);
|
|
578
|
+
}
|
|
579
|
+
if (!allowReplace) {
|
|
580
|
+
throw new Error(`Catalog output path already exists: ${filePath}. Use --force to replace it.`);
|
|
581
|
+
}
|
|
582
|
+
} catch (error) {
|
|
583
|
+
if (error.code !== "ENOENT") {
|
|
584
|
+
throw error;
|
|
585
|
+
}
|
|
386
586
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
587
|
+
}
|
|
588
|
+
async function publishCatalogPair(dataPartPath, dataPath, metaPartPath, metaPath, suffix) {
|
|
589
|
+
const dataBackupPath = `${dataPath}.backup.${suffix}`;
|
|
590
|
+
const metaBackupPath = `${metaPath}.backup.${suffix}`;
|
|
591
|
+
let dataBackedUp = false;
|
|
592
|
+
let metaBackedUp = false;
|
|
593
|
+
let dataPublished = false;
|
|
594
|
+
let metaPublished = false;
|
|
595
|
+
try {
|
|
596
|
+
dataBackedUp = await moveIfExists(dataPath, dataBackupPath);
|
|
597
|
+
metaBackedUp = await moveIfExists(metaPath, metaBackupPath);
|
|
598
|
+
await rename(dataPartPath, dataPath);
|
|
599
|
+
dataPublished = true;
|
|
600
|
+
await chmod(dataPath, 384);
|
|
601
|
+
await rename(metaPartPath, metaPath);
|
|
602
|
+
metaPublished = true;
|
|
603
|
+
await chmod(metaPath, 384);
|
|
604
|
+
await rm(dataBackupPath, { force: true });
|
|
605
|
+
await rm(metaBackupPath, { force: true });
|
|
606
|
+
} catch (error) {
|
|
607
|
+
if (metaPublished) {
|
|
608
|
+
await rm(metaPath, { force: true }).catch(() => void 0);
|
|
609
|
+
}
|
|
610
|
+
if (dataPublished) {
|
|
611
|
+
await rm(dataPath, { force: true }).catch(() => void 0);
|
|
612
|
+
}
|
|
613
|
+
if (metaBackedUp) {
|
|
614
|
+
await rename(metaBackupPath, metaPath).catch(() => void 0);
|
|
615
|
+
}
|
|
616
|
+
if (dataBackedUp) {
|
|
617
|
+
await rename(dataBackupPath, dataPath).catch(() => void 0);
|
|
618
|
+
}
|
|
619
|
+
throw error;
|
|
401
620
|
}
|
|
402
|
-
|
|
403
|
-
|
|
621
|
+
}
|
|
622
|
+
async function moveIfExists(source, target) {
|
|
623
|
+
try {
|
|
624
|
+
await rename(source, target);
|
|
625
|
+
return true;
|
|
626
|
+
} catch (error) {
|
|
627
|
+
if (error.code === "ENOENT") {
|
|
628
|
+
return false;
|
|
629
|
+
}
|
|
630
|
+
throw error;
|
|
404
631
|
}
|
|
405
632
|
}
|
|
406
633
|
|
|
@@ -409,19 +636,20 @@ var metadataEventList = createAnalysisMetaCapabilityCommand({
|
|
|
409
636
|
resource: "event",
|
|
410
637
|
command: "list",
|
|
411
638
|
capabilityId: "metadata.event.list",
|
|
412
|
-
description: "List project events with
|
|
639
|
+
description: "List project events with batch keyword search and bounded pagination.",
|
|
413
640
|
flags: [
|
|
414
641
|
projectIdFlag,
|
|
415
|
-
|
|
642
|
+
queriesFlag,
|
|
416
643
|
fieldsFlag,
|
|
417
|
-
|
|
418
|
-
|
|
644
|
+
directoryLimitFlag,
|
|
645
|
+
directoryOffsetFlag,
|
|
419
646
|
{ name: "authenticated-only", type: "boolean", required: false, desc: "When true, return only authenticated events." }
|
|
420
647
|
],
|
|
421
648
|
risk: "read",
|
|
649
|
+
validate: validateCatalogListFlags,
|
|
422
650
|
buildInput: (ctx) => compactInput({
|
|
423
651
|
...projectInput(ctx),
|
|
424
|
-
|
|
652
|
+
queries: optionalQueries(ctx),
|
|
425
653
|
fields: optionalJson(ctx, "fields"),
|
|
426
654
|
limit: optionalNumber(ctx, "limit"),
|
|
427
655
|
offset: optionalNumber(ctx, "offset"),
|
|
@@ -429,6 +657,138 @@ var metadataEventList = createAnalysisMetaCapabilityCommand({
|
|
|
429
657
|
})
|
|
430
658
|
});
|
|
431
659
|
|
|
660
|
+
// src/commands/te-analysis/metadata-export.ts
|
|
661
|
+
import { createHash as createHash2, randomBytes as randomBytes2 } from "crypto";
|
|
662
|
+
import { chmod as chmod2, lstat as lstat2, mkdir as mkdir2, open as open2, rename as rename2, rm as rm2 } from "fs/promises";
|
|
663
|
+
import { dirname as dirname2, extname as extname2, resolve as resolve2 } from "path";
|
|
664
|
+
var metadataExportOutputFlag = {
|
|
665
|
+
name: "output",
|
|
666
|
+
type: "string",
|
|
667
|
+
required: true,
|
|
668
|
+
desc: "Local .json output file for the complete matching metadata rows."
|
|
669
|
+
};
|
|
670
|
+
function validateMetadataExportFlags(ctx) {
|
|
671
|
+
validateQueriesFlag(ctx);
|
|
672
|
+
const output = ctx.str("output").trim();
|
|
673
|
+
if (output && extname2(output).toLowerCase() !== ".json") {
|
|
674
|
+
throw new CliValidationError("--output must use the .json extension");
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
function metadataExportPostProcess(resourceType, arrayField) {
|
|
678
|
+
return async (result, _input, ctx) => {
|
|
679
|
+
if (typeof result !== "object" || result === null) {
|
|
680
|
+
throw new Error(`Metadata ${resourceType} export returned an invalid response`);
|
|
681
|
+
}
|
|
682
|
+
const data = result;
|
|
683
|
+
const rows = data[arrayField];
|
|
684
|
+
if (!Array.isArray(rows)) {
|
|
685
|
+
throw new Error(`Metadata ${resourceType} export response is missing ${arrayField}`);
|
|
686
|
+
}
|
|
687
|
+
if (data.complete !== true || typeof data.total !== "number" || data.total !== rows.length) {
|
|
688
|
+
throw new Error(
|
|
689
|
+
`Metadata ${resourceType} export is incomplete: total=${String(data.total)}, rows=${rows.length}, complete=${String(data.complete)}`
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
const outputPath = resolve2(ctx.str("output").trim());
|
|
693
|
+
await mkdir2(dirname2(outputPath), { recursive: true });
|
|
694
|
+
await assertRegularFileOrMissing2(outputPath);
|
|
695
|
+
const suffix = `${process.pid}.${randomBytes2(8).toString("hex")}`;
|
|
696
|
+
const partPath = `${outputPath}.part.${suffix}`;
|
|
697
|
+
const content = `${JSON.stringify(rows, null, 2)}
|
|
698
|
+
`;
|
|
699
|
+
const bytes = Buffer.byteLength(content, "utf8");
|
|
700
|
+
let handle;
|
|
701
|
+
try {
|
|
702
|
+
handle = await open2(partPath, "w", 384);
|
|
703
|
+
await handle.write(content, void 0, "utf8");
|
|
704
|
+
await handle.sync();
|
|
705
|
+
await handle.close();
|
|
706
|
+
handle = void 0;
|
|
707
|
+
await publishExport(partPath, outputPath, suffix);
|
|
708
|
+
} catch (error) {
|
|
709
|
+
await handle?.close().catch(() => void 0);
|
|
710
|
+
await rm2(partPath, { force: true }).catch(() => void 0);
|
|
711
|
+
throw error;
|
|
712
|
+
}
|
|
713
|
+
return {
|
|
714
|
+
resource_type: resourceType,
|
|
715
|
+
output_path: outputPath,
|
|
716
|
+
format: "json",
|
|
717
|
+
row_count: rows.length,
|
|
718
|
+
bytes,
|
|
719
|
+
content_sha256: createHash2("sha256").update(content).digest("hex"),
|
|
720
|
+
complete: true
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
async function publishExport(partPath, outputPath, suffix) {
|
|
725
|
+
const backupPath = `${outputPath}.backup.${suffix}`;
|
|
726
|
+
let backedUp = false;
|
|
727
|
+
let published = false;
|
|
728
|
+
try {
|
|
729
|
+
backedUp = await moveIfExists2(outputPath, backupPath);
|
|
730
|
+
await rename2(partPath, outputPath);
|
|
731
|
+
published = true;
|
|
732
|
+
await chmod2(outputPath, 384);
|
|
733
|
+
await rm2(backupPath, { force: true });
|
|
734
|
+
} catch (error) {
|
|
735
|
+
if (published) {
|
|
736
|
+
await rm2(outputPath, { force: true }).catch(() => void 0);
|
|
737
|
+
}
|
|
738
|
+
if (backedUp) {
|
|
739
|
+
await rename2(backupPath, outputPath).catch(() => void 0);
|
|
740
|
+
}
|
|
741
|
+
throw error;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
async function moveIfExists2(source, target) {
|
|
745
|
+
try {
|
|
746
|
+
await rename2(source, target);
|
|
747
|
+
return true;
|
|
748
|
+
} catch (error) {
|
|
749
|
+
if (error.code === "ENOENT") {
|
|
750
|
+
return false;
|
|
751
|
+
}
|
|
752
|
+
throw error;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
async function assertRegularFileOrMissing2(filePath) {
|
|
756
|
+
try {
|
|
757
|
+
const value = await lstat2(filePath);
|
|
758
|
+
if (!value.isFile()) {
|
|
759
|
+
throw new Error(`Metadata export output path must be a regular file: ${filePath}`);
|
|
760
|
+
}
|
|
761
|
+
} catch (error) {
|
|
762
|
+
if (error.code !== "ENOENT") {
|
|
763
|
+
throw error;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
// src/commands/te-analysis/meta/event/export.ts
|
|
769
|
+
var metadataEventExport = createAnalysisMetaCapabilityCommand({
|
|
770
|
+
resource: "event",
|
|
771
|
+
command: "export",
|
|
772
|
+
capabilityId: "metadata.event.export",
|
|
773
|
+
description: "Export every matching project event to one local JSON file without pagination.",
|
|
774
|
+
flags: [
|
|
775
|
+
projectIdFlag,
|
|
776
|
+
queriesFlag,
|
|
777
|
+
fieldsFlag,
|
|
778
|
+
{ name: "authenticated-only", type: "boolean", required: false, desc: "When true, export only authenticated events." },
|
|
779
|
+
metadataExportOutputFlag
|
|
780
|
+
],
|
|
781
|
+
risk: "read",
|
|
782
|
+
validate: validateMetadataExportFlags,
|
|
783
|
+
buildInput: (ctx) => compactInput({
|
|
784
|
+
...projectInput(ctx),
|
|
785
|
+
queries: optionalQueries(ctx),
|
|
786
|
+
fields: optionalJson(ctx, "fields"),
|
|
787
|
+
authenticated_only: optionalBoolean(ctx, "authenticated-only")
|
|
788
|
+
}),
|
|
789
|
+
postProcess: metadataExportPostProcess("event", "events")
|
|
790
|
+
});
|
|
791
|
+
|
|
432
792
|
// src/commands/te-analysis/meta/event/get.ts
|
|
433
793
|
var metadataEventGet = createAnalysisMetaCapabilityCommand({
|
|
434
794
|
resource: "event",
|
|
@@ -547,6 +907,7 @@ var metadataEventChangelogList = createAnalysisMetaCapabilityCommand({
|
|
|
547
907
|
// src/commands/te-analysis/meta/event/index.ts
|
|
548
908
|
var commands = [
|
|
549
909
|
metadataEventList,
|
|
910
|
+
metadataEventExport,
|
|
550
911
|
metadataEventGet,
|
|
551
912
|
metadataEventCreate,
|
|
552
913
|
metadataEventUpdate,
|
|
@@ -563,25 +924,26 @@ var metadataPropertyList = createAnalysisMetaCapabilityCommand({
|
|
|
563
924
|
resource: "property",
|
|
564
925
|
command: "list",
|
|
565
926
|
capabilityId: "metadata.property.list",
|
|
566
|
-
description: "List event or
|
|
927
|
+
description: "List event, user, dimension-table, or complex child properties with batch keyword search and bounded pagination.",
|
|
567
928
|
flags: [
|
|
568
929
|
projectIdFlag,
|
|
569
930
|
{ name: "table-type", type: "string", required: false, desc: "Optional property table type: event or user." },
|
|
570
931
|
{ name: "scope", type: "string", required: false, desc: "Optional property scope: event or user." },
|
|
571
932
|
{ name: "event-name", type: "string", required: false, desc: "Optional event name filter for event properties." },
|
|
572
|
-
|
|
933
|
+
queriesFlag,
|
|
573
934
|
fieldsFlag,
|
|
574
|
-
|
|
575
|
-
|
|
935
|
+
directoryLimitFlag,
|
|
936
|
+
directoryOffsetFlag,
|
|
576
937
|
{ name: "authenticated-only", type: "boolean", required: false, desc: "When true, return only authenticated properties." }
|
|
577
938
|
],
|
|
578
939
|
risk: "read",
|
|
940
|
+
validate: validateCatalogListFlags,
|
|
579
941
|
buildInput: (ctx) => compactInput({
|
|
580
942
|
...projectInput(ctx),
|
|
581
943
|
table_type: optionalString(ctx, "table-type"),
|
|
582
944
|
scope: optionalString(ctx, "scope"),
|
|
583
945
|
event_name: optionalString(ctx, "event-name"),
|
|
584
|
-
|
|
946
|
+
queries: optionalQueries(ctx),
|
|
585
947
|
fields: optionalJson(ctx, "fields"),
|
|
586
948
|
limit: optionalNumber(ctx, "limit"),
|
|
587
949
|
offset: optionalNumber(ctx, "offset"),
|
|
@@ -589,6 +951,36 @@ var metadataPropertyList = createAnalysisMetaCapabilityCommand({
|
|
|
589
951
|
})
|
|
590
952
|
});
|
|
591
953
|
|
|
954
|
+
// src/commands/te-analysis/meta/property/export.ts
|
|
955
|
+
var metadataPropertyExport = createAnalysisMetaCapabilityCommand({
|
|
956
|
+
resource: "property",
|
|
957
|
+
command: "export",
|
|
958
|
+
capabilityId: "metadata.property.export",
|
|
959
|
+
description: "Export every matching property to one local JSON file without pagination.",
|
|
960
|
+
flags: [
|
|
961
|
+
projectIdFlag,
|
|
962
|
+
{ name: "table-type", type: "string", required: false, desc: "Optional property table type: event or user." },
|
|
963
|
+
{ name: "scope", type: "string", required: false, desc: "Optional property scope: event or user." },
|
|
964
|
+
{ name: "event-name", type: "string", required: false, desc: "Optional event name filter for event properties." },
|
|
965
|
+
queriesFlag,
|
|
966
|
+
fieldsFlag,
|
|
967
|
+
{ name: "authenticated-only", type: "boolean", required: false, desc: "When true, export only authenticated properties." },
|
|
968
|
+
metadataExportOutputFlag
|
|
969
|
+
],
|
|
970
|
+
risk: "read",
|
|
971
|
+
validate: validateMetadataExportFlags,
|
|
972
|
+
buildInput: (ctx) => compactInput({
|
|
973
|
+
...projectInput(ctx),
|
|
974
|
+
table_type: optionalString(ctx, "table-type"),
|
|
975
|
+
scope: optionalString(ctx, "scope"),
|
|
976
|
+
event_name: optionalString(ctx, "event-name"),
|
|
977
|
+
queries: optionalQueries(ctx),
|
|
978
|
+
fields: optionalJson(ctx, "fields"),
|
|
979
|
+
authenticated_only: optionalBoolean(ctx, "authenticated-only")
|
|
980
|
+
}),
|
|
981
|
+
postProcess: metadataExportPostProcess("property", "properties")
|
|
982
|
+
});
|
|
983
|
+
|
|
592
984
|
// src/commands/te-analysis/meta/property/get.ts
|
|
593
985
|
var metadataPropertyGet = createAnalysisMetaCapabilityCommand({
|
|
594
986
|
resource: "property",
|
|
@@ -729,6 +1121,7 @@ var metadataPropertyRelatedEvents = createAnalysisMetaCapabilityCommand({
|
|
|
729
1121
|
// src/commands/te-analysis/meta/property/index.ts
|
|
730
1122
|
var commands2 = [
|
|
731
1123
|
metadataPropertyList,
|
|
1124
|
+
metadataPropertyExport,
|
|
732
1125
|
metadataPropertyGet,
|
|
733
1126
|
metadataPropertyCreate,
|
|
734
1127
|
metadataPropertyUpdate,
|
|
@@ -831,7 +1224,7 @@ var metadataVirtualPropertyCreate = createAnalysisMetaCapabilityCommand({
|
|
|
831
1224
|
flags: [
|
|
832
1225
|
projectIdFlag,
|
|
833
1226
|
{ name: "sql-expression", type: "string", required: true, desc: "SQL expression used to calculate the virtual property." },
|
|
834
|
-
{ name: "v-prop", type: "json", required: false, desc: "Virtual property JSON object with property.column_name/table_type/select_type fields." },
|
|
1227
|
+
{ name: "v-prop", type: "json", required: false, desc: "Virtual property JSON object with property.column_name/property.table_type/property.select_type fields." },
|
|
835
1228
|
{ name: "property-name", type: "string", required: false, desc: "Virtual property name. Must start with '#vp@'." },
|
|
836
1229
|
{ name: "property-desc", type: "string", required: false, desc: "Virtual property display name." },
|
|
837
1230
|
{ name: "table-type", type: "string", required: false, desc: "Property table type: event or user." },
|
|
@@ -888,7 +1281,7 @@ var metadataVirtualPropertySqlRuleUpdate = createAnalysisMetaCapabilityCommand({
|
|
|
888
1281
|
flags: [
|
|
889
1282
|
projectIdFlag,
|
|
890
1283
|
{ name: "sql-expression", type: "string", required: true, desc: "SQL expression used to calculate the virtual property." },
|
|
891
|
-
{ name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with prop_id
|
|
1284
|
+
{ name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with prop_id beside property." },
|
|
892
1285
|
{ name: "properties", type: "json", required: false, desc: "Dependent property JSON array." },
|
|
893
1286
|
{ name: "sql-event-relation-type", type: "string", required: false, desc: "relation_default, relation_always, or relation_by_setting." },
|
|
894
1287
|
{ name: "related-events", type: "json", required: false, desc: "Related events JSON array when using relation_by_setting." },
|
|
@@ -938,21 +1331,22 @@ var metadataMetricList = createAnalysisMetaCapabilityCommand({
|
|
|
938
1331
|
resource: "metric",
|
|
939
1332
|
command: "list",
|
|
940
1333
|
capabilityId: "metadata.metric.list",
|
|
941
|
-
description: "List project metrics with
|
|
1334
|
+
description: "List project metrics with batch keyword search and bounded pagination.",
|
|
942
1335
|
flags: [
|
|
943
1336
|
projectIdFlag,
|
|
944
1337
|
{ name: "ignore-authentication", type: "boolean", required: false, desc: "Whether to skip asset authentication status decoration." },
|
|
945
|
-
|
|
1338
|
+
queriesFlag,
|
|
946
1339
|
fieldsFlag,
|
|
947
|
-
|
|
948
|
-
|
|
1340
|
+
directoryLimitFlag,
|
|
1341
|
+
directoryOffsetFlag,
|
|
949
1342
|
{ name: "authenticated-only", type: "boolean", required: false, desc: "When true, return only authenticated metrics." }
|
|
950
1343
|
],
|
|
951
1344
|
risk: "read",
|
|
1345
|
+
validate: validateCatalogListFlags,
|
|
952
1346
|
buildInput: (ctx) => compactInput({
|
|
953
1347
|
...projectInput(ctx),
|
|
954
1348
|
ignore_authentication: optionalBoolean(ctx, "ignore-authentication"),
|
|
955
|
-
|
|
1349
|
+
queries: optionalQueries(ctx),
|
|
956
1350
|
fields: optionalJson(ctx, "fields"),
|
|
957
1351
|
limit: optionalNumber(ctx, "limit"),
|
|
958
1352
|
offset: optionalNumber(ctx, "offset"),
|
|
@@ -960,6 +1354,32 @@ var metadataMetricList = createAnalysisMetaCapabilityCommand({
|
|
|
960
1354
|
})
|
|
961
1355
|
});
|
|
962
1356
|
|
|
1357
|
+
// src/commands/te-analysis/meta/metric/export.ts
|
|
1358
|
+
var metadataMetricExport = createAnalysisMetaCapabilityCommand({
|
|
1359
|
+
resource: "metric",
|
|
1360
|
+
command: "export",
|
|
1361
|
+
capabilityId: "metadata.metric.export",
|
|
1362
|
+
description: "Export every matching project metric to one local JSON file without pagination.",
|
|
1363
|
+
flags: [
|
|
1364
|
+
projectIdFlag,
|
|
1365
|
+
{ name: "ignore-authentication", type: "boolean", required: false, desc: "Whether to skip asset authentication status decoration." },
|
|
1366
|
+
queriesFlag,
|
|
1367
|
+
fieldsFlag,
|
|
1368
|
+
{ name: "authenticated-only", type: "boolean", required: false, desc: "When true, export only authenticated metrics." },
|
|
1369
|
+
metadataExportOutputFlag
|
|
1370
|
+
],
|
|
1371
|
+
risk: "read",
|
|
1372
|
+
validate: validateMetadataExportFlags,
|
|
1373
|
+
buildInput: (ctx) => compactInput({
|
|
1374
|
+
...projectInput(ctx),
|
|
1375
|
+
ignore_authentication: optionalBoolean(ctx, "ignore-authentication"),
|
|
1376
|
+
queries: optionalQueries(ctx),
|
|
1377
|
+
fields: optionalJson(ctx, "fields"),
|
|
1378
|
+
authenticated_only: optionalBoolean(ctx, "authenticated-only")
|
|
1379
|
+
}),
|
|
1380
|
+
postProcess: metadataExportPostProcess("metric", "metrics")
|
|
1381
|
+
});
|
|
1382
|
+
|
|
963
1383
|
// src/commands/te-analysis/meta/metric/get.ts
|
|
964
1384
|
var metadataMetricGet = createAnalysisMetaCapabilityCommand({
|
|
965
1385
|
resource: "metric",
|
|
@@ -976,16 +1396,7 @@ var metadataMetricGet = createAnalysisMetaCapabilityCommand({
|
|
|
976
1396
|
|
|
977
1397
|
// src/commands/te-analysis/meta/metric/shared.ts
|
|
978
1398
|
function metricMode(ctx) {
|
|
979
|
-
|
|
980
|
-
const modelType = optionalString(ctx, "model-type");
|
|
981
|
-
const mapped = modelType === void 0 ? void 0 : modelTypeToMetricMode(modelType);
|
|
982
|
-
if (mode === void 0 && mapped === void 0) {
|
|
983
|
-
throw new Error("Pass one of --model-type or --metric-mode");
|
|
984
|
-
}
|
|
985
|
-
if (mode !== void 0 && mapped !== void 0 && mode !== mapped) {
|
|
986
|
-
throw new Error("--metric-mode must match --model-type when both are provided");
|
|
987
|
-
}
|
|
988
|
-
return mode ?? mapped;
|
|
1399
|
+
return modelTypeToMetricMode(ctx.str("model-type"));
|
|
989
1400
|
}
|
|
990
1401
|
function optionalMetricMode(ctx) {
|
|
991
1402
|
const mode = optionalNumber(ctx, "metric-mode");
|
|
@@ -1018,9 +1429,8 @@ var metadataMetricCreate = createAnalysisMetaCapabilityCommand({
|
|
|
1018
1429
|
{ name: "metric-name", type: "string", required: true, desc: "Metric technical name, for example pay_count." },
|
|
1019
1430
|
{ name: "metric-desc", type: "string", required: true, desc: "Metric display name." },
|
|
1020
1431
|
{ name: "metric-remark", type: "string", required: false, desc: "Metric remark." },
|
|
1021
|
-
{ name: "
|
|
1022
|
-
{ name: "
|
|
1023
|
-
{ name: "metric-events", type: "json", required: true, desc: "Metric event-analysis QP JSON array." },
|
|
1432
|
+
{ name: "model-type", type: "string", required: true, desc: "Semantic metric model type: event or retention." },
|
|
1433
|
+
{ name: "metric-events", type: "json", required: true, desc: "One semantic event-analysis definition, or a native snake_case QP array for compatibility." },
|
|
1024
1434
|
{ name: "metric-params", type: "json", required: false, desc: "Metric params JSON object. Defaults to {} in common when omitted." }
|
|
1025
1435
|
],
|
|
1026
1436
|
risk: "write",
|
|
@@ -1082,6 +1492,7 @@ var metadataMetricDelete = createAnalysisMetaCapabilityCommand({
|
|
|
1082
1492
|
// src/commands/te-analysis/meta/metric/index.ts
|
|
1083
1493
|
var commands5 = [
|
|
1084
1494
|
metadataMetricList,
|
|
1495
|
+
metadataMetricExport,
|
|
1085
1496
|
metadataMetricGet,
|
|
1086
1497
|
metadataMetricCreate,
|
|
1087
1498
|
metadataMetricUpdate,
|
|
@@ -1097,10 +1508,17 @@ var metadataAssetSearch = createAnalysisMetaCapabilityCommand({
|
|
|
1097
1508
|
description: "Search project assets by keyword.",
|
|
1098
1509
|
flags: [
|
|
1099
1510
|
projectIdFlag,
|
|
1100
|
-
requiredPayloadFlag
|
|
1511
|
+
requiredPayloadFlag,
|
|
1512
|
+
directoryLimitFlag,
|
|
1513
|
+
directoryOffsetFlag
|
|
1101
1514
|
],
|
|
1102
1515
|
risk: "read",
|
|
1103
|
-
buildInput: (ctx) => ({
|
|
1516
|
+
buildInput: (ctx) => compactInput({
|
|
1517
|
+
...projectInput(ctx),
|
|
1518
|
+
payload: ctx.json("payload"),
|
|
1519
|
+
limit: optionalNumber(ctx, "limit"),
|
|
1520
|
+
offset: optionalNumber(ctx, "offset")
|
|
1521
|
+
})
|
|
1104
1522
|
});
|
|
1105
1523
|
|
|
1106
1524
|
// src/commands/te-analysis/meta/asset/recent-list.ts
|
|
@@ -1124,10 +1542,16 @@ var metadataAssetAuthenticationList = createAnalysisMetaCapabilityCommand({
|
|
|
1124
1542
|
capabilityId: "metadata.asset_authentication.list",
|
|
1125
1543
|
description: "List authenticatable project assets and authentication status.",
|
|
1126
1544
|
flags: [
|
|
1127
|
-
projectIdFlag
|
|
1545
|
+
projectIdFlag,
|
|
1546
|
+
directoryLimitFlag,
|
|
1547
|
+
directoryOffsetFlag
|
|
1128
1548
|
],
|
|
1129
1549
|
risk: "read",
|
|
1130
|
-
buildInput:
|
|
1550
|
+
buildInput: (ctx) => compactInput({
|
|
1551
|
+
...projectInput(ctx),
|
|
1552
|
+
limit: optionalNumber(ctx, "limit"),
|
|
1553
|
+
offset: optionalNumber(ctx, "offset")
|
|
1554
|
+
})
|
|
1131
1555
|
});
|
|
1132
1556
|
|
|
1133
1557
|
// src/commands/te-analysis/meta/asset/authentication-update.ts
|
|
@@ -1152,10 +1576,17 @@ var metadataAssetAbnormalList = createAnalysisMetaCapabilityCommand({
|
|
|
1152
1576
|
description: "List abnormal assets by resource type.",
|
|
1153
1577
|
flags: [
|
|
1154
1578
|
projectIdFlag,
|
|
1155
|
-
{ name: "resource-types", type: "string", required: true, desc: "Resource types to query." }
|
|
1579
|
+
{ name: "resource-types", type: "string", required: true, desc: "Resource types to query." },
|
|
1580
|
+
directoryLimitFlag,
|
|
1581
|
+
directoryOffsetFlag
|
|
1156
1582
|
],
|
|
1157
1583
|
risk: "read",
|
|
1158
|
-
buildInput: (ctx) => ({
|
|
1584
|
+
buildInput: (ctx) => compactInput({
|
|
1585
|
+
...projectInput(ctx),
|
|
1586
|
+
resource_types: ctx.str("resource-types"),
|
|
1587
|
+
limit: optionalNumber(ctx, "limit"),
|
|
1588
|
+
offset: optionalNumber(ctx, "offset")
|
|
1589
|
+
})
|
|
1159
1590
|
});
|
|
1160
1591
|
|
|
1161
1592
|
// src/commands/te-analysis/meta/asset/abnormal-get.ts
|
|
@@ -1309,10 +1740,16 @@ var metadataExchangeRuleList = createAnalysisMetaCapabilityCommand({
|
|
|
1309
1740
|
capabilityId: "metadata.exchange_rule.list",
|
|
1310
1741
|
description: "List exchange-rate conversion rules.",
|
|
1311
1742
|
flags: [
|
|
1312
|
-
projectIdFlag
|
|
1743
|
+
projectIdFlag,
|
|
1744
|
+
directoryLimitFlag,
|
|
1745
|
+
directoryOffsetFlag
|
|
1313
1746
|
],
|
|
1314
1747
|
risk: "read",
|
|
1315
|
-
buildInput:
|
|
1748
|
+
buildInput: (ctx) => compactInput({
|
|
1749
|
+
...projectInput(ctx),
|
|
1750
|
+
limit: optionalNumber(ctx, "limit"),
|
|
1751
|
+
offset: optionalNumber(ctx, "offset")
|
|
1752
|
+
})
|
|
1316
1753
|
});
|
|
1317
1754
|
|
|
1318
1755
|
// src/commands/te-analysis/meta/exchange/rule-validate.ts
|
|
@@ -1411,6 +1848,7 @@ var metadataSuperMetadataExport = createAnalysisMetaCapabilityCommand({
|
|
|
1411
1848
|
resource: "event-property-bundle",
|
|
1412
1849
|
command: "export",
|
|
1413
1850
|
capabilityId: "metadata.event_property_bundle.export",
|
|
1851
|
+
asyncArtifact: true,
|
|
1414
1852
|
description: "Export super event and super property configuration as an asynchronous XLSX artifact.",
|
|
1415
1853
|
flags: [
|
|
1416
1854
|
projectIdFlag,
|
|
@@ -1491,10 +1929,17 @@ var metadataDataTableVersionList = createAnalysisMetaCapabilityCommand({
|
|
|
1491
1929
|
description: "List data table historical versions.",
|
|
1492
1930
|
flags: [
|
|
1493
1931
|
projectIdFlag,
|
|
1494
|
-
{ name: "datatable-id", type: "number", required: true, desc: "Data table ID." }
|
|
1932
|
+
{ name: "datatable-id", type: "number", required: true, desc: "Data table ID." },
|
|
1933
|
+
directoryLimitFlag,
|
|
1934
|
+
directoryOffsetFlag
|
|
1495
1935
|
],
|
|
1496
1936
|
risk: "read",
|
|
1497
|
-
buildInput: (ctx) => ({
|
|
1937
|
+
buildInput: (ctx) => ({
|
|
1938
|
+
...projectInput(ctx),
|
|
1939
|
+
datatable_id: ctx.num("datatable-id"),
|
|
1940
|
+
limit: optionalNumber(ctx, "limit"),
|
|
1941
|
+
offset: optionalNumber(ctx, "offset")
|
|
1942
|
+
})
|
|
1498
1943
|
});
|
|
1499
1944
|
|
|
1500
1945
|
// src/commands/te-analysis/meta/datatable/version-get.ts
|
|
@@ -1520,8 +1965,96 @@ var commands9 = [
|
|
|
1520
1965
|
];
|
|
1521
1966
|
var datatable_default = commands9;
|
|
1522
1967
|
|
|
1968
|
+
// src/commands/te-analysis/meta/catalog/export.ts
|
|
1969
|
+
var metadataCatalogExport = createAnalysisMetaCapabilityCommand({
|
|
1970
|
+
resource: "catalog",
|
|
1971
|
+
command: "export",
|
|
1972
|
+
capabilityId: "metadata.catalog.export",
|
|
1973
|
+
asyncArtifact: {
|
|
1974
|
+
preflightOutput: preflightCatalogArtifactOutput,
|
|
1975
|
+
materialize: catalogArtifactMaterializer("analysis_metadata")
|
|
1976
|
+
},
|
|
1977
|
+
description: "Export the complete accessible analysis metadata catalog to JSONL with an integrity sidecar.",
|
|
1978
|
+
flags: [projectIdFlag, requestIdFlag, asyncTimeoutSecondsFlag],
|
|
1979
|
+
risk: "read",
|
|
1980
|
+
validate: validateCatalogExportFlags,
|
|
1981
|
+
buildInput: (ctx) => compactInput({
|
|
1982
|
+
...projectInput(ctx),
|
|
1983
|
+
request_id: optionalString(ctx, "request-id"),
|
|
1984
|
+
timeout_seconds: optionalNumber(ctx, "timeout-seconds")
|
|
1985
|
+
})
|
|
1986
|
+
});
|
|
1987
|
+
|
|
1988
|
+
// src/commands/te-analysis/meta/catalog/list.ts
|
|
1989
|
+
var resourceTypes = [
|
|
1990
|
+
"event",
|
|
1991
|
+
"metric",
|
|
1992
|
+
"event_property",
|
|
1993
|
+
"user_property",
|
|
1994
|
+
"cluster",
|
|
1995
|
+
"tag"
|
|
1996
|
+
];
|
|
1997
|
+
var resourceTypesFlag = {
|
|
1998
|
+
name: "resource-types",
|
|
1999
|
+
type: "json",
|
|
2000
|
+
required: false,
|
|
2001
|
+
desc: "Online search resource type filter JSON array. Use event, metric, event_property, user_property, cluster, or tag."
|
|
2002
|
+
};
|
|
2003
|
+
var limitPerTypeFlag = {
|
|
2004
|
+
name: "limit-per-type",
|
|
2005
|
+
type: "number",
|
|
2006
|
+
required: false,
|
|
2007
|
+
min: 1,
|
|
2008
|
+
max: 200,
|
|
2009
|
+
desc: "Maximum online search results per resource type. Default: 20, max: 200."
|
|
2010
|
+
};
|
|
2011
|
+
function optionalResourceTypes(ctx) {
|
|
2012
|
+
const value = ctx.json("resource-types");
|
|
2013
|
+
return value === void 0 || value === null ? void 0 : value;
|
|
2014
|
+
}
|
|
2015
|
+
function validateMetadataCatalogList(ctx) {
|
|
2016
|
+
const queries = ctx.json("queries");
|
|
2017
|
+
const selectedTypes = ctx.json("resource-types");
|
|
2018
|
+
const limitPerType = ctx.optionalNum("limit-per-type");
|
|
2019
|
+
validateCatalogListFlags(ctx);
|
|
2020
|
+
if (queries === void 0 || selectedTypes === void 0) {
|
|
2021
|
+
throw new CliValidationError(
|
|
2022
|
+
"online catalog search requires --queries and --resource-types"
|
|
2023
|
+
);
|
|
2024
|
+
}
|
|
2025
|
+
if (!Array.isArray(selectedTypes) || selectedTypes.length < 1 || selectedTypes.length > resourceTypes.length || selectedTypes.some((type) => typeof type !== "string" || !resourceTypes.includes(type))) {
|
|
2026
|
+
throw new CliValidationError(
|
|
2027
|
+
"--resource-types must be a JSON array containing only event, metric, event_property, user_property, cluster, or tag"
|
|
2028
|
+
);
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
var metadataCatalogList = createAnalysisMetaCapabilityCommand({
|
|
2032
|
+
resource: "catalog",
|
|
2033
|
+
command: "list",
|
|
2034
|
+
capabilityId: "metadata.catalog.list",
|
|
2035
|
+
description: "Search selected analysis metadata types with bounded per-type results.",
|
|
2036
|
+
flags: [
|
|
2037
|
+
projectIdFlag,
|
|
2038
|
+
queriesFlag,
|
|
2039
|
+
resourceTypesFlag,
|
|
2040
|
+
limitPerTypeFlag
|
|
2041
|
+
],
|
|
2042
|
+
risk: "read",
|
|
2043
|
+
validate: validateMetadataCatalogList,
|
|
2044
|
+
buildInput: (ctx) => compactInput({
|
|
2045
|
+
...projectInput(ctx),
|
|
2046
|
+
queries: optionalQueries(ctx),
|
|
2047
|
+
resource_types: optionalResourceTypes(ctx),
|
|
2048
|
+
limit_per_type: ctx.optionalNum("limit-per-type")
|
|
2049
|
+
})
|
|
2050
|
+
});
|
|
2051
|
+
|
|
2052
|
+
// src/commands/te-analysis/meta/catalog/index.ts
|
|
2053
|
+
var commands10 = [metadataCatalogList, metadataCatalogExport];
|
|
2054
|
+
var catalog_default = commands10;
|
|
2055
|
+
|
|
1523
2056
|
// src/commands/te-analysis/meta/index.ts
|
|
1524
|
-
var
|
|
2057
|
+
var commands11 = [
|
|
1525
2058
|
...event_default,
|
|
1526
2059
|
...property_default,
|
|
1527
2060
|
...virtual_event_default,
|
|
@@ -1530,9 +2063,10 @@ var commands10 = [
|
|
|
1530
2063
|
...asset_default,
|
|
1531
2064
|
...exchange_default,
|
|
1532
2065
|
...super_metadata_default,
|
|
1533
|
-
...datatable_default
|
|
2066
|
+
...datatable_default,
|
|
2067
|
+
...catalog_default
|
|
1534
2068
|
];
|
|
1535
|
-
var meta_default =
|
|
2069
|
+
var meta_default = commands11;
|
|
1536
2070
|
|
|
1537
2071
|
// src/commands/te-analysis/meta/asset/usage-list.ts
|
|
1538
2072
|
var analysisMetaAssetUsageList = createAnalysisGovernanceCapabilityCommand({
|
|
@@ -1540,7 +2074,7 @@ var analysisMetaAssetUsageList = createAnalysisGovernanceCapabilityCommand({
|
|
|
1540
2074
|
command: "list",
|
|
1541
2075
|
capabilityId: "governance.asset.list",
|
|
1542
2076
|
description: "List assets for usage governance.",
|
|
1543
|
-
flags: [projectIdFlag, queryFlag, searchsFlag, ruleFlag, operationTypeFlag, directoryLimitFlag,
|
|
2077
|
+
flags: [projectIdFlag, queryFlag, searchsFlag, ruleFlag, operationTypeFlag, directoryLimitFlag, directoryOffsetFlag, payloadFlag],
|
|
1544
2078
|
risk: "read",
|
|
1545
2079
|
buildInput: (ctx) => assetGovernanceInput(ctx, ["query", "searchs", "rule", "operation_type", "limit", "offset"])
|
|
1546
2080
|
});
|
|
@@ -1573,7 +2107,7 @@ var analysisMetaAssetDependencyList = createAnalysisGovernanceCapabilityCommand(
|
|
|
1573
2107
|
command: "list",
|
|
1574
2108
|
capabilityId: "governance.asset_dependency.list",
|
|
1575
2109
|
description: "List upstream dependencies for one asset.",
|
|
1576
|
-
flags: [projectIdFlag, nodeIdFlag, queryFlag, searchsFlag, ruleFlag, directoryLimitFlag,
|
|
2110
|
+
flags: [projectIdFlag, nodeIdFlag, queryFlag, searchsFlag, ruleFlag, directoryLimitFlag, directoryOffsetFlag, payloadFlag],
|
|
1577
2111
|
risk: "read",
|
|
1578
2112
|
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_id", "query", "searchs", "rule", "limit", "offset"])
|
|
1579
2113
|
});
|
|
@@ -1584,7 +2118,7 @@ var analysisMetaAssetImpactList = createAnalysisGovernanceCapabilityCommand({
|
|
|
1584
2118
|
command: "list",
|
|
1585
2119
|
capabilityId: "governance.asset_impact.list",
|
|
1586
2120
|
description: "List downstream impacts for one asset.",
|
|
1587
|
-
flags: [projectIdFlag, nodeIdFlag, queryFlag, searchsFlag, ruleFlag, directoryLimitFlag,
|
|
2121
|
+
flags: [projectIdFlag, nodeIdFlag, queryFlag, searchsFlag, ruleFlag, directoryLimitFlag, directoryOffsetFlag, payloadFlag],
|
|
1588
2122
|
risk: "read",
|
|
1589
2123
|
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_id", "query", "searchs", "rule", "limit", "offset"])
|
|
1590
2124
|
});
|
|
@@ -1595,7 +2129,7 @@ var analysisMetaAssetQueryHistoryList = createAnalysisGovernanceCapabilityComman
|
|
|
1595
2129
|
command: "list",
|
|
1596
2130
|
capabilityId: "governance.asset_query_history.list",
|
|
1597
2131
|
description: "List query history for one asset.",
|
|
1598
|
-
flags: [projectIdFlag, nodeIdFlag, queryFlag, searchsFlag, ruleFlag, directoryLimitFlag,
|
|
2132
|
+
flags: [projectIdFlag, nodeIdFlag, queryFlag, searchsFlag, ruleFlag, directoryLimitFlag, directoryOffsetFlag, payloadFlag],
|
|
1599
2133
|
risk: "read",
|
|
1600
2134
|
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_id", "query", "searchs", "rule", "limit", "offset"])
|
|
1601
2135
|
});
|
|
@@ -1617,9 +2151,9 @@ var analysisMetaAssetRuleList = createAnalysisGovernanceCapabilityCommand({
|
|
|
1617
2151
|
command: "list",
|
|
1618
2152
|
capabilityId: "governance.rule.list",
|
|
1619
2153
|
description: "List asset governance rules.",
|
|
1620
|
-
flags: [projectIdFlag, payloadFlag],
|
|
2154
|
+
flags: [projectIdFlag, payloadFlag, directoryLimitFlag, directoryOffsetFlag],
|
|
1621
2155
|
risk: "read",
|
|
1622
|
-
buildInput: (ctx) => assetGovernanceInput(ctx, [])
|
|
2156
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["limit", "offset"])
|
|
1623
2157
|
});
|
|
1624
2158
|
|
|
1625
2159
|
// src/commands/te-analysis/meta/asset/rule-create.ts
|
|
@@ -1738,7 +2272,7 @@ var analysisMetaAssetOperationRecordList = createAnalysisGovernanceCapabilityCom
|
|
|
1738
2272
|
command: "list",
|
|
1739
2273
|
capabilityId: "governance.operation_record.list",
|
|
1740
2274
|
description: "List asset batch operation records.",
|
|
1741
|
-
flags: [projectIdFlag, typeFlag, statusFlag, queryFlag, sortFieldFlag, sortOrderFlag, directoryLimitFlag,
|
|
2275
|
+
flags: [projectIdFlag, typeFlag, statusFlag, queryFlag, sortFieldFlag, sortOrderFlag, directoryLimitFlag, directoryOffsetFlag, payloadFlag],
|
|
1742
2276
|
risk: "read",
|
|
1743
2277
|
buildInput: (ctx) => assetGovernanceInput(ctx, ["type", "status", "query", "sort_field", "sort_order", "limit", "offset"])
|
|
1744
2278
|
});
|
|
@@ -1755,7 +2289,7 @@ var analysisMetaAssetOperationRecordExport = createAnalysisGovernanceCapabilityC
|
|
|
1755
2289
|
});
|
|
1756
2290
|
|
|
1757
2291
|
// src/commands/te-analysis/governance/index.ts
|
|
1758
|
-
var
|
|
2292
|
+
var commands12 = [
|
|
1759
2293
|
analysisMetaAssetUsageList,
|
|
1760
2294
|
analysisMetaAssetUsageExport,
|
|
1761
2295
|
analysisMetaAssetBatchInfoExport,
|
|
@@ -1777,7 +2311,7 @@ var commands11 = [
|
|
|
1777
2311
|
analysisMetaAssetOperationRecordList,
|
|
1778
2312
|
analysisMetaAssetOperationRecordExport
|
|
1779
2313
|
];
|
|
1780
|
-
var governance_default =
|
|
2314
|
+
var governance_default = commands12;
|
|
1781
2315
|
|
|
1782
2316
|
// src/commands/te-analysis/report/list.ts
|
|
1783
2317
|
var reportList = createAnalysisCapabilityCommand({
|
|
@@ -1785,8 +2319,9 @@ var reportList = createAnalysisCapabilityCommand({
|
|
|
1785
2319
|
command: "list",
|
|
1786
2320
|
capabilityId: "analysis.report.list",
|
|
1787
2321
|
description: "List analysis reports visible to the current user through the capability gateway.",
|
|
1788
|
-
flags: [projectIdFlag,
|
|
2322
|
+
flags: [projectIdFlag, queriesFlag, fieldsFlag, reportModelTypesFlag, reportListLimitFlag, directoryOffsetFlag],
|
|
1789
2323
|
risk: "read",
|
|
2324
|
+
validate: validateQueriesFlag,
|
|
1790
2325
|
buildInput: reportListInput
|
|
1791
2326
|
});
|
|
1792
2327
|
|
|
@@ -1795,10 +2330,11 @@ var reportListExport = createAnalysisCapabilityCommand({
|
|
|
1795
2330
|
resource: "report",
|
|
1796
2331
|
command: "list-export",
|
|
1797
2332
|
capabilityId: "analysis.report.list_export",
|
|
2333
|
+
asyncArtifact: true,
|
|
1798
2334
|
description: "Export the accessible report catalog as a gzip artifact.",
|
|
1799
2335
|
flags: [
|
|
1800
2336
|
projectIdFlag,
|
|
1801
|
-
|
|
2337
|
+
queriesFlag,
|
|
1802
2338
|
fieldsFlag,
|
|
1803
2339
|
reportModelTypesFlag,
|
|
1804
2340
|
requestIdFlag,
|
|
@@ -1806,9 +2342,10 @@ var reportListExport = createAnalysisCapabilityCommand({
|
|
|
1806
2342
|
asyncTimeoutSecondsFlag
|
|
1807
2343
|
],
|
|
1808
2344
|
risk: "read",
|
|
2345
|
+
validate: validateQueriesFlag,
|
|
1809
2346
|
buildInput: (ctx) => compactInput({
|
|
1810
2347
|
...projectInput(ctx),
|
|
1811
|
-
|
|
2348
|
+
queries: optionalQueries(ctx),
|
|
1812
2349
|
fields: optionalJson(ctx, "fields"),
|
|
1813
2350
|
model_types: optionalJson(ctx, "model-types"),
|
|
1814
2351
|
...exportLifecycleInput(ctx)
|
|
@@ -1850,7 +2387,7 @@ var REPORT_WRITE_MODEL_TYPE_VALUES = [
|
|
|
1850
2387
|
"tag"
|
|
1851
2388
|
];
|
|
1852
2389
|
var REPORT_WRITE_MODEL_DESCRIPTION = `${AI_MODEL_DESCRIPTION} Report create/update also supports tag for saved tag report data; use tag as the AI-facing spelling.`;
|
|
1853
|
-
var AI_DEFINITION_DESCRIPTION = 'AI-facing model definition JSON. Do not pass raw QP, events, event_view, visual_view, or analysis_query. For path definitions, global filters support user_property, cluster, and tag only; event_property is not supported. session_unit accepts second (1..999), minute (1..999), or hour (1..24). Do not use day; express one day as session_interval=24 and session_unit=hour. For SQL, a simple query is {"sql":"select ..."}; raw variables use ${name}, while typed params use ${Text:name}, ${Selector:name}, or ${PartDate:name}. PartDate expands to a complete predicate, so write WHERE ${PartDate:d}, not a column followed by the placeholder. A part_date parameter may set boolean use_timezone; it defaults to false and controls whether that parameter uses the query effective timezone. Selector value must match one options[].value. Trino identifiers containing #, $, @, spaces, or
|
|
2390
|
+
var AI_DEFINITION_DESCRIPTION = 'AI-facing model definition JSON. Do not pass raw QP, events, event_view, visual_view, or analysis_query. Distribution filters must be attached to the corresponding distribution_metrics[].filters; do not use top-level filters or relation. For path definitions, global filters support user_property, cluster, and tag only; event_property is not supported. session_unit accepts second (1..999), minute (1..999), or hour (1..24). Do not use day; express one day as session_interval=24 and session_unit=hour. For SQL, a simple query is {"sql":"select ..."}; raw variables use ${name}, while typed params use ${Text:name}, ${Selector:name}, or ${PartDate:name}. PartDate expands to a complete predicate, so write WHERE ${PartDate:d}, not a column followed by the placeholder. A part_date parameter may set boolean use_timezone; it defaults to false and controls whether that parameter uses the query effective timezone. Selector value must match one options[].value. Trino identifiers containing #, $, @, spaces, punctuation, or a reserved word must be delimited with double quotes, for example SELECT "#user_id", "$part_event", "end" FROM ...; single quotes are string literals. For multiline SQL JSON, the decoded sql value must contain a real line break; do not submit a literal \\n sequence outside quoted SQL text. Queries against an event table must include a date-partition predicate on the quoted "$part_date" column, for example WHERE "$part_date" BETWEEN \'2026-07-01\' AND \'2026-07-07\'; the backend rejects event-table SQL without it. The CLI preserves SQL text and never auto-quotes identifiers.';
|
|
1854
2391
|
var REPORT_WRITE_DEFINITION_DESCRIPTION = `${AI_DEFINITION_DESCRIPTION} For model_type=tag, pass a tag report intent such as {"tag":{"tag_name":"vip_users","time_range":{"mode":"recent","unit":"day","value":7}}}. Tags are supported for report create/update and report data, not ad-hoc analysis.`;
|
|
1855
2392
|
function aiModelTypeFlag(required) {
|
|
1856
2393
|
return {
|
|
@@ -1884,6 +2421,21 @@ function reportWriteDefinitionFlag(required) {
|
|
|
1884
2421
|
desc: REPORT_WRITE_DEFINITION_DESCRIPTION
|
|
1885
2422
|
};
|
|
1886
2423
|
}
|
|
2424
|
+
var metadataResolutionsFlag = {
|
|
2425
|
+
name: "resolutions",
|
|
2426
|
+
type: "json",
|
|
2427
|
+
required: false,
|
|
2428
|
+
desc: "Optional user-confirmed metadata bindings keyed by compiler error path. Each value requires raw_value, resource_type, and resource_key. Reuse the unchanged definition and only pass values explicitly confirmed by the user."
|
|
2429
|
+
};
|
|
2430
|
+
var reportMetadataResolutionsFlag = {
|
|
2431
|
+
...metadataResolutionsFlag,
|
|
2432
|
+
desc: `${metadataResolutionsFlag.desc} This option is not supported with --model-type tag.`
|
|
2433
|
+
};
|
|
2434
|
+
function validateReportMetadataResolutions(ctx) {
|
|
2435
|
+
if (ctx.json("resolutions") !== void 0 && ctx.str("model-type") === "tag") {
|
|
2436
|
+
throw new Error("--resolutions is not supported with --model-type tag.");
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
1887
2439
|
|
|
1888
2440
|
// src/commands/te-analysis/report/create.ts
|
|
1889
2441
|
var reportCreate = createAnalysisCapabilityCommand({
|
|
@@ -1896,17 +2448,20 @@ var reportCreate = createAnalysisCapabilityCommand({
|
|
|
1896
2448
|
{ name: "report-name", type: "string", required: true, desc: "Report display name." },
|
|
1897
2449
|
reportWriteModelTypeFlag(true),
|
|
1898
2450
|
reportWriteDefinitionFlag(true),
|
|
2451
|
+
reportMetadataResolutionsFlag,
|
|
1899
2452
|
{ name: "report-desc", type: "string", required: false, desc: "Optional report description." },
|
|
1900
2453
|
{ name: "cache-seconds", type: "number", required: false, desc: "Optional cache duration in seconds." },
|
|
1901
2454
|
{ name: "query-duration-ms", type: "number", required: false, desc: "Optional last query duration in milliseconds." },
|
|
1902
2455
|
{ name: "dashboard-ids", type: "json", required: false, desc: "Optional dashboard ID array to associate after creation." }
|
|
1903
2456
|
],
|
|
1904
2457
|
risk: "write",
|
|
2458
|
+
validate: validateReportMetadataResolutions,
|
|
1905
2459
|
buildInput: (ctx) => compactInput({
|
|
1906
2460
|
...projectInput(ctx),
|
|
1907
2461
|
report_name: ctx.str("report-name"),
|
|
1908
2462
|
model_type: ctx.str("model-type"),
|
|
1909
2463
|
definition: ctx.json("definition"),
|
|
2464
|
+
resolutions: optionalJson(ctx, "resolutions"),
|
|
1910
2465
|
report_desc: optionalString(ctx, "report-desc"),
|
|
1911
2466
|
cache_seconds: optionalNumber(ctx, "cache-seconds"),
|
|
1912
2467
|
query_duration_ms: optionalNumber(ctx, "query-duration-ms"),
|
|
@@ -1917,6 +2472,7 @@ var reportCreate = createAnalysisCapabilityCommand({
|
|
|
1917
2472
|
// src/commands/te-analysis/report/update.ts
|
|
1918
2473
|
function validateReportUpdate(ctx) {
|
|
1919
2474
|
const hasDefinition = ctx.str("definition") !== "";
|
|
2475
|
+
const hasResolutions = ctx.json("resolutions") !== void 0;
|
|
1920
2476
|
const hasMetadataUpdate = ctx.str("report-name") !== "" || ctx.str("report-desc") !== "";
|
|
1921
2477
|
if (!hasDefinition && !hasMetadataUpdate) {
|
|
1922
2478
|
throw new Error("At least one of --report-name, --report-desc, or --definition is required.");
|
|
@@ -1924,6 +2480,10 @@ function validateReportUpdate(ctx) {
|
|
|
1924
2480
|
if (hasDefinition && ctx.str("model-type") === "") {
|
|
1925
2481
|
throw new Error("--model-type is required when --definition is provided.");
|
|
1926
2482
|
}
|
|
2483
|
+
if (hasResolutions && !hasDefinition) {
|
|
2484
|
+
throw new Error("--resolutions requires --definition.");
|
|
2485
|
+
}
|
|
2486
|
+
validateReportMetadataResolutions(ctx);
|
|
1927
2487
|
}
|
|
1928
2488
|
var reportUpdate = createAnalysisCapabilityCommand({
|
|
1929
2489
|
resource: "report",
|
|
@@ -1938,6 +2498,7 @@ var reportUpdate = createAnalysisCapabilityCommand({
|
|
|
1938
2498
|
{ name: "report-desc", type: "string", required: false, desc: "New report description." },
|
|
1939
2499
|
reportWriteModelTypeFlag(false),
|
|
1940
2500
|
reportWriteDefinitionFlag(false),
|
|
2501
|
+
reportMetadataResolutionsFlag,
|
|
1941
2502
|
{ name: "cache-seconds", type: "number", required: false, desc: "Optional cache duration in seconds." },
|
|
1942
2503
|
{ name: "query-duration-ms", type: "number", required: false, desc: "Optional last query duration in milliseconds." }
|
|
1943
2504
|
],
|
|
@@ -1951,6 +2512,7 @@ var reportUpdate = createAnalysisCapabilityCommand({
|
|
|
1951
2512
|
report_desc: optionalString(ctx, "report-desc"),
|
|
1952
2513
|
model_type: optionalString(ctx, "model-type"),
|
|
1953
2514
|
definition: optionalJson(ctx, "definition"),
|
|
2515
|
+
resolutions: optionalJson(ctx, "resolutions"),
|
|
1954
2516
|
cache_seconds: optionalNumber(ctx, "cache-seconds"),
|
|
1955
2517
|
query_duration_ms: optionalNumber(ctx, "query-duration-ms")
|
|
1956
2518
|
})
|
|
@@ -1971,7 +2533,7 @@ var reportDelete = createAnalysisCapabilityCommand({
|
|
|
1971
2533
|
});
|
|
1972
2534
|
|
|
1973
2535
|
// src/commands/te-analysis/report/index.ts
|
|
1974
|
-
var
|
|
2536
|
+
var commands13 = [
|
|
1975
2537
|
reportList,
|
|
1976
2538
|
reportListExport,
|
|
1977
2539
|
reportGet,
|
|
@@ -1979,7 +2541,7 @@ var commands12 = [
|
|
|
1979
2541
|
reportUpdate,
|
|
1980
2542
|
reportDelete
|
|
1981
2543
|
];
|
|
1982
|
-
var report_default =
|
|
2544
|
+
var report_default = commands13;
|
|
1983
2545
|
|
|
1984
2546
|
// src/commands/te-analysis/report-data/shared.ts
|
|
1985
2547
|
var reportDataZoneOffsetDescription = "Query execution timezone. Omit it to match the report UI for the current user (user selection when available, otherwise project default). Use a fixed UTC offset from -12 through 14, or 99 for local-time mode with no conversion to one fixed UTC offset; 99 is not UTC+99. This is not persisted in the report definition.";
|
|
@@ -1998,14 +2560,13 @@ function reportDataInput(ctx) {
|
|
|
1998
2560
|
slave_cluster_id: optionalString(ctx, "slave-cluster-id"),
|
|
1999
2561
|
zone_offset: optionalNumber(ctx, "zone-offset"),
|
|
2000
2562
|
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
2001
|
-
|
|
2563
|
+
preview_rows: optionalNumber(ctx, "preview-rows"),
|
|
2002
2564
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds")
|
|
2003
2565
|
});
|
|
2004
2566
|
}
|
|
2005
2567
|
function reportDataExportInput(ctx) {
|
|
2006
2568
|
return compactInput({
|
|
2007
2569
|
...reportDataInput(ctx),
|
|
2008
|
-
limit: void 0,
|
|
2009
2570
|
...exportLifecycleInput(ctx)
|
|
2010
2571
|
});
|
|
2011
2572
|
}
|
|
@@ -2030,13 +2591,12 @@ var reportDataRun = createAnalysisCapabilityCommand({
|
|
|
2030
2591
|
slaveClusterIdFlag,
|
|
2031
2592
|
{ name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
|
|
2032
2593
|
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
2033
|
-
|
|
2594
|
+
analysisModelPreviewRowsFlag,
|
|
2034
2595
|
syncTimeoutSecondsFlag
|
|
2035
2596
|
],
|
|
2036
2597
|
risk: "read",
|
|
2037
2598
|
validate: validateClusterQueryRouting,
|
|
2038
|
-
buildInput: reportDataInput
|
|
2039
|
-
postProcess: applyAnalysisInlineLimit
|
|
2599
|
+
buildInput: reportDataInput
|
|
2040
2600
|
});
|
|
2041
2601
|
|
|
2042
2602
|
// src/commands/te-analysis/report-data/export.ts
|
|
@@ -2044,6 +2604,7 @@ var reportDataExport = createAnalysisCapabilityCommand({
|
|
|
2044
2604
|
resource: "report-data",
|
|
2045
2605
|
command: "export",
|
|
2046
2606
|
capabilityId: "analysis.report_data.export",
|
|
2607
|
+
asyncArtifact: true,
|
|
2047
2608
|
description: `Submit report data as an asynchronous gzip artifact. Override contract: SQL uses only --sql-params; non-SQL analysis models use filters/group/time; tag uses its saved tag definition. Mixed-model batches are best-effort. Exports do not create interactive drilldown contexts. ${analysisDataExportRoutingHelp}`,
|
|
2048
2609
|
flags: [
|
|
2049
2610
|
projectIdFlag,
|
|
@@ -2068,11 +2629,11 @@ var reportDataExport = createAnalysisCapabilityCommand({
|
|
|
2068
2629
|
});
|
|
2069
2630
|
|
|
2070
2631
|
// src/commands/te-analysis/report-data/index.ts
|
|
2071
|
-
var
|
|
2632
|
+
var commands14 = [
|
|
2072
2633
|
reportDataRun,
|
|
2073
2634
|
reportDataExport
|
|
2074
2635
|
];
|
|
2075
|
-
var report_data_default =
|
|
2636
|
+
var report_data_default = commands14;
|
|
2076
2637
|
|
|
2077
2638
|
// src/commands/te-analysis/report-change-log/list.ts
|
|
2078
2639
|
var reportChangeLogList = createAnalysisCapabilityCommand({
|
|
@@ -2108,11 +2669,11 @@ var reportChangeLogGet = createAnalysisCapabilityCommand({
|
|
|
2108
2669
|
});
|
|
2109
2670
|
|
|
2110
2671
|
// src/commands/te-analysis/report-change-log/index.ts
|
|
2111
|
-
var
|
|
2672
|
+
var commands15 = [
|
|
2112
2673
|
reportChangeLogList,
|
|
2113
2674
|
reportChangeLogGet
|
|
2114
2675
|
];
|
|
2115
|
-
var report_change_log_default =
|
|
2676
|
+
var report_change_log_default = commands15;
|
|
2116
2677
|
|
|
2117
2678
|
// src/commands/te-analysis/report-version/rollback.ts
|
|
2118
2679
|
var reportVersionRollback = createAnalysisCapabilityCommand({
|
|
@@ -2134,10 +2695,10 @@ var reportVersionRollback = createAnalysisCapabilityCommand({
|
|
|
2134
2695
|
});
|
|
2135
2696
|
|
|
2136
2697
|
// src/commands/te-analysis/report-version/index.ts
|
|
2137
|
-
var
|
|
2698
|
+
var commands16 = [
|
|
2138
2699
|
reportVersionRollback
|
|
2139
2700
|
];
|
|
2140
|
-
var report_version_default =
|
|
2701
|
+
var report_version_default = commands16;
|
|
2141
2702
|
|
|
2142
2703
|
// src/commands/te-analysis/report-abnormal/get.ts
|
|
2143
2704
|
var reportAbnormalGet = createAnalysisCapabilityCommand({
|
|
@@ -2154,10 +2715,10 @@ var reportAbnormalGet = createAnalysisCapabilityCommand({
|
|
|
2154
2715
|
});
|
|
2155
2716
|
|
|
2156
2717
|
// src/commands/te-analysis/report-abnormal/index.ts
|
|
2157
|
-
var
|
|
2718
|
+
var commands17 = [
|
|
2158
2719
|
reportAbnormalGet
|
|
2159
2720
|
];
|
|
2160
|
-
var report_abnormal_default =
|
|
2721
|
+
var report_abnormal_default = commands17;
|
|
2161
2722
|
|
|
2162
2723
|
// src/commands/te-analysis/dashboard/list.ts
|
|
2163
2724
|
var dashboardList = createAnalysisCapabilityCommand({
|
|
@@ -2167,7 +2728,7 @@ var dashboardList = createAnalysisCapabilityCommand({
|
|
|
2167
2728
|
description: "List dashboards visible to the current user through the capability gateway.",
|
|
2168
2729
|
flags: [
|
|
2169
2730
|
projectIdFlag,
|
|
2170
|
-
|
|
2731
|
+
queriesFlag,
|
|
2171
2732
|
{
|
|
2172
2733
|
name: "fields",
|
|
2173
2734
|
type: "json",
|
|
@@ -2176,9 +2737,10 @@ var dashboardList = createAnalysisCapabilityCommand({
|
|
|
2176
2737
|
alias: "f"
|
|
2177
2738
|
},
|
|
2178
2739
|
directoryLimitFlag,
|
|
2179
|
-
|
|
2740
|
+
directoryOffsetFlag
|
|
2180
2741
|
],
|
|
2181
2742
|
risk: "read",
|
|
2743
|
+
validate: validateQueriesFlag,
|
|
2182
2744
|
buildInput: listInput
|
|
2183
2745
|
});
|
|
2184
2746
|
|
|
@@ -2406,7 +2968,7 @@ var dashboardTaskStatus = createAnalysisCapabilityCommand({
|
|
|
2406
2968
|
});
|
|
2407
2969
|
|
|
2408
2970
|
// src/commands/te-analysis/dashboard/index.ts
|
|
2409
|
-
var
|
|
2971
|
+
var commands18 = [
|
|
2410
2972
|
dashboardList,
|
|
2411
2973
|
dashboardCreate,
|
|
2412
2974
|
dashboardGet,
|
|
@@ -2420,7 +2982,7 @@ var commands17 = [
|
|
|
2420
2982
|
dashboardAbnormalGet,
|
|
2421
2983
|
dashboardTaskStatus
|
|
2422
2984
|
];
|
|
2423
|
-
var dashboard_default =
|
|
2985
|
+
var dashboard_default = commands18;
|
|
2424
2986
|
|
|
2425
2987
|
// src/commands/te-analysis/dashboard-report/add.ts
|
|
2426
2988
|
var dashboardReportAdd = createAnalysisCapabilityCommand({
|
|
@@ -2442,10 +3004,10 @@ var dashboardReportAdd = createAnalysisCapabilityCommand({
|
|
|
2442
3004
|
});
|
|
2443
3005
|
|
|
2444
3006
|
// src/commands/te-analysis/dashboard-report/index.ts
|
|
2445
|
-
var
|
|
3007
|
+
var commands19 = [
|
|
2446
3008
|
dashboardReportAdd
|
|
2447
3009
|
];
|
|
2448
|
-
var dashboard_report_default =
|
|
3010
|
+
var dashboard_report_default = commands19;
|
|
2449
3011
|
|
|
2450
3012
|
// src/commands/te-analysis/dashboard-report-data/run.ts
|
|
2451
3013
|
var dashboardReportDataRun = createAnalysisCapabilityCommand({
|
|
@@ -2465,13 +3027,12 @@ var dashboardReportDataRun = createAnalysisCapabilityCommand({
|
|
|
2465
3027
|
{ name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
|
|
2466
3028
|
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
2467
3029
|
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
2468
|
-
|
|
2469
|
-
|
|
3030
|
+
analysisModelPreviewRowsFlag,
|
|
3031
|
+
dashboardSyncTimeoutSecondsFlag
|
|
2470
3032
|
],
|
|
2471
3033
|
risk: "read",
|
|
2472
3034
|
validate: validateClusterQueryRouting,
|
|
2473
|
-
buildInput: dashboardReportDataInput
|
|
2474
|
-
postProcess: applyAnalysisInlineLimit
|
|
3035
|
+
buildInput: dashboardReportDataInput
|
|
2475
3036
|
});
|
|
2476
3037
|
|
|
2477
3038
|
// src/commands/te-analysis/dashboard-report-data/export.ts
|
|
@@ -2479,6 +3040,7 @@ var dashboardReportDataExport = createAnalysisCapabilityCommand({
|
|
|
2479
3040
|
resource: "dashboard-report-data",
|
|
2480
3041
|
command: "export",
|
|
2481
3042
|
capabilityId: "analysis.dashboard_report_data.export",
|
|
3043
|
+
asyncArtifact: true,
|
|
2482
3044
|
description: `Submit dashboard report data as an asynchronous gzip JSONL artifact. Filters and time overrides do not apply to SQL reports; the artifact still contains data plus structured warnings. Exports do not create interactive drilldown contexts. ${analysisDataExportRoutingHelp}`,
|
|
2483
3045
|
flags: [
|
|
2484
3046
|
projectIdFlag,
|
|
@@ -2501,11 +3063,11 @@ var dashboardReportDataExport = createAnalysisCapabilityCommand({
|
|
|
2501
3063
|
});
|
|
2502
3064
|
|
|
2503
3065
|
// src/commands/te-analysis/dashboard-report-data/index.ts
|
|
2504
|
-
var
|
|
3066
|
+
var commands20 = [
|
|
2505
3067
|
dashboardReportDataRun,
|
|
2506
3068
|
dashboardReportDataExport
|
|
2507
3069
|
];
|
|
2508
|
-
var dashboard_report_data_default =
|
|
3070
|
+
var dashboard_report_data_default = commands20;
|
|
2509
3071
|
|
|
2510
3072
|
// src/commands/te-analysis/query/cancel.ts
|
|
2511
3073
|
var queryCancel = createAnalysisCapabilityCommand({
|
|
@@ -2529,13 +3091,13 @@ var sourceFlag = {
|
|
|
2529
3091
|
name: "source",
|
|
2530
3092
|
type: "json",
|
|
2531
3093
|
required: false,
|
|
2532
|
-
desc: "Source selector copied from sources[] when the synchronous preview contains multiple reports or charts. Pass
|
|
3094
|
+
desc: "Source selector copied from the compact sources[] summary when the synchronous preview contains multiple reports or charts. Pass exactly one returned field: report_id or chart_id."
|
|
2533
3095
|
};
|
|
2534
3096
|
var coordinateFlag = {
|
|
2535
3097
|
name: "coordinate",
|
|
2536
3098
|
type: "json",
|
|
2537
3099
|
required: true,
|
|
2538
|
-
desc: "One semantic cell coordinate assembled only from
|
|
3100
|
+
desc: "One semantic cell coordinate assembled only from row_options, column_options, and metric_options returned by analysis query-context get. Never pass target_id, raw QP, or inferred values."
|
|
2539
3101
|
};
|
|
2540
3102
|
var propertiesFlag = {
|
|
2541
3103
|
name: "properties",
|
|
@@ -2600,11 +3162,44 @@ var queryCreateResultCluster = createAnalysisCapabilityCommand({
|
|
|
2600
3162
|
});
|
|
2601
3163
|
|
|
2602
3164
|
// src/commands/te-analysis/query/index.ts
|
|
2603
|
-
var
|
|
3165
|
+
var commands21 = [
|
|
2604
3166
|
queryCancel,
|
|
2605
3167
|
queryCreateResultCluster
|
|
2606
3168
|
];
|
|
2607
|
-
var query_default =
|
|
3169
|
+
var query_default = commands21;
|
|
3170
|
+
|
|
3171
|
+
// src/commands/te-analysis/query-context/get.ts
|
|
3172
|
+
var queryContextGet = createAnalysisCapabilityCommand({
|
|
3173
|
+
resource: "query-context",
|
|
3174
|
+
command: "get",
|
|
3175
|
+
capabilityId: "analysis.query.context_get",
|
|
3176
|
+
description: "Read full selectable row, column, and metric coordinate options for one source from a synchronous analysis query context.",
|
|
3177
|
+
flags: [
|
|
3178
|
+
projectIdFlag,
|
|
3179
|
+
{
|
|
3180
|
+
name: "query-context-id",
|
|
3181
|
+
type: "string",
|
|
3182
|
+
required: true,
|
|
3183
|
+
desc: "query_context_id returned by a synchronous analysis preview."
|
|
3184
|
+
},
|
|
3185
|
+
{
|
|
3186
|
+
name: "source",
|
|
3187
|
+
type: "json",
|
|
3188
|
+
required: false,
|
|
3189
|
+
desc: "Source selector copied from the compact sources[] summary. Required for multi-source contexts; pass exactly one field: report_id or chart_id."
|
|
3190
|
+
}
|
|
3191
|
+
],
|
|
3192
|
+
risk: "read",
|
|
3193
|
+
buildInput: (ctx) => compactInput({
|
|
3194
|
+
project_id: ctx.num("project-id"),
|
|
3195
|
+
query_context_id: ctx.str("query-context-id"),
|
|
3196
|
+
source: optionalJson(ctx, "source")
|
|
3197
|
+
})
|
|
3198
|
+
});
|
|
3199
|
+
|
|
3200
|
+
// src/commands/te-analysis/query-context/index.ts
|
|
3201
|
+
var commands22 = [queryContextGet];
|
|
3202
|
+
var query_context_default = commands22;
|
|
2608
3203
|
|
|
2609
3204
|
// src/commands/te-analysis/run/inspect.ts
|
|
2610
3205
|
var runInspect = {
|
|
@@ -2634,15 +3229,76 @@ var runInspect = {
|
|
|
2634
3229
|
}
|
|
2635
3230
|
};
|
|
2636
3231
|
|
|
3232
|
+
// src/commands/te-analysis/run/wait.ts
|
|
3233
|
+
var runWait = {
|
|
3234
|
+
service: "analysis",
|
|
3235
|
+
resource: "run",
|
|
3236
|
+
command: "wait",
|
|
3237
|
+
description: "Resume waiting for an async run; optionally stream its completed artifact to a local file.",
|
|
3238
|
+
flags: [
|
|
3239
|
+
{ name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." },
|
|
3240
|
+
{ name: "wait-timeout-seconds", type: "number", required: false, min: 1, max: 21600, desc: "Maximum time this CLI process waits. Default: 600 seconds; expiry never cancels the remote run." },
|
|
3241
|
+
{ name: "output", type: "string", required: false, desc: "After success, stream the artifact to this local file." },
|
|
3242
|
+
{ name: "force", type: "boolean", required: false, desc: "Allow --output to atomically replace an existing file." }
|
|
3243
|
+
],
|
|
3244
|
+
risk: "read",
|
|
3245
|
+
validate: (ctx) => validateLifecycleFlags(ctx, true),
|
|
3246
|
+
dryRun: (ctx) => ({
|
|
3247
|
+
method: "GET",
|
|
3248
|
+
url: buildCapabilityGatewayUrl(
|
|
3249
|
+
ctx.host(),
|
|
3250
|
+
resolveGatewayDomain("analysis"),
|
|
3251
|
+
`runs/${encodeURIComponent(ctx.str("run-id"))}`
|
|
3252
|
+
),
|
|
3253
|
+
wait_until_terminal: true,
|
|
3254
|
+
wait_timeout_seconds: clientWaitTimeoutSeconds(ctx),
|
|
3255
|
+
...ctx.str("output") ? { output_path: ctx.str("output") } : {}
|
|
3256
|
+
}),
|
|
3257
|
+
execute: async (ctx) => {
|
|
3258
|
+
validateLifecycleFlags(ctx, true);
|
|
3259
|
+
const runId = ctx.str("run-id");
|
|
3260
|
+
const output = ctx.str("output");
|
|
3261
|
+
if (output) await assertOutputPathAvailable(output, ctx.bool("force"), { run_id: runId });
|
|
3262
|
+
return withInterruptSignal(async (signal) => {
|
|
3263
|
+
const descriptor = await waitForAnalysisRun(ctx.host(), runId, {
|
|
3264
|
+
signal,
|
|
3265
|
+
waitTimeoutSeconds: clientWaitTimeoutSeconds(ctx)
|
|
3266
|
+
});
|
|
3267
|
+
if (!output) return descriptor;
|
|
3268
|
+
const artifactId = artifactIdFrom(descriptor);
|
|
3269
|
+
if (!artifactId) {
|
|
3270
|
+
throw new CapabilityGatewayError(
|
|
3271
|
+
`Completed async run ${runId} has no artifact_id.`,
|
|
3272
|
+
"ASYNC_RUN_PROTOCOL_ERROR",
|
|
3273
|
+
502,
|
|
3274
|
+
`Inspect with: ae-cli analysis run inspect --run-id ${runId}`,
|
|
3275
|
+
{ run_id: runId }
|
|
3276
|
+
);
|
|
3277
|
+
}
|
|
3278
|
+
const download = await downloadAnalysisArtifact(
|
|
3279
|
+
ctx.host(),
|
|
3280
|
+
runId,
|
|
3281
|
+
artifactId,
|
|
3282
|
+
output,
|
|
3283
|
+
{ force: ctx.bool("force"), signal, ensureReady: false }
|
|
3284
|
+
);
|
|
3285
|
+
return { ...descriptor, ...download };
|
|
3286
|
+
}, runId);
|
|
3287
|
+
}
|
|
3288
|
+
};
|
|
3289
|
+
function artifactIdFrom(descriptor) {
|
|
3290
|
+
return descriptor.artifact_id ?? descriptor.artifact?.artifact_id ?? descriptor.artifact?.id;
|
|
3291
|
+
}
|
|
3292
|
+
|
|
2637
3293
|
// src/commands/te-analysis/run/index.ts
|
|
2638
|
-
var
|
|
2639
|
-
runInspect
|
|
3294
|
+
var commands23 = [
|
|
3295
|
+
runInspect,
|
|
3296
|
+
runWait
|
|
2640
3297
|
];
|
|
2641
|
-
var run_default =
|
|
3298
|
+
var run_default = commands23;
|
|
2642
3299
|
|
|
2643
3300
|
// src/commands/te-analysis/artifact/download.ts
|
|
2644
|
-
import {
|
|
2645
|
-
import { dirname, resolve } from "path";
|
|
3301
|
+
import { resolve as resolve3 } from "path";
|
|
2646
3302
|
function artifactPath(runId, artifactId) {
|
|
2647
3303
|
return `runs/${encodeURIComponent(runId)}/artifacts/${encodeURIComponent(artifactId)}/download`;
|
|
2648
3304
|
}
|
|
@@ -2650,13 +3306,15 @@ var artifactDownload = {
|
|
|
2650
3306
|
service: "analysis",
|
|
2651
3307
|
resource: "artifact",
|
|
2652
3308
|
command: "download",
|
|
2653
|
-
description: "
|
|
3309
|
+
description: "Stream a completed analysis capability-gateway artifact to a local file by its bound run_id/artifact_id pair.",
|
|
2654
3310
|
flags: [
|
|
2655
3311
|
{ name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." },
|
|
2656
3312
|
{ name: "artifact-id", type: "string", required: true, desc: "Artifact ID returned by the same export capability." },
|
|
2657
|
-
{ name: "output", type: "string", required: true, desc: "Local output file path.
|
|
3313
|
+
{ name: "output", type: "string", required: true, desc: "Local output file path. Existing paths are refused unless --force is passed." },
|
|
3314
|
+
{ name: "force", type: "boolean", required: false, desc: "Atomically replace an existing output file." }
|
|
2658
3315
|
],
|
|
2659
3316
|
risk: "read",
|
|
3317
|
+
validate: validateLifecycleFlags,
|
|
2660
3318
|
dryRun: (ctx) => ({
|
|
2661
3319
|
method: "GET",
|
|
2662
3320
|
url: buildCapabilityGatewayUrl(
|
|
@@ -2664,72 +3322,30 @@ var artifactDownload = {
|
|
|
2664
3322
|
resolveGatewayDomain("analysis"),
|
|
2665
3323
|
artifactPath(ctx.str("run-id"), ctx.str("artifact-id"))
|
|
2666
3324
|
),
|
|
2667
|
-
output_path:
|
|
3325
|
+
output_path: resolve3(ctx.str("output")),
|
|
3326
|
+
...ctx.bool("force") ? { force: true } : {}
|
|
2668
3327
|
}),
|
|
2669
3328
|
execute: async (ctx) => {
|
|
3329
|
+
validateLifecycleFlags(ctx);
|
|
2670
3330
|
const runId = ctx.str("run-id");
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
artifact_id: artifactId,
|
|
2681
|
-
output_path: outputPath,
|
|
2682
|
-
bytes: bytes.length,
|
|
2683
|
-
content_type: resp.headers.get("content-type") ?? void 0,
|
|
2684
|
-
content_encoding: resp.headers.get("content-encoding") ?? void 0,
|
|
2685
|
-
content_disposition: resp.headers.get("content-disposition") ?? void 0
|
|
2686
|
-
};
|
|
2687
|
-
}
|
|
2688
|
-
};
|
|
2689
|
-
async function ensureArtifactReady(host, runId, artifactId) {
|
|
2690
|
-
const descriptor = await inspectRun(host, runId);
|
|
2691
|
-
if (descriptor.artifact_id && descriptor.artifact_id !== artifactId) {
|
|
2692
|
-
throw new CapabilityGatewayError(
|
|
2693
|
-
`artifact_id ${artifactId} does not belong to run_id ${runId}`,
|
|
2694
|
-
"ARTIFACT_RUN_MISMATCH",
|
|
2695
|
-
400,
|
|
2696
|
-
"Use the run_id and artifact_id pair from the same export response."
|
|
3331
|
+
return withInterruptSignal(
|
|
3332
|
+
(signal) => downloadAnalysisArtifact(
|
|
3333
|
+
ctx.host(),
|
|
3334
|
+
runId,
|
|
3335
|
+
ctx.str("artifact-id"),
|
|
3336
|
+
ctx.str("output"),
|
|
3337
|
+
{ force: ctx.bool("force"), signal }
|
|
3338
|
+
),
|
|
3339
|
+
runId
|
|
2697
3340
|
);
|
|
2698
3341
|
}
|
|
2699
|
-
|
|
2700
|
-
return;
|
|
2701
|
-
}
|
|
2702
|
-
const reason = descriptor.error_message ? `; error=${descriptor.error_message}` : "";
|
|
2703
|
-
throw new CapabilityGatewayError(
|
|
2704
|
-
`Artifact is not ready: run_status=${descriptor.status ?? "UNKNOWN"}, artifact_status=${descriptor.artifact_status ?? "UNKNOWN"}${reason}`,
|
|
2705
|
-
"ARTIFACT_NOT_READY",
|
|
2706
|
-
409,
|
|
2707
|
-
"Run ae-cli analysis run inspect --run-id <run_id> until status=SUCCEEDED and artifact_status=COMPLETED, then retry artifact download. If status is FAILED or CANCELED, do not retry download."
|
|
2708
|
-
);
|
|
2709
|
-
}
|
|
2710
|
-
async function inspectRun(host, runId) {
|
|
2711
|
-
return await requestCapabilityGateway(
|
|
2712
|
-
host,
|
|
2713
|
-
resolveGatewayDomain("analysis"),
|
|
2714
|
-
`runs/${encodeURIComponent(runId)}`
|
|
2715
|
-
);
|
|
2716
|
-
}
|
|
2717
|
-
async function fetchArtifact(host, runId, artifactId) {
|
|
2718
|
-
return fetchCapabilityGateway(
|
|
2719
|
-
host,
|
|
2720
|
-
resolveGatewayDomain("analysis"),
|
|
2721
|
-
artifactPath(runId, artifactId),
|
|
2722
|
-
"GET",
|
|
2723
|
-
void 0,
|
|
2724
|
-
"application/octet-stream"
|
|
2725
|
-
);
|
|
2726
|
-
}
|
|
3342
|
+
};
|
|
2727
3343
|
|
|
2728
3344
|
// src/commands/te-analysis/artifact/index.ts
|
|
2729
|
-
var
|
|
3345
|
+
var commands24 = [
|
|
2730
3346
|
artifactDownload
|
|
2731
3347
|
];
|
|
2732
|
-
var artifact_default =
|
|
3348
|
+
var artifact_default = commands24;
|
|
2733
3349
|
|
|
2734
3350
|
// src/commands/te-analysis/adhoc/shared.ts
|
|
2735
3351
|
var useCacheFlag2 = {
|
|
@@ -2749,13 +3365,14 @@ function adhocRunInput(ctx) {
|
|
|
2749
3365
|
project_id: ctx.num("project-id"),
|
|
2750
3366
|
model_type: ctx.str("model-type"),
|
|
2751
3367
|
definition: ctx.json("definition"),
|
|
3368
|
+
resolutions: optionalJson(ctx, "resolutions"),
|
|
2752
3369
|
request_id: optionalString(ctx, "request-id"),
|
|
2753
3370
|
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
2754
3371
|
zone_offset: optionalNumber(ctx, "zone-offset"),
|
|
2755
3372
|
fields: optionalJsonArray(ctx, "fields"),
|
|
2756
3373
|
cluster_query_scope: optionalString(ctx, "cluster-query-scope"),
|
|
2757
3374
|
slave_cluster_id: optionalString(ctx, "slave-cluster-id"),
|
|
2758
|
-
|
|
3375
|
+
preview_rows: optionalNumber(ctx, "preview-rows"),
|
|
2759
3376
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds")
|
|
2760
3377
|
});
|
|
2761
3378
|
}
|
|
@@ -2764,6 +3381,7 @@ function adhocExportInput(ctx) {
|
|
|
2764
3381
|
project_id: ctx.num("project-id"),
|
|
2765
3382
|
model_type: ctx.str("model-type"),
|
|
2766
3383
|
definition: ctx.json("definition"),
|
|
3384
|
+
resolutions: optionalJson(ctx, "resolutions"),
|
|
2767
3385
|
request_id: optionalString(ctx, "request-id"),
|
|
2768
3386
|
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
2769
3387
|
zone_offset: optionalNumber(ctx, "zone-offset"),
|
|
@@ -2778,6 +3396,7 @@ var adhocBaseFlags = [
|
|
|
2778
3396
|
projectIdFlag,
|
|
2779
3397
|
aiModelTypeFlag(true),
|
|
2780
3398
|
aiDefinitionFlag(true),
|
|
3399
|
+
metadataResolutionsFlag,
|
|
2781
3400
|
requestIdFlag,
|
|
2782
3401
|
useCacheFlag2,
|
|
2783
3402
|
zoneOffsetFlag2,
|
|
@@ -2785,6 +3404,10 @@ var adhocBaseFlags = [
|
|
|
2785
3404
|
clusterQueryScopeFlag,
|
|
2786
3405
|
slaveClusterIdFlag
|
|
2787
3406
|
];
|
|
3407
|
+
var adhocRunFlags = [
|
|
3408
|
+
...adhocBaseFlags,
|
|
3409
|
+
analysisModelPreviewRowsFlag
|
|
3410
|
+
];
|
|
2788
3411
|
var adhocExportFlags = [
|
|
2789
3412
|
...adhocBaseFlags,
|
|
2790
3413
|
artifactFormatFlag,
|
|
@@ -2798,14 +3421,12 @@ var adhocRun = createAnalysisCapabilityCommand({
|
|
|
2798
3421
|
capabilityId: "analysis.adhoc.run",
|
|
2799
3422
|
description: `Run one unified ad-hoc analysis from an AI-facing model definition. Supports 12 AI-facing models: 9 common models plus 3 scenario models. Tags and cohorts/clusters are separate capabilities, not ad-hoc model_type values. Returns query_context_id for Redis-backed query follow-ups. ${analysisDataRunRoutingHelp}`,
|
|
2800
3423
|
flags: [
|
|
2801
|
-
...
|
|
2802
|
-
syncLimitFlag,
|
|
3424
|
+
...adhocRunFlags,
|
|
2803
3425
|
syncTimeoutSecondsFlag
|
|
2804
3426
|
],
|
|
2805
3427
|
risk: "read",
|
|
2806
3428
|
validate: validateClusterQueryRouting,
|
|
2807
|
-
buildInput: adhocRunInput
|
|
2808
|
-
postProcess: applyAnalysisInlineLimit
|
|
3429
|
+
buildInput: adhocRunInput
|
|
2809
3430
|
});
|
|
2810
3431
|
|
|
2811
3432
|
// src/commands/te-analysis/adhoc/export.ts
|
|
@@ -2813,6 +3434,7 @@ var adhocExport = createAnalysisCapabilityCommand({
|
|
|
2813
3434
|
resource: "adhoc",
|
|
2814
3435
|
command: "export",
|
|
2815
3436
|
capabilityId: "analysis.adhoc.export",
|
|
3437
|
+
asyncArtifact: true,
|
|
2816
3438
|
description: `Submit one unified ad-hoc analysis export from an AI-facing model definition. Returns run_id/artifact_id plus the actual format, compression, file_name, content_type, and content_encoding. Exports do not create interactive drilldown contexts. ${analysisDataExportRoutingHelp}`,
|
|
2817
3439
|
flags: [
|
|
2818
3440
|
...adhocExportFlags
|
|
@@ -2823,11 +3445,11 @@ var adhocExport = createAnalysisCapabilityCommand({
|
|
|
2823
3445
|
});
|
|
2824
3446
|
|
|
2825
3447
|
// src/commands/te-analysis/adhoc/index.ts
|
|
2826
|
-
var
|
|
3448
|
+
var commands25 = [
|
|
2827
3449
|
adhocRun,
|
|
2828
3450
|
adhocExport
|
|
2829
3451
|
];
|
|
2830
|
-
var adhoc_default =
|
|
3452
|
+
var adhoc_default = commands25;
|
|
2831
3453
|
|
|
2832
3454
|
// src/commands/te-analysis/dashboard-definition/export.ts
|
|
2833
3455
|
var dashboardDefinitionExport = createAnalysisCapabilityCommand({
|
|
@@ -2882,11 +3504,11 @@ var dashboardDefinitionImport = createAnalysisCapabilityCommand({
|
|
|
2882
3504
|
});
|
|
2883
3505
|
|
|
2884
3506
|
// src/commands/te-analysis/dashboard-definition/index.ts
|
|
2885
|
-
var
|
|
3507
|
+
var commands26 = [
|
|
2886
3508
|
dashboardDefinitionExport,
|
|
2887
3509
|
dashboardDefinitionImport
|
|
2888
3510
|
];
|
|
2889
|
-
var dashboard_definition_default =
|
|
3511
|
+
var dashboard_definition_default = commands26;
|
|
2890
3512
|
|
|
2891
3513
|
// src/commands/te-analysis/dashboard-daily-report/get.ts
|
|
2892
3514
|
var dashboardDailyReportGet = createAnalysisCapabilityCommand({
|
|
@@ -3070,13 +3692,13 @@ var dashboardDailyReportSendStatus = createAnalysisCapabilityCommand({
|
|
|
3070
3692
|
});
|
|
3071
3693
|
|
|
3072
3694
|
// src/commands/te-analysis/dashboard-daily-report/index.ts
|
|
3073
|
-
var
|
|
3695
|
+
var commands27 = [
|
|
3074
3696
|
dashboardDailyReportGet,
|
|
3075
3697
|
dashboardDailyReportUpdate,
|
|
3076
3698
|
dashboardDailyReportSend,
|
|
3077
3699
|
dashboardDailyReportSendStatus
|
|
3078
3700
|
];
|
|
3079
|
-
var dashboard_daily_report_default =
|
|
3701
|
+
var dashboard_daily_report_default = commands27;
|
|
3080
3702
|
|
|
3081
3703
|
// src/commands/te-analysis/bi-panel/list.ts
|
|
3082
3704
|
var biPanelList = createAnalysisCapabilityCommand({
|
|
@@ -3084,8 +3706,9 @@ var biPanelList = createAnalysisCapabilityCommand({
|
|
|
3084
3706
|
command: "list",
|
|
3085
3707
|
capabilityId: "analysis.bi_panel.list",
|
|
3086
3708
|
description: "List BI panels visible to the current user through the capability gateway.",
|
|
3087
|
-
flags: [projectIdFlag,
|
|
3709
|
+
flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
|
|
3088
3710
|
risk: "read",
|
|
3711
|
+
validate: validateQueriesFlag,
|
|
3089
3712
|
buildInput: listInput
|
|
3090
3713
|
});
|
|
3091
3714
|
|
|
@@ -3203,7 +3826,7 @@ var biPanelCopy = createAnalysisCapabilityCommand({
|
|
|
3203
3826
|
});
|
|
3204
3827
|
|
|
3205
3828
|
// src/commands/te-analysis/bi-panel/index.ts
|
|
3206
|
-
var
|
|
3829
|
+
var commands28 = [
|
|
3207
3830
|
biPanelList,
|
|
3208
3831
|
biPanelGet,
|
|
3209
3832
|
biPanelCreate,
|
|
@@ -3212,7 +3835,7 @@ var commands26 = [
|
|
|
3212
3835
|
biPanelShare,
|
|
3213
3836
|
biPanelCopy
|
|
3214
3837
|
];
|
|
3215
|
-
var bi_panel_default =
|
|
3838
|
+
var bi_panel_default = commands28;
|
|
3216
3839
|
|
|
3217
3840
|
// src/commands/te-analysis/bi-panel-version/get.ts
|
|
3218
3841
|
var biPanelVersionGet = createAnalysisCapabilityCommand({
|
|
@@ -3259,18 +3882,18 @@ var biPanelVersionPublish = createAnalysisCapabilityCommand({
|
|
|
3259
3882
|
});
|
|
3260
3883
|
|
|
3261
3884
|
// src/commands/te-analysis/bi-panel-version/index.ts
|
|
3262
|
-
var
|
|
3885
|
+
var commands29 = [
|
|
3263
3886
|
biPanelVersionGet,
|
|
3264
3887
|
biPanelVersionPublish
|
|
3265
3888
|
];
|
|
3266
|
-
var bi_panel_version_default =
|
|
3889
|
+
var bi_panel_version_default = commands29;
|
|
3267
3890
|
|
|
3268
3891
|
// src/commands/te-analysis/bi-panel-page-data/run.ts
|
|
3269
3892
|
var biPanelPageDataRun = createAnalysisCapabilityCommand({
|
|
3270
3893
|
resource: "bi-panel-page-data",
|
|
3271
3894
|
command: "run",
|
|
3272
3895
|
capabilityId: "analysis.bi_panel_page_data.run",
|
|
3273
|
-
description: `Run a
|
|
3896
|
+
description: `Run a BI panel page query with the same chart result cap as the UI and return has_more when that cap is reached. BI SQL chart data does not support analysis model drilldown or result-cluster creation. ${analysisDataRunRoutingHelp}`,
|
|
3274
3897
|
flags: [
|
|
3275
3898
|
projectIdFlag,
|
|
3276
3899
|
{ name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
|
|
@@ -3281,18 +3904,13 @@ var biPanelPageDataRun = createAnalysisCapabilityCommand({
|
|
|
3281
3904
|
{ name: "permission-controls", type: "json", required: false, desc: "Optional permission control array." },
|
|
3282
3905
|
{ name: "chart-filter-controls", type: "json", required: false, desc: "Optional chart filter control array." },
|
|
3283
3906
|
{ name: "columns", type: "json", required: false, desc: "Optional returned column array." },
|
|
3284
|
-
{ name: "row-limit", type: "number", required: false, desc: "BI chart row window control. Default: 100, max: 1000. This is chart paging, not the sync/export routing policy.", min: 1, max: 1e3 },
|
|
3285
|
-
{ name: "row-offset", type: "number", required: false, desc: "Chart row offset." },
|
|
3286
|
-
{ name: "block-limit", type: "number", required: false, desc: "Summary block limit." },
|
|
3287
|
-
{ name: "block-offset", type: "number", required: false, desc: "Summary block offset." },
|
|
3288
3907
|
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
3289
3908
|
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
3290
|
-
|
|
3291
|
-
|
|
3909
|
+
previewRowsFlag,
|
|
3910
|
+
syncTimeoutSecondsFlag
|
|
3292
3911
|
],
|
|
3293
3912
|
risk: "read",
|
|
3294
|
-
buildInput: biPanelPageDataInput
|
|
3295
|
-
postProcess: applyAnalysisInlineLimit
|
|
3913
|
+
buildInput: biPanelPageDataInput
|
|
3296
3914
|
});
|
|
3297
3915
|
|
|
3298
3916
|
// src/commands/te-analysis/bi-panel-page-data/export.ts
|
|
@@ -3300,21 +3918,18 @@ var biPanelPageDataExport = createAnalysisCapabilityCommand({
|
|
|
3300
3918
|
resource: "bi-panel-page-data",
|
|
3301
3919
|
command: "export",
|
|
3302
3920
|
capabilityId: "analysis.bi_panel_page_data.export",
|
|
3303
|
-
|
|
3921
|
+
asyncArtifact: true,
|
|
3922
|
+
description: `Stream complete BI panel chart data into an asynchronous gzip JSONL artifact under Common's full-download row cap. BI SQL chart exports do not create analysis drilldown contexts. ${analysisDataExportRoutingHelp}`,
|
|
3304
3923
|
flags: [
|
|
3305
3924
|
projectIdFlag,
|
|
3306
3925
|
{ name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
|
|
3307
3926
|
{ name: "page-key", type: "string", required: true, desc: "Page key returned by bi-panel get." },
|
|
3308
|
-
{ name: "result-type", type: "string", required: true, desc: "
|
|
3927
|
+
{ name: "result-type", type: "string", required: true, desc: "Must be charts. Summary is presentation data and is available only from run." },
|
|
3309
3928
|
{ name: "chart-ids", type: "json", required: false, desc: "Optional chart ID array." },
|
|
3310
3929
|
{ name: "parameter-controls", type: "json", required: false, desc: "Optional parameter control override array." },
|
|
3311
3930
|
{ name: "permission-controls", type: "json", required: false, desc: "Optional permission control array." },
|
|
3312
3931
|
{ name: "chart-filter-controls", type: "json", required: false, desc: "Optional chart filter control array." },
|
|
3313
3932
|
{ name: "columns", type: "json", required: false, desc: "Optional returned column array." },
|
|
3314
|
-
{ name: "row-limit", type: "number", required: false, desc: "BI chart row window control. Default: 100, max: 1000. This is chart paging, not the async artifact total-row policy.", min: 1, max: 1e3 },
|
|
3315
|
-
{ name: "row-offset", type: "number", required: false, desc: "Chart row offset." },
|
|
3316
|
-
{ name: "block-limit", type: "number", required: false, desc: "Summary block limit." },
|
|
3317
|
-
{ name: "block-offset", type: "number", required: false, desc: "Summary block offset." },
|
|
3318
3933
|
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
3319
3934
|
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
3320
3935
|
asyncTimeoutSecondsFlag,
|
|
@@ -3325,11 +3940,11 @@ var biPanelPageDataExport = createAnalysisCapabilityCommand({
|
|
|
3325
3940
|
});
|
|
3326
3941
|
|
|
3327
3942
|
// src/commands/te-analysis/bi-panel-page-data/index.ts
|
|
3328
|
-
var
|
|
3943
|
+
var commands30 = [
|
|
3329
3944
|
biPanelPageDataRun,
|
|
3330
3945
|
biPanelPageDataExport
|
|
3331
3946
|
];
|
|
3332
|
-
var bi_panel_page_data_default =
|
|
3947
|
+
var bi_panel_page_data_default = commands30;
|
|
3333
3948
|
|
|
3334
3949
|
// src/commands/te-analysis/project-space/list.ts
|
|
3335
3950
|
var projectSpaceList = createAnalysisCapabilityCommand({
|
|
@@ -3337,8 +3952,9 @@ var projectSpaceList = createAnalysisCapabilityCommand({
|
|
|
3337
3952
|
command: "list",
|
|
3338
3953
|
capabilityId: "analysis.project_space.list",
|
|
3339
3954
|
description: "List project spaces visible to the current user.",
|
|
3340
|
-
flags: [projectIdFlag,
|
|
3955
|
+
flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
|
|
3341
3956
|
risk: "read",
|
|
3957
|
+
validate: validateQueriesFlag,
|
|
3342
3958
|
buildInput: listInput
|
|
3343
3959
|
});
|
|
3344
3960
|
|
|
@@ -3358,11 +3974,11 @@ var projectSpaceGet = createAnalysisCapabilityCommand({
|
|
|
3358
3974
|
});
|
|
3359
3975
|
|
|
3360
3976
|
// src/commands/te-analysis/project-space/index.ts
|
|
3361
|
-
var
|
|
3977
|
+
var commands31 = [
|
|
3362
3978
|
projectSpaceList,
|
|
3363
3979
|
projectSpaceGet
|
|
3364
3980
|
];
|
|
3365
|
-
var project_space_default =
|
|
3981
|
+
var project_space_default = commands31;
|
|
3366
3982
|
|
|
3367
3983
|
// src/commands/te-analysis/favorite/add.ts
|
|
3368
3984
|
var favoriteAdd = createAnalysisCapabilityCommand({
|
|
@@ -3372,20 +3988,16 @@ var favoriteAdd = createAnalysisCapabilityCommand({
|
|
|
3372
3988
|
description: "Favorite one dashboard, BI panel, or folder.",
|
|
3373
3989
|
flags: [
|
|
3374
3990
|
projectIdFlag,
|
|
3375
|
-
{ name: "asset-id", type: "number", required:
|
|
3376
|
-
{ name: "asset-type", type: "string", required:
|
|
3377
|
-
{ name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." }
|
|
3378
|
-
{ name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
|
|
3379
|
-
payloadFlag
|
|
3991
|
+
{ name: "asset-id", type: "number", required: true, desc: "Dashboard, BI panel, or folder ID." },
|
|
3992
|
+
{ name: "asset-type", type: "string", required: true, desc: "Asset type: dashboard, bi_panel, or folder." },
|
|
3993
|
+
{ name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." }
|
|
3380
3994
|
],
|
|
3381
3995
|
risk: "write",
|
|
3382
3996
|
buildInput: (ctx) => compactInput({
|
|
3383
3997
|
...projectInput(ctx),
|
|
3384
|
-
asset_id:
|
|
3385
|
-
asset_type:
|
|
3386
|
-
space_id: optionalNumber(ctx, "space-id")
|
|
3387
|
-
id: optionalNumber(ctx, "id"),
|
|
3388
|
-
payload: optionalJson(ctx, "payload")
|
|
3998
|
+
asset_id: ctx.num("asset-id"),
|
|
3999
|
+
asset_type: ctx.str("asset-type"),
|
|
4000
|
+
space_id: optionalNumber(ctx, "space-id")
|
|
3389
4001
|
})
|
|
3390
4002
|
});
|
|
3391
4003
|
|
|
@@ -3397,29 +4009,25 @@ var favoriteRemove = createAnalysisCapabilityCommand({
|
|
|
3397
4009
|
description: "Remove favorite from one dashboard, BI panel, or folder.",
|
|
3398
4010
|
flags: [
|
|
3399
4011
|
projectIdFlag,
|
|
3400
|
-
{ name: "asset-id", type: "number", required:
|
|
3401
|
-
{ name: "asset-type", type: "string", required:
|
|
3402
|
-
{ name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." }
|
|
3403
|
-
{ name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
|
|
3404
|
-
payloadFlag
|
|
4012
|
+
{ name: "asset-id", type: "number", required: true, desc: "Dashboard, BI panel, or folder ID." },
|
|
4013
|
+
{ name: "asset-type", type: "string", required: true, desc: "Asset type: dashboard, bi_panel, or folder." },
|
|
4014
|
+
{ name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." }
|
|
3405
4015
|
],
|
|
3406
4016
|
risk: "write",
|
|
3407
4017
|
buildInput: (ctx) => compactInput({
|
|
3408
4018
|
...projectInput(ctx),
|
|
3409
|
-
asset_id:
|
|
3410
|
-
asset_type:
|
|
3411
|
-
space_id: optionalNumber(ctx, "space-id")
|
|
3412
|
-
id: optionalNumber(ctx, "id"),
|
|
3413
|
-
payload: optionalJson(ctx, "payload")
|
|
4019
|
+
asset_id: ctx.num("asset-id"),
|
|
4020
|
+
asset_type: ctx.str("asset-type"),
|
|
4021
|
+
space_id: optionalNumber(ctx, "space-id")
|
|
3414
4022
|
})
|
|
3415
4023
|
});
|
|
3416
4024
|
|
|
3417
4025
|
// src/commands/te-analysis/favorite/index.ts
|
|
3418
|
-
var
|
|
4026
|
+
var commands32 = [
|
|
3419
4027
|
favoriteAdd,
|
|
3420
4028
|
favoriteRemove
|
|
3421
4029
|
];
|
|
3422
|
-
var favorite_default =
|
|
4030
|
+
var favorite_default = commands32;
|
|
3423
4031
|
|
|
3424
4032
|
// src/commands/te-analysis/public-link/create.ts
|
|
3425
4033
|
var publicLinkCreate = createAnalysisCapabilityCommand({
|
|
@@ -3458,8 +4066,9 @@ var publicLinkList = createAnalysisCapabilityCommand({
|
|
|
3458
4066
|
command: "list",
|
|
3459
4067
|
capabilityId: "analysis.public_link.list",
|
|
3460
4068
|
description: "List public links in a project.",
|
|
3461
|
-
flags: [projectIdFlag,
|
|
4069
|
+
flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
|
|
3462
4070
|
risk: "read",
|
|
4071
|
+
validate: validateQueriesFlag,
|
|
3463
4072
|
buildInput: listInput
|
|
3464
4073
|
});
|
|
3465
4074
|
|
|
@@ -3535,14 +4144,14 @@ var publicLinkDelete = createAnalysisCapabilityCommand({
|
|
|
3535
4144
|
});
|
|
3536
4145
|
|
|
3537
4146
|
// src/commands/te-analysis/public-link/index.ts
|
|
3538
|
-
var
|
|
4147
|
+
var commands33 = [
|
|
3539
4148
|
publicLinkCreate,
|
|
3540
4149
|
publicLinkList,
|
|
3541
4150
|
publicLinkUpdate,
|
|
3542
4151
|
publicLinkOffline,
|
|
3543
4152
|
publicLinkDelete
|
|
3544
4153
|
];
|
|
3545
|
-
var public_link_default =
|
|
4154
|
+
var public_link_default = commands33;
|
|
3546
4155
|
|
|
3547
4156
|
// src/commands/te-analysis/filter-value/list.ts
|
|
3548
4157
|
var filterValueList = createAnalysisCapabilityCommand({
|
|
@@ -3576,8 +4185,8 @@ var filterValueList = createAnalysisCapabilityCommand({
|
|
|
3576
4185
|
});
|
|
3577
4186
|
|
|
3578
4187
|
// src/commands/te-analysis/filter-value/index.ts
|
|
3579
|
-
var
|
|
3580
|
-
var filter_value_default =
|
|
4188
|
+
var commands34 = [filterValueList];
|
|
4189
|
+
var filter_value_default = commands34;
|
|
3581
4190
|
|
|
3582
4191
|
// src/commands/te-analysis/event-detail/shared.ts
|
|
3583
4192
|
var eventDetailDefinitionFlag = {
|
|
@@ -3586,6 +4195,12 @@ var eventDetailDefinitionFlag = {
|
|
|
3586
4195
|
required: true,
|
|
3587
4196
|
desc: 'AI-facing event detail definition: {"event":"login","time_range":{"mode":"absolute","start_time":"2026-07-01 00:00:00","end_time":"2026-07-01 23:59:59"},"filters":{"relation":"and","items":[{"field":{"name":"country","type":"user_property"},"operator":"eq","values":["US"]}]},"properties":["#event_time",{"name":"country","type":"user_property"}],"sort":[{"field":"#event_time","order":"desc"}]}. Do not pass raw QP/eventView/taFilters.'
|
|
3588
4197
|
};
|
|
4198
|
+
var eventDetailArtifactFormatFlag = {
|
|
4199
|
+
name: "artifact-format",
|
|
4200
|
+
type: "string",
|
|
4201
|
+
required: false,
|
|
4202
|
+
desc: "Native streaming artifact format: jsonl or csv. Default: jsonl."
|
|
4203
|
+
};
|
|
3589
4204
|
function eventDetailRunInput(ctx) {
|
|
3590
4205
|
return compactInput({
|
|
3591
4206
|
project_id: ctx.num("project-id"),
|
|
@@ -3593,18 +4208,22 @@ function eventDetailRunInput(ctx) {
|
|
|
3593
4208
|
request_id: optionalString(ctx, "request-id"),
|
|
3594
4209
|
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
3595
4210
|
zone_offset: optionalNumber(ctx, "zone-offset"),
|
|
3596
|
-
|
|
4211
|
+
preview_rows: optionalNumber(ctx, "preview-rows"),
|
|
3597
4212
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds")
|
|
3598
4213
|
});
|
|
3599
4214
|
}
|
|
3600
4215
|
function eventDetailExportInput(ctx) {
|
|
4216
|
+
const format = optionalString(ctx, "artifact-format");
|
|
4217
|
+
if (format !== void 0 && format !== "jsonl" && format !== "csv") {
|
|
4218
|
+
throw new Error("--artifact-format only supports jsonl or csv for event detail export");
|
|
4219
|
+
}
|
|
3601
4220
|
return compactInput({
|
|
3602
4221
|
project_id: ctx.num("project-id"),
|
|
3603
4222
|
definition: ctx.json("definition"),
|
|
3604
4223
|
request_id: optionalString(ctx, "request-id"),
|
|
3605
4224
|
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
3606
4225
|
zone_offset: optionalNumber(ctx, "zone-offset"),
|
|
3607
|
-
format
|
|
4226
|
+
format,
|
|
3608
4227
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds")
|
|
3609
4228
|
});
|
|
3610
4229
|
}
|
|
@@ -3617,7 +4236,7 @@ var eventDetailBaseFlags = [
|
|
|
3617
4236
|
];
|
|
3618
4237
|
var eventDetailExportFlags = [
|
|
3619
4238
|
...eventDetailBaseFlags,
|
|
3620
|
-
|
|
4239
|
+
eventDetailArtifactFormatFlag,
|
|
3621
4240
|
asyncTimeoutSecondsFlag
|
|
3622
4241
|
];
|
|
3623
4242
|
|
|
@@ -3629,12 +4248,11 @@ var eventDetailRun = createAnalysisCapabilityCommand({
|
|
|
3629
4248
|
description: `Run a bounded event detail query from an AI-facing definition. ${analysisDataRunRoutingHelp}`,
|
|
3630
4249
|
flags: [
|
|
3631
4250
|
...eventDetailBaseFlags,
|
|
3632
|
-
|
|
4251
|
+
previewRowsFlag,
|
|
3633
4252
|
syncTimeoutSecondsFlag
|
|
3634
4253
|
],
|
|
3635
4254
|
risk: "read",
|
|
3636
|
-
buildInput: eventDetailRunInput
|
|
3637
|
-
postProcess: applyAnalysisInlineLimit
|
|
4255
|
+
buildInput: eventDetailRunInput
|
|
3638
4256
|
});
|
|
3639
4257
|
|
|
3640
4258
|
// src/commands/te-analysis/event-detail/export.ts
|
|
@@ -3642,7 +4260,8 @@ var eventDetailExport = createAnalysisCapabilityCommand({
|
|
|
3642
4260
|
resource: "event-detail",
|
|
3643
4261
|
command: "export",
|
|
3644
4262
|
capabilityId: "analysis.event_detail.export",
|
|
3645
|
-
|
|
4263
|
+
asyncArtifact: true,
|
|
4264
|
+
description: "Export complete event detail data through the native Trino JSONL or CSV stream as an asynchronous gzip artifact. Default: JSONL.",
|
|
3646
4265
|
flags: [
|
|
3647
4266
|
...eventDetailExportFlags
|
|
3648
4267
|
],
|
|
@@ -3651,11 +4270,11 @@ var eventDetailExport = createAnalysisCapabilityCommand({
|
|
|
3651
4270
|
});
|
|
3652
4271
|
|
|
3653
4272
|
// src/commands/te-analysis/event-detail/index.ts
|
|
3654
|
-
var
|
|
4273
|
+
var commands35 = [
|
|
3655
4274
|
eventDetailRun,
|
|
3656
4275
|
eventDetailExport
|
|
3657
4276
|
];
|
|
3658
|
-
var event_detail_default =
|
|
4277
|
+
var event_detail_default = commands35;
|
|
3659
4278
|
|
|
3660
4279
|
// src/commands/te-analysis/entity-detail/shared.ts
|
|
3661
4280
|
var entityDetailDefinitionFlag = {
|
|
@@ -3664,6 +4283,12 @@ var entityDetailDefinitionFlag = {
|
|
|
3664
4283
|
required: true,
|
|
3665
4284
|
desc: 'Bounded entity detail definition. properties is supported only for entity="user" (#user_id); user rows always include #user_id, #account_id, and #distinct_id plus requested user properties. Custom entities reject properties and return only their entity value column. cohort is AI-facing for user_property/tag/cluster filters; do not pass raw QP.'
|
|
3666
4285
|
};
|
|
4286
|
+
var entityDetailArtifactFormatFlag = {
|
|
4287
|
+
name: "artifact-format",
|
|
4288
|
+
type: "string",
|
|
4289
|
+
required: false,
|
|
4290
|
+
desc: "Native streaming artifact format: jsonl or csv. Default: jsonl."
|
|
4291
|
+
};
|
|
3667
4292
|
function entityDetailRunInput(ctx) {
|
|
3668
4293
|
return compactInput({
|
|
3669
4294
|
project_id: ctx.num("project-id"),
|
|
@@ -3671,18 +4296,22 @@ function entityDetailRunInput(ctx) {
|
|
|
3671
4296
|
request_id: optionalString(ctx, "request-id"),
|
|
3672
4297
|
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
3673
4298
|
zone_offset: optionalNumber(ctx, "zone-offset"),
|
|
3674
|
-
|
|
4299
|
+
preview_rows: optionalNumber(ctx, "preview-rows"),
|
|
3675
4300
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds")
|
|
3676
4301
|
});
|
|
3677
4302
|
}
|
|
3678
4303
|
function entityDetailExportInput(ctx) {
|
|
4304
|
+
const format = optionalString(ctx, "artifact-format");
|
|
4305
|
+
if (format !== void 0 && format !== "jsonl" && format !== "csv") {
|
|
4306
|
+
throw new Error("--artifact-format only supports jsonl or csv for entity detail export");
|
|
4307
|
+
}
|
|
3679
4308
|
return compactInput({
|
|
3680
4309
|
project_id: ctx.num("project-id"),
|
|
3681
4310
|
definition: ctx.json("definition"),
|
|
3682
4311
|
request_id: optionalString(ctx, "request-id"),
|
|
3683
4312
|
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
3684
4313
|
zone_offset: optionalNumber(ctx, "zone-offset"),
|
|
3685
|
-
format
|
|
4314
|
+
format,
|
|
3686
4315
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds")
|
|
3687
4316
|
});
|
|
3688
4317
|
}
|
|
@@ -3695,7 +4324,7 @@ var entityDetailBaseFlags = [
|
|
|
3695
4324
|
];
|
|
3696
4325
|
var entityDetailExportFlags = [
|
|
3697
4326
|
...entityDetailBaseFlags,
|
|
3698
|
-
|
|
4327
|
+
entityDetailArtifactFormatFlag,
|
|
3699
4328
|
asyncTimeoutSecondsFlag
|
|
3700
4329
|
];
|
|
3701
4330
|
|
|
@@ -3707,12 +4336,11 @@ var entityDetailRun = createAnalysisCapabilityCommand({
|
|
|
3707
4336
|
description: `Run a bounded entity detail query from a cluster cohort definition. ${analysisDataRunRoutingHelp}`,
|
|
3708
4337
|
flags: [
|
|
3709
4338
|
...entityDetailBaseFlags,
|
|
3710
|
-
|
|
4339
|
+
previewRowsFlag,
|
|
3711
4340
|
syncTimeoutSecondsFlag
|
|
3712
4341
|
],
|
|
3713
4342
|
risk: "read",
|
|
3714
|
-
buildInput: entityDetailRunInput
|
|
3715
|
-
postProcess: applyAnalysisInlineLimit
|
|
4343
|
+
buildInput: entityDetailRunInput
|
|
3716
4344
|
});
|
|
3717
4345
|
|
|
3718
4346
|
// src/commands/te-analysis/entity-detail/export.ts
|
|
@@ -3720,7 +4348,8 @@ var entityDetailExport = createAnalysisCapabilityCommand({
|
|
|
3720
4348
|
resource: "entity-detail",
|
|
3721
4349
|
command: "export",
|
|
3722
4350
|
capabilityId: "analysis.entity_detail.export",
|
|
3723
|
-
|
|
4351
|
+
asyncArtifact: true,
|
|
4352
|
+
description: "Export complete entity detail data through the native Trino JSONL or CSV stream as an asynchronous gzip artifact. Default: JSONL.",
|
|
3724
4353
|
flags: [
|
|
3725
4354
|
...entityDetailExportFlags
|
|
3726
4355
|
],
|
|
@@ -3729,11 +4358,11 @@ var entityDetailExport = createAnalysisCapabilityCommand({
|
|
|
3729
4358
|
});
|
|
3730
4359
|
|
|
3731
4360
|
// src/commands/te-analysis/entity-detail/index.ts
|
|
3732
|
-
var
|
|
4361
|
+
var commands36 = [
|
|
3733
4362
|
entityDetailRun,
|
|
3734
4363
|
entityDetailExport
|
|
3735
4364
|
];
|
|
3736
|
-
var entity_detail_default =
|
|
4365
|
+
var entity_detail_default = commands36;
|
|
3737
4366
|
|
|
3738
4367
|
// src/commands/te-analysis/drilldown-events/shared.ts
|
|
3739
4368
|
var queryContextIdFlag = {
|
|
@@ -3750,7 +4379,7 @@ var drilldownEventsRunFlags = [
|
|
|
3750
4379
|
propertiesFlag,
|
|
3751
4380
|
requestIdFlag,
|
|
3752
4381
|
useCacheFlag,
|
|
3753
|
-
|
|
4382
|
+
previewRowsFlag,
|
|
3754
4383
|
syncTimeoutSecondsFlag
|
|
3755
4384
|
];
|
|
3756
4385
|
var csvArtifactFormatFlag = {
|
|
@@ -3779,7 +4408,7 @@ function drilldownEventsRunInput(ctx) {
|
|
|
3779
4408
|
properties: optionalJson(ctx, "properties"),
|
|
3780
4409
|
request_id: optionalString(ctx, "request-id"),
|
|
3781
4410
|
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
3782
|
-
|
|
4411
|
+
preview_rows: optionalNumber(ctx, "preview-rows"),
|
|
3783
4412
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds")
|
|
3784
4413
|
});
|
|
3785
4414
|
}
|
|
@@ -3802,6 +4431,7 @@ var drilldownEventsExport = createAnalysisCapabilityCommand({
|
|
|
3802
4431
|
resource: "drilldown-events",
|
|
3803
4432
|
command: "export",
|
|
3804
4433
|
capabilityId: "analysis.query.drilldown_events_export",
|
|
4434
|
+
asyncArtifact: true,
|
|
3805
4435
|
description: `Stream all raw events behind one synchronous event-analysis cell into one csv.gz artifact. ${analysisDataExportRoutingHelp}`,
|
|
3806
4436
|
flags: [...drilldownEventsExportFlags],
|
|
3807
4437
|
risk: "read",
|
|
@@ -3816,13 +4446,12 @@ var drilldownEventsRun = createAnalysisCapabilityCommand({
|
|
|
3816
4446
|
description: `Preview raw events behind one synchronous event-analysis cell whose selected metric advertises drilldown_events. ${analysisDataRunRoutingHelp}`,
|
|
3817
4447
|
flags: [...drilldownEventsRunFlags],
|
|
3818
4448
|
risk: "read",
|
|
3819
|
-
buildInput: drilldownEventsRunInput
|
|
3820
|
-
postProcess: applyAnalysisInlineLimit
|
|
4449
|
+
buildInput: drilldownEventsRunInput
|
|
3821
4450
|
});
|
|
3822
4451
|
|
|
3823
4452
|
// src/commands/te-analysis/drilldown-events/index.ts
|
|
3824
|
-
var
|
|
3825
|
-
var drilldown_events_default =
|
|
4453
|
+
var commands37 = [drilldownEventsRun, drilldownEventsExport];
|
|
4454
|
+
var drilldown_events_default = commands37;
|
|
3826
4455
|
|
|
3827
4456
|
// src/commands/te-analysis/drilldown-entities/shared.ts
|
|
3828
4457
|
var queryContextIdFlag2 = {
|
|
@@ -3848,7 +4477,7 @@ var drilldownEntitiesBaseFlags = [
|
|
|
3848
4477
|
];
|
|
3849
4478
|
var drilldownEntitiesRunFlags = [
|
|
3850
4479
|
...drilldownEntitiesBaseFlags,
|
|
3851
|
-
|
|
4480
|
+
previewRowsFlag,
|
|
3852
4481
|
syncTimeoutSecondsFlag
|
|
3853
4482
|
];
|
|
3854
4483
|
var drilldownEntitiesExportFlags = [
|
|
@@ -3859,7 +4488,7 @@ var drilldownEntitiesExportFlags = [
|
|
|
3859
4488
|
function drilldownEntitiesRunInput(ctx) {
|
|
3860
4489
|
return compactInput({
|
|
3861
4490
|
...baseInput(ctx),
|
|
3862
|
-
|
|
4491
|
+
preview_rows: optionalNumber(ctx, "preview-rows"),
|
|
3863
4492
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds")
|
|
3864
4493
|
});
|
|
3865
4494
|
}
|
|
@@ -3887,6 +4516,7 @@ var drilldownEntitiesExport = createAnalysisCapabilityCommand({
|
|
|
3887
4516
|
resource: "drilldown-entities",
|
|
3888
4517
|
command: "export",
|
|
3889
4518
|
capabilityId: "analysis.query.drilldown_entities_export",
|
|
4519
|
+
asyncArtifact: true,
|
|
3890
4520
|
description: `Stream all users or custom entities behind one synchronous-preview cell into one csv.gz artifact. ${analysisDataExportRoutingHelp}`,
|
|
3891
4521
|
flags: [...drilldownEntitiesExportFlags],
|
|
3892
4522
|
risk: "read",
|
|
@@ -3901,13 +4531,12 @@ var drilldownEntitiesRun = createAnalysisCapabilityCommand({
|
|
|
3901
4531
|
description: `Preview users or custom entities behind one synchronous-preview cell whose metric advertises drilldown_entities. ${analysisDataRunRoutingHelp}`,
|
|
3902
4532
|
flags: [...drilldownEntitiesRunFlags],
|
|
3903
4533
|
risk: "read",
|
|
3904
|
-
buildInput: drilldownEntitiesRunInput
|
|
3905
|
-
postProcess: applyAnalysisInlineLimit
|
|
4534
|
+
buildInput: drilldownEntitiesRunInput
|
|
3906
4535
|
});
|
|
3907
4536
|
|
|
3908
4537
|
// src/commands/te-analysis/drilldown-entities/index.ts
|
|
3909
|
-
var
|
|
3910
|
-
var drilldown_entities_default =
|
|
4538
|
+
var commands38 = [drilldownEntitiesRun, drilldownEntitiesExport];
|
|
4539
|
+
var drilldown_entities_default = commands38;
|
|
3911
4540
|
|
|
3912
4541
|
// src/commands/te-analysis/drilldown-user-events/shared.ts
|
|
3913
4542
|
var drilldownContextIdFlag = {
|
|
@@ -3946,7 +4575,7 @@ var drilldownUserEventsBaseFlags = [
|
|
|
3946
4575
|
];
|
|
3947
4576
|
var drilldownUserEventsRunFlags = [
|
|
3948
4577
|
...drilldownUserEventsBaseFlags,
|
|
3949
|
-
|
|
4578
|
+
previewRowsFlag,
|
|
3950
4579
|
syncTimeoutSecondsFlag
|
|
3951
4580
|
];
|
|
3952
4581
|
var drilldownUserEventsExportFlags = [
|
|
@@ -3957,7 +4586,7 @@ var drilldownUserEventsExportFlags = [
|
|
|
3957
4586
|
function drilldownUserEventsRunInput(ctx) {
|
|
3958
4587
|
return compactInput({
|
|
3959
4588
|
...baseInput2(ctx),
|
|
3960
|
-
|
|
4589
|
+
preview_rows: optionalNumber(ctx, "preview-rows"),
|
|
3961
4590
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds")
|
|
3962
4591
|
});
|
|
3963
4592
|
}
|
|
@@ -3989,6 +4618,7 @@ var drilldownUserEventsExport = createAnalysisCapabilityCommand({
|
|
|
3989
4618
|
resource: "drilldown-user-events",
|
|
3990
4619
|
command: "export",
|
|
3991
4620
|
capabilityId: "analysis.query.drilldown_user_events_export",
|
|
4621
|
+
asyncArtifact: true,
|
|
3992
4622
|
description: `Stream one user's complete event sequence from a drilldown context into one csv.gz artifact. ${analysisDataExportRoutingHelp}`,
|
|
3993
4623
|
flags: [...drilldownUserEventsExportFlags],
|
|
3994
4624
|
risk: "read",
|
|
@@ -4003,13 +4633,12 @@ var drilldownUserEventsRun = createAnalysisCapabilityCommand({
|
|
|
4003
4633
|
description: `Preview one user's event sequence from a drilldown context. Do not pass raw QP. ${analysisDataRunRoutingHelp}`,
|
|
4004
4634
|
flags: [...drilldownUserEventsRunFlags],
|
|
4005
4635
|
risk: "read",
|
|
4006
|
-
buildInput: drilldownUserEventsRunInput
|
|
4007
|
-
postProcess: applyAnalysisInlineLimit
|
|
4636
|
+
buildInput: drilldownUserEventsRunInput
|
|
4008
4637
|
});
|
|
4009
4638
|
|
|
4010
4639
|
// src/commands/te-analysis/drilldown-user-events/index.ts
|
|
4011
|
-
var
|
|
4012
|
-
var drilldown_user_events_default =
|
|
4640
|
+
var commands39 = [drilldownUserEventsRun, drilldownUserEventsExport];
|
|
4641
|
+
var drilldown_user_events_default = commands39;
|
|
4013
4642
|
|
|
4014
4643
|
// src/commands/te-analysis/user/index.ts
|
|
4015
4644
|
import { existsSync, statSync } from "fs";
|
|
@@ -4035,6 +4664,12 @@ var clusterMemberFieldsFlag = {
|
|
|
4035
4664
|
...fieldsFlag,
|
|
4036
4665
|
desc: "Optional result fields. Defaults to #user_id, #account_id, and #distinct_id."
|
|
4037
4666
|
};
|
|
4667
|
+
var memberPreviewRowsFlag = {
|
|
4668
|
+
...previewRowsFlag,
|
|
4669
|
+
max: 1e5,
|
|
4670
|
+
desc: "Maximum business rows returned per result. Default: 1000, matching the UI member query. Maximum: 100000."
|
|
4671
|
+
};
|
|
4672
|
+
var memberDataRunRoutingHelp = "Routing: --preview-rows bounds returned business rows per result; omitting it defaults to 1000 rows, matching the UI member query. Use export for full, unknown-size, timed-out, or long-running data.";
|
|
4038
4673
|
var clusterNameFlag = {
|
|
4039
4674
|
name: "cluster-name",
|
|
4040
4675
|
type: "string",
|
|
@@ -4100,6 +4735,12 @@ var zoneOffsetFlag3 = {
|
|
|
4100
4735
|
required: false,
|
|
4101
4736
|
desc: "Optional timezone offset. UTC+8 is 8; UTC-5 is -5."
|
|
4102
4737
|
};
|
|
4738
|
+
var autoRefreshCronFlag = {
|
|
4739
|
+
name: "auto-refresh-cron",
|
|
4740
|
+
type: "string",
|
|
4741
|
+
required: false,
|
|
4742
|
+
desc: "Optional Quartz cron expression for an existing enabled auto-refresh schedule. This does not enable auto refresh."
|
|
4743
|
+
};
|
|
4103
4744
|
var entityIdFlag = {
|
|
4104
4745
|
name: "entity-id",
|
|
4105
4746
|
type: "number",
|
|
@@ -4171,7 +4812,13 @@ var jsonlArtifactFormatFlag = {
|
|
|
4171
4812
|
name: "artifact-format",
|
|
4172
4813
|
type: "string",
|
|
4173
4814
|
required: false,
|
|
4174
|
-
desc: "Artifact format. Only jsonl is supported for
|
|
4815
|
+
desc: "Artifact format. Only jsonl is supported for history-tag statistics exports."
|
|
4816
|
+
};
|
|
4817
|
+
var memberArtifactFormatFlag = {
|
|
4818
|
+
name: "artifact-format",
|
|
4819
|
+
type: "string",
|
|
4820
|
+
required: false,
|
|
4821
|
+
desc: "Artifact format: jsonl or csv. Default: jsonl. Both formats use native full-download streaming and gzip compression."
|
|
4175
4822
|
};
|
|
4176
4823
|
var confirmedFlag = {
|
|
4177
4824
|
name: "confirmed",
|
|
@@ -4197,7 +4844,7 @@ var groupColFlag = {
|
|
|
4197
4844
|
required: true,
|
|
4198
4845
|
desc: "Exact statistic value or bucket from history-tag-data results to drill down into."
|
|
4199
4846
|
};
|
|
4200
|
-
function capability(resource, command, capabilityId, description, flags, risk, buildInput2) {
|
|
4847
|
+
function capability(resource, command, capabilityId, description, flags, risk, buildInput2, options = {}) {
|
|
4201
4848
|
return createAnalysisCapabilityCommand({
|
|
4202
4849
|
resource,
|
|
4203
4850
|
command,
|
|
@@ -4205,7 +4852,8 @@ function capability(resource, command, capabilityId, description, flags, risk, b
|
|
|
4205
4852
|
description,
|
|
4206
4853
|
flags,
|
|
4207
4854
|
risk,
|
|
4208
|
-
buildInput: buildInput2
|
|
4855
|
+
buildInput: buildInput2,
|
|
4856
|
+
...options
|
|
4209
4857
|
});
|
|
4210
4858
|
}
|
|
4211
4859
|
function idImportCapability(command) {
|
|
@@ -4292,13 +4940,21 @@ function uploadedInputFileId(value) {
|
|
|
4292
4940
|
function assetListInput(ctx) {
|
|
4293
4941
|
return compactInput({
|
|
4294
4942
|
project_id: ctx.num("project-id"),
|
|
4295
|
-
|
|
4943
|
+
queries: optionalQueries(ctx),
|
|
4296
4944
|
fields: optionalJsonArray(ctx, "fields"),
|
|
4297
4945
|
limit: optionalNumber(ctx, "limit"),
|
|
4298
4946
|
offset: optionalNumber(ctx, "offset"),
|
|
4299
4947
|
authenticated_only: optionalBoolean(ctx, "authenticated-only")
|
|
4300
4948
|
});
|
|
4301
4949
|
}
|
|
4950
|
+
function assetExportInput(ctx) {
|
|
4951
|
+
return compactInput({
|
|
4952
|
+
project_id: ctx.num("project-id"),
|
|
4953
|
+
queries: optionalQueries(ctx),
|
|
4954
|
+
fields: optionalJsonArray(ctx, "fields"),
|
|
4955
|
+
authenticated_only: optionalBoolean(ctx, "authenticated-only")
|
|
4956
|
+
});
|
|
4957
|
+
}
|
|
4302
4958
|
function memberInput(ctx, kind, inline) {
|
|
4303
4959
|
return compactInput({
|
|
4304
4960
|
project_id: ctx.num("project-id"),
|
|
@@ -4306,13 +4962,13 @@ function memberInput(ctx, kind, inline) {
|
|
|
4306
4962
|
tag_name: kind === "tag" ? ctx.str("tag-name") : void 0,
|
|
4307
4963
|
snapshot_date: kind === "tag" ? optionalString(ctx, "snapshot-date") : void 0,
|
|
4308
4964
|
property_names: optionalJsonArray(ctx, "property-names"),
|
|
4309
|
-
fields: optionalJsonArray(ctx, "fields"),
|
|
4310
|
-
query: optionalString(ctx, "query"),
|
|
4311
|
-
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
4965
|
+
fields: inline ? optionalJsonArray(ctx, "fields") : void 0,
|
|
4966
|
+
query: inline ? optionalString(ctx, "query") : void 0,
|
|
4967
|
+
use_cache: inline ? optionalBoolean(ctx, "use-cache") : void 0,
|
|
4968
|
+
preview_rows: inline ? optionalNumber(ctx, "preview-rows") : void 0,
|
|
4312
4969
|
request_id: optionalString(ctx, "request-id"),
|
|
4313
4970
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
|
|
4314
|
-
|
|
4315
|
-
format: inline ? void 0 : optionalJsonlFormat(ctx)
|
|
4971
|
+
format: inline ? void 0 : optionalMemberFormat(ctx)
|
|
4316
4972
|
});
|
|
4317
4973
|
}
|
|
4318
4974
|
function clusterWriteInput(ctx, create) {
|
|
@@ -4326,6 +4982,7 @@ function clusterWriteInput(ctx, create) {
|
|
|
4326
4982
|
authenticated_only: optionalBoolean(ctx, "authenticated-only"),
|
|
4327
4983
|
remark: create ? void 0 : optionalString(ctx, "remark"),
|
|
4328
4984
|
zone_offset: optionalNumber(ctx, "zone-offset"),
|
|
4985
|
+
auto_refresh_cron: create ? void 0 : optionalString(ctx, "auto-refresh-cron"),
|
|
4329
4986
|
entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
|
|
4330
4987
|
});
|
|
4331
4988
|
}
|
|
@@ -4340,6 +4997,7 @@ function tagWriteInput(ctx, create) {
|
|
|
4340
4997
|
authenticated_only: optionalBoolean(ctx, "authenticated-only"),
|
|
4341
4998
|
remark: create ? void 0 : optionalString(ctx, "remark"),
|
|
4342
4999
|
zone_offset: optionalNumber(ctx, "zone-offset"),
|
|
5000
|
+
auto_refresh_cron: create ? void 0 : optionalString(ctx, "auto-refresh-cron"),
|
|
4343
5001
|
entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
|
|
4344
5002
|
});
|
|
4345
5003
|
}
|
|
@@ -4377,9 +5035,9 @@ function historyTagDataInput(ctx, inline) {
|
|
|
4377
5035
|
project_id: ctx.num("project-id"),
|
|
4378
5036
|
tag_name: ctx.str("tag-name"),
|
|
4379
5037
|
view: ctx.json("view"),
|
|
5038
|
+
preview_rows: inline ? optionalNumber(ctx, "preview-rows") : void 0,
|
|
4380
5039
|
request_id: optionalString(ctx, "request-id"),
|
|
4381
5040
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
|
|
4382
|
-
limit: inline ? optionalNumber(ctx, "limit") : void 0,
|
|
4383
5041
|
format: inline ? void 0 : optionalJsonlFormat(ctx)
|
|
4384
5042
|
});
|
|
4385
5043
|
}
|
|
@@ -4391,13 +5049,13 @@ function historyTagDataDrilldownInput(ctx, inline) {
|
|
|
4391
5049
|
group_col: ctx.str("group-col"),
|
|
4392
5050
|
view: ctx.json("view"),
|
|
4393
5051
|
property_names: optionalJsonArray(ctx, "property-names"),
|
|
4394
|
-
fields: optionalJsonArray(ctx, "fields"),
|
|
4395
|
-
query: optionalString(ctx, "query"),
|
|
4396
|
-
use_cache: optionalBoolean(ctx, "use-cache"),
|
|
5052
|
+
fields: inline ? optionalJsonArray(ctx, "fields") : void 0,
|
|
5053
|
+
query: inline ? optionalString(ctx, "query") : void 0,
|
|
5054
|
+
use_cache: inline ? optionalBoolean(ctx, "use-cache") : void 0,
|
|
5055
|
+
preview_rows: inline ? optionalNumber(ctx, "preview-rows") : void 0,
|
|
4397
5056
|
request_id: optionalString(ctx, "request-id"),
|
|
4398
5057
|
timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
|
|
4399
|
-
|
|
4400
|
-
format: inline ? void 0 : optionalJsonlFormat(ctx)
|
|
5058
|
+
format: inline ? void 0 : optionalMemberFormat(ctx)
|
|
4401
5059
|
});
|
|
4402
5060
|
}
|
|
4403
5061
|
function optionalJsonlFormat(ctx) {
|
|
@@ -4407,30 +5065,86 @@ function optionalJsonlFormat(ctx) {
|
|
|
4407
5065
|
}
|
|
4408
5066
|
return format;
|
|
4409
5067
|
}
|
|
4410
|
-
|
|
4411
|
-
|
|
5068
|
+
function optionalMemberFormat(ctx) {
|
|
5069
|
+
const format = optionalString(ctx, "artifact-format");
|
|
5070
|
+
if (format !== void 0 && format !== "jsonl" && format !== "csv") {
|
|
5071
|
+
throw new Error("--artifact-format only supports jsonl or csv for member full-download exports");
|
|
5072
|
+
}
|
|
5073
|
+
return format;
|
|
5074
|
+
}
|
|
5075
|
+
var listFlags = [
|
|
5076
|
+
projectIdFlag,
|
|
5077
|
+
queriesFlag,
|
|
5078
|
+
fieldsFlag,
|
|
5079
|
+
directoryLimitFlag,
|
|
5080
|
+
directoryOffsetFlag,
|
|
5081
|
+
authenticatedOnlyFlag
|
|
5082
|
+
];
|
|
5083
|
+
var tagListFlags = [
|
|
5084
|
+
projectIdFlag,
|
|
5085
|
+
queriesFlag,
|
|
5086
|
+
tagListFieldsFlag,
|
|
5087
|
+
directoryLimitFlag,
|
|
5088
|
+
directoryOffsetFlag,
|
|
5089
|
+
authenticatedOnlyFlag
|
|
5090
|
+
];
|
|
5091
|
+
var exportFlags = [
|
|
5092
|
+
projectIdFlag,
|
|
5093
|
+
queriesFlag,
|
|
5094
|
+
fieldsFlag,
|
|
5095
|
+
authenticatedOnlyFlag,
|
|
5096
|
+
catalogExportOutputFlag
|
|
5097
|
+
];
|
|
5098
|
+
var tagExportFlags = [
|
|
5099
|
+
projectIdFlag,
|
|
5100
|
+
queriesFlag,
|
|
5101
|
+
tagListFieldsFlag,
|
|
5102
|
+
authenticatedOnlyFlag,
|
|
5103
|
+
catalogExportOutputFlag
|
|
5104
|
+
];
|
|
4412
5105
|
var memberRunFlags = (memberFieldsFlag) => [
|
|
4413
5106
|
projectIdFlag,
|
|
4414
5107
|
propertyNamesFlag,
|
|
4415
5108
|
memberFieldsFlag,
|
|
4416
5109
|
queryFlag,
|
|
4417
5110
|
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use query cache. Default: true." },
|
|
5111
|
+
memberPreviewRowsFlag,
|
|
4418
5112
|
requestIdFlag,
|
|
4419
|
-
memberLimitFlag,
|
|
4420
5113
|
syncTimeoutSecondsFlag
|
|
4421
5114
|
];
|
|
4422
|
-
var memberExportFlags =
|
|
5115
|
+
var memberExportFlags = [
|
|
4423
5116
|
projectIdFlag,
|
|
4424
5117
|
propertyNamesFlag,
|
|
4425
|
-
memberFieldsFlag,
|
|
4426
|
-
queryFlag,
|
|
4427
|
-
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use query cache. Default: true." },
|
|
4428
5118
|
requestIdFlag,
|
|
4429
|
-
|
|
5119
|
+
memberArtifactFormatFlag,
|
|
4430
5120
|
asyncTimeoutSecondsFlag
|
|
4431
5121
|
];
|
|
4432
|
-
var
|
|
4433
|
-
capability(
|
|
5122
|
+
var commands40 = [
|
|
5123
|
+
capability(
|
|
5124
|
+
"user-cluster",
|
|
5125
|
+
"list",
|
|
5126
|
+
"analysis.user_cluster.list",
|
|
5127
|
+
"List user clusters with bounded discovery.",
|
|
5128
|
+
listFlags,
|
|
5129
|
+
"read",
|
|
5130
|
+
assetListInput,
|
|
5131
|
+
{
|
|
5132
|
+
validate: validateCatalogListFlags
|
|
5133
|
+
}
|
|
5134
|
+
),
|
|
5135
|
+
capability(
|
|
5136
|
+
"user-cluster",
|
|
5137
|
+
"export",
|
|
5138
|
+
"analysis.user_cluster.export",
|
|
5139
|
+
"Export the complete matching user-cluster catalog to JSONL with an integrity sidecar.",
|
|
5140
|
+
exportFlags,
|
|
5141
|
+
"read",
|
|
5142
|
+
assetExportInput,
|
|
5143
|
+
{
|
|
5144
|
+
validate: validateCatalogExportFlags,
|
|
5145
|
+
postProcess: catalogExportPostProcess("cluster", "items")
|
|
5146
|
+
}
|
|
5147
|
+
),
|
|
4434
5148
|
capability("user-cluster", "get", "analysis.user_cluster.get", "Get user cluster details by exact cluster_name values.", [
|
|
4435
5149
|
projectIdFlag,
|
|
4436
5150
|
{ name: "cluster-names", type: "json", required: true, desc: "JSON array of exact cluster_name values." }
|
|
@@ -4438,14 +5152,14 @@ var commands38 = [
|
|
|
4438
5152
|
project_id: ctx.num("project-id"),
|
|
4439
5153
|
cluster_names: ctx.json("cluster-names")
|
|
4440
5154
|
})),
|
|
4441
|
-
capability("user-cluster-member", "list", "analysis.user_cluster_member.list", `Run a bounded user cluster member query. ${
|
|
5155
|
+
capability("user-cluster-member", "list", "analysis.user_cluster_member.list", `Run a bounded user cluster member query. ${memberDataRunRoutingHelp}`, [
|
|
4442
5156
|
clusterNameFlag,
|
|
4443
5157
|
...memberRunFlags(clusterMemberFieldsFlag)
|
|
4444
5158
|
], "read", (ctx) => memberInput(ctx, "cluster", true)),
|
|
4445
|
-
capability("user-cluster-member", "export", "analysis.user_cluster_member.export", `
|
|
5159
|
+
capability("user-cluster-member", "export", "analysis.user_cluster_member.export", `Stream the native full user-cluster download as a jsonl.gz or csv.gz artifact. ${analysisDataExportRoutingHelp}`, [
|
|
4446
5160
|
clusterNameFlag,
|
|
4447
|
-
...memberExportFlags
|
|
4448
|
-
], "read", (ctx) => memberInput(ctx, "cluster", false)),
|
|
5161
|
+
...memberExportFlags
|
|
5162
|
+
], "read", (ctx) => memberInput(ctx, "cluster", false), { asyncArtifact: true }),
|
|
4449
5163
|
capability("user-cluster", "create", "analysis.user_cluster.create", "Create a condition or SQL user cluster directly from an AI-facing definition request.", [
|
|
4450
5164
|
projectIdFlag,
|
|
4451
5165
|
newClusterNameFlag,
|
|
@@ -4462,7 +5176,8 @@ var commands38 = [
|
|
|
4462
5176
|
optionalClusterDefinitionRequestFlag,
|
|
4463
5177
|
authenticatedOnlyFlag,
|
|
4464
5178
|
remarkFlag,
|
|
4465
|
-
zoneOffsetFlag3
|
|
5179
|
+
zoneOffsetFlag3,
|
|
5180
|
+
autoRefreshCronFlag
|
|
4466
5181
|
], "write", (ctx) => clusterWriteInput(ctx, false)),
|
|
4467
5182
|
idImportCapability(capability("user-cluster", "create-id", "analysis.user_cluster.create_id", "Create a cluster by mapping imported values to an analysis entity.", [
|
|
4468
5183
|
projectIdFlag,
|
|
@@ -4496,7 +5211,31 @@ var commands38 = [
|
|
|
4496
5211
|
cluster_name: ctx.str("cluster-name"),
|
|
4497
5212
|
confirmed: optionalBoolean(ctx, "confirmed")
|
|
4498
5213
|
})),
|
|
4499
|
-
capability(
|
|
5214
|
+
capability(
|
|
5215
|
+
"user-tag",
|
|
5216
|
+
"list",
|
|
5217
|
+
"analysis.user_tag.list",
|
|
5218
|
+
"List user tags with bounded discovery. Returned identifiers use canonical tag_name.",
|
|
5219
|
+
tagListFlags,
|
|
5220
|
+
"read",
|
|
5221
|
+
assetListInput,
|
|
5222
|
+
{
|
|
5223
|
+
validate: validateCatalogListFlags
|
|
5224
|
+
}
|
|
5225
|
+
),
|
|
5226
|
+
capability(
|
|
5227
|
+
"user-tag",
|
|
5228
|
+
"export",
|
|
5229
|
+
"analysis.user_tag.export",
|
|
5230
|
+
"Export the complete matching user-tag catalog to JSONL with an integrity sidecar.",
|
|
5231
|
+
tagExportFlags,
|
|
5232
|
+
"read",
|
|
5233
|
+
assetExportInput,
|
|
5234
|
+
{
|
|
5235
|
+
validate: validateCatalogExportFlags,
|
|
5236
|
+
postProcess: catalogExportPostProcess("tag", "items")
|
|
5237
|
+
}
|
|
5238
|
+
),
|
|
4500
5239
|
capability("user-tag", "get", "analysis.user_tag.get", "Get user tag details by exact tag_name values.", [
|
|
4501
5240
|
projectIdFlag,
|
|
4502
5241
|
{ name: "tag-names", type: "json", required: true, desc: "JSON array of exact tag_name values." }
|
|
@@ -4504,16 +5243,16 @@ var commands38 = [
|
|
|
4504
5243
|
project_id: ctx.num("project-id"),
|
|
4505
5244
|
tag_names: ctx.json("tag-names")
|
|
4506
5245
|
})),
|
|
4507
|
-
capability("user-tag-member", "list", "analysis.user_tag_member.list", `Run a bounded user tag member query. ${
|
|
5246
|
+
capability("user-tag-member", "list", "analysis.user_tag_member.list", `Run a bounded user tag member query. ${memberDataRunRoutingHelp}`, [
|
|
4508
5247
|
tagNameFlag,
|
|
4509
5248
|
snapshotDateFlag,
|
|
4510
5249
|
...memberRunFlags(tagMemberFieldsFlag)
|
|
4511
5250
|
], "read", (ctx) => memberInput(ctx, "tag", true)),
|
|
4512
|
-
capability("user-tag-member", "export", "analysis.user_tag_member.export", `
|
|
5251
|
+
capability("user-tag-member", "export", "analysis.user_tag_member.export", `Stream the native full user-tag download as a jsonl.gz or csv.gz artifact. ${analysisDataExportRoutingHelp}`, [
|
|
4513
5252
|
tagNameFlag,
|
|
4514
5253
|
snapshotDateFlag,
|
|
4515
|
-
...memberExportFlags
|
|
4516
|
-
], "read", (ctx) => memberInput(ctx, "tag", false)),
|
|
5254
|
+
...memberExportFlags
|
|
5255
|
+
], "read", (ctx) => memberInput(ctx, "tag", false), { asyncArtifact: true }),
|
|
4517
5256
|
capability("user-tag", "create", "analysis.user_tag.create", "Create a user tag directly from an AI-facing definition request.", [
|
|
4518
5257
|
projectIdFlag,
|
|
4519
5258
|
newTagNameFlag,
|
|
@@ -4530,7 +5269,8 @@ var commands38 = [
|
|
|
4530
5269
|
optionalTagDefinitionRequestFlag,
|
|
4531
5270
|
authenticatedOnlyFlag,
|
|
4532
5271
|
remarkFlag,
|
|
4533
|
-
zoneOffsetFlag3
|
|
5272
|
+
zoneOffsetFlag3,
|
|
5273
|
+
autoRefreshCronFlag
|
|
4534
5274
|
], "write", (ctx) => tagWriteInput(ctx, false)),
|
|
4535
5275
|
capability("user-tag", "refresh", "analysis.user_tag.refresh", "Refresh a user tag by exact tag_name.", [
|
|
4536
5276
|
projectIdFlag,
|
|
@@ -4606,8 +5346,8 @@ var commands38 = [
|
|
|
4606
5346
|
projectIdFlag,
|
|
4607
5347
|
tagNameFlag,
|
|
4608
5348
|
historyViewFlag,
|
|
5349
|
+
previewRowsFlag,
|
|
4609
5350
|
requestIdFlag,
|
|
4610
|
-
limitFlag,
|
|
4611
5351
|
syncTimeoutSecondsFlag
|
|
4612
5352
|
], "read", (ctx) => historyTagDataInput(ctx, true)),
|
|
4613
5353
|
capability("history-tag-data", "export", "analysis.history_tag_data.export", `Export history tag statistics as a jsonl artifact. ${analysisDataExportRoutingHelp}`, [
|
|
@@ -4617,7 +5357,7 @@ var commands38 = [
|
|
|
4617
5357
|
requestIdFlag,
|
|
4618
5358
|
jsonlArtifactFormatFlag,
|
|
4619
5359
|
asyncTimeoutSecondsFlag
|
|
4620
|
-
], "read", (ctx) => historyTagDataInput(ctx, false)),
|
|
5360
|
+
], "read", (ctx) => historyTagDataInput(ctx, false), { asyncArtifact: true }),
|
|
4621
5361
|
capability("history-tag-data-drilldown", "run", "analysis.history_tag_data_drilldown.run", `Run a bounded drilldown user query for one history tag statistic value. ${analysisDataRunRoutingHelp}`, [
|
|
4622
5362
|
tagNameFlag,
|
|
4623
5363
|
{ ...snapshotDateFlag, required: true, desc: "History tag snapshot date, yyyy-MM-dd." },
|
|
@@ -4625,15 +5365,15 @@ var commands38 = [
|
|
|
4625
5365
|
historyViewFlag,
|
|
4626
5366
|
...memberRunFlags(tagMemberFieldsFlag)
|
|
4627
5367
|
], "read", (ctx) => historyTagDataDrilldownInput(ctx, true)),
|
|
4628
|
-
capability("history-tag-data-drilldown", "export", "analysis.history_tag_data_drilldown.export", `
|
|
5368
|
+
capability("history-tag-data-drilldown", "export", "analysis.history_tag_data_drilldown.export", `Stream the native full history-tag drilldown download as a jsonl.gz or csv.gz artifact. ${analysisDataExportRoutingHelp}`, [
|
|
4629
5369
|
tagNameFlag,
|
|
4630
5370
|
{ ...snapshotDateFlag, required: true, desc: "History tag snapshot date, yyyy-MM-dd." },
|
|
4631
5371
|
groupColFlag,
|
|
4632
5372
|
historyViewFlag,
|
|
4633
|
-
...memberExportFlags
|
|
4634
|
-
], "read", (ctx) => historyTagDataDrilldownInput(ctx, false))
|
|
5373
|
+
...memberExportFlags
|
|
5374
|
+
], "read", (ctx) => historyTagDataDrilldownInput(ctx, false), { asyncArtifact: true })
|
|
4635
5375
|
];
|
|
4636
|
-
var user_default =
|
|
5376
|
+
var user_default = commands40;
|
|
4637
5377
|
|
|
4638
5378
|
// src/commands/te-analysis/query-cluster/list.ts
|
|
4639
5379
|
var queryClusterList = createAnalysisCapabilityCommand({
|
|
@@ -4647,8 +5387,8 @@ var queryClusterList = createAnalysisCapabilityCommand({
|
|
|
4647
5387
|
});
|
|
4648
5388
|
|
|
4649
5389
|
// src/commands/te-analysis/query-cluster/index.ts
|
|
4650
|
-
var
|
|
4651
|
-
var query_cluster_default =
|
|
5390
|
+
var commands41 = [queryClusterList];
|
|
5391
|
+
var query_cluster_default = commands41;
|
|
4652
5392
|
|
|
4653
5393
|
// src/commands/te-analysis/sql-table/columns.ts
|
|
4654
5394
|
var sqlTableColumns = createAnalysisCapabilityCommand({
|
|
@@ -4680,11 +5420,12 @@ var sqlTableList = createAnalysisCapabilityCommand({
|
|
|
4680
5420
|
command: "list",
|
|
4681
5421
|
capabilityId: "analysis.sql_table.list",
|
|
4682
5422
|
description: "List server-authoritative SQL table references queryable by the current user in a project.",
|
|
4683
|
-
flags: [projectIdFlag,
|
|
5423
|
+
flags: [projectIdFlag, queriesFlag, directoryLimitFlag, directoryOffsetFlag, sqlTableUsageFlag],
|
|
4684
5424
|
risk: "read",
|
|
5425
|
+
validate: validateQueriesFlag,
|
|
4685
5426
|
buildInput: (ctx) => compactInput({
|
|
4686
5427
|
project_id: ctx.num("project-id"),
|
|
4687
|
-
|
|
5428
|
+
queries: optionalQueries(ctx),
|
|
4688
5429
|
limit: optionalNumber(ctx, "limit"),
|
|
4689
5430
|
offset: optionalNumber(ctx, "offset"),
|
|
4690
5431
|
usage: optionalString(ctx, "usage")
|
|
@@ -4692,8 +5433,8 @@ var sqlTableList = createAnalysisCapabilityCommand({
|
|
|
4692
5433
|
});
|
|
4693
5434
|
|
|
4694
5435
|
// src/commands/te-analysis/sql-table/index.ts
|
|
4695
|
-
var
|
|
4696
|
-
var sql_table_default =
|
|
5436
|
+
var commands42 = [sqlTableList, sqlTableColumns];
|
|
5437
|
+
var sql_table_default = commands42;
|
|
4697
5438
|
|
|
4698
5439
|
// src/commands/te-analysis/entity/id-import-options.ts
|
|
4699
5440
|
var entityIdImportOptions = createAnalysisCapabilityCommand({
|
|
@@ -4718,8 +5459,8 @@ var entityIdImportOptions = createAnalysisCapabilityCommand({
|
|
|
4718
5459
|
});
|
|
4719
5460
|
|
|
4720
5461
|
// src/commands/te-analysis/entity/index.ts
|
|
4721
|
-
var
|
|
4722
|
-
var entity_default =
|
|
5462
|
+
var commands43 = [entityIdImportOptions];
|
|
5463
|
+
var entity_default = commands43;
|
|
4723
5464
|
|
|
4724
5465
|
// src/commands/te-analysis/input-file/inspect.ts
|
|
4725
5466
|
var inputFileInspect = {
|
|
@@ -4802,8 +5543,8 @@ var inputFileUpload = {
|
|
|
4802
5543
|
};
|
|
4803
5544
|
|
|
4804
5545
|
// src/commands/te-analysis/input-file/index.ts
|
|
4805
|
-
var
|
|
4806
|
-
var input_file_default =
|
|
5546
|
+
var commands44 = [inputFileUpload, inputFileInspect, inputFilePurposeList];
|
|
5547
|
+
var input_file_default = commands44;
|
|
4807
5548
|
|
|
4808
5549
|
// src/commands/te-analysis/project/access-detail/get.ts
|
|
4809
5550
|
var projectAccessDetailGet = createAnalysisCapabilityCommand({
|
|
@@ -4821,10 +5562,10 @@ var projectAccessDetailGet = createAnalysisCapabilityCommand({
|
|
|
4821
5562
|
});
|
|
4822
5563
|
|
|
4823
5564
|
// src/commands/te-analysis/project/access-detail/index.ts
|
|
4824
|
-
var
|
|
5565
|
+
var commands45 = [
|
|
4825
5566
|
projectAccessDetailGet
|
|
4826
5567
|
];
|
|
4827
|
-
var access_detail_default =
|
|
5568
|
+
var access_detail_default = commands45;
|
|
4828
5569
|
|
|
4829
5570
|
// src/commands/te-analysis/project/data-power/delete.ts
|
|
4830
5571
|
var projectDataPowerDelete = createAnalysisCapabilityCommand({
|
|
@@ -4896,13 +5637,13 @@ var projectDataPowerUpsert = createAnalysisCapabilityCommand({
|
|
|
4896
5637
|
});
|
|
4897
5638
|
|
|
4898
5639
|
// src/commands/te-analysis/project/data-power/index.ts
|
|
4899
|
-
var
|
|
5640
|
+
var commands46 = [
|
|
4900
5641
|
projectDataPowerDelete,
|
|
4901
5642
|
projectDataPowerGet,
|
|
4902
5643
|
projectDataPowerList,
|
|
4903
5644
|
projectDataPowerUpsert
|
|
4904
5645
|
];
|
|
4905
|
-
var data_power_default =
|
|
5646
|
+
var data_power_default = commands46;
|
|
4906
5647
|
|
|
4907
5648
|
// src/commands/te-analysis/project/entity/create.ts
|
|
4908
5649
|
var projectEntityCreate = createAnalysisCapabilityCommand({
|
|
@@ -5013,14 +5754,14 @@ var projectEntityUpdate = createAnalysisCapabilityCommand({
|
|
|
5013
5754
|
});
|
|
5014
5755
|
|
|
5015
5756
|
// src/commands/te-analysis/project/entity/index.ts
|
|
5016
|
-
var
|
|
5757
|
+
var commands47 = [
|
|
5017
5758
|
projectEntityCreate,
|
|
5018
5759
|
projectEntityDelete,
|
|
5019
5760
|
projectEntityGet,
|
|
5020
5761
|
projectEntityList,
|
|
5021
5762
|
projectEntityUpdate
|
|
5022
5763
|
];
|
|
5023
|
-
var entity_default2 =
|
|
5764
|
+
var entity_default2 = commands47;
|
|
5024
5765
|
|
|
5025
5766
|
// src/commands/te-analysis/project/entity-event/list.ts
|
|
5026
5767
|
var projectEntityEventList = createAnalysisCapabilityCommand({
|
|
@@ -5040,10 +5781,10 @@ var projectEntityEventList = createAnalysisCapabilityCommand({
|
|
|
5040
5781
|
});
|
|
5041
5782
|
|
|
5042
5783
|
// src/commands/te-analysis/project/entity-event/index.ts
|
|
5043
|
-
var
|
|
5784
|
+
var commands48 = [
|
|
5044
5785
|
projectEntityEventList
|
|
5045
5786
|
];
|
|
5046
|
-
var entity_event_default =
|
|
5787
|
+
var entity_event_default = commands48;
|
|
5047
5788
|
|
|
5048
5789
|
// src/commands/te-analysis/project/function/list.ts
|
|
5049
5790
|
var projectFunctionList = createAnalysisCapabilityCommand({
|
|
@@ -5063,10 +5804,10 @@ var projectFunctionList = createAnalysisCapabilityCommand({
|
|
|
5063
5804
|
});
|
|
5064
5805
|
|
|
5065
5806
|
// src/commands/te-analysis/project/function/index.ts
|
|
5066
|
-
var
|
|
5807
|
+
var commands49 = [
|
|
5067
5808
|
projectFunctionList
|
|
5068
5809
|
];
|
|
5069
|
-
var function_default =
|
|
5810
|
+
var function_default = commands49;
|
|
5070
5811
|
|
|
5071
5812
|
// src/commands/te-analysis/project/info/create.ts
|
|
5072
5813
|
var projectInfoCreate = createAnalysisCapabilityCommand({
|
|
@@ -5161,14 +5902,14 @@ var projectInfoUpdate = createAnalysisCapabilityCommand({
|
|
|
5161
5902
|
});
|
|
5162
5903
|
|
|
5163
5904
|
// src/commands/te-analysis/project/info/index.ts
|
|
5164
|
-
var
|
|
5905
|
+
var commands50 = [
|
|
5165
5906
|
projectInfoCreate,
|
|
5166
5907
|
projectInfoDelete,
|
|
5167
5908
|
projectInfoGet,
|
|
5168
5909
|
projectInfoList,
|
|
5169
5910
|
projectInfoUpdate
|
|
5170
5911
|
];
|
|
5171
|
-
var info_default =
|
|
5912
|
+
var info_default = commands50;
|
|
5172
5913
|
|
|
5173
5914
|
// src/commands/te-analysis/project/mark-time/create.ts
|
|
5174
5915
|
var projectMarkTimeCreate = createAnalysisCapabilityCommand({
|
|
@@ -5262,13 +6003,13 @@ var projectMarkTimeUpdate = createAnalysisCapabilityCommand({
|
|
|
5262
6003
|
});
|
|
5263
6004
|
|
|
5264
6005
|
// src/commands/te-analysis/project/mark-time/index.ts
|
|
5265
|
-
var
|
|
6006
|
+
var commands51 = [
|
|
5266
6007
|
projectMarkTimeCreate,
|
|
5267
6008
|
projectMarkTimeDelete,
|
|
5268
6009
|
projectMarkTimeList,
|
|
5269
6010
|
projectMarkTimeUpdate
|
|
5270
6011
|
];
|
|
5271
|
-
var mark_time_default =
|
|
6012
|
+
var mark_time_default = commands51;
|
|
5272
6013
|
|
|
5273
6014
|
// src/commands/te-analysis/project/member/add.ts
|
|
5274
6015
|
var projectMemberAdd = createAnalysisCapabilityCommand({
|
|
@@ -5379,7 +6120,7 @@ var projectMemberUpdate = createAnalysisCapabilityCommand({
|
|
|
5379
6120
|
});
|
|
5380
6121
|
|
|
5381
6122
|
// src/commands/te-analysis/project/member/index.ts
|
|
5382
|
-
var
|
|
6123
|
+
var commands52 = [
|
|
5383
6124
|
projectMemberAdd,
|
|
5384
6125
|
projectMemberBatchUpdate,
|
|
5385
6126
|
projectMemberImport,
|
|
@@ -5387,7 +6128,7 @@ var commands50 = [
|
|
|
5387
6128
|
projectMemberRemove,
|
|
5388
6129
|
projectMemberUpdate
|
|
5389
6130
|
];
|
|
5390
|
-
var member_default =
|
|
6131
|
+
var member_default = commands52;
|
|
5391
6132
|
|
|
5392
6133
|
// src/commands/te-analysis/project/member-candidate/list.ts
|
|
5393
6134
|
var projectMemberCandidateList = createAnalysisCapabilityCommand({
|
|
@@ -5409,16 +6150,17 @@ var projectMemberCandidateList = createAnalysisCapabilityCommand({
|
|
|
5409
6150
|
});
|
|
5410
6151
|
|
|
5411
6152
|
// src/commands/te-analysis/project/member-candidate/index.ts
|
|
5412
|
-
var
|
|
6153
|
+
var commands53 = [
|
|
5413
6154
|
projectMemberCandidateList
|
|
5414
6155
|
];
|
|
5415
|
-
var member_candidate_default =
|
|
6156
|
+
var member_candidate_default = commands53;
|
|
5416
6157
|
|
|
5417
6158
|
// src/commands/te-analysis/project/member-handover/export.ts
|
|
5418
6159
|
var projectMemberHandoverExport = createAnalysisCapabilityCommand({
|
|
5419
6160
|
resource: "project member-handover",
|
|
5420
6161
|
command: "export",
|
|
5421
6162
|
capabilityId: "project.member_handover.export",
|
|
6163
|
+
asyncArtifact: true,
|
|
5422
6164
|
description: "Run batch project member asset handover and export the generated detail file as a CLI artifact.",
|
|
5423
6165
|
flags: [
|
|
5424
6166
|
projectIdFlag,
|
|
@@ -5452,11 +6194,11 @@ var projectMemberHandoverRun = createAnalysisCapabilityCommand({
|
|
|
5452
6194
|
});
|
|
5453
6195
|
|
|
5454
6196
|
// src/commands/te-analysis/project/member-handover/index.ts
|
|
5455
|
-
var
|
|
6197
|
+
var commands54 = [
|
|
5456
6198
|
projectMemberHandoverExport,
|
|
5457
6199
|
projectMemberHandoverRun
|
|
5458
6200
|
];
|
|
5459
|
-
var member_handover_default =
|
|
6201
|
+
var member_handover_default = commands54;
|
|
5460
6202
|
|
|
5461
6203
|
// src/commands/te-analysis/project/member-receiver/list.ts
|
|
5462
6204
|
var projectMemberReceiverList = createAnalysisCapabilityCommand({
|
|
@@ -5474,10 +6216,10 @@ var projectMemberReceiverList = createAnalysisCapabilityCommand({
|
|
|
5474
6216
|
});
|
|
5475
6217
|
|
|
5476
6218
|
// src/commands/te-analysis/project/member-receiver/index.ts
|
|
5477
|
-
var
|
|
6219
|
+
var commands55 = [
|
|
5478
6220
|
projectMemberReceiverList
|
|
5479
6221
|
];
|
|
5480
|
-
var member_receiver_default =
|
|
6222
|
+
var member_receiver_default = commands55;
|
|
5481
6223
|
|
|
5482
6224
|
// src/commands/te-analysis/project/owner/update.ts
|
|
5483
6225
|
var projectOwnerUpdate = createAnalysisCapabilityCommand({
|
|
@@ -5503,10 +6245,10 @@ var projectOwnerUpdate = createAnalysisCapabilityCommand({
|
|
|
5503
6245
|
});
|
|
5504
6246
|
|
|
5505
6247
|
// src/commands/te-analysis/project/owner/index.ts
|
|
5506
|
-
var
|
|
6248
|
+
var commands56 = [
|
|
5507
6249
|
projectOwnerUpdate
|
|
5508
6250
|
];
|
|
5509
|
-
var owner_default =
|
|
6251
|
+
var owner_default = commands56;
|
|
5510
6252
|
|
|
5511
6253
|
// src/commands/te-analysis/project/permission-binding/list.ts
|
|
5512
6254
|
var projectPermissionBindingList = createAnalysisCapabilityCommand({
|
|
@@ -5528,10 +6270,10 @@ var projectPermissionBindingList = createAnalysisCapabilityCommand({
|
|
|
5528
6270
|
});
|
|
5529
6271
|
|
|
5530
6272
|
// src/commands/te-analysis/project/permission-binding/index.ts
|
|
5531
|
-
var
|
|
6273
|
+
var commands57 = [
|
|
5532
6274
|
projectPermissionBindingList
|
|
5533
6275
|
];
|
|
5534
|
-
var permission_binding_default =
|
|
6276
|
+
var permission_binding_default = commands57;
|
|
5535
6277
|
|
|
5536
6278
|
// src/commands/te-analysis/project/receive-status/update.ts
|
|
5537
6279
|
var projectReceiveStatusUpdate = createAnalysisCapabilityCommand({
|
|
@@ -5552,10 +6294,10 @@ var projectReceiveStatusUpdate = createAnalysisCapabilityCommand({
|
|
|
5552
6294
|
});
|
|
5553
6295
|
|
|
5554
6296
|
// src/commands/te-analysis/project/receive-status/index.ts
|
|
5555
|
-
var
|
|
6297
|
+
var commands58 = [
|
|
5556
6298
|
projectReceiveStatusUpdate
|
|
5557
6299
|
];
|
|
5558
|
-
var receive_status_default =
|
|
6300
|
+
var receive_status_default = commands58;
|
|
5559
6301
|
|
|
5560
6302
|
// src/commands/te-analysis/project/role/delete.ts
|
|
5561
6303
|
var projectRoleDelete = createAnalysisCapabilityCommand({
|
|
@@ -5631,13 +6373,13 @@ var projectRoleUpsert = createAnalysisCapabilityCommand({
|
|
|
5631
6373
|
});
|
|
5632
6374
|
|
|
5633
6375
|
// src/commands/te-analysis/project/role/index.ts
|
|
5634
|
-
var
|
|
6376
|
+
var commands59 = [
|
|
5635
6377
|
projectRoleDelete,
|
|
5636
6378
|
projectRoleGet,
|
|
5637
6379
|
projectRoleList,
|
|
5638
6380
|
projectRoleUpsert
|
|
5639
6381
|
];
|
|
5640
|
-
var role_default =
|
|
6382
|
+
var role_default = commands59;
|
|
5641
6383
|
|
|
5642
6384
|
// src/commands/te-analysis/project/role-function/list.ts
|
|
5643
6385
|
var projectRoleFunctionList = createAnalysisCapabilityCommand({
|
|
@@ -5663,10 +6405,10 @@ var projectRoleFunctionList = createAnalysisCapabilityCommand({
|
|
|
5663
6405
|
});
|
|
5664
6406
|
|
|
5665
6407
|
// src/commands/te-analysis/project/role-function/index.ts
|
|
5666
|
-
var
|
|
6408
|
+
var commands60 = [
|
|
5667
6409
|
projectRoleFunctionList
|
|
5668
6410
|
];
|
|
5669
|
-
var role_function_default =
|
|
6411
|
+
var role_function_default = commands60;
|
|
5670
6412
|
|
|
5671
6413
|
// src/commands/te-analysis/project/role-user/list.ts
|
|
5672
6414
|
var projectRoleUserList = createAnalysisCapabilityCommand({
|
|
@@ -5686,10 +6428,10 @@ var projectRoleUserList = createAnalysisCapabilityCommand({
|
|
|
5686
6428
|
});
|
|
5687
6429
|
|
|
5688
6430
|
// src/commands/te-analysis/project/role-user/index.ts
|
|
5689
|
-
var
|
|
6431
|
+
var commands61 = [
|
|
5690
6432
|
projectRoleUserList
|
|
5691
6433
|
];
|
|
5692
|
-
var role_user_default =
|
|
6434
|
+
var role_user_default = commands61;
|
|
5693
6435
|
|
|
5694
6436
|
// src/commands/te-analysis/project/timezone/get.ts
|
|
5695
6437
|
var projectTimezoneGet = createAnalysisCapabilityCommand({
|
|
@@ -5741,12 +6483,12 @@ var projectTimezoneUpdate = createAnalysisCapabilityCommand({
|
|
|
5741
6483
|
});
|
|
5742
6484
|
|
|
5743
6485
|
// src/commands/te-analysis/project/timezone/index.ts
|
|
5744
|
-
var
|
|
6486
|
+
var commands62 = [
|
|
5745
6487
|
projectTimezoneGet,
|
|
5746
6488
|
projectTimezoneOverview,
|
|
5747
6489
|
projectTimezoneUpdate
|
|
5748
6490
|
];
|
|
5749
|
-
var timezone_default =
|
|
6491
|
+
var timezone_default = commands62;
|
|
5750
6492
|
|
|
5751
6493
|
// src/commands/te-analysis/project/user-id-items/update.ts
|
|
5752
6494
|
var projectUserIdItemsUpdate = createAnalysisCapabilityCommand({
|
|
@@ -5766,13 +6508,13 @@ var projectUserIdItemsUpdate = createAnalysisCapabilityCommand({
|
|
|
5766
6508
|
});
|
|
5767
6509
|
|
|
5768
6510
|
// src/commands/te-analysis/project/user-id-items/index.ts
|
|
5769
|
-
var
|
|
6511
|
+
var commands63 = [
|
|
5770
6512
|
projectUserIdItemsUpdate
|
|
5771
6513
|
];
|
|
5772
|
-
var user_id_items_default =
|
|
6514
|
+
var user_id_items_default = commands63;
|
|
5773
6515
|
|
|
5774
6516
|
// src/commands/te-analysis/project/index.ts
|
|
5775
|
-
var
|
|
6517
|
+
var commands64 = [
|
|
5776
6518
|
...access_detail_default,
|
|
5777
6519
|
...data_power_default,
|
|
5778
6520
|
...entity_default2,
|
|
@@ -5793,15 +6535,17 @@ var commands62 = [
|
|
|
5793
6535
|
...timezone_default,
|
|
5794
6536
|
...user_id_items_default
|
|
5795
6537
|
];
|
|
5796
|
-
var project_default =
|
|
6538
|
+
var project_default = commands64;
|
|
5797
6539
|
|
|
5798
6540
|
// src/commands/te-analysis/tracking/shared.ts
|
|
5799
6541
|
function createTrackingCapabilityCommand(config) {
|
|
5800
|
-
|
|
5801
|
-
|
|
6542
|
+
const { asyncArtifact, ...coreConfig } = config;
|
|
6543
|
+
const command = createCapabilityCommand({
|
|
6544
|
+
...coreConfig,
|
|
5802
6545
|
cliService: "tracking",
|
|
5803
6546
|
gatewayDomain: "analysis"
|
|
5804
6547
|
});
|
|
6548
|
+
return asyncArtifact ? withAsyncArtifactLifecycle(command) : command;
|
|
5805
6549
|
}
|
|
5806
6550
|
var eventsFlag = {
|
|
5807
6551
|
name: "events",
|
|
@@ -6044,6 +6788,7 @@ var trackingPlanExport = createTrackingCapabilityCommand({
|
|
|
6044
6788
|
resource: "plan",
|
|
6045
6789
|
command: "export",
|
|
6046
6790
|
capabilityId: "tracking.plan.export",
|
|
6791
|
+
asyncArtifact: true,
|
|
6047
6792
|
description: "Export the tracking plan as an artifact.",
|
|
6048
6793
|
flags: [projectIdFlag, requestIdFlag, asyncTimeoutSecondsFlag],
|
|
6049
6794
|
risk: "read",
|
|
@@ -6321,6 +7066,7 @@ var LIST_CAPABILITIES = {
|
|
|
6321
7066
|
};
|
|
6322
7067
|
var EDIT_CAPABILITY = "metadata.super_metadata.batch_edit";
|
|
6323
7068
|
var MAX_BATCH_SIZE = 200;
|
|
7069
|
+
var DIRECTORY_PAGE_SIZE = 200;
|
|
6324
7070
|
var trackingPlanSyncDisplayNames = {
|
|
6325
7071
|
service: "tracking",
|
|
6326
7072
|
resource: "plan",
|
|
@@ -6376,40 +7122,40 @@ var trackingPlanSyncDisplayNames = {
|
|
|
6376
7122
|
const draftPath = ctx.str("draft");
|
|
6377
7123
|
const draft = await readDraft(draftPath);
|
|
6378
7124
|
const [eventResult, eventPropertyResult, userPropertyResult] = await Promise.all([
|
|
6379
|
-
|
|
7125
|
+
fetchAllDirectoryItems(
|
|
6380
7126
|
ctx.host(),
|
|
6381
|
-
GATEWAY_DOMAIN,
|
|
6382
7127
|
LIST_CAPABILITIES.events,
|
|
6383
7128
|
{
|
|
6384
7129
|
project_id: projectId,
|
|
6385
7130
|
fields: ["event_name", "event_desc"]
|
|
6386
|
-
}
|
|
7131
|
+
},
|
|
7132
|
+
"events"
|
|
6387
7133
|
),
|
|
6388
|
-
|
|
7134
|
+
fetchAllDirectoryItems(
|
|
6389
7135
|
ctx.host(),
|
|
6390
|
-
GATEWAY_DOMAIN,
|
|
6391
7136
|
LIST_CAPABILITIES.eventProperties,
|
|
6392
7137
|
{
|
|
6393
7138
|
project_id: projectId,
|
|
6394
7139
|
table_type: "event",
|
|
6395
7140
|
fields: ["prop_name", "prop_desc"]
|
|
6396
|
-
}
|
|
7141
|
+
},
|
|
7142
|
+
"properties"
|
|
6397
7143
|
),
|
|
6398
|
-
|
|
7144
|
+
fetchAllDirectoryItems(
|
|
6399
7145
|
ctx.host(),
|
|
6400
|
-
GATEWAY_DOMAIN,
|
|
6401
7146
|
LIST_CAPABILITIES.userProperties,
|
|
6402
7147
|
{
|
|
6403
7148
|
project_id: projectId,
|
|
6404
7149
|
table_type: "user",
|
|
6405
7150
|
fields: ["prop_name", "prop_desc"]
|
|
6406
|
-
}
|
|
7151
|
+
},
|
|
7152
|
+
"properties"
|
|
6407
7153
|
)
|
|
6408
7154
|
]);
|
|
6409
7155
|
const plan = buildDisplayNameSyncPlan(draft, {
|
|
6410
|
-
events: eventResult
|
|
6411
|
-
eventProperties: eventPropertyResult
|
|
6412
|
-
userProperties: userPropertyResult
|
|
7156
|
+
events: eventResult,
|
|
7157
|
+
eventProperties: eventPropertyResult,
|
|
7158
|
+
userProperties: userPropertyResult
|
|
6413
7159
|
});
|
|
6414
7160
|
const updateResults = {};
|
|
6415
7161
|
for (const group of Object.values(plan)) {
|
|
@@ -6447,6 +7193,35 @@ var trackingPlanSyncDisplayNames = {
|
|
|
6447
7193
|
};
|
|
6448
7194
|
}
|
|
6449
7195
|
};
|
|
7196
|
+
async function fetchAllDirectoryItems(host, capabilityId, input, arrayField) {
|
|
7197
|
+
const items = [];
|
|
7198
|
+
let offset = 0;
|
|
7199
|
+
const visitedOffsets = /* @__PURE__ */ new Set();
|
|
7200
|
+
while (true) {
|
|
7201
|
+
if (visitedOffsets.has(offset)) {
|
|
7202
|
+
throw new Error(`${capabilityId} returned a repeated next_offset: ${offset}`);
|
|
7203
|
+
}
|
|
7204
|
+
visitedOffsets.add(offset);
|
|
7205
|
+
const result = await executeCapability(host, GATEWAY_DOMAIN, capabilityId, {
|
|
7206
|
+
...input,
|
|
7207
|
+
limit: DIRECTORY_PAGE_SIZE,
|
|
7208
|
+
offset
|
|
7209
|
+
});
|
|
7210
|
+
const page = result?.[arrayField];
|
|
7211
|
+
if (!Array.isArray(page)) {
|
|
7212
|
+
throw new Error(`${capabilityId} response is missing ${arrayField}`);
|
|
7213
|
+
}
|
|
7214
|
+
items.push(...page);
|
|
7215
|
+
if (result?.has_more !== true) {
|
|
7216
|
+
return items;
|
|
7217
|
+
}
|
|
7218
|
+
const nextOffset = result?.next_offset;
|
|
7219
|
+
if (!Number.isInteger(nextOffset) || nextOffset <= offset) {
|
|
7220
|
+
throw new Error(`${capabilityId} returned an invalid next_offset: ${String(nextOffset)}`);
|
|
7221
|
+
}
|
|
7222
|
+
offset = nextOffset;
|
|
7223
|
+
}
|
|
7224
|
+
}
|
|
6450
7225
|
async function readDraft(filePath) {
|
|
6451
7226
|
let value;
|
|
6452
7227
|
try {
|
|
@@ -6491,7 +7266,7 @@ function counts(plan, value) {
|
|
|
6491
7266
|
}
|
|
6492
7267
|
|
|
6493
7268
|
// src/commands/te-analysis/tracking/plan/index.ts
|
|
6494
|
-
var
|
|
7269
|
+
var commands65 = [
|
|
6495
7270
|
trackingPlanGet,
|
|
6496
7271
|
trackingPlanSaveItems,
|
|
6497
7272
|
trackingPlanDeleteItems,
|
|
@@ -6501,7 +7276,7 @@ var commands63 = [
|
|
|
6501
7276
|
trackingPlanSyncFromMeta,
|
|
6502
7277
|
trackingPlanSyncDisplayNames
|
|
6503
7278
|
];
|
|
6504
|
-
var plan_default =
|
|
7279
|
+
var plan_default = commands65;
|
|
6505
7280
|
|
|
6506
7281
|
// src/commands/te-analysis/tracking/sdk-sample/generate.ts
|
|
6507
7282
|
var trackingSdkSampleGenerate = createTrackingCapabilityCommand({
|
|
@@ -6515,10 +7290,10 @@ var trackingSdkSampleGenerate = createTrackingCapabilityCommand({
|
|
|
6515
7290
|
});
|
|
6516
7291
|
|
|
6517
7292
|
// src/commands/te-analysis/tracking/sdk-sample/index.ts
|
|
6518
|
-
var
|
|
7293
|
+
var commands66 = [
|
|
6519
7294
|
trackingSdkSampleGenerate
|
|
6520
7295
|
];
|
|
6521
|
-
var sdk_sample_default =
|
|
7296
|
+
var sdk_sample_default = commands66;
|
|
6522
7297
|
|
|
6523
7298
|
// src/commands/te-analysis/tracking/plan-change-log/list.ts
|
|
6524
7299
|
var trackingPlanChangeLogList = createTrackingCapabilityCommand({
|
|
@@ -6536,6 +7311,7 @@ var trackingPlanChangeLogExport = createTrackingCapabilityCommand({
|
|
|
6536
7311
|
resource: "plan-change-log",
|
|
6537
7312
|
command: "export",
|
|
6538
7313
|
capabilityId: "tracking.plan_change_log.export",
|
|
7314
|
+
asyncArtifact: true,
|
|
6539
7315
|
description: "Export one tracking plan change log.",
|
|
6540
7316
|
flags: [projectIdFlag, logIdFlag, requestIdFlag, asyncTimeoutSecondsFlag],
|
|
6541
7317
|
risk: "read",
|
|
@@ -6543,11 +7319,11 @@ var trackingPlanChangeLogExport = createTrackingCapabilityCommand({
|
|
|
6543
7319
|
});
|
|
6544
7320
|
|
|
6545
7321
|
// src/commands/te-analysis/tracking/plan-change-log/index.ts
|
|
6546
|
-
var
|
|
7322
|
+
var commands67 = [
|
|
6547
7323
|
trackingPlanChangeLogList,
|
|
6548
7324
|
trackingPlanChangeLogExport
|
|
6549
7325
|
];
|
|
6550
|
-
var plan_change_log_default =
|
|
7326
|
+
var plan_change_log_default = commands67;
|
|
6551
7327
|
|
|
6552
7328
|
// src/commands/te-analysis/tracking/check/run.ts
|
|
6553
7329
|
var trackingCheckRun = createTrackingCapabilityCommand({
|
|
@@ -6613,6 +7389,7 @@ var trackingCheckExport = createTrackingCapabilityCommand({
|
|
|
6613
7389
|
resource: "check",
|
|
6614
7390
|
command: "export",
|
|
6615
7391
|
capabilityId: "tracking.check.export",
|
|
7392
|
+
asyncArtifact: true,
|
|
6616
7393
|
description: "Export one tracking validation result.",
|
|
6617
7394
|
flags: [projectIdFlag, uuidFlag, requestIdFlag, asyncTimeoutSecondsFlag],
|
|
6618
7395
|
risk: "read",
|
|
@@ -6620,7 +7397,7 @@ var trackingCheckExport = createTrackingCapabilityCommand({
|
|
|
6620
7397
|
});
|
|
6621
7398
|
|
|
6622
7399
|
// src/commands/te-analysis/tracking/check/index.ts
|
|
6623
|
-
var
|
|
7400
|
+
var commands68 = [
|
|
6624
7401
|
trackingCheckRun,
|
|
6625
7402
|
trackingCheckList,
|
|
6626
7403
|
trackingCheckGet,
|
|
@@ -6628,7 +7405,7 @@ var commands66 = [
|
|
|
6628
7405
|
trackingCheckDelete,
|
|
6629
7406
|
trackingCheckExport
|
|
6630
7407
|
];
|
|
6631
|
-
var check_default =
|
|
7408
|
+
var check_default = commands68;
|
|
6632
7409
|
|
|
6633
7410
|
// src/commands/te-analysis/tracking/ingest/summary.ts
|
|
6634
7411
|
var trackingIngestSummary = createTrackingCapabilityCommand({
|
|
@@ -6642,10 +7419,10 @@ var trackingIngestSummary = createTrackingCapabilityCommand({
|
|
|
6642
7419
|
});
|
|
6643
7420
|
|
|
6644
7421
|
// src/commands/te-analysis/tracking/ingest/index.ts
|
|
6645
|
-
var
|
|
7422
|
+
var commands69 = [
|
|
6646
7423
|
trackingIngestSummary
|
|
6647
7424
|
];
|
|
6648
|
-
var ingest_default =
|
|
7425
|
+
var ingest_default = commands69;
|
|
6649
7426
|
|
|
6650
7427
|
// src/commands/te-analysis/tracking/ingest-error/list.ts
|
|
6651
7428
|
var trackingIngestErrorList = createTrackingCapabilityCommand({
|
|
@@ -6659,10 +7436,10 @@ var trackingIngestErrorList = createTrackingCapabilityCommand({
|
|
|
6659
7436
|
});
|
|
6660
7437
|
|
|
6661
7438
|
// src/commands/te-analysis/tracking/ingest-error/index.ts
|
|
6662
|
-
var
|
|
7439
|
+
var commands70 = [
|
|
6663
7440
|
trackingIngestErrorList
|
|
6664
7441
|
];
|
|
6665
|
-
var ingest_error_default =
|
|
7442
|
+
var ingest_error_default = commands70;
|
|
6666
7443
|
|
|
6667
7444
|
// src/commands/te-analysis/tracking/live-data/list.ts
|
|
6668
7445
|
var trackingLiveDataList = createTrackingCapabilityCommand({
|
|
@@ -6680,6 +7457,7 @@ var trackingLiveDataExport = createTrackingCapabilityCommand({
|
|
|
6680
7457
|
resource: "live-data",
|
|
6681
7458
|
command: "export",
|
|
6682
7459
|
capabilityId: "tracking.live_data.export",
|
|
7460
|
+
asyncArtifact: true,
|
|
6683
7461
|
description: "Export recent tracking live data.",
|
|
6684
7462
|
flags: [projectIdFlag, dataTypeFlag, requestIdFlag, asyncTimeoutSecondsFlag],
|
|
6685
7463
|
risk: "read",
|
|
@@ -6687,11 +7465,11 @@ var trackingLiveDataExport = createTrackingCapabilityCommand({
|
|
|
6687
7465
|
});
|
|
6688
7466
|
|
|
6689
7467
|
// src/commands/te-analysis/tracking/live-data/index.ts
|
|
6690
|
-
var
|
|
7468
|
+
var commands71 = [
|
|
6691
7469
|
trackingLiveDataList,
|
|
6692
7470
|
trackingLiveDataExport
|
|
6693
7471
|
];
|
|
6694
|
-
var live_data_default =
|
|
7472
|
+
var live_data_default = commands71;
|
|
6695
7473
|
|
|
6696
7474
|
// src/commands/te-analysis/tracking/event-blacklist/list.ts
|
|
6697
7475
|
var trackingEventBlacklistList = createTrackingCapabilityCommand({
|
|
@@ -6727,12 +7505,12 @@ var trackingEventBlacklistUpdate = createTrackingCapabilityCommand({
|
|
|
6727
7505
|
});
|
|
6728
7506
|
|
|
6729
7507
|
// src/commands/te-analysis/tracking/event-blacklist/index.ts
|
|
6730
|
-
var
|
|
7508
|
+
var commands72 = [
|
|
6731
7509
|
trackingEventBlacklistList,
|
|
6732
7510
|
trackingEventBlacklistAdd,
|
|
6733
7511
|
trackingEventBlacklistUpdate
|
|
6734
7512
|
];
|
|
6735
|
-
var event_blacklist_default =
|
|
7513
|
+
var event_blacklist_default = commands72;
|
|
6736
7514
|
|
|
6737
7515
|
// src/commands/te-analysis/tracking/debug-device/add.ts
|
|
6738
7516
|
var trackingDebugDeviceAdd = createTrackingCapabilityCommand({
|
|
@@ -6775,12 +7553,12 @@ var trackingDebugDeviceSelect = createTrackingCapabilityCommand({
|
|
|
6775
7553
|
});
|
|
6776
7554
|
|
|
6777
7555
|
// src/commands/te-analysis/tracking/debug-device/index.ts
|
|
6778
|
-
var
|
|
7556
|
+
var commands73 = [
|
|
6779
7557
|
trackingDebugDeviceList,
|
|
6780
7558
|
trackingDebugDeviceAdd,
|
|
6781
7559
|
trackingDebugDeviceSelect
|
|
6782
7560
|
];
|
|
6783
|
-
var debug_device_default =
|
|
7561
|
+
var debug_device_default = commands73;
|
|
6784
7562
|
|
|
6785
7563
|
// src/commands/te-analysis/tracking/debug-data/list.ts
|
|
6786
7564
|
var debugStartTimeFlag = {
|
|
@@ -6839,11 +7617,11 @@ function isRecord2(value) {
|
|
|
6839
7617
|
}
|
|
6840
7618
|
|
|
6841
7619
|
// src/commands/te-analysis/tracking/debug-data/index.ts
|
|
6842
|
-
var
|
|
6843
|
-
var debug_data_default =
|
|
7620
|
+
var commands74 = [trackingDebugDataList];
|
|
7621
|
+
var debug_data_default = commands74;
|
|
6844
7622
|
|
|
6845
7623
|
// src/commands/te-analysis/tracking/index.ts
|
|
6846
|
-
var
|
|
7624
|
+
var commands75 = [
|
|
6847
7625
|
...plan_default,
|
|
6848
7626
|
...sdk_sample_default,
|
|
6849
7627
|
...plan_change_log_default,
|
|
@@ -6855,7 +7633,7 @@ var commands73 = [
|
|
|
6855
7633
|
...debug_device_default,
|
|
6856
7634
|
...debug_data_default
|
|
6857
7635
|
];
|
|
6858
|
-
var tracking_default =
|
|
7636
|
+
var tracking_default = commands75;
|
|
6859
7637
|
|
|
6860
7638
|
// src/commands/te-analysis/alert/shared.ts
|
|
6861
7639
|
var alertIdFlag = {
|
|
@@ -6870,14 +7648,6 @@ var definitionRequestFlag = {
|
|
|
6870
7648
|
required: true,
|
|
6871
7649
|
desc: "Structured alert definition request JSON object using snake_case field names."
|
|
6872
7650
|
};
|
|
6873
|
-
var limitFlag2 = {
|
|
6874
|
-
name: "limit",
|
|
6875
|
-
type: "number",
|
|
6876
|
-
required: false,
|
|
6877
|
-
desc: "Page size. Default: 50, max: 200.",
|
|
6878
|
-
min: 1,
|
|
6879
|
-
max: 200
|
|
6880
|
-
};
|
|
6881
7651
|
var startTimeFlag2 = {
|
|
6882
7652
|
name: "start-time",
|
|
6883
7653
|
type: "string",
|
|
@@ -6903,9 +7673,10 @@ var analysisAlertList = createAnalysisCapabilityCommand({
|
|
|
6903
7673
|
command: "list",
|
|
6904
7674
|
capabilityId: "analysis.alert.list",
|
|
6905
7675
|
description: "List project alerts.",
|
|
6906
|
-
flags: [projectIdFlag,
|
|
7676
|
+
flags: [projectIdFlag, queriesFlag, directoryLimitFlag, directoryOffsetFlag],
|
|
6907
7677
|
risk: "read",
|
|
6908
|
-
|
|
7678
|
+
validate: validateQueriesFlag,
|
|
7679
|
+
buildInput: (ctx) => compactInput({ ...projectInput3(ctx), queries: optionalQueries(ctx), limit: optionalNumber(ctx, "limit"), offset: optionalNumber(ctx, "offset") })
|
|
6909
7680
|
});
|
|
6910
7681
|
|
|
6911
7682
|
// src/commands/te-analysis/alert/get.ts
|
|
@@ -6975,7 +7746,7 @@ var analysisAlertStop = createAnalysisCapabilityCommand({
|
|
|
6975
7746
|
});
|
|
6976
7747
|
|
|
6977
7748
|
// src/commands/te-analysis/alert/index.ts
|
|
6978
|
-
var
|
|
7749
|
+
var commands76 = [
|
|
6979
7750
|
analysisAlertList,
|
|
6980
7751
|
analysisAlertGet,
|
|
6981
7752
|
analysisAlertCreate,
|
|
@@ -6984,7 +7755,7 @@ var commands74 = [
|
|
|
6984
7755
|
analysisAlertStart,
|
|
6985
7756
|
analysisAlertStop
|
|
6986
7757
|
];
|
|
6987
|
-
var alert_default =
|
|
7758
|
+
var alert_default = commands76;
|
|
6988
7759
|
|
|
6989
7760
|
// src/commands/te-analysis/alert-detail/list.ts
|
|
6990
7761
|
var analysisAlertDetailList = createAnalysisCapabilityCommand({
|
|
@@ -6998,10 +7769,10 @@ var analysisAlertDetailList = createAnalysisCapabilityCommand({
|
|
|
6998
7769
|
});
|
|
6999
7770
|
|
|
7000
7771
|
// src/commands/te-analysis/alert-detail/index.ts
|
|
7001
|
-
var
|
|
7772
|
+
var commands77 = [
|
|
7002
7773
|
analysisAlertDetailList
|
|
7003
7774
|
];
|
|
7004
|
-
var alert_detail_default =
|
|
7775
|
+
var alert_detail_default = commands77;
|
|
7005
7776
|
|
|
7006
7777
|
// src/commands/te-analysis/alert-job/list.ts
|
|
7007
7778
|
var analysisAlertJobList = createAnalysisCapabilityCommand({
|
|
@@ -7015,10 +7786,10 @@ var analysisAlertJobList = createAnalysisCapabilityCommand({
|
|
|
7015
7786
|
});
|
|
7016
7787
|
|
|
7017
7788
|
// src/commands/te-analysis/alert-job/index.ts
|
|
7018
|
-
var
|
|
7789
|
+
var commands78 = [
|
|
7019
7790
|
analysisAlertJobList
|
|
7020
7791
|
];
|
|
7021
|
-
var alert_job_default =
|
|
7792
|
+
var alert_job_default = commands78;
|
|
7022
7793
|
|
|
7023
7794
|
// src/commands/te-analysis/alert-notice-config/list.ts
|
|
7024
7795
|
var analysisAlertNoticeConfigList = createAnalysisCapabilityCommand({
|
|
@@ -7032,10 +7803,10 @@ var analysisAlertNoticeConfigList = createAnalysisCapabilityCommand({
|
|
|
7032
7803
|
});
|
|
7033
7804
|
|
|
7034
7805
|
// src/commands/te-analysis/alert-notice-config/index.ts
|
|
7035
|
-
var
|
|
7806
|
+
var commands79 = [
|
|
7036
7807
|
analysisAlertNoticeConfigList
|
|
7037
7808
|
];
|
|
7038
|
-
var alert_notice_config_default =
|
|
7809
|
+
var alert_notice_config_default = commands79;
|
|
7039
7810
|
|
|
7040
7811
|
// src/commands/te-analysis/system/shared.ts
|
|
7041
7812
|
import { readFileSync, statSync as statSync2 } from "fs";
|
|
@@ -7079,6 +7850,7 @@ function defineSystemCommand(spec) {
|
|
|
7079
7850
|
resource: `system ${spec.resource}`,
|
|
7080
7851
|
command: spec.command,
|
|
7081
7852
|
capabilityId: spec.capabilityId,
|
|
7853
|
+
asyncArtifact: spec.asyncArtifact,
|
|
7082
7854
|
description: spec.description,
|
|
7083
7855
|
flags: [
|
|
7084
7856
|
...fields.map(fieldFlag),
|
|
@@ -7790,6 +8562,7 @@ var systemMonitoringCommands = [
|
|
|
7790
8562
|
resource: "query-task",
|
|
7791
8563
|
command: "export",
|
|
7792
8564
|
capabilityId: "system.query_task.export",
|
|
8565
|
+
asyncArtifact: true,
|
|
7793
8566
|
description: "Export query tasks; run query-task options first to discover filter codes.",
|
|
7794
8567
|
risk: "read",
|
|
7795
8568
|
fields: [
|
|
@@ -8061,6 +8834,7 @@ var systemUsageCommands = [
|
|
|
8061
8834
|
resource: "usage-trend",
|
|
8062
8835
|
command: "export",
|
|
8063
8836
|
capabilityId: "system.usage_trend.export",
|
|
8837
|
+
asyncArtifact: true,
|
|
8064
8838
|
description: "Export a bounded usage trend as a cancellable run-scoped gzip JSONL artifact.",
|
|
8065
8839
|
risk: "read",
|
|
8066
8840
|
fields: [
|
|
@@ -8096,14 +8870,14 @@ var systemUsageCommands = [
|
|
|
8096
8870
|
];
|
|
8097
8871
|
|
|
8098
8872
|
// src/commands/te-analysis/system/index.ts
|
|
8099
|
-
var
|
|
8873
|
+
var commands80 = [
|
|
8100
8874
|
...systemUsageCommands,
|
|
8101
8875
|
...systemIdentityCommands,
|
|
8102
8876
|
...systemSecurityCommands,
|
|
8103
8877
|
...systemMonitoringCommands,
|
|
8104
8878
|
...systemConfigurationCommands
|
|
8105
8879
|
];
|
|
8106
|
-
var system_default =
|
|
8880
|
+
var system_default = commands80;
|
|
8107
8881
|
|
|
8108
8882
|
// src/commands/te-analysis/index.ts
|
|
8109
8883
|
registerCapabilityGatewayRoute("analysis", { gatewayDomain: "analysis" });
|
|
@@ -8122,6 +8896,7 @@ var baseCommands = [
|
|
|
8122
8896
|
...dashboard_report_default,
|
|
8123
8897
|
...dashboard_report_data_default,
|
|
8124
8898
|
...query_default,
|
|
8899
|
+
...query_context_default,
|
|
8125
8900
|
...run_default,
|
|
8126
8901
|
...artifact_default,
|
|
8127
8902
|
...adhoc_default,
|
|
@@ -8152,8 +8927,8 @@ var baseCommands = [
|
|
|
8152
8927
|
...alert_notice_config_default,
|
|
8153
8928
|
...system_default
|
|
8154
8929
|
];
|
|
8155
|
-
var
|
|
8156
|
-
var te_analysis_default =
|
|
8930
|
+
var commands81 = [...baseCommands];
|
|
8931
|
+
var te_analysis_default = commands81;
|
|
8157
8932
|
export {
|
|
8158
8933
|
baseCommands,
|
|
8159
8934
|
te_analysis_default as default
|