@thinkingai/ae-cli 6.1.19 → 6.1.21

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 (370) hide show
  1. package/README.md +96 -38
  2. package/README.zh.md +96 -38
  3. package/dist/{auth-QPEVVBKT.js → auth-XZNXFRJS.js} +236 -127
  4. package/dist/{capability-ASI62I4A.js → capability-FYTU3X6L.js} +80 -37
  5. package/dist/{chunk-QL6R6TSK.js → chunk-4NRCTUZJ.js} +27045 -477
  6. package/dist/{chunk-JYMGHGCE.js → chunk-57RRFUEZ.js} +42 -15
  7. package/dist/chunk-6ZIQV5GW.js +26 -0
  8. package/dist/{chunk-KZ6ZHF5J.js → chunk-7FTTULED.js} +14 -14
  9. package/dist/chunk-7XGFSUOM.js +623 -0
  10. package/dist/chunk-CCS66K4K.js +155 -0
  11. package/dist/{chunk-B5HMQAOM.js → chunk-DVMLWQD4.js} +8 -186
  12. package/dist/{chunk-KEWVSO64.js → chunk-DX5CDO34.js} +28 -18
  13. package/dist/chunk-EQ255HKO.js +38248 -0
  14. package/dist/{chunk-6QK7SYYY.js → chunk-HBGADCKA.js} +29 -37
  15. package/dist/{chunk-GJXRF7Y6.js → chunk-HFGZGYCG.js} +54 -81
  16. package/dist/chunk-JOCDD4ON.js +15 -0
  17. package/dist/{chunk-TKHSULJT.js → chunk-KPQY44JQ.js} +6 -0
  18. package/dist/{chunk-FR2EDAQM.js → chunk-MAPZ7VB6.js} +90 -2
  19. package/dist/chunk-V2NUHPXF.js +196 -0
  20. package/dist/{chunk-S5PONFBM.js → chunk-VYXXOKYS.js} +9 -9
  21. package/dist/{community-report-client-6OL6GBQW.js → community-report-client-CU22W53K.js} +2 -4
  22. package/dist/{config-XNMACCKX.js → config-XO3LI3SA.js} +8 -9
  23. package/dist/context-IFJI3LIT.js +46 -0
  24. package/dist/{data-integration-4NZGZ45E.js → data-integration-HNGUKFIC.js} +55 -44
  25. package/dist/index.js +122 -112
  26. package/dist/{local-data-upload-client-EFHDLXFG.js → local-data-upload-client-GTRIT64F.js} +4 -5
  27. package/dist/{memory-HBJQ2GC5.js → memory-QGPSNCQS.js} +4 -6
  28. package/dist/{metadata-62EWBEIG.js → metadata-DI5BMYFU.js} +8 -10
  29. package/dist/{model-BHLJ2QMT.js → model-RNPQXIBI.js} +4 -6
  30. package/dist/{personal-semantic-preference-JBVMAI7L.js → personal-semantic-preference-5C3WUXFI.js} +11 -10
  31. package/dist/{project-semantic-BQ4MPUS5.js → project-semantic-3LF6Q6JZ.js} +29 -25
  32. package/dist/{sync-MUWPRM5I.js → sync-O45NXEQY.js} +7 -8
  33. package/dist/{te-agent-WQZTMEK4.js → te-agent-K5MSPNHJ.js} +393 -90
  34. package/dist/{te-analysis-MNCG65LU.js → te-analysis-AISWCOOZ.js} +1175 -377
  35. package/dist/{te-community-BNE6KREL.js → te-community-4OYU3BDA.js} +10 -33
  36. package/dist/{te-dataops-TXLKM2W6.js → te-dataops-NFIPB6FX.js} +19 -20
  37. package/dist/{te-engage-TPKLRVTL.js → te-engage-BAM3GBFX.js} +13 -15
  38. package/dist/{te-experiment-6BYKTCY7.js → te-experiment-GUTZXZ5Z.js} +132 -16
  39. package/dist/te-kb-3TS73NO6.js +1992 -0
  40. package/dist/{te-system-44LZJDTQ.js → te-system-STMHLS5J.js} +12 -9
  41. package/dist/{te-team-XMP47YXE.js → te-team-3I5AOX3N.js} +6 -8
  42. package/dist/{update-UODFOZ4P.js → update-RZXLPCRH.js} +7 -8
  43. package/package.json +29 -19
  44. package/skills/ae-agent/SKILL.md +30 -13
  45. package/skills/ae-agent/references/agent-distribution.md +94 -0
  46. package/skills/ae-agent/references/approval-request.md +4 -0
  47. package/skills/ae-agent/references/command_index.md +9 -2
  48. package/skills/ae-agent/references/create-automation.md +20 -2
  49. package/skills/ae-agent/references/get-agent-context.md +70 -0
  50. package/skills/ae-agent/references/list-automations.md +18 -3
  51. package/skills/ae-agent/references/list-mcp-credentials.md +1 -1
  52. package/skills/ae-agent/references/mcp-token.md +3 -3
  53. package/skills/ae-agent/references/set-mcp-credential.md +0 -1
  54. package/skills/ae-agent/references/update-automation.md +18 -0
  55. package/skills/ae-analysis/SKILL.md +101 -79
  56. package/skills/ae-analysis/references/adhoc_export.md +11 -18
  57. package/skills/ae-analysis/references/adhoc_run.md +17 -7
  58. package/skills/ae-analysis/references/agent_review_detail.md +11 -0
  59. package/skills/ae-analysis/references/agent_review_evidence.md +46 -0
  60. package/skills/ae-analysis/references/agent_review_list.md +9 -0
  61. package/skills/ae-analysis/references/agent_review_preflight.md +96 -0
  62. package/skills/ae-analysis/references/agent_review_priorities_comparisons.md +76 -0
  63. package/skills/ae-analysis/references/agent_review_records.md +9 -0
  64. package/skills/ae-analysis/references/agent_review_retry.md +12 -0
  65. package/skills/ae-analysis/references/agent_review_review.md +16 -0
  66. package/skills/ae-analysis/references/agent_review_submit_to_page.md +184 -0
  67. package/skills/ae-analysis/references/ai_models/attribution.md +29 -0
  68. package/skills/ae-analysis/references/ai_models/distribution.md +40 -0
  69. package/skills/ae-analysis/references/ai_models/event.md +108 -0
  70. package/skills/ae-analysis/references/ai_models/funnel.md +46 -0
  71. package/skills/ae-analysis/references/ai_models/heat_map.md +26 -0
  72. package/skills/ae-analysis/references/ai_models/interval.md +20 -0
  73. package/skills/ae-analysis/references/ai_models/path.md +38 -0
  74. package/skills/ae-analysis/references/ai_models/prop_analysis.md +39 -0
  75. package/skills/ae-analysis/references/ai_models/rank_list.md +25 -0
  76. package/skills/ae-analysis/references/ai_models/retention.md +70 -0
  77. package/skills/ae-analysis/references/ai_models/revenue.md +28 -0
  78. package/skills/ae-analysis/references/ai_models/sql.md +74 -0
  79. package/skills/ae-analysis/references/ai_models/tag.md +19 -0
  80. package/skills/ae-analysis/references/ai_models.md +32 -453
  81. package/skills/ae-analysis/references/alert_create.md +7 -7
  82. package/skills/ae-analysis/references/alert_delete.md +4 -6
  83. package/skills/ae-analysis/references/alert_detail_list.md +7 -9
  84. package/skills/ae-analysis/references/alert_get.md +5 -7
  85. package/skills/ae-analysis/references/alert_job_list.md +4 -6
  86. package/skills/ae-analysis/references/alert_list.md +6 -8
  87. package/skills/ae-analysis/references/alert_notice_config_list.md +4 -6
  88. package/skills/ae-analysis/references/alert_start.md +5 -7
  89. package/skills/ae-analysis/references/alert_stop.md +5 -7
  90. package/skills/ae-analysis/references/alert_update.md +8 -8
  91. package/skills/ae-analysis/references/analysis_data_export.md +72 -0
  92. package/skills/ae-analysis/references/analysis_data_retrieval.md +32 -196
  93. package/skills/ae-analysis/references/analysis_gateway_assets.md +23 -180
  94. package/skills/ae-analysis/references/analysis_interpretation.md +37 -17
  95. package/skills/ae-analysis/references/asset_abnormal_get.md +0 -1
  96. package/skills/ae-analysis/references/asset_abnormal_list.md +0 -1
  97. package/skills/ae-analysis/references/asset_authentication_export.md +4 -0
  98. package/skills/ae-analysis/references/asset_authentication_list.md +7 -1
  99. package/skills/ae-analysis/references/asset_authentication_update.md +5 -1
  100. package/skills/ae-analysis/references/asset_batch_dashboard_schedule_freeze.md +8 -6
  101. package/skills/ae-analysis/references/asset_batch_delete.md +6 -6
  102. package/skills/ae-analysis/references/asset_batch_disable_auto_backup.md +4 -5
  103. package/skills/ae-analysis/references/asset_batch_disable_auto_update.md +5 -6
  104. package/skills/ae-analysis/references/asset_batch_handover.md +4 -5
  105. package/skills/ae-analysis/references/asset_batch_info_export.md +4 -5
  106. package/skills/ae-analysis/references/asset_batch_sql_export.md +5 -6
  107. package/skills/ae-analysis/references/asset_dependency_list.md +4 -5
  108. package/skills/ae-analysis/references/asset_export.md +4 -5
  109. package/skills/ae-analysis/references/asset_impact_list.md +5 -9
  110. package/skills/ae-analysis/references/asset_lineage_get.md +5 -6
  111. package/skills/ae-analysis/references/asset_list.md +4 -5
  112. package/skills/ae-analysis/references/asset_query_history_list.md +4 -8
  113. package/skills/ae-analysis/references/asset_recent_list.md +0 -1
  114. package/skills/ae-analysis/references/asset_search.md +12 -9
  115. package/skills/ae-analysis/references/asset_url_get.md +3 -4
  116. package/skills/ae-analysis/references/bi_panel_copy.md +2 -2
  117. package/skills/ae-analysis/references/bi_panel_page_data_export.md +4 -12
  118. package/skills/ae-analysis/references/bi_panel_page_data_run.md +2 -0
  119. package/skills/ae-analysis/references/catalog_export.md +4 -17
  120. package/skills/ae-analysis/references/catalog_list.md +4 -4
  121. package/skills/ae-analysis/references/check_delete.md +5 -7
  122. package/skills/ae-analysis/references/check_export.md +11 -11
  123. package/skills/ae-analysis/references/check_get.md +8 -10
  124. package/skills/ae-analysis/references/check_list.md +4 -6
  125. package/skills/ae-analysis/references/check_retry.md +8 -10
  126. package/skills/ae-analysis/references/check_run.md +2 -4
  127. package/skills/ae-analysis/references/command_index.md +46 -28
  128. package/skills/ae-analysis/references/cross_source_config.md +84 -0
  129. package/skills/ae-analysis/references/dashboard_report_data_export.md +5 -13
  130. package/skills/ae-analysis/references/dashboard_report_data_run.md +1 -1
  131. package/skills/ae-analysis/references/dashboard_update.md +15 -4
  132. package/skills/ae-analysis/references/datatable_columns_get.md +0 -1
  133. package/skills/ae-analysis/references/datatable_influence_list.md +0 -1
  134. package/skills/ae-analysis/references/datatable_version_get.md +0 -1
  135. package/skills/ae-analysis/references/datatable_version_list.md +0 -1
  136. package/skills/ae-analysis/references/debug_device_add.md +1 -2
  137. package/skills/ae-analysis/references/drilldown_entities_export.md +3 -3
  138. package/skills/ae-analysis/references/drilldown_events_export.md +3 -2
  139. package/skills/ae-analysis/references/drilldown_user_events_export.md +2 -2
  140. package/skills/ae-analysis/references/entity_detail_export.md +3 -2
  141. package/skills/ae-analysis/references/entity_detail_run.md +1 -0
  142. package/skills/ae-analysis/references/event_blacklist_add.md +5 -7
  143. package/skills/ae-analysis/references/event_blacklist_list.md +4 -6
  144. package/skills/ae-analysis/references/event_blacklist_update.md +6 -8
  145. package/skills/ae-analysis/references/event_changelog_list.md +0 -1
  146. package/skills/ae-analysis/references/event_create.md +0 -1
  147. package/skills/ae-analysis/references/event_detail_export.md +3 -2
  148. package/skills/ae-analysis/references/event_detail_run.md +1 -0
  149. package/skills/ae-analysis/references/event_export.md +0 -1
  150. package/skills/ae-analysis/references/event_get.md +0 -1
  151. package/skills/ae-analysis/references/event_hide_update.md +0 -1
  152. package/skills/ae-analysis/references/event_influence_list.md +0 -1
  153. package/skills/ae-analysis/references/event_list.md +0 -1
  154. package/skills/ae-analysis/references/event_property_bundle_export.md +5 -14
  155. package/skills/ae-analysis/references/event_property_bundle_import.md +2 -6
  156. package/skills/ae-analysis/references/event_relation_update.md +0 -1
  157. package/skills/ae-analysis/references/event_update.md +0 -1
  158. package/skills/ae-analysis/references/exchange_config_update.md +0 -1
  159. package/skills/ae-analysis/references/exchange_rate_refresh.md +0 -1
  160. package/skills/ae-analysis/references/exchange_rule_list.md +0 -1
  161. package/skills/ae-analysis/references/exchange_rule_update.md +0 -1
  162. package/skills/ae-analysis/references/exchange_rule_validate.md +0 -1
  163. package/skills/ae-analysis/references/governance_recommendation_decisions.md +23 -0
  164. package/skills/ae-analysis/references/governance_recommendation_export.md +108 -0
  165. package/skills/ae-analysis/references/governance_recommendation_submit.md +41 -0
  166. package/skills/ae-analysis/references/history_tag_data_drilldown_export.md +4 -4
  167. package/skills/ae-analysis/references/history_tag_data_export.md +3 -3
  168. package/skills/ae-analysis/references/ingest_error_list.md +7 -9
  169. package/skills/ae-analysis/references/ingest_summary.md +6 -8
  170. package/skills/ae-analysis/references/live_data_export.md +10 -10
  171. package/skills/ae-analysis/references/live_data_list.md +7 -9
  172. package/skills/ae-analysis/references/metadata_resolution.md +78 -0
  173. package/skills/ae-analysis/references/metric_export.md +0 -1
  174. package/skills/ae-analysis/references/metric_get.md +0 -1
  175. package/skills/ae-analysis/references/metric_list.md +4 -5
  176. package/skills/ae-analysis/references/metric_update.md +0 -1
  177. package/skills/ae-analysis/references/operation_record_export.md +4 -5
  178. package/skills/ae-analysis/references/operation_record_list.md +4 -5
  179. package/skills/ae-analysis/references/personal_semantic_preference_list.md +18 -1
  180. package/skills/ae-analysis/references/plan_change_log_export.md +10 -10
  181. package/skills/ae-analysis/references/plan_change_log_list.md +4 -6
  182. package/skills/ae-analysis/references/plan_delete_items.md +2 -4
  183. package/skills/ae-analysis/references/plan_export.md +9 -9
  184. package/skills/ae-analysis/references/plan_generate.md +2 -4
  185. package/skills/ae-analysis/references/plan_get.md +4 -6
  186. package/skills/ae-analysis/references/plan_import_excel.md +6 -8
  187. package/skills/ae-analysis/references/plan_save_items.md +2 -4
  188. package/skills/ae-analysis/references/plan_sync_from_meta.md +4 -6
  189. package/skills/ae-analysis/references/project_access_detail_get.md +0 -1
  190. package/skills/ae-analysis/references/project_data_power_get.md +0 -1
  191. package/skills/ae-analysis/references/project_data_power_list.md +0 -1
  192. package/skills/ae-analysis/references/project_data_power_upsert.md +0 -1
  193. package/skills/ae-analysis/references/project_entity_create.md +0 -1
  194. package/skills/ae-analysis/references/project_entity_event_list.md +0 -1
  195. package/skills/ae-analysis/references/project_entity_get.md +0 -1
  196. package/skills/ae-analysis/references/project_entity_list.md +0 -1
  197. package/skills/ae-analysis/references/project_entity_update.md +0 -1
  198. package/skills/ae-analysis/references/project_function_list.md +0 -1
  199. package/skills/ae-analysis/references/project_info_get.md +0 -1
  200. package/skills/ae-analysis/references/project_info_list.md +0 -1
  201. package/skills/ae-analysis/references/project_info_update.md +0 -1
  202. package/skills/ae-analysis/references/project_mark_time_create.md +0 -1
  203. package/skills/ae-analysis/references/project_mark_time_list.md +0 -1
  204. package/skills/ae-analysis/references/project_mark_time_update.md +0 -1
  205. package/skills/ae-analysis/references/project_member_add.md +6 -5
  206. package/skills/ae-analysis/references/project_member_batch_update.md +0 -1
  207. package/skills/ae-analysis/references/project_member_candidate_list.md +4 -3
  208. package/skills/ae-analysis/references/project_member_handover_run.md +2 -3
  209. package/skills/ae-analysis/references/project_member_list.md +0 -1
  210. package/skills/ae-analysis/references/project_member_receiver_list.md +0 -1
  211. package/skills/ae-analysis/references/project_member_update.md +0 -1
  212. package/skills/ae-analysis/references/project_owner_update.md +0 -1
  213. package/skills/ae-analysis/references/project_permission_binding_list.md +0 -1
  214. package/skills/ae-analysis/references/project_role_function_list.md +0 -1
  215. package/skills/ae-analysis/references/project_role_get.md +0 -1
  216. package/skills/ae-analysis/references/project_role_list.md +0 -1
  217. package/skills/ae-analysis/references/project_role_upsert.md +32 -2
  218. package/skills/ae-analysis/references/project_role_user_list.md +0 -1
  219. package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +214 -0
  220. package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +93 -0
  221. package/skills/ae-analysis/references/project_timezone_get.md +0 -1
  222. package/skills/ae-analysis/references/project_timezone_overview.md +0 -1
  223. package/skills/ae-analysis/references/project_timezone_update.md +0 -1
  224. package/skills/ae-analysis/references/project_user_id_items_update.md +0 -1
  225. package/skills/ae-analysis/references/property_changelog_list.md +0 -1
  226. package/skills/ae-analysis/references/property_create.md +0 -1
  227. package/skills/ae-analysis/references/property_export.md +0 -1
  228. package/skills/ae-analysis/references/property_get.md +0 -1
  229. package/skills/ae-analysis/references/property_hide_update.md +0 -1
  230. package/skills/ae-analysis/references/property_influence_list.md +0 -1
  231. package/skills/ae-analysis/references/property_list.md +3 -4
  232. package/skills/ae-analysis/references/property_related_events.md +0 -1
  233. package/skills/ae-analysis/references/property_relation_update.md +0 -1
  234. package/skills/ae-analysis/references/property_update.md +0 -1
  235. package/skills/ae-analysis/references/report_create.md +4 -2
  236. package/skills/ae-analysis/references/report_data_export.md +11 -9
  237. package/skills/ae-analysis/references/report_data_run.md +14 -7
  238. package/skills/ae-analysis/references/report_get.md +5 -3
  239. package/skills/ae-analysis/references/report_list.md +2 -0
  240. package/skills/ae-analysis/references/report_update.md +5 -3
  241. package/skills/ae-analysis/references/rule_create.md +5 -6
  242. package/skills/ae-analysis/references/rule_delete.md +5 -5
  243. package/skills/ae-analysis/references/rule_list.md +3 -4
  244. package/skills/ae-analysis/references/rule_schema.md +3 -4
  245. package/skills/ae-analysis/references/rule_update.md +5 -6
  246. package/skills/ae-analysis/references/sdk_sample_generate.md +2 -4
  247. package/skills/ae-analysis/references/sql_table_columns.md +1 -1
  248. package/skills/ae-analysis/references/super_metadata_batch_create.md +1 -1
  249. package/skills/ae-analysis/references/super_metadata_batch_edit.md +1 -1
  250. package/skills/ae-analysis/references/system_member_add.md +1 -2
  251. package/skills/ae-analysis/references/system_member_status_update.md +1 -1
  252. package/skills/ae-analysis/references/system_ops_alert_contact_list.md +1 -1
  253. package/skills/ae-analysis/references/system_ops_alert_contact_test.md +0 -1
  254. package/skills/ae-analysis/references/system_query_monitor_overview.md +3 -3
  255. package/skills/ae-analysis/references/system_query_task_export.md +4 -14
  256. package/skills/ae-analysis/references/system_query_task_get.md +1 -1
  257. package/skills/ae-analysis/references/system_query_task_list.md +5 -6
  258. package/skills/ae-analysis/references/system_receiver_address_upsert.md +3 -3
  259. package/skills/ae-analysis/references/system_receiver_detection_get.md +1 -1
  260. package/skills/ae-analysis/references/system_third_party_login_disable.md +1 -1
  261. package/skills/ae-analysis/references/system_usage_trend_export.md +3 -12
  262. package/skills/ae-analysis/references/user_cluster_list.md +1 -1
  263. package/skills/ae-analysis/references/user_cluster_member_export.md +4 -4
  264. package/skills/ae-analysis/references/user_tag_create.md +23 -1
  265. package/skills/ae-analysis/references/user_tag_list.md +1 -1
  266. package/skills/ae-analysis/references/user_tag_member_export.md +4 -4
  267. package/skills/ae-analysis/references/user_tag_models.md +9 -1
  268. package/skills/ae-analysis/references/user_tag_update.md +14 -2
  269. package/skills/ae-analysis/references/virtual_event_create.md +10 -5
  270. package/skills/ae-analysis/references/virtual_event_get.md +0 -1
  271. package/skills/ae-analysis/references/virtual_property_create.md +0 -1
  272. package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +0 -1
  273. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +1054 -0
  274. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +112 -0
  275. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +30 -0
  276. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/generate-build-ir.mjs +2735 -0
  277. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/package-wiki-source-zip.mjs +376 -0
  278. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/plan-kb-source-sync.mjs +264 -0
  279. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/precompiled-source.mjs +49 -0
  280. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/upload-kb-sources-concurrently.mjs +200 -0
  281. package/skills/ae-analysis/scripts/read_results.py +197 -0
  282. package/skills/ae-analysis-global/SKILL.md +1 -1
  283. package/skills/ae-capability/SKILL.md +1 -1
  284. package/skills/ae-community/SKILL.md +1 -1
  285. package/skills/ae-current-context/SKILL.md +53 -0
  286. package/skills/ae-data-integration/SKILL.md +6 -4
  287. package/skills/ae-data-integration/references/dimension-routing.md +36 -0
  288. package/skills/ae-data-integration/references/lark-bitable-source.md +288 -0
  289. package/skills/ae-data-integration/references/lark-sheet-source.md +130 -0
  290. package/skills/ae-data-integration/references/local-analysis.md +2 -0
  291. package/skills/ae-data-integration/references/manual-export-source.md +83 -0
  292. package/skills/ae-data-integration/references/reuse.md +2 -0
  293. package/skills/ae-data-integration/references/sink-upload.md +32 -0
  294. package/skills/ae-data-integration/references/source-inspect.md +1 -1
  295. package/skills/ae-data-integration/references/tracking-plan.md +5 -2
  296. package/skills/ae-data-integration/references/transform.md +1 -1
  297. package/skills/ae-data-integration/references/ue-mapping.md +7 -4
  298. package/skills/ae-data-integration/references/ue-routing.md +17 -1
  299. package/skills/ae-data-integration-helper/SKILL.md +5 -5
  300. package/skills/ae-data-integration-helper/references/android_sdk_faq.md +3 -3
  301. package/skills/ae-data-integration-helper/references/c_sdk_faq.md +3 -3
  302. package/skills/ae-data-integration-helper/references/cocoscreator_sdk_faq.md +1 -1
  303. package/skills/ae-data-integration-helper/references/cpp_server_sdk_faq.md +3 -3
  304. package/skills/ae-data-integration-helper/references/ios_sdk_faq.md +1 -1
  305. package/skills/ae-data-integration-helper/references/java_sdk_faq.md +3 -3
  306. package/skills/ae-data-integration-helper/references/javascript_sdk_faq.md +1 -1
  307. package/skills/ae-data-integration-helper/references/logbus2_guide.md +1 -1
  308. package/skills/ae-data-integration-helper/references/logbus2_parser_plugin.md +2 -2
  309. package/skills/ae-data-integration-helper/references/minigame_sdk_faq.md +2 -2
  310. package/skills/ae-data-integration-helper/references/miniprogram_sdk_faq.md +1 -1
  311. package/skills/ae-data-integration-helper/references/python_sdk_faq.md +2 -2
  312. package/skills/ae-data-integration-helper/references/restful_api_notes.md +2 -2
  313. package/skills/ae-data-integration-helper/references/sdk_log_guide.md +3 -3
  314. package/skills/ae-data-integration-helper/references/sdk_usage_notes.md +11 -11
  315. package/skills/ae-data-integration-helper/references/unity_sdk_faq.md +1 -1
  316. package/skills/ae-dataops/SKILL.md +1 -1
  317. package/skills/ae-engage/SKILL.md +4 -3
  318. package/skills/ae-engage/references/build-task-save-guide.md +3 -0
  319. package/skills/ae-engage/references/flow-metric-update.md +115 -1
  320. package/skills/ae-engage/references/save-flow.md +3 -0
  321. package/skills/ae-engage/references/save-task.md +21 -0
  322. package/skills/ae-engage/references/task-metric-update.md +151 -0
  323. package/skills/ae-experiment/SKILL.md +14 -7
  324. package/skills/ae-experiment/references/save_submit_external_experiment.md +52 -0
  325. package/skills/ae-experiment-design/SKILL.md +3 -3
  326. package/skills/ae-experiment-design/references/platform-operations.md +1 -1
  327. package/skills/ae-experiment-insight/SKILL.md +2 -2
  328. package/skills/ae-experiment-insight/references/platform-operations.md +1 -1
  329. package/skills/ae-generate-tracking-code/SKILL.md +2 -1
  330. package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +1 -1
  331. package/skills/ae-generate-tracking-code/references/datax-config.md +1 -1
  332. package/skills/ae-generate-tracking-code/references/logbus-config.md +1 -1
  333. package/skills/ae-generate-tracking-code/references/modes.md +1 -1
  334. package/skills/ae-generate-tracking-code/references/server-sdk-insert.md +5 -5
  335. package/skills/ae-generate-tracking-code/references/snippet-delivery.md +3 -3
  336. package/skills/ae-generate-tracking-plan/SKILL.md +27 -15
  337. package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +1 -1
  338. package/skills/ae-generate-tracking-plan/references/te-api.md +1 -0
  339. package/skills/ae-generate-tracking-plan/references/xlsx-schema.md +3 -2
  340. package/skills/ae-kb/SKILL.md +147 -37
  341. package/skills/ae-kb/references/analysis-workflow.md +292 -0
  342. package/skills/ae-kb/references/query-workflow.md +59 -29
  343. package/skills/ae-kb/references/source-mutations.md +95 -0
  344. package/skills/ae-kb/references/versions.md +46 -0
  345. package/skills/ae-kb-discovery/SKILL.md +5 -1
  346. package/skills/ae-metadata/SKILL.md +1 -1
  347. package/skills/ae-migrate-tracking-code/SKILL.md +195 -0
  348. package/skills/ae-migrate-tracking-code/references/ae-preset-properties.md +76 -0
  349. package/skills/ae-migrate-tracking-code/references/ir.md +167 -0
  350. package/skills/ae-migrate-tracking-code/references/mapping-framework.md +112 -0
  351. package/skills/ae-migrate-tracking-code/references/providers/README.md +58 -0
  352. package/skills/ae-migrate-tracking-code/references/providers/amplitude.md +208 -0
  353. package/skills/ae-migrate-tracking-code/references/providers/firebase.md +160 -0
  354. package/skills/ae-migrate-tracking-code/references/providers/ga4.md +92 -0
  355. package/skills/ae-migrate-tracking-code/references/providers/mixpanel.md +150 -0
  356. package/skills/ae-migrate-tracking-code/references/providers/sensors-data.md +146 -0
  357. package/skills/ae-project-semantic/SKILL.md +1 -1
  358. package/skills/ae-system/SKILL.md +5 -5
  359. package/skills/ae-team/SKILL.md +2 -2
  360. package/skills/ae-use-agent/SKILL.md +42 -0
  361. package/skills/ae-use-agent/references/local-agent.md +114 -0
  362. package/dist/auth-UMJAA72O.js +0 -15
  363. package/dist/chunk-533JK3YX.js +0 -72
  364. package/dist/chunk-DKEXH6Q5.js +0 -72
  365. package/dist/chunk-O6K2ODUE.js +0 -318
  366. package/dist/chunk-RWXIXOZG.js +0 -326
  367. package/dist/client-N7NGZUNI.js +0 -204
  368. package/dist/te-kb-BUD6N3NI.js +0 -1222
  369. package/skills/ae-agent/references/auto-provision-mcp-credentials.md +0 -57
  370. package/skills/ae-analysis/metadata_resolution.md +0 -184
@@ -79,7 +79,7 @@ Phase 0 → 1 → 2 → 3 → 4, do not skip steps.
79
79
  > CLI messages, and auto-track/i18n-owned labels must come from `src/tracking/i18n` via `AE_LANG=<user_lang>` and `draft.meta.lang`.
80
80
  > When a localized label is needed, inspect `src/tracking/i18n` and use the existing resource key/value; do not invent translations from the model.
81
81
  > If template business text needs localization and the CLI/i18n resources do not provide it, preserve the imported text and ask the user before rewriting business semantics.
82
- > Only identifier fields like `event_name`, `prop_name` remain in English snake_case (canonical format).
82
+ > Only identifier fields like `event_name`, `prop_name` remain in English. Property names are `snake_case`; event names are lowercase by default, uppercase only when the user asks to preserve it.
83
83
  > This skill only cares about command behavior, not internal implementation.
84
84
 
85
85
  ---
@@ -111,7 +111,7 @@ If **not** in a sandbox environment, ask exactly:
111
111
  ```text
112
112
  Choose your source material (up to 2):
113
113
 
114
- 1 - Product document (local path, image file, or folder) — Extract events and properties from product docs; supports md/pdf/docx/URL/images (png/jpg/jpeg/webp)
114
+ 1 - Product document (local path, image file, or folder) — Extract events and properties from product docs; supports md/pdf/docx/xlsx/pptx/URL/images (png/jpg/jpeg/webp)
115
115
  2 - Detailed description (conversational) — Describe app business flow, core features, user behaviors, monetization model, etc.
116
116
  3 - Codebase (local project path; hidden in sandbox) — Analyze source code to extract events and properties
117
117
  4 - Pre-built template (built-in industry and game genre templates) — Select a built-in template
@@ -126,7 +126,7 @@ If in a sandbox environment, ask exactly:
126
126
  ```text
127
127
  Choose your source material (up to 2):
128
128
 
129
- 1 - Product document (sandbox workspace path, uploaded attachment, URL, image file, or folder) — Extract events and properties from product docs; supports md/pdf/docx/URL/images (png/jpg/jpeg/webp). You can attach/upload relevant files here.
129
+ 1 - Product document (sandbox workspace path, uploaded attachment, URL, image file, or folder) — Extract events and properties from product docs; supports md/pdf/docx/xlsx/pptx/URL/images (png/jpg/jpeg/webp). You can attach/upload relevant files here.
130
130
  2 - Detailed description (conversational) — Describe app business flow, core features, user behaviors, monetization model, etc.
131
131
  3 - Pre-built template (built-in industry and game genre templates) — Select a built-in template
132
132
  4 - Modify existing tracking plan (sandbox workspace path) — Import an existing tracking plan xlsx as baseline for modification; can be combined with Product doc / Description, but NOT with Pre-built template
@@ -142,7 +142,7 @@ User can multi-select (max 2). Interpret numbers by the **visible list shown to
142
142
 
143
143
  Canonical source material options (non-sandbox numbering):
144
144
 
145
- 1. **Product document** ****(****local path, sandbox workspace path, uploaded attachment, URL, image file, or folder) — Extract events and properties from product docs; supports md/pdf/docx/URL/images (png/jpg/jpeg/webp)
145
+ 1. **Product document** ****(****local path, sandbox workspace path, uploaded attachment, URL, image file, or folder) — Extract events and properties from product docs; supports md/pdf/docx/xlsx/pptx/URL/images (png/jpg/jpeg/webp)
146
146
  2. **Detailed description** (conversational) — Describe app business flow, core features, user behaviors, monetization model, etc.
147
147
  3. **Codebase** (local project path; hidden in sandbox) — Analyze source code to extract events and properties
148
148
  4. **Pre-built template** (built-in industry and game genre templates) — Select a built-in template (run `AE_LANG=<user_lang> ae-cli tracking plan list-templates --json` to see available templates)
@@ -210,7 +210,7 @@ Based on user selection, determine source material type and record to `meta.sour
210
210
  | Severity | Examples | Handling | User Action |
211
211
  |---|---|---|---|
212
212
  | 🔧 **Minor** (auto-fixable) | `display_name` duplicate, `array_row` sub-property inconsistency, event name duplicate | `--fix` auto-fixes, writes to `draft.json`. Inform user of what was fixed. | None (informed) |
213
- | ⚠️ **Medium** (needs confirmation) | snake_case violation, property name duplicate, invalid property type, nested property parent is not a composite type | List each issue with current value → suggested fix. User confirms item by item before writing to `draft.json`. | Confirm each fix |
213
+ | ⚠️ **Medium** (needs confirmation) | property name snake_case violation, property name duplicate, invalid property type, nested property parent is not a composite type | List each issue with current value → suggested fix. User confirms item by item before writing to `draft.json`. | Confirm each fix |
214
214
  | 🛑 **Severe** | File cannot be parsed, or events array is empty after import | Reject. Tell user the specific issue. User fixes **original file** and re-imports. | Fix original file |
215
215
 
216
216
  **Medium issue confirmation format**:
@@ -219,7 +219,7 @@ Based on user selection, determine source material type and record to `meta.sour
219
219
 
220
220
  | # | Issue | Location | Current | Suggested |
221
221
  |---|-------|----------|---------|------------|
222
- | 1 | snake_case | event_name | UserLogin | user_login |
222
+ | 1 | snake_case | event_name | UserLogin | user_login (keep UserLogin only if the user asked to preserve case) |
223
223
  | 2 | snake_case | prop_name | vipLevel | vip_level |
224
224
  | 3 | invalid type | property "level" | integer | number |
225
225
 
@@ -242,7 +242,7 @@ Based on user selection, determine source material type and record to `meta.sour
242
242
  - **Events**: Player interaction actions (click/swipe/trigger), scene transitions, game state changes (start/pause/end), business flow nodes (purchase/upgrade/unlock)
243
243
  - **Event Properties**: Action parameters (bullet type/enemy level/item ID), state values (score/HP/coins), context (level ID/difficulty/mode)
244
244
  - **User Properties**: Persistent state (level/experience/VIP/cumulative spend)
245
- 5. Map extracted results to AE naming conventions (`snake_case` event names + `display_name` in user's language)
245
+ 5. Map extracted results to AE naming conventions (event names lowercase by default, uppercase only on request; property names `snake_case`; + `display_name` in user's language)
246
246
  6. Confirm extracted results with user, supplement missing items
247
247
 
248
248
  **Business Dimension Confirmation**:
@@ -386,7 +386,7 @@ When the user selects the **Data sample / file profile** option (`source_type =
386
386
  3. **Column → property mapping draft**:
387
387
  - Identify system columns first: time field, `distinct_id` / `account_id`, event-name column, user-property-name column.
388
388
  - Map the remaining columns to event properties / user properties / super properties.
389
- - Naming: `snake_case` event/property names + `display_name` + `desc` + `event_tag` (language follows the user's input).
389
+ - Naming: `snake_case` property names, event names lowercase by default (uppercase only on request) + `display_name` + `desc` + `event_tag` (language follows the user's input).
390
390
  - Type inference: CSV columns default to `string`; infer `number` / `bool` / `datetime` / enum from field name + value distribution + business doc/prompt priors. **Uncertain or conflicting columns are marked "to-confirm" and asked only inside the gate** (do not ask column-by-column beforehand).
391
391
  4. **Single confirmation gate** (replaces Phase 2, see below).
392
392
  5. **Merge with existing plan** (reuse Phase 4.1/4.2 conflict detection).
@@ -640,7 +640,7 @@ Draft
640
640
  }
641
641
  ```
642
642
 
643
- > `update_type` is one of: `user_set` (overwrite), `user_setOnce` (first-set-only), `user_add` (numeric accumulate).
643
+ > `update_type` is one of: `user_set` (overwrite), `user_setOnce` (first-set-only), `user_add` (numeric accumulate), `user_append` (array append).
644
644
 
645
645
  **User identity fields (`meta.user_identity`)**:
646
646
 
@@ -656,7 +656,7 @@ Draft
656
656
  **Property types** (enum): `string` / `number` / `bool` / `datetime` /
657
657
  `object` (single object, with sub-properties) / `array_row` (object array, supports `parent.child` nesting) / `array_string` (string array)
658
658
 
659
- **Naming rules**: Event names / property names must be `snake_case`; use `display_name` field for human-readable names.
659
+ **Naming rules**: Property names must be `snake_case`; event names are lowercase by default, and uppercase is kept only when the user asks to preserve it. Use `display_name` for human-readable names.
660
660
 
661
661
  ### 1.2 Merge Source Materials
662
662
 
@@ -674,9 +674,20 @@ Earlier sources take precedence — same-name events keep the earlier version, l
674
674
  - ⚠️ **No model-invented translations for template labels**: When replacing or explaining a localized template-owned label, use the exact value from `src/tracking/i18n` resources. If no corresponding resource exists, preserve the template text and ask the user before changing semantics.
675
675
  - ⚠️ **event_tag is not free-form model translation**: Do not manually map `业务事件`/`系统事件` to another language. Preserve template tags, or rely on `src/tracking/i18n` and autotrack generation for system labels when the CLI owns them.
676
676
  - **codebase**: Scan project source directory, extract events/properties from business logic; **same-name events merge prop_names without overwriting existing fields**; new items `source: "codebase"`
677
- - **prd**: Read all user-provided product documents (md / pdf / docx / URL / images), extract events and properties from each file; **same-name events merge prop_names without overwriting existing fields**; image files analyzed via multimodal interpretation of UI elements and interaction flows; all new items `source: "prd"`
677
+ - **prd**: Read all user-provided product documents (md / pdf / docx / xlsx / pptx / URL / images), extract events and properties from each file; **same-name events merge prop_names without overwriting existing fields**; image files analyzed via multimodal interpretation of UI elements and interaction flows; all new items `source: "prd"`
678
+ - **Read each format with the table below.** Preferred tool first; when it is missing, fall back rather than fail the read.
679
+ | Format | Read via |
680
+ |---|---|
681
+ | md | read directly |
682
+ | docx | `pandoc -t markdown <file>`; fallback `markitdown <file>` (`pip install markitdown` if missing); last resort `unzip -p <file> word/document.xml` and read the text |
683
+ | pdf (text) | extract text (native Read or a PDF text extractor) |
684
+ | pdf (scanned) | render pages to images, then read with vision |
685
+ | xlsx | read rows/columns with a structure-preserving reader (`openpyxl` / `pandas`, `pip install` if missing); a tracking table's row/column layout carries meaning — do NOT rely on a flattened markdown dump |
686
+ | pptx | `markitdown <file>` (`pip install markitdown` if missing) |
687
+ | png/jpg/jpeg/webp | multimodal interpretation, analyze UI elements and interaction flows |
688
+ - **xlsx is a third source-material path, distinct from the two existing xlsx flows.** A human-readable tracking table (event / property / type rows) is read row-by-row here. An **AE-format tracking-plan xlsx** goes through `import-template`; a **CSV/Excel data sample** goes through the data path (`ae-cli data-integration inspect`). Never route one into another's flow.
678
689
  - **prd path is a folder**: Recursively scan all files in the directory:
679
- - md/pdf/docx → read text content, extract events/properties
690
+ - md/pdf/docx/xlsx/pptx → read per the table above, extract events/properties
680
691
  - png/jpg/jpeg/webp → multimodal interpretation, analyze UI elements and interaction flows
681
692
  - subdirectories → recurse
682
693
  - other files → skip
@@ -817,7 +828,8 @@ AE_LANG=<user_lang> ae-cli tracking plan draft --in .ae-cli/draft.json --out .ae
817
828
  |---|---|---|
818
829
  | Display name uniqueness | Within same property pool, `display_name` must not repeat | ✅ Add distinguishing prefix |
819
830
  | Object array consistency | Same `array_row` across different events must have identical sub-properties | ✅ Fill missing sub-properties |
820
- | snake_case | Event/property names must match `^[a-z][a-z0-9_]*$` | ❌ Manual fix needed |
831
+ | Property name snake_case | Property names must match `^[a-z][a-z0-9_]*$` | ❌ Manual fix needed |
832
+ | Event name format | Event names match `^[A-Za-z][A-Za-z0-9_]*$`; lowercase by default, uppercase kept on request | ❌ Manual fix needed |
821
833
  | Property name uniqueness | Property names must not repeat | ❌ Manual fix needed |
822
834
  | Event name uniqueness | Event names must not repeat | ✅ Remove later duplicates |
823
835
 
@@ -1255,7 +1267,7 @@ Continue append (without fixing) / Modify draft / Switch to replace?
1255
1267
 
1256
1268
  #### Conflict Type B: Same-name events (advisory)
1257
1269
 
1258
- AE merge-by-name: Same-name events are not overwritten; new-name events are added.
1270
+ AE merge-by-name: Same-name events are not overwritten; new-name events are added. Event names are case-sensitive (`Purchase` ≠ `purchase`) — changing only the case creates a new event, not a rename.
1259
1271
 
1260
1272
  **Detection logic**:
1261
1273
 
@@ -1347,7 +1359,7 @@ AE_LANG=<user_lang> ae-cli tracking plan upload --project <projectId> --xlsx .ae
1347
1359
  #### Auto-fix Flow
1348
1360
 
1349
1361
  CLI auto-executes:
1350
- 1. Upload xlsx to TE
1362
+ 1. Upload xlsx to AE
1351
1363
  2. Check if `eventErrorMap` has errors
1352
1364
  3. Fixable errors → auto-fix draft.json → regenerate xlsx → re-upload
1353
1365
  4. Loop up to 3 times; prompt user for manual intervention if exceeded
@@ -434,7 +434,7 @@
434
434
 
435
435
  - 必须有 ≥2 个自定义属性
436
436
  - 必须标注事件标签(模块归属)和采集端
437
- - 命名符合 snake_case
437
+ - 命名符合 snake_case(事件名默认小写,用户要求保留大写时按用户要求)
438
438
 
439
439
  ---
440
440
 
@@ -124,6 +124,7 @@ Upload is a two-step capability-gateway flow:
124
124
  | `user_set` | 覆盖赋值 |
125
125
  | `user_setOnce` | 仅首次赋值 |
126
126
  | `user_add` | 数值累加 |
127
+ | `user_append` | 列表追加 |
127
128
 
128
129
  ## v2(暂未实现)
129
130
 
@@ -119,10 +119,11 @@ A-E 在 writer 里用 `mergeCells` 合并。
119
119
  | `user_set` | 覆盖赋值(默认) |
120
120
  | `user_setOnce` | 仅首次赋值 |
121
121
  | `user_add` | 数值累加 |
122
+ | `user_append` | 列表追加 |
122
123
 
123
124
  xlsx 里填写英文 canonical 值本身,不翻译。
124
125
 
125
- 官方文档提及 `user_append`(字符串数组追加),样本中无实例,暂不实现。
126
+ 官方模板 `#用户数据` 隐藏说明行「更新方式:取值user_set、user_setOnce、user_add、user_append」已确认 `user_append` 在方案枚举内。`user_unset`(删除属性)不在方案枚举内——它是数据接入层 `#type` 的操作(见 data-rules.md),不是方案声明。
126
127
 
127
128
  ---
128
129
 
@@ -150,5 +151,5 @@ xlsx 里填写英文 canonical 值本身,不翻译。
150
151
  ## 开放问题(记一下,不影响 v1)
151
152
 
152
153
  1. ~~AE 后端是否区分 `object`(单对象)与 `array_row`(对象数组)~~ —— 已确认:AE 支持,wiki/te-docs/raw/preparations-before-data-ingestion.md 明确区分两种类型
153
- 2. `user_append` updateType 是否真的可用 —— 待构造测试
154
+ 2. ~~`user_append` updateType 是否真的可用~~ —— 已确认:官方模板 `#用户数据` 隐藏说明行「更新方式:取值user_set、user_setOnce、user_add、user_append」,枚举含 `user_append`(`user_unset` 不在方案枚举内)
154
155
  3. 严格错误码 —— 所有校验失败目前都是 `return_code=0 success` + 静默丢弃,无法从响应区分成功/失败;UI 上传才显示错误文案
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ae-kb
3
3
  version: 1.0.0
4
- description: 'AE/TE knowledge base CLI manual for creating, importing read-only compiled snapshots, querying, LLM-powered ask, listing accessible knowledge bases and their sources, deterministic index/grep/read retrieval, checking status, uploading, compiling, schema generation, URL sources, source deletion, and knowledge base deletion. Use when the user asks to manage TE/AE/ThinkingEngine knowledge bases, import a compiled Markdown ZIP snapshot, upload documents or URLs to a knowledge base, query knowledge, ask knowledge bases with an LLM, list accessible knowledge bases or source metadata, inspect knowledge base indexes, search knowledge base pages, read a specific knowledge base page, check knowledge base status, generate schemas, compile knowledge, remove sources, or delete a knowledge base. To choose which knowledge base is worth searching, use the ae-kb-discovery skill first; this skill runs the retrieval once a target is chosen. Must use ae-cli kb commands and must not guess knowledge base names, scopes, page paths, source IDs, source display names, JSON payload shapes, or URL formats.'
4
+ description: 'AE knowledge base CLI manual for creating, importing read-only compiled snapshots, querying, LLM-powered ask, listing accessible knowledge bases and their sources, deterministic index/grep/read retrieval, checking status, ZIP source upload and directory management, raw child-file reading, revision-checked child updates and deletion, compiling, schema generation, URL sources, source deletion, file/ZIP source draft replacement and restoration, and knowledge base deletion. Use when the user asks to manage AE (Agentic Engine) knowledge bases, import a compiled Markdown ZIP snapshot, upload documents or URLs to a knowledge base, query knowledge, ask knowledge bases with an LLM, list accessible knowledge bases or source metadata, inspect knowledge base indexes, search knowledge base pages, read a specific knowledge base page, check knowledge base status, generate schemas, compile knowledge, remove sources, or delete a knowledge base. To choose which knowledge base is worth searching, use the ae-kb-discovery skill first; this skill runs the retrieval once a target is chosen. Must use ae-cli kb commands and must not guess knowledge base names, scopes, page paths, source IDs, source display names, JSON payload shapes, or URL formats.'
5
5
  ---
6
6
 
7
7
  # ae-kb
@@ -10,12 +10,14 @@ AE CLI (`ae-cli`) knowledge base commands are invoked through:
10
10
 
11
11
  ```bash
12
12
  ae-cli kb +<command> [options]
13
+ ae-cli kb source <replace|restore|preview|commit|cancel|check-updates> [options]
13
14
  ```
14
15
 
15
16
  ## Global Rules
16
17
 
17
- - Use this skill for TE/AE knowledge base tasks: create, import a compiled snapshot, query, ask with LLM, list accessible knowledge bases and their sources, inspect indexes, grep pages, read pages, check status, upload sources, add URL sources, generate schema, compile, remove source files, and delete knowledge bases.
18
+ - Use this skill for AE knowledge base tasks: create, import a compiled snapshot, query, ask with LLM, list accessible knowledge bases and their sources, inspect indexes, grep pages, read pages, check status, upload sources, add URL sources, generate schema, compile, remove source files, and delete knowledge bases.
18
19
  - **Searching a knowledge base for an answer is the most common task. If that is what you are doing, go straight to [Explore Knowledge Base Pages](#explore-knowledge-base-pages) and read [`references/query-workflow.md`](references/query-workflow.md) first — it is the retrieval procedure. The other commands below are for managing knowledge bases, not answering from them.**
20
+ - **When retrieved pages will guide project-scoped business data analysis, read and follow [`references/analysis-workflow.md`](references/analysis-workflow.md) before running any data query. This is mandatory after a KB hit identifies a saved asset, definition, parameter, time rule, conflict, or decision boundary; do not jump directly to ad-hoc analysis or SQL.**
19
21
  - Read operations can run directly after required inputs are known. Write operations require explicit user intent and normally keep the confirmation prompt unless the user asks to bypass it.
20
22
  - Prefer `--dry-run` before destructive or broad writes when the user has not already validated the target.
21
23
  - Do not invent knowledge base names, scopes, source IDs, source display names, or JSON payloads. Ask the user or query known context when values are missing.
@@ -30,17 +32,18 @@ ae-cli kb +<command> [options]
30
32
 
31
33
  | Command | Risk | Purpose |
32
34
  |---|---:|---|
35
+ | `source check-updates` | write | Check one compiled Feishu source with the scheduled detector; mark changes without compiling. |
33
36
  | `+ask` | read | LLM-powered Q&A over knowledge bases; for multi-page synthesis or multi-hop questions. |
34
37
  | `+ask-status` | read | Query the current status of an ask execution by `--execution-id` without polling. |
35
38
  | `+list` | read | List accessible knowledge bases filtered by buildStatus (default: compiled). |
36
39
  | `+list-sources` | read | List source metadata for one knowledge base so exact source identifiers can be discovered safely. |
37
40
  | `+index` | read | List accessible knowledge bases and their `index.md` navigation maps. |
38
- | `+grep` | read | Keyword-search knowledge base pages and return matched lines with context. |
41
+ | `+grep` | read | Keyword-search knowledge base pages; returns a page-level results array (hitCount / pageKind / sections previews). |
39
42
  | `+read` | read | Read a full knowledge base page, a line window, or (with `--outline`) only the page heading tree. |
40
43
  | `+new` | write | Create a new personal or company knowledge base. |
41
- | `+import` | write | Import a compiled Markdown ZIP as a personal read-only snapshot. |
42
- | `+import-status` | read | Query one snapshot import task by `--request-id` without polling. |
43
- | `+add` | write | Upload local files, a non-recursive directory, or HTTP(S) pages converted to markdown. |
44
+ | `+import` | write | Import a compiled Markdown ZIP as a personal or company read-only snapshot; `--scope` defaults to `personal`. |
45
+ | `+import-status` | read | Query one snapshot import task by `--request-id` without polling; output includes the persisted `scope`. |
46
+ | `+add` | write | Upload local files (including ZIP directory sources), a non-recursive directory, or HTTP(S) pages converted to markdown. |
44
47
  | `+url` | write | Upload a URL source directly with optional display name and parsing instruction. |
45
48
  | `+schema` | write | Generate the compile schema for a knowledge base. |
46
49
  | `+compile` | write | Compile a knowledge base in incremental or full mode. |
@@ -48,6 +51,81 @@ ae-cli kb +<command> [options]
48
51
  | `+rm-source` | high-risk-write | Delete one source from a knowledge base by stable ID; exact display name is legacy compatibility only. |
49
52
  | `+remove` | write | Delete an entire knowledge base. |
50
53
 
54
+ ## Published Version History
55
+
56
+ Use the nine version commands described in [`references/versions.md`](references/versions.md) to inspect immutable published history, compare source changes, and explicitly roll back an earlier version as a new publication. These commands manage history; `+index/+grep/+read/+ask` continue to use current published content.
57
+
58
+ | Command | Risk | Purpose |
59
+ | --- | --- | --- |
60
+ | `+versions` | read | List published versions and latestVersionId. |
61
+ | `+version-show` | read | Show one version summary. |
62
+ | `+version-sources` | read | Discover historical source IDs. |
63
+ | `+version-diff` | read | Compare two versions. |
64
+ | `+version-tree` | read | List a historical ZIP/URL source directory. |
65
+ | `+version-read` | read | Preview a historical directory child file. |
66
+ | `+version-download` | read | Save one ordinary historical file source; no directory download. |
67
+ | `+rollback` | high-risk-write | Restore an earlier version and create a new version. |
68
+ | `+rollback-status` | read | Query a persisted rollback Operation without polling. |
69
+
70
+ ## Source Draft Replacement and Restoration
71
+
72
+ Use [`references/source-mutations.md`](references/source-mutations.md) for file/ZIP source replacement and restoration. These new commands use `kb source <action>`; `+rollback` remains a whole-KB publication operation.
73
+
74
+ | Command | Risk | Purpose |
75
+ |---|---|---|
76
+ | `source replace` | write | Replace an ordinary file draft, or prepare a ZIP archive replacement preview. |
77
+ | `source restore` | write | Restore a file draft from a published version, or prepare a ZIP source/child restore preview. |
78
+ | `source preview` | read | Read a page of ZIP candidate changes before confirmation. |
79
+ | `source commit` | high-risk-write | Confirm a reviewed ZIP candidate, including any deletions. |
80
+ | `source cancel` | high-risk-write | Discard an uncommitted ZIP candidate. |
81
+
82
+ Require exact `--name`, `--scope`, current `--id`, and a current `--expected-revision` for mutations. File replacements keep the original format but allow different filenames. ZIP requires `.zip`. URL/Feishu and deleted parent sources are not supported. Updates affect the draft only; publication still requires compilation. ZIP previews must not be auto-committed. Do not retry uncertain writes.
83
+
84
+ ## ZIP Directory Sources
85
+
86
+ Use `+add --files '["./sources.zip"]'` to upload one ZIP as one editable parent source, preserving its internal hierarchy. Archive validation and limits are enforced by the server. This is different from `+import`, which creates a read-only compiled snapshot. Passing a local directory to `+add` still uploads only its immediate supported files; it does not recursively package that directory.
87
+
88
+ Discover the exact parent ID with `+list-sources`. ZIP rows include `fileCount`, `sizeBytes`, `contentRevision`, and `updateStatus`.
89
+
90
+ | Command | Risk | Purpose |
91
+ | --- | --- | --- |
92
+ | `+source-ls` | read | List one directory page with revision, current children and deleted paths relative to the successful baseline. |
93
+ | `+source-read` | read | Read a child source file as UTF-8/base64, or save original bytes. |
94
+ | `+source-put` | write | Add one local file or explicitly replace the exact ZIP-relative path. |
95
+ | `+source-rm` | high-risk-write | Delete one child file or recursively delete a child directory. |
96
+
97
+ ```bash
98
+ ae-cli kb +source-ls --name handbook --id <source-id> --path "" --limit 100
99
+ ae-cli kb +source-ls --name handbook --id <source-id> --path "guides" --cursor <nextCursor>
100
+ ae-cli kb +source-read --name handbook --id <source-id> --path "guides/intro.md"
101
+ ae-cli kb +source-read --name handbook --id <source-id> --path "images/chart.png" --output ./chart.png
102
+ ae-cli kb +source-read --name handbook --id <source-id> --path "images/chart.png" --encoding base64
103
+ ae-cli kb +source-put --name handbook --id <source-id> --path "guides/new.md" --file ./new.md --action add --expected-revision 7 --dry-run
104
+ ae-cli kb +source-put --name handbook --id <source-id> --path "guides/new.md" --file ./new.md --action add --expected-revision 7
105
+ ae-cli kb +source-put --name handbook --id <source-id> --path "guides/new.md" --file ./revised.md --action replace --expected-revision 8
106
+ ae-cli kb +source-rm --name handbook --id <source-id> --path "guides/new.md" --expected-revision 9
107
+ ae-cli kb +source-rm --name handbook --id <source-id> --path "guides/obsolete" --recursive --expected-revision 10
108
+ ae-cli kb +compile --name handbook --mode incremental
109
+ ```
110
+
111
+ - Copy the source ID, paths and revision from current discovery. Names resolve personal then company, following the existing External API; no scope override is available on these commands.
112
+ - `--path` is relative to the ZIP root, not a local filesystem or `raw/zip/...` path. Root listing uses an empty path. Nonempty paths cannot be absolute or contain empty, dot, parent or backslash segments.
113
+ - Listing returns one page; continue using `nextCursor` and the same path. On a revision change, restart discovery before writing.
114
+ - `+source-read` reads source bytes; `+read` reads compiled Wiki pages. Default UTF-8 output fails on invalid UTF-8. Base64 preserves binary data. `--output` creates a new local file and refuses to overwrite an existing file.
115
+ - `+source-put` accepts one file up to 50 MB. Default `--action add` rejects an existing path; `--action replace` explicitly authorizes overwriting an existing child. There is no silent upsert. Dry-run shows metadata and redacts file content.
116
+ - `--expected-revision` is mandatory for writes. A 409 conflict is returned with its server error code; the command never refreshes and retries the write automatically.
117
+ - `+source-rm` keeps the parent source. Nonempty directory removal requires `--recursive`; deletion follows the CLI confirmation gate. Use `--yes` only when automated deletion of the exact target is already authorized. `+rm-source --id` deletes the entire parent.
118
+ - A mutation marks the parent changed but does not start compilation or regenerate Schema. Run incremental compilation explicitly; wait for successful publication before the next test stage.
119
+ - `+status` is the existing aggregate status query; it is not a per-run event or ZIP Diff reader. Do not interpret its compilation submission response as successful publication.
120
+ - No Gateway equivalent is registered in the current KB implementation. These commands reuse the typed External source APIs.
121
+
122
+ Transition status: transitional
123
+ Owning module: te-claude External Knowledge Base Sources API
124
+ Current transport: authenticated External REST via `kbApi` and multipart `kbUpload`.
125
+ Gateway target: TBD (ZIP source directory and raw-file capabilities)
126
+ Review after: 2026-12-06
127
+ Exit condition: migrate when equivalent typed Gateway file, directory and revision-aware mutation capabilities exist; retain CLI file handling and explicit mutation semantics.
128
+
51
129
  ## Common Workflows
52
130
 
53
131
  ### Create a Knowledge Base
@@ -107,6 +185,7 @@ Use `+add` when sources are local files, local directories, or pages that should
107
185
  ```bash
108
186
  ae-cli kb +add \
109
187
  --name engineering-handbook \
188
+ --scope company \
110
189
  --files '["./README.md","./docs","https://example.com/guide"]'
111
190
  ```
112
191
 
@@ -125,6 +204,7 @@ Use `+url` when adding one URL source and optionally passing a display name or p
125
204
  ```bash
126
205
  ae-cli kb +url \
127
206
  --name engineering-handbook \
207
+ --scope company \
128
208
  --url https://example.com/guide \
129
209
  --display-name guide \
130
210
  --parse-instruction "Keep headings and code blocks"
@@ -137,16 +217,20 @@ ae-cli kb +url \
137
217
  Generate the schema first when the knowledge base needs a compile schema.
138
218
 
139
219
  ```bash
140
- ae-cli kb +schema --name engineering-handbook
220
+ ae-cli kb +schema --name engineering-handbook --scope company
141
221
  ```
142
222
 
143
- Use `--force` only when `+status` reports `schema_generating` and the user explicitly wants to replace the current generation attempt. The replacement may consume additional tokens. Use `--model` only when the user provides the model display name.
223
+ Use `--force` only when `+status` reports `schema_generating` and the user explicitly wants to replace the current generation attempt. The replacement may consume additional tokens.
224
+
225
+ Schema and Compile accept the same optional model reference. Prefer the model record `id` returned by `ae-cli agent +list-models` (`Model.id`). Historical `modelId` and the unambiguous `modelId::scope` form remain compatible. A model `displayName` is presentation text, not a stable reference.
144
226
 
145
227
  To add one-time guidance for this generation without changing stored knowledge base metadata, pass `--custom-instructions`. The server trims the value, treats whitespace-only input as absent, and accepts up to 10,000 Unicode characters. Do not include secrets or credentials.
146
228
 
147
229
  ```bash
148
230
  ae-cli kb +schema \
149
231
  --name engineering-handbook \
232
+ --scope company \
233
+ --model <model-ref> \
150
234
  --custom-instructions "Prioritize troubleshooting workflows and preserve command examples"
151
235
  ```
152
236
 
@@ -155,7 +239,7 @@ Use `--dry-run` to inspect the request body before sending it. While generation
155
239
  Compile after sources and schema are ready:
156
240
 
157
241
  ```bash
158
- ae-cli kb +compile --name engineering-handbook --mode incremental
242
+ ae-cli kb +compile --name engineering-handbook --scope company --mode incremental --model <model-ref>
159
243
  ```
160
244
 
161
245
  Valid compile modes are `incremental` and `full`; default is `incremental`.
@@ -165,14 +249,14 @@ Valid compile modes are `incremental` and `full`; default is `incremental`.
165
249
  Use `+status` to inspect the current status of a knowledge base.
166
250
 
167
251
  ```bash
168
- ae-cli kb +status --name engineering-handbook
252
+ ae-cli kb +status --name engineering-handbook --scope company
169
253
  ```
170
254
 
171
255
  ### Ask Knowledge (LLM)
172
256
 
173
257
  Use `+ask` when the question requires synthesizing across multiple pages or multi-hop reasoning — a server-side agent runs the full retrieval loop and returns a synthesized answer with its source paths. Prefer `+index` -> `+grep` -> `+read` when deterministic retrieval is enough.
174
258
 
175
- The `+ask` command uses asynchronous submit/poll: by default, it automatically polls for completion (every 5s, up to 10 minutes) and prints the final answer. The output JSON is isomorphic to the previous synchronous response, so consumers require no changes.
259
+ The `+ask` command uses asynchronous submit/poll: by default, it automatically polls for completion (every 5s, up to 10 minutes) and prints the final answer with its execution ID, sources, model usage, tool call count, and model ID.
176
260
 
177
261
  ```bash
178
262
  # Default: submit and poll for completion
@@ -180,7 +264,6 @@ ae-cli kb +ask \
180
264
  --question "How do we troubleshoot payment alerts?" \
181
265
  --sources '[{"scope":"company","name":"engineering-handbook"}]' \
182
266
  --model-id claude-sonnet-4-6 \
183
- --max-turns 50 \
184
267
  --locale zh
185
268
 
186
269
  # Submit only, return executionId immediately (for batch processing)
@@ -193,10 +276,9 @@ ae-cli kb +ask-status --execution-id <id>
193
276
  - `--question`, alias `-q`: required natural-language question (1-2000 characters).
194
277
  - `--sources`: optional JSON array of knowledge base refs. Omit to search all accessible knowledge bases.
195
278
  - `--model-id`: optional LLM model ID. Omit to use the platform default.
196
- - `--max-turns`: optional agent turn limit (1-100, server default 50).
197
279
  - `--locale`: optional locale: `zh`, `en`, `ja`, or `ko`.
198
280
  - `--no-wait`: optional boolean flag. Return immediately after submission with `{executionId, status}`, without polling.
199
- - **Failure handling**: If execution fails, the command exits non-zero and prints an error message on stderr prefixed with the typed error code, e.g. `[timeout] ...` / `[model_error] ...` / `[invalid_sources] ...` (followed by the executionId). Treat the bracketed code as the machine-readable failure type.
281
+ - **Failure handling**: If execution fails, the command exits non-zero and prints the unified JSON error envelope on stderr: `{"ok":false,"error":{"type":"api","code":"<server-code>","message":"..."}}`. Stable server codes are `model_unavailable`, `sandbox_unavailable`, `agent_skill_unavailable`, `dispatch_auth_unavailable`, `provider_failed`, `retrieval_error`, `timeout`, and `process_restart`.
200
282
 
201
283
  ### List Accessible Knowledge Bases
202
284
 
@@ -225,7 +307,7 @@ ae-cli kb +index \
225
307
  --sources '[{"scope":"company","name":"engineering-handbook"}]'
226
308
  ```
227
309
 
228
- Then use `+grep` to locate likely pages and line numbers:
310
+ Then use `+grep` to locate likely pages:
229
311
 
230
312
  ```bash
231
313
  ae-cli kb +grep \
@@ -235,7 +317,7 @@ ae-cli kb +grep \
235
317
  --top-k 10
236
318
  ```
237
319
 
238
- Each grep hit carries `path`, `line`, `breadcrumb`, a context snippet, and the section range of the matched line (`sectionStartLine` / `sectionEndLine`). `line` is the hit anchor; `sectionStartLine` / `sectionEndLine` are the enclosing heading-section boundaries. Choose the smallest reliable `--offset` / `--limit` window that preserves the needed evidence; use the section range when the answer needs whole-section context.
320
+ The response is a page-level `results` array: each entry is one page with its full `hitCount`, a `pageKind` (`content` or `catalog`), up to 4 `sections` previews (breadcrumb, `sectionStartLine`/`sectionEndLine`, text preview), and `moreSections`. Use `hitCount` and the previews to decide which pages to read; `pageKind: "catalog"` marks a module directory page — treat its entries as detail-page navigation, not as an answer source. Read the section range with `--offset sectionStartLine` / `--limit sectionEndLine - sectionStartLine + 1`; when `moreSections > 0` and the answer is not in the previews, re-grep that single page to see all its hits.
239
321
 
240
322
  Use `+read --outline` when the current target page has no reliable grep range and headings are needed to choose a section:
241
323
 
@@ -246,14 +328,15 @@ ae-cli kb +read \
246
328
  --outline
247
329
  ```
248
330
 
249
- Then use `+read` to open the selected window, using the hit anchor, a section boundary from same-page or linked-page grep, or two adjacent outline headings:
331
+ Then use `+read` to open the selected window, using a page-group section boundary or two adjacent outline headings:
250
332
 
251
333
  ```bash
252
334
  ae-cli kb +read \
253
335
  --source '{"scope":"company","name":"engineering-handbook"}' \
254
336
  --path "wiki/sandbox.md" \
255
337
  --offset 42 \
256
- --limit 60
338
+ --limit 60 \
339
+ --expand block
257
340
  ```
258
341
 
259
342
  ### List Sources
@@ -261,7 +344,7 @@ ae-cli kb +read \
261
344
  List sources first to discover the stable identifier for the intended source:
262
345
 
263
346
  ```bash
264
- ae-cli kb +list-sources --name engineering-handbook
347
+ ae-cli kb +list-sources --name engineering-handbook --scope company
265
348
  ```
266
349
 
267
350
  Copy the exact `id` from the response into `+rm-source`. Do not guess a source ID from a local filename, URL, display name, or an older upload response.
@@ -280,6 +363,7 @@ Use `+rm-source --id` with the exact ID returned by the current `+list-sources`
280
363
  ```bash
281
364
  ae-cli kb +rm-source \
282
365
  --name engineering-handbook \
366
+ --scope company \
283
367
  --id cm-source-id
284
368
  ```
285
369
 
@@ -298,7 +382,7 @@ If the user only gives a loose source name, do not guess a source ID. Run `+list
298
382
  Use `+remove` for deleting the entire knowledge base. Confirm the target name with the user if there is any ambiguity.
299
383
 
300
384
  ```bash
301
- ae-cli kb +remove --name engineering-handbook
385
+ ae-cli kb +remove --name engineering-handbook --scope company
302
386
  ```
303
387
 
304
388
  ## Command Reference
@@ -306,17 +390,16 @@ ae-cli kb +remove --name engineering-handbook
306
390
  ### `+ask`
307
391
 
308
392
  ```bash
309
- ae-cli kb +ask --question "<question>" [--sources '[{"scope":"company","name":"kb-name"}]'] [--model-id claude-sonnet-4-6] [--max-turns 50] [--locale zh|en|ja|ko] [--no-wait]
393
+ ae-cli kb +ask --question "<question>" [--sources '[{"scope":"company","name":"kb-name"}]'] [--model-id claude-sonnet-4-6] [--locale zh|en|ja|ko] [--no-wait]
310
394
  ```
311
395
 
312
396
  - `--question`, alias `-q`: required natural-language question (1-2000 characters).
313
397
  - `--sources`: optional JSON array of knowledge base refs. Omit to search all accessible knowledge bases.
314
398
  - `--model-id`: optional LLM model ID. Omit to use the platform default.
315
- - `--max-turns`: optional agent turn limit (1-100, server default 50).
316
399
  - `--locale`: optional locale: `zh`, `en`, `ja`, or `ko`.
317
400
  - `--no-wait`: optional. Return immediately with `{executionId, status}` instead of polling.
318
401
  - When to use: multi-page synthesis or multi-hop questions. For simple factual lookups, prefer `+index` / `+grep` / `+read`.
319
- - Output: By default, polls and returns `{executionId, answer, sources, modelUsage, toolCallCount, maxTurns, modelId}` (same fields as the previous synchronous response, plus `executionId`). With `--no-wait`, returns `{executionId, status}` immediately. On failure, exits non-zero with a stderr message prefixed by the typed error code (`[timeout]`, `[model_error]`, `[invalid_sources]`, `[process_restart]`).
402
+ - Output: By default, polls and returns `{executionId, answer, sources, modelUsage, toolCallCount, modelId}`. With `--no-wait`, returns `{executionId, status}` immediately. On failure, exits non-zero with the unified stderr envelope containing `error.type="api"`, the server `error.code` (`model_unavailable`, `sandbox_unavailable`, `agent_skill_unavailable`, `dispatch_auth_unavailable`, `provider_failed`, `retrieval_error`, `timeout`, or `process_restart`), and `error.message`.
320
403
 
321
404
  ### `+ask-status`
322
405
 
@@ -325,7 +408,7 @@ ae-cli kb +ask-status --execution-id <id>
325
408
  ```
326
409
 
327
410
  - `--execution-id`: required. The execution ID returned by `+ask` submission.
328
- - Output: Returns the current execution state: `{executionId, status, elapsedMs?, answer?, sources?, modelUsage?, toolCallCount?, error?}`. Does not poll; returns a single snapshot.
411
+ - Output: Returns one successful CLI envelope snapshot. For a failed execution, the stable server code remains at `data.error.code`: `{"ok":true,"data":{"executionId":"...","status":"failed","error":{"code":"retrieval_error","message":"..."}}}`. Does not poll.
329
412
 
330
413
  ### `+list`
331
414
 
@@ -357,18 +440,19 @@ ae-cli kb +grep --query "<keywords>" --sources '[{"scope":"company","name":"kb-n
357
440
  - `--paths`: required JSON array of wiki pages or subdirectories **copied** from `+index`. A single page is still an array, e.g. `["wiki/sandbox.md"]`. Distinct from `+read --path` (one string).
358
441
  - `--top-k`: optional max number of hits, 1-50, default 10.
359
442
  - `--locale`: optional locale: `zh`, `en`, `ja`, or `ko`.
360
- - Each hit includes `sectionStartLine` / `sectionEndLine`: the line range of the section (bounded by the nearest headings) containing the matched line. Use it as the `+read` window.
443
+ - Each page entry in results carries `hitCount` (full match count), `pageKind`, and `sections` previews with `sectionStartLine` / `sectionEndLine` use the section range as the `+read` window.
361
444
 
362
445
  ### `+read`
363
446
 
364
447
  ```bash
365
- ae-cli kb +read --source '{"scope":"company","name":"kb-name"}' --path "index.md" [--offset 1] [--limit 200] [--outline] [--locale zh|en|ja|ko]
448
+ ae-cli kb +read --source '{"scope":"company","name":"kb-name"}' --path "index.md" [--offset 1] [--limit 200] [--expand block|none] [--outline] [--locale zh|en|ja|ko]
366
449
  ```
367
450
 
368
451
  - `--source`: required JSON object pointing to exactly one knowledge base.
369
452
  - `--path`: required page path relative to the knowledge base root, such as `index.md` or `wiki/concepts/data-model.md`.
370
- - `--offset`: optional 1-based start line.
371
- - `--limit`: optional max line count, 1-10000.
453
+ - `--offset`: optional 1-based integer start line.
454
+ - `--limit`: optional max line count, 1-2000.
455
+ - `--expand`: optional Markdown block expansion mode. `block` lets the server include a complete Markdown block outside the requested line window; `none` keeps the exact offset/limit window. Omit it to use the server default, `block`.
372
456
  - `--outline`: optional. Return only the whole-page heading tree (`{level, heading, line}`) with empty content, independent of `--offset` / `--limit`. Use it on long pages to choose which section to read.
373
457
  - `--locale`: optional locale: `zh`, `en`, `ja`, or `ko`.
374
458
 
@@ -381,7 +465,7 @@ ae-cli kb +new --name "<name>" [--scope personal|company] [--description "..."]
381
465
  ### `+add`
382
466
 
383
467
  ```bash
384
- ae-cli kb +add --name "<name>" --files '["./a.md","./docs","https://example.com/page"]'
468
+ ae-cli kb +add --name "<name>" --files '["./a.md","./docs","https://example.com/page"]' [--scope personal|company]
385
469
  ```
386
470
 
387
471
  ### `+import`
@@ -411,46 +495,50 @@ ae-cli kb +import-status --request-id <requestId>
411
495
  ### `+url`
412
496
 
413
497
  ```bash
414
- ae-cli kb +url --name "<name>" --url "https://example.com/page" [--display-name "..."] [--parse-instruction "..."]
498
+ ae-cli kb +url --name "<name>" --url "https://example.com/page" [--scope personal|company] [--display-name "..."] [--parse-instruction "..."]
415
499
  ```
416
500
 
417
501
  ### `+schema`
418
502
 
419
503
  ```bash
420
- ae-cli kb +schema --name "<name>" [--force] [--model "<model displayName>"] [--custom-instructions "<one-time guidance>"]
504
+ ae-cli kb +schema --name "<name>" [--scope personal|company] [--force] [--model <model-ref>] [--custom-instructions "<one-time guidance>"]
421
505
  ```
422
506
 
423
507
  - `--custom-instructions`: Optional per-run schema-generation guidance. It is not persisted; whitespace-only input is omitted. The server allows at most 10,000 Unicode characters and rejects disallowed control characters. Do not include secrets or credentials.
424
508
  - `--force`: Replace the current attempt only when schema generation is already running and the user explicitly requests the replacement. The selected model and custom instructions apply to the new attempt, which may consume additional tokens.
425
509
  - `--dry-run`: Shows the same `customInstructions` request field that execution will send.
510
+ - `--model`: Optional stable model reference. Prefer `Model.id` from `ae-cli agent +list-models`; historical `modelId` and `modelId::scope` remain compatible.
511
+ - `--scope`: Optional exact knowledge-base scope. Omit it to retain the legacy personal-to-company lookup order.
426
512
  - Errors: `KB_SCHEMA_CUSTOM_INSTRUCTIONS_INVALID` means the field failed validation. `KB_SCHEMA_GENERATION_IN_PROGRESS` means generation is active and a request without `--force` supplied a new model or effective custom instructions.
427
513
 
428
514
  ### `+compile`
429
515
 
430
516
  ```bash
431
- ae-cli kb +compile --name "<name>" [--mode incremental|full]
517
+ ae-cli kb +compile --name "<name>" [--scope personal|company] [--mode incremental|full] [--model <model-ref>]
432
518
  ```
433
519
 
434
520
  ### `+status`
435
521
 
436
522
  ```bash
437
- ae-cli kb +status --name "<name>"
523
+ ae-cli kb +status --name "<name>" [--scope personal|company]
438
524
  ```
439
525
 
440
526
  ### `+list-sources`
441
527
 
442
528
  ```bash
443
- ae-cli kb +list-sources --name "<name>"
529
+ ae-cli kb +list-sources --name "<name>" [--scope personal|company]
444
530
  ```
445
531
 
446
532
  - `--name`: required knowledge base name.
447
- - Output: Safe source metadata including the stable `id` needed by `+rm-source`; raw paths, hashes, credentials, and source content are not returned.
533
+ - Output: `items` contains effective sources with stable `id`. `pendingDeletions` contains soft-deleted sources still included in the current successful version. `deletionMaintenance` is separate and may report already-published deletions awaiting cleanup. Paths, hashes, credentials, and source content are not returned.
534
+ - Check `deletionProjection.state` and its `baseline` before interpreting deletion lists. `ready` with `pendingDeletions: []` means no pending deletion at that baseline. `changing`, `review_required`, or `unavailable` with `pendingDeletions: null` means undetermined; display the `reasonCode`, never turn null into an empty list. Legacy libraries without a verifiable complete publication manifest return unavailable until a real version is published.
535
+ - A rollback creates a new current version. An older deletion receipt cannot override membership in that version. A later source deletion needs publication again.
448
536
  - Copy the exact `id` from the current response before deleting a source; never guess it.
449
537
 
450
538
  ### `+rm-source`
451
539
 
452
540
  ```bash
453
- ae-cli kb +rm-source --name "<name>" --id "<source-id>"
541
+ ae-cli kb +rm-source --name "<name>" --id "<source-id>" [--scope personal|company]
454
542
  ```
455
543
 
456
544
  - `--id`: preferred stable source identifier copied from `+list-sources`.
@@ -460,5 +548,27 @@ ae-cli kb +rm-source --name "<name>" --id "<source-id>"
460
548
  ### `+remove`
461
549
 
462
550
  ```bash
463
- ae-cli kb +remove --name "<name>"
551
+ ae-cli kb +remove --name "<name>" [--scope personal|company]
552
+ ```
553
+
554
+ ## Check a Feishu source for updates
555
+
556
+ ```bash
557
+ ae-cli kb source check-updates --name "Engineering Handbook" --id "<source-id>" --scope company --dry-run
558
+ ae-cli kb source check-updates --name "Engineering Handbook" --id "<source-id>" --scope company
464
559
  ```
560
+
561
+ Copy the ID from `kb +list-sources`. Requires source write permission. Only compiled, non-deleted Feishu URL sources are eligible. The API uses the same detector as the scheduled task, including existing pending-change skips and source-owner sandbox credentials. It never starts compilation or clears pending changes.
562
+
563
+ The synchronous response contains `sourceId`, `scanned`, `updated`, `failed`, `urlChangeState`, and `updateStatus`. `scanned` counts candidates, not completed content comparisons; `updated` counts newly marked sources. Zero updates can mean unchanged content, an already pending change, unavailable old raw, or a concurrent state change. It must not be reported as proof that all content is identical. Failed checks return a non-2xx response and a CLI error. A timeout does not prove completion or cancellation; read `kb +list-sources` before deciding whether to retry.
564
+
565
+ Transport: `POST /agent/api/external/knowledge-bases/sources/check-updates`, body `{name, sourceId, scope?}`. `--dry-run` only previews the request and does not authenticate or check remote permissions.
566
+
567
+ ### Admission record: source check-updates
568
+
569
+ - Classification: Transitional (no Gateway equivalent for this new detector trigger).
570
+ - Owning module: te-claude knowledge-base source management.
571
+ - Current transport: KB external REST through `kbApi` and CLI token.
572
+ - Gateway target: TBD; reuse an equivalent source update-check capability when available.
573
+ - Review after: 2026-10-16.
574
+ - Exit condition: once the Gateway exposes equivalent authorization and detector semantics, migrate the typed command to L2 or use L3 if it adds no value.