@thinkingai/ae-cli 6.0.31 → 6.0.33

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 (255) hide show
  1. package/README.md +3 -2
  2. package/README.zh.md +3 -2
  3. package/dist/{auth-MEJ642P4.js → auth-ENM3FE6L.js} +3 -2
  4. package/dist/{auth-7H3HAAJ3.js → auth-UPGUOKTW.js} +13 -6
  5. package/dist/{capability-SEH3JWLN.js → capability-AJC5CBRT.js} +50 -18
  6. package/dist/{capability-SQ2IWKP3.js → capability-TQ5KU5Q6.js} +50 -18
  7. package/dist/chunk-24BAVOX3.js +51 -0
  8. package/dist/{chunk-MDJGDI6K.js → chunk-3KI3RRXX.js} +5 -5
  9. package/dist/{chunk-PKRD2IEM.js → chunk-3P3562ZX.js} +9 -7
  10. package/dist/{chunk-R77JT7XD.js → chunk-4Q5TNP4Q.js} +4 -4
  11. package/dist/{chunk-TKQJQXWT.js → chunk-6CHYBI64.js} +7 -4
  12. package/dist/{chunk-6LEYLOV3.js → chunk-CPVTECJ3.js} +9 -7
  13. package/dist/{chunk-KCA6BA5D.js → chunk-DB4Q3ANU.js} +5 -3
  14. package/dist/{chunk-2NDGFQHW.js → chunk-E7UXXHO3.js} +11 -3
  15. package/dist/{chunk-I4A62X3N.js → chunk-HQ2A7ITL.js} +23 -14
  16. package/dist/chunk-IMMGMU54.js +674 -0
  17. package/dist/{chunk-AJTH7LT3.js → chunk-IR4ZLVPW.js} +4 -2
  18. package/dist/{chunk-N2QORU5D.js → chunk-ISY6HMHM.js} +7 -4
  19. package/dist/{chunk-KGJQCYVC.js → chunk-LCXU3AAT.js} +4 -2
  20. package/dist/chunk-LYVNONC4.js +86 -0
  21. package/dist/{chunk-DYOS6YY7.js → chunk-RGXCNC4N.js} +23 -14
  22. package/dist/{chunk-YCLVYFK7.js → chunk-V6FR6WTW.js} +45 -87
  23. package/dist/chunk-VTWMIC5L.js +27 -0
  24. package/dist/{cli-token-TVQRSE46.js → cli-token-4SBMXAUK.js} +6 -3
  25. package/dist/{client-2643Z5AG.js → client-PP5FETMW.js} +4 -3
  26. package/dist/community-report-client-KK2QBANO.js +145 -0
  27. package/dist/{config-7UZWDE74.js → config-RCCGHHYA.js} +6 -3
  28. package/dist/index.js +541 -234
  29. package/dist/{metadata-W6JFFMBA.js → metadata-3M5F2AED.js} +15 -14
  30. package/dist/{metadata-X62TKIVK.js → metadata-W2MEOI4Z.js} +15 -14
  31. package/dist/{model-T3KZJWLW.js → model-OYQLXCQY.js} +3 -2
  32. package/dist/{raw-CN542NGT.js → raw-TPB7KSZO.js} +6 -4
  33. package/dist/{sync-ERNHDPB5.js → sync-EFJKFZK2.js} +6 -3
  34. package/dist/{te-agent-FCCWUDTJ.js → te-agent-K2OWMZXT.js} +3 -2
  35. package/dist/{te-analysis-NJGNWZFC.js → te-analysis-I73ZS4NK.js} +2196 -120
  36. package/dist/{te-analysis-YGV5V5EX.js → te-analysis-Q7AZCDU4.js} +2196 -120
  37. package/dist/te-common-ST3QPSXJ.js +61 -0
  38. package/dist/te-common-WSLIKKPC.js +61 -0
  39. package/dist/te-community-WXGB6IOX.js +1659 -0
  40. package/dist/te-community-X2AHXGCA.js +1659 -0
  41. package/dist/{te-dataops-ZNJBQ6VT.js → te-dataops-MJV54MNY.js} +10 -8
  42. package/dist/{te-dataops-F36T656A.js → te-dataops-OA7I6HBG.js} +10 -8
  43. package/dist/te-engage-GJRVQMK3.js +3895 -0
  44. package/dist/te-engage-JIXX3WBI.js +3895 -0
  45. package/dist/{te-kb-NT33UHAE.js → te-kb-CIZXRWMO.js} +105 -23
  46. package/dist/{te-meta-VKWNAWO4.js → te-meta-Q4L6EE3Q.js} +8 -240
  47. package/dist/{te-meta-MAAUHFQO.js → te-meta-VHCN4Q62.js} +8 -240
  48. package/dist/{te-team-OKCOX7OE.js → te-team-PDKKW7Q5.js} +7 -6
  49. package/dist/tracking/i18n/resources/cli/en.json +4 -3
  50. package/dist/tracking/i18n/resources/cli/ja.json +4 -3
  51. package/dist/tracking/i18n/resources/cli/ko.json +4 -3
  52. package/dist/tracking/i18n/resources/cli/zh.json +4 -3
  53. package/package.json +6 -2
  54. package/skills/ae-agent/SKILL.md +2 -1
  55. package/skills/ae-analysis/SKILL.md +21 -7
  56. package/skills/ae-analysis/references/adhoc_export.md +5 -6
  57. package/skills/ae-analysis/references/adhoc_run.md +7 -9
  58. package/skills/ae-analysis/references/ai_models.md +17 -1
  59. package/skills/ae-analysis/references/alert_create.md +25 -0
  60. package/skills/ae-analysis/references/alert_definition_schema_get.md +24 -0
  61. package/skills/ae-analysis/references/alert_delete.md +26 -0
  62. package/skills/ae-analysis/references/alert_detail_list.md +27 -0
  63. package/skills/ae-analysis/references/alert_get.md +25 -0
  64. package/skills/ae-analysis/references/alert_job_list.md +24 -0
  65. package/skills/ae-analysis/references/alert_list.md +27 -0
  66. package/skills/ae-analysis/references/alert_notice_config_list.md +24 -0
  67. package/skills/ae-analysis/references/alert_start.md +25 -0
  68. package/skills/ae-analysis/references/alert_stop.md +25 -0
  69. package/skills/ae-analysis/references/alert_update.md +26 -0
  70. package/skills/ae-analysis/references/analysis_data_retrieval.md +11 -11
  71. package/skills/ae-analysis/references/analysis_drilldown_contract.md +93 -0
  72. package/skills/ae-analysis/references/analysis_gateway_assets.md +9 -8
  73. package/skills/ae-analysis/references/asset_url_get.md +4 -3
  74. package/skills/ae-analysis/references/bi_panel_create.md +3 -3
  75. package/skills/ae-analysis/references/bi_panel_page_data_export.md +2 -2
  76. package/skills/ae-analysis/references/bi_panel_page_data_run.md +1 -1
  77. package/skills/ae-analysis/references/check_delete.md +27 -0
  78. package/skills/ae-analysis/references/check_export.md +27 -0
  79. package/skills/ae-analysis/references/check_get.md +27 -0
  80. package/skills/ae-analysis/references/check_list.md +24 -0
  81. package/skills/ae-analysis/references/check_retry.md +27 -0
  82. package/skills/ae-analysis/references/check_run.md +25 -0
  83. package/skills/ae-analysis/references/command_index.md +114 -46
  84. package/skills/ae-analysis/references/create_entity.md +2 -2
  85. package/skills/ae-analysis/references/dashboard_create.md +3 -3
  86. package/skills/ae-analysis/references/dashboard_daily_report_send.md +1 -0
  87. package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
  88. package/skills/ae-analysis/references/dashboard_report_data_export.md +4 -4
  89. package/skills/ae-analysis/references/dashboard_report_data_run.md +4 -4
  90. package/skills/ae-analysis/references/drilldown_entities_export.md +26 -0
  91. package/skills/ae-analysis/references/drilldown_entities_run.md +33 -0
  92. package/skills/ae-analysis/references/drilldown_events_export.md +21 -0
  93. package/skills/ae-analysis/references/drilldown_events_run.md +23 -0
  94. package/skills/ae-analysis/references/drilldown_user_events_export.md +6 -3
  95. package/skills/ae-analysis/references/drilldown_user_events_run.md +6 -6
  96. package/skills/ae-analysis/references/entity_detail_export.md +2 -0
  97. package/skills/ae-analysis/references/entity_detail_run.md +8 -1
  98. package/skills/ae-analysis/references/event_blacklist_add.md +25 -0
  99. package/skills/ae-analysis/references/event_blacklist_list.md +24 -0
  100. package/skills/ae-analysis/references/event_blacklist_update.md +26 -0
  101. package/skills/ae-analysis/references/event_detail_export.md +2 -0
  102. package/skills/ae-analysis/references/event_detail_run.md +2 -0
  103. package/skills/ae-analysis/references/event_list.md +10 -2
  104. package/skills/ae-analysis/references/ingest_error_list.md +27 -0
  105. package/skills/ae-analysis/references/ingest_summary.md +26 -0
  106. package/skills/ae-analysis/references/list_entities.md +1 -1
  107. package/skills/ae-analysis/references/live_data_export.md +27 -0
  108. package/skills/ae-analysis/references/live_data_list.md +27 -0
  109. package/skills/ae-analysis/references/metric_create.md +13 -4
  110. package/skills/ae-analysis/references/metric_delete.md +7 -0
  111. package/skills/ae-analysis/references/metric_get.md +6 -0
  112. package/skills/ae-analysis/references/metric_list.md +16 -3
  113. package/skills/ae-analysis/references/metric_update.md +12 -1
  114. package/skills/ae-analysis/references/plan_change_log_export.md +27 -0
  115. package/skills/ae-analysis/references/plan_change_log_list.md +24 -0
  116. package/skills/ae-analysis/references/plan_delete_items.md +30 -0
  117. package/skills/ae-analysis/references/plan_export.md +26 -0
  118. package/skills/ae-analysis/references/plan_generate.md +27 -0
  119. package/skills/ae-analysis/references/plan_get.md +24 -0
  120. package/skills/ae-analysis/references/plan_import_excel.md +26 -0
  121. package/skills/ae-analysis/references/plan_save_items.md +27 -0
  122. package/skills/ae-analysis/references/plan_sync_from_meta.md +24 -0
  123. package/skills/ae-analysis/references/project_access_detail_get.md +23 -0
  124. package/skills/ae-analysis/references/project_data_power_delete.md +26 -0
  125. package/skills/ae-analysis/references/project_data_power_get.md +24 -0
  126. package/skills/ae-analysis/references/project_data_power_list.md +23 -0
  127. package/skills/ae-analysis/references/project_data_power_upsert.md +24 -0
  128. package/skills/ae-analysis/references/project_entity_create.md +27 -0
  129. package/skills/ae-analysis/references/project_entity_delete.md +25 -0
  130. package/skills/ae-analysis/references/project_entity_event_list.md +24 -0
  131. package/skills/ae-analysis/references/project_entity_get.md +24 -0
  132. package/skills/ae-analysis/references/project_entity_list.md +28 -0
  133. package/skills/ae-analysis/references/project_entity_update.md +28 -0
  134. package/skills/ae-analysis/references/project_function_list.md +24 -0
  135. package/skills/ae-analysis/references/project_info_get.md +23 -0
  136. package/skills/ae-analysis/references/project_info_list.md +26 -0
  137. package/skills/ae-analysis/references/project_info_update.md +25 -0
  138. package/skills/ae-analysis/references/project_mark_time_create.md +27 -0
  139. package/skills/ae-analysis/references/project_mark_time_delete.md +25 -0
  140. package/skills/ae-analysis/references/project_mark_time_list.md +28 -0
  141. package/skills/ae-analysis/references/project_mark_time_update.md +28 -0
  142. package/skills/ae-analysis/references/project_member_add.md +25 -0
  143. package/skills/ae-analysis/references/project_member_batch_update.md +24 -0
  144. package/skills/ae-analysis/references/project_member_candidate_list.md +25 -0
  145. package/skills/ae-analysis/references/project_member_handover_export.md +27 -0
  146. package/skills/ae-analysis/references/project_member_handover_run.md +24 -0
  147. package/skills/ae-analysis/references/project_member_import.md +25 -0
  148. package/skills/ae-analysis/references/project_member_list.md +23 -0
  149. package/skills/ae-analysis/references/project_member_receiver_list.md +23 -0
  150. package/skills/ae-analysis/references/project_member_remove.md +26 -0
  151. package/skills/ae-analysis/references/project_member_update.md +25 -0
  152. package/skills/ae-analysis/references/project_owner_update.md +27 -0
  153. package/skills/ae-analysis/references/project_permission_binding_list.md +24 -0
  154. package/skills/ae-analysis/references/project_receive_status_update.md +25 -0
  155. package/skills/ae-analysis/references/project_role_delete.md +26 -0
  156. package/skills/ae-analysis/references/project_role_function_list.md +27 -0
  157. package/skills/ae-analysis/references/project_role_get.md +24 -0
  158. package/skills/ae-analysis/references/project_role_list.md +25 -0
  159. package/skills/ae-analysis/references/project_role_upsert.md +24 -0
  160. package/skills/ae-analysis/references/project_role_user_list.md +24 -0
  161. package/skills/ae-analysis/references/project_timezone_get.md +23 -0
  162. package/skills/ae-analysis/references/project_timezone_overview.md +23 -0
  163. package/skills/ae-analysis/references/project_timezone_update.md +25 -0
  164. package/skills/ae-analysis/references/project_user_id_items_update.md +24 -0
  165. package/skills/ae-analysis/references/property_list.md +21 -6
  166. package/skills/ae-analysis/references/public_link_create.md +1 -1
  167. package/skills/ae-analysis/references/query_create_result_cluster.md +15 -32
  168. package/skills/ae-analysis/references/report_create.md +1 -1
  169. package/skills/ae-analysis/references/report_data_export.md +5 -3
  170. package/skills/ae-analysis/references/report_data_run.md +13 -3
  171. package/skills/ae-analysis/references/report_get.md +2 -0
  172. package/skills/ae-analysis/references/report_update.md +1 -1
  173. package/skills/ae-analysis/references/sdk_sample_generate.md +24 -0
  174. package/skills/ae-analysis/references/user_cluster_create.md +5 -1
  175. package/skills/ae-analysis/references/user_cluster_create_id.md +2 -0
  176. package/skills/ae-analysis/references/user_cluster_get.md +4 -0
  177. package/skills/ae-analysis/references/user_cluster_refresh.md +4 -2
  178. package/skills/ae-analysis/references/user_cluster_update.md +5 -1
  179. package/skills/ae-analysis/references/user_cluster_update_id.md +2 -0
  180. package/skills/ae-analysis/references/user_tag_create.md +5 -1
  181. package/skills/ae-analysis/references/user_tag_create_id.md +2 -0
  182. package/skills/ae-analysis/references/user_tag_get.md +4 -0
  183. package/skills/ae-analysis/references/user_tag_refresh.md +4 -2
  184. package/skills/ae-analysis/references/user_tag_update.md +5 -1
  185. package/skills/ae-analysis/references/user_tag_update_id.md +2 -0
  186. package/skills/ae-analysis/references/virtual_event_create.md +22 -3
  187. package/skills/ae-analysis/references/virtual_property_create.md +23 -2
  188. package/skills/ae-analysis-global/SKILL.md +2 -0
  189. package/skills/ae-capability/SKILL.md +7 -5
  190. package/skills/ae-community/SKILL.md +72 -8
  191. package/skills/ae-community/references/community-chat-analysis.md +341 -0
  192. package/skills/ae-community/references/community-data-report.md +301 -0
  193. package/skills/ae-dataops/SKILL.md +2 -1
  194. package/skills/ae-engage/SKILL.md +204 -8
  195. package/skills/ae-engage/references/activity-activity-type.md +42 -0
  196. package/skills/ae-engage/references/activity-activity.md +70 -0
  197. package/skills/ae-engage/references/activity-approval.md +53 -0
  198. package/skills/ae-engage/references/activity-task.md +87 -0
  199. package/skills/ae-engage/references/activity-topic.md +98 -0
  200. package/skills/ae-engage/references/approval-approver-delete.md +26 -0
  201. package/skills/ae-engage/references/channel-test-send.md +37 -0
  202. package/skills/ae-engage/references/channel-touch-limits-batch-update.md +28 -0
  203. package/skills/ae-engage/references/channel-touch-limits-save.md +37 -0
  204. package/skills/ae-engage/references/channel-touch-limits-toggle.md +28 -0
  205. package/skills/ae-engage/references/channel-update-config.md +36 -0
  206. package/skills/ae-engage/references/client-param.md +58 -0
  207. package/skills/ae-engage/references/common-metric.md +75 -0
  208. package/skills/ae-engage/references/config-table.md +92 -0
  209. package/skills/ae-engage/references/engage-scene-config-item.md +69 -0
  210. package/skills/ae-engage/references/operation-log-query.md +1 -1
  211. package/skills/ae-engage/references/preset-event.md +42 -0
  212. package/skills/ae-engage/references/push-language.md +39 -0
  213. package/skills/ae-engage/references/scene-config-channel.md +58 -0
  214. package/skills/ae-engage/references/scene-config-group.md +62 -0
  215. package/skills/ae-engage/references/scene-config-item.md +68 -0
  216. package/skills/ae-engage/references/scene-config-metric.md +79 -0
  217. package/skills/ae-engage/references/scene-config-param.md +72 -0
  218. package/skills/ae-engage/references/scene-preset-metric.md +45 -0
  219. package/skills/ae-engage/references/scene-strategy.md +47 -0
  220. package/skills/ae-engage/references/scene-template.md +71 -0
  221. package/skills/ae-engage/references/{ops-delete.md → task-delete.md} +3 -3
  222. package/skills/ae-engage/references/whitelist.md +72 -0
  223. package/skills/ae-engage/references/workbench-workbench.md +48 -0
  224. package/skills/ae-generate-tracking-code/SKILL.md +4 -4
  225. package/skills/ae-generate-tracking-plan/SKILL.md +140 -16
  226. package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +98 -33
  227. package/skills/ae-generate-tracking-plan/references/te-api.md +1 -1
  228. package/skills/ae-generate-tracking-plan/references/xlsx-schema.md +16 -14
  229. package/skills/ae-kb/SKILL.md +36 -9
  230. package/skills/ae-metadata/SKILL.md +3 -2
  231. package/skills/ae-metadata/references/metadata_event_get.md +4 -4
  232. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
  233. package/skills/ae-metadata/references/metadata_property_get.md +4 -4
  234. package/skills/ae-team/SKILL.md +2 -1
  235. package/dist/chunk-NOO24N7W.js +0 -11
  236. package/dist/chunk-TNW2CI4W.js +0 -129
  237. package/dist/te-common-5NJLF3XG.js +0 -130
  238. package/dist/te-common-7VTJZPII.js +0 -130
  239. package/dist/te-community-PEZ2VEF7.js +0 -687
  240. package/dist/te-community-TSKJ652U.js +0 -687
  241. package/dist/te-engage-BUWVSSSK.js +0 -1912
  242. package/dist/te-engage-EPE3QKDE.js +0 -1912
  243. package/skills/ae-analysis/references/create_metric.md +0 -58
  244. package/skills/ae-analysis/references/create_virtual_event.md +0 -60
  245. package/skills/ae-analysis/references/create_virtual_property.md +0 -69
  246. package/skills/ae-analysis/references/delete_metric.md +0 -32
  247. package/skills/ae-analysis/references/drilldown_users_export.md +0 -17
  248. package/skills/ae-analysis/references/drilldown_users_run.md +0 -61
  249. package/skills/ae-analysis/references/get_metric.md +0 -38
  250. package/skills/ae-analysis/references/get_resource_url.md +0 -33
  251. package/skills/ae-analysis/references/list_events.md +0 -46
  252. package/skills/ae-analysis/references/list_metrics.md +0 -52
  253. package/skills/ae-analysis/references/list_properties.md +0 -47
  254. package/skills/ae-analysis/references/update_metric.md +0 -58
  255. package/dist/{chunk-HL2AJQ4Q.js → chunk-PTE56QPL.js} +3 -3
@@ -10,20 +10,20 @@
10
10
 
11
11
  ## 一、Revenue Model → Required Events
12
12
 
13
- | 收入模型 | 注入事件 | 事件显示名 | platform | 必带属性 |
14
- |---|---|---|---|---|
15
- | `IAA` | `ad_show` | 广告展示 | client | `ad_type`、`ad_placement`、`is_filled` |
16
- | `IAA` | `ad_click` | 广告点击 | client | `ad_type`、`ad_placement`、`ad_network` |
17
- | `IAA` | `ad_reward_get` | 激励广告奖励领取 | client | `ad_type`、`ad_placement`、`reward_type`、`reward_amount` |
18
- | `IAP` | `payment` | 支付成功 | server | `order_id`、`pay_amount`、`currency_type`、`payment_name`、`payment_type` |
19
- | `IAP` | `payment_fail` | 支付失败 | server | `order_id`、`fail_reason`、`payment_name` |
20
- | `mixed` | 同 IAA + IAP 所有事件 | | | |
21
- | `subscription` | `subscription_start` | 订阅开始 | server | `subscription_id`、`plan_name`、`start_time` |
22
- | `subscription` | `subscription_renew` | 订阅续费 | server | `subscription_id`、`renew_amount`、`currency_type` |
23
- | `subscription` | `subscription_cancel` | 订阅取消 | server | `subscription_id`、`cancel_time`、`cancel_reason` |
24
- | `commission` | `order_create` | 订单创建 | server | `order_id`、`order_amount`、`commission_rate` |
25
- | `commission` | `order_paid` | 订单支付 | server | `order_id`、`pay_amount`、`commission_amount` |
26
- | `commission` | `commission_settled` | 佣金结算 | server | `settlement_id`、`commission_amount`、`settle_time` |
13
+ | 收入模型 | 注入事件 | 事件显示名 | event_tag | platform | 必带属性 |
14
+ |---|---|---|---|---|---|
15
+ | `IAA` | `ad_show` | 广告展示 | 广告 | client | `ad_type`、`ad_placement`、`is_filled` |
16
+ | `IAA` | `ad_click` | 广告点击 | 广告 | client | `ad_type`、`ad_placement`、`ad_network` |
17
+ | `IAA` | `ad_reward_get` | 激励广告奖励领取 | 广告 | client | `ad_type`、`ad_placement`、`reward_type`、`reward_amount` |
18
+ | `IAP` | `payment` | 支付成功 | 支付 | server | `order_id`、`pay_amount`、`currency_type`、`payment_name`、`payment_type` |
19
+ | `IAP` | `payment_fail` | 支付失败 | 支付 | server | `order_id`、`fail_reason`、`payment_name` |
20
+ | `mixed` | 同 IAA + IAP 所有事件 | | | | |
21
+ | `subscription` | `subscription_start` | 订阅开始 | 订阅 | server | `subscription_id`、`plan_name`、`start_time` |
22
+ | `subscription` | `subscription_renew` | 订阅续费 | 订阅 | server | `subscription_id`、`renew_amount`、`currency_type` |
23
+ | `subscription` | `subscription_cancel` | 订阅取消 | 订阅 | server | `subscription_id`、`cancel_time`、`cancel_reason` |
24
+ | `commission` | `order_create` | 订单创建 | 交易 | server | `order_id`、`order_amount`、`commission_rate` |
25
+ | `commission` | `order_paid` | 订单支付 | 交易 | server | `order_id`、`pay_amount`、`commission_amount` |
26
+ | `commission` | `commission_settled` | 佣金结算 | 交易 | server | `settlement_id`、`commission_amount`、`settle_time` |
27
27
 
28
28
  ---
29
29
 
@@ -52,17 +52,19 @@
52
52
  **解析结果**:
53
53
 
54
54
  ```
55
- 节点1: 刷关卡 → stage_start / stage_complete / stage_fail
56
- 节点2: 获得金币 → token_get (token_type=gold, source=关卡)
57
- 节点3: 抽卡 → gacha_draw (pool_type, draw_count)
58
- 节点4: 获取角色 → hero_get (hero_id, hero_star)
55
+ 节点1: 刷关卡 → stage_start / stage_complete / stage_fail [event_tag: 关卡/Stage]
56
+ 节点2: 获得金币 → token_get (token_type=gold, source=关卡) [event_tag: 资源/Resource]
57
+ 节点3: 抽卡 → gacha_draw (pool_type, draw_count) [event_tag: 抽卡/Gacha]
58
+ 节点4: 获取角色 → hero_get (hero_id, hero_star) [event_tag: 养成/Growth]
59
59
  ```
60
60
 
61
61
  ---
62
62
 
63
63
  ## 三、功能入口 → 模块事件组
64
64
 
65
- | 功能入口 | 事件名 | 显示名 | platform | 典型属性 |
65
+ > 第一列"模块"即该事件的 `event_tag` 值。注入时翻译为用户语言。
66
+
67
+ | 模块 (event_tag) | 事件名 | 显示名 | platform | 典型属性 |
66
68
  |---|---|---|---|---|
67
69
  | 关卡 | `stage_start` | 关卡开始 | client | `stage_id`、`stage_type`、`difficulty` |
68
70
  | 关卡 | `stage_complete` | 关卡完成 | server | `stage_id`、`star_rating`、`score` |
@@ -200,26 +202,36 @@
200
202
 
201
203
  > 根据应用类型/游戏品类,自动注入对应模块的事件组。
202
204
  > 品类由 Phase 0 的 `meta.scenario` 或用户描述推断。
205
+ >
206
+ > **event_tag 规则**:本表中每行的"模块"列即该事件的 `event_tag` 值。注入时需翻译为用户语言。
207
+ > 例如 战斗→`Battle`, 养成→`Growth`, 抽卡→`Gacha`, 资源→`Resource`, 广告→`Ads`, 支付→`Payment`。
203
208
 
204
- ### 8.1 游戏类 — 通用基础模块(所有游戏必选)
209
+ ### 8.0 通用基础模块(所有品类适用)
210
+
211
+ > 以下事件不属于任何具体功能模块(关卡/商城/抽卡等),统一使用 `基础事件`(Basic)标签。
212
+ > 区别于 `系统事件`(System Event,SDK 自动采集的 `ta_*` 事件)。
205
213
 
206
214
  **用户生命周期**:
207
215
 
208
- | 事件名 | 显示名 | platform | 必带属性 |
209
- |---|---|---|---|
210
- | `new_device` | 设备激活 | client | `channel` |
211
- | `register` | 用户注册 | server | `register_type` |
212
- | `login` | 用户登录 | both | `account_id` |
213
- | `logout` | 用户登出 | both | `session_duration` |
216
+ | 模块 | 事件名 | 显示名 | platform | 必带属性 |
217
+ |---|---|---|---|---|
218
+ | 基础事件 | `new_device` | 设备激活 | client | `channel` |
219
+ | 基础事件 | `register` | 用户注册 | server | `register_type` |
220
+ | 基础事件 | `login` | 用户登录 | both | `account_id` |
221
+ | 基础事件 | `logout` | 用户登出 | both | `session_duration` |
214
222
 
215
223
  **成长模块**:
216
224
 
217
- | 事件名 | 显示名 | platform | 必带属性 |
218
- |---|---|---|---|
219
- | `create_role` | 创建角色 | server | `role_id`、`role_name`、`server_id` |
220
- | `guide_complete` | 完成新手引导 | client | `guide_id`、`guide_step` |
221
- | `level_up` | 升级 | server | `level`、`level_before` |
222
- | `vip_levelup` | VIP升级 | server | `vip_level` |
225
+ | 模块 | 事件名 | 显示名 | platform | 必带属性 |
226
+ |---|---|---|---|---|
227
+ | 基础事件 | `create_role` | 创建角色 | server | `role_id`、`role_name`、`server_id` |
228
+ | 基础事件 | `guide_complete` | 完成新手引导 | client | `guide_id`、`guide_step` |
229
+ | 基础事件 | `level_up` | 升级 | server | `level`、`level_before` |
230
+ | 基础事件 | `vip_levelup` | VIP升级 | server | `vip_level` |
231
+
232
+ ### 8.1 游戏类 — 通用基础模块(所有游戏必选)
233
+
234
+ > 以下为游戏品类通用的基础事件,所有游戏品类均应包含。详见 8.0 通用基础模块。
223
235
 
224
236
  ### 8.2 游戏类 — 按品类
225
237
 
@@ -422,4 +434,57 @@
422
434
 
423
435
  - 必须有 ≥2 个自定义属性
424
436
  - 必须标注事件标签(模块归属)和采集端
425
- - 命名符合 snake_case
437
+ - 命名符合 snake_case
438
+
439
+ ---
440
+
441
+ ## 附录:event_tag 多语言对照表
442
+
443
+ > 生成 event_tag 时,根据用户语言从本表选取对应翻译。
444
+ > 代码层(`src/xlsx/write.ts` 的 `CANONICAL_TAG`)也同步维护此表,用于 xlsx 输出时按业务重要性排序。
445
+
446
+ | 中文 | English | 日本語 | 한국어 |
447
+ |---|---|---|---|
448
+ | 基础事件 | Basic | 基本イベント | 기본 이벤트 |
449
+ | 系统事件 | System Event | システムイベント | 시스템 이벤트 |
450
+ | 战斗 | Battle | 戦闘 | 전투 |
451
+ | 关卡 | Stage | ステージ | 스테이지 |
452
+ | 副本 | Dungeon | ダンジョン | 던전 |
453
+ | 抽卡 | Gacha | ガチャ | 가챠 |
454
+ | 养成 | Growth | 育成 | 육성 |
455
+ | 资源 | Resource | リソース | 리소스 |
456
+ | 广告 | Ads | 広告 | 광고 |
457
+ | 支付 | Payment | 支払い | 결제 |
458
+ | 订阅 | Subscription | サブスクリプション | 구독 |
459
+ | 商城 | Shop | ショップ | 상점 |
460
+ | 任务 | Quest | クエスト | 퀘스트 |
461
+ | 成就 | Achievement | 実績 | 업적 |
462
+ | 签到 | Check-in | チェックイン | 출석체크 |
463
+ | 排行榜 | Leaderboard | ランキング | 리더보드 |
464
+ | 公会 | Guild | ギルド | 길드 |
465
+ | 社交 | Social | ソーシャル | 소셜 |
466
+ | 建筑 | Building | 建築 | 건설 |
467
+ | 联盟 | Alliance | 同盟 | 연맹 |
468
+ | 装备 | Equipment | 装備 | 장비 |
469
+ | 交易 | Trade | トレード | 거래 |
470
+ | 复活 | Revive | 復活 | 부활 |
471
+ | Slots | Slots | スロット | 슬롯 |
472
+ | 抽奖 | Lottery | 抽選 | 추첨 |
473
+ | 奖励 | Reward | 報酬 | 보상 |
474
+ | 提现 | Withdraw | 引き出し | 출금 |
475
+ | 发现 | Discovery | 発見 | 발견 |
476
+ | 商品 | Product | 商品 | 상품 |
477
+ | 订单 | Order | 注文 | 주문 |
478
+ | 售后 | After-sales | アフターサービス | A/S |
479
+ | 内容 | Content | コンテンツ | 콘텐츠 |
480
+ | 互动 | Interaction | インタラクション | 인터랙션 |
481
+ | 关系 | Relationship | 関係 | 관계 |
482
+ | 直播 | Live | ライブ | 라이브 |
483
+ | 引导 | Onboarding | オンボーディング | 온보딩 |
484
+ | 课程 | Course | コース | 코스 |
485
+ | 报名 | Enrollment | 申し込み | 신청 |
486
+ | 测验 | Quiz | クイズ | 퀴즈 |
487
+ | 创作 | Creation | 創作 | 창작 |
488
+ | 素材 | Material | 素材 | 소재 |
489
+ | 导出 | Export | エクスポート | 내보내기 |
490
+ | 内容播放 | Playback | 再生 | 재생 |
@@ -99,7 +99,7 @@ Upload is a two-step capability-gateway flow:
99
99
  { "project_id": 1603, "input_file_id": "...", "lang": "zh" }
100
100
  ```
101
101
 
102
- - `lang` is optional for backward compatibility, but Agents should pass the generated xlsx language (`zh` / `en` / `ja` / `ko`) so the backend resolves localized sheet names and headers consistently.
102
+ - Agents MUST pass `lang` with the generated xlsx language (`zh` / `en` / `ja` / `ko`) so the backend resolves localized sheet names and headers consistently.
103
103
  - Response: `{ return_code: 0, return_message: "success" }` on success.
104
104
 
105
105
  **合并语义**:对事件走 **merge-by-name**(同名不覆盖、新名新增)。若要完全替换,
@@ -95,20 +95,22 @@ A-E 在 writer 里用 `mergeCells` 合并。
95
95
 
96
96
  ## 类型枚举
97
97
 
98
- ### PropType(xlsx 中文值 canonical)
99
-
100
- | canonical(draft.json) | xlsx 写入值 | xlsx 读取可接受值(含行业 alias) |
101
- |---|---|---|
102
- | `string` | `文本` | `文本` / `字符串` |
103
- | `number` | `数值` | `数值` |
104
- | `bool` | `布尔` | `布尔` |
105
- | `datetime` | `时间` | `时间` |
106
- | `object` | `对象` | `对象` |
107
- | `array_row` | `对象组` | `对象组` |
108
- | `array_string` | `列表` | `列表` |
109
-
110
- Writer 方向统一用第二列(官方中文正式名),不输出 alias。
111
- Reader 方向对 alias / 未知值做 fallback 并打 stderr warning。
98
+ ### PropType(canonical各语言显示值)
99
+
100
+ > Writer 按 `draft.meta.lang` 输出对应语言列的值。
101
+
102
+ | canonical(draft.json) | zh | en | ja | ko | 读取额外兼容(alias) |
103
+ |---|---|---|---|---|---|
104
+ | `string` | `文本` | `String` | `ストリング` | `String` | `字符串` / `string` / `文字列` / `テキスト` / `텍스트` / `문자열` |
105
+ | `number` | `数值` | `Number` | `数値` | `Number` | `number` / `숫자` |
106
+ | `bool` | `布尔` | `Boolean` | `ブール値` | `Boolean` | `boolean` / `Bool` / `ブール` / `부울` |
107
+ | `datetime` | `时间` | `Date` | `時間` | `Date` | `datetime` / `DateTime` / `Time` / `日時` / `날짜시간` / `time` |
108
+ | `object` | `对象` | `Row` | `オブジェクト` | `Row` | `object` / `Object` |
109
+ | `array_row` | `对象组` | `Array Row` | `オブジェクトグループ` | `Array Row` | `object[]` / `Object Array` / `オブジェクト配列` / `object_array` / `객체 배열` |
110
+ | `array_string` | `列表` | `List` | `リスト` | `List` | `string[]` / `String Array` / `配列` / `string_array` / `리스트` |
111
+
112
+ > 旧值兼容(2026-07-15 前生成的 xlsx):`en` 旧值 `string`/`number`/`boolean`/`datetime`/`object`/`object[]`/`string[]`,
113
+ > `ja` 旧值 `オブジェクト配列`/`配列`,`ko` 旧值 `time`/`object_array`/`string_array` 在 reader 中仍可识别。
112
114
 
113
115
  ### UpdateType(用户属性 `更新方式`)
114
116
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ae-kb
3
3
  version: 1.0.0
4
- description: "AE/TE knowledge base CLI manual for creating, querying, LLM-powered ask, deterministic index/grep/read retrieval, checking status, uploading, compiling, schema generation, URL sources, source deletion, and knowledge base deletion. Use when the user asks to manage TE/AE/ThinkingEngine knowledge bases, upload documents or URLs to a knowledge base, query knowledge, ask knowledge bases with an LLM, inspect knowledge base indexes, search knowledge base pages, read a specific knowledge base page, check knowledge base status, generate schemas, compile knowledge, remove sources, or delete a knowledge base. Must use ae-cli kb commands and must not guess knowledge base names, scopes, page paths, source display names, JSON payload shapes, or URL formats."
4
+ description: "AE/TE knowledge base CLI manual for creating, querying, LLM-powered ask, listing accessible knowledge bases, deterministic index/grep/read retrieval, checking status, uploading, compiling, schema generation, URL sources, source deletion, and knowledge base deletion. Use when the user asks to manage TE/AE/ThinkingEngine knowledge bases, upload documents or URLs to a knowledge base, query knowledge, ask knowledge bases with an LLM, list accessible knowledge bases, inspect knowledge base indexes, search knowledge base pages, read a specific knowledge base page, check knowledge base status, generate schemas, compile knowledge, remove sources, or delete a knowledge base. Must use ae-cli kb commands and must not guess knowledge base names, scopes, page paths, source display names, JSON payload shapes, or URL formats."
5
5
  ---
6
6
 
7
7
  # ae-kb
@@ -14,13 +14,14 @@ ae-cli kb +<command> [options]
14
14
 
15
15
  ## Global Rules
16
16
 
17
- - Use this skill for TE/AE knowledge base tasks: create, query, ask with LLM, inspect indexes, grep pages, read pages, check status, upload sources, add URL sources, generate schema, compile, remove source files, and delete knowledge bases.
18
- - Read and ordinary `write` operations can run directly after required inputs and user intent are known. Only `high-risk-write` operations use the confirmation gate.
17
+ - Use this skill for TE/AE knowledge base tasks: create, query, ask with LLM, list accessible knowledge bases, inspect indexes, grep pages, read pages, check status, upload sources, add URL sources, generate schema, compile, remove source files, and delete knowledge bases.
18
+ - Read operations can run directly after required inputs are known. Write operations require explicit user intent and normally keep the confirmation prompt unless the user asks to bypass it.
19
19
  - Prefer `--dry-run` before destructive or broad writes when the user has not already validated the target.
20
20
  - Do not invent knowledge base names, scopes, source display names, or JSON payloads. Ask the user or query known context when values are missing.
21
21
  - JSON flags must be valid JSON strings, usually wrapped in single quotes in shell commands.
22
- - Successful commands return JSON by default. Use `--format table` only when a table is easier for a human to scan.
22
+ - Successful commands return JSON by default. Use `--format table` only when a table is easier for a human to scan. Envelope may include optional `_notice.host_compat`.
23
23
  - `--host <url>` overrides the active AE host. It is available on every command and may be placed after the subcommand, e.g. `ae-cli kb +<command> --host <url>`.
24
+ - **CRITICAL — Host compat (do this first):** After each `ae-cli` run, check stderr and `_notice.host_compat`. If either is present, open the user reply with a short ⚠️ version warning and **quote the `npm i -g` / `npx skills add` (or update-cluster) lines verbatim**, then present the business result. Soft tip; `ok: true` can still carry the notice.
24
25
  - For external-agent retrieval, prefer the deterministic flow `+index` -> `+grep` -> `+read`: inspect navigation, locate candidate pages, then open the exact page or line window. Use `+ask` only when the user wants an LLM-synthesized answer and accepts token consumption.
25
26
 
26
27
  ## Commands
@@ -29,6 +30,7 @@ ae-cli kb +<command> [options]
29
30
  |---|---:|---|
30
31
  | `+query` | read | Query one or more knowledge bases with a natural-language question. |
31
32
  | `+ask` | read | LLM-powered Q&A over knowledge bases. Consumes platform tokens. |
33
+ | `+list` | read | List accessible knowledge bases filtered by buildStatus (default: compiled). |
32
34
  | `+index` | read | List accessible knowledge bases and their `index.md` navigation maps. |
33
35
  | `+grep` | read | Keyword-search knowledge base pages and return matched lines with context. |
34
36
  | `+read` | read | Read a full knowledge base page or a line window. |
@@ -145,21 +147,35 @@ ae-cli kb +ask \
145
147
  --question "How do we troubleshoot payment alerts?" \
146
148
  --sources '[{"scope":"company","name":"engineering-handbook"}]' \
147
149
  --model-id claude-sonnet-4-6 \
148
- --max-turns 10 \
150
+ --max-turns 50 \
149
151
  --locale zh
150
152
  ```
151
153
 
152
154
  - `--question`, alias `-q`: required natural-language question (1-2000 characters).
153
155
  - `--sources`: optional JSON array of knowledge base refs. Omit to search all accessible knowledge bases.
154
156
  - `--model-id`: optional LLM model ID. Omit to use the platform default.
155
- - `--max-turns`: optional agent turn limit (1-20, server default 10).
157
+ - `--max-turns`: optional agent turn limit (1-100, server default 50).
156
158
  - `--locale`: optional locale: `zh`, `en`, `ja`, or `ko`.
157
159
 
160
+ ### List Accessible Knowledge Bases
161
+
162
+ Use `+list` when you only need accessible knowledge base metadata without loading `index.md` navigation maps. By default it returns knowledge bases with `buildStatus: compiled`:
163
+
164
+ ```bash
165
+ ae-cli kb +list
166
+ ae-cli kb +list --locale zh
167
+ ae-cli kb +list --build-status compiled
168
+ ```
169
+
158
170
  ### Explore Knowledge Base Pages
159
171
 
160
172
  Use the deterministic retrieval primitives when an agent needs to explore knowledge base content like a code repository. These endpoints do not call an LLM on the server side.
161
173
 
162
- Start with `+index` to see accessible knowledge bases and navigation maps:
174
+ Start with `+list` or `+index` to discover accessible knowledge bases. Use `+index` when you also need navigation maps:
175
+
176
+ ```bash
177
+ ae-cli kb +list
178
+ ```
163
179
 
164
180
  ```bash
165
181
  ae-cli kb +index \
@@ -187,6 +203,7 @@ ae-cli kb +read \
187
203
 
188
204
  Retrieval rules:
189
205
 
206
+ - `+list` accepts optional `--build-status` (default `compiled`) and `--locale`. Returns accessible knowledge base metadata including `buildStatus`, without `index.md` navigation maps.
190
207
  - `+index` accepts optional `--sources` and `--locale`; omit `--sources` to list all accessible knowledge bases.
191
208
  - `+grep` requires `--query` / `-q`; optional `--sources`, `--top-k` (1-50, default 10), and `--locale`.
192
209
  - `+read` requires `--source` pointing to exactly one knowledge base and `--path` relative to the knowledge base root; optional `--offset`, `--limit` (1-10000), and `--locale`.
@@ -226,16 +243,26 @@ ae-cli kb +query --query "<question>" --sources '[{"scope":"company","name":"kb-
226
243
  ### `+ask`
227
244
 
228
245
  ```bash
229
- ae-cli kb +ask --question "<question>" [--sources '[{"scope":"company","name":"kb-name"}]'] [--model-id claude-sonnet-4-6] [--max-turns 10] [--locale zh|en|ja|ko]
246
+ ae-cli kb +ask --question "<question>" [--sources '[{"scope":"company","name":"kb-name"}]'] [--model-id claude-sonnet-4-6] [--max-turns 50] [--locale zh|en|ja|ko]
230
247
  ```
231
248
 
232
249
  - `--question`, alias `-q`: required natural-language question (1-2000 characters).
233
250
  - `--sources`: optional JSON array of knowledge base refs. Omit to search all accessible knowledge bases.
234
251
  - `--model-id`: optional LLM model ID. Omit to use the platform default.
235
- - `--max-turns`: optional agent turn limit, 1-20, server default 10.
252
+ - `--max-turns`: optional agent turn limit (1-100, server default 50).
236
253
  - `--locale`: optional locale: `zh`, `en`, `ja`, or `ko`.
237
254
  - **Token cost**: this command invokes an LLM on the server and consumes platform tokens. Prefer `+index` -> `+grep` -> `+read` for token-free deterministic retrieval.
238
255
 
256
+ ### `+list`
257
+
258
+ ```bash
259
+ ae-cli kb +list [--build-status compiled] [--locale zh|en|ja|ko]
260
+ ```
261
+
262
+ - `--build-status`: optional build status filter (default: `compiled`).
263
+ - `--locale`: optional locale: `zh`, `en`, `ja`, or `ko`.
264
+ - Response items include `buildStatus`.
265
+
239
266
  ### `+index`
240
267
 
241
268
  ```bash
@@ -21,8 +21,9 @@ Parallel to **`ae-analysis`** (MCP `analysis_meta` for metadata lists/governance
21
21
  | `--dry-run` | Optional: confirm ready to run (`/dry-run`). Alone for risk/output preview. Do not stack with `--validate`. |
22
22
 
23
23
  Output and errors:
24
- - Success: JSON envelope (default).
24
+ - Success: JSON envelope (default). May include optional `_notice.host_compat`.
25
25
  - Failure: `{ "ok": false, "error": { "type", "message", "hint" } }`, non-zero exit.
26
+ - **CRITICAL — Host compat (do this first):** After each `ae-cli` run, check stderr and `_notice.host_compat`. If either is present, open the user reply with a short ⚠️ version warning and **quote the `npm i -g` / `npx skills add` (or update-cluster) lines verbatim**, then present the business result. Soft tip; `ok: true` can still carry the notice.
26
27
 
27
28
  Safety:
28
29
  - Read-only commands can run directly after IDs/names are verified.
@@ -87,5 +88,5 @@ ae-cli analysis input-file purpose list --project-id 1
87
88
 
88
89
  ## Related Skills
89
90
 
90
- - **`ae-analysis`**: `analysis_meta +list_events` / `+list_properties` to discover names before detail get.
91
+ - **`ae-analysis`**: `analysis-meta event list` / `analysis-meta property list` to discover names before detail get.
91
92
  - **Dev workflow**: `.cursor/skills/te-cli-capability-gateway` — inspect gateway schema when adding new metadata capabilities.
@@ -35,18 +35,18 @@ Gateway request body uses snake_case `input`:
35
35
 
36
36
  ## Decision Rules
37
37
 
38
- - Prefer **`metadata event get`** over `analysis_meta +list_events` when you need **full detail + virtual definition**, not browsing or fuzzy search.
39
- - Use `ae-analysis` → `analysis_meta +list_events` first when the event name is unknown or you need keyword search / pagination.
38
+ - Prefer **`metadata event get`** over `analysis-meta event list` when you need **full detail + virtual definition**, not browsing or fuzzy search.
39
+ - Use `ae-analysis` → `analysis-meta event list` first when the event name is unknown or you need keyword search / pagination.
40
40
  - If the gateway returns `EVENT_NOT_FOUND`, verify `event_name` spelling and `project_id`; do not invent names.
41
41
  - Auth: `cli-token` header (ae-cli injects automatically in sandbox; local CLI uses `getCliToken()`).
42
42
 
43
43
  ## Recommended Chaining
44
44
 
45
- - `ae-analysis`: `analysis_meta +list_events` (discover name) → `metadata event get` (detail)
45
+ - `ae-analysis`: `analysis-meta event list` (discover name) → `metadata event get` (detail)
46
46
  - `metadata event get` → `metadata property get` (inspect properties listed in response)
47
47
 
48
48
  ## Next Steps After Failure
49
49
 
50
- - Empty or not found: confirm project id and exact `event_name` from `+list_events`.
50
+ - Empty or not found: confirm project id and exact `event_name` from `analysis-meta event list`.
51
51
  - Permission error: confirm metadata view permission in the project.
52
52
  - Gateway unavailable: confirm nginx routes `/api/cli/metadata/` and backend capability catalog is deployed.
@@ -22,6 +22,6 @@ ae-cli metadata property bind-existing-dimension-table --project-id <project_id>
22
22
 
23
23
  ## Decision Rules
24
24
 
25
- - Confirm the property with `metadata property get` or `analysis_meta +list_properties`.
25
+ - Confirm the property with `metadata property get` or `analysis-meta property list`.
26
26
  - Confirm the data table with `metadata data-table get`.
27
27
  - This is an ordinary `write` command and does not require CLI confirmation.
@@ -37,18 +37,18 @@ Gateway request body uses snake_case `input`:
37
37
 
38
38
  ## Decision Rules
39
39
 
40
- - Prefer **`metadata property get`** over `analysis_meta +list_properties` when you need **full detail + virtual definition**, not browsing or fuzzy search.
41
- - Use `ae-analysis` → `analysis_meta +list_properties` first when the property name is unknown or you need keyword search / pagination.
40
+ - Prefer **`metadata property get`** over `analysis-meta property list` when you need **full detail + virtual definition**, not browsing or fuzzy search.
41
+ - Use `ae-analysis` → `analysis-meta property list` first when the property name is unknown or you need keyword search / pagination.
42
42
  - `property_scope` must be exactly `event` or `user` (backend accepts case-insensitive).
43
43
  - Virtual / dict / exchange-rate properties are addressed by `property-name` only; do not pass legacy `prop_name`.
44
44
  - Event-scoped names like `#account_id` must be passed literally (quote in shell when `#` is present).
45
45
 
46
46
  ## Recommended Chaining
47
47
 
48
- - `ae-analysis`: `analysis_meta +list_properties` (discover name + scope) → `metadata property get` (detail)
48
+ - `ae-analysis`: `analysis-meta property list` (discover name + scope) → `metadata property get` (detail)
49
49
  - `metadata event get` → `metadata property get` (follow properties from event detail)
50
50
 
51
51
  ## Next Steps After Failure
52
52
 
53
- - Not found: confirm scope (`event` vs `user`) and exact name from `+list_properties`.
53
+ - Not found: confirm scope (`event` vs `user`) and exact name from `analysis-meta property list`.
54
54
  - Permission error: confirm metadata view permission in the project.
@@ -25,8 +25,9 @@ Global parameters:
25
25
  | `--dry-run` | Show request details without executing. |
26
26
 
27
27
  Output and errors:
28
- - Successful commands return machine-readable JSON by default.
28
+ - Successful commands return machine-readable JSON by default. Envelope may include optional `_notice.host_compat`.
29
29
  - Failed commands return `{ "ok": false, "error": { "type": "...", "message": "...", "hint": "..." } }` and exit non-zero.
30
+ - **CRITICAL — Host compat (do this first):** If stderr or `_notice.host_compat` has a version warning, open the user reply with ⚠️ and **quote `npm i -g` / `npx skills add` (or update-cluster) lines verbatim**, then list projects/results. Never omit when summarizing. Soft tip; `ok: true` may still include the notice.
30
31
 
31
32
  Safety constraints:
32
33
  - Read commands (`+list`, `+list-templates`, `+list-projects`, `+run-result`, `+run-artifacts`, `+ai-generate`) can execute directly once required IDs are known.
@@ -1,11 +0,0 @@
1
- // src/core/errors.ts
2
- var PermissionError = class extends Error {
3
- constructor(message) {
4
- super(message);
5
- this.name = "PermissionError";
6
- }
7
- };
8
-
9
- export {
10
- PermissionError
11
- };
@@ -1,129 +0,0 @@
1
- import {
2
- logger
3
- } from "./chunk-YCLVYFK7.js";
4
-
5
- // src/framework/output.ts
6
- import Table from "cli-table3";
7
- import { JqError, json as jqJson } from "jq-wasm";
8
- var KNOWN_ARRAY_FIELDS = [
9
- "items",
10
- "events",
11
- "reports",
12
- "dashboards",
13
- "tags",
14
- "clusters",
15
- "flows",
16
- "tasks",
17
- "channels",
18
- "nodes",
19
- "members",
20
- "records",
21
- "entities",
22
- "metrics",
23
- "tables",
24
- "columns",
25
- "properties"
26
- ];
27
- var OUTPUT_METADATA = /* @__PURE__ */ Symbol("ae-cli-output-metadata");
28
- function withOutputMetadata(data, meta) {
29
- if (!meta || Object.keys(meta).length === 0) return data;
30
- return {
31
- [OUTPUT_METADATA]: true,
32
- data,
33
- meta
34
- };
35
- }
36
- function isOutputWithMetadata(value) {
37
- return Boolean(value?.[OUTPUT_METADATA]);
38
- }
39
- function findArrayField(data) {
40
- if (Array.isArray(data)) return data;
41
- if (typeof data !== "object" || data === null) return null;
42
- for (const key of KNOWN_ARRAY_FIELDS) {
43
- if (Array.isArray(data[key])) return data[key];
44
- }
45
- for (const key of Object.keys(data)) {
46
- if (Array.isArray(data[key])) return data[key];
47
- }
48
- return null;
49
- }
50
- function formatTable(data) {
51
- const rows = findArrayField(data);
52
- if (!rows || rows.length === 0) {
53
- return JSON.stringify(data, null, 2);
54
- }
55
- const allKeys = /* @__PURE__ */ new Set();
56
- for (const row of rows) {
57
- if (typeof row === "object" && row !== null) {
58
- Object.keys(row).forEach((k) => allKeys.add(k));
59
- }
60
- }
61
- const keys = Array.from(allKeys);
62
- if (keys.length === 0) return JSON.stringify(rows, null, 2);
63
- const table = new Table({ head: keys, wordWrap: true });
64
- for (const row of rows) {
65
- table.push(keys.map((k) => {
66
- const v = row?.[k];
67
- if (v === void 0 || v === null) return "";
68
- if (typeof v === "object") return JSON.stringify(v);
69
- return String(v);
70
- }));
71
- }
72
- return table.toString();
73
- }
74
- async function applyJq(data, expr) {
75
- const trimmed = expr.trim();
76
- if (!trimmed) return data;
77
- let results;
78
- try {
79
- results = await jqJson(data, trimmed);
80
- } catch (err) {
81
- const message = err instanceof JqError ? err.message : err?.message || String(err);
82
- const error = new Error(`Invalid --jq expression: ${message}`);
83
- error.type = "validation";
84
- error.hint = "Use standard jq syntax, e.g. .status or {status,pendingQuestion}";
85
- throw error;
86
- }
87
- if (results.length === 0) return null;
88
- if (results.length === 1) return results[0];
89
- return results;
90
- }
91
- async function formatOutput(data, format, jqExpr) {
92
- const outputData = isOutputWithMetadata(data) ? data.data : data;
93
- const meta = isOutputWithMetadata(data) ? data.meta : void 0;
94
- let processed = outputData;
95
- if (jqExpr) {
96
- processed = await applyJq(outputData, jqExpr);
97
- }
98
- if (format === "table") {
99
- return formatTable(processed);
100
- }
101
- const envelope = {
102
- ok: true,
103
- data: processed,
104
- ...meta ? { meta } : {}
105
- };
106
- return JSON.stringify(envelope, null, 2);
107
- }
108
- function formatError(type, message, hint, code, meta) {
109
- const envelope = {
110
- ok: false,
111
- error: { type, message, hint, code },
112
- ...meta && Object.keys(meta).length > 0 ? { meta } : {}
113
- };
114
- return JSON.stringify(envelope, null, 2);
115
- }
116
- function printError(type, message, hint, code, meta) {
117
- const formatted = formatError(type, message, hint, code, meta);
118
- process.stderr.write(formatted + "\n");
119
- logger.error(`[${type}] ${message}${hint ? " | " + hint : ""}`);
120
- }
121
- async function printOutput(data, format, jqExpr) {
122
- process.stdout.write(await formatOutput(data, format, jqExpr) + "\n");
123
- }
124
-
125
- export {
126
- withOutputMetadata,
127
- printError,
128
- printOutput
129
- };