@thinkingai/ae-cli 6.0.31 → 6.0.33

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 (255) hide show
  1. package/README.md +3 -2
  2. package/README.zh.md +3 -2
  3. package/dist/{auth-MEJ642P4.js → auth-ENM3FE6L.js} +3 -2
  4. package/dist/{auth-7H3HAAJ3.js → auth-UPGUOKTW.js} +13 -6
  5. package/dist/{capability-SEH3JWLN.js → capability-AJC5CBRT.js} +50 -18
  6. package/dist/{capability-SQ2IWKP3.js → capability-TQ5KU5Q6.js} +50 -18
  7. package/dist/chunk-24BAVOX3.js +51 -0
  8. package/dist/{chunk-MDJGDI6K.js → chunk-3KI3RRXX.js} +5 -5
  9. package/dist/{chunk-PKRD2IEM.js → chunk-3P3562ZX.js} +9 -7
  10. package/dist/{chunk-R77JT7XD.js → chunk-4Q5TNP4Q.js} +4 -4
  11. package/dist/{chunk-TKQJQXWT.js → chunk-6CHYBI64.js} +7 -4
  12. package/dist/{chunk-6LEYLOV3.js → chunk-CPVTECJ3.js} +9 -7
  13. package/dist/{chunk-KCA6BA5D.js → chunk-DB4Q3ANU.js} +5 -3
  14. package/dist/{chunk-2NDGFQHW.js → chunk-E7UXXHO3.js} +11 -3
  15. package/dist/{chunk-I4A62X3N.js → chunk-HQ2A7ITL.js} +23 -14
  16. package/dist/chunk-IMMGMU54.js +674 -0
  17. package/dist/{chunk-AJTH7LT3.js → chunk-IR4ZLVPW.js} +4 -2
  18. package/dist/{chunk-N2QORU5D.js → chunk-ISY6HMHM.js} +7 -4
  19. package/dist/{chunk-KGJQCYVC.js → chunk-LCXU3AAT.js} +4 -2
  20. package/dist/chunk-LYVNONC4.js +86 -0
  21. package/dist/{chunk-DYOS6YY7.js → chunk-RGXCNC4N.js} +23 -14
  22. package/dist/{chunk-YCLVYFK7.js → chunk-V6FR6WTW.js} +45 -87
  23. package/dist/chunk-VTWMIC5L.js +27 -0
  24. package/dist/{cli-token-TVQRSE46.js → cli-token-4SBMXAUK.js} +6 -3
  25. package/dist/{client-2643Z5AG.js → client-PP5FETMW.js} +4 -3
  26. package/dist/community-report-client-KK2QBANO.js +145 -0
  27. package/dist/{config-7UZWDE74.js → config-RCCGHHYA.js} +6 -3
  28. package/dist/index.js +541 -234
  29. package/dist/{metadata-W6JFFMBA.js → metadata-3M5F2AED.js} +15 -14
  30. package/dist/{metadata-X62TKIVK.js → metadata-W2MEOI4Z.js} +15 -14
  31. package/dist/{model-T3KZJWLW.js → model-OYQLXCQY.js} +3 -2
  32. package/dist/{raw-CN542NGT.js → raw-TPB7KSZO.js} +6 -4
  33. package/dist/{sync-ERNHDPB5.js → sync-EFJKFZK2.js} +6 -3
  34. package/dist/{te-agent-FCCWUDTJ.js → te-agent-K2OWMZXT.js} +3 -2
  35. package/dist/{te-analysis-NJGNWZFC.js → te-analysis-I73ZS4NK.js} +2196 -120
  36. package/dist/{te-analysis-YGV5V5EX.js → te-analysis-Q7AZCDU4.js} +2196 -120
  37. package/dist/te-common-ST3QPSXJ.js +61 -0
  38. package/dist/te-common-WSLIKKPC.js +61 -0
  39. package/dist/te-community-WXGB6IOX.js +1659 -0
  40. package/dist/te-community-X2AHXGCA.js +1659 -0
  41. package/dist/{te-dataops-ZNJBQ6VT.js → te-dataops-MJV54MNY.js} +10 -8
  42. package/dist/{te-dataops-F36T656A.js → te-dataops-OA7I6HBG.js} +10 -8
  43. package/dist/te-engage-GJRVQMK3.js +3895 -0
  44. package/dist/te-engage-JIXX3WBI.js +3895 -0
  45. package/dist/{te-kb-NT33UHAE.js → te-kb-CIZXRWMO.js} +105 -23
  46. package/dist/{te-meta-VKWNAWO4.js → te-meta-Q4L6EE3Q.js} +8 -240
  47. package/dist/{te-meta-MAAUHFQO.js → te-meta-VHCN4Q62.js} +8 -240
  48. package/dist/{te-team-OKCOX7OE.js → te-team-PDKKW7Q5.js} +7 -6
  49. package/dist/tracking/i18n/resources/cli/en.json +4 -3
  50. package/dist/tracking/i18n/resources/cli/ja.json +4 -3
  51. package/dist/tracking/i18n/resources/cli/ko.json +4 -3
  52. package/dist/tracking/i18n/resources/cli/zh.json +4 -3
  53. package/package.json +6 -2
  54. package/skills/ae-agent/SKILL.md +2 -1
  55. package/skills/ae-analysis/SKILL.md +21 -7
  56. package/skills/ae-analysis/references/adhoc_export.md +5 -6
  57. package/skills/ae-analysis/references/adhoc_run.md +7 -9
  58. package/skills/ae-analysis/references/ai_models.md +17 -1
  59. package/skills/ae-analysis/references/alert_create.md +25 -0
  60. package/skills/ae-analysis/references/alert_definition_schema_get.md +24 -0
  61. package/skills/ae-analysis/references/alert_delete.md +26 -0
  62. package/skills/ae-analysis/references/alert_detail_list.md +27 -0
  63. package/skills/ae-analysis/references/alert_get.md +25 -0
  64. package/skills/ae-analysis/references/alert_job_list.md +24 -0
  65. package/skills/ae-analysis/references/alert_list.md +27 -0
  66. package/skills/ae-analysis/references/alert_notice_config_list.md +24 -0
  67. package/skills/ae-analysis/references/alert_start.md +25 -0
  68. package/skills/ae-analysis/references/alert_stop.md +25 -0
  69. package/skills/ae-analysis/references/alert_update.md +26 -0
  70. package/skills/ae-analysis/references/analysis_data_retrieval.md +11 -11
  71. package/skills/ae-analysis/references/analysis_drilldown_contract.md +93 -0
  72. package/skills/ae-analysis/references/analysis_gateway_assets.md +9 -8
  73. package/skills/ae-analysis/references/asset_url_get.md +4 -3
  74. package/skills/ae-analysis/references/bi_panel_create.md +3 -3
  75. package/skills/ae-analysis/references/bi_panel_page_data_export.md +2 -2
  76. package/skills/ae-analysis/references/bi_panel_page_data_run.md +1 -1
  77. package/skills/ae-analysis/references/check_delete.md +27 -0
  78. package/skills/ae-analysis/references/check_export.md +27 -0
  79. package/skills/ae-analysis/references/check_get.md +27 -0
  80. package/skills/ae-analysis/references/check_list.md +24 -0
  81. package/skills/ae-analysis/references/check_retry.md +27 -0
  82. package/skills/ae-analysis/references/check_run.md +25 -0
  83. package/skills/ae-analysis/references/command_index.md +114 -46
  84. package/skills/ae-analysis/references/create_entity.md +2 -2
  85. package/skills/ae-analysis/references/dashboard_create.md +3 -3
  86. package/skills/ae-analysis/references/dashboard_daily_report_send.md +1 -0
  87. package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
  88. package/skills/ae-analysis/references/dashboard_report_data_export.md +4 -4
  89. package/skills/ae-analysis/references/dashboard_report_data_run.md +4 -4
  90. package/skills/ae-analysis/references/drilldown_entities_export.md +26 -0
  91. package/skills/ae-analysis/references/drilldown_entities_run.md +33 -0
  92. package/skills/ae-analysis/references/drilldown_events_export.md +21 -0
  93. package/skills/ae-analysis/references/drilldown_events_run.md +23 -0
  94. package/skills/ae-analysis/references/drilldown_user_events_export.md +6 -3
  95. package/skills/ae-analysis/references/drilldown_user_events_run.md +6 -6
  96. package/skills/ae-analysis/references/entity_detail_export.md +2 -0
  97. package/skills/ae-analysis/references/entity_detail_run.md +8 -1
  98. package/skills/ae-analysis/references/event_blacklist_add.md +25 -0
  99. package/skills/ae-analysis/references/event_blacklist_list.md +24 -0
  100. package/skills/ae-analysis/references/event_blacklist_update.md +26 -0
  101. package/skills/ae-analysis/references/event_detail_export.md +2 -0
  102. package/skills/ae-analysis/references/event_detail_run.md +2 -0
  103. package/skills/ae-analysis/references/event_list.md +10 -2
  104. package/skills/ae-analysis/references/ingest_error_list.md +27 -0
  105. package/skills/ae-analysis/references/ingest_summary.md +26 -0
  106. package/skills/ae-analysis/references/list_entities.md +1 -1
  107. package/skills/ae-analysis/references/live_data_export.md +27 -0
  108. package/skills/ae-analysis/references/live_data_list.md +27 -0
  109. package/skills/ae-analysis/references/metric_create.md +13 -4
  110. package/skills/ae-analysis/references/metric_delete.md +7 -0
  111. package/skills/ae-analysis/references/metric_get.md +6 -0
  112. package/skills/ae-analysis/references/metric_list.md +16 -3
  113. package/skills/ae-analysis/references/metric_update.md +12 -1
  114. package/skills/ae-analysis/references/plan_change_log_export.md +27 -0
  115. package/skills/ae-analysis/references/plan_change_log_list.md +24 -0
  116. package/skills/ae-analysis/references/plan_delete_items.md +30 -0
  117. package/skills/ae-analysis/references/plan_export.md +26 -0
  118. package/skills/ae-analysis/references/plan_generate.md +27 -0
  119. package/skills/ae-analysis/references/plan_get.md +24 -0
  120. package/skills/ae-analysis/references/plan_import_excel.md +26 -0
  121. package/skills/ae-analysis/references/plan_save_items.md +27 -0
  122. package/skills/ae-analysis/references/plan_sync_from_meta.md +24 -0
  123. package/skills/ae-analysis/references/project_access_detail_get.md +23 -0
  124. package/skills/ae-analysis/references/project_data_power_delete.md +26 -0
  125. package/skills/ae-analysis/references/project_data_power_get.md +24 -0
  126. package/skills/ae-analysis/references/project_data_power_list.md +23 -0
  127. package/skills/ae-analysis/references/project_data_power_upsert.md +24 -0
  128. package/skills/ae-analysis/references/project_entity_create.md +27 -0
  129. package/skills/ae-analysis/references/project_entity_delete.md +25 -0
  130. package/skills/ae-analysis/references/project_entity_event_list.md +24 -0
  131. package/skills/ae-analysis/references/project_entity_get.md +24 -0
  132. package/skills/ae-analysis/references/project_entity_list.md +28 -0
  133. package/skills/ae-analysis/references/project_entity_update.md +28 -0
  134. package/skills/ae-analysis/references/project_function_list.md +24 -0
  135. package/skills/ae-analysis/references/project_info_get.md +23 -0
  136. package/skills/ae-analysis/references/project_info_list.md +26 -0
  137. package/skills/ae-analysis/references/project_info_update.md +25 -0
  138. package/skills/ae-analysis/references/project_mark_time_create.md +27 -0
  139. package/skills/ae-analysis/references/project_mark_time_delete.md +25 -0
  140. package/skills/ae-analysis/references/project_mark_time_list.md +28 -0
  141. package/skills/ae-analysis/references/project_mark_time_update.md +28 -0
  142. package/skills/ae-analysis/references/project_member_add.md +25 -0
  143. package/skills/ae-analysis/references/project_member_batch_update.md +24 -0
  144. package/skills/ae-analysis/references/project_member_candidate_list.md +25 -0
  145. package/skills/ae-analysis/references/project_member_handover_export.md +27 -0
  146. package/skills/ae-analysis/references/project_member_handover_run.md +24 -0
  147. package/skills/ae-analysis/references/project_member_import.md +25 -0
  148. package/skills/ae-analysis/references/project_member_list.md +23 -0
  149. package/skills/ae-analysis/references/project_member_receiver_list.md +23 -0
  150. package/skills/ae-analysis/references/project_member_remove.md +26 -0
  151. package/skills/ae-analysis/references/project_member_update.md +25 -0
  152. package/skills/ae-analysis/references/project_owner_update.md +27 -0
  153. package/skills/ae-analysis/references/project_permission_binding_list.md +24 -0
  154. package/skills/ae-analysis/references/project_receive_status_update.md +25 -0
  155. package/skills/ae-analysis/references/project_role_delete.md +26 -0
  156. package/skills/ae-analysis/references/project_role_function_list.md +27 -0
  157. package/skills/ae-analysis/references/project_role_get.md +24 -0
  158. package/skills/ae-analysis/references/project_role_list.md +25 -0
  159. package/skills/ae-analysis/references/project_role_upsert.md +24 -0
  160. package/skills/ae-analysis/references/project_role_user_list.md +24 -0
  161. package/skills/ae-analysis/references/project_timezone_get.md +23 -0
  162. package/skills/ae-analysis/references/project_timezone_overview.md +23 -0
  163. package/skills/ae-analysis/references/project_timezone_update.md +25 -0
  164. package/skills/ae-analysis/references/project_user_id_items_update.md +24 -0
  165. package/skills/ae-analysis/references/property_list.md +21 -6
  166. package/skills/ae-analysis/references/public_link_create.md +1 -1
  167. package/skills/ae-analysis/references/query_create_result_cluster.md +15 -32
  168. package/skills/ae-analysis/references/report_create.md +1 -1
  169. package/skills/ae-analysis/references/report_data_export.md +5 -3
  170. package/skills/ae-analysis/references/report_data_run.md +13 -3
  171. package/skills/ae-analysis/references/report_get.md +2 -0
  172. package/skills/ae-analysis/references/report_update.md +1 -1
  173. package/skills/ae-analysis/references/sdk_sample_generate.md +24 -0
  174. package/skills/ae-analysis/references/user_cluster_create.md +5 -1
  175. package/skills/ae-analysis/references/user_cluster_create_id.md +2 -0
  176. package/skills/ae-analysis/references/user_cluster_get.md +4 -0
  177. package/skills/ae-analysis/references/user_cluster_refresh.md +4 -2
  178. package/skills/ae-analysis/references/user_cluster_update.md +5 -1
  179. package/skills/ae-analysis/references/user_cluster_update_id.md +2 -0
  180. package/skills/ae-analysis/references/user_tag_create.md +5 -1
  181. package/skills/ae-analysis/references/user_tag_create_id.md +2 -0
  182. package/skills/ae-analysis/references/user_tag_get.md +4 -0
  183. package/skills/ae-analysis/references/user_tag_refresh.md +4 -2
  184. package/skills/ae-analysis/references/user_tag_update.md +5 -1
  185. package/skills/ae-analysis/references/user_tag_update_id.md +2 -0
  186. package/skills/ae-analysis/references/virtual_event_create.md +22 -3
  187. package/skills/ae-analysis/references/virtual_property_create.md +23 -2
  188. package/skills/ae-analysis-global/SKILL.md +2 -0
  189. package/skills/ae-capability/SKILL.md +7 -5
  190. package/skills/ae-community/SKILL.md +72 -8
  191. package/skills/ae-community/references/community-chat-analysis.md +341 -0
  192. package/skills/ae-community/references/community-data-report.md +301 -0
  193. package/skills/ae-dataops/SKILL.md +2 -1
  194. package/skills/ae-engage/SKILL.md +204 -8
  195. package/skills/ae-engage/references/activity-activity-type.md +42 -0
  196. package/skills/ae-engage/references/activity-activity.md +70 -0
  197. package/skills/ae-engage/references/activity-approval.md +53 -0
  198. package/skills/ae-engage/references/activity-task.md +87 -0
  199. package/skills/ae-engage/references/activity-topic.md +98 -0
  200. package/skills/ae-engage/references/approval-approver-delete.md +26 -0
  201. package/skills/ae-engage/references/channel-test-send.md +37 -0
  202. package/skills/ae-engage/references/channel-touch-limits-batch-update.md +28 -0
  203. package/skills/ae-engage/references/channel-touch-limits-save.md +37 -0
  204. package/skills/ae-engage/references/channel-touch-limits-toggle.md +28 -0
  205. package/skills/ae-engage/references/channel-update-config.md +36 -0
  206. package/skills/ae-engage/references/client-param.md +58 -0
  207. package/skills/ae-engage/references/common-metric.md +75 -0
  208. package/skills/ae-engage/references/config-table.md +92 -0
  209. package/skills/ae-engage/references/engage-scene-config-item.md +69 -0
  210. package/skills/ae-engage/references/operation-log-query.md +1 -1
  211. package/skills/ae-engage/references/preset-event.md +42 -0
  212. package/skills/ae-engage/references/push-language.md +39 -0
  213. package/skills/ae-engage/references/scene-config-channel.md +58 -0
  214. package/skills/ae-engage/references/scene-config-group.md +62 -0
  215. package/skills/ae-engage/references/scene-config-item.md +68 -0
  216. package/skills/ae-engage/references/scene-config-metric.md +79 -0
  217. package/skills/ae-engage/references/scene-config-param.md +72 -0
  218. package/skills/ae-engage/references/scene-preset-metric.md +45 -0
  219. package/skills/ae-engage/references/scene-strategy.md +47 -0
  220. package/skills/ae-engage/references/scene-template.md +71 -0
  221. package/skills/ae-engage/references/{ops-delete.md → task-delete.md} +3 -3
  222. package/skills/ae-engage/references/whitelist.md +72 -0
  223. package/skills/ae-engage/references/workbench-workbench.md +48 -0
  224. package/skills/ae-generate-tracking-code/SKILL.md +4 -4
  225. package/skills/ae-generate-tracking-plan/SKILL.md +140 -16
  226. package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +98 -33
  227. package/skills/ae-generate-tracking-plan/references/te-api.md +1 -1
  228. package/skills/ae-generate-tracking-plan/references/xlsx-schema.md +16 -14
  229. package/skills/ae-kb/SKILL.md +36 -9
  230. package/skills/ae-metadata/SKILL.md +3 -2
  231. package/skills/ae-metadata/references/metadata_event_get.md +4 -4
  232. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
  233. package/skills/ae-metadata/references/metadata_property_get.md +4 -4
  234. package/skills/ae-team/SKILL.md +2 -1
  235. package/dist/chunk-NOO24N7W.js +0 -11
  236. package/dist/chunk-TNW2CI4W.js +0 -129
  237. package/dist/te-common-5NJLF3XG.js +0 -130
  238. package/dist/te-common-7VTJZPII.js +0 -130
  239. package/dist/te-community-PEZ2VEF7.js +0 -687
  240. package/dist/te-community-TSKJ652U.js +0 -687
  241. package/dist/te-engage-BUWVSSSK.js +0 -1912
  242. package/dist/te-engage-EPE3QKDE.js +0 -1912
  243. package/skills/ae-analysis/references/create_metric.md +0 -58
  244. package/skills/ae-analysis/references/create_virtual_event.md +0 -60
  245. package/skills/ae-analysis/references/create_virtual_property.md +0 -69
  246. package/skills/ae-analysis/references/delete_metric.md +0 -32
  247. package/skills/ae-analysis/references/drilldown_users_export.md +0 -17
  248. package/skills/ae-analysis/references/drilldown_users_run.md +0 -61
  249. package/skills/ae-analysis/references/get_metric.md +0 -38
  250. package/skills/ae-analysis/references/get_resource_url.md +0 -33
  251. package/skills/ae-analysis/references/list_events.md +0 -46
  252. package/skills/ae-analysis/references/list_metrics.md +0 -52
  253. package/skills/ae-analysis/references/list_properties.md +0 -47
  254. package/skills/ae-analysis/references/update_metric.md +0 -58
  255. package/dist/{chunk-HL2AJQ4Q.js → chunk-PTE56QPL.js} +3 -3
@@ -1,33 +1,37 @@
1
1
  import {
2
2
  createCapabilityCommand
3
- } from "./chunk-N2QORU5D.js";
3
+ } from "./chunk-ISY6HMHM.js";
4
4
  import {
5
5
  registerCapabilityGatewayRoute,
6
6
  resolveGatewayDomain
7
- } from "./chunk-HL2AJQ4Q.js";
7
+ } from "./chunk-PTE56QPL.js";
8
8
  import {
9
9
  CapabilityGatewayError,
10
10
  buildCapabilityGatewayUrl,
11
+ dryRunCapability,
12
+ executeCapabilityWithEnvelope,
11
13
  fetchCapabilityGateway,
12
14
  requestCapabilityGateway,
13
15
  requestCapabilityGatewayWithEnvelope,
14
- uploadInputFile
15
- } from "./chunk-DYOS6YY7.js";
16
+ uploadInputFile,
17
+ validateCapability
18
+ } from "./chunk-HQ2A7ITL.js";
16
19
  import {
17
20
  withOutputMetadata
18
- } from "./chunk-TNW2CI4W.js";
21
+ } from "./chunk-IMMGMU54.js";
19
22
  import {
20
23
  callMcpTool,
21
24
  parseMcpResult,
22
25
  resolveMcpUrl
23
- } from "./chunk-6LEYLOV3.js";
26
+ } from "./chunk-3P3562ZX.js";
24
27
  import {
25
28
  isGlobalQueryModeEnabled
26
- } from "./chunk-KGJQCYVC.js";
27
- import "./chunk-NOO24N7W.js";
28
- import "./chunk-2NDGFQHW.js";
29
- import "./chunk-AJTH7LT3.js";
30
- import "./chunk-YCLVYFK7.js";
29
+ } from "./chunk-LCXU3AAT.js";
30
+ import "./chunk-E7UXXHO3.js";
31
+ import "./chunk-IR4ZLVPW.js";
32
+ import "./chunk-V6FR6WTW.js";
33
+ import "./chunk-24BAVOX3.js";
34
+ import "./chunk-LYVNONC4.js";
31
35
 
32
36
  // src/commands/te-analysis/shared.ts
33
37
  function createMcpCommand(config) {
@@ -357,6 +361,7 @@ function dashboardReportDataInput(ctx) {
357
361
  filters: optionalJson(ctx, "filters"),
358
362
  start_time: optionalString2(ctx, "start-time"),
359
363
  end_time: optionalString2(ctx, "end-time"),
364
+ zone_offset: optionalNumber2(ctx, "zone-offset"),
360
365
  use_cache: optionalBoolean2(ctx, "use-cache"),
361
366
  request_id: optionalString2(ctx, "request-id"),
362
367
  timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
@@ -501,12 +506,24 @@ var metadataEventList = createAnalysisMetaCapabilityCommand({
501
506
  resource: "event",
502
507
  command: "list",
503
508
  capabilityId: "metadata.event.list",
504
- description: "List project super events.",
509
+ description: "List project events with optional search, field projection, pagination, and authentication filtering.",
505
510
  flags: [
506
- projectIdFlag
511
+ projectIdFlag,
512
+ queryFlag,
513
+ fieldsFlag,
514
+ limitFlag,
515
+ offsetFlag,
516
+ { name: "authenticated-only", type: "boolean", required: false, desc: "When true, return only authenticated events." }
507
517
  ],
508
518
  risk: "read",
509
- buildInput: projectInput
519
+ buildInput: (ctx) => compactInput({
520
+ ...projectInput(ctx),
521
+ query: optionalString2(ctx, "query"),
522
+ fields: optionalJson(ctx, "fields"),
523
+ limit: optionalNumber2(ctx, "limit"),
524
+ offset: optionalNumber2(ctx, "offset"),
525
+ authenticated_only: optionalBoolean2(ctx, "authenticated-only")
526
+ })
510
527
  });
511
528
 
512
529
  // src/commands/te-analysis/meta/event/get.ts
@@ -643,13 +660,30 @@ var metadataPropertyList = createAnalysisMetaCapabilityCommand({
643
660
  resource: "property",
644
661
  command: "list",
645
662
  capabilityId: "metadata.property.list",
646
- description: "List event or user properties.",
663
+ description: "List event or user properties with optional search, field projection, pagination, and authentication filtering.",
647
664
  flags: [
648
665
  projectIdFlag,
649
- { name: "table-type", type: "string", required: true, desc: "Property table type." }
666
+ { name: "table-type", type: "string", required: false, desc: "Optional property table type: event or user." },
667
+ { name: "scope", type: "string", required: false, desc: "Optional property scope: event or user." },
668
+ { name: "event-name", type: "string", required: false, desc: "Optional event name filter for event properties." },
669
+ queryFlag,
670
+ fieldsFlag,
671
+ limitFlag,
672
+ offsetFlag,
673
+ { name: "authenticated-only", type: "boolean", required: false, desc: "When true, return only authenticated properties." }
650
674
  ],
651
675
  risk: "read",
652
- buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type") })
676
+ buildInput: (ctx) => compactInput({
677
+ ...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"),
682
+ fields: optionalJson(ctx, "fields"),
683
+ limit: optionalNumber2(ctx, "limit"),
684
+ offset: optionalNumber2(ctx, "offset"),
685
+ authenticated_only: optionalBoolean2(ctx, "authenticated-only")
686
+ })
653
687
  });
654
688
 
655
689
  // src/commands/te-analysis/meta/property/get.ts
@@ -812,12 +846,42 @@ var metadataVirtualEventCreate = createAnalysisMetaCapabilityCommand({
812
846
  description: "Create a virtual event from events and filters.",
813
847
  flags: [
814
848
  projectIdFlag,
815
- requiredPayloadFlag,
849
+ payloadFlag,
850
+ { name: "event-name", type: "string", required: false, desc: "Virtual event name. Must start with 'ta@'." },
851
+ { name: "event-desc", type: "string", required: false, desc: "Virtual event display name." },
852
+ { 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." },
816
855
  { name: "override", type: "boolean", required: false, desc: "Whether to override an existing virtual event rule." }
817
856
  ],
818
857
  risk: "write",
819
- buildInput: (ctx) => compactInput({ ...projectInput(ctx), payload: ctx.json("payload"), override: optionalBoolean2(ctx, "override") })
858
+ buildInput: (ctx) => compactInput({
859
+ ...projectInput(ctx),
860
+ payload: virtualEventPayload(ctx),
861
+ override: optionalBoolean2(ctx, "override")
862
+ })
820
863
  });
864
+ function virtualEventPayload(ctx) {
865
+ const payload = optionalJson(ctx, "payload");
866
+ if (payload !== void 0) {
867
+ return payload;
868
+ }
869
+ const eventName = optionalString2(ctx, "event-name");
870
+ const eventDesc = optionalString2(ctx, "event-desc");
871
+ const events = optionalJson(ctx, "events");
872
+ if (eventName === void 0 || eventDesc === void 0 || events === void 0) {
873
+ throw new Error("Pass --payload, or pass --event-name, --event-desc, and --events");
874
+ }
875
+ return compactInput({
876
+ event_name: eventName,
877
+ event_desc: eventDesc,
878
+ remark: optionalString2(ctx, "remark"),
879
+ rule: compactInput({
880
+ events,
881
+ filter: optionalJson(ctx, "filter")
882
+ })
883
+ });
884
+ }
821
885
 
822
886
  // src/commands/te-analysis/meta/virtual-event/get.ts
823
887
  var metadataVirtualEventGet = createAnalysisMetaCapabilityCommand({
@@ -864,7 +928,12 @@ var metadataVirtualPropertyCreate = createAnalysisMetaCapabilityCommand({
864
928
  flags: [
865
929
  projectIdFlag,
866
930
  { name: "sql-expression", type: "string", required: true, desc: "SQL expression used to calculate the virtual property." },
867
- { name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with property.column_name/table_type/select_type fields." },
931
+ { name: "v-prop", type: "json", required: false, desc: "Virtual property JSON object with property.column_name/table_type/select_type fields." },
932
+ { name: "property-name", type: "string", required: false, desc: "Virtual property name. Must start with '#vp@'." },
933
+ { name: "property-desc", type: "string", required: false, desc: "Virtual property display name." },
934
+ { name: "table-type", type: "string", required: false, desc: "Property table type: event or user." },
935
+ { name: "select-type", type: "string", required: false, desc: "Property value type: string, number, bool, or datetime." },
936
+ { name: "property-remark", type: "string", required: false, desc: "Optional virtual property remark." },
868
937
  { name: "properties", type: "json", required: false, desc: "Dependent property JSON array." },
869
938
  { name: "sql-event-relation-type", type: "string", required: false, desc: "relation_default, relation_always, or relation_by_setting." },
870
939
  { name: "related-events", type: "json", required: false, desc: "Related events JSON array when using relation_by_setting." },
@@ -876,7 +945,7 @@ var metadataVirtualPropertyCreate = createAnalysisMetaCapabilityCommand({
876
945
  buildInput: (ctx) => compactInput({
877
946
  ...projectInput(ctx),
878
947
  sql_expression: ctx.str("sql-expression"),
879
- v_prop: ctx.json("v-prop"),
948
+ v_prop: virtualProperty(ctx),
880
949
  properties: optionalJson(ctx, "properties"),
881
950
  sql_event_relation_type: optionalString2(ctx, "sql-event-relation-type"),
882
951
  related_events: optionalJson(ctx, "related-events"),
@@ -885,6 +954,27 @@ var metadataVirtualPropertyCreate = createAnalysisMetaCapabilityCommand({
885
954
  replace_suggestion: optionalString2(ctx, "replace-suggestion")
886
955
  })
887
956
  });
957
+ function virtualProperty(ctx) {
958
+ const vProp = optionalJson(ctx, "v-prop");
959
+ if (vProp !== void 0) {
960
+ return vProp;
961
+ }
962
+ const propertyName = optionalString2(ctx, "property-name");
963
+ const tableType = optionalString2(ctx, "table-type");
964
+ const selectType = optionalString2(ctx, "select-type");
965
+ if (propertyName === void 0 || tableType === void 0 || selectType === void 0) {
966
+ throw new Error("Pass --v-prop, or pass --property-name, --table-type, and --select-type");
967
+ }
968
+ return {
969
+ property: compactInput({
970
+ column_name: propertyName,
971
+ column_desc: optionalString2(ctx, "property-desc"),
972
+ column_remark: optionalString2(ctx, "property-remark"),
973
+ table_type: tableType,
974
+ select_type: selectType
975
+ })
976
+ };
977
+ }
888
978
 
889
979
  // src/commands/te-analysis/meta/virtual-property/sql-rule-update.ts
890
980
  var metadataVirtualPropertySqlRuleUpdate = createAnalysisMetaCapabilityCommand({
@@ -945,13 +1035,26 @@ var metadataMetricList = createAnalysisMetaCapabilityCommand({
945
1035
  resource: "metric",
946
1036
  command: "list",
947
1037
  capabilityId: "metadata.metric.list",
948
- description: "List project metrics.",
1038
+ description: "List project metrics with optional search, projection, pagination, and authentication filtering.",
949
1039
  flags: [
950
1040
  projectIdFlag,
951
- { name: "ignore-authentication", type: "boolean", required: false, desc: "Whether to skip asset authentication status decoration." }
1041
+ { name: "ignore-authentication", type: "boolean", required: false, desc: "Whether to skip asset authentication status decoration." },
1042
+ queryFlag,
1043
+ fieldsFlag,
1044
+ limitFlag,
1045
+ offsetFlag,
1046
+ { name: "authenticated-only", type: "boolean", required: false, desc: "When true, return only authenticated metrics." }
952
1047
  ],
953
1048
  risk: "read",
954
- buildInput: (ctx) => compactInput({ ...projectInput(ctx), ignore_authentication: optionalBoolean2(ctx, "ignore-authentication") })
1049
+ buildInput: (ctx) => compactInput({
1050
+ ...projectInput(ctx),
1051
+ ignore_authentication: optionalBoolean2(ctx, "ignore-authentication"),
1052
+ query: optionalString2(ctx, "query"),
1053
+ fields: optionalJson(ctx, "fields"),
1054
+ limit: optionalNumber2(ctx, "limit"),
1055
+ offset: optionalNumber2(ctx, "offset"),
1056
+ authenticated_only: optionalBoolean2(ctx, "authenticated-only")
1057
+ })
955
1058
  });
956
1059
 
957
1060
  // src/commands/te-analysis/meta/metric/get.ts
@@ -968,6 +1071,39 @@ var metadataMetricGet = createAnalysisMetaCapabilityCommand({
968
1071
  buildInput: (ctx) => ({ ...projectInput(ctx), metric_id: ctx.num("metric-id") })
969
1072
  });
970
1073
 
1074
+ // src/commands/te-analysis/meta/metric/shared.ts
1075
+ function metricMode(ctx) {
1076
+ const mode = optionalNumber2(ctx, "metric-mode");
1077
+ const modelType = optionalString2(ctx, "model-type");
1078
+ const mapped = modelType === void 0 ? void 0 : modelTypeToMetricMode(modelType);
1079
+ if (mode === void 0 && mapped === void 0) {
1080
+ throw new Error("Pass one of --model-type or --metric-mode");
1081
+ }
1082
+ if (mode !== void 0 && mapped !== void 0 && mode !== mapped) {
1083
+ throw new Error("--metric-mode must match --model-type when both are provided");
1084
+ }
1085
+ return mode ?? mapped;
1086
+ }
1087
+ function optionalMetricMode(ctx) {
1088
+ const mode = optionalNumber2(ctx, "metric-mode");
1089
+ const modelType = optionalString2(ctx, "model-type");
1090
+ const mapped = modelType === void 0 ? void 0 : modelTypeToMetricMode(modelType);
1091
+ if (mode !== void 0 && mapped !== void 0 && mode !== mapped) {
1092
+ throw new Error("--metric-mode must match --model-type when both are provided");
1093
+ }
1094
+ return mode ?? mapped;
1095
+ }
1096
+ function modelTypeToMetricMode(modelType) {
1097
+ const normalized = modelType.trim().toLowerCase();
1098
+ if (normalized === "event") {
1099
+ return 0;
1100
+ }
1101
+ if (normalized === "retention") {
1102
+ return 1;
1103
+ }
1104
+ throw new Error("--model-type must be event or retention");
1105
+ }
1106
+
971
1107
  // src/commands/te-analysis/meta/metric/create.ts
972
1108
  var metadataMetricCreate = createAnalysisMetaCapabilityCommand({
973
1109
  resource: "metric",
@@ -979,7 +1115,8 @@ var metadataMetricCreate = createAnalysisMetaCapabilityCommand({
979
1115
  { name: "metric-name", type: "string", required: true, desc: "Metric technical name, for example pay_count." },
980
1116
  { name: "metric-desc", type: "string", required: true, desc: "Metric display name." },
981
1117
  { name: "metric-remark", type: "string", required: false, desc: "Metric remark." },
982
- { name: "metric-mode", type: "number", required: true, desc: "Metric model mode, for example 0 for event analysis." },
1118
+ { name: "metric-mode", type: "number", required: false, desc: "Metric model mode, for example 0 for event analysis." },
1119
+ { name: "model-type", type: "string", required: false, desc: "Semantic metric model type: event or retention. Prefer this over metric-mode." },
983
1120
  { name: "metric-events", type: "json", required: true, desc: "Metric event-analysis QP JSON array." },
984
1121
  { name: "metric-params", type: "json", required: false, desc: "Metric params JSON object. Defaults to {} in common when omitted." }
985
1122
  ],
@@ -989,7 +1126,7 @@ var metadataMetricCreate = createAnalysisMetaCapabilityCommand({
989
1126
  metric_name: ctx.str("metric-name"),
990
1127
  metric_desc: ctx.str("metric-desc"),
991
1128
  metric_remark: optionalString2(ctx, "metric-remark"),
992
- metric_mode: ctx.num("metric-mode"),
1129
+ metric_mode: metricMode(ctx),
993
1130
  metric_events: ctx.json("metric-events"),
994
1131
  metric_params: optionalJson(ctx, "metric-params")
995
1132
  })
@@ -1008,6 +1145,7 @@ var metadataMetricUpdate = createAnalysisMetaCapabilityCommand({
1008
1145
  { name: "metric-desc", type: "string", required: false, desc: "Metric display name." },
1009
1146
  { name: "metric-remark", type: "string", required: false, desc: "Metric remark." },
1010
1147
  { name: "metric-mode", type: "number", required: false, desc: "Metric model mode for full-definition update." },
1148
+ { name: "model-type", type: "string", required: false, desc: "Semantic metric model type: event or retention. Prefer this over metric-mode." },
1011
1149
  { name: "metric-events", type: "json", required: false, desc: "Metric event-analysis QP JSON array for full-definition update." },
1012
1150
  { name: "metric-params", type: "json", required: false, desc: "Metric params JSON object." }
1013
1151
  ],
@@ -1018,7 +1156,7 @@ var metadataMetricUpdate = createAnalysisMetaCapabilityCommand({
1018
1156
  metric_name: optionalString2(ctx, "metric-name"),
1019
1157
  metric_desc: optionalString2(ctx, "metric-desc"),
1020
1158
  metric_remark: optionalString2(ctx, "metric-remark"),
1021
- metric_mode: optionalNumber2(ctx, "metric-mode"),
1159
+ metric_mode: optionalMetricMode(ctx),
1022
1160
  metric_events: optionalJson(ctx, "metric-events"),
1023
1161
  metric_params: optionalJson(ctx, "metric-params")
1024
1162
  })
@@ -1199,6 +1337,27 @@ function assetGovernanceInput(ctx, fields) {
1199
1337
  return compactInput(input);
1200
1338
  }
1201
1339
 
1340
+ // src/core/resource-url.ts
1341
+ function normalizeResourceUrlFields(node, host) {
1342
+ if (!node || typeof node !== "object") return;
1343
+ const obj = node;
1344
+ for (const [key, value] of Object.entries(obj)) {
1345
+ if (typeof value === "string") {
1346
+ if (/url|link/i.test(key) || value.includes("/#/")) {
1347
+ obj[key] = absolutizeRelativeUrls(value, host);
1348
+ }
1349
+ } else if (value && typeof value === "object") {
1350
+ normalizeResourceUrlFields(value, host);
1351
+ }
1352
+ }
1353
+ }
1354
+ function absolutizeRelativeUrls(s, host) {
1355
+ const base = host.replace(/\/+$/, "");
1356
+ s = s.replace(/\]\((\/(?!\/)[^)]*)\)/g, `](${base}$1)`);
1357
+ if (/^\/(?!\/)/.test(s)) s = base + s;
1358
+ return s;
1359
+ }
1360
+
1202
1361
  // src/commands/te-analysis/meta/asset/url-get.ts
1203
1362
  var analysisMetaAssetUrlGet = createAnalysisMetaCapabilityCommand({
1204
1363
  resource: "asset",
@@ -1207,7 +1366,11 @@ var analysisMetaAssetUrlGet = createAnalysisMetaCapabilityCommand({
1207
1366
  description: "Get or normalize an asset governance resource link payload.",
1208
1367
  flags: [projectIdFlag, nodeIdFlag, resourceIdFlag, resourceTypeFlag, linkInfoFlag, payloadFlag],
1209
1368
  risk: "read",
1210
- buildInput: (ctx) => assetGovernanceInput(ctx, ["node_id", "resource_id", "resource_type", "link_info"])
1369
+ buildInput: (ctx) => assetGovernanceInput(ctx, ["node_id", "resource_id", "resource_type", "link_info"]),
1370
+ postProcess: (result, _input, ctx) => {
1371
+ normalizeResourceUrlFields(result, ctx.host());
1372
+ return result;
1373
+ }
1211
1374
  });
1212
1375
 
1213
1376
  // src/commands/te-analysis/meta/asset/index.ts
@@ -1748,7 +1911,7 @@ var REPORT_WRITE_MODEL_TYPE_VALUES = [
1748
1911
  "tag"
1749
1912
  ];
1750
1913
  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.`;
1751
- var AI_DEFINITION_DESCRIPTION = 'AI-facing model definition JSON. Do not pass raw QP, events, event_view, visual_view, or analysis_query. 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.';
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.';
1752
1915
  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.`;
1753
1916
  function aiModelTypeFlag(required) {
1754
1917
  return {
@@ -1880,6 +2043,7 @@ var commands12 = [
1880
2043
  var report_default = commands12;
1881
2044
 
1882
2045
  // src/commands/te-analysis/report-data/shared.ts
2046
+ var reportDataZoneOffsetDescription = "Query execution timezone. Omit it to match the report UI for the current user (user selection when available, otherwise project default). Use a fixed UTC offset from -12 through 14, or 99 for local-time mode with no conversion to one fixed UTC offset; 99 is not UTC+99. This is not persisted in the report definition.";
1883
2047
  function reportDataInput(ctx) {
1884
2048
  return compactInput({
1885
2049
  ...projectInput(ctx),
@@ -1921,7 +2085,7 @@ var reportDataRun = createAnalysisCapabilityCommand({
1921
2085
  { 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." },
1922
2086
  { 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." },
1923
2087
  { name: "time-granularity", type: "string", required: false, desc: "Non-SQL analysis-model time granularity override. SQL accepts only --sql-params." },
1924
- { name: "zone-offset", type: "number", required: false, desc: "Query execution timezone offset in hours. This is not persisted in the report definition." },
2088
+ { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
1925
2089
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
1926
2090
  syncLimitFlag,
1927
2091
  syncTimeoutSecondsFlag
@@ -1936,7 +2100,7 @@ var reportDataExport = createAnalysisCapabilityCommand({
1936
2100
  resource: "report-data",
1937
2101
  command: "export",
1938
2102
  capabilityId: "analysis.report_data.export",
1939
- description: `Submit report data as an asynchronous gzip artifact. Override contract: SQL uses only --sql-params; non-SQL analysis models use filters/group/time; tag uses its saved tag definition. Mixed-model batches are best-effort. The submit response and artifact metadata line contain query_context_id when Redis context creation succeeds. ${analysisDataExportRoutingHelp}`,
2103
+ description: `Submit report data as an asynchronous gzip artifact. Override contract: SQL uses only --sql-params; non-SQL analysis models use filters/group/time; tag uses its saved tag definition. Mixed-model batches are best-effort. Exports do not create interactive drilldown contexts. ${analysisDataExportRoutingHelp}`,
1940
2104
  flags: [
1941
2105
  projectIdFlag,
1942
2106
  { name: "report-ids", type: "json", required: true, desc: "Report ID array. With overrides, prefer one model per batch so every field has the same meaning." },
@@ -1947,7 +2111,7 @@ var reportDataExport = createAnalysisCapabilityCommand({
1947
2111
  { name: "start-time", type: "string", required: false, desc: "Non-SQL analysis-model date override start, yyyy-MM-dd. SQL dates use --sql-params." },
1948
2112
  { name: "end-time", type: "string", required: false, desc: "Non-SQL analysis-model date override end, yyyy-MM-dd. SQL dates use --sql-params." },
1949
2113
  { name: "time-granularity", type: "string", required: false, desc: "Non-SQL analysis-model time granularity override. SQL accepts only --sql-params." },
1950
- { name: "zone-offset", type: "number", required: false, desc: "Query execution timezone offset in hours. This is not persisted in the report definition." },
2114
+ { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
1951
2115
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
1952
2116
  artifactFormatFlag,
1953
2117
  asyncTimeoutSecondsFlag
@@ -2076,10 +2240,10 @@ var dashboardCreate = createAnalysisCapabilityCommand({
2076
2240
  resource: "dashboard",
2077
2241
  command: "create",
2078
2242
  capabilityId: "analysis.dashboard.create",
2079
- description: "Create a dashboard in personal space, project space, or a folder.",
2243
+ description: "Create an analysis board backed by saved reports. This is not a BI dashboard.",
2080
2244
  flags: [
2081
2245
  projectIdFlag,
2082
- { name: "dashboard-name", type: "string", required: true, desc: "Dashboard name." },
2246
+ { name: "dashboard-name", type: "string", required: true, desc: "Analysis board name." },
2083
2247
  { name: "space-id", type: "number", required: false, desc: "Target project space ID. Omit for personal space." },
2084
2248
  { name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
2085
2249
  { name: "initial-report-id", type: "number", required: false, desc: "Optional report ID to add when creating the dashboard." },
@@ -2349,6 +2513,7 @@ var dashboardReportDataRun = createAnalysisCapabilityCommand({
2349
2513
  { 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." },
2350
2514
  { name: "start-time", type: "string", required: false, desc: "Optional start date/time. SQL reports ignore it and produce data.warnings." },
2351
2515
  { name: "end-time", type: "string", required: false, desc: "Optional end date/time. SQL reports ignore it and produce data.warnings." },
2516
+ { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
2352
2517
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
2353
2518
  { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
2354
2519
  dashboardSyncTimeoutSecondsFlag,
@@ -2364,7 +2529,7 @@ var dashboardReportDataExport = createAnalysisCapabilityCommand({
2364
2529
  resource: "dashboard-report-data",
2365
2530
  command: "export",
2366
2531
  capabilityId: "analysis.dashboard_report_data.export",
2367
- description: `Submit dashboard report data as an asynchronous gzip JSONL artifact. Filters and time overrides do not apply to SQL reports; the artifact still contains data plus structured warnings. The submit response and artifact metadata line contain query_context_id when Redis context creation succeeds. ${analysisDataExportRoutingHelp}`,
2532
+ description: `Submit dashboard report data as an asynchronous gzip JSONL artifact. Filters and time overrides do not apply to SQL reports; the artifact still contains data plus structured warnings. Exports do not create interactive drilldown contexts. ${analysisDataExportRoutingHelp}`,
2368
2533
  flags: [
2369
2534
  projectIdFlag,
2370
2535
  { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
@@ -2372,6 +2537,7 @@ var dashboardReportDataExport = createAnalysisCapabilityCommand({
2372
2537
  { 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." },
2373
2538
  { name: "start-time", type: "string", required: false, desc: "Optional start date/time. SQL reports ignore it and the artifact includes warnings." },
2374
2539
  { name: "end-time", type: "string", required: false, desc: "Optional end date/time. SQL reports ignore it and the artifact includes warnings." },
2540
+ { name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
2375
2541
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
2376
2542
  { name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
2377
2543
  asyncTimeoutSecondsFlag,
@@ -2406,17 +2572,23 @@ var queryCancel = createAnalysisCapabilityCommand({
2406
2572
  });
2407
2573
 
2408
2574
  // src/commands/te-analysis/query/shared.ts
2409
- var targetFlag = {
2410
- name: "target",
2575
+ var sourceFlag = {
2576
+ name: "source",
2577
+ type: "json",
2578
+ required: false,
2579
+ desc: "Source selector copied from sources[] when the synchronous preview contains multiple reports or charts. Pass only returned selector fields such as report_id or chart_id."
2580
+ };
2581
+ var coordinateFlag = {
2582
+ name: "coordinate",
2411
2583
  type: "json",
2412
2584
  required: true,
2413
- desc: "Use only when the upstream availability flag is true. Pass sources[].target_contract.default_target directly, or copy it and replace only named machine fields for a specific result; never infer from display text or raw QP."
2585
+ desc: "One semantic cell coordinate assembled only from the selected source.drilldown row_options, column_options, and metric_options. Never pass target_id, raw QP, or values absent from the synchronous preview."
2414
2586
  };
2415
2587
  var propertiesFlag = {
2416
2588
  name: "properties",
2417
2589
  type: "json",
2418
2590
  required: false,
2419
- desc: "Optional backend property request object array. Omit for defaults; do not pass string-name arrays."
2591
+ desc: "Optional property projection object array using exact columnName and named tableType values (event or user). Subject-specific support and mandatory identity columns are documented by each command; do not pass string-name arrays."
2420
2592
  };
2421
2593
  var useCacheFlag = {
2422
2594
  name: "use-cache",
@@ -2427,7 +2599,8 @@ var useCacheFlag = {
2427
2599
  function createResultClusterInput(ctx) {
2428
2600
  return compactInput({
2429
2601
  query_context_id: ctx.str("query-context-id"),
2430
- target: ctx.json("target"),
2602
+ source: optionalJson(ctx, "source"),
2603
+ coordinate: ctx.json("coordinate"),
2431
2604
  cluster_name: ctx.str("cluster-name"),
2432
2605
  display_name: optionalString2(ctx, "display-name"),
2433
2606
  zone_offset: optionalNumber2(ctx, "zone-offset"),
@@ -2441,12 +2614,28 @@ var queryCreateResultCluster = createAnalysisCapabilityCommand({
2441
2614
  resource: "query",
2442
2615
  command: "create-result-cluster",
2443
2616
  capabilityId: "analysis.query.create_result_cluster",
2444
- description: "Create a reusable result cluster from users matched by a target in a previous analysis data query context. Works after adhoc, report-data, and dashboard-report-data run/export. Do not pass raw QP.",
2617
+ 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.",
2445
2618
  flags: [
2446
- { name: "query-context-id", type: "string", required: true, desc: "query_context_id returned by an analysis data run/export." },
2447
- targetFlag,
2448
- { name: "cluster-name", type: "string", required: true, desc: "Unique result cluster name. Use letters, digits, and underscores." },
2449
- { name: "display-name", type: "string", required: false, desc: "Optional result cluster display name." },
2619
+ { name: "query-context-id", type: "string", required: true, desc: "query_context_id returned by a synchronous analysis preview. Never use an export response." },
2620
+ sourceFlag,
2621
+ coordinateFlag,
2622
+ {
2623
+ name: "cluster-name",
2624
+ type: "string",
2625
+ required: true,
2626
+ minLength: 1,
2627
+ maxLength: 24,
2628
+ pattern: "^[a-z][a-z0-9_]*$",
2629
+ desc: "Unique result cluster name. Must start with a lowercase letter, contain only lowercase letters, digits, and underscores, and be at most 24 characters."
2630
+ },
2631
+ {
2632
+ name: "display-name",
2633
+ type: "string",
2634
+ required: false,
2635
+ minLength: 1,
2636
+ maxLength: 80,
2637
+ desc: "Optional result cluster display name. Maximum: 80 characters."
2638
+ },
2450
2639
  { name: "zone-offset", type: "number", required: false, desc: "Optional timezone offset. UTC+8 is 8; UTC-5 is -5." },
2451
2640
  requestIdFlag,
2452
2641
  timeoutSecondsFlag
@@ -2598,7 +2787,7 @@ var zoneOffsetFlag2 = {
2598
2787
  name: "zone-offset",
2599
2788
  type: "number",
2600
2789
  required: false,
2601
- desc: "Optional timezone offset. UTC+8 is 8; UTC-5 is -5."
2790
+ desc: "Optional timezone mode. Fixed UTC offsets are -12..14; 99 means stored local time without fixed UTC conversion (not UTC+99). Omit to use the project analysis default."
2602
2791
  };
2603
2792
  function adhocRunInput(ctx) {
2604
2793
  return compactInput({
@@ -2662,7 +2851,7 @@ var adhocExport = createAnalysisCapabilityCommand({
2662
2851
  resource: "adhoc",
2663
2852
  command: "export",
2664
2853
  capabilityId: "analysis.adhoc.export",
2665
- description: `Submit one unified ad-hoc analysis export from an AI-facing model definition. Returns run_id/artifact_id plus the actual format, compression, file_name, content_type, and content_encoding; the artifact-format flag selects logical rows, not compression. The submit response and artifact metadata line contain query_context_id when Redis context creation succeeds. ${analysisDataExportRoutingHelp}`,
2854
+ description: `Submit one unified ad-hoc analysis export from an AI-facing model definition. Returns run_id/artifact_id plus the actual format, compression, file_name, content_type, and content_encoding. Exports do not create interactive drilldown contexts. ${analysisDataExportRoutingHelp}`,
2666
2855
  flags: [
2667
2856
  ...adhocExportFlags
2668
2857
  ],
@@ -2755,7 +2944,12 @@ function dailyReportFlags(update) {
2755
2944
  { name: "enable-wx", type: "boolean", required: false, desc: `Whether to send by WeCom webhook.${falseDefault}` },
2756
2945
  { name: "wx-url", type: "json", required: false, desc: 'WeCom webhook URL array, e.g. ["https://..."].' },
2757
2946
  { name: "enable-feishu", type: "boolean", required: false, desc: `Whether to send by Feishu webhook.${falseDefault}` },
2758
- { name: "feishu-info", type: "json", required: false, desc: 'Feishu config object, e.g. {"webhook":["https://..."]}.' },
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
+ },
2759
2953
  { name: "enable-kim", type: "boolean", required: false, desc: `Whether to send by KIM/custom webhook.${falseDefault}` },
2760
2954
  { name: "kim-url", type: "json", required: false, desc: 'KIM/custom webhook URL array, e.g. ["https://..."].' },
2761
2955
  { name: "enable-slack", type: "boolean", required: false, desc: `Whether to send by Slack webhook.${falseDefault}` },
@@ -2882,10 +3076,10 @@ var biPanelCreate = createAnalysisCapabilityCommand({
2882
3076
  resource: "bi-panel",
2883
3077
  command: "create",
2884
3078
  capabilityId: "analysis.bi_panel.create",
2885
- description: "Create a BI panel.",
3079
+ description: "Create a BI dashboard with worksheets, charts, and pages.",
2886
3080
  flags: [
2887
3081
  projectIdFlag,
2888
- { name: "panel-name", type: "string", required: false, desc: "BI panel name." },
3082
+ { name: "panel-name", type: "string", required: false, desc: "BI dashboard name." },
2889
3083
  { name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID." },
2890
3084
  { name: "space-id", type: "number", required: false, desc: "Target project space ID." },
2891
3085
  { name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
@@ -3045,7 +3239,7 @@ var biPanelPageDataRun = createAnalysisCapabilityCommand({
3045
3239
  resource: "bi-panel-page-data",
3046
3240
  command: "run",
3047
3241
  capabilityId: "analysis.bi_panel_page_data.run",
3048
- description: `Run a bounded BI panel page data query and return inline JSON. Chart results may include query_context_id; BI SQL chart contexts are not model-drilldown contexts unless drilldown_available=true. ${analysisDataRunRoutingHelp}`,
3242
+ description: `Run a bounded BI panel page data query and return inline JSON. BI SQL chart data does not support analysis model drilldown or result-cluster creation. ${analysisDataRunRoutingHelp}`,
3049
3243
  flags: [
3050
3244
  projectIdFlag,
3051
3245
  { name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
@@ -3075,7 +3269,7 @@ var biPanelPageDataExport = createAnalysisCapabilityCommand({
3075
3269
  resource: "bi-panel-page-data",
3076
3270
  command: "export",
3077
3271
  capabilityId: "analysis.bi_panel_page_data.export",
3078
- description: `Submit a BI panel page data query as an asynchronous gzip JSONL artifact. Chart exports may include query_context_id metadata; BI SQL chart contexts are not model-drilldown contexts unless drilldown_available=true. ${analysisDataExportRoutingHelp}`,
3272
+ description: `Submit a BI panel page data query as an asynchronous gzip JSONL artifact. BI SQL chart exports do not create analysis drilldown contexts. ${analysisDataExportRoutingHelp}`,
3079
3273
  flags: [
3080
3274
  projectIdFlag,
3081
3275
  { name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
@@ -3454,7 +3648,7 @@ var entityDetailDefinitionFlag = {
3454
3648
  name: "definition",
3455
3649
  type: "json",
3456
3650
  required: true,
3457
- desc: 'Bounded entity detail definition: {"entity":"user","cohort":{"relation":"and","items":[{"field":{"name":"level","type":"user_property"},"operator":"gte","values":[1]}]},"properties":["#user_id",{"name":"country","type":"user_property"}],"sort":[{"field":"#user_id","order":"asc"}]}. cohort is AI-facing for user_property/tag/cluster filters; do not pass raw QP at the capability top level.'
3651
+ desc: 'Bounded entity detail definition. properties is supported only for entity="user" (#user_id); user rows always include #user_id, #account_id, and #distinct_id plus requested user properties. Custom entities reject properties and return only their entity value column. cohort is AI-facing for user_property/tag/cluster filters; do not pass raw QP.'
3458
3652
  };
3459
3653
  function entityDetailRunInput(ctx) {
3460
3654
  return compactInput({
@@ -3527,44 +3721,130 @@ var commands34 = [
3527
3721
  ];
3528
3722
  var entity_detail_default = commands34;
3529
3723
 
3530
- // src/commands/te-analysis/drilldown-users/shared.ts
3724
+ // src/commands/te-analysis/drilldown-events/shared.ts
3531
3725
  var queryContextIdFlag = {
3532
3726
  name: "query-context-id",
3533
3727
  type: "string",
3534
3728
  required: true,
3535
- desc: "query_context_id returned by an analysis data run/export."
3729
+ desc: "query_context_id returned by a synchronous event-analysis preview. Analysis exports never create one."
3536
3730
  };
3537
- var jsonlArtifactFormatFlag = {
3731
+ var drilldownEventsRunFlags = [
3732
+ queryContextIdFlag,
3733
+ sourceFlag,
3734
+ coordinateFlag,
3735
+ propertiesFlag,
3736
+ requestIdFlag,
3737
+ useCacheFlag,
3738
+ detailPreviewLimitFlag,
3739
+ syncTimeoutSecondsFlag
3740
+ ];
3741
+ var csvArtifactFormatFlag = {
3538
3742
  name: "artifact-format",
3539
3743
  type: "string",
3540
3744
  required: false,
3541
- desc: "Artifact format. Only jsonl is supported."
3745
+ desc: "Artifact format. Only csv is supported; the downloaded artifact is csv.gz."
3542
3746
  };
3543
- var drilldownUsersBaseFlags = [
3747
+ var drilldownEventsExportFlags = [
3544
3748
  queryContextIdFlag,
3545
- targetFlag,
3749
+ sourceFlag,
3750
+ coordinateFlag,
3751
+ propertiesFlag,
3752
+ requestIdFlag,
3753
+ useCacheFlag,
3754
+ csvArtifactFormatFlag,
3755
+ asyncTimeoutSecondsFlag
3756
+ ];
3757
+ function drilldownEventsRunInput(ctx) {
3758
+ return compactInput({
3759
+ query_context_id: ctx.str("query-context-id"),
3760
+ source: optionalJson(ctx, "source"),
3761
+ coordinate: ctx.json("coordinate"),
3762
+ 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")
3767
+ });
3768
+ }
3769
+ function drilldownEventsExportInput(ctx) {
3770
+ return compactInput({
3771
+ query_context_id: ctx.str("query-context-id"),
3772
+ source: optionalJson(ctx, "source"),
3773
+ coordinate: ctx.json("coordinate"),
3774
+ 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")
3779
+ });
3780
+ }
3781
+
3782
+ // src/commands/te-analysis/drilldown-events/export.ts
3783
+ var drilldownEventsExport = createAnalysisCapabilityCommand({
3784
+ resource: "drilldown-events",
3785
+ command: "export",
3786
+ capabilityId: "analysis.query.drilldown_events_export",
3787
+ description: `Stream all raw events behind one synchronous event-analysis cell into one csv.gz artifact. ${analysisDataExportRoutingHelp}`,
3788
+ flags: [...drilldownEventsExportFlags],
3789
+ risk: "read",
3790
+ buildInput: drilldownEventsExportInput
3791
+ });
3792
+
3793
+ // src/commands/te-analysis/drilldown-events/run.ts
3794
+ var drilldownEventsRun = createAnalysisCapabilityCommand({
3795
+ resource: "drilldown-events",
3796
+ command: "run",
3797
+ capabilityId: "analysis.query.drilldown_events",
3798
+ description: `Preview raw events behind one synchronous event-analysis cell whose selected metric advertises drilldown_events. ${analysisDataRunRoutingHelp}`,
3799
+ flags: [...drilldownEventsRunFlags],
3800
+ risk: "read",
3801
+ buildInput: drilldownEventsRunInput,
3802
+ postProcess: applyAnalysisInlineLimit
3803
+ });
3804
+
3805
+ // src/commands/te-analysis/drilldown-events/index.ts
3806
+ var commands35 = [drilldownEventsRun, drilldownEventsExport];
3807
+ var drilldown_events_default = commands35;
3808
+
3809
+ // src/commands/te-analysis/drilldown-entities/shared.ts
3810
+ var queryContextIdFlag2 = {
3811
+ name: "query-context-id",
3812
+ type: "string",
3813
+ required: true,
3814
+ desc: "query_context_id returned by a synchronous analysis preview. Analysis exports never create one."
3815
+ };
3816
+ var csvArtifactFormatFlag2 = {
3817
+ name: "artifact-format",
3818
+ type: "string",
3819
+ required: false,
3820
+ desc: "Artifact format. Only csv is supported; the downloaded artifact is csv.gz."
3821
+ };
3822
+ var drilldownEntitiesBaseFlags = [
3823
+ queryContextIdFlag2,
3824
+ sourceFlag,
3825
+ coordinateFlag,
3546
3826
  propertiesFlag,
3547
3827
  requestIdFlag,
3548
3828
  useCacheFlag
3549
3829
  ];
3550
- var drilldownUsersRunFlags = [
3551
- ...drilldownUsersBaseFlags,
3830
+ var drilldownEntitiesRunFlags = [
3831
+ ...drilldownEntitiesBaseFlags,
3552
3832
  detailPreviewLimitFlag,
3553
3833
  syncTimeoutSecondsFlag
3554
3834
  ];
3555
- var drilldownUsersExportFlags = [
3556
- ...drilldownUsersBaseFlags,
3557
- jsonlArtifactFormatFlag,
3835
+ var drilldownEntitiesExportFlags = [
3836
+ ...drilldownEntitiesBaseFlags,
3837
+ csvArtifactFormatFlag2,
3558
3838
  asyncTimeoutSecondsFlag
3559
3839
  ];
3560
- function drilldownUsersRunInput(ctx) {
3840
+ function drilldownEntitiesRunInput(ctx) {
3561
3841
  return compactInput({
3562
3842
  ...baseInput(ctx),
3563
3843
  limit: optionalNumber2(ctx, "limit"),
3564
3844
  timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
3565
3845
  });
3566
3846
  }
3567
- function drilldownUsersExportInput(ctx) {
3847
+ function drilldownEntitiesExportInput(ctx) {
3568
3848
  return compactInput({
3569
3849
  ...baseInput(ctx),
3570
3850
  format: optionalString2(ctx, "artifact-format"),
@@ -3574,52 +3854,53 @@ function drilldownUsersExportInput(ctx) {
3574
3854
  function baseInput(ctx) {
3575
3855
  return {
3576
3856
  query_context_id: ctx.str("query-context-id"),
3577
- target: ctx.json("target"),
3857
+ source: optionalJson(ctx, "source"),
3858
+ coordinate: ctx.json("coordinate"),
3578
3859
  properties: optionalJson(ctx, "properties"),
3579
3860
  request_id: optionalString2(ctx, "request-id"),
3580
3861
  use_cache: optionalBoolean2(ctx, "use-cache")
3581
3862
  };
3582
3863
  }
3583
3864
 
3584
- // src/commands/te-analysis/drilldown-users/export.ts
3585
- var drilldownUsersExport = createAnalysisCapabilityCommand({
3586
- resource: "drilldown-users",
3865
+ // src/commands/te-analysis/drilldown-entities/export.ts
3866
+ var drilldownEntitiesExport = createAnalysisCapabilityCommand({
3867
+ resource: "drilldown-entities",
3587
3868
  command: "export",
3588
- capabilityId: "analysis.query.drilldown_users.export",
3589
- description: `Export users from a previous analysis query context as a jsonl artifact. ${analysisDataExportRoutingHelp}`,
3590
- flags: [...drilldownUsersExportFlags],
3869
+ capabilityId: "analysis.query.drilldown_entities_export",
3870
+ description: `Stream all users or custom entities behind one synchronous-preview cell into one csv.gz artifact. ${analysisDataExportRoutingHelp}`,
3871
+ flags: [...drilldownEntitiesExportFlags],
3591
3872
  risk: "read",
3592
- buildInput: drilldownUsersExportInput
3873
+ buildInput: drilldownEntitiesExportInput
3593
3874
  });
3594
3875
 
3595
- // src/commands/te-analysis/drilldown-users/run.ts
3596
- var drilldownUsersRun = createAnalysisCapabilityCommand({
3597
- resource: "drilldown-users",
3876
+ // src/commands/te-analysis/drilldown-entities/run.ts
3877
+ var drilldownEntitiesRun = createAnalysisCapabilityCommand({
3878
+ resource: "drilldown-entities",
3598
3879
  command: "run",
3599
- capabilityId: "analysis.query.drilldown_users",
3600
- description: `Preview users from a previous analysis query context. Do not pass raw QP. ${analysisDataRunRoutingHelp}`,
3601
- flags: [...drilldownUsersRunFlags],
3880
+ capabilityId: "analysis.query.drilldown_entities",
3881
+ description: `Preview users or custom entities behind one synchronous-preview cell whose metric advertises drilldown_entities. ${analysisDataRunRoutingHelp}`,
3882
+ flags: [...drilldownEntitiesRunFlags],
3602
3883
  risk: "read",
3603
- buildInput: drilldownUsersRunInput,
3884
+ buildInput: drilldownEntitiesRunInput,
3604
3885
  postProcess: applyAnalysisInlineLimit
3605
3886
  });
3606
3887
 
3607
- // src/commands/te-analysis/drilldown-users/index.ts
3608
- var commands35 = [drilldownUsersRun, drilldownUsersExport];
3609
- var drilldown_users_default = commands35;
3888
+ // src/commands/te-analysis/drilldown-entities/index.ts
3889
+ var commands36 = [drilldownEntitiesRun, drilldownEntitiesExport];
3890
+ var drilldown_entities_default = commands36;
3610
3891
 
3611
3892
  // src/commands/te-analysis/drilldown-user-events/shared.ts
3612
3893
  var drilldownContextIdFlag = {
3613
3894
  name: "drilldown-context-id",
3614
3895
  type: "string",
3615
3896
  required: true,
3616
- desc: "drilldown_context_id returned by analysis drilldown-users run."
3897
+ desc: "drilldown_context_id returned by analysis drilldown-entities run for the user subject. Custom entities have no user event sequence."
3617
3898
  };
3618
3899
  var userIdFlag = {
3619
3900
  name: "user-id",
3620
3901
  type: "string",
3621
3902
  required: true,
3622
- desc: "User ID returned by analysis drilldown-users run/export."
3903
+ desc: "Canonical user_id returned by analysis drilldown-entities run. Never guess or substitute another identity field."
3623
3904
  };
3624
3905
  var sequenceFlags = [
3625
3906
  propertiesFlag,
@@ -3629,11 +3910,11 @@ var sequenceFlags = [
3629
3910
  { name: "time-filter-before-nums", type: "number", required: false, desc: "Optional events before the time filter point." },
3630
3911
  { name: "time-filter-after-nums", type: "number", required: false, desc: "Optional events after the time filter point." }
3631
3912
  ];
3632
- var jsonlArtifactFormatFlag2 = {
3913
+ var csvArtifactFormatFlag3 = {
3633
3914
  name: "artifact-format",
3634
3915
  type: "string",
3635
3916
  required: false,
3636
- desc: "Artifact format. Only jsonl is supported."
3917
+ desc: "Artifact format. Only csv is supported; the downloaded artifact is csv.gz."
3637
3918
  };
3638
3919
  var drilldownUserEventsBaseFlags = [
3639
3920
  drilldownContextIdFlag,
@@ -3649,7 +3930,7 @@ var drilldownUserEventsRunFlags = [
3649
3930
  ];
3650
3931
  var drilldownUserEventsExportFlags = [
3651
3932
  ...drilldownUserEventsBaseFlags,
3652
- jsonlArtifactFormatFlag2,
3933
+ csvArtifactFormatFlag3,
3653
3934
  asyncTimeoutSecondsFlag
3654
3935
  ];
3655
3936
  function drilldownUserEventsRunInput(ctx) {
@@ -3685,8 +3966,8 @@ function baseInput2(ctx) {
3685
3966
  var drilldownUserEventsExport = createAnalysisCapabilityCommand({
3686
3967
  resource: "drilldown-user-events",
3687
3968
  command: "export",
3688
- capabilityId: "analysis.query.drilldown_user_events.export",
3689
- description: `Export one user's event sequence from a drilldown context as a jsonl artifact. ${analysisDataExportRoutingHelp}`,
3969
+ capabilityId: "analysis.query.drilldown_user_events_export",
3970
+ description: `Stream one user's complete event sequence from a drilldown context into one csv.gz artifact. ${analysisDataExportRoutingHelp}`,
3690
3971
  flags: [...drilldownUserEventsExportFlags],
3691
3972
  risk: "read",
3692
3973
  buildInput: drilldownUserEventsExportInput
@@ -3705,8 +3986,8 @@ var drilldownUserEventsRun = createAnalysisCapabilityCommand({
3705
3986
  });
3706
3987
 
3707
3988
  // src/commands/te-analysis/drilldown-user-events/index.ts
3708
- var commands36 = [drilldownUserEventsRun, drilldownUserEventsExport];
3709
- var drilldown_user_events_default = commands36;
3989
+ var commands37 = [drilldownUserEventsRun, drilldownUserEventsExport];
3990
+ var drilldown_user_events_default = commands37;
3710
3991
 
3711
3992
  // src/commands/te-analysis/user/index.ts
3712
3993
  import { existsSync, statSync } from "fs";
@@ -3716,6 +3997,10 @@ var authenticatedOnlyFlag = {
3716
3997
  required: false,
3717
3998
  desc: "Return only resources whose metadata can be resolved under the current identity."
3718
3999
  };
4000
+ var AUDIENCE_NAME_PATTERN = "^[a-zA-Z][a-zA-Z0-9_]*$";
4001
+ var AUDIENCE_NAME_MAX_LENGTH = 80;
4002
+ var AUDIENCE_DISPLAY_NAME_MAX_LENGTH = 80;
4003
+ var AUDIENCE_REMARK_MAX_LENGTH = 400;
3719
4004
  var tagListFieldsFlag = {
3720
4005
  ...fieldsFlag,
3721
4006
  desc: "Optional tag inventory projection. Use tag_name, display_name, users_num, and other tag fields. cluster_name is reserved for user clusters and is rejected here."
@@ -3734,22 +4019,38 @@ var clusterNameFlag = {
3734
4019
  required: true,
3735
4020
  desc: "Exact cluster_name. Discover real values with analysis user-cluster list first."
3736
4021
  };
4022
+ var newClusterNameFlag = {
4023
+ ...clusterNameFlag,
4024
+ minLength: 1,
4025
+ maxLength: AUDIENCE_NAME_MAX_LENGTH,
4026
+ pattern: AUDIENCE_NAME_PATTERN,
4027
+ desc: "New cluster_name. Must start with a letter, contain only letters, digits, and underscores, and be at most 80 characters."
4028
+ };
3737
4029
  var tagNameFlag = {
3738
4030
  name: "tag-name",
3739
4031
  type: "string",
3740
4032
  required: true,
3741
4033
  desc: "Exact tag_name. Discover real values with analysis user-tag list first."
3742
4034
  };
4035
+ var newTagNameFlag = {
4036
+ ...tagNameFlag,
4037
+ minLength: 1,
4038
+ maxLength: AUDIENCE_NAME_MAX_LENGTH,
4039
+ pattern: AUDIENCE_NAME_PATTERN,
4040
+ desc: "New tag_name. Must start with a letter, contain only letters, digits, and underscores, and be at most 80 characters."
4041
+ };
3743
4042
  var displayNameFlag = {
3744
4043
  name: "display-name",
3745
4044
  type: "string",
3746
4045
  required: true,
3747
- desc: "Human-readable display name."
4046
+ minLength: 1,
4047
+ maxLength: AUDIENCE_DISPLAY_NAME_MAX_LENGTH,
4048
+ desc: "Human-readable display name. Maximum: 80 characters."
3748
4049
  };
3749
4050
  var optionalDisplayNameFlag = {
3750
4051
  ...displayNameFlag,
3751
4052
  required: false,
3752
- desc: "Optional new display name."
4053
+ desc: "Optional new display name. Maximum: 80 characters."
3753
4054
  };
3754
4055
  var clusterDefinitionRequestFlag = {
3755
4056
  name: "definition-request",
@@ -3822,13 +4123,15 @@ var remarksFlag = {
3822
4123
  name: "remarks",
3823
4124
  type: "string",
3824
4125
  required: false,
3825
- desc: "Optional remarks."
4126
+ maxLength: AUDIENCE_REMARK_MAX_LENGTH,
4127
+ desc: "Optional remarks. Maximum: 400 characters."
3826
4128
  };
3827
4129
  var remarkFlag = {
3828
4130
  name: "remark",
3829
4131
  type: "string",
3830
4132
  required: false,
3831
- desc: "Optional new remark."
4133
+ maxLength: AUDIENCE_REMARK_MAX_LENGTH,
4134
+ desc: "Optional new remark. Maximum: 400 characters."
3832
4135
  };
3833
4136
  var propertyNamesFlag = {
3834
4137
  name: "property-names",
@@ -3842,7 +4145,7 @@ var snapshotDateFlag = {
3842
4145
  required: false,
3843
4146
  desc: "Optional tag snapshot date, yyyy-MM-dd."
3844
4147
  };
3845
- var jsonlArtifactFormatFlag3 = {
4148
+ var jsonlArtifactFormatFlag = {
3846
4149
  name: "artifact-format",
3847
4150
  type: "string",
3848
4151
  required: false,
@@ -3872,7 +4175,7 @@ var groupColFlag = {
3872
4175
  required: true,
3873
4176
  desc: "Exact statistic value or bucket from history-tag-data results to drill down into."
3874
4177
  };
3875
- function capability(resource, command, capabilityId, description, flags, risk, buildInput) {
4178
+ function capability(resource, command, capabilityId, description, flags, risk, buildInput2) {
3876
4179
  return createAnalysisCapabilityCommand({
3877
4180
  resource,
3878
4181
  command,
@@ -3880,7 +4183,7 @@ function capability(resource, command, capabilityId, description, flags, risk, b
3880
4183
  description,
3881
4184
  flags,
3882
4185
  risk,
3883
- buildInput
4186
+ buildInput: buildInput2
3884
4187
  });
3885
4188
  }
3886
4189
  function idImportCapability(command) {
@@ -4101,10 +4404,10 @@ var memberExportFlags = (memberFieldsFlag) => [
4101
4404
  queryFlag,
4102
4405
  { name: "use-cache", type: "boolean", required: false, desc: "Whether to use query cache. Default: true." },
4103
4406
  requestIdFlag,
4104
- jsonlArtifactFormatFlag3,
4407
+ jsonlArtifactFormatFlag,
4105
4408
  asyncTimeoutSecondsFlag
4106
4409
  ];
4107
- var commands37 = [
4410
+ var commands38 = [
4108
4411
  capability("user-cluster", "list", "analysis.user_cluster.list", "List user clusters for discovery. Use offset only for stable asset browsing.", listFlags, "read", assetListInput),
4109
4412
  capability("user-cluster", "get", "analysis.user_cluster.get", "Get user cluster details by exact cluster_name values.", [
4110
4413
  projectIdFlag,
@@ -4123,7 +4426,7 @@ var commands37 = [
4123
4426
  ], "read", (ctx) => memberInput(ctx, "cluster", false)),
4124
4427
  capability("user-cluster", "create", "analysis.user_cluster.create", "Create a condition or SQL user cluster directly from an AI-facing definition request.", [
4125
4428
  projectIdFlag,
4126
- clusterNameFlag,
4429
+ newClusterNameFlag,
4127
4430
  displayNameFlag,
4128
4431
  clusterDefinitionRequestFlag,
4129
4432
  authenticatedOnlyFlag,
@@ -4141,7 +4444,7 @@ var commands37 = [
4141
4444
  ], "write", (ctx) => clusterWriteInput(ctx, false)),
4142
4445
  idImportCapability(capability("user-cluster", "create-id", "analysis.user_cluster.create_id", "Create a cluster by mapping imported values to an analysis entity.", [
4143
4446
  projectIdFlag,
4144
- { ...clusterNameFlag, required: false, desc: "Optional cluster_name; generated if omitted." },
4447
+ { ...newClusterNameFlag, required: false, desc: "Optional cluster_name; generated if omitted. When provided, it must satisfy the 1-80 character machine-name contract." },
4145
4448
  displayNameFlag,
4146
4449
  requiredEntityIdFlag,
4147
4450
  inputFileIdFlag,
@@ -4191,7 +4494,7 @@ var commands37 = [
4191
4494
  ], "read", (ctx) => memberInput(ctx, "tag", false)),
4192
4495
  capability("user-tag", "create", "analysis.user_tag.create", "Create a user tag directly from an AI-facing definition request.", [
4193
4496
  projectIdFlag,
4194
- tagNameFlag,
4497
+ newTagNameFlag,
4195
4498
  displayNameFlag,
4196
4499
  tagDefinitionRequestFlag,
4197
4500
  authenticatedOnlyFlag,
@@ -4213,7 +4516,7 @@ var commands37 = [
4213
4516
  ], "write", (ctx) => ({ project_id: ctx.num("project-id"), tag_name: ctx.str("tag-name") })),
4214
4517
  idImportCapability(capability("user-tag", "create-id", "analysis.user_tag.create_id", "Create a tag by mapping imported values to an analysis entity.", [
4215
4518
  projectIdFlag,
4216
- { ...tagNameFlag, required: false, desc: "Optional tag_name; generated if omitted." },
4519
+ { ...newTagNameFlag, required: false, desc: "Optional tag_name; generated if omitted. When provided, it must satisfy the 1-80 character machine-name contract." },
4217
4520
  displayNameFlag,
4218
4521
  requiredEntityIdFlag,
4219
4522
  inputFileIdFlag,
@@ -4290,7 +4593,7 @@ var commands37 = [
4290
4593
  tagNameFlag,
4291
4594
  historyViewFlag,
4292
4595
  requestIdFlag,
4293
- jsonlArtifactFormatFlag3,
4596
+ jsonlArtifactFormatFlag,
4294
4597
  asyncTimeoutSecondsFlag
4295
4598
  ], "read", (ctx) => historyTagDataInput(ctx, false)),
4296
4599
  capability("history-tag-data-drilldown", "run", "analysis.history_tag_data_drilldown.run", `Run a bounded drilldown user query for one history tag statistic value. ${analysisDataRunRoutingHelp}`, [
@@ -4308,7 +4611,7 @@ var commands37 = [
4308
4611
  ...memberExportFlags(tagMemberFieldsFlag)
4309
4612
  ], "read", (ctx) => historyTagDataDrilldownInput(ctx, false))
4310
4613
  ];
4311
- var user_default = commands37;
4614
+ var user_default = commands38;
4312
4615
 
4313
4616
  // src/commands/te-analysis/global/list-query-clusters.ts
4314
4617
  var listQueryClusters = createMcpCommand({
@@ -4324,10 +4627,10 @@ var listQueryClusters = createMcpCommand({
4324
4627
  });
4325
4628
 
4326
4629
  // src/commands/te-analysis/global/index.ts
4327
- var commands38 = [
4630
+ var commands39 = [
4328
4631
  listQueryClusters
4329
4632
  ];
4330
- var global_default = commands38;
4633
+ var global_default = commands39;
4331
4634
 
4332
4635
  // src/commands/te-analysis/sql-table/columns.ts
4333
4636
  var sqlTableColumns = createAnalysisCapabilityCommand({
@@ -4371,8 +4674,8 @@ var sqlTableList = createAnalysisCapabilityCommand({
4371
4674
  });
4372
4675
 
4373
4676
  // src/commands/te-analysis/sql-table/index.ts
4374
- var commands39 = [sqlTableList, sqlTableColumns];
4375
- var sql_table_default = commands39;
4677
+ var commands40 = [sqlTableList, sqlTableColumns];
4678
+ var sql_table_default = commands40;
4376
4679
 
4377
4680
  // src/commands/te-analysis/entity/id-import-options.ts
4378
4681
  var entityIdImportOptions = createAnalysisCapabilityCommand({
@@ -4397,8 +4700,8 @@ var entityIdImportOptions = createAnalysisCapabilityCommand({
4397
4700
  });
4398
4701
 
4399
4702
  // src/commands/te-analysis/entity/index.ts
4400
- var commands40 = [entityIdImportOptions];
4401
- var entity_default = commands40;
4703
+ var commands41 = [entityIdImportOptions];
4704
+ var entity_default = commands41;
4402
4705
 
4403
4706
  // src/commands/te-analysis/input-file/inspect.ts
4404
4707
  var inputFileInspect = {
@@ -4481,11 +4784,1776 @@ var inputFileUpload = {
4481
4784
  };
4482
4785
 
4483
4786
  // src/commands/te-analysis/input-file/index.ts
4484
- var commands41 = [inputFileUpload, inputFileInspect, inputFilePurposeList];
4485
- var input_file_default = commands41;
4787
+ var commands42 = [inputFileUpload, inputFileInspect, inputFilePurposeList];
4788
+ var input_file_default = commands42;
4789
+
4790
+ // src/commands/te-analysis/project/access-detail/get.ts
4791
+ var projectAccessDetailGet = createAnalysisCapabilityCommand({
4792
+ resource: "project access-detail",
4793
+ command: "get",
4794
+ capabilityId: "project.access_detail.get",
4795
+ description: "Get company project access details.",
4796
+ flags: [
4797
+ { name: "company-id", type: "number", required: true, desc: "Company ID." }
4798
+ ],
4799
+ risk: "read",
4800
+ buildInput: (ctx) => compactInput({
4801
+ company_id: ctx.num("company-id")
4802
+ })
4803
+ });
4804
+
4805
+ // src/commands/te-analysis/project/access-detail/index.ts
4806
+ var commands43 = [
4807
+ projectAccessDetailGet
4808
+ ];
4809
+ var access_detail_default = commands43;
4810
+
4811
+ // src/commands/te-analysis/project/data-power/delete.ts
4812
+ var projectDataPowerDelete = createAnalysisCapabilityCommand({
4813
+ resource: "project data-power",
4814
+ command: "delete",
4815
+ capabilityId: "project.data_power.delete",
4816
+ description: "Delete a data power and optionally migrate users to another data power.",
4817
+ flags: [
4818
+ projectIdFlag,
4819
+ { name: "data-power-id", type: "number", required: true, desc: "Data power ID to delete." },
4820
+ { name: "new-data-power-id", type: "number", required: false, desc: "Optional replacement data power ID for affected users." }
4821
+ ],
4822
+ risk: "high-risk-write",
4823
+ buildInput: (ctx) => compactInput({
4824
+ project_id: ctx.num("project-id"),
4825
+ data_power_id: ctx.num("data-power-id"),
4826
+ new_data_power_id: optionalNumber2(ctx, "new-data-power-id"),
4827
+ yes: true
4828
+ })
4829
+ });
4830
+
4831
+ // src/commands/te-analysis/project/data-power/get.ts
4832
+ var projectDataPowerGet = createAnalysisCapabilityCommand({
4833
+ resource: "project data-power",
4834
+ command: "get",
4835
+ capabilityId: "project.data_power.get",
4836
+ description: "Get one data power detail.",
4837
+ flags: [
4838
+ projectIdFlag,
4839
+ { name: "data-power-id", type: "number", required: true, desc: "Data power ID." }
4840
+ ],
4841
+ risk: "read",
4842
+ buildInput: (ctx) => compactInput({
4843
+ project_id: ctx.num("project-id"),
4844
+ data_power_id: ctx.num("data-power-id")
4845
+ })
4846
+ });
4847
+
4848
+ // src/commands/te-analysis/project/data-power/list.ts
4849
+ var projectDataPowerList = createAnalysisCapabilityCommand({
4850
+ resource: "project data-power",
4851
+ command: "list",
4852
+ capabilityId: "project.data_power.list",
4853
+ description: "List project data powers.",
4854
+ flags: [
4855
+ projectIdFlag
4856
+ ],
4857
+ risk: "read",
4858
+ buildInput: (ctx) => compactInput({
4859
+ project_id: ctx.num("project-id")
4860
+ })
4861
+ });
4862
+
4863
+ // src/commands/te-analysis/project/data-power/upsert.ts
4864
+ var projectDataPowerUpsert = createAnalysisCapabilityCommand({
4865
+ resource: "project data-power",
4866
+ command: "upsert",
4867
+ capabilityId: "project.data_power.upsert",
4868
+ description: "Create or update a data power.",
4869
+ flags: [
4870
+ projectIdFlag,
4871
+ requiredPayloadFlag
4872
+ ],
4873
+ risk: "write",
4874
+ buildInput: (ctx) => compactInput({
4875
+ project_id: ctx.num("project-id"),
4876
+ payload: ctx.json("payload")
4877
+ })
4878
+ });
4879
+
4880
+ // src/commands/te-analysis/project/data-power/index.ts
4881
+ var commands44 = [
4882
+ projectDataPowerDelete,
4883
+ projectDataPowerGet,
4884
+ projectDataPowerList,
4885
+ projectDataPowerUpsert
4886
+ ];
4887
+ var data_power_default = commands44;
4888
+
4889
+ // src/commands/te-analysis/project/entity/create.ts
4890
+ var projectEntityCreate = createAnalysisCapabilityCommand({
4891
+ resource: "project entity",
4892
+ command: "create",
4893
+ capabilityId: "project.entity.create",
4894
+ description: "Create an analysis entity.",
4895
+ flags: [
4896
+ projectIdFlag,
4897
+ { name: "entity-name", type: "string", required: true, desc: "Entity display name." },
4898
+ { name: "column-name", type: "string", required: true, desc: "Property column name to bind." },
4899
+ { name: "table-type", type: "number", required: true, desc: "Main table type: 0 for event property, 1 for user property." },
4900
+ { name: "order", type: "number", required: false, desc: "Optional entity display order." }
4901
+ ],
4902
+ risk: "write",
4903
+ buildInput: (ctx) => compactInput({
4904
+ project_id: ctx.num("project-id"),
4905
+ entity_name: ctx.str("entity-name"),
4906
+ column_name: ctx.str("column-name"),
4907
+ table_type: ctx.num("table-type"),
4908
+ order: optionalNumber2(ctx, "order")
4909
+ })
4910
+ });
4911
+
4912
+ // src/commands/te-analysis/project/entity/delete.ts
4913
+ var projectEntityDelete = createAnalysisCapabilityCommand({
4914
+ resource: "project entity",
4915
+ command: "delete",
4916
+ capabilityId: "project.entity.delete",
4917
+ description: "Delete an analysis entity.",
4918
+ flags: [
4919
+ projectIdFlag,
4920
+ { name: "entity-id", type: "number", required: true, desc: "Analysis entity ID." }
4921
+ ],
4922
+ risk: "high-risk-write",
4923
+ buildInput: (ctx) => compactInput({
4924
+ project_id: ctx.num("project-id"),
4925
+ entity_id: ctx.num("entity-id"),
4926
+ yes: true
4927
+ })
4928
+ });
4929
+
4930
+ // src/commands/te-analysis/project/entity/get.ts
4931
+ var projectEntityGet = createAnalysisCapabilityCommand({
4932
+ resource: "project entity",
4933
+ command: "get",
4934
+ capabilityId: "project.entity.get",
4935
+ description: "Get one analysis entity.",
4936
+ flags: [
4937
+ projectIdFlag,
4938
+ { name: "entity-id", type: "number", required: true, desc: "Analysis entity ID." }
4939
+ ],
4940
+ risk: "read",
4941
+ buildInput: (ctx) => compactInput({
4942
+ project_id: ctx.num("project-id"),
4943
+ entity_id: ctx.num("entity-id")
4944
+ })
4945
+ });
4946
+
4947
+ // src/commands/te-analysis/project/entity/list.ts
4948
+ var projectEntityList = createAnalysisCapabilityCommand({
4949
+ resource: "project entity",
4950
+ command: "list",
4951
+ capabilityId: "project.entity.list",
4952
+ description: "List analysis entities in a project.",
4953
+ flags: [
4954
+ projectIdFlag,
4955
+ queryFlag,
4956
+ fieldsFlag,
4957
+ limitFlag,
4958
+ offsetFlag,
4959
+ { name: "event-name", type: "string", required: false, desc: "Optional event name. When present, return entities related to the event." }
4960
+ ],
4961
+ risk: "read",
4962
+ buildInput: (ctx) => compactInput({
4963
+ project_id: ctx.num("project-id"),
4964
+ query: optionalString2(ctx, "query"),
4965
+ fields: optionalJson(ctx, "fields"),
4966
+ limit: optionalNumber2(ctx, "limit"),
4967
+ offset: optionalNumber2(ctx, "offset"),
4968
+ event_name: optionalString2(ctx, "event-name")
4969
+ })
4970
+ });
4971
+
4972
+ // src/commands/te-analysis/project/entity/update.ts
4973
+ var projectEntityUpdate = createAnalysisCapabilityCommand({
4974
+ resource: "project entity",
4975
+ command: "update",
4976
+ capabilityId: "project.entity.update",
4977
+ description: "Update an analysis entity.",
4978
+ flags: [
4979
+ projectIdFlag,
4980
+ { name: "entity-id", type: "number", required: true, desc: "Analysis entity ID." },
4981
+ { name: "entity-name", type: "string", required: true, desc: "Entity display name." },
4982
+ { name: "column-name", type: "string", required: true, desc: "Property column name to bind." },
4983
+ { name: "table-type", type: "number", required: true, desc: "Main table type: 0 for event property, 1 for user property." },
4984
+ { name: "order", type: "number", required: false, desc: "Optional entity display order." }
4985
+ ],
4986
+ risk: "write",
4987
+ buildInput: (ctx) => compactInput({
4988
+ project_id: ctx.num("project-id"),
4989
+ entity_id: ctx.num("entity-id"),
4990
+ entity_name: ctx.str("entity-name"),
4991
+ column_name: ctx.str("column-name"),
4992
+ table_type: ctx.num("table-type"),
4993
+ order: optionalNumber2(ctx, "order")
4994
+ })
4995
+ });
4996
+
4997
+ // src/commands/te-analysis/project/entity/index.ts
4998
+ var commands45 = [
4999
+ projectEntityCreate,
5000
+ projectEntityDelete,
5001
+ projectEntityGet,
5002
+ projectEntityList,
5003
+ projectEntityUpdate
5004
+ ];
5005
+ var entity_default2 = commands45;
5006
+
5007
+ // src/commands/te-analysis/project/entity-event/list.ts
5008
+ var projectEntityEventList = createAnalysisCapabilityCommand({
5009
+ resource: "project entity-event",
5010
+ command: "list",
5011
+ capabilityId: "project.entity_event.list",
5012
+ description: "List entity mappings for events.",
5013
+ flags: [
5014
+ projectIdFlag,
5015
+ { name: "event-names", type: "json", required: false, desc: "Optional event names JSON array to resolve entity mappings for." }
5016
+ ],
5017
+ risk: "read",
5018
+ buildInput: (ctx) => compactInput({
5019
+ project_id: ctx.num("project-id"),
5020
+ event_names: optionalJson(ctx, "event-names")
5021
+ })
5022
+ });
5023
+
5024
+ // src/commands/te-analysis/project/entity-event/index.ts
5025
+ var commands46 = [
5026
+ projectEntityEventList
5027
+ ];
5028
+ var entity_event_default = commands46;
5029
+
5030
+ // src/commands/te-analysis/project/function/list.ts
5031
+ var projectFunctionList = createAnalysisCapabilityCommand({
5032
+ resource: "project function",
5033
+ command: "list",
5034
+ capabilityId: "project.function.list",
5035
+ description: "List all project-level functions.",
5036
+ flags: [
5037
+ { name: "company-id", type: "number", required: false, desc: "Company ID." },
5038
+ projectIdFlag
5039
+ ],
5040
+ risk: "read",
5041
+ buildInput: (ctx) => compactInput({
5042
+ company_id: optionalNumber2(ctx, "company-id"),
5043
+ project_id: ctx.num("project-id")
5044
+ })
5045
+ });
5046
+
5047
+ // src/commands/te-analysis/project/function/index.ts
5048
+ var commands47 = [
5049
+ projectFunctionList
5050
+ ];
5051
+ var function_default = commands47;
5052
+
5053
+ // src/commands/te-analysis/project/info/get.ts
5054
+ var projectInfoGet = createAnalysisCapabilityCommand({
5055
+ resource: "project info",
5056
+ command: "get",
5057
+ capabilityId: "project.info.get",
5058
+ description: "Get project configuration details.",
5059
+ flags: [
5060
+ projectIdFlag
5061
+ ],
5062
+ risk: "read",
5063
+ buildInput: (ctx) => compactInput({
5064
+ project_id: ctx.num("project-id")
5065
+ })
5066
+ });
5067
+
5068
+ // src/commands/te-analysis/project/info/list.ts
5069
+ var projectInfoList = createAnalysisCapabilityCommand({
5070
+ resource: "project info",
5071
+ command: "list",
5072
+ capabilityId: "project.info.list",
5073
+ description: "List projects accessible to the current user.",
5074
+ flags: [
5075
+ queryFlag,
5076
+ fieldsFlag,
5077
+ limitFlag,
5078
+ offsetFlag
5079
+ ],
5080
+ risk: "read",
5081
+ buildInput: (ctx) => compactInput({
5082
+ query: optionalString2(ctx, "query"),
5083
+ fields: optionalJson(ctx, "fields"),
5084
+ limit: optionalNumber2(ctx, "limit"),
5085
+ offset: optionalNumber2(ctx, "offset")
5086
+ })
5087
+ });
5088
+
5089
+ // src/commands/te-analysis/project/info/update.ts
5090
+ var projectInfoUpdate = createAnalysisCapabilityCommand({
5091
+ resource: "project info",
5092
+ command: "update",
5093
+ capabilityId: "project.info.update",
5094
+ description: "Update project name and remark.",
5095
+ flags: [
5096
+ projectIdFlag,
5097
+ { name: "project-name", type: "string", required: true, desc: "New project name." },
5098
+ { name: "project-remark", type: "string", required: false, desc: "Optional project remark." }
5099
+ ],
5100
+ risk: "write",
5101
+ buildInput: (ctx) => compactInput({
5102
+ project_id: ctx.num("project-id"),
5103
+ project_name: ctx.str("project-name"),
5104
+ project_remark: optionalString2(ctx, "project-remark")
5105
+ })
5106
+ });
5107
+
5108
+ // src/commands/te-analysis/project/info/index.ts
5109
+ var commands48 = [
5110
+ projectInfoGet,
5111
+ projectInfoList,
5112
+ projectInfoUpdate
5113
+ ];
5114
+ var info_default = commands48;
5115
+
5116
+ // src/commands/te-analysis/project/mark-time/create.ts
5117
+ var projectMarkTimeCreate = createAnalysisCapabilityCommand({
5118
+ resource: "project mark-time",
5119
+ command: "create",
5120
+ capabilityId: "project.mark_time.create",
5121
+ description: "Create a project date marker.",
5122
+ flags: [
5123
+ projectIdFlag,
5124
+ { name: "marked-at", type: "string", required: true, desc: "Marker timestamp, for example yyyy-MM-dd HH:mm." },
5125
+ { name: "zone-offset", type: "number", required: false, desc: "Marker time zone offset." },
5126
+ { name: "content", type: "string", required: true, desc: "Marker content." },
5127
+ { name: "is-visible", type: "number", required: false, desc: "Whether the marker is visible. 1 visible, 0 hidden." }
5128
+ ],
5129
+ risk: "write",
5130
+ buildInput: (ctx) => compactInput({
5131
+ project_id: ctx.num("project-id"),
5132
+ marked_at: ctx.str("marked-at"),
5133
+ zone_offset: optionalNumber2(ctx, "zone-offset"),
5134
+ content: ctx.str("content"),
5135
+ is_visible: optionalNumber2(ctx, "is-visible")
5136
+ })
5137
+ });
5138
+
5139
+ // src/commands/te-analysis/project/mark-time/delete.ts
5140
+ var projectMarkTimeDelete = createAnalysisCapabilityCommand({
5141
+ resource: "project mark-time",
5142
+ command: "delete",
5143
+ capabilityId: "project.mark_time.delete",
5144
+ description: "Delete project date markers.",
5145
+ flags: [
5146
+ projectIdFlag,
5147
+ { name: "mark-time-ids", type: "json", required: true, desc: "Date marker IDs JSON array to delete." }
5148
+ ],
5149
+ risk: "high-risk-write",
5150
+ buildInput: (ctx) => compactInput({
5151
+ project_id: ctx.num("project-id"),
5152
+ mark_time_ids: ctx.json("mark-time-ids"),
5153
+ yes: true
5154
+ })
5155
+ });
5156
+
5157
+ // src/commands/te-analysis/project/mark-time/list.ts
5158
+ var projectMarkTimeList = createAnalysisCapabilityCommand({
5159
+ resource: "project mark-time",
5160
+ command: "list",
5161
+ capabilityId: "project.mark_time.list",
5162
+ description: "List project date markers.",
5163
+ flags: [
5164
+ projectIdFlag,
5165
+ queryFlag,
5166
+ fieldsFlag,
5167
+ limitFlag,
5168
+ offsetFlag,
5169
+ { name: "zone-offset", type: "number", required: false, desc: "Dashboard locked time zone offset." }
5170
+ ],
5171
+ risk: "read",
5172
+ buildInput: (ctx) => compactInput({
5173
+ project_id: ctx.num("project-id"),
5174
+ query: optionalString2(ctx, "query"),
5175
+ fields: optionalJson(ctx, "fields"),
5176
+ limit: optionalNumber2(ctx, "limit"),
5177
+ offset: optionalNumber2(ctx, "offset"),
5178
+ zone_offset: optionalNumber2(ctx, "zone-offset")
5179
+ })
5180
+ });
5181
+
5182
+ // src/commands/te-analysis/project/mark-time/update.ts
5183
+ var projectMarkTimeUpdate = createAnalysisCapabilityCommand({
5184
+ resource: "project mark-time",
5185
+ command: "update",
5186
+ capabilityId: "project.mark_time.update",
5187
+ description: "Update a project date marker.",
5188
+ flags: [
5189
+ projectIdFlag,
5190
+ { name: "mark-time-id", type: "number", required: true, desc: "Date marker ID." },
5191
+ { name: "marked-at", type: "string", required: true, desc: "Marker timestamp, for example yyyy-MM-dd HH:mm." },
5192
+ { name: "zone-offset", type: "number", required: false, desc: "Marker time zone offset." },
5193
+ { name: "content", type: "string", required: true, desc: "Marker content." },
5194
+ { name: "is-visible", type: "number", required: false, desc: "Whether the marker is visible. 1 visible, 0 hidden." }
5195
+ ],
5196
+ risk: "write",
5197
+ buildInput: (ctx) => compactInput({
5198
+ project_id: ctx.num("project-id"),
5199
+ mark_time_id: ctx.num("mark-time-id"),
5200
+ marked_at: ctx.str("marked-at"),
5201
+ zone_offset: optionalNumber2(ctx, "zone-offset"),
5202
+ content: ctx.str("content"),
5203
+ is_visible: optionalNumber2(ctx, "is-visible")
5204
+ })
5205
+ });
5206
+
5207
+ // src/commands/te-analysis/project/mark-time/index.ts
5208
+ var commands49 = [
5209
+ projectMarkTimeCreate,
5210
+ projectMarkTimeDelete,
5211
+ projectMarkTimeList,
5212
+ projectMarkTimeUpdate
5213
+ ];
5214
+ var mark_time_default = commands49;
5215
+
5216
+ // src/commands/te-analysis/project/member/add.ts
5217
+ var projectMemberAdd = createAnalysisCapabilityCommand({
5218
+ resource: "project member",
5219
+ command: "add",
5220
+ capabilityId: "project.member.add",
5221
+ description: "Add project members.",
5222
+ flags: [
5223
+ projectIdFlag,
5224
+ requiredPayloadFlag,
5225
+ { name: "type", type: "string", required: true, desc: "Add type accepted by ProjMemberAddTypeEnum." }
5226
+ ],
5227
+ risk: "write",
5228
+ buildInput: (ctx) => compactInput({
5229
+ project_id: ctx.num("project-id"),
5230
+ payload: ctx.json("payload"),
5231
+ type: ctx.str("type")
5232
+ })
5233
+ });
5234
+
5235
+ // src/commands/te-analysis/project/member/batch-update.ts
5236
+ var projectMemberBatchUpdate = createAnalysisCapabilityCommand({
5237
+ resource: "project member",
5238
+ command: "batch-update",
5239
+ capabilityId: "project.member.batch_update",
5240
+ description: "Batch update project members.",
5241
+ flags: [
5242
+ projectIdFlag,
5243
+ requiredPayloadFlag
5244
+ ],
5245
+ risk: "write",
5246
+ buildInput: (ctx) => compactInput({
5247
+ project_id: ctx.num("project-id"),
5248
+ payload: ctx.json("payload")
5249
+ })
5250
+ });
5251
+
5252
+ // src/commands/te-analysis/project/member/import.ts
5253
+ var projectMemberImport = createAnalysisCapabilityCommand({
5254
+ resource: "project member",
5255
+ command: "import",
5256
+ capabilityId: "project.member.import",
5257
+ description: "Import members and roles from another project.",
5258
+ flags: [
5259
+ projectIdFlag,
5260
+ { name: "source-project-id", type: "number", required: true, desc: "Project ID to import members from." }
5261
+ ],
5262
+ risk: "high-risk-write",
5263
+ buildInput: (ctx) => compactInput({
5264
+ project_id: ctx.num("project-id"),
5265
+ source_project_id: ctx.num("source-project-id"),
5266
+ yes: true
5267
+ })
5268
+ });
5269
+
5270
+ // src/commands/te-analysis/project/member/list.ts
5271
+ var projectMemberList = createAnalysisCapabilityCommand({
5272
+ resource: "project member",
5273
+ command: "list",
5274
+ capabilityId: "project.member.list",
5275
+ description: "List project members.",
5276
+ flags: [
5277
+ projectIdFlag
5278
+ ],
5279
+ risk: "read",
5280
+ buildInput: (ctx) => compactInput({
5281
+ project_id: ctx.num("project-id")
5282
+ })
5283
+ });
5284
+
5285
+ // src/commands/te-analysis/project/member/remove.ts
5286
+ var projectMemberRemove = createAnalysisCapabilityCommand({
5287
+ resource: "project member",
5288
+ command: "remove",
5289
+ capabilityId: "project.member.remove",
5290
+ description: "Remove a project member and optionally hand over assets.",
5291
+ flags: [
5292
+ projectIdFlag,
5293
+ requiredPayloadFlag,
5294
+ { name: "from-open-id", type: "string", required: true, desc: "Open ID of the member to remove." }
5295
+ ],
5296
+ risk: "high-risk-write",
5297
+ buildInput: (ctx) => compactInput({
5298
+ project_id: ctx.num("project-id"),
5299
+ payload: ctx.json("payload"),
5300
+ from_open_id: ctx.str("from-open-id"),
5301
+ yes: true
5302
+ })
5303
+ });
5304
+
5305
+ // src/commands/te-analysis/project/member/update.ts
5306
+ var projectMemberUpdate = createAnalysisCapabilityCommand({
5307
+ resource: "project member",
5308
+ command: "update",
5309
+ capabilityId: "project.member.update",
5310
+ description: "Update one project member.",
5311
+ flags: [
5312
+ projectIdFlag,
5313
+ requiredPayloadFlag,
5314
+ { name: "target-user-id", type: "number", required: true, desc: "Target user ID." }
5315
+ ],
5316
+ risk: "write",
5317
+ buildInput: (ctx) => compactInput({
5318
+ project_id: ctx.num("project-id"),
5319
+ payload: ctx.json("payload"),
5320
+ target_user_id: ctx.num("target-user-id")
5321
+ })
5322
+ });
5323
+
5324
+ // src/commands/te-analysis/project/member/index.ts
5325
+ var commands50 = [
5326
+ projectMemberAdd,
5327
+ projectMemberBatchUpdate,
5328
+ projectMemberImport,
5329
+ projectMemberList,
5330
+ projectMemberRemove,
5331
+ projectMemberUpdate
5332
+ ];
5333
+ var member_default = commands50;
5334
+
5335
+ // src/commands/te-analysis/project/member-candidate/list.ts
5336
+ var projectMemberCandidateList = createAnalysisCapabilityCommand({
5337
+ resource: "project member-candidate",
5338
+ command: "list",
5339
+ capabilityId: "project.member_candidate.list",
5340
+ description: "List candidate users and role/data-power options for adding project members.",
5341
+ flags: [
5342
+ projectIdFlag,
5343
+ { name: "type", type: "string", required: true, desc: "Add type accepted by ProjMemberAddTypeEnum." },
5344
+ { name: "login-names", type: "string", required: false, desc: "Comma-separated login names when checking new users." }
5345
+ ],
5346
+ risk: "read",
5347
+ buildInput: (ctx) => compactInput({
5348
+ project_id: ctx.num("project-id"),
5349
+ type: ctx.str("type"),
5350
+ login_names: optionalString2(ctx, "login-names")
5351
+ })
5352
+ });
5353
+
5354
+ // src/commands/te-analysis/project/member-candidate/index.ts
5355
+ var commands51 = [
5356
+ projectMemberCandidateList
5357
+ ];
5358
+ var member_candidate_default = commands51;
5359
+
5360
+ // src/commands/te-analysis/project/member-handover/export.ts
5361
+ var projectMemberHandoverExport = createAnalysisCapabilityCommand({
5362
+ resource: "project member-handover",
5363
+ command: "export",
5364
+ capabilityId: "project.member_handover.export",
5365
+ description: "Run batch project member asset handover and export the generated detail file as a CLI artifact.",
5366
+ flags: [
5367
+ projectIdFlag,
5368
+ requiredPayloadFlag,
5369
+ requestIdFlag
5370
+ ],
5371
+ risk: "high-risk-write",
5372
+ buildInput: (ctx) => compactInput({
5373
+ project_id: ctx.num("project-id"),
5374
+ payload: ctx.json("payload"),
5375
+ request_id: optionalString2(ctx, "request-id"),
5376
+ yes: true
5377
+ })
5378
+ });
5379
+
5380
+ // src/commands/te-analysis/project/member-handover/run.ts
5381
+ var projectMemberHandoverRun = createAnalysisCapabilityCommand({
5382
+ resource: "project member-handover",
5383
+ command: "run",
5384
+ capabilityId: "project.member_handover.run",
5385
+ description: "Run project member asset handover.",
5386
+ flags: [
5387
+ projectIdFlag,
5388
+ requiredPayloadFlag
5389
+ ],
5390
+ risk: "write",
5391
+ buildInput: (ctx) => compactInput({
5392
+ project_id: ctx.num("project-id"),
5393
+ payload: ctx.json("payload")
5394
+ })
5395
+ });
5396
+
5397
+ // src/commands/te-analysis/project/member-handover/index.ts
5398
+ var commands52 = [
5399
+ projectMemberHandoverExport,
5400
+ projectMemberHandoverRun
5401
+ ];
5402
+ var member_handover_default = commands52;
5403
+
5404
+ // src/commands/te-analysis/project/member-receiver/list.ts
5405
+ var projectMemberReceiverList = createAnalysisCapabilityCommand({
5406
+ resource: "project member-receiver",
5407
+ command: "list",
5408
+ capabilityId: "project.member_receiver.list",
5409
+ description: "List project member handover receivers.",
5410
+ flags: [
5411
+ projectIdFlag
5412
+ ],
5413
+ risk: "read",
5414
+ buildInput: (ctx) => compactInput({
5415
+ project_id: ctx.num("project-id")
5416
+ })
5417
+ });
5418
+
5419
+ // src/commands/te-analysis/project/member-receiver/index.ts
5420
+ var commands53 = [
5421
+ projectMemberReceiverList
5422
+ ];
5423
+ var member_receiver_default = commands53;
5424
+
5425
+ // src/commands/te-analysis/project/owner/update.ts
5426
+ var projectOwnerUpdate = createAnalysisCapabilityCommand({
5427
+ resource: "project owner",
5428
+ command: "update",
5429
+ capabilityId: "project.owner.update",
5430
+ description: "Update project owner.",
5431
+ flags: [
5432
+ projectIdFlag,
5433
+ { name: "company-id", type: "number", required: true, desc: "Company ID." },
5434
+ { name: "owner-user-id", type: "number", required: false, desc: "New owner user ID. Omit to only downgrade existing owner." },
5435
+ { name: "project-name", type: "string", required: false, desc: "Optional project name update." },
5436
+ { name: "project-remark", type: "string", required: false, desc: "Optional project remark update." }
5437
+ ],
5438
+ risk: "write",
5439
+ buildInput: (ctx) => compactInput({
5440
+ project_id: ctx.num("project-id"),
5441
+ 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")
5445
+ })
5446
+ });
5447
+
5448
+ // src/commands/te-analysis/project/owner/index.ts
5449
+ var commands54 = [
5450
+ projectOwnerUpdate
5451
+ ];
5452
+ var owner_default = commands54;
5453
+
5454
+ // src/commands/te-analysis/project/permission-binding/list.ts
5455
+ var projectPermissionBindingList = createAnalysisCapabilityCommand({
5456
+ resource: "project permission-binding",
5457
+ command: "list",
5458
+ capabilityId: "project.permission_binding.list",
5459
+ description: "List project role and data-power bindings for company-level permission management.",
5460
+ flags: [
5461
+ projectIdFlag,
5462
+ { name: "company-id", type: "number", required: true, desc: "Company ID." },
5463
+ { name: "project-ids", type: "json", required: true, desc: "Project IDs JSON array." }
5464
+ ],
5465
+ risk: "read",
5466
+ buildInput: (ctx) => compactInput({
5467
+ project_id: ctx.num("project-id"),
5468
+ company_id: ctx.num("company-id"),
5469
+ project_ids: ctx.json("project-ids")
5470
+ })
5471
+ });
5472
+
5473
+ // src/commands/te-analysis/project/permission-binding/index.ts
5474
+ var commands55 = [
5475
+ projectPermissionBindingList
5476
+ ];
5477
+ var permission_binding_default = commands55;
5478
+
5479
+ // src/commands/te-analysis/project/receive-status/update.ts
5480
+ var projectReceiveStatusUpdate = createAnalysisCapabilityCommand({
5481
+ resource: "project receive-status",
5482
+ command: "update",
5483
+ capabilityId: "project.receive_status.update",
5484
+ description: "Update project data receive status.",
5485
+ flags: [
5486
+ projectIdFlag,
5487
+ { name: "receive-status", type: "string", required: true, desc: "Receive status: NORMAL or STOP_RECEIVE." }
5488
+ ],
5489
+ risk: "high-risk-write",
5490
+ buildInput: (ctx) => compactInput({
5491
+ project_id: ctx.num("project-id"),
5492
+ receive_status: ctx.str("receive-status"),
5493
+ yes: true
5494
+ })
5495
+ });
5496
+
5497
+ // src/commands/te-analysis/project/receive-status/index.ts
5498
+ var commands56 = [
5499
+ projectReceiveStatusUpdate
5500
+ ];
5501
+ var receive_status_default = commands56;
5502
+
5503
+ // src/commands/te-analysis/project/role/delete.ts
5504
+ var projectRoleDelete = createAnalysisCapabilityCommand({
5505
+ resource: "project role",
5506
+ command: "delete",
5507
+ capabilityId: "project.role.delete",
5508
+ description: "Delete a role and optionally migrate users to another role.",
5509
+ flags: [
5510
+ projectIdFlag,
5511
+ { name: "role-name", type: "string", required: true, desc: "Role name to delete." },
5512
+ { name: "new-role-name", type: "string", required: false, desc: "Role name to migrate users to before deletion." }
5513
+ ],
5514
+ risk: "high-risk-write",
5515
+ buildInput: (ctx) => compactInput({
5516
+ project_id: ctx.num("project-id"),
5517
+ role_name: ctx.str("role-name"),
5518
+ new_role_name: optionalString2(ctx, "new-role-name"),
5519
+ yes: true
5520
+ })
5521
+ });
5522
+
5523
+ // src/commands/te-analysis/project/role/get.ts
5524
+ var projectRoleGet = createAnalysisCapabilityCommand({
5525
+ resource: "project role",
5526
+ command: "get",
5527
+ capabilityId: "project.role.get",
5528
+ description: "Get one role by role name.",
5529
+ flags: [
5530
+ projectIdFlag,
5531
+ { name: "role-name", type: "string", required: true, desc: "Role name." }
5532
+ ],
5533
+ risk: "read",
5534
+ buildInput: (ctx) => compactInput({
5535
+ project_id: ctx.num("project-id"),
5536
+ role_name: ctx.str("role-name")
5537
+ })
5538
+ });
5539
+
5540
+ // src/commands/te-analysis/project/role/list.ts
5541
+ var projectRoleList = createAnalysisCapabilityCommand({
5542
+ resource: "project role",
5543
+ command: "list",
5544
+ capabilityId: "project.role.list",
5545
+ description: "List project-visible roles.",
5546
+ flags: [
5547
+ { name: "company-id", type: "number", required: false, desc: "Company ID. Required when project_id is absent." },
5548
+ projectIdFlag,
5549
+ { name: "visible-only", type: "boolean", required: false, desc: "When true, list roles visible to the current user." }
5550
+ ],
5551
+ risk: "read",
5552
+ buildInput: (ctx) => compactInput({
5553
+ company_id: optionalNumber2(ctx, "company-id"),
5554
+ project_id: ctx.num("project-id"),
5555
+ visible_only: optionalBoolean2(ctx, "visible-only")
5556
+ })
5557
+ });
5558
+
5559
+ // src/commands/te-analysis/project/role/upsert.ts
5560
+ var projectRoleUpsert = createAnalysisCapabilityCommand({
5561
+ resource: "project role",
5562
+ command: "upsert",
5563
+ capabilityId: "project.role.upsert",
5564
+ description: "Create or update a project role.",
5565
+ flags: [
5566
+ projectIdFlag,
5567
+ requiredPayloadFlag
5568
+ ],
5569
+ risk: "write",
5570
+ buildInput: (ctx) => compactInput({
5571
+ project_id: ctx.num("project-id"),
5572
+ payload: ctx.json("payload")
5573
+ })
5574
+ });
5575
+
5576
+ // src/commands/te-analysis/project/role/index.ts
5577
+ var commands57 = [
5578
+ projectRoleDelete,
5579
+ projectRoleGet,
5580
+ projectRoleList,
5581
+ projectRoleUpsert
5582
+ ];
5583
+ var role_default = commands57;
5584
+
5585
+ // src/commands/te-analysis/project/role-function/list.ts
5586
+ var projectRoleFunctionList = createAnalysisCapabilityCommand({
5587
+ resource: "project role-function",
5588
+ command: "list",
5589
+ capabilityId: "project.role_function.list",
5590
+ description: "List functions granted to one or more roles.",
5591
+ flags: [
5592
+ { name: "company-id", type: "number", required: false, desc: "Company ID." },
5593
+ projectIdFlag,
5594
+ { name: "role-name", type: "string", required: false, desc: "Single role name." },
5595
+ { name: "role-names", type: "json", required: false, desc: "Role names JSON array. When omitted, all role functions are returned." },
5596
+ { name: "show-system-func", type: "boolean", required: false, desc: "Whether to include system functions. Default false." }
5597
+ ],
5598
+ risk: "read",
5599
+ buildInput: (ctx) => compactInput({
5600
+ company_id: optionalNumber2(ctx, "company-id"),
5601
+ project_id: ctx.num("project-id"),
5602
+ role_name: optionalString2(ctx, "role-name"),
5603
+ role_names: optionalJson(ctx, "role-names"),
5604
+ show_system_func: optionalBoolean2(ctx, "show-system-func")
5605
+ })
5606
+ });
5607
+
5608
+ // src/commands/te-analysis/project/role-function/index.ts
5609
+ var commands58 = [
5610
+ projectRoleFunctionList
5611
+ ];
5612
+ var role_function_default = commands58;
5613
+
5614
+ // src/commands/te-analysis/project/role-user/list.ts
5615
+ var projectRoleUserList = createAnalysisCapabilityCommand({
5616
+ resource: "project role-user",
5617
+ command: "list",
5618
+ capabilityId: "project.role_user.list",
5619
+ description: "List users bound to a role.",
5620
+ flags: [
5621
+ projectIdFlag,
5622
+ { name: "role-name", type: "string", required: true, desc: "Role name." }
5623
+ ],
5624
+ risk: "read",
5625
+ buildInput: (ctx) => compactInput({
5626
+ project_id: ctx.num("project-id"),
5627
+ role_name: ctx.str("role-name")
5628
+ })
5629
+ });
5630
+
5631
+ // src/commands/te-analysis/project/role-user/index.ts
5632
+ var commands59 = [
5633
+ projectRoleUserList
5634
+ ];
5635
+ var role_user_default = commands59;
5636
+
5637
+ // src/commands/te-analysis/project/timezone/get.ts
5638
+ var projectTimezoneGet = createAnalysisCapabilityCommand({
5639
+ resource: "project timezone",
5640
+ command: "get",
5641
+ capabilityId: "project.timezone.get",
5642
+ description: "Get project time zone configuration.",
5643
+ flags: [
5644
+ projectIdFlag
5645
+ ],
5646
+ risk: "read",
5647
+ buildInput: (ctx) => compactInput({
5648
+ project_id: ctx.num("project-id")
5649
+ })
5650
+ });
5651
+
5652
+ // src/commands/te-analysis/project/timezone/overview.ts
5653
+ var projectTimezoneOverview = createAnalysisCapabilityCommand({
5654
+ resource: "project timezone",
5655
+ command: "overview",
5656
+ capabilityId: "project.timezone.overview",
5657
+ description: "Get project time zone overview.",
5658
+ flags: [
5659
+ projectIdFlag
5660
+ ],
5661
+ risk: "read",
5662
+ buildInput: (ctx) => compactInput({
5663
+ project_id: ctx.num("project-id")
5664
+ })
5665
+ });
5666
+
5667
+ // src/commands/te-analysis/project/timezone/update.ts
5668
+ var projectTimezoneUpdate = createAnalysisCapabilityCommand({
5669
+ resource: "project timezone",
5670
+ command: "update",
5671
+ capabilityId: "project.timezone.update",
5672
+ description: "Update one project time zone configuration item.",
5673
+ flags: [
5674
+ projectIdFlag,
5675
+ requiredPayloadFlag,
5676
+ { name: "item", type: "string", required: true, desc: "Timezone item: timezone_toggle, zone_offset, user_timezone, project_timezone_display." }
5677
+ ],
5678
+ risk: "write",
5679
+ buildInput: (ctx) => compactInput({
5680
+ project_id: ctx.num("project-id"),
5681
+ payload: ctx.json("payload"),
5682
+ item: ctx.str("item")
5683
+ })
5684
+ });
5685
+
5686
+ // src/commands/te-analysis/project/timezone/index.ts
5687
+ var commands60 = [
5688
+ projectTimezoneGet,
5689
+ projectTimezoneOverview,
5690
+ projectTimezoneUpdate
5691
+ ];
5692
+ var timezone_default = commands60;
5693
+
5694
+ // src/commands/te-analysis/project/user-id-items/update.ts
5695
+ var projectUserIdItemsUpdate = createAnalysisCapabilityCommand({
5696
+ resource: "project user-id-items",
5697
+ command: "update",
5698
+ capabilityId: "project.user_id_items.update",
5699
+ description: "Update project virtual user ID item configuration.",
5700
+ flags: [
5701
+ projectIdFlag,
5702
+ requiredPayloadFlag
5703
+ ],
5704
+ risk: "write",
5705
+ buildInput: (ctx) => compactInput({
5706
+ project_id: ctx.num("project-id"),
5707
+ payload: ctx.json("payload")
5708
+ })
5709
+ });
5710
+
5711
+ // src/commands/te-analysis/project/user-id-items/index.ts
5712
+ var commands61 = [
5713
+ projectUserIdItemsUpdate
5714
+ ];
5715
+ var user_id_items_default = commands61;
5716
+
5717
+ // src/commands/te-analysis/project/index.ts
5718
+ var commands62 = [
5719
+ ...access_detail_default,
5720
+ ...data_power_default,
5721
+ ...entity_default2,
5722
+ ...entity_event_default,
5723
+ ...function_default,
5724
+ ...info_default,
5725
+ ...mark_time_default,
5726
+ ...member_default,
5727
+ ...member_candidate_default,
5728
+ ...member_handover_default,
5729
+ ...member_receiver_default,
5730
+ ...owner_default,
5731
+ ...permission_binding_default,
5732
+ ...receive_status_default,
5733
+ ...role_default,
5734
+ ...role_function_default,
5735
+ ...role_user_default,
5736
+ ...timezone_default,
5737
+ ...user_id_items_default
5738
+ ];
5739
+ var project_default = commands62;
5740
+
5741
+ // src/commands/te-analysis/tracking/shared.ts
5742
+ function createTrackingCapabilityCommand(config) {
5743
+ return createCapabilityCommand({
5744
+ ...config,
5745
+ cliService: "tracking",
5746
+ gatewayDomain: "analysis"
5747
+ });
5748
+ }
5749
+ var eventsFlag = {
5750
+ name: "events",
5751
+ type: "json",
5752
+ required: false,
5753
+ desc: "Optional JSON array of tracking events."
5754
+ };
5755
+ var eventPropsFlag = {
5756
+ name: "event-props",
5757
+ type: "json",
5758
+ required: false,
5759
+ desc: "Optional JSON array of tracking event properties."
5760
+ };
5761
+ var userPropsFlag = {
5762
+ name: "user-props",
5763
+ type: "json",
5764
+ required: false,
5765
+ desc: "Optional JSON array of tracking user properties."
5766
+ };
5767
+ var commonEventPropsFlag = {
5768
+ name: "common-event-props",
5769
+ type: "json",
5770
+ required: false,
5771
+ desc: "Optional JSON array of common tracking event properties."
5772
+ };
5773
+ var eventPropNamesFlag = {
5774
+ name: "event-prop-names",
5775
+ type: "json",
5776
+ required: false,
5777
+ desc: "Optional JSON array of event property names to delete."
5778
+ };
5779
+ var userPropNamesFlag = {
5780
+ name: "user-prop-names",
5781
+ type: "json",
5782
+ required: false,
5783
+ desc: "Optional JSON array of user property names to delete."
5784
+ };
5785
+ var commonEventPropNamesFlag = {
5786
+ name: "common-event-prop-names",
5787
+ type: "json",
5788
+ required: false,
5789
+ desc: "Optional JSON array of common event property names to delete."
5790
+ };
5791
+ var languageFlag = {
5792
+ name: "language",
5793
+ type: "string",
5794
+ required: true,
5795
+ desc: "Generation language: zh-CN, en-US, ja-JP, or ko-KR."
5796
+ };
5797
+ var formDataFlag = {
5798
+ name: "form-data",
5799
+ type: "json",
5800
+ required: true,
5801
+ desc: "Structured business context JSON object for tracking plan generation."
5802
+ };
5803
+ var developmentCarrierFlag = {
5804
+ name: "development-carrier",
5805
+ type: "json",
5806
+ required: false,
5807
+ desc: "Optional JSON array of development platforms."
5808
+ };
5809
+ var predefinedEventFlag = {
5810
+ name: "predefined-event",
5811
+ type: "json",
5812
+ required: false,
5813
+ desc: "Optional JSON array of predefined event names."
5814
+ };
5815
+ var sdkTypesFlag = {
5816
+ name: "sdk-types",
5817
+ type: "json",
5818
+ required: true,
5819
+ desc: "JSON array of SDK types to generate."
5820
+ };
5821
+ var checkScopeFlag = {
5822
+ name: "check-scope",
5823
+ type: "json",
5824
+ required: true,
5825
+ desc: "Tracking check scope JSON object."
5826
+ };
5827
+ var resultScopeFlag = {
5828
+ name: "result-scope",
5829
+ type: "json",
5830
+ required: false,
5831
+ desc: "Optional tracking check result scope JSON object."
5832
+ };
5833
+ var langFlag = {
5834
+ name: "lang",
5835
+ type: "string",
5836
+ required: false,
5837
+ desc: "Excel language: zh, en, ja, ko, zh_CN, en_US, ja_JP, or ko_KR."
5838
+ };
5839
+ var logIdFlag = {
5840
+ name: "log-id",
5841
+ type: "number",
5842
+ required: true,
5843
+ desc: "Tracking plan change log ID."
5844
+ };
5845
+ var uuidFlag = {
5846
+ name: "uuid",
5847
+ type: "string",
5848
+ required: true,
5849
+ desc: "Tracking check task UUID."
5850
+ };
5851
+ var startTimeFlag = {
5852
+ name: "start-time",
5853
+ type: "string",
5854
+ required: true,
5855
+ desc: "Query start time."
5856
+ };
5857
+ var endTimeFlag = {
5858
+ name: "end-time",
5859
+ type: "string",
5860
+ required: true,
5861
+ desc: "Query end time."
5862
+ };
5863
+ var dataNameFlag = {
5864
+ name: "data-name",
5865
+ type: "string",
5866
+ required: true,
5867
+ desc: "Event or property name used to list ingest errors."
5868
+ };
5869
+ var dataTypeFlag = {
5870
+ name: "data-type",
5871
+ type: "string",
5872
+ required: false,
5873
+ desc: "Live data type: normal (default) or error."
5874
+ };
5875
+ var eventNamesFlag = {
5876
+ name: "event-names",
5877
+ type: "json",
5878
+ required: true,
5879
+ desc: "JSON array of event names."
5880
+ };
5881
+ var blacklistTypeFlag = {
5882
+ name: "type",
5883
+ type: "number",
5884
+ required: true,
5885
+ desc: "Blacklist event config type: 0 or 1."
5886
+ };
5887
+ var confirmFlag = {
5888
+ name: "confirm",
5889
+ type: "boolean",
5890
+ required: true,
5891
+ desc: "Must be true for this destructive tracking operation. Also use global --yes to skip local confirmation."
5892
+ };
5893
+ function projectInput2(ctx) {
5894
+ return { project_id: ctx.num("project-id") };
5895
+ }
5896
+ function projectLifecycleInput(ctx) {
5897
+ return compactInput({
5898
+ ...projectInput2(ctx),
5899
+ request_id: optionalString2(ctx, "request-id"),
5900
+ timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
5901
+ });
5902
+ }
5903
+
5904
+ // src/commands/te-analysis/tracking/plan/get.ts
5905
+ var trackingPlanGet = createTrackingCapabilityCommand({
5906
+ resource: "plan",
5907
+ command: "get",
5908
+ capabilityId: "tracking.plan.get",
5909
+ description: "Get the tracking plan for one project.",
5910
+ flags: [projectIdFlag],
5911
+ risk: "read",
5912
+ buildInput: projectInput2
5913
+ });
5914
+
5915
+ // src/commands/te-analysis/tracking/plan/save-items.ts
5916
+ var trackingPlanSaveItems = createTrackingCapabilityCommand({
5917
+ resource: "plan",
5918
+ command: "save-items",
5919
+ capabilityId: "tracking.plan.save_items",
5920
+ description: "Save tracking plan items.",
5921
+ flags: [projectIdFlag, eventsFlag, eventPropsFlag, userPropsFlag, commonEventPropsFlag],
5922
+ risk: "write",
5923
+ buildInput: (ctx) => compactInput({
5924
+ ...projectInput2(ctx),
5925
+ events: optionalJson(ctx, "events"),
5926
+ event_props: optionalJson(ctx, "event-props"),
5927
+ user_props: optionalJson(ctx, "user-props"),
5928
+ common_event_props: optionalJson(ctx, "common-event-props")
5929
+ })
5930
+ });
5931
+
5932
+ // src/commands/te-analysis/tracking/plan/delete-items.ts
5933
+ var trackingPlanDeleteItems = createTrackingCapabilityCommand({
5934
+ resource: "plan",
5935
+ command: "delete-items",
5936
+ capabilityId: "tracking.plan.delete_items",
5937
+ description: "Delete tracking plan items.",
5938
+ flags: [projectIdFlag, eventsFlag, eventPropNamesFlag, userPropNamesFlag, commonEventPropNamesFlag, confirmFlag],
5939
+ risk: "high-risk-write",
5940
+ buildInput: (ctx) => compactInput({
5941
+ ...projectInput2(ctx),
5942
+ events: optionalJson(ctx, "events"),
5943
+ event_prop_names: optionalJson(ctx, "event-prop-names"),
5944
+ user_prop_names: optionalJson(ctx, "user-prop-names"),
5945
+ common_event_prop_names: optionalJson(ctx, "common-event-prop-names"),
5946
+ yes: ctx.bool("confirm")
5947
+ })
5948
+ });
5949
+
5950
+ // src/commands/te-analysis/tracking/plan/generate.ts
5951
+ var trackingPlanGenerate = createTrackingCapabilityCommand({
5952
+ resource: "plan",
5953
+ command: "generate",
5954
+ capabilityId: "tracking.plan.generate",
5955
+ description: "Submit an AI tracking plan generation task.",
5956
+ flags: [projectIdFlag, languageFlag, formDataFlag, developmentCarrierFlag, predefinedEventFlag],
5957
+ risk: "write",
5958
+ buildInput: (ctx) => compactInput({
5959
+ ...projectInput2(ctx),
5960
+ language: ctx.str("language"),
5961
+ form_data: ctx.json("form-data"),
5962
+ development_carrier: optionalJson(ctx, "development-carrier"),
5963
+ predefined_event: optionalJson(ctx, "predefined-event")
5964
+ })
5965
+ });
5966
+
5967
+ // src/commands/te-analysis/tracking/plan/export.ts
5968
+ var trackingPlanExport = createTrackingCapabilityCommand({
5969
+ resource: "plan",
5970
+ command: "export",
5971
+ capabilityId: "tracking.plan.export",
5972
+ description: "Export the tracking plan as an artifact.",
5973
+ flags: [projectIdFlag, requestIdFlag, asyncTimeoutSecondsFlag],
5974
+ risk: "read",
5975
+ buildInput: projectLifecycleInput
5976
+ });
5977
+
5978
+ // src/commands/te-analysis/tracking/plan/import-excel.ts
5979
+ import { existsSync as existsSync2 } from "fs";
5980
+ var CAPABILITY_ID = "tracking.plan.import_excel";
5981
+ var INPUT_FILE_PURPOSE = "track.program.xlsx";
5982
+ var trackingPlanImportExcel = {
5983
+ service: "tracking",
5984
+ resource: "plan",
5985
+ command: "import-excel",
5986
+ capabilityId: CAPABILITY_ID,
5987
+ description: "Import a tracking plan XLSX. Pass --input-file for automatic upload with purpose track.program.xlsx, or --input-file-id from `analysis input-file upload`. List bundled XLSX templates with `tracking plan list-templates --json`.",
5988
+ flags: [
5989
+ projectIdFlag,
5990
+ {
5991
+ name: "input-file",
5992
+ type: "string",
5993
+ required: false,
5994
+ desc: "Local tracking-plan XLSX path. The CLI uploads it with purpose track.program.xlsx before import."
5995
+ },
5996
+ {
5997
+ name: "input-file-id",
5998
+ type: "string",
5999
+ required: false,
6000
+ desc: "Existing input_file_id returned by `analysis input-file upload --purpose track.program.xlsx`."
6001
+ },
6002
+ langFlag
6003
+ ],
6004
+ risk: "write",
6005
+ validate: validateSource,
6006
+ validateInput: async (ctx) => {
6007
+ const inputFile = optionalString2(ctx, "input-file");
6008
+ if (inputFile) {
6009
+ return {
6010
+ valid: true,
6011
+ capability_id: CAPABILITY_ID,
6012
+ normalized_input: buildInput(ctx, "<input_file_id returned by upload>"),
6013
+ upload: { purpose: INPUT_FILE_PURPOSE, file: inputFile }
6014
+ };
6015
+ }
6016
+ return validateCapability(
6017
+ ctx.host(),
6018
+ resolveGatewayDomain("analysis"),
6019
+ CAPABILITY_ID,
6020
+ buildInput(ctx, ctx.str("input-file-id"))
6021
+ );
6022
+ },
6023
+ dryRun: async (ctx) => {
6024
+ const inputFile = optionalString2(ctx, "input-file");
6025
+ if (inputFile) {
6026
+ return {
6027
+ steps: [
6028
+ {
6029
+ method: "POST",
6030
+ url: buildCapabilityGatewayUrl(ctx.host(), resolveGatewayDomain("analysis"), "input-files"),
6031
+ body: { multipart: { project_id: ctx.num("project-id"), purpose: INPUT_FILE_PURPOSE, file: inputFile } }
6032
+ },
6033
+ {
6034
+ capability_id: CAPABILITY_ID,
6035
+ input: buildInput(ctx, "<input_file_id returned by upload>")
6036
+ }
6037
+ ]
6038
+ };
6039
+ }
6040
+ return dryRunCapability(
6041
+ ctx.host(),
6042
+ resolveGatewayDomain("analysis"),
6043
+ CAPABILITY_ID,
6044
+ buildInput(ctx, ctx.str("input-file-id"))
6045
+ );
6046
+ },
6047
+ execute: async (ctx) => {
6048
+ const inputFile = optionalString2(ctx, "input-file");
6049
+ let inputFileId = optionalString2(ctx, "input-file-id");
6050
+ if (inputFile) {
6051
+ const upload = await uploadInputFile(
6052
+ ctx.host(),
6053
+ resolveGatewayDomain("analysis"),
6054
+ ctx.num("project-id"),
6055
+ INPUT_FILE_PURPOSE,
6056
+ inputFile
6057
+ );
6058
+ inputFileId = upload?.input_file_id ?? upload?.inputFileId;
6059
+ if (!inputFileId) {
6060
+ throw new Error("Input-file upload did not return input_file_id");
6061
+ }
6062
+ }
6063
+ const result = await executeCapabilityWithEnvelope(
6064
+ ctx.host(),
6065
+ resolveGatewayDomain("analysis"),
6066
+ CAPABILITY_ID,
6067
+ buildInput(ctx, inputFileId)
6068
+ );
6069
+ return withOutputMetadata(result.data, result.meta);
6070
+ }
6071
+ };
6072
+ function validateSource(ctx) {
6073
+ const inputFile = optionalString2(ctx, "input-file");
6074
+ const inputFileId = optionalString2(ctx, "input-file-id");
6075
+ if (Boolean(inputFile) === Boolean(inputFileId)) {
6076
+ throw new Error("Pass exactly one of --input-file or --input-file-id");
6077
+ }
6078
+ if (inputFile && (!existsSync2(inputFile) || !inputFile.toLowerCase().endsWith(".xlsx"))) {
6079
+ throw new Error("--input-file must reference a readable .xlsx file");
6080
+ }
6081
+ }
6082
+ function buildInput(ctx, inputFileId) {
6083
+ return compactInput({
6084
+ ...projectInput2(ctx),
6085
+ input_file_id: inputFileId,
6086
+ lang: optionalString2(ctx, "lang")
6087
+ });
6088
+ }
6089
+
6090
+ // src/commands/te-analysis/tracking/plan/sync-from-meta.ts
6091
+ var trackingPlanSyncFromMeta = createTrackingCapabilityCommand({
6092
+ resource: "plan",
6093
+ command: "sync-from-meta",
6094
+ capabilityId: "tracking.plan.sync_from_meta",
6095
+ description: "Synchronize tracking plan from project metadata.",
6096
+ flags: [projectIdFlag],
6097
+ risk: "write",
6098
+ buildInput: projectInput2
6099
+ });
6100
+
6101
+ // src/commands/te-analysis/tracking/plan/index.ts
6102
+ var commands63 = [
6103
+ trackingPlanGet,
6104
+ trackingPlanSaveItems,
6105
+ trackingPlanDeleteItems,
6106
+ trackingPlanGenerate,
6107
+ trackingPlanExport,
6108
+ trackingPlanImportExcel,
6109
+ trackingPlanSyncFromMeta
6110
+ ];
6111
+ var plan_default = commands63;
6112
+
6113
+ // src/commands/te-analysis/tracking/sdk-sample/generate.ts
6114
+ var trackingSdkSampleGenerate = createTrackingCapabilityCommand({
6115
+ resource: "sdk-sample",
6116
+ command: "generate",
6117
+ capabilityId: "tracking.sdk_sample.generate",
6118
+ description: "Submit an AI SDK sample generation task.",
6119
+ flags: [projectIdFlag, sdkTypesFlag],
6120
+ risk: "write",
6121
+ buildInput: (ctx) => ({ ...projectInput2(ctx), sdk_types: ctx.json("sdk-types") })
6122
+ });
6123
+
6124
+ // src/commands/te-analysis/tracking/sdk-sample/index.ts
6125
+ var commands64 = [
6126
+ trackingSdkSampleGenerate
6127
+ ];
6128
+ var sdk_sample_default = commands64;
6129
+
6130
+ // src/commands/te-analysis/tracking/plan-change-log/list.ts
6131
+ var trackingPlanChangeLogList = createTrackingCapabilityCommand({
6132
+ resource: "plan-change-log",
6133
+ command: "list",
6134
+ capabilityId: "tracking.plan_change_log.list",
6135
+ description: "List tracking plan change logs.",
6136
+ flags: [projectIdFlag],
6137
+ risk: "read",
6138
+ buildInput: projectInput2
6139
+ });
6140
+
6141
+ // src/commands/te-analysis/tracking/plan-change-log/export.ts
6142
+ var trackingPlanChangeLogExport = createTrackingCapabilityCommand({
6143
+ resource: "plan-change-log",
6144
+ command: "export",
6145
+ capabilityId: "tracking.plan_change_log.export",
6146
+ description: "Export one tracking plan change log.",
6147
+ flags: [projectIdFlag, logIdFlag, requestIdFlag, asyncTimeoutSecondsFlag],
6148
+ 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") })
6150
+ });
6151
+
6152
+ // src/commands/te-analysis/tracking/plan-change-log/index.ts
6153
+ var commands65 = [
6154
+ trackingPlanChangeLogList,
6155
+ trackingPlanChangeLogExport
6156
+ ];
6157
+ var plan_change_log_default = commands65;
6158
+
6159
+ // src/commands/te-analysis/tracking/check/run.ts
6160
+ var trackingCheckRun = createTrackingCapabilityCommand({
6161
+ resource: "check",
6162
+ command: "run",
6163
+ capabilityId: "tracking.check.run",
6164
+ description: "Run tracking plan validation.",
6165
+ flags: [projectIdFlag, checkScopeFlag, resultScopeFlag],
6166
+ risk: "write",
6167
+ buildInput: (ctx) => compactInput({
6168
+ ...projectInput2(ctx),
6169
+ check_scope: ctx.json("check-scope"),
6170
+ result_scope: optionalJson(ctx, "result-scope")
6171
+ })
6172
+ });
6173
+
6174
+ // src/commands/te-analysis/tracking/check/list.ts
6175
+ var trackingCheckList = createTrackingCapabilityCommand({
6176
+ resource: "check",
6177
+ command: "list",
6178
+ capabilityId: "tracking.check.list",
6179
+ description: "List tracking validation runs.",
6180
+ flags: [projectIdFlag],
6181
+ risk: "read",
6182
+ buildInput: projectInput2
6183
+ });
6184
+
6185
+ // src/commands/te-analysis/tracking/check/get.ts
6186
+ var trackingCheckGet = createTrackingCapabilityCommand({
6187
+ resource: "check",
6188
+ command: "get",
6189
+ capabilityId: "tracking.check.get",
6190
+ description: "Get one tracking validation result.",
6191
+ flags: [projectIdFlag, uuidFlag, requestIdFlag, timeoutSecondsFlag],
6192
+ risk: "read",
6193
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6194
+ });
6195
+
6196
+ // src/commands/te-analysis/tracking/check/retry.ts
6197
+ var trackingCheckRetry = createTrackingCapabilityCommand({
6198
+ resource: "check",
6199
+ command: "retry",
6200
+ capabilityId: "tracking.check.retry",
6201
+ description: "Retry one tracking validation run.",
6202
+ flags: [projectIdFlag, uuidFlag, requestIdFlag, timeoutSecondsFlag],
6203
+ risk: "write",
6204
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6205
+ });
6206
+
6207
+ // src/commands/te-analysis/tracking/check/delete.ts
6208
+ var trackingCheckDelete = createTrackingCapabilityCommand({
6209
+ resource: "check",
6210
+ command: "delete",
6211
+ capabilityId: "tracking.check.delete",
6212
+ description: "Delete one tracking validation run.",
6213
+ flags: [projectIdFlag, uuidFlag, confirmFlag],
6214
+ risk: "high-risk-write",
6215
+ buildInput: (ctx) => ({ ...projectInput2(ctx), uuid: ctx.str("uuid"), yes: ctx.bool("confirm") })
6216
+ });
6217
+
6218
+ // src/commands/te-analysis/tracking/check/export.ts
6219
+ var trackingCheckExport = createTrackingCapabilityCommand({
6220
+ resource: "check",
6221
+ command: "export",
6222
+ capabilityId: "tracking.check.export",
6223
+ description: "Export one tracking validation result.",
6224
+ flags: [projectIdFlag, uuidFlag, requestIdFlag, asyncTimeoutSecondsFlag],
6225
+ risk: "read",
6226
+ buildInput: (ctx) => compactInput({ ...projectInput2(ctx), uuid: ctx.str("uuid"), request_id: optionalString2(ctx, "request-id"), timeout_seconds: optionalNumber2(ctx, "timeout-seconds") })
6227
+ });
6228
+
6229
+ // src/commands/te-analysis/tracking/check/index.ts
6230
+ var commands66 = [
6231
+ trackingCheckRun,
6232
+ trackingCheckList,
6233
+ trackingCheckGet,
6234
+ trackingCheckRetry,
6235
+ trackingCheckDelete,
6236
+ trackingCheckExport
6237
+ ];
6238
+ var check_default = commands66;
6239
+
6240
+ // src/commands/te-analysis/tracking/ingest/summary.ts
6241
+ var trackingIngestSummary = createTrackingCapabilityCommand({
6242
+ resource: "ingest",
6243
+ command: "summary",
6244
+ capabilityId: "tracking.ingest.summary",
6245
+ description: "Get tracking ingest summary.",
6246
+ flags: [projectIdFlag, startTimeFlag, endTimeFlag],
6247
+ risk: "read",
6248
+ buildInput: (ctx) => ({ ...projectInput2(ctx), start_time: ctx.str("start-time"), end_time: ctx.str("end-time") })
6249
+ });
6250
+
6251
+ // src/commands/te-analysis/tracking/ingest/index.ts
6252
+ var commands67 = [
6253
+ trackingIngestSummary
6254
+ ];
6255
+ var ingest_default = commands67;
6256
+
6257
+ // src/commands/te-analysis/tracking/ingest-error/list.ts
6258
+ var trackingIngestErrorList = createTrackingCapabilityCommand({
6259
+ resource: "ingest-error",
6260
+ command: "list",
6261
+ capabilityId: "tracking.ingest_error.list",
6262
+ description: "List tracking ingest errors for one data name.",
6263
+ flags: [projectIdFlag, dataNameFlag, startTimeFlag, endTimeFlag],
6264
+ risk: "read",
6265
+ buildInput: (ctx) => ({ ...projectInput2(ctx), data_name: ctx.str("data-name"), start_time: ctx.str("start-time"), end_time: ctx.str("end-time") })
6266
+ });
6267
+
6268
+ // src/commands/te-analysis/tracking/ingest-error/index.ts
6269
+ var commands68 = [
6270
+ trackingIngestErrorList
6271
+ ];
6272
+ var ingest_error_default = commands68;
6273
+
6274
+ // src/commands/te-analysis/tracking/live-data/list.ts
6275
+ var trackingLiveDataList = createTrackingCapabilityCommand({
6276
+ resource: "live-data",
6277
+ command: "list",
6278
+ capabilityId: "tracking.live_data.list",
6279
+ description: "List recent tracking live data.",
6280
+ flags: [projectIdFlag, dataTypeFlag, requestIdFlag, timeoutSecondsFlag],
6281
+ 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") })
6283
+ });
6284
+
6285
+ // src/commands/te-analysis/tracking/live-data/export.ts
6286
+ var trackingLiveDataExport = createTrackingCapabilityCommand({
6287
+ resource: "live-data",
6288
+ command: "export",
6289
+ capabilityId: "tracking.live_data.export",
6290
+ description: "Export recent tracking live data.",
6291
+ flags: [projectIdFlag, dataTypeFlag, requestIdFlag, asyncTimeoutSecondsFlag],
6292
+ 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") })
6294
+ });
6295
+
6296
+ // src/commands/te-analysis/tracking/live-data/index.ts
6297
+ var commands69 = [
6298
+ trackingLiveDataList,
6299
+ trackingLiveDataExport
6300
+ ];
6301
+ var live_data_default = commands69;
6302
+
6303
+ // src/commands/te-analysis/tracking/event-blacklist/list.ts
6304
+ var trackingEventBlacklistList = createTrackingCapabilityCommand({
6305
+ resource: "event-blacklist",
6306
+ command: "list",
6307
+ capabilityId: "tracking.event_blacklist.list",
6308
+ description: "List tracking event blacklist configuration.",
6309
+ flags: [projectIdFlag],
6310
+ risk: "read",
6311
+ buildInput: projectInput2
6312
+ });
6313
+
6314
+ // src/commands/te-analysis/tracking/event-blacklist/add.ts
6315
+ var trackingEventBlacklistAdd = createTrackingCapabilityCommand({
6316
+ resource: "event-blacklist",
6317
+ command: "add",
6318
+ capabilityId: "tracking.event_blacklist.add",
6319
+ description: "Add events to tracking event blacklist.",
6320
+ flags: [projectIdFlag, eventNamesFlag],
6321
+ risk: "write",
6322
+ buildInput: (ctx) => ({ ...projectInput2(ctx), event_names: ctx.json("event-names") })
6323
+ });
6324
+
6325
+ // src/commands/te-analysis/tracking/event-blacklist/update.ts
6326
+ var trackingEventBlacklistUpdate = createTrackingCapabilityCommand({
6327
+ resource: "event-blacklist",
6328
+ command: "update",
6329
+ capabilityId: "tracking.event_blacklist.update",
6330
+ description: "Update tracking event blacklist config.",
6331
+ flags: [projectIdFlag, eventNamesFlag, blacklistTypeFlag],
6332
+ risk: "write",
6333
+ buildInput: (ctx) => ({ ...projectInput2(ctx), event_names: ctx.json("event-names"), type: ctx.num("type") })
6334
+ });
6335
+
6336
+ // src/commands/te-analysis/tracking/event-blacklist/index.ts
6337
+ var commands70 = [
6338
+ trackingEventBlacklistList,
6339
+ trackingEventBlacklistAdd,
6340
+ trackingEventBlacklistUpdate
6341
+ ];
6342
+ var event_blacklist_default = commands70;
6343
+
6344
+ // src/commands/te-analysis/tracking/index.ts
6345
+ var commands71 = [
6346
+ ...plan_default,
6347
+ ...sdk_sample_default,
6348
+ ...plan_change_log_default,
6349
+ ...check_default,
6350
+ ...ingest_default,
6351
+ ...ingest_error_default,
6352
+ ...live_data_default,
6353
+ ...event_blacklist_default
6354
+ ];
6355
+ var tracking_default = commands71;
6356
+
6357
+ // src/commands/te-analysis/alert/shared.ts
6358
+ var alertIdFlag = {
6359
+ name: "alert-id",
6360
+ type: "number",
6361
+ required: true,
6362
+ desc: "Alert task ID."
6363
+ };
6364
+ var definitionFlag = {
6365
+ name: "definition",
6366
+ type: "json",
6367
+ required: true,
6368
+ desc: "Alert definition JSON object using snake_case field names. Read alert-definition-schema get first."
6369
+ };
6370
+ var limitFlag2 = {
6371
+ name: "limit",
6372
+ type: "number",
6373
+ required: false,
6374
+ desc: "Page size. Default: 50, max: 200.",
6375
+ min: 1,
6376
+ max: 200
6377
+ };
6378
+ var startTimeFlag2 = {
6379
+ name: "start-time",
6380
+ type: "string",
6381
+ required: false,
6382
+ desc: "Optional alert detail start time."
6383
+ };
6384
+ var endTimeFlag2 = {
6385
+ name: "end-time",
6386
+ type: "string",
6387
+ required: false,
6388
+ desc: "Optional alert detail end time."
6389
+ };
6390
+ function projectInput3(ctx) {
6391
+ return { project_id: ctx.num("project-id") };
6392
+ }
6393
+ function alertIdInput(ctx) {
6394
+ return { ...projectInput3(ctx), alert_id: ctx.num("alert-id") };
6395
+ }
6396
+
6397
+ // src/commands/te-analysis/alert/list.ts
6398
+ var analysisAlertList = createAnalysisCapabilityCommand({
6399
+ resource: "alert",
6400
+ command: "list",
6401
+ capabilityId: "analysis.alert.list",
6402
+ description: "List project alerts.",
6403
+ flags: [projectIdFlag, queryFlag, limitFlag2, offsetFlag],
6404
+ risk: "read",
6405
+ buildInput: (ctx) => compactInput({ ...projectInput3(ctx), query: optionalString2(ctx, "query"), limit: optionalNumber2(ctx, "limit"), offset: optionalNumber2(ctx, "offset") })
6406
+ });
6407
+
6408
+ // src/commands/te-analysis/alert/get.ts
6409
+ var analysisAlertGet = createAnalysisCapabilityCommand({
6410
+ resource: "alert",
6411
+ command: "get",
6412
+ capabilityId: "analysis.alert.get",
6413
+ description: "Get one alert.",
6414
+ flags: [projectIdFlag, alertIdFlag],
6415
+ risk: "read",
6416
+ buildInput: alertIdInput
6417
+ });
6418
+
6419
+ // src/commands/te-analysis/alert/create.ts
6420
+ var analysisAlertCreate = createAnalysisCapabilityCommand({
6421
+ resource: "alert",
6422
+ command: "create",
6423
+ capabilityId: "analysis.alert.create",
6424
+ description: "Create an alert.",
6425
+ flags: [projectIdFlag, definitionFlag],
6426
+ risk: "write",
6427
+ buildInput: (ctx) => ({ ...projectInput3(ctx), definition: ctx.json("definition") })
6428
+ });
6429
+
6430
+ // src/commands/te-analysis/alert/update.ts
6431
+ var analysisAlertUpdate = createAnalysisCapabilityCommand({
6432
+ resource: "alert",
6433
+ command: "update",
6434
+ capabilityId: "analysis.alert.update",
6435
+ description: "Update an alert.",
6436
+ flags: [projectIdFlag, alertIdFlag, definitionFlag],
6437
+ risk: "write",
6438
+ buildInput: (ctx) => ({ ...alertIdInput(ctx), definition: ctx.json("definition") })
6439
+ });
6440
+
6441
+ // src/commands/te-analysis/alert/delete.ts
6442
+ var analysisAlertDelete = createAnalysisCapabilityCommand({
6443
+ resource: "alert",
6444
+ command: "delete",
6445
+ capabilityId: "analysis.alert.delete",
6446
+ description: "Delete an alert.",
6447
+ flags: [projectIdFlag, alertIdFlag],
6448
+ risk: "high-risk-write",
6449
+ buildInput: alertIdInput
6450
+ });
6451
+
6452
+ // src/commands/te-analysis/alert/start.ts
6453
+ var analysisAlertStart = createAnalysisCapabilityCommand({
6454
+ resource: "alert",
6455
+ command: "start",
6456
+ capabilityId: "analysis.alert.start",
6457
+ description: "Start an alert.",
6458
+ flags: [projectIdFlag, alertIdFlag],
6459
+ risk: "write",
6460
+ buildInput: alertIdInput
6461
+ });
6462
+
6463
+ // src/commands/te-analysis/alert/stop.ts
6464
+ var analysisAlertStop = createAnalysisCapabilityCommand({
6465
+ resource: "alert",
6466
+ command: "stop",
6467
+ capabilityId: "analysis.alert.stop",
6468
+ description: "Stop an alert.",
6469
+ flags: [projectIdFlag, alertIdFlag],
6470
+ risk: "write",
6471
+ buildInput: alertIdInput
6472
+ });
6473
+
6474
+ // src/commands/te-analysis/alert/index.ts
6475
+ var commands72 = [
6476
+ analysisAlertList,
6477
+ analysisAlertGet,
6478
+ analysisAlertCreate,
6479
+ analysisAlertUpdate,
6480
+ analysisAlertDelete,
6481
+ analysisAlertStart,
6482
+ analysisAlertStop
6483
+ ];
6484
+ var alert_default = commands72;
6485
+
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
+ // src/commands/te-analysis/alert-detail/list.ts
6504
+ var analysisAlertDetailList = createAnalysisCapabilityCommand({
6505
+ resource: "alert-detail",
6506
+ command: "list",
6507
+ capabilityId: "analysis.alert_detail.list",
6508
+ description: "List alert delivery details.",
6509
+ flags: [projectIdFlag, alertIdFlag, startTimeFlag2, endTimeFlag2],
6510
+ risk: "read",
6511
+ buildInput: (ctx) => compactInput({ ...alertIdInput(ctx), start_time: optionalString2(ctx, "start-time"), end_time: optionalString2(ctx, "end-time") })
6512
+ });
6513
+
6514
+ // src/commands/te-analysis/alert-detail/index.ts
6515
+ var commands74 = [
6516
+ analysisAlertDetailList
6517
+ ];
6518
+ var alert_detail_default = commands74;
6519
+
6520
+ // src/commands/te-analysis/alert-job/list.ts
6521
+ var analysisAlertJobList = createAnalysisCapabilityCommand({
6522
+ resource: "alert-job",
6523
+ command: "list",
6524
+ capabilityId: "analysis.alert_job.list",
6525
+ description: "List alert job status.",
6526
+ flags: [projectIdFlag],
6527
+ risk: "read",
6528
+ buildInput: projectInput3
6529
+ });
6530
+
6531
+ // src/commands/te-analysis/alert-job/index.ts
6532
+ var commands75 = [
6533
+ analysisAlertJobList
6534
+ ];
6535
+ var alert_job_default = commands75;
6536
+
6537
+ // src/commands/te-analysis/alert-notice-config/list.ts
6538
+ var analysisAlertNoticeConfigList = createAnalysisCapabilityCommand({
6539
+ resource: "alert-notice-config",
6540
+ command: "list",
6541
+ capabilityId: "analysis.alert_notice_config.list",
6542
+ description: "List alert notice configs.",
6543
+ flags: [projectIdFlag],
6544
+ risk: "read",
6545
+ buildInput: projectInput3
6546
+ });
6547
+
6548
+ // src/commands/te-analysis/alert-notice-config/index.ts
6549
+ var commands76 = [
6550
+ analysisAlertNoticeConfigList
6551
+ ];
6552
+ var alert_notice_config_default = commands76;
4486
6553
 
4487
6554
  // src/commands/te-analysis/index.ts
4488
6555
  registerCapabilityGatewayRoute("analysis", { gatewayDomain: "analysis" });
6556
+ registerCapabilityGatewayRoute("tracking", { gatewayDomain: "analysis" });
4489
6557
  var baseCommands = [
4490
6558
  ...meta_default,
4491
6559
  ...governance_default,
@@ -4512,18 +6580,26 @@ var baseCommands = [
4512
6580
  ...model_default,
4513
6581
  ...event_detail_default,
4514
6582
  ...entity_detail_default,
4515
- ...drilldown_users_default,
6583
+ ...drilldown_events_default,
6584
+ ...drilldown_entities_default,
4516
6585
  ...drilldown_user_events_default,
4517
6586
  ...user_default,
4518
6587
  ...sql_table_default,
4519
6588
  ...entity_default,
4520
- ...input_file_default
6589
+ ...input_file_default,
6590
+ ...project_default,
6591
+ ...tracking_default,
6592
+ ...alert_default,
6593
+ ...alert_definition_schema_default,
6594
+ ...alert_detail_default,
6595
+ ...alert_job_default,
6596
+ ...alert_notice_config_default
4521
6597
  ];
4522
- var commands42 = [
6598
+ var commands77 = [
4523
6599
  ...baseCommands,
4524
6600
  ...isGlobalQueryModeEnabled() ? global_default : []
4525
6601
  ];
4526
- var te_analysis_default = commands42;
6602
+ var te_analysis_default = commands77;
4527
6603
  export {
4528
6604
  baseCommands,
4529
6605
  te_analysis_default as default