@thinkingai/ae-cli 6.1.27 → 6.1.29

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 (177) hide show
  1. package/README.md +52 -6
  2. package/README.zh.md +52 -6
  3. package/bin/ae-cli.js +5 -0
  4. package/bin/runtime-capabilities.json +5 -0
  5. package/cli-installation-guide.md +24 -3
  6. package/dist/{auth-WA7YGGRT.js → auth-OBQ5KVQM.js} +175 -45
  7. package/dist/{automation-VAAQBM7Y.js → automation-NAR5DDGL.js} +94 -38
  8. package/dist/{capability-GAAYJ3IQ.js → capability-LFSVNI5B.js} +57 -28
  9. package/dist/chunk-2UW3Y463.js +2289 -0
  10. package/dist/{chunk-VZZNLV3I.js → chunk-3SDHJOCR.js} +68 -18
  11. package/dist/chunk-6HAUVWOQ.js +132 -0
  12. package/dist/{chunk-5XJYLEVC.js → chunk-72NJKS7O.js} +4 -4
  13. package/dist/{chunk-Q5US7JC5.js → chunk-7JAVT5TK.js} +3 -3
  14. package/dist/{chunk-7KU2WNQE.js → chunk-CVCTFLSO.js} +37 -15
  15. package/dist/{chunk-GHXZK54S.js → chunk-H3K5UGYC.js} +41 -13
  16. package/dist/{chunk-OP44TT4H.js → chunk-IN7KKL6K.js} +4 -2
  17. package/dist/{chunk-S6M42KND.js → chunk-JEUXDY3B.js} +1 -1
  18. package/dist/{chunk-ZL7SGNIA.js → chunk-JNVVJ273.js} +58 -46
  19. package/dist/chunk-N6XBLRB7.js +105 -0
  20. package/dist/{chunk-AP7YP2NX.js → chunk-OAWPT7VP.js} +2 -2
  21. package/dist/{chunk-AQJPNWZF.js → chunk-PWXDWMCW.js} +7 -7
  22. package/dist/{chunk-CT7QDJS6.js → chunk-QVRIDN42.js} +2 -2
  23. package/dist/chunk-QZLRHGVH.js +222 -0
  24. package/dist/{chunk-RPBOAQQQ.js → chunk-QZUVLFNR.js} +1 -1
  25. package/dist/{chunk-3YVEAZUN.js → chunk-RJHGDWSC.js} +32 -21
  26. package/dist/{chunk-MWIA43UJ.js → chunk-VCZE3IWO.js} +10 -8
  27. package/dist/chunk-YVG6QD3V.js +233 -0
  28. package/dist/{chunk-WNGFSIOB.js → chunk-Z3Q2AEIN.js} +237 -86
  29. package/dist/{community-report-client-PEERQCX2.js → community-report-client-TJVCLZ3K.js} +1 -1
  30. package/dist/compat-check-CII6B74E.js +32 -0
  31. package/dist/{config-JOD5DOPE.js → config-YZ6O2UQ2.js} +40 -7
  32. package/dist/{context-NGVFPCBK.js → context-F6FCGTF3.js} +4 -4
  33. package/dist/{data-integration-BCLQFTGU.js → data-integration-6UAZO4GG.js} +207 -24
  34. package/dist/evaluation-4LO2O4AF.js +3714 -0
  35. package/dist/index.js +352 -81
  36. package/dist/{local-data-upload-client-TWMHFLUA.js → local-data-upload-client-KCMG6J62.js} +1 -1
  37. package/dist/{memory-CQKH2JAV.js → memory-HHPX3NF2.js} +6 -6
  38. package/dist/{metadata-NR3PHR23.js → metadata-TIFY24LW.js} +17 -9
  39. package/dist/{model-VX5M2CJ6.js → model-7UHGWYVR.js} +4 -4
  40. package/dist/{personal-semantic-preference-2RAI36P3.js → personal-semantic-preference-WKJEGPTM.js} +7 -6
  41. package/dist/{project-semantic-3BUGP3ZM.js → project-semantic-EIQVZNHW.js} +11 -10
  42. package/dist/{sync-RZIAV37C.js → sync-RV3OPCTI.js} +8 -7
  43. package/dist/{te-agent-AORRE2FM.js → te-agent-5ENVZJUH.js} +757 -94
  44. package/dist/{te-analysis-GP7DSQ7Q.js → te-analysis-USIK6ZZG.js} +584 -100
  45. package/dist/{te-community-42M7ICDO.js → te-community-WE2UU4XV.js} +722 -228
  46. package/dist/{te-dataops-BNKNZ4F2.js → te-dataops-XNMO7MBF.js} +9 -6
  47. package/dist/{te-engage-2CO6LRCX.js → te-engage-6C3HCFQR.js} +13 -12
  48. package/dist/{te-experiment-652CLXMU.js → te-experiment-LVTRI3QK.js} +55 -21
  49. package/dist/{te-kb-ULATOTQ3.js → te-kb-TUPGMVBY.js} +409 -85
  50. package/dist/{te-system-UGHVKBVV.js → te-system-YM657FKO.js} +6 -6
  51. package/dist/{te-team-YA6SNOJ3.js → te-team-G4VEJJNL.js} +64 -41
  52. package/dist/{things-DTCOQIQB.js → things-22KQWC23.js} +7 -7
  53. package/dist/{update-ESNYKUVR.js → update-XX4ILU7X.js} +11 -7
  54. package/dist/{workspace-JEOHKFPX.js → workspace-LYDAP647.js} +6 -6
  55. package/package.json +26 -11
  56. package/skills/ae-agent/SKILL.md +22 -3
  57. package/skills/ae-agent/references/command_index.md +8 -0
  58. package/skills/ae-agent/references/resource-package.md +57 -0
  59. package/skills/ae-analysis/SKILL.md +23 -10
  60. package/skills/ae-analysis/references/adhoc_export.md +1 -1
  61. package/skills/ae-analysis/references/agent_review_preflight.md +55 -10
  62. package/skills/ae-analysis/references/agent_review_priorities_comparisons.md +5 -3
  63. package/skills/ae-analysis/references/agent_review_submit_to_page.md +60 -24
  64. package/skills/ae-analysis/references/ai_models/event.md +58 -2
  65. package/skills/ae-analysis/references/ai_models/rank_list.md +1 -0
  66. package/skills/ae-analysis/references/ai_models/retention.md +2 -0
  67. package/skills/ae-analysis/references/ai_models/revenue.md +2 -0
  68. package/skills/ae-analysis/references/analysis_data_export.md +11 -1
  69. package/skills/ae-analysis/references/asset_batch_info_export.md +2 -2
  70. package/skills/ae-analysis/references/asset_batch_sql_export.md +2 -2
  71. package/skills/ae-analysis/references/asset_export.md +1 -1
  72. package/skills/ae-analysis/references/bi_panel_page_data_export.md +1 -1
  73. package/skills/ae-analysis/references/check_export.md +1 -1
  74. package/skills/ae-analysis/references/command_index.md +39 -26
  75. package/skills/ae-analysis/references/dashboard_report_data_export.md +2 -0
  76. package/skills/ae-analysis/references/dashboard_report_get.md +6 -2
  77. package/skills/ae-analysis/references/dashboard_report_update.md +24 -5
  78. package/skills/ae-analysis/references/feedback_submit.md +1 -1
  79. package/skills/ae-analysis/references/governance_recommendation_export.md +40 -18
  80. package/skills/ae-analysis/references/governance_recommendation_run_update.md +13 -0
  81. package/skills/ae-analysis/references/live_data_export.md +1 -1
  82. package/skills/ae-analysis/references/metric_create.md +29 -0
  83. package/skills/ae-analysis/references/metric_get.md +2 -0
  84. package/skills/ae-analysis/references/metric_update.md +2 -0
  85. package/skills/ae-analysis/references/operation_record_export.md +1 -1
  86. package/skills/ae-analysis/references/plan_change_log_export.md +1 -1
  87. package/skills/ae-analysis/references/plan_export.md +1 -1
  88. package/skills/ae-analysis/references/project_info_get.md +4 -0
  89. package/skills/ae-analysis/references/project_member_group_add_members.md +35 -0
  90. package/skills/ae-analysis/references/project_member_group_create.md +25 -0
  91. package/skills/ae-analysis/references/project_member_group_delete.md +34 -0
  92. package/skills/ae-analysis/references/project_member_group_list.md +29 -0
  93. package/skills/ae-analysis/references/project_member_group_members.md +28 -0
  94. package/skills/ae-analysis/references/project_member_group_remove_members.md +35 -0
  95. package/skills/ae-analysis/references/project_member_group_rename.md +26 -0
  96. package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +9 -1
  97. package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +6 -1
  98. package/skills/ae-analysis/references/report_data_export.md +1 -1
  99. package/skills/ae-analysis/references/scenario_append.md +31 -0
  100. package/skills/ae-analysis/references/scenario_begin.md +11 -0
  101. package/skills/ae-analysis/references/scenario_collect.md +43 -0
  102. package/skills/ae-analysis/references/scenario_evaluation.md +18 -0
  103. package/skills/ae-analysis/references/scenario_get.md +15 -0
  104. package/skills/ae-analysis/references/scenario_list.md +64 -0
  105. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +73 -4
  106. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +14 -1
  107. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +5 -1
  108. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/execution-contract.mjs +173 -0
  109. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/generate-build-ir.mjs +109 -64
  110. package/skills/ae-automation/SKILL.md +2 -2
  111. package/skills/ae-automation/references/cli.md +18 -1
  112. package/skills/ae-capability/SKILL.md +7 -3
  113. package/skills/ae-community/SKILL.md +77 -27
  114. package/skills/ae-community/references/community-analyzing-theme-comment.md +10 -8
  115. package/skills/ae-community/references/community-data-quality.md +68 -0
  116. package/skills/ae-community/references/community-query-evidence.md +85 -0
  117. package/skills/ae-community/references/community-scenario-capabilities.md +137 -0
  118. package/skills/ae-community/references/community-weekly-report.md +6 -3
  119. package/skills/ae-community/references/get_channel_info.md +7 -4
  120. package/skills/ae-community/references/get_comment_tag_analysis.md +3 -3
  121. package/skills/ae-community/references/get_comments_summary.md +4 -4
  122. package/skills/ae-community/references/get_corpus_tags.md +3 -3
  123. package/skills/ae-community/references/get_daily_summary.md +3 -3
  124. package/skills/ae-community/references/get_hot_topics.md +3 -3
  125. package/skills/ae-community/references/get_livestream_analysis.md +3 -3
  126. package/skills/ae-community/references/get_livestream_detail.md +4 -4
  127. package/skills/ae-community/references/get_livestream_list.md +3 -3
  128. package/skills/ae-community/references/get_livestream_overview.md +3 -3
  129. package/skills/ae-community/references/get_livestream_room_metrics.md +3 -3
  130. package/skills/ae-community/references/get_livestream_rooms.md +3 -3
  131. package/skills/ae-community/references/get_overview_metrics.md +3 -3
  132. package/skills/ae-community/references/get_post_detail.md +4 -4
  133. package/skills/ae-community/references/get_risk_content.md +5 -5
  134. package/skills/ae-community/references/get_sentiment_overview.md +4 -4
  135. package/skills/ae-community/references/get_tag_trends.md +3 -3
  136. package/skills/ae-community/references/get_topic_detail.md +3 -3
  137. package/skills/ae-community/references/list_sources.md +28 -0
  138. package/skills/ae-community/references/list_spaces.md +39 -0
  139. package/skills/ae-community/references/search_posts.md +21 -7
  140. package/skills/ae-data-integration/SKILL.md +6 -4
  141. package/skills/ae-data-integration/references/error-handling.md +1 -0
  142. package/skills/ae-data-integration/references/handoff.md +1 -1
  143. package/skills/ae-data-integration/references/sink-upload.md +11 -0
  144. package/skills/ae-data-integration/references/source-inspect.md +2 -1
  145. package/skills/ae-data-integration/references/transform.md +1 -1
  146. package/skills/ae-data-integration/references/ue-mapping.md +1 -1
  147. package/skills/ae-evaluation/SKILL.md +83 -0
  148. package/skills/ae-evaluation/references/access-and-members.md +55 -0
  149. package/skills/ae-evaluation/references/connections.md +78 -0
  150. package/skills/ae-evaluation/references/datasets.md +57 -0
  151. package/skills/ae-evaluation/references/evaluators.md +81 -0
  152. package/skills/ae-evaluation/references/files.md +33 -0
  153. package/skills/ae-evaluation/references/integrations.md +39 -0
  154. package/skills/ae-evaluation/references/runs.md +160 -0
  155. package/skills/ae-evaluation/references/schedules.md +31 -0
  156. package/skills/ae-experiment/SKILL.md +7 -1
  157. package/skills/ae-experiment/references/manage_experiment.md +18 -1
  158. package/skills/ae-experiment/references/query_experiment_detail.md +7 -0
  159. package/skills/ae-experiment/references/save_experiment.md +76 -2
  160. package/skills/ae-experiment/references/save_submit_experiment.md +7 -0
  161. package/skills/ae-kb/SKILL.md +33 -7
  162. package/skills/ae-kb/references/publication.md +81 -0
  163. package/skills/ae-kb/references/query-workflow.md +14 -1
  164. package/skills/ae-metadata/SKILL.md +3 -2
  165. package/skills/ae-metadata/references/metadata_data_table_download.md +7 -1
  166. package/skills/ae-metadata/references/metadata_data_table_get.md +37 -0
  167. package/skills/ae-system/SKILL.md +1 -1
  168. package/skills/ae-team/SKILL.md +2 -2
  169. package/skills/ae-team/references/run-start.md +1 -0
  170. package/skills/ae-team/references/run-watch.md +7 -5
  171. package/skills/ae-things/SKILL.md +53 -51
  172. package/skills/ae-things/references/cli.md +56 -54
  173. package/skills/ae-things-progress/SKILL.md +20 -20
  174. package/skills/ae-things-review/SKILL.md +19 -19
  175. package/skills/ae-workspace/SKILL.md +1 -1
  176. package/dist/chunk-6VNIR4AP.js +0 -1422
  177. package/dist/chunk-CI24BDR2.js +0 -43
@@ -1,26 +1,28 @@
1
1
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  resolveHost
4
- } from "./chunk-OP44TT4H.js";
4
+ } from "./chunk-IN7KKL6K.js";
5
5
  import {
6
6
  printError
7
- } from "./chunk-6VNIR4AP.js";
7
+ } from "./chunk-QZLRHGVH.js";
8
8
  import {
9
9
  internalCallSourceHeaders
10
10
  } from "./chunk-Y74WTIKJ.js";
11
+ import "./chunk-2UW3Y463.js";
11
12
  import {
12
13
  SecureStoreAuthError,
13
14
  getCliToken
14
- } from "./chunk-GHXZK54S.js";
15
+ } from "./chunk-H3K5UGYC.js";
15
16
  import {
16
17
  safeJsonParse
17
- } from "./chunk-ZL7SGNIA.js";
18
+ } from "./chunk-JNVVJ273.js";
18
19
  import {
19
20
  CliApiError,
20
21
  CliValidationError,
21
22
  PermissionError,
23
+ externalCliTokenRequestOptions,
22
24
  logger
23
- } from "./chunk-WNGFSIOB.js";
25
+ } from "./chunk-Z3Q2AEIN.js";
24
26
 
25
27
  // src/commands/te-dataops/shared.ts
26
28
  import { randomBytes } from "crypto";
@@ -172,6 +174,7 @@ async function downloadDataopsApi(ctx, path, params, targetPath) {
172
174
  const url = buildUrl(host, path, compactArgs(params));
173
175
  const resp = await fetch(url, {
174
176
  method: "GET",
177
+ ...externalCliTokenRequestOptions(url),
175
178
  headers: {
176
179
  "cli-token": token,
177
180
  "Accept": "*/*",
@@ -228,7 +231,7 @@ async function dataopsRequest(ctx, method, path, params = {}, body) {
228
231
  if (method !== "GET") {
229
232
  options.body = JSON.stringify(body ?? {});
230
233
  }
231
- const resp = await fetch(url, options);
234
+ const resp = await fetch(url, { ...options, ...externalCliTokenRequestOptions(url) });
232
235
  const text = await resp.text();
233
236
  const data = parseResponseBody(text, url, resp.status, !resp.ok);
234
237
  logger.api(method, url, resp.status, body, data);
@@ -1,14 +1,7 @@
1
1
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  createCapabilityCommand
4
- } from "./chunk-MWIA43UJ.js";
5
- import {
6
- CapabilityGatewayError,
7
- buildCapabilityGatewayUrl,
8
- fetchCapabilityGateway,
9
- requestCapabilityGateway,
10
- requestCapabilityGatewayWithEnvelope
11
- } from "./chunk-VZZNLV3I.js";
4
+ } from "./chunk-VCZE3IWO.js";
12
5
  import {
13
6
  registerCapabilityGatewayRoute,
14
7
  resolveGatewayDomain
@@ -16,13 +9,21 @@ import {
16
9
  import {
17
10
  printError,
18
11
  withOutputMetadata
19
- } from "./chunk-6VNIR4AP.js";
12
+ } from "./chunk-QZLRHGVH.js";
13
+ import {
14
+ CapabilityGatewayError,
15
+ buildCapabilityGatewayUrl,
16
+ fetchCapabilityGateway,
17
+ requestCapabilityGateway,
18
+ requestCapabilityGatewayWithEnvelope
19
+ } from "./chunk-3SDHJOCR.js";
20
20
  import "./chunk-Y74WTIKJ.js";
21
- import "./chunk-GHXZK54S.js";
22
- import "./chunk-ZL7SGNIA.js";
21
+ import "./chunk-2UW3Y463.js";
22
+ import "./chunk-H3K5UGYC.js";
23
+ import "./chunk-JNVVJ273.js";
23
24
  import {
24
25
  CliValidationError
25
- } from "./chunk-WNGFSIOB.js";
26
+ } from "./chunk-Z3Q2AEIN.js";
26
27
 
27
28
  // src/commands/te-engage/shared.ts
28
29
  function createEngageCapabilityCommand(cliService, config) {
@@ -1,16 +1,19 @@
1
1
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  createCapabilityCommand
4
- } from "./chunk-MWIA43UJ.js";
5
- import "./chunk-VZZNLV3I.js";
4
+ } from "./chunk-VCZE3IWO.js";
6
5
  import {
7
6
  registerCapabilityGatewayRoute
8
7
  } from "./chunk-KPQY44JQ.js";
9
- import "./chunk-6VNIR4AP.js";
8
+ import "./chunk-QZLRHGVH.js";
9
+ import "./chunk-3SDHJOCR.js";
10
10
  import "./chunk-Y74WTIKJ.js";
11
- import "./chunk-GHXZK54S.js";
12
- import "./chunk-ZL7SGNIA.js";
13
- import "./chunk-WNGFSIOB.js";
11
+ import "./chunk-2UW3Y463.js";
12
+ import "./chunk-H3K5UGYC.js";
13
+ import "./chunk-JNVVJ273.js";
14
+ import {
15
+ CliValidationError
16
+ } from "./chunk-Z3Q2AEIN.js";
14
17
 
15
18
  // src/commands/te-experiment/capability-shared.ts
16
19
  function createExperimentCapabilityCommand(config) {
@@ -206,6 +209,7 @@ var experimentManage = createExperimentCapabilityCommand({
206
209
  command: "manage",
207
210
  capabilityId: "experiment.experiment.manage",
208
211
  description: "Update an experiment status.",
212
+ helpText: "For scheduled Feature starts, submit with --target-status pending after saving startTime.\nUsing --target-status running starts immediately. Read experiment detail first: when\nstart_time_adjustment_required is true, an early start uses the current server time.",
209
213
  flags: [
210
214
  { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
211
215
  { name: "exp-id", type: "string", required: true, desc: "Experiment ID." },
@@ -237,11 +241,38 @@ var experimentReadyCheck = createExperimentCapabilityCommand({
237
241
  });
238
242
 
239
243
  // src/commands/te-experiment/experiment/save.ts
244
+ function readTimestamp(ctx, name) {
245
+ const value = ctx.str(name);
246
+ if (!(ctx.has?.(name) ?? value !== "")) return void 0;
247
+ if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$/.test(value) || !Number.isFinite(Date.parse(value))) {
248
+ throw new CliValidationError(`Flag --${name} must be an ISO-8601 timestamp with a timezone offset`);
249
+ }
250
+ return value;
251
+ }
252
+ function buildInput4(ctx) {
253
+ const req = { ...readRequiredObject(ctx, "req") };
254
+ const startTime = readTimestamp(ctx, "start-time");
255
+ const fixedEndTime = readTimestamp(ctx, "fixed-end-time");
256
+ if (startTime !== void 0 || fixedEndTime !== void 0) {
257
+ if (req.expType && req.expType !== "feature") {
258
+ throw new CliValidationError("Flags --start-time and --fixed-end-time only support Feature experiments");
259
+ }
260
+ if (startTime !== void 0) req.startTime = startTime;
261
+ if (fixedEndTime !== void 0) {
262
+ if (req.expCycle != null && (typeof req.expCycle !== "object" || Array.isArray(req.expCycle))) {
263
+ throw new CliValidationError("Field req.expCycle must be a JSON object when --fixed-end-time is provided");
264
+ }
265
+ req.expCycle = { ...req.expCycle, cycleType: "time", fixedEndTime };
266
+ }
267
+ }
268
+ return { project_id: ctx.num("project-id"), req };
269
+ }
240
270
  var experimentSave = createExperimentCapabilityCommand({
241
271
  resource: "experiment",
242
272
  command: "save",
243
273
  capabilityId: "experiment.experiment.save",
244
- description: "Create or update an experiment draft.",
274
+ description: "Create or update an experiment, including Feature start and end times.",
275
+ helpText: "Timing flags override matching fields in --req. Saving does not submit or start an experiment.\nAfter readiness checks, use experiment experiment manage --target-status pending to submit.\nSubmitted Feature experiments with a start time are checked every half hour by the server.\nUse timestamps with minutes 00 or 30 to align with scheduling checks.",
245
276
  flags: [
246
277
  { name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
247
278
  {
@@ -249,13 +280,15 @@ var experimentSave = createExperimentCapabilityCommand({
249
280
  type: "json",
250
281
  required: true,
251
282
  desc: "Native camelCase request; custom audiences use targeting.definitionRequest, never targetConfig."
252
- }
283
+ },
284
+ { name: "start-time", type: "string", desc: "Optional Feature start timestamp with timezone offset; overrides req.startTime. The server clears seconds and milliseconds." },
285
+ { name: "fixed-end-time", type: "string", desc: "Optional Feature deadline with timezone offset; sets req.expCycle.cycleType=time and overrides fixedEndTime." }
253
286
  ],
254
287
  risk: "write",
255
288
  validate: (ctx) => {
256
- readRequiredObject(ctx, "req");
289
+ buildInput4(ctx);
257
290
  },
258
- buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequiredObject(ctx, "req") })
291
+ buildInput: buildInput4
259
292
  });
260
293
 
261
294
  // src/commands/te-experiment/experiment/update-group.ts
@@ -382,12 +415,13 @@ function readMetrics(ctx) {
382
415
  }
383
416
  return value;
384
417
  }
385
- function buildInput4(ctx) {
418
+ function buildInput5(ctx) {
386
419
  const expId = ctx.str("exp-id").trim();
387
420
  const groups = readGroups(ctx);
388
421
  if (expId) {
389
422
  for (let index = 0; index < groups.length; index += 1) {
390
- if (typeof groups[index].expGroupId !== "string" || groups[index].expGroupId.trim() === "") {
423
+ const expGroupId = groups[index].expGroupId;
424
+ if (typeof expGroupId !== "string" || expGroupId.trim() === "") {
391
425
  throw new Error(`Flag --groups[${index}].expGroupId is required when --exp-id is provided`);
392
426
  }
393
427
  }
@@ -441,9 +475,9 @@ var externalExperimentSaveSubmit = createExperimentCapabilityCommand({
441
475
  ],
442
476
  risk: "write",
443
477
  validate: (ctx) => {
444
- buildInput4(ctx);
478
+ buildInput5(ctx);
445
479
  },
446
- buildInput: buildInput4
480
+ buildInput: buildInput5
447
481
  });
448
482
 
449
483
  // src/commands/te-experiment/feature/batch-delete.ts
@@ -464,7 +498,7 @@ var featureBatchDelete = createExperimentCapabilityCommand({
464
498
  });
465
499
 
466
500
  // src/commands/te-experiment/feature/get.ts
467
- function buildInput5(ctx) {
501
+ function buildInput6(ctx) {
468
502
  const input = {
469
503
  project_id: ctx.num("project-id"),
470
504
  feature_key: ctx.str("feature-key")
@@ -483,7 +517,7 @@ var featureGet = createExperimentCapabilityCommand({
483
517
  { name: "version", type: "string", required: false, desc: "Feature version ID." }
484
518
  ],
485
519
  risk: "read",
486
- buildInput: buildInput5
520
+ buildInput: buildInput6
487
521
  });
488
522
 
489
523
  // src/commands/te-experiment/feature/list.ts
@@ -638,7 +672,7 @@ var featureWhitelistBatchDelete = createExperimentCapabilityCommand({
638
672
  });
639
673
 
640
674
  // src/commands/te-experiment/feature-whitelist/list.ts
641
- function buildInput6(ctx) {
675
+ function buildInput7(ctx) {
642
676
  return {
643
677
  project_id: ctx.num("project-id"),
644
678
  feature_key: ctx.str("feature-key")
@@ -654,11 +688,11 @@ var featureWhitelistList = createExperimentCapabilityCommand({
654
688
  { name: "feature-key", type: "string", required: true, desc: "Existing Feature key." }
655
689
  ],
656
690
  risk: "read",
657
- buildInput: buildInput6
691
+ buildInput: buildInput7
658
692
  });
659
693
 
660
694
  // src/commands/te-experiment/feature-whitelist/save.ts
661
- function buildInput7(ctx) {
695
+ function buildInput8(ctx) {
662
696
  const ruleId = ctx.str("rule-id").trim();
663
697
  const status = ctx.str("status").trim() || "draft";
664
698
  if (!["draft", "enable", "disable"].includes(status)) {
@@ -695,9 +729,9 @@ var featureWhitelistSave = createExperimentCapabilityCommand({
695
729
  ],
696
730
  risk: "write",
697
731
  validate: (ctx) => {
698
- buildInput7(ctx);
732
+ buildInput8(ctx);
699
733
  },
700
- buildInput: buildInput7
734
+ buildInput: buildInput8
701
735
  });
702
736
 
703
737
  // src/commands/te-experiment/feature-whitelist/update-status.ts