@thinkingai/ae-cli 6.0.34 → 6.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/index.js +22 -14
  2. package/dist/{metadata-W2MEOI4Z.js → metadata-ELUAR3EJ.js} +0 -53
  3. package/dist/{metadata-3M5F2AED.js → metadata-P5GIVMZ6.js} +0 -53
  4. package/dist/{te-agent-K2OWMZXT.js → te-agent-BOQ7ZY56.js} +194 -1
  5. package/dist/{te-analysis-Q7AZCDU4.js → te-analysis-HZIP6SYW.js} +446 -562
  6. package/dist/{te-analysis-I73ZS4NK.js → te-analysis-ZT2MYAHL.js} +446 -562
  7. package/dist/{te-dataops-MJV54MNY.js → te-dataops-VYN3IOKO.js} +6 -6
  8. package/dist/{te-dataops-OA7I6HBG.js → te-dataops-Y5QAPPPF.js} +6 -6
  9. package/dist/te-meta-GBDTMPEL.js +95 -0
  10. package/dist/te-meta-ZTLTSHXC.js +95 -0
  11. package/package.json +5 -4
  12. package/skills/ae-agent/SKILL.md +5 -1
  13. package/skills/ae-agent/references/list-sandbox-tools.md +79 -0
  14. package/skills/ae-analysis/SKILL.md +8 -9
  15. package/skills/ae-analysis/references/adhoc_export.md +8 -0
  16. package/skills/ae-analysis/references/adhoc_run.md +9 -0
  17. package/skills/ae-analysis/references/ai_models.md +3 -1
  18. package/skills/ae-analysis/references/analysis_data_retrieval.md +2 -0
  19. package/skills/ae-analysis/references/analysis_drilldown_contract.md +2 -0
  20. package/skills/ae-analysis/references/analysis_gateway_assets.md +9 -7
  21. package/skills/ae-analysis/references/command_index.md +18 -40
  22. package/skills/ae-analysis/references/dashboard_report_data_export.md +4 -2
  23. package/skills/ae-analysis/references/dashboard_report_data_run.md +5 -3
  24. package/skills/ae-analysis/references/drilldown_entities_export.md +3 -0
  25. package/skills/ae-analysis/references/drilldown_entities_run.md +2 -1
  26. package/skills/ae-analysis/references/drilldown_events_export.md +3 -0
  27. package/skills/ae-analysis/references/drilldown_events_run.md +2 -1
  28. package/skills/ae-analysis/references/drilldown_user_events_export.md +3 -0
  29. package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -0
  30. package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
  31. package/skills/ae-analysis/references/filter_value_list.md +47 -0
  32. package/skills/ae-analysis/references/project_space_get.md +3 -3
  33. package/skills/ae-analysis/references/project_space_list.md +6 -2
  34. package/skills/ae-analysis/references/query_cancel.md +3 -1
  35. package/skills/ae-analysis/references/query_cluster_list.md +34 -0
  36. package/skills/ae-analysis/references/query_create_result_cluster.md +2 -0
  37. package/skills/ae-analysis/references/report_create.md +5 -1
  38. package/skills/ae-analysis/references/report_data_export.md +9 -2
  39. package/skills/ae-analysis/references/report_data_run.md +8 -3
  40. package/skills/ae-analysis/references/report_get.md +3 -1
  41. package/skills/ae-analysis/references/report_update.md +4 -0
  42. package/skills/ae-analysis/references/virtual_event_create.md +7 -6
  43. package/skills/ae-analysis-global/SKILL.md +15 -32
  44. package/skills/ae-community/SKILL.md +1 -1
  45. package/skills/ae-data-integration-helper/SKILL.md +3 -2
  46. package/skills/ae-data-integration-helper/references/sdk_usage_notes.md +1 -1
  47. package/skills/ae-dataops/SKILL.md +2 -1
  48. package/skills/ae-dataops/references/dataops-integration.md +75 -6
  49. package/skills/ae-generate-tracking-code/SKILL.md +4 -3
  50. package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +1 -1
  51. package/skills/ae-generate-tracking-code/references/server-sdk-insert.md +1 -1
  52. package/skills/ae-generate-tracking-code/references/snippet-delivery.md +1 -1
  53. package/skills/ae-generate-tracking-plan/SKILL.md +6 -2
  54. package/skills/ae-metadata/SKILL.md +8 -15
  55. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
  56. package/dist/te-common-ST3QPSXJ.js +0 -61
  57. package/dist/te-common-WSLIKKPC.js +0 -61
  58. package/dist/te-meta-Q4L6EE3Q.js +0 -363
  59. package/dist/te-meta-VHCN4Q62.js +0 -363
  60. package/skills/ae-analysis/references/batch_create_metadata.md +0 -41
  61. package/skills/ae-analysis/references/batch_edit_metadata.md +0 -39
  62. package/skills/ae-analysis/references/cancel_query.md +0 -38
  63. package/skills/ae-analysis/references/create_alert.md +0 -47
  64. package/skills/ae-analysis/references/create_entity.md +0 -39
  65. package/skills/ae-analysis/references/create_project_mark_time.md +0 -39
  66. package/skills/ae-analysis/references/delete_alert.md +0 -32
  67. package/skills/ae-analysis/references/delete_project_mark_times.md +0 -36
  68. package/skills/ae-analysis/references/delete_track_items.md +0 -36
  69. package/skills/ae-analysis/references/generate_track_program.md +0 -52
  70. package/skills/ae-analysis/references/generate_track_sdk_sample.md +0 -44
  71. package/skills/ae-analysis/references/get_alert.md +0 -35
  72. package/skills/ae-analysis/references/get_alert_definition_schema.md +0 -33
  73. package/skills/ae-analysis/references/get_project_config.md +0 -33
  74. package/skills/ae-analysis/references/get_track_program.md +0 -34
  75. package/skills/ae-analysis/references/list_alerts.md +0 -41
  76. package/skills/ae-analysis/references/list_entities.md +0 -42
  77. package/skills/ae-analysis/references/list_project_mark_times.md +0 -43
  78. package/skills/ae-analysis/references/list_project_users.md +0 -33
  79. package/skills/ae-analysis/references/list_projects.md +0 -39
  80. package/skills/ae-analysis/references/load_filters.md +0 -47
  81. package/skills/ae-analysis/references/save_track_items.md +0 -37
  82. package/skills/ae-analysis/references/update_alert.md +0 -49
  83. package/skills/ae-analysis/references/update_project_mark_time.md +0 -40
  84. package/skills/ae-analysis-global/references/list_query_clusters.md +0 -68
  85. package/skills/ae-metadata/references/metadata_event_get.md +0 -52
  86. package/skills/ae-metadata/references/metadata_property_get.md +0 -54
  87. package/dist/{config-RCCGHHYA.js → config-PMPISN5Y.js} +4 -4
  88. package/dist/{te-community-WXGB6IOX.js → te-community-QOYIYEJI.js} +3 -3
  89. package/dist/{te-community-X2AHXGCA.js → te-community-UFKI6ONP.js} +3 -3
@@ -19,158 +19,12 @@ import {
19
19
  import {
20
20
  withOutputMetadata
21
21
  } from "./chunk-IMMGMU54.js";
22
- import {
23
- callMcpTool,
24
- parseMcpResult,
25
- resolveMcpUrl
26
- } from "./chunk-3P3562ZX.js";
27
- import {
28
- isGlobalQueryModeEnabled
29
- } from "./chunk-LCXU3AAT.js";
30
22
  import "./chunk-E7UXXHO3.js";
31
23
  import "./chunk-IR4ZLVPW.js";
32
24
  import "./chunk-V6FR6WTW.js";
33
25
  import "./chunk-24BAVOX3.js";
34
26
  import "./chunk-LYVNONC4.js";
35
27
 
36
- // src/commands/te-analysis/shared.ts
37
- function createMcpCommand(config) {
38
- const toolName = config.command.slice(1);
39
- const mcpService = config.mcpService || "analysis";
40
- return {
41
- service: "analysis",
42
- command: config.command,
43
- description: config.description,
44
- flags: config.flags,
45
- risk: config.risk,
46
- validate: config.validate,
47
- dryRun: (ctx) => ({
48
- method: "tools/call",
49
- url: resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService),
50
- body: {
51
- name: toolName,
52
- arguments: config.buildArgs(ctx)
53
- }
54
- }),
55
- execute: async (ctx) => {
56
- const url = resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService);
57
- const result = await callMcpTool(url, toolName, config.buildArgs(ctx), ctx.host());
58
- return parseMcpResult(result);
59
- }
60
- };
61
- }
62
- function optionalString(ctx, name) {
63
- const value = ctx.str(name);
64
- return value === "" ? void 0 : value;
65
- }
66
- function optionalNumber(ctx, name) {
67
- const value = ctx.str(name);
68
- return value === "" ? void 0 : Number(value);
69
- }
70
- function optionalBoolean(ctx, name) {
71
- const value = ctx.str(name);
72
- return value === "" ? void 0 : ctx.bool(name);
73
- }
74
- function requiredJsonString(ctx, name) {
75
- return JSON.stringify(ctx.json(name));
76
- }
77
-
78
- // src/commands/te-analysis/meta/get-alert-definition-schema.ts
79
- var getAlertDefinitionSchema = createMcpCommand({
80
- command: "+get_alert_definition_schema",
81
- description: "Get the alert definition schema. Returns field definitions, enum descriptions, and examples for creating or updating alerts.",
82
- flags: [],
83
- risk: "read",
84
- mcpService: "te_analysis_extend",
85
- buildArgs: () => ({})
86
- });
87
-
88
- // src/commands/te-analysis/meta/list-alerts.ts
89
- var listAlerts = createMcpCommand({
90
- command: "+list_alerts",
91
- description: "List all alerts in the project. Supports keyword filtering by alert name and returns a paginated alert list with total count.",
92
- flags: [
93
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
94
- { name: "query", type: "string", required: false, alias: "q", desc: "Optional keyword filter. Performs fuzzy matching against alert names; if omitted, all alerts are returned." },
95
- { name: "limit", type: "number", required: false, alias: "l", desc: "Optional page size. Default: 50, maximum: 200.", min: 1, max: 200 },
96
- { name: "offset", type: "number", required: false, alias: "o", desc: "Optional page offset. Default: 0." }
97
- ],
98
- risk: "read",
99
- mcpService: "te_analysis_extend",
100
- buildArgs: (ctx) => ({
101
- projectId: ctx.num("project_id"),
102
- query: optionalString(ctx, "query"),
103
- limit: optionalNumber(ctx, "limit"),
104
- offset: optionalNumber(ctx, "offset")
105
- })
106
- });
107
-
108
- // src/commands/te-analysis/meta/get-alert.ts
109
- var getAlert = createMcpCommand({
110
- command: "+get_alert",
111
- description: "Get detailed information about a specific alert by alertId.",
112
- flags: [
113
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
114
- { name: "alert_id", type: "number", required: true, alias: "a", desc: "Alert ID" }
115
- ],
116
- risk: "read",
117
- mcpService: "te_analysis_extend",
118
- buildArgs: (ctx) => ({
119
- projectId: ctx.num("project_id"),
120
- alertId: ctx.num("alert_id")
121
- })
122
- });
123
-
124
- // src/commands/te-analysis/meta/create-alert.ts
125
- var createAlert = createMcpCommand({
126
- command: "+create_alert",
127
- description: "Create a new alert. After creation, use list_alerts or get_alert to retrieve the created alert.",
128
- flags: [
129
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
130
- { name: "definition", type: "json", required: true, desc: "Alert definition JSON. See +get_alert_definition_schema for the complete structure." }
131
- ],
132
- risk: "write",
133
- mcpService: "te_analysis_extend",
134
- buildArgs: (ctx) => ({
135
- projectId: ctx.num("project_id"),
136
- definition: requiredJsonString(ctx, "definition")
137
- })
138
- });
139
-
140
- // src/commands/te-analysis/meta/update-alert.ts
141
- var updateAlert = createMcpCommand({
142
- command: "+update_alert",
143
- description: "Update an existing alert. All fields in the definition will replace existing values.",
144
- flags: [
145
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
146
- { name: "alert_id", type: "number", required: true, alias: "a", desc: "Alert ID" },
147
- { name: "definition", type: "json", required: true, desc: "Alert definition JSON with updated fields. See +get_alert_definition_schema for the complete structure." }
148
- ],
149
- risk: "write",
150
- mcpService: "te_analysis_extend",
151
- buildArgs: (ctx) => ({
152
- projectId: ctx.num("project_id"),
153
- alertId: ctx.num("alert_id"),
154
- definition: requiredJsonString(ctx, "definition")
155
- })
156
- });
157
-
158
- // src/commands/te-analysis/meta/delete-alert.ts
159
- var deleteAlert = createMcpCommand({
160
- command: "+delete_alert",
161
- description: "Delete an alert by alertId",
162
- flags: [
163
- { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
164
- { name: "alert_id", type: "number", required: true, desc: "Alert ID to delete" }
165
- ],
166
- risk: "high-risk-write",
167
- mcpService: "te_analysis_extend",
168
- buildArgs: (ctx) => ({
169
- projectId: ctx.num("project_id"),
170
- alertId: ctx.num("alert_id")
171
- })
172
- });
173
-
174
28
  // src/commands/te-analysis/capability-shared.ts
175
29
  var analysisDataRunRoutingHelp = "Routing: use run only for analysis data that fits <=1000 inline rows and <=180s; use export for full, unknown-size, >1000-row, or long-running data.";
176
30
  var analysisDataExportRoutingHelp = "Routing: use export for full, unknown-size, >1000-row, or long-running analysis data; inspect/download by run_id/artifact_id; use run only for <=1000-row inline previews.";
@@ -329,6 +183,31 @@ var asyncTimeoutSecondsFlag = {
329
183
  min: 1,
330
184
  max: 21600
331
185
  };
186
+ var clusterQueryScopeFlag = {
187
+ name: "cluster-query-scope",
188
+ type: "string",
189
+ required: false,
190
+ desc: "Optional physical query routing: GLOBAL aggregates accessible query clusters; SLAVE targets one --slave-cluster-id. Omit for the surface default."
191
+ };
192
+ var slaveClusterIdFlag = {
193
+ name: "slave-cluster-id",
194
+ type: "string",
195
+ required: false,
196
+ desc: "Physical slave query-cluster ID from analysis query-cluster list. Required only with --cluster-query-scope SLAVE."
197
+ };
198
+ function validateClusterQueryRouting(ctx) {
199
+ const scope = optionalString(ctx, "cluster-query-scope");
200
+ const slaveClusterId = optionalString(ctx, "slave-cluster-id");
201
+ if (scope !== void 0 && scope !== "GLOBAL" && scope !== "SLAVE") {
202
+ throw new Error("--cluster-query-scope must be GLOBAL or SLAVE.");
203
+ }
204
+ if (scope === "SLAVE" && slaveClusterId === void 0) {
205
+ throw new Error("--slave-cluster-id is required with --cluster-query-scope SLAVE.");
206
+ }
207
+ if (scope !== "SLAVE" && slaveClusterId !== void 0) {
208
+ throw new Error("--slave-cluster-id is allowed only with --cluster-query-scope SLAVE.");
209
+ }
210
+ }
332
211
  var artifactFormatFlag = {
333
212
  name: "artifact-format",
334
213
  type: "string",
@@ -341,10 +220,10 @@ function projectInput(ctx) {
341
220
  function listInput(ctx) {
342
221
  return compactInput({
343
222
  ...projectInput(ctx),
344
- query: optionalString2(ctx, "query"),
223
+ query: optionalString(ctx, "query"),
345
224
  fields: optionalJson(ctx, "fields"),
346
- limit: optionalNumber2(ctx, "limit"),
347
- offset: optionalNumber2(ctx, "offset")
225
+ limit: optionalNumber(ctx, "limit"),
226
+ offset: optionalNumber(ctx, "offset")
348
227
  });
349
228
  }
350
229
  function reportListInput(ctx) {
@@ -359,21 +238,23 @@ function dashboardReportDataInput(ctx) {
359
238
  dashboard_id: ctx.num("dashboard-id"),
360
239
  report_ids: optionalJsonArray(ctx, "report-ids"),
361
240
  filters: optionalJson(ctx, "filters"),
362
- start_time: optionalString2(ctx, "start-time"),
363
- end_time: optionalString2(ctx, "end-time"),
364
- zone_offset: optionalNumber2(ctx, "zone-offset"),
365
- use_cache: optionalBoolean2(ctx, "use-cache"),
366
- request_id: optionalString2(ctx, "request-id"),
367
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
368
- limit: optionalNumber2(ctx, "limit"),
369
- format: optionalString2(ctx, "artifact-format")
241
+ start_time: optionalString(ctx, "start-time"),
242
+ end_time: optionalString(ctx, "end-time"),
243
+ cluster_query_scope: optionalString(ctx, "cluster-query-scope"),
244
+ slave_cluster_id: optionalString(ctx, "slave-cluster-id"),
245
+ zone_offset: optionalNumber(ctx, "zone-offset"),
246
+ use_cache: optionalBoolean(ctx, "use-cache"),
247
+ request_id: optionalString(ctx, "request-id"),
248
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
249
+ limit: optionalNumber(ctx, "limit"),
250
+ format: optionalString(ctx, "artifact-format")
370
251
  });
371
252
  }
372
253
  function exportLifecycleInput(ctx) {
373
254
  return compactInput({
374
- request_id: optionalString2(ctx, "request-id"),
375
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
376
- format: optionalString2(ctx, "artifact-format")
255
+ request_id: optionalString(ctx, "request-id"),
256
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
257
+ format: optionalString(ctx, "artifact-format")
377
258
  });
378
259
  }
379
260
  function biPanelPageDataInput(ctx) {
@@ -387,26 +268,26 @@ function biPanelPageDataInput(ctx) {
387
268
  permission_controls: optionalJson(ctx, "permission-controls"),
388
269
  chart_filter_controls: optionalJson(ctx, "chart-filter-controls"),
389
270
  columns: optionalJson(ctx, "columns"),
390
- row_limit: optionalNumber2(ctx, "row-limit"),
391
- row_offset: optionalNumber2(ctx, "row-offset"),
392
- block_limit: optionalNumber2(ctx, "block-limit"),
393
- block_offset: optionalNumber2(ctx, "block-offset"),
394
- use_cache: optionalBoolean2(ctx, "use-cache"),
395
- request_id: optionalString2(ctx, "request-id"),
396
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
397
- limit: optionalNumber2(ctx, "limit"),
398
- format: optionalString2(ctx, "artifact-format")
271
+ row_limit: optionalNumber(ctx, "row-limit"),
272
+ row_offset: optionalNumber(ctx, "row-offset"),
273
+ block_limit: optionalNumber(ctx, "block-limit"),
274
+ block_offset: optionalNumber(ctx, "block-offset"),
275
+ use_cache: optionalBoolean(ctx, "use-cache"),
276
+ request_id: optionalString(ctx, "request-id"),
277
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
278
+ limit: optionalNumber(ctx, "limit"),
279
+ format: optionalString(ctx, "artifact-format")
399
280
  });
400
281
  }
401
- function optionalString2(ctx, name) {
282
+ function optionalString(ctx, name) {
402
283
  const value = ctx.str(name);
403
284
  return value === "" ? void 0 : value;
404
285
  }
405
- function optionalNumber2(ctx, name) {
286
+ function optionalNumber(ctx, name) {
406
287
  const value = ctx.str(name);
407
288
  return value === "" ? void 0 : Number(value);
408
289
  }
409
- function optionalBoolean2(ctx, name) {
290
+ function optionalBoolean(ctx, name) {
410
291
  const value = ctx.str(name);
411
292
  return value === "" ? void 0 : ctx.bool(name);
412
293
  }
@@ -518,11 +399,11 @@ var metadataEventList = createAnalysisMetaCapabilityCommand({
518
399
  risk: "read",
519
400
  buildInput: (ctx) => compactInput({
520
401
  ...projectInput(ctx),
521
- query: optionalString2(ctx, "query"),
402
+ query: optionalString(ctx, "query"),
522
403
  fields: optionalJson(ctx, "fields"),
523
- limit: optionalNumber2(ctx, "limit"),
524
- offset: optionalNumber2(ctx, "offset"),
525
- authenticated_only: optionalBoolean2(ctx, "authenticated-only")
404
+ limit: optionalNumber(ctx, "limit"),
405
+ offset: optionalNumber(ctx, "offset"),
406
+ authenticated_only: optionalBoolean(ctx, "authenticated-only")
526
407
  })
527
408
  });
528
409
 
@@ -567,7 +448,7 @@ var metadataEventUpdate = createAnalysisMetaCapabilityCommand({
567
448
  { name: "remark", type: "string", required: false, desc: "Event remark." }
568
449
  ],
569
450
  risk: "write",
570
- buildInput: (ctx) => compactInput({ ...projectInput(ctx), event_name: ctx.str("event-name"), event_desc: optionalString2(ctx, "event-desc"), remark: optionalString2(ctx, "remark") })
451
+ buildInput: (ctx) => compactInput({ ...projectInput(ctx), event_name: ctx.str("event-name"), event_desc: optionalString(ctx, "event-desc"), remark: optionalString(ctx, "remark") })
571
452
  });
572
453
 
573
454
  // src/commands/te-analysis/meta/event/relation-update.ts
@@ -675,14 +556,14 @@ var metadataPropertyList = createAnalysisMetaCapabilityCommand({
675
556
  risk: "read",
676
557
  buildInput: (ctx) => compactInput({
677
558
  ...projectInput(ctx),
678
- table_type: optionalString2(ctx, "table-type"),
679
- scope: optionalString2(ctx, "scope"),
680
- event_name: optionalString2(ctx, "event-name"),
681
- query: optionalString2(ctx, "query"),
559
+ table_type: optionalString(ctx, "table-type"),
560
+ scope: optionalString(ctx, "scope"),
561
+ event_name: optionalString(ctx, "event-name"),
562
+ query: optionalString(ctx, "query"),
682
563
  fields: optionalJson(ctx, "fields"),
683
- limit: optionalNumber2(ctx, "limit"),
684
- offset: optionalNumber2(ctx, "offset"),
685
- authenticated_only: optionalBoolean2(ctx, "authenticated-only")
564
+ limit: optionalNumber(ctx, "limit"),
565
+ offset: optionalNumber(ctx, "offset"),
566
+ authenticated_only: optionalBoolean(ctx, "authenticated-only")
686
567
  })
687
568
  });
688
569
 
@@ -730,7 +611,7 @@ var metadataPropertyUpdate = createAnalysisMetaCapabilityCommand({
730
611
  { name: "prop-remark", type: "string", required: false, desc: "Property remark." }
731
612
  ],
732
613
  risk: "write",
733
- buildInput: (ctx) => compactInput({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_name: ctx.str("prop-name"), prop_desc: optionalString2(ctx, "prop-desc"), prop_remark: optionalString2(ctx, "prop-remark") })
614
+ buildInput: (ctx) => compactInput({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_name: ctx.str("prop-name"), prop_desc: optionalString(ctx, "prop-desc"), prop_remark: optionalString(ctx, "prop-remark") })
734
615
  });
735
616
 
736
617
  // src/commands/te-analysis/meta/property/relation-update.ts
@@ -850,15 +731,15 @@ var metadataVirtualEventCreate = createAnalysisMetaCapabilityCommand({
850
731
  { name: "event-name", type: "string", required: false, desc: "Virtual event name. Must start with 'ta@'." },
851
732
  { name: "event-desc", type: "string", required: false, desc: "Virtual event display name." },
852
733
  { name: "remark", type: "string", required: false, desc: "Optional virtual event remark." },
853
- { name: "events", type: "json", required: false, desc: "JSON array of events to combine." },
854
- { name: "filter", type: "json", required: false, desc: "Optional global filter JSON." },
734
+ { name: "events", type: "json", required: false, desc: "Event array using snake_case event_name and optional AI-facing filter {relation,items:[{field:{name,type?},operator,values?}]}." },
735
+ { name: "filter", type: "json", required: false, desc: "Optional AI-facing global filter {relation,items:[{field:{name,type?},operator,values?}]}; raw taFilters/junctionKind are rejected." },
855
736
  { name: "override", type: "boolean", required: false, desc: "Whether to override an existing virtual event rule." }
856
737
  ],
857
738
  risk: "write",
858
739
  buildInput: (ctx) => compactInput({
859
740
  ...projectInput(ctx),
860
741
  payload: virtualEventPayload(ctx),
861
- override: optionalBoolean2(ctx, "override")
742
+ override: optionalBoolean(ctx, "override")
862
743
  })
863
744
  });
864
745
  function virtualEventPayload(ctx) {
@@ -866,8 +747,8 @@ function virtualEventPayload(ctx) {
866
747
  if (payload !== void 0) {
867
748
  return payload;
868
749
  }
869
- const eventName = optionalString2(ctx, "event-name");
870
- const eventDesc = optionalString2(ctx, "event-desc");
750
+ const eventName = optionalString(ctx, "event-name");
751
+ const eventDesc = optionalString(ctx, "event-desc");
871
752
  const events = optionalJson(ctx, "events");
872
753
  if (eventName === void 0 || eventDesc === void 0 || events === void 0) {
873
754
  throw new Error("Pass --payload, or pass --event-name, --event-desc, and --events");
@@ -875,7 +756,7 @@ function virtualEventPayload(ctx) {
875
756
  return compactInput({
876
757
  event_name: eventName,
877
758
  event_desc: eventDesc,
878
- remark: optionalString2(ctx, "remark"),
759
+ remark: optionalString(ctx, "remark"),
879
760
  rule: compactInput({
880
761
  events,
881
762
  filter: optionalJson(ctx, "filter")
@@ -947,11 +828,11 @@ var metadataVirtualPropertyCreate = createAnalysisMetaCapabilityCommand({
947
828
  sql_expression: ctx.str("sql-expression"),
948
829
  v_prop: virtualProperty(ctx),
949
830
  properties: optionalJson(ctx, "properties"),
950
- sql_event_relation_type: optionalString2(ctx, "sql-event-relation-type"),
831
+ sql_event_relation_type: optionalString(ctx, "sql-event-relation-type"),
951
832
  related_events: optionalJson(ctx, "related-events"),
952
833
  tag_date_policies: optionalJson(ctx, "tag-date-policies"),
953
- replace_remark: optionalString2(ctx, "replace-remark"),
954
- replace_suggestion: optionalString2(ctx, "replace-suggestion")
834
+ replace_remark: optionalString(ctx, "replace-remark"),
835
+ replace_suggestion: optionalString(ctx, "replace-suggestion")
955
836
  })
956
837
  });
957
838
  function virtualProperty(ctx) {
@@ -959,17 +840,17 @@ function virtualProperty(ctx) {
959
840
  if (vProp !== void 0) {
960
841
  return vProp;
961
842
  }
962
- const propertyName = optionalString2(ctx, "property-name");
963
- const tableType = optionalString2(ctx, "table-type");
964
- const selectType = optionalString2(ctx, "select-type");
843
+ const propertyName = optionalString(ctx, "property-name");
844
+ const tableType = optionalString(ctx, "table-type");
845
+ const selectType = optionalString(ctx, "select-type");
965
846
  if (propertyName === void 0 || tableType === void 0 || selectType === void 0) {
966
847
  throw new Error("Pass --v-prop, or pass --property-name, --table-type, and --select-type");
967
848
  }
968
849
  return {
969
850
  property: compactInput({
970
851
  column_name: propertyName,
971
- column_desc: optionalString2(ctx, "property-desc"),
972
- column_remark: optionalString2(ctx, "property-remark"),
852
+ column_desc: optionalString(ctx, "property-desc"),
853
+ column_remark: optionalString(ctx, "property-remark"),
973
854
  table_type: tableType,
974
855
  select_type: selectType
975
856
  })
@@ -999,11 +880,11 @@ var metadataVirtualPropertySqlRuleUpdate = createAnalysisMetaCapabilityCommand({
999
880
  sql_expression: ctx.str("sql-expression"),
1000
881
  v_prop: ctx.json("v-prop"),
1001
882
  properties: optionalJson(ctx, "properties"),
1002
- sql_event_relation_type: optionalString2(ctx, "sql-event-relation-type"),
883
+ sql_event_relation_type: optionalString(ctx, "sql-event-relation-type"),
1003
884
  related_events: optionalJson(ctx, "related-events"),
1004
885
  tag_date_policies: optionalJson(ctx, "tag-date-policies"),
1005
- replace_remark: optionalString2(ctx, "replace-remark"),
1006
- replace_suggestion: optionalString2(ctx, "replace-suggestion")
886
+ replace_remark: optionalString(ctx, "replace-remark"),
887
+ replace_suggestion: optionalString(ctx, "replace-suggestion")
1007
888
  })
1008
889
  });
1009
890
 
@@ -1019,7 +900,7 @@ var metadataVirtualPropertySqlRuleDelete = createAnalysisMetaCapabilityCommand({
1019
900
  { name: "operation", type: "string", required: false, desc: "Delete operation. Use revoke to revoke instead of delete." }
1020
901
  ],
1021
902
  risk: "high-risk-write",
1022
- buildInput: (ctx) => compactInput({ ...projectInput(ctx), v_prop_id: ctx.num("v-prop-id"), operation: optionalString2(ctx, "operation") })
903
+ buildInput: (ctx) => compactInput({ ...projectInput(ctx), v_prop_id: ctx.num("v-prop-id"), operation: optionalString(ctx, "operation") })
1023
904
  });
1024
905
 
1025
906
  // src/commands/te-analysis/meta/virtual-property/index.ts
@@ -1048,12 +929,12 @@ var metadataMetricList = createAnalysisMetaCapabilityCommand({
1048
929
  risk: "read",
1049
930
  buildInput: (ctx) => compactInput({
1050
931
  ...projectInput(ctx),
1051
- ignore_authentication: optionalBoolean2(ctx, "ignore-authentication"),
1052
- query: optionalString2(ctx, "query"),
932
+ ignore_authentication: optionalBoolean(ctx, "ignore-authentication"),
933
+ query: optionalString(ctx, "query"),
1053
934
  fields: optionalJson(ctx, "fields"),
1054
- limit: optionalNumber2(ctx, "limit"),
1055
- offset: optionalNumber2(ctx, "offset"),
1056
- authenticated_only: optionalBoolean2(ctx, "authenticated-only")
935
+ limit: optionalNumber(ctx, "limit"),
936
+ offset: optionalNumber(ctx, "offset"),
937
+ authenticated_only: optionalBoolean(ctx, "authenticated-only")
1057
938
  })
1058
939
  });
1059
940
 
@@ -1073,8 +954,8 @@ var metadataMetricGet = createAnalysisMetaCapabilityCommand({
1073
954
 
1074
955
  // src/commands/te-analysis/meta/metric/shared.ts
1075
956
  function metricMode(ctx) {
1076
- const mode = optionalNumber2(ctx, "metric-mode");
1077
- const modelType = optionalString2(ctx, "model-type");
957
+ const mode = optionalNumber(ctx, "metric-mode");
958
+ const modelType = optionalString(ctx, "model-type");
1078
959
  const mapped = modelType === void 0 ? void 0 : modelTypeToMetricMode(modelType);
1079
960
  if (mode === void 0 && mapped === void 0) {
1080
961
  throw new Error("Pass one of --model-type or --metric-mode");
@@ -1085,8 +966,8 @@ function metricMode(ctx) {
1085
966
  return mode ?? mapped;
1086
967
  }
1087
968
  function optionalMetricMode(ctx) {
1088
- const mode = optionalNumber2(ctx, "metric-mode");
1089
- const modelType = optionalString2(ctx, "model-type");
969
+ const mode = optionalNumber(ctx, "metric-mode");
970
+ const modelType = optionalString(ctx, "model-type");
1090
971
  const mapped = modelType === void 0 ? void 0 : modelTypeToMetricMode(modelType);
1091
972
  if (mode !== void 0 && mapped !== void 0 && mode !== mapped) {
1092
973
  throw new Error("--metric-mode must match --model-type when both are provided");
@@ -1125,7 +1006,7 @@ var metadataMetricCreate = createAnalysisMetaCapabilityCommand({
1125
1006
  ...projectInput(ctx),
1126
1007
  metric_name: ctx.str("metric-name"),
1127
1008
  metric_desc: ctx.str("metric-desc"),
1128
- metric_remark: optionalString2(ctx, "metric-remark"),
1009
+ metric_remark: optionalString(ctx, "metric-remark"),
1129
1010
  metric_mode: metricMode(ctx),
1130
1011
  metric_events: ctx.json("metric-events"),
1131
1012
  metric_params: optionalJson(ctx, "metric-params")
@@ -1153,9 +1034,9 @@ var metadataMetricUpdate = createAnalysisMetaCapabilityCommand({
1153
1034
  buildInput: (ctx) => compactInput({
1154
1035
  ...projectInput(ctx),
1155
1036
  metric_id: ctx.num("metric-id"),
1156
- metric_name: optionalString2(ctx, "metric-name"),
1157
- metric_desc: optionalString2(ctx, "metric-desc"),
1158
- metric_remark: optionalString2(ctx, "metric-remark"),
1037
+ metric_name: optionalString(ctx, "metric-name"),
1038
+ metric_desc: optionalString(ctx, "metric-desc"),
1039
+ metric_remark: optionalString(ctx, "metric-remark"),
1159
1040
  metric_mode: optionalMetricMode(ctx),
1160
1041
  metric_events: optionalJson(ctx, "metric-events"),
1161
1042
  metric_params: optionalJson(ctx, "metric-params")
@@ -1269,7 +1150,7 @@ var metadataAssetAbnormalGet = createAnalysisMetaCapabilityCommand({
1269
1150
  { name: "table-type", type: "number", required: false, desc: "Property table type when the resource is a property." }
1270
1151
  ],
1271
1152
  risk: "read",
1272
- buildInput: (ctx) => compactInput({ ...projectInput(ctx), resource_type: ctx.str("resource-type"), resource_id: optionalString2(ctx, "resource-id"), resource_name: optionalString2(ctx, "resource-name"), table_type: optionalNumber2(ctx, "table-type") })
1153
+ buildInput: (ctx) => compactInput({ ...projectInput(ctx), resource_type: ctx.str("resource-type"), resource_id: optionalString(ctx, "resource-id"), resource_name: optionalString(ctx, "resource-name"), table_type: optionalNumber(ctx, "table-type") })
1273
1154
  });
1274
1155
 
1275
1156
  // src/commands/te-analysis/meta/asset/shared.ts
@@ -1298,33 +1179,33 @@ var sortFieldFlag = { name: "sort-field", type: "string", required: false, desc:
1298
1179
  var sortOrderFlag = { name: "sort-order", type: "string", required: false, desc: "Sort order: asc or desc." };
1299
1180
  var recordIdFlag = { name: "record-id", type: "number", required: false, desc: "Operation record ID." };
1300
1181
  var readers = {
1301
- node_id: (ctx) => optionalString2(ctx, "node-id"),
1302
- resource_id: (ctx) => optionalString2(ctx, "resource-id"),
1303
- resource_type: (ctx) => optionalString2(ctx, "resource-type"),
1182
+ node_id: (ctx) => optionalString(ctx, "node-id"),
1183
+ resource_id: (ctx) => optionalString(ctx, "resource-id"),
1184
+ resource_type: (ctx) => optionalString(ctx, "resource-type"),
1304
1185
  link_info: (ctx) => optionalJson(ctx, "link-info"),
1305
- query: (ctx) => optionalString2(ctx, "query"),
1186
+ query: (ctx) => optionalString(ctx, "query"),
1306
1187
  searchs: (ctx) => optionalJson(ctx, "searchs"),
1307
1188
  rule: (ctx) => optionalJson(ctx, "rule"),
1308
- operation_type: (ctx) => optionalString2(ctx, "operation-type"),
1309
- rule_id: (ctx) => optionalNumber2(ctx, "rule-id"),
1310
- rule_name: (ctx) => optionalString2(ctx, "rule-name"),
1311
- comment: (ctx) => optionalString2(ctx, "comment"),
1189
+ operation_type: (ctx) => optionalString(ctx, "operation-type"),
1190
+ rule_id: (ctx) => optionalNumber(ctx, "rule-id"),
1191
+ rule_name: (ctx) => optionalString(ctx, "rule-name"),
1192
+ comment: (ctx) => optionalString(ctx, "comment"),
1312
1193
  node_ids: (ctx) => optionalJsonArray(ctx, "node-ids"),
1313
- reports_version: (ctx) => optionalNumber2(ctx, "reports-version"),
1314
- zone_offset: (ctx) => optionalNumber2(ctx, "zone-offset"),
1194
+ reports_version: (ctx) => optionalNumber(ctx, "reports-version"),
1195
+ zone_offset: (ctx) => optionalNumber(ctx, "zone-offset"),
1315
1196
  schedule_ui_config: (ctx) => optionalJson(ctx, "schedule-ui-config"),
1316
- dashboard_status: (ctx) => optionalString2(ctx, "dashboard-status"),
1317
- refresh_type: (ctx) => optionalNumber2(ctx, "refresh-type"),
1197
+ dashboard_status: (ctx) => optionalString(ctx, "dashboard-status"),
1198
+ refresh_type: (ctx) => optionalNumber(ctx, "refresh-type"),
1318
1199
  cache_config: (ctx) => optionalJson(ctx, "cache-config"),
1319
- to_user_id: (ctx) => optionalNumber2(ctx, "to-user-id"),
1320
- clear_history_tag: (ctx) => optionalNumber2(ctx, "clear-history-tag"),
1321
- type: (ctx) => optionalString2(ctx, "type"),
1200
+ to_user_id: (ctx) => optionalNumber(ctx, "to-user-id"),
1201
+ clear_history_tag: (ctx) => optionalNumber(ctx, "clear-history-tag"),
1202
+ type: (ctx) => optionalString(ctx, "type"),
1322
1203
  status: (ctx) => optionalJson(ctx, "status"),
1323
- sort_field: (ctx) => optionalString2(ctx, "sort-field"),
1324
- sort_order: (ctx) => optionalString2(ctx, "sort-order"),
1325
- record_id: (ctx) => optionalNumber2(ctx, "record-id"),
1326
- limit: (ctx) => optionalNumber2(ctx, "limit"),
1327
- offset: (ctx) => optionalNumber2(ctx, "offset")
1204
+ sort_field: (ctx) => optionalString(ctx, "sort-field"),
1205
+ sort_order: (ctx) => optionalString(ctx, "sort-order"),
1206
+ record_id: (ctx) => optionalNumber(ctx, "record-id"),
1207
+ limit: (ctx) => optionalNumber(ctx, "limit"),
1208
+ offset: (ctx) => optionalNumber(ctx, "offset")
1328
1209
  };
1329
1210
  function assetGovernanceInput(ctx, fields) {
1330
1211
  const input = {
@@ -1477,8 +1358,8 @@ var metadataSuperMetadataExport = createAnalysisMetaCapabilityCommand({
1477
1358
  risk: "read",
1478
1359
  buildInput: (ctx) => compactInput({
1479
1360
  ...projectInput(ctx),
1480
- request_id: optionalString2(ctx, "request-id"),
1481
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
1361
+ request_id: optionalString(ctx, "request-id"),
1362
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
1482
1363
  })
1483
1364
  });
1484
1365
 
@@ -1498,8 +1379,8 @@ var metadataSuperMetadataImport = createAnalysisMetaCapabilityCommand({
1498
1379
  buildInput: (ctx) => compactInput({
1499
1380
  ...projectInput(ctx),
1500
1381
  operation: ctx.str("operation"),
1501
- input_file_id: optionalString2(ctx, "input-file-id"),
1502
- pre_import_meta_uuid: optionalString2(ctx, "pre-import-meta-uuid")
1382
+ input_file_id: optionalString(ctx, "input-file-id"),
1383
+ pre_import_meta_uuid: optionalString(ctx, "pre-import-meta-uuid")
1503
1384
  })
1504
1385
  });
1505
1386
 
@@ -1577,12 +1458,6 @@ var datatable_default = commands9;
1577
1458
 
1578
1459
  // src/commands/te-analysis/meta/index.ts
1579
1460
  var commands10 = [
1580
- getAlertDefinitionSchema,
1581
- listAlerts,
1582
- getAlert,
1583
- createAlert,
1584
- updateAlert,
1585
- deleteAlert,
1586
1461
  ...event_default,
1587
1462
  ...property_default,
1588
1463
  ...virtual_event_default,
@@ -1869,7 +1744,7 @@ var reportListExport = createAnalysisCapabilityCommand({
1869
1744
  risk: "read",
1870
1745
  buildInput: (ctx) => compactInput({
1871
1746
  ...projectInput(ctx),
1872
- query: optionalString2(ctx, "query"),
1747
+ query: optionalString(ctx, "query"),
1873
1748
  fields: optionalJson(ctx, "fields"),
1874
1749
  model_types: optionalJson(ctx, "model-types"),
1875
1750
  ...exportLifecycleInput(ctx)
@@ -1911,7 +1786,7 @@ var REPORT_WRITE_MODEL_TYPE_VALUES = [
1911
1786
  "tag"
1912
1787
  ];
1913
1788
  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.`;
1914
- 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. Selector value must match one options[].value. Trino identifiers containing #, $, @, spaces, or punctuation must be delimited with double quotes, for example SELECT "#user_id", "$part_event" FROM ...; single quotes are string literals. 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.';
1789
+ 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 punctuation must be delimited with double quotes, for example SELECT "#user_id", "$part_event" FROM ...; single quotes are string literals. 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.';
1915
1790
  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.`;
1916
1791
  function aiModelTypeFlag(required) {
1917
1792
  return {
@@ -1968,9 +1843,9 @@ var reportCreate = createAnalysisCapabilityCommand({
1968
1843
  report_name: ctx.str("report-name"),
1969
1844
  model_type: ctx.str("model-type"),
1970
1845
  definition: ctx.json("definition"),
1971
- report_desc: optionalString2(ctx, "report-desc"),
1972
- cache_seconds: optionalNumber2(ctx, "cache-seconds"),
1973
- query_duration_ms: optionalNumber2(ctx, "query-duration-ms"),
1846
+ report_desc: optionalString(ctx, "report-desc"),
1847
+ cache_seconds: optionalNumber(ctx, "cache-seconds"),
1848
+ query_duration_ms: optionalNumber(ctx, "query-duration-ms"),
1974
1849
  dashboard_ids: optionalJsonArray(ctx, "dashboard-ids")
1975
1850
  })
1976
1851
  });
@@ -2008,12 +1883,12 @@ var reportUpdate = createAnalysisCapabilityCommand({
2008
1883
  ...projectInput(ctx),
2009
1884
  report_id: ctx.num("report-id"),
2010
1885
  version: ctx.num("report-version"),
2011
- report_name: optionalString2(ctx, "report-name"),
2012
- report_desc: optionalString2(ctx, "report-desc"),
2013
- model_type: optionalString2(ctx, "model-type"),
1886
+ report_name: optionalString(ctx, "report-name"),
1887
+ report_desc: optionalString(ctx, "report-desc"),
1888
+ model_type: optionalString(ctx, "model-type"),
2014
1889
  definition: optionalJson(ctx, "definition"),
2015
- cache_seconds: optionalNumber2(ctx, "cache-seconds"),
2016
- query_duration_ms: optionalNumber2(ctx, "query-duration-ms")
1890
+ cache_seconds: optionalNumber(ctx, "cache-seconds"),
1891
+ query_duration_ms: optionalNumber(ctx, "query-duration-ms")
2017
1892
  })
2018
1893
  });
2019
1894
 
@@ -2048,17 +1923,19 @@ function reportDataInput(ctx) {
2048
1923
  return compactInput({
2049
1924
  ...projectInput(ctx),
2050
1925
  report_ids: jsonArray(ctx, "report-ids"),
2051
- request_id: optionalString2(ctx, "request-id"),
1926
+ request_id: optionalString(ctx, "request-id"),
2052
1927
  filters: optionalJson(ctx, "filters"),
2053
1928
  group_by: optionalJson(ctx, "group-by"),
2054
1929
  sql_params: optionalJson(ctx, "sql-params"),
2055
- start_time: optionalString2(ctx, "start-time"),
2056
- end_time: optionalString2(ctx, "end-time"),
2057
- time_granularity: optionalString2(ctx, "time-granularity"),
2058
- zone_offset: optionalNumber2(ctx, "zone-offset"),
2059
- use_cache: optionalBoolean2(ctx, "use-cache"),
2060
- limit: optionalNumber2(ctx, "limit"),
2061
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
1930
+ start_time: optionalString(ctx, "start-time"),
1931
+ end_time: optionalString(ctx, "end-time"),
1932
+ time_granularity: optionalString(ctx, "time-granularity"),
1933
+ cluster_query_scope: optionalString(ctx, "cluster-query-scope"),
1934
+ slave_cluster_id: optionalString(ctx, "slave-cluster-id"),
1935
+ zone_offset: optionalNumber(ctx, "zone-offset"),
1936
+ use_cache: optionalBoolean(ctx, "use-cache"),
1937
+ limit: optionalNumber(ctx, "limit"),
1938
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
2062
1939
  });
2063
1940
  }
2064
1941
  function reportDataExportInput(ctx) {
@@ -2081,16 +1958,19 @@ var reportDataRun = createAnalysisCapabilityCommand({
2081
1958
  requestIdFlag,
2082
1959
  { name: "filters", type: "json", required: false, desc: 'Non-SQL analysis models only. SQL-only requests reject this field; mixed batches warn for SQL report_ids that ignore it. AI-facing shape: {"relation":"and","items":[{"field":{"name":"country","type":"user_property"},"operator":"eq","values":["US"]}]}. Never pass QP taFilters.' },
2083
1960
  { name: "group-by", type: "json", required: false, desc: 'Non-SQL analysis models only. SQL-only requests reject this field; mixed batches warn. AI-facing shape: [{"field":{"name":"country","type":"user_property"}}]. Time granularity uses --time-granularity.' },
2084
- { name: "sql-params", type: "json", required: false, desc: 'SQL reports only. First run analysis report get for every target SQL report; each name must exist in every definition.params. Send value overrides only, for example [{"name":"platform","value":"ios"}] or saved part_date/time parameters with start_time/end_time. Do not send definition fields such as paramType or selectorItems.' },
1961
+ { name: "sql-params", type: "json", required: false, desc: 'SQL reports only. First run analysis report get for every target SQL report; each name must exist in every definition.params. Send value overrides only, for example [{"name":"platform","value":"ios"}] or saved part_date/time parameters with start_time/end_time. Do not send definition fields such as paramType, selectorItems, or use_timezone.' },
2085
1962
  { name: "start-time", type: "string", required: false, desc: "Non-SQL analysis-model date override start, yyyy-MM-dd. SQL dates must be saved parameters overridden through --sql-params." },
2086
1963
  { name: "end-time", type: "string", required: false, desc: "Non-SQL analysis-model date override end, yyyy-MM-dd. SQL dates must be saved parameters overridden through --sql-params." },
2087
1964
  { name: "time-granularity", type: "string", required: false, desc: "Non-SQL analysis-model time granularity override. SQL accepts only --sql-params." },
1965
+ clusterQueryScopeFlag,
1966
+ slaveClusterIdFlag,
2088
1967
  { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
2089
1968
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
2090
1969
  syncLimitFlag,
2091
1970
  syncTimeoutSecondsFlag
2092
1971
  ],
2093
1972
  risk: "read",
1973
+ validate: validateClusterQueryRouting,
2094
1974
  buildInput: reportDataInput,
2095
1975
  postProcess: applyAnalysisInlineLimit
2096
1976
  });
@@ -2107,16 +1987,19 @@ var reportDataExport = createAnalysisCapabilityCommand({
2107
1987
  requestIdFlag,
2108
1988
  { name: "filters", type: "json", required: false, desc: "Non-SQL analysis models only. SQL-only requests reject this field; mixed batches are best-effort. Use AI-facing field intent, never QP taFilters." },
2109
1989
  { name: "group-by", type: "json", required: false, desc: 'Non-SQL analysis models only. SQL-only requests reject this field. Shape: [{"field":{"name":"country","type":"user_property"}}].' },
2110
- { name: "sql-params", type: "json", required: false, desc: "SQL reports only. First run analysis report get for every target SQL report; each name must exist in every definition.params. Send value overrides only, including saved part_date/time parameters for date changes. Do not send definition fields such as paramType or selectorItems." },
1990
+ { name: "sql-params", type: "json", required: false, desc: "SQL reports only. First run analysis report get for every target SQL report; each name must exist in every definition.params. Send value overrides only, including saved part_date/time parameters for date changes. Do not send definition fields such as paramType, selectorItems, or use_timezone." },
2111
1991
  { name: "start-time", type: "string", required: false, desc: "Non-SQL analysis-model date override start, yyyy-MM-dd. SQL dates use --sql-params." },
2112
1992
  { name: "end-time", type: "string", required: false, desc: "Non-SQL analysis-model date override end, yyyy-MM-dd. SQL dates use --sql-params." },
2113
1993
  { name: "time-granularity", type: "string", required: false, desc: "Non-SQL analysis-model time granularity override. SQL accepts only --sql-params." },
1994
+ clusterQueryScopeFlag,
1995
+ slaveClusterIdFlag,
2114
1996
  { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
2115
1997
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
2116
1998
  artifactFormatFlag,
2117
1999
  asyncTimeoutSecondsFlag
2118
2000
  ],
2119
2001
  risk: "read",
2002
+ validate: validateClusterQueryRouting,
2120
2003
  buildInput: reportDataExportInput
2121
2004
  });
2122
2005
 
@@ -2156,7 +2039,7 @@ var reportChangeLogGet = createAnalysisCapabilityCommand({
2156
2039
  buildInput: (ctx) => compactInput({
2157
2040
  ...projectInput(ctx),
2158
2041
  report_id: ctx.num("report-id"),
2159
- version: optionalNumber2(ctx, "history-version")
2042
+ version: optionalNumber(ctx, "history-version")
2160
2043
  })
2161
2044
  });
2162
2045
 
@@ -2253,9 +2136,9 @@ var dashboardCreate = createAnalysisCapabilityCommand({
2253
2136
  buildInput: (ctx) => compactInput({
2254
2137
  ...projectInput(ctx),
2255
2138
  dashboard_name: ctx.str("dashboard-name"),
2256
- space_id: optionalNumber2(ctx, "space-id"),
2257
- folder_id: optionalNumber2(ctx, "folder-id"),
2258
- initial_report_id: optionalNumber2(ctx, "initial-report-id"),
2139
+ space_id: optionalNumber(ctx, "space-id"),
2140
+ folder_id: optionalNumber(ctx, "folder-id"),
2141
+ initial_report_id: optionalNumber(ctx, "initial-report-id"),
2259
2142
  payload: optionalJson(ctx, "payload")
2260
2143
  })
2261
2144
  });
@@ -2275,7 +2158,7 @@ var dashboardGet = createAnalysisCapabilityCommand({
2275
2158
  buildInput: (ctx) => compactInput({
2276
2159
  ...projectInput(ctx),
2277
2160
  dashboard_id: ctx.num("dashboard-id"),
2278
- use_cache: optionalBoolean2(ctx, "use-cache")
2161
+ use_cache: optionalBoolean(ctx, "use-cache")
2279
2162
  })
2280
2163
  });
2281
2164
 
@@ -2304,16 +2187,16 @@ var dashboardUpdate = createAnalysisCapabilityCommand({
2304
2187
  buildInput: (ctx) => compactInput({
2305
2188
  ...projectInput(ctx),
2306
2189
  operation: ctx.str("operation"),
2307
- dashboard_id: optionalNumber2(ctx, "dashboard-id"),
2190
+ dashboard_id: optionalNumber(ctx, "dashboard-id"),
2308
2191
  dashboard_ids: optionalJsonArray(ctx, "dashboard-ids"),
2309
- dashboard_name: optionalString2(ctx, "dashboard-name"),
2310
- zone_offset: optionalNumber2(ctx, "zone-offset"),
2311
- refresh_type: optionalNumber2(ctx, "refresh-type"),
2312
- dashboard_status: optionalString2(ctx, "dashboard-status"),
2313
- note_id: optionalNumber2(ctx, "note-id"),
2314
- note_title: optionalString2(ctx, "note-title"),
2315
- description: optionalString2(ctx, "description"),
2316
- ui_config: optionalString2(ctx, "ui-config"),
2192
+ dashboard_name: optionalString(ctx, "dashboard-name"),
2193
+ zone_offset: optionalNumber(ctx, "zone-offset"),
2194
+ refresh_type: optionalNumber(ctx, "refresh-type"),
2195
+ dashboard_status: optionalString(ctx, "dashboard-status"),
2196
+ note_id: optionalNumber(ctx, "note-id"),
2197
+ note_title: optionalString(ctx, "note-title"),
2198
+ description: optionalString(ctx, "description"),
2199
+ ui_config: optionalString(ctx, "ui-config"),
2317
2200
  payload: optionalJson(ctx, "payload")
2318
2201
  })
2319
2202
  });
@@ -2406,8 +2289,8 @@ var dashboardCopy = createAnalysisCapabilityCommand({
2406
2289
  dashboard_id: ctx.num("dashboard-id"),
2407
2290
  dashboard_name: ctx.str("dashboard-name"),
2408
2291
  report_copy: booleanWithDefault(ctx, "report-copy", false),
2409
- to_space_id: optionalNumber2(ctx, "to-space-id"),
2410
- to_folder_id: optionalNumber2(ctx, "to-folder-id")
2292
+ to_space_id: optionalNumber(ctx, "to-space-id"),
2293
+ to_folder_id: optionalNumber(ctx, "to-folder-id")
2411
2294
  })
2412
2295
  });
2413
2296
 
@@ -2426,7 +2309,7 @@ var dashboardFreeze = createAnalysisCapabilityCommand({
2426
2309
  buildInput: (ctx) => compactInput({
2427
2310
  ...projectInput(ctx),
2428
2311
  dashboard_ids: jsonArray(ctx, "dashboard-ids"),
2429
- freeze: optionalBoolean2(ctx, "freeze")
2312
+ freeze: optionalBoolean(ctx, "freeze")
2430
2313
  })
2431
2314
  });
2432
2315
 
@@ -2513,6 +2396,8 @@ var dashboardReportDataRun = createAnalysisCapabilityCommand({
2513
2396
  { name: "filters", type: "json", required: false, desc: "Optional AI-facing filter {relation,items:[{field:{name,type?},operator,values?}]}. SQL reports ignore it and produce data.warnings; raw taFilters/junctionKind/filts are rejected." },
2514
2397
  { name: "start-time", type: "string", required: false, desc: "Optional start date/time. SQL reports ignore it and produce data.warnings." },
2515
2398
  { name: "end-time", type: "string", required: false, desc: "Optional end date/time. SQL reports ignore it and produce data.warnings." },
2399
+ clusterQueryScopeFlag,
2400
+ slaveClusterIdFlag,
2516
2401
  { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
2517
2402
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
2518
2403
  { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
@@ -2520,6 +2405,7 @@ var dashboardReportDataRun = createAnalysisCapabilityCommand({
2520
2405
  syncLimitFlag
2521
2406
  ],
2522
2407
  risk: "read",
2408
+ validate: validateClusterQueryRouting,
2523
2409
  buildInput: dashboardReportDataInput,
2524
2410
  postProcess: applyAnalysisInlineLimit
2525
2411
  });
@@ -2537,6 +2423,8 @@ var dashboardReportDataExport = createAnalysisCapabilityCommand({
2537
2423
  { name: "filters", type: "json", required: false, desc: "Optional AI-facing filter {relation,items:[{field:{name,type?},operator,values?}]}. SQL reports ignore it and the artifact includes warnings; raw taFilters/junctionKind/filts are rejected." },
2538
2424
  { name: "start-time", type: "string", required: false, desc: "Optional start date/time. SQL reports ignore it and the artifact includes warnings." },
2539
2425
  { name: "end-time", type: "string", required: false, desc: "Optional end date/time. SQL reports ignore it and the artifact includes warnings." },
2426
+ clusterQueryScopeFlag,
2427
+ slaveClusterIdFlag,
2540
2428
  { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
2541
2429
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
2542
2430
  { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
@@ -2544,6 +2432,7 @@ var dashboardReportDataExport = createAnalysisCapabilityCommand({
2544
2432
  { name: "artifact-format", type: "string", required: false, desc: "Artifact format. Only jsonl is supported." }
2545
2433
  ],
2546
2434
  risk: "read",
2435
+ validate: validateClusterQueryRouting,
2547
2436
  buildInput: dashboardReportDataInput
2548
2437
  });
2549
2438
 
@@ -2567,7 +2456,7 @@ var queryCancel = createAnalysisCapabilityCommand({
2567
2456
  risk: "write",
2568
2457
  buildInput: (ctx) => compactInput({
2569
2458
  run_id: ctx.str("run-id"),
2570
- reason: optionalString2(ctx, "reason")
2459
+ reason: optionalString(ctx, "reason")
2571
2460
  })
2572
2461
  });
2573
2462
 
@@ -2598,14 +2487,15 @@ var useCacheFlag = {
2598
2487
  };
2599
2488
  function createResultClusterInput(ctx) {
2600
2489
  return compactInput({
2490
+ project_id: ctx.num("project-id"),
2601
2491
  query_context_id: ctx.str("query-context-id"),
2602
2492
  source: optionalJson(ctx, "source"),
2603
2493
  coordinate: ctx.json("coordinate"),
2604
2494
  cluster_name: ctx.str("cluster-name"),
2605
- display_name: optionalString2(ctx, "display-name"),
2606
- zone_offset: optionalNumber2(ctx, "zone-offset"),
2607
- request_id: optionalString2(ctx, "request-id"),
2608
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
2495
+ display_name: optionalString(ctx, "display-name"),
2496
+ zone_offset: optionalNumber(ctx, "zone-offset"),
2497
+ request_id: optionalString(ctx, "request-id"),
2498
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
2609
2499
  });
2610
2500
  }
2611
2501
 
@@ -2616,6 +2506,7 @@ var queryCreateResultCluster = createAnalysisCapabilityCommand({
2616
2506
  capabilityId: "analysis.query.create_result_cluster",
2617
2507
  description: "Create a reusable user or custom-entity result cluster from one cell returned by a synchronous analysis preview. The selected metric must advertise create_result_cluster. Exports never create query contexts.",
2618
2508
  flags: [
2509
+ projectIdFlag,
2619
2510
  { name: "query-context-id", type: "string", required: true, desc: "query_context_id returned by a synchronous analysis preview. Never use an export response." },
2620
2511
  sourceFlag,
2621
2512
  coordinateFlag,
@@ -2794,12 +2685,14 @@ function adhocRunInput(ctx) {
2794
2685
  project_id: ctx.num("project-id"),
2795
2686
  model_type: ctx.str("model-type"),
2796
2687
  definition: ctx.json("definition"),
2797
- request_id: optionalString2(ctx, "request-id"),
2798
- use_cache: optionalBoolean2(ctx, "use-cache"),
2799
- zone_offset: optionalNumber2(ctx, "zone-offset"),
2688
+ request_id: optionalString(ctx, "request-id"),
2689
+ use_cache: optionalBoolean(ctx, "use-cache"),
2690
+ zone_offset: optionalNumber(ctx, "zone-offset"),
2800
2691
  fields: optionalJsonArray(ctx, "fields"),
2801
- limit: optionalNumber2(ctx, "limit"),
2802
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
2692
+ cluster_query_scope: optionalString(ctx, "cluster-query-scope"),
2693
+ slave_cluster_id: optionalString(ctx, "slave-cluster-id"),
2694
+ limit: optionalNumber(ctx, "limit"),
2695
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
2803
2696
  });
2804
2697
  }
2805
2698
  function adhocExportInput(ctx) {
@@ -2807,12 +2700,14 @@ function adhocExportInput(ctx) {
2807
2700
  project_id: ctx.num("project-id"),
2808
2701
  model_type: ctx.str("model-type"),
2809
2702
  definition: ctx.json("definition"),
2810
- request_id: optionalString2(ctx, "request-id"),
2811
- use_cache: optionalBoolean2(ctx, "use-cache"),
2812
- zone_offset: optionalNumber2(ctx, "zone-offset"),
2703
+ request_id: optionalString(ctx, "request-id"),
2704
+ use_cache: optionalBoolean(ctx, "use-cache"),
2705
+ zone_offset: optionalNumber(ctx, "zone-offset"),
2813
2706
  fields: optionalJsonArray(ctx, "fields"),
2814
- format: optionalString2(ctx, "artifact-format"),
2815
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
2707
+ cluster_query_scope: optionalString(ctx, "cluster-query-scope"),
2708
+ slave_cluster_id: optionalString(ctx, "slave-cluster-id"),
2709
+ format: optionalString(ctx, "artifact-format"),
2710
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
2816
2711
  });
2817
2712
  }
2818
2713
  var adhocBaseFlags = [
@@ -2822,7 +2717,9 @@ var adhocBaseFlags = [
2822
2717
  requestIdFlag,
2823
2718
  useCacheFlag2,
2824
2719
  zoneOffsetFlag2,
2825
- fieldsFlag
2720
+ fieldsFlag,
2721
+ clusterQueryScopeFlag,
2722
+ slaveClusterIdFlag
2826
2723
  ];
2827
2724
  var adhocExportFlags = [
2828
2725
  ...adhocBaseFlags,
@@ -2842,6 +2739,7 @@ var adhocRun = createAnalysisCapabilityCommand({
2842
2739
  syncTimeoutSecondsFlag
2843
2740
  ],
2844
2741
  risk: "read",
2742
+ validate: validateClusterQueryRouting,
2845
2743
  buildInput: adhocRunInput,
2846
2744
  postProcess: applyAnalysisInlineLimit
2847
2745
  });
@@ -2856,6 +2754,7 @@ var adhocExport = createAnalysisCapabilityCommand({
2856
2754
  ...adhocExportFlags
2857
2755
  ],
2858
2756
  risk: "read",
2757
+ validate: validateClusterQueryRouting,
2859
2758
  buildInput: adhocExportInput
2860
2759
  });
2861
2760
 
@@ -2884,11 +2783,11 @@ var dashboardDefinitionExport = createAnalysisCapabilityCommand({
2884
2783
  risk: "read",
2885
2784
  buildInput: (ctx) => compactInput({
2886
2785
  ...projectInput(ctx),
2887
- dashboard_id: optionalNumber2(ctx, "dashboard-id"),
2786
+ dashboard_id: optionalNumber(ctx, "dashboard-id"),
2888
2787
  dashboard_ids: optionalJsonArray(ctx, "dashboard-ids"),
2889
2788
  dashboard_folder_ids: optionalJsonArray(ctx, "dashboard-folder-ids"),
2890
2789
  shared_spaces: optionalJson(ctx, "shared-spaces"),
2891
- export_file_name: optionalString2(ctx, "export-file-name"),
2790
+ export_file_name: optionalString(ctx, "export-file-name"),
2892
2791
  payload: optionalJson(ctx, "payload")
2893
2792
  })
2894
2793
  });
@@ -2911,9 +2810,9 @@ var dashboardDefinitionImport = createAnalysisCapabilityCommand({
2911
2810
  buildInput: (ctx) => compactInput({
2912
2811
  ...projectInput(ctx),
2913
2812
  definition: ctx.json("definition"),
2914
- validate_only: optionalBoolean2(ctx, "validate-only"),
2915
- dashboard_name_conflict_policy: optionalString2(ctx, "dashboard-name-conflict-policy"),
2916
- space_dashboard_policy: optionalString2(ctx, "space-dashboard-policy"),
2813
+ validate_only: optionalBoolean(ctx, "validate-only"),
2814
+ dashboard_name_conflict_policy: optionalString(ctx, "dashboard-name-conflict-policy"),
2815
+ space_dashboard_policy: optionalString(ctx, "space-dashboard-policy"),
2917
2816
  payload: optionalJson(ctx, "payload")
2918
2817
  })
2919
2818
  });
@@ -2974,30 +2873,30 @@ function dailyReportInput(ctx, update) {
2974
2873
  return compactInput({
2975
2874
  ...projectInput(ctx),
2976
2875
  dashboard_id: ctx.num("dashboard-id"),
2977
- need_csv: useDefaults ? booleanWithDefault(ctx, "need-csv", false) : optionalBoolean2(ctx, "need-csv"),
2978
- host_url: useDefaults ? stringWithDefault(ctx, "host-url", "") : optionalString2(ctx, "host-url"),
2979
- enable_smtp: useDefaults ? booleanWithDefault(ctx, "enable-smtp", false) : optionalBoolean2(ctx, "enable-smtp"),
2980
- enable_email: useDefaults ? booleanWithDefault(ctx, "enable-email", false) : optionalBoolean2(ctx, "enable-email"),
2981
- enable_dd: useDefaults ? booleanWithDefault(ctx, "enable-dd", false) : optionalBoolean2(ctx, "enable-dd"),
2876
+ need_csv: useDefaults ? booleanWithDefault(ctx, "need-csv", false) : optionalBoolean(ctx, "need-csv"),
2877
+ host_url: useDefaults ? stringWithDefault(ctx, "host-url", "") : optionalString(ctx, "host-url"),
2878
+ enable_smtp: useDefaults ? booleanWithDefault(ctx, "enable-smtp", false) : optionalBoolean(ctx, "enable-smtp"),
2879
+ enable_email: useDefaults ? booleanWithDefault(ctx, "enable-email", false) : optionalBoolean(ctx, "enable-email"),
2880
+ enable_dd: useDefaults ? booleanWithDefault(ctx, "enable-dd", false) : optionalBoolean(ctx, "enable-dd"),
2982
2881
  dd_url: optionalJson(ctx, "dd-url"),
2983
- enable_wx: useDefaults ? booleanWithDefault(ctx, "enable-wx", false) : optionalBoolean2(ctx, "enable-wx"),
2882
+ enable_wx: useDefaults ? booleanWithDefault(ctx, "enable-wx", false) : optionalBoolean(ctx, "enable-wx"),
2984
2883
  wx_url: optionalJson(ctx, "wx-url"),
2985
- enable_feishu: useDefaults ? booleanWithDefault(ctx, "enable-feishu", false) : optionalBoolean2(ctx, "enable-feishu"),
2884
+ enable_feishu: useDefaults ? booleanWithDefault(ctx, "enable-feishu", false) : optionalBoolean(ctx, "enable-feishu"),
2986
2885
  feishu_info: optionalJson(ctx, "feishu-info"),
2987
- enable_kim: useDefaults ? booleanWithDefault(ctx, "enable-kim", false) : optionalBoolean2(ctx, "enable-kim"),
2886
+ enable_kim: useDefaults ? booleanWithDefault(ctx, "enable-kim", false) : optionalBoolean(ctx, "enable-kim"),
2988
2887
  kim_url: optionalJson(ctx, "kim-url"),
2989
- enable_slack: useDefaults ? booleanWithDefault(ctx, "enable-slack", false) : optionalBoolean2(ctx, "enable-slack"),
2888
+ enable_slack: useDefaults ? booleanWithDefault(ctx, "enable-slack", false) : optionalBoolean(ctx, "enable-slack"),
2990
2889
  slack_url: optionalJson(ctx, "slack-url"),
2991
- email_login_users: optionalString2(ctx, "email-login-users"),
2992
- email_new: optionalString2(ctx, "email-new"),
2993
- send_title: optionalString2(ctx, "send-title"),
2994
- send_content: optionalString2(ctx, "send-content"),
2995
- send_date: useDefaults ? stringWithDefault(ctx, "send-date", "1,2,3,4,5,6,7") : optionalString2(ctx, "send-date"),
2996
- send_time: useDefaults ? stringWithDefault(ctx, "send-time", "09:00") : optionalString2(ctx, "send-time"),
2997
- lang: useDefaults ? stringWithDefault(ctx, "lang", "zh-CN") : optionalString2(ctx, "lang"),
2998
- screen_type: useDefaults ? stringWithDefault(ctx, "screen-type", "normal") : optionalString2(ctx, "screen-type"),
2999
- zone_offset: useDefaults ? numberWithDefault(ctx, "zone-offset", 0) : optionalNumber2(ctx, "zone-offset"),
3000
- enable_send: update ? useDefaults ? booleanWithDefault(ctx, "enable-send", false) : optionalBoolean2(ctx, "enable-send") : void 0,
2890
+ email_login_users: optionalString(ctx, "email-login-users"),
2891
+ email_new: optionalString(ctx, "email-new"),
2892
+ send_title: optionalString(ctx, "send-title"),
2893
+ send_content: optionalString(ctx, "send-content"),
2894
+ send_date: useDefaults ? stringWithDefault(ctx, "send-date", "1,2,3,4,5,6,7") : optionalString(ctx, "send-date"),
2895
+ send_time: useDefaults ? stringWithDefault(ctx, "send-time", "09:00") : optionalString(ctx, "send-time"),
2896
+ lang: useDefaults ? stringWithDefault(ctx, "lang", "zh-CN") : optionalString(ctx, "lang"),
2897
+ screen_type: useDefaults ? stringWithDefault(ctx, "screen-type", "normal") : optionalString(ctx, "screen-type"),
2898
+ zone_offset: useDefaults ? numberWithDefault(ctx, "zone-offset", 0) : optionalNumber(ctx, "zone-offset"),
2899
+ enable_send: update ? useDefaults ? booleanWithDefault(ctx, "enable-send", false) : optionalBoolean(ctx, "enable-send") : void 0,
3001
2900
  payload
3002
2901
  });
3003
2902
  }
@@ -3088,10 +2987,10 @@ var biPanelCreate = createAnalysisCapabilityCommand({
3088
2987
  risk: "write",
3089
2988
  buildInput: (ctx) => compactInput({
3090
2989
  ...projectInput(ctx),
3091
- panel_name: optionalString2(ctx, "panel-name"),
3092
- panel_uuid: optionalString2(ctx, "panel-uuid"),
3093
- space_id: optionalNumber2(ctx, "space-id"),
3094
- folder_id: optionalNumber2(ctx, "folder-id"),
2990
+ panel_name: optionalString(ctx, "panel-name"),
2991
+ panel_uuid: optionalString(ctx, "panel-uuid"),
2992
+ space_id: optionalNumber(ctx, "space-id"),
2993
+ folder_id: optionalNumber(ctx, "folder-id"),
3095
2994
  payload: optionalJson(ctx, "payload")
3096
2995
  })
3097
2996
  });
@@ -3111,8 +3010,8 @@ var biPanelUpdate = createAnalysisCapabilityCommand({
3111
3010
  risk: "write",
3112
3011
  buildInput: (ctx) => compactInput({
3113
3012
  ...projectInput(ctx),
3114
- panel_name: optionalString2(ctx, "panel-name"),
3115
- panel_uuid: optionalString2(ctx, "panel-uuid"),
3013
+ panel_name: optionalString(ctx, "panel-name"),
3014
+ panel_uuid: optionalString(ctx, "panel-uuid"),
3116
3015
  payload: optionalJson(ctx, "payload")
3117
3016
  })
3118
3017
  });
@@ -3163,10 +3062,10 @@ var biPanelCopy = createAnalysisCapabilityCommand({
3163
3062
  risk: "write",
3164
3063
  buildInput: (ctx) => compactInput({
3165
3064
  ...projectInput(ctx),
3166
- panel_name: optionalString2(ctx, "panel-name"),
3167
- panel_uuid: optionalString2(ctx, "panel-uuid"),
3168
- space_id: optionalNumber2(ctx, "space-id"),
3169
- folder_id: optionalNumber2(ctx, "folder-id"),
3065
+ panel_name: optionalString(ctx, "panel-name"),
3066
+ panel_uuid: optionalString(ctx, "panel-uuid"),
3067
+ space_id: optionalNumber(ctx, "space-id"),
3068
+ folder_id: optionalNumber(ctx, "folder-id"),
3170
3069
  payload: optionalJson(ctx, "payload")
3171
3070
  })
3172
3071
  });
@@ -3200,8 +3099,8 @@ var biPanelVersionGet = createAnalysisCapabilityCommand({
3200
3099
  buildInput: (ctx) => compactInput({
3201
3100
  ...projectInput(ctx),
3202
3101
  panel_id: ctx.str("panel-id") === "" ? void 0 : ctx.num("panel-id"),
3203
- panel_uuid: optionalString2(ctx, "panel-uuid"),
3204
- version_type: optionalString2(ctx, "version-type"),
3102
+ panel_uuid: optionalString(ctx, "panel-uuid"),
3103
+ version_type: optionalString(ctx, "version-type"),
3205
3104
  fields: optionalJson(ctx, "fields")
3206
3105
  })
3207
3106
  });
@@ -3222,7 +3121,7 @@ var biPanelVersionPublish = createAnalysisCapabilityCommand({
3222
3121
  buildInput: (ctx) => compactInput({
3223
3122
  ...projectInput(ctx),
3224
3123
  panel_id: ctx.str("panel-id") === "" ? void 0 : ctx.num("panel-id"),
3225
- panel_uuid: optionalString2(ctx, "panel-uuid"),
3124
+ panel_uuid: optionalString(ctx, "panel-uuid"),
3226
3125
  source_version: ctx.str("source-version")
3227
3126
  })
3228
3127
  });
@@ -3350,10 +3249,10 @@ var favoriteAdd = createAnalysisCapabilityCommand({
3350
3249
  risk: "write",
3351
3250
  buildInput: (ctx) => compactInput({
3352
3251
  ...projectInput(ctx),
3353
- asset_id: optionalNumber2(ctx, "asset-id"),
3354
- asset_type: optionalString2(ctx, "asset-type"),
3355
- space_id: optionalNumber2(ctx, "space-id"),
3356
- id: optionalNumber2(ctx, "id"),
3252
+ asset_id: optionalNumber(ctx, "asset-id"),
3253
+ asset_type: optionalString(ctx, "asset-type"),
3254
+ space_id: optionalNumber(ctx, "space-id"),
3255
+ id: optionalNumber(ctx, "id"),
3357
3256
  payload: optionalJson(ctx, "payload")
3358
3257
  })
3359
3258
  });
@@ -3375,10 +3274,10 @@ var favoriteRemove = createAnalysisCapabilityCommand({
3375
3274
  risk: "write",
3376
3275
  buildInput: (ctx) => compactInput({
3377
3276
  ...projectInput(ctx),
3378
- asset_id: optionalNumber2(ctx, "asset-id"),
3379
- asset_type: optionalString2(ctx, "asset-type"),
3380
- space_id: optionalNumber2(ctx, "space-id"),
3381
- id: optionalNumber2(ctx, "id"),
3277
+ asset_id: optionalNumber(ctx, "asset-id"),
3278
+ asset_type: optionalString(ctx, "asset-type"),
3279
+ space_id: optionalNumber(ctx, "space-id"),
3280
+ id: optionalNumber(ctx, "id"),
3382
3281
  payload: optionalJson(ctx, "payload")
3383
3282
  })
3384
3283
  });
@@ -3410,11 +3309,11 @@ var publicLinkCreate = createAnalysisCapabilityCommand({
3410
3309
  risk: "write",
3411
3310
  buildInput: (ctx) => compactInput({
3412
3311
  ...projectInput(ctx),
3413
- company_id: optionalNumber2(ctx, "company-id"),
3312
+ company_id: optionalNumber(ctx, "company-id"),
3414
3313
  resource_type: ctx.str("resource-type"),
3415
3314
  resource_id: ctx.num("resource-id"),
3416
3315
  access_controls: optionalJson(ctx, "access-controls"),
3417
- remark: optionalString2(ctx, "remark"),
3316
+ remark: optionalString(ctx, "remark"),
3418
3317
  effective_at: ctx.str("effective-at"),
3419
3318
  expires_at: ctx.str("expires-at"),
3420
3319
  payload: optionalJson(ctx, "payload")
@@ -3451,10 +3350,10 @@ var publicLinkUpdate = createAnalysisCapabilityCommand({
3451
3350
  risk: "write",
3452
3351
  buildInput: (ctx) => compactInput({
3453
3352
  ...projectInput(ctx),
3454
- company_id: optionalNumber2(ctx, "company-id"),
3353
+ company_id: optionalNumber(ctx, "company-id"),
3455
3354
  link_id: ctx.num("link-id"),
3456
3355
  access_controls: optionalJson(ctx, "access-controls"),
3457
- remark: optionalString2(ctx, "remark"),
3356
+ remark: optionalString(ctx, "remark"),
3458
3357
  effective_at: ctx.str("effective-at"),
3459
3358
  expires_at: ctx.str("expires-at"),
3460
3359
  payload: optionalJson(ctx, "payload")
@@ -3476,8 +3375,8 @@ var publicLinkOffline = createAnalysisCapabilityCommand({
3476
3375
  risk: "write",
3477
3376
  buildInput: (ctx) => compactInput({
3478
3377
  ...projectInput(ctx),
3479
- company_id: optionalNumber2(ctx, "company-id"),
3480
- link_id: optionalNumber2(ctx, "link-id"),
3378
+ company_id: optionalNumber(ctx, "company-id"),
3379
+ link_id: optionalNumber(ctx, "link-id"),
3481
3380
  link_ids: optionalJsonArray(ctx, "link-ids")
3482
3381
  })
3483
3382
  });
@@ -3497,8 +3396,8 @@ var publicLinkDelete = createAnalysisCapabilityCommand({
3497
3396
  risk: "high-risk-write",
3498
3397
  buildInput: (ctx) => compactInput({
3499
3398
  ...projectInput(ctx),
3500
- company_id: optionalNumber2(ctx, "company-id"),
3501
- link_id: optionalNumber2(ctx, "link-id"),
3399
+ company_id: optionalNumber(ctx, "company-id"),
3400
+ link_id: optionalNumber(ctx, "link-id"),
3502
3401
  link_ids: optionalJsonArray(ctx, "link-ids")
3503
3402
  })
3504
3403
  });
@@ -3513,57 +3412,40 @@ var commands31 = [
3513
3412
  ];
3514
3413
  var public_link_default = commands31;
3515
3414
 
3516
- // src/commands/te-analysis/model/cancel-query.ts
3517
- var cancelQuery = createMcpCommand({
3518
- command: "+cancel_query",
3519
- description: "Cancel a running MCP query by request ID. Use this when a previous query is no longer needed, the caller or agent timed out before the query returned, the request returns fetch failed, hits an HTTP timeout, or the user asks to stop waiting. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running; call +cancel_query --request_id <same value> with the requestId supplied before starting the query. For proactive cancellation, generate and pass requestId to the query tool before starting it, then call cancel_query with the same value if you stop waiting.",
3520
- flags: [
3521
- { name: "request_id", type: "string", required: true, desc: "Request ID returned by a query tool in metadata.requestId, or the requestId supplied before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef." },
3522
- { name: "reason", type: "string", required: false, desc: "Optional cancellation reason. Default: MCP_CANCEL_QUERY_TOOL." }
3523
- ],
3524
- risk: "write",
3525
- buildArgs: (ctx) => ({
3526
- requestId: ctx.str("request_id"),
3527
- reason: optionalString(ctx, "reason")
3528
- })
3529
- });
3530
-
3531
- // src/commands/te-analysis/model/load-filters.ts
3532
- var loadFilters = createMcpCommand({
3533
- command: "+load_filters",
3534
- description: "Load candidate values for a property from event or user tables. Use quot to specify the property field whose enum values should be loaded.",
3415
+ // src/commands/te-analysis/filter-value/list.ts
3416
+ var filterValueList = createAnalysisCapabilityCommand({
3417
+ resource: "filter-value",
3418
+ command: "list",
3419
+ capabilityId: "analysis.filter_value.list",
3420
+ description: "List stored candidate values for one known event property, user property, user tag, or user cluster before building an exact analysis filter.",
3535
3421
  flags: [
3536
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3537
- { name: "quot", type: "string", required: true, desc: "Property identifier (field name). This is the property whose candidate values will be loaded." },
3538
- { name: "table_type", type: "string", required: true, desc: "Table type. Supported values: event and user." },
3539
- { name: "event_name", type: "string", required: false, desc: "Optional event name. Effective when table_type=event." },
3540
- { name: "inputdata", type: "string", required: false, desc: "Optional input prefix used for fuzzy filtering of candidate values." },
3541
- { name: "zone_offset", type: "number", required: false, desc: "Time zone offset in hours. For example, UTC+8 is 8" },
3542
- { name: "cluster_date_policy", type: "string", required: false, desc: "Cluster date policy. Supported values: LATEST, AUTO, SPECIFIED." },
3543
- { name: "specified_cluster_date", type: "string", required: false, desc: "Specified cluster date in yyyy-MM-dd format. Effective only when cluster_date_policy=SPECIFIED." },
3544
- { name: "is_report", type: "boolean", required: false, desc: "Whether this is report mode. Default: false" }
3422
+ projectIdFlag,
3423
+ { name: "property-name", type: "string", required: true, desc: "Exact property identifier. Resolve the property first; this command discovers values, not fields." },
3424
+ { name: "table-type", type: "string", required: true, desc: "Property table: event or user." },
3425
+ { name: "event-name", type: "string", required: false, desc: "Optional exact event name for an event-property lookup." },
3426
+ { name: "search-prefix", type: "string", required: false, desc: "Optional prefix or fuzzy input to narrow candidate values." },
3427
+ { name: "zone-offset", type: "number", required: false, desc: "Optional fixed timezone offset from -12 through 14." },
3428
+ { name: "cluster-date-policy", type: "string", required: false, desc: "Optional user tag/cluster data-snapshot policy: LATEST means the latest available computed result snapshot, not a tag definition or configuration release; AUTO and SPECIFIED select other snapshot modes." },
3429
+ { name: "specified-cluster-date", type: "string", required: false, desc: "Required only with --cluster-date-policy SPECIFIED to select a historical computed result snapshot; yyyy-MM-dd." },
3430
+ { name: "report-mode", type: "boolean", required: false, desc: "Use report-compatible property semantics. Default: false." }
3545
3431
  ],
3546
3432
  risk: "read",
3547
- mcpService: "te_analysis_extend",
3548
- buildArgs: (ctx) => ({
3549
- projectId: ctx.num("project_id"),
3550
- quot: ctx.str("quot"),
3551
- tableType: ctx.str("table_type"),
3552
- eventName: optionalString(ctx, "event_name"),
3553
- inputdata: optionalString(ctx, "inputdata"),
3554
- zoneOffset: optionalNumber(ctx, "zone_offset"),
3555
- clusterDatePolicy: optionalString(ctx, "cluster_date_policy"),
3556
- specifiedClusterDate: optionalString(ctx, "specified_cluster_date"),
3557
- isReport: optionalBoolean(ctx, "is_report")
3433
+ buildInput: (ctx) => compactInput({
3434
+ project_id: ctx.num("project-id"),
3435
+ property_name: ctx.str("property-name"),
3436
+ table_type: ctx.str("table-type"),
3437
+ event_name: optionalString(ctx, "event-name"),
3438
+ search_prefix: optionalString(ctx, "search-prefix"),
3439
+ zone_offset: optionalNumber(ctx, "zone-offset"),
3440
+ cluster_date_policy: optionalString(ctx, "cluster-date-policy"),
3441
+ specified_cluster_date: optionalString(ctx, "specified-cluster-date"),
3442
+ report_mode: optionalBoolean(ctx, "report-mode")
3558
3443
  })
3559
3444
  });
3560
3445
 
3561
- // src/commands/te-analysis/model/index.ts
3562
- var commands32 = [
3563
- cancelQuery,
3564
- loadFilters
3565
- ];
3566
- var model_default = commands32;
3446
+ // src/commands/te-analysis/filter-value/index.ts
3447
+ var commands32 = [filterValueList];
3448
+ var filter_value_default = commands32;
3567
3449
 
3568
3450
  // src/commands/te-analysis/event-detail/shared.ts
3569
3451
  var eventDetailDefinitionFlag = {
@@ -3576,22 +3458,22 @@ function eventDetailRunInput(ctx) {
3576
3458
  return compactInput({
3577
3459
  project_id: ctx.num("project-id"),
3578
3460
  definition: ctx.json("definition"),
3579
- request_id: optionalString2(ctx, "request-id"),
3580
- use_cache: optionalBoolean2(ctx, "use-cache"),
3581
- zone_offset: optionalNumber2(ctx, "zone-offset"),
3582
- limit: optionalNumber2(ctx, "limit"),
3583
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3461
+ request_id: optionalString(ctx, "request-id"),
3462
+ use_cache: optionalBoolean(ctx, "use-cache"),
3463
+ zone_offset: optionalNumber(ctx, "zone-offset"),
3464
+ limit: optionalNumber(ctx, "limit"),
3465
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3584
3466
  });
3585
3467
  }
3586
3468
  function eventDetailExportInput(ctx) {
3587
3469
  return compactInput({
3588
3470
  project_id: ctx.num("project-id"),
3589
3471
  definition: ctx.json("definition"),
3590
- request_id: optionalString2(ctx, "request-id"),
3591
- use_cache: optionalBoolean2(ctx, "use-cache"),
3592
- zone_offset: optionalNumber2(ctx, "zone-offset"),
3593
- format: optionalString2(ctx, "artifact-format"),
3594
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3472
+ request_id: optionalString(ctx, "request-id"),
3473
+ use_cache: optionalBoolean(ctx, "use-cache"),
3474
+ zone_offset: optionalNumber(ctx, "zone-offset"),
3475
+ format: optionalString(ctx, "artifact-format"),
3476
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3595
3477
  });
3596
3478
  }
3597
3479
  var eventDetailBaseFlags = [
@@ -3654,22 +3536,22 @@ function entityDetailRunInput(ctx) {
3654
3536
  return compactInput({
3655
3537
  project_id: ctx.num("project-id"),
3656
3538
  definition: ctx.json("definition"),
3657
- request_id: optionalString2(ctx, "request-id"),
3658
- use_cache: optionalBoolean2(ctx, "use-cache"),
3659
- zone_offset: optionalNumber2(ctx, "zone-offset"),
3660
- limit: optionalNumber2(ctx, "limit"),
3661
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3539
+ request_id: optionalString(ctx, "request-id"),
3540
+ use_cache: optionalBoolean(ctx, "use-cache"),
3541
+ zone_offset: optionalNumber(ctx, "zone-offset"),
3542
+ limit: optionalNumber(ctx, "limit"),
3543
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3662
3544
  });
3663
3545
  }
3664
3546
  function entityDetailExportInput(ctx) {
3665
3547
  return compactInput({
3666
3548
  project_id: ctx.num("project-id"),
3667
3549
  definition: ctx.json("definition"),
3668
- request_id: optionalString2(ctx, "request-id"),
3669
- use_cache: optionalBoolean2(ctx, "use-cache"),
3670
- zone_offset: optionalNumber2(ctx, "zone-offset"),
3671
- format: optionalString2(ctx, "artifact-format"),
3672
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3550
+ request_id: optionalString(ctx, "request-id"),
3551
+ use_cache: optionalBoolean(ctx, "use-cache"),
3552
+ zone_offset: optionalNumber(ctx, "zone-offset"),
3553
+ format: optionalString(ctx, "artifact-format"),
3554
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3673
3555
  });
3674
3556
  }
3675
3557
  var entityDetailBaseFlags = [
@@ -3729,6 +3611,7 @@ var queryContextIdFlag = {
3729
3611
  desc: "query_context_id returned by a synchronous event-analysis preview. Analysis exports never create one."
3730
3612
  };
3731
3613
  var drilldownEventsRunFlags = [
3614
+ projectIdFlag,
3732
3615
  queryContextIdFlag,
3733
3616
  sourceFlag,
3734
3617
  coordinateFlag,
@@ -3745,6 +3628,7 @@ var csvArtifactFormatFlag = {
3745
3628
  desc: "Artifact format. Only csv is supported; the downloaded artifact is csv.gz."
3746
3629
  };
3747
3630
  var drilldownEventsExportFlags = [
3631
+ projectIdFlag,
3748
3632
  queryContextIdFlag,
3749
3633
  sourceFlag,
3750
3634
  coordinateFlag,
@@ -3756,26 +3640,28 @@ var drilldownEventsExportFlags = [
3756
3640
  ];
3757
3641
  function drilldownEventsRunInput(ctx) {
3758
3642
  return compactInput({
3643
+ project_id: ctx.num("project-id"),
3759
3644
  query_context_id: ctx.str("query-context-id"),
3760
3645
  source: optionalJson(ctx, "source"),
3761
3646
  coordinate: ctx.json("coordinate"),
3762
3647
  properties: optionalJson(ctx, "properties"),
3763
- request_id: optionalString2(ctx, "request-id"),
3764
- use_cache: optionalBoolean2(ctx, "use-cache"),
3765
- limit: optionalNumber2(ctx, "limit"),
3766
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3648
+ request_id: optionalString(ctx, "request-id"),
3649
+ use_cache: optionalBoolean(ctx, "use-cache"),
3650
+ limit: optionalNumber(ctx, "limit"),
3651
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3767
3652
  });
3768
3653
  }
3769
3654
  function drilldownEventsExportInput(ctx) {
3770
3655
  return compactInput({
3656
+ project_id: ctx.num("project-id"),
3771
3657
  query_context_id: ctx.str("query-context-id"),
3772
3658
  source: optionalJson(ctx, "source"),
3773
3659
  coordinate: ctx.json("coordinate"),
3774
3660
  properties: optionalJson(ctx, "properties"),
3775
- request_id: optionalString2(ctx, "request-id"),
3776
- use_cache: optionalBoolean2(ctx, "use-cache"),
3777
- format: optionalString2(ctx, "artifact-format"),
3778
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3661
+ request_id: optionalString(ctx, "request-id"),
3662
+ use_cache: optionalBoolean(ctx, "use-cache"),
3663
+ format: optionalString(ctx, "artifact-format"),
3664
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3779
3665
  });
3780
3666
  }
3781
3667
 
@@ -3820,6 +3706,7 @@ var csvArtifactFormatFlag2 = {
3820
3706
  desc: "Artifact format. Only csv is supported; the downloaded artifact is csv.gz."
3821
3707
  };
3822
3708
  var drilldownEntitiesBaseFlags = [
3709
+ projectIdFlag,
3823
3710
  queryContextIdFlag2,
3824
3711
  sourceFlag,
3825
3712
  coordinateFlag,
@@ -3840,25 +3727,26 @@ var drilldownEntitiesExportFlags = [
3840
3727
  function drilldownEntitiesRunInput(ctx) {
3841
3728
  return compactInput({
3842
3729
  ...baseInput(ctx),
3843
- limit: optionalNumber2(ctx, "limit"),
3844
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3730
+ limit: optionalNumber(ctx, "limit"),
3731
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3845
3732
  });
3846
3733
  }
3847
3734
  function drilldownEntitiesExportInput(ctx) {
3848
3735
  return compactInput({
3849
3736
  ...baseInput(ctx),
3850
- format: optionalString2(ctx, "artifact-format"),
3851
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3737
+ format: optionalString(ctx, "artifact-format"),
3738
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3852
3739
  });
3853
3740
  }
3854
3741
  function baseInput(ctx) {
3855
3742
  return {
3743
+ project_id: ctx.num("project-id"),
3856
3744
  query_context_id: ctx.str("query-context-id"),
3857
3745
  source: optionalJson(ctx, "source"),
3858
3746
  coordinate: ctx.json("coordinate"),
3859
3747
  properties: optionalJson(ctx, "properties"),
3860
- request_id: optionalString2(ctx, "request-id"),
3861
- use_cache: optionalBoolean2(ctx, "use-cache")
3748
+ request_id: optionalString(ctx, "request-id"),
3749
+ use_cache: optionalBoolean(ctx, "use-cache")
3862
3750
  };
3863
3751
  }
3864
3752
 
@@ -3917,6 +3805,7 @@ var csvArtifactFormatFlag3 = {
3917
3805
  desc: "Artifact format. Only csv is supported; the downloaded artifact is csv.gz."
3918
3806
  };
3919
3807
  var drilldownUserEventsBaseFlags = [
3808
+ projectIdFlag,
3920
3809
  drilldownContextIdFlag,
3921
3810
  userIdFlag,
3922
3811
  ...sequenceFlags,
@@ -3936,29 +3825,30 @@ var drilldownUserEventsExportFlags = [
3936
3825
  function drilldownUserEventsRunInput(ctx) {
3937
3826
  return compactInput({
3938
3827
  ...baseInput2(ctx),
3939
- limit: optionalNumber2(ctx, "limit"),
3940
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3828
+ limit: optionalNumber(ctx, "limit"),
3829
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3941
3830
  });
3942
3831
  }
3943
3832
  function drilldownUserEventsExportInput(ctx) {
3944
3833
  return compactInput({
3945
3834
  ...baseInput2(ctx),
3946
- format: optionalString2(ctx, "artifact-format"),
3947
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3835
+ format: optionalString(ctx, "artifact-format"),
3836
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3948
3837
  });
3949
3838
  }
3950
3839
  function baseInput2(ctx) {
3951
3840
  return {
3841
+ project_id: ctx.num("project-id"),
3952
3842
  drilldown_context_id: ctx.str("drilldown-context-id"),
3953
3843
  user_id: ctx.str("user-id"),
3954
3844
  properties: optionalJson(ctx, "properties"),
3955
- sort_order: optionalString2(ctx, "sort-order"),
3956
- event_name_filter: optionalString2(ctx, "event-name-filter"),
3957
- time_filter: optionalString2(ctx, "time-filter"),
3958
- time_filter_before_nums: optionalNumber2(ctx, "time-filter-before-nums"),
3959
- time_filter_after_nums: optionalNumber2(ctx, "time-filter-after-nums"),
3960
- request_id: optionalString2(ctx, "request-id"),
3961
- use_cache: optionalBoolean2(ctx, "use-cache")
3845
+ sort_order: optionalString(ctx, "sort-order"),
3846
+ event_name_filter: optionalString(ctx, "event-name-filter"),
3847
+ time_filter: optionalString(ctx, "time-filter"),
3848
+ time_filter_before_nums: optionalNumber(ctx, "time-filter-before-nums"),
3849
+ time_filter_after_nums: optionalNumber(ctx, "time-filter-after-nums"),
3850
+ request_id: optionalString(ctx, "request-id"),
3851
+ use_cache: optionalBoolean(ctx, "use-cache")
3962
3852
  };
3963
3853
  }
3964
3854
 
@@ -4270,11 +4160,11 @@ function uploadedInputFileId(value) {
4270
4160
  function assetListInput(ctx) {
4271
4161
  return compactInput({
4272
4162
  project_id: ctx.num("project-id"),
4273
- query: optionalString2(ctx, "query"),
4163
+ query: optionalString(ctx, "query"),
4274
4164
  fields: optionalJsonArray(ctx, "fields"),
4275
- limit: optionalNumber2(ctx, "limit"),
4276
- offset: optionalNumber2(ctx, "offset"),
4277
- authenticated_only: optionalBoolean2(ctx, "authenticated-only")
4165
+ limit: optionalNumber(ctx, "limit"),
4166
+ offset: optionalNumber(ctx, "offset"),
4167
+ authenticated_only: optionalBoolean(ctx, "authenticated-only")
4278
4168
  });
4279
4169
  }
4280
4170
  function memberInput(ctx, kind, inline) {
@@ -4282,14 +4172,14 @@ function memberInput(ctx, kind, inline) {
4282
4172
  project_id: ctx.num("project-id"),
4283
4173
  cluster_name: kind === "cluster" ? ctx.str("cluster-name") : void 0,
4284
4174
  tag_name: kind === "tag" ? ctx.str("tag-name") : void 0,
4285
- snapshot_date: kind === "tag" ? optionalString2(ctx, "snapshot-date") : void 0,
4175
+ snapshot_date: kind === "tag" ? optionalString(ctx, "snapshot-date") : void 0,
4286
4176
  property_names: optionalJsonArray(ctx, "property-names"),
4287
4177
  fields: optionalJsonArray(ctx, "fields"),
4288
- query: optionalString2(ctx, "query"),
4289
- use_cache: optionalBoolean2(ctx, "use-cache"),
4290
- request_id: optionalString2(ctx, "request-id"),
4291
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
4292
- limit: inline ? optionalNumber2(ctx, "limit") : void 0,
4178
+ query: optionalString(ctx, "query"),
4179
+ use_cache: optionalBoolean(ctx, "use-cache"),
4180
+ request_id: optionalString(ctx, "request-id"),
4181
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
4182
+ limit: inline ? optionalNumber(ctx, "limit") : void 0,
4293
4183
  format: inline ? void 0 : optionalJsonlFormat(ctx)
4294
4184
  });
4295
4185
  }
@@ -4299,12 +4189,12 @@ function clusterWriteInput(ctx, create) {
4299
4189
  return compactInput({
4300
4190
  project_id: ctx.num("project-id"),
4301
4191
  cluster_name: ctx.str("cluster-name"),
4302
- display_name: create ? ctx.str("display-name") : optionalString2(ctx, "display-name"),
4192
+ display_name: create ? ctx.str("display-name") : optionalString(ctx, "display-name"),
4303
4193
  definition_request: definitionRequest,
4304
- authenticated_only: optionalBoolean2(ctx, "authenticated-only"),
4305
- remark: create ? void 0 : optionalString2(ctx, "remark"),
4306
- zone_offset: optionalNumber2(ctx, "zone-offset"),
4307
- entity_id: create ? optionalNumber2(ctx, "entity-id") : void 0
4194
+ authenticated_only: optionalBoolean(ctx, "authenticated-only"),
4195
+ remark: create ? void 0 : optionalString(ctx, "remark"),
4196
+ zone_offset: optionalNumber(ctx, "zone-offset"),
4197
+ entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
4308
4198
  });
4309
4199
  }
4310
4200
  function tagWriteInput(ctx, create) {
@@ -4313,12 +4203,12 @@ function tagWriteInput(ctx, create) {
4313
4203
  return compactInput({
4314
4204
  project_id: ctx.num("project-id"),
4315
4205
  tag_name: ctx.str("tag-name"),
4316
- display_name: create ? ctx.str("display-name") : optionalString2(ctx, "display-name"),
4206
+ display_name: create ? ctx.str("display-name") : optionalString(ctx, "display-name"),
4317
4207
  definition_request: definitionRequest,
4318
- authenticated_only: optionalBoolean2(ctx, "authenticated-only"),
4319
- remark: create ? void 0 : optionalString2(ctx, "remark"),
4320
- zone_offset: optionalNumber2(ctx, "zone-offset"),
4321
- entity_id: create ? optionalNumber2(ctx, "entity-id") : void 0
4208
+ authenticated_only: optionalBoolean(ctx, "authenticated-only"),
4209
+ remark: create ? void 0 : optionalString(ctx, "remark"),
4210
+ zone_offset: optionalNumber(ctx, "zone-offset"),
4211
+ entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
4322
4212
  });
4323
4213
  }
4324
4214
  function validateDefinitionRequest(create, definitionRequest) {
@@ -4329,25 +4219,25 @@ function validateDefinitionRequest(create, definitionRequest) {
4329
4219
  function idClusterInput(ctx, create) {
4330
4220
  return compactInput({
4331
4221
  project_id: ctx.num("project-id"),
4332
- cluster_name: create ? optionalString2(ctx, "cluster-name") : ctx.str("cluster-name"),
4333
- display_name: create ? ctx.str("display-name") : optionalString2(ctx, "display-name"),
4334
- input_file_id: optionalString2(ctx, "input-file-id"),
4335
- file_content: optionalString2(ctx, "file-content"),
4222
+ cluster_name: create ? optionalString(ctx, "cluster-name") : ctx.str("cluster-name"),
4223
+ display_name: create ? ctx.str("display-name") : optionalString(ctx, "display-name"),
4224
+ input_file_id: optionalString(ctx, "input-file-id"),
4225
+ file_content: optionalString(ctx, "file-content"),
4336
4226
  entity_id: create ? ctx.num("entity-id") : void 0,
4337
- remarks: optionalString2(ctx, "remarks"),
4338
- main_column_name: optionalString2(ctx, "association-property")
4227
+ remarks: optionalString(ctx, "remarks"),
4228
+ main_column_name: optionalString(ctx, "association-property")
4339
4229
  });
4340
4230
  }
4341
4231
  function idTagInput(ctx, create) {
4342
4232
  return compactInput({
4343
4233
  project_id: ctx.num("project-id"),
4344
- tag_name: create ? optionalString2(ctx, "tag-name") : ctx.str("tag-name"),
4345
- display_name: create ? ctx.str("display-name") : optionalString2(ctx, "display-name"),
4346
- input_file_id: optionalString2(ctx, "input-file-id"),
4347
- file_content: optionalString2(ctx, "file-content"),
4348
- entity_id: create ? ctx.num("entity-id") : optionalNumber2(ctx, "entity-id"),
4349
- remarks: optionalString2(ctx, "remarks"),
4350
- main_column_name: optionalString2(ctx, "association-property")
4234
+ tag_name: create ? optionalString(ctx, "tag-name") : ctx.str("tag-name"),
4235
+ display_name: create ? ctx.str("display-name") : optionalString(ctx, "display-name"),
4236
+ input_file_id: optionalString(ctx, "input-file-id"),
4237
+ file_content: optionalString(ctx, "file-content"),
4238
+ entity_id: create ? ctx.num("entity-id") : optionalNumber(ctx, "entity-id"),
4239
+ remarks: optionalString(ctx, "remarks"),
4240
+ main_column_name: optionalString(ctx, "association-property")
4351
4241
  });
4352
4242
  }
4353
4243
  function historyTagDataInput(ctx, inline) {
@@ -4355,9 +4245,9 @@ function historyTagDataInput(ctx, inline) {
4355
4245
  project_id: ctx.num("project-id"),
4356
4246
  tag_name: ctx.str("tag-name"),
4357
4247
  view: ctx.json("view"),
4358
- request_id: optionalString2(ctx, "request-id"),
4359
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
4360
- limit: inline ? optionalNumber2(ctx, "limit") : void 0,
4248
+ request_id: optionalString(ctx, "request-id"),
4249
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
4250
+ limit: inline ? optionalNumber(ctx, "limit") : void 0,
4361
4251
  format: inline ? void 0 : optionalJsonlFormat(ctx)
4362
4252
  });
4363
4253
  }
@@ -4370,16 +4260,16 @@ function historyTagDataDrilldownInput(ctx, inline) {
4370
4260
  view: ctx.json("view"),
4371
4261
  property_names: optionalJsonArray(ctx, "property-names"),
4372
4262
  fields: optionalJsonArray(ctx, "fields"),
4373
- query: optionalString2(ctx, "query"),
4374
- use_cache: optionalBoolean2(ctx, "use-cache"),
4375
- request_id: optionalString2(ctx, "request-id"),
4376
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
4377
- limit: inline ? optionalNumber2(ctx, "limit") : void 0,
4263
+ query: optionalString(ctx, "query"),
4264
+ use_cache: optionalBoolean(ctx, "use-cache"),
4265
+ request_id: optionalString(ctx, "request-id"),
4266
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
4267
+ limit: inline ? optionalNumber(ctx, "limit") : void 0,
4378
4268
  format: inline ? void 0 : optionalJsonlFormat(ctx)
4379
4269
  });
4380
4270
  }
4381
4271
  function optionalJsonlFormat(ctx) {
4382
- const format = optionalString2(ctx, "artifact-format");
4272
+ const format = optionalString(ctx, "artifact-format");
4383
4273
  if (format !== void 0 && format !== "jsonl") {
4384
4274
  throw new Error("--artifact-format only supports jsonl for user member/history-tag exports");
4385
4275
  }
@@ -4472,7 +4362,7 @@ var commands38 = [
4472
4362
  ], "high-risk-write", (ctx) => compactInput({
4473
4363
  project_id: ctx.num("project-id"),
4474
4364
  cluster_name: ctx.str("cluster-name"),
4475
- confirmed: optionalBoolean2(ctx, "confirmed")
4365
+ confirmed: optionalBoolean(ctx, "confirmed")
4476
4366
  })),
4477
4367
  capability("user-tag", "list", "analysis.user_tag.list", "List user tags for discovery. Returned identifiers use canonical tag_name. Use offset only for stable asset browsing.", tagListFlags, "read", assetListInput),
4478
4368
  capability("user-tag", "get", "analysis.user_tag.get", "Get user tag details by exact tag_name values.", [
@@ -4541,7 +4431,7 @@ var commands38 = [
4541
4431
  ], "high-risk-write", (ctx) => compactInput({
4542
4432
  project_id: ctx.num("project-id"),
4543
4433
  tag_name: ctx.str("tag-name"),
4544
- confirmed: optionalBoolean2(ctx, "confirmed")
4434
+ confirmed: optionalBoolean(ctx, "confirmed")
4545
4435
  })),
4546
4436
  capability("history-tag", "list", "analysis.history_tag.list", "List history tag snapshots for a tag.", [
4547
4437
  projectIdFlag,
@@ -4556,7 +4446,7 @@ var commands38 = [
4556
4446
  project_id: ctx.num("project-id"),
4557
4447
  tag_name: ctx.str("tag-name"),
4558
4448
  refresh_date: ctx.str("refresh-date"),
4559
- use_user_table_type: optionalString2(ctx, "use-user-table-type")
4449
+ use_user_table_type: optionalString(ctx, "use-user-table-type")
4560
4450
  })),
4561
4451
  capability("history-tag", "batch-refresh", "analysis.history_tag.batch_refresh", "Batch refresh history tag snapshots using the product refresh request object.", [
4562
4452
  projectIdFlag,
@@ -4578,7 +4468,7 @@ var commands38 = [
4578
4468
  tag_name: ctx.str("tag-name"),
4579
4469
  start_time: ctx.str("start-time"),
4580
4470
  end_time: ctx.str("end-time"),
4581
- confirmed: optionalBoolean2(ctx, "confirmed")
4471
+ confirmed: optionalBoolean(ctx, "confirmed")
4582
4472
  })),
4583
4473
  capability("history-tag-data", "run", "analysis.history_tag_data.run", `Run a bounded history tag statistics query. ${analysisDataRunRoutingHelp}`, [
4584
4474
  projectIdFlag,
@@ -4613,24 +4503,20 @@ var commands38 = [
4613
4503
  ];
4614
4504
  var user_default = commands38;
4615
4505
 
4616
- // src/commands/te-analysis/global/list-query-clusters.ts
4617
- var listQueryClusters = createMcpCommand({
4618
- command: "+list_query_clusters",
4619
- description: "List query cluster options accessible to the current account in the project. Use this to decide whether to query the current self cluster, global aggregated data, or one specific slave cluster.",
4620
- flags: [
4621
- { name: "project_id", type: "number", required: true, desc: "Project ID used to resolve cluster query permissions", alias: "p" }
4622
- ],
4506
+ // src/commands/te-analysis/query-cluster/list.ts
4507
+ var queryClusterList = createAnalysisCapabilityCommand({
4508
+ resource: "query-cluster",
4509
+ command: "list",
4510
+ capabilityId: "analysis.query_cluster.list",
4511
+ description: "List accessible physical query-routing clusters and GLOBAL/SLAVE options. This is not the saved user cohort/cluster catalog.",
4512
+ flags: [projectIdFlag],
4623
4513
  risk: "read",
4624
- buildArgs: (ctx) => ({
4625
- projectId: ctx.num("project_id")
4626
- })
4514
+ buildInput: projectInput
4627
4515
  });
4628
4516
 
4629
- // src/commands/te-analysis/global/index.ts
4630
- var commands39 = [
4631
- listQueryClusters
4632
- ];
4633
- var global_default = commands39;
4517
+ // src/commands/te-analysis/query-cluster/index.ts
4518
+ var commands39 = [queryClusterList];
4519
+ var query_cluster_default = commands39;
4634
4520
 
4635
4521
  // src/commands/te-analysis/sql-table/columns.ts
4636
4522
  var sqlTableColumns = createAnalysisCapabilityCommand({
@@ -4652,7 +4538,7 @@ var sqlTableColumns = createAnalysisCapabilityCommand({
4652
4538
  buildInput: (ctx) => compactInput({
4653
4539
  ...projectInput(ctx),
4654
4540
  table_ref: ctx.str("table-ref"),
4655
- usage: optionalString2(ctx, "usage")
4541
+ usage: optionalString(ctx, "usage")
4656
4542
  })
4657
4543
  });
4658
4544
 
@@ -4666,10 +4552,10 @@ var sqlTableList = createAnalysisCapabilityCommand({
4666
4552
  risk: "read",
4667
4553
  buildInput: (ctx) => compactInput({
4668
4554
  project_id: ctx.num("project-id"),
4669
- query: optionalString2(ctx, "query"),
4670
- limit: optionalNumber2(ctx, "limit"),
4671
- offset: optionalNumber2(ctx, "offset"),
4672
- usage: optionalString2(ctx, "usage")
4555
+ query: optionalString(ctx, "query"),
4556
+ limit: optionalNumber(ctx, "limit"),
4557
+ offset: optionalNumber(ctx, "offset"),
4558
+ usage: optionalString(ctx, "usage")
4673
4559
  })
4674
4560
  });
4675
4561
 
@@ -4823,7 +4709,7 @@ var projectDataPowerDelete = createAnalysisCapabilityCommand({
4823
4709
  buildInput: (ctx) => compactInput({
4824
4710
  project_id: ctx.num("project-id"),
4825
4711
  data_power_id: ctx.num("data-power-id"),
4826
- new_data_power_id: optionalNumber2(ctx, "new-data-power-id"),
4712
+ new_data_power_id: optionalNumber(ctx, "new-data-power-id"),
4827
4713
  yes: true
4828
4714
  })
4829
4715
  });
@@ -4905,7 +4791,7 @@ var projectEntityCreate = createAnalysisCapabilityCommand({
4905
4791
  entity_name: ctx.str("entity-name"),
4906
4792
  column_name: ctx.str("column-name"),
4907
4793
  table_type: ctx.num("table-type"),
4908
- order: optionalNumber2(ctx, "order")
4794
+ order: optionalNumber(ctx, "order")
4909
4795
  })
4910
4796
  });
4911
4797
 
@@ -4961,11 +4847,11 @@ var projectEntityList = createAnalysisCapabilityCommand({
4961
4847
  risk: "read",
4962
4848
  buildInput: (ctx) => compactInput({
4963
4849
  project_id: ctx.num("project-id"),
4964
- query: optionalString2(ctx, "query"),
4850
+ query: optionalString(ctx, "query"),
4965
4851
  fields: optionalJson(ctx, "fields"),
4966
- limit: optionalNumber2(ctx, "limit"),
4967
- offset: optionalNumber2(ctx, "offset"),
4968
- event_name: optionalString2(ctx, "event-name")
4852
+ limit: optionalNumber(ctx, "limit"),
4853
+ offset: optionalNumber(ctx, "offset"),
4854
+ event_name: optionalString(ctx, "event-name")
4969
4855
  })
4970
4856
  });
4971
4857
 
@@ -4990,7 +4876,7 @@ var projectEntityUpdate = createAnalysisCapabilityCommand({
4990
4876
  entity_name: ctx.str("entity-name"),
4991
4877
  column_name: ctx.str("column-name"),
4992
4878
  table_type: ctx.num("table-type"),
4993
- order: optionalNumber2(ctx, "order")
4879
+ order: optionalNumber(ctx, "order")
4994
4880
  })
4995
4881
  });
4996
4882
 
@@ -5039,7 +4925,7 @@ var projectFunctionList = createAnalysisCapabilityCommand({
5039
4925
  ],
5040
4926
  risk: "read",
5041
4927
  buildInput: (ctx) => compactInput({
5042
- company_id: optionalNumber2(ctx, "company-id"),
4928
+ company_id: optionalNumber(ctx, "company-id"),
5043
4929
  project_id: ctx.num("project-id")
5044
4930
  })
5045
4931
  });
@@ -5079,10 +4965,10 @@ var projectInfoList = createAnalysisCapabilityCommand({
5079
4965
  ],
5080
4966
  risk: "read",
5081
4967
  buildInput: (ctx) => compactInput({
5082
- query: optionalString2(ctx, "query"),
4968
+ query: optionalString(ctx, "query"),
5083
4969
  fields: optionalJson(ctx, "fields"),
5084
- limit: optionalNumber2(ctx, "limit"),
5085
- offset: optionalNumber2(ctx, "offset")
4970
+ limit: optionalNumber(ctx, "limit"),
4971
+ offset: optionalNumber(ctx, "offset")
5086
4972
  })
5087
4973
  });
5088
4974
 
@@ -5101,7 +4987,7 @@ var projectInfoUpdate = createAnalysisCapabilityCommand({
5101
4987
  buildInput: (ctx) => compactInput({
5102
4988
  project_id: ctx.num("project-id"),
5103
4989
  project_name: ctx.str("project-name"),
5104
- project_remark: optionalString2(ctx, "project-remark")
4990
+ project_remark: optionalString(ctx, "project-remark")
5105
4991
  })
5106
4992
  });
5107
4993
 
@@ -5130,9 +5016,9 @@ var projectMarkTimeCreate = createAnalysisCapabilityCommand({
5130
5016
  buildInput: (ctx) => compactInput({
5131
5017
  project_id: ctx.num("project-id"),
5132
5018
  marked_at: ctx.str("marked-at"),
5133
- zone_offset: optionalNumber2(ctx, "zone-offset"),
5019
+ zone_offset: optionalNumber(ctx, "zone-offset"),
5134
5020
  content: ctx.str("content"),
5135
- is_visible: optionalNumber2(ctx, "is-visible")
5021
+ is_visible: optionalNumber(ctx, "is-visible")
5136
5022
  })
5137
5023
  });
5138
5024
 
@@ -5171,11 +5057,11 @@ var projectMarkTimeList = createAnalysisCapabilityCommand({
5171
5057
  risk: "read",
5172
5058
  buildInput: (ctx) => compactInput({
5173
5059
  project_id: ctx.num("project-id"),
5174
- query: optionalString2(ctx, "query"),
5060
+ query: optionalString(ctx, "query"),
5175
5061
  fields: optionalJson(ctx, "fields"),
5176
- limit: optionalNumber2(ctx, "limit"),
5177
- offset: optionalNumber2(ctx, "offset"),
5178
- zone_offset: optionalNumber2(ctx, "zone-offset")
5062
+ limit: optionalNumber(ctx, "limit"),
5063
+ offset: optionalNumber(ctx, "offset"),
5064
+ zone_offset: optionalNumber(ctx, "zone-offset")
5179
5065
  })
5180
5066
  });
5181
5067
 
@@ -5198,9 +5084,9 @@ var projectMarkTimeUpdate = createAnalysisCapabilityCommand({
5198
5084
  project_id: ctx.num("project-id"),
5199
5085
  mark_time_id: ctx.num("mark-time-id"),
5200
5086
  marked_at: ctx.str("marked-at"),
5201
- zone_offset: optionalNumber2(ctx, "zone-offset"),
5087
+ zone_offset: optionalNumber(ctx, "zone-offset"),
5202
5088
  content: ctx.str("content"),
5203
- is_visible: optionalNumber2(ctx, "is-visible")
5089
+ is_visible: optionalNumber(ctx, "is-visible")
5204
5090
  })
5205
5091
  });
5206
5092
 
@@ -5347,7 +5233,7 @@ var projectMemberCandidateList = createAnalysisCapabilityCommand({
5347
5233
  buildInput: (ctx) => compactInput({
5348
5234
  project_id: ctx.num("project-id"),
5349
5235
  type: ctx.str("type"),
5350
- login_names: optionalString2(ctx, "login-names")
5236
+ login_names: optionalString(ctx, "login-names")
5351
5237
  })
5352
5238
  });
5353
5239
 
@@ -5372,7 +5258,7 @@ var projectMemberHandoverExport = createAnalysisCapabilityCommand({
5372
5258
  buildInput: (ctx) => compactInput({
5373
5259
  project_id: ctx.num("project-id"),
5374
5260
  payload: ctx.json("payload"),
5375
- request_id: optionalString2(ctx, "request-id"),
5261
+ request_id: optionalString(ctx, "request-id"),
5376
5262
  yes: true
5377
5263
  })
5378
5264
  });
@@ -5439,9 +5325,9 @@ var projectOwnerUpdate = createAnalysisCapabilityCommand({
5439
5325
  buildInput: (ctx) => compactInput({
5440
5326
  project_id: ctx.num("project-id"),
5441
5327
  company_id: ctx.num("company-id"),
5442
- owner_user_id: optionalNumber2(ctx, "owner-user-id"),
5443
- project_name: optionalString2(ctx, "project-name"),
5444
- project_remark: optionalString2(ctx, "project-remark")
5328
+ owner_user_id: optionalNumber(ctx, "owner-user-id"),
5329
+ project_name: optionalString(ctx, "project-name"),
5330
+ project_remark: optionalString(ctx, "project-remark")
5445
5331
  })
5446
5332
  });
5447
5333
 
@@ -5515,7 +5401,7 @@ var projectRoleDelete = createAnalysisCapabilityCommand({
5515
5401
  buildInput: (ctx) => compactInput({
5516
5402
  project_id: ctx.num("project-id"),
5517
5403
  role_name: ctx.str("role-name"),
5518
- new_role_name: optionalString2(ctx, "new-role-name"),
5404
+ new_role_name: optionalString(ctx, "new-role-name"),
5519
5405
  yes: true
5520
5406
  })
5521
5407
  });
@@ -5550,9 +5436,9 @@ var projectRoleList = createAnalysisCapabilityCommand({
5550
5436
  ],
5551
5437
  risk: "read",
5552
5438
  buildInput: (ctx) => compactInput({
5553
- company_id: optionalNumber2(ctx, "company-id"),
5439
+ company_id: optionalNumber(ctx, "company-id"),
5554
5440
  project_id: ctx.num("project-id"),
5555
- visible_only: optionalBoolean2(ctx, "visible-only")
5441
+ visible_only: optionalBoolean(ctx, "visible-only")
5556
5442
  })
5557
5443
  });
5558
5444
 
@@ -5597,11 +5483,11 @@ var projectRoleFunctionList = createAnalysisCapabilityCommand({
5597
5483
  ],
5598
5484
  risk: "read",
5599
5485
  buildInput: (ctx) => compactInput({
5600
- company_id: optionalNumber2(ctx, "company-id"),
5486
+ company_id: optionalNumber(ctx, "company-id"),
5601
5487
  project_id: ctx.num("project-id"),
5602
- role_name: optionalString2(ctx, "role-name"),
5488
+ role_name: optionalString(ctx, "role-name"),
5603
5489
  role_names: optionalJson(ctx, "role-names"),
5604
- show_system_func: optionalBoolean2(ctx, "show-system-func")
5490
+ show_system_func: optionalBoolean(ctx, "show-system-func")
5605
5491
  })
5606
5492
  });
5607
5493
 
@@ -5896,8 +5782,8 @@ function projectInput2(ctx) {
5896
5782
  function projectLifecycleInput(ctx) {
5897
5783
  return compactInput({
5898
5784
  ...projectInput2(ctx),
5899
- request_id: optionalString2(ctx, "request-id"),
5900
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
5785
+ request_id: optionalString(ctx, "request-id"),
5786
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
5901
5787
  });
5902
5788
  }
5903
5789
 
@@ -6004,7 +5890,7 @@ var trackingPlanImportExcel = {
6004
5890
  risk: "write",
6005
5891
  validate: validateSource,
6006
5892
  validateInput: async (ctx) => {
6007
- const inputFile = optionalString2(ctx, "input-file");
5893
+ const inputFile = optionalString(ctx, "input-file");
6008
5894
  if (inputFile) {
6009
5895
  return {
6010
5896
  valid: true,
@@ -6021,7 +5907,7 @@ var trackingPlanImportExcel = {
6021
5907
  );
6022
5908
  },
6023
5909
  dryRun: async (ctx) => {
6024
- const inputFile = optionalString2(ctx, "input-file");
5910
+ const inputFile = optionalString(ctx, "input-file");
6025
5911
  if (inputFile) {
6026
5912
  return {
6027
5913
  steps: [
@@ -6045,8 +5931,8 @@ var trackingPlanImportExcel = {
6045
5931
  );
6046
5932
  },
6047
5933
  execute: async (ctx) => {
6048
- const inputFile = optionalString2(ctx, "input-file");
6049
- let inputFileId = optionalString2(ctx, "input-file-id");
5934
+ const inputFile = optionalString(ctx, "input-file");
5935
+ let inputFileId = optionalString(ctx, "input-file-id");
6050
5936
  if (inputFile) {
6051
5937
  const upload = await uploadInputFile(
6052
5938
  ctx.host(),
@@ -6070,8 +5956,8 @@ var trackingPlanImportExcel = {
6070
5956
  }
6071
5957
  };
6072
5958
  function validateSource(ctx) {
6073
- const inputFile = optionalString2(ctx, "input-file");
6074
- const inputFileId = optionalString2(ctx, "input-file-id");
5959
+ const inputFile = optionalString(ctx, "input-file");
5960
+ const inputFileId = optionalString(ctx, "input-file-id");
6075
5961
  if (Boolean(inputFile) === Boolean(inputFileId)) {
6076
5962
  throw new Error("Pass exactly one of --input-file or --input-file-id");
6077
5963
  }
@@ -6083,7 +5969,7 @@ function buildInput(ctx, inputFileId) {
6083
5969
  return compactInput({
6084
5970
  ...projectInput2(ctx),
6085
5971
  input_file_id: inputFileId,
6086
- lang: optionalString2(ctx, "lang")
5972
+ lang: optionalString(ctx, "lang")
6087
5973
  });
6088
5974
  }
6089
5975
 
@@ -6146,7 +6032,7 @@ var trackingPlanChangeLogExport = createTrackingCapabilityCommand({
6146
6032
  description: "Export one tracking plan change log.",
6147
6033
  flags: [projectIdFlag, logIdFlag, requestIdFlag, asyncTimeoutSecondsFlag],
6148
6034
  risk: "read",
6149
- buildInput: (ctx) => compactInput({ ...projectInput2(ctx), log_id: ctx.num("log-id"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6035
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), log_id: ctx.num("log-id"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6150
6036
  });
6151
6037
 
6152
6038
  // src/commands/te-analysis/tracking/plan-change-log/index.ts
@@ -6190,7 +6076,7 @@ var trackingCheckGet = createTrackingCapabilityCommand({
6190
6076
  description: "Get one tracking validation result.",
6191
6077
  flags: [projectIdFlag, uuidFlag, requestIdFlag, timeoutSecondsFlag],
6192
6078
  risk: "read",
6193
- buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6079
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6194
6080
  });
6195
6081
 
6196
6082
  // src/commands/te-analysis/tracking/check/retry.ts
@@ -6201,7 +6087,7 @@ var trackingCheckRetry = createTrackingCapabilityCommand({
6201
6087
  description: "Retry one tracking validation run.",
6202
6088
  flags: [projectIdFlag, uuidFlag, requestIdFlag, timeoutSecondsFlag],
6203
6089
  risk: "write",
6204
- buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6090
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6205
6091
  });
6206
6092
 
6207
6093
  // src/commands/te-analysis/tracking/check/delete.ts
@@ -6223,7 +6109,7 @@ var trackingCheckExport = createTrackingCapabilityCommand({
6223
6109
  description: "Export one tracking validation result.",
6224
6110
  flags: [projectIdFlag, uuidFlag, requestIdFlag, asyncTimeoutSecondsFlag],
6225
6111
  risk: "read",
6226
- buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6112
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6227
6113
  });
6228
6114
 
6229
6115
  // src/commands/te-analysis/tracking/check/index.ts
@@ -6279,7 +6165,7 @@ var trackingLiveDataList = createTrackingCapabilityCommand({
6279
6165
  description: "List recent tracking live data.",
6280
6166
  flags: [projectIdFlag, dataTypeFlag, requestIdFlag, timeoutSecondsFlag],
6281
6167
  risk: "read",
6282
- buildInput: (ctx) => compactInput({ ...projectInput2(ctx), data_type: optionalString2(ctx, "data-type"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6168
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), data_type: optionalString(ctx, "data-type"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6283
6169
  });
6284
6170
 
6285
6171
  // src/commands/te-analysis/tracking/live-data/export.ts
@@ -6290,7 +6176,7 @@ var trackingLiveDataExport = createTrackingCapabilityCommand({
6290
6176
  description: "Export recent tracking live data.",
6291
6177
  flags: [projectIdFlag, dataTypeFlag, requestIdFlag, asyncTimeoutSecondsFlag],
6292
6178
  risk: "read",
6293
- buildInput: (ctx) => compactInput({ ...projectInput2(ctx), data_type: optionalString2(ctx, "data-type"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6179
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), data_type: optionalString(ctx, "data-type"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6294
6180
  });
6295
6181
 
6296
6182
  // src/commands/te-analysis/tracking/live-data/index.ts
@@ -6402,7 +6288,7 @@ var analysisAlertList = createAnalysisCapabilityCommand({
6402
6288
  description: "List project alerts.",
6403
6289
  flags: [projectIdFlag, queryFlag, limitFlag2, offsetFlag],
6404
6290
  risk: "read",
6405
- buildInput: (ctx) => compactInput({ ...projectInput3(ctx), query: optionalString2(ctx, "query"), limit: optionalNumber2(ctx, "limit"), offset: optionalNumber2(ctx, "offset") })
6291
+ buildInput: (ctx) => compactInput({ ...projectInput3(ctx), query: optionalString(ctx, "query"), limit: optionalNumber(ctx, "limit"), offset: optionalNumber(ctx, "offset") })
6406
6292
  });
6407
6293
 
6408
6294
  // src/commands/te-analysis/alert/get.ts
@@ -6508,7 +6394,7 @@ var analysisAlertDetailList = createAnalysisCapabilityCommand({
6508
6394
  description: "List alert delivery details.",
6509
6395
  flags: [projectIdFlag, alertIdFlag, startTimeFlag2, endTimeFlag2],
6510
6396
  risk: "read",
6511
- buildInput: (ctx) => compactInput({ ...alertIdInput(ctx), start_time: optionalString2(ctx, "start-time"), end_time: optionalString2(ctx, "end-time") })
6397
+ buildInput: (ctx) => compactInput({ ...alertIdInput(ctx), start_time: optionalString(ctx, "start-time"), end_time: optionalString(ctx, "end-time") })
6512
6398
  });
6513
6399
 
6514
6400
  // src/commands/te-analysis/alert-detail/index.ts
@@ -6577,7 +6463,7 @@ var baseCommands = [
6577
6463
  ...project_space_default,
6578
6464
  ...favorite_default,
6579
6465
  ...public_link_default,
6580
- ...model_default,
6466
+ ...filter_value_default,
6581
6467
  ...event_detail_default,
6582
6468
  ...entity_detail_default,
6583
6469
  ...drilldown_events_default,
@@ -6585,6 +6471,7 @@ var baseCommands = [
6585
6471
  ...drilldown_user_events_default,
6586
6472
  ...user_default,
6587
6473
  ...sql_table_default,
6474
+ ...query_cluster_default,
6588
6475
  ...entity_default,
6589
6476
  ...input_file_default,
6590
6477
  ...project_default,
@@ -6595,10 +6482,7 @@ var baseCommands = [
6595
6482
  ...alert_job_default,
6596
6483
  ...alert_notice_config_default
6597
6484
  ];
6598
- var commands77 = [
6599
- ...baseCommands,
6600
- ...isGlobalQueryModeEnabled() ? global_default : []
6601
- ];
6485
+ var commands77 = [...baseCommands];
6602
6486
  var te_analysis_default = commands77;
6603
6487
  export {
6604
6488
  baseCommands,