@thinkingai/ae-cli 6.0.34 → 6.0.36

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 (140) hide show
  1. package/dist/{auth-UPGUOKTW.js → auth-B2BRSYMS.js} +1 -1
  2. package/dist/{capability-TQ5KU5Q6.js → capability-6KPXYNO7.js} +1 -1
  3. package/dist/{capability-AJC5CBRT.js → capability-ROKYESAP.js} +1 -1
  4. package/dist/{chunk-6CHYBI64.js → chunk-EBPXT3TN.js} +1 -1
  5. package/dist/{chunk-4Q5TNP4Q.js → chunk-J7MZHDHQ.js} +48 -24
  6. package/dist/{chunk-IMMGMU54.js → chunk-JTKMDN4A.js} +64 -166
  7. package/dist/{chunk-ISY6HMHM.js → chunk-RRFK2W7I.js} +1 -1
  8. package/dist/{config-RCCGHHYA.js → config-DDYJPJX3.js} +4 -4
  9. package/dist/index.js +62 -27
  10. package/dist/{metadata-3M5F2AED.js → metadata-2ZFRMVOL.js} +2 -55
  11. package/dist/{metadata-W2MEOI4Z.js → metadata-ABQCKU5P.js} +2 -55
  12. package/dist/{model-OYQLXCQY.js → model-JASQVOFD.js} +1 -1
  13. package/dist/{raw-TPB7KSZO.js → raw-6HXFFHLV.js} +1 -1
  14. package/dist/{sync-EFJKFZK2.js → sync-BF3IWYFC.js} +2 -2
  15. package/dist/{te-agent-K2OWMZXT.js → te-agent-3GJ5H2XF.js} +195 -2
  16. package/dist/{te-analysis-I73ZS4NK.js → te-analysis-DJ6KELTU.js} +636 -668
  17. package/dist/{te-analysis-Q7AZCDU4.js → te-analysis-PCGESPLW.js} +636 -668
  18. package/dist/{te-dataops-OA7I6HBG.js → te-dataops-LXL5YULV.js} +7 -7
  19. package/dist/{te-dataops-MJV54MNY.js → te-dataops-ROHUJOX5.js} +7 -7
  20. package/dist/{te-engage-2FSDUOIZ.js → te-engage-2YDCA552.js} +87 -4
  21. package/dist/{te-engage-BMJ6UOUU.js → te-engage-VW6NJZ5V.js} +87 -4
  22. package/dist/te-meta-GBDTMPEL.js +95 -0
  23. package/dist/te-meta-ZTLTSHXC.js +95 -0
  24. package/dist/te-system-AH7DMCAQ.js +1706 -0
  25. package/dist/{te-team-PDKKW7Q5.js → te-team-RRZI4WRI.js} +1 -1
  26. package/dist/update-ER7VFU55.js +101 -0
  27. package/package.json +9 -4
  28. package/skills/ae-agent/SKILL.md +5 -1
  29. package/skills/ae-agent/references/create-automation.md +1 -0
  30. package/skills/ae-agent/references/list-sandbox-tools.md +79 -0
  31. package/skills/ae-analysis/SKILL.md +8 -9
  32. package/skills/ae-analysis/references/adhoc_export.md +8 -0
  33. package/skills/ae-analysis/references/adhoc_run.md +9 -0
  34. package/skills/ae-analysis/references/ai_models.md +3 -1
  35. package/skills/ae-analysis/references/alert_create.md +2 -3
  36. package/skills/ae-analysis/references/alert_update.md +2 -3
  37. package/skills/ae-analysis/references/analysis_data_retrieval.md +2 -0
  38. package/skills/ae-analysis/references/analysis_drilldown_contract.md +2 -0
  39. package/skills/ae-analysis/references/analysis_gateway_assets.md +15 -11
  40. package/skills/ae-analysis/references/bi_panel_create.md +12 -4
  41. package/skills/ae-analysis/references/bi_panel_update.md +11 -8
  42. package/skills/ae-analysis/references/bi_panel_version_publish.md +3 -1
  43. package/skills/ae-analysis/references/command_index.md +28 -47
  44. package/skills/ae-analysis/references/dashboard_daily_report_get.md +18 -0
  45. package/skills/ae-analysis/references/dashboard_daily_report_send.md +12 -9
  46. package/skills/ae-analysis/references/dashboard_daily_report_send_status.md +22 -0
  47. package/skills/ae-analysis/references/dashboard_daily_report_update.md +13 -6
  48. package/skills/ae-analysis/references/dashboard_report_data_export.md +4 -2
  49. package/skills/ae-analysis/references/dashboard_report_data_run.md +5 -3
  50. package/skills/ae-analysis/references/drilldown_entities_export.md +3 -0
  51. package/skills/ae-analysis/references/drilldown_entities_run.md +2 -1
  52. package/skills/ae-analysis/references/drilldown_events_export.md +3 -0
  53. package/skills/ae-analysis/references/drilldown_events_run.md +2 -1
  54. package/skills/ae-analysis/references/drilldown_user_events_export.md +8 -0
  55. package/skills/ae-analysis/references/drilldown_user_events_run.md +8 -0
  56. package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
  57. package/skills/ae-analysis/references/filter_value_list.md +47 -0
  58. package/skills/ae-analysis/references/project_space_get.md +3 -3
  59. package/skills/ae-analysis/references/project_space_list.md +6 -2
  60. package/skills/ae-analysis/references/query_cancel.md +3 -1
  61. package/skills/ae-analysis/references/query_cluster_list.md +34 -0
  62. package/skills/ae-analysis/references/query_create_result_cluster.md +2 -0
  63. package/skills/ae-analysis/references/report_create.md +5 -1
  64. package/skills/ae-analysis/references/report_data_export.md +9 -2
  65. package/skills/ae-analysis/references/report_data_run.md +8 -3
  66. package/skills/ae-analysis/references/report_get.md +3 -1
  67. package/skills/ae-analysis/references/report_update.md +4 -0
  68. package/skills/ae-analysis/references/super_metadata_batch_create.md +29 -0
  69. package/skills/ae-analysis/references/super_metadata_batch_edit.md +24 -0
  70. package/skills/ae-analysis/references/virtual_event_create.md +7 -6
  71. package/skills/ae-analysis-global/SKILL.md +15 -32
  72. package/skills/ae-community/SKILL.md +1 -1
  73. package/skills/ae-data-integration-helper/SKILL.md +3 -2
  74. package/skills/ae-data-integration-helper/references/sdk_usage_notes.md +1 -1
  75. package/skills/ae-dataops/SKILL.md +2 -1
  76. package/skills/ae-dataops/references/dataops-integration.md +75 -6
  77. package/skills/ae-engage/SKILL.md +32 -5
  78. package/skills/ae-engage/references/activity-topic.md +34 -1
  79. package/skills/ae-engage/references/add-channel.md +2 -3
  80. package/skills/ae-engage/references/build-task-save-guide.md +17 -3
  81. package/skills/ae-engage/references/channel-detail.md +2 -3
  82. package/skills/ae-engage/references/channel-list.md +2 -5
  83. package/skills/ae-engage/references/channel-mgmt.md +17 -2
  84. package/skills/ae-engage/references/channel-test-send.md +1 -1
  85. package/skills/ae-engage/references/channel-update-config.md +1 -1
  86. package/skills/ae-engage/references/delete-channel.md +2 -3
  87. package/skills/ae-engage/references/save-flow.md +6 -3
  88. package/skills/ae-engage/references/save-task.md +12 -15
  89. package/skills/ae-engage/references/scene-config-channel.md +28 -4
  90. package/skills/ae-engage/references/scene-config-group.md +1 -1
  91. package/skills/ae-engage/references/scene-config-item.md +1 -1
  92. package/skills/ae-engage/references/scene-config-metric.md +1 -1
  93. package/skills/ae-engage/references/scene-config-param.md +1 -1
  94. package/skills/ae-engage/references/scene-preset-metric.md +1 -1
  95. package/skills/ae-engage/references/scene-strategy-audience.md +680 -0
  96. package/skills/ae-engage/references/scene-strategy.md +16 -1
  97. package/skills/ae-engage/references/scene-template.md +1 -1
  98. package/skills/ae-engage/references/update-channel-status.md +2 -3
  99. package/skills/ae-generate-tracking-code/SKILL.md +4 -3
  100. package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +1 -1
  101. package/skills/ae-generate-tracking-code/references/server-sdk-insert.md +1 -1
  102. package/skills/ae-generate-tracking-code/references/snippet-delivery.md +1 -1
  103. package/skills/ae-generate-tracking-plan/SKILL.md +6 -2
  104. package/skills/ae-metadata/SKILL.md +8 -15
  105. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
  106. package/skills/ae-system/SKILL.md +357 -0
  107. package/dist/te-common-ST3QPSXJ.js +0 -61
  108. package/dist/te-common-WSLIKKPC.js +0 -61
  109. package/dist/te-meta-Q4L6EE3Q.js +0 -363
  110. package/dist/te-meta-VHCN4Q62.js +0 -363
  111. package/skills/ae-analysis/references/alert_definition_schema_get.md +0 -24
  112. package/skills/ae-analysis/references/batch_create_metadata.md +0 -41
  113. package/skills/ae-analysis/references/batch_edit_metadata.md +0 -39
  114. package/skills/ae-analysis/references/cancel_query.md +0 -38
  115. package/skills/ae-analysis/references/create_alert.md +0 -47
  116. package/skills/ae-analysis/references/create_entity.md +0 -39
  117. package/skills/ae-analysis/references/create_project_mark_time.md +0 -39
  118. package/skills/ae-analysis/references/delete_alert.md +0 -32
  119. package/skills/ae-analysis/references/delete_project_mark_times.md +0 -36
  120. package/skills/ae-analysis/references/delete_track_items.md +0 -36
  121. package/skills/ae-analysis/references/generate_track_program.md +0 -52
  122. package/skills/ae-analysis/references/generate_track_sdk_sample.md +0 -44
  123. package/skills/ae-analysis/references/get_alert.md +0 -35
  124. package/skills/ae-analysis/references/get_alert_definition_schema.md +0 -33
  125. package/skills/ae-analysis/references/get_project_config.md +0 -33
  126. package/skills/ae-analysis/references/get_track_program.md +0 -34
  127. package/skills/ae-analysis/references/list_alerts.md +0 -41
  128. package/skills/ae-analysis/references/list_entities.md +0 -42
  129. package/skills/ae-analysis/references/list_project_mark_times.md +0 -43
  130. package/skills/ae-analysis/references/list_project_users.md +0 -33
  131. package/skills/ae-analysis/references/list_projects.md +0 -39
  132. package/skills/ae-analysis/references/load_filters.md +0 -47
  133. package/skills/ae-analysis/references/save_track_items.md +0 -37
  134. package/skills/ae-analysis/references/update_alert.md +0 -49
  135. package/skills/ae-analysis/references/update_project_mark_time.md +0 -40
  136. package/skills/ae-analysis-global/references/list_query_clusters.md +0 -68
  137. package/skills/ae-metadata/references/metadata_event_get.md +0 -52
  138. package/skills/ae-metadata/references/metadata_property_get.md +0 -54
  139. package/dist/{te-community-WXGB6IOX.js → te-community-QOYIYEJI.js} +3 -3
  140. package/dist/{te-community-X2AHXGCA.js → te-community-UFKI6ONP.js} +3 -3
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCapabilityCommand
3
- } from "./chunk-6CHYBI64.js";
3
+ } from "./chunk-EBPXT3TN.js";
4
4
  import {
5
5
  registerCapabilityGatewayRoute,
6
6
  resolveGatewayDomain
@@ -18,159 +18,13 @@ import {
18
18
  } from "./chunk-RGXCNC4N.js";
19
19
  import {
20
20
  withOutputMetadata
21
- } from "./chunk-IMMGMU54.js";
22
- import {
23
- callMcpTool,
24
- parseMcpResult,
25
- resolveMcpUrl
26
- } from "./chunk-CPVTECJ3.js";
27
- import {
28
- isGlobalQueryModeEnabled
29
- } from "./chunk-LCXU3AAT.js";
21
+ } from "./chunk-JTKMDN4A.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,37 +268,29 @@ 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
  }
413
- function stringWithDefault(ctx, name, defaultValue) {
414
- const value = ctx.str(name);
415
- return value === "" ? defaultValue : value;
416
- }
417
- function numberWithDefault(ctx, name, defaultValue) {
418
- const value = ctx.str(name);
419
- return value === "" ? defaultValue : Number(value);
420
- }
421
294
  function booleanWithDefault(ctx, name, defaultValue) {
422
295
  const value = ctx.str(name);
423
296
  return value === "" ? defaultValue : ctx.bool(name);
@@ -518,11 +391,11 @@ var metadataEventList = createAnalysisMetaCapabilityCommand({
518
391
  risk: "read",
519
392
  buildInput: (ctx) => compactInput({
520
393
  ...projectInput(ctx),
521
- query: optionalString2(ctx, "query"),
394
+ query: optionalString(ctx, "query"),
522
395
  fields: optionalJson(ctx, "fields"),
523
- limit: optionalNumber2(ctx, "limit"),
524
- offset: optionalNumber2(ctx, "offset"),
525
- authenticated_only: optionalBoolean2(ctx, "authenticated-only")
396
+ limit: optionalNumber(ctx, "limit"),
397
+ offset: optionalNumber(ctx, "offset"),
398
+ authenticated_only: optionalBoolean(ctx, "authenticated-only")
526
399
  })
527
400
  });
528
401
 
@@ -567,7 +440,7 @@ var metadataEventUpdate = createAnalysisMetaCapabilityCommand({
567
440
  { name: "remark", type: "string", required: false, desc: "Event remark." }
568
441
  ],
569
442
  risk: "write",
570
- buildInput: (ctx) => compactInput({ ...projectInput(ctx), event_name: ctx.str("event-name"), event_desc: optionalString2(ctx, "event-desc"), remark: optionalString2(ctx, "remark") })
443
+ buildInput: (ctx) => compactInput({ ...projectInput(ctx), event_name: ctx.str("event-name"), event_desc: optionalString(ctx, "event-desc"), remark: optionalString(ctx, "remark") })
571
444
  });
572
445
 
573
446
  // src/commands/te-analysis/meta/event/relation-update.ts
@@ -675,14 +548,14 @@ var metadataPropertyList = createAnalysisMetaCapabilityCommand({
675
548
  risk: "read",
676
549
  buildInput: (ctx) => compactInput({
677
550
  ...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"),
551
+ table_type: optionalString(ctx, "table-type"),
552
+ scope: optionalString(ctx, "scope"),
553
+ event_name: optionalString(ctx, "event-name"),
554
+ query: optionalString(ctx, "query"),
682
555
  fields: optionalJson(ctx, "fields"),
683
- limit: optionalNumber2(ctx, "limit"),
684
- offset: optionalNumber2(ctx, "offset"),
685
- authenticated_only: optionalBoolean2(ctx, "authenticated-only")
556
+ limit: optionalNumber(ctx, "limit"),
557
+ offset: optionalNumber(ctx, "offset"),
558
+ authenticated_only: optionalBoolean(ctx, "authenticated-only")
686
559
  })
687
560
  });
688
561
 
@@ -730,7 +603,7 @@ var metadataPropertyUpdate = createAnalysisMetaCapabilityCommand({
730
603
  { name: "prop-remark", type: "string", required: false, desc: "Property remark." }
731
604
  ],
732
605
  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") })
606
+ 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
607
  });
735
608
 
736
609
  // src/commands/te-analysis/meta/property/relation-update.ts
@@ -850,15 +723,15 @@ var metadataVirtualEventCreate = createAnalysisMetaCapabilityCommand({
850
723
  { name: "event-name", type: "string", required: false, desc: "Virtual event name. Must start with 'ta@'." },
851
724
  { name: "event-desc", type: "string", required: false, desc: "Virtual event display name." },
852
725
  { 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." },
726
+ { 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?}]}." },
727
+ { 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
728
  { name: "override", type: "boolean", required: false, desc: "Whether to override an existing virtual event rule." }
856
729
  ],
857
730
  risk: "write",
858
731
  buildInput: (ctx) => compactInput({
859
732
  ...projectInput(ctx),
860
733
  payload: virtualEventPayload(ctx),
861
- override: optionalBoolean2(ctx, "override")
734
+ override: optionalBoolean(ctx, "override")
862
735
  })
863
736
  });
864
737
  function virtualEventPayload(ctx) {
@@ -866,8 +739,8 @@ function virtualEventPayload(ctx) {
866
739
  if (payload !== void 0) {
867
740
  return payload;
868
741
  }
869
- const eventName = optionalString2(ctx, "event-name");
870
- const eventDesc = optionalString2(ctx, "event-desc");
742
+ const eventName = optionalString(ctx, "event-name");
743
+ const eventDesc = optionalString(ctx, "event-desc");
871
744
  const events = optionalJson(ctx, "events");
872
745
  if (eventName === void 0 || eventDesc === void 0 || events === void 0) {
873
746
  throw new Error("Pass --payload, or pass --event-name, --event-desc, and --events");
@@ -875,7 +748,7 @@ function virtualEventPayload(ctx) {
875
748
  return compactInput({
876
749
  event_name: eventName,
877
750
  event_desc: eventDesc,
878
- remark: optionalString2(ctx, "remark"),
751
+ remark: optionalString(ctx, "remark"),
879
752
  rule: compactInput({
880
753
  events,
881
754
  filter: optionalJson(ctx, "filter")
@@ -947,11 +820,11 @@ var metadataVirtualPropertyCreate = createAnalysisMetaCapabilityCommand({
947
820
  sql_expression: ctx.str("sql-expression"),
948
821
  v_prop: virtualProperty(ctx),
949
822
  properties: optionalJson(ctx, "properties"),
950
- sql_event_relation_type: optionalString2(ctx, "sql-event-relation-type"),
823
+ sql_event_relation_type: optionalString(ctx, "sql-event-relation-type"),
951
824
  related_events: optionalJson(ctx, "related-events"),
952
825
  tag_date_policies: optionalJson(ctx, "tag-date-policies"),
953
- replace_remark: optionalString2(ctx, "replace-remark"),
954
- replace_suggestion: optionalString2(ctx, "replace-suggestion")
826
+ replace_remark: optionalString(ctx, "replace-remark"),
827
+ replace_suggestion: optionalString(ctx, "replace-suggestion")
955
828
  })
956
829
  });
957
830
  function virtualProperty(ctx) {
@@ -959,17 +832,17 @@ function virtualProperty(ctx) {
959
832
  if (vProp !== void 0) {
960
833
  return vProp;
961
834
  }
962
- const propertyName = optionalString2(ctx, "property-name");
963
- const tableType = optionalString2(ctx, "table-type");
964
- const selectType = optionalString2(ctx, "select-type");
835
+ const propertyName = optionalString(ctx, "property-name");
836
+ const tableType = optionalString(ctx, "table-type");
837
+ const selectType = optionalString(ctx, "select-type");
965
838
  if (propertyName === void 0 || tableType === void 0 || selectType === void 0) {
966
839
  throw new Error("Pass --v-prop, or pass --property-name, --table-type, and --select-type");
967
840
  }
968
841
  return {
969
842
  property: compactInput({
970
843
  column_name: propertyName,
971
- column_desc: optionalString2(ctx, "property-desc"),
972
- column_remark: optionalString2(ctx, "property-remark"),
844
+ column_desc: optionalString(ctx, "property-desc"),
845
+ column_remark: optionalString(ctx, "property-remark"),
973
846
  table_type: tableType,
974
847
  select_type: selectType
975
848
  })
@@ -999,11 +872,11 @@ var metadataVirtualPropertySqlRuleUpdate = createAnalysisMetaCapabilityCommand({
999
872
  sql_expression: ctx.str("sql-expression"),
1000
873
  v_prop: ctx.json("v-prop"),
1001
874
  properties: optionalJson(ctx, "properties"),
1002
- sql_event_relation_type: optionalString2(ctx, "sql-event-relation-type"),
875
+ sql_event_relation_type: optionalString(ctx, "sql-event-relation-type"),
1003
876
  related_events: optionalJson(ctx, "related-events"),
1004
877
  tag_date_policies: optionalJson(ctx, "tag-date-policies"),
1005
- replace_remark: optionalString2(ctx, "replace-remark"),
1006
- replace_suggestion: optionalString2(ctx, "replace-suggestion")
878
+ replace_remark: optionalString(ctx, "replace-remark"),
879
+ replace_suggestion: optionalString(ctx, "replace-suggestion")
1007
880
  })
1008
881
  });
1009
882
 
@@ -1019,7 +892,7 @@ var metadataVirtualPropertySqlRuleDelete = createAnalysisMetaCapabilityCommand({
1019
892
  { name: "operation", type: "string", required: false, desc: "Delete operation. Use revoke to revoke instead of delete." }
1020
893
  ],
1021
894
  risk: "high-risk-write",
1022
- buildInput: (ctx) => compactInput({ ...projectInput(ctx), v_prop_id: ctx.num("v-prop-id"), operation: optionalString2(ctx, "operation") })
895
+ buildInput: (ctx) => compactInput({ ...projectInput(ctx), v_prop_id: ctx.num("v-prop-id"), operation: optionalString(ctx, "operation") })
1023
896
  });
1024
897
 
1025
898
  // src/commands/te-analysis/meta/virtual-property/index.ts
@@ -1048,12 +921,12 @@ var metadataMetricList = createAnalysisMetaCapabilityCommand({
1048
921
  risk: "read",
1049
922
  buildInput: (ctx) => compactInput({
1050
923
  ...projectInput(ctx),
1051
- ignore_authentication: optionalBoolean2(ctx, "ignore-authentication"),
1052
- query: optionalString2(ctx, "query"),
924
+ ignore_authentication: optionalBoolean(ctx, "ignore-authentication"),
925
+ query: optionalString(ctx, "query"),
1053
926
  fields: optionalJson(ctx, "fields"),
1054
- limit: optionalNumber2(ctx, "limit"),
1055
- offset: optionalNumber2(ctx, "offset"),
1056
- authenticated_only: optionalBoolean2(ctx, "authenticated-only")
927
+ limit: optionalNumber(ctx, "limit"),
928
+ offset: optionalNumber(ctx, "offset"),
929
+ authenticated_only: optionalBoolean(ctx, "authenticated-only")
1057
930
  })
1058
931
  });
1059
932
 
@@ -1073,8 +946,8 @@ var metadataMetricGet = createAnalysisMetaCapabilityCommand({
1073
946
 
1074
947
  // src/commands/te-analysis/meta/metric/shared.ts
1075
948
  function metricMode(ctx) {
1076
- const mode = optionalNumber2(ctx, "metric-mode");
1077
- const modelType = optionalString2(ctx, "model-type");
949
+ const mode = optionalNumber(ctx, "metric-mode");
950
+ const modelType = optionalString(ctx, "model-type");
1078
951
  const mapped = modelType === void 0 ? void 0 : modelTypeToMetricMode(modelType);
1079
952
  if (mode === void 0 && mapped === void 0) {
1080
953
  throw new Error("Pass one of --model-type or --metric-mode");
@@ -1085,8 +958,8 @@ function metricMode(ctx) {
1085
958
  return mode ?? mapped;
1086
959
  }
1087
960
  function optionalMetricMode(ctx) {
1088
- const mode = optionalNumber2(ctx, "metric-mode");
1089
- const modelType = optionalString2(ctx, "model-type");
961
+ const mode = optionalNumber(ctx, "metric-mode");
962
+ const modelType = optionalString(ctx, "model-type");
1090
963
  const mapped = modelType === void 0 ? void 0 : modelTypeToMetricMode(modelType);
1091
964
  if (mode !== void 0 && mapped !== void 0 && mode !== mapped) {
1092
965
  throw new Error("--metric-mode must match --model-type when both are provided");
@@ -1125,7 +998,7 @@ var metadataMetricCreate = createAnalysisMetaCapabilityCommand({
1125
998
  ...projectInput(ctx),
1126
999
  metric_name: ctx.str("metric-name"),
1127
1000
  metric_desc: ctx.str("metric-desc"),
1128
- metric_remark: optionalString2(ctx, "metric-remark"),
1001
+ metric_remark: optionalString(ctx, "metric-remark"),
1129
1002
  metric_mode: metricMode(ctx),
1130
1003
  metric_events: ctx.json("metric-events"),
1131
1004
  metric_params: optionalJson(ctx, "metric-params")
@@ -1153,9 +1026,9 @@ var metadataMetricUpdate = createAnalysisMetaCapabilityCommand({
1153
1026
  buildInput: (ctx) => compactInput({
1154
1027
  ...projectInput(ctx),
1155
1028
  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"),
1029
+ metric_name: optionalString(ctx, "metric-name"),
1030
+ metric_desc: optionalString(ctx, "metric-desc"),
1031
+ metric_remark: optionalString(ctx, "metric-remark"),
1159
1032
  metric_mode: optionalMetricMode(ctx),
1160
1033
  metric_events: optionalJson(ctx, "metric-events"),
1161
1034
  metric_params: optionalJson(ctx, "metric-params")
@@ -1269,7 +1142,7 @@ var metadataAssetAbnormalGet = createAnalysisMetaCapabilityCommand({
1269
1142
  { name: "table-type", type: "number", required: false, desc: "Property table type when the resource is a property." }
1270
1143
  ],
1271
1144
  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") })
1145
+ 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
1146
  });
1274
1147
 
1275
1148
  // src/commands/te-analysis/meta/asset/shared.ts
@@ -1298,33 +1171,33 @@ var sortFieldFlag = { name: "sort-field", type: "string", required: false, desc:
1298
1171
  var sortOrderFlag = { name: "sort-order", type: "string", required: false, desc: "Sort order: asc or desc." };
1299
1172
  var recordIdFlag = { name: "record-id", type: "number", required: false, desc: "Operation record ID." };
1300
1173
  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"),
1174
+ node_id: (ctx) => optionalString(ctx, "node-id"),
1175
+ resource_id: (ctx) => optionalString(ctx, "resource-id"),
1176
+ resource_type: (ctx) => optionalString(ctx, "resource-type"),
1304
1177
  link_info: (ctx) => optionalJson(ctx, "link-info"),
1305
- query: (ctx) => optionalString2(ctx, "query"),
1178
+ query: (ctx) => optionalString(ctx, "query"),
1306
1179
  searchs: (ctx) => optionalJson(ctx, "searchs"),
1307
1180
  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"),
1181
+ operation_type: (ctx) => optionalString(ctx, "operation-type"),
1182
+ rule_id: (ctx) => optionalNumber(ctx, "rule-id"),
1183
+ rule_name: (ctx) => optionalString(ctx, "rule-name"),
1184
+ comment: (ctx) => optionalString(ctx, "comment"),
1312
1185
  node_ids: (ctx) => optionalJsonArray(ctx, "node-ids"),
1313
- reports_version: (ctx) => optionalNumber2(ctx, "reports-version"),
1314
- zone_offset: (ctx) => optionalNumber2(ctx, "zone-offset"),
1186
+ reports_version: (ctx) => optionalNumber(ctx, "reports-version"),
1187
+ zone_offset: (ctx) => optionalNumber(ctx, "zone-offset"),
1315
1188
  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"),
1189
+ dashboard_status: (ctx) => optionalString(ctx, "dashboard-status"),
1190
+ refresh_type: (ctx) => optionalNumber(ctx, "refresh-type"),
1318
1191
  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"),
1192
+ to_user_id: (ctx) => optionalNumber(ctx, "to-user-id"),
1193
+ clear_history_tag: (ctx) => optionalNumber(ctx, "clear-history-tag"),
1194
+ type: (ctx) => optionalString(ctx, "type"),
1322
1195
  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")
1196
+ sort_field: (ctx) => optionalString(ctx, "sort-field"),
1197
+ sort_order: (ctx) => optionalString(ctx, "sort-order"),
1198
+ record_id: (ctx) => optionalNumber(ctx, "record-id"),
1199
+ limit: (ctx) => optionalNumber(ctx, "limit"),
1200
+ offset: (ctx) => optionalNumber(ctx, "offset")
1328
1201
  };
1329
1202
  function assetGovernanceInput(ctx, fields) {
1330
1203
  const input = {
@@ -1463,6 +1336,46 @@ var commands7 = [
1463
1336
  ];
1464
1337
  var exchange_default = commands7;
1465
1338
 
1339
+ // src/commands/te-analysis/meta/super-metadata/batch-create.ts
1340
+ var metadataSuperMetadataBatchCreate = createAnalysisMetaCapabilityCommand({
1341
+ resource: "super-metadata",
1342
+ command: "batch-create",
1343
+ capabilityId: "metadata.super_metadata.batch_create",
1344
+ description: "Batch create effective system metadata: super events, event properties, and user properties.",
1345
+ flags: [
1346
+ projectIdFlag,
1347
+ { name: "events", type: "json", required: false, desc: "Optional super event JSON array. Items use event_name, event_desc, remark, and super_event_prop_names." },
1348
+ { name: "event-properties", type: "json", required: false, desc: "Optional event property JSON array. Items use prop_name, select_type, prop_desc, prop_remark, common_prop, and super_event_names." },
1349
+ { name: "user-properties", type: "json", required: false, desc: "Optional user property JSON array. Items use prop_name, select_type, prop_desc, and prop_remark." }
1350
+ ],
1351
+ risk: "write",
1352
+ buildInput: (ctx) => compactInput({
1353
+ ...projectInput(ctx),
1354
+ events: optionalJsonArray(ctx, "events"),
1355
+ event_properties: optionalJsonArray(ctx, "event-properties"),
1356
+ user_properties: optionalJsonArray(ctx, "user-properties")
1357
+ })
1358
+ });
1359
+
1360
+ // src/commands/te-analysis/meta/super-metadata/batch-edit.ts
1361
+ var metadataSuperMetadataBatchEdit = createAnalysisMetaCapabilityCommand({
1362
+ resource: "super-metadata",
1363
+ command: "batch-edit",
1364
+ capabilityId: "metadata.super_metadata.batch_edit",
1365
+ description: "Batch edit descriptions and remarks for effective system metadata.",
1366
+ flags: [
1367
+ projectIdFlag,
1368
+ { name: "type", type: "string", required: true, desc: "Metadata type to edit: event, event_property, or user_property." },
1369
+ { name: "items", type: "json", required: true, desc: "Batch edit item JSON array. Event items use event_name/event_desc/remark; property items use prop_name/prop_desc/prop_remark." }
1370
+ ],
1371
+ risk: "write",
1372
+ buildInput: (ctx) => compactInput({
1373
+ ...projectInput(ctx),
1374
+ type: ctx.str("type"),
1375
+ items: jsonArray(ctx, "items")
1376
+ })
1377
+ });
1378
+
1466
1379
  // src/commands/te-analysis/meta/super-metadata/export.ts
1467
1380
  var metadataSuperMetadataExport = createAnalysisMetaCapabilityCommand({
1468
1381
  resource: "event-property-bundle",
@@ -1477,8 +1390,8 @@ var metadataSuperMetadataExport = createAnalysisMetaCapabilityCommand({
1477
1390
  risk: "read",
1478
1391
  buildInput: (ctx) => compactInput({
1479
1392
  ...projectInput(ctx),
1480
- request_id: optionalString2(ctx, "request-id"),
1481
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
1393
+ request_id: optionalString(ctx, "request-id"),
1394
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
1482
1395
  })
1483
1396
  });
1484
1397
 
@@ -1498,13 +1411,15 @@ var metadataSuperMetadataImport = createAnalysisMetaCapabilityCommand({
1498
1411
  buildInput: (ctx) => compactInput({
1499
1412
  ...projectInput(ctx),
1500
1413
  operation: ctx.str("operation"),
1501
- input_file_id: optionalString2(ctx, "input-file-id"),
1502
- pre_import_meta_uuid: optionalString2(ctx, "pre-import-meta-uuid")
1414
+ input_file_id: optionalString(ctx, "input-file-id"),
1415
+ pre_import_meta_uuid: optionalString(ctx, "pre-import-meta-uuid")
1503
1416
  })
1504
1417
  });
1505
1418
 
1506
1419
  // src/commands/te-analysis/meta/super-metadata/index.ts
1507
1420
  var commands8 = [
1421
+ metadataSuperMetadataBatchCreate,
1422
+ metadataSuperMetadataBatchEdit,
1508
1423
  metadataSuperMetadataExport,
1509
1424
  metadataSuperMetadataImport
1510
1425
  ];
@@ -1577,12 +1492,6 @@ var datatable_default = commands9;
1577
1492
 
1578
1493
  // src/commands/te-analysis/meta/index.ts
1579
1494
  var commands10 = [
1580
- getAlertDefinitionSchema,
1581
- listAlerts,
1582
- getAlert,
1583
- createAlert,
1584
- updateAlert,
1585
- deleteAlert,
1586
1495
  ...event_default,
1587
1496
  ...property_default,
1588
1497
  ...virtual_event_default,
@@ -1869,7 +1778,7 @@ var reportListExport = createAnalysisCapabilityCommand({
1869
1778
  risk: "read",
1870
1779
  buildInput: (ctx) => compactInput({
1871
1780
  ...projectInput(ctx),
1872
- query: optionalString2(ctx, "query"),
1781
+ query: optionalString(ctx, "query"),
1873
1782
  fields: optionalJson(ctx, "fields"),
1874
1783
  model_types: optionalJson(ctx, "model-types"),
1875
1784
  ...exportLifecycleInput(ctx)
@@ -1911,7 +1820,7 @@ var REPORT_WRITE_MODEL_TYPE_VALUES = [
1911
1820
  "tag"
1912
1821
  ];
1913
1822
  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.';
1823
+ 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
1824
  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
1825
  function aiModelTypeFlag(required) {
1917
1826
  return {
@@ -1968,9 +1877,9 @@ var reportCreate = createAnalysisCapabilityCommand({
1968
1877
  report_name: ctx.str("report-name"),
1969
1878
  model_type: ctx.str("model-type"),
1970
1879
  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"),
1880
+ report_desc: optionalString(ctx, "report-desc"),
1881
+ cache_seconds: optionalNumber(ctx, "cache-seconds"),
1882
+ query_duration_ms: optionalNumber(ctx, "query-duration-ms"),
1974
1883
  dashboard_ids: optionalJsonArray(ctx, "dashboard-ids")
1975
1884
  })
1976
1885
  });
@@ -2008,12 +1917,12 @@ var reportUpdate = createAnalysisCapabilityCommand({
2008
1917
  ...projectInput(ctx),
2009
1918
  report_id: ctx.num("report-id"),
2010
1919
  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"),
1920
+ report_name: optionalString(ctx, "report-name"),
1921
+ report_desc: optionalString(ctx, "report-desc"),
1922
+ model_type: optionalString(ctx, "model-type"),
2014
1923
  definition: optionalJson(ctx, "definition"),
2015
- cache_seconds: optionalNumber2(ctx, "cache-seconds"),
2016
- query_duration_ms: optionalNumber2(ctx, "query-duration-ms")
1924
+ cache_seconds: optionalNumber(ctx, "cache-seconds"),
1925
+ query_duration_ms: optionalNumber(ctx, "query-duration-ms")
2017
1926
  })
2018
1927
  });
2019
1928
 
@@ -2048,17 +1957,19 @@ function reportDataInput(ctx) {
2048
1957
  return compactInput({
2049
1958
  ...projectInput(ctx),
2050
1959
  report_ids: jsonArray(ctx, "report-ids"),
2051
- request_id: optionalString2(ctx, "request-id"),
1960
+ request_id: optionalString(ctx, "request-id"),
2052
1961
  filters: optionalJson(ctx, "filters"),
2053
1962
  group_by: optionalJson(ctx, "group-by"),
2054
1963
  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")
1964
+ start_time: optionalString(ctx, "start-time"),
1965
+ end_time: optionalString(ctx, "end-time"),
1966
+ time_granularity: optionalString(ctx, "time-granularity"),
1967
+ cluster_query_scope: optionalString(ctx, "cluster-query-scope"),
1968
+ slave_cluster_id: optionalString(ctx, "slave-cluster-id"),
1969
+ zone_offset: optionalNumber(ctx, "zone-offset"),
1970
+ use_cache: optionalBoolean(ctx, "use-cache"),
1971
+ limit: optionalNumber(ctx, "limit"),
1972
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
2062
1973
  });
2063
1974
  }
2064
1975
  function reportDataExportInput(ctx) {
@@ -2081,16 +1992,19 @@ var reportDataRun = createAnalysisCapabilityCommand({
2081
1992
  requestIdFlag,
2082
1993
  { 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
1994
  { 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.' },
1995
+ { 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
1996
  { 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
1997
  { 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
1998
  { name: "time-granularity", type: "string", required: false, desc: "Non-SQL analysis-model time granularity override. SQL accepts only --sql-params." },
1999
+ clusterQueryScopeFlag,
2000
+ slaveClusterIdFlag,
2088
2001
  { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
2089
2002
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
2090
2003
  syncLimitFlag,
2091
2004
  syncTimeoutSecondsFlag
2092
2005
  ],
2093
2006
  risk: "read",
2007
+ validate: validateClusterQueryRouting,
2094
2008
  buildInput: reportDataInput,
2095
2009
  postProcess: applyAnalysisInlineLimit
2096
2010
  });
@@ -2107,16 +2021,19 @@ var reportDataExport = createAnalysisCapabilityCommand({
2107
2021
  requestIdFlag,
2108
2022
  { 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
2023
  { 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." },
2024
+ { 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
2025
  { name: "start-time", type: "string", required: false, desc: "Non-SQL analysis-model date override start, yyyy-MM-dd. SQL dates use --sql-params." },
2112
2026
  { name: "end-time", type: "string", required: false, desc: "Non-SQL analysis-model date override end, yyyy-MM-dd. SQL dates use --sql-params." },
2113
2027
  { name: "time-granularity", type: "string", required: false, desc: "Non-SQL analysis-model time granularity override. SQL accepts only --sql-params." },
2028
+ clusterQueryScopeFlag,
2029
+ slaveClusterIdFlag,
2114
2030
  { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
2115
2031
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
2116
2032
  artifactFormatFlag,
2117
2033
  asyncTimeoutSecondsFlag
2118
2034
  ],
2119
2035
  risk: "read",
2036
+ validate: validateClusterQueryRouting,
2120
2037
  buildInput: reportDataExportInput
2121
2038
  });
2122
2039
 
@@ -2156,7 +2073,7 @@ var reportChangeLogGet = createAnalysisCapabilityCommand({
2156
2073
  buildInput: (ctx) => compactInput({
2157
2074
  ...projectInput(ctx),
2158
2075
  report_id: ctx.num("report-id"),
2159
- version: optionalNumber2(ctx, "history-version")
2076
+ version: optionalNumber(ctx, "history-version")
2160
2077
  })
2161
2078
  });
2162
2079
 
@@ -2253,9 +2170,9 @@ var dashboardCreate = createAnalysisCapabilityCommand({
2253
2170
  buildInput: (ctx) => compactInput({
2254
2171
  ...projectInput(ctx),
2255
2172
  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"),
2173
+ space_id: optionalNumber(ctx, "space-id"),
2174
+ folder_id: optionalNumber(ctx, "folder-id"),
2175
+ initial_report_id: optionalNumber(ctx, "initial-report-id"),
2259
2176
  payload: optionalJson(ctx, "payload")
2260
2177
  })
2261
2178
  });
@@ -2275,7 +2192,7 @@ var dashboardGet = createAnalysisCapabilityCommand({
2275
2192
  buildInput: (ctx) => compactInput({
2276
2193
  ...projectInput(ctx),
2277
2194
  dashboard_id: ctx.num("dashboard-id"),
2278
- use_cache: optionalBoolean2(ctx, "use-cache")
2195
+ use_cache: optionalBoolean(ctx, "use-cache")
2279
2196
  })
2280
2197
  });
2281
2198
 
@@ -2304,16 +2221,16 @@ var dashboardUpdate = createAnalysisCapabilityCommand({
2304
2221
  buildInput: (ctx) => compactInput({
2305
2222
  ...projectInput(ctx),
2306
2223
  operation: ctx.str("operation"),
2307
- dashboard_id: optionalNumber2(ctx, "dashboard-id"),
2224
+ dashboard_id: optionalNumber(ctx, "dashboard-id"),
2308
2225
  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"),
2226
+ dashboard_name: optionalString(ctx, "dashboard-name"),
2227
+ zone_offset: optionalNumber(ctx, "zone-offset"),
2228
+ refresh_type: optionalNumber(ctx, "refresh-type"),
2229
+ dashboard_status: optionalString(ctx, "dashboard-status"),
2230
+ note_id: optionalNumber(ctx, "note-id"),
2231
+ note_title: optionalString(ctx, "note-title"),
2232
+ description: optionalString(ctx, "description"),
2233
+ ui_config: optionalString(ctx, "ui-config"),
2317
2234
  payload: optionalJson(ctx, "payload")
2318
2235
  })
2319
2236
  });
@@ -2406,8 +2323,8 @@ var dashboardCopy = createAnalysisCapabilityCommand({
2406
2323
  dashboard_id: ctx.num("dashboard-id"),
2407
2324
  dashboard_name: ctx.str("dashboard-name"),
2408
2325
  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")
2326
+ to_space_id: optionalNumber(ctx, "to-space-id"),
2327
+ to_folder_id: optionalNumber(ctx, "to-folder-id")
2411
2328
  })
2412
2329
  });
2413
2330
 
@@ -2426,7 +2343,7 @@ var dashboardFreeze = createAnalysisCapabilityCommand({
2426
2343
  buildInput: (ctx) => compactInput({
2427
2344
  ...projectInput(ctx),
2428
2345
  dashboard_ids: jsonArray(ctx, "dashboard-ids"),
2429
- freeze: optionalBoolean2(ctx, "freeze")
2346
+ freeze: optionalBoolean(ctx, "freeze")
2430
2347
  })
2431
2348
  });
2432
2349
 
@@ -2513,6 +2430,8 @@ var dashboardReportDataRun = createAnalysisCapabilityCommand({
2513
2430
  { 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
2431
  { name: "start-time", type: "string", required: false, desc: "Optional start date/time. SQL reports ignore it and produce data.warnings." },
2515
2432
  { name: "end-time", type: "string", required: false, desc: "Optional end date/time. SQL reports ignore it and produce data.warnings." },
2433
+ clusterQueryScopeFlag,
2434
+ slaveClusterIdFlag,
2516
2435
  { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
2517
2436
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
2518
2437
  { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
@@ -2520,6 +2439,7 @@ var dashboardReportDataRun = createAnalysisCapabilityCommand({
2520
2439
  syncLimitFlag
2521
2440
  ],
2522
2441
  risk: "read",
2442
+ validate: validateClusterQueryRouting,
2523
2443
  buildInput: dashboardReportDataInput,
2524
2444
  postProcess: applyAnalysisInlineLimit
2525
2445
  });
@@ -2537,6 +2457,8 @@ var dashboardReportDataExport = createAnalysisCapabilityCommand({
2537
2457
  { 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
2458
  { name: "start-time", type: "string", required: false, desc: "Optional start date/time. SQL reports ignore it and the artifact includes warnings." },
2539
2459
  { name: "end-time", type: "string", required: false, desc: "Optional end date/time. SQL reports ignore it and the artifact includes warnings." },
2460
+ clusterQueryScopeFlag,
2461
+ slaveClusterIdFlag,
2540
2462
  { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
2541
2463
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
2542
2464
  { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
@@ -2544,6 +2466,7 @@ var dashboardReportDataExport = createAnalysisCapabilityCommand({
2544
2466
  { name: "artifact-format", type: "string", required: false, desc: "Artifact format. Only jsonl is supported." }
2545
2467
  ],
2546
2468
  risk: "read",
2469
+ validate: validateClusterQueryRouting,
2547
2470
  buildInput: dashboardReportDataInput
2548
2471
  });
2549
2472
 
@@ -2567,7 +2490,7 @@ var queryCancel = createAnalysisCapabilityCommand({
2567
2490
  risk: "write",
2568
2491
  buildInput: (ctx) => compactInput({
2569
2492
  run_id: ctx.str("run-id"),
2570
- reason: optionalString2(ctx, "reason")
2493
+ reason: optionalString(ctx, "reason")
2571
2494
  })
2572
2495
  });
2573
2496
 
@@ -2598,14 +2521,15 @@ var useCacheFlag = {
2598
2521
  };
2599
2522
  function createResultClusterInput(ctx) {
2600
2523
  return compactInput({
2524
+ project_id: ctx.num("project-id"),
2601
2525
  query_context_id: ctx.str("query-context-id"),
2602
2526
  source: optionalJson(ctx, "source"),
2603
2527
  coordinate: ctx.json("coordinate"),
2604
2528
  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")
2529
+ display_name: optionalString(ctx, "display-name"),
2530
+ zone_offset: optionalNumber(ctx, "zone-offset"),
2531
+ request_id: optionalString(ctx, "request-id"),
2532
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
2609
2533
  });
2610
2534
  }
2611
2535
 
@@ -2616,6 +2540,7 @@ var queryCreateResultCluster = createAnalysisCapabilityCommand({
2616
2540
  capabilityId: "analysis.query.create_result_cluster",
2617
2541
  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
2542
  flags: [
2543
+ projectIdFlag,
2619
2544
  { name: "query-context-id", type: "string", required: true, desc: "query_context_id returned by a synchronous analysis preview. Never use an export response." },
2620
2545
  sourceFlag,
2621
2546
  coordinateFlag,
@@ -2794,12 +2719,14 @@ function adhocRunInput(ctx) {
2794
2719
  project_id: ctx.num("project-id"),
2795
2720
  model_type: ctx.str("model-type"),
2796
2721
  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"),
2722
+ request_id: optionalString(ctx, "request-id"),
2723
+ use_cache: optionalBoolean(ctx, "use-cache"),
2724
+ zone_offset: optionalNumber(ctx, "zone-offset"),
2800
2725
  fields: optionalJsonArray(ctx, "fields"),
2801
- limit: optionalNumber2(ctx, "limit"),
2802
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
2726
+ cluster_query_scope: optionalString(ctx, "cluster-query-scope"),
2727
+ slave_cluster_id: optionalString(ctx, "slave-cluster-id"),
2728
+ limit: optionalNumber(ctx, "limit"),
2729
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
2803
2730
  });
2804
2731
  }
2805
2732
  function adhocExportInput(ctx) {
@@ -2807,12 +2734,14 @@ function adhocExportInput(ctx) {
2807
2734
  project_id: ctx.num("project-id"),
2808
2735
  model_type: ctx.str("model-type"),
2809
2736
  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"),
2737
+ request_id: optionalString(ctx, "request-id"),
2738
+ use_cache: optionalBoolean(ctx, "use-cache"),
2739
+ zone_offset: optionalNumber(ctx, "zone-offset"),
2813
2740
  fields: optionalJsonArray(ctx, "fields"),
2814
- format: optionalString2(ctx, "artifact-format"),
2815
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
2741
+ cluster_query_scope: optionalString(ctx, "cluster-query-scope"),
2742
+ slave_cluster_id: optionalString(ctx, "slave-cluster-id"),
2743
+ format: optionalString(ctx, "artifact-format"),
2744
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
2816
2745
  });
2817
2746
  }
2818
2747
  var adhocBaseFlags = [
@@ -2822,7 +2751,9 @@ var adhocBaseFlags = [
2822
2751
  requestIdFlag,
2823
2752
  useCacheFlag2,
2824
2753
  zoneOffsetFlag2,
2825
- fieldsFlag
2754
+ fieldsFlag,
2755
+ clusterQueryScopeFlag,
2756
+ slaveClusterIdFlag
2826
2757
  ];
2827
2758
  var adhocExportFlags = [
2828
2759
  ...adhocBaseFlags,
@@ -2842,6 +2773,7 @@ var adhocRun = createAnalysisCapabilityCommand({
2842
2773
  syncTimeoutSecondsFlag
2843
2774
  ],
2844
2775
  risk: "read",
2776
+ validate: validateClusterQueryRouting,
2845
2777
  buildInput: adhocRunInput,
2846
2778
  postProcess: applyAnalysisInlineLimit
2847
2779
  });
@@ -2856,6 +2788,7 @@ var adhocExport = createAnalysisCapabilityCommand({
2856
2788
  ...adhocExportFlags
2857
2789
  ],
2858
2790
  risk: "read",
2791
+ validate: validateClusterQueryRouting,
2859
2792
  buildInput: adhocExportInput
2860
2793
  });
2861
2794
 
@@ -2884,11 +2817,11 @@ var dashboardDefinitionExport = createAnalysisCapabilityCommand({
2884
2817
  risk: "read",
2885
2818
  buildInput: (ctx) => compactInput({
2886
2819
  ...projectInput(ctx),
2887
- dashboard_id: optionalNumber2(ctx, "dashboard-id"),
2820
+ dashboard_id: optionalNumber(ctx, "dashboard-id"),
2888
2821
  dashboard_ids: optionalJsonArray(ctx, "dashboard-ids"),
2889
2822
  dashboard_folder_ids: optionalJsonArray(ctx, "dashboard-folder-ids"),
2890
2823
  shared_spaces: optionalJson(ctx, "shared-spaces"),
2891
- export_file_name: optionalString2(ctx, "export-file-name"),
2824
+ export_file_name: optionalString(ctx, "export-file-name"),
2892
2825
  payload: optionalJson(ctx, "payload")
2893
2826
  })
2894
2827
  });
@@ -2911,9 +2844,9 @@ var dashboardDefinitionImport = createAnalysisCapabilityCommand({
2911
2844
  buildInput: (ctx) => compactInput({
2912
2845
  ...projectInput(ctx),
2913
2846
  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"),
2847
+ validate_only: optionalBoolean(ctx, "validate-only"),
2848
+ dashboard_name_conflict_policy: optionalString(ctx, "dashboard-name-conflict-policy"),
2849
+ space_dashboard_policy: optionalString(ctx, "space-dashboard-policy"),
2917
2850
  payload: optionalJson(ctx, "payload")
2918
2851
  })
2919
2852
  });
@@ -2925,80 +2858,135 @@ var commands24 = [
2925
2858
  ];
2926
2859
  var dashboard_definition_default = commands24;
2927
2860
 
2861
+ // src/commands/te-analysis/dashboard-daily-report/get.ts
2862
+ var dashboardDailyReportGet = createAnalysisCapabilityCommand({
2863
+ resource: "dashboard-daily-report",
2864
+ command: "get",
2865
+ capabilityId: "analysis.dashboard_daily_report.get",
2866
+ description: "Get one dashboard daily report configuration with sensitive values redacted.",
2867
+ flags: [
2868
+ projectIdFlag,
2869
+ { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }
2870
+ ],
2871
+ risk: "read",
2872
+ buildInput: (ctx) => compactInput({
2873
+ ...projectInput(ctx),
2874
+ dashboard_id: ctx.num("dashboard-id")
2875
+ })
2876
+ });
2877
+
2928
2878
  // src/commands/te-analysis/dashboard-daily-report/shared.ts
2929
- function dailyReportFlags(update) {
2930
- const falseDefault = update ? " Default: false." : "";
2931
- const emptyDefault = update ? " Default: empty." : "";
2932
- const weekdayDefault = update ? " Default: 1,2,3,4,5,6,7." : "";
2933
- const timeDefault = update ? " Default: 09:00." : "";
2934
- const langDefault = update ? " Default: zh-CN." : "";
2935
- const screenDefault = update ? " Default: normal." : "";
2936
- const zoneDefault = update ? " Default: 0." : "";
2879
+ var commonFlags = [
2880
+ { name: "need-csv", type: "boolean", required: false, desc: "Whether to include CSV attachment." },
2881
+ { name: "host-url", type: "string", required: false, desc: "Public host URL used in report links." },
2882
+ { name: "send-title", type: "string", required: false, desc: "Daily report title." },
2883
+ { name: "send-content", type: "string", required: false, desc: "Daily report content." },
2884
+ { name: "lang", type: "string", required: false, desc: "Report language." },
2885
+ { name: "screen-type", type: "string", required: false, desc: "Screenshot screen type." },
2886
+ { name: "zone-offset", type: "number", required: false, desc: "Time zone offset." }
2887
+ ];
2888
+ var destinationFlags = [
2889
+ { name: "email-login-users", type: "string", required: false, desc: "Comma-separated login users for email." },
2890
+ {
2891
+ name: "email-new",
2892
+ type: "string",
2893
+ required: false,
2894
+ sensitive: true,
2895
+ desc: "Comma-separated direct email addresses. The server selects company SMTP or the default mail service."
2896
+ },
2897
+ {
2898
+ name: "dd-url",
2899
+ type: "json",
2900
+ required: false,
2901
+ sensitive: true,
2902
+ desc: 'DingTalk webhook URL array, e.g. ["https://..."].'
2903
+ },
2904
+ {
2905
+ name: "wx-url",
2906
+ type: "json",
2907
+ required: false,
2908
+ sensitive: true,
2909
+ desc: 'WeCom webhook URL array, e.g. ["https://..."].'
2910
+ },
2911
+ {
2912
+ name: "feishu-info",
2913
+ type: "json",
2914
+ required: false,
2915
+ sensitive: true,
2916
+ desc: 'Feishu image upload and bot config, e.g. {"app_id":"cli_xxx","app_secret":"secret_xxx","webhook":["https://..."]}.'
2917
+ },
2918
+ {
2919
+ name: "kim-url",
2920
+ type: "json",
2921
+ required: false,
2922
+ sensitive: true,
2923
+ desc: 'KIM/custom webhook URL array, e.g. ["https://..."].'
2924
+ },
2925
+ {
2926
+ name: "slack-url",
2927
+ type: "json",
2928
+ required: false,
2929
+ sensitive: true,
2930
+ desc: 'Slack webhook URL array, e.g. ["https://..."].'
2931
+ }
2932
+ ];
2933
+ function dailyReportUpdateFlags() {
2937
2934
  return [
2938
- { name: "need-csv", type: "boolean", required: false, desc: `Whether to include CSV attachment.${falseDefault}` },
2939
- { name: "host-url", type: "string", required: false, desc: `Public host URL used in report links.${emptyDefault}` },
2940
- { name: "enable-smtp", type: "boolean", required: false, desc: `Whether to use configured SMTP for email.${falseDefault}` },
2941
- { name: "enable-email", type: "boolean", required: false, desc: `Whether to send by email.${falseDefault}` },
2942
- { name: "enable-dd", type: "boolean", required: false, desc: `Whether to send by DingTalk webhook.${falseDefault}` },
2943
- { name: "dd-url", type: "json", required: false, desc: 'DingTalk webhook URL array, e.g. ["https://..."].' },
2944
- { name: "enable-wx", type: "boolean", required: false, desc: `Whether to send by WeCom webhook.${falseDefault}` },
2945
- { name: "wx-url", type: "json", required: false, desc: 'WeCom webhook URL array, e.g. ["https://..."].' },
2946
- { name: "enable-feishu", type: "boolean", required: false, desc: `Whether to send by Feishu webhook.${falseDefault}` },
2947
- {
2948
- name: "feishu-info",
2949
- type: "json",
2950
- required: false,
2951
- desc: 'Required with --enable-feishu true. Feishu image upload and bot config, e.g. {"app_id":"cli_xxx","app_secret":"secret_xxx","webhook":["https://..."]}. app_secret is sensitive.'
2952
- },
2953
- { name: "enable-kim", type: "boolean", required: false, desc: `Whether to send by KIM/custom webhook.${falseDefault}` },
2954
- { name: "kim-url", type: "json", required: false, desc: 'KIM/custom webhook URL array, e.g. ["https://..."].' },
2955
- { name: "enable-slack", type: "boolean", required: false, desc: `Whether to send by Slack webhook.${falseDefault}` },
2956
- { name: "slack-url", type: "json", required: false, desc: 'Slack webhook URL array, e.g. ["https://..."].' },
2957
- { name: "email-login-users", type: "string", required: false, desc: "Comma-separated login users for email channel." },
2958
- { name: "email-new", type: "string", required: false, desc: "Comma-separated external emails when SMTP is enabled." },
2959
- { name: "send-title", type: "string", required: false, desc: "Daily report title." },
2960
- { name: "send-content", type: "string", required: false, desc: "Daily report content." },
2961
- { name: "send-date", type: "string", required: false, desc: `Scheduled weekdays, comma-separated 1..7.${weekdayDefault}` },
2962
- { name: "send-time", type: "string", required: false, desc: `Scheduled send time, HH:mm.${timeDefault}` },
2963
- { name: "lang", type: "string", required: false, desc: `Report language.${langDefault}` },
2964
- { name: "screen-type", type: "string", required: false, desc: `Screenshot screen type.${screenDefault}` },
2965
- { name: "zone-offset", type: "number", required: false, desc: `Time zone offset.${zoneDefault}` },
2966
- ...update ? [
2967
- { name: "enable-send", type: "boolean", required: false, desc: "Whether to enable scheduled sending. Default: false." }
2968
- ] : []
2935
+ ...commonFlags,
2936
+ { name: "enable-email", type: "boolean", required: false, desc: "Whether scheduled email delivery is enabled." },
2937
+ { name: "enable-dd", type: "boolean", required: false, desc: "Whether scheduled DingTalk delivery is enabled." },
2938
+ { name: "enable-wx", type: "boolean", required: false, desc: "Whether scheduled WeCom delivery is enabled." },
2939
+ { name: "enable-feishu", type: "boolean", required: false, desc: "Whether scheduled Feishu delivery is enabled." },
2940
+ { name: "enable-kim", type: "boolean", required: false, desc: "Whether scheduled KIM delivery is enabled." },
2941
+ { name: "enable-slack", type: "boolean", required: false, desc: "Whether scheduled Slack delivery is enabled." },
2942
+ ...destinationFlags,
2943
+ { name: "send-date", type: "string", required: false, desc: "Scheduled weekdays, comma-separated 1..7." },
2944
+ { name: "send-time", type: "string", required: false, desc: "Scheduled send time, HH:mm." },
2945
+ { name: "enable-send", type: "boolean", required: false, desc: "Whether scheduled sending is enabled." }
2969
2946
  ];
2970
2947
  }
2971
- function dailyReportInput(ctx, update) {
2972
- const payload = optionalJson(ctx, "payload");
2973
- const useDefaults = update && payload === void 0;
2974
- return compactInput({
2948
+ function dailyReportSendFlags() {
2949
+ return [...commonFlags, ...destinationFlags];
2950
+ }
2951
+ function commonInput(ctx) {
2952
+ return {
2975
2953
  ...projectInput(ctx),
2976
2954
  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"),
2955
+ need_csv: optionalBoolean(ctx, "need-csv"),
2956
+ host_url: optionalString(ctx, "host-url"),
2957
+ email_login_users: optionalString(ctx, "email-login-users"),
2958
+ email_new: optionalString(ctx, "email-new"),
2982
2959
  dd_url: optionalJson(ctx, "dd-url"),
2983
- enable_wx: useDefaults ? booleanWithDefault(ctx, "enable-wx", false) : optionalBoolean2(ctx, "enable-wx"),
2984
2960
  wx_url: optionalJson(ctx, "wx-url"),
2985
- enable_feishu: useDefaults ? booleanWithDefault(ctx, "enable-feishu", false) : optionalBoolean2(ctx, "enable-feishu"),
2986
2961
  feishu_info: optionalJson(ctx, "feishu-info"),
2987
- enable_kim: useDefaults ? booleanWithDefault(ctx, "enable-kim", false) : optionalBoolean2(ctx, "enable-kim"),
2988
2962
  kim_url: optionalJson(ctx, "kim-url"),
2989
- enable_slack: useDefaults ? booleanWithDefault(ctx, "enable-slack", false) : optionalBoolean2(ctx, "enable-slack"),
2990
2963
  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,
3001
- payload
2964
+ send_title: optionalString(ctx, "send-title"),
2965
+ send_content: optionalString(ctx, "send-content"),
2966
+ lang: optionalString(ctx, "lang"),
2967
+ screen_type: optionalString(ctx, "screen-type"),
2968
+ zone_offset: optionalNumber(ctx, "zone-offset")
2969
+ };
2970
+ }
2971
+ function dailyReportUpdateInput(ctx) {
2972
+ return compactInput({
2973
+ ...commonInput(ctx),
2974
+ enable_email: optionalBoolean(ctx, "enable-email"),
2975
+ enable_dd: optionalBoolean(ctx, "enable-dd"),
2976
+ enable_wx: optionalBoolean(ctx, "enable-wx"),
2977
+ enable_feishu: optionalBoolean(ctx, "enable-feishu"),
2978
+ enable_kim: optionalBoolean(ctx, "enable-kim"),
2979
+ enable_slack: optionalBoolean(ctx, "enable-slack"),
2980
+ send_date: optionalString(ctx, "send-date"),
2981
+ send_time: optionalString(ctx, "send-time"),
2982
+ enable_send: optionalBoolean(ctx, "enable-send"),
2983
+ payload: optionalJson(ctx, "payload")
2984
+ });
2985
+ }
2986
+ function dailyReportSendInput(ctx) {
2987
+ return compactInput({
2988
+ ...commonInput(ctx),
2989
+ payload: optionalJson(ctx, "payload")
3002
2990
  });
3003
2991
  }
3004
2992
 
@@ -3007,15 +2995,15 @@ var dashboardDailyReportUpdate = createAnalysisCapabilityCommand({
3007
2995
  resource: "dashboard-daily-report",
3008
2996
  command: "update",
3009
2997
  capabilityId: "analysis.dashboard_daily_report.update",
3010
- description: "Update dashboard daily report configuration.",
2998
+ description: "Create or update dashboard daily report configuration. Omitted fields remain unchanged.",
3011
2999
  flags: [
3012
3000
  projectIdFlag,
3013
3001
  { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
3014
- ...dailyReportFlags(true),
3015
- payloadFlag
3002
+ ...dailyReportUpdateFlags(),
3003
+ { ...payloadFlag, sensitive: true }
3016
3004
  ],
3017
3005
  risk: "write",
3018
- buildInput: (ctx) => dailyReportInput(ctx, true)
3006
+ buildInput: dailyReportUpdateInput
3019
3007
  });
3020
3008
 
3021
3009
  // src/commands/te-analysis/dashboard-daily-report/send.ts
@@ -3023,21 +3011,40 @@ var dashboardDailyReportSend = createAnalysisCapabilityCommand({
3023
3011
  resource: "dashboard-daily-report",
3024
3012
  command: "send",
3025
3013
  capabilityId: "analysis.dashboard_daily_report.send",
3026
- description: "Send dashboard daily report immediately. Omit config to use saved config; pass channel flags for an ad hoc send.",
3014
+ description: "Send dashboard daily report immediately. Destination fields infer channels; omit them to reuse saved destinations.",
3027
3015
  flags: [
3028
3016
  projectIdFlag,
3029
3017
  { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
3030
- ...dailyReportFlags(false),
3031
- payloadFlag
3018
+ ...dailyReportSendFlags(),
3019
+ { ...payloadFlag, sensitive: true }
3032
3020
  ],
3033
3021
  risk: "write",
3034
- buildInput: (ctx) => dailyReportInput(ctx, false)
3022
+ buildInput: dailyReportSendInput
3023
+ });
3024
+
3025
+ // src/commands/te-analysis/dashboard-daily-report/send-status.ts
3026
+ var dashboardDailyReportSendStatus = createAnalysisCapabilityCommand({
3027
+ resource: "dashboard-daily-report",
3028
+ command: "send-status",
3029
+ capabilityId: "analysis.dashboard_daily_report.send_status",
3030
+ description: "Get the progress and per-channel result of one dashboard daily report send task.",
3031
+ flags: [
3032
+ projectIdFlag,
3033
+ { name: "task-id", type: "number", required: true, desc: "Task ID returned by dashboard-daily-report send." }
3034
+ ],
3035
+ risk: "read",
3036
+ buildInput: (ctx) => compactInput({
3037
+ ...projectInput(ctx),
3038
+ task_id: ctx.num("task-id")
3039
+ })
3035
3040
  });
3036
3041
 
3037
3042
  // src/commands/te-analysis/dashboard-daily-report/index.ts
3038
3043
  var commands25 = [
3044
+ dashboardDailyReportGet,
3039
3045
  dashboardDailyReportUpdate,
3040
- dashboardDailyReportSend
3046
+ dashboardDailyReportSend,
3047
+ dashboardDailyReportSendStatus
3041
3048
  ];
3042
3049
  var dashboard_daily_report_default = commands25;
3043
3050
 
@@ -3076,23 +3083,19 @@ var biPanelCreate = createAnalysisCapabilityCommand({
3076
3083
  resource: "bi-panel",
3077
3084
  command: "create",
3078
3085
  capabilityId: "analysis.bi_panel.create",
3079
- description: "Create a BI dashboard with worksheets, charts, and pages.",
3086
+ description: "Create an empty BI dashboard shell without draft or release content.",
3080
3087
  flags: [
3081
3088
  projectIdFlag,
3082
- { name: "panel-name", type: "string", required: false, desc: "BI dashboard name." },
3083
- { name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID." },
3089
+ { name: "panel-name", type: "string", required: true, desc: "Name for the new empty BI dashboard shell." },
3084
3090
  { name: "space-id", type: "number", required: false, desc: "Target project space ID." },
3085
- { name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
3086
- payloadFlag
3091
+ { name: "folder-id", type: "number", required: false, desc: "Target folder ID." }
3087
3092
  ],
3088
3093
  risk: "write",
3089
3094
  buildInput: (ctx) => compactInput({
3090
3095
  ...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"),
3095
- payload: optionalJson(ctx, "payload")
3096
+ panel_name: ctx.str("panel-name"),
3097
+ space_id: optionalNumber(ctx, "space-id"),
3098
+ folder_id: optionalNumber(ctx, "folder-id")
3096
3099
  })
3097
3100
  });
3098
3101
 
@@ -3101,19 +3104,17 @@ var biPanelUpdate = createAnalysisCapabilityCommand({
3101
3104
  resource: "bi-panel",
3102
3105
  command: "update",
3103
3106
  capabilityId: "analysis.bi_panel.update",
3104
- description: "Update BI panel content or metadata.",
3107
+ description: "Rename a BI dashboard without changing draft or release content.",
3105
3108
  flags: [
3106
3109
  projectIdFlag,
3107
- { name: "panel-name", type: "string", required: false, desc: "BI panel name." },
3108
- { name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID." },
3109
- payloadFlag
3110
+ { name: "panel-name", type: "string", required: true, desc: "New BI dashboard name." },
3111
+ { name: "panel-uuid", type: "string", required: true, desc: "BI dashboard UUID." }
3110
3112
  ],
3111
3113
  risk: "write",
3112
3114
  buildInput: (ctx) => compactInput({
3113
3115
  ...projectInput(ctx),
3114
- panel_name: optionalString2(ctx, "panel-name"),
3115
- panel_uuid: optionalString2(ctx, "panel-uuid"),
3116
- payload: optionalJson(ctx, "payload")
3116
+ panel_name: ctx.str("panel-name"),
3117
+ panel_uuid: ctx.str("panel-uuid")
3117
3118
  })
3118
3119
  });
3119
3120
 
@@ -3163,10 +3164,10 @@ var biPanelCopy = createAnalysisCapabilityCommand({
3163
3164
  risk: "write",
3164
3165
  buildInput: (ctx) => compactInput({
3165
3166
  ...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"),
3167
+ panel_name: optionalString(ctx, "panel-name"),
3168
+ panel_uuid: optionalString(ctx, "panel-uuid"),
3169
+ space_id: optionalNumber(ctx, "space-id"),
3170
+ folder_id: optionalNumber(ctx, "folder-id"),
3170
3171
  payload: optionalJson(ctx, "payload")
3171
3172
  })
3172
3173
  });
@@ -3200,8 +3201,8 @@ var biPanelVersionGet = createAnalysisCapabilityCommand({
3200
3201
  buildInput: (ctx) => compactInput({
3201
3202
  ...projectInput(ctx),
3202
3203
  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"),
3204
+ panel_uuid: optionalString(ctx, "panel-uuid"),
3205
+ version_type: optionalString(ctx, "version-type"),
3205
3206
  fields: optionalJson(ctx, "fields")
3206
3207
  })
3207
3208
  });
@@ -3222,7 +3223,7 @@ var biPanelVersionPublish = createAnalysisCapabilityCommand({
3222
3223
  buildInput: (ctx) => compactInput({
3223
3224
  ...projectInput(ctx),
3224
3225
  panel_id: ctx.str("panel-id") === "" ? void 0 : ctx.num("panel-id"),
3225
- panel_uuid: optionalString2(ctx, "panel-uuid"),
3226
+ panel_uuid: optionalString(ctx, "panel-uuid"),
3226
3227
  source_version: ctx.str("source-version")
3227
3228
  })
3228
3229
  });
@@ -3350,10 +3351,10 @@ var favoriteAdd = createAnalysisCapabilityCommand({
3350
3351
  risk: "write",
3351
3352
  buildInput: (ctx) => compactInput({
3352
3353
  ...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"),
3354
+ asset_id: optionalNumber(ctx, "asset-id"),
3355
+ asset_type: optionalString(ctx, "asset-type"),
3356
+ space_id: optionalNumber(ctx, "space-id"),
3357
+ id: optionalNumber(ctx, "id"),
3357
3358
  payload: optionalJson(ctx, "payload")
3358
3359
  })
3359
3360
  });
@@ -3375,10 +3376,10 @@ var favoriteRemove = createAnalysisCapabilityCommand({
3375
3376
  risk: "write",
3376
3377
  buildInput: (ctx) => compactInput({
3377
3378
  ...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"),
3379
+ asset_id: optionalNumber(ctx, "asset-id"),
3380
+ asset_type: optionalString(ctx, "asset-type"),
3381
+ space_id: optionalNumber(ctx, "space-id"),
3382
+ id: optionalNumber(ctx, "id"),
3382
3383
  payload: optionalJson(ctx, "payload")
3383
3384
  })
3384
3385
  });
@@ -3410,11 +3411,11 @@ var publicLinkCreate = createAnalysisCapabilityCommand({
3410
3411
  risk: "write",
3411
3412
  buildInput: (ctx) => compactInput({
3412
3413
  ...projectInput(ctx),
3413
- company_id: optionalNumber2(ctx, "company-id"),
3414
+ company_id: optionalNumber(ctx, "company-id"),
3414
3415
  resource_type: ctx.str("resource-type"),
3415
3416
  resource_id: ctx.num("resource-id"),
3416
3417
  access_controls: optionalJson(ctx, "access-controls"),
3417
- remark: optionalString2(ctx, "remark"),
3418
+ remark: optionalString(ctx, "remark"),
3418
3419
  effective_at: ctx.str("effective-at"),
3419
3420
  expires_at: ctx.str("expires-at"),
3420
3421
  payload: optionalJson(ctx, "payload")
@@ -3451,10 +3452,10 @@ var publicLinkUpdate = createAnalysisCapabilityCommand({
3451
3452
  risk: "write",
3452
3453
  buildInput: (ctx) => compactInput({
3453
3454
  ...projectInput(ctx),
3454
- company_id: optionalNumber2(ctx, "company-id"),
3455
+ company_id: optionalNumber(ctx, "company-id"),
3455
3456
  link_id: ctx.num("link-id"),
3456
3457
  access_controls: optionalJson(ctx, "access-controls"),
3457
- remark: optionalString2(ctx, "remark"),
3458
+ remark: optionalString(ctx, "remark"),
3458
3459
  effective_at: ctx.str("effective-at"),
3459
3460
  expires_at: ctx.str("expires-at"),
3460
3461
  payload: optionalJson(ctx, "payload")
@@ -3476,8 +3477,8 @@ var publicLinkOffline = createAnalysisCapabilityCommand({
3476
3477
  risk: "write",
3477
3478
  buildInput: (ctx) => compactInput({
3478
3479
  ...projectInput(ctx),
3479
- company_id: optionalNumber2(ctx, "company-id"),
3480
- link_id: optionalNumber2(ctx, "link-id"),
3480
+ company_id: optionalNumber(ctx, "company-id"),
3481
+ link_id: optionalNumber(ctx, "link-id"),
3481
3482
  link_ids: optionalJsonArray(ctx, "link-ids")
3482
3483
  })
3483
3484
  });
@@ -3497,8 +3498,8 @@ var publicLinkDelete = createAnalysisCapabilityCommand({
3497
3498
  risk: "high-risk-write",
3498
3499
  buildInput: (ctx) => compactInput({
3499
3500
  ...projectInput(ctx),
3500
- company_id: optionalNumber2(ctx, "company-id"),
3501
- link_id: optionalNumber2(ctx, "link-id"),
3501
+ company_id: optionalNumber(ctx, "company-id"),
3502
+ link_id: optionalNumber(ctx, "link-id"),
3502
3503
  link_ids: optionalJsonArray(ctx, "link-ids")
3503
3504
  })
3504
3505
  });
@@ -3513,57 +3514,40 @@ var commands31 = [
3513
3514
  ];
3514
3515
  var public_link_default = commands31;
3515
3516
 
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.",
3517
+ // src/commands/te-analysis/filter-value/list.ts
3518
+ var filterValueList = createAnalysisCapabilityCommand({
3519
+ resource: "filter-value",
3520
+ command: "list",
3521
+ capabilityId: "analysis.filter_value.list",
3522
+ description: "List stored candidate values for one known event property, user property, user tag, or user cluster before building an exact analysis filter.",
3535
3523
  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" }
3524
+ projectIdFlag,
3525
+ { name: "property-name", type: "string", required: true, desc: "Exact property identifier. Resolve the property first; this command discovers values, not fields." },
3526
+ { name: "table-type", type: "string", required: true, desc: "Property table: event or user." },
3527
+ { name: "event-name", type: "string", required: false, desc: "Optional exact event name for an event-property lookup." },
3528
+ { name: "search-prefix", type: "string", required: false, desc: "Optional prefix or fuzzy input to narrow candidate values." },
3529
+ { name: "zone-offset", type: "number", required: false, desc: "Optional fixed timezone offset from -12 through 14." },
3530
+ { 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." },
3531
+ { 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." },
3532
+ { name: "report-mode", type: "boolean", required: false, desc: "Use report-compatible property semantics. Default: false." }
3545
3533
  ],
3546
3534
  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")
3535
+ buildInput: (ctx) => compactInput({
3536
+ project_id: ctx.num("project-id"),
3537
+ property_name: ctx.str("property-name"),
3538
+ table_type: ctx.str("table-type"),
3539
+ event_name: optionalString(ctx, "event-name"),
3540
+ search_prefix: optionalString(ctx, "search-prefix"),
3541
+ zone_offset: optionalNumber(ctx, "zone-offset"),
3542
+ cluster_date_policy: optionalString(ctx, "cluster-date-policy"),
3543
+ specified_cluster_date: optionalString(ctx, "specified-cluster-date"),
3544
+ report_mode: optionalBoolean(ctx, "report-mode")
3558
3545
  })
3559
3546
  });
3560
3547
 
3561
- // src/commands/te-analysis/model/index.ts
3562
- var commands32 = [
3563
- cancelQuery,
3564
- loadFilters
3565
- ];
3566
- var model_default = commands32;
3548
+ // src/commands/te-analysis/filter-value/index.ts
3549
+ var commands32 = [filterValueList];
3550
+ var filter_value_default = commands32;
3567
3551
 
3568
3552
  // src/commands/te-analysis/event-detail/shared.ts
3569
3553
  var eventDetailDefinitionFlag = {
@@ -3576,22 +3560,22 @@ function eventDetailRunInput(ctx) {
3576
3560
  return compactInput({
3577
3561
  project_id: ctx.num("project-id"),
3578
3562
  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")
3563
+ request_id: optionalString(ctx, "request-id"),
3564
+ use_cache: optionalBoolean(ctx, "use-cache"),
3565
+ zone_offset: optionalNumber(ctx, "zone-offset"),
3566
+ limit: optionalNumber(ctx, "limit"),
3567
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3584
3568
  });
3585
3569
  }
3586
3570
  function eventDetailExportInput(ctx) {
3587
3571
  return compactInput({
3588
3572
  project_id: ctx.num("project-id"),
3589
3573
  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")
3574
+ request_id: optionalString(ctx, "request-id"),
3575
+ use_cache: optionalBoolean(ctx, "use-cache"),
3576
+ zone_offset: optionalNumber(ctx, "zone-offset"),
3577
+ format: optionalString(ctx, "artifact-format"),
3578
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3595
3579
  });
3596
3580
  }
3597
3581
  var eventDetailBaseFlags = [
@@ -3654,22 +3638,22 @@ function entityDetailRunInput(ctx) {
3654
3638
  return compactInput({
3655
3639
  project_id: ctx.num("project-id"),
3656
3640
  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")
3641
+ request_id: optionalString(ctx, "request-id"),
3642
+ use_cache: optionalBoolean(ctx, "use-cache"),
3643
+ zone_offset: optionalNumber(ctx, "zone-offset"),
3644
+ limit: optionalNumber(ctx, "limit"),
3645
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3662
3646
  });
3663
3647
  }
3664
3648
  function entityDetailExportInput(ctx) {
3665
3649
  return compactInput({
3666
3650
  project_id: ctx.num("project-id"),
3667
3651
  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")
3652
+ request_id: optionalString(ctx, "request-id"),
3653
+ use_cache: optionalBoolean(ctx, "use-cache"),
3654
+ zone_offset: optionalNumber(ctx, "zone-offset"),
3655
+ format: optionalString(ctx, "artifact-format"),
3656
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3673
3657
  });
3674
3658
  }
3675
3659
  var entityDetailBaseFlags = [
@@ -3729,6 +3713,7 @@ var queryContextIdFlag = {
3729
3713
  desc: "query_context_id returned by a synchronous event-analysis preview. Analysis exports never create one."
3730
3714
  };
3731
3715
  var drilldownEventsRunFlags = [
3716
+ projectIdFlag,
3732
3717
  queryContextIdFlag,
3733
3718
  sourceFlag,
3734
3719
  coordinateFlag,
@@ -3745,6 +3730,7 @@ var csvArtifactFormatFlag = {
3745
3730
  desc: "Artifact format. Only csv is supported; the downloaded artifact is csv.gz."
3746
3731
  };
3747
3732
  var drilldownEventsExportFlags = [
3733
+ projectIdFlag,
3748
3734
  queryContextIdFlag,
3749
3735
  sourceFlag,
3750
3736
  coordinateFlag,
@@ -3756,26 +3742,28 @@ var drilldownEventsExportFlags = [
3756
3742
  ];
3757
3743
  function drilldownEventsRunInput(ctx) {
3758
3744
  return compactInput({
3745
+ project_id: ctx.num("project-id"),
3759
3746
  query_context_id: ctx.str("query-context-id"),
3760
3747
  source: optionalJson(ctx, "source"),
3761
3748
  coordinate: ctx.json("coordinate"),
3762
3749
  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")
3750
+ request_id: optionalString(ctx, "request-id"),
3751
+ use_cache: optionalBoolean(ctx, "use-cache"),
3752
+ limit: optionalNumber(ctx, "limit"),
3753
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3767
3754
  });
3768
3755
  }
3769
3756
  function drilldownEventsExportInput(ctx) {
3770
3757
  return compactInput({
3758
+ project_id: ctx.num("project-id"),
3771
3759
  query_context_id: ctx.str("query-context-id"),
3772
3760
  source: optionalJson(ctx, "source"),
3773
3761
  coordinate: ctx.json("coordinate"),
3774
3762
  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")
3763
+ request_id: optionalString(ctx, "request-id"),
3764
+ use_cache: optionalBoolean(ctx, "use-cache"),
3765
+ format: optionalString(ctx, "artifact-format"),
3766
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3779
3767
  });
3780
3768
  }
3781
3769
 
@@ -3820,6 +3808,7 @@ var csvArtifactFormatFlag2 = {
3820
3808
  desc: "Artifact format. Only csv is supported; the downloaded artifact is csv.gz."
3821
3809
  };
3822
3810
  var drilldownEntitiesBaseFlags = [
3811
+ projectIdFlag,
3823
3812
  queryContextIdFlag2,
3824
3813
  sourceFlag,
3825
3814
  coordinateFlag,
@@ -3840,25 +3829,26 @@ var drilldownEntitiesExportFlags = [
3840
3829
  function drilldownEntitiesRunInput(ctx) {
3841
3830
  return compactInput({
3842
3831
  ...baseInput(ctx),
3843
- limit: optionalNumber2(ctx, "limit"),
3844
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3832
+ limit: optionalNumber(ctx, "limit"),
3833
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3845
3834
  });
3846
3835
  }
3847
3836
  function drilldownEntitiesExportInput(ctx) {
3848
3837
  return compactInput({
3849
3838
  ...baseInput(ctx),
3850
- format: optionalString2(ctx, "artifact-format"),
3851
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3839
+ format: optionalString(ctx, "artifact-format"),
3840
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3852
3841
  });
3853
3842
  }
3854
3843
  function baseInput(ctx) {
3855
3844
  return {
3845
+ project_id: ctx.num("project-id"),
3856
3846
  query_context_id: ctx.str("query-context-id"),
3857
3847
  source: optionalJson(ctx, "source"),
3858
3848
  coordinate: ctx.json("coordinate"),
3859
3849
  properties: optionalJson(ctx, "properties"),
3860
- request_id: optionalString2(ctx, "request-id"),
3861
- use_cache: optionalBoolean2(ctx, "use-cache")
3850
+ request_id: optionalString(ctx, "request-id"),
3851
+ use_cache: optionalBoolean(ctx, "use-cache")
3862
3852
  };
3863
3853
  }
3864
3854
 
@@ -3917,6 +3907,7 @@ var csvArtifactFormatFlag3 = {
3917
3907
  desc: "Artifact format. Only csv is supported; the downloaded artifact is csv.gz."
3918
3908
  };
3919
3909
  var drilldownUserEventsBaseFlags = [
3910
+ projectIdFlag,
3920
3911
  drilldownContextIdFlag,
3921
3912
  userIdFlag,
3922
3913
  ...sequenceFlags,
@@ -3936,29 +3927,30 @@ var drilldownUserEventsExportFlags = [
3936
3927
  function drilldownUserEventsRunInput(ctx) {
3937
3928
  return compactInput({
3938
3929
  ...baseInput2(ctx),
3939
- limit: optionalNumber2(ctx, "limit"),
3940
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3930
+ limit: optionalNumber(ctx, "limit"),
3931
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3941
3932
  });
3942
3933
  }
3943
3934
  function drilldownUserEventsExportInput(ctx) {
3944
3935
  return compactInput({
3945
3936
  ...baseInput2(ctx),
3946
- format: optionalString2(ctx, "artifact-format"),
3947
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3937
+ format: optionalString(ctx, "artifact-format"),
3938
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
3948
3939
  });
3949
3940
  }
3950
3941
  function baseInput2(ctx) {
3951
3942
  return {
3943
+ project_id: ctx.num("project-id"),
3952
3944
  drilldown_context_id: ctx.str("drilldown-context-id"),
3953
3945
  user_id: ctx.str("user-id"),
3954
3946
  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")
3947
+ sort_order: optionalString(ctx, "sort-order"),
3948
+ event_name_filter: optionalString(ctx, "event-name-filter"),
3949
+ time_filter: optionalString(ctx, "time-filter"),
3950
+ time_filter_before_nums: optionalNumber(ctx, "time-filter-before-nums"),
3951
+ time_filter_after_nums: optionalNumber(ctx, "time-filter-after-nums"),
3952
+ request_id: optionalString(ctx, "request-id"),
3953
+ use_cache: optionalBoolean(ctx, "use-cache")
3962
3954
  };
3963
3955
  }
3964
3956
 
@@ -4270,11 +4262,11 @@ function uploadedInputFileId(value) {
4270
4262
  function assetListInput(ctx) {
4271
4263
  return compactInput({
4272
4264
  project_id: ctx.num("project-id"),
4273
- query: optionalString2(ctx, "query"),
4265
+ query: optionalString(ctx, "query"),
4274
4266
  fields: optionalJsonArray(ctx, "fields"),
4275
- limit: optionalNumber2(ctx, "limit"),
4276
- offset: optionalNumber2(ctx, "offset"),
4277
- authenticated_only: optionalBoolean2(ctx, "authenticated-only")
4267
+ limit: optionalNumber(ctx, "limit"),
4268
+ offset: optionalNumber(ctx, "offset"),
4269
+ authenticated_only: optionalBoolean(ctx, "authenticated-only")
4278
4270
  });
4279
4271
  }
4280
4272
  function memberInput(ctx, kind, inline) {
@@ -4282,14 +4274,14 @@ function memberInput(ctx, kind, inline) {
4282
4274
  project_id: ctx.num("project-id"),
4283
4275
  cluster_name: kind === "cluster" ? ctx.str("cluster-name") : void 0,
4284
4276
  tag_name: kind === "tag" ? ctx.str("tag-name") : void 0,
4285
- snapshot_date: kind === "tag" ? optionalString2(ctx, "snapshot-date") : void 0,
4277
+ snapshot_date: kind === "tag" ? optionalString(ctx, "snapshot-date") : void 0,
4286
4278
  property_names: optionalJsonArray(ctx, "property-names"),
4287
4279
  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,
4280
+ query: optionalString(ctx, "query"),
4281
+ use_cache: optionalBoolean(ctx, "use-cache"),
4282
+ request_id: optionalString(ctx, "request-id"),
4283
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
4284
+ limit: inline ? optionalNumber(ctx, "limit") : void 0,
4293
4285
  format: inline ? void 0 : optionalJsonlFormat(ctx)
4294
4286
  });
4295
4287
  }
@@ -4299,12 +4291,12 @@ function clusterWriteInput(ctx, create) {
4299
4291
  return compactInput({
4300
4292
  project_id: ctx.num("project-id"),
4301
4293
  cluster_name: ctx.str("cluster-name"),
4302
- display_name: create ? ctx.str("display-name") : optionalString2(ctx, "display-name"),
4294
+ display_name: create ? ctx.str("display-name") : optionalString(ctx, "display-name"),
4303
4295
  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
4296
+ authenticated_only: optionalBoolean(ctx, "authenticated-only"),
4297
+ remark: create ? void 0 : optionalString(ctx, "remark"),
4298
+ zone_offset: optionalNumber(ctx, "zone-offset"),
4299
+ entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
4308
4300
  });
4309
4301
  }
4310
4302
  function tagWriteInput(ctx, create) {
@@ -4313,12 +4305,12 @@ function tagWriteInput(ctx, create) {
4313
4305
  return compactInput({
4314
4306
  project_id: ctx.num("project-id"),
4315
4307
  tag_name: ctx.str("tag-name"),
4316
- display_name: create ? ctx.str("display-name") : optionalString2(ctx, "display-name"),
4308
+ display_name: create ? ctx.str("display-name") : optionalString(ctx, "display-name"),
4317
4309
  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
4310
+ authenticated_only: optionalBoolean(ctx, "authenticated-only"),
4311
+ remark: create ? void 0 : optionalString(ctx, "remark"),
4312
+ zone_offset: optionalNumber(ctx, "zone-offset"),
4313
+ entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
4322
4314
  });
4323
4315
  }
4324
4316
  function validateDefinitionRequest(create, definitionRequest) {
@@ -4329,25 +4321,25 @@ function validateDefinitionRequest(create, definitionRequest) {
4329
4321
  function idClusterInput(ctx, create) {
4330
4322
  return compactInput({
4331
4323
  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"),
4324
+ cluster_name: create ? optionalString(ctx, "cluster-name") : ctx.str("cluster-name"),
4325
+ display_name: create ? ctx.str("display-name") : optionalString(ctx, "display-name"),
4326
+ input_file_id: optionalString(ctx, "input-file-id"),
4327
+ file_content: optionalString(ctx, "file-content"),
4336
4328
  entity_id: create ? ctx.num("entity-id") : void 0,
4337
- remarks: optionalString2(ctx, "remarks"),
4338
- main_column_name: optionalString2(ctx, "association-property")
4329
+ remarks: optionalString(ctx, "remarks"),
4330
+ main_column_name: optionalString(ctx, "association-property")
4339
4331
  });
4340
4332
  }
4341
4333
  function idTagInput(ctx, create) {
4342
4334
  return compactInput({
4343
4335
  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")
4336
+ tag_name: create ? optionalString(ctx, "tag-name") : ctx.str("tag-name"),
4337
+ display_name: create ? ctx.str("display-name") : optionalString(ctx, "display-name"),
4338
+ input_file_id: optionalString(ctx, "input-file-id"),
4339
+ file_content: optionalString(ctx, "file-content"),
4340
+ entity_id: create ? ctx.num("entity-id") : optionalNumber(ctx, "entity-id"),
4341
+ remarks: optionalString(ctx, "remarks"),
4342
+ main_column_name: optionalString(ctx, "association-property")
4351
4343
  });
4352
4344
  }
4353
4345
  function historyTagDataInput(ctx, inline) {
@@ -4355,9 +4347,9 @@ function historyTagDataInput(ctx, inline) {
4355
4347
  project_id: ctx.num("project-id"),
4356
4348
  tag_name: ctx.str("tag-name"),
4357
4349
  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,
4350
+ request_id: optionalString(ctx, "request-id"),
4351
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
4352
+ limit: inline ? optionalNumber(ctx, "limit") : void 0,
4361
4353
  format: inline ? void 0 : optionalJsonlFormat(ctx)
4362
4354
  });
4363
4355
  }
@@ -4370,16 +4362,16 @@ function historyTagDataDrilldownInput(ctx, inline) {
4370
4362
  view: ctx.json("view"),
4371
4363
  property_names: optionalJsonArray(ctx, "property-names"),
4372
4364
  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,
4365
+ query: optionalString(ctx, "query"),
4366
+ use_cache: optionalBoolean(ctx, "use-cache"),
4367
+ request_id: optionalString(ctx, "request-id"),
4368
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds"),
4369
+ limit: inline ? optionalNumber(ctx, "limit") : void 0,
4378
4370
  format: inline ? void 0 : optionalJsonlFormat(ctx)
4379
4371
  });
4380
4372
  }
4381
4373
  function optionalJsonlFormat(ctx) {
4382
- const format = optionalString2(ctx, "artifact-format");
4374
+ const format = optionalString(ctx, "artifact-format");
4383
4375
  if (format !== void 0 && format !== "jsonl") {
4384
4376
  throw new Error("--artifact-format only supports jsonl for user member/history-tag exports");
4385
4377
  }
@@ -4472,7 +4464,7 @@ var commands38 = [
4472
4464
  ], "high-risk-write", (ctx) => compactInput({
4473
4465
  project_id: ctx.num("project-id"),
4474
4466
  cluster_name: ctx.str("cluster-name"),
4475
- confirmed: optionalBoolean2(ctx, "confirmed")
4467
+ confirmed: optionalBoolean(ctx, "confirmed")
4476
4468
  })),
4477
4469
  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
4470
  capability("user-tag", "get", "analysis.user_tag.get", "Get user tag details by exact tag_name values.", [
@@ -4541,7 +4533,7 @@ var commands38 = [
4541
4533
  ], "high-risk-write", (ctx) => compactInput({
4542
4534
  project_id: ctx.num("project-id"),
4543
4535
  tag_name: ctx.str("tag-name"),
4544
- confirmed: optionalBoolean2(ctx, "confirmed")
4536
+ confirmed: optionalBoolean(ctx, "confirmed")
4545
4537
  })),
4546
4538
  capability("history-tag", "list", "analysis.history_tag.list", "List history tag snapshots for a tag.", [
4547
4539
  projectIdFlag,
@@ -4556,7 +4548,7 @@ var commands38 = [
4556
4548
  project_id: ctx.num("project-id"),
4557
4549
  tag_name: ctx.str("tag-name"),
4558
4550
  refresh_date: ctx.str("refresh-date"),
4559
- use_user_table_type: optionalString2(ctx, "use-user-table-type")
4551
+ use_user_table_type: optionalString(ctx, "use-user-table-type")
4560
4552
  })),
4561
4553
  capability("history-tag", "batch-refresh", "analysis.history_tag.batch_refresh", "Batch refresh history tag snapshots using the product refresh request object.", [
4562
4554
  projectIdFlag,
@@ -4578,7 +4570,7 @@ var commands38 = [
4578
4570
  tag_name: ctx.str("tag-name"),
4579
4571
  start_time: ctx.str("start-time"),
4580
4572
  end_time: ctx.str("end-time"),
4581
- confirmed: optionalBoolean2(ctx, "confirmed")
4573
+ confirmed: optionalBoolean(ctx, "confirmed")
4582
4574
  })),
4583
4575
  capability("history-tag-data", "run", "analysis.history_tag_data.run", `Run a bounded history tag statistics query. ${analysisDataRunRoutingHelp}`, [
4584
4576
  projectIdFlag,
@@ -4613,24 +4605,20 @@ var commands38 = [
4613
4605
  ];
4614
4606
  var user_default = commands38;
4615
4607
 
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
- ],
4608
+ // src/commands/te-analysis/query-cluster/list.ts
4609
+ var queryClusterList = createAnalysisCapabilityCommand({
4610
+ resource: "query-cluster",
4611
+ command: "list",
4612
+ capabilityId: "analysis.query_cluster.list",
4613
+ description: "List accessible physical query-routing clusters and GLOBAL/SLAVE options. This is not the saved user cohort/cluster catalog.",
4614
+ flags: [projectIdFlag],
4623
4615
  risk: "read",
4624
- buildArgs: (ctx) => ({
4625
- projectId: ctx.num("project_id")
4626
- })
4616
+ buildInput: projectInput
4627
4617
  });
4628
4618
 
4629
- // src/commands/te-analysis/global/index.ts
4630
- var commands39 = [
4631
- listQueryClusters
4632
- ];
4633
- var global_default = commands39;
4619
+ // src/commands/te-analysis/query-cluster/index.ts
4620
+ var commands39 = [queryClusterList];
4621
+ var query_cluster_default = commands39;
4634
4622
 
4635
4623
  // src/commands/te-analysis/sql-table/columns.ts
4636
4624
  var sqlTableColumns = createAnalysisCapabilityCommand({
@@ -4652,7 +4640,7 @@ var sqlTableColumns = createAnalysisCapabilityCommand({
4652
4640
  buildInput: (ctx) => compactInput({
4653
4641
  ...projectInput(ctx),
4654
4642
  table_ref: ctx.str("table-ref"),
4655
- usage: optionalString2(ctx, "usage")
4643
+ usage: optionalString(ctx, "usage")
4656
4644
  })
4657
4645
  });
4658
4646
 
@@ -4666,10 +4654,10 @@ var sqlTableList = createAnalysisCapabilityCommand({
4666
4654
  risk: "read",
4667
4655
  buildInput: (ctx) => compactInput({
4668
4656
  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")
4657
+ query: optionalString(ctx, "query"),
4658
+ limit: optionalNumber(ctx, "limit"),
4659
+ offset: optionalNumber(ctx, "offset"),
4660
+ usage: optionalString(ctx, "usage")
4673
4661
  })
4674
4662
  });
4675
4663
 
@@ -4823,7 +4811,7 @@ var projectDataPowerDelete = createAnalysisCapabilityCommand({
4823
4811
  buildInput: (ctx) => compactInput({
4824
4812
  project_id: ctx.num("project-id"),
4825
4813
  data_power_id: ctx.num("data-power-id"),
4826
- new_data_power_id: optionalNumber2(ctx, "new-data-power-id"),
4814
+ new_data_power_id: optionalNumber(ctx, "new-data-power-id"),
4827
4815
  yes: true
4828
4816
  })
4829
4817
  });
@@ -4905,7 +4893,7 @@ var projectEntityCreate = createAnalysisCapabilityCommand({
4905
4893
  entity_name: ctx.str("entity-name"),
4906
4894
  column_name: ctx.str("column-name"),
4907
4895
  table_type: ctx.num("table-type"),
4908
- order: optionalNumber2(ctx, "order")
4896
+ order: optionalNumber(ctx, "order")
4909
4897
  })
4910
4898
  });
4911
4899
 
@@ -4961,11 +4949,11 @@ var projectEntityList = createAnalysisCapabilityCommand({
4961
4949
  risk: "read",
4962
4950
  buildInput: (ctx) => compactInput({
4963
4951
  project_id: ctx.num("project-id"),
4964
- query: optionalString2(ctx, "query"),
4952
+ query: optionalString(ctx, "query"),
4965
4953
  fields: optionalJson(ctx, "fields"),
4966
- limit: optionalNumber2(ctx, "limit"),
4967
- offset: optionalNumber2(ctx, "offset"),
4968
- event_name: optionalString2(ctx, "event-name")
4954
+ limit: optionalNumber(ctx, "limit"),
4955
+ offset: optionalNumber(ctx, "offset"),
4956
+ event_name: optionalString(ctx, "event-name")
4969
4957
  })
4970
4958
  });
4971
4959
 
@@ -4990,7 +4978,7 @@ var projectEntityUpdate = createAnalysisCapabilityCommand({
4990
4978
  entity_name: ctx.str("entity-name"),
4991
4979
  column_name: ctx.str("column-name"),
4992
4980
  table_type: ctx.num("table-type"),
4993
- order: optionalNumber2(ctx, "order")
4981
+ order: optionalNumber(ctx, "order")
4994
4982
  })
4995
4983
  });
4996
4984
 
@@ -5039,7 +5027,7 @@ var projectFunctionList = createAnalysisCapabilityCommand({
5039
5027
  ],
5040
5028
  risk: "read",
5041
5029
  buildInput: (ctx) => compactInput({
5042
- company_id: optionalNumber2(ctx, "company-id"),
5030
+ company_id: optionalNumber(ctx, "company-id"),
5043
5031
  project_id: ctx.num("project-id")
5044
5032
  })
5045
5033
  });
@@ -5079,10 +5067,10 @@ var projectInfoList = createAnalysisCapabilityCommand({
5079
5067
  ],
5080
5068
  risk: "read",
5081
5069
  buildInput: (ctx) => compactInput({
5082
- query: optionalString2(ctx, "query"),
5070
+ query: optionalString(ctx, "query"),
5083
5071
  fields: optionalJson(ctx, "fields"),
5084
- limit: optionalNumber2(ctx, "limit"),
5085
- offset: optionalNumber2(ctx, "offset")
5072
+ limit: optionalNumber(ctx, "limit"),
5073
+ offset: optionalNumber(ctx, "offset")
5086
5074
  })
5087
5075
  });
5088
5076
 
@@ -5101,7 +5089,7 @@ var projectInfoUpdate = createAnalysisCapabilityCommand({
5101
5089
  buildInput: (ctx) => compactInput({
5102
5090
  project_id: ctx.num("project-id"),
5103
5091
  project_name: ctx.str("project-name"),
5104
- project_remark: optionalString2(ctx, "project-remark")
5092
+ project_remark: optionalString(ctx, "project-remark")
5105
5093
  })
5106
5094
  });
5107
5095
 
@@ -5130,9 +5118,9 @@ var projectMarkTimeCreate = createAnalysisCapabilityCommand({
5130
5118
  buildInput: (ctx) => compactInput({
5131
5119
  project_id: ctx.num("project-id"),
5132
5120
  marked_at: ctx.str("marked-at"),
5133
- zone_offset: optionalNumber2(ctx, "zone-offset"),
5121
+ zone_offset: optionalNumber(ctx, "zone-offset"),
5134
5122
  content: ctx.str("content"),
5135
- is_visible: optionalNumber2(ctx, "is-visible")
5123
+ is_visible: optionalNumber(ctx, "is-visible")
5136
5124
  })
5137
5125
  });
5138
5126
 
@@ -5171,11 +5159,11 @@ var projectMarkTimeList = createAnalysisCapabilityCommand({
5171
5159
  risk: "read",
5172
5160
  buildInput: (ctx) => compactInput({
5173
5161
  project_id: ctx.num("project-id"),
5174
- query: optionalString2(ctx, "query"),
5162
+ query: optionalString(ctx, "query"),
5175
5163
  fields: optionalJson(ctx, "fields"),
5176
- limit: optionalNumber2(ctx, "limit"),
5177
- offset: optionalNumber2(ctx, "offset"),
5178
- zone_offset: optionalNumber2(ctx, "zone-offset")
5164
+ limit: optionalNumber(ctx, "limit"),
5165
+ offset: optionalNumber(ctx, "offset"),
5166
+ zone_offset: optionalNumber(ctx, "zone-offset")
5179
5167
  })
5180
5168
  });
5181
5169
 
@@ -5198,9 +5186,9 @@ var projectMarkTimeUpdate = createAnalysisCapabilityCommand({
5198
5186
  project_id: ctx.num("project-id"),
5199
5187
  mark_time_id: ctx.num("mark-time-id"),
5200
5188
  marked_at: ctx.str("marked-at"),
5201
- zone_offset: optionalNumber2(ctx, "zone-offset"),
5189
+ zone_offset: optionalNumber(ctx, "zone-offset"),
5202
5190
  content: ctx.str("content"),
5203
- is_visible: optionalNumber2(ctx, "is-visible")
5191
+ is_visible: optionalNumber(ctx, "is-visible")
5204
5192
  })
5205
5193
  });
5206
5194
 
@@ -5347,7 +5335,7 @@ var projectMemberCandidateList = createAnalysisCapabilityCommand({
5347
5335
  buildInput: (ctx) => compactInput({
5348
5336
  project_id: ctx.num("project-id"),
5349
5337
  type: ctx.str("type"),
5350
- login_names: optionalString2(ctx, "login-names")
5338
+ login_names: optionalString(ctx, "login-names")
5351
5339
  })
5352
5340
  });
5353
5341
 
@@ -5372,7 +5360,7 @@ var projectMemberHandoverExport = createAnalysisCapabilityCommand({
5372
5360
  buildInput: (ctx) => compactInput({
5373
5361
  project_id: ctx.num("project-id"),
5374
5362
  payload: ctx.json("payload"),
5375
- request_id: optionalString2(ctx, "request-id"),
5363
+ request_id: optionalString(ctx, "request-id"),
5376
5364
  yes: true
5377
5365
  })
5378
5366
  });
@@ -5439,9 +5427,9 @@ var projectOwnerUpdate = createAnalysisCapabilityCommand({
5439
5427
  buildInput: (ctx) => compactInput({
5440
5428
  project_id: ctx.num("project-id"),
5441
5429
  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")
5430
+ owner_user_id: optionalNumber(ctx, "owner-user-id"),
5431
+ project_name: optionalString(ctx, "project-name"),
5432
+ project_remark: optionalString(ctx, "project-remark")
5445
5433
  })
5446
5434
  });
5447
5435
 
@@ -5515,7 +5503,7 @@ var projectRoleDelete = createAnalysisCapabilityCommand({
5515
5503
  buildInput: (ctx) => compactInput({
5516
5504
  project_id: ctx.num("project-id"),
5517
5505
  role_name: ctx.str("role-name"),
5518
- new_role_name: optionalString2(ctx, "new-role-name"),
5506
+ new_role_name: optionalString(ctx, "new-role-name"),
5519
5507
  yes: true
5520
5508
  })
5521
5509
  });
@@ -5550,9 +5538,9 @@ var projectRoleList = createAnalysisCapabilityCommand({
5550
5538
  ],
5551
5539
  risk: "read",
5552
5540
  buildInput: (ctx) => compactInput({
5553
- company_id: optionalNumber2(ctx, "company-id"),
5541
+ company_id: optionalNumber(ctx, "company-id"),
5554
5542
  project_id: ctx.num("project-id"),
5555
- visible_only: optionalBoolean2(ctx, "visible-only")
5543
+ visible_only: optionalBoolean(ctx, "visible-only")
5556
5544
  })
5557
5545
  });
5558
5546
 
@@ -5597,11 +5585,11 @@ var projectRoleFunctionList = createAnalysisCapabilityCommand({
5597
5585
  ],
5598
5586
  risk: "read",
5599
5587
  buildInput: (ctx) => compactInput({
5600
- company_id: optionalNumber2(ctx, "company-id"),
5588
+ company_id: optionalNumber(ctx, "company-id"),
5601
5589
  project_id: ctx.num("project-id"),
5602
- role_name: optionalString2(ctx, "role-name"),
5590
+ role_name: optionalString(ctx, "role-name"),
5603
5591
  role_names: optionalJson(ctx, "role-names"),
5604
- show_system_func: optionalBoolean2(ctx, "show-system-func")
5592
+ show_system_func: optionalBoolean(ctx, "show-system-func")
5605
5593
  })
5606
5594
  });
5607
5595
 
@@ -5896,8 +5884,8 @@ function projectInput2(ctx) {
5896
5884
  function projectLifecycleInput(ctx) {
5897
5885
  return compactInput({
5898
5886
  ...projectInput2(ctx),
5899
- request_id: optionalString2(ctx, "request-id"),
5900
- timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
5887
+ request_id: optionalString(ctx, "request-id"),
5888
+ timeout_seconds: optionalNumber(ctx, "timeout-seconds")
5901
5889
  });
5902
5890
  }
5903
5891
 
@@ -6004,7 +5992,7 @@ var trackingPlanImportExcel = {
6004
5992
  risk: "write",
6005
5993
  validate: validateSource,
6006
5994
  validateInput: async (ctx) => {
6007
- const inputFile = optionalString2(ctx, "input-file");
5995
+ const inputFile = optionalString(ctx, "input-file");
6008
5996
  if (inputFile) {
6009
5997
  return {
6010
5998
  valid: true,
@@ -6021,7 +6009,7 @@ var trackingPlanImportExcel = {
6021
6009
  );
6022
6010
  },
6023
6011
  dryRun: async (ctx) => {
6024
- const inputFile = optionalString2(ctx, "input-file");
6012
+ const inputFile = optionalString(ctx, "input-file");
6025
6013
  if (inputFile) {
6026
6014
  return {
6027
6015
  steps: [
@@ -6045,8 +6033,8 @@ var trackingPlanImportExcel = {
6045
6033
  );
6046
6034
  },
6047
6035
  execute: async (ctx) => {
6048
- const inputFile = optionalString2(ctx, "input-file");
6049
- let inputFileId = optionalString2(ctx, "input-file-id");
6036
+ const inputFile = optionalString(ctx, "input-file");
6037
+ let inputFileId = optionalString(ctx, "input-file-id");
6050
6038
  if (inputFile) {
6051
6039
  const upload = await uploadInputFile(
6052
6040
  ctx.host(),
@@ -6070,8 +6058,8 @@ var trackingPlanImportExcel = {
6070
6058
  }
6071
6059
  };
6072
6060
  function validateSource(ctx) {
6073
- const inputFile = optionalString2(ctx, "input-file");
6074
- const inputFileId = optionalString2(ctx, "input-file-id");
6061
+ const inputFile = optionalString(ctx, "input-file");
6062
+ const inputFileId = optionalString(ctx, "input-file-id");
6075
6063
  if (Boolean(inputFile) === Boolean(inputFileId)) {
6076
6064
  throw new Error("Pass exactly one of --input-file or --input-file-id");
6077
6065
  }
@@ -6083,7 +6071,7 @@ function buildInput(ctx, inputFileId) {
6083
6071
  return compactInput({
6084
6072
  ...projectInput2(ctx),
6085
6073
  input_file_id: inputFileId,
6086
- lang: optionalString2(ctx, "lang")
6074
+ lang: optionalString(ctx, "lang")
6087
6075
  });
6088
6076
  }
6089
6077
 
@@ -6146,7 +6134,7 @@ var trackingPlanChangeLogExport = createTrackingCapabilityCommand({
6146
6134
  description: "Export one tracking plan change log.",
6147
6135
  flags: [projectIdFlag, logIdFlag, requestIdFlag, asyncTimeoutSecondsFlag],
6148
6136
  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") })
6137
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), log_id: ctx.num("log-id"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6150
6138
  });
6151
6139
 
6152
6140
  // src/commands/te-analysis/tracking/plan-change-log/index.ts
@@ -6190,7 +6178,7 @@ var trackingCheckGet = createTrackingCapabilityCommand({
6190
6178
  description: "Get one tracking validation result.",
6191
6179
  flags: [projectIdFlag, uuidFlag, requestIdFlag, timeoutSecondsFlag],
6192
6180
  risk: "read",
6193
- buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6181
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6194
6182
  });
6195
6183
 
6196
6184
  // src/commands/te-analysis/tracking/check/retry.ts
@@ -6201,7 +6189,7 @@ var trackingCheckRetry = createTrackingCapabilityCommand({
6201
6189
  description: "Retry one tracking validation run.",
6202
6190
  flags: [projectIdFlag, uuidFlag, requestIdFlag, timeoutSecondsFlag],
6203
6191
  risk: "write",
6204
- buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6192
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6205
6193
  });
6206
6194
 
6207
6195
  // src/commands/te-analysis/tracking/check/delete.ts
@@ -6223,7 +6211,7 @@ var trackingCheckExport = createTrackingCapabilityCommand({
6223
6211
  description: "Export one tracking validation result.",
6224
6212
  flags: [projectIdFlag, uuidFlag, requestIdFlag, asyncTimeoutSecondsFlag],
6225
6213
  risk: "read",
6226
- buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6214
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6227
6215
  });
6228
6216
 
6229
6217
  // src/commands/te-analysis/tracking/check/index.ts
@@ -6279,7 +6267,7 @@ var trackingLiveDataList = createTrackingCapabilityCommand({
6279
6267
  description: "List recent tracking live data.",
6280
6268
  flags: [projectIdFlag, dataTypeFlag, requestIdFlag, timeoutSecondsFlag],
6281
6269
  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") })
6270
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), data_type: optionalString(ctx, "data-type"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6283
6271
  });
6284
6272
 
6285
6273
  // src/commands/te-analysis/tracking/live-data/export.ts
@@ -6290,7 +6278,7 @@ var trackingLiveDataExport = createTrackingCapabilityCommand({
6290
6278
  description: "Export recent tracking live data.",
6291
6279
  flags: [projectIdFlag, dataTypeFlag, requestIdFlag, asyncTimeoutSecondsFlag],
6292
6280
  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") })
6281
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), data_type: optionalString(ctx, "data-type"), request_id: optionalString(ctx, "request-id"), timeout_seconds: optionalNumber(ctx, "timeout-seconds") })
6294
6282
  });
6295
6283
 
6296
6284
  // src/commands/te-analysis/tracking/live-data/index.ts
@@ -6361,11 +6349,11 @@ var alertIdFlag = {
6361
6349
  required: true,
6362
6350
  desc: "Alert task ID."
6363
6351
  };
6364
- var definitionFlag = {
6365
- name: "definition",
6352
+ var definitionRequestFlag = {
6353
+ name: "definition-request",
6366
6354
  type: "json",
6367
6355
  required: true,
6368
- desc: "Alert definition JSON object using snake_case field names. Read alert-definition-schema get first."
6356
+ desc: "Structured alert definition request JSON object using snake_case field names."
6369
6357
  };
6370
6358
  var limitFlag2 = {
6371
6359
  name: "limit",
@@ -6402,7 +6390,7 @@ var analysisAlertList = createAnalysisCapabilityCommand({
6402
6390
  description: "List project alerts.",
6403
6391
  flags: [projectIdFlag, queryFlag, limitFlag2, offsetFlag],
6404
6392
  risk: "read",
6405
- buildInput: (ctx) => compactInput({ ...projectInput3(ctx), query: optionalString2(ctx, "query"), limit: optionalNumber2(ctx, "limit"), offset: optionalNumber2(ctx, "offset") })
6393
+ buildInput: (ctx) => compactInput({ ...projectInput3(ctx), query: optionalString(ctx, "query"), limit: optionalNumber(ctx, "limit"), offset: optionalNumber(ctx, "offset") })
6406
6394
  });
6407
6395
 
6408
6396
  // src/commands/te-analysis/alert/get.ts
@@ -6422,9 +6410,9 @@ var analysisAlertCreate = createAnalysisCapabilityCommand({
6422
6410
  command: "create",
6423
6411
  capabilityId: "analysis.alert.create",
6424
6412
  description: "Create an alert.",
6425
- flags: [projectIdFlag, definitionFlag],
6413
+ flags: [projectIdFlag, definitionRequestFlag],
6426
6414
  risk: "write",
6427
- buildInput: (ctx) => ({ ...projectInput3(ctx), definition: ctx.json("definition") })
6415
+ buildInput: (ctx) => ({ ...projectInput3(ctx), definition_request: ctx.json("definition-request") })
6428
6416
  });
6429
6417
 
6430
6418
  // src/commands/te-analysis/alert/update.ts
@@ -6433,9 +6421,9 @@ var analysisAlertUpdate = createAnalysisCapabilityCommand({
6433
6421
  command: "update",
6434
6422
  capabilityId: "analysis.alert.update",
6435
6423
  description: "Update an alert.",
6436
- flags: [projectIdFlag, alertIdFlag, definitionFlag],
6424
+ flags: [projectIdFlag, alertIdFlag, definitionRequestFlag],
6437
6425
  risk: "write",
6438
- buildInput: (ctx) => ({ ...alertIdInput(ctx), definition: ctx.json("definition") })
6426
+ buildInput: (ctx) => ({ ...alertIdInput(ctx), definition_request: ctx.json("definition-request") })
6439
6427
  });
6440
6428
 
6441
6429
  // src/commands/te-analysis/alert/delete.ts
@@ -6483,23 +6471,6 @@ var commands72 = [
6483
6471
  ];
6484
6472
  var alert_default = commands72;
6485
6473
 
6486
- // src/commands/te-analysis/alert-definition-schema/get.ts
6487
- var analysisAlertDefinitionSchemaGet = createAnalysisCapabilityCommand({
6488
- resource: "alert-definition-schema",
6489
- command: "get",
6490
- capabilityId: "analysis.alert_definition_schema.get",
6491
- description: "Get the alert definition schema.",
6492
- flags: [],
6493
- risk: "read",
6494
- buildInput: () => ({})
6495
- });
6496
-
6497
- // src/commands/te-analysis/alert-definition-schema/index.ts
6498
- var commands73 = [
6499
- analysisAlertDefinitionSchemaGet
6500
- ];
6501
- var alert_definition_schema_default = commands73;
6502
-
6503
6474
  // src/commands/te-analysis/alert-detail/list.ts
6504
6475
  var analysisAlertDetailList = createAnalysisCapabilityCommand({
6505
6476
  resource: "alert-detail",
@@ -6508,14 +6479,14 @@ var analysisAlertDetailList = createAnalysisCapabilityCommand({
6508
6479
  description: "List alert delivery details.",
6509
6480
  flags: [projectIdFlag, alertIdFlag, startTimeFlag2, endTimeFlag2],
6510
6481
  risk: "read",
6511
- buildInput: (ctx) => compactInput({ ...alertIdInput(ctx), start_time: optionalString2(ctx, "start-time"), end_time: optionalString2(ctx, "end-time") })
6482
+ buildInput: (ctx) => compactInput({ ...alertIdInput(ctx), start_time: optionalString(ctx, "start-time"), end_time: optionalString(ctx, "end-time") })
6512
6483
  });
6513
6484
 
6514
6485
  // src/commands/te-analysis/alert-detail/index.ts
6515
- var commands74 = [
6486
+ var commands73 = [
6516
6487
  analysisAlertDetailList
6517
6488
  ];
6518
- var alert_detail_default = commands74;
6489
+ var alert_detail_default = commands73;
6519
6490
 
6520
6491
  // src/commands/te-analysis/alert-job/list.ts
6521
6492
  var analysisAlertJobList = createAnalysisCapabilityCommand({
@@ -6529,10 +6500,10 @@ var analysisAlertJobList = createAnalysisCapabilityCommand({
6529
6500
  });
6530
6501
 
6531
6502
  // src/commands/te-analysis/alert-job/index.ts
6532
- var commands75 = [
6503
+ var commands74 = [
6533
6504
  analysisAlertJobList
6534
6505
  ];
6535
- var alert_job_default = commands75;
6506
+ var alert_job_default = commands74;
6536
6507
 
6537
6508
  // src/commands/te-analysis/alert-notice-config/list.ts
6538
6509
  var analysisAlertNoticeConfigList = createAnalysisCapabilityCommand({
@@ -6546,10 +6517,10 @@ var analysisAlertNoticeConfigList = createAnalysisCapabilityCommand({
6546
6517
  });
6547
6518
 
6548
6519
  // src/commands/te-analysis/alert-notice-config/index.ts
6549
- var commands76 = [
6520
+ var commands75 = [
6550
6521
  analysisAlertNoticeConfigList
6551
6522
  ];
6552
- var alert_notice_config_default = commands76;
6523
+ var alert_notice_config_default = commands75;
6553
6524
 
6554
6525
  // src/commands/te-analysis/index.ts
6555
6526
  registerCapabilityGatewayRoute("analysis", { gatewayDomain: "analysis" });
@@ -6577,7 +6548,7 @@ var baseCommands = [
6577
6548
  ...project_space_default,
6578
6549
  ...favorite_default,
6579
6550
  ...public_link_default,
6580
- ...model_default,
6551
+ ...filter_value_default,
6581
6552
  ...event_detail_default,
6582
6553
  ...entity_detail_default,
6583
6554
  ...drilldown_events_default,
@@ -6585,21 +6556,18 @@ var baseCommands = [
6585
6556
  ...drilldown_user_events_default,
6586
6557
  ...user_default,
6587
6558
  ...sql_table_default,
6559
+ ...query_cluster_default,
6588
6560
  ...entity_default,
6589
6561
  ...input_file_default,
6590
6562
  ...project_default,
6591
6563
  ...tracking_default,
6592
6564
  ...alert_default,
6593
- ...alert_definition_schema_default,
6594
6565
  ...alert_detail_default,
6595
6566
  ...alert_job_default,
6596
6567
  ...alert_notice_config_default
6597
6568
  ];
6598
- var commands77 = [
6599
- ...baseCommands,
6600
- ...isGlobalQueryModeEnabled() ? global_default : []
6601
- ];
6602
- var te_analysis_default = commands77;
6569
+ var commands76 = [...baseCommands];
6570
+ var te_analysis_default = commands76;
6603
6571
  export {
6604
6572
  baseCommands,
6605
6573
  te_analysis_default as default