@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
@@ -0,0 +1,556 @@
1
+ import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
+ import {
3
+ confirmHighRiskWrite,
4
+ requiresConfirmation
5
+ } from "./chunk-EFGUBGA6.js";
6
+ import {
7
+ TeAgentApiError,
8
+ TeAgentCredentialsError
9
+ } from "./chunk-VLOGOM7N.js";
10
+ import {
11
+ EvalApiError
12
+ } from "./chunk-LFJ7N36I.js";
13
+ import {
14
+ printError,
15
+ printOutput
16
+ } from "./chunk-OTZ4JQDU.js";
17
+ import {
18
+ CapabilityGatewayError
19
+ } from "./chunk-JZY6WWAP.js";
20
+ import {
21
+ BusinessDisabledError,
22
+ assertBusinessEnabled,
23
+ businessForCommand,
24
+ formatCapabilityMissCompatHint,
25
+ readCurrentBusinessConfig
26
+ } from "./chunk-XPARQSYS.js";
27
+ import {
28
+ CredentialStoreUnreadableError,
29
+ SecureStoreAuthError
30
+ } from "./chunk-PLNS5J33.js";
31
+ import {
32
+ getActiveHost,
33
+ safeJsonParse
34
+ } from "./chunk-AMURHMS3.js";
35
+ import {
36
+ CliApiError,
37
+ CliValidationError,
38
+ CommunityReportError,
39
+ ExternalCliTokenError,
40
+ LocalDataUploadError,
41
+ PermissionError,
42
+ logger,
43
+ readKbExecutionContext
44
+ } from "./chunk-R2SVAO4G.js";
45
+
46
+ // src/framework/business-filter.ts
47
+ import { Help } from "commander";
48
+ function commandPath(command) {
49
+ const result = [];
50
+ for (let current = command; current?.parent; current = current.parent) {
51
+ result.unshift(current.name());
52
+ }
53
+ return result;
54
+ }
55
+ function configureBusinessCommands(program, options = {}) {
56
+ const readStates = options.readStates ?? (() => readCurrentBusinessConfig(options.hostOverride));
57
+ const commandBusiness = (command) => businessForCommand([...options.commandPrefix ?? [], ...commandPath(command)]);
58
+ const isVisible = (command) => {
59
+ const business = commandBusiness(command);
60
+ return !business || readStates()[business] !== false;
61
+ };
62
+ const helpConfiguration = {
63
+ visibleCommands(command) {
64
+ return Help.prototype.visibleCommands.call(this, command).filter(isVisible);
65
+ },
66
+ formatHelp(command, helper) {
67
+ if (!isVisible(command)) {
68
+ const business = commandBusiness(command);
69
+ return `The '${business}' business is not enabled for the current environment.
70
+ Run: ae-cli config refresh
71
+ `;
72
+ }
73
+ return Help.prototype.formatHelp.call(this, command, helper);
74
+ }
75
+ };
76
+ const configureHelp = (command) => {
77
+ command.configureHelp(helpConfiguration);
78
+ command.commands.forEach(configureHelp);
79
+ };
80
+ configureHelp(program);
81
+ program.on("beforeAllHelp", (context) => {
82
+ if (isVisible(context.command)) return;
83
+ const business = commandBusiness(context.command);
84
+ context.write(`The '${business}' business is not enabled for the current environment.
85
+ Run: ae-cli config refresh
86
+ `);
87
+ context.write = () => {
88
+ };
89
+ });
90
+ program.hook("preAction", async (_root, actionCommand) => {
91
+ const business = commandBusiness(actionCommand);
92
+ if (!business) return;
93
+ const opts = actionCommand.optsWithGlobals();
94
+ await (options.assertEnabled ?? assertBusinessEnabled)(business, opts.host ?? options.hostOverride);
95
+ });
96
+ }
97
+
98
+ // src/framework/program-lifecycle.ts
99
+ async function parseProgram(program, argv = process.argv) {
100
+ try {
101
+ await program.parseAsync(normalizeSubcommandVersionOption(program, argv));
102
+ } catch (error) {
103
+ if (error instanceof BusinessDisabledError) {
104
+ printError("permission", error.message, error.hint, error.code);
105
+ process.exitCode = 1;
106
+ return;
107
+ }
108
+ if (!(error instanceof CredentialStoreUnreadableError) && !(error instanceof ExternalCliTokenError)) throw error;
109
+ printError("config", error.message, error.hint, error.code);
110
+ process.exitCode = 1;
111
+ }
112
+ }
113
+ function normalizeSubcommandVersionOption(program, argv) {
114
+ const normalized = [...argv];
115
+ let current = program;
116
+ for (let index = 2; index < normalized.length; index += 1) {
117
+ const token = normalized[index];
118
+ if (token === "--") {
119
+ break;
120
+ }
121
+ if (token.startsWith("-")) {
122
+ if (token === "--version" && current !== program && hasRequiredVersionOption(current)) {
123
+ const value = normalized[index + 1];
124
+ if (value && !value.startsWith("-")) {
125
+ normalized.splice(index, 2, `--version=${value}`);
126
+ } else {
127
+ normalized[index] = "--version=";
128
+ }
129
+ continue;
130
+ }
131
+ if (!token.includes("=")) {
132
+ const option = findOption(current, token);
133
+ if (option?.required) {
134
+ index += 1;
135
+ } else if (option?.optional) {
136
+ const value = normalized[index + 1];
137
+ if (value && !value.startsWith("-")) {
138
+ index += 1;
139
+ }
140
+ }
141
+ }
142
+ continue;
143
+ }
144
+ const child = current.commands.find(
145
+ (command) => command.name() === token || command.aliases().includes(token)
146
+ );
147
+ if (child) {
148
+ current = child;
149
+ }
150
+ }
151
+ return normalized;
152
+ }
153
+ function hasRequiredVersionOption(command) {
154
+ return command.options.some((option) => option.long === "--version" && option.required);
155
+ }
156
+ function findOption(command, flag) {
157
+ let current = command;
158
+ while (current) {
159
+ const option = current.options.find((candidate) => candidate.long === flag || candidate.short === flag);
160
+ if (option) {
161
+ return option;
162
+ }
163
+ current = current.parent;
164
+ }
165
+ return void 0;
166
+ }
167
+
168
+ // src/framework/runner.ts
169
+ function missingRequiredFlagsError(cmdName, missing) {
170
+ const names = missing.map((flag) => `--${flag.name}`);
171
+ const message = missing.length === 1 ? `Missing required flag: ${names[0]}` : `Missing required flags: ${names.join(", ")}`;
172
+ const hintParts = missing.map((flag) => flag.hint?.trim()).filter((hint2) => Boolean(hint2));
173
+ const hint = hintParts.length > 0 ? hintParts.join(" ") : `Usage: ae-cli ${cmdName} ${names.map((name) => `${name} <value>`).join(" ")}`;
174
+ return { message, hint };
175
+ }
176
+ function readSkillCurrentVersion(body) {
177
+ if (!body || typeof body !== "object" || Array.isArray(body)) return void 0;
178
+ const currentVersion = body.currentVersion;
179
+ if (typeof currentVersion !== "string") return void 0;
180
+ return /^(0|[1-9]\d*)\.(0|[1-9]\d*)$/.test(currentVersion) ? currentVersion : void 0;
181
+ }
182
+ function teAgentApiErrorPresentation(err) {
183
+ if (err.code === "SKILL_VERSION_CONFLICT") {
184
+ const currentVersion = readSkillCurrentVersion(err.body);
185
+ return {
186
+ message: "The Skill content changed, and the new version must be greater than the current version.",
187
+ code: err.code,
188
+ hint: currentVersion ? `Retry with --version set to a major.minor version greater than ${currentVersion}.` : "Retry with --version set to a major.minor version greater than the current Skill version.",
189
+ ...currentVersion ? { meta: { currentVersion } } : {}
190
+ };
191
+ }
192
+ if (err.code === "SKILL_HISTORY_CONFLICT") {
193
+ return {
194
+ message: "The Skill cannot be safely updated right now.",
195
+ code: err.code,
196
+ hint: "The Skill cannot be safely updated right now. Please contact your administrator."
197
+ };
198
+ }
199
+ return {};
200
+ }
201
+ async function runCommand(cmd, opts, globalOpts) {
202
+ try {
203
+ const ctx = createRuntimeContext(cmd, opts, globalOpts);
204
+ const cmdName = cmd.resource ? `${cmd.service} ${cmd.resource} ${cmd.command}` : `${cmd.service} ${cmd.command}`;
205
+ logger.command(
206
+ cmdName,
207
+ opts,
208
+ cmd.flags.filter((flag) => flag.sensitive).map((flag) => flag.name)
209
+ );
210
+ const missingRequired = cmd.flags.filter((flag) => {
211
+ if (!flag.required) return false;
212
+ const val = opts[camelCase(flag.name)];
213
+ if (flag.variadic) return !Array.isArray(val) || val.length === 0;
214
+ return val === void 0 || val === null || val === "";
215
+ });
216
+ if (missingRequired.length > 0) {
217
+ const { message, hint } = missingRequiredFlagsError(cmdName, missingRequired);
218
+ printError("validation", message, hint);
219
+ process.exit(1);
220
+ }
221
+ if (cmd.validate && cmd.service !== "community") {
222
+ cmd.validate(ctx);
223
+ }
224
+ const LIMIT_FLAG_PATTERNS = [/limit/i, /page_size/i, /pagesize/i, /row_limit/i, /block_limit/i, /top[-_]?k/i];
225
+ for (const flag of cmd.flags) {
226
+ const val = opts[camelCase(flag.name)];
227
+ if (flag.variadic) continue;
228
+ if (flag.type === "boolean") {
229
+ if (val !== void 0 && typeof val !== "boolean") {
230
+ printError("validation", `Invalid boolean for --${flag.name}: ${val}. Use true/false.`);
231
+ process.exit(1);
232
+ }
233
+ continue;
234
+ }
235
+ if (flag.type === "int64") {
236
+ if (val === void 0 || val === null || val === "") continue;
237
+ const raw = String(val);
238
+ if (!/^-?(?:0|[1-9]\d*)$/.test(raw)) {
239
+ printError("validation", `--${flag.name} must be a base-10 integer (got: ${val})`);
240
+ process.exit(1);
241
+ }
242
+ const parsed = BigInt(raw);
243
+ const minInt64 = -(1n << 63n);
244
+ const maxInt64 = (1n << 63n) - 1n;
245
+ if (parsed < minInt64 || parsed > maxInt64) {
246
+ printError("validation", `--${flag.name} must fit in a signed 64-bit integer (got: ${val})`);
247
+ process.exit(1);
248
+ }
249
+ if (flag.min !== void 0 && parsed < BigInt(flag.min)) {
250
+ printError("validation", `--${flag.name} must be at least ${flag.min} (got: ${val})`);
251
+ process.exit(1);
252
+ }
253
+ if (flag.max !== void 0 && parsed > BigInt(flag.max)) {
254
+ printError("validation", `--${flag.name} must be at most ${flag.max} (got: ${val})`);
255
+ process.exit(1);
256
+ }
257
+ continue;
258
+ }
259
+ if (flag.type !== "number") continue;
260
+ if (flag.variadic) continue;
261
+ if (val === void 0 || val === null || val === "") continue;
262
+ const num = Number(val);
263
+ if (!Number.isFinite(num)) {
264
+ printError("validation", `--${flag.name} must be a number (got: ${val})`);
265
+ process.exit(1);
266
+ }
267
+ const isLimitFlag = LIMIT_FLAG_PATTERNS.some((p) => p.test(flag.name)) || cmd.service === "community" && /page[-_]?(?:size|num)|row[-_]?limit/i.test(flag.name);
268
+ if (isLimitFlag) {
269
+ const min = flag.min ?? 1;
270
+ const max = flag.max ?? 1e4;
271
+ if (!Number.isInteger(num) || num < min || num > max) {
272
+ printError("validation", `--${flag.name} must be an integer between ${min} and ${max} (got: ${val})`);
273
+ process.exit(1);
274
+ }
275
+ } else if (flag.min !== void 0 || flag.max !== void 0) {
276
+ const min = flag.min ?? Number.NEGATIVE_INFINITY;
277
+ const max = flag.max ?? Number.POSITIVE_INFINITY;
278
+ if (num < min || num > max) {
279
+ const lower = flag.min === void 0 ? "-Infinity" : String(min);
280
+ const upper = flag.max === void 0 ? "Infinity" : String(max);
281
+ printError("validation", `--${flag.name} must be a number between ${lower} and ${upper} (got: ${val})`);
282
+ process.exit(1);
283
+ }
284
+ }
285
+ }
286
+ for (const flag of cmd.flags) {
287
+ if (flag.type !== "string") continue;
288
+ if (flag.variadic) continue;
289
+ const val = opts[camelCase(flag.name)];
290
+ if (val === void 0 || val === null || val === "") continue;
291
+ const error = stringFlagValidationError(flag, String(val));
292
+ if (error) {
293
+ printError("validation", error.message, error.hint);
294
+ process.exit(1);
295
+ }
296
+ }
297
+ if (cmd.validate && cmd.service === "community") {
298
+ cmd.validate(ctx);
299
+ }
300
+ if (globalOpts.validate && globalOpts.dryRun) {
301
+ printError(
302
+ "validation",
303
+ "Cannot combine --validate and --dry-run.",
304
+ "Use --validate to fix parameters; use --dry-run as the pre-execution confirmation."
305
+ );
306
+ process.exit(1);
307
+ }
308
+ if (globalOpts.validate) {
309
+ if (cmd.validateInput) {
310
+ const validateResult = await cmd.validateInput(ctx);
311
+ await printOutput(validateResult, globalOpts.format, globalOpts.jq);
312
+ } else if (cmd.service === "community") {
313
+ throw new CliValidationError(`--validate is not supported for ${cmdName}`, {
314
+ hint: "Run without --validate, or inspect the underlying capability for server validation."
315
+ });
316
+ } else {
317
+ await printOutput(
318
+ { message: "No --validate implementation for this command (capability gateway commands only)" },
319
+ globalOpts.format
320
+ );
321
+ }
322
+ return;
323
+ }
324
+ if (globalOpts.dryRun) {
325
+ if (cmd.dryRun) {
326
+ const dryResult = await cmd.dryRun(ctx);
327
+ await printOutput(dryResult, globalOpts.format, globalOpts.jq);
328
+ } else if (cmd.service === "community") {
329
+ throw new CliValidationError(`--dry-run is not supported for ${cmdName}`, {
330
+ hint: "Run the read-only command without --dry-run; this command has no request preview."
331
+ });
332
+ } else {
333
+ await printOutput({ message: "No dry-run implementation for this command" }, globalOpts.format);
334
+ }
335
+ return;
336
+ }
337
+ if (requiresConfirmation(cmd.risk)) {
338
+ cmd.preflight?.(ctx);
339
+ if (!globalOpts.yes) {
340
+ const confirmed = await confirmHighRiskWrite(`This is a high-risk-write operation (${cmdName}). Continue?`);
341
+ if (!confirmed) {
342
+ process.stderr.write("Aborted.\n");
343
+ process.exit(0);
344
+ }
345
+ }
346
+ }
347
+ const result = await cmd.execute(ctx);
348
+ await ctx.out(result);
349
+ } catch (err) {
350
+ if (err?.type === "validation" && typeof err?.hint === "string" && String(err.message || "").includes("--jq")) {
351
+ printError("validation", err.message, err.hint, err.code);
352
+ process.exit(1);
353
+ }
354
+ const message = err.message || String(err);
355
+ if (!(err instanceof CommunityReportError) && !(err instanceof EvalApiError)) {
356
+ if (!(err instanceof LocalDataUploadError)) logger.error(`Command failed: ${message}`);
357
+ }
358
+ if (err instanceof CliValidationError) {
359
+ printError(
360
+ "validation",
361
+ message,
362
+ err.hint,
363
+ err.code,
364
+ err.location ? { location: err.location } : void 0
365
+ );
366
+ } else if (err instanceof TeAgentCredentialsError) {
367
+ printError("config", message, err.hint);
368
+ } else if (err instanceof PermissionError) {
369
+ printError("permission", message, err.hint, err.code, err.meta, { details: err.details });
370
+ } else if (err instanceof CliApiError) {
371
+ printError("api", message, err.hint, err.code, err.meta);
372
+ } else if (err instanceof CapabilityGatewayError) {
373
+ printError(err.type, message, err.hint ?? capabilityGatewayHint(err), err.code, err.meta);
374
+ } else if (err instanceof CommunityReportError) {
375
+ printError("api", message, err.hint, err.code, err.meta, { log: false });
376
+ } else if (err instanceof LocalDataUploadError) {
377
+ printError("api", message, err.hint, err.code, err.meta, { log: false });
378
+ } else if (err instanceof CredentialStoreUnreadableError || err instanceof ExternalCliTokenError) {
379
+ printError("config", message, err.hint, err.code);
380
+ } else if (err instanceof EvalApiError) {
381
+ printError("api", message, err.hint, err.code, void 0, {
382
+ log: false,
383
+ // Only locally constructed guidance is public; remote details retain their existing privacy boundary.
384
+ details: err.onboarding ? { onboarding: err.onboarding } : void 0
385
+ });
386
+ } else if (err instanceof SecureStoreAuthError) {
387
+ printError("auth", message, "Run: ae-cli auth login", err.code);
388
+ } else if (err instanceof TeAgentApiError) {
389
+ if (err.status === 403) {
390
+ printError("permission", message, err.hint, err.code, void 0, { details: err.details });
391
+ } else if (err.status === 401) {
392
+ printError("auth", message, err.hint ?? "Run: ae-cli auth login", err.code, void 0, { details: err.details });
393
+ } else {
394
+ const presentation = teAgentApiErrorPresentation(err);
395
+ printError(
396
+ err.errorType,
397
+ presentation.message ?? message,
398
+ presentation.hint ?? err.hint,
399
+ presentation.code ?? err.code,
400
+ presentation.meta,
401
+ { details: err.details }
402
+ );
403
+ }
404
+ } else if (looksLikeAuthFailure(message)) {
405
+ printError("auth", message, "Run: ae-cli auth login");
406
+ } else {
407
+ printError("api", message);
408
+ }
409
+ process.exit(1);
410
+ }
411
+ }
412
+ function stringFlagValidationError(flag, value) {
413
+ if (flag.type !== "string") return void 0;
414
+ if (flag.minLength !== void 0 && value.length < flag.minLength) {
415
+ return { message: `--${flag.name} must contain at least ${flag.minLength} characters` };
416
+ }
417
+ if (flag.maxLength !== void 0 && value.length > flag.maxLength) {
418
+ return { message: `--${flag.name} must not exceed ${flag.maxLength} characters (got: ${value.length})` };
419
+ }
420
+ if (flag.pattern !== void 0 && !new RegExp(flag.pattern).test(value)) {
421
+ return { message: `--${flag.name} has an invalid format`, hint: `Expected pattern: ${flag.pattern}` };
422
+ }
423
+ return void 0;
424
+ }
425
+ function capabilityGatewayHint(err) {
426
+ if (err.code === "UPLOAD_NOT_EXIST" && (err.meta?.capability_id === "engage-setting.config-table.save" || err.meta?.capability_id === "engage-setting.config-table.update-data")) {
427
+ return "Run config-table upload first with the same --project-id and --request-id, then retry this command within 10 minutes. The upload cache is consumed after a successful save/update.";
428
+ }
429
+ const compatExtra = formatCapabilityMissCompatHint();
430
+ if (err.code === "CAPABILITY_NOT_FOUND") {
431
+ const base = "The current host does not expose this capability. Do not retry with different parameters; use a supported command path or ask the platform/backend owner to enable the capability.";
432
+ return compatExtra ? `${base}
433
+ ${compatExtra}` : base;
434
+ }
435
+ if (err.httpStatus === 404 && !err.code) {
436
+ const base = "The current host returned 404 for this capability route. Do not keep retrying the same command; verify the backend route/capability deployment.";
437
+ return compatExtra ? `${base}
438
+ ${compatExtra}` : base;
439
+ }
440
+ return void 0;
441
+ }
442
+ function looksLikeAuthFailure(message) {
443
+ const m = message.toLowerCase();
444
+ if (m.includes("403") || m.includes("forbidden") || m.includes("permission")) return false;
445
+ return m.includes("401") || m.includes("unauthorized") || m.includes("session expired") || m.includes("invalid access token") || m.includes("-1001") || m.includes("\u767B\u5F55") || m.includes("ae-cli auth login");
446
+ }
447
+ function createRuntimeContext(cmd, opts, globalOpts) {
448
+ let _communityReportModule = null;
449
+ async function getCommunityReportClient() {
450
+ if (!_communityReportModule) {
451
+ _communityReportModule = await import("./community-report-client-ULRNXLQV.js");
452
+ }
453
+ return _communityReportModule;
454
+ }
455
+ let _localDataUploadModule = null;
456
+ async function getLocalDataUploadClient() {
457
+ if (!_localDataUploadModule) {
458
+ _localDataUploadModule = await import("./local-data-upload-client-YTWMAAGE.js");
459
+ }
460
+ return _localDataUploadModule;
461
+ }
462
+ const ctx = {
463
+ has(name) {
464
+ return Object.prototype.hasOwnProperty.call(opts, camelCase(name));
465
+ },
466
+ str(name) {
467
+ return String(opts[camelCase(name)] ?? "");
468
+ },
469
+ num(name) {
470
+ const val = opts[camelCase(name)];
471
+ return val !== void 0 ? Number(val) : 0;
472
+ },
473
+ optionalNum(name) {
474
+ const val = opts[camelCase(name)];
475
+ if (val === void 0 || val === null || val === "") return void 0;
476
+ return Number(val);
477
+ },
478
+ int64(name) {
479
+ const val = opts[camelCase(name)];
480
+ if (val === void 0 || val === null || val === "") return 0n;
481
+ return BigInt(String(val));
482
+ },
483
+ optionalInt64(name) {
484
+ const val = opts[camelCase(name)];
485
+ if (val === void 0 || val === null || val === "") return void 0;
486
+ return BigInt(String(val));
487
+ },
488
+ bool(name) {
489
+ return Boolean(opts[camelCase(name)]);
490
+ },
491
+ optionalBool(name) {
492
+ const val = opts[camelCase(name)];
493
+ return typeof val === "boolean" ? val : void 0;
494
+ },
495
+ json(name) {
496
+ const val = opts[camelCase(name)];
497
+ if (val === void 0 || val === null) return void 0;
498
+ if (typeof val === "object") return val;
499
+ try {
500
+ return safeJsonParse(String(val));
501
+ } catch {
502
+ if (cmd.flags.some((flag) => flag.name === name && flag.sensitive)) {
503
+ throw new CliValidationError(`Invalid JSON for --${name}.`, {
504
+ hint: "Provide valid JSON with quoted keys and strings. Sensitive input is omitted from diagnostics."
505
+ });
506
+ }
507
+ printError("validation", `Invalid JSON for --${name}: ${val}`);
508
+ process.exit(1);
509
+ }
510
+ },
511
+ list(name) {
512
+ const val = opts[camelCase(name)];
513
+ if (Array.isArray(val)) return val.map(String);
514
+ if (val === void 0 || val === null) return [];
515
+ return [String(val)];
516
+ },
517
+ async communityReport(endpoint, rawBody) {
518
+ const client = await getCommunityReportClient();
519
+ return client.communityReport(endpoint, rawBody);
520
+ },
521
+ async localDataUpload(endpoint, rawBody, options) {
522
+ const client = await getLocalDataUploadClient();
523
+ return client.localDataUpload(endpoint, rawBody, options);
524
+ },
525
+ hostOverride() {
526
+ return globalOpts.host;
527
+ },
528
+ host() {
529
+ if (cmd.service === "kb" && ["+list", "+index", "+grep", "+read"].includes(cmd.command)) {
530
+ const context = readKbExecutionContext();
531
+ if (context) return globalOpts.host || context.origin;
532
+ }
533
+ if (globalOpts.host) return globalOpts.host;
534
+ return getActiveHost();
535
+ },
536
+ mcpUrl() {
537
+ return globalOpts.mcpUrl;
538
+ },
539
+ service() {
540
+ return cmd.service;
541
+ },
542
+ async out(data) {
543
+ await printOutput(data, globalOpts.format, globalOpts.jq, { redactErrors: cmd.sensitiveOutput });
544
+ }
545
+ };
546
+ return ctx;
547
+ }
548
+ function camelCase(str) {
549
+ return str.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
550
+ }
551
+
552
+ export {
553
+ runCommand,
554
+ configureBusinessCommands,
555
+ parseProgram
556
+ };
@@ -3,7 +3,7 @@ import {
3
3
  getAgentApi,
4
4
  patchAgentApi,
5
5
  postAgentApi
6
- } from "./chunk-VDICGXCY.js";
6
+ } from "./chunk-HIMOBNEY.js";
7
7
 
8
8
  // src/commands/memory/cli-client.ts
9
9
  var DEFAULT_TE_CLAUDE_BASE_PATH = "/agent";
@@ -5,11 +5,11 @@ import {
5
5
  require_node,
6
6
  require_process_nextick_args,
7
7
  require_util
8
- } from "./chunk-JEUXDY3B.js";
8
+ } from "./chunk-HQED4YB4.js";
9
9
  import {
10
10
  __commonJS,
11
11
  __require
12
- } from "./chunk-Z3Q2AEIN.js";
12
+ } from "./chunk-R2SVAO4G.js";
13
13
 
14
14
  // node_modules/jszip/node_modules/readable-stream/lib/internal/streams/stream.js
15
15
  var require_stream = __commonJS({
@@ -1,20 +1,18 @@
1
1
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
2
  import {
3
+ getCliToken,
3
4
  internalCallSourceHeaders
4
- } from "./chunk-Y74WTIKJ.js";
5
- import {
6
- getCliToken
7
- } from "./chunk-SOSFRU3O.js";
5
+ } from "./chunk-PLNS5J33.js";
8
6
  import {
9
7
  getActiveHost,
10
8
  getSandboxRuntimeRoot
11
- } from "./chunk-4PSTYEG5.js";
9
+ } from "./chunk-AMURHMS3.js";
12
10
  import {
13
11
  PermissionError,
14
12
  externalCliTokenRequestOptions,
15
13
  isApiErrorType,
16
14
  readExternalCliToken
17
- } from "./chunk-Z3Q2AEIN.js";
15
+ } from "./chunk-R2SVAO4G.js";
18
16
 
19
17
  // src/core/te-agent-credentials.ts
20
18
  import { readFileSync } from "fs";
@@ -202,7 +200,7 @@ function teClaudeBaseFromActiveHost(hostOverride) {
202
200
  async function signRequest(method, path2, hostOverride, includeJsonContentType = true, authMode = "auto") {
203
201
  const external = readExternalCliToken(hostOverride);
204
202
  const configuredHost = hostOverride || getActiveHost();
205
- const sandboxOnly = !hostOverride && (/* @__PURE__ */ new Set([
203
+ const sandboxEndpoint = (/* @__PURE__ */ new Set([
206
204
  "/api/sandbox/models",
207
205
  "/api/sandbox/models/select",
208
206
  "/api/sandbox/sync/push",
@@ -210,9 +208,11 @@ async function signRequest(method, path2, hostOverride, includeJsonContentType =
210
208
  "/api/sandbox/sync/pull",
211
209
  "/api/sandbox/sync/pull/candidates"
212
210
  ])).has(path2.split("?")[0]);
211
+ const sandboxOnly = !hostOverride && sandboxEndpoint;
213
212
  const sandboxCred = external || configuredHost && !sandboxOnly ? null : tryLoadTeAgentSandboxCredentials();
214
213
  if (authMode === "auto" && !hostOverride && sandboxCred && sandboxCred.sandboxId && sandboxCred.sandboxSecretKey) {
215
214
  const headers = {
215
+ ...internalCallSourceHeaders(),
216
216
  "X-Sandbox-Id": sandboxCred.sandboxId,
217
217
  "X-Sandbox-Secret-Key": sandboxCred.sandboxSecretKey
218
218
  };
@@ -239,6 +239,12 @@ async function signRequest(method, path2, hostOverride, includeJsonContentType =
239
239
  url: `${baseUrl.replace(/\/$/, "")}${path2}`,
240
240
  headers: {
241
241
  "cli-token": cliToken,
242
+ ...sandboxEndpoint && external?.taskContext ? {
243
+ "X-Task-CLI-Grant": external.taskContext.grant,
244
+ "X-Task-CLI-Execution": external.taskContext.executionId,
245
+ "X-Task-CLI-Company": external.taskContext.companyId,
246
+ "X-Task-CLI-Sandbox": external.taskContext.sandboxId
247
+ } : {},
242
248
  ...internalCallSourceHeaders(),
243
249
  ...contentTypeHeader
244
250
  },