@thinkingai/ae-cli 6.0.20 → 6.0.22
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 +1 -4
- package/README.zh.md +1 -4
- package/dist/{auth-DYC2BGLM.js → auth-I2G7OAU2.js} +2 -4
- package/dist/{auth-GHBMJ5ZR.js → auth-RDN6D5HU.js} +32 -104
- package/dist/{chunk-5OC7CYCG.js → chunk-2W7HULUD.js} +14 -14
- package/dist/chunk-4EUZRJPO.js +163 -0
- package/dist/{chunk-DMMEPCST.js → chunk-5FBLRSMU.js} +25 -115
- package/dist/{chunk-BJX3GXWC.js → chunk-E34XH4GW.js} +2 -2
- package/dist/chunk-FPE5LGVU.js +105 -0
- package/dist/{chunk-I5CRVM2S.js → chunk-H52CSLJW.js} +44 -17
- package/dist/{chunk-RSHMZ3LG.js → chunk-U6QPKCN3.js} +6 -20
- package/dist/{chunk-6W4QOZAL.js → chunk-WPXHCP4A.js} +23 -13
- package/dist/{chunk-PN3OS34E.js → chunk-XE2PI5DS.js} +1 -1
- package/dist/{chunk-2DUEAXV3.js → chunk-YACCPUNQ.js} +1 -1
- package/dist/cli-token-6AGEDJF4.js +14 -0
- package/dist/{client-2UJ63MVQ.js → client-VTJMUZ4O.js} +3 -3
- package/dist/{config-NCUGK6NS.js → config-2SDTLGOC.js} +3 -3
- package/dist/index.js +309 -197
- package/dist/metadata-JZ2OTWBK.js +420 -0
- package/dist/{model-SJSOZTRS.js → model-ZYMRN4VS.js} +2 -2
- package/dist/{raw-7NVWSVJP.js → raw-NGYHAL3F.js} +4 -4
- package/dist/{sync-GRVO4K3U.js → sync-JVLX6TGW.js} +3 -3
- package/dist/{te-agent-CYZUC4US.js → te-agent-QPZTLHPH.js} +2 -2
- package/dist/{te-analysis-HJ22TUAA.js → te-analysis-WWX3Z6RP.js} +46 -24
- package/dist/{te-audience-MYDE5WEH.js → te-audience-UXGHUVBB.js} +27 -18
- package/dist/{te-common-WNCZB7R7.js → te-common-7XXH73MF.js} +5 -4
- package/dist/{te-community-JEEFXPB3.js → te-community-QKE67HR2.js} +5 -4
- package/dist/{te-dataops-ZTS7XMXM.js → te-dataops-6W7NNYST.js} +4 -5
- package/dist/{te-engage-4XHCTS6I.js → te-engage-NCFAQFX3.js} +5 -4
- package/dist/{te-kb-OWM3RQRH.js → te-kb-K5BQYUCM.js} +4 -5
- package/dist/{te-meta-JVO4QJBH.js → te-meta-LJZBOSMO.js} +26 -19
- package/dist/{te-team-YY24VORI.js → te-team-DHK5R7MV.js} +5 -6
- package/package.json +3 -2
- package/skills/ae-analysis/SKILL.md +9 -2
- package/skills/ae-analysis/references/build_attribution_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_cluster_definition.md +2 -0
- package/skills/ae-analysis/references/build_distribution_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_event_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_funnel_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_heat_map_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_interval_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_path_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_prop_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_rank_list_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_retention_analysis_qp.md +2 -0
- package/skills/ae-analysis/references/build_tag_definition.md +2 -0
- package/skills/ae-analysis/references/list_clusters.md +3 -1
- package/skills/ae-analysis/references/list_events.md +5 -2
- package/skills/ae-analysis/references/list_metrics.md +4 -2
- package/skills/ae-analysis/references/list_properties.md +4 -2
- package/skills/ae-analysis/references/list_tags.md +3 -1
- package/skills/ae-generate-tracking-code/SKILL.md +68 -31
- package/skills/ae-generate-tracking-code/references/snippet-delivery.md +26 -1
- package/skills/ae-generate-tracking-code/references/te-api.md +47 -164
- package/skills/ae-generate-tracking-plan/SKILL.md +109 -32
- package/skills/ae-generate-tracking-plan/references/te-api.md +57 -27
- package/skills/ae-metadata/SKILL.md +90 -0
- package/skills/ae-metadata/references/metadata_data_table_csv_delete.md +15 -0
- package/skills/ae-metadata/references/metadata_data_table_csv_write.md +29 -0
- package/skills/ae-metadata/references/metadata_data_table_download.md +17 -0
- package/skills/ae-metadata/references/metadata_data_table_get.md +24 -0
- package/skills/ae-metadata/references/metadata_data_table_list.md +27 -0
- package/skills/ae-metadata/references/metadata_data_table_property_bindings_update.md +17 -0
- package/skills/ae-metadata/references/metadata_data_table_sql_delete.md +15 -0
- package/skills/ae-metadata/references/metadata_data_table_sql_write.md +31 -0
- package/skills/ae-metadata/references/metadata_event_get.md +52 -0
- package/skills/ae-metadata/references/metadata_input_file_upload.md +29 -0
- package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +27 -0
- package/skills/ae-metadata/references/metadata_property_dimension_table_create_and_bind_csv.md +30 -0
- package/skills/ae-metadata/references/metadata_property_get.md +54 -0
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildCapabilityGatewayUrl,
|
|
3
|
+
executeCapability,
|
|
4
|
+
uploadInputFile
|
|
5
|
+
} from "./chunk-4EUZRJPO.js";
|
|
6
|
+
import "./chunk-NOO24N7W.js";
|
|
7
|
+
import "./chunk-FPE5LGVU.js";
|
|
8
|
+
import "./chunk-U6QPKCN3.js";
|
|
9
|
+
import "./chunk-WPXHCP4A.js";
|
|
10
|
+
|
|
11
|
+
// src/core/capability-routing.ts
|
|
12
|
+
var cliServiceRoutes = /* @__PURE__ */ new Map();
|
|
13
|
+
function registerCapabilityGatewayRoute(cliService, route) {
|
|
14
|
+
cliServiceRoutes.set(cliService, route);
|
|
15
|
+
}
|
|
16
|
+
function resolveGatewayDomain(cliService, override) {
|
|
17
|
+
if (override) {
|
|
18
|
+
return override;
|
|
19
|
+
}
|
|
20
|
+
const route = cliServiceRoutes.get(cliService);
|
|
21
|
+
if (!route) {
|
|
22
|
+
throw new Error(
|
|
23
|
+
`Capability gateway route not registered for CLI service '${cliService}'. Call registerCapabilityGatewayRoute() in commands/${cliService}/index.ts.`
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
return route.gatewayDomain;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// src/core/capability-command.ts
|
|
30
|
+
function createCapabilityCommand(config) {
|
|
31
|
+
return {
|
|
32
|
+
service: config.cliService,
|
|
33
|
+
resource: config.resource,
|
|
34
|
+
command: config.command,
|
|
35
|
+
description: config.description,
|
|
36
|
+
flags: config.flags,
|
|
37
|
+
risk: config.risk,
|
|
38
|
+
validate: config.validate,
|
|
39
|
+
dryRun: (ctx) => {
|
|
40
|
+
const gatewayDomain = resolveGatewayDomain(config.cliService, config.gatewayDomain);
|
|
41
|
+
const input = config.buildInput(ctx);
|
|
42
|
+
return {
|
|
43
|
+
method: "POST",
|
|
44
|
+
url: buildCapabilityGatewayUrl(
|
|
45
|
+
ctx.host(),
|
|
46
|
+
gatewayDomain,
|
|
47
|
+
`capabilities/${config.capabilityId}/dry-run`
|
|
48
|
+
),
|
|
49
|
+
body: { input }
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
execute: async (ctx) => {
|
|
53
|
+
const gatewayDomain = resolveGatewayDomain(config.cliService, config.gatewayDomain);
|
|
54
|
+
const input = config.buildInput(ctx);
|
|
55
|
+
return executeCapability(ctx.host(), gatewayDomain, config.capabilityId, input);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// src/commands/metadata/shared.ts
|
|
61
|
+
function createCapabilityCommand2(config) {
|
|
62
|
+
return createCapabilityCommand({
|
|
63
|
+
...config,
|
|
64
|
+
cliService: config.cliService ?? "metadata"
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function optionalString(ctx, name) {
|
|
68
|
+
const value = ctx.str(name);
|
|
69
|
+
return value === "" ? void 0 : value;
|
|
70
|
+
}
|
|
71
|
+
function optionalNumber(ctx, name) {
|
|
72
|
+
const value = ctx.str(name);
|
|
73
|
+
return value === "" ? void 0 : Number(value);
|
|
74
|
+
}
|
|
75
|
+
function optionalBoolean(ctx, name) {
|
|
76
|
+
const value = ctx.str(name);
|
|
77
|
+
return value === "" ? void 0 : ctx.bool(name);
|
|
78
|
+
}
|
|
79
|
+
function optionalJson(ctx, name) {
|
|
80
|
+
const value = ctx.str(name);
|
|
81
|
+
return value === "" ? void 0 : ctx.json(name);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// src/commands/metadata/event/get.ts
|
|
85
|
+
var eventGet = createCapabilityCommand2({
|
|
86
|
+
resource: "event",
|
|
87
|
+
command: "get",
|
|
88
|
+
capabilityId: "metadata.event.get",
|
|
89
|
+
description: "Get one super-event metadata detail, including virtual event definitions. Requires metadata view permission in the target project.",
|
|
90
|
+
flags: [
|
|
91
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
92
|
+
{
|
|
93
|
+
name: "event-name",
|
|
94
|
+
type: "string",
|
|
95
|
+
required: true,
|
|
96
|
+
desc: "Super-event technical name. Virtual events use the same field."
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
risk: "read",
|
|
100
|
+
buildInput: (ctx) => ({
|
|
101
|
+
project_id: ctx.num("project-id"),
|
|
102
|
+
event_name: ctx.str("event-name")
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// src/commands/metadata/property/get.ts
|
|
107
|
+
var propertyGet = createCapabilityCommand2({
|
|
108
|
+
resource: "property",
|
|
109
|
+
command: "get",
|
|
110
|
+
capabilityId: "metadata.property.get",
|
|
111
|
+
description: "Get one super-property metadata detail, including virtual property definitions. Requires metadata view permission in the target project.",
|
|
112
|
+
flags: [
|
|
113
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
114
|
+
{
|
|
115
|
+
name: "property-name",
|
|
116
|
+
type: "string",
|
|
117
|
+
required: true,
|
|
118
|
+
desc: "Super-property technical name. Virtual, dict, and exchange-rate properties use the same field."
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: "property-scope",
|
|
122
|
+
type: "string",
|
|
123
|
+
required: true,
|
|
124
|
+
desc: "Property owner table: event (super event properties) or user (super user properties)."
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
risk: "read",
|
|
128
|
+
buildInput: (ctx) => ({
|
|
129
|
+
project_id: ctx.num("project-id"),
|
|
130
|
+
property_name: ctx.str("property-name"),
|
|
131
|
+
property_scope: ctx.str("property-scope")
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// src/commands/metadata/data-table/csv-delete.ts
|
|
136
|
+
var dataTableCsvDelete = createCapabilityCommand2({
|
|
137
|
+
resource: "data-table",
|
|
138
|
+
command: "csv-delete",
|
|
139
|
+
capabilityId: "metadata.data_table.csv_delete",
|
|
140
|
+
description: "Delete a CSV-backed metadata data table.",
|
|
141
|
+
flags: [
|
|
142
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
143
|
+
{ name: "data-table-id", type: "number", required: true, desc: "Data table ID." }
|
|
144
|
+
],
|
|
145
|
+
risk: "write",
|
|
146
|
+
buildInput: (ctx) => ({
|
|
147
|
+
project_id: ctx.num("project-id"),
|
|
148
|
+
data_table_id: ctx.num("data-table-id")
|
|
149
|
+
})
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// src/commands/metadata/data-table/csv-write.ts
|
|
153
|
+
var dataTableCsvWrite = createCapabilityCommand2({
|
|
154
|
+
resource: "data-table",
|
|
155
|
+
command: "csv-write",
|
|
156
|
+
capabilityId: "metadata.data_table.csv_write",
|
|
157
|
+
description: "Create or update a CSV-backed metadata data table from an uploaded input file.",
|
|
158
|
+
flags: [
|
|
159
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
160
|
+
{ name: "operation", type: "string", required: true, desc: "Write operation: create, incremental_update, or replace_update." },
|
|
161
|
+
{ name: "input-file-id", type: "string", required: true, desc: "Uploaded input file ID, for example ifile_<32 lowercase hex>." },
|
|
162
|
+
{ name: "data-table-id", type: "number", required: false, desc: "Existing data table ID for update operations." },
|
|
163
|
+
{ name: "data-table-name", type: "string", required: false, desc: "Technical data table name. Required by the service for create operations." },
|
|
164
|
+
{ name: "display-name", type: "string", required: false, desc: "Human-readable data table name." },
|
|
165
|
+
{ name: "description", type: "string", required: false, desc: "Data table description." },
|
|
166
|
+
{ name: "columns", type: "json", required: false, desc: "Column definitions JSON array." }
|
|
167
|
+
],
|
|
168
|
+
risk: "write",
|
|
169
|
+
buildInput: (ctx) => ({
|
|
170
|
+
project_id: ctx.num("project-id"),
|
|
171
|
+
operation: ctx.str("operation"),
|
|
172
|
+
data_table_id: optionalNumber(ctx, "data-table-id"),
|
|
173
|
+
input_file_id: ctx.str("input-file-id"),
|
|
174
|
+
data_table_name: optionalString(ctx, "data-table-name"),
|
|
175
|
+
display_name: optionalString(ctx, "display-name"),
|
|
176
|
+
description: optionalString(ctx, "description"),
|
|
177
|
+
columns: optionalJson(ctx, "columns")
|
|
178
|
+
})
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// src/commands/metadata/data-table/download.ts
|
|
182
|
+
var dataTableDownload = createCapabilityCommand2({
|
|
183
|
+
resource: "data-table",
|
|
184
|
+
command: "download",
|
|
185
|
+
capabilityId: "metadata.data_table.download",
|
|
186
|
+
description: "Download a metadata data table export artifact.",
|
|
187
|
+
flags: [
|
|
188
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
189
|
+
{ name: "data-table-id", type: "number", required: true, desc: "Data table ID." },
|
|
190
|
+
{ name: "request-id", type: "string", required: false, desc: "Optional request ID. Format: cli_<32 lowercase hex>." },
|
|
191
|
+
{ name: "timeout-seconds", type: "number", required: false, desc: "Optional timeout in seconds. Range: 1 to 7200." }
|
|
192
|
+
],
|
|
193
|
+
risk: "read",
|
|
194
|
+
buildInput: (ctx) => ({
|
|
195
|
+
project_id: ctx.num("project-id"),
|
|
196
|
+
data_table_id: ctx.num("data-table-id"),
|
|
197
|
+
request_id: optionalString(ctx, "request-id"),
|
|
198
|
+
timeout_seconds: optionalNumber(ctx, "timeout-seconds")
|
|
199
|
+
})
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
// src/commands/metadata/data-table/get.ts
|
|
203
|
+
var dataTableGet = createCapabilityCommand2({
|
|
204
|
+
resource: "data-table",
|
|
205
|
+
command: "get",
|
|
206
|
+
capabilityId: "metadata.data_table.get",
|
|
207
|
+
description: "Get one metadata data table detail. Requires metadata view permission.",
|
|
208
|
+
flags: [
|
|
209
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
210
|
+
{ name: "data-table-id", type: "number", required: true, desc: "Data table ID." },
|
|
211
|
+
{ name: "include-preview", type: "boolean", required: false, desc: "Whether to include preview rows." }
|
|
212
|
+
],
|
|
213
|
+
risk: "read",
|
|
214
|
+
buildInput: (ctx) => ({
|
|
215
|
+
project_id: ctx.num("project-id"),
|
|
216
|
+
data_table_id: ctx.num("data-table-id"),
|
|
217
|
+
include_preview: optionalBoolean(ctx, "include-preview")
|
|
218
|
+
})
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
// src/commands/metadata/data-table/list.ts
|
|
222
|
+
var dataTableList = createCapabilityCommand2({
|
|
223
|
+
resource: "data-table",
|
|
224
|
+
command: "list",
|
|
225
|
+
capabilityId: "metadata.data_table.list",
|
|
226
|
+
description: "List metadata data tables in a project. Requires metadata view permission.",
|
|
227
|
+
flags: [
|
|
228
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" }
|
|
229
|
+
],
|
|
230
|
+
risk: "read",
|
|
231
|
+
buildInput: (ctx) => ({
|
|
232
|
+
project_id: ctx.num("project-id")
|
|
233
|
+
})
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
// src/commands/metadata/data-table/property-bindings-update.ts
|
|
237
|
+
var dataTablePropertyBindingsUpdate = createCapabilityCommand2({
|
|
238
|
+
resource: "data-table",
|
|
239
|
+
command: "property-bindings-update",
|
|
240
|
+
capabilityId: "metadata.data_table.property_bindings_update",
|
|
241
|
+
description: "Update property bindings for an existing metadata data table.",
|
|
242
|
+
flags: [
|
|
243
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
244
|
+
{ name: "data-table-id", type: "number", required: true, desc: "Data table ID." },
|
|
245
|
+
{ name: "bind-properties", type: "json", required: false, desc: "Properties to bind JSON array. Each item includes property_name and property_scope." },
|
|
246
|
+
{ name: "unbind-properties", type: "json", required: false, desc: "Properties to unbind JSON array. Each item includes property_name and property_scope." }
|
|
247
|
+
],
|
|
248
|
+
risk: "write",
|
|
249
|
+
buildInput: (ctx) => ({
|
|
250
|
+
project_id: ctx.num("project-id"),
|
|
251
|
+
data_table_id: ctx.num("data-table-id"),
|
|
252
|
+
bind_properties: optionalJson(ctx, "bind-properties"),
|
|
253
|
+
unbind_properties: optionalJson(ctx, "unbind-properties")
|
|
254
|
+
})
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
// src/commands/metadata/data-table/sql-delete.ts
|
|
258
|
+
var dataTableSqlDelete = createCapabilityCommand2({
|
|
259
|
+
resource: "data-table",
|
|
260
|
+
command: "sql-delete",
|
|
261
|
+
capabilityId: "metadata.data_table.sql_delete",
|
|
262
|
+
description: "Delete a SQL-backed metadata data table.",
|
|
263
|
+
flags: [
|
|
264
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
265
|
+
{ name: "data-table-id", type: "number", required: true, desc: "Data table ID." }
|
|
266
|
+
],
|
|
267
|
+
risk: "write",
|
|
268
|
+
buildInput: (ctx) => ({
|
|
269
|
+
project_id: ctx.num("project-id"),
|
|
270
|
+
data_table_id: ctx.num("data-table-id")
|
|
271
|
+
})
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
// src/commands/metadata/data-table/sql-write.ts
|
|
275
|
+
var dataTableSqlWrite = createCapabilityCommand2({
|
|
276
|
+
resource: "data-table",
|
|
277
|
+
command: "sql-write",
|
|
278
|
+
capabilityId: "metadata.data_table.sql_write",
|
|
279
|
+
description: "Create or update a SQL-backed metadata data table.",
|
|
280
|
+
flags: [
|
|
281
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
282
|
+
{ name: "operation", type: "string", required: true, desc: "Write operation: create or update." },
|
|
283
|
+
{ name: "columns", type: "json", required: true, desc: "Column definitions JSON array." },
|
|
284
|
+
{ name: "qp", type: "json", required: true, desc: "SQL data table query plan JSON." },
|
|
285
|
+
{ name: "data-table-id", type: "number", required: false, desc: "Existing data table ID for update operations." },
|
|
286
|
+
{ name: "table-name", type: "string", required: false, desc: "Technical data table name. Required by the service for create operations." },
|
|
287
|
+
{ name: "display-name", type: "string", required: false, desc: "Human-readable data table name." },
|
|
288
|
+
{ name: "remarks", type: "string", required: false, desc: "Data table remarks." },
|
|
289
|
+
{ name: "zone-offset", type: "string", required: false, desc: "Time zone offset used by the query plan, for example +08:00." },
|
|
290
|
+
{ name: "strategy", type: "string", required: false, desc: "Write strategy: overwrite or insert." },
|
|
291
|
+
{ name: "update-cron", type: "string", required: false, desc: "Cron expression for scheduled updates." }
|
|
292
|
+
],
|
|
293
|
+
risk: "write",
|
|
294
|
+
buildInput: (ctx) => ({
|
|
295
|
+
project_id: ctx.num("project-id"),
|
|
296
|
+
operation: ctx.str("operation"),
|
|
297
|
+
data_table_id: optionalNumber(ctx, "data-table-id"),
|
|
298
|
+
table_name: optionalString(ctx, "table-name"),
|
|
299
|
+
display_name: optionalString(ctx, "display-name"),
|
|
300
|
+
remarks: optionalString(ctx, "remarks"),
|
|
301
|
+
columns: ctx.json("columns"),
|
|
302
|
+
qp: ctx.json("qp"),
|
|
303
|
+
zone_offset: optionalString(ctx, "zone-offset"),
|
|
304
|
+
strategy: optionalString(ctx, "strategy"),
|
|
305
|
+
update_cron: optionalString(ctx, "update-cron")
|
|
306
|
+
})
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
// src/commands/metadata/input-file/upload.ts
|
|
310
|
+
var METADATA_CLI_SERVICE = "metadata";
|
|
311
|
+
var inputFileUpload = {
|
|
312
|
+
service: "metadata",
|
|
313
|
+
resource: "input-file",
|
|
314
|
+
command: "upload",
|
|
315
|
+
description: "Upload a local file to the metadata capability gateway and return an input_file_id.",
|
|
316
|
+
flags: [
|
|
317
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
318
|
+
{ name: "purpose", type: "string", required: true, desc: "Input file purpose. For data table CSV imports, use data_table.csv." },
|
|
319
|
+
{ name: "file", type: "string", required: true, desc: "Local file path to upload." }
|
|
320
|
+
],
|
|
321
|
+
risk: "write",
|
|
322
|
+
dryRun: (ctx) => ({
|
|
323
|
+
method: "POST",
|
|
324
|
+
url: buildCapabilityGatewayUrl(ctx.host(), resolveGatewayDomain(METADATA_CLI_SERVICE), "input-files"),
|
|
325
|
+
body: {
|
|
326
|
+
multipart: {
|
|
327
|
+
project_id: ctx.num("project-id"),
|
|
328
|
+
purpose: ctx.str("purpose"),
|
|
329
|
+
file: ctx.str("file")
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}),
|
|
333
|
+
execute: async (ctx) => uploadInputFile(
|
|
334
|
+
ctx.host(),
|
|
335
|
+
resolveGatewayDomain(METADATA_CLI_SERVICE),
|
|
336
|
+
ctx.num("project-id"),
|
|
337
|
+
ctx.str("purpose"),
|
|
338
|
+
ctx.str("file")
|
|
339
|
+
)
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
// src/commands/metadata/property/dimension-table/bind-existing.ts
|
|
343
|
+
var propertyDimensionTableBindExisting = createCapabilityCommand2({
|
|
344
|
+
resource: "property",
|
|
345
|
+
command: "bind-existing-dimension-table",
|
|
346
|
+
capabilityId: "metadata.property.bind_existing_dimension_table",
|
|
347
|
+
description: "Bind an existing dimension data table to a metadata property.",
|
|
348
|
+
flags: [
|
|
349
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
350
|
+
{ name: "property-name", type: "string", required: true, desc: "Property technical name." },
|
|
351
|
+
{ name: "property-scope", type: "string", required: true, desc: "Property owner table, for example event or user." },
|
|
352
|
+
{ name: "data-table-id", type: "number", required: true, desc: "Existing dimension data table ID." },
|
|
353
|
+
{ name: "timestamp-join-format", type: "string", required: false, desc: "Optional timestamp join format." },
|
|
354
|
+
{ name: "dict-columns", type: "json", required: false, desc: "Optional dictionary column names JSON array." }
|
|
355
|
+
],
|
|
356
|
+
risk: "write",
|
|
357
|
+
buildInput: (ctx) => ({
|
|
358
|
+
project_id: ctx.num("project-id"),
|
|
359
|
+
property_name: ctx.str("property-name"),
|
|
360
|
+
property_scope: ctx.str("property-scope"),
|
|
361
|
+
data_table_id: ctx.num("data-table-id"),
|
|
362
|
+
timestamp_join_format: optionalString(ctx, "timestamp-join-format"),
|
|
363
|
+
dict_columns: optionalJson(ctx, "dict-columns")
|
|
364
|
+
})
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
// src/commands/metadata/property/dimension-table/create-and-bind-csv.ts
|
|
368
|
+
var propertyDimensionTableCreateAndBindCsv = createCapabilityCommand2({
|
|
369
|
+
resource: "property",
|
|
370
|
+
command: "create-and-bind-csv-dimension-table",
|
|
371
|
+
capabilityId: "metadata.property.create_and_bind_csv_dimension_table",
|
|
372
|
+
description: "Create a CSV-backed dimension data table and bind it to a metadata property.",
|
|
373
|
+
flags: [
|
|
374
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
375
|
+
{ name: "property-name", type: "string", required: true, desc: "Property technical name." },
|
|
376
|
+
{ name: "property-scope", type: "string", required: true, desc: "Property owner table, for example event or user." },
|
|
377
|
+
{ name: "input-file-id", type: "string", required: true, desc: "Uploaded input file ID, for example ifile_<32 lowercase hex>." },
|
|
378
|
+
{ name: "data-table-name", type: "string", required: false, desc: "Technical data table name." },
|
|
379
|
+
{ name: "display-name", type: "string", required: false, desc: "Human-readable data table name." },
|
|
380
|
+
{ name: "description", type: "string", required: false, desc: "Data table description." },
|
|
381
|
+
{ name: "columns", type: "json", required: false, desc: "Column definitions JSON array." },
|
|
382
|
+
{ name: "timestamp-join-format", type: "string", required: false, desc: "Optional timestamp join format." },
|
|
383
|
+
{ name: "dict-columns", type: "json", required: false, desc: "Optional dictionary column names JSON array." }
|
|
384
|
+
],
|
|
385
|
+
risk: "write",
|
|
386
|
+
buildInput: (ctx) => ({
|
|
387
|
+
project_id: ctx.num("project-id"),
|
|
388
|
+
property_name: ctx.str("property-name"),
|
|
389
|
+
property_scope: ctx.str("property-scope"),
|
|
390
|
+
input_file_id: ctx.str("input-file-id"),
|
|
391
|
+
data_table_name: optionalString(ctx, "data-table-name"),
|
|
392
|
+
display_name: optionalString(ctx, "display-name"),
|
|
393
|
+
description: optionalString(ctx, "description"),
|
|
394
|
+
columns: optionalJson(ctx, "columns"),
|
|
395
|
+
timestamp_join_format: optionalString(ctx, "timestamp-join-format"),
|
|
396
|
+
dict_columns: optionalJson(ctx, "dict-columns")
|
|
397
|
+
})
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
// src/commands/metadata/index.ts
|
|
401
|
+
registerCapabilityGatewayRoute("metadata", { gatewayDomain: "analysis" });
|
|
402
|
+
var commands = [
|
|
403
|
+
eventGet,
|
|
404
|
+
propertyGet,
|
|
405
|
+
dataTableList,
|
|
406
|
+
dataTableGet,
|
|
407
|
+
dataTableCsvWrite,
|
|
408
|
+
dataTableSqlWrite,
|
|
409
|
+
dataTableCsvDelete,
|
|
410
|
+
dataTableSqlDelete,
|
|
411
|
+
dataTableDownload,
|
|
412
|
+
dataTablePropertyBindingsUpdate,
|
|
413
|
+
inputFileUpload,
|
|
414
|
+
propertyDimensionTableBindExisting,
|
|
415
|
+
propertyDimensionTableCreateAndBindCsv
|
|
416
|
+
];
|
|
417
|
+
var metadata_default = commands;
|
|
418
|
+
export {
|
|
419
|
+
metadata_default as default
|
|
420
|
+
};
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
getClaudeConfigDir,
|
|
10
10
|
getSandboxModels,
|
|
11
11
|
postSandboxModelSelection
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-H52CSLJW.js";
|
|
13
|
+
import "./chunk-WPXHCP4A.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/model/index.ts
|
|
16
16
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
printError,
|
|
3
3
|
printOutput
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YACCPUNQ.js";
|
|
5
5
|
import {
|
|
6
6
|
httpGet,
|
|
7
7
|
httpPost
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-E34XH4GW.js";
|
|
9
9
|
import {
|
|
10
10
|
SecureStoreAuthError,
|
|
11
11
|
resolveHost
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-U6QPKCN3.js";
|
|
13
13
|
import {
|
|
14
14
|
safeJsonParse
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WPXHCP4A.js";
|
|
16
16
|
|
|
17
17
|
// src/api/raw.ts
|
|
18
18
|
function registerApi(program) {
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
getSandboxSyncPullCandidates,
|
|
20
20
|
postSandboxSyncPull,
|
|
21
21
|
postToMainApp
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-H52CSLJW.js";
|
|
23
23
|
import {
|
|
24
24
|
printError
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-YACCPUNQ.js";
|
|
26
|
+
import "./chunk-WPXHCP4A.js";
|
|
27
27
|
|
|
28
28
|
// src/commands/sync/index.ts
|
|
29
29
|
import Table from "cli-table3";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
patchToMainApp,
|
|
5
5
|
postToMainApp,
|
|
6
6
|
uploadToMainApp
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-H52CSLJW.js";
|
|
8
|
+
import "./chunk-WPXHCP4A.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/te-agent/agents.ts
|
|
11
11
|
var BASE_PATH = "/api/sandbox/agent/agents";
|