@thinkingai/ae-cli 6.1.10 → 6.1.11

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 (225) hide show
  1. package/README.md +25 -3
  2. package/README.zh.md +25 -3
  3. package/dist/{auth-56Z45UVR.js → auth-GDV3H5I4.js} +18 -8
  4. package/dist/{auth-ENM3FE6L.js → auth-NN55553T.js} +3 -3
  5. package/dist/{capability-2H6PAOA3.js → capability-TPORIKRQ.js} +19 -15
  6. package/dist/{capability-YPOQX6PL.js → capability-VQNC5CF7.js} +19 -15
  7. package/dist/chunk-4NN5IWVN.js +26 -0
  8. package/dist/{chunk-DB4Q3ANU.js → chunk-6A2FUCIS.js} +3 -3
  9. package/dist/{chunk-PVBYJWC2.js → chunk-7KQWSBSL.js} +4 -4
  10. package/dist/{chunk-24BAVOX3.js → chunk-AXDXJTPC.js} +3 -1
  11. package/dist/{chunk-CPVTECJ3.js → chunk-DT6Y3TD7.js} +5 -5
  12. package/dist/{chunk-EGEIXA2Z.js → chunk-DWO43OIB.js} +0 -248
  13. package/dist/{chunk-V6FR6WTW.js → chunk-GJJA4CQZ.js} +34 -2
  14. package/dist/{chunk-RGXCNC4N.js → chunk-GS2P7LFD.js} +50 -17
  15. package/dist/{chunk-LYVNONC4.js → chunk-JHENBQ5B.js} +35 -0
  16. package/dist/{chunk-3P3562ZX.js → chunk-MVDZ7DBQ.js} +5 -5
  17. package/dist/{chunk-LCXU3AAT.js → chunk-NBPKWKRA.js} +2 -2
  18. package/dist/{chunk-HQ2A7ITL.js → chunk-RBNKI5ZW.js} +50 -17
  19. package/dist/{chunk-LHVM35J4.js → chunk-TS6BUGUY.js} +4 -4
  20. package/dist/chunk-TUKQZTMI.js +250 -0
  21. package/dist/{chunk-J7MZHDHQ.js → chunk-VKD5WQKN.js} +5 -5
  22. package/dist/{chunk-3KI3RRXX.js → chunk-VTXHDCBW.js} +3 -3
  23. package/dist/{chunk-KTYR3U6D.js → chunk-YTG6Q75E.js} +10 -6
  24. package/dist/{chunk-IR4ZLVPW.js → chunk-YV52FB5G.js} +25 -3
  25. package/dist/{chunk-E7UXXHO3.js → chunk-Z3OXWCIA.js} +3 -3
  26. package/dist/{cli-token-4SBMXAUK.js → cli-token-GL5MS5FK.js} +4 -4
  27. package/dist/{client-PP5FETMW.js → client-DAIPF7XN.js} +4 -4
  28. package/dist/{community-report-client-KK2QBANO.js → community-report-client-M2RW4MXD.js} +2 -2
  29. package/dist/config-4VZNLBKF.js +489 -0
  30. package/dist/index.js +94 -35
  31. package/dist/memory-RWJW4XFO.js +892 -0
  32. package/dist/memory-VO2ZJCRT.js +892 -0
  33. package/dist/{metadata-JIQ77HFY.js → metadata-YGTHR2XJ.js} +8 -8
  34. package/dist/{metadata-AN3YFZEV.js → metadata-ZRN2GHPN.js} +8 -8
  35. package/dist/{model-JASQVOFD.js → model-CLUIK3K5.js} +7 -5
  36. package/dist/{raw-XJCAT3HX.js → raw-52B4UKO4.js} +8 -7
  37. package/dist/sync-3REDHGY6.js +10259 -0
  38. package/dist/{te-agent-JHUG6DVV.js → te-agent-XNPELAKX.js} +580 -84
  39. package/dist/{te-analysis-ITKTO6JS.js → te-analysis-GJI5FZUL.js} +1152 -13
  40. package/dist/{te-analysis-RAC67YYD.js → te-analysis-N2BRDJZ5.js} +1152 -13
  41. package/dist/{te-community-QOYIYEJI.js → te-community-SQXKE5OO.js} +7 -7
  42. package/dist/{te-community-UFKI6ONP.js → te-community-TYSNU3NQ.js} +7 -7
  43. package/dist/{te-dataops-PZQ5NQLY.js → te-dataops-5TM7WZDI.js} +370 -189
  44. package/dist/{te-dataops-XTWVTJCA.js → te-dataops-OWIADNSM.js} +370 -189
  45. package/dist/{te-engage-NLZUPSBK.js → te-engage-F7V55KVW.js} +333 -105
  46. package/dist/{te-engage-E7F4HTXU.js → te-engage-FMYAYCNV.js} +333 -105
  47. package/dist/{te-experiment-N63WF7XA.js → te-experiment-JWXOYJ3W.js} +83 -10
  48. package/dist/{te-experiment-D32TB6ZB.js → te-experiment-UPDMHCAJ.js} +83 -10
  49. package/dist/{te-kb-E7NSCBRB.js → te-kb-VRMEY3D4.js} +6 -6
  50. package/dist/{te-meta-GBDTMPEL.js → te-meta-53BVXPFI.js} +7 -7
  51. package/dist/{te-meta-ZTLTSHXC.js → te-meta-TOCBPBXI.js} +7 -7
  52. package/dist/{te-system-AH7DMCAQ.js → te-system-XGS5EQIQ.js} +4 -4
  53. package/dist/{te-team-BQ3SKSZV.js → te-team-BZRDV2CM.js} +7 -7
  54. package/dist/{update-DKG6UXEM.js → update-HEDXGOJH.js} +8 -6
  55. package/package.json +4 -1
  56. package/skills/ae-agent/SKILL.md +178 -16
  57. package/skills/ae-agent/references/add-skill.md +22 -10
  58. package/skills/ae-agent/references/edit-skill.md +24 -14
  59. package/skills/ae-agent/references/find-archived-conversations.md +82 -0
  60. package/skills/ae-agent/references/restore-conversation.md +54 -0
  61. package/skills/ae-agent/references/upload-skill.md +24 -14
  62. package/skills/ae-analysis/SKILL.md +1 -1
  63. package/skills/ae-analysis/references/command_index.md +104 -42
  64. package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
  65. package/skills/ae-analysis/references/project_access_detail_get.md +3 -3
  66. package/skills/ae-analysis/references/project_data_power_delete.md +3 -3
  67. package/skills/ae-analysis/references/project_data_power_get.md +3 -3
  68. package/skills/ae-analysis/references/project_data_power_list.md +3 -3
  69. package/skills/ae-analysis/references/project_data_power_upsert.md +3 -3
  70. package/skills/ae-analysis/references/project_entity_create.md +3 -3
  71. package/skills/ae-analysis/references/project_entity_delete.md +3 -3
  72. package/skills/ae-analysis/references/project_entity_event_list.md +3 -3
  73. package/skills/ae-analysis/references/project_entity_get.md +3 -3
  74. package/skills/ae-analysis/references/project_entity_list.md +3 -3
  75. package/skills/ae-analysis/references/project_entity_update.md +3 -3
  76. package/skills/ae-analysis/references/project_function_list.md +3 -3
  77. package/skills/ae-analysis/references/project_info_create.md +25 -0
  78. package/skills/ae-analysis/references/project_info_delete.md +24 -0
  79. package/skills/ae-analysis/references/project_info_get.md +3 -3
  80. package/skills/ae-analysis/references/project_info_list.md +3 -3
  81. package/skills/ae-analysis/references/project_info_update.md +3 -3
  82. package/skills/ae-analysis/references/project_mark_time_create.md +3 -3
  83. package/skills/ae-analysis/references/project_mark_time_delete.md +3 -3
  84. package/skills/ae-analysis/references/project_mark_time_list.md +3 -3
  85. package/skills/ae-analysis/references/project_mark_time_update.md +3 -3
  86. package/skills/ae-analysis/references/project_member_add.md +3 -3
  87. package/skills/ae-analysis/references/project_member_batch_update.md +3 -3
  88. package/skills/ae-analysis/references/project_member_candidate_list.md +3 -3
  89. package/skills/ae-analysis/references/project_member_handover_export.md +3 -3
  90. package/skills/ae-analysis/references/project_member_handover_run.md +3 -3
  91. package/skills/ae-analysis/references/project_member_import.md +3 -3
  92. package/skills/ae-analysis/references/project_member_list.md +3 -3
  93. package/skills/ae-analysis/references/project_member_receiver_list.md +3 -3
  94. package/skills/ae-analysis/references/project_member_remove.md +3 -3
  95. package/skills/ae-analysis/references/project_member_update.md +3 -3
  96. package/skills/ae-analysis/references/project_owner_update.md +3 -3
  97. package/skills/ae-analysis/references/project_permission_binding_list.md +3 -3
  98. package/skills/ae-analysis/references/project_receive_status_update.md +3 -3
  99. package/skills/ae-analysis/references/project_role_delete.md +3 -3
  100. package/skills/ae-analysis/references/project_role_function_list.md +3 -3
  101. package/skills/ae-analysis/references/project_role_get.md +3 -3
  102. package/skills/ae-analysis/references/project_role_list.md +3 -3
  103. package/skills/ae-analysis/references/project_role_upsert.md +3 -3
  104. package/skills/ae-analysis/references/project_role_user_list.md +3 -3
  105. package/skills/ae-analysis/references/project_space_list.md +1 -1
  106. package/skills/ae-analysis/references/project_timezone_get.md +3 -3
  107. package/skills/ae-analysis/references/project_timezone_overview.md +3 -3
  108. package/skills/ae-analysis/references/project_timezone_update.md +3 -3
  109. package/skills/ae-analysis/references/project_user_id_items_update.md +3 -3
  110. package/skills/ae-analysis/references/system_admin_function_list.md +22 -0
  111. package/skills/ae-analysis/references/system_admin_function_update.md +26 -0
  112. package/skills/ae-analysis/references/system_admin_list.md +21 -0
  113. package/skills/ae-analysis/references/system_admin_remove.md +25 -0
  114. package/skills/ae-analysis/references/system_admin_upsert.md +25 -0
  115. package/skills/ae-analysis/references/system_function_list.md +21 -0
  116. package/skills/ae-analysis/references/system_member_add.md +25 -0
  117. package/skills/ae-analysis/references/system_member_candidate_list.md +22 -0
  118. package/skills/ae-analysis/references/system_member_delete.md +25 -0
  119. package/skills/ae-analysis/references/system_member_list.md +24 -0
  120. package/skills/ae-analysis/references/system_member_mfa_unbind.md +25 -0
  121. package/skills/ae-analysis/references/system_member_password_reset.md +32 -0
  122. package/skills/ae-analysis/references/system_member_project_batch_update.md +27 -0
  123. package/skills/ae-analysis/references/system_member_status_update.md +26 -0
  124. package/skills/ae-analysis/references/system_member_update.md +23 -0
  125. package/skills/ae-analysis/references/system_mfa_get.md +21 -0
  126. package/skills/ae-analysis/references/system_mfa_update.md +25 -0
  127. package/skills/ae-analysis/references/system_node_monitor_list.md +24 -0
  128. package/skills/ae-analysis/references/system_oauth2_update.md +22 -0
  129. package/skills/ae-analysis/references/system_ops_alert_contact_delete.md +25 -0
  130. package/skills/ae-analysis/references/system_ops_alert_contact_list.md +23 -0
  131. package/skills/ae-analysis/references/system_ops_alert_contact_test.md +29 -0
  132. package/skills/ae-analysis/references/system_ops_alert_contact_upsert.md +39 -0
  133. package/skills/ae-analysis/references/system_preference_get.md +21 -0
  134. package/skills/ae-analysis/references/system_preference_update.md +22 -0
  135. package/skills/ae-analysis/references/system_project_usage_list.md +28 -0
  136. package/skills/ae-analysis/references/system_query_alert_rule_list.md +21 -0
  137. package/skills/ae-analysis/references/system_query_alert_rule_update.md +26 -0
  138. package/skills/ae-analysis/references/system_query_monitor_overview.md +26 -0
  139. package/skills/ae-analysis/references/system_query_task_cancel.md +25 -0
  140. package/skills/ae-analysis/references/system_query_task_export.md +49 -0
  141. package/skills/ae-analysis/references/system_query_task_get.md +23 -0
  142. package/skills/ae-analysis/references/system_query_task_list.md +35 -0
  143. package/skills/ae-analysis/references/system_query_task_options.md +27 -0
  144. package/skills/ae-analysis/references/system_receiver_address_delete.md +26 -0
  145. package/skills/ae-analysis/references/system_receiver_address_overview.md +21 -0
  146. package/skills/ae-analysis/references/system_receiver_address_project_list.md +21 -0
  147. package/skills/ae-analysis/references/system_receiver_address_promote.md +24 -0
  148. package/skills/ae-analysis/references/system_receiver_address_upsert.md +27 -0
  149. package/skills/ae-analysis/references/system_receiver_detection_get.md +22 -0
  150. package/skills/ae-analysis/references/system_receiver_detection_run.md +22 -0
  151. package/skills/ae-analysis/references/system_receiver_detection_update.md +25 -0
  152. package/skills/ae-analysis/references/system_role_delete.md +26 -0
  153. package/skills/ae-analysis/references/system_role_function_list.md +22 -0
  154. package/skills/ae-analysis/references/system_role_get.md +22 -0
  155. package/skills/ae-analysis/references/system_role_list.md +24 -0
  156. package/skills/ae-analysis/references/system_role_upsert.md +27 -0
  157. package/skills/ae-analysis/references/system_role_user_list.md +22 -0
  158. package/skills/ae-analysis/references/system_seat_list.md +25 -0
  159. package/skills/ae-analysis/references/system_seat_update.md +26 -0
  160. package/skills/ae-analysis/references/system_smtp_delete.md +24 -0
  161. package/skills/ae-analysis/references/system_smtp_get.md +21 -0
  162. package/skills/ae-analysis/references/system_smtp_test.md +22 -0
  163. package/skills/ae-analysis/references/system_smtp_upsert.md +31 -0
  164. package/skills/ae-analysis/references/system_third_party_login_disable.md +25 -0
  165. package/skills/ae-analysis/references/system_third_party_login_list.md +21 -0
  166. package/skills/ae-analysis/references/system_third_party_login_upsert.md +33 -0
  167. package/skills/ae-analysis/references/system_usage_overview.md +21 -0
  168. package/skills/ae-analysis/references/system_usage_trend_export.md +44 -0
  169. package/skills/ae-analysis/references/system_usage_trend_query.md +28 -0
  170. package/skills/ae-dataops/SKILL.md +1 -1
  171. package/skills/ae-dataops/references/dataops-flow-create.md +51 -16
  172. package/skills/ae-engage/SKILL.md +56 -26
  173. package/skills/ae-engage/references/activity-activity.md +3 -0
  174. package/skills/ae-engage/references/activity-approval.md +12 -4
  175. package/skills/ae-engage/references/activity-task.md +21 -6
  176. package/skills/ae-engage/references/activity-topic.md +31 -13
  177. package/skills/ae-engage/references/add-channel.md +170 -41
  178. package/skills/ae-engage/references/build-task-save-guide.md +40 -27
  179. package/skills/ae-engage/references/channel-update-config.md +3 -2
  180. package/skills/ae-engage/references/common-metric.md +48 -120
  181. package/skills/ae-engage/references/flow-detail.md +13 -0
  182. package/skills/ae-engage/references/preset-event.md +12 -32
  183. package/skills/ae-engage/references/save-flow.md +127 -64
  184. package/skills/ae-engage/references/save-task.md +197 -59
  185. package/skills/ae-engage/references/scene-config-metric.md +3 -0
  186. package/skills/ae-engage/references/scene-preset-metric.md +8 -37
  187. package/skills/ae-engage/references/scene-strategy-audience.md +51 -643
  188. package/skills/ae-engage/references/scene-strategy.md +6 -6
  189. package/skills/ae-engage/references/task-detail.md +10 -0
  190. package/skills/ae-engage/references/task-submit-approval.md +45 -0
  191. package/skills/ae-engage/references/validate-flow-node-config.md +1 -1
  192. package/skills/ae-experiment/SKILL.md +21 -1
  193. package/skills/ae-experiment/references/check_experiment_ready.md +2 -0
  194. package/skills/ae-experiment/references/query_experiment_detail.md +6 -0
  195. package/skills/ae-experiment/references/query_experiment_list.md +4 -0
  196. package/skills/ae-experiment/references/query_experiment_list_archived.md +3 -0
  197. package/skills/ae-experiment/references/query_metric_detail.md +5 -0
  198. package/skills/ae-experiment/references/query_metric_list.md +3 -0
  199. package/skills/ae-experiment/references/save_experiment.md +46 -3
  200. package/skills/ae-experiment/references/save_metric.md +62 -0
  201. package/skills/ae-experiment/references/save_submit_experiment.md +3 -0
  202. package/skills/ae-experiment-design/SKILL.md +149 -0
  203. package/skills/ae-experiment-design/agents/openai.yaml +4 -0
  204. package/skills/ae-experiment-design/references/client-experiment-sdk.md +147 -0
  205. package/skills/ae-experiment-design/references/experiment-creation.md +108 -0
  206. package/skills/ae-experiment-design/references/experiment-sdk-contract.md +100 -0
  207. package/skills/ae-experiment-design/references/exposure-contract.md +91 -0
  208. package/skills/ae-experiment-design/references/hybrid-experiment-sdk.md +74 -0
  209. package/skills/ae-experiment-design/references/metric-readiness.md +143 -0
  210. package/skills/ae-experiment-design/references/platform-operations.md +99 -0
  211. package/skills/ae-experiment-design/references/sdk-index.md +76 -0
  212. package/skills/ae-experiment-design/references/sdk-integration.md +114 -0
  213. package/skills/ae-experiment-design/references/sdk-troubleshooting.md +139 -0
  214. package/skills/ae-experiment-design/references/server-experiment-sdk.md +78 -0
  215. package/skills/ae-experiment-design/scripts/calculate_experiment_plan.py +450 -0
  216. package/skills/ae-experiment-insight/SKILL.md +149 -0
  217. package/skills/ae-experiment-insight/agents/openai.yaml +4 -0
  218. package/skills/ae-experiment-insight/references/decision-framework.md +69 -0
  219. package/skills/ae-experiment-insight/references/diagnostic-playbook.md +225 -0
  220. package/skills/ae-experiment-insight/references/platform-operations.md +76 -0
  221. package/skills/ae-experiment-insight/scripts/analyze_experiment.py +478 -0
  222. package/skills/ae-generate-tracking-code/SKILL.md +2 -2
  223. package/skills/ae-metadata/SKILL.md +1 -1
  224. package/dist/config-BSSALXEN.js +0 -128
  225. package/dist/sync-QFP4XFN3.js +0 -485
package/README.md CHANGED
@@ -29,6 +29,14 @@ npx -y skills add ThinkingAIAgenticEngine/ae-cli -g -y
29
29
 
30
30
  The Skills teach supported coding Agents, including Claude Code, Codex, Cursor, and similar tools, how to discover and call `ae-cli`.
31
31
 
32
+ Install optional, approved scenario Skills with an interactive category picker:
33
+
34
+ ```bash
35
+ npx skills@latest add ThinkingAIAgenticEngine/scenario-skills
36
+ ```
37
+
38
+ See the [scenario-skills repository](https://github.com/ThinkingAIAgenticEngine/scenario-skills) for version-specific and non-interactive installation.
39
+
32
40
  Log in to an AE environment:
33
41
 
34
42
  ```bash
@@ -36,6 +44,8 @@ ae-cli auth login --host https://your-ae-host.example.com
36
44
  ae-cli auth status
37
45
  ```
38
46
 
47
+ Use the AE URL supplied by your AgenticEngine administrator. If no Host is configured, `ae-cli` guides existing customers to obtain that URL first. Only users without an AgenticEngine environment are directed to [request a trial](https://thinkingai.cn/request-demo).
48
+
39
49
  ## Environment-Bound Updates
40
50
 
41
51
  Each AE environment returns the exact `aeCliVersion` it expects. Use the unified update command to install that CLI version and its matching Skills:
@@ -65,10 +75,15 @@ ae-cli --no-update-check capability list --domain analysis
65
75
  ## Quick Start
66
76
 
67
77
  ```bash
68
- # List and switch configured environments
78
+ # Open the interactive environment manager
79
+ ae-cli config
80
+
81
+ # Or manage environments non-interactively
69
82
  ae-cli config list
83
+ ae-cli --format table config list
70
84
  ae-cli config current
71
- ae-cli config use https://your-ae-host.example.com
85
+ ae-cli config add https://your-ae-host.example.com --label production --use
86
+ ae-cli config use production
72
87
 
73
88
  # Discover capabilities exposed by the host
74
89
  ae-cli capability list --domain analysis
@@ -134,6 +149,8 @@ Gateway-backed features follow the [Capability command admission rules](docs/cap
134
149
  ## Authentication and Environments
135
150
 
136
151
  Credentials are stored per host. Switching environments does not reuse a token from another host.
152
+ Run `ae-cli config` in a terminal to add, activate, rename, or remove environments interactively.
153
+ For scripts and agents, use the non-interactive subcommands:
137
154
 
138
155
  ```bash
139
156
  ae-cli auth login --host https://host-a.example.com
@@ -142,11 +159,16 @@ ae-cli auth logout --host https://host-a.example.com
142
159
 
143
160
  ae-cli config list
144
161
  ae-cli config current
145
- ae-cli config set-host https://host-b.example.com --label staging
162
+ ae-cli config add https://host-b.example.com --label staging
146
163
  ae-cli config use staging
164
+ ae-cli config rename staging pre-production
165
+ ae-cli config remove pre-production --yes
147
166
  ```
148
167
 
168
+ `<env>` accepts either an exact URL or a unique label. The active environment is clearly marked in the interactive manager and in `config list`. Removing an active environment is rejected while other environments remain; switch first so replacement is explicit. `config set-host` remains available as a compatibility command that adds or updates a host and activates it.
169
+
149
170
  Login uses a cross-platform device-code flow. Use `--no-browser` when the environment cannot open a browser.
171
+ Trial guidance is emitted only when no Host is configured; normal commands and authentication flows for configured environments do not display it.
150
172
 
151
173
  ## Output and Safety
152
174
 
package/README.zh.md CHANGED
@@ -29,6 +29,14 @@ npx -y skills add ThinkingAIAgenticEngine/ae-cli -g -y
29
29
 
30
30
  Skills 会帮助 Claude Code、Codex、Cursor 等编码 Agent 理解、发现并调用 `ae-cli`。
31
31
 
32
+ 按业务分类交互安装可选的已准出场景 Skill:
33
+
34
+ ```bash
35
+ npx skills@latest add ThinkingAIAgenticEngine/scenario-skills
36
+ ```
37
+
38
+ 指定版本或非交互安装方式请查看 [scenario-skills 仓库](https://github.com/ThinkingAIAgenticEngine/scenario-skills)。
39
+
32
40
  登录 AE 环境:
33
41
 
34
42
  ```bash
@@ -36,6 +44,8 @@ ae-cli auth login --host https://your-ae-host.example.com
36
44
  ae-cli auth status
37
45
  ```
38
46
 
47
+ 请使用 AgenticEngine 管理员提供的 AE 地址。未配置 Host 时,`ae-cli` 会先引导已有客户向管理员获取地址;只有确认尚无 AgenticEngine 环境的用户,才会看到[申请试用](https://thinkingai.cn/request-demo)入口。
48
+
39
49
  ## 环境版本同步
40
50
 
41
51
  每个 AE 环境都会返回其要求的精确 `aeCliVersion`。使用统一更新命令安装对应版本的 CLI 和 Skills:
@@ -65,10 +75,15 @@ ae-cli --no-update-check capability list --domain analysis
65
75
  ## 快速开始
66
76
 
67
77
  ```bash
68
- # 查看和切换环境
78
+ # 打开交互式环境管理器
79
+ ae-cli config
80
+
81
+ # 或使用非交互命令管理环境
69
82
  ae-cli config list
83
+ ae-cli --format table config list
70
84
  ae-cli config current
71
- ae-cli config use https://your-ae-host.example.com
85
+ ae-cli config add https://your-ae-host.example.com --label production --use
86
+ ae-cli config use production
72
87
 
73
88
  # 发现当前 Host 暴露的能力
74
89
  ae-cli capability list --domain analysis
@@ -134,6 +149,8 @@ Gateway 命令遵循 [Capability 命令收录规则](docs/capability-command-adm
134
149
  ## 认证与多环境
135
150
 
136
151
  凭证按 Host 独立存储,切换环境不会复用其他 Host 的 token。
152
+ 在终端运行 `ae-cli config`,可以交互式添加、激活、重命名或删除环境。
153
+ 脚本和 Agent 应使用非交互子命令:
137
154
 
138
155
  ```bash
139
156
  ae-cli auth login --host https://host-a.example.com
@@ -142,11 +159,16 @@ ae-cli auth logout --host https://host-a.example.com
142
159
 
143
160
  ae-cli config list
144
161
  ae-cli config current
145
- ae-cli config set-host https://host-b.example.com --label staging
162
+ ae-cli config add https://host-b.example.com --label staging
146
163
  ae-cli config use staging
164
+ ae-cli config rename staging pre-production
165
+ ae-cli config remove pre-production --yes
147
166
  ```
148
167
 
168
+ `<env>` 可以是完整 URL 或唯一 label。交互管理器和 `config list` 都会明确标识 active 环境。当还存在其他环境时,不允许直接删除 active 环境;应先显式切换。`config set-host` 作为兼容命令继续保留,其语义是添加或更新 Host 并立即激活。
169
+
149
170
  登录使用跨平台设备码流程。当前环境无法打开浏览器时,可使用 `--no-browser`。
171
+ 试用引导仅在尚未配置 Host 时出现;已配置环境的正常命令和认证流程不会展示该提示。
150
172
 
151
173
  ## 输出与安全
152
174
 
@@ -5,27 +5,29 @@ import {
5
5
  printError,
6
6
  printOutput,
7
7
  runHostCompatCheck
8
- } from "./chunk-KTYR3U6D.js";
8
+ } from "./chunk-YTG6Q75E.js";
9
9
  import {
10
10
  clearCliToken,
11
11
  mintCliToken
12
- } from "./chunk-E7UXXHO3.js";
12
+ } from "./chunk-Z3OXWCIA.js";
13
13
  import {
14
14
  clear,
15
15
  load,
16
+ missingAeHostGuidance,
17
+ missingAeHostHint,
16
18
  resolveHost,
17
19
  save
18
- } from "./chunk-IR4ZLVPW.js";
20
+ } from "./chunk-YV52FB5G.js";
19
21
  import {
20
22
  getFallbackCliToken,
21
23
  loadConfig,
22
24
  normalizeUrl,
23
25
  removeHost,
24
26
  saveConfig
25
- } from "./chunk-V6FR6WTW.js";
27
+ } from "./chunk-GJJA4CQZ.js";
26
28
  import {
27
29
  logger
28
- } from "./chunk-LYVNONC4.js";
30
+ } from "./chunk-JHENBQ5B.js";
29
31
 
30
32
  // src/core/device-auth.ts
31
33
  import { execFileSync } from "child_process";
@@ -283,7 +285,7 @@ function registerAuth(program) {
283
285
  const explicitHost = getExplicitAuthHostOverride(program, opts);
284
286
  const host = resolveAuthHost(program, opts);
285
287
  if (!host) {
286
- printError("config", "No AE host configured.", "Run: ae-cli config set-host <url>");
288
+ printError("config", "No AE host configured.", missingAeHostHint());
287
289
  process.exit(1);
288
290
  }
289
291
  const config = loadConfig();
@@ -349,7 +351,15 @@ function registerAuth(program) {
349
351
  auth.command("status").description("Show authentication status for a host (--host or active host)").option("--host <url>", HOST_OPTION_DESC).action(async (opts) => {
350
352
  const host = resolveAuthHost(program, opts);
351
353
  if (!host) {
352
- await printOutput({ authenticated: false, host: "(none)", hint: "Run: ae-cli config set-host <url>" }, program.opts().format || "json");
354
+ await printOutput(
355
+ {
356
+ authenticated: false,
357
+ host: "(none)",
358
+ hint: missingAeHostHint(),
359
+ next_steps: missingAeHostGuidance()
360
+ },
361
+ program.opts().format || "json"
362
+ );
353
363
  return;
354
364
  }
355
365
  const secureEntry = load(host);
@@ -388,7 +398,7 @@ function registerAuth(program) {
388
398
  auth.command("logout").description("Clear stored credentials (access token, CLI token, and host config) for a host (--host or active host)").option("--host <url>", HOST_OPTION_DESC).action(async (opts) => {
389
399
  const host = resolveAuthHost(program, opts);
390
400
  if (!host) {
391
- printError("config", "No AE host configured.", "Run: ae-cli config set-host <url>");
401
+ printError("config", "No AE host configured.", missingAeHostHint());
392
402
  process.exit(1);
393
403
  }
394
404
  clearCliToken(host);
@@ -3,9 +3,9 @@ import {
3
3
  invalidateAccessTokenForRetry,
4
4
  resolveHost,
5
5
  validateToken
6
- } from "./chunk-IR4ZLVPW.js";
7
- import "./chunk-V6FR6WTW.js";
8
- import "./chunk-LYVNONC4.js";
6
+ } from "./chunk-YV52FB5G.js";
7
+ import "./chunk-GJJA4CQZ.js";
8
+ import "./chunk-JHENBQ5B.js";
9
9
  export {
10
10
  getToken,
11
11
  invalidateAccessTokenForRetry,
@@ -3,8 +3,13 @@ import {
3
3
  requiresConfirmation
4
4
  } from "./chunk-OO6XR6LK.js";
5
5
  import {
6
- findGatewayDomain
6
+ findGatewayDomain,
7
+ resolveGatewayDomain
7
8
  } from "./chunk-PTE56QPL.js";
9
+ import {
10
+ printError,
11
+ printOutput
12
+ } from "./chunk-YTG6Q75E.js";
8
13
  import {
9
14
  CapabilityGatewayError,
10
15
  dryRunCapability,
@@ -12,23 +17,19 @@ import {
12
17
  inspectCapability,
13
18
  listCapabilities,
14
19
  validateCapability
15
- } from "./chunk-RGXCNC4N.js";
16
- import {
17
- printError,
18
- printOutput
19
- } from "./chunk-KTYR3U6D.js";
20
- import "./chunk-E7UXXHO3.js";
20
+ } from "./chunk-RBNKI5ZW.js";
21
+ import "./chunk-Z3OXWCIA.js";
21
22
  import {
22
23
  SecureStoreAuthError,
23
24
  resolveHost
24
- } from "./chunk-IR4ZLVPW.js";
25
+ } from "./chunk-YV52FB5G.js";
25
26
  import {
26
27
  safeJsonParse
27
- } from "./chunk-V6FR6WTW.js";
28
+ } from "./chunk-GJJA4CQZ.js";
28
29
  import {
29
30
  PermissionError
30
- } from "./chunk-24BAVOX3.js";
31
- import "./chunk-LYVNONC4.js";
31
+ } from "./chunk-AXDXJTPC.js";
32
+ import "./chunk-JHENBQ5B.js";
32
33
 
33
34
  // src/commands/capability/index.ts
34
35
  import * as readline from "readline";
@@ -48,13 +49,16 @@ function capabilityNamespace(capabilityId) {
48
49
  }
49
50
  function resolveCapabilityGatewayDomain(capabilityId, domainOverride) {
50
51
  const cliDomain = domainOverride?.trim() || capabilityNamespace(capabilityId);
52
+ return resolveCapabilityListDomain(cliDomain);
53
+ }
54
+ function resolveCapabilityListDomain(cliDomain) {
51
55
  if (!cliDomain) {
52
56
  throw new CapabilityCommandValidationError(
53
57
  "Cannot determine the capability domain.",
54
58
  "Pass --domain <domain>."
55
59
  );
56
60
  }
57
- return findGatewayDomain(cliDomain) ?? cliDomain;
61
+ return resolveGatewayDomain(cliDomain, findGatewayDomain(cliDomain) ?? cliDomain);
58
62
  }
59
63
  function parseOptionalProjectId(raw) {
60
64
  if (raw === void 0) {
@@ -137,7 +141,7 @@ function registerCapability(program) {
137
141
  });
138
142
  capability.command("list").description("List capability summaries in a domain").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (opts) => {
139
143
  await executeAndPrint(program, async (host) => {
140
- const gatewayDomain = findGatewayDomain(opts.domain) ?? opts.domain;
144
+ const gatewayDomain = resolveCapabilityListDomain(opts.domain);
141
145
  const projectId = parseOptionalProjectId(opts.projectId);
142
146
  const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain, projectId));
143
147
  const capabilities = filterCapabilities(catalog, opts.domain);
@@ -149,7 +153,7 @@ function registerCapability(program) {
149
153
  );
150
154
  capability.command("search").description("Search capability IDs and descriptions in a domain").argument("<query>", "Case-insensitive search terms").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (query, opts) => {
151
155
  await executeAndPrint(program, async (host) => {
152
- const gatewayDomain = findGatewayDomain(opts.domain) ?? opts.domain;
156
+ const gatewayDomain = resolveCapabilityListDomain(opts.domain);
153
157
  const projectId = parseOptionalProjectId(opts.projectId);
154
158
  const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain, projectId));
155
159
  const capabilities = filterCapabilities(catalog, opts.domain, query);
@@ -274,7 +278,7 @@ function printCapabilityError(error) {
274
278
  return;
275
279
  }
276
280
  if (error instanceof PermissionError) {
277
- printError("permission", error.message);
281
+ printError("permission", error.message, void 0, error.code);
278
282
  return;
279
283
  }
280
284
  if (error instanceof CapabilityGatewayError) {
@@ -3,8 +3,13 @@ import {
3
3
  requiresConfirmation
4
4
  } from "./chunk-OO6XR6LK.js";
5
5
  import {
6
- findGatewayDomain
6
+ findGatewayDomain,
7
+ resolveGatewayDomain
7
8
  } from "./chunk-PTE56QPL.js";
9
+ import {
10
+ printError,
11
+ printOutput
12
+ } from "./chunk-YTG6Q75E.js";
8
13
  import {
9
14
  CapabilityGatewayError,
10
15
  dryRunCapability,
@@ -12,23 +17,19 @@ import {
12
17
  inspectCapability,
13
18
  listCapabilities,
14
19
  validateCapability
15
- } from "./chunk-HQ2A7ITL.js";
16
- import {
17
- printError,
18
- printOutput
19
- } from "./chunk-KTYR3U6D.js";
20
- import "./chunk-E7UXXHO3.js";
20
+ } from "./chunk-GS2P7LFD.js";
21
+ import "./chunk-Z3OXWCIA.js";
21
22
  import {
22
23
  SecureStoreAuthError,
23
24
  resolveHost
24
- } from "./chunk-IR4ZLVPW.js";
25
+ } from "./chunk-YV52FB5G.js";
25
26
  import {
26
27
  safeJsonParse
27
- } from "./chunk-V6FR6WTW.js";
28
+ } from "./chunk-GJJA4CQZ.js";
28
29
  import {
29
30
  PermissionError
30
- } from "./chunk-24BAVOX3.js";
31
- import "./chunk-LYVNONC4.js";
31
+ } from "./chunk-AXDXJTPC.js";
32
+ import "./chunk-JHENBQ5B.js";
32
33
 
33
34
  // src/commands/capability/index.ts
34
35
  import * as readline from "readline";
@@ -48,13 +49,16 @@ function capabilityNamespace(capabilityId) {
48
49
  }
49
50
  function resolveCapabilityGatewayDomain(capabilityId, domainOverride) {
50
51
  const cliDomain = domainOverride?.trim() || capabilityNamespace(capabilityId);
52
+ return resolveCapabilityListDomain(cliDomain);
53
+ }
54
+ function resolveCapabilityListDomain(cliDomain) {
51
55
  if (!cliDomain) {
52
56
  throw new CapabilityCommandValidationError(
53
57
  "Cannot determine the capability domain.",
54
58
  "Pass --domain <domain>."
55
59
  );
56
60
  }
57
- return findGatewayDomain(cliDomain) ?? cliDomain;
61
+ return resolveGatewayDomain(cliDomain, findGatewayDomain(cliDomain) ?? cliDomain);
58
62
  }
59
63
  function parseOptionalProjectId(raw) {
60
64
  if (raw === void 0) {
@@ -137,7 +141,7 @@ function registerCapability(program) {
137
141
  });
138
142
  capability.command("list").description("List capability summaries in a domain").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (opts) => {
139
143
  await executeAndPrint(program, async (host) => {
140
- const gatewayDomain = findGatewayDomain(opts.domain) ?? opts.domain;
144
+ const gatewayDomain = resolveCapabilityListDomain(opts.domain);
141
145
  const projectId = parseOptionalProjectId(opts.projectId);
142
146
  const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain, projectId));
143
147
  const capabilities = filterCapabilities(catalog, opts.domain);
@@ -149,7 +153,7 @@ function registerCapability(program) {
149
153
  );
150
154
  capability.command("search").description("Search capability IDs and descriptions in a domain").argument("<query>", "Case-insensitive search terms").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (query, opts) => {
151
155
  await executeAndPrint(program, async (host) => {
152
- const gatewayDomain = findGatewayDomain(opts.domain) ?? opts.domain;
156
+ const gatewayDomain = resolveCapabilityListDomain(opts.domain);
153
157
  const projectId = parseOptionalProjectId(opts.projectId);
154
158
  const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain, projectId));
155
159
  const capabilities = filterCapabilities(catalog, opts.domain, query);
@@ -274,7 +278,7 @@ function printCapabilityError(error) {
274
278
  return;
275
279
  }
276
280
  if (error instanceof PermissionError) {
277
- printError("permission", error.message);
281
+ printError("permission", error.message, void 0, error.code);
278
282
  return;
279
283
  }
280
284
  if (error instanceof CapabilityGatewayError) {
@@ -0,0 +1,26 @@
1
+ // src/commands/te-agent/skill-version.ts
2
+ var SKILL_VERSION_PATTERN = /^(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
3
+ var MAX_VERSION_PART = 2147483647;
4
+ var MAX_SKILL_MD_BYTES = 1048576;
5
+ function assertValidSkillVersion(version) {
6
+ const match = SKILL_VERSION_PATTERN.exec(version);
7
+ if (!match) {
8
+ throw new Error("--version must use major.minor format without leading zeroes");
9
+ }
10
+ const major = Number(match[1]);
11
+ const minor = Number(match[2]);
12
+ if (major > MAX_VERSION_PART || minor > MAX_VERSION_PART) {
13
+ throw new Error(`--version major and minor must not exceed ${MAX_VERSION_PART}`);
14
+ }
15
+ }
16
+ function assertSkillDocumentSize(content) {
17
+ const size = typeof content === "string" ? Buffer.byteLength(content, "utf8") : content.byteLength;
18
+ if (size > MAX_SKILL_MD_BYTES) {
19
+ throw new Error("SKILL.md must not exceed 1 MB");
20
+ }
21
+ }
22
+
23
+ export {
24
+ assertValidSkillVersion,
25
+ assertSkillDocumentSize
26
+ };
@@ -3,13 +3,13 @@ import {
3
3
  getToken,
4
4
  invalidateAccessTokenForRetry,
5
5
  resolveHost
6
- } from "./chunk-IR4ZLVPW.js";
6
+ } from "./chunk-YV52FB5G.js";
7
7
  import {
8
8
  safeJsonParse
9
- } from "./chunk-V6FR6WTW.js";
9
+ } from "./chunk-GJJA4CQZ.js";
10
10
  import {
11
11
  logger
12
- } from "./chunk-LYVNONC4.js";
12
+ } from "./chunk-JHENBQ5B.js";
13
13
 
14
14
  // src/core/client.ts
15
15
  import WebSocket from "ws";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  resolveGatewayDomain
3
3
  } from "./chunk-PTE56QPL.js";
4
+ import {
5
+ withOutputMetadata
6
+ } from "./chunk-YTG6Q75E.js";
4
7
  import {
5
8
  dryRunCapability,
6
9
  executeCapabilityWithEnvelope,
7
10
  validateCapability
8
- } from "./chunk-HQ2A7ITL.js";
9
- import {
10
- withOutputMetadata
11
- } from "./chunk-KTYR3U6D.js";
11
+ } from "./chunk-RBNKI5ZW.js";
12
12
 
13
13
  // src/core/capability-command.ts
14
14
  import { randomBytes } from "crypto";
@@ -1,9 +1,11 @@
1
1
  // src/core/errors.ts
2
2
  var PermissionError = class extends Error {
3
- constructor(message) {
3
+ constructor(message, code) {
4
4
  super(message);
5
+ this.code = code;
5
6
  this.name = "PermissionError";
6
7
  }
8
+ code;
7
9
  };
8
10
  var CliValidationError = class extends Error {
9
11
  code;
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  getAnalysisMappingPathForClusterMode
3
- } from "./chunk-LCXU3AAT.js";
3
+ } from "./chunk-NBPKWKRA.js";
4
4
  import {
5
5
  clearCliToken,
6
6
  getCliToken
7
- } from "./chunk-E7UXXHO3.js";
7
+ } from "./chunk-Z3OXWCIA.js";
8
8
  import {
9
9
  getActiveHost,
10
10
  safeJsonParse
11
- } from "./chunk-V6FR6WTW.js";
11
+ } from "./chunk-GJJA4CQZ.js";
12
12
  import {
13
13
  PermissionError
14
- } from "./chunk-24BAVOX3.js";
14
+ } from "./chunk-AXDXJTPC.js";
15
15
  import {
16
16
  logger
17
- } from "./chunk-LYVNONC4.js";
17
+ } from "./chunk-JHENBQ5B.js";
18
18
 
19
19
  // src/core/mcp.ts
20
20
  async function permissionMessage(resp) {