@thinkingai/ae-cli 6.0.31 → 6.0.32

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 (164) hide show
  1. package/README.md +3 -2
  2. package/README.zh.md +3 -2
  3. package/dist/{capability-SQ2IWKP3.js → capability-QW4AVJHI.js} +1 -1
  4. package/dist/{capability-SEH3JWLN.js → capability-SCRFGODD.js} +1 -1
  5. package/dist/{chunk-N2QORU5D.js → chunk-7OLGDQQ2.js} +5 -2
  6. package/dist/{chunk-TKQJQXWT.js → chunk-TBHBYKXZ.js} +5 -2
  7. package/dist/index.js +46 -24
  8. package/dist/{metadata-X62TKIVK.js → metadata-BFDL6RUK.js} +2 -2
  9. package/dist/{metadata-W6JFFMBA.js → metadata-FCLDBXX2.js} +2 -2
  10. package/dist/{te-analysis-NJGNWZFC.js → te-analysis-PUVF5IF4.js} +1297 -91
  11. package/dist/{te-analysis-YGV5V5EX.js → te-analysis-UJDOKPAN.js} +1297 -91
  12. package/dist/te-common-VUX3VOXZ.js +60 -0
  13. package/dist/te-common-XLAGWNIV.js +60 -0
  14. package/dist/te-engage-K4AEUPK5.js +3894 -0
  15. package/dist/te-engage-QBCCME22.js +3894 -0
  16. package/dist/{te-kb-NT33UHAE.js → te-kb-AYCODNU6.js} +56 -17
  17. package/dist/{te-meta-VKWNAWO4.js → te-meta-ARDIW3YI.js} +1 -234
  18. package/dist/{te-meta-MAAUHFQO.js → te-meta-UUROEODR.js} +1 -234
  19. package/package.json +1 -1
  20. package/skills/ae-analysis/SKILL.md +10 -7
  21. package/skills/ae-analysis/references/adhoc_export.md +3 -6
  22. package/skills/ae-analysis/references/adhoc_run.md +5 -9
  23. package/skills/ae-analysis/references/ai_models.md +17 -1
  24. package/skills/ae-analysis/references/analysis_data_retrieval.md +11 -11
  25. package/skills/ae-analysis/references/analysis_drilldown_contract.md +93 -0
  26. package/skills/ae-analysis/references/analysis_gateway_assets.md +9 -8
  27. package/skills/ae-analysis/references/asset_url_get.md +4 -3
  28. package/skills/ae-analysis/references/bi_panel_page_data_export.md +2 -2
  29. package/skills/ae-analysis/references/bi_panel_page_data_run.md +1 -1
  30. package/skills/ae-analysis/references/command_index.md +62 -28
  31. package/skills/ae-analysis/references/create_entity.md +2 -2
  32. package/skills/ae-analysis/references/dashboard_report_data_export.md +2 -2
  33. package/skills/ae-analysis/references/dashboard_report_data_run.md +2 -2
  34. package/skills/ae-analysis/references/drilldown_entities_export.md +26 -0
  35. package/skills/ae-analysis/references/drilldown_entities_run.md +33 -0
  36. package/skills/ae-analysis/references/drilldown_events_export.md +21 -0
  37. package/skills/ae-analysis/references/drilldown_events_run.md +23 -0
  38. package/skills/ae-analysis/references/drilldown_user_events_export.md +6 -3
  39. package/skills/ae-analysis/references/drilldown_user_events_run.md +6 -6
  40. package/skills/ae-analysis/references/entity_detail_export.md +2 -0
  41. package/skills/ae-analysis/references/entity_detail_run.md +8 -1
  42. package/skills/ae-analysis/references/event_detail_export.md +2 -0
  43. package/skills/ae-analysis/references/event_detail_run.md +2 -0
  44. package/skills/ae-analysis/references/event_list.md +10 -2
  45. package/skills/ae-analysis/references/list_entities.md +1 -1
  46. package/skills/ae-analysis/references/metric_create.md +13 -4
  47. package/skills/ae-analysis/references/metric_delete.md +7 -0
  48. package/skills/ae-analysis/references/metric_get.md +6 -0
  49. package/skills/ae-analysis/references/metric_list.md +16 -3
  50. package/skills/ae-analysis/references/metric_update.md +12 -1
  51. package/skills/ae-analysis/references/project_access_detail_get.md +23 -0
  52. package/skills/ae-analysis/references/project_data_power_delete.md +26 -0
  53. package/skills/ae-analysis/references/project_data_power_get.md +24 -0
  54. package/skills/ae-analysis/references/project_data_power_list.md +23 -0
  55. package/skills/ae-analysis/references/project_data_power_upsert.md +24 -0
  56. package/skills/ae-analysis/references/project_entity_create.md +27 -0
  57. package/skills/ae-analysis/references/project_entity_delete.md +25 -0
  58. package/skills/ae-analysis/references/project_entity_event_list.md +24 -0
  59. package/skills/ae-analysis/references/project_entity_get.md +24 -0
  60. package/skills/ae-analysis/references/project_entity_list.md +28 -0
  61. package/skills/ae-analysis/references/project_entity_update.md +28 -0
  62. package/skills/ae-analysis/references/project_function_list.md +24 -0
  63. package/skills/ae-analysis/references/project_info_get.md +23 -0
  64. package/skills/ae-analysis/references/project_info_list.md +26 -0
  65. package/skills/ae-analysis/references/project_info_update.md +25 -0
  66. package/skills/ae-analysis/references/project_mark_time_create.md +27 -0
  67. package/skills/ae-analysis/references/project_mark_time_delete.md +25 -0
  68. package/skills/ae-analysis/references/project_mark_time_list.md +28 -0
  69. package/skills/ae-analysis/references/project_mark_time_update.md +28 -0
  70. package/skills/ae-analysis/references/project_member_add.md +25 -0
  71. package/skills/ae-analysis/references/project_member_batch_update.md +24 -0
  72. package/skills/ae-analysis/references/project_member_candidate_list.md +25 -0
  73. package/skills/ae-analysis/references/project_member_handover_export.md +27 -0
  74. package/skills/ae-analysis/references/project_member_handover_run.md +24 -0
  75. package/skills/ae-analysis/references/project_member_import.md +25 -0
  76. package/skills/ae-analysis/references/project_member_list.md +23 -0
  77. package/skills/ae-analysis/references/project_member_receiver_list.md +23 -0
  78. package/skills/ae-analysis/references/project_member_remove.md +26 -0
  79. package/skills/ae-analysis/references/project_member_update.md +25 -0
  80. package/skills/ae-analysis/references/project_owner_update.md +27 -0
  81. package/skills/ae-analysis/references/project_permission_binding_list.md +24 -0
  82. package/skills/ae-analysis/references/project_receive_status_update.md +25 -0
  83. package/skills/ae-analysis/references/project_role_delete.md +25 -0
  84. package/skills/ae-analysis/references/project_role_function_list.md +27 -0
  85. package/skills/ae-analysis/references/project_role_get.md +23 -0
  86. package/skills/ae-analysis/references/project_role_list.md +25 -0
  87. package/skills/ae-analysis/references/project_role_upsert.md +24 -0
  88. package/skills/ae-analysis/references/project_role_user_list.md +23 -0
  89. package/skills/ae-analysis/references/project_timezone_get.md +23 -0
  90. package/skills/ae-analysis/references/project_timezone_overview.md +23 -0
  91. package/skills/ae-analysis/references/project_timezone_update.md +25 -0
  92. package/skills/ae-analysis/references/project_user_id_items_update.md +24 -0
  93. package/skills/ae-analysis/references/property_list.md +21 -6
  94. package/skills/ae-analysis/references/public_link_create.md +1 -1
  95. package/skills/ae-analysis/references/query_create_result_cluster.md +14 -32
  96. package/skills/ae-analysis/references/report_create.md +1 -1
  97. package/skills/ae-analysis/references/report_data_export.md +2 -2
  98. package/skills/ae-analysis/references/report_data_run.md +2 -2
  99. package/skills/ae-analysis/references/report_get.md +2 -0
  100. package/skills/ae-analysis/references/report_update.md +1 -1
  101. package/skills/ae-analysis/references/user_cluster_create.md +3 -1
  102. package/skills/ae-analysis/references/user_cluster_get.md +4 -0
  103. package/skills/ae-analysis/references/user_cluster_refresh.md +4 -2
  104. package/skills/ae-analysis/references/user_cluster_update.md +3 -1
  105. package/skills/ae-analysis/references/user_tag_create.md +3 -1
  106. package/skills/ae-analysis/references/user_tag_get.md +4 -0
  107. package/skills/ae-analysis/references/user_tag_refresh.md +4 -2
  108. package/skills/ae-analysis/references/user_tag_update.md +3 -1
  109. package/skills/ae-analysis/references/virtual_event_create.md +22 -3
  110. package/skills/ae-analysis/references/virtual_property_create.md +23 -2
  111. package/skills/ae-engage/SKILL.md +202 -7
  112. package/skills/ae-engage/references/activity-activity-type.md +42 -0
  113. package/skills/ae-engage/references/activity-activity.md +70 -0
  114. package/skills/ae-engage/references/activity-approval.md +53 -0
  115. package/skills/ae-engage/references/activity-task.md +87 -0
  116. package/skills/ae-engage/references/activity-topic.md +98 -0
  117. package/skills/ae-engage/references/approval-approver-delete.md +26 -0
  118. package/skills/ae-engage/references/channel-test-send.md +37 -0
  119. package/skills/ae-engage/references/channel-touch-limits-batch-update.md +28 -0
  120. package/skills/ae-engage/references/channel-touch-limits-save.md +37 -0
  121. package/skills/ae-engage/references/channel-touch-limits-toggle.md +28 -0
  122. package/skills/ae-engage/references/channel-update-config.md +36 -0
  123. package/skills/ae-engage/references/client-param.md +58 -0
  124. package/skills/ae-engage/references/common-metric.md +75 -0
  125. package/skills/ae-engage/references/config-table.md +92 -0
  126. package/skills/ae-engage/references/engage-scene-config-item.md +69 -0
  127. package/skills/ae-engage/references/operation-log-query.md +1 -1
  128. package/skills/ae-engage/references/preset-event.md +42 -0
  129. package/skills/ae-engage/references/push-language.md +39 -0
  130. package/skills/ae-engage/references/scene-config-channel.md +58 -0
  131. package/skills/ae-engage/references/scene-config-group.md +62 -0
  132. package/skills/ae-engage/references/scene-config-item.md +68 -0
  133. package/skills/ae-engage/references/scene-config-metric.md +79 -0
  134. package/skills/ae-engage/references/scene-config-param.md +72 -0
  135. package/skills/ae-engage/references/scene-preset-metric.md +45 -0
  136. package/skills/ae-engage/references/scene-strategy.md +47 -0
  137. package/skills/ae-engage/references/scene-template.md +71 -0
  138. package/skills/ae-engage/references/{ops-delete.md → task-delete.md} +3 -3
  139. package/skills/ae-engage/references/whitelist.md +72 -0
  140. package/skills/ae-engage/references/workbench-workbench.md +48 -0
  141. package/skills/ae-generate-tracking-plan/SKILL.md +8 -5
  142. package/skills/ae-generate-tracking-plan/references/te-api.md +1 -1
  143. package/skills/ae-kb/SKILL.md +34 -8
  144. package/skills/ae-metadata/SKILL.md +1 -1
  145. package/skills/ae-metadata/references/metadata_event_get.md +4 -4
  146. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
  147. package/skills/ae-metadata/references/metadata_property_get.md +4 -4
  148. package/dist/te-common-5NJLF3XG.js +0 -130
  149. package/dist/te-common-7VTJZPII.js +0 -130
  150. package/dist/te-engage-BUWVSSSK.js +0 -1912
  151. package/dist/te-engage-EPE3QKDE.js +0 -1912
  152. package/skills/ae-analysis/references/create_metric.md +0 -58
  153. package/skills/ae-analysis/references/create_virtual_event.md +0 -60
  154. package/skills/ae-analysis/references/create_virtual_property.md +0 -69
  155. package/skills/ae-analysis/references/delete_metric.md +0 -32
  156. package/skills/ae-analysis/references/drilldown_users_export.md +0 -17
  157. package/skills/ae-analysis/references/drilldown_users_run.md +0 -61
  158. package/skills/ae-analysis/references/get_metric.md +0 -38
  159. package/skills/ae-analysis/references/get_resource_url.md +0 -33
  160. package/skills/ae-analysis/references/list_events.md +0 -46
  161. package/skills/ae-analysis/references/list_metrics.md +0 -52
  162. package/skills/ae-analysis/references/list_properties.md +0 -47
  163. package/skills/ae-analysis/references/update_metric.md +0 -58
  164. package/dist/{chunk-HL2AJQ4Q.js → chunk-PTE56QPL.js} +3 -3
package/README.md CHANGED
@@ -95,7 +95,7 @@ ae-cli auth logout
95
95
  | `community` | 10+ | Community analysis: posts search, sentiment analysis, topic trends, livestream data |
96
96
  | `analysis_common` | 2 | Cross-module common constraints: resource link completion, project ID gate |
97
97
  | `team` | 14 | AI Agent Team: manage teams (list/create/update/delete/ai-generate/templates/projects) and execute TeamRuns (start/watch/chat/reply/cancel/result/artifacts) |
98
- | `kb` | 10 | Knowledge base lifecycle: query / new / add (md/dir/url) / schema / compile / rm-source / remove; retrieval primitives: index / grep / read |
98
+ | `kb` | 11 | Knowledge base lifecycle: query / new / add (md/dir/url) / schema / compile / rm-source / remove; retrieval primitives: list / index / grep / read |
99
99
  | `auth` / `config` | 2 | Authentication and host configuration |
100
100
 
101
101
  ### kb
@@ -111,8 +111,9 @@ Knowledge base lifecycle (`+new` → `+add` → `+schema` → `+compile` → `+s
111
111
  - **Remove source** (`+rm-source`): `--name`, `--display-name`
112
112
  - **Remove KB** (`+remove`): `--name`
113
113
 
114
- Retrieval primitives for external agents (`+index` → `+grep` → `+read`); these are deterministic file-search endpoints with no server-side LLM, designed for agents (Claude Code / Codex / Cursor) to explore a KB the way they explore a codebase:
114
+ Retrieval primitives for external agents (`+list` → `+index` → `+grep` → `+read`); these are deterministic file-search endpoints with no server-side LLM, designed for agents (Claude Code / Codex / Cursor) to explore a KB the way they explore a codebase:
115
115
 
116
+ - **List** (`+list`): optional `--build-status` (default `compiled`), optional `--locale`. Returns accessible knowledge base metadata including `buildStatus`, without `index.md` navigation maps.
116
117
  - **Index** (`+index`): optional `--sources` JSON refs (omit to list all accessible KBs), optional `--locale`. Returns each KB's metadata plus its `index.md` navigation map.
117
118
  - **Grep** (`+grep`): `--query` / `-q`, optional `--sources`, `--top-k` (1-50, default 10), `--locale`. Returns matched lines with path, line number, breadcrumb and context snippet.
118
119
  - **Read** (`+read`): `--source` JSON ref (exactly one KB), `--path` (page path relative to the KB root), optional `--offset` / `--limit` (line window), `--locale`. Returns the full page or a line window.
package/README.zh.md CHANGED
@@ -96,7 +96,7 @@ ae-cli auth logout
96
96
  | `analysis_common` | 2 | 跨模块通用约束:资源链接补全、项目 ID 门控 |
97
97
  | `agent` | 15 | Agent 平台资源管理:模型、MCP 服务、Skill、附件库的增删查和启停 |
98
98
  | `team` | 14 | AI Agent Team:团队管理(列表/创建/更新/删除/AI生成/模板/项目)和 TeamRun 执行(启动/监听/对话/回复/取消/结果/产物) |
99
- | `kb` | 10 | 知识库生命周期:查询 / 新建 / 添加源(md/目录/url)/ schema / 编译 / 删除源 / 删除;检索原语:index / grep / read |
99
+ | `kb` | 11 | 知识库生命周期:查询 / 新建 / 添加源(md/目录/url)/ schema / 编译 / 删除源 / 删除;检索原语:list / index / grep / read |
100
100
  | `auth` / `config` | 2 | 身份验证和主机配置 |
101
101
 
102
102
  ### kb(知识库)
@@ -112,8 +112,9 @@ ae-cli auth logout
112
112
  - **删除源** (`+rm-source`):`--name`,`--display-name`
113
113
  - **删除知识库** (`+remove`):`--name`
114
114
 
115
- 面向外部 agent 的检索原语(`+index` → `+grep` → `+read`);均为确定性文件检索端点、服务端零 LLM 调用,让 agent(Claude Code / Codex / Cursor)像翻代码库一样探索知识库:
115
+ 面向外部 agent 的检索原语(`+list` → `+index` → `+grep` → `+read`);均为确定性文件检索端点、服务端零 LLM 调用,让 agent(Claude Code / Codex / Cursor)像翻代码库一样探索知识库:
116
116
 
117
+ - **列表** (`+list`):可选 `--build-status`(默认 `compiled`)、`--locale`。返回可访问知识库的元信息(含 `buildStatus`),不含 `index.md` 导航地图。
117
118
  - **索引** (`+index`):可选 `--sources` JSON 引用(省略则列出全部可访问知识库),可选 `--locale`。返回每个知识库的元信息及其 `index.md` 导航地图。
118
119
  - **检索** (`+grep`):`--query` / `-q`,可选 `--sources`、`--top-k`(1-50,默认 10)、`--locale`。返回命中行的路径、行号、面包屑与上下文片段。
119
120
  - **读取** (`+read`):`--source` JSON 引用(精确指向一个知识库),`--path`(相对知识库根目录的页面路径),可选 `--offset` / `--limit`(行窗口)、`--locale`。返回页面全文或行窗口。
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-OO6XR6LK.js";
5
5
  import {
6
6
  findGatewayDomain
7
- } from "./chunk-HL2AJQ4Q.js";
7
+ } from "./chunk-PTE56QPL.js";
8
8
  import {
9
9
  CapabilityGatewayError,
10
10
  dryRunCapability,
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-OO6XR6LK.js";
5
5
  import {
6
6
  findGatewayDomain
7
- } from "./chunk-HL2AJQ4Q.js";
7
+ } from "./chunk-PTE56QPL.js";
8
8
  import {
9
9
  CapabilityGatewayError,
10
10
  dryRunCapability,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveGatewayDomain
3
- } from "./chunk-HL2AJQ4Q.js";
3
+ } from "./chunk-PTE56QPL.js";
4
4
  import {
5
5
  dryRunCapability,
6
6
  executeCapabilityWithEnvelope,
@@ -22,6 +22,9 @@ function createCapabilityCommand(config) {
22
22
  flags: config.flags,
23
23
  risk: config.risk,
24
24
  validate: config.validate,
25
+ preflight: (ctx) => {
26
+ config.buildInput(ctx);
27
+ },
25
28
  validateInput: async (ctx) => {
26
29
  const gatewayDomain = resolveGatewayDomain(config.cliService, config.gatewayDomain);
27
30
  const requestHost = config.requestHost ?? ctx.host();
@@ -40,7 +43,7 @@ function createCapabilityCommand(config) {
40
43
  const input = withLifecycleRequestId(config, config.buildInput(ctx));
41
44
  announceDispatch(config.capabilityId, input);
42
45
  const result = await executeCapabilityWithEnvelope(requestHost, gatewayDomain, config.capabilityId, input);
43
- const data = config.postProcess ? config.postProcess(result.data, input) : result.data;
46
+ const data = config.postProcess ? config.postProcess(result.data, input, ctx) : result.data;
44
47
  return withOutputMetadata(data, result.meta);
45
48
  }
46
49
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveGatewayDomain
3
- } from "./chunk-HL2AJQ4Q.js";
3
+ } from "./chunk-PTE56QPL.js";
4
4
  import {
5
5
  dryRunCapability,
6
6
  executeCapabilityWithEnvelope,
@@ -22,6 +22,9 @@ function createCapabilityCommand(config) {
22
22
  flags: config.flags,
23
23
  risk: config.risk,
24
24
  validate: config.validate,
25
+ preflight: (ctx) => {
26
+ config.buildInput(ctx);
27
+ },
25
28
  validateInput: async (ctx) => {
26
29
  const gatewayDomain = resolveGatewayDomain(config.cliService, config.gatewayDomain);
27
30
  const requestHost = config.requestHost ?? ctx.host();
@@ -40,7 +43,7 @@ function createCapabilityCommand(config) {
40
43
  const input = withLifecycleRequestId(config, config.buildInput(ctx));
41
44
  announceDispatch(config.capabilityId, input);
42
45
  const result = await executeCapabilityWithEnvelope(requestHost, gatewayDomain, config.capabilityId, input);
43
- const data = config.postProcess ? config.postProcess(result.data, input) : result.data;
46
+ const data = config.postProcess ? config.postProcess(result.data, input, ctx) : result.data;
44
47
  return withOutputMetadata(data, result.meta);
45
48
  }
46
49
  };
package/dist/index.js CHANGED
@@ -38,27 +38,42 @@ import { createRequire } from "module";
38
38
 
39
39
  // src/framework/runner.ts
40
40
  import * as readline from "readline";
41
+ function missingRequiredFlagsError(cmdName, missing) {
42
+ const names = missing.map((flag) => `--${flag.name}`);
43
+ const message = missing.length === 1 ? `Missing required flag: ${names[0]}` : `Missing required flags: ${names.join(", ")}`;
44
+ const hintParts = missing.map((flag) => flag.hint?.trim()).filter((hint2) => Boolean(hint2));
45
+ const hint = hintParts.length > 0 ? hintParts.join(" ") : `Usage: ae-cli ${cmdName} ${names.map((name) => `${name} <value>`).join(" ")}`;
46
+ return { message, hint };
47
+ }
41
48
  async function runCommand(cmd, opts, globalOpts) {
42
49
  try {
43
50
  const ctx = createRuntimeContext(cmd, opts, globalOpts);
44
51
  const cmdName = cmd.resource ? `${cmd.service} ${cmd.resource} ${cmd.command}` : `${cmd.service} ${cmd.command}`;
45
52
  logger.command(cmdName, opts);
46
- for (const flag of cmd.flags) {
47
- if (flag.required) {
48
- const val = opts[camelCase(flag.name)];
49
- if (val === void 0 || val === null || val === "") {
50
- printError("validation", `Missing required flag: --${flag.name}`, `Usage: ae-cli ${cmdName} --${flag.name} <value>`);
51
- process.exit(1);
52
- }
53
- }
53
+ const missingRequired = cmd.flags.filter((flag) => {
54
+ if (!flag.required) return false;
55
+ const val = opts[camelCase(flag.name)];
56
+ return val === void 0 || val === null || val === "";
57
+ });
58
+ if (missingRequired.length > 0) {
59
+ const { message, hint } = missingRequiredFlagsError(cmdName, missingRequired);
60
+ printError("validation", message, hint);
61
+ process.exit(1);
54
62
  }
55
63
  if (cmd.validate) {
56
64
  cmd.validate(ctx);
57
65
  }
58
66
  const LIMIT_FLAG_PATTERNS = [/limit/i, /page_size/i, /pagesize/i, /row_limit/i, /block_limit/i, /top[-_]?k/i];
59
67
  for (const flag of cmd.flags) {
60
- if (flag.type !== "number") continue;
61
68
  const val = opts[camelCase(flag.name)];
69
+ if (flag.type === "boolean") {
70
+ if (val !== void 0 && typeof val !== "boolean") {
71
+ printError("validation", `Invalid boolean for --${flag.name}: ${val}. Use true/false.`);
72
+ process.exit(1);
73
+ }
74
+ continue;
75
+ }
76
+ if (flag.type !== "number") continue;
62
77
  if (val === void 0 || val === null || val === "") continue;
63
78
  const num = Number(val);
64
79
  if (!Number.isFinite(num)) {
@@ -113,11 +128,14 @@ async function runCommand(cmd, opts, globalOpts) {
113
128
  }
114
129
  return;
115
130
  }
116
- if (requiresConfirmation(cmd.risk) && !globalOpts.yes) {
117
- const confirmed = await confirm(`This is a high-risk-write operation (${cmdName}). Continue?`);
118
- if (!confirmed) {
119
- process.stderr.write("Aborted.\n");
120
- process.exit(0);
131
+ if (requiresConfirmation(cmd.risk)) {
132
+ cmd.preflight?.(ctx);
133
+ if (!globalOpts.yes) {
134
+ const confirmed = await confirm(`This is a high-risk-write operation (${cmdName}). Continue?`);
135
+ if (!confirmed) {
136
+ process.stderr.write("Aborted.\n");
137
+ process.exit(0);
138
+ }
121
139
  }
122
140
  }
123
141
  const result = await cmd.execute(ctx);
@@ -154,6 +172,9 @@ async function runCommand(cmd, opts, globalOpts) {
154
172
  }
155
173
  }
156
174
  function capabilityGatewayHint(err) {
175
+ if (err.code === "UPLOAD_NOT_EXIST" && (err.meta?.capability_id === "engage-setting.config-table.save" || err.meta?.capability_id === "engage-setting.config-table.update-data")) {
176
+ return "Run config-table upload first with the same --project-id and --request-id, then retry this command within 10 minutes. The upload cache is consumed after a successful save/update.";
177
+ }
157
178
  if (err.code === "CAPABILITY_NOT_FOUND") {
158
179
  return "The current host does not expose this capability. Do not retry with different parameters; use a supported command path or ask the platform/backend owner to enable the capability.";
159
180
  }
@@ -320,7 +341,7 @@ function parseBooleanValue(value, flagName) {
320
341
  if (normalized === "false" || normalized === "0" || normalized === "no" || normalized === "n" || normalized === "off") {
321
342
  return false;
322
343
  }
323
- throw new Error(`Invalid boolean for --${flagName}: ${value}. Use true/false.`);
344
+ return value;
324
345
  }
325
346
  function extractGlobalOptions(program2) {
326
347
  const opts = program2.opts();
@@ -1093,7 +1114,8 @@ async function writeDraftXlsx(d, outPath, locale = "zh") {
1093
1114
 
1094
1115
  // src/core/tracking-client.ts
1095
1116
  var DEBUG_BASE = "/v1/ta/bury/manage/debug";
1096
- var TRACK_CAPABILITY_DOMAIN = "analysis";
1117
+ var TRACK_LOCAL_HOST = "http://localhost:8992";
1118
+ var TRACK_CAPABILITY_DOMAIN = "";
1097
1119
  var TRACK_PROGRAM_QUERY = "track.program.query";
1098
1120
  var TRACK_PROGRAM_DELETE = "track.program.delete";
1099
1121
  var TRACK_PROGRAM_EXCEL_SAVE = "track.program.excel_save";
@@ -1312,7 +1334,7 @@ var TrackingClient = class {
1312
1334
  }
1313
1335
  };
1314
1336
  async function createTrackingClient(host) {
1315
- return new TrackingClient(host);
1337
+ return new TrackingClient(TRACK_LOCAL_HOST);
1316
1338
  }
1317
1339
 
1318
1340
  // src/tracking/te-plan/fetch.ts
@@ -3071,22 +3093,22 @@ program.name("ae-cli").version(version).description("CLI tool for ThinkingAI (AE
3071
3093
  async function loadCommands() {
3072
3094
  const commands = [];
3073
3095
  try {
3074
- const teAnalysis = await import("./te-analysis-NJGNWZFC.js");
3096
+ const teAnalysis = await import("./te-analysis-PUVF5IF4.js");
3075
3097
  commands.push(...teAnalysis.default);
3076
3098
  } catch {
3077
3099
  }
3078
3100
  try {
3079
- const teMeta = await import("./te-meta-MAAUHFQO.js");
3101
+ const teMeta = await import("./te-meta-UUROEODR.js");
3080
3102
  commands.push(...teMeta.default);
3081
3103
  } catch {
3082
3104
  }
3083
3105
  try {
3084
- const teCommon = await import("./te-common-7VTJZPII.js");
3106
+ const teCommon = await import("./te-common-VUX3VOXZ.js");
3085
3107
  commands.push(...teCommon.default);
3086
3108
  } catch {
3087
3109
  }
3088
3110
  try {
3089
- const engage = await import("./te-engage-BUWVSSSK.js");
3111
+ const engage = await import("./te-engage-QBCCME22.js");
3090
3112
  commands.push(...engage.default);
3091
3113
  } catch {
3092
3114
  }
@@ -3101,7 +3123,7 @@ async function loadCommands() {
3101
3123
  } catch {
3102
3124
  }
3103
3125
  try {
3104
- const teKb = await import("./te-kb-NT33UHAE.js");
3126
+ const teKb = await import("./te-kb-AYCODNU6.js");
3105
3127
  commands.push(...teKb.default);
3106
3128
  } catch {
3107
3129
  }
@@ -3116,7 +3138,7 @@ async function loadCommands() {
3116
3138
  } catch {
3117
3139
  }
3118
3140
  try {
3119
- const metadata = await import("./metadata-W6JFFMBA.js");
3141
+ const metadata = await import("./metadata-FCLDBXX2.js");
3120
3142
  commands.push(...metadata.default);
3121
3143
  } catch {
3122
3144
  }
@@ -3145,7 +3167,7 @@ async function registerApiCommand() {
3145
3167
  }
3146
3168
  async function registerCapabilityCommands() {
3147
3169
  try {
3148
- const { registerCapability } = await import("./capability-SEH3JWLN.js");
3170
+ const { registerCapability } = await import("./capability-SCRFGODD.js");
3149
3171
  registerCapability(program);
3150
3172
  } catch {
3151
3173
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createCapabilityCommand
3
- } from "./chunk-N2QORU5D.js";
3
+ } from "./chunk-7OLGDQQ2.js";
4
4
  import {
5
5
  registerCapabilityGatewayRoute
6
- } from "./chunk-HL2AJQ4Q.js";
6
+ } from "./chunk-PTE56QPL.js";
7
7
  import "./chunk-DYOS6YY7.js";
8
8
  import "./chunk-TNW2CI4W.js";
9
9
  import "./chunk-NOO24N7W.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createCapabilityCommand
3
- } from "./chunk-TKQJQXWT.js";
3
+ } from "./chunk-TBHBYKXZ.js";
4
4
  import {
5
5
  registerCapabilityGatewayRoute
6
- } from "./chunk-HL2AJQ4Q.js";
6
+ } from "./chunk-PTE56QPL.js";
7
7
  import "./chunk-I4A62X3N.js";
8
8
  import "./chunk-TNW2CI4W.js";
9
9
  import "./chunk-NOO24N7W.js";