@thinkingai/ae-cli 6.0.33 → 6.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/README.md +3 -2
  2. package/README.zh.md +3 -2
  3. package/dist/index.js +24 -16
  4. package/dist/{metadata-W2MEOI4Z.js → metadata-ELUAR3EJ.js} +0 -53
  5. package/dist/{metadata-3M5F2AED.js → metadata-P5GIVMZ6.js} +0 -53
  6. package/dist/{te-agent-K2OWMZXT.js → te-agent-BOQ7ZY56.js} +194 -1
  7. package/dist/{te-analysis-Q7AZCDU4.js → te-analysis-HZIP6SYW.js} +446 -562
  8. package/dist/{te-analysis-I73ZS4NK.js → te-analysis-ZT2MYAHL.js} +446 -562
  9. package/dist/{te-dataops-MJV54MNY.js → te-dataops-VYN3IOKO.js} +6 -6
  10. package/dist/{te-dataops-OA7I6HBG.js → te-dataops-Y5QAPPPF.js} +6 -6
  11. package/dist/{te-engage-GJRVQMK3.js → te-engage-2FSDUOIZ.js} +965 -1578
  12. package/dist/{te-engage-JIXX3WBI.js → te-engage-BMJ6UOUU.js} +965 -1578
  13. package/dist/{te-kb-CIZXRWMO.js → te-kb-E7NSCBRB.js} +25 -6
  14. package/dist/te-meta-GBDTMPEL.js +95 -0
  15. package/dist/te-meta-ZTLTSHXC.js +95 -0
  16. package/package.json +5 -4
  17. package/skills/ae-agent/SKILL.md +5 -1
  18. package/skills/ae-agent/references/list-sandbox-tools.md +79 -0
  19. package/skills/ae-analysis/SKILL.md +8 -9
  20. package/skills/ae-analysis/references/adhoc_export.md +8 -0
  21. package/skills/ae-analysis/references/adhoc_run.md +9 -0
  22. package/skills/ae-analysis/references/ai_models.md +3 -1
  23. package/skills/ae-analysis/references/analysis_data_retrieval.md +2 -0
  24. package/skills/ae-analysis/references/analysis_drilldown_contract.md +2 -0
  25. package/skills/ae-analysis/references/analysis_gateway_assets.md +9 -7
  26. package/skills/ae-analysis/references/command_index.md +18 -40
  27. package/skills/ae-analysis/references/dashboard_report_data_export.md +4 -2
  28. package/skills/ae-analysis/references/dashboard_report_data_run.md +5 -3
  29. package/skills/ae-analysis/references/drilldown_entities_export.md +3 -0
  30. package/skills/ae-analysis/references/drilldown_entities_run.md +2 -1
  31. package/skills/ae-analysis/references/drilldown_events_export.md +3 -0
  32. package/skills/ae-analysis/references/drilldown_events_run.md +2 -1
  33. package/skills/ae-analysis/references/drilldown_user_events_export.md +3 -0
  34. package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -0
  35. package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
  36. package/skills/ae-analysis/references/filter_value_list.md +47 -0
  37. package/skills/ae-analysis/references/project_space_get.md +3 -3
  38. package/skills/ae-analysis/references/project_space_list.md +6 -2
  39. package/skills/ae-analysis/references/query_cancel.md +3 -1
  40. package/skills/ae-analysis/references/query_cluster_list.md +34 -0
  41. package/skills/ae-analysis/references/query_create_result_cluster.md +2 -0
  42. package/skills/ae-analysis/references/report_create.md +5 -1
  43. package/skills/ae-analysis/references/report_data_export.md +9 -2
  44. package/skills/ae-analysis/references/report_data_run.md +8 -3
  45. package/skills/ae-analysis/references/report_get.md +3 -1
  46. package/skills/ae-analysis/references/report_update.md +4 -0
  47. package/skills/ae-analysis/references/virtual_event_create.md +7 -6
  48. package/skills/ae-analysis-global/SKILL.md +15 -32
  49. package/skills/ae-community/SKILL.md +1 -1
  50. package/skills/ae-data-integration-helper/SKILL.md +3 -2
  51. package/skills/ae-data-integration-helper/references/sdk_usage_notes.md +1 -1
  52. package/skills/ae-dataops/SKILL.md +2 -1
  53. package/skills/ae-dataops/references/dataops-integration.md +75 -6
  54. package/skills/ae-engage/SKILL.md +127 -104
  55. package/skills/ae-engage/references/activity-activity-type.md +1 -1
  56. package/skills/ae-engage/references/activity-activity.md +1 -1
  57. package/skills/ae-engage/references/activity-approval.md +5 -7
  58. package/skills/ae-engage/references/activity-task.md +12 -18
  59. package/skills/ae-engage/references/activity-topic.md +39 -22
  60. package/skills/ae-engage/references/add-approver.md +4 -4
  61. package/skills/ae-engage/references/add-channel.md +10 -5
  62. package/skills/ae-engage/references/approval-approver-delete.md +1 -1
  63. package/skills/ae-engage/references/approver-list.md +4 -4
  64. package/skills/ae-engage/references/build-task-save-guide.md +13 -13
  65. package/skills/ae-engage/references/cancel-query-by-request-id.md +7 -6
  66. package/skills/ae-engage/references/channel-detail.md +14 -9
  67. package/skills/ae-engage/references/channel-list.md +15 -10
  68. package/skills/ae-engage/references/channel-mgmt.md +109 -0
  69. package/skills/ae-engage/references/channel-test-send.md +1 -1
  70. package/skills/ae-engage/references/channel-update-config.md +1 -1
  71. package/skills/ae-engage/references/channel_touch_limits_list.md +1 -1
  72. package/skills/ae-engage/references/client-param.md +34 -16
  73. package/skills/ae-engage/references/common-metric.md +85 -18
  74. package/skills/ae-engage/references/config-item-analysis-report.md +8 -27
  75. package/skills/ae-engage/references/config-item-strategy-comparison.md +7 -18
  76. package/skills/ae-engage/references/config-item-trigger-report.md +8 -35
  77. package/skills/ae-engage/references/delete-channel.md +5 -5
  78. package/skills/ae-engage/references/delete-flow.md +5 -5
  79. package/skills/ae-engage/references/flow-ab-split-node-report.md +11 -45
  80. package/skills/ae-engage/references/flow-detail.md +15 -10
  81. package/skills/ae-engage/references/flow-list.md +9 -4
  82. package/skills/ae-engage/references/flow-node-config-schema.md +9 -8
  83. package/skills/ae-engage/references/flow-node-detail-report.md +11 -46
  84. package/skills/ae-engage/references/flow-node-overview-report.md +11 -43
  85. package/skills/ae-engage/references/flow-process-report.md +12 -50
  86. package/skills/ae-engage/references/flow-update-remark.md +19 -0
  87. package/skills/ae-engage/references/manage-flow.md +19 -19
  88. package/skills/ae-engage/references/manage-task.md +5 -5
  89. package/skills/ae-engage/references/modify-flow-base-info.md +8 -8
  90. package/skills/ae-engage/references/preset-event.md +1 -1
  91. package/skills/ae-engage/references/push-language.md +1 -1
  92. package/skills/ae-engage/references/save-flow.md +54 -52
  93. package/skills/ae-engage/references/save-task.md +23 -17
  94. package/skills/ae-engage/references/scene-config-channel.md +90 -10
  95. package/skills/ae-engage/references/scene-config-group.md +1 -1
  96. package/skills/ae-engage/references/scene-config-item.md +27 -4
  97. package/skills/ae-engage/references/scene-config-metric.md +1 -1
  98. package/skills/ae-engage/references/scene-config-param.md +2 -2
  99. package/skills/ae-engage/references/scene-preset-metric.md +1 -1
  100. package/skills/ae-engage/references/scene-strategy.md +19 -3
  101. package/skills/ae-engage/references/scene-template.md +10 -4
  102. package/skills/ae-engage/references/task-data-detail.md +5 -67
  103. package/skills/ae-engage/references/task-data-overview.md +5 -35
  104. package/skills/ae-engage/references/task-detail.md +5 -5
  105. package/skills/ae-engage/references/task-experiment-report.md +5 -38
  106. package/skills/ae-engage/references/task-list.md +4 -4
  107. package/skills/ae-engage/references/task-metric-detail.md +5 -43
  108. package/skills/ae-engage/references/task-stats.md +5 -5
  109. package/skills/ae-engage/references/update-channel-status.md +6 -6
  110. package/skills/ae-engage/references/validate-flow-node-config.md +12 -11
  111. package/skills/ae-engage/references/whitelist-list.md +4 -4
  112. package/skills/ae-engage/references/whitelist.md +1 -1
  113. package/skills/ae-engage/references/workbench-workbench.md +1 -1
  114. package/skills/ae-generate-tracking-code/SKILL.md +4 -3
  115. package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +1 -1
  116. package/skills/ae-generate-tracking-code/references/server-sdk-insert.md +1 -1
  117. package/skills/ae-generate-tracking-code/references/snippet-delivery.md +1 -1
  118. package/skills/ae-generate-tracking-plan/SKILL.md +6 -2
  119. package/skills/ae-kb/SKILL.md +9 -5
  120. package/skills/ae-metadata/SKILL.md +8 -15
  121. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
  122. package/dist/te-common-ST3QPSXJ.js +0 -61
  123. package/dist/te-common-WSLIKKPC.js +0 -61
  124. package/dist/te-meta-Q4L6EE3Q.js +0 -363
  125. package/dist/te-meta-VHCN4Q62.js +0 -363
  126. package/skills/ae-analysis/references/batch_create_metadata.md +0 -41
  127. package/skills/ae-analysis/references/batch_edit_metadata.md +0 -39
  128. package/skills/ae-analysis/references/cancel_query.md +0 -38
  129. package/skills/ae-analysis/references/create_alert.md +0 -47
  130. package/skills/ae-analysis/references/create_entity.md +0 -39
  131. package/skills/ae-analysis/references/create_project_mark_time.md +0 -39
  132. package/skills/ae-analysis/references/delete_alert.md +0 -32
  133. package/skills/ae-analysis/references/delete_project_mark_times.md +0 -36
  134. package/skills/ae-analysis/references/delete_track_items.md +0 -36
  135. package/skills/ae-analysis/references/generate_track_program.md +0 -52
  136. package/skills/ae-analysis/references/generate_track_sdk_sample.md +0 -44
  137. package/skills/ae-analysis/references/get_alert.md +0 -35
  138. package/skills/ae-analysis/references/get_alert_definition_schema.md +0 -33
  139. package/skills/ae-analysis/references/get_project_config.md +0 -33
  140. package/skills/ae-analysis/references/get_track_program.md +0 -34
  141. package/skills/ae-analysis/references/list_alerts.md +0 -41
  142. package/skills/ae-analysis/references/list_entities.md +0 -42
  143. package/skills/ae-analysis/references/list_project_mark_times.md +0 -43
  144. package/skills/ae-analysis/references/list_project_users.md +0 -33
  145. package/skills/ae-analysis/references/list_projects.md +0 -39
  146. package/skills/ae-analysis/references/load_filters.md +0 -47
  147. package/skills/ae-analysis/references/save_track_items.md +0 -37
  148. package/skills/ae-analysis/references/update_alert.md +0 -49
  149. package/skills/ae-analysis/references/update_project_mark_time.md +0 -40
  150. package/skills/ae-analysis-global/references/list_query_clusters.md +0 -68
  151. package/skills/ae-engage/references/config-channel-detail.md +0 -31
  152. package/skills/ae-engage/references/config-channel-list.md +0 -26
  153. package/skills/ae-engage/references/config-item-detail.md +0 -29
  154. package/skills/ae-engage/references/config-item-list.md +0 -18
  155. package/skills/ae-engage/references/copy-config-template.md +0 -28
  156. package/skills/ae-engage/references/delete-config-channel.md +0 -23
  157. package/skills/ae-engage/references/delete-config-item.md +0 -24
  158. package/skills/ae-engage/references/engage-scene-config-item.md +0 -69
  159. package/skills/ae-engage/references/manage-strategy.md +0 -73
  160. package/skills/ae-engage/references/strategy-detail.md +0 -72
  161. package/skills/ae-engage/references/strategy-list.md +0 -20
  162. package/skills/ae-engage/references/update-config-channel-status.md +0 -31
  163. package/skills/ae-metadata/references/metadata_event_get.md +0 -52
  164. package/skills/ae-metadata/references/metadata_property_get.md +0 -54
  165. package/dist/{config-RCCGHHYA.js → config-PMPISN5Y.js} +4 -4
  166. package/dist/{te-community-WXGB6IOX.js → te-community-QOYIYEJI.js} +3 -3
  167. package/dist/{te-community-X2AHXGCA.js → te-community-UFKI6ONP.js} +3 -3
@@ -8,13 +8,6 @@ import "./chunk-RGXCNC4N.js";
8
8
  import {
9
9
  printError
10
10
  } from "./chunk-IMMGMU54.js";
11
- import {
12
- callMcpTool,
13
- parseMcpResult,
14
- registerMcpMappings,
15
- resolveMcpUrl
16
- } from "./chunk-CPVTECJ3.js";
17
- import "./chunk-LCXU3AAT.js";
18
11
  import "./chunk-E7UXXHO3.js";
19
12
  import "./chunk-IR4ZLVPW.js";
20
13
  import "./chunk-V6FR6WTW.js";
@@ -48,6 +41,239 @@ function createEngageWorkbenchCapabilityCommand(config) {
48
41
  return createEngageCapabilityCommand("engage-workbench", config);
49
42
  }
50
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
+
51
277
  // src/commands/te-engage/engage-flow/operation-log/query.ts
52
278
  var operationLogQuery = createEngageFlowCapabilityCommand({
53
279
  resource: "operation-log",
@@ -78,9 +304,18 @@ var versionList = createEngageFlowCapabilityCommand({
78
304
 
79
305
  // src/commands/te-engage/engage-flow/index.ts
80
306
  var commands = [
307
+ flowList,
308
+ flowGet,
309
+ flowSave,
310
+ nodeConfigSchema,
311
+ nodeConfigValidate,
312
+ flowModifyBaseInfo,
313
+ flowManage,
314
+ flowDelete,
81
315
  operationLogQuery,
82
- // testRun, // temporarily disabled: ae-cli engage-flow test run
83
- versionList
316
+ // testRun,
317
+ versionList,
318
+ flowUpdateRemark
84
319
  ];
85
320
  var engage_flow_default = commands;
86
321
 
@@ -231,7 +466,7 @@ function validateContentListShape(contentList) {
231
466
  printError(
232
467
  "validation",
233
468
  `--content-list[${index}] must include a non-empty string key and a value field.`,
234
- "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."
235
470
  );
236
471
  process.exit(1);
237
472
  }
@@ -278,6 +513,89 @@ var channelTestSend = createEngageSettingCapabilityCommand({
278
513
  })
279
514
  });
280
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
+
281
599
  // src/commands/te-engage/engage-setting/approval-approver/delete.ts
282
600
  var approvalApproverDelete = createEngageSettingCapabilityCommand({
283
601
  resource: "approval-approver",
@@ -295,6 +613,37 @@ var approvalApproverDelete = createEngageSettingCapabilityCommand({
295
613
  })
296
614
  });
297
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
+
298
647
  // src/commands/te-engage/engage-setting/whitelist/add.ts
299
648
  var whitelistAdd = createEngageSettingCapabilityCommand({
300
649
  resource: "whitelist",
@@ -390,6 +739,17 @@ var whitelistVerify = createEngageSettingCapabilityCommand({
390
739
  })
391
740
  });
392
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
+
393
753
  // src/commands/te-engage/engage-setting/push-language/get.ts
394
754
  var pushLanguageGet = createEngageSettingCapabilityCommand({
395
755
  resource: "push-language",
@@ -427,34 +787,71 @@ var pushLanguageSet = createEngageSettingCapabilityCommand({
427
787
  })
428
788
  });
429
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
+
430
830
  // src/commands/te-engage/engage-setting/client-param/update.ts
431
831
  var clientParamUpdate = createEngageSettingCapabilityCommand({
432
832
  resource: "client-param",
433
833
  command: "update",
434
834
  capabilityId: "engage-setting.client-param.update",
435
- 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.",
436
836
  flags: [
437
837
  { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
438
838
  { name: "column-name", type: "string", required: true, desc: "Client param column name." },
439
- { name: "column-type", type: "string", required: true, desc: "Column type (see ColumnTypeEnum)." },
440
- { name: "select-type", type: "string", required: true, desc: "Select type (see SelectTypeEnum)." },
441
- { name: "column-source", type: "string", required: false, desc: "Param source: preset or custom." },
442
- { name: "column-desc", type: "string", required: false, desc: "Display name of the param. Defaults to an empty string." },
443
- { name: "column-remark", type: "string", required: false, desc: "Description/remark for the param." },
444
- { name: "alternative-val", type: "json", required: false, desc: "Optional JSON array of alternative values." },
445
- { 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
+ }
446
847
  ],
447
848
  risk: "write",
448
849
  buildInput: (ctx) => ({
449
850
  project_id: ctx.num("project-id"),
450
851
  column_name: ctx.str("column-name"),
451
- column_type: ctx.str("column-type"),
452
- select_type: ctx.str("select-type"),
453
- column_source: ctx.str("column-source") || void 0,
454
- column_desc: ctx.str("column-desc") || "",
852
+ column_desc: ctx.str("column-desc") || void 0,
455
853
  column_remark: ctx.str("column-remark") || void 0,
456
- alternative_val: ctx.json("alternative-val") || void 0,
457
- system_id_param: ctx.bool("system-id-param")
854
+ alternative_val: ctx.json("alternative-val") || void 0
458
855
  })
459
856
  });
460
857
 
@@ -679,26 +1076,77 @@ var commonMetricGet = createEngageSettingCapabilityCommand({
679
1076
  });
680
1077
 
681
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"]);
682
1080
  function validateMetricQpFlag(metricQp) {
683
- if (metricQp.trim() !== "{}") {
684
- return;
685
- }
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
+ }
686
1124
  printError(
687
1125
  "validation",
688
- "--metric-qp cannot be an empty JSON object.",
689
- "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."
690
1128
  );
691
1129
  process.exit(1);
692
1130
  }
693
1131
 
694
- // src/commands/te-engage/engage-setting/common-metric/update.ts
1132
+ // src/commands/te-engage/engage-setting/common-metric/create.ts
695
1133
  var writeFlags = [
696
1134
  { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
697
- { name: "metric-type", type: "number", required: true, desc: "Metric type (see MetricTypeEunm)." },
698
- { name: "metric-name", type: "string", required: true, desc: "Metric name." },
699
- { 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
+ },
700
1143
  { name: "metric-window-num", type: "number", required: true, desc: "Metric window number." },
701
- { 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
+ },
702
1150
  { name: "display-name", type: "string", required: true, desc: "Display name of the metric." },
703
1151
  { name: "note", type: "string", required: false, desc: "Metric note/remark." },
704
1152
  { name: "order-id", type: "number", required: false, desc: "Sort order id." },
@@ -718,17 +1166,70 @@ var buildWriteInput = (ctx) => ({
718
1166
  metric_setting_id: ctx.str("metric-setting-id") || void 0,
719
1167
  metric_params: ctx.str("metric-params") || void 0
720
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
+ });
721
1221
  var commonMetricUpdate = createEngageSettingCapabilityCommand({
722
1222
  resource: "common-metric",
723
1223
  command: "update",
724
1224
  capabilityId: "engage-setting.common-metric.update",
725
1225
  description: "Update an existing common metric's type, expression, time window, and display metadata.",
726
- flags: writeFlags,
1226
+ flags: writeFlags2,
727
1227
  risk: "write",
728
1228
  validate: (ctx) => {
729
1229
  validateMetricQpFlag(ctx.str("metric-qp"));
1230
+ validateMetricWindowTimeUnitFlag(ctx.str("metric-window-time-unit"));
730
1231
  },
731
- buildInput: buildWriteInput
1232
+ buildInput: buildWriteInput2
732
1233
  });
733
1234
 
734
1235
  // src/commands/te-engage/engage-setting/common-metric/delete.ts
@@ -756,14 +1257,22 @@ var commands2 = [
756
1257
  channelTouchLimitsSave,
757
1258
  channelUpdateConfig,
758
1259
  channelTestSend,
1260
+ channelList,
1261
+ channelGet,
1262
+ channelCreate,
1263
+ channelUpdateStatus,
1264
+ channelDelete,
1265
+ approvalApproverAdd,
1266
+ approvalApproverList,
759
1267
  approvalApproverDelete,
1268
+ whitelistList,
760
1269
  whitelistAdd,
761
1270
  whitelistUpdate,
762
1271
  whitelistDelete,
763
1272
  whitelistVerify,
764
1273
  pushLanguageGet,
765
1274
  pushLanguageSet,
766
- // clientParamCreate,
1275
+ clientParamCreate,
767
1276
  clientParamUpdate,
768
1277
  clientParamDelete,
769
1278
  clientParamList,
@@ -777,7 +1286,7 @@ var commands2 = [
777
1286
  presetEventUpdate,
778
1287
  commonMetricList,
779
1288
  commonMetricGet,
780
- // commonMetricCreate,
1289
+ commonMetricCreate,
781
1290
  commonMetricUpdate,
782
1291
  commonMetricDelete
783
1292
  ];
@@ -814,6 +1323,39 @@ var configItemCreate = createEngageSceneCapabilityCommand({
814
1323
  })
815
1324
  });
816
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
+
817
1359
  // src/commands/te-engage/engage-scene/config-item/list.ts
818
1360
  var configItemList = createEngageSceneCapabilityCommand({
819
1361
  resource: "config-item",
@@ -1155,6 +1697,51 @@ var configMetricBatchDelete = createEngageSceneCapabilityCommand({
1155
1697
  })
1156
1698
  });
1157
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
+
1158
1745
  // src/commands/te-engage/engage-scene/config-channel/create.ts
1159
1746
  var configChannelCreate = createEngageSceneCapabilityCommand({
1160
1747
  resource: "config-channel",
@@ -1202,6 +1789,52 @@ var configChannelUpdate = createEngageSceneCapabilityCommand({
1202
1789
  })
1203
1790
  });
1204
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
+
1205
1838
  // src/commands/te-engage/engage-scene/config-channel/query-log.ts
1206
1839
  var configChannelQueryLog = createEngageSceneCapabilityCommand({
1207
1840
  resource: "config-channel",
@@ -1241,6 +1874,83 @@ var strategyCreate = createEngageSceneCapabilityCommand({
1241
1874
  })
1242
1875
  });
1243
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
+
1244
1954
  // src/commands/te-engage/engage-scene/strategy/update.ts
1245
1955
  var strategyUpdate = createEngageSceneCapabilityCommand({
1246
1956
  resource: "strategy",
@@ -1359,6 +2069,29 @@ var templateCreate = createEngageSceneCapabilityCommand({
1359
2069
  })
1360
2070
  });
1361
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
+
1362
2095
  // src/commands/te-engage/engage-scene/template/update.ts
1363
2096
  var templateUpdate = createEngageSceneCapabilityCommand({
1364
2097
  resource: "template",
@@ -1424,6 +2157,8 @@ var templateDelete = createEngageSceneCapabilityCommand({
1424
2157
  // src/commands/te-engage/engage-scene/index.ts
1425
2158
  var commands3 = [
1426
2159
  configItemCreate,
2160
+ configItemDelete,
2161
+ configItemGet,
1427
2162
  configItemList,
1428
2163
  configItemUpdate,
1429
2164
  configParamList,
@@ -1441,16 +2176,24 @@ var commands3 = [
1441
2176
  configMetricBatchAdd,
1442
2177
  configMetricUpdateRule,
1443
2178
  configMetricBatchDelete,
2179
+ configChannelList,
2180
+ configChannelGet,
1444
2181
  configChannelCreate,
1445
2182
  configChannelUpdate,
2183
+ configChannelUpdateStatus,
2184
+ configChannelDelete,
1446
2185
  configChannelQueryLog,
1447
2186
  strategyCreate,
2187
+ strategyGet,
2188
+ strategyList,
2189
+ strategyManage,
1448
2190
  strategyUpdate,
1449
2191
  strategyLog,
1450
2192
  strategyBatchCopy,
1451
2193
  // strategySaveSubmit,
1452
2194
  // strategyTestSend,
1453
2195
  templateList,
2196
+ templateCopy,
1454
2197
  templateGet,
1455
2198
  templateCreate,
1456
2199
  templateUpdate,
@@ -1622,25 +2365,6 @@ var activityInfoList = createEngageActivityCapabilityCommand({
1622
2365
  })
1623
2366
  });
1624
2367
 
1625
- // src/commands/te-engage/engage-activity/approval/submit.ts
1626
- var approvalSubmit = createEngageActivityCapabilityCommand({
1627
- resource: "approval",
1628
- command: "submit",
1629
- capabilityId: "engage-activity.approval.submit",
1630
- description: "Submit an activity for approval.",
1631
- flags: [
1632
- { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1633
- { name: "activity-id", type: "string", required: true, desc: "Activity ID." },
1634
- { name: "reason", type: "string", required: false, desc: "Optional submit note." }
1635
- ],
1636
- risk: "write",
1637
- buildInput: (ctx) => ({
1638
- project_id: ctx.num("project-id"),
1639
- activity_id: ctx.str("activity-id"),
1640
- reason: ctx.str("reason") || void 0
1641
- })
1642
- });
1643
-
1644
2368
  // src/commands/te-engage/engage-activity/approval/approve.ts
1645
2369
  var approvalApprove = createEngageActivityCapabilityCommand({
1646
2370
  resource: "approval",
@@ -1698,6 +2422,50 @@ var approvalCancel = createEngageActivityCapabilityCommand({
1698
2422
  })
1699
2423
  });
1700
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
+
1701
2469
  // src/commands/te-engage/engage-activity/topic/remove-task.ts
1702
2470
  var topicRemoveTask = createEngageActivityCapabilityCommand({
1703
2471
  resource: "topic",
@@ -1851,12 +2619,51 @@ var taskGet = createEngageActivityCapabilityCommand({
1851
2619
  })
1852
2620
  });
1853
2621
 
1854
- // src/commands/te-engage/engage-activity/task/copy.ts
1855
- var taskCopy = createEngageActivityCapabilityCommand({
2622
+ // src/commands/te-engage/engage-activity/task/create.ts
2623
+ var taskCreate = createEngageActivityCapabilityCommand({
1856
2624
  resource: "task",
1857
- command: "copy",
1858
- capabilityId: "engage-activity.task.copy",
1859
- 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).",
1860
2667
  flags: [
1861
2668
  { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
1862
2669
  { name: "task-id", type: "string", required: true, desc: "Source task ID to copy." },
@@ -1881,12 +2688,12 @@ var commands4 = [
1881
2688
  activityEnd,
1882
2689
  activityStats,
1883
2690
  activityInfoList,
1884
- approvalSubmit,
2691
+ // approvalSubmit,
1885
2692
  approvalApprove,
1886
2693
  approvalReject,
1887
2694
  approvalCancel,
1888
- // topicCreate, // temporarily disabled: ae-cli engage-activity topic create
1889
- // topicUpdate, // temporarily disabled: ae-cli engage-activity topic update
2695
+ topicCreate,
2696
+ topicUpdate,
1890
2697
  topicRemoveTask,
1891
2698
  topicDelete,
1892
2699
  topicGet,
@@ -1896,8 +2703,8 @@ var commands4 = [
1896
2703
  activityTypeUpdate,
1897
2704
  activityTypeBatchDelete,
1898
2705
  taskGet,
1899
- // taskCreate, // temporarily disabled: ae-cli engage-activity task create
1900
- // taskUpdate, // temporarily disabled: ae-cli engage-activity task update
2706
+ taskCreate,
2707
+ taskUpdate,
1901
2708
  taskCopy
1902
2709
  ];
1903
2710
  var engage_activity_default = commands4;
@@ -2323,1546 +3130,136 @@ var taskModifyGroup = createEngageTaskCapabilityCommand({
2323
3130
  })
2324
3131
  });
2325
3132
 
2326
- // src/commands/te-engage/engage-task/index.ts
2327
- var commands6 = [
2328
- channelRefStats,
2329
- groupCreate,
2330
- groupDelete,
2331
- groupList,
2332
- groupUpdate,
2333
- metricList,
2334
- metricUpdate,
2335
- operationLogQuery2,
2336
- pushRecordQuery,
2337
- raceRelease,
2338
- segmentListGet,
2339
- segmentListQuery,
2340
- segmentListRename,
2341
- segmentListSetVisibility,
2342
- taskDelete,
2343
- taskModifyGroup
2344
- // taskSubmitApproval,
2345
- ];
2346
- var engage_task_default = commands6;
2347
-
2348
- // src/commands/te-engage/utils.ts
2349
- function buildMcpDryRun(ctx, serviceName46, toolName46, args) {
2350
- const host = ctx.host();
2351
- return {
2352
- method: "MCP tools/call",
2353
- url: resolveMcpUrl(ctx.mcpUrl(), host, serviceName46),
2354
- body: {
2355
- serviceName: serviceName46,
2356
- toolName: toolName46,
2357
- arguments: args
2358
- }
2359
- };
2360
- }
2361
- async function executeMcpCommand(ctx, serviceName46, toolName46, args) {
2362
- const host = ctx.host();
2363
- const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, serviceName46);
2364
- const result = await callMcpTool(mcpUrl, toolName46, args, host);
2365
- return parseMcpResult(result);
2366
- }
2367
- function hasFlag(ctx, name) {
2368
- return ctx.str(name) !== "";
2369
- }
2370
- function readOptionalString(ctx, name) {
2371
- const value = ctx.str(name);
2372
- return value === "" ? void 0 : value;
2373
- }
2374
- function readOptionalNumber(ctx, name) {
2375
- return hasFlag(ctx, name) ? ctx.num(name) : void 0;
2376
- }
2377
- function readOptionalBoolean(ctx, name) {
2378
- return hasFlag(ctx, name) ? ctx.bool(name) : void 0;
2379
- }
2380
- function readOptionalJsonArray(ctx, name) {
2381
- const value = ctx.json(name);
2382
- if (value === void 0) return void 0;
2383
- if (!Array.isArray(value)) {
2384
- throw new Error(`Flag --${name} must be a JSON array`);
2385
- }
2386
- return value;
2387
- }
2388
- function readRequiredJsonArray(ctx, name, minLength = 1) {
2389
- const value = readOptionalJsonArray(ctx, name);
2390
- if (!value || value.length < minLength) {
2391
- throw new Error(`Flag --${name} must be a JSON array with at least ${minLength} item(s)`);
2392
- }
2393
- return value;
2394
- }
2395
- function readRequiredJsonObject(ctx, name) {
2396
- const value = ctx.json(name);
2397
- if (!value || typeof value !== "object" || Array.isArray(value)) {
2398
- throw new Error(`Flag --${name} must be a JSON object`);
2399
- }
2400
- return value;
2401
- }
2402
- function requireOneOfFlags(ctx, names) {
2403
- if (!names.some((name) => hasFlag(ctx, name))) {
2404
- throw new Error(`At least one of ${names.map((name) => `--${name}`).join(", ")} is required`);
2405
- }
2406
- }
2407
- function requireAnyFlag(ctx, names) {
2408
- if (!names.some((name) => hasFlag(ctx, name))) {
2409
- throw new Error(`At least one of ${names.map((name) => `--${name}`).join(", ")} is required`);
2410
- }
2411
- }
2412
- function requireAllowedValue(value, allowed, flagName) {
2413
- if (!allowed.includes(value)) {
2414
- throw new Error(`Flag --${flagName} must be one of: ${allowed.join(", ")}`);
2415
- }
2416
- }
2417
-
2418
- // src/commands/te-engage/config/config-item-analysis-report.ts
2419
- var serviceName = "engage_config";
2420
- var toolName = "query_config_item_analysis_report";
2421
- function buildArgs(ctx) {
2422
- const args = {
2423
- projectId: ctx.num("project_id"),
2424
- configId: ctx.str("config_id"),
2425
- startTime: ctx.str("start_time"),
2426
- endTime: ctx.str("end_time")
2427
- };
2428
- const requestId = readOptionalString(ctx, "request_id");
2429
- if (requestId) args.requestId = requestId;
2430
- const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
2431
- if (templateIdList !== void 0) args.templateIdList = templateIdList;
2432
- const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
2433
- if (strategyIdList !== void 0) args.strategyIdList = strategyIdList;
2434
- const showTimeZone = readOptionalNumber(ctx, "show_time_zone");
2435
- if (showTimeZone !== void 0) args.showTimeZone = showTimeZone;
2436
- return args;
2437
- }
2438
- var configItemAnalysisReport = {
2439
- service: "engage",
2440
- command: "+config_item_analysis_report",
2441
- description: "Query the analysis report for a config item.",
2442
- flags: [
2443
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2444
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2445
- { name: "start_time", type: "string", required: true, desc: "Start date" },
2446
- { name: "end_time", type: "string", required: true, desc: "End date" },
2447
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2448
- { name: "template_id_list", type: "json", required: false, desc: "Template ID list as JSON array" },
2449
- { name: "strategy_id_list", type: "json", required: false, desc: "Strategy ID list as JSON array" },
2450
- { name: "show_time_zone", type: "number", required: false, desc: "Timezone offset" }
2451
- ],
2452
- risk: "read",
2453
- validate: (ctx) => {
2454
- const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
2455
- const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
2456
- if (templateIdList && strategyIdList) {
2457
- throw new Error("Flags --template_id_list and --strategy_id_list cannot be used together");
2458
- }
2459
- },
2460
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName, toolName, buildArgs(ctx)),
2461
- execute: async (ctx) => executeMcpCommand(ctx, serviceName, toolName, buildArgs(ctx))
2462
- };
2463
-
2464
- // src/commands/te-engage/config/config-item-detail.ts
2465
- var serviceName2 = "engage_config";
2466
- var toolName2 = "query_config_item_detail";
2467
- function buildArgs2(ctx) {
2468
- return {
2469
- projectId: ctx.num("project_id"),
2470
- configId: ctx.str("config_id")
2471
- };
2472
- }
2473
- var configItemDetail = {
2474
- service: "engage",
2475
- command: "+config_item_detail",
2476
- description: "Get config item detail.",
2477
- flags: [
2478
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2479
- { name: "config_id", type: "string", required: true, desc: "Config item ID" }
2480
- ],
2481
- risk: "read",
2482
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName2, toolName2, buildArgs2(ctx)),
2483
- execute: async (ctx) => executeMcpCommand(ctx, serviceName2, toolName2, buildArgs2(ctx))
2484
- };
2485
-
2486
- // src/commands/te-engage/config/config-item-list.ts
2487
- var serviceName3 = "engage_config";
2488
- var toolName3 = "query_config_item_list";
2489
- function buildArgs3(ctx) {
2490
- return { projectId: ctx.num("project_id") };
2491
- }
2492
- var configItemList2 = {
2493
- service: "engage",
2494
- command: "+config_item_list",
2495
- description: "List config items for a project.",
2496
- flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
2497
- risk: "read",
2498
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName3, toolName3, buildArgs3(ctx)),
2499
- execute: async (ctx) => executeMcpCommand(ctx, serviceName3, toolName3, buildArgs3(ctx))
2500
- };
2501
-
2502
- // src/commands/te-engage/config/config-item-strategy-comparison.ts
2503
- var serviceName4 = "engage_config";
2504
- var toolName4 = "query_config_item_strategy_comparison";
2505
- function buildArgs4(ctx) {
2506
- const args = {
2507
- projectId: ctx.num("project_id"),
2508
- configId: ctx.str("config_id"),
2509
- strategyIdList: readRequiredJsonArray(ctx, "strategy_id_list", 2)
2510
- };
2511
- const requestId = readOptionalString(ctx, "request_id");
2512
- if (requestId) args.requestId = requestId;
2513
- const showTimeZone = readOptionalNumber(ctx, "show_time_zone");
2514
- if (showTimeZone !== void 0) args.showTimeZone = showTimeZone;
2515
- return args;
2516
- }
2517
- var configItemStrategyComparison = {
2518
- service: "engage",
2519
- command: "+config_item_strategy_comparison",
2520
- description: "Compare multiple strategies under one config item.",
2521
- flags: [
2522
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2523
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2524
- { name: "strategy_id_list", type: "json", required: true, desc: "Strategy ID list as JSON array" },
2525
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2526
- { name: "show_time_zone", type: "number", required: false, desc: "Timezone offset" }
2527
- ],
2528
- risk: "read",
2529
- validate: (ctx) => {
2530
- readRequiredJsonArray(ctx, "strategy_id_list", 2);
2531
- },
2532
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName4, toolName4, buildArgs4(ctx)),
2533
- execute: async (ctx) => executeMcpCommand(ctx, serviceName4, toolName4, buildArgs4(ctx))
2534
- };
2535
-
2536
- // src/commands/te-engage/config/config-item-trigger-report.ts
2537
- var serviceName5 = "engage_config";
2538
- var toolName5 = "query_config_item_trigger_report";
2539
- function buildArgs5(ctx) {
2540
- const args = {
2541
- projectId: ctx.num("project_id"),
2542
- configId: ctx.str("config_id"),
2543
- startTime: ctx.str("start_time"),
2544
- endTime: ctx.str("end_time")
2545
- };
2546
- const requestId = readOptionalString(ctx, "request_id");
2547
- if (requestId) args.requestId = requestId;
2548
- const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
2549
- if (templateIdList !== void 0) args.templateIdList = templateIdList;
2550
- const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
2551
- if (strategyIdList !== void 0) args.strategyIdList = strategyIdList;
2552
- const showTimeZone = readOptionalNumber(ctx, "show_time_zone");
2553
- if (showTimeZone !== void 0) args.showTimeZone = showTimeZone;
2554
- const analyzeReportInternalQuery = readOptionalBoolean(ctx, "analyze_report_internal_query");
2555
- if (analyzeReportInternalQuery !== void 0) args.analyzeReportInternalQuery = analyzeReportInternalQuery;
2556
- return args;
2557
- }
2558
- var configItemTriggerReport = {
2559
- service: "engage",
2560
- command: "+config_item_trigger_report",
2561
- description: "Query the publish and trigger trend report for a config item.",
2562
- flags: [
2563
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2564
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2565
- { name: "start_time", type: "string", required: true, desc: "Start date" },
2566
- { name: "end_time", type: "string", required: true, desc: "End date" },
2567
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2568
- { name: "template_id_list", type: "json", required: false, desc: "Template ID list as JSON array" },
2569
- { name: "strategy_id_list", type: "json", required: false, desc: "Strategy ID list as JSON array" },
2570
- { name: "show_time_zone", type: "number", required: false, desc: "Timezone offset" },
2571
- { name: "analyze_report_internal_query", type: "boolean", required: false, desc: "Internal trigger-report calculation switch" }
2572
- ],
2573
- risk: "read",
2574
- validate: (ctx) => {
2575
- const templateIdList = readOptionalJsonArray(ctx, "template_id_list");
2576
- const strategyIdList = readOptionalJsonArray(ctx, "strategy_id_list");
2577
- if (templateIdList && strategyIdList) {
2578
- throw new Error("Flags --template_id_list and --strategy_id_list cannot be used together");
2579
- }
2580
- },
2581
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName5, toolName5, buildArgs5(ctx)),
2582
- execute: async (ctx) => executeMcpCommand(ctx, serviceName5, toolName5, buildArgs5(ctx))
2583
- };
2584
-
2585
- // src/commands/te-engage/config/copy-config-template.ts
2586
- var serviceName6 = "engage_config";
2587
- var toolName6 = "copy_config_template";
2588
- function buildArgs6(ctx) {
2589
- return {
2590
- sourceProjectId: ctx.num("source_project_id"),
2591
- sourceConfigId: ctx.str("source_config_id"),
2592
- sourceTemplateId: ctx.str("source_template_id"),
2593
- projectId: ctx.num("project_id"),
2594
- configId: ctx.str("config_id")
2595
- };
2596
- }
2597
- var copyConfigTemplate = {
2598
- service: "engage",
2599
- command: "+copy_config_template",
2600
- description: "Copy one template from a source config item to a target config item.",
2601
- flags: [
2602
- { name: "source_project_id", type: "number", required: true, desc: "Source project ID" },
2603
- { name: "source_config_id", type: "string", required: true, desc: "Source config item ID" },
2604
- { name: "source_template_id", type: "string", required: true, desc: "Source template ID" },
2605
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Target project ID" },
2606
- { name: "config_id", type: "string", required: true, desc: "Target config item ID" }
2607
- ],
2608
- risk: "write",
2609
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName6, toolName6, buildArgs6(ctx)),
2610
- execute: async (ctx) => executeMcpCommand(ctx, serviceName6, toolName6, buildArgs6(ctx))
2611
- };
2612
-
2613
- // src/commands/te-engage/config/delete-config-item.ts
2614
- var serviceName7 = "engage_config";
2615
- var toolName7 = "delete_config_item";
2616
- function buildArgs7(ctx) {
2617
- return {
2618
- projectId: ctx.num("project_id"),
2619
- configId: ctx.str("config_id"),
2620
- openId: ctx.str("open_id")
2621
- };
2622
- }
2623
- var deleteConfigItem = {
2624
- service: "engage",
2625
- command: "+delete_config_item",
2626
- description: "Delete a config item.",
2627
- flags: [
2628
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2629
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2630
- { name: "open_id", type: "string", required: true, desc: "Operator open ID" }
2631
- ],
2632
- risk: "high-risk-write",
2633
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName7, toolName7, buildArgs7(ctx)),
2634
- execute: async (ctx) => executeMcpCommand(ctx, serviceName7, toolName7, buildArgs7(ctx))
2635
- };
2636
-
2637
- // src/commands/te-engage/config/manage-strategy.ts
2638
- var serviceName8 = "engage_config";
2639
- var toolName8 = "batch_manage_strategy";
2640
- function buildArgs8(ctx) {
2641
- const args = {
2642
- projectId: ctx.num("project_id"),
2643
- configId: ctx.str("config_id"),
2644
- action: ctx.str("action")
2645
- };
2646
- const strategyUuidList = readOptionalJsonArray(ctx, "strategy_uuid_list");
2647
- if (strategyUuidList !== void 0) args.strategyUuidList = strategyUuidList;
2648
- const strategyList2 = readOptionalJsonArray(ctx, "strategy_list");
2649
- if (strategyList2 !== void 0) args.strategyList = strategyList2;
2650
- const reason = readOptionalString(ctx, "reason");
2651
- if (reason) args.reason = reason;
2652
- return args;
2653
- }
2654
- var manageStrategy = {
2655
- service: "engage",
2656
- command: "+manage_strategy",
2657
- description: "Batch manage config strategies.",
2658
- flags: [
2659
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2660
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2661
- { name: "action", type: "string", required: true, desc: "Action type" },
2662
- { name: "strategy_uuid_list", type: "json", required: false, desc: "Strategy UUID list as JSON array" },
2663
- { name: "strategy_list", type: "json", required: false, desc: "Strategy review list as JSON array" },
2664
- { name: "reason", type: "string", required: false, desc: "Reason for approval actions" }
2665
- ],
2666
- risk: "write",
2667
- validate: (ctx) => {
2668
- const action = ctx.str("action");
2669
- if (["online", "offline", "suspend", "delete"].includes(action)) {
2670
- readRequiredJsonArray(ctx, "strategy_uuid_list");
2671
- }
2672
- if (["approve", "deny", "cancel"].includes(action)) {
2673
- readRequiredJsonArray(ctx, "strategy_list");
2674
- }
2675
- },
2676
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName8, toolName8, buildArgs8(ctx)),
2677
- execute: async (ctx) => executeMcpCommand(ctx, serviceName8, toolName8, buildArgs8(ctx))
2678
- };
2679
-
2680
- // src/commands/te-engage/config/strategy-detail.ts
2681
- var serviceName9 = "engage_config";
2682
- var toolName9 = "query_strategy_detail";
2683
- function buildArgs9(ctx) {
2684
- return {
2685
- projectId: ctx.num("project_id"),
2686
- configId: ctx.str("config_id"),
2687
- strategyUuid: ctx.str("strategy_uuid")
2688
- };
2689
- }
2690
- var strategyDetail = {
2691
- service: "engage",
2692
- command: "+strategy_detail",
2693
- description: "Get one strategy detail.",
2694
- flags: [
2695
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2696
- { name: "config_id", type: "string", required: true, desc: "Config item ID" },
2697
- { name: "strategy_uuid", type: "string", required: true, desc: "Strategy UUID" }
2698
- ],
2699
- risk: "read",
2700
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName9, toolName9, buildArgs9(ctx)),
2701
- execute: async (ctx) => executeMcpCommand(ctx, serviceName9, toolName9, buildArgs9(ctx))
2702
- };
2703
-
2704
- // src/commands/te-engage/config/strategy-list.ts
2705
- var serviceName10 = "engage_config";
2706
- var toolName10 = "query_strategy_list";
2707
- function buildArgs10(ctx) {
2708
- const args = { projectId: ctx.num("project_id") };
2709
- const configId = readOptionalString(ctx, "config_id");
2710
- if (configId) args.configId = configId;
2711
- const strategyUuidList = readOptionalJsonArray(ctx, "strategy_uuid_list");
2712
- if (strategyUuidList !== void 0) args.strategyUuidList = strategyUuidList;
2713
- return args;
2714
- }
2715
- var strategyList = {
2716
- service: "engage",
2717
- command: "+strategy_list",
2718
- description: "List strategies under a project or config item.",
2719
- flags: [
2720
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2721
- { name: "config_id", type: "string", required: false, desc: "Config item ID" },
2722
- { name: "strategy_uuid_list", type: "json", required: false, desc: "Strategy UUID list as JSON array" }
2723
- ],
2724
- risk: "read",
2725
- validate: (ctx) => {
2726
- readOptionalJsonArray(ctx, "strategy_uuid_list");
2727
- },
2728
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName10, toolName10, buildArgs10(ctx)),
2729
- execute: async (ctx) => executeMcpCommand(ctx, serviceName10, toolName10, buildArgs10(ctx))
2730
- };
2731
-
2732
- // src/commands/te-engage/config/index.ts
2733
- var commands7 = [
2734
- configItemTriggerReport,
2735
- configItemAnalysisReport,
2736
- configItemStrategyComparison,
2737
- configItemList2,
2738
- configItemDetail,
2739
- deleteConfigItem,
2740
- copyConfigTemplate,
2741
- strategyList,
2742
- strategyDetail,
2743
- manageStrategy
2744
- ];
2745
- var config_default = commands7;
2746
-
2747
- // src/commands/te-engage/flow/delete-flow.ts
2748
- var serviceName11 = "engage_flow";
2749
- var toolName11 = "batch_delete_flow";
2750
- function buildArgs11(ctx) {
2751
- return {
2752
- projectId: ctx.num("project_id"),
2753
- flowUuidList: readRequiredJsonArray(ctx, "flow_uuid_list")
2754
- };
2755
- }
2756
- var deleteFlow = {
2757
- service: "engage",
2758
- command: "+delete_flow",
2759
- description: "Batch delete flows.",
2760
- flags: [
2761
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2762
- { name: "flow_uuid_list", type: "json", required: true, desc: "Flow UUID list as JSON array" }
2763
- ],
2764
- risk: "high-risk-write",
2765
- validate: (ctx) => {
2766
- readRequiredJsonArray(ctx, "flow_uuid_list");
2767
- },
2768
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName11, toolName11, buildArgs11(ctx)),
2769
- execute: async (ctx) => executeMcpCommand(ctx, serviceName11, toolName11, buildArgs11(ctx))
2770
- };
2771
-
2772
- // src/commands/te-engage/flow/flow-ab-split-node-report.ts
2773
- var serviceName12 = "engage_flow";
2774
- var toolName12 = "query_flow_ab_split_node_report";
2775
- function buildArgs12(ctx) {
2776
- const args = {
2777
- projectId: ctx.num("project_id"),
2778
- reportType: ctx.str("report_type"),
2779
- nodeUuid: ctx.str("node_uuid"),
2780
- startTime: ctx.str("start_time"),
2781
- endTime: ctx.str("end_time")
2782
- };
2783
- const flowId = readOptionalString(ctx, "flow_id");
2784
- if (flowId) args.flowId = flowId;
2785
- const flowUuid = readOptionalString(ctx, "flow_uuid");
2786
- if (flowUuid) args.flowUuid = flowUuid;
2787
- const requestId = readOptionalString(ctx, "request_id");
2788
- if (requestId) args.requestId = requestId;
2789
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
2790
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
2791
- const indicatorsUuid = readOptionalString(ctx, "indicators_uuid");
2792
- if (indicatorsUuid) args.indicatorsUuid = indicatorsUuid;
2793
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
2794
- if (showTimeZone) args.showTimeZone = showTimeZone;
2795
- return args;
2796
- }
2797
- var flowAbSplitNodeReport = {
2798
- service: "engage",
2799
- command: "+flow_ab_split_node_report",
2800
- description: "Query the report for one AB split node.",
2801
- flags: [
2802
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2803
- { name: "report_type", type: "string", required: true, desc: "Report type: overview or detail" },
2804
- { name: "node_uuid", type: "string", required: true, desc: "AB split node UUID" },
2805
- { name: "start_time", type: "string", required: true, desc: "Start date" },
2806
- { name: "end_time", type: "string", required: true, desc: "End date" },
2807
- { name: "flow_id", type: "string", required: false, desc: "Flow ID" },
2808
- { name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
2809
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2810
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
2811
- { name: "indicators_uuid", type: "string", required: false, desc: "Indicator UUID" },
2812
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
2813
- ],
2814
- risk: "read",
2815
- validate: (ctx) => {
2816
- requireAllowedValue(ctx.str("report_type"), ["overview", "detail"], "report_type");
2817
- requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
2818
- },
2819
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName12, toolName12, buildArgs12(ctx)),
2820
- execute: async (ctx) => executeMcpCommand(ctx, serviceName12, toolName12, buildArgs12(ctx))
2821
- };
2822
-
2823
- // src/commands/te-engage/flow/flow-detail.ts
2824
- var serviceName13 = "engage_flow";
2825
- var toolName13 = "query_flow_detail";
2826
- function buildArgs13(ctx) {
2827
- return {
2828
- projectId: ctx.num("project_id"),
2829
- flowUuid: ctx.str("flow_uuid")
2830
- };
2831
- }
2832
- var flowDetail = {
2833
- service: "engage",
2834
- command: "+flow_detail",
2835
- description: "Get flow detail information.",
2836
- flags: [
2837
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2838
- { name: "flow_uuid", type: "string", required: true, desc: "Flow UUID" }
2839
- ],
2840
- risk: "read",
2841
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName13, toolName13, buildArgs13(ctx)),
2842
- execute: async (ctx) => executeMcpCommand(ctx, serviceName13, toolName13, buildArgs13(ctx))
2843
- };
2844
-
2845
- // src/commands/te-engage/flow/flow-list.ts
2846
- var serviceName14 = "engage_flow";
2847
- var toolName14 = "query_flow_list";
2848
- function buildArgs14(ctx) {
2849
- return { projectId: ctx.num("project_id") };
2850
- }
2851
- var flowList = {
2852
- service: "engage",
2853
- command: "+flow_list",
2854
- description: "List flows under a project.",
2855
- flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
2856
- risk: "read",
2857
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName14, toolName14, buildArgs14(ctx)),
2858
- execute: async (ctx) => executeMcpCommand(ctx, serviceName14, toolName14, buildArgs14(ctx))
2859
- };
2860
-
2861
- // src/commands/te-engage/flow/flow-node-config-schema.ts
2862
- var serviceName15 = "engage_flow";
2863
- var toolName15 = "query_flow_node_config_schema";
2864
- function buildArgs15(ctx) {
2865
- return { nodeType: ctx.str("node_type") };
2866
- }
2867
- var flowNodeConfigSchema = {
2868
- service: "engage",
2869
- command: "+flow_node_config_schema",
2870
- description: "Query one type-specific node config schema before constructing save_flow nodes or nodeConfigs.",
2871
- flags: [{ name: "node_type", type: "string", required: true, desc: "Flow node type, for example single_trigger, event_trigger, event_split_flow, or message_push" }],
2872
- risk: "read",
2873
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName15, toolName15, buildArgs15(ctx)),
2874
- execute: async (ctx) => executeMcpCommand(ctx, serviceName15, toolName15, buildArgs15(ctx))
2875
- };
2876
-
2877
- // src/commands/te-engage/flow/flow-node-detail-report.ts
2878
- var serviceName16 = "engage_flow";
2879
- var toolName16 = "query_flow_node_detail_report";
2880
- function buildArgs16(ctx) {
2881
- const args = {
2882
- projectId: ctx.num("project_id"),
2883
- nodeUuid: ctx.str("node_uuid"),
2884
- startTime: ctx.str("start_time"),
2885
- endTime: ctx.str("end_time")
2886
- };
2887
- const flowId = readOptionalString(ctx, "flow_id");
2888
- if (flowId) args.flowId = flowId;
2889
- const flowUuid = readOptionalString(ctx, "flow_uuid");
2890
- if (flowUuid) args.flowUuid = flowUuid;
2891
- const requestId = readOptionalString(ctx, "request_id");
2892
- if (requestId) args.requestId = requestId;
2893
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
2894
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
2895
- const branchId = readOptionalString(ctx, "branch_id");
2896
- if (branchId) args.branchId = branchId;
2897
- const indicatorName = readOptionalString(ctx, "indicator_name");
2898
- if (indicatorName) args.indicatorName = indicatorName;
2899
- const dataDimType = readOptionalString(ctx, "data_dim_type");
2900
- if (dataDimType) args.dataDimType = dataDimType;
2901
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
2902
- if (showTimeZone) args.showTimeZone = showTimeZone;
2903
- return args;
2904
- }
2905
- var flowNodeDetailReport = {
2906
- service: "engage",
2907
- command: "+flow_node_detail_report",
2908
- description: "Query the detailed report for one flow node.",
2909
- flags: [
2910
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2911
- { name: "node_uuid", type: "string", required: true, desc: "Node UUID" },
2912
- { name: "start_time", type: "string", required: true, desc: "Start date" },
2913
- { name: "end_time", type: "string", required: true, desc: "End date" },
2914
- { name: "flow_id", type: "string", required: false, desc: "Flow ID" },
2915
- { name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
2916
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2917
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
2918
- { name: "branch_id", type: "string", required: false, desc: "Branch ID" },
2919
- { name: "indicator_name", type: "string", required: false, desc: "Indicator name" },
2920
- { name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
2921
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
2922
- ],
2923
- risk: "read",
2924
- validate: (ctx) => {
2925
- requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
2926
- },
2927
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName16, toolName16, buildArgs16(ctx)),
2928
- execute: async (ctx) => executeMcpCommand(ctx, serviceName16, toolName16, buildArgs16(ctx))
2929
- };
2930
-
2931
- // src/commands/te-engage/flow/flow-node-overview-report.ts
2932
- var serviceName17 = "engage_flow";
2933
- var toolName17 = "query_flow_node_overview_report";
2934
- function buildArgs17(ctx) {
2935
- const args = {
2936
- projectId: ctx.num("project_id"),
2937
- startTime: ctx.str("start_time"),
2938
- endTime: ctx.str("end_time")
2939
- };
2940
- const flowId = readOptionalString(ctx, "flow_id");
2941
- if (flowId) args.flowId = flowId;
2942
- const flowUuid = readOptionalString(ctx, "flow_uuid");
2943
- if (flowUuid) args.flowUuid = flowUuid;
2944
- const requestId = readOptionalString(ctx, "request_id");
2945
- if (requestId) args.requestId = requestId;
2946
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
2947
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
2948
- const dataDimType = readOptionalString(ctx, "data_dim_type");
2949
- if (dataDimType) args.dataDimType = dataDimType;
2950
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
2951
- if (showTimeZone) args.showTimeZone = showTimeZone;
2952
- return args;
2953
- }
2954
- var flowNodeOverviewReport = {
2955
- service: "engage",
2956
- command: "+flow_node_overview_report",
2957
- description: "Query the node-level overview report for all nodes in a flow.",
2958
- flags: [
2959
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
2960
- { name: "start_time", type: "string", required: true, desc: "Start date" },
2961
- { name: "end_time", type: "string", required: true, desc: "End date" },
2962
- { name: "flow_id", type: "string", required: false, desc: "Flow ID" },
2963
- { name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
2964
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
2965
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
2966
- { name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
2967
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
2968
- ],
2969
- risk: "read",
2970
- validate: (ctx) => {
2971
- requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
2972
- },
2973
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName17, toolName17, buildArgs17(ctx)),
2974
- execute: async (ctx) => executeMcpCommand(ctx, serviceName17, toolName17, buildArgs17(ctx))
2975
- };
2976
-
2977
- // src/commands/te-engage/flow/flow-process-report.ts
2978
- var serviceName18 = "engage_flow";
2979
- var toolName18 = "query_flow_process_report";
2980
- function buildArgs18(ctx) {
2981
- const args = {
2982
- projectId: ctx.num("project_id"),
2983
- reportType: ctx.str("report_type")
2984
- };
2985
- const flowId = readOptionalString(ctx, "flow_id");
2986
- if (flowId) args.flowId = flowId;
2987
- const flowUuid = readOptionalString(ctx, "flow_uuid");
2988
- if (flowUuid) args.flowUuid = flowUuid;
2989
- const requestId = readOptionalString(ctx, "request_id");
2990
- if (requestId) args.requestId = requestId;
2991
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
2992
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
2993
- const dataDimType = readOptionalString(ctx, "data_dim_type");
2994
- if (dataDimType) args.dataDimType = dataDimType;
2995
- const startTime = readOptionalString(ctx, "start_time");
2996
- if (startTime) args.startTime = startTime;
2997
- const endTime = readOptionalString(ctx, "end_time");
2998
- if (endTime) args.endTime = endTime;
2999
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
3000
- if (showTimeZone) args.showTimeZone = showTimeZone;
3001
- return args;
3002
- }
3003
- var flowProcessReport = {
3004
- service: "engage",
3005
- command: "+flow_process_report",
3006
- description: "Query the process-level report for a flow.",
3007
- flags: [
3008
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3009
- { name: "report_type", type: "string", required: true, desc: "Report type" },
3010
- { name: "flow_id", type: "string", required: false, desc: "Flow ID" },
3011
- { name: "flow_uuid", type: "string", required: false, desc: "Flow UUID" },
3012
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
3013
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
3014
- { name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
3015
- { name: "start_time", type: "string", required: false, desc: "Start date" },
3016
- { name: "end_time", type: "string", required: false, desc: "End date" },
3017
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
3018
- ],
3019
- risk: "read",
3020
- validate: (ctx) => {
3021
- const reportType = ctx.str("report_type");
3022
- requireAllowedValue(reportType, ["overview", "detail", "exit_detail", "push_detail"], "report_type");
3023
- requireOneOfFlags(ctx, ["flow_id", "flow_uuid"]);
3024
- if (["detail", "exit_detail", "push_detail"].includes(reportType) && (!hasFlag(ctx, "start_time") || !hasFlag(ctx, "end_time"))) {
3025
- throw new Error("Flags --start_time and --end_time are required for detail, exit_detail, and push_detail reports");
3026
- }
3027
- },
3028
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName18, toolName18, buildArgs18(ctx)),
3029
- execute: async (ctx) => executeMcpCommand(ctx, serviceName18, toolName18, buildArgs18(ctx))
3030
- };
3031
-
3032
- // src/commands/te-engage/flow/manage-flow.ts
3033
- var serviceName19 = "engage_flow";
3034
- var toolName19 = "batch_manage_flow";
3035
- function buildArgs19(ctx) {
3036
- const args = {
3037
- projectId: ctx.num("project_id"),
3038
- action: ctx.str("action")
3039
- };
3040
- const flowList2 = readOptionalJsonArray(ctx, "flow_list");
3041
- if (flowList2 !== void 0) args.flowList = flowList2;
3042
- const pauseFlowList = readOptionalJsonArray(ctx, "pause_flow_list");
3043
- if (pauseFlowList !== void 0) args.pauseFlowList = pauseFlowList;
3044
- const flowIdList = readOptionalJsonArray(ctx, "flow_id_list");
3045
- if (flowIdList !== void 0) args.flowIdList = flowIdList;
3046
- const reason = readOptionalString(ctx, "reason");
3047
- if (reason) args.reason = reason;
3048
- return args;
3049
- }
3050
- var manageFlow = {
3051
- service: "engage",
3052
- command: "+manage_flow",
3053
- description: "Batch manage flows with one unified command.",
3054
- flags: [
3055
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3056
- { name: "action", type: "string", required: true, desc: "Action type" },
3057
- { name: "flow_list", type: "json", required: false, desc: "Flow approval list as JSON array" },
3058
- { name: "pause_flow_list", type: "json", required: false, desc: "Pause flow list as JSON array" },
3059
- { name: "flow_id_list", type: "json", required: false, desc: "Flow ID list as JSON array" },
3060
- { name: "reason", type: "string", required: false, desc: "Reason for review actions" }
3061
- ],
3062
- risk: "write",
3063
- validate: (ctx) => {
3064
- const action = ctx.str("action");
3065
- if (["approve", "deny", "cancel"].includes(action)) {
3066
- readRequiredJsonArray(ctx, "flow_list");
3067
- }
3068
- if (action === "pause") {
3069
- readRequiredJsonArray(ctx, "pause_flow_list");
3070
- }
3071
- if (["recover", "end"].includes(action)) {
3072
- readRequiredJsonArray(ctx, "flow_id_list");
3073
- }
3074
- },
3075
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName19, toolName19, buildArgs19(ctx)),
3076
- execute: async (ctx) => executeMcpCommand(ctx, serviceName19, toolName19, buildArgs19(ctx))
3077
- };
3078
-
3079
- // src/commands/te-engage/flow/modify-flow-base-info.ts
3080
- var serviceName20 = "engage_flow";
3081
- var toolName20 = "modify_flow_base_info";
3082
- function buildArgs20(ctx) {
3083
- const args = {
3084
- projectId: ctx.num("project_id"),
3085
- flowUuid: ctx.str("flow_uuid")
3086
- };
3087
- const flowName = readOptionalString(ctx, "flow_name");
3088
- if (flowName) args.flowName = flowName;
3089
- const flowDesc = readOptionalString(ctx, "flow_desc");
3090
- if (flowDesc) args.flowDesc = flowDesc;
3091
- const groupId = readOptionalNumber(ctx, "group_id");
3092
- if (groupId !== void 0) args.groupId = groupId;
3093
- return args;
3094
- }
3095
- var modifyFlowBaseInfo = {
3096
- service: "engage",
3097
- command: "+modify_flow_base_info",
3098
- description: "Modify the basic information of a flow canvas.",
3099
- flags: [
3100
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3101
- { name: "flow_uuid", type: "string", required: true, desc: "Flow UUID" },
3102
- { name: "flow_name", type: "string", required: false, desc: "New flow name" },
3103
- { name: "flow_desc", type: "string", required: false, desc: "New flow description" },
3104
- { name: "group_id", type: "number", required: false, desc: "New group ID" }
3105
- ],
3106
- risk: "write",
3107
- validate: (ctx) => {
3108
- requireAnyFlag(ctx, ["flow_name", "flow_desc", "group_id"]);
3109
- },
3110
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName20, toolName20, buildArgs20(ctx)),
3111
- execute: async (ctx) => executeMcpCommand(ctx, serviceName20, toolName20, buildArgs20(ctx))
3112
- };
3113
-
3114
- // src/commands/te-engage/flow/save-flow.ts
3115
- var serviceName21 = "engage_flow";
3116
- var toolName21 = "save_flow";
3117
- var allowedOperations = ["build", "preview", "commit"];
3118
- function readAndValidateReq(ctx) {
3119
- const req = readRequiredJsonObject(ctx, "req");
3120
- const operation = typeof req.operation === "string" ? req.operation.trim().toLowerCase() : "";
3121
- if (!allowedOperations.includes(operation)) {
3122
- throw new Error(`Flag --req.operation must be one of: ${allowedOperations.join(", ")}`);
3123
- }
3124
- if ("nodeList" in req || "edgeList" in req) {
3125
- throw new Error("Flag --req must use nodes/edges instead of legacy nodeList/edgeList");
3126
- }
3127
- if ("sourceFlowUuid" in req) {
3128
- throw new Error("Flag --req.sourceFlowUuid is no longer supported; call +flow_detail and build nodes/edges instead");
3129
- }
3130
- return req;
3131
- }
3132
- function buildArgs21(ctx) {
3133
- return {
3134
- projectId: ctx.num("project_id"),
3135
- req: {
3136
- projectId: ctx.num("project_id"),
3137
- ...readAndValidateReq(ctx)
3138
- }
3139
- };
3140
- }
3141
- var saveFlow = {
3142
- service: "engage",
3143
- command: "+save_flow",
3144
- 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.",
3145
- flags: [
3146
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3147
- { 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." }
3148
- ],
3149
- risk: "write",
3150
- validate: (ctx) => {
3151
- readAndValidateReq(ctx);
3152
- },
3153
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName21, toolName21, buildArgs21(ctx)),
3154
- execute: async (ctx) => executeMcpCommand(ctx, serviceName21, toolName21, buildArgs21(ctx))
3155
- };
3156
-
3157
- // src/commands/te-engage/flow/validate-flow-node-config.ts
3158
- var serviceName22 = "engage_flow";
3159
- var toolName22 = "validate_flow_node_config";
3160
- function buildArgs22(ctx) {
3161
- return {
3162
- nodeType: ctx.str("node_type"),
3163
- config: ctx.str("config"),
3164
- operationMode: ctx.str("operation_mode")
3165
- };
3166
- }
3167
- var validateFlowNodeConfig = {
3168
- service: "engage",
3169
- command: "+validate_flow_node_config",
3170
- 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.",
3171
3139
  flags: [
3172
- { name: "node_type", type: "string", required: true, desc: "Flow node type, for example single_trigger, event_trigger, event_split_flow, or message_push" },
3173
- { name: "config", type: "string", required: true, desc: "Node config JSON object encoded as a string" },
3174
- { 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." }
3175
3142
  ],
3176
3143
  risk: "read",
3177
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName22, toolName22, buildArgs22(ctx)),
3178
- execute: async (ctx) => executeMcpCommand(ctx, serviceName22, toolName22, buildArgs22(ctx))
3179
- };
3180
-
3181
- // src/commands/te-engage/flow/index.ts
3182
- var commands8 = [
3183
- flowNodeOverviewReport,
3184
- flowProcessReport,
3185
- flowNodeDetailReport,
3186
- flowAbSplitNodeReport,
3187
- flowDetail,
3188
- modifyFlowBaseInfo,
3189
- manageFlow,
3190
- flowNodeConfigSchema,
3191
- validateFlowNodeConfig,
3192
- deleteFlow,
3193
- flowList,
3194
- saveFlow
3195
- ];
3196
- var flow_default = commands8;
3197
-
3198
- // src/commands/te-engage/setting/add-approver.ts
3199
- var serviceName23 = "engage_setting";
3200
- var toolName23 = "batch_add_approver";
3201
- function buildArgs23(ctx) {
3202
- return {
3203
- projectId: ctx.num("project_id"),
3204
- approvers: readRequiredJsonArray(ctx, "approvers")
3205
- };
3206
- }
3207
- var addApprover = {
3208
- service: "engage",
3209
- command: "+add_approver",
3210
- description: "Batch add approvers to a project.",
3211
- flags: [
3212
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3213
- { name: "approvers", type: "json", required: true, desc: "Approver open ID list as JSON array" }
3214
- ],
3215
- risk: "write",
3216
- validate: (ctx) => {
3217
- readRequiredJsonArray(ctx, "approvers");
3218
- },
3219
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName23, toolName23, buildArgs23(ctx)),
3220
- execute: async (ctx) => executeMcpCommand(ctx, serviceName23, toolName23, buildArgs23(ctx))
3221
- };
3222
-
3223
- // src/commands/te-engage/setting/add-channel.ts
3224
- var serviceName24 = "engage_setting";
3225
- var toolName24 = "add_channel";
3226
- function buildArgs24(ctx) {
3227
- return {
3228
- projectId: ctx.num("project_id"),
3229
- req: {
3230
- projectId: ctx.num("project_id"),
3231
- ...readRequiredJsonObject(ctx, "req")
3232
- }
3233
- };
3234
- }
3235
- var addChannel = {
3236
- service: "engage",
3237
- command: "+add_channel",
3238
- description: "Create a new engage channel.",
3239
- flags: [
3240
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3241
- { name: "req", type: "json", required: true, desc: "Channel creation request as JSON object" }
3242
- ],
3243
- risk: "write",
3244
3144
  validate: (ctx) => {
3245
3145
  readRequiredJsonObject(ctx, "req");
3246
3146
  },
3247
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName24, toolName24, buildArgs24(ctx)),
3248
- execute: async (ctx) => executeMcpCommand(ctx, serviceName24, toolName24, buildArgs24(ctx))
3249
- };
3250
-
3251
- // src/commands/te-engage/setting/approver-list.ts
3252
- var serviceName25 = "engage_setting";
3253
- var toolName25 = "query_approver_list";
3254
- function buildArgs25(ctx) {
3255
- return { projectId: ctx.num("project_id") };
3256
- }
3257
- var approverList = {
3258
- service: "engage",
3259
- command: "+approver_list",
3260
- description: "List approvers for a project.",
3261
- flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
3262
- risk: "read",
3263
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName25, toolName25, buildArgs25(ctx)),
3264
- execute: async (ctx) => executeMcpCommand(ctx, serviceName25, toolName25, buildArgs25(ctx))
3265
- };
3266
-
3267
- // src/commands/te-engage/setting/cancel-query-by-request-id.ts
3268
- var serviceName26 = "engage_setting";
3269
- var toolName26 = "cancel_query_by_request_id";
3270
- function buildArgs26(ctx) {
3271
- return { requestId: ctx.str("request_id") };
3272
- }
3273
- var cancelQueryByRequestId = {
3274
- service: "engage",
3275
- command: "+cancel_query_by_request_id",
3276
- description: "Cancel a running report query by request ID.",
3277
- flags: [{ name: "request_id", type: "string", required: true, desc: "Request ID to cancel" }],
3278
- risk: "write",
3279
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName26, toolName26, buildArgs26(ctx)),
3280
- execute: async (ctx) => executeMcpCommand(ctx, serviceName26, toolName26, buildArgs26(ctx))
3281
- };
3282
-
3283
- // src/commands/te-engage/setting/channel-detail.ts
3284
- var serviceName27 = "engage_setting";
3285
- var toolName27 = "query_channel_detail";
3286
- function buildArgs27(ctx) {
3287
- return {
3288
- projectId: ctx.num("project_id"),
3289
- channelId: ctx.str("channel_id")
3290
- };
3291
- }
3292
- var channelDetail = {
3293
- service: "engage",
3294
- command: "+channel_detail",
3295
- description: "Get engage channel detail via MCP query_channel_detail.",
3296
- flags: [
3297
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3298
- { name: "channel_id", type: "string", required: true, desc: "Channel ID" }
3299
- ],
3300
- risk: "read",
3301
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName27, toolName27, buildArgs27(ctx)),
3302
- execute: async (ctx) => executeMcpCommand(ctx, serviceName27, toolName27, buildArgs27(ctx))
3303
- };
3304
-
3305
- // src/commands/te-engage/setting/channel-list.ts
3306
- var serviceName28 = "engage_setting";
3307
- var toolName28 = "query_channel_list";
3308
- function buildArgs28(ctx) {
3309
- const args = { projectId: ctx.num("project_id") };
3310
- const providerList = readOptionalJsonArray(ctx, "provider_list");
3311
- if (providerList !== void 0) args.providerList = providerList;
3312
- const channelStatus = readOptionalNumber(ctx, "channel_status");
3313
- if (channelStatus !== void 0) args.channelStatus = channelStatus;
3314
- return args;
3315
- }
3316
- var channelList = {
3317
- service: "engage",
3318
- command: "+channel_list",
3319
- description: "List engage channels via MCP query_channel_list.",
3320
- flags: [
3321
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3322
- { name: "provider_list", type: "json", required: false, desc: "Provider list as JSON array" },
3323
- { name: "channel_status", type: "number", required: false, desc: "Channel status filter" }
3324
- ],
3325
- risk: "read",
3326
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName28, toolName28, buildArgs28(ctx)),
3327
- execute: async (ctx) => executeMcpCommand(ctx, serviceName28, toolName28, buildArgs28(ctx))
3328
- };
3329
-
3330
- // src/commands/te-engage/setting/config-channel-detail.ts
3331
- var serviceName29 = "engage_setting";
3332
- var toolName29 = "query_config_channel_detail";
3333
- function buildArgs29(ctx) {
3334
- return {
3335
- projectId: ctx.num("project_id"),
3336
- channelId: ctx.str("channel_id")
3337
- };
3338
- }
3339
- var configChannelDetail = {
3340
- service: "engage",
3341
- command: "+config_channel_detail",
3342
- description: "Get config channel detail.",
3343
- flags: [
3344
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3345
- { name: "channel_id", type: "string", required: true, desc: "Config channel ID" }
3346
- ],
3347
- risk: "read",
3348
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName29, toolName29, buildArgs29(ctx)),
3349
- execute: async (ctx) => executeMcpCommand(ctx, serviceName29, toolName29, buildArgs29(ctx))
3350
- };
3351
-
3352
- // src/commands/te-engage/setting/config-channel-list.ts
3353
- var serviceName30 = "engage_setting";
3354
- var toolName30 = "query_config_channel_list";
3355
- function buildArgs30(ctx) {
3356
- const args = { projectId: ctx.num("project_id") };
3357
- const channelType = readOptionalNumber(ctx, "channel_type");
3358
- if (channelType !== void 0) args.channelType = channelType;
3359
- return args;
3360
- }
3361
- var configChannelList = {
3362
- service: "engage",
3363
- command: "+config_channel_list",
3364
- description: "List config channels.",
3365
- flags: [
3366
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3367
- { name: "channel_type", type: "number", required: false, desc: "Config channel type" }
3368
- ],
3369
- risk: "read",
3370
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName30, toolName30, buildArgs30(ctx)),
3371
- execute: async (ctx) => executeMcpCommand(ctx, serviceName30, toolName30, buildArgs30(ctx))
3372
- };
3373
-
3374
- // src/commands/te-engage/setting/delete-channel.ts
3375
- var serviceName31 = "engage_setting";
3376
- var toolName31 = "delete_channel";
3377
- function buildArgs31(ctx) {
3378
- return {
3379
- projectId: ctx.num("project_id"),
3380
- channelId: ctx.str("channel_id")
3381
- };
3382
- }
3383
- var deleteChannel = {
3384
- service: "engage",
3385
- command: "+delete_channel",
3386
- description: "Delete an engage channel.",
3387
- flags: [
3388
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3389
- { name: "channel_id", type: "string", required: true, desc: "Channel ID" }
3390
- ],
3391
- risk: "high-risk-write",
3392
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName31, toolName31, buildArgs31(ctx)),
3393
- execute: async (ctx) => executeMcpCommand(ctx, serviceName31, toolName31, buildArgs31(ctx))
3394
- };
3395
-
3396
- // src/commands/te-engage/setting/delete-config-channel.ts
3397
- var serviceName32 = "engage_setting";
3398
- var toolName32 = "delete_config_channel";
3399
- function buildArgs32(ctx) {
3400
- return {
3401
- projectId: ctx.num("project_id"),
3402
- channelId: ctx.str("channel_id")
3403
- };
3404
- }
3405
- var deleteConfigChannel = {
3406
- service: "engage",
3407
- command: "+delete_config_channel",
3408
- description: "Delete a config channel.",
3409
- flags: [
3410
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3411
- { name: "channel_id", type: "string", required: true, desc: "Config channel ID" }
3412
- ],
3413
- risk: "high-risk-write",
3414
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName32, toolName32, buildArgs32(ctx)),
3415
- execute: async (ctx) => executeMcpCommand(ctx, serviceName32, toolName32, buildArgs32(ctx))
3416
- };
3417
-
3418
- // src/commands/te-engage/setting/update-channel-status.ts
3419
- var serviceName33 = "engage_setting";
3420
- var toolName33 = "update_channel_status";
3421
- function buildArgs33(ctx) {
3422
- return {
3423
- projectId: ctx.num("project_id"),
3424
- channelId: ctx.str("channel_id"),
3425
- status: ctx.num("status")
3426
- };
3427
- }
3428
- var updateChannelStatus = {
3429
- service: "engage",
3430
- command: "+update_channel_status",
3431
- description: "Update engage channel status.",
3432
- flags: [
3433
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3434
- { name: "channel_id", type: "string", required: true, desc: "Channel ID" },
3435
- { name: "status", type: "number", required: true, desc: "Channel status" }
3436
- ],
3437
- risk: "write",
3438
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName33, toolName33, buildArgs33(ctx)),
3439
- execute: async (ctx) => executeMcpCommand(ctx, serviceName33, toolName33, buildArgs33(ctx))
3440
- };
3147
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequiredJsonObject(ctx, "req") })
3148
+ });
3441
3149
 
3442
- // src/commands/te-engage/setting/update-config-channel-status.ts
3443
- var serviceName34 = "engage_setting";
3444
- var toolName34 = "update_config_channel_status";
3445
- function buildArgs34(ctx) {
3446
- return {
3447
- projectId: ctx.num("project_id"),
3448
- channelId: ctx.str("channel_id"),
3449
- channelStatus: ctx.num("channel_status")
3450
- };
3451
- }
3452
- var updateConfigChannelStatus = {
3453
- service: "engage",
3454
- command: "+update_config_channel_status",
3455
- 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.",
3456
3156
  flags: [
3457
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3458
- { name: "channel_id", type: "string", required: true, desc: "Config channel ID" },
3459
- { 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." }
3460
3159
  ],
3461
- risk: "write",
3462
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName34, toolName34, buildArgs34(ctx)),
3463
- execute: async (ctx) => executeMcpCommand(ctx, serviceName34, toolName34, buildArgs34(ctx))
3464
- };
3465
-
3466
- // src/commands/te-engage/setting/whitelist-list.ts
3467
- var serviceName35 = "engage_setting";
3468
- var toolName35 = "query_whitelist_list";
3469
- function buildArgs35(ctx) {
3470
- return { projectId: ctx.num("project_id") };
3471
- }
3472
- var whitelistList = {
3473
- service: "engage",
3474
- command: "+whitelist_list",
3475
- description: "List whitelist entries for a project.",
3476
- flags: [{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }],
3477
3160
  risk: "read",
3478
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName35, toolName35, buildArgs35(ctx)),
3479
- execute: async (ctx) => executeMcpCommand(ctx, serviceName35, toolName35, buildArgs35(ctx))
3480
- };
3161
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), task_id: ctx.str("task-id") })
3162
+ });
3481
3163
 
3482
- // src/commands/te-engage/setting/index.ts
3483
- var commands9 = [
3484
- channelList,
3485
- channelDetail,
3486
- updateChannelStatus,
3487
- deleteChannel,
3488
- addChannel,
3489
- whitelistList,
3490
- addApprover,
3491
- approverList,
3492
- cancelQueryByRequestId,
3493
- configChannelDetail,
3494
- configChannelList,
3495
- deleteConfigChannel,
3496
- updateConfigChannelStatus
3497
- ];
3498
- var setting_default = commands9;
3499
-
3500
- // src/commands/te-engage/task/build-task-save-guide.ts
3501
- var serviceName36 = "engage_task";
3502
- var toolName36 = "build_task_save_guide";
3503
- function buildArgs36(ctx) {
3504
- return {
3505
- projectId: ctx.num("project_id"),
3506
- req: readRequiredJsonObject(ctx, "req")
3507
- };
3508
- }
3509
- var buildTaskSaveGuide = {
3510
- service: "engage",
3511
- command: "+build_task_save_guide",
3512
- 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.",
3513
3170
  flags: [
3514
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3515
- { 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." }
3516
3173
  ],
3517
3174
  risk: "read",
3518
3175
  validate: (ctx) => {
3519
3176
  readRequiredJsonObject(ctx, "req");
3520
3177
  },
3521
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName36, toolName36, buildArgs36(ctx)),
3522
- execute: async (ctx) => executeMcpCommand(ctx, serviceName36, toolName36, buildArgs36(ctx))
3523
- };
3178
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequiredJsonObject(ctx, "req") })
3179
+ });
3524
3180
 
3525
- // src/commands/te-engage/task/manage-task.ts
3526
- var serviceName37 = "engage_task";
3527
- var toolName37 = "manage_task";
3528
- function buildArgs37(ctx) {
3529
- const args = {
3530
- projectId: ctx.num("project_id"),
3531
- taskId: ctx.str("task_id"),
3532
- action: ctx.str("action")
3533
- };
3534
- const reason = readOptionalString(ctx, "reason");
3535
- if (reason) args.reason = reason;
3536
- return args;
3537
- }
3538
- var manageTask = {
3539
- service: "engage",
3540
- 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",
3541
3186
  description: "Manage a task lifecycle action.",
3542
3187
  flags: [
3543
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3544
- { name: "task_id", type: "string", required: true, desc: "Task ID" },
3545
- { name: "action", type: "string", required: true, desc: "Action to perform" },
3546
- { 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." }
3547
3192
  ],
3548
3193
  risk: "write",
3549
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName37, toolName37, buildArgs37(ctx)),
3550
- execute: async (ctx) => executeMcpCommand(ctx, serviceName37, toolName37, buildArgs37(ctx))
3551
- };
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
+ });
3552
3201
 
3553
- // src/commands/te-engage/task/save-task.ts
3554
- var serviceName38 = "engage_task";
3555
- var toolName38 = "save_task";
3556
- function buildArgs38(ctx) {
3557
- return {
3558
- projectId: ctx.num("project_id"),
3559
- req: {
3560
- projectId: ctx.num("project_id"),
3561
- ...readRequiredJsonObject(ctx, "req")
3562
- }
3563
- };
3564
- }
3565
- var saveTask = {
3566
- service: "engage",
3567
- 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",
3568
3207
  description: "Create or update a task draft.",
3569
3208
  flags: [
3570
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3571
- { 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." }
3572
3211
  ],
3573
3212
  risk: "write",
3574
3213
  validate: (ctx) => {
3575
3214
  readRequiredJsonObject(ctx, "req");
3576
3215
  },
3577
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName38, toolName38, buildArgs38(ctx)),
3578
- execute: async (ctx) => executeMcpCommand(ctx, serviceName38, toolName38, buildArgs38(ctx))
3579
- };
3580
-
3581
- // src/commands/te-engage/task/task-data-detail.ts
3582
- var serviceName39 = "engage_task";
3583
- var toolName39 = "query_task_data_detail";
3584
- function buildArgs39(ctx) {
3585
- const args = {
3586
- projectId: ctx.num("project_id"),
3587
- taskId: ctx.str("task_id"),
3588
- detailType: ctx.str("detail_type"),
3589
- startTime: ctx.str("start_time"),
3590
- endTime: ctx.str("end_time")
3591
- };
3592
- const requestId = readOptionalString(ctx, "request_id");
3593
- if (requestId) args.requestId = requestId;
3594
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
3595
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
3596
- const taskInstanceId = readOptionalString(ctx, "task_instance_id");
3597
- if (taskInstanceId) args.taskInstanceId = taskInstanceId;
3598
- const dataDimType = readOptionalString(ctx, "data_dim_type");
3599
- if (dataDimType) args.dataDimType = dataDimType;
3600
- const retentionType = readOptionalString(ctx, "retention_type");
3601
- if (retentionType) args.retentionType = retentionType;
3602
- const dataViewType = readOptionalNumber(ctx, "data_view_type");
3603
- if (dataViewType !== void 0) args.dataViewType = dataViewType;
3604
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
3605
- if (showTimeZone) args.showTimeZone = showTimeZone;
3606
- return args;
3607
- }
3608
- var taskDataDetail = {
3609
- service: "engage",
3610
- command: "+task_data_detail",
3611
- description: "Query the detailed data report for one task.",
3612
- flags: [
3613
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3614
- { name: "task_id", type: "string", required: true, desc: "Task ID" },
3615
- {
3616
- name: "detail_type",
3617
- type: "string",
3618
- required: true,
3619
- desc: "Detail type: time | instance | instance_daily",
3620
- 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"
3621
- },
3622
- {
3623
- name: "start_time",
3624
- type: "string",
3625
- required: true,
3626
- desc: "Start date (yyyy-MM-dd)",
3627
- hint: "Pass --start_time as yyyy-MM-dd, e.g. 2026-04-01."
3628
- },
3629
- {
3630
- name: "end_time",
3631
- type: "string",
3632
- required: true,
3633
- desc: "End date (yyyy-MM-dd)",
3634
- hint: "Pass --end_time as yyyy-MM-dd, e.g. 2026-04-07."
3635
- },
3636
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
3637
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
3638
- { name: "task_instance_id", type: "string", required: false, desc: "Task instance ID (required when detail_type=instance_daily)" },
3639
- { name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
3640
- { name: "retention_type", type: "string", required: false, desc: "Retention type" },
3641
- { name: "data_view_type", type: "number", required: false, desc: "Trigger detail view type" },
3642
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
3643
- ],
3644
- risk: "read",
3645
- validate: (ctx) => {
3646
- const detailType = ctx.str("detail_type");
3647
- requireAllowedValue(detailType, ["time", "instance", "instance_daily"], "detail_type");
3648
- if (detailType === "instance_daily" && !hasFlag(ctx, "task_instance_id")) {
3649
- throw new Error("Flag --task_instance_id is required when --detail_type is instance_daily");
3650
- }
3651
- },
3652
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName39, toolName39, buildArgs39(ctx)),
3653
- execute: async (ctx) => executeMcpCommand(ctx, serviceName39, toolName39, buildArgs39(ctx))
3654
- };
3655
-
3656
- // src/commands/te-engage/task/task-data-overview.ts
3657
- var serviceName40 = "engage_task";
3658
- var toolName40 = "query_task_data_overview";
3659
- function buildArgs40(ctx) {
3660
- const args = {
3661
- projectId: ctx.num("project_id"),
3662
- taskId: ctx.str("task_id")
3663
- };
3664
- const requestId = readOptionalString(ctx, "request_id");
3665
- if (requestId) args.requestId = requestId;
3666
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
3667
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
3668
- const dataDimType = readOptionalString(ctx, "data_dim_type");
3669
- if (dataDimType) args.dataDimType = dataDimType;
3670
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
3671
- if (showTimeZone) args.showTimeZone = showTimeZone;
3672
- return args;
3673
- }
3674
- var taskDataOverview = {
3675
- service: "engage",
3676
- command: "+task_data_overview",
3677
- description: "Query the high-level data overview for one task.",
3678
- flags: [
3679
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3680
- { name: "task_id", type: "string", required: true, desc: "Task ID" },
3681
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
3682
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
3683
- { name: "data_dim_type", type: "string", required: false, desc: "Data dimension type" },
3684
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
3685
- ],
3686
- risk: "read",
3687
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName40, toolName40, buildArgs40(ctx)),
3688
- execute: async (ctx) => executeMcpCommand(ctx, serviceName40, toolName40, buildArgs40(ctx))
3689
- };
3690
-
3691
- // src/commands/te-engage/task/task-detail.ts
3692
- var serviceName41 = "engage_task";
3693
- var toolName41 = "query_task_detail";
3694
- function buildArgs41(ctx) {
3695
- return {
3696
- projectId: ctx.num("project_id"),
3697
- taskId: ctx.str("task_id")
3698
- };
3699
- }
3700
- var taskDetail = {
3701
- service: "engage",
3702
- command: "+task_detail",
3703
- description: "Get detailed information for one task.",
3704
- flags: [
3705
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3706
- { name: "task_id", type: "string", required: true, desc: "Task ID" }
3707
- ],
3708
- risk: "read",
3709
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName41, toolName41, buildArgs41(ctx)),
3710
- execute: async (ctx) => executeMcpCommand(ctx, serviceName41, toolName41, buildArgs41(ctx))
3711
- };
3712
-
3713
- // src/commands/te-engage/task/task-experiment-report.ts
3714
- var serviceName42 = "engage_task";
3715
- var toolName42 = "query_task_experiment_report";
3716
- function buildArgs42(ctx) {
3717
- const args = {
3718
- projectId: ctx.num("project_id"),
3719
- taskId: ctx.str("task_id"),
3720
- reportType: ctx.str("report_type"),
3721
- startTime: ctx.str("start_time"),
3722
- endTime: ctx.str("end_time")
3723
- };
3724
- const requestId = readOptionalString(ctx, "request_id");
3725
- if (requestId) args.requestId = requestId;
3726
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
3727
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
3728
- return args;
3729
- }
3730
- var taskExperimentReport = {
3731
- service: "engage",
3732
- command: "+task_experiment_report",
3733
- description: "Query the experiment report for one task.",
3734
- flags: [
3735
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3736
- { name: "task_id", type: "string", required: true, desc: "Task ID" },
3737
- { name: "report_type", type: "string", required: true, desc: "Report type: overview or detail" },
3738
- { name: "start_time", type: "string", required: true, desc: "Start date" },
3739
- { name: "end_time", type: "string", required: true, desc: "End date" },
3740
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
3741
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" }
3742
- ],
3743
- risk: "read",
3744
- validate: (ctx) => {
3745
- requireAllowedValue(ctx.str("report_type"), ["overview", "detail"], "report_type");
3746
- },
3747
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName42, toolName42, buildArgs42(ctx)),
3748
- execute: async (ctx) => executeMcpCommand(ctx, serviceName42, toolName42, buildArgs42(ctx))
3749
- };
3750
-
3751
- // src/commands/te-engage/task/task-list.ts
3752
- var serviceName43 = "engage_task";
3753
- var toolName43 = "query_task_list";
3754
- function buildArgs43(ctx) {
3755
- return {
3756
- projectId: ctx.num("project_id"),
3757
- req: {
3758
- projectId: ctx.num("project_id"),
3759
- ...readRequiredJsonObject(ctx, "req")
3760
- }
3761
- };
3762
- }
3763
- var taskList = {
3764
- service: "engage",
3765
- command: "+task_list",
3766
- description: "Query the paginated task list.",
3767
- flags: [
3768
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3769
- { name: "req", type: "json", required: true, desc: "Task list request as JSON object" }
3770
- ],
3771
- risk: "read",
3772
- validate: (ctx) => {
3773
- readRequiredJsonObject(ctx, "req");
3774
- },
3775
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName43, toolName43, buildArgs43(ctx)),
3776
- execute: async (ctx) => executeMcpCommand(ctx, serviceName43, toolName43, buildArgs43(ctx))
3777
- };
3778
-
3779
- // src/commands/te-engage/task/task-metric-detail.ts
3780
- var serviceName44 = "engage_task";
3781
- var toolName44 = "query_task_metric_detail";
3782
- function buildArgs44(ctx) {
3783
- const args = {
3784
- projectId: ctx.num("project_id"),
3785
- taskId: ctx.str("task_id"),
3786
- startTime: ctx.str("start_time"),
3787
- endTime: ctx.str("end_time")
3788
- };
3789
- const requestId = readOptionalString(ctx, "request_id");
3790
- if (requestId) args.requestId = requestId;
3791
- const pushLanguageCode = readOptionalString(ctx, "push_language_code");
3792
- if (pushLanguageCode) args.pushLanguageCode = pushLanguageCode;
3793
- const metricIdList = readOptionalJsonArray(ctx, "metric_id_list");
3794
- if (metricIdList !== void 0) args.metricIdList = metricIdList;
3795
- const groupType = readOptionalNumber(ctx, "group_type");
3796
- if (groupType !== void 0) args.groupType = groupType;
3797
- const showTimeZone = readOptionalString(ctx, "show_time_zone");
3798
- if (showTimeZone) args.showTimeZone = showTimeZone;
3799
- return args;
3800
- }
3801
- var taskMetricDetail = {
3802
- service: "engage",
3803
- command: "+task_metric_detail",
3804
- description: "Query the metric-oriented detail report for one task.",
3805
- flags: [
3806
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3807
- { name: "task_id", type: "string", required: true, desc: "Task ID" },
3808
- { name: "start_time", type: "string", required: true, desc: "Start date" },
3809
- { name: "end_time", type: "string", required: true, desc: "End date" },
3810
- { name: "request_id", type: "string", required: false, desc: "Request ID" },
3811
- { name: "push_language_code", type: "string", required: false, desc: "Push language code" },
3812
- { name: "metric_id_list", type: "json", required: false, desc: "Metric ID list as JSON array" },
3813
- { name: "group_type", type: "number", required: false, desc: "Grouping type" },
3814
- { name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
3815
- ],
3816
- risk: "read",
3817
- validate: (ctx) => {
3818
- readOptionalJsonArray(ctx, "metric_id_list");
3819
- },
3820
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName44, toolName44, buildArgs44(ctx)),
3821
- execute: async (ctx) => executeMcpCommand(ctx, serviceName44, toolName44, buildArgs44(ctx))
3822
- };
3216
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequiredJsonObject(ctx, "req") })
3217
+ });
3823
3218
 
3824
- // src/commands/te-engage/task/task-stats.ts
3825
- var serviceName45 = "engage_task";
3826
- var toolName45 = "get_task_stats";
3827
- function buildArgs45(ctx) {
3828
- return {
3829
- projectId: ctx.num("project_id"),
3830
- req: {
3831
- projectId: ctx.num("project_id"),
3832
- ...readRequiredJsonObject(ctx, "req")
3833
- }
3834
- };
3835
- }
3836
- var taskStats = {
3837
- service: "engage",
3838
- command: "+task_stats",
3839
- 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.",
3840
3225
  flags: [
3841
- { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
3842
- { 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." }
3843
3228
  ],
3844
3229
  risk: "read",
3845
3230
  validate: (ctx) => {
3846
3231
  readRequiredJsonObject(ctx, "req");
3847
3232
  },
3848
- dryRun: (ctx) => buildMcpDryRun(ctx, serviceName45, toolName45, buildArgs45(ctx)),
3849
- execute: async (ctx) => executeMcpCommand(ctx, serviceName45, toolName45, buildArgs45(ctx))
3850
- };
3233
+ buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequiredJsonObject(ctx, "req") })
3234
+ });
3851
3235
 
3852
- // src/commands/te-engage/task/index.ts
3853
- var commands10 = [
3854
- taskDataOverview,
3855
- taskDataDetail,
3856
- taskMetricDetail,
3857
- taskExperimentReport,
3858
- taskDetail,
3236
+ // src/commands/te-engage/engage-task/index.ts
3237
+ var commands6 = [
3859
3238
  taskList,
3239
+ taskGet2,
3860
3240
  taskStats,
3861
- buildTaskSaveGuide,
3862
- saveTask,
3863
- 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,
3864
3261
  ];
3865
- var task_default = commands10;
3262
+ var engage_task_default = commands6;
3866
3263
 
3867
3264
  // src/commands/te-engage/index.ts
3868
3265
  registerCapabilityGatewayRoute("engage-flow", { gatewayDomain: "engage" });
@@ -3871,17 +3268,7 @@ registerCapabilityGatewayRoute("engage-setting", { gatewayDomain: "engage" });
3871
3268
  registerCapabilityGatewayRoute("engage-scene", { gatewayDomain: "engage" });
3872
3269
  registerCapabilityGatewayRoute("engage-activity", { gatewayDomain: "engage" });
3873
3270
  registerCapabilityGatewayRoute("engage-workbench", { gatewayDomain: "engage" });
3874
- registerMcpMappings({
3875
- "engage_config": { componentName: "engage", mappingPath: "config" },
3876
- "engage_flow": { componentName: "engage", mappingPath: "flow" },
3877
- "engage_setting": { componentName: "engage", mappingPath: "setting" },
3878
- "engage_task": { componentName: "engage", mappingPath: "task" }
3879
- });
3880
- var commands11 = [
3881
- ...setting_default,
3882
- ...task_default,
3883
- ...config_default,
3884
- ...flow_default,
3271
+ var commands7 = [
3885
3272
  ...engage_flow_default,
3886
3273
  ...engage_task_default,
3887
3274
  ...engage_setting_default,
@@ -3889,7 +3276,7 @@ var commands11 = [
3889
3276
  ...engage_activity_default,
3890
3277
  ...engage_workbench_default
3891
3278
  ];
3892
- var te_engage_default = commands11;
3279
+ var te_engage_default = commands7;
3893
3280
  export {
3894
3281
  te_engage_default as default
3895
3282
  };