@thinkingai/ae-cli 6.0.58 → 6.0.61

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 (281) hide show
  1. package/README.md +14 -6
  2. package/README.zh.md +16 -6
  3. package/bin/ai-monitor.js +2 -0
  4. package/bin/runtime-capabilities.json +1 -1
  5. package/dist/ai-monitor-NUKSJPLE.js +33 -0
  6. package/dist/ai-monitor.js +136 -0
  7. package/dist/{auth-A5OO4VS4.js → auth-MVAEBGBP.js} +24 -15
  8. package/dist/{automation-FD2QZUP6.js → automation-6L6IAYRK.js} +6 -7
  9. package/dist/{capability-SKI4GHF4.js → capability-74N7AN5X.js} +35 -38
  10. package/dist/{chunk-OAWPT7VP.js → chunk-2I5SZ5DS.js} +2 -2
  11. package/dist/{chunk-QWSA3EOD.js → chunk-7WBCSJL6.js} +23 -9
  12. package/dist/{chunk-4PSTYEG5.js → chunk-AMURHMS3.js} +11 -7
  13. package/dist/{chunk-KPQY44JQ.js → chunk-AWW2T2WL.js} +3 -0
  14. package/dist/chunk-BQFLABJQ.js +186 -0
  15. package/dist/{chunk-E25OSZLJ.js → chunk-COOMXFUG.js} +3 -3
  16. package/dist/chunk-EFGUBGA6.js +64 -0
  17. package/dist/{chunk-HQCY3QCA.js → chunk-H35VDOAE.js} +18 -13
  18. package/dist/{chunk-VDICGXCY.js → chunk-HIMOBNEY.js} +2 -2
  19. package/dist/{chunk-JEUXDY3B.js → chunk-HQED4YB4.js} +1 -1
  20. package/dist/chunk-HRFYYEXR.js +1285 -0
  21. package/dist/{chunk-UYJMEHAF.js → chunk-JZY6WWAP.js} +22 -21
  22. package/dist/{chunk-2F64AZYH.js → chunk-KA5WKR5P.js} +2 -2
  23. package/dist/{chunk-YVG6QD3V.js → chunk-LFJ7N36I.js} +103 -8
  24. package/dist/{chunk-EEARZNHE.js → chunk-LPKIMGIU.js} +89 -37
  25. package/dist/chunk-NNK3JBH4.js +60 -0
  26. package/dist/{chunk-WMDO53YK.js → chunk-OTZ4JQDU.js} +2 -2
  27. package/dist/{chunk-SOSFRU3O.js → chunk-PLNS5J33.js} +58 -26
  28. package/dist/chunk-PUSFEC6B.js +29 -0
  29. package/dist/{chunk-Z3Q2AEIN.js → chunk-R2SVAO4G.js} +14 -2
  30. package/dist/{chunk-K2Z7QHDR.js → chunk-RB26WNLM.js} +52 -15
  31. package/dist/chunk-SVNED423.js +556 -0
  32. package/dist/{chunk-AWVZTN2B.js → chunk-THTROEGD.js} +1 -1
  33. package/dist/{chunk-QVRIDN42.js → chunk-UCMO4LKL.js} +2 -2
  34. package/dist/{chunk-JSBLCLFE.js → chunk-VLOGOM7N.js} +13 -7
  35. package/dist/{chunk-GBSACKFB.js → chunk-XPARQSYS.js} +528 -299
  36. package/dist/{chunk-72NJKS7O.js → chunk-XZDKAR4N.js} +4 -4
  37. package/dist/{community-report-client-TJVCLZ3K.js → community-report-client-ULRNXLQV.js} +1 -1
  38. package/dist/{compat-check-WFEKVLTH.js → compat-check-W4XC27RG.js} +5 -4
  39. package/dist/{config-U4I7X25P.js → config-264GB6C7.js} +28 -14
  40. package/dist/{context-CDB5H5PD.js → context-SOQDFZIB.js} +8 -6
  41. package/dist/{data-integration-QE37EQ3A.js → data-integration-UNJ7EPW2.js} +6 -6
  42. package/dist/{evaluation-LR4YDYWL.js → evaluation-Q3AIGFOG.js} +14 -159
  43. package/dist/index.js +98 -589
  44. package/dist/{local-data-upload-client-KCMG6J62.js → local-data-upload-client-YTWMAAGE.js} +1 -1
  45. package/dist/{memory-SNFR5M23.js → memory-ZLTTULZK.js} +9 -10
  46. package/dist/{metadata-6QM6EED5.js → metadata-EN2IWCDI.js} +11 -10
  47. package/dist/{model-KEVCEXWD.js → model-NAKQWK4W.js} +4 -5
  48. package/dist/{personal-semantic-preference-7VXQPP2N.js → personal-semantic-preference-UGN67KTN.js} +46 -15
  49. package/dist/{project-semantic-PSEPYH2L.js → project-semantic-5OP3YPZD.js} +19 -16
  50. package/dist/{sync-22ACDK5Z.js → sync-LDJQZRQH.js} +9 -9
  51. package/dist/{te-agent-BJ36B4QI.js → te-agent-WNNAD4AJ.js} +303 -17
  52. package/dist/{te-analysis-WQ6D6YG4.js → te-analysis-KIMH6AGU.js} +399 -205
  53. package/dist/{te-community-VRWMFGI6.js → te-community-P7NNBVCS.js} +17 -15
  54. package/dist/{te-dataops-YTLFTTW7.js → te-dataops-ZRKSG4R7.js} +13 -11
  55. package/dist/{te-engage-V2QW7TIC.js → te-engage-PVBVNRSU.js} +13 -12
  56. package/dist/{te-kb-4AQLISDR.js → te-kb-W7PRC7QN.js} +80 -20
  57. package/dist/{te-system-CYWSK3UN.js → te-system-F4ZU2HRQ.js} +6 -7
  58. package/dist/{te-team-6ELNGBWT.js → te-team-5ONMRGKF.js} +9 -8
  59. package/dist/{things-HFWLGCUH.js → things-PFENSIF4.js} +9 -8
  60. package/dist/{update-3CRVVHV5.js → update-EUZ4GNND.js} +8 -6
  61. package/dist/{workspace-2CKQX2XL.js → workspace-Z7L33OBQ.js} +6 -7
  62. package/package.json +12 -7
  63. package/skills/ae-agent/SKILL.md +19 -5
  64. package/skills/ae-agent/references/a2a.md +103 -0
  65. package/skills/ae-agent/references/command_index.md +11 -0
  66. package/skills/ae-ai-monitor/SKILL.md +179 -0
  67. package/skills/ae-ai-monitor/references/read-commands.md +866 -0
  68. package/skills/ae-analysis/SKILL.md +43 -25
  69. package/skills/ae-analysis/references/adhoc_export.md +3 -1
  70. package/skills/ae-analysis/references/ai_models.md +1 -0
  71. package/skills/ae-analysis/references/analysis_data_retrieval.md +1 -1
  72. package/skills/ae-analysis/references/analysis_gateway_assets.md +2 -0
  73. package/skills/ae-analysis/references/asset_authentication_export.md +1 -1
  74. package/skills/ae-analysis/references/asset_authentication_update.md +6 -2
  75. package/skills/ae-analysis/references/asset_search.md +1 -1
  76. package/skills/ae-analysis/references/bad_case_begin.md +12 -0
  77. package/skills/ae-analysis/references/bad_case_get.md +12 -0
  78. package/skills/ae-analysis/references/bad_case_history.md +12 -0
  79. package/skills/ae-analysis/references/bad_case_list.md +12 -0
  80. package/skills/ae-analysis/references/bad_case_review.md +51 -0
  81. package/skills/ae-analysis/references/bad_case_run.md +12 -0
  82. package/skills/ae-analysis/references/bad_case_submit.md +12 -0
  83. package/skills/ae-analysis/references/bad_case_submit_to_page.md +12 -0
  84. package/skills/ae-analysis/references/bad_case_sync_evaluation.md +11 -0
  85. package/skills/ae-analysis/references/bi_panel_list.md +1 -1
  86. package/skills/ae-analysis/references/bi_panel_share.md +3 -1
  87. package/skills/ae-analysis/references/catalog_list.md +2 -0
  88. package/skills/ae-analysis/references/command_index.md +44 -35
  89. package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
  90. package/skills/ae-analysis/references/dashboard_handover.md +3 -1
  91. package/skills/ae-analysis/references/dashboard_list.md +3 -3
  92. package/skills/ae-analysis/references/dashboard_report_data_export.md +1 -1
  93. package/skills/ae-analysis/references/dashboard_share.md +3 -1
  94. package/skills/ae-analysis/references/dashboard_update.md +3 -2
  95. package/skills/ae-analysis/references/filter_value_list.md +2 -0
  96. package/skills/ae-analysis/references/folder_share.md +8 -2
  97. package/skills/ae-analysis/references/governance_recommendation_export.md +2 -2
  98. package/skills/ae-analysis/references/governance_recommendation_run_update.md +3 -1
  99. package/skills/ae-analysis/references/personal_semantic_preference_add.md +9 -1
  100. package/skills/ae-analysis/references/personal_semantic_preference_delete.md +2 -0
  101. package/skills/ae-analysis/references/personal_semantic_preference_get.md +2 -0
  102. package/skills/ae-analysis/references/personal_semantic_preference_list.md +10 -2
  103. package/skills/ae-analysis/references/personal_semantic_preference_update.md +8 -0
  104. package/skills/ae-analysis/references/project_data_power_upsert.md +3 -1
  105. package/skills/ae-analysis/references/project_mark_time_create.md +2 -0
  106. package/skills/ae-analysis/references/project_mark_time_update.md +2 -0
  107. package/skills/ae-analysis/references/project_member_add.md +3 -1
  108. package/skills/ae-analysis/references/project_member_batch_update.md +3 -1
  109. package/skills/ae-analysis/references/project_member_handover_run.md +3 -1
  110. package/skills/ae-analysis/references/project_member_update.md +3 -1
  111. package/skills/ae-analysis/references/project_owner_update.md +8 -2
  112. package/skills/ae-analysis/references/project_role_upsert.md +5 -3
  113. package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +16 -1
  114. package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +14 -1
  115. package/skills/ae-analysis/references/project_space_share.md +8 -2
  116. package/skills/ae-analysis/references/property_get.md +2 -0
  117. package/skills/ae-analysis/references/public_link_list.md +3 -1
  118. package/skills/ae-analysis/references/query_cancel.md +4 -1
  119. package/skills/ae-analysis/references/report_data_run.md +1 -1
  120. package/skills/ae-analysis/references/report_list.md +3 -3
  121. package/skills/ae-analysis/references/scenario_append.md +2 -2
  122. package/skills/ae-analysis/references/scenario_collect.md +15 -4
  123. package/skills/ae-analysis/references/scenario_evaluation.md +17 -1
  124. package/skills/ae-analysis/references/scenario_list.md +7 -7
  125. package/skills/ae-analysis/references/system_oauth2_update.md +3 -1
  126. package/skills/ae-analysis/references/system_third_party_login_upsert.md +4 -2
  127. package/skills/ae-analysis/references/user_tag_create.md +4 -1
  128. package/skills/ae-analysis/references/user_tag_get.md +2 -0
  129. package/skills/ae-analysis/references/user_tag_models.md +8 -2
  130. package/skills/ae-analysis/references/user_tag_update.md +5 -2
  131. package/skills/ae-analysis/references/virtual_property_create.md +12 -1
  132. package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +10 -0
  133. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +55 -13
  134. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +2 -2
  135. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +2 -2
  136. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +7 -1
  137. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/wait-compile-run.mjs +79 -0
  138. package/skills/ae-automation/SKILL.md +4 -2
  139. package/skills/ae-capability/SKILL.md +16 -8
  140. package/skills/ae-community/SKILL.md +1 -0
  141. package/skills/ae-dataops/SKILL.md +1 -0
  142. package/skills/ae-engage/SKILL.md +1 -0
  143. package/skills/ae-evaluation/SKILL.md +17 -2
  144. package/skills/ae-generate-tracking-plan/SKILL.md +5 -0
  145. package/skills/ae-kb/SKILL.md +8 -4
  146. package/skills/ae-kb/references/analysis-workflow.md +11 -2
  147. package/skills/ae-kb/references/publication.md +45 -0
  148. package/skills/ae-kb/references/query-workflow.md +3 -1
  149. package/skills/ae-kb/references/versions.md +1 -1
  150. package/skills/ae-metadata/SKILL.md +1 -0
  151. package/skills/ae-migrate-tracking-code/SKILL.md +2 -1
  152. package/skills/ae-team/SKILL.md +1 -1
  153. package/skills/ae-tracking-matrix/SKILL.md +170 -0
  154. package/skills/ae-tracking-matrix/assets//345/237/213/347/202/271/346/250/241/347/211/210.xlsx +0 -0
  155. package/skills/ae-tracking-matrix/i18n.yaml +12 -0
  156. package/skills/ae-tracking-matrix/references/ae-capabilities.md +93 -0
  157. package/skills/ae-tracking-matrix/references/business-semantic-checks.md +30 -0
  158. package/skills/ae-tracking-matrix/references/categories/acquaintance_social_tracking_plan_template.md +256 -0
  159. package/skills/ae-tracking-matrix/references/categories/blockchain_game_tracking_plan_template.md +213 -0
  160. package/skills/ae-tracking-matrix/references/categories/card_game_tracking_plan_template.md +407 -0
  161. package/skills/ae-tracking-matrix/references/categories/casual_game_tracking_plan_template.md +218 -0
  162. package/skills/ae-tracking-matrix/references/categories/casual_music.md +112 -0
  163. package/skills/ae-tracking-matrix/references/categories/chess_cards_tracking_plan_template.md +301 -0
  164. package/skills/ae-tracking-matrix/references/categories/ecommerce_tracking_plan_template.md +356 -0
  165. package/skills/ae-tracking-matrix/references/categories/fishing.md +775 -0
  166. package/skills/ae-tracking-matrix/references/categories/game_basic_module_tracking_plan.md +89 -0
  167. package/skills/ae-tracking-matrix/references/categories/idle_card.md +27 -0
  168. package/skills/ae-tracking-matrix/references/categories/idle_game_tracking_plan_template.md +415 -0
  169. package/skills/ae-tracking-matrix/references/categories/interactive_video.md +133 -0
  170. package/skills/ae-tracking-matrix/references/categories/merge.md +639 -0
  171. package/skills/ae-tracking-matrix/references/categories/mmo_mobile_tracking_plan_template.md +406 -0
  172. package/skills/ae-tracking-matrix/references/categories/mmo_web.md +230 -0
  173. package/skills/ae-tracking-matrix/references/categories/music.md +137 -0
  174. package/skills/ae-tracking-matrix/references/categories/online_education_tracking_plan_template.md +414 -0
  175. package/skills/ae-tracking-matrix/references/categories/qipai_mj.md +199 -0
  176. package/skills/ae-tracking-matrix/references/categories/reading_tracking_plan_template.md +158 -0
  177. package/skills/ae-tracking-matrix/references/categories/roguelike_tracking_plan_template.md +546 -0
  178. package/skills/ae-tracking-matrix/references/categories/rpg.md +195 -0
  179. package/skills/ae-tracking-matrix/references/categories/short_drama_tracking_plan_template.md +115 -0
  180. package/skills/ae-tracking-matrix/references/categories/simulation_business_tracking_plan_template.md +151 -0
  181. package/skills/ae-tracking-matrix/references/categories/slg_tracking_plan_template.md +260 -0
  182. package/skills/ae-tracking-matrix/references/categories/slots_tracking_plan_template.md +232 -0
  183. package/skills/ae-tracking-matrix/references/categories/stranger_social_tracking_plan_template.md +359 -0
  184. package/skills/ae-tracking-matrix/references/categories/tower_defense.md +365 -0
  185. package/skills/ae-tracking-matrix/references/categories/video_editor_tracking_plan_template.md +211 -0
  186. package/skills/ae-tracking-matrix/references/categories/wechat_minigame.md +132 -0
  187. package/skills/ae-tracking-matrix/references/category-registry.md +77 -0
  188. package/skills/ae-tracking-matrix/references/data-verification/diagnosis_kb.md +230 -0
  189. package/skills/ae-tracking-matrix/references/data-verification/sql_checks.md +406 -0
  190. package/skills/ae-tracking-matrix/references/data-verification/tracking_plan_comparison.md +128 -0
  191. package/skills/ae-tracking-matrix/references/eval-cases.md +74 -0
  192. package/skills/ae-tracking-matrix/references/naming-dict.md +238 -0
  193. package/skills/ae-tracking-matrix/references/optimization-checklist.md +85 -0
  194. package/skills/ae-tracking-matrix/references/plan-generation/export-schema.md +142 -0
  195. package/skills/ae-tracking-matrix/references/plan-generation/module-baseline.md +47 -0
  196. package/skills/ae-tracking-matrix/references/plan-generation/reference.md +794 -0
  197. package/skills/ae-tracking-matrix/references/plan-generation/template-catalog.md +94 -0
  198. package/skills/ae-tracking-matrix/references/scene-routing.md +80 -0
  199. package/skills/ae-tracking-matrix/references/sdk/client-sdk/android.md +3787 -0
  200. package/skills/ae-tracking-matrix/references/sdk/client-sdk/c.md +827 -0
  201. package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-lua.md +655 -0
  202. package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-x.md +953 -0
  203. package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocoscreator.md +1128 -0
  204. package/skills/ae-tracking-matrix/references/sdk/client-sdk/corona.md +714 -0
  205. package/skills/ae-tracking-matrix/references/sdk/client-sdk/egret.md +1268 -0
  206. package/skills/ae-tracking-matrix/references/sdk/client-sdk/flutter.md +776 -0
  207. package/skills/ae-tracking-matrix/references/sdk/client-sdk/h5-and-app-sdk-integration.md +182 -0
  208. package/skills/ae-tracking-matrix/references/sdk/client-sdk/ios.md +2755 -0
  209. package/skills/ae-tracking-matrix/references/sdk/client-sdk/javascript.md +1182 -0
  210. package/skills/ae-tracking-matrix/references/sdk/client-sdk/layaair.md +1300 -0
  211. package/skills/ae-tracking-matrix/references/sdk/client-sdk/macos.md +1369 -0
  212. package/skills/ae-tracking-matrix/references/sdk/client-sdk/mini-program-mini-game.md +1692 -0
  213. package/skills/ae-tracking-matrix/references/sdk/client-sdk/openharmony.md +902 -0
  214. package/skills/ae-tracking-matrix/references/sdk/client-sdk/react-native.md +763 -0
  215. package/skills/ae-tracking-matrix/references/sdk/client-sdk/uni-app.md +1107 -0
  216. package/skills/ae-tracking-matrix/references/sdk/client-sdk/unity.md +1532 -0
  217. package/skills/ae-tracking-matrix/references/sdk/client-sdk/unreal.md +845 -0
  218. package/skills/ae-tracking-matrix/references/sdk/faq/android_sdk_faq.md +228 -0
  219. package/skills/ae-tracking-matrix/references/sdk/faq/ios_sdk_faq.md +149 -0
  220. package/skills/ae-tracking-matrix/references/sdk/faq/java_sdk_faq.md +407 -0
  221. package/skills/ae-tracking-matrix/references/sdk/faq/javascript_sdk_faq.md +163 -0
  222. package/skills/ae-tracking-matrix/references/sdk/faq/minigame_sdk_faq.md +149 -0
  223. package/skills/ae-tracking-matrix/references/sdk/faq/miniprogram_sdk_faq.md +153 -0
  224. package/skills/ae-tracking-matrix/references/sdk/faq/python_sdk_faq.md +232 -0
  225. package/skills/ae-tracking-matrix/references/sdk/faq/sdk_log_guide.md +314 -0
  226. package/skills/ae-tracking-matrix/references/sdk/faq/sdk_usage_notes.md +117 -0
  227. package/skills/ae-tracking-matrix/references/sdk/faq/unity_sdk_faq.md +148 -0
  228. package/skills/ae-tracking-matrix/references/sdk/integration-tools/filebeat-logstash-guide.md +645 -0
  229. package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_guide.md +307 -0
  230. package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_parser_plugin.md +347 -0
  231. package/skills/ae-tracking-matrix/references/sdk/integration-tools/restful_api_notes.md +72 -0
  232. package/skills/ae-tracking-matrix/references/sdk/integration-tools/ta-datax-writer-guide.md +264 -0
  233. package/skills/ae-tracking-matrix/references/sdk/server-sdk/c.md +566 -0
  234. package/skills/ae-tracking-matrix/references/sdk/server-sdk/erlang.md +409 -0
  235. package/skills/ae-tracking-matrix/references/sdk/server-sdk/golang.md +446 -0
  236. package/skills/ae-tracking-matrix/references/sdk/server-sdk/java.md +557 -0
  237. package/skills/ae-tracking-matrix/references/sdk/server-sdk/lua.md +457 -0
  238. package/skills/ae-tracking-matrix/references/sdk/server-sdk/nodejs.md +490 -0
  239. package/skills/ae-tracking-matrix/references/sdk/server-sdk/php.md +523 -0
  240. package/skills/ae-tracking-matrix/references/sdk/server-sdk/python.md +484 -0
  241. package/skills/ae-tracking-matrix/references/sdk/server-sdk/ruby.md +442 -0
  242. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/data-rules.md +391 -0
  243. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/first-event-validation.md +91 -0
  244. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/preset-properties-system-fields.md +635 -0
  245. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/updatable-events.md +113 -0
  246. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/user-identification-rules.md +466 -0
  247. package/skills/ae-tracking-matrix/references/standard-base/README.md +22 -0
  248. package/skills/ae-tracking-matrix/references/standard-base/basic_event_data.md +174 -0
  249. package/skills/ae-tracking-matrix/references/standard-base/common_event_properties.md +20 -0
  250. package/skills/ae-tracking-matrix/references/standard-base/common_event_properties_setup.md +7 -0
  251. package/skills/ae-tracking-matrix/references/standard-base/data_type_design_principles.md +14 -0
  252. package/skills/ae-tracking-matrix/references/standard-base/gameplay_event_data.md +370 -0
  253. package/skills/ae-tracking-matrix/references/standard-base/id_system_faq.md +47 -0
  254. package/skills/ae-tracking-matrix/references/standard-base/integration_must_know.md +37 -0
  255. package/skills/ae-tracking-matrix/references/standard-base/multi_platform_integration_notes.md +27 -0
  256. package/skills/ae-tracking-matrix/references/standard-base/multi_user_id_system_recommendations.md +23 -0
  257. package/skills/ae-tracking-matrix/references/standard-base/tracking_notes.md +14 -0
  258. package/skills/ae-tracking-matrix/references/standard-base/user_data.md +46 -0
  259. package/skills/ae-tracking-matrix/references/standard-base/user_id_system.md +13 -0
  260. package/skills/ae-tracking-matrix/references/system-fields.md +297 -0
  261. package/skills/ae-tracking-matrix/references/te-field-translations.md +1791 -0
  262. package/skills/ae-tracking-matrix/references/workflows/data-verification.md +232 -0
  263. package/skills/ae-tracking-matrix/references/workflows/feasibility-analysis.md +829 -0
  264. package/skills/ae-tracking-matrix/references/workflows/integration-qna.md +355 -0
  265. package/skills/ae-tracking-matrix/references/workflows/plan-generation.md +283 -0
  266. package/skills/ae-tracking-matrix/references/workflows/plan-lint.md +168 -0
  267. package/skills/ae-tracking-matrix/references/workflows/plan-review-optimize.md +205 -0
  268. package/skills/ae-tracking-matrix/references/workflows/prd-to-suggestions.md +75 -0
  269. package/skills/ae-tracking-matrix/references/workflows/troubleshooting.md +36 -0
  270. package/skills/ae-tracking-matrix/references/workflows/validated-upload.md +107 -0
  271. package/skills/ae-tracking-matrix/scripts/build_template_catalog.py +114 -0
  272. package/skills/ae-tracking-matrix/scripts/export_tracking_plan.py +53 -0
  273. package/skills/ae-tracking-matrix/scripts/finalize_plan.py +166 -0
  274. package/skills/ae-tracking-matrix/scripts/lint_tracking_plan.py +674 -0
  275. package/skills/ae-tracking-matrix/scripts/plan_contract.py +200 -0
  276. package/skills/ae-tracking-matrix/scripts/plan_types.py +60 -0
  277. package/skills/ae-tracking-matrix/scripts/prepare_delivery.py +169 -0
  278. package/skills/ae-tracking-matrix/scripts/sync_plan.py +296 -0
  279. package/skills/ae-tracking-matrix/scripts/upload_plan.py +340 -0
  280. package/dist/chunk-AMBFK2K3.js +0 -28
  281. package/dist/chunk-Y74WTIKJ.js +0 -10
package/README.md CHANGED
@@ -50,9 +50,9 @@ ae-cli auth status
50
50
 
51
51
  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).
52
52
 
53
- Business-based command filtering and Skill selection apply only to local CLI use by external Agents; built-in TE Agent sandboxes keep the complete command and Skill sets. After successful login, the CLI filters `--help` and capability discovery by the active environment’s enabled businesses and synchronizes managed global Skills. Analysis remains available by default. Run `ae-cli config refresh` after enabling a business to fetch its state and restore its Skills. Switching the active environment or account synchronizes again; a one-off `--host` query does not change global Skills.
53
+ Business-based command filtering and Skill selection apply only to local CLI use by external Agents; built-in TE Agent sandboxes keep the complete command and Skill sets. After successful login, the CLI filters `--help` and capability discovery by the active environment’s enabled businesses and synchronizes managed global Skills. Analysis remains available by default. Subsequent normal commands automatically synchronize managed Skills when a configuration refresh detects business changes; run `ae-cli config refresh` to refresh and synchronize immediately. Switching the active environment refreshes its business state and synchronizes only affected Skills, reusing the current set when no changes are needed. Terminal output summarizes Skill synchronization status and installation/removal counts; use `--format json` for per-directory details. Switching accounts synchronizes again; a one-off `--host` query does not change global Skills.
54
54
 
55
- Only explicitly disabled businesses are removed. Older servers, missing states, and network failures do not trigger removal. Legacy client links to a verified, unmodified managed shared Skill are migrated automatically; other modified or unrecognized copies are preserved and reported. Start a new Agent session after synchronization; existing conversation context is retained.
55
+ When a business is explicitly disabled, the CLI uses the Skill business mapping to remove CLI-installed copies and their legacy client links, even if their contents were edited or their versions are older. Base and analysis Skills remain available. AI Monitor belongs to the Agent component and follows its availability. Older servers, missing states, and network failures do not trigger removal; unrecognized copies are preserved and reported. Start a new Agent session after synchronization; existing conversation context is retained.
56
56
 
57
57
  ## Environment-Bound Updates
58
58
 
@@ -67,7 +67,7 @@ Updates use the same global Skills installation and verification as `install`. O
67
67
 
68
68
  Automatic synchronization runs during normal commands after login; host version checks are cached for up to one hour. `ae-cli update --host <AE_HOST>` checks immediately. After a downgrade, future updates run the older CLI's own updater, including its historical limitations. To use the new installer logic while following an older host, run `npx @thinkingai/ae-cli@latest update --host <AE_HOST>`; the target remains the host-required version.
69
69
 
70
- `ae-cli update` installs the exact version required by the active host rather than npm `latest`. Skills are synchronized from the verified target package; modified or unrecognized copies are preserved and reported.
70
+ `ae-cli update` installs the exact version required by the active host rather than npm `latest`. Skills are synchronized from the verified target package. Installation and updates preserve and report user-edited or unrecognized copies; explicitly disabled businesses still remove CLI-installed copies as described above.
71
71
 
72
72
  Starting with the `6.0.37` and `6.1.9` release lines, ordinary business commands can automatically upgrade or downgrade the CLI to the host-required version, including switching from `6.0.x` to `6.1.x`. Automatic synchronization requires stable `major.minor.patch` versions at both ends; development and other nonstandard versions are skipped. After successful synchronization, the new CLI automatically executes the original command once and returns its result and exit code. Arguments, piped input, working directory, and confirmation behavior are preserved. If the new CLI cannot start, `AE_CLI_VERSION_SYNCED` asks you to re-run manually; an executed command is never retried automatically. Installation failures are reported without replacing the business command's JSON output.
73
73
 
@@ -108,7 +108,7 @@ ae-cli capability dry-run analysis.dashboard.list --input '{"project_id":1}'
108
108
  ae-cli capability run analysis.dashboard.list --input '{"project_id":1}'
109
109
 
110
110
  # Filter structured output
111
- ae-cli capability list --domain analysis --jq '.data.capabilities[] | .id'
111
+ ae-cli capability list --domain analysis --jq '.capabilities[] | .id'
112
112
  ```
113
113
 
114
114
  ## Command Map
@@ -123,8 +123,9 @@ The table covers every current root command individually. Use `ae-cli --help` fo
123
123
  | Analysis and projects | `analysis-governance` | Data-asset search, lineage, impact analysis, certification, and governance |
124
124
  | Analysis and projects | `project` | Project information, members, roles, permissions, entities, time zones, and handover settings |
125
125
  | Analysis and projects | `metadata` | Capability-backed data-table, property, and dimension-table binding operations |
126
- | Analysis and projects | `personal-semantic-preference` | Project-scoped lightweight semantic preferences for the current user |
127
- | Analysis and projects | `project-semantic` | Export project asset packages for knowledge-base builds |
126
+ | Analysis and projects | `personal-semantic-preference` | Current-user semantic preferences for a project or across projects (`--project-id -1`) |
127
+ | Analysis and projects | `project-semantic` | Asset-package export for building a project knowledge base |
128
+ | Observability | `ai-monitor` | Read traces, conversations, Bad Traces, metrics, cost, security and existing diagnosis reports; export verified ZIPs ([guide](skills/ae-ai-monitor/SKILL.md)) |
128
129
  | Data and tracking | `tracking` | Tracking plans, SDK samples, checks, ingestion diagnostics, code generation, and bundled wiki |
129
130
  | Data and tracking | `data-integration` | Inspect, plan, convert, upload, hand off, and reuse local CSV/JSON/Excel data |
130
131
  | Community insights | `community` | Community posts, comments, topics, sentiment, livestream, and report workflows |
@@ -162,6 +163,8 @@ The table covers every current root command individually. Use `ae-cli --help` fo
162
163
 
163
164
  Review collected analysis questions with `ae-cli analysis scenario list --project-id 1 --days 7`. The `ae-analysis` Skill can deduplicate questions and assess badcases with concise, evidence-based reasons. See the [scenario review guide](skills/ae-analysis/references/scenario_list.md). Answers can include elapsed time; use `ae-cli analysis scenario get --help` to query linked command execution details.
164
165
 
166
+ To save and review Bad Cases, use `ae-cli analysis bad-case --help`. The Agent semantically deduplicates each batch against all historical states. Review in CLI or explicitly submit to the page; each batch reports discovered, duplicate, and new counts. Notes are optional. Approval adds the case to the bound AE dataset; revoking approval removes it. See the [Bad Case workflow](skills/ae-analysis/references/bad_case_review.md).
167
+
165
168
  Evaluation commands follow the current AE Host in personal terminals and sandboxes; use `--host` to select another host. Evaluation requests use the HTTP or HTTPS scheme configured for that AE Host, consistent with other AE commands. Legacy `--endpoint` and `AE_EVAL_BASE_URL` values may only match the current AE Host; other values fail before credentials are sent. Remove these settings and use `--host` to select a host. Outside a sandbox, export `AE_EVAL_ACCESS_TOKEN` with a platform session token; sandboxes can obtain a session automatically. See [endpoint and authentication rules](skills/ae-evaluation/SKILL.md#endpoint-and-authentication).
166
169
 
167
170
  ## Capability Gateway
@@ -262,6 +265,7 @@ Commands return a stable envelope:
262
265
  - `--format json` is the default and is recommended for Agents.
263
266
  - `--format table` is available for supported human-facing list commands.
264
267
  - `--jq <expr>` applies jq 1.8 filtering to the business payload before the output envelope is printed.
268
+ - The jq input is the command payload, not the outer `{ok,data,meta}` envelope. Use `.capabilities[] | .id` inside the CLI; use `.data.capabilities[]` only with an external jq over saved final JSON.
265
269
  - `--validate` normalizes Capability Gateway input without business execution.
266
270
  - `--dry-run` previews an operation without executing its business logic.
267
271
  - `--yes` skips interactive confirmation for explicitly marked high-risk writes.
@@ -288,6 +292,7 @@ ae-cli kb +rm-source --name engineering-handbook --scope company --display-name
288
292
  ae-cli kb +schema --name engineering-handbook --scope company --model <model-ref>
289
293
  ae-cli kb +compile --name engineering-handbook --scope company --model <model-ref>
290
294
  ae-cli kb +status --name engineering-handbook --scope company
295
+ ae-cli kb +status --name engineering-handbook --scope company --run-id <compile-run-id>
291
296
  ae-cli kb +ask -q "How is the sandbox configured?"
292
297
  # Submit only, poll later:
293
298
  ae-cli kb +ask -q "Another question" --no-wait
@@ -425,3 +430,6 @@ npm run verify:install
425
430
  ## License
426
431
 
427
432
  MIT
433
+
434
+
435
+ Use `ae-cli agent a2a +card --url <A2A-link>` to discover authorized workspaces and models, then pass `--space-id <id>` and `--model <id>` to `agent a2a +send`. Use `agent a2a list`, `cancel`, and `delete-context` to manage tasks and conversations. See the [A2A command reference](skills/ae-agent/references/a2a.md).
package/README.zh.md CHANGED
@@ -54,9 +54,9 @@ ae-cli auth status
54
54
 
55
55
  请使用 AgenticEngine 管理员提供的 AE 地址。未配置 Host 时,`ae-cli` 会先引导已有客户向管理员获取地址;只有确认尚无 AgenticEngine 环境的用户,才会看到[申请试用](https://thinkingai.cn/request-demo)入口。
56
56
 
57
- 按业务过滤命令和剪裁 Skills 仅适用于外部 Agent 使用的本机 CLI;TE Agent 内置沙箱始终保留完整命令与全部 Skills。登录成功后,CLI 按当前环境已开通的业务过滤 `--help` 和能力发现,并同步受管的全局 Skills;分析能力默认保留。后续开通业务时,执行 `ae-cli config refresh` 即可重新获取状态并补装对应 Skills。切换活动环境或账号会重新同步;单次 `--host` 查询不改变全局 Skills。
57
+ 按业务过滤命令和剪裁 Skills 仅适用于外部 Agent 使用的本机 CLI;TE Agent 内置沙箱始终保留完整命令与全部 Skills。登录成功后,CLI 按当前环境已开通的业务过滤 `--help` 和能力发现,并同步受管的全局 Skills;分析能力默认保留。后续业务开通状态变化时,普通命令会在刷新配置后自动同步受管 Skills;也可执行 `ae-cli config refresh` 立即刷新并同步。切换活动环境会刷新业务状态,仅同步受影响的 Skills;无需变化时复用当前集合,终端仅汇总 Skill 同步状态及安装、移除数量;需要目录明细时使用 `--format json`。切换账号会重新同步;单次 `--host` 查询不改变全局 Skills。
58
58
 
59
- 仅明确关闭的业务会被移除;旧服务端、缺失状态或网络失败不会触发删除。指向已核验、未修改的受管共享 Skill 的客户端历史链接会自动迁移;其他用户修改和来源不明的副本保留并报告。同步后请新开 Agent 会话,已有会话的上下文不会被撤回。
59
+ 业务明确关闭时,CLI 会按 Skill 业务映射移除由 CLI 安装的副本及对应客户端历史链接,即使内容已被用户修改或版本落后;基础和分析 Skills 始终保留;AI Monitor 属于 Agent 组件,随该组件的开通状态提供。旧服务端、缺失状态或网络失败不会触发删除,来源不明的副本也会保留并报告。同步后请新开 Agent 会话,已有会话的上下文不会被撤回。
60
60
 
61
61
  ## 环境版本同步
62
62
 
@@ -71,7 +71,7 @@ ae-cli update --dry-run
71
71
 
72
72
  自动同步在登录后的普通命令中触发,集群版本检查最长缓存 1 小时;`ae-cli update --host <AE_HOST>` 可立即查询。降级后,后续更新由旧版 CLI 自身执行,也受旧版实现限制。需要用新安装逻辑匹配旧集群时,可运行 `npx @thinkingai/ae-cli@latest update --host <AE_HOST>`,目标仍是集群要求的版本。
73
73
 
74
- `ae-cli update` 安装当前 Host 要求的精确版本,不依赖 npm `latest`。Skills 从已验证的目标包同步;用户修改或来源不明的副本会保留并报告。
74
+ `ae-cli update` 安装当前 Host 要求的精确版本,不依赖 npm `latest`。Skills 从已验证的目标包同步。安装或更新时,用户修改或来源不明的副本会保留并报告;业务明确关闭时,仍按上述规则移除由 CLI 安装的副本。
75
75
 
76
76
  从 `6.0.37` 和 `6.1.9` 维护线开始,普通业务命令可以自动升级或降级到环境要求的版本,包括从 `6.0.x` 切换到 `6.1.x`。自动同步要求本地和目标均为 `主版本.次版本.补丁号` 格式的正式版本,开发版等不规则版本会跳过。同步成功后,新版 CLI 会自动执行原命令一次,并返回该命令的结果和退出码;参数、管道输入、工作目录和确认行为保持不变。如果新版 CLI 无法启动,会返回 `AE_CLI_VERSION_SYNCED` 并提示手动重跑;已经执行的命令不会自动重试。安装失败会给出提示,但不会用安装输出污染业务命令的 JSON 结果。
77
77
 
@@ -112,7 +112,7 @@ ae-cli capability dry-run analysis.dashboard.list --input '{"project_id":1}'
112
112
  ae-cli capability run analysis.dashboard.list --input '{"project_id":1}'
113
113
 
114
114
  # 筛选结构化输出
115
- ae-cli capability list --domain analysis --jq '.data.capabilities[] | .id'
115
+ ae-cli capability list --domain analysis --jq '.capabilities[] | .id'
116
116
  ```
117
117
 
118
118
  ## 命令地图
@@ -127,8 +127,9 @@ ae-cli capability list --domain analysis --jq '.data.capabilities[] | .id'
127
127
  | 分析与项目 | `analysis-governance` | 数据资产搜索、血缘、影响分析、认证和治理 |
128
128
  | 分析与项目 | `project` | 项目信息、成员、角色、权限、实体、时区和交接配置 |
129
129
  | 分析与项目 | `metadata` | 基于 Capability Gateway 的数据表、属性及维度表绑定 |
130
- | 分析与项目 | `personal-semantic-preference` | 当前用户按项目维护轻量个人语义偏好 |
131
- | 分析与项目 | `project-semantic` | 导出用于知识库构建的项目资产包 |
130
+ | 分析与项目 | `personal-semantic-preference` | 当前用户的项目内或跨项目个人语义偏好(`--project-id -1`) |
131
+ | 分析与项目 | `project-semantic` | 导出构建项目知识库所需的资产包 |
132
+ | 可观测性 | `ai-monitor` | 查询 Trace、会话、Bad Trace、指标、成本、安全与已有诊断报告,导出校验后的 ZIP([指南](skills/ae-ai-monitor/SKILL.md)) |
132
133
  | 数据与埋点 | `tracking` | 埋点方案、SDK 示例、检查、采集诊断、代码生成和内置 Wiki |
133
134
  | 数据与埋点 | `data-integration` | 检查、规划、转换、上传、交接和复用本地 CSV/JSON/Excel 数据 |
134
135
  | 社区洞察 | `community` | 社区帖子、评论、话题、情感、直播和报告工作流 |
@@ -166,6 +167,8 @@ ae-cli capability list --domain analysis --jq '.data.capabilities[] | .id'
166
167
 
167
168
  使用 `ae-cli analysis scenario list --project-id 1 --days 7` 查询已采集的分析问题,由 `ae-analysis` Skill 指导 Agent 去重、判断 badcase 并简要说明原因和证据。详见[分析问题复盘指南](skills/ae-analysis/references/scenario_list.md)。 回答可附带耗时;使用 `ae-cli analysis scenario get --help` 查看关联命令执行明细的查询方式。
168
169
 
170
+ 需保存并审核 Bad Case 时,使用 `ae-cli analysis bad-case --help`。Agent 按语义对同批及所有历史状态去重;CLI 可直接审核,也可显式提交页面。每批汇报发现、重复、新增数量,补充说明选填。认证后将案例加入已绑定的 AE 评测集,取消认证后移除。详见[Bad Case 工作流](skills/ae-analysis/references/bad_case_review.md)。
171
+
169
172
  评测命令在普通终端和沙箱中均跟随当前 AE Host,可通过 `--host` 切换。评测请求沿用该 AE Host 配置的 HTTP 或 HTTPS 协议,与其他 AE 命令一致。旧 `--endpoint` 和 `AE_EVAL_BASE_URL` 只能与当前 AE Host 一致,其他值会在发送凭证前报错;请移除这些配置,统一使用 `--host` 切换。沙箱外需设置 `AE_EVAL_ACCESS_TOKEN` 平台 session token,沙箱内可自动获取会话。详见 [地址与鉴权规则](skills/ae-evaluation/SKILL.md#endpoint-and-authentication)。
170
173
 
171
174
  ## Capability Gateway
@@ -266,6 +269,7 @@ Token 文件是只读 JSON 对象:`{"url":"https://host-a.example.com","token"
266
269
  - 默认使用 `--format json`,推荐 Agent 使用。
267
270
  - 支持的人工列表命令可使用 `--format table`。
268
271
  - `--jq <expr>` 使用 jq 1.8 筛选业务结果,再输出统一信封。
272
+ - CLI 内置 jq 的输入是业务结果,不是外层 `{ok,data,meta}` 信封。CLI 内使用 `.capabilities[] | .id`;只有对最终保存的 JSON 执行外部 jq 时才使用 `.data.capabilities[]`。
269
273
  - `--validate` 仅规范化 Capability Gateway 参数,不执行业务逻辑。
270
274
  - `--dry-run` 预览操作,不执行业务逻辑。
271
275
  - `--yes` 跳过明确标记为高风险写操作的交互确认。
@@ -292,6 +296,7 @@ ae-cli kb +rm-source --name engineering-handbook --scope company --display-name
292
296
  ae-cli kb +schema --name engineering-handbook --scope company --model <model-ref>
293
297
  ae-cli kb +compile --name engineering-handbook --scope company --model <model-ref>
294
298
  ae-cli kb +status --name engineering-handbook --scope company
299
+ ae-cli kb +status --name engineering-handbook --scope company --run-id <compile-run-id>
295
300
  ae-cli kb +ask -q "如何配置沙盒?"
296
301
  # 仅提交,后续轮询:
297
302
  ae-cli kb +ask -q "另一个问题" --no-wait
@@ -426,3 +431,8 @@ npm run verify:install
426
431
  ## 许可证
427
432
 
428
433
  MIT
434
+
435
+
436
+ ### 通过 A2A 调用 Agent
437
+
438
+ 先登录目标部署,再用 `ae-cli agent a2a +card --url <A2A-link>` 查看可用空间和模型;调用 `agent a2a +send` 时可指定 `--space-id <id>` 和 `--model <id>`。用 `agent a2a +get` 查询结果,`list`、`cancel` 和 `delete-context` 管理任务及会话。CLI 自动使用当前用户的授权。详见 [A2A 命令参考](skills/ae-agent/references/a2a.md)。
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '../dist/ai-monitor.js';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "protocol": "ae-cli-runtime-capabilities",
3
3
  "version": 1,
4
- "features": ["kb_read_context_v1"]
4
+ "features": ["kb_read_context_v1", "cli_direct_v1"]
5
5
  }
@@ -0,0 +1,33 @@
1
+ import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
+ import {
3
+ ai_monitor_default,
4
+ conversationCount,
5
+ conversationGet,
6
+ conversationList,
7
+ platformList,
8
+ readCommands,
9
+ traceCount,
10
+ traceGet,
11
+ traceList
12
+ } from "./chunk-HRFYYEXR.js";
13
+ import "./chunk-H35VDOAE.js";
14
+ import "./chunk-AWW2T2WL.js";
15
+ import "./chunk-OTZ4JQDU.js";
16
+ import "./chunk-JZY6WWAP.js";
17
+ import "./chunk-NNK3JBH4.js";
18
+ import "./chunk-XPARQSYS.js";
19
+ import "./chunk-PUSFEC6B.js";
20
+ import "./chunk-PLNS5J33.js";
21
+ import "./chunk-AMURHMS3.js";
22
+ import "./chunk-R2SVAO4G.js";
23
+ export {
24
+ conversationCount,
25
+ conversationGet,
26
+ conversationList,
27
+ ai_monitor_default as default,
28
+ platformList,
29
+ readCommands,
30
+ traceCount,
31
+ traceGet,
32
+ traceList
33
+ };
@@ -0,0 +1,136 @@
1
+ import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
+ import {
3
+ configureBusinessCommands,
4
+ parseProgram,
5
+ runCommand
6
+ } from "./chunk-SVNED423.js";
7
+ import "./chunk-EFGUBGA6.js";
8
+ import "./chunk-VLOGOM7N.js";
9
+ import {
10
+ ai_monitor_default
11
+ } from "./chunk-HRFYYEXR.js";
12
+ import "./chunk-LFJ7N36I.js";
13
+ import "./chunk-H35VDOAE.js";
14
+ import "./chunk-AWW2T2WL.js";
15
+ import "./chunk-OTZ4JQDU.js";
16
+ import "./chunk-JZY6WWAP.js";
17
+ import "./chunk-NNK3JBH4.js";
18
+ import "./chunk-XPARQSYS.js";
19
+ import "./chunk-PUSFEC6B.js";
20
+ import "./chunk-PLNS5J33.js";
21
+ import "./chunk-AMURHMS3.js";
22
+ import {
23
+ readExternalCliToken,
24
+ setExternalCliTokenFile
25
+ } from "./chunk-R2SVAO4G.js";
26
+
27
+ // src/ai-monitor.ts
28
+ import { Command as CommanderCommand, Option } from "commander";
29
+ import { createRequire } from "module";
30
+
31
+ // src/commands/ai-monitor/register.ts
32
+ function registerStandaloneAiMonitorCommands(program2, commands) {
33
+ for (const command of commands) {
34
+ let parent = program2;
35
+ for (const resource of (command.resource || "").split(/\s+/).filter(Boolean)) {
36
+ let resourceCommand = parent.commands.find((candidate) => candidate.name() === resource);
37
+ if (!resourceCommand) {
38
+ resourceCommand = parent.command(resource).description(`${resource} commands`);
39
+ resourceCommand.allowExcessArguments(false);
40
+ }
41
+ parent = resourceCommand;
42
+ }
43
+ const actionCommand = parent.command(command.command, { hidden: command.hidden === true }).description(command.description);
44
+ for (const flag of command.flags) {
45
+ const declaration = flagDeclaration(flag);
46
+ if (flag.variadic) {
47
+ actionCommand.option(declaration, flag.desc, collectVariadic, []);
48
+ } else if (flag.type === "boolean") {
49
+ actionCommand.option(
50
+ declaration,
51
+ flag.desc,
52
+ (value) => parseBooleanValue(value)
53
+ );
54
+ } else if (flag.default !== void 0) {
55
+ actionCommand.option(declaration, flag.desc, String(flag.default));
56
+ } else {
57
+ actionCommand.option(declaration, flag.desc);
58
+ }
59
+ }
60
+ if (command.usesAeHost !== false) {
61
+ actionCommand.option("--host <url>", "Override active AE host URL for this command");
62
+ }
63
+ actionCommand.option("--format <format>", "Output format: json | table. Default: json.");
64
+ actionCommand.option("--jq <expr>", "jq 1.8 filter over command payload, applied before output envelope wrapping.");
65
+ if (command.helpText) {
66
+ actionCommand.addHelpText("after", `
67
+ ${command.helpText}
68
+ `);
69
+ }
70
+ actionCommand.action(async (options) => {
71
+ const globalOptions = standaloneGlobalOptions(program2, options);
72
+ await runCommand(command, options, globalOptions);
73
+ });
74
+ }
75
+ }
76
+ function flagDeclaration(flag) {
77
+ const long = `--${flag.name}`;
78
+ const short = flag.alias ? `-${flag.alias}, ` : "";
79
+ return flag.type === "boolean" ? `${short}${long} [value]` : `${short}${long} <value>`;
80
+ }
81
+ function collectVariadic(value, previous) {
82
+ return (previous ?? []).concat(value);
83
+ }
84
+ function parseBooleanValue(value) {
85
+ if (value === void 0) return true;
86
+ const normalized = value.toLowerCase();
87
+ if (["true", "1", "yes", "y", "on"].includes(normalized)) return true;
88
+ if (["false", "0", "no", "n", "off"].includes(normalized)) return false;
89
+ return value;
90
+ }
91
+ function standaloneGlobalOptions(program2, localOptions) {
92
+ const root = program2.opts();
93
+ return {
94
+ host: typeof localOptions.host === "string" ? localOptions.host : root.host,
95
+ mcpUrl: root.mcpUrl,
96
+ format: (typeof localOptions.format === "string" ? localOptions.format : root.format) || "json",
97
+ jq: typeof localOptions.jq === "string" ? localOptions.jq : root.jq,
98
+ validate: root.validate || false,
99
+ dryRun: root.dryRun || false,
100
+ yes: root.yes || false
101
+ };
102
+ }
103
+
104
+ // src/ai-monitor.ts
105
+ var require2 = createRequire(import.meta.url);
106
+ var { version } = require2("../package.json");
107
+ var program = new CommanderCommand();
108
+ program.name("ai-monitor").version(version).description("AI Monitor read commands provided by @tant/ae-cli").option("--host <url>", "Override active AE host URL").option("--cli-token-file <path>", "Use a read-only JSON CLI token file containing url and token for this invocation").option("--format <format>", "Output format: json | table", "json").option("--jq <expr>", "jq 1.8 filter over command payload").option("--validate", "Validate and normalize capability input without executing it", false).option("--dry-run", "Validate authentication, permission, and data scope without executing the read capability", false).option("--yes", "Skip confirmation for high-risk write operations", false);
109
+ program.addOption(
110
+ new Option("--agent-context <base64url-json>", "Internal agent context payload for gateway telemetry").hideHelp()
111
+ );
112
+ program.hook("preAction", (_root, actionCommand) => {
113
+ const rootOptions = program.opts();
114
+ setExternalCliTokenFile(rootOptions.cliTokenFile);
115
+ readExternalCliToken(actionCommand.opts().host ?? rootOptions.host);
116
+ });
117
+ registerStandaloneAiMonitorCommands(program, ai_monitor_default);
118
+ var args = process.argv.slice(2);
119
+ setExternalCliTokenFile(globalOptionValue(args, "--cli-token-file"));
120
+ configureBusinessCommands(program, { commandPrefix: ["ai-monitor"], hostOverride: globalOptionValue(args, "--host") });
121
+ await parseProgram(program);
122
+ function globalOptionValue(args2, name) {
123
+ let value;
124
+ for (let index = 0; index < args2.length; index++) {
125
+ const token = args2[index];
126
+ if (token === "--") break;
127
+ const option = program.options.find((candidate) => candidate.long === token || candidate.short === token);
128
+ if (option?.required) {
129
+ const next = args2[index + 1];
130
+ if (next === void 0) break;
131
+ if (token === name) value = next;
132
+ index++;
133
+ } else if (token.startsWith(`${name}=`)) value = token.slice(name.length + 1);
134
+ }
135
+ return value;
136
+ }
@@ -1,8 +1,9 @@
1
1
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
2
  import {
3
+ environmentRefreshOutput,
3
4
  invalidateBusinessSkillSynchronization,
4
5
  refreshEnvironmentAfterLogin
5
- } from "./chunk-K2Z7QHDR.js";
6
+ } from "./chunk-RB26WNLM.js";
6
7
  import {
7
8
  MultiselectCancelled,
8
9
  promptSingleSelect
@@ -13,15 +14,17 @@ import {
13
14
  } from "./chunk-6ZIQV5GW.js";
14
15
  import {
15
16
  resolveHost
16
- } from "./chunk-2F64AZYH.js";
17
+ } from "./chunk-KA5WKR5P.js";
17
18
  import {
18
19
  printError,
19
20
  printOutput
20
- } from "./chunk-WMDO53YK.js";
21
+ } from "./chunk-OTZ4JQDU.js";
21
22
  import {
22
- getLocalCliPackageInfo,
23
23
  runHostCompatCheck
24
- } from "./chunk-GBSACKFB.js";
24
+ } from "./chunk-XPARQSYS.js";
25
+ import {
26
+ getLocalCliPackageInfo
27
+ } from "./chunk-PUSFEC6B.js";
25
28
  import {
26
29
  CliTokenValidationUnavailableError,
27
30
  CredentialStoreUnreadableError,
@@ -31,25 +34,26 @@ import {
31
34
  clearAllCredentials,
32
35
  clearCliTokenCache,
33
36
  getActiveCredential,
37
+ internalCallSourceHeaders,
34
38
  listCredentials,
35
39
  mintCliToken,
36
40
  removeActiveCredential,
37
41
  saveCredential,
38
42
  updateCredentialMetadata,
39
43
  validateCliTokenOnServer
40
- } from "./chunk-SOSFRU3O.js";
44
+ } from "./chunk-PLNS5J33.js";
41
45
  import {
42
46
  getFallbackCliToken,
43
47
  loadConfig,
44
48
  saveConfig
45
- } from "./chunk-4PSTYEG5.js";
49
+ } from "./chunk-AMURHMS3.js";
46
50
  import {
47
51
  ExternalCliTokenError,
48
52
  PermissionError,
49
53
  logger,
50
54
  normalizeUrl,
51
55
  readExternalCliToken
52
- } from "./chunk-Z3Q2AEIN.js";
56
+ } from "./chunk-R2SVAO4G.js";
53
57
 
54
58
  // src/core/device-auth.ts
55
59
  import { execFileSync } from "child_process";
@@ -102,7 +106,7 @@ async function authorizeDevice(host) {
102
106
  try {
103
107
  resp = await fetch(url, {
104
108
  method: "POST",
105
- headers: { "Content-Type": "application/json" }
109
+ headers: { "Content-Type": "application/json", ...internalCallSourceHeaders() }
106
110
  });
107
111
  } catch (e) {
108
112
  throw new Error(`Device authorize request failed: ${e.message}`);
@@ -133,7 +137,7 @@ async function pollDeviceToken(host, deviceCode) {
133
137
  try {
134
138
  resp = await fetch(url, {
135
139
  method: "POST",
136
- headers: { "Content-Type": "application/json" },
140
+ headers: { "Content-Type": "application/json", ...internalCallSourceHeaders() },
137
141
  body: JSON.stringify({ device_code: deviceCode })
138
142
  });
139
143
  } catch (e) {
@@ -282,6 +286,11 @@ async function validateExistingCliToken(host, cliToken, external = false) {
282
286
  return { valid: true, trusted: false, details: await validateCliTokenOnServer(host, cliToken) };
283
287
  } catch (error) {
284
288
  if (error instanceof CliTokenValidationUnavailableError) {
289
+ if (external && readExternalCliToken(host)?.taskContext) {
290
+ printError("auth", error.message, "Retry when the gateway is available; managed execution credentials cannot be trusted without validation.", "CLI_TOKEN_VALIDATION_UNAVAILABLE");
291
+ process.exitCode = 1;
292
+ return { valid: false, trusted: false, details: {} };
293
+ }
285
294
  logger.warn(`auth status: ${error.message}; trusting the stored CLI token for compatibility`);
286
295
  return { valid: true, trusted: true, details: {} };
287
296
  }
@@ -443,7 +452,7 @@ async function switchActiveAccount(program, opts) {
443
452
  host,
444
453
  active: true,
445
454
  account: accountOutput(selected.account),
446
- ...environment ? { environment } : {}
455
+ ...environment ? { environment: environmentRefreshOutput(program, environment) } : {}
447
456
  }, program.opts().format || "json");
448
457
  } catch (error) {
449
458
  if (error instanceof CredentialStoreUnreadableError) throw error;
@@ -566,7 +575,7 @@ function registerAuth(program) {
566
575
  activateHostAfterLogin(host, explicitHost);
567
576
  const environment2 = await refreshEnvironmentAfterLogin(host);
568
577
  emit("Login successful! CLI token saved securely.");
569
- await printOutput({ ...loginSummary(host, saved2), ...environment2 ? { environment: environment2 } : {} }, format);
578
+ await printOutput({ ...loginSummary(host, saved2), ...environment2 ? { environment: environmentRefreshOutput(program, environment2) } : {} }, format);
570
579
  return;
571
580
  }
572
581
  if (opts.wait === false) {
@@ -587,7 +596,7 @@ function registerAuth(program) {
587
596
  activateHostAfterLogin(host, explicitHost);
588
597
  const environment = await refreshEnvironmentAfterLogin(host);
589
598
  emit("Login successful! CLI token saved securely.");
590
- await printOutput({ ...loginSummary(host, saved), ...environment ? { environment } : {} }, format);
599
+ await printOutput({ ...loginSummary(host, saved), ...environment ? { environment: environmentRefreshOutput(program, environment) } : {} }, format);
591
600
  } catch (error) {
592
601
  if (error instanceof CredentialStoreUnreadableError) throw error;
593
602
  if (error instanceof DeviceFlowUnsupportedError) {
@@ -633,7 +642,7 @@ function registerAuth(program) {
633
642
  const environment = await refreshEnvironmentAfterLogin(host);
634
643
  process.stderr.write(`[ae-cli] CLI token verified and saved securely for ${host}
635
644
  `);
636
- await printOutput({ ...manualTokenSummary(host, saved), ...environment ? { environment } : {} }, program.opts().format || "json");
645
+ await printOutput({ ...manualTokenSummary(host, saved), ...environment ? { environment: environmentRefreshOutput(program, environment) } : {} }, program.opts().format || "json");
637
646
  } catch (error) {
638
647
  if (error instanceof CredentialStoreUnreadableError) throw error;
639
648
  if (error instanceof PermissionError) {
@@ -759,7 +768,7 @@ function registerAuth(program) {
759
768
  host,
760
769
  remaining_accounts: listCredentials(host).length,
761
770
  ...result.active?.account ? { active_account: accountOutput(result.active.account) } : {},
762
- ...environment ? { environment } : {}
771
+ ...environment ? { environment: environmentRefreshOutput(program, environment) } : {}
763
772
  }, program.opts().format || "json");
764
773
  });
765
774
  }
@@ -1,22 +1,21 @@
1
1
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  resolveWorkspaceTarget
4
- } from "./chunk-E25OSZLJ.js";
4
+ } from "./chunk-COOMXFUG.js";
5
5
  import {
6
6
  currentAgentSpaceId
7
7
  } from "./chunk-RK6GLDGI.js";
8
- import "./chunk-VDICGXCY.js";
8
+ import "./chunk-HIMOBNEY.js";
9
9
  import {
10
10
  TeAgentApiError,
11
11
  deleteFromMainApp,
12
12
  getFromMainApp,
13
13
  patchToMainApp,
14
14
  postToMainApp
15
- } from "./chunk-JSBLCLFE.js";
16
- import "./chunk-Y74WTIKJ.js";
17
- import "./chunk-SOSFRU3O.js";
18
- import "./chunk-4PSTYEG5.js";
19
- import "./chunk-Z3Q2AEIN.js";
15
+ } from "./chunk-VLOGOM7N.js";
16
+ import "./chunk-PLNS5J33.js";
17
+ import "./chunk-AMURHMS3.js";
18
+ import "./chunk-R2SVAO4G.js";
20
19
 
21
20
  // src/commands/automation/index.ts
22
21
  import { randomUUID } from "crypto";