@thinkingai/ae-cli 6.1.13 → 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.
Files changed (32) hide show
  1. package/dist/index.js +3 -3
  2. package/dist/{metadata-VVQ3AQT5.js → metadata-5MIMNIMT.js} +12 -9
  3. package/dist/{metadata-UORZTW3T.js → metadata-LERKDJN6.js} +12 -9
  4. package/dist/{te-analysis-LLOCCBJ4.js → te-analysis-FCHRTNIY.js} +48 -48
  5. package/dist/{te-analysis-KOKHJJPE.js → te-analysis-QG7UKGDA.js} +48 -48
  6. package/dist/{te-engage-BRLSRVQT.js → te-engage-D6EG3NOR.js} +389 -4
  7. package/dist/{te-engage-HE4OPZIT.js → te-engage-ZSMIJLUW.js} +389 -4
  8. package/package.json +1 -1
  9. package/skills/ae-analysis/references/ai_models.md +4 -1
  10. package/skills/ae-analysis/references/alert_list.md +2 -3
  11. package/skills/ae-analysis/references/analysis_gateway_assets.md +5 -5
  12. package/skills/ae-analysis/references/bi_panel_list.md +2 -2
  13. package/skills/ae-analysis/references/command_index.md +14 -14
  14. package/skills/ae-analysis/references/dashboard_list.md +2 -2
  15. package/skills/ae-analysis/references/favorite_add.md +2 -2
  16. package/skills/ae-analysis/references/favorite_remove.md +2 -2
  17. package/skills/ae-analysis/references/metric_create.md +7 -8
  18. package/skills/ae-analysis/references/project_space_list.md +2 -2
  19. package/skills/ae-analysis/references/public_link_list.md +2 -2
  20. package/skills/ae-analysis/references/report_list.md +3 -3
  21. package/skills/ae-analysis/references/report_list_export.md +2 -2
  22. package/skills/ae-analysis/references/sql_table_list.md +3 -2
  23. package/skills/ae-analysis/references/user_cluster_update.md +4 -2
  24. package/skills/ae-analysis/references/user_tag_update.md +4 -2
  25. package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +3 -3
  26. package/skills/ae-engage/SKILL.md +10 -2
  27. package/skills/ae-engage/references/flow-metric-user.md +2 -1
  28. package/skills/ae-engage/references/flow-node-metric-user.md +2 -1
  29. package/skills/ae-engage/references/flow-node-user.md +2 -1
  30. package/skills/ae-engage/references/task-indicator-user.md +104 -0
  31. package/skills/ae-engage/references/task-user-detail-export.md +31 -0
  32. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
package/dist/index.js CHANGED
@@ -3442,12 +3442,12 @@ program.name("ae-cli").version(version).description("CLI tool for ThinkingAI (AE
3442
3442
  async function loadCommands() {
3443
3443
  const commands = [];
3444
3444
  try {
3445
- const teAnalysis = await import("./te-analysis-KOKHJJPE.js");
3445
+ const teAnalysis = await import("./te-analysis-QG7UKGDA.js");
3446
3446
  commands.push(...teAnalysis.default);
3447
3447
  } catch {
3448
3448
  }
3449
3449
  try {
3450
- const engage = await import("./te-engage-BRLSRVQT.js");
3450
+ const engage = await import("./te-engage-D6EG3NOR.js");
3451
3451
  commands.push(...engage.default);
3452
3452
  } catch {
3453
3453
  }
@@ -3492,7 +3492,7 @@ async function loadCommands() {
3492
3492
  } catch {
3493
3493
  }
3494
3494
  try {
3495
- const metadata = await import("./metadata-UORZTW3T.js");
3495
+ const metadata = await import("./metadata-LERKDJN6.js");
3496
3496
  commands.push(...metadata.default);
3497
3497
  } catch {
3498
3498
  }
@@ -269,17 +269,20 @@ var propertyDimensionTableBindExisting = createCapabilityCommand2({
269
269
  { name: "property-scope", type: "string", required: true, desc: "Property owner table, for example event or user." },
270
270
  { name: "data-table-id", type: "number", required: true, desc: "Existing dimension data table ID." },
271
271
  { name: "timestamp-join-format", type: "string", required: false, desc: "Optional timestamp join format." },
272
- { name: "dict-columns", type: "json", required: false, desc: "Optional dictionary column names JSON array." }
272
+ { name: "dict-columns", type: "json", required: false, desc: "Optional dictionary column names JSON array. String entries are normalized to column_name objects." }
273
273
  ],
274
274
  risk: "write",
275
- buildInput: (ctx) => ({
276
- project_id: ctx.num("project-id"),
277
- property_name: ctx.str("property-name"),
278
- property_scope: ctx.str("property-scope"),
279
- data_table_id: ctx.num("data-table-id"),
280
- timestamp_join_format: optionalString(ctx, "timestamp-join-format"),
281
- dict_columns: optionalJson(ctx, "dict-columns")
282
- })
275
+ buildInput: (ctx) => {
276
+ const dictColumns = optionalJson(ctx, "dict-columns");
277
+ return {
278
+ project_id: ctx.num("project-id"),
279
+ property_name: ctx.str("property-name"),
280
+ property_scope: ctx.str("property-scope"),
281
+ data_table_id: ctx.num("data-table-id"),
282
+ timestamp_join_format: optionalString(ctx, "timestamp-join-format"),
283
+ dict_columns: Array.isArray(dictColumns) ? dictColumns.map((column) => typeof column === "string" ? { column_name: column } : column) : dictColumns
284
+ };
285
+ }
283
286
  });
284
287
 
285
288
  // src/commands/metadata/property/dimension-table/create-and-bind-csv.ts
@@ -269,17 +269,20 @@ var propertyDimensionTableBindExisting = createCapabilityCommand2({
269
269
  { name: "property-scope", type: "string", required: true, desc: "Property owner table, for example event or user." },
270
270
  { name: "data-table-id", type: "number", required: true, desc: "Existing dimension data table ID." },
271
271
  { name: "timestamp-join-format", type: "string", required: false, desc: "Optional timestamp join format." },
272
- { name: "dict-columns", type: "json", required: false, desc: "Optional dictionary column names JSON array." }
272
+ { name: "dict-columns", type: "json", required: false, desc: "Optional dictionary column names JSON array. String entries are normalized to column_name objects." }
273
273
  ],
274
274
  risk: "write",
275
- buildInput: (ctx) => ({
276
- project_id: ctx.num("project-id"),
277
- property_name: ctx.str("property-name"),
278
- property_scope: ctx.str("property-scope"),
279
- data_table_id: ctx.num("data-table-id"),
280
- timestamp_join_format: optionalString(ctx, "timestamp-join-format"),
281
- dict_columns: optionalJson(ctx, "dict-columns")
282
- })
275
+ buildInput: (ctx) => {
276
+ const dictColumns = optionalJson(ctx, "dict-columns");
277
+ return {
278
+ project_id: ctx.num("project-id"),
279
+ property_name: ctx.str("property-name"),
280
+ property_scope: ctx.str("property-scope"),
281
+ data_table_id: ctx.num("data-table-id"),
282
+ timestamp_join_format: optionalString(ctx, "timestamp-join-format"),
283
+ dict_columns: Array.isArray(dictColumns) ? dictColumns.map((column) => typeof column === "string" ? { column_name: column } : column) : dictColumns
284
+ };
285
+ }
283
286
  });
284
287
 
285
288
  // src/commands/metadata/property/dimension-table/create-and-bind-csv.ts
@@ -258,7 +258,7 @@ function projectInput(ctx) {
258
258
  function listInput(ctx) {
259
259
  return compactInput({
260
260
  ...projectInput(ctx),
261
- query: optionalString(ctx, "query"),
261
+ queries: optionalJson(ctx, "queries"),
262
262
  fields: optionalJson(ctx, "fields"),
263
263
  limit: optionalNumber(ctx, "limit"),
264
264
  offset: optionalNumber(ctx, "offset")
@@ -1281,7 +1281,7 @@ var metadataVirtualPropertySqlRuleUpdate = createAnalysisMetaCapabilityCommand({
1281
1281
  flags: [
1282
1282
  projectIdFlag,
1283
1283
  { name: "sql-expression", type: "string", required: true, desc: "SQL expression used to calculate the virtual property." },
1284
- { name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with prop_id/property fields." },
1284
+ { name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with prop_id beside property." },
1285
1285
  { name: "properties", type: "json", required: false, desc: "Dependent property JSON array." },
1286
1286
  { name: "sql-event-relation-type", type: "string", required: false, desc: "relation_default, relation_always, or relation_by_setting." },
1287
1287
  { name: "related-events", type: "json", required: false, desc: "Related events JSON array when using relation_by_setting." },
@@ -1396,16 +1396,7 @@ var metadataMetricGet = createAnalysisMetaCapabilityCommand({
1396
1396
 
1397
1397
  // src/commands/te-analysis/meta/metric/shared.ts
1398
1398
  function metricMode(ctx) {
1399
- const mode = optionalNumber(ctx, "metric-mode");
1400
- const modelType = optionalString(ctx, "model-type");
1401
- const mapped = modelType === void 0 ? void 0 : modelTypeToMetricMode(modelType);
1402
- if (mode === void 0 && mapped === void 0) {
1403
- throw new Error("Pass one of --model-type or --metric-mode");
1404
- }
1405
- if (mode !== void 0 && mapped !== void 0 && mode !== mapped) {
1406
- throw new Error("--metric-mode must match --model-type when both are provided");
1407
- }
1408
- return mode ?? mapped;
1399
+ return modelTypeToMetricMode(ctx.str("model-type"));
1409
1400
  }
1410
1401
  function optionalMetricMode(ctx) {
1411
1402
  const mode = optionalNumber(ctx, "metric-mode");
@@ -1438,9 +1429,8 @@ var metadataMetricCreate = createAnalysisMetaCapabilityCommand({
1438
1429
  { name: "metric-name", type: "string", required: true, desc: "Metric technical name, for example pay_count." },
1439
1430
  { name: "metric-desc", type: "string", required: true, desc: "Metric display name." },
1440
1431
  { name: "metric-remark", type: "string", required: false, desc: "Metric remark." },
1441
- { name: "metric-mode", type: "number", required: false, desc: "Metric model mode, for example 0 for event analysis." },
1442
- { name: "model-type", type: "string", required: false, desc: "Semantic metric model type: event or retention. Prefer this over metric-mode." },
1443
- { 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." },
1444
1434
  { name: "metric-params", type: "json", required: false, desc: "Metric params JSON object. Defaults to {} in common when omitted." }
1445
1435
  ],
1446
1436
  risk: "write",
@@ -2329,8 +2319,9 @@ var reportList = createAnalysisCapabilityCommand({
2329
2319
  command: "list",
2330
2320
  capabilityId: "analysis.report.list",
2331
2321
  description: "List analysis reports visible to the current user through the capability gateway.",
2332
- flags: [projectIdFlag, queryFlag, fieldsFlag, reportModelTypesFlag, reportListLimitFlag, directoryOffsetFlag],
2322
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, reportModelTypesFlag, reportListLimitFlag, directoryOffsetFlag],
2333
2323
  risk: "read",
2324
+ validate: validateQueriesFlag,
2334
2325
  buildInput: reportListInput
2335
2326
  });
2336
2327
 
@@ -2343,7 +2334,7 @@ var reportListExport = createAnalysisCapabilityCommand({
2343
2334
  description: "Export the accessible report catalog as a gzip artifact.",
2344
2335
  flags: [
2345
2336
  projectIdFlag,
2346
- queryFlag,
2337
+ queriesFlag,
2347
2338
  fieldsFlag,
2348
2339
  reportModelTypesFlag,
2349
2340
  requestIdFlag,
@@ -2351,9 +2342,10 @@ var reportListExport = createAnalysisCapabilityCommand({
2351
2342
  asyncTimeoutSecondsFlag
2352
2343
  ],
2353
2344
  risk: "read",
2345
+ validate: validateQueriesFlag,
2354
2346
  buildInput: (ctx) => compactInput({
2355
2347
  ...projectInput(ctx),
2356
- query: optionalString(ctx, "query"),
2348
+ queries: optionalQueries(ctx),
2357
2349
  fields: optionalJson(ctx, "fields"),
2358
2350
  model_types: optionalJson(ctx, "model-types"),
2359
2351
  ...exportLifecycleInput(ctx)
@@ -2736,7 +2728,7 @@ var dashboardList = createAnalysisCapabilityCommand({
2736
2728
  description: "List dashboards visible to the current user through the capability gateway.",
2737
2729
  flags: [
2738
2730
  projectIdFlag,
2739
- queryFlag,
2731
+ queriesFlag,
2740
2732
  {
2741
2733
  name: "fields",
2742
2734
  type: "json",
@@ -2748,6 +2740,7 @@ var dashboardList = createAnalysisCapabilityCommand({
2748
2740
  directoryOffsetFlag
2749
2741
  ],
2750
2742
  risk: "read",
2743
+ validate: validateQueriesFlag,
2751
2744
  buildInput: listInput
2752
2745
  });
2753
2746
 
@@ -3713,8 +3706,9 @@ var biPanelList = createAnalysisCapabilityCommand({
3713
3706
  command: "list",
3714
3707
  capabilityId: "analysis.bi_panel.list",
3715
3708
  description: "List BI panels visible to the current user through the capability gateway.",
3716
- flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3709
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3717
3710
  risk: "read",
3711
+ validate: validateQueriesFlag,
3718
3712
  buildInput: listInput
3719
3713
  });
3720
3714
 
@@ -3958,8 +3952,9 @@ var projectSpaceList = createAnalysisCapabilityCommand({
3958
3952
  command: "list",
3959
3953
  capabilityId: "analysis.project_space.list",
3960
3954
  description: "List project spaces visible to the current user.",
3961
- flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3955
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3962
3956
  risk: "read",
3957
+ validate: validateQueriesFlag,
3963
3958
  buildInput: listInput
3964
3959
  });
3965
3960
 
@@ -3993,20 +3988,16 @@ var favoriteAdd = createAnalysisCapabilityCommand({
3993
3988
  description: "Favorite one dashboard, BI panel, or folder.",
3994
3989
  flags: [
3995
3990
  projectIdFlag,
3996
- { name: "asset-id", type: "number", required: false, desc: "Asset ID." },
3997
- { name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
3998
- { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
3999
- { name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
4000
- 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." }
4001
3994
  ],
4002
3995
  risk: "write",
4003
3996
  buildInput: (ctx) => compactInput({
4004
3997
  ...projectInput(ctx),
4005
- asset_id: optionalNumber(ctx, "asset-id"),
4006
- asset_type: optionalString(ctx, "asset-type"),
4007
- space_id: optionalNumber(ctx, "space-id"),
4008
- id: optionalNumber(ctx, "id"),
4009
- 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")
4010
4001
  })
4011
4002
  });
4012
4003
 
@@ -4018,20 +4009,16 @@ var favoriteRemove = createAnalysisCapabilityCommand({
4018
4009
  description: "Remove favorite from one dashboard, BI panel, or folder.",
4019
4010
  flags: [
4020
4011
  projectIdFlag,
4021
- { name: "asset-id", type: "number", required: false, desc: "Asset ID." },
4022
- { name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
4023
- { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
4024
- { name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
4025
- 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." }
4026
4015
  ],
4027
4016
  risk: "write",
4028
4017
  buildInput: (ctx) => compactInput({
4029
4018
  ...projectInput(ctx),
4030
- asset_id: optionalNumber(ctx, "asset-id"),
4031
- asset_type: optionalString(ctx, "asset-type"),
4032
- space_id: optionalNumber(ctx, "space-id"),
4033
- id: optionalNumber(ctx, "id"),
4034
- 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")
4035
4022
  })
4036
4023
  });
4037
4024
 
@@ -4079,8 +4066,9 @@ var publicLinkList = createAnalysisCapabilityCommand({
4079
4066
  command: "list",
4080
4067
  capabilityId: "analysis.public_link.list",
4081
4068
  description: "List public links in a project.",
4082
- flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
4069
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
4083
4070
  risk: "read",
4071
+ validate: validateQueriesFlag,
4084
4072
  buildInput: listInput
4085
4073
  });
4086
4074
 
@@ -4747,6 +4735,12 @@ var zoneOffsetFlag3 = {
4747
4735
  required: false,
4748
4736
  desc: "Optional timezone offset. UTC+8 is 8; UTC-5 is -5."
4749
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
+ };
4750
4744
  var entityIdFlag = {
4751
4745
  name: "entity-id",
4752
4746
  type: "number",
@@ -4988,6 +4982,7 @@ function clusterWriteInput(ctx, create) {
4988
4982
  authenticated_only: optionalBoolean(ctx, "authenticated-only"),
4989
4983
  remark: create ? void 0 : optionalString(ctx, "remark"),
4990
4984
  zone_offset: optionalNumber(ctx, "zone-offset"),
4985
+ auto_refresh_cron: create ? void 0 : optionalString(ctx, "auto-refresh-cron"),
4991
4986
  entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
4992
4987
  });
4993
4988
  }
@@ -5002,6 +4997,7 @@ function tagWriteInput(ctx, create) {
5002
4997
  authenticated_only: optionalBoolean(ctx, "authenticated-only"),
5003
4998
  remark: create ? void 0 : optionalString(ctx, "remark"),
5004
4999
  zone_offset: optionalNumber(ctx, "zone-offset"),
5000
+ auto_refresh_cron: create ? void 0 : optionalString(ctx, "auto-refresh-cron"),
5005
5001
  entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
5006
5002
  });
5007
5003
  }
@@ -5180,7 +5176,8 @@ var commands40 = [
5180
5176
  optionalClusterDefinitionRequestFlag,
5181
5177
  authenticatedOnlyFlag,
5182
5178
  remarkFlag,
5183
- zoneOffsetFlag3
5179
+ zoneOffsetFlag3,
5180
+ autoRefreshCronFlag
5184
5181
  ], "write", (ctx) => clusterWriteInput(ctx, false)),
5185
5182
  idImportCapability(capability("user-cluster", "create-id", "analysis.user_cluster.create_id", "Create a cluster by mapping imported values to an analysis entity.", [
5186
5183
  projectIdFlag,
@@ -5272,7 +5269,8 @@ var commands40 = [
5272
5269
  optionalTagDefinitionRequestFlag,
5273
5270
  authenticatedOnlyFlag,
5274
5271
  remarkFlag,
5275
- zoneOffsetFlag3
5272
+ zoneOffsetFlag3,
5273
+ autoRefreshCronFlag
5276
5274
  ], "write", (ctx) => tagWriteInput(ctx, false)),
5277
5275
  capability("user-tag", "refresh", "analysis.user_tag.refresh", "Refresh a user tag by exact tag_name.", [
5278
5276
  projectIdFlag,
@@ -5422,11 +5420,12 @@ var sqlTableList = createAnalysisCapabilityCommand({
5422
5420
  command: "list",
5423
5421
  capabilityId: "analysis.sql_table.list",
5424
5422
  description: "List server-authoritative SQL table references queryable by the current user in a project.",
5425
- flags: [projectIdFlag, queryFlag, directoryLimitFlag, directoryOffsetFlag, sqlTableUsageFlag],
5423
+ flags: [projectIdFlag, queriesFlag, directoryLimitFlag, directoryOffsetFlag, sqlTableUsageFlag],
5426
5424
  risk: "read",
5425
+ validate: validateQueriesFlag,
5427
5426
  buildInput: (ctx) => compactInput({
5428
5427
  project_id: ctx.num("project-id"),
5429
- query: optionalString(ctx, "query"),
5428
+ queries: optionalQueries(ctx),
5430
5429
  limit: optionalNumber(ctx, "limit"),
5431
5430
  offset: optionalNumber(ctx, "offset"),
5432
5431
  usage: optionalString(ctx, "usage")
@@ -7674,9 +7673,10 @@ var analysisAlertList = createAnalysisCapabilityCommand({
7674
7673
  command: "list",
7675
7674
  capabilityId: "analysis.alert.list",
7676
7675
  description: "List project alerts.",
7677
- flags: [projectIdFlag, queryFlag, directoryLimitFlag, directoryOffsetFlag],
7676
+ flags: [projectIdFlag, queriesFlag, directoryLimitFlag, directoryOffsetFlag],
7678
7677
  risk: "read",
7679
- buildInput: (ctx) => compactInput({ ...projectInput3(ctx), query: optionalString(ctx, "query"), limit: optionalNumber(ctx, "limit"), offset: optionalNumber(ctx, "offset") })
7678
+ validate: validateQueriesFlag,
7679
+ buildInput: (ctx) => compactInput({ ...projectInput3(ctx), queries: optionalQueries(ctx), limit: optionalNumber(ctx, "limit"), offset: optionalNumber(ctx, "offset") })
7680
7680
  });
7681
7681
 
7682
7682
  // src/commands/te-analysis/alert/get.ts
@@ -258,7 +258,7 @@ function projectInput(ctx) {
258
258
  function listInput(ctx) {
259
259
  return compactInput({
260
260
  ...projectInput(ctx),
261
- query: optionalString(ctx, "query"),
261
+ queries: optionalJson(ctx, "queries"),
262
262
  fields: optionalJson(ctx, "fields"),
263
263
  limit: optionalNumber(ctx, "limit"),
264
264
  offset: optionalNumber(ctx, "offset")
@@ -1281,7 +1281,7 @@ var metadataVirtualPropertySqlRuleUpdate = createAnalysisMetaCapabilityCommand({
1281
1281
  flags: [
1282
1282
  projectIdFlag,
1283
1283
  { name: "sql-expression", type: "string", required: true, desc: "SQL expression used to calculate the virtual property." },
1284
- { name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with prop_id/property fields." },
1284
+ { name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with prop_id beside property." },
1285
1285
  { name: "properties", type: "json", required: false, desc: "Dependent property JSON array." },
1286
1286
  { name: "sql-event-relation-type", type: "string", required: false, desc: "relation_default, relation_always, or relation_by_setting." },
1287
1287
  { name: "related-events", type: "json", required: false, desc: "Related events JSON array when using relation_by_setting." },
@@ -1396,16 +1396,7 @@ var metadataMetricGet = createAnalysisMetaCapabilityCommand({
1396
1396
 
1397
1397
  // src/commands/te-analysis/meta/metric/shared.ts
1398
1398
  function metricMode(ctx) {
1399
- const mode = optionalNumber(ctx, "metric-mode");
1400
- const modelType = optionalString(ctx, "model-type");
1401
- const mapped = modelType === void 0 ? void 0 : modelTypeToMetricMode(modelType);
1402
- if (mode === void 0 && mapped === void 0) {
1403
- throw new Error("Pass one of --model-type or --metric-mode");
1404
- }
1405
- if (mode !== void 0 && mapped !== void 0 && mode !== mapped) {
1406
- throw new Error("--metric-mode must match --model-type when both are provided");
1407
- }
1408
- return mode ?? mapped;
1399
+ return modelTypeToMetricMode(ctx.str("model-type"));
1409
1400
  }
1410
1401
  function optionalMetricMode(ctx) {
1411
1402
  const mode = optionalNumber(ctx, "metric-mode");
@@ -1438,9 +1429,8 @@ var metadataMetricCreate = createAnalysisMetaCapabilityCommand({
1438
1429
  { name: "metric-name", type: "string", required: true, desc: "Metric technical name, for example pay_count." },
1439
1430
  { name: "metric-desc", type: "string", required: true, desc: "Metric display name." },
1440
1431
  { name: "metric-remark", type: "string", required: false, desc: "Metric remark." },
1441
- { name: "metric-mode", type: "number", required: false, desc: "Metric model mode, for example 0 for event analysis." },
1442
- { name: "model-type", type: "string", required: false, desc: "Semantic metric model type: event or retention. Prefer this over metric-mode." },
1443
- { 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." },
1444
1434
  { name: "metric-params", type: "json", required: false, desc: "Metric params JSON object. Defaults to {} in common when omitted." }
1445
1435
  ],
1446
1436
  risk: "write",
@@ -2329,8 +2319,9 @@ var reportList = createAnalysisCapabilityCommand({
2329
2319
  command: "list",
2330
2320
  capabilityId: "analysis.report.list",
2331
2321
  description: "List analysis reports visible to the current user through the capability gateway.",
2332
- flags: [projectIdFlag, queryFlag, fieldsFlag, reportModelTypesFlag, reportListLimitFlag, directoryOffsetFlag],
2322
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, reportModelTypesFlag, reportListLimitFlag, directoryOffsetFlag],
2333
2323
  risk: "read",
2324
+ validate: validateQueriesFlag,
2334
2325
  buildInput: reportListInput
2335
2326
  });
2336
2327
 
@@ -2343,7 +2334,7 @@ var reportListExport = createAnalysisCapabilityCommand({
2343
2334
  description: "Export the accessible report catalog as a gzip artifact.",
2344
2335
  flags: [
2345
2336
  projectIdFlag,
2346
- queryFlag,
2337
+ queriesFlag,
2347
2338
  fieldsFlag,
2348
2339
  reportModelTypesFlag,
2349
2340
  requestIdFlag,
@@ -2351,9 +2342,10 @@ var reportListExport = createAnalysisCapabilityCommand({
2351
2342
  asyncTimeoutSecondsFlag
2352
2343
  ],
2353
2344
  risk: "read",
2345
+ validate: validateQueriesFlag,
2354
2346
  buildInput: (ctx) => compactInput({
2355
2347
  ...projectInput(ctx),
2356
- query: optionalString(ctx, "query"),
2348
+ queries: optionalQueries(ctx),
2357
2349
  fields: optionalJson(ctx, "fields"),
2358
2350
  model_types: optionalJson(ctx, "model-types"),
2359
2351
  ...exportLifecycleInput(ctx)
@@ -2736,7 +2728,7 @@ var dashboardList = createAnalysisCapabilityCommand({
2736
2728
  description: "List dashboards visible to the current user through the capability gateway.",
2737
2729
  flags: [
2738
2730
  projectIdFlag,
2739
- queryFlag,
2731
+ queriesFlag,
2740
2732
  {
2741
2733
  name: "fields",
2742
2734
  type: "json",
@@ -2748,6 +2740,7 @@ var dashboardList = createAnalysisCapabilityCommand({
2748
2740
  directoryOffsetFlag
2749
2741
  ],
2750
2742
  risk: "read",
2743
+ validate: validateQueriesFlag,
2751
2744
  buildInput: listInput
2752
2745
  });
2753
2746
 
@@ -3713,8 +3706,9 @@ var biPanelList = createAnalysisCapabilityCommand({
3713
3706
  command: "list",
3714
3707
  capabilityId: "analysis.bi_panel.list",
3715
3708
  description: "List BI panels visible to the current user through the capability gateway.",
3716
- flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3709
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3717
3710
  risk: "read",
3711
+ validate: validateQueriesFlag,
3718
3712
  buildInput: listInput
3719
3713
  });
3720
3714
 
@@ -3958,8 +3952,9 @@ var projectSpaceList = createAnalysisCapabilityCommand({
3958
3952
  command: "list",
3959
3953
  capabilityId: "analysis.project_space.list",
3960
3954
  description: "List project spaces visible to the current user.",
3961
- flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3955
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3962
3956
  risk: "read",
3957
+ validate: validateQueriesFlag,
3963
3958
  buildInput: listInput
3964
3959
  });
3965
3960
 
@@ -3993,20 +3988,16 @@ var favoriteAdd = createAnalysisCapabilityCommand({
3993
3988
  description: "Favorite one dashboard, BI panel, or folder.",
3994
3989
  flags: [
3995
3990
  projectIdFlag,
3996
- { name: "asset-id", type: "number", required: false, desc: "Asset ID." },
3997
- { name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
3998
- { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
3999
- { name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
4000
- 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." }
4001
3994
  ],
4002
3995
  risk: "write",
4003
3996
  buildInput: (ctx) => compactInput({
4004
3997
  ...projectInput(ctx),
4005
- asset_id: optionalNumber(ctx, "asset-id"),
4006
- asset_type: optionalString(ctx, "asset-type"),
4007
- space_id: optionalNumber(ctx, "space-id"),
4008
- id: optionalNumber(ctx, "id"),
4009
- 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")
4010
4001
  })
4011
4002
  });
4012
4003
 
@@ -4018,20 +4009,16 @@ var favoriteRemove = createAnalysisCapabilityCommand({
4018
4009
  description: "Remove favorite from one dashboard, BI panel, or folder.",
4019
4010
  flags: [
4020
4011
  projectIdFlag,
4021
- { name: "asset-id", type: "number", required: false, desc: "Asset ID." },
4022
- { name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
4023
- { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
4024
- { name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
4025
- 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." }
4026
4015
  ],
4027
4016
  risk: "write",
4028
4017
  buildInput: (ctx) => compactInput({
4029
4018
  ...projectInput(ctx),
4030
- asset_id: optionalNumber(ctx, "asset-id"),
4031
- asset_type: optionalString(ctx, "asset-type"),
4032
- space_id: optionalNumber(ctx, "space-id"),
4033
- id: optionalNumber(ctx, "id"),
4034
- 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")
4035
4022
  })
4036
4023
  });
4037
4024
 
@@ -4079,8 +4066,9 @@ var publicLinkList = createAnalysisCapabilityCommand({
4079
4066
  command: "list",
4080
4067
  capabilityId: "analysis.public_link.list",
4081
4068
  description: "List public links in a project.",
4082
- flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
4069
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
4083
4070
  risk: "read",
4071
+ validate: validateQueriesFlag,
4084
4072
  buildInput: listInput
4085
4073
  });
4086
4074
 
@@ -4747,6 +4735,12 @@ var zoneOffsetFlag3 = {
4747
4735
  required: false,
4748
4736
  desc: "Optional timezone offset. UTC+8 is 8; UTC-5 is -5."
4749
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
+ };
4750
4744
  var entityIdFlag = {
4751
4745
  name: "entity-id",
4752
4746
  type: "number",
@@ -4988,6 +4982,7 @@ function clusterWriteInput(ctx, create) {
4988
4982
  authenticated_only: optionalBoolean(ctx, "authenticated-only"),
4989
4983
  remark: create ? void 0 : optionalString(ctx, "remark"),
4990
4984
  zone_offset: optionalNumber(ctx, "zone-offset"),
4985
+ auto_refresh_cron: create ? void 0 : optionalString(ctx, "auto-refresh-cron"),
4991
4986
  entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
4992
4987
  });
4993
4988
  }
@@ -5002,6 +4997,7 @@ function tagWriteInput(ctx, create) {
5002
4997
  authenticated_only: optionalBoolean(ctx, "authenticated-only"),
5003
4998
  remark: create ? void 0 : optionalString(ctx, "remark"),
5004
4999
  zone_offset: optionalNumber(ctx, "zone-offset"),
5000
+ auto_refresh_cron: create ? void 0 : optionalString(ctx, "auto-refresh-cron"),
5005
5001
  entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
5006
5002
  });
5007
5003
  }
@@ -5180,7 +5176,8 @@ var commands40 = [
5180
5176
  optionalClusterDefinitionRequestFlag,
5181
5177
  authenticatedOnlyFlag,
5182
5178
  remarkFlag,
5183
- zoneOffsetFlag3
5179
+ zoneOffsetFlag3,
5180
+ autoRefreshCronFlag
5184
5181
  ], "write", (ctx) => clusterWriteInput(ctx, false)),
5185
5182
  idImportCapability(capability("user-cluster", "create-id", "analysis.user_cluster.create_id", "Create a cluster by mapping imported values to an analysis entity.", [
5186
5183
  projectIdFlag,
@@ -5272,7 +5269,8 @@ var commands40 = [
5272
5269
  optionalTagDefinitionRequestFlag,
5273
5270
  authenticatedOnlyFlag,
5274
5271
  remarkFlag,
5275
- zoneOffsetFlag3
5272
+ zoneOffsetFlag3,
5273
+ autoRefreshCronFlag
5276
5274
  ], "write", (ctx) => tagWriteInput(ctx, false)),
5277
5275
  capability("user-tag", "refresh", "analysis.user_tag.refresh", "Refresh a user tag by exact tag_name.", [
5278
5276
  projectIdFlag,
@@ -5422,11 +5420,12 @@ var sqlTableList = createAnalysisCapabilityCommand({
5422
5420
  command: "list",
5423
5421
  capabilityId: "analysis.sql_table.list",
5424
5422
  description: "List server-authoritative SQL table references queryable by the current user in a project.",
5425
- flags: [projectIdFlag, queryFlag, directoryLimitFlag, directoryOffsetFlag, sqlTableUsageFlag],
5423
+ flags: [projectIdFlag, queriesFlag, directoryLimitFlag, directoryOffsetFlag, sqlTableUsageFlag],
5426
5424
  risk: "read",
5425
+ validate: validateQueriesFlag,
5427
5426
  buildInput: (ctx) => compactInput({
5428
5427
  project_id: ctx.num("project-id"),
5429
- query: optionalString(ctx, "query"),
5428
+ queries: optionalQueries(ctx),
5430
5429
  limit: optionalNumber(ctx, "limit"),
5431
5430
  offset: optionalNumber(ctx, "offset"),
5432
5431
  usage: optionalString(ctx, "usage")
@@ -7674,9 +7673,10 @@ var analysisAlertList = createAnalysisCapabilityCommand({
7674
7673
  command: "list",
7675
7674
  capabilityId: "analysis.alert.list",
7676
7675
  description: "List project alerts.",
7677
- flags: [projectIdFlag, queryFlag, directoryLimitFlag, directoryOffsetFlag],
7676
+ flags: [projectIdFlag, queriesFlag, directoryLimitFlag, directoryOffsetFlag],
7678
7677
  risk: "read",
7679
- buildInput: (ctx) => compactInput({ ...projectInput3(ctx), query: optionalString(ctx, "query"), limit: optionalNumber(ctx, "limit"), offset: optionalNumber(ctx, "offset") })
7678
+ validate: validateQueriesFlag,
7679
+ buildInput: (ctx) => compactInput({ ...projectInput3(ctx), queries: optionalQueries(ctx), limit: optionalNumber(ctx, "limit"), offset: optionalNumber(ctx, "offset") })
7680
7680
  });
7681
7681
 
7682
7682
  // src/commands/te-analysis/alert/get.ts