@thinkingai/ae-cli 6.0.32 → 6.0.34

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 (201) 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-QW4AVJHI.js → capability-AJC5CBRT.js} +49 -17
  6. package/dist/{capability-SCRFGODD.js → capability-TQ5KU5Q6.js} +49 -17
  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-7OLGDQQ2.js → chunk-6CHYBI64.js} +2 -2
  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-TBHBYKXZ.js → chunk-ISY6HMHM.js} +2 -2
  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 +505 -220
  29. package/dist/{metadata-BFDL6RUK.js → metadata-3M5F2AED.js} +14 -13
  30. package/dist/{metadata-FCLDBXX2.js → metadata-W2MEOI4Z.js} +14 -13
  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-PUVF5IF4.js → te-analysis-I73ZS4NK.js} +903 -33
  36. package/dist/{te-analysis-UJDOKPAN.js → te-analysis-Q7AZCDU4.js} +903 -33
  37. package/dist/{te-common-XLAGWNIV.js → te-common-ST3QPSXJ.js} +7 -6
  38. package/dist/{te-common-VUX3VOXZ.js → te-common-WSLIKKPC.js} +7 -6
  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-QBCCME22.js → te-engage-2FSDUOIZ.js} +973 -1585
  44. package/dist/{te-engage-K4AEUPK5.js → te-engage-BMJ6UOUU.js} +973 -1585
  45. package/dist/{te-kb-AYCODNU6.js → te-kb-E7NSCBRB.js} +74 -12
  46. package/dist/{te-meta-UUROEODR.js → te-meta-Q4L6EE3Q.js} +7 -6
  47. package/dist/{te-meta-ARDIW3YI.js → te-meta-VHCN4Q62.js} +7 -6
  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 +12 -1
  56. package/skills/ae-analysis/references/adhoc_export.md +2 -0
  57. package/skills/ae-analysis/references/adhoc_run.md +2 -0
  58. package/skills/ae-analysis/references/alert_create.md +25 -0
  59. package/skills/ae-analysis/references/alert_definition_schema_get.md +24 -0
  60. package/skills/ae-analysis/references/alert_delete.md +26 -0
  61. package/skills/ae-analysis/references/alert_detail_list.md +27 -0
  62. package/skills/ae-analysis/references/alert_get.md +25 -0
  63. package/skills/ae-analysis/references/alert_job_list.md +24 -0
  64. package/skills/ae-analysis/references/alert_list.md +27 -0
  65. package/skills/ae-analysis/references/alert_notice_config_list.md +24 -0
  66. package/skills/ae-analysis/references/alert_start.md +25 -0
  67. package/skills/ae-analysis/references/alert_stop.md +25 -0
  68. package/skills/ae-analysis/references/alert_update.md +26 -0
  69. package/skills/ae-analysis/references/bi_panel_create.md +3 -3
  70. package/skills/ae-analysis/references/check_delete.md +27 -0
  71. package/skills/ae-analysis/references/check_export.md +27 -0
  72. package/skills/ae-analysis/references/check_get.md +27 -0
  73. package/skills/ae-analysis/references/check_list.md +24 -0
  74. package/skills/ae-analysis/references/check_retry.md +27 -0
  75. package/skills/ae-analysis/references/check_run.md +25 -0
  76. package/skills/ae-analysis/references/command_index.md +61 -27
  77. package/skills/ae-analysis/references/dashboard_create.md +3 -3
  78. package/skills/ae-analysis/references/dashboard_daily_report_send.md +1 -0
  79. package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
  80. package/skills/ae-analysis/references/dashboard_report_data_export.md +3 -3
  81. package/skills/ae-analysis/references/dashboard_report_data_run.md +3 -3
  82. package/skills/ae-analysis/references/event_blacklist_add.md +25 -0
  83. package/skills/ae-analysis/references/event_blacklist_list.md +24 -0
  84. package/skills/ae-analysis/references/event_blacklist_update.md +26 -0
  85. package/skills/ae-analysis/references/ingest_error_list.md +27 -0
  86. package/skills/ae-analysis/references/ingest_summary.md +26 -0
  87. package/skills/ae-analysis/references/live_data_export.md +27 -0
  88. package/skills/ae-analysis/references/live_data_list.md +27 -0
  89. package/skills/ae-analysis/references/plan_change_log_export.md +27 -0
  90. package/skills/ae-analysis/references/plan_change_log_list.md +24 -0
  91. package/skills/ae-analysis/references/plan_delete_items.md +30 -0
  92. package/skills/ae-analysis/references/plan_export.md +26 -0
  93. package/skills/ae-analysis/references/plan_generate.md +27 -0
  94. package/skills/ae-analysis/references/plan_get.md +24 -0
  95. package/skills/ae-analysis/references/plan_import_excel.md +26 -0
  96. package/skills/ae-analysis/references/plan_save_items.md +27 -0
  97. package/skills/ae-analysis/references/plan_sync_from_meta.md +24 -0
  98. package/skills/ae-analysis/references/project_role_delete.md +4 -3
  99. package/skills/ae-analysis/references/project_role_get.md +4 -3
  100. package/skills/ae-analysis/references/project_role_user_list.md +4 -3
  101. package/skills/ae-analysis/references/query_create_result_cluster.md +2 -1
  102. package/skills/ae-analysis/references/report_data_export.md +3 -1
  103. package/skills/ae-analysis/references/report_data_run.md +12 -2
  104. package/skills/ae-analysis/references/sdk_sample_generate.md +24 -0
  105. package/skills/ae-analysis/references/user_cluster_create.md +2 -0
  106. package/skills/ae-analysis/references/user_cluster_create_id.md +2 -0
  107. package/skills/ae-analysis/references/user_cluster_update.md +2 -0
  108. package/skills/ae-analysis/references/user_cluster_update_id.md +2 -0
  109. package/skills/ae-analysis/references/user_tag_create.md +2 -0
  110. package/skills/ae-analysis/references/user_tag_create_id.md +2 -0
  111. package/skills/ae-analysis/references/user_tag_update.md +2 -0
  112. package/skills/ae-analysis/references/user_tag_update_id.md +2 -0
  113. package/skills/ae-analysis-global/SKILL.md +2 -0
  114. package/skills/ae-capability/SKILL.md +7 -5
  115. package/skills/ae-community/SKILL.md +72 -8
  116. package/skills/ae-community/references/community-chat-analysis.md +341 -0
  117. package/skills/ae-community/references/community-data-report.md +301 -0
  118. package/skills/ae-dataops/SKILL.md +2 -1
  119. package/skills/ae-engage/SKILL.md +129 -105
  120. package/skills/ae-engage/references/activity-activity-type.md +1 -1
  121. package/skills/ae-engage/references/activity-activity.md +1 -1
  122. package/skills/ae-engage/references/activity-approval.md +5 -7
  123. package/skills/ae-engage/references/activity-task.md +12 -18
  124. package/skills/ae-engage/references/activity-topic.md +39 -22
  125. package/skills/ae-engage/references/add-approver.md +4 -4
  126. package/skills/ae-engage/references/add-channel.md +10 -5
  127. package/skills/ae-engage/references/approval-approver-delete.md +1 -1
  128. package/skills/ae-engage/references/approver-list.md +4 -4
  129. package/skills/ae-engage/references/build-task-save-guide.md +13 -13
  130. package/skills/ae-engage/references/cancel-query-by-request-id.md +7 -6
  131. package/skills/ae-engage/references/channel-detail.md +14 -9
  132. package/skills/ae-engage/references/channel-list.md +15 -10
  133. package/skills/ae-engage/references/channel-mgmt.md +109 -0
  134. package/skills/ae-engage/references/channel-test-send.md +1 -1
  135. package/skills/ae-engage/references/channel-update-config.md +1 -1
  136. package/skills/ae-engage/references/channel_touch_limits_list.md +1 -1
  137. package/skills/ae-engage/references/client-param.md +34 -16
  138. package/skills/ae-engage/references/common-metric.md +85 -18
  139. package/skills/ae-engage/references/config-item-analysis-report.md +8 -27
  140. package/skills/ae-engage/references/config-item-strategy-comparison.md +7 -18
  141. package/skills/ae-engage/references/config-item-trigger-report.md +8 -35
  142. package/skills/ae-engage/references/delete-channel.md +5 -5
  143. package/skills/ae-engage/references/delete-flow.md +5 -5
  144. package/skills/ae-engage/references/flow-ab-split-node-report.md +11 -45
  145. package/skills/ae-engage/references/flow-detail.md +15 -10
  146. package/skills/ae-engage/references/flow-list.md +9 -4
  147. package/skills/ae-engage/references/flow-node-config-schema.md +9 -8
  148. package/skills/ae-engage/references/flow-node-detail-report.md +11 -46
  149. package/skills/ae-engage/references/flow-node-overview-report.md +11 -43
  150. package/skills/ae-engage/references/flow-process-report.md +12 -50
  151. package/skills/ae-engage/references/flow-update-remark.md +19 -0
  152. package/skills/ae-engage/references/manage-flow.md +19 -19
  153. package/skills/ae-engage/references/manage-task.md +5 -5
  154. package/skills/ae-engage/references/modify-flow-base-info.md +8 -8
  155. package/skills/ae-engage/references/preset-event.md +1 -1
  156. package/skills/ae-engage/references/push-language.md +1 -1
  157. package/skills/ae-engage/references/save-flow.md +54 -52
  158. package/skills/ae-engage/references/save-task.md +23 -17
  159. package/skills/ae-engage/references/scene-config-channel.md +90 -10
  160. package/skills/ae-engage/references/scene-config-group.md +1 -1
  161. package/skills/ae-engage/references/scene-config-item.md +27 -4
  162. package/skills/ae-engage/references/scene-config-metric.md +1 -1
  163. package/skills/ae-engage/references/scene-config-param.md +2 -2
  164. package/skills/ae-engage/references/scene-preset-metric.md +1 -1
  165. package/skills/ae-engage/references/scene-strategy.md +19 -3
  166. package/skills/ae-engage/references/scene-template.md +10 -4
  167. package/skills/ae-engage/references/task-data-detail.md +5 -67
  168. package/skills/ae-engage/references/task-data-overview.md +5 -35
  169. package/skills/ae-engage/references/task-detail.md +5 -5
  170. package/skills/ae-engage/references/task-experiment-report.md +5 -38
  171. package/skills/ae-engage/references/task-list.md +4 -4
  172. package/skills/ae-engage/references/task-metric-detail.md +5 -43
  173. package/skills/ae-engage/references/task-stats.md +5 -5
  174. package/skills/ae-engage/references/update-channel-status.md +6 -6
  175. package/skills/ae-engage/references/validate-flow-node-config.md +12 -11
  176. package/skills/ae-engage/references/whitelist-list.md +4 -4
  177. package/skills/ae-engage/references/whitelist.md +1 -1
  178. package/skills/ae-engage/references/workbench-workbench.md +1 -1
  179. package/skills/ae-generate-tracking-code/SKILL.md +4 -4
  180. package/skills/ae-generate-tracking-plan/SKILL.md +132 -11
  181. package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +98 -33
  182. package/skills/ae-generate-tracking-plan/references/xlsx-schema.md +16 -14
  183. package/skills/ae-kb/SKILL.md +11 -6
  184. package/skills/ae-metadata/SKILL.md +2 -1
  185. package/skills/ae-team/SKILL.md +2 -1
  186. package/dist/chunk-NOO24N7W.js +0 -11
  187. package/dist/chunk-TNW2CI4W.js +0 -129
  188. package/dist/te-community-PEZ2VEF7.js +0 -687
  189. package/dist/te-community-TSKJ652U.js +0 -687
  190. package/skills/ae-engage/references/config-channel-detail.md +0 -31
  191. package/skills/ae-engage/references/config-channel-list.md +0 -26
  192. package/skills/ae-engage/references/config-item-detail.md +0 -29
  193. package/skills/ae-engage/references/config-item-list.md +0 -18
  194. package/skills/ae-engage/references/copy-config-template.md +0 -28
  195. package/skills/ae-engage/references/delete-config-channel.md +0 -23
  196. package/skills/ae-engage/references/delete-config-item.md +0 -24
  197. package/skills/ae-engage/references/engage-scene-config-item.md +0 -69
  198. package/skills/ae-engage/references/manage-strategy.md +0 -73
  199. package/skills/ae-engage/references/strategy-detail.md +0 -72
  200. package/skills/ae-engage/references/strategy-list.md +0 -20
  201. package/skills/ae-engage/references/update-config-channel-status.md +0 -31
@@ -1,24 +1,18 @@
1
1
  import {
2
2
  createCapabilityCommand
3
- } from "./chunk-7OLGDQQ2.js";
3
+ } from "./chunk-ISY6HMHM.js";
4
4
  import {
5
5
  registerCapabilityGatewayRoute
6
6
  } from "./chunk-PTE56QPL.js";
7
- import "./chunk-DYOS6YY7.js";
7
+ import "./chunk-HQ2A7ITL.js";
8
8
  import {
9
9
  printError
10
- } from "./chunk-TNW2CI4W.js";
11
- import {
12
- callMcpTool,
13
- parseMcpResult,
14
- registerMcpMappings,
15
- resolveMcpUrl
16
- } from "./chunk-6LEYLOV3.js";
17
- import "./chunk-KGJQCYVC.js";
18
- import "./chunk-NOO24N7W.js";
19
- import "./chunk-2NDGFQHW.js";
20
- import "./chunk-AJTH7LT3.js";
21
- import "./chunk-YCLVYFK7.js";
10
+ } from "./chunk-IMMGMU54.js";
11
+ import "./chunk-E7UXXHO3.js";
12
+ import "./chunk-IR4ZLVPW.js";
13
+ import "./chunk-V6FR6WTW.js";
14
+ import "./chunk-24BAVOX3.js";
15
+ import "./chunk-LYVNONC4.js";
22
16
 
23
17
  // src/commands/te-engage/shared.ts
24
18
  function createEngageCapabilityCommand(cliService, config) {
@@ -47,6 +41,239 @@ function createEngageWorkbenchCapabilityCommand(config) {
47
41
  return createEngageCapabilityCommand("engage-workbench", config);
48
42
  }
49
43
 
44
+ // src/commands/te-engage/engage-flow/flow/update-remark.ts
45
+ var flowUpdateRemark = createEngageFlowCapabilityCommand({
46
+ resource: "flow",
47
+ command: "update-remark",
48
+ capabilityId: "engage-flow.version.update-remark",
49
+ description: "Update a flow version remark.",
50
+ flags: [
51
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
52
+ { name: "flow-uuid", type: "string", required: true, desc: "Flow version UUID whose remark should be updated." },
53
+ {
54
+ name: "flow-version-desc",
55
+ type: "string",
56
+ required: true,
57
+ desc: "Updated flow version remark. Pass an empty string to clear it."
58
+ }
59
+ ],
60
+ risk: "write",
61
+ buildInput: (ctx) => ({
62
+ project_id: ctx.num("project-id"),
63
+ flow_uuid: ctx.str("flow-uuid"),
64
+ flow_version_desc: ctx.str("flow-version-desc")
65
+ })
66
+ });
67
+
68
+ // src/commands/te-engage/utils.ts
69
+ function hasFlag(ctx, name) {
70
+ return ctx.str(name) !== "";
71
+ }
72
+ function readOptionalString(ctx, name) {
73
+ const value = ctx.str(name);
74
+ return value === "" ? void 0 : value;
75
+ }
76
+ function readOptionalNumber(ctx, name) {
77
+ return hasFlag(ctx, name) ? ctx.num(name) : void 0;
78
+ }
79
+ function readOptionalJsonArray(ctx, name) {
80
+ const value = ctx.json(name);
81
+ if (value === void 0) return void 0;
82
+ if (!Array.isArray(value)) {
83
+ throw new Error(`Flag --${name} must be a JSON array`);
84
+ }
85
+ return value;
86
+ }
87
+ function readRequiredJsonArray(ctx, name, minLength = 1) {
88
+ const value = readOptionalJsonArray(ctx, name);
89
+ if (!value || value.length < minLength) {
90
+ throw new Error(`Flag --${name} must be a JSON array with at least ${minLength} item(s)`);
91
+ }
92
+ return value;
93
+ }
94
+ function readRequiredJsonObject(ctx, name) {
95
+ const value = ctx.json(name);
96
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
97
+ throw new Error(`Flag --${name} must be a JSON object`);
98
+ }
99
+ return value;
100
+ }
101
+ function requireAnyFlag(ctx, names) {
102
+ if (!names.some((name) => hasFlag(ctx, name))) {
103
+ throw new Error(`At least one of ${names.map((name) => `--${name}`).join(", ")} is required`);
104
+ }
105
+ }
106
+ function requireAllowedValue(value, allowed, flagName) {
107
+ if (!allowed.includes(value)) {
108
+ throw new Error(`Flag --${flagName} must be one of: ${allowed.join(", ")}`);
109
+ }
110
+ }
111
+
112
+ // src/commands/te-engage/engage-flow/flow/delete.ts
113
+ var flowDelete = createEngageFlowCapabilityCommand({
114
+ resource: "flow",
115
+ command: "delete",
116
+ capabilityId: "engage-flow.flow.delete",
117
+ description: "Batch delete flow canvases.",
118
+ flags: [
119
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
120
+ { name: "flow-uuid-list", type: "json", required: true, desc: "Flow UUIDs as a JSON array." }
121
+ ],
122
+ risk: "high-risk-write",
123
+ validate: (ctx) => {
124
+ readRequiredJsonArray(ctx, "flow-uuid-list");
125
+ },
126
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), flow_uuid_list: readRequiredJsonArray(ctx, "flow-uuid-list") })
127
+ });
128
+
129
+ // src/commands/te-engage/engage-flow/flow/get.ts
130
+ var flowGet = createEngageFlowCapabilityCommand({
131
+ resource: "flow",
132
+ command: "get",
133
+ capabilityId: "engage-flow.flow.get",
134
+ description: "Get one flow canvas by UUID.",
135
+ flags: [
136
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
137
+ { name: "flow-uuid", type: "string", required: true, desc: "Flow UUID." }
138
+ ],
139
+ risk: "read",
140
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), flow_uuid: ctx.str("flow-uuid") })
141
+ });
142
+
143
+ // src/commands/te-engage/engage-flow/flow/list.ts
144
+ var flowList = createEngageFlowCapabilityCommand({
145
+ resource: "flow",
146
+ command: "list",
147
+ capabilityId: "engage-flow.flow.list",
148
+ description: "List flow canvases in a project.",
149
+ flags: [{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }],
150
+ risk: "read",
151
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id") })
152
+ });
153
+
154
+ // src/commands/te-engage/engage-flow/flow/manage.ts
155
+ function validateAction(ctx) {
156
+ const action = ctx.str("action");
157
+ if (["approve", "deny", "cancel"].includes(action)) readRequiredJsonArray(ctx, "flow-list");
158
+ if (action === "pause") readRequiredJsonArray(ctx, "pause-flow-list");
159
+ if (["recover", "end"].includes(action)) readRequiredJsonArray(ctx, "flow-id-list");
160
+ }
161
+ var flowManage = createEngageFlowCapabilityCommand({
162
+ resource: "flow",
163
+ command: "manage",
164
+ capabilityId: "engage-flow.flow.manage",
165
+ description: "Batch approve, deny, cancel, pause, recover, or end flows.",
166
+ flags: [
167
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
168
+ { name: "action", type: "string", required: true, desc: "approve, deny, cancel, pause, recover, or end." },
169
+ { name: "flow-list", type: "json", required: false, desc: "Flow review items as a JSON array." },
170
+ { name: "pause-flow-list", type: "json", required: false, desc: "Flow pause items as a JSON array." },
171
+ { name: "flow-id-list", type: "json", required: false, desc: "Flow IDs as a JSON array." },
172
+ { name: "reason", type: "string", required: false, desc: "Review reason." }
173
+ ],
174
+ risk: "write",
175
+ validate: validateAction,
176
+ buildInput: (ctx) => ({
177
+ project_id: ctx.num("project-id"),
178
+ action: ctx.str("action"),
179
+ ...readOptionalJsonArray(ctx, "flow-list") !== void 0 && { flow_list: readOptionalJsonArray(ctx, "flow-list") },
180
+ ...readOptionalJsonArray(ctx, "pause-flow-list") !== void 0 && { pause_flow_list: readOptionalJsonArray(ctx, "pause-flow-list") },
181
+ ...readOptionalJsonArray(ctx, "flow-id-list") !== void 0 && { flow_id_list: readOptionalJsonArray(ctx, "flow-id-list") },
182
+ ...readOptionalString(ctx, "reason") !== void 0 && { reason: readOptionalString(ctx, "reason") }
183
+ })
184
+ });
185
+
186
+ // src/commands/te-engage/engage-flow/flow/modify-base-info.ts
187
+ var flowModifyBaseInfo = createEngageFlowCapabilityCommand({
188
+ resource: "flow",
189
+ command: "modify-base-info",
190
+ capabilityId: "engage-flow.flow.modify-base-info",
191
+ description: "Modify flow name, description, or group.",
192
+ flags: [
193
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
194
+ { name: "flow-uuid", type: "string", required: true, desc: "Flow UUID." },
195
+ { name: "flow-name", type: "string", required: false, desc: "New flow name." },
196
+ { name: "flow-desc", type: "string", required: false, desc: "New flow description." },
197
+ { name: "group-id", type: "number", required: false, desc: "New group ID." }
198
+ ],
199
+ risk: "write",
200
+ validate: (ctx) => requireAnyFlag(ctx, ["flow-name", "flow-desc", "group-id"]),
201
+ buildInput: (ctx) => ({
202
+ project_id: ctx.num("project-id"),
203
+ flow_uuid: ctx.str("flow-uuid"),
204
+ ...readOptionalString(ctx, "flow-name") !== void 0 && { flow_name: readOptionalString(ctx, "flow-name") },
205
+ ...readOptionalString(ctx, "flow-desc") !== void 0 && { flow_desc: readOptionalString(ctx, "flow-desc") },
206
+ ...readOptionalNumber(ctx, "group-id") !== void 0 && { group_id: readOptionalNumber(ctx, "group-id") }
207
+ })
208
+ });
209
+
210
+ // src/commands/te-engage/engage-flow/flow/save.ts
211
+ var allowedOperations = ["build", "preview", "commit"];
212
+ function readRequest(ctx) {
213
+ const req = readRequiredJsonObject(ctx, "req");
214
+ const operation = typeof req.operation === "string" ? req.operation.trim().toLowerCase() : "";
215
+ if (!allowedOperations.includes(operation)) {
216
+ throw new Error(`Flag --req.operation must be one of: ${allowedOperations.join(", ")}`);
217
+ }
218
+ if ("nodeList" in req || "edgeList" in req) {
219
+ throw new Error("Flag --req must use nodes/edges instead of legacy nodeList/edgeList");
220
+ }
221
+ if ("sourceFlowUuid" in req) {
222
+ throw new Error("Flag --req.sourceFlowUuid is unsupported; get the source flow and build nodes/edges instead");
223
+ }
224
+ return req;
225
+ }
226
+ var flowSave = createEngageFlowCapabilityCommand({
227
+ resource: "flow",
228
+ command: "save",
229
+ capabilityId: "engage-flow.flow.save",
230
+ description: "Build, preview, or commit an operation-based flow draft.",
231
+ flags: [
232
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
233
+ { name: "req", type: "json", required: true, desc: "Operation-based flow save request JSON object." }
234
+ ],
235
+ risk: "write",
236
+ validate: (ctx) => {
237
+ readRequest(ctx);
238
+ },
239
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequest(ctx) })
240
+ });
241
+
242
+ // src/commands/te-engage/engage-flow/node-config/schema.ts
243
+ var nodeConfigSchema = createEngageFlowCapabilityCommand({
244
+ resource: "node-config",
245
+ command: "schema",
246
+ capabilityId: "engage-flow.node-config.schema",
247
+ description: "Get the configuration schema for one flow node type.",
248
+ flags: [
249
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
250
+ { name: "node-type", type: "string", required: true, desc: "Flow node type." }
251
+ ],
252
+ risk: "read",
253
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), node_type: ctx.str("node-type") })
254
+ });
255
+
256
+ // src/commands/te-engage/engage-flow/node-config/validate.ts
257
+ var nodeConfigValidate = createEngageFlowCapabilityCommand({
258
+ resource: "node-config",
259
+ command: "validate",
260
+ capabilityId: "engage-flow.node-config.validate",
261
+ description: "Validate one flow node configuration.",
262
+ flags: [
263
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
264
+ { name: "node-type", type: "string", required: true, desc: "Flow node type." },
265
+ { name: "config", type: "string", required: true, desc: "Node configuration JSON encoded as a string." },
266
+ { name: "operation-mode", type: "string", required: true, desc: "Validation mode." }
267
+ ],
268
+ risk: "read",
269
+ buildInput: (ctx) => ({
270
+ project_id: ctx.num("project-id"),
271
+ node_type: ctx.str("node-type"),
272
+ config: ctx.str("config"),
273
+ operation_mode: ctx.str("operation-mode")
274
+ })
275
+ });
276
+
50
277
  // src/commands/te-engage/engage-flow/operation-log/query.ts
51
278
  var operationLogQuery = createEngageFlowCapabilityCommand({
52
279
  resource: "operation-log",
@@ -77,9 +304,18 @@ var versionList = createEngageFlowCapabilityCommand({
77
304
 
78
305
  // src/commands/te-engage/engage-flow/index.ts
79
306
  var commands = [
307
+ flowList,
308
+ flowGet,
309
+ flowSave,
310
+ nodeConfigSchema,
311
+ nodeConfigValidate,
312
+ flowModifyBaseInfo,
313
+ flowManage,
314
+ flowDelete,
80
315
  operationLogQuery,
81
- // testRun, // temporarily disabled: ae-cli engage-flow test run
82
- versionList
316
+ // testRun,
317
+ versionList,
318
+ flowUpdateRemark
83
319
  ];
84
320
  var engage_flow_default = commands;
85
321
 
@@ -230,7 +466,7 @@ function validateContentListShape(contentList) {
230
466
  printError(
231
467
  "validation",
232
468
  `--content-list[${index}] must include a non-empty string key and a value field.`,
233
- "The key must match a channel template param from engage +channel_detail data.config.paramsList[].key."
469
+ "The key must match a channel template param from engage-setting channel get data.item.config.params_list[].key."
234
470
  );
235
471
  process.exit(1);
236
472
  }
@@ -277,6 +513,89 @@ var channelTestSend = createEngageSettingCapabilityCommand({
277
513
  })
278
514
  });
279
515
 
516
+ // src/commands/te-engage/engage-setting/channel/list.ts
517
+ var channelList = createEngageSettingCapabilityCommand({
518
+ resource: "channel",
519
+ command: "list",
520
+ capabilityId: "engage-setting.channel.list",
521
+ description: "Query channels in a project.",
522
+ flags: [
523
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
524
+ { name: "provider-list", type: "json", required: false, desc: "Channel provider subtype JSON array." },
525
+ { name: "channel-status", type: "number", required: false, desc: "Channel status: 0 disabled, 1 enabled." }
526
+ ],
527
+ risk: "read",
528
+ buildInput: (ctx) => ({
529
+ project_id: ctx.num("project-id"),
530
+ ...readOptionalJsonArray(ctx, "provider-list") !== void 0 && { provider_list: readOptionalJsonArray(ctx, "provider-list") },
531
+ ...readOptionalNumber(ctx, "channel-status") !== void 0 && { channel_status: readOptionalNumber(ctx, "channel-status") }
532
+ })
533
+ });
534
+
535
+ // src/commands/te-engage/engage-setting/channel/get.ts
536
+ var channelGet = createEngageSettingCapabilityCommand({
537
+ resource: "channel",
538
+ command: "get",
539
+ capabilityId: "engage-setting.channel.get",
540
+ description: "Get one channel's details.",
541
+ flags: [
542
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
543
+ { name: "channel-id", type: "string", required: true, desc: "Channel ID." }
544
+ ],
545
+ risk: "read",
546
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), channel_id: ctx.str("channel-id") })
547
+ });
548
+
549
+ // src/commands/te-engage/engage-setting/channel/create.ts
550
+ var channelCreate = createEngageSettingCapabilityCommand({
551
+ resource: "channel",
552
+ command: "create",
553
+ capabilityId: "engage-setting.channel.create",
554
+ description: "Create a channel.",
555
+ flags: [
556
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
557
+ { name: "req", type: "json", required: true, desc: "ChannelNewDTO request JSON object." }
558
+ ],
559
+ risk: "write",
560
+ validate: (ctx) => {
561
+ readRequiredJsonObject(ctx, "req");
562
+ },
563
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequiredJsonObject(ctx, "req") })
564
+ });
565
+
566
+ // src/commands/te-engage/engage-setting/channel/update-status.ts
567
+ var channelUpdateStatus = createEngageSettingCapabilityCommand({
568
+ resource: "channel",
569
+ command: "update-status",
570
+ capabilityId: "engage-setting.channel.update-status",
571
+ description: "Enable or disable a channel.",
572
+ flags: [
573
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
574
+ { name: "channel-id", type: "string", required: true, desc: "Channel ID." },
575
+ { name: "status", type: "number", required: true, desc: "Channel status: 1 enabled, 2 disabled." }
576
+ ],
577
+ risk: "write",
578
+ buildInput: (ctx) => ({
579
+ project_id: ctx.num("project-id"),
580
+ channel_id: ctx.str("channel-id"),
581
+ status: ctx.num("status")
582
+ })
583
+ });
584
+
585
+ // src/commands/te-engage/engage-setting/channel/delete.ts
586
+ var channelDelete = createEngageSettingCapabilityCommand({
587
+ resource: "channel",
588
+ command: "delete",
589
+ capabilityId: "engage-setting.channel.delete",
590
+ description: "Delete a disabled channel.",
591
+ flags: [
592
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
593
+ { name: "channel-id", type: "string", required: true, desc: "Channel ID." }
594
+ ],
595
+ risk: "high-risk-write",
596
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), channel_id: ctx.str("channel-id") })
597
+ });
598
+
280
599
  // src/commands/te-engage/engage-setting/approval-approver/delete.ts
281
600
  var approvalApproverDelete = createEngageSettingCapabilityCommand({
282
601
  resource: "approval-approver",
@@ -294,6 +613,37 @@ var approvalApproverDelete = createEngageSettingCapabilityCommand({
294
613
  })
295
614
  });
296
615
 
616
+ // src/commands/te-engage/engage-setting/approval-approver/add.ts
617
+ var approvalApproverAdd = createEngageSettingCapabilityCommand({
618
+ resource: "approval-approver",
619
+ command: "add",
620
+ capabilityId: "engage-setting.approval-approver.add",
621
+ description: "Add up to 10 approvers to a project.",
622
+ flags: [
623
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
624
+ { name: "approvers", type: "json", required: true, desc: "Approver open ID JSON array; maximum 10." }
625
+ ],
626
+ risk: "write",
627
+ validate: (ctx) => {
628
+ readRequiredJsonArray(ctx, "approvers");
629
+ },
630
+ buildInput: (ctx) => ({
631
+ project_id: ctx.num("project-id"),
632
+ approvers: readRequiredJsonArray(ctx, "approvers")
633
+ })
634
+ });
635
+
636
+ // src/commands/te-engage/engage-setting/approval-approver/list.ts
637
+ var approvalApproverList = createEngageSettingCapabilityCommand({
638
+ resource: "approval-approver",
639
+ command: "list",
640
+ capabilityId: "engage-setting.approval-approver.list",
641
+ description: "Query approvers in a project.",
642
+ flags: [{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }],
643
+ risk: "read",
644
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id") })
645
+ });
646
+
297
647
  // src/commands/te-engage/engage-setting/whitelist/add.ts
298
648
  var whitelistAdd = createEngageSettingCapabilityCommand({
299
649
  resource: "whitelist",
@@ -389,6 +739,17 @@ var whitelistVerify = createEngageSettingCapabilityCommand({
389
739
  })
390
740
  });
391
741
 
742
+ // src/commands/te-engage/engage-setting/whitelist/list.ts
743
+ var whitelistList = createEngageSettingCapabilityCommand({
744
+ resource: "whitelist",
745
+ command: "list",
746
+ capabilityId: "engage-setting.whitelist.list",
747
+ description: "Query whitelist entries in a project.",
748
+ flags: [{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." }],
749
+ risk: "read",
750
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id") })
751
+ });
752
+
392
753
  // src/commands/te-engage/engage-setting/push-language/get.ts
393
754
  var pushLanguageGet = createEngageSettingCapabilityCommand({
394
755
  resource: "push-language",
@@ -426,34 +787,71 @@ var pushLanguageSet = createEngageSettingCapabilityCommand({
426
787
  })
427
788
  });
428
789
 
790
+ // src/commands/te-engage/engage-setting/client-param/create.ts
791
+ var clientParamCreate = createEngageSettingCapabilityCommand({
792
+ resource: "client-param",
793
+ command: "create",
794
+ capabilityId: "engage-setting.client-param.create",
795
+ description: "Create a custom client-side parameter. Pass column_type only; select_type is derived server-side. Allowed column_type: varchar, bigint, double, boolean.",
796
+ flags: [
797
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
798
+ {
799
+ name: "column-name",
800
+ type: "string",
801
+ required: true,
802
+ desc: "Client param column name. Must match ^[A-Za-z][A-Za-z0-9_]*$, max 80."
803
+ },
804
+ {
805
+ name: "column-type",
806
+ type: "string",
807
+ required: true,
808
+ desc: "Column type: varchar, bigint, double, or boolean. select_type is derived server-side."
809
+ },
810
+ { name: "column-desc", type: "string", required: false, desc: "Display name of the param. Defaults to an empty string." },
811
+ { name: "column-remark", type: "string", required: false, desc: "Description/remark for the param." },
812
+ {
813
+ name: "alternative-val",
814
+ type: "json",
815
+ required: false,
816
+ desc: "Optional JSON array of alternative values. Only allowed when column_type is varchar."
817
+ }
818
+ ],
819
+ risk: "write",
820
+ buildInput: (ctx) => ({
821
+ project_id: ctx.num("project-id"),
822
+ column_name: ctx.str("column-name"),
823
+ column_type: ctx.str("column-type"),
824
+ column_desc: ctx.str("column-desc") || "",
825
+ column_remark: ctx.str("column-remark") || void 0,
826
+ alternative_val: ctx.json("alternative-val") || void 0
827
+ })
828
+ });
829
+
429
830
  // src/commands/te-engage/engage-setting/client-param/update.ts
430
831
  var clientParamUpdate = createEngageSettingCapabilityCommand({
431
832
  resource: "client-param",
432
833
  command: "update",
433
834
  capabilityId: "engage-setting.client-param.update",
434
- description: "Update an existing custom client parameter's type, select mode, and display metadata.",
835
+ description: "Update display name, remark, and alternative values of a custom client param. column_type and select_type are immutable.",
435
836
  flags: [
436
837
  { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
437
838
  { name: "column-name", type: "string", required: true, desc: "Client param column name." },
438
- { name: "column-type", type: "string", required: true, desc: "Column type (see ColumnTypeEnum)." },
439
- { name: "select-type", type: "string", required: true, desc: "Select type (see SelectTypeEnum)." },
440
- { name: "column-source", type: "string", required: false, desc: "Param source: preset or custom." },
441
- { name: "column-desc", type: "string", required: false, desc: "Display name of the param. Defaults to an empty string." },
442
- { name: "column-remark", type: "string", required: false, desc: "Description/remark for the param." },
443
- { name: "alternative-val", type: "json", required: false, desc: "Optional JSON array of alternative values." },
444
- { name: "system-id-param", type: "boolean", required: false, desc: "Whether this is a system identifier param." }
839
+ { name: "column-desc", type: "string", required: false, desc: "Display name of the param. Omit to keep the existing value." },
840
+ { name: "column-remark", type: "string", required: false, desc: "Description/remark for the param. Omit to keep the existing value." },
841
+ {
842
+ name: "alternative-val",
843
+ type: "json",
844
+ required: false,
845
+ desc: "Optional JSON array of alternative values. Only allowed when existing column_type is varchar. Omit to keep existing values."
846
+ }
445
847
  ],
446
848
  risk: "write",
447
849
  buildInput: (ctx) => ({
448
850
  project_id: ctx.num("project-id"),
449
851
  column_name: ctx.str("column-name"),
450
- column_type: ctx.str("column-type"),
451
- select_type: ctx.str("select-type"),
452
- column_source: ctx.str("column-source") || void 0,
453
- column_desc: ctx.str("column-desc") || "",
852
+ column_desc: ctx.str("column-desc") || void 0,
454
853
  column_remark: ctx.str("column-remark") || void 0,
455
- alternative_val: ctx.json("alternative-val") || void 0,
456
- system_id_param: ctx.bool("system-id-param")
854
+ alternative_val: ctx.json("alternative-val") || void 0
457
855
  })
458
856
  });
459
857
 
@@ -678,26 +1076,77 @@ var commonMetricGet = createEngageSettingCapabilityCommand({
678
1076
  });
679
1077
 
680
1078
  // src/commands/te-engage/engage-setting/common-metric/metric-qp-validation.ts
1079
+ var VALID_WINDOW_TIME_UNITS = /* @__PURE__ */ new Set(["minute", "hour", "day"]);
681
1080
  function validateMetricQpFlag(metricQp) {
682
- if (metricQp.trim() !== "{}") {
683
- return;
684
- }
1081
+ let parsed;
1082
+ try {
1083
+ parsed = JSON.parse(metricQp);
1084
+ } catch {
1085
+ printError(
1086
+ "validation",
1087
+ "--metric-qp must be a valid JSON object string.",
1088
+ "Discover events via analysis-meta event list, then assemble a type=0/1 metric QP object."
1089
+ );
1090
+ process.exit(1);
1091
+ }
1092
+ if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
1093
+ printError(
1094
+ "validation",
1095
+ "--metric-qp must be a JSON object string.",
1096
+ 'Do not pass placeholders like "event"; pass a complete metric QP object.'
1097
+ );
1098
+ process.exit(1);
1099
+ }
1100
+ if (Object.keys(parsed).length === 0) {
1101
+ printError(
1102
+ "validation",
1103
+ "--metric-qp cannot be an empty JSON object.",
1104
+ "Pass a complete metric QP expression instead of {}."
1105
+ );
1106
+ process.exit(1);
1107
+ }
1108
+ }
1109
+ function validateMetricWindowTimeUnitFlag(unit) {
1110
+ if (VALID_WINDOW_TIME_UNITS.has(unit)) {
1111
+ return;
1112
+ }
1113
+ printError(
1114
+ "validation",
1115
+ "--metric-window-time-unit must be one of: minute, hour, day.",
1116
+ "Use lowercase values matching the Engage console / TimeUnitEnum."
1117
+ );
1118
+ process.exit(1);
1119
+ }
1120
+ function validatePresetMetricTypeFlag(metricType) {
1121
+ if (metricType === 1) {
1122
+ return;
1123
+ }
685
1124
  printError(
686
1125
  "validation",
687
- "--metric-qp cannot be an empty JSON object.",
688
- "Pass a complete metric QP expression instead of {}."
1126
+ "--metric-type must be 1 (PRESET) for common-metric create.",
1127
+ "Common metrics on the analysis setting page always use metric_type=1."
689
1128
  );
690
1129
  process.exit(1);
691
1130
  }
692
1131
 
693
- // src/commands/te-engage/engage-setting/common-metric/update.ts
1132
+ // src/commands/te-engage/engage-setting/common-metric/create.ts
694
1133
  var writeFlags = [
695
1134
  { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
696
- { name: "metric-type", type: "number", required: true, desc: "Metric type (see MetricTypeEunm)." },
697
- { name: "metric-name", type: "string", required: true, desc: "Metric name." },
698
- { name: "metric-qp", type: "string", required: true, desc: "Metric qp (event/property expression)." },
1135
+ { name: "metric-type", type: "number", required: true, desc: "Metric type; create requires 1 (PRESET)." },
1136
+ { name: "metric-name", type: "string", required: true, desc: "Metric name (^[a-z][0-9a-z_]{0,79}$)." },
1137
+ {
1138
+ name: "metric-qp",
1139
+ type: "string",
1140
+ required: true,
1141
+ desc: "Complete metric QP JSON object string (type=0 event or type=1 formula)."
1142
+ },
699
1143
  { name: "metric-window-num", type: "number", required: true, desc: "Metric window number." },
700
- { name: "metric-window-time-unit", type: "string", required: true, desc: "Metric window time unit (MINUTE/HOUR/DAY)." },
1144
+ {
1145
+ name: "metric-window-time-unit",
1146
+ type: "string",
1147
+ required: true,
1148
+ desc: "Metric window time unit (minute/hour/day)."
1149
+ },
701
1150
  { name: "display-name", type: "string", required: true, desc: "Display name of the metric." },
702
1151
  { name: "note", type: "string", required: false, desc: "Metric note/remark." },
703
1152
  { name: "order-id", type: "number", required: false, desc: "Sort order id." },
@@ -717,17 +1166,70 @@ var buildWriteInput = (ctx) => ({
717
1166
  metric_setting_id: ctx.str("metric-setting-id") || void 0,
718
1167
  metric_params: ctx.str("metric-params") || void 0
719
1168
  });
1169
+ var commonMetricCreate = createEngageSettingCapabilityCommand({
1170
+ resource: "common-metric",
1171
+ command: "create",
1172
+ capabilityId: "engage-setting.common-metric.create",
1173
+ description: "Create a PRESET common metric with its event/formula QP, time window, and display metadata.",
1174
+ flags: writeFlags,
1175
+ risk: "write",
1176
+ validate: (ctx) => {
1177
+ validatePresetMetricTypeFlag(ctx.num("metric-type"));
1178
+ validateMetricQpFlag(ctx.str("metric-qp"));
1179
+ validateMetricWindowTimeUnitFlag(ctx.str("metric-window-time-unit"));
1180
+ },
1181
+ buildInput: buildWriteInput
1182
+ });
1183
+
1184
+ // src/commands/te-engage/engage-setting/common-metric/update.ts
1185
+ var writeFlags2 = [
1186
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1187
+ { name: "metric-type", type: "number", required: true, desc: "Metric type; use 1 (PRESET) for common metrics." },
1188
+ { name: "metric-name", type: "string", required: true, desc: "Metric name (existing PRESET metric)." },
1189
+ {
1190
+ name: "metric-qp",
1191
+ type: "string",
1192
+ required: true,
1193
+ desc: "Complete metric QP JSON object string (type=0 event or type=1 formula)."
1194
+ },
1195
+ { name: "metric-window-num", type: "number", required: true, desc: "Metric window number." },
1196
+ {
1197
+ name: "metric-window-time-unit",
1198
+ type: "string",
1199
+ required: true,
1200
+ desc: "Metric window time unit (minute/hour/day)."
1201
+ },
1202
+ { name: "display-name", type: "string", required: true, desc: "Display name of the metric." },
1203
+ { name: "note", type: "string", required: false, desc: "Metric note/remark." },
1204
+ { name: "order-id", type: "number", required: false, desc: "Sort order id." },
1205
+ { name: "metric-setting-id", type: "string", required: false, desc: "Metric setting id (when binding to a setting)." },
1206
+ { name: "metric-params", type: "string", required: false, desc: "Metric params JSON string." }
1207
+ ];
1208
+ var buildWriteInput2 = (ctx) => ({
1209
+ project_id: ctx.num("project-id"),
1210
+ metric_type: ctx.num("metric-type"),
1211
+ metric_name: ctx.str("metric-name"),
1212
+ metric_qp: ctx.str("metric-qp"),
1213
+ metric_window_num: ctx.num("metric-window-num"),
1214
+ metric_window_time_unit: ctx.str("metric-window-time-unit"),
1215
+ display_name: ctx.str("display-name"),
1216
+ note: ctx.str("note") || void 0,
1217
+ order_id: ctx.optionalNum("order-id"),
1218
+ metric_setting_id: ctx.str("metric-setting-id") || void 0,
1219
+ metric_params: ctx.str("metric-params") || void 0
1220
+ });
720
1221
  var commonMetricUpdate = createEngageSettingCapabilityCommand({
721
1222
  resource: "common-metric",
722
1223
  command: "update",
723
1224
  capabilityId: "engage-setting.common-metric.update",
724
1225
  description: "Update an existing common metric's type, expression, time window, and display metadata.",
725
- flags: writeFlags,
1226
+ flags: writeFlags2,
726
1227
  risk: "write",
727
1228
  validate: (ctx) => {
728
1229
  validateMetricQpFlag(ctx.str("metric-qp"));
1230
+ validateMetricWindowTimeUnitFlag(ctx.str("metric-window-time-unit"));
729
1231
  },
730
- buildInput: buildWriteInput
1232
+ buildInput: buildWriteInput2
731
1233
  });
732
1234
 
733
1235
  // src/commands/te-engage/engage-setting/common-metric/delete.ts
@@ -755,14 +1257,22 @@ var commands2 = [
755
1257
  channelTouchLimitsSave,
756
1258
  channelUpdateConfig,
757
1259
  channelTestSend,
1260
+ channelList,
1261
+ channelGet,
1262
+ channelCreate,
1263
+ channelUpdateStatus,
1264
+ channelDelete,
1265
+ approvalApproverAdd,
1266
+ approvalApproverList,
758
1267
  approvalApproverDelete,
1268
+ whitelistList,
759
1269
  whitelistAdd,
760
1270
  whitelistUpdate,
761
1271
  whitelistDelete,
762
1272
  whitelistVerify,
763
1273
  pushLanguageGet,
764
1274
  pushLanguageSet,
765
- // clientParamCreate,
1275
+ clientParamCreate,
766
1276
  clientParamUpdate,
767
1277
  clientParamDelete,
768
1278
  clientParamList,
@@ -776,7 +1286,7 @@ var commands2 = [
776
1286
  presetEventUpdate,
777
1287
  commonMetricList,
778
1288
  commonMetricGet,
779
- // commonMetricCreate,
1289
+ commonMetricCreate,
780
1290
  commonMetricUpdate,
781
1291
  commonMetricDelete
782
1292
  ];
@@ -813,6 +1323,39 @@ var configItemCreate = createEngageSceneCapabilityCommand({
813
1323
  })
814
1324
  });
815
1325
 
1326
+ // src/commands/te-engage/engage-scene/config-item/delete.ts
1327
+ var configItemDelete = createEngageSceneCapabilityCommand({
1328
+ resource: "config-item",
1329
+ command: "delete",
1330
+ capabilityId: "engage-scene.config-item.delete",
1331
+ description: "Delete a config item.",
1332
+ flags: [
1333
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1334
+ { name: "config-id", type: "string", required: true, desc: "Config item ID." },
1335
+ { name: "open-id", type: "string", required: true, desc: "Operator open ID." }
1336
+ ],
1337
+ risk: "high-risk-write",
1338
+ buildInput: (ctx) => ({
1339
+ project_id: ctx.num("project-id"),
1340
+ config_id: ctx.str("config-id"),
1341
+ open_id: ctx.str("open-id")
1342
+ })
1343
+ });
1344
+
1345
+ // src/commands/te-engage/engage-scene/config-item/get.ts
1346
+ var configItemGet = createEngageSceneCapabilityCommand({
1347
+ resource: "config-item",
1348
+ command: "get",
1349
+ capabilityId: "engage-scene.config-item.get",
1350
+ description: "Get a config item's detail.",
1351
+ flags: [
1352
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1353
+ { name: "config-id", type: "string", required: true, desc: "Config item ID." }
1354
+ ],
1355
+ risk: "read",
1356
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), config_id: ctx.str("config-id") })
1357
+ });
1358
+
816
1359
  // src/commands/te-engage/engage-scene/config-item/list.ts
817
1360
  var configItemList = createEngageSceneCapabilityCommand({
818
1361
  resource: "config-item",
@@ -1154,6 +1697,51 @@ var configMetricBatchDelete = createEngageSceneCapabilityCommand({
1154
1697
  })
1155
1698
  });
1156
1699
 
1700
+ // src/commands/te-engage/engage-scene/config-channel/list.ts
1701
+ var configChannelList = createEngageSceneCapabilityCommand({
1702
+ resource: "config-channel",
1703
+ command: "list",
1704
+ capabilityId: "engage-scene.config-channel.list",
1705
+ description: "List config channels of a project.",
1706
+ flags: [
1707
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1708
+ {
1709
+ name: "channel-type",
1710
+ type: "number",
1711
+ required: false,
1712
+ desc: "Optional channel type filter: 0 webhook, 1 client."
1713
+ }
1714
+ ],
1715
+ risk: "read",
1716
+ buildInput: (ctx) => {
1717
+ const input = {
1718
+ project_id: ctx.num("project-id")
1719
+ };
1720
+ const channelType = ctx.optionalNum("channel-type");
1721
+ if (channelType !== void 0) {
1722
+ input.channel_type = channelType;
1723
+ }
1724
+ return input;
1725
+ }
1726
+ });
1727
+
1728
+ // src/commands/te-engage/engage-scene/config-channel/get.ts
1729
+ var configChannelGet = createEngageSceneCapabilityCommand({
1730
+ resource: "config-channel",
1731
+ command: "get",
1732
+ capabilityId: "engage-scene.config-channel.get",
1733
+ description: "Get a config channel's detail including config JSON.",
1734
+ flags: [
1735
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1736
+ { name: "channel-id", type: "string", required: true, desc: "Channel ID." }
1737
+ ],
1738
+ risk: "read",
1739
+ buildInput: (ctx) => ({
1740
+ project_id: ctx.num("project-id"),
1741
+ channel_id: ctx.str("channel-id")
1742
+ })
1743
+ });
1744
+
1157
1745
  // src/commands/te-engage/engage-scene/config-channel/create.ts
1158
1746
  var configChannelCreate = createEngageSceneCapabilityCommand({
1159
1747
  resource: "config-channel",
@@ -1201,6 +1789,52 @@ var configChannelUpdate = createEngageSceneCapabilityCommand({
1201
1789
  })
1202
1790
  });
1203
1791
 
1792
+ // src/commands/te-engage/engage-scene/config-channel/update-status.ts
1793
+ var configChannelUpdateStatus = createEngageSceneCapabilityCommand({
1794
+ resource: "config-channel",
1795
+ command: "update-status",
1796
+ capabilityId: "engage-scene.config-channel.update-status",
1797
+ description: "Enable or disable a config channel.",
1798
+ flags: [
1799
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1800
+ { name: "channel-id", type: "string", required: true, desc: "Channel ID." },
1801
+ {
1802
+ name: "channel-status",
1803
+ type: "number",
1804
+ required: true,
1805
+ desc: "Channel status: 1 enable, 2 disable."
1806
+ }
1807
+ ],
1808
+ risk: "write",
1809
+ buildInput: (ctx) => ({
1810
+ project_id: ctx.num("project-id"),
1811
+ channel_id: ctx.str("channel-id"),
1812
+ channel_status: ctx.num("channel-status")
1813
+ })
1814
+ });
1815
+
1816
+ // src/commands/te-engage/engage-scene/config-channel/delete.ts
1817
+ var configChannelDelete = createEngageSceneCapabilityCommand({
1818
+ resource: "config-channel",
1819
+ command: "delete",
1820
+ capabilityId: "engage-scene.config-channel.delete",
1821
+ description: "Delete a disabled config channel.",
1822
+ flags: [
1823
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1824
+ {
1825
+ name: "channel-id",
1826
+ type: "string",
1827
+ required: true,
1828
+ desc: "Channel ID to delete. Channel must be disabled first."
1829
+ }
1830
+ ],
1831
+ risk: "high-risk-write",
1832
+ buildInput: (ctx) => ({
1833
+ project_id: ctx.num("project-id"),
1834
+ channel_id: ctx.str("channel-id")
1835
+ })
1836
+ });
1837
+
1204
1838
  // src/commands/te-engage/engage-scene/config-channel/query-log.ts
1205
1839
  var configChannelQueryLog = createEngageSceneCapabilityCommand({
1206
1840
  resource: "config-channel",
@@ -1240,6 +1874,83 @@ var strategyCreate = createEngageSceneCapabilityCommand({
1240
1874
  })
1241
1875
  });
1242
1876
 
1877
+ // src/commands/te-engage/engage-scene/strategy/get.ts
1878
+ var strategyGet = createEngageSceneCapabilityCommand({
1879
+ resource: "strategy",
1880
+ command: "get",
1881
+ capabilityId: "engage-scene.strategy.get",
1882
+ description: "Get one config strategy's detail.",
1883
+ flags: [
1884
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1885
+ { name: "config-id", type: "string", required: true, desc: "Config item ID." },
1886
+ { name: "strategy-uuid", type: "string", required: true, desc: "Strategy UUID." }
1887
+ ],
1888
+ risk: "read",
1889
+ buildInput: (ctx) => ({
1890
+ project_id: ctx.num("project-id"),
1891
+ config_id: ctx.str("config-id"),
1892
+ strategy_uuid: ctx.str("strategy-uuid")
1893
+ })
1894
+ });
1895
+
1896
+ // src/commands/te-engage/engage-scene/strategy/list.ts
1897
+ var strategyList = createEngageSceneCapabilityCommand({
1898
+ resource: "strategy",
1899
+ command: "list",
1900
+ capabilityId: "engage-scene.strategy.list",
1901
+ description: "List strategies under a project or config item.",
1902
+ flags: [
1903
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1904
+ { name: "config-id", type: "string", required: false, desc: "Optional config item ID." },
1905
+ { name: "strategy-uuid-list", type: "json", required: false, desc: "Optional strategy UUID array." }
1906
+ ],
1907
+ risk: "read",
1908
+ validate: (ctx) => {
1909
+ readOptionalJsonArray(ctx, "strategy-uuid-list");
1910
+ },
1911
+ buildInput: (ctx) => ({
1912
+ project_id: ctx.num("project-id"),
1913
+ ...readOptionalString(ctx, "config-id") !== void 0 && { config_id: readOptionalString(ctx, "config-id") },
1914
+ ...readOptionalJsonArray(ctx, "strategy-uuid-list") !== void 0 && { strategy_uuid_list: readOptionalJsonArray(ctx, "strategy-uuid-list") }
1915
+ })
1916
+ });
1917
+
1918
+ // src/commands/te-engage/engage-scene/strategy/manage.ts
1919
+ function validateAction2(ctx) {
1920
+ const action = ctx.str("action");
1921
+ requireAllowedValue(action, ["online", "offline", "suspend", "delete", "approve", "deny", "cancel"], "action");
1922
+ if (["online", "offline", "suspend", "delete"].includes(action)) {
1923
+ readRequiredJsonArray(ctx, "strategy-uuid-list");
1924
+ }
1925
+ if (["approve", "deny", "cancel"].includes(action)) {
1926
+ readRequiredJsonArray(ctx, "strategy-list");
1927
+ }
1928
+ }
1929
+ var strategyManage = createEngageSceneCapabilityCommand({
1930
+ resource: "strategy",
1931
+ command: "manage",
1932
+ capabilityId: "engage-scene.strategy.manage",
1933
+ description: "Apply lifecycle or review actions to config strategies.",
1934
+ flags: [
1935
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1936
+ { name: "config-id", type: "string", required: true, desc: "Config item ID." },
1937
+ { name: "action", type: "string", required: true, desc: "Lifecycle or review action." },
1938
+ { name: "strategy-uuid-list", type: "json", required: false, desc: "Strategy UUID array." },
1939
+ { name: "strategy-list", type: "json", required: false, desc: "Review item array." },
1940
+ { name: "reason", type: "string", required: false, desc: "Optional review reason." }
1941
+ ],
1942
+ risk: "write",
1943
+ validate: validateAction2,
1944
+ buildInput: (ctx) => ({
1945
+ project_id: ctx.num("project-id"),
1946
+ config_id: ctx.str("config-id"),
1947
+ action: ctx.str("action"),
1948
+ ...readOptionalJsonArray(ctx, "strategy-uuid-list") !== void 0 && { strategy_uuid_list: readOptionalJsonArray(ctx, "strategy-uuid-list") },
1949
+ ...readOptionalJsonArray(ctx, "strategy-list") !== void 0 && { strategy_list: readOptionalJsonArray(ctx, "strategy-list") },
1950
+ ...readOptionalString(ctx, "reason") !== void 0 && { reason: readOptionalString(ctx, "reason") }
1951
+ })
1952
+ });
1953
+
1243
1954
  // src/commands/te-engage/engage-scene/strategy/update.ts
1244
1955
  var strategyUpdate = createEngageSceneCapabilityCommand({
1245
1956
  resource: "strategy",
@@ -1358,6 +2069,29 @@ var templateCreate = createEngageSceneCapabilityCommand({
1358
2069
  })
1359
2070
  });
1360
2071
 
2072
+ // src/commands/te-engage/engage-scene/template/copy.ts
2073
+ var templateCopy = createEngageSceneCapabilityCommand({
2074
+ resource: "template",
2075
+ command: "copy",
2076
+ capabilityId: "engage-scene.template.copy",
2077
+ description: "Copy one template from a source config item to a target config item.",
2078
+ flags: [
2079
+ { name: "source-project-id", type: "number", required: true, desc: "Source project ID." },
2080
+ { name: "source-config-id", type: "string", required: true, desc: "Source config item ID." },
2081
+ { name: "source-template-id", type: "string", required: true, desc: "Source template ID." },
2082
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Target project ID." },
2083
+ { name: "config-id", type: "string", required: true, desc: "Target config item ID." }
2084
+ ],
2085
+ risk: "write",
2086
+ buildInput: (ctx) => ({
2087
+ source_project_id: ctx.num("source-project-id"),
2088
+ source_config_id: ctx.str("source-config-id"),
2089
+ source_template_id: ctx.str("source-template-id"),
2090
+ project_id: ctx.num("project-id"),
2091
+ config_id: ctx.str("config-id")
2092
+ })
2093
+ });
2094
+
1361
2095
  // src/commands/te-engage/engage-scene/template/update.ts
1362
2096
  var templateUpdate = createEngageSceneCapabilityCommand({
1363
2097
  resource: "template",
@@ -1423,6 +2157,8 @@ var templateDelete = createEngageSceneCapabilityCommand({
1423
2157
  // src/commands/te-engage/engage-scene/index.ts
1424
2158
  var commands3 = [
1425
2159
  configItemCreate,
2160
+ configItemDelete,
2161
+ configItemGet,
1426
2162
  configItemList,
1427
2163
  configItemUpdate,
1428
2164
  configParamList,
@@ -1440,16 +2176,24 @@ var commands3 = [
1440
2176
  configMetricBatchAdd,
1441
2177
  configMetricUpdateRule,
1442
2178
  configMetricBatchDelete,
2179
+ configChannelList,
2180
+ configChannelGet,
1443
2181
  configChannelCreate,
1444
2182
  configChannelUpdate,
2183
+ configChannelUpdateStatus,
2184
+ configChannelDelete,
1445
2185
  configChannelQueryLog,
1446
2186
  strategyCreate,
2187
+ strategyGet,
2188
+ strategyList,
2189
+ strategyManage,
1447
2190
  strategyUpdate,
1448
2191
  strategyLog,
1449
2192
  strategyBatchCopy,
1450
2193
  // strategySaveSubmit,
1451
2194
  // strategyTestSend,
1452
2195
  templateList,
2196
+ templateCopy,
1453
2197
  templateGet,
1454
2198
  templateCreate,
1455
2199
  templateUpdate,
@@ -1621,25 +2365,6 @@ var activityInfoList = createEngageActivityCapabilityCommand({
1621
2365
  })
1622
2366
  });
1623
2367
 
1624
- // src/commands/te-engage/engage-activity/approval/submit.ts
1625
- var approvalSubmit = createEngageActivityCapabilityCommand({
1626
- resource: "approval",
1627
- command: "submit",
1628
- capabilityId: "engage-activity.approval.submit",
1629
- description: "Submit an activity for approval.",
1630
- flags: [
1631
- { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1632
- { name: "activity-id", type: "string", required: true, desc: "Activity ID." },
1633
- { name: "reason", type: "string", required: false, desc: "Optional submit note." }
1634
- ],
1635
- risk: "write",
1636
- buildInput: (ctx) => ({
1637
- project_id: ctx.num("project-id"),
1638
- activity_id: ctx.str("activity-id"),
1639
- reason: ctx.str("reason") || void 0
1640
- })
1641
- });
1642
-
1643
2368
  // src/commands/te-engage/engage-activity/approval/approve.ts
1644
2369
  var approvalApprove = createEngageActivityCapabilityCommand({
1645
2370
  resource: "approval",
@@ -1697,6 +2422,50 @@ var approvalCancel = createEngageActivityCapabilityCommand({
1697
2422
  })
1698
2423
  });
1699
2424
 
2425
+ // src/commands/te-engage/engage-activity/topic/create.ts
2426
+ var topicCreate = createEngageActivityCapabilityCommand({
2427
+ resource: "topic",
2428
+ command: "create",
2429
+ capabilityId: "engage-activity.topic.create",
2430
+ description: "Create a topic and its tasks under an activity from a TopicAddDTO payload.",
2431
+ flags: [
2432
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
2433
+ {
2434
+ name: "payload",
2435
+ type: "json",
2436
+ required: true,
2437
+ desc: "TopicAddDTO JSON body. Required: activityId, topicName, targetClusterType, channelType, channelId, triggerType, enableChannelTouchLimits, frequencyLimits, tasks. When targetClusterType=2 use topicClusterKey (not clusterKey); when =1 use topicQp. Task items use taskQp/clusterKey."
2438
+ }
2439
+ ],
2440
+ risk: "write",
2441
+ buildInput: (ctx) => ({
2442
+ project_id: ctx.num("project-id"),
2443
+ payload: ctx.json("payload")
2444
+ })
2445
+ });
2446
+
2447
+ // src/commands/te-engage/engage-activity/topic/update.ts
2448
+ var topicUpdate = createEngageActivityCapabilityCommand({
2449
+ resource: "topic",
2450
+ command: "update",
2451
+ capabilityId: "engage-activity.topic.update",
2452
+ description: "Update a topic and its task relations from a TopicModifyReq payload.",
2453
+ flags: [
2454
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
2455
+ {
2456
+ name: "payload",
2457
+ type: "json",
2458
+ required: true,
2459
+ desc: "TopicModifyReq JSON body (topicId + TopicAddDTO fields + modifyTaskList/addTaskList/delTaskIdList). Same audience rules: topicClusterKey for targetClusterType=2, topicQp for =1."
2460
+ }
2461
+ ],
2462
+ risk: "write",
2463
+ buildInput: (ctx) => ({
2464
+ project_id: ctx.num("project-id"),
2465
+ payload: ctx.json("payload")
2466
+ })
2467
+ });
2468
+
1700
2469
  // src/commands/te-engage/engage-activity/topic/remove-task.ts
1701
2470
  var topicRemoveTask = createEngageActivityCapabilityCommand({
1702
2471
  resource: "topic",
@@ -1850,12 +2619,51 @@ var taskGet = createEngageActivityCapabilityCommand({
1850
2619
  })
1851
2620
  });
1852
2621
 
1853
- // src/commands/te-engage/engage-activity/task/copy.ts
1854
- var taskCopy = createEngageActivityCapabilityCommand({
2622
+ // src/commands/te-engage/engage-activity/task/create.ts
2623
+ var taskCreate = createEngageActivityCapabilityCommand({
1855
2624
  resource: "task",
1856
- command: "copy",
1857
- capabilityId: "engage-activity.task.copy",
1858
- description: "Copy an existing standalone task (loads detail, renames, re-creates).",
2625
+ command: "create",
2626
+ capabilityId: "engage-activity.task.create",
2627
+ description: "Create a standalone task under an activity from an OperationTaskOpDTO payload.",
2628
+ flags: [
2629
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
2630
+ {
2631
+ name: "payload",
2632
+ type: "json",
2633
+ required: true,
2634
+ desc: "OperationTaskOpDTO JSON body (taskName, channelType, channelId, groupContentList, targetClusterType, triggerType, completionIndicatorDef, frequencyLimits, groupId, activityId, triggerTimeStrategy, ...). Set activityId; leave topicId empty for a standalone task."
2635
+ }
2636
+ ],
2637
+ risk: "write",
2638
+ buildInput: (ctx) => ({
2639
+ project_id: ctx.num("project-id"),
2640
+ payload: ctx.json("payload")
2641
+ })
2642
+ });
2643
+
2644
+ // src/commands/te-engage/engage-activity/task/update.ts
2645
+ var taskUpdate = createEngageActivityCapabilityCommand({
2646
+ resource: "task",
2647
+ command: "update",
2648
+ capabilityId: "engage-activity.task.update",
2649
+ description: "Edit a standalone task from an OperationTaskOpDTO payload (includes taskId).",
2650
+ flags: [
2651
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
2652
+ { name: "payload", type: "json", required: true, desc: "OperationTaskOpDTO JSON body including taskId." }
2653
+ ],
2654
+ risk: "write",
2655
+ buildInput: (ctx) => ({
2656
+ project_id: ctx.num("project-id"),
2657
+ payload: ctx.json("payload")
2658
+ })
2659
+ });
2660
+
2661
+ // src/commands/te-engage/engage-activity/task/copy.ts
2662
+ var taskCopy = createEngageActivityCapabilityCommand({
2663
+ resource: "task",
2664
+ command: "copy",
2665
+ capabilityId: "engage-activity.task.copy",
2666
+ description: "Copy an existing standalone task (loads detail, renames, re-creates).",
1859
2667
  flags: [
1860
2668
  { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1861
2669
  { name: "task-id", type: "string", required: true, desc: "Source task ID to copy." },
@@ -1880,12 +2688,12 @@ var commands4 = [
1880
2688
  activityEnd,
1881
2689
  activityStats,
1882
2690
  activityInfoList,
1883
- approvalSubmit,
2691
+ // approvalSubmit,
1884
2692
  approvalApprove,
1885
2693
  approvalReject,
1886
2694
  approvalCancel,
1887
- // topicCreate, // temporarily disabled: ae-cli engage-activity topic create
1888
- // topicUpdate, // temporarily disabled: ae-cli engage-activity topic update
2695
+ topicCreate,
2696
+ topicUpdate,
1889
2697
  topicRemoveTask,
1890
2698
  topicDelete,
1891
2699
  topicGet,
@@ -1895,8 +2703,8 @@ var commands4 = [
1895
2703
  activityTypeUpdate,
1896
2704
  activityTypeBatchDelete,
1897
2705
  taskGet,
1898
- // taskCreate, // temporarily disabled: ae-cli engage-activity task create
1899
- // taskUpdate, // temporarily disabled: ae-cli engage-activity task update
2706
+ taskCreate,
2707
+ taskUpdate,
1900
2708
  taskCopy
1901
2709
  ];
1902
2710
  var engage_activity_default = commands4;
@@ -2322,1546 +3130,136 @@ var taskModifyGroup = createEngageTaskCapabilityCommand({
2322
3130
  })
2323
3131
  });
2324
3132
 
2325
- // src/commands/te-engage/engage-task/index.ts
2326
- var commands6 = [
2327
- channelRefStats,
2328
- groupCreate,
2329
- groupDelete,
2330
- groupList,
2331
- groupUpdate,
2332
- metricList,
2333
- metricUpdate,
2334
- operationLogQuery2,
2335
- pushRecordQuery,
2336
- raceRelease,
2337
- segmentListGet,
2338
- segmentListQuery,
2339
- segmentListRename,
2340
- segmentListSetVisibility,
2341
- taskDelete,
2342
- taskModifyGroup
2343
- // taskSubmitApproval,
2344
- ];
2345
- var engage_task_default = commands6;
2346
-
2347
- // src/commands/te-engage/utils.ts
2348
- function buildMcpDryRun(ctx, serviceName46, toolName46, args) {
2349
- const host = ctx.host();
2350
- return {
2351
- method: "MCP tools/call",
2352
- url: resolveMcpUrl(ctx.mcpUrl(), host, serviceName46),
2353
- body: {
2354
- serviceName: serviceName46,
2355
- toolName: toolName46,
2356
- arguments: args
2357
- }
2358
- };
2359
- }
2360
- async function executeMcpCommand(ctx, serviceName46, toolName46, args) {
2361
- const host = ctx.host();
2362
- const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, serviceName46);
2363
- const result = await callMcpTool(mcpUrl, toolName46, args, host);
2364
- return parseMcpResult(result);
2365
- }
2366
- function hasFlag(ctx, name) {
2367
- return ctx.str(name) !== "";
2368
- }
2369
- function readOptionalString(ctx, name) {
2370
- const value = ctx.str(name);
2371
- return value === "" ? void 0 : value;
2372
- }
2373
- function readOptionalNumber(ctx, name) {
2374
- return hasFlag(ctx, name) ? ctx.num(name) : void 0;
2375
- }
2376
- function readOptionalBoolean(ctx, name) {
2377
- return hasFlag(ctx, name) ? ctx.bool(name) : void 0;
2378
- }
2379
- function readOptionalJsonArray(ctx, name) {
2380
- const value = ctx.json(name);
2381
- if (value === void 0) return void 0;
2382
- if (!Array.isArray(value)) {
2383
- throw new Error(`Flag --${name} must be a JSON array`);
2384
- }
2385
- return value;
2386
- }
2387
- function readRequiredJsonArray(ctx, name, minLength = 1) {
2388
- const value = readOptionalJsonArray(ctx, name);
2389
- if (!value || value.length < minLength) {
2390
- throw new Error(`Flag --${name} must be a JSON array with at least ${minLength} item(s)`);
2391
- }
2392
- return value;
2393
- }
2394
- function readRequiredJsonObject(ctx, name) {
2395
- const value = ctx.json(name);
2396
- if (!value || typeof value !== "object" || Array.isArray(value)) {
2397
- throw new Error(`Flag --${name} must be a JSON object`);
2398
- }
2399
- return value;
2400
- }
2401
- function requireOneOfFlags(ctx, names) {
2402
- if (!names.some((name) => hasFlag(ctx, name))) {
2403
- throw new Error(`At least one of ${names.map((name) => `--${name}`).join(", ")} is required`);
2404
- }
2405
- }
2406
- function requireAnyFlag(ctx, names) {
2407
- if (!names.some((name) => hasFlag(ctx, name))) {
2408
- throw new Error(`At least one of ${names.map((name) => `--${name}`).join(", ")} is required`);
2409
- }
2410
- }
2411
- function requireAllowedValue(value, allowed, flagName) {
2412
- if (!allowed.includes(value)) {
2413
- throw new Error(`Flag --${flagName} must be one of: ${allowed.join(", ")}`);
2414
- }
2415
- }
2416
-
2417
- // src/commands/te-engage/config/config-item-analysis-report.ts
2418
- var serviceName = "engage_config";
2419
- var toolName = "query_config_item_analysis_report";
2420
- function buildArgs(ctx) {
2421
- const args = {
2422
- projectId: ctx.num("project_id"),
2423
- configId: ctx.str("config_id"),
2424
- startTime: ctx.str("start_time"),
2425
- endTime: ctx.str("end_time")
2426
- };
2427
- const requestId = readOptionalString(ctx, "request_id");
2428
- if (requestId) args.requestId = requestId;
2429
- const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
2430
- if (templateIdList !== void 0) args.templateIdList = templateIdList;
2431
- const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
2432
- if (strategyIdList !== void 0) args.strategyIdList = strategyIdList;
2433
- const showTimeZone = readOptionalNumber(ctx, "show_time_zone");
2434
- if (showTimeZone !== void 0) args.showTimeZone = showTimeZone;
2435
- return args;
2436
- }
2437
- var configItemAnalysisReport = {
2438
- service: "engage",
2439
- command: "+config_item_analysis_report",
2440
- description: "Query the analysis report for a config item.",
2441
- flags: [
2442
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2443
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2444
- { name: "start_time", type: "string", required: true, desc: "Start date" },
2445
- { name: "end_time", type: "string", required: true, desc: "End date" },
2446
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2447
- { name: "template_id_list", type: "json", required: false, desc: "Template ID list as JSON array" },
2448
- { name: "strategy_id_list", type: "json", required: false, desc: "Strategy ID list as JSON array" },
2449
- { name: "show_time_zone", type: "number", required: false, desc: "Timezone offset" }
2450
- ],
2451
- risk: "read",
2452
- validate: (ctx) => {
2453
- const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
2454
- const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
2455
- if (templateIdList && strategyIdList) {
2456
- throw new Error("Flags --template_id_list and --strategy_id_list cannot be used together");
2457
- }
2458
- },
2459
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName, toolName, buildArgs(ctx)),
2460
- execute: async (ctx) => executeMcpCommand(ctx, serviceName, toolName, buildArgs(ctx))
2461
- };
2462
-
2463
- // src/commands/te-engage/config/config-item-detail.ts
2464
- var serviceName2 = "engage_config";
2465
- var toolName2 = "query_config_item_detail";
2466
- function buildArgs2(ctx) {
2467
- return {
2468
- projectId: ctx.num("project_id"),
2469
- configId: ctx.str("config_id")
2470
- };
2471
- }
2472
- var configItemDetail = {
2473
- service: "engage",
2474
- command: "+config_item_detail",
2475
- description: "Get config item detail.",
2476
- flags: [
2477
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2478
- { name: "config_id", type: "string", required: true, desc: "Config item ID" }
2479
- ],
2480
- risk: "read",
2481
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName2, toolName2, buildArgs2(ctx)),
2482
- execute: async (ctx) => executeMcpCommand(ctx, serviceName2, toolName2, buildArgs2(ctx))
2483
- };
2484
-
2485
- // src/commands/te-engage/config/config-item-list.ts
2486
- var serviceName3 = "engage_config";
2487
- var toolName3 = "query_config_item_list";
2488
- function buildArgs3(ctx) {
2489
- return { projectId: ctx.num("project_id") };
2490
- }
2491
- var configItemList2 = {
2492
- service: "engage",
2493
- command: "+config_item_list",
2494
- description: "List config items for a project.",
2495
- flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
2496
- risk: "read",
2497
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName3, toolName3, buildArgs3(ctx)),
2498
- execute: async (ctx) => executeMcpCommand(ctx, serviceName3, toolName3, buildArgs3(ctx))
2499
- };
2500
-
2501
- // src/commands/te-engage/config/config-item-strategy-comparison.ts
2502
- var serviceName4 = "engage_config";
2503
- var toolName4 = "query_config_item_strategy_comparison";
2504
- function buildArgs4(ctx) {
2505
- const args = {
2506
- projectId: ctx.num("project_id"),
2507
- configId: ctx.str("config_id"),
2508
- strategyIdList: readRequiredJsonArray(ctx, "strategy_id_list", 2)
2509
- };
2510
- const requestId = readOptionalString(ctx, "request_id");
2511
- if (requestId) args.requestId = requestId;
2512
- const showTimeZone = readOptionalNumber(ctx, "show_time_zone");
2513
- if (showTimeZone !== void 0) args.showTimeZone = showTimeZone;
2514
- return args;
2515
- }
2516
- var configItemStrategyComparison = {
2517
- service: "engage",
2518
- command: "+config_item_strategy_comparison",
2519
- description: "Compare multiple strategies under one config item.",
2520
- flags: [
2521
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2522
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2523
- { name: "strategy_id_list", type: "json", required: true, desc: "Strategy ID list as JSON array" },
2524
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2525
- { name: "show_time_zone", type: "number", required: false, desc: "Timezone offset" }
2526
- ],
2527
- risk: "read",
2528
- validate: (ctx) => {
2529
- readRequiredJsonArray(ctx, "strategy_id_list", 2);
2530
- },
2531
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName4, toolName4, buildArgs4(ctx)),
2532
- execute: async (ctx) => executeMcpCommand(ctx, serviceName4, toolName4, buildArgs4(ctx))
2533
- };
2534
-
2535
- // src/commands/te-engage/config/config-item-trigger-report.ts
2536
- var serviceName5 = "engage_config";
2537
- var toolName5 = "query_config_item_trigger_report";
2538
- function buildArgs5(ctx) {
2539
- const args = {
2540
- projectId: ctx.num("project_id"),
2541
- configId: ctx.str("config_id"),
2542
- startTime: ctx.str("start_time"),
2543
- endTime: ctx.str("end_time")
2544
- };
2545
- const requestId = readOptionalString(ctx, "request_id");
2546
- if (requestId) args.requestId = requestId;
2547
- const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
2548
- if (templateIdList !== void 0) args.templateIdList = templateIdList;
2549
- const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
2550
- if (strategyIdList !== void 0) args.strategyIdList = strategyIdList;
2551
- const showTimeZone = readOptionalNumber(ctx, "show_time_zone");
2552
- if (showTimeZone !== void 0) args.showTimeZone = showTimeZone;
2553
- const analyzeReportInternalQuery = readOptionalBoolean(ctx, "analyze_report_internal_query");
2554
- if (analyzeReportInternalQuery !== void 0) args.analyzeReportInternalQuery = analyzeReportInternalQuery;
2555
- return args;
2556
- }
2557
- var configItemTriggerReport = {
2558
- service: "engage",
2559
- command: "+config_item_trigger_report",
2560
- description: "Query the publish and trigger trend report for a config item.",
2561
- flags: [
2562
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2563
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2564
- { name: "start_time", type: "string", required: true, desc: "Start date" },
2565
- { name: "end_time", type: "string", required: true, desc: "End date" },
2566
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2567
- { name: "template_id_list", type: "json", required: false, desc: "Template ID list as JSON array" },
2568
- { name: "strategy_id_list", type: "json", required: false, desc: "Strategy ID list as JSON array" },
2569
- { name: "show_time_zone", type: "number", required: false, desc: "Timezone offset" },
2570
- { name: "analyze_report_internal_query", type: "boolean", required: false, desc: "Internal trigger-report calculation switch" }
2571
- ],
2572
- risk: "read",
2573
- validate: (ctx) => {
2574
- const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
2575
- const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
2576
- if (templateIdList && strategyIdList) {
2577
- throw new Error("Flags --template_id_list and --strategy_id_list cannot be used together");
2578
- }
2579
- },
2580
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName5, toolName5, buildArgs5(ctx)),
2581
- execute: async (ctx) => executeMcpCommand(ctx, serviceName5, toolName5, buildArgs5(ctx))
2582
- };
2583
-
2584
- // src/commands/te-engage/config/copy-config-template.ts
2585
- var serviceName6 = "engage_config";
2586
- var toolName6 = "copy_config_template";
2587
- function buildArgs6(ctx) {
2588
- return {
2589
- sourceProjectId: ctx.num("source_project_id"),
2590
- sourceConfigId: ctx.str("source_config_id"),
2591
- sourceTemplateId: ctx.str("source_template_id"),
2592
- projectId: ctx.num("project_id"),
2593
- configId: ctx.str("config_id")
2594
- };
2595
- }
2596
- var copyConfigTemplate = {
2597
- service: "engage",
2598
- command: "+copy_config_template",
2599
- description: "Copy one template from a source config item to a target config item.",
2600
- flags: [
2601
- { name: "source_project_id", type: "number", required: true, desc: "Source project ID" },
2602
- { name: "source_config_id", type: "string", required: true, desc: "Source config item ID" },
2603
- { name: "source_template_id", type: "string", required: true, desc: "Source template ID" },
2604
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Target project ID" },
2605
- { name: "config_id", type: "string", required: true, desc: "Target config item ID" }
2606
- ],
2607
- risk: "write",
2608
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName6, toolName6, buildArgs6(ctx)),
2609
- execute: async (ctx) => executeMcpCommand(ctx, serviceName6, toolName6, buildArgs6(ctx))
2610
- };
2611
-
2612
- // src/commands/te-engage/config/delete-config-item.ts
2613
- var serviceName7 = "engage_config";
2614
- var toolName7 = "delete_config_item";
2615
- function buildArgs7(ctx) {
2616
- return {
2617
- projectId: ctx.num("project_id"),
2618
- configId: ctx.str("config_id"),
2619
- openId: ctx.str("open_id")
2620
- };
2621
- }
2622
- var deleteConfigItem = {
2623
- service: "engage",
2624
- command: "+delete_config_item",
2625
- description: "Delete a config item.",
2626
- flags: [
2627
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2628
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2629
- { name: "open_id", type: "string", required: true, desc: "Operator open ID" }
2630
- ],
2631
- risk: "high-risk-write",
2632
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName7, toolName7, buildArgs7(ctx)),
2633
- execute: async (ctx) => executeMcpCommand(ctx, serviceName7, toolName7, buildArgs7(ctx))
2634
- };
2635
-
2636
- // src/commands/te-engage/config/manage-strategy.ts
2637
- var serviceName8 = "engage_config";
2638
- var toolName8 = "batch_manage_strategy";
2639
- function buildArgs8(ctx) {
2640
- const args = {
2641
- projectId: ctx.num("project_id"),
2642
- configId: ctx.str("config_id"),
2643
- action: ctx.str("action")
2644
- };
2645
- const strategyUuidList = readOptionalJsonArray(ctx, "strategy_uuid_list");
2646
- if (strategyUuidList !== void 0) args.strategyUuidList = strategyUuidList;
2647
- const strategyList2 = readOptionalJsonArray(ctx, "strategy_list");
2648
- if (strategyList2 !== void 0) args.strategyList = strategyList2;
2649
- const reason = readOptionalString(ctx, "reason");
2650
- if (reason) args.reason = reason;
2651
- return args;
2652
- }
2653
- var manageStrategy = {
2654
- service: "engage",
2655
- command: "+manage_strategy",
2656
- description: "Batch manage config strategies.",
2657
- flags: [
2658
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2659
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2660
- { name: "action", type: "string", required: true, desc: "Action type" },
2661
- { name: "strategy_uuid_list", type: "json", required: false, desc: "Strategy UUID list as JSON array" },
2662
- { name: "strategy_list", type: "json", required: false, desc: "Strategy review list as JSON array" },
2663
- { name: "reason", type: "string", required: false, desc: "Reason for approval actions" }
2664
- ],
2665
- risk: "write",
2666
- validate: (ctx) => {
2667
- const action = ctx.str("action");
2668
- if (["online", "offline", "suspend", "delete"].includes(action)) {
2669
- readRequiredJsonArray(ctx, "strategy_uuid_list");
2670
- }
2671
- if (["approve", "deny", "cancel"].includes(action)) {
2672
- readRequiredJsonArray(ctx, "strategy_list");
2673
- }
2674
- },
2675
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName8, toolName8, buildArgs8(ctx)),
2676
- execute: async (ctx) => executeMcpCommand(ctx, serviceName8, toolName8, buildArgs8(ctx))
2677
- };
2678
-
2679
- // src/commands/te-engage/config/strategy-detail.ts
2680
- var serviceName9 = "engage_config";
2681
- var toolName9 = "query_strategy_detail";
2682
- function buildArgs9(ctx) {
2683
- return {
2684
- projectId: ctx.num("project_id"),
2685
- configId: ctx.str("config_id"),
2686
- strategyUuid: ctx.str("strategy_uuid")
2687
- };
2688
- }
2689
- var strategyDetail = {
2690
- service: "engage",
2691
- command: "+strategy_detail",
2692
- description: "Get one strategy detail.",
2693
- flags: [
2694
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2695
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2696
- { name: "strategy_uuid", type: "string", required: true, desc: "Strategy UUID" }
2697
- ],
2698
- risk: "read",
2699
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName9, toolName9, buildArgs9(ctx)),
2700
- execute: async (ctx) => executeMcpCommand(ctx, serviceName9, toolName9, buildArgs9(ctx))
2701
- };
2702
-
2703
- // src/commands/te-engage/config/strategy-list.ts
2704
- var serviceName10 = "engage_config";
2705
- var toolName10 = "query_strategy_list";
2706
- function buildArgs10(ctx) {
2707
- const args = { projectId: ctx.num("project_id") };
2708
- const configId = readOptionalString(ctx, "config_id");
2709
- if (configId) args.configId = configId;
2710
- const strategyUuidList = readOptionalJsonArray(ctx, "strategy_uuid_list");
2711
- if (strategyUuidList !== void 0) args.strategyUuidList = strategyUuidList;
2712
- return args;
2713
- }
2714
- var strategyList = {
2715
- service: "engage",
2716
- command: "+strategy_list",
2717
- description: "List strategies under a project or config item.",
2718
- flags: [
2719
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2720
- { name: "config_id", type: "string", required: false, desc: "Config item ID" },
2721
- { name: "strategy_uuid_list", type: "json", required: false, desc: "Strategy UUID list as JSON array" }
2722
- ],
2723
- risk: "read",
2724
- validate: (ctx) => {
2725
- readOptionalJsonArray(ctx, "strategy_uuid_list");
2726
- },
2727
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName10, toolName10, buildArgs10(ctx)),
2728
- execute: async (ctx) => executeMcpCommand(ctx, serviceName10, toolName10, buildArgs10(ctx))
2729
- };
2730
-
2731
- // src/commands/te-engage/config/index.ts
2732
- var commands7 = [
2733
- configItemTriggerReport,
2734
- configItemAnalysisReport,
2735
- configItemStrategyComparison,
2736
- configItemList2,
2737
- configItemDetail,
2738
- deleteConfigItem,
2739
- copyConfigTemplate,
2740
- strategyList,
2741
- strategyDetail,
2742
- manageStrategy
2743
- ];
2744
- var config_default = commands7;
2745
-
2746
- // src/commands/te-engage/flow/delete-flow.ts
2747
- var serviceName11 = "engage_flow";
2748
- var toolName11 = "batch_delete_flow";
2749
- function buildArgs11(ctx) {
2750
- return {
2751
- projectId: ctx.num("project_id"),
2752
- flowUuidList: readRequiredJsonArray(ctx, "flow_uuid_list")
2753
- };
2754
- }
2755
- var deleteFlow = {
2756
- service: "engage",
2757
- command: "+delete_flow",
2758
- description: "Batch delete flows.",
2759
- flags: [
2760
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2761
- { name: "flow_uuid_list", type: "json", required: true, desc: "Flow UUID list as JSON array" }
2762
- ],
2763
- risk: "high-risk-write",
2764
- validate: (ctx) => {
2765
- readRequiredJsonArray(ctx, "flow_uuid_list");
2766
- },
2767
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName11, toolName11, buildArgs11(ctx)),
2768
- execute: async (ctx) => executeMcpCommand(ctx, serviceName11, toolName11, buildArgs11(ctx))
2769
- };
2770
-
2771
- // src/commands/te-engage/flow/flow-ab-split-node-report.ts
2772
- var serviceName12 = "engage_flow";
2773
- var toolName12 = "query_flow_ab_split_node_report";
2774
- function buildArgs12(ctx) {
2775
- const args = {
2776
- projectId: ctx.num("project_id"),
2777
- reportType: ctx.str("report_type"),
2778
- nodeUuid: ctx.str("node_uuid"),
2779
- startTime: ctx.str("start_time"),
2780
- endTime: ctx.str("end_time")
2781
- };
2782
- const flowId = readOptionalString(ctx, "flow_id");
2783
- if (flowId) args.flowId = flowId;
2784
- const flowUuid = readOptionalString(ctx, "flow_uuid");
2785
- if (flowUuid) args.flowUuid = flowUuid;
2786
- const requestId = readOptionalString(ctx, "request_id");
2787
- if (requestId) args.requestId = requestId;
2788
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
2789
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
2790
- const indicatorsUuid = readOptionalString(ctx, "indicators_uuid");
2791
- if (indicatorsUuid) args.indicatorsUuid = indicatorsUuid;
2792
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
2793
- if (showTimeZone) args.showTimeZone = showTimeZone;
2794
- return args;
2795
- }
2796
- var flowAbSplitNodeReport = {
2797
- service: "engage",
2798
- command: "+flow_ab_split_node_report",
2799
- description: "Query the report for one AB split node.",
2800
- flags: [
2801
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2802
- { name: "report_type", type: "string", required: true, desc: "Report type: overview or detail" },
2803
- { name: "node_uuid", type: "string", required: true, desc: "AB split node UUID" },
2804
- { name: "start_time", type: "string", required: true, desc: "Start date" },
2805
- { name: "end_time", type: "string", required: true, desc: "End date" },
2806
- { name: "flow_id", type: "string", required: false, desc: "Flow ID" },
2807
- { name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
2808
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2809
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
2810
- { name: "indicators_uuid", type: "string", required: false, desc: "Indicator UUID" },
2811
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
2812
- ],
2813
- risk: "read",
2814
- validate: (ctx) => {
2815
- requireAllowedValue(ctx.str("report_type"), ["overview", "detail"], "report_type");
2816
- requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
2817
- },
2818
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName12, toolName12, buildArgs12(ctx)),
2819
- execute: async (ctx) => executeMcpCommand(ctx, serviceName12, toolName12, buildArgs12(ctx))
2820
- };
2821
-
2822
- // src/commands/te-engage/flow/flow-detail.ts
2823
- var serviceName13 = "engage_flow";
2824
- var toolName13 = "query_flow_detail";
2825
- function buildArgs13(ctx) {
2826
- return {
2827
- projectId: ctx.num("project_id"),
2828
- flowUuid: ctx.str("flow_uuid")
2829
- };
2830
- }
2831
- var flowDetail = {
2832
- service: "engage",
2833
- command: "+flow_detail",
2834
- description: "Get flow detail information.",
2835
- flags: [
2836
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2837
- { name: "flow_uuid", type: "string", required: true, desc: "Flow UUID" }
2838
- ],
2839
- risk: "read",
2840
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName13, toolName13, buildArgs13(ctx)),
2841
- execute: async (ctx) => executeMcpCommand(ctx, serviceName13, toolName13, buildArgs13(ctx))
2842
- };
2843
-
2844
- // src/commands/te-engage/flow/flow-list.ts
2845
- var serviceName14 = "engage_flow";
2846
- var toolName14 = "query_flow_list";
2847
- function buildArgs14(ctx) {
2848
- return { projectId: ctx.num("project_id") };
2849
- }
2850
- var flowList = {
2851
- service: "engage",
2852
- command: "+flow_list",
2853
- description: "List flows under a project.",
2854
- flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
2855
- risk: "read",
2856
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName14, toolName14, buildArgs14(ctx)),
2857
- execute: async (ctx) => executeMcpCommand(ctx, serviceName14, toolName14, buildArgs14(ctx))
2858
- };
2859
-
2860
- // src/commands/te-engage/flow/flow-node-config-schema.ts
2861
- var serviceName15 = "engage_flow";
2862
- var toolName15 = "query_flow_node_config_schema";
2863
- function buildArgs15(ctx) {
2864
- return { nodeType: ctx.str("node_type") };
2865
- }
2866
- var flowNodeConfigSchema = {
2867
- service: "engage",
2868
- command: "+flow_node_config_schema",
2869
- description: "Query one type-specific node config schema before constructing save_flow nodes or nodeConfigs.",
2870
- flags: [{ name: "node_type", type: "string", required: true, desc: "Flow node type, for example single_trigger, event_trigger, event_split_flow, or message_push" }],
2871
- risk: "read",
2872
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName15, toolName15, buildArgs15(ctx)),
2873
- execute: async (ctx) => executeMcpCommand(ctx, serviceName15, toolName15, buildArgs15(ctx))
2874
- };
2875
-
2876
- // src/commands/te-engage/flow/flow-node-detail-report.ts
2877
- var serviceName16 = "engage_flow";
2878
- var toolName16 = "query_flow_node_detail_report";
2879
- function buildArgs16(ctx) {
2880
- const args = {
2881
- projectId: ctx.num("project_id"),
2882
- nodeUuid: ctx.str("node_uuid"),
2883
- startTime: ctx.str("start_time"),
2884
- endTime: ctx.str("end_time")
2885
- };
2886
- const flowId = readOptionalString(ctx, "flow_id");
2887
- if (flowId) args.flowId = flowId;
2888
- const flowUuid = readOptionalString(ctx, "flow_uuid");
2889
- if (flowUuid) args.flowUuid = flowUuid;
2890
- const requestId = readOptionalString(ctx, "request_id");
2891
- if (requestId) args.requestId = requestId;
2892
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
2893
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
2894
- const branchId = readOptionalString(ctx, "branch_id");
2895
- if (branchId) args.branchId = branchId;
2896
- const indicatorName = readOptionalString(ctx, "indicator_name");
2897
- if (indicatorName) args.indicatorName = indicatorName;
2898
- const dataDimType = readOptionalString(ctx, "data_dim_type");
2899
- if (dataDimType) args.dataDimType = dataDimType;
2900
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
2901
- if (showTimeZone) args.showTimeZone = showTimeZone;
2902
- return args;
2903
- }
2904
- var flowNodeDetailReport = {
2905
- service: "engage",
2906
- command: "+flow_node_detail_report",
2907
- description: "Query the detailed report for one flow node.",
2908
- flags: [
2909
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2910
- { name: "node_uuid", type: "string", required: true, desc: "Node UUID" },
2911
- { name: "start_time", type: "string", required: true, desc: "Start date" },
2912
- { name: "end_time", type: "string", required: true, desc: "End date" },
2913
- { name: "flow_id", type: "string", required: false, desc: "Flow ID" },
2914
- { name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
2915
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2916
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
2917
- { name: "branch_id", type: "string", required: false, desc: "Branch ID" },
2918
- { name: "indicator_name", type: "string", required: false, desc: "Indicator name" },
2919
- { name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
2920
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
2921
- ],
2922
- risk: "read",
2923
- validate: (ctx) => {
2924
- requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
2925
- },
2926
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName16, toolName16, buildArgs16(ctx)),
2927
- execute: async (ctx) => executeMcpCommand(ctx, serviceName16, toolName16, buildArgs16(ctx))
2928
- };
2929
-
2930
- // src/commands/te-engage/flow/flow-node-overview-report.ts
2931
- var serviceName17 = "engage_flow";
2932
- var toolName17 = "query_flow_node_overview_report";
2933
- function buildArgs17(ctx) {
2934
- const args = {
2935
- projectId: ctx.num("project_id"),
2936
- startTime: ctx.str("start_time"),
2937
- endTime: ctx.str("end_time")
2938
- };
2939
- const flowId = readOptionalString(ctx, "flow_id");
2940
- if (flowId) args.flowId = flowId;
2941
- const flowUuid = readOptionalString(ctx, "flow_uuid");
2942
- if (flowUuid) args.flowUuid = flowUuid;
2943
- const requestId = readOptionalString(ctx, "request_id");
2944
- if (requestId) args.requestId = requestId;
2945
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
2946
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
2947
- const dataDimType = readOptionalString(ctx, "data_dim_type");
2948
- if (dataDimType) args.dataDimType = dataDimType;
2949
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
2950
- if (showTimeZone) args.showTimeZone = showTimeZone;
2951
- return args;
2952
- }
2953
- var flowNodeOverviewReport = {
2954
- service: "engage",
2955
- command: "+flow_node_overview_report",
2956
- description: "Query the node-level overview report for all nodes in a flow.",
2957
- flags: [
2958
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2959
- { name: "start_time", type: "string", required: true, desc: "Start date" },
2960
- { name: "end_time", type: "string", required: true, desc: "End date" },
2961
- { name: "flow_id", type: "string", required: false, desc: "Flow ID" },
2962
- { name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
2963
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2964
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
2965
- { name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
2966
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
2967
- ],
2968
- risk: "read",
2969
- validate: (ctx) => {
2970
- requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
2971
- },
2972
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName17, toolName17, buildArgs17(ctx)),
2973
- execute: async (ctx) => executeMcpCommand(ctx, serviceName17, toolName17, buildArgs17(ctx))
2974
- };
2975
-
2976
- // src/commands/te-engage/flow/flow-process-report.ts
2977
- var serviceName18 = "engage_flow";
2978
- var toolName18 = "query_flow_process_report";
2979
- function buildArgs18(ctx) {
2980
- const args = {
2981
- projectId: ctx.num("project_id"),
2982
- reportType: ctx.str("report_type")
2983
- };
2984
- const flowId = readOptionalString(ctx, "flow_id");
2985
- if (flowId) args.flowId = flowId;
2986
- const flowUuid = readOptionalString(ctx, "flow_uuid");
2987
- if (flowUuid) args.flowUuid = flowUuid;
2988
- const requestId = readOptionalString(ctx, "request_id");
2989
- if (requestId) args.requestId = requestId;
2990
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
2991
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
2992
- const dataDimType = readOptionalString(ctx, "data_dim_type");
2993
- if (dataDimType) args.dataDimType = dataDimType;
2994
- const startTime = readOptionalString(ctx, "start_time");
2995
- if (startTime) args.startTime = startTime;
2996
- const endTime = readOptionalString(ctx, "end_time");
2997
- if (endTime) args.endTime = endTime;
2998
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
2999
- if (showTimeZone) args.showTimeZone = showTimeZone;
3000
- return args;
3001
- }
3002
- var flowProcessReport = {
3003
- service: "engage",
3004
- command: "+flow_process_report",
3005
- description: "Query the process-level report for a flow.",
3006
- flags: [
3007
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3008
- { name: "report_type", type: "string", required: true, desc: "Report type" },
3009
- { name: "flow_id", type: "string", required: false, desc: "Flow ID" },
3010
- { name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
3011
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
3012
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
3013
- { name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
3014
- { name: "start_time", type: "string", required: false, desc: "Start date" },
3015
- { name: "end_time", type: "string", required: false, desc: "End date" },
3016
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
3017
- ],
3018
- risk: "read",
3019
- validate: (ctx) => {
3020
- const reportType = ctx.str("report_type");
3021
- requireAllowedValue(reportType, ["overview", "detail", "exit_detail", "push_detail"], "report_type");
3022
- requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
3023
- if (["detail", "exit_detail", "push_detail"].includes(reportType) && (!hasFlag(ctx, "start_time") || !hasFlag(ctx, "end_time"))) {
3024
- throw new Error("Flags --start_time and --end_time are required for detail, exit_detail, and push_detail reports");
3025
- }
3026
- },
3027
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName18, toolName18, buildArgs18(ctx)),
3028
- execute: async (ctx) => executeMcpCommand(ctx, serviceName18, toolName18, buildArgs18(ctx))
3029
- };
3030
-
3031
- // src/commands/te-engage/flow/manage-flow.ts
3032
- var serviceName19 = "engage_flow";
3033
- var toolName19 = "batch_manage_flow";
3034
- function buildArgs19(ctx) {
3035
- const args = {
3036
- projectId: ctx.num("project_id"),
3037
- action: ctx.str("action")
3038
- };
3039
- const flowList2 = readOptionalJsonArray(ctx, "flow_list");
3040
- if (flowList2 !== void 0) args.flowList = flowList2;
3041
- const pauseFlowList = readOptionalJsonArray(ctx, "pause_flow_list");
3042
- if (pauseFlowList !== void 0) args.pauseFlowList = pauseFlowList;
3043
- const flowIdList = readOptionalJsonArray(ctx, "flow_id_list");
3044
- if (flowIdList !== void 0) args.flowIdList = flowIdList;
3045
- const reason = readOptionalString(ctx, "reason");
3046
- if (reason) args.reason = reason;
3047
- return args;
3048
- }
3049
- var manageFlow = {
3050
- service: "engage",
3051
- command: "+manage_flow",
3052
- description: "Batch manage flows with one unified command.",
3053
- flags: [
3054
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3055
- { name: "action", type: "string", required: true, desc: "Action type" },
3056
- { name: "flow_list", type: "json", required: false, desc: "Flow approval list as JSON array" },
3057
- { name: "pause_flow_list", type: "json", required: false, desc: "Pause flow list as JSON array" },
3058
- { name: "flow_id_list", type: "json", required: false, desc: "Flow ID list as JSON array" },
3059
- { name: "reason", type: "string", required: false, desc: "Reason for review actions" }
3060
- ],
3061
- risk: "write",
3062
- validate: (ctx) => {
3063
- const action = ctx.str("action");
3064
- if (["approve", "deny", "cancel"].includes(action)) {
3065
- readRequiredJsonArray(ctx, "flow_list");
3066
- }
3067
- if (action === "pause") {
3068
- readRequiredJsonArray(ctx, "pause_flow_list");
3069
- }
3070
- if (["recover", "end"].includes(action)) {
3071
- readRequiredJsonArray(ctx, "flow_id_list");
3072
- }
3073
- },
3074
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName19, toolName19, buildArgs19(ctx)),
3075
- execute: async (ctx) => executeMcpCommand(ctx, serviceName19, toolName19, buildArgs19(ctx))
3076
- };
3077
-
3078
- // src/commands/te-engage/flow/modify-flow-base-info.ts
3079
- var serviceName20 = "engage_flow";
3080
- var toolName20 = "modify_flow_base_info";
3081
- function buildArgs20(ctx) {
3082
- const args = {
3083
- projectId: ctx.num("project_id"),
3084
- flowUuid: ctx.str("flow_uuid")
3085
- };
3086
- const flowName = readOptionalString(ctx, "flow_name");
3087
- if (flowName) args.flowName = flowName;
3088
- const flowDesc = readOptionalString(ctx, "flow_desc");
3089
- if (flowDesc) args.flowDesc = flowDesc;
3090
- const groupId = readOptionalNumber(ctx, "group_id");
3091
- if (groupId !== void 0) args.groupId = groupId;
3092
- return args;
3093
- }
3094
- var modifyFlowBaseInfo = {
3095
- service: "engage",
3096
- command: "+modify_flow_base_info",
3097
- description: "Modify the basic information of a flow canvas.",
3098
- flags: [
3099
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3100
- { name: "flow_uuid", type: "string", required: true, desc: "Flow UUID" },
3101
- { name: "flow_name", type: "string", required: false, desc: "New flow name" },
3102
- { name: "flow_desc", type: "string", required: false, desc: "New flow description" },
3103
- { name: "group_id", type: "number", required: false, desc: "New group ID" }
3104
- ],
3105
- risk: "write",
3106
- validate: (ctx) => {
3107
- requireAnyFlag(ctx, ["flow_name", "flow_desc", "group_id"]);
3108
- },
3109
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName20, toolName20, buildArgs20(ctx)),
3110
- execute: async (ctx) => executeMcpCommand(ctx, serviceName20, toolName20, buildArgs20(ctx))
3111
- };
3112
-
3113
- // src/commands/te-engage/flow/save-flow.ts
3114
- var serviceName21 = "engage_flow";
3115
- var toolName21 = "save_flow";
3116
- var allowedOperations = ["build", "preview", "commit"];
3117
- function readAndValidateReq(ctx) {
3118
- const req = readRequiredJsonObject(ctx, "req");
3119
- const operation = typeof req.operation === "string" ? req.operation.trim().toLowerCase() : "";
3120
- if (!allowedOperations.includes(operation)) {
3121
- throw new Error(`Flag --req.operation must be one of: ${allowedOperations.join(", ")}`);
3122
- }
3123
- if ("nodeList" in req || "edgeList" in req) {
3124
- throw new Error("Flag --req must use nodes/edges instead of legacy nodeList/edgeList");
3125
- }
3126
- if ("sourceFlowUuid" in req) {
3127
- throw new Error("Flag --req.sourceFlowUuid is no longer supported; call +flow_detail and build nodes/edges instead");
3128
- }
3129
- return req;
3130
- }
3131
- function buildArgs21(ctx) {
3132
- return {
3133
- projectId: ctx.num("project_id"),
3134
- req: {
3135
- projectId: ctx.num("project_id"),
3136
- ...readAndValidateReq(ctx)
3137
- }
3138
- };
3139
- }
3140
- var saveFlow = {
3141
- service: "engage",
3142
- command: "+save_flow",
3143
- description: "Create, preview, or commit an operation-based flow draft with req.operation=build, preview, or commit. Copy existing flows by querying detail first, then building nodes/edges.",
3144
- flags: [
3145
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3146
- { name: "req", type: "json", required: true, desc: "Operation-based flow save request JSON object. Use operation=build with nodes/edges, operation=preview with draftId, or operation=commit with draftVersion and confirmToken. Do not use sourceFlowUuid clone mode." }
3147
- ],
3148
- risk: "write",
3149
- validate: (ctx) => {
3150
- readAndValidateReq(ctx);
3151
- },
3152
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName21, toolName21, buildArgs21(ctx)),
3153
- execute: async (ctx) => executeMcpCommand(ctx, serviceName21, toolName21, buildArgs21(ctx))
3154
- };
3155
-
3156
- // src/commands/te-engage/flow/validate-flow-node-config.ts
3157
- var serviceName22 = "engage_flow";
3158
- var toolName22 = "validate_flow_node_config";
3159
- function buildArgs22(ctx) {
3160
- return {
3161
- nodeType: ctx.str("node_type"),
3162
- config: ctx.str("config"),
3163
- operationMode: ctx.str("operation_mode")
3164
- };
3165
- }
3166
- var validateFlowNodeConfig = {
3167
- service: "engage",
3168
- command: "+validate_flow_node_config",
3169
- description: "Validate and normalize one candidate node config before placing it into save_flow.",
3133
+ // src/commands/te-engage/engage-task/task/build-save-guide.ts
3134
+ var taskBuildSaveGuide = createEngageTaskCapabilityCommand({
3135
+ resource: "task",
3136
+ command: "build-save-guide",
3137
+ capabilityId: "engage-task.task.build-save-guide",
3138
+ description: "Build a scenario-specific task save guide.",
3170
3139
  flags: [
3171
- { name: "node_type", type: "string", required: true, desc: "Flow node type, for example single_trigger, event_trigger, event_split_flow, or message_push" },
3172
- { name: "config", type: "string", required: true, desc: "Node config JSON object encoded as a string" },
3173
- { name: "operation_mode", type: "string", required: true, desc: "Validation mode. Use save_flow for the current exposed MCP protocol; save_submit_flow applies stricter submit-time checks" }
3140
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
3141
+ { name: "req", type: "json", required: true, desc: "Guide request JSON object; use {} for a generic guide." }
3174
3142
  ],
3175
3143
  risk: "read",
3176
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName22, toolName22, buildArgs22(ctx)),
3177
- execute: async (ctx) => executeMcpCommand(ctx, serviceName22, toolName22, buildArgs22(ctx))
3178
- };
3179
-
3180
- // src/commands/te-engage/flow/index.ts
3181
- var commands8 = [
3182
- flowNodeOverviewReport,
3183
- flowProcessReport,
3184
- flowNodeDetailReport,
3185
- flowAbSplitNodeReport,
3186
- flowDetail,
3187
- modifyFlowBaseInfo,
3188
- manageFlow,
3189
- flowNodeConfigSchema,
3190
- validateFlowNodeConfig,
3191
- deleteFlow,
3192
- flowList,
3193
- saveFlow
3194
- ];
3195
- var flow_default = commands8;
3196
-
3197
- // src/commands/te-engage/setting/add-approver.ts
3198
- var serviceName23 = "engage_setting";
3199
- var toolName23 = "batch_add_approver";
3200
- function buildArgs23(ctx) {
3201
- return {
3202
- projectId: ctx.num("project_id"),
3203
- approvers: readRequiredJsonArray(ctx, "approvers")
3204
- };
3205
- }
3206
- var addApprover = {
3207
- service: "engage",
3208
- command: "+add_approver",
3209
- description: "Batch add approvers to a project.",
3210
- flags: [
3211
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3212
- { name: "approvers", type: "json", required: true, desc: "Approver open ID list as JSON array" }
3213
- ],
3214
- risk: "write",
3215
- validate: (ctx) => {
3216
- readRequiredJsonArray(ctx, "approvers");
3217
- },
3218
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName23, toolName23, buildArgs23(ctx)),
3219
- execute: async (ctx) => executeMcpCommand(ctx, serviceName23, toolName23, buildArgs23(ctx))
3220
- };
3221
-
3222
- // src/commands/te-engage/setting/add-channel.ts
3223
- var serviceName24 = "engage_setting";
3224
- var toolName24 = "add_channel";
3225
- function buildArgs24(ctx) {
3226
- return {
3227
- projectId: ctx.num("project_id"),
3228
- req: {
3229
- projectId: ctx.num("project_id"),
3230
- ...readRequiredJsonObject(ctx, "req")
3231
- }
3232
- };
3233
- }
3234
- var addChannel = {
3235
- service: "engage",
3236
- command: "+add_channel",
3237
- description: "Create a new engage channel.",
3238
- flags: [
3239
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3240
- { name: "req", type: "json", required: true, desc: "Channel creation request as JSON object" }
3241
- ],
3242
- risk: "write",
3243
3144
  validate: (ctx) => {
3244
3145
  readRequiredJsonObject(ctx, "req");
3245
3146
  },
3246
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName24, toolName24, buildArgs24(ctx)),
3247
- execute: async (ctx) => executeMcpCommand(ctx, serviceName24, toolName24, buildArgs24(ctx))
3248
- };
3249
-
3250
- // src/commands/te-engage/setting/approver-list.ts
3251
- var serviceName25 = "engage_setting";
3252
- var toolName25 = "query_approver_list";
3253
- function buildArgs25(ctx) {
3254
- return { projectId: ctx.num("project_id") };
3255
- }
3256
- var approverList = {
3257
- service: "engage",
3258
- command: "+approver_list",
3259
- description: "List approvers for a project.",
3260
- flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
3261
- risk: "read",
3262
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName25, toolName25, buildArgs25(ctx)),
3263
- execute: async (ctx) => executeMcpCommand(ctx, serviceName25, toolName25, buildArgs25(ctx))
3264
- };
3265
-
3266
- // src/commands/te-engage/setting/cancel-query-by-request-id.ts
3267
- var serviceName26 = "engage_setting";
3268
- var toolName26 = "cancel_query_by_request_id";
3269
- function buildArgs26(ctx) {
3270
- return { requestId: ctx.str("request_id") };
3271
- }
3272
- var cancelQueryByRequestId = {
3273
- service: "engage",
3274
- command: "+cancel_query_by_request_id",
3275
- description: "Cancel a running report query by request ID.",
3276
- flags: [{ name: "request_id", type: "string", required: true, desc: "Request ID to cancel" }],
3277
- risk: "write",
3278
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName26, toolName26, buildArgs26(ctx)),
3279
- execute: async (ctx) => executeMcpCommand(ctx, serviceName26, toolName26, buildArgs26(ctx))
3280
- };
3281
-
3282
- // src/commands/te-engage/setting/channel-detail.ts
3283
- var serviceName27 = "engage_setting";
3284
- var toolName27 = "query_channel_detail";
3285
- function buildArgs27(ctx) {
3286
- return {
3287
- projectId: ctx.num("project_id"),
3288
- channelId: ctx.str("channel_id")
3289
- };
3290
- }
3291
- var channelDetail = {
3292
- service: "engage",
3293
- command: "+channel_detail",
3294
- description: "Get engage channel detail via MCP query_channel_detail.",
3295
- flags: [
3296
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3297
- { name: "channel_id", type: "string", required: true, desc: "Channel ID" }
3298
- ],
3299
- risk: "read",
3300
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName27, toolName27, buildArgs27(ctx)),
3301
- execute: async (ctx) => executeMcpCommand(ctx, serviceName27, toolName27, buildArgs27(ctx))
3302
- };
3303
-
3304
- // src/commands/te-engage/setting/channel-list.ts
3305
- var serviceName28 = "engage_setting";
3306
- var toolName28 = "query_channel_list";
3307
- function buildArgs28(ctx) {
3308
- const args = { projectId: ctx.num("project_id") };
3309
- const providerList = readOptionalJsonArray(ctx, "provider_list");
3310
- if (providerList !== void 0) args.providerList = providerList;
3311
- const channelStatus = readOptionalNumber(ctx, "channel_status");
3312
- if (channelStatus !== void 0) args.channelStatus = channelStatus;
3313
- return args;
3314
- }
3315
- var channelList = {
3316
- service: "engage",
3317
- command: "+channel_list",
3318
- description: "List engage channels via MCP query_channel_list.",
3319
- flags: [
3320
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3321
- { name: "provider_list", type: "json", required: false, desc: "Provider list as JSON array" },
3322
- { name: "channel_status", type: "number", required: false, desc: "Channel status filter" }
3323
- ],
3324
- risk: "read",
3325
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName28, toolName28, buildArgs28(ctx)),
3326
- execute: async (ctx) => executeMcpCommand(ctx, serviceName28, toolName28, buildArgs28(ctx))
3327
- };
3328
-
3329
- // src/commands/te-engage/setting/config-channel-detail.ts
3330
- var serviceName29 = "engage_setting";
3331
- var toolName29 = "query_config_channel_detail";
3332
- function buildArgs29(ctx) {
3333
- return {
3334
- projectId: ctx.num("project_id"),
3335
- channelId: ctx.str("channel_id")
3336
- };
3337
- }
3338
- var configChannelDetail = {
3339
- service: "engage",
3340
- command: "+config_channel_detail",
3341
- description: "Get config channel detail.",
3342
- flags: [
3343
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3344
- { name: "channel_id", type: "string", required: true, desc: "Config channel ID" }
3345
- ],
3346
- risk: "read",
3347
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName29, toolName29, buildArgs29(ctx)),
3348
- execute: async (ctx) => executeMcpCommand(ctx, serviceName29, toolName29, buildArgs29(ctx))
3349
- };
3350
-
3351
- // src/commands/te-engage/setting/config-channel-list.ts
3352
- var serviceName30 = "engage_setting";
3353
- var toolName30 = "query_config_channel_list";
3354
- function buildArgs30(ctx) {
3355
- const args = { projectId: ctx.num("project_id") };
3356
- const channelType = readOptionalNumber(ctx, "channel_type");
3357
- if (channelType !== void 0) args.channelType = channelType;
3358
- return args;
3359
- }
3360
- var configChannelList = {
3361
- service: "engage",
3362
- command: "+config_channel_list",
3363
- description: "List config channels.",
3364
- flags: [
3365
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3366
- { name: "channel_type", type: "number", required: false, desc: "Config channel type" }
3367
- ],
3368
- risk: "read",
3369
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName30, toolName30, buildArgs30(ctx)),
3370
- execute: async (ctx) => executeMcpCommand(ctx, serviceName30, toolName30, buildArgs30(ctx))
3371
- };
3372
-
3373
- // src/commands/te-engage/setting/delete-channel.ts
3374
- var serviceName31 = "engage_setting";
3375
- var toolName31 = "delete_channel";
3376
- function buildArgs31(ctx) {
3377
- return {
3378
- projectId: ctx.num("project_id"),
3379
- channelId: ctx.str("channel_id")
3380
- };
3381
- }
3382
- var deleteChannel = {
3383
- service: "engage",
3384
- command: "+delete_channel",
3385
- description: "Delete an engage channel.",
3386
- flags: [
3387
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3388
- { name: "channel_id", type: "string", required: true, desc: "Channel ID" }
3389
- ],
3390
- risk: "high-risk-write",
3391
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName31, toolName31, buildArgs31(ctx)),
3392
- execute: async (ctx) => executeMcpCommand(ctx, serviceName31, toolName31, buildArgs31(ctx))
3393
- };
3394
-
3395
- // src/commands/te-engage/setting/delete-config-channel.ts
3396
- var serviceName32 = "engage_setting";
3397
- var toolName32 = "delete_config_channel";
3398
- function buildArgs32(ctx) {
3399
- return {
3400
- projectId: ctx.num("project_id"),
3401
- channelId: ctx.str("channel_id")
3402
- };
3403
- }
3404
- var deleteConfigChannel = {
3405
- service: "engage",
3406
- command: "+delete_config_channel",
3407
- description: "Delete a config channel.",
3408
- flags: [
3409
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3410
- { name: "channel_id", type: "string", required: true, desc: "Config channel ID" }
3411
- ],
3412
- risk: "high-risk-write",
3413
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName32, toolName32, buildArgs32(ctx)),
3414
- execute: async (ctx) => executeMcpCommand(ctx, serviceName32, toolName32, buildArgs32(ctx))
3415
- };
3416
-
3417
- // src/commands/te-engage/setting/update-channel-status.ts
3418
- var serviceName33 = "engage_setting";
3419
- var toolName33 = "update_channel_status";
3420
- function buildArgs33(ctx) {
3421
- return {
3422
- projectId: ctx.num("project_id"),
3423
- channelId: ctx.str("channel_id"),
3424
- status: ctx.num("status")
3425
- };
3426
- }
3427
- var updateChannelStatus = {
3428
- service: "engage",
3429
- command: "+update_channel_status",
3430
- description: "Update engage channel status.",
3431
- flags: [
3432
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3433
- { name: "channel_id", type: "string", required: true, desc: "Channel ID" },
3434
- { name: "status", type: "number", required: true, desc: "Channel status" }
3435
- ],
3436
- risk: "write",
3437
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName33, toolName33, buildArgs33(ctx)),
3438
- execute: async (ctx) => executeMcpCommand(ctx, serviceName33, toolName33, buildArgs33(ctx))
3439
- };
3147
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequiredJsonObject(ctx, "req") })
3148
+ });
3440
3149
 
3441
- // src/commands/te-engage/setting/update-config-channel-status.ts
3442
- var serviceName34 = "engage_setting";
3443
- var toolName34 = "update_config_channel_status";
3444
- function buildArgs34(ctx) {
3445
- return {
3446
- projectId: ctx.num("project_id"),
3447
- channelId: ctx.str("channel_id"),
3448
- channelStatus: ctx.num("channel_status")
3449
- };
3450
- }
3451
- var updateConfigChannelStatus = {
3452
- service: "engage",
3453
- command: "+update_config_channel_status",
3454
- description: "Update config channel status.",
3150
+ // src/commands/te-engage/engage-task/task/get.ts
3151
+ var taskGet2 = createEngageTaskCapabilityCommand({
3152
+ resource: "task",
3153
+ command: "get",
3154
+ capabilityId: "engage-task.task.get",
3155
+ description: "Get one engagement task.",
3455
3156
  flags: [
3456
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3457
- { name: "channel_id", type: "string", required: true, desc: "Config channel ID" },
3458
- { name: "channel_status", type: "number", required: true, desc: "Config channel status" }
3157
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
3158
+ { name: "task-id", type: "string", required: true, desc: "Engagement task ID." }
3459
3159
  ],
3460
- risk: "write",
3461
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName34, toolName34, buildArgs34(ctx)),
3462
- execute: async (ctx) => executeMcpCommand(ctx, serviceName34, toolName34, buildArgs34(ctx))
3463
- };
3464
-
3465
- // src/commands/te-engage/setting/whitelist-list.ts
3466
- var serviceName35 = "engage_setting";
3467
- var toolName35 = "query_whitelist_list";
3468
- function buildArgs35(ctx) {
3469
- return { projectId: ctx.num("project_id") };
3470
- }
3471
- var whitelistList = {
3472
- service: "engage",
3473
- command: "+whitelist_list",
3474
- description: "List whitelist entries for a project.",
3475
- flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
3476
3160
  risk: "read",
3477
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName35, toolName35, buildArgs35(ctx)),
3478
- execute: async (ctx) => executeMcpCommand(ctx, serviceName35, toolName35, buildArgs35(ctx))
3479
- };
3161
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), task_id: ctx.str("task-id") })
3162
+ });
3480
3163
 
3481
- // src/commands/te-engage/setting/index.ts
3482
- var commands9 = [
3483
- channelList,
3484
- channelDetail,
3485
- updateChannelStatus,
3486
- deleteChannel,
3487
- addChannel,
3488
- whitelistList,
3489
- addApprover,
3490
- approverList,
3491
- cancelQueryByRequestId,
3492
- configChannelDetail,
3493
- configChannelList,
3494
- deleteConfigChannel,
3495
- updateConfigChannelStatus
3496
- ];
3497
- var setting_default = commands9;
3498
-
3499
- // src/commands/te-engage/task/build-task-save-guide.ts
3500
- var serviceName36 = "engage_task";
3501
- var toolName36 = "build_task_save_guide";
3502
- function buildArgs36(ctx) {
3503
- return {
3504
- projectId: ctx.num("project_id"),
3505
- req: readRequiredJsonObject(ctx, "req")
3506
- };
3507
- }
3508
- var buildTaskSaveGuide = {
3509
- service: "engage",
3510
- command: "+build_task_save_guide",
3511
- description: "Build a scenario-specific guide for constructing save_task req.",
3164
+ // src/commands/te-engage/engage-task/task/list.ts
3165
+ var taskList = createEngageTaskCapabilityCommand({
3166
+ resource: "task",
3167
+ command: "list",
3168
+ capabilityId: "engage-task.task.list",
3169
+ description: "Query the paginated task list.",
3512
3170
  flags: [
3513
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3514
- { name: "req", type: "json", required: true, desc: "Guide request as JSON object; use {} for a generic guide" }
3171
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
3172
+ { name: "req", type: "json", required: true, desc: "Task list request JSON object." }
3515
3173
  ],
3516
3174
  risk: "read",
3517
3175
  validate: (ctx) => {
3518
3176
  readRequiredJsonObject(ctx, "req");
3519
3177
  },
3520
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName36, toolName36, buildArgs36(ctx)),
3521
- execute: async (ctx) => executeMcpCommand(ctx, serviceName36, toolName36, buildArgs36(ctx))
3522
- };
3178
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequiredJsonObject(ctx, "req") })
3179
+ });
3523
3180
 
3524
- // src/commands/te-engage/task/manage-task.ts
3525
- var serviceName37 = "engage_task";
3526
- var toolName37 = "manage_task";
3527
- function buildArgs37(ctx) {
3528
- const args = {
3529
- projectId: ctx.num("project_id"),
3530
- taskId: ctx.str("task_id"),
3531
- action: ctx.str("action")
3532
- };
3533
- const reason = readOptionalString(ctx, "reason");
3534
- if (reason) args.reason = reason;
3535
- return args;
3536
- }
3537
- var manageTask = {
3538
- service: "engage",
3539
- command: "+manage_task",
3181
+ // src/commands/te-engage/engage-task/task/manage.ts
3182
+ var taskManage = createEngageTaskCapabilityCommand({
3183
+ resource: "task",
3184
+ command: "manage",
3185
+ capabilityId: "engage-task.task.manage",
3540
3186
  description: "Manage a task lifecycle action.",
3541
3187
  flags: [
3542
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3543
- { name: "task_id", type: "string", required: true, desc: "Task ID" },
3544
- { name: "action", type: "string", required: true, desc: "Action to perform" },
3545
- { name: "reason", type: "string", required: false, desc: "Reason for review actions" }
3188
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
3189
+ { name: "task-id", type: "string", required: true, desc: "Engagement task ID." },
3190
+ { name: "action", type: "string", required: true, desc: "send, pause, end, approve, deny, or cancel." },
3191
+ { name: "reason", type: "string", required: false, desc: "Review reason." }
3546
3192
  ],
3547
3193
  risk: "write",
3548
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName37, toolName37, buildArgs37(ctx)),
3549
- execute: async (ctx) => executeMcpCommand(ctx, serviceName37, toolName37, buildArgs37(ctx))
3550
- };
3194
+ buildInput: (ctx) => ({
3195
+ project_id: ctx.num("project-id"),
3196
+ task_id: ctx.str("task-id"),
3197
+ action: ctx.str("action"),
3198
+ ...readOptionalString(ctx, "reason") !== void 0 && { reason: readOptionalString(ctx, "reason") }
3199
+ })
3200
+ });
3551
3201
 
3552
- // src/commands/te-engage/task/save-task.ts
3553
- var serviceName38 = "engage_task";
3554
- var toolName38 = "save_task";
3555
- function buildArgs38(ctx) {
3556
- return {
3557
- projectId: ctx.num("project_id"),
3558
- req: {
3559
- projectId: ctx.num("project_id"),
3560
- ...readRequiredJsonObject(ctx, "req")
3561
- }
3562
- };
3563
- }
3564
- var saveTask = {
3565
- service: "engage",
3566
- command: "+save_task",
3202
+ // src/commands/te-engage/engage-task/task/save.ts
3203
+ var taskSave = createEngageTaskCapabilityCommand({
3204
+ resource: "task",
3205
+ command: "save",
3206
+ capabilityId: "engage-task.task.save",
3567
3207
  description: "Create or update a task draft.",
3568
3208
  flags: [
3569
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3570
- { name: "req", type: "json", required: true, desc: "Task save request as JSON object" }
3209
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
3210
+ { name: "req", type: "json", required: true, desc: "Task save request JSON object." }
3571
3211
  ],
3572
3212
  risk: "write",
3573
3213
  validate: (ctx) => {
3574
3214
  readRequiredJsonObject(ctx, "req");
3575
3215
  },
3576
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName38, toolName38, buildArgs38(ctx)),
3577
- execute: async (ctx) => executeMcpCommand(ctx, serviceName38, toolName38, buildArgs38(ctx))
3578
- };
3579
-
3580
- // src/commands/te-engage/task/task-data-detail.ts
3581
- var serviceName39 = "engage_task";
3582
- var toolName39 = "query_task_data_detail";
3583
- function buildArgs39(ctx) {
3584
- const args = {
3585
- projectId: ctx.num("project_id"),
3586
- taskId: ctx.str("task_id"),
3587
- detailType: ctx.str("detail_type"),
3588
- startTime: ctx.str("start_time"),
3589
- endTime: ctx.str("end_time")
3590
- };
3591
- const requestId = readOptionalString(ctx, "request_id");
3592
- if (requestId) args.requestId = requestId;
3593
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
3594
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
3595
- const taskInstanceId = readOptionalString(ctx, "task_instance_id");
3596
- if (taskInstanceId) args.taskInstanceId = taskInstanceId;
3597
- const dataDimType = readOptionalString(ctx, "data_dim_type");
3598
- if (dataDimType) args.dataDimType = dataDimType;
3599
- const retentionType = readOptionalString(ctx, "retention_type");
3600
- if (retentionType) args.retentionType = retentionType;
3601
- const dataViewType = readOptionalNumber(ctx, "data_view_type");
3602
- if (dataViewType !== void 0) args.dataViewType = dataViewType;
3603
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
3604
- if (showTimeZone) args.showTimeZone = showTimeZone;
3605
- return args;
3606
- }
3607
- var taskDataDetail = {
3608
- service: "engage",
3609
- command: "+task_data_detail",
3610
- description: "Query the detailed data report for one task.",
3611
- flags: [
3612
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3613
- { name: "task_id", type: "string", required: true, desc: "Task ID" },
3614
- {
3615
- name: "detail_type",
3616
- type: "string",
3617
- required: true,
3618
- desc: "Detail type: time | instance | instance_daily",
3619
- hint: "Allowed --detail_type: time|instance|instance_daily (instance_daily also requires --task_instance_id). Example: --detail_type time --start_time 2026-04-01 --end_time 2026-04-07"
3620
- },
3621
- {
3622
- name: "start_time",
3623
- type: "string",
3624
- required: true,
3625
- desc: "Start date (yyyy-MM-dd)",
3626
- hint: "Pass --start_time as yyyy-MM-dd, e.g. 2026-04-01."
3627
- },
3628
- {
3629
- name: "end_time",
3630
- type: "string",
3631
- required: true,
3632
- desc: "End date (yyyy-MM-dd)",
3633
- hint: "Pass --end_time as yyyy-MM-dd, e.g. 2026-04-07."
3634
- },
3635
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
3636
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
3637
- { name: "task_instance_id", type: "string", required: false, desc: "Task instance ID (required when detail_type=instance_daily)" },
3638
- { name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
3639
- { name: "retention_type", type: "string", required: false, desc: "Retention type" },
3640
- { name: "data_view_type", type: "number", required: false, desc: "Trigger detail view type" },
3641
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
3642
- ],
3643
- risk: "read",
3644
- validate: (ctx) => {
3645
- const detailType = ctx.str("detail_type");
3646
- requireAllowedValue(detailType, ["time", "instance", "instance_daily"], "detail_type");
3647
- if (detailType === "instance_daily" && !hasFlag(ctx, "task_instance_id")) {
3648
- throw new Error("Flag --task_instance_id is required when --detail_type is instance_daily");
3649
- }
3650
- },
3651
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName39, toolName39, buildArgs39(ctx)),
3652
- execute: async (ctx) => executeMcpCommand(ctx, serviceName39, toolName39, buildArgs39(ctx))
3653
- };
3654
-
3655
- // src/commands/te-engage/task/task-data-overview.ts
3656
- var serviceName40 = "engage_task";
3657
- var toolName40 = "query_task_data_overview";
3658
- function buildArgs40(ctx) {
3659
- const args = {
3660
- projectId: ctx.num("project_id"),
3661
- taskId: ctx.str("task_id")
3662
- };
3663
- const requestId = readOptionalString(ctx, "request_id");
3664
- if (requestId) args.requestId = requestId;
3665
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
3666
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
3667
- const dataDimType = readOptionalString(ctx, "data_dim_type");
3668
- if (dataDimType) args.dataDimType = dataDimType;
3669
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
3670
- if (showTimeZone) args.showTimeZone = showTimeZone;
3671
- return args;
3672
- }
3673
- var taskDataOverview = {
3674
- service: "engage",
3675
- command: "+task_data_overview",
3676
- description: "Query the high-level data overview for one task.",
3677
- flags: [
3678
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3679
- { name: "task_id", type: "string", required: true, desc: "Task ID" },
3680
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
3681
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
3682
- { name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
3683
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
3684
- ],
3685
- risk: "read",
3686
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName40, toolName40, buildArgs40(ctx)),
3687
- execute: async (ctx) => executeMcpCommand(ctx, serviceName40, toolName40, buildArgs40(ctx))
3688
- };
3689
-
3690
- // src/commands/te-engage/task/task-detail.ts
3691
- var serviceName41 = "engage_task";
3692
- var toolName41 = "query_task_detail";
3693
- function buildArgs41(ctx) {
3694
- return {
3695
- projectId: ctx.num("project_id"),
3696
- taskId: ctx.str("task_id")
3697
- };
3698
- }
3699
- var taskDetail = {
3700
- service: "engage",
3701
- command: "+task_detail",
3702
- description: "Get detailed information for one task.",
3703
- flags: [
3704
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3705
- { name: "task_id", type: "string", required: true, desc: "Task ID" }
3706
- ],
3707
- risk: "read",
3708
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName41, toolName41, buildArgs41(ctx)),
3709
- execute: async (ctx) => executeMcpCommand(ctx, serviceName41, toolName41, buildArgs41(ctx))
3710
- };
3711
-
3712
- // src/commands/te-engage/task/task-experiment-report.ts
3713
- var serviceName42 = "engage_task";
3714
- var toolName42 = "query_task_experiment_report";
3715
- function buildArgs42(ctx) {
3716
- const args = {
3717
- projectId: ctx.num("project_id"),
3718
- taskId: ctx.str("task_id"),
3719
- reportType: ctx.str("report_type"),
3720
- startTime: ctx.str("start_time"),
3721
- endTime: ctx.str("end_time")
3722
- };
3723
- const requestId = readOptionalString(ctx, "request_id");
3724
- if (requestId) args.requestId = requestId;
3725
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
3726
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
3727
- return args;
3728
- }
3729
- var taskExperimentReport = {
3730
- service: "engage",
3731
- command: "+task_experiment_report",
3732
- description: "Query the experiment report for one task.",
3733
- flags: [
3734
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3735
- { name: "task_id", type: "string", required: true, desc: "Task ID" },
3736
- { name: "report_type", type: "string", required: true, desc: "Report type: overview or detail" },
3737
- { name: "start_time", type: "string", required: true, desc: "Start date" },
3738
- { name: "end_time", type: "string", required: true, desc: "End date" },
3739
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
3740
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" }
3741
- ],
3742
- risk: "read",
3743
- validate: (ctx) => {
3744
- requireAllowedValue(ctx.str("report_type"), ["overview", "detail"], "report_type");
3745
- },
3746
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName42, toolName42, buildArgs42(ctx)),
3747
- execute: async (ctx) => executeMcpCommand(ctx, serviceName42, toolName42, buildArgs42(ctx))
3748
- };
3749
-
3750
- // src/commands/te-engage/task/task-list.ts
3751
- var serviceName43 = "engage_task";
3752
- var toolName43 = "query_task_list";
3753
- function buildArgs43(ctx) {
3754
- return {
3755
- projectId: ctx.num("project_id"),
3756
- req: {
3757
- projectId: ctx.num("project_id"),
3758
- ...readRequiredJsonObject(ctx, "req")
3759
- }
3760
- };
3761
- }
3762
- var taskList = {
3763
- service: "engage",
3764
- command: "+task_list",
3765
- description: "Query the paginated task list.",
3766
- flags: [
3767
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3768
- { name: "req", type: "json", required: true, desc: "Task list request as JSON object" }
3769
- ],
3770
- risk: "read",
3771
- validate: (ctx) => {
3772
- readRequiredJsonObject(ctx, "req");
3773
- },
3774
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName43, toolName43, buildArgs43(ctx)),
3775
- execute: async (ctx) => executeMcpCommand(ctx, serviceName43, toolName43, buildArgs43(ctx))
3776
- };
3777
-
3778
- // src/commands/te-engage/task/task-metric-detail.ts
3779
- var serviceName44 = "engage_task";
3780
- var toolName44 = "query_task_metric_detail";
3781
- function buildArgs44(ctx) {
3782
- const args = {
3783
- projectId: ctx.num("project_id"),
3784
- taskId: ctx.str("task_id"),
3785
- startTime: ctx.str("start_time"),
3786
- endTime: ctx.str("end_time")
3787
- };
3788
- const requestId = readOptionalString(ctx, "request_id");
3789
- if (requestId) args.requestId = requestId;
3790
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
3791
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
3792
- const metricIdList = readOptionalJsonArray(ctx, "metric_id_list");
3793
- if (metricIdList !== void 0) args.metricIdList = metricIdList;
3794
- const groupType = readOptionalNumber(ctx, "group_type");
3795
- if (groupType !== void 0) args.groupType = groupType;
3796
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
3797
- if (showTimeZone) args.showTimeZone = showTimeZone;
3798
- return args;
3799
- }
3800
- var taskMetricDetail = {
3801
- service: "engage",
3802
- command: "+task_metric_detail",
3803
- description: "Query the metric-oriented detail report for one task.",
3804
- flags: [
3805
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3806
- { name: "task_id", type: "string", required: true, desc: "Task ID" },
3807
- { name: "start_time", type: "string", required: true, desc: "Start date" },
3808
- { name: "end_time", type: "string", required: true, desc: "End date" },
3809
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
3810
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
3811
- { name: "metric_id_list", type: "json", required: false, desc: "Metric ID list as JSON array" },
3812
- { name: "group_type", type: "number", required: false, desc: "Grouping type" },
3813
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
3814
- ],
3815
- risk: "read",
3816
- validate: (ctx) => {
3817
- readOptionalJsonArray(ctx, "metric_id_list");
3818
- },
3819
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName44, toolName44, buildArgs44(ctx)),
3820
- execute: async (ctx) => executeMcpCommand(ctx, serviceName44, toolName44, buildArgs44(ctx))
3821
- };
3216
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequiredJsonObject(ctx, "req") })
3217
+ });
3822
3218
 
3823
- // src/commands/te-engage/task/task-stats.ts
3824
- var serviceName45 = "engage_task";
3825
- var toolName45 = "get_task_stats";
3826
- function buildArgs45(ctx) {
3827
- return {
3828
- projectId: ctx.num("project_id"),
3829
- req: {
3830
- projectId: ctx.num("project_id"),
3831
- ...readRequiredJsonObject(ctx, "req")
3832
- }
3833
- };
3834
- }
3835
- var taskStats = {
3836
- service: "engage",
3837
- command: "+task_stats",
3838
- description: "Get status statistics for tasks.",
3219
+ // src/commands/te-engage/engage-task/task/stats.ts
3220
+ var taskStats = createEngageTaskCapabilityCommand({
3221
+ resource: "task",
3222
+ command: "stats",
3223
+ capabilityId: "engage-task.task.stats",
3224
+ description: "Get task status statistics.",
3839
3225
  flags: [
3840
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3841
- { name: "req", type: "json", required: true, desc: "Task stats request as JSON object" }
3226
+ { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
3227
+ { name: "req", type: "json", required: true, desc: "Task statistics request JSON object." }
3842
3228
  ],
3843
3229
  risk: "read",
3844
3230
  validate: (ctx) => {
3845
3231
  readRequiredJsonObject(ctx, "req");
3846
3232
  },
3847
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName45, toolName45, buildArgs45(ctx)),
3848
- execute: async (ctx) => executeMcpCommand(ctx, serviceName45, toolName45, buildArgs45(ctx))
3849
- };
3233
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequiredJsonObject(ctx, "req") })
3234
+ });
3850
3235
 
3851
- // src/commands/te-engage/task/index.ts
3852
- var commands10 = [
3853
- taskDataOverview,
3854
- taskDataDetail,
3855
- taskMetricDetail,
3856
- taskExperimentReport,
3857
- taskDetail,
3236
+ // src/commands/te-engage/engage-task/index.ts
3237
+ var commands6 = [
3858
3238
  taskList,
3239
+ taskGet2,
3859
3240
  taskStats,
3860
- buildTaskSaveGuide,
3861
- saveTask,
3862
- manageTask
3241
+ taskBuildSaveGuide,
3242
+ taskSave,
3243
+ taskManage,
3244
+ channelRefStats,
3245
+ groupCreate,
3246
+ groupDelete,
3247
+ groupList,
3248
+ groupUpdate,
3249
+ metricList,
3250
+ metricUpdate,
3251
+ operationLogQuery2,
3252
+ pushRecordQuery,
3253
+ raceRelease,
3254
+ segmentListGet,
3255
+ segmentListQuery,
3256
+ segmentListRename,
3257
+ segmentListSetVisibility,
3258
+ taskDelete,
3259
+ taskModifyGroup
3260
+ // taskSubmitApproval,
3863
3261
  ];
3864
- var task_default = commands10;
3262
+ var engage_task_default = commands6;
3865
3263
 
3866
3264
  // src/commands/te-engage/index.ts
3867
3265
  registerCapabilityGatewayRoute("engage-flow", { gatewayDomain: "engage" });
@@ -3870,17 +3268,7 @@ registerCapabilityGatewayRoute("engage-setting", { gatewayDomain: "engage" });
3870
3268
  registerCapabilityGatewayRoute("engage-scene", { gatewayDomain: "engage" });
3871
3269
  registerCapabilityGatewayRoute("engage-activity", { gatewayDomain: "engage" });
3872
3270
  registerCapabilityGatewayRoute("engage-workbench", { gatewayDomain: "engage" });
3873
- registerMcpMappings({
3874
- "engage_config": { componentName: "engage", mappingPath: "config" },
3875
- "engage_flow": { componentName: "engage", mappingPath: "flow" },
3876
- "engage_setting": { componentName: "engage", mappingPath: "setting" },
3877
- "engage_task": { componentName: "engage", mappingPath: "task" }
3878
- });
3879
- var commands11 = [
3880
- ...setting_default,
3881
- ...task_default,
3882
- ...config_default,
3883
- ...flow_default,
3271
+ var commands7 = [
3884
3272
  ...engage_flow_default,
3885
3273
  ...engage_task_default,
3886
3274
  ...engage_setting_default,
@@ -3888,7 +3276,7 @@ var commands11 = [
3888
3276
  ...engage_activity_default,
3889
3277
  ...engage_workbench_default
3890
3278
  ];
3891
- var te_engage_default = commands11;
3279
+ var te_engage_default = commands7;
3892
3280
  export {
3893
3281
  te_engage_default as default
3894
3282
  };